From 9c1b47cc8b05ff3495ad6a28a57be6bf640db0ec Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 7 Mar 2021 20:03:18 +0530 Subject: [PATCH 0001/1541] Initial commit --- LICENSE | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 674 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. From 78152fa48c79f8258c36b74bcfd4582fd2cbb78f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 7 Mar 2021 19:52:30 +0530 Subject: [PATCH 0002/1541] initial commit --- init.lua | 40 +++++++++ lua/bufferline/lua.lua | 54 ++++++++++++ lua/lsp_config/lua.lua | 61 +++++++++++++ lua/mappings/lua.lua | 9 ++ lua/nvimTree/lua.lua | 88 +++++++++++++++++++ lua/pluginsList/lua.lua | 21 +++++ lua/statusline/lua.lua | 170 +++++++++++++++++++++++++++++++++++++ lua/treesitter/lua.lua | 13 +++ lua/utils/lua.lua | 22 +++++ lua/web-devicons/lua.lua | 62 ++++++++++++++ plugin/packer_compiled.vim | 109 ++++++++++++++++++++++++ 11 files changed, 649 insertions(+) create mode 100644 init.lua create mode 100644 lua/bufferline/lua.lua create mode 100644 lua/lsp_config/lua.lua create mode 100644 lua/mappings/lua.lua create mode 100644 lua/nvimTree/lua.lua create mode 100644 lua/pluginsList/lua.lua create mode 100644 lua/statusline/lua.lua create mode 100644 lua/treesitter/lua.lua create mode 100644 lua/utils/lua.lua create mode 100644 lua/web-devicons/lua.lua create mode 100644 plugin/packer_compiled.vim diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..6a53fe1 --- /dev/null +++ b/init.lua @@ -0,0 +1,40 @@ +-- load plugins +require('pluginsList.lua') + +require('utils.lua') +require('nvimTree.lua') +require('lsp_config.lua') + +require'colorizer'.setup() + +local cmd = vim.cmd +local g = vim.g +local indent = 2 + +cmd 'colorscheme base16-onedark' +cmd 'syntax enable' +cmd 'syntax on' + +g.auto_save = 1 + +g.indentLine_enabled = 1 +g.indentLine_char_list = {'▏'} + +require('treesitter.lua') +require('statusline.lua') +require('bufferline.lua') +require('mappings.lua') +require('web-devicons.lua') + +-- highlights +cmd("hi LineNr guibg=NONE") +cmd("hi SignColumn guibg=NONE") +cmd("hi VertSplit guibg=NONE") +cmd("highlight DiffAdd guifg=#81A1C1 guibg = none") +cmd("highlight DiffChange guifg =#3A3E44 guibg = none") +cmd("highlight DiffModified guifg = #81A1C1 guibg = none") +cmd("hi EndOfBuffer guifg=#282c34") + +-- tree folder name , icon color +cmd("highlight NvimTreeFolderIcon guifg = #61afef") +cmd("highlight NvimTreeFolderName guifg = #61afef") diff --git a/lua/bufferline/lua.lua b/lua/bufferline/lua.lua new file mode 100644 index 0000000..3765b4e --- /dev/null +++ b/lua/bufferline/lua.lua @@ -0,0 +1,54 @@ +vim.o.termguicolors = true + +require'bufferline'.setup{ + options = { + buffer_close_icon= '', + modified_icon = '●', + close_icon = '', + left_trunc_marker = '', + right_trunc_marker = '', + max_name_length = 14, + max_prefix_length = 13, + tab_size = 18, + enforce_regular_tabs = true , + view = "multiwindow" , + show_buffer_close_icons = true , + separator_style = "thin" + }, + + highlights = { + background = { + guifg = comment_fg, + guibg = '#282c34' + }, + fill = { + guifg = comment_fg, + guibg = '#282c34' + }, + buffer_selected = { + guifg = normal_fg, + guibg = '#3A3E44', + gui = "bold" + }, + separator_visible = { + guifg = '#282c34' , + guibg = '#282c34' + }, + separator_selected = { + guifg = '#282c34' , + guibg = '#282c34' + }, + separator = { + guifg = '#282c34' , + guibg = '#282c34' + }, + indicator_selected = { + guifg = '#282c34' , + guibg = '#282c34' + }, + modified_selected = { + guifg = string_fg, + guibg = '#3A3E44' + } + }; +} diff --git a/lua/lsp_config/lua.lua b/lua/lsp_config/lua.lua new file mode 100644 index 0000000..23890bc --- /dev/null +++ b/lua/lsp_config/lua.lua @@ -0,0 +1,61 @@ +vim.cmd [[ packadd nvim-lspconfig ]] +vim.cmd [[ packadd completion-nvim ]] + +require'lspconfig'.html.setup{} + +local nvim_lsp = require('lspconfig') +local on_attach = function(client, bufnr) + local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end + local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end + + buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') + + -- Mappings. + local opts = { noremap=true, silent=true } + buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) + buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opts) + buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) + buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) + buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) + buf_set_keymap('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) + buf_set_keymap('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) + buf_set_keymap('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) + buf_set_keymap('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) + buf_set_keymap('n', 'rn', 'lua vim.lsp.buf.rename()', opts) + buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', opts) + buf_set_keymap('n', 'e', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) + buf_set_keymap('n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) + buf_set_keymap('n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) + buf_set_keymap('n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) + + -- Set some keybinds conditional on server capabilities + if client.resolved_capabilities.document_formatting then + buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) + elseif client.resolved_capabilities.document_range_formatting then + buf_set_keymap("n", "f", "lua vim.lsp.buf.range_formatting()", opts) + end + + -- Set autocommands conditional on server_capabilities + if client.resolved_capabilities.document_highlight then + vim.api.nvim_exec([[ + hi LspReferenceRead cterm=bold ctermbg=red guibg=LightYellow + hi LspReferenceText cterm=bold ctermbg=red guibg=LightYellow + hi LspReferenceWrite cterm=bold ctermbg=red guibg=LightYellow + augroup lsp_document_highlight + autocmd! * + autocmd CursorHold lua vim.lsp.buf.document_highlight() + autocmd CursorMoved lua vim.lsp.buf.clear_references() + augroup END + ]], false) + end +end + +-- Use a loop to conveniently both setup defined servers +local servers = { "html" , "cssls" , "tsserver"} +for _, lsp in ipairs(servers) do + nvim_lsp[lsp].setup { on_attach = on_attach } +end + +-- keybinds +vim.api.nvim_set_keymap('i', '', 'pumvisible() ? "\\" : "\\"', { noremap = true, expr = true }) +vim.api.nvim_set_keymap('i', '', 'pumvisible() ? "\\" : "\\"', { noremap = true, expr = true }) diff --git a/lua/mappings/lua.lua b/lua/mappings/lua.lua new file mode 100644 index 0000000..8d1d148 --- /dev/null +++ b/lua/mappings/lua.lua @@ -0,0 +1,9 @@ +local function map(mode, lhs, rhs, opts) + local options = {noremap = true} + if opts then options = vim.tbl_extend('force', options, opts) end + vim.api.nvim_set_keymap(mode, lhs, rhs, options) +end + +-- keybind list + +map('', 'c', '"+y') diff --git a/lua/nvimTree/lua.lua b/lua/nvimTree/lua.lua new file mode 100644 index 0000000..50a39c7 --- /dev/null +++ b/lua/nvimTree/lua.lua @@ -0,0 +1,88 @@ +vim.cmd [[packadd nvim-tree.lua]] + +vim.o.termguicolors = true + +vim.g.nvim_tree_side = 'left' +vim.g.nvim_tree_width = 24 +vim.g.nvim_tree_ignore = { '.git', 'node_modules', '.cache' } +vim.g.nvim_tree_auto_open = 0 +vim.g.nvim_tree_auto_close = 0 +vim.g.nvim_tree_quit_on_open = 0 +vim.g.nvim_tree_follow = 1 +vim.g.nvim_tree_indent_markers = 1 +vim.g.nvim_tree_hide_dotfiles = 1 +vim.g.nvim_tree_git_hl = 1 +vim.g.nvim_tree_root_folder_modifier = ':~' +vim.g.nvim_tree_tab_open = 1 +vim.g.nvim_tree_allow_resize = 1 + +vim.g.nvim_tree_show_icons = { + git = 1, + folders = 1, + files = 1, + } + +vim.g.nvim_tree_icons = { + default = ' ', + symlink = ' ', + + git = { + unstaged = "✗", + staged = "✓", + unmerged = "", + renamed = "➜", + untracked = "★" + }, + folder = { + default = "", + open = "", + symlink = "", + } + } + +local get_lua_cb = function (cb_name) + return string.format(":lua require'nvim-tree'.on_keypress('%s')", cb_name) +end + +-- Mappings for nvimtree + +vim.api.nvim_set_keymap('n', '', ':NvimTreeToggle', { + noremap = true, + silent = true + }) + +-- [[ +vim.api.nvim_set_keymap('n', '', ':NvimTreeRefresh', { + noremap = true, + silent = true + }) + + -- ]] + +vim.g.nvim_tree_bindings = { + [""] = get_lua_cb("edit"), + ["o"] = get_lua_cb("edit"), + ["<2-LeftMouse>"] = get_lua_cb("edit"), + ["<2-RightMouse>"] = get_lua_cb("cd"), + [""] = get_lua_cb("cd"), + [""] = get_lua_cb("vsplit"), + [""] = get_lua_cb("split"), + [""] = get_lua_cb("tabnew"), + [""] = get_lua_cb("close_node"), + [""] = get_lua_cb("close_node"), + [""] = get_lua_cb("preview"), + ["I"] = get_lua_cb("toggle_ignored"), + ["H"] = get_lua_cb("toggle_dotfiles"), + ["R"] = get_lua_cb("refresh"), + ["a"] = get_lua_cb("create"), + ["d"] = get_lua_cb("remove"), + ["r"] = get_lua_cb("rename"), + [""] = get_lua_cb("full_rename"), + ["x"] = get_lua_cb("cut"), + ["c"] = get_lua_cb("copy"), + ["p"] = get_lua_cb("paste"), + ["[c"] = get_lua_cb("prev_git_item"), + ["]c"] = get_lua_cb("next_git_item"), + ["-"] = get_lua_cb("dir_up"), + ["q"] = get_lua_cb("close"), +} diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua new file mode 100644 index 0000000..d42c3af --- /dev/null +++ b/lua/pluginsList/lua.lua @@ -0,0 +1,21 @@ +-- check if packer is installed (~/local/share/nvim/site/pack) +local packer_exists = pcall(vim.cmd, [[packadd packer.nvim]]) + +return require('packer').startup(function() + use { 'kyazdani42/nvim-web-devicons'} + use {'neovim/nvim-lspconfig'} + use {'nvim-lua/completion-nvim'} + use {'wbthomason/packer.nvim', opt = true} + use { 'nvim-lua/plenary.nvim'} + use { 'lewis6991/gitsigns.nvim'} + use { 'glepnir/galaxyline.nvim'} + use { 'tweekmonster/startuptime.vim'} + use { 'akinsho/nvim-bufferline.lua'} + use { '907th/vim-auto-save'} + use { 'kyazdani42/nvim-tree.lua'} + use { 'nvim-treesitter/nvim-treesitter'} + use { 'chriskempson/base16-vim'} + use { 'norcalli/nvim-colorizer.lua'} + use { 'Yggdroot/indentLine'} + use { 'ryanoasis/vim-devicons'} +end) diff --git a/lua/statusline/lua.lua b/lua/statusline/lua.lua new file mode 100644 index 0000000..ee5ef6d --- /dev/null +++ b/lua/statusline/lua.lua @@ -0,0 +1,170 @@ +local gl = require('galaxyline') +local gls = gl.section +gl.short_line_list = {'LuaTree','vista','dbui'} + +local colors = { + bg = '#282c34', + line_bg = '#282c34', + fg = '#D8DEE9', + fg_green = '#65a380', + yellow = '#A3BE8C', + cyan = '#22262C', + darkblue = '#61afef', + green = '#afd700', + orange = '#FF8800', + purple = '#252930', + magenta = '#c678dd', + blue = '#22262C'; + red = '#ec5f67', + firored = '#DF8890', + lightbg = '#3C4048', + nord = '#81A1C1', + nordYel = '#EBCB8B' +} + +gls.left[2] = { + ViMode = { + provider = function() + return ' 󰀘 ' + end, + highlight = {colors.bg,colors.nord}, + separator = ' ', + separator_highlight = {colors.lightbg,colors.lightbg}, + }, +} + +gls.left[3] ={ + FileIcon = { + provider = 'FileIcon', + condition = buffer_not_empty, + highlight = {require('galaxyline.provider_fileinfo').get_file_icon_color,colors.lightbg}, + }, +} + +gls.left[4] = { + FileName = { + provider = {'FileName','FileSize'}, + separator = ' ', + separator_highlight = {colors.line_bg,colors.lightbg}, + condition = buffer_not_empty, + highlight = {colors.fg,colors.lightbg} + } +} + +gls.left[5] = { + GitIcon = { + provider = function() return '  ' end, + condition = require('galaxyline.provider_vcs').check_git_workspace, + highlight = {colors.fg,colors.line_bg}, + } +} + +gls.left[6] = { + GitBranch = { + provider = 'GitBranch', + condition = require('galaxyline.provider_vcs').check_git_workspace, + highlight = {'#8FBCBB',colors.line_bg,'bold'}, + } +} + +local checkwidth = function() + local squeeze_width = vim.fn.winwidth(0) / 2 + if squeeze_width > 40 then + return true + end + return false +end + +gls.left[7] = { + DiffAdd = { + provider = 'DiffAdd', + condition = checkwidth, + icon = '  ', + highlight = {colors.nordYel,colors.line_bg}, + } +} + +gls.left[8] = { + DiffModified = { + provider = 'DiffModified', + condition = checkwidth, + icon = ' ', + highlight = {colors.orange,colors.line_bg}, + } +} + +gls.left[9] = { + DiffRemove = { + provider = 'DiffRemove', + condition = checkwidth, + icon = ' ', + highlight = {colors.red,colors.line_bg}, + } +} + +gls.left[10] = { + LeftEnd = { + provider = function() return ' ' end, + separator = ' ', + separator_highlight = {colors.line_bg,colors.line_bg}, + highlight = {colors.line_bg,colors.line_bg} + } +} + +gls.left[11] = { + DiagnosticError = { + provider = 'DiagnosticError', + icon = '  ', + highlight = {colors.red,colors.bg} + } +} + +gls.left[12] = { + Space = { + provider = function () return ' ' end, + highlight = {colors.line_bg,colors.line_bg} + } +} + +gls.left[13] = { + DiagnosticWarn = { + provider = 'DiagnosticWarn', + icon = '  ', + highlight = {colors.blue,colors.bg}, + } +} + +gls.right[1]= { + FileFormat = { + provider = 'FileFormat', + separator = ' ', + separator_highlight = {colors.firored,colors.firored}, + highlight = {colors.bg,colors.firored}, + } +} + +gls.right[3] = { + PerCent = { + provider = 'LinePercent', + separator = ' ', + separator_highlight = {colors.firored,colors.firored}, + highlight = {colors.bg,colors.fg}, + } +} +gls.short_line_left[1] = { + BufferType = { + provider = 'FileTypeName', + separator = ' ', + separator_highlight = {colors.purple,colors.bg}, + highlight = {colors.fg,colors.purple} + } +} + +gls.short_line_right[1] = { + BufferIcon = { + provider= 'BufferIcon', + separator = ' ', + separator_highlight = {colors.purple,colors.bg}, + highlight = {colors.fg,colors.purple} + } +} diff --git a/lua/treesitter/lua.lua b/lua/treesitter/lua.lua new file mode 100644 index 0000000..c88478d --- /dev/null +++ b/lua/treesitter/lua.lua @@ -0,0 +1,13 @@ +local ts_config = require("nvim-treesitter.configs") + +ts_config.setup { + ensure_installed = { + "javascript","html","css","bash","cpp","rust","lua" + }, + + highlight = { + enable = true, + use_languagetree = true, + }, +} + diff --git a/lua/utils/lua.lua b/lua/utils/lua.lua new file mode 100644 index 0000000..121b440 --- /dev/null +++ b/lua/utils/lua.lua @@ -0,0 +1,22 @@ +local scopes = { o = vim.o, b = vim.bo, w = vim.wo} + +local function opt(scope, key, value) + scopes[scope][key] = value + if scope ~= 'o' then scopes['o'][key] = value end +end + +opt('o', 'hidden', true) +opt('o', 'ignorecase', true) +opt('o', 'splitbelow', true) +opt('o', 'splitright', true) +opt('o', 'termguicolors', true) +opt('w', 'number', true) +opt('o', 'numberwidth' , 2) + +opt('o' ,'mouse' , "a") + +opt('w', 'signcolumn' , "yes") +opt('o' , 'cmdheight' , 1) +opt('o' , 'updatetime' , 250) +opt('o' , 'clipboard' , 'unnamedplus') + diff --git a/lua/web-devicons/lua.lua b/lua/web-devicons/lua.lua new file mode 100644 index 0000000..16728b1 --- /dev/null +++ b/lua/web-devicons/lua.lua @@ -0,0 +1,62 @@ +require'nvim-web-devicons'.setup { + + override = { + html = { + icon = "", + color = "#DE8C92", + name = "html" + }, + css = { + icon = "", + color = "#61afef", + name = "css" + }, + js = { + icon = "", + color = "#EBCB8B", + name = "js" + }, + png = { + icon = " ", + color = "#BD77DC", + name = "png" + }, + jpg = { + icon = " ", + color = "#BD77DC", + name = "jpg" + }, + jpeg = { + icon = " ", + color = "#BD77DC", + name = "jpeg" + }, + mp3 = { + icon = "", + color = "#C8CCD4", + name = "mp3" + }, + mp4 = { + icon = "", + color = "#C8CCD4", + name = "mp4" + }, + out = { + icon = "", + color = "#C8CCD4", + name = "out" + }, + toml = { + icon = "", + color = "#61afef", + name = "toml" + }, + + lock = { + icon = "", + color = "#DE6B74", + name = "lock" + } + }; + +} diff --git a/plugin/packer_compiled.vim b/plugin/packer_compiled.vim new file mode 100644 index 0000000..b919611 --- /dev/null +++ b/plugin/packer_compiled.vim @@ -0,0 +1,109 @@ +" Automatically generated packer.nvim plugin loader code + +if !has('nvim-0.5') + echohl WarningMsg + echom "Invalid Neovim version for packer.nvim!" + echohl None + finish +endif + +packadd packer.nvim + +try + +lua << END +local package_path_str = "/home/sid/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/sid/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/sid/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/sid/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/home/sid/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" +if not string.find(package.path, package_path_str, 1, true) then + package.path = package.path .. ';' .. package_path_str +end + +if not string.find(package.cpath, install_cpath_pattern, 1, true) then + package.cpath = package.cpath .. ';' .. install_cpath_pattern +end + +local function try_loadstring(s, component, name) + local success, result = pcall(loadstring(s)) + if not success then + print('Error running ' .. component .. ' for ' .. name) + error(result) + end + return result +end + +_G.packer_plugins = { + ["base16-vim"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/base16-vim" + }, + ["completion-nvim"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/completion-nvim" + }, + ["galaxyline.nvim"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/galaxyline.nvim" + }, + ["gitsigns.nvim"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/gitsigns.nvim" + }, + indentLine = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/indentLine" + }, + ["nvim-bufferline.lua"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-bufferline.lua" + }, + ["nvim-colorizer.lua"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua" + }, + ["nvim-lspconfig"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-lspconfig" + }, + ["nvim-tree.lua"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-tree.lua" + }, + ["nvim-treesitter"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-treesitter" + }, + ["nvim-web-devicons"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-web-devicons" + }, + ["packer.nvim"] = { + loaded = false, + needs_bufread = false, + path = "/home/sid/.local/share/nvim/site/pack/packer/opt/packer.nvim" + }, + ["plenary.nvim"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/plenary.nvim" + }, + ["startuptime.vim"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/startuptime.vim" + }, + ["vim-auto-save"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/vim-auto-save" + }, + ["vim-devicons"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/vim-devicons" + } +} + +END + +catch + echohl ErrorMsg + echom "Error in packer_compiled: " .. v:exception + echom "Please check your config for correctness" + echohl None +endtry From 9c46ffb5d3d22a779f96f2c84aff3976a9c29829 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 7 Mar 2021 20:06:33 +0530 Subject: [PATCH 0003/1541] Create README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..1b2780d --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# neovim-dots +my neovim dotfiles + +slowly migrating to init.lua , so still WIP! From e63b9dfa60135c00364bdfb0439050437b707978 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 7 Mar 2021 20:49:51 +0530 Subject: [PATCH 0004/1541] gitsigns --- init.lua | 1 + lua/gitsigns/lua.lua | 29 +++++++++++++++++++++++++++++ lua/lsp_config/lua.lua | 1 + lua/mappings/lua.lua | 1 + lua/web-devicons/gitsigns | 0 5 files changed, 32 insertions(+) create mode 100644 lua/gitsigns/lua.lua create mode 100644 lua/web-devicons/gitsigns diff --git a/init.lua b/init.lua index 6a53fe1..944ca21 100644 --- a/init.lua +++ b/init.lua @@ -3,6 +3,7 @@ require('pluginsList.lua') require('utils.lua') require('nvimTree.lua') +require('gitsigns.lua') require('lsp_config.lua') require'colorizer'.setup() diff --git a/lua/gitsigns/lua.lua b/lua/gitsigns/lua.lua new file mode 100644 index 0000000..3dbd424 --- /dev/null +++ b/lua/gitsigns/lua.lua @@ -0,0 +1,29 @@ +require('gitsigns').setup { + signs = { + add = {hl = 'DiffAdd' , text = '▌', numhl='GitSignsAddNr'}, + change = {hl = 'DiffChange', text = '▌', numhl='GitSignsChangeNr'}, + delete = {hl = 'DiffDelete', text = '_', numhl='GitSignsDeleteNr'}, + topdelete = {hl = 'DiffDelete', text = '‾', numhl='GitSignsDeleteNr'}, + changedelete = {hl = 'DiffChange', text = '~', numhl='GitSignsChangeNr'}, + }, + numhl = false, + keymaps = { + -- Default keymap options + noremap = true, + buffer = true, + + ['n ]c'] = { expr = true, "&diff ? ']c' : 'lua require\"gitsigns\".next_hunk()'"}, + ['n [c'] = { expr = true, "&diff ? '[c' : 'lua require\"gitsigns\".prev_hunk()'"}, + + ['n hs'] = 'lua require"gitsigns".stage_hunk()', + ['n hu'] = 'lua require"gitsigns".undo_stage_hunk()', + ['n hr'] = 'lua require"gitsigns".reset_hunk()', + ['n hp'] = 'lua require"gitsigns".preview_hunk()', + ['n hb'] = 'lua require"gitsigns".blame_line()', + }, + watch_index = { + interval = 100 + }, + sign_priority = 5, + status_formatter = nil, -- Use default +} diff --git a/lua/lsp_config/lua.lua b/lua/lsp_config/lua.lua index 23890bc..e2cc19a 100644 --- a/lua/lsp_config/lua.lua +++ b/lua/lsp_config/lua.lua @@ -54,6 +54,7 @@ end local servers = { "html" , "cssls" , "tsserver"} for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup { on_attach = on_attach } + require"completion".on_attach(client) end -- keybinds diff --git a/lua/mappings/lua.lua b/lua/mappings/lua.lua index 8d1d148..645fc28 100644 --- a/lua/mappings/lua.lua +++ b/lua/mappings/lua.lua @@ -7,3 +7,4 @@ end -- keybind list map('', 'c', '"+y') +--map('' , '' , '%y+') diff --git a/lua/web-devicons/gitsigns b/lua/web-devicons/gitsigns new file mode 100644 index 0000000..e69de29 From 41a84f97f70d4029cc9d653b6b74518716b871c3 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 7 Mar 2021 21:01:07 +0530 Subject: [PATCH 0005/1541] eek --- lua/nvimTree/lua.lua | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lua/nvimTree/lua.lua b/lua/nvimTree/lua.lua index 50a39c7..6e6310b 100644 --- a/lua/nvimTree/lua.lua +++ b/lua/nvimTree/lua.lua @@ -51,14 +51,6 @@ vim.api.nvim_set_keymap('n', '', ':NvimTreeToggle', { silent = true }) --- [[ -vim.api.nvim_set_keymap('n', '', ':NvimTreeRefresh', { - noremap = true, - silent = true - }) - - -- ]] - vim.g.nvim_tree_bindings = { [""] = get_lua_cb("edit"), ["o"] = get_lua_cb("edit"), From 82f4566872343de874a78e755374701ea8c0a010 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 7 Mar 2021 22:22:33 +0530 Subject: [PATCH 0006/1541] minor changes --- lua/lsp_config/lua.lua | 2 +- lua/pluginsList/lua.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lsp_config/lua.lua b/lua/lsp_config/lua.lua index e2cc19a..a2969e8 100644 --- a/lua/lsp_config/lua.lua +++ b/lua/lsp_config/lua.lua @@ -7,6 +7,7 @@ local nvim_lsp = require('lspconfig') local on_attach = function(client, bufnr) local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end + require"completion".on_attach(client) buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') @@ -54,7 +55,6 @@ end local servers = { "html" , "cssls" , "tsserver"} for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup { on_attach = on_attach } - require"completion".on_attach(client) end -- keybinds diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index d42c3af..5000e57 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -18,4 +18,5 @@ return require('packer').startup(function() use { 'norcalli/nvim-colorizer.lua'} use { 'Yggdroot/indentLine'} use { 'ryanoasis/vim-devicons'} + use { 'sbdchd/neoformat'} end) From 98201bcd162477e1f0b837f2b1ac0d16f43afa0d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 8 Mar 2021 08:45:52 +0530 Subject: [PATCH 0007/1541] nvim-web-devicons custom icons fix --- init.lua | 7 +++-- lua/lsp_config/lua.lua | 60 ---------------------------------------- lua/pluginsList/lua.lua | 4 ++- lua/web-devicons/lua.lua | 2 ++ 4 files changed, 9 insertions(+), 64 deletions(-) diff --git a/init.lua b/init.lua index 944ca21..acbc4b1 100644 --- a/init.lua +++ b/init.lua @@ -1,8 +1,12 @@ -- load plugins require('pluginsList.lua') +require('web-devicons.lua') require('utils.lua') require('nvimTree.lua') +require('bufferline.lua') +require('statusline.lua') + require('gitsigns.lua') require('lsp_config.lua') @@ -22,10 +26,7 @@ g.indentLine_enabled = 1 g.indentLine_char_list = {'▏'} require('treesitter.lua') -require('statusline.lua') -require('bufferline.lua') require('mappings.lua') -require('web-devicons.lua') -- highlights cmd("hi LineNr guibg=NONE") diff --git a/lua/lsp_config/lua.lua b/lua/lsp_config/lua.lua index a2969e8..ae47404 100644 --- a/lua/lsp_config/lua.lua +++ b/lua/lsp_config/lua.lua @@ -1,62 +1,2 @@ vim.cmd [[ packadd nvim-lspconfig ]] vim.cmd [[ packadd completion-nvim ]] - -require'lspconfig'.html.setup{} - -local nvim_lsp = require('lspconfig') -local on_attach = function(client, bufnr) - local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end - local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end - require"completion".on_attach(client) - - buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') - - -- Mappings. - local opts = { noremap=true, silent=true } - buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) - buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opts) - buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) - buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) - buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) - buf_set_keymap('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) - buf_set_keymap('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) - buf_set_keymap('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) - buf_set_keymap('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) - buf_set_keymap('n', 'rn', 'lua vim.lsp.buf.rename()', opts) - buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', opts) - buf_set_keymap('n', 'e', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) - buf_set_keymap('n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) - buf_set_keymap('n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) - buf_set_keymap('n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) - - -- Set some keybinds conditional on server capabilities - if client.resolved_capabilities.document_formatting then - buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) - elseif client.resolved_capabilities.document_range_formatting then - buf_set_keymap("n", "f", "lua vim.lsp.buf.range_formatting()", opts) - end - - -- Set autocommands conditional on server_capabilities - if client.resolved_capabilities.document_highlight then - vim.api.nvim_exec([[ - hi LspReferenceRead cterm=bold ctermbg=red guibg=LightYellow - hi LspReferenceText cterm=bold ctermbg=red guibg=LightYellow - hi LspReferenceWrite cterm=bold ctermbg=red guibg=LightYellow - augroup lsp_document_highlight - autocmd! * - autocmd CursorHold lua vim.lsp.buf.document_highlight() - autocmd CursorMoved lua vim.lsp.buf.clear_references() - augroup END - ]], false) - end -end - --- Use a loop to conveniently both setup defined servers -local servers = { "html" , "cssls" , "tsserver"} -for _, lsp in ipairs(servers) do - nvim_lsp[lsp].setup { on_attach = on_attach } -end - --- keybinds -vim.api.nvim_set_keymap('i', '', 'pumvisible() ? "\\" : "\\"', { noremap = true, expr = true }) -vim.api.nvim_set_keymap('i', '', 'pumvisible() ? "\\" : "\\"', { noremap = true, expr = true }) diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 5000e57..2d243b3 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -3,8 +3,11 @@ local packer_exists = pcall(vim.cmd, [[packadd packer.nvim]]) return require('packer').startup(function() use { 'kyazdani42/nvim-web-devicons'} + use { 'kyazdani42/nvim-tree.lua'} use {'neovim/nvim-lspconfig'} use {'nvim-lua/completion-nvim'} + use {'SirVer/ultisnips'} + use {'hrsh7th/nvim-compe'} use {'wbthomason/packer.nvim', opt = true} use { 'nvim-lua/plenary.nvim'} use { 'lewis6991/gitsigns.nvim'} @@ -12,7 +15,6 @@ return require('packer').startup(function() use { 'tweekmonster/startuptime.vim'} use { 'akinsho/nvim-bufferline.lua'} use { '907th/vim-auto-save'} - use { 'kyazdani42/nvim-tree.lua'} use { 'nvim-treesitter/nvim-treesitter'} use { 'chriskempson/base16-vim'} use { 'norcalli/nvim-colorizer.lua'} diff --git a/lua/web-devicons/lua.lua b/lua/web-devicons/lua.lua index 16728b1..41b20ea 100644 --- a/lua/web-devicons/lua.lua +++ b/lua/web-devicons/lua.lua @@ -1,3 +1,5 @@ +vim.cmd [[packadd nvim-web-devicons]] + require'nvim-web-devicons'.setup { override = { From ab3a3654501fe1d24ac28805f75a29608c78c43d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 8 Mar 2021 09:16:14 +0530 Subject: [PATCH 0008/1541] lspconfig --- lua/lsp_config/lua.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lua/lsp_config/lua.lua b/lua/lsp_config/lua.lua index ae47404..47350ba 100644 --- a/lua/lsp_config/lua.lua +++ b/lua/lsp_config/lua.lua @@ -1,2 +1,23 @@ vim.cmd [[ packadd nvim-lspconfig ]] vim.cmd [[ packadd completion-nvim ]] + +-- Enable(broadcasting) snippet capability for completion +local html_snippet_capabilities = vim.lsp.protocol.make_client_capabilities() +html_snippet_capabilities.textDocument.completion.completionItem.snippetSupport = true + +require'lspconfig'.html.setup { + on_attach = lsp_on_attach, + capabilities = html_snippet_capabilities, + cmd = { "html-languageserver", "--stdio" }; + filetypes = { "html" }; + init_opitons = { + configurationSection = { "html", "css", "javascript" }; + embeddedLanguages = { + css = true, + javascript = true, + }; + }; +} + +vim.g.completion_enable_snippet = 'UltiSnips' + From a9e02c662ce087062a653c00c8dec90a9ab4125a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 8 Mar 2021 10:54:53 +0530 Subject: [PATCH 0009/1541] statusline wip --- init.lua | 1 - lua/pluginsList/lua.lua | 8 +++---- lua/statusline/lua.lua | 49 +++++++++++++++++++++++------------------ lua/utils/lua.lua | 14 ++++++++++++ 4 files changed, 44 insertions(+), 28 deletions(-) diff --git a/init.lua b/init.lua index acbc4b1..09ba2e8 100644 --- a/init.lua +++ b/init.lua @@ -8,7 +8,6 @@ require('bufferline.lua') require('statusline.lua') require('gitsigns.lua') -require('lsp_config.lua') require'colorizer'.setup() diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 2d243b3..a246e5f 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -2,13 +2,11 @@ local packer_exists = pcall(vim.cmd, [[packadd packer.nvim]]) return require('packer').startup(function() + use {'wbthomason/packer.nvim', opt = true} use { 'kyazdani42/nvim-web-devicons'} use { 'kyazdani42/nvim-tree.lua'} - use {'neovim/nvim-lspconfig'} - use {'nvim-lua/completion-nvim'} - use {'SirVer/ultisnips'} - use {'hrsh7th/nvim-compe'} - use {'wbthomason/packer.nvim', opt = true} + use { 'hoob3rt/lualine.nvim'} + use { 'neoclide/coc.nvim' , branch = 'release'} use { 'nvim-lua/plenary.nvim'} use { 'lewis6991/gitsigns.nvim'} use { 'glepnir/galaxyline.nvim'} diff --git a/lua/statusline/lua.lua b/lua/statusline/lua.lua index ee5ef6d..86159e4 100644 --- a/lua/statusline/lua.lua +++ b/lua/statusline/lua.lua @@ -22,10 +22,17 @@ local colors = { nordYel = '#EBCB8B' } +gls.left[1] = { + FirstElement = { + provider = function() return '' end, + highlight = { colors.nord, colors.bg } + }, +} + gls.left[2] = { ViMode = { provider = function() - return ' 󰀘 ' + return ' 󰀘 ' end, highlight = {colors.bg,colors.nord}, separator = ' ', @@ -52,6 +59,14 @@ gls.left[4] = { } gls.left[5] = { + rightRounded = { + provider = function() return '' end, + highlight = { colors.lightbg, colors.bg } + }, +} + + +gls.left[6] = { GitIcon = { provider = function() return '  ' end, condition = require('galaxyline.provider_vcs').check_git_workspace, @@ -59,7 +74,7 @@ gls.left[5] = { } } -gls.left[6] = { +gls.left[7] = { GitBranch = { provider = 'GitBranch', condition = require('galaxyline.provider_vcs').check_git_workspace, @@ -134,11 +149,18 @@ gls.left[13] = { } } -gls.right[1]= { + + +gls.right[1] = { + uwu = { + provider = function() return '' end, + highlight = { colors.firored, colors.bg } + }, +} + +gls.right[2]= { FileFormat = { provider = 'FileFormat', - separator = ' ', - separator_highlight = {colors.firored,colors.firored}, highlight = {colors.bg,colors.firored}, } } @@ -151,20 +173,3 @@ gls.right[3] = { highlight = {colors.bg,colors.fg}, } } -gls.short_line_left[1] = { - BufferType = { - provider = 'FileTypeName', - separator = ' ', - separator_highlight = {colors.purple,colors.bg}, - highlight = {colors.fg,colors.purple} - } -} - -gls.short_line_right[1] = { - BufferIcon = { - provider= 'BufferIcon', - separator = ' ', - separator_highlight = {colors.purple,colors.bg}, - highlight = {colors.fg,colors.purple} - } -} diff --git a/lua/utils/lua.lua b/lua/utils/lua.lua index 121b440..d36b260 100644 --- a/lua/utils/lua.lua +++ b/lua/utils/lua.lua @@ -20,3 +20,17 @@ opt('o' , 'cmdheight' , 1) opt('o' , 'updatetime' , 250) opt('o' , 'clipboard' , 'unnamedplus') + +local M = {} + +function M.is_buffer_empty() + -- Check whether the current buffer is empty + return vim.fn.empty(vim.fn.expand('%:t')) == 1 +end + +function M.has_width_gt(cols) + -- Check if the windows width is greater than a given number of columns + return vim.fn.winwidth(0) / 2 > cols +end + +return M From 806d038ffb40c57c3fda2c86ff7a15c64311c740 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 8 Mar 2021 11:49:27 +0530 Subject: [PATCH 0010/1541] statusline --- lua/statusline/lua.lua | 50 +++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/lua/statusline/lua.lua b/lua/statusline/lua.lua index 86159e4..5eeec89 100644 --- a/lua/statusline/lua.lua +++ b/lua/statusline/lua.lua @@ -10,22 +10,21 @@ local colors = { yellow = '#A3BE8C', cyan = '#22262C', darkblue = '#61afef', - green = '#afd700', + green = '#BBE67E', orange = '#FF8800', purple = '#252930', magenta = '#c678dd', blue = '#22262C'; - red = '#ec5f67', - firored = '#DF8890', + red = '#DF8890', lightbg = '#3C4048', nord = '#81A1C1', - nordYel = '#EBCB8B' + greenYel = '#EBCB8B' } gls.left[1] = { - FirstElement = { + leftRounded = { provider = function() return '' end, - highlight = { colors.nord, colors.bg } + highlight = { colors.green, colors.bg } }, } @@ -34,7 +33,7 @@ gls.left[2] = { provider = function() return ' 󰀘 ' end, - highlight = {colors.bg,colors.nord}, + highlight = {colors.bg,colors.green}, separator = ' ', separator_highlight = {colors.lightbg,colors.lightbg}, }, @@ -51,26 +50,24 @@ gls.left[3] ={ gls.left[4] = { FileName = { provider = {'FileName','FileSize'}, - separator = ' ', - separator_highlight = {colors.line_bg,colors.lightbg}, condition = buffer_not_empty, highlight = {colors.fg,colors.lightbg} } } gls.left[5] = { - rightRounded = { + teech = { provider = function() return '' end, + separator = ' ', highlight = { colors.lightbg, colors.bg } }, } - gls.left[6] = { GitIcon = { provider = function() return '  ' end, condition = require('galaxyline.provider_vcs').check_git_workspace, - highlight = {colors.fg,colors.line_bg}, + highlight = {colors.red,colors.line_bg}, } } @@ -78,7 +75,7 @@ gls.left[7] = { GitBranch = { provider = 'GitBranch', condition = require('galaxyline.provider_vcs').check_git_workspace, - highlight = {'#8FBCBB',colors.line_bg,'bold'}, + highlight = {colors.red,colors.line_bg,'bold'}, } } @@ -90,16 +87,16 @@ local checkwidth = function() return false end -gls.left[7] = { +gls.left[8] = { DiffAdd = { provider = 'DiffAdd', condition = checkwidth, icon = '  ', - highlight = {colors.nordYel,colors.line_bg}, + highlight = {colors.greenYel,colors.line_bg}, } } -gls.left[8] = { +gls.left[9] = { DiffModified = { provider = 'DiffModified', condition = checkwidth, @@ -108,7 +105,7 @@ gls.left[8] = { } } -gls.left[9] = { +gls.left[10] = { DiffRemove = { provider = 'DiffRemove', condition = checkwidth, @@ -149,27 +146,34 @@ gls.left[13] = { } } - - gls.right[1] = { - uwu = { + right_LeftRounded = { provider = function() return '' end, - highlight = { colors.firored, colors.bg } + highlight = { colors.nord, colors.bg } }, } + gls.right[2]= { FileFormat = { provider = 'FileFormat', - highlight = {colors.bg,colors.firored}, + highlight = {colors.bg,colors.nord}, } } + gls.right[3] = { PerCent = { provider = 'LinePercent', separator = ' ', - separator_highlight = {colors.firored,colors.firored}, + separator_highlight = {colors.nord,colors.nord}, highlight = {colors.bg,colors.fg}, } } + +gls.right[4] = { + rightRounded = { + provider = function() return '' end, + highlight = { colors.fg, colors.bg } + }, +} From d70f67f96fbce2dc3a412a17f7a2602264fd2e1b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 8 Mar 2021 13:04:48 +0530 Subject: [PATCH 0011/1541] better coc config --- lua/coc/lua.lua | 145 +++++++++++++++++++++++++++++++++++++++++ lua/statusline/lua.lua | 86 +++++++++++++----------- 2 files changed, 194 insertions(+), 37 deletions(-) create mode 100644 lua/coc/lua.lua diff --git a/lua/coc/lua.lua b/lua/coc/lua.lua new file mode 100644 index 0000000..d4c5c4f --- /dev/null +++ b/lua/coc/lua.lua @@ -0,0 +1,145 @@ +vim.api.nvim_exec([[ +" Use tab for trigger completion with characters ahead and navigate. +" Use command ':verbose imap ' to make sure tab is not mapped by other plugin. +inoremap + \ pumvisible() ? "\" : + \ check_back_space() ? "\" : + \ coc#refresh() +inoremap pumvisible() ? "\" : "\" + +function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction + +" Use to trigger completion. +inoremap coc#refresh() + +" Use to confirm completion, `u` means break undo chain at current position. +" Coc only does snippet and additional edit on confirm. +inoremap pumvisible() ? "\" : "\u\" + +" Use `[c` and `]c` to navigate diagnostics +nmap [c (coc-diagnostic-prev) +nmap ]c (coc-diagnostic-next) + +" Remap keys for gotos +nmap gd (coc-definition) +nmap gy (coc-type-definition) +nmap gi (coc-implementation) +nmap gr (coc-references) + +" Use K to show documentation in preview window +nnoremap K :call show_documentation() + +function! s:show_documentation() + if (index(['vim','help'], &filetype) >= 0) + execute 'h '.expand('') + else + call CocAction('doHover') + endif +endfunction + +" Highlight symbol under cursor on CursorHold +autocmd CursorHold * silent call CocActionAsync('highlight') + +" Remap for rename current word +nmap rn (coc-rename) + +" Remap for format selected region +xmap f (coc-format-selected) +nmap f (coc-format-selected) + +augroup mygroup + autocmd! + " Setup formatexpr specified filetype(s). + autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') + " Update signature help on jump placeholder + autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') +augroup end + +" Remap for do codeAction of selected region, ex: `aap` for current paragraph +xmap a (coc-codeaction-selected) +nmap a (coc-codeaction-selected) + +" Remap for do codeAction of current line +nmap ac (coc-codeaction) +" Fix autofix problem of current line +nmap qf (coc-fix-current) + +" Use for select selections ranges, needs server support, like: coc-tsserver, coc-python +nmap (coc-range-select) +xmap (coc-range-select) +xmap (coc-range-select-backword) + +" Use `:Format` to format current buffer +command! -nargs=0 Format :call CocAction('format') + +" Use `:Fold` to fold current buffer +command! -nargs=? Fold :call CocAction('fold', ) + +" use `:OR` for organize import of current buffer +command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport') + +" Add status line support, for integration with other plugin, checkout `:h coc-status` +set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} + +" Using CocList +" Show all diagnostics +nnoremap a :CocList diagnostics +" Manage extensions +nnoremap e :CocList extensions +" Show commands +nnoremap c :CocList commands +" Find symbol of current document +nnoremap o :CocList outline +" Search workspace symbols +nnoremap s :CocList -I symbols +" Do default action for next item. +nnoremap j :CocNext +" Do default action for previous item. +nnoremap k :CocPrev +" Resume latest coc list +nnoremap p :CocListResume + +function! GetHighlightGroup() + let l:s = synID(line('.'), col('.'), 1) + echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name') + endfunction + +nnoremap gA :call GetHighlightGroup() + +set fillchars=eob:\ + +tnoremap +" start terminal in insert mode +au BufEnter * if &buftype == 'terminal' | :startinsert | endif + +" open terminal on the bottom +function! OpenTerminal() + split term://bash + resize 10 +endfunction +nnoremap :call OpenTerminal() +nnoremap :vnew term://bash + +set ignorecase +set noswapfile +set title +set shortmess+=c +set updatetime=250 "for gitsigns" + +" new tab and switching between em + +nnoremap : tabnew +nnoremap : tabp +nnoremap : tabn + +map k +map j +map l +map h + +inoremap kk + +]]) diff --git a/lua/statusline/lua.lua b/lua/statusline/lua.lua index 5eeec89..0486c05 100644 --- a/lua/statusline/lua.lua +++ b/lua/statusline/lua.lua @@ -24,7 +24,7 @@ local colors = { gls.left[1] = { leftRounded = { provider = function() return '' end, - highlight = { colors.green, colors.bg } + highlight = { colors.nord, colors.bg } }, } @@ -33,7 +33,7 @@ gls.left[2] = { provider = function() return ' 󰀘 ' end, - highlight = {colors.bg,colors.green}, + highlight = {colors.bg,colors.nord}, separator = ' ', separator_highlight = {colors.lightbg,colors.lightbg}, }, @@ -63,22 +63,6 @@ gls.left[5] = { }, } -gls.left[6] = { - GitIcon = { - provider = function() return '  ' end, - condition = require('galaxyline.provider_vcs').check_git_workspace, - highlight = {colors.red,colors.line_bg}, - } -} - -gls.left[7] = { - GitBranch = { - provider = 'GitBranch', - condition = require('galaxyline.provider_vcs').check_git_workspace, - highlight = {colors.red,colors.line_bg,'bold'}, - } -} - local checkwidth = function() local squeeze_width = vim.fn.winwidth(0) / 2 if squeeze_width > 40 then @@ -87,7 +71,7 @@ local checkwidth = function() return false end -gls.left[8] = { +gls.left[6] = { DiffAdd = { provider = 'DiffAdd', condition = checkwidth, @@ -96,7 +80,7 @@ gls.left[8] = { } } -gls.left[9] = { +gls.left[7] = { DiffModified = { provider = 'DiffModified', condition = checkwidth, @@ -105,7 +89,7 @@ gls.left[9] = { } } -gls.left[10] = { +gls.left[8] = { DiffRemove = { provider = 'DiffRemove', condition = checkwidth, @@ -114,7 +98,7 @@ gls.left[10] = { } } -gls.left[10] = { +gls.left[9] = { LeftEnd = { provider = function() return ' ' end, separator = ' ', @@ -123,7 +107,7 @@ gls.left[10] = { } } -gls.left[11] = { +gls.left[10] = { DiagnosticError = { provider = 'DiagnosticError', icon = '  ', @@ -131,14 +115,14 @@ gls.left[11] = { } } -gls.left[12] = { +gls.left[11] = { Space = { provider = function () return ' ' end, highlight = {colors.line_bg,colors.line_bg} } } -gls.left[13] = { +gls.left[12] = { DiagnosticWarn = { provider = 'DiagnosticWarn', icon = '  ', @@ -147,31 +131,59 @@ gls.left[13] = { } gls.right[1] = { + GitIcon = { + provider = function() return '  ' end, + condition = require('galaxyline.provider_vcs').check_git_workspace, + highlight = {colors.green,colors.line_bg}, + } +} + +gls.right[2] = { + GitBranch = { + provider = 'GitBranch', + condition = require('galaxyline.provider_vcs').check_git_workspace, + highlight = {colors.green,colors.line_bg}, + } +} + +gls.right[3] = { right_LeftRounded = { provider = function() return '' end, - highlight = { colors.nord, colors.bg } + separator = ' ', + separator_highlight = {colors.bg,colors.bg}, + highlight = { colors.red, colors.bg } + }, +} + +gls.right[4] = { + SiMode = { + provider = function() + local alias = { + n = 'NORMAL', + i = 'INSERT', + c = 'COMMAND', + V = 'VISUAL', + [''] = 'VISUAL', + v = 'VISUAL', + R = 'REPLACE', + } + return alias[vim.fn.mode()] + end, + highlight = { colors.bg, colors.red }, }, } -gls.right[2]= { - FileFormat = { - provider = 'FileFormat', - highlight = {colors.bg,colors.nord}, - } -} - - -gls.right[3] = { +gls.right[5] = { PerCent = { provider = 'LinePercent', separator = ' ', - separator_highlight = {colors.nord,colors.nord}, + separator_highlight = {colors.red,colors.red}, highlight = {colors.bg,colors.fg}, } } -gls.right[4] = { +gls.right[6] = { rightRounded = { provider = function() return '' end, highlight = { colors.fg, colors.bg } From 72fa346157cef3835b42c9a961fb6ad714c955a8 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 8 Mar 2021 13:13:45 +0530 Subject: [PATCH 0012/1541] rm useless config --- lua/coc/lua.lua | 152 ++++++++++++++---------------------------------- 1 file changed, 43 insertions(+), 109 deletions(-) diff --git a/lua/coc/lua.lua b/lua/coc/lua.lua index d4c5c4f..50dfab3 100644 --- a/lua/coc/lua.lua +++ b/lua/coc/lua.lua @@ -1,113 +1,4 @@ vim.api.nvim_exec([[ -" Use tab for trigger completion with characters ahead and navigate. -" Use command ':verbose imap ' to make sure tab is not mapped by other plugin. -inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ coc#refresh() -inoremap pumvisible() ? "\" : "\" - -function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -" Use to trigger completion. -inoremap coc#refresh() - -" Use to confirm completion, `u` means break undo chain at current position. -" Coc only does snippet and additional edit on confirm. -inoremap pumvisible() ? "\" : "\u\" - -" Use `[c` and `]c` to navigate diagnostics -nmap [c (coc-diagnostic-prev) -nmap ]c (coc-diagnostic-next) - -" Remap keys for gotos -nmap gd (coc-definition) -nmap gy (coc-type-definition) -nmap gi (coc-implementation) -nmap gr (coc-references) - -" Use K to show documentation in preview window -nnoremap K :call show_documentation() - -function! s:show_documentation() - if (index(['vim','help'], &filetype) >= 0) - execute 'h '.expand('') - else - call CocAction('doHover') - endif -endfunction - -" Highlight symbol under cursor on CursorHold -autocmd CursorHold * silent call CocActionAsync('highlight') - -" Remap for rename current word -nmap rn (coc-rename) - -" Remap for format selected region -xmap f (coc-format-selected) -nmap f (coc-format-selected) - -augroup mygroup - autocmd! - " Setup formatexpr specified filetype(s). - autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') - " Update signature help on jump placeholder - autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') -augroup end - -" Remap for do codeAction of selected region, ex: `aap` for current paragraph -xmap a (coc-codeaction-selected) -nmap a (coc-codeaction-selected) - -" Remap for do codeAction of current line -nmap ac (coc-codeaction) -" Fix autofix problem of current line -nmap qf (coc-fix-current) - -" Use for select selections ranges, needs server support, like: coc-tsserver, coc-python -nmap (coc-range-select) -xmap (coc-range-select) -xmap (coc-range-select-backword) - -" Use `:Format` to format current buffer -command! -nargs=0 Format :call CocAction('format') - -" Use `:Fold` to fold current buffer -command! -nargs=? Fold :call CocAction('fold', ) - -" use `:OR` for organize import of current buffer -command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport') - -" Add status line support, for integration with other plugin, checkout `:h coc-status` -set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} - -" Using CocList -" Show all diagnostics -nnoremap a :CocList diagnostics -" Manage extensions -nnoremap e :CocList extensions -" Show commands -nnoremap c :CocList commands -" Find symbol of current document -nnoremap o :CocList outline -" Search workspace symbols -nnoremap s :CocList -I symbols -" Do default action for next item. -nnoremap j :CocNext -" Do default action for previous item. -nnoremap k :CocPrev -" Resume latest coc list -nnoremap p :CocListResume - -function! GetHighlightGroup() - let l:s = synID(line('.'), col('.'), 1) - echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name') - endfunction - -nnoremap gA :call GetHighlightGroup() set fillchars=eob:\ @@ -142,4 +33,47 @@ map h inoremap kk +let g:indentLine_enabled = 3 +let g:indentLine_char_list = ['▏'] + +norm! gg=G + +set expandtab sw=2 + ]]) + +local remap = vim.api.nvim_set_keymap + +vim.g.coc_global_extensions = { + 'coc-eslint', + 'coc-tslint-plugin', + 'coc-json', + 'coc-css', + 'coc-html', + 'coc-stylelint', + 'coc-tsserver', +} + +vim.g.coc_snippet_next = '' +vim.g.coc_snippet_prev = '' + +vim.g.coc_root_patterns = { '.git', '.env', 'package.json' } + +check_backspace = function() + local col = vim.fn.col('.') - 1 + if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then + return true + else + return false + end +end + +remap('i', '', 'pumvisible() ? "" : v:lua.check_backspace() ? "" : coc#refresh()', { noremap = true, silent = true, expr = true }) +remap('i', '', 'pumvisible() ? "" : ""', { noremap = true, expr = true }) +remap('i', '', 'pumvisible() ? coc#_select_confirm() : "u=coc#on_enter()"', { noremap = true, silent = true, expr = true }) +remap('i', '', 'coc#refresh()', { noremap = true, silent = true, expr = true }) +remap('n', 'K', 'call CocActionAsync("doHover")', { noremap = true, silent = true }) + +remap('n', 'gd', '(coc-definition)', {noremap = true, silent = true}) +remap('n', 'gr', '(coc-references)', {noremap = true, silent = true}) +remap('n', 'gR', '(coc-rename)', {noremap = true, silent = true}) From 362352b6f4aeadbe7d7db480069ff03f83d47b1d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 8 Mar 2021 13:44:21 +0530 Subject: [PATCH 0013/1541] screenshots --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 1b2780d..00db034 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,9 @@ my neovim dotfiles slowly migrating to init.lua , so still WIP! + +# screenshots + + + + From 70d9e123806224df170cc46e8d2a745406e84016 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 9 Mar 2021 12:59:50 +0530 Subject: [PATCH 0014/1541] neovim vimscript confs --- neovim_vimscriptonly/nvim/autoload/plug.vim | 2788 +++++++++++++++++ .../nvim/autoload/plug.vim.old | 2786 ++++++++++++++++ .../nvim/autoload/vim-plug/plugins.vim | 18 + neovim_vimscriptonly/nvim/coc-settings.json | 25 + neovim_vimscriptonly/nvim/confs/coc.vim | 113 + neovim_vimscriptonly/nvim/confs/cpp.vim | 19 + neovim_vimscriptonly/nvim/confs/gitSigns.vim | 32 + neovim_vimscriptonly/nvim/confs/keybinds.vim | 19 + .../nvim/confs/miscSettings.vim | 52 + neovim_vimscriptonly/nvim/confs/nvimTree.vim | 148 + .../nvim/confs/pluginList.vim | 22 + neovim_vimscriptonly/nvim/confs/rust.vim | 16 + .../nvim/confs/statusline.vim | 193 ++ neovim_vimscriptonly/nvim/confs/tabline.vim | 103 + .../nvim/confs/treesitter.vim | 14 + neovim_vimscriptonly/nvim/confs/ui.vim | 30 + neovim_vimscriptonly/nvim/init.vim | 18 + 17 files changed, 6396 insertions(+) create mode 100644 neovim_vimscriptonly/nvim/autoload/plug.vim create mode 100644 neovim_vimscriptonly/nvim/autoload/plug.vim.old create mode 100644 neovim_vimscriptonly/nvim/autoload/vim-plug/plugins.vim create mode 100644 neovim_vimscriptonly/nvim/coc-settings.json create mode 100644 neovim_vimscriptonly/nvim/confs/coc.vim create mode 100644 neovim_vimscriptonly/nvim/confs/cpp.vim create mode 100644 neovim_vimscriptonly/nvim/confs/gitSigns.vim create mode 100644 neovim_vimscriptonly/nvim/confs/keybinds.vim create mode 100644 neovim_vimscriptonly/nvim/confs/miscSettings.vim create mode 100644 neovim_vimscriptonly/nvim/confs/nvimTree.vim create mode 100644 neovim_vimscriptonly/nvim/confs/pluginList.vim create mode 100644 neovim_vimscriptonly/nvim/confs/rust.vim create mode 100644 neovim_vimscriptonly/nvim/confs/statusline.vim create mode 100644 neovim_vimscriptonly/nvim/confs/tabline.vim create mode 100644 neovim_vimscriptonly/nvim/confs/treesitter.vim create mode 100644 neovim_vimscriptonly/nvim/confs/ui.vim create mode 100644 neovim_vimscriptonly/nvim/init.vim diff --git a/neovim_vimscriptonly/nvim/autoload/plug.vim b/neovim_vimscriptonly/nvim/autoload/plug.vim new file mode 100644 index 0000000..9c296ac --- /dev/null +++ b/neovim_vimscriptonly/nvim/autoload/plug.vim @@ -0,0 +1,2788 @@ +" vim-plug: Vim plugin manager +" ============================ +" +" Download plug.vim and put it in ~/.vim/autoload +" +" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ +" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim +" +" Edit your .vimrc +" +" call plug#begin('~/.vim/plugged') +" +" " Make sure you use single quotes +" +" " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align +" Plug 'junegunn/vim-easy-align' +" +" " Any valid git URL is allowed +" Plug 'https://github.com/junegunn/vim-github-dashboard.git' +" +" " Multiple Plug commands can be written in a single line using | separators +" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' +" +" " On-demand loading +" Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } +" Plug 'tpope/vim-fireplace', { 'for': 'clojure' } +" +" " Using a non-default branch +" Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } +" +" " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) +" Plug 'fatih/vim-go', { 'tag': '*' } +" +" " Plugin options +" Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' } +" +" " Plugin outside ~/.vim/plugged with post-update hook +" Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +" +" " Unmanaged plugin (manually installed and updated) +" Plug '~/my-prototype-plugin' +" +" " Initialize plugin system +" call plug#end() +" +" Then reload .vimrc and :PlugInstall to install plugins. +" +" Plug options: +" +"| Option | Description | +"| ----------------------- | ------------------------------------------------ | +"| `branch`/`tag`/`commit` | Branch/tag/commit of the repository to use | +"| `rtp` | Subdirectory that contains Vim plugin | +"| `dir` | Custom directory for the plugin | +"| `as` | Use different name for the plugin | +"| `do` | Post-update hook (string or funcref) | +"| `on` | On-demand loading: Commands or ``-mappings | +"| `for` | On-demand loading: File types | +"| `frozen` | Do not update unless explicitly specified | +" +" More information: https://github.com/junegunn/vim-plug +" +" +" Copyright (c) 2017 Junegunn Choi +" +" MIT License +" +" Permission is hereby granted, free of charge, to any person obtaining +" a copy of this software and associated documentation files (the +" "Software"), to deal in the Software without restriction, including +" without limitation the rights to use, copy, modify, merge, publish, +" distribute, sublicense, and/or sell copies of the Software, and to +" permit persons to whom the Software is furnished to do so, subject to +" the following conditions: +" +" The above copyright notice and this permission notice shall be +" included in all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +if exists('g:loaded_plug') + finish +endif +let g:loaded_plug = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let s:plug_src = 'https://github.com/junegunn/vim-plug.git' +let s:plug_tab = get(s:, 'plug_tab', -1) +let s:plug_buf = get(s:, 'plug_buf', -1) +let s:mac_gui = has('gui_macvim') && has('gui_running') +let s:is_win = has('win32') +let s:nvim = has('nvim-0.2') || (has('nvim') && exists('*jobwait') && !s:is_win) +let s:vim8 = has('patch-8.0.0039') && exists('*job_start') +if s:is_win && &shellslash + set noshellslash + let s:me = resolve(expand(':p')) + set shellslash +else + let s:me = resolve(expand(':p')) +endif +let s:base_spec = { 'branch': '', 'frozen': 0 } +let s:TYPE = { +\ 'string': type(''), +\ 'list': type([]), +\ 'dict': type({}), +\ 'funcref': type(function('call')) +\ } +let s:loaded = get(s:, 'loaded', {}) +let s:triggers = get(s:, 'triggers', {}) + +function! s:isabsolute(dir) abort + return a:dir =~# '^/' || (has('win32') && a:dir =~? '^\%(\\\|[A-Z]:\)') +endfunction + +function! s:git_dir(dir) abort + let gitdir = s:trim(a:dir) . '/.git' + if isdirectory(gitdir) + return gitdir + endif + if !filereadable(gitdir) + return '' + endif + let gitdir = matchstr(get(readfile(gitdir), 0, ''), '^gitdir: \zs.*') + if len(gitdir) && !s:isabsolute(gitdir) + let gitdir = a:dir . '/' . gitdir + endif + return isdirectory(gitdir) ? gitdir : '' +endfunction + +function! s:git_origin_url(dir) abort + let gitdir = s:git_dir(a:dir) + let config = gitdir . '/config' + if empty(gitdir) || !filereadable(config) + return '' + endif + return matchstr(join(readfile(config)), '\[remote "origin"\].\{-}url\s*=\s*\zs\S*\ze') +endfunction + +function! s:git_revision(dir) abort + let gitdir = s:git_dir(a:dir) + let head = gitdir . '/HEAD' + if empty(gitdir) || !filereadable(head) + return '' + endif + + let line = get(readfile(head), 0, '') + let ref = matchstr(line, '^ref: \zs.*') + if empty(ref) + return line + endif + + if filereadable(gitdir . '/' . ref) + return get(readfile(gitdir . '/' . ref), 0, '') + endif + + if filereadable(gitdir . '/packed-refs') + for line in readfile(gitdir . '/packed-refs') + if line =~# ' ' . ref + return matchstr(line, '^[0-9a-f]*') + endif + endfor + endif + + return '' +endfunction + +function! s:git_local_branch(dir) abort + let gitdir = s:git_dir(a:dir) + let head = gitdir . '/HEAD' + if empty(gitdir) || !filereadable(head) + return '' + endif + let branch = matchstr(get(readfile(head), 0, ''), '^ref: refs/heads/\zs.*') + return len(branch) ? branch : 'HEAD' +endfunction + +function! s:git_origin_branch(spec) + if len(a:spec.branch) + return a:spec.branch + endif + + " The file may not be present if this is a local repository + let gitdir = s:git_dir(a:spec.dir) + let origin_head = gitdir.'/refs/remotes/origin/HEAD' + if len(gitdir) && filereadable(origin_head) + return matchstr(get(readfile(origin_head), 0, ''), + \ '^ref: refs/remotes/origin/\zs.*') + endif + + " The command may not return the name of a branch in detached HEAD state + let result = s:lines(s:system('git symbolic-ref --short HEAD', a:spec.dir)) + return v:shell_error ? '' : result[-1] +endfunction + +if s:is_win + function! s:plug_call(fn, ...) + let shellslash = &shellslash + try + set noshellslash + return call(a:fn, a:000) + finally + let &shellslash = shellslash + endtry + endfunction +else + function! s:plug_call(fn, ...) + return call(a:fn, a:000) + endfunction +endif + +function! s:plug_getcwd() + return s:plug_call('getcwd') +endfunction + +function! s:plug_fnamemodify(fname, mods) + return s:plug_call('fnamemodify', a:fname, a:mods) +endfunction + +function! s:plug_expand(fmt) + return s:plug_call('expand', a:fmt, 1) +endfunction + +function! s:plug_tempname() + return s:plug_call('tempname') +endfunction + +function! plug#begin(...) + if a:0 > 0 + let s:plug_home_org = a:1 + let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p')) + elseif exists('g:plug_home') + let home = s:path(g:plug_home) + elseif !empty(&rtp) + let home = s:path(split(&rtp, ',')[0]) . '/plugged' + else + return s:err('Unable to determine plug home. Try calling plug#begin() with a path argument.') + endif + if s:plug_fnamemodify(home, ':t') ==# 'plugin' && s:plug_fnamemodify(home, ':h') ==# s:first_rtp + return s:err('Invalid plug home. '.home.' is a standard Vim runtime path and is not allowed.') + endif + + let g:plug_home = home + let g:plugs = {} + let g:plugs_order = [] + let s:triggers = {} + + call s:define_commands() + return 1 +endfunction + +function! s:define_commands() + command! -nargs=+ -bar Plug call plug#() + if !executable('git') + return s:err('`git` executable not found. Most commands will not be available. To suppress this message, prepend `silent!` to `call plug#begin(...)`.') + endif + if has('win32') + \ && &shellslash + \ && (&shell =~# 'cmd\(\.exe\)\?$' || &shell =~# 'powershell\(\.exe\)\?$') + return s:err('vim-plug does not support shell, ' . &shell . ', when shellslash is set.') + endif + if !has('nvim') + \ && (has('win32') || has('win32unix')) + \ && !has('multi_byte') + return s:err('Vim needs +multi_byte feature on Windows to run shell commands. Enable +iconv for best results.') + endif + command! -nargs=* -bar -bang -complete=customlist,s:names PlugInstall call s:install(0, []) + command! -nargs=* -bar -bang -complete=customlist,s:names PlugUpdate call s:update(0, []) + command! -nargs=0 -bar -bang PlugClean call s:clean(0) + command! -nargs=0 -bar PlugUpgrade if s:upgrade() | execute 'source' s:esc(s:me) | endif + command! -nargs=0 -bar PlugStatus call s:status() + command! -nargs=0 -bar PlugDiff call s:diff() + command! -nargs=? -bar -bang -complete=file PlugSnapshot call s:snapshot(0, ) +endfunction + +function! s:to_a(v) + return type(a:v) == s:TYPE.list ? a:v : [a:v] +endfunction + +function! s:to_s(v) + return type(a:v) == s:TYPE.string ? a:v : join(a:v, "\n") . "\n" +endfunction + +function! s:glob(from, pattern) + return s:lines(globpath(a:from, a:pattern)) +endfunction + +function! s:source(from, ...) + let found = 0 + for pattern in a:000 + for vim in s:glob(a:from, pattern) + execute 'source' s:esc(vim) + let found = 1 + endfor + endfor + return found +endfunction + +function! s:assoc(dict, key, val) + let a:dict[a:key] = add(get(a:dict, a:key, []), a:val) +endfunction + +function! s:ask(message, ...) + call inputsave() + echohl WarningMsg + let answer = input(a:message.(a:0 ? ' (y/N/a) ' : ' (y/N) ')) + echohl None + call inputrestore() + echo "\r" + return (a:0 && answer =~? '^a') ? 2 : (answer =~? '^y') ? 1 : 0 +endfunction + +function! s:ask_no_interrupt(...) + try + return call('s:ask', a:000) + catch + return 0 + endtry +endfunction + +function! s:lazy(plug, opt) + return has_key(a:plug, a:opt) && + \ (empty(s:to_a(a:plug[a:opt])) || + \ !isdirectory(a:plug.dir) || + \ len(s:glob(s:rtp(a:plug), 'plugin')) || + \ len(s:glob(s:rtp(a:plug), 'after/plugin'))) +endfunction + +function! plug#end() + if !exists('g:plugs') + return s:err('plug#end() called without calling plug#begin() first') + endif + + if exists('#PlugLOD') + augroup PlugLOD + autocmd! + augroup END + augroup! PlugLOD + endif + let lod = { 'ft': {}, 'map': {}, 'cmd': {} } + + if exists('g:did_load_filetypes') + filetype off + endif + for name in g:plugs_order + if !has_key(g:plugs, name) + continue + endif + let plug = g:plugs[name] + if get(s:loaded, name, 0) || !s:lazy(plug, 'on') && !s:lazy(plug, 'for') + let s:loaded[name] = 1 + continue + endif + + if has_key(plug, 'on') + let s:triggers[name] = { 'map': [], 'cmd': [] } + for cmd in s:to_a(plug.on) + if cmd =~? '^.\+' + if empty(mapcheck(cmd)) && empty(mapcheck(cmd, 'i')) + call s:assoc(lod.map, cmd, name) + endif + call add(s:triggers[name].map, cmd) + elseif cmd =~# '^[A-Z]' + let cmd = substitute(cmd, '!*$', '', '') + if exists(':'.cmd) != 2 + call s:assoc(lod.cmd, cmd, name) + endif + call add(s:triggers[name].cmd, cmd) + else + call s:err('Invalid `on` option: '.cmd. + \ '. Should start with an uppercase letter or ``.') + endif + endfor + endif + + if has_key(plug, 'for') + let types = s:to_a(plug.for) + if !empty(types) + augroup filetypedetect + call s:source(s:rtp(plug), 'ftdetect/**/*.vim', 'after/ftdetect/**/*.vim') + augroup END + endif + for type in types + call s:assoc(lod.ft, type, name) + endfor + endif + endfor + + for [cmd, names] in items(lod.cmd) + execute printf( + \ 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "", , , , %s)', + \ cmd, string(cmd), string(names)) + endfor + + for [map, names] in items(lod.map) + for [mode, map_prefix, key_prefix] in + \ [['i', '', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']] + execute printf( + \ '%snoremap %s %s:call lod_map(%s, %s, %s, "%s")', + \ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix) + endfor + endfor + + for [ft, names] in items(lod.ft) + augroup PlugLOD + execute printf('autocmd FileType %s call lod_ft(%s, %s)', + \ ft, string(ft), string(names)) + augroup END + endfor + + call s:reorg_rtp() + filetype plugin indent on + if has('vim_starting') + if has('syntax') && !exists('g:syntax_on') + syntax enable + end + else + call s:reload_plugins() + endif +endfunction + +function! s:loaded_names() + return filter(copy(g:plugs_order), 'get(s:loaded, v:val, 0)') +endfunction + +function! s:load_plugin(spec) + call s:source(s:rtp(a:spec), 'plugin/**/*.vim', 'after/plugin/**/*.vim') +endfunction + +function! s:reload_plugins() + for name in s:loaded_names() + call s:load_plugin(g:plugs[name]) + endfor +endfunction + +function! s:trim(str) + return substitute(a:str, '[\/]\+$', '', '') +endfunction + +function! s:version_requirement(val, min) + for idx in range(0, len(a:min) - 1) + let v = get(a:val, idx, 0) + if v < a:min[idx] | return 0 + elseif v > a:min[idx] | return 1 + endif + endfor + return 1 +endfunction + +function! s:git_version_requirement(...) + if !exists('s:git_version') + let s:git_version = map(split(split(s:system(['git', '--version']))[2], '\.'), 'str2nr(v:val)') + endif + return s:version_requirement(s:git_version, a:000) +endfunction + +function! s:progress_opt(base) + return a:base && !s:is_win && + \ s:git_version_requirement(1, 7, 1) ? '--progress' : '' +endfunction + +function! s:rtp(spec) + return s:path(a:spec.dir . get(a:spec, 'rtp', '')) +endfunction + +if s:is_win + function! s:path(path) + return s:trim(substitute(a:path, '/', '\', 'g')) + endfunction + + function! s:dirpath(path) + return s:path(a:path) . '\' + endfunction + + function! s:is_local_plug(repo) + return a:repo =~? '^[a-z]:\|^[%~]' + endfunction + + " Copied from fzf + function! s:wrap_cmds(cmds) + let cmds = [ + \ '@echo off', + \ 'setlocal enabledelayedexpansion'] + \ + (type(a:cmds) == type([]) ? a:cmds : [a:cmds]) + \ + ['endlocal'] + if has('iconv') + if !exists('s:codepage') + let s:codepage = libcallnr('kernel32.dll', 'GetACP', 0) + endif + return map(cmds, printf('iconv(v:val."\r", "%s", "cp%d")', &encoding, s:codepage)) + endif + return map(cmds, 'v:val."\r"') + endfunction + + function! s:batchfile(cmd) + let batchfile = s:plug_tempname().'.bat' + call writefile(s:wrap_cmds(a:cmd), batchfile) + let cmd = plug#shellescape(batchfile, {'shell': &shell, 'script': 0}) + if &shell =~# 'powershell\(\.exe\)\?$' + let cmd = '& ' . cmd + endif + return [batchfile, cmd] + endfunction +else + function! s:path(path) + return s:trim(a:path) + endfunction + + function! s:dirpath(path) + return substitute(a:path, '[/\\]*$', '/', '') + endfunction + + function! s:is_local_plug(repo) + return a:repo[0] =~ '[/$~]' + endfunction +endif + +function! s:err(msg) + echohl ErrorMsg + echom '[vim-plug] '.a:msg + echohl None +endfunction + +function! s:warn(cmd, msg) + echohl WarningMsg + execute a:cmd 'a:msg' + echohl None +endfunction + +function! s:esc(path) + return escape(a:path, ' ') +endfunction + +function! s:escrtp(path) + return escape(a:path, ' ,') +endfunction + +function! s:remove_rtp() + for name in s:loaded_names() + let rtp = s:rtp(g:plugs[name]) + execute 'set rtp-='.s:escrtp(rtp) + let after = globpath(rtp, 'after') + if isdirectory(after) + execute 'set rtp-='.s:escrtp(after) + endif + endfor +endfunction + +function! s:reorg_rtp() + if !empty(s:first_rtp) + execute 'set rtp-='.s:first_rtp + execute 'set rtp-='.s:last_rtp + endif + + " &rtp is modified from outside + if exists('s:prtp') && s:prtp !=# &rtp + call s:remove_rtp() + unlet! s:middle + endif + + let s:middle = get(s:, 'middle', &rtp) + let rtps = map(s:loaded_names(), 's:rtp(g:plugs[v:val])') + let afters = filter(map(copy(rtps), 'globpath(v:val, "after")'), '!empty(v:val)') + let rtp = join(map(rtps, 'escape(v:val, ",")'), ',') + \ . ','.s:middle.',' + \ . join(map(afters, 'escape(v:val, ",")'), ',') + let &rtp = substitute(substitute(rtp, ',,*', ',', 'g'), '^,\|,$', '', 'g') + let s:prtp = &rtp + + if !empty(s:first_rtp) + execute 'set rtp^='.s:first_rtp + execute 'set rtp+='.s:last_rtp + endif +endfunction + +function! s:doautocmd(...) + if exists('#'.join(a:000, '#')) + execute 'doautocmd' ((v:version > 703 || has('patch442')) ? '' : '') join(a:000) + endif +endfunction + +function! s:dobufread(names) + for name in a:names + let path = s:rtp(g:plugs[name]) + for dir in ['ftdetect', 'ftplugin', 'after/ftdetect', 'after/ftplugin'] + if len(finddir(dir, path)) + if exists('#BufRead') + doautocmd BufRead + endif + return + endif + endfor + endfor +endfunction + +function! plug#load(...) + if a:0 == 0 + return s:err('Argument missing: plugin name(s) required') + endif + if !exists('g:plugs') + return s:err('plug#begin was not called') + endif + let names = a:0 == 1 && type(a:1) == s:TYPE.list ? a:1 : a:000 + let unknowns = filter(copy(names), '!has_key(g:plugs, v:val)') + if !empty(unknowns) + let s = len(unknowns) > 1 ? 's' : '' + return s:err(printf('Unknown plugin%s: %s', s, join(unknowns, ', '))) + end + let unloaded = filter(copy(names), '!get(s:loaded, v:val, 0)') + if !empty(unloaded) + for name in unloaded + call s:lod([name], ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + endfor + call s:dobufread(unloaded) + return 1 + end + return 0 +endfunction + +function! s:remove_triggers(name) + if !has_key(s:triggers, a:name) + return + endif + for cmd in s:triggers[a:name].cmd + execute 'silent! delc' cmd + endfor + for map in s:triggers[a:name].map + execute 'silent! unmap' map + execute 'silent! iunmap' map + endfor + call remove(s:triggers, a:name) +endfunction + +function! s:lod(names, types, ...) + for name in a:names + call s:remove_triggers(name) + let s:loaded[name] = 1 + endfor + call s:reorg_rtp() + + for name in a:names + let rtp = s:rtp(g:plugs[name]) + for dir in a:types + call s:source(rtp, dir.'/**/*.vim') + endfor + if a:0 + if !s:source(rtp, a:1) && !empty(s:glob(rtp, a:2)) + execute 'runtime' a:1 + endif + call s:source(rtp, a:2) + endif + call s:doautocmd('User', name) + endfor +endfunction + +function! s:lod_ft(pat, names) + let syn = 'syntax/'.a:pat.'.vim' + call s:lod(a:names, ['plugin', 'after/plugin'], syn, 'after/'.syn) + execute 'autocmd! PlugLOD FileType' a:pat + call s:doautocmd('filetypeplugin', 'FileType') + call s:doautocmd('filetypeindent', 'FileType') +endfunction + +function! s:lod_cmd(cmd, bang, l1, l2, args, names) + call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + call s:dobufread(a:names) + execute printf('%s%s%s %s', (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args) +endfunction + +function! s:lod_map(map, names, with_prefix, prefix) + call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + call s:dobufread(a:names) + let extra = '' + while 1 + let c = getchar(0) + if c == 0 + break + endif + let extra .= nr2char(c) + endwhile + + if a:with_prefix + let prefix = v:count ? v:count : '' + let prefix .= '"'.v:register.a:prefix + if mode(1) == 'no' + if v:operator == 'c' + let prefix = "\" . prefix + endif + let prefix .= v:operator + endif + call feedkeys(prefix, 'n') + endif + call feedkeys(substitute(a:map, '^', "\", '') . extra) +endfunction + +function! plug#(repo, ...) + if a:0 > 1 + return s:err('Invalid number of arguments (1..2)') + endif + + try + let repo = s:trim(a:repo) + let opts = a:0 == 1 ? s:parse_options(a:1) : s:base_spec + let name = get(opts, 'as', s:plug_fnamemodify(repo, ':t:s?\.git$??')) + let spec = extend(s:infer_properties(name, repo), opts) + if !has_key(g:plugs, name) + call add(g:plugs_order, name) + endif + let g:plugs[name] = spec + let s:loaded[name] = get(s:loaded, name, 0) + catch + return s:err(repo . ' ' . v:exception) + endtry +endfunction + +function! s:parse_options(arg) + let opts = copy(s:base_spec) + let type = type(a:arg) + let opt_errfmt = 'Invalid argument for "%s" option of :Plug (expected: %s)' + if type == s:TYPE.string + if empty(a:arg) + throw printf(opt_errfmt, 'tag', 'string') + endif + let opts.tag = a:arg + elseif type == s:TYPE.dict + for opt in ['branch', 'tag', 'commit', 'rtp', 'dir', 'as'] + if has_key(a:arg, opt) + \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt])) + throw printf(opt_errfmt, opt, 'string') + endif + endfor + for opt in ['on', 'for'] + if has_key(a:arg, opt) + \ && type(a:arg[opt]) != s:TYPE.list + \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt])) + throw printf(opt_errfmt, opt, 'string or list') + endif + endfor + if has_key(a:arg, 'do') + \ && type(a:arg.do) != s:TYPE.funcref + \ && (type(a:arg.do) != s:TYPE.string || empty(a:arg.do)) + throw printf(opt_errfmt, 'do', 'string or funcref') + endif + call extend(opts, a:arg) + if has_key(opts, 'dir') + let opts.dir = s:dirpath(s:plug_expand(opts.dir)) + endif + else + throw 'Invalid argument type (expected: string or dictionary)' + endif + return opts +endfunction + +function! s:infer_properties(name, repo) + let repo = a:repo + if s:is_local_plug(repo) + return { 'dir': s:dirpath(s:plug_expand(repo)) } + else + if repo =~ ':' + let uri = repo + else + if repo !~ '/' + throw printf('Invalid argument: %s (implicit `vim-scripts'' expansion is deprecated)', repo) + endif + let fmt = get(g:, 'plug_url_format', 'https://git::@github.com/%s.git') + let uri = printf(fmt, repo) + endif + return { 'dir': s:dirpath(g:plug_home.'/'.a:name), 'uri': uri } + endif +endfunction + +function! s:install(force, names) + call s:update_impl(0, a:force, a:names) +endfunction + +function! s:update(force, names) + call s:update_impl(1, a:force, a:names) +endfunction + +function! plug#helptags() + if !exists('g:plugs') + return s:err('plug#begin was not called') + endif + for spec in values(g:plugs) + let docd = join([s:rtp(spec), 'doc'], '/') + if isdirectory(docd) + silent! execute 'helptags' s:esc(docd) + endif + endfor + return 1 +endfunction + +function! s:syntax() + syntax clear + syntax region plug1 start=/\%1l/ end=/\%2l/ contains=plugNumber + syntax region plug2 start=/\%2l/ end=/\%3l/ contains=plugBracket,plugX + syn match plugNumber /[0-9]\+[0-9.]*/ contained + syn match plugBracket /[[\]]/ contained + syn match plugX /x/ contained + syn match plugDash /^-\{1}\ / + syn match plugPlus /^+/ + syn match plugStar /^*/ + syn match plugMessage /\(^- \)\@<=.*/ + syn match plugName /\(^- \)\@<=[^ ]*:/ + syn match plugSha /\%(: \)\@<=[0-9a-f]\{4,}$/ + syn match plugTag /(tag: [^)]\+)/ + syn match plugInstall /\(^+ \)\@<=[^:]*/ + syn match plugUpdate /\(^* \)\@<=[^:]*/ + syn match plugCommit /^ \X*[0-9a-f]\{7,9} .*/ contains=plugRelDate,plugEdge,plugTag + syn match plugEdge /^ \X\+$/ + syn match plugEdge /^ \X*/ contained nextgroup=plugSha + syn match plugSha /[0-9a-f]\{7,9}/ contained + syn match plugRelDate /([^)]*)$/ contained + syn match plugNotLoaded /(not loaded)$/ + syn match plugError /^x.*/ + syn region plugDeleted start=/^\~ .*/ end=/^\ze\S/ + syn match plugH2 /^.*:\n-\+$/ + syn match plugH2 /^-\{2,}/ + syn keyword Function PlugInstall PlugStatus PlugUpdate PlugClean + hi def link plug1 Title + hi def link plug2 Repeat + hi def link plugH2 Type + hi def link plugX Exception + hi def link plugBracket Structure + hi def link plugNumber Number + + hi def link plugDash Special + hi def link plugPlus Constant + hi def link plugStar Boolean + + hi def link plugMessage Function + hi def link plugName Label + hi def link plugInstall Function + hi def link plugUpdate Type + + hi def link plugError Error + hi def link plugDeleted Ignore + hi def link plugRelDate Comment + hi def link plugEdge PreProc + hi def link plugSha Identifier + hi def link plugTag Constant + + hi def link plugNotLoaded Comment +endfunction + +function! s:lpad(str, len) + return a:str . repeat(' ', a:len - len(a:str)) +endfunction + +function! s:lines(msg) + return split(a:msg, "[\r\n]") +endfunction + +function! s:lastline(msg) + return get(s:lines(a:msg), -1, '') +endfunction + +function! s:new_window() + execute get(g:, 'plug_window', 'vertical topleft new') +endfunction + +function! s:plug_window_exists() + let buflist = tabpagebuflist(s:plug_tab) + return !empty(buflist) && index(buflist, s:plug_buf) >= 0 +endfunction + +function! s:switch_in() + if !s:plug_window_exists() + return 0 + endif + + if winbufnr(0) != s:plug_buf + let s:pos = [tabpagenr(), winnr(), winsaveview()] + execute 'normal!' s:plug_tab.'gt' + let winnr = bufwinnr(s:plug_buf) + execute winnr.'wincmd w' + call add(s:pos, winsaveview()) + else + let s:pos = [winsaveview()] + endif + + setlocal modifiable + return 1 +endfunction + +function! s:switch_out(...) + call winrestview(s:pos[-1]) + setlocal nomodifiable + if a:0 > 0 + execute a:1 + endif + + if len(s:pos) > 1 + execute 'normal!' s:pos[0].'gt' + execute s:pos[1] 'wincmd w' + call winrestview(s:pos[2]) + endif +endfunction + +function! s:finish_bindings() + nnoremap R :call retry() + nnoremap D :PlugDiff + nnoremap S :PlugStatus + nnoremap U :call status_update() + xnoremap U :call status_update() + nnoremap ]] :silent! call section('') + nnoremap [[ :silent! call section('b') +endfunction + +function! s:prepare(...) + if empty(s:plug_getcwd()) + throw 'Invalid current working directory. Cannot proceed.' + endif + + for evar in ['$GIT_DIR', '$GIT_WORK_TREE'] + if exists(evar) + throw evar.' detected. Cannot proceed.' + endif + endfor + + call s:job_abort() + if s:switch_in() + if b:plug_preview == 1 + pc + endif + enew + else + call s:new_window() + endif + + nnoremap q :if b:plug_preview==1pcendifbd + if a:0 == 0 + call s:finish_bindings() + endif + let b:plug_preview = -1 + let s:plug_tab = tabpagenr() + let s:plug_buf = winbufnr(0) + call s:assign_name() + + for k in ['', 'L', 'o', 'X', 'd', 'dd'] + execute 'silent! unmap ' k + endfor + setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline modifiable nospell + if exists('+colorcolumn') + setlocal colorcolumn= + endif + setf vim-plug + if exists('g:syntax_on') + call s:syntax() + endif +endfunction + +function! s:assign_name() + " Assign buffer name + let prefix = '[Plugins]' + let name = prefix + let idx = 2 + while bufexists(name) + let name = printf('%s (%s)', prefix, idx) + let idx = idx + 1 + endwhile + silent! execute 'f' fnameescape(name) +endfunction + +function! s:chsh(swap) + let prev = [&shell, &shellcmdflag, &shellredir] + if !s:is_win + set shell=sh + endif + if a:swap + if &shell =~# 'powershell\(\.exe\)\?$' || &shell =~# 'pwsh$' + let &shellredir = '2>&1 | Out-File -Encoding UTF8 %s' + elseif &shell =~# 'sh' || &shell =~# 'cmd\(\.exe\)\?$' + set shellredir=>%s\ 2>&1 + endif + endif + return prev +endfunction + +function! s:bang(cmd, ...) + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(a:0) + " FIXME: Escaping is incomplete. We could use shellescape with eval, + " but it won't work on Windows. + let cmd = a:0 ? s:with_cd(a:cmd, a:1) : a:cmd + if s:is_win + let [batchfile, cmd] = s:batchfile(cmd) + endif + let g:_plug_bang = (s:is_win && has('gui_running') ? 'silent ' : '').'!'.escape(cmd, '#!%') + execute "normal! :execute g:_plug_bang\\" + finally + unlet g:_plug_bang + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry + return v:shell_error ? 'Exit status: ' . v:shell_error : '' +endfunction + +function! s:regress_bar() + let bar = substitute(getline(2)[1:-2], '.*\zs=', 'x', '') + call s:progress_bar(2, bar, len(bar)) +endfunction + +function! s:is_updated(dir) + return !empty(s:system_chomp(['git', 'log', '--pretty=format:%h', 'HEAD...HEAD@{1}'], a:dir)) +endfunction + +function! s:do(pull, force, todo) + for [name, spec] in items(a:todo) + if !isdirectory(spec.dir) + continue + endif + let installed = has_key(s:update.new, name) + let updated = installed ? 0 : + \ (a:pull && index(s:update.errors, name) < 0 && s:is_updated(spec.dir)) + if a:force || installed || updated + execute 'cd' s:esc(spec.dir) + call append(3, '- Post-update hook for '. name .' ... ') + let error = '' + let type = type(spec.do) + if type == s:TYPE.string + if spec.do[0] == ':' + if !get(s:loaded, name, 0) + let s:loaded[name] = 1 + call s:reorg_rtp() + endif + call s:load_plugin(spec) + try + execute spec.do[1:] + catch + let error = v:exception + endtry + if !s:plug_window_exists() + cd - + throw 'Warning: vim-plug was terminated by the post-update hook of '.name + endif + else + let error = s:bang(spec.do) + endif + elseif type == s:TYPE.funcref + try + call s:load_plugin(spec) + let status = installed ? 'installed' : (updated ? 'updated' : 'unchanged') + call spec.do({ 'name': name, 'status': status, 'force': a:force }) + catch + let error = v:exception + endtry + else + let error = 'Invalid hook type' + endif + call s:switch_in() + call setline(4, empty(error) ? (getline(4) . 'OK') + \ : ('x' . getline(4)[1:] . error)) + if !empty(error) + call add(s:update.errors, name) + call s:regress_bar() + endif + cd - + endif + endfor +endfunction + +function! s:hash_match(a, b) + return stridx(a:a, a:b) == 0 || stridx(a:b, a:a) == 0 +endfunction + +function! s:checkout(spec) + let sha = a:spec.commit + let output = s:git_revision(a:spec.dir) + if !empty(output) && !s:hash_match(sha, s:lines(output)[0]) + let credential_helper = s:git_version_requirement(2) ? '-c credential.helper= ' : '' + let output = s:system( + \ 'git '.credential_helper.'fetch --depth 999999 && git checkout '.plug#shellescape(sha).' --', a:spec.dir) + endif + return output +endfunction + +function! s:finish(pull) + let new_frozen = len(filter(keys(s:update.new), 'g:plugs[v:val].frozen')) + if new_frozen + let s = new_frozen > 1 ? 's' : '' + call append(3, printf('- Installed %d frozen plugin%s', new_frozen, s)) + endif + call append(3, '- Finishing ... ') | 4 + redraw + call plug#helptags() + call plug#end() + call setline(4, getline(4) . 'Done!') + redraw + let msgs = [] + if !empty(s:update.errors) + call add(msgs, "Press 'R' to retry.") + endif + if a:pull && len(s:update.new) < len(filter(getline(5, '$'), + \ "v:val =~ '^- ' && v:val !~# 'Already up.to.date'")) + call add(msgs, "Press 'D' to see the updated changes.") + endif + echo join(msgs, ' ') + call s:finish_bindings() +endfunction + +function! s:retry() + if empty(s:update.errors) + return + endif + echo + call s:update_impl(s:update.pull, s:update.force, + \ extend(copy(s:update.errors), [s:update.threads])) +endfunction + +function! s:is_managed(name) + return has_key(g:plugs[a:name], 'uri') +endfunction + +function! s:names(...) + return sort(filter(keys(g:plugs), 'stridx(v:val, a:1) == 0 && s:is_managed(v:val)')) +endfunction + +function! s:check_ruby() + silent! ruby require 'thread'; VIM::command("let g:plug_ruby = '#{RUBY_VERSION}'") + if !exists('g:plug_ruby') + redraw! + return s:warn('echom', 'Warning: Ruby interface is broken') + endif + let ruby_version = split(g:plug_ruby, '\.') + unlet g:plug_ruby + return s:version_requirement(ruby_version, [1, 8, 7]) +endfunction + +function! s:update_impl(pull, force, args) abort + let sync = index(a:args, '--sync') >= 0 || has('vim_starting') + let args = filter(copy(a:args), 'v:val != "--sync"') + let threads = (len(args) > 0 && args[-1] =~ '^[1-9][0-9]*$') ? + \ remove(args, -1) : get(g:, 'plug_threads', 16) + + let managed = filter(copy(g:plugs), 's:is_managed(v:key)') + let todo = empty(args) ? filter(managed, '!v:val.frozen || !isdirectory(v:val.dir)') : + \ filter(managed, 'index(args, v:key) >= 0') + + if empty(todo) + return s:warn('echo', 'No plugin to '. (a:pull ? 'update' : 'install')) + endif + + if !s:is_win && s:git_version_requirement(2, 3) + let s:git_terminal_prompt = exists('$GIT_TERMINAL_PROMPT') ? $GIT_TERMINAL_PROMPT : '' + let $GIT_TERMINAL_PROMPT = 0 + for plug in values(todo) + let plug.uri = substitute(plug.uri, + \ '^https://git::@github\.com', 'https://github.com', '') + endfor + endif + + if !isdirectory(g:plug_home) + try + call mkdir(g:plug_home, 'p') + catch + return s:err(printf('Invalid plug directory: %s. '. + \ 'Try to call plug#begin with a valid directory', g:plug_home)) + endtry + endif + + if has('nvim') && !exists('*jobwait') && threads > 1 + call s:warn('echom', '[vim-plug] Update Neovim for parallel installer') + endif + + let use_job = s:nvim || s:vim8 + let python = (has('python') || has('python3')) && !use_job + let ruby = has('ruby') && !use_job && (v:version >= 703 || v:version == 702 && has('patch374')) && !(s:is_win && has('gui_running')) && threads > 1 && s:check_ruby() + + let s:update = { + \ 'start': reltime(), + \ 'all': todo, + \ 'todo': copy(todo), + \ 'errors': [], + \ 'pull': a:pull, + \ 'force': a:force, + \ 'new': {}, + \ 'threads': (python || ruby || use_job) ? min([len(todo), threads]) : 1, + \ 'bar': '', + \ 'fin': 0 + \ } + + call s:prepare(1) + call append(0, ['', '']) + normal! 2G + silent! redraw + + let s:clone_opt = [] + if get(g:, 'plug_shallow', 1) + call extend(s:clone_opt, ['--depth', '1']) + if s:git_version_requirement(1, 7, 10) + call add(s:clone_opt, '--no-single-branch') + endif + endif + + if has('win32unix') || has('wsl') + call extend(s:clone_opt, ['-c', 'core.eol=lf', '-c', 'core.autocrlf=input']) + endif + + let s:submodule_opt = s:git_version_requirement(2, 8) ? ' --jobs='.threads : '' + + " Python version requirement (>= 2.7) + if python && !has('python3') && !ruby && !use_job && s:update.threads > 1 + redir => pyv + silent python import platform; print platform.python_version() + redir END + let python = s:version_requirement( + \ map(split(split(pyv)[0], '\.'), 'str2nr(v:val)'), [2, 6]) + endif + + if (python || ruby) && s:update.threads > 1 + try + let imd = &imd + if s:mac_gui + set noimd + endif + if ruby + call s:update_ruby() + else + call s:update_python() + endif + catch + let lines = getline(4, '$') + let printed = {} + silent! 4,$d _ + for line in lines + let name = s:extract_name(line, '.', '') + if empty(name) || !has_key(printed, name) + call append('$', line) + if !empty(name) + let printed[name] = 1 + if line[0] == 'x' && index(s:update.errors, name) < 0 + call add(s:update.errors, name) + end + endif + endif + endfor + finally + let &imd = imd + call s:update_finish() + endtry + else + call s:update_vim() + while use_job && sync + sleep 100m + if s:update.fin + break + endif + endwhile + endif +endfunction + +function! s:log4(name, msg) + call setline(4, printf('- %s (%s)', a:msg, a:name)) + redraw +endfunction + +function! s:update_finish() + if exists('s:git_terminal_prompt') + let $GIT_TERMINAL_PROMPT = s:git_terminal_prompt + endif + if s:switch_in() + call append(3, '- Updating ...') | 4 + for [name, spec] in items(filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && (s:update.force || s:update.pull || has_key(s:update.new, v:key))')) + let [pos, _] = s:logpos(name) + if !pos + continue + endif + if has_key(spec, 'commit') + call s:log4(name, 'Checking out '.spec.commit) + let out = s:checkout(spec) + elseif has_key(spec, 'tag') + let tag = spec.tag + if tag =~ '\*' + let tags = s:lines(s:system('git tag --list '.plug#shellescape(tag).' --sort -version:refname 2>&1', spec.dir)) + if !v:shell_error && !empty(tags) + let tag = tags[0] + call s:log4(name, printf('Latest tag for %s -> %s', spec.tag, tag)) + call append(3, '') + endif + endif + call s:log4(name, 'Checking out '.tag) + let out = s:system('git checkout -q '.plug#shellescape(tag).' -- 2>&1', spec.dir) + else + let branch = s:git_origin_branch(spec) + call s:log4(name, 'Merging origin/'.s:esc(branch)) + let out = s:system('git checkout -q '.plug#shellescape(branch).' -- 2>&1' + \. (has_key(s:update.new, name) ? '' : ('&& git merge --ff-only '.plug#shellescape('origin/'.branch).' 2>&1')), spec.dir) + endif + if !v:shell_error && filereadable(spec.dir.'/.gitmodules') && + \ (s:update.force || has_key(s:update.new, name) || s:is_updated(spec.dir)) + call s:log4(name, 'Updating submodules. This may take a while.') + let out .= s:bang('git submodule update --init --recursive'.s:submodule_opt.' 2>&1', spec.dir) + endif + let msg = s:format_message(v:shell_error ? 'x': '-', name, out) + if v:shell_error + call add(s:update.errors, name) + call s:regress_bar() + silent execute pos 'd _' + call append(4, msg) | 4 + elseif !empty(out) + call setline(pos, msg[0]) + endif + redraw + endfor + silent 4 d _ + try + call s:do(s:update.pull, s:update.force, filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && has_key(v:val, "do")')) + catch + call s:warn('echom', v:exception) + call s:warn('echo', '') + return + endtry + call s:finish(s:update.pull) + call setline(1, 'Updated. Elapsed time: ' . split(reltimestr(reltime(s:update.start)))[0] . ' sec.') + call s:switch_out('normal! gg') + endif +endfunction + +function! s:job_abort() + if (!s:nvim && !s:vim8) || !exists('s:jobs') + return + endif + + for [name, j] in items(s:jobs) + if s:nvim + silent! call jobstop(j.jobid) + elseif s:vim8 + silent! call job_stop(j.jobid) + endif + if j.new + call s:rm_rf(g:plugs[name].dir) + endif + endfor + let s:jobs = {} +endfunction + +function! s:last_non_empty_line(lines) + let len = len(a:lines) + for idx in range(len) + let line = a:lines[len-idx-1] + if !empty(line) + return line + endif + endfor + return '' +endfunction + +function! s:job_out_cb(self, data) abort + let self = a:self + let data = remove(self.lines, -1) . a:data + let lines = map(split(data, "\n", 1), 'split(v:val, "\r", 1)[-1]') + call extend(self.lines, lines) + " To reduce the number of buffer updates + let self.tick = get(self, 'tick', -1) + 1 + if !self.running || self.tick % len(s:jobs) == 0 + let bullet = self.running ? (self.new ? '+' : '*') : (self.error ? 'x' : '-') + let result = self.error ? join(self.lines, "\n") : s:last_non_empty_line(self.lines) + call s:log(bullet, self.name, result) + endif +endfunction + +function! s:job_exit_cb(self, data) abort + let a:self.running = 0 + let a:self.error = a:data != 0 + call s:reap(a:self.name) + call s:tick() +endfunction + +function! s:job_cb(fn, job, ch, data) + if !s:plug_window_exists() " plug window closed + return s:job_abort() + endif + call call(a:fn, [a:job, a:data]) +endfunction + +function! s:nvim_cb(job_id, data, event) dict abort + return (a:event == 'stdout' || a:event == 'stderr') ? + \ s:job_cb('s:job_out_cb', self, 0, join(a:data, "\n")) : + \ s:job_cb('s:job_exit_cb', self, 0, a:data) +endfunction + +function! s:spawn(name, cmd, opts) + let job = { 'name': a:name, 'running': 1, 'error': 0, 'lines': [''], + \ 'new': get(a:opts, 'new', 0) } + let s:jobs[a:name] = job + + if s:nvim + if has_key(a:opts, 'dir') + let job.cwd = a:opts.dir + endif + let argv = a:cmd + call extend(job, { + \ 'on_stdout': function('s:nvim_cb'), + \ 'on_stderr': function('s:nvim_cb'), + \ 'on_exit': function('s:nvim_cb'), + \ }) + let jid = s:plug_call('jobstart', argv, job) + if jid > 0 + let job.jobid = jid + else + let job.running = 0 + let job.error = 1 + let job.lines = [jid < 0 ? argv[0].' is not executable' : + \ 'Invalid arguments (or job table is full)'] + endif + elseif s:vim8 + let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"script": 0})')) + if has_key(a:opts, 'dir') + let cmd = s:with_cd(cmd, a:opts.dir, 0) + endif + let argv = s:is_win ? ['cmd', '/s', '/c', '"'.cmd.'"'] : ['sh', '-c', cmd] + let jid = job_start(s:is_win ? join(argv, ' ') : argv, { + \ 'out_cb': function('s:job_cb', ['s:job_out_cb', job]), + \ 'err_cb': function('s:job_cb', ['s:job_out_cb', job]), + \ 'exit_cb': function('s:job_cb', ['s:job_exit_cb', job]), + \ 'err_mode': 'raw', + \ 'out_mode': 'raw' + \}) + if job_status(jid) == 'run' + let job.jobid = jid + else + let job.running = 0 + let job.error = 1 + let job.lines = ['Failed to start job'] + endif + else + let job.lines = s:lines(call('s:system', has_key(a:opts, 'dir') ? [a:cmd, a:opts.dir] : [a:cmd])) + let job.error = v:shell_error != 0 + let job.running = 0 + endif +endfunction + +function! s:reap(name) + let job = s:jobs[a:name] + if job.error + call add(s:update.errors, a:name) + elseif get(job, 'new', 0) + let s:update.new[a:name] = 1 + endif + let s:update.bar .= job.error ? 'x' : '=' + + let bullet = job.error ? 'x' : '-' + let result = job.error ? join(job.lines, "\n") : s:last_non_empty_line(job.lines) + call s:log(bullet, a:name, empty(result) ? 'OK' : result) + call s:bar() + + call remove(s:jobs, a:name) +endfunction + +function! s:bar() + if s:switch_in() + let total = len(s:update.all) + call setline(1, (s:update.pull ? 'Updating' : 'Installing'). + \ ' plugins ('.len(s:update.bar).'/'.total.')') + call s:progress_bar(2, s:update.bar, total) + call s:switch_out() + endif +endfunction + +function! s:logpos(name) + let max = line('$') + for i in range(4, max > 4 ? max : 4) + if getline(i) =~# '^[-+x*] '.a:name.':' + for j in range(i + 1, max > 5 ? max : 5) + if getline(j) !~ '^ ' + return [i, j - 1] + endif + endfor + return [i, i] + endif + endfor + return [0, 0] +endfunction + +function! s:log(bullet, name, lines) + if s:switch_in() + let [b, e] = s:logpos(a:name) + if b > 0 + silent execute printf('%d,%d d _', b, e) + if b > winheight('.') + let b = 4 + endif + else + let b = 4 + endif + " FIXME For some reason, nomodifiable is set after :d in vim8 + setlocal modifiable + call append(b - 1, s:format_message(a:bullet, a:name, a:lines)) + call s:switch_out() + endif +endfunction + +function! s:update_vim() + let s:jobs = {} + + call s:bar() + call s:tick() +endfunction + +function! s:tick() + let pull = s:update.pull + let prog = s:progress_opt(s:nvim || s:vim8) +while 1 " Without TCO, Vim stack is bound to explode + if empty(s:update.todo) + if empty(s:jobs) && !s:update.fin + call s:update_finish() + let s:update.fin = 1 + endif + return + endif + + let name = keys(s:update.todo)[0] + let spec = remove(s:update.todo, name) + let new = empty(globpath(spec.dir, '.git', 1)) + + call s:log(new ? '+' : '*', name, pull ? 'Updating ...' : 'Installing ...') + redraw + + let has_tag = has_key(spec, 'tag') + if !new + let [error, _] = s:git_validate(spec, 0) + if empty(error) + if pull + let cmd = s:git_version_requirement(2) ? ['git', '-c', 'credential.helper=', 'fetch'] : ['git', 'fetch'] + if has_tag && !empty(globpath(spec.dir, '.git/shallow')) + call extend(cmd, ['--depth', '99999999']) + endif + if !empty(prog) + call add(cmd, prog) + endif + call s:spawn(name, cmd, { 'dir': spec.dir }) + else + let s:jobs[name] = { 'running': 0, 'lines': ['Already installed'], 'error': 0 } + endif + else + let s:jobs[name] = { 'running': 0, 'lines': s:lines(error), 'error': 1 } + endif + else + let cmd = ['git', 'clone'] + if !has_tag + call extend(cmd, s:clone_opt) + endif + if !empty(prog) + call add(cmd, prog) + endif + call s:spawn(name, extend(cmd, [spec.uri, s:trim(spec.dir)]), { 'new': 1 }) + endif + + if !s:jobs[name].running + call s:reap(name) + endif + if len(s:jobs) >= s:update.threads + break + endif +endwhile +endfunction + +function! s:update_python() +let py_exe = has('python') ? 'python' : 'python3' +execute py_exe "<< EOF" +import datetime +import functools +import os +try: + import queue +except ImportError: + import Queue as queue +import random +import re +import shutil +import signal +import subprocess +import tempfile +import threading as thr +import time +import traceback +import vim + +G_NVIM = vim.eval("has('nvim')") == '1' +G_PULL = vim.eval('s:update.pull') == '1' +G_RETRIES = int(vim.eval('get(g:, "plug_retries", 2)')) + 1 +G_TIMEOUT = int(vim.eval('get(g:, "plug_timeout", 60)')) +G_CLONE_OPT = ' '.join(vim.eval('s:clone_opt')) +G_PROGRESS = vim.eval('s:progress_opt(1)') +G_LOG_PROB = 1.0 / int(vim.eval('s:update.threads')) +G_STOP = thr.Event() +G_IS_WIN = vim.eval('s:is_win') == '1' + +class PlugError(Exception): + def __init__(self, msg): + self.msg = msg +class CmdTimedOut(PlugError): + pass +class CmdFailed(PlugError): + pass +class InvalidURI(PlugError): + pass +class Action(object): + INSTALL, UPDATE, ERROR, DONE = ['+', '*', 'x', '-'] + +class Buffer(object): + def __init__(self, lock, num_plugs, is_pull): + self.bar = '' + self.event = 'Updating' if is_pull else 'Installing' + self.lock = lock + self.maxy = int(vim.eval('winheight(".")')) + self.num_plugs = num_plugs + + def __where(self, name): + """ Find first line with name in current buffer. Return line num. """ + found, lnum = False, 0 + matcher = re.compile('^[-+x*] {0}:'.format(name)) + for line in vim.current.buffer: + if matcher.search(line) is not None: + found = True + break + lnum += 1 + + if not found: + lnum = -1 + return lnum + + def header(self): + curbuf = vim.current.buffer + curbuf[0] = self.event + ' plugins ({0}/{1})'.format(len(self.bar), self.num_plugs) + + num_spaces = self.num_plugs - len(self.bar) + curbuf[1] = '[{0}{1}]'.format(self.bar, num_spaces * ' ') + + with self.lock: + vim.command('normal! 2G') + vim.command('redraw') + + def write(self, action, name, lines): + first, rest = lines[0], lines[1:] + msg = ['{0} {1}{2}{3}'.format(action, name, ': ' if first else '', first)] + msg.extend([' ' + line for line in rest]) + + try: + if action == Action.ERROR: + self.bar += 'x' + vim.command("call add(s:update.errors, '{0}')".format(name)) + elif action == Action.DONE: + self.bar += '=' + + curbuf = vim.current.buffer + lnum = self.__where(name) + if lnum != -1: # Found matching line num + del curbuf[lnum] + if lnum > self.maxy and action in set([Action.INSTALL, Action.UPDATE]): + lnum = 3 + else: + lnum = 3 + curbuf.append(msg, lnum) + + self.header() + except vim.error: + pass + +class Command(object): + CD = 'cd /d' if G_IS_WIN else 'cd' + + def __init__(self, cmd, cmd_dir=None, timeout=60, cb=None, clean=None): + self.cmd = cmd + if cmd_dir: + self.cmd = '{0} {1} && {2}'.format(Command.CD, cmd_dir, self.cmd) + self.timeout = timeout + self.callback = cb if cb else (lambda msg: None) + self.clean = clean if clean else (lambda: None) + self.proc = None + + @property + def alive(self): + """ Returns true only if command still running. """ + return self.proc and self.proc.poll() is None + + def execute(self, ntries=3): + """ Execute the command with ntries if CmdTimedOut. + Returns the output of the command if no Exception. + """ + attempt, finished, limit = 0, False, self.timeout + + while not finished: + try: + attempt += 1 + result = self.try_command() + finished = True + return result + except CmdTimedOut: + if attempt != ntries: + self.notify_retry() + self.timeout += limit + else: + raise + + def notify_retry(self): + """ Retry required for command, notify user. """ + for count in range(3, 0, -1): + if G_STOP.is_set(): + raise KeyboardInterrupt + msg = 'Timeout. Will retry in {0} second{1} ...'.format( + count, 's' if count != 1 else '') + self.callback([msg]) + time.sleep(1) + self.callback(['Retrying ...']) + + def try_command(self): + """ Execute a cmd & poll for callback. Returns list of output. + Raises CmdFailed -> return code for Popen isn't 0 + Raises CmdTimedOut -> command exceeded timeout without new output + """ + first_line = True + + try: + tfile = tempfile.NamedTemporaryFile(mode='w+b') + preexec_fn = not G_IS_WIN and os.setsid or None + self.proc = subprocess.Popen(self.cmd, stdout=tfile, + stderr=subprocess.STDOUT, + stdin=subprocess.PIPE, shell=True, + preexec_fn=preexec_fn) + thrd = thr.Thread(target=(lambda proc: proc.wait()), args=(self.proc,)) + thrd.start() + + thread_not_started = True + while thread_not_started: + try: + thrd.join(0.1) + thread_not_started = False + except RuntimeError: + pass + + while self.alive: + if G_STOP.is_set(): + raise KeyboardInterrupt + + if first_line or random.random() < G_LOG_PROB: + first_line = False + line = '' if G_IS_WIN else nonblock_read(tfile.name) + if line: + self.callback([line]) + + time_diff = time.time() - os.path.getmtime(tfile.name) + if time_diff > self.timeout: + raise CmdTimedOut(['Timeout!']) + + thrd.join(0.5) + + tfile.seek(0) + result = [line.decode('utf-8', 'replace').rstrip() for line in tfile] + + if self.proc.returncode != 0: + raise CmdFailed([''] + result) + + return result + except: + self.terminate() + raise + + def terminate(self): + """ Terminate process and cleanup. """ + if self.alive: + if G_IS_WIN: + os.kill(self.proc.pid, signal.SIGINT) + else: + os.killpg(self.proc.pid, signal.SIGTERM) + self.clean() + +class Plugin(object): + def __init__(self, name, args, buf_q, lock): + self.name = name + self.args = args + self.buf_q = buf_q + self.lock = lock + self.tag = args.get('tag', 0) + + def manage(self): + try: + if os.path.exists(self.args['dir']): + self.update() + else: + self.install() + with self.lock: + thread_vim_command("let s:update.new['{0}'] = 1".format(self.name)) + except PlugError as exc: + self.write(Action.ERROR, self.name, exc.msg) + except KeyboardInterrupt: + G_STOP.set() + self.write(Action.ERROR, self.name, ['Interrupted!']) + except: + # Any exception except those above print stack trace + msg = 'Trace:\n{0}'.format(traceback.format_exc().rstrip()) + self.write(Action.ERROR, self.name, msg.split('\n')) + raise + + def install(self): + target = self.args['dir'] + if target[-1] == '\\': + target = target[0:-1] + + def clean(target): + def _clean(): + try: + shutil.rmtree(target) + except OSError: + pass + return _clean + + self.write(Action.INSTALL, self.name, ['Installing ...']) + callback = functools.partial(self.write, Action.INSTALL, self.name) + cmd = 'git clone {0} {1} {2} {3} 2>&1'.format( + '' if self.tag else G_CLONE_OPT, G_PROGRESS, self.args['uri'], + esc(target)) + com = Command(cmd, None, G_TIMEOUT, callback, clean(target)) + result = com.execute(G_RETRIES) + self.write(Action.DONE, self.name, result[-1:]) + + def repo_uri(self): + cmd = 'git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url' + command = Command(cmd, self.args['dir'], G_TIMEOUT,) + result = command.execute(G_RETRIES) + return result[-1] + + def update(self): + actual_uri = self.repo_uri() + expect_uri = self.args['uri'] + regex = re.compile(r'^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$') + ma = regex.match(actual_uri) + mb = regex.match(expect_uri) + if ma is None or mb is None or ma.groups() != mb.groups(): + msg = ['', + 'Invalid URI: {0}'.format(actual_uri), + 'Expected {0}'.format(expect_uri), + 'PlugClean required.'] + raise InvalidURI(msg) + + if G_PULL: + self.write(Action.UPDATE, self.name, ['Updating ...']) + callback = functools.partial(self.write, Action.UPDATE, self.name) + fetch_opt = '--depth 99999999' if self.tag and os.path.isfile(os.path.join(self.args['dir'], '.git/shallow')) else '' + cmd = 'git fetch {0} {1} 2>&1'.format(fetch_opt, G_PROGRESS) + com = Command(cmd, self.args['dir'], G_TIMEOUT, callback) + result = com.execute(G_RETRIES) + self.write(Action.DONE, self.name, result[-1:]) + else: + self.write(Action.DONE, self.name, ['Already installed']) + + def write(self, action, name, msg): + self.buf_q.put((action, name, msg)) + +class PlugThread(thr.Thread): + def __init__(self, tname, args): + super(PlugThread, self).__init__() + self.tname = tname + self.args = args + + def run(self): + thr.current_thread().name = self.tname + buf_q, work_q, lock = self.args + + try: + while not G_STOP.is_set(): + name, args = work_q.get_nowait() + plug = Plugin(name, args, buf_q, lock) + plug.manage() + work_q.task_done() + except queue.Empty: + pass + +class RefreshThread(thr.Thread): + def __init__(self, lock): + super(RefreshThread, self).__init__() + self.lock = lock + self.running = True + + def run(self): + while self.running: + with self.lock: + thread_vim_command('noautocmd normal! a') + time.sleep(0.33) + + def stop(self): + self.running = False + +if G_NVIM: + def thread_vim_command(cmd): + vim.session.threadsafe_call(lambda: vim.command(cmd)) +else: + def thread_vim_command(cmd): + vim.command(cmd) + +def esc(name): + return '"' + name.replace('"', '\"') + '"' + +def nonblock_read(fname): + """ Read a file with nonblock flag. Return the last line. """ + fread = os.open(fname, os.O_RDONLY | os.O_NONBLOCK) + buf = os.read(fread, 100000).decode('utf-8', 'replace') + os.close(fread) + + line = buf.rstrip('\r\n') + left = max(line.rfind('\r'), line.rfind('\n')) + if left != -1: + left += 1 + line = line[left:] + + return line + +def main(): + thr.current_thread().name = 'main' + nthreads = int(vim.eval('s:update.threads')) + plugs = vim.eval('s:update.todo') + mac_gui = vim.eval('s:mac_gui') == '1' + + lock = thr.Lock() + buf = Buffer(lock, len(plugs), G_PULL) + buf_q, work_q = queue.Queue(), queue.Queue() + for work in plugs.items(): + work_q.put(work) + + start_cnt = thr.active_count() + for num in range(nthreads): + tname = 'PlugT-{0:02}'.format(num) + thread = PlugThread(tname, (buf_q, work_q, lock)) + thread.start() + if mac_gui: + rthread = RefreshThread(lock) + rthread.start() + + while not buf_q.empty() or thr.active_count() != start_cnt: + try: + action, name, msg = buf_q.get(True, 0.25) + buf.write(action, name, ['OK'] if not msg else msg) + buf_q.task_done() + except queue.Empty: + pass + except KeyboardInterrupt: + G_STOP.set() + + if mac_gui: + rthread.stop() + rthread.join() + +main() +EOF +endfunction + +function! s:update_ruby() + ruby << EOF + module PlugStream + SEP = ["\r", "\n", nil] + def get_line + buffer = '' + loop do + char = readchar rescue return + if SEP.include? char.chr + buffer << $/ + break + else + buffer << char + end + end + buffer + end + end unless defined?(PlugStream) + + def esc arg + %["#{arg.gsub('"', '\"')}"] + end + + def killall pid + pids = [pid] + if /mswin|mingw|bccwin/ =~ RUBY_PLATFORM + pids.each { |pid| Process.kill 'INT', pid.to_i rescue nil } + else + unless `which pgrep 2> /dev/null`.empty? + children = pids + until children.empty? + children = children.map { |pid| + `pgrep -P #{pid}`.lines.map { |l| l.chomp } + }.flatten + pids += children + end + end + pids.each { |pid| Process.kill 'TERM', pid.to_i rescue nil } + end + end + + def compare_git_uri a, b + regex = %r{^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$} + regex.match(a).to_a.drop(1) == regex.match(b).to_a.drop(1) + end + + require 'thread' + require 'fileutils' + require 'timeout' + running = true + iswin = VIM::evaluate('s:is_win').to_i == 1 + pull = VIM::evaluate('s:update.pull').to_i == 1 + base = VIM::evaluate('g:plug_home') + all = VIM::evaluate('s:update.todo') + limit = VIM::evaluate('get(g:, "plug_timeout", 60)') + tries = VIM::evaluate('get(g:, "plug_retries", 2)') + 1 + nthr = VIM::evaluate('s:update.threads').to_i + maxy = VIM::evaluate('winheight(".")').to_i + vim7 = VIM::evaluate('v:version').to_i <= 703 && RUBY_PLATFORM =~ /darwin/ + cd = iswin ? 'cd /d' : 'cd' + tot = VIM::evaluate('len(s:update.todo)') || 0 + bar = '' + skip = 'Already installed' + mtx = Mutex.new + take1 = proc { mtx.synchronize { running && all.shift } } + logh = proc { + cnt = bar.length + $curbuf[1] = "#{pull ? 'Updating' : 'Installing'} plugins (#{cnt}/#{tot})" + $curbuf[2] = '[' + bar.ljust(tot) + ']' + VIM::command('normal! 2G') + VIM::command('redraw') + } + where = proc { |name| (1..($curbuf.length)).find { |l| $curbuf[l] =~ /^[-+x*] #{name}:/ } } + log = proc { |name, result, type| + mtx.synchronize do + ing = ![true, false].include?(type) + bar += type ? '=' : 'x' unless ing + b = case type + when :install then '+' when :update then '*' + when true, nil then '-' else + VIM::command("call add(s:update.errors, '#{name}')") + 'x' + end + result = + if type || type.nil? + ["#{b} #{name}: #{result.lines.to_a.last || 'OK'}"] + elsif result =~ /^Interrupted|^Timeout/ + ["#{b} #{name}: #{result}"] + else + ["#{b} #{name}"] + result.lines.map { |l| " " << l } + end + if lnum = where.call(name) + $curbuf.delete lnum + lnum = 4 if ing && lnum > maxy + end + result.each_with_index do |line, offset| + $curbuf.append((lnum || 4) - 1 + offset, line.gsub(/\e\[./, '').chomp) + end + logh.call + end + } + bt = proc { |cmd, name, type, cleanup| + tried = timeout = 0 + begin + tried += 1 + timeout += limit + fd = nil + data = '' + if iswin + Timeout::timeout(timeout) do + tmp = VIM::evaluate('tempname()') + system("(#{cmd}) > #{tmp}") + data = File.read(tmp).chomp + File.unlink tmp rescue nil + end + else + fd = IO.popen(cmd).extend(PlugStream) + first_line = true + log_prob = 1.0 / nthr + while line = Timeout::timeout(timeout) { fd.get_line } + data << line + log.call name, line.chomp, type if name && (first_line || rand < log_prob) + first_line = false + end + fd.close + end + [$? == 0, data.chomp] + rescue Timeout::Error, Interrupt => e + if fd && !fd.closed? + killall fd.pid + fd.close + end + cleanup.call if cleanup + if e.is_a?(Timeout::Error) && tried < tries + 3.downto(1) do |countdown| + s = countdown > 1 ? 's' : '' + log.call name, "Timeout. Will retry in #{countdown} second#{s} ...", type + sleep 1 + end + log.call name, 'Retrying ...', type + retry + end + [false, e.is_a?(Interrupt) ? "Interrupted!" : "Timeout!"] + end + } + main = Thread.current + threads = [] + watcher = Thread.new { + if vim7 + while VIM::evaluate('getchar(1)') + sleep 0.1 + end + else + require 'io/console' # >= Ruby 1.9 + nil until IO.console.getch == 3.chr + end + mtx.synchronize do + running = false + threads.each { |t| t.raise Interrupt } unless vim7 + end + threads.each { |t| t.join rescue nil } + main.kill + } + refresh = Thread.new { + while true + mtx.synchronize do + break unless running + VIM::command('noautocmd normal! a') + end + sleep 0.2 + end + } if VIM::evaluate('s:mac_gui') == 1 + + clone_opt = VIM::evaluate('s:clone_opt').join(' ') + progress = VIM::evaluate('s:progress_opt(1)') + nthr.times do + mtx.synchronize do + threads << Thread.new { + while pair = take1.call + name = pair.first + dir, uri, tag = pair.last.values_at *%w[dir uri tag] + exists = File.directory? dir + ok, result = + if exists + chdir = "#{cd} #{iswin ? dir : esc(dir)}" + ret, data = bt.call "#{chdir} && git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url", nil, nil, nil + current_uri = data.lines.to_a.last + if !ret + if data =~ /^Interrupted|^Timeout/ + [false, data] + else + [false, [data.chomp, "PlugClean required."].join($/)] + end + elsif !compare_git_uri(current_uri, uri) + [false, ["Invalid URI: #{current_uri}", + "Expected: #{uri}", + "PlugClean required."].join($/)] + else + if pull + log.call name, 'Updating ...', :update + fetch_opt = (tag && File.exist?(File.join(dir, '.git/shallow'))) ? '--depth 99999999' : '' + bt.call "#{chdir} && git fetch #{fetch_opt} #{progress} 2>&1", name, :update, nil + else + [true, skip] + end + end + else + d = esc dir.sub(%r{[\\/]+$}, '') + log.call name, 'Installing ...', :install + bt.call "git clone #{clone_opt unless tag} #{progress} #{uri} #{d} 2>&1", name, :install, proc { + FileUtils.rm_rf dir + } + end + mtx.synchronize { VIM::command("let s:update.new['#{name}'] = 1") } if !exists && ok + log.call name, result, ok + end + } if running + end + end + threads.each { |t| t.join rescue nil } + logh.call + refresh.kill if refresh + watcher.kill +EOF +endfunction + +function! s:shellesc_cmd(arg, script) + let escaped = substitute('"'.a:arg.'"', '[&|<>()@^!"]', '^&', 'g') + return substitute(escaped, '%', (a:script ? '%' : '^') . '&', 'g') +endfunction + +function! s:shellesc_ps1(arg) + return "'".substitute(escape(a:arg, '\"'), "'", "''", 'g')."'" +endfunction + +function! s:shellesc_sh(arg) + return "'".substitute(a:arg, "'", "'\\\\''", 'g')."'" +endfunction + +" Escape the shell argument based on the shell. +" Vim and Neovim's shellescape() are insufficient. +" 1. shellslash determines whether to use single/double quotes. +" Double-quote escaping is fragile for cmd.exe. +" 2. It does not work for powershell. +" 3. It does not work for *sh shells if the command is executed +" via cmd.exe (ie. cmd.exe /c sh -c command command_args) +" 4. It does not support batchfile syntax. +" +" Accepts an optional dictionary with the following keys: +" - shell: same as Vim/Neovim 'shell' option. +" If unset, fallback to 'cmd.exe' on Windows or 'sh'. +" - script: If truthy and shell is cmd.exe, escape for batchfile syntax. +function! plug#shellescape(arg, ...) + if a:arg =~# '^[A-Za-z0-9_/:.-]\+$' + return a:arg + endif + let opts = a:0 > 0 && type(a:1) == s:TYPE.dict ? a:1 : {} + let shell = get(opts, 'shell', s:is_win ? 'cmd.exe' : 'sh') + let script = get(opts, 'script', 1) + if shell =~# 'cmd\(\.exe\)\?$' + return s:shellesc_cmd(a:arg, script) + elseif shell =~# 'powershell\(\.exe\)\?$' || shell =~# 'pwsh$' + return s:shellesc_ps1(a:arg) + endif + return s:shellesc_sh(a:arg) +endfunction + +function! s:glob_dir(path) + return map(filter(s:glob(a:path, '**'), 'isdirectory(v:val)'), 's:dirpath(v:val)') +endfunction + +function! s:progress_bar(line, bar, total) + call setline(a:line, '[' . s:lpad(a:bar, a:total) . ']') +endfunction + +function! s:compare_git_uri(a, b) + " See `git help clone' + " https:// [user@] github.com[:port] / junegunn/vim-plug [.git] + " [git@] github.com[:port] : junegunn/vim-plug [.git] + " file:// / junegunn/vim-plug [/] + " / junegunn/vim-plug [/] + let pat = '^\%(\w\+://\)\='.'\%([^@/]*@\)\='.'\([^:/]*\%(:[0-9]*\)\=\)'.'[:/]'.'\(.\{-}\)'.'\%(\.git\)\=/\?$' + let ma = matchlist(a:a, pat) + let mb = matchlist(a:b, pat) + return ma[1:2] ==# mb[1:2] +endfunction + +function! s:format_message(bullet, name, message) + if a:bullet != 'x' + return [printf('%s %s: %s', a:bullet, a:name, s:lastline(a:message))] + else + let lines = map(s:lines(a:message), '" ".v:val') + return extend([printf('x %s:', a:name)], lines) + endif +endfunction + +function! s:with_cd(cmd, dir, ...) + let script = a:0 > 0 ? a:1 : 1 + return printf('cd%s %s && %s', s:is_win ? ' /d' : '', plug#shellescape(a:dir, {'script': script}), a:cmd) +endfunction + +function! s:system(cmd, ...) + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(1) + if type(a:cmd) == s:TYPE.list + " Neovim's system() supports list argument to bypass the shell + " but it cannot set the working directory for the command. + " Assume that the command does not rely on the shell. + if has('nvim') && a:0 == 0 + return system(a:cmd) + endif + let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"shell": &shell, "script": 0})')) + if &shell =~# 'powershell\(\.exe\)\?$' + let cmd = '& ' . cmd + endif + else + let cmd = a:cmd + endif + if a:0 > 0 + let cmd = s:with_cd(cmd, a:1, type(a:cmd) != s:TYPE.list) + endif + if s:is_win && type(a:cmd) != s:TYPE.list + let [batchfile, cmd] = s:batchfile(cmd) + endif + return system(cmd) + finally + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry +endfunction + +function! s:system_chomp(...) + let ret = call('s:system', a:000) + return v:shell_error ? '' : substitute(ret, '\n$', '', '') +endfunction + +function! s:git_validate(spec, check_branch) + let err = '' + if isdirectory(a:spec.dir) + let result = [s:git_local_branch(a:spec.dir), s:git_origin_url(a:spec.dir)] + let remote = result[-1] + if empty(remote) + let err = join([remote, 'PlugClean required.'], "\n") + elseif !s:compare_git_uri(remote, a:spec.uri) + let err = join(['Invalid URI: '.remote, + \ 'Expected: '.a:spec.uri, + \ 'PlugClean required.'], "\n") + elseif a:check_branch && has_key(a:spec, 'commit') + let sha = s:git_revision(a:spec.dir) + if empty(sha) + let err = join(add(result, 'PlugClean required.'), "\n") + elseif !s:hash_match(sha, a:spec.commit) + let err = join([printf('Invalid HEAD (expected: %s, actual: %s)', + \ a:spec.commit[:6], sha[:6]), + \ 'PlugUpdate required.'], "\n") + endif + elseif a:check_branch + let current_branch = result[0] + " Check tag + let origin_branch = s:git_origin_branch(a:spec) + if has_key(a:spec, 'tag') + let tag = s:system_chomp('git describe --exact-match --tags HEAD 2>&1', a:spec.dir) + if a:spec.tag !=# tag && a:spec.tag !~ '\*' + let err = printf('Invalid tag: %s (expected: %s). Try PlugUpdate.', + \ (empty(tag) ? 'N/A' : tag), a:spec.tag) + endif + " Check branch + elseif origin_branch !=# current_branch + let err = printf('Invalid branch: %s (expected: %s). Try PlugUpdate.', + \ current_branch, origin_branch) + endif + if empty(err) + let [ahead, behind] = split(s:lastline(s:system([ + \ 'git', 'rev-list', '--count', '--left-right', + \ printf('HEAD...origin/%s', origin_branch) + \ ], a:spec.dir)), '\t') + if !v:shell_error && ahead + if behind + " Only mention PlugClean if diverged, otherwise it's likely to be + " pushable (and probably not that messed up). + let err = printf( + \ "Diverged from origin/%s (%d commit(s) ahead and %d commit(s) behind!\n" + \ .'Backup local changes and run PlugClean and PlugUpdate to reinstall it.', origin_branch, ahead, behind) + else + let err = printf("Ahead of origin/%s by %d commit(s).\n" + \ .'Cannot update until local changes are pushed.', + \ origin_branch, ahead) + endif + endif + endif + endif + else + let err = 'Not found' + endif + return [err, err =~# 'PlugClean'] +endfunction + +function! s:rm_rf(dir) + if isdirectory(a:dir) + return s:system(s:is_win + \ ? 'rmdir /S /Q '.plug#shellescape(a:dir) + \ : ['rm', '-rf', a:dir]) + endif +endfunction + +function! s:clean(force) + call s:prepare() + call append(0, 'Searching for invalid plugins in '.g:plug_home) + call append(1, '') + + " List of valid directories + let dirs = [] + let errs = {} + let [cnt, total] = [0, len(g:plugs)] + for [name, spec] in items(g:plugs) + if !s:is_managed(name) + call add(dirs, spec.dir) + else + let [err, clean] = s:git_validate(spec, 1) + if clean + let errs[spec.dir] = s:lines(err)[0] + else + call add(dirs, spec.dir) + endif + endif + let cnt += 1 + call s:progress_bar(2, repeat('=', cnt), total) + normal! 2G + redraw + endfor + + let allowed = {} + for dir in dirs + let allowed[s:dirpath(s:plug_fnamemodify(dir, ':h:h'))] = 1 + let allowed[dir] = 1 + for child in s:glob_dir(dir) + let allowed[child] = 1 + endfor + endfor + + let todo = [] + let found = sort(s:glob_dir(g:plug_home)) + while !empty(found) + let f = remove(found, 0) + if !has_key(allowed, f) && isdirectory(f) + call add(todo, f) + call append(line('$'), '- ' . f) + if has_key(errs, f) + call append(line('$'), ' ' . errs[f]) + endif + let found = filter(found, 'stridx(v:val, f) != 0') + end + endwhile + + 4 + redraw + if empty(todo) + call append(line('$'), 'Already clean.') + else + let s:clean_count = 0 + call append(3, ['Directories to delete:', '']) + redraw! + if a:force || s:ask_no_interrupt('Delete all directories?') + call s:delete([6, line('$')], 1) + else + call setline(4, 'Cancelled.') + nnoremap d :set opfunc=delete_opg@ + nmap dd d_ + xnoremap d :call delete_op(visualmode(), 1) + echo 'Delete the lines (d{motion}) to delete the corresponding directories' + endif + endif + 4 + setlocal nomodifiable +endfunction + +function! s:delete_op(type, ...) + call s:delete(a:0 ? [line("'<"), line("'>")] : [line("'["), line("']")], 0) +endfunction + +function! s:delete(range, force) + let [l1, l2] = a:range + let force = a:force + let err_count = 0 + while l1 <= l2 + let line = getline(l1) + if line =~ '^- ' && isdirectory(line[2:]) + execute l1 + redraw! + let answer = force ? 1 : s:ask('Delete '.line[2:].'?', 1) + let force = force || answer > 1 + if answer + let err = s:rm_rf(line[2:]) + setlocal modifiable + if empty(err) + call setline(l1, '~'.line[1:]) + let s:clean_count += 1 + else + delete _ + call append(l1 - 1, s:format_message('x', line[1:], err)) + let l2 += len(s:lines(err)) + let err_count += 1 + endif + let msg = printf('Removed %d directories.', s:clean_count) + if err_count > 0 + let msg .= printf(' Failed to remove %d directories.', err_count) + endif + call setline(4, msg) + setlocal nomodifiable + endif + endif + let l1 += 1 + endwhile +endfunction + +function! s:upgrade() + echo 'Downloading the latest version of vim-plug' + redraw + let tmp = s:plug_tempname() + let new = tmp . '/plug.vim' + + try + let out = s:system(['git', 'clone', '--depth', '1', s:plug_src, tmp]) + if v:shell_error + return s:err('Error upgrading vim-plug: '. out) + endif + + if readfile(s:me) ==# readfile(new) + echo 'vim-plug is already up-to-date' + return 0 + else + call rename(s:me, s:me . '.old') + call rename(new, s:me) + unlet g:loaded_plug + echo 'vim-plug has been upgraded' + return 1 + endif + finally + silent! call s:rm_rf(tmp) + endtry +endfunction + +function! s:upgrade_specs() + for spec in values(g:plugs) + let spec.frozen = get(spec, 'frozen', 0) + endfor +endfunction + +function! s:status() + call s:prepare() + call append(0, 'Checking plugins') + call append(1, '') + + let ecnt = 0 + let unloaded = 0 + let [cnt, total] = [0, len(g:plugs)] + for [name, spec] in items(g:plugs) + let is_dir = isdirectory(spec.dir) + if has_key(spec, 'uri') + if is_dir + let [err, _] = s:git_validate(spec, 1) + let [valid, msg] = [empty(err), empty(err) ? 'OK' : err] + else + let [valid, msg] = [0, 'Not found. Try PlugInstall.'] + endif + else + if is_dir + let [valid, msg] = [1, 'OK'] + else + let [valid, msg] = [0, 'Not found.'] + endif + endif + let cnt += 1 + let ecnt += !valid + " `s:loaded` entry can be missing if PlugUpgraded + if is_dir && get(s:loaded, name, -1) == 0 + let unloaded = 1 + let msg .= ' (not loaded)' + endif + call s:progress_bar(2, repeat('=', cnt), total) + call append(3, s:format_message(valid ? '-' : 'x', name, msg)) + normal! 2G + redraw + endfor + call setline(1, 'Finished. '.ecnt.' error(s).') + normal! gg + setlocal nomodifiable + if unloaded + echo "Press 'L' on each line to load plugin, or 'U' to update" + nnoremap L :call status_load(line('.')) + xnoremap L :call status_load(line('.')) + end +endfunction + +function! s:extract_name(str, prefix, suffix) + return matchstr(a:str, '^'.a:prefix.' \zs[^:]\+\ze:.*'.a:suffix.'$') +endfunction + +function! s:status_load(lnum) + let line = getline(a:lnum) + let name = s:extract_name(line, '-', '(not loaded)') + if !empty(name) + call plug#load(name) + setlocal modifiable + call setline(a:lnum, substitute(line, ' (not loaded)$', '', '')) + setlocal nomodifiable + endif +endfunction + +function! s:status_update() range + let lines = getline(a:firstline, a:lastline) + let names = filter(map(lines, 's:extract_name(v:val, "[x-]", "")'), '!empty(v:val)') + if !empty(names) + echo + execute 'PlugUpdate' join(names) + endif +endfunction + +function! s:is_preview_window_open() + silent! wincmd P + if &previewwindow + wincmd p + return 1 + endif +endfunction + +function! s:find_name(lnum) + for lnum in reverse(range(1, a:lnum)) + let line = getline(lnum) + if empty(line) + return '' + endif + let name = s:extract_name(line, '-', '') + if !empty(name) + return name + endif + endfor + return '' +endfunction + +function! s:preview_commit() + if b:plug_preview < 0 + let b:plug_preview = !s:is_preview_window_open() + endif + + let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}') + if empty(sha) + return + endif + + let name = s:find_name(line('.')) + if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir) + return + endif + + if exists('g:plug_pwindow') && !s:is_preview_window_open() + execute g:plug_pwindow + execute 'e' sha + else + execute 'pedit' sha + wincmd P + endif + setlocal previewwindow filetype=git buftype=nofile nobuflisted modifiable + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(1) + let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && git show --no-color --pretty=medium '.sha + if s:is_win + let [batchfile, cmd] = s:batchfile(cmd) + endif + execute 'silent %!' cmd + finally + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry + setlocal nomodifiable + nnoremap q :q + wincmd p +endfunction + +function! s:section(flags) + call search('\(^[x-] \)\@<=[^:]\+:', a:flags) +endfunction + +function! s:format_git_log(line) + let indent = ' ' + let tokens = split(a:line, nr2char(1)) + if len(tokens) != 5 + return indent.substitute(a:line, '\s*$', '', '') + endif + let [graph, sha, refs, subject, date] = tokens + let tag = matchstr(refs, 'tag: [^,)]\+') + let tag = empty(tag) ? ' ' : ' ('.tag.') ' + return printf('%s%s%s%s%s (%s)', indent, graph, sha, tag, subject, date) +endfunction + +function! s:append_ul(lnum, text) + call append(a:lnum, ['', a:text, repeat('-', len(a:text))]) +endfunction + +function! s:diff() + call s:prepare() + call append(0, ['Collecting changes ...', '']) + let cnts = [0, 0] + let bar = '' + let total = filter(copy(g:plugs), 's:is_managed(v:key) && isdirectory(v:val.dir)') + call s:progress_bar(2, bar, len(total)) + for origin in [1, 0] + let plugs = reverse(sort(items(filter(copy(total), (origin ? '' : '!').'(has_key(v:val, "commit") || has_key(v:val, "tag"))')))) + if empty(plugs) + continue + endif + call s:append_ul(2, origin ? 'Pending updates:' : 'Last update:') + for [k, v] in plugs + let branch = s:git_origin_branch(v) + if len(branch) + let range = origin ? '..origin/'.branch : 'HEAD@{1}..' + let cmd = ['git', 'log', '--graph', '--color=never'] + if s:git_version_requirement(2, 10, 0) + call add(cmd, '--no-show-signature') + endif + call extend(cmd, ['--pretty=format:%x01%h%x01%d%x01%s%x01%cr', range]) + if has_key(v, 'rtp') + call extend(cmd, ['--', v.rtp]) + endif + let diff = s:system_chomp(cmd, v.dir) + if !empty(diff) + let ref = has_key(v, 'tag') ? (' (tag: '.v.tag.')') : has_key(v, 'commit') ? (' '.v.commit) : '' + call append(5, extend(['', '- '.k.':'.ref], map(s:lines(diff), 's:format_git_log(v:val)'))) + let cnts[origin] += 1 + endif + endif + let bar .= '=' + call s:progress_bar(2, bar, len(total)) + normal! 2G + redraw + endfor + if !cnts[origin] + call append(5, ['', 'N/A']) + endif + endfor + call setline(1, printf('%d plugin(s) updated.', cnts[0]) + \ . (cnts[1] ? printf(' %d plugin(s) have pending updates.', cnts[1]) : '')) + + if cnts[0] || cnts[1] + nnoremap (plug-preview) :silent! call preview_commit() + if empty(maparg("\", 'n')) + nmap (plug-preview) + endif + if empty(maparg('o', 'n')) + nmap o (plug-preview) + endif + endif + if cnts[0] + nnoremap X :call revert() + echo "Press 'X' on each block to revert the update" + endif + normal! gg + setlocal nomodifiable +endfunction + +function! s:revert() + if search('^Pending updates', 'bnW') + return + endif + + let name = s:find_name(line('.')) + if empty(name) || !has_key(g:plugs, name) || + \ input(printf('Revert the update of %s? (y/N) ', name)) !~? '^y' + return + endif + + call s:system('git reset --hard HEAD@{1} && git checkout '.plug#shellescape(g:plugs[name].branch).' --', g:plugs[name].dir) + setlocal modifiable + normal! "_dap + setlocal nomodifiable + echo 'Reverted' +endfunction + +function! s:snapshot(force, ...) abort + call s:prepare() + setf vim + call append(0, ['" Generated by vim-plug', + \ '" '.strftime("%c"), + \ '" :source this file in vim to restore the snapshot', + \ '" or execute: vim -S snapshot.vim', + \ '', '', 'PlugUpdate!']) + 1 + let anchor = line('$') - 3 + let names = sort(keys(filter(copy(g:plugs), + \'has_key(v:val, "uri") && !has_key(v:val, "commit") && isdirectory(v:val.dir)'))) + for name in reverse(names) + let sha = s:git_revision(g:plugs[name].dir) + if !empty(sha) + call append(anchor, printf("silent! let g:plugs['%s'].commit = '%s'", name, sha)) + redraw + endif + endfor + + if a:0 > 0 + let fn = s:plug_expand(a:1) + if filereadable(fn) && !(a:force || s:ask(a:1.' already exists. Overwrite?')) + return + endif + call writefile(getline(1, '$'), fn) + echo 'Saved as '.a:1 + silent execute 'e' s:esc(fn) + setf vim + endif +endfunction + +function! s:split_rtp() + return split(&rtp, '\\\@`-mappings | +"| `for` | On-demand loading: File types | +"| `frozen` | Do not update unless explicitly specified | +" +" More information: https://github.com/junegunn/vim-plug +" +" +" Copyright (c) 2017 Junegunn Choi +" +" MIT License +" +" Permission is hereby granted, free of charge, to any person obtaining +" a copy of this software and associated documentation files (the +" "Software"), to deal in the Software without restriction, including +" without limitation the rights to use, copy, modify, merge, publish, +" distribute, sublicense, and/or sell copies of the Software, and to +" permit persons to whom the Software is furnished to do so, subject to +" the following conditions: +" +" The above copyright notice and this permission notice shall be +" included in all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +if exists('g:loaded_plug') + finish +endif +let g:loaded_plug = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let s:plug_src = 'https://github.com/junegunn/vim-plug.git' +let s:plug_tab = get(s:, 'plug_tab', -1) +let s:plug_buf = get(s:, 'plug_buf', -1) +let s:mac_gui = has('gui_macvim') && has('gui_running') +let s:is_win = has('win32') +let s:nvim = has('nvim-0.2') || (has('nvim') && exists('*jobwait') && !s:is_win) +let s:vim8 = has('patch-8.0.0039') && exists('*job_start') +if s:is_win && &shellslash + set noshellslash + let s:me = resolve(expand(':p')) + set shellslash +else + let s:me = resolve(expand(':p')) +endif +let s:base_spec = { 'branch': '', 'frozen': 0 } +let s:TYPE = { +\ 'string': type(''), +\ 'list': type([]), +\ 'dict': type({}), +\ 'funcref': type(function('call')) +\ } +let s:loaded = get(s:, 'loaded', {}) +let s:triggers = get(s:, 'triggers', {}) + +function! s:isabsolute(dir) abort + return a:dir =~# '^/' || (has('win32') && a:dir =~? '^\%(\\\|[A-Z]:\)') +endfunction + +function! s:git_dir(dir) abort + let gitdir = s:trim(a:dir) . '/.git' + if isdirectory(gitdir) + return gitdir + endif + if !filereadable(gitdir) + return '' + endif + let gitdir = matchstr(get(readfile(gitdir), 0, ''), '^gitdir: \zs.*') + if len(gitdir) && !s:isabsolute(gitdir) + let gitdir = a:dir . '/' . gitdir + endif + return isdirectory(gitdir) ? gitdir : '' +endfunction + +function! s:git_origin_url(dir) abort + let gitdir = s:git_dir(a:dir) + let config = gitdir . '/config' + if empty(gitdir) || !filereadable(config) + return '' + endif + return matchstr(join(readfile(config)), '\[remote "origin"\].\{-}url\s*=\s*\zs\S*\ze') +endfunction + +function! s:git_revision(dir) abort + let gitdir = s:git_dir(a:dir) + let head = gitdir . '/HEAD' + if empty(gitdir) || !filereadable(head) + return '' + endif + + let line = get(readfile(head), 0, '') + let ref = matchstr(line, '^ref: \zs.*') + if empty(ref) + return line + endif + + if filereadable(gitdir . '/' . ref) + return get(readfile(gitdir . '/' . ref), 0, '') + endif + + if filereadable(gitdir . '/packed-refs') + for line in readfile(gitdir . '/packed-refs') + if line =~# ' ' . ref + return matchstr(line, '^[0-9a-f]*') + endif + endfor + endif + + return '' +endfunction + +function! s:git_local_branch(dir) abort + let gitdir = s:git_dir(a:dir) + let head = gitdir . '/HEAD' + if empty(gitdir) || !filereadable(head) + return '' + endif + let branch = matchstr(get(readfile(head), 0, ''), '^ref: refs/heads/\zs.*') + return len(branch) ? branch : 'HEAD' +endfunction + +function! s:git_origin_branch(spec) + if len(a:spec.branch) + return a:spec.branch + endif + + " The file may not be present if this is a local repository + let gitdir = s:git_dir(a:spec.dir) + let origin_head = gitdir.'/refs/remotes/origin/HEAD' + if len(gitdir) && filereadable(origin_head) + return matchstr(get(readfile(origin_head), 0, ''), + \ '^ref: refs/remotes/origin/\zs.*') + endif + + " The command may not return the name of a branch in detached HEAD state + let result = s:lines(s:system('git symbolic-ref --short HEAD', a:spec.dir)) + return v:shell_error ? '' : result[-1] +endfunction + +if s:is_win + function! s:plug_call(fn, ...) + let shellslash = &shellslash + try + set noshellslash + return call(a:fn, a:000) + finally + let &shellslash = shellslash + endtry + endfunction +else + function! s:plug_call(fn, ...) + return call(a:fn, a:000) + endfunction +endif + +function! s:plug_getcwd() + return s:plug_call('getcwd') +endfunction + +function! s:plug_fnamemodify(fname, mods) + return s:plug_call('fnamemodify', a:fname, a:mods) +endfunction + +function! s:plug_expand(fmt) + return s:plug_call('expand', a:fmt, 1) +endfunction + +function! s:plug_tempname() + return s:plug_call('tempname') +endfunction + +function! plug#begin(...) + if a:0 > 0 + let s:plug_home_org = a:1 + let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p')) + elseif exists('g:plug_home') + let home = s:path(g:plug_home) + elseif !empty(&rtp) + let home = s:path(split(&rtp, ',')[0]) . '/plugged' + else + return s:err('Unable to determine plug home. Try calling plug#begin() with a path argument.') + endif + if s:plug_fnamemodify(home, ':t') ==# 'plugin' && s:plug_fnamemodify(home, ':h') ==# s:first_rtp + return s:err('Invalid plug home. '.home.' is a standard Vim runtime path and is not allowed.') + endif + + let g:plug_home = home + let g:plugs = {} + let g:plugs_order = [] + let s:triggers = {} + + call s:define_commands() + return 1 +endfunction + +function! s:define_commands() + command! -nargs=+ -bar Plug call plug#() + if !executable('git') + return s:err('`git` executable not found. Most commands will not be available. To suppress this message, prepend `silent!` to `call plug#begin(...)`.') + endif + if has('win32') + \ && &shellslash + \ && (&shell =~# 'cmd\(\.exe\)\?$' || &shell =~# 'powershell\(\.exe\)\?$') + return s:err('vim-plug does not support shell, ' . &shell . ', when shellslash is set.') + endif + if !has('nvim') + \ && (has('win32') || has('win32unix')) + \ && !has('multi_byte') + return s:err('Vim needs +multi_byte feature on Windows to run shell commands. Enable +iconv for best results.') + endif + command! -nargs=* -bar -bang -complete=customlist,s:names PlugInstall call s:install(0, []) + command! -nargs=* -bar -bang -complete=customlist,s:names PlugUpdate call s:update(0, []) + command! -nargs=0 -bar -bang PlugClean call s:clean(0) + command! -nargs=0 -bar PlugUpgrade if s:upgrade() | execute 'source' s:esc(s:me) | endif + command! -nargs=0 -bar PlugStatus call s:status() + command! -nargs=0 -bar PlugDiff call s:diff() + command! -nargs=? -bar -bang -complete=file PlugSnapshot call s:snapshot(0, ) +endfunction + +function! s:to_a(v) + return type(a:v) == s:TYPE.list ? a:v : [a:v] +endfunction + +function! s:to_s(v) + return type(a:v) == s:TYPE.string ? a:v : join(a:v, "\n") . "\n" +endfunction + +function! s:glob(from, pattern) + return s:lines(globpath(a:from, a:pattern)) +endfunction + +function! s:source(from, ...) + let found = 0 + for pattern in a:000 + for vim in s:glob(a:from, pattern) + execute 'source' s:esc(vim) + let found = 1 + endfor + endfor + return found +endfunction + +function! s:assoc(dict, key, val) + let a:dict[a:key] = add(get(a:dict, a:key, []), a:val) +endfunction + +function! s:ask(message, ...) + call inputsave() + echohl WarningMsg + let answer = input(a:message.(a:0 ? ' (y/N/a) ' : ' (y/N) ')) + echohl None + call inputrestore() + echo "\r" + return (a:0 && answer =~? '^a') ? 2 : (answer =~? '^y') ? 1 : 0 +endfunction + +function! s:ask_no_interrupt(...) + try + return call('s:ask', a:000) + catch + return 0 + endtry +endfunction + +function! s:lazy(plug, opt) + return has_key(a:plug, a:opt) && + \ (empty(s:to_a(a:plug[a:opt])) || + \ !isdirectory(a:plug.dir) || + \ len(s:glob(s:rtp(a:plug), 'plugin')) || + \ len(s:glob(s:rtp(a:plug), 'after/plugin'))) +endfunction + +function! plug#end() + if !exists('g:plugs') + return s:err('plug#end() called without calling plug#begin() first') + endif + + if exists('#PlugLOD') + augroup PlugLOD + autocmd! + augroup END + augroup! PlugLOD + endif + let lod = { 'ft': {}, 'map': {}, 'cmd': {} } + + if exists('g:did_load_filetypes') + filetype off + endif + for name in g:plugs_order + if !has_key(g:plugs, name) + continue + endif + let plug = g:plugs[name] + if get(s:loaded, name, 0) || !s:lazy(plug, 'on') && !s:lazy(plug, 'for') + let s:loaded[name] = 1 + continue + endif + + if has_key(plug, 'on') + let s:triggers[name] = { 'map': [], 'cmd': [] } + for cmd in s:to_a(plug.on) + if cmd =~? '^.\+' + if empty(mapcheck(cmd)) && empty(mapcheck(cmd, 'i')) + call s:assoc(lod.map, cmd, name) + endif + call add(s:triggers[name].map, cmd) + elseif cmd =~# '^[A-Z]' + let cmd = substitute(cmd, '!*$', '', '') + if exists(':'.cmd) != 2 + call s:assoc(lod.cmd, cmd, name) + endif + call add(s:triggers[name].cmd, cmd) + else + call s:err('Invalid `on` option: '.cmd. + \ '. Should start with an uppercase letter or ``.') + endif + endfor + endif + + if has_key(plug, 'for') + let types = s:to_a(plug.for) + if !empty(types) + augroup filetypedetect + call s:source(s:rtp(plug), 'ftdetect/**/*.vim', 'after/ftdetect/**/*.vim') + augroup END + endif + for type in types + call s:assoc(lod.ft, type, name) + endfor + endif + endfor + + for [cmd, names] in items(lod.cmd) + execute printf( + \ 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "", , , , %s)', + \ cmd, string(cmd), string(names)) + endfor + + for [map, names] in items(lod.map) + for [mode, map_prefix, key_prefix] in + \ [['i', '', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']] + execute printf( + \ '%snoremap %s %s:call lod_map(%s, %s, %s, "%s")', + \ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix) + endfor + endfor + + for [ft, names] in items(lod.ft) + augroup PlugLOD + execute printf('autocmd FileType %s call lod_ft(%s, %s)', + \ ft, string(ft), string(names)) + augroup END + endfor + + call s:reorg_rtp() + filetype plugin indent on + if has('vim_starting') + if has('syntax') && !exists('g:syntax_on') + syntax enable + end + else + call s:reload_plugins() + endif +endfunction + +function! s:loaded_names() + return filter(copy(g:plugs_order), 'get(s:loaded, v:val, 0)') +endfunction + +function! s:load_plugin(spec) + call s:source(s:rtp(a:spec), 'plugin/**/*.vim', 'after/plugin/**/*.vim') +endfunction + +function! s:reload_plugins() + for name in s:loaded_names() + call s:load_plugin(g:plugs[name]) + endfor +endfunction + +function! s:trim(str) + return substitute(a:str, '[\/]\+$', '', '') +endfunction + +function! s:version_requirement(val, min) + for idx in range(0, len(a:min) - 1) + let v = get(a:val, idx, 0) + if v < a:min[idx] | return 0 + elseif v > a:min[idx] | return 1 + endif + endfor + return 1 +endfunction + +function! s:git_version_requirement(...) + if !exists('s:git_version') + let s:git_version = map(split(split(s:system(['git', '--version']))[2], '\.'), 'str2nr(v:val)') + endif + return s:version_requirement(s:git_version, a:000) +endfunction + +function! s:progress_opt(base) + return a:base && !s:is_win && + \ s:git_version_requirement(1, 7, 1) ? '--progress' : '' +endfunction + +function! s:rtp(spec) + return s:path(a:spec.dir . get(a:spec, 'rtp', '')) +endfunction + +if s:is_win + function! s:path(path) + return s:trim(substitute(a:path, '/', '\', 'g')) + endfunction + + function! s:dirpath(path) + return s:path(a:path) . '\' + endfunction + + function! s:is_local_plug(repo) + return a:repo =~? '^[a-z]:\|^[%~]' + endfunction + + " Copied from fzf + function! s:wrap_cmds(cmds) + let cmds = [ + \ '@echo off', + \ 'setlocal enabledelayedexpansion'] + \ + (type(a:cmds) == type([]) ? a:cmds : [a:cmds]) + \ + ['endlocal'] + if has('iconv') + if !exists('s:codepage') + let s:codepage = libcallnr('kernel32.dll', 'GetACP', 0) + endif + return map(cmds, printf('iconv(v:val."\r", "%s", "cp%d")', &encoding, s:codepage)) + endif + return map(cmds, 'v:val."\r"') + endfunction + + function! s:batchfile(cmd) + let batchfile = s:plug_tempname().'.bat' + call writefile(s:wrap_cmds(a:cmd), batchfile) + let cmd = plug#shellescape(batchfile, {'shell': &shell, 'script': 0}) + if &shell =~# 'powershell\(\.exe\)\?$' + let cmd = '& ' . cmd + endif + return [batchfile, cmd] + endfunction +else + function! s:path(path) + return s:trim(a:path) + endfunction + + function! s:dirpath(path) + return substitute(a:path, '[/\\]*$', '/', '') + endfunction + + function! s:is_local_plug(repo) + return a:repo[0] =~ '[/$~]' + endfunction +endif + +function! s:err(msg) + echohl ErrorMsg + echom '[vim-plug] '.a:msg + echohl None +endfunction + +function! s:warn(cmd, msg) + echohl WarningMsg + execute a:cmd 'a:msg' + echohl None +endfunction + +function! s:esc(path) + return escape(a:path, ' ') +endfunction + +function! s:escrtp(path) + return escape(a:path, ' ,') +endfunction + +function! s:remove_rtp() + for name in s:loaded_names() + let rtp = s:rtp(g:plugs[name]) + execute 'set rtp-='.s:escrtp(rtp) + let after = globpath(rtp, 'after') + if isdirectory(after) + execute 'set rtp-='.s:escrtp(after) + endif + endfor +endfunction + +function! s:reorg_rtp() + if !empty(s:first_rtp) + execute 'set rtp-='.s:first_rtp + execute 'set rtp-='.s:last_rtp + endif + + " &rtp is modified from outside + if exists('s:prtp') && s:prtp !=# &rtp + call s:remove_rtp() + unlet! s:middle + endif + + let s:middle = get(s:, 'middle', &rtp) + let rtps = map(s:loaded_names(), 's:rtp(g:plugs[v:val])') + let afters = filter(map(copy(rtps), 'globpath(v:val, "after")'), '!empty(v:val)') + let rtp = join(map(rtps, 'escape(v:val, ",")'), ',') + \ . ','.s:middle.',' + \ . join(map(afters, 'escape(v:val, ",")'), ',') + let &rtp = substitute(substitute(rtp, ',,*', ',', 'g'), '^,\|,$', '', 'g') + let s:prtp = &rtp + + if !empty(s:first_rtp) + execute 'set rtp^='.s:first_rtp + execute 'set rtp+='.s:last_rtp + endif +endfunction + +function! s:doautocmd(...) + if exists('#'.join(a:000, '#')) + execute 'doautocmd' ((v:version > 703 || has('patch442')) ? '' : '') join(a:000) + endif +endfunction + +function! s:dobufread(names) + for name in a:names + let path = s:rtp(g:plugs[name]) + for dir in ['ftdetect', 'ftplugin', 'after/ftdetect', 'after/ftplugin'] + if len(finddir(dir, path)) + if exists('#BufRead') + doautocmd BufRead + endif + return + endif + endfor + endfor +endfunction + +function! plug#load(...) + if a:0 == 0 + return s:err('Argument missing: plugin name(s) required') + endif + if !exists('g:plugs') + return s:err('plug#begin was not called') + endif + let names = a:0 == 1 && type(a:1) == s:TYPE.list ? a:1 : a:000 + let unknowns = filter(copy(names), '!has_key(g:plugs, v:val)') + if !empty(unknowns) + let s = len(unknowns) > 1 ? 's' : '' + return s:err(printf('Unknown plugin%s: %s', s, join(unknowns, ', '))) + end + let unloaded = filter(copy(names), '!get(s:loaded, v:val, 0)') + if !empty(unloaded) + for name in unloaded + call s:lod([name], ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + endfor + call s:dobufread(unloaded) + return 1 + end + return 0 +endfunction + +function! s:remove_triggers(name) + if !has_key(s:triggers, a:name) + return + endif + for cmd in s:triggers[a:name].cmd + execute 'silent! delc' cmd + endfor + for map in s:triggers[a:name].map + execute 'silent! unmap' map + execute 'silent! iunmap' map + endfor + call remove(s:triggers, a:name) +endfunction + +function! s:lod(names, types, ...) + for name in a:names + call s:remove_triggers(name) + let s:loaded[name] = 1 + endfor + call s:reorg_rtp() + + for name in a:names + let rtp = s:rtp(g:plugs[name]) + for dir in a:types + call s:source(rtp, dir.'/**/*.vim') + endfor + if a:0 + if !s:source(rtp, a:1) && !empty(s:glob(rtp, a:2)) + execute 'runtime' a:1 + endif + call s:source(rtp, a:2) + endif + call s:doautocmd('User', name) + endfor +endfunction + +function! s:lod_ft(pat, names) + let syn = 'syntax/'.a:pat.'.vim' + call s:lod(a:names, ['plugin', 'after/plugin'], syn, 'after/'.syn) + execute 'autocmd! PlugLOD FileType' a:pat + call s:doautocmd('filetypeplugin', 'FileType') + call s:doautocmd('filetypeindent', 'FileType') +endfunction + +function! s:lod_cmd(cmd, bang, l1, l2, args, names) + call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + call s:dobufread(a:names) + execute printf('%s%s%s %s', (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args) +endfunction + +function! s:lod_map(map, names, with_prefix, prefix) + call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + call s:dobufread(a:names) + let extra = '' + while 1 + let c = getchar(0) + if c == 0 + break + endif + let extra .= nr2char(c) + endwhile + + if a:with_prefix + let prefix = v:count ? v:count : '' + let prefix .= '"'.v:register.a:prefix + if mode(1) == 'no' + if v:operator == 'c' + let prefix = "\" . prefix + endif + let prefix .= v:operator + endif + call feedkeys(prefix, 'n') + endif + call feedkeys(substitute(a:map, '^', "\", '') . extra) +endfunction + +function! plug#(repo, ...) + if a:0 > 1 + return s:err('Invalid number of arguments (1..2)') + endif + + try + let repo = s:trim(a:repo) + let opts = a:0 == 1 ? s:parse_options(a:1) : s:base_spec + let name = get(opts, 'as', s:plug_fnamemodify(repo, ':t:s?\.git$??')) + let spec = extend(s:infer_properties(name, repo), opts) + if !has_key(g:plugs, name) + call add(g:plugs_order, name) + endif + let g:plugs[name] = spec + let s:loaded[name] = get(s:loaded, name, 0) + catch + return s:err(repo . ' ' . v:exception) + endtry +endfunction + +function! s:parse_options(arg) + let opts = copy(s:base_spec) + let type = type(a:arg) + let opt_errfmt = 'Invalid argument for "%s" option of :Plug (expected: %s)' + if type == s:TYPE.string + if empty(a:arg) + throw printf(opt_errfmt, 'tag', 'string') + endif + let opts.tag = a:arg + elseif type == s:TYPE.dict + for opt in ['branch', 'tag', 'commit', 'rtp', 'dir', 'as'] + if has_key(a:arg, opt) + \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt])) + throw printf(opt_errfmt, opt, 'string') + endif + endfor + for opt in ['on', 'for'] + if has_key(a:arg, opt) + \ && type(a:arg[opt]) != s:TYPE.list + \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt])) + throw printf(opt_errfmt, opt, 'string or list') + endif + endfor + if has_key(a:arg, 'do') + \ && type(a:arg.do) != s:TYPE.funcref + \ && (type(a:arg.do) != s:TYPE.string || empty(a:arg.do)) + throw printf(opt_errfmt, 'do', 'string or funcref') + endif + call extend(opts, a:arg) + if has_key(opts, 'dir') + let opts.dir = s:dirpath(s:plug_expand(opts.dir)) + endif + else + throw 'Invalid argument type (expected: string or dictionary)' + endif + return opts +endfunction + +function! s:infer_properties(name, repo) + let repo = a:repo + if s:is_local_plug(repo) + return { 'dir': s:dirpath(s:plug_expand(repo)) } + else + if repo =~ ':' + let uri = repo + else + if repo !~ '/' + throw printf('Invalid argument: %s (implicit `vim-scripts'' expansion is deprecated)', repo) + endif + let fmt = get(g:, 'plug_url_format', 'https://git::@github.com/%s.git') + let uri = printf(fmt, repo) + endif + return { 'dir': s:dirpath(g:plug_home.'/'.a:name), 'uri': uri } + endif +endfunction + +function! s:install(force, names) + call s:update_impl(0, a:force, a:names) +endfunction + +function! s:update(force, names) + call s:update_impl(1, a:force, a:names) +endfunction + +function! plug#helptags() + if !exists('g:plugs') + return s:err('plug#begin was not called') + endif + for spec in values(g:plugs) + let docd = join([s:rtp(spec), 'doc'], '/') + if isdirectory(docd) + silent! execute 'helptags' s:esc(docd) + endif + endfor + return 1 +endfunction + +function! s:syntax() + syntax clear + syntax region plug1 start=/\%1l/ end=/\%2l/ contains=plugNumber + syntax region plug2 start=/\%2l/ end=/\%3l/ contains=plugBracket,plugX + syn match plugNumber /[0-9]\+[0-9.]*/ contained + syn match plugBracket /[[\]]/ contained + syn match plugX /x/ contained + syn match plugDash /^-/ + syn match plugPlus /^+/ + syn match plugStar /^*/ + syn match plugMessage /\(^- \)\@<=.*/ + syn match plugName /\(^- \)\@<=[^ ]*:/ + syn match plugSha /\%(: \)\@<=[0-9a-f]\{4,}$/ + syn match plugTag /(tag: [^)]\+)/ + syn match plugInstall /\(^+ \)\@<=[^:]*/ + syn match plugUpdate /\(^* \)\@<=[^:]*/ + syn match plugCommit /^ \X*[0-9a-f]\{7,9} .*/ contains=plugRelDate,plugEdge,plugTag + syn match plugEdge /^ \X\+$/ + syn match plugEdge /^ \X*/ contained nextgroup=plugSha + syn match plugSha /[0-9a-f]\{7,9}/ contained + syn match plugRelDate /([^)]*)$/ contained + syn match plugNotLoaded /(not loaded)$/ + syn match plugError /^x.*/ + syn region plugDeleted start=/^\~ .*/ end=/^\ze\S/ + syn match plugH2 /^.*:\n-\+$/ + syn keyword Function PlugInstall PlugStatus PlugUpdate PlugClean + hi def link plug1 Title + hi def link plug2 Repeat + hi def link plugH2 Type + hi def link plugX Exception + hi def link plugBracket Structure + hi def link plugNumber Number + + hi def link plugDash Special + hi def link plugPlus Constant + hi def link plugStar Boolean + + hi def link plugMessage Function + hi def link plugName Label + hi def link plugInstall Function + hi def link plugUpdate Type + + hi def link plugError Error + hi def link plugDeleted Ignore + hi def link plugRelDate Comment + hi def link plugEdge PreProc + hi def link plugSha Identifier + hi def link plugTag Constant + + hi def link plugNotLoaded Comment +endfunction + +function! s:lpad(str, len) + return a:str . repeat(' ', a:len - len(a:str)) +endfunction + +function! s:lines(msg) + return split(a:msg, "[\r\n]") +endfunction + +function! s:lastline(msg) + return get(s:lines(a:msg), -1, '') +endfunction + +function! s:new_window() + execute get(g:, 'plug_window', 'vertical topleft new') +endfunction + +function! s:plug_window_exists() + let buflist = tabpagebuflist(s:plug_tab) + return !empty(buflist) && index(buflist, s:plug_buf) >= 0 +endfunction + +function! s:switch_in() + if !s:plug_window_exists() + return 0 + endif + + if winbufnr(0) != s:plug_buf + let s:pos = [tabpagenr(), winnr(), winsaveview()] + execute 'normal!' s:plug_tab.'gt' + let winnr = bufwinnr(s:plug_buf) + execute winnr.'wincmd w' + call add(s:pos, winsaveview()) + else + let s:pos = [winsaveview()] + endif + + setlocal modifiable + return 1 +endfunction + +function! s:switch_out(...) + call winrestview(s:pos[-1]) + setlocal nomodifiable + if a:0 > 0 + execute a:1 + endif + + if len(s:pos) > 1 + execute 'normal!' s:pos[0].'gt' + execute s:pos[1] 'wincmd w' + call winrestview(s:pos[2]) + endif +endfunction + +function! s:finish_bindings() + nnoremap R :call retry() + nnoremap D :PlugDiff + nnoremap S :PlugStatus + nnoremap U :call status_update() + xnoremap U :call status_update() + nnoremap ]] :silent! call section('') + nnoremap [[ :silent! call section('b') +endfunction + +function! s:prepare(...) + if empty(s:plug_getcwd()) + throw 'Invalid current working directory. Cannot proceed.' + endif + + for evar in ['$GIT_DIR', '$GIT_WORK_TREE'] + if exists(evar) + throw evar.' detected. Cannot proceed.' + endif + endfor + + call s:job_abort() + if s:switch_in() + if b:plug_preview == 1 + pc + endif + enew + else + call s:new_window() + endif + + nnoremap q :if b:plug_preview==1pcendifbd + if a:0 == 0 + call s:finish_bindings() + endif + let b:plug_preview = -1 + let s:plug_tab = tabpagenr() + let s:plug_buf = winbufnr(0) + call s:assign_name() + + for k in ['', 'L', 'o', 'X', 'd', 'dd'] + execute 'silent! unmap ' k + endfor + setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline modifiable nospell + if exists('+colorcolumn') + setlocal colorcolumn= + endif + setf vim-plug + if exists('g:syntax_on') + call s:syntax() + endif +endfunction + +function! s:assign_name() + " Assign buffer name + let prefix = '[Plugins]' + let name = prefix + let idx = 2 + while bufexists(name) + let name = printf('%s (%s)', prefix, idx) + let idx = idx + 1 + endwhile + silent! execute 'f' fnameescape(name) +endfunction + +function! s:chsh(swap) + let prev = [&shell, &shellcmdflag, &shellredir] + if !s:is_win + set shell=sh + endif + if a:swap + if &shell =~# 'powershell\(\.exe\)\?$' || &shell =~# 'pwsh$' + let &shellredir = '2>&1 | Out-File -Encoding UTF8 %s' + elseif &shell =~# 'sh' || &shell =~# 'cmd\(\.exe\)\?$' + set shellredir=>%s\ 2>&1 + endif + endif + return prev +endfunction + +function! s:bang(cmd, ...) + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(a:0) + " FIXME: Escaping is incomplete. We could use shellescape with eval, + " but it won't work on Windows. + let cmd = a:0 ? s:with_cd(a:cmd, a:1) : a:cmd + if s:is_win + let [batchfile, cmd] = s:batchfile(cmd) + endif + let g:_plug_bang = (s:is_win && has('gui_running') ? 'silent ' : '').'!'.escape(cmd, '#!%') + execute "normal! :execute g:_plug_bang\\" + finally + unlet g:_plug_bang + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry + return v:shell_error ? 'Exit status: ' . v:shell_error : '' +endfunction + +function! s:regress_bar() + let bar = substitute(getline(2)[1:-2], '.*\zs=', 'x', '') + call s:progress_bar(2, bar, len(bar)) +endfunction + +function! s:is_updated(dir) + return !empty(s:system_chomp(['git', 'log', '--pretty=format:%h', 'HEAD...HEAD@{1}'], a:dir)) +endfunction + +function! s:do(pull, force, todo) + for [name, spec] in items(a:todo) + if !isdirectory(spec.dir) + continue + endif + let installed = has_key(s:update.new, name) + let updated = installed ? 0 : + \ (a:pull && index(s:update.errors, name) < 0 && s:is_updated(spec.dir)) + if a:force || installed || updated + execute 'cd' s:esc(spec.dir) + call append(3, '- Post-update hook for '. name .' ... ') + let error = '' + let type = type(spec.do) + if type == s:TYPE.string + if spec.do[0] == ':' + if !get(s:loaded, name, 0) + let s:loaded[name] = 1 + call s:reorg_rtp() + endif + call s:load_plugin(spec) + try + execute spec.do[1:] + catch + let error = v:exception + endtry + if !s:plug_window_exists() + cd - + throw 'Warning: vim-plug was terminated by the post-update hook of '.name + endif + else + let error = s:bang(spec.do) + endif + elseif type == s:TYPE.funcref + try + call s:load_plugin(spec) + let status = installed ? 'installed' : (updated ? 'updated' : 'unchanged') + call spec.do({ 'name': name, 'status': status, 'force': a:force }) + catch + let error = v:exception + endtry + else + let error = 'Invalid hook type' + endif + call s:switch_in() + call setline(4, empty(error) ? (getline(4) . 'OK') + \ : ('x' . getline(4)[1:] . error)) + if !empty(error) + call add(s:update.errors, name) + call s:regress_bar() + endif + cd - + endif + endfor +endfunction + +function! s:hash_match(a, b) + return stridx(a:a, a:b) == 0 || stridx(a:b, a:a) == 0 +endfunction + +function! s:checkout(spec) + let sha = a:spec.commit + let output = s:git_revision(a:spec.dir) + if !empty(output) && !s:hash_match(sha, s:lines(output)[0]) + let output = s:system( + \ 'git fetch --depth 999999 && git checkout '.plug#shellescape(sha).' --', a:spec.dir) + endif + return output +endfunction + +function! s:finish(pull) + let new_frozen = len(filter(keys(s:update.new), 'g:plugs[v:val].frozen')) + if new_frozen + let s = new_frozen > 1 ? 's' : '' + call append(3, printf('- Installed %d frozen plugin%s', new_frozen, s)) + endif + call append(3, '- Finishing ... ') | 4 + redraw + call plug#helptags() + call plug#end() + call setline(4, getline(4) . 'Done!') + redraw + let msgs = [] + if !empty(s:update.errors) + call add(msgs, "Press 'R' to retry.") + endif + if a:pull && len(s:update.new) < len(filter(getline(5, '$'), + \ "v:val =~ '^- ' && v:val !~# 'Already up.to.date'")) + call add(msgs, "Press 'D' to see the updated changes.") + endif + echo join(msgs, ' ') + call s:finish_bindings() +endfunction + +function! s:retry() + if empty(s:update.errors) + return + endif + echo + call s:update_impl(s:update.pull, s:update.force, + \ extend(copy(s:update.errors), [s:update.threads])) +endfunction + +function! s:is_managed(name) + return has_key(g:plugs[a:name], 'uri') +endfunction + +function! s:names(...) + return sort(filter(keys(g:plugs), 'stridx(v:val, a:1) == 0 && s:is_managed(v:val)')) +endfunction + +function! s:check_ruby() + silent! ruby require 'thread'; VIM::command("let g:plug_ruby = '#{RUBY_VERSION}'") + if !exists('g:plug_ruby') + redraw! + return s:warn('echom', 'Warning: Ruby interface is broken') + endif + let ruby_version = split(g:plug_ruby, '\.') + unlet g:plug_ruby + return s:version_requirement(ruby_version, [1, 8, 7]) +endfunction + +function! s:update_impl(pull, force, args) abort + let sync = index(a:args, '--sync') >= 0 || has('vim_starting') + let args = filter(copy(a:args), 'v:val != "--sync"') + let threads = (len(args) > 0 && args[-1] =~ '^[1-9][0-9]*$') ? + \ remove(args, -1) : get(g:, 'plug_threads', 16) + + let managed = filter(copy(g:plugs), 's:is_managed(v:key)') + let todo = empty(args) ? filter(managed, '!v:val.frozen || !isdirectory(v:val.dir)') : + \ filter(managed, 'index(args, v:key) >= 0') + + if empty(todo) + return s:warn('echo', 'No plugin to '. (a:pull ? 'update' : 'install')) + endif + + if !s:is_win && s:git_version_requirement(2, 3) + let s:git_terminal_prompt = exists('$GIT_TERMINAL_PROMPT') ? $GIT_TERMINAL_PROMPT : '' + let $GIT_TERMINAL_PROMPT = 0 + for plug in values(todo) + let plug.uri = substitute(plug.uri, + \ '^https://git::@github\.com', 'https://github.com', '') + endfor + endif + + if !isdirectory(g:plug_home) + try + call mkdir(g:plug_home, 'p') + catch + return s:err(printf('Invalid plug directory: %s. '. + \ 'Try to call plug#begin with a valid directory', g:plug_home)) + endtry + endif + + if has('nvim') && !exists('*jobwait') && threads > 1 + call s:warn('echom', '[vim-plug] Update Neovim for parallel installer') + endif + + let use_job = s:nvim || s:vim8 + let python = (has('python') || has('python3')) && !use_job + let ruby = has('ruby') && !use_job && (v:version >= 703 || v:version == 702 && has('patch374')) && !(s:is_win && has('gui_running')) && threads > 1 && s:check_ruby() + + let s:update = { + \ 'start': reltime(), + \ 'all': todo, + \ 'todo': copy(todo), + \ 'errors': [], + \ 'pull': a:pull, + \ 'force': a:force, + \ 'new': {}, + \ 'threads': (python || ruby || use_job) ? min([len(todo), threads]) : 1, + \ 'bar': '', + \ 'fin': 0 + \ } + + call s:prepare(1) + call append(0, ['', '']) + normal! 2G + silent! redraw + + let s:clone_opt = [] + if get(g:, 'plug_shallow', 1) + call extend(s:clone_opt, ['--depth', '1']) + if s:git_version_requirement(1, 7, 10) + call add(s:clone_opt, '--no-single-branch') + endif + endif + + if has('win32unix') || has('wsl') + call extend(s:clone_opt, ['-c', 'core.eol=lf', '-c', 'core.autocrlf=input']) + endif + + let s:submodule_opt = s:git_version_requirement(2, 8) ? ' --jobs='.threads : '' + + " Python version requirement (>= 2.7) + if python && !has('python3') && !ruby && !use_job && s:update.threads > 1 + redir => pyv + silent python import platform; print platform.python_version() + redir END + let python = s:version_requirement( + \ map(split(split(pyv)[0], '\.'), 'str2nr(v:val)'), [2, 6]) + endif + + if (python || ruby) && s:update.threads > 1 + try + let imd = &imd + if s:mac_gui + set noimd + endif + if ruby + call s:update_ruby() + else + call s:update_python() + endif + catch + let lines = getline(4, '$') + let printed = {} + silent! 4,$d _ + for line in lines + let name = s:extract_name(line, '.', '') + if empty(name) || !has_key(printed, name) + call append('$', line) + if !empty(name) + let printed[name] = 1 + if line[0] == 'x' && index(s:update.errors, name) < 0 + call add(s:update.errors, name) + end + endif + endif + endfor + finally + let &imd = imd + call s:update_finish() + endtry + else + call s:update_vim() + while use_job && sync + sleep 100m + if s:update.fin + break + endif + endwhile + endif +endfunction + +function! s:log4(name, msg) + call setline(4, printf('- %s (%s)', a:msg, a:name)) + redraw +endfunction + +function! s:update_finish() + if exists('s:git_terminal_prompt') + let $GIT_TERMINAL_PROMPT = s:git_terminal_prompt + endif + if s:switch_in() + call append(3, '- Updating ...') | 4 + for [name, spec] in items(filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && (s:update.force || s:update.pull || has_key(s:update.new, v:key))')) + let [pos, _] = s:logpos(name) + if !pos + continue + endif + if has_key(spec, 'commit') + call s:log4(name, 'Checking out '.spec.commit) + let out = s:checkout(spec) + elseif has_key(spec, 'tag') + let tag = spec.tag + if tag =~ '\*' + let tags = s:lines(s:system('git tag --list '.plug#shellescape(tag).' --sort -version:refname 2>&1', spec.dir)) + if !v:shell_error && !empty(tags) + let tag = tags[0] + call s:log4(name, printf('Latest tag for %s -> %s', spec.tag, tag)) + call append(3, '') + endif + endif + call s:log4(name, 'Checking out '.tag) + let out = s:system('git checkout -q '.plug#shellescape(tag).' -- 2>&1', spec.dir) + else + let branch = s:git_origin_branch(spec) + call s:log4(name, 'Merging origin/'.s:esc(branch)) + let out = s:system('git checkout -q '.plug#shellescape(branch).' -- 2>&1' + \. (has_key(s:update.new, name) ? '' : ('&& git merge --ff-only '.plug#shellescape('origin/'.branch).' 2>&1')), spec.dir) + endif + if !v:shell_error && filereadable(spec.dir.'/.gitmodules') && + \ (s:update.force || has_key(s:update.new, name) || s:is_updated(spec.dir)) + call s:log4(name, 'Updating submodules. This may take a while.') + let out .= s:bang('git submodule update --init --recursive'.s:submodule_opt.' 2>&1', spec.dir) + endif + let msg = s:format_message(v:shell_error ? 'x': '-', name, out) + if v:shell_error + call add(s:update.errors, name) + call s:regress_bar() + silent execute pos 'd _' + call append(4, msg) | 4 + elseif !empty(out) + call setline(pos, msg[0]) + endif + redraw + endfor + silent 4 d _ + try + call s:do(s:update.pull, s:update.force, filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && has_key(v:val, "do")')) + catch + call s:warn('echom', v:exception) + call s:warn('echo', '') + return + endtry + call s:finish(s:update.pull) + call setline(1, 'Updated. Elapsed time: ' . split(reltimestr(reltime(s:update.start)))[0] . ' sec.') + call s:switch_out('normal! gg') + endif +endfunction + +function! s:job_abort() + if (!s:nvim && !s:vim8) || !exists('s:jobs') + return + endif + + for [name, j] in items(s:jobs) + if s:nvim + silent! call jobstop(j.jobid) + elseif s:vim8 + silent! call job_stop(j.jobid) + endif + if j.new + call s:rm_rf(g:plugs[name].dir) + endif + endfor + let s:jobs = {} +endfunction + +function! s:last_non_empty_line(lines) + let len = len(a:lines) + for idx in range(len) + let line = a:lines[len-idx-1] + if !empty(line) + return line + endif + endfor + return '' +endfunction + +function! s:job_out_cb(self, data) abort + let self = a:self + let data = remove(self.lines, -1) . a:data + let lines = map(split(data, "\n", 1), 'split(v:val, "\r", 1)[-1]') + call extend(self.lines, lines) + " To reduce the number of buffer updates + let self.tick = get(self, 'tick', -1) + 1 + if !self.running || self.tick % len(s:jobs) == 0 + let bullet = self.running ? (self.new ? '+' : '*') : (self.error ? 'x' : '-') + let result = self.error ? join(self.lines, "\n") : s:last_non_empty_line(self.lines) + call s:log(bullet, self.name, result) + endif +endfunction + +function! s:job_exit_cb(self, data) abort + let a:self.running = 0 + let a:self.error = a:data != 0 + call s:reap(a:self.name) + call s:tick() +endfunction + +function! s:job_cb(fn, job, ch, data) + if !s:plug_window_exists() " plug window closed + return s:job_abort() + endif + call call(a:fn, [a:job, a:data]) +endfunction + +function! s:nvim_cb(job_id, data, event) dict abort + return (a:event == 'stdout' || a:event == 'stderr') ? + \ s:job_cb('s:job_out_cb', self, 0, join(a:data, "\n")) : + \ s:job_cb('s:job_exit_cb', self, 0, a:data) +endfunction + +function! s:spawn(name, cmd, opts) + let job = { 'name': a:name, 'running': 1, 'error': 0, 'lines': [''], + \ 'new': get(a:opts, 'new', 0) } + let s:jobs[a:name] = job + + if s:nvim + if has_key(a:opts, 'dir') + let job.cwd = a:opts.dir + endif + let argv = a:cmd + call extend(job, { + \ 'on_stdout': function('s:nvim_cb'), + \ 'on_stderr': function('s:nvim_cb'), + \ 'on_exit': function('s:nvim_cb'), + \ }) + let jid = s:plug_call('jobstart', argv, job) + if jid > 0 + let job.jobid = jid + else + let job.running = 0 + let job.error = 1 + let job.lines = [jid < 0 ? argv[0].' is not executable' : + \ 'Invalid arguments (or job table is full)'] + endif + elseif s:vim8 + let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"script": 0})')) + if has_key(a:opts, 'dir') + let cmd = s:with_cd(cmd, a:opts.dir, 0) + endif + let argv = s:is_win ? ['cmd', '/s', '/c', '"'.cmd.'"'] : ['sh', '-c', cmd] + let jid = job_start(s:is_win ? join(argv, ' ') : argv, { + \ 'out_cb': function('s:job_cb', ['s:job_out_cb', job]), + \ 'err_cb': function('s:job_cb', ['s:job_out_cb', job]), + \ 'exit_cb': function('s:job_cb', ['s:job_exit_cb', job]), + \ 'err_mode': 'raw', + \ 'out_mode': 'raw' + \}) + if job_status(jid) == 'run' + let job.jobid = jid + else + let job.running = 0 + let job.error = 1 + let job.lines = ['Failed to start job'] + endif + else + let job.lines = s:lines(call('s:system', has_key(a:opts, 'dir') ? [a:cmd, a:opts.dir] : [a:cmd])) + let job.error = v:shell_error != 0 + let job.running = 0 + endif +endfunction + +function! s:reap(name) + let job = s:jobs[a:name] + if job.error + call add(s:update.errors, a:name) + elseif get(job, 'new', 0) + let s:update.new[a:name] = 1 + endif + let s:update.bar .= job.error ? 'x' : '=' + + let bullet = job.error ? 'x' : '-' + let result = job.error ? join(job.lines, "\n") : s:last_non_empty_line(job.lines) + call s:log(bullet, a:name, empty(result) ? 'OK' : result) + call s:bar() + + call remove(s:jobs, a:name) +endfunction + +function! s:bar() + if s:switch_in() + let total = len(s:update.all) + call setline(1, (s:update.pull ? 'Updating' : 'Installing'). + \ ' plugins ('.len(s:update.bar).'/'.total.')') + call s:progress_bar(2, s:update.bar, total) + call s:switch_out() + endif +endfunction + +function! s:logpos(name) + let max = line('$') + for i in range(4, max > 4 ? max : 4) + if getline(i) =~# '^[-+x*] '.a:name.':' + for j in range(i + 1, max > 5 ? max : 5) + if getline(j) !~ '^ ' + return [i, j - 1] + endif + endfor + return [i, i] + endif + endfor + return [0, 0] +endfunction + +function! s:log(bullet, name, lines) + if s:switch_in() + let [b, e] = s:logpos(a:name) + if b > 0 + silent execute printf('%d,%d d _', b, e) + if b > winheight('.') + let b = 4 + endif + else + let b = 4 + endif + " FIXME For some reason, nomodifiable is set after :d in vim8 + setlocal modifiable + call append(b - 1, s:format_message(a:bullet, a:name, a:lines)) + call s:switch_out() + endif +endfunction + +function! s:update_vim() + let s:jobs = {} + + call s:bar() + call s:tick() +endfunction + +function! s:tick() + let pull = s:update.pull + let prog = s:progress_opt(s:nvim || s:vim8) +while 1 " Without TCO, Vim stack is bound to explode + if empty(s:update.todo) + if empty(s:jobs) && !s:update.fin + call s:update_finish() + let s:update.fin = 1 + endif + return + endif + + let name = keys(s:update.todo)[0] + let spec = remove(s:update.todo, name) + let new = empty(globpath(spec.dir, '.git', 1)) + + call s:log(new ? '+' : '*', name, pull ? 'Updating ...' : 'Installing ...') + redraw + + let has_tag = has_key(spec, 'tag') + if !new + let [error, _] = s:git_validate(spec, 0) + if empty(error) + if pull + let cmd = ['git', 'fetch'] + if has_tag && !empty(globpath(spec.dir, '.git/shallow')) + call extend(cmd, ['--depth', '99999999']) + endif + if !empty(prog) + call add(cmd, prog) + endif + call s:spawn(name, cmd, { 'dir': spec.dir }) + else + let s:jobs[name] = { 'running': 0, 'lines': ['Already installed'], 'error': 0 } + endif + else + let s:jobs[name] = { 'running': 0, 'lines': s:lines(error), 'error': 1 } + endif + else + let cmd = ['git', 'clone'] + if !has_tag + call extend(cmd, s:clone_opt) + endif + if !empty(prog) + call add(cmd, prog) + endif + call s:spawn(name, extend(cmd, [spec.uri, s:trim(spec.dir)]), { 'new': 1 }) + endif + + if !s:jobs[name].running + call s:reap(name) + endif + if len(s:jobs) >= s:update.threads + break + endif +endwhile +endfunction + +function! s:update_python() +let py_exe = has('python') ? 'python' : 'python3' +execute py_exe "<< EOF" +import datetime +import functools +import os +try: + import queue +except ImportError: + import Queue as queue +import random +import re +import shutil +import signal +import subprocess +import tempfile +import threading as thr +import time +import traceback +import vim + +G_NVIM = vim.eval("has('nvim')") == '1' +G_PULL = vim.eval('s:update.pull') == '1' +G_RETRIES = int(vim.eval('get(g:, "plug_retries", 2)')) + 1 +G_TIMEOUT = int(vim.eval('get(g:, "plug_timeout", 60)')) +G_CLONE_OPT = ' '.join(vim.eval('s:clone_opt')) +G_PROGRESS = vim.eval('s:progress_opt(1)') +G_LOG_PROB = 1.0 / int(vim.eval('s:update.threads')) +G_STOP = thr.Event() +G_IS_WIN = vim.eval('s:is_win') == '1' + +class PlugError(Exception): + def __init__(self, msg): + self.msg = msg +class CmdTimedOut(PlugError): + pass +class CmdFailed(PlugError): + pass +class InvalidURI(PlugError): + pass +class Action(object): + INSTALL, UPDATE, ERROR, DONE = ['+', '*', 'x', '-'] + +class Buffer(object): + def __init__(self, lock, num_plugs, is_pull): + self.bar = '' + self.event = 'Updating' if is_pull else 'Installing' + self.lock = lock + self.maxy = int(vim.eval('winheight(".")')) + self.num_plugs = num_plugs + + def __where(self, name): + """ Find first line with name in current buffer. Return line num. """ + found, lnum = False, 0 + matcher = re.compile('^[-+x*] {0}:'.format(name)) + for line in vim.current.buffer: + if matcher.search(line) is not None: + found = True + break + lnum += 1 + + if not found: + lnum = -1 + return lnum + + def header(self): + curbuf = vim.current.buffer + curbuf[0] = self.event + ' plugins ({0}/{1})'.format(len(self.bar), self.num_plugs) + + num_spaces = self.num_plugs - len(self.bar) + curbuf[1] = '[{0}{1}]'.format(self.bar, num_spaces * ' ') + + with self.lock: + vim.command('normal! 2G') + vim.command('redraw') + + def write(self, action, name, lines): + first, rest = lines[0], lines[1:] + msg = ['{0} {1}{2}{3}'.format(action, name, ': ' if first else '', first)] + msg.extend([' ' + line for line in rest]) + + try: + if action == Action.ERROR: + self.bar += 'x' + vim.command("call add(s:update.errors, '{0}')".format(name)) + elif action == Action.DONE: + self.bar += '=' + + curbuf = vim.current.buffer + lnum = self.__where(name) + if lnum != -1: # Found matching line num + del curbuf[lnum] + if lnum > self.maxy and action in set([Action.INSTALL, Action.UPDATE]): + lnum = 3 + else: + lnum = 3 + curbuf.append(msg, lnum) + + self.header() + except vim.error: + pass + +class Command(object): + CD = 'cd /d' if G_IS_WIN else 'cd' + + def __init__(self, cmd, cmd_dir=None, timeout=60, cb=None, clean=None): + self.cmd = cmd + if cmd_dir: + self.cmd = '{0} {1} && {2}'.format(Command.CD, cmd_dir, self.cmd) + self.timeout = timeout + self.callback = cb if cb else (lambda msg: None) + self.clean = clean if clean else (lambda: None) + self.proc = None + + @property + def alive(self): + """ Returns true only if command still running. """ + return self.proc and self.proc.poll() is None + + def execute(self, ntries=3): + """ Execute the command with ntries if CmdTimedOut. + Returns the output of the command if no Exception. + """ + attempt, finished, limit = 0, False, self.timeout + + while not finished: + try: + attempt += 1 + result = self.try_command() + finished = True + return result + except CmdTimedOut: + if attempt != ntries: + self.notify_retry() + self.timeout += limit + else: + raise + + def notify_retry(self): + """ Retry required for command, notify user. """ + for count in range(3, 0, -1): + if G_STOP.is_set(): + raise KeyboardInterrupt + msg = 'Timeout. Will retry in {0} second{1} ...'.format( + count, 's' if count != 1 else '') + self.callback([msg]) + time.sleep(1) + self.callback(['Retrying ...']) + + def try_command(self): + """ Execute a cmd & poll for callback. Returns list of output. + Raises CmdFailed -> return code for Popen isn't 0 + Raises CmdTimedOut -> command exceeded timeout without new output + """ + first_line = True + + try: + tfile = tempfile.NamedTemporaryFile(mode='w+b') + preexec_fn = not G_IS_WIN and os.setsid or None + self.proc = subprocess.Popen(self.cmd, stdout=tfile, + stderr=subprocess.STDOUT, + stdin=subprocess.PIPE, shell=True, + preexec_fn=preexec_fn) + thrd = thr.Thread(target=(lambda proc: proc.wait()), args=(self.proc,)) + thrd.start() + + thread_not_started = True + while thread_not_started: + try: + thrd.join(0.1) + thread_not_started = False + except RuntimeError: + pass + + while self.alive: + if G_STOP.is_set(): + raise KeyboardInterrupt + + if first_line or random.random() < G_LOG_PROB: + first_line = False + line = '' if G_IS_WIN else nonblock_read(tfile.name) + if line: + self.callback([line]) + + time_diff = time.time() - os.path.getmtime(tfile.name) + if time_diff > self.timeout: + raise CmdTimedOut(['Timeout!']) + + thrd.join(0.5) + + tfile.seek(0) + result = [line.decode('utf-8', 'replace').rstrip() for line in tfile] + + if self.proc.returncode != 0: + raise CmdFailed([''] + result) + + return result + except: + self.terminate() + raise + + def terminate(self): + """ Terminate process and cleanup. """ + if self.alive: + if G_IS_WIN: + os.kill(self.proc.pid, signal.SIGINT) + else: + os.killpg(self.proc.pid, signal.SIGTERM) + self.clean() + +class Plugin(object): + def __init__(self, name, args, buf_q, lock): + self.name = name + self.args = args + self.buf_q = buf_q + self.lock = lock + self.tag = args.get('tag', 0) + + def manage(self): + try: + if os.path.exists(self.args['dir']): + self.update() + else: + self.install() + with self.lock: + thread_vim_command("let s:update.new['{0}'] = 1".format(self.name)) + except PlugError as exc: + self.write(Action.ERROR, self.name, exc.msg) + except KeyboardInterrupt: + G_STOP.set() + self.write(Action.ERROR, self.name, ['Interrupted!']) + except: + # Any exception except those above print stack trace + msg = 'Trace:\n{0}'.format(traceback.format_exc().rstrip()) + self.write(Action.ERROR, self.name, msg.split('\n')) + raise + + def install(self): + target = self.args['dir'] + if target[-1] == '\\': + target = target[0:-1] + + def clean(target): + def _clean(): + try: + shutil.rmtree(target) + except OSError: + pass + return _clean + + self.write(Action.INSTALL, self.name, ['Installing ...']) + callback = functools.partial(self.write, Action.INSTALL, self.name) + cmd = 'git clone {0} {1} {2} {3} 2>&1'.format( + '' if self.tag else G_CLONE_OPT, G_PROGRESS, self.args['uri'], + esc(target)) + com = Command(cmd, None, G_TIMEOUT, callback, clean(target)) + result = com.execute(G_RETRIES) + self.write(Action.DONE, self.name, result[-1:]) + + def repo_uri(self): + cmd = 'git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url' + command = Command(cmd, self.args['dir'], G_TIMEOUT,) + result = command.execute(G_RETRIES) + return result[-1] + + def update(self): + actual_uri = self.repo_uri() + expect_uri = self.args['uri'] + regex = re.compile(r'^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$') + ma = regex.match(actual_uri) + mb = regex.match(expect_uri) + if ma is None or mb is None or ma.groups() != mb.groups(): + msg = ['', + 'Invalid URI: {0}'.format(actual_uri), + 'Expected {0}'.format(expect_uri), + 'PlugClean required.'] + raise InvalidURI(msg) + + if G_PULL: + self.write(Action.UPDATE, self.name, ['Updating ...']) + callback = functools.partial(self.write, Action.UPDATE, self.name) + fetch_opt = '--depth 99999999' if self.tag and os.path.isfile(os.path.join(self.args['dir'], '.git/shallow')) else '' + cmd = 'git fetch {0} {1} 2>&1'.format(fetch_opt, G_PROGRESS) + com = Command(cmd, self.args['dir'], G_TIMEOUT, callback) + result = com.execute(G_RETRIES) + self.write(Action.DONE, self.name, result[-1:]) + else: + self.write(Action.DONE, self.name, ['Already installed']) + + def write(self, action, name, msg): + self.buf_q.put((action, name, msg)) + +class PlugThread(thr.Thread): + def __init__(self, tname, args): + super(PlugThread, self).__init__() + self.tname = tname + self.args = args + + def run(self): + thr.current_thread().name = self.tname + buf_q, work_q, lock = self.args + + try: + while not G_STOP.is_set(): + name, args = work_q.get_nowait() + plug = Plugin(name, args, buf_q, lock) + plug.manage() + work_q.task_done() + except queue.Empty: + pass + +class RefreshThread(thr.Thread): + def __init__(self, lock): + super(RefreshThread, self).__init__() + self.lock = lock + self.running = True + + def run(self): + while self.running: + with self.lock: + thread_vim_command('noautocmd normal! a') + time.sleep(0.33) + + def stop(self): + self.running = False + +if G_NVIM: + def thread_vim_command(cmd): + vim.session.threadsafe_call(lambda: vim.command(cmd)) +else: + def thread_vim_command(cmd): + vim.command(cmd) + +def esc(name): + return '"' + name.replace('"', '\"') + '"' + +def nonblock_read(fname): + """ Read a file with nonblock flag. Return the last line. """ + fread = os.open(fname, os.O_RDONLY | os.O_NONBLOCK) + buf = os.read(fread, 100000).decode('utf-8', 'replace') + os.close(fread) + + line = buf.rstrip('\r\n') + left = max(line.rfind('\r'), line.rfind('\n')) + if left != -1: + left += 1 + line = line[left:] + + return line + +def main(): + thr.current_thread().name = 'main' + nthreads = int(vim.eval('s:update.threads')) + plugs = vim.eval('s:update.todo') + mac_gui = vim.eval('s:mac_gui') == '1' + + lock = thr.Lock() + buf = Buffer(lock, len(plugs), G_PULL) + buf_q, work_q = queue.Queue(), queue.Queue() + for work in plugs.items(): + work_q.put(work) + + start_cnt = thr.active_count() + for num in range(nthreads): + tname = 'PlugT-{0:02}'.format(num) + thread = PlugThread(tname, (buf_q, work_q, lock)) + thread.start() + if mac_gui: + rthread = RefreshThread(lock) + rthread.start() + + while not buf_q.empty() or thr.active_count() != start_cnt: + try: + action, name, msg = buf_q.get(True, 0.25) + buf.write(action, name, ['OK'] if not msg else msg) + buf_q.task_done() + except queue.Empty: + pass + except KeyboardInterrupt: + G_STOP.set() + + if mac_gui: + rthread.stop() + rthread.join() + +main() +EOF +endfunction + +function! s:update_ruby() + ruby << EOF + module PlugStream + SEP = ["\r", "\n", nil] + def get_line + buffer = '' + loop do + char = readchar rescue return + if SEP.include? char.chr + buffer << $/ + break + else + buffer << char + end + end + buffer + end + end unless defined?(PlugStream) + + def esc arg + %["#{arg.gsub('"', '\"')}"] + end + + def killall pid + pids = [pid] + if /mswin|mingw|bccwin/ =~ RUBY_PLATFORM + pids.each { |pid| Process.kill 'INT', pid.to_i rescue nil } + else + unless `which pgrep 2> /dev/null`.empty? + children = pids + until children.empty? + children = children.map { |pid| + `pgrep -P #{pid}`.lines.map { |l| l.chomp } + }.flatten + pids += children + end + end + pids.each { |pid| Process.kill 'TERM', pid.to_i rescue nil } + end + end + + def compare_git_uri a, b + regex = %r{^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$} + regex.match(a).to_a.drop(1) == regex.match(b).to_a.drop(1) + end + + require 'thread' + require 'fileutils' + require 'timeout' + running = true + iswin = VIM::evaluate('s:is_win').to_i == 1 + pull = VIM::evaluate('s:update.pull').to_i == 1 + base = VIM::evaluate('g:plug_home') + all = VIM::evaluate('s:update.todo') + limit = VIM::evaluate('get(g:, "plug_timeout", 60)') + tries = VIM::evaluate('get(g:, "plug_retries", 2)') + 1 + nthr = VIM::evaluate('s:update.threads').to_i + maxy = VIM::evaluate('winheight(".")').to_i + vim7 = VIM::evaluate('v:version').to_i <= 703 && RUBY_PLATFORM =~ /darwin/ + cd = iswin ? 'cd /d' : 'cd' + tot = VIM::evaluate('len(s:update.todo)') || 0 + bar = '' + skip = 'Already installed' + mtx = Mutex.new + take1 = proc { mtx.synchronize { running && all.shift } } + logh = proc { + cnt = bar.length + $curbuf[1] = "#{pull ? 'Updating' : 'Installing'} plugins (#{cnt}/#{tot})" + $curbuf[2] = '[' + bar.ljust(tot) + ']' + VIM::command('normal! 2G') + VIM::command('redraw') + } + where = proc { |name| (1..($curbuf.length)).find { |l| $curbuf[l] =~ /^[-+x*] #{name}:/ } } + log = proc { |name, result, type| + mtx.synchronize do + ing = ![true, false].include?(type) + bar += type ? '=' : 'x' unless ing + b = case type + when :install then '+' when :update then '*' + when true, nil then '-' else + VIM::command("call add(s:update.errors, '#{name}')") + 'x' + end + result = + if type || type.nil? + ["#{b} #{name}: #{result.lines.to_a.last || 'OK'}"] + elsif result =~ /^Interrupted|^Timeout/ + ["#{b} #{name}: #{result}"] + else + ["#{b} #{name}"] + result.lines.map { |l| " " << l } + end + if lnum = where.call(name) + $curbuf.delete lnum + lnum = 4 if ing && lnum > maxy + end + result.each_with_index do |line, offset| + $curbuf.append((lnum || 4) - 1 + offset, line.gsub(/\e\[./, '').chomp) + end + logh.call + end + } + bt = proc { |cmd, name, type, cleanup| + tried = timeout = 0 + begin + tried += 1 + timeout += limit + fd = nil + data = '' + if iswin + Timeout::timeout(timeout) do + tmp = VIM::evaluate('tempname()') + system("(#{cmd}) > #{tmp}") + data = File.read(tmp).chomp + File.unlink tmp rescue nil + end + else + fd = IO.popen(cmd).extend(PlugStream) + first_line = true + log_prob = 1.0 / nthr + while line = Timeout::timeout(timeout) { fd.get_line } + data << line + log.call name, line.chomp, type if name && (first_line || rand < log_prob) + first_line = false + end + fd.close + end + [$? == 0, data.chomp] + rescue Timeout::Error, Interrupt => e + if fd && !fd.closed? + killall fd.pid + fd.close + end + cleanup.call if cleanup + if e.is_a?(Timeout::Error) && tried < tries + 3.downto(1) do |countdown| + s = countdown > 1 ? 's' : '' + log.call name, "Timeout. Will retry in #{countdown} second#{s} ...", type + sleep 1 + end + log.call name, 'Retrying ...', type + retry + end + [false, e.is_a?(Interrupt) ? "Interrupted!" : "Timeout!"] + end + } + main = Thread.current + threads = [] + watcher = Thread.new { + if vim7 + while VIM::evaluate('getchar(1)') + sleep 0.1 + end + else + require 'io/console' # >= Ruby 1.9 + nil until IO.console.getch == 3.chr + end + mtx.synchronize do + running = false + threads.each { |t| t.raise Interrupt } unless vim7 + end + threads.each { |t| t.join rescue nil } + main.kill + } + refresh = Thread.new { + while true + mtx.synchronize do + break unless running + VIM::command('noautocmd normal! a') + end + sleep 0.2 + end + } if VIM::evaluate('s:mac_gui') == 1 + + clone_opt = VIM::evaluate('s:clone_opt').join(' ') + progress = VIM::evaluate('s:progress_opt(1)') + nthr.times do + mtx.synchronize do + threads << Thread.new { + while pair = take1.call + name = pair.first + dir, uri, tag = pair.last.values_at *%w[dir uri tag] + exists = File.directory? dir + ok, result = + if exists + chdir = "#{cd} #{iswin ? dir : esc(dir)}" + ret, data = bt.call "#{chdir} && git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url", nil, nil, nil + current_uri = data.lines.to_a.last + if !ret + if data =~ /^Interrupted|^Timeout/ + [false, data] + else + [false, [data.chomp, "PlugClean required."].join($/)] + end + elsif !compare_git_uri(current_uri, uri) + [false, ["Invalid URI: #{current_uri}", + "Expected: #{uri}", + "PlugClean required."].join($/)] + else + if pull + log.call name, 'Updating ...', :update + fetch_opt = (tag && File.exist?(File.join(dir, '.git/shallow'))) ? '--depth 99999999' : '' + bt.call "#{chdir} && git fetch #{fetch_opt} #{progress} 2>&1", name, :update, nil + else + [true, skip] + end + end + else + d = esc dir.sub(%r{[\\/]+$}, '') + log.call name, 'Installing ...', :install + bt.call "git clone #{clone_opt unless tag} #{progress} #{uri} #{d} 2>&1", name, :install, proc { + FileUtils.rm_rf dir + } + end + mtx.synchronize { VIM::command("let s:update.new['#{name}'] = 1") } if !exists && ok + log.call name, result, ok + end + } if running + end + end + threads.each { |t| t.join rescue nil } + logh.call + refresh.kill if refresh + watcher.kill +EOF +endfunction + +function! s:shellesc_cmd(arg, script) + let escaped = substitute('"'.a:arg.'"', '[&|<>()@^!"]', '^&', 'g') + return substitute(escaped, '%', (a:script ? '%' : '^') . '&', 'g') +endfunction + +function! s:shellesc_ps1(arg) + return "'".substitute(escape(a:arg, '\"'), "'", "''", 'g')."'" +endfunction + +function! s:shellesc_sh(arg) + return "'".substitute(a:arg, "'", "'\\\\''", 'g')."'" +endfunction + +" Escape the shell argument based on the shell. +" Vim and Neovim's shellescape() are insufficient. +" 1. shellslash determines whether to use single/double quotes. +" Double-quote escaping is fragile for cmd.exe. +" 2. It does not work for powershell. +" 3. It does not work for *sh shells if the command is executed +" via cmd.exe (ie. cmd.exe /c sh -c command command_args) +" 4. It does not support batchfile syntax. +" +" Accepts an optional dictionary with the following keys: +" - shell: same as Vim/Neovim 'shell' option. +" If unset, fallback to 'cmd.exe' on Windows or 'sh'. +" - script: If truthy and shell is cmd.exe, escape for batchfile syntax. +function! plug#shellescape(arg, ...) + if a:arg =~# '^[A-Za-z0-9_/:.-]\+$' + return a:arg + endif + let opts = a:0 > 0 && type(a:1) == s:TYPE.dict ? a:1 : {} + let shell = get(opts, 'shell', s:is_win ? 'cmd.exe' : 'sh') + let script = get(opts, 'script', 1) + if shell =~# 'cmd\(\.exe\)\?$' + return s:shellesc_cmd(a:arg, script) + elseif shell =~# 'powershell\(\.exe\)\?$' || shell =~# 'pwsh$' + return s:shellesc_ps1(a:arg) + endif + return s:shellesc_sh(a:arg) +endfunction + +function! s:glob_dir(path) + return map(filter(s:glob(a:path, '**'), 'isdirectory(v:val)'), 's:dirpath(v:val)') +endfunction + +function! s:progress_bar(line, bar, total) + call setline(a:line, '[' . s:lpad(a:bar, a:total) . ']') +endfunction + +function! s:compare_git_uri(a, b) + " See `git help clone' + " https:// [user@] github.com[:port] / junegunn/vim-plug [.git] + " [git@] github.com[:port] : junegunn/vim-plug [.git] + " file:// / junegunn/vim-plug [/] + " / junegunn/vim-plug [/] + let pat = '^\%(\w\+://\)\='.'\%([^@/]*@\)\='.'\([^:/]*\%(:[0-9]*\)\=\)'.'[:/]'.'\(.\{-}\)'.'\%(\.git\)\=/\?$' + let ma = matchlist(a:a, pat) + let mb = matchlist(a:b, pat) + return ma[1:2] ==# mb[1:2] +endfunction + +function! s:format_message(bullet, name, message) + if a:bullet != 'x' + return [printf('%s %s: %s', a:bullet, a:name, s:lastline(a:message))] + else + let lines = map(s:lines(a:message), '" ".v:val') + return extend([printf('x %s:', a:name)], lines) + endif +endfunction + +function! s:with_cd(cmd, dir, ...) + let script = a:0 > 0 ? a:1 : 1 + return printf('cd%s %s && %s', s:is_win ? ' /d' : '', plug#shellescape(a:dir, {'script': script}), a:cmd) +endfunction + +function! s:system(cmd, ...) + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(1) + if type(a:cmd) == s:TYPE.list + " Neovim's system() supports list argument to bypass the shell + " but it cannot set the working directory for the command. + " Assume that the command does not rely on the shell. + if has('nvim') && a:0 == 0 + return system(a:cmd) + endif + let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"shell": &shell, "script": 0})')) + if &shell =~# 'powershell\(\.exe\)\?$' + let cmd = '& ' . cmd + endif + else + let cmd = a:cmd + endif + if a:0 > 0 + let cmd = s:with_cd(cmd, a:1, type(a:cmd) != s:TYPE.list) + endif + if s:is_win && type(a:cmd) != s:TYPE.list + let [batchfile, cmd] = s:batchfile(cmd) + endif + return system(cmd) + finally + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry +endfunction + +function! s:system_chomp(...) + let ret = call('s:system', a:000) + return v:shell_error ? '' : substitute(ret, '\n$', '', '') +endfunction + +function! s:git_validate(spec, check_branch) + let err = '' + if isdirectory(a:spec.dir) + let result = [s:git_local_branch(a:spec.dir), s:git_origin_url(a:spec.dir)] + let remote = result[-1] + if empty(remote) + let err = join([remote, 'PlugClean required.'], "\n") + elseif !s:compare_git_uri(remote, a:spec.uri) + let err = join(['Invalid URI: '.remote, + \ 'Expected: '.a:spec.uri, + \ 'PlugClean required.'], "\n") + elseif a:check_branch && has_key(a:spec, 'commit') + let sha = s:git_revision(a:spec.dir) + if empty(sha) + let err = join(add(result, 'PlugClean required.'), "\n") + elseif !s:hash_match(sha, a:spec.commit) + let err = join([printf('Invalid HEAD (expected: %s, actual: %s)', + \ a:spec.commit[:6], sha[:6]), + \ 'PlugUpdate required.'], "\n") + endif + elseif a:check_branch + let current_branch = result[0] + " Check tag + let origin_branch = s:git_origin_branch(a:spec) + if has_key(a:spec, 'tag') + let tag = s:system_chomp('git describe --exact-match --tags HEAD 2>&1', a:spec.dir) + if a:spec.tag !=# tag && a:spec.tag !~ '\*' + let err = printf('Invalid tag: %s (expected: %s). Try PlugUpdate.', + \ (empty(tag) ? 'N/A' : tag), a:spec.tag) + endif + " Check branch + elseif origin_branch !=# current_branch + let err = printf('Invalid branch: %s (expected: %s). Try PlugUpdate.', + \ current_branch, origin_branch) + endif + if empty(err) + let [ahead, behind] = split(s:lastline(s:system([ + \ 'git', 'rev-list', '--count', '--left-right', + \ printf('HEAD...origin/%s', origin_branch) + \ ], a:spec.dir)), '\t') + if !v:shell_error && ahead + if behind + " Only mention PlugClean if diverged, otherwise it's likely to be + " pushable (and probably not that messed up). + let err = printf( + \ "Diverged from origin/%s (%d commit(s) ahead and %d commit(s) behind!\n" + \ .'Backup local changes and run PlugClean and PlugUpdate to reinstall it.', origin_branch, ahead, behind) + else + let err = printf("Ahead of origin/%s by %d commit(s).\n" + \ .'Cannot update until local changes are pushed.', + \ origin_branch, ahead) + endif + endif + endif + endif + else + let err = 'Not found' + endif + return [err, err =~# 'PlugClean'] +endfunction + +function! s:rm_rf(dir) + if isdirectory(a:dir) + return s:system(s:is_win + \ ? 'rmdir /S /Q '.plug#shellescape(a:dir) + \ : ['rm', '-rf', a:dir]) + endif +endfunction + +function! s:clean(force) + call s:prepare() + call append(0, 'Searching for invalid plugins in '.g:plug_home) + call append(1, '') + + " List of valid directories + let dirs = [] + let errs = {} + let [cnt, total] = [0, len(g:plugs)] + for [name, spec] in items(g:plugs) + if !s:is_managed(name) + call add(dirs, spec.dir) + else + let [err, clean] = s:git_validate(spec, 1) + if clean + let errs[spec.dir] = s:lines(err)[0] + else + call add(dirs, spec.dir) + endif + endif + let cnt += 1 + call s:progress_bar(2, repeat('=', cnt), total) + normal! 2G + redraw + endfor + + let allowed = {} + for dir in dirs + let allowed[s:dirpath(s:plug_fnamemodify(dir, ':h:h'))] = 1 + let allowed[dir] = 1 + for child in s:glob_dir(dir) + let allowed[child] = 1 + endfor + endfor + + let todo = [] + let found = sort(s:glob_dir(g:plug_home)) + while !empty(found) + let f = remove(found, 0) + if !has_key(allowed, f) && isdirectory(f) + call add(todo, f) + call append(line('$'), '- ' . f) + if has_key(errs, f) + call append(line('$'), ' ' . errs[f]) + endif + let found = filter(found, 'stridx(v:val, f) != 0') + end + endwhile + + 4 + redraw + if empty(todo) + call append(line('$'), 'Already clean.') + else + let s:clean_count = 0 + call append(3, ['Directories to delete:', '']) + redraw! + if a:force || s:ask_no_interrupt('Delete all directories?') + call s:delete([6, line('$')], 1) + else + call setline(4, 'Cancelled.') + nnoremap d :set opfunc=delete_opg@ + nmap dd d_ + xnoremap d :call delete_op(visualmode(), 1) + echo 'Delete the lines (d{motion}) to delete the corresponding directories' + endif + endif + 4 + setlocal nomodifiable +endfunction + +function! s:delete_op(type, ...) + call s:delete(a:0 ? [line("'<"), line("'>")] : [line("'["), line("']")], 0) +endfunction + +function! s:delete(range, force) + let [l1, l2] = a:range + let force = a:force + let err_count = 0 + while l1 <= l2 + let line = getline(l1) + if line =~ '^- ' && isdirectory(line[2:]) + execute l1 + redraw! + let answer = force ? 1 : s:ask('Delete '.line[2:].'?', 1) + let force = force || answer > 1 + if answer + let err = s:rm_rf(line[2:]) + setlocal modifiable + if empty(err) + call setline(l1, '~'.line[1:]) + let s:clean_count += 1 + else + delete _ + call append(l1 - 1, s:format_message('x', line[1:], err)) + let l2 += len(s:lines(err)) + let err_count += 1 + endif + let msg = printf('Removed %d directories.', s:clean_count) + if err_count > 0 + let msg .= printf(' Failed to remove %d directories.', err_count) + endif + call setline(4, msg) + setlocal nomodifiable + endif + endif + let l1 += 1 + endwhile +endfunction + +function! s:upgrade() + echo 'Downloading the latest version of vim-plug' + redraw + let tmp = s:plug_tempname() + let new = tmp . '/plug.vim' + + try + let out = s:system(['git', 'clone', '--depth', '1', s:plug_src, tmp]) + if v:shell_error + return s:err('Error upgrading vim-plug: '. out) + endif + + if readfile(s:me) ==# readfile(new) + echo 'vim-plug is already up-to-date' + return 0 + else + call rename(s:me, s:me . '.old') + call rename(new, s:me) + unlet g:loaded_plug + echo 'vim-plug has been upgraded' + return 1 + endif + finally + silent! call s:rm_rf(tmp) + endtry +endfunction + +function! s:upgrade_specs() + for spec in values(g:plugs) + let spec.frozen = get(spec, 'frozen', 0) + endfor +endfunction + +function! s:status() + call s:prepare() + call append(0, 'Checking plugins') + call append(1, '') + + let ecnt = 0 + let unloaded = 0 + let [cnt, total] = [0, len(g:plugs)] + for [name, spec] in items(g:plugs) + let is_dir = isdirectory(spec.dir) + if has_key(spec, 'uri') + if is_dir + let [err, _] = s:git_validate(spec, 1) + let [valid, msg] = [empty(err), empty(err) ? 'OK' : err] + else + let [valid, msg] = [0, 'Not found. Try PlugInstall.'] + endif + else + if is_dir + let [valid, msg] = [1, 'OK'] + else + let [valid, msg] = [0, 'Not found.'] + endif + endif + let cnt += 1 + let ecnt += !valid + " `s:loaded` entry can be missing if PlugUpgraded + if is_dir && get(s:loaded, name, -1) == 0 + let unloaded = 1 + let msg .= ' (not loaded)' + endif + call s:progress_bar(2, repeat('=', cnt), total) + call append(3, s:format_message(valid ? '-' : 'x', name, msg)) + normal! 2G + redraw + endfor + call setline(1, 'Finished. '.ecnt.' error(s).') + normal! gg + setlocal nomodifiable + if unloaded + echo "Press 'L' on each line to load plugin, or 'U' to update" + nnoremap L :call status_load(line('.')) + xnoremap L :call status_load(line('.')) + end +endfunction + +function! s:extract_name(str, prefix, suffix) + return matchstr(a:str, '^'.a:prefix.' \zs[^:]\+\ze:.*'.a:suffix.'$') +endfunction + +function! s:status_load(lnum) + let line = getline(a:lnum) + let name = s:extract_name(line, '-', '(not loaded)') + if !empty(name) + call plug#load(name) + setlocal modifiable + call setline(a:lnum, substitute(line, ' (not loaded)$', '', '')) + setlocal nomodifiable + endif +endfunction + +function! s:status_update() range + let lines = getline(a:firstline, a:lastline) + let names = filter(map(lines, 's:extract_name(v:val, "[x-]", "")'), '!empty(v:val)') + if !empty(names) + echo + execute 'PlugUpdate' join(names) + endif +endfunction + +function! s:is_preview_window_open() + silent! wincmd P + if &previewwindow + wincmd p + return 1 + endif +endfunction + +function! s:find_name(lnum) + for lnum in reverse(range(1, a:lnum)) + let line = getline(lnum) + if empty(line) + return '' + endif + let name = s:extract_name(line, '-', '') + if !empty(name) + return name + endif + endfor + return '' +endfunction + +function! s:preview_commit() + if b:plug_preview < 0 + let b:plug_preview = !s:is_preview_window_open() + endif + + let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}') + if empty(sha) + return + endif + + let name = s:find_name(line('.')) + if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir) + return + endif + + if exists('g:plug_pwindow') && !s:is_preview_window_open() + execute g:plug_pwindow + execute 'e' sha + else + execute 'pedit' sha + wincmd P + endif + setlocal previewwindow filetype=git buftype=nofile nobuflisted modifiable + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(1) + let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && git show --no-color --pretty=medium '.sha + if s:is_win + let [batchfile, cmd] = s:batchfile(cmd) + endif + execute 'silent %!' cmd + finally + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry + setlocal nomodifiable + nnoremap q :q + wincmd p +endfunction + +function! s:section(flags) + call search('\(^[x-] \)\@<=[^:]\+:', a:flags) +endfunction + +function! s:format_git_log(line) + let indent = ' ' + let tokens = split(a:line, nr2char(1)) + if len(tokens) != 5 + return indent.substitute(a:line, '\s*$', '', '') + endif + let [graph, sha, refs, subject, date] = tokens + let tag = matchstr(refs, 'tag: [^,)]\+') + let tag = empty(tag) ? ' ' : ' ('.tag.') ' + return printf('%s%s%s%s%s (%s)', indent, graph, sha, tag, subject, date) +endfunction + +function! s:append_ul(lnum, text) + call append(a:lnum, ['', a:text, repeat('-', len(a:text))]) +endfunction + +function! s:diff() + call s:prepare() + call append(0, ['Collecting changes ...', '']) + let cnts = [0, 0] + let bar = '' + let total = filter(copy(g:plugs), 's:is_managed(v:key) && isdirectory(v:val.dir)') + call s:progress_bar(2, bar, len(total)) + for origin in [1, 0] + let plugs = reverse(sort(items(filter(copy(total), (origin ? '' : '!').'(has_key(v:val, "commit") || has_key(v:val, "tag"))')))) + if empty(plugs) + continue + endif + call s:append_ul(2, origin ? 'Pending updates:' : 'Last update:') + for [k, v] in plugs + let branch = s:git_origin_branch(v) + if len(branch) + let range = origin ? '..origin/'.branch : 'HEAD@{1}..' + let cmd = ['git', 'log', '--graph', '--color=never'] + if s:git_version_requirement(2, 10, 0) + call add(cmd, '--no-show-signature') + endif + call extend(cmd, ['--pretty=format:%x01%h%x01%d%x01%s%x01%cr', range]) + if has_key(v, 'rtp') + call extend(cmd, ['--', v.rtp]) + endif + let diff = s:system_chomp(cmd, v.dir) + if !empty(diff) + let ref = has_key(v, 'tag') ? (' (tag: '.v.tag.')') : has_key(v, 'commit') ? (' '.v.commit) : '' + call append(5, extend(['', '- '.k.':'.ref], map(s:lines(diff), 's:format_git_log(v:val)'))) + let cnts[origin] += 1 + endif + endif + let bar .= '=' + call s:progress_bar(2, bar, len(total)) + normal! 2G + redraw + endfor + if !cnts[origin] + call append(5, ['', 'N/A']) + endif + endfor + call setline(1, printf('%d plugin(s) updated.', cnts[0]) + \ . (cnts[1] ? printf(' %d plugin(s) have pending updates.', cnts[1]) : '')) + + if cnts[0] || cnts[1] + nnoremap (plug-preview) :silent! call preview_commit() + if empty(maparg("\", 'n')) + nmap (plug-preview) + endif + if empty(maparg('o', 'n')) + nmap o (plug-preview) + endif + endif + if cnts[0] + nnoremap X :call revert() + echo "Press 'X' on each block to revert the update" + endif + normal! gg + setlocal nomodifiable +endfunction + +function! s:revert() + if search('^Pending updates', 'bnW') + return + endif + + let name = s:find_name(line('.')) + if empty(name) || !has_key(g:plugs, name) || + \ input(printf('Revert the update of %s? (y/N) ', name)) !~? '^y' + return + endif + + call s:system('git reset --hard HEAD@{1} && git checkout '.plug#shellescape(g:plugs[name].branch).' --', g:plugs[name].dir) + setlocal modifiable + normal! "_dap + setlocal nomodifiable + echo 'Reverted' +endfunction + +function! s:snapshot(force, ...) abort + call s:prepare() + setf vim + call append(0, ['" Generated by vim-plug', + \ '" '.strftime("%c"), + \ '" :source this file in vim to restore the snapshot', + \ '" or execute: vim -S snapshot.vim', + \ '', '', 'PlugUpdate!']) + 1 + let anchor = line('$') - 3 + let names = sort(keys(filter(copy(g:plugs), + \'has_key(v:val, "uri") && !has_key(v:val, "commit") && isdirectory(v:val.dir)'))) + for name in reverse(names) + let sha = s:git_revision(g:plugs[name].dir) + if !empty(sha) + call append(anchor, printf("silent! let g:plugs['%s'].commit = '%s'", name, sha)) + redraw + endif + endfor + + if a:0 > 0 + let fn = s:plug_expand(a:1) + if filereadable(fn) && !(a:force || s:ask(a:1.' already exists. Overwrite?')) + return + endif + call writefile(getline(1, '$'), fn) + echo 'Saved as '.a:1 + silent execute 'e' s:esc(fn) + setf vim + endif +endfunction + +function! s:split_rtp() + return split(&rtp, '\\\@' to make sure tab is not mapped by other plugin. +inoremap + \ pumvisible() ? "\" : + \ check_back_space() ? "\" : + \ coc#refresh() +inoremap pumvisible() ? "\" : "\" + +function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction + +" Use to trigger completion. +inoremap coc#refresh() + +" Use to confirm completion, `u` means break undo chain at current position. +" Coc only does snippet and additional edit on confirm. +inoremap pumvisible() ? "\" : "\u\" + +" Use `[c` and `]c` to navigate diagnostics +nmap [c (coc-diagnostic-prev) +nmap ]c (coc-diagnostic-next) + +" Remap keys for gotos +nmap gd (coc-definition) +nmap gy (coc-type-definition) +nmap gi (coc-implementation) +nmap gr (coc-references) + +" Use K to show documentation in preview window +nnoremap K :call show_documentation() + +function! s:show_documentation() + if (index(['vim','help'], &filetype) >= 0) + execute 'h '.expand('') + else + call CocAction('doHover') + endif +endfunction + +" Highlight symbol under cursor on CursorHold +autocmd CursorHold * silent call CocActionAsync('highlight') + +" Remap for rename current word +nmap rn (coc-rename) + +" Remap for format selected region +xmap f (coc-format-selected) +nmap f (coc-format-selected) + +augroup mygroup + autocmd! + " Setup formatexpr specified filetype(s). + autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') + " Update signature help on jump placeholder + autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') +augroup end + +" Remap for do codeAction of selected region, ex: `aap` for current paragraph +xmap a (coc-codeaction-selected) +nmap a (coc-codeaction-selected) + +" Remap for do codeAction of current line +nmap ac (coc-codeaction) +" Fix autofix problem of current line +nmap qf (coc-fix-current) + +" Use for select selections ranges, needs server support, like: coc-tsserver, coc-python +nmap (coc-range-select) +xmap (coc-range-select) +xmap (coc-range-select-backword) + +" Use `:Format` to format current buffer +command! -nargs=0 Format :call CocAction('format') + +" Use `:Fold` to fold current buffer +command! -nargs=? Fold :call CocAction('fold', ) + +" use `:OR` for organize import of current buffer +command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport') + +" Add status line support, for integration with other plugin, checkout `:h coc-status` +set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} + +" Using CocList +" Show all diagnostics +nnoremap a :CocList diagnostics +" Manage extensions +nnoremap e :CocList extensions +" Show commands +nnoremap c :CocList commands +" Find symbol of current document +nnoremap o :CocList outline +" Search workspace symbols +nnoremap s :CocList -I symbols +" Do default action for next item. +nnoremap j :CocNext +" Do default action for previous item. +nnoremap k :CocPrev +" Resume latest coc list +nnoremap p :CocListResume + +set clipboard+=unnamedplus + +function! GetHighlightGroup() + let l:s = synID(line('.'), col('.'), 1) + echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name') + endfunction + +nnoremap gA :call GetHighlightGroup() + +set fillchars=eob:\ diff --git a/neovim_vimscriptonly/nvim/confs/cpp.vim b/neovim_vimscriptonly/nvim/confs/cpp.vim new file mode 100644 index 0000000..ba4c1e5 --- /dev/null +++ b/neovim_vimscriptonly/nvim/confs/cpp.vim @@ -0,0 +1,19 @@ +let g:AutoPairsFlyMode = 1 +let g:rainbow_active = 1 +let g:cpp_class_scope_highlight = 1 +let g:cpp_member_variable_highlight = 1 +let g:cpp_class_decl_highlight = 1 +let g:cpp_posix_standard = 1 +let g:cpp_experimental_template_highlight = 1 +let g:cpp_no_function_highlight = 1 +let g:cpp_no_function_highlight = 1 +let g:cpp_simple_highlight = 1 + +" format settings for clang + +let g:clang_format#style_options = { + \ "AccessModifierOffset" : -4, + \ "AllowShortIfStatementsOnASingleLine" : "true", + \ "AlwaysBreakTemplateDeclarations" : "true", + \ "Standard" : "C++11", + \ "BreakBeforeBraces" : "Stroustrup"} diff --git a/neovim_vimscriptonly/nvim/confs/gitSigns.vim b/neovim_vimscriptonly/nvim/confs/gitSigns.vim new file mode 100644 index 0000000..90cfc41 --- /dev/null +++ b/neovim_vimscriptonly/nvim/confs/gitSigns.vim @@ -0,0 +1,32 @@ +lua << EOF + +require('gitsigns').setup { + signs = { + add = {hl = 'DiffAdd' , text = '▌', numhl='GitSignsAddNr'}, + change = {hl = 'DiffChange', text = '▌', numhl='GitSignsChangeNr'}, + delete = {hl = 'DiffDelete', text = '_', numhl='GitSignsDeleteNr'}, + topdelete = {hl = 'DiffDelete', text = '‾', numhl='GitSignsDeleteNr'}, + changedelete = {hl = 'DiffChange', text = '~', numhl='GitSignsChangeNr'}, + }, + numhl = false, + keymaps = { + -- Default keymap options + noremap = true, + buffer = true, + + ['n ]c'] = { expr = true, "&diff ? ']c' : 'lua require\"gitsigns\".next_hunk()'"}, + ['n [c'] = { expr = true, "&diff ? '[c' : 'lua require\"gitsigns\".prev_hunk()'"}, + + ['n hs'] = 'lua require"gitsigns".stage_hunk()', + ['n hu'] = 'lua require"gitsigns".undo_stage_hunk()', + ['n hr'] = 'lua require"gitsigns".reset_hunk()', + ['n hp'] = 'lua require"gitsigns".preview_hunk()', + ['n hb'] = 'lua require"gitsigns".blame_line()', + }, + watch_index = { + interval = 100 + }, + sign_priority = 5, + status_formatter = nil, -- Use default +} +EOF diff --git a/neovim_vimscriptonly/nvim/confs/keybinds.vim b/neovim_vimscriptonly/nvim/confs/keybinds.vim new file mode 100644 index 0000000..606e73f --- /dev/null +++ b/neovim_vimscriptonly/nvim/confs/keybinds.vim @@ -0,0 +1,19 @@ +" new tab and switching between em + +nnoremap : tabnew +nnoremap : tabp +nnoremap : tabn + +"nnoremap :%!astyle +nnoremap :%y+ + +map k +map j +map l +map h + + +nnoremap , :Neoformat +nnoremap . :w + +inoremap kk diff --git a/neovim_vimscriptonly/nvim/confs/miscSettings.vim b/neovim_vimscriptonly/nvim/confs/miscSettings.vim new file mode 100644 index 0000000..d73291f --- /dev/null +++ b/neovim_vimscriptonly/nvim/confs/miscSettings.vim @@ -0,0 +1,52 @@ +" open new split panes to right and below +set splitright +set splitbelow +" turn terminal to normal mode with escape +tnoremap +" start terminal in insert mode +au BufEnter * if &buftype == 'terminal' | :startinsert | endif + +" open terminal on the bottom +function! OpenTerminal() + split term://bash + resize 10 +endfunction +nnoremap :call OpenTerminal() +nnoremap :vnew term://bash + +set updatetime=250 "for gitsigns" +let g:tagalong_verbose = 1 + +set showtabline=0 " Show tabline +set guioptions-=e " Don't use GUI tabline +set mouse=a + +" if hidden is not set, TextEdit might fail. +set hidden + +" Some servers have issues with backup files, see #649 +set nobackup +set nowritebackup + +" Better display for messages +set cmdheight=1 + +" don't give |ins-completion-menu| messages. +set shortmess+=c + +" always show signcolumns +set signcolumn=yes + +"hi CustomExplorerBg guibg=#22262C + +"augroup NvimTree +" au! +" au FileType NvimTree setlocal winhighlight=Normal:CustomExplorerBg +"augroup END + +let g:auto_save = 1 + +" let mapleader = "'" +set ignorecase +set noswapfile +set title diff --git a/neovim_vimscriptonly/nvim/confs/nvimTree.vim b/neovim_vimscriptonly/nvim/confs/nvimTree.vim new file mode 100644 index 0000000..10afcde --- /dev/null +++ b/neovim_vimscriptonly/nvim/confs/nvimTree.vim @@ -0,0 +1,148 @@ +let g:nvim_tree_side = 'left' "left by default +let g:nvim_tree_width = 24 "30 by default +let g:nvim_tree_ignore = [ '.git', 'node_modules', '.cache' ] "empty by default +let g:nvim_tree_auto_open = 0 "0 by default, opens the tree when typing `vim $DIR` or `vim` +let g:nvim_tree_auto_close = 0 "0 by default, closes the tree when it's the last window +let g:nvim_tree_quit_on_open = 0 "0 by default, closes the tree when you open a file +let g:nvim_tree_follow = 1 "0 by default, this option allows the cursor to be updated when entering a buffer +let g:nvim_tree_indent_markers = 1 "0 by default, this option shows indent markers when folders are open +let g:nvim_tree_hide_dotfiles = 1 "0 by default, this option hides files and folders starting with a dot `.` +let g:nvim_tree_git_hl = 1 "0 by default, will enable file highlight for git attributes (can be used without the icons). +let g:nvim_tree_root_folder_modifier = ':~' "This is the default. See :help filename-modifiers for more options +let g:nvim_tree_tab_open = 1 "0 by default, will open the tree when entering a new tab and the tree was previously open +let g:nvim_tree_allow_resize = 1 "0 by default, will not resize the tree when opening a file +let g:nvim_tree_show_icons = { + \ 'git': 1, + \ 'folders': 1, + \ 'files': 1, + \ } + +" default will show icon by default if no icon is provided +" default shows no icon by default +let g:nvim_tree_icons = { + \ 'default': '', + \ 'symlink': '', + \ 'git': { + \ 'unstaged': "✗", + \ 'staged': "✓", + \ 'unmerged': "", + \ 'renamed': "➜", + \ 'untracked': "★" + \ }, + \ 'folder': { + \ 'default': "", + \ 'open': "", + \ 'symlink': "", + \ } + \ } + +"hi LuaTreeIndentMarker guifg=#C8CCD4 +nnoremap :NvimTreeToggle +nnoremap r :LuaTreeRefresh +nnoremap n :LuaTreeFindFile +" LuaTreeOpen and LuaTreeClose are also available if you need them + +" a list of groups can be found at `:help nvim_tree_highlight` +highlight NvimTreeFolderIcon guifg= #61afef +highlight NvimTreeFolderName guifg = #61afef + + +lua << EOF +local get_lua_cb = function (cb_name) + return string.format(":lua require'nvim-tree'.on_keypress('%s')", cb_name) +end + +-- Mappings for nvimtree +vim.g.nvim_tree_bindings = { + [""] = get_lua_cb("edit"), + ["o"] = get_lua_cb("edit"), + ["<2-LeftMouse>"] = get_lua_cb("edit"), + ["<2-RightMouse>"] = get_lua_cb("cd"), + [""] = get_lua_cb("cd"), + [""] = get_lua_cb("vsplit"), + [""] = get_lua_cb("split"), + [""] = get_lua_cb("tabnew"), + [""] = get_lua_cb("close_node"), + [""] = get_lua_cb("close_node"), + [""] = get_lua_cb("preview"), + ["I"] = get_lua_cb("toggle_ignored"), + ["H"] = get_lua_cb("toggle_dotfiles"), + ["R"] = get_lua_cb("refresh"), + ["a"] = get_lua_cb("create"), + ["d"] = get_lua_cb("remove"), + ["r"] = get_lua_cb("rename"), + [""] = get_lua_cb("full_rename"), + ["x"] = get_lua_cb("cut"), + ["c"] = get_lua_cb("copy"), + ["p"] = get_lua_cb("paste"), + ["[c"] = get_lua_cb("prev_git_item"), + ["]c"] = get_lua_cb("next_git_item"), + ["-"] = get_lua_cb("dir_up"), + ["q"] = get_lua_cb("close"), +} + +require'nvim-web-devicons'.setup { + -- your personnal icons can go here (to override) + -- DevIcon will be appended to `name` + override = { + html = { + icon = "", + color = "#DE8C92", + name = "html" + }, + css = { + icon = "", + color = "#61afef", + name = "css" + }, + js = { + icon = "", + color = "#EBCB8B", + name = "js" + }, + png = { + icon = " ", + color = "#BD77DC", + name = "png" + }, + jpg = { + icon = " ", + color = "#BD77DC", + name = "jpg" + }, + jpeg = { + icon = " ", + color = "#BD77DC", + name = "jpeg" + }, + mp3 = { + icon = "", + color = "#C8CCD4", + name = "mp3" + }, + mp4 = { + icon = "", + color = "#C8CCD4", + name = "mp4" + }, + out = { + icon = "", + color = "#C8CCD4", + name = "out" + }, + toml = { + icon = "", + color = "#61afef", + name = "toml" + }, + lock = { + icon = "", + color = "#DE6B74", + name = "lock" + } + }; + -- globally enable default icons (default to false) + -- will get overriden by `get_icons` option + default = true; +} +EOF diff --git a/neovim_vimscriptonly/nvim/confs/pluginList.vim b/neovim_vimscriptonly/nvim/confs/pluginList.vim new file mode 100644 index 0000000..905e52e --- /dev/null +++ b/neovim_vimscriptonly/nvim/confs/pluginList.vim @@ -0,0 +1,22 @@ +call plug#begin('~/.local/share/nvim/site/plugged') +Plug 'nvim-lua/plenary.nvim' +Plug 'lewis6991/gitsigns.nvim' +Plug 'sbdchd/neoformat' +Plug 'glepnir/galaxyline.nvim' +"Plug 'tweekmonster/startuptime.vim' +Plug 'akinsho/nvim-bufferline.lua' +Plug '907th/vim-auto-save' +Plug 'michalliu/jsruntime.vim' +Plug 'kyazdani42/nvim-tree.lua' +Plug 'kyazdani42/nvim-web-devicons' +Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} +Plug 'chriskempson/base16-vim' +Plug 'norcalli/nvim-colorizer.lua' +Plug 'jiangmiao/auto-pairs' +Plug 'alvan/vim-closetag' +Plug 'bfrg/vim-cpp-modern' +Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}} +Plug 'Yggdroot/indentLine' +Plug 'ryanoasis/vim-devicons' +Plug 'tpope/vim-surround' +call plug#end() diff --git a/neovim_vimscriptonly/nvim/confs/rust.vim b/neovim_vimscriptonly/nvim/confs/rust.vim new file mode 100644 index 0000000..c74293a --- /dev/null +++ b/neovim_vimscriptonly/nvim/confs/rust.vim @@ -0,0 +1,16 @@ +" GoTo code navigation. +nmap gd (coc-definition) +nmap gy (coc-type-definition) +nmap gi (coc-implementation) +nmap gr (coc-references) + +" Use K to show documentation in preview window. +nnoremap K :call show_documentation() + +function! s:show_documentation() + if (index(['vim','help'], &filetype) >= 0) + execute 'h '.expand('') + else + call CocAction('doHover') + endif +endfunction diff --git a/neovim_vimscriptonly/nvim/confs/statusline.vim b/neovim_vimscriptonly/nvim/confs/statusline.vim new file mode 100644 index 0000000..7828eb7 --- /dev/null +++ b/neovim_vimscriptonly/nvim/confs/statusline.vim @@ -0,0 +1,193 @@ +lua << EOF +local gl = require('galaxyline') +local gls = gl.section +gl.short_line_list = {'LuaTree','vista','dbui'} + +local colors = { + bg = '#282c34', + line_bg = '#282c34', + fg = '#D8DEE9', + fg_green = '#65a380', + yellow = '#A3BE8C', + cyan = '#22262C', + darkblue = '#61afef', + green = '#BBE67E', + orange = '#FF8800', + purple = '#252930', + magenta = '#c678dd', + blue = '#22262C'; + red = '#DF8890', + lightbg = '#3C4048', + nord = '#81A1C1', + greenYel = '#EBCB8B' +} + +gls.left[1] = { + leftRounded = { + provider = function() return '' end, + highlight = { colors.red, colors.bg } + }, +} + +gls.left[2] = { + ViMode = { + provider = function() + return '  ' + end, + highlight = {colors.bg,colors.red}, + separator = ' ', + separator_highlight = {colors.lightbg,colors.lightbg}, + }, +} + +gls.left[3] ={ + FileIcon = { + provider = 'FileIcon', + condition = buffer_not_empty, + highlight = {require('galaxyline.provider_fileinfo').get_file_icon_color,colors.lightbg}, + }, +} + +gls.left[4] = { + FileName = { + provider = {'FileName','FileSize'}, + condition = buffer_not_empty, + highlight = {colors.fg,colors.lightbg} + } +} + +gls.left[5] = { + teech = { + provider = function() return '' end, + separator = ' ', + highlight = { colors.lightbg, colors.bg } + }, +} + +local checkwidth = function() + local squeeze_width = vim.fn.winwidth(0) / 2 + if squeeze_width > 40 then + return true + end + return false +end + +gls.left[6] = { + DiffAdd = { + provider = 'DiffAdd', + condition = checkwidth, + icon = '  ', + highlight = {colors.greenYel,colors.line_bg}, + } +} + +gls.left[7] = { + DiffModified = { + provider = 'DiffModified', + condition = checkwidth, + icon = ' ', + highlight = {colors.orange,colors.line_bg}, + } +} + +gls.left[8] = { + DiffRemove = { + provider = 'DiffRemove', + condition = checkwidth, + icon = ' ', + highlight = {colors.red,colors.line_bg}, + } +} + +gls.left[9] = { + LeftEnd = { + provider = function() return ' ' end, + separator = ' ', + separator_highlight = {colors.line_bg,colors.line_bg}, + highlight = {colors.line_bg,colors.line_bg} + } +} + +gls.left[10] = { + DiagnosticError = { + provider = 'DiagnosticError', + icon = '  ', + highlight = {colors.red,colors.bg} + } +} + +gls.left[11] = { + Space = { + provider = function () return ' ' end, + highlight = {colors.line_bg,colors.line_bg} + } +} + +gls.left[12] = { + DiagnosticWarn = { + provider = 'DiagnosticWarn', + icon = '  ', + highlight = {colors.blue,colors.bg}, + } +} + +gls.right[1] = { + GitIcon = { + provider = function() return '  ' end, + condition = require('galaxyline.provider_vcs').check_git_workspace, + highlight = {colors.green,colors.line_bg}, + } +} + +gls.right[2] = { + GitBranch = { + provider = 'GitBranch', + condition = require('galaxyline.provider_vcs').check_git_workspace, + highlight = {colors.green,colors.line_bg}, + } +} + +gls.right[3] = { + right_LeftRounded = { + provider = function() return '' end, + separator = ' ', + separator_highlight = {colors.bg,colors.bg}, + highlight = { colors.nord, colors.bg } + }, +} + +gls.right[4] = { + SiMode = { + provider = function() + local alias = { + n = 'NORMAL', + i = 'INSERT', + c = 'COMMAND', + V = 'VISUAL', + [''] = 'VISUAL', + v = 'VISUAL', + R = 'REPLACE', + } + return alias[vim.fn.mode()] + end, + highlight = { colors.bg, colors.nord }, + }, +} + + +gls.right[5] = { + PerCent = { + provider = 'LinePercent', + separator = ' ', + separator_highlight = {colors.nord,colors.nord}, + highlight = {colors.bg,colors.fg}, + } +} + +gls.right[6] = { + rightRounded = { + provider = function() return '' end, + highlight = { colors.fg, colors.bg } + }, +} +EOF diff --git a/neovim_vimscriptonly/nvim/confs/tabline.vim b/neovim_vimscriptonly/nvim/confs/tabline.vim new file mode 100644 index 0000000..95d3095 --- /dev/null +++ b/neovim_vimscriptonly/nvim/confs/tabline.vim @@ -0,0 +1,103 @@ +" Close buffer +nnoremap :BufferClose +" Wipeout buffer +" :BufferWipeout +" Close commands +" :BufferCloseAllButCurrent +" :BufferCloseBuffersRight +nnoremap mymap :lua require"bufferline".go_to_buffer(num) + +nnoremap [b :BufferLineCycleNext +nnoremap b] :BufferLineCyclePrev + +nnoremap [n :BufferLineMoveNext +nnoremap n] :BufferLineMovePrev + +lua << EOF + +require'bufferline'.setup{ + options = { + buffer_close_icon= '', + modified_icon = '●', + close_icon = '', + left_trunc_marker = '', + right_trunc_marker = '', + max_name_length = 14, + max_prefix_length = 13, + tab_size = 18, + enforce_regular_tabs = true , + view = "multiwindow" , + show_buffer_close_icons = true , + separator_style = "thin" + }, + + highlights = { + background = { + guifg = comment_fg, + guibg = '#282c34' + }, + fill = { + guifg = comment_fg, + guibg = '#282c34' + }, + buffer_selected = { + guifg = normal_fg, + guibg = '#3A3E44', + gui = "bold" + }, + separator_visible = { + guifg = '#282c34' , + guibg = '#282c34' + }, + separator_selected = { + guifg = '#282c34' , + guibg = '#282c34' + }, + separator = { + guifg = '#282c34' , + guibg = '#282c34' + }, + indicator_selected = { + guifg = '#282c34' , + guibg = '#282c34' + }, + modified_selected = { + guifg = string_fg, + guibg = '#3A3E44' + } + }; +} + + + +require('gitsigns').setup { + signs = { + add = {hl = 'DiffAdd' , text = '▌', numhl='GitSignsAddNr'}, + change = {hl = 'DiffChange', text = '▌', numhl='GitSignsChangeNr'}, + delete = {hl = 'DiffDelete', text = '_', numhl='GitSignsDeleteNr'}, + topdelete = {hl = 'DiffDelete', text = '‾', numhl='GitSignsDeleteNr'}, + changedelete = {hl = 'DiffChange', text = '~', numhl='GitSignsChangeNr'}, + }, + numhl = false, + keymaps = { + -- Default keymap options + noremap = true, + buffer = true, + + ['n ]c'] = { expr = true, "&diff ? ']c' : 'lua require\"gitsigns\".next_hunk()'"}, + ['n [c'] = { expr = true, "&diff ? '[c' : 'lua require\"gitsigns\".prev_hunk()'"}, + + ['n hs'] = 'lua require"gitsigns".stage_hunk()', + ['n hu'] = 'lua require"gitsigns".undo_stage_hunk()', + ['n hr'] = 'lua require"gitsigns".reset_hunk()', + ['n hp'] = 'lua require"gitsigns".preview_hunk()', + ['n hb'] = 'lua require"gitsigns".blame_line()', + }, + watch_index = { + interval = 100 + }, + sign_priority = 5, + status_formatter = nil, -- Use default +} + +EOF diff --git a/neovim_vimscriptonly/nvim/confs/treesitter.vim b/neovim_vimscriptonly/nvim/confs/treesitter.vim new file mode 100644 index 0000000..9cebaee --- /dev/null +++ b/neovim_vimscriptonly/nvim/confs/treesitter.vim @@ -0,0 +1,14 @@ +lua < Date: Wed, 10 Mar 2021 14:35:16 +0530 Subject: [PATCH 0015/1541] plugin list info --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 00db034..75c4db3 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,13 @@ slowly migrating to init.lua , so still WIP! +some cool lua plugins I use + +nvim-web-devicons , lua fork of vim devicons which lets me change icons of filetypes + +nvim-tree.lua , a fast file tree +galaxyline , as statusline +gitsigns.nvim , to show git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) +nvim-bufferline.lua , as a top bufferline like thing which lets me switch tabs , close them. +nvim-treesitter' , better syntax highlighting for programming languages. + From 462559561b71f3231b14b78dce82f7f4e2fb09ce Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 10 Mar 2021 14:35:59 +0530 Subject: [PATCH 0016/1541] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 75c4db3..79dca39 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ some cool lua plugins I use nvim-web-devicons , lua fork of vim devicons which lets me change icons of filetypes -nvim-tree.lua , a fast file tree -galaxyline , as statusline +- nvim-tree.lua , a fast file tree +- galaxyline , as statusline gitsigns.nvim , to show git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) nvim-bufferline.lua , as a top bufferline like thing which lets me switch tabs , close them. nvim-treesitter' , better syntax highlighting for programming languages. From a57cb7d0618537f5b2b38b79045d26c31eb1a382 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 10 Mar 2021 14:36:29 +0530 Subject: [PATCH 0017/1541] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 79dca39..da52314 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ nvim-web-devicons , lua fork of vim devicons which lets me change icons of filet - nvim-tree.lua , a fast file tree - galaxyline , as statusline -gitsigns.nvim , to show git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) -nvim-bufferline.lua , as a top bufferline like thing which lets me switch tabs , close them. -nvim-treesitter' , better syntax highlighting for programming languages. +- gitsigns.nvim , to show git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) +- nvim-bufferline.lua , as a top bufferline like thing which lets me switch tabs , close them. +- nvim-treesitter' , better syntax highlighting for programming languages. From 04e230eefbc95842cfe7b6485b51674caa635977 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 10 Mar 2021 14:37:36 +0530 Subject: [PATCH 0018/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index da52314..ed40de1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # neovim-dots my neovim dotfiles -slowly migrating to init.lua , so still WIP! +slowly migrating to init.lua and still WIP! so use config from neovim_vimscriptonly/nvim folder only for now. # screenshots From c1bf59d2a9cf2e46704dbf9cb30a92b32b084f65 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 10 Mar 2021 14:38:47 +0530 Subject: [PATCH 0019/1541] clean config --- lua/coc/lua.lua | 36 ------------------------------------ lua/pluginsList/lua.lua | 1 - lua/statusline/lua.lua | 2 +- plugin/packer_compiled.vim | 16 ++++++++++------ 4 files changed, 11 insertions(+), 44 deletions(-) diff --git a/lua/coc/lua.lua b/lua/coc/lua.lua index 50dfab3..e047993 100644 --- a/lua/coc/lua.lua +++ b/lua/coc/lua.lua @@ -41,39 +41,3 @@ norm! gg=G set expandtab sw=2 ]]) - -local remap = vim.api.nvim_set_keymap - -vim.g.coc_global_extensions = { - 'coc-eslint', - 'coc-tslint-plugin', - 'coc-json', - 'coc-css', - 'coc-html', - 'coc-stylelint', - 'coc-tsserver', -} - -vim.g.coc_snippet_next = '' -vim.g.coc_snippet_prev = '' - -vim.g.coc_root_patterns = { '.git', '.env', 'package.json' } - -check_backspace = function() - local col = vim.fn.col('.') - 1 - if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then - return true - else - return false - end -end - -remap('i', '', 'pumvisible() ? "" : v:lua.check_backspace() ? "" : coc#refresh()', { noremap = true, silent = true, expr = true }) -remap('i', '', 'pumvisible() ? "" : ""', { noremap = true, expr = true }) -remap('i', '', 'pumvisible() ? coc#_select_confirm() : "u=coc#on_enter()"', { noremap = true, silent = true, expr = true }) -remap('i', '', 'coc#refresh()', { noremap = true, silent = true, expr = true }) -remap('n', 'K', 'call CocActionAsync("doHover")', { noremap = true, silent = true }) - -remap('n', 'gd', '(coc-definition)', {noremap = true, silent = true}) -remap('n', 'gr', '(coc-references)', {noremap = true, silent = true}) -remap('n', 'gR', '(coc-rename)', {noremap = true, silent = true}) diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index a246e5f..d85c0dd 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -5,7 +5,6 @@ return require('packer').startup(function() use {'wbthomason/packer.nvim', opt = true} use { 'kyazdani42/nvim-web-devicons'} use { 'kyazdani42/nvim-tree.lua'} - use { 'hoob3rt/lualine.nvim'} use { 'neoclide/coc.nvim' , branch = 'release'} use { 'nvim-lua/plenary.nvim'} use { 'lewis6991/gitsigns.nvim'} diff --git a/lua/statusline/lua.lua b/lua/statusline/lua.lua index 0486c05..57ba005 100644 --- a/lua/statusline/lua.lua +++ b/lua/statusline/lua.lua @@ -31,7 +31,7 @@ gls.left[1] = { gls.left[2] = { ViMode = { provider = function() - return ' 󰀘 ' + return '  ' end, highlight = {colors.bg,colors.nord}, separator = ' ', diff --git a/plugin/packer_compiled.vim b/plugin/packer_compiled.vim index b919611..29285aa 100644 --- a/plugin/packer_compiled.vim +++ b/plugin/packer_compiled.vim @@ -36,9 +36,9 @@ _G.packer_plugins = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/base16-vim" }, - ["completion-nvim"] = { + ["coc.nvim"] = { loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/completion-nvim" + path = "/home/sid/.local/share/nvim/site/pack/packer/start/coc.nvim" }, ["galaxyline.nvim"] = { loaded = true, @@ -52,6 +52,14 @@ _G.packer_plugins = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/indentLine" }, + ["lualine.nvim"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/lualine.nvim" + }, + neoformat = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/neoformat" + }, ["nvim-bufferline.lua"] = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-bufferline.lua" @@ -60,10 +68,6 @@ _G.packer_plugins = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua" }, - ["nvim-lspconfig"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-lspconfig" - }, ["nvim-tree.lua"] = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-tree.lua" From f5ebf24fcaf26054ad182757628799fef71aa82c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 11 Mar 2021 13:40:43 +0530 Subject: [PATCH 0020/1541] telescope.nvim --- neovim_vimscriptonly/nvim/confs/keybinds.vim | 2 +- .../nvim/confs/miscSettings.vim | 3 +- .../nvim/confs/pluginList.vim | 4 +- neovim_vimscriptonly/nvim/confs/telescope.vim | 81 +++++++++++++++++++ .../nvim/confs/treesitter.vim | 2 + neovim_vimscriptonly/nvim/init.vim | 8 +- 6 files changed, 94 insertions(+), 6 deletions(-) create mode 100644 neovim_vimscriptonly/nvim/confs/telescope.vim diff --git a/neovim_vimscriptonly/nvim/confs/keybinds.vim b/neovim_vimscriptonly/nvim/confs/keybinds.vim index 606e73f..a0c8c46 100644 --- a/neovim_vimscriptonly/nvim/confs/keybinds.vim +++ b/neovim_vimscriptonly/nvim/confs/keybinds.vim @@ -14,6 +14,6 @@ map h nnoremap , :Neoformat -nnoremap . :w +nnoremap . :Telescope inoremap kk diff --git a/neovim_vimscriptonly/nvim/confs/miscSettings.vim b/neovim_vimscriptonly/nvim/confs/miscSettings.vim index d73291f..fde8526 100644 --- a/neovim_vimscriptonly/nvim/confs/miscSettings.vim +++ b/neovim_vimscriptonly/nvim/confs/miscSettings.vim @@ -46,7 +46,8 @@ set signcolumn=yes let g:auto_save = 1 -" let mapleader = "'" +let mapleader = "b" + set ignorecase set noswapfile set title diff --git a/neovim_vimscriptonly/nvim/confs/pluginList.vim b/neovim_vimscriptonly/nvim/confs/pluginList.vim index 905e52e..cd3060e 100644 --- a/neovim_vimscriptonly/nvim/confs/pluginList.vim +++ b/neovim_vimscriptonly/nvim/confs/pluginList.vim @@ -3,7 +3,6 @@ Plug 'nvim-lua/plenary.nvim' Plug 'lewis6991/gitsigns.nvim' Plug 'sbdchd/neoformat' Plug 'glepnir/galaxyline.nvim' -"Plug 'tweekmonster/startuptime.vim' Plug 'akinsho/nvim-bufferline.lua' Plug '907th/vim-auto-save' Plug 'michalliu/jsruntime.vim' @@ -19,4 +18,7 @@ Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}} Plug 'Yggdroot/indentLine' Plug 'ryanoasis/vim-devicons' Plug 'tpope/vim-surround' +Plug 'nvim-lua/popup.nvim' +Plug 'nvim-telescope/telescope.nvim' +"Plug 'nvim-telescope/telescope-media-files.nvim' call plug#end() diff --git a/neovim_vimscriptonly/nvim/confs/telescope.vim b/neovim_vimscriptonly/nvim/confs/telescope.vim new file mode 100644 index 0000000..0ef4f2a --- /dev/null +++ b/neovim_vimscriptonly/nvim/confs/telescope.vim @@ -0,0 +1,81 @@ +lua <ff lua require('telescope.builtin').find_files() +nnoremap fg lua require('telescope.builtin').live_grep() +nnoremap fb lua require('telescope.builtin').buffers() +nnoremap fh lua require('telescope.builtin').help_tags() + +highlight TelescopeBorder guifg=#3e4451 +highlight TelescopePromptBorder guifg=#3e4451 +highlight TelescopeResultsBorder guifg=#3e4451 +highlight TelescopePreviewBorder guifg=#525865 diff --git a/neovim_vimscriptonly/nvim/confs/treesitter.vim b/neovim_vimscriptonly/nvim/confs/treesitter.vim index 9cebaee..85afa48 100644 --- a/neovim_vimscriptonly/nvim/confs/treesitter.vim +++ b/neovim_vimscriptonly/nvim/confs/treesitter.vim @@ -11,4 +11,6 @@ ts_config.setup { use_languagetree = true, } } + EOF + diff --git a/neovim_vimscriptonly/nvim/init.vim b/neovim_vimscriptonly/nvim/init.vim index cc5bd60..dd8429d 100644 --- a/neovim_vimscriptonly/nvim/init.vim +++ b/neovim_vimscriptonly/nvim/init.vim @@ -1,4 +1,4 @@ -" ------- run plugins ------ +" ------- run plugins ------ source ~/.config/nvim/confs/pluginList.vim " ---- keybinds , look of nvim ------ @@ -9,10 +9,12 @@ source ~/.config/nvim/confs/ui.vim " --- intellisense , linting etc ------ source ~/.config/nvim/confs/cpp.vim source ~/.config/nvim/confs/rust.vim -source ~/.config/nvim/confs/coc.vim +source ~/.config/nvim/confs/coc.vim -" ---- file tree , bufferline and syntax highlighting ------ +" ---- syntax highlighting , file tree , bufferline------ source ~/.config/nvim/confs/treesitter.vim source ~/.config/nvim/confs/nvimTree.vim source ~/.config/nvim/confs/tabline.vim source ~/.config/nvim/confs/statusline.vim + +source ~/.config/nvim/confs/telescope.vim From 601be3a2ffd12b292017ee5c88a6fa25cb41754d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 11 Mar 2021 21:10:34 +0530 Subject: [PATCH 0021/1541] telescope image preview --- neovim_vimscriptonly/nvim/confs/pluginList.vim | 2 +- neovim_vimscriptonly/nvim/confs/telescope.vim | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/neovim_vimscriptonly/nvim/confs/pluginList.vim b/neovim_vimscriptonly/nvim/confs/pluginList.vim index cd3060e..25415c6 100644 --- a/neovim_vimscriptonly/nvim/confs/pluginList.vim +++ b/neovim_vimscriptonly/nvim/confs/pluginList.vim @@ -20,5 +20,5 @@ Plug 'ryanoasis/vim-devicons' Plug 'tpope/vim-surround' Plug 'nvim-lua/popup.nvim' Plug 'nvim-telescope/telescope.nvim' -"Plug 'nvim-telescope/telescope-media-files.nvim' +Plug 'nvim-telescope/telescope-media-files.nvim' call plug#end() diff --git a/neovim_vimscriptonly/nvim/confs/telescope.vim b/neovim_vimscriptonly/nvim/confs/telescope.vim index 0ef4f2a..21bba1b 100644 --- a/neovim_vimscriptonly/nvim/confs/telescope.vim +++ b/neovim_vimscriptonly/nvim/confs/telescope.vim @@ -52,7 +52,7 @@ require('telescope').setup{ }, - --[[ + extensions = { media_files = { @@ -61,17 +61,16 @@ require('telescope').setup{ } } - -- ]] } --- require('telescope').load_extension('media_files') --- require('telescope').extensions.media_files.media_files() +require('telescope').load_extension('media_files') EOF " telescope mappings nnoremap ff lua require('telescope.builtin').find_files() -nnoremap fg lua require('telescope.builtin').live_grep() +"nnoremap fg lua require('telescope.builtin').live_grep() +nnoremap fg lua require('telescope').extensions.media_files.media_files() nnoremap fb lua require('telescope.builtin').buffers() nnoremap fh lua require('telescope.builtin').help_tags() From 7e32c663aca70e9d147d9200b127e6c01b691976 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 12 Mar 2021 00:30:34 +0530 Subject: [PATCH 0022/1541] finally nvim lsp workin! --- init.lua | 7 ++++++ lua/coc/lua.lua | 43 --------------------------------- lua/nvim-compe/lua.lua | 49 ++++++++++++++++++++++++++++++++++++++ lua/nvim-lspconfig/lua.lua | 32 +++++++++++++++++++++++++ lua/pluginsList/lua.lua | 7 ++++-- plugin/packer_compiled.vim | 16 +++++-------- 6 files changed, 99 insertions(+), 55 deletions(-) create mode 100644 lua/nvim-compe/lua.lua create mode 100644 lua/nvim-lspconfig/lua.lua diff --git a/init.lua b/init.lua index 09ba2e8..c7855c3 100644 --- a/init.lua +++ b/init.lua @@ -7,6 +7,11 @@ require('nvimTree.lua') require('bufferline.lua') require('statusline.lua') +-- lsp +require('nvim-lspconfig.lua') +require('nvim-compe.lua') +require('coc.lua') + require('gitsigns.lua') require'colorizer'.setup() @@ -39,3 +44,5 @@ cmd("hi EndOfBuffer guifg=#282c34") -- tree folder name , icon color cmd("highlight NvimTreeFolderIcon guifg = #61afef") cmd("highlight NvimTreeFolderName guifg = #61afef") + +require('nvim-autopairs').setup() diff --git a/lua/coc/lua.lua b/lua/coc/lua.lua index e047993..e69de29 100644 --- a/lua/coc/lua.lua +++ b/lua/coc/lua.lua @@ -1,43 +0,0 @@ -vim.api.nvim_exec([[ - -set fillchars=eob:\ - -tnoremap -" start terminal in insert mode -au BufEnter * if &buftype == 'terminal' | :startinsert | endif - -" open terminal on the bottom -function! OpenTerminal() - split term://bash - resize 10 -endfunction -nnoremap :call OpenTerminal() -nnoremap :vnew term://bash - -set ignorecase -set noswapfile -set title -set shortmess+=c -set updatetime=250 "for gitsigns" - -" new tab and switching between em - -nnoremap : tabnew -nnoremap : tabp -nnoremap : tabn - -map k -map j -map l -map h - -inoremap kk - -let g:indentLine_enabled = 3 -let g:indentLine_char_list = ['▏'] - -norm! gg=G - -set expandtab sw=2 - -]]) diff --git a/lua/nvim-compe/lua.lua b/lua/nvim-compe/lua.lua new file mode 100644 index 0000000..575fe22 --- /dev/null +++ b/lua/nvim-compe/lua.lua @@ -0,0 +1,49 @@ +vim.cmd [[packadd nvim-lspconfig]] +vim.cmd [[packadd nvim-compe]] + +vim.o.completeopt = "menuone,noselect" + +require'compe'.setup { + enabled = true; + autocomplete = true; + debug = false; + min_length = 1; + preselect = 'enable'; + throttle_time = 80; + source_timeout = 200; + incomplete_delay = 400; + max_abbr_width = 100; + max_kind_width = 100; + max_menu_width = 100; + documentation = false; + + source = { + path = true; + buffer = true; + calc = true; + vsnip = true; + nvim_lsp = true; + nvim_lua = true; + spell = true; + tags = true; + snippets_nvim = true; + treesitter = true; + }; +} + +local t = function(str) + return vim.api.nvim_replace_termcodes(str, true, true, true) +end +_G.s_tab_complete = function() + if vim.fn.pumvisible() == 1 then + return t "" + elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then + return t "(vsnip-jump-prev)" + else + return t "" + end +end + +vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", {expr = true}) +vim.api.nvim_set_keymap("i", "", "v:lua.s_tab_complete()", {expr = true}) +vim.api.nvim_set_keymap("s", "", "v:lua.s_tab_complete()", {expr = true}) diff --git a/lua/nvim-lspconfig/lua.lua b/lua/nvim-lspconfig/lua.lua new file mode 100644 index 0000000..7d5a6f8 --- /dev/null +++ b/lua/nvim-lspconfig/lua.lua @@ -0,0 +1,32 @@ +vim.cmd [[packadd nvim-lspconfig]] +vim.cmd [[packadd nvim-compe]] + +local function map(mode, lhs, rhs, opts) + local options = {noremap = true} + if opts then options = vim.tbl_extend('force', options, opts) end + vim.api.nvim_set_keymap(mode, lhs, rhs, options) +end + +local opts = { noremap=true, silent=true } + + -- Mappings. + map('n', 'gd', 'lua vim.lsp.buf.definition()', opts) + map('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) + map('n', 'gr', 'lua vim.lsp.buf.references()', opts) + + map('n', 'K', 'lua vim.lsp.buf.hover()', opts) + map('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) + map('n', '', 'lua vim.lsp.buf.signature_help()', opts) + map('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) + map('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) + map('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) + map('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) + map('n', 'rn', 'lua vim.lsp.buf.rename()', opts) + map('n', 'e', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) + map('n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) + map('n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) + map('n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) + +require'lspconfig'.tsserver.setup{} +require'lspconfig'.cssls.setup{} +require'lspconfig'.html.setup{} diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index d85c0dd..6ed0273 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -5,11 +5,9 @@ return require('packer').startup(function() use {'wbthomason/packer.nvim', opt = true} use { 'kyazdani42/nvim-web-devicons'} use { 'kyazdani42/nvim-tree.lua'} - use { 'neoclide/coc.nvim' , branch = 'release'} use { 'nvim-lua/plenary.nvim'} use { 'lewis6991/gitsigns.nvim'} use { 'glepnir/galaxyline.nvim'} - use { 'tweekmonster/startuptime.vim'} use { 'akinsho/nvim-bufferline.lua'} use { '907th/vim-auto-save'} use { 'nvim-treesitter/nvim-treesitter'} @@ -18,4 +16,9 @@ return require('packer').startup(function() use { 'Yggdroot/indentLine'} use { 'ryanoasis/vim-devicons'} use { 'sbdchd/neoformat'} + use { 'neovim/nvim-lspconfig'} + use { 'hrsh7th/nvim-compe'} + use { 'windwp/nvim-autopairs'} + use { 'alvan/vim-closetag'} + use { 'tweekmonster/startuptime.vim'} end) diff --git a/plugin/packer_compiled.vim b/plugin/packer_compiled.vim index 29285aa..b919611 100644 --- a/plugin/packer_compiled.vim +++ b/plugin/packer_compiled.vim @@ -36,9 +36,9 @@ _G.packer_plugins = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/base16-vim" }, - ["coc.nvim"] = { + ["completion-nvim"] = { loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/coc.nvim" + path = "/home/sid/.local/share/nvim/site/pack/packer/start/completion-nvim" }, ["galaxyline.nvim"] = { loaded = true, @@ -52,14 +52,6 @@ _G.packer_plugins = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/indentLine" }, - ["lualine.nvim"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/lualine.nvim" - }, - neoformat = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/neoformat" - }, ["nvim-bufferline.lua"] = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-bufferline.lua" @@ -68,6 +60,10 @@ _G.packer_plugins = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua" }, + ["nvim-lspconfig"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-lspconfig" + }, ["nvim-tree.lua"] = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-tree.lua" From 6623f18e1fc1ecf2a5a1e88d08b401a29d3c74cf Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 12 Mar 2021 11:43:57 +0530 Subject: [PATCH 0023/1541] minor changes --- init.lua | 29 +++++++++++++++++++++++++++++ lua/mappings/lua.lua | 2 +- lua/pluginsList/lua.lua | 1 + 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index c7855c3..4c5e4bd 100644 --- a/init.lua +++ b/init.lua @@ -28,6 +28,9 @@ g.auto_save = 1 g.indentLine_enabled = 1 g.indentLine_char_list = {'▏'} +g.mapleader = "b" +g.maplocalleader = "b" + require('treesitter.lua') require('mappings.lua') @@ -46,3 +49,29 @@ cmd("highlight NvimTreeFolderIcon guifg = #61afef") cmd("highlight NvimTreeFolderName guifg = #61afef") require('nvim-autopairs').setup() + +require('lspkind').init({ + -- with_text = true, + -- symbol_map = { + -- Text = '', + -- Method = 'ƒ', + -- Function = '', + -- Constructor = '', + -- Variable = '', + -- Class = '', + -- Interface = 'ﰮ', + -- Module = '', + -- Property = '', + -- Unit = '', + -- Value = '', + -- Enum = '了', + -- Keyword = '', + -- Snippet = '﬌', + -- Color = '', + File = ' ', + -- Folder = '', + -- EnumMember = '', + -- Constant = '', + -- Struct = '' + -- }, +}) diff --git a/lua/mappings/lua.lua b/lua/mappings/lua.lua index 645fc28..c3ea7a2 100644 --- a/lua/mappings/lua.lua +++ b/lua/mappings/lua.lua @@ -7,4 +7,4 @@ end -- keybind list map('', 'c', '"+y') ---map('' , '' , '%y+') +map('' , 'uu' , 'Neoformat') diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 6ed0273..0e87317 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -21,4 +21,5 @@ return require('packer').startup(function() use { 'windwp/nvim-autopairs'} use { 'alvan/vim-closetag'} use { 'tweekmonster/startuptime.vim'} + use {'onsails/lspkind-nvim'} end) From a6f24d4f82e605e18ec9f87d13c9bdaa0a4116cc Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 12 Mar 2021 12:34:15 +0530 Subject: [PATCH 0024/1541] telescope-nvim --- init.lua | 32 +++++------------ lua/mappings/lua.lua | 3 +- lua/pluginsList/lua.lua | 3 ++ lua/telescope-nvim/lua.lua | 72 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 84 insertions(+), 26 deletions(-) create mode 100644 lua/telescope-nvim/lua.lua diff --git a/init.lua b/init.lua index 4c5e4bd..7481adb 100644 --- a/init.lua +++ b/init.lua @@ -6,6 +6,8 @@ require('utils.lua') require('nvimTree.lua') require('bufferline.lua') require('statusline.lua') +require('telescope-nvim.lua') + -- lsp require('nvim-lspconfig.lua') @@ -28,9 +30,8 @@ g.auto_save = 1 g.indentLine_enabled = 1 g.indentLine_char_list = {'▏'} -g.mapleader = "b" -g.maplocalleader = "b" +g.mapleader = ' ' require('treesitter.lua') require('mappings.lua') @@ -44,6 +45,11 @@ cmd("highlight DiffChange guifg =#3A3E44 guibg = none") cmd("highlight DiffModified guifg = #81A1C1 guibg = none") cmd("hi EndOfBuffer guifg=#282c34") +cmd("highlight TelescopeBorder guifg=#3e4451") +cmd("highlight TelescopePromptBorder guifg=#3e4451") +cmd("highlight TelescopeResultsBorder guifg=#3e4451") +cmd("highlight TelescopePreviewBorder guifg=#525865") + -- tree folder name , icon color cmd("highlight NvimTreeFolderIcon guifg = #61afef") cmd("highlight NvimTreeFolderName guifg = #61afef") @@ -51,27 +57,5 @@ cmd("highlight NvimTreeFolderName guifg = #61afef") require('nvim-autopairs').setup() require('lspkind').init({ - -- with_text = true, - -- symbol_map = { - -- Text = '', - -- Method = 'ƒ', - -- Function = '', - -- Constructor = '', - -- Variable = '', - -- Class = '', - -- Interface = 'ﰮ', - -- Module = '', - -- Property = '', - -- Unit = '', - -- Value = '', - -- Enum = '了', - -- Keyword = '', - -- Snippet = '﬌', - -- Color = '', File = ' ', - -- Folder = '', - -- EnumMember = '', - -- Constant = '', - -- Struct = '' - -- }, }) diff --git a/lua/mappings/lua.lua b/lua/mappings/lua.lua index c3ea7a2..aad904f 100644 --- a/lua/mappings/lua.lua +++ b/lua/mappings/lua.lua @@ -5,6 +5,5 @@ local function map(mode, lhs, rhs, opts) end -- keybind list - map('', 'c', '"+y') -map('' , 'uu' , 'Neoformat') + diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 0e87317..0ced999 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -22,4 +22,7 @@ return require('packer').startup(function() use { 'alvan/vim-closetag'} use { 'tweekmonster/startuptime.vim'} use {'onsails/lspkind-nvim'} + use { 'nvim-telescope/telescope.nvim'} + use {'nvim-telescope/telescope-media-files.nvim'} + use {'nvim-lua/popup.nvim'} end) diff --git a/lua/telescope-nvim/lua.lua b/lua/telescope-nvim/lua.lua new file mode 100644 index 0000000..65dadfb --- /dev/null +++ b/lua/telescope-nvim/lua.lua @@ -0,0 +1,72 @@ + + +require('telescope').setup{ + + defaults = { + vimgrep_arguments = { + 'rg', + '--color=never', + '--no-heading', + '--with-filename', + '--line-number', + '--column', + '--smart-case' + }, + prompt_position = "bottom", + prompt_prefix = "> ", + selection_caret = "> ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "descending", + layout_strategy = "horizontal", + layout_defaults = { + horizontal = { + mirror = false, + preview_width = 0.5, + }, + vertical = { + mirror = false, + }, + }, + file_sorter = require'telescope.sorters'.get_fuzzy_file, + file_ignore_patterns = {}, + generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter, + shorten_path = true, + winblend = 0, + width = 0.75, + preview_cutoff = 120, + results_height = 1, + results_width = 0.8, + border = {}, + borderchars = { '─', '│', '─', '│', '╭', '╮', '╯', '╰' }, + color_devicons = true, + use_less = true, + set_env = { ['COLORTERM'] = 'truecolor' }, -- default = nil, + file_previewer = require'telescope.previewers'.vim_buffer_cat.new, + grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new, + qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new, + + -- Developer configurations: Not meant for general override + buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker + }, + + extensions = { + media_files = { + filetypes = {"png", "webp", "jpg", "jpeg"}, + find_cmd = "rg" -- find command (defaults to `fd`) + } + } + + } + +require('telescope').load_extension('media_files') + +local opt = { noremap = true, silent = true } + +vim.g.mapleader = ' ' +vim.api.nvim_set_keymap('n', 'ff', [[lua require('telescope.builtin').find_files()]], opt) +vim.api.nvim_set_keymap('n', 'fp', [[lua require('telescope').extensions.media_files.media_files()]], opt) +vim.api.nvim_set_keymap('n', 'fb', [[lua require('telescope.builtin').buffers()]], opt) +vim.api.nvim_set_keymap('n', 'fh', [[lua require('telescope.builtin').help_tags()]], opt) +vim.api.nvim_set_keymap('n', 'fo', [[lua require('telescope.builtin').oldfiles()]], opt) From 66cfc6ee74d1598718fd8fe78bbcfb2f63f4db8f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 12 Mar 2021 12:40:10 +0530 Subject: [PATCH 0025/1541] neoformat --- lua/telescope-nvim/lua.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/telescope-nvim/lua.lua b/lua/telescope-nvim/lua.lua index 65dadfb..fd7b118 100644 --- a/lua/telescope-nvim/lua.lua +++ b/lua/telescope-nvim/lua.lua @@ -1,5 +1,3 @@ - - require('telescope').setup{ defaults = { @@ -70,3 +68,5 @@ vim.api.nvim_set_keymap('n', 'fp', [[lua require('telescope').exte vim.api.nvim_set_keymap('n', 'fb', [[lua require('telescope.builtin').buffers()]], opt) vim.api.nvim_set_keymap('n', 'fh', [[lua require('telescope.builtin').help_tags()]], opt) vim.api.nvim_set_keymap('n', 'fo', [[lua require('telescope.builtin').oldfiles()]], opt) +vim.api.nvim_set_keymap('n', 'zz', [[ Neoformat]] , opt) + From 3b2f4c5ed4947b9379a5e8fa9e9b28df99200a0b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 12 Mar 2021 12:50:55 +0530 Subject: [PATCH 0026/1541] popup menusel bg color --- init.lua | 1 + lua/telescope-nvim/lua.lua | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 7481adb..aed69e2 100644 --- a/init.lua +++ b/init.lua @@ -49,6 +49,7 @@ cmd("highlight TelescopeBorder guifg=#3e4451") cmd("highlight TelescopePromptBorder guifg=#3e4451") cmd("highlight TelescopeResultsBorder guifg=#3e4451") cmd("highlight TelescopePreviewBorder guifg=#525865") +cmd("highlight PmenuSel guibg=#BBE67E") -- tree folder name , icon color cmd("highlight NvimTreeFolderIcon guifg = #61afef") diff --git a/lua/telescope-nvim/lua.lua b/lua/telescope-nvim/lua.lua index fd7b118..b69e912 100644 --- a/lua/telescope-nvim/lua.lua +++ b/lua/telescope-nvim/lua.lua @@ -69,4 +69,3 @@ vim.api.nvim_set_keymap('n', 'fb', [[lua require('telescope.builti vim.api.nvim_set_keymap('n', 'fh', [[lua require('telescope.builtin').help_tags()]], opt) vim.api.nvim_set_keymap('n', 'fo', [[lua require('telescope.builtin').oldfiles()]], opt) vim.api.nvim_set_keymap('n', 'zz', [[ Neoformat]] , opt) - From 3a244429d5fba04ee25fc4ffdd4d32748445ea2c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 12 Mar 2021 22:38:20 +0530 Subject: [PATCH 0027/1541] yank whole file --- init.lua | 5 ----- lua/pluginsList/lua.lua | 1 - lua/telescope-nvim/lua.lua | 3 ++- plugin/packer_compiled.vim | 36 ++++++++++++++++++++++++++++++++---- 4 files changed, 34 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index aed69e2..0a0c26a 100644 --- a/init.lua +++ b/init.lua @@ -8,7 +8,6 @@ require('bufferline.lua') require('statusline.lua') require('telescope-nvim.lua') - -- lsp require('nvim-lspconfig.lua') require('nvim-compe.lua') @@ -27,10 +26,6 @@ cmd 'syntax enable' cmd 'syntax on' g.auto_save = 1 - -g.indentLine_enabled = 1 -g.indentLine_char_list = {'▏'} - g.mapleader = ' ' require('treesitter.lua') diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 0ced999..22451f0 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -13,7 +13,6 @@ return require('packer').startup(function() use { 'nvim-treesitter/nvim-treesitter'} use { 'chriskempson/base16-vim'} use { 'norcalli/nvim-colorizer.lua'} - use { 'Yggdroot/indentLine'} use { 'ryanoasis/vim-devicons'} use { 'sbdchd/neoformat'} use { 'neovim/nvim-lspconfig'} diff --git a/lua/telescope-nvim/lua.lua b/lua/telescope-nvim/lua.lua index b69e912..0ff9136 100644 --- a/lua/telescope-nvim/lua.lua +++ b/lua/telescope-nvim/lua.lua @@ -68,4 +68,5 @@ vim.api.nvim_set_keymap('n', 'fp', [[lua require('telescope').exte vim.api.nvim_set_keymap('n', 'fb', [[lua require('telescope.builtin').buffers()]], opt) vim.api.nvim_set_keymap('n', 'fh', [[lua require('telescope.builtin').help_tags()]], opt) vim.api.nvim_set_keymap('n', 'fo', [[lua require('telescope.builtin').oldfiles()]], opt) -vim.api.nvim_set_keymap('n', 'zz', [[ Neoformat]] , opt) +vim.api.nvim_set_keymap('n', 'fm', [[ Neoformat]] , opt) +vim.api.nvim_set_keymap('n', '', [[ %y+]] , opt) diff --git a/plugin/packer_compiled.vim b/plugin/packer_compiled.vim index b919611..873fb81 100644 --- a/plugin/packer_compiled.vim +++ b/plugin/packer_compiled.vim @@ -36,10 +36,6 @@ _G.packer_plugins = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/base16-vim" }, - ["completion-nvim"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/completion-nvim" - }, ["galaxyline.nvim"] = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/galaxyline.nvim" @@ -52,6 +48,18 @@ _G.packer_plugins = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/indentLine" }, + ["lspkind-nvim"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/lspkind-nvim" + }, + neoformat = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/neoformat" + }, + ["nvim-autopairs"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-autopairs" + }, ["nvim-bufferline.lua"] = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-bufferline.lua" @@ -60,6 +68,10 @@ _G.packer_plugins = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua" }, + ["nvim-compe"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-compe" + }, ["nvim-lspconfig"] = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-lspconfig" @@ -85,14 +97,30 @@ _G.packer_plugins = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/plenary.nvim" }, + ["popup.nvim"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/popup.nvim" + }, ["startuptime.vim"] = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/startuptime.vim" }, + ["telescope-media-files.nvim"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/telescope-media-files.nvim" + }, + ["telescope.nvim"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/telescope.nvim" + }, ["vim-auto-save"] = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/vim-auto-save" }, + ["vim-closetag"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/vim-closetag" + }, ["vim-devicons"] = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/vim-devicons" From 78cefbb297b8b3b368e8ada7847b6aff759ed66d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 06:53:02 +0530 Subject: [PATCH 0028/1541] clean up --- init.lua | 53 +++---- lua/bufferline/lua.lua | 91 ++++++------ lua/gitsigns/lua.lua | 54 ++++---- lua/lsp_config/lua.lua | 27 ++-- lua/mappings/lua.lua | 13 +- lua/nvim-compe/lua.lua | 67 +++++---- lua/nvim-lspconfig/lua.lua | 48 +++---- lua/nvimTree/lua.lua | 132 +++++++++--------- lua/pluginsList/lua.lua | 51 +++---- lua/statusline/lua.lua | 275 +++++++++++++++++++------------------ lua/telescope-nvim/lua.lua | 135 +++++++++--------- lua/treesitter/lua.lua | 22 +-- lua/utils/lua.lua | 41 +++--- lua/web-devicons/lua.lua | 119 ++++++++-------- 14 files changed, 576 insertions(+), 552 deletions(-) diff --git a/init.lua b/init.lua index 0a0c26a..3767251 100644 --- a/init.lua +++ b/init.lua @@ -1,37 +1,38 @@ -- load plugins -require('pluginsList.lua') -require('web-devicons.lua') +require("pluginsList.lua") +require("web-devicons.lua") -require('utils.lua') -require('nvimTree.lua') -require('bufferline.lua') -require('statusline.lua') -require('telescope-nvim.lua') +require("utils.lua") +require("nvimTree.lua") +require("bufferline.lua") +require("statusline.lua") +require("telescope-nvim.lua") -- lsp -require('nvim-lspconfig.lua') -require('nvim-compe.lua') -require('coc.lua') +require("nvim-lspconfig.lua") +require("nvim-compe.lua") +require("coc.lua") -require('gitsigns.lua') +require("gitsigns.lua") -require'colorizer'.setup() +require "colorizer".setup() local cmd = vim.cmd local g = vim.g local indent = 2 -cmd 'colorscheme base16-onedark' -cmd 'syntax enable' -cmd 'syntax on' +cmd "colorscheme base16-onedark" +cmd "syntax enable" +cmd "syntax on" g.auto_save = 1 -g.mapleader = ' ' -require('treesitter.lua') -require('mappings.lua') +g.mapleader = " " --- highlights +require("treesitter.lua") +require("mappings.lua") + +-- highlights cmd("hi LineNr guibg=NONE") cmd("hi SignColumn guibg=NONE") cmd("hi VertSplit guibg=NONE") @@ -44,14 +45,16 @@ cmd("highlight TelescopeBorder guifg=#3e4451") cmd("highlight TelescopePromptBorder guifg=#3e4451") cmd("highlight TelescopeResultsBorder guifg=#3e4451") cmd("highlight TelescopePreviewBorder guifg=#525865") -cmd("highlight PmenuSel guibg=#BBE67E") +cmd("highlight PmenuSel guibg=#98c379") --- tree folder name , icon color +-- tree folder name , icon color cmd("highlight NvimTreeFolderIcon guifg = #61afef") cmd("highlight NvimTreeFolderName guifg = #61afef") -require('nvim-autopairs').setup() +require("nvim-autopairs").setup() -require('lspkind').init({ - File = ' ', -}) +require("lspkind").init( + { + File = " " + } +) diff --git a/lua/bufferline/lua.lua b/lua/bufferline/lua.lua index 3765b4e..6f42f00 100644 --- a/lua/bufferline/lua.lua +++ b/lua/bufferline/lua.lua @@ -1,54 +1,53 @@ -vim.o.termguicolors = true +vim.o.termguicolors = true -require'bufferline'.setup{ - options = { - buffer_close_icon= '', - modified_icon = '●', - close_icon = '', - left_trunc_marker = '', - right_trunc_marker = '', - max_name_length = 14, - max_prefix_length = 13, - tab_size = 18, - enforce_regular_tabs = true , - view = "multiwindow" , - show_buffer_close_icons = true , - separator_style = "thin" +require "bufferline".setup { + options = { + buffer_close_icon = "", + modified_icon = "●", + close_icon = "", + left_trunc_marker = "", + right_trunc_marker = "", + max_name_length = 14, + max_prefix_length = 13, + tab_size = 18, + enforce_regular_tabs = true, + view = "multiwindow", + show_buffer_close_icons = true, + separator_style = "thin" }, - - highlights = { + highlights = { background = { - guifg = comment_fg, - guibg = '#282c34' - }, - fill = { - guifg = comment_fg, - guibg = '#282c34' - }, + guifg = comment_fg, + guibg = "#282c34" + }, + fill = { + guifg = comment_fg, + guibg = "#282c34" + }, buffer_selected = { - guifg = normal_fg, - guibg = '#3A3E44', - gui = "bold" - }, - separator_visible = { - guifg = '#282c34' , - guibg = '#282c34' + guifg = normal_fg, + guibg = "#3A3E44", + gui = "bold" + }, + separator_visible = { + guifg = "#282c34", + guibg = "#282c34" }, separator_selected = { - guifg = '#282c34' , - guibg = '#282c34' - }, - separator = { - guifg = '#282c34' , - guibg = '#282c34' - }, - indicator_selected = { - guifg = '#282c34' , - guibg = '#282c34' - }, + guifg = "#282c34", + guibg = "#282c34" + }, + separator = { + guifg = "#282c34", + guibg = "#282c34" + }, + indicator_selected = { + guifg = "#282c34", + guibg = "#282c34" + }, modified_selected = { - guifg = string_fg, - guibg = '#3A3E44' - } - }; + guifg = string_fg, + guibg = "#3A3E44" + } + } } diff --git a/lua/gitsigns/lua.lua b/lua/gitsigns/lua.lua index 3dbd424..1fa4325 100644 --- a/lua/gitsigns/lua.lua +++ b/lua/gitsigns/lua.lua @@ -1,29 +1,27 @@ -require('gitsigns').setup { - signs = { - add = {hl = 'DiffAdd' , text = '▌', numhl='GitSignsAddNr'}, - change = {hl = 'DiffChange', text = '▌', numhl='GitSignsChangeNr'}, - delete = {hl = 'DiffDelete', text = '_', numhl='GitSignsDeleteNr'}, - topdelete = {hl = 'DiffDelete', text = '‾', numhl='GitSignsDeleteNr'}, - changedelete = {hl = 'DiffChange', text = '~', numhl='GitSignsChangeNr'}, - }, - numhl = false, - keymaps = { - -- Default keymap options - noremap = true, - buffer = true, - - ['n ]c'] = { expr = true, "&diff ? ']c' : 'lua require\"gitsigns\".next_hunk()'"}, - ['n [c'] = { expr = true, "&diff ? '[c' : 'lua require\"gitsigns\".prev_hunk()'"}, - - ['n hs'] = 'lua require"gitsigns".stage_hunk()', - ['n hu'] = 'lua require"gitsigns".undo_stage_hunk()', - ['n hr'] = 'lua require"gitsigns".reset_hunk()', - ['n hp'] = 'lua require"gitsigns".preview_hunk()', - ['n hb'] = 'lua require"gitsigns".blame_line()', - }, - watch_index = { - interval = 100 - }, - sign_priority = 5, - status_formatter = nil, -- Use default +require("gitsigns").setup { + signs = { + add = {hl = "DiffAdd", text = "▌", numhl = "GitSignsAddNr"}, + change = {hl = "DiffChange", text = "▌", numhl = "GitSignsChangeNr"}, + delete = {hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr"}, + topdelete = {hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr"}, + changedelete = {hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr"} + }, + numhl = false, + keymaps = { + -- Default keymap options + noremap = true, + buffer = true, + ["n ]c"] = {expr = true, '&diff ? \']c\' : \'lua require"gitsigns".next_hunk()\''}, + ["n [c"] = {expr = true, '&diff ? \'[c\' : \'lua require"gitsigns".prev_hunk()\''}, + ["n hs"] = 'lua require"gitsigns".stage_hunk()', + ["n hu"] = 'lua require"gitsigns".undo_stage_hunk()', + ["n hr"] = 'lua require"gitsigns".reset_hunk()', + ["n hp"] = 'lua require"gitsigns".preview_hunk()', + ["n hb"] = 'lua require"gitsigns".blame_line()' + }, + watch_index = { + interval = 100 + }, + sign_priority = 5, + status_formatter = nil -- Use default } diff --git a/lua/lsp_config/lua.lua b/lua/lsp_config/lua.lua index 47350ba..7d52eb9 100644 --- a/lua/lsp_config/lua.lua +++ b/lua/lsp_config/lua.lua @@ -5,19 +5,18 @@ vim.cmd [[ packadd completion-nvim ]] local html_snippet_capabilities = vim.lsp.protocol.make_client_capabilities() html_snippet_capabilities.textDocument.completion.completionItem.snippetSupport = true -require'lspconfig'.html.setup { - on_attach = lsp_on_attach, - capabilities = html_snippet_capabilities, - cmd = { "html-languageserver", "--stdio" }; - filetypes = { "html" }; - init_opitons = { - configurationSection = { "html", "css", "javascript" }; - embeddedLanguages = { - css = true, - javascript = true, - }; - }; +require "lspconfig".html.setup { + on_attach = lsp_on_attach, + capabilities = html_snippet_capabilities, + cmd = {"html-languageserver", "--stdio"}, + filetypes = {"html"}, + init_opitons = { + configurationSection = {"html", "css", "javascript"}, + embeddedLanguages = { + css = true, + javascript = true + } + } } -vim.g.completion_enable_snippet = 'UltiSnips' - +vim.g.completion_enable_snippet = "UltiSnips" diff --git a/lua/mappings/lua.lua b/lua/mappings/lua.lua index aad904f..5caa8cd 100644 --- a/lua/mappings/lua.lua +++ b/lua/mappings/lua.lua @@ -1,9 +1,10 @@ local function map(mode, lhs, rhs, opts) - local options = {noremap = true} - if opts then options = vim.tbl_extend('force', options, opts) end - vim.api.nvim_set_keymap(mode, lhs, rhs, options) + local options = {noremap = true} + if opts then + options = vim.tbl_extend("force", options, opts) + end + vim.api.nvim_set_keymap(mode, lhs, rhs, options) end --- keybind list -map('', 'c', '"+y') - +-- keybind list +map("", "c", '"+y') diff --git a/lua/nvim-compe/lua.lua b/lua/nvim-compe/lua.lua index 575fe22..a2320b1 100644 --- a/lua/nvim-compe/lua.lua +++ b/lua/nvim-compe/lua.lua @@ -3,45 +3,44 @@ vim.cmd [[packadd nvim-compe]] vim.o.completeopt = "menuone,noselect" -require'compe'.setup { - enabled = true; - autocomplete = true; - debug = false; - min_length = 1; - preselect = 'enable'; - throttle_time = 80; - source_timeout = 200; - incomplete_delay = 400; - max_abbr_width = 100; - max_kind_width = 100; - max_menu_width = 100; - documentation = false; - - source = { - path = true; - buffer = true; - calc = true; - vsnip = true; - nvim_lsp = true; - nvim_lua = true; - spell = true; - tags = true; - snippets_nvim = true; - treesitter = true; - }; +require "compe".setup { + enabled = true, + autocomplete = true, + debug = false, + min_length = 1, + preselect = "enable", + throttle_time = 80, + source_timeout = 200, + incomplete_delay = 400, + max_abbr_width = 100, + max_kind_width = 100, + max_menu_width = 100, + documentation = false, + source = { + path = true, + buffer = true, + calc = true, + vsnip = true, + nvim_lsp = true, + nvim_lua = true, + spell = true, + tags = true, + snippets_nvim = true, + treesitter = true + } } local t = function(str) - return vim.api.nvim_replace_termcodes(str, true, true, true) + return vim.api.nvim_replace_termcodes(str, true, true, true) end _G.s_tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t "" - elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then - return t "(vsnip-jump-prev)" - else - return t "" - end + if vim.fn.pumvisible() == 1 then + return t "" + elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then + return t "(vsnip-jump-prev)" + else + return t "" + end end vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", {expr = true}) diff --git a/lua/nvim-lspconfig/lua.lua b/lua/nvim-lspconfig/lua.lua index 7d5a6f8..2a2ec79 100644 --- a/lua/nvim-lspconfig/lua.lua +++ b/lua/nvim-lspconfig/lua.lua @@ -2,31 +2,33 @@ vim.cmd [[packadd nvim-lspconfig]] vim.cmd [[packadd nvim-compe]] local function map(mode, lhs, rhs, opts) - local options = {noremap = true} - if opts then options = vim.tbl_extend('force', options, opts) end - vim.api.nvim_set_keymap(mode, lhs, rhs, options) + local options = {noremap = true} + if opts then + options = vim.tbl_extend("force", options, opts) + end + vim.api.nvim_set_keymap(mode, lhs, rhs, options) end -local opts = { noremap=true, silent=true } +local opts = {noremap = true, silent = true} - -- Mappings. - map('n', 'gd', 'lua vim.lsp.buf.definition()', opts) - map('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) - map('n', 'gr', 'lua vim.lsp.buf.references()', opts) +-- Mappings. +map("n", "gd", "lua vim.lsp.buf.definition()", opts) +map("n", "gD", "lua vim.lsp.buf.declaration()", opts) +map("n", "gr", "lua vim.lsp.buf.references()", opts) - map('n', 'K', 'lua vim.lsp.buf.hover()', opts) - map('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) - map('n', '', 'lua vim.lsp.buf.signature_help()', opts) - map('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) - map('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) - map('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) - map('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) - map('n', 'rn', 'lua vim.lsp.buf.rename()', opts) - map('n', 'e', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) - map('n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) - map('n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) - map('n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) +map("n", "K", "lua vim.lsp.buf.hover()", opts) +map("n", "gi", "lua vim.lsp.buf.implementation()", opts) +map("n", "", "lua vim.lsp.buf.signature_help()", opts) +map("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) +map("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) +map("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) +map("n", "D", "lua vim.lsp.buf.type_definition()", opts) +map("n", "rn", "lua vim.lsp.buf.rename()", opts) +map("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) +map("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) +map("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) +map("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) -require'lspconfig'.tsserver.setup{} -require'lspconfig'.cssls.setup{} -require'lspconfig'.html.setup{} +require "lspconfig".tsserver.setup {} +require "lspconfig".cssls.setup {} +require "lspconfig".html.setup {} diff --git a/lua/nvimTree/lua.lua b/lua/nvimTree/lua.lua index 6e6310b..4ad9b2e 100644 --- a/lua/nvimTree/lua.lua +++ b/lua/nvimTree/lua.lua @@ -1,80 +1,84 @@ vim.cmd [[packadd nvim-tree.lua]] -vim.o.termguicolors = true +vim.o.termguicolors = true -vim.g.nvim_tree_side = 'left' -vim.g.nvim_tree_width = 24 -vim.g.nvim_tree_ignore = { '.git', 'node_modules', '.cache' } -vim.g.nvim_tree_auto_open = 0 -vim.g.nvim_tree_auto_close = 0 -vim.g.nvim_tree_quit_on_open = 0 -vim.g.nvim_tree_follow = 1 -vim.g.nvim_tree_indent_markers = 1 -vim.g.nvim_tree_hide_dotfiles = 1 +vim.g.nvim_tree_side = "left" +vim.g.nvim_tree_width = 24 +vim.g.nvim_tree_ignore = {".git", "node_modules", ".cache"} +vim.g.nvim_tree_auto_open = 0 +vim.g.nvim_tree_auto_close = 0 +vim.g.nvim_tree_quit_on_open = 0 +vim.g.nvim_tree_follow = 1 +vim.g.nvim_tree_indent_markers = 1 +vim.g.nvim_tree_hide_dotfiles = 1 vim.g.nvim_tree_git_hl = 1 -vim.g.nvim_tree_root_folder_modifier = ':~' +vim.g.nvim_tree_root_folder_modifier = ":~" vim.g.nvim_tree_tab_open = 1 -vim.g.nvim_tree_allow_resize = 1 +vim.g.nvim_tree_allow_resize = 1 vim.g.nvim_tree_show_icons = { - git = 1, - folders = 1, - files = 1, - } - + git = 1, + folders = 1, + files = 1 +} + vim.g.nvim_tree_icons = { - default = ' ', - symlink = ' ', + default = " ", + symlink = " ", + git = { + unstaged = "✗", + staged = "✓", + unmerged = "", + renamed = "➜", + untracked = "★" + }, + folder = { + default = "", + open = "", + symlink = "" + } +} - git = { - unstaged = "✗", - staged = "✓", - unmerged = "", - renamed = "➜", - untracked = "★" - }, - folder = { - default = "", - open = "", - symlink = "", - } - } - -local get_lua_cb = function (cb_name) - return string.format(":lua require'nvim-tree'.on_keypress('%s')", cb_name) +local get_lua_cb = function(cb_name) + return string.format(":lua require'nvim-tree'.on_keypress('%s')", cb_name) end -- Mappings for nvimtree -vim.api.nvim_set_keymap('n', '', ':NvimTreeToggle', { - noremap = true, - silent = true - }) +vim.api.nvim_set_keymap( + "n", + "", + ":NvimTreeToggle", + { + noremap = true, + silent = true + } +) vim.g.nvim_tree_bindings = { - [""] = get_lua_cb("edit"), - ["o"] = get_lua_cb("edit"), - ["<2-LeftMouse>"] = get_lua_cb("edit"), - ["<2-RightMouse>"] = get_lua_cb("cd"), - [""] = get_lua_cb("cd"), - [""] = get_lua_cb("vsplit"), - [""] = get_lua_cb("split"), - [""] = get_lua_cb("tabnew"), - [""] = get_lua_cb("close_node"), - [""] = get_lua_cb("close_node"), - [""] = get_lua_cb("preview"), - ["I"] = get_lua_cb("toggle_ignored"), - ["H"] = get_lua_cb("toggle_dotfiles"), - ["R"] = get_lua_cb("refresh"), - ["a"] = get_lua_cb("create"), - ["d"] = get_lua_cb("remove"), - ["r"] = get_lua_cb("rename"), - [""] = get_lua_cb("full_rename"), - ["x"] = get_lua_cb("cut"), - ["c"] = get_lua_cb("copy"), - ["p"] = get_lua_cb("paste"), - ["[c"] = get_lua_cb("prev_git_item"), - ["]c"] = get_lua_cb("next_git_item"), - ["-"] = get_lua_cb("dir_up"), - ["q"] = get_lua_cb("close"), + [""] = get_lua_cb("edit"), + ["o"] = get_lua_cb("edit"), + ["<2-LeftMouse>"] = get_lua_cb("edit"), + ["<2-RightMouse>"] = get_lua_cb("cd"), + [""] = get_lua_cb("cd"), + [""] = get_lua_cb("vsplit"), + [""] = get_lua_cb("split"), + [""] = get_lua_cb("tabnew"), + [""] = get_lua_cb("close_node"), + [""] = get_lua_cb("close_node"), + [""] = get_lua_cb("preview"), + ["I"] = get_lua_cb("toggle_ignored"), + ["H"] = get_lua_cb("toggle_dotfiles"), + ["R"] = get_lua_cb("refresh"), + ["a"] = get_lua_cb("create"), + ["d"] = get_lua_cb("remove"), + ["r"] = get_lua_cb("rename"), + [""] = get_lua_cb("full_rename"), + ["x"] = get_lua_cb("cut"), + ["c"] = get_lua_cb("copy"), + ["p"] = get_lua_cb("paste"), + ["[c"] = get_lua_cb("prev_git_item"), + ["]c"] = get_lua_cb("next_git_item"), + ["-"] = get_lua_cb("dir_up"), + ["q"] = get_lua_cb("close") } diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 22451f0..0deb588 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -1,27 +1,30 @@ -- check if packer is installed (~/local/share/nvim/site/pack) local packer_exists = pcall(vim.cmd, [[packadd packer.nvim]]) -return require('packer').startup(function() - use {'wbthomason/packer.nvim', opt = true} - use { 'kyazdani42/nvim-web-devicons'} - use { 'kyazdani42/nvim-tree.lua'} - use { 'nvim-lua/plenary.nvim'} - use { 'lewis6991/gitsigns.nvim'} - use { 'glepnir/galaxyline.nvim'} - use { 'akinsho/nvim-bufferline.lua'} - use { '907th/vim-auto-save'} - use { 'nvim-treesitter/nvim-treesitter'} - use { 'chriskempson/base16-vim'} - use { 'norcalli/nvim-colorizer.lua'} - use { 'ryanoasis/vim-devicons'} - use { 'sbdchd/neoformat'} - use { 'neovim/nvim-lspconfig'} - use { 'hrsh7th/nvim-compe'} - use { 'windwp/nvim-autopairs'} - use { 'alvan/vim-closetag'} - use { 'tweekmonster/startuptime.vim'} - use {'onsails/lspkind-nvim'} - use { 'nvim-telescope/telescope.nvim'} - use {'nvim-telescope/telescope-media-files.nvim'} - use {'nvim-lua/popup.nvim'} -end) +return require("packer").startup( + function() + use {"wbthomason/packer.nvim", opt = true} + use {"kyazdani42/nvim-web-devicons"} + use {"kyazdani42/nvim-tree.lua"} + use {"nvim-lua/plenary.nvim"} + use {"lewis6991/gitsigns.nvim"} + use {"glepnir/galaxyline.nvim"} + use {"akinsho/nvim-bufferline.lua"} + use {"907th/vim-auto-save"} + use {"nvim-treesitter/nvim-treesitter"} + use {"chriskempson/base16-vim"} + use {"norcalli/nvim-colorizer.lua"} + -- use { 'Yggdroot/indentLine'} + use {"ryanoasis/vim-devicons"} + use {"sbdchd/neoformat"} + use {"neovim/nvim-lspconfig"} + use {"hrsh7th/nvim-compe"} + use {"windwp/nvim-autopairs"} + use {"alvan/vim-closetag"} + use {"tweekmonster/startuptime.vim"} + use {"onsails/lspkind-nvim"} + use {"nvim-telescope/telescope.nvim"} + use {"nvim-telescope/telescope-media-files.nvim"} + use {"nvim-lua/popup.nvim"} + end +) diff --git a/lua/statusline/lua.lua b/lua/statusline/lua.lua index 57ba005..fe0aff8 100644 --- a/lua/statusline/lua.lua +++ b/lua/statusline/lua.lua @@ -1,191 +1,204 @@ -local gl = require('galaxyline') +local gl = require("galaxyline") local gls = gl.section -gl.short_line_list = {'LuaTree','vista','dbui'} +gl.short_line_list = {"LuaTree", "vista", "dbui"} local colors = { - bg = '#282c34', - line_bg = '#282c34', - fg = '#D8DEE9', - fg_green = '#65a380', - yellow = '#A3BE8C', - cyan = '#22262C', - darkblue = '#61afef', - green = '#BBE67E', - orange = '#FF8800', - purple = '#252930', - magenta = '#c678dd', - blue = '#22262C'; - red = '#DF8890', - lightbg = '#3C4048', - nord = '#81A1C1', - greenYel = '#EBCB8B' + bg = "#282c34", + line_bg = "#282c34", + fg = "#D8DEE9", + fg_green = "#65a380", + yellow = "#A3BE8C", + cyan = "#22262C", + darkblue = "#61afef", + green = "#BBE67E", + orange = "#FF8800", + purple = "#252930", + magenta = "#c678dd", + blue = "#22262C", + red = "#DF8890", + lightbg = "#3C4048", + nord = "#81A1C1", + greenYel = "#EBCB8B" } gls.left[1] = { - leftRounded = { - provider = function() return '' end, - highlight = { colors.nord, colors.bg } - }, + leftRounded = { + provider = function() + return "" + end, + highlight = {colors.nord, colors.bg} + } } gls.left[2] = { - ViMode = { - provider = function() - return '  ' - end, - highlight = {colors.bg,colors.nord}, - separator = ' ', - separator_highlight = {colors.lightbg,colors.lightbg}, - }, + ViMode = { + provider = function() + return "  " + end, + highlight = {colors.bg, colors.nord}, + separator = " ", + separator_highlight = {colors.lightbg, colors.lightbg} + } } -gls.left[3] ={ - FileIcon = { - provider = 'FileIcon', - condition = buffer_not_empty, - highlight = {require('galaxyline.provider_fileinfo').get_file_icon_color,colors.lightbg}, - }, +gls.left[3] = { + FileIcon = { + provider = "FileIcon", + condition = buffer_not_empty, + highlight = {require("galaxyline.provider_fileinfo").get_file_icon_color, colors.lightbg} + } } gls.left[4] = { - FileName = { - provider = {'FileName','FileSize'}, - condition = buffer_not_empty, - highlight = {colors.fg,colors.lightbg} - } + FileName = { + provider = {"FileName", "FileSize"}, + condition = buffer_not_empty, + highlight = {colors.fg, colors.lightbg} + } } gls.left[5] = { - teech = { - provider = function() return '' end, - separator = ' ', - highlight = { colors.lightbg, colors.bg } - }, + teech = { + provider = function() + return "" + end, + separator = " ", + highlight = {colors.lightbg, colors.bg} + } } local checkwidth = function() - local squeeze_width = vim.fn.winwidth(0) / 2 - if squeeze_width > 40 then - return true - end - return false + local squeeze_width = vim.fn.winwidth(0) / 2 + if squeeze_width > 40 then + return true + end + return false end gls.left[6] = { - DiffAdd = { - provider = 'DiffAdd', - condition = checkwidth, - icon = '  ', - highlight = {colors.greenYel,colors.line_bg}, - } + DiffAdd = { + provider = "DiffAdd", + condition = checkwidth, + icon = "  ", + highlight = {colors.greenYel, colors.line_bg} + } } gls.left[7] = { - DiffModified = { - provider = 'DiffModified', - condition = checkwidth, - icon = ' ', - highlight = {colors.orange,colors.line_bg}, - } + DiffModified = { + provider = "DiffModified", + condition = checkwidth, + icon = " ", + highlight = {colors.orange, colors.line_bg} + } } gls.left[8] = { - DiffRemove = { - provider = 'DiffRemove', - condition = checkwidth, - icon = ' ', - highlight = {colors.red,colors.line_bg}, - } + DiffRemove = { + provider = "DiffRemove", + condition = checkwidth, + icon = " ", + highlight = {colors.red, colors.line_bg} + } } gls.left[9] = { - LeftEnd = { - provider = function() return ' ' end, - separator = ' ', - separator_highlight = {colors.line_bg,colors.line_bg}, - highlight = {colors.line_bg,colors.line_bg} - } + LeftEnd = { + provider = function() + return " " + end, + separator = " ", + separator_highlight = {colors.line_bg, colors.line_bg}, + highlight = {colors.line_bg, colors.line_bg} + } } gls.left[10] = { - DiagnosticError = { - provider = 'DiagnosticError', - icon = '  ', - highlight = {colors.red,colors.bg} - } + DiagnosticError = { + provider = "DiagnosticError", + icon = "  ", + highlight = {colors.red, colors.bg} + } } gls.left[11] = { - Space = { - provider = function () return ' ' end, - highlight = {colors.line_bg,colors.line_bg} - } + Space = { + provider = function() + return " " + end, + highlight = {colors.line_bg, colors.line_bg} + } } gls.left[12] = { - DiagnosticWarn = { - provider = 'DiagnosticWarn', - icon = '  ', - highlight = {colors.blue,colors.bg}, - } + DiagnosticWarn = { + provider = "DiagnosticWarn", + icon = "  ", + highlight = {colors.blue, colors.bg} + } } gls.right[1] = { - GitIcon = { - provider = function() return '  ' end, - condition = require('galaxyline.provider_vcs').check_git_workspace, - highlight = {colors.green,colors.line_bg}, - } + GitIcon = { + provider = function() + return "  " + end, + condition = require("galaxyline.provider_vcs").check_git_workspace, + highlight = {colors.green, colors.line_bg} + } } gls.right[2] = { - GitBranch = { - provider = 'GitBranch', - condition = require('galaxyline.provider_vcs').check_git_workspace, - highlight = {colors.green,colors.line_bg}, - } + GitBranch = { + provider = "GitBranch", + condition = require("galaxyline.provider_vcs").check_git_workspace, + highlight = {colors.green, colors.line_bg} + } } gls.right[3] = { - right_LeftRounded = { - provider = function() return '' end, - separator = ' ', - separator_highlight = {colors.bg,colors.bg}, - highlight = { colors.red, colors.bg } - }, + right_LeftRounded = { + provider = function() + return "" + end, + separator = " ", + separator_highlight = {colors.bg, colors.bg}, + highlight = {colors.red, colors.bg} + } } gls.right[4] = { - SiMode = { - provider = function() - local alias = { - n = 'NORMAL', - i = 'INSERT', - c = 'COMMAND', - V = 'VISUAL', - [''] = 'VISUAL', - v = 'VISUAL', - R = 'REPLACE', - } - return alias[vim.fn.mode()] - end, - highlight = { colors.bg, colors.red }, - }, + SiMode = { + provider = function() + local alias = { + n = "NORMAL", + i = "INSERT", + c = "COMMAND", + V = "VISUAL", + [""] = "VISUAL", + v = "VISUAL", + R = "REPLACE" + } + return alias[vim.fn.mode()] + end, + highlight = {colors.bg, colors.red} + } } - gls.right[5] = { - PerCent = { - provider = 'LinePercent', - separator = ' ', - separator_highlight = {colors.red,colors.red}, - highlight = {colors.bg,colors.fg}, - } + PerCent = { + provider = "LinePercent", + separator = " ", + separator_highlight = {colors.red, colors.red}, + highlight = {colors.bg, colors.fg} + } } gls.right[6] = { - rightRounded = { - provider = function() return '' end, - highlight = { colors.fg, colors.bg } - }, + rightRounded = { + provider = function() + return "" + end, + highlight = {colors.fg, colors.bg} + } } diff --git a/lua/telescope-nvim/lua.lua b/lua/telescope-nvim/lua.lua index 0ff9136..d001c5f 100644 --- a/lua/telescope-nvim/lua.lua +++ b/lua/telescope-nvim/lua.lua @@ -1,72 +1,73 @@ -require('telescope').setup{ - - defaults = { - vimgrep_arguments = { - 'rg', - '--color=never', - '--no-heading', - '--with-filename', - '--line-number', - '--column', - '--smart-case' +require("telescope").setup { + defaults = { + vimgrep_arguments = { + "rg", + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + "--smart-case" + }, + prompt_position = "bottom", + prompt_prefix = "> ", + selection_caret = "> ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "descending", + layout_strategy = "horizontal", + layout_defaults = { + horizontal = { + mirror = false, + preview_width = 0.5 + }, + vertical = { + mirror = false + } + }, + file_sorter = require "telescope.sorters".get_fuzzy_file, + file_ignore_patterns = {}, + generic_sorter = require "telescope.sorters".get_generic_fuzzy_sorter, + shorten_path = true, + winblend = 0, + width = 0.75, + preview_cutoff = 120, + results_height = 1, + results_width = 0.8, + border = {}, + borderchars = {"─", "│", "─", "│", "╭", "╮", "╯", "╰"}, + color_devicons = true, + use_less = true, + set_env = {["COLORTERM"] = "truecolor"}, -- default = nil, + file_previewer = require "telescope.previewers".vim_buffer_cat.new, + grep_previewer = require "telescope.previewers".vim_buffer_vimgrep.new, + qflist_previewer = require "telescope.previewers".vim_buffer_qflist.new, + -- Developer configurations: Not meant for general override + buffer_previewer_maker = require "telescope.previewers".buffer_previewer_maker }, - prompt_position = "bottom", - prompt_prefix = "> ", - selection_caret = "> ", - entry_prefix = " ", - initial_mode = "insert", - selection_strategy = "reset", - sorting_strategy = "descending", - layout_strategy = "horizontal", - layout_defaults = { - horizontal = { - mirror = false, - preview_width = 0.5, - }, - vertical = { - mirror = false, - }, - }, - file_sorter = require'telescope.sorters'.get_fuzzy_file, - file_ignore_patterns = {}, - generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter, - shorten_path = true, - winblend = 0, - width = 0.75, - preview_cutoff = 120, - results_height = 1, - results_width = 0.8, - border = {}, - borderchars = { '─', '│', '─', '│', '╭', '╮', '╯', '╰' }, - color_devicons = true, - use_less = true, - set_env = { ['COLORTERM'] = 'truecolor' }, -- default = nil, - file_previewer = require'telescope.previewers'.vim_buffer_cat.new, - grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new, - qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new, - - -- Developer configurations: Not meant for general override - buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker - }, - - extensions = { - media_files = { - filetypes = {"png", "webp", "jpg", "jpeg"}, - find_cmd = "rg" -- find command (defaults to `fd`) + extensions = { + media_files = { + filetypes = {"png", "webp", "jpg", "jpeg"}, + find_cmd = "rg" -- find command (defaults to `fd`) + } } - } +} - } +require("telescope").load_extension("media_files") -require('telescope').load_extension('media_files') +local opt = {noremap = true, silent = true} -local opt = { noremap = true, silent = true } - -vim.g.mapleader = ' ' -vim.api.nvim_set_keymap('n', 'ff', [[lua require('telescope.builtin').find_files()]], opt) -vim.api.nvim_set_keymap('n', 'fp', [[lua require('telescope').extensions.media_files.media_files()]], opt) -vim.api.nvim_set_keymap('n', 'fb', [[lua require('telescope.builtin').buffers()]], opt) -vim.api.nvim_set_keymap('n', 'fh', [[lua require('telescope.builtin').help_tags()]], opt) -vim.api.nvim_set_keymap('n', 'fo', [[lua require('telescope.builtin').oldfiles()]], opt) -vim.api.nvim_set_keymap('n', 'fm', [[ Neoformat]] , opt) -vim.api.nvim_set_keymap('n', '', [[ %y+]] , opt) +vim.g.mapleader = " " +vim.api.nvim_set_keymap("n", "ff", [[lua require('telescope.builtin').find_files()]], opt) +vim.api.nvim_set_keymap( + "n", + "fp", + [[lua require('telescope').extensions.media_files.media_files()]], + opt +) +vim.api.nvim_set_keymap("n", "fb", [[lua require('telescope.builtin').buffers()]], opt) +vim.api.nvim_set_keymap("n", "fh", [[lua require('telescope.builtin').help_tags()]], opt) +vim.api.nvim_set_keymap("n", "fo", [[lua require('telescope.builtin').oldfiles()]], opt) +vim.api.nvim_set_keymap("n", "fm", [[ Neoformat]], opt) +vim.api.nvim_set_keymap("n", "", [[ %y+]], opt) diff --git a/lua/treesitter/lua.lua b/lua/treesitter/lua.lua index c88478d..1608a44 100644 --- a/lua/treesitter/lua.lua +++ b/lua/treesitter/lua.lua @@ -1,13 +1,17 @@ local ts_config = require("nvim-treesitter.configs") ts_config.setup { - ensure_installed = { - "javascript","html","css","bash","cpp","rust","lua" - }, - - highlight = { - enable = true, - use_languagetree = true, - }, + ensure_installed = { + "javascript", + "html", + "css", + "bash", + "cpp", + "rust", + "lua" + }, + highlight = { + enable = true, + use_languagetree = true + } } - diff --git a/lua/utils/lua.lua b/lua/utils/lua.lua index d36b260..75db6fd 100644 --- a/lua/utils/lua.lua +++ b/lua/utils/lua.lua @@ -1,36 +1,37 @@ -local scopes = { o = vim.o, b = vim.bo, w = vim.wo} +local scopes = {o = vim.o, b = vim.bo, w = vim.wo} local function opt(scope, key, value) - scopes[scope][key] = value - if scope ~= 'o' then scopes['o'][key] = value end + scopes[scope][key] = value + if scope ~= "o" then + scopes["o"][key] = value + end end -opt('o', 'hidden', true) -opt('o', 'ignorecase', true) -opt('o', 'splitbelow', true) -opt('o', 'splitright', true) -opt('o', 'termguicolors', true) -opt('w', 'number', true) -opt('o', 'numberwidth' , 2) +opt("o", "hidden", true) +opt("o", "ignorecase", true) +opt("o", "splitbelow", true) +opt("o", "splitright", true) +opt("o", "termguicolors", true) +opt("w", "number", true) +opt("o", "numberwidth", 2) -opt('o' ,'mouse' , "a") - -opt('w', 'signcolumn' , "yes") -opt('o' , 'cmdheight' , 1) -opt('o' , 'updatetime' , 250) -opt('o' , 'clipboard' , 'unnamedplus') +opt("o", "mouse", "a") +opt("w", "signcolumn", "yes") +opt("o", "cmdheight", 1) +opt("o", "updatetime", 250) +opt("o", "clipboard", "unnamedplus") local M = {} function M.is_buffer_empty() - -- Check whether the current buffer is empty - return vim.fn.empty(vim.fn.expand('%:t')) == 1 + -- Check whether the current buffer is empty + return vim.fn.empty(vim.fn.expand("%:t")) == 1 end function M.has_width_gt(cols) - -- Check if the windows width is greater than a given number of columns - return vim.fn.winwidth(0) / 2 > cols + -- Check if the windows width is greater than a given number of columns + return vim.fn.winwidth(0) / 2 > cols end return M diff --git a/lua/web-devicons/lua.lua b/lua/web-devicons/lua.lua index 41b20ea..be968a6 100644 --- a/lua/web-devicons/lua.lua +++ b/lua/web-devicons/lua.lua @@ -1,64 +1,61 @@ vim.cmd [[packadd nvim-web-devicons]] -require'nvim-web-devicons'.setup { - - override = { - html = { - icon = "", - color = "#DE8C92", - name = "html" - }, - css = { - icon = "", - color = "#61afef", - name = "css" - }, - js = { - icon = "", - color = "#EBCB8B", - name = "js" - }, - png = { - icon = " ", - color = "#BD77DC", - name = "png" - }, - jpg = { - icon = " ", - color = "#BD77DC", - name = "jpg" - }, - jpeg = { - icon = " ", - color = "#BD77DC", - name = "jpeg" - }, - mp3 = { - icon = "", - color = "#C8CCD4", - name = "mp3" - }, - mp4 = { - icon = "", - color = "#C8CCD4", - name = "mp4" - }, - out = { - icon = "", - color = "#C8CCD4", - name = "out" - }, - toml = { - icon = "", - color = "#61afef", - name = "toml" - }, - - lock = { - icon = "", - color = "#DE6B74", - name = "lock" - } - }; - +require "nvim-web-devicons".setup { + override = { + html = { + icon = "", + color = "#DE8C92", + name = "html" + }, + css = { + icon = "", + color = "#61afef", + name = "css" + }, + js = { + icon = "", + color = "#EBCB8B", + name = "js" + }, + png = { + icon = " ", + color = "#BD77DC", + name = "png" + }, + jpg = { + icon = " ", + color = "#BD77DC", + name = "jpg" + }, + jpeg = { + icon = " ", + color = "#BD77DC", + name = "jpeg" + }, + mp3 = { + icon = "", + color = "#C8CCD4", + name = "mp3" + }, + mp4 = { + icon = "", + color = "#C8CCD4", + name = "mp4" + }, + out = { + icon = "", + color = "#C8CCD4", + name = "out" + }, + toml = { + icon = "", + color = "#61afef", + name = "toml" + }, + lock = { + icon = "", + color = "#DE6B74", + name = "lock" + } + } } From 1f312e662cbe7bdf9d23a4ac7c6a19a8d03ef529 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 06:56:49 +0530 Subject: [PATCH 0029/1541] rm vimscript conf --- neovim_vimscriptonly/nvim/autoload/plug.vim | 2788 ----------------- .../nvim/autoload/plug.vim.old | 2786 ---------------- .../nvim/autoload/vim-plug/plugins.vim | 18 - neovim_vimscriptonly/nvim/coc-settings.json | 25 - neovim_vimscriptonly/nvim/confs/coc.vim | 113 - neovim_vimscriptonly/nvim/confs/cpp.vim | 19 - neovim_vimscriptonly/nvim/confs/gitSigns.vim | 32 - neovim_vimscriptonly/nvim/confs/keybinds.vim | 19 - .../nvim/confs/miscSettings.vim | 53 - neovim_vimscriptonly/nvim/confs/nvimTree.vim | 148 - .../nvim/confs/pluginList.vim | 24 - neovim_vimscriptonly/nvim/confs/rust.vim | 16 - .../nvim/confs/statusline.vim | 193 -- neovim_vimscriptonly/nvim/confs/tabline.vim | 103 - neovim_vimscriptonly/nvim/confs/telescope.vim | 80 - .../nvim/confs/treesitter.vim | 16 - neovim_vimscriptonly/nvim/confs/ui.vim | 30 - neovim_vimscriptonly/nvim/init.vim | 20 - 18 files changed, 6483 deletions(-) delete mode 100644 neovim_vimscriptonly/nvim/autoload/plug.vim delete mode 100644 neovim_vimscriptonly/nvim/autoload/plug.vim.old delete mode 100644 neovim_vimscriptonly/nvim/autoload/vim-plug/plugins.vim delete mode 100644 neovim_vimscriptonly/nvim/coc-settings.json delete mode 100644 neovim_vimscriptonly/nvim/confs/coc.vim delete mode 100644 neovim_vimscriptonly/nvim/confs/cpp.vim delete mode 100644 neovim_vimscriptonly/nvim/confs/gitSigns.vim delete mode 100644 neovim_vimscriptonly/nvim/confs/keybinds.vim delete mode 100644 neovim_vimscriptonly/nvim/confs/miscSettings.vim delete mode 100644 neovim_vimscriptonly/nvim/confs/nvimTree.vim delete mode 100644 neovim_vimscriptonly/nvim/confs/pluginList.vim delete mode 100644 neovim_vimscriptonly/nvim/confs/rust.vim delete mode 100644 neovim_vimscriptonly/nvim/confs/statusline.vim delete mode 100644 neovim_vimscriptonly/nvim/confs/tabline.vim delete mode 100644 neovim_vimscriptonly/nvim/confs/telescope.vim delete mode 100644 neovim_vimscriptonly/nvim/confs/treesitter.vim delete mode 100644 neovim_vimscriptonly/nvim/confs/ui.vim delete mode 100644 neovim_vimscriptonly/nvim/init.vim diff --git a/neovim_vimscriptonly/nvim/autoload/plug.vim b/neovim_vimscriptonly/nvim/autoload/plug.vim deleted file mode 100644 index 9c296ac..0000000 --- a/neovim_vimscriptonly/nvim/autoload/plug.vim +++ /dev/null @@ -1,2788 +0,0 @@ -" vim-plug: Vim plugin manager -" ============================ -" -" Download plug.vim and put it in ~/.vim/autoload -" -" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ -" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -" -" Edit your .vimrc -" -" call plug#begin('~/.vim/plugged') -" -" " Make sure you use single quotes -" -" " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align -" Plug 'junegunn/vim-easy-align' -" -" " Any valid git URL is allowed -" Plug 'https://github.com/junegunn/vim-github-dashboard.git' -" -" " Multiple Plug commands can be written in a single line using | separators -" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' -" -" " On-demand loading -" Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } -" Plug 'tpope/vim-fireplace', { 'for': 'clojure' } -" -" " Using a non-default branch -" Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } -" -" " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) -" Plug 'fatih/vim-go', { 'tag': '*' } -" -" " Plugin options -" Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' } -" -" " Plugin outside ~/.vim/plugged with post-update hook -" Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } -" -" " Unmanaged plugin (manually installed and updated) -" Plug '~/my-prototype-plugin' -" -" " Initialize plugin system -" call plug#end() -" -" Then reload .vimrc and :PlugInstall to install plugins. -" -" Plug options: -" -"| Option | Description | -"| ----------------------- | ------------------------------------------------ | -"| `branch`/`tag`/`commit` | Branch/tag/commit of the repository to use | -"| `rtp` | Subdirectory that contains Vim plugin | -"| `dir` | Custom directory for the plugin | -"| `as` | Use different name for the plugin | -"| `do` | Post-update hook (string or funcref) | -"| `on` | On-demand loading: Commands or ``-mappings | -"| `for` | On-demand loading: File types | -"| `frozen` | Do not update unless explicitly specified | -" -" More information: https://github.com/junegunn/vim-plug -" -" -" Copyright (c) 2017 Junegunn Choi -" -" MIT License -" -" Permission is hereby granted, free of charge, to any person obtaining -" a copy of this software and associated documentation files (the -" "Software"), to deal in the Software without restriction, including -" without limitation the rights to use, copy, modify, merge, publish, -" distribute, sublicense, and/or sell copies of the Software, and to -" permit persons to whom the Software is furnished to do so, subject to -" the following conditions: -" -" The above copyright notice and this permission notice shall be -" included in all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -if exists('g:loaded_plug') - finish -endif -let g:loaded_plug = 1 - -let s:cpo_save = &cpo -set cpo&vim - -let s:plug_src = 'https://github.com/junegunn/vim-plug.git' -let s:plug_tab = get(s:, 'plug_tab', -1) -let s:plug_buf = get(s:, 'plug_buf', -1) -let s:mac_gui = has('gui_macvim') && has('gui_running') -let s:is_win = has('win32') -let s:nvim = has('nvim-0.2') || (has('nvim') && exists('*jobwait') && !s:is_win) -let s:vim8 = has('patch-8.0.0039') && exists('*job_start') -if s:is_win && &shellslash - set noshellslash - let s:me = resolve(expand(':p')) - set shellslash -else - let s:me = resolve(expand(':p')) -endif -let s:base_spec = { 'branch': '', 'frozen': 0 } -let s:TYPE = { -\ 'string': type(''), -\ 'list': type([]), -\ 'dict': type({}), -\ 'funcref': type(function('call')) -\ } -let s:loaded = get(s:, 'loaded', {}) -let s:triggers = get(s:, 'triggers', {}) - -function! s:isabsolute(dir) abort - return a:dir =~# '^/' || (has('win32') && a:dir =~? '^\%(\\\|[A-Z]:\)') -endfunction - -function! s:git_dir(dir) abort - let gitdir = s:trim(a:dir) . '/.git' - if isdirectory(gitdir) - return gitdir - endif - if !filereadable(gitdir) - return '' - endif - let gitdir = matchstr(get(readfile(gitdir), 0, ''), '^gitdir: \zs.*') - if len(gitdir) && !s:isabsolute(gitdir) - let gitdir = a:dir . '/' . gitdir - endif - return isdirectory(gitdir) ? gitdir : '' -endfunction - -function! s:git_origin_url(dir) abort - let gitdir = s:git_dir(a:dir) - let config = gitdir . '/config' - if empty(gitdir) || !filereadable(config) - return '' - endif - return matchstr(join(readfile(config)), '\[remote "origin"\].\{-}url\s*=\s*\zs\S*\ze') -endfunction - -function! s:git_revision(dir) abort - let gitdir = s:git_dir(a:dir) - let head = gitdir . '/HEAD' - if empty(gitdir) || !filereadable(head) - return '' - endif - - let line = get(readfile(head), 0, '') - let ref = matchstr(line, '^ref: \zs.*') - if empty(ref) - return line - endif - - if filereadable(gitdir . '/' . ref) - return get(readfile(gitdir . '/' . ref), 0, '') - endif - - if filereadable(gitdir . '/packed-refs') - for line in readfile(gitdir . '/packed-refs') - if line =~# ' ' . ref - return matchstr(line, '^[0-9a-f]*') - endif - endfor - endif - - return '' -endfunction - -function! s:git_local_branch(dir) abort - let gitdir = s:git_dir(a:dir) - let head = gitdir . '/HEAD' - if empty(gitdir) || !filereadable(head) - return '' - endif - let branch = matchstr(get(readfile(head), 0, ''), '^ref: refs/heads/\zs.*') - return len(branch) ? branch : 'HEAD' -endfunction - -function! s:git_origin_branch(spec) - if len(a:spec.branch) - return a:spec.branch - endif - - " The file may not be present if this is a local repository - let gitdir = s:git_dir(a:spec.dir) - let origin_head = gitdir.'/refs/remotes/origin/HEAD' - if len(gitdir) && filereadable(origin_head) - return matchstr(get(readfile(origin_head), 0, ''), - \ '^ref: refs/remotes/origin/\zs.*') - endif - - " The command may not return the name of a branch in detached HEAD state - let result = s:lines(s:system('git symbolic-ref --short HEAD', a:spec.dir)) - return v:shell_error ? '' : result[-1] -endfunction - -if s:is_win - function! s:plug_call(fn, ...) - let shellslash = &shellslash - try - set noshellslash - return call(a:fn, a:000) - finally - let &shellslash = shellslash - endtry - endfunction -else - function! s:plug_call(fn, ...) - return call(a:fn, a:000) - endfunction -endif - -function! s:plug_getcwd() - return s:plug_call('getcwd') -endfunction - -function! s:plug_fnamemodify(fname, mods) - return s:plug_call('fnamemodify', a:fname, a:mods) -endfunction - -function! s:plug_expand(fmt) - return s:plug_call('expand', a:fmt, 1) -endfunction - -function! s:plug_tempname() - return s:plug_call('tempname') -endfunction - -function! plug#begin(...) - if a:0 > 0 - let s:plug_home_org = a:1 - let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p')) - elseif exists('g:plug_home') - let home = s:path(g:plug_home) - elseif !empty(&rtp) - let home = s:path(split(&rtp, ',')[0]) . '/plugged' - else - return s:err('Unable to determine plug home. Try calling plug#begin() with a path argument.') - endif - if s:plug_fnamemodify(home, ':t') ==# 'plugin' && s:plug_fnamemodify(home, ':h') ==# s:first_rtp - return s:err('Invalid plug home. '.home.' is a standard Vim runtime path and is not allowed.') - endif - - let g:plug_home = home - let g:plugs = {} - let g:plugs_order = [] - let s:triggers = {} - - call s:define_commands() - return 1 -endfunction - -function! s:define_commands() - command! -nargs=+ -bar Plug call plug#() - if !executable('git') - return s:err('`git` executable not found. Most commands will not be available. To suppress this message, prepend `silent!` to `call plug#begin(...)`.') - endif - if has('win32') - \ && &shellslash - \ && (&shell =~# 'cmd\(\.exe\)\?$' || &shell =~# 'powershell\(\.exe\)\?$') - return s:err('vim-plug does not support shell, ' . &shell . ', when shellslash is set.') - endif - if !has('nvim') - \ && (has('win32') || has('win32unix')) - \ && !has('multi_byte') - return s:err('Vim needs +multi_byte feature on Windows to run shell commands. Enable +iconv for best results.') - endif - command! -nargs=* -bar -bang -complete=customlist,s:names PlugInstall call s:install(0, []) - command! -nargs=* -bar -bang -complete=customlist,s:names PlugUpdate call s:update(0, []) - command! -nargs=0 -bar -bang PlugClean call s:clean(0) - command! -nargs=0 -bar PlugUpgrade if s:upgrade() | execute 'source' s:esc(s:me) | endif - command! -nargs=0 -bar PlugStatus call s:status() - command! -nargs=0 -bar PlugDiff call s:diff() - command! -nargs=? -bar -bang -complete=file PlugSnapshot call s:snapshot(0, ) -endfunction - -function! s:to_a(v) - return type(a:v) == s:TYPE.list ? a:v : [a:v] -endfunction - -function! s:to_s(v) - return type(a:v) == s:TYPE.string ? a:v : join(a:v, "\n") . "\n" -endfunction - -function! s:glob(from, pattern) - return s:lines(globpath(a:from, a:pattern)) -endfunction - -function! s:source(from, ...) - let found = 0 - for pattern in a:000 - for vim in s:glob(a:from, pattern) - execute 'source' s:esc(vim) - let found = 1 - endfor - endfor - return found -endfunction - -function! s:assoc(dict, key, val) - let a:dict[a:key] = add(get(a:dict, a:key, []), a:val) -endfunction - -function! s:ask(message, ...) - call inputsave() - echohl WarningMsg - let answer = input(a:message.(a:0 ? ' (y/N/a) ' : ' (y/N) ')) - echohl None - call inputrestore() - echo "\r" - return (a:0 && answer =~? '^a') ? 2 : (answer =~? '^y') ? 1 : 0 -endfunction - -function! s:ask_no_interrupt(...) - try - return call('s:ask', a:000) - catch - return 0 - endtry -endfunction - -function! s:lazy(plug, opt) - return has_key(a:plug, a:opt) && - \ (empty(s:to_a(a:plug[a:opt])) || - \ !isdirectory(a:plug.dir) || - \ len(s:glob(s:rtp(a:plug), 'plugin')) || - \ len(s:glob(s:rtp(a:plug), 'after/plugin'))) -endfunction - -function! plug#end() - if !exists('g:plugs') - return s:err('plug#end() called without calling plug#begin() first') - endif - - if exists('#PlugLOD') - augroup PlugLOD - autocmd! - augroup END - augroup! PlugLOD - endif - let lod = { 'ft': {}, 'map': {}, 'cmd': {} } - - if exists('g:did_load_filetypes') - filetype off - endif - for name in g:plugs_order - if !has_key(g:plugs, name) - continue - endif - let plug = g:plugs[name] - if get(s:loaded, name, 0) || !s:lazy(plug, 'on') && !s:lazy(plug, 'for') - let s:loaded[name] = 1 - continue - endif - - if has_key(plug, 'on') - let s:triggers[name] = { 'map': [], 'cmd': [] } - for cmd in s:to_a(plug.on) - if cmd =~? '^.\+' - if empty(mapcheck(cmd)) && empty(mapcheck(cmd, 'i')) - call s:assoc(lod.map, cmd, name) - endif - call add(s:triggers[name].map, cmd) - elseif cmd =~# '^[A-Z]' - let cmd = substitute(cmd, '!*$', '', '') - if exists(':'.cmd) != 2 - call s:assoc(lod.cmd, cmd, name) - endif - call add(s:triggers[name].cmd, cmd) - else - call s:err('Invalid `on` option: '.cmd. - \ '. Should start with an uppercase letter or ``.') - endif - endfor - endif - - if has_key(plug, 'for') - let types = s:to_a(plug.for) - if !empty(types) - augroup filetypedetect - call s:source(s:rtp(plug), 'ftdetect/**/*.vim', 'after/ftdetect/**/*.vim') - augroup END - endif - for type in types - call s:assoc(lod.ft, type, name) - endfor - endif - endfor - - for [cmd, names] in items(lod.cmd) - execute printf( - \ 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "", , , , %s)', - \ cmd, string(cmd), string(names)) - endfor - - for [map, names] in items(lod.map) - for [mode, map_prefix, key_prefix] in - \ [['i', '', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']] - execute printf( - \ '%snoremap %s %s:call lod_map(%s, %s, %s, "%s")', - \ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix) - endfor - endfor - - for [ft, names] in items(lod.ft) - augroup PlugLOD - execute printf('autocmd FileType %s call lod_ft(%s, %s)', - \ ft, string(ft), string(names)) - augroup END - endfor - - call s:reorg_rtp() - filetype plugin indent on - if has('vim_starting') - if has('syntax') && !exists('g:syntax_on') - syntax enable - end - else - call s:reload_plugins() - endif -endfunction - -function! s:loaded_names() - return filter(copy(g:plugs_order), 'get(s:loaded, v:val, 0)') -endfunction - -function! s:load_plugin(spec) - call s:source(s:rtp(a:spec), 'plugin/**/*.vim', 'after/plugin/**/*.vim') -endfunction - -function! s:reload_plugins() - for name in s:loaded_names() - call s:load_plugin(g:plugs[name]) - endfor -endfunction - -function! s:trim(str) - return substitute(a:str, '[\/]\+$', '', '') -endfunction - -function! s:version_requirement(val, min) - for idx in range(0, len(a:min) - 1) - let v = get(a:val, idx, 0) - if v < a:min[idx] | return 0 - elseif v > a:min[idx] | return 1 - endif - endfor - return 1 -endfunction - -function! s:git_version_requirement(...) - if !exists('s:git_version') - let s:git_version = map(split(split(s:system(['git', '--version']))[2], '\.'), 'str2nr(v:val)') - endif - return s:version_requirement(s:git_version, a:000) -endfunction - -function! s:progress_opt(base) - return a:base && !s:is_win && - \ s:git_version_requirement(1, 7, 1) ? '--progress' : '' -endfunction - -function! s:rtp(spec) - return s:path(a:spec.dir . get(a:spec, 'rtp', '')) -endfunction - -if s:is_win - function! s:path(path) - return s:trim(substitute(a:path, '/', '\', 'g')) - endfunction - - function! s:dirpath(path) - return s:path(a:path) . '\' - endfunction - - function! s:is_local_plug(repo) - return a:repo =~? '^[a-z]:\|^[%~]' - endfunction - - " Copied from fzf - function! s:wrap_cmds(cmds) - let cmds = [ - \ '@echo off', - \ 'setlocal enabledelayedexpansion'] - \ + (type(a:cmds) == type([]) ? a:cmds : [a:cmds]) - \ + ['endlocal'] - if has('iconv') - if !exists('s:codepage') - let s:codepage = libcallnr('kernel32.dll', 'GetACP', 0) - endif - return map(cmds, printf('iconv(v:val."\r", "%s", "cp%d")', &encoding, s:codepage)) - endif - return map(cmds, 'v:val."\r"') - endfunction - - function! s:batchfile(cmd) - let batchfile = s:plug_tempname().'.bat' - call writefile(s:wrap_cmds(a:cmd), batchfile) - let cmd = plug#shellescape(batchfile, {'shell': &shell, 'script': 0}) - if &shell =~# 'powershell\(\.exe\)\?$' - let cmd = '& ' . cmd - endif - return [batchfile, cmd] - endfunction -else - function! s:path(path) - return s:trim(a:path) - endfunction - - function! s:dirpath(path) - return substitute(a:path, '[/\\]*$', '/', '') - endfunction - - function! s:is_local_plug(repo) - return a:repo[0] =~ '[/$~]' - endfunction -endif - -function! s:err(msg) - echohl ErrorMsg - echom '[vim-plug] '.a:msg - echohl None -endfunction - -function! s:warn(cmd, msg) - echohl WarningMsg - execute a:cmd 'a:msg' - echohl None -endfunction - -function! s:esc(path) - return escape(a:path, ' ') -endfunction - -function! s:escrtp(path) - return escape(a:path, ' ,') -endfunction - -function! s:remove_rtp() - for name in s:loaded_names() - let rtp = s:rtp(g:plugs[name]) - execute 'set rtp-='.s:escrtp(rtp) - let after = globpath(rtp, 'after') - if isdirectory(after) - execute 'set rtp-='.s:escrtp(after) - endif - endfor -endfunction - -function! s:reorg_rtp() - if !empty(s:first_rtp) - execute 'set rtp-='.s:first_rtp - execute 'set rtp-='.s:last_rtp - endif - - " &rtp is modified from outside - if exists('s:prtp') && s:prtp !=# &rtp - call s:remove_rtp() - unlet! s:middle - endif - - let s:middle = get(s:, 'middle', &rtp) - let rtps = map(s:loaded_names(), 's:rtp(g:plugs[v:val])') - let afters = filter(map(copy(rtps), 'globpath(v:val, "after")'), '!empty(v:val)') - let rtp = join(map(rtps, 'escape(v:val, ",")'), ',') - \ . ','.s:middle.',' - \ . join(map(afters, 'escape(v:val, ",")'), ',') - let &rtp = substitute(substitute(rtp, ',,*', ',', 'g'), '^,\|,$', '', 'g') - let s:prtp = &rtp - - if !empty(s:first_rtp) - execute 'set rtp^='.s:first_rtp - execute 'set rtp+='.s:last_rtp - endif -endfunction - -function! s:doautocmd(...) - if exists('#'.join(a:000, '#')) - execute 'doautocmd' ((v:version > 703 || has('patch442')) ? '' : '') join(a:000) - endif -endfunction - -function! s:dobufread(names) - for name in a:names - let path = s:rtp(g:plugs[name]) - for dir in ['ftdetect', 'ftplugin', 'after/ftdetect', 'after/ftplugin'] - if len(finddir(dir, path)) - if exists('#BufRead') - doautocmd BufRead - endif - return - endif - endfor - endfor -endfunction - -function! plug#load(...) - if a:0 == 0 - return s:err('Argument missing: plugin name(s) required') - endif - if !exists('g:plugs') - return s:err('plug#begin was not called') - endif - let names = a:0 == 1 && type(a:1) == s:TYPE.list ? a:1 : a:000 - let unknowns = filter(copy(names), '!has_key(g:plugs, v:val)') - if !empty(unknowns) - let s = len(unknowns) > 1 ? 's' : '' - return s:err(printf('Unknown plugin%s: %s', s, join(unknowns, ', '))) - end - let unloaded = filter(copy(names), '!get(s:loaded, v:val, 0)') - if !empty(unloaded) - for name in unloaded - call s:lod([name], ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) - endfor - call s:dobufread(unloaded) - return 1 - end - return 0 -endfunction - -function! s:remove_triggers(name) - if !has_key(s:triggers, a:name) - return - endif - for cmd in s:triggers[a:name].cmd - execute 'silent! delc' cmd - endfor - for map in s:triggers[a:name].map - execute 'silent! unmap' map - execute 'silent! iunmap' map - endfor - call remove(s:triggers, a:name) -endfunction - -function! s:lod(names, types, ...) - for name in a:names - call s:remove_triggers(name) - let s:loaded[name] = 1 - endfor - call s:reorg_rtp() - - for name in a:names - let rtp = s:rtp(g:plugs[name]) - for dir in a:types - call s:source(rtp, dir.'/**/*.vim') - endfor - if a:0 - if !s:source(rtp, a:1) && !empty(s:glob(rtp, a:2)) - execute 'runtime' a:1 - endif - call s:source(rtp, a:2) - endif - call s:doautocmd('User', name) - endfor -endfunction - -function! s:lod_ft(pat, names) - let syn = 'syntax/'.a:pat.'.vim' - call s:lod(a:names, ['plugin', 'after/plugin'], syn, 'after/'.syn) - execute 'autocmd! PlugLOD FileType' a:pat - call s:doautocmd('filetypeplugin', 'FileType') - call s:doautocmd('filetypeindent', 'FileType') -endfunction - -function! s:lod_cmd(cmd, bang, l1, l2, args, names) - call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) - call s:dobufread(a:names) - execute printf('%s%s%s %s', (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args) -endfunction - -function! s:lod_map(map, names, with_prefix, prefix) - call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) - call s:dobufread(a:names) - let extra = '' - while 1 - let c = getchar(0) - if c == 0 - break - endif - let extra .= nr2char(c) - endwhile - - if a:with_prefix - let prefix = v:count ? v:count : '' - let prefix .= '"'.v:register.a:prefix - if mode(1) == 'no' - if v:operator == 'c' - let prefix = "\" . prefix - endif - let prefix .= v:operator - endif - call feedkeys(prefix, 'n') - endif - call feedkeys(substitute(a:map, '^', "\", '') . extra) -endfunction - -function! plug#(repo, ...) - if a:0 > 1 - return s:err('Invalid number of arguments (1..2)') - endif - - try - let repo = s:trim(a:repo) - let opts = a:0 == 1 ? s:parse_options(a:1) : s:base_spec - let name = get(opts, 'as', s:plug_fnamemodify(repo, ':t:s?\.git$??')) - let spec = extend(s:infer_properties(name, repo), opts) - if !has_key(g:plugs, name) - call add(g:plugs_order, name) - endif - let g:plugs[name] = spec - let s:loaded[name] = get(s:loaded, name, 0) - catch - return s:err(repo . ' ' . v:exception) - endtry -endfunction - -function! s:parse_options(arg) - let opts = copy(s:base_spec) - let type = type(a:arg) - let opt_errfmt = 'Invalid argument for "%s" option of :Plug (expected: %s)' - if type == s:TYPE.string - if empty(a:arg) - throw printf(opt_errfmt, 'tag', 'string') - endif - let opts.tag = a:arg - elseif type == s:TYPE.dict - for opt in ['branch', 'tag', 'commit', 'rtp', 'dir', 'as'] - if has_key(a:arg, opt) - \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt])) - throw printf(opt_errfmt, opt, 'string') - endif - endfor - for opt in ['on', 'for'] - if has_key(a:arg, opt) - \ && type(a:arg[opt]) != s:TYPE.list - \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt])) - throw printf(opt_errfmt, opt, 'string or list') - endif - endfor - if has_key(a:arg, 'do') - \ && type(a:arg.do) != s:TYPE.funcref - \ && (type(a:arg.do) != s:TYPE.string || empty(a:arg.do)) - throw printf(opt_errfmt, 'do', 'string or funcref') - endif - call extend(opts, a:arg) - if has_key(opts, 'dir') - let opts.dir = s:dirpath(s:plug_expand(opts.dir)) - endif - else - throw 'Invalid argument type (expected: string or dictionary)' - endif - return opts -endfunction - -function! s:infer_properties(name, repo) - let repo = a:repo - if s:is_local_plug(repo) - return { 'dir': s:dirpath(s:plug_expand(repo)) } - else - if repo =~ ':' - let uri = repo - else - if repo !~ '/' - throw printf('Invalid argument: %s (implicit `vim-scripts'' expansion is deprecated)', repo) - endif - let fmt = get(g:, 'plug_url_format', 'https://git::@github.com/%s.git') - let uri = printf(fmt, repo) - endif - return { 'dir': s:dirpath(g:plug_home.'/'.a:name), 'uri': uri } - endif -endfunction - -function! s:install(force, names) - call s:update_impl(0, a:force, a:names) -endfunction - -function! s:update(force, names) - call s:update_impl(1, a:force, a:names) -endfunction - -function! plug#helptags() - if !exists('g:plugs') - return s:err('plug#begin was not called') - endif - for spec in values(g:plugs) - let docd = join([s:rtp(spec), 'doc'], '/') - if isdirectory(docd) - silent! execute 'helptags' s:esc(docd) - endif - endfor - return 1 -endfunction - -function! s:syntax() - syntax clear - syntax region plug1 start=/\%1l/ end=/\%2l/ contains=plugNumber - syntax region plug2 start=/\%2l/ end=/\%3l/ contains=plugBracket,plugX - syn match plugNumber /[0-9]\+[0-9.]*/ contained - syn match plugBracket /[[\]]/ contained - syn match plugX /x/ contained - syn match plugDash /^-\{1}\ / - syn match plugPlus /^+/ - syn match plugStar /^*/ - syn match plugMessage /\(^- \)\@<=.*/ - syn match plugName /\(^- \)\@<=[^ ]*:/ - syn match plugSha /\%(: \)\@<=[0-9a-f]\{4,}$/ - syn match plugTag /(tag: [^)]\+)/ - syn match plugInstall /\(^+ \)\@<=[^:]*/ - syn match plugUpdate /\(^* \)\@<=[^:]*/ - syn match plugCommit /^ \X*[0-9a-f]\{7,9} .*/ contains=plugRelDate,plugEdge,plugTag - syn match plugEdge /^ \X\+$/ - syn match plugEdge /^ \X*/ contained nextgroup=plugSha - syn match plugSha /[0-9a-f]\{7,9}/ contained - syn match plugRelDate /([^)]*)$/ contained - syn match plugNotLoaded /(not loaded)$/ - syn match plugError /^x.*/ - syn region plugDeleted start=/^\~ .*/ end=/^\ze\S/ - syn match plugH2 /^.*:\n-\+$/ - syn match plugH2 /^-\{2,}/ - syn keyword Function PlugInstall PlugStatus PlugUpdate PlugClean - hi def link plug1 Title - hi def link plug2 Repeat - hi def link plugH2 Type - hi def link plugX Exception - hi def link plugBracket Structure - hi def link plugNumber Number - - hi def link plugDash Special - hi def link plugPlus Constant - hi def link plugStar Boolean - - hi def link plugMessage Function - hi def link plugName Label - hi def link plugInstall Function - hi def link plugUpdate Type - - hi def link plugError Error - hi def link plugDeleted Ignore - hi def link plugRelDate Comment - hi def link plugEdge PreProc - hi def link plugSha Identifier - hi def link plugTag Constant - - hi def link plugNotLoaded Comment -endfunction - -function! s:lpad(str, len) - return a:str . repeat(' ', a:len - len(a:str)) -endfunction - -function! s:lines(msg) - return split(a:msg, "[\r\n]") -endfunction - -function! s:lastline(msg) - return get(s:lines(a:msg), -1, '') -endfunction - -function! s:new_window() - execute get(g:, 'plug_window', 'vertical topleft new') -endfunction - -function! s:plug_window_exists() - let buflist = tabpagebuflist(s:plug_tab) - return !empty(buflist) && index(buflist, s:plug_buf) >= 0 -endfunction - -function! s:switch_in() - if !s:plug_window_exists() - return 0 - endif - - if winbufnr(0) != s:plug_buf - let s:pos = [tabpagenr(), winnr(), winsaveview()] - execute 'normal!' s:plug_tab.'gt' - let winnr = bufwinnr(s:plug_buf) - execute winnr.'wincmd w' - call add(s:pos, winsaveview()) - else - let s:pos = [winsaveview()] - endif - - setlocal modifiable - return 1 -endfunction - -function! s:switch_out(...) - call winrestview(s:pos[-1]) - setlocal nomodifiable - if a:0 > 0 - execute a:1 - endif - - if len(s:pos) > 1 - execute 'normal!' s:pos[0].'gt' - execute s:pos[1] 'wincmd w' - call winrestview(s:pos[2]) - endif -endfunction - -function! s:finish_bindings() - nnoremap R :call retry() - nnoremap D :PlugDiff - nnoremap S :PlugStatus - nnoremap U :call status_update() - xnoremap U :call status_update() - nnoremap ]] :silent! call section('') - nnoremap [[ :silent! call section('b') -endfunction - -function! s:prepare(...) - if empty(s:plug_getcwd()) - throw 'Invalid current working directory. Cannot proceed.' - endif - - for evar in ['$GIT_DIR', '$GIT_WORK_TREE'] - if exists(evar) - throw evar.' detected. Cannot proceed.' - endif - endfor - - call s:job_abort() - if s:switch_in() - if b:plug_preview == 1 - pc - endif - enew - else - call s:new_window() - endif - - nnoremap q :if b:plug_preview==1pcendifbd - if a:0 == 0 - call s:finish_bindings() - endif - let b:plug_preview = -1 - let s:plug_tab = tabpagenr() - let s:plug_buf = winbufnr(0) - call s:assign_name() - - for k in ['', 'L', 'o', 'X', 'd', 'dd'] - execute 'silent! unmap ' k - endfor - setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline modifiable nospell - if exists('+colorcolumn') - setlocal colorcolumn= - endif - setf vim-plug - if exists('g:syntax_on') - call s:syntax() - endif -endfunction - -function! s:assign_name() - " Assign buffer name - let prefix = '[Plugins]' - let name = prefix - let idx = 2 - while bufexists(name) - let name = printf('%s (%s)', prefix, idx) - let idx = idx + 1 - endwhile - silent! execute 'f' fnameescape(name) -endfunction - -function! s:chsh(swap) - let prev = [&shell, &shellcmdflag, &shellredir] - if !s:is_win - set shell=sh - endif - if a:swap - if &shell =~# 'powershell\(\.exe\)\?$' || &shell =~# 'pwsh$' - let &shellredir = '2>&1 | Out-File -Encoding UTF8 %s' - elseif &shell =~# 'sh' || &shell =~# 'cmd\(\.exe\)\?$' - set shellredir=>%s\ 2>&1 - endif - endif - return prev -endfunction - -function! s:bang(cmd, ...) - let batchfile = '' - try - let [sh, shellcmdflag, shrd] = s:chsh(a:0) - " FIXME: Escaping is incomplete. We could use shellescape with eval, - " but it won't work on Windows. - let cmd = a:0 ? s:with_cd(a:cmd, a:1) : a:cmd - if s:is_win - let [batchfile, cmd] = s:batchfile(cmd) - endif - let g:_plug_bang = (s:is_win && has('gui_running') ? 'silent ' : '').'!'.escape(cmd, '#!%') - execute "normal! :execute g:_plug_bang\\" - finally - unlet g:_plug_bang - let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] - if s:is_win && filereadable(batchfile) - call delete(batchfile) - endif - endtry - return v:shell_error ? 'Exit status: ' . v:shell_error : '' -endfunction - -function! s:regress_bar() - let bar = substitute(getline(2)[1:-2], '.*\zs=', 'x', '') - call s:progress_bar(2, bar, len(bar)) -endfunction - -function! s:is_updated(dir) - return !empty(s:system_chomp(['git', 'log', '--pretty=format:%h', 'HEAD...HEAD@{1}'], a:dir)) -endfunction - -function! s:do(pull, force, todo) - for [name, spec] in items(a:todo) - if !isdirectory(spec.dir) - continue - endif - let installed = has_key(s:update.new, name) - let updated = installed ? 0 : - \ (a:pull && index(s:update.errors, name) < 0 && s:is_updated(spec.dir)) - if a:force || installed || updated - execute 'cd' s:esc(spec.dir) - call append(3, '- Post-update hook for '. name .' ... ') - let error = '' - let type = type(spec.do) - if type == s:TYPE.string - if spec.do[0] == ':' - if !get(s:loaded, name, 0) - let s:loaded[name] = 1 - call s:reorg_rtp() - endif - call s:load_plugin(spec) - try - execute spec.do[1:] - catch - let error = v:exception - endtry - if !s:plug_window_exists() - cd - - throw 'Warning: vim-plug was terminated by the post-update hook of '.name - endif - else - let error = s:bang(spec.do) - endif - elseif type == s:TYPE.funcref - try - call s:load_plugin(spec) - let status = installed ? 'installed' : (updated ? 'updated' : 'unchanged') - call spec.do({ 'name': name, 'status': status, 'force': a:force }) - catch - let error = v:exception - endtry - else - let error = 'Invalid hook type' - endif - call s:switch_in() - call setline(4, empty(error) ? (getline(4) . 'OK') - \ : ('x' . getline(4)[1:] . error)) - if !empty(error) - call add(s:update.errors, name) - call s:regress_bar() - endif - cd - - endif - endfor -endfunction - -function! s:hash_match(a, b) - return stridx(a:a, a:b) == 0 || stridx(a:b, a:a) == 0 -endfunction - -function! s:checkout(spec) - let sha = a:spec.commit - let output = s:git_revision(a:spec.dir) - if !empty(output) && !s:hash_match(sha, s:lines(output)[0]) - let credential_helper = s:git_version_requirement(2) ? '-c credential.helper= ' : '' - let output = s:system( - \ 'git '.credential_helper.'fetch --depth 999999 && git checkout '.plug#shellescape(sha).' --', a:spec.dir) - endif - return output -endfunction - -function! s:finish(pull) - let new_frozen = len(filter(keys(s:update.new), 'g:plugs[v:val].frozen')) - if new_frozen - let s = new_frozen > 1 ? 's' : '' - call append(3, printf('- Installed %d frozen plugin%s', new_frozen, s)) - endif - call append(3, '- Finishing ... ') | 4 - redraw - call plug#helptags() - call plug#end() - call setline(4, getline(4) . 'Done!') - redraw - let msgs = [] - if !empty(s:update.errors) - call add(msgs, "Press 'R' to retry.") - endif - if a:pull && len(s:update.new) < len(filter(getline(5, '$'), - \ "v:val =~ '^- ' && v:val !~# 'Already up.to.date'")) - call add(msgs, "Press 'D' to see the updated changes.") - endif - echo join(msgs, ' ') - call s:finish_bindings() -endfunction - -function! s:retry() - if empty(s:update.errors) - return - endif - echo - call s:update_impl(s:update.pull, s:update.force, - \ extend(copy(s:update.errors), [s:update.threads])) -endfunction - -function! s:is_managed(name) - return has_key(g:plugs[a:name], 'uri') -endfunction - -function! s:names(...) - return sort(filter(keys(g:plugs), 'stridx(v:val, a:1) == 0 && s:is_managed(v:val)')) -endfunction - -function! s:check_ruby() - silent! ruby require 'thread'; VIM::command("let g:plug_ruby = '#{RUBY_VERSION}'") - if !exists('g:plug_ruby') - redraw! - return s:warn('echom', 'Warning: Ruby interface is broken') - endif - let ruby_version = split(g:plug_ruby, '\.') - unlet g:plug_ruby - return s:version_requirement(ruby_version, [1, 8, 7]) -endfunction - -function! s:update_impl(pull, force, args) abort - let sync = index(a:args, '--sync') >= 0 || has('vim_starting') - let args = filter(copy(a:args), 'v:val != "--sync"') - let threads = (len(args) > 0 && args[-1] =~ '^[1-9][0-9]*$') ? - \ remove(args, -1) : get(g:, 'plug_threads', 16) - - let managed = filter(copy(g:plugs), 's:is_managed(v:key)') - let todo = empty(args) ? filter(managed, '!v:val.frozen || !isdirectory(v:val.dir)') : - \ filter(managed, 'index(args, v:key) >= 0') - - if empty(todo) - return s:warn('echo', 'No plugin to '. (a:pull ? 'update' : 'install')) - endif - - if !s:is_win && s:git_version_requirement(2, 3) - let s:git_terminal_prompt = exists('$GIT_TERMINAL_PROMPT') ? $GIT_TERMINAL_PROMPT : '' - let $GIT_TERMINAL_PROMPT = 0 - for plug in values(todo) - let plug.uri = substitute(plug.uri, - \ '^https://git::@github\.com', 'https://github.com', '') - endfor - endif - - if !isdirectory(g:plug_home) - try - call mkdir(g:plug_home, 'p') - catch - return s:err(printf('Invalid plug directory: %s. '. - \ 'Try to call plug#begin with a valid directory', g:plug_home)) - endtry - endif - - if has('nvim') && !exists('*jobwait') && threads > 1 - call s:warn('echom', '[vim-plug] Update Neovim for parallel installer') - endif - - let use_job = s:nvim || s:vim8 - let python = (has('python') || has('python3')) && !use_job - let ruby = has('ruby') && !use_job && (v:version >= 703 || v:version == 702 && has('patch374')) && !(s:is_win && has('gui_running')) && threads > 1 && s:check_ruby() - - let s:update = { - \ 'start': reltime(), - \ 'all': todo, - \ 'todo': copy(todo), - \ 'errors': [], - \ 'pull': a:pull, - \ 'force': a:force, - \ 'new': {}, - \ 'threads': (python || ruby || use_job) ? min([len(todo), threads]) : 1, - \ 'bar': '', - \ 'fin': 0 - \ } - - call s:prepare(1) - call append(0, ['', '']) - normal! 2G - silent! redraw - - let s:clone_opt = [] - if get(g:, 'plug_shallow', 1) - call extend(s:clone_opt, ['--depth', '1']) - if s:git_version_requirement(1, 7, 10) - call add(s:clone_opt, '--no-single-branch') - endif - endif - - if has('win32unix') || has('wsl') - call extend(s:clone_opt, ['-c', 'core.eol=lf', '-c', 'core.autocrlf=input']) - endif - - let s:submodule_opt = s:git_version_requirement(2, 8) ? ' --jobs='.threads : '' - - " Python version requirement (>= 2.7) - if python && !has('python3') && !ruby && !use_job && s:update.threads > 1 - redir => pyv - silent python import platform; print platform.python_version() - redir END - let python = s:version_requirement( - \ map(split(split(pyv)[0], '\.'), 'str2nr(v:val)'), [2, 6]) - endif - - if (python || ruby) && s:update.threads > 1 - try - let imd = &imd - if s:mac_gui - set noimd - endif - if ruby - call s:update_ruby() - else - call s:update_python() - endif - catch - let lines = getline(4, '$') - let printed = {} - silent! 4,$d _ - for line in lines - let name = s:extract_name(line, '.', '') - if empty(name) || !has_key(printed, name) - call append('$', line) - if !empty(name) - let printed[name] = 1 - if line[0] == 'x' && index(s:update.errors, name) < 0 - call add(s:update.errors, name) - end - endif - endif - endfor - finally - let &imd = imd - call s:update_finish() - endtry - else - call s:update_vim() - while use_job && sync - sleep 100m - if s:update.fin - break - endif - endwhile - endif -endfunction - -function! s:log4(name, msg) - call setline(4, printf('- %s (%s)', a:msg, a:name)) - redraw -endfunction - -function! s:update_finish() - if exists('s:git_terminal_prompt') - let $GIT_TERMINAL_PROMPT = s:git_terminal_prompt - endif - if s:switch_in() - call append(3, '- Updating ...') | 4 - for [name, spec] in items(filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && (s:update.force || s:update.pull || has_key(s:update.new, v:key))')) - let [pos, _] = s:logpos(name) - if !pos - continue - endif - if has_key(spec, 'commit') - call s:log4(name, 'Checking out '.spec.commit) - let out = s:checkout(spec) - elseif has_key(spec, 'tag') - let tag = spec.tag - if tag =~ '\*' - let tags = s:lines(s:system('git tag --list '.plug#shellescape(tag).' --sort -version:refname 2>&1', spec.dir)) - if !v:shell_error && !empty(tags) - let tag = tags[0] - call s:log4(name, printf('Latest tag for %s -> %s', spec.tag, tag)) - call append(3, '') - endif - endif - call s:log4(name, 'Checking out '.tag) - let out = s:system('git checkout -q '.plug#shellescape(tag).' -- 2>&1', spec.dir) - else - let branch = s:git_origin_branch(spec) - call s:log4(name, 'Merging origin/'.s:esc(branch)) - let out = s:system('git checkout -q '.plug#shellescape(branch).' -- 2>&1' - \. (has_key(s:update.new, name) ? '' : ('&& git merge --ff-only '.plug#shellescape('origin/'.branch).' 2>&1')), spec.dir) - endif - if !v:shell_error && filereadable(spec.dir.'/.gitmodules') && - \ (s:update.force || has_key(s:update.new, name) || s:is_updated(spec.dir)) - call s:log4(name, 'Updating submodules. This may take a while.') - let out .= s:bang('git submodule update --init --recursive'.s:submodule_opt.' 2>&1', spec.dir) - endif - let msg = s:format_message(v:shell_error ? 'x': '-', name, out) - if v:shell_error - call add(s:update.errors, name) - call s:regress_bar() - silent execute pos 'd _' - call append(4, msg) | 4 - elseif !empty(out) - call setline(pos, msg[0]) - endif - redraw - endfor - silent 4 d _ - try - call s:do(s:update.pull, s:update.force, filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && has_key(v:val, "do")')) - catch - call s:warn('echom', v:exception) - call s:warn('echo', '') - return - endtry - call s:finish(s:update.pull) - call setline(1, 'Updated. Elapsed time: ' . split(reltimestr(reltime(s:update.start)))[0] . ' sec.') - call s:switch_out('normal! gg') - endif -endfunction - -function! s:job_abort() - if (!s:nvim && !s:vim8) || !exists('s:jobs') - return - endif - - for [name, j] in items(s:jobs) - if s:nvim - silent! call jobstop(j.jobid) - elseif s:vim8 - silent! call job_stop(j.jobid) - endif - if j.new - call s:rm_rf(g:plugs[name].dir) - endif - endfor - let s:jobs = {} -endfunction - -function! s:last_non_empty_line(lines) - let len = len(a:lines) - for idx in range(len) - let line = a:lines[len-idx-1] - if !empty(line) - return line - endif - endfor - return '' -endfunction - -function! s:job_out_cb(self, data) abort - let self = a:self - let data = remove(self.lines, -1) . a:data - let lines = map(split(data, "\n", 1), 'split(v:val, "\r", 1)[-1]') - call extend(self.lines, lines) - " To reduce the number of buffer updates - let self.tick = get(self, 'tick', -1) + 1 - if !self.running || self.tick % len(s:jobs) == 0 - let bullet = self.running ? (self.new ? '+' : '*') : (self.error ? 'x' : '-') - let result = self.error ? join(self.lines, "\n") : s:last_non_empty_line(self.lines) - call s:log(bullet, self.name, result) - endif -endfunction - -function! s:job_exit_cb(self, data) abort - let a:self.running = 0 - let a:self.error = a:data != 0 - call s:reap(a:self.name) - call s:tick() -endfunction - -function! s:job_cb(fn, job, ch, data) - if !s:plug_window_exists() " plug window closed - return s:job_abort() - endif - call call(a:fn, [a:job, a:data]) -endfunction - -function! s:nvim_cb(job_id, data, event) dict abort - return (a:event == 'stdout' || a:event == 'stderr') ? - \ s:job_cb('s:job_out_cb', self, 0, join(a:data, "\n")) : - \ s:job_cb('s:job_exit_cb', self, 0, a:data) -endfunction - -function! s:spawn(name, cmd, opts) - let job = { 'name': a:name, 'running': 1, 'error': 0, 'lines': [''], - \ 'new': get(a:opts, 'new', 0) } - let s:jobs[a:name] = job - - if s:nvim - if has_key(a:opts, 'dir') - let job.cwd = a:opts.dir - endif - let argv = a:cmd - call extend(job, { - \ 'on_stdout': function('s:nvim_cb'), - \ 'on_stderr': function('s:nvim_cb'), - \ 'on_exit': function('s:nvim_cb'), - \ }) - let jid = s:plug_call('jobstart', argv, job) - if jid > 0 - let job.jobid = jid - else - let job.running = 0 - let job.error = 1 - let job.lines = [jid < 0 ? argv[0].' is not executable' : - \ 'Invalid arguments (or job table is full)'] - endif - elseif s:vim8 - let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"script": 0})')) - if has_key(a:opts, 'dir') - let cmd = s:with_cd(cmd, a:opts.dir, 0) - endif - let argv = s:is_win ? ['cmd', '/s', '/c', '"'.cmd.'"'] : ['sh', '-c', cmd] - let jid = job_start(s:is_win ? join(argv, ' ') : argv, { - \ 'out_cb': function('s:job_cb', ['s:job_out_cb', job]), - \ 'err_cb': function('s:job_cb', ['s:job_out_cb', job]), - \ 'exit_cb': function('s:job_cb', ['s:job_exit_cb', job]), - \ 'err_mode': 'raw', - \ 'out_mode': 'raw' - \}) - if job_status(jid) == 'run' - let job.jobid = jid - else - let job.running = 0 - let job.error = 1 - let job.lines = ['Failed to start job'] - endif - else - let job.lines = s:lines(call('s:system', has_key(a:opts, 'dir') ? [a:cmd, a:opts.dir] : [a:cmd])) - let job.error = v:shell_error != 0 - let job.running = 0 - endif -endfunction - -function! s:reap(name) - let job = s:jobs[a:name] - if job.error - call add(s:update.errors, a:name) - elseif get(job, 'new', 0) - let s:update.new[a:name] = 1 - endif - let s:update.bar .= job.error ? 'x' : '=' - - let bullet = job.error ? 'x' : '-' - let result = job.error ? join(job.lines, "\n") : s:last_non_empty_line(job.lines) - call s:log(bullet, a:name, empty(result) ? 'OK' : result) - call s:bar() - - call remove(s:jobs, a:name) -endfunction - -function! s:bar() - if s:switch_in() - let total = len(s:update.all) - call setline(1, (s:update.pull ? 'Updating' : 'Installing'). - \ ' plugins ('.len(s:update.bar).'/'.total.')') - call s:progress_bar(2, s:update.bar, total) - call s:switch_out() - endif -endfunction - -function! s:logpos(name) - let max = line('$') - for i in range(4, max > 4 ? max : 4) - if getline(i) =~# '^[-+x*] '.a:name.':' - for j in range(i + 1, max > 5 ? max : 5) - if getline(j) !~ '^ ' - return [i, j - 1] - endif - endfor - return [i, i] - endif - endfor - return [0, 0] -endfunction - -function! s:log(bullet, name, lines) - if s:switch_in() - let [b, e] = s:logpos(a:name) - if b > 0 - silent execute printf('%d,%d d _', b, e) - if b > winheight('.') - let b = 4 - endif - else - let b = 4 - endif - " FIXME For some reason, nomodifiable is set after :d in vim8 - setlocal modifiable - call append(b - 1, s:format_message(a:bullet, a:name, a:lines)) - call s:switch_out() - endif -endfunction - -function! s:update_vim() - let s:jobs = {} - - call s:bar() - call s:tick() -endfunction - -function! s:tick() - let pull = s:update.pull - let prog = s:progress_opt(s:nvim || s:vim8) -while 1 " Without TCO, Vim stack is bound to explode - if empty(s:update.todo) - if empty(s:jobs) && !s:update.fin - call s:update_finish() - let s:update.fin = 1 - endif - return - endif - - let name = keys(s:update.todo)[0] - let spec = remove(s:update.todo, name) - let new = empty(globpath(spec.dir, '.git', 1)) - - call s:log(new ? '+' : '*', name, pull ? 'Updating ...' : 'Installing ...') - redraw - - let has_tag = has_key(spec, 'tag') - if !new - let [error, _] = s:git_validate(spec, 0) - if empty(error) - if pull - let cmd = s:git_version_requirement(2) ? ['git', '-c', 'credential.helper=', 'fetch'] : ['git', 'fetch'] - if has_tag && !empty(globpath(spec.dir, '.git/shallow')) - call extend(cmd, ['--depth', '99999999']) - endif - if !empty(prog) - call add(cmd, prog) - endif - call s:spawn(name, cmd, { 'dir': spec.dir }) - else - let s:jobs[name] = { 'running': 0, 'lines': ['Already installed'], 'error': 0 } - endif - else - let s:jobs[name] = { 'running': 0, 'lines': s:lines(error), 'error': 1 } - endif - else - let cmd = ['git', 'clone'] - if !has_tag - call extend(cmd, s:clone_opt) - endif - if !empty(prog) - call add(cmd, prog) - endif - call s:spawn(name, extend(cmd, [spec.uri, s:trim(spec.dir)]), { 'new': 1 }) - endif - - if !s:jobs[name].running - call s:reap(name) - endif - if len(s:jobs) >= s:update.threads - break - endif -endwhile -endfunction - -function! s:update_python() -let py_exe = has('python') ? 'python' : 'python3' -execute py_exe "<< EOF" -import datetime -import functools -import os -try: - import queue -except ImportError: - import Queue as queue -import random -import re -import shutil -import signal -import subprocess -import tempfile -import threading as thr -import time -import traceback -import vim - -G_NVIM = vim.eval("has('nvim')") == '1' -G_PULL = vim.eval('s:update.pull') == '1' -G_RETRIES = int(vim.eval('get(g:, "plug_retries", 2)')) + 1 -G_TIMEOUT = int(vim.eval('get(g:, "plug_timeout", 60)')) -G_CLONE_OPT = ' '.join(vim.eval('s:clone_opt')) -G_PROGRESS = vim.eval('s:progress_opt(1)') -G_LOG_PROB = 1.0 / int(vim.eval('s:update.threads')) -G_STOP = thr.Event() -G_IS_WIN = vim.eval('s:is_win') == '1' - -class PlugError(Exception): - def __init__(self, msg): - self.msg = msg -class CmdTimedOut(PlugError): - pass -class CmdFailed(PlugError): - pass -class InvalidURI(PlugError): - pass -class Action(object): - INSTALL, UPDATE, ERROR, DONE = ['+', '*', 'x', '-'] - -class Buffer(object): - def __init__(self, lock, num_plugs, is_pull): - self.bar = '' - self.event = 'Updating' if is_pull else 'Installing' - self.lock = lock - self.maxy = int(vim.eval('winheight(".")')) - self.num_plugs = num_plugs - - def __where(self, name): - """ Find first line with name in current buffer. Return line num. """ - found, lnum = False, 0 - matcher = re.compile('^[-+x*] {0}:'.format(name)) - for line in vim.current.buffer: - if matcher.search(line) is not None: - found = True - break - lnum += 1 - - if not found: - lnum = -1 - return lnum - - def header(self): - curbuf = vim.current.buffer - curbuf[0] = self.event + ' plugins ({0}/{1})'.format(len(self.bar), self.num_plugs) - - num_spaces = self.num_plugs - len(self.bar) - curbuf[1] = '[{0}{1}]'.format(self.bar, num_spaces * ' ') - - with self.lock: - vim.command('normal! 2G') - vim.command('redraw') - - def write(self, action, name, lines): - first, rest = lines[0], lines[1:] - msg = ['{0} {1}{2}{3}'.format(action, name, ': ' if first else '', first)] - msg.extend([' ' + line for line in rest]) - - try: - if action == Action.ERROR: - self.bar += 'x' - vim.command("call add(s:update.errors, '{0}')".format(name)) - elif action == Action.DONE: - self.bar += '=' - - curbuf = vim.current.buffer - lnum = self.__where(name) - if lnum != -1: # Found matching line num - del curbuf[lnum] - if lnum > self.maxy and action in set([Action.INSTALL, Action.UPDATE]): - lnum = 3 - else: - lnum = 3 - curbuf.append(msg, lnum) - - self.header() - except vim.error: - pass - -class Command(object): - CD = 'cd /d' if G_IS_WIN else 'cd' - - def __init__(self, cmd, cmd_dir=None, timeout=60, cb=None, clean=None): - self.cmd = cmd - if cmd_dir: - self.cmd = '{0} {1} && {2}'.format(Command.CD, cmd_dir, self.cmd) - self.timeout = timeout - self.callback = cb if cb else (lambda msg: None) - self.clean = clean if clean else (lambda: None) - self.proc = None - - @property - def alive(self): - """ Returns true only if command still running. """ - return self.proc and self.proc.poll() is None - - def execute(self, ntries=3): - """ Execute the command with ntries if CmdTimedOut. - Returns the output of the command if no Exception. - """ - attempt, finished, limit = 0, False, self.timeout - - while not finished: - try: - attempt += 1 - result = self.try_command() - finished = True - return result - except CmdTimedOut: - if attempt != ntries: - self.notify_retry() - self.timeout += limit - else: - raise - - def notify_retry(self): - """ Retry required for command, notify user. """ - for count in range(3, 0, -1): - if G_STOP.is_set(): - raise KeyboardInterrupt - msg = 'Timeout. Will retry in {0} second{1} ...'.format( - count, 's' if count != 1 else '') - self.callback([msg]) - time.sleep(1) - self.callback(['Retrying ...']) - - def try_command(self): - """ Execute a cmd & poll for callback. Returns list of output. - Raises CmdFailed -> return code for Popen isn't 0 - Raises CmdTimedOut -> command exceeded timeout without new output - """ - first_line = True - - try: - tfile = tempfile.NamedTemporaryFile(mode='w+b') - preexec_fn = not G_IS_WIN and os.setsid or None - self.proc = subprocess.Popen(self.cmd, stdout=tfile, - stderr=subprocess.STDOUT, - stdin=subprocess.PIPE, shell=True, - preexec_fn=preexec_fn) - thrd = thr.Thread(target=(lambda proc: proc.wait()), args=(self.proc,)) - thrd.start() - - thread_not_started = True - while thread_not_started: - try: - thrd.join(0.1) - thread_not_started = False - except RuntimeError: - pass - - while self.alive: - if G_STOP.is_set(): - raise KeyboardInterrupt - - if first_line or random.random() < G_LOG_PROB: - first_line = False - line = '' if G_IS_WIN else nonblock_read(tfile.name) - if line: - self.callback([line]) - - time_diff = time.time() - os.path.getmtime(tfile.name) - if time_diff > self.timeout: - raise CmdTimedOut(['Timeout!']) - - thrd.join(0.5) - - tfile.seek(0) - result = [line.decode('utf-8', 'replace').rstrip() for line in tfile] - - if self.proc.returncode != 0: - raise CmdFailed([''] + result) - - return result - except: - self.terminate() - raise - - def terminate(self): - """ Terminate process and cleanup. """ - if self.alive: - if G_IS_WIN: - os.kill(self.proc.pid, signal.SIGINT) - else: - os.killpg(self.proc.pid, signal.SIGTERM) - self.clean() - -class Plugin(object): - def __init__(self, name, args, buf_q, lock): - self.name = name - self.args = args - self.buf_q = buf_q - self.lock = lock - self.tag = args.get('tag', 0) - - def manage(self): - try: - if os.path.exists(self.args['dir']): - self.update() - else: - self.install() - with self.lock: - thread_vim_command("let s:update.new['{0}'] = 1".format(self.name)) - except PlugError as exc: - self.write(Action.ERROR, self.name, exc.msg) - except KeyboardInterrupt: - G_STOP.set() - self.write(Action.ERROR, self.name, ['Interrupted!']) - except: - # Any exception except those above print stack trace - msg = 'Trace:\n{0}'.format(traceback.format_exc().rstrip()) - self.write(Action.ERROR, self.name, msg.split('\n')) - raise - - def install(self): - target = self.args['dir'] - if target[-1] == '\\': - target = target[0:-1] - - def clean(target): - def _clean(): - try: - shutil.rmtree(target) - except OSError: - pass - return _clean - - self.write(Action.INSTALL, self.name, ['Installing ...']) - callback = functools.partial(self.write, Action.INSTALL, self.name) - cmd = 'git clone {0} {1} {2} {3} 2>&1'.format( - '' if self.tag else G_CLONE_OPT, G_PROGRESS, self.args['uri'], - esc(target)) - com = Command(cmd, None, G_TIMEOUT, callback, clean(target)) - result = com.execute(G_RETRIES) - self.write(Action.DONE, self.name, result[-1:]) - - def repo_uri(self): - cmd = 'git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url' - command = Command(cmd, self.args['dir'], G_TIMEOUT,) - result = command.execute(G_RETRIES) - return result[-1] - - def update(self): - actual_uri = self.repo_uri() - expect_uri = self.args['uri'] - regex = re.compile(r'^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$') - ma = regex.match(actual_uri) - mb = regex.match(expect_uri) - if ma is None or mb is None or ma.groups() != mb.groups(): - msg = ['', - 'Invalid URI: {0}'.format(actual_uri), - 'Expected {0}'.format(expect_uri), - 'PlugClean required.'] - raise InvalidURI(msg) - - if G_PULL: - self.write(Action.UPDATE, self.name, ['Updating ...']) - callback = functools.partial(self.write, Action.UPDATE, self.name) - fetch_opt = '--depth 99999999' if self.tag and os.path.isfile(os.path.join(self.args['dir'], '.git/shallow')) else '' - cmd = 'git fetch {0} {1} 2>&1'.format(fetch_opt, G_PROGRESS) - com = Command(cmd, self.args['dir'], G_TIMEOUT, callback) - result = com.execute(G_RETRIES) - self.write(Action.DONE, self.name, result[-1:]) - else: - self.write(Action.DONE, self.name, ['Already installed']) - - def write(self, action, name, msg): - self.buf_q.put((action, name, msg)) - -class PlugThread(thr.Thread): - def __init__(self, tname, args): - super(PlugThread, self).__init__() - self.tname = tname - self.args = args - - def run(self): - thr.current_thread().name = self.tname - buf_q, work_q, lock = self.args - - try: - while not G_STOP.is_set(): - name, args = work_q.get_nowait() - plug = Plugin(name, args, buf_q, lock) - plug.manage() - work_q.task_done() - except queue.Empty: - pass - -class RefreshThread(thr.Thread): - def __init__(self, lock): - super(RefreshThread, self).__init__() - self.lock = lock - self.running = True - - def run(self): - while self.running: - with self.lock: - thread_vim_command('noautocmd normal! a') - time.sleep(0.33) - - def stop(self): - self.running = False - -if G_NVIM: - def thread_vim_command(cmd): - vim.session.threadsafe_call(lambda: vim.command(cmd)) -else: - def thread_vim_command(cmd): - vim.command(cmd) - -def esc(name): - return '"' + name.replace('"', '\"') + '"' - -def nonblock_read(fname): - """ Read a file with nonblock flag. Return the last line. """ - fread = os.open(fname, os.O_RDONLY | os.O_NONBLOCK) - buf = os.read(fread, 100000).decode('utf-8', 'replace') - os.close(fread) - - line = buf.rstrip('\r\n') - left = max(line.rfind('\r'), line.rfind('\n')) - if left != -1: - left += 1 - line = line[left:] - - return line - -def main(): - thr.current_thread().name = 'main' - nthreads = int(vim.eval('s:update.threads')) - plugs = vim.eval('s:update.todo') - mac_gui = vim.eval('s:mac_gui') == '1' - - lock = thr.Lock() - buf = Buffer(lock, len(plugs), G_PULL) - buf_q, work_q = queue.Queue(), queue.Queue() - for work in plugs.items(): - work_q.put(work) - - start_cnt = thr.active_count() - for num in range(nthreads): - tname = 'PlugT-{0:02}'.format(num) - thread = PlugThread(tname, (buf_q, work_q, lock)) - thread.start() - if mac_gui: - rthread = RefreshThread(lock) - rthread.start() - - while not buf_q.empty() or thr.active_count() != start_cnt: - try: - action, name, msg = buf_q.get(True, 0.25) - buf.write(action, name, ['OK'] if not msg else msg) - buf_q.task_done() - except queue.Empty: - pass - except KeyboardInterrupt: - G_STOP.set() - - if mac_gui: - rthread.stop() - rthread.join() - -main() -EOF -endfunction - -function! s:update_ruby() - ruby << EOF - module PlugStream - SEP = ["\r", "\n", nil] - def get_line - buffer = '' - loop do - char = readchar rescue return - if SEP.include? char.chr - buffer << $/ - break - else - buffer << char - end - end - buffer - end - end unless defined?(PlugStream) - - def esc arg - %["#{arg.gsub('"', '\"')}"] - end - - def killall pid - pids = [pid] - if /mswin|mingw|bccwin/ =~ RUBY_PLATFORM - pids.each { |pid| Process.kill 'INT', pid.to_i rescue nil } - else - unless `which pgrep 2> /dev/null`.empty? - children = pids - until children.empty? - children = children.map { |pid| - `pgrep -P #{pid}`.lines.map { |l| l.chomp } - }.flatten - pids += children - end - end - pids.each { |pid| Process.kill 'TERM', pid.to_i rescue nil } - end - end - - def compare_git_uri a, b - regex = %r{^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$} - regex.match(a).to_a.drop(1) == regex.match(b).to_a.drop(1) - end - - require 'thread' - require 'fileutils' - require 'timeout' - running = true - iswin = VIM::evaluate('s:is_win').to_i == 1 - pull = VIM::evaluate('s:update.pull').to_i == 1 - base = VIM::evaluate('g:plug_home') - all = VIM::evaluate('s:update.todo') - limit = VIM::evaluate('get(g:, "plug_timeout", 60)') - tries = VIM::evaluate('get(g:, "plug_retries", 2)') + 1 - nthr = VIM::evaluate('s:update.threads').to_i - maxy = VIM::evaluate('winheight(".")').to_i - vim7 = VIM::evaluate('v:version').to_i <= 703 && RUBY_PLATFORM =~ /darwin/ - cd = iswin ? 'cd /d' : 'cd' - tot = VIM::evaluate('len(s:update.todo)') || 0 - bar = '' - skip = 'Already installed' - mtx = Mutex.new - take1 = proc { mtx.synchronize { running && all.shift } } - logh = proc { - cnt = bar.length - $curbuf[1] = "#{pull ? 'Updating' : 'Installing'} plugins (#{cnt}/#{tot})" - $curbuf[2] = '[' + bar.ljust(tot) + ']' - VIM::command('normal! 2G') - VIM::command('redraw') - } - where = proc { |name| (1..($curbuf.length)).find { |l| $curbuf[l] =~ /^[-+x*] #{name}:/ } } - log = proc { |name, result, type| - mtx.synchronize do - ing = ![true, false].include?(type) - bar += type ? '=' : 'x' unless ing - b = case type - when :install then '+' when :update then '*' - when true, nil then '-' else - VIM::command("call add(s:update.errors, '#{name}')") - 'x' - end - result = - if type || type.nil? - ["#{b} #{name}: #{result.lines.to_a.last || 'OK'}"] - elsif result =~ /^Interrupted|^Timeout/ - ["#{b} #{name}: #{result}"] - else - ["#{b} #{name}"] + result.lines.map { |l| " " << l } - end - if lnum = where.call(name) - $curbuf.delete lnum - lnum = 4 if ing && lnum > maxy - end - result.each_with_index do |line, offset| - $curbuf.append((lnum || 4) - 1 + offset, line.gsub(/\e\[./, '').chomp) - end - logh.call - end - } - bt = proc { |cmd, name, type, cleanup| - tried = timeout = 0 - begin - tried += 1 - timeout += limit - fd = nil - data = '' - if iswin - Timeout::timeout(timeout) do - tmp = VIM::evaluate('tempname()') - system("(#{cmd}) > #{tmp}") - data = File.read(tmp).chomp - File.unlink tmp rescue nil - end - else - fd = IO.popen(cmd).extend(PlugStream) - first_line = true - log_prob = 1.0 / nthr - while line = Timeout::timeout(timeout) { fd.get_line } - data << line - log.call name, line.chomp, type if name && (first_line || rand < log_prob) - first_line = false - end - fd.close - end - [$? == 0, data.chomp] - rescue Timeout::Error, Interrupt => e - if fd && !fd.closed? - killall fd.pid - fd.close - end - cleanup.call if cleanup - if e.is_a?(Timeout::Error) && tried < tries - 3.downto(1) do |countdown| - s = countdown > 1 ? 's' : '' - log.call name, "Timeout. Will retry in #{countdown} second#{s} ...", type - sleep 1 - end - log.call name, 'Retrying ...', type - retry - end - [false, e.is_a?(Interrupt) ? "Interrupted!" : "Timeout!"] - end - } - main = Thread.current - threads = [] - watcher = Thread.new { - if vim7 - while VIM::evaluate('getchar(1)') - sleep 0.1 - end - else - require 'io/console' # >= Ruby 1.9 - nil until IO.console.getch == 3.chr - end - mtx.synchronize do - running = false - threads.each { |t| t.raise Interrupt } unless vim7 - end - threads.each { |t| t.join rescue nil } - main.kill - } - refresh = Thread.new { - while true - mtx.synchronize do - break unless running - VIM::command('noautocmd normal! a') - end - sleep 0.2 - end - } if VIM::evaluate('s:mac_gui') == 1 - - clone_opt = VIM::evaluate('s:clone_opt').join(' ') - progress = VIM::evaluate('s:progress_opt(1)') - nthr.times do - mtx.synchronize do - threads << Thread.new { - while pair = take1.call - name = pair.first - dir, uri, tag = pair.last.values_at *%w[dir uri tag] - exists = File.directory? dir - ok, result = - if exists - chdir = "#{cd} #{iswin ? dir : esc(dir)}" - ret, data = bt.call "#{chdir} && git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url", nil, nil, nil - current_uri = data.lines.to_a.last - if !ret - if data =~ /^Interrupted|^Timeout/ - [false, data] - else - [false, [data.chomp, "PlugClean required."].join($/)] - end - elsif !compare_git_uri(current_uri, uri) - [false, ["Invalid URI: #{current_uri}", - "Expected: #{uri}", - "PlugClean required."].join($/)] - else - if pull - log.call name, 'Updating ...', :update - fetch_opt = (tag && File.exist?(File.join(dir, '.git/shallow'))) ? '--depth 99999999' : '' - bt.call "#{chdir} && git fetch #{fetch_opt} #{progress} 2>&1", name, :update, nil - else - [true, skip] - end - end - else - d = esc dir.sub(%r{[\\/]+$}, '') - log.call name, 'Installing ...', :install - bt.call "git clone #{clone_opt unless tag} #{progress} #{uri} #{d} 2>&1", name, :install, proc { - FileUtils.rm_rf dir - } - end - mtx.synchronize { VIM::command("let s:update.new['#{name}'] = 1") } if !exists && ok - log.call name, result, ok - end - } if running - end - end - threads.each { |t| t.join rescue nil } - logh.call - refresh.kill if refresh - watcher.kill -EOF -endfunction - -function! s:shellesc_cmd(arg, script) - let escaped = substitute('"'.a:arg.'"', '[&|<>()@^!"]', '^&', 'g') - return substitute(escaped, '%', (a:script ? '%' : '^') . '&', 'g') -endfunction - -function! s:shellesc_ps1(arg) - return "'".substitute(escape(a:arg, '\"'), "'", "''", 'g')."'" -endfunction - -function! s:shellesc_sh(arg) - return "'".substitute(a:arg, "'", "'\\\\''", 'g')."'" -endfunction - -" Escape the shell argument based on the shell. -" Vim and Neovim's shellescape() are insufficient. -" 1. shellslash determines whether to use single/double quotes. -" Double-quote escaping is fragile for cmd.exe. -" 2. It does not work for powershell. -" 3. It does not work for *sh shells if the command is executed -" via cmd.exe (ie. cmd.exe /c sh -c command command_args) -" 4. It does not support batchfile syntax. -" -" Accepts an optional dictionary with the following keys: -" - shell: same as Vim/Neovim 'shell' option. -" If unset, fallback to 'cmd.exe' on Windows or 'sh'. -" - script: If truthy and shell is cmd.exe, escape for batchfile syntax. -function! plug#shellescape(arg, ...) - if a:arg =~# '^[A-Za-z0-9_/:.-]\+$' - return a:arg - endif - let opts = a:0 > 0 && type(a:1) == s:TYPE.dict ? a:1 : {} - let shell = get(opts, 'shell', s:is_win ? 'cmd.exe' : 'sh') - let script = get(opts, 'script', 1) - if shell =~# 'cmd\(\.exe\)\?$' - return s:shellesc_cmd(a:arg, script) - elseif shell =~# 'powershell\(\.exe\)\?$' || shell =~# 'pwsh$' - return s:shellesc_ps1(a:arg) - endif - return s:shellesc_sh(a:arg) -endfunction - -function! s:glob_dir(path) - return map(filter(s:glob(a:path, '**'), 'isdirectory(v:val)'), 's:dirpath(v:val)') -endfunction - -function! s:progress_bar(line, bar, total) - call setline(a:line, '[' . s:lpad(a:bar, a:total) . ']') -endfunction - -function! s:compare_git_uri(a, b) - " See `git help clone' - " https:// [user@] github.com[:port] / junegunn/vim-plug [.git] - " [git@] github.com[:port] : junegunn/vim-plug [.git] - " file:// / junegunn/vim-plug [/] - " / junegunn/vim-plug [/] - let pat = '^\%(\w\+://\)\='.'\%([^@/]*@\)\='.'\([^:/]*\%(:[0-9]*\)\=\)'.'[:/]'.'\(.\{-}\)'.'\%(\.git\)\=/\?$' - let ma = matchlist(a:a, pat) - let mb = matchlist(a:b, pat) - return ma[1:2] ==# mb[1:2] -endfunction - -function! s:format_message(bullet, name, message) - if a:bullet != 'x' - return [printf('%s %s: %s', a:bullet, a:name, s:lastline(a:message))] - else - let lines = map(s:lines(a:message), '" ".v:val') - return extend([printf('x %s:', a:name)], lines) - endif -endfunction - -function! s:with_cd(cmd, dir, ...) - let script = a:0 > 0 ? a:1 : 1 - return printf('cd%s %s && %s', s:is_win ? ' /d' : '', plug#shellescape(a:dir, {'script': script}), a:cmd) -endfunction - -function! s:system(cmd, ...) - let batchfile = '' - try - let [sh, shellcmdflag, shrd] = s:chsh(1) - if type(a:cmd) == s:TYPE.list - " Neovim's system() supports list argument to bypass the shell - " but it cannot set the working directory for the command. - " Assume that the command does not rely on the shell. - if has('nvim') && a:0 == 0 - return system(a:cmd) - endif - let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"shell": &shell, "script": 0})')) - if &shell =~# 'powershell\(\.exe\)\?$' - let cmd = '& ' . cmd - endif - else - let cmd = a:cmd - endif - if a:0 > 0 - let cmd = s:with_cd(cmd, a:1, type(a:cmd) != s:TYPE.list) - endif - if s:is_win && type(a:cmd) != s:TYPE.list - let [batchfile, cmd] = s:batchfile(cmd) - endif - return system(cmd) - finally - let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] - if s:is_win && filereadable(batchfile) - call delete(batchfile) - endif - endtry -endfunction - -function! s:system_chomp(...) - let ret = call('s:system', a:000) - return v:shell_error ? '' : substitute(ret, '\n$', '', '') -endfunction - -function! s:git_validate(spec, check_branch) - let err = '' - if isdirectory(a:spec.dir) - let result = [s:git_local_branch(a:spec.dir), s:git_origin_url(a:spec.dir)] - let remote = result[-1] - if empty(remote) - let err = join([remote, 'PlugClean required.'], "\n") - elseif !s:compare_git_uri(remote, a:spec.uri) - let err = join(['Invalid URI: '.remote, - \ 'Expected: '.a:spec.uri, - \ 'PlugClean required.'], "\n") - elseif a:check_branch && has_key(a:spec, 'commit') - let sha = s:git_revision(a:spec.dir) - if empty(sha) - let err = join(add(result, 'PlugClean required.'), "\n") - elseif !s:hash_match(sha, a:spec.commit) - let err = join([printf('Invalid HEAD (expected: %s, actual: %s)', - \ a:spec.commit[:6], sha[:6]), - \ 'PlugUpdate required.'], "\n") - endif - elseif a:check_branch - let current_branch = result[0] - " Check tag - let origin_branch = s:git_origin_branch(a:spec) - if has_key(a:spec, 'tag') - let tag = s:system_chomp('git describe --exact-match --tags HEAD 2>&1', a:spec.dir) - if a:spec.tag !=# tag && a:spec.tag !~ '\*' - let err = printf('Invalid tag: %s (expected: %s). Try PlugUpdate.', - \ (empty(tag) ? 'N/A' : tag), a:spec.tag) - endif - " Check branch - elseif origin_branch !=# current_branch - let err = printf('Invalid branch: %s (expected: %s). Try PlugUpdate.', - \ current_branch, origin_branch) - endif - if empty(err) - let [ahead, behind] = split(s:lastline(s:system([ - \ 'git', 'rev-list', '--count', '--left-right', - \ printf('HEAD...origin/%s', origin_branch) - \ ], a:spec.dir)), '\t') - if !v:shell_error && ahead - if behind - " Only mention PlugClean if diverged, otherwise it's likely to be - " pushable (and probably not that messed up). - let err = printf( - \ "Diverged from origin/%s (%d commit(s) ahead and %d commit(s) behind!\n" - \ .'Backup local changes and run PlugClean and PlugUpdate to reinstall it.', origin_branch, ahead, behind) - else - let err = printf("Ahead of origin/%s by %d commit(s).\n" - \ .'Cannot update until local changes are pushed.', - \ origin_branch, ahead) - endif - endif - endif - endif - else - let err = 'Not found' - endif - return [err, err =~# 'PlugClean'] -endfunction - -function! s:rm_rf(dir) - if isdirectory(a:dir) - return s:system(s:is_win - \ ? 'rmdir /S /Q '.plug#shellescape(a:dir) - \ : ['rm', '-rf', a:dir]) - endif -endfunction - -function! s:clean(force) - call s:prepare() - call append(0, 'Searching for invalid plugins in '.g:plug_home) - call append(1, '') - - " List of valid directories - let dirs = [] - let errs = {} - let [cnt, total] = [0, len(g:plugs)] - for [name, spec] in items(g:plugs) - if !s:is_managed(name) - call add(dirs, spec.dir) - else - let [err, clean] = s:git_validate(spec, 1) - if clean - let errs[spec.dir] = s:lines(err)[0] - else - call add(dirs, spec.dir) - endif - endif - let cnt += 1 - call s:progress_bar(2, repeat('=', cnt), total) - normal! 2G - redraw - endfor - - let allowed = {} - for dir in dirs - let allowed[s:dirpath(s:plug_fnamemodify(dir, ':h:h'))] = 1 - let allowed[dir] = 1 - for child in s:glob_dir(dir) - let allowed[child] = 1 - endfor - endfor - - let todo = [] - let found = sort(s:glob_dir(g:plug_home)) - while !empty(found) - let f = remove(found, 0) - if !has_key(allowed, f) && isdirectory(f) - call add(todo, f) - call append(line('$'), '- ' . f) - if has_key(errs, f) - call append(line('$'), ' ' . errs[f]) - endif - let found = filter(found, 'stridx(v:val, f) != 0') - end - endwhile - - 4 - redraw - if empty(todo) - call append(line('$'), 'Already clean.') - else - let s:clean_count = 0 - call append(3, ['Directories to delete:', '']) - redraw! - if a:force || s:ask_no_interrupt('Delete all directories?') - call s:delete([6, line('$')], 1) - else - call setline(4, 'Cancelled.') - nnoremap d :set opfunc=delete_opg@ - nmap dd d_ - xnoremap d :call delete_op(visualmode(), 1) - echo 'Delete the lines (d{motion}) to delete the corresponding directories' - endif - endif - 4 - setlocal nomodifiable -endfunction - -function! s:delete_op(type, ...) - call s:delete(a:0 ? [line("'<"), line("'>")] : [line("'["), line("']")], 0) -endfunction - -function! s:delete(range, force) - let [l1, l2] = a:range - let force = a:force - let err_count = 0 - while l1 <= l2 - let line = getline(l1) - if line =~ '^- ' && isdirectory(line[2:]) - execute l1 - redraw! - let answer = force ? 1 : s:ask('Delete '.line[2:].'?', 1) - let force = force || answer > 1 - if answer - let err = s:rm_rf(line[2:]) - setlocal modifiable - if empty(err) - call setline(l1, '~'.line[1:]) - let s:clean_count += 1 - else - delete _ - call append(l1 - 1, s:format_message('x', line[1:], err)) - let l2 += len(s:lines(err)) - let err_count += 1 - endif - let msg = printf('Removed %d directories.', s:clean_count) - if err_count > 0 - let msg .= printf(' Failed to remove %d directories.', err_count) - endif - call setline(4, msg) - setlocal nomodifiable - endif - endif - let l1 += 1 - endwhile -endfunction - -function! s:upgrade() - echo 'Downloading the latest version of vim-plug' - redraw - let tmp = s:plug_tempname() - let new = tmp . '/plug.vim' - - try - let out = s:system(['git', 'clone', '--depth', '1', s:plug_src, tmp]) - if v:shell_error - return s:err('Error upgrading vim-plug: '. out) - endif - - if readfile(s:me) ==# readfile(new) - echo 'vim-plug is already up-to-date' - return 0 - else - call rename(s:me, s:me . '.old') - call rename(new, s:me) - unlet g:loaded_plug - echo 'vim-plug has been upgraded' - return 1 - endif - finally - silent! call s:rm_rf(tmp) - endtry -endfunction - -function! s:upgrade_specs() - for spec in values(g:plugs) - let spec.frozen = get(spec, 'frozen', 0) - endfor -endfunction - -function! s:status() - call s:prepare() - call append(0, 'Checking plugins') - call append(1, '') - - let ecnt = 0 - let unloaded = 0 - let [cnt, total] = [0, len(g:plugs)] - for [name, spec] in items(g:plugs) - let is_dir = isdirectory(spec.dir) - if has_key(spec, 'uri') - if is_dir - let [err, _] = s:git_validate(spec, 1) - let [valid, msg] = [empty(err), empty(err) ? 'OK' : err] - else - let [valid, msg] = [0, 'Not found. Try PlugInstall.'] - endif - else - if is_dir - let [valid, msg] = [1, 'OK'] - else - let [valid, msg] = [0, 'Not found.'] - endif - endif - let cnt += 1 - let ecnt += !valid - " `s:loaded` entry can be missing if PlugUpgraded - if is_dir && get(s:loaded, name, -1) == 0 - let unloaded = 1 - let msg .= ' (not loaded)' - endif - call s:progress_bar(2, repeat('=', cnt), total) - call append(3, s:format_message(valid ? '-' : 'x', name, msg)) - normal! 2G - redraw - endfor - call setline(1, 'Finished. '.ecnt.' error(s).') - normal! gg - setlocal nomodifiable - if unloaded - echo "Press 'L' on each line to load plugin, or 'U' to update" - nnoremap L :call status_load(line('.')) - xnoremap L :call status_load(line('.')) - end -endfunction - -function! s:extract_name(str, prefix, suffix) - return matchstr(a:str, '^'.a:prefix.' \zs[^:]\+\ze:.*'.a:suffix.'$') -endfunction - -function! s:status_load(lnum) - let line = getline(a:lnum) - let name = s:extract_name(line, '-', '(not loaded)') - if !empty(name) - call plug#load(name) - setlocal modifiable - call setline(a:lnum, substitute(line, ' (not loaded)$', '', '')) - setlocal nomodifiable - endif -endfunction - -function! s:status_update() range - let lines = getline(a:firstline, a:lastline) - let names = filter(map(lines, 's:extract_name(v:val, "[x-]", "")'), '!empty(v:val)') - if !empty(names) - echo - execute 'PlugUpdate' join(names) - endif -endfunction - -function! s:is_preview_window_open() - silent! wincmd P - if &previewwindow - wincmd p - return 1 - endif -endfunction - -function! s:find_name(lnum) - for lnum in reverse(range(1, a:lnum)) - let line = getline(lnum) - if empty(line) - return '' - endif - let name = s:extract_name(line, '-', '') - if !empty(name) - return name - endif - endfor - return '' -endfunction - -function! s:preview_commit() - if b:plug_preview < 0 - let b:plug_preview = !s:is_preview_window_open() - endif - - let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}') - if empty(sha) - return - endif - - let name = s:find_name(line('.')) - if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir) - return - endif - - if exists('g:plug_pwindow') && !s:is_preview_window_open() - execute g:plug_pwindow - execute 'e' sha - else - execute 'pedit' sha - wincmd P - endif - setlocal previewwindow filetype=git buftype=nofile nobuflisted modifiable - let batchfile = '' - try - let [sh, shellcmdflag, shrd] = s:chsh(1) - let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && git show --no-color --pretty=medium '.sha - if s:is_win - let [batchfile, cmd] = s:batchfile(cmd) - endif - execute 'silent %!' cmd - finally - let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] - if s:is_win && filereadable(batchfile) - call delete(batchfile) - endif - endtry - setlocal nomodifiable - nnoremap q :q - wincmd p -endfunction - -function! s:section(flags) - call search('\(^[x-] \)\@<=[^:]\+:', a:flags) -endfunction - -function! s:format_git_log(line) - let indent = ' ' - let tokens = split(a:line, nr2char(1)) - if len(tokens) != 5 - return indent.substitute(a:line, '\s*$', '', '') - endif - let [graph, sha, refs, subject, date] = tokens - let tag = matchstr(refs, 'tag: [^,)]\+') - let tag = empty(tag) ? ' ' : ' ('.tag.') ' - return printf('%s%s%s%s%s (%s)', indent, graph, sha, tag, subject, date) -endfunction - -function! s:append_ul(lnum, text) - call append(a:lnum, ['', a:text, repeat('-', len(a:text))]) -endfunction - -function! s:diff() - call s:prepare() - call append(0, ['Collecting changes ...', '']) - let cnts = [0, 0] - let bar = '' - let total = filter(copy(g:plugs), 's:is_managed(v:key) && isdirectory(v:val.dir)') - call s:progress_bar(2, bar, len(total)) - for origin in [1, 0] - let plugs = reverse(sort(items(filter(copy(total), (origin ? '' : '!').'(has_key(v:val, "commit") || has_key(v:val, "tag"))')))) - if empty(plugs) - continue - endif - call s:append_ul(2, origin ? 'Pending updates:' : 'Last update:') - for [k, v] in plugs - let branch = s:git_origin_branch(v) - if len(branch) - let range = origin ? '..origin/'.branch : 'HEAD@{1}..' - let cmd = ['git', 'log', '--graph', '--color=never'] - if s:git_version_requirement(2, 10, 0) - call add(cmd, '--no-show-signature') - endif - call extend(cmd, ['--pretty=format:%x01%h%x01%d%x01%s%x01%cr', range]) - if has_key(v, 'rtp') - call extend(cmd, ['--', v.rtp]) - endif - let diff = s:system_chomp(cmd, v.dir) - if !empty(diff) - let ref = has_key(v, 'tag') ? (' (tag: '.v.tag.')') : has_key(v, 'commit') ? (' '.v.commit) : '' - call append(5, extend(['', '- '.k.':'.ref], map(s:lines(diff), 's:format_git_log(v:val)'))) - let cnts[origin] += 1 - endif - endif - let bar .= '=' - call s:progress_bar(2, bar, len(total)) - normal! 2G - redraw - endfor - if !cnts[origin] - call append(5, ['', 'N/A']) - endif - endfor - call setline(1, printf('%d plugin(s) updated.', cnts[0]) - \ . (cnts[1] ? printf(' %d plugin(s) have pending updates.', cnts[1]) : '')) - - if cnts[0] || cnts[1] - nnoremap (plug-preview) :silent! call preview_commit() - if empty(maparg("\", 'n')) - nmap (plug-preview) - endif - if empty(maparg('o', 'n')) - nmap o (plug-preview) - endif - endif - if cnts[0] - nnoremap X :call revert() - echo "Press 'X' on each block to revert the update" - endif - normal! gg - setlocal nomodifiable -endfunction - -function! s:revert() - if search('^Pending updates', 'bnW') - return - endif - - let name = s:find_name(line('.')) - if empty(name) || !has_key(g:plugs, name) || - \ input(printf('Revert the update of %s? (y/N) ', name)) !~? '^y' - return - endif - - call s:system('git reset --hard HEAD@{1} && git checkout '.plug#shellescape(g:plugs[name].branch).' --', g:plugs[name].dir) - setlocal modifiable - normal! "_dap - setlocal nomodifiable - echo 'Reverted' -endfunction - -function! s:snapshot(force, ...) abort - call s:prepare() - setf vim - call append(0, ['" Generated by vim-plug', - \ '" '.strftime("%c"), - \ '" :source this file in vim to restore the snapshot', - \ '" or execute: vim -S snapshot.vim', - \ '', '', 'PlugUpdate!']) - 1 - let anchor = line('$') - 3 - let names = sort(keys(filter(copy(g:plugs), - \'has_key(v:val, "uri") && !has_key(v:val, "commit") && isdirectory(v:val.dir)'))) - for name in reverse(names) - let sha = s:git_revision(g:plugs[name].dir) - if !empty(sha) - call append(anchor, printf("silent! let g:plugs['%s'].commit = '%s'", name, sha)) - redraw - endif - endfor - - if a:0 > 0 - let fn = s:plug_expand(a:1) - if filereadable(fn) && !(a:force || s:ask(a:1.' already exists. Overwrite?')) - return - endif - call writefile(getline(1, '$'), fn) - echo 'Saved as '.a:1 - silent execute 'e' s:esc(fn) - setf vim - endif -endfunction - -function! s:split_rtp() - return split(&rtp, '\\\@`-mappings | -"| `for` | On-demand loading: File types | -"| `frozen` | Do not update unless explicitly specified | -" -" More information: https://github.com/junegunn/vim-plug -" -" -" Copyright (c) 2017 Junegunn Choi -" -" MIT License -" -" Permission is hereby granted, free of charge, to any person obtaining -" a copy of this software and associated documentation files (the -" "Software"), to deal in the Software without restriction, including -" without limitation the rights to use, copy, modify, merge, publish, -" distribute, sublicense, and/or sell copies of the Software, and to -" permit persons to whom the Software is furnished to do so, subject to -" the following conditions: -" -" The above copyright notice and this permission notice shall be -" included in all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -if exists('g:loaded_plug') - finish -endif -let g:loaded_plug = 1 - -let s:cpo_save = &cpo -set cpo&vim - -let s:plug_src = 'https://github.com/junegunn/vim-plug.git' -let s:plug_tab = get(s:, 'plug_tab', -1) -let s:plug_buf = get(s:, 'plug_buf', -1) -let s:mac_gui = has('gui_macvim') && has('gui_running') -let s:is_win = has('win32') -let s:nvim = has('nvim-0.2') || (has('nvim') && exists('*jobwait') && !s:is_win) -let s:vim8 = has('patch-8.0.0039') && exists('*job_start') -if s:is_win && &shellslash - set noshellslash - let s:me = resolve(expand(':p')) - set shellslash -else - let s:me = resolve(expand(':p')) -endif -let s:base_spec = { 'branch': '', 'frozen': 0 } -let s:TYPE = { -\ 'string': type(''), -\ 'list': type([]), -\ 'dict': type({}), -\ 'funcref': type(function('call')) -\ } -let s:loaded = get(s:, 'loaded', {}) -let s:triggers = get(s:, 'triggers', {}) - -function! s:isabsolute(dir) abort - return a:dir =~# '^/' || (has('win32') && a:dir =~? '^\%(\\\|[A-Z]:\)') -endfunction - -function! s:git_dir(dir) abort - let gitdir = s:trim(a:dir) . '/.git' - if isdirectory(gitdir) - return gitdir - endif - if !filereadable(gitdir) - return '' - endif - let gitdir = matchstr(get(readfile(gitdir), 0, ''), '^gitdir: \zs.*') - if len(gitdir) && !s:isabsolute(gitdir) - let gitdir = a:dir . '/' . gitdir - endif - return isdirectory(gitdir) ? gitdir : '' -endfunction - -function! s:git_origin_url(dir) abort - let gitdir = s:git_dir(a:dir) - let config = gitdir . '/config' - if empty(gitdir) || !filereadable(config) - return '' - endif - return matchstr(join(readfile(config)), '\[remote "origin"\].\{-}url\s*=\s*\zs\S*\ze') -endfunction - -function! s:git_revision(dir) abort - let gitdir = s:git_dir(a:dir) - let head = gitdir . '/HEAD' - if empty(gitdir) || !filereadable(head) - return '' - endif - - let line = get(readfile(head), 0, '') - let ref = matchstr(line, '^ref: \zs.*') - if empty(ref) - return line - endif - - if filereadable(gitdir . '/' . ref) - return get(readfile(gitdir . '/' . ref), 0, '') - endif - - if filereadable(gitdir . '/packed-refs') - for line in readfile(gitdir . '/packed-refs') - if line =~# ' ' . ref - return matchstr(line, '^[0-9a-f]*') - endif - endfor - endif - - return '' -endfunction - -function! s:git_local_branch(dir) abort - let gitdir = s:git_dir(a:dir) - let head = gitdir . '/HEAD' - if empty(gitdir) || !filereadable(head) - return '' - endif - let branch = matchstr(get(readfile(head), 0, ''), '^ref: refs/heads/\zs.*') - return len(branch) ? branch : 'HEAD' -endfunction - -function! s:git_origin_branch(spec) - if len(a:spec.branch) - return a:spec.branch - endif - - " The file may not be present if this is a local repository - let gitdir = s:git_dir(a:spec.dir) - let origin_head = gitdir.'/refs/remotes/origin/HEAD' - if len(gitdir) && filereadable(origin_head) - return matchstr(get(readfile(origin_head), 0, ''), - \ '^ref: refs/remotes/origin/\zs.*') - endif - - " The command may not return the name of a branch in detached HEAD state - let result = s:lines(s:system('git symbolic-ref --short HEAD', a:spec.dir)) - return v:shell_error ? '' : result[-1] -endfunction - -if s:is_win - function! s:plug_call(fn, ...) - let shellslash = &shellslash - try - set noshellslash - return call(a:fn, a:000) - finally - let &shellslash = shellslash - endtry - endfunction -else - function! s:plug_call(fn, ...) - return call(a:fn, a:000) - endfunction -endif - -function! s:plug_getcwd() - return s:plug_call('getcwd') -endfunction - -function! s:plug_fnamemodify(fname, mods) - return s:plug_call('fnamemodify', a:fname, a:mods) -endfunction - -function! s:plug_expand(fmt) - return s:plug_call('expand', a:fmt, 1) -endfunction - -function! s:plug_tempname() - return s:plug_call('tempname') -endfunction - -function! plug#begin(...) - if a:0 > 0 - let s:plug_home_org = a:1 - let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p')) - elseif exists('g:plug_home') - let home = s:path(g:plug_home) - elseif !empty(&rtp) - let home = s:path(split(&rtp, ',')[0]) . '/plugged' - else - return s:err('Unable to determine plug home. Try calling plug#begin() with a path argument.') - endif - if s:plug_fnamemodify(home, ':t') ==# 'plugin' && s:plug_fnamemodify(home, ':h') ==# s:first_rtp - return s:err('Invalid plug home. '.home.' is a standard Vim runtime path and is not allowed.') - endif - - let g:plug_home = home - let g:plugs = {} - let g:plugs_order = [] - let s:triggers = {} - - call s:define_commands() - return 1 -endfunction - -function! s:define_commands() - command! -nargs=+ -bar Plug call plug#() - if !executable('git') - return s:err('`git` executable not found. Most commands will not be available. To suppress this message, prepend `silent!` to `call plug#begin(...)`.') - endif - if has('win32') - \ && &shellslash - \ && (&shell =~# 'cmd\(\.exe\)\?$' || &shell =~# 'powershell\(\.exe\)\?$') - return s:err('vim-plug does not support shell, ' . &shell . ', when shellslash is set.') - endif - if !has('nvim') - \ && (has('win32') || has('win32unix')) - \ && !has('multi_byte') - return s:err('Vim needs +multi_byte feature on Windows to run shell commands. Enable +iconv for best results.') - endif - command! -nargs=* -bar -bang -complete=customlist,s:names PlugInstall call s:install(0, []) - command! -nargs=* -bar -bang -complete=customlist,s:names PlugUpdate call s:update(0, []) - command! -nargs=0 -bar -bang PlugClean call s:clean(0) - command! -nargs=0 -bar PlugUpgrade if s:upgrade() | execute 'source' s:esc(s:me) | endif - command! -nargs=0 -bar PlugStatus call s:status() - command! -nargs=0 -bar PlugDiff call s:diff() - command! -nargs=? -bar -bang -complete=file PlugSnapshot call s:snapshot(0, ) -endfunction - -function! s:to_a(v) - return type(a:v) == s:TYPE.list ? a:v : [a:v] -endfunction - -function! s:to_s(v) - return type(a:v) == s:TYPE.string ? a:v : join(a:v, "\n") . "\n" -endfunction - -function! s:glob(from, pattern) - return s:lines(globpath(a:from, a:pattern)) -endfunction - -function! s:source(from, ...) - let found = 0 - for pattern in a:000 - for vim in s:glob(a:from, pattern) - execute 'source' s:esc(vim) - let found = 1 - endfor - endfor - return found -endfunction - -function! s:assoc(dict, key, val) - let a:dict[a:key] = add(get(a:dict, a:key, []), a:val) -endfunction - -function! s:ask(message, ...) - call inputsave() - echohl WarningMsg - let answer = input(a:message.(a:0 ? ' (y/N/a) ' : ' (y/N) ')) - echohl None - call inputrestore() - echo "\r" - return (a:0 && answer =~? '^a') ? 2 : (answer =~? '^y') ? 1 : 0 -endfunction - -function! s:ask_no_interrupt(...) - try - return call('s:ask', a:000) - catch - return 0 - endtry -endfunction - -function! s:lazy(plug, opt) - return has_key(a:plug, a:opt) && - \ (empty(s:to_a(a:plug[a:opt])) || - \ !isdirectory(a:plug.dir) || - \ len(s:glob(s:rtp(a:plug), 'plugin')) || - \ len(s:glob(s:rtp(a:plug), 'after/plugin'))) -endfunction - -function! plug#end() - if !exists('g:plugs') - return s:err('plug#end() called without calling plug#begin() first') - endif - - if exists('#PlugLOD') - augroup PlugLOD - autocmd! - augroup END - augroup! PlugLOD - endif - let lod = { 'ft': {}, 'map': {}, 'cmd': {} } - - if exists('g:did_load_filetypes') - filetype off - endif - for name in g:plugs_order - if !has_key(g:plugs, name) - continue - endif - let plug = g:plugs[name] - if get(s:loaded, name, 0) || !s:lazy(plug, 'on') && !s:lazy(plug, 'for') - let s:loaded[name] = 1 - continue - endif - - if has_key(plug, 'on') - let s:triggers[name] = { 'map': [], 'cmd': [] } - for cmd in s:to_a(plug.on) - if cmd =~? '^.\+' - if empty(mapcheck(cmd)) && empty(mapcheck(cmd, 'i')) - call s:assoc(lod.map, cmd, name) - endif - call add(s:triggers[name].map, cmd) - elseif cmd =~# '^[A-Z]' - let cmd = substitute(cmd, '!*$', '', '') - if exists(':'.cmd) != 2 - call s:assoc(lod.cmd, cmd, name) - endif - call add(s:triggers[name].cmd, cmd) - else - call s:err('Invalid `on` option: '.cmd. - \ '. Should start with an uppercase letter or ``.') - endif - endfor - endif - - if has_key(plug, 'for') - let types = s:to_a(plug.for) - if !empty(types) - augroup filetypedetect - call s:source(s:rtp(plug), 'ftdetect/**/*.vim', 'after/ftdetect/**/*.vim') - augroup END - endif - for type in types - call s:assoc(lod.ft, type, name) - endfor - endif - endfor - - for [cmd, names] in items(lod.cmd) - execute printf( - \ 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "", , , , %s)', - \ cmd, string(cmd), string(names)) - endfor - - for [map, names] in items(lod.map) - for [mode, map_prefix, key_prefix] in - \ [['i', '', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']] - execute printf( - \ '%snoremap %s %s:call lod_map(%s, %s, %s, "%s")', - \ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix) - endfor - endfor - - for [ft, names] in items(lod.ft) - augroup PlugLOD - execute printf('autocmd FileType %s call lod_ft(%s, %s)', - \ ft, string(ft), string(names)) - augroup END - endfor - - call s:reorg_rtp() - filetype plugin indent on - if has('vim_starting') - if has('syntax') && !exists('g:syntax_on') - syntax enable - end - else - call s:reload_plugins() - endif -endfunction - -function! s:loaded_names() - return filter(copy(g:plugs_order), 'get(s:loaded, v:val, 0)') -endfunction - -function! s:load_plugin(spec) - call s:source(s:rtp(a:spec), 'plugin/**/*.vim', 'after/plugin/**/*.vim') -endfunction - -function! s:reload_plugins() - for name in s:loaded_names() - call s:load_plugin(g:plugs[name]) - endfor -endfunction - -function! s:trim(str) - return substitute(a:str, '[\/]\+$', '', '') -endfunction - -function! s:version_requirement(val, min) - for idx in range(0, len(a:min) - 1) - let v = get(a:val, idx, 0) - if v < a:min[idx] | return 0 - elseif v > a:min[idx] | return 1 - endif - endfor - return 1 -endfunction - -function! s:git_version_requirement(...) - if !exists('s:git_version') - let s:git_version = map(split(split(s:system(['git', '--version']))[2], '\.'), 'str2nr(v:val)') - endif - return s:version_requirement(s:git_version, a:000) -endfunction - -function! s:progress_opt(base) - return a:base && !s:is_win && - \ s:git_version_requirement(1, 7, 1) ? '--progress' : '' -endfunction - -function! s:rtp(spec) - return s:path(a:spec.dir . get(a:spec, 'rtp', '')) -endfunction - -if s:is_win - function! s:path(path) - return s:trim(substitute(a:path, '/', '\', 'g')) - endfunction - - function! s:dirpath(path) - return s:path(a:path) . '\' - endfunction - - function! s:is_local_plug(repo) - return a:repo =~? '^[a-z]:\|^[%~]' - endfunction - - " Copied from fzf - function! s:wrap_cmds(cmds) - let cmds = [ - \ '@echo off', - \ 'setlocal enabledelayedexpansion'] - \ + (type(a:cmds) == type([]) ? a:cmds : [a:cmds]) - \ + ['endlocal'] - if has('iconv') - if !exists('s:codepage') - let s:codepage = libcallnr('kernel32.dll', 'GetACP', 0) - endif - return map(cmds, printf('iconv(v:val."\r", "%s", "cp%d")', &encoding, s:codepage)) - endif - return map(cmds, 'v:val."\r"') - endfunction - - function! s:batchfile(cmd) - let batchfile = s:plug_tempname().'.bat' - call writefile(s:wrap_cmds(a:cmd), batchfile) - let cmd = plug#shellescape(batchfile, {'shell': &shell, 'script': 0}) - if &shell =~# 'powershell\(\.exe\)\?$' - let cmd = '& ' . cmd - endif - return [batchfile, cmd] - endfunction -else - function! s:path(path) - return s:trim(a:path) - endfunction - - function! s:dirpath(path) - return substitute(a:path, '[/\\]*$', '/', '') - endfunction - - function! s:is_local_plug(repo) - return a:repo[0] =~ '[/$~]' - endfunction -endif - -function! s:err(msg) - echohl ErrorMsg - echom '[vim-plug] '.a:msg - echohl None -endfunction - -function! s:warn(cmd, msg) - echohl WarningMsg - execute a:cmd 'a:msg' - echohl None -endfunction - -function! s:esc(path) - return escape(a:path, ' ') -endfunction - -function! s:escrtp(path) - return escape(a:path, ' ,') -endfunction - -function! s:remove_rtp() - for name in s:loaded_names() - let rtp = s:rtp(g:plugs[name]) - execute 'set rtp-='.s:escrtp(rtp) - let after = globpath(rtp, 'after') - if isdirectory(after) - execute 'set rtp-='.s:escrtp(after) - endif - endfor -endfunction - -function! s:reorg_rtp() - if !empty(s:first_rtp) - execute 'set rtp-='.s:first_rtp - execute 'set rtp-='.s:last_rtp - endif - - " &rtp is modified from outside - if exists('s:prtp') && s:prtp !=# &rtp - call s:remove_rtp() - unlet! s:middle - endif - - let s:middle = get(s:, 'middle', &rtp) - let rtps = map(s:loaded_names(), 's:rtp(g:plugs[v:val])') - let afters = filter(map(copy(rtps), 'globpath(v:val, "after")'), '!empty(v:val)') - let rtp = join(map(rtps, 'escape(v:val, ",")'), ',') - \ . ','.s:middle.',' - \ . join(map(afters, 'escape(v:val, ",")'), ',') - let &rtp = substitute(substitute(rtp, ',,*', ',', 'g'), '^,\|,$', '', 'g') - let s:prtp = &rtp - - if !empty(s:first_rtp) - execute 'set rtp^='.s:first_rtp - execute 'set rtp+='.s:last_rtp - endif -endfunction - -function! s:doautocmd(...) - if exists('#'.join(a:000, '#')) - execute 'doautocmd' ((v:version > 703 || has('patch442')) ? '' : '') join(a:000) - endif -endfunction - -function! s:dobufread(names) - for name in a:names - let path = s:rtp(g:plugs[name]) - for dir in ['ftdetect', 'ftplugin', 'after/ftdetect', 'after/ftplugin'] - if len(finddir(dir, path)) - if exists('#BufRead') - doautocmd BufRead - endif - return - endif - endfor - endfor -endfunction - -function! plug#load(...) - if a:0 == 0 - return s:err('Argument missing: plugin name(s) required') - endif - if !exists('g:plugs') - return s:err('plug#begin was not called') - endif - let names = a:0 == 1 && type(a:1) == s:TYPE.list ? a:1 : a:000 - let unknowns = filter(copy(names), '!has_key(g:plugs, v:val)') - if !empty(unknowns) - let s = len(unknowns) > 1 ? 's' : '' - return s:err(printf('Unknown plugin%s: %s', s, join(unknowns, ', '))) - end - let unloaded = filter(copy(names), '!get(s:loaded, v:val, 0)') - if !empty(unloaded) - for name in unloaded - call s:lod([name], ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) - endfor - call s:dobufread(unloaded) - return 1 - end - return 0 -endfunction - -function! s:remove_triggers(name) - if !has_key(s:triggers, a:name) - return - endif - for cmd in s:triggers[a:name].cmd - execute 'silent! delc' cmd - endfor - for map in s:triggers[a:name].map - execute 'silent! unmap' map - execute 'silent! iunmap' map - endfor - call remove(s:triggers, a:name) -endfunction - -function! s:lod(names, types, ...) - for name in a:names - call s:remove_triggers(name) - let s:loaded[name] = 1 - endfor - call s:reorg_rtp() - - for name in a:names - let rtp = s:rtp(g:plugs[name]) - for dir in a:types - call s:source(rtp, dir.'/**/*.vim') - endfor - if a:0 - if !s:source(rtp, a:1) && !empty(s:glob(rtp, a:2)) - execute 'runtime' a:1 - endif - call s:source(rtp, a:2) - endif - call s:doautocmd('User', name) - endfor -endfunction - -function! s:lod_ft(pat, names) - let syn = 'syntax/'.a:pat.'.vim' - call s:lod(a:names, ['plugin', 'after/plugin'], syn, 'after/'.syn) - execute 'autocmd! PlugLOD FileType' a:pat - call s:doautocmd('filetypeplugin', 'FileType') - call s:doautocmd('filetypeindent', 'FileType') -endfunction - -function! s:lod_cmd(cmd, bang, l1, l2, args, names) - call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) - call s:dobufread(a:names) - execute printf('%s%s%s %s', (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args) -endfunction - -function! s:lod_map(map, names, with_prefix, prefix) - call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) - call s:dobufread(a:names) - let extra = '' - while 1 - let c = getchar(0) - if c == 0 - break - endif - let extra .= nr2char(c) - endwhile - - if a:with_prefix - let prefix = v:count ? v:count : '' - let prefix .= '"'.v:register.a:prefix - if mode(1) == 'no' - if v:operator == 'c' - let prefix = "\" . prefix - endif - let prefix .= v:operator - endif - call feedkeys(prefix, 'n') - endif - call feedkeys(substitute(a:map, '^', "\", '') . extra) -endfunction - -function! plug#(repo, ...) - if a:0 > 1 - return s:err('Invalid number of arguments (1..2)') - endif - - try - let repo = s:trim(a:repo) - let opts = a:0 == 1 ? s:parse_options(a:1) : s:base_spec - let name = get(opts, 'as', s:plug_fnamemodify(repo, ':t:s?\.git$??')) - let spec = extend(s:infer_properties(name, repo), opts) - if !has_key(g:plugs, name) - call add(g:plugs_order, name) - endif - let g:plugs[name] = spec - let s:loaded[name] = get(s:loaded, name, 0) - catch - return s:err(repo . ' ' . v:exception) - endtry -endfunction - -function! s:parse_options(arg) - let opts = copy(s:base_spec) - let type = type(a:arg) - let opt_errfmt = 'Invalid argument for "%s" option of :Plug (expected: %s)' - if type == s:TYPE.string - if empty(a:arg) - throw printf(opt_errfmt, 'tag', 'string') - endif - let opts.tag = a:arg - elseif type == s:TYPE.dict - for opt in ['branch', 'tag', 'commit', 'rtp', 'dir', 'as'] - if has_key(a:arg, opt) - \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt])) - throw printf(opt_errfmt, opt, 'string') - endif - endfor - for opt in ['on', 'for'] - if has_key(a:arg, opt) - \ && type(a:arg[opt]) != s:TYPE.list - \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt])) - throw printf(opt_errfmt, opt, 'string or list') - endif - endfor - if has_key(a:arg, 'do') - \ && type(a:arg.do) != s:TYPE.funcref - \ && (type(a:arg.do) != s:TYPE.string || empty(a:arg.do)) - throw printf(opt_errfmt, 'do', 'string or funcref') - endif - call extend(opts, a:arg) - if has_key(opts, 'dir') - let opts.dir = s:dirpath(s:plug_expand(opts.dir)) - endif - else - throw 'Invalid argument type (expected: string or dictionary)' - endif - return opts -endfunction - -function! s:infer_properties(name, repo) - let repo = a:repo - if s:is_local_plug(repo) - return { 'dir': s:dirpath(s:plug_expand(repo)) } - else - if repo =~ ':' - let uri = repo - else - if repo !~ '/' - throw printf('Invalid argument: %s (implicit `vim-scripts'' expansion is deprecated)', repo) - endif - let fmt = get(g:, 'plug_url_format', 'https://git::@github.com/%s.git') - let uri = printf(fmt, repo) - endif - return { 'dir': s:dirpath(g:plug_home.'/'.a:name), 'uri': uri } - endif -endfunction - -function! s:install(force, names) - call s:update_impl(0, a:force, a:names) -endfunction - -function! s:update(force, names) - call s:update_impl(1, a:force, a:names) -endfunction - -function! plug#helptags() - if !exists('g:plugs') - return s:err('plug#begin was not called') - endif - for spec in values(g:plugs) - let docd = join([s:rtp(spec), 'doc'], '/') - if isdirectory(docd) - silent! execute 'helptags' s:esc(docd) - endif - endfor - return 1 -endfunction - -function! s:syntax() - syntax clear - syntax region plug1 start=/\%1l/ end=/\%2l/ contains=plugNumber - syntax region plug2 start=/\%2l/ end=/\%3l/ contains=plugBracket,plugX - syn match plugNumber /[0-9]\+[0-9.]*/ contained - syn match plugBracket /[[\]]/ contained - syn match plugX /x/ contained - syn match plugDash /^-/ - syn match plugPlus /^+/ - syn match plugStar /^*/ - syn match plugMessage /\(^- \)\@<=.*/ - syn match plugName /\(^- \)\@<=[^ ]*:/ - syn match plugSha /\%(: \)\@<=[0-9a-f]\{4,}$/ - syn match plugTag /(tag: [^)]\+)/ - syn match plugInstall /\(^+ \)\@<=[^:]*/ - syn match plugUpdate /\(^* \)\@<=[^:]*/ - syn match plugCommit /^ \X*[0-9a-f]\{7,9} .*/ contains=plugRelDate,plugEdge,plugTag - syn match plugEdge /^ \X\+$/ - syn match plugEdge /^ \X*/ contained nextgroup=plugSha - syn match plugSha /[0-9a-f]\{7,9}/ contained - syn match plugRelDate /([^)]*)$/ contained - syn match plugNotLoaded /(not loaded)$/ - syn match plugError /^x.*/ - syn region plugDeleted start=/^\~ .*/ end=/^\ze\S/ - syn match plugH2 /^.*:\n-\+$/ - syn keyword Function PlugInstall PlugStatus PlugUpdate PlugClean - hi def link plug1 Title - hi def link plug2 Repeat - hi def link plugH2 Type - hi def link plugX Exception - hi def link plugBracket Structure - hi def link plugNumber Number - - hi def link plugDash Special - hi def link plugPlus Constant - hi def link plugStar Boolean - - hi def link plugMessage Function - hi def link plugName Label - hi def link plugInstall Function - hi def link plugUpdate Type - - hi def link plugError Error - hi def link plugDeleted Ignore - hi def link plugRelDate Comment - hi def link plugEdge PreProc - hi def link plugSha Identifier - hi def link plugTag Constant - - hi def link plugNotLoaded Comment -endfunction - -function! s:lpad(str, len) - return a:str . repeat(' ', a:len - len(a:str)) -endfunction - -function! s:lines(msg) - return split(a:msg, "[\r\n]") -endfunction - -function! s:lastline(msg) - return get(s:lines(a:msg), -1, '') -endfunction - -function! s:new_window() - execute get(g:, 'plug_window', 'vertical topleft new') -endfunction - -function! s:plug_window_exists() - let buflist = tabpagebuflist(s:plug_tab) - return !empty(buflist) && index(buflist, s:plug_buf) >= 0 -endfunction - -function! s:switch_in() - if !s:plug_window_exists() - return 0 - endif - - if winbufnr(0) != s:plug_buf - let s:pos = [tabpagenr(), winnr(), winsaveview()] - execute 'normal!' s:plug_tab.'gt' - let winnr = bufwinnr(s:plug_buf) - execute winnr.'wincmd w' - call add(s:pos, winsaveview()) - else - let s:pos = [winsaveview()] - endif - - setlocal modifiable - return 1 -endfunction - -function! s:switch_out(...) - call winrestview(s:pos[-1]) - setlocal nomodifiable - if a:0 > 0 - execute a:1 - endif - - if len(s:pos) > 1 - execute 'normal!' s:pos[0].'gt' - execute s:pos[1] 'wincmd w' - call winrestview(s:pos[2]) - endif -endfunction - -function! s:finish_bindings() - nnoremap R :call retry() - nnoremap D :PlugDiff - nnoremap S :PlugStatus - nnoremap U :call status_update() - xnoremap U :call status_update() - nnoremap ]] :silent! call section('') - nnoremap [[ :silent! call section('b') -endfunction - -function! s:prepare(...) - if empty(s:plug_getcwd()) - throw 'Invalid current working directory. Cannot proceed.' - endif - - for evar in ['$GIT_DIR', '$GIT_WORK_TREE'] - if exists(evar) - throw evar.' detected. Cannot proceed.' - endif - endfor - - call s:job_abort() - if s:switch_in() - if b:plug_preview == 1 - pc - endif - enew - else - call s:new_window() - endif - - nnoremap q :if b:plug_preview==1pcendifbd - if a:0 == 0 - call s:finish_bindings() - endif - let b:plug_preview = -1 - let s:plug_tab = tabpagenr() - let s:plug_buf = winbufnr(0) - call s:assign_name() - - for k in ['', 'L', 'o', 'X', 'd', 'dd'] - execute 'silent! unmap ' k - endfor - setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline modifiable nospell - if exists('+colorcolumn') - setlocal colorcolumn= - endif - setf vim-plug - if exists('g:syntax_on') - call s:syntax() - endif -endfunction - -function! s:assign_name() - " Assign buffer name - let prefix = '[Plugins]' - let name = prefix - let idx = 2 - while bufexists(name) - let name = printf('%s (%s)', prefix, idx) - let idx = idx + 1 - endwhile - silent! execute 'f' fnameescape(name) -endfunction - -function! s:chsh(swap) - let prev = [&shell, &shellcmdflag, &shellredir] - if !s:is_win - set shell=sh - endif - if a:swap - if &shell =~# 'powershell\(\.exe\)\?$' || &shell =~# 'pwsh$' - let &shellredir = '2>&1 | Out-File -Encoding UTF8 %s' - elseif &shell =~# 'sh' || &shell =~# 'cmd\(\.exe\)\?$' - set shellredir=>%s\ 2>&1 - endif - endif - return prev -endfunction - -function! s:bang(cmd, ...) - let batchfile = '' - try - let [sh, shellcmdflag, shrd] = s:chsh(a:0) - " FIXME: Escaping is incomplete. We could use shellescape with eval, - " but it won't work on Windows. - let cmd = a:0 ? s:with_cd(a:cmd, a:1) : a:cmd - if s:is_win - let [batchfile, cmd] = s:batchfile(cmd) - endif - let g:_plug_bang = (s:is_win && has('gui_running') ? 'silent ' : '').'!'.escape(cmd, '#!%') - execute "normal! :execute g:_plug_bang\\" - finally - unlet g:_plug_bang - let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] - if s:is_win && filereadable(batchfile) - call delete(batchfile) - endif - endtry - return v:shell_error ? 'Exit status: ' . v:shell_error : '' -endfunction - -function! s:regress_bar() - let bar = substitute(getline(2)[1:-2], '.*\zs=', 'x', '') - call s:progress_bar(2, bar, len(bar)) -endfunction - -function! s:is_updated(dir) - return !empty(s:system_chomp(['git', 'log', '--pretty=format:%h', 'HEAD...HEAD@{1}'], a:dir)) -endfunction - -function! s:do(pull, force, todo) - for [name, spec] in items(a:todo) - if !isdirectory(spec.dir) - continue - endif - let installed = has_key(s:update.new, name) - let updated = installed ? 0 : - \ (a:pull && index(s:update.errors, name) < 0 && s:is_updated(spec.dir)) - if a:force || installed || updated - execute 'cd' s:esc(spec.dir) - call append(3, '- Post-update hook for '. name .' ... ') - let error = '' - let type = type(spec.do) - if type == s:TYPE.string - if spec.do[0] == ':' - if !get(s:loaded, name, 0) - let s:loaded[name] = 1 - call s:reorg_rtp() - endif - call s:load_plugin(spec) - try - execute spec.do[1:] - catch - let error = v:exception - endtry - if !s:plug_window_exists() - cd - - throw 'Warning: vim-plug was terminated by the post-update hook of '.name - endif - else - let error = s:bang(spec.do) - endif - elseif type == s:TYPE.funcref - try - call s:load_plugin(spec) - let status = installed ? 'installed' : (updated ? 'updated' : 'unchanged') - call spec.do({ 'name': name, 'status': status, 'force': a:force }) - catch - let error = v:exception - endtry - else - let error = 'Invalid hook type' - endif - call s:switch_in() - call setline(4, empty(error) ? (getline(4) . 'OK') - \ : ('x' . getline(4)[1:] . error)) - if !empty(error) - call add(s:update.errors, name) - call s:regress_bar() - endif - cd - - endif - endfor -endfunction - -function! s:hash_match(a, b) - return stridx(a:a, a:b) == 0 || stridx(a:b, a:a) == 0 -endfunction - -function! s:checkout(spec) - let sha = a:spec.commit - let output = s:git_revision(a:spec.dir) - if !empty(output) && !s:hash_match(sha, s:lines(output)[0]) - let output = s:system( - \ 'git fetch --depth 999999 && git checkout '.plug#shellescape(sha).' --', a:spec.dir) - endif - return output -endfunction - -function! s:finish(pull) - let new_frozen = len(filter(keys(s:update.new), 'g:plugs[v:val].frozen')) - if new_frozen - let s = new_frozen > 1 ? 's' : '' - call append(3, printf('- Installed %d frozen plugin%s', new_frozen, s)) - endif - call append(3, '- Finishing ... ') | 4 - redraw - call plug#helptags() - call plug#end() - call setline(4, getline(4) . 'Done!') - redraw - let msgs = [] - if !empty(s:update.errors) - call add(msgs, "Press 'R' to retry.") - endif - if a:pull && len(s:update.new) < len(filter(getline(5, '$'), - \ "v:val =~ '^- ' && v:val !~# 'Already up.to.date'")) - call add(msgs, "Press 'D' to see the updated changes.") - endif - echo join(msgs, ' ') - call s:finish_bindings() -endfunction - -function! s:retry() - if empty(s:update.errors) - return - endif - echo - call s:update_impl(s:update.pull, s:update.force, - \ extend(copy(s:update.errors), [s:update.threads])) -endfunction - -function! s:is_managed(name) - return has_key(g:plugs[a:name], 'uri') -endfunction - -function! s:names(...) - return sort(filter(keys(g:plugs), 'stridx(v:val, a:1) == 0 && s:is_managed(v:val)')) -endfunction - -function! s:check_ruby() - silent! ruby require 'thread'; VIM::command("let g:plug_ruby = '#{RUBY_VERSION}'") - if !exists('g:plug_ruby') - redraw! - return s:warn('echom', 'Warning: Ruby interface is broken') - endif - let ruby_version = split(g:plug_ruby, '\.') - unlet g:plug_ruby - return s:version_requirement(ruby_version, [1, 8, 7]) -endfunction - -function! s:update_impl(pull, force, args) abort - let sync = index(a:args, '--sync') >= 0 || has('vim_starting') - let args = filter(copy(a:args), 'v:val != "--sync"') - let threads = (len(args) > 0 && args[-1] =~ '^[1-9][0-9]*$') ? - \ remove(args, -1) : get(g:, 'plug_threads', 16) - - let managed = filter(copy(g:plugs), 's:is_managed(v:key)') - let todo = empty(args) ? filter(managed, '!v:val.frozen || !isdirectory(v:val.dir)') : - \ filter(managed, 'index(args, v:key) >= 0') - - if empty(todo) - return s:warn('echo', 'No plugin to '. (a:pull ? 'update' : 'install')) - endif - - if !s:is_win && s:git_version_requirement(2, 3) - let s:git_terminal_prompt = exists('$GIT_TERMINAL_PROMPT') ? $GIT_TERMINAL_PROMPT : '' - let $GIT_TERMINAL_PROMPT = 0 - for plug in values(todo) - let plug.uri = substitute(plug.uri, - \ '^https://git::@github\.com', 'https://github.com', '') - endfor - endif - - if !isdirectory(g:plug_home) - try - call mkdir(g:plug_home, 'p') - catch - return s:err(printf('Invalid plug directory: %s. '. - \ 'Try to call plug#begin with a valid directory', g:plug_home)) - endtry - endif - - if has('nvim') && !exists('*jobwait') && threads > 1 - call s:warn('echom', '[vim-plug] Update Neovim for parallel installer') - endif - - let use_job = s:nvim || s:vim8 - let python = (has('python') || has('python3')) && !use_job - let ruby = has('ruby') && !use_job && (v:version >= 703 || v:version == 702 && has('patch374')) && !(s:is_win && has('gui_running')) && threads > 1 && s:check_ruby() - - let s:update = { - \ 'start': reltime(), - \ 'all': todo, - \ 'todo': copy(todo), - \ 'errors': [], - \ 'pull': a:pull, - \ 'force': a:force, - \ 'new': {}, - \ 'threads': (python || ruby || use_job) ? min([len(todo), threads]) : 1, - \ 'bar': '', - \ 'fin': 0 - \ } - - call s:prepare(1) - call append(0, ['', '']) - normal! 2G - silent! redraw - - let s:clone_opt = [] - if get(g:, 'plug_shallow', 1) - call extend(s:clone_opt, ['--depth', '1']) - if s:git_version_requirement(1, 7, 10) - call add(s:clone_opt, '--no-single-branch') - endif - endif - - if has('win32unix') || has('wsl') - call extend(s:clone_opt, ['-c', 'core.eol=lf', '-c', 'core.autocrlf=input']) - endif - - let s:submodule_opt = s:git_version_requirement(2, 8) ? ' --jobs='.threads : '' - - " Python version requirement (>= 2.7) - if python && !has('python3') && !ruby && !use_job && s:update.threads > 1 - redir => pyv - silent python import platform; print platform.python_version() - redir END - let python = s:version_requirement( - \ map(split(split(pyv)[0], '\.'), 'str2nr(v:val)'), [2, 6]) - endif - - if (python || ruby) && s:update.threads > 1 - try - let imd = &imd - if s:mac_gui - set noimd - endif - if ruby - call s:update_ruby() - else - call s:update_python() - endif - catch - let lines = getline(4, '$') - let printed = {} - silent! 4,$d _ - for line in lines - let name = s:extract_name(line, '.', '') - if empty(name) || !has_key(printed, name) - call append('$', line) - if !empty(name) - let printed[name] = 1 - if line[0] == 'x' && index(s:update.errors, name) < 0 - call add(s:update.errors, name) - end - endif - endif - endfor - finally - let &imd = imd - call s:update_finish() - endtry - else - call s:update_vim() - while use_job && sync - sleep 100m - if s:update.fin - break - endif - endwhile - endif -endfunction - -function! s:log4(name, msg) - call setline(4, printf('- %s (%s)', a:msg, a:name)) - redraw -endfunction - -function! s:update_finish() - if exists('s:git_terminal_prompt') - let $GIT_TERMINAL_PROMPT = s:git_terminal_prompt - endif - if s:switch_in() - call append(3, '- Updating ...') | 4 - for [name, spec] in items(filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && (s:update.force || s:update.pull || has_key(s:update.new, v:key))')) - let [pos, _] = s:logpos(name) - if !pos - continue - endif - if has_key(spec, 'commit') - call s:log4(name, 'Checking out '.spec.commit) - let out = s:checkout(spec) - elseif has_key(spec, 'tag') - let tag = spec.tag - if tag =~ '\*' - let tags = s:lines(s:system('git tag --list '.plug#shellescape(tag).' --sort -version:refname 2>&1', spec.dir)) - if !v:shell_error && !empty(tags) - let tag = tags[0] - call s:log4(name, printf('Latest tag for %s -> %s', spec.tag, tag)) - call append(3, '') - endif - endif - call s:log4(name, 'Checking out '.tag) - let out = s:system('git checkout -q '.plug#shellescape(tag).' -- 2>&1', spec.dir) - else - let branch = s:git_origin_branch(spec) - call s:log4(name, 'Merging origin/'.s:esc(branch)) - let out = s:system('git checkout -q '.plug#shellescape(branch).' -- 2>&1' - \. (has_key(s:update.new, name) ? '' : ('&& git merge --ff-only '.plug#shellescape('origin/'.branch).' 2>&1')), spec.dir) - endif - if !v:shell_error && filereadable(spec.dir.'/.gitmodules') && - \ (s:update.force || has_key(s:update.new, name) || s:is_updated(spec.dir)) - call s:log4(name, 'Updating submodules. This may take a while.') - let out .= s:bang('git submodule update --init --recursive'.s:submodule_opt.' 2>&1', spec.dir) - endif - let msg = s:format_message(v:shell_error ? 'x': '-', name, out) - if v:shell_error - call add(s:update.errors, name) - call s:regress_bar() - silent execute pos 'd _' - call append(4, msg) | 4 - elseif !empty(out) - call setline(pos, msg[0]) - endif - redraw - endfor - silent 4 d _ - try - call s:do(s:update.pull, s:update.force, filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && has_key(v:val, "do")')) - catch - call s:warn('echom', v:exception) - call s:warn('echo', '') - return - endtry - call s:finish(s:update.pull) - call setline(1, 'Updated. Elapsed time: ' . split(reltimestr(reltime(s:update.start)))[0] . ' sec.') - call s:switch_out('normal! gg') - endif -endfunction - -function! s:job_abort() - if (!s:nvim && !s:vim8) || !exists('s:jobs') - return - endif - - for [name, j] in items(s:jobs) - if s:nvim - silent! call jobstop(j.jobid) - elseif s:vim8 - silent! call job_stop(j.jobid) - endif - if j.new - call s:rm_rf(g:plugs[name].dir) - endif - endfor - let s:jobs = {} -endfunction - -function! s:last_non_empty_line(lines) - let len = len(a:lines) - for idx in range(len) - let line = a:lines[len-idx-1] - if !empty(line) - return line - endif - endfor - return '' -endfunction - -function! s:job_out_cb(self, data) abort - let self = a:self - let data = remove(self.lines, -1) . a:data - let lines = map(split(data, "\n", 1), 'split(v:val, "\r", 1)[-1]') - call extend(self.lines, lines) - " To reduce the number of buffer updates - let self.tick = get(self, 'tick', -1) + 1 - if !self.running || self.tick % len(s:jobs) == 0 - let bullet = self.running ? (self.new ? '+' : '*') : (self.error ? 'x' : '-') - let result = self.error ? join(self.lines, "\n") : s:last_non_empty_line(self.lines) - call s:log(bullet, self.name, result) - endif -endfunction - -function! s:job_exit_cb(self, data) abort - let a:self.running = 0 - let a:self.error = a:data != 0 - call s:reap(a:self.name) - call s:tick() -endfunction - -function! s:job_cb(fn, job, ch, data) - if !s:plug_window_exists() " plug window closed - return s:job_abort() - endif - call call(a:fn, [a:job, a:data]) -endfunction - -function! s:nvim_cb(job_id, data, event) dict abort - return (a:event == 'stdout' || a:event == 'stderr') ? - \ s:job_cb('s:job_out_cb', self, 0, join(a:data, "\n")) : - \ s:job_cb('s:job_exit_cb', self, 0, a:data) -endfunction - -function! s:spawn(name, cmd, opts) - let job = { 'name': a:name, 'running': 1, 'error': 0, 'lines': [''], - \ 'new': get(a:opts, 'new', 0) } - let s:jobs[a:name] = job - - if s:nvim - if has_key(a:opts, 'dir') - let job.cwd = a:opts.dir - endif - let argv = a:cmd - call extend(job, { - \ 'on_stdout': function('s:nvim_cb'), - \ 'on_stderr': function('s:nvim_cb'), - \ 'on_exit': function('s:nvim_cb'), - \ }) - let jid = s:plug_call('jobstart', argv, job) - if jid > 0 - let job.jobid = jid - else - let job.running = 0 - let job.error = 1 - let job.lines = [jid < 0 ? argv[0].' is not executable' : - \ 'Invalid arguments (or job table is full)'] - endif - elseif s:vim8 - let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"script": 0})')) - if has_key(a:opts, 'dir') - let cmd = s:with_cd(cmd, a:opts.dir, 0) - endif - let argv = s:is_win ? ['cmd', '/s', '/c', '"'.cmd.'"'] : ['sh', '-c', cmd] - let jid = job_start(s:is_win ? join(argv, ' ') : argv, { - \ 'out_cb': function('s:job_cb', ['s:job_out_cb', job]), - \ 'err_cb': function('s:job_cb', ['s:job_out_cb', job]), - \ 'exit_cb': function('s:job_cb', ['s:job_exit_cb', job]), - \ 'err_mode': 'raw', - \ 'out_mode': 'raw' - \}) - if job_status(jid) == 'run' - let job.jobid = jid - else - let job.running = 0 - let job.error = 1 - let job.lines = ['Failed to start job'] - endif - else - let job.lines = s:lines(call('s:system', has_key(a:opts, 'dir') ? [a:cmd, a:opts.dir] : [a:cmd])) - let job.error = v:shell_error != 0 - let job.running = 0 - endif -endfunction - -function! s:reap(name) - let job = s:jobs[a:name] - if job.error - call add(s:update.errors, a:name) - elseif get(job, 'new', 0) - let s:update.new[a:name] = 1 - endif - let s:update.bar .= job.error ? 'x' : '=' - - let bullet = job.error ? 'x' : '-' - let result = job.error ? join(job.lines, "\n") : s:last_non_empty_line(job.lines) - call s:log(bullet, a:name, empty(result) ? 'OK' : result) - call s:bar() - - call remove(s:jobs, a:name) -endfunction - -function! s:bar() - if s:switch_in() - let total = len(s:update.all) - call setline(1, (s:update.pull ? 'Updating' : 'Installing'). - \ ' plugins ('.len(s:update.bar).'/'.total.')') - call s:progress_bar(2, s:update.bar, total) - call s:switch_out() - endif -endfunction - -function! s:logpos(name) - let max = line('$') - for i in range(4, max > 4 ? max : 4) - if getline(i) =~# '^[-+x*] '.a:name.':' - for j in range(i + 1, max > 5 ? max : 5) - if getline(j) !~ '^ ' - return [i, j - 1] - endif - endfor - return [i, i] - endif - endfor - return [0, 0] -endfunction - -function! s:log(bullet, name, lines) - if s:switch_in() - let [b, e] = s:logpos(a:name) - if b > 0 - silent execute printf('%d,%d d _', b, e) - if b > winheight('.') - let b = 4 - endif - else - let b = 4 - endif - " FIXME For some reason, nomodifiable is set after :d in vim8 - setlocal modifiable - call append(b - 1, s:format_message(a:bullet, a:name, a:lines)) - call s:switch_out() - endif -endfunction - -function! s:update_vim() - let s:jobs = {} - - call s:bar() - call s:tick() -endfunction - -function! s:tick() - let pull = s:update.pull - let prog = s:progress_opt(s:nvim || s:vim8) -while 1 " Without TCO, Vim stack is bound to explode - if empty(s:update.todo) - if empty(s:jobs) && !s:update.fin - call s:update_finish() - let s:update.fin = 1 - endif - return - endif - - let name = keys(s:update.todo)[0] - let spec = remove(s:update.todo, name) - let new = empty(globpath(spec.dir, '.git', 1)) - - call s:log(new ? '+' : '*', name, pull ? 'Updating ...' : 'Installing ...') - redraw - - let has_tag = has_key(spec, 'tag') - if !new - let [error, _] = s:git_validate(spec, 0) - if empty(error) - if pull - let cmd = ['git', 'fetch'] - if has_tag && !empty(globpath(spec.dir, '.git/shallow')) - call extend(cmd, ['--depth', '99999999']) - endif - if !empty(prog) - call add(cmd, prog) - endif - call s:spawn(name, cmd, { 'dir': spec.dir }) - else - let s:jobs[name] = { 'running': 0, 'lines': ['Already installed'], 'error': 0 } - endif - else - let s:jobs[name] = { 'running': 0, 'lines': s:lines(error), 'error': 1 } - endif - else - let cmd = ['git', 'clone'] - if !has_tag - call extend(cmd, s:clone_opt) - endif - if !empty(prog) - call add(cmd, prog) - endif - call s:spawn(name, extend(cmd, [spec.uri, s:trim(spec.dir)]), { 'new': 1 }) - endif - - if !s:jobs[name].running - call s:reap(name) - endif - if len(s:jobs) >= s:update.threads - break - endif -endwhile -endfunction - -function! s:update_python() -let py_exe = has('python') ? 'python' : 'python3' -execute py_exe "<< EOF" -import datetime -import functools -import os -try: - import queue -except ImportError: - import Queue as queue -import random -import re -import shutil -import signal -import subprocess -import tempfile -import threading as thr -import time -import traceback -import vim - -G_NVIM = vim.eval("has('nvim')") == '1' -G_PULL = vim.eval('s:update.pull') == '1' -G_RETRIES = int(vim.eval('get(g:, "plug_retries", 2)')) + 1 -G_TIMEOUT = int(vim.eval('get(g:, "plug_timeout", 60)')) -G_CLONE_OPT = ' '.join(vim.eval('s:clone_opt')) -G_PROGRESS = vim.eval('s:progress_opt(1)') -G_LOG_PROB = 1.0 / int(vim.eval('s:update.threads')) -G_STOP = thr.Event() -G_IS_WIN = vim.eval('s:is_win') == '1' - -class PlugError(Exception): - def __init__(self, msg): - self.msg = msg -class CmdTimedOut(PlugError): - pass -class CmdFailed(PlugError): - pass -class InvalidURI(PlugError): - pass -class Action(object): - INSTALL, UPDATE, ERROR, DONE = ['+', '*', 'x', '-'] - -class Buffer(object): - def __init__(self, lock, num_plugs, is_pull): - self.bar = '' - self.event = 'Updating' if is_pull else 'Installing' - self.lock = lock - self.maxy = int(vim.eval('winheight(".")')) - self.num_plugs = num_plugs - - def __where(self, name): - """ Find first line with name in current buffer. Return line num. """ - found, lnum = False, 0 - matcher = re.compile('^[-+x*] {0}:'.format(name)) - for line in vim.current.buffer: - if matcher.search(line) is not None: - found = True - break - lnum += 1 - - if not found: - lnum = -1 - return lnum - - def header(self): - curbuf = vim.current.buffer - curbuf[0] = self.event + ' plugins ({0}/{1})'.format(len(self.bar), self.num_plugs) - - num_spaces = self.num_plugs - len(self.bar) - curbuf[1] = '[{0}{1}]'.format(self.bar, num_spaces * ' ') - - with self.lock: - vim.command('normal! 2G') - vim.command('redraw') - - def write(self, action, name, lines): - first, rest = lines[0], lines[1:] - msg = ['{0} {1}{2}{3}'.format(action, name, ': ' if first else '', first)] - msg.extend([' ' + line for line in rest]) - - try: - if action == Action.ERROR: - self.bar += 'x' - vim.command("call add(s:update.errors, '{0}')".format(name)) - elif action == Action.DONE: - self.bar += '=' - - curbuf = vim.current.buffer - lnum = self.__where(name) - if lnum != -1: # Found matching line num - del curbuf[lnum] - if lnum > self.maxy and action in set([Action.INSTALL, Action.UPDATE]): - lnum = 3 - else: - lnum = 3 - curbuf.append(msg, lnum) - - self.header() - except vim.error: - pass - -class Command(object): - CD = 'cd /d' if G_IS_WIN else 'cd' - - def __init__(self, cmd, cmd_dir=None, timeout=60, cb=None, clean=None): - self.cmd = cmd - if cmd_dir: - self.cmd = '{0} {1} && {2}'.format(Command.CD, cmd_dir, self.cmd) - self.timeout = timeout - self.callback = cb if cb else (lambda msg: None) - self.clean = clean if clean else (lambda: None) - self.proc = None - - @property - def alive(self): - """ Returns true only if command still running. """ - return self.proc and self.proc.poll() is None - - def execute(self, ntries=3): - """ Execute the command with ntries if CmdTimedOut. - Returns the output of the command if no Exception. - """ - attempt, finished, limit = 0, False, self.timeout - - while not finished: - try: - attempt += 1 - result = self.try_command() - finished = True - return result - except CmdTimedOut: - if attempt != ntries: - self.notify_retry() - self.timeout += limit - else: - raise - - def notify_retry(self): - """ Retry required for command, notify user. """ - for count in range(3, 0, -1): - if G_STOP.is_set(): - raise KeyboardInterrupt - msg = 'Timeout. Will retry in {0} second{1} ...'.format( - count, 's' if count != 1 else '') - self.callback([msg]) - time.sleep(1) - self.callback(['Retrying ...']) - - def try_command(self): - """ Execute a cmd & poll for callback. Returns list of output. - Raises CmdFailed -> return code for Popen isn't 0 - Raises CmdTimedOut -> command exceeded timeout without new output - """ - first_line = True - - try: - tfile = tempfile.NamedTemporaryFile(mode='w+b') - preexec_fn = not G_IS_WIN and os.setsid or None - self.proc = subprocess.Popen(self.cmd, stdout=tfile, - stderr=subprocess.STDOUT, - stdin=subprocess.PIPE, shell=True, - preexec_fn=preexec_fn) - thrd = thr.Thread(target=(lambda proc: proc.wait()), args=(self.proc,)) - thrd.start() - - thread_not_started = True - while thread_not_started: - try: - thrd.join(0.1) - thread_not_started = False - except RuntimeError: - pass - - while self.alive: - if G_STOP.is_set(): - raise KeyboardInterrupt - - if first_line or random.random() < G_LOG_PROB: - first_line = False - line = '' if G_IS_WIN else nonblock_read(tfile.name) - if line: - self.callback([line]) - - time_diff = time.time() - os.path.getmtime(tfile.name) - if time_diff > self.timeout: - raise CmdTimedOut(['Timeout!']) - - thrd.join(0.5) - - tfile.seek(0) - result = [line.decode('utf-8', 'replace').rstrip() for line in tfile] - - if self.proc.returncode != 0: - raise CmdFailed([''] + result) - - return result - except: - self.terminate() - raise - - def terminate(self): - """ Terminate process and cleanup. """ - if self.alive: - if G_IS_WIN: - os.kill(self.proc.pid, signal.SIGINT) - else: - os.killpg(self.proc.pid, signal.SIGTERM) - self.clean() - -class Plugin(object): - def __init__(self, name, args, buf_q, lock): - self.name = name - self.args = args - self.buf_q = buf_q - self.lock = lock - self.tag = args.get('tag', 0) - - def manage(self): - try: - if os.path.exists(self.args['dir']): - self.update() - else: - self.install() - with self.lock: - thread_vim_command("let s:update.new['{0}'] = 1".format(self.name)) - except PlugError as exc: - self.write(Action.ERROR, self.name, exc.msg) - except KeyboardInterrupt: - G_STOP.set() - self.write(Action.ERROR, self.name, ['Interrupted!']) - except: - # Any exception except those above print stack trace - msg = 'Trace:\n{0}'.format(traceback.format_exc().rstrip()) - self.write(Action.ERROR, self.name, msg.split('\n')) - raise - - def install(self): - target = self.args['dir'] - if target[-1] == '\\': - target = target[0:-1] - - def clean(target): - def _clean(): - try: - shutil.rmtree(target) - except OSError: - pass - return _clean - - self.write(Action.INSTALL, self.name, ['Installing ...']) - callback = functools.partial(self.write, Action.INSTALL, self.name) - cmd = 'git clone {0} {1} {2} {3} 2>&1'.format( - '' if self.tag else G_CLONE_OPT, G_PROGRESS, self.args['uri'], - esc(target)) - com = Command(cmd, None, G_TIMEOUT, callback, clean(target)) - result = com.execute(G_RETRIES) - self.write(Action.DONE, self.name, result[-1:]) - - def repo_uri(self): - cmd = 'git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url' - command = Command(cmd, self.args['dir'], G_TIMEOUT,) - result = command.execute(G_RETRIES) - return result[-1] - - def update(self): - actual_uri = self.repo_uri() - expect_uri = self.args['uri'] - regex = re.compile(r'^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$') - ma = regex.match(actual_uri) - mb = regex.match(expect_uri) - if ma is None or mb is None or ma.groups() != mb.groups(): - msg = ['', - 'Invalid URI: {0}'.format(actual_uri), - 'Expected {0}'.format(expect_uri), - 'PlugClean required.'] - raise InvalidURI(msg) - - if G_PULL: - self.write(Action.UPDATE, self.name, ['Updating ...']) - callback = functools.partial(self.write, Action.UPDATE, self.name) - fetch_opt = '--depth 99999999' if self.tag and os.path.isfile(os.path.join(self.args['dir'], '.git/shallow')) else '' - cmd = 'git fetch {0} {1} 2>&1'.format(fetch_opt, G_PROGRESS) - com = Command(cmd, self.args['dir'], G_TIMEOUT, callback) - result = com.execute(G_RETRIES) - self.write(Action.DONE, self.name, result[-1:]) - else: - self.write(Action.DONE, self.name, ['Already installed']) - - def write(self, action, name, msg): - self.buf_q.put((action, name, msg)) - -class PlugThread(thr.Thread): - def __init__(self, tname, args): - super(PlugThread, self).__init__() - self.tname = tname - self.args = args - - def run(self): - thr.current_thread().name = self.tname - buf_q, work_q, lock = self.args - - try: - while not G_STOP.is_set(): - name, args = work_q.get_nowait() - plug = Plugin(name, args, buf_q, lock) - plug.manage() - work_q.task_done() - except queue.Empty: - pass - -class RefreshThread(thr.Thread): - def __init__(self, lock): - super(RefreshThread, self).__init__() - self.lock = lock - self.running = True - - def run(self): - while self.running: - with self.lock: - thread_vim_command('noautocmd normal! a') - time.sleep(0.33) - - def stop(self): - self.running = False - -if G_NVIM: - def thread_vim_command(cmd): - vim.session.threadsafe_call(lambda: vim.command(cmd)) -else: - def thread_vim_command(cmd): - vim.command(cmd) - -def esc(name): - return '"' + name.replace('"', '\"') + '"' - -def nonblock_read(fname): - """ Read a file with nonblock flag. Return the last line. """ - fread = os.open(fname, os.O_RDONLY | os.O_NONBLOCK) - buf = os.read(fread, 100000).decode('utf-8', 'replace') - os.close(fread) - - line = buf.rstrip('\r\n') - left = max(line.rfind('\r'), line.rfind('\n')) - if left != -1: - left += 1 - line = line[left:] - - return line - -def main(): - thr.current_thread().name = 'main' - nthreads = int(vim.eval('s:update.threads')) - plugs = vim.eval('s:update.todo') - mac_gui = vim.eval('s:mac_gui') == '1' - - lock = thr.Lock() - buf = Buffer(lock, len(plugs), G_PULL) - buf_q, work_q = queue.Queue(), queue.Queue() - for work in plugs.items(): - work_q.put(work) - - start_cnt = thr.active_count() - for num in range(nthreads): - tname = 'PlugT-{0:02}'.format(num) - thread = PlugThread(tname, (buf_q, work_q, lock)) - thread.start() - if mac_gui: - rthread = RefreshThread(lock) - rthread.start() - - while not buf_q.empty() or thr.active_count() != start_cnt: - try: - action, name, msg = buf_q.get(True, 0.25) - buf.write(action, name, ['OK'] if not msg else msg) - buf_q.task_done() - except queue.Empty: - pass - except KeyboardInterrupt: - G_STOP.set() - - if mac_gui: - rthread.stop() - rthread.join() - -main() -EOF -endfunction - -function! s:update_ruby() - ruby << EOF - module PlugStream - SEP = ["\r", "\n", nil] - def get_line - buffer = '' - loop do - char = readchar rescue return - if SEP.include? char.chr - buffer << $/ - break - else - buffer << char - end - end - buffer - end - end unless defined?(PlugStream) - - def esc arg - %["#{arg.gsub('"', '\"')}"] - end - - def killall pid - pids = [pid] - if /mswin|mingw|bccwin/ =~ RUBY_PLATFORM - pids.each { |pid| Process.kill 'INT', pid.to_i rescue nil } - else - unless `which pgrep 2> /dev/null`.empty? - children = pids - until children.empty? - children = children.map { |pid| - `pgrep -P #{pid}`.lines.map { |l| l.chomp } - }.flatten - pids += children - end - end - pids.each { |pid| Process.kill 'TERM', pid.to_i rescue nil } - end - end - - def compare_git_uri a, b - regex = %r{^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$} - regex.match(a).to_a.drop(1) == regex.match(b).to_a.drop(1) - end - - require 'thread' - require 'fileutils' - require 'timeout' - running = true - iswin = VIM::evaluate('s:is_win').to_i == 1 - pull = VIM::evaluate('s:update.pull').to_i == 1 - base = VIM::evaluate('g:plug_home') - all = VIM::evaluate('s:update.todo') - limit = VIM::evaluate('get(g:, "plug_timeout", 60)') - tries = VIM::evaluate('get(g:, "plug_retries", 2)') + 1 - nthr = VIM::evaluate('s:update.threads').to_i - maxy = VIM::evaluate('winheight(".")').to_i - vim7 = VIM::evaluate('v:version').to_i <= 703 && RUBY_PLATFORM =~ /darwin/ - cd = iswin ? 'cd /d' : 'cd' - tot = VIM::evaluate('len(s:update.todo)') || 0 - bar = '' - skip = 'Already installed' - mtx = Mutex.new - take1 = proc { mtx.synchronize { running && all.shift } } - logh = proc { - cnt = bar.length - $curbuf[1] = "#{pull ? 'Updating' : 'Installing'} plugins (#{cnt}/#{tot})" - $curbuf[2] = '[' + bar.ljust(tot) + ']' - VIM::command('normal! 2G') - VIM::command('redraw') - } - where = proc { |name| (1..($curbuf.length)).find { |l| $curbuf[l] =~ /^[-+x*] #{name}:/ } } - log = proc { |name, result, type| - mtx.synchronize do - ing = ![true, false].include?(type) - bar += type ? '=' : 'x' unless ing - b = case type - when :install then '+' when :update then '*' - when true, nil then '-' else - VIM::command("call add(s:update.errors, '#{name}')") - 'x' - end - result = - if type || type.nil? - ["#{b} #{name}: #{result.lines.to_a.last || 'OK'}"] - elsif result =~ /^Interrupted|^Timeout/ - ["#{b} #{name}: #{result}"] - else - ["#{b} #{name}"] + result.lines.map { |l| " " << l } - end - if lnum = where.call(name) - $curbuf.delete lnum - lnum = 4 if ing && lnum > maxy - end - result.each_with_index do |line, offset| - $curbuf.append((lnum || 4) - 1 + offset, line.gsub(/\e\[./, '').chomp) - end - logh.call - end - } - bt = proc { |cmd, name, type, cleanup| - tried = timeout = 0 - begin - tried += 1 - timeout += limit - fd = nil - data = '' - if iswin - Timeout::timeout(timeout) do - tmp = VIM::evaluate('tempname()') - system("(#{cmd}) > #{tmp}") - data = File.read(tmp).chomp - File.unlink tmp rescue nil - end - else - fd = IO.popen(cmd).extend(PlugStream) - first_line = true - log_prob = 1.0 / nthr - while line = Timeout::timeout(timeout) { fd.get_line } - data << line - log.call name, line.chomp, type if name && (first_line || rand < log_prob) - first_line = false - end - fd.close - end - [$? == 0, data.chomp] - rescue Timeout::Error, Interrupt => e - if fd && !fd.closed? - killall fd.pid - fd.close - end - cleanup.call if cleanup - if e.is_a?(Timeout::Error) && tried < tries - 3.downto(1) do |countdown| - s = countdown > 1 ? 's' : '' - log.call name, "Timeout. Will retry in #{countdown} second#{s} ...", type - sleep 1 - end - log.call name, 'Retrying ...', type - retry - end - [false, e.is_a?(Interrupt) ? "Interrupted!" : "Timeout!"] - end - } - main = Thread.current - threads = [] - watcher = Thread.new { - if vim7 - while VIM::evaluate('getchar(1)') - sleep 0.1 - end - else - require 'io/console' # >= Ruby 1.9 - nil until IO.console.getch == 3.chr - end - mtx.synchronize do - running = false - threads.each { |t| t.raise Interrupt } unless vim7 - end - threads.each { |t| t.join rescue nil } - main.kill - } - refresh = Thread.new { - while true - mtx.synchronize do - break unless running - VIM::command('noautocmd normal! a') - end - sleep 0.2 - end - } if VIM::evaluate('s:mac_gui') == 1 - - clone_opt = VIM::evaluate('s:clone_opt').join(' ') - progress = VIM::evaluate('s:progress_opt(1)') - nthr.times do - mtx.synchronize do - threads << Thread.new { - while pair = take1.call - name = pair.first - dir, uri, tag = pair.last.values_at *%w[dir uri tag] - exists = File.directory? dir - ok, result = - if exists - chdir = "#{cd} #{iswin ? dir : esc(dir)}" - ret, data = bt.call "#{chdir} && git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url", nil, nil, nil - current_uri = data.lines.to_a.last - if !ret - if data =~ /^Interrupted|^Timeout/ - [false, data] - else - [false, [data.chomp, "PlugClean required."].join($/)] - end - elsif !compare_git_uri(current_uri, uri) - [false, ["Invalid URI: #{current_uri}", - "Expected: #{uri}", - "PlugClean required."].join($/)] - else - if pull - log.call name, 'Updating ...', :update - fetch_opt = (tag && File.exist?(File.join(dir, '.git/shallow'))) ? '--depth 99999999' : '' - bt.call "#{chdir} && git fetch #{fetch_opt} #{progress} 2>&1", name, :update, nil - else - [true, skip] - end - end - else - d = esc dir.sub(%r{[\\/]+$}, '') - log.call name, 'Installing ...', :install - bt.call "git clone #{clone_opt unless tag} #{progress} #{uri} #{d} 2>&1", name, :install, proc { - FileUtils.rm_rf dir - } - end - mtx.synchronize { VIM::command("let s:update.new['#{name}'] = 1") } if !exists && ok - log.call name, result, ok - end - } if running - end - end - threads.each { |t| t.join rescue nil } - logh.call - refresh.kill if refresh - watcher.kill -EOF -endfunction - -function! s:shellesc_cmd(arg, script) - let escaped = substitute('"'.a:arg.'"', '[&|<>()@^!"]', '^&', 'g') - return substitute(escaped, '%', (a:script ? '%' : '^') . '&', 'g') -endfunction - -function! s:shellesc_ps1(arg) - return "'".substitute(escape(a:arg, '\"'), "'", "''", 'g')."'" -endfunction - -function! s:shellesc_sh(arg) - return "'".substitute(a:arg, "'", "'\\\\''", 'g')."'" -endfunction - -" Escape the shell argument based on the shell. -" Vim and Neovim's shellescape() are insufficient. -" 1. shellslash determines whether to use single/double quotes. -" Double-quote escaping is fragile for cmd.exe. -" 2. It does not work for powershell. -" 3. It does not work for *sh shells if the command is executed -" via cmd.exe (ie. cmd.exe /c sh -c command command_args) -" 4. It does not support batchfile syntax. -" -" Accepts an optional dictionary with the following keys: -" - shell: same as Vim/Neovim 'shell' option. -" If unset, fallback to 'cmd.exe' on Windows or 'sh'. -" - script: If truthy and shell is cmd.exe, escape for batchfile syntax. -function! plug#shellescape(arg, ...) - if a:arg =~# '^[A-Za-z0-9_/:.-]\+$' - return a:arg - endif - let opts = a:0 > 0 && type(a:1) == s:TYPE.dict ? a:1 : {} - let shell = get(opts, 'shell', s:is_win ? 'cmd.exe' : 'sh') - let script = get(opts, 'script', 1) - if shell =~# 'cmd\(\.exe\)\?$' - return s:shellesc_cmd(a:arg, script) - elseif shell =~# 'powershell\(\.exe\)\?$' || shell =~# 'pwsh$' - return s:shellesc_ps1(a:arg) - endif - return s:shellesc_sh(a:arg) -endfunction - -function! s:glob_dir(path) - return map(filter(s:glob(a:path, '**'), 'isdirectory(v:val)'), 's:dirpath(v:val)') -endfunction - -function! s:progress_bar(line, bar, total) - call setline(a:line, '[' . s:lpad(a:bar, a:total) . ']') -endfunction - -function! s:compare_git_uri(a, b) - " See `git help clone' - " https:// [user@] github.com[:port] / junegunn/vim-plug [.git] - " [git@] github.com[:port] : junegunn/vim-plug [.git] - " file:// / junegunn/vim-plug [/] - " / junegunn/vim-plug [/] - let pat = '^\%(\w\+://\)\='.'\%([^@/]*@\)\='.'\([^:/]*\%(:[0-9]*\)\=\)'.'[:/]'.'\(.\{-}\)'.'\%(\.git\)\=/\?$' - let ma = matchlist(a:a, pat) - let mb = matchlist(a:b, pat) - return ma[1:2] ==# mb[1:2] -endfunction - -function! s:format_message(bullet, name, message) - if a:bullet != 'x' - return [printf('%s %s: %s', a:bullet, a:name, s:lastline(a:message))] - else - let lines = map(s:lines(a:message), '" ".v:val') - return extend([printf('x %s:', a:name)], lines) - endif -endfunction - -function! s:with_cd(cmd, dir, ...) - let script = a:0 > 0 ? a:1 : 1 - return printf('cd%s %s && %s', s:is_win ? ' /d' : '', plug#shellescape(a:dir, {'script': script}), a:cmd) -endfunction - -function! s:system(cmd, ...) - let batchfile = '' - try - let [sh, shellcmdflag, shrd] = s:chsh(1) - if type(a:cmd) == s:TYPE.list - " Neovim's system() supports list argument to bypass the shell - " but it cannot set the working directory for the command. - " Assume that the command does not rely on the shell. - if has('nvim') && a:0 == 0 - return system(a:cmd) - endif - let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"shell": &shell, "script": 0})')) - if &shell =~# 'powershell\(\.exe\)\?$' - let cmd = '& ' . cmd - endif - else - let cmd = a:cmd - endif - if a:0 > 0 - let cmd = s:with_cd(cmd, a:1, type(a:cmd) != s:TYPE.list) - endif - if s:is_win && type(a:cmd) != s:TYPE.list - let [batchfile, cmd] = s:batchfile(cmd) - endif - return system(cmd) - finally - let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] - if s:is_win && filereadable(batchfile) - call delete(batchfile) - endif - endtry -endfunction - -function! s:system_chomp(...) - let ret = call('s:system', a:000) - return v:shell_error ? '' : substitute(ret, '\n$', '', '') -endfunction - -function! s:git_validate(spec, check_branch) - let err = '' - if isdirectory(a:spec.dir) - let result = [s:git_local_branch(a:spec.dir), s:git_origin_url(a:spec.dir)] - let remote = result[-1] - if empty(remote) - let err = join([remote, 'PlugClean required.'], "\n") - elseif !s:compare_git_uri(remote, a:spec.uri) - let err = join(['Invalid URI: '.remote, - \ 'Expected: '.a:spec.uri, - \ 'PlugClean required.'], "\n") - elseif a:check_branch && has_key(a:spec, 'commit') - let sha = s:git_revision(a:spec.dir) - if empty(sha) - let err = join(add(result, 'PlugClean required.'), "\n") - elseif !s:hash_match(sha, a:spec.commit) - let err = join([printf('Invalid HEAD (expected: %s, actual: %s)', - \ a:spec.commit[:6], sha[:6]), - \ 'PlugUpdate required.'], "\n") - endif - elseif a:check_branch - let current_branch = result[0] - " Check tag - let origin_branch = s:git_origin_branch(a:spec) - if has_key(a:spec, 'tag') - let tag = s:system_chomp('git describe --exact-match --tags HEAD 2>&1', a:spec.dir) - if a:spec.tag !=# tag && a:spec.tag !~ '\*' - let err = printf('Invalid tag: %s (expected: %s). Try PlugUpdate.', - \ (empty(tag) ? 'N/A' : tag), a:spec.tag) - endif - " Check branch - elseif origin_branch !=# current_branch - let err = printf('Invalid branch: %s (expected: %s). Try PlugUpdate.', - \ current_branch, origin_branch) - endif - if empty(err) - let [ahead, behind] = split(s:lastline(s:system([ - \ 'git', 'rev-list', '--count', '--left-right', - \ printf('HEAD...origin/%s', origin_branch) - \ ], a:spec.dir)), '\t') - if !v:shell_error && ahead - if behind - " Only mention PlugClean if diverged, otherwise it's likely to be - " pushable (and probably not that messed up). - let err = printf( - \ "Diverged from origin/%s (%d commit(s) ahead and %d commit(s) behind!\n" - \ .'Backup local changes and run PlugClean and PlugUpdate to reinstall it.', origin_branch, ahead, behind) - else - let err = printf("Ahead of origin/%s by %d commit(s).\n" - \ .'Cannot update until local changes are pushed.', - \ origin_branch, ahead) - endif - endif - endif - endif - else - let err = 'Not found' - endif - return [err, err =~# 'PlugClean'] -endfunction - -function! s:rm_rf(dir) - if isdirectory(a:dir) - return s:system(s:is_win - \ ? 'rmdir /S /Q '.plug#shellescape(a:dir) - \ : ['rm', '-rf', a:dir]) - endif -endfunction - -function! s:clean(force) - call s:prepare() - call append(0, 'Searching for invalid plugins in '.g:plug_home) - call append(1, '') - - " List of valid directories - let dirs = [] - let errs = {} - let [cnt, total] = [0, len(g:plugs)] - for [name, spec] in items(g:plugs) - if !s:is_managed(name) - call add(dirs, spec.dir) - else - let [err, clean] = s:git_validate(spec, 1) - if clean - let errs[spec.dir] = s:lines(err)[0] - else - call add(dirs, spec.dir) - endif - endif - let cnt += 1 - call s:progress_bar(2, repeat('=', cnt), total) - normal! 2G - redraw - endfor - - let allowed = {} - for dir in dirs - let allowed[s:dirpath(s:plug_fnamemodify(dir, ':h:h'))] = 1 - let allowed[dir] = 1 - for child in s:glob_dir(dir) - let allowed[child] = 1 - endfor - endfor - - let todo = [] - let found = sort(s:glob_dir(g:plug_home)) - while !empty(found) - let f = remove(found, 0) - if !has_key(allowed, f) && isdirectory(f) - call add(todo, f) - call append(line('$'), '- ' . f) - if has_key(errs, f) - call append(line('$'), ' ' . errs[f]) - endif - let found = filter(found, 'stridx(v:val, f) != 0') - end - endwhile - - 4 - redraw - if empty(todo) - call append(line('$'), 'Already clean.') - else - let s:clean_count = 0 - call append(3, ['Directories to delete:', '']) - redraw! - if a:force || s:ask_no_interrupt('Delete all directories?') - call s:delete([6, line('$')], 1) - else - call setline(4, 'Cancelled.') - nnoremap d :set opfunc=delete_opg@ - nmap dd d_ - xnoremap d :call delete_op(visualmode(), 1) - echo 'Delete the lines (d{motion}) to delete the corresponding directories' - endif - endif - 4 - setlocal nomodifiable -endfunction - -function! s:delete_op(type, ...) - call s:delete(a:0 ? [line("'<"), line("'>")] : [line("'["), line("']")], 0) -endfunction - -function! s:delete(range, force) - let [l1, l2] = a:range - let force = a:force - let err_count = 0 - while l1 <= l2 - let line = getline(l1) - if line =~ '^- ' && isdirectory(line[2:]) - execute l1 - redraw! - let answer = force ? 1 : s:ask('Delete '.line[2:].'?', 1) - let force = force || answer > 1 - if answer - let err = s:rm_rf(line[2:]) - setlocal modifiable - if empty(err) - call setline(l1, '~'.line[1:]) - let s:clean_count += 1 - else - delete _ - call append(l1 - 1, s:format_message('x', line[1:], err)) - let l2 += len(s:lines(err)) - let err_count += 1 - endif - let msg = printf('Removed %d directories.', s:clean_count) - if err_count > 0 - let msg .= printf(' Failed to remove %d directories.', err_count) - endif - call setline(4, msg) - setlocal nomodifiable - endif - endif - let l1 += 1 - endwhile -endfunction - -function! s:upgrade() - echo 'Downloading the latest version of vim-plug' - redraw - let tmp = s:plug_tempname() - let new = tmp . '/plug.vim' - - try - let out = s:system(['git', 'clone', '--depth', '1', s:plug_src, tmp]) - if v:shell_error - return s:err('Error upgrading vim-plug: '. out) - endif - - if readfile(s:me) ==# readfile(new) - echo 'vim-plug is already up-to-date' - return 0 - else - call rename(s:me, s:me . '.old') - call rename(new, s:me) - unlet g:loaded_plug - echo 'vim-plug has been upgraded' - return 1 - endif - finally - silent! call s:rm_rf(tmp) - endtry -endfunction - -function! s:upgrade_specs() - for spec in values(g:plugs) - let spec.frozen = get(spec, 'frozen', 0) - endfor -endfunction - -function! s:status() - call s:prepare() - call append(0, 'Checking plugins') - call append(1, '') - - let ecnt = 0 - let unloaded = 0 - let [cnt, total] = [0, len(g:plugs)] - for [name, spec] in items(g:plugs) - let is_dir = isdirectory(spec.dir) - if has_key(spec, 'uri') - if is_dir - let [err, _] = s:git_validate(spec, 1) - let [valid, msg] = [empty(err), empty(err) ? 'OK' : err] - else - let [valid, msg] = [0, 'Not found. Try PlugInstall.'] - endif - else - if is_dir - let [valid, msg] = [1, 'OK'] - else - let [valid, msg] = [0, 'Not found.'] - endif - endif - let cnt += 1 - let ecnt += !valid - " `s:loaded` entry can be missing if PlugUpgraded - if is_dir && get(s:loaded, name, -1) == 0 - let unloaded = 1 - let msg .= ' (not loaded)' - endif - call s:progress_bar(2, repeat('=', cnt), total) - call append(3, s:format_message(valid ? '-' : 'x', name, msg)) - normal! 2G - redraw - endfor - call setline(1, 'Finished. '.ecnt.' error(s).') - normal! gg - setlocal nomodifiable - if unloaded - echo "Press 'L' on each line to load plugin, or 'U' to update" - nnoremap L :call status_load(line('.')) - xnoremap L :call status_load(line('.')) - end -endfunction - -function! s:extract_name(str, prefix, suffix) - return matchstr(a:str, '^'.a:prefix.' \zs[^:]\+\ze:.*'.a:suffix.'$') -endfunction - -function! s:status_load(lnum) - let line = getline(a:lnum) - let name = s:extract_name(line, '-', '(not loaded)') - if !empty(name) - call plug#load(name) - setlocal modifiable - call setline(a:lnum, substitute(line, ' (not loaded)$', '', '')) - setlocal nomodifiable - endif -endfunction - -function! s:status_update() range - let lines = getline(a:firstline, a:lastline) - let names = filter(map(lines, 's:extract_name(v:val, "[x-]", "")'), '!empty(v:val)') - if !empty(names) - echo - execute 'PlugUpdate' join(names) - endif -endfunction - -function! s:is_preview_window_open() - silent! wincmd P - if &previewwindow - wincmd p - return 1 - endif -endfunction - -function! s:find_name(lnum) - for lnum in reverse(range(1, a:lnum)) - let line = getline(lnum) - if empty(line) - return '' - endif - let name = s:extract_name(line, '-', '') - if !empty(name) - return name - endif - endfor - return '' -endfunction - -function! s:preview_commit() - if b:plug_preview < 0 - let b:plug_preview = !s:is_preview_window_open() - endif - - let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}') - if empty(sha) - return - endif - - let name = s:find_name(line('.')) - if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir) - return - endif - - if exists('g:plug_pwindow') && !s:is_preview_window_open() - execute g:plug_pwindow - execute 'e' sha - else - execute 'pedit' sha - wincmd P - endif - setlocal previewwindow filetype=git buftype=nofile nobuflisted modifiable - let batchfile = '' - try - let [sh, shellcmdflag, shrd] = s:chsh(1) - let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && git show --no-color --pretty=medium '.sha - if s:is_win - let [batchfile, cmd] = s:batchfile(cmd) - endif - execute 'silent %!' cmd - finally - let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] - if s:is_win && filereadable(batchfile) - call delete(batchfile) - endif - endtry - setlocal nomodifiable - nnoremap q :q - wincmd p -endfunction - -function! s:section(flags) - call search('\(^[x-] \)\@<=[^:]\+:', a:flags) -endfunction - -function! s:format_git_log(line) - let indent = ' ' - let tokens = split(a:line, nr2char(1)) - if len(tokens) != 5 - return indent.substitute(a:line, '\s*$', '', '') - endif - let [graph, sha, refs, subject, date] = tokens - let tag = matchstr(refs, 'tag: [^,)]\+') - let tag = empty(tag) ? ' ' : ' ('.tag.') ' - return printf('%s%s%s%s%s (%s)', indent, graph, sha, tag, subject, date) -endfunction - -function! s:append_ul(lnum, text) - call append(a:lnum, ['', a:text, repeat('-', len(a:text))]) -endfunction - -function! s:diff() - call s:prepare() - call append(0, ['Collecting changes ...', '']) - let cnts = [0, 0] - let bar = '' - let total = filter(copy(g:plugs), 's:is_managed(v:key) && isdirectory(v:val.dir)') - call s:progress_bar(2, bar, len(total)) - for origin in [1, 0] - let plugs = reverse(sort(items(filter(copy(total), (origin ? '' : '!').'(has_key(v:val, "commit") || has_key(v:val, "tag"))')))) - if empty(plugs) - continue - endif - call s:append_ul(2, origin ? 'Pending updates:' : 'Last update:') - for [k, v] in plugs - let branch = s:git_origin_branch(v) - if len(branch) - let range = origin ? '..origin/'.branch : 'HEAD@{1}..' - let cmd = ['git', 'log', '--graph', '--color=never'] - if s:git_version_requirement(2, 10, 0) - call add(cmd, '--no-show-signature') - endif - call extend(cmd, ['--pretty=format:%x01%h%x01%d%x01%s%x01%cr', range]) - if has_key(v, 'rtp') - call extend(cmd, ['--', v.rtp]) - endif - let diff = s:system_chomp(cmd, v.dir) - if !empty(diff) - let ref = has_key(v, 'tag') ? (' (tag: '.v.tag.')') : has_key(v, 'commit') ? (' '.v.commit) : '' - call append(5, extend(['', '- '.k.':'.ref], map(s:lines(diff), 's:format_git_log(v:val)'))) - let cnts[origin] += 1 - endif - endif - let bar .= '=' - call s:progress_bar(2, bar, len(total)) - normal! 2G - redraw - endfor - if !cnts[origin] - call append(5, ['', 'N/A']) - endif - endfor - call setline(1, printf('%d plugin(s) updated.', cnts[0]) - \ . (cnts[1] ? printf(' %d plugin(s) have pending updates.', cnts[1]) : '')) - - if cnts[0] || cnts[1] - nnoremap (plug-preview) :silent! call preview_commit() - if empty(maparg("\", 'n')) - nmap (plug-preview) - endif - if empty(maparg('o', 'n')) - nmap o (plug-preview) - endif - endif - if cnts[0] - nnoremap X :call revert() - echo "Press 'X' on each block to revert the update" - endif - normal! gg - setlocal nomodifiable -endfunction - -function! s:revert() - if search('^Pending updates', 'bnW') - return - endif - - let name = s:find_name(line('.')) - if empty(name) || !has_key(g:plugs, name) || - \ input(printf('Revert the update of %s? (y/N) ', name)) !~? '^y' - return - endif - - call s:system('git reset --hard HEAD@{1} && git checkout '.plug#shellescape(g:plugs[name].branch).' --', g:plugs[name].dir) - setlocal modifiable - normal! "_dap - setlocal nomodifiable - echo 'Reverted' -endfunction - -function! s:snapshot(force, ...) abort - call s:prepare() - setf vim - call append(0, ['" Generated by vim-plug', - \ '" '.strftime("%c"), - \ '" :source this file in vim to restore the snapshot', - \ '" or execute: vim -S snapshot.vim', - \ '', '', 'PlugUpdate!']) - 1 - let anchor = line('$') - 3 - let names = sort(keys(filter(copy(g:plugs), - \'has_key(v:val, "uri") && !has_key(v:val, "commit") && isdirectory(v:val.dir)'))) - for name in reverse(names) - let sha = s:git_revision(g:plugs[name].dir) - if !empty(sha) - call append(anchor, printf("silent! let g:plugs['%s'].commit = '%s'", name, sha)) - redraw - endif - endfor - - if a:0 > 0 - let fn = s:plug_expand(a:1) - if filereadable(fn) && !(a:force || s:ask(a:1.' already exists. Overwrite?')) - return - endif - call writefile(getline(1, '$'), fn) - echo 'Saved as '.a:1 - silent execute 'e' s:esc(fn) - setf vim - endif -endfunction - -function! s:split_rtp() - return split(&rtp, '\\\@' to make sure tab is not mapped by other plugin. -inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ coc#refresh() -inoremap pumvisible() ? "\" : "\" - -function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -" Use to trigger completion. -inoremap coc#refresh() - -" Use to confirm completion, `u` means break undo chain at current position. -" Coc only does snippet and additional edit on confirm. -inoremap pumvisible() ? "\" : "\u\" - -" Use `[c` and `]c` to navigate diagnostics -nmap [c (coc-diagnostic-prev) -nmap ]c (coc-diagnostic-next) - -" Remap keys for gotos -nmap gd (coc-definition) -nmap gy (coc-type-definition) -nmap gi (coc-implementation) -nmap gr (coc-references) - -" Use K to show documentation in preview window -nnoremap K :call show_documentation() - -function! s:show_documentation() - if (index(['vim','help'], &filetype) >= 0) - execute 'h '.expand('') - else - call CocAction('doHover') - endif -endfunction - -" Highlight symbol under cursor on CursorHold -autocmd CursorHold * silent call CocActionAsync('highlight') - -" Remap for rename current word -nmap rn (coc-rename) - -" Remap for format selected region -xmap f (coc-format-selected) -nmap f (coc-format-selected) - -augroup mygroup - autocmd! - " Setup formatexpr specified filetype(s). - autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') - " Update signature help on jump placeholder - autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') -augroup end - -" Remap for do codeAction of selected region, ex: `aap` for current paragraph -xmap a (coc-codeaction-selected) -nmap a (coc-codeaction-selected) - -" Remap for do codeAction of current line -nmap ac (coc-codeaction) -" Fix autofix problem of current line -nmap qf (coc-fix-current) - -" Use for select selections ranges, needs server support, like: coc-tsserver, coc-python -nmap (coc-range-select) -xmap (coc-range-select) -xmap (coc-range-select-backword) - -" Use `:Format` to format current buffer -command! -nargs=0 Format :call CocAction('format') - -" Use `:Fold` to fold current buffer -command! -nargs=? Fold :call CocAction('fold', ) - -" use `:OR` for organize import of current buffer -command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport') - -" Add status line support, for integration with other plugin, checkout `:h coc-status` -set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} - -" Using CocList -" Show all diagnostics -nnoremap a :CocList diagnostics -" Manage extensions -nnoremap e :CocList extensions -" Show commands -nnoremap c :CocList commands -" Find symbol of current document -nnoremap o :CocList outline -" Search workspace symbols -nnoremap s :CocList -I symbols -" Do default action for next item. -nnoremap j :CocNext -" Do default action for previous item. -nnoremap k :CocPrev -" Resume latest coc list -nnoremap p :CocListResume - -set clipboard+=unnamedplus - -function! GetHighlightGroup() - let l:s = synID(line('.'), col('.'), 1) - echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name') - endfunction - -nnoremap gA :call GetHighlightGroup() - -set fillchars=eob:\ diff --git a/neovim_vimscriptonly/nvim/confs/cpp.vim b/neovim_vimscriptonly/nvim/confs/cpp.vim deleted file mode 100644 index ba4c1e5..0000000 --- a/neovim_vimscriptonly/nvim/confs/cpp.vim +++ /dev/null @@ -1,19 +0,0 @@ -let g:AutoPairsFlyMode = 1 -let g:rainbow_active = 1 -let g:cpp_class_scope_highlight = 1 -let g:cpp_member_variable_highlight = 1 -let g:cpp_class_decl_highlight = 1 -let g:cpp_posix_standard = 1 -let g:cpp_experimental_template_highlight = 1 -let g:cpp_no_function_highlight = 1 -let g:cpp_no_function_highlight = 1 -let g:cpp_simple_highlight = 1 - -" format settings for clang - -let g:clang_format#style_options = { - \ "AccessModifierOffset" : -4, - \ "AllowShortIfStatementsOnASingleLine" : "true", - \ "AlwaysBreakTemplateDeclarations" : "true", - \ "Standard" : "C++11", - \ "BreakBeforeBraces" : "Stroustrup"} diff --git a/neovim_vimscriptonly/nvim/confs/gitSigns.vim b/neovim_vimscriptonly/nvim/confs/gitSigns.vim deleted file mode 100644 index 90cfc41..0000000 --- a/neovim_vimscriptonly/nvim/confs/gitSigns.vim +++ /dev/null @@ -1,32 +0,0 @@ -lua << EOF - -require('gitsigns').setup { - signs = { - add = {hl = 'DiffAdd' , text = '▌', numhl='GitSignsAddNr'}, - change = {hl = 'DiffChange', text = '▌', numhl='GitSignsChangeNr'}, - delete = {hl = 'DiffDelete', text = '_', numhl='GitSignsDeleteNr'}, - topdelete = {hl = 'DiffDelete', text = '‾', numhl='GitSignsDeleteNr'}, - changedelete = {hl = 'DiffChange', text = '~', numhl='GitSignsChangeNr'}, - }, - numhl = false, - keymaps = { - -- Default keymap options - noremap = true, - buffer = true, - - ['n ]c'] = { expr = true, "&diff ? ']c' : 'lua require\"gitsigns\".next_hunk()'"}, - ['n [c'] = { expr = true, "&diff ? '[c' : 'lua require\"gitsigns\".prev_hunk()'"}, - - ['n hs'] = 'lua require"gitsigns".stage_hunk()', - ['n hu'] = 'lua require"gitsigns".undo_stage_hunk()', - ['n hr'] = 'lua require"gitsigns".reset_hunk()', - ['n hp'] = 'lua require"gitsigns".preview_hunk()', - ['n hb'] = 'lua require"gitsigns".blame_line()', - }, - watch_index = { - interval = 100 - }, - sign_priority = 5, - status_formatter = nil, -- Use default -} -EOF diff --git a/neovim_vimscriptonly/nvim/confs/keybinds.vim b/neovim_vimscriptonly/nvim/confs/keybinds.vim deleted file mode 100644 index a0c8c46..0000000 --- a/neovim_vimscriptonly/nvim/confs/keybinds.vim +++ /dev/null @@ -1,19 +0,0 @@ -" new tab and switching between em - -nnoremap : tabnew -nnoremap : tabp -nnoremap : tabn - -"nnoremap :%!astyle -nnoremap :%y+ - -map k -map j -map l -map h - - -nnoremap , :Neoformat -nnoremap . :Telescope - -inoremap kk diff --git a/neovim_vimscriptonly/nvim/confs/miscSettings.vim b/neovim_vimscriptonly/nvim/confs/miscSettings.vim deleted file mode 100644 index fde8526..0000000 --- a/neovim_vimscriptonly/nvim/confs/miscSettings.vim +++ /dev/null @@ -1,53 +0,0 @@ -" open new split panes to right and below -set splitright -set splitbelow -" turn terminal to normal mode with escape -tnoremap -" start terminal in insert mode -au BufEnter * if &buftype == 'terminal' | :startinsert | endif - -" open terminal on the bottom -function! OpenTerminal() - split term://bash - resize 10 -endfunction -nnoremap :call OpenTerminal() -nnoremap :vnew term://bash - -set updatetime=250 "for gitsigns" -let g:tagalong_verbose = 1 - -set showtabline=0 " Show tabline -set guioptions-=e " Don't use GUI tabline -set mouse=a - -" if hidden is not set, TextEdit might fail. -set hidden - -" Some servers have issues with backup files, see #649 -set nobackup -set nowritebackup - -" Better display for messages -set cmdheight=1 - -" don't give |ins-completion-menu| messages. -set shortmess+=c - -" always show signcolumns -set signcolumn=yes - -"hi CustomExplorerBg guibg=#22262C - -"augroup NvimTree -" au! -" au FileType NvimTree setlocal winhighlight=Normal:CustomExplorerBg -"augroup END - -let g:auto_save = 1 - -let mapleader = "b" - -set ignorecase -set noswapfile -set title diff --git a/neovim_vimscriptonly/nvim/confs/nvimTree.vim b/neovim_vimscriptonly/nvim/confs/nvimTree.vim deleted file mode 100644 index 10afcde..0000000 --- a/neovim_vimscriptonly/nvim/confs/nvimTree.vim +++ /dev/null @@ -1,148 +0,0 @@ -let g:nvim_tree_side = 'left' "left by default -let g:nvim_tree_width = 24 "30 by default -let g:nvim_tree_ignore = [ '.git', 'node_modules', '.cache' ] "empty by default -let g:nvim_tree_auto_open = 0 "0 by default, opens the tree when typing `vim $DIR` or `vim` -let g:nvim_tree_auto_close = 0 "0 by default, closes the tree when it's the last window -let g:nvim_tree_quit_on_open = 0 "0 by default, closes the tree when you open a file -let g:nvim_tree_follow = 1 "0 by default, this option allows the cursor to be updated when entering a buffer -let g:nvim_tree_indent_markers = 1 "0 by default, this option shows indent markers when folders are open -let g:nvim_tree_hide_dotfiles = 1 "0 by default, this option hides files and folders starting with a dot `.` -let g:nvim_tree_git_hl = 1 "0 by default, will enable file highlight for git attributes (can be used without the icons). -let g:nvim_tree_root_folder_modifier = ':~' "This is the default. See :help filename-modifiers for more options -let g:nvim_tree_tab_open = 1 "0 by default, will open the tree when entering a new tab and the tree was previously open -let g:nvim_tree_allow_resize = 1 "0 by default, will not resize the tree when opening a file -let g:nvim_tree_show_icons = { - \ 'git': 1, - \ 'folders': 1, - \ 'files': 1, - \ } - -" default will show icon by default if no icon is provided -" default shows no icon by default -let g:nvim_tree_icons = { - \ 'default': '', - \ 'symlink': '', - \ 'git': { - \ 'unstaged': "✗", - \ 'staged': "✓", - \ 'unmerged': "", - \ 'renamed': "➜", - \ 'untracked': "★" - \ }, - \ 'folder': { - \ 'default': "", - \ 'open': "", - \ 'symlink': "", - \ } - \ } - -"hi LuaTreeIndentMarker guifg=#C8CCD4 -nnoremap :NvimTreeToggle -nnoremap r :LuaTreeRefresh -nnoremap n :LuaTreeFindFile -" LuaTreeOpen and LuaTreeClose are also available if you need them - -" a list of groups can be found at `:help nvim_tree_highlight` -highlight NvimTreeFolderIcon guifg= #61afef -highlight NvimTreeFolderName guifg = #61afef - - -lua << EOF -local get_lua_cb = function (cb_name) - return string.format(":lua require'nvim-tree'.on_keypress('%s')", cb_name) -end - --- Mappings for nvimtree -vim.g.nvim_tree_bindings = { - [""] = get_lua_cb("edit"), - ["o"] = get_lua_cb("edit"), - ["<2-LeftMouse>"] = get_lua_cb("edit"), - ["<2-RightMouse>"] = get_lua_cb("cd"), - [""] = get_lua_cb("cd"), - [""] = get_lua_cb("vsplit"), - [""] = get_lua_cb("split"), - [""] = get_lua_cb("tabnew"), - [""] = get_lua_cb("close_node"), - [""] = get_lua_cb("close_node"), - [""] = get_lua_cb("preview"), - ["I"] = get_lua_cb("toggle_ignored"), - ["H"] = get_lua_cb("toggle_dotfiles"), - ["R"] = get_lua_cb("refresh"), - ["a"] = get_lua_cb("create"), - ["d"] = get_lua_cb("remove"), - ["r"] = get_lua_cb("rename"), - [""] = get_lua_cb("full_rename"), - ["x"] = get_lua_cb("cut"), - ["c"] = get_lua_cb("copy"), - ["p"] = get_lua_cb("paste"), - ["[c"] = get_lua_cb("prev_git_item"), - ["]c"] = get_lua_cb("next_git_item"), - ["-"] = get_lua_cb("dir_up"), - ["q"] = get_lua_cb("close"), -} - -require'nvim-web-devicons'.setup { - -- your personnal icons can go here (to override) - -- DevIcon will be appended to `name` - override = { - html = { - icon = "", - color = "#DE8C92", - name = "html" - }, - css = { - icon = "", - color = "#61afef", - name = "css" - }, - js = { - icon = "", - color = "#EBCB8B", - name = "js" - }, - png = { - icon = " ", - color = "#BD77DC", - name = "png" - }, - jpg = { - icon = " ", - color = "#BD77DC", - name = "jpg" - }, - jpeg = { - icon = " ", - color = "#BD77DC", - name = "jpeg" - }, - mp3 = { - icon = "", - color = "#C8CCD4", - name = "mp3" - }, - mp4 = { - icon = "", - color = "#C8CCD4", - name = "mp4" - }, - out = { - icon = "", - color = "#C8CCD4", - name = "out" - }, - toml = { - icon = "", - color = "#61afef", - name = "toml" - }, - lock = { - icon = "", - color = "#DE6B74", - name = "lock" - } - }; - -- globally enable default icons (default to false) - -- will get overriden by `get_icons` option - default = true; -} -EOF diff --git a/neovim_vimscriptonly/nvim/confs/pluginList.vim b/neovim_vimscriptonly/nvim/confs/pluginList.vim deleted file mode 100644 index 25415c6..0000000 --- a/neovim_vimscriptonly/nvim/confs/pluginList.vim +++ /dev/null @@ -1,24 +0,0 @@ -call plug#begin('~/.local/share/nvim/site/plugged') -Plug 'nvim-lua/plenary.nvim' -Plug 'lewis6991/gitsigns.nvim' -Plug 'sbdchd/neoformat' -Plug 'glepnir/galaxyline.nvim' -Plug 'akinsho/nvim-bufferline.lua' -Plug '907th/vim-auto-save' -Plug 'michalliu/jsruntime.vim' -Plug 'kyazdani42/nvim-tree.lua' -Plug 'kyazdani42/nvim-web-devicons' -Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} -Plug 'chriskempson/base16-vim' -Plug 'norcalli/nvim-colorizer.lua' -Plug 'jiangmiao/auto-pairs' -Plug 'alvan/vim-closetag' -Plug 'bfrg/vim-cpp-modern' -Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}} -Plug 'Yggdroot/indentLine' -Plug 'ryanoasis/vim-devicons' -Plug 'tpope/vim-surround' -Plug 'nvim-lua/popup.nvim' -Plug 'nvim-telescope/telescope.nvim' -Plug 'nvim-telescope/telescope-media-files.nvim' -call plug#end() diff --git a/neovim_vimscriptonly/nvim/confs/rust.vim b/neovim_vimscriptonly/nvim/confs/rust.vim deleted file mode 100644 index c74293a..0000000 --- a/neovim_vimscriptonly/nvim/confs/rust.vim +++ /dev/null @@ -1,16 +0,0 @@ -" GoTo code navigation. -nmap gd (coc-definition) -nmap gy (coc-type-definition) -nmap gi (coc-implementation) -nmap gr (coc-references) - -" Use K to show documentation in preview window. -nnoremap K :call show_documentation() - -function! s:show_documentation() - if (index(['vim','help'], &filetype) >= 0) - execute 'h '.expand('') - else - call CocAction('doHover') - endif -endfunction diff --git a/neovim_vimscriptonly/nvim/confs/statusline.vim b/neovim_vimscriptonly/nvim/confs/statusline.vim deleted file mode 100644 index 7828eb7..0000000 --- a/neovim_vimscriptonly/nvim/confs/statusline.vim +++ /dev/null @@ -1,193 +0,0 @@ -lua << EOF -local gl = require('galaxyline') -local gls = gl.section -gl.short_line_list = {'LuaTree','vista','dbui'} - -local colors = { - bg = '#282c34', - line_bg = '#282c34', - fg = '#D8DEE9', - fg_green = '#65a380', - yellow = '#A3BE8C', - cyan = '#22262C', - darkblue = '#61afef', - green = '#BBE67E', - orange = '#FF8800', - purple = '#252930', - magenta = '#c678dd', - blue = '#22262C'; - red = '#DF8890', - lightbg = '#3C4048', - nord = '#81A1C1', - greenYel = '#EBCB8B' -} - -gls.left[1] = { - leftRounded = { - provider = function() return '' end, - highlight = { colors.red, colors.bg } - }, -} - -gls.left[2] = { - ViMode = { - provider = function() - return '  ' - end, - highlight = {colors.bg,colors.red}, - separator = ' ', - separator_highlight = {colors.lightbg,colors.lightbg}, - }, -} - -gls.left[3] ={ - FileIcon = { - provider = 'FileIcon', - condition = buffer_not_empty, - highlight = {require('galaxyline.provider_fileinfo').get_file_icon_color,colors.lightbg}, - }, -} - -gls.left[4] = { - FileName = { - provider = {'FileName','FileSize'}, - condition = buffer_not_empty, - highlight = {colors.fg,colors.lightbg} - } -} - -gls.left[5] = { - teech = { - provider = function() return '' end, - separator = ' ', - highlight = { colors.lightbg, colors.bg } - }, -} - -local checkwidth = function() - local squeeze_width = vim.fn.winwidth(0) / 2 - if squeeze_width > 40 then - return true - end - return false -end - -gls.left[6] = { - DiffAdd = { - provider = 'DiffAdd', - condition = checkwidth, - icon = '  ', - highlight = {colors.greenYel,colors.line_bg}, - } -} - -gls.left[7] = { - DiffModified = { - provider = 'DiffModified', - condition = checkwidth, - icon = ' ', - highlight = {colors.orange,colors.line_bg}, - } -} - -gls.left[8] = { - DiffRemove = { - provider = 'DiffRemove', - condition = checkwidth, - icon = ' ', - highlight = {colors.red,colors.line_bg}, - } -} - -gls.left[9] = { - LeftEnd = { - provider = function() return ' ' end, - separator = ' ', - separator_highlight = {colors.line_bg,colors.line_bg}, - highlight = {colors.line_bg,colors.line_bg} - } -} - -gls.left[10] = { - DiagnosticError = { - provider = 'DiagnosticError', - icon = '  ', - highlight = {colors.red,colors.bg} - } -} - -gls.left[11] = { - Space = { - provider = function () return ' ' end, - highlight = {colors.line_bg,colors.line_bg} - } -} - -gls.left[12] = { - DiagnosticWarn = { - provider = 'DiagnosticWarn', - icon = '  ', - highlight = {colors.blue,colors.bg}, - } -} - -gls.right[1] = { - GitIcon = { - provider = function() return '  ' end, - condition = require('galaxyline.provider_vcs').check_git_workspace, - highlight = {colors.green,colors.line_bg}, - } -} - -gls.right[2] = { - GitBranch = { - provider = 'GitBranch', - condition = require('galaxyline.provider_vcs').check_git_workspace, - highlight = {colors.green,colors.line_bg}, - } -} - -gls.right[3] = { - right_LeftRounded = { - provider = function() return '' end, - separator = ' ', - separator_highlight = {colors.bg,colors.bg}, - highlight = { colors.nord, colors.bg } - }, -} - -gls.right[4] = { - SiMode = { - provider = function() - local alias = { - n = 'NORMAL', - i = 'INSERT', - c = 'COMMAND', - V = 'VISUAL', - [''] = 'VISUAL', - v = 'VISUAL', - R = 'REPLACE', - } - return alias[vim.fn.mode()] - end, - highlight = { colors.bg, colors.nord }, - }, -} - - -gls.right[5] = { - PerCent = { - provider = 'LinePercent', - separator = ' ', - separator_highlight = {colors.nord,colors.nord}, - highlight = {colors.bg,colors.fg}, - } -} - -gls.right[6] = { - rightRounded = { - provider = function() return '' end, - highlight = { colors.fg, colors.bg } - }, -} -EOF diff --git a/neovim_vimscriptonly/nvim/confs/tabline.vim b/neovim_vimscriptonly/nvim/confs/tabline.vim deleted file mode 100644 index 95d3095..0000000 --- a/neovim_vimscriptonly/nvim/confs/tabline.vim +++ /dev/null @@ -1,103 +0,0 @@ -" Close buffer -nnoremap :BufferClose -" Wipeout buffer -" :BufferWipeout -" Close commands -" :BufferCloseAllButCurrent -" :BufferCloseBuffersRight -nnoremap mymap :lua require"bufferline".go_to_buffer(num) - -nnoremap [b :BufferLineCycleNext -nnoremap b] :BufferLineCyclePrev - -nnoremap [n :BufferLineMoveNext -nnoremap n] :BufferLineMovePrev - -lua << EOF - -require'bufferline'.setup{ - options = { - buffer_close_icon= '', - modified_icon = '●', - close_icon = '', - left_trunc_marker = '', - right_trunc_marker = '', - max_name_length = 14, - max_prefix_length = 13, - tab_size = 18, - enforce_regular_tabs = true , - view = "multiwindow" , - show_buffer_close_icons = true , - separator_style = "thin" - }, - - highlights = { - background = { - guifg = comment_fg, - guibg = '#282c34' - }, - fill = { - guifg = comment_fg, - guibg = '#282c34' - }, - buffer_selected = { - guifg = normal_fg, - guibg = '#3A3E44', - gui = "bold" - }, - separator_visible = { - guifg = '#282c34' , - guibg = '#282c34' - }, - separator_selected = { - guifg = '#282c34' , - guibg = '#282c34' - }, - separator = { - guifg = '#282c34' , - guibg = '#282c34' - }, - indicator_selected = { - guifg = '#282c34' , - guibg = '#282c34' - }, - modified_selected = { - guifg = string_fg, - guibg = '#3A3E44' - } - }; -} - - - -require('gitsigns').setup { - signs = { - add = {hl = 'DiffAdd' , text = '▌', numhl='GitSignsAddNr'}, - change = {hl = 'DiffChange', text = '▌', numhl='GitSignsChangeNr'}, - delete = {hl = 'DiffDelete', text = '_', numhl='GitSignsDeleteNr'}, - topdelete = {hl = 'DiffDelete', text = '‾', numhl='GitSignsDeleteNr'}, - changedelete = {hl = 'DiffChange', text = '~', numhl='GitSignsChangeNr'}, - }, - numhl = false, - keymaps = { - -- Default keymap options - noremap = true, - buffer = true, - - ['n ]c'] = { expr = true, "&diff ? ']c' : 'lua require\"gitsigns\".next_hunk()'"}, - ['n [c'] = { expr = true, "&diff ? '[c' : 'lua require\"gitsigns\".prev_hunk()'"}, - - ['n hs'] = 'lua require"gitsigns".stage_hunk()', - ['n hu'] = 'lua require"gitsigns".undo_stage_hunk()', - ['n hr'] = 'lua require"gitsigns".reset_hunk()', - ['n hp'] = 'lua require"gitsigns".preview_hunk()', - ['n hb'] = 'lua require"gitsigns".blame_line()', - }, - watch_index = { - interval = 100 - }, - sign_priority = 5, - status_formatter = nil, -- Use default -} - -EOF diff --git a/neovim_vimscriptonly/nvim/confs/telescope.vim b/neovim_vimscriptonly/nvim/confs/telescope.vim deleted file mode 100644 index 21bba1b..0000000 --- a/neovim_vimscriptonly/nvim/confs/telescope.vim +++ /dev/null @@ -1,80 +0,0 @@ -lua <ff lua require('telescope.builtin').find_files() -"nnoremap fg lua require('telescope.builtin').live_grep() -nnoremap fg lua require('telescope').extensions.media_files.media_files() -nnoremap fb lua require('telescope.builtin').buffers() -nnoremap fh lua require('telescope.builtin').help_tags() - -highlight TelescopeBorder guifg=#3e4451 -highlight TelescopePromptBorder guifg=#3e4451 -highlight TelescopeResultsBorder guifg=#3e4451 -highlight TelescopePreviewBorder guifg=#525865 diff --git a/neovim_vimscriptonly/nvim/confs/treesitter.vim b/neovim_vimscriptonly/nvim/confs/treesitter.vim deleted file mode 100644 index 85afa48..0000000 --- a/neovim_vimscriptonly/nvim/confs/treesitter.vim +++ /dev/null @@ -1,16 +0,0 @@ -lua < Date: Sat, 13 Mar 2021 06:59:04 +0530 Subject: [PATCH 0030/1541] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ed40de1..fbf5304 100644 --- a/README.md +++ b/README.md @@ -17,4 +17,5 @@ nvim-web-devicons , lua fork of vim devicons which lets me change icons of filet - gitsigns.nvim , to show git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) - nvim-bufferline.lua , as a top bufferline like thing which lets me switch tabs , close them. - nvim-treesitter' , better syntax highlighting for programming languages. +- nvim-lspkind , for lil icons on completion items From 062acfe07a5a20800c0ef30e73ac7cebfc1f8ba3 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 07:40:46 +0530 Subject: [PATCH 0031/1541] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fbf5304..a8b810c 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,14 @@ some cool lua plugins I use nvim-web-devicons , lua fork of vim devicons which lets me change icons of filetypes +- nvim-lspkind , for lil icons on completion items + + - nvim-tree.lua , a fast file tree - galaxyline , as statusline - gitsigns.nvim , to show git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) - nvim-bufferline.lua , as a top bufferline like thing which lets me switch tabs , close them. - nvim-treesitter' , better syntax highlighting for programming languages. -- nvim-lspkind , for lil icons on completion items + +- nvim-webdevicons , for changing icons From 92722f00fda4572c1b8c7ed8969432363c86a6d3 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 07:41:44 +0530 Subject: [PATCH 0032/1541] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a8b810c..35eafbd 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,16 @@ slowly migrating to init.lua and still WIP! so use config from neovim_vimscripto some cool lua plugins I use -nvim-web-devicons , lua fork of vim devicons which lets me change icons of filetypes + - nvim-lspkind , for lil icons on completion items +- nvim-web-devicons , lua fork of vim devicons which lets me change icons of filetypes + + + + - nvim-tree.lua , a fast file tree - galaxyline , as statusline - gitsigns.nvim , to show git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) From 275e9209f08d02e334d51761278f7ad48bfd9682 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 07:42:15 +0530 Subject: [PATCH 0033/1541] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 35eafbd..f920a77 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ some cool lua plugins I use - nvim-tree.lua , a fast file tree +- + - galaxyline , as statusline - gitsigns.nvim , to show git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) - nvim-bufferline.lua , as a top bufferline like thing which lets me switch tabs , close them. From c21b1598c7ce5deb8a8f116c10800d62aa168057 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 07:44:02 +0530 Subject: [PATCH 0034/1541] Update README.md --- README.md | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index f920a77..19bf2fa 100644 --- a/README.md +++ b/README.md @@ -13,20 +13,15 @@ some cool lua plugins I use - nvim-lspkind , for lil icons on completion items - - -- nvim-web-devicons , lua fork of vim devicons which lets me change icons of filetypes - - - - +- - nvim-tree.lua , a fast file tree - - -- galaxyline , as statusline +- galaxyline , a statusline plugin +- - gitsigns.nvim , to show git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) - nvim-bufferline.lua , as a top bufferline like thing which lets me switch tabs , close them. -- nvim-treesitter' , better syntax highlighting for programming languages. - -- nvim-webdevicons , for changing icons +- +- nvim-web-devicons , lua fork of vim devicons which lets me change icons of filetypes +- +- nvim-treesitter' , better syntax highlighting for programming languages. From 1e957c89a4c4ca0ec381ff0e90df400913935797 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 07:46:14 +0530 Subject: [PATCH 0035/1541] Update README.md --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 19bf2fa..ba1c427 100644 --- a/README.md +++ b/README.md @@ -13,15 +13,14 @@ some cool lua plugins I use - nvim-lspkind , for lil icons on completion items -- + - nvim-tree.lua , a fast file tree -- + - galaxyline , a statusline plugin -- + - gitsigns.nvim , to show git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) - nvim-bufferline.lua , as a top bufferline like thing which lets me switch tabs , close them. -- + - nvim-web-devicons , lua fork of vim devicons which lets me change icons of filetypes -- - + - nvim-treesitter' , better syntax highlighting for programming languages. From 77d6602ae185e324296c0323796965782c95fe26 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 07:48:06 +0530 Subject: [PATCH 0036/1541] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index ba1c427..e3edb09 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,19 @@ some cool lua plugins I use - nvim-lspkind , for lil icons on completion items + - nvim-tree.lua , a fast file tree + - galaxyline , a statusline plugin + - gitsigns.nvim , to show git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) + - nvim-bufferline.lua , as a top bufferline like thing which lets me switch tabs , close them. + - nvim-web-devicons , lua fork of vim devicons which lets me change icons of filetypes + - nvim-treesitter' , better syntax highlighting for programming languages. From 964adb970252e44554e1b145d4d36e0de96e6d48 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 07:50:53 +0530 Subject: [PATCH 0037/1541] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index e3edb09..31f0ca6 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,7 @@ slowly migrating to init.lua and still WIP! so use config from neovim_vimscripto -some cool lua plugins I use - - +# Some cool lua plugins I use - nvim-lspkind , for lil icons on completion items From 05959bfafc4e77f3e3608e154d3a7a8debe791e1 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 07:53:16 +0530 Subject: [PATCH 0038/1541] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 31f0ca6..6585912 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ slowly migrating to init.lua and still WIP! so use config from neovim_vimscripto -# Some cool lua plugins I use +# Some VERY COOL lua plugins I use -- nvim-lspkind , for lil icons on completion items +- nvim-lspkind , for showing lil icons/pictograms on completion items - nvim-tree.lua , a fast file tree @@ -21,7 +21,7 @@ slowly migrating to init.lua and still WIP! so use config from neovim_vimscripto - gitsigns.nvim , to show git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) -- nvim-bufferline.lua , as a top bufferline like thing which lets me switch tabs , close them. +- nvim-bufferline.lua , as a top bufferline like thing which lets me handle tabs like switching , closing tabs. - nvim-web-devicons , lua fork of vim devicons which lets me change icons of filetypes From 89d7172bacb7f2c9d5ebb5bb2a92b4b40af2f810 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 08:18:23 +0530 Subject: [PATCH 0039/1541] indentline working now! --- init.lua | 2 ++ lua/pluginsList/lua.lua | 2 +- lua/utils/lua.lua | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 3767251..621d5f9 100644 --- a/init.lua +++ b/init.lua @@ -26,6 +26,8 @@ cmd "syntax enable" cmd "syntax on" g.auto_save = 1 +g.indentLine_enabled = 1 +g.indentLine_char_list = {'▏'} g.mapleader = " " diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 0deb588..1e3daa3 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -14,7 +14,7 @@ return require("packer").startup( use {"nvim-treesitter/nvim-treesitter"} use {"chriskempson/base16-vim"} use {"norcalli/nvim-colorizer.lua"} - -- use { 'Yggdroot/indentLine'} + use { 'Yggdroot/indentLine'} use {"ryanoasis/vim-devicons"} use {"sbdchd/neoformat"} use {"neovim/nvim-lspconfig"} diff --git a/lua/utils/lua.lua b/lua/utils/lua.lua index 75db6fd..34ae770 100644 --- a/lua/utils/lua.lua +++ b/lua/utils/lua.lua @@ -21,6 +21,9 @@ opt("w", "signcolumn", "yes") opt("o", "cmdheight", 1) opt("o", "updatetime", 250) opt("o", "clipboard", "unnamedplus") +opt("b", "expandtab", true ) +opt("b", "shiftwidth", 2 ) + local M = {} From b62638f04a70bc5bb3640d4cbcb8eed91c3fcf04 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 08:22:43 +0530 Subject: [PATCH 0040/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6585912..0289dcb 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ slowly migrating to init.lua and still WIP! so use config from neovim_vimscripto # screenshots - + # Some VERY COOL lua plugins I use From 684c75bafa80fca6db4b0f2da4ab709cceb85989 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 08:35:22 +0530 Subject: [PATCH 0041/1541] Update README.md --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0289dcb..38ecde0 100644 --- a/README.md +++ b/README.md @@ -27,4 +27,15 @@ slowly migrating to init.lua and still WIP! so use config from neovim_vimscripto - nvim-web-devicons , lua fork of vim devicons which lets me change icons of filetypes -- nvim-treesitter' , better syntax highlighting for programming languages. +- nvim-treesitter' , better syntax highlighting for programming languages ( my config just has html,css,js support for now ). + +# clone my setup + +- install neovim-nightly , also use a nerdfont on your terminal. +- install packer.nvim +` git clone https://github.com/wbthomason/packer.nvim\ + ~/.local/share/nvim/site/pack/packer/start/packer.nvim` + + - open neovim and install all plugins , :PackerInstall + - install language servers and prettier ( for autocompletion etc and code formatting ) + `sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier` From 49d061602155476520c37144e8b2e433c5adbba3 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 08:36:10 +0530 Subject: [PATCH 0042/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 38ecde0..4364a7f 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,6 @@ slowly migrating to init.lua and still WIP! so use config from neovim_vimscripto ` git clone https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim` - - open neovim and install all plugins , :PackerInstall + - open neovim and install all plugins , :PackerInstall and :TSUpdate - install language servers and prettier ( for autocompletion etc and code formatting ) `sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier` From 4664414d60e171a65e4d9e2818086cbcd76244f0 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 08:36:52 +0530 Subject: [PATCH 0043/1541] Update README.md --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4364a7f..49e4fb2 100644 --- a/README.md +++ b/README.md @@ -31,11 +31,13 @@ slowly migrating to init.lua and still WIP! so use config from neovim_vimscripto # clone my setup -- install neovim-nightly , also use a nerdfont on your terminal. -- install packer.nvim +- Install neovim-nightly , also use a nerdfont on your terminal. +- Install packer.nvim + ` git clone https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim` - - open neovim and install all plugins , :PackerInstall and :TSUpdate - - install language servers and prettier ( for autocompletion etc and code formatting ) + - Open neovim and install all plugins , :PackerInstall and :TSUpdate + - Install language servers and prettier ( for autocompletion etc and code formatting ) + `sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier` From dc04a314e667ff1eff2f9e19e0f77749e8d239e2 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 08:37:27 +0530 Subject: [PATCH 0044/1541] Update README.md --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 49e4fb2..637e22d 100644 --- a/README.md +++ b/README.md @@ -34,10 +34,14 @@ slowly migrating to init.lua and still WIP! so use config from neovim_vimscripto - Install neovim-nightly , also use a nerdfont on your terminal. - Install packer.nvim -` git clone https://github.com/wbthomason/packer.nvim\ - ~/.local/share/nvim/site/pack/packer/start/packer.nvim` +` +git clone https://github.com/wbthomason/packer.nvim\ + ~/.local/share/nvim/site/pack/packer/start/packer.nvim + ` - Open neovim and install all plugins , :PackerInstall and :TSUpdate - Install language servers and prettier ( for autocompletion etc and code formatting ) - `sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier` + ` + sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier + ` From cc7143e76e45477a6e63bd31b233b0ab79324fb6 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 08:38:59 +0530 Subject: [PATCH 0045/1541] Update README.md --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 637e22d..79ed230 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,3 @@ -# neovim-dots -my neovim dotfiles - -slowly migrating to init.lua and still WIP! so use config from neovim_vimscriptonly/nvim folder only for now. - # screenshots From a83f1196bcb894bfccc025fb0517caa53fbc1f41 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 08:40:15 +0530 Subject: [PATCH 0046/1541] fix typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 79ed230..4d15e73 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# screenshots +# Screenshots @@ -24,7 +24,7 @@ - nvim-treesitter' , better syntax highlighting for programming languages ( my config just has html,css,js support for now ). -# clone my setup +# Clone my setup - Install neovim-nightly , also use a nerdfont on your terminal. - Install packer.nvim From 70d44b7830d9f895ae0ec99df487548d26beaf46 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 13:20:11 +0530 Subject: [PATCH 0047/1541] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4d15e73..506bc01 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +The config is complete but still WIP as Im new to lua and slowly learning stuffs , so I'll keep adding new features like snippets etc and clean the config! + # Screenshots From e525d4796b4b37d90a19013cb3533e2952268825 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 13:34:10 +0530 Subject: [PATCH 0048/1541] telescope nvim screenshot --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 506bc01..65c8835 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,11 @@ The config is complete but still WIP as Im new to lua and slowly learning stuffs - nvim-tree.lua , a fast file tree +- telescope-nvim , a fuzzy file finder , picker , sorter , previewer and much more! + + + + - galaxyline , a statusline plugin @@ -39,6 +44,7 @@ git clone https://github.com/wbthomason/packer.nvim\ - Open neovim and install all plugins , :PackerInstall and :TSUpdate - Install language servers and prettier ( for autocompletion etc and code formatting ) - ` + `Install nodejs . + sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier ` From 46d1b07cee5839f4a69494086680c5db1229fc87 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 13:47:24 +0530 Subject: [PATCH 0049/1541] Update README.md --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 65c8835..b1caa41 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -The config is complete but still WIP as Im new to lua and slowly learning stuffs , so I'll keep adding new features like snippets etc and clean the config! +The config is complete but still WIP as Im new to lua and slowly learning vim stuffs , so I'll keep adding new features like snippets etc and clean the config! # Screenshots @@ -31,6 +31,13 @@ The config is complete but still WIP as Im new to lua and slowly learning stuffs - nvim-treesitter' , better syntax highlighting for programming languages ( my config just has html,css,js support for now ). + without Treesitter + + + with Treesitter + + + # Clone my setup - Install neovim-nightly , also use a nerdfont on your terminal. From b8c7e2f9f01fae2dcfb86940b62e6f6806e945ca Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 13:48:50 +0530 Subject: [PATCH 0050/1541] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b1caa41..d24cb85 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,9 @@ git clone https://github.com/wbthomason/packer.nvim\ ` - Open neovim and install all plugins , :PackerInstall and :TSUpdate - - Install language servers and prettier ( for autocompletion etc and code formatting ) - - `Install nodejs . + - Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) + ` sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier - ` + + ` From 6d31492c2b1ed124d80bb130f0911e4ef3e3c1a6 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 13:49:42 +0530 Subject: [PATCH 0051/1541] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d24cb85..4bdd9bd 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ The config is complete but still WIP as Im new to lua and slowly learning vim st - nvim-web-devicons , lua fork of vim devicons which lets me change icons of filetypes -- nvim-treesitter' , better syntax highlighting for programming languages ( my config just has html,css,js support for now ). +- nvim-treesitter , better syntax highlighting for programming languages ( my config just has html,css,js support for now ). without Treesitter @@ -50,8 +50,8 @@ git clone https://github.com/wbthomason/packer.nvim\ - Open neovim and install all plugins , :PackerInstall and :TSUpdate - Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) - ` - +` sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier - ` + ` + From ed4c3f572cfb4f4dad7bbe0c05c248739466f1e6 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 13:50:13 +0530 Subject: [PATCH 0052/1541] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4bdd9bd..30ae9c8 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ git clone https://github.com/wbthomason/packer.nvim\ - Open neovim and install all plugins , :PackerInstall and :TSUpdate - Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) + ` sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier From 09945f40140fc068a6c2adc2a061990ffec65c44 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 13:50:37 +0530 Subject: [PATCH 0053/1541] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 30ae9c8..0bb3799 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,8 @@ git clone https://github.com/wbthomason/packer.nvim\ - Open neovim and install all plugins , :PackerInstall and :TSUpdate - Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) + ` test ` + ` sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier From db192bdfe3a0cea2d88eab068352b66568578696 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 13:50:56 +0530 Subject: [PATCH 0054/1541] Update README.md --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0bb3799..83ec3dc 100644 --- a/README.md +++ b/README.md @@ -51,10 +51,8 @@ git clone https://github.com/wbthomason/packer.nvim\ - Open neovim and install all plugins , :PackerInstall and :TSUpdate - Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) - ` test ` + ` sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier + ` -` - sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier - ` From c6d8f2e2e91daea82d30cf8c16f97732950c0ebe Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 16:12:51 +0530 Subject: [PATCH 0056/1541] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 83ec3dc..b785293 100644 --- a/README.md +++ b/README.md @@ -54,5 +54,6 @@ git clone https://github.com/wbthomason/packer.nvim\ ` sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier ` + To setup any language server , follow this guide https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md . For example if I needed clangd's lsp server , I'd install it first and add its setup line ( require'lspconfig'.clangd.setup{} ) in /lua/lsp_config/lua.lua file . - +![image](https://user-images.githubusercontent.com/59060246/111027526-d43f5780-8416-11eb-87d2-6f85f5f2be6f.png) From 1b175467c78886a9159a4b5c98ec7c85a4c9822d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 16:13:44 +0530 Subject: [PATCH 0057/1541] Update README.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b785293..e27e4ad 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,9 @@ git clone https://github.com/wbthomason/packer.nvim\ ` sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier ` - To setup any language server , follow this guide https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md . For example if I needed clangd's lsp server , I'd install it first and add its setup line ( require'lspconfig'.clangd.setup{} ) in /lua/lsp_config/lua.lua file . + To setup any language server , follow this guide https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md . For example if I needed clangd's lsp server + ![image](https://user-images.githubusercontent.com/59060246/111027526-d43f5780-8416-11eb-87d2-6f85f5f2be6f.png) . + + + I'd install it first and add its setup line ( require'lspconfig'.clangd.setup{} ) in /lua/lsp_config/lua.lua file . -![image](https://user-images.githubusercontent.com/59060246/111027526-d43f5780-8416-11eb-87d2-6f85f5f2be6f.png) From 04621ae041d674b5c418186018270e9176996e64 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 16:14:42 +0530 Subject: [PATCH 0058/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e27e4ad..408dab1 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ git clone https://github.com/wbthomason/packer.nvim\ ` sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier ` - To setup any language server , follow this guide https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md . For example if I needed clangd's lsp server + To setup any language server , follow this guide https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md and search up the needed LSP. For example if I needed clangd's lsp server ![image](https://user-images.githubusercontent.com/59060246/111027526-d43f5780-8416-11eb-87d2-6f85f5f2be6f.png) . From b87116266454984c182edf5bf161cb2420eafb7a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 16:21:52 +0530 Subject: [PATCH 0059/1541] clean up --- lua/bufferline/lua.lua | 1 + lua/coc/lua.lua | 0 lua/lsp_config/lua.lua | 22 ---------------------- lua/nvim-compe/lua.lua | 1 + lua/nvim-lspconfig/lua.lua | 1 + lua/telescope-nvim/lua.lua | 2 ++ lua/utils/lua.lua | 5 ++++- lua/web-devicons/gitsigns | 0 8 files changed, 9 insertions(+), 23 deletions(-) delete mode 100644 lua/coc/lua.lua delete mode 100644 lua/lsp_config/lua.lua delete mode 100644 lua/web-devicons/gitsigns diff --git a/lua/bufferline/lua.lua b/lua/bufferline/lua.lua index 6f42f00..3f090a1 100644 --- a/lua/bufferline/lua.lua +++ b/lua/bufferline/lua.lua @@ -1,5 +1,6 @@ vim.o.termguicolors = true +-- colors for active , inactive buffer tabs require "bufferline".setup { options = { buffer_close_icon = "", diff --git a/lua/coc/lua.lua b/lua/coc/lua.lua deleted file mode 100644 index e69de29..0000000 diff --git a/lua/lsp_config/lua.lua b/lua/lsp_config/lua.lua deleted file mode 100644 index 7d52eb9..0000000 --- a/lua/lsp_config/lua.lua +++ /dev/null @@ -1,22 +0,0 @@ -vim.cmd [[ packadd nvim-lspconfig ]] -vim.cmd [[ packadd completion-nvim ]] - --- Enable(broadcasting) snippet capability for completion -local html_snippet_capabilities = vim.lsp.protocol.make_client_capabilities() -html_snippet_capabilities.textDocument.completion.completionItem.snippetSupport = true - -require "lspconfig".html.setup { - on_attach = lsp_on_attach, - capabilities = html_snippet_capabilities, - cmd = {"html-languageserver", "--stdio"}, - filetypes = {"html"}, - init_opitons = { - configurationSection = {"html", "css", "javascript"}, - embeddedLanguages = { - css = true, - javascript = true - } - } -} - -vim.g.completion_enable_snippet = "UltiSnips" diff --git a/lua/nvim-compe/lua.lua b/lua/nvim-compe/lua.lua index a2320b1..743bc32 100644 --- a/lua/nvim-compe/lua.lua +++ b/lua/nvim-compe/lua.lua @@ -43,6 +43,7 @@ _G.s_tab_complete = function() end end +-- mappings vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", {expr = true}) vim.api.nvim_set_keymap("i", "", "v:lua.s_tab_complete()", {expr = true}) vim.api.nvim_set_keymap("s", "", "v:lua.s_tab_complete()", {expr = true}) diff --git a/lua/nvim-lspconfig/lua.lua b/lua/nvim-lspconfig/lua.lua index 2a2ec79..c3aba0d 100644 --- a/lua/nvim-lspconfig/lua.lua +++ b/lua/nvim-lspconfig/lua.lua @@ -29,6 +29,7 @@ map("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) map("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) map("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) +-- lsp for html , css and js/ts require "lspconfig".tsserver.setup {} require "lspconfig".cssls.setup {} require "lspconfig".html.setup {} diff --git a/lua/telescope-nvim/lua.lua b/lua/telescope-nvim/lua.lua index d001c5f..df9dca1 100644 --- a/lua/telescope-nvim/lua.lua +++ b/lua/telescope-nvim/lua.lua @@ -59,6 +59,8 @@ require("telescope").load_extension("media_files") local opt = {noremap = true, silent = true} vim.g.mapleader = " " + +-- mappings vim.api.nvim_set_keymap("n", "ff", [[lua require('telescope.builtin').find_files()]], opt) vim.api.nvim_set_keymap( "n", diff --git a/lua/utils/lua.lua b/lua/utils/lua.lua index 34ae770..9286b5f 100644 --- a/lua/utils/lua.lua +++ b/lua/utils/lua.lua @@ -19,8 +19,11 @@ opt("o", "mouse", "a") opt("w", "signcolumn", "yes") opt("o", "cmdheight", 1) -opt("o", "updatetime", 250) + +opt("o", "updatetime", 250) -- update interval for gitsigns opt("o", "clipboard", "unnamedplus") + +-- for indenline opt("b", "expandtab", true ) opt("b", "shiftwidth", 2 ) diff --git a/lua/web-devicons/gitsigns b/lua/web-devicons/gitsigns deleted file mode 100644 index e69de29..0000000 From 05ffa3060299db9fdb6f95ae86182db35ceedd28 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 16:22:55 +0530 Subject: [PATCH 0060/1541] typo fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 408dab1..96d0dc0 100644 --- a/README.md +++ b/README.md @@ -58,5 +58,5 @@ git clone https://github.com/wbthomason/packer.nvim\ ![image](https://user-images.githubusercontent.com/59060246/111027526-d43f5780-8416-11eb-87d2-6f85f5f2be6f.png) . - I'd install it first and add its setup line ( require'lspconfig'.clangd.setup{} ) in /lua/lsp_config/lua.lua file . + I'd install it first and add its setup line ( require'lspconfig'.clangd.setup{} ) in /lua/nvim-lspconfig/lua.lua file . From 9c950e25838819fe13e5dbe9f70ac38e2154ddff Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 16:32:13 +0530 Subject: [PATCH 0061/1541] init.lua guides --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 96d0dc0..43fd4fd 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,11 @@ The config is complete but still WIP as Im new to lua and slowly learning vim st with Treesitter +# Some guides to migrate to init.lua! +https://github.com/nanotee/nvim-lua-guide +https://alpha2phi.medium.com/neovim-init-lua-e80f4f136030 +https://oroques.dev/notes/neovim-init/ +https://icyphox.sh/blog/nvim-lua/ # Clone my setup From 928a44d5e0f42ec6c5704f10c0c96a991c3861d1 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 16:33:42 +0530 Subject: [PATCH 0062/1541] Update README.md --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 43fd4fd..b2f68f9 100644 --- a/README.md +++ b/README.md @@ -38,10 +38,15 @@ The config is complete but still WIP as Im new to lua and slowly learning vim st # Some guides to migrate to init.lua! -https://github.com/nanotee/nvim-lua-guide -https://alpha2phi.medium.com/neovim-init-lua-e80f4f136030 -https://oroques.dev/notes/neovim-init/ -https://icyphox.sh/blog/nvim-lua/ + +- https://github.com/nanotee/nvim-lua-guide + +- https://alpha2phi.medium.com/neovim-init-lua-e80f4f136030 + +- https://oroques.dev/notes/neovim-init/ + +- https://icyphox.sh/blog/nvim-lua/ + # Clone my setup From ec9626f3d57cf5ea78bdb54c499615e4a2b84c25 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 16:37:43 +0530 Subject: [PATCH 0063/1541] Update README.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b2f68f9..9c0c844 100644 --- a/README.md +++ b/README.md @@ -64,8 +64,11 @@ git clone https://github.com/wbthomason/packer.nvim\ ` sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier ` - To setup any language server , follow this guide https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md and search up the needed LSP. For example if I needed clangd's lsp server - ![image](https://user-images.githubusercontent.com/59060246/111027526-d43f5780-8416-11eb-87d2-6f85f5f2be6f.png) . + To setup any language server , follow this guide https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md and search up the needed LSP. For example if I needed clangd's lsp server : + + + + I'd install it first and add its setup line ( require'lspconfig'.clangd.setup{} ) in /lua/nvim-lspconfig/lua.lua file . From 89a772b3bd5bf79aae92f31511f637894512622d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 16:38:14 +0530 Subject: [PATCH 0064/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9c0c844..15f4cdc 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ git clone https://github.com/wbthomason/packer.nvim\ To setup any language server , follow this guide https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md and search up the needed LSP. For example if I needed clangd's lsp server : - + From 9c7e3ba577fcf26e4e3cefe0c3066f918a9470f6 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 16:40:23 +0530 Subject: [PATCH 0065/1541] image borders --- README.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 15f4cdc..ba4def8 100644 --- a/README.md +++ b/README.md @@ -2,40 +2,40 @@ The config is complete but still WIP as Im new to lua and slowly learning vim st # Screenshots - - + + # Some VERY COOL lua plugins I use - nvim-lspkind , for showing lil icons/pictograms on completion items - + - nvim-tree.lua , a fast file tree - + - telescope-nvim , a fuzzy file finder , picker , sorter , previewer and much more! - - + + - galaxyline , a statusline plugin - + - gitsigns.nvim , to show git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) - nvim-bufferline.lua , as a top bufferline like thing which lets me handle tabs like switching , closing tabs. - + - nvim-web-devicons , lua fork of vim devicons which lets me change icons of filetypes - + - nvim-treesitter , better syntax highlighting for programming languages ( my config just has html,css,js support for now ). without Treesitter - + with Treesitter - + # Some guides to migrate to init.lua! @@ -70,6 +70,7 @@ git clone https://github.com/wbthomason/packer.nvim\ + + I'd install it first and add its setup line ( require'lspconfig'.clangd.setup{} ) in /lua/nvim-lspconfig/lua.lua file . - From 738f5d4e565f24211cc998d51cdfd8bbcc0848f9 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 18:37:38 +0530 Subject: [PATCH 0066/1541] Update README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ba4def8..0519c8f 100644 --- a/README.md +++ b/README.md @@ -53,16 +53,17 @@ The config is complete but still WIP as Im new to lua and slowly learning vim st - Install neovim-nightly , also use a nerdfont on your terminal. - Install packer.nvim -` +```shell git clone https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim - ` +``` - Open neovim and install all plugins , :PackerInstall and :TSUpdate - Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) - ` sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier - ` + ``` + sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier + ``` To setup any language server , follow this guide https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md and search up the needed LSP. For example if I needed clangd's lsp server : From bdc8e4d77be081058c65d8361591b75816d91074 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 13 Mar 2021 18:40:48 +0530 Subject: [PATCH 0068/1541] minor changes --- init.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/init.lua b/init.lua index 621d5f9..05d783b 100644 --- a/init.lua +++ b/init.lua @@ -11,7 +11,6 @@ require("telescope-nvim.lua") -- lsp require("nvim-lspconfig.lua") require("nvim-compe.lua") -require("coc.lua") require("gitsigns.lua") From 3157638e48f12bf3c35c647835f3dedccc0124da Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 14 Mar 2021 09:18:57 +0530 Subject: [PATCH 0069/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0519c8f..f83c9d5 100644 --- a/README.md +++ b/README.md @@ -74,4 +74,4 @@ git clone https://github.com/wbthomason/packer.nvim\ - I'd install it first and add its setup line ( require'lspconfig'.clangd.setup{} ) in /lua/nvim-lspconfig/lua.lua file . + I'd install it first and add its setup line ( require'lspconfig'.clangd.setup{} ) in /lua/nvim-lspconfig/lua.lua file . I will organise the config slowly and soon add a list of important mappings used in my config , on this readme so it might get easy for some :) From 011960afe630ece67e817130dedca76e4847b10e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 14 Mar 2021 09:54:48 +0530 Subject: [PATCH 0070/1541] open terminals vertically/horizontally --- init.lua | 1 - lua/mappings/lua.lua | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 621d5f9..05d783b 100644 --- a/init.lua +++ b/init.lua @@ -11,7 +11,6 @@ require("telescope-nvim.lua") -- lsp require("nvim-lspconfig.lua") require("nvim-compe.lua") -require("coc.lua") require("gitsigns.lua") diff --git a/lua/mappings/lua.lua b/lua/mappings/lua.lua index 5caa8cd..da92370 100644 --- a/lua/mappings/lua.lua +++ b/lua/mappings/lua.lua @@ -8,3 +8,7 @@ end -- keybind list map("", "c", '"+y') + +-- open terminals +map("n", "" , [[ vnew term://bash]] , opt) -- split term vertically , over the right +map("n", "" , [[ split term://bash | resize 10 ]] , opt) -- split term vertically , over the right From cb7155fc745aadc333d08387e890376791d6a357 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 14 Mar 2021 12:15:58 +0530 Subject: [PATCH 0071/1541] packer.nvim errors --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index f83c9d5..72ec71d 100644 --- a/README.md +++ b/README.md @@ -75,3 +75,12 @@ git clone https://github.com/wbthomason/packer.nvim\ I'd install it first and add its setup line ( require'lspconfig'.clangd.setup{} ) in /lua/nvim-lspconfig/lua.lua file . I will organise the config slowly and soon add a list of important mappings used in my config , on this readme so it might get easy for some :) + + # Troubleshooting + + ![image](https://user-images.githubusercontent.com/59060246/111059898-f096cf00-84be-11eb-977a-f91d622ee5b9.png) + +if you get any errors with packer.nvim , then remove the ~/.config/nvim/plugin/packer_nvim.vim file since it just has file paths for my system +and re-install packer.nvim + + From a1f3fb64a8155b8f420946bbbe48544ba6c5976e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 14 Mar 2021 16:49:29 +0530 Subject: [PATCH 0072/1541] minor changes --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 72ec71d..ed00ac0 100644 --- a/README.md +++ b/README.md @@ -57,10 +57,11 @@ The config is complete but still WIP as Im new to lua and slowly learning vim st git clone https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim ``` + - Open neovim and install all plugins , :PackerInstall and :TSUpdate - Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) - + - copy all config files in from this repo except ( plugin folder ) ``` sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier ``` From 92207b4495e92c6e78ab6f530094bd18c48aad8a Mon Sep 17 00:00:00 2001 From: Alok <73450969+alok8bb@users.noreply.github.com> Date: Sun, 14 Mar 2021 22:18:48 +0530 Subject: [PATCH 0073/1541] Update README.md This is how I would like it to be ;) Change things you don't like (like those `-` on headers) --- README.md | 64 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index ed00ac0..086acbd 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,56 @@ -The config is complete but still WIP as Im new to lua and slowly learning vim stuffs , so I'll keep adding new features like snippets etc and clean the config! -# Screenshots +The config is complete but still work in progress as I am new to lua and slowly learning vim stuffs, so I'll keep adding new features like snippets etc and clean the config! - - +# Screenshots - -# Some VERY COOL lua plugins I use +
+
-- nvim-lspkind , for showing lil icons/pictograms on completion items - +# Cool Plugins - + +#### lspkind-nvim +This tiny plugin adds vscode-like pictograms to neovim built-in lsp: + +
-- nvim-tree.lua , a fast file tree - +#### nvim-tree.lua +A fast and efficient file tree: + +
-- telescope-nvim , a fuzzy file finder , picker , sorter , previewer and much more! +### telescope-nvim - +A fuzzy file finder, picker, sorter, previewer and much more: - +
-- galaxyline , a statusline plugin - +### galaxyline - +A statusline plugin: +
-- gitsigns.nvim , to show git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) +### gitsigns.nvim - +Shows git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) +
-- nvim-bufferline.lua , as a top bufferline like thing which lets me handle tabs like switching , closing tabs. +### nvim-bufferline.lua - +As a top bufferline like thing which lets me handle tabs like switching, closing tabs. +
-- nvim-web-devicons , lua fork of vim devicons which lets me change icons of filetypes - +### nvim-web-devicons - +Lua fork of vim devicons which lets me change icons of filetypes +
-- nvim-treesitter , better syntax highlighting for programming languages ( my config just has html,css,js support for now ). +### nvim-treesitter +Better syntax highlighting for programming languages ( my config just has html,css,js support for now ). - without Treesitter + without Treesitter : - with Treesitter - + with Treesitter : +
-# Some guides to migrate to init.lua! +# Guides to migrate to init.lua - - https://github.com/nanotee/nvim-lua-guide @@ -48,7 +61,7 @@ The config is complete but still WIP as Im new to lua and slowly learning vim st - https://icyphox.sh/blog/nvim-lua/ -# Clone my setup +# Clone my setup - - Install neovim-nightly , also use a nerdfont on your terminal. - Install packer.nvim @@ -77,11 +90,10 @@ git clone https://github.com/wbthomason/packer.nvim\ I'd install it first and add its setup line ( require'lspconfig'.clangd.setup{} ) in /lua/nvim-lspconfig/lua.lua file . I will organise the config slowly and soon add a list of important mappings used in my config , on this readme so it might get easy for some :) - # Troubleshooting + # Troubleshooting - ![image](https://user-images.githubusercontent.com/59060246/111059898-f096cf00-84be-11eb-977a-f91d622ee5b9.png) if you get any errors with packer.nvim , then remove the ~/.config/nvim/plugin/packer_nvim.vim file since it just has file paths for my system -and re-install packer.nvim - +and re-install packer.nvim From c2a44a08364f2b7bd636aed64c1092fab72e6d24 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 15 Mar 2021 15:28:41 +0530 Subject: [PATCH 0074/1541] default mappings --- README.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 086acbd..cbc955b 100644 --- a/README.md +++ b/README.md @@ -71,10 +71,9 @@ git clone https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim ``` - - Open neovim and install all plugins , :PackerInstall and :TSUpdate - Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) - - copy all config files in from this repo except ( plugin folder ) + - copy all config files in from this repo except ( plugin folder as it has config related to my system's username! ) ``` sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier ``` @@ -84,12 +83,27 @@ git clone https://github.com/wbthomason/packer.nvim\ - - - I'd install it first and add its setup line ( require'lspconfig'.clangd.setup{} ) in /lua/nvim-lspconfig/lua.lua file . I will organise the config slowly and soon add a list of important mappings used in my config , on this readme so it might get easy for some :) + # Default Mappings to make stuffs easier! + + space is the leader key + + - Ctrl b Open terminal vertically over right + - Ctrl x Open terminal horizontally below the current window + - Ctrl b toggle neovim tree + - Ctrl a copies everything in the current file + - select any text + y copies the selected text + - leader + f b open all buffers , with telescope + - leader + f p search and preview images with telescope + - leader + f f find files in the current DIR , with telescope + - leader + f o open recently edited files , with telescope + - leader + f f find files in the current DIR , with telescope + - leader + f h opens up a manpage like thing but for all vim related things , with telescope + - leader + f m formats or beautifies the code in current window via neoformat + (currently only html ,css , js can be formatted . To be able to use this keybind you need to install the formatter locally for your language , in my case prettier was required only so I installed it. check this https://github.com/sbdchd/neoformat) + # Troubleshooting - ![image](https://user-images.githubusercontent.com/59060246/111059898-f096cf00-84be-11eb-977a-f91d622ee5b9.png) From 0bd73e59c6e75591c2bfa40f270993a67c52e22b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 15 Mar 2021 16:25:25 +0530 Subject: [PATCH 0075/1541] minor changes --- README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cbc955b..efc6cc5 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,20 @@ -The config is complete but still work in progress as I am new to lua and slowly learning vim stuffs, so I'll keep adding new features like snippets etc and clean the config! +The config is complete but still work in progress as I am new to lua and slowly learning vim stuffs. I'll keep adding new features like snippets etc and clean the config , make neovim (cli version) as functional as an IDE while being eyecandy. # Screenshots -

-# Cool Plugins - +# Very Useful lua plugins to used in my config - #### lspkind-nvim -This tiny plugin adds vscode-like pictograms to neovim built-in lsp: +This tiny plugin adds vscode-like pictograms to neovim built-in lsp completion items :
#### nvim-tree.lua -A fast and efficient file tree: +fast file tree :
@@ -25,7 +25,7 @@ A fuzzy file finder, picker, sorter, previewer and much more: ### galaxyline - -A statusline plugin: +fastest statusline plugin I've used so far:
### gitsigns.nvim - @@ -84,7 +84,10 @@ git clone https://github.com/wbthomason/packer.nvim\ - I'd install it first and add its setup line ( require'lspconfig'.clangd.setup{} ) in /lua/nvim-lspconfig/lua.lua file . I will organise the config slowly and soon add a list of important mappings used in my config , on this readme so it might get easy for some :) + I'd install it first and add its setup line : + `` -- in /lua/nvim-lspconfig/lua.lua file + + require'lspconfig'.clangd.setup{} `` # Default Mappings to make stuffs easier! From 7bcc9a0687928e7ea8118fc6cc91c0b5682bd28c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 15 Mar 2021 16:41:56 +0530 Subject: [PATCH 0076/1541] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index efc6cc5..38cf0ec 100644 --- a/README.md +++ b/README.md @@ -70,10 +70,9 @@ Better syntax highlighting for programming languages ( my config just has html,c git clone https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim ``` - + - copy all config files in from this repo except ( plugin folder as it has config related to my system's username! ) - Open neovim and install all plugins , :PackerInstall and :TSUpdate - Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) - - copy all config files in from this repo except ( plugin folder as it has config related to my system's username! ) ``` sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier ``` From 4fd28ae5fc5d1d4e1b1500bba03802881edb7896 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 16 Mar 2021 09:22:39 +0530 Subject: [PATCH 0077/1541] minor changes --- init.lua | 21 +++++++++++---------- lua/telescope-nvim/lua.lua | 1 + 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/init.lua b/init.lua index 05d783b..a6aa6e0 100644 --- a/init.lua +++ b/init.lua @@ -37,20 +37,21 @@ require("mappings.lua") cmd("hi LineNr guibg=NONE") cmd("hi SignColumn guibg=NONE") cmd("hi VertSplit guibg=NONE") -cmd("highlight DiffAdd guifg=#81A1C1 guibg = none") -cmd("highlight DiffChange guifg =#3A3E44 guibg = none") -cmd("highlight DiffModified guifg = #81A1C1 guibg = none") +cmd("hi DiffAdd guifg=#81A1C1 guibg = none") +cmd("hi DiffChange guifg =#3A3E44 guibg = none") +cmd("hi DiffModified guifg = #81A1C1 guibg = none") cmd("hi EndOfBuffer guifg=#282c34") -cmd("highlight TelescopeBorder guifg=#3e4451") -cmd("highlight TelescopePromptBorder guifg=#3e4451") -cmd("highlight TelescopeResultsBorder guifg=#3e4451") -cmd("highlight TelescopePreviewBorder guifg=#525865") -cmd("highlight PmenuSel guibg=#98c379") +cmd("hi TelescopeBorder guifg=#3e4451") +cmd("hi TelescopePromptBorder guifg=#3e4451") +cmd("hi TelescopeResultsBorder guifg=#3e4451") +cmd("hi TelescopePreviewBorder guifg=#525865") +cmd("hi PmenuSel guibg=#98c379") -- tree folder name , icon color -cmd("highlight NvimTreeFolderIcon guifg = #61afef") -cmd("highlight NvimTreeFolderName guifg = #61afef") +cmd("hi NvimTreeFolderIcon guifg = #61afef") +cmd("hi NvimTreeFolderName guifg = #61afef") +cmd("hi NvimTreeIndentMarker guifg=#545862") require("nvim-autopairs").setup() diff --git a/lua/telescope-nvim/lua.lua b/lua/telescope-nvim/lua.lua index df9dca1..00f6ae3 100644 --- a/lua/telescope-nvim/lua.lua +++ b/lua/telescope-nvim/lua.lua @@ -72,4 +72,5 @@ vim.api.nvim_set_keymap("n", "fb", [[lua require('telescope.builtin vim.api.nvim_set_keymap("n", "fh", [[lua require('telescope.builtin').help_tags()]], opt) vim.api.nvim_set_keymap("n", "fo", [[lua require('telescope.builtin').oldfiles()]], opt) vim.api.nvim_set_keymap("n", "fm", [[ Neoformat]], opt) + vim.api.nvim_set_keymap("n", "", [[ %y+]], opt) From 5ef3fa08460392b30fc0934e49aec29b2cf78511 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 16 Mar 2021 09:31:43 +0530 Subject: [PATCH 0078/1541] add icons for xz,zip --- lua/web-devicons/lua.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/web-devicons/lua.lua b/lua/web-devicons/lua.lua index be968a6..5071e2e 100644 --- a/lua/web-devicons/lua.lua +++ b/lua/web-devicons/lua.lua @@ -56,6 +56,16 @@ require "nvim-web-devicons".setup { icon = "", color = "#DE6B74", name = "lock" + }, + zip = { + icon = "", + color = "#EBCB8B", + name = "zip" + }, + xz = { + icon = "", + color = "#EBCB8B", + name = "xz" } } } From d455d4b56c37e5e7660846a0d8db786438c0c88b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 17 Mar 2021 20:07:02 +0530 Subject: [PATCH 0079/1541] autocompletions on enter key (#3) --- lua/nvim-compe/lua.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lua/nvim-compe/lua.lua b/lua/nvim-compe/lua.lua index 743bc32..79bdc8a 100644 --- a/lua/nvim-compe/lua.lua +++ b/lua/nvim-compe/lua.lua @@ -43,7 +43,20 @@ _G.s_tab_complete = function() end end --- mappings +-- mappings + vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", {expr = true}) vim.api.nvim_set_keymap("i", "", "v:lua.s_tab_complete()", {expr = true}) vim.api.nvim_set_keymap("s", "", "v:lua.s_tab_complete()", {expr = true}) + +function _G.completions() + local npairs = require("nvim-autopairs") + if vim.fn.pumvisible() == 1 then + if vim.fn.complete_info()["selected"] ~= -1 then + return vim.fn["compe#confirm"]("") + end + end + return npairs.check_break_line_char() +end + +vim.api.nvim_set_keymap("i", "", "v:lua.completions()", {expr = true}) From be90aba543fecaef477c8ee87e06db1a93dc03ab Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 17 Mar 2021 21:21:02 +0530 Subject: [PATCH 0080/1541] lsp.buf.hover (#3) --- lua/nvim-lspconfig/lua.lua | 45 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/lua/nvim-lspconfig/lua.lua b/lua/nvim-lspconfig/lua.lua index c3aba0d..6042601 100644 --- a/lua/nvim-lspconfig/lua.lua +++ b/lua/nvim-lspconfig/lua.lua @@ -1,33 +1,32 @@ vim.cmd [[packadd nvim-lspconfig]] vim.cmd [[packadd nvim-compe]] -local function map(mode, lhs, rhs, opts) - local options = {noremap = true} - if opts then - options = vim.tbl_extend("force", options, opts) - end - vim.api.nvim_set_keymap(mode, lhs, rhs, options) +local function buf_set_keymap(...) + vim.api.nvim_buf_set_keymap(bufnr, ...) +end +local function buf_set_option(...) + vim.api.nvim_buf_set_option(bufnr, ...) end -local opts = {noremap = true, silent = true} +buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") -- Mappings. -map("n", "gd", "lua vim.lsp.buf.definition()", opts) -map("n", "gD", "lua vim.lsp.buf.declaration()", opts) -map("n", "gr", "lua vim.lsp.buf.references()", opts) - -map("n", "K", "lua vim.lsp.buf.hover()", opts) -map("n", "gi", "lua vim.lsp.buf.implementation()", opts) -map("n", "", "lua vim.lsp.buf.signature_help()", opts) -map("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) -map("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) -map("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) -map("n", "D", "lua vim.lsp.buf.type_definition()", opts) -map("n", "rn", "lua vim.lsp.buf.rename()", opts) -map("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) -map("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) -map("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) -map("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) +local opts = {noremap = true, silent = true} +buf_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) +buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) +buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()", opts) +buf_set_keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) +buf_set_keymap("n", "", "lua vim.lsp.buf.signature_help()", opts) +buf_set_keymap("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) +buf_set_keymap("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) +buf_set_keymap("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) +buf_set_keymap("n", "D", "lua vim.lsp.buf.type_definition()", opts) +buf_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", opts) +buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()", opts) +buf_set_keymap("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) +buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) +buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) +buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) -- lsp for html , css and js/ts require "lspconfig".tsserver.setup {} From 28660173efb1216e00f6585c54ba185a5a62ad34 Mon Sep 17 00:00:00 2001 From: Akshay Rajput Date: Thu, 18 Mar 2021 10:58:07 +0530 Subject: [PATCH 0081/1541] Typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 38cf0ec..455892a 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ git clone https://github.com/wbthomason/packer.nvim\ - Ctrl b Open terminal vertically over right - Ctrl x Open terminal horizontally below the current window - - Ctrl b toggle neovim tree + - Ctrl n toggle neovim tree - Ctrl a copies everything in the current file - select any text + y copies the selected text - leader + f b open all buffers , with telescope From 68bfc76d0a8fe89b5ba1958c17129a729a2aee05 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 18 Mar 2021 15:33:11 +0530 Subject: [PATCH 0082/1541] typescript icon --- lua/nvimTree/lua.lua | 2 +- lua/web-devicons/lua.lua | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/nvimTree/lua.lua b/lua/nvimTree/lua.lua index 4ad9b2e..4ec583e 100644 --- a/lua/nvimTree/lua.lua +++ b/lua/nvimTree/lua.lua @@ -3,7 +3,7 @@ vim.cmd [[packadd nvim-tree.lua]] vim.o.termguicolors = true vim.g.nvim_tree_side = "left" -vim.g.nvim_tree_width = 24 +vim.g.nvim_tree_width = 25 vim.g.nvim_tree_ignore = {".git", "node_modules", ".cache"} vim.g.nvim_tree_auto_open = 0 vim.g.nvim_tree_auto_close = 0 diff --git a/lua/web-devicons/lua.lua b/lua/web-devicons/lua.lua index 5071e2e..df338fa 100644 --- a/lua/web-devicons/lua.lua +++ b/lua/web-devicons/lua.lua @@ -17,6 +17,11 @@ require "nvim-web-devicons".setup { color = "#EBCB8B", name = "js" }, + ts = { + icon = "ﯤ", + color = "#519ABA", + name = "ts" + }, png = { icon = " ", color = "#BD77DC", From 5a2b82b63d408a882db29db445c1fc634adeee31 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 18 Mar 2021 15:47:42 +0530 Subject: [PATCH 0083/1541] todo --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 455892a..5feb65f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The config is complete but still work in progress as I am new to lua and slowly

-# Very Useful lua plugins to used in my config - +# Very Useful lua plugins used in my config - #### lspkind-nvim This tiny plugin adds vscode-like pictograms to neovim built-in lsp completion items : @@ -104,7 +104,12 @@ git clone https://github.com/wbthomason/packer.nvim\ - leader + f f find files in the current DIR , with telescope - leader + f h opens up a manpage like thing but for all vim related things , with telescope - leader + f m formats or beautifies the code in current window via neoformat - (currently only html ,css , js can be formatted . To be able to use this keybind you need to install the formatter locally for your language , in my case prettier was required only so I installed it. check this https://github.com/sbdchd/neoformat) + (currently only html ,css , js can be formatted . To be able to use this keybind you need to install the formatter locally for your language , in my case prettier was required only so I installed it. check this https://github.com/sbdchd/neoformat). + + # TODO + + - add snippets support + - show statusline in inactive windows # Troubleshooting - From 4a1530ec2243e17141a29709a39bb9efac758ac8 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 18 Mar 2021 19:19:45 +0530 Subject: [PATCH 0084/1541] bufferline mappings (#5) --- init.lua | 4 +++- lua/bufferline/lua.lua | 12 +++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index a6aa6e0..8fd8530 100644 --- a/init.lua +++ b/init.lua @@ -26,7 +26,7 @@ cmd "syntax on" g.auto_save = 1 g.indentLine_enabled = 1 -g.indentLine_char_list = {'▏'} +g.indentLine_char_list = {"▏"} g.mapleader = " " @@ -60,3 +60,5 @@ require("lspkind").init( File = " " } ) + + diff --git a/lua/bufferline/lua.lua b/lua/bufferline/lua.lua index 3f090a1..b76d387 100644 --- a/lua/bufferline/lua.lua +++ b/lua/bufferline/lua.lua @@ -5,7 +5,7 @@ require "bufferline".setup { options = { buffer_close_icon = "", modified_icon = "●", - close_icon = "", + close_icon = "", left_trunc_marker = "", right_trunc_marker = "", max_name_length = 14, @@ -52,3 +52,13 @@ require "bufferline".setup { } } } + +local opt = {silent = true} + +vim.g.mapleader = " " + +-- tabnew and tabprev +vim.api.nvim_set_keymap("n", "tn", [[BufferLineCycleNext]], opt) +vim.api.nvim_set_keymap("n", "tp", [[BufferLineCyclePrev]], opt) + + From b095b88b7273f84c71a08d866a92c2e4850ae7c1 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 18 Mar 2021 19:21:30 +0530 Subject: [PATCH 0085/1541] remove unneeded lines --- init.lua | 2 -- lua/bufferline/lua.lua | 2 -- 2 files changed, 4 deletions(-) diff --git a/init.lua b/init.lua index 8fd8530..7b46553 100644 --- a/init.lua +++ b/init.lua @@ -60,5 +60,3 @@ require("lspkind").init( File = " " } ) - - diff --git a/lua/bufferline/lua.lua b/lua/bufferline/lua.lua index b76d387..d3a8cf9 100644 --- a/lua/bufferline/lua.lua +++ b/lua/bufferline/lua.lua @@ -60,5 +60,3 @@ vim.g.mapleader = " " -- tabnew and tabprev vim.api.nvim_set_keymap("n", "tn", [[BufferLineCycleNext]], opt) vim.api.nvim_set_keymap("n", "tp", [[BufferLineCyclePrev]], opt) - - From 8d70ae019b65af3eb74100540690557dadbc15a6 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 18 Mar 2021 19:52:27 +0530 Subject: [PATCH 0086/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5feb65f..858e8d4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -The config is complete but still work in progress as I am new to lua and slowly learning vim stuffs. I'll keep adding new features like snippets etc and clean the config , make neovim (cli version) as functional as an IDE while being eyecandy. +The config is complete but still work in progress as I am new to lua and slowly learning vim stuffs. I'll keep adding new features like snippets etc and clean the config , make neovim (cli version) as functional as an IDE while being eyecandy. Pull requests are welcome. # Screenshots - From 959e7ab631f07aeea35d0d7660d063e842e5f3b6 Mon Sep 17 00:00:00 2001 From: jack Date: Fri, 19 Mar 2021 12:12:44 +1030 Subject: [PATCH 0087/1541] add install script --- install.sh | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100755 install.sh diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..aacbc55 --- /dev/null +++ b/install.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash +BASE=$(git rev-parse --show-toplevel) +LSP_BIN_PATH=$HOME/.local/bin + +default_langs="ts rust" +lsp_langs=${@:-"$default_langs"} + +pfx="~~~~~ " +heading() { + echo + echo $pfx $1 +} + +get_platform() { + case "$(uname -s)" in + Linux*) platform=Linux;; + Darwin*) platform=Mac;; + CYGWIN*) platform=Cygwin;; + MINGW*) platform=MinGw;; + *) platform="UNKNOWN:${unameOut}" + esac + echo $platform +} + +heading "Linking config" +for f in `find -E . -regex ".*\.vim$|.*\.lua$"`; do + p=${f#*/} + echo -e '\t' ${p} + path=~/.config/nvim/${p} + rm -rf ~/.config/nvim/${p} + mkdir -p $(dirname "${path}") + ln -s ${BASE}/${p} ~/.config/nvim/${p} +done + +if [[ ! -e ~/.local/share/nvim/site/pack/packer/start/packer.nvim ]]; then + heading "Installing packer" + git clone https://github.com/wbthomason/packer.nvim\ + ~/.local/share/nvim/site/pack/packer/start/packer.nvim +fi + +heading "Installing plugins" +nvim --headless +PackerInstall +qa +nvim --headless +TSUpdate +qa +echo + +fn_exists() { declare -F "$1" > /dev/null; } +warn_path=false + +install_ts() { + if [[ -z $(which npm) ]]; then + echo "npm not installed" + return + fi + npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier +} + +install_rust() { + if [[ ! -e ~/.local/bin/rust-analyzer ]]; then + mkdir -p ${LSP_BIN_PATH} + curl -L https://github.com/rust-analyzer/rust-analyzer/releases/latest/download/rust-analyzer-$(get_platform) -o ~/.local/bin/rust-analyzer + chmod +x ~/.local/bin/rust-analyzer + warn_path=true + else + echo "already installed" + fi +} + +for lang in ${lsp_langs}; do + if fn_exists install_$lang ; then + heading "Installing $lang language server" + install_$lang + else + echo $lang setup not implemented + echo + fi +done + +if [[ ${warn_path} = true ]]; then + echo "" + echo "Ensure ${LSP_BIN_PATH} is available in your \$PATH variable" +fi From 3abb3ed97e953132e2527fe2893a88607b916f5b Mon Sep 17 00:00:00 2001 From: jack Date: Fri, 19 Mar 2021 13:31:09 +1030 Subject: [PATCH 0088/1541] fix(install): add css and html to default_lsp_langs --- install.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index aacbc55..9b739a4 100755 --- a/install.sh +++ b/install.sh @@ -2,8 +2,8 @@ BASE=$(git rev-parse --show-toplevel) LSP_BIN_PATH=$HOME/.local/bin -default_langs="ts rust" -lsp_langs=${@:-"$default_langs"} +default_lsp_langs="css html ts rust" +lsp_langs=${@:-"$default_lsp_langs"} pfx="~~~~~ " heading() { @@ -46,12 +46,24 @@ echo fn_exists() { declare -F "$1" > /dev/null; } warn_path=false -install_ts() { +install_node_deps () { if [[ -z $(which npm) ]]; then echo "npm not installed" return fi - npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier + npm install -g $@ +} + +install_ts() { + install_node_deps typescript typescript-language-server prettier +} + +install_html() { + install_node_deps vscode-html-languageserver-bin +} + +install_css() { + install_node_deps vscode-css-languageserver-bin } install_rust() { From 39b823305815ed54f8afc50d576960f08eb6d001 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 19 Mar 2021 08:36:33 +0530 Subject: [PATCH 0089/1541] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 858e8d4..e74da37 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ Better syntax highlighting for programming languages ( my config just has html,c # Clone my setup - - Install neovim-nightly , also use a nerdfont on your terminal. +- run the install.sh script as root or copy the configs manually : - Install packer.nvim ```shell From d8719a007808078889722d1eaacaf1314e39d598 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 19 Mar 2021 17:54:53 +0530 Subject: [PATCH 0090/1541] kotlin icon for nvimTree --- lua/web-devicons/lua.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/web-devicons/lua.lua b/lua/web-devicons/lua.lua index df338fa..1a6287b 100644 --- a/lua/web-devicons/lua.lua +++ b/lua/web-devicons/lua.lua @@ -22,6 +22,11 @@ require "nvim-web-devicons".setup { color = "#519ABA", name = "ts" }, + kt = { + icon = "󱈙", + color = "#ffcb91", + name = "kt" + }, png = { icon = " ", color = "#BD77DC", From 96d61f0dd2161691c10b37f9b5d88af04c8776fd Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 19 Mar 2021 17:55:30 +0530 Subject: [PATCH 0091/1541] nvimtree bg color! --- init.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/init.lua b/init.lua index 7b46553..504d966 100644 --- a/init.lua +++ b/init.lua @@ -60,3 +60,15 @@ require("lspkind").init( File = " " } ) + +cmd("hi CustomExplorerBg guibg=#242830") + +vim.api.nvim_exec( + [[ +augroup NvimTree + au! + au FileType NvimTree setlocal winhighlight=Normal:CustomExplorerBg + augroup END + ]], + false +) From 4b591fb1362f3e34177df35b1a998c5bc0a92e44 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 19 Mar 2021 18:04:18 +0530 Subject: [PATCH 0092/1541] features --- README.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e74da37..1ae35a0 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,26 @@ Better syntax highlighting for programming languages ( my config just has html,c with Treesitter :
-# Guides to migrate to init.lua - +# Features + +- File navigation with Nvimtree +- mouse works +- managing tabs with bufferline +- autosave +- icons on nvimtree , telescope , bufferline/statusline and almost everywhere! with nvim-web-devicons +- minimal status line ( galaxyline) +- gitsigns (colored bars in my config) +- using nvim-lsp +- nvim-lspconfig for nvim-lps configuration +- nvim-compe for autocompletion +- lspkind to show pictograms on autocompletion items +- telescope for file finding , picking , previewing (files and even images) +- nvim-treesitter for syntax highlighting +- nvim-autopairs , for autolosing braces and stuffs +- neoformat for prettifying / formatting code +- packer.nvim as package manager + +# Guides to migrate your nvim configs to init.lua - - https://github.com/nanotee/nvim-lua-guide @@ -60,7 +79,6 @@ Better syntax highlighting for programming languages ( my config just has html,c - https://icyphox.sh/blog/nvim-lua/ - # Clone my setup - - Install neovim-nightly , also use a nerdfont on your terminal. @@ -118,4 +136,3 @@ git clone https://github.com/wbthomason/packer.nvim\ if you get any errors with packer.nvim , then remove the ~/.config/nvim/plugin/packer_nvim.vim file since it just has file paths for my system and re-install packer.nvim - From ce4c54b5cf523c1bf4aab8ec61ea08e5da681fde Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 19 Mar 2021 18:54:38 +0530 Subject: [PATCH 0093/1541] show statuslines on inactive windows (:PackerUpdate) --- lua/statusline/lua.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/statusline/lua.lua b/lua/statusline/lua.lua index fe0aff8..65bab3b 100644 --- a/lua/statusline/lua.lua +++ b/lua/statusline/lua.lua @@ -1,6 +1,6 @@ local gl = require("galaxyline") local gls = gl.section -gl.short_line_list = {"LuaTree", "vista", "dbui"} +gl.short_line_list = { } local colors = { bg = "#282c34", From 0fb4ffdc93245cebdf82cd248bd36a5863074958 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 20 Mar 2021 11:46:40 +0530 Subject: [PATCH 0094/1541] install lsp servers globally --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 9b739a4..735e239 100755 --- a/install.sh +++ b/install.sh @@ -51,7 +51,7 @@ install_node_deps () { echo "npm not installed" return fi - npm install -g $@ + sudo npm install -g $@ } install_ts() { From fca10b347debf2c25be383d0d33ae6bb8e7db284 Mon Sep 17 00:00:00 2001 From: Alok <73450969+alok8bb@users.noreply.github.com> Date: Sat, 20 Mar 2021 17:35:47 +0530 Subject: [PATCH 0095/1541] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 1ae35a0..4c7f62c 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,11 @@ git clone https://github.com/wbthomason/packer.nvim\ `` -- in /lua/nvim-lspconfig/lua.lua file require'lspconfig'.clangd.setup{} `` + + # Support/Contact - + - My little ricing community: https://t.me/DE_WM (telegram) + - Me: @siduck (telegram) + - Vim Indonesia: https://t.me/VimID (telegram) # Default Mappings to make stuffs easier! From 78654a1515fb824b85a35a9e986f4c199820806a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 20 Mar 2021 17:39:58 +0530 Subject: [PATCH 0096/1541] contact --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4c7f62c..79183c4 100644 --- a/README.md +++ b/README.md @@ -106,11 +106,6 @@ git clone https://github.com/wbthomason/packer.nvim\ `` -- in /lua/nvim-lspconfig/lua.lua file require'lspconfig'.clangd.setup{} `` - - # Support/Contact - - - My little ricing community: https://t.me/DE_WM (telegram) - - Me: @siduck (telegram) - - Vim Indonesia: https://t.me/VimID (telegram) # Default Mappings to make stuffs easier! @@ -141,3 +136,7 @@ git clone https://github.com/wbthomason/packer.nvim\ if you get any errors with packer.nvim , then remove the ~/.config/nvim/plugin/packer_nvim.vim file since it just has file paths for my system and re-install packer.nvim + + # Contact - + - My linux / unix related ricing community: https://t.me/DE_WM (telegram) + - Me: @siduck (telegram) From e8435220fd01c1f5845ac1c4a004226da733a9f2 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 21 Mar 2021 16:39:29 +0530 Subject: [PATCH 0097/1541] use terminal bg color --- init.lua | 2 ++ lua/telescope-nvim/lua.lua | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 504d966..e122372 100644 --- a/init.lua +++ b/init.lua @@ -53,6 +53,8 @@ cmd("hi NvimTreeFolderIcon guifg = #61afef") cmd("hi NvimTreeFolderName guifg = #61afef") cmd("hi NvimTreeIndentMarker guifg=#545862") +cmd("hi Normal guibg=NONE ctermbg=NONE") + require("nvim-autopairs").setup() require("lspkind").init( diff --git a/lua/telescope-nvim/lua.lua b/lua/telescope-nvim/lua.lua index 00f6ae3..460298f 100644 --- a/lua/telescope-nvim/lua.lua +++ b/lua/telescope-nvim/lua.lua @@ -10,8 +10,8 @@ require("telescope").setup { "--smart-case" }, prompt_position = "bottom", - prompt_prefix = "> ", - selection_caret = "> ", + prompt_prefix = " ", + selection_caret = " ", entry_prefix = " ", initial_mode = "insert", selection_strategy = "reset", From 7f4f7b28732c2e46081a747c71cc58cd4c454cf4 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 23 Mar 2021 10:21:40 +0530 Subject: [PATCH 0098/1541] add icons for ruby , dockerfile etc --- lua/statusline/lua.lua | 2 +- lua/web-devicons/lua.lua | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/lua/statusline/lua.lua b/lua/statusline/lua.lua index 65bab3b..63a5267 100644 --- a/lua/statusline/lua.lua +++ b/lua/statusline/lua.lua @@ -1,6 +1,6 @@ local gl = require("galaxyline") local gls = gl.section -gl.short_line_list = { } +gl.short_line_list = {" "} local colors = { bg = "#282c34", diff --git a/lua/web-devicons/lua.lua b/lua/web-devicons/lua.lua index 1a6287b..52acffe 100644 --- a/lua/web-devicons/lua.lua +++ b/lua/web-devicons/lua.lua @@ -57,6 +57,26 @@ require "nvim-web-devicons".setup { color = "#C8CCD4", name = "out" }, + Dockerfile = { + icon = "", + color = "#b8b5ff", + name = "Dockerfile" + }, + rb = { + icon = "", + color = "#ff75a0", + name = "rb" + }, + vue = { + icon = "﵂", + color = "#7eca9c", + name = "vue" + }, + py = { + icon = "", + color = "#a7c5eb", + name = "py" + }, toml = { icon = "", color = "#61afef", From 9b9718f46b28582fc26e40368f90f9d48c2ab631 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 23 Mar 2021 10:22:29 +0530 Subject: [PATCH 0099/1541] show completion item doc popup --- lua/nvim-compe/lua.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/nvim-compe/lua.lua b/lua/nvim-compe/lua.lua index 79bdc8a..ef2a6e5 100644 --- a/lua/nvim-compe/lua.lua +++ b/lua/nvim-compe/lua.lua @@ -15,7 +15,7 @@ require "compe".setup { max_abbr_width = 100, max_kind_width = 100, max_menu_width = 100, - documentation = false, + documentation = true, source = { path = true, buffer = true, From b05103da4d2a1057166b32dbf323f6204077f8a6 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 26 Mar 2021 10:21:32 +0530 Subject: [PATCH 0100/1541] rm indenline and use blankline! --- init.lua | 32 +++++++++++++++++++++----------- lua/pluginsList/lua.lua | 2 +- plugin/packer_compiled.vim | 4 ++++ 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index e122372..790183a 100644 --- a/init.lua +++ b/init.lua @@ -1,4 +1,4 @@ --- load plugins +-- load all plugins require("pluginsList.lua") require("web-devicons.lua") @@ -8,27 +8,37 @@ require("bufferline.lua") require("statusline.lua") require("telescope-nvim.lua") +require("gitsigns.lua") +require "colorizer".setup() + -- lsp require("nvim-lspconfig.lua") require("nvim-compe.lua") -require("gitsigns.lua") - -require "colorizer".setup() - local cmd = vim.cmd local g = vim.g -local indent = 2 + +g.mapleader = " " +g.auto_save = 1 + +-- colorscheme cmd "colorscheme base16-onedark" cmd "syntax enable" cmd "syntax on" -g.auto_save = 1 -g.indentLine_enabled = 1 -g.indentLine_char_list = {"▏"} +-- blankline -g.mapleader = " " +local indent = 2 + +g.indentLine_enabled = 1 +g.indent_blankline_char = "▏" + +cmd("hi IndentBlanklineChar guifg=#373b43") + +g.indent_blankline_filetype_exclude = {"help", "terminal"} +g.indent_blankline_show_trailing_blankline_indent = false +g.indent_blankline_show_first_indent_level = false require("treesitter.lua") require("mappings.lua") @@ -56,13 +66,13 @@ cmd("hi NvimTreeIndentMarker guifg=#545862") cmd("hi Normal guibg=NONE ctermbg=NONE") require("nvim-autopairs").setup() - require("lspkind").init( { File = " " } ) +-- nvimTree bg color cmd("hi CustomExplorerBg guibg=#242830") vim.api.nvim_exec( diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 1e3daa3..548b106 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -14,7 +14,6 @@ return require("packer").startup( use {"nvim-treesitter/nvim-treesitter"} use {"chriskempson/base16-vim"} use {"norcalli/nvim-colorizer.lua"} - use { 'Yggdroot/indentLine'} use {"ryanoasis/vim-devicons"} use {"sbdchd/neoformat"} use {"neovim/nvim-lspconfig"} @@ -26,5 +25,6 @@ return require("packer").startup( use {"nvim-telescope/telescope.nvim"} use {"nvim-telescope/telescope-media-files.nvim"} use {"nvim-lua/popup.nvim"} + use {"lukas-reineke/indent-blankline.nvim", branch = 'lua'} end ) diff --git a/plugin/packer_compiled.vim b/plugin/packer_compiled.vim index 873fb81..3831e12 100644 --- a/plugin/packer_compiled.vim +++ b/plugin/packer_compiled.vim @@ -44,6 +44,10 @@ _G.packer_plugins = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/gitsigns.nvim" }, + ["indent-blankline.nvim"] = { + loaded = true, + path = "/home/sid/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim" + }, indentLine = { loaded = true, path = "/home/sid/.local/share/nvim/site/pack/packer/start/indentLine" From 67419fcd49332d080f26a389422a3b1b69394479 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 26 Mar 2021 10:32:04 +0530 Subject: [PATCH 0101/1541] add blankline screenshot and clean readme --- README.md | 180 +++++++++++++++++++++++++++++------------------------- 1 file changed, 97 insertions(+), 83 deletions(-) diff --git a/README.md b/README.md index 79183c4..f880f54 100644 --- a/README.md +++ b/README.md @@ -1,142 +1,156 @@ - -The config is complete but still work in progress as I am new to lua and slowly learning vim stuffs. I'll keep adding new features like snippets etc and clean the config , make neovim (cli version) as functional as an IDE while being eyecandy. Pull requests are welcome. +The config is complete but still work in progress as I am new to lua and slowly learning vim stuffs. I'll keep adding new features like snippets etc and clean the config , make neovim (cli version) as functional as an IDE while being eyecandy. Pull requests are welcome. # Screenshots - -
-
+
+
-# Very Useful lua plugins used in my config - +# Very Useful lua plugins used in my config - #### lspkind-nvim + This tiny plugin adds vscode-like pictograms to neovim built-in lsp completion items : -
- -#### nvim-tree.lua -fast file tree : +
-
- -### telescope-nvim - -A fuzzy file finder, picker, sorter, previewer and much more: - -
+#### nvim-tree.lua +fast file tree : + +
+ +### telescope-nvim - + +A fuzzy file finder, picker, sorter, previewer and much more: + +
+ +### indent-blankline.nvim - + +adds indentline : + ### galaxyline - -fastest statusline plugin I've used so far: -
- + +fastest statusline plugin I've used so far: +
+ ### gitsigns.nvim - -Shows git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) + +Shows git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) +
### nvim-bufferline.lua - + As a top bufferline like thing which lets me handle tabs like switching, closing tabs. - + +
### nvim-web-devicons - Lua fork of vim devicons which lets me change icons of filetypes -
+
### nvim-treesitter -Better syntax highlighting for programming languages ( my config just has html,css,js support for now ). +Better syntax highlighting for programming languages ( my config just has html,css,js support for now ). - without Treesitter : - - - with Treesitter : -
+without Treesitter : + + +with Treesitter : +
# Features -- File navigation with Nvimtree +- File navigation with Nvimtree - mouse works -- managing tabs with bufferline +- managing tabs with bufferline - autosave - icons on nvimtree , telescope , bufferline/statusline and almost everywhere! with nvim-web-devicons - minimal status line ( galaxyline) - gitsigns (colored bars in my config) - using nvim-lsp - nvim-lspconfig for nvim-lps configuration -- nvim-compe for autocompletion +- nvim-compe for autocompletion - lspkind to show pictograms on autocompletion items - telescope for file finding , picking , previewing (files and even images) -- nvim-treesitter for syntax highlighting -- nvim-autopairs , for autolosing braces and stuffs -- neoformat for prettifying / formatting code +- nvim-treesitter for syntax highlighting +- nvim-autopairs , for autolosing braces and stuffs +- neoformat for prettifying / formatting code - packer.nvim as package manager -# Guides to migrate your nvim configs to init.lua - +# Guides to migrate your nvim configs to init.lua - - https://github.com/nanotee/nvim-lua-guide - https://alpha2phi.medium.com/neovim-init-lua-e80f4f136030 -- https://oroques.dev/notes/neovim-init/ +- https://oroques.dev/notes/neovim-init/ - https://icyphox.sh/blog/nvim-lua/ -# Clone my setup - +# Clone my setup - - Install neovim-nightly , also use a nerdfont on your terminal. -- run the install.sh script as root or copy the configs manually : -- Install packer.nvim +- run the install.sh script as root or copy the configs manually : +- Install packer.nvim ```shell git clone https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim ``` - - copy all config files in from this repo except ( plugin folder as it has config related to my system's username! ) - - Open neovim and install all plugins , :PackerInstall and :TSUpdate - - Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) - ``` - sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier - ``` - - To setup any language server , follow this guide https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md and search up the needed LSP. For example if I needed clangd's lsp server : - + +- copy all config files in from this repo except ( plugin folder as it has config related to my system's username! ) +- Open neovim and install all plugins , :PackerInstall and :TSUpdate +- Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) + +``` +sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier +``` + +To setup any language server , follow this guide https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md and search up the needed LSP. For example if I needed clangd's lsp server : + - + - I'd install it first and add its setup line : - `` -- in /lua/nvim-lspconfig/lua.lua file - - require'lspconfig'.clangd.setup{} `` - - # Default Mappings to make stuffs easier! - - space is the leader key - - - Ctrl b Open terminal vertically over right - - Ctrl x Open terminal horizontally below the current window - - Ctrl n toggle neovim tree - - Ctrl a copies everything in the current file - - select any text + y copies the selected text - - leader + f b open all buffers , with telescope - - leader + f p search and preview images with telescope - - leader + f f find files in the current DIR , with telescope - - leader + f o open recently edited files , with telescope - - leader + f f find files in the current DIR , with telescope - - leader + f h opens up a manpage like thing but for all vim related things , with telescope - - leader + f m formats or beautifies the code in current window via neoformat +I'd install it first and add its setup line : +`` -- in /lua/nvim-lspconfig/lua.lua file + + require'lspconfig'.clangd.setup{} `` + +# Default Mappings to make stuffs easier! + + space is the leader key + +- Ctrl b Open terminal vertically over right +- Ctrl x Open terminal horizontally below the current window +- Ctrl n toggle neovim tree +- Ctrl a copies everything in the current file +- select any text + y copies the selected text +- leader + f b open all buffers , with telescope +- leader + f p search and preview images with telescope +- leader + f f find files in the current DIR , with telescope +- leader + f o open recently edited files , with telescope +- leader + f f find files in the current DIR , with telescope +- leader + f h opens up a manpage like thing but for all vim related things , with telescope +- leader + f m formats or beautifies the code in current window via neoformat (currently only html ,css , js can be formatted . To be able to use this keybind you need to install the formatter locally for your language , in my case prettier was required only so I installed it. check this https://github.com/sbdchd/neoformat). - - # TODO - - - add snippets support - - show statusline in inactive windows - - # Troubleshooting - - - ![image](https://user-images.githubusercontent.com/59060246/111059898-f096cf00-84be-11eb-977a-f91d622ee5b9.png) - -if you get any errors with packer.nvim , then remove the ~/.config/nvim/plugin/packer_nvim.vim file since it just has file paths for my system + +# TODO + +- add snippets support +- show statusline in inactive windows + +# Troubleshooting - + +![image](https://user-images.githubusercontent.com/59060246/111059898-f096cf00-84be-11eb-977a-f91d622ee5b9.png) + +if you get any errors with packer.nvim , then remove the ~/.config/nvim/plugin/packer_nvim.vim file since it just has file paths for my system and re-install packer.nvim - # Contact - - - My linux / unix related ricing community: https://t.me/DE_WM (telegram) - - Me: @siduck (telegram) +# Contact - + +- My linux / unix related ricing community: https://t.me/DE_WM (telegram) +- Me: @siduck (telegram) From 91aee2505be02537c317349e357ffae0d4c1c2ce Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 26 Mar 2021 10:36:32 +0530 Subject: [PATCH 0102/1541] update Features --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f880f54..0f0cc80 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ with Treesitter : - nvim-autopairs , for autolosing braces and stuffs - neoformat for prettifying / formatting code - packer.nvim as package manager +- indent-blankline.Nvim for indentlines # Guides to migrate your nvim configs to init.lua - From 669ad346e926874afe2bffab23157608d1ba5cdc Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 27 Mar 2021 08:20:15 +0530 Subject: [PATCH 0103/1541] minor changes --- install.sh | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index 735e239..7204858 100755 --- a/install.sh +++ b/install.sh @@ -23,14 +23,24 @@ get_platform() { } heading "Linking config" -for f in `find -E . -regex ".*\.vim$|.*\.lua$"`; do - p=${f#*/} - echo -e '\t' ${p} - path=~/.config/nvim/${p} - rm -rf ~/.config/nvim/${p} - mkdir -p $(dirname "${path}") - ln -s ${BASE}/${p} ~/.config/nvim/${p} -done +heading "old nvim config will be deleted" + +# copying config + +cd .. && cp -r neovim-dots ~/.config +mv ~/.config/neovim-dots ~/.config/nvim +rm -rf ~/.config/nvim/.git +rm -rf ~/.config/nvim/install.sh +rm -rf ~/.config/nvim/README.md + +#for f in `find -E . -regex ".*\.vim$|.*\.lua$"`; do +# p=${f#*/} +# echo -e '\t' ${p} +# path=~/.config/nvim/${p} +# rm -rf ~/.config/nvim/${p} +# mkdir -p $(dirname "${path}") +# ln -s ${BASE}/${p} ~/.config/nvim/${p} +#done if [[ ! -e ~/.local/share/nvim/site/pack/packer/start/packer.nvim ]]; then heading "Installing packer" @@ -39,8 +49,8 @@ if [[ ! -e ~/.local/share/nvim/site/pack/packer/start/packer.nvim ]]; then fi heading "Installing plugins" -nvim --headless +PackerInstall +qa -nvim --headless +TSUpdate +qa +#nvim --headless +PackerInstall +qa +#nvim --headless +TSUpdate +qa echo fn_exists() { declare -F "$1" > /dev/null; } From c70813d96ac1a9d0c8fc30683906198c322fa345 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 28 Mar 2021 23:20:53 +0530 Subject: [PATCH 0104/1541] fix install script --- install.sh | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/install.sh b/install.sh index 7204858..9307287 100755 --- a/install.sh +++ b/install.sh @@ -22,16 +22,21 @@ get_platform() { echo $platform } +heading "installing packer" + +if [[ ! -e ~/.local/share/nvim/site/pack/packer/start/packer.nvim ]]; then + heading "Installing packer" + git clone https://github.com/wbthomason/packer.nvim\ + ~/.local/share/nvim/site/pack/packer/start/packer.nvim +fi + heading "Linking config" -heading "old nvim config will be deleted" +heading "old nvim config will be deleted so watchout :0" # copying config -cd .. && cp -r neovim-dots ~/.config -mv ~/.config/neovim-dots ~/.config/nvim -rm -rf ~/.config/nvim/.git -rm -rf ~/.config/nvim/install.sh -rm -rf ~/.config/nvim/README.md +rm -rf ~/.config/nvim/ && mkdir ~/.config/nvim +cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim #for f in `find -E . -regex ".*\.vim$|.*\.lua$"`; do # p=${f#*/} @@ -42,13 +47,7 @@ rm -rf ~/.config/nvim/README.md # ln -s ${BASE}/${p} ~/.config/nvim/${p} #done -if [[ ! -e ~/.local/share/nvim/site/pack/packer/start/packer.nvim ]]; then - heading "Installing packer" - git clone https://github.com/wbthomason/packer.nvim\ - ~/.local/share/nvim/site/pack/packer/start/packer.nvim -fi - -heading "Installing plugins" +#heading "Installing plugins" #nvim --headless +PackerInstall +qa #nvim --headless +TSUpdate +qa echo From 6c598e7017aa44c95b074c73085ea992109e373e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 31 Mar 2021 06:53:59 +0530 Subject: [PATCH 0105/1541] indentLine and blankline comparison --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f0cc80..3e51166 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,10 @@ A fuzzy file finder, picker, sorter, previewer and much more: adds indentline : +using indenLine plugin on left and blanklineNvim on right + + + ### galaxyline - fastest statusline plugin I've used so far: @@ -79,7 +83,7 @@ with Treesitter : - nvim-autopairs , for autolosing braces and stuffs - neoformat for prettifying / formatting code - packer.nvim as package manager -- indent-blankline.Nvim for indentlines +- indent-blankline.Nvim for indentlines # Guides to migrate your nvim configs to init.lua - From e16f523fcc5aae90f57ef5caf0e485ecce69c5d4 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 31 Mar 2021 07:21:27 +0530 Subject: [PATCH 0106/1541] clean up --- lua/pluginsList/lua.lua | 44 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 548b106..a03c26c 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -4,27 +4,27 @@ local packer_exists = pcall(vim.cmd, [[packadd packer.nvim]]) return require("packer").startup( function() use {"wbthomason/packer.nvim", opt = true} - use {"kyazdani42/nvim-web-devicons"} - use {"kyazdani42/nvim-tree.lua"} - use {"nvim-lua/plenary.nvim"} - use {"lewis6991/gitsigns.nvim"} - use {"glepnir/galaxyline.nvim"} - use {"akinsho/nvim-bufferline.lua"} - use {"907th/vim-auto-save"} - use {"nvim-treesitter/nvim-treesitter"} - use {"chriskempson/base16-vim"} - use {"norcalli/nvim-colorizer.lua"} - use {"ryanoasis/vim-devicons"} - use {"sbdchd/neoformat"} - use {"neovim/nvim-lspconfig"} - use {"hrsh7th/nvim-compe"} - use {"windwp/nvim-autopairs"} - use {"alvan/vim-closetag"} - use {"tweekmonster/startuptime.vim"} - use {"onsails/lspkind-nvim"} - use {"nvim-telescope/telescope.nvim"} - use {"nvim-telescope/telescope-media-files.nvim"} - use {"nvim-lua/popup.nvim"} - use {"lukas-reineke/indent-blankline.nvim", branch = 'lua'} + use {"lukas-reineke/indent-blankline.nvim", branch = "lua"} + use "kyazdani42/nvim-web-devicons" + use "kyazdani42/nvim-tree.lua" + use "nvim-lua/plenary.nvim" + use "lewis6991/gitsigns.nvim" + use "glepnir/galaxyline.nvim" + use "akinsho/nvim-bufferline.lua" + use "907th/vim-auto-save" + use "nvim-treesitter/nvim-treesitter" + use "chriskempson/base16-vim" + use "norcalli/nvim-colorizer.lua" + use "ryanoasis/vim-devicons" + use "sbdchd/neoformat" + use "neovim/nvim-lspconfig" + use "hrsh7th/nvim-compe" + use "windwp/nvim-autopairs" + use "alvan/vim-closetag" + use "tweekmonster/startuptime.vim" + use "onsails/lspkind-nvim" + use "nvim-telescope/telescope.nvim" + use "nvim-telescope/telescope-media-files.nvim" + use "nvim-lua/popup.nvim" end ) From e81499f291a17e4e80dd0b976618f751911255ea Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 31 Mar 2021 07:30:33 +0530 Subject: [PATCH 0107/1541] smooth scrolling --- README.md | 2 ++ lua/pluginsList/lua.lua | 2 ++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 3e51166..78aac09 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ with Treesitter : - neoformat for prettifying / formatting code - packer.nvim as package manager - indent-blankline.Nvim for indentlines +- smooth scrolling # Guides to migrate your nvim configs to init.lua - @@ -142,6 +143,7 @@ I'd install it first and add its setup line : - leader + f h opens up a manpage like thing but for all vim related things , with telescope - leader + f m formats or beautifies the code in current window via neoformat (currently only html ,css , js can be formatted . To be able to use this keybind you need to install the formatter locally for your language , in my case prettier was required only so I installed it. check this https://github.com/sbdchd/neoformat). +- ``, ``, ``, ``, `` and `` : Smooth scrolling for window movement commands. # TODO diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index a03c26c..a4f894d 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -5,6 +5,7 @@ return require("packer").startup( function() use {"wbthomason/packer.nvim", opt = true} use {"lukas-reineke/indent-blankline.nvim", branch = "lua"} + use "kyazdani42/nvim-web-devicons" use "kyazdani42/nvim-tree.lua" use "nvim-lua/plenary.nvim" @@ -26,5 +27,6 @@ return require("packer").startup( use "nvim-telescope/telescope.nvim" use "nvim-telescope/telescope-media-files.nvim" use "nvim-lua/popup.nvim" + use "karb94/neoscroll.nvim" end ) From 9e0f8b87faeebad40e106ad5776813d306ff683c Mon Sep 17 00:00:00 2001 From: marvelman3284 Date: Wed, 31 Mar 2021 04:05:15 -0400 Subject: [PATCH 0108/1541] Add support for the python language server --- install.sh | 14 +++++++++++++- lua/nvim-lspconfig/lua.lua | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 9307287..938da78 100755 --- a/install.sh +++ b/install.sh @@ -2,7 +2,7 @@ BASE=$(git rev-parse --show-toplevel) LSP_BIN_PATH=$HOME/.local/bin -default_lsp_langs="css html ts rust" +default_lsp_langs="css html ts rust python" lsp_langs=${@:-"$default_lsp_langs"} pfx="~~~~~ " @@ -63,6 +63,14 @@ install_node_deps () { sudo npm install -g $@ } +install_python_deps () { + if [[ -z $(which pip) ]]; then + echo "python/pip not installed" + return + fi + sudo python3 -m pip install $@ +} + install_ts() { install_node_deps typescript typescript-language-server prettier } @@ -86,6 +94,10 @@ install_rust() { fi } +install_python(){ + install_python_deps 'python-language-server[all]' +} + for lang in ${lsp_langs}; do if fn_exists install_$lang ; then heading "Installing $lang language server" diff --git a/lua/nvim-lspconfig/lua.lua b/lua/nvim-lspconfig/lua.lua index 6042601..7a447f2 100644 --- a/lua/nvim-lspconfig/lua.lua +++ b/lua/nvim-lspconfig/lua.lua @@ -32,3 +32,4 @@ buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", require "lspconfig".tsserver.setup {} require "lspconfig".cssls.setup {} require "lspconfig".html.setup {} +require "lspconfig".pyls.setup {} From bb092ad64977f8c0abfefb364be2c59e43082543 Mon Sep 17 00:00:00 2001 From: jaydamani Date: Wed, 31 Mar 2021 15:08:29 +0530 Subject: [PATCH 0109/1541] fixed mappings for lspconfigs --- lua/nvim-lspconfig/lua.lua | 66 ++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/lua/nvim-lspconfig/lua.lua b/lua/nvim-lspconfig/lua.lua index 6042601..98ba1ae 100644 --- a/lua/nvim-lspconfig/lua.lua +++ b/lua/nvim-lspconfig/lua.lua @@ -1,34 +1,44 @@ vim.cmd [[packadd nvim-lspconfig]] vim.cmd [[packadd nvim-compe]] +local nvim_lsp = require('lspconfig') +function on_attach(client) -local function buf_set_keymap(...) - vim.api.nvim_buf_set_keymap(bufnr, ...) -end -local function buf_set_option(...) - vim.api.nvim_buf_set_option(bufnr, ...) + + local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end + local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end + + buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') + + -- Mappings. + local opts = { noremap=true, silent=true } + buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) + buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opts) + buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) + buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) + buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) + buf_set_keymap('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) + buf_set_keymap('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) + buf_set_keymap('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) + buf_set_keymap('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) + buf_set_keymap('n', 'rn', 'lua vim.lsp.buf.rename()', opts) + buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', opts) + buf_set_keymap('n', 'e', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) + buf_set_keymap('n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) + buf_set_keymap('n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) + buf_set_keymap('n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) + + -- Set some keybinds conditional on server capabilities + if client.resolved_capabilities.document_formatting then + buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) + elseif client.resolved_capabilities.document_range_formatting then + buf_set_keymap("n", "f", "lua vim.lsp.buf.range_formatting()", opts) + end + +end + +local servers = { "tsserver" } +for _, lsp in ipairs(servers) do + nvim_lsp[lsp].setup { on_attach = on_attach } end -buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") --- Mappings. -local opts = {noremap = true, silent = true} -buf_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) -buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) -buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()", opts) -buf_set_keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) -buf_set_keymap("n", "", "lua vim.lsp.buf.signature_help()", opts) -buf_set_keymap("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) -buf_set_keymap("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) -buf_set_keymap("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) -buf_set_keymap("n", "D", "lua vim.lsp.buf.type_definition()", opts) -buf_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", opts) -buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()", opts) -buf_set_keymap("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) -buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) -buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) -buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) - --- lsp for html , css and js/ts -require "lspconfig".tsserver.setup {} -require "lspconfig".cssls.setup {} -require "lspconfig".html.setup {} From 02ac9387190de8c1470229d3a18d71b9bc688fab Mon Sep 17 00:00:00 2001 From: jaydamani Date: Wed, 31 Mar 2021 15:17:11 +0530 Subject: [PATCH 0110/1541] added new keybinds for bufferline --- lua/bufferline/lua.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lua/bufferline/lua.lua b/lua/bufferline/lua.lua index d3a8cf9..2f6d37d 100644 --- a/lua/bufferline/lua.lua +++ b/lua/bufferline/lua.lua @@ -57,6 +57,11 @@ local opt = {silent = true} vim.g.mapleader = " " +--command that adds new buffer and moves to it +vim.api.nvim_command "com -nargs=? -complete=file_in_path New badd | blast" +vim.api.nvim_set_keymap("n","",":New ", opt) +--removing a buffer +vim.api.nvim_set_keymap("n","",[[bdelete]], opt) -- tabnew and tabprev -vim.api.nvim_set_keymap("n", "tn", [[BufferLineCycleNext]], opt) -vim.api.nvim_set_keymap("n", "tp", [[BufferLineCyclePrev]], opt) +vim.api.nvim_set_keymap("n", "", [[BufferLineCycleNext]], opt) +vim.api.nvim_set_keymap("n", "", [[BufferLineCyclePrev]], opt) From 40cc37d23fd8a065d856b42016ebdb68082fa7cc Mon Sep 17 00:00:00 2001 From: jaydamani Date: Wed, 31 Mar 2021 15:31:05 +0530 Subject: [PATCH 0111/1541] added tab completion --- lua/nvim-compe/lua.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lua/nvim-compe/lua.lua b/lua/nvim-compe/lua.lua index ef2a6e5..84b40d5 100644 --- a/lua/nvim-compe/lua.lua +++ b/lua/nvim-compe/lua.lua @@ -33,6 +33,16 @@ require "compe".setup { local t = function(str) return vim.api.nvim_replace_termcodes(str, true, true, true) end + +_G.tab_complete = function() + if vim.fn.pumvisible() == 1 then + return t "" + elseif check_back_space() then + return t "" + else + return vim.fn['compe#complete']() + end +end _G.s_tab_complete = function() if vim.fn.pumvisible() == 1 then return t "" @@ -45,6 +55,7 @@ end -- mappings +vim.api.nvim_set_keymap("i", "", "v:lua.tab_complete()", {expr = true}) vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", {expr = true}) vim.api.nvim_set_keymap("i", "", "v:lua.s_tab_complete()", {expr = true}) vim.api.nvim_set_keymap("s", "", "v:lua.s_tab_complete()", {expr = true}) From f791ac2e25b7cc6bfe896532aff0c7ce4128695c Mon Sep 17 00:00:00 2001 From: jaydamani Date: Wed, 31 Mar 2021 16:58:50 +0530 Subject: [PATCH 0112/1541] fixed an oopsie --- install.sh | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/install.sh b/install.sh index 9307287..c042a3c 100755 --- a/install.sh +++ b/install.sh @@ -2,8 +2,8 @@ BASE=$(git rev-parse --show-toplevel) LSP_BIN_PATH=$HOME/.local/bin -default_lsp_langs="css html ts rust" -lsp_langs=${@:-"$default_lsp_langs"} +supported_lsp_langs="css html ts rust" +lsp_langs=${@:-"$supported_lsp_langs"} pfx="~~~~~ " heading() { @@ -35,8 +35,8 @@ heading "old nvim config will be deleted so watchout :0" # copying config -rm -rf ~/.config/nvim/ && mkdir ~/.config/nvim -cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim +#rm -rf ~/.config/nvim/ && mkdir ~/.config/nvim +#cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim #for f in `find -E . -regex ".*\.vim$|.*\.lua$"`; do # p=${f#*/} @@ -86,14 +86,11 @@ install_rust() { fi } -for lang in ${lsp_langs}; do - if fn_exists install_$lang ; then - heading "Installing $lang language server" - install_$lang - else - echo $lang setup not implemented - echo - fi +echo 'select languages you would be developing in.' +select lang in ${lsp_langs}; do + heading "Installing $lang language server" + install_$lang + echo done if [[ ${warn_path} = true ]]; then From 7906e1ce0a4c8d1b4cf684e47c8626d92a026637 Mon Sep 17 00:00:00 2001 From: jaydamani Date: Wed, 31 Mar 2021 17:39:19 +0530 Subject: [PATCH 0113/1541] fixing --- install.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/install.sh b/install.sh index c042a3c..9307287 100755 --- a/install.sh +++ b/install.sh @@ -2,8 +2,8 @@ BASE=$(git rev-parse --show-toplevel) LSP_BIN_PATH=$HOME/.local/bin -supported_lsp_langs="css html ts rust" -lsp_langs=${@:-"$supported_lsp_langs"} +default_lsp_langs="css html ts rust" +lsp_langs=${@:-"$default_lsp_langs"} pfx="~~~~~ " heading() { @@ -35,8 +35,8 @@ heading "old nvim config will be deleted so watchout :0" # copying config -#rm -rf ~/.config/nvim/ && mkdir ~/.config/nvim -#cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim +rm -rf ~/.config/nvim/ && mkdir ~/.config/nvim +cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim #for f in `find -E . -regex ".*\.vim$|.*\.lua$"`; do # p=${f#*/} @@ -86,11 +86,14 @@ install_rust() { fi } -echo 'select languages you would be developing in.' -select lang in ${lsp_langs}; do - heading "Installing $lang language server" - install_$lang - echo +for lang in ${lsp_langs}; do + if fn_exists install_$lang ; then + heading "Installing $lang language server" + install_$lang + else + echo $lang setup not implemented + echo + fi done if [[ ${warn_path} = true ]]; then From 32404821917d74f74b962a9d2e4f13c67e369ada Mon Sep 17 00:00:00 2001 From: jaydamani Date: Wed, 31 Mar 2021 17:43:17 +0530 Subject: [PATCH 0114/1541] forgot a fuction --- lua/nvim-compe/lua.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/nvim-compe/lua.lua b/lua/nvim-compe/lua.lua index 84b40d5..df6b263 100644 --- a/lua/nvim-compe/lua.lua +++ b/lua/nvim-compe/lua.lua @@ -34,6 +34,16 @@ local t = function(str) return vim.api.nvim_replace_termcodes(str, true, true, true) end +local check_back_space = function() + local col = vim.fn.col('.') - 1 + if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then + return true + else + return false + end +end + + _G.tab_complete = function() if vim.fn.pumvisible() == 1 then return t "" From 138b0cbac3d8798c0201bc7ca72d0192d493c5da Mon Sep 17 00:00:00 2001 From: Alexander Serowy Date: Thu, 1 Apr 2021 13:40:38 +0200 Subject: [PATCH 0115/1541] added pip3 to validation --- install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 938da78..658e10d 100755 --- a/install.sh +++ b/install.sh @@ -64,7 +64,11 @@ install_node_deps () { } install_python_deps () { - if [[ -z $(which pip) ]]; then + if [[ -z $(which pip) && $(which pip3) ]]; then + echo "python/pip not installed" + return + fi + sudo python3 -m pip install $@ ]]; then echo "python/pip not installed" return fi From 8996ff7f598d154483f3a6d61e8c41f83ae1ff07 Mon Sep 17 00:00:00 2001 From: Alexander Serowy Date: Thu, 1 Apr 2021 13:54:10 +0200 Subject: [PATCH 0116/1541] fixed paste bug --- install.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 658e10d..e3928ee 100755 --- a/install.sh +++ b/install.sh @@ -60,7 +60,7 @@ install_node_deps () { echo "npm not installed" return fi - sudo npm install -g $@ + sudo npm install -g $@ } install_python_deps () { @@ -68,11 +68,7 @@ install_python_deps () { echo "python/pip not installed" return fi - sudo python3 -m pip install $@ ]]; then - echo "python/pip not installed" - return - fi - sudo python3 -m pip install $@ + sudo python3 -m pip install $@ } install_ts() { From 43b1289a82c51d1d4c3e187fd128d445b4d610b3 Mon Sep 17 00:00:00 2001 From: Alexander Serowy Date: Thu, 1 Apr 2021 13:57:15 +0200 Subject: [PATCH 0117/1541] fixed --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index e3928ee..aaa0e0b 100755 --- a/install.sh +++ b/install.sh @@ -64,7 +64,7 @@ install_node_deps () { } install_python_deps () { - if [[ -z $(which pip) && $(which pip3) ]]; then + if [[ -z $(which pip) && -z $(which pip3) ]]; then echo "python/pip not installed" return fi From 3a917ee68360e70c7dcacc7922e6d3e426dbb5bd Mon Sep 17 00:00:00 2001 From: Alexander Serowy Date: Thu, 1 Apr 2021 14:00:32 +0200 Subject: [PATCH 0118/1541] made mkdir more robust --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index aaa0e0b..fdce7d5 100755 --- a/install.sh +++ b/install.sh @@ -35,7 +35,7 @@ heading "old nvim config will be deleted so watchout :0" # copying config -rm -rf ~/.config/nvim/ && mkdir ~/.config/nvim +rm -rf ~/.config/nvim/ && mkdir -p ~/.config/nvim cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim #for f in `find -E . -regex ".*\.vim$|.*\.lua$"`; do From 446c8f899c9395d6c9a1e6aac55d92aef7d7509f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 2 Apr 2021 00:23:12 +0530 Subject: [PATCH 0119/1541] clean up --- lua/bufferline/lua.lua | 2 ++ lua/mappings/lua.lua | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lua/bufferline/lua.lua b/lua/bufferline/lua.lua index 2f6d37d..81d65f4 100644 --- a/lua/bufferline/lua.lua +++ b/lua/bufferline/lua.lua @@ -60,8 +60,10 @@ vim.g.mapleader = " " --command that adds new buffer and moves to it vim.api.nvim_command "com -nargs=? -complete=file_in_path New badd | blast" vim.api.nvim_set_keymap("n","",":New ", opt) + --removing a buffer vim.api.nvim_set_keymap("n","",[[bdelete]], opt) + -- tabnew and tabprev vim.api.nvim_set_keymap("n", "", [[BufferLineCycleNext]], opt) vim.api.nvim_set_keymap("n", "", [[BufferLineCyclePrev]], opt) diff --git a/lua/mappings/lua.lua b/lua/mappings/lua.lua index da92370..dc4df5a 100644 --- a/lua/mappings/lua.lua +++ b/lua/mappings/lua.lua @@ -6,9 +6,14 @@ local function map(mode, lhs, rhs, opts) vim.api.nvim_set_keymap(mode, lhs, rhs, options) end --- keybind list +-- copy any selected text with pressing y map("", "c", '"+y') --- open terminals -map("n", "" , [[ vnew term://bash]] , opt) -- split term vertically , over the right -map("n", "" , [[ split term://bash | resize 10 ]] , opt) -- split term vertically , over the right + +-- OPEN TERMINALS -- + +-- split term vertically , over the right +map("n", "", [[vnew term://bash ]], opt) + +-- split term vertically , over the right +map("n", "", [[ split term://bash | resize 10 ]], opt) From 49b63d38bc710ff522c24f32ad1571a4bd33f81c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 2 Apr 2021 00:24:26 +0530 Subject: [PATCH 0120/1541] typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 78aac09..f7f8433 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ I'd install it first and add its setup line : space is the leader key -- Ctrl b Open terminal vertically over right +- Ctrl l Open terminal vertically over right - Ctrl x Open terminal horizontally below the current window - Ctrl n toggle neovim tree - Ctrl a copies everything in the current file From aff50c8c15fb589904cd2a6acab7b8bd3d45810a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 2 Apr 2021 11:06:20 +0530 Subject: [PATCH 0121/1541] add better comments and clean up --- lua/mappings/lua.lua | 12 +++---- lua/nvim-compe/lua.lua | 1 + lua/nvim-lspconfig/lua.lua | 71 ++++++++++++++++++++------------------ lua/nvimTree/lua.lua | 34 +++++++++--------- lua/pluginsList/lua.lua | 1 + lua/statusline/lua.lua | 7 ++-- lua/telescope-nvim/lua.lua | 5 ++- 7 files changed, 68 insertions(+), 63 deletions(-) diff --git a/lua/mappings/lua.lua b/lua/mappings/lua.lua index dc4df5a..aa3b5df 100644 --- a/lua/mappings/lua.lua +++ b/lua/mappings/lua.lua @@ -9,11 +9,9 @@ end -- copy any selected text with pressing y map("", "c", '"+y') +-- OPEN TERMINALS -- +map("n", "", [[vnew term://bash ]], opt) -- open term over right +map("n", "", [[ split term://bash | resize 10 ]], opt) -- open term bottom --- OPEN TERMINALS -- - --- split term vertically , over the right -map("n", "", [[vnew term://bash ]], opt) - --- split term vertically , over the right -map("n", "", [[ split term://bash | resize 10 ]], opt) +-- COPY EVERYTHING -- +map("n", "", [[ %y+]], opt) diff --git a/lua/nvim-compe/lua.lua b/lua/nvim-compe/lua.lua index df6b263..0eb539c 100644 --- a/lua/nvim-compe/lua.lua +++ b/lua/nvim-compe/lua.lua @@ -43,6 +43,7 @@ local check_back_space = function() end end +-- tab completion _G.tab_complete = function() if vim.fn.pumvisible() == 1 then diff --git a/lua/nvim-lspconfig/lua.lua b/lua/nvim-lspconfig/lua.lua index b77f9e8..304d7fd 100644 --- a/lua/nvim-lspconfig/lua.lua +++ b/lua/nvim-lspconfig/lua.lua @@ -1,42 +1,45 @@ vim.cmd [[packadd nvim-lspconfig]] vim.cmd [[packadd nvim-compe]] -local nvim_lsp = require('lspconfig') + +local nvim_lsp = require("lspconfig") + function on_attach(client) + local function buf_set_keymap(...) + vim.api.nvim_buf_set_keymap(bufnr, ...) + end + local function buf_set_option(...) + vim.api.nvim_buf_set_option(bufnr, ...) + end + buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") - local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end - local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end + -- Mappings. + local opts = {noremap = true, silent = true} + buf_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) + buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) + buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()", opts) + buf_set_keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) + buf_set_keymap("n", "", "lua vim.lsp.buf.signature_help()", opts) + buf_set_keymap("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) + buf_set_keymap("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) + buf_set_keymap("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) + buf_set_keymap("n", "D", "lua vim.lsp.buf.type_definition()", opts) + buf_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", opts) + buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()", opts) + buf_set_keymap("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) + buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) + buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) + buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) - buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') + -- Set some keybinds conditional on server capabilities + if client.resolved_capabilities.document_formatting then + buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) + elseif client.resolved_capabilities.document_range_formatting then + buf_set_keymap("n", "f", "lua vim.lsp.buf.range_formatting()", opts) + end +end - -- Mappings. - local opts = { noremap=true, silent=true } - buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) - buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opts) - buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) - buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) - buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) - buf_set_keymap('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) - buf_set_keymap('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) - buf_set_keymap('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) - buf_set_keymap('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) - buf_set_keymap('n', 'rn', 'lua vim.lsp.buf.rename()', opts) - buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', opts) - buf_set_keymap('n', 'e', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) - buf_set_keymap('n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) - buf_set_keymap('n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) - buf_set_keymap('n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) - - -- Set some keybinds conditional on server capabilities - if client.resolved_capabilities.document_formatting then - buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) - elseif client.resolved_capabilities.document_range_formatting then - buf_set_keymap("n", "f", "lua vim.lsp.buf.range_formatting()", opts) - end - -end - -local servers = { "tsserver", "cssls", "pyls", "html" } +local servers = {"tsserver", "cssls", "pyls", "html"} for _, lsp in ipairs(servers) do - nvim_lsp[lsp].setup { on_attach = on_attach } -end \ No newline at end of file + nvim_lsp[lsp].setup {on_attach = on_attach} +end diff --git a/lua/nvimTree/lua.lua b/lua/nvimTree/lua.lua index 4ec583e..34e671f 100644 --- a/lua/nvimTree/lua.lua +++ b/lua/nvimTree/lua.lua @@ -2,27 +2,29 @@ vim.cmd [[packadd nvim-tree.lua]] vim.o.termguicolors = true -vim.g.nvim_tree_side = "left" -vim.g.nvim_tree_width = 25 -vim.g.nvim_tree_ignore = {".git", "node_modules", ".cache"} -vim.g.nvim_tree_auto_open = 0 -vim.g.nvim_tree_auto_close = 0 -vim.g.nvim_tree_quit_on_open = 0 -vim.g.nvim_tree_follow = 1 -vim.g.nvim_tree_indent_markers = 1 -vim.g.nvim_tree_hide_dotfiles = 1 -vim.g.nvim_tree_git_hl = 1 -vim.g.nvim_tree_root_folder_modifier = ":~" -vim.g.nvim_tree_tab_open = 1 -vim.g.nvim_tree_allow_resize = 1 +local g = vim.g -vim.g.nvim_tree_show_icons = { +g.nvim_tree_side = "left" +g.nvim_tree_width = 25 +g.nvim_tree_ignore = {".git", "node_modules", ".cache"} +g.nvim_tree_auto_open = 0 +g.nvim_tree_auto_close = 0 +g.nvim_tree_quit_on_open = 0 +g.nvim_tree_follow = 1 +g.nvim_tree_indent_markers = 1 +g.nvim_tree_hide_dotfiles = 1 +g.nvim_tree_git_hl = 1 +g.nvim_tree_root_folder_modifier = ":~" +g.nvim_tree_tab_open = 1 +g.nvim_tree_allow_resize = 1 + +g.nvim_tree_show_icons = { git = 1, folders = 1, files = 1 } -vim.g.nvim_tree_icons = { +g.nvim_tree_icons = { default = " ", symlink = " ", git = { @@ -55,7 +57,7 @@ vim.api.nvim_set_keymap( } ) -vim.g.nvim_tree_bindings = { +g.nvim_tree_bindings = { [""] = get_lua_cb("edit"), ["o"] = get_lua_cb("edit"), ["<2-LeftMouse>"] = get_lua_cb("edit"), diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index a4f894d..e400346 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -1,6 +1,7 @@ -- check if packer is installed (~/local/share/nvim/site/pack) local packer_exists = pcall(vim.cmd, [[packadd packer.nvim]]) +-- add { } , when the plugin needs a different branch, loading the plugin with certain commands return require("packer").startup( function() use {"wbthomason/packer.nvim", opt = true} diff --git a/lua/statusline/lua.lua b/lua/statusline/lua.lua index 63a5267..9096a9e 100644 --- a/lua/statusline/lua.lua +++ b/lua/statusline/lua.lua @@ -1,6 +1,7 @@ local gl = require("galaxyline") local gls = gl.section -gl.short_line_list = {" "} + +gl.short_line_list = {" "} -- keeping this table { } as empty will show inactive statuslines local colors = { bg = "#282c34", @@ -31,7 +32,7 @@ gls.left[1] = { } gls.left[2] = { - ViMode = { + statusIcon = { provider = function() return "  " end, @@ -168,7 +169,7 @@ gls.right[3] = { } gls.right[4] = { - SiMode = { + ViMode = { provider = function() local alias = { n = "NORMAL", diff --git a/lua/telescope-nvim/lua.lua b/lua/telescope-nvim/lua.lua index 460298f..b338935 100644 --- a/lua/telescope-nvim/lua.lua +++ b/lua/telescope-nvim/lua.lua @@ -60,7 +60,7 @@ local opt = {noremap = true, silent = true} vim.g.mapleader = " " --- mappings +-- mappings vim.api.nvim_set_keymap("n", "ff", [[lua require('telescope.builtin').find_files()]], opt) vim.api.nvim_set_keymap( "n", @@ -68,9 +68,8 @@ vim.api.nvim_set_keymap( [[lua require('telescope').extensions.media_files.media_files()]], opt ) + vim.api.nvim_set_keymap("n", "fb", [[lua require('telescope.builtin').buffers()]], opt) vim.api.nvim_set_keymap("n", "fh", [[lua require('telescope.builtin').help_tags()]], opt) vim.api.nvim_set_keymap("n", "fo", [[lua require('telescope.builtin').oldfiles()]], opt) vim.api.nvim_set_keymap("n", "fm", [[ Neoformat]], opt) - -vim.api.nvim_set_keymap("n", "", [[ %y+]], opt) From cb64b0ef44c97f3370357af79404675feb3e7f4d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 2 Apr 2021 11:18:34 +0530 Subject: [PATCH 0122/1541] avoid using default plugin names for plugin configs --- init.lua | 10 +++++----- lua/{nvim-compe => compe}/lua.lua | 0 lua/{web-devicons => file-icons}/lua.lua | 0 lua/{nvim-lspconfig => lspconfig}/lua.lua | 0 lua/{utils => misc-utils}/lua.lua | 0 lua/pluginsList/lua.lua | 2 +- lua/{telescope-nvim => telescope}/lua.lua | 0 7 files changed, 6 insertions(+), 6 deletions(-) rename lua/{nvim-compe => compe}/lua.lua (100%) rename lua/{web-devicons => file-icons}/lua.lua (100%) rename lua/{nvim-lspconfig => lspconfig}/lua.lua (100%) rename lua/{utils => misc-utils}/lua.lua (100%) rename lua/{telescope-nvim => telescope}/lua.lua (100%) diff --git a/init.lua b/init.lua index 790183a..8035737 100644 --- a/init.lua +++ b/init.lua @@ -1,19 +1,19 @@ -- load all plugins require("pluginsList.lua") -require("web-devicons.lua") +require("file-icons.lua") -require("utils.lua") +require("misc-utils.lua") require("nvimTree.lua") require("bufferline.lua") require("statusline.lua") -require("telescope-nvim.lua") +require("telescope.lua") require("gitsigns.lua") require "colorizer".setup() -- lsp -require("nvim-lspconfig.lua") -require("nvim-compe.lua") +require("lspconfig.lua") +require("compe.lua") local cmd = vim.cmd local g = vim.g diff --git a/lua/nvim-compe/lua.lua b/lua/compe/lua.lua similarity index 100% rename from lua/nvim-compe/lua.lua rename to lua/compe/lua.lua diff --git a/lua/web-devicons/lua.lua b/lua/file-icons/lua.lua similarity index 100% rename from lua/web-devicons/lua.lua rename to lua/file-icons/lua.lua diff --git a/lua/nvim-lspconfig/lua.lua b/lua/lspconfig/lua.lua similarity index 100% rename from lua/nvim-lspconfig/lua.lua rename to lua/lspconfig/lua.lua diff --git a/lua/utils/lua.lua b/lua/misc-utils/lua.lua similarity index 100% rename from lua/utils/lua.lua rename to lua/misc-utils/lua.lua diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index e400346..1758e23 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -1,7 +1,7 @@ -- check if packer is installed (~/local/share/nvim/site/pack) local packer_exists = pcall(vim.cmd, [[packadd packer.nvim]]) --- add { } , when the plugin needs a different branch, loading the plugin with certain commands +-- using { } when using a different branch of the plugin or loading the plugin with certain commands return require("packer").startup( function() use {"wbthomason/packer.nvim", opt = true} diff --git a/lua/telescope-nvim/lua.lua b/lua/telescope/lua.lua similarity index 100% rename from lua/telescope-nvim/lua.lua rename to lua/telescope/lua.lua From 7adcc2a55d6bf4a3f1c1ccfee3f81330873d5efa Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 2 Apr 2021 12:18:44 +0530 Subject: [PATCH 0123/1541] config structure --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index f7f8433..40c161d 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,19 @@ without Treesitter : with Treesitter :
+#Config structure + +``` + nvim + ├──init.lua + └──lua + └──foo + └──lua.lua +``` + +- The init.lua is used instead of init.vim. +- The lua folder contains modules , in the example above "foo" could be considered as a module and it contains a lua.lua file in which you could write your config in lua , its like splitting the overall config into small bit . To load/source that "foo" module , you need to specify it in init.lua like this : require('foo.lua'). + # Features - File navigation with Nvimtree From 32763ab304d1159a1b47432ea20784178ea189db Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 2 Apr 2021 12:34:46 +0530 Subject: [PATCH 0124/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 40c161d..3ad362b 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ without Treesitter : with Treesitter :
-#Config structure +# Config structure ``` nvim From f7e027085b20d601890083b9556bb16ceb3142b1 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 2 Apr 2021 13:05:54 +0530 Subject: [PATCH 0125/1541] use nvim-base16 instead of base16-vim cuz its fast --- README.md | 2 +- init.lua | 6 ++++-- lua/pluginsList/lua.lua | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 40c161d..3ad362b 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ without Treesitter : with Treesitter :
-#Config structure +# Config structure ``` nvim diff --git a/init.lua b/init.lua index 8035737..c74b2f4 100644 --- a/init.lua +++ b/init.lua @@ -21,12 +21,14 @@ local g = vim.g g.mapleader = " " g.auto_save = 1 --- colorscheme +-- colorscheme related stuff -cmd "colorscheme base16-onedark" cmd "syntax enable" cmd "syntax on" +local base16 = require "base16" +base16(base16.themes["onedark"], true) + -- blankline local indent = 2 diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 1758e23..d26fad6 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -7,15 +7,14 @@ return require("packer").startup( use {"wbthomason/packer.nvim", opt = true} use {"lukas-reineke/indent-blankline.nvim", branch = "lua"} + use "norcalli/nvim-base16.lua" use "kyazdani42/nvim-web-devicons" use "kyazdani42/nvim-tree.lua" use "nvim-lua/plenary.nvim" use "lewis6991/gitsigns.nvim" - use "glepnir/galaxyline.nvim" use "akinsho/nvim-bufferline.lua" use "907th/vim-auto-save" use "nvim-treesitter/nvim-treesitter" - use "chriskempson/base16-vim" use "norcalli/nvim-colorizer.lua" use "ryanoasis/vim-devicons" use "sbdchd/neoformat" From 4647a847e3f52808be4ec357daf5930ff010c62d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 2 Apr 2021 13:23:32 +0530 Subject: [PATCH 0126/1541] Update lua.lua --- lua/pluginsList/lua.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index d26fad6..2bb7659 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -13,6 +13,7 @@ return require("packer").startup( use "nvim-lua/plenary.nvim" use "lewis6991/gitsigns.nvim" use "akinsho/nvim-bufferline.lua" + use "glepnir/galaxyline.nvim" use "907th/vim-auto-save" use "nvim-treesitter/nvim-treesitter" use "norcalli/nvim-colorizer.lua" @@ -28,5 +29,6 @@ return require("packer").startup( use "nvim-telescope/telescope-media-files.nvim" use "nvim-lua/popup.nvim" use "karb94/neoscroll.nvim" + end ) From 7c07bb8c8c17d146d80f3185ab46be13209d7d15 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 3 Apr 2021 23:36:25 +0530 Subject: [PATCH 0127/1541] rm plugin folder since it gets automatically created whenever updating plugins --- README.md | 27 ++++--- plugin/packer_compiled.vim | 141 ------------------------------------- 2 files changed, 16 insertions(+), 152 deletions(-) delete mode 100644 plugin/packer_compiled.vim diff --git a/README.md b/README.md index 3ad362b..cd8caf3 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,17 @@ without Treesitter : with Treesitter :
+### nvim-base16 - + +contains a collection of all base16 themes for vim , plugin written in lua (comparison of base16-vim and nvim-base16): + +nvim-base16 doesnt even take time to load unlike base16-vim which was eating half of the loadup time! ( the below screenshot was taken and tested on my old pentium laptop , so results might differ) +
+ +(neovim loads pretty fast on ssds) + +
+ # Config structure ``` @@ -112,7 +123,8 @@ with Treesitter : # Clone my setup - - Install neovim-nightly , also use a nerdfont on your terminal. -- run the install.sh script as root or copy the configs manually : +- run the install.sh (this might work only on nix systems) or do it manually : + - Install packer.nvim ```shell @@ -120,9 +132,9 @@ git clone https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim ``` -- copy all config files in from this repo except ( plugin folder as it has config related to my system's username! ) -- Open neovim and install all plugins , :PackerInstall and :TSUpdate -- Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) +- copy lua folder and init.lua into ~/.config/nvim +- Open neovim and install all plugins , :PackerInstall (let treesitter install all its extensionsm +- Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) , this usually depends on the language support you want to add in your neovim config. ``` sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier @@ -163,13 +175,6 @@ I'd install it first and add its setup line : - add snippets support - show statusline in inactive windows -# Troubleshooting - - -![image](https://user-images.githubusercontent.com/59060246/111059898-f096cf00-84be-11eb-977a-f91d622ee5b9.png) - -if you get any errors with packer.nvim , then remove the ~/.config/nvim/plugin/packer_nvim.vim file since it just has file paths for my system -and re-install packer.nvim - # Contact - - My linux / unix related ricing community: https://t.me/DE_WM (telegram) diff --git a/plugin/packer_compiled.vim b/plugin/packer_compiled.vim deleted file mode 100644 index 3831e12..0000000 --- a/plugin/packer_compiled.vim +++ /dev/null @@ -1,141 +0,0 @@ -" Automatically generated packer.nvim plugin loader code - -if !has('nvim-0.5') - echohl WarningMsg - echom "Invalid Neovim version for packer.nvim!" - echohl None - finish -endif - -packadd packer.nvim - -try - -lua << END -local package_path_str = "/home/sid/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/sid/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/sid/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/sid/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" -local install_cpath_pattern = "/home/sid/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" -if not string.find(package.path, package_path_str, 1, true) then - package.path = package.path .. ';' .. package_path_str -end - -if not string.find(package.cpath, install_cpath_pattern, 1, true) then - package.cpath = package.cpath .. ';' .. install_cpath_pattern -end - -local function try_loadstring(s, component, name) - local success, result = pcall(loadstring(s)) - if not success then - print('Error running ' .. component .. ' for ' .. name) - error(result) - end - return result -end - -_G.packer_plugins = { - ["base16-vim"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/base16-vim" - }, - ["galaxyline.nvim"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/galaxyline.nvim" - }, - ["gitsigns.nvim"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/gitsigns.nvim" - }, - ["indent-blankline.nvim"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim" - }, - indentLine = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/indentLine" - }, - ["lspkind-nvim"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/lspkind-nvim" - }, - neoformat = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/neoformat" - }, - ["nvim-autopairs"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-autopairs" - }, - ["nvim-bufferline.lua"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-bufferline.lua" - }, - ["nvim-colorizer.lua"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua" - }, - ["nvim-compe"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-compe" - }, - ["nvim-lspconfig"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-lspconfig" - }, - ["nvim-tree.lua"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-tree.lua" - }, - ["nvim-treesitter"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-treesitter" - }, - ["nvim-web-devicons"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/nvim-web-devicons" - }, - ["packer.nvim"] = { - loaded = false, - needs_bufread = false, - path = "/home/sid/.local/share/nvim/site/pack/packer/opt/packer.nvim" - }, - ["plenary.nvim"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/plenary.nvim" - }, - ["popup.nvim"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/popup.nvim" - }, - ["startuptime.vim"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/startuptime.vim" - }, - ["telescope-media-files.nvim"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/telescope-media-files.nvim" - }, - ["telescope.nvim"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/telescope.nvim" - }, - ["vim-auto-save"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/vim-auto-save" - }, - ["vim-closetag"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/vim-closetag" - }, - ["vim-devicons"] = { - loaded = true, - path = "/home/sid/.local/share/nvim/site/pack/packer/start/vim-devicons" - } -} - -END - -catch - echohl ErrorMsg - echom "Error in packer_compiled: " .. v:exception - echom "Please check your config for correctness" - echohl None -endtry From aecb9e6a6c8cb6f02c4769c4f16e13529c08442b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 4 Apr 2021 06:50:22 +0530 Subject: [PATCH 0128/1541] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cd8caf3..5e51330 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,8 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal # Clone my setup - - Install neovim-nightly , also use a nerdfont on your terminal. -- run the install.sh (this might work only on nix systems) or do it manually : +- run the install.sh (this might work only on nix systems) and open neovim , do :PackerInstall +- or do it manually : - Install packer.nvim From 0cca21ffeabb0b2660e5585d8fe2a2c6b8ee7624 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 4 Apr 2021 11:35:37 +0530 Subject: [PATCH 0129/1541] hide line numbers for terminal --- init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.lua b/init.lua index c74b2f4..d1d37c7 100644 --- a/init.lua +++ b/init.lua @@ -86,3 +86,7 @@ augroup NvimTree ]], false ) + +vim.api.nvim_exec([[ + au BufEnter term://* setlocal nonumber +]], false) From 425eb4cbb58408393a41f4591e384f62391bb74f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 4 Apr 2021 14:56:15 +0530 Subject: [PATCH 0130/1541] make ugly fat inactive StatusLineNC look good --- init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.lua b/init.lua index d1d37c7..610659a 100644 --- a/init.lua +++ b/init.lua @@ -87,6 +87,10 @@ augroup NvimTree false ) +-- remove line n.os from terminal vim.api.nvim_exec([[ au BufEnter term://* setlocal nonumber ]], false) + +-- make inactive statuslines look thin +cmd("highlight! StatusLineNC gui=underline guibg=NONE guifg=#3e4451") From a57b352db8a9e89ac4839c624f4dec101119afaf Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 4 Apr 2021 17:17:11 +0530 Subject: [PATCH 0131/1541] remove blankline from terminal --- init.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 610659a..667acca 100644 --- a/init.lua +++ b/init.lua @@ -39,21 +39,24 @@ g.indent_blankline_char = "▏" cmd("hi IndentBlanklineChar guifg=#373b43") g.indent_blankline_filetype_exclude = {"help", "terminal"} +g.indent_blankline_buftype_exclude = {"terminal"} + g.indent_blankline_show_trailing_blankline_indent = false g.indent_blankline_show_first_indent_level = false require("treesitter.lua") require("mappings.lua") --- highlights +-- highlights -- cmd("hi LineNr guibg=NONE") cmd("hi SignColumn guibg=NONE") -cmd("hi VertSplit guibg=NONE") +cmd("hi VertSplit guibg=NONE guifg=#3e4451") cmd("hi DiffAdd guifg=#81A1C1 guibg = none") cmd("hi DiffChange guifg =#3A3E44 guibg = none") cmd("hi DiffModified guifg = #81A1C1 guibg = none") cmd("hi EndOfBuffer guifg=#282c34") +-- telescope stuff and popupmenu cmd("hi TelescopeBorder guifg=#3e4451") cmd("hi TelescopePromptBorder guifg=#3e4451") cmd("hi TelescopeResultsBorder guifg=#3e4451") @@ -87,10 +90,8 @@ augroup NvimTree false ) --- remove line n.os from terminal vim.api.nvim_exec([[ au BufEnter term://* setlocal nonumber ]], false) --- make inactive statuslines look thin cmd("highlight! StatusLineNC gui=underline guibg=NONE guifg=#3e4451") From afff99e54561689f4dbaa60f7cce81cf9698dd22 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 4 Apr 2021 17:29:05 +0530 Subject: [PATCH 0132/1541] better comments --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index 667acca..627187f 100644 --- a/init.lua +++ b/init.lua @@ -90,8 +90,10 @@ augroup NvimTree false ) +-- hide line numbers in terminal windows vim.api.nvim_exec([[ au BufEnter term://* setlocal nonumber ]], false) +-- inactive statuslines as thin splitlines cmd("highlight! StatusLineNC gui=underline guibg=NONE guifg=#3e4451") From e948f32cd5b26d8c179eb18be9a1c47ea26b4e55 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 6 Apr 2021 08:29:37 +0530 Subject: [PATCH 0133/1541] customization: darker colors --- init.lua | 37 ++++++++++++++++--------------------- lua/bufferline/lua.lua | 34 +++++++++++++++++++--------------- lua/compe/lua.lua | 20 ++++++++++---------- lua/lspconfig/lua.lua | 2 +- lua/pluginsList/lua.lua | 2 ++ lua/statusline/lua.lua | 6 +++--- 6 files changed, 51 insertions(+), 50 deletions(-) diff --git a/init.lua b/init.lua index 627187f..50f7e69 100644 --- a/init.lua +++ b/init.lua @@ -36,7 +36,7 @@ local indent = 2 g.indentLine_enabled = 1 g.indent_blankline_char = "▏" -cmd("hi IndentBlanklineChar guifg=#373b43") +cmd("hi IndentBlanklineChar guifg=#2a2e36") g.indent_blankline_filetype_exclude = {"help", "terminal"} g.indent_blankline_buftype_exclude = {"terminal"} @@ -48,25 +48,28 @@ require("treesitter.lua") require("mappings.lua") -- highlights -- -cmd("hi LineNr guibg=NONE") +cmd("hi LineNr guifg=#383c44 guibg=NONE") +cmd("hi Comment guifg=#3d4149") + cmd("hi SignColumn guibg=NONE") -cmd("hi VertSplit guibg=NONE guifg=#3e4451") +cmd("hi VertSplit guibg=NONE guifg=#2a2e36") cmd("hi DiffAdd guifg=#81A1C1 guibg = none") cmd("hi DiffChange guifg =#3A3E44 guibg = none") cmd("hi DiffModified guifg = #81A1C1 guibg = none") -cmd("hi EndOfBuffer guifg=#282c34") +cmd("hi EndOfBuffer guifg=#1e222a") -- telescope stuff and popupmenu -cmd("hi TelescopeBorder guifg=#3e4451") -cmd("hi TelescopePromptBorder guifg=#3e4451") -cmd("hi TelescopeResultsBorder guifg=#3e4451") +cmd("hi TelescopeBorder guifg=#2a2e36") +cmd("hi TelescopePromptBorder guifg=#2a2e36") +cmd("hi TelescopeResultsBorder guifg=#2a2e36") cmd("hi TelescopePreviewBorder guifg=#525865") -cmd("hi PmenuSel guibg=#98c379") +cmd("hi PmenuSel guibg=#98c379") +cmd("hi Pmenu guibg=#282c34") -- tree folder name , icon color cmd("hi NvimTreeFolderIcon guifg = #61afef") cmd("hi NvimTreeFolderName guifg = #61afef") -cmd("hi NvimTreeIndentMarker guifg=#545862") +cmd("hi NvimTreeIndentMarker guifg=#383c44") cmd("hi Normal guibg=NONE ctermbg=NONE") @@ -78,17 +81,6 @@ require("lspkind").init( ) -- nvimTree bg color -cmd("hi CustomExplorerBg guibg=#242830") - -vim.api.nvim_exec( - [[ -augroup NvimTree - au! - au FileType NvimTree setlocal winhighlight=Normal:CustomExplorerBg - augroup END - ]], - false -) -- hide line numbers in terminal windows vim.api.nvim_exec([[ @@ -96,4 +88,7 @@ vim.api.nvim_exec([[ ]], false) -- inactive statuslines as thin splitlines -cmd("highlight! StatusLineNC gui=underline guibg=NONE guifg=#3e4451") +cmd("highlight! StatusLineNC gui=underline guibg=NONE guifg=#383c44") + +-- smooth scroll +require("neoscroll").setup() diff --git a/lua/bufferline/lua.lua b/lua/bufferline/lua.lua index 81d65f4..c661f69 100644 --- a/lua/bufferline/lua.lua +++ b/lua/bufferline/lua.lua @@ -1,6 +1,6 @@ vim.o.termguicolors = true --- colors for active , inactive buffer tabs +-- colors for active , inactive uffer tabs require "bufferline".setup { options = { buffer_close_icon = "", @@ -19,36 +19,40 @@ require "bufferline".setup { highlights = { background = { guifg = comment_fg, - guibg = "#282c34" + guibg = "#1e222a" }, fill = { guifg = comment_fg, - guibg = "#282c34" + guibg = "#1e222a" }, buffer_selected = { guifg = normal_fg, - guibg = "#3A3E44", + guibg = "#282c34", gui = "bold" }, + buffer_visible = { + guifg = "#3e4451", + guibg = "#1e222a" + }, separator_visible = { - guifg = "#282c34", - guibg = "#282c34" + guifg = "#1e222a", + guibg = "#1e222a" }, separator_selected = { - guifg = "#282c34", - guibg = "#282c34" + guifg = "#1e222a", + guibg = "#1e222a" }, separator = { - guifg = "#282c34", - guibg = "#282c34" + guifg = "#1e222a", + guibg = "#1e222a" }, indicator_selected = { - guifg = "#282c34", - guibg = "#282c34" + guifg = "#1e222a", + guibg = "#1e222a" }, modified_selected = { guifg = string_fg, - guibg = "#3A3E44" + guibg = "#353b45" } } } @@ -59,10 +63,10 @@ vim.g.mapleader = " " --command that adds new buffer and moves to it vim.api.nvim_command "com -nargs=? -complete=file_in_path New badd | blast" -vim.api.nvim_set_keymap("n","",":New ", opt) +vim.api.nvim_set_keymap("n", "", ":New ", opt) --removing a buffer -vim.api.nvim_set_keymap("n","",[[bdelete]], opt) +vim.api.nvim_set_keymap("n", "", [[bdelete]], opt) -- tabnew and tabprev vim.api.nvim_set_keymap("n", "", [[BufferLineCycleNext]], opt) diff --git a/lua/compe/lua.lua b/lua/compe/lua.lua index 0eb539c..d65845b 100644 --- a/lua/compe/lua.lua +++ b/lua/compe/lua.lua @@ -35,24 +35,24 @@ local t = function(str) end local check_back_space = function() - local col = vim.fn.col('.') - 1 - if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then + local col = vim.fn.col(".") - 1 + if col == 0 or vim.fn.getline("."):sub(col, col):match("%s") then return true else return false end end --- tab completion +-- tab completion _G.tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t "" - elseif check_back_space() then - return t "" - else - return vim.fn['compe#complete']() - end + if vim.fn.pumvisible() == 1 then + return t "" + elseif check_back_space() then + return t "" + else + return vim.fn["compe#complete"]() + end end _G.s_tab_complete = function() if vim.fn.pumvisible() == 1 then diff --git a/lua/lspconfig/lua.lua b/lua/lspconfig/lua.lua index 304d7fd..24b84a7 100644 --- a/lua/lspconfig/lua.lua +++ b/lua/lspconfig/lua.lua @@ -39,7 +39,7 @@ function on_attach(client) end end -local servers = {"tsserver", "cssls", "pyls", "html"} +local servers = {"tsserver", "cssls", "html"} for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup {on_attach = on_attach} end diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 2bb7659..0f4142c 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -29,6 +29,8 @@ return require("packer").startup( use "nvim-telescope/telescope-media-files.nvim" use "nvim-lua/popup.nvim" use "karb94/neoscroll.nvim" + + use "nekonako/xresources-nvim" end ) diff --git a/lua/statusline/lua.lua b/lua/statusline/lua.lua index 9096a9e..ad3d9df 100644 --- a/lua/statusline/lua.lua +++ b/lua/statusline/lua.lua @@ -4,8 +4,8 @@ local gls = gl.section gl.short_line_list = {" "} -- keeping this table { } as empty will show inactive statuslines local colors = { - bg = "#282c34", - line_bg = "#282c34", + bg = "#1e222a", + line_bg = "#1e222a", fg = "#D8DEE9", fg_green = "#65a380", yellow = "#A3BE8C", @@ -17,7 +17,7 @@ local colors = { magenta = "#c678dd", blue = "#22262C", red = "#DF8890", - lightbg = "#3C4048", + lightbg = "#282c34", nord = "#81A1C1", greenYel = "#EBCB8B" } From e9d27bda68d74b8c32d70092b9e151a7ab04562d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 6 Apr 2021 08:30:07 +0530 Subject: [PATCH 0134/1541] pyls support --- lua/lspconfig/lua.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lspconfig/lua.lua b/lua/lspconfig/lua.lua index 24b84a7..a5eb803 100644 --- a/lua/lspconfig/lua.lua +++ b/lua/lspconfig/lua.lua @@ -39,7 +39,7 @@ function on_attach(client) end end -local servers = {"tsserver", "cssls", "html"} +local servers = {"tsserver", "cssls", "html" , "pyls"} for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup {on_attach = on_attach} end From bc9649e653b9c865c2c6f0487a0bc45fc588963e Mon Sep 17 00:00:00 2001 From: marvelman3284 Date: Mon, 5 Apr 2021 23:51:51 -0400 Subject: [PATCH 0135/1541] Allow for users to choose which lsps to install --- install.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index fdce7d5..5a3108f 100755 --- a/install.sh +++ b/install.sh @@ -3,7 +3,20 @@ BASE=$(git rev-parse --show-toplevel) LSP_BIN_PATH=$HOME/.local/bin default_lsp_langs="css html ts rust python" -lsp_langs=${@:-"$default_lsp_langs"} +lsp_langs="" + +choose_langs() { + read -p "Would you like to install $1 lsp?(y/n)" lang + if [ "$lang" = "y" ] + then + lsp_langs+="$1 " + fi +} + +for lang in $default_lsp_langs +do + choose_langs $lang +done pfx="~~~~~ " heading() { From 3865b28f6df055bd825a4d826de35e75096e7858 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 6 Apr 2021 09:35:22 +0530 Subject: [PATCH 0136/1541] install.sh : prompt users for shell --- install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install.sh b/install.sh index fdce7d5..22ae84b 100755 --- a/install.sh +++ b/install.sh @@ -38,6 +38,13 @@ heading "old nvim config will be deleted so watchout :0" rm -rf ~/.config/nvim/ && mkdir -p ~/.config/nvim cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim +# change shell for nvim +read -p "which shell do you use?: " shellname +echo "$shellname" + +sed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua +echo "shell changed to $shellname on nvim successfully!" + #for f in `find -E . -regex ".*\.vim$|.*\.lua$"`; do # p=${f#*/} # echo -e '\t' ${p} From 4d4622d2a0a2ad1b77624d7e239d68639f2a69b2 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 6 Apr 2021 10:27:32 +0530 Subject: [PATCH 0137/1541] clean up --- init.lua | 74 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/init.lua b/init.lua index 50f7e69..e1ecc64 100644 --- a/init.lua +++ b/init.lua @@ -1,19 +1,17 @@ -- load all plugins -require("pluginsList.lua") -require("file-icons.lua") +require "pluginsList.lua" +require "file-icons.lua" -require("misc-utils.lua") -require("nvimTree.lua") -require("bufferline.lua") -require("statusline.lua") -require("telescope.lua") +require "misc-utils.lua" +require "bufferline.lua" +require "statusline.lua" -require("gitsigns.lua") -require "colorizer".setup() +require("colorizer").setup() +require("neoscroll").setup() -- smooth scroll -- lsp -require("lspconfig.lua") -require("compe.lua") +require "lspconfig.lua" +require "compe.lua" local cmd = vim.cmd local g = vim.g @@ -36,7 +34,7 @@ local indent = 2 g.indentLine_enabled = 1 g.indent_blankline_char = "▏" -cmd("hi IndentBlanklineChar guifg=#2a2e36") +cmd "hi IndentBlanklineChar guifg=#2a2e36" g.indent_blankline_filetype_exclude = {"help", "terminal"} g.indent_blankline_buftype_exclude = {"terminal"} @@ -48,30 +46,37 @@ require("treesitter.lua") require("mappings.lua") -- highlights -- -cmd("hi LineNr guifg=#383c44 guibg=NONE") -cmd("hi Comment guifg=#3d4149") - -cmd("hi SignColumn guibg=NONE") -cmd("hi VertSplit guibg=NONE guifg=#2a2e36") -cmd("hi DiffAdd guifg=#81A1C1 guibg = none") -cmd("hi DiffChange guifg =#3A3E44 guibg = none") -cmd("hi DiffModified guifg = #81A1C1 guibg = none") -cmd("hi EndOfBuffer guifg=#1e222a") +cmd "hi LineNr guifg=#383c44 guibg=NONE" +cmd "hi Comment guifg=#3d4149" +cmd "hi SignColumn guibg=NONE" +cmd "hi VertSplit guibg=NONE guifg=#2a2e36" +cmd "hi EndOfBuffer guifg=#1e222a" +cmd "hi PmenuSel guibg=#98c379" +cmd "hi Pmenu guibg=#282c34" -- telescope stuff and popupmenu -cmd("hi TelescopeBorder guifg=#2a2e36") -cmd("hi TelescopePromptBorder guifg=#2a2e36") -cmd("hi TelescopeResultsBorder guifg=#2a2e36") -cmd("hi TelescopePreviewBorder guifg=#525865") -cmd("hi PmenuSel guibg=#98c379") -cmd("hi Pmenu guibg=#282c34") +require "telescope.lua" --- tree folder name , icon color -cmd("hi NvimTreeFolderIcon guifg = #61afef") -cmd("hi NvimTreeFolderName guifg = #61afef") -cmd("hi NvimTreeIndentMarker guifg=#383c44") +cmd "hi TelescopeBorder guifg=#2a2e36" +cmd "hi TelescopePromptBorder guifg=#2a2e36" +cmd "hi TelescopeResultsBorder guifg=#2a2e36" +cmd "hi TelescopePreviewBorder guifg=#525865" -cmd("hi Normal guibg=NONE ctermbg=NONE") +-- nvim tree color for folder name and icon +require "nvimTree.lua" + +cmd "hi NvimTreeFolderIcon guifg = #61afef" +cmd "hi NvimTreeFolderName guifg = #61afef" +cmd "hi NvimTreeIndentMarker guifg=#383c44" + +cmd "hi Normal guibg=NONE ctermbg=NONE" + +-- git signs +require "gitsigns.lua" + +cmd "hi DiffAdd guifg=#81A1C1 guibg = none" +cmd "hi DiffChange guifg =#3A3E44 guibg = none" +cmd "hi DiffModified guifg = #81A1C1 guibg = none" require("nvim-autopairs").setup() require("lspkind").init( @@ -80,8 +85,6 @@ require("lspkind").init( } ) --- nvimTree bg color - -- hide line numbers in terminal windows vim.api.nvim_exec([[ au BufEnter term://* setlocal nonumber @@ -89,6 +92,3 @@ vim.api.nvim_exec([[ -- inactive statuslines as thin splitlines cmd("highlight! StatusLineNC gui=underline guibg=NONE guifg=#383c44") - --- smooth scroll -require("neoscroll").setup() From 58443f6d97599c049b3c571cd3a5b5f26a6c9304 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 6 Apr 2021 10:50:23 +0530 Subject: [PATCH 0138/1541] minor changes to lspkind --- init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index e1ecc64..a57f725 100644 --- a/init.lua +++ b/init.lua @@ -79,9 +79,13 @@ cmd "hi DiffChange guifg =#3A3E44 guibg = none" cmd "hi DiffModified guifg = #81A1C1 guibg = none" require("nvim-autopairs").setup() + require("lspkind").init( { - File = " " + with_text = true, + symbol_map = { + Folder = "" + } } ) From f5c59c574a3638c0ce9eb542d5fadc57b3848846 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 8 Apr 2021 07:29:39 +0530 Subject: [PATCH 0139/1541] replace pyls with pyright --- install.sh | 44 +++++++++++++++++-------------------------- lua/lspconfig/lua.lua | 2 +- 2 files changed, 18 insertions(+), 28 deletions(-) diff --git a/install.sh b/install.sh index 8d6e76a..69a02fb 100755 --- a/install.sh +++ b/install.sh @@ -7,14 +7,12 @@ lsp_langs="" choose_langs() { read -p "Would you like to install $1 lsp?(y/n)" lang - if [ "$lang" = "y" ] - then + if [ "$lang" = "y" ]; then lsp_langs+="$1 " fi } -for lang in $default_lsp_langs -do +for lang in $default_lsp_langs; do choose_langs $lang done @@ -26,11 +24,11 @@ heading() { get_platform() { case "$(uname -s)" in - Linux*) platform=Linux;; - Darwin*) platform=Mac;; - CYGWIN*) platform=Cygwin;; - MINGW*) platform=MinGw;; - *) platform="UNKNOWN:${unameOut}" + Linux*) platform=Linux ;; + Darwin*) platform=Mac ;; + CYGWIN*) platform=Cygwin ;; + MINGW*) platform=MinGw ;; + *) platform="UNKNOWN:${unameOut}" ;; esac echo $platform } @@ -39,17 +37,17 @@ heading "installing packer" if [[ ! -e ~/.local/share/nvim/site/pack/packer/start/packer.nvim ]]; then heading "Installing packer" - git clone https://github.com/wbthomason/packer.nvim\ + git clone https://github.com/wbthomason/packer.nvim \ ~/.local/share/nvim/site/pack/packer/start/packer.nvim fi heading "Linking config" heading "old nvim config will be deleted so watchout :0" -# copying config +# copying config rm -rf ~/.config/nvim/ && mkdir -p ~/.config/nvim -cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim +cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim # change shell for nvim read -p "which shell do you use?: " shellname @@ -72,10 +70,10 @@ echo "shell changed to $shellname on nvim successfully!" #nvim --headless +TSUpdate +qa echo -fn_exists() { declare -F "$1" > /dev/null; } +fn_exists() { declare -F "$1" >/dev/null; } warn_path=false -install_node_deps () { +install_node_deps() { if [[ -z $(which npm) ]]; then echo "npm not installed" return @@ -83,14 +81,6 @@ install_node_deps () { sudo npm install -g $@ } -install_python_deps () { - if [[ -z $(which pip) && -z $(which pip3) ]]; then - echo "python/pip not installed" - return - fi - sudo python3 -m pip install $@ -} - install_ts() { install_node_deps typescript typescript-language-server prettier } @@ -114,21 +104,21 @@ install_rust() { fi } -install_python(){ - install_python_deps 'python-language-server[all]' +install_python() { + install_node_deps pyright } for lang in ${lsp_langs}; do - if fn_exists install_$lang ; then + if fn_exists install_$lang; then heading "Installing $lang language server" install_$lang else echo $lang setup not implemented - echo + echo fi done -if [[ ${warn_path} = true ]]; then +if [[ ${warn_path} == true ]]; then echo "" echo "Ensure ${LSP_BIN_PATH} is available in your \$PATH variable" fi diff --git a/lua/lspconfig/lua.lua b/lua/lspconfig/lua.lua index a5eb803..6ea9906 100644 --- a/lua/lspconfig/lua.lua +++ b/lua/lspconfig/lua.lua @@ -39,7 +39,7 @@ function on_attach(client) end end -local servers = {"tsserver", "cssls", "html" , "pyls"} +local servers = {"tsserver", "cssls", "html" , "pyright"} for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup {on_attach = on_attach} end From c62616cfee4c092968df8cd0097c7d46ef468e04 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 8 Apr 2021 07:32:47 +0530 Subject: [PATCH 0140/1541] lighter colors for lineNr,comments --- init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index a57f725..1774b90 100644 --- a/init.lua +++ b/init.lua @@ -46,8 +46,9 @@ require("treesitter.lua") require("mappings.lua") -- highlights -- -cmd "hi LineNr guifg=#383c44 guibg=NONE" -cmd "hi Comment guifg=#3d4149" +cmd "hi LineNr guifg=#42464e guibg=NONE" +cmd "hi Comment guifg=#42464e" + cmd "hi SignColumn guibg=NONE" cmd "hi VertSplit guibg=NONE guifg=#2a2e36" cmd "hi EndOfBuffer guifg=#1e222a" From 14f5e2837403aac158fc1e7759562ee38941681b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 8 Apr 2021 07:38:29 +0530 Subject: [PATCH 0141/1541] highlight current line number --- init.lua | 3 +++ lua/misc-utils/lua.lua | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 1774b90..f337feb 100644 --- a/init.lua +++ b/init.lua @@ -97,3 +97,6 @@ vim.api.nvim_exec([[ -- inactive statuslines as thin splitlines cmd("highlight! StatusLineNC gui=underline guibg=NONE guifg=#383c44") + +cmd "hi clear CursorLine" +cmd "hi cursorlinenr guibg=NONE guifg=#abb2bf" diff --git a/lua/misc-utils/lua.lua b/lua/misc-utils/lua.lua index 9286b5f..8ccdfd4 100644 --- a/lua/misc-utils/lua.lua +++ b/lua/misc-utils/lua.lua @@ -14,19 +14,19 @@ opt("o", "splitright", true) opt("o", "termguicolors", true) opt("w", "number", true) opt("o", "numberwidth", 2) +opt("w", "cul", true) opt("o", "mouse", "a") opt("w", "signcolumn", "yes") opt("o", "cmdheight", 1) -opt("o", "updatetime", 250) -- update interval for gitsigns +opt("o", "updatetime", 250) -- update interval for gitsigns opt("o", "clipboard", "unnamedplus") -- for indenline -opt("b", "expandtab", true ) -opt("b", "shiftwidth", 2 ) - +opt("b", "expandtab", true) +opt("b", "shiftwidth", 2) local M = {} From fe8277103710df9c3aa1da962b50858204a6df08 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 8 Apr 2021 11:12:23 +0530 Subject: [PATCH 0142/1541] mapping for toggling line number --- README.md | 3 ++- lua/mappings/lua.lua | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e51330..c41dbec 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal # Clone my setup - - Install neovim-nightly , also use a nerdfont on your terminal. -- run the install.sh (this might work only on nix systems) and open neovim , do :PackerInstall +- run the install.sh (this might work only on nix systems) and open neovim , do :PackerInstall - or do it manually : - Install packer.nvim @@ -159,6 +159,7 @@ I'd install it first and add its setup line : - Ctrl l Open terminal vertically over right - Ctrl x Open terminal horizontally below the current window - Ctrl n toggle neovim tree +- Shift n toggle line number - Ctrl a copies everything in the current file - select any text + y copies the selected text - leader + f b open all buffers , with telescope diff --git a/lua/mappings/lua.lua b/lua/mappings/lua.lua index aa3b5df..bd56831 100644 --- a/lua/mappings/lua.lua +++ b/lua/mappings/lua.lua @@ -15,3 +15,6 @@ map("n", "", [[ split term://bash | resize 10 ]], opt) -- open ter -- COPY EVERYTHING -- map("n", "", [[ %y+]], opt) + +-- toggle line number +map("n", "", [[ set nu! ]], opt) From 3ef65511c39097696612ba0f018c5c913940873c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 9 Apr 2021 11:42:31 +0530 Subject: [PATCH 0143/1541] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c41dbec..c8a5dff 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,10 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal ``` - The init.lua is used instead of init.vim. -- The lua folder contains modules , in the example above "foo" could be considered as a module and it contains a lua.lua file in which you could write your config in lua , its like splitting the overall config into small bit . To load/source that "foo" module , you need to specify it in init.lua like this : require('foo.lua'). + +- The lua folder contains modules ( config files ) , in the example above "foo" folder could be considered as a module and it contains a lua.lua. +- The lua.lua file is supposed to have any nvim config written in lua , its like splitting the overall config into small bits and make it more organized. +- To load or source that "foo" module (like making it load with init.lua ) , you need to load it in init.lua like this : require('foo.lua'). # Features From 3aadee1106dc70d87f6e25317f38b450baac0fec Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 11 Apr 2021 08:19:59 +0530 Subject: [PATCH 0144/1541] add telescope media extension required deps --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c8a5dff..2b426c8 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,9 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal - Install neovim-nightly , also use a nerdfont on your terminal. - run the install.sh (this might work only on nix systems) and open neovim , do :PackerInstall -- or do it manually : +- Install ripgrep , fd , ueberzug for telescope media extension to work. + +- Manual installation , incase the install.sh doesnt work for you : - Install packer.nvim @@ -178,7 +180,7 @@ I'd install it first and add its setup line : # TODO - add snippets support -- show statusline in inactive windows +- show better statusline in inactive windows # Contact - From b375c43dc3b30fe2d470a7bd2957adc3eee0a982 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 11 Apr 2021 08:44:56 +0530 Subject: [PATCH 0145/1541] remove plugin highlights from init.lua --- init.lua | 22 +++------------------- lua/gitsigns/lua.lua | 6 ++++++ lua/mappings/lua.lua | 3 --- lua/nvimTree/lua.lua | 6 ++++++ lua/telescope/lua.lua | 9 +++++++++ 5 files changed, 24 insertions(+), 22 deletions(-) diff --git a/init.lua b/init.lua index f337feb..fea08aa 100644 --- a/init.lua +++ b/init.lua @@ -55,30 +55,14 @@ cmd "hi EndOfBuffer guifg=#1e222a" cmd "hi PmenuSel guibg=#98c379" cmd "hi Pmenu guibg=#282c34" --- telescope stuff and popupmenu -require "telescope.lua" - -cmd "hi TelescopeBorder guifg=#2a2e36" -cmd "hi TelescopePromptBorder guifg=#2a2e36" -cmd "hi TelescopeResultsBorder guifg=#2a2e36" -cmd "hi TelescopePreviewBorder guifg=#525865" - --- nvim tree color for folder name and icon -require "nvimTree.lua" - -cmd "hi NvimTreeFolderIcon guifg = #61afef" -cmd "hi NvimTreeFolderName guifg = #61afef" -cmd "hi NvimTreeIndentMarker guifg=#383c44" - cmd "hi Normal guibg=NONE ctermbg=NONE" +require "telescope.lua" +require "nvimTree.lua" + -- git signs require "gitsigns.lua" -cmd "hi DiffAdd guifg=#81A1C1 guibg = none" -cmd "hi DiffChange guifg =#3A3E44 guibg = none" -cmd "hi DiffModified guifg = #81A1C1 guibg = none" - require("nvim-autopairs").setup() require("lspkind").init( diff --git a/lua/gitsigns/lua.lua b/lua/gitsigns/lua.lua index 1fa4325..83bf7d7 100644 --- a/lua/gitsigns/lua.lua +++ b/lua/gitsigns/lua.lua @@ -25,3 +25,9 @@ require("gitsigns").setup { sign_priority = 5, status_formatter = nil -- Use default } + +local cmd = vim.cmd + +cmd "hi DiffAdd guifg=#81A1C1 guibg = none" +cmd "hi DiffChange guifg =#3A3E44 guibg = none" +cmd "hi DiffModified guifg = #81A1C1 guibg = none" diff --git a/lua/mappings/lua.lua b/lua/mappings/lua.lua index bd56831..aa3b5df 100644 --- a/lua/mappings/lua.lua +++ b/lua/mappings/lua.lua @@ -15,6 +15,3 @@ map("n", "", [[ split term://bash | resize 10 ]], opt) -- open ter -- COPY EVERYTHING -- map("n", "", [[ %y+]], opt) - --- toggle line number -map("n", "", [[ set nu! ]], opt) diff --git a/lua/nvimTree/lua.lua b/lua/nvimTree/lua.lua index 34e671f..30f2a39 100644 --- a/lua/nvimTree/lua.lua +++ b/lua/nvimTree/lua.lua @@ -84,3 +84,9 @@ g.nvim_tree_bindings = { ["-"] = get_lua_cb("dir_up"), ["q"] = get_lua_cb("close") } + +local cmd = vim.cmd + +cmd "hi NvimTreeFolderIcon guifg = #61afef" +cmd "hi NvimTreeFolderName guifg = #61afef" +cmd "hi NvimTreeIndentMarker guifg=#383c44" diff --git a/lua/telescope/lua.lua b/lua/telescope/lua.lua index b338935..744cb7b 100644 --- a/lua/telescope/lua.lua +++ b/lua/telescope/lua.lua @@ -73,3 +73,12 @@ vim.api.nvim_set_keymap("n", "fb", [[lua require('telescope.builtin vim.api.nvim_set_keymap("n", "fh", [[lua require('telescope.builtin').help_tags()]], opt) vim.api.nvim_set_keymap("n", "fo", [[lua require('telescope.builtin').oldfiles()]], opt) vim.api.nvim_set_keymap("n", "fm", [[ Neoformat]], opt) + +-- highlights + +local cmd = vim.cmd + +cmd "hi TelescopeBorder guifg=#2a2e36" +cmd "hi TelescopePromptBorder guifg=#2a2e36" +cmd "hi TelescopeResultsBorder guifg=#2a2e36" +cmd "hi TelescopePreviewBorder guifg=#525865" From ac6afa334b8f8d6cf7da4916188d6635cf054221 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 12 Apr 2021 16:37:15 +0530 Subject: [PATCH 0146/1541] minor changes --- README.md | 6 +++--- install.sh | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2b426c8..39e538d 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal - The lua folder contains modules ( config files ) , in the example above "foo" folder could be considered as a module and it contains a lua.lua. - The lua.lua file is supposed to have any nvim config written in lua , its like splitting the overall config into small bits and make it more organized. -- To load or source that "foo" module (like making it load with init.lua ) , you need to load it in init.lua like this : require('foo.lua'). +- To load or source that "foo" module (like making it load with init.lua ) , you need to load it in init.lua like this : require('foo.lua'). # Features @@ -126,8 +126,8 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal # Clone my setup - - Install neovim-nightly , also use a nerdfont on your terminal. -- run the install.sh (this might work only on nix systems) and open neovim , do :PackerInstall -- Install ripgrep , fd , ueberzug for telescope media extension to work. +- run the install.sh (this might work only on nix systems),this opens neovim (press enter or y to skip the errors , the errors will only show once). +- Install ripgrep , fd , ueberzug for telescope media extension to work. - Manual installation , incase the install.sh doesnt work for you : diff --git a/install.sh b/install.sh index 69a02fb..2249fc9 100755 --- a/install.sh +++ b/install.sh @@ -122,3 +122,7 @@ if [[ ${warn_path} == true ]]; then echo "" echo "Ensure ${LSP_BIN_PATH} is available in your \$PATH variable" fi + +# install all plugins via packer + +nvim +PackerInstall From 0cb84d3427e6c11ab714cb2cbc0297a7c9d7c16e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 14 Apr 2021 07:29:42 +0530 Subject: [PATCH 0147/1541] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 39e538d..3f5bd18 100644 --- a/README.md +++ b/README.md @@ -179,8 +179,9 @@ I'd install it first and add its setup line : # TODO -- add snippets support -- show better statusline in inactive windows +- Add snippets support. +- Make the statusline more elegant. +- Add more themes. # Contact - From e45e3089d344cb5bae9b838c4322288021aea31c Mon Sep 17 00:00:00 2001 From: Aaditay <58261116+Aaditay@users.noreply.github.com> Date: Wed, 14 Apr 2021 13:23:10 +0530 Subject: [PATCH 0148/1541] aliases on the top Why not make an alias of cmd first and then use cmd instead of vim.cmd --- lua/nvimTree/lua.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lua/nvimTree/lua.lua b/lua/nvimTree/lua.lua index 30f2a39..851c8fa 100644 --- a/lua/nvimTree/lua.lua +++ b/lua/nvimTree/lua.lua @@ -1,8 +1,11 @@ -vim.cmd [[packadd nvim-tree.lua]] +local cmd = vim.cmd +local g = vim.g + +cmd [[packadd nvim-tree.lua]] vim.o.termguicolors = true -local g = vim.g + g.nvim_tree_side = "left" g.nvim_tree_width = 25 @@ -85,7 +88,7 @@ g.nvim_tree_bindings = { ["q"] = get_lua_cb("close") } -local cmd = vim.cmd + cmd "hi NvimTreeFolderIcon guifg = #61afef" cmd "hi NvimTreeFolderName guifg = #61afef" From ebff217665b989ee26997e2adb7bce50580942bb Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 17 Apr 2021 23:02:16 +0530 Subject: [PATCH 0149/1541] minor changes with lspconfig --- lua/lspconfig/lua.lua | 12 +++++++++--- lua/pluginsList/lua.lua | 3 --- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lua/lspconfig/lua.lua b/lua/lspconfig/lua.lua index 6ea9906..ac7f1d2 100644 --- a/lua/lspconfig/lua.lua +++ b/lua/lspconfig/lua.lua @@ -39,7 +39,13 @@ function on_attach(client) end end -local servers = {"tsserver", "cssls", "html" , "pyright"} -for _, lsp in ipairs(servers) do - nvim_lsp[lsp].setup {on_attach = on_attach} +local lspconf = require "lspconfig" +local servers = {"html", "cssls", "tsserver", "pyright"} + +for k, lang in pairs(servers) do + lspconf[lang].setup { + root_dir = function() + return vim.loop.cwd() + end + } end diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 0f4142c..55874d8 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -29,8 +29,5 @@ return require("packer").startup( use "nvim-telescope/telescope-media-files.nvim" use "nvim-lua/popup.nvim" use "karb94/neoscroll.nvim" - - use "nekonako/xresources-nvim" - end ) From 92591015e5a27f158e3d5b5c3efbd73073103ebb Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 18 Apr 2021 11:27:06 +0530 Subject: [PATCH 0150/1541] add sumneko_lua lspconfig --- lua/lspconfig/lua.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lua/lspconfig/lua.lua b/lua/lspconfig/lua.lua index ac7f1d2..ff2887d 100644 --- a/lua/lspconfig/lua.lua +++ b/lua/lspconfig/lua.lua @@ -49,3 +49,27 @@ for k, lang in pairs(servers) do end } end + +-- lua lsp settings +USER = "/home/" .. vim.fn.expand("$USER") + +local sumneko_root_path = USER .. "/.config/lua-language-server" +local sumneko_binary = USER .. "/.config/lua-language-server/bin/Linux/lua-language-server" + +require "lspconfig".sumneko_lua.setup { + cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"}, + settings = { + Lua = { + runtime = { + version = "LuaJIT", + path = vim.split(package.path, ";") + }, + diagnostics = { + globals = {"vim"} + }, + workspace = { + library = {[vim.fn.expand("$VIMRUNTIME/lua")] = true, [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true} + } + } + }, +} From 88e55565951bad7dd5ce573030803e6a86a48b65 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 18 Apr 2021 11:43:10 +0530 Subject: [PATCH 0151/1541] disable telemetry sumneko_lua --- lua/lspconfig/lua.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/lspconfig/lua.lua b/lua/lspconfig/lua.lua index ff2887d..a7fc687 100644 --- a/lua/lspconfig/lua.lua +++ b/lua/lspconfig/lua.lua @@ -58,6 +58,9 @@ local sumneko_binary = USER .. "/.config/lua-language-server/bin/Linux/lua-langu require "lspconfig".sumneko_lua.setup { cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"}, + root_dir = function() + return vim.loop.cwd() + end, settings = { Lua = { runtime = { @@ -69,7 +72,10 @@ require "lspconfig".sumneko_lua.setup { }, workspace = { library = {[vim.fn.expand("$VIMRUNTIME/lua")] = true, [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true} + }, + telemetry = { + enable = false } } - }, + } } From 2c1af5727a0abd51fdd8a2188a239c45f92161f0 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 18 Apr 2021 18:46:14 +0530 Subject: [PATCH 0152/1541] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3f5bd18..e716f7b 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,7 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal # Clone my setup - - Install neovim-nightly , also use a nerdfont on your terminal. +- Use these [colors](https://github.com/siduck76/dotfiles/blob/master/thinkpad/.Xresources) for your terminal , Its in xresources format so it'd would be easier to use a terminal that supports xresources like st , urxvt , xterm , My [st build](https://github.com/siduck76/st). - run the install.sh (this might work only on nix systems),this opens neovim (press enter or y to skip the errors , the errors will only show once). - Install ripgrep , fd , ueberzug for telescope media extension to work. From 41e059ac2b90f4eb781d1552dd98fb1d90546371 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 20 Apr 2021 09:45:14 +0530 Subject: [PATCH 0153/1541] add TrueZen.nvim plugin --- README.md | 2 ++ init.lua | 7 +++++-- lua/mappings/lua.lua | 6 ++++++ lua/nvimTree/lua.lua | 4 ---- lua/pluginsList/lua.lua | 31 ++++++++++++++++++++----------- lua/treesitter/lua.lua | 8 +++++--- lua/zenmode/lua.lua | 33 +++++++++++++++++++++++++++++++++ 7 files changed, 71 insertions(+), 20 deletions(-) create mode 100644 lua/zenmode/lua.lua diff --git a/README.md b/README.md index e716f7b..67ad166 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,8 @@ I'd install it first and add its setup line : - Shift n toggle line number - Ctrl a copies everything in the current file - select any text + y copies the selected text +- leader + z toggle truezen.nvim's Ataraxis mode +- leader + n toggle line number - leader + f b open all buffers , with telescope - leader + f p search and preview images with telescope - leader + f f find files in the current DIR , with telescope diff --git a/init.lua b/init.lua index fea08aa..170dd09 100644 --- a/init.lua +++ b/init.lua @@ -42,8 +42,8 @@ g.indent_blankline_buftype_exclude = {"terminal"} g.indent_blankline_show_trailing_blankline_indent = false g.indent_blankline_show_first_indent_level = false -require("treesitter.lua") -require("mappings.lua") +require "treesitter.lua" +require "mappings.lua" -- highlights -- cmd "hi LineNr guifg=#42464e guibg=NONE" @@ -84,3 +84,6 @@ cmd("highlight! StatusLineNC gui=underline guibg=NONE guifg=#383c44") cmd "hi clear CursorLine" cmd "hi cursorlinenr guibg=NONE guifg=#abb2bf" + +-- setup for TrueZen.nvim +require "zenmode.lua" diff --git a/lua/mappings/lua.lua b/lua/mappings/lua.lua index aa3b5df..aef5e6e 100644 --- a/lua/mappings/lua.lua +++ b/lua/mappings/lua.lua @@ -15,3 +15,9 @@ map("n", "", [[ split term://bash | resize 10 ]], opt) -- open ter -- COPY EVERYTHING -- map("n", "", [[ %y+]], opt) + +-- toggle numbers --- +map("n", "n", [[ set nu!]], opt) + +-- toggle truezen.nvim's ataraxis mode +map("n", "z", [[ TZAtaraxis]], opt) diff --git a/lua/nvimTree/lua.lua b/lua/nvimTree/lua.lua index 851c8fa..4f2553e 100644 --- a/lua/nvimTree/lua.lua +++ b/lua/nvimTree/lua.lua @@ -5,8 +5,6 @@ cmd [[packadd nvim-tree.lua]] vim.o.termguicolors = true - - g.nvim_tree_side = "left" g.nvim_tree_width = 25 g.nvim_tree_ignore = {".git", "node_modules", ".cache"} @@ -88,8 +86,6 @@ g.nvim_tree_bindings = { ["q"] = get_lua_cb("close") } - - cmd "hi NvimTreeFolderIcon guifg = #61afef" cmd "hi NvimTreeFolderName guifg = #61afef" cmd "hi NvimTreeIndentMarker guifg=#383c44" diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 55874d8..fbc106f 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -7,27 +7,36 @@ return require("packer").startup( use {"wbthomason/packer.nvim", opt = true} use {"lukas-reineke/indent-blankline.nvim", branch = "lua"} + -- color related stuff use "norcalli/nvim-base16.lua" - use "kyazdani42/nvim-web-devicons" - use "kyazdani42/nvim-tree.lua" + use "norcalli/nvim-colorizer.lua" + + -- lsp stuff + use "nvim-treesitter/nvim-treesitter" + use "neovim/nvim-lspconfig" + use "hrsh7th/nvim-compe" + use "onsails/lspkind-nvim" + use "sbdchd/neoformat" use "nvim-lua/plenary.nvim" + use "lewis6991/gitsigns.nvim" use "akinsho/nvim-bufferline.lua" use "glepnir/galaxyline.nvim" - use "907th/vim-auto-save" - use "nvim-treesitter/nvim-treesitter" - use "norcalli/nvim-colorizer.lua" - use "ryanoasis/vim-devicons" - use "sbdchd/neoformat" - use "neovim/nvim-lspconfig" - use "hrsh7th/nvim-compe" use "windwp/nvim-autopairs" use "alvan/vim-closetag" - use "tweekmonster/startuptime.vim" - use "onsails/lspkind-nvim" + + -- file managing , picker etc + use "kyazdani42/nvim-tree.lua" + use "kyazdani42/nvim-web-devicons" + use "ryanoasis/vim-devicons" use "nvim-telescope/telescope.nvim" use "nvim-telescope/telescope-media-files.nvim" use "nvim-lua/popup.nvim" + + -- misc + use "tweekmonster/startuptime.vim" + use "907th/vim-auto-save" + use "kdav5758/TrueZen.nvim" use "karb94/neoscroll.nvim" end ) diff --git a/lua/treesitter/lua.lua b/lua/treesitter/lua.lua index 1608a44..274668b 100644 --- a/lua/treesitter/lua.lua +++ b/lua/treesitter/lua.lua @@ -6,9 +6,11 @@ ts_config.setup { "html", "css", "bash", - "cpp", - "rust", - "lua" + "lua", + "json" + -- "cpp", + -- "rust", + -- "python" }, highlight = { enable = true, diff --git a/lua/zenmode/lua.lua b/lua/zenmode/lua.lua new file mode 100644 index 0000000..5843173 --- /dev/null +++ b/lua/zenmode/lua.lua @@ -0,0 +1,33 @@ +require("true-zen").setup( + { + true_false_commands = false, + cursor_by_mode = false, + bottom = { + hidden_laststatus = 0, + hidden_ruler = false, + hidden_showmode = false, + hidden_showcmd = false, + hidden_cmdheight = 1, + shown_laststatus = 2, + shown_ruler = true, + shown_showmode = false, + shown_showcmd = false, + shown_cmdheight = 1 + }, + top = { + hidden_showtabline = 0, + shown_showtabline = 2 + }, + left = { + hidden_number = false, + hidden_relativenumber = false, + hidden_signcolumn = "no", + shown_number = true, + shown_relativenumber = false, + shown_signcolumn = "no" + }, + ataraxis = { + left_right_padding = 40 + } + } +) From d36040544741e757e71f1f73f43b700e02c75851 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 21 Apr 2021 12:46:24 +0530 Subject: [PATCH 0154/1541] mappings: dont copy deleted text --- init.lua | 2 +- lua/mappings/lua.lua | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 170dd09..70c2e5e 100644 --- a/init.lua +++ b/init.lua @@ -17,7 +17,7 @@ local cmd = vim.cmd local g = vim.g g.mapleader = " " -g.auto_save = 1 +g.auto_save = 0 -- colorscheme related stuff diff --git a/lua/mappings/lua.lua b/lua/mappings/lua.lua index aef5e6e..710e29a 100644 --- a/lua/mappings/lua.lua +++ b/lua/mappings/lua.lua @@ -6,6 +6,17 @@ local function map(mode, lhs, rhs, opts) vim.api.nvim_set_keymap(mode, lhs, rhs, options) end +local opt = {} + +-- dont copy any deleted text , this is disabled by default so uncomment the below mappings if you want them! +--[[ + +map("n", "dd", [=[ "_dd ]=], opt) +map("v", "dd", [=[ "_dd ]=], opt) +map("v", "x", [=[ "_x ]=], opt) + +]] + -- copy any selected text with pressing y map("", "c", '"+y') From 21fd0d6a9b02bda04a2845088059cad03b4646c9 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 22 Apr 2021 08:50:17 +0530 Subject: [PATCH 0155/1541] minor changes --- lua/lspconfig/lua.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/lspconfig/lua.lua b/lua/lspconfig/lua.lua index a7fc687..3aa1bc2 100644 --- a/lua/lspconfig/lua.lua +++ b/lua/lspconfig/lua.lua @@ -1,8 +1,6 @@ vim.cmd [[packadd nvim-lspconfig]] vim.cmd [[packadd nvim-compe]] -local nvim_lsp = require("lspconfig") - function on_attach(client) local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) From 86431978d9292632f97e485cf41a06ac61f3da93 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 22 Apr 2021 18:57:36 +0530 Subject: [PATCH 0156/1541] TrueZen.nvim : add top & bottom padding --- lua/zenmode/lua.lua | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/lua/zenmode/lua.lua b/lua/zenmode/lua.lua index 5843173..398a001 100644 --- a/lua/zenmode/lua.lua +++ b/lua/zenmode/lua.lua @@ -1,7 +1,14 @@ -require("true-zen").setup( +local true_zen = require("true-zen") + +true_zen.setup( { true_false_commands = false, cursor_by_mode = false, + before_minimalist_mode_shown = true, + before_minimalist_mode_hidden = true, + after_minimalist_mode_shown = true, + after_minimalist_mode_hidden = true, + unknown_bkg_color_fix = true, bottom = { hidden_laststatus = 0, hidden_ruler = false, @@ -27,7 +34,14 @@ require("true-zen").setup( shown_signcolumn = "no" }, ataraxis = { - left_right_padding = 40 + just_do_it_for_me = true, + left_padding = 40, + right_padding = 40, + top_padding = 2, + bottom_padding = 2 + }, + integrations = { + integration_galaxyline = true } } ) From 5716759f40da7fe0cfa66232fb37d0ee43e8b559 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 22 Apr 2021 23:13:06 +0530 Subject: [PATCH 0157/1541] clean lspconfig --- lua/lspconfig/lua.lua | 44 +++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/lua/lspconfig/lua.lua b/lua/lspconfig/lua.lua index 3aa1bc2..3b93643 100644 --- a/lua/lspconfig/lua.lua +++ b/lua/lspconfig/lua.lua @@ -2,9 +2,10 @@ vim.cmd [[packadd nvim-lspconfig]] vim.cmd [[packadd nvim-compe]] function on_attach(client) - local function buf_set_keymap(...) + local function map(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end + local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end @@ -12,28 +13,28 @@ function on_attach(client) buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") -- Mappings. - local opts = {noremap = true, silent = true} - buf_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) - buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) - buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()", opts) - buf_set_keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) - buf_set_keymap("n", "", "lua vim.lsp.buf.signature_help()", opts) - buf_set_keymap("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) - buf_set_keymap("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) - buf_set_keymap("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) - buf_set_keymap("n", "D", "lua vim.lsp.buf.type_definition()", opts) - buf_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", opts) - buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()", opts) - buf_set_keymap("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) - buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) - buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) - buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) + local opts = {noremap = true, silent = true, normal = true} + map("gD", "lua vim.lsp.buf.declaration()", opts) + map("gd", "lua vim.lsp.buf.definition()", opts) + map("K", "lua vim.lsp.buf.hover()", opts) + map("gi", "lua vim.lsp.buf.implementation()", opts) + map("", "lua vim.lsp.buf.signature_help()", opts) + map("wa", "lua vim.lsp.buf.add_workspace_folder()", opts) + map("wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) + map("wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) + map("D", "lua vim.lsp.buf.type_definition()", opts) + map("rn", "lua vim.lsp.buf.rename()", opts) + map("gr", "lua vim.lsp.buf.references()", opts) + map("e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) + map("[d", "lua vim.lsp.diagnostic.goto_prev()", opts) + map("]d", "lua vim.lsp.diagnostic.goto_next()", opts) + map("q", "lua vim.lsp.diagnostic.set_loclist()", opts) -- Set some keybinds conditional on server capabilities if client.resolved_capabilities.document_formatting then - buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) + map("f", "lua vim.lsp.buf.formatting()", opts) elseif client.resolved_capabilities.document_range_formatting then - buf_set_keymap("n", "f", "lua vim.lsp.buf.range_formatting()", opts) + map("f", "lua vim.lsp.buf.range_formatting()", opts) end end @@ -69,7 +70,10 @@ require "lspconfig".sumneko_lua.setup { globals = {"vim"} }, workspace = { - library = {[vim.fn.expand("$VIMRUNTIME/lua")] = true, [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true} + library = { + [vim.fn.expand("$VIMRUNTIME/lua")] = true, + [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true + } }, telemetry = { enable = false From bbe48d229dcd4318ad79ce2830613c479c953032 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 23 Apr 2021 18:14:23 +0530 Subject: [PATCH 0158/1541] lspconfig: clean up --- lua/lspconfig/lua.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/lspconfig/lua.lua b/lua/lspconfig/lua.lua index 3b93643..0203a9e 100644 --- a/lua/lspconfig/lua.lua +++ b/lua/lspconfig/lua.lua @@ -43,9 +43,7 @@ local servers = {"html", "cssls", "tsserver", "pyright"} for k, lang in pairs(servers) do lspconf[lang].setup { - root_dir = function() - return vim.loop.cwd() - end + root_dir = vim.loop.cwd } end From c231dba0b6d097d478e6cc8c2e8ff0ab908d38c2 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 24 Apr 2021 10:27:14 +0530 Subject: [PATCH 0159/1541] add mapping for minimalistc mode --- init.lua | 1 + lua/mappings/lua.lua | 4 +++- lua/zenmode/lua.lua | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 70c2e5e..7c88c6c 100644 --- a/init.lua +++ b/init.lua @@ -56,6 +56,7 @@ cmd "hi PmenuSel guibg=#98c379" cmd "hi Pmenu guibg=#282c34" cmd "hi Normal guibg=NONE ctermbg=NONE" +-- cmd "hi Normal guibg=#1e222a" require "telescope.lua" require "nvimTree.lua" diff --git a/lua/mappings/lua.lua b/lua/mappings/lua.lua index 710e29a..a4d9222 100644 --- a/lua/mappings/lua.lua +++ b/lua/mappings/lua.lua @@ -30,5 +30,7 @@ map("n", "", [[ %y+]], opt) -- toggle numbers --- map("n", "n", [[ set nu!]], opt) --- toggle truezen.nvim's ataraxis mode +-- toggle truezen.nvim's ataraxis and minimalist mode map("n", "z", [[ TZAtaraxis]], opt) +map("n", "m", [[ TZMinimalist]], opt) + diff --git a/lua/zenmode/lua.lua b/lua/zenmode/lua.lua index 398a001..8ad964b 100644 --- a/lua/zenmode/lua.lua +++ b/lua/zenmode/lua.lua @@ -8,7 +8,7 @@ true_zen.setup( before_minimalist_mode_hidden = true, after_minimalist_mode_shown = true, after_minimalist_mode_hidden = true, - unknown_bkg_color_fix = true, +-- unknown_bkg_color_fix = true, bottom = { hidden_laststatus = 0, hidden_ruler = false, @@ -34,9 +34,9 @@ true_zen.setup( shown_signcolumn = "no" }, ataraxis = { - just_do_it_for_me = true, - left_padding = 40, - right_padding = 40, + just_do_it_for_me = false, + left_padding = 37, + right_padding = 37, top_padding = 2, bottom_padding = 2 }, From 07ab4163c6f3203aaa3724689223892e13ca9c0e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 24 Apr 2021 15:29:38 +0530 Subject: [PATCH 0160/1541] Readme: update mapping list --- README.md | 54 ++++++++++++++++++++++++++++++++---------- lua/bufferline/lua.lua | 4 ++-- 2 files changed, 44 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 67ad166..9233b32 100644 --- a/README.md +++ b/README.md @@ -158,28 +158,58 @@ I'd install it first and add its setup line : require'lspconfig'.clangd.setup{} `` -# Default Mappings to make stuffs easier! +# Default Mappings - space is the leader key + space is the **leader** key. +- Opening terminals! - Ctrl l Open terminal vertically over right - Ctrl x Open terminal horizontally below the current window + +- **File tree (nvim-tree)** + - Ctrl n toggle neovim tree -- Shift n toggle line number + +- Shift h show hidden files (use these keybinds when cursor's in the filetree, same for the keybinds below). +- Ctrl + v open files in vertical split +- Ctrl + x open files in horizontal split + +- **Toggling stuffs** + +- leader + n toggle line number +- leader + z toggle truezen.nvim's Ataraxis mode +- leader + m toggle truezen.nvim's minimalistic mode + +- **Copy text** + - Ctrl a copies everything in the current file - select any text + y copies the selected text -- leader + z toggle truezen.nvim's Ataraxis mode -- leader + n toggle line number -- leader + f b open all buffers , with telescope -- leader + f p search and preview images with telescope -- leader + f f find files in the current DIR , with telescope -- leader + f o open recently edited files , with telescope -- leader + f f find files in the current DIR , with telescope -- leader + f h opens up a manpage like thing but for all vim related things , with telescope + +- **Telescope** + +- leader + f b open all buffers +- leader + f f find files in the current DIR +- leader + f o open recently edited files +- leader + f f find files in the current DIR +- leader + f h opens up a help page like thing +- Ctrl + v open files in vertical split +- Ctrl + x open files in horizontal split + +- **Formatting code** + - leader + f m formats or beautifies the code in current window via neoformat - (currently only html ,css , js can be formatted . To be able to use this keybind you need to install the formatter locally for your language , in my case prettier was required only so I installed it. check this https://github.com/sbdchd/neoformat). + (currently only html ,css , js can be formatted . To be able to use this keybind you need to install the formatter locally for your language , in my case prettier was required only so I installed it. check (this)[https://github.com/sbdchd/neoformat]. + +- **Neoscroll** + - ``, ``, ``, ``, `` and `` : Smooth scrolling for window movement commands. +- **Managing tabs with bufferline!** + +- Shift l or s cycle through opened tabs +- Shift d close current tab +- Shift b open new tab + # TODO - Add snippets support. diff --git a/lua/bufferline/lua.lua b/lua/bufferline/lua.lua index c661f69..b94440e 100644 --- a/lua/bufferline/lua.lua +++ b/lua/bufferline/lua.lua @@ -63,10 +63,10 @@ vim.g.mapleader = " " --command that adds new buffer and moves to it vim.api.nvim_command "com -nargs=? -complete=file_in_path New badd | blast" -vim.api.nvim_set_keymap("n", "", ":New ", opt) +vim.api.nvim_set_keymap("n", "", [[tabnew]], opt) --removing a buffer -vim.api.nvim_set_keymap("n", "", [[bdelete]], opt) +vim.api.nvim_set_keymap("n", "", [[bdelete]], opt) -- tabnew and tabprev vim.api.nvim_set_keymap("n", "", [[BufferLineCycleNext]], opt) From 7dd473df13e0aad5537556c449ca173113fbb0c5 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 24 Apr 2021 15:33:37 +0530 Subject: [PATCH 0161/1541] fix packer.nvim install link #30 --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9233b32..4664614 100644 --- a/README.md +++ b/README.md @@ -134,9 +134,11 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal - Install packer.nvim -```shell +``` + git clone https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim + ``` - copy lua folder and init.lua into ~/.config/nvim From aafea2b6f4d49c541a33119fc5299adea09fb91e Mon Sep 17 00:00:00 2001 From: mTvare <57838468+mTvare6@users.noreply.github.com> Date: Sat, 24 Apr 2021 18:21:13 +0530 Subject: [PATCH 0162/1541] use gnu sed in mac --- install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 2249fc9..a0295e1 100755 --- a/install.sh +++ b/install.sh @@ -53,7 +53,12 @@ cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim read -p "which shell do you use?: " shellname echo "$shellname" -sed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua +if [ "$(get_platform)" = "Mac" ]; then + gsed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua +else + sed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua +fi + echo "shell changed to $shellname on nvim successfully!" #for f in `find -E . -regex ".*\.vim$|.*\.lua$"`; do From 5c44978f4723aec8037fa04c0fbe3df43eb11dfc Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 25 Apr 2021 11:57:24 +0530 Subject: [PATCH 0163/1541] bufferline: add highlights --- lua/bufferline/lua.lua | 49 ++++++++++++++++++++++++++---------------- lua/treesitter/lua.lua | 5 +++-- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/lua/bufferline/lua.lua b/lua/bufferline/lua.lua index b94440e..902cb1a 100644 --- a/lua/bufferline/lua.lua +++ b/lua/bufferline/lua.lua @@ -1,6 +1,10 @@ vim.o.termguicolors = true --- colors for active , inactive uffer tabs +-- colors + +local bar_fg = "#565c64" +local activeBuffer_fg = "#c8ccd4" + require "bufferline".setup { options = { buffer_close_icon = "", @@ -18,40 +22,47 @@ require "bufferline".setup { }, highlights = { background = { - guifg = comment_fg, + guifg = bar_fg, guibg = "#1e222a" }, fill = { - guifg = comment_fg, + guifg = bar_fg, guibg = "#1e222a" }, + + -- focused window buffer_selected = { - guifg = normal_fg, - guibg = "#282c34", + guifg = activeBuffer_fg, + guibg = "#353b45", gui = "bold" }, + separator_selected = { + guifg = "#353b45", + guibg = "#353b45" + }, + + -- unfocused opened window buffer_visible = { - guifg = "#3e4451", - guibg = "#1e222a" + guifg = "#9298a0", + guibg = "#282c34" }, separator_visible = { - guifg = "#1e222a", - guibg = "#1e222a" - }, - separator_selected = { - guifg = "#1e222a", - guibg = "#1e222a" + guifg = "#282c34", + guibg = "#282c34" }, + separator = { guifg = "#1e222a", guibg = "#1e222a" }, + indicator_selected = { guifg = "#1e222a", guibg = "#1e222a" }, + modified_selected = { - guifg = string_fg, + guifg = bar_fg, guibg = "#353b45" } } @@ -59,15 +70,15 @@ require "bufferline".setup { local opt = {silent = true} +local map = vim.api.nvim_set_keymap vim.g.mapleader = " " --command that adds new buffer and moves to it -vim.api.nvim_command "com -nargs=? -complete=file_in_path New badd | blast" -vim.api.nvim_set_keymap("n", "", [[tabnew]], opt) +map("n", "", [[tabnew]], opt) --removing a buffer -vim.api.nvim_set_keymap("n", "", [[bdelete]], opt) +map("n", "", [[bdelete]], opt) -- tabnew and tabprev -vim.api.nvim_set_keymap("n", "", [[BufferLineCycleNext]], opt) -vim.api.nvim_set_keymap("n", "", [[BufferLineCyclePrev]], opt) +map("n", "", [[BufferLineCycleNext]], opt) +map("n", "", [[BufferLineCyclePrev]], opt) diff --git a/lua/treesitter/lua.lua b/lua/treesitter/lua.lua index 274668b..701a27e 100644 --- a/lua/treesitter/lua.lua +++ b/lua/treesitter/lua.lua @@ -7,11 +7,12 @@ ts_config.setup { "css", "bash", "lua", - "json" + "json", + "python" -- "cpp", -- "rust", - -- "python" }, + highlight = { enable = true, use_languagetree = true From f69d8f61732943b60e5e4e95f7ab3da2a15edf13 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 25 Apr 2021 20:42:24 +0530 Subject: [PATCH 0164/1541] git add . --- lua/bufferline/lua.lua | 7 +------ lua/treesitter/lua.lua | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lua/bufferline/lua.lua b/lua/bufferline/lua.lua index 902cb1a..369ddf7 100644 --- a/lua/bufferline/lua.lua +++ b/lua/bufferline/lua.lua @@ -29,7 +29,6 @@ require "bufferline".setup { guifg = bar_fg, guibg = "#1e222a" }, - -- focused window buffer_selected = { guifg = activeBuffer_fg, @@ -40,7 +39,6 @@ require "bufferline".setup { guifg = "#353b45", guibg = "#353b45" }, - -- unfocused opened window buffer_visible = { guifg = "#9298a0", @@ -50,17 +48,14 @@ require "bufferline".setup { guifg = "#282c34", guibg = "#282c34" }, - separator = { guifg = "#1e222a", guibg = "#1e222a" }, - indicator_selected = { guifg = "#1e222a", guibg = "#1e222a" }, - modified_selected = { guifg = bar_fg, guibg = "#353b45" @@ -74,7 +69,7 @@ local map = vim.api.nvim_set_keymap vim.g.mapleader = " " --command that adds new buffer and moves to it -map("n", "", [[tabnew]], opt) +map("n", "", [[tabnew]], opt) --removing a buffer map("n", "", [[bdelete]], opt) diff --git a/lua/treesitter/lua.lua b/lua/treesitter/lua.lua index 701a27e..cebde4f 100644 --- a/lua/treesitter/lua.lua +++ b/lua/treesitter/lua.lua @@ -12,7 +12,6 @@ ts_config.setup { -- "cpp", -- "rust", }, - highlight = { enable = true, use_languagetree = true From 928adbe21a739adc01aeb097c74545657e77405e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 25 Apr 2021 20:42:24 +0530 Subject: [PATCH 0165/1541] bufferline: rm mapping overriding with defaults --- lua/bufferline/lua.lua | 7 +------ lua/treesitter/lua.lua | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lua/bufferline/lua.lua b/lua/bufferline/lua.lua index 902cb1a..369ddf7 100644 --- a/lua/bufferline/lua.lua +++ b/lua/bufferline/lua.lua @@ -29,7 +29,6 @@ require "bufferline".setup { guifg = bar_fg, guibg = "#1e222a" }, - -- focused window buffer_selected = { guifg = activeBuffer_fg, @@ -40,7 +39,6 @@ require "bufferline".setup { guifg = "#353b45", guibg = "#353b45" }, - -- unfocused opened window buffer_visible = { guifg = "#9298a0", @@ -50,17 +48,14 @@ require "bufferline".setup { guifg = "#282c34", guibg = "#282c34" }, - separator = { guifg = "#1e222a", guibg = "#1e222a" }, - indicator_selected = { guifg = "#1e222a", guibg = "#1e222a" }, - modified_selected = { guifg = bar_fg, guibg = "#353b45" @@ -74,7 +69,7 @@ local map = vim.api.nvim_set_keymap vim.g.mapleader = " " --command that adds new buffer and moves to it -map("n", "", [[tabnew]], opt) +map("n", "", [[tabnew]], opt) --removing a buffer map("n", "", [[bdelete]], opt) diff --git a/lua/treesitter/lua.lua b/lua/treesitter/lua.lua index 701a27e..cebde4f 100644 --- a/lua/treesitter/lua.lua +++ b/lua/treesitter/lua.lua @@ -12,7 +12,6 @@ ts_config.setup { -- "cpp", -- "rust", }, - highlight = { enable = true, use_languagetree = true From ee05f20f4350915b67ea0dd7e0a883eabfc0f5f0 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 26 Apr 2021 13:44:51 +0530 Subject: [PATCH 0166/1541] bufferline: minor changes --- lua/bufferline/lua.lua | 10 ++++++---- lua/pluginsList/lua.lua | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lua/bufferline/lua.lua b/lua/bufferline/lua.lua index 369ddf7..f708fbc 100644 --- a/lua/bufferline/lua.lua +++ b/lua/bufferline/lua.lua @@ -1,5 +1,3 @@ -vim.o.termguicolors = true - -- colors local bar_fg = "#565c64" @@ -8,7 +6,7 @@ local activeBuffer_fg = "#c8ccd4" require "bufferline".setup { options = { buffer_close_icon = "", - modified_icon = "●", + modified_icon = "", close_icon = "", left_trunc_marker = "", right_trunc_marker = "", @@ -29,6 +27,7 @@ require "bufferline".setup { guifg = bar_fg, guibg = "#1e222a" }, + -- focused window buffer_selected = { guifg = activeBuffer_fg, @@ -39,6 +38,7 @@ require "bufferline".setup { guifg = "#353b45", guibg = "#353b45" }, + -- unfocused opened window buffer_visible = { guifg = "#9298a0", @@ -48,16 +48,18 @@ require "bufferline".setup { guifg = "#282c34", guibg = "#282c34" }, + separator = { guifg = "#1e222a", guibg = "#1e222a" }, + indicator_selected = { guifg = "#1e222a", guibg = "#1e222a" }, modified_selected = { - guifg = bar_fg, + guifg = "#d0f5c2", guibg = "#353b45" } } diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index fbc106f..ada6499 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -1,6 +1,9 @@ -- check if packer is installed (~/local/share/nvim/site/pack) local packer_exists = pcall(vim.cmd, [[packadd packer.nvim]]) +local packer = require("packer") +local use = packer.use + -- using { } when using a different branch of the plugin or loading the plugin with certain commands return require("packer").startup( function() From 81801c8c331e1bf55cd8ceafb3581970ec1153fe Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 26 Apr 2021 13:51:36 +0530 Subject: [PATCH 0167/1541] nvim-webdevicons: add icons for deb and rpm filetypes --- lua/file-icons/lua.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/file-icons/lua.lua b/lua/file-icons/lua.lua index 52acffe..29307fa 100644 --- a/lua/file-icons/lua.lua +++ b/lua/file-icons/lua.lua @@ -96,6 +96,16 @@ require "nvim-web-devicons".setup { icon = "", color = "#EBCB8B", name = "xz" + }, + deb = { + icon = "", + color = "#a3b8ef", + name = "deb" + }, + rpm = { + icon = "", + color = "#fca2aa", + name = "rpm" } } } From c09c0ebc3a10d045265e1a8c6b9db96d5740abdd Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 26 Apr 2021 13:56:27 +0530 Subject: [PATCH 0168/1541] lspconfig : add bash lsp --- install.sh | 12 +++++++++--- lua/bufferline/lua.lua | 2 -- lua/lspconfig/lua.lua | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index a0295e1..5bd9fc8 100755 --- a/install.sh +++ b/install.sh @@ -2,7 +2,7 @@ BASE=$(git rev-parse --show-toplevel) LSP_BIN_PATH=$HOME/.local/bin -default_lsp_langs="css html ts rust python" +default_lsp_langs="css html ts rust python bash" lsp_langs="" choose_langs() { @@ -54,9 +54,9 @@ read -p "which shell do you use?: " shellname echo "$shellname" if [ "$(get_platform)" = "Mac" ]; then - gsed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua + gsed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua else - sed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua + sed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua fi echo "shell changed to $shellname on nvim successfully!" @@ -86,6 +86,8 @@ install_node_deps() { sudo npm install -g $@ } +# install languages + install_ts() { install_node_deps typescript typescript-language-server prettier } @@ -113,6 +115,10 @@ install_python() { install_node_deps pyright } +install_bash() { + install_node_deps bash-language-server +} + for lang in ${lsp_langs}; do if fn_exists install_$lang; then heading "Installing $lang language server" diff --git a/lua/bufferline/lua.lua b/lua/bufferline/lua.lua index f708fbc..b77fa93 100644 --- a/lua/bufferline/lua.lua +++ b/lua/bufferline/lua.lua @@ -48,12 +48,10 @@ require "bufferline".setup { guifg = "#282c34", guibg = "#282c34" }, - separator = { guifg = "#1e222a", guibg = "#1e222a" }, - indicator_selected = { guifg = "#1e222a", guibg = "#1e222a" diff --git a/lua/lspconfig/lua.lua b/lua/lspconfig/lua.lua index 0203a9e..f0d7000 100644 --- a/lua/lspconfig/lua.lua +++ b/lua/lspconfig/lua.lua @@ -39,7 +39,7 @@ function on_attach(client) end local lspconf = require "lspconfig" -local servers = {"html", "cssls", "tsserver", "pyright"} +local servers = {"html", "cssls", "tsserver", "pyright" , "bashls"} for k, lang in pairs(servers) do lspconf[lang].setup { From 38d780b50268c7da13340c2537c3d1757210f246 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 27 Apr 2021 15:27:07 +0530 Subject: [PATCH 0169/1541] bufferline: avoid using vanilla vim mappings --- lua/bufferline/lua.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/bufferline/lua.lua b/lua/bufferline/lua.lua index b77fa93..707a8a2 100644 --- a/lua/bufferline/lua.lua +++ b/lua/bufferline/lua.lua @@ -27,7 +27,6 @@ require "bufferline".setup { guifg = bar_fg, guibg = "#1e222a" }, - -- focused window buffer_selected = { guifg = activeBuffer_fg, @@ -38,7 +37,6 @@ require "bufferline".setup { guifg = "#353b45", guibg = "#353b45" }, - -- unfocused opened window buffer_visible = { guifg = "#9298a0", @@ -72,8 +70,8 @@ vim.g.mapleader = " " map("n", "", [[tabnew]], opt) --removing a buffer -map("n", "", [[bdelete]], opt) +map("n", "", [[bdelete]], opt) -- tabnew and tabprev map("n", "", [[BufferLineCycleNext]], opt) -map("n", "", [[BufferLineCyclePrev]], opt) +map("n", "", [[BufferLineCyclePrev]], opt) From 60e7353ee6a5b4a23437ef9c5bd977f194332d4f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 27 Apr 2021 22:13:44 +0530 Subject: [PATCH 0170/1541] zenmode : add custombg to ataraxis --- lua/pluginsList/lua.lua | 2 +- lua/zenmode/lua.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index ada6499..4e97992 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -39,7 +39,7 @@ return require("packer").startup( -- misc use "tweekmonster/startuptime.vim" use "907th/vim-auto-save" - use "kdav5758/TrueZen.nvim" use "karb94/neoscroll.nvim" + use "kdav5758/TrueZen.nvim" end ) diff --git a/lua/zenmode/lua.lua b/lua/zenmode/lua.lua index 8ad964b..6f985db 100644 --- a/lua/zenmode/lua.lua +++ b/lua/zenmode/lua.lua @@ -8,7 +8,6 @@ true_zen.setup( before_minimalist_mode_hidden = true, after_minimalist_mode_shown = true, after_minimalist_mode_hidden = true, --- unknown_bkg_color_fix = true, bottom = { hidden_laststatus = 0, hidden_ruler = false, @@ -38,7 +37,8 @@ true_zen.setup( left_padding = 37, right_padding = 37, top_padding = 2, - bottom_padding = 2 + bottom_padding = 2, + custome_bg = "#1e222a" }, integrations = { integration_galaxyline = true From 84d039b0c8d92f6788d805225418c2e2fbc4435b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 29 Apr 2021 19:36:22 +0530 Subject: [PATCH 0171/1541] webdevicons : add icon for vala filetype --- lua/file-icons/lua.lua | 5 +++++ lua/pluginsList/lua.lua | 1 + 2 files changed, 6 insertions(+) diff --git a/lua/file-icons/lua.lua b/lua/file-icons/lua.lua index 29307fa..5d3e80b 100644 --- a/lua/file-icons/lua.lua +++ b/lua/file-icons/lua.lua @@ -106,6 +106,11 @@ require "nvim-web-devicons".setup { icon = "", color = "#fca2aa", name = "rpm" + }, + vala = { + icon = "", + color = "#ccaced", + name = "vala" } } } diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 4e97992..233c584 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -41,5 +41,6 @@ return require("packer").startup( use "907th/vim-auto-save" use "karb94/neoscroll.nvim" use "kdav5758/TrueZen.nvim" + end ) From b87a354dda2aeb484c370f7439ea8dbdd29f58a6 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 29 Apr 2021 20:55:03 +0530 Subject: [PATCH 0172/1541] Update README.md --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 4664614..90947ee 100644 --- a/README.md +++ b/README.md @@ -59,12 +59,9 @@ Lua fork of vim devicons which lets me change icons of filetypes ### nvim-treesitter Better syntax highlighting for programming languages ( my config just has html,css,js support for now ). -without Treesitter : +without / with Treesitter : -with Treesitter : -
- ### nvim-base16 - contains a collection of all base16 themes for vim , plugin written in lua (comparison of base16-vim and nvim-base16): From 92312377df6ea85cdd9633c15029c813a0c3c63f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 30 Apr 2021 12:56:26 +0530 Subject: [PATCH 0173/1541] remove unneeded stuff --- init.lua | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index 7c88c6c..7554268 100644 --- a/init.lua +++ b/init.lua @@ -61,19 +61,10 @@ cmd "hi Normal guibg=NONE ctermbg=NONE" require "telescope.lua" require "nvimTree.lua" --- git signs +-- git signs , lsp symbols etc require "gitsigns.lua" - require("nvim-autopairs").setup() - -require("lspkind").init( - { - with_text = true, - symbol_map = { - Folder = "" - } - } -) +require("lspkind").init() -- hide line numbers in terminal windows vim.api.nvim_exec([[ From 852a7f6b1e1ec5c546d158b8a975586809f308eb Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 30 Apr 2021 12:58:47 +0530 Subject: [PATCH 0174/1541] remove unneeded packadds --- lua/compe/lua.lua | 3 --- lua/file-icons/lua.lua | 7 ------- lua/lspconfig/lua.lua | 3 --- lua/nvimTree/lua.lua | 2 -- lua/pluginsList/lua.lua | 9 +++------ 5 files changed, 3 insertions(+), 21 deletions(-) diff --git a/lua/compe/lua.lua b/lua/compe/lua.lua index d65845b..8303669 100644 --- a/lua/compe/lua.lua +++ b/lua/compe/lua.lua @@ -1,6 +1,3 @@ -vim.cmd [[packadd nvim-lspconfig]] -vim.cmd [[packadd nvim-compe]] - vim.o.completeopt = "menuone,noselect" require "compe".setup { diff --git a/lua/file-icons/lua.lua b/lua/file-icons/lua.lua index 5d3e80b..59807a9 100644 --- a/lua/file-icons/lua.lua +++ b/lua/file-icons/lua.lua @@ -1,5 +1,3 @@ -vim.cmd [[packadd nvim-web-devicons]] - require "nvim-web-devicons".setup { override = { html = { @@ -106,11 +104,6 @@ require "nvim-web-devicons".setup { icon = "", color = "#fca2aa", name = "rpm" - }, - vala = { - icon = "", - color = "#ccaced", - name = "vala" } } } diff --git a/lua/lspconfig/lua.lua b/lua/lspconfig/lua.lua index f0d7000..e0d6a1c 100644 --- a/lua/lspconfig/lua.lua +++ b/lua/lspconfig/lua.lua @@ -1,6 +1,3 @@ -vim.cmd [[packadd nvim-lspconfig]] -vim.cmd [[packadd nvim-compe]] - function on_attach(client) local function map(...) vim.api.nvim_buf_set_keymap(bufnr, ...) diff --git a/lua/nvimTree/lua.lua b/lua/nvimTree/lua.lua index 4f2553e..3090289 100644 --- a/lua/nvimTree/lua.lua +++ b/lua/nvimTree/lua.lua @@ -1,8 +1,6 @@ local cmd = vim.cmd local g = vim.g -cmd [[packadd nvim-tree.lua]] - vim.o.termguicolors = true g.nvim_tree_side = "left" diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 233c584..507cdce 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -1,14 +1,10 @@ --- check if packer is installed (~/local/share/nvim/site/pack) -local packer_exists = pcall(vim.cmd, [[packadd packer.nvim]]) - local packer = require("packer") local use = packer.use --- using { } when using a different branch of the plugin or loading the plugin with certain commands +-- using { } for using different branch , loading plugin with certain commands etc return require("packer").startup( function() - use {"wbthomason/packer.nvim", opt = true} - use {"lukas-reineke/indent-blankline.nvim", branch = "lua"} + use "wbthomason/packer.nvim" -- color related stuff use "norcalli/nvim-base16.lua" @@ -42,5 +38,6 @@ return require("packer").startup( use "karb94/neoscroll.nvim" use "kdav5758/TrueZen.nvim" + use {"lukas-reineke/indent-blankline.nvim", branch = "lua"} end ) From 5e8e124b4e15ac75d8cc7c10aabc870abd4d1a31 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 1 May 2021 12:02:40 +0530 Subject: [PATCH 0175/1541] install npm pkgs globally by local prefix --- install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 5bd9fc8..a71fa3d 100755 --- a/install.sh +++ b/install.sh @@ -16,6 +16,8 @@ for lang in $default_lsp_langs; do choose_langs $lang done +npm config set prefix=~/.node_modules # for global npm pkg installation + pfx="~~~~~ " heading() { echo @@ -83,7 +85,7 @@ install_node_deps() { echo "npm not installed" return fi - sudo npm install -g $@ + npm install -g $@ } # install languages @@ -134,6 +136,8 @@ if [[ ${warn_path} == true ]]; then echo "Ensure ${LSP_BIN_PATH} is available in your \$PATH variable" fi +echo "add ~/.node_modules/bin at PATH!" + # install all plugins via packer nvim +PackerInstall From c557e8fc94a0a5670bc80e6e1cdb6010a0194d30 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 1 May 2021 20:48:13 +0530 Subject: [PATCH 0176/1541] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 90947ee..c706e64 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,10 @@ git clone https://github.com/wbthomason/packer.nvim\ - Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) , this usually depends on the language support you want to add in your neovim config. ``` -sudo npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier +npm config set prefix=~/.node_modules +npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier + +(ADD ~/.node_modules at your PATH) ``` To setup any language server , follow this guide https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md and search up the needed LSP. For example if I needed clangd's lsp server : From adef2de8d55aa60a93523d448722f4f1256b3051 Mon Sep 17 00:00:00 2001 From: Henri <52706578+Vanderscycle@users.noreply.github.com> Date: Mon, 3 May 2021 12:28:54 -0700 Subject: [PATCH 0177/1541] Update README.md Corrected a small repetition. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index c706e64..593c8ca 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,6 @@ I'd install it first and add its setup line : - leader + f b open all buffers - leader + f f find files in the current DIR - leader + f o open recently edited files -- leader + f f find files in the current DIR - leader + f h opens up a help page like thing - Ctrl + v open files in vertical split - Ctrl + x open files in horizontal split From 615c391d5d9a798b2801164216f565b469659bfc Mon Sep 17 00:00:00 2001 From: Henri <52706578+Vanderscycle@users.noreply.github.com> Date: Mon, 3 May 2021 14:57:54 -0700 Subject: [PATCH 0178/1541] Update lua.lua Added snippet support for a later merge should the author decides that this type of snippet support fits his needs. --- lua/pluginsList/lua.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 507cdce..09b2536 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -23,6 +23,10 @@ return require("packer").startup( use "glepnir/galaxyline.nvim" use "windwp/nvim-autopairs" use "alvan/vim-closetag" + + -- snippet support + use "hrsh7th/vim-vsnip" + use "rafamadriz/friendly-snippets" -- file managing , picker etc use "kyazdani42/nvim-tree.lua" From 4d3138e75b147dddd22718e77673ce1b97d9a97c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 4 May 2021 09:36:09 +0530 Subject: [PATCH 0179/1541] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 593c8ca..1136a9a 100644 --- a/README.md +++ b/README.md @@ -213,7 +213,6 @@ I'd install it first and add its setup line : # TODO -- Add snippets support. - Make the statusline more elegant. - Add more themes. From 2430a4e1b228386485a5bbc8bc9fb4d1ca7d3688 Mon Sep 17 00:00:00 2001 From: Henri Vandersleyen Date: Tue, 4 May 2021 10:34:12 -0700 Subject: [PATCH 0180/1541] Small change to the readme.md mentioning vsnip and what are snips are avail already. Changed one line in compe/lua.lua to indicate vsnip better. --- README.md | 5 ++++- lua/compe/lua.lua | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1136a9a..7b77f90 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,8 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal - packer.nvim as package manager - indent-blankline.Nvim for indentlines - smooth scrolling - +- Snip support from VSCode through vsnip supporting custom and predefined snips (friendly-snippets) + # Guides to migrate your nvim configs to init.lua - - https://github.com/nanotee/nvim-lua-guide @@ -120,6 +121,8 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal - https://icyphox.sh/blog/nvim-lua/ +- https://github.com/rafamadriz/friendly-snippets/wiki + # Clone my setup - - Install neovim-nightly , also use a nerdfont on your terminal. diff --git a/lua/compe/lua.lua b/lua/compe/lua.lua index 8303669..1e0ec99 100644 --- a/lua/compe/lua.lua +++ b/lua/compe/lua.lua @@ -17,7 +17,7 @@ require "compe".setup { path = true, buffer = true, calc = true, - vsnip = true, + vsnip = {kind = "﬌"}, --replace to what sign you prefer nvim_lsp = true, nvim_lua = true, spell = true, From 0f3ed9f54c24a10b49ade2baac942e4653f44099 Mon Sep 17 00:00:00 2001 From: Henri Vandersleyen Date: Tue, 4 May 2021 13:28:08 -0700 Subject: [PATCH 0181/1541] changed the default lsp letters to symbols. --- lua/lspconfig/lua.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/lspconfig/lua.lua b/lua/lspconfig/lua.lua index e0d6a1c..0c1b86e 100644 --- a/lua/lspconfig/lua.lua +++ b/lua/lspconfig/lua.lua @@ -76,3 +76,9 @@ require "lspconfig".sumneko_lua.setup { } } } + +-- replace the default lsp diagnostic letters with prettier symbols +vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnosticsDefaultError"}) +vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"}) +vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"}) +vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"}) From 503dc5b1c8a511ebbfaecee96381af7bc70de7cf Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 5 May 2021 06:51:04 +0530 Subject: [PATCH 0182/1541] better config structure --- README.md | 16 +++++------- init.lua | 26 +++++++++---------- lua/{compe/lua.lua => compe-completion.lua} | 0 lua/{file-icons/lua.lua => file-icons.lua} | 0 lua/{gitsigns/lua.lua => gitsigns-nvim.lua} | 0 lua/{mappings/lua.lua => mappings.lua} | 0 lua/{misc-utils/lua.lua => misc-utils.lua} | 0 lua/{lspconfig/lua.lua => nvim-lspconfig.lua} | 0 lua/{nvimTree/lua.lua => nvimTree.lua} | 0 lua/{pluginsList/lua.lua => pluginList.lua} | 0 lua/{statusline/lua.lua => statusline.lua} | 0 lua/{telescope/lua.lua => telescope-nvim.lua} | 0 .../lua.lua => top-bufferline.lua} | 0 .../lua.lua => treesitter-nvim.lua} | 0 lua/{zenmode/lua.lua => zenmode.lua} | 0 15 files changed, 20 insertions(+), 22 deletions(-) rename lua/{compe/lua.lua => compe-completion.lua} (100%) rename lua/{file-icons/lua.lua => file-icons.lua} (100%) rename lua/{gitsigns/lua.lua => gitsigns-nvim.lua} (100%) rename lua/{mappings/lua.lua => mappings.lua} (100%) rename lua/{misc-utils/lua.lua => misc-utils.lua} (100%) rename lua/{lspconfig/lua.lua => nvim-lspconfig.lua} (100%) rename lua/{nvimTree/lua.lua => nvimTree.lua} (100%) rename lua/{pluginsList/lua.lua => pluginList.lua} (100%) rename lua/{statusline/lua.lua => statusline.lua} (100%) rename lua/{telescope/lua.lua => telescope-nvim.lua} (100%) rename lua/{bufferline/lua.lua => top-bufferline.lua} (100%) rename lua/{treesitter/lua.lua => treesitter-nvim.lua} (100%) rename lua/{zenmode/lua.lua => zenmode.lua} (100%) diff --git a/README.md b/README.md index 7b77f90..8cc96b0 100644 --- a/README.md +++ b/README.md @@ -79,15 +79,13 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal nvim ├──init.lua └──lua - └──foo - └──lua.lua + └──anything.lua ``` - The init.lua is used instead of init.vim. - -- The lua folder contains modules ( config files ) , in the example above "foo" folder could be considered as a module and it contains a lua.lua. -- The lua.lua file is supposed to have any nvim config written in lua , its like splitting the overall config into small bits and make it more organized. -- To load or source that "foo" module (like making it load with init.lua ) , you need to load it in init.lua like this : require('foo.lua'). +- The lua folder contains modules ( config files ) , in the example above anything.lua file in lua folder could be considered as a module. +- The anything.lua file is supposed to have any neovim config written in lua , its like splitting the overall config into small bits and make it more organized , like one module for highlights and colors , another one for statusline and so on!. +- To load or source that "anything" module (like making it load with init.lua ) ,add this is in init.lua : require "anything". # Features @@ -110,7 +108,7 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal - indent-blankline.Nvim for indentlines - smooth scrolling - Snip support from VSCode through vsnip supporting custom and predefined snips (friendly-snippets) - + # Guides to migrate your nvim configs to init.lua - - https://github.com/nanotee/nvim-lua-guide @@ -138,7 +136,7 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal git clone https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim - + ``` - copy lua folder and init.lua into ~/.config/nvim @@ -146,7 +144,7 @@ git clone https://github.com/wbthomason/packer.nvim\ - Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) , this usually depends on the language support you want to add in your neovim config. ``` -npm config set prefix=~/.node_modules +npm config set prefix=~/.node_modules npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier (ADD ~/.node_modules at your PATH) diff --git a/init.lua b/init.lua index 7554268..82b9bda 100644 --- a/init.lua +++ b/init.lua @@ -1,17 +1,17 @@ -- load all plugins -require "pluginsList.lua" -require "file-icons.lua" +require "pluginList" +require "file-icons" -require "misc-utils.lua" -require "bufferline.lua" -require "statusline.lua" +require "misc-utils" +require "top-bufferline" +require "statusline" require("colorizer").setup() require("neoscroll").setup() -- smooth scroll -- lsp -require "lspconfig.lua" -require "compe.lua" +require "nvim-lspconfig" +require "compe-completion" local cmd = vim.cmd local g = vim.g @@ -42,8 +42,8 @@ g.indent_blankline_buftype_exclude = {"terminal"} g.indent_blankline_show_trailing_blankline_indent = false g.indent_blankline_show_first_indent_level = false -require "treesitter.lua" -require "mappings.lua" +require "treesitter-nvim" +require "mappings" -- highlights -- cmd "hi LineNr guifg=#42464e guibg=NONE" @@ -58,11 +58,11 @@ cmd "hi Pmenu guibg=#282c34" cmd "hi Normal guibg=NONE ctermbg=NONE" -- cmd "hi Normal guibg=#1e222a" -require "telescope.lua" -require "nvimTree.lua" +require "telescope-nvim" +require "nvimTree" -- git signs , lsp symbols etc -require "gitsigns.lua" +require "gitsigns-nvim" require("nvim-autopairs").setup() require("lspkind").init() @@ -78,4 +78,4 @@ cmd "hi clear CursorLine" cmd "hi cursorlinenr guibg=NONE guifg=#abb2bf" -- setup for TrueZen.nvim -require "zenmode.lua" +require "zenmode" diff --git a/lua/compe/lua.lua b/lua/compe-completion.lua similarity index 100% rename from lua/compe/lua.lua rename to lua/compe-completion.lua diff --git a/lua/file-icons/lua.lua b/lua/file-icons.lua similarity index 100% rename from lua/file-icons/lua.lua rename to lua/file-icons.lua diff --git a/lua/gitsigns/lua.lua b/lua/gitsigns-nvim.lua similarity index 100% rename from lua/gitsigns/lua.lua rename to lua/gitsigns-nvim.lua diff --git a/lua/mappings/lua.lua b/lua/mappings.lua similarity index 100% rename from lua/mappings/lua.lua rename to lua/mappings.lua diff --git a/lua/misc-utils/lua.lua b/lua/misc-utils.lua similarity index 100% rename from lua/misc-utils/lua.lua rename to lua/misc-utils.lua diff --git a/lua/lspconfig/lua.lua b/lua/nvim-lspconfig.lua similarity index 100% rename from lua/lspconfig/lua.lua rename to lua/nvim-lspconfig.lua diff --git a/lua/nvimTree/lua.lua b/lua/nvimTree.lua similarity index 100% rename from lua/nvimTree/lua.lua rename to lua/nvimTree.lua diff --git a/lua/pluginsList/lua.lua b/lua/pluginList.lua similarity index 100% rename from lua/pluginsList/lua.lua rename to lua/pluginList.lua diff --git a/lua/statusline/lua.lua b/lua/statusline.lua similarity index 100% rename from lua/statusline/lua.lua rename to lua/statusline.lua diff --git a/lua/telescope/lua.lua b/lua/telescope-nvim.lua similarity index 100% rename from lua/telescope/lua.lua rename to lua/telescope-nvim.lua diff --git a/lua/bufferline/lua.lua b/lua/top-bufferline.lua similarity index 100% rename from lua/bufferline/lua.lua rename to lua/top-bufferline.lua diff --git a/lua/treesitter/lua.lua b/lua/treesitter-nvim.lua similarity index 100% rename from lua/treesitter/lua.lua rename to lua/treesitter-nvim.lua diff --git a/lua/zenmode/lua.lua b/lua/zenmode.lua similarity index 100% rename from lua/zenmode/lua.lua rename to lua/zenmode.lua From 49c1f84e6e1cf0b026d1e0b2b910a40c19b56b76 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 5 May 2021 07:20:42 +0530 Subject: [PATCH 0183/1541] better LspDiagnostics icons and colors --- lua/compe-completion.lua | 2 +- lua/nvim-lspconfig.lua | 26 +++++++++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/lua/compe-completion.lua b/lua/compe-completion.lua index 1e0ec99..0fa3ecd 100644 --- a/lua/compe-completion.lua +++ b/lua/compe-completion.lua @@ -15,7 +15,7 @@ require "compe".setup { documentation = true, source = { path = true, - buffer = true, + buffer = {kind = "﬘" , true}, calc = true, vsnip = {kind = "﬌"}, --replace to what sign you prefer nvim_lsp = true, diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index 0c1b86e..d8e2f59 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -36,7 +36,7 @@ function on_attach(client) end local lspconf = require "lspconfig" -local servers = {"html", "cssls", "tsserver", "pyright" , "bashls"} +local servers = {"html", "cssls", "tsserver", "pyright", "bashls"} for k, lang in pairs(servers) do lspconf[lang].setup { @@ -78,7 +78,23 @@ require "lspconfig".sumneko_lua.setup { } -- replace the default lsp diagnostic letters with prettier symbols -vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnosticsDefaultError"}) -vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"}) -vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"}) -vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"}) +vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnosticsDefaultError"}) +vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"}) +vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"}) +vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"}) + +-- diagnostics highlights + +local cmd = vim.cmd + +cmd "hi LspDiagnosticsSignError guifg=#f9929b" +cmd "hi LspDiagnosticsVirtualTextError guifg=#BF616A" + +cmd "hi LspDiagnosticsSignWarning guifg=#EBCB8B" +cmd "hi LspDiagnosticsVirtualTextWarning guifg=#EBCB8B" + +cmd "hi LspDiagnosticsSignInformation guifg=#A3BE8C" +cmd "hi LspDiagnosticsVirtualTextInformation guifg=#A3BE8C" + +cmd "hi LspDiagnosticsSignHint guifg=#b6bdca" +cmd "hi LspDiagnosticsVirtualTextHint guifg=#b6bdca" From 7cb78518684278f4714e43f218dbf18a4bd47c85 Mon Sep 17 00:00:00 2001 From: marvelman3284 Date: Wed, 5 May 2021 09:55:41 -0400 Subject: [PATCH 0184/1541] Fix a smaller error that prevents the changing of shells --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index a71fa3d..374cc14 100755 --- a/install.sh +++ b/install.sh @@ -56,9 +56,9 @@ read -p "which shell do you use?: " shellname echo "$shellname" if [ "$(get_platform)" = "Mac" ]; then - gsed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua + gsed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings.lua else - sed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua + sed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings.lua fi echo "shell changed to $shellname on nvim successfully!" From c7e2f6357cb531981eb89bea34afdf02ea600737 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 6 May 2021 09:35:23 +0530 Subject: [PATCH 0185/1541] minor changes with highlights --- init.lua | 12 ++++-------- lua/pluginList.lua | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/init.lua b/init.lua index 82b9bda..28b6fcc 100644 --- a/init.lua +++ b/init.lua @@ -46,18 +46,14 @@ require "treesitter-nvim" require "mappings" -- highlights -- -cmd "hi LineNr guifg=#42464e guibg=NONE" +cmd "hi LineNr guifg=#42464e" cmd "hi Comment guifg=#42464e" -cmd "hi SignColumn guibg=NONE" -cmd "hi VertSplit guibg=NONE guifg=#2a2e36" +cmd "hi VertSplit guifg=#2a2e36" cmd "hi EndOfBuffer guifg=#1e222a" cmd "hi PmenuSel guibg=#98c379" cmd "hi Pmenu guibg=#282c34" -cmd "hi Normal guibg=NONE ctermbg=NONE" --- cmd "hi Normal guibg=#1e222a" - require "telescope-nvim" require "nvimTree" @@ -72,10 +68,10 @@ vim.api.nvim_exec([[ ]], false) -- inactive statuslines as thin splitlines -cmd("highlight! StatusLineNC gui=underline guibg=NONE guifg=#383c44") +cmd("highlight! StatusLineNC gui=underline guifg=#383c44") cmd "hi clear CursorLine" -cmd "hi cursorlinenr guibg=NONE guifg=#abb2bf" +cmd "hi cursorlinenr guifg=#abb2bf" -- setup for TrueZen.nvim require "zenmode" diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 09b2536..2758cb9 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -7,7 +7,7 @@ return require("packer").startup( use "wbthomason/packer.nvim" -- color related stuff - use "norcalli/nvim-base16.lua" + use "siduck76/nvim-base16.lua" use "norcalli/nvim-colorizer.lua" -- lsp stuff From e2dbec749674719ef1ee0058d09fc5144f8e72cd Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 6 May 2021 19:49:02 +0530 Subject: [PATCH 0186/1541] made bufferline tabs look better --- init.lua | 1 - install.sh | 3 ++- lua/top-bufferline.lua | 24 ++++++++++++------------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/init.lua b/init.lua index 28b6fcc..651860b 100644 --- a/init.lua +++ b/init.lua @@ -21,7 +21,6 @@ g.auto_save = 0 -- colorscheme related stuff -cmd "syntax enable" cmd "syntax on" local base16 = require "base16" diff --git a/install.sh b/install.sh index 374cc14..6450824 100755 --- a/install.sh +++ b/install.sh @@ -16,7 +16,8 @@ for lang in $default_lsp_langs; do choose_langs $lang done -npm config set prefix=~/.node_modules # for global npm pkg installation +# install npm pkg global +npm config set prefix=~/.node_modules pfx="~~~~~ " heading() { diff --git a/lua/top-bufferline.lua b/lua/top-bufferline.lua index 707a8a2..31865d2 100644 --- a/lua/top-bufferline.lua +++ b/lua/top-bufferline.lua @@ -12,7 +12,7 @@ require "bufferline".setup { right_trunc_marker = "", max_name_length = 14, max_prefix_length = 13, - tab_size = 18, + tab_size = 20, enforce_regular_tabs = true, view = "multiwindow", show_buffer_close_icons = true, @@ -21,21 +21,21 @@ require "bufferline".setup { highlights = { background = { guifg = bar_fg, - guibg = "#1e222a" + guibg = "#282c34" }, fill = { guifg = bar_fg, - guibg = "#1e222a" + guibg = "#282c34" }, -- focused window buffer_selected = { guifg = activeBuffer_fg, - guibg = "#353b45", + guibg = "#1e222a", gui = "bold" }, separator_selected = { - guifg = "#353b45", - guibg = "#353b45" + guifg = "#1e222a", + guibg = "#1e222a" }, -- unfocused opened window buffer_visible = { @@ -47,16 +47,16 @@ require "bufferline".setup { guibg = "#282c34" }, separator = { - guifg = "#1e222a", - guibg = "#1e222a" + guifg = "#282c34", + guibg = "#282c34" }, indicator_selected = { - guifg = "#1e222a", - guibg = "#1e222a" + guifg = "#282c34", + guibg = "#282c34" }, modified_selected = { - guifg = "#d0f5c2", - guibg = "#353b45" + guifg = "#A3BE8C", + guibg = "#1e222a" } } } From 562bea6d1a56eefc6533e01a0ee05fc596a2af10 Mon Sep 17 00:00:00 2001 From: mTvare <57838468+mTvare6@users.noreply.github.com> Date: Thu, 6 May 2021 22:30:22 +0530 Subject: [PATCH 0187/1541] Update treesitter-nvim.lua --- lua/treesitter-nvim.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/treesitter-nvim.lua b/lua/treesitter-nvim.lua index cebde4f..7099955 100644 --- a/lua/treesitter-nvim.lua +++ b/lua/treesitter-nvim.lua @@ -9,8 +9,8 @@ ts_config.setup { "lua", "json", "python" - -- "cpp", - -- "rust", + "cpp", + "rust", }, highlight = { enable = true, From 24a9c1b98ab650ce9ff54cbf437a369de2b88b7d Mon Sep 17 00:00:00 2001 From: mTvare <57838468+mTvare6@users.noreply.github.com> Date: Thu, 6 May 2021 22:31:24 +0530 Subject: [PATCH 0188/1541] Update pluginList.lua --- lua/pluginList.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 2758cb9..bec25fa 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -9,6 +9,7 @@ return require("packer").startup( -- color related stuff use "siduck76/nvim-base16.lua" use "norcalli/nvim-colorizer.lua" + use "ollykel/v-vim" -- v syntax -- lsp stuff use "nvim-treesitter/nvim-treesitter" @@ -42,6 +43,10 @@ return require("packer").startup( use "karb94/neoscroll.nvim" use "kdav5758/TrueZen.nvim" + -- discord rich presence + --use "andweeb/presence.nvim" + + use {"lukas-reineke/indent-blankline.nvim", branch = "lua"} end ) From 8d17b34fbe9e85c26d354d45e7551acebebebf0d Mon Sep 17 00:00:00 2001 From: mTvare <57838468+mTvare6@users.noreply.github.com> Date: Thu, 6 May 2021 22:32:19 +0530 Subject: [PATCH 0189/1541] Update top-bufferline.lua --- lua/top-bufferline.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/top-bufferline.lua b/lua/top-bufferline.lua index 31865d2..d5680d6 100644 --- a/lua/top-bufferline.lua +++ b/lua/top-bufferline.lua @@ -73,5 +73,5 @@ map("n", "", [[tabnew]], opt) map("n", "", [[bdelete]], opt) -- tabnew and tabprev -map("n", "", [[BufferLineCycleNext]], opt) -map("n", "", [[BufferLineCyclePrev]], opt) +map("n", "", [[BufferLineCycleNext]], opt) +map("n", "", [[BufferLineCyclePrev]], opt) From 5359f95cedffc0d4e1bdcc6dc09b13584eeac93a Mon Sep 17 00:00:00 2001 From: mTvare <57838468+mTvare6@users.noreply.github.com> Date: Thu, 6 May 2021 22:34:12 +0530 Subject: [PATCH 0190/1541] Update nvim-lspconfig.lua --- lua/nvim-lspconfig.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index d8e2f59..7af96c3 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -36,7 +36,7 @@ function on_attach(client) end local lspconf = require "lspconfig" -local servers = {"html", "cssls", "tsserver", "pyright", "bashls"} +local servers = {"html", "cssls", "tsserver", "pyright", "bashls", "ccls", "rust_analyzer", "vls"} for k, lang in pairs(servers) do lspconf[lang].setup { @@ -44,6 +44,11 @@ for k, lang in pairs(servers) do } end +local vls_binary = '/usr/local/bin/vls' +require'lspconfig'.vls.setup { + cmd = {vls_binary}, +} + -- lua lsp settings USER = "/home/" .. vim.fn.expand("$USER") From 82d21e445cae07a187e77b1af29e500a45ed48e7 Mon Sep 17 00:00:00 2001 From: mTvare <57838468+mTvare6@users.noreply.github.com> Date: Thu, 6 May 2021 22:44:25 +0530 Subject: [PATCH 0191/1541] Update pluginList.lua --- lua/pluginList.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index bec25fa..26d7a2d 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -9,7 +9,7 @@ return require("packer").startup( -- color related stuff use "siduck76/nvim-base16.lua" use "norcalli/nvim-colorizer.lua" - use "ollykel/v-vim" -- v syntax + -- use "ollykel/v-vim" -- v syntax highlighter -- lsp stuff use "nvim-treesitter/nvim-treesitter" From bf3e29bfafc0403e8d318be8e3ac952b4b1008b0 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 6 May 2021 22:45:57 +0530 Subject: [PATCH 0192/1541] Update nvim-lspconfig.lua --- lua/nvim-lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index 7af96c3..2ab7201 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -36,7 +36,7 @@ function on_attach(client) end local lspconf = require "lspconfig" -local servers = {"html", "cssls", "tsserver", "pyright", "bashls", "ccls", "rust_analyzer", "vls"} +local servers = {"html", "cssls", "tsserver", "pyright", "bashls", "vls"} for k, lang in pairs(servers) do lspconf[lang].setup { From e8210d821d85be8de39593090a9e5a8ea627ea97 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 6 May 2021 22:46:28 +0530 Subject: [PATCH 0193/1541] Update treesitter-nvim.lua --- lua/treesitter-nvim.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/treesitter-nvim.lua b/lua/treesitter-nvim.lua index 7099955..369bcf0 100644 --- a/lua/treesitter-nvim.lua +++ b/lua/treesitter-nvim.lua @@ -9,8 +9,6 @@ ts_config.setup { "lua", "json", "python" - "cpp", - "rust", }, highlight = { enable = true, From a392c66df126c953031ce03dc090070ae2bcd92a Mon Sep 17 00:00:00 2001 From: Sergio Alejandro Ribera Costa Date: Fri, 7 May 2021 02:16:32 -0400 Subject: [PATCH 0194/1541] Fix Bug with Packer and borders on excecute any command --- lua/pluginList.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 26d7a2d..9ccb6fa 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -48,5 +48,10 @@ return require("packer").startup( use {"lukas-reineke/indent-blankline.nvim", branch = "lua"} - end + end, + { + display = { + border = { "┌", "─", "┐", "│", "┘", "─", "└", "│" } + } + } ) From 1007be42c14bf2e57f8583d4dd9507c01489cb17 Mon Sep 17 00:00:00 2001 From: Sergio Alejandro Ribera Costa Date: Fri, 7 May 2021 02:28:03 -0400 Subject: [PATCH 0195/1541] Add Clang (C/C++) LSP --- lua/nvim-lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index 2ab7201..27766bd 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -36,7 +36,7 @@ function on_attach(client) end local lspconf = require "lspconfig" -local servers = {"html", "cssls", "tsserver", "pyright", "bashls", "vls"} +local servers = {"html", "cssls", "tsserver", "pyright", "bashls", "vls", "clangd"} for k, lang in pairs(servers) do lspconf[lang].setup { From 7cc75ffe1d300e149d71fa09af27040eb51812bc Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 7 May 2021 13:36:54 +0530 Subject: [PATCH 0196/1541] add NvimTree bg , make its versplit transparent --- lua/mappings.lua | 4 ---- lua/nvim-lspconfig.lua | 1 + lua/nvimTree.lua | 2 ++ lua/pluginList.lua | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index a4d9222..5afeb33 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -17,9 +17,6 @@ map("v", "x", [=[ "_x ]=], opt) ]] --- copy any selected text with pressing y -map("", "c", '"+y') - -- OPEN TERMINALS -- map("n", "", [[vnew term://bash ]], opt) -- open term over right map("n", "", [[ split term://bash | resize 10 ]], opt) -- open term bottom @@ -33,4 +30,3 @@ map("n", "n", [[ set nu!]], opt) -- toggle truezen.nvim's ataraxis and minimalist mode map("n", "z", [[ TZAtaraxis]], opt) map("n", "m", [[ TZMinimalist]], opt) - diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index 2ab7201..018257b 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -44,6 +44,7 @@ for k, lang in pairs(servers) do } end +-- remove the lsp servers with their configs you don want local vls_binary = '/usr/local/bin/vls' require'lspconfig'.vls.setup { cmd = {vls_binary}, diff --git a/lua/nvimTree.lua b/lua/nvimTree.lua index 3090289..19a4ed4 100644 --- a/lua/nvimTree.lua +++ b/lua/nvimTree.lua @@ -87,3 +87,5 @@ g.nvim_tree_bindings = { cmd "hi NvimTreeFolderIcon guifg = #61afef" cmd "hi NvimTreeFolderName guifg = #61afef" cmd "hi NvimTreeIndentMarker guifg=#383c44" +cmd "hi NvimTreeNormal guibg=#1b1f27" +cmd "hi NvimTreeVertSplit guifg=#1e222a" diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 26d7a2d..91a62ba 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -46,7 +46,6 @@ return require("packer").startup( -- discord rich presence --use "andweeb/presence.nvim" - use {"lukas-reineke/indent-blankline.nvim", branch = "lua"} end ) From 122e89e36158a95320e8534605a0ccc0379a7aa8 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 7 May 2021 13:46:04 +0530 Subject: [PATCH 0197/1541] added ccls lsp --- lua/nvim-lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index 27766bd..c1a51cb 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -36,7 +36,7 @@ function on_attach(client) end local lspconf = require "lspconfig" -local servers = {"html", "cssls", "tsserver", "pyright", "bashls", "vls", "clangd"} +local servers = {"html", "cssls", "tsserver", "pyright", "bashls", "vls", "clangd", "ccls} for k, lang in pairs(servers) do lspconf[lang].setup { From 869f94924336c74d0807817fbb01eb97dbbebe05 Mon Sep 17 00:00:00 2001 From: Fladson Gomes Date: Fri, 7 May 2021 10:34:18 +0200 Subject: [PATCH 0198/1541] Fix unfinished string --- lua/nvim-lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index 8d935bd..3c5faa9 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -36,7 +36,7 @@ function on_attach(client) end local lspconf = require "lspconfig" -local servers = {"html", "cssls", "tsserver", "pyright", "bashls", "vls", "clangd", "ccls} +local servers = {"html", "cssls", "tsserver", "pyright", "bashls", "vls", "clangd", "ccls"} for k, lang in pairs(servers) do lspconf[lang].setup { From 5272eb3f1949bafc578e04e28102bb8c5196efcb Mon Sep 17 00:00:00 2001 From: Henri <52706578+Vanderscycle@users.noreply.github.com> Date: Sat, 8 May 2021 20:44:34 -0700 Subject: [PATCH 0199/1541] Update README.md The Readme keys were not matching the defined keys in top-bufferline.lua --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8cc96b0..198f126 100644 --- a/README.md +++ b/README.md @@ -208,9 +208,9 @@ I'd install it first and add its setup line : - **Managing tabs with bufferline!** -- Shift l or s cycle through opened tabs -- Shift d close current tab -- Shift b open new tab +- Shift , or . cycle through opened tabs +- Shift x close current tab +- Shift t open new tab # TODO From dc78a130533a8520bad958e400035c8804b233c4 Mon Sep 17 00:00:00 2001 From: Henri Vandersleyen Date: Sat, 8 May 2021 22:21:29 -0700 Subject: [PATCH 0200/1541] restored the tab binding to the original shift l | p. Consideration should be given by the owner of the repo if C-,|C-. is better as a binding. --- README.md | 2 +- lua/top-bufferline.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 198f126..433f2ad 100644 --- a/README.md +++ b/README.md @@ -208,7 +208,7 @@ I'd install it first and add its setup line : - **Managing tabs with bufferline!** -- Shift , or . cycle through opened tabs +- Shift l or p cycle through opened tabs - Shift x close current tab - Shift t open new tab diff --git a/lua/top-bufferline.lua b/lua/top-bufferline.lua index d5680d6..3ed1c8a 100644 --- a/lua/top-bufferline.lua +++ b/lua/top-bufferline.lua @@ -73,5 +73,5 @@ map("n", "", [[tabnew]], opt) map("n", "", [[bdelete]], opt) -- tabnew and tabprev -map("n", "", [[BufferLineCycleNext]], opt) -map("n", "", [[BufferLineCyclePrev]], opt) +map("n", "", [[BufferLineCycleNext]], opt) -- Another alternate is TAB/S-TAB or C-,/C-. +map("n", "", [[BufferLineCyclePrev]], opt) From 998d6c1e8030fc061140785ceda89b543aa4e2c4 Mon Sep 17 00:00:00 2001 From: Henri Vandersleyen Date: Sat, 8 May 2021 22:52:16 -0700 Subject: [PATCH 0201/1541] Revert "Update README.md" This reverts commit 5272eb3f1949bafc578e04e28102bb8c5196efcb. --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 433f2ad..c1cfced 100644 --- a/README.md +++ b/README.md @@ -208,9 +208,15 @@ I'd install it first and add its setup line : - **Managing tabs with bufferline!** +<<<<<<< HEAD - Shift l or p cycle through opened tabs - Shift x close current tab - Shift t open new tab +======= +- Shift l or s cycle through opened tabs +- Shift d close current tab +- Shift b open new tab +>>>>>>> parent of 5272eb3 (Update README.md) # TODO From 9783f8778747a222ac5faf3b54af649b8d0a89ae Mon Sep 17 00:00:00 2001 From: Henri Vandersleyen Date: Sat, 8 May 2021 22:57:38 -0700 Subject: [PATCH 0202/1541] adjusted the bindings to be TAB and S-TAB for buffers. --- README.md | 6 +++--- lua/top-bufferline.lua | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c1cfced..0ef17d1 100644 --- a/README.md +++ b/README.md @@ -213,9 +213,9 @@ I'd install it first and add its setup line : - Shift x close current tab - Shift t open new tab ======= -- Shift l or s cycle through opened tabs -- Shift d close current tab -- Shift b open new tab +- Shift TAB or Shift TAB cycle through opened tabs +- Shift x close current tab +- Shift t open new tab >>>>>>> parent of 5272eb3 (Update README.md) # TODO diff --git a/lua/top-bufferline.lua b/lua/top-bufferline.lua index 3ed1c8a..bcf5048 100644 --- a/lua/top-bufferline.lua +++ b/lua/top-bufferline.lua @@ -73,5 +73,5 @@ map("n", "", [[tabnew]], opt) map("n", "", [[bdelete]], opt) -- tabnew and tabprev -map("n", "", [[BufferLineCycleNext]], opt) -- Another alternate is TAB/S-TAB or C-,/C-. -map("n", "", [[BufferLineCyclePrev]], opt) +map("n", "", [[BufferLineCycleNext]], opt) +map("n", "", [[BufferLineCyclePrev]], opt) From 215b52db16574f889c357a7ba155d3f9c09dae3a Mon Sep 17 00:00:00 2001 From: Henri Vandersleyen Date: Sat, 8 May 2021 23:00:44 -0700 Subject: [PATCH 0203/1541] fixed my revert errors. --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index 0ef17d1..dd61101 100644 --- a/README.md +++ b/README.md @@ -208,15 +208,9 @@ I'd install it first and add its setup line : - **Managing tabs with bufferline!** -<<<<<<< HEAD -- Shift l or p cycle through opened tabs -- Shift x close current tab -- Shift t open new tab -======= - Shift TAB or Shift TAB cycle through opened tabs - Shift x close current tab - Shift t open new tab ->>>>>>> parent of 5272eb3 (Update README.md) # TODO From d27da21cef6a5a260098100ad95efdb5f7e71b5b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 9 May 2021 13:49:16 +0530 Subject: [PATCH 0204/1541] add json lsp --- install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 6450824..a5323b5 100755 --- a/install.sh +++ b/install.sh @@ -2,7 +2,7 @@ BASE=$(git rev-parse --show-toplevel) LSP_BIN_PATH=$HOME/.local/bin -default_lsp_langs="css html ts rust python bash" +default_lsp_langs="css html ts rust python bash json" lsp_langs="" choose_langs() { @@ -103,6 +103,10 @@ install_css() { install_node_deps vscode-css-languageserver-bin } +install_json() { + install_node_deps vscode-json-languageserver +} + install_rust() { if [[ ! -e ~/.local/bin/rust-analyzer ]]; then mkdir -p ${LSP_BIN_PATH} From e54aca98ee08db33345356e1f6e55e15457d3f37 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 9 May 2021 13:52:38 +0530 Subject: [PATCH 0205/1541] added some mappings --- lua/mappings.lua | 13 ++++++++----- lua/zenmode.lua | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index 5afeb33..70fde6a 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -9,19 +9,20 @@ end local opt = {} -- dont copy any deleted text , this is disabled by default so uncomment the below mappings if you want them! ---[[ +--[[ remove this line map("n", "dd", [=[ "_dd ]=], opt) map("v", "dd", [=[ "_dd ]=], opt) map("v", "x", [=[ "_x ]=], opt) -]] + this line too ]] -- OPEN TERMINALS -- -map("n", "", [[vnew term://bash ]], opt) -- open term over right -map("n", "", [[ split term://bash | resize 10 ]], opt) -- open term bottom +map("n", "", [[vnew term://bash ]], opt) -- over right +map("n", "", [[ split term://bash | resize 10 ]], opt) -- bottom +map("n", "t", [[ tabnew | term ]], opt) -- newtab --- COPY EVERYTHING -- +-- COPY EVERYTHING in the file-- map("n", "", [[ %y+]], opt) -- toggle numbers --- @@ -30,3 +31,5 @@ map("n", "n", [[ set nu!]], opt) -- toggle truezen.nvim's ataraxis and minimalist mode map("n", "z", [[ TZAtaraxis]], opt) map("n", "m", [[ TZMinimalist]], opt) + +map("n", "", [[ w ]], opt) -- save diff --git a/lua/zenmode.lua b/lua/zenmode.lua index 6f985db..b9d49ff 100644 --- a/lua/zenmode.lua +++ b/lua/zenmode.lua @@ -30,7 +30,7 @@ true_zen.setup( hidden_signcolumn = "no", shown_number = true, shown_relativenumber = false, - shown_signcolumn = "no" + shown_signcolumn = "yes" }, ataraxis = { just_do_it_for_me = false, From d7f10904b6c45b815e25bd4b32c5f561bd71a36d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 9 May 2021 15:53:59 +0530 Subject: [PATCH 0206/1541] bufferline.nvim : changed some colors , cleaned it! --- lua/top-bufferline.lua | 85 +++++++++++++++++++++++++++--------------- 1 file changed, 55 insertions(+), 30 deletions(-) diff --git a/lua/top-bufferline.lua b/lua/top-bufferline.lua index bcf5048..fa36fbb 100644 --- a/lua/top-bufferline.lua +++ b/lua/top-bufferline.lua @@ -1,4 +1,4 @@ --- colors +-- define some colors local bar_fg = "#565c64" local activeBuffer_fg = "#c8ccd4" @@ -7,71 +7,96 @@ require "bufferline".setup { options = { buffer_close_icon = "", modified_icon = "", - close_icon = "", + close_icon = " ", left_trunc_marker = "", right_trunc_marker = "", max_name_length = 14, max_prefix_length = 13, tab_size = 20, - enforce_regular_tabs = true, + show_tab_indicators = true, + enforce_regular_tabs = false, view = "multiwindow", show_buffer_close_icons = true, - separator_style = "thin" + separator_style = "thin", + mappings = "true" }, + + -- bar colors!! highlights = { - background = { - guifg = bar_fg, - guibg = "#282c34" - }, fill = { guifg = bar_fg, - guibg = "#282c34" + guibg = "#252931" }, - -- focused window + background = { + guifg = bar_fg, + guibg = "#252931" + }, + + -- buffer buffer_selected = { guifg = activeBuffer_fg, guibg = "#1e222a", gui = "bold" }, + buffer_visible = { + guifg = "#9298a0", + guibg = "#252931" + }, + + -- tabs over right + tab = { + guifg = "#9298a0", + guibg = "#30343c" + }, + tab_selected = { + guifg = "#30343c", + guibg = "#9298a0" + }, + tab_close = { + guifg = "#f9929b", + guibg = "#252931" + }, + + -- buffer separators + separator = { + guifg = "#252931", + guibg = "#252931" + }, separator_selected = { guifg = "#1e222a", guibg = "#1e222a" }, - -- unfocused opened window - buffer_visible = { - guifg = "#9298a0", - guibg = "#282c34" - }, separator_visible = { - guifg = "#282c34", - guibg = "#282c34" - }, - separator = { - guifg = "#282c34", - guibg = "#282c34" + guifg = "#252931", + guibg = "#252931" }, + indicator_selected = { - guifg = "#282c34", - guibg = "#282c34" + guifg = "#252931", + guibg = "#252931" }, + + -- modified files (but not saved) modified_selected = { guifg = "#A3BE8C", guibg = "#1e222a" + }, + modified_visible = { + guifg = "#BF616A", + guibg = "#23272f" } } } local opt = {silent = true} - local map = vim.api.nvim_set_keymap vim.g.mapleader = " " ---command that adds new buffer and moves to it -map("n", "", [[tabnew]], opt) +-- MAPPINGS +map("n", "", [[tabnew]], opt) -- new tab +map("n", "", [[bdelete]], opt) -- close tab ---removing a buffer -map("n", "", [[bdelete]], opt) - --- tabnew and tabprev +-- move between tabs map("n", "", [[BufferLineCycleNext]], opt) map("n", "", [[BufferLineCyclePrev]], opt) + From c7d1ba69271833b20109d51d55e66e36e6b9e9d4 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 9 May 2021 23:06:22 +0530 Subject: [PATCH 0207/1541] bufferline : add offsets --- lua/top-bufferline.lua | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lua/top-bufferline.lua b/lua/top-bufferline.lua index fa36fbb..30062e4 100644 --- a/lua/top-bufferline.lua +++ b/lua/top-bufferline.lua @@ -5,6 +5,7 @@ local activeBuffer_fg = "#c8ccd4" require "bufferline".setup { options = { + offsets = {{filetype = "NvimTree", text = "Explorer"}}, buffer_close_icon = "", modified_icon = "", close_icon = " ", @@ -20,7 +21,6 @@ require "bufferline".setup { separator_style = "thin", mappings = "true" }, - -- bar colors!! highlights = { fill = { @@ -31,7 +31,6 @@ require "bufferline".setup { guifg = bar_fg, guibg = "#252931" }, - -- buffer buffer_selected = { guifg = activeBuffer_fg, @@ -42,21 +41,19 @@ require "bufferline".setup { guifg = "#9298a0", guibg = "#252931" }, - -- tabs over right tab = { guifg = "#9298a0", guibg = "#30343c" }, - tab_selected = { + tab_selected = { guifg = "#30343c", guibg = "#9298a0" }, - tab_close = { + tab_close = { guifg = "#f9929b", guibg = "#252931" }, - -- buffer separators separator = { guifg = "#252931", @@ -70,12 +67,10 @@ require "bufferline".setup { guifg = "#252931", guibg = "#252931" }, - indicator_selected = { guifg = "#252931", guibg = "#252931" }, - -- modified files (but not saved) modified_selected = { guifg = "#A3BE8C", @@ -99,4 +94,3 @@ map("n", "", [[bdelete]], opt) -- close tab -- move between tabs map("n", "", [[BufferLineCycleNext]], opt) map("n", "", [[BufferLineCyclePrev]], opt) - From 81b72adbdf72e5a6c8759f47b5d56036a38777f2 Mon Sep 17 00:00:00 2001 From: Henri Vandersleyen Date: Mon, 10 May 2021 10:00:41 -0700 Subject: [PATCH 0208/1541] added lua language WORKS FOR LINUX ONLY. --- install.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index a5323b5..6e1cd3b 100755 --- a/install.sh +++ b/install.sh @@ -2,7 +2,7 @@ BASE=$(git rev-parse --show-toplevel) LSP_BIN_PATH=$HOME/.local/bin -default_lsp_langs="css html ts rust python bash json" +default_lsp_langs="css html ts rust python bash json lua" lsp_langs="" choose_langs() { @@ -126,6 +126,16 @@ install_bash() { install_node_deps bash-language-server } +install_lua() { + git clone https://github.com/sumneko/lua-language-server ~/.config/lua-language-server + ( cd ~/.config/lua-language-server/ && git submodule update --init --recursive ) + + #linux only + (cd ~/.config/lua-language-server/3rd/luamake/ && compile/install.sh) + (cd ~/.config/lua-language-server/ && ./3rd/luamake/luamake rebuild) + +} + for lang in ${lsp_langs}; do if fn_exists install_$lang; then heading "Installing $lang language server" From 2e797e1c627543510b2690aaf6805fd714ded10b Mon Sep 17 00:00:00 2001 From: Henri <52706578+Vanderscycle@users.noreply.github.com> Date: Mon, 10 May 2021 10:06:48 -0700 Subject: [PATCH 0209/1541] Update README.md Corrected small error in the readme from my previous key binding modification. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dd61101..280de94 100644 --- a/README.md +++ b/README.md @@ -208,7 +208,7 @@ I'd install it first and add its setup line : - **Managing tabs with bufferline!** -- Shift TAB or Shift TAB cycle through opened tabs +- TAB or Shift TAB cycle through opened tabs - Shift x close current tab - Shift t open new tab From 339b31d87c3e19c4ae26f7ee2aa5112ebbe76286 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 10 May 2021 23:00:48 +0530 Subject: [PATCH 0210/1541] nvimTree : hide full path of dir --- lua/nvimTree.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lua/nvimTree.lua b/lua/nvimTree.lua index 19a4ed4..9220fa7 100644 --- a/lua/nvimTree.lua +++ b/lua/nvimTree.lua @@ -1,10 +1,11 @@ + local cmd = vim.cmd local g = vim.g vim.o.termguicolors = true g.nvim_tree_side = "left" -g.nvim_tree_width = 25 +g.nvim_tree_width = 26 g.nvim_tree_ignore = {".git", "node_modules", ".cache"} g.nvim_tree_auto_open = 0 g.nvim_tree_auto_close = 0 @@ -13,8 +14,8 @@ g.nvim_tree_follow = 1 g.nvim_tree_indent_markers = 1 g.nvim_tree_hide_dotfiles = 1 g.nvim_tree_git_hl = 1 -g.nvim_tree_root_folder_modifier = ":~" -g.nvim_tree_tab_open = 1 +g.nvim_tree_root_folder_modifier = ":t" +g.nvim_tree_tab_open = 0 g.nvim_tree_allow_resize = 1 g.nvim_tree_show_icons = { @@ -89,3 +90,4 @@ cmd "hi NvimTreeFolderName guifg = #61afef" cmd "hi NvimTreeIndentMarker guifg=#383c44" cmd "hi NvimTreeNormal guibg=#1b1f27" cmd "hi NvimTreeVertSplit guifg=#1e222a" +cmd "hi NvimTreeRootFolder guifg=#f9929b" From 7bd57b7e93a80b171b88431fca40cedcd28ba7b3 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 11 May 2021 08:02:03 +0530 Subject: [PATCH 0211/1541] add all highlights in one file --- init.lua | 22 ++------------- lua/custom_highlights.lua | 59 +++++++++++++++++++++++++++++++++++++++ lua/gitsigns-nvim.lua | 6 ---- lua/nvim-lspconfig.lua | 18 +----------- lua/nvimTree.lua | 9 ------ lua/statusline.lua | 9 +----- lua/telescope-nvim.lua | 9 ------ 7 files changed, 64 insertions(+), 68 deletions(-) create mode 100644 lua/custom_highlights.lua diff --git a/init.lua b/init.lua index 651860b..b30a74e 100644 --- a/init.lua +++ b/init.lua @@ -9,7 +9,7 @@ require "statusline" require("colorizer").setup() require("neoscroll").setup() -- smooth scroll --- lsp +-- lsp stuff require "nvim-lspconfig" require "compe-completion" @@ -20,12 +20,13 @@ g.mapleader = " " g.auto_save = 0 -- colorscheme related stuff - cmd "syntax on" local base16 = require "base16" base16(base16.themes["onedark"], true) +require "custom_highlights" + -- blankline local indent = 2 @@ -33,8 +34,6 @@ local indent = 2 g.indentLine_enabled = 1 g.indent_blankline_char = "▏" -cmd "hi IndentBlanklineChar guifg=#2a2e36" - g.indent_blankline_filetype_exclude = {"help", "terminal"} g.indent_blankline_buftype_exclude = {"terminal"} @@ -44,15 +43,6 @@ g.indent_blankline_show_first_indent_level = false require "treesitter-nvim" require "mappings" --- highlights -- -cmd "hi LineNr guifg=#42464e" -cmd "hi Comment guifg=#42464e" - -cmd "hi VertSplit guifg=#2a2e36" -cmd "hi EndOfBuffer guifg=#1e222a" -cmd "hi PmenuSel guibg=#98c379" -cmd "hi Pmenu guibg=#282c34" - require "telescope-nvim" require "nvimTree" @@ -66,11 +56,5 @@ vim.api.nvim_exec([[ au BufEnter term://* setlocal nonumber ]], false) --- inactive statuslines as thin splitlines -cmd("highlight! StatusLineNC gui=underline guifg=#383c44") - -cmd "hi clear CursorLine" -cmd "hi cursorlinenr guifg=#abb2bf" - -- setup for TrueZen.nvim require "zenmode" diff --git a/lua/custom_highlights.lua b/lua/custom_highlights.lua new file mode 100644 index 0000000..34a7017 --- /dev/null +++ b/lua/custom_highlights.lua @@ -0,0 +1,59 @@ +local cmd = vim.cmd +-- blankline + +cmd "hi IndentBlanklineChar guifg=#383c44" + +-- misc -- +cmd "hi LineNr guifg=#42464e" +cmd "hi Comment guifg=#42464e" +cmd "hi NvimInternalError guifg=#f9929b" +cmd "hi VertSplit guifg=#2a2e36" +cmd "hi EndOfBuffer guifg=#1e222a" + +-- Pmenu +cmd "hi PmenuSel guibg=#98c379" +cmd "hi Pmenu guibg=#282c34" +cmd "hi PmenuSbar guibg =#353b45" +cmd "hi PmenuThumb guibg =#81A1C1" + +-- inactive statuslines as thin splitlines +cmd("highlight! StatusLineNC gui=underline guifg=#383c44") + +-- line n.o +cmd "hi clear CursorLine" +cmd "hi cursorlinenr guifg=#abb2bf" + +-- git signs --- +cmd "hi DiffAdd guifg=#81A1C1 guibg = none" +cmd "hi DiffChange guifg =#3A3E44 guibg = none" +cmd "hi DiffModified guifg = #81A1C1 guibg = none" + +-- NvimTree +cmd "hi NvimTreeFolderIcon guifg = #61afef" +cmd "hi NvimTreeFolderName guifg = #61afef" +cmd "hi NvimTreeIndentMarker guifg=#383c44" +cmd "hi NvimTreeNormal guibg=#1b1f27" +cmd "hi NvimTreeVertSplit guifg=#1e222a" +cmd "hi NvimTreeRootFolder guifg=#f9929b" + +-- telescope +cmd "hi TelescopeBorder guifg=#2a2e36" +cmd "hi TelescopePromptBorder guifg=#2a2e36" +cmd "hi TelescopeResultsBorder guifg=#2a2e36" +cmd "hi TelescopePreviewBorder guifg=#525865" + +-- LspDiagnostics --- + +-- error / warnings +cmd "hi LspDiagnosticsSignError guifg=#f9929b" +cmd "hi LspDiagnosticsVirtualTextError guifg=#BF616A" +cmd "hi LspDiagnosticsSignWarning guifg=#EBCB8B" +cmd "hi LspDiagnosticsVirtualTextWarning guifg=#EBCB8B" + +-- info +cmd "hi LspDiagnosticsSignInformation guifg=#A3BE8C" +cmd "hi LspDiagnosticsVirtualTextInformation guifg=#A3BE8C" + +-- hint +cmd "hi LspDiagnosticsSignHint guifg=#b6bdca" +cmd "hi LspDiagnosticsVirtualTextHint guifg=#b6bdca" diff --git a/lua/gitsigns-nvim.lua b/lua/gitsigns-nvim.lua index 83bf7d7..1fa4325 100644 --- a/lua/gitsigns-nvim.lua +++ b/lua/gitsigns-nvim.lua @@ -25,9 +25,3 @@ require("gitsigns").setup { sign_priority = 5, status_formatter = nil -- Use default } - -local cmd = vim.cmd - -cmd "hi DiffAdd guifg=#81A1C1 guibg = none" -cmd "hi DiffChange guifg =#3A3E44 guibg = none" -cmd "hi DiffModified guifg = #81A1C1 guibg = none" diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index 3c5faa9..13a111e 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -44,7 +44,7 @@ for k, lang in pairs(servers) do } end --- remove the lsp servers with their configs you don want +-- vls example local vls_binary = '/usr/local/bin/vls' require'lspconfig'.vls.setup { cmd = {vls_binary}, @@ -88,19 +88,3 @@ vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnos vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"}) vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"}) vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"}) - --- diagnostics highlights - -local cmd = vim.cmd - -cmd "hi LspDiagnosticsSignError guifg=#f9929b" -cmd "hi LspDiagnosticsVirtualTextError guifg=#BF616A" - -cmd "hi LspDiagnosticsSignWarning guifg=#EBCB8B" -cmd "hi LspDiagnosticsVirtualTextWarning guifg=#EBCB8B" - -cmd "hi LspDiagnosticsSignInformation guifg=#A3BE8C" -cmd "hi LspDiagnosticsVirtualTextInformation guifg=#A3BE8C" - -cmd "hi LspDiagnosticsSignHint guifg=#b6bdca" -cmd "hi LspDiagnosticsVirtualTextHint guifg=#b6bdca" diff --git a/lua/nvimTree.lua b/lua/nvimTree.lua index 9220fa7..137b986 100644 --- a/lua/nvimTree.lua +++ b/lua/nvimTree.lua @@ -1,5 +1,3 @@ - -local cmd = vim.cmd local g = vim.g vim.o.termguicolors = true @@ -84,10 +82,3 @@ g.nvim_tree_bindings = { ["-"] = get_lua_cb("dir_up"), ["q"] = get_lua_cb("close") } - -cmd "hi NvimTreeFolderIcon guifg = #61afef" -cmd "hi NvimTreeFolderName guifg = #61afef" -cmd "hi NvimTreeIndentMarker guifg=#383c44" -cmd "hi NvimTreeNormal guibg=#1b1f27" -cmd "hi NvimTreeVertSplit guifg=#1e222a" -cmd "hi NvimTreeRootFolder guifg=#f9929b" diff --git a/lua/statusline.lua b/lua/statusline.lua index ad3d9df..6d3013b 100644 --- a/lua/statusline.lua +++ b/lua/statusline.lua @@ -7,15 +7,8 @@ local colors = { bg = "#1e222a", line_bg = "#1e222a", fg = "#D8DEE9", - fg_green = "#65a380", - yellow = "#A3BE8C", - cyan = "#22262C", - darkblue = "#61afef", green = "#BBE67E", orange = "#FF8800", - purple = "#252930", - magenta = "#c678dd", - blue = "#22262C", red = "#DF8890", lightbg = "#282c34", nord = "#81A1C1", @@ -135,7 +128,7 @@ gls.left[12] = { DiagnosticWarn = { provider = "DiagnosticWarn", icon = "  ", - highlight = {colors.blue, colors.bg} + highlight = {colors.red, colors.bg} } } diff --git a/lua/telescope-nvim.lua b/lua/telescope-nvim.lua index 744cb7b..b338935 100644 --- a/lua/telescope-nvim.lua +++ b/lua/telescope-nvim.lua @@ -73,12 +73,3 @@ vim.api.nvim_set_keymap("n", "fb", [[lua require('telescope.builtin vim.api.nvim_set_keymap("n", "fh", [[lua require('telescope.builtin').help_tags()]], opt) vim.api.nvim_set_keymap("n", "fo", [[lua require('telescope.builtin').oldfiles()]], opt) vim.api.nvim_set_keymap("n", "fm", [[ Neoformat]], opt) - --- highlights - -local cmd = vim.cmd - -cmd "hi TelescopeBorder guifg=#2a2e36" -cmd "hi TelescopePromptBorder guifg=#2a2e36" -cmd "hi TelescopeResultsBorder guifg=#2a2e36" -cmd "hi TelescopePreviewBorder guifg=#525865" From 2fe776a3866b49dc6bde0b5315c777855a195838 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 11 May 2021 09:12:49 +0530 Subject: [PATCH 0212/1541] nvim-lspconfig : fix some mistakes! --- lua/nvim-lspconfig.lua | 59 ++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index 13a111e..01655ab 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -1,8 +1,7 @@ function on_attach(client) - local function map(...) + local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end - local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end @@ -10,44 +9,48 @@ function on_attach(client) buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") -- Mappings. - local opts = {noremap = true, silent = true, normal = true} - map("gD", "lua vim.lsp.buf.declaration()", opts) - map("gd", "lua vim.lsp.buf.definition()", opts) - map("K", "lua vim.lsp.buf.hover()", opts) - map("gi", "lua vim.lsp.buf.implementation()", opts) - map("", "lua vim.lsp.buf.signature_help()", opts) - map("wa", "lua vim.lsp.buf.add_workspace_folder()", opts) - map("wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) - map("wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) - map("D", "lua vim.lsp.buf.type_definition()", opts) - map("rn", "lua vim.lsp.buf.rename()", opts) - map("gr", "lua vim.lsp.buf.references()", opts) - map("e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) - map("[d", "lua vim.lsp.diagnostic.goto_prev()", opts) - map("]d", "lua vim.lsp.diagnostic.goto_next()", opts) - map("q", "lua vim.lsp.diagnostic.set_loclist()", opts) + local opts = {noremap = true, silent = true} + + buf_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) + buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) + buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()", opts) + buf_set_keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) + buf_set_keymap("n", "", "lua vim.lsp.buf.signature_help()", opts) + buf_set_keymap("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) + buf_set_keymap("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) + buf_set_keymap("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) + buf_set_keymap("n", "D", "lua vim.lsp.buf.type_definition()", opts) + buf_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", opts) + buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()", opts) + buf_set_keymap("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) + buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) + buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) + buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) -- Set some keybinds conditional on server capabilities if client.resolved_capabilities.document_formatting then - map("f", "lua vim.lsp.buf.formatting()", opts) + buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) elseif client.resolved_capabilities.document_range_formatting then - map("f", "lua vim.lsp.buf.range_formatting()", opts) + buf_set_keymap("n", "f", "lua vim.lsp.buf.range_formatting()", opts) end end -local lspconf = require "lspconfig" -local servers = {"html", "cssls", "tsserver", "pyright", "bashls", "vls", "clangd", "ccls"} +local lspconf = require("lspconfig") -for k, lang in pairs(servers) do +-- these langs require same lspconfig so put em all in a table and loop through! +local servers = {"html", "cssls", "tsserver", "pyright", "bashls", "clangd", "ccls"} + +for _, lang in ipairs(servers) do lspconf[lang].setup { + on_attach = on_attach, root_dir = vim.loop.cwd } end --- vls example -local vls_binary = '/usr/local/bin/vls' -require'lspconfig'.vls.setup { - cmd = {vls_binary}, +-- vls conf example +local vls_binary = "/usr/local/bin/vls" +lspconf.vls.setup { + cmd = {vls_binary} } -- lua lsp settings @@ -56,7 +59,7 @@ USER = "/home/" .. vim.fn.expand("$USER") local sumneko_root_path = USER .. "/.config/lua-language-server" local sumneko_binary = USER .. "/.config/lua-language-server/bin/Linux/lua-language-server" -require "lspconfig".sumneko_lua.setup { +lspconf.sumneko_lua.setup { cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"}, root_dir = function() return vim.loop.cwd() From f5714068167f7c9af5f1c215d404fdc36539350a Mon Sep 17 00:00:00 2001 From: Henri <52706578+Vanderscycle@users.noreply.github.com> Date: Wed, 12 May 2021 09:55:34 -0700 Subject: [PATCH 0213/1541] Update README.md Added the most usefull bindings from lspconfig --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 280de94..4e0adcb 100644 --- a/README.md +++ b/README.md @@ -212,6 +212,15 @@ I'd install it first and add its setup line : - Shift x close current tab - Shift t open new tab +**Nvim-lspconfig (major ones)** +- K hover and show the definition +- gd jumps to the definition (works for user and language definitions) +- [d jumps to the previous error +- ]d jumps to the next error +- leader D jumps to the definition +- leader w+q list all the errors in a new buffer +- leader r+n rename all instances of this definition (user functions and declaration) +- # TODO - Make the statusline more elegant. From aaa9b4f3d24e0251f0a965a04e66ca3ecfa53f89 Mon Sep 17 00:00:00 2001 From: Henri <52706578+Vanderscycle@users.noreply.github.com> Date: Wed, 12 May 2021 09:56:41 -0700 Subject: [PATCH 0214/1541] Update README.md better separation of the letters --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4e0adcb..3dc9907 100644 --- a/README.md +++ b/README.md @@ -218,8 +218,8 @@ I'd install it first and add its setup line : - [d jumps to the previous error - ]d jumps to the next error - leader D jumps to the definition -- leader w+q list all the errors in a new buffer -- leader r+n rename all instances of this definition (user functions and declaration) +- leader w + q list all the errors in a new buffer +- leader r + n rename all instances of this definition (user functions and declaration) - # TODO From 0308e94e423e30c8016a6745ed3d72c309f21f11 Mon Sep 17 00:00:00 2001 From: Henri Vandersleyen Date: Wed, 12 May 2021 10:23:35 -0700 Subject: [PATCH 0215/1541] modification for nvim-whichkey. --- lua/misc-utils.lua | 1 + lua/pluginList.lua | 3 ++- lua/whichkey.lua | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 lua/whichkey.lua diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index 8ccdfd4..3fb8d2a 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -23,6 +23,7 @@ opt("o", "cmdheight", 1) opt("o", "updatetime", 250) -- update interval for gitsigns opt("o", "clipboard", "unnamedplus") +opt("o", "timeoutlen", 500) -- for indenline opt("b", "expandtab", true) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index b30bf91..4b60d9b 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -24,7 +24,7 @@ return require("packer").startup( use "glepnir/galaxyline.nvim" use "windwp/nvim-autopairs" use "alvan/vim-closetag" - + -- snippet support use "hrsh7th/vim-vsnip" use "rafamadriz/friendly-snippets" @@ -42,6 +42,7 @@ return require("packer").startup( use "907th/vim-auto-save" use "karb94/neoscroll.nvim" use "kdav5758/TrueZen.nvim" + use "folke/which-key.nvim" -- discord rich presence --use "andweeb/presence.nvim" diff --git a/lua/whichkey.lua b/lua/whichkey.lua new file mode 100644 index 0000000..e3cd5e5 --- /dev/null +++ b/lua/whichkey.lua @@ -0,0 +1,45 @@ +require("which-key").setup { + plugins = { + marks = true, -- shows a list of your marks on ' and ` + registers = true, -- shows your registers on " in NORMAL or in INSERT mode + -- the presets plugin, adds help for a bunch of default keybindings in Neovim + -- No actual key bindings are created + spelling = { + enabled = false, -- enabling this will show WhichKey when pressing z= to select spelling suggestions + suggestions = 20, -- how many suggestions should be shown in the list? + }, + presets = { + operators = true, -- adds help for operators like d, y, ... and registers them for motion / text object completion + motions = true, -- adds help for motions + text_objects = true, -- help for text objects triggered after entering an operator + windows = true, -- default bindings on + nav = true, -- misc bindings to work with windows + z = true, -- bindings for folds, spelling and others prefixed with z + g = true, -- bindings for prefixed with g + }, + }, + -- add operators that will trigger motion and text object completion + -- to enable all native operators, set the preset / operators plugin above + operators = { gc = "Comments" }, + icons = { + breadcrumb = "»", -- symbol used in the command line area that shows your active key combo + separator = "➜", -- symbol used between a key and it's label + group = "+", -- symbol prepended to a group + }, + window = { + border = "none", -- none, single, double, shadow + position = "bottom", -- bottom, top + margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left] + padding = { 2, 2, 2, 2 }, -- extra window padding [top, right, bottom, left] + }, + layout = { + height = { min = 4, max = 25 }, -- min and max height of the columns + width = { min = 20, max = 50 }, -- min and max width of the columns + spacing = 3, -- spacing between columns + }, + ignore_missing = false, -- enable this to hide mappings for which you didn't specify a label + hidden = { "", "", "", "", "call", "lua", "^:", "^ "}, -- hide mapping boilerplate + show_help = true, -- show help message on the command line when the popup is visible + triggers = "auto", -- automatically setup triggers + -- triggers = {""} -- or specifiy a list manually +} From 57b9c3f5c614a8cbe0e6faede937844e4865a7bb Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 13 May 2021 10:12:36 +0530 Subject: [PATCH 0216/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3dc9907..8c3af09 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -The config is complete but still work in progress as I am new to lua and slowly learning vim stuffs. I'll keep adding new features like snippets etc and clean the config , make neovim (cli version) as functional as an IDE while being eyecandy. Pull requests are welcome. +An attempt to make neovim (cli version) as functional as an IDE while being very eyecandy. # Screenshots - From b61ead83c12ce49c88ae446327f8d0d6ff2f518b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 15 May 2021 11:20:40 +0530 Subject: [PATCH 0217/1541] reduce startuptime for compe --- lua/compe-completion.lua | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/lua/compe-completion.lua b/lua/compe-completion.lua index 0fa3ecd..a37b432 100644 --- a/lua/compe-completion.lua +++ b/lua/compe-completion.lua @@ -15,7 +15,7 @@ require "compe".setup { documentation = true, source = { path = true, - buffer = {kind = "﬘" , true}, + buffer = {kind = "﬘", true}, calc = true, vsnip = {kind = "﬌"}, --replace to what sign you prefer nvim_lsp = true, @@ -79,3 +79,24 @@ function _G.completions() end vim.api.nvim_set_keymap("i", "", "v:lua.completions()", {expr = true}) + +local g = vim.g + +-- speeden up compe +g.loaded_compe_calc = 0 +g.loaded_compe_emoji = 0 + +g.loaded_compe_luasnip = 0 +g.loaded_compe_nvim_lua = 0 + +g.loaded_compe_path = 0 +g.loaded_compe_spell = 0 +g.loaded_compe_tags = 0 +g.loaded_compe_treesitter = 0 + +g.loaded_compe_snippets_nvim = 0 + +g.loaded_compe_ultisnips = 0 +g.loaded_compe_vim_lsc = 0 +g.loaded_compe_vim_lsp = 0 +g.loaded_compe_omni = 0 From b308ceaa5e0677f16364ddc6d7b6f7fa444f392f Mon Sep 17 00:00:00 2001 From: Henri Vandersleyen Date: Mon, 17 May 2021 13:14:10 -0700 Subject: [PATCH 0218/1541] added linter for push on main to double check the lua and shell languages. --- .github/workflows/superLinter.yml | 31 +++++++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/superLinter.yml diff --git a/.github/workflows/superLinter.yml b/.github/workflows/superLinter.yml new file mode 100644 index 0000000..cba0b34 --- /dev/null +++ b/.github/workflows/superLinter.yml @@ -0,0 +1,31 @@ +name: Super-Linter + +# Run this workflow every time a new commit pushed to your repository +on: push + +jobs: + # Set the job key. The key is displayed as the job name + # when a job name is not provided + super-lint: + # Name the Job + name: Lint code base + # Set the type of machine to run on + runs-on: ubuntu-latest + + steps: + # Checks out a copy of your repository on the ubuntu-latest machine + - name: Checkout code + uses: actions/checkout@v2 + + # Runs the Super-Linter action + - name: Run Super-Linter + uses: github/super-linter@v3 + env: + VALIDATE_YAML: true + VALIDATE_BASH_EXEC: true + VALIDATE_PYTHON_PYLINT: true + OUTPUT_FOLDER: super-linter.report + OUTPUT_DETAILS: detailed + DEFAULT_BRANCH: main + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/README.md b/README.md index 8c3af09..f8bc192 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ + An attempt to make neovim (cli version) as functional as an IDE while being very eyecandy. # Screenshots - From f296cdc7caf8611b16a4dbac80a0cb8b6f11d1e7 Mon Sep 17 00:00:00 2001 From: Henri Vandersleyen Date: Mon, 17 May 2021 13:16:46 -0700 Subject: [PATCH 0219/1541] added the correct lua checker. --- .github/workflows/superLinter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/superLinter.yml b/.github/workflows/superLinter.yml index cba0b34..ba8708c 100644 --- a/.github/workflows/superLinter.yml +++ b/.github/workflows/superLinter.yml @@ -23,7 +23,7 @@ jobs: env: VALIDATE_YAML: true VALIDATE_BASH_EXEC: true - VALIDATE_PYTHON_PYLINT: true + VALIDATE_LUA: true OUTPUT_FOLDER: super-linter.report OUTPUT_DETAILS: detailed DEFAULT_BRANCH: main From 1af58cfb0562f0cb139ec7f49b64060bcddda98d Mon Sep 17 00:00:00 2001 From: Henri <52706578+Vanderscycle@users.noreply.github.com> Date: Mon, 17 May 2021 13:18:46 -0700 Subject: [PATCH 0220/1541] Update README.md Added the badge proprely --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f8bc192..5566c40 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![GitHub Super-Linter](https://github.com///workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter) An attempt to make neovim (cli version) as functional as an IDE while being very eyecandy. From 706a4148e2577e9c55541a745437960e74cb3b53 Mon Sep 17 00:00:00 2001 From: Henri <52706578+Vanderscycle@users.noreply.github.com> Date: Mon, 17 May 2021 13:21:53 -0700 Subject: [PATCH 0221/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5566c40..e61c83d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![GitHub Super-Linter](https://github.com///workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter) +[![GitHub Super-Linter](https://github.com/siduck76/neovim-dotfiles/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter) An attempt to make neovim (cli version) as functional as an IDE while being very eyecandy. From 0153a16e0bf7c687d3fa0ae9ff6efd4f56548d18 Mon Sep 17 00:00:00 2001 From: Henri Vandersleyen Date: Mon, 17 May 2021 13:38:36 -0700 Subject: [PATCH 0222/1541] added a stale issue manager and commented out the lua as it kept on snagging with vim (not an error). --- .github/workflows/stale.yml | 22 ++++++++++++++++++++++ .github/workflows/superLinter.yml | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..1f16ea2 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,22 @@ +name: 'Close stale issues and PRs' +on: + schedule: + - cron: '30 1 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.' + stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.' + close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.' + exempt-all-issue-assignees: true # doesn't close an issue if someone was assigned to it. + close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.' + exempt-all-pr-assignees: true # doesn't close a pr if someone was assigned to it. + days-before-issue-stale: 30 + days-before-pr-stale: 45 + days-before-issue-close: 5 + days-before-pr-close: 10 diff --git a/.github/workflows/superLinter.yml b/.github/workflows/superLinter.yml index ba8708c..88ea034 100644 --- a/.github/workflows/superLinter.yml +++ b/.github/workflows/superLinter.yml @@ -23,7 +23,7 @@ jobs: env: VALIDATE_YAML: true VALIDATE_BASH_EXEC: true - VALIDATE_LUA: true + #VALIDATE_LUA: true #removed because the lua gets caught with all the vim OUTPUT_FOLDER: super-linter.report OUTPUT_DETAILS: detailed DEFAULT_BRANCH: main From b86740f4077077538b78f462090fe23825d235a6 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 18 May 2021 09:29:33 +0530 Subject: [PATCH 0223/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e61c83d..639abd5 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ git clone https://github.com/wbthomason/packer.nvim\ npm config set prefix=~/.node_modules npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier -(ADD ~/.node_modules at your PATH) +(ADD ~/.node_modules/bin at your PATH) ``` To setup any language server , follow this guide https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md and search up the needed LSP. For example if I needed clangd's lsp server : From f84f42ad764e08408bab6fad4d145b667552f498 Mon Sep 17 00:00:00 2001 From: mTvare <57838468+mTvare6@users.noreply.github.com> Date: Wed, 19 May 2021 21:46:47 +0530 Subject: [PATCH 0224/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 639abd5..84e5149 100644 --- a/README.md +++ b/README.md @@ -202,7 +202,7 @@ I'd install it first and add its setup line : - **Formatting code** - leader + f m formats or beautifies the code in current window via neoformat - (currently only html ,css , js can be formatted . To be able to use this keybind you need to install the formatter locally for your language , in my case prettier was required only so I installed it. check (this)[https://github.com/sbdchd/neoformat]. + (currently only html ,css , js can be formatted . To be able to use this keybind you need to install the formatter locally for your language , in my case prettier was required only so I installed it. check [this](https://github.com/sbdchd/neoformat). - **Neoscroll** From 7ab882bfa815ec3eff5683f4c2e4a55312fd0928 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 25 May 2021 08:01:14 +0530 Subject: [PATCH 0225/1541] made statusline prettier! --- lua/statusline.lua | 172 ++++++++++++++++++--------------------------- 1 file changed, 69 insertions(+), 103 deletions(-) diff --git a/lua/statusline.lua b/lua/statusline.lua index 6d3013b..afd433d 100644 --- a/lua/statusline.lua +++ b/lua/statusline.lua @@ -1,37 +1,27 @@ local gl = require("galaxyline") local gls = gl.section -gl.short_line_list = {" "} -- keeping this table { } as empty will show inactive statuslines +gl.short_line_list = {"defx", "vista", "dbui", "vista_markdown", "packer"} local colors = { - bg = "#1e222a", - line_bg = "#1e222a", - fg = "#D8DEE9", - green = "#BBE67E", - orange = "#FF8800", - red = "#DF8890", - lightbg = "#282c34", - nord = "#81A1C1", - greenYel = "#EBCB8B" -} - -gls.left[1] = { - leftRounded = { - provider = function() - return "" - end, - highlight = {colors.nord, colors.bg} - } + bg = "#22262e", + fg = "#abb2bf", + green = "#82ad63", + red = "#d47d85", + lightbg = "#2e323a", + blue = "#7797b7", + yellow = "#e0c080", + grey = "#6f737b" } gls.left[2] = { statusIcon = { provider = function() - return "  " + return "  " end, - highlight = {colors.bg, colors.nord}, - separator = " ", - separator_highlight = {colors.lightbg, colors.lightbg} + highlight = {colors.bg, colors.blue}, + separator = " ", + separator_highlight = {colors.blue, colors.lightbg} } } @@ -39,106 +29,80 @@ gls.left[3] = { FileIcon = { provider = "FileIcon", condition = buffer_not_empty, - highlight = {require("galaxyline.provider_fileinfo").get_file_icon_color, colors.lightbg} + highlight = {colors.fg, colors.lightbg} } } gls.left[4] = { FileName = { - provider = {"FileName", "FileSize"}, + provider = {"FileName"}, condition = buffer_not_empty, - highlight = {colors.fg, colors.lightbg} - } -} - -gls.left[5] = { - teech = { - provider = function() - return "" - end, - separator = " ", - highlight = {colors.lightbg, colors.bg} + highlight = {colors.fg, colors.lightbg}, + separator = " ", + separator_highlight = {colors.lightbg, colors.bg} } } local checkwidth = function() local squeeze_width = vim.fn.winwidth(0) / 2 - if squeeze_width > 40 then + if squeeze_width > 30 then return true end return false end -gls.left[6] = { +gls.left[5] = { DiffAdd = { provider = "DiffAdd", condition = checkwidth, - icon = "  ", - highlight = {colors.greenYel, colors.line_bg} + icon = "  ", + highlight = {colors.fg, colors.bg} + } +} + +gls.left[6] = { + DiffModified = { + provider = "DiffModified", + condition = checkwidth, + icon = "  ", + highlight = {colors.grey, colors.bg} } } gls.left[7] = { - DiffModified = { - provider = "DiffModified", + DiffRemove = { + provider = "DiffRemove", condition = checkwidth, - icon = " ", - highlight = {colors.orange, colors.line_bg} + icon = "  ", + highlight = {colors.grey, colors.bg} } } gls.left[8] = { - DiffRemove = { - provider = "DiffRemove", - condition = checkwidth, - icon = " ", - highlight = {colors.red, colors.line_bg} + DiagnosticError = { + provider = "DiagnosticError", + icon = "  ", + highlight = {colors.grey, colors.bg} } } gls.left[9] = { - LeftEnd = { - provider = function() - return " " - end, - separator = " ", - separator_highlight = {colors.line_bg, colors.line_bg}, - highlight = {colors.line_bg, colors.line_bg} - } -} - -gls.left[10] = { - DiagnosticError = { - provider = "DiagnosticError", - icon = "  ", - highlight = {colors.red, colors.bg} - } -} - -gls.left[11] = { - Space = { - provider = function() - return " " - end, - highlight = {colors.line_bg, colors.line_bg} - } -} - -gls.left[12] = { DiagnosticWarn = { provider = "DiagnosticWarn", icon = "  ", - highlight = {colors.red, colors.bg} + highlight = {colors.yellow, colors.bg} } } gls.right[1] = { GitIcon = { provider = function() - return "  " + return " " end, condition = require("galaxyline.provider_vcs").check_git_workspace, - highlight = {colors.green, colors.line_bg} + highlight = {colors.grey, colors.lightbg}, + separator = "", + separator_highlight = {colors.lightbg, colors.bg} } } @@ -146,18 +110,18 @@ gls.right[2] = { GitBranch = { provider = "GitBranch", condition = require("galaxyline.provider_vcs").check_git_workspace, - highlight = {colors.green, colors.line_bg} + highlight = {colors.grey, colors.lightbg} } } gls.right[3] = { - right_LeftRounded = { + viMode_icon = { provider = function() - return "" + return " " end, - separator = " ", - separator_highlight = {colors.bg, colors.bg}, - highlight = {colors.red, colors.bg} + highlight = {colors.bg, colors.red}, + separator = " ", + separator_highlight = {colors.red, colors.lightbg} } } @@ -165,34 +129,36 @@ gls.right[4] = { ViMode = { provider = function() local alias = { - n = "NORMAL", - i = "INSERT", - c = "COMMAND", - V = "VISUAL", - [""] = "VISUAL", - v = "VISUAL", - R = "REPLACE" + n = "Normal", + i = "Insert", + c = "Command", + V = "Visual", + [""] = "Visual", + v = "Visual", + R = "Replace" } - return alias[vim.fn.mode()] + return " " .. alias[vim.fn.mode()] .. " " end, - highlight = {colors.bg, colors.red} + highlight = {colors.red, colors.lightbg} } } gls.right[5] = { - PerCent = { - provider = "LinePercent", - separator = " ", - separator_highlight = {colors.red, colors.red}, - highlight = {colors.bg, colors.fg} + time_icon = { + provider = function() + return " " + end, + separator = "", + separator_highlight = {colors.green, colors.bg}, + highlight = {colors.lightbg, colors.green} } } gls.right[6] = { - rightRounded = { + time = { provider = function() - return "" + return " " .. os.date("%H:%M") .. " " end, - highlight = {colors.fg, colors.bg} + highlight = {colors.green, colors.lightbg} } } From afcacf1726dcef55d416d86e94a1bbd8f231d013 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 25 May 2021 08:18:04 +0530 Subject: [PATCH 0226/1541] misc stuff --- init.lua | 9 ++++----- lua/custom_highlights.lua | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index b30a74e..c222ef1 100644 --- a/init.lua +++ b/init.lua @@ -1,8 +1,7 @@ -- load all plugins require "pluginList" -require "file-icons" - require "misc-utils" + require "top-bufferline" require "statusline" @@ -29,8 +28,6 @@ require "custom_highlights" -- blankline -local indent = 2 - g.indentLine_enabled = 1 g.indent_blankline_char = "▏" @@ -44,7 +41,8 @@ require "treesitter-nvim" require "mappings" require "telescope-nvim" -require "nvimTree" +require "nvimTree" -- file tree stuff +require "file-icons" -- git signs , lsp symbols etc require "gitsigns-nvim" @@ -58,3 +56,4 @@ vim.api.nvim_exec([[ -- setup for TrueZen.nvim require "zenmode" +require "whichkey" diff --git a/lua/custom_highlights.lua b/lua/custom_highlights.lua index 34a7017..05b4230 100644 --- a/lua/custom_highlights.lua +++ b/lua/custom_highlights.lua @@ -1,7 +1,7 @@ local cmd = vim.cmd -- blankline -cmd "hi IndentBlanklineChar guifg=#383c44" +cmd "hi IndentBlanklineChar guifg=#282c34" -- misc -- cmd "hi LineNr guifg=#42464e" From 56532ddb84c457a9665596c8bf0f3bd4ac70fda1 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 25 May 2021 08:19:58 +0530 Subject: [PATCH 0227/1541] Update statusline.lua --- lua/statusline.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/statusline.lua b/lua/statusline.lua index afd433d..071913e 100644 --- a/lua/statusline.lua +++ b/lua/statusline.lua @@ -1,7 +1,7 @@ local gl = require("galaxyline") local gls = gl.section -gl.short_line_list = {"defx", "vista", "dbui", "vista_markdown", "packer"} +gl.short_line_list = {" "} -- keeping this table { } as empty will show inactive statuslines local colors = { bg = "#22262e", From bdcf708d778ead11d355f6e36618b1b7e6d4776f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 25 May 2021 08:24:22 +0530 Subject: [PATCH 0228/1541] fix vi nomode issue --- lua/statusline.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/statusline.lua b/lua/statusline.lua index afd433d..3b3ebb6 100644 --- a/lua/statusline.lua +++ b/lua/statusline.lua @@ -137,7 +137,11 @@ gls.right[4] = { v = "Visual", R = "Replace" } - return " " .. alias[vim.fn.mode()] .. " " + local current_Mode = alias[vim.fn.mode()] + + if current_Mode ~= nil then + return " " .. current_Mode .. " " + end end, highlight = {colors.red, colors.lightbg} } From c203b56a3f99dd17714457825274cc2b6bc6ad10 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 25 May 2021 17:07:37 +0530 Subject: [PATCH 0229/1541] show term insert mode in statusline --- lua/statusline.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/statusline.lua b/lua/statusline.lua index 5c99210..4e32bc8 100644 --- a/lua/statusline.lua +++ b/lua/statusline.lua @@ -139,7 +139,9 @@ gls.right[4] = { } local current_Mode = alias[vim.fn.mode()] - if current_Mode ~= nil then + if current_Mode == nil then + return " Terminal " + else return " " .. current_Mode .. " " end end, From 355c2cb33c76ecd2628d5bb0915fd14f6887ebcf Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 27 May 2021 15:20:30 +0530 Subject: [PATCH 0230/1541] clean compe config since it supports lazy loading --- lua/compe-completion.lua | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/lua/compe-completion.lua b/lua/compe-completion.lua index a37b432..79ee38a 100644 --- a/lua/compe-completion.lua +++ b/lua/compe-completion.lua @@ -14,16 +14,9 @@ require "compe".setup { max_menu_width = 100, documentation = true, source = { - path = true, buffer = {kind = "﬘", true}, - calc = true, vsnip = {kind = "﬌"}, --replace to what sign you prefer - nvim_lsp = true, - nvim_lua = true, - spell = true, - tags = true, - snippets_nvim = true, - treesitter = true + nvim_lsp = true } } @@ -79,24 +72,3 @@ function _G.completions() end vim.api.nvim_set_keymap("i", "", "v:lua.completions()", {expr = true}) - -local g = vim.g - --- speeden up compe -g.loaded_compe_calc = 0 -g.loaded_compe_emoji = 0 - -g.loaded_compe_luasnip = 0 -g.loaded_compe_nvim_lua = 0 - -g.loaded_compe_path = 0 -g.loaded_compe_spell = 0 -g.loaded_compe_tags = 0 -g.loaded_compe_treesitter = 0 - -g.loaded_compe_snippets_nvim = 0 - -g.loaded_compe_ultisnips = 0 -g.loaded_compe_vim_lsc = 0 -g.loaded_compe_vim_lsp = 0 -g.loaded_compe_omni = 0 From f7a1a5dc928be00407d584c0d636b491b8688c61 Mon Sep 17 00:00:00 2001 From: marvelman3284 Date: Tue, 1 Jun 2021 09:22:24 -0400 Subject: [PATCH 0231/1541] Add lspinstall functionality --- lua/mappings.lua | 4 ++-- lua/nvim-lspconfig.lua | 37 ++++++++++++++++++++++++++++++------- lua/pluginList.lua | 6 +++--- 3 files changed, 35 insertions(+), 12 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index 70fde6a..1c91eee 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -18,8 +18,8 @@ map("v", "x", [=[ "_x ]=], opt) this line too ]] -- OPEN TERMINALS -- -map("n", "", [[vnew term://bash ]], opt) -- over right -map("n", "", [[ split term://bash | resize 10 ]], opt) -- bottom +map("n", "", [[vnew term://zsh ]], opt) -- over right +map("n", "", [[ split term://zsh | resize 10 ]], opt) -- bottom map("n", "t", [[ tabnew | term ]], opt) -- newtab -- COPY EVERYTHING in the file-- diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index 01655ab..b013672 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -38,14 +38,14 @@ end local lspconf = require("lspconfig") -- these langs require same lspconfig so put em all in a table and loop through! -local servers = {"html", "cssls", "tsserver", "pyright", "bashls", "clangd", "ccls"} +local lspservers = {"html", "cssls", "tsserver", "pyright", "bashls", "clangd", "ccls", "gopls"} -for _, lang in ipairs(servers) do - lspconf[lang].setup { - on_attach = on_attach, - root_dir = vim.loop.cwd - } -end +for _, lang in ipairs(lspservers) do + lspconf[lang].setup { + on_attach = on_attach, + root_dir = vim.loop.cwd + } + end -- vls conf example local vls_binary = "/usr/local/bin/vls" @@ -59,6 +59,29 @@ USER = "/home/" .. vim.fn.expand("$USER") local sumneko_root_path = USER .. "/.config/lua-language-server" local sumneko_binary = USER .. "/.config/lua-language-server/bin/Linux/lua-language-server" + +local lsp_installer = require'nvim-lsp-installer' + +function common_on_attach(client, bufnr) + -- setup buffer keymaps etc. +end + +local installed_servers = lsp_installer.get_installed_servers() + +for _, server in pairs(installed_servers) do + opts = { + on_attach = common_on_attach, + } + + -- (optional) Customize the options passed to the server + -- if server.name == "tsserver" then + -- opts.root_dir = function() ... end + -- end + + server:setup(opts) +end + + lspconf.sumneko_lua.setup { cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"}, root_dir = function() diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 4b60d9b..8afbfe0 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -4,13 +4,13 @@ local use = packer.use -- using { } for using different branch , loading plugin with certain commands etc return require("packer").startup( function() + use 'neovim/nvim-lsp-config' + use 'williamboman/nvim-lsp-installer' use "wbthomason/packer.nvim" - -- color related stuff use "siduck76/nvim-base16.lua" use "norcalli/nvim-colorizer.lua" -- use "ollykel/v-vim" -- v syntax highlighter - -- lsp stuff use "nvim-treesitter/nvim-treesitter" use "neovim/nvim-lspconfig" @@ -46,7 +46,7 @@ return require("packer").startup( -- discord rich presence --use "andweeb/presence.nvim" - + use "wakatime/vim-wakatime" use {"lukas-reineke/indent-blankline.nvim", branch = "lua"} end, { From 4b3682a34303a8eb79498cdda2d8062a76091dbc Mon Sep 17 00:00:00 2001 From: marvelman3284 Date: Tue, 1 Jun 2021 09:25:04 -0400 Subject: [PATCH 0232/1541] Unpersonalize my dots --- lua/nvim-lspconfig.lua | 4 ++-- lua/pluginList.lua | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index b013672..5cc97b4 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -38,9 +38,9 @@ end local lspconf = require("lspconfig") -- these langs require same lspconfig so put em all in a table and loop through! -local lspservers = {"html", "cssls", "tsserver", "pyright", "bashls", "clangd", "ccls", "gopls"} +local servers = {"html", "cssls", "tsserver", "pyright", "bashls", "clangd", "ccls", "gopls"} -for _, lang in ipairs(lspservers) do +for _, lang in ipairs(servers) do lspconf[lang].setup { on_attach = on_attach, root_dir = vim.loop.cwd diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 8afbfe0..f08ab15 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -4,7 +4,6 @@ local use = packer.use -- using { } for using different branch , loading plugin with certain commands etc return require("packer").startup( function() - use 'neovim/nvim-lsp-config' use 'williamboman/nvim-lsp-installer' use "wbthomason/packer.nvim" -- color related stuff @@ -46,7 +45,6 @@ return require("packer").startup( -- discord rich presence --use "andweeb/presence.nvim" - use "wakatime/vim-wakatime" use {"lukas-reineke/indent-blankline.nvim", branch = "lua"} end, { From 1e6432c4d1bb3589f6086e196f51f8af038f8614 Mon Sep 17 00:00:00 2001 From: marvelman3284 Date: Tue, 1 Jun 2021 09:25:59 -0400 Subject: [PATCH 0233/1541] Unpersonalize my dots --- lua/nvim-lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index 5cc97b4..ca69b29 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -38,7 +38,7 @@ end local lspconf = require("lspconfig") -- these langs require same lspconfig so put em all in a table and loop through! -local servers = {"html", "cssls", "tsserver", "pyright", "bashls", "clangd", "ccls", "gopls"} +local servers = {"html", "cssls", "tsserver", "pyright", "bashls", "clangd", "ccls"} for _, lang in ipairs(servers) do lspconf[lang].setup { From 07859b4177af742a8be439561b391e7550b585c0 Mon Sep 17 00:00:00 2001 From: marvelman3284 Date: Tue, 1 Jun 2021 09:28:00 -0400 Subject: [PATCH 0234/1541] Unpersonalize my dots --- lua/nvim-lspconfig.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index ca69b29..ca5e205 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -42,10 +42,10 @@ local servers = {"html", "cssls", "tsserver", "pyright", "bashls", "clangd", "cc for _, lang in ipairs(servers) do lspconf[lang].setup { - on_attach = on_attach, - root_dir = vim.loop.cwd - } - end + on_attach = on_attach, + root_dir = vim.loop.cwd + } +end -- vls conf example local vls_binary = "/usr/local/bin/vls" From 9e701f08d3cad18ddd03a65a5abf42cf34ef2e8c Mon Sep 17 00:00:00 2001 From: marvelman3284 Date: Tue, 1 Jun 2021 12:03:42 -0400 Subject: [PATCH 0235/1541] Unpersonalize my dots --- lua/mappings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index 1c91eee..73c9156 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -18,8 +18,8 @@ map("v", "x", [=[ "_x ]=], opt) this line too ]] -- OPEN TERMINALS -- -map("n", "", [[vnew term://zsh ]], opt) -- over right -map("n", "", [[ split term://zsh | resize 10 ]], opt) -- bottom +map("n", "", [[vnew term://bash]], opt) -- over right +map("n", "", [[ split term://bash| resize 10 ]], opt) -- bottom map("n", "t", [[ tabnew | term ]], opt) -- newtab -- COPY EVERYTHING in the file-- From 07a169b16de7dc3126069f500e4ddedc1427046a Mon Sep 17 00:00:00 2001 From: marvelman3284 Date: Tue, 1 Jun 2021 12:04:20 -0400 Subject: [PATCH 0236/1541] Remove duplicate functions --- lua/nvim-lspconfig.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index ca5e205..b8e980e 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -62,10 +62,6 @@ local sumneko_binary = USER .. "/.config/lua-language-server/bin/Linux/lua-langu local lsp_installer = require'nvim-lsp-installer' -function common_on_attach(client, bufnr) - -- setup buffer keymaps etc. -end - local installed_servers = lsp_installer.get_installed_servers() for _, server in pairs(installed_servers) do From 7120f98f348a0a4dcf9b0f969b2d371a5a07a211 Mon Sep 17 00:00:00 2001 From: marvelman3284 Date: Tue, 1 Jun 2021 14:20:15 -0400 Subject: [PATCH 0237/1541] Change lsp-install provider --- lua/nvim-lspconfig.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index b8e980e..e118185 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -110,3 +110,4 @@ vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnos vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"}) vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"}) vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"}) + From e12117a611ddacbfd6f7ce7512d9b78e99605d55 Mon Sep 17 00:00:00 2001 From: marvelman3284 Date: Tue, 1 Jun 2021 14:23:03 -0400 Subject: [PATCH 0238/1541] update plugin list --- lua/pluginList.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index f08ab15..d1bd8bd 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -4,8 +4,7 @@ local use = packer.use -- using { } for using different branch , loading plugin with certain commands etc return require("packer").startup( function() - use 'williamboman/nvim-lsp-installer' - use "wbthomason/packer.nvim" + use "kabouzeid/nvim-lspinstall" -- color related stuff use "siduck76/nvim-base16.lua" use "norcalli/nvim-colorizer.lua" From d7c0e1fefb9a857777f26e71994c3f3fa074f62d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 1 Jun 2021 23:56:37 +0530 Subject: [PATCH 0239/1541] Update mappings.lua --- lua/mappings.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index 73c9156..5ec8766 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -1,4 +1,4 @@ -local function map(mode, lhs, rhs, opts) + local function map(mode, lhs, rhs, opts) local options = {noremap = true} if opts then options = vim.tbl_extend("force", options, opts) @@ -16,13 +16,12 @@ map("v", "dd", [=[ "_dd ]=], opt) map("v", "x", [=[ "_x ]=], opt) this line too ]] - -- OPEN TERMINALS -- -map("n", "", [[vnew term://bash]], opt) -- over right -map("n", "", [[ split term://bash| resize 10 ]], opt) -- bottom -map("n", "t", [[ tabnew | term ]], opt) -- newtab +map("n", "", [[vnew term://bash ]], opt) -- term over right +map("n", "", [[ split term://bash | resize 10 ]], opt) -- term bottom +map("n", "t", [[ tabnew | term ]], opt) -- term newtab --- COPY EVERYTHING in the file-- +-- COPY EVERYTHING -- map("n", "", [[ %y+]], opt) -- toggle numbers --- @@ -32,4 +31,5 @@ map("n", "n", [[ set nu!]], opt) map("n", "z", [[ TZAtaraxis]], opt) map("n", "m", [[ TZMinimalist]], opt) -map("n", "", [[ w ]], opt) -- save +map("n", "", [[ w ]], opt) +-- vim.cmd("inoremap jh ") From 2d7ccc16f22bf345d7e26719e76b13d6feaa746c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 1 Jun 2021 23:58:24 +0530 Subject: [PATCH 0240/1541] added lspInstall to pluginlist --- lua/pluginList.lua | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index d1bd8bd..2d7368f 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -4,18 +4,20 @@ local use = packer.use -- using { } for using different branch , loading plugin with certain commands etc return require("packer").startup( function() - use "kabouzeid/nvim-lspinstall" + use "wbthomason/packer.nvim" + -- color related stuff use "siduck76/nvim-base16.lua" use "norcalli/nvim-colorizer.lua" - -- use "ollykel/v-vim" -- v syntax highlighter - -- lsp stuff + + -- lang stuff use "nvim-treesitter/nvim-treesitter" use "neovim/nvim-lspconfig" use "hrsh7th/nvim-compe" use "onsails/lspkind-nvim" use "sbdchd/neoformat" use "nvim-lua/plenary.nvim" + use "kabouzeid/nvim-lspinstall" use "lewis6991/gitsigns.nvim" use "akinsho/nvim-bufferline.lua" @@ -41,14 +43,11 @@ return require("packer").startup( use "karb94/neoscroll.nvim" use "kdav5758/TrueZen.nvim" use "folke/which-key.nvim" - - -- discord rich presence - --use "andweeb/presence.nvim" use {"lukas-reineke/indent-blankline.nvim", branch = "lua"} end, { display = { - border = { "┌", "─", "┐", "│", "┘", "─", "└", "│" } + border = {"┌", "─", "┐", "│", "┘", "─", "└", "│"} } } ) From b2cefbe3b8826b7cbc3f8dfd7c2cfd38cd0e412a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 2 Jun 2021 00:01:05 +0530 Subject: [PATCH 0241/1541] added lspconfig+lspinstall configs! --- lua/nvim-lspconfig.lua | 111 ++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 67 deletions(-) diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index e118185..29fe29d 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -1,4 +1,4 @@ -function on_attach(client) + function on_attach(client) local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end @@ -35,79 +35,56 @@ function on_attach(client) end end -local lspconf = require("lspconfig") +-- lspInstall + lspconfig stuff --- these langs require same lspconfig so put em all in a table and loop through! -local servers = {"html", "cssls", "tsserver", "pyright", "bashls", "clangd", "ccls"} +local function setup_servers() + require "lspinstall".setup() -for _, lang in ipairs(servers) do - lspconf[lang].setup { - on_attach = on_attach, - root_dir = vim.loop.cwd - } -end + local lspconf = require("lspconfig") + local servers = require "lspinstall".installed_servers() --- vls conf example -local vls_binary = "/usr/local/bin/vls" -lspconf.vls.setup { - cmd = {vls_binary} -} - --- lua lsp settings -USER = "/home/" .. vim.fn.expand("$USER") - -local sumneko_root_path = USER .. "/.config/lua-language-server" -local sumneko_binary = USER .. "/.config/lua-language-server/bin/Linux/lua-language-server" - - -local lsp_installer = require'nvim-lsp-installer' - -local installed_servers = lsp_installer.get_installed_servers() - -for _, server in pairs(installed_servers) do - opts = { - on_attach = common_on_attach, - } - - -- (optional) Customize the options passed to the server - -- if server.name == "tsserver" then - -- opts.root_dir = function() ... end - -- end - - server:setup(opts) -end - - -lspconf.sumneko_lua.setup { - cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"}, - root_dir = function() - return vim.loop.cwd() - end, - settings = { - Lua = { - runtime = { - version = "LuaJIT", - path = vim.split(package.path, ";") - }, - diagnostics = { - globals = {"vim"} - }, - workspace = { - library = { - [vim.fn.expand("$VIMRUNTIME/lua")] = true, - [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true - } - }, - telemetry = { - enable = false + for _, lang in pairs(servers) do + if lang ~= "lua" then + lspconf[lang].setup { + on_attach = on_attach, + root_dir = vim.loop.cwd } - } - } -} + elseif lang == "lua" then + lspconf.sumneko_lua.setup { + root_dir = function() + return vim.loop.cwd() + end, + settings = { + Lua = { + diagnostics = { + globals = {"vim"} + }, + workspace = { + library = { + [vim.fn.expand("$VIMRUNTIME/lua")] = true, + [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true + } + }, + telemetry = { + enable = false + } + } + } + } + end + end +end + +setup_servers() + +-- Automatically reload after `:LspInstall ` so we don't have to restart neovim +require "lspinstall".post_install_hook = function() + setup_servers() -- reload installed servers + vim.cmd("bufdo e") -- this triggers the FileType autocmd that starts the server +end -- replace the default lsp diagnostic letters with prettier symbols vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnosticsDefaultError"}) vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"}) vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"}) vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"}) - From 9233adfd5fee6f069897ed6cbe6c35a23b66e75e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 2 Jun 2021 00:15:55 +0530 Subject: [PATCH 0242/1541] update nvimTree configs && highlights --- lua/custom_highlights.lua | 2 +- lua/nvimTree.lua | 73 ++++++++++++++++++++++----------------- 2 files changed, 42 insertions(+), 33 deletions(-) diff --git a/lua/custom_highlights.lua b/lua/custom_highlights.lua index 05b4230..9ac807e 100644 --- a/lua/custom_highlights.lua +++ b/lua/custom_highlights.lua @@ -34,7 +34,7 @@ cmd "hi NvimTreeFolderName guifg = #61afef" cmd "hi NvimTreeIndentMarker guifg=#383c44" cmd "hi NvimTreeNormal guibg=#1b1f27" cmd "hi NvimTreeVertSplit guifg=#1e222a" -cmd "hi NvimTreeRootFolder guifg=#f9929b" +cmd "hi NvimTreeRootFolder guifg=#1b1f27" -- telescope cmd "hi TelescopeBorder guifg=#2a2e36" diff --git a/lua/nvimTree.lua b/lua/nvimTree.lua index 137b986..591ec8a 100644 --- a/lua/nvimTree.lua +++ b/lua/nvimTree.lua @@ -30,19 +30,19 @@ g.nvim_tree_icons = { staged = "✓", unmerged = "", renamed = "➜", - untracked = "★" + untracked = "★", + deleted = "", + ignored = "◌" }, folder = { default = "", open = "", - symlink = "" + symlink = "", + empty = "", + empty_open = "", + symlink_open = "" } } - -local get_lua_cb = function(cb_name) - return string.format(":lua require'nvim-tree'.on_keypress('%s')", cb_name) -end - -- Mappings for nvimtree vim.api.nvim_set_keymap( @@ -55,30 +55,39 @@ vim.api.nvim_set_keymap( } ) +local tree_cb = require "nvim-tree.config".nvim_tree_callback + g.nvim_tree_bindings = { - [""] = get_lua_cb("edit"), - ["o"] = get_lua_cb("edit"), - ["<2-LeftMouse>"] = get_lua_cb("edit"), - ["<2-RightMouse>"] = get_lua_cb("cd"), - [""] = get_lua_cb("cd"), - [""] = get_lua_cb("vsplit"), - [""] = get_lua_cb("split"), - [""] = get_lua_cb("tabnew"), - [""] = get_lua_cb("close_node"), - [""] = get_lua_cb("close_node"), - [""] = get_lua_cb("preview"), - ["I"] = get_lua_cb("toggle_ignored"), - ["H"] = get_lua_cb("toggle_dotfiles"), - ["R"] = get_lua_cb("refresh"), - ["a"] = get_lua_cb("create"), - ["d"] = get_lua_cb("remove"), - ["r"] = get_lua_cb("rename"), - [""] = get_lua_cb("full_rename"), - ["x"] = get_lua_cb("cut"), - ["c"] = get_lua_cb("copy"), - ["p"] = get_lua_cb("paste"), - ["[c"] = get_lua_cb("prev_git_item"), - ["]c"] = get_lua_cb("next_git_item"), - ["-"] = get_lua_cb("dir_up"), - ["q"] = get_lua_cb("close") + ["u"] = ":lua require'some_module'.some_function()", + -- default mappings + [""] = tree_cb("edit"), + ["o"] = tree_cb("edit"), + ["<2-LeftMouse>"] = tree_cb("edit"), + ["<2-RightMouse>"] = tree_cb("cd"), + [""] = tree_cb("cd"), + [""] = tree_cb("vsplit"), + [""] = tree_cb("split"), + [""] = tree_cb("tabnew"), + ["<"] = tree_cb("prev_sibling"), + [">"] = tree_cb("next_sibling"), + [""] = tree_cb("close_node"), + [""] = tree_cb("close_node"), + [""] = tree_cb("preview"), + ["I"] = tree_cb("toggle_ignored"), + ["H"] = tree_cb("toggle_dotfiles"), + ["R"] = tree_cb("refresh"), + ["a"] = tree_cb("create"), + ["d"] = tree_cb("remove"), + ["r"] = tree_cb("rename"), + [""] = tree_cb("full_rename"), + ["x"] = tree_cb("cut"), + ["c"] = tree_cb("copy"), + ["p"] = tree_cb("paste"), + ["y"] = tree_cb("copy_name"), + ["Y"] = tree_cb("copy_path"), + ["gy"] = tree_cb("copy_absolute_path"), + ["[c"] = tree_cb("prev_git_item"), + ["]c"] = tree_cb("next_git_item"), + ["-"] = tree_cb("dir_up"), + ["q"] = tree_cb("close") } From 0a677276cc8f4340d55c68e39ff644503dbcdb66 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 2 Jun 2021 00:17:46 +0530 Subject: [PATCH 0243/1541] add cwd module in statusline --- lua/statusline.lua | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/lua/statusline.lua b/lua/statusline.lua index 4e32bc8..11519e0 100644 --- a/lua/statusline.lua +++ b/lua/statusline.lua @@ -8,7 +8,8 @@ local colors = { fg = "#abb2bf", green = "#82ad63", red = "#d47d85", - lightbg = "#2e323a", + lightbg = "#2d3139", + lightbg2 = "#262a32", blue = "#7797b7", yellow = "#e0c080", grey = "#6f737b" @@ -39,7 +40,19 @@ gls.left[4] = { condition = buffer_not_empty, highlight = {colors.fg, colors.lightbg}, separator = " ", - separator_highlight = {colors.lightbg, colors.bg} + separator_highlight = {colors.lightbg, colors.lightbg2} + } +} + +gls.left[5] = { + current_dir = { + provider = function() + local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") + return "  " .. dir_name .. " " + end, + highlight = {colors.grey, colors.lightbg2}, + separator = " ", + separator_highlight = {colors.lightbg2, colors.bg} } } @@ -51,7 +64,7 @@ local checkwidth = function() return false end -gls.left[5] = { +gls.left[6] = { DiffAdd = { provider = "DiffAdd", condition = checkwidth, @@ -60,7 +73,7 @@ gls.left[5] = { } } -gls.left[6] = { +gls.left[7] = { DiffModified = { provider = "DiffModified", condition = checkwidth, @@ -69,7 +82,7 @@ gls.left[6] = { } } -gls.left[7] = { +gls.left[8] = { DiffRemove = { provider = "DiffRemove", condition = checkwidth, @@ -78,15 +91,15 @@ gls.left[7] = { } } -gls.left[8] = { +gls.left[9] = { DiagnosticError = { provider = "DiagnosticError", icon = "  ", - highlight = {colors.grey, colors.bg} + highlight = {colors.red, colors.bg} } } -gls.left[9] = { +gls.left[10] = { DiagnosticWarn = { provider = "DiagnosticWarn", icon = "  ", @@ -155,7 +168,7 @@ gls.right[5] = { return " " end, separator = "", - separator_highlight = {colors.green, colors.bg}, + separator_highlight = {colors.green, colors.lightbg}, highlight = {colors.lightbg, colors.green} } } From 7c0f3e31f0859de17b9fd7681b55398e71354e47 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 2 Jun 2021 00:19:58 +0530 Subject: [PATCH 0244/1541] hide offsets in bufferline --- lua/top-bufferline.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lua/top-bufferline.lua b/lua/top-bufferline.lua index 30062e4..ab7de42 100644 --- a/lua/top-bufferline.lua +++ b/lua/top-bufferline.lua @@ -5,7 +5,7 @@ local activeBuffer_fg = "#c8ccd4" require "bufferline".setup { options = { - offsets = {{filetype = "NvimTree", text = "Explorer"}}, + offsets = {{filetype = "NvimTree", text = ""}}, buffer_close_icon = "", modified_icon = "", close_icon = " ", @@ -21,6 +21,7 @@ require "bufferline".setup { separator_style = "thin", mappings = "true" }, + -- bar colors!! highlights = { fill = { @@ -31,6 +32,7 @@ require "bufferline".setup { guifg = bar_fg, guibg = "#252931" }, + -- buffer buffer_selected = { guifg = activeBuffer_fg, @@ -41,19 +43,21 @@ require "bufferline".setup { guifg = "#9298a0", guibg = "#252931" }, + -- tabs over right tab = { guifg = "#9298a0", guibg = "#30343c" }, - tab_selected = { + tab_selected = { guifg = "#30343c", guibg = "#9298a0" }, - tab_close = { - guifg = "#f9929b", + tab_close = { + guifg = "#d47d85", guibg = "#252931" }, + -- buffer separators separator = { guifg = "#252931", @@ -67,10 +71,12 @@ require "bufferline".setup { guifg = "#252931", guibg = "#252931" }, + indicator_selected = { guifg = "#252931", guibg = "#252931" }, + -- modified files (but not saved) modified_selected = { guifg = "#A3BE8C", From a38c4543aa30bc8d049c0acb3f3951410e81f6ab Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 2 Jun 2021 00:22:47 +0530 Subject: [PATCH 0245/1541] format whichkey config --- lua/whichkey.lua | 82 ++++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/lua/whichkey.lua b/lua/whichkey.lua index e3cd5e5..fdd38a5 100644 --- a/lua/whichkey.lua +++ b/lua/whichkey.lua @@ -1,45 +1,45 @@ require("which-key").setup { - plugins = { - marks = true, -- shows a list of your marks on ' and ` - registers = true, -- shows your registers on " in NORMAL or in INSERT mode - -- the presets plugin, adds help for a bunch of default keybindings in Neovim - -- No actual key bindings are created - spelling = { - enabled = false, -- enabling this will show WhichKey when pressing z= to select spelling suggestions - suggestions = 20, -- how many suggestions should be shown in the list? + plugins = { + marks = true, -- shows a list of your marks on ' and ` + registers = true, -- shows your registers on " in NORMAL or in INSERT mode + -- the presets plugin, adds help for a bunch of default keybindings in Neovim + -- No actual key bindings are created + spelling = { + enabled = false, -- enabling this will show WhichKey when pressing z= to select spelling suggestions + suggestions = 20 -- how many suggestions should be shown in the list? + }, + presets = { + operators = true, -- adds help for operators like d, y, ... and registers them for motion / text object completion + motions = true, -- adds help for motions + text_objects = true, -- help for text objects triggered after entering an operator + windows = true, -- default bindings on + nav = true, -- misc bindings to work with windows + z = true, -- bindings for folds, spelling and others prefixed with z + g = true -- bindings for prefixed with g + } }, - presets = { - operators = true, -- adds help for operators like d, y, ... and registers them for motion / text object completion - motions = true, -- adds help for motions - text_objects = true, -- help for text objects triggered after entering an operator - windows = true, -- default bindings on - nav = true, -- misc bindings to work with windows - z = true, -- bindings for folds, spelling and others prefixed with z - g = true, -- bindings for prefixed with g + -- add operators that will trigger motion and text object completion + -- to enable all native operators, set the preset / operators plugin above + operators = {gc = "Comments"}, + icons = { + breadcrumb = "»", -- symbol used in the command line area that shows your active key combo + separator = "➜", -- symbol used between a key and it's label + group = "+" -- symbol prepended to a group }, - }, - -- add operators that will trigger motion and text object completion - -- to enable all native operators, set the preset / operators plugin above - operators = { gc = "Comments" }, - icons = { - breadcrumb = "»", -- symbol used in the command line area that shows your active key combo - separator = "➜", -- symbol used between a key and it's label - group = "+", -- symbol prepended to a group - }, - window = { - border = "none", -- none, single, double, shadow - position = "bottom", -- bottom, top - margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left] - padding = { 2, 2, 2, 2 }, -- extra window padding [top, right, bottom, left] - }, - layout = { - height = { min = 4, max = 25 }, -- min and max height of the columns - width = { min = 20, max = 50 }, -- min and max width of the columns - spacing = 3, -- spacing between columns - }, - ignore_missing = false, -- enable this to hide mappings for which you didn't specify a label - hidden = { "", "", "", "", "call", "lua", "^:", "^ "}, -- hide mapping boilerplate - show_help = true, -- show help message on the command line when the popup is visible - triggers = "auto", -- automatically setup triggers - -- triggers = {""} -- or specifiy a list manually + window = { + border = "none", -- none, single, double, shadow + position = "bottom", -- bottom, top + margin = {1, 0, 1, 0}, -- extra window margin [top, right, bottom, left] + padding = {2, 2, 2, 2} -- extra window padding [top, right, bottom, left] + }, + layout = { + height = {min = 4, max = 25}, -- min and max height of the columns + width = {min = 20, max = 50}, -- min and max width of the columns + spacing = 3 -- spacing between columns + }, + ignore_missing = false, -- enable this to hide mappings for which you didn't specify a label + hidden = {"", "", "", "", "call", "lua", "^:", "^ "}, -- hide mapping boilerplate + show_help = true, -- show help message on the command line when the popup is visible + triggers = "auto" -- automatically setup triggers + -- triggers = {""} -- or specifiy a list manually } From 742c57fea5a0fb2b46d4befd12e1bc5c28a05a30 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 2 Jun 2021 06:50:40 +0530 Subject: [PATCH 0246/1541] fix lua lsp cmd error --- lua/nvim-lspconfig.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index 29fe29d..d8e9f55 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -1,4 +1,4 @@ - function on_attach(client) +function on_attach(client) local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end @@ -50,7 +50,7 @@ local function setup_servers() root_dir = vim.loop.cwd } elseif lang == "lua" then - lspconf.sumneko_lua.setup { + lspconf[lang].setup { root_dir = function() return vim.loop.cwd() end, From 3c9d8d8dcc52a3bb98a314ed6cb4947438938f8c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 2 Jun 2021 07:09:16 +0530 Subject: [PATCH 0247/1541] minor changes to lspconfig --- lua/nvim-lspconfig.lua | 2 +- lua/statusline.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index d8e9f55..4cc3828 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -1,4 +1,4 @@ -function on_attach(client) +function on_attach(client, bufnr) local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end diff --git a/lua/statusline.lua b/lua/statusline.lua index 11519e0..568ec39 100644 --- a/lua/statusline.lua +++ b/lua/statusline.lua @@ -1,7 +1,7 @@ local gl = require("galaxyline") local gls = gl.section -gl.short_line_list = {" "} -- keeping this table { } as empty will show inactive statuslines +gl.short_line_list = {" "} local colors = { bg = "#22262e", From 3ec6d04a21a670fa5e17e99a8ce24140c1e25ef3 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 2 Jun 2021 09:47:25 +0530 Subject: [PATCH 0248/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 84e5149..a359dfa 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![GitHub Super-Linter](https://github.com/siduck76/neovim-dotfiles/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter) +[![GitHub Super-Linter](https://github.com/siduck76/NvChad/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter) An attempt to make neovim (cli version) as functional as an IDE while being very eyecandy. From 29abeb40c51d8839521b3046d62041dde3ded11c Mon Sep 17 00:00:00 2001 From: Alok <73450969+alok8bb@users.noreply.github.com> Date: Wed, 2 Jun 2021 11:16:17 +0530 Subject: [PATCH 0249/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a359dfa..ef0d9b7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![GitHub Super-Linter](https://github.com/siduck76/NvChad/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter) +[![Super-Linter](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml/badge.svg)](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml) An attempt to make neovim (cli version) as functional as an IDE while being very eyecandy. From 1508fd8fb38e482244ebf2311145249bdbbcaebb Mon Sep 17 00:00:00 2001 From: Henri <52706578+Vanderscycle@users.noreply.github.com> Date: Thu, 3 Jun 2021 11:49:52 -0700 Subject: [PATCH 0250/1541] Update misc-utils.lua Not DRY or elegant, but allows for file specific tabbing. Python uses 4 by std while the JS/TS ecosystem uses 2. --- lua/misc-utils.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index 3fb8d2a..86285c9 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -40,5 +40,7 @@ function M.has_width_gt(cols) -- Check if the windows width is greater than a given number of columns return vim.fn.winwidth(0) / 2 > cols end - +-- file extension specific tabbing +vim.cmd([[autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]]) +vim.cmd([[autocmd Filetype bash setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]]) return M From 9e6e043016bf84b0e9ee3b8e05c472a4adbf68e6 Mon Sep 17 00:00:00 2001 From: Henri <52706578+Vanderscycle@users.noreply.github.com> Date: Thu, 3 Jun 2021 11:53:51 -0700 Subject: [PATCH 0251/1541] Update misc-utils.lua bash doesn't really have a std other than 2, 4, 8 spaces --- lua/misc-utils.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index 86285c9..bab2b56 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -42,5 +42,4 @@ function M.has_width_gt(cols) end -- file extension specific tabbing vim.cmd([[autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]]) -vim.cmd([[autocmd Filetype bash setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]]) return M From 39b165a8e5d79402c0c5dd865f0be0170e6266cc Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 5 Jun 2021 22:10:23 +0530 Subject: [PATCH 0252/1541] move bufferline highlights in different file --- init.lua | 2 +- lua/colors.lua | 118 +++++++++++++++++++++++++++++++++++++++++ lua/top-bufferline.lua | 71 ------------------------- 3 files changed, 119 insertions(+), 72 deletions(-) create mode 100644 lua/colors.lua diff --git a/init.lua b/init.lua index c222ef1..4a70073 100644 --- a/init.lua +++ b/init.lua @@ -24,7 +24,7 @@ cmd "syntax on" local base16 = require "base16" base16(base16.themes["onedark"], true) -require "custom_highlights" +require "colors" -- blankline diff --git a/lua/colors.lua b/lua/colors.lua new file mode 100644 index 0000000..b3cd92b --- /dev/null +++ b/lua/colors.lua @@ -0,0 +1,118 @@ +local cmd = vim.cmd +-- blankline + +cmd "hi IndentBlanklineChar guifg=#282c34" + +-- misc -- +cmd "hi LineNr guifg=#42464e" +cmd "hi Comment guifg=#42464e" +cmd "hi NvimInternalError guifg=#f9929b" +cmd "hi VertSplit guifg=#2a2e36" +cmd "hi EndOfBuffer guifg=#1e222a" + +-- Pmenu +cmd "hi PmenuSel guibg=#98c379" +cmd "hi Pmenu guibg=#282c34" +cmd "hi PmenuSbar guibg =#353b45" +cmd "hi PmenuThumb guibg =#81A1C1" + +-- inactive statuslines as thin splitlines +cmd("highlight! StatusLineNC gui=underline guifg=#383c44") + +-- line n.o +cmd "hi clear CursorLine" +cmd "hi cursorlinenr guifg=#abb2bf" + +-- git signs --- +cmd "hi DiffAdd guifg=#81A1C1 guibg = none" +cmd "hi DiffChange guifg =#3A3E44 guibg = none" +cmd "hi DiffModified guifg = #81A1C1 guibg = none" + +-- NvimTree +cmd "hi NvimTreeFolderIcon guifg = #61afef" +cmd "hi NvimTreeFolderName guifg = #61afef" +cmd "hi NvimTreeIndentMarker guifg=#383c44" +cmd "hi NvimTreeNormal guibg=#1b1f27" +cmd "hi NvimTreeVertSplit guifg=#1e222a" +cmd "hi NvimTreeRootFolder guifg=#1b1f27" + +-- telescope +cmd "hi TelescopeBorder guifg=#2a2e36" +cmd "hi TelescopePromptBorder guifg=#2a2e36" +cmd "hi TelescopeResultsBorder guifg=#2a2e36" +cmd "hi TelescopePreviewBorder guifg=#525865" + +-- LspDiagnostics --- + +-- error / warnings +cmd "hi LspDiagnosticsSignError guifg=#f9929b" +cmd "hi LspDiagnosticsVirtualTextError guifg=#BF616A" +cmd "hi LspDiagnosticsSignWarning guifg=#EBCB8B" +cmd "hi LspDiagnosticsVirtualTextWarning guifg=#EBCB8B" + +-- info +cmd "hi LspDiagnosticsSignInformation guifg=#A3BE8C" +cmd "hi LspDiagnosticsVirtualTextInformation guifg=#A3BE8C" + +-- hint +cmd "hi LspDiagnosticsSignHint guifg=#b6bdca" +cmd "hi LspDiagnosticsVirtualTextHint guifg=#b6bdca" + +-- bufferline + +local function add_hi(item, fg, bg) + local buf_hi = "hi BufferLine" .. item .. " guifg=" .. fg .. " guibg=" .. bg + + if item == "BufferSelected" then + vim.cmd(buf_hi .. " gui=bold") + else + vim.cmd(buf_hi) + end +end + +local function bufferline_colors() + -- colors --- + local fg = "#565c64" + local bg = "#252931" + + -- active buffer + local darkerBg = "#1e222a" -- nvim's bg + local activeBuffer_fg = "#c8ccd4" + + -- unfocused opened buffer + + local grey_dark = "#9298a0" + + -- tabs + local bg2 = "#30343c" -- should be lighter than bg + local red = "#d47d85" + + -- modified buffers + local green = "#A3BE8C" + + add_hi("Background", fg, bg) + add_hi("Fill", fg, bg) + + add_hi("BufferSelected", activeBuffer_fg, darkerBg) + add_hi("BufferVisible", grey_dark, bg) + + add_hi("Tab", grey_dark, bg2) + add_hi("TabSelected", bg, "#81A1C1") + add_hi("TabClose", red, bg) + + -- making separates transparent + + add_hi("Indicator", bg, bg) + add_hi("IndicatorSelected", bg, bg) + + add_hi("Separator", bg, bg) + add_hi("SeparatorVisible", bg, bg) + add_hi("SeparatorSelected", darkerBg, darkerBg) + + -- modified buffers + add_hi("Modified", red, bg) + add_hi("ModifiedVisible", red, bg) + add_hi("ModifiedSelected", green, darkerBg) +end + +bufferline_colors() diff --git a/lua/top-bufferline.lua b/lua/top-bufferline.lua index ab7de42..b61f888 100644 --- a/lua/top-bufferline.lua +++ b/lua/top-bufferline.lua @@ -1,8 +1,3 @@ --- define some colors - -local bar_fg = "#565c64" -local activeBuffer_fg = "#c8ccd4" - require "bufferline".setup { options = { offsets = {{filetype = "NvimTree", text = ""}}, @@ -20,72 +15,6 @@ require "bufferline".setup { show_buffer_close_icons = true, separator_style = "thin", mappings = "true" - }, - - -- bar colors!! - highlights = { - fill = { - guifg = bar_fg, - guibg = "#252931" - }, - background = { - guifg = bar_fg, - guibg = "#252931" - }, - - -- buffer - buffer_selected = { - guifg = activeBuffer_fg, - guibg = "#1e222a", - gui = "bold" - }, - buffer_visible = { - guifg = "#9298a0", - guibg = "#252931" - }, - - -- tabs over right - tab = { - guifg = "#9298a0", - guibg = "#30343c" - }, - tab_selected = { - guifg = "#30343c", - guibg = "#9298a0" - }, - tab_close = { - guifg = "#d47d85", - guibg = "#252931" - }, - - -- buffer separators - separator = { - guifg = "#252931", - guibg = "#252931" - }, - separator_selected = { - guifg = "#1e222a", - guibg = "#1e222a" - }, - separator_visible = { - guifg = "#252931", - guibg = "#252931" - }, - - indicator_selected = { - guifg = "#252931", - guibg = "#252931" - }, - - -- modified files (but not saved) - modified_selected = { - guifg = "#A3BE8C", - guibg = "#1e222a" - }, - modified_visible = { - guifg = "#BF616A", - guibg = "#23272f" - } } } From 6f0cabc90bcaa74de45f51e5b5b96578828116a0 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 6 Jun 2021 11:05:53 +0530 Subject: [PATCH 0253/1541] add some modules to statusline --- lua/colors.lua | 2 +- lua/statusline.lua | 51 ++++++++++++++++++++++++++++++++++------------ 2 files changed, 39 insertions(+), 14 deletions(-) diff --git a/lua/colors.lua b/lua/colors.lua index b3cd92b..bde0a90 100644 --- a/lua/colors.lua +++ b/lua/colors.lua @@ -17,7 +17,7 @@ cmd "hi PmenuSbar guibg =#353b45" cmd "hi PmenuThumb guibg =#81A1C1" -- inactive statuslines as thin splitlines -cmd("highlight! StatusLineNC gui=underline guifg=#383c44") +cmd("hi! StatusLineNC gui=underline guifg=#383c44") -- line n.o cmd "hi clear CursorLine" diff --git a/lua/statusline.lua b/lua/statusline.lua index 568ec39..ec4be93 100644 --- a/lua/statusline.lua +++ b/lua/statusline.lua @@ -1,16 +1,17 @@ local gl = require("galaxyline") local gls = gl.section +local condition = require("galaxyline.condition") gl.short_line_list = {" "} local colors = { bg = "#22262e", fg = "#abb2bf", - green = "#82ad63", + green = "#97C378", red = "#d47d85", lightbg = "#2d3139", lightbg2 = "#262a32", - blue = "#7797b7", + blue = "#81A1C1", yellow = "#e0c080", grey = "#6f737b" } @@ -29,7 +30,7 @@ gls.left[2] = { gls.left[3] = { FileIcon = { provider = "FileIcon", - condition = buffer_not_empty, + condition = condition.buffer_not_empty, highlight = {colors.fg, colors.lightbg} } } @@ -37,7 +38,7 @@ gls.left[3] = { gls.left[4] = { FileName = { provider = {"FileName"}, - condition = buffer_not_empty, + condition = condition.buffer_not_empty, highlight = {colors.fg, colors.lightbg}, separator = " ", separator_highlight = {colors.lightbg, colors.lightbg2} @@ -108,6 +109,21 @@ gls.left[10] = { } gls.right[1] = { + lsp_status = { + provider = function(msg) + msg = msg or "No Active Lsp" + local clients = vim.lsp.get_active_clients() + if next(clients) ~= nil then + return " " .. "  " .. " active " + else + return "" + end + end, + highlight = {colors.grey, colors.bg} + } +} + +gls.right[2] = { GitIcon = { provider = function() return " " @@ -119,7 +135,7 @@ gls.right[1] = { } } -gls.right[2] = { +gls.right[3] = { GitBranch = { provider = "GitBranch", condition = require("galaxyline.provider_vcs").check_git_workspace, @@ -127,7 +143,7 @@ gls.right[2] = { } } -gls.right[3] = { +gls.right[4] = { viMode_icon = { provider = function() return " " @@ -138,7 +154,7 @@ gls.right[3] = { } } -gls.right[4] = { +gls.right[5] = { ViMode = { provider = function() local alias = { @@ -162,10 +178,10 @@ gls.right[4] = { } } -gls.right[5] = { - time_icon = { +gls.right[6] = { + some_icon = { provider = function() - return " " + return " " end, separator = "", separator_highlight = {colors.green, colors.lightbg}, @@ -173,10 +189,19 @@ gls.right[5] = { } } -gls.right[6] = { - time = { +gls.right[7] = { + line_percentage = { provider = function() - return " " .. os.date("%H:%M") .. " " + local current_line = vim.fn.line(".") + local total_line = vim.fn.line("$") + + if current_line == 1 then + return " Top " + elseif current_line == vim.fn.line("$") then + return " Bot " + end + local result, _ = math.modf((current_line / total_line) * 100) + return " " .. result .. "% " end, highlight = {colors.green, colors.lightbg} } From a6288d2127ca7c047fd3cc8a56b073c496bb8178 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 7 Jun 2021 08:07:02 +0530 Subject: [PATCH 0254/1541] Update README.md --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ef0d9b7..26da8f4 100644 --- a/README.md +++ b/README.md @@ -146,10 +146,9 @@ git clone https://github.com/wbthomason/packer.nvim\ - Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) , this usually depends on the language support you want to add in your neovim config. ``` -npm config set prefix=~/.node_modules -npm install -g vscode-html-languageserver-bin typescript typescript-language-server vscode-css-languageserver-bin prettier - -(ADD ~/.node_modules/bin at your PATH) + install the languages you want , check [lspInstal-repo](https://github.com/kabouzeid/nvim-lspinstall) + + example - :LspInstall html ``` To setup any language server , follow this guide https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md and search up the needed LSP. For example if I needed clangd's lsp server : From b6acd21b0a27c2e160344018a2fbe965090d4f75 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 7 Jun 2021 09:58:55 +0530 Subject: [PATCH 0255/1541] install.sh : clean it (since LspInstall is used) --- install.sh | 137 ++++++----------------------------------------------- 1 file changed, 14 insertions(+), 123 deletions(-) diff --git a/install.sh b/install.sh index 6e1cd3b..3e27e53 100755 --- a/install.sh +++ b/install.sh @@ -1,29 +1,4 @@ -#!/usr/bin/env bash -BASE=$(git rev-parse --show-toplevel) -LSP_BIN_PATH=$HOME/.local/bin - -default_lsp_langs="css html ts rust python bash json lua" -lsp_langs="" - -choose_langs() { - read -p "Would you like to install $1 lsp?(y/n)" lang - if [ "$lang" = "y" ]; then - lsp_langs+="$1 " - fi -} - -for lang in $default_lsp_langs; do - choose_langs $lang -done - -# install npm pkg global -npm config set prefix=~/.node_modules - -pfx="~~~~~ " -heading() { - echo - echo $pfx $1 -} +#!/bin/sh get_platform() { case "$(uname -s)" in @@ -36,23 +11,27 @@ get_platform() { echo $platform } -heading "installing packer" +echo "installing packer" -if [[ ! -e ~/.local/share/nvim/site/pack/packer/start/packer.nvim ]]; then - heading "Installing packer" +if [ ! -d ~/.local/share/nvim/site/pack/packer ]; then + echo "Installing packer" git clone https://github.com/wbthomason/packer.nvim \ ~/.local/share/nvim/site/pack/packer/start/packer.nvim + echo + echo "packer installed!" + echo fi -heading "Linking config" -heading "old nvim config will be deleted so watchout :0" +echo "Linking config" +echo "old nvim config will be deleted so watchout! :0" +echo # copying config rm -rf ~/.config/nvim/ && mkdir -p ~/.config/nvim cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim -# change shell for nvim +# change shell in nvim config read -p "which shell do you use?: " shellname echo "$shellname" @@ -63,96 +42,8 @@ else fi echo "shell changed to $shellname on nvim successfully!" - -#for f in `find -E . -regex ".*\.vim$|.*\.lua$"`; do -# p=${f#*/} -# echo -e '\t' ${p} -# path=~/.config/nvim/${p} -# rm -rf ~/.config/nvim/${p} -# mkdir -p $(dirname "${path}") -# ln -s ${BASE}/${p} ~/.config/nvim/${p} -#done - -#heading "Installing plugins" -#nvim --headless +PackerInstall +qa -#nvim --headless +TSUpdate +qa echo +echo "neovim will open with some errors , just press enter" && sleep 1 -fn_exists() { declare -F "$1" >/dev/null; } -warn_path=false - -install_node_deps() { - if [[ -z $(which npm) ]]; then - echo "npm not installed" - return - fi - npm install -g $@ -} - -# install languages - -install_ts() { - install_node_deps typescript typescript-language-server prettier -} - -install_html() { - install_node_deps vscode-html-languageserver-bin -} - -install_css() { - install_node_deps vscode-css-languageserver-bin -} - -install_json() { - install_node_deps vscode-json-languageserver -} - -install_rust() { - if [[ ! -e ~/.local/bin/rust-analyzer ]]; then - mkdir -p ${LSP_BIN_PATH} - curl -L https://github.com/rust-analyzer/rust-analyzer/releases/latest/download/rust-analyzer-$(get_platform) -o ~/.local/bin/rust-analyzer - chmod +x ~/.local/bin/rust-analyzer - warn_path=true - else - echo "already installed" - fi -} - -install_python() { - install_node_deps pyright -} - -install_bash() { - install_node_deps bash-language-server -} - -install_lua() { - git clone https://github.com/sumneko/lua-language-server ~/.config/lua-language-server - ( cd ~/.config/lua-language-server/ && git submodule update --init --recursive ) - - #linux only - (cd ~/.config/lua-language-server/3rd/luamake/ && compile/install.sh) - (cd ~/.config/lua-language-server/ && ./3rd/luamake/luamake rebuild) - -} - -for lang in ${lsp_langs}; do - if fn_exists install_$lang; then - heading "Installing $lang language server" - install_$lang - else - echo $lang setup not implemented - echo - fi -done - -if [[ ${warn_path} == true ]]; then - echo "" - echo "Ensure ${LSP_BIN_PATH} is available in your \$PATH variable" -fi - -echo "add ~/.node_modules/bin at PATH!" - -# install all plugins via packer - -nvim +PackerInstall +# install all plugins +nvim +PackerInstall From ba09b990a3b5aa3066ec47ba6653f03ad5b359b3 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 8 Jun 2021 21:53:11 +0530 Subject: [PATCH 0256/1541] move some stuff to wiki --- README.md | 115 +++--------------------------------------------------- 1 file changed, 5 insertions(+), 110 deletions(-) diff --git a/README.md b/README.md index 26da8f4..e42dbd5 100644 --- a/README.md +++ b/README.md @@ -111,121 +111,16 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal - smooth scrolling - Snip support from VSCode through vsnip supporting custom and predefined snips (friendly-snippets) -# Guides to migrate your nvim configs to init.lua - +# Wiki -- https://github.com/nanotee/nvim-lua-guide +- [config-structure](https://github.com/siduck76/NvChad/wiki#config-structure) +- [Install](https://github.com/siduck76/NvChad/wiki#config-structure) +- [mappings](https://github.com/siduck76/NvChad/wiki/mappings) -- https://alpha2phi.medium.com/neovim-init-lua-e80f4f136030 - -- https://oroques.dev/notes/neovim-init/ - -- https://icyphox.sh/blog/nvim-lua/ - -- https://github.com/rafamadriz/friendly-snippets/wiki - -# Clone my setup - - -- Install neovim-nightly , also use a nerdfont on your terminal. -- Use these [colors](https://github.com/siduck76/dotfiles/blob/master/thinkpad/.Xresources) for your terminal , Its in xresources format so it'd would be easier to use a terminal that supports xresources like st , urxvt , xterm , My [st build](https://github.com/siduck76/st). -- run the install.sh (this might work only on nix systems),this opens neovim (press enter or y to skip the errors , the errors will only show once). -- Install ripgrep , fd , ueberzug for telescope media extension to work. - -- Manual installation , incase the install.sh doesnt work for you : - -- Install packer.nvim - -``` - -git clone https://github.com/wbthomason/packer.nvim\ - ~/.local/share/nvim/site/pack/packer/start/packer.nvim - -``` - -- copy lua folder and init.lua into ~/.config/nvim -- Open neovim and install all plugins , :PackerInstall (let treesitter install all its extensionsm -- Install language servers and prettier ( for autocompletion etc and code formatting , nodejs should be installed too!) , this usually depends on the language support you want to add in your neovim config. - -``` - install the languages you want , check [lspInstal-repo](https://github.com/kabouzeid/nvim-lspinstall) - - example - :LspInstall html -``` - -To setup any language server , follow this guide https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md and search up the needed LSP. For example if I needed clangd's lsp server : - - - - - -I'd install it first and add its setup line : -`` -- in /lua/nvim-lspconfig/lua.lua file - - require'lspconfig'.clangd.setup{} `` - -# Default Mappings - - space is the **leader** key. - -- Opening terminals! -- Ctrl l Open terminal vertically over right -- Ctrl x Open terminal horizontally below the current window - -- **File tree (nvim-tree)** - -- Ctrl n toggle neovim tree - -- Shift h show hidden files (use these keybinds when cursor's in the filetree, same for the keybinds below). -- Ctrl + v open files in vertical split -- Ctrl + x open files in horizontal split - -- **Toggling stuffs** - -- leader + n toggle line number -- leader + z toggle truezen.nvim's Ataraxis mode -- leader + m toggle truezen.nvim's minimalistic mode - -- **Copy text** - -- Ctrl a copies everything in the current file -- select any text + y copies the selected text - -- **Telescope** - -- leader + f b open all buffers -- leader + f f find files in the current DIR -- leader + f o open recently edited files -- leader + f h opens up a help page like thing -- Ctrl + v open files in vertical split -- Ctrl + x open files in horizontal split - -- **Formatting code** - -- leader + f m formats or beautifies the code in current window via neoformat - (currently only html ,css , js can be formatted . To be able to use this keybind you need to install the formatter locally for your language , in my case prettier was required only so I installed it. check [this](https://github.com/sbdchd/neoformat). - -- **Neoscroll** - -- ``, ``, ``, ``, `` and `` : Smooth scrolling for window movement commands. - -- **Managing tabs with bufferline!** - -- TAB or Shift TAB cycle through opened tabs -- Shift x close current tab -- Shift t open new tab - -**Nvim-lspconfig (major ones)** -- K hover and show the definition -- gd jumps to the definition (works for user and language definitions) -- [d jumps to the previous error -- ]d jumps to the next error -- leader D jumps to the definition -- leader w + q list all the errors in a new buffer -- leader r + n rename all instances of this definition (user functions and declaration) -- # TODO -- Make the statusline more elegant. - Add more themes. +- Add a theme switcher # Contact - From a255a073a25418491576d86f3ad9cb0df3bf30c8 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 8 Jun 2021 22:10:58 +0530 Subject: [PATCH 0257/1541] Update README.md --- README.md | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/README.md b/README.md index e42dbd5..219720c 100644 --- a/README.md +++ b/README.md @@ -75,20 +75,6 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal
-# Config structure - -``` - nvim - ├──init.lua - └──lua - └──anything.lua -``` - -- The init.lua is used instead of init.vim. -- The lua folder contains modules ( config files ) , in the example above anything.lua file in lua folder could be considered as a module. -- The anything.lua file is supposed to have any neovim config written in lua , its like splitting the overall config into small bits and make it more organized , like one module for highlights and colors , another one for statusline and so on!. -- To load or source that "anything" module (like making it load with init.lua ) ,add this is in init.lua : require "anything". - # Features - File navigation with Nvimtree From a6e2fa444259a821c727bd845cc9505dd7365459 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 8 Jun 2021 22:11:59 +0530 Subject: [PATCH 0258/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 219720c..7298b02 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal # Wiki - [config-structure](https://github.com/siduck76/NvChad/wiki#config-structure) -- [Install](https://github.com/siduck76/NvChad/wiki#config-structure) +- [Install](https://github.com/siduck76/NvChad/wiki#clone-my-setup) - [mappings](https://github.com/siduck76/NvChad/wiki/mappings) # TODO From 30f9f00c9edc34f0e4fa803e6ac9ab59afd8e4cc Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 8 Jun 2021 22:14:15 +0530 Subject: [PATCH 0259/1541] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 7298b02..866486e 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,12 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal - smooth scrolling - Snip support from VSCode through vsnip supporting custom and predefined snips (friendly-snippets) +# Requirements + +- neovim 0.5 +- A terminal that supports [nerdfonts](https://github.com/ryanoasis/nerd-fonts) +- Set terminal's inner padding to 0. + # Wiki - [config-structure](https://github.com/siduck76/NvChad/wiki#config-structure) From 5fc205068fe04b006db5c691aa03b59f963e489e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 14 Jun 2021 07:57:56 +0530 Subject: [PATCH 0260/1541] organized highlights config , added new features like dashboard! --- init.lua | 34 +++++++++- lua/colors.lua | 118 -------------------------------- lua/custom_highlights.lua | 59 ---------------- lua/file-icons.lua | 50 +++++++------- lua/highlights.lua | 137 ++++++++++++++++++++++++++++++++++++++ lua/nvimTree.lua | 4 +- lua/pluginList.lua | 1 + lua/statusline.lua | 56 ++++++++-------- lua/telescope-nvim.lua | 7 ++ lua/themes/onedark.lua | 33 +++++++++ lua/top-bufferline.lua | 4 +- 11 files changed, 265 insertions(+), 238 deletions(-) delete mode 100644 lua/colors.lua delete mode 100644 lua/custom_highlights.lua create mode 100644 lua/highlights.lua create mode 100644 lua/themes/onedark.lua diff --git a/init.lua b/init.lua index 4a70073..c02fcd2 100644 --- a/init.lua +++ b/init.lua @@ -24,14 +24,14 @@ cmd "syntax on" local base16 = require "base16" base16(base16.themes["onedark"], true) -require "colors" +require "highlights" -- blankline g.indentLine_enabled = 1 g.indent_blankline_char = "▏" -g.indent_blankline_filetype_exclude = {"help", "terminal"} +g.indent_blankline_filetype_exclude = {"help", "terminal", "dashboard"} g.indent_blankline_buftype_exclude = {"terminal"} g.indent_blankline_show_trailing_blankline_indent = false @@ -54,6 +54,34 @@ vim.api.nvim_exec([[ au BufEnter term://* setlocal nonumber ]], false) --- setup for TrueZen.nvim require "zenmode" require "whichkey" + +-- dashboard +g.dashboard_default_executive = "telescope" + +g.dashboard_custom_header = { + " ", + " ", + " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", + " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", + " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", + " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", + " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", + " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", + " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", + " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", + " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", + " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", + " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", + " " +} + +g.dashboard_custom_section = { + a = {description = {" Find File SPC f f"}, command = "Telescope find_files"}, + b = {description = {" Recents SPC f o"}, command = "Telescope oldfiles"}, + c = {description = {" Find Word SPC f w"}, command = "Telescope live_grep"}, + d = {description = {"洛 New File SPC f b"}, command = "DashboardNewFile"}, + e = {description = {"󰓏 Bookmarks SPC f b"}, command = "Telescope marks"}, + f = {description = {" Load Last Session SPC f s"}, command = "SessionLoad"} +} diff --git a/lua/colors.lua b/lua/colors.lua deleted file mode 100644 index bde0a90..0000000 --- a/lua/colors.lua +++ /dev/null @@ -1,118 +0,0 @@ -local cmd = vim.cmd --- blankline - -cmd "hi IndentBlanklineChar guifg=#282c34" - --- misc -- -cmd "hi LineNr guifg=#42464e" -cmd "hi Comment guifg=#42464e" -cmd "hi NvimInternalError guifg=#f9929b" -cmd "hi VertSplit guifg=#2a2e36" -cmd "hi EndOfBuffer guifg=#1e222a" - --- Pmenu -cmd "hi PmenuSel guibg=#98c379" -cmd "hi Pmenu guibg=#282c34" -cmd "hi PmenuSbar guibg =#353b45" -cmd "hi PmenuThumb guibg =#81A1C1" - --- inactive statuslines as thin splitlines -cmd("hi! StatusLineNC gui=underline guifg=#383c44") - --- line n.o -cmd "hi clear CursorLine" -cmd "hi cursorlinenr guifg=#abb2bf" - --- git signs --- -cmd "hi DiffAdd guifg=#81A1C1 guibg = none" -cmd "hi DiffChange guifg =#3A3E44 guibg = none" -cmd "hi DiffModified guifg = #81A1C1 guibg = none" - --- NvimTree -cmd "hi NvimTreeFolderIcon guifg = #61afef" -cmd "hi NvimTreeFolderName guifg = #61afef" -cmd "hi NvimTreeIndentMarker guifg=#383c44" -cmd "hi NvimTreeNormal guibg=#1b1f27" -cmd "hi NvimTreeVertSplit guifg=#1e222a" -cmd "hi NvimTreeRootFolder guifg=#1b1f27" - --- telescope -cmd "hi TelescopeBorder guifg=#2a2e36" -cmd "hi TelescopePromptBorder guifg=#2a2e36" -cmd "hi TelescopeResultsBorder guifg=#2a2e36" -cmd "hi TelescopePreviewBorder guifg=#525865" - --- LspDiagnostics --- - --- error / warnings -cmd "hi LspDiagnosticsSignError guifg=#f9929b" -cmd "hi LspDiagnosticsVirtualTextError guifg=#BF616A" -cmd "hi LspDiagnosticsSignWarning guifg=#EBCB8B" -cmd "hi LspDiagnosticsVirtualTextWarning guifg=#EBCB8B" - --- info -cmd "hi LspDiagnosticsSignInformation guifg=#A3BE8C" -cmd "hi LspDiagnosticsVirtualTextInformation guifg=#A3BE8C" - --- hint -cmd "hi LspDiagnosticsSignHint guifg=#b6bdca" -cmd "hi LspDiagnosticsVirtualTextHint guifg=#b6bdca" - --- bufferline - -local function add_hi(item, fg, bg) - local buf_hi = "hi BufferLine" .. item .. " guifg=" .. fg .. " guibg=" .. bg - - if item == "BufferSelected" then - vim.cmd(buf_hi .. " gui=bold") - else - vim.cmd(buf_hi) - end -end - -local function bufferline_colors() - -- colors --- - local fg = "#565c64" - local bg = "#252931" - - -- active buffer - local darkerBg = "#1e222a" -- nvim's bg - local activeBuffer_fg = "#c8ccd4" - - -- unfocused opened buffer - - local grey_dark = "#9298a0" - - -- tabs - local bg2 = "#30343c" -- should be lighter than bg - local red = "#d47d85" - - -- modified buffers - local green = "#A3BE8C" - - add_hi("Background", fg, bg) - add_hi("Fill", fg, bg) - - add_hi("BufferSelected", activeBuffer_fg, darkerBg) - add_hi("BufferVisible", grey_dark, bg) - - add_hi("Tab", grey_dark, bg2) - add_hi("TabSelected", bg, "#81A1C1") - add_hi("TabClose", red, bg) - - -- making separates transparent - - add_hi("Indicator", bg, bg) - add_hi("IndicatorSelected", bg, bg) - - add_hi("Separator", bg, bg) - add_hi("SeparatorVisible", bg, bg) - add_hi("SeparatorSelected", darkerBg, darkerBg) - - -- modified buffers - add_hi("Modified", red, bg) - add_hi("ModifiedVisible", red, bg) - add_hi("ModifiedSelected", green, darkerBg) -end - -bufferline_colors() diff --git a/lua/custom_highlights.lua b/lua/custom_highlights.lua deleted file mode 100644 index 9ac807e..0000000 --- a/lua/custom_highlights.lua +++ /dev/null @@ -1,59 +0,0 @@ -local cmd = vim.cmd --- blankline - -cmd "hi IndentBlanklineChar guifg=#282c34" - --- misc -- -cmd "hi LineNr guifg=#42464e" -cmd "hi Comment guifg=#42464e" -cmd "hi NvimInternalError guifg=#f9929b" -cmd "hi VertSplit guifg=#2a2e36" -cmd "hi EndOfBuffer guifg=#1e222a" - --- Pmenu -cmd "hi PmenuSel guibg=#98c379" -cmd "hi Pmenu guibg=#282c34" -cmd "hi PmenuSbar guibg =#353b45" -cmd "hi PmenuThumb guibg =#81A1C1" - --- inactive statuslines as thin splitlines -cmd("highlight! StatusLineNC gui=underline guifg=#383c44") - --- line n.o -cmd "hi clear CursorLine" -cmd "hi cursorlinenr guifg=#abb2bf" - --- git signs --- -cmd "hi DiffAdd guifg=#81A1C1 guibg = none" -cmd "hi DiffChange guifg =#3A3E44 guibg = none" -cmd "hi DiffModified guifg = #81A1C1 guibg = none" - --- NvimTree -cmd "hi NvimTreeFolderIcon guifg = #61afef" -cmd "hi NvimTreeFolderName guifg = #61afef" -cmd "hi NvimTreeIndentMarker guifg=#383c44" -cmd "hi NvimTreeNormal guibg=#1b1f27" -cmd "hi NvimTreeVertSplit guifg=#1e222a" -cmd "hi NvimTreeRootFolder guifg=#1b1f27" - --- telescope -cmd "hi TelescopeBorder guifg=#2a2e36" -cmd "hi TelescopePromptBorder guifg=#2a2e36" -cmd "hi TelescopeResultsBorder guifg=#2a2e36" -cmd "hi TelescopePreviewBorder guifg=#525865" - --- LspDiagnostics --- - --- error / warnings -cmd "hi LspDiagnosticsSignError guifg=#f9929b" -cmd "hi LspDiagnosticsVirtualTextError guifg=#BF616A" -cmd "hi LspDiagnosticsSignWarning guifg=#EBCB8B" -cmd "hi LspDiagnosticsVirtualTextWarning guifg=#EBCB8B" - --- info -cmd "hi LspDiagnosticsSignInformation guifg=#A3BE8C" -cmd "hi LspDiagnosticsVirtualTextInformation guifg=#A3BE8C" - --- hint -cmd "hi LspDiagnosticsSignHint guifg=#b6bdca" -cmd "hi LspDiagnosticsVirtualTextHint guifg=#b6bdca" diff --git a/lua/file-icons.lua b/lua/file-icons.lua index 59807a9..9bb5832 100644 --- a/lua/file-icons.lua +++ b/lua/file-icons.lua @@ -1,108 +1,110 @@ +local colors = require "themes/onedark" + require "nvim-web-devicons".setup { override = { html = { icon = "", - color = "#DE8C92", + color = colors.baby_pink, name = "html" }, css = { icon = "", - color = "#61afef", + color = colors.blue, name = "css" }, js = { icon = "", - color = "#EBCB8B", + color = colors.sun, name = "js" }, ts = { icon = "ﯤ", - color = "#519ABA", + color = colors.teal, name = "ts" }, kt = { icon = "󱈙", - color = "#ffcb91", + color = colors.orange, name = "kt" }, png = { - icon = " ", - color = "#BD77DC", + icon = "", + color = colors.dark_purple, name = "png" }, jpg = { - icon = " ", - color = "#BD77DC", + icon = "", + color = colors.dark_purple, name = "jpg" }, jpeg = { - icon = " ", - color = "#BD77DC", + icon = "", + color = "colors.dark_purple", name = "jpeg" }, mp3 = { icon = "", - color = "#C8CCD4", + color = colors.white, name = "mp3" }, mp4 = { icon = "", - color = "#C8CCD4", + color = colors.white, name = "mp4" }, out = { icon = "", - color = "#C8CCD4", + color = colors.white, name = "out" }, Dockerfile = { icon = "", - color = "#b8b5ff", + color = colors.cyan, name = "Dockerfile" }, rb = { icon = "", - color = "#ff75a0", + color = colors.pink, name = "rb" }, vue = { icon = "﵂", - color = "#7eca9c", + color = colors.vibrant_green, name = "vue" }, py = { icon = "", - color = "#a7c5eb", + color = colors.cyan, name = "py" }, toml = { icon = "", - color = "#61afef", + color = colors.blue, name = "toml" }, lock = { icon = "", - color = "#DE6B74", + color = colors.red, name = "lock" }, zip = { icon = "", - color = "#EBCB8B", + color = colors.sun, name = "zip" }, xz = { icon = "", - color = "#EBCB8B", + color = colors.sun, name = "xz" }, deb = { icon = "", - color = "#a3b8ef", + color = colors.cyan, name = "deb" }, rpm = { icon = "", - color = "#fca2aa", + color = colors.orange, name = "rpm" } } diff --git a/lua/highlights.lua b/lua/highlights.lua new file mode 100644 index 0000000..0d8cb26 --- /dev/null +++ b/lua/highlights.lua @@ -0,0 +1,137 @@ +local cmd = vim.cmd + +local colors = require "themes/onedark" + +local white = colors.white +local darker_black = colors.darker_black +local black = colors.black +local black2 = colors.black2 +local one_bg = colors.one_bg +local one_bg2 = colors.one_bg2 +local one_bg3 = colors.one_bg3 +local light_grey = colors.light_grey +local grey = colors.grey +local grey_fg = colors.grey_fg +local red = colors.red +local line = colors.line +local green = colors.green +local nord_blue = colors.nord_blue +local blue = colors.blue +local yellow = colors.yellow +local purple = colors.purple + +-- for guifg , bg + +local function fg(group, color) + cmd("hi " .. group .. " guifg=" .. color) +end + +local function bg(group, color) + cmd("hi " .. group .. " guibg=" .. color) +end + +local function fg_bg(group, fgcol, bgcol) + cmd("hi " .. group .. " guifg=" .. fgcol .. " guibg=" .. bgcol) +end + +-- blankline + +fg("IndentBlanklineChar", line) + +-- misc -- +fg("LineNr", grey) +fg("Comment", grey) +fg("NvimInternalError", red) +fg("VertSplit", line) +fg("EndOfBuffer", black) + +-- Pmenu +bg("Pmenu", one_bg) +bg("PmenuSbar", one_bg2) +bg("PmenuSel", green) +bg("PmenuThumb", nord_blue) + +-- inactive statuslines as thin splitlines +cmd("hi! StatusLineNC gui=underline guifg=" .. line) + +-- line n.o +cmd "hi clear CursorLine" +fg("cursorlinenr", white) + +-- git signs --- +fg_bg("DiffAdd", nord_blue, "none") +fg_bg("DiffChange", one_bg2, "none") +fg_bg("DiffModified", nord_blue, "none") + +-- NvimTree +fg("NvimTreeFolderIcon", blue) +fg("NvimTreeFolderName", blue) +fg("NvimTreeIndentMarker", one_bg2) +fg("NvimTreeVertSplit", darker_black) +bg("NvimTreeVertSplit", darker_black) + +fg("NvimTreeRootFolder", darker_black) +bg("NvimTreeNormal", darker_black) +fg_bg("NvimTreeStatuslineNc", darker_black, darker_black) + +-- telescope +fg("TelescopeBorder", line) +fg("TelescopePromptBorder", line) +fg("TelescopeResultsBorder", line) +fg("TelescopePreviewBorder", grey) + +-- LspDiagnostics --- + +-- error / warnings +fg("LspDiagnosticsSignError", red) +fg("LspDiagnosticsVirtualTextError", red) +fg("LspDiagnosticsSignWarning", yellow) +fg("LspDiagnosticsVirtualTextWarning", yellow) + +-- info +fg("LspDiagnosticsSignInformation", green) +fg("LspDiagnosticsVirtualTextInformation", green) + +-- hint +fg("LspDiagnosticsSignHint", purple) +fg("LspDiagnosticsVirtualTextHint", purple) + +-- bufferline + +fg_bg("BufferLineFill", grey_fg, black2) +fg_bg("BufferLineBackground", light_grey, black2) + +fg_bg("BufferLineBufferVisible", light_grey, one_bg) +fg_bg("BufferLineBufferSelected", white, black) + +cmd "hi BufferLineBufferSelected gui=bold" + +-- tabs +fg_bg("BufferLineTab", light_grey, one_bg3) +fg_bg("BufferLineTabSelected", black2, nord_blue) +fg_bg("BufferLineTabClose", red, black) + +fg_bg("BufferLineIndicator", black2, black2) +fg_bg("BufferLineIndicatorSelected", black, black) + +-- separators +fg_bg("BufferLineSeparator", line, black2) +fg_bg("BufferLineSeparatorVisible", line, black2) +fg_bg("BufferLineSeparatorSelected", black, black2) + +-- modified buffers +fg_bg("BufferLineModified", red, black2) +fg_bg("BufferLineModifiedVisible", red, black2) +fg_bg("BufferLineModifiedSelected", green, black) + +-- close buttons +fg_bg("BufferLineCLoseButtonVisible", light_grey, black2) +fg_bg("BufferLineCLoseButton", light_grey, black2) +fg_bg("BufferLineCLoseButtonSelected", red, black) + +-- dashboard + +fg("DashboardHeader", grey_fg) +fg("DashboardCenter", grey_fg) +fg("DashboardShortcut", grey_fg) +fg("DashboardFooter", black) diff --git a/lua/nvimTree.lua b/lua/nvimTree.lua index 591ec8a..9e75a18 100644 --- a/lua/nvimTree.lua +++ b/lua/nvimTree.lua @@ -3,7 +3,7 @@ local g = vim.g vim.o.termguicolors = true g.nvim_tree_side = "left" -g.nvim_tree_width = 26 +g.nvim_tree_width = 25 g.nvim_tree_ignore = {".git", "node_modules", ".cache"} g.nvim_tree_auto_open = 0 g.nvim_tree_auto_close = 0 @@ -39,7 +39,7 @@ g.nvim_tree_icons = { open = "", symlink = "", empty = "", - empty_open = "", + empty_open = "", symlink_open = "" } } diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 2d7368f..415f1f2 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -38,6 +38,7 @@ return require("packer").startup( use "nvim-lua/popup.nvim" -- misc + use "glepnir/dashboard-nvim" use "tweekmonster/startuptime.vim" use "907th/vim-auto-save" use "karb94/neoscroll.nvim" diff --git a/lua/statusline.lua b/lua/statusline.lua index ec4be93..c035e3e 100644 --- a/lua/statusline.lua +++ b/lua/statusline.lua @@ -4,26 +4,23 @@ local condition = require("galaxyline.condition") gl.short_line_list = {" "} -local colors = { - bg = "#22262e", - fg = "#abb2bf", - green = "#97C378", - red = "#d47d85", - lightbg = "#2d3139", - lightbg2 = "#262a32", - blue = "#81A1C1", - yellow = "#e0c080", - grey = "#6f737b" +local colors = require "themes/onedark" + +gls.left[1] = { + FirstElement = { + provider = function() return '▋' end, + highlight = { colors.nord_blue, colors.nord_blue } + }, } gls.left[2] = { statusIcon = { provider = function() - return "  " + return "  " end, - highlight = {colors.bg, colors.blue}, + highlight = {colors.statusline_bg, colors.nord_blue}, separator = " ", - separator_highlight = {colors.blue, colors.lightbg} + separator_highlight = {colors.nord_blue, colors.lightbg} } } @@ -31,7 +28,7 @@ gls.left[3] = { FileIcon = { provider = "FileIcon", condition = condition.buffer_not_empty, - highlight = {colors.fg, colors.lightbg} + highlight = {colors.white, colors.lightbg} } } @@ -39,7 +36,7 @@ gls.left[4] = { FileName = { provider = {"FileName"}, condition = condition.buffer_not_empty, - highlight = {colors.fg, colors.lightbg}, + highlight = {colors.white, colors.lightbg}, separator = " ", separator_highlight = {colors.lightbg, colors.lightbg2} } @@ -51,9 +48,9 @@ gls.left[5] = { local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") return "  " .. dir_name .. " " end, - highlight = {colors.grey, colors.lightbg2}, + highlight = {colors.grey_fg2, colors.lightbg2}, separator = " ", - separator_highlight = {colors.lightbg2, colors.bg} + separator_highlight = {colors.lightbg2, colors.statusline_bg} } } @@ -70,7 +67,7 @@ gls.left[6] = { provider = "DiffAdd", condition = checkwidth, icon = "  ", - highlight = {colors.fg, colors.bg} + highlight = {colors.white, colors.statusline_bg} } } @@ -79,7 +76,7 @@ gls.left[7] = { provider = "DiffModified", condition = checkwidth, icon = "  ", - highlight = {colors.grey, colors.bg} + highlight = {colors.grey_fg2, colors.statusline_bg} } } @@ -88,7 +85,7 @@ gls.left[8] = { provider = "DiffRemove", condition = checkwidth, icon = "  ", - highlight = {colors.grey, colors.bg} + highlight = {colors.grey_fg2, colors.statusline_bg} } } @@ -96,7 +93,7 @@ gls.left[9] = { DiagnosticError = { provider = "DiagnosticError", icon = "  ", - highlight = {colors.red, colors.bg} + highlight = {colors.red, colors.statusline_bg} } } @@ -104,22 +101,21 @@ gls.left[10] = { DiagnosticWarn = { provider = "DiagnosticWarn", icon = "  ", - highlight = {colors.yellow, colors.bg} + highlight = {colors.yellow, colors.statusline_bg} } } gls.right[1] = { lsp_status = { - provider = function(msg) - msg = msg or "No Active Lsp" + provider = function() local clients = vim.lsp.get_active_clients() if next(clients) ~= nil then - return " " .. "  " .. " active " + return " " .. "  " .. " LSP " else return "" end end, - highlight = {colors.grey, colors.bg} + highlight = {colors.grey_fg2, colors.statusline_bg} } } @@ -129,9 +125,9 @@ gls.right[2] = { return " " end, condition = require("galaxyline.provider_vcs").check_git_workspace, - highlight = {colors.grey, colors.lightbg}, + highlight = {colors.grey_fg2, colors.lightbg}, separator = "", - separator_highlight = {colors.lightbg, colors.bg} + separator_highlight = {colors.lightbg, colors.statusline_bg} } } @@ -139,7 +135,7 @@ gls.right[3] = { GitBranch = { provider = "GitBranch", condition = require("galaxyline.provider_vcs").check_git_workspace, - highlight = {colors.grey, colors.lightbg} + highlight = {colors.grey_fg2, colors.lightbg} } } @@ -148,7 +144,7 @@ gls.right[4] = { provider = function() return " " end, - highlight = {colors.bg, colors.red}, + highlight = {colors.statusline_bg, colors.red}, separator = " ", separator_highlight = {colors.red, colors.lightbg} } diff --git a/lua/telescope-nvim.lua b/lua/telescope-nvim.lua index b338935..5cefecb 100644 --- a/lua/telescope-nvim.lua +++ b/lua/telescope-nvim.lua @@ -73,3 +73,10 @@ vim.api.nvim_set_keymap("n", "fb", [[lua require('telescope.builtin vim.api.nvim_set_keymap("n", "fh", [[lua require('telescope.builtin').help_tags()]], opt) vim.api.nvim_set_keymap("n", "fo", [[lua require('telescope.builtin').oldfiles()]], opt) vim.api.nvim_set_keymap("n", "fm", [[ Neoformat]], opt) + +-- dashboard stuff +vim.api.nvim_set_keymap("n", "fw", [[ Telescope live_grep]], opt) +vim.api.nvim_set_keymap("n", "fn", [[ DashboardNewFile]], opt) +vim.api.nvim_set_keymap("n", "fb", [[ DashboardJumpMarks]], opt) +vim.api.nvim_set_keymap("n", "fl", [[ SessionLoad]], opt) +vim.api.nvim_set_keymap("n", "fs", [[ SessionSave]], opt) diff --git a/lua/themes/onedark.lua b/lua/themes/onedark.lua new file mode 100644 index 0000000..02d7d43 --- /dev/null +++ b/lua/themes/onedark.lua @@ -0,0 +1,33 @@ +local colors = { + white = "#abb2bf", + darker_black = "#1b1f27", + black = "#1e222a", -- nvim bg + black2 = "#252931", + one_bg = "#282c34", -- real bg of onedark + one_bg2 = "#353b45", + one_bg3 = "#30343c", + grey = "#42464e", + grey_fg = "#565c64", + grey_fg2 = "#6f737b", + light_grey = "#6f737b", + red = "#d47d85", + baby_pink = "#DE8C92", + pink = "#ff75a0", + line = "#2a2e36", -- for lines like vertsplit + green = "#A3BE8C", + vibrant_green = "#7eca9c", + nord_blue = "#81A1C1", + blue = "#61afef", + yellow = "#e7c787", + sun = "#EBCB8B", + purple = "#b4bbc8", + dark_purple = "#c882e7", + teal = "#519ABA", + orange = "#fca2aa", + cyan = "#a3b8ef", + statusline_bg = "#22262e", + lightbg = "#2d3139", + lightbg2 = "#262a32" +} + +return colors diff --git a/lua/top-bufferline.lua b/lua/top-bufferline.lua index b61f888..f0fa4de 100644 --- a/lua/top-bufferline.lua +++ b/lua/top-bufferline.lua @@ -1,9 +1,9 @@ require "bufferline".setup { options = { - offsets = {{filetype = "NvimTree", text = ""}}, + offsets = {{filetype = "NvimTree", text = "", padding = 1}}, buffer_close_icon = "", modified_icon = "", - close_icon = " ", + close_icon = "", left_trunc_marker = "", right_trunc_marker = "", max_name_length = 14, From 34de8d474a79397c111f7c8239c49d9393f9fa5e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 14 Jun 2021 09:19:51 +0530 Subject: [PATCH 0261/1541] visible buffer bg --- lua/highlights.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/highlights.lua b/lua/highlights.lua index 0d8cb26..0737b50 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -101,7 +101,7 @@ fg("LspDiagnosticsVirtualTextHint", purple) fg_bg("BufferLineFill", grey_fg, black2) fg_bg("BufferLineBackground", light_grey, black2) -fg_bg("BufferLineBufferVisible", light_grey, one_bg) +fg_bg("BufferLineBufferVisible", light_grey, black2) fg_bg("BufferLineBufferSelected", white, black) cmd "hi BufferLineBufferSelected gui=bold" From a5b665f4a88a6af660f20cfd0b3ce10ad595ca40 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 14 Jun 2021 09:24:47 +0530 Subject: [PATCH 0262/1541] dashboard config --- init.lua | 30 +----------------------------- lua/dashboard.lua | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 29 deletions(-) create mode 100644 lua/dashboard.lua diff --git a/init.lua b/init.lua index c02fcd2..5752bd1 100644 --- a/init.lua +++ b/init.lua @@ -56,32 +56,4 @@ vim.api.nvim_exec([[ require "zenmode" require "whichkey" - --- dashboard -g.dashboard_default_executive = "telescope" - -g.dashboard_custom_header = { - " ", - " ", - " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", - " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", - " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", - " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", - " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", - " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", - " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", - " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", - " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", - " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", - " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", - " " -} - -g.dashboard_custom_section = { - a = {description = {" Find File SPC f f"}, command = "Telescope find_files"}, - b = {description = {" Recents SPC f o"}, command = "Telescope oldfiles"}, - c = {description = {" Find Word SPC f w"}, command = "Telescope live_grep"}, - d = {description = {"洛 New File SPC f b"}, command = "DashboardNewFile"}, - e = {description = {"󰓏 Bookmarks SPC f b"}, command = "Telescope marks"}, - f = {description = {" Load Last Session SPC f s"}, command = "SessionLoad"} -} +require "dashboard" diff --git a/lua/dashboard.lua b/lua/dashboard.lua new file mode 100644 index 0000000..8bb680b --- /dev/null +++ b/lua/dashboard.lua @@ -0,0 +1,28 @@ +local g = vim.g + +g.dashboard_default_executive = "telescope" +g.dashboard_custom_header = { + " ", + " ", + " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", + " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", + " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", + " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", + " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", + " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", + " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", + " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", + " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", + " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", + " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", + " " +} + +g.dashboard_custom_section = { + a = {description = {" Find File SPC f f"}, command = "Telescope find_files"}, + b = {description = {" Recents SPC f o"}, command = "Telescope oldfiles"}, + c = {description = {" Find Word SPC f w"}, command = "Telescope live_grep"}, + d = {description = {"洛 New File SPC f b"}, command = "DashboardNewFile"}, + e = {description = {"󰓏 Bookmarks SPC f b"}, command = "Telescope marks"}, + f = {description = {" Load Last Session SPC f s"}, command = "SessionLoad"} +} From b71c257bdc15622da1a6f8726be8e2040753435f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 14 Jun 2021 10:56:26 +0530 Subject: [PATCH 0263/1541] Update dashboard.lua --- lua/dashboard.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/dashboard.lua b/lua/dashboard.lua index 8bb680b..023618b 100644 --- a/lua/dashboard.lua +++ b/lua/dashboard.lua @@ -22,7 +22,7 @@ g.dashboard_custom_section = { a = {description = {" Find File SPC f f"}, command = "Telescope find_files"}, b = {description = {" Recents SPC f o"}, command = "Telescope oldfiles"}, c = {description = {" Find Word SPC f w"}, command = "Telescope live_grep"}, - d = {description = {"洛 New File SPC f b"}, command = "DashboardNewFile"}, + d = {description = {"洛 New File SPC f n"}, command = "DashboardNewFile"}, e = {description = {"󰓏 Bookmarks SPC f b"}, command = "Telescope marks"}, f = {description = {" Load Last Session SPC f s"}, command = "SessionLoad"} } From 093c73d76a8bb8f4844847009a8460ce0539cc25 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 14 Jun 2021 11:45:40 +0530 Subject: [PATCH 0264/1541] Update README.md --- README.md | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 866486e..257c085 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ An attempt to make neovim (cli version) as functional as an IDE while being very # Screenshots - +


@@ -32,19 +33,11 @@ A fuzzy file finder, picker, sorter, previewer and much more: adds indentline : -using indenLine plugin on left and blanklineNvim on right - - - ### galaxyline - fastest statusline plugin I've used so far:
-### gitsigns.nvim - - -Shows git signs of a repo on the signcolumn to indicate diffs/changes etc (needs plenary.nvim) -
### nvim-bufferline.lua - @@ -64,17 +57,6 @@ Better syntax highlighting for programming languages ( my config just has html,c without / with Treesitter : -### nvim-base16 - - -contains a collection of all base16 themes for vim , plugin written in lua (comparison of base16-vim and nvim-base16): - -nvim-base16 doesnt even take time to load unlike base16-vim which was eating half of the loadup time! ( the below screenshot was taken and tested on my old pentium laptop , so results might differ) -
- -(neovim loads pretty fast on ssds) - -
- # Features - File navigation with Nvimtree @@ -83,7 +65,7 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal - autosave - icons on nvimtree , telescope , bufferline/statusline and almost everywhere! with nvim-web-devicons - minimal status line ( galaxyline) -- gitsigns (colored bars in my config) +- gitsigns (colored bars for git in my config) - using nvim-lsp - nvim-lspconfig for nvim-lps configuration - nvim-compe for autocompletion From 2fe17852519cba136e4ca84f007ed03d88d5817d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 14 Jun 2021 12:04:12 +0530 Subject: [PATCH 0265/1541] add screenshot for dashboard-nvim --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 257c085..9f98fae 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ An attempt to make neovim (cli version) as functional as an IDE while being very # Screenshots - +



From e1c7d4e4585ee750509ef3a50da04d831570262a Mon Sep 17 00:00:00 2001 From: Aaditay <58261116+Aaditay@users.noreply.github.com> Date: Mon, 14 Jun 2021 19:55:41 +0530 Subject: [PATCH 0266/1541] two times requiring packer ? --- lua/pluginList.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 415f1f2..c00fe16 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -2,7 +2,7 @@ local packer = require("packer") local use = packer.use -- using { } for using different branch , loading plugin with certain commands etc -return require("packer").startup( +return packer.startup( function() use "wbthomason/packer.nvim" From 3552dcffb933c1c609efd9a4c29d8e75f81c19f5 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 14 Jun 2021 23:21:16 +0530 Subject: [PATCH 0267/1541] fix conflicting mappings --- lua/dashboard.lua | 4 ++-- lua/telescope-nvim.lua | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/dashboard.lua b/lua/dashboard.lua index 023618b..53b5f8c 100644 --- a/lua/dashboard.lua +++ b/lua/dashboard.lua @@ -23,6 +23,6 @@ g.dashboard_custom_section = { b = {description = {" Recents SPC f o"}, command = "Telescope oldfiles"}, c = {description = {" Find Word SPC f w"}, command = "Telescope live_grep"}, d = {description = {"洛 New File SPC f n"}, command = "DashboardNewFile"}, - e = {description = {"󰓏 Bookmarks SPC f b"}, command = "Telescope marks"}, - f = {description = {" Load Last Session SPC f s"}, command = "SessionLoad"} + e = {description = {"󰓏 Bookmarks SPC b m"}, command = "Telescope marks"}, + f = {description = {" Load Last Session SPC s l"}, command = "SessionLoad"} } diff --git a/lua/telescope-nvim.lua b/lua/telescope-nvim.lua index 5cefecb..77182c5 100644 --- a/lua/telescope-nvim.lua +++ b/lua/telescope-nvim.lua @@ -77,6 +77,6 @@ vim.api.nvim_set_keymap("n", "fm", [[ Neoformat]], opt) -- dashboard stuff vim.api.nvim_set_keymap("n", "fw", [[ Telescope live_grep]], opt) vim.api.nvim_set_keymap("n", "fn", [[ DashboardNewFile]], opt) -vim.api.nvim_set_keymap("n", "fb", [[ DashboardJumpMarks]], opt) -vim.api.nvim_set_keymap("n", "fl", [[ SessionLoad]], opt) -vim.api.nvim_set_keymap("n", "fs", [[ SessionSave]], opt) +vim.api.nvim_set_keymap("n", "bm", [[ DashboardJumpMarks]], opt) +vim.api.nvim_set_keymap("n", "sl", [[ SessionLoad]], opt) +vim.api.nvim_set_keymap("n", "ss", [[ SessionSave]], opt) From 3879718cea3bdb0750fe7eb1964904be895f7ccb Mon Sep 17 00:00:00 2001 From: ashincoder Date: Tue, 15 Jun 2021 14:35:23 +0530 Subject: [PATCH 0268/1541] changed script to mv nvim to nvim.bak instead of deleting it --- install.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 3e27e53..e1395a9 100755 --- a/install.sh +++ b/install.sh @@ -23,13 +23,21 @@ if [ ! -d ~/.local/share/nvim/site/pack/packer ]; then fi echo "Linking config" -echo "old nvim config will be deleted so watchout! :0" -echo +echo "old nvim config will be changed to nvim.bak if exists! :0" # copying config +if [ -d ~/.config/nvim ]; then + echo "Nvim Directory exists" + echo "Changing nvim to nvim.bak" + mv ~/.config/nvim/ ~/.config/nvim.bak/ + echo "Creating new nvim directory" + mkdir -p ~/.config/nvim +else + echo "Nvim Config doesn't exist so creating one" + mkdir -p ~/.config/nvim/ +fi -rm -rf ~/.config/nvim/ && mkdir -p ~/.config/nvim -cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim +cp -r init.lua ~/.config/nvim/ && cp -r lua ~/.config/nvim/ # change shell in nvim config read -p "which shell do you use?: " shellname From 035057180300d76fb8c256c4770f5cf08b430b26 Mon Sep 17 00:00:00 2001 From: ashincoder Date: Tue, 15 Jun 2021 15:55:32 +0530 Subject: [PATCH 0269/1541] added commenting support --- init.lua | 3 +++ lua/commenter.lua | 1 + lua/pluginList.lua | 3 +++ 3 files changed, 7 insertions(+) create mode 100644 lua/commenter.lua diff --git a/init.lua b/init.lua index 5752bd1..9251cf4 100644 --- a/init.lua +++ b/init.lua @@ -5,6 +5,9 @@ require "misc-utils" require "top-bufferline" require "statusline" +-- Commenter +require "commenter" + require("colorizer").setup() require("neoscroll").setup() -- smooth scroll diff --git a/lua/commenter.lua b/lua/commenter.lua new file mode 100644 index 0000000..e1f1358 --- /dev/null +++ b/lua/commenter.lua @@ -0,0 +1 @@ +require('nvim_comment').setup() diff --git a/lua/pluginList.lua b/lua/pluginList.lua index c00fe16..643b523 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -25,6 +25,9 @@ return packer.startup( use "windwp/nvim-autopairs" use "alvan/vim-closetag" + -- Comment + use "terrortylor/nvim-comment" + -- snippet support use "hrsh7th/vim-vsnip" use "rafamadriz/friendly-snippets" From c0369c713030de045068a4d7bc79bebc06fb080c Mon Sep 17 00:00:00 2001 From: ashincoder Date: Tue, 15 Jun 2021 15:57:55 +0530 Subject: [PATCH 0270/1541] added commenting keybinding --- lua/mappings.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/mappings.lua b/lua/mappings.lua index 5ec8766..8d95498 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -33,3 +33,7 @@ map("n", "m", [[ TZMinimalist]], opt) map("n", "", [[ w ]], opt) -- vim.cmd("inoremap jh ") + +-- Commenter Keybinding +map("n", "/", ":CommentToggle", {noremap = true, silent = true}) +map("v", "/", ":CommentToggle", {noremap = true, silent = true}) From e31e74e0da7091e9f37c4457291498c7fa52bd7f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 15 Jun 2021 16:31:54 +0530 Subject: [PATCH 0271/1541] Update init.lua --- init.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 9251cf4..f0c1d9d 100644 --- a/init.lua +++ b/init.lua @@ -5,9 +5,6 @@ require "misc-utils" require "top-bufferline" require "statusline" --- Commenter -require "commenter" - require("colorizer").setup() require("neoscroll").setup() -- smooth scroll @@ -60,3 +57,4 @@ vim.api.nvim_exec([[ require "zenmode" require "whichkey" require "dashboard" +require('nvim_comment').setup() From 19763665e6930b220dcef9771f38b5d358dec810 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 15 Jun 2021 16:32:07 +0530 Subject: [PATCH 0272/1541] Delete commenter.lua --- lua/commenter.lua | 1 - 1 file changed, 1 deletion(-) delete mode 100644 lua/commenter.lua diff --git a/lua/commenter.lua b/lua/commenter.lua deleted file mode 100644 index e1f1358..0000000 --- a/lua/commenter.lua +++ /dev/null @@ -1 +0,0 @@ -require('nvim_comment').setup() From 62f4ce09127e676812777d4722d1b38a014930f1 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 15 Jun 2021 21:44:11 +0530 Subject: [PATCH 0273/1541] enable smartindent --- lua/misc-utils.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index bab2b56..066a671 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -28,6 +28,8 @@ opt("o", "timeoutlen", 500) -- for indenline opt("b", "expandtab", true) opt("b", "shiftwidth", 2) +opt("b", "smartindent", true) + local M = {} From 9aea4d08e5649303725a1e58638b2ea2bc5fb219 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 15 Jun 2021 21:54:05 +0530 Subject: [PATCH 0274/1541] minor changes in treesitter conf --- lua/treesitter-nvim.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/treesitter-nvim.lua b/lua/treesitter-nvim.lua index 369bcf0..5ee27c4 100644 --- a/lua/treesitter-nvim.lua +++ b/lua/treesitter-nvim.lua @@ -9,6 +9,8 @@ ts_config.setup { "lua", "json", "python" + -- "rust", + -- "go" }, highlight = { enable = true, From 9bbd2b5d69b77bd5c24bb173062919772739a41e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 15 Jun 2021 23:39:40 +0530 Subject: [PATCH 0275/1541] update todo and some stuff --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f98fae..75a8b9b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![Super-Linter](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml/badge.svg)](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml) +[![Gitter](https://badges.gitter.im/neovim-dotfiles/community.svg)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) An attempt to make neovim (cli version) as functional as an IDE while being very eyecandy. @@ -94,10 +95,26 @@ without / with Treesitter : # TODO +It would be nice if NvChad focuses on existing plugins and config before adding new things , some plugins like whichkey , telescope , treesitter still have basic configs! Also adding new features that'd make NvChad slow or its startuptime slow wouldnt be encouraged , if that feature's really needed then It'll be mentioned in the wiki with its config. + +- Debloat the config - Add more themes. -- Add a theme switcher +- Add a theme switcher. +- Add a global configuration so it doesnt get hard to update :c # Contact - - My linux / unix related ricing community: https://t.me/DE_WM (telegram) - Me: @siduck (telegram) + +## :gift_heart: Tip Jar + +If you enjoy using NvChad and would like to show your appreciation, you may want to tip me here. + +It is never required but always appreciated ^-^. + +

+ undefined + undefined + undefined +

From 61022dd9715b6d84849dfa0a115e3987d1bd0975 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 15 Jun 2021 23:52:11 +0530 Subject: [PATCH 0276/1541] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 75a8b9b..6457a04 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@ An attempt to make neovim (cli version) as functional as an IDE while being very


-
+
+
# Very Useful lua plugins used in my config - @@ -111,7 +112,7 @@ It would be nice if NvChad focuses on existing plugins and config before adding If you enjoy using NvChad and would like to show your appreciation, you may want to tip me here. -It is never required but always appreciated ^-^. +It is never required but always appreciated.

undefined From c3a447a4710f63776af8b09e30c969f1edefdbc2 Mon Sep 17 00:00:00 2001 From: ashincoder Date: Wed, 16 Jun 2021 06:20:47 +0530 Subject: [PATCH 0277/1541] commented relative number setting and changed bookmark icon --- lua/dashboard.lua | 2 +- lua/misc-utils.lua | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lua/dashboard.lua b/lua/dashboard.lua index 53b5f8c..7a05a8e 100644 --- a/lua/dashboard.lua +++ b/lua/dashboard.lua @@ -23,6 +23,6 @@ g.dashboard_custom_section = { b = {description = {" Recents SPC f o"}, command = "Telescope oldfiles"}, c = {description = {" Find Word SPC f w"}, command = "Telescope live_grep"}, d = {description = {"洛 New File SPC f n"}, command = "DashboardNewFile"}, - e = {description = {"󰓏 Bookmarks SPC b m"}, command = "Telescope marks"}, + e = {description = {" Bookmarks SPC b m"}, command = "Telescope marks"}, f = {description = {" Load Last Session SPC s l"}, command = "SessionLoad"} } diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index 066a671..35e7a17 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -25,12 +25,16 @@ opt("o", "updatetime", 250) -- update interval for gitsigns opt("o", "clipboard", "unnamedplus") opt("o", "timeoutlen", 500) +-- Numbers +opt("w", "number", true) +opt("o", "numberwidth", 2) +-- opt("w", "relativenumber", true) + -- for indenline opt("b", "expandtab", true) opt("b", "shiftwidth", 2) opt("b", "smartindent", true) - local M = {} function M.is_buffer_empty() From 20cc14e5848bb86b9de46df4de1f58d733fac1bb Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Wed, 16 Jun 2021 06:42:23 +0530 Subject: [PATCH 0278/1541] removed 2 repeated lines --- lua/misc-utils.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index 35e7a17..889f48d 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -12,8 +12,6 @@ opt("o", "ignorecase", true) opt("o", "splitbelow", true) opt("o", "splitright", true) opt("o", "termguicolors", true) -opt("w", "number", true) -opt("o", "numberwidth", 2) opt("w", "cul", true) opt("o", "mouse", "a") From a80de385f260eeafbd4b52b3eb48a78030c9735f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 16 Jun 2021 18:00:23 +0530 Subject: [PATCH 0279/1541] Update highlights.lua --- lua/highlights.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/highlights.lua b/lua/highlights.lua index 0737b50..2a5c0db 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -135,3 +135,6 @@ fg("DashboardHeader", grey_fg) fg("DashboardCenter", grey_fg) fg("DashboardShortcut", grey_fg) fg("DashboardFooter", black) + +-- Default nvim bg +-- vim.cmd("hi Normal guibg=#1e222a") From 35343e8b96fe1e38cb2d30c2658bfaa7bffc512e Mon Sep 17 00:00:00 2001 From: ashincoder Date: Wed, 16 Jun 2021 18:53:16 +0530 Subject: [PATCH 0280/1541] cmd instead of vim.cmd --- lua/highlights.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/highlights.lua b/lua/highlights.lua index 2a5c0db..2dec236 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -137,4 +137,4 @@ fg("DashboardShortcut", grey_fg) fg("DashboardFooter", black) -- Default nvim bg --- vim.cmd("hi Normal guibg=#1e222a") +-- cmd("hi Normal guibg=#1e222a") From fdd32cfcabe655fc4526662067490d1eb9976f67 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 16 Jun 2021 18:56:12 +0530 Subject: [PATCH 0281/1541] Update highlights.lua --- lua/highlights.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/highlights.lua b/lua/highlights.lua index 2dec236..c2e35e6 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -137,4 +137,4 @@ fg("DashboardShortcut", grey_fg) fg("DashboardFooter", black) -- Default nvim bg --- cmd("hi Normal guibg=#1e222a") +-- cmd "hi Normal guibg=#1e222a" From a9816eed421075c31ed0325ec3c69efd25faf4f7 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 18 Jun 2021 08:40:01 +0530 Subject: [PATCH 0282/1541] hide statusline in NvimTree and terminal buffers --- init.lua | 11 ++++++++--- lua/misc-utils.lua | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index f0c1d9d..3bbe5eb 100644 --- a/init.lua +++ b/init.lua @@ -50,11 +50,16 @@ require("nvim-autopairs").setup() require("lspkind").init() -- hide line numbers in terminal windows -vim.api.nvim_exec([[ +vim.api.nvim_exec( + [[ au BufEnter term://* setlocal nonumber -]], false) + au BufEnter,BufWinEnter,WinEnter,CmdwinEnter * if bufname('%') == "NvimTree" | set laststatus=0 | else | set laststatus=2 | endif + au BufEnter term://* set laststatus=0 +]], + false +) require "zenmode" require "whichkey" require "dashboard" -require('nvim_comment').setup() +require("nvim_comment").setup() diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index 889f48d..a5f7d6f 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -7,6 +7,7 @@ local function opt(scope, key, value) end end +opt("o", "ruler", false) opt("o", "hidden", true) opt("o", "ignorecase", true) opt("o", "splitbelow", true) From 6c272e73135fc040f5b5c0af3162d246ba5de440 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 18 Jun 2021 08:41:14 +0530 Subject: [PATCH 0283/1541] disable showmode --- lua/misc-utils.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index a5f7d6f..40f27cc 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -8,6 +8,7 @@ local function opt(scope, key, value) end opt("o", "ruler", false) +opt("o", "showmode", false) opt("o", "hidden", true) opt("o", "ignorecase", true) opt("o", "splitbelow", true) From 671ed7d0901d18896e3543a73e9ec025b989954c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 18 Jun 2021 11:39:40 +0530 Subject: [PATCH 0284/1541] Update README.md --- README.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6457a04..59a5d2c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Super-Linter](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml/badge.svg)](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml) [![Gitter](https://badges.gitter.im/neovim-dotfiles/community.svg)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -An attempt to make neovim (cli version) as functional as an IDE while being very eyecandy. +An attempt to make neovim (cli version) as functional as an IDE while being very eyecandy and less bloated. # Screenshots - @@ -103,12 +103,14 @@ It would be nice if NvChad focuses on existing plugins and config before adding - Add a theme switcher. - Add a global configuration so it doesnt get hard to update :c -# Contact - +# Contibute -- My linux / unix related ricing community: https://t.me/DE_WM (telegram) -- Me: @siduck (telegram) +- PR's are always welcomed however NvChad aims to be less bloated and suckless. So PR's regarding existing plugin's enhancement , bug fixes are more encouraged. +- PR's regarding adding new plugins and their configs must be given some thought since NvChad aims to have a minimal config and meant to be used as a "base" neovim config so it will have only a set of important plugins. So adding more and more plugins, making NvChad bloated + slow wont help!. +- NvChad isnt a Framework. NvChad wont keep adding more and more features ( adding new plugins most likely) as requested , no spoonfeeding!! If you think the plugin you want to be added is very useful and many NvChaders would find it useful, then such feature's PR is welcomed! +- But adding specific features like adding config for https://github.com/wakatime/vim-wakatime etc will be added in this (section)[https://github.com/siduck76/NvChad/wiki/Chad-user-configs]. This lets the user select the things only they want ( from extra configs ) . -## :gift_heart: Tip Jar +## :gift_heart: Support If you enjoy using NvChad and would like to show your appreciation, you may want to tip me here. @@ -119,3 +121,8 @@ It is never required but always appreciated. undefined undefined

+ +# Contact - + +- My linux / unix related ricing community: https://t.me/DE_WM (telegram) +- Me: @siduck (telegram) From ffa008f148177e5914f347e6893018f4af5cd1e4 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 18 Jun 2021 11:42:25 +0530 Subject: [PATCH 0285/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 59a5d2c..1566477 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ It would be nice if NvChad focuses on existing plugins and config before adding - PR's are always welcomed however NvChad aims to be less bloated and suckless. So PR's regarding existing plugin's enhancement , bug fixes are more encouraged. - PR's regarding adding new plugins and their configs must be given some thought since NvChad aims to have a minimal config and meant to be used as a "base" neovim config so it will have only a set of important plugins. So adding more and more plugins, making NvChad bloated + slow wont help!. - NvChad isnt a Framework. NvChad wont keep adding more and more features ( adding new plugins most likely) as requested , no spoonfeeding!! If you think the plugin you want to be added is very useful and many NvChaders would find it useful, then such feature's PR is welcomed! -- But adding specific features like adding config for https://github.com/wakatime/vim-wakatime etc will be added in this (section)[https://github.com/siduck76/NvChad/wiki/Chad-user-configs]. This lets the user select the things only they want ( from extra configs ) . +- But adding specific features like adding config for https://github.com/wakatime/vim-wakatime etc will be added in this https://github.com/siduck76/NvChad/wiki/Chad-user-configs. This lets the user select the things only they want ( from extra configs ) . ## :gift_heart: Support From c9955955090e4de09af49d2e979d2017ccebeb30 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 19 Jun 2021 07:08:22 +0530 Subject: [PATCH 0286/1541] rm unneeded spaces after nvimtree default icons --- lua/nvimTree.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/nvimTree.lua b/lua/nvimTree.lua index 9e75a18..47f72ff 100644 --- a/lua/nvimTree.lua +++ b/lua/nvimTree.lua @@ -23,8 +23,8 @@ g.nvim_tree_show_icons = { } g.nvim_tree_icons = { - default = " ", - symlink = " ", + default = "", + symlink = "", git = { unstaged = "✗", staged = "✓", From 18ff27d6b17d8cbe55855884007261bdd5da7740 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 19 Jun 2021 12:50:35 +0530 Subject: [PATCH 0287/1541] add dashboard footer & disable statusline in dashboard --- init.lua | 2 +- lua/dashboard.lua | 7 +++++++ lua/highlights.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 3bbe5eb..2750a44 100644 --- a/init.lua +++ b/init.lua @@ -49,7 +49,7 @@ require "gitsigns-nvim" require("nvim-autopairs").setup() require("lspkind").init() --- hide line numbers in terminal windows +-- hide line numbers , statusline in specific buffers! vim.api.nvim_exec( [[ au BufEnter term://* setlocal nonumber diff --git a/lua/dashboard.lua b/lua/dashboard.lua index 7a05a8e..b9dff2a 100644 --- a/lua/dashboard.lua +++ b/lua/dashboard.lua @@ -1,7 +1,9 @@ local g = vim.g +g.dashboard_disable_statusline = 1 g.dashboard_default_executive = "telescope" g.dashboard_custom_header = { + " ", " ", " ", " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", @@ -26,3 +28,8 @@ g.dashboard_custom_section = { e = {description = {" Bookmarks SPC b m"}, command = "Telescope marks"}, f = {description = {" Load Last Session SPC s l"}, command = "SessionLoad"} } + +g.dashboard_custom_footer = { + " ", + "NvChad v0.5" +} diff --git a/lua/highlights.lua b/lua/highlights.lua index c2e35e6..70e2e86 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -134,7 +134,7 @@ fg_bg("BufferLineCLoseButtonSelected", red, black) fg("DashboardHeader", grey_fg) fg("DashboardCenter", grey_fg) fg("DashboardShortcut", grey_fg) -fg("DashboardFooter", black) +fg("DashboardFooter", grey_fg) -- Default nvim bg -- cmd "hi Normal guibg=#1e222a" From 8f6780f09f3acb34e2254ef1d1dac0ec8c8e5246 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 19 Jun 2021 19:24:24 +0530 Subject: [PATCH 0288/1541] Update pluginList.lua --- lua/pluginList.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 643b523..13d94d3 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -35,7 +35,6 @@ return packer.startup( -- file managing , picker etc use "kyazdani42/nvim-tree.lua" use "kyazdani42/nvim-web-devicons" - use "ryanoasis/vim-devicons" use "nvim-telescope/telescope.nvim" use "nvim-telescope/telescope-media-files.nvim" use "nvim-lua/popup.nvim" From 7c0b6bac224862bab4a498963f105cbffc81a54e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 19 Jun 2021 20:24:02 +0530 Subject: [PATCH 0289/1541] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1566477..22e5b9d 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,7 @@ without / with Treesitter : # Wiki +- [pr-requisite](https://github.com/siduck76/NvChad/wiki/Lua-guides) - [config-structure](https://github.com/siduck76/NvChad/wiki#config-structure) - [Install](https://github.com/siduck76/NvChad/wiki#clone-my-setup) - [mappings](https://github.com/siduck76/NvChad/wiki/mappings) From bbadee53adff4f4ffd5fe4b085adfc7c386687e2 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 19 Jun 2021 20:24:28 +0530 Subject: [PATCH 0290/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 22e5b9d..1981f8d 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ without / with Treesitter : # Wiki -- [pr-requisite](https://github.com/siduck76/NvChad/wiki/Lua-guides) +- [pre-requisite](https://github.com/siduck76/NvChad/wiki/Lua-guides) - [config-structure](https://github.com/siduck76/NvChad/wiki#config-structure) - [Install](https://github.com/siduck76/NvChad/wiki#clone-my-setup) - [mappings](https://github.com/siduck76/NvChad/wiki/mappings) From e771a32ab8a07a64d298e9c4a41e27979b085cad Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 24 Jun 2021 22:49:42 +0530 Subject: [PATCH 0291/1541] lazy loading : compe --- init.lua | 1 - lua/compe-completion.lua | 91 ++++++++++------------------------------ lua/mappings.lua | 64 +++++++++++++++++++++++++--- lua/pluginList.lua | 13 +++++- 4 files changed, 91 insertions(+), 78 deletions(-) diff --git a/init.lua b/init.lua index 2750a44..0fc7f3b 100644 --- a/init.lua +++ b/init.lua @@ -10,7 +10,6 @@ require("neoscroll").setup() -- smooth scroll -- lsp stuff require "nvim-lspconfig" -require "compe-completion" local cmd = vim.cmd local g = vim.g diff --git a/lua/compe-completion.lua b/lua/compe-completion.lua index 79ee38a..b9170ae 100644 --- a/lua/compe-completion.lua +++ b/lua/compe-completion.lua @@ -1,74 +1,25 @@ -vim.o.completeopt = "menuone,noselect" +local M = {} -require "compe".setup { - enabled = true, - autocomplete = true, - debug = false, - min_length = 1, - preselect = "enable", - throttle_time = 80, - source_timeout = 200, - incomplete_delay = 400, - max_abbr_width = 100, - max_kind_width = 100, - max_menu_width = 100, - documentation = true, - source = { - buffer = {kind = "﬘", true}, - vsnip = {kind = "﬌"}, --replace to what sign you prefer - nvim_lsp = true +M.config = function() + require "compe".setup { + enabled = true, + autocomplete = true, + debug = false, + min_length = 1, + preselect = "enable", + throttle_time = 80, + source_timeout = 200, + incomplete_delay = 400, + max_abbr_width = 100, + max_kind_width = 100, + max_menu_width = 100, + documentation = true, + source = { + buffer = {kind = "﬘", true}, + vsnip = {kind = "﬌"}, + nvim_lsp = true + } } -} - -local t = function(str) - return vim.api.nvim_replace_termcodes(str, true, true, true) end -local check_back_space = function() - local col = vim.fn.col(".") - 1 - if col == 0 or vim.fn.getline("."):sub(col, col):match("%s") then - return true - else - return false - end -end - --- tab completion - -_G.tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t "" - elseif check_back_space() then - return t "" - else - return vim.fn["compe#complete"]() - end -end -_G.s_tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t "" - elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then - return t "(vsnip-jump-prev)" - else - return t "" - end -end - --- mappings - -vim.api.nvim_set_keymap("i", "", "v:lua.tab_complete()", {expr = true}) -vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", {expr = true}) -vim.api.nvim_set_keymap("i", "", "v:lua.s_tab_complete()", {expr = true}) -vim.api.nvim_set_keymap("s", "", "v:lua.s_tab_complete()", {expr = true}) - -function _G.completions() - local npairs = require("nvim-autopairs") - if vim.fn.pumvisible() == 1 then - if vim.fn.complete_info()["selected"] ~= -1 then - return vim.fn["compe#confirm"]("") - end - end - return npairs.check_break_line_char() -end - -vim.api.nvim_set_keymap("i", "", "v:lua.completions()", {expr = true}) +return M diff --git a/lua/mappings.lua b/lua/mappings.lua index 8d95498..433a06a 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -1,4 +1,4 @@ - local function map(mode, lhs, rhs, opts) +local function map(mode, lhs, rhs, opts) local options = {noremap = true} if opts then options = vim.tbl_extend("force", options, opts) @@ -8,7 +8,7 @@ end local opt = {} --- dont copy any deleted text , this is disabled by default so uncomment the below mappings if you want them! +-- dont copy any deleted text , this is disabled by default so uncomment the below mappings if you want them --[[ remove this line map("n", "dd", [=[ "_dd ]=], opt) @@ -16,18 +16,20 @@ map("v", "dd", [=[ "_dd ]=], opt) map("v", "x", [=[ "_x ]=], opt) this line too ]] +-- + -- OPEN TERMINALS -- map("n", "", [[vnew term://bash ]], opt) -- term over right map("n", "", [[ split term://bash | resize 10 ]], opt) -- term bottom map("n", "t", [[ tabnew | term ]], opt) -- term newtab --- COPY EVERYTHING -- +-- copy whole file content map("n", "", [[ %y+]], opt) --- toggle numbers --- +-- toggle numbers map("n", "n", [[ set nu!]], opt) --- toggle truezen.nvim's ataraxis and minimalist mode +-- Truezen.nvim map("n", "z", [[ TZAtaraxis]], opt) map("n", "m", [[ TZMinimalist]], opt) @@ -37,3 +39,55 @@ map("n", "", [[ w ]], opt) -- Commenter Keybinding map("n", "/", ":CommentToggle", {noremap = true, silent = true}) map("v", "/", ":CommentToggle", {noremap = true, silent = true}) + +-- compe stuff + +local t = function(str) + return vim.api.nvim_replace_termcodes(str, true, true, true) +end + +local check_back_space = function() + local col = vim.fn.col(".") - 1 + if col == 0 or vim.fn.getline("."):sub(col, col):match("%s") then + return true + else + return false + end +end + +_G.tab_complete = function() + if vim.fn.pumvisible() == 1 then + return t "" + elseif check_back_space() then + return t "" + else + return vim.fn["compe#complete"]() + end +end + +_G.s_tab_complete = function() + if vim.fn.pumvisible() == 1 then + return t "" + elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then + return t "(vsnip-jump-prev)" + else + return t "" + end +end + +function _G.completions() + local npairs = require("nvim-autopairs") + if vim.fn.pumvisible() == 1 then + if vim.fn.complete_info()["selected"] ~= -1 then + return vim.fn["compe#confirm"]("") + end + end + return npairs.check_break_line_char() +end + +-- compe mappings +map("i", "", "v:lua.tab_complete()", {expr = true}) +map("s", "", "v:lua.tab_complete()", {expr = true}) +map("i", "", "v:lua.s_tab_complete()", {expr = true}) +map("s", "", "v:lua.s_tab_complete()", {expr = true}) +map("i", "", "v:lua.completions()", {expr = true}) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 13d94d3..5f8f6d0 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -13,7 +13,16 @@ return packer.startup( -- lang stuff use "nvim-treesitter/nvim-treesitter" use "neovim/nvim-lspconfig" - use "hrsh7th/nvim-compe" + + -- loads compe and vsnip in insert mode only + use { + "hrsh7th/nvim-compe", + event = "InsertEnter", + config = function() + require("compe-completion").config() + end + } + use "onsails/lspkind-nvim" use "sbdchd/neoformat" use "nvim-lua/plenary.nvim" @@ -23,7 +32,7 @@ return packer.startup( use "akinsho/nvim-bufferline.lua" use "glepnir/galaxyline.nvim" use "windwp/nvim-autopairs" - use "alvan/vim-closetag" + -- use "alvan/vim-closetag" -- for html -- Comment use "terrortylor/nvim-comment" From 7464358bbf29e8ce4ca0a84e9de60263649dfa95 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 24 Jun 2021 22:51:39 +0530 Subject: [PATCH 0292/1541] lazy loading : vsnip --- lua/pluginList.lua | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 5f8f6d0..34fa61e 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -14,7 +14,7 @@ return packer.startup( use "nvim-treesitter/nvim-treesitter" use "neovim/nvim-lspconfig" - -- loads compe and vsnip in insert mode only + -- load compe in insert mode only use { "hrsh7th/nvim-compe", event = "InsertEnter", @@ -38,7 +38,10 @@ return packer.startup( use "terrortylor/nvim-comment" -- snippet support - use "hrsh7th/vim-vsnip" + use { + "hrsh7th/vim-vsnip", + event = "InsertCharPre" + } use "rafamadriz/friendly-snippets" -- file managing , picker etc @@ -51,7 +54,15 @@ return packer.startup( -- misc use "glepnir/dashboard-nvim" use "tweekmonster/startuptime.vim" - use "907th/vim-auto-save" + + -- load autosave plugin only if its globally enabled + use { + "907th/vim-auto-save", + cond = function() + return vim.g.auto_save == 1 + end + } + use "karb94/neoscroll.nvim" use "kdav5758/TrueZen.nvim" use "folke/which-key.nvim" From 922089fc071d4c7fbba95ae37640a4e93f143764 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 25 Jun 2021 21:36:13 +0530 Subject: [PATCH 0293/1541] lazy loading : treesitter --- init.lua | 1 - lua/pluginList.lua | 13 ++++++++++--- lua/treesitter-nvim.lua | 40 +++++++++++++++++++++++----------------- 3 files changed, 33 insertions(+), 21 deletions(-) diff --git a/init.lua b/init.lua index 0fc7f3b..747f9f3 100644 --- a/init.lua +++ b/init.lua @@ -36,7 +36,6 @@ g.indent_blankline_buftype_exclude = {"terminal"} g.indent_blankline_show_trailing_blankline_indent = false g.indent_blankline_show_first_indent_level = false -require "treesitter-nvim" require "mappings" require "telescope-nvim" diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 34fa61e..2b63744 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -11,7 +11,14 @@ return packer.startup( use "norcalli/nvim-colorizer.lua" -- lang stuff - use "nvim-treesitter/nvim-treesitter" + use { + "nvim-treesitter/nvim-treesitter", + event = "BufRead", + config = function() + require("treesitter-nvim").config() + end + } + use "neovim/nvim-lspconfig" -- load compe in insert mode only @@ -35,9 +42,9 @@ return packer.startup( -- use "alvan/vim-closetag" -- for html -- Comment - use "terrortylor/nvim-comment" + use "terrortylor/nvim-comment" -- snippet support - -- snippet support + -- snippet use { "hrsh7th/vim-vsnip", event = "InsertCharPre" diff --git a/lua/treesitter-nvim.lua b/lua/treesitter-nvim.lua index 5ee27c4..234f490 100644 --- a/lua/treesitter-nvim.lua +++ b/lua/treesitter-nvim.lua @@ -1,19 +1,25 @@ -local ts_config = require("nvim-treesitter.configs") +local M = {} -ts_config.setup { - ensure_installed = { - "javascript", - "html", - "css", - "bash", - "lua", - "json", - "python" - -- "rust", - -- "go" - }, - highlight = { - enable = true, - use_languagetree = true +M.config = function() + local ts_config = require("nvim-treesitter.configs") + + ts_config.setup { + ensure_installed = { + "javascript", + "html", + "css", + "bash", + "lua", + "json", + "python" + -- "rust", + -- "go" + }, + highlight = { + enable = true, + use_languagetree = true + } } -} +end + +return M From 4e23587ca3ea157589b14a9d9444aa07be2a5830 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 25 Jun 2021 23:06:17 +0530 Subject: [PATCH 0294/1541] lazy loading : nvimtree and autopairs --- init.lua | 2 - lua/mappings.lua | 11 +++ lua/nvimTree.lua | 163 ++++++++++++++++++++++----------------------- lua/pluginList.lua | 19 +++++- 4 files changed, 106 insertions(+), 89 deletions(-) diff --git a/init.lua b/init.lua index 747f9f3..0564ef8 100644 --- a/init.lua +++ b/init.lua @@ -39,12 +39,10 @@ g.indent_blankline_show_first_indent_level = false require "mappings" require "telescope-nvim" -require "nvimTree" -- file tree stuff require "file-icons" -- git signs , lsp symbols etc require "gitsigns-nvim" -require("nvim-autopairs").setup() require("lspkind").init() -- hide line numbers , statusline in specific buffers! diff --git a/lua/mappings.lua b/lua/mappings.lua index 433a06a..9309a68 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -91,3 +91,14 @@ map("s", "", "v:lua.tab_complete()", {expr = true}) map("i", "", "v:lua.s_tab_complete()", {expr = true}) map("s", "", "v:lua.s_tab_complete()", {expr = true}) map("i", "", "v:lua.completions()", {expr = true}) + +-- Mappings for nvimtree +vim.api.nvim_set_keymap( + "n", + "", + ":NvimTreeToggle", + { + noremap = true, + silent = true + } +) diff --git a/lua/nvimTree.lua b/lua/nvimTree.lua index 47f72ff..5479b86 100644 --- a/lua/nvimTree.lua +++ b/lua/nvimTree.lua @@ -1,93 +1,88 @@ -local g = vim.g +local M = {} -vim.o.termguicolors = true +M.config = function() + local g = vim.g -g.nvim_tree_side = "left" -g.nvim_tree_width = 25 -g.nvim_tree_ignore = {".git", "node_modules", ".cache"} -g.nvim_tree_auto_open = 0 -g.nvim_tree_auto_close = 0 -g.nvim_tree_quit_on_open = 0 -g.nvim_tree_follow = 1 -g.nvim_tree_indent_markers = 1 -g.nvim_tree_hide_dotfiles = 1 -g.nvim_tree_git_hl = 1 -g.nvim_tree_root_folder_modifier = ":t" -g.nvim_tree_tab_open = 0 -g.nvim_tree_allow_resize = 1 + vim.o.termguicolors = true -g.nvim_tree_show_icons = { - git = 1, - folders = 1, - files = 1 -} + g.nvim_tree_side = "left" + g.nvim_tree_width = 25 + g.nvim_tree_ignore = {".git", "node_modules", ".cache"} + g.nvim_tree_auto_open = 0 + g.nvim_tree_auto_close = 0 + g.nvim_tree_quit_on_open = 0 + g.nvim_tree_follow = 1 + g.nvim_tree_indent_markers = 1 + g.nvim_tree_hide_dotfiles = 1 + g.nvim_tree_git_hl = 1 + g.nvim_tree_root_folder_modifier = ":t" + g.nvim_tree_tab_open = 0 + g.nvim_tree_allow_resize = 1 -g.nvim_tree_icons = { - default = "", - symlink = "", - git = { - unstaged = "✗", - staged = "✓", - unmerged = "", - renamed = "➜", - untracked = "★", - deleted = "", - ignored = "◌" - }, - folder = { - default = "", - open = "", - symlink = "", - empty = "", - empty_open = "", - symlink_open = "" + g.nvim_tree_show_icons = { + git = 1, + folders = 1, + files = 1 } -} --- Mappings for nvimtree -vim.api.nvim_set_keymap( - "n", - "", - ":NvimTreeToggle", - { - noremap = true, - silent = true + g.nvim_tree_icons = { + default = "", + symlink = "", + git = { + unstaged = "✗", + staged = "✓", + unmerged = "", + renamed = "➜", + untracked = "★", + deleted = "", + ignored = "◌" + }, + folder = { + default = "", + open = "", + symlink = "", + empty = "", + empty_open = "", + symlink_open = "" + } } -) -local tree_cb = require "nvim-tree.config".nvim_tree_callback + local tree_cb = require "nvim-tree.config".nvim_tree_callback -g.nvim_tree_bindings = { - ["u"] = ":lua require'some_module'.some_function()", - -- default mappings - [""] = tree_cb("edit"), - ["o"] = tree_cb("edit"), - ["<2-LeftMouse>"] = tree_cb("edit"), - ["<2-RightMouse>"] = tree_cb("cd"), - [""] = tree_cb("cd"), - [""] = tree_cb("vsplit"), - [""] = tree_cb("split"), - [""] = tree_cb("tabnew"), - ["<"] = tree_cb("prev_sibling"), - [">"] = tree_cb("next_sibling"), - [""] = tree_cb("close_node"), - [""] = tree_cb("close_node"), - [""] = tree_cb("preview"), - ["I"] = tree_cb("toggle_ignored"), - ["H"] = tree_cb("toggle_dotfiles"), - ["R"] = tree_cb("refresh"), - ["a"] = tree_cb("create"), - ["d"] = tree_cb("remove"), - ["r"] = tree_cb("rename"), - [""] = tree_cb("full_rename"), - ["x"] = tree_cb("cut"), - ["c"] = tree_cb("copy"), - ["p"] = tree_cb("paste"), - ["y"] = tree_cb("copy_name"), - ["Y"] = tree_cb("copy_path"), - ["gy"] = tree_cb("copy_absolute_path"), - ["[c"] = tree_cb("prev_git_item"), - ["]c"] = tree_cb("next_git_item"), - ["-"] = tree_cb("dir_up"), - ["q"] = tree_cb("close") -} + g.nvim_tree_bindings = { + ["u"] = ":lua require'some_module'.some_function()", + -- default mappings + [""] = tree_cb("edit"), + ["o"] = tree_cb("edit"), + ["<2-LeftMouse>"] = tree_cb("edit"), + ["<2-RightMouse>"] = tree_cb("cd"), + [""] = tree_cb("cd"), + [""] = tree_cb("vsplit"), + [""] = tree_cb("split"), + [""] = tree_cb("tabnew"), + ["<"] = tree_cb("prev_sibling"), + [">"] = tree_cb("next_sibling"), + [""] = tree_cb("close_node"), + [""] = tree_cb("close_node"), + [""] = tree_cb("preview"), + ["I"] = tree_cb("toggle_ignored"), + ["H"] = tree_cb("toggle_dotfiles"), + ["R"] = tree_cb("refresh"), + ["a"] = tree_cb("create"), + ["d"] = tree_cb("remove"), + ["r"] = tree_cb("rename"), + [""] = tree_cb("full_rename"), + ["x"] = tree_cb("cut"), + ["c"] = tree_cb("copy"), + ["p"] = tree_cb("paste"), + ["y"] = tree_cb("copy_name"), + ["Y"] = tree_cb("copy_path"), + ["gy"] = tree_cb("copy_absolute_path"), + ["[c"] = tree_cb("prev_git_item"), + ["]c"] = tree_cb("next_git_item"), + ["-"] = tree_cb("dir_up"), + ["q"] = tree_cb("close") + } +end + +return M diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 2b63744..28000eb 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -38,10 +38,16 @@ return packer.startup( use "lewis6991/gitsigns.nvim" use "akinsho/nvim-bufferline.lua" use "glepnir/galaxyline.nvim" - use "windwp/nvim-autopairs" + + use { + "windwp/nvim-autopairs", + event = "InsertEnter", + config = function() + require("nvim-autopairs").setup() + end + } -- use "alvan/vim-closetag" -- for html - -- Comment use "terrortylor/nvim-comment" -- snippet support -- snippet @@ -52,7 +58,14 @@ return packer.startup( use "rafamadriz/friendly-snippets" -- file managing , picker etc - use "kyazdani42/nvim-tree.lua" + use { + "kyazdani42/nvim-tree.lua", + cmd = "NvimTreeToggle", + config = function() + require("nvimTree").config() + end + } + use "kyazdani42/nvim-web-devicons" use "nvim-telescope/telescope.nvim" use "nvim-telescope/telescope-media-files.nvim" From 5f676ffbdb5a2925f8cd547cdd4aaa9ff112de59 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 07:35:33 +0530 Subject: [PATCH 0295/1541] Update install.sh --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index e1395a9..3069243 100755 --- a/install.sh +++ b/install.sh @@ -53,5 +53,5 @@ echo "shell changed to $shellname on nvim successfully!" echo echo "neovim will open with some errors , just press enter" && sleep 1 -# install all plugins -nvim +PackerInstall +# install all plugins + compile them +nvim +PackerSync From e2717401fe68a0bd0a3e4c0f66560b9be2ac6bf9 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 07:31:15 +0530 Subject: [PATCH 0296/1541] lazy load neoformat + lspkind ( run :PackerSync and :PackerCompile ) --- init.lua | 3 --- lua/mappings.lua | 4 +++- lua/pluginList.lua | 15 +++++++++++++-- lua/telescope-nvim.lua | 1 - 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index 0564ef8..d9f190c 100644 --- a/init.lua +++ b/init.lua @@ -40,10 +40,7 @@ require "mappings" require "telescope-nvim" require "file-icons" - --- git signs , lsp symbols etc require "gitsigns-nvim" -require("lspkind").init() -- hide line numbers , statusline in specific buffers! vim.api.nvim_exec( diff --git a/lua/mappings.lua b/lua/mappings.lua index 9309a68..5f886c2 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -93,7 +93,7 @@ map("s", "", "v:lua.s_tab_complete()", {expr = true}) map("i", "", "v:lua.completions()", {expr = true}) -- Mappings for nvimtree -vim.api.nvim_set_keymap( +map( "n", "", ":NvimTreeToggle", @@ -102,3 +102,5 @@ vim.api.nvim_set_keymap( silent = true } ) + +map("n", "fm", [[ Neoformat]], opt) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 28000eb..ed359ff 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -30,8 +30,19 @@ return packer.startup( end } - use "onsails/lspkind-nvim" - use "sbdchd/neoformat" + use { + "onsails/lspkind-nvim", + event = "BufRead", + config = function() + require("lspkind").init() + end + } + + use { + "sbdchd/neoformat", + cmd = "Neoformat" + } + use "nvim-lua/plenary.nvim" use "kabouzeid/nvim-lspinstall" diff --git a/lua/telescope-nvim.lua b/lua/telescope-nvim.lua index 77182c5..7511156 100644 --- a/lua/telescope-nvim.lua +++ b/lua/telescope-nvim.lua @@ -72,7 +72,6 @@ vim.api.nvim_set_keymap( vim.api.nvim_set_keymap("n", "fb", [[lua require('telescope.builtin').buffers()]], opt) vim.api.nvim_set_keymap("n", "fh", [[lua require('telescope.builtin').help_tags()]], opt) vim.api.nvim_set_keymap("n", "fo", [[lua require('telescope.builtin').oldfiles()]], opt) -vim.api.nvim_set_keymap("n", "fm", [[ Neoformat]], opt) -- dashboard stuff vim.api.nvim_set_keymap("n", "fw", [[ Telescope live_grep]], opt) From dcc04837d4f2479f8b31e728a59f93ab27d58903 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 07:38:44 +0530 Subject: [PATCH 0297/1541] disable some inbuilt plugins --- lua/misc-utils.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index 40f27cc..c3bd7fd 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -35,6 +35,19 @@ opt("b", "expandtab", true) opt("b", "shiftwidth", 2) opt("b", "smartindent", true) +-- disable builtin vim plugins + +vim.g.loaded_gzip = 0 +vim.g.loaded_tar = 0 +vim.g.loaded_tarPlugin = 0 +vim.g.loaded_zipPlugin = 0 +vim.g.loaded_2html_plugin = 1 +vim.g.loaded_netrw = 0 +vim.g.loaded_netrwPlugin = 0 +vim.g.loaded_matchit = 1 +vim.g.loaded_matchparen = 1 +vim.g.loaded_spec = 1 + local M = {} function M.is_buffer_empty() @@ -46,6 +59,7 @@ function M.has_width_gt(cols) -- Check if the windows width is greater than a given number of columns return vim.fn.winwidth(0) / 2 > cols end + -- file extension specific tabbing -vim.cmd([[autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]]) +-- vim.cmd([[autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]]) return M From b42f4778f96a3069ee349be55dd6ec5d5706d915 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 07:40:23 +0530 Subject: [PATCH 0298/1541] lazy load dashboard --- init.lua | 1 - lua/dashboard.lua | 71 +++++++++++++++++++++++------------------- lua/mappings.lua | 7 +++++ lua/pluginList.lua | 13 +++++++- lua/telescope-nvim.lua | 8 ----- 5 files changed, 58 insertions(+), 42 deletions(-) diff --git a/init.lua b/init.lua index d9f190c..2a83c44 100644 --- a/init.lua +++ b/init.lua @@ -54,5 +54,4 @@ vim.api.nvim_exec( require "zenmode" require "whichkey" -require "dashboard" require("nvim_comment").setup() diff --git a/lua/dashboard.lua b/lua/dashboard.lua index b9dff2a..5fda4c7 100644 --- a/lua/dashboard.lua +++ b/lua/dashboard.lua @@ -1,35 +1,42 @@ -local g = vim.g +local M = {} -g.dashboard_disable_statusline = 1 -g.dashboard_default_executive = "telescope" -g.dashboard_custom_header = { - " ", - " ", - " ", - " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", - " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", - " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", - " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", - " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", - " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", - " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", - " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", - " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", - " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", - " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", - " " -} +M.config = function() + local g = vim.g -g.dashboard_custom_section = { - a = {description = {" Find File SPC f f"}, command = "Telescope find_files"}, - b = {description = {" Recents SPC f o"}, command = "Telescope oldfiles"}, - c = {description = {" Find Word SPC f w"}, command = "Telescope live_grep"}, - d = {description = {"洛 New File SPC f n"}, command = "DashboardNewFile"}, - e = {description = {" Bookmarks SPC b m"}, command = "Telescope marks"}, - f = {description = {" Load Last Session SPC s l"}, command = "SessionLoad"} -} + g.dashboard_disable_at_vimenter = 1 -- dashboard is disabled by default + g.dashboard_disable_statusline = 1 + g.dashboard_default_executive = "telescope" + g.dashboard_custom_header = { + " ", + " ", + " ", + " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", + " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", + " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", + " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", + " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", + " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", + " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", + " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", + " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", + " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", + " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", + " " + } -g.dashboard_custom_footer = { - " ", - "NvChad v0.5" -} + g.dashboard_custom_section = { + a = {description = {" Find File SPC f f"}, command = "Telescope find_files"}, + b = {description = {" Recents SPC f o"}, command = "Telescope oldfiles"}, + c = {description = {" Find Word SPC f w"}, command = "Telescope live_grep"}, + d = {description = {"洛 New File SPC f n"}, command = "DashboardNewFile"}, + e = {description = {" Bookmarks SPC b m"}, command = "Telescope marks"}, + f = {description = {" Load Last Session SPC s l"}, command = "SessionLoad"} + } + + g.dashboard_custom_footer = { + " ", + "NvChad v0.5" + } +end + +return M diff --git a/lua/mappings.lua b/lua/mappings.lua index 5f886c2..cf0fb41 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -104,3 +104,10 @@ map( ) map("n", "fm", [[ Neoformat]], opt) + +-- dashboard stuff +map("n", "fw", [[ Telescope live_grep]], opt) +map("n", "fn", [[ DashboardNewFile]], opt) +map("n", "bm", [[ DashboardJumpMarks]], opt) +map("n", "sl", [[ SessionLoad]], opt) +map("n", "ss", [[ SessionSave]], opt) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index ed359ff..486fe7f 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -83,7 +83,18 @@ return packer.startup( use "nvim-lua/popup.nvim" -- misc - use "glepnir/dashboard-nvim" + use { + "glepnir/dashboard-nvim", + cmd = { + "Telescope live_grep", + "DashboardNewFile", + "DashboardJumpMarks" + }, + setup = function() + require("dashboard").config() + end + } + use "tweekmonster/startuptime.vim" -- load autosave plugin only if its globally enabled diff --git a/lua/telescope-nvim.lua b/lua/telescope-nvim.lua index 7511156..58eebca 100644 --- a/lua/telescope-nvim.lua +++ b/lua/telescope-nvim.lua @@ -68,14 +68,6 @@ vim.api.nvim_set_keymap( [[lua require('telescope').extensions.media_files.media_files()]], opt ) - vim.api.nvim_set_keymap("n", "fb", [[lua require('telescope.builtin').buffers()]], opt) vim.api.nvim_set_keymap("n", "fh", [[lua require('telescope.builtin').help_tags()]], opt) vim.api.nvim_set_keymap("n", "fo", [[lua require('telescope.builtin').oldfiles()]], opt) - --- dashboard stuff -vim.api.nvim_set_keymap("n", "fw", [[ Telescope live_grep]], opt) -vim.api.nvim_set_keymap("n", "fn", [[ DashboardNewFile]], opt) -vim.api.nvim_set_keymap("n", "bm", [[ DashboardJumpMarks]], opt) -vim.api.nvim_set_keymap("n", "sl", [[ SessionLoad]], opt) -vim.api.nvim_set_keymap("n", "ss", [[ SessionSave]], opt) From 4c96c28c2d2aca9e9113fff1b3cc702eaa66812d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 07:43:35 +0530 Subject: [PATCH 0299/1541] lazy load blankline --- init.lua | 12 ------------ lua/pluginList.lua | 18 ++++++++++++++++-- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/init.lua b/init.lua index 2a83c44..bcdf14b 100644 --- a/init.lua +++ b/init.lua @@ -25,19 +25,7 @@ base16(base16.themes["onedark"], true) require "highlights" --- blankline - -g.indentLine_enabled = 1 -g.indent_blankline_char = "▏" - -g.indent_blankline_filetype_exclude = {"help", "terminal", "dashboard"} -g.indent_blankline_buftype_exclude = {"terminal"} - -g.indent_blankline_show_trailing_blankline_indent = false -g.indent_blankline_show_first_indent_level = false - require "mappings" - require "telescope-nvim" require "file-icons" require "gitsigns-nvim" diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 486fe7f..39cdde1 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -1,7 +1,6 @@ local packer = require("packer") local use = packer.use --- using { } for using different branch , loading plugin with certain commands etc return packer.startup( function() use "wbthomason/packer.nvim" @@ -108,7 +107,22 @@ return packer.startup( use "karb94/neoscroll.nvim" use "kdav5758/TrueZen.nvim" use "folke/which-key.nvim" - use {"lukas-reineke/indent-blankline.nvim", branch = "lua"} + + use { + "lukas-reineke/indent-blankline.nvim", + branch = "lua", + event = "BufRead", + setup = function() + vim.g.indentLine_enabled = 1 + vim.g.indent_blankline_char = "▏" + + vim.g.indent_blankline_filetype_exclude = {"help", "terminal", "dashboard"} + vim.g.indent_blankline_buftype_exclude = {"terminal"} + + vim.g.indent_blankline_show_trailing_blankline_indent = false + vim.g.indent_blankline_show_first_indent_level = false + end + } end, { display = { From 247e6e06c57ecdc3da038668035d04fca993608f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 07:45:42 +0530 Subject: [PATCH 0300/1541] lazy load gitsigns --- init.lua | 1 - lua/gitsigns-nvim.lua | 60 ++++++++++++++++++++++++------------------- lua/pluginList.lua | 9 ++++++- 3 files changed, 41 insertions(+), 29 deletions(-) diff --git a/init.lua b/init.lua index bcdf14b..8433023 100644 --- a/init.lua +++ b/init.lua @@ -28,7 +28,6 @@ require "highlights" require "mappings" require "telescope-nvim" require "file-icons" -require "gitsigns-nvim" -- hide line numbers , statusline in specific buffers! vim.api.nvim_exec( diff --git a/lua/gitsigns-nvim.lua b/lua/gitsigns-nvim.lua index 1fa4325..85973e2 100644 --- a/lua/gitsigns-nvim.lua +++ b/lua/gitsigns-nvim.lua @@ -1,27 +1,33 @@ -require("gitsigns").setup { - signs = { - add = {hl = "DiffAdd", text = "▌", numhl = "GitSignsAddNr"}, - change = {hl = "DiffChange", text = "▌", numhl = "GitSignsChangeNr"}, - delete = {hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr"}, - topdelete = {hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr"}, - changedelete = {hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr"} - }, - numhl = false, - keymaps = { - -- Default keymap options - noremap = true, - buffer = true, - ["n ]c"] = {expr = true, '&diff ? \']c\' : \'lua require"gitsigns".next_hunk()\''}, - ["n [c"] = {expr = true, '&diff ? \'[c\' : \'lua require"gitsigns".prev_hunk()\''}, - ["n hs"] = 'lua require"gitsigns".stage_hunk()', - ["n hu"] = 'lua require"gitsigns".undo_stage_hunk()', - ["n hr"] = 'lua require"gitsigns".reset_hunk()', - ["n hp"] = 'lua require"gitsigns".preview_hunk()', - ["n hb"] = 'lua require"gitsigns".blame_line()' - }, - watch_index = { - interval = 100 - }, - sign_priority = 5, - status_formatter = nil -- Use default -} +local M = {} + +M.config = function() + require("gitsigns").setup { + signs = { + add = {hl = "DiffAdd", text = "▌", numhl = "GitSignsAddNr"}, + change = {hl = "DiffChange", text = "▌", numhl = "GitSignsChangeNr"}, + delete = {hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr"}, + topdelete = {hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr"}, + changedelete = {hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr"} + }, + numhl = false, + keymaps = { + -- Default keymap options + noremap = true, + buffer = true, + ["n ]c"] = {expr = true, '&diff ? \']c\' : \'lua require"gitsigns".next_hunk()\''}, + ["n [c"] = {expr = true, '&diff ? \'[c\' : \'lua require"gitsigns".prev_hunk()\''}, + ["n hs"] = 'lua require"gitsigns".stage_hunk()', + ["n hu"] = 'lua require"gitsigns".undo_stage_hunk()', + ["n hr"] = 'lua require"gitsigns".reset_hunk()', + ["n hp"] = 'lua require"gitsigns".preview_hunk()', + ["n hb"] = 'lua require"gitsigns".blame_line()' + }, + watch_index = { + interval = 100 + }, + sign_priority = 5, + status_formatter = nil -- Use default + } +end + +return M diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 39cdde1..8ece11f 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -45,7 +45,14 @@ return packer.startup( use "nvim-lua/plenary.nvim" use "kabouzeid/nvim-lspinstall" - use "lewis6991/gitsigns.nvim" + use { + "lewis6991/gitsigns.nvim", + event = "BufRead", + config = function() + require("gitsigns-nvim").config() + end + } + use "akinsho/nvim-bufferline.lua" use "glepnir/galaxyline.nvim" From f900ecaed3b31d33bb69bd4ce90bcf11661a5aec Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 07:50:10 +0530 Subject: [PATCH 0301/1541] lazy load colorizer , nvim-commet --- init.lua | 2 -- lua/pluginList.lua | 21 +++++++++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index 8433023..79d7198 100644 --- a/init.lua +++ b/init.lua @@ -5,7 +5,6 @@ require "misc-utils" require "top-bufferline" require "statusline" -require("colorizer").setup() require("neoscroll").setup() -- smooth scroll -- lsp stuff @@ -41,4 +40,3 @@ vim.api.nvim_exec( require "zenmode" require "whichkey" -require("nvim_comment").setup() diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 8ece11f..6615f4c 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -7,7 +7,14 @@ return packer.startup( -- color related stuff use "siduck76/nvim-base16.lua" - use "norcalli/nvim-colorizer.lua" + + use { + "norcalli/nvim-colorizer.lua", + event = "BufRead", + config = function() + require("colorizer").setup() + end + } -- lang stuff use { @@ -63,11 +70,16 @@ return packer.startup( require("nvim-autopairs").setup() end } - -- use "alvan/vim-closetag" -- for html - use "terrortylor/nvim-comment" -- snippet support + use { + "terrortylor/nvim-comment", + cmd = "CommentToggle", + config = function() + require("nvim_comment").setup() + end + } - -- snippet + -- snippet support use { "hrsh7th/vim-vsnip", event = "InsertCharPre" @@ -114,6 +126,7 @@ return packer.startup( use "karb94/neoscroll.nvim" use "kdav5758/TrueZen.nvim" use "folke/which-key.nvim" + -- use "alvan/vim-closetag" -- for html use { "lukas-reineke/indent-blankline.nvim", From 193a8523359b4b96184189dad15cc74d31952b1d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 07:52:48 +0530 Subject: [PATCH 0302/1541] lazy load truezen.nvim --- init.lua | 1 - lua/misc-utils.lua | 4 -- lua/pluginList.lua | 10 ++++- lua/zenmode.lua | 96 ++++++++++++++++++++++++---------------------- 4 files changed, 60 insertions(+), 51 deletions(-) diff --git a/init.lua b/init.lua index 79d7198..9ae56de 100644 --- a/init.lua +++ b/init.lua @@ -38,5 +38,4 @@ vim.api.nvim_exec( false ) -require "zenmode" require "whichkey" diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index c3bd7fd..59a089c 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -41,12 +41,8 @@ vim.g.loaded_gzip = 0 vim.g.loaded_tar = 0 vim.g.loaded_tarPlugin = 0 vim.g.loaded_zipPlugin = 0 -vim.g.loaded_2html_plugin = 1 vim.g.loaded_netrw = 0 vim.g.loaded_netrwPlugin = 0 -vim.g.loaded_matchit = 1 -vim.g.loaded_matchparen = 1 -vim.g.loaded_spec = 1 local M = {} diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 6615f4c..4a3c8d1 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -124,7 +124,15 @@ return packer.startup( } use "karb94/neoscroll.nvim" - use "kdav5758/TrueZen.nvim" + + use { + "kdav5758/TrueZen.nvim", + cmd = {"TZAtaraxis", "TZMinimalist"}, + config = function() + require("zenmode").config() + end + } + use "folke/which-key.nvim" -- use "alvan/vim-closetag" -- for html diff --git a/lua/zenmode.lua b/lua/zenmode.lua index b9d49ff..d1b14b3 100644 --- a/lua/zenmode.lua +++ b/lua/zenmode.lua @@ -1,47 +1,53 @@ -local true_zen = require("true-zen") +local M = {} -true_zen.setup( - { - true_false_commands = false, - cursor_by_mode = false, - before_minimalist_mode_shown = true, - before_minimalist_mode_hidden = true, - after_minimalist_mode_shown = true, - after_minimalist_mode_hidden = true, - bottom = { - hidden_laststatus = 0, - hidden_ruler = false, - hidden_showmode = false, - hidden_showcmd = false, - hidden_cmdheight = 1, - shown_laststatus = 2, - shown_ruler = true, - shown_showmode = false, - shown_showcmd = false, - shown_cmdheight = 1 - }, - top = { - hidden_showtabline = 0, - shown_showtabline = 2 - }, - left = { - hidden_number = false, - hidden_relativenumber = false, - hidden_signcolumn = "no", - shown_number = true, - shown_relativenumber = false, - shown_signcolumn = "yes" - }, - ataraxis = { - just_do_it_for_me = false, - left_padding = 37, - right_padding = 37, - top_padding = 2, - bottom_padding = 2, - custome_bg = "#1e222a" - }, - integrations = { - integration_galaxyline = true +M.config = function() + local true_zen = require("true-zen") + + true_zen.setup( + { + true_false_commands = false, + cursor_by_mode = false, + before_minimalist_mode_shown = true, + before_minimalist_mode_hidden = true, + after_minimalist_mode_shown = true, + after_minimalist_mode_hidden = true, + bottom = { + hidden_laststatus = 0, + hidden_ruler = false, + hidden_showmode = false, + hidden_showcmd = false, + hidden_cmdheight = 1, + shown_laststatus = 2, + shown_ruler = true, + shown_showmode = false, + shown_showcmd = false, + shown_cmdheight = 1 + }, + top = { + hidden_showtabline = 0, + shown_showtabline = 2 + }, + left = { + hidden_number = false, + hidden_relativenumber = false, + hidden_signcolumn = "no", + shown_number = true, + shown_relativenumber = false, + shown_signcolumn = "yes" + }, + ataraxis = { + just_do_it_for_me = false, + left_padding = 37, + right_padding = 37, + top_padding = 2, + bottom_padding = 2, + custome_bg = "#1e222a" + }, + integrations = { + integration_galaxyline = true + } } - } -) + ) +end + +return M From 2f238742d2995011e769e029ef232c4842a694d7 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 07:54:10 +0530 Subject: [PATCH 0303/1541] add vim-matchup , lazy load some plugins --- init.lua | 2 -- lua/misc-utils.lua | 4 ++++ lua/pluginList.lua | 16 ++++++++++++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 9ae56de..86c4cfa 100644 --- a/init.lua +++ b/init.lua @@ -5,8 +5,6 @@ require "misc-utils" require "top-bufferline" require "statusline" -require("neoscroll").setup() -- smooth scroll - -- lsp stuff require "nvim-lspconfig" diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index 59a089c..1d2b17e 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -41,8 +41,12 @@ vim.g.loaded_gzip = 0 vim.g.loaded_tar = 0 vim.g.loaded_tarPlugin = 0 vim.g.loaded_zipPlugin = 0 +vim.g.loaded_2html_plugin = 0 vim.g.loaded_netrw = 0 vim.g.loaded_netrwPlugin = 0 +vim.g.loaded_matchit = 0 +vim.g.loaded_matchparen = 0 +vim.g.loaded_spec = 0 local M = {} diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 4a3c8d1..e7eff44 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -71,6 +71,11 @@ return packer.startup( end } + use { + "andymass/vim-matchup", + event = "CursorMoved" + } + use { "terrortylor/nvim-comment", cmd = "CommentToggle", @@ -113,7 +118,7 @@ return packer.startup( end } - use "tweekmonster/startuptime.vim" + use {"tweekmonster/startuptime.vim", cmd = "StartupTime"} -- load autosave plugin only if its globally enabled use { @@ -123,7 +128,14 @@ return packer.startup( end } - use "karb94/neoscroll.nvim" + -- smooth scroll + use { + "karb94/neoscroll.nvim", + event = "WinScrolled", + config = function() + require("neoscroll").setup() + end + } use { "kdav5758/TrueZen.nvim", From 0e9b3832ae22ba484c6c758e85d6b5d422aa27f9 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 07:57:09 +0530 Subject: [PATCH 0304/1541] lazy load lspconfig :D --- init.lua | 3 - lua/nvim-lspconfig.lua | 158 +++++++++++++++++++++-------------------- lua/pluginList.lua | 96 +++++++++++++------------ 3 files changed, 132 insertions(+), 125 deletions(-) diff --git a/init.lua b/init.lua index 86c4cfa..2f5d9e8 100644 --- a/init.lua +++ b/init.lua @@ -5,9 +5,6 @@ require "misc-utils" require "top-bufferline" require "statusline" --- lsp stuff -require "nvim-lspconfig" - local cmd = vim.cmd local g = vim.g diff --git a/lua/nvim-lspconfig.lua b/lua/nvim-lspconfig.lua index 4cc3828..a303565 100644 --- a/lua/nvim-lspconfig.lua +++ b/lua/nvim-lspconfig.lua @@ -1,90 +1,94 @@ -function on_attach(client, bufnr) - local function buf_set_keymap(...) - vim.api.nvim_buf_set_keymap(bufnr, ...) - end - local function buf_set_option(...) - vim.api.nvim_buf_set_option(bufnr, ...) +local M = {} + +M.config = function() + function on_attach(client, bufnr) + local function buf_set_keymap(...) + vim.api.nvim_buf_set_keymap(bufnr, ...) + end + local function buf_set_option(...) + vim.api.nvim_buf_set_option(bufnr, ...) + end + + buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") + + -- Mappings. + local opts = {noremap = true, silent = true} + + buf_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) + buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) + buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()", opts) + buf_set_keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) + buf_set_keymap("n", "", "lua vim.lsp.buf.signature_help()", opts) + buf_set_keymap("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) + buf_set_keymap("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) + buf_set_keymap("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) + buf_set_keymap("n", "D", "lua vim.lsp.buf.type_definition()", opts) + buf_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", opts) + buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()", opts) + buf_set_keymap("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) + buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) + buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) + buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) + + -- Set some keybinds conditional on server capabilities + if client.resolved_capabilities.document_formatting then + buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) + elseif client.resolved_capabilities.document_range_formatting then + buf_set_keymap("n", "f", "lua vim.lsp.buf.range_formatting()", opts) + end end - buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") + -- lspInstall + lspconfig stuff - -- Mappings. - local opts = {noremap = true, silent = true} + local function setup_servers() + require "lspinstall".setup() - buf_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) - buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) - buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()", opts) - buf_set_keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) - buf_set_keymap("n", "", "lua vim.lsp.buf.signature_help()", opts) - buf_set_keymap("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) - buf_set_keymap("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) - buf_set_keymap("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) - buf_set_keymap("n", "D", "lua vim.lsp.buf.type_definition()", opts) - buf_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", opts) - buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()", opts) - buf_set_keymap("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) - buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) - buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) - buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) + local lspconf = require("lspconfig") + local servers = require "lspinstall".installed_servers() - -- Set some keybinds conditional on server capabilities - if client.resolved_capabilities.document_formatting then - buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) - elseif client.resolved_capabilities.document_range_formatting then - buf_set_keymap("n", "f", "lua vim.lsp.buf.range_formatting()", opts) - end -end - --- lspInstall + lspconfig stuff - -local function setup_servers() - require "lspinstall".setup() - - local lspconf = require("lspconfig") - local servers = require "lspinstall".installed_servers() - - for _, lang in pairs(servers) do - if lang ~= "lua" then - lspconf[lang].setup { - on_attach = on_attach, - root_dir = vim.loop.cwd - } - elseif lang == "lua" then - lspconf[lang].setup { - root_dir = function() - return vim.loop.cwd() - end, - settings = { - Lua = { - diagnostics = { - globals = {"vim"} - }, - workspace = { - library = { - [vim.fn.expand("$VIMRUNTIME/lua")] = true, - [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true + for _, lang in pairs(servers) do + if lang ~= "lua" then + lspconf[lang].setup { + on_attach = on_attach, + root_dir = vim.loop.cwd + } + elseif lang == "lua" then + lspconf[lang].setup { + root_dir = vim.loop.cwd, + settings = { + Lua = { + diagnostics = { + globals = {"vim"} + }, + workspace = { + library = { + [vim.fn.expand("$VIMRUNTIME/lua")] = true, + [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true + } + }, + telemetry = { + enable = false } - }, - telemetry = { - enable = false } } } - } + end end end + + setup_servers() + + -- Automatically reload after `:LspInstall ` so we don't have to restart neovim + require "lspinstall".post_install_hook = function() + setup_servers() -- reload installed servers + vim.cmd("bufdo e") -- triggers FileType autocmd that starts the server + end + + -- replace the default lsp diagnostic letters with prettier symbols + vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnosticsDefaultError"}) + vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"}) + vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"}) + vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"}) end -setup_servers() - --- Automatically reload after `:LspInstall ` so we don't have to restart neovim -require "lspinstall".post_install_hook = function() - setup_servers() -- reload installed servers - vim.cmd("bufdo e") -- this triggers the FileType autocmd that starts the server -end - --- replace the default lsp diagnostic letters with prettier symbols -vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnosticsDefaultError"}) -vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"}) -vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"}) -vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"}) +return M diff --git a/lua/pluginList.lua b/lua/pluginList.lua index e7eff44..37a2cce 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -5,9 +5,11 @@ return packer.startup( function() use "wbthomason/packer.nvim" + use "akinsho/nvim-bufferline.lua" + use "glepnir/galaxyline.nvim" + -- color related stuff use "siduck76/nvim-base16.lua" - use { "norcalli/nvim-colorizer.lua", event = "BufRead", @@ -16,7 +18,7 @@ return packer.startup( end } - -- lang stuff + -- language related plugins use { "nvim-treesitter/nvim-treesitter", event = "BufRead", @@ -25,7 +27,23 @@ return packer.startup( end } - use "neovim/nvim-lspconfig" + use { + "neovim/nvim-lspconfig", + event = "BufRead", + config = function() + require("nvim-lspconfig").config() + end + } + + use "kabouzeid/nvim-lspinstall" + + use { + "onsails/lspkind-nvim", + event = "BufRead", + config = function() + require("lspkind").init() + end + } -- load compe in insert mode only use { @@ -36,53 +54,12 @@ return packer.startup( end } - use { - "onsails/lspkind-nvim", - event = "BufRead", - config = function() - require("lspkind").init() - end - } - use { "sbdchd/neoformat", cmd = "Neoformat" } use "nvim-lua/plenary.nvim" - use "kabouzeid/nvim-lspinstall" - - use { - "lewis6991/gitsigns.nvim", - event = "BufRead", - config = function() - require("gitsigns-nvim").config() - end - } - - use "akinsho/nvim-bufferline.lua" - use "glepnir/galaxyline.nvim" - - use { - "windwp/nvim-autopairs", - event = "InsertEnter", - config = function() - require("nvim-autopairs").setup() - end - } - - use { - "andymass/vim-matchup", - event = "CursorMoved" - } - - use { - "terrortylor/nvim-comment", - cmd = "CommentToggle", - config = function() - require("nvim_comment").setup() - end - } -- snippet support use { @@ -105,7 +82,36 @@ return packer.startup( use "nvim-telescope/telescope-media-files.nvim" use "nvim-lua/popup.nvim" - -- misc + -- misc plugins + use { + "lewis6991/gitsigns.nvim", + event = "BufRead", + config = function() + require("gitsigns-nvim").config() + end + } + + use { + "windwp/nvim-autopairs", + event = "InsertEnter", + config = function() + require("nvim-autopairs").setup() + end + } + + use { + "andymass/vim-matchup", + event = "CursorMoved" + } + + use { + "terrortylor/nvim-comment", + cmd = "CommentToggle", + config = function() + require("nvim_comment").setup() + end + } + use { "glepnir/dashboard-nvim", cmd = { From 900fb9e8f1b6f8afe0b853699274be805ae97a5d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 07:59:33 +0530 Subject: [PATCH 0305/1541] rm whichkey --- init.lua | 2 -- lua/misc-utils.lua | 1 - lua/pluginList.lua | 3 +-- lua/whichkey.lua | 45 --------------------------------------------- 4 files changed, 1 insertion(+), 50 deletions(-) delete mode 100644 lua/whichkey.lua diff --git a/init.lua b/init.lua index 2f5d9e8..282f14a 100644 --- a/init.lua +++ b/init.lua @@ -32,5 +32,3 @@ vim.api.nvim_exec( ]], false ) - -require "whichkey" diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index 1d2b17e..e1ca356 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -23,7 +23,6 @@ opt("o", "cmdheight", 1) opt("o", "updatetime", 250) -- update interval for gitsigns opt("o", "clipboard", "unnamedplus") -opt("o", "timeoutlen", 500) -- Numbers opt("w", "number", true) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 37a2cce..7fb2c95 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -151,8 +151,7 @@ return packer.startup( end } - use "folke/which-key.nvim" - -- use "alvan/vim-closetag" -- for html + -- use "alvan/vim-closetag" -- for html autoclosing tag use { "lukas-reineke/indent-blankline.nvim", diff --git a/lua/whichkey.lua b/lua/whichkey.lua deleted file mode 100644 index fdd38a5..0000000 --- a/lua/whichkey.lua +++ /dev/null @@ -1,45 +0,0 @@ -require("which-key").setup { - plugins = { - marks = true, -- shows a list of your marks on ' and ` - registers = true, -- shows your registers on " in NORMAL or in INSERT mode - -- the presets plugin, adds help for a bunch of default keybindings in Neovim - -- No actual key bindings are created - spelling = { - enabled = false, -- enabling this will show WhichKey when pressing z= to select spelling suggestions - suggestions = 20 -- how many suggestions should be shown in the list? - }, - presets = { - operators = true, -- adds help for operators like d, y, ... and registers them for motion / text object completion - motions = true, -- adds help for motions - text_objects = true, -- help for text objects triggered after entering an operator - windows = true, -- default bindings on - nav = true, -- misc bindings to work with windows - z = true, -- bindings for folds, spelling and others prefixed with z - g = true -- bindings for prefixed with g - } - }, - -- add operators that will trigger motion and text object completion - -- to enable all native operators, set the preset / operators plugin above - operators = {gc = "Comments"}, - icons = { - breadcrumb = "»", -- symbol used in the command line area that shows your active key combo - separator = "➜", -- symbol used between a key and it's label - group = "+" -- symbol prepended to a group - }, - window = { - border = "none", -- none, single, double, shadow - position = "bottom", -- bottom, top - margin = {1, 0, 1, 0}, -- extra window margin [top, right, bottom, left] - padding = {2, 2, 2, 2} -- extra window padding [top, right, bottom, left] - }, - layout = { - height = {min = 4, max = 25}, -- min and max height of the columns - width = {min = 20, max = 50}, -- min and max width of the columns - spacing = 3 -- spacing between columns - }, - ignore_missing = false, -- enable this to hide mappings for which you didn't specify a label - hidden = {"", "", "", "", "call", "lua", "^:", "^ "}, -- hide mapping boilerplate - show_help = true, -- show help message on the command line when the popup is visible - triggers = "auto" -- automatically setup triggers - -- triggers = {""} -- or specifiy a list manually -} From 47e062eb7346600cd07b6c8a19b8dc5bbd74818a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 08:01:09 +0530 Subject: [PATCH 0306/1541] rm lazy loading for colorizer --- init.lua | 2 +- lua/pluginList.lua | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index 282f14a..464c077 100644 --- a/init.lua +++ b/init.lua @@ -18,7 +18,7 @@ local base16 = require "base16" base16(base16.themes["onedark"], true) require "highlights" - +require("colorizer").setup() require "mappings" require "telescope-nvim" require "file-icons" diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 7fb2c95..80538e9 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -10,13 +10,7 @@ return packer.startup( -- color related stuff use "siduck76/nvim-base16.lua" - use { - "norcalli/nvim-colorizer.lua", - event = "BufRead", - config = function() - require("colorizer").setup() - end - } + use "norcalli/nvim-colorizer.lua" -- language related plugins use { From 685044335bbc09bb7309145b993250c7f183965a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 08:03:29 +0530 Subject: [PATCH 0307/1541] use fzf for telescope --- init.lua | 1 + lua/pluginList.lua | 14 +++++++++----- lua/telescope-nvim.lua | 14 +++++++++++--- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index 464c077..1245f9a 100644 --- a/init.lua +++ b/init.lua @@ -19,6 +19,7 @@ base16(base16.themes["onedark"], true) require "highlights" require("colorizer").setup() + require "mappings" require "telescope-nvim" require "file-icons" diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 80538e9..b43aa31 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -53,8 +53,6 @@ return packer.startup( cmd = "Neoformat" } - use "nvim-lua/plenary.nvim" - -- snippet support use { "hrsh7th/vim-vsnip", @@ -72,9 +70,15 @@ return packer.startup( } use "kyazdani42/nvim-web-devicons" - use "nvim-telescope/telescope.nvim" - use "nvim-telescope/telescope-media-files.nvim" - use "nvim-lua/popup.nvim" + use { + "nvim-telescope/telescope.nvim", + requires = { + {"nvim-lua/popup.nvim"}, + {"nvim-lua/plenary.nvim"}, + {"nvim-telescope/telescope-fzf-native.nvim", run = "make"}, + {"nvim-telescope/telescope-media-files.nvim"} + } + } -- misc plugins use { diff --git a/lua/telescope-nvim.lua b/lua/telescope-nvim.lua index 58eebca..cc948ae 100644 --- a/lua/telescope-nvim.lua +++ b/lua/telescope-nvim.lua @@ -9,9 +9,9 @@ require("telescope").setup { "--column", "--smart-case" }, - prompt_position = "bottom", - prompt_prefix = " ", - selection_caret = " ", + prompt_position = "top", + prompt_prefix = "  ", + selection_caret = " ", entry_prefix = " ", initial_mode = "insert", selection_strategy = "reset", @@ -47,6 +47,13 @@ require("telescope").setup { buffer_previewer_maker = require "telescope.previewers".buffer_previewer_maker }, extensions = { + fzf = { + fuzzy = true, -- false will only do exact matching + override_generic_sorter = false, -- override the generic sorter + override_file_sorter = true, -- override the file sorter + case_mode = "smart_case" -- or "ignore_case" or "respect_case" + -- the default case_mode is "smart_case" + }, media_files = { filetypes = {"png", "webp", "jpg", "jpeg"}, find_cmd = "rg" -- find command (defaults to `fd`) @@ -54,6 +61,7 @@ require("telescope").setup { } } +require('telescope').load_extension('fzf') require("telescope").load_extension("media_files") local opt = {noremap = true, silent = true} From 40a63f67c867e928afff4a43d6977cbb4f838bad Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 08:05:24 +0530 Subject: [PATCH 0308/1541] add gruvbox theme --- init.lua | 3 +-- lua/file-icons.lua | 7 ++++++- lua/highlights.lua | 4 +++- lua/statusline.lua | 2 +- lua/themes/gruvbox.lua | 33 +++++++++++++++++++++++++++++++++ 5 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 lua/themes/gruvbox.lua diff --git a/init.lua b/init.lua index 1245f9a..ce91f42 100644 --- a/init.lua +++ b/init.lua @@ -15,11 +15,10 @@ g.auto_save = 0 cmd "syntax on" local base16 = require "base16" -base16(base16.themes["onedark"], true) +base16(base16.themes["nvchad-softgruv"], true) require "highlights" require("colorizer").setup() - require "mappings" require "telescope-nvim" require "file-icons" diff --git a/lua/file-icons.lua b/lua/file-icons.lua index 9bb5832..373eb61 100644 --- a/lua/file-icons.lua +++ b/lua/file-icons.lua @@ -1,4 +1,4 @@ -local colors = require "themes/onedark" +local colors = require "themes/gruvbox" require "nvim-web-devicons".setup { override = { @@ -106,6 +106,11 @@ require "nvim-web-devicons".setup { icon = "", color = colors.orange, name = "rpm" + }, + lua = { + icon = "", + color = colors.blue, + name = "lua" } } } diff --git a/lua/highlights.lua b/lua/highlights.lua index 70e2e86..a71738a 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -1,6 +1,6 @@ local cmd = vim.cmd -local colors = require "themes/onedark" +local colors = require "themes/gruvbox" local white = colors.white local darker_black = colors.darker_black @@ -66,6 +66,8 @@ fg_bg("DiffModified", nord_blue, "none") -- NvimTree fg("NvimTreeFolderIcon", blue) fg("NvimTreeFolderName", blue) +fg("NvimTreeOpenedFolderName", blue) +fg("NvimTreeEmptyFolderName", blue) fg("NvimTreeIndentMarker", one_bg2) fg("NvimTreeVertSplit", darker_black) bg("NvimTreeVertSplit", darker_black) diff --git a/lua/statusline.lua b/lua/statusline.lua index c035e3e..6823e55 100644 --- a/lua/statusline.lua +++ b/lua/statusline.lua @@ -4,7 +4,7 @@ local condition = require("galaxyline.condition") gl.short_line_list = {" "} -local colors = require "themes/onedark" +local colors = require "themes/gruvbox" gls.left[1] = { FirstElement = { diff --git a/lua/themes/gruvbox.lua b/lua/themes/gruvbox.lua new file mode 100644 index 0000000..10e0503 --- /dev/null +++ b/lua/themes/gruvbox.lua @@ -0,0 +1,33 @@ +local colors = { + white = "#c7b89d", + darker_black = "#1d2021", + black = "#222526", -- nvim bg + black2 = "#26292a", + one_bg = "#2a2e36", -- real bg of onedark + one_bg2 = "#31353d", + one_bg3 = "#343840", + grey = "#46494a", + grey_fg = "#5d6061", + grey_fg2 = "#5b5e5f", + light_grey = "#585b5c", + red = "#ec6b64", + baby_pink = "#ce8196", + pink = "#ff75a0", + line = "#2c2f30", -- for lines like vertsplit + green = "#89b482", + vibrant_green = "#a9b665", + nord_blue = "#7b9bbb", + blue = "#6d8dad", + yellow = "#d6b676", + sun = "#d1b171", + purple = "#b4bbc8", + dark_purple = "#cc7f94", + teal = "#749689", + orange = "#e78a4e", + cyan = "#82b3a8", + statusline_bg = "#252829", + lightbg = "#2d3139", + lightbg2 = "#262a32" +} + +return colors From 7758c086e2d2e55f526b48ed77dea0e70cf4d75f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 08:06:26 +0530 Subject: [PATCH 0309/1541] clean up --- lua/misc-utils.lua | 49 ++++++++++++++++++---------------------------- 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index e1ca356..dd44b1f 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -1,41 +1,30 @@ -local scopes = {o = vim.o, b = vim.bo, w = vim.wo} +local opt = vim.opt -local function opt(scope, key, value) - scopes[scope][key] = value - if scope ~= "o" then - scopes["o"][key] = value - end -end - -opt("o", "ruler", false) -opt("o", "showmode", false) -opt("o", "hidden", true) -opt("o", "ignorecase", true) -opt("o", "splitbelow", true) -opt("o", "splitright", true) -opt("o", "termguicolors", true) -opt("w", "cul", true) - -opt("o", "mouse", "a") - -opt("w", "signcolumn", "yes") -opt("o", "cmdheight", 1) - -opt("o", "updatetime", 250) -- update interval for gitsigns -opt("o", "clipboard", "unnamedplus") +opt.ruler = false +opt.showmode = false +opt.hidden = true +opt.ignorecase = true +opt.splitbelow = true +opt.splitright = true +opt.termguicolors = true +opt.cul = true +opt.mouse = "a" +opt.signcolumn = "yes" +opt.cmdheight = 1 +opt.updatetime = 250 -- update interval for gitsigns +opt.clipboard = "unnamedplus" -- Numbers -opt("w", "number", true) -opt("o", "numberwidth", 2) +opt.number = true +opt.numberwidth = 2 -- opt("w", "relativenumber", true) -- for indenline -opt("b", "expandtab", true) -opt("b", "shiftwidth", 2) -opt("b", "smartindent", true) +opt.expandtab = true +opt.shiftwidth = 2 +opt.smartindent = true -- disable builtin vim plugins - vim.g.loaded_gzip = 0 vim.g.loaded_tar = 0 vim.g.loaded_tarPlugin = 0 From fc76cb3f5231a9df10b06fb2f7371345335ca71f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 08:08:12 +0530 Subject: [PATCH 0310/1541] global theme option --- init.lua | 5 +++-- lua/file-icons.lua | 3 ++- lua/highlights.lua | 3 ++- lua/statusline.lua | 13 ++++++++----- lua/themes/gruvbox.lua | 6 +++--- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index ce91f42..2dc2398 100644 --- a/init.lua +++ b/init.lua @@ -3,7 +3,7 @@ require "pluginList" require "misc-utils" require "top-bufferline" -require "statusline" +require "telescope-nvim" local cmd = vim.cmd local g = vim.g @@ -14,14 +14,15 @@ g.auto_save = 0 -- colorscheme related stuff cmd "syntax on" +g.nvchad_theme = "gruvbox" local base16 = require "base16" base16(base16.themes["nvchad-softgruv"], true) require "highlights" require("colorizer").setup() require "mappings" -require "telescope-nvim" require "file-icons" +require "statusline" -- hide line numbers , statusline in specific buffers! vim.api.nvim_exec( diff --git a/lua/file-icons.lua b/lua/file-icons.lua index 373eb61..3b16c21 100644 --- a/lua/file-icons.lua +++ b/lua/file-icons.lua @@ -1,4 +1,5 @@ -local colors = require "themes/gruvbox" +local global_theme = "themes/" .. vim.g.nvchad_theme +local colors = require(global_theme) require "nvim-web-devicons".setup { override = { diff --git a/lua/highlights.lua b/lua/highlights.lua index a71738a..cc5561d 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -1,6 +1,7 @@ local cmd = vim.cmd -local colors = require "themes/gruvbox" +local global_theme = "themes/"..vim.g.nvchad_theme +local colors = require(global_theme) local white = colors.white local darker_black = colors.darker_black diff --git a/lua/statusline.lua b/lua/statusline.lua index 6823e55..cbc4781 100644 --- a/lua/statusline.lua +++ b/lua/statusline.lua @@ -4,13 +4,16 @@ local condition = require("galaxyline.condition") gl.short_line_list = {" "} -local colors = require "themes/gruvbox" +local global_theme = "themes/" .. vim.g.nvchad_theme +local colors = require(global_theme) gls.left[1] = { - FirstElement = { - provider = function() return '▋' end, - highlight = { colors.nord_blue, colors.nord_blue } - }, + FirstElement = { + provider = function() + return "▋" + end, + highlight = {colors.nord_blue, colors.nord_blue} + } } gls.left[2] = { diff --git a/lua/themes/gruvbox.lua b/lua/themes/gruvbox.lua index 10e0503..48d96ab 100644 --- a/lua/themes/gruvbox.lua +++ b/lua/themes/gruvbox.lua @@ -1,9 +1,9 @@ local colors = { white = "#c7b89d", - darker_black = "#1d2021", + darker_black = "#1e2122", black = "#222526", -- nvim bg black2 = "#26292a", - one_bg = "#2a2e36", -- real bg of onedark + one_bg = "#2a2e36", one_bg2 = "#31353d", one_bg3 = "#343840", grey = "#46494a", @@ -16,7 +16,7 @@ local colors = { line = "#2c2f30", -- for lines like vertsplit green = "#89b482", vibrant_green = "#a9b665", - nord_blue = "#7b9bbb", + nord_blue = "#6f8faf", blue = "#6d8dad", yellow = "#d6b676", sun = "#d1b171", From c5f5709f10228b95ce62440cdffb0fc9d8930727 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 08:11:39 +0530 Subject: [PATCH 0311/1541] lazy loading telescope! --- init.lua | 3 +- lua/highlights.lua | 6 +- lua/mappings.lua | 10 +++ lua/pluginList.lua | 14 ++++- lua/telescope-nvim.lua | 140 +++++++++++++++++++---------------------- 5 files changed, 90 insertions(+), 83 deletions(-) diff --git a/init.lua b/init.lua index 2dc2398..c9753d4 100644 --- a/init.lua +++ b/init.lua @@ -3,7 +3,7 @@ require "pluginList" require "misc-utils" require "top-bufferline" -require "telescope-nvim" +require("colorizer").setup() local cmd = vim.cmd local g = vim.g @@ -19,7 +19,6 @@ local base16 = require "base16" base16(base16.themes["nvchad-softgruv"], true) require "highlights" -require("colorizer").setup() require "mappings" require "file-icons" require "statusline" diff --git a/lua/highlights.lua b/lua/highlights.lua index cc5561d..587cc8f 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -118,8 +118,8 @@ fg_bg("BufferLineIndicator", black2, black2) fg_bg("BufferLineIndicatorSelected", black, black) -- separators -fg_bg("BufferLineSeparator", line, black2) -fg_bg("BufferLineSeparatorVisible", line, black2) +fg_bg("BufferLineSeparator", black2, black2) +fg_bg("BufferLineSeparatorVisible", black2, black2) fg_bg("BufferLineSeparatorSelected", black, black2) -- modified buffers @@ -139,5 +139,5 @@ fg("DashboardCenter", grey_fg) fg("DashboardShortcut", grey_fg) fg("DashboardFooter", grey_fg) --- Default nvim bg +-- Default nvim bg (based on terminal bg) -- cmd "hi Normal guibg=#1e222a" diff --git a/lua/mappings.lua b/lua/mappings.lua index cf0fb41..3c5fb85 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -107,7 +107,17 @@ map("n", "fm", [[ Neoformat]], opt) -- dashboard stuff map("n", "fw", [[ Telescope live_grep]], opt) +map("n", "db", [[ Dashboard]], opt) map("n", "fn", [[ DashboardNewFile]], opt) map("n", "bm", [[ DashboardJumpMarks]], opt) map("n", "sl", [[ SessionLoad]], opt) map("n", "ss", [[ SessionSave]], opt) + +-- Telescope +map("n", "gt", [[ Telescope git_status ]], opt) +map("n", "cm", [[ Telescope git_commits ]], opt) +map("n", "ff", [[ Telescope find_files ]], opt) +map("n", "fp", [[lua require('telescope').extensions.media_files.media_files()]], opt) +map("n", "fb", [[Telescope Buffers]], opt) +map("n", "fh", [[Telescope help_tags]], opt) +map("n", "fo", [[Telescope oldfiles]], opt) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index b43aa31..ddd1b4d 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -70,6 +70,7 @@ return packer.startup( } use "kyazdani42/nvim-web-devicons" + use { "nvim-telescope/telescope.nvim", requires = { @@ -77,10 +78,16 @@ return packer.startup( {"nvim-lua/plenary.nvim"}, {"nvim-telescope/telescope-fzf-native.nvim", run = "make"}, {"nvim-telescope/telescope-media-files.nvim"} - } + }, + cmd = { + "Telescope" + }, + config = function() + require("telescope-nvim").config() + end } - -- misc plugins + -- git stuff use { "lewis6991/gitsigns.nvim", event = "BufRead", @@ -89,6 +96,7 @@ return packer.startup( end } + -- misc plugins use { "windwp/nvim-autopairs", event = "InsertEnter", @@ -113,7 +121,7 @@ return packer.startup( use { "glepnir/dashboard-nvim", cmd = { - "Telescope live_grep", + "Dashboard", "DashboardNewFile", "DashboardJumpMarks" }, diff --git a/lua/telescope-nvim.lua b/lua/telescope-nvim.lua index cc948ae..d74dacf 100644 --- a/lua/telescope-nvim.lua +++ b/lua/telescope-nvim.lua @@ -1,81 +1,71 @@ -require("telescope").setup { - defaults = { - vimgrep_arguments = { - "rg", - "--color=never", - "--no-heading", - "--with-filename", - "--line-number", - "--column", - "--smart-case" - }, - prompt_position = "top", - prompt_prefix = "  ", - selection_caret = " ", - entry_prefix = " ", - initial_mode = "insert", - selection_strategy = "reset", - sorting_strategy = "descending", - layout_strategy = "horizontal", - layout_defaults = { - horizontal = { - mirror = false, - preview_width = 0.5 +local M = {} + +M.config = function() + require("telescope").setup { + defaults = { + vimgrep_arguments = { + "rg", + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + "--smart-case" }, - vertical = { - mirror = false + prompt_position = "top", + prompt_prefix = "  ", + selection_caret = " ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "descending", + layout_strategy = "horizontal", + layout_defaults = { + horizontal = { + mirror = false, + preview_width = 0.55 + }, + vertical = { + mirror = false + } + }, + file_sorter = require "telescope.sorters".get_fuzzy_file, + file_ignore_patterns = {}, + generic_sorter = require "telescope.sorters".get_generic_fuzzy_sorter, + shorten_path = true, + winblend = 0, + width = 0.75, + preview_cutoff = 120, + results_height = 1, + results_width = 0.8, + border = {}, + borderchars = {"─", "│", "─", "│", "╭", "╮", "╯", "╰"}, + color_devicons = true, + use_less = true, + set_env = {["COLORTERM"] = "truecolor"}, -- default = nil, + file_previewer = require "telescope.previewers".vim_buffer_cat.new, + grep_previewer = require "telescope.previewers".vim_buffer_vimgrep.new, + qflist_previewer = require "telescope.previewers".vim_buffer_qflist.new, + -- Developer configurations: Not meant for general override + buffer_previewer_maker = require "telescope.previewers".buffer_previewer_maker + }, + extensions = { + fzf = { + fuzzy = true, -- false will only do exact matching + override_generic_sorter = false, -- override the generic sorter + override_file_sorter = true, -- override the file sorter + case_mode = "smart_case" -- or "ignore_case" or "respect_case" + -- the default case_mode is "smart_case" + }, + media_files = { + filetypes = {"png", "webp", "jpg", "jpeg"}, + find_cmd = "rg" -- find command (defaults to `fd`) } - }, - file_sorter = require "telescope.sorters".get_fuzzy_file, - file_ignore_patterns = {}, - generic_sorter = require "telescope.sorters".get_generic_fuzzy_sorter, - shorten_path = true, - winblend = 0, - width = 0.75, - preview_cutoff = 120, - results_height = 1, - results_width = 0.8, - border = {}, - borderchars = {"─", "│", "─", "│", "╭", "╮", "╯", "╰"}, - color_devicons = true, - use_less = true, - set_env = {["COLORTERM"] = "truecolor"}, -- default = nil, - file_previewer = require "telescope.previewers".vim_buffer_cat.new, - grep_previewer = require "telescope.previewers".vim_buffer_vimgrep.new, - qflist_previewer = require "telescope.previewers".vim_buffer_qflist.new, - -- Developer configurations: Not meant for general override - buffer_previewer_maker = require "telescope.previewers".buffer_previewer_maker - }, - extensions = { - fzf = { - fuzzy = true, -- false will only do exact matching - override_generic_sorter = false, -- override the generic sorter - override_file_sorter = true, -- override the file sorter - case_mode = "smart_case" -- or "ignore_case" or "respect_case" - -- the default case_mode is "smart_case" - }, - media_files = { - filetypes = {"png", "webp", "jpg", "jpeg"}, - find_cmd = "rg" -- find command (defaults to `fd`) } } -} -require('telescope').load_extension('fzf') -require("telescope").load_extension("media_files") + require("telescope").load_extension("fzf") + require("telescope").load_extension("media_files") +end -local opt = {noremap = true, silent = true} - -vim.g.mapleader = " " - --- mappings -vim.api.nvim_set_keymap("n", "ff", [[lua require('telescope.builtin').find_files()]], opt) -vim.api.nvim_set_keymap( - "n", - "fp", - [[lua require('telescope').extensions.media_files.media_files()]], - opt -) -vim.api.nvim_set_keymap("n", "fb", [[lua require('telescope.builtin').buffers()]], opt) -vim.api.nvim_set_keymap("n", "fh", [[lua require('telescope.builtin').help_tags()]], opt) -vim.api.nvim_set_keymap("n", "fo", [[lua require('telescope.builtin').oldfiles()]], opt) +return M From 3e1cf53fd6c80f5483ca7fef6e3b955947bc91bd Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 08:16:23 +0530 Subject: [PATCH 0312/1541] set default theme --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index c9753d4..2ebe488 100644 --- a/init.lua +++ b/init.lua @@ -14,9 +14,9 @@ g.auto_save = 0 -- colorscheme related stuff cmd "syntax on" -g.nvchad_theme = "gruvbox" +g.nvchad_theme = "onedark" local base16 = require "base16" -base16(base16.themes["nvchad-softgruv"], true) +base16(base16.themes["onedark"], true) require "highlights" require "mappings" From a6d2ccbb226cddedf5dcd453ea9455ca97af9f7b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 12:33:02 +0530 Subject: [PATCH 0313/1541] Update README.md --- README.md | 72 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 1981f8d..1a088aa 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,22 @@ [![Super-Linter](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml/badge.svg)](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml) [![Gitter](https://badges.gitter.im/neovim-dotfiles/community.svg)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +
+ Home + + Install + + Contribute + + Support + + Extras +

+
+ An attempt to make neovim (cli version) as functional as an IDE while being very eyecandy and less bloated. -# Screenshots - +

Screenshots



@@ -11,50 +24,48 @@ An attempt to make neovim (cli version) as functional as an IDE while being very

-# Very Useful lua plugins used in my config - +# Very Very Useful lua plugins used in my config -#### lspkind-nvim +#### Lspkind-nvim This tiny plugin adds vscode-like pictograms to neovim built-in lsp completion items :
-#### nvim-tree.lua +#### Nvim-tree.lua fast file tree :
-### telescope-nvim - +### Telescope-nvim A fuzzy file finder, picker, sorter, previewer and much more:
-### indent-blankline.nvim - +### Indent-blankline.nvim adds indentline : -### galaxyline - +### Galaxyline fastest statusline plugin I've used so far:
-
+### Nvim-bufferline.lua -### nvim-bufferline.lua - - -As a top bufferline like thing which lets me handle tabs like switching, closing tabs. +As a top tabline like thing which lets me handle tabs and buffers like switching , sorting and closing them etc. -
- -### nvim-web-devicons - +### Nvim-web-devicons + Lua fork of vim devicons which lets me change icons of filetypes -
- -### nvim-treesitter + + +### Nvim-treesitter + Better syntax highlighting for programming languages ( my config just has html,css,js support for now ). without / with Treesitter : @@ -63,14 +74,16 @@ without / with Treesitter : # Features - File navigation with Nvimtree -- mouse works -- managing tabs with bufferline +- Using plugins that are mouse friendly +- sexy themes +- managing tabs , buffers with bufferline - autosave - icons on nvimtree , telescope , bufferline/statusline and almost everywhere! with nvim-web-devicons - minimal status line ( galaxyline) - gitsigns (colored bars for git in my config) - using nvim-lsp - nvim-lspconfig for nvim-lps configuration +- lspInstall for installing lsp servers easily. - nvim-compe for autocompletion - lspkind to show pictograms on autocompletion items - telescope for file finding , picking , previewing (files and even images) @@ -82,17 +95,16 @@ without / with Treesitter : - smooth scrolling - Snip support from VSCode through vsnip supporting custom and predefined snips (friendly-snippets) -# Requirements +# Requirements - neovim 0.5 -- A terminal that supports [nerdfonts](https://github.com/ryanoasis/nerd-fonts) +- A terminal that supports [nerdfonts](https://github.com/ryanoasis/nerd-fonts) - Set terminal's inner padding to 0. # Wiki - [pre-requisite](https://github.com/siduck76/NvChad/wiki/Lua-guides) - [config-structure](https://github.com/siduck76/NvChad/wiki#config-structure) -- [Install](https://github.com/siduck76/NvChad/wiki#clone-my-setup) - [mappings](https://github.com/siduck76/NvChad/wiki/mappings) # TODO @@ -102,16 +114,17 @@ It would be nice if NvChad focuses on existing plugins and config before adding - Debloat the config - Add more themes. - Add a theme switcher. -- Add a global configuration so it doesnt get hard to update :c +- Preview shortcuts in the form of a pretty [cheatsheet](https://user-images.githubusercontent.com/59060246/122490009-95fd9980-cffe-11eb-9676-78019aa2cd65.png) +- Add a global configuration so it doesnt get hard to update :c -# Contibute +# Contribute -- PR's are always welcomed however NvChad aims to be less bloated and suckless. So PR's regarding existing plugin's enhancement , bug fixes are more encouraged. +- PR's are always welcomed however NvChad aims to be less bloated and suckless. So PR's regarding existing plugin's enhancement , bug fixes are more encouraged. - PR's regarding adding new plugins and their configs must be given some thought since NvChad aims to have a minimal config and meant to be used as a "base" neovim config so it will have only a set of important plugins. So adding more and more plugins, making NvChad bloated + slow wont help!. -- NvChad isnt a Framework. NvChad wont keep adding more and more features ( adding new plugins most likely) as requested , no spoonfeeding!! If you think the plugin you want to be added is very useful and many NvChaders would find it useful, then such feature's PR is welcomed! +- NvChad isnt a Framework. NvChad wont keep adding more and more features ( adding new plugins most likely) as requested , no spoonfeeding!! If you think the plugin you want to be added is very useful and many NvChaders would find it useful, then such feature's PR is welcomed! - But adding specific features like adding config for https://github.com/wakatime/vim-wakatime etc will be added in this https://github.com/siduck76/NvChad/wiki/Chad-user-configs. This lets the user select the things only they want ( from extra configs ) . -## :gift_heart: Support +## :gift_heart: Support If you enjoy using NvChad and would like to show your appreciation, you may want to tip me here. @@ -122,8 +135,3 @@ It is never required but always appreciated. undefined undefined

- -# Contact - - -- My linux / unix related ricing community: https://t.me/DE_WM (telegram) -- Me: @siduck (telegram) From 36aa25ba490493f6a57ba1e01342831151ebcce7 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 12:35:13 +0530 Subject: [PATCH 0314/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a088aa..e3dd95b 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ An attempt to make neovim (cli version) as functional as an IDE while being very eyecandy and less bloated. -

Screenshots

+

Screenshots



From 45afa83629703e4e7aa27ecaa59e53ac762b7ce4 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 12:39:30 +0530 Subject: [PATCH 0315/1541] Update README.md --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e3dd95b..7af2a67 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -[![Super-Linter](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml/badge.svg)](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml) -[![Gitter](https://badges.gitter.im/neovim-dotfiles/community.svg)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +

NvChad


Home @@ -14,10 +13,9 @@

-An attempt to make neovim (cli version) as functional as an IDE while being very eyecandy and less bloated. - -

Screenshots

- +[![Super-Linter](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml/badge.svg)](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml) +[![Gitter](https://badges.gitter.im/neovim-dotfiles/community.svg)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +


From c671acb112aa7607c3307e48eeaf6258e239664c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 12:42:02 +0530 Subject: [PATCH 0316/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7af2a67..ba14220 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -

NvChad


+

NvChad

Home From aa1a1af099f8b5e608e469d74196fa774920a665 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 12:48:04 +0530 Subject: [PATCH 0317/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ba14220..e360dcf 100644 --- a/README.md +++ b/README.md @@ -16,11 +16,11 @@ [![Super-Linter](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml/badge.svg)](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml) [![Gitter](https://badges.gitter.im/neovim-dotfiles/community.svg)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +




-
# Very Very Useful lua plugins used in my config From 3523eb277b0e5798653dbf816d2b664731e60205 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 12:49:12 +0530 Subject: [PATCH 0318/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e360dcf..7551ad4 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Contribute - Support + Support Extras

From ae2461a46f7271d5baf31f662f4854057ff5fde9 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 17:51:11 +0530 Subject: [PATCH 0319/1541] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 7551ad4..321afd0 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,10 @@ Better syntax highlighting for programming languages ( my config just has html,c without / with Treesitter : +# Credits + +[Elianiva](https://github.com/elianiva) helped me with neovim lua related issues many times, NvChad wouldnt exist without his help at all! + # Features - File navigation with Nvimtree From 9da869feeea364bc1c56bd8100306ec4f68e54b7 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 18:20:25 +0530 Subject: [PATCH 0320/1541] replace vsnip with luasnip,clean some confs --- lua/compe-completion.lua | 17 +++++++++++++++-- lua/mappings.lua | 6 ++++-- lua/misc-utils.lua | 15 ++++++++++++++- lua/pluginList.lua | 36 ++++++++++++++++-------------------- 4 files changed, 49 insertions(+), 25 deletions(-) diff --git a/lua/compe-completion.lua b/lua/compe-completion.lua index b9170ae..259098b 100644 --- a/lua/compe-completion.lua +++ b/lua/compe-completion.lua @@ -16,10 +16,23 @@ M.config = function() documentation = true, source = { buffer = {kind = "﬘", true}, - vsnip = {kind = "﬌"}, - nvim_lsp = true + luasnip = {kind = "﬌", true}, + nvim_lsp = true, + nvim_lua = true, } } end +M.snippets = function() + local ls = require("luasnip") + + ls.config.set_config( + { + history = true, + updateevents = "TextChanged,TextChangedI" + } + ) + require("luasnip/loaders/from_vscode").load() +end + return M diff --git a/lua/mappings.lua b/lua/mappings.lua index 3c5fb85..5663f8a 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -30,8 +30,8 @@ map("n", "", [[ %y+]], opt) map("n", "n", [[ set nu!]], opt) -- Truezen.nvim -map("n", "z", [[ TZAtaraxis]], opt) -map("n", "m", [[ TZMinimalist]], opt) +map("n", "z", ":TZAtaraxis", opt) +map("n", "m", ":TZMinimalist", opt) map("n", "", [[ w ]], opt) -- vim.cmd("inoremap jh ") @@ -40,6 +40,8 @@ map("n", "", [[ w ]], opt) map("n", "/", ":CommentToggle", {noremap = true, silent = true}) map("v", "/", ":CommentToggle", {noremap = true, silent = true}) +map("n","",":BufDel", opt) + -- compe stuff local t = function(str) diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index dd44b1f..6452c21 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -1,7 +1,6 @@ local opt = vim.opt opt.ruler = false -opt.showmode = false opt.hidden = true opt.ignorecase = true opt.splitbelow = true @@ -50,4 +49,18 @@ end -- file extension specific tabbing -- vim.cmd([[autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]]) + +-- blankline config + +M.blankline = function() + vim.g.indentLine_enabled = 1 + vim.g.indent_blankline_char = "▏" + + vim.g.indent_blankline_filetype_exclude = {"help", "terminal", "dashboard"} + vim.g.indent_blankline_buftype_exclude = {"terminal"} + + vim.g.indent_blankline_show_trailing_blankline_indent = false + vim.g.indent_blankline_show_first_indent_level = false +end + return M diff --git a/lua/pluginList.lua b/lua/pluginList.lua index ddd1b4d..c2129bc 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -45,7 +45,19 @@ return packer.startup( event = "InsertEnter", config = function() require("compe-completion").config() - end + end, + wants = {"LuaSnip"}, + requires = { + { + "L3MON4D3/LuaSnip", + wants = "friendly-snippets", + event = "InsertCharPre", + config = function() + require("compe-completion").snippets() + end + }, + "rafamadriz/friendly-snippets" + } } use { @@ -53,13 +65,6 @@ return packer.startup( cmd = "Neoformat" } - -- snippet support - use { - "hrsh7th/vim-vsnip", - event = "InsertCharPre" - } - use "rafamadriz/friendly-snippets" - -- file managing , picker etc use { "kyazdani42/nvim-tree.lua", @@ -79,9 +84,7 @@ return packer.startup( {"nvim-telescope/telescope-fzf-native.nvim", run = "make"}, {"nvim-telescope/telescope-media-files.nvim"} }, - cmd = { - "Telescope" - }, + cmd = "Telescope", config = function() require("telescope-nvim").config() end @@ -132,7 +135,7 @@ return packer.startup( use {"tweekmonster/startuptime.vim", cmd = "StartupTime"} - -- load autosave plugin only if its globally enabled + -- load autosave only if its globally enabled use { "907th/vim-auto-save", cond = function() @@ -164,14 +167,7 @@ return packer.startup( branch = "lua", event = "BufRead", setup = function() - vim.g.indentLine_enabled = 1 - vim.g.indent_blankline_char = "▏" - - vim.g.indent_blankline_filetype_exclude = {"help", "terminal", "dashboard"} - vim.g.indent_blankline_buftype_exclude = {"terminal"} - - vim.g.indent_blankline_show_trailing_blankline_indent = false - vim.g.indent_blankline_show_first_indent_level = false + require("misc-utils").blankline() end } end, From 89ab7f7be9823bc34ee256ec1a4802c53c3e6652 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 21:18:33 +0530 Subject: [PATCH 0321/1541] add donate link --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..b026072 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +custom: ['https://www.paypal.me/siduck76'] From 7d23b8c24e1d7004a23036a59f11120b878735da Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 27 Jun 2021 18:15:58 +0530 Subject: [PATCH 0322/1541] add some mappings --- init.lua | 2 -- lua/mappings.lua | 12 ++++++++++-- lua/top-bufferline.lua | 12 ------------ 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/init.lua b/init.lua index 2ebe488..fc461cf 100644 --- a/init.lua +++ b/init.lua @@ -5,14 +5,12 @@ require "misc-utils" require "top-bufferline" require("colorizer").setup() -local cmd = vim.cmd local g = vim.g g.mapleader = " " g.auto_save = 0 -- colorscheme related stuff -cmd "syntax on" g.nvchad_theme = "onedark" local base16 = require "base16" diff --git a/lua/mappings.lua b/lua/mappings.lua index 5663f8a..379225b 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -33,14 +33,14 @@ map("n", "n", [[ set nu!]], opt) map("n", "z", ":TZAtaraxis", opt) map("n", "m", ":TZMinimalist", opt) -map("n", "", [[ w ]], opt) +map("n", "", ":w ", opt) -- vim.cmd("inoremap jh ") -- Commenter Keybinding map("n", "/", ":CommentToggle", {noremap = true, silent = true}) map("v", "/", ":CommentToggle", {noremap = true, silent = true}) -map("n","",":BufDel", opt) +map("n", "", ":bpspbnbd! ", opt) -- compe stuff @@ -123,3 +123,11 @@ map("n", "fp", [[lua require('telescope').extensions.media_files.me map("n", "fb", [[Telescope Buffers]], opt) map("n", "fh", [[Telescope help_tags]], opt) map("n", "fo", [[Telescope oldfiles]], opt) + +-- bufferline tab stuff +map("n", "", [[tabnew]], opt) -- new tab +map("n", "", [[bdelete]], opt) -- close tab + +-- move between tabs +map("n", "", [[BufferLineCycleNext]], opt) +map("n", "", [[BufferLineCyclePrev]], opt) diff --git a/lua/top-bufferline.lua b/lua/top-bufferline.lua index f0fa4de..eb56214 100644 --- a/lua/top-bufferline.lua +++ b/lua/top-bufferline.lua @@ -17,15 +17,3 @@ require "bufferline".setup { mappings = "true" } } - -local opt = {silent = true} -local map = vim.api.nvim_set_keymap -vim.g.mapleader = " " - --- MAPPINGS -map("n", "", [[tabnew]], opt) -- new tab -map("n", "", [[bdelete]], opt) -- close tab - --- move between tabs -map("n", "", [[BufferLineCycleNext]], opt) -map("n", "", [[BufferLineCyclePrev]], opt) From ca29b384784f4e0700677aa5c7a1718ef634e75e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 27 Jun 2021 20:59:39 +0530 Subject: [PATCH 0323/1541] lazy load colorizer --- init.lua | 2 -- lua/mappings.lua | 23 ++++++++--------------- lua/pluginList.lua | 9 ++++++++- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/init.lua b/init.lua index fc461cf..5a6191b 100644 --- a/init.lua +++ b/init.lua @@ -1,9 +1,7 @@ -- load all plugins require "pluginList" require "misc-utils" - require "top-bufferline" -require("colorizer").setup() local g = vim.g diff --git a/lua/mappings.lua b/lua/mappings.lua index 379225b..1bc0d86 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -1,5 +1,5 @@ local function map(mode, lhs, rhs, opts) - local options = {noremap = true} + local options = {noremap = true, silent = true} if opts then options = vim.tbl_extend("force", options, opts) end @@ -37,8 +37,8 @@ map("n", "", ":w ", opt) -- vim.cmd("inoremap jh ") -- Commenter Keybinding -map("n", "/", ":CommentToggle", {noremap = true, silent = true}) -map("v", "/", ":CommentToggle", {noremap = true, silent = true}) +map("n", "/", ":CommentToggle", opt) +map("v", "/", ":CommentToggle", opt) map("n", "", ":bpspbnbd! ", opt) @@ -94,17 +94,10 @@ map("i", "", "v:lua.s_tab_complete()", {expr = true}) map("s", "", "v:lua.s_tab_complete()", {expr = true}) map("i", "", "v:lua.completions()", {expr = true}) --- Mappings for nvimtree -map( - "n", - "", - ":NvimTreeToggle", - { - noremap = true, - silent = true - } -) +-- nvimtree +map("n", "", ":NvimTreeToggle", opt) +-- format code map("n", "fm", [[ Neoformat]], opt) -- dashboard stuff @@ -125,8 +118,8 @@ map("n", "fh", [[Telescope help_tags]], opt) map("n", "fo", [[Telescope oldfiles]], opt) -- bufferline tab stuff -map("n", "", [[tabnew]], opt) -- new tab -map("n", "", [[bdelete]], opt) -- close tab +map("n", "", ":tabnew", opt) -- new tab +map("n", "", ":bd!", opt) -- close tab -- move between tabs map("n", "", [[BufferLineCycleNext]], opt) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index c2129bc..2abe4ca 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -10,7 +10,14 @@ return packer.startup( -- color related stuff use "siduck76/nvim-base16.lua" - use "norcalli/nvim-colorizer.lua" + + use { + "norcalli/nvim-colorizer.lua", + event = "BufWinEnter", + config = function() + require("colorizer").setup() + end + } -- language related plugins use { From da50d99462f91554f8f54886e9d0ec223aef38ee Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 27 Jun 2021 21:58:35 +0530 Subject: [PATCH 0324/1541] load colorizer on bufread event only --- lua/pluginList.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 2abe4ca..d71dc5b 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -13,9 +13,10 @@ return packer.startup( use { "norcalli/nvim-colorizer.lua", - event = "BufWinEnter", + event = "BufRead", config = function() require("colorizer").setup() + vim.cmd("ColorizerReloadAllBuffers") end } @@ -36,7 +37,9 @@ return packer.startup( end } - use "kabouzeid/nvim-lspinstall" + use { + "kabouzeid/nvim-lspinstall" + } use { "onsails/lspkind-nvim", From 50321ad4a0b8f10659c65c7647ca46ca3dc175e0 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 27 Jun 2021 22:08:47 +0530 Subject: [PATCH 0325/1541] change some mappings --- lua/mappings.lua | 4 ++-- lua/pluginList.lua | 19 ++++++------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index 1bc0d86..350039c 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -105,8 +105,8 @@ map("n", "fw", [[ Telescope live_grep]], opt) map("n", "db", [[ Dashboard]], opt) map("n", "fn", [[ DashboardNewFile]], opt) map("n", "bm", [[ DashboardJumpMarks]], opt) -map("n", "sl", [[ SessionLoad]], opt) -map("n", "ss", [[ SessionSave]], opt) +map("n", "l", [[ SessionLoad]], opt) +map("n", "s", [[ SessionSave]], opt) -- Telescope map("n", "gt", [[ Telescope git_status ]], opt) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index d71dc5b..2036124 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -37,9 +37,7 @@ return packer.startup( end } - use { - "kabouzeid/nvim-lspinstall" - } + use "kabouzeid/nvim-lspinstall" use { "onsails/lspkind-nvim", @@ -70,10 +68,7 @@ return packer.startup( } } - use { - "sbdchd/neoformat", - cmd = "Neoformat" - } + use {"sbdchd/neoformat", cmd = "Neoformat"} -- file managing , picker etc use { @@ -85,7 +80,6 @@ return packer.startup( } use "kyazdani42/nvim-web-devicons" - use { "nvim-telescope/telescope.nvim", requires = { @@ -118,10 +112,7 @@ return packer.startup( end } - use { - "andymass/vim-matchup", - event = "CursorMoved" - } + use {"andymass/vim-matchup", event = "CursorMoved"} use { "terrortylor/nvim-comment", @@ -136,7 +127,9 @@ return packer.startup( cmd = { "Dashboard", "DashboardNewFile", - "DashboardJumpMarks" + "DashboardJumpMarks", + "SessionLoad", + "SessionSave" }, setup = function() require("dashboard").config() From 087e4e8acc3057da406ed59209af06056e2e7ba4 Mon Sep 17 00:00:00 2001 From: Henri <52706578+Vanderscycle@users.noreply.github.com> Date: Sun, 27 Jun 2021 12:02:56 -0700 Subject: [PATCH 0326/1541] Update install.sh Gave up and decided to clone the config and reinstall over my previous install to add later. Made the following modifications: 1 - removed the extra echos (use echo -e "\n some line " in the future) 2 - packer doesn't install if there's a previously installed packer folder. So the bash script purges the previous packer folder and starts anew. tested the config correctly --- install.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index 3069243..acb692f 100755 --- a/install.sh +++ b/install.sh @@ -13,15 +13,16 @@ get_platform() { echo "installing packer" -if [ ! -d ~/.local/share/nvim/site/pack/packer ]; then - echo "Installing packer" - git clone https://github.com/wbthomason/packer.nvim \ - ~/.local/share/nvim/site/pack/packer/start/packer.nvim - echo - echo "packer installed!" - echo +if [ -d ~/.local/share/nvim/site/pack/packer ]; then + echo "Clearning previous packer installs" + rm -rf ~/.local/share/nvim/site/pack fi +echo -e "\n=> Installing packer" +git clone https://github.com/wbthomason/packer.nvim \ + ~/.local/share/nvim/site/pack/packer/start/packer.nvim +echo -e "=> packer installed!" + echo "Linking config" echo "old nvim config will be changed to nvim.bak if exists! :0" @@ -49,9 +50,8 @@ else sed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings.lua fi -echo "shell changed to $shellname on nvim successfully!" -echo -echo "neovim will open with some errors , just press enter" && sleep 1 +echo -e "\n=> shell changed to $shellname on nvim successfully!" +echo -e "\n=> neovim will open with some errors , just press enter" && sleep 1 # install all plugins + compile them nvim +PackerSync From 4dde80f3155c0587cdc0fcc316f2614797c1ef9b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 28 Jun 2021 21:23:50 +0530 Subject: [PATCH 0327/1541] Update install.sh --- install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install.sh b/install.sh index acb692f..f4225e9 100755 --- a/install.sh +++ b/install.sh @@ -4,8 +4,6 @@ get_platform() { case "$(uname -s)" in Linux*) platform=Linux ;; Darwin*) platform=Mac ;; - CYGWIN*) platform=Cygwin ;; - MINGW*) platform=MinGw ;; *) platform="UNKNOWN:${unameOut}" ;; esac echo $platform From e9e2dd3f147750060d6d4bc67329b9e4fbefd3b0 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 29 Jun 2021 08:52:28 +0530 Subject: [PATCH 0328/1541] Update README.md --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 321afd0..7ccd099 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,19 @@
[![Super-Linter](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml/badge.svg)](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml) +GitHub repository size + License [![Gitter](https://badges.gitter.im/neovim-dotfiles/community.svg)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) - +[![GitHub Release](https://img.shields.io/github/release/siduck76/NvChad.svg?)]() +


From 2b628f17292e77e85e26105d079d1164e8f2e99e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 29 Jun 2021 08:53:01 +0530 Subject: [PATCH 0329/1541] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7ccd099..48cf866 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,12 @@ /> [![Gitter](https://badges.gitter.im/neovim-dotfiles/community.svg)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![GitHub Release](https://img.shields.io/github/release/siduck76/NvChad.svg?)]() - +
Latest commit +


From 69e790eeb3ef782d5c46c08bbda1d62735d5326c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 29 Jun 2021 08:53:30 +0530 Subject: [PATCH 0330/1541] Create README.md --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 48cf866..3a7effa 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,6 @@ /> [![Gitter](https://badges.gitter.im/neovim-dotfiles/community.svg)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![GitHub Release](https://img.shields.io/github/release/siduck76/NvChad.svg?)]() -Latest commit

From 4159c5370fdd9cc0ad49f972f1ad1dd50315a466 Mon Sep 17 00:00:00 2001 From: kingavatar Date: Tue, 29 Jun 2021 10:50:37 +0530 Subject: [PATCH 0331/1541] Fix Check Git Workspace Condition --- lua/statusline.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/statusline.lua b/lua/statusline.lua index cbc4781..717a8a0 100644 --- a/lua/statusline.lua +++ b/lua/statusline.lua @@ -127,7 +127,7 @@ gls.right[2] = { provider = function() return " " end, - condition = require("galaxyline.provider_vcs").check_git_workspace, + condition = require("galaxyline.condition").check_git_workspace, highlight = {colors.grey_fg2, colors.lightbg}, separator = "", separator_highlight = {colors.lightbg, colors.statusline_bg} @@ -137,7 +137,7 @@ gls.right[2] = { gls.right[3] = { GitBranch = { provider = "GitBranch", - condition = require("galaxyline.provider_vcs").check_git_workspace, + condition = require("galaxyline.condition").check_git_workspace, highlight = {colors.grey_fg2, colors.lightbg} } } From 4631fbcf4cf9c4ed591b053a8b86a707dda08873 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Tue, 29 Jun 2021 15:09:03 +0530 Subject: [PATCH 0332/1541] removed -e flags in script I removed -e flags of echoes as it not useful in the posix script --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index f4225e9..0fc6888 100755 --- a/install.sh +++ b/install.sh @@ -16,10 +16,10 @@ if [ -d ~/.local/share/nvim/site/pack/packer ]; then rm -rf ~/.local/share/nvim/site/pack fi -echo -e "\n=> Installing packer" +echo "\n=> Installing packer" git clone https://github.com/wbthomason/packer.nvim \ ~/.local/share/nvim/site/pack/packer/start/packer.nvim -echo -e "=> packer installed!" +echo "=> packer installed!" echo "Linking config" echo "old nvim config will be changed to nvim.bak if exists! :0" @@ -48,8 +48,8 @@ else sed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings.lua fi -echo -e "\n=> shell changed to $shellname on nvim successfully!" -echo -e "\n=> neovim will open with some errors , just press enter" && sleep 1 +echo "\n=> shell changed to $shellname on nvim successfully!" +echo "\n=> neovim will open with some errors , just press enter" && sleep 1 # install all plugins + compile them nvim +PackerSync From 602835d637abff131ee032188c43ea19d5599634 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Wed, 30 Jun 2021 06:03:22 +0530 Subject: [PATCH 0333/1541] created bug report template --- .github/ISSUE_TEMPLATE/bug_report.md | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..470452f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,32 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - Operating System + - Terminal + - Version of Neovim + +**Additional context** +Add any other context about the problem here. From a465ea723946bc511ab4027ec06a70180d0c49e9 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Wed, 30 Jun 2021 06:07:28 +0530 Subject: [PATCH 0334/1541] created feature request template --- .github/ISSUE_TEMPLATE/feature_request.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..24d2f24 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,23 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem was. + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. + +**Screenshot** +Maybe a screenshot of the feature From 7e69cb8ac9bd904f031fa8d074be6e455a983883 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Wed, 30 Jun 2021 17:41:33 +0530 Subject: [PATCH 0335/1541] created config.yml created config.yml so that blank issues are not enabled --- .github/ISSUE_TEMPLATE/config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false From d073e011176f487291db04e304402436de9466ee Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 1 Jul 2021 06:26:51 +0530 Subject: [PATCH 0336/1541] fix typo in mappings #109 --- lua/mappings.lua | 2 +- lua/themes/gruvbox.lua | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index 350039c..da1a1aa 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -113,7 +113,7 @@ map("n", "gt", [[ Telescope git_status ]], opt) map("n", "cm", [[ Telescope git_commits ]], opt) map("n", "ff", [[ Telescope find_files ]], opt) map("n", "fp", [[lua require('telescope').extensions.media_files.media_files()]], opt) -map("n", "fb", [[Telescope Buffers]], opt) +map("n", "fb", [[Telescope buffers]], opt) map("n", "fh", [[Telescope help_tags]], opt) map("n", "fo", [[Telescope oldfiles]], opt) diff --git a/lua/themes/gruvbox.lua b/lua/themes/gruvbox.lua index 48d96ab..415e858 100644 --- a/lua/themes/gruvbox.lua +++ b/lua/themes/gruvbox.lua @@ -3,9 +3,9 @@ local colors = { darker_black = "#1e2122", black = "#222526", -- nvim bg black2 = "#26292a", - one_bg = "#2a2e36", - one_bg2 = "#31353d", - one_bg3 = "#343840", + one_bg = "#2b2e2f", + one_bg2 = "#2f3233", + one_bg3 = "#313435", grey = "#46494a", grey_fg = "#5d6061", grey_fg2 = "#5b5e5f", From 9b2d36b767f71b531e770c21143718d77163e66e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 1 Jul 2021 11:55:38 +0530 Subject: [PATCH 0337/1541] update nvimtree config and highlights --- lua/highlights.lua | 4 ++- lua/nvimTree.lua | 85 +++++++++++++++++++++++++--------------------- lua/statusline.lua | 10 +++--- 3 files changed, 55 insertions(+), 44 deletions(-) diff --git a/lua/highlights.lua b/lua/highlights.lua index 587cc8f..e276211 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -1,6 +1,6 @@ local cmd = vim.cmd -local global_theme = "themes/"..vim.g.nvchad_theme +local global_theme = "themes/" .. vim.g.nvchad_theme local colors = require(global_theme) local white = colors.white @@ -72,10 +72,12 @@ fg("NvimTreeEmptyFolderName", blue) fg("NvimTreeIndentMarker", one_bg2) fg("NvimTreeVertSplit", darker_black) bg("NvimTreeVertSplit", darker_black) +fg("NvimTreeEndOfBuffer", darker_black) fg("NvimTreeRootFolder", darker_black) bg("NvimTreeNormal", darker_black) fg_bg("NvimTreeStatuslineNc", darker_black, darker_black) +fg_bg("NvimTreeWindowPicker", red, black2) -- telescope fg("TelescopeBorder", line) diff --git a/lua/nvimTree.lua b/lua/nvimTree.lua index 5479b86..a866cb6 100644 --- a/lua/nvimTree.lua +++ b/lua/nvimTree.lua @@ -8,23 +8,30 @@ M.config = function() g.nvim_tree_side = "left" g.nvim_tree_width = 25 g.nvim_tree_ignore = {".git", "node_modules", ".cache"} + g.nvim_tree_gitignore = 1 + g.nvim_tree_auto_ignore_ft = {"dashboard"} -- don't open tree on specific fiypes. g.nvim_tree_auto_open = 0 - g.nvim_tree_auto_close = 0 - g.nvim_tree_quit_on_open = 0 + g.nvim_tree_auto_close = 0 -- closes tree when it's the last window + g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened g.nvim_tree_follow = 1 g.nvim_tree_indent_markers = 1 g.nvim_tree_hide_dotfiles = 1 g.nvim_tree_git_hl = 1 + g.nvim_tree_highlight_opened_files = 0 g.nvim_tree_root_folder_modifier = ":t" g.nvim_tree_tab_open = 0 g.nvim_tree_allow_resize = 1 + g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names + g.nvim_tree_disable_netrw = 1 + g.nvim_tree_hijack_netrw = 0 + g.nvim_tree_update_cwd = 1 g.nvim_tree_show_icons = { git = 1, folders = 1, files = 1 + -- folder_arrows= 1 } - g.nvim_tree_icons = { default = "", symlink = "", @@ -38,50 +45,52 @@ M.config = function() ignored = "◌" }, folder = { + -- disable indent_markers option to get arrows working or if you want both arrows and indent then just add the arrow icons in front ofthe default and opened folders below! + -- arrow_open = "", + -- arrow_closed = "", default = "", open = "", - symlink = "", - empty = "", + empty = "", --  empty_open = "", - symlink_open = "" + symlink = "", + symlink_open = "" } } local tree_cb = require "nvim-tree.config".nvim_tree_callback g.nvim_tree_bindings = { - ["u"] = ":lua require'some_module'.some_function()", - -- default mappings - [""] = tree_cb("edit"), - ["o"] = tree_cb("edit"), - ["<2-LeftMouse>"] = tree_cb("edit"), - ["<2-RightMouse>"] = tree_cb("cd"), - [""] = tree_cb("cd"), - [""] = tree_cb("vsplit"), - [""] = tree_cb("split"), - [""] = tree_cb("tabnew"), - ["<"] = tree_cb("prev_sibling"), - [">"] = tree_cb("next_sibling"), - [""] = tree_cb("close_node"), - [""] = tree_cb("close_node"), - [""] = tree_cb("preview"), - ["I"] = tree_cb("toggle_ignored"), - ["H"] = tree_cb("toggle_dotfiles"), - ["R"] = tree_cb("refresh"), - ["a"] = tree_cb("create"), - ["d"] = tree_cb("remove"), - ["r"] = tree_cb("rename"), - [""] = tree_cb("full_rename"), - ["x"] = tree_cb("cut"), - ["c"] = tree_cb("copy"), - ["p"] = tree_cb("paste"), - ["y"] = tree_cb("copy_name"), - ["Y"] = tree_cb("copy_path"), - ["gy"] = tree_cb("copy_absolute_path"), - ["[c"] = tree_cb("prev_git_item"), - ["]c"] = tree_cb("next_git_item"), - ["-"] = tree_cb("dir_up"), - ["q"] = tree_cb("close") + {key = {"", "o", "<2-LeftMouse>"}, cb = tree_cb("edit")}, + {key = {"<2-RightMouse>", ""}, cb = tree_cb("cd")}, + {key = "", cb = tree_cb("vsplit")}, + {key = "", cb = tree_cb("split")}, + {key = "", cb = tree_cb("tabnew")}, + {key = "<", cb = tree_cb("prev_sibling")}, + {key = ">", cb = tree_cb("next_sibling")}, + {key = "P", cb = tree_cb("parent_node")}, + {key = "", cb = tree_cb("close_node")}, + {key = "", cb = tree_cb("close_node")}, + {key = "", cb = tree_cb("preview")}, + {key = "K", cb = tree_cb("first_sibling")}, + {key = "J", cb = tree_cb("last_sibling")}, + {key = "I", cb = tree_cb("toggle_ignored")}, + {key = "H", cb = tree_cb("toggle_dotfiles")}, + {key = "R", cb = tree_cb("refresh")}, + {key = "a", cb = tree_cb("create")}, + {key = "d", cb = tree_cb("remove")}, + {key = "r", cb = tree_cb("rename")}, + {key = "", cb = tree_cb("full_rename")}, + {key = "x", cb = tree_cb("cut")}, + {key = "c", cb = tree_cb("copy")}, + {key = "p", cb = tree_cb("paste")}, + {key = "y", cb = tree_cb("copy_name")}, + {key = "Y", cb = tree_cb("copy_path")}, + {key = "gy", cb = tree_cb("copy_absolute_path")}, + {key = "[c", cb = tree_cb("prev_git_item")}, + {key = "}c", cb = tree_cb("next_git_item")}, + {key = "-", cb = tree_cb("dir_up")}, + {key = "q", cb = tree_cb("close")}, + {key = "g?", cb = tree_cb("toggle_help")} } end diff --git a/lua/statusline.lua b/lua/statusline.lua index 717a8a0..ea45845 100644 --- a/lua/statusline.lua +++ b/lua/statusline.lua @@ -128,9 +128,9 @@ gls.right[2] = { return " " end, condition = require("galaxyline.condition").check_git_workspace, - highlight = {colors.grey_fg2, colors.lightbg}, - separator = "", - separator_highlight = {colors.lightbg, colors.statusline_bg} + highlight = {colors.grey_fg2, colors.statusline_bg}, + separator = " ", + separator_highlight = {colors.statusline_bg, colors.statusline_bg} } } @@ -138,7 +138,7 @@ gls.right[3] = { GitBranch = { provider = "GitBranch", condition = require("galaxyline.condition").check_git_workspace, - highlight = {colors.grey_fg2, colors.lightbg} + highlight = {colors.grey_fg2, colors.statusline_bg} } } @@ -149,7 +149,7 @@ gls.right[4] = { end, highlight = {colors.statusline_bg, colors.red}, separator = " ", - separator_highlight = {colors.red, colors.lightbg} + separator_highlight = {colors.red, colors.statusline_bg} } } From f1662951d1e597766ee01bbe35b704739ff7191b Mon Sep 17 00:00:00 2001 From: alternateved Date: Thu, 1 Jul 2021 13:44:56 +0200 Subject: [PATCH 0338/1541] Update TrueZen.nvim after repository changed address --- lua/pluginList.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 2036124..ff6576f 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -156,7 +156,7 @@ return packer.startup( } use { - "kdav5758/TrueZen.nvim", + "Pocco81/TrueZen.nvim", cmd = {"TZAtaraxis", "TZMinimalist"}, config = function() require("zenmode").config() From 6e5d2940d7371965dc65f2ad3e62acf759d5e68d Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Thu, 1 Jul 2021 18:43:06 +0530 Subject: [PATCH 0339/1541] updated config.yml added some help links --- .github/ISSUE_TEMPLATE/config.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 3ba13e0..14f2dd0 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1 +1,8 @@ blank_issues_enabled: false +contact_links: + - name: Wiki + url: https://github.com/siduck76/NvChad/wiki + about: "Walks you through how to use and Configure NvChad." + - name: Visit our gitter chat + url: https://gitter.im/neovim-dotfiles/community + about: "A place where we dicuss NvChad and can ask questions. For chad only ;)" From ea3b090566ddbbb11212ae89c16d112633447b2e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 1 Jul 2021 18:48:31 +0530 Subject: [PATCH 0340/1541] Update config.yml --- .github/ISSUE_TEMPLATE/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 14f2dd0..3495e93 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -5,4 +5,4 @@ contact_links: about: "Walks you through how to use and Configure NvChad." - name: Visit our gitter chat url: https://gitter.im/neovim-dotfiles/community - about: "A place where we dicuss NvChad and can ask questions. For chad only ;)" + about: "A place where we dicuss NvChad related stuff." From 940f344e0e7ab0d1bc2ffc31bd771e040c71fa29 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Thu, 1 Jul 2021 19:15:29 +0530 Subject: [PATCH 0341/1541] added more badges The badges added: - Stars - Issues --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3a7effa..c561770 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,10 @@ alt="License" /> [![Gitter](https://badges.gitter.im/neovim-dotfiles/community.svg)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -[![GitHub Release](https://img.shields.io/github/release/siduck76/NvChad.svg?)]() - +[![GitHub Release](https://img.shields.io/github/release/siduck76/NvChad.svg?)]() +[![GitHub Stars](https://img.shields.io/github/stars/siduck76/NvChad.svg?)]() +[![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?)]() +


From 799f2e0b6f9d4f7277ee5a407b819a2e3983a89a Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Thu, 1 Jul 2021 19:16:04 +0530 Subject: [PATCH 0342/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c561770..8a98493 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ /> [![Gitter](https://badges.gitter.im/neovim-dotfiles/community.svg)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![GitHub Release](https://img.shields.io/github/release/siduck76/NvChad.svg?)]() -[![GitHub Stars](https://img.shields.io/github/stars/siduck76/NvChad.svg?)]() +[![GitHub Stars](https://img.shields.io/github/stars/siduck76/NvChad)]() [![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?)]()
From 1f3a5fd233e3e07058a45eed5f3859d1fa8014f4 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 1 Jul 2021 19:29:51 +0530 Subject: [PATCH 0343/1541] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a98493..620cf3f 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,9 @@ /> [![Gitter](https://badges.gitter.im/neovim-dotfiles/community.svg)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![GitHub Release](https://img.shields.io/github/release/siduck76/NvChad.svg?)]() -[![GitHub Stars](https://img.shields.io/github/stars/siduck76/NvChad)]() + + Last commit + [![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?)]()
From dbb87a304de594101775cb334eab9a07c0ace677 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Thu, 1 Jul 2021 19:37:18 +0530 Subject: [PATCH 0344/1541] made badges flat --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 620cf3f..a045e33 100644 --- a/README.md +++ b/README.md @@ -16,20 +16,20 @@ [![Super-Linter](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml/badge.svg)](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml) GitHub repository size License [![Gitter](https://badges.gitter.im/neovim-dotfiles/community.svg)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -[![GitHub Release](https://img.shields.io/github/release/siduck76/NvChad.svg?)]() +[![GitHub Release](https://img.shields.io/github/release/siduck76/NvChad.svg?style=flat-square)]() - Last commit + Last commit -[![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?)]() +[![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square)]()

From a1645954aa8962d99f891c3752573cc2ad98203f Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Thu, 1 Jul 2021 20:06:53 +0530 Subject: [PATCH 0345/1541] made flat all --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a045e33..08e5941 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@

-[![Super-Linter](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml/badge.svg)](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml) +[![Super Linter](https://img.shields.io/github/workflow/status/siduck76/NvChad/Super-Linter/main?style=flat-square)]() License -[![Gitter](https://badges.gitter.im/neovim-dotfiles/community.svg)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![Gitter](https://img.shields.io/gitter/room/siduck76/NvChad?style=flat-square)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![GitHub Release](https://img.shields.io/github/release/siduck76/NvChad.svg?style=flat-square)]() Last commit From 113c9b5a6d05eef2fec6975e1ab47155a0331d16 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Thu, 1 Jul 2021 20:08:31 +0530 Subject: [PATCH 0346/1541] full clear --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 08e5941..b5e4318 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ Last commit +[![GitHub Stars](https://img.shields.io/github/stars/siduck76/NvChad.svg?)]() [![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square)]()
From 0ecde48940daf713cc8635dcc500520749ab7bcd Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Thu, 1 Jul 2021 20:09:00 +0530 Subject: [PATCH 0347/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b5e4318..7ae8b75 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Last commit -[![GitHub Stars](https://img.shields.io/github/stars/siduck76/NvChad.svg?)]() +[![GitHub Stars](https://img.shields.io/github/stars/siduck76/NvChad.svg?style=flat-square)]() [![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square)]()
From 10d7b892c9f63214669549293e4bfd692c41e2f6 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 1 Jul 2021 20:13:57 +0530 Subject: [PATCH 0348/1541] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 7ae8b75..ac5c462 100644 --- a/README.md +++ b/README.md @@ -25,12 +25,10 @@ alt="License" /> [![Gitter](https://img.shields.io/gitter/room/siduck76/NvChad?style=flat-square)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -[![GitHub Release](https://img.shields.io/github/release/siduck76/NvChad.svg?style=flat-square)]() +[![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square)]() Last commit -[![GitHub Stars](https://img.shields.io/github/stars/siduck76/NvChad.svg?style=flat-square)]() -[![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square)]()

From 1895d1f77143d465e4d74ed71e64b2672d58c23f Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Thu, 1 Jul 2021 20:36:57 +0530 Subject: [PATCH 0349/1541] centered the badges --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index ac5c462..3f59c34 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@

+
+ [![Super Linter](https://img.shields.io/github/workflow/status/siduck76/NvChad/Super-Linter/main?style=flat-square)]() Last commit +


From 9dbc9e68807273e0890faf9d825e26d30b727c0e Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Thu, 1 Jul 2021 21:30:03 +0530 Subject: [PATCH 0350/1541] Updated telescope config fixes issue #115. --- lua/telescope-nvim.lua | 82 +++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/lua/telescope-nvim.lua b/lua/telescope-nvim.lua index d74dacf..0cd2b77 100644 --- a/lua/telescope-nvim.lua +++ b/lua/telescope-nvim.lua @@ -12,32 +12,33 @@ M.config = function() "--column", "--smart-case" }, - prompt_position = "top", - prompt_prefix = "  ", - selection_caret = " ", - entry_prefix = " ", - initial_mode = "insert", - selection_strategy = "reset", - sorting_strategy = "descending", - layout_strategy = "horizontal", - layout_defaults = { - horizontal = { - mirror = false, - preview_width = 0.55 - }, - vertical = { - mirror = false - } - }, - file_sorter = require "telescope.sorters".get_fuzzy_file, - file_ignore_patterns = {}, - generic_sorter = require "telescope.sorters".get_generic_fuzzy_sorter, - shorten_path = true, - winblend = 0, - width = 0.75, - preview_cutoff = 120, - results_height = 1, - results_width = 0.8, + }, + layout_config = { + + width = 0.8, + height = 1, + prompt_position = "top", + prompt_prefix = "  ", + selection_caret = " ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "descending", + layout_strategy = "horizontal", + winblend = 0, + shorten_path = true, + preview_cutoff = 120, + file_sorter = require "telescope.sorters".get_fuzzy_file, + file_ignore_patterns = {}, + generic_sorter = require "telescope.sorters".get_generic_fuzzy_sorter, + horizontal = { + mirror = false, + preview_width = 0.55 + }, + vertical = { + mirror = false + }, + }, border = {}, borderchars = {"─", "│", "─", "│", "╭", "╮", "╯", "╰"}, color_devicons = true, @@ -48,21 +49,20 @@ M.config = function() qflist_previewer = require "telescope.previewers".vim_buffer_qflist.new, -- Developer configurations: Not meant for general override buffer_previewer_maker = require "telescope.previewers".buffer_previewer_maker - }, - extensions = { - fzf = { - fuzzy = true, -- false will only do exact matching - override_generic_sorter = false, -- override the generic sorter - override_file_sorter = true, -- override the file sorter - case_mode = "smart_case" -- or "ignore_case" or "respect_case" - -- the default case_mode is "smart_case" - }, - media_files = { - filetypes = {"png", "webp", "jpg", "jpeg"}, - find_cmd = "rg" -- find command (defaults to `fd`) - } - } - } + } + extensions = { + fzf = { + fuzzy = true, -- false will only do exact matching + override_file_sorter = true, -- override the file sorter + override_generic_sorter = false, -- override the generic sorter + case_mode = "smart_case" -- or "ignore_case" or "respect_case" + -- the default case_mode is "smart_case" + }, + media_files = { + filetypes = {"png", "webp", "jpg", "jpeg"}, + find_cmd = "rg" -- find command (defaults to `fd`) + } + } require("telescope").load_extension("fzf") require("telescope").load_extension("media_files") From dfe707d6db15e67a81e7e3b98674db9e03daaba0 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 1 Jul 2021 21:38:46 +0530 Subject: [PATCH 0351/1541] Update telescope-nvim.lua --- lua/telescope-nvim.lua | 79 +++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 40 deletions(-) diff --git a/lua/telescope-nvim.lua b/lua/telescope-nvim.lua index 0cd2b77..c18b19a 100644 --- a/lua/telescope-nvim.lua +++ b/lua/telescope-nvim.lua @@ -12,33 +12,31 @@ M.config = function() "--column", "--smart-case" }, - }, + prompt_prefix = "  ", + selection_caret = " ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "descending", + layout_strategy = "horizontal", layout_config = { - - width = 0.8, - height = 1, - prompt_position = "top", - prompt_prefix = "  ", - selection_caret = " ", - entry_prefix = " ", - initial_mode = "insert", - selection_strategy = "reset", - sorting_strategy = "descending", - layout_strategy = "horizontal", - winblend = 0, - shorten_path = true, - preview_cutoff = 120, - file_sorter = require "telescope.sorters".get_fuzzy_file, - file_ignore_patterns = {}, - generic_sorter = require "telescope.sorters".get_generic_fuzzy_sorter, - horizontal = { - mirror = false, - preview_width = 0.55 - }, - vertical = { - mirror = false - }, - }, + horizontal = { + prompt_position = "top", + preview_width = 0.55, + results_width = 0.8 + }, + vertical = { + mirror = false + }, + width = 0.87, + height = 0.80, + preview_cutoff = 120 + }, + file_sorter = require "telescope.sorters".get_fuzzy_file, + file_ignore_patterns = {}, + generic_sorter = require "telescope.sorters".get_generic_fuzzy_sorter, + shorten_path = true, + winblend = 0, border = {}, borderchars = {"─", "│", "─", "│", "╭", "╮", "╯", "╰"}, color_devicons = true, @@ -49,20 +47,21 @@ M.config = function() qflist_previewer = require "telescope.previewers".vim_buffer_qflist.new, -- Developer configurations: Not meant for general override buffer_previewer_maker = require "telescope.previewers".buffer_previewer_maker - } - extensions = { - fzf = { - fuzzy = true, -- false will only do exact matching - override_file_sorter = true, -- override the file sorter - override_generic_sorter = false, -- override the generic sorter - case_mode = "smart_case" -- or "ignore_case" or "respect_case" - -- the default case_mode is "smart_case" - }, - media_files = { - filetypes = {"png", "webp", "jpg", "jpeg"}, - find_cmd = "rg" -- find command (defaults to `fd`) - } - } + }, + extensions = { + fzf = { + fuzzy = true, -- false will only do exact matching + override_generic_sorter = false, -- override the generic sorter + override_file_sorter = true, -- override the file sorter + case_mode = "smart_case" -- or "ignore_case" or "respect_case" + -- the default case_mode is "smart_case" + }, + media_files = { + filetypes = {"png", "webp", "jpg", "jpeg"}, + find_cmd = "rg" -- find command (defaults to `fd`) + } + } + } require("telescope").load_extension("fzf") require("telescope").load_extension("media_files") From 0b842db789767282386bfe1e6d3e59c896b295fa Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Fri, 2 Jul 2021 06:33:12 +0530 Subject: [PATCH 0352/1541] added logos in badges I added some more logos for soothness --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3f59c34..cebd238 100644 --- a/README.md +++ b/README.md @@ -15,18 +15,19 @@
-[![Super Linter](https://img.shields.io/github/workflow/status/siduck76/NvChad/Super-Linter/main?style=flat-square)]() +[![Super Linter](https://img.shields.io/github/workflow/status/siduck76/NvChad/Super-Linter/main?style=flat-square&logo=github)]() GitHub repository size License -[![Gitter](https://img.shields.io/gitter/room/siduck76/NvChad?style=flat-square)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![Gitter](https://img.shields.io/gitter/room/siduck76/NvChad?style=flat-square&logo=gitter&logoColor=white)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![GitHub Issues](https://img.shields.io/badge/Neovim-0.5+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white)]() [![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square)]() Last commit From 45a9c806a223914e29480943d8f38b6f344bb154 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Fri, 2 Jul 2021 07:36:20 +0530 Subject: [PATCH 0353/1541] updated colors of readme updated colors added Neovim logo. --- README.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index cebd238..b5c1f6f 100644 --- a/README.md +++ b/README.md @@ -14,25 +14,23 @@
+[![Gitter](https://img.shields.io/gitter/room/siduck76/NvChad?style=flat-square&logo=gitter&logoColor=white&label=Chat&labelColor=black)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.5+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white&labelColor=black)]() +[![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square&label=Issues&labelColor=black)]() +[![Last Commit](https://img.shields.io/github/last-commit/siduck76/NvChad.svg?style=flat-square&label=Last%20Commit&labelColor=black)]() +

From 4647da671b9572e07e3594641fc932163335e0c2 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Fri, 2 Jul 2021 07:38:32 +0530 Subject: [PATCH 0354/1541] changed color of issues label to red --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b5c1f6f..4eb4049 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ /> [![Gitter](https://img.shields.io/gitter/room/siduck76/NvChad?style=flat-square&logo=gitter&logoColor=white&label=Chat&labelColor=black)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.5+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white&labelColor=black)]() -[![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square&label=Issues&labelColor=black)]() +[![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square&label=Issues&labelColor=black&color=fc0330)]() [![Last Commit](https://img.shields.io/github/last-commit/siduck76/NvChad.svg?style=flat-square&label=Last%20Commit&labelColor=black)]() From c2f857cb9eb94c2bbdd5a1d398b52b771e5d6176 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Fri, 2 Jul 2021 10:19:17 +0530 Subject: [PATCH 0355/1541] update hyperlink of issue badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4eb4049..e0dcfc9 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ /> [![Gitter](https://img.shields.io/gitter/room/siduck76/NvChad?style=flat-square&logo=gitter&logoColor=white&label=Chat&labelColor=black)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.5+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white&labelColor=black)]() -[![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square&label=Issues&labelColor=black&color=fc0330)]() +[![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square&label=Issues&labelColor=black&color=fc0330)](https://github.com/siduck76/NvChad/issues) [![Last Commit](https://img.shields.io/github/last-commit/siduck76/NvChad.svg?style=flat-square&label=Last%20Commit&labelColor=black)]() From 8ddf78a9afc61e301cd8508d124bd8c9c670185b Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Fri, 2 Jul 2021 10:26:07 +0530 Subject: [PATCH 0356/1541] Updated the links of the badges --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e0dcfc9..fb6a52f 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,9 @@ alt="License" /> [![Gitter](https://img.shields.io/gitter/room/siduck76/NvChad?style=flat-square&logo=gitter&logoColor=white&label=Chat&labelColor=black)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.5+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white&labelColor=black)]() +[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.5+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white&labelColor=black)](https://github.com/neovim/neovim) [![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square&label=Issues&labelColor=black&color=fc0330)](https://github.com/siduck76/NvChad/issues) -[![Last Commit](https://img.shields.io/github/last-commit/siduck76/NvChad.svg?style=flat-square&label=Last%20Commit&labelColor=black)]() +[![Last Commit](https://img.shields.io/github/last-commit/siduck76/NvChad.svg?style=flat-square&label=Last%20Commit&labelColor=black)](https://github.com/siduck76/NvChad/pulse)
From 4005cbc854c6cfda13dbcb851826ad3224f2ec1a Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Fri, 2 Jul 2021 11:57:02 +0530 Subject: [PATCH 0357/1541] updated readme.md Made label colors default and changed some colors --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fb6a52f..ebc4afd 100644 --- a/README.md +++ b/README.md @@ -15,21 +15,21 @@
-[![Super Linter](https://img.shields.io/github/workflow/status/siduck76/NvChad/Super-Linter/main?style=flat-square&logo=github&label=Build&labelColor=black)]() +[![Super Linter](https://img.shields.io/github/workflow/status/siduck76/NvChad/Super-Linter/main?style=flat-square&logo=github&label=Build&color=green)]() GitHub repository size License -[![Gitter](https://img.shields.io/gitter/room/siduck76/NvChad?style=flat-square&logo=gitter&logoColor=white&label=Chat&labelColor=black)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.5+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white&labelColor=black)](https://github.com/neovim/neovim) -[![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square&label=Issues&labelColor=black&color=fc0330)](https://github.com/siduck76/NvChad/issues) -[![Last Commit](https://img.shields.io/github/last-commit/siduck76/NvChad.svg?style=flat-square&label=Last%20Commit&labelColor=black)](https://github.com/siduck76/NvChad/pulse) +[![Gitter](https://img.shields.io/gitter/room/siduck76/NvChad?style=flat-square&logo=gitter&logoColor=white&label=Chat&color=eb34a4)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.5+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white)](https://github.com/neovim/neovim) +[![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square&label=Issues&color=fc0330)](https://github.com/siduck76/NvChad/issues) +[![Last Commit](https://img.shields.io/github/last-commit/siduck76/NvChad.svg?style=flat-square&label=Last%20Commit&color=58eb34)](https://github.com/siduck76/NvChad/pulse)
From 48ad79cd93d7fa276b12646ee9a77b9c2e63db2c Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Fri, 2 Jul 2021 13:21:18 +0530 Subject: [PATCH 0358/1541] added made with lua badge in readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index ebc4afd..efa23a5 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,11 @@
+[![Made with Lua](https://img.shields.io/badge/Made%20with%20Lua-blueviolet.svg?style=for-the-badge&logo=lua)] +
+
-[![Made with Lua](https://img.shields.io/badge/Made%20with%20Lua-blueviolet.svg?style=for-the-badge&logo=lua)] +[![Made with Lua](https://img.shields.io/badge/Made%20with%20Lua-blueviolet.svg?style=for-the-badge&logo=lua)]()
From 81ce6877aecd729b2ffb55e8da0a31694a7cf435 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Fri, 2 Jul 2021 13:23:01 +0530 Subject: [PATCH 0360/1541] made changes --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fdea65d..c8e5eed 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,9 @@
-[![Made with Lua](https://img.shields.io/badge/Made%20with%20Lua-blueviolet.svg?style=for-the-badge&logo=lua)]() + +[![Lua](https://img.shields.io/badge/Made%20with%20Lua-blueviolet.svg?style=for-the-badge&logo=lua)]() +
From 50b00f4737740d7cf91150d4847bc3eae262d650 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 2 Jul 2021 15:17:36 +0530 Subject: [PATCH 0361/1541] replace vim-auto-save with AutoSave.nvim --- init.lua | 2 +- lua/mappings.lua | 1 + lua/pluginList.lua | 9 ++++++--- lua/zenmode.lua | 23 +++++++++++++++++++++++ 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 5a6191b..ba17171 100644 --- a/init.lua +++ b/init.lua @@ -6,7 +6,7 @@ require "top-bufferline" local g = vim.g g.mapleader = " " -g.auto_save = 0 +g.auto_save = false -- colorscheme related stuff diff --git a/lua/mappings.lua b/lua/mappings.lua index da1a1aa..885d773 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -32,6 +32,7 @@ map("n", "n", [[ set nu!]], opt) -- Truezen.nvim map("n", "z", ":TZAtaraxis", opt) map("n", "m", ":TZMinimalist", opt) +map("n", "f", ":TZFocus", opt) map("n", "", ":w ", opt) -- vim.cmd("inoremap jh ") diff --git a/lua/pluginList.lua b/lua/pluginList.lua index ff6576f..19a55ca 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -140,9 +140,12 @@ return packer.startup( -- load autosave only if its globally enabled use { - "907th/vim-auto-save", + "Pocco81/AutoSave.nvim", + config = function() + require("zenmode").autoSave() + end, cond = function() - return vim.g.auto_save == 1 + return vim.g.auto_save == true end } @@ -157,7 +160,7 @@ return packer.startup( use { "Pocco81/TrueZen.nvim", - cmd = {"TZAtaraxis", "TZMinimalist"}, + cmd = {"TZAtaraxis", "TZMinimalist", "TZFocus"}, config = function() require("zenmode").config() end diff --git a/lua/zenmode.lua b/lua/zenmode.lua index d1b14b3..e98c535 100644 --- a/lua/zenmode.lua +++ b/lua/zenmode.lua @@ -1,3 +1,5 @@ +-- plugins made by @Pocco81 =) + local M = {} M.config = function() @@ -50,4 +52,25 @@ M.config = function() ) end +-- autosave.nvim plugin disabled by default +M.autoSave = function() + local autosave = require("autosave") + + autosave.setup( + { + enabled = vim.g.auto_save, -- takes boolean value from init.lua + execution_message = "autosaved at : " .. vim.fn.strftime("%H:%M:%S"), + events = {"InsertLeave", "TextChanged"}, + conditions = { + exists = true, + filetype_is_not = {}, + modifiable = true + }, + write_all_buffers = true, + on_off_commands = true, + clean_command_line_interval = 2500 + } + ) +end + return M From 0d9ae5f497721c5c300067ddba7cc0a41bb2c7da Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Sat, 3 Jul 2021 13:06:24 +0530 Subject: [PATCH 0362/1541] updated indent-blankline branch to master In the commit of 17a83ea765831cb0cc64f768b8c3f43479b90bbe the branch of lua was merged to master. --- lua/pluginList.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 19a55ca..6e078ea 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -170,7 +170,7 @@ return packer.startup( use { "lukas-reineke/indent-blankline.nvim", - branch = "lua", + branch = "master", event = "BufRead", setup = function() require("misc-utils").blankline() From c721db661ff3813fb4a241e1e10f078e93696019 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Sat, 3 Jul 2021 13:09:00 +0530 Subject: [PATCH 0363/1541] updated --- lua/pluginList.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 6e078ea..53ccbfb 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -170,7 +170,6 @@ return packer.startup( use { "lukas-reineke/indent-blankline.nvim", - branch = "master", event = "BufRead", setup = function() require("misc-utils").blankline() From d50d11435d37d70631506cad054728509de36fb8 Mon Sep 17 00:00:00 2001 From: ashincoder Date: Sun, 4 Jul 2021 14:38:08 +0530 Subject: [PATCH 0364/1541] changed relative number format to current way --- lua/misc-utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index 6452c21..f188ec2 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -16,7 +16,7 @@ opt.clipboard = "unnamedplus" -- Numbers opt.number = true opt.numberwidth = 2 --- opt("w", "relativenumber", true) +-- opt.relativenumber = true -- for indenline opt.expandtab = true From 57f9d0dbd3fd8c3101a38d164e11aa898a7098cf Mon Sep 17 00:00:00 2001 From: ashincoder Date: Sun, 4 Jul 2021 19:25:37 +0530 Subject: [PATCH 0365/1541] fixed error #121 --- lua/highlights.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/highlights.lua b/lua/highlights.lua index e276211..707de93 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -74,7 +74,7 @@ fg("NvimTreeVertSplit", darker_black) bg("NvimTreeVertSplit", darker_black) fg("NvimTreeEndOfBuffer", darker_black) -fg("NvimTreeRootFolder", darker_black) +fg("NvimTreeRootFolder", blue) bg("NvimTreeNormal", darker_black) fg_bg("NvimTreeStatuslineNc", darker_black, darker_black) fg_bg("NvimTreeWindowPicker", red, black2) From 327c067fd24282107130a7171f7ebbdc59ac891b Mon Sep 17 00:00:00 2001 From: alternateved Date: Sun, 4 Jul 2021 16:19:46 +0200 Subject: [PATCH 0366/1541] Add tomorrow-night theme --- lua/themes/tomorrow-night.lua | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lua/themes/tomorrow-night.lua diff --git a/lua/themes/tomorrow-night.lua b/lua/themes/tomorrow-night.lua new file mode 100644 index 0000000..a80cf29 --- /dev/null +++ b/lua/themes/tomorrow-night.lua @@ -0,0 +1,34 @@ +local colors = { + white = "#c4c8c5", + darker_black = "#1b1f27", + black = "#1d1f21", -- nvim bg + black2 = "#252931", + one_bg = "#363a41", + one_bg2 = "#353b45", + one_bg3 = "#30343c", + grey = "#93979F", + grey_fg = "#545B68", + grey_fg2 = "#6F7581", + light_grey = "#6F7581", + red = "#cc6666", + baby_pink = "#FF6E79", + pink = "#ff9ca3", + line = "#2a2e36", -- for lines like vertsplit + green = "#b5bd68", + vibrant_green = "#d0f0a8", + nord_blue = "#557C9D", + blue = "#80a1bd", + yellow = "#f0c574", + sun = "#e6c446", + purple = "#b4bbc8", + dark_purple = "#b294ba", + teal = "#8abdb6", + orange = "#DE935F", + cyan = "#70c0b1", + + statusline_bg = "#212326", + lightbg = "#373B41", + lightbg2 = "#2D3035" +} + +return colors From 6881fdfefb59054275934b22a178d1a358306b96 Mon Sep 17 00:00:00 2001 From: alternateved Date: Sun, 4 Jul 2021 16:29:16 +0200 Subject: [PATCH 0367/1541] Add background colors in case of different terminal colors --- lua/highlights.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/highlights.lua b/lua/highlights.lua index e276211..438f419 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -142,4 +142,10 @@ fg("DashboardShortcut", grey_fg) fg("DashboardFooter", grey_fg) -- Default nvim bg (based on terminal bg) + +-- Onedark background -- cmd "hi Normal guibg=#1e222a" +-- Gruvbox background +-- cmd "hi Normal guibg=#282828" +-- Tomorrow-ight background +-- cmd "hi Normal guibg=#1d1f21" From e8574170f54277d33b82385bf4452b168fa005f3 Mon Sep 17 00:00:00 2001 From: alternateved <45176912+alternateved@users.noreply.github.com> Date: Sun, 4 Jul 2021 20:14:12 +0200 Subject: [PATCH 0368/1541] Remove tomorrow-night theme --- lua/highlights.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/highlights.lua b/lua/highlights.lua index 438f419..8edd8c1 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -146,6 +146,4 @@ fg("DashboardFooter", grey_fg) -- Onedark background -- cmd "hi Normal guibg=#1e222a" -- Gruvbox background --- cmd "hi Normal guibg=#282828" --- Tomorrow-ight background --- cmd "hi Normal guibg=#1d1f21" +-- cmd "hi Normal guibg=#222526" From a3df1f4cc49cd113d0c94752be980d0b70f2af44 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Mon, 5 Jul 2021 05:52:55 +0530 Subject: [PATCH 0369/1541] Update highlights.lua --- lua/highlights.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/highlights.lua b/lua/highlights.lua index 707de93..e276211 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -74,7 +74,7 @@ fg("NvimTreeVertSplit", darker_black) bg("NvimTreeVertSplit", darker_black) fg("NvimTreeEndOfBuffer", darker_black) -fg("NvimTreeRootFolder", blue) +fg("NvimTreeRootFolder", darker_black) bg("NvimTreeNormal", darker_black) fg_bg("NvimTreeStatuslineNc", darker_black, darker_black) fg_bg("NvimTreeWindowPicker", red, black2) From 27e3cf69bcf2e937d351926250bdfb19292a9fd4 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 3 Jul 2021 09:43:42 +0530 Subject: [PATCH 0370/1541] install.sh: Fix all shellcheck warnings | Misc improvements * modify sed command to work in both gnu sed and mac os sed https://stackoverflow.com/a/4247319 * use printf everywhere for more compatibility * add some error checking --- install.sh | 75 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 28 deletions(-) diff --git a/install.sh b/install.sh index 0fc6888..9784620 100755 --- a/install.sh +++ b/install.sh @@ -1,55 +1,74 @@ #!/bin/sh -get_platform() { - case "$(uname -s)" in - Linux*) platform=Linux ;; - Darwin*) platform=Mac ;; - *) platform="UNKNOWN:${unameOut}" ;; - esac - echo $platform +# check if git command is installed +command -v git > /dev/null || { + printf "Install git before proceeding\n" + exit 1 } -echo "installing packer" +printf "%s\n" "Installing packer" if [ -d ~/.local/share/nvim/site/pack/packer ]; then - echo "Clearning previous packer installs" + printf "%s\n" "Clearning previous packer installs" rm -rf ~/.local/share/nvim/site/pack fi -echo "\n=> Installing packer" -git clone https://github.com/wbthomason/packer.nvim \ - ~/.local/share/nvim/site/pack/packer/start/packer.nvim -echo "=> packer installed!" +printf "\n%s\n" "=> Cloning packer.." +if git clone https://github.com/wbthomason/packer.nvim \ + ~/.local/share/nvim/site/pack/packer/start/packer.nvim; then + printf "%s\n" "=> Packer installed!" +else + printf "Error: Couldn't clone packer\n" + exit 1 +fi -echo "Linking config" -echo "old nvim config will be changed to nvim.bak if exists! :0" +printf "%s\n" "Linking config" +printf "%s\n" "Old nvim config will be changed to nvim.bak if exists! :0" # copying config if [ -d ~/.config/nvim ]; then - echo "Nvim Directory exists" - echo "Changing nvim to nvim.bak" + printf "%s\n" "Nvim Directory exists" + printf "%s\n" "Changing nvim to nvim.bak" mv ~/.config/nvim/ ~/.config/nvim.bak/ - echo "Creating new nvim directory" + printf "%s\n" "Creating new nvim directory" mkdir -p ~/.config/nvim else - echo "Nvim Config doesn't exist so creating one" + printf "%s\n" "Nvim Config doesn't exist so creating one" mkdir -p ~/.config/nvim/ fi -cp -r init.lua ~/.config/nvim/ && cp -r lua ~/.config/nvim/ +{ cp -r init.lua ~/.config/nvim/ && cp -r lua ~/.config/nvim/ ;} || { + printf "Error: Couldn't copy nvim config\n" + exit 1 +} # change shell in nvim config -read -p "which shell do you use?: " shellname -echo "$shellname" +_CURRENT_SHELL="${SHELL##*/}" +printf "%s\n: " "Which shell do you want to use ? [ Enter nothing for current shell ( $_CURRENT_SHELL ) ]" +read -r shellname +shellname="${shellname:-${_CURRENT_SHELL}}" +printf "%s\n" "$shellname" -if [ "$(get_platform)" = "Mac" ]; then - gsed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings.lua +# don't try to do any changes if given shellname is same as bash +if ! [ bash = "$shellname" ]; then + # Reference: https://stackoverflow.com/a/4247319 + if "$(command -v sed)" -i'.bak' -e "s/bash/$shellname/g" ~/.config/nvim/lua/mappings.lua; then + printf "\n%s\n" "=> Shell changed to $shellname on nvim successfully!" + else + printf "\n%s\n" "Cannot edit with sed, edit ~/.config/nvim/lua/mappings.lua manually to replace bash with $shellname." + fi + rm -f ~/.config/nvim/lua/mappings.lua.bak # delete backup file created by sed else - sed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings.lua + printf "\n%s\n" "=> Shell changed to $shellname on nvim successfully!" fi -echo "\n=> shell changed to $shellname on nvim successfully!" -echo "\n=> neovim will open with some errors , just press enter" && sleep 1 +printf "\n%s\n" "=> Neovim will open with some errors, just press enter" && sleep 1 # install all plugins + compile them -nvim +PackerSync +if _NVIM="$(command -v nvim)"; then + "${_NVIM}" +PackerSync +else + printf "Error: Neovim is not installed, install Neovim >= 5.x and then run the below command\n" + printf " nvim +PackerSync\n" + exit 1 +fi From 30e7c8cefefefb3460d242b2d2764e73466e8c38 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 5 Jul 2021 15:25:11 +0530 Subject: [PATCH 0371/1541] Delete FUNDING.yml Since this is just a config , who'd even pay for it lol? Also it having a sponsor button might've create bad image for some people and make them think that NvChad's just created to make some cash! So I'll be removing "the sponsor slap" from here :)) --- .github/FUNDING.yml | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index b026072..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -custom: ['https://www.paypal.me/siduck76'] From 4730350ca893a528b07b516889d188f3d7cfe603 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 5 Jul 2021 15:30:53 +0530 Subject: [PATCH 0372/1541] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c8e5eed..fb7c3e3 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,9 @@ [![Gitter](https://img.shields.io/gitter/room/siduck76/NvChad?style=flat-square&logo=gitter&logoColor=white&label=Chat&color=eb34a4)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.5+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white)](https://github.com/neovim/neovim) [![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square&label=Issues&color=fc0330)](https://github.com/siduck76/NvChad/issues) -[![Last Commit](https://img.shields.io/github/last-commit/siduck76/NvChad.svg?style=flat-square&label=Last%20Commit&color=58eb34)](https://github.com/siduck76/NvChad/pulse) +[![Last Commit](https://img.shields.io/github/last-commit/siduck76/NvChad.svg?style=flat-square&label=Last%20Commit&color=58eb34)](https://github.com/siduck76/NvChad/pulse) +


From 7f6cf1bc4bbc3fe7ca65433f95d350c9902aad38 Mon Sep 17 00:00:00 2001 From: ashincoder Date: Mon, 5 Jul 2021 17:19:12 +0530 Subject: [PATCH 0373/1541] seperate prefix for zen mappings and timeoutlen in settings --- lua/mappings.lua | 6 +++--- lua/misc-utils.lua | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index 885d773..83f7af0 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -30,9 +30,9 @@ map("n", "", [[ %y+]], opt) map("n", "n", [[ set nu!]], opt) -- Truezen.nvim -map("n", "z", ":TZAtaraxis", opt) -map("n", "m", ":TZMinimalist", opt) -map("n", "f", ":TZFocus", opt) +map("n", "zz", ":TZAtaraxis", opt) +map("n", "zm", ":TZMinimalist", opt) +map("n", "zf", ":TZFocus", opt) map("n", "", ":w ", opt) -- vim.cmd("inoremap jh ") diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index f188ec2..a1a1310 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -11,6 +11,7 @@ opt.mouse = "a" opt.signcolumn = "yes" opt.cmdheight = 1 opt.updatetime = 250 -- update interval for gitsigns +opt.timeoutlen = 200 opt.clipboard = "unnamedplus" -- Numbers From ac069fd543e78c0b99fc97ff123533e353eb297d Mon Sep 17 00:00:00 2001 From: alternateved Date: Mon, 5 Jul 2021 14:57:27 +0200 Subject: [PATCH 0374/1541] Update TrueZen.nvim configuration file --- lua/zenmode.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/zenmode.lua b/lua/zenmode.lua index e98c535..ba75a44 100644 --- a/lua/zenmode.lua +++ b/lua/zenmode.lua @@ -74,3 +74,4 @@ M.autoSave = function() end return M + From 8355a055d1887e607607234f6a15712eebb6bd3a Mon Sep 17 00:00:00 2001 From: alternateved Date: Mon, 5 Jul 2021 15:01:50 +0200 Subject: [PATCH 0375/1541] Rework TrueZen.nvim configuration file --- lua/zenmode.lua | 68 +++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/lua/zenmode.lua b/lua/zenmode.lua index ba75a44..3f679d7 100644 --- a/lua/zenmode.lua +++ b/lua/zenmode.lua @@ -5,51 +5,54 @@ local M = {} M.config = function() local true_zen = require("true-zen") - true_zen.setup( - { - true_false_commands = false, + true_zen.setup({ + misc = { + on_off_commands = false, + ui_elements_commands = false, cursor_by_mode = false, before_minimalist_mode_shown = true, before_minimalist_mode_hidden = true, after_minimalist_mode_shown = true, after_minimalist_mode_hidden = true, + }, + ui = { bottom = { - hidden_laststatus = 0, - hidden_ruler = false, - hidden_showmode = false, - hidden_showcmd = false, - hidden_cmdheight = 1, - shown_laststatus = 2, - shown_ruler = true, - shown_showmode = false, - shown_showcmd = false, - shown_cmdheight = 1 + laststatus = 0, + ruler = false, + showmode = false, + showcmd = false, + cmdheight = 1, }, top = { - hidden_showtabline = 0, - shown_showtabline = 2 + showtabline = 0, }, left = { - hidden_number = false, - hidden_relativenumber = false, - hidden_signcolumn = "no", - shown_number = true, - shown_relativenumber = false, - shown_signcolumn = "yes" + number = false, + relativenumber = false, + signcolumn = "no", }, + }, + modes = { ataraxis = { - just_do_it_for_me = false, - left_padding = 37, - right_padding = 37, - top_padding = 2, - bottom_padding = 2, - custome_bg = "#1e222a" + left_padding = 37, + right_padding = 37, + top_padding = 2, + bottom_padding = 2, + just_do_it_for_me = false, + ideal_writing_area_width = 0, + keep_default_fold_fillchars = true, + custome_bg = "#1e222a", }, - integrations = { - integration_galaxyline = true - } - } - ) + focus = { + margin_of_error = 5, + focus_method = "experimental" + }, + }, + integrations = { + galaxyline = true, + nvim_bufferline = true, + } + }) end -- autosave.nvim plugin disabled by default @@ -74,4 +77,3 @@ M.autoSave = function() end return M - From 07d3192f6fc2abbed280daa53be5315d5530a370 Mon Sep 17 00:00:00 2001 From: alternateved <45176912+alternateved@users.noreply.github.com> Date: Mon, 5 Jul 2021 18:32:38 +0200 Subject: [PATCH 0376/1541] Remove blue-ish tint from darker_black --- lua/themes/tomorrow-night.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/themes/tomorrow-night.lua b/lua/themes/tomorrow-night.lua index a80cf29..d606b7d 100644 --- a/lua/themes/tomorrow-night.lua +++ b/lua/themes/tomorrow-night.lua @@ -1,6 +1,6 @@ local colors = { white = "#c4c8c5", - darker_black = "#1b1f27", + darker_black = "#141517", black = "#1d1f21", -- nvim bg black2 = "#252931", one_bg = "#363a41", From 20c3eca0b699800bc3fd288b56f8e6679625d4e4 Mon Sep 17 00:00:00 2001 From: alternateved <45176912+alternateved@users.noreply.github.com> Date: Mon, 5 Jul 2021 18:41:37 +0200 Subject: [PATCH 0377/1541] Make darker_black less dark --- lua/themes/tomorrow-night.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/themes/tomorrow-night.lua b/lua/themes/tomorrow-night.lua index d606b7d..9b26743 100644 --- a/lua/themes/tomorrow-night.lua +++ b/lua/themes/tomorrow-night.lua @@ -1,6 +1,6 @@ local colors = { white = "#c4c8c5", - darker_black = "#141517", + darker_black = "#131517", black = "#1d1f21", -- nvim bg black2 = "#252931", one_bg = "#363a41", From 02b4194e1e5f8376036fa502af13b2bc7caccdcb Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 5 Jul 2021 22:24:30 +0530 Subject: [PATCH 0378/1541] Update highlights.lua --- lua/highlights.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lua/highlights.lua b/lua/highlights.lua index 8edd8c1..afe4b53 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -141,9 +141,11 @@ fg("DashboardCenter", grey_fg) fg("DashboardShortcut", grey_fg) fg("DashboardFooter", grey_fg) --- Default nvim bg (based on terminal bg) +-- set bg color for nvim ( so nvim wont use terminal bg) --- Onedark background --- cmd "hi Normal guibg=#1e222a" --- Gruvbox background --- cmd "hi Normal guibg=#222526" +-- NvChad themes bg colors +-- Onedark #1e222a +-- Gruvbox #222526 +-- tomorrow night #1d1f21 + +-- bg("Normal", "#1e222a") -- change the hex color here. From 7db1fb75b9a9c768ef7d40f26ba2250f50ea1931 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 5 Jul 2021 23:03:38 +0530 Subject: [PATCH 0379/1541] use better colors for tomorrow-night theme --- lua/themes/tomorrow-night.lua | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lua/themes/tomorrow-night.lua b/lua/themes/tomorrow-night.lua index 9b26743..864463b 100644 --- a/lua/themes/tomorrow-night.lua +++ b/lua/themes/tomorrow-night.lua @@ -1,19 +1,19 @@ local colors = { - white = "#c4c8c5", - darker_black = "#131517", - black = "#1d1f21", -- nvim bg - black2 = "#252931", + white = "#C5C8C2", + darker_black = "#191b1d", + black = "#1d1f21", -- nvim bg + black2 = "#232527", one_bg = "#363a41", one_bg2 = "#353b45", one_bg3 = "#30343c", - grey = "#93979F", + grey = "#434547", grey_fg = "#545B68", grey_fg2 = "#6F7581", light_grey = "#6F7581", red = "#cc6666", baby_pink = "#FF6E79", pink = "#ff9ca3", - line = "#2a2e36", -- for lines like vertsplit + line = "#27292b", -- for lines like vertsplit green = "#b5bd68", vibrant_green = "#d0f0a8", nord_blue = "#557C9D", @@ -25,7 +25,6 @@ local colors = { teal = "#8abdb6", orange = "#DE935F", cyan = "#70c0b1", - statusline_bg = "#212326", lightbg = "#373B41", lightbg2 = "#2D3035" From 8b4118605b8f372256ee9248b7d319e59b7d49dc Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 5 Jul 2021 23:27:41 +0530 Subject: [PATCH 0380/1541] add parenthesis for function completion --- lua/pluginList.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 53ccbfb..093d5a9 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -53,6 +53,12 @@ return packer.startup( event = "InsertEnter", config = function() require("compe-completion").config() + require("nvim-autopairs.completion.compe").setup( + { + map_cr = true, + map_complete = true -- insert () func completion + } + ) end, wants = {"LuaSnip"}, requires = { @@ -106,6 +112,7 @@ return packer.startup( -- misc plugins use { "windwp/nvim-autopairs", + after = "nvim-compe", event = "InsertEnter", config = function() require("nvim-autopairs").setup() From b16c5a2f70e632a439820869dd8abd1b48a16a4e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 6 Jul 2021 13:39:23 +0530 Subject: [PATCH 0381/1541] autopairs parenthesis autoinsert after function completion --- lua/pluginList.lua | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 093d5a9..2b6abfd 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -53,12 +53,6 @@ return packer.startup( event = "InsertEnter", config = function() require("compe-completion").config() - require("nvim-autopairs.completion.compe").setup( - { - map_cr = true, - map_complete = true -- insert () func completion - } - ) end, wants = {"LuaSnip"}, requires = { @@ -113,9 +107,14 @@ return packer.startup( use { "windwp/nvim-autopairs", after = "nvim-compe", - event = "InsertEnter", config = function() require("nvim-autopairs").setup() + require("nvim-autopairs.completion.compe").setup( + { + map_cr = true, + map_complete = true -- insert () func completion + } + ) end } From e219b04e82769251b700185a566bc8bdcb8538fa Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 7 Jul 2021 22:19:51 +0530 Subject: [PATCH 0382/1541] better colors --- lua/themes/tomorrow-night.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lua/themes/tomorrow-night.lua b/lua/themes/tomorrow-night.lua index 864463b..7d721c7 100644 --- a/lua/themes/tomorrow-night.lua +++ b/lua/themes/tomorrow-night.lua @@ -8,20 +8,20 @@ local colors = { one_bg3 = "#30343c", grey = "#434547", grey_fg = "#545B68", - grey_fg2 = "#6F7581", - light_grey = "#6F7581", + grey_fg2 = "#616875", + light_grey = "#676e7b", red = "#cc6666", baby_pink = "#FF6E79", pink = "#ff9ca3", line = "#27292b", -- for lines like vertsplit - green = "#b5bd68", - vibrant_green = "#d0f0a8", - nord_blue = "#557C9D", - blue = "#80a1bd", - yellow = "#f0c574", - sun = "#e6c446", + green = "#a4b595", + vibrant_green = "#a3b991", + nord_blue = "#728da8", + blue = "#6f8dab", + yellow = "#d7bd8d", + sun = "#e4c180", purple = "#b4bbc8", - dark_purple = "#b294ba", + dark_purple = "#b290ac", teal = "#8abdb6", orange = "#DE935F", cyan = "#70c0b1", From c6084220de109b55fe0fa13b39826020cdcbcb32 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 9 Jul 2021 09:14:04 +0530 Subject: [PATCH 0383/1541] improve config structure --- init.lua | 16 +- lua/file-icons.lua | 117 ---------- lua/{misc-utils.lua => options.lua} | 13 -- lua/pluginList.lua | 53 +++-- .../bufferline.lua} | 0 .../compe.lua} | 2 +- lua/{ => plugins}/dashboard.lua | 4 + .../gitsigns.lua} | 0 lua/plugins/icons.lua | 123 ++++++++++ .../lspconfig.lua} | 0 lua/{nvimTree.lua => plugins/nvimtree.lua} | 0 lua/plugins/statusline.lua | 212 ++++++++++++++++++ .../telescope.lua} | 0 .../treesitter.lua} | 0 lua/plugins/zenmode.lua | 81 +++++++ lua/statusline.lua | 207 ----------------- lua/utils.lua | 27 +++ lua/zenmode.lua | 79 ------- 18 files changed, 485 insertions(+), 449 deletions(-) delete mode 100644 lua/file-icons.lua rename lua/{misc-utils.lua => options.lua} (75%) rename lua/{top-bufferline.lua => plugins/bufferline.lua} (100%) rename lua/{compe-completion.lua => plugins/compe.lua} (96%) rename lua/{ => plugins}/dashboard.lua (92%) rename lua/{gitsigns-nvim.lua => plugins/gitsigns.lua} (100%) create mode 100644 lua/plugins/icons.lua rename lua/{nvim-lspconfig.lua => plugins/lspconfig.lua} (100%) rename lua/{nvimTree.lua => plugins/nvimtree.lua} (100%) create mode 100644 lua/plugins/statusline.lua rename lua/{telescope-nvim.lua => plugins/telescope.lua} (100%) rename lua/{treesitter-nvim.lua => plugins/treesitter.lua} (100%) create mode 100644 lua/plugins/zenmode.lua delete mode 100644 lua/statusline.lua create mode 100644 lua/utils.lua delete mode 100644 lua/zenmode.lua diff --git a/init.lua b/init.lua index ba17171..25ba2bd 100644 --- a/init.lua +++ b/init.lua @@ -1,7 +1,7 @@ -- load all plugins require "pluginList" -require "misc-utils" -require "top-bufferline" +require "options" +require "plugins.bufferline" local g = vim.g @@ -16,15 +16,5 @@ base16(base16.themes["onedark"], true) require "highlights" require "mappings" -require "file-icons" -require "statusline" --- hide line numbers , statusline in specific buffers! -vim.api.nvim_exec( - [[ - au BufEnter term://* setlocal nonumber - au BufEnter,BufWinEnter,WinEnter,CmdwinEnter * if bufname('%') == "NvimTree" | set laststatus=0 | else | set laststatus=2 | endif - au BufEnter term://* set laststatus=0 -]], - false -) +require("utils").hideStuff() diff --git a/lua/file-icons.lua b/lua/file-icons.lua deleted file mode 100644 index 3b16c21..0000000 --- a/lua/file-icons.lua +++ /dev/null @@ -1,117 +0,0 @@ -local global_theme = "themes/" .. vim.g.nvchad_theme -local colors = require(global_theme) - -require "nvim-web-devicons".setup { - override = { - html = { - icon = "", - color = colors.baby_pink, - name = "html" - }, - css = { - icon = "", - color = colors.blue, - name = "css" - }, - js = { - icon = "", - color = colors.sun, - name = "js" - }, - ts = { - icon = "ﯤ", - color = colors.teal, - name = "ts" - }, - kt = { - icon = "󱈙", - color = colors.orange, - name = "kt" - }, - png = { - icon = "", - color = colors.dark_purple, - name = "png" - }, - jpg = { - icon = "", - color = colors.dark_purple, - name = "jpg" - }, - jpeg = { - icon = "", - color = "colors.dark_purple", - name = "jpeg" - }, - mp3 = { - icon = "", - color = colors.white, - name = "mp3" - }, - mp4 = { - icon = "", - color = colors.white, - name = "mp4" - }, - out = { - icon = "", - color = colors.white, - name = "out" - }, - Dockerfile = { - icon = "", - color = colors.cyan, - name = "Dockerfile" - }, - rb = { - icon = "", - color = colors.pink, - name = "rb" - }, - vue = { - icon = "﵂", - color = colors.vibrant_green, - name = "vue" - }, - py = { - icon = "", - color = colors.cyan, - name = "py" - }, - toml = { - icon = "", - color = colors.blue, - name = "toml" - }, - lock = { - icon = "", - color = colors.red, - name = "lock" - }, - zip = { - icon = "", - color = colors.sun, - name = "zip" - }, - xz = { - icon = "", - color = colors.sun, - name = "xz" - }, - deb = { - icon = "", - color = colors.cyan, - name = "deb" - }, - rpm = { - icon = "", - color = colors.orange, - name = "rpm" - }, - lua = { - icon = "", - color = colors.blue, - name = "lua" - } - } -} diff --git a/lua/misc-utils.lua b/lua/options.lua similarity index 75% rename from lua/misc-utils.lua rename to lua/options.lua index a1a1310..81c6a2d 100644 --- a/lua/misc-utils.lua +++ b/lua/options.lua @@ -51,17 +51,4 @@ end -- file extension specific tabbing -- vim.cmd([[autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]]) --- blankline config - -M.blankline = function() - vim.g.indentLine_enabled = 1 - vim.g.indent_blankline_char = "▏" - - vim.g.indent_blankline_filetype_exclude = {"help", "terminal", "dashboard"} - vim.g.indent_blankline_buftype_exclude = {"terminal"} - - vim.g.indent_blankline_show_trailing_blankline_indent = false - vim.g.indent_blankline_show_first_indent_level = false -end - return M diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 2b6abfd..1eb18f4 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -1,12 +1,26 @@ local packer = require("packer") local use = packer.use +packer.init { + display = { + open_fn = function() + return require("packer.util").float {border = "single"} + end + } +} + return packer.startup( function() use "wbthomason/packer.nvim" use "akinsho/nvim-bufferline.lua" - use "glepnir/galaxyline.nvim" + + use { + "glepnir/galaxyline.nvim", + config = function() + require("plugins.statusline").config() + end + } -- color related stuff use "siduck76/nvim-base16.lua" @@ -25,7 +39,7 @@ return packer.startup( "nvim-treesitter/nvim-treesitter", event = "BufRead", config = function() - require("treesitter-nvim").config() + require("plugins.treesitter").config() end } @@ -33,7 +47,7 @@ return packer.startup( "neovim/nvim-lspconfig", event = "BufRead", config = function() - require("nvim-lspconfig").config() + require("plugins.lspconfig").config() end } @@ -52,7 +66,7 @@ return packer.startup( "hrsh7th/nvim-compe", event = "InsertEnter", config = function() - require("compe-completion").config() + require("plugins.compe").config() end, wants = {"LuaSnip"}, requires = { @@ -61,7 +75,7 @@ return packer.startup( wants = "friendly-snippets", event = "InsertCharPre", config = function() - require("compe-completion").snippets() + require("plugins.compe").snippets() end }, "rafamadriz/friendly-snippets" @@ -75,11 +89,17 @@ return packer.startup( "kyazdani42/nvim-tree.lua", cmd = "NvimTreeToggle", config = function() - require("nvimTree").config() + require("plugins.nvimtree").config() + end + } + + use { + "kyazdani42/nvim-web-devicons", + config = function() + require("plugins.icons").config() end } - use "kyazdani42/nvim-web-devicons" use { "nvim-telescope/telescope.nvim", requires = { @@ -90,7 +110,7 @@ return packer.startup( }, cmd = "Telescope", config = function() - require("telescope-nvim").config() + require("plugins.telescope").config() end } @@ -99,7 +119,7 @@ return packer.startup( "lewis6991/gitsigns.nvim", event = "BufRead", config = function() - require("gitsigns-nvim").config() + require("plugins.gitsigns").config() end } @@ -138,7 +158,7 @@ return packer.startup( "SessionSave" }, setup = function() - require("dashboard").config() + require("plugins.dashboard").config() end } @@ -148,7 +168,7 @@ return packer.startup( use { "Pocco81/AutoSave.nvim", config = function() - require("zenmode").autoSave() + require("plugins.zenmode").autoSave() end, cond = function() return vim.g.auto_save == true @@ -168,7 +188,7 @@ return packer.startup( "Pocco81/TrueZen.nvim", cmd = {"TZAtaraxis", "TZMinimalist", "TZFocus"}, config = function() - require("zenmode").config() + require("plugins.zenmode").config() end } @@ -178,13 +198,8 @@ return packer.startup( "lukas-reineke/indent-blankline.nvim", event = "BufRead", setup = function() - require("misc-utils").blankline() + require("utils").blankline() end } - end, - { - display = { - border = {"┌", "─", "┐", "│", "┘", "─", "└", "│"} - } - } + end ) diff --git a/lua/top-bufferline.lua b/lua/plugins/bufferline.lua similarity index 100% rename from lua/top-bufferline.lua rename to lua/plugins/bufferline.lua diff --git a/lua/compe-completion.lua b/lua/plugins/compe.lua similarity index 96% rename from lua/compe-completion.lua rename to lua/plugins/compe.lua index 259098b..cdf0235 100644 --- a/lua/compe-completion.lua +++ b/lua/plugins/compe.lua @@ -18,7 +18,7 @@ M.config = function() buffer = {kind = "﬘", true}, luasnip = {kind = "﬌", true}, nvim_lsp = true, - nvim_lua = true, + nvim_lua = true } } end diff --git a/lua/dashboard.lua b/lua/plugins/dashboard.lua similarity index 92% rename from lua/dashboard.lua rename to lua/plugins/dashboard.lua index 5fda4c7..1e4ea0c 100644 --- a/lua/dashboard.lua +++ b/lua/plugins/dashboard.lua @@ -2,6 +2,9 @@ local M = {} M.config = function() local g = vim.g + local fn = vim.fn + + local plugins_count = fn.len(fn.globpath("~/.local/share/nvim/site/pack/packer/start", "*", 0, 1)) g.dashboard_disable_at_vimenter = 1 -- dashboard is disabled by default g.dashboard_disable_statusline = 1 @@ -35,6 +38,7 @@ M.config = function() g.dashboard_custom_footer = { " ", + -- "NvChad Loaded " .. plugins_count .. " plugins", "NvChad v0.5" } end diff --git a/lua/gitsigns-nvim.lua b/lua/plugins/gitsigns.lua similarity index 100% rename from lua/gitsigns-nvim.lua rename to lua/plugins/gitsigns.lua diff --git a/lua/plugins/icons.lua b/lua/plugins/icons.lua new file mode 100644 index 0000000..63ce7d2 --- /dev/null +++ b/lua/plugins/icons.lua @@ -0,0 +1,123 @@ +local M = {} + +M.config = function() + local global_theme = "themes/" .. vim.g.nvchad_theme + local colors = require(global_theme) + + require "nvim-web-devicons".setup { + override = { + html = { + icon = "", + color = colors.baby_pink, + name = "html" + }, + css = { + icon = "", + color = colors.blue, + name = "css" + }, + js = { + icon = "", + color = colors.sun, + name = "js" + }, + ts = { + icon = "ﯤ", + color = colors.teal, + name = "ts" + }, + kt = { + icon = "󱈙", + color = colors.orange, + name = "kt" + }, + png = { + icon = "", + color = colors.dark_purple, + name = "png" + }, + jpg = { + icon = "", + color = colors.dark_purple, + name = "jpg" + }, + jpeg = { + icon = "", + color = "colors.dark_purple", + name = "jpeg" + }, + mp3 = { + icon = "", + color = colors.white, + name = "mp3" + }, + mp4 = { + icon = "", + color = colors.white, + name = "mp4" + }, + out = { + icon = "", + color = colors.white, + name = "out" + }, + Dockerfile = { + icon = "", + color = colors.cyan, + name = "Dockerfile" + }, + rb = { + icon = "", + color = colors.pink, + name = "rb" + }, + vue = { + icon = "﵂", + color = colors.vibrant_green, + name = "vue" + }, + py = { + icon = "", + color = colors.cyan, + name = "py" + }, + toml = { + icon = "", + color = colors.blue, + name = "toml" + }, + lock = { + icon = "", + color = colors.red, + name = "lock" + }, + zip = { + icon = "", + color = colors.sun, + name = "zip" + }, + xz = { + icon = "", + color = colors.sun, + name = "xz" + }, + deb = { + icon = "", + color = colors.cyan, + name = "deb" + }, + rpm = { + icon = "", + color = colors.orange, + name = "rpm" + }, + lua = { + icon = "", + color = colors.blue, + name = "lua" + } + } + } +end + +return M diff --git a/lua/nvim-lspconfig.lua b/lua/plugins/lspconfig.lua similarity index 100% rename from lua/nvim-lspconfig.lua rename to lua/plugins/lspconfig.lua diff --git a/lua/nvimTree.lua b/lua/plugins/nvimtree.lua similarity index 100% rename from lua/nvimTree.lua rename to lua/plugins/nvimtree.lua diff --git a/lua/plugins/statusline.lua b/lua/plugins/statusline.lua new file mode 100644 index 0000000..eb675d5 --- /dev/null +++ b/lua/plugins/statusline.lua @@ -0,0 +1,212 @@ +local M = {} + +M.config = function() + local gl = require("galaxyline") + local gls = gl.section + local condition = require("galaxyline.condition") + + gl.short_line_list = {" "} + + local global_theme = "themes/" .. vim.g.nvchad_theme + local colors = require(global_theme) + + gls.left[1] = { + FirstElement = { + provider = function() + return "▋" + end, + highlight = {colors.nord_blue, colors.nord_blue} + } + } + + gls.left[2] = { + statusIcon = { + provider = function() + return "  " + end, + highlight = {colors.statusline_bg, colors.nord_blue}, + separator = " ", + separator_highlight = {colors.nord_blue, colors.lightbg} + } + } + + gls.left[3] = { + FileIcon = { + provider = "FileIcon", + condition = condition.buffer_not_empty, + highlight = {colors.white, colors.lightbg} + } + } + + gls.left[4] = { + FileName = { + provider = {"FileName"}, + condition = condition.buffer_not_empty, + highlight = {colors.white, colors.lightbg}, + separator = " ", + separator_highlight = {colors.lightbg, colors.lightbg2} + } + } + + gls.left[5] = { + current_dir = { + provider = function() + local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") + return "  " .. dir_name .. " " + end, + highlight = {colors.grey_fg2, colors.lightbg2}, + separator = " ", + separator_highlight = {colors.lightbg2, colors.statusline_bg} + } + } + + local checkwidth = function() + local squeeze_width = vim.fn.winwidth(0) / 2 + if squeeze_width > 30 then + return true + end + return false + end + + gls.left[6] = { + DiffAdd = { + provider = "DiffAdd", + condition = checkwidth, + icon = "  ", + highlight = {colors.white, colors.statusline_bg} + } + } + + gls.left[7] = { + DiffModified = { + provider = "DiffModified", + condition = checkwidth, + icon = "  ", + highlight = {colors.grey_fg2, colors.statusline_bg} + } + } + + gls.left[8] = { + DiffRemove = { + provider = "DiffRemove", + condition = checkwidth, + icon = "  ", + highlight = {colors.grey_fg2, colors.statusline_bg} + } + } + + gls.left[9] = { + DiagnosticError = { + provider = "DiagnosticError", + icon = "  ", + highlight = {colors.red, colors.statusline_bg} + } + } + + gls.left[10] = { + DiagnosticWarn = { + provider = "DiagnosticWarn", + icon = "  ", + highlight = {colors.yellow, colors.statusline_bg} + } + } + + gls.right[1] = { + lsp_status = { + provider = function() + local clients = vim.lsp.get_active_clients() + if next(clients) ~= nil then + return " " .. "  " .. " LSP " + else + return "" + end + end, + highlight = {colors.grey_fg2, colors.statusline_bg} + } + } + + gls.right[2] = { + GitIcon = { + provider = function() + return " " + end, + condition = require("galaxyline.condition").check_git_workspace, + highlight = {colors.grey_fg2, colors.statusline_bg}, + separator = " ", + separator_highlight = {colors.statusline_bg, colors.statusline_bg} + } + } + + gls.right[3] = { + GitBranch = { + provider = "GitBranch", + condition = require("galaxyline.condition").check_git_workspace, + highlight = {colors.grey_fg2, colors.statusline_bg} + } + } + + gls.right[4] = { + viMode_icon = { + provider = function() + return " " + end, + highlight = {colors.statusline_bg, colors.red}, + separator = " ", + separator_highlight = {colors.red, colors.statusline_bg} + } + } + + gls.right[5] = { + ViMode = { + provider = function() + local alias = { + n = "Normal", + i = "Insert", + c = "Command", + V = "Visual", + [""] = "Visual", + v = "Visual", + R = "Replace" + } + local current_Mode = alias[vim.fn.mode()] + + if current_Mode == nil then + return " Terminal " + else + return " " .. current_Mode .. " " + end + end, + highlight = {colors.red, colors.lightbg} + } + } + + gls.right[6] = { + some_icon = { + provider = function() + return " " + end, + separator = "", + separator_highlight = {colors.green, colors.lightbg}, + highlight = {colors.lightbg, colors.green} + } + } + + gls.right[7] = { + line_percentage = { + provider = function() + local current_line = vim.fn.line(".") + local total_line = vim.fn.line("$") + + if current_line == 1 then + return " Top " + elseif current_line == vim.fn.line("$") then + return " Bot " + end + local result, _ = math.modf((current_line / total_line) * 100) + return " " .. result .. "% " + end, + highlight = {colors.green, colors.lightbg} + } + } +end +return M diff --git a/lua/telescope-nvim.lua b/lua/plugins/telescope.lua similarity index 100% rename from lua/telescope-nvim.lua rename to lua/plugins/telescope.lua diff --git a/lua/treesitter-nvim.lua b/lua/plugins/treesitter.lua similarity index 100% rename from lua/treesitter-nvim.lua rename to lua/plugins/treesitter.lua diff --git a/lua/plugins/zenmode.lua b/lua/plugins/zenmode.lua new file mode 100644 index 0000000..eb8455c --- /dev/null +++ b/lua/plugins/zenmode.lua @@ -0,0 +1,81 @@ +-- plugins made by @Pocco81 =) + +local M = {} + +M.config = function() + local true_zen = require("true-zen") + + true_zen.setup( + { + misc = { + on_off_commands = false, + ui_elements_commands = false, + cursor_by_mode = false, + before_minimalist_mode_shown = true, + before_minimalist_mode_hidden = true, + after_minimalist_mode_shown = true, + after_minimalist_mode_hidden = true + }, + ui = { + bottom = { + laststatus = 0, + ruler = false, + showmode = false, + showcmd = false, + cmdheight = 1 + }, + top = { + showtabline = 0 + }, + left = { + number = false, + relativenumber = false, + signcolumn = "no" + } + }, + modes = { + ataraxis = { + left_padding = 37, + right_padding = 37, + top_padding = 2, + bottom_padding = 2, + just_do_it_for_me = false, + ideal_writing_area_width = 0, + keep_default_fold_fillchars = true, + custome_bg = "#1e222a" + }, + focus = { + margin_of_error = 5, + focus_method = "experimental" + } + }, + integrations = { + galaxyline = true, + nvim_bufferline = true + } + } + ) +end + +-- autosave.nvim plugin disabled by default +M.autoSave = function() + local autosave = require("autosave") + + autosave.setup( + { + enabled = vim.g.auto_save, -- takes boolean value from init.lua + execution_message = "autosaved at : " .. vim.fn.strftime("%H:%M:%S"), + events = {"InsertLeave", "TextChanged"}, + conditions = { + exists = true, + filetype_is_not = {}, + modifiable = true + }, + write_all_buffers = true, + on_off_commands = true, + clean_command_line_interval = 2500 + } + ) +end + +return M diff --git a/lua/statusline.lua b/lua/statusline.lua deleted file mode 100644 index ea45845..0000000 --- a/lua/statusline.lua +++ /dev/null @@ -1,207 +0,0 @@ -local gl = require("galaxyline") -local gls = gl.section -local condition = require("galaxyline.condition") - -gl.short_line_list = {" "} - -local global_theme = "themes/" .. vim.g.nvchad_theme -local colors = require(global_theme) - -gls.left[1] = { - FirstElement = { - provider = function() - return "▋" - end, - highlight = {colors.nord_blue, colors.nord_blue} - } -} - -gls.left[2] = { - statusIcon = { - provider = function() - return "  " - end, - highlight = {colors.statusline_bg, colors.nord_blue}, - separator = " ", - separator_highlight = {colors.nord_blue, colors.lightbg} - } -} - -gls.left[3] = { - FileIcon = { - provider = "FileIcon", - condition = condition.buffer_not_empty, - highlight = {colors.white, colors.lightbg} - } -} - -gls.left[4] = { - FileName = { - provider = {"FileName"}, - condition = condition.buffer_not_empty, - highlight = {colors.white, colors.lightbg}, - separator = " ", - separator_highlight = {colors.lightbg, colors.lightbg2} - } -} - -gls.left[5] = { - current_dir = { - provider = function() - local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") - return "  " .. dir_name .. " " - end, - highlight = {colors.grey_fg2, colors.lightbg2}, - separator = " ", - separator_highlight = {colors.lightbg2, colors.statusline_bg} - } -} - -local checkwidth = function() - local squeeze_width = vim.fn.winwidth(0) / 2 - if squeeze_width > 30 then - return true - end - return false -end - -gls.left[6] = { - DiffAdd = { - provider = "DiffAdd", - condition = checkwidth, - icon = "  ", - highlight = {colors.white, colors.statusline_bg} - } -} - -gls.left[7] = { - DiffModified = { - provider = "DiffModified", - condition = checkwidth, - icon = "  ", - highlight = {colors.grey_fg2, colors.statusline_bg} - } -} - -gls.left[8] = { - DiffRemove = { - provider = "DiffRemove", - condition = checkwidth, - icon = "  ", - highlight = {colors.grey_fg2, colors.statusline_bg} - } -} - -gls.left[9] = { - DiagnosticError = { - provider = "DiagnosticError", - icon = "  ", - highlight = {colors.red, colors.statusline_bg} - } -} - -gls.left[10] = { - DiagnosticWarn = { - provider = "DiagnosticWarn", - icon = "  ", - highlight = {colors.yellow, colors.statusline_bg} - } -} - -gls.right[1] = { - lsp_status = { - provider = function() - local clients = vim.lsp.get_active_clients() - if next(clients) ~= nil then - return " " .. "  " .. " LSP " - else - return "" - end - end, - highlight = {colors.grey_fg2, colors.statusline_bg} - } -} - -gls.right[2] = { - GitIcon = { - provider = function() - return " " - end, - condition = require("galaxyline.condition").check_git_workspace, - highlight = {colors.grey_fg2, colors.statusline_bg}, - separator = " ", - separator_highlight = {colors.statusline_bg, colors.statusline_bg} - } -} - -gls.right[3] = { - GitBranch = { - provider = "GitBranch", - condition = require("galaxyline.condition").check_git_workspace, - highlight = {colors.grey_fg2, colors.statusline_bg} - } -} - -gls.right[4] = { - viMode_icon = { - provider = function() - return " " - end, - highlight = {colors.statusline_bg, colors.red}, - separator = " ", - separator_highlight = {colors.red, colors.statusline_bg} - } -} - -gls.right[5] = { - ViMode = { - provider = function() - local alias = { - n = "Normal", - i = "Insert", - c = "Command", - V = "Visual", - [""] = "Visual", - v = "Visual", - R = "Replace" - } - local current_Mode = alias[vim.fn.mode()] - - if current_Mode == nil then - return " Terminal " - else - return " " .. current_Mode .. " " - end - end, - highlight = {colors.red, colors.lightbg} - } -} - -gls.right[6] = { - some_icon = { - provider = function() - return " " - end, - separator = "", - separator_highlight = {colors.green, colors.lightbg}, - highlight = {colors.lightbg, colors.green} - } -} - -gls.right[7] = { - line_percentage = { - provider = function() - local current_line = vim.fn.line(".") - local total_line = vim.fn.line("$") - - if current_line == 1 then - return " Top " - elseif current_line == vim.fn.line("$") then - return " Bot " - end - local result, _ = math.modf((current_line / total_line) * 100) - return " " .. result .. "% " - end, - highlight = {colors.green, colors.lightbg} - } -} diff --git a/lua/utils.lua b/lua/utils.lua new file mode 100644 index 0000000..db5dea2 --- /dev/null +++ b/lua/utils.lua @@ -0,0 +1,27 @@ +local M = {} + +-- blankline config +M.blankline = function() + vim.g.indentLine_enabled = 1 + vim.g.indent_blankline_char = "▏" + + vim.g.indent_blankline_filetype_exclude = {"help", "terminal", "dashboard"} + vim.g.indent_blankline_buftype_exclude = {"terminal"} + + vim.g.indent_blankline_show_trailing_blankline_indent = false + vim.g.indent_blankline_show_first_indent_level = false +end + +-- hide line numbers , statusline in specific buffers! +M.hideStuff = function() + vim.api.nvim_exec( + [[ + au BufEnter term://* setlocal nonumber + au BufEnter,BufWinEnter,WinEnter,CmdwinEnter * if bufname('%') == "NvimTree" | set laststatus=0 | else | set laststatus=2 | endif + au BufEnter term://* set laststatus=0 +]], + false + ) +end + +return M diff --git a/lua/zenmode.lua b/lua/zenmode.lua deleted file mode 100644 index 3f679d7..0000000 --- a/lua/zenmode.lua +++ /dev/null @@ -1,79 +0,0 @@ --- plugins made by @Pocco81 =) - -local M = {} - -M.config = function() - local true_zen = require("true-zen") - - true_zen.setup({ - misc = { - on_off_commands = false, - ui_elements_commands = false, - cursor_by_mode = false, - before_minimalist_mode_shown = true, - before_minimalist_mode_hidden = true, - after_minimalist_mode_shown = true, - after_minimalist_mode_hidden = true, - }, - ui = { - bottom = { - laststatus = 0, - ruler = false, - showmode = false, - showcmd = false, - cmdheight = 1, - }, - top = { - showtabline = 0, - }, - left = { - number = false, - relativenumber = false, - signcolumn = "no", - }, - }, - modes = { - ataraxis = { - left_padding = 37, - right_padding = 37, - top_padding = 2, - bottom_padding = 2, - just_do_it_for_me = false, - ideal_writing_area_width = 0, - keep_default_fold_fillchars = true, - custome_bg = "#1e222a", - }, - focus = { - margin_of_error = 5, - focus_method = "experimental" - }, - }, - integrations = { - galaxyline = true, - nvim_bufferline = true, - } - }) -end - --- autosave.nvim plugin disabled by default -M.autoSave = function() - local autosave = require("autosave") - - autosave.setup( - { - enabled = vim.g.auto_save, -- takes boolean value from init.lua - execution_message = "autosaved at : " .. vim.fn.strftime("%H:%M:%S"), - events = {"InsertLeave", "TextChanged"}, - conditions = { - exists = true, - filetype_is_not = {}, - modifiable = true - }, - write_all_buffers = true, - on_off_commands = true, - clean_command_line_interval = 2500 - } - ) -end - -return M From 9f8ce72e553e85ba6a42b7cd083688455890dd91 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 9 Jul 2021 09:19:24 +0530 Subject: [PATCH 0384/1541] add preload sizes for lua lsp (#143) --- lua/plugins/lspconfig.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index a303565..bf0bdcb 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -64,7 +64,9 @@ M.config = function() library = { [vim.fn.expand("$VIMRUNTIME/lua")] = true, [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true - } + }, + maxPreload = 100000, + preloadFileSize = 10000 }, telemetry = { enable = false From a5bd221680745338152e93c5f29b14ef517ed8cb Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 9 Jul 2021 10:12:57 +0530 Subject: [PATCH 0385/1541] telescope.lua: Use path_display instead of shorten_path shorten_path is deprecated now Reference: https://github.com/nvim-telescope/telescope.nvim/wiki/Path-Display-Configuration --- lua/plugins/telescope.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index c18b19a..151733b 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -35,7 +35,7 @@ M.config = function() file_sorter = require "telescope.sorters".get_fuzzy_file, file_ignore_patterns = {}, generic_sorter = require "telescope.sorters".get_generic_fuzzy_sorter, - shorten_path = true, + path_display = shorten, winblend = 0, border = {}, borderchars = {"─", "│", "─", "│", "╭", "╮", "╯", "╰"}, From 0a55de407e746a5407569160fa0f1519a98a214e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 9 Jul 2021 10:25:26 +0530 Subject: [PATCH 0386/1541] add git clone_timeout for packer --- lua/pluginList.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 1eb18f4..1f14191 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -6,7 +6,10 @@ packer.init { open_fn = function() return require("packer.util").float {border = "single"} end - } + }, + git = { + clone_timeout = 600, -- Timeout, in seconds, for git clones + } } return packer.startup( From e71b9bbece2ad9b931aa9c8e431aacbc5913f296 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 9 Jul 2021 14:24:42 +0530 Subject: [PATCH 0387/1541] install.sh: Refactor install script, Add new flags Giving either --install or --update flag is neccessary for the script to proceed -i | --install => Install the config. -u | --update => Update the existing config without removing existing stuff. -b | --backup 'path' => Custom config backup path. -nb | --no-backup => Don't take existing config backup. Use with caution. Update formatting using following command shfmt -i 2 -sr -p -bn -ci -w install.sh --- install.sh | 252 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 189 insertions(+), 63 deletions(-) diff --git a/install.sh b/install.sh index 9784620..186ba36 100755 --- a/install.sh +++ b/install.sh @@ -1,74 +1,200 @@ #!/bin/sh -# check if git command is installed -command -v git > /dev/null || { - printf "Install git before proceeding\n" - exit 1 +_usage() { + printf "%s" \ + "Usage: sh ${0##*/} [ options ] + -h | --help => Show this help. + + -i | --install => Install the config. + + -u | --update => Update the existing config without removing existing stuff. + + -b | --backup 'path' => Custom config backup path. + + -nb | --no-backup => Don't take existing config backup. Use with caution. +" + exit 0 } -printf "%s\n" "Installing packer" - -if [ -d ~/.local/share/nvim/site/pack/packer ]; then - printf "%s\n" "Clearning previous packer installs" - rm -rf ~/.local/share/nvim/site/pack -fi - -printf "\n%s\n" "=> Cloning packer.." -if git clone https://github.com/wbthomason/packer.nvim \ - ~/.local/share/nvim/site/pack/packer/start/packer.nvim; then - printf "%s\n" "=> Packer installed!" -else - printf "Error: Couldn't clone packer\n" - exit 1 -fi - -printf "%s\n" "Linking config" -printf "%s\n" "Old nvim config will be changed to nvim.bak if exists! :0" - -# copying config -if [ -d ~/.config/nvim ]; then - printf "%s\n" "Nvim Directory exists" - printf "%s\n" "Changing nvim to nvim.bak" - mv ~/.config/nvim/ ~/.config/nvim.bak/ - printf "%s\n" "Creating new nvim directory" - mkdir -p ~/.config/nvim -else - printf "%s\n" "Nvim Config doesn't exist so creating one" - mkdir -p ~/.config/nvim/ -fi - -{ cp -r init.lua ~/.config/nvim/ && cp -r lua ~/.config/nvim/ ;} || { - printf "Error: Couldn't copy nvim config\n" - exit 1 +_check_install_dependencies() { + _error_dependencies() { + printf "%s\n" "Error: Install ${1} before proceeding." + exit 1 + } + _GIT="$(command -v git)" || _error_dependencies git + _SED="$(command -v sed)" || _error_dependencies sed + return 0 } -# change shell in nvim config -_CURRENT_SHELL="${SHELL##*/}" -printf "%s\n: " "Which shell do you want to use ? [ Enter nothing for current shell ( $_CURRENT_SHELL ) ]" -read -r shellname -shellname="${shellname:-${_CURRENT_SHELL}}" -printf "%s\n" "$shellname" +_check_nvim_version() { + version_string="$(nvim --version | grep -Eo 'NVIM.*v[0-9.]+' -m 1 | grep -Eo '[0-9.]+')" || return 1 + printf "%s\n" "${version_string}" | while IFS=. read -r num1 num2 num3; do + { [ "${num1}" -ge 0 ] && [ "${num2}" -ge 5 ] && [ "${num3}" -ge 0 ]; } || return 1 + done +} -# don't try to do any changes if given shellname is same as bash -if ! [ bash = "$shellname" ]; then - # Reference: https://stackoverflow.com/a/4247319 - if "$(command -v sed)" -i'.bak' -e "s/bash/$shellname/g" ~/.config/nvim/lua/mappings.lua; then - printf "\n%s\n" "=> Shell changed to $shellname on nvim successfully!" +_setup_packer() { + _clone_packer() { + [ -d "${_PACKER_PATH}" ] && rm -rf "${_PACKER_PATH}" + + printf "\n%s\n" "=> Cloning packer.." + if "${_GIT}" clone "${_PACKER_REPO_URL}" \ + "${_PACKER_PATH}"; then + printf "%s\n" "=> Packer Installed!" + else + printf "Error: Couldn't clone packer\n" + exit 1 + fi + } + + if [ "${_UPDATE}" = "true" ]; then + printf "%s\n" "Updating packer" + { [ -d "${_PACKER_PATH}" ] \ + && "${_GIT}" -C "${_PACKER_PATH}" pull "${_PACKER_REPO_URL}"; } || _clone_packer else - printf "\n%s\n" "Cannot edit with sed, edit ~/.config/nvim/lua/mappings.lua manually to replace bash with $shellname." + printf "%s\n" "Installing packer" + if [ -d ~/.local/share/nvim/site/pack/packer ]; then + printf "%s\n" "Clearning previous packer installs" + rm -rf ~/.local/share/nvim/site/pack + fi + _clone_packer fi - rm -f ~/.config/nvim/lua/mappings.lua.bak # delete backup file created by sed -else - printf "\n%s\n" "=> Shell changed to $shellname on nvim successfully!" -fi + printf "\n" + return 0 +} -printf "\n%s\n" "=> Neovim will open with some errors, just press enter" && sleep 1 +_copy_config() { + printf "%s\n" "Linking config" + printf "%s\n" "Old nvim config will be changed to nvim.bak if exists! :0" -# install all plugins + compile them -if _NVIM="$(command -v nvim)"; then - "${_NVIM}" +PackerSync -else - printf "Error: Neovim is not installed, install Neovim >= 5.x and then run the below command\n" - printf " nvim +PackerSync\n" - exit 1 -fi + # copying config + if [ -d "${_CONFIG_PATH}" ]; then + printf "%s\n" "Nvim Directory exists" + if [ "${_NO_BACKUP}" = "true" ]; then + printf "%s\n" "Skipping backup as --no-backup flag was passed.." + else + printf "%s\n" "Taking backup of existing config.." + mv "${_CONFIG_PATH}" "${_BACKUP_PATH}" || { + printf "\n%s\n" "Error: Cannot move ${_CONFIG_PATH} to ${_BACKUP_PATH}" + printf "\n%s\n" "Take backup manually or use -b/--backup to provide non-empty path or use -nb/--no-backup to skip backup." + exit 1 + } + fi + printf "%s\n" "Creating new nvim directory" + else + printf "%s\n" "Nvim Config doesn't exist so creating one" + fi + + mkdir -p "${_CONFIG_PATH}" || { + printf "%s\n" "Error: Cannot create folder ${_CONFIG_PATH}" + exit 1 + } + + { cp -r init.lua lua "${_CONFIG_PATH}"/; } || { + printf "Error: Couldn't copy nvim config\n" + exit 1 + } + return 0 +} + +_setup_terminal_shell() { + _mappings_file="${_CONFIG_PATH}/lua/mappings.lua" + # only ask for shellname if running in terminal + if [ -t 1 ]; then + printf "%s\n: " "Which shell do you want to use ? [ Enter nothing for current shell ( $_CURRENT_SHELL ) ]" + read -r shellname + fi + shellname="${shellname:-${_CURRENT_SHELL}}" + printf "%s\n" "$shellname" + + # don't try to do any changes if given shellname is same as bash + if ! [ bash = "$shellname" ]; then + # Reference: https://stackoverflow.com/a/4247319 + if "${_SED}" -i'.bak' -e "s/bash/$shellname/g" "${_mappings_file}"; then + printf "\n%s\n" "=> Shell changed to $shellname on nvim successfully!" + else + printf "\n%s\n" "Cannot edit with sed, edit ${_mappings_file} manually to replace bash with $shellname." + fi + rm -f "${_mappings_file}".bak # delete backup file created by sed + else + printf "\n%s\n" "=> Shell changed to $shellname on nvim successfully!" + fi + return 0 +} + +_setup_arguments() { + # default variables to be used + _PACKER_PATH="${HOME}/.local/share/nvim/site/pack/packer/start/packer.nvim" + _PACKER_REPO_URL="https://github.com/wbthomason/packer.nvim" + _CONFIG_PATH="${HOME}/.config/nvim" + _UPDATE="" + _BACKUP_PATH="${_CONFIG_PATH}.bak" + _NO_BACKUP="false" + _CURRENT_SHELL="${SHELL##*/}" + + _check_longoptions() { + [ -z "${2}" ] \ + && printf '%s: %s: option requires an argument\nTry '"%s -h/--help"' for more information.\n' "${0##*/}" "${1}" "${0##*/}" \ + && exit 1 + return 0 + } + + while [ $# -gt 0 ]; do + case "${1}" in + -h | --help) _usage ;; + -i | --install) _UPDATE="false" ;; + -u | --update) _UPDATE="true" ;; + -b | --backup) + _check_longoptions "${1}" "${2}" + _BACKUP_PATH="${2}" && shift + ;; + -nb | --nobackup) _NO_BACKUP="true" ;; + esac + shift + done + + [ -z "${_UPDATE}" ] && { + printf "%s\n" "Error: Either -i/--install or -u/--update flag must be used." + printf "%s\n" "See -h/--help for more info." + exit 1 + } + + printf "%s\n" \ + "CONFIG PATH: ${_CONFIG_PATH} +$(if [ "${_NO_BACKUP}" = "true" ]; then + printf "SKIPPING CONFIG BACKUP !\n" + else + printf "%s\n" "CONFIG BACKUP PATH: ${_BACKUP_PATH}" + fi) +CURRENT SHELL: ${_CURRENT_SHELL} +" + + return 0 +} + +main() { + [ $# = 0 ] && _usage + + _check_install_dependencies + + _setup_arguments "${@}" + _setup_packer + _copy_config + _setup_terminal_shell + + # install all plugins + compile them + if _NVIM="$(command -v nvim)"; then + if _check_nvim_version; then + printf "\n%s\n" "=> Neovim will open with some errors, just press enter" && sleep 1 + "${_NVIM}" +PackerSync + else + printf "Error: Neovim is installed, but version is lower than 0.5.x, install Neovim >= 5.x and then run the below command.\n" + printf " nvim +PackerSync\n" + fi + else + printf "Error: Neovim is not installed, install Neovim >= 5.x and then run the below command\n" + printf " nvim +PackerSync\n" + fi +} + +main "${@}" From 2988a22eb87fb0846ad10abeddeb777f34a9cb32 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 9 Jul 2021 15:26:03 +0530 Subject: [PATCH 0388/1541] mappings.lua: Fix ctrl + q when vertical/horizontal split buffer is open currently when a vertical or horizontal split buffer is open and ctrl + q is used, then it removes the buffer content but not the actual buffer, further it duplicates an existing buffer content. This commit fixes that --- lua/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index 83f7af0..e0f8f36 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -41,7 +41,7 @@ map("n", "", ":w ", opt) map("n", "/", ":CommentToggle", opt) map("v", "/", ":CommentToggle", opt) -map("n", "", ":bpspbnbd! ", opt) +map("n", "", ":bd! ", opt) -- compe stuff From 3a209318bbebbe5959c3970b7d26e520c14dd42d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 9 Jul 2021 17:10:28 +0530 Subject: [PATCH 0389/1541] rm duplicate mapping --- lua/mappings.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index e0f8f36..cd1cd1a 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -41,10 +41,7 @@ map("n", "", ":w ", opt) map("n", "/", ":CommentToggle", opt) map("v", "/", ":CommentToggle", opt) -map("n", "", ":bd! ", opt) - -- compe stuff - local t = function(str) return vim.api.nvim_replace_termcodes(str, true, true, true) end From 0bbb88f6dba4491f9e81ac9b10fa75a2ece75629 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 9 Jul 2021 16:54:40 +0530 Subject: [PATCH 0390/1541] typo --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 186ba36..93b25f7 100755 --- a/install.sh +++ b/install.sh @@ -54,7 +54,7 @@ _setup_packer() { else printf "%s\n" "Installing packer" if [ -d ~/.local/share/nvim/site/pack/packer ]; then - printf "%s\n" "Clearning previous packer installs" + printf "%s\n" "Clearing previous packer installs" rm -rf ~/.local/share/nvim/site/pack fi _clone_packer From f6ace73656f612b73651a125fd47d56186eaef58 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 10 Jul 2021 09:41:10 +0530 Subject: [PATCH 0391/1541] minor changes --- lua/plugins/lspconfig.lua | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index bf0bdcb..a8dcc12 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,18 +1,18 @@ local M = {} M.config = function() - function on_attach(client, bufnr) + local lspconf = require("lspconfig") + + local function on_attach(client, bufnr) + vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") + + local opts = {noremap = true, silent = true} + local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end - local function buf_set_option(...) - vim.api.nvim_buf_set_option(bufnr, ...) - end - - buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") -- Mappings. - local opts = {noremap = true, silent = true} buf_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) @@ -38,18 +38,20 @@ M.config = function() end end + local capabilities = vim.lsp.protocol.make_client_capabilities() + capabilities.textDocument.completion.completionItem.snippetSupport = true + -- lspInstall + lspconfig stuff local function setup_servers() require "lspinstall".setup() - - local lspconf = require("lspconfig") local servers = require "lspinstall".installed_servers() for _, lang in pairs(servers) do if lang ~= "lua" then lspconf[lang].setup { on_attach = on_attach, + capabilities = capabilities, root_dir = vim.loop.cwd } elseif lang == "lua" then From 9627b5e6b49020bcd27e65bcc58b3a7e3ed0a5c3 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 10 Jul 2021 11:53:47 +0530 Subject: [PATCH 0392/1541] add highlights for packer.nvim --- lua/highlights.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/highlights.lua b/lua/highlights.lua index afe4b53..434552d 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -141,6 +141,12 @@ fg("DashboardCenter", grey_fg) fg("DashboardShortcut", grey_fg) fg("DashboardFooter", grey_fg) +-- packer's floating window + +bg("NormalFloat", black2) +bg("FloatBorder", black2) +fg("FloatBorder", black2) + -- set bg color for nvim ( so nvim wont use terminal bg) -- NvChad themes bg colors From 4dbb1a71e26f1b0858ebec75f313cde1a28641f0 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 10 Jul 2021 19:06:41 +0530 Subject: [PATCH 0393/1541] lazy load lsp-install --- lua/pluginList.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 1f14191..ba7fdc5 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -8,8 +8,8 @@ packer.init { end }, git = { - clone_timeout = 600, -- Timeout, in seconds, for git clones - } + clone_timeout = 600 -- Timeout, in seconds, for git clones + } } return packer.startup( @@ -46,6 +46,11 @@ return packer.startup( end } + use { + "kabouzeid/nvim-lspinstall", + event = "VimEnter" + } + use { "neovim/nvim-lspconfig", event = "BufRead", @@ -54,8 +59,6 @@ return packer.startup( end } - use "kabouzeid/nvim-lspinstall" - use { "onsails/lspkind-nvim", event = "BufRead", From df4ff8dc6fd227f2da74aa7e71ea3e5f0eca85bb Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 11 Jul 2021 12:20:15 +0530 Subject: [PATCH 0394/1541] lazy load some plugins --- lua/pluginList.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index ba7fdc5..7029811 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -84,7 +84,10 @@ return packer.startup( require("plugins.compe").snippets() end }, - "rafamadriz/friendly-snippets" + { + "rafamadriz/friendly-snippets", + event = "InsertCharPre" + } } } @@ -110,9 +113,7 @@ return packer.startup( "nvim-telescope/telescope.nvim", requires = { {"nvim-lua/popup.nvim"}, - {"nvim-lua/plenary.nvim"}, - {"nvim-telescope/telescope-fzf-native.nvim", run = "make"}, - {"nvim-telescope/telescope-media-files.nvim"} + {"nvim-lua/plenary.nvim"} }, cmd = "Telescope", config = function() @@ -120,6 +121,13 @@ return packer.startup( end } + use {"nvim-telescope/telescope-fzf-native.nvim", run = "make", cmd = "Telescope"} + + use { + "nvim-telescope/telescope-media-files.nvim", + cmd = "Telescope" + } + -- git stuff use { "lewis6991/gitsigns.nvim", From 5ff50c63e96954b9cd829be03c978ae4b361f2a4 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 11 Jul 2021 17:28:10 +0530 Subject: [PATCH 0395/1541] fix LspInstall lazy loading (#149) --- lua/pluginList.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 7029811..c881247 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -48,12 +48,12 @@ return packer.startup( use { "kabouzeid/nvim-lspinstall", - event = "VimEnter" + event = "BufRead" } use { "neovim/nvim-lspconfig", - event = "BufRead", + after = "nvim-lspinstall", config = function() require("plugins.lspconfig").config() end From 734562cc3669a7f62a1b7fc4cec03bc13f3e5f45 Mon Sep 17 00:00:00 2001 From: Oscar Forner Martinez Date: Sun, 11 Jul 2021 17:29:55 +0200 Subject: [PATCH 0396/1541] Remove quotes from jpeg icon color --- lua/plugins/icons.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/icons.lua b/lua/plugins/icons.lua index 63ce7d2..90d8e32 100644 --- a/lua/plugins/icons.lua +++ b/lua/plugins/icons.lua @@ -43,7 +43,7 @@ M.config = function() }, jpeg = { icon = "", - color = "colors.dark_purple", + color = colors.dark_purple, name = "jpeg" }, mp3 = { From c38c4ec0cf19a3712e274ae11cd36ffb83b56305 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Tue, 13 Jul 2021 14:13:33 +0530 Subject: [PATCH 0397/1541] install.sh: Do shallow clone for packer.nvim --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 93b25f7..3f3b9e1 100755 --- a/install.sh +++ b/install.sh @@ -39,7 +39,7 @@ _setup_packer() { printf "\n%s\n" "=> Cloning packer.." if "${_GIT}" clone "${_PACKER_REPO_URL}" \ - "${_PACKER_PATH}"; then + "${_PACKER_PATH}" --depth 20; then printf "%s\n" "=> Packer Installed!" else printf "Error: Couldn't clone packer\n" From 605c9e0458543f8a553ded709f5816f61c196845 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Tue, 13 Jul 2021 14:16:27 +0530 Subject: [PATCH 0398/1541] highlights.lua: set neovim bg colour --- lua/highlights.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lua/highlights.lua b/lua/highlights.lua index 434552d..4fbd289 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -149,9 +149,4 @@ fg("FloatBorder", black2) -- set bg color for nvim ( so nvim wont use terminal bg) --- NvChad themes bg colors --- Onedark #1e222a --- Gruvbox #222526 --- tomorrow night #1d1f21 - --- bg("Normal", "#1e222a") -- change the hex color here. +bg("Normal", black) From 10ddd491c15325270f0e6f4df48a3a8e30a3c6a7 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Tue, 13 Jul 2021 16:06:31 +0530 Subject: [PATCH 0399/1541] highlights.lua: fix comments not visible in visual selection mode --- lua/highlights.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/highlights.lua b/lua/highlights.lua index 4fbd289..511393c 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -13,6 +13,7 @@ local one_bg3 = colors.one_bg3 local light_grey = colors.light_grey local grey = colors.grey local grey_fg = colors.grey_fg +local grey_fg2 = colors.grey_fg2 local red = colors.red local line = colors.line local green = colors.green @@ -41,7 +42,7 @@ fg("IndentBlanklineChar", line) -- misc -- fg("LineNr", grey) -fg("Comment", grey) +fg("Comment", grey_fg2) fg("NvimInternalError", red) fg("VertSplit", line) fg("EndOfBuffer", black) From e6ae79127f60d598f8f1764a454d2e2168cf1f83 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Tue, 13 Jul 2021 16:16:57 +0530 Subject: [PATCH 0400/1541] Increase timeoutlen to 400 sometimes 200 ms is way too for 3 key mappings --- lua/options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/options.lua b/lua/options.lua index 81c6a2d..611acd6 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -11,7 +11,7 @@ opt.mouse = "a" opt.signcolumn = "yes" opt.cmdheight = 1 opt.updatetime = 250 -- update interval for gitsigns -opt.timeoutlen = 200 +opt.timeoutlen = 400 opt.clipboard = "unnamedplus" -- Numbers From 7658c3d9782200d86fd4b1653825ba63fed2a689 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 14 Jul 2021 06:54:14 +0530 Subject: [PATCH 0401/1541] Update README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index fb7c3e3..4964c87 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,16 @@ without / with Treesitter : - [config-structure](https://github.com/siduck76/NvChad/wiki#config-structure) - [mappings](https://github.com/siduck76/NvChad/wiki/mappings) +# Bloat + +- To all those who think this is probably bloated , sure it is . Bloat means different to everyone . NvChad has like 30 ~ plugins but that doesnt mean those plugins are compromsing neovim's speed, snappiness or making it slow. No matter how many plugins I'd add on nvchad , it wouldnt compromise speed / snappiness / make it slow or whatever since it uses packer.nvim as plugin manager , packer.nvim lets you lazy load plugins i.e loading plugins on certain events , mappings , sequentially loading them etc so loading them only when needed , I have lazy loaded 90% plugins so most plugins arent loaded by default , hence not affecting neovim's startup/launch time. + + + +- Without lazy loading vs with lazy loading ( this is tested on my old pentium system so ofc the startuptime will be a lot much lesser for you ) + + + # TODO It would be nice if NvChad focuses on existing plugins and config before adding new things , some plugins like whichkey , telescope , treesitter still have basic configs! Also adding new features that'd make NvChad slow or its startuptime slow wouldnt be encouraged , if that feature's really needed then It'll be mentioned in the wiki with its config. From c4a8ecf47fc8217a3df7838b5d4e9849d4d23b3c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 15 Jul 2021 10:18:10 +0530 Subject: [PATCH 0402/1541] add bufferline highlights --- init.lua | 2 +- lua/highlights.lua | 33 --------------- lua/plugins/bufferline.lua | 83 +++++++++++++++++++++++++++++++++++++- 3 files changed, 83 insertions(+), 35 deletions(-) diff --git a/init.lua b/init.lua index 25ba2bd..ececd85 100644 --- a/init.lua +++ b/init.lua @@ -1,7 +1,6 @@ -- load all plugins require "pluginList" require "options" -require "plugins.bufferline" local g = vim.g @@ -16,5 +15,6 @@ base16(base16.themes["onedark"], true) require "highlights" require "mappings" +require "plugins.bufferline" require("utils").hideStuff() diff --git a/lua/highlights.lua b/lua/highlights.lua index 511393c..107aafb 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -102,39 +102,6 @@ fg("LspDiagnosticsVirtualTextInformation", green) fg("LspDiagnosticsSignHint", purple) fg("LspDiagnosticsVirtualTextHint", purple) --- bufferline - -fg_bg("BufferLineFill", grey_fg, black2) -fg_bg("BufferLineBackground", light_grey, black2) - -fg_bg("BufferLineBufferVisible", light_grey, black2) -fg_bg("BufferLineBufferSelected", white, black) - -cmd "hi BufferLineBufferSelected gui=bold" - --- tabs -fg_bg("BufferLineTab", light_grey, one_bg3) -fg_bg("BufferLineTabSelected", black2, nord_blue) -fg_bg("BufferLineTabClose", red, black) - -fg_bg("BufferLineIndicator", black2, black2) -fg_bg("BufferLineIndicatorSelected", black, black) - --- separators -fg_bg("BufferLineSeparator", black2, black2) -fg_bg("BufferLineSeparatorVisible", black2, black2) -fg_bg("BufferLineSeparatorSelected", black, black2) - --- modified buffers -fg_bg("BufferLineModified", red, black2) -fg_bg("BufferLineModifiedVisible", red, black2) -fg_bg("BufferLineModifiedSelected", green, black) - --- close buttons -fg_bg("BufferLineCLoseButtonVisible", light_grey, black2) -fg_bg("BufferLineCLoseButton", light_grey, black2) -fg_bg("BufferLineCLoseButtonSelected", red, black) - -- dashboard fg("DashboardHeader", grey_fg) diff --git a/lua/plugins/bufferline.lua b/lua/plugins/bufferline.lua index eb56214..342e687 100644 --- a/lua/plugins/bufferline.lua +++ b/lua/plugins/bufferline.lua @@ -1,3 +1,6 @@ +local global_theme = "themes/" .. vim.g.nvchad_theme +local colors = require(global_theme) + require "bufferline".setup { options = { offsets = {{filetype = "NvimTree", text = "", padding = 1}}, @@ -14,6 +17,84 @@ require "bufferline".setup { view = "multiwindow", show_buffer_close_icons = true, separator_style = "thin", - mappings = "true" + mappings = true, + always_show_bufferline = true + }, + highlights = { + fill = { + guifg = colors.grey_fg, + guibg = colors.black2 + }, + background = { + guifg = colors.grey_fg, + guibg = colors.black2 + }, + -- buffers + buffer_visible = { + guifg = colors.light_grey, + guibg = colors.black2 + }, + buffer_selected = { + guifg = colors.white, + guibg = colors.black, + gui = "bold" + }, + -- tabs + tab = { + guifg = colors.light_grey, + guibg = colors.one_bg3 + }, + tab_selected = { + guifg = colors.black2, + guibg = colors.nord_blue + }, + tab_close = { + guifg = colors.red, + guibg = colors.black + }, + indicator_selected = { + guifg = colors.black, + guibg = colors.black + }, + -- separators + separator = { + guifg = colors.black2, + guibg = colors.black2 + }, + separator_visible = { + guifg = colors.black2, + guibg = colors.black2 + }, + separator_selected = { + guifg = colors.black2, + guibg = colors.black2 + }, + -- modified + modified = { + guifg = colors.red, + guibg = colors.black2 + }, + modified_visible = { + guifg = colors.red, + guibg = colors.black2 + }, + modified_selected = { + guifg = colors.green, + guibg = colors.black + }, + -- close buttons + + close_button = { + guifg = colors.light_grey, + guibg = colors.black2 + }, + close_button_visible = { + guifg = colors.light_grey, + guibg = colors.black2 + }, + close_button_selected = { + guifg = colors.red, + guibg = colors.black + } } } From 4a934e9a82ee4b7786839d504869ae88b88d8dc5 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 15 Jul 2021 11:09:58 +0530 Subject: [PATCH 0403/1541] use better char for gitsigns --- lua/highlights.lua | 2 +- lua/plugins/gitsigns.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/highlights.lua b/lua/highlights.lua index 107aafb..2f3cc01 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -62,7 +62,7 @@ fg("cursorlinenr", white) -- git signs --- fg_bg("DiffAdd", nord_blue, "none") -fg_bg("DiffChange", one_bg2, "none") +fg_bg("DiffChange", grey, "none") fg_bg("DiffModified", nord_blue, "none") -- NvimTree diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index 85973e2..32c2c3c 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -3,8 +3,8 @@ local M = {} M.config = function() require("gitsigns").setup { signs = { - add = {hl = "DiffAdd", text = "▌", numhl = "GitSignsAddNr"}, - change = {hl = "DiffChange", text = "▌", numhl = "GitSignsChangeNr"}, + add = {hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr"}, + change = {hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr"}, delete = {hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr"}, topdelete = {hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr"}, changedelete = {hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr"} From 42bf581337edabea18677085ecd96651aaf57daf Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Wed, 14 Jul 2021 10:27:33 +0530 Subject: [PATCH 0404/1541] Disable nvim intro and tilde chars on end of buffer This avoids the situation when the initial screen looks out of place because there is some pre rendered text https://github.com/neovim/neovim/pull/8546 --- lua/options.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/options.lua b/lua/options.lua index 611acd6..c83e6ae 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -14,6 +14,12 @@ opt.updatetime = 250 -- update interval for gitsigns opt.timeoutlen = 400 opt.clipboard = "unnamedplus" +-- disable nvim intro +opt.shortmess:append("sI") + +-- disable tilde on end of buffer: https://github.com/ neovim/neovim/pull/8546#issuecomment-643643758 +vim.cmd [[let &fcs='eob: ']] + -- Numbers opt.number = true opt.numberwidth = 2 From 0d7345bc44f04225bdd3df0ab57e0a48b08aa83a Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Wed, 14 Jul 2021 10:54:09 +0530 Subject: [PATCH 0405/1541] Move options from init.lua => options.lua use a local g = vim.g --- init.lua | 8 +------- lua/options.lua | 24 ++++++++++++++---------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/init.lua b/init.lua index ececd85..58a90da 100644 --- a/init.lua +++ b/init.lua @@ -2,14 +2,8 @@ require "pluginList" require "options" -local g = vim.g - -g.mapleader = " " -g.auto_save = false - -- colorscheme related stuff - -g.nvchad_theme = "onedark" +vim.g.nvchad_theme = "onedark" local base16 = require "base16" base16(base16.themes["onedark"], true) diff --git a/lua/options.lua b/lua/options.lua index c83e6ae..3d2d2dd 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -1,4 +1,5 @@ local opt = vim.opt +local g = vim.g opt.ruler = false opt.hidden = true @@ -30,17 +31,20 @@ opt.expandtab = true opt.shiftwidth = 2 opt.smartindent = true +g.mapleader = " " +g.auto_save = false + -- disable builtin vim plugins -vim.g.loaded_gzip = 0 -vim.g.loaded_tar = 0 -vim.g.loaded_tarPlugin = 0 -vim.g.loaded_zipPlugin = 0 -vim.g.loaded_2html_plugin = 0 -vim.g.loaded_netrw = 0 -vim.g.loaded_netrwPlugin = 0 -vim.g.loaded_matchit = 0 -vim.g.loaded_matchparen = 0 -vim.g.loaded_spec = 0 +g.loaded_gzip = 0 +g.loaded_tar = 0 +g.loaded_tarPlugin = 0 +g.loaded_zipPlugin = 0 +g.loaded_2html_plugin = 0 +g.loaded_netrw = 0 +g.loaded_netrwPlugin = 0 +g.loaded_matchit = 0 +g.loaded_matchparen = 0 +g.loaded_spec = 0 local M = {} From d16ffabcfdd14ccfdcf779104c09f408786b1da8 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 15 Jul 2021 21:13:17 +0530 Subject: [PATCH 0406/1541] [1/4] Refactor: plugins: Add seperate config for each plugins first commit of Refactor handle require errors move config from other places to proper files don't create a pseudo config function for no reason https://github.com/siduck76/NvChad/pull/156#issuecomment-881453546 --- lua/plugins/autopairs.lua | 19 ++ lua/plugins/autosave.lua | 27 +++ lua/plugins/blankline.lua | 9 + lua/plugins/bufferline.lua | 13 +- lua/plugins/colorizer.lua | 13 ++ lua/plugins/comment.lua | 5 + lua/plugins/compe.lua | 63 +++--- lua/plugins/dashboard.lua | 78 ++++--- lua/plugins/gitsigns.lua | 67 +++--- lua/plugins/icons.lua | 247 ++++++++++----------- lua/plugins/lspconfig.lua | 166 ++++++++------- lua/plugins/lspkind.lua | 5 + lua/plugins/luasnip.lua | 18 ++ lua/plugins/neoscroll.lua | 5 + lua/plugins/nvimtree.lua | 193 ++++++++--------- lua/plugins/statusline.lua | 425 +++++++++++++++++++------------------ lua/plugins/telescope.lua | 42 ++-- lua/plugins/treesitter.lua | 49 +++-- lua/plugins/zenmode.lua | 128 +++++------ 19 files changed, 847 insertions(+), 725 deletions(-) create mode 100644 lua/plugins/autopairs.lua create mode 100644 lua/plugins/autosave.lua create mode 100644 lua/plugins/blankline.lua create mode 100644 lua/plugins/colorizer.lua create mode 100644 lua/plugins/comment.lua create mode 100644 lua/plugins/lspkind.lua create mode 100644 lua/plugins/luasnip.lua create mode 100644 lua/plugins/neoscroll.lua diff --git a/lua/plugins/autopairs.lua b/lua/plugins/autopairs.lua new file mode 100644 index 0000000..9399571 --- /dev/null +++ b/lua/plugins/autopairs.lua @@ -0,0 +1,19 @@ +local autopairs, autopairs_completion +if + not pcall( + function() + autopairs = require "nvim-autopairs" + autopairs_completion = require "nvim-autopairs.completion.compe" + end + ) + then + return +end + +autopairs.setup() +autopairs_completion.setup( + { + map_cr = true, + map_complete = true -- insert () func completion + } +) diff --git a/lua/plugins/autosave.lua b/lua/plugins/autosave.lua new file mode 100644 index 0000000..6ddcd82 --- /dev/null +++ b/lua/plugins/autosave.lua @@ -0,0 +1,27 @@ +-- autosave.nvim plugin disabled by default +local autosave +if + not pcall( + function() + func = require "autosave" + end + ) + then + return +end + +autosave.setup( + { + enabled = vim.g.auto_save, -- takes boolean value from init.lua + execution_message = "autosaved at : " .. vim.fn.strftime("%H:%M:%S"), + events = {"InsertLeave", "TextChanged"}, + conditions = { + exists = true, + filetype_is_not = {}, + modifiable = true + }, + write_all_buffers = true, + on_off_commands = true, + clean_command_line_interval = 2500 + } +) diff --git a/lua/plugins/blankline.lua b/lua/plugins/blankline.lua new file mode 100644 index 0000000..6a1bd4a --- /dev/null +++ b/lua/plugins/blankline.lua @@ -0,0 +1,9 @@ +-- blankline config +vim.g.indentLine_enabled = 1 +vim.g.indent_blankline_char = "▏" + +vim.g.indent_blankline_filetype_exclude = {"help", "terminal", "dashboard"} +vim.g.indent_blankline_buftype_exclude = {"terminal"} + +vim.g.indent_blankline_show_trailing_blankline_indent = false +vim.g.indent_blankline_show_first_indent_level = false diff --git a/lua/plugins/bufferline.lua b/lua/plugins/bufferline.lua index 342e687..c34b771 100644 --- a/lua/plugins/bufferline.lua +++ b/lua/plugins/bufferline.lua @@ -1,7 +1,18 @@ local global_theme = "themes/" .. vim.g.nvchad_theme local colors = require(global_theme) -require "bufferline".setup { +local bufferline +if + not pcall( + function() + bufferline = require "bufferline" + end + ) + then + return +end + +bufferline.setup { options = { offsets = {{filetype = "NvimTree", text = "", padding = 1}}, buffer_close_icon = "", diff --git a/lua/plugins/colorizer.lua b/lua/plugins/colorizer.lua new file mode 100644 index 0000000..d3e1d9d --- /dev/null +++ b/lua/plugins/colorizer.lua @@ -0,0 +1,13 @@ +local colorizer +if + not pcall( + function() + colorizer = require("colorizer") + end + ) + then + return +end + +colorizer.setup() +vim.cmd("ColorizerReloadAllBuffers") diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua new file mode 100644 index 0000000..2a41f8a --- /dev/null +++ b/lua/plugins/comment.lua @@ -0,0 +1,5 @@ +pcall( + function() + require("nvim_comment").setup() + end +) diff --git a/lua/plugins/compe.lua b/lua/plugins/compe.lua index cdf0235..c41139a 100644 --- a/lua/plugins/compe.lua +++ b/lua/plugins/compe.lua @@ -1,38 +1,31 @@ -local M = {} - -M.config = function() - require "compe".setup { - enabled = true, - autocomplete = true, - debug = false, - min_length = 1, - preselect = "enable", - throttle_time = 80, - source_timeout = 200, - incomplete_delay = 400, - max_abbr_width = 100, - max_kind_width = 100, - max_menu_width = 100, - documentation = true, - source = { - buffer = {kind = "﬘", true}, - luasnip = {kind = "﬌", true}, - nvim_lsp = true, - nvim_lua = true - } - } -end - -M.snippets = function() - local ls = require("luasnip") - - ls.config.set_config( - { - history = true, - updateevents = "TextChanged,TextChangedI" - } +local compe +if + not pcall( + function() + compe = require "compe" + end ) - require("luasnip/loaders/from_vscode").load() + then + return end -return M +compe.setup { + enabled = true, + autocomplete = true, + debug = false, + min_length = 1, + preselect = "enable", + throttle_time = 80, + source_timeout = 200, + incomplete_delay = 400, + max_abbr_width = 100, + max_kind_width = 100, + max_menu_width = 100, + documentation = true, + source = { + buffer = {kind = "﬘", true}, + luasnip = {kind = "﬌", true}, + nvim_lsp = true, + nvim_lua = true + } +} diff --git a/lua/plugins/dashboard.lua b/lua/plugins/dashboard.lua index 1e4ea0c..54d317e 100644 --- a/lua/plugins/dashboard.lua +++ b/lua/plugins/dashboard.lua @@ -1,46 +1,40 @@ -local M = {} +local g = vim.g +local fn = vim.fn -M.config = function() - local g = vim.g - local fn = vim.fn +local plugins_count = fn.len(fn.globpath("~/.local/share/nvim/site/pack/packer/start", "*", 0, 1)) - local plugins_count = fn.len(fn.globpath("~/.local/share/nvim/site/pack/packer/start", "*", 0, 1)) +g.dashboard_disable_at_vimenter = 1 -- dashboard is disabled by default +g.dashboard_disable_statusline = 1 +g.dashboard_default_executive = "telescope" +g.dashboard_custom_header = { + " ", + " ", + " ", + " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", + " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", + " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", + " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", + " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", + " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", + " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", + " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", + " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", + " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", + " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", + " " +} - g.dashboard_disable_at_vimenter = 1 -- dashboard is disabled by default - g.dashboard_disable_statusline = 1 - g.dashboard_default_executive = "telescope" - g.dashboard_custom_header = { - " ", - " ", - " ", - " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", - " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", - " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", - " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", - " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", - " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", - " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", - " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", - " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", - " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", - " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", - " " - } +g.dashboard_custom_section = { + a = {description = {" Find File SPC f f"}, command = "Telescope find_files"}, + b = {description = {" Recents SPC f o"}, command = "Telescope oldfiles"}, + c = {description = {" Find Word SPC f w"}, command = "Telescope live_grep"}, + d = {description = {"洛 New File SPC f n"}, command = "DashboardNewFile"}, + e = {description = {" Bookmarks SPC b m"}, command = "Telescope marks"}, + f = {description = {" Load Last Session SPC s l"}, command = "SessionLoad"} +} - g.dashboard_custom_section = { - a = {description = {" Find File SPC f f"}, command = "Telescope find_files"}, - b = {description = {" Recents SPC f o"}, command = "Telescope oldfiles"}, - c = {description = {" Find Word SPC f w"}, command = "Telescope live_grep"}, - d = {description = {"洛 New File SPC f n"}, command = "DashboardNewFile"}, - e = {description = {" Bookmarks SPC b m"}, command = "Telescope marks"}, - f = {description = {" Load Last Session SPC s l"}, command = "SessionLoad"} - } - - g.dashboard_custom_footer = { - " ", - -- "NvChad Loaded " .. plugins_count .. " plugins", - "NvChad v0.5" - } -end - -return M +g.dashboard_custom_footer = { + " ", + -- "NvChad Loaded " .. plugins_count .. " plugins", + "NvChad v0.5" +} diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index 32c2c3c..d42758a 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -1,33 +1,38 @@ -local M = {} - -M.config = function() - require("gitsigns").setup { - signs = { - add = {hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr"}, - change = {hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr"}, - delete = {hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr"}, - topdelete = {hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr"}, - changedelete = {hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr"} - }, - numhl = false, - keymaps = { - -- Default keymap options - noremap = true, - buffer = true, - ["n ]c"] = {expr = true, '&diff ? \']c\' : \'lua require"gitsigns".next_hunk()\''}, - ["n [c"] = {expr = true, '&diff ? \'[c\' : \'lua require"gitsigns".prev_hunk()\''}, - ["n hs"] = 'lua require"gitsigns".stage_hunk()', - ["n hu"] = 'lua require"gitsigns".undo_stage_hunk()', - ["n hr"] = 'lua require"gitsigns".reset_hunk()', - ["n hp"] = 'lua require"gitsigns".preview_hunk()', - ["n hb"] = 'lua require"gitsigns".blame_line()' - }, - watch_index = { - interval = 100 - }, - sign_priority = 5, - status_formatter = nil -- Use default - } +local gitsigns +if + not pcall( + function() + gitsigns = require "gitsigns" + end + ) + then + return end -return M +gitsigns.setup { + signs = { + add = {hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr"}, + change = {hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr"}, + delete = {hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr"}, + topdelete = {hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr"}, + changedelete = {hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr"} + }, + numhl = false, + keymaps = { + -- Default keymap options + noremap = true, + buffer = true, + ["n ]c"] = {expr = true, '&diff ? \']c\' : \'lua require"gitsigns".next_hunk()\''}, + ["n [c"] = {expr = true, '&diff ? \'[c\' : \'lua require"gitsigns".prev_hunk()\''}, + ["n hs"] = 'lua require"gitsigns".stage_hunk()', + ["n hu"] = 'lua require"gitsigns".undo_stage_hunk()', + ["n hr"] = 'lua require"gitsigns".reset_hunk()', + ["n hp"] = 'lua require"gitsigns".preview_hunk()', + ["n hb"] = 'lua require"gitsigns".blame_line()' + }, + watch_index = { + interval = 100 + }, + sign_priority = 5, + status_formatter = nil -- Use default +} diff --git a/lua/plugins/icons.lua b/lua/plugins/icons.lua index 90d8e32..03e5f59 100644 --- a/lua/plugins/icons.lua +++ b/lua/plugins/icons.lua @@ -1,123 +1,128 @@ -local M = {} - -M.config = function() - local global_theme = "themes/" .. vim.g.nvchad_theme - local colors = require(global_theme) - - require "nvim-web-devicons".setup { - override = { - html = { - icon = "", - color = colors.baby_pink, - name = "html" - }, - css = { - icon = "", - color = colors.blue, - name = "css" - }, - js = { - icon = "", - color = colors.sun, - name = "js" - }, - ts = { - icon = "ﯤ", - color = colors.teal, - name = "ts" - }, - kt = { - icon = "󱈙", - color = colors.orange, - name = "kt" - }, - png = { - icon = "", - color = colors.dark_purple, - name = "png" - }, - jpg = { - icon = "", - color = colors.dark_purple, - name = "jpg" - }, - jpeg = { - icon = "", - color = colors.dark_purple, - name = "jpeg" - }, - mp3 = { - icon = "", - color = colors.white, - name = "mp3" - }, - mp4 = { - icon = "", - color = colors.white, - name = "mp4" - }, - out = { - icon = "", - color = colors.white, - name = "out" - }, - Dockerfile = { - icon = "", - color = colors.cyan, - name = "Dockerfile" - }, - rb = { - icon = "", - color = colors.pink, - name = "rb" - }, - vue = { - icon = "﵂", - color = colors.vibrant_green, - name = "vue" - }, - py = { - icon = "", - color = colors.cyan, - name = "py" - }, - toml = { - icon = "", - color = colors.blue, - name = "toml" - }, - lock = { - icon = "", - color = colors.red, - name = "lock" - }, - zip = { - icon = "", - color = colors.sun, - name = "zip" - }, - xz = { - icon = "", - color = colors.sun, - name = "xz" - }, - deb = { - icon = "", - color = colors.cyan, - name = "deb" - }, - rpm = { - icon = "", - color = colors.orange, - name = "rpm" - }, - lua = { - icon = "", - color = colors.blue, - name = "lua" - } - } - } +local icons +if + not pcall( + function() + icons = require "nvim-web-devicons" + end + ) + then + return end -return M +local global_theme = "themes/" .. vim.g.nvchad_theme +local colors = require(global_theme) + +icons.setup { + override = { + html = { + icon = "", + color = colors.baby_pink, + name = "html" + }, + css = { + icon = "", + color = colors.blue, + name = "css" + }, + js = { + icon = "", + color = colors.sun, + name = "js" + }, + ts = { + icon = "ﯤ", + color = colors.teal, + name = "ts" + }, + kt = { + icon = "󱈙", + color = colors.orange, + name = "kt" + }, + png = { + icon = "", + color = colors.dark_purple, + name = "png" + }, + jpg = { + icon = "", + color = colors.dark_purple, + name = "jpg" + }, + jpeg = { + icon = "", + color = colors.dark_purple, + name = "jpeg" + }, + mp3 = { + icon = "", + color = colors.white, + name = "mp3" + }, + mp4 = { + icon = "", + color = colors.white, + name = "mp4" + }, + out = { + icon = "", + color = colors.white, + name = "out" + }, + Dockerfile = { + icon = "", + color = colors.cyan, + name = "Dockerfile" + }, + rb = { + icon = "", + color = colors.pink, + name = "rb" + }, + vue = { + icon = "﵂", + color = colors.vibrant_green, + name = "vue" + }, + py = { + icon = "", + color = colors.cyan, + name = "py" + }, + toml = { + icon = "", + color = colors.blue, + name = "toml" + }, + lock = { + icon = "", + color = colors.red, + name = "lock" + }, + zip = { + icon = "", + color = colors.sun, + name = "zip" + }, + xz = { + icon = "", + color = colors.sun, + name = "xz" + }, + deb = { + icon = "", + color = colors.cyan, + name = "deb" + }, + rpm = { + icon = "", + color = colors.orange, + name = "rpm" + }, + lua = { + icon = "", + color = colors.blue, + name = "lua" + } + } +} diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index a8dcc12..58681ee 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,98 +1,102 @@ -local M = {} - -M.config = function() - local lspconf = require("lspconfig") - - local function on_attach(client, bufnr) - vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") - - local opts = {noremap = true, silent = true} - - local function buf_set_keymap(...) - vim.api.nvim_buf_set_keymap(bufnr, ...) +local lspconfig, lspinstall +if + not pcall( + function() + lspconfig = require "lspconfig" + lspinstall = require "lspinstall" end + ) + then + return +end - -- Mappings. +local function on_attach(client, bufnr) + vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") - buf_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) - buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) - buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()", opts) - buf_set_keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) - buf_set_keymap("n", "", "lua vim.lsp.buf.signature_help()", opts) - buf_set_keymap("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) - buf_set_keymap("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) - buf_set_keymap("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) - buf_set_keymap("n", "D", "lua vim.lsp.buf.type_definition()", opts) - buf_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", opts) - buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()", opts) - buf_set_keymap("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) - buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) - buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) - buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) + local opts = {noremap = true, silent = true} - -- Set some keybinds conditional on server capabilities - if client.resolved_capabilities.document_formatting then - buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) - elseif client.resolved_capabilities.document_range_formatting then - buf_set_keymap("n", "f", "lua vim.lsp.buf.range_formatting()", opts) - end + local function buf_set_keymap(...) + vim.api.nvim_buf_set_keymap(bufnr, ...) end - local capabilities = vim.lsp.protocol.make_client_capabilities() - capabilities.textDocument.completion.completionItem.snippetSupport = true + -- Mappings. - -- lspInstall + lspconfig stuff + buf_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) + buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) + buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()", opts) + buf_set_keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) + buf_set_keymap("n", "", "lua vim.lsp.buf.signature_help()", opts) + buf_set_keymap("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) + buf_set_keymap("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) + buf_set_keymap("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) + buf_set_keymap("n", "D", "lua vim.lsp.buf.type_definition()", opts) + buf_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", opts) + buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()", opts) + buf_set_keymap("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) + buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) + buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) + buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) - local function setup_servers() - require "lspinstall".setup() - local servers = require "lspinstall".installed_servers() + -- Set some keybinds conditional on server capabilities + if client.resolved_capabilities.document_formatting then + buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) + elseif client.resolved_capabilities.document_range_formatting then + buf_set_keymap("n", "f", "lua vim.lsp.buf.range_formatting()", opts) + end +end - for _, lang in pairs(servers) do - if lang ~= "lua" then - lspconf[lang].setup { - on_attach = on_attach, - capabilities = capabilities, - root_dir = vim.loop.cwd - } - elseif lang == "lua" then - lspconf[lang].setup { - root_dir = vim.loop.cwd, - settings = { - Lua = { - diagnostics = { - globals = {"vim"} +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.snippetSupport = true + +-- lspInstall + lspconfig stuff + +local function setup_servers() + lspinstall.setup() + local servers = lspinstall.installed_servers() + + for _, lang in pairs(servers) do + if lang ~= "lua" then + lspconfig[lang].setup { + on_attach = on_attach, + capabilities = capabilities, + root_dir = vim.loop.cwd + } + elseif lang == "lua" then + lspconfig[lang].setup { + root_dir = vim.loop.cwd, + settings = { + Lua = { + diagnostics = { + globals = {"vim"} + }, + workspace = { + library = { + [vim.fn.expand("$VIMRUNTIME/lua")] = true, + [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true }, - workspace = { - library = { - [vim.fn.expand("$VIMRUNTIME/lua")] = true, - [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true - }, - maxPreload = 100000, - preloadFileSize = 10000 - }, - telemetry = { - enable = false - } + maxPreload = 100000, + preloadFileSize = 10000 + }, + telemetry = { + enable = false } } } - end + } end end - - setup_servers() - - -- Automatically reload after `:LspInstall ` so we don't have to restart neovim - require "lspinstall".post_install_hook = function() - setup_servers() -- reload installed servers - vim.cmd("bufdo e") -- triggers FileType autocmd that starts the server - end - - -- replace the default lsp diagnostic letters with prettier symbols - vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnosticsDefaultError"}) - vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"}) - vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"}) - vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"}) end -return M +setup_servers() + +-- Automatically reload after `:LspInstall ` so we don't have to restart neovim +lspinstall.post_install_hook = function() + setup_servers() -- reload installed servers + vim.cmd("bufdo e") -- triggers FileType autocmd that starts the server +end + +-- replace the default lsp diagnostic letters with prettier symbols +vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnosticsDefaultError"}) +vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"}) +vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"}) +vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"}) diff --git a/lua/plugins/lspkind.lua b/lua/plugins/lspkind.lua new file mode 100644 index 0000000..f9159d6 --- /dev/null +++ b/lua/plugins/lspkind.lua @@ -0,0 +1,5 @@ +pcall( + function() + require("lspkind").init() + end +) diff --git a/lua/plugins/luasnip.lua b/lua/plugins/luasnip.lua new file mode 100644 index 0000000..825c957 --- /dev/null +++ b/lua/plugins/luasnip.lua @@ -0,0 +1,18 @@ +local luasnip +if + not pcall( + function() + luasnip = require "luasnip" + end + ) + then + return +end + +luasnip.config.set_config( + { + history = true, + updateevents = "TextChanged,TextChangedI" + } +) +require("luasnip/loaders/from_vscode").load() diff --git a/lua/plugins/neoscroll.lua b/lua/plugins/neoscroll.lua new file mode 100644 index 0000000..bc95671 --- /dev/null +++ b/lua/plugins/neoscroll.lua @@ -0,0 +1,5 @@ +pcall( + function() + require("neoscroll").setup() + end +) diff --git a/lua/plugins/nvimtree.lua b/lua/plugins/nvimtree.lua index a866cb6..8450b88 100644 --- a/lua/plugins/nvimtree.lua +++ b/lua/plugins/nvimtree.lua @@ -1,97 +1,100 @@ -local M = {} - -M.config = function() - local g = vim.g - - vim.o.termguicolors = true - - g.nvim_tree_side = "left" - g.nvim_tree_width = 25 - g.nvim_tree_ignore = {".git", "node_modules", ".cache"} - g.nvim_tree_gitignore = 1 - g.nvim_tree_auto_ignore_ft = {"dashboard"} -- don't open tree on specific fiypes. - g.nvim_tree_auto_open = 0 - g.nvim_tree_auto_close = 0 -- closes tree when it's the last window - g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened - g.nvim_tree_follow = 1 - g.nvim_tree_indent_markers = 1 - g.nvim_tree_hide_dotfiles = 1 - g.nvim_tree_git_hl = 1 - g.nvim_tree_highlight_opened_files = 0 - g.nvim_tree_root_folder_modifier = ":t" - g.nvim_tree_tab_open = 0 - g.nvim_tree_allow_resize = 1 - g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names - g.nvim_tree_disable_netrw = 1 - g.nvim_tree_hijack_netrw = 0 - g.nvim_tree_update_cwd = 1 - - g.nvim_tree_show_icons = { - git = 1, - folders = 1, - files = 1 - -- folder_arrows= 1 - } - g.nvim_tree_icons = { - default = "", - symlink = "", - git = { - unstaged = "✗", - staged = "✓", - unmerged = "", - renamed = "➜", - untracked = "★", - deleted = "", - ignored = "◌" - }, - folder = { - -- disable indent_markers option to get arrows working or if you want both arrows and indent then just add the arrow icons in front ofthe default and opened folders below! - -- arrow_open = "", - -- arrow_closed = "", - default = "", - open = "", - empty = "", --  - empty_open = "", - symlink = "", - symlink_open = "" - } - } - - local tree_cb = require "nvim-tree.config".nvim_tree_callback - - g.nvim_tree_bindings = { - {key = {"", "o", "<2-LeftMouse>"}, cb = tree_cb("edit")}, - {key = {"<2-RightMouse>", ""}, cb = tree_cb("cd")}, - {key = "", cb = tree_cb("vsplit")}, - {key = "", cb = tree_cb("split")}, - {key = "", cb = tree_cb("tabnew")}, - {key = "<", cb = tree_cb("prev_sibling")}, - {key = ">", cb = tree_cb("next_sibling")}, - {key = "P", cb = tree_cb("parent_node")}, - {key = "", cb = tree_cb("close_node")}, - {key = "", cb = tree_cb("close_node")}, - {key = "", cb = tree_cb("preview")}, - {key = "K", cb = tree_cb("first_sibling")}, - {key = "J", cb = tree_cb("last_sibling")}, - {key = "I", cb = tree_cb("toggle_ignored")}, - {key = "H", cb = tree_cb("toggle_dotfiles")}, - {key = "R", cb = tree_cb("refresh")}, - {key = "a", cb = tree_cb("create")}, - {key = "d", cb = tree_cb("remove")}, - {key = "r", cb = tree_cb("rename")}, - {key = "", cb = tree_cb("full_rename")}, - {key = "x", cb = tree_cb("cut")}, - {key = "c", cb = tree_cb("copy")}, - {key = "p", cb = tree_cb("paste")}, - {key = "y", cb = tree_cb("copy_name")}, - {key = "Y", cb = tree_cb("copy_path")}, - {key = "gy", cb = tree_cb("copy_absolute_path")}, - {key = "[c", cb = tree_cb("prev_git_item")}, - {key = "}c", cb = tree_cb("next_git_item")}, - {key = "-", cb = tree_cb("dir_up")}, - {key = "q", cb = tree_cb("close")}, - {key = "g?", cb = tree_cb("toggle_help")} - } +local tree_cb +if + not pcall( + function() + tree_cb = require "nvim-tree.config".nvim_tree_callback + end + ) + then + return end -return M +local g = vim.g + +vim.o.termguicolors = true + +g.nvim_tree_side = "left" +g.nvim_tree_width = 25 +g.nvim_tree_ignore = {".git", "node_modules", ".cache"} +g.nvim_tree_gitignore = 1 +g.nvim_tree_auto_ignore_ft = {"dashboard"} -- don't open tree on specific fiypes. +g.nvim_tree_auto_open = 0 +g.nvim_tree_auto_close = 0 -- closes tree when it's the last window +g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened +g.nvim_tree_follow = 1 +g.nvim_tree_indent_markers = 1 +g.nvim_tree_hide_dotfiles = 1 +g.nvim_tree_git_hl = 1 +g.nvim_tree_highlight_opened_files = 0 +g.nvim_tree_root_folder_modifier = ":t" +g.nvim_tree_tab_open = 0 +g.nvim_tree_allow_resize = 1 +g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names +g.nvim_tree_disable_netrw = 1 +g.nvim_tree_hijack_netrw = 0 +g.nvim_tree_update_cwd = 1 + +g.nvim_tree_show_icons = { + git = 1, + folders = 1, + files = 1 + -- folder_arrows= 1 +} +g.nvim_tree_icons = { + default = "", + symlink = "", + git = { + unstaged = "✗", + staged = "✓", + unmerged = "", + renamed = "➜", + untracked = "★", + deleted = "", + ignored = "◌" + }, + folder = { + -- disable indent_markers option to get arrows working or if you want both arrows and indent then just add the arrow icons in front ofthe default and opened folders below! + -- arrow_open = "", + -- arrow_closed = "", + default = "", + open = "", + empty = "", --  + empty_open = "", + symlink = "", + symlink_open = "" + } +} + +g.nvim_tree_bindings = { + {key = {"", "o", "<2-LeftMouse>"}, cb = tree_cb("edit")}, + {key = {"<2-RightMouse>", ""}, cb = tree_cb("cd")}, + {key = "", cb = tree_cb("vsplit")}, + {key = "", cb = tree_cb("split")}, + {key = "", cb = tree_cb("tabnew")}, + {key = "<", cb = tree_cb("prev_sibling")}, + {key = ">", cb = tree_cb("next_sibling")}, + {key = "P", cb = tree_cb("parent_node")}, + {key = "", cb = tree_cb("close_node")}, + {key = "", cb = tree_cb("close_node")}, + {key = "", cb = tree_cb("preview")}, + {key = "K", cb = tree_cb("first_sibling")}, + {key = "J", cb = tree_cb("last_sibling")}, + {key = "I", cb = tree_cb("toggle_ignored")}, + {key = "H", cb = tree_cb("toggle_dotfiles")}, + {key = "R", cb = tree_cb("refresh")}, + {key = "a", cb = tree_cb("create")}, + {key = "d", cb = tree_cb("remove")}, + {key = "r", cb = tree_cb("rename")}, + {key = "", cb = tree_cb("full_rename")}, + {key = "x", cb = tree_cb("cut")}, + {key = "c", cb = tree_cb("copy")}, + {key = "p", cb = tree_cb("paste")}, + {key = "y", cb = tree_cb("copy_name")}, + {key = "Y", cb = tree_cb("copy_path")}, + {key = "gy", cb = tree_cb("copy_absolute_path")}, + {key = "[c", cb = tree_cb("prev_git_item")}, + {key = "}c", cb = tree_cb("next_git_item")}, + {key = "-", cb = tree_cb("dir_up")}, + {key = "q", cb = tree_cb("close")}, + {key = "g?", cb = tree_cb("toggle_help")} +} diff --git a/lua/plugins/statusline.lua b/lua/plugins/statusline.lua index eb675d5..b49cdaf 100644 --- a/lua/plugins/statusline.lua +++ b/lua/plugins/statusline.lua @@ -1,212 +1,217 @@ -local M = {} - -M.config = function() - local gl = require("galaxyline") - local gls = gl.section - local condition = require("galaxyline.condition") - - gl.short_line_list = {" "} - - local global_theme = "themes/" .. vim.g.nvchad_theme - local colors = require(global_theme) - - gls.left[1] = { - FirstElement = { - provider = function() - return "▋" - end, - highlight = {colors.nord_blue, colors.nord_blue} - } - } - - gls.left[2] = { - statusIcon = { - provider = function() - return "  " - end, - highlight = {colors.statusline_bg, colors.nord_blue}, - separator = " ", - separator_highlight = {colors.nord_blue, colors.lightbg} - } - } - - gls.left[3] = { - FileIcon = { - provider = "FileIcon", - condition = condition.buffer_not_empty, - highlight = {colors.white, colors.lightbg} - } - } - - gls.left[4] = { - FileName = { - provider = {"FileName"}, - condition = condition.buffer_not_empty, - highlight = {colors.white, colors.lightbg}, - separator = " ", - separator_highlight = {colors.lightbg, colors.lightbg2} - } - } - - gls.left[5] = { - current_dir = { - provider = function() - local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") - return "  " .. dir_name .. " " - end, - highlight = {colors.grey_fg2, colors.lightbg2}, - separator = " ", - separator_highlight = {colors.lightbg2, colors.statusline_bg} - } - } - - local checkwidth = function() - local squeeze_width = vim.fn.winwidth(0) / 2 - if squeeze_width > 30 then - return true +local gl, condition +if + not pcall( + function() + gl = require "galaxyline" + condition = require "galaxyline.condition" end - return false - end - - gls.left[6] = { - DiffAdd = { - provider = "DiffAdd", - condition = checkwidth, - icon = "  ", - highlight = {colors.white, colors.statusline_bg} - } - } - - gls.left[7] = { - DiffModified = { - provider = "DiffModified", - condition = checkwidth, - icon = "  ", - highlight = {colors.grey_fg2, colors.statusline_bg} - } - } - - gls.left[8] = { - DiffRemove = { - provider = "DiffRemove", - condition = checkwidth, - icon = "  ", - highlight = {colors.grey_fg2, colors.statusline_bg} - } - } - - gls.left[9] = { - DiagnosticError = { - provider = "DiagnosticError", - icon = "  ", - highlight = {colors.red, colors.statusline_bg} - } - } - - gls.left[10] = { - DiagnosticWarn = { - provider = "DiagnosticWarn", - icon = "  ", - highlight = {colors.yellow, colors.statusline_bg} - } - } - - gls.right[1] = { - lsp_status = { - provider = function() - local clients = vim.lsp.get_active_clients() - if next(clients) ~= nil then - return " " .. "  " .. " LSP " - else - return "" - end - end, - highlight = {colors.grey_fg2, colors.statusline_bg} - } - } - - gls.right[2] = { - GitIcon = { - provider = function() - return " " - end, - condition = require("galaxyline.condition").check_git_workspace, - highlight = {colors.grey_fg2, colors.statusline_bg}, - separator = " ", - separator_highlight = {colors.statusline_bg, colors.statusline_bg} - } - } - - gls.right[3] = { - GitBranch = { - provider = "GitBranch", - condition = require("galaxyline.condition").check_git_workspace, - highlight = {colors.grey_fg2, colors.statusline_bg} - } - } - - gls.right[4] = { - viMode_icon = { - provider = function() - return " " - end, - highlight = {colors.statusline_bg, colors.red}, - separator = " ", - separator_highlight = {colors.red, colors.statusline_bg} - } - } - - gls.right[5] = { - ViMode = { - provider = function() - local alias = { - n = "Normal", - i = "Insert", - c = "Command", - V = "Visual", - [""] = "Visual", - v = "Visual", - R = "Replace" - } - local current_Mode = alias[vim.fn.mode()] - - if current_Mode == nil then - return " Terminal " - else - return " " .. current_Mode .. " " - end - end, - highlight = {colors.red, colors.lightbg} - } - } - - gls.right[6] = { - some_icon = { - provider = function() - return " " - end, - separator = "", - separator_highlight = {colors.green, colors.lightbg}, - highlight = {colors.lightbg, colors.green} - } - } - - gls.right[7] = { - line_percentage = { - provider = function() - local current_line = vim.fn.line(".") - local total_line = vim.fn.line("$") - - if current_line == 1 then - return " Top " - elseif current_line == vim.fn.line("$") then - return " Bot " - end - local result, _ = math.modf((current_line / total_line) * 100) - return " " .. result .. "% " - end, - highlight = {colors.green, colors.lightbg} - } - } + ) + then + return end -return M + +local gls = gl.section + +gl.short_line_list = {" "} + +local global_theme = "themes/" .. vim.g.nvchad_theme +local colors = require(global_theme) + +gls.left[1] = { + FirstElement = { + provider = function() + return "▋" + end, + highlight = {colors.nord_blue, colors.nord_blue} + } +} + +gls.left[2] = { + statusIcon = { + provider = function() + return "  " + end, + highlight = {colors.statusline_bg, colors.nord_blue}, + separator = " ", + separator_highlight = {colors.nord_blue, colors.lightbg} + } +} + +gls.left[3] = { + FileIcon = { + provider = "FileIcon", + condition = condition.buffer_not_empty, + highlight = {colors.white, colors.lightbg} + } +} + +gls.left[4] = { + FileName = { + provider = {"FileName"}, + condition = condition.buffer_not_empty, + highlight = {colors.white, colors.lightbg}, + separator = " ", + separator_highlight = {colors.lightbg, colors.lightbg2} + } +} + +gls.left[5] = { + current_dir = { + provider = function() + local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") + return "  " .. dir_name .. " " + end, + highlight = {colors.grey_fg2, colors.lightbg2}, + separator = " ", + separator_highlight = {colors.lightbg2, colors.statusline_bg} + } +} + +local checkwidth = function() + local squeeze_width = vim.fn.winwidth(0) / 2 + if squeeze_width > 30 then + return true + end + return false +end + +gls.left[6] = { + DiffAdd = { + provider = "DiffAdd", + condition = checkwidth, + icon = "  ", + highlight = {colors.white, colors.statusline_bg} + } +} + +gls.left[7] = { + DiffModified = { + provider = "DiffModified", + condition = checkwidth, + icon = "  ", + highlight = {colors.grey_fg2, colors.statusline_bg} + } +} + +gls.left[8] = { + DiffRemove = { + provider = "DiffRemove", + condition = checkwidth, + icon = "  ", + highlight = {colors.grey_fg2, colors.statusline_bg} + } +} + +gls.left[9] = { + DiagnosticError = { + provider = "DiagnosticError", + icon = "  ", + highlight = {colors.red, colors.statusline_bg} + } +} + +gls.left[10] = { + DiagnosticWarn = { + provider = "DiagnosticWarn", + icon = "  ", + highlight = {colors.yellow, colors.statusline_bg} + } +} + +gls.right[1] = { + lsp_status = { + provider = function() + local clients = vim.lsp.get_active_clients() + if next(clients) ~= nil then + return " " .. "  " .. " LSP " + else + return "" + end + end, + highlight = {colors.grey_fg2, colors.statusline_bg} + } +} + +gls.right[2] = { + GitIcon = { + provider = function() + return " " + end, + condition = require("galaxyline.condition").check_git_workspace, + highlight = {colors.grey_fg2, colors.statusline_bg}, + separator = " ", + separator_highlight = {colors.statusline_bg, colors.statusline_bg} + } +} + +gls.right[3] = { + GitBranch = { + provider = "GitBranch", + condition = require("galaxyline.condition").check_git_workspace, + highlight = {colors.grey_fg2, colors.statusline_bg} + } +} + +gls.right[4] = { + viMode_icon = { + provider = function() + return " " + end, + highlight = {colors.statusline_bg, colors.red}, + separator = " ", + separator_highlight = {colors.red, colors.statusline_bg} + } +} + +gls.right[5] = { + ViMode = { + provider = function() + local alias = { + n = "Normal", + i = "Insert", + c = "Command", + V = "Visual", + [""] = "Visual", + v = "Visual", + R = "Replace" + } + local current_Mode = alias[vim.fn.mode()] + + if current_Mode == nil then + return " Terminal " + else + return " " .. current_Mode .. " " + end + end, + highlight = {colors.red, colors.lightbg} + } +} + +gls.right[6] = { + some_icon = { + provider = function() + return " " + end, + separator = "", + separator_highlight = {colors.green, colors.lightbg}, + highlight = {colors.lightbg, colors.green} + } +} + +gls.right[7] = { + line_percentage = { + provider = function() + local current_line = vim.fn.line(".") + local total_line = vim.fn.line("$") + + if current_line == 1 then + return " Top " + elseif current_line == vim.fn.line("$") then + return " Bot " + end + local result, _ = math.modf((current_line / total_line) * 100) + return " " .. result .. "% " + end, + highlight = {colors.green, colors.lightbg} + } +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 151733b..4fea957 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -1,7 +1,16 @@ -local M = {} +local telescope +if + not pcall( + function() + telescope = require("telescope") + end + ) + then + return +end -M.config = function() - require("telescope").setup { +telescope.setup( + { defaults = { vimgrep_arguments = { "rg", @@ -32,9 +41,9 @@ M.config = function() height = 0.80, preview_cutoff = 120 }, - file_sorter = require "telescope.sorters".get_fuzzy_file, + file_sorter = require("telescope.sorters").get_fuzzy_file, file_ignore_patterns = {}, - generic_sorter = require "telescope.sorters".get_generic_fuzzy_sorter, + generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, path_display = shorten, winblend = 0, border = {}, @@ -42,11 +51,11 @@ M.config = function() color_devicons = true, use_less = true, set_env = {["COLORTERM"] = "truecolor"}, -- default = nil, - file_previewer = require "telescope.previewers".vim_buffer_cat.new, - grep_previewer = require "telescope.previewers".vim_buffer_vimgrep.new, - qflist_previewer = require "telescope.previewers".vim_buffer_qflist.new, + file_previewer = require("telescope.previewers").vim_buffer_cat.new, + grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, + qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, -- Developer configurations: Not meant for general override - buffer_previewer_maker = require "telescope.previewers".buffer_previewer_maker + buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker }, extensions = { fzf = { @@ -62,9 +71,16 @@ M.config = function() } } } +) - require("telescope").load_extension("fzf") - require("telescope").load_extension("media_files") +if + not pcall( + function() + telescope.load_extension("fzf") + telescope.load_extension("media_files") + end + ) + then + -- This should only trigger when in need of PackerSync, so better do it + vim.cmd("PackerSync") end - -return M diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 234f490..c47b5a7 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,25 +1,28 @@ -local M = {} - -M.config = function() - local ts_config = require("nvim-treesitter.configs") - - ts_config.setup { - ensure_installed = { - "javascript", - "html", - "css", - "bash", - "lua", - "json", - "python" - -- "rust", - -- "go" - }, - highlight = { - enable = true, - use_languagetree = true - } - } +local ts_config +if + not pcall( + function() + ts_config = require "nvim-treesitter.configs" + end + ) + then + return end -return M +ts_config.setup { + ensure_installed = { + "javascript", + "html", + "css", + "bash", + "lua", + "json", + "python" + -- "rust", + -- "go" + }, + highlight = { + enable = true, + use_languagetree = true + } +} diff --git a/lua/plugins/zenmode.lua b/lua/plugins/zenmode.lua index eb8455c..4d99b98 100644 --- a/lua/plugins/zenmode.lua +++ b/lua/plugins/zenmode.lua @@ -1,81 +1,63 @@ -- plugins made by @Pocco81 =) -local M = {} +local true_zen +if + not pcall( + function() + true_zen = require "true-zen" + end + ) + then + return +end -M.config = function() - local true_zen = require("true-zen") - - true_zen.setup( - { - misc = { - on_off_commands = false, - ui_elements_commands = false, - cursor_by_mode = false, - before_minimalist_mode_shown = true, - before_minimalist_mode_hidden = true, - after_minimalist_mode_shown = true, - after_minimalist_mode_hidden = true +true_zen.setup( + { + misc = { + on_off_commands = false, + ui_elements_commands = false, + cursor_by_mode = false, + before_minimalist_mode_shown = true, + before_minimalist_mode_hidden = true, + after_minimalist_mode_shown = true, + after_minimalist_mode_hidden = true + }, + ui = { + bottom = { + laststatus = 0, + ruler = false, + showmode = false, + showcmd = false, + cmdheight = 1 }, - ui = { - bottom = { - laststatus = 0, - ruler = false, - showmode = false, - showcmd = false, - cmdheight = 1 - }, - top = { - showtabline = 0 - }, - left = { - number = false, - relativenumber = false, - signcolumn = "no" - } + top = { + showtabline = 0 }, - modes = { - ataraxis = { - left_padding = 37, - right_padding = 37, - top_padding = 2, - bottom_padding = 2, - just_do_it_for_me = false, - ideal_writing_area_width = 0, - keep_default_fold_fillchars = true, - custome_bg = "#1e222a" - }, - focus = { - margin_of_error = 5, - focus_method = "experimental" - } - }, - integrations = { - galaxyline = true, - nvim_bufferline = true + left = { + number = false, + relativenumber = false, + signcolumn = "no" } - } - ) -end - --- autosave.nvim plugin disabled by default -M.autoSave = function() - local autosave = require("autosave") - - autosave.setup( - { - enabled = vim.g.auto_save, -- takes boolean value from init.lua - execution_message = "autosaved at : " .. vim.fn.strftime("%H:%M:%S"), - events = {"InsertLeave", "TextChanged"}, - conditions = { - exists = true, - filetype_is_not = {}, - modifiable = true + }, + modes = { + ataraxis = { + left_padding = 37, + right_padding = 37, + top_padding = 2, + bottom_padding = 2, + just_do_it_for_me = false, + ideal_writing_area_width = 0, + keep_default_fold_fillchars = true, + custome_bg = "#1e222a" }, - write_all_buffers = true, - on_off_commands = true, - clean_command_line_interval = 2500 + focus = { + margin_of_error = 5, + focus_method = "experimental" + } + }, + integrations = { + galaxyline = true, + nvim_bufferline = true } - ) -end - -return M + } +) From 3e83ec53147241df3a559c52428ba1347ddd53ac Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 15 Jul 2021 21:16:45 +0530 Subject: [PATCH 0407/1541] [2/4] Refactor: plugins: Handle packer seperatly | Changes for configs eg: require "plugins.neoscroll" instead of require "plugins.neoscroll".config() second commit of refactor handle require errors handle cloning of packer --- lua/packerInit.lua | 45 ++++++++++++++++++++++++++++++ lua/pluginList.lua | 68 +++++++++++++++++++++------------------------- 2 files changed, 76 insertions(+), 37 deletions(-) create mode 100644 lua/packerInit.lua diff --git a/lua/packerInit.lua b/lua/packerInit.lua new file mode 100644 index 0000000..d6b6c93 --- /dev/null +++ b/lua/packerInit.lua @@ -0,0 +1,45 @@ +local packer +if + not pcall( + function() + packer = require "packer" + end + ) + then + local packer_path = vim.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" + + print("Cloning packer..") + -- remove the dir before cloning + vim.fn.delete(packer_path, "rf") + vim.fn.system( + { + "git", + "clone", + "https://github.com/wbthomason/packer.nvim", + "--depth", + "20", + packer_path + } + ) + if pcall( + function() + packer = require "packer" + end + ) + then + print("Packer cloned successfully.") + else + error("Couldn't clone packer !\nPacker path: " .. packer_path) + end +end + +return packer.init { + display = { + open_fn = function() + return require("packer.util").float {border = "single"} + end + }, + git = { + clone_timeout = 600 -- Timeout, in seconds, for git clones + } +} diff --git a/lua/pluginList.lua b/lua/pluginList.lua index c881247..4289f02 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -1,16 +1,17 @@ -local packer = require("packer") -local use = packer.use - -packer.init { - display = { - open_fn = function() - return require("packer.util").float {border = "single"} +local packer +if + pcall( + function() + require "packerInit" end - }, - git = { - clone_timeout = 600 -- Timeout, in seconds, for git clones - } -} + ) + then + packer = require "packer" +else + return false +end + +local use = packer.use return packer.startup( function() @@ -21,7 +22,7 @@ return packer.startup( use { "glepnir/galaxyline.nvim", config = function() - require("plugins.statusline").config() + require "plugins.statusline" end } @@ -32,8 +33,7 @@ return packer.startup( "norcalli/nvim-colorizer.lua", event = "BufRead", config = function() - require("colorizer").setup() - vim.cmd("ColorizerReloadAllBuffers") + require "plugins.colorizer" end } @@ -42,7 +42,7 @@ return packer.startup( "nvim-treesitter/nvim-treesitter", event = "BufRead", config = function() - require("plugins.treesitter").config() + require "plugins.treesitter" end } @@ -55,7 +55,7 @@ return packer.startup( "neovim/nvim-lspconfig", after = "nvim-lspinstall", config = function() - require("plugins.lspconfig").config() + require "plugins.lspconfig" end } @@ -63,7 +63,7 @@ return packer.startup( "onsails/lspkind-nvim", event = "BufRead", config = function() - require("lspkind").init() + require "plugins.lspkind" end } @@ -72,7 +72,7 @@ return packer.startup( "hrsh7th/nvim-compe", event = "InsertEnter", config = function() - require("plugins.compe").config() + require "plugins.compe" end, wants = {"LuaSnip"}, requires = { @@ -81,7 +81,7 @@ return packer.startup( wants = "friendly-snippets", event = "InsertCharPre", config = function() - require("plugins.compe").snippets() + require "plugins.luasnip" end }, { @@ -98,14 +98,14 @@ return packer.startup( "kyazdani42/nvim-tree.lua", cmd = "NvimTreeToggle", config = function() - require("plugins.nvimtree").config() + require "plugins.nvimtree" end } use { "kyazdani42/nvim-web-devicons", config = function() - require("plugins.icons").config() + require "plugins.icons" end } @@ -117,7 +117,7 @@ return packer.startup( }, cmd = "Telescope", config = function() - require("plugins.telescope").config() + require "plugins.telescope" end } @@ -133,7 +133,7 @@ return packer.startup( "lewis6991/gitsigns.nvim", event = "BufRead", config = function() - require("plugins.gitsigns").config() + require "plugins.gitsigns" end } @@ -142,13 +142,7 @@ return packer.startup( "windwp/nvim-autopairs", after = "nvim-compe", config = function() - require("nvim-autopairs").setup() - require("nvim-autopairs.completion.compe").setup( - { - map_cr = true, - map_complete = true -- insert () func completion - } - ) + require "plugins.autopairs" end } @@ -158,7 +152,7 @@ return packer.startup( "terrortylor/nvim-comment", cmd = "CommentToggle", config = function() - require("nvim_comment").setup() + require "plugins.comment" end } @@ -172,7 +166,7 @@ return packer.startup( "SessionSave" }, setup = function() - require("plugins.dashboard").config() + require "plugins.dashboard" end } @@ -182,7 +176,7 @@ return packer.startup( use { "Pocco81/AutoSave.nvim", config = function() - require("plugins.zenmode").autoSave() + require "plugins.autosave" end, cond = function() return vim.g.auto_save == true @@ -194,7 +188,7 @@ return packer.startup( "karb94/neoscroll.nvim", event = "WinScrolled", config = function() - require("neoscroll").setup() + require "plugins.neoscroll" end } @@ -202,7 +196,7 @@ return packer.startup( "Pocco81/TrueZen.nvim", cmd = {"TZAtaraxis", "TZMinimalist", "TZFocus"}, config = function() - require("plugins.zenmode").config() + require "plugins.zenmode" end } @@ -212,7 +206,7 @@ return packer.startup( "lukas-reineke/indent-blankline.nvim", event = "BufRead", setup = function() - require("utils").blankline() + require "plugins.blankline" end } end From 643d1bd7d8f9fafebea05dbc0f85498d08088fe3 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 15 Jul 2021 21:17:47 +0530 Subject: [PATCH 0408/1541] [3/4] Refactor: init: Use async | Move theme stuff to theme.lua third commit of refactor perf improvements due to async run packer sync if base16 not found this is not perfect error handling for initial run, but something handle require errors --- init.lua | 36 +++++++++++++++++++++++++----------- lua/mappings.lua | 12 +++++++++++- lua/theme.lua | 21 +++++++++++++++++++++ lua/utils.lua | 12 ------------ 4 files changed, 57 insertions(+), 24 deletions(-) create mode 100644 lua/theme.lua diff --git a/init.lua b/init.lua index 58a90da..c9df36f 100644 --- a/init.lua +++ b/init.lua @@ -1,14 +1,28 @@ --- load all plugins -require "pluginList" +-- load all options require "options" --- colorscheme related stuff -vim.g.nvchad_theme = "onedark" -local base16 = require "base16" -base16(base16.themes["onedark"], true) +-- only try to load stuff if atleast base16 is initialized +-- TODO: Find a better way to trigger PackerSync +if require "theme" then + local async + async = + vim.loop.new_async( + vim.schedule_wrap( + function() + require "pluginList" + require "plugins.bufferline" + require "highlights" + require "mappings" + require("utils").hideStuff() -require "highlights" -require "mappings" -require "plugins.bufferline" - -require("utils").hideStuff() + async:close() + end + ) + ) + async:send() +else + -- otherwise run packer sync + require "pluginList" + print("Now PackerSync will be executed, after completion, restart neovim.\n") + vim.cmd("PackerSync") +end diff --git a/lua/mappings.lua b/lua/mappings.lua index cd1cd1a..c9ae584 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -76,7 +76,17 @@ _G.s_tab_complete = function() end function _G.completions() - local npairs = require("nvim-autopairs") + local npairs + if + not pcall( + function() + npairs = require "nvim-autopairs" + end + ) + then + return + end + if vim.fn.pumvisible() == 1 then if vim.fn.complete_info()["selected"] ~= -1 then return vim.fn["compe#confirm"]("") diff --git a/lua/theme.lua b/lua/theme.lua new file mode 100644 index 0000000..8727eaf --- /dev/null +++ b/lua/theme.lua @@ -0,0 +1,21 @@ +-- colorscheme related stuff +vim.g.nvchad_theme = "onedark" + +local base16 +if + not pcall( + function() + base16 = require "base16" + end + ) + then + return false +else + base16(base16.themes["onedark"], true) + local cmd = vim.cmd + + -- load bg color before async for smooth transition + local background = require("themes/" .. vim.g.nvchad_theme).black + vim.cmd("hi Normal guibg=" .. background) + return true +end diff --git a/lua/utils.lua b/lua/utils.lua index db5dea2..a06fa07 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -1,17 +1,5 @@ local M = {} --- blankline config -M.blankline = function() - vim.g.indentLine_enabled = 1 - vim.g.indent_blankline_char = "▏" - - vim.g.indent_blankline_filetype_exclude = {"help", "terminal", "dashboard"} - vim.g.indent_blankline_buftype_exclude = {"terminal"} - - vim.g.indent_blankline_show_trailing_blankline_indent = false - vim.g.indent_blankline_show_first_indent_level = false -end - -- hide line numbers , statusline in specific buffers! M.hideStuff = function() vim.api.nvim_exec( From d1f23d1bc3b33988131099a77b55dd9f86a04e01 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 16 Jul 2021 10:51:12 +0530 Subject: [PATCH 0409/1541] [4/4] Refactor: install.sh: Don't handle packer use +":lua require 'pluginList' vim.cmd('PackerSync')" only for update as PackerSync should trigger on fresh install automatically --- install.sh | 69 +++++++++++++++--------------------------------------- 1 file changed, 19 insertions(+), 50 deletions(-) diff --git a/install.sh b/install.sh index 3f3b9e1..3ae66ae 100755 --- a/install.sh +++ b/install.sh @@ -33,36 +33,6 @@ _check_nvim_version() { done } -_setup_packer() { - _clone_packer() { - [ -d "${_PACKER_PATH}" ] && rm -rf "${_PACKER_PATH}" - - printf "\n%s\n" "=> Cloning packer.." - if "${_GIT}" clone "${_PACKER_REPO_URL}" \ - "${_PACKER_PATH}" --depth 20; then - printf "%s\n" "=> Packer Installed!" - else - printf "Error: Couldn't clone packer\n" - exit 1 - fi - } - - if [ "${_UPDATE}" = "true" ]; then - printf "%s\n" "Updating packer" - { [ -d "${_PACKER_PATH}" ] \ - && "${_GIT}" -C "${_PACKER_PATH}" pull "${_PACKER_REPO_URL}"; } || _clone_packer - else - printf "%s\n" "Installing packer" - if [ -d ~/.local/share/nvim/site/pack/packer ]; then - printf "%s\n" "Clearing previous packer installs" - rm -rf ~/.local/share/nvim/site/pack - fi - _clone_packer - fi - printf "\n" - return 0 -} - _copy_config() { printf "%s\n" "Linking config" printf "%s\n" "Old nvim config will be changed to nvim.bak if exists! :0" @@ -124,8 +94,6 @@ _setup_terminal_shell() { _setup_arguments() { # default variables to be used - _PACKER_PATH="${HOME}/.local/share/nvim/site/pack/packer/start/packer.nvim" - _PACKER_REPO_URL="https://github.com/wbthomason/packer.nvim" _CONFIG_PATH="${HOME}/.config/nvim" _UPDATE="" _BACKUP_PATH="${_CONFIG_PATH}.bak" @@ -133,22 +101,22 @@ _setup_arguments() { _CURRENT_SHELL="${SHELL##*/}" _check_longoptions() { - [ -z "${2}" ] \ - && printf '%s: %s: option requires an argument\nTry '"%s -h/--help"' for more information.\n' "${0##*/}" "${1}" "${0##*/}" \ - && exit 1 + [ -z "${2}" ] && + printf '%s: %s: option requires an argument\nTry '"%s -h/--help"' for more information.\n' "${0##*/}" "${1}" "${0##*/}" && + exit 1 return 0 } while [ $# -gt 0 ]; do case "${1}" in - -h | --help) _usage ;; - -i | --install) _UPDATE="false" ;; - -u | --update) _UPDATE="true" ;; - -b | --backup) - _check_longoptions "${1}" "${2}" - _BACKUP_PATH="${2}" && shift - ;; - -nb | --nobackup) _NO_BACKUP="true" ;; + -h | --help) _usage ;; + -i | --install) _UPDATE="false" ;; + -u | --update) _UPDATE="true" ;; + -b | --backup) + _check_longoptions "${1}" "${2}" + _BACKUP_PATH="${2}" && shift + ;; + -nb | --nobackup) _NO_BACKUP="true" ;; esac shift done @@ -178,22 +146,23 @@ main() { _check_install_dependencies _setup_arguments "${@}" - _setup_packer _copy_config _setup_terminal_shell # install all plugins + compile them if _NVIM="$(command -v nvim)"; then if _check_nvim_version; then - printf "\n%s\n" "=> Neovim will open with some errors, just press enter" && sleep 1 - "${_NVIM}" +PackerSync + printf "\n%s\n" "=> Neovim will now open." && sleep 1 + if [ "${_UPDATE}" = "false" ]; then + "${_NVIM}" +":lua require 'pluginList' vim.cmd('PackerSync')" + else + "${_NVIM}" + fi else - printf "Error: Neovim is installed, but version is lower than 0.5.x, install Neovim >= 5.x and then run the below command.\n" - printf " nvim +PackerSync\n" + printf "Error: Neovim is installed, but version is lower than 0.5.x, install Neovim >= 5.x and then run nvim & do :PackerSync\n." fi else - printf "Error: Neovim is not installed, install Neovim >= 5.x and then run the below command\n" - printf " nvim +PackerSync\n" + printf "Error: Neovim is not installed, install Neovim >= 5.x and then run neovim & do :PackerSync.\n" fi } From 35b210b46adb6cf2ac9aa58d69df66c4dc266f5d Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 16 Jul 2021 10:54:04 +0530 Subject: [PATCH 0410/1541] install.sh: Don't ask for terminal shell when updating | Misc Handle a edgecase for config copying Remove an unnecessary print --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 3ae66ae..fbb0bf1 100755 --- a/install.sh +++ b/install.sh @@ -42,6 +42,7 @@ _copy_config() { printf "%s\n" "Nvim Directory exists" if [ "${_NO_BACKUP}" = "true" ]; then printf "%s\n" "Skipping backup as --no-backup flag was passed.." + [ "${_UPDATE}" = "false" ] && rm -rf "${_CONFIG_PATH}" else printf "%s\n" "Taking backup of existing config.." mv "${_CONFIG_PATH}" "${_BACKUP_PATH}" || { @@ -50,7 +51,6 @@ _copy_config() { exit 1 } fi - printf "%s\n" "Creating new nvim directory" else printf "%s\n" "Nvim Config doesn't exist so creating one" fi @@ -147,7 +147,7 @@ main() { _setup_arguments "${@}" _copy_config - _setup_terminal_shell + [ "${_UPDATE}" = "false" ] && _setup_terminal_shell # install all plugins + compile them if _NVIM="$(command -v nvim)"; then From 2952f4d5c74522c1ed0e22b1926335bde4c3ade0 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 16 Jul 2021 23:22:36 +0530 Subject: [PATCH 0411/1541] clean stuff --- init.lua | 5 ++-- lua/highlights.lua | 2 +- lua/options.lua | 2 +- lua/pluginList.lua | 11 ++++---- lua/plugins/autosave.lua | 4 +-- lua/plugins/blankline.lua | 9 ------- lua/plugins/colorizer.lua | 13 ---------- lua/plugins/comment.lua | 5 ---- lua/plugins/lspkind.lua | 5 ---- lua/plugins/others.lua | 54 +++++++++++++++++++++++++++++++++++++++ lua/plugins/telescope.lua | 2 +- lua/theme.lua | 2 -- 12 files changed, 66 insertions(+), 48 deletions(-) delete mode 100644 lua/plugins/blankline.lua delete mode 100644 lua/plugins/colorizer.lua delete mode 100644 lua/plugins/comment.lua delete mode 100644 lua/plugins/lspkind.lua create mode 100644 lua/plugins/others.lua diff --git a/init.lua b/init.lua index c9df36f..ec789ab 100644 --- a/init.lua +++ b/init.lua @@ -1,8 +1,7 @@ -- load all options require "options" --- only try to load stuff if atleast base16 is initialized --- TODO: Find a better way to trigger PackerSync +-- load stuff only if theme is initialized if require "theme" then local async async = @@ -21,7 +20,7 @@ if require "theme" then ) async:send() else - -- otherwise run packer sync + -- otherwise run PackerSync require "pluginList" print("Now PackerSync will be executed, after completion, restart neovim.\n") vim.cmd("PackerSync") diff --git a/lua/highlights.lua b/lua/highlights.lua index 2f3cc01..b579954 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -42,7 +42,7 @@ fg("IndentBlanklineChar", line) -- misc -- fg("LineNr", grey) -fg("Comment", grey_fg2) +fg("Comment", grey_fg) fg("NvimInternalError", red) fg("VertSplit", line) fg("EndOfBuffer", black) diff --git a/lua/options.lua b/lua/options.lua index 3d2d2dd..caed235 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -26,7 +26,7 @@ opt.number = true opt.numberwidth = 2 -- opt.relativenumber = true --- for indenline +-- Indenline opt.expandtab = true opt.shiftwidth = 2 opt.smartindent = true diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 4289f02..34650f3 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -33,7 +33,7 @@ return packer.startup( "norcalli/nvim-colorizer.lua", event = "BufRead", config = function() - require "plugins.colorizer" + require("plugins.others").colorizer() end } @@ -63,7 +63,7 @@ return packer.startup( "onsails/lspkind-nvim", event = "BufRead", config = function() - require "plugins.lspkind" + require("plugins.others").lspkind() end } @@ -122,7 +122,6 @@ return packer.startup( } use {"nvim-telescope/telescope-fzf-native.nvim", run = "make", cmd = "Telescope"} - use { "nvim-telescope/telescope-media-files.nvim", cmd = "Telescope" @@ -152,7 +151,7 @@ return packer.startup( "terrortylor/nvim-comment", cmd = "CommentToggle", config = function() - require "plugins.comment" + require("plugins.others").comment() end } @@ -188,7 +187,7 @@ return packer.startup( "karb94/neoscroll.nvim", event = "WinScrolled", config = function() - require "plugins.neoscroll" + require("plugins.others").neoscroll() end } @@ -206,7 +205,7 @@ return packer.startup( "lukas-reineke/indent-blankline.nvim", event = "BufRead", setup = function() - require "plugins.blankline" + require("plugins.others").blankline() end } end diff --git a/lua/plugins/autosave.lua b/lua/plugins/autosave.lua index 6ddcd82..fda9f9a 100644 --- a/lua/plugins/autosave.lua +++ b/lua/plugins/autosave.lua @@ -3,7 +3,7 @@ local autosave if not pcall( function() - func = require "autosave" + autosave = require "autosave" end ) then @@ -20,7 +20,7 @@ autosave.setup( filetype_is_not = {}, modifiable = true }, - write_all_buffers = true, + write_all_buffers = false, on_off_commands = true, clean_command_line_interval = 2500 } diff --git a/lua/plugins/blankline.lua b/lua/plugins/blankline.lua deleted file mode 100644 index 6a1bd4a..0000000 --- a/lua/plugins/blankline.lua +++ /dev/null @@ -1,9 +0,0 @@ --- blankline config -vim.g.indentLine_enabled = 1 -vim.g.indent_blankline_char = "▏" - -vim.g.indent_blankline_filetype_exclude = {"help", "terminal", "dashboard"} -vim.g.indent_blankline_buftype_exclude = {"terminal"} - -vim.g.indent_blankline_show_trailing_blankline_indent = false -vim.g.indent_blankline_show_first_indent_level = false diff --git a/lua/plugins/colorizer.lua b/lua/plugins/colorizer.lua deleted file mode 100644 index d3e1d9d..0000000 --- a/lua/plugins/colorizer.lua +++ /dev/null @@ -1,13 +0,0 @@ -local colorizer -if - not pcall( - function() - colorizer = require("colorizer") - end - ) - then - return -end - -colorizer.setup() -vim.cmd("ColorizerReloadAllBuffers") diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua deleted file mode 100644 index 2a41f8a..0000000 --- a/lua/plugins/comment.lua +++ /dev/null @@ -1,5 +0,0 @@ -pcall( - function() - require("nvim_comment").setup() - end -) diff --git a/lua/plugins/lspkind.lua b/lua/plugins/lspkind.lua deleted file mode 100644 index f9159d6..0000000 --- a/lua/plugins/lspkind.lua +++ /dev/null @@ -1,5 +0,0 @@ -pcall( - function() - require("lspkind").init() - end -) diff --git a/lua/plugins/others.lua b/lua/plugins/others.lua new file mode 100644 index 0000000..6382701 --- /dev/null +++ b/lua/plugins/others.lua @@ -0,0 +1,54 @@ +local M = {} + +M.colorizer = function() + local colorizer + if + not pcall( + function() + colorizer = require("colorizer") + end + ) + then + return + end + + colorizer.setup() + vim.cmd("ColorizerReloadAllBuffers") +end + +M.comment = function() + pcall( + function() + require("nvim_comment").setup() + end + ) +end + +M.lspkind = function() + pcall( + function() + require("lspkind").init() + end + ) +end + +M.neoscroll = function() + pcall( + function() + require("neoscroll").setup() + end + ) +end + +M.blankline = function() + vim.g.indentLine_enabled = 1 + vim.g.indent_blankline_char = "▏" + + vim.g.indent_blankline_filetype_exclude = {"help", "terminal", "dashboard"} + vim.g.indent_blankline_buftype_exclude = {"terminal"} + + vim.g.indent_blankline_show_trailing_blankline_indent = false + vim.g.indent_blankline_show_first_indent_level = false +end + +return M diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 4fea957..f9f3819 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -44,7 +44,7 @@ telescope.setup( file_sorter = require("telescope.sorters").get_fuzzy_file, file_ignore_patterns = {}, generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, - path_display = shorten, + path_display = {"absolute"}, winblend = 0, border = {}, borderchars = {"─", "│", "─", "│", "╭", "╮", "╯", "╰"}, diff --git a/lua/theme.lua b/lua/theme.lua index 8727eaf..2bdfb11 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -1,4 +1,3 @@ --- colorscheme related stuff vim.g.nvchad_theme = "onedark" local base16 @@ -12,7 +11,6 @@ if return false else base16(base16.themes["onedark"], true) - local cmd = vim.cmd -- load bg color before async for smooth transition local background = require("themes/" .. vim.g.nvchad_theme).black From 75aa73762f25dfb04bb5a43e11d7db4ef74a4604 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 16 Jul 2021 23:55:40 +0530 Subject: [PATCH 0412/1541] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4964c87..b4d7fa0 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ without / with Treesitter : - Without lazy loading vs with lazy loading ( this is tested on my old pentium system so ofc the startuptime will be a lot much lesser for you ) - + # TODO From 5bb85b81761baeaf847b39f29ab2bcd505be4e02 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 16 Jul 2021 23:40:52 +0530 Subject: [PATCH 0413/1541] trim default ts parsers list --- lua/plugins/treesitter.lua | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index c47b5a7..bf574eb 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -11,15 +11,8 @@ end ts_config.setup { ensure_installed = { - "javascript", - "html", - "css", "bash", - "lua", - "json", - "python" - -- "rust", - -- "go" + "lua" }, highlight = { enable = true, From f0b491cd94c27c67ccc8a446d23ae3c0f1d0132b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 17 Jul 2021 01:04:13 +0530 Subject: [PATCH 0414/1541] update truezen config --- lua/plugins/zenmode.lua | 51 ++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/lua/plugins/zenmode.lua b/lua/plugins/zenmode.lua index 4d99b98..4a49f5d 100644 --- a/lua/plugins/zenmode.lua +++ b/lua/plugins/zenmode.lua @@ -1,5 +1,3 @@ --- plugins made by @Pocco81 =) - local true_zen if not pcall( @@ -13,15 +11,6 @@ end true_zen.setup( { - misc = { - on_off_commands = false, - ui_elements_commands = false, - cursor_by_mode = false, - before_minimalist_mode_shown = true, - before_minimalist_mode_hidden = true, - after_minimalist_mode_shown = true, - after_minimalist_mode_hidden = true - }, ui = { bottom = { laststatus = 0, @@ -41,14 +30,24 @@ true_zen.setup( }, modes = { ataraxis = { - left_padding = 37, - right_padding = 37, - top_padding = 2, - bottom_padding = 2, - just_do_it_for_me = false, - ideal_writing_area_width = 0, + left_padding = 32, + right_padding = 32, + top_padding = 1, + bottom_padding = 1, + ideal_writing_area_width = {0}, + just_do_it_for_me = true, keep_default_fold_fillchars = true, - custome_bg = "#1e222a" + custome_bg = "", + bg_configuration = true, + affected_higroups = { + NonText = {}, + FoldColumn = {}, + ColorColumn = {}, + VertSplit = {}, + StatusLine = {}, + StatusLineNC = {}, + SignColumn = {} + } }, focus = { margin_of_error = 5, @@ -56,8 +55,22 @@ true_zen.setup( } }, integrations = { + vim_gitgutter = false, galaxyline = true, - nvim_bufferline = true + tmux = false, + gitsigns = false, + nvim_bufferline = true, + limelight = false, + vim_airline = false, + vim_powerline = false, + vim_signify = false, + express_line = false, + lualine = false + }, + misc = { + on_off_commands = false, + ui_elements_commands = false, + cursor_by_mode = false } } ) From c6857e2a72f5f58a63c94b23fdac2bbd56817dfe Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 17 Jul 2021 14:07:27 +0530 Subject: [PATCH 0415/1541] modded nord theme added --- init.lua | 2 +- lua/themes/nord.lua | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 lua/themes/nord.lua diff --git a/init.lua b/init.lua index ec789ab..cde42ff 100644 --- a/init.lua +++ b/init.lua @@ -22,6 +22,6 @@ if require "theme" then else -- otherwise run PackerSync require "pluginList" - print("Now PackerSync will be executed, after completion, restart neovim.\n") + print("Now PackerSync will be executed, after completion, restart nvim.\n") vim.cmd("PackerSync") end diff --git a/lua/themes/nord.lua b/lua/themes/nord.lua new file mode 100644 index 0000000..16f13d2 --- /dev/null +++ b/lua/themes/nord.lua @@ -0,0 +1,33 @@ +local colors = { + white = "#abb2bf", + darker_black = "#2a303c", + black = "#2E3440", -- nvim bg + black2 = "#343a46", + one_bg = "#353b47", -- real bg of onedark + one_bg2 = "#383e4a", + one_bg3 = "#3b414d", + grey = "#474d59", + grey_fg = "#565c68", + grey_fg2 = "#606672", + light_grey = "#646a76", + red = "#BF616A", + baby_pink = "#de878f", + pink = "#e89199", + line = "#3a404c", -- for lines like vertsplit + green = "#A3BE8C", + vibrant_green = "#afca98", + blue = "#7797b7", + nord_blue = "#81A1C1", + yellow = "#EBCB8B", + sun = "#e1c181", + purple = "#aab1be", + dark_purple = "##B48EAD", + teal = "#6484a4", + orange = "#e39a83", + cyan = "#9aafe6", + statusline_bg = "#313743", + lightbg = "#333945", + lightbg2 = "#353b47" +} + +return colors From 5f7f2df2b735aeb417d910334e371963103d057a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 17 Jul 2021 14:15:14 +0530 Subject: [PATCH 0416/1541] minor changes --- lua/highlights.lua | 2 +- lua/theme.lua | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lua/highlights.lua b/lua/highlights.lua index b579954..08ad42b 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -62,7 +62,7 @@ fg("cursorlinenr", white) -- git signs --- fg_bg("DiffAdd", nord_blue, "none") -fg_bg("DiffChange", grey, "none") +fg_bg("DiffChange", grey_fg, "none") fg_bg("DiffModified", nord_blue, "none") -- NvimTree diff --git a/lua/theme.lua b/lua/theme.lua index 2bdfb11..83a7449 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -11,9 +11,5 @@ if return false else base16(base16.themes["onedark"], true) - - -- load bg color before async for smooth transition - local background = require("themes/" .. vim.g.nvchad_theme).black - vim.cmd("hi Normal guibg=" .. background) return true end From 82f07879f3348cd7be674ebba82e78328837ceee Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 17 Jul 2021 14:20:36 +0530 Subject: [PATCH 0417/1541] better nord colors --- lua/themes/nord.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/themes/nord.lua b/lua/themes/nord.lua index 16f13d2..095dd18 100644 --- a/lua/themes/nord.lua +++ b/lua/themes/nord.lua @@ -25,9 +25,9 @@ local colors = { teal = "#6484a4", orange = "#e39a83", cyan = "#9aafe6", - statusline_bg = "#313743", - lightbg = "#333945", - lightbg2 = "#353b47" + statusline_bg = "#333945", + lightbg = "#3f4551", + lightbg2 = "#393f4b" } return colors From 2c74abe936aed11a28ee3545a698c76e33785b2b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 17 Jul 2021 16:13:42 +0530 Subject: [PATCH 0418/1541] map escape to normal mode --- lua/mappings.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index c9ae584..fb52afb 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -18,6 +18,8 @@ map("v", "x", [=[ "_x ]=], opt) this line too ]] -- +vim.api.nvim_set_keymap("i", "jk", "", {}) + -- OPEN TERMINALS -- map("n", "", [[vnew term://bash ]], opt) -- term over right map("n", "", [[ split term://bash | resize 10 ]], opt) -- term bottom @@ -35,7 +37,6 @@ map("n", "zm", ":TZMinimalist", opt) map("n", "zf", ":TZFocus", opt) map("n", "", ":w ", opt) --- vim.cmd("inoremap jh ") -- Commenter Keybinding map("n", "/", ":CommentToggle", opt) From 8be8d364744447e156e312845141e4c85b8af354 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 17 Jul 2021 16:44:39 +0530 Subject: [PATCH 0419/1541] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b4d7fa0..5c6d815 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,9 @@ without / with Treesitter : -- Without lazy loading vs with lazy loading ( this is tested on my old pentium system so ofc the startuptime will be a lot much lesser for you ) +- Without lazy loading vs with lazy loading and default nvim with startuptime.vim plugin vs nvchad + +( This is tested on my old pentium system so ofc the startuptime will be a lot much lesser for you ) From 72b9fa501885b4480be0e57d2963c565a7880857 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 17 Jul 2021 09:08:45 +0530 Subject: [PATCH 0420/1541] mappings: Use ESC to clear search highlighting and to get out of terminal insert mode --- lua/mappings.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/mappings.lua b/lua/mappings.lua index fb52afb..e04c137 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -133,3 +133,9 @@ map("n", "", ":bd!", opt) -- close tab -- move between tabs map("n", "", [[BufferLineCycleNext]], opt) map("n", "", [[BufferLineCyclePrev]], opt) + +-- use ESC to turn off search highlighting +map("n", "", ":noh", opts) + +-- get out of terminal with ESC +map("t", "", "", opts) From dbc4979ebd7497cb75ea5c37495c0b8da94fb4aa Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 17 Jul 2021 14:34:36 +0530 Subject: [PATCH 0421/1541] Go to next/previous line with h,l,left and right --- lua/options.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/options.lua b/lua/options.lua index caed235..cd53fb9 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -31,6 +31,10 @@ opt.expandtab = true opt.shiftwidth = 2 opt.smartindent = true +-- go to previous/next line with h,l,left arrow and right arrow +-- when cursor reaches end/beginning of line +opt.whichwrap:append("<>hl") + g.mapleader = " " g.auto_save = false From 1d7602e3e4e546d83636a114b5027ce0e3d3117b Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 17 Jul 2021 16:48:41 +0530 Subject: [PATCH 0422/1541] mappings: Don't yank the text after pasting in visual mode --- lua/mappings.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/mappings.lua b/lua/mappings.lua index e04c137..f3bf180 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -20,6 +20,9 @@ map("v", "x", [=[ "_x ]=], opt) vim.api.nvim_set_keymap("i", "jk", "", {}) +-- Don't copy the replaced text after pasting in visual mode +map("v", "p", '"_dP', opt) + -- OPEN TERMINALS -- map("n", "", [[vnew term://bash ]], opt) -- term over right map("n", "", [[ split term://bash | resize 10 ]], opt) -- term bottom From 9c1a3ad2a2487c22cbc7fee02ef85aae24e438bd Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 17 Jul 2021 16:44:52 +0530 Subject: [PATCH 0423/1541] Use a different saner syntax for pcall takes less lines, looks much better remove neoscroll.lua, missed in 2952f4d5c74522c1ed0e22b1926335bde4c3ade0 --- lua/packerInit.lua | 21 +++++++-------------- lua/pluginList.lua | 11 +++-------- lua/plugins/autopairs.lua | 13 ++++--------- lua/plugins/autosave.lua | 10 ++-------- lua/plugins/bufferline.lua | 10 ++-------- lua/plugins/compe.lua | 10 ++-------- lua/plugins/gitsigns.lua | 10 ++-------- lua/plugins/icons.lua | 10 ++-------- lua/plugins/lspconfig.lua | 12 +++--------- lua/plugins/neoscroll.lua | 5 ----- lua/plugins/nvimtree.lua | 11 +++-------- lua/plugins/others.lua | 34 ++++++++++++---------------------- lua/plugins/statusline.lua | 12 +++--------- lua/plugins/telescope.lua | 10 ++-------- lua/plugins/treesitter.lua | 10 ++-------- lua/plugins/zenmode.lua | 10 ++-------- lua/theme.lua | 15 +++++---------- 17 files changed, 56 insertions(+), 158 deletions(-) delete mode 100644 lua/plugins/neoscroll.lua diff --git a/lua/packerInit.lua b/lua/packerInit.lua index d6b6c93..c23706a 100644 --- a/lua/packerInit.lua +++ b/lua/packerInit.lua @@ -1,11 +1,6 @@ -local packer -if - not pcall( - function() - packer = require "packer" - end - ) - then +local present, packer = pcall(require, "packer") + +if not present then local packer_path = vim.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" print("Cloning packer..") @@ -21,12 +16,10 @@ if packer_path } ) - if pcall( - function() - packer = require "packer" - end - ) - then + + present, packer = pcall(require, "packer") + + if present then print("Packer cloned successfully.") else error("Couldn't clone packer !\nPacker path: " .. packer_path) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 34650f3..6577d40 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -1,11 +1,6 @@ -local packer -if - pcall( - function() - require "packerInit" - end - ) - then +local present, _ = pcall(require, "packerInit") + +if present then packer = require "packer" else return false diff --git a/lua/plugins/autopairs.lua b/lua/plugins/autopairs.lua index 9399571..4d035e6 100644 --- a/lua/plugins/autopairs.lua +++ b/lua/plugins/autopairs.lua @@ -1,12 +1,7 @@ -local autopairs, autopairs_completion -if - not pcall( - function() - autopairs = require "nvim-autopairs" - autopairs_completion = require "nvim-autopairs.completion.compe" - end - ) - then +local present1, autopairs = pcall(require, "nvim-autopairs") +local present2, autopairs_completion = pcall(require, "nvim-autopairs.completion.compe") + +if not (present1 or present2) then return end diff --git a/lua/plugins/autosave.lua b/lua/plugins/autosave.lua index fda9f9a..559ce3f 100644 --- a/lua/plugins/autosave.lua +++ b/lua/plugins/autosave.lua @@ -1,12 +1,6 @@ -- autosave.nvim plugin disabled by default -local autosave -if - not pcall( - function() - autosave = require "autosave" - end - ) - then +local present, autosave = pcall(require, "autosave") +if not present then return end diff --git a/lua/plugins/bufferline.lua b/lua/plugins/bufferline.lua index c34b771..ed01a76 100644 --- a/lua/plugins/bufferline.lua +++ b/lua/plugins/bufferline.lua @@ -1,14 +1,8 @@ local global_theme = "themes/" .. vim.g.nvchad_theme local colors = require(global_theme) -local bufferline -if - not pcall( - function() - bufferline = require "bufferline" - end - ) - then +local present, bufferline = pcall(require, "bufferline") +if not present then return end diff --git a/lua/plugins/compe.lua b/lua/plugins/compe.lua index c41139a..238ca7c 100644 --- a/lua/plugins/compe.lua +++ b/lua/plugins/compe.lua @@ -1,11 +1,5 @@ -local compe -if - not pcall( - function() - compe = require "compe" - end - ) - then +local present, compe = pcall(require, "compe") +if not present then return end diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index d42758a..e2309ec 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -1,11 +1,5 @@ -local gitsigns -if - not pcall( - function() - gitsigns = require "gitsigns" - end - ) - then +local present, gitsigns = pcall(require, "gitsigns") +if not present then return end diff --git a/lua/plugins/icons.lua b/lua/plugins/icons.lua index 03e5f59..3425fde 100644 --- a/lua/plugins/icons.lua +++ b/lua/plugins/icons.lua @@ -1,11 +1,5 @@ -local icons -if - not pcall( - function() - icons = require "nvim-web-devicons" - end - ) - then +local present, icons = pcall(require, "nvim-web-devicons") +if not present then return end diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 58681ee..ad6bbaa 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,12 +1,6 @@ -local lspconfig, lspinstall -if - not pcall( - function() - lspconfig = require "lspconfig" - lspinstall = require "lspinstall" - end - ) - then +local present1, lspconfig = pcall(require, "lspconfig") +local present2, lspinstall = pcall(require, "lspinstall") +if not (present1 or present2) then return end diff --git a/lua/plugins/neoscroll.lua b/lua/plugins/neoscroll.lua deleted file mode 100644 index bc95671..0000000 --- a/lua/plugins/neoscroll.lua +++ /dev/null @@ -1,5 +0,0 @@ -pcall( - function() - require("neoscroll").setup() - end -) diff --git a/lua/plugins/nvimtree.lua b/lua/plugins/nvimtree.lua index 8450b88..5e9c041 100644 --- a/lua/plugins/nvimtree.lua +++ b/lua/plugins/nvimtree.lua @@ -1,14 +1,9 @@ -local tree_cb -if - not pcall( - function() - tree_cb = require "nvim-tree.config".nvim_tree_callback - end - ) - then +local present, tree_c = pcall(require, "nvim-tree.config") +if not present then return end +local tree_cb = tree_c.nvim_tree_callback local g = vim.g vim.o.termguicolors = true diff --git a/lua/plugins/others.lua b/lua/plugins/others.lua index 6382701..2278d09 100644 --- a/lua/plugins/others.lua +++ b/lua/plugins/others.lua @@ -1,35 +1,25 @@ local M = {} M.colorizer = function() - local colorizer - if - not pcall( - function() - colorizer = require("colorizer") - end - ) - then - return + local present, colorizer = pcall(require, "colorizer") + if present then + colorizer.setup() + vim.cmd("ColorizerReloadAllBuffers") end - - colorizer.setup() - vim.cmd("ColorizerReloadAllBuffers") end M.comment = function() - pcall( - function() - require("nvim_comment").setup() - end - ) + local present, nvim_comment = pcall(require, "nvim_comment") + if present then + nvim_comment.setup() + end end M.lspkind = function() - pcall( - function() - require("lspkind").init() - end - ) + local present, lspkind = pcall(require, "lspkind") + if present then + lspkind.init() + end end M.neoscroll = function() diff --git a/lua/plugins/statusline.lua b/lua/plugins/statusline.lua index b49cdaf..8f543c8 100644 --- a/lua/plugins/statusline.lua +++ b/lua/plugins/statusline.lua @@ -1,12 +1,6 @@ -local gl, condition -if - not pcall( - function() - gl = require "galaxyline" - condition = require "galaxyline.condition" - end - ) - then +local present1, gl = pcall(require, "galaxyline") +local present2, condition = pcall(require, "galaxyline.condition") +if not (present1 or present2) then return end diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index f9f3819..c3799eb 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -1,11 +1,5 @@ -local telescope -if - not pcall( - function() - telescope = require("telescope") - end - ) - then +local present, telescope = pcall(require, "telescope") +if not present then return end diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index bf574eb..c1ca2ef 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,11 +1,5 @@ -local ts_config -if - not pcall( - function() - ts_config = require "nvim-treesitter.configs" - end - ) - then +local present, ts_config = pcall(require, "nvim-treesitter.configs") +if not present then return end diff --git a/lua/plugins/zenmode.lua b/lua/plugins/zenmode.lua index 4a49f5d..40d01c0 100644 --- a/lua/plugins/zenmode.lua +++ b/lua/plugins/zenmode.lua @@ -1,11 +1,5 @@ -local true_zen -if - not pcall( - function() - true_zen = require "true-zen" - end - ) - then +local present, true_zen = pcall(require, "true-zen") +if not present then return end diff --git a/lua/theme.lua b/lua/theme.lua index 83a7449..c87aa51 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -1,15 +1,10 @@ vim.g.nvchad_theme = "onedark" -local base16 -if - not pcall( - function() - base16 = require "base16" - end - ) - then - return false -else +local present, base16 = pcall(require, "base16") + +if present then base16(base16.themes["onedark"], true) return true +else + return false end From 1bedbbe5c432de813ba4286ac11a9d7a47914431 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Sun, 18 Jul 2021 15:42:54 +1000 Subject: [PATCH 0424/1541] Fix terminal buffer format bug, & enable escape from terminal & visual mdoes --- lua/mappings.lua | 3 +++ lua/utils.lua | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index f3bf180..e12d40f 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -18,7 +18,10 @@ map("v", "x", [=[ "_x ]=], opt) this line too ]] -- +-- escape with 'jk' mapping vim.api.nvim_set_keymap("i", "jk", "", {}) +vim.api.nvim_set_keymap("v", "jk", "", {}) +vim.api.nvim_set_keymap("t", "jk", "", {}) -- Don't copy the replaced text after pasting in visual mode map("v", "p", '"_dP', opt) diff --git a/lua/utils.lua b/lua/utils.lua index a06fa07..cf915ed 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -4,9 +4,8 @@ local M = {} M.hideStuff = function() vim.api.nvim_exec( [[ - au BufEnter term://* setlocal nonumber + au TermOpen term://* setlocal nonumber laststatus=0 au BufEnter,BufWinEnter,WinEnter,CmdwinEnter * if bufname('%') == "NvimTree" | set laststatus=0 | else | set laststatus=2 | endif - au BufEnter term://* set laststatus=0 ]], false ) From 6d98a11dfede40af991108ecf21fc255eb0e8586 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 18 Jul 2021 16:06:33 +0530 Subject: [PATCH 0425/1541] lazy load more plugins! --- lua/pluginList.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 6577d40..ed85c48 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -104,12 +104,11 @@ return packer.startup( end } + use {"nvim-lua/plenary.nvim", event = "BufRead"} + use {"nvim-lua/popup.nvim", after = "plenary.nvim"} + use { "nvim-telescope/telescope.nvim", - requires = { - {"nvim-lua/popup.nvim"}, - {"nvim-lua/plenary.nvim"} - }, cmd = "Telescope", config = function() require "plugins.telescope" @@ -125,7 +124,7 @@ return packer.startup( -- git stuff use { "lewis6991/gitsigns.nvim", - event = "BufRead", + after = "plenary.nvim", config = function() require "plugins.gitsigns" end From 18f3b8b93e55e370ed57f58e414ec01e703db66d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 18 Jul 2021 16:10:23 +0530 Subject: [PATCH 0426/1541] map jk escape from terminal buffer --- lua/mappings.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index e12d40f..c682130 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -141,7 +141,7 @@ map("n", "", [[BufferLineCycleNext]], opt) map("n", "", [[BufferLineCyclePrev]], opt) -- use ESC to turn off search highlighting -map("n", "", ":noh", opts) +map("n", "", ":noh", opt) --- get out of terminal with ESC -map("t", "", "", opts) +-- get out of terminal with jk +map("t", "jk", "", opt) From 3be058da26ca49e37fb8b4d6135a9f756b173870 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 18 Jul 2021 16:32:03 +0530 Subject: [PATCH 0427/1541] more lazy loaddd --- lua/pluginList.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index ed85c48..fadafbb 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -12,10 +12,11 @@ return packer.startup( function() use "wbthomason/packer.nvim" - use "akinsho/nvim-bufferline.lua" + use {"akinsho/nvim-bufferline.lua", event = "VimEnter"} use { "glepnir/galaxyline.nvim", + event = "VimEnter", config = function() require "plugins.statusline" end @@ -99,6 +100,7 @@ return packer.startup( use { "kyazdani42/nvim-web-devicons", + event = "VimEnter", config = function() require "plugins.icons" end From 2a9d24b4a8823d1db65f4e58816ce63cb0905178 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 18 Jul 2021 17:50:21 +0530 Subject: [PATCH 0428/1541] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5c6d815..de69853 100644 --- a/README.md +++ b/README.md @@ -134,16 +134,16 @@ without / with Treesitter : # Bloat -- To all those who think this is probably bloated , sure it is . Bloat means different to everyone . NvChad has like 30 ~ plugins but that doesnt mean those plugins are compromsing neovim's speed, snappiness or making it slow. No matter how many plugins I'd add on nvchad , it wouldnt compromise speed / snappiness / make it slow or whatever since it uses packer.nvim as plugin manager , packer.nvim lets you lazy load plugins i.e loading plugins on certain events , mappings , sequentially loading them etc so loading them only when needed , I have lazy loaded 90% plugins so most plugins arent loaded by default , hence not affecting neovim's startup/launch time. +- To all those who think this is probably bloated , sure it is . Bloat means different to everyone . NvChad has like 30 ~ plugins but that doesnt mean those plugins are compromsing neovim's speed, snappiness or making it slow. No matter how many plugins I'd add on nvchad , it wouldnt compromise speed / snappiness / make it slow or whatever since it uses packer.nvim as plugin manager , packer.nvim lets you lazy load plugins i.e loading plugins on certain events , mappings , sequentially loading them etc so loading them only when needed , I have lazy loaded 28/30 plugins so most plugins arent loaded by default , hence not affecting neovim's startup/launch time. -- Without lazy loading vs with lazy loading and default nvim with startuptime.vim plugin vs nvchad - -( This is tested on my old pentium system so ofc the startuptime will be a lot much lesser for you ) +- Without lazy loading vs with lazy loading +- Default neovim with startuptime.vim plugin vs nvchad - + +(This is tested on my old pentium system so ofc the startuptime will be a lot more lesser for you ) # TODO It would be nice if NvChad focuses on existing plugins and config before adding new things , some plugins like whichkey , telescope , treesitter still have basic configs! Also adding new features that'd make NvChad slow or its startuptime slow wouldnt be encouraged , if that feature's really needed then It'll be mentioned in the wiki with its config. From 036fb6cd66c09adc65504e67f1e4ea58ad7beffd Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 18 Jul 2021 18:23:29 +0530 Subject: [PATCH 0429/1541] update readme --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de69853..76fc63d 100644 --- a/README.md +++ b/README.md @@ -139,11 +139,13 @@ without / with Treesitter : - Without lazy loading vs with lazy loading -- Default neovim with startuptime.vim plugin vs nvchad +- Default neovim with startuptime.vim plugin vs NvChad +- NvChad on my other system with ssd -(This is tested on my old pentium system so ofc the startuptime will be a lot more lesser for you ) +(The above 2 images show tests from my old pentium system so ofc the startuptime will be a lot more lesser for you ) + # TODO It would be nice if NvChad focuses on existing plugins and config before adding new things , some plugins like whichkey , telescope , treesitter still have basic configs! Also adding new features that'd make NvChad slow or its startuptime slow wouldnt be encouraged , if that feature's really needed then It'll be mentioned in the wiki with its config. From 18a050d54fc6950fb15b96063fabeb091bb8951b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 18 Jul 2021 18:27:06 +0530 Subject: [PATCH 0430/1541] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 76fc63d..0c5c08a 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,9 @@ without / with Treesitter : -- Without lazy loading vs with lazy loading +- The below image shows startuptime for : + +- NvChad Without lazy loading vs with lazy loading - Default neovim with startuptime.vim plugin vs NvChad - NvChad on my other system with ssd From 4ff7208c668ffa8d4898bb4a6bfa435b2f1c2e98 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 18 Jul 2021 22:11:52 +0530 Subject: [PATCH 0432/1541] lazy loading 100%!! --- init.lua | 36 +++++++++++++----------------------- lua/pluginList.lua | 18 +++++++++++++----- lua/theme.lua | 1 + lua/themes/nord.lua | 6 +++--- 4 files changed, 30 insertions(+), 31 deletions(-) diff --git a/init.lua b/init.lua index cde42ff..a1ac6ef 100644 --- a/init.lua +++ b/init.lua @@ -1,27 +1,17 @@ --- load all options require "options" --- load stuff only if theme is initialized -if require "theme" then - local async - async = - vim.loop.new_async( - vim.schedule_wrap( - function() - require "pluginList" - require "plugins.bufferline" - require "highlights" - require "mappings" - require("utils").hideStuff() +local async +async = + vim.loop.new_async( + vim.schedule_wrap( + function() + require "pluginList" + require "plugins.bufferline" + require "mappings" + require("utils").hideStuff() - async:close() - end - ) + async:close() + end ) - async:send() -else - -- otherwise run PackerSync - require "pluginList" - print("Now PackerSync will be executed, after completion, restart nvim.\n") - vim.cmd("PackerSync") -end +) +async:send() diff --git a/lua/pluginList.lua b/lua/pluginList.lua index fadafbb..d95c7cc 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -1,3 +1,5 @@ +vim.cmd [[packadd packer.nvim]] + local present, _ = pcall(require, "packerInit") if present then @@ -10,20 +12,26 @@ local use = packer.use return packer.startup( function() - use "wbthomason/packer.nvim" + use {"wbthomason/packer.nvim", event = "VimEnter"} - use {"akinsho/nvim-bufferline.lua", event = "VimEnter"} + use {"akinsho/nvim-bufferline.lua", after = "nvim-base16.lua"} use { "glepnir/galaxyline.nvim", - event = "VimEnter", + after = "nvim-base16.lua", config = function() require "plugins.statusline" end } -- color related stuff - use "siduck76/nvim-base16.lua" + use { + "siduck76/nvim-base16.lua", + after = "packer.nvim", + config = function() + require "theme" + end + } use { "norcalli/nvim-colorizer.lua", @@ -100,7 +108,7 @@ return packer.startup( use { "kyazdani42/nvim-web-devicons", - event = "VimEnter", + after = "nvim-base16.lua", config = function() require "plugins.icons" end diff --git a/lua/theme.lua b/lua/theme.lua index c87aa51..8d90ec2 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -4,6 +4,7 @@ local present, base16 = pcall(require, "base16") if present then base16(base16.themes["onedark"], true) + pcall(require, "highlights") return true else return false diff --git a/lua/themes/nord.lua b/lua/themes/nord.lua index 095dd18..7f67627 100644 --- a/lua/themes/nord.lua +++ b/lua/themes/nord.lua @@ -3,9 +3,9 @@ local colors = { darker_black = "#2a303c", black = "#2E3440", -- nvim bg black2 = "#343a46", - one_bg = "#353b47", -- real bg of onedark - one_bg2 = "#383e4a", - one_bg3 = "#3b414d", + one_bg = "#373d49", + one_bg2 = "#3a404c", + one_bg3 = "#3d434f", grey = "#474d59", grey_fg = "#565c68", grey_fg2 = "#606672", From d257c4dd85addc9341c4bfd4e0ff6f43a050887e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 18 Jul 2021 23:35:25 +0530 Subject: [PATCH 0433/1541] Update README.md --- README.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0c5c08a..0c2437e 100644 --- a/README.md +++ b/README.md @@ -100,25 +100,28 @@ without / with Treesitter : - File navigation with Nvimtree - Using plugins that are mouse friendly -- sexy themes +- Beautiful inbuilt themes +- lazy loading 100% of plugins - managing tabs , buffers with bufferline - autosave - icons on nvimtree , telescope , bufferline/statusline and almost everywhere! with nvim-web-devicons - minimal status line ( galaxyline) - gitsigns (colored bars for git in my config) -- using nvim-lsp -- nvim-lspconfig for nvim-lps configuration -- lspInstall for installing lsp servers easily. +- nvim-lspconfig for nvim-lsp configuration +- lspInstall for installing lsp servers easily - nvim-compe for autocompletion - lspkind to show pictograms on autocompletion items - telescope for file finding , picking , previewing (files and even images) - nvim-treesitter for syntax highlighting -- nvim-autopairs , for autolosing braces and stuffs +- nvim-autopairs for autolosing braces and stuffs - neoformat for prettifying / formatting code - packer.nvim as package manager - indent-blankline.Nvim for indentlines - smooth scrolling -- Snip support from VSCode through vsnip supporting custom and predefined snips (friendly-snippets) +- luasnip for snippet plugin and snip support from VSCode through vsnip supporting custom and predefined snips (friendly-snippets) +- Distraction free modes ( modes in which statusline , tabline etc stuff get disabled so its just the text visible in the buffer similar to goyo.vim) +- Code formatting / prettifying +- gitsigns for git diffs # Requirements @@ -134,7 +137,7 @@ without / with Treesitter : # Bloat -- To all those who think this is probably bloated , sure it is . Bloat means different to everyone . NvChad has like 30 ~ plugins but that doesnt mean those plugins are compromsing neovim's speed, snappiness or making it slow. No matter how many plugins I'd add on nvchad , it wouldnt compromise speed / snappiness / make it slow or whatever since it uses packer.nvim as plugin manager , packer.nvim lets you lazy load plugins i.e loading plugins on certain events , mappings , sequentially loading them etc so loading them only when needed , I have lazy loaded 28/30 plugins so most plugins arent loaded by default , hence not affecting neovim's startup/launch time. +- To all those who think this is probably bloated , sure it is . Bloat means different to everyone . NvChad has like 30 ~ plugins but that doesnt mean those plugins are compromsing neovim's speed, snappiness or making it slow. No matter how many plugins I'd add on nvchad , it wouldnt compromise speed / snappiness / make it slow or whatever since it uses packer.nvim as plugin manager , packer.nvim lets you lazy load plugins i.e loading plugins on certain events , mappings , sequentially loading them etc so loading them only when needed , I have lazy loaded all the plugins so most plugins arent loaded by default , hence not affecting neovim's startup/launch time. From 05d57bba29a19888d1d0be39e475d25409f0425d Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Mon, 19 Jul 2021 06:19:27 +0530 Subject: [PATCH 0434/1541] packerInit: Clone packer at opt path as we are lazy loading move packadd to packerInit --- lua/packerInit.lua | 5 ++++- lua/pluginList.lua | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/packerInit.lua b/lua/packerInit.lua index c23706a..aa9101a 100644 --- a/lua/packerInit.lua +++ b/lua/packerInit.lua @@ -1,7 +1,9 @@ +vim.cmd("packadd packer.nvim") + local present, packer = pcall(require, "packer") if not present then - local packer_path = vim.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" + local packer_path = vim.fn.stdpath("data") .. "/site/pack/packer/opt/packer.nvim" print("Cloning packer..") -- remove the dir before cloning @@ -17,6 +19,7 @@ if not present then } ) + vim.cmd("packadd packer.nvim") present, packer = pcall(require, "packer") if present then diff --git a/lua/pluginList.lua b/lua/pluginList.lua index d95c7cc..bd242cb 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -1,5 +1,3 @@ -vim.cmd [[packadd packer.nvim]] - local present, _ = pcall(require, "packerInit") if present then From 0023233eef912d6476e98f2c3c4de824bd70aa98 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Mon, 19 Jul 2021 06:28:28 +0530 Subject: [PATCH 0435/1541] Fix formatting | Handle a edgecase in telescope config | Misc * fix formatting in pluginList, luasnip * don't use pcall on highlights * sync and compile fzf and media files only when the error occurs, add a help text telling tbe user to restart neovim --- lua/options.lua | 2 +- lua/pluginList.lua | 50 +++++++++++++++++++++++++++++++-------- lua/plugins/luasnip.lua | 10 ++------ lua/plugins/telescope.lua | 5 +++- lua/theme.lua | 2 +- 5 files changed, 48 insertions(+), 21 deletions(-) diff --git a/lua/options.lua b/lua/options.lua index cd53fb9..a12332e 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -19,7 +19,7 @@ opt.clipboard = "unnamedplus" opt.shortmess:append("sI") -- disable tilde on end of buffer: https://github.com/ neovim/neovim/pull/8546#issuecomment-643643758 -vim.cmd [[let &fcs='eob: ']] +vim.cmd("let &fcs='eob: '") -- Numbers opt.number = true diff --git a/lua/pluginList.lua b/lua/pluginList.lua index bd242cb..56f197f 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -1,4 +1,5 @@ local present, _ = pcall(require, "packerInit") +local packer if present then packer = require "packer" @@ -10,9 +11,15 @@ local use = packer.use return packer.startup( function() - use {"wbthomason/packer.nvim", event = "VimEnter"} + use { + "wbthomason/packer.nvim", + event = "VimEnter" + } - use {"akinsho/nvim-bufferline.lua", after = "nvim-base16.lua"} + use { + "akinsho/nvim-bufferline.lua", + after = "nvim-base16.lua" + } use { "glepnir/galaxyline.nvim", @@ -76,7 +83,7 @@ return packer.startup( config = function() require "plugins.compe" end, - wants = {"LuaSnip"}, + wants = "LuaSnip", requires = { { "L3MON4D3/LuaSnip", @@ -93,7 +100,10 @@ return packer.startup( } } - use {"sbdchd/neoformat", cmd = "Neoformat"} + use { + "sbdchd/neoformat", + cmd = "Neoformat" + } -- file managing , picker etc use { @@ -112,8 +122,14 @@ return packer.startup( end } - use {"nvim-lua/plenary.nvim", event = "BufRead"} - use {"nvim-lua/popup.nvim", after = "plenary.nvim"} + use { + "nvim-lua/plenary.nvim", + event = "BufRead" + } + use { + "nvim-lua/popup.nvim", + after = "plenary.nvim" + } use { "nvim-telescope/telescope.nvim", @@ -123,7 +139,11 @@ return packer.startup( end } - use {"nvim-telescope/telescope-fzf-native.nvim", run = "make", cmd = "Telescope"} + use { + "nvim-telescope/telescope-fzf-native.nvim", + run = "make", + cmd = "Telescope" + } use { "nvim-telescope/telescope-media-files.nvim", cmd = "Telescope" @@ -147,7 +167,10 @@ return packer.startup( end } - use {"andymass/vim-matchup", event = "CursorMoved"} + use { + "andymass/vim-matchup", + event = "CursorMoved" + } use { "terrortylor/nvim-comment", @@ -171,7 +194,10 @@ return packer.startup( end } - use {"tweekmonster/startuptime.vim", cmd = "StartupTime"} + use { + "tweekmonster/startuptime.vim", + cmd = "StartupTime" + } -- load autosave only if its globally enabled use { @@ -195,7 +221,11 @@ return packer.startup( use { "Pocco81/TrueZen.nvim", - cmd = {"TZAtaraxis", "TZMinimalist", "TZFocus"}, + cmd = { + "TZAtaraxis", + "TZMinimalist", + "TZFocus" + }, config = function() require "plugins.zenmode" end diff --git a/lua/plugins/luasnip.lua b/lua/plugins/luasnip.lua index 825c957..dc60d0a 100644 --- a/lua/plugins/luasnip.lua +++ b/lua/plugins/luasnip.lua @@ -1,11 +1,5 @@ -local luasnip -if - not pcall( - function() - luasnip = require "luasnip" - end - ) - then +local present, luasnip = pcall(require, "luasnip") +if not present then return end diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index c3799eb..0923c8c 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -76,5 +76,8 @@ if ) then -- This should only trigger when in need of PackerSync, so better do it - vim.cmd("PackerSync") + print("After completion of PackerSync, restart neovim.") + require("packer").sync("telescope-fzf-native.nvim", "telescope-media-files.nvim") + -- why compile too ? well, packer is supposed to compile with sync only, but sometimes it doesn't work + vim.cmd("PackerCompile") end diff --git a/lua/theme.lua b/lua/theme.lua index 8d90ec2..5356706 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -4,7 +4,7 @@ local present, base16 = pcall(require, "base16") if present then base16(base16.themes["onedark"], true) - pcall(require, "highlights") + require "highlights" return true else return false From 6b507c33682a935d6d92f4f0c15105fa7a67b69b Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Mon, 19 Jul 2021 06:40:38 +0530 Subject: [PATCH 0436/1541] init: Asynchronously load filetype and syntax lots of improvement for startup time Co-authored-by: Vhyrro --- lua/options.lua | 7 +++++++ lua/theme.lua | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/lua/options.lua b/lua/options.lua index a12332e..2210681 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -1,6 +1,13 @@ local opt = vim.opt local g = vim.g +-- Turn these off at startup, will be enabled later just before loading the theme +vim.cmd([[ + syntax off + filetype off + filetype plugin indent off +]]) + opt.ruler = false opt.hidden = true opt.ignorecase = true diff --git a/lua/theme.lua b/lua/theme.lua index 5356706..85bf895 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -3,6 +3,13 @@ vim.g.nvchad_theme = "onedark" local present, base16 = pcall(require, "base16") if present then + -- enabled these options, was disabled in options.lua + vim.cmd([[ + syntax on + filetype on + filetype plugin indent on + ]]) + base16(base16.themes["onedark"], true) require "highlights" return true From 1e658562f0656f3bffe73a4a3c9dd4c152cc6cb2 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Mon, 19 Jul 2021 07:08:28 +0530 Subject: [PATCH 0437/1541] install.sh: Run PackerSync from script after install too as the corresponding code for that was removed from init.lua --- install.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/install.sh b/install.sh index fbb0bf1..401ce04 100755 --- a/install.sh +++ b/install.sh @@ -153,11 +153,7 @@ main() { if _NVIM="$(command -v nvim)"; then if _check_nvim_version; then printf "\n%s\n" "=> Neovim will now open." && sleep 1 - if [ "${_UPDATE}" = "false" ]; then - "${_NVIM}" +":lua require 'pluginList' vim.cmd('PackerSync')" - else - "${_NVIM}" - fi + "${_NVIM}" +":lua require 'pluginList' vim.cmd('PackerSync')" else printf "Error: Neovim is installed, but version is lower than 0.5.x, install Neovim >= 5.x and then run nvim & do :PackerSync\n." fi From 2567ebaee43c33311027d103e4663e2564fa62ba Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Mon, 19 Jul 2021 12:42:21 +0530 Subject: [PATCH 0438/1541] telescope: Fix a bug introduced in 0023233 PackerCompile at the same time conflicts with packer sync because packer always runs in bg --- lua/plugins/telescope.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 0923c8c..26f97e7 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -77,7 +77,7 @@ if then -- This should only trigger when in need of PackerSync, so better do it print("After completion of PackerSync, restart neovim.") + -- Trigger packer compile on PackerComplete, so it properly waits for PackerSync + vim.cmd 'autocmd User PackerComplete ++once lua require("packer").compile()' require("packer").sync("telescope-fzf-native.nvim", "telescope-media-files.nvim") - -- why compile too ? well, packer is supposed to compile with sync only, but sometimes it doesn't work - vim.cmd("PackerCompile") end From 2e1d53971e5121b37cdd1ff6250aec55ead1370f Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Mon, 19 Jul 2021 15:54:57 +0530 Subject: [PATCH 0439/1541] install.sh: More automation --- install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 401ce04..69bce33 100755 --- a/install.sh +++ b/install.sh @@ -153,7 +153,9 @@ main() { if _NVIM="$(command -v nvim)"; then if _check_nvim_version; then printf "\n%s\n" "=> Neovim will now open." && sleep 1 - "${_NVIM}" +":lua require 'pluginList' vim.cmd('PackerSync')" + "${_NVIM}" +"autocmd User PackerComplete ++once quitall" \ + +":lua require 'pluginList' vim.cmd('PackerSync')" + "${_NVIM}" else printf "Error: Neovim is installed, but version is lower than 0.5.x, install Neovim >= 5.x and then run nvim & do :PackerSync\n." fi From ff14ba61f9563b50661d6811623c4915fc7f9470 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Tue, 20 Jul 2021 19:36:06 +1000 Subject: [PATCH 0440/1541] open new buffers, instead of tabs --- lua/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index c682130..cc4b99a 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -133,7 +133,7 @@ map("n", "fh", [[Telescope help_tags]], opt) map("n", "fo", [[Telescope oldfiles]], opt) -- bufferline tab stuff -map("n", "", ":tabnew", opt) -- new tab +map("n", "", ":enew", opt) -- new tab map("n", "", ":bd!", opt) -- close tab -- move between tabs From a6ea40d7baaacc75cf39cd4fc02c21756458cc09 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Tue, 20 Jul 2021 19:38:43 +1000 Subject: [PATCH 0441/1541] open default shell terminal with proper neovim commands, fix buffer tabline issue --- lua/mappings.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index cc4b99a..d779756 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -27,9 +27,9 @@ vim.api.nvim_set_keymap("t", "jk", "", {}) map("v", "p", '"_dP', opt) -- OPEN TERMINALS -- -map("n", "", [[vnew term://bash ]], opt) -- term over right -map("n", "", [[ split term://bash | resize 10 ]], opt) -- term bottom -map("n", "t", [[ tabnew | term ]], opt) -- term newtab +map("n", "", [[ vnew +terminal | setlocal nobuflisted ]], opt) -- term over right +map("n", "", [[ 10new +terminal | setlocal nobuflisted ]], opt) -- term bottom +map("n", "t", [[ terminal ]], opt) -- term buffer -- copy whole file content map("n", "", [[ %y+]], opt) From 15f20e8437b468f9d4fe616251822f7eaa40a6ac Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Tue, 20 Jul 2021 19:41:50 +1000 Subject: [PATCH 0442/1541] better shell setup scripting --- install.sh | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/install.sh b/install.sh index 69bce33..9683ca4 100755 --- a/install.sh +++ b/install.sh @@ -71,27 +71,28 @@ _setup_terminal_shell() { _mappings_file="${_CONFIG_PATH}/lua/mappings.lua" # only ask for shellname if running in terminal if [ -t 1 ]; then - printf "%s\n: " "Which shell do you want to use ? [ Enter nothing for current shell ( $_CURRENT_SHELL ) ]" - read -r shellname + printf "\n%s\n" "Which shell do you want to use? (Eg. 2)" + printf "\t%s\n" "[ Enter nothing for current shell ( $_CURRENT_SHELL ) ]" + grep '^/bin/' '/etc/shells' | nl + read -r shellNUM fi - shellname="${shellname:-${_CURRENT_SHELL}}" - printf "%s\n" "$shellname" - # don't try to do any changes if given shellname is same as bash - if ! [ bash = "$shellname" ]; then + # don't try to do any changes user wants their default shell in nvim + if [ ! -z "$shellNUM" ]; then + shellpath=$(grep '^/bin/' '/etc/shells' | sed -n "$shellNUM p") # Reference: https://stackoverflow.com/a/4247319 - if "${_SED}" -i'.bak' -e "s/bash/$shellname/g" "${_mappings_file}"; then - printf "\n%s\n" "=> Shell changed to $shellname on nvim successfully!" + # \( & \) will use regex brackets (for later reference with \1) + # ( & ) will match text brackets + if "${_SED}" --posix -i'.bak' -e "s=^\(map(.* \+*terminal\) \(.*)\)=\1$shellpath \2=g" "${_mappings_file}"; then + printf "%s\n" "=> Neovim shell changed to $shellpath successfully!" else - printf "\n%s\n" "Cannot edit with sed, edit ${_mappings_file} manually to replace bash with $shellname." + printf "%s\n" "Cannot edit with sed, edit ${_mappings_file} manually to replace bash with $shellpath." fi rm -f "${_mappings_file}".bak # delete backup file created by sed - else - printf "\n%s\n" "=> Shell changed to $shellname on nvim successfully!" fi + printf "%s\n\n" "=> Neovim shell will be ${shellpath:-${_CURRENT_SHELL}}" return 0 } - _setup_arguments() { # default variables to be used _CONFIG_PATH="${HOME}/.config/nvim" From f35aa3c604e2f35d4339f868b9365bf846deb644 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Tue, 20 Jul 2021 20:18:10 +1000 Subject: [PATCH 0443/1541] automatically close a terminal buffer if it has exited/returned --- lua/utils.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/utils.lua b/lua/utils.lua index cf915ed..44bb800 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -5,6 +5,7 @@ M.hideStuff = function() vim.api.nvim_exec( [[ au TermOpen term://* setlocal nonumber laststatus=0 + au TermClose term://* bd! au BufEnter,BufWinEnter,WinEnter,CmdwinEnter * if bufname('%') == "NvimTree" | set laststatus=0 | else | set laststatus=2 | endif ]], false From 1e2d299bf92e0edb58115ef5fecb3da9dab4e785 Mon Sep 17 00:00:00 2001 From: Pocco81 Date: Tue, 20 Jul 2021 12:38:51 -0500 Subject: [PATCH 0444/1541] feat: suppressed error messages from lang servers and added better glyph for publish diagnostics --- lua/plugins/lspconfig.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index ad6bbaa..1804e46 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -94,3 +94,29 @@ vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnos vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"}) vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"}) vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"}) + +vim.lsp.handlers["textDocument/publishDiagnostics"] = + vim.lsp.with( + vim.lsp.diagnostic.on_publish_diagnostics, + { + virtual_text = { + -- prefix = "", + prefix = "", + spacing = 0 + }, + signs = true, + underline = true + } +) + +-- suppress error messages from lang servers +vim.notify = function(msg, log_level, _opts) + if msg:match("exit code") then + return + end + if log_level == vim.log.levels.ERROR then + vim.api.nvim_err_writeln(msg) + else + vim.api.nvim_echo({{msg}}, true, {}) + end +end From 355178a7bb6a6bddcdc1ed723119d17ee7fb5281 Mon Sep 17 00:00:00 2001 From: Pocco81 Date: Tue, 20 Jul 2021 13:19:31 -0500 Subject: [PATCH 0445/1541] feat: secure calls + disabled all builtin plugins --- init.lua | 19 ++++++++++++++----- lua/options.lua | 33 +++++++++++++++++++++++---------- lua/utils.lua | 13 ++----------- 3 files changed, 39 insertions(+), 26 deletions(-) diff --git a/init.lua b/init.lua index a1ac6ef..b8a7a3d 100644 --- a/init.lua +++ b/init.lua @@ -1,15 +1,24 @@ require "options" +local chad_modules = { + "pluginList", + "plugins.bufferline", + "mappings", + "utils", +} + local async async = vim.loop.new_async( vim.schedule_wrap( function() - require "pluginList" - require "plugins.bufferline" - require "mappings" - require("utils").hideStuff() - + for i = 1, #chad_modules, 1 do + local ok, res = xpcall(require, debug.traceback, chad_modules[i]) + if not (ok) then + print("NvChad [E0]: There was an error loading the module '" .. chad_modules[i] .. "' -->") + print(res) -- print stack traceback of the error + end + end async:close() end ) diff --git a/lua/options.lua b/lua/options.lua index 2210681..2cdf24e 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -46,16 +46,29 @@ g.mapleader = " " g.auto_save = false -- disable builtin vim plugins -g.loaded_gzip = 0 -g.loaded_tar = 0 -g.loaded_tarPlugin = 0 -g.loaded_zipPlugin = 0 -g.loaded_2html_plugin = 0 -g.loaded_netrw = 0 -g.loaded_netrwPlugin = 0 -g.loaded_matchit = 0 -g.loaded_matchparen = 0 -g.loaded_spec = 0 +local disabled_built_ins = { + "netrw", + "netrwPlugin", + "netrwSettings", + "netrwFileHandlers", + "gzip", + "zip", + "zipPlugin", + "tar", + "tarPlugin", + "getscript", + "getscriptPlugin", + "vimball", + "vimballPlugin", + "2html_plugin", + "logipat", + "rrhelper", + "spellfile_plugin" +} + +for _, plugin in pairs(disabled_built_ins) do + vim.g["loaded_" .. plugin] = 1 +end local M = {} diff --git a/lua/utils.lua b/lua/utils.lua index cf915ed..c245340 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -1,14 +1,5 @@ -local M = {} - -- hide line numbers , statusline in specific buffers! -M.hideStuff = function() - vim.api.nvim_exec( - [[ +vim.api.nvim_exec([[ au TermOpen term://* setlocal nonumber laststatus=0 au BufEnter,BufWinEnter,WinEnter,CmdwinEnter * if bufname('%') == "NvimTree" | set laststatus=0 | else | set laststatus=2 | endif -]], - false - ) -end - -return M +]], false) From 5531edf8e46e4d805acab5075ec5bc628538e150 Mon Sep 17 00:00:00 2001 From: Pocco81 Date: Tue, 20 Jul 2021 23:20:00 -0500 Subject: [PATCH 0446/1541] fix: formatted code with luafmt --- init.lua | 4 ++-- lua/utils.lua | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index b8a7a3d..0ff438b 100644 --- a/init.lua +++ b/init.lua @@ -3,8 +3,8 @@ require "options" local chad_modules = { "pluginList", "plugins.bufferline", - "mappings", - "utils", + "mappings", + "utils" } local async diff --git a/lua/utils.lua b/lua/utils.lua index c245340..9765f54 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -1,5 +1,8 @@ -- hide line numbers , statusline in specific buffers! -vim.api.nvim_exec([[ +vim.api.nvim_exec( + [[ au TermOpen term://* setlocal nonumber laststatus=0 au BufEnter,BufWinEnter,WinEnter,CmdwinEnter * if bufname('%') == "NvimTree" | set laststatus=0 | else | set laststatus=2 | endif -]], false) +]], + false +) From 08dfe17678f8d4759effdb934cdc30bad760dc88 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 21 Jul 2021 11:26:25 +0530 Subject: [PATCH 0447/1541] clean stuff | map new tab --- lua/mappings.lua | 3 ++- lua/options.lua | 10 ---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index d779756..f5cb5ea 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -133,7 +133,8 @@ map("n", "fh", [[Telescope help_tags]], opt) map("n", "fo", [[Telescope oldfiles]], opt) -- bufferline tab stuff -map("n", "", ":enew", opt) -- new tab +map("n", "", ":enew", opt) -- new buffer +map("n", "b", ":tabnew", opt) -- new tab map("n", "", ":bd!", opt) -- close tab -- move between tabs diff --git a/lua/options.lua b/lua/options.lua index 2210681..8132551 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -59,16 +59,6 @@ g.loaded_spec = 0 local M = {} -function M.is_buffer_empty() - -- Check whether the current buffer is empty - return vim.fn.empty(vim.fn.expand("%:t")) == 1 -end - -function M.has_width_gt(cols) - -- Check if the windows width is greater than a given number of columns - return vim.fn.winwidth(0) / 2 > cols -end - -- file extension specific tabbing -- vim.cmd([[autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]]) From fec301504f03b4d8acfdb63471001aa5d30e38e9 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 21 Jul 2021 22:37:48 +0530 Subject: [PATCH 0448/1541] clean stuff --- lua/plugins/lspconfig.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 1804e46..8e94849 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -89,11 +89,15 @@ lspinstall.post_install_hook = function() vim.cmd("bufdo e") -- triggers FileType autocmd that starts the server end --- replace the default lsp diagnostic letters with prettier symbols -vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnosticsDefaultError"}) -vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"}) -vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"}) -vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"}) +-- replace the default lsp diagnostic symbols +function lspSymbol(name, icon) + vim.fn.sign_define("LspDiagnosticsSign" .. name, {text = icon, numhl = "LspDiagnosticsDefaul" .. name}) +end + +lspSymbol("Error", "") +lspSymbol("Warning", "") +lspSymbol("Information", "") +lspSymbol("Hint", "") vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( From b54c4ca5de0df81c57543a8210ca1dc342b09541 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 21 Jul 2021 23:00:19 +0530 Subject: [PATCH 0449/1541] better error message --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 0ff438b..13b4fe9 100644 --- a/init.lua +++ b/init.lua @@ -15,7 +15,7 @@ async = for i = 1, #chad_modules, 1 do local ok, res = xpcall(require, debug.traceback, chad_modules[i]) if not (ok) then - print("NvChad [E0]: There was an error loading the module '" .. chad_modules[i] .. "' -->") + print("Error loading module : " .. chad_modules[i]) print(res) -- print stack traceback of the error end end From 020daec5fc827bfd03bd92e1f42b6ed569af6ec9 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 21 Jul 2021 23:06:28 +0530 Subject: [PATCH 0450/1541] disable matchit matchit was already disabled by default but a recent PR enabled it again , sorry for that! Since vim matchup already does what matchit does , I'll remove it. --- lua/options.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/options.lua b/lua/options.lua index 1888355..704a4e8 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -63,7 +63,8 @@ local disabled_built_ins = { "2html_plugin", "logipat", "rrhelper", - "spellfile_plugin" + "spellfile_plugin", + "matchit" } for _, plugin in pairs(disabled_built_ins) do From 652f703767cc6ddd8ce5d898395247fc9a0858e6 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Thu, 22 Jul 2021 17:45:47 +1000 Subject: [PATCH 0451/1541] Fix term crash bug, no auto-close finished term anymore --- lua/utils.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/utils.lua b/lua/utils.lua index f829114..9765f54 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -2,7 +2,6 @@ vim.api.nvim_exec( [[ au TermOpen term://* setlocal nonumber laststatus=0 - au TermClose term://* bd! au BufEnter,BufWinEnter,WinEnter,CmdwinEnter * if bufname('%') == "NvimTree" | set laststatus=0 | else | set laststatus=2 | endif ]], false From 0d69a528a8e2585f4feb6b61f23d393dc5d76300 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Thu, 22 Jul 2021 18:04:21 +1000 Subject: [PATCH 0452/1541] Fix statusline issue --- lua/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/utils.lua b/lua/utils.lua index 9765f54..f55bd59 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -1,7 +1,7 @@ -- hide line numbers , statusline in specific buffers! vim.api.nvim_exec( [[ - au TermOpen term://* setlocal nonumber laststatus=0 + au TermOpen term://* setlocal nonumber au BufEnter,BufWinEnter,WinEnter,CmdwinEnter * if bufname('%') == "NvimTree" | set laststatus=0 | else | set laststatus=2 | endif ]], false From 756713b9c3d8a6fb0c174aebf9fcd223ffd8e93b Mon Sep 17 00:00:00 2001 From: vlad doster Date: Fri, 23 Jul 2021 04:17:57 -0500 Subject: [PATCH 0453/1541] (maint): update conditional check and log message - Use more appropriate `-n` flag - Reword log message --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 9683ca4..84b5e8d 100755 --- a/install.sh +++ b/install.sh @@ -52,7 +52,7 @@ _copy_config() { } fi else - printf "%s\n" "Nvim Config doesn't exist so creating one" + printf "%s\n" "Nvim config doesn't exist, creating it now" fi mkdir -p "${_CONFIG_PATH}" || { @@ -78,7 +78,7 @@ _setup_terminal_shell() { fi # don't try to do any changes user wants their default shell in nvim - if [ ! -z "$shellNUM" ]; then + if [ -n "$shellNUM" ]; then shellpath=$(grep '^/bin/' '/etc/shells' | sed -n "$shellNUM p") # Reference: https://stackoverflow.com/a/4247319 # \( & \) will use regex brackets (for later reference with \1) From f8727f16599093c646b735ad9815788ec3f379b8 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 23 Jul 2021 18:03:04 +0530 Subject: [PATCH 0454/1541] Update utils.lua --- lua/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/utils.lua b/lua/utils.lua index f55bd59..271928b 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -1,7 +1,7 @@ -- hide line numbers , statusline in specific buffers! vim.api.nvim_exec( [[ - au TermOpen term://* setlocal nonumber + au TermOpen term://* setlocal nonumber laststatus=0 au BufEnter,BufWinEnter,WinEnter,CmdwinEnter * if bufname('%') == "NvimTree" | set laststatus=0 | else | set laststatus=2 | endif ]], false From 3fc587b54d1e84a48f7fbdbfd51c82e4a62b7052 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Wed, 21 Jul 2021 14:33:50 +0530 Subject: [PATCH 0455/1541] install.sh: Use chsh instead of grep /etc/shells --- install.sh | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/install.sh b/install.sh index 9683ca4..ee5e2fe 100755 --- a/install.sh +++ b/install.sh @@ -21,7 +21,7 @@ _check_install_dependencies() { printf "%s\n" "Error: Install ${1} before proceeding." exit 1 } - _GIT="$(command -v git)" || _error_dependencies git + command -v git 1>/dev/null || _error_dependencies git _SED="$(command -v sed)" || _error_dependencies sed return 0 } @@ -71,26 +71,29 @@ _setup_terminal_shell() { _mappings_file="${_CONFIG_PATH}/lua/mappings.lua" # only ask for shellname if running in terminal if [ -t 1 ]; then - printf "\n%s\n" "Which shell do you want to use? (Eg. 2)" - printf "\t%s\n" "[ Enter nothing for current shell ( $_CURRENT_SHELL ) ]" - grep '^/bin/' '/etc/shells' | nl - read -r shellNUM + if chsh -l 2>/dev/null 1>&2; then + printf "\nAvailable Shells:\n" + chsh -l | nl + printf "\n%s\n" "Which shell do you want to use? (Eg. 2)" + printf "\t%s\n" "[ Enter nothing for current shell ( $_CURRENT_SHELL ) ]" + read -r shellnum + [ "${shellnum}" -gt 0 ] 2>/dev/null && _SHELLPATH="$(chsh -l | sed -n "$shellnum p")" + fi fi # don't try to do any changes user wants their default shell in nvim - if [ ! -z "$shellNUM" ]; then - shellpath=$(grep '^/bin/' '/etc/shells' | sed -n "$shellNUM p") + if [ -n "$_SHELLPATH" ]; then # Reference: https://stackoverflow.com/a/4247319 # \( & \) will use regex brackets (for later reference with \1) # ( & ) will match text brackets - if "${_SED}" --posix -i'.bak' -e "s=^\(map(.* \+*terminal\) \(.*)\)=\1$shellpath \2=g" "${_mappings_file}"; then - printf "%s\n" "=> Neovim shell changed to $shellpath successfully!" + if "${_SED}" --posix -i'.bak' -e "s=^\(map(.* \+*terminal\) \(.*)\)=\1$_SHELLPATH \2=g" "${_mappings_file}"; then + printf "%s\n" "=> Neovim shell changed to $_SHELLPATH successfully!" else - printf "%s\n" "Cannot edit with sed, edit ${_mappings_file} manually to replace bash with $shellpath." + printf "%s\n" "Cannot edit with sed, edit ${_mappings_file} manually to replace bash with $_SHELLPATH." fi rm -f "${_mappings_file}".bak # delete backup file created by sed fi - printf "%s\n\n" "=> Neovim shell will be ${shellpath:-${_CURRENT_SHELL}}" + printf "%s\n" "=> Neovim shell will be ${_SHELLPATH:-${_CURRENT_SHELL}}" return 0 } _setup_arguments() { From fcfb8145943fa374cbd7f3ed2ab2670273badd34 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 23 Jul 2021 12:14:39 +0530 Subject: [PATCH 0456/1541] init: Move bufferline config to pluginList.lua plugins.bufferline should be as config of nvim-bufferline and pluginList for packer --- init.lua | 1 - lua/pluginList.lua | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 13b4fe9..b3b7e50 100644 --- a/init.lua +++ b/init.lua @@ -2,7 +2,6 @@ require "options" local chad_modules = { "pluginList", - "plugins.bufferline", "mappings", "utils" } diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 56f197f..0829a56 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -18,7 +18,10 @@ return packer.startup( use { "akinsho/nvim-bufferline.lua", - after = "nvim-base16.lua" + after = "nvim-base16.lua", + config = function() + require "plugins.bufferline" + end } use { From bb04ba07cb36f8ee23212e0e8e04361056313431 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 23 Jul 2021 13:22:53 +0530 Subject: [PATCH 0457/1541] mappings.lua: Code style fixes | Cleanup options.lua --- lua/mappings.lua | 42 +++++++++++++++++++++--------------------- lua/options.lua | 4 ---- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index f5cb5ea..0ff8a87 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -27,15 +27,15 @@ vim.api.nvim_set_keymap("t", "jk", "", {}) map("v", "p", '"_dP', opt) -- OPEN TERMINALS -- -map("n", "", [[ vnew +terminal | setlocal nobuflisted ]], opt) -- term over right -map("n", "", [[ 10new +terminal | setlocal nobuflisted ]], opt) -- term bottom -map("n", "t", [[ terminal ]], opt) -- term buffer +map("n", "", ":vnew +terminal | setlocal nobuflisted ", opt) -- term over right +map("n", "", ":10new +terminal | setlocal nobuflisted ", opt) -- term bottom +map("n", "t", ": terminal ", opt) -- term buffer -- copy whole file content -map("n", "", [[ %y+]], opt) +map("n", "", ":%y+", opt) -- toggle numbers -map("n", "n", [[ set nu!]], opt) +map("n", "n", ":set nu!", opt) -- Truezen.nvim map("n", "zz", ":TZAtaraxis", opt) @@ -113,24 +113,24 @@ map("i", "", "v:lua.completions()", {expr = true}) map("n", "", ":NvimTreeToggle", opt) -- format code -map("n", "fm", [[ Neoformat]], opt) +map("n", "fm", ":Neoformat", opt) -- dashboard stuff -map("n", "fw", [[ Telescope live_grep]], opt) -map("n", "db", [[ Dashboard]], opt) -map("n", "fn", [[ DashboardNewFile]], opt) -map("n", "bm", [[ DashboardJumpMarks]], opt) -map("n", "l", [[ SessionLoad]], opt) -map("n", "s", [[ SessionSave]], opt) +map("n", "db", ":Dashboard", opt) +map("n", "fn", ":DashboardNewFile", opt) +map("n", "bm", ":DashboardJumpMarks", opt) +map("n", "l", ":SessionLoad", opt) +map("n", "s", ":SessionSave", opt) -- Telescope -map("n", "gt", [[ Telescope git_status ]], opt) -map("n", "cm", [[ Telescope git_commits ]], opt) -map("n", "ff", [[ Telescope find_files ]], opt) -map("n", "fp", [[lua require('telescope').extensions.media_files.media_files()]], opt) -map("n", "fb", [[Telescope buffers]], opt) -map("n", "fh", [[Telescope help_tags]], opt) -map("n", "fo", [[Telescope oldfiles]], opt) +map("n", "fw", ":Telescope live_grep", opt) +map("n", "gt", ":Telescope git_status ", opt) +map("n", "cm", ":Telescope git_commits ", opt) +map("n", "ff", ":Telescope find_files ", opt) +map("n", "fp", ":lua require('telescope').extensions.media_files.media_files()", opt) +map("n", "fb", ":Telescope buffers", opt) +map("n", "fh", ":Telescope help_tags", opt) +map("n", "fo", ":Telescope oldfiles", opt) -- bufferline tab stuff map("n", "", ":enew", opt) -- new buffer @@ -138,8 +138,8 @@ map("n", "b", ":tabnew", opt) -- new tab map("n", "", ":bd!", opt) -- close tab -- move between tabs -map("n", "", [[BufferLineCycleNext]], opt) -map("n", "", [[BufferLineCyclePrev]], opt) +map("n", "", ":BufferLineCycleNext", opt) +map("n", "", ":BufferLineCyclePrev", opt) -- use ESC to turn off search highlighting map("n", "", ":noh", opt) diff --git a/lua/options.lua b/lua/options.lua index 704a4e8..cb62d38 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -71,9 +71,5 @@ for _, plugin in pairs(disabled_built_ins) do vim.g["loaded_" .. plugin] = 1 end -local M = {} - -- file extension specific tabbing -- vim.cmd([[autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]]) - -return M From 559acbd135e2a209fb0a4773046a2e8a684c6f81 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 23 Jul 2021 18:17:31 +0530 Subject: [PATCH 0458/1541] rm unneeded error landing nvim by default shows stackrace path so I dont think we should be having this. --- init.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 13b4fe9..0c4969e 100644 --- a/init.lua +++ b/init.lua @@ -13,11 +13,7 @@ async = vim.schedule_wrap( function() for i = 1, #chad_modules, 1 do - local ok, res = xpcall(require, debug.traceback, chad_modules[i]) - if not (ok) then - print("Error loading module : " .. chad_modules[i]) - print(res) -- print stack traceback of the error - end + pcall(require, chad_modules[i]) end async:close() end From 936f368036f56a84e66a5f1f55428c2ecc9211ea Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 23 Jul 2021 20:19:33 +0530 Subject: [PATCH 0459/1541] Replace tweekmonster/startuptime.vim with dstein64/vim-startuptime because it's broken now --- lua/pluginList.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 0829a56..8810417 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -198,7 +198,7 @@ return packer.startup( } use { - "tweekmonster/startuptime.vim", + "dstein64/vim-startuptime", cmd = "StartupTime" } From 6b4435caef3d2f5568896758f790890318500f08 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 23 Jul 2021 20:08:20 +0530 Subject: [PATCH 0460/1541] Don't use new_async It doesn't seem to be improving stuff as it is not supposed to Due to the half baked stats of the startuptime plugin, people were fooled no point in disabling filetype and whatenot See some discussion here: https://github.com/siduck76/NvChad/issues/175 --- init.lua | 19 ++++--------------- lua/options.lua | 7 ------- lua/theme.lua | 7 ------- 3 files changed, 4 insertions(+), 29 deletions(-) diff --git a/init.lua b/init.lua index 805fc32..0e533cc 100644 --- a/init.lua +++ b/init.lua @@ -1,21 +1,10 @@ -require "options" - local chad_modules = { + "options", "pluginList", "mappings", "utils" } -local async -async = - vim.loop.new_async( - vim.schedule_wrap( - function() - for i = 1, #chad_modules, 1 do - pcall(require, chad_modules[i]) - end - async:close() - end - ) -) -async:send() +for i = 1, #chad_modules, 1 do + pcall(require, chad_modules[i]) +end diff --git a/lua/options.lua b/lua/options.lua index cb62d38..a8ad934 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -1,13 +1,6 @@ local opt = vim.opt local g = vim.g --- Turn these off at startup, will be enabled later just before loading the theme -vim.cmd([[ - syntax off - filetype off - filetype plugin indent off -]]) - opt.ruler = false opt.hidden = true opt.ignorecase = true diff --git a/lua/theme.lua b/lua/theme.lua index 85bf895..5356706 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -3,13 +3,6 @@ vim.g.nvchad_theme = "onedark" local present, base16 = pcall(require, "base16") if present then - -- enabled these options, was disabled in options.lua - vim.cmd([[ - syntax on - filetype on - filetype plugin indent on - ]]) - base16(base16.themes["onedark"], true) require "highlights" return true From 92eb5ca7404081e916b2f58ba15450a5a4870440 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 23 Jul 2021 20:41:09 +0530 Subject: [PATCH 0461/1541] Do not load packer on startup Actually saved some milliseconds, can be observed in benchmarks too from packer readme ``` To optimize startup time, packer.nvim compiles code to perform the lazy-loading operations you specify. This means that you do not need to load packer.nvim unless you want to perform some plugin management operations. ``` Add packer commands manually to mappings.lua, but with basic functionalty By this, we don't losr the packer commands and don't even load at startup After some command is actually executed, it will load the PackerCommands as they were --- init.lua | 1 - lua/mappings.lua | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 0e533cc..49bc3ed 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,5 @@ local chad_modules = { "options", - "pluginList", "mappings", "utils" } diff --git a/lua/mappings.lua b/lua/mappings.lua index 0ff8a87..c59592f 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -146,3 +146,10 @@ map("n", "", ":noh", opt) -- get out of terminal with jk map("t", "jk", "", opt) + +-- Packer commands till because we are not loading it at startup +vim.cmd("silent! command PackerCompile lua require 'pluginList' require('packer').compile()") +vim.cmd("silent! command PackerInstall lua require 'pluginList' require('packer').install()") +vim.cmd("silent! command PackerStatus lua require 'pluginList' require('packer').status()") +vim.cmd("silent! command PackerSync lua require 'pluginList' require('packer').sync()") +vim.cmd("silent! command PackerUpdate lua require 'pluginList' require('packer').update()") From 472278f2e38bb8825b39aac18ab06372082865e5 Mon Sep 17 00:00:00 2001 From: Tavo Annus Date: Fri, 23 Jul 2021 20:22:09 +0300 Subject: [PATCH 0462/1541] Add vim-fugitive plugin --- lua/mappings.lua | 6 ++++++ lua/pluginList.lua | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/lua/mappings.lua b/lua/mappings.lua index 0ff8a87..5321a3b 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -146,3 +146,9 @@ map("n", "", ":noh", opt) -- get out of terminal with jk map("t", "jk", "", opt) + +-- Vim Fugitive +map("n", "gs", ":Git", opt) +map("n", "gh", ":diffget //2", opt) +map("n", "gl", ":diffget //3", opt) +map("n", "gb", ":Git blame", opt) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 0829a56..568f008 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -243,5 +243,12 @@ return packer.startup( require("plugins.others").blankline() end } + + use { + "tpope/vim-fugitive", + cmd = { + "Git" + } + } end ) From c98334ae0821bdb51a20a38875673d907cf79b46 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 24 Jul 2021 09:59:39 +0530 Subject: [PATCH 0463/1541] lspconfig : update diagnostics in insert mode --- lua/plugins/lspconfig.lua | 6 ++++-- nn.lua | 0 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 nn.lua diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 8e94849..18c07ae 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -104,12 +104,14 @@ vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.diagnostic.on_publish_diagnostics, { virtual_text = { - -- prefix = "", prefix = "", spacing = 0 }, signs = true, - underline = true + underline = true, + + -- set this to true if you want diagnostics to show in insert mode + update_in_insert = false } ) diff --git a/nn.lua b/nn.lua new file mode 100644 index 0000000..e69de29 From bdd63eeedc4ed5fe864e29d305c1666b465976a6 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 24 Jul 2021 10:25:33 +0530 Subject: [PATCH 0464/1541] Delete nn.lua --- nn.lua | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 nn.lua diff --git a/nn.lua b/nn.lua deleted file mode 100644 index e69de29..0000000 From a31d8fb22845666c80b7957f1cf7740038c5bb04 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 24 Jul 2021 10:11:21 +0530 Subject: [PATCH 0465/1541] fix telescope media files mapping #183 --- lua/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index cfd6e1b..815bf4d 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -127,7 +127,7 @@ map("n", "fw", ":Telescope live_grep", opt) map("n", "gt", ":Telescope git_status ", opt) map("n", "cm", ":Telescope git_commits ", opt) map("n", "ff", ":Telescope find_files ", opt) -map("n", "fp", ":lua require('telescope').extensions.media_files.media_files()", opt) +map("n", "fp", ":Telescope media_files ", opt) map("n", "fb", ":Telescope buffers", opt) map("n", "fh", ":Telescope help_tags", opt) map("n", "fo", ":Telescope oldfiles", opt) From 9157cafb617a60830e5656f749d59e1a12944404 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 25 Jul 2021 01:31:50 +0530 Subject: [PATCH 0466/1541] Update telescope.lua --- lua/plugins/telescope.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 26f97e7..915689f 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -79,5 +79,6 @@ if print("After completion of PackerSync, restart neovim.") -- Trigger packer compile on PackerComplete, so it properly waits for PackerSync vim.cmd 'autocmd User PackerComplete ++once lua require("packer").compile()' + require "pluginList" require("packer").sync("telescope-fzf-native.nvim", "telescope-media-files.nvim") end From edbd88fdb7e7c24e8ca87ab7e76c2522324f2bbd Mon Sep 17 00:00:00 2001 From: gokul <33443763+JavaCafe01@users.noreply.github.com> Date: Sat, 24 Jul 2021 16:43:38 -0700 Subject: [PATCH 0467/1541] Added javacafe color scheme The javacafe color scheme is my custom smash of nord and pastel colors. --- lua/themes/javacafe.lua | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 lua/themes/javacafe.lua diff --git a/lua/themes/javacafe.lua b/lua/themes/javacafe.lua new file mode 100644 index 0000000..89e4364 --- /dev/null +++ b/lua/themes/javacafe.lua @@ -0,0 +1,33 @@ +local colors = { + white = "#F0F4FC", + darker_black = "#10171f", + black = "#131a21", -- nvim bg + black2 = "#29343d", + one_bg = "#2c333f", + one_bg2 = "#373e4c", + one_bg3 = "#434c5e", + grey = "#4c566a", + grey_fg = "#565c68", + grey_fg2 = "#606672", + light_grey = "#646a76", + red = "#f9929b", + baby_pink = "#fca2aa", + pink = "#fca2af", + line = "#3b4b58", -- for lines like vertsplit + green = "#7ed491", + vibrant_green = "#a5d4af", + blue = "#bac8ef", + nord_blue = "#a3b8ef", + yellow = "#fbdf90", + sun = "#fbdf9a", + purple = "#d7c1ed", + dark_purple = "#ccaced", + teal = "#9ce5c0", + orange = "#e39a83", + cyan = "#c7e5d6", + statusline_bg = "#29343d", + lightbg = "#373e4c", + lightbg2 = "#2c333f" +} + +return colors From 33422b0f3a7e8a7b70531e993e847e1be61845db Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 25 Jul 2021 13:18:48 +0530 Subject: [PATCH 0468/1541] better colors for javacafe theme --- lua/themes/javacafe.lua | 44 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/lua/themes/javacafe.lua b/lua/themes/javacafe.lua index 89e4364..c2bee1f 100644 --- a/lua/themes/javacafe.lua +++ b/lua/themes/javacafe.lua @@ -1,33 +1,33 @@ local colors = { - white = "#F0F4FC", - darker_black = "#10171f", - black = "#131a21", -- nvim bg - black2 = "#29343d", - one_bg = "#2c333f", - one_bg2 = "#373e4c", - one_bg3 = "#434c5e", - grey = "#4c566a", - grey_fg = "#565c68", - grey_fg2 = "#606672", - light_grey = "#646a76", - red = "#f9929b", + white = "#b5bcc9", + darker_black = "#121920", + black = "#181f26", -- nvim bg + black2 = "#1f262d", + one_bg = "#222930", + one_bg2 = "#272e35", + one_bg3 = "#2a3138", + grey = "#363d44", + grey_fg = "#4e555c", + grey_fg2 = "#51585f", + light_grey = "#545b62", + red = "#ef8891", baby_pink = "#fca2aa", pink = "#fca2af", - line = "#3b4b58", -- for lines like vertsplit - green = "#7ed491", + line = "#272e35", -- for lines like vertsplit + green = "#9ce5c0", vibrant_green = "#a5d4af", - blue = "#bac8ef", - nord_blue = "#a3b8ef", + blue = "#99aee5", + nord_blue = "#9aa8cf", yellow = "#fbdf90", sun = "#fbdf9a", purple = "#d7c1ed", dark_purple = "#ccaced", - teal = "#9ce5c0", - orange = "#e39a83", - cyan = "#c7e5d6", - statusline_bg = "#29343d", - lightbg = "#373e4c", - lightbg2 = "#2c333f" + teal = "#92dbb6", + orange = "#EDA685", + cyan = "#b5c3ea", + statusline_bg = "#1d242b", + lightbg = "#2c333f", + lightbg2 = "#21282f" } return colors From 11d75cf597720f87349cf3a02e71ec9d45a05f00 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 25 Jul 2021 14:53:43 +0530 Subject: [PATCH 0469/1541] better colors for javacafe theme --- lua/highlights.lua | 5 ++--- lua/themes/javacafe.lua | 16 ++++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lua/highlights.lua b/lua/highlights.lua index 08ad42b..42255d5 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -115,6 +115,5 @@ bg("NormalFloat", black2) bg("FloatBorder", black2) fg("FloatBorder", black2) --- set bg color for nvim ( so nvim wont use terminal bg) - -bg("Normal", black) +-- set bg color for nvim +-- bg("Normal", black) diff --git a/lua/themes/javacafe.lua b/lua/themes/javacafe.lua index c2bee1f..5785290 100644 --- a/lua/themes/javacafe.lua +++ b/lua/themes/javacafe.lua @@ -1,9 +1,9 @@ local colors = { white = "#b5bcc9", - darker_black = "#121920", - black = "#181f26", -- nvim bg - black2 = "#1f262d", - one_bg = "#222930", + darker_black = "#10171e", + black = "#131a21", -- nvim bg + black2 = "#1a2128", + one_bg = "#1e252c", one_bg2 = "#272e35", one_bg3 = "#2a3138", grey = "#363d44", @@ -13,7 +13,7 @@ local colors = { red = "#ef8891", baby_pink = "#fca2aa", pink = "#fca2af", - line = "#272e35", -- for lines like vertsplit + line = "#20272e", -- for lines like vertsplit green = "#9ce5c0", vibrant_green = "#a5d4af", blue = "#99aee5", @@ -25,9 +25,9 @@ local colors = { teal = "#92dbb6", orange = "#EDA685", cyan = "#b5c3ea", - statusline_bg = "#1d242b", - lightbg = "#2c333f", - lightbg2 = "#21282f" + statusline_bg = "#181f26", + lightbg = "#222930", + lightbg2 = "#1d242b" } return colors From 268c37e52f6ca99e248d5f1653fbffc1d1696b7d Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Mon, 26 Jul 2021 14:32:29 +0530 Subject: [PATCH 0470/1541] mappings: Allow moving the cursor through wrapped lines normally This doesn't affect any other stuff like 10j or 10k --- lua/mappings.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/mappings.lua b/lua/mappings.lua index 815bf4d..17848db 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -26,6 +26,14 @@ vim.api.nvim_set_keymap("t", "jk", "", {}) -- Don't copy the replaced text after pasting in visual mode map("v", "p", '"_dP', opt) +-- Allow moving the cursor through wrapped lines with j, k, and +-- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ +-- empty mode is same as using :map +map("", "j", 'v:count ? "j" : "gj"', {expr = true}) +map("", "k", 'v:count ? "k" : "gk"', {expr = true}) +map("", "", 'v:count ? "j" : "gj"', {expr = true}) +map("", "", 'v:count ? "k" : "gk"', {expr = true}) + -- OPEN TERMINALS -- map("n", "", ":vnew +terminal | setlocal nobuflisted ", opt) -- term over right map("n", "", ":10new +terminal | setlocal nobuflisted ", opt) -- term bottom From 3b05354337cfb026792b5e7f548ffc7d55e5dea5 Mon Sep 17 00:00:00 2001 From: G-Rowell Date: Mon, 26 Jul 2021 15:06:32 +0530 Subject: [PATCH 0471/1541] Use jdhao/better-escape.vim to handle jk as escape mappings only for insert mode ( so also works on terminal too ) remove visual mode key binding, till we find a proper solution, because it is super annoying right now Original pr here: https://github.com/siduck76/NvChad/pull/160 --- lua/mappings.lua | 5 ----- lua/pluginList.lua | 10 +++++++++- lua/plugins/others.lua | 5 +++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index 17848db..364a021 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -18,11 +18,6 @@ map("v", "x", [=[ "_x ]=], opt) this line too ]] -- --- escape with 'jk' mapping -vim.api.nvim_set_keymap("i", "jk", "", {}) -vim.api.nvim_set_keymap("v", "jk", "", {}) -vim.api.nvim_set_keymap("t", "jk", "", {}) - -- Don't copy the replaced text after pasting in visual mode map("v", "p", '"_dP', opt) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 6d476af..b7b79d8 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -16,6 +16,14 @@ return packer.startup( event = "VimEnter" } + use { + "jdhao/better-escape.vim", + event = "InsertEnter", + config = function() + require "plugins.others".escape() + end + } + use { "akinsho/nvim-bufferline.lua", after = "nvim-base16.lua", @@ -247,7 +255,7 @@ return packer.startup( use { "tpope/vim-fugitive", cmd = { - "Git" + "Git" } } end diff --git a/lua/plugins/others.lua b/lua/plugins/others.lua index 2278d09..0a060a6 100644 --- a/lua/plugins/others.lua +++ b/lua/plugins/others.lua @@ -15,6 +15,11 @@ M.comment = function() end end +M.escape = function() + vim.g.better_escape_interval = 300 + vim.g.better_escape_shortcut = {"jk"} +end + M.lspkind = function() local present, lspkind = pcall(require, "lspkind") if present then From 3f1e9cf37a2043ab7b4a2fd25f49df43e0e1586b Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Mon, 26 Jul 2021 16:57:00 +0530 Subject: [PATCH 0472/1541] statusline: Show lsp icon only if client is active for current buffer --- lua/plugins/statusline.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/plugins/statusline.lua b/lua/plugins/statusline.lua index 8f543c8..07af61e 100644 --- a/lua/plugins/statusline.lua +++ b/lua/plugins/statusline.lua @@ -117,7 +117,14 @@ gls.right[1] = { provider = function() local clients = vim.lsp.get_active_clients() if next(clients) ~= nil then - return " " .. "  " .. " LSP " + local buf_ft = vim.api.nvim_buf_get_option(0, "filetype") + for _, client in ipairs(clients) do + local filetypes = client.config.filetypes + if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then + return " " .. "  " .. " LSP " + end + end + return "" else return "" end From 462a20d66a12b4ec3b699333e7d89a2798883cb7 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Wed, 28 Jul 2021 14:42:55 +1000 Subject: [PATCH 0473/1541] fix mapping error --- lua/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index 364a021..56cfa10 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -32,7 +32,7 @@ map("", "", 'v:count ? "k" : "gk"', {expr = true}) -- OPEN TERMINALS -- map("n", "", ":vnew +terminal | setlocal nobuflisted ", opt) -- term over right map("n", "", ":10new +terminal | setlocal nobuflisted ", opt) -- term bottom -map("n", "t", ": terminal ", opt) -- term buffer +map("n", "t", ":terminal ", opt) -- term buffer -- copy whole file content map("n", "", ":%y+", opt) From f27f7b1502cd66172e0fa2e3cc1b9ce0b4381df3 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 28 Jul 2021 19:18:03 +0530 Subject: [PATCH 0474/1541] add hl to nvimtree_rootdir --- lua/highlights.lua | 2 +- lua/mappings.lua | 2 +- lua/plugins/nvimtree.lua | 4 ++-- lua/themes/{gruvbox.lua => gruvchad.lua} | 0 lua/themes/{nord.lua => norchad.lua} | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename lua/themes/{gruvbox.lua => gruvchad.lua} (100%) rename lua/themes/{nord.lua => norchad.lua} (100%) diff --git a/lua/highlights.lua b/lua/highlights.lua index 42255d5..d817356 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -75,7 +75,7 @@ fg("NvimTreeVertSplit", darker_black) bg("NvimTreeVertSplit", darker_black) fg("NvimTreeEndOfBuffer", darker_black) -fg("NvimTreeRootFolder", darker_black) +vim.cmd("hi NvimTreeRootFolder gui=underline guifg="..purple) bg("NvimTreeNormal", darker_black) fg_bg("NvimTreeStatuslineNc", darker_black, darker_black) fg_bg("NvimTreeWindowPicker", red, black2) diff --git a/lua/mappings.lua b/lua/mappings.lua index 56cfa10..364a021 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -32,7 +32,7 @@ map("", "", 'v:count ? "k" : "gk"', {expr = true}) -- OPEN TERMINALS -- map("n", "", ":vnew +terminal | setlocal nobuflisted ", opt) -- term over right map("n", "", ":10new +terminal | setlocal nobuflisted ", opt) -- term bottom -map("n", "t", ":terminal ", opt) -- term buffer +map("n", "t", ": terminal ", opt) -- term buffer -- copy whole file content map("n", "", ":%y+", opt) diff --git a/lua/plugins/nvimtree.lua b/lua/plugins/nvimtree.lua index 5e9c041..4444755 100644 --- a/lua/plugins/nvimtree.lua +++ b/lua/plugins/nvimtree.lua @@ -21,7 +21,7 @@ g.nvim_tree_indent_markers = 1 g.nvim_tree_hide_dotfiles = 1 g.nvim_tree_git_hl = 1 g.nvim_tree_highlight_opened_files = 0 -g.nvim_tree_root_folder_modifier = ":t" +g.nvim_tree_root_folder_modifier = table.concat {":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??"} g.nvim_tree_tab_open = 0 g.nvim_tree_allow_resize = 1 g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names @@ -62,7 +62,7 @@ g.nvim_tree_icons = { g.nvim_tree_bindings = { {key = {"", "o", "<2-LeftMouse>"}, cb = tree_cb("edit")}, - {key = {"<2-RightMouse>", ""}, cb = tree_cb("cd")}, + {key = {"<2-RightMouse>", ""}, cb = tree_cb("cd")}, {key = "", cb = tree_cb("vsplit")}, {key = "", cb = tree_cb("split")}, {key = "", cb = tree_cb("tabnew")}, diff --git a/lua/themes/gruvbox.lua b/lua/themes/gruvchad.lua similarity index 100% rename from lua/themes/gruvbox.lua rename to lua/themes/gruvchad.lua diff --git a/lua/themes/nord.lua b/lua/themes/norchad.lua similarity index 100% rename from lua/themes/nord.lua rename to lua/themes/norchad.lua From 87f3415f6f0ede190822bf3dd3f80455ffd0cf67 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 28 Jul 2021 19:53:19 +0530 Subject: [PATCH 0475/1541] Update mappings.lua --- lua/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index 364a021..56cfa10 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -32,7 +32,7 @@ map("", "", 'v:count ? "k" : "gk"', {expr = true}) -- OPEN TERMINALS -- map("n", "", ":vnew +terminal | setlocal nobuflisted ", opt) -- term over right map("n", "", ":10new +terminal | setlocal nobuflisted ", opt) -- term bottom -map("n", "t", ": terminal ", opt) -- term buffer +map("n", "t", ":terminal ", opt) -- term buffer -- copy whole file content map("n", "", ":%y+", opt) From d9c7a1b50428a3880286a78d7a4b6b93a3075b42 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Wed, 28 Jul 2021 21:46:39 +0530 Subject: [PATCH 0476/1541] Added Discord Badge Replaced gitter badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c2437e..c01c18f 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ src="https://img.shields.io/github/license/siduck76/NvChad?style=flat-square&logo=GNU&label=License" alt="License" /> -[![Gitter](https://img.shields.io/gitter/room/siduck76/NvChad?style=flat-square&logo=gitter&logoColor=white&label=Chat&color=eb34a4)](https://gitter.im/neovim-dotfiles/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![Gitter](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.com/channels/869557815780470834/869557816430563370) [![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.5+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white)](https://github.com/neovim/neovim) [![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square&label=Issues&color=fc0330)](https://github.com/siduck76/NvChad/issues) [![Last Commit](https://img.shields.io/github/last-commit/siduck76/NvChad.svg?style=flat-square&label=Last%20Commit&color=58eb34)](https://github.com/siduck76/NvChad/pulse) From dcf5d64437d8a85cc18cc66db450dd5652fb1b5d Mon Sep 17 00:00:00 2001 From: "Daniel M. Matongo" Date: Wed, 28 Jul 2021 19:16:32 +0000 Subject: [PATCH 0477/1541] add XDG_CONFIG_HOME I tried installing it on my system and it failed mostly because the NvChad was by default installed to the `.config` directory. I use a custom dir for my `XDG_CONFIG_HOME` so I figured if anyone has the same issue this would be an easy way to have it not work for them, the fallback dir here is `.config` if the user has not set a custom one. --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 9f7b382..8bc22c1 100755 --- a/install.sh +++ b/install.sh @@ -98,7 +98,7 @@ _setup_terminal_shell() { } _setup_arguments() { # default variables to be used - _CONFIG_PATH="${HOME}/.config/nvim" + _CONFIG_PATH="${XDG_CONFIG_HOME}/nvim" _UPDATE="" _BACKUP_PATH="${_CONFIG_PATH}.bak" _NO_BACKUP="false" From 9ba08bf7887819f28d7a0edc1f919ed8a73032c6 Mon Sep 17 00:00:00 2001 From: "Daniel M. Matongo" Date: Thu, 29 Jul 2021 05:27:08 +0000 Subject: [PATCH 0478/1541] update _CONFIG_PATH --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 8bc22c1..31d0264 100755 --- a/install.sh +++ b/install.sh @@ -98,7 +98,7 @@ _setup_terminal_shell() { } _setup_arguments() { # default variables to be used - _CONFIG_PATH="${XDG_CONFIG_HOME}/nvim" + _CONFIG_PATH="${XDG_CONFIG_HOME:-${HOME}/.config}/nvim" _UPDATE="" _BACKUP_PATH="${_CONFIG_PATH}.bak" _NO_BACKUP="false" From 202c62a2d3a36a81477a1ac1c579bc2a328e333f Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Thu, 29 Jul 2021 15:32:28 +0530 Subject: [PATCH 0479/1541] Added invite link I've added the invite link of NvChad discord and Changed the badge alt name to discord --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c01c18f..3ce99d0 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ src="https://img.shields.io/github/license/siduck76/NvChad?style=flat-square&logo=GNU&label=License" alt="License" /> -[![Gitter](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.com/channels/869557815780470834/869557816430563370) +[![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/5Stgvfww) [![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.5+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white)](https://github.com/neovim/neovim) [![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square&label=Issues&color=fc0330)](https://github.com/siduck76/NvChad/issues) [![Last Commit](https://img.shields.io/github/last-commit/siduck76/NvChad.svg?style=flat-square&label=Last%20Commit&color=58eb34)](https://github.com/siduck76/NvChad/pulse) From bcbde0e1a26fc16fe820dd73fd477c52e98553e2 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 31 Jul 2021 20:44:42 +0530 Subject: [PATCH 0480/1541] add theme to user_config --- lua/theme.lua | 9 +++++---- lua/user_config.lua | 7 +++++++ 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 lua/user_config.lua diff --git a/lua/theme.lua b/lua/theme.lua index 5356706..bf9fea2 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -1,9 +1,10 @@ -vim.g.nvchad_theme = "onedark" +local chad_theme = require("user_config").ui.theme -local present, base16 = pcall(require, "base16") +vim.g.nvchad_theme = chad_theme +local present2, base16 = pcall(require, "base16") -if present then - base16(base16.themes["onedark"], true) +if present2 then + base16(base16.themes[chad_theme], true) require "highlights" return true else diff --git a/lua/user_config.lua b/lua/user_config.lua new file mode 100644 index 0000000..cf87722 --- /dev/null +++ b/lua/user_config.lua @@ -0,0 +1,7 @@ +local M = { + ui = { + theme = "norchad" + } +} + +return M From e9aa4b5234f45a4d002a03da3b9b6524ae17c496 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 31 Jul 2021 21:04:47 +0530 Subject: [PATCH 0481/1541] Update user_config.lua --- lua/user_config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/user_config.lua b/lua/user_config.lua index cf87722..bd0f741 100644 --- a/lua/user_config.lua +++ b/lua/user_config.lua @@ -1,6 +1,6 @@ local M = { ui = { - theme = "norchad" + theme = "onedark" } } From 5236893e5e340d289f0c010799021337246db696 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 1 Aug 2021 09:55:28 +0530 Subject: [PATCH 0483/1541] add permanent undo (#197) --- lua/options.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/options.lua b/lua/options.lua index a8ad934..26ca92a 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -1,6 +1,7 @@ local opt = vim.opt local g = vim.g +opt.undofile = true opt.ruler = false opt.hidden = true opt.ignorecase = true @@ -64,5 +65,10 @@ for _, plugin in pairs(disabled_built_ins) do vim.g["loaded_" .. plugin] = 1 end +-- Opening a file from its last left off position +--vim.cmd( +-- [[au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif]] +--) + -- file extension specific tabbing -- vim.cmd([[autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]]) From 12085f495c7ff56d2012e466160dbb7d1c352ed3 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 1 Aug 2021 10:09:51 +0530 Subject: [PATCH 0484/1541] replace bufread event with bufenter ( lspinstall/lspkind ) --- lua/pluginList.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index b7b79d8..22996f4 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -68,7 +68,7 @@ return packer.startup( use { "kabouzeid/nvim-lspinstall", - event = "BufRead" + event = "BufEnter" } use { @@ -81,7 +81,7 @@ return packer.startup( use { "onsails/lspkind-nvim", - event = "BufRead", + event = "BufEnter", config = function() require("plugins.others").lspkind() end From 7affb8cbfb9248d1f0cba9e76692287c01fccff0 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 30 Jul 2021 22:32:58 +0530 Subject: [PATCH 0485/1541] Move from utils.lua to their respective places | Format all files --- init.lua | 3 +-- lua/highlights.lua | 2 +- lua/options.lua | 12 ++++++------ lua/plugins/lspconfig.lua | 1 - lua/plugins/nvimtree.lua | 3 +++ lua/utils.lua | 8 -------- 6 files changed, 11 insertions(+), 18 deletions(-) delete mode 100644 lua/utils.lua diff --git a/init.lua b/init.lua index 49bc3ed..54610ae 100644 --- a/init.lua +++ b/init.lua @@ -1,7 +1,6 @@ local chad_modules = { "options", - "mappings", - "utils" + "mappings" } for i = 1, #chad_modules, 1 do diff --git a/lua/highlights.lua b/lua/highlights.lua index d817356..f47ea78 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -75,7 +75,7 @@ fg("NvimTreeVertSplit", darker_black) bg("NvimTreeVertSplit", darker_black) fg("NvimTreeEndOfBuffer", darker_black) -vim.cmd("hi NvimTreeRootFolder gui=underline guifg="..purple) +vim.cmd("hi NvimTreeRootFolder gui=underline guifg=" .. purple) bg("NvimTreeNormal", darker_black) fg_bg("NvimTreeStatuslineNc", darker_black, darker_black) fg_bg("NvimTreeWindowPicker", red, black2) diff --git a/lua/options.lua b/lua/options.lua index 26ca92a..e3e9697 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -65,10 +65,10 @@ for _, plugin in pairs(disabled_built_ins) do vim.g["loaded_" .. plugin] = 1 end --- Opening a file from its last left off position ---vim.cmd( --- [[au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif]] ---) +-- Don't show status line on vim terminals +vim.cmd [[ au TermOpen term://* setlocal nonumber laststatus=0 ]] --- file extension specific tabbing --- vim.cmd([[autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]]) +-- Open a file from its last left off position +-- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] +-- File extension specific tabbing +-- vim.cmd [[ autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 ]] diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 18c07ae..2799e05 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -109,7 +109,6 @@ vim.lsp.handlers["textDocument/publishDiagnostics"] = }, signs = true, underline = true, - -- set this to true if you want diagnostics to show in insert mode update_in_insert = false } diff --git a/lua/plugins/nvimtree.lua b/lua/plugins/nvimtree.lua index 4444755..5713bd1 100644 --- a/lua/plugins/nvimtree.lua +++ b/lua/plugins/nvimtree.lua @@ -93,3 +93,6 @@ g.nvim_tree_bindings = { {key = "q", cb = tree_cb("close")}, {key = "g?", cb = tree_cb("toggle_help")} } + +-- hide statusline when nvim tree is opened +vim.cmd [[au BufEnter,BufWinEnter,WinEnter,CmdwinEnter * if bufname('%') == "NvimTree" | set laststatus=0 | else | set laststatus=2 | endif]] diff --git a/lua/utils.lua b/lua/utils.lua deleted file mode 100644 index 271928b..0000000 --- a/lua/utils.lua +++ /dev/null @@ -1,8 +0,0 @@ --- hide line numbers , statusline in specific buffers! -vim.api.nvim_exec( - [[ - au TermOpen term://* setlocal nonumber laststatus=0 - au BufEnter,BufWinEnter,WinEnter,CmdwinEnter * if bufname('%') == "NvimTree" | set laststatus=0 | else | set laststatus=2 | endif -]], - false -) From a6ab121d12140136549c53901b7880f0c8af29bc Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 30 Jul 2021 22:41:56 +0530 Subject: [PATCH 0486/1541] Implement theme switcher using telescope picker ask if want to change default theme, change value in user_config.lua load it as a telescope extension live preview of themes Co-authored-by: Galen Rowell --- lua/plugins/telescope.lua | 3 + lua/telescope/_extensions/themes.lua | 185 +++++++++++++++++++++++++++ lua/theme.lua | 4 +- lua/utils.lua | 96 ++++++++++++++ 4 files changed, 286 insertions(+), 2 deletions(-) create mode 100644 lua/telescope/_extensions/themes.lua create mode 100644 lua/utils.lua diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 915689f..80ba398 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -67,6 +67,9 @@ telescope.setup( } ) +-- load the theme_switcher extension +require("telescope").load_extension("themes") + if not pcall( function() diff --git a/lua/telescope/_extensions/themes.lua b/lua/telescope/_extensions/themes.lua new file mode 100644 index 0000000..e2aaa6e --- /dev/null +++ b/lua/telescope/_extensions/themes.lua @@ -0,0 +1,185 @@ +-- This file can be loaded as a telescope extension +local M = {} + +-- reload themes without restarting vim +-- if no theme name given then reload the current theme +M.reload_theme = function(theme_name) + local reload_plugin = require("utils").reload_plugin + + -- if theme name is empty or nil, then reload the current theme + if (theme_name == nil or theme_name == "") then + theme_name = vim.g.nvchad_theme + end + + if not pcall(require, "themes/" .. theme_name) then + error("No such theme ( " .. theme_name .. " )") + end + + vim.g.nvchad_theme = theme_name + + -- reload the base16 theme + local ok, base16 = pcall(require, "base16") + if not ok then + error("Error: Cannot load base16 plugin!") + end + base16(base16.themes[theme_name], true) + + reload_plugin { + "highlights", + "plugins.bufferline", + "galaxyline", + "plugins.statusline" + } + + -- now send the provider info to actual refresh + require("galaxyline.provider").async_load_providers:send() + + return true + -- open a buffer and close it to reload the statusline + -- vim.cmd("new|bwipeout") + -- commented out here as it will not work with telescope picker +end + +-- Custom theme picker +-- Most of the code is copied from telescope colorscheme plugin, mostly for preview creation +M.theme_switcher = function(opts) + local pickers, finders, previewers, actions, action_state, utils, conf + if pcall(require, "telescope") then + pickers = require "telescope.pickers" + finders = require "telescope.finders" + previewers = require "telescope.previewers" + + actions = require "telescope.actions" + action_state = require "telescope.actions.state" + utils = require "telescope.utils" + conf = require("telescope.config").values + else + error "Cannot find telescope!" + end + + local local_utils = require "utils" + local reload_theme = M.reload_theme + + -- get a table of available themes + local themes = local_utils.list_themes() + if next(themes) ~= nil then + -- save this to use it for later to restore if theme not changed + local current_theme = vim.g.nvchad_theme + local new_theme = "" + local change = false + + -- buffer number and name + local bufnr = vim.api.nvim_get_current_buf() + local bufname = vim.api.nvim_buf_get_name(bufnr) + + local previewer + + -- in case its not a normal buffer + if vim.fn.buflisted(bufnr) ~= 1 then + local deleted = false + local function del_win(win_id) + if win_id and vim.api.nvim_win_is_valid(win_id) then + utils.buf_delete(vim.api.nvim_win_get_buf(win_id)) + pcall(vim.api.nvim_win_close, win_id, true) + end + end + + previewer = + previewers.new { + preview_fn = function(_, entry, status) + if not deleted then + deleted = true + del_win(status.preview_win) + del_win(status.preview_border_win) + end + reload_theme(entry.value) + end + } + else + -- show current buffer content in previewer + previewer = + previewers.new_buffer_previewer { + get_buffer_by_name = function() + return bufname + end, + define_preview = function(self, entry) + if vim.loop.fs_stat(bufname) then + conf.buffer_previewer_maker(bufname, self.state.bufnr, {bufname = self.state.bufname}) + else + local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false) + vim.api.nvim_buf_set_lines(self.state.bufnr, 0, -1, false, lines) + end + reload_theme(entry.value) + end + } + end + + local picker = + pickers.new( + { + prompt_title = "Set NvChad color", + finder = finders.new_table(themes), + previewer = previewer, + sorter = conf.generic_sorter(opts), + attach_mappings = function() + actions.select_default:replace( + -- if a entry is selected, change current_theme to that + function(prompt_bufnr) + local selection = action_state.get_selected_entry() + new_theme = selection.value + change = true + actions.close(prompt_bufnr) + end + ) + return true + end + } + ) + + -- rewrite picker.close_windows + local close_windows = picker.close_windows + picker.close_windows = function(status) + close_windows(status) + -- now apply the theme, if success, then ask for default theme change + local final_theme + if change then + final_theme = new_theme + else + final_theme = current_theme + end + + if reload_theme(final_theme) then + if change then + -- ask for confirmation to set as default theme + local ans = string.lower(vim.fn.input("Set " .. new_theme .. " as default theme ? [y/N] ")) == "y" + if ans then + local_utils.change_theme(current_theme, final_theme) + else + -- will be used in restoring nvchad theme var + final_theme = current_theme + end + end + -- open a buffer and close it to reload the statusline + vim.cmd("new|bwipeout") + end + -- set nvchad_theme global var + vim.g.nvchad_theme = current_theme + end + -- launch the telescope picker + picker:find() + else + print("No themes found in " .. themes_folder) + end +end + +-- register theme swticher as themes to telescope +local present, telescope = pcall(require, "telescope") +if present then + return telescope.register_extension { + exports = { + themes = M.theme_switcher + } + } +else + error "Cannot find telescope!" +end diff --git a/lua/theme.lua b/lua/theme.lua index bf9fea2..236f379 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -1,9 +1,9 @@ local chad_theme = require("user_config").ui.theme vim.g.nvchad_theme = chad_theme -local present2, base16 = pcall(require, "base16") +local present, base16 = pcall(require, "base16") -if present2 then +if present then base16(base16.themes[chad_theme], true) require "highlights" return true diff --git a/lua/utils.lua b/lua/utils.lua new file mode 100644 index 0000000..e86b895 --- /dev/null +++ b/lua/utils.lua @@ -0,0 +1,96 @@ +local M = {} + +-- reload a plugin ( will try to load even if not loaded) +-- can take a string or list ( table ) +M.reload_plugin = function(plugins) + local function _reload_plugin(plugin) + local loaded = package.loaded[plugin] + if loaded then + package.loaded[plugin] = nil + end + if not pcall(require, plugin) then + error("Error: Cannot load " .. plugin .. " plugin!") + end + end + + if type(plugins) == "string" then + _reload_plugin(plugins) + elseif type(plugins) == "table" then + for _, plugin in ipairs(plugins) do + _reload_plugin(plugin) + end + end +end + +-- return a table of available themes +M.list_themes = function(return_type) + local themes = {} + -- folder where theme files are stored + local themes_folder = vim.fn.stdpath("config") .. "/lua/themes" + -- list all the contents of the folder and filter out files with .lua extension, then append to themes table + local fd = vim.loop.fs_scandir(themes_folder) + if fd then + while true do + local name, typ = vim.loop.fs_scandir_next(fd) + if name == nil then + break + end + if typ ~= "directory" and string.find(name, ".lua") then + -- return the table values as keys if specified + if return_type == "keys_as_value" then + themes[vim.fn.fnamemodify(name, ":r")] = true + else + table.insert(themes, vim.fn.fnamemodify(name, ":r")) + end + end + end + end + return themes +end + +-- 1st arg - r or w +-- 2nd arg - file path +-- 3rd arg - content if 1st arg is w +-- return file data on read, nothing on write +M.file = function(mode, filepath, content) + local data + local fd = assert(vim.loop.fs_open(filepath, mode, 438)) + local stat = assert(vim.loop.fs_fstat(fd)) + if stat.type ~= "file" then + data = false + else + if mode == "r" then + data = assert(vim.loop.fs_read(fd, stat.size, 0)) + else + assert(vim.loop.fs_write(fd, content, 0)) + data = true + end + end + assert(vim.loop.fs_close(fd)) + return data +end + +-- 1st arg as current theme, 2nd as new theme +M.change_theme = function(current_theme, new_theme) + if current_theme == nil or new_theme == nil then + error "Provide current and new theme name" + end + if current_theme == new_theme then + return + end + + local file = vim.fn.stdpath("config") .. "/lua/user_config.lua" + -- store in data variable + local data = assert(M.file("r", file)) + local find = "theme = .?" .. current_theme .. ".?" + local replace = 'theme = "' .. new_theme .. '"' + local content = string.gsub(data, find, replace) + -- see if the find string exists in file + if content == data then + error("Cannot change default theme with " .. new_theme .. ", edit " .. file .. " manually") + else + assert(M.file("w", file, content)) + end +end + +return M From af783670e4ab9d09109f4646726e4a17ceb4191d Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 30 Jul 2021 22:45:39 +0530 Subject: [PATCH 0487/1541] mappings: leader+th for Telescope themes --- lua/mappings.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/mappings.lua b/lua/mappings.lua index 56cfa10..5562bb5 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -134,6 +134,7 @@ map("n", "fp", ":Telescope media_files ", opt) map("n", "fb", ":Telescope buffers", opt) map("n", "fh", ":Telescope help_tags", opt) map("n", "fo", ":Telescope oldfiles", opt) +map("n", "th", ":Telescope themes", opt) -- bufferline tab stuff map("n", "", ":enew", opt) -- new buffer From f172cc8362a421e35d3d303db34e0204e8df5a71 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 2 Aug 2021 06:48:11 +0530 Subject: [PATCH 0488/1541] rm vim-startuptime --- lua/pluginList.lua | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 22996f4..cfac9e6 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -205,11 +205,6 @@ return packer.startup( end } - use { - "dstein64/vim-startuptime", - cmd = "StartupTime" - } - -- load autosave only if its globally enabled use { "Pocco81/AutoSave.nvim", From 0ea1bcb6f194b3c04315c52e6544ea85230692df Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 2 Aug 2021 07:10:02 +0530 Subject: [PATCH 0489/1541] Update README.md --- README.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/README.md b/README.md index 3ce99d0..4f55615 100644 --- a/README.md +++ b/README.md @@ -141,16 +141,6 @@ without / with Treesitter : -- The below image shows startuptime for : - -- NvChad Without lazy loading vs with lazy loading -- Default neovim with startuptime.vim plugin vs NvChad -- NvChad on my other system with ssd - - - -(The above 2 images show tests from my old pentium system so ofc the startuptime will be a lot more lesser for you ) - # TODO It would be nice if NvChad focuses on existing plugins and config before adding new things , some plugins like whichkey , telescope , treesitter still have basic configs! Also adding new features that'd make NvChad slow or its startuptime slow wouldnt be encouraged , if that feature's really needed then It'll be mentioned in the wiki with its config. From 668f1d56238d00c3577966ef801eeb6c11dec7b6 Mon Sep 17 00:00:00 2001 From: Pocco81 Date: Mon, 2 Aug 2021 21:23:20 -0500 Subject: [PATCH 0491/1541] skeleton for new install script --- install.sh | 249 +++++++++++++++++++---------------------------------- 1 file changed, 88 insertions(+), 161 deletions(-) diff --git a/install.sh b/install.sh index 31d0264..3ad1c00 100755 --- a/install.sh +++ b/install.sh @@ -1,171 +1,98 @@ #!/bin/sh -_usage() { - printf "%s" \ - "Usage: sh ${0##*/} [ options ] - -h | --help => Show this help. +RED='\033[0;31m' +GREEN='\033[0;32m' +ORANGE='\033[0;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color - -i | --install => Install the config. - - -u | --update => Update the existing config without removing existing stuff. - - -b | --backup 'path' => Custom config backup path. - - -nb | --no-backup => Don't take existing config backup. Use with caution. -" - exit 0 -} - -_check_install_dependencies() { - _error_dependencies() { - printf "%s\n" "Error: Install ${1} before proceeding." - exit 1 - } - command -v git 1>/dev/null || _error_dependencies git - _SED="$(command -v sed)" || _error_dependencies sed - return 0 -} - -_check_nvim_version() { - version_string="$(nvim --version | grep -Eo 'NVIM.*v[0-9.]+' -m 1 | grep -Eo '[0-9.]+')" || return 1 - printf "%s\n" "${version_string}" | while IFS=. read -r num1 num2 num3; do - { [ "${num1}" -ge 0 ] && [ "${num2}" -ge 5 ] && [ "${num3}" -ge 0 ]; } || return 1 - done -} - -_copy_config() { - printf "%s\n" "Linking config" - printf "%s\n" "Old nvim config will be changed to nvim.bak if exists! :0" - - # copying config - if [ -d "${_CONFIG_PATH}" ]; then - printf "%s\n" "Nvim Directory exists" - if [ "${_NO_BACKUP}" = "true" ]; then - printf "%s\n" "Skipping backup as --no-backup flag was passed.." - [ "${_UPDATE}" = "false" ] && rm -rf "${_CONFIG_PATH}" - else - printf "%s\n" "Taking backup of existing config.." - mv "${_CONFIG_PATH}" "${_BACKUP_PATH}" || { - printf "\n%s\n" "Error: Cannot move ${_CONFIG_PATH} to ${_BACKUP_PATH}" - printf "\n%s\n" "Take backup manually or use -b/--backup to provide non-empty path or use -nb/--no-backup to skip backup." - exit 1 - } - fi - else - printf "%s\n" "Nvim config doesn't exist, creating it now" - fi - - mkdir -p "${_CONFIG_PATH}" || { - printf "%s\n" "Error: Cannot create folder ${_CONFIG_PATH}" - exit 1 - } - - { cp -r init.lua lua "${_CONFIG_PATH}"/; } || { - printf "Error: Couldn't copy nvim config\n" - exit 1 - } - return 0 -} - -_setup_terminal_shell() { - _mappings_file="${_CONFIG_PATH}/lua/mappings.lua" - # only ask for shellname if running in terminal - if [ -t 1 ]; then - if chsh -l 2>/dev/null 1>&2; then - printf "\nAvailable Shells:\n" - chsh -l | nl - printf "\n%s\n" "Which shell do you want to use? (Eg. 2)" - printf "\t%s\n" "[ Enter nothing for current shell ( $_CURRENT_SHELL ) ]" - read -r shellnum - [ "${shellnum}" -gt 0 ] 2>/dev/null && _SHELLPATH="$(chsh -l | sed -n "$shellnum p")" - fi - fi - - # don't try to do any changes user wants their default shell in nvim - if [ -n "$_SHELLPATH" ]; then - # Reference: https://stackoverflow.com/a/4247319 - # \( & \) will use regex brackets (for later reference with \1) - # ( & ) will match text brackets - if "${_SED}" --posix -i'.bak' -e "s=^\(map(.* \+*terminal\) \(.*)\)=\1$_SHELLPATH \2=g" "${_mappings_file}"; then - printf "%s\n" "=> Neovim shell changed to $_SHELLPATH successfully!" - else - printf "%s\n" "Cannot edit with sed, edit ${_mappings_file} manually to replace bash with $_SHELLPATH." - fi - rm -f "${_mappings_file}".bak # delete backup file created by sed - fi - printf "%s\n" "=> Neovim shell will be ${_SHELLPATH:-${_CURRENT_SHELL}}" - return 0 -} -_setup_arguments() { - # default variables to be used - _CONFIG_PATH="${XDG_CONFIG_HOME:-${HOME}/.config}/nvim" - _UPDATE="" - _BACKUP_PATH="${_CONFIG_PATH}.bak" - _NO_BACKUP="false" - _CURRENT_SHELL="${SHELL##*/}" - - _check_longoptions() { - [ -z "${2}" ] && - printf '%s: %s: option requires an argument\nTry '"%s -h/--help"' for more information.\n' "${0##*/}" "${1}" "${0##*/}" && - exit 1 - return 0 - } - - while [ $# -gt 0 ]; do - case "${1}" in - -h | --help) _usage ;; - -i | --install) _UPDATE="false" ;; - -u | --update) _UPDATE="true" ;; - -b | --backup) - _check_longoptions "${1}" "${2}" - _BACKUP_PATH="${2}" && shift - ;; - -nb | --nobackup) _NO_BACKUP="true" ;; +# https://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux +prompt() { + case ${1} in + "-s" | "--success") + printf "${GREEN}%s${NC}\n" "${2}" + ;; + "-e" | "--error") + printf "${RED}%s${NC}\n" "${2}" + ;; + "-w" | "--warning") + printf "${ORANGE}%s${NC}\n" "${2}" + ;; + "-i" | "--info") + printf "${BLUE}%s${NC}\n" "${2}" + ;; + *) + printf "${GREEN}%s${NC}\n" "${2}" + ;; esac - shift - done - - [ -z "${_UPDATE}" ] && { - printf "%s\n" "Error: Either -i/--install or -u/--update flag must be used." - printf "%s\n" "See -h/--help for more info." - exit 1 - } - - printf "%s\n" \ - "CONFIG PATH: ${_CONFIG_PATH} -$(if [ "${_NO_BACKUP}" = "true" ]; then - printf "SKIPPING CONFIG BACKUP !\n" - else - printf "%s\n" "CONFIG BACKUP PATH: ${_BACKUP_PATH}" - fi) -CURRENT SHELL: ${_CURRENT_SHELL} -" - - return 0 } +_usage() { + printf "%s" \ + "Usage: sh ${0##*/} [ options ] + -h | --help => Show this help. + -i | --install => Install the config. + -r | --remove => Remove the config. + -u | --update => Update the existing config without removing existing stuff. +" + exit 0 +} + +_eval_exit() { + status=$1 + suc_msg=$2 + err_msg=$3 + + case $status in + 0) + prompt -s "${suc_msg}" + ;; + *) + prompt -e "${err_msg}" + ;; + esac + +} + +# _install() {} +_remove() { + prompt -i "-> Cleaning '$HOME/.config/nvim/'" + # rm -rf "$HOME/.config/nvim/" + + prompt -i "-> Cleaning '$HOME/.local/share/nvim/'" + # rm -rf "$HOME./local/share/nvim/" +} +# _update() {} + main() { - [ $# = 0 ] && _usage + while :; do + case $1 in + -h | -\? | --help) + _usage + exit 0 + ;; + -i | --install) + _install + ;; + -r | --remove) + _remove + _eval_exit $? "Successfully removeed NvChad!" "Failed to remove NvChad" + ;; + *) # Default case: No more options, so break out of the loop. + break + ;; + esac + shift + done - _check_install_dependencies - - _setup_arguments "${@}" - _copy_config - [ "${_UPDATE}" = "false" ] && _setup_terminal_shell - - # install all plugins + compile them - if _NVIM="$(command -v nvim)"; then - if _check_nvim_version; then - printf "\n%s\n" "=> Neovim will now open." && sleep 1 - "${_NVIM}" +"autocmd User PackerComplete ++once quitall" \ - +":lua require 'pluginList' vim.cmd('PackerSync')" - "${_NVIM}" - else - printf "Error: Neovim is installed, but version is lower than 0.5.x, install Neovim >= 5.x and then run nvim & do :PackerSync\n." - fi - else - printf "Error: Neovim is not installed, install Neovim >= 5.x and then run neovim & do :PackerSync.\n" - fi } -main "${@}" +init() { + if [ $# -eq 0 ]; then + prompt -e "ERROR: This script needs at least one argument" + else + main "${@}" + fi +} + +init "${@}" From e0f1cb3687b3aa07c95b76e16e1ace4f47efbeff Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Tue, 3 Aug 2021 08:59:45 +0530 Subject: [PATCH 0492/1541] theme_switcher: Handle some edgecases | Clear cmdline after default theme prompt --- lua/telescope/_extensions/themes.lua | 28 +++++++++++++++++++--------- lua/utils.lua | 21 ++++++++++++++++++--- 2 files changed, 37 insertions(+), 12 deletions(-) diff --git a/lua/telescope/_extensions/themes.lua b/lua/telescope/_extensions/themes.lua index e2aaa6e..2f0e4d6 100644 --- a/lua/telescope/_extensions/themes.lua +++ b/lua/telescope/_extensions/themes.lua @@ -12,7 +12,8 @@ M.reload_theme = function(theme_name) end if not pcall(require, "themes/" .. theme_name) then - error("No such theme ( " .. theme_name .. " )") + print("No such theme ( " .. theme_name .. " )") + return false end vim.g.nvchad_theme = theme_name @@ -20,16 +21,22 @@ M.reload_theme = function(theme_name) -- reload the base16 theme local ok, base16 = pcall(require, "base16") if not ok then - error("Error: Cannot load base16 plugin!") + print("Error: Cannot load base16 plugin!") + return false end base16(base16.themes[theme_name], true) - reload_plugin { - "highlights", - "plugins.bufferline", - "galaxyline", - "plugins.statusline" - } + if + not reload_plugin { + "highlights", + "plugins.bufferline", + "galaxyline", + "plugins.statusline" + } + then + print "Error: Not able to reload all plugins." + return false + end -- now send the provider info to actual refresh require("galaxyline.provider").async_load_providers:send() @@ -152,6 +159,7 @@ M.theme_switcher = function(opts) if change then -- ask for confirmation to set as default theme local ans = string.lower(vim.fn.input("Set " .. new_theme .. " as default theme ? [y/N] ")) == "y" + local_utils.clear_cmdline() if ans then local_utils.change_theme(current_theme, final_theme) else @@ -161,9 +169,11 @@ M.theme_switcher = function(opts) end -- open a buffer and close it to reload the statusline vim.cmd("new|bwipeout") + else + final_theme = current_theme end -- set nvchad_theme global var - vim.g.nvchad_theme = current_theme + vim.g.nvchad_theme = final_theme end -- launch the telescope picker picker:find() diff --git a/lua/utils.lua b/lua/utils.lua index e86b895..87e1e48 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -2,14 +2,17 @@ local M = {} -- reload a plugin ( will try to load even if not loaded) -- can take a string or list ( table ) +-- return true or false M.reload_plugin = function(plugins) + local status = true local function _reload_plugin(plugin) local loaded = package.loaded[plugin] if loaded then package.loaded[plugin] = nil end if not pcall(require, plugin) then - error("Error: Cannot load " .. plugin .. " plugin!") + print("Error: Cannot load " .. plugin .. " plugin!") + status = false end end @@ -20,6 +23,7 @@ M.reload_plugin = function(plugins) _reload_plugin(plugin) end end + return status end -- return a table of available themes @@ -73,7 +77,8 @@ end -- 1st arg as current theme, 2nd as new theme M.change_theme = function(current_theme, new_theme) if current_theme == nil or new_theme == nil then - error "Provide current and new theme name" + print "Error: Provide current and new theme name" + return false end if current_theme == new_theme then return @@ -87,10 +92,20 @@ M.change_theme = function(current_theme, new_theme) local content = string.gsub(data, find, replace) -- see if the find string exists in file if content == data then - error("Cannot change default theme with " .. new_theme .. ", edit " .. file .. " manually") + print("Error: Cannot change default theme with " .. new_theme .. ", edit " .. file .. " manually") + return false else assert(M.file("w", file, content)) end end +M.clear_cmdline = function() + vim.defer_fn( + function() + vim.cmd("echo") + end, + 0 + ) +end + return M From a25f4fca70e412a84d335e48366ae63e6cd7a68f Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Tue, 3 Aug 2021 09:38:50 +0530 Subject: [PATCH 0493/1541] Just packer shenanigans --- install.sh | 5 +++-- lua/plugins/telescope.lua | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 31d0264..4f3742e 100755 --- a/install.sh +++ b/install.sh @@ -157,8 +157,9 @@ main() { if _NVIM="$(command -v nvim)"; then if _check_nvim_version; then printf "\n%s\n" "=> Neovim will now open." && sleep 1 - "${_NVIM}" +"autocmd User PackerComplete ++once quitall" \ - +":lua require 'pluginList' vim.cmd('PackerSync')" + "${_NVIM}" +'autocmd User PackerComplete ++once lua print "Waiting for PackerCompile.." vim.cmd "PackerCompile"' \ + +'autocmd User PackerCompileDone ++once quitall' \ + +'lua print "Wait for PackerUpdate and PackerCompile to complete.." require "pluginList" vim.cmd "PackerUpdate"' "${_NVIM}" else printf "Error: Neovim is installed, but version is lower than 0.5.x, install Neovim >= 5.x and then run nvim & do :PackerSync\n." diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 80ba398..d3a9447 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -78,10 +78,11 @@ if end ) then - -- This should only trigger when in need of PackerSync, so better do it - print("After completion of PackerSync, restart neovim.") + -- This should only trigger when in need of PackerSync, so better do it + print("After completion of PackerCompile, restart neovim.") -- Trigger packer compile on PackerComplete, so it properly waits for PackerSync - vim.cmd 'autocmd User PackerComplete ++once lua require("packer").compile()' + vim.cmd 'autocmd User PackerComplete ++once lua print "Waiting for PackerCompile.." require("packer").compile()' + vim.cmd 'autocmd User PackerCompileDone ++once echo "Packer Compile done, restart neovim."' require "pluginList" - require("packer").sync("telescope-fzf-native.nvim", "telescope-media-files.nvim") + require("packer").update("telescope-fzf-native.nvim", "telescope-media-files.nvim") end From 3ed108b4ea81eb575e582b054a52dea815538055 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 4 Aug 2021 08:39:43 +0530 Subject: [PATCH 0494/1541] update todo --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4f55615..542c7cc 100644 --- a/README.md +++ b/README.md @@ -145,11 +145,12 @@ without / with Treesitter : It would be nice if NvChad focuses on existing plugins and config before adding new things , some plugins like whichkey , telescope , treesitter still have basic configs! Also adding new features that'd make NvChad slow or its startuptime slow wouldnt be encouraged , if that feature's really needed then It'll be mentioned in the wiki with its config. -- Debloat the config +- Debloat the config. +- Make NvChad more faster (reduce startuptime too). +- Add another section in the wiki explaining the whole config (must be helpful for newbies). - Add more themes. -- Add a theme switcher. -- Preview shortcuts in the form of a pretty [cheatsheet](https://user-images.githubusercontent.com/59060246/122490009-95fd9980-cffe-11eb-9676-78019aa2cd65.png) -- Add a global configuration so it doesnt get hard to update :c +- Preview shortcuts in the form of a pretty [cheatsheet](https://user-images.githubusercontent.com/59060246/122490009-95fd9980-cffe-11eb-9676-78019aa2cd65.png). +- Add a user config so it doesnt get hard to update :c # Contribute From bbbd73fc5642ab7ef07385501afb05456b35baa6 Mon Sep 17 00:00:00 2001 From: Pocco81 Date: Tue, 3 Aug 2021 22:38:03 -0500 Subject: [PATCH 0495/1541] basic parser --- install.sh | 173 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 151 insertions(+), 22 deletions(-) diff --git a/install.sh b/install.sh index 3ad1c00..2b34089 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash RED='\033[0;31m' GREEN='\033[0;32m' @@ -35,11 +35,10 @@ _usage() { -r | --remove => Remove the config. -u | --update => Update the existing config without removing existing stuff. " - exit 0 } _eval_exit() { - status=$1 + status=$1 suc_msg=$2 err_msg=$3 @@ -54,43 +53,173 @@ _eval_exit() { } -# _install() {} +_check_dependencies() { + _error_dependencies() { + prompt -r "Error: Install ${1} before proceeding." + exit 1 + } + command -v git 1>/dev/null || _error_dependencies git + return 0 +} + +_install() { + _check_dependencies +} + _remove() { - prompt -i "-> Cleaning '$HOME/.config/nvim/'" + prompt -i "-> Cleaning config ($HOME/.config/nvim/)" # rm -rf "$HOME/.config/nvim/" - prompt -i "-> Cleaning '$HOME/.local/share/nvim/'" - # rm -rf "$HOME./local/share/nvim/" + prompt -i "-> Cleaning miscellaneous ($HOME/.local/share/nvim/)" + # rm -rf "$HOME/.local/share/nvim/" + + prompt -i "-> Cleaning cache ($HOME/.cache/nvim/)" + # rm -rf "$HOME/.cache/nvim/" } # _update() {} -main() { - while :; do - case $1 in - -h | -\? | --help) - _usage - exit 0 +_init_settings() { + no_backup="false" + install="false" + uninstall="false" +} + +_clean_arg() { + arg=$1 + if [[ "$arg" == "--"* ]]; then + echo "${arg:2}" + elif [[ "$arg" == "-"* ]]; then + echo "${arg:1}" + fi +} + + +_parse_args() { + local args_func=$1 + local argv=("$@") + local argc=${#argv[@]} + local skip=0 + + _skip_ahead() { + amount=$1 + skip=$((skip + amount)) + } + + _clean_arg() { + arg=$1 + if [[ "$arg" == "--"* ]]; then + echo "${arg:2}" + elif [[ "$arg" == "-"* ]]; then + echo "${arg:1}" + fi + } + + for j in "${!argv[@]}"; do + if [[ ${skip} -gt 0 ]]; then + left=$((argc - j)) + while [[ ${skip} > ${left} ]]; do ((skip--)); done + skip=$((skip - 1)) + continue + fi + + case ${argv[j]} in + --*) # End of all options. + case ${argv[j]} in + --) # End of all options. + break + ;; + *) + eval "${eval_args}" "$(_clean_arg "${argv[j]}")" "$j" + ;; + esac ;; - -i | --install) - _install + -*) + tangled_args=$(_clean_arg "${argv[j]}") + for ((k = 0; k < ${#tangled_args}; k++)); do + eval "${eval_args}" "${tangled_args:$k:1}" "$j" + done ;; - -r | --remove) - _remove - _eval_exit $? "Successfully removeed NvChad!" "Failed to remove NvChad" - ;; - *) # Default case: No more options, so break out of the loop. - break + *) + prompt -w "Warning: flag ''${argv[j]}' not recognized" ;; esac - shift done +} +main() { + local argv=("$@") + local argc=${#argv[@]} + local skip=0 + + assert_arg() { + var=$1 + index=$2 + case ${var} in + h | help) + _usage + ;; + i | install) + prompt -i "installing..." + ;; + r | remove) + prompt -i "removing..." + ;; + # p | --path + *) + prompt -w "Warning: flag '${var}' not recognized" + ;; + esac + } + + _skip_ahead() { + amount=$1 + skip=$((skip + amount)) + } + + # works for: + # 1. normal flags (e.g. -h,--help) + # 2. nested flags (e.g. -ivh) + # 3. space sperated flags and args (e.g. --option argument) + # 4. equal separated flags and args (e.g. --option=argument) + + + for j in "${!argv[@]}"; do + if [[ ${skip} -gt 0 ]]; then + left=$((argc - j)) + while [[ ${skip} > ${left} ]]; do ((skip--)); done + skip=$((skip - 1)) + continue + fi + + case ${argv[j]} in + --*) # End of all options. + case ${argv[j]} in + --) # End of all options. + break + ;; + *) + assert_arg "$(_clean_arg "${argv[j]}")" "$j" + ;; + esac + ;; + -*) + tangled_args=$(_clean_arg "${argv[j]}") + for ((k = 0; k < ${#tangled_args}; k++)); do + assert_arg "${tangled_args:$k:1}" "$j" + done + ;; + *) + prompt -w "Warning: flag ''${argv[j]}' not recognized" + ;; + esac + done } init() { if [ $# -eq 0 ]; then prompt -e "ERROR: This script needs at least one argument" else + _init_settings main "${@}" fi } From acceccda87c60c76c06bef56a3c5780588473158 Mon Sep 17 00:00:00 2001 From: Pocco81 Date: Tue, 3 Aug 2021 23:09:18 -0500 Subject: [PATCH 0496/1541] accept both args and flags --- install.sh | 173 ++++++++++++++--------------------------------------- 1 file changed, 46 insertions(+), 127 deletions(-) diff --git a/install.sh b/install.sh index 2b34089..7ed3898 100755 --- a/install.sh +++ b/install.sh @@ -30,75 +30,31 @@ prompt() { _usage() { printf "%s" \ "Usage: sh ${0##*/} [ options ] - -h | --help => Show this help. - -i | --install => Install the config. - -r | --remove => Remove the config. - -u | --update => Update the existing config without removing existing stuff. + -h, --help -> Show this help. + -i, --install -> Install the config. + -r, --remove -> Remove the config. + -u, --update -> Update the existing config without removing existing stuff. " } -_eval_exit() { - status=$1 - suc_msg=$2 - err_msg=$3 - - case $status in - 0) - prompt -s "${suc_msg}" - ;; - *) - prompt -e "${err_msg}" - ;; - esac +skip=0 +_skip_ahead() { + amount=$1 + skip=$((skip + amount)) } -_check_dependencies() { - _error_dependencies() { - prompt -r "Error: Install ${1} before proceeding." - exit 1 - } - command -v git 1>/dev/null || _error_dependencies git - return 0 -} - -_install() { - _check_dependencies -} - -_remove() { - prompt -i "-> Cleaning config ($HOME/.config/nvim/)" - # rm -rf "$HOME/.config/nvim/" - - prompt -i "-> Cleaning miscellaneous ($HOME/.local/share/nvim/)" - # rm -rf "$HOME/.local/share/nvim/" - - prompt -i "-> Cleaning cache ($HOME/.cache/nvim/)" - # rm -rf "$HOME/.cache/nvim/" -} -# _update() {} - -_init_settings() { - no_backup="false" - install="false" - uninstall="false" -} - -_clean_arg() { - arg=$1 - if [[ "$arg" == "--"* ]]; then - echo "${arg:2}" - elif [[ "$arg" == "-"* ]]; then - echo "${arg:1}" - fi -} - - _parse_args() { - local args_func=$1 + local func_args=$1 local argv=("$@") + # local skip=0 + + unset 'argv[0]' # becuase arg1 is $func_arg + for i in "${!argv[@]}"; do new_array+=( "${argv[i]}" ); done + argv=("${new_array[@]}") + unset new_array + local argc=${#argv[@]} - local skip=0 _skip_ahead() { amount=$1 @@ -129,99 +85,62 @@ _parse_args() { break ;; *) - eval "${eval_args}" "$(_clean_arg "${argv[j]}")" "$j" + # eval "${func_args}" "$(_clean_arg "${argv[j]}")" "$j" + eval "${func_args}" "${argv[j]}" "$j" ;; esac ;; -*) - tangled_args=$(_clean_arg "${argv[j]}") - for ((k = 0; k < ${#tangled_args}; k++)); do - eval "${eval_args}" "${tangled_args:$k:1}" "$j" - done + if [[ ${#argv[j]} -le 2 ]]; then + eval "${func_args}" "${argv[j]}" "$j" + else + tangled_args=$(_clean_arg "${argv[j]}") + for ((k = 0; k < ${#tangled_args}; k++)); do + eval "${func_args}" "-${tangled_args:$k:1}" "$j" + done + fi ;; *) - prompt -w "Warning: flag ''${argv[j]}' not recognized" + eval "${func_args}" "${argv[j]}" "$j" ;; esac done } main() { - local argv=("$@") - local argc=${#argv[@]} - local skip=0 + local argvs=("$@") + local argc=${#argvs[@]} assert_arg() { - var=$1 - index=$2 + var=$1 # flag + index=$2 # flag's index case ${var} in - h | help) + -h | --help) _usage ;; - i | install) + -i | --install) prompt -i "installing..." ;; - r | remove) + -r | --remove) prompt -i "removing..." ;; - # p | --path + -a | --action) + action=${argvs[index+1]} + prompt -i "Action to perform -> ${action}" + _skip_ahead 1 + ;; + -p=* | --path=*) + path="${var#*=}" + prompt -i "Path was set to -> ${path}" + ;; *) - prompt -w "Warning: flag '${var}' not recognized" + prompt -w "Warning: unknown command '${var}'" ;; esac } - _skip_ahead() { - amount=$1 - skip=$((skip + amount)) - } - - # works for: - # 1. normal flags (e.g. -h,--help) - # 2. nested flags (e.g. -ivh) - # 3. space sperated flags and args (e.g. --option argument) - # 4. equal separated flags and args (e.g. --option=argument) - - - for j in "${!argv[@]}"; do - if [[ ${skip} -gt 0 ]]; then - left=$((argc - j)) - while [[ ${skip} > ${left} ]]; do ((skip--)); done - skip=$((skip - 1)) - continue - fi - - case ${argv[j]} in - --*) # End of all options. - case ${argv[j]} in - --) # End of all options. - break - ;; - *) - assert_arg "$(_clean_arg "${argv[j]}")" "$j" - ;; - esac - ;; - -*) - tangled_args=$(_clean_arg "${argv[j]}") - for ((k = 0; k < ${#tangled_args}; k++)); do - assert_arg "${tangled_args:$k:1}" "$j" - done - ;; - *) - prompt -w "Warning: flag ''${argv[j]}' not recognized" - ;; - esac - done + _parse_args "assert_arg" "${argvs[@]}" } -init() { - if [ $# -eq 0 ]; then - prompt -e "ERROR: This script needs at least one argument" - else - _init_settings - main "${@}" - fi -} -init "${@}" +main "${@}" From a49c54fc41a4e2063f0de42633a9600f3ef4d5f3 Mon Sep 17 00:00:00 2001 From: Pocco81 Date: Tue, 3 Aug 2021 23:17:40 -0500 Subject: [PATCH 0497/1541] refactor --- install.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 7ed3898..4863cf3 100755 --- a/install.sh +++ b/install.sh @@ -6,6 +6,8 @@ ORANGE='\033[0;33m' BLUE='\033[0;34m' NC='\033[0m' # No Color +skip=0 + # https://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux prompt() { case ${1} in @@ -37,7 +39,6 @@ _usage() { " } -skip=0 _skip_ahead() { amount=$1 @@ -142,5 +143,12 @@ main() { _parse_args "assert_arg" "${argvs[@]}" } +init() { + if [ $# -eq 0 ]; then + prompt -e "ERROR: This script needs at least one argument" + else + main "${@}" + fi +} -main "${@}" +init "${@}" From af1aa860da91d56b3abf3ba835b616ba7a69cfe0 Mon Sep 17 00:00:00 2001 From: Pocco81 Date: Wed, 4 Aug 2021 00:11:15 -0500 Subject: [PATCH 0498/1541] remove and install cmds --- install.sh | 92 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 77 insertions(+), 15 deletions(-) diff --git a/install.sh b/install.sh index 4863cf3..8f20647 100755 --- a/install.sh +++ b/install.sh @@ -6,7 +6,17 @@ ORANGE='\033[0;33m' BLUE='\033[0;34m' NC='\033[0m' # No Color +REPO="https://github.com/siduck76/NvChad.git" + skip=0 +nvchad_path="$HOME/.config/nvim/" +dependencies=( + "git" +) +preserved_files=( + "lua/mappings.lua" + "lua/user_config.lua" +) # https://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux prompt() { @@ -31,7 +41,7 @@ prompt() { _usage() { printf "%s" \ - "Usage: sh ${0##*/} [ options ] + "Usage: ./${0##*/} [ options ] -h, --help -> Show this help. -i, --install -> Install the config. -r, --remove -> Remove the config. @@ -39,6 +49,51 @@ _usage() { " } +_remove() { + prompt -w "Removing config -> ($HOME/.config/nvim/)" + # rm -rf "$HOME/.config/nvim/" + prompt -w "Removing miscellaneous -> ($HOME/.local/share/nvim/)" + # rm -rf "$HOME/.local/share/nvim/" + prompt -w "Removing cache -> ($HOME/.cache/nvim/)" + # rm -rf "$HOME/.cache/nvim/" +} + +_check_dependencies() { + local err + + for i in "${dependencies[@]}"; do + + if ! command -v "${i}" &> /dev/null + then + prompt -e "Error: You need to install the dependency '${i}'" + err="true" + fi + done + + if [[ "${err}" == "true" ]]; then + exit 1 + fi +} + +_fetch() { + printf " + %s\n" "$(prompt -i "Fetching repo...")" + git clone -n ${REPO} --depth 1 "${nvchad_path}" + cd "${nvchad_path}" || return + + printf " + %s\n" "$(prompt -i "Checking out core...")" + git checkout HEAD lua/ + printf " + %s\n" "$(prompt -i "Checking out init file...")" + git checkout HEAD init.lua +} + +_install() { + prompt -w "-> Checking dependencies..." + _check_dependencies + prompt -w "-> Cloning..." + _fetch +} + +# _update() {} _skip_ahead() { amount=$1 @@ -48,7 +103,6 @@ _skip_ahead() { _parse_args() { local func_args=$1 local argv=("$@") - # local skip=0 unset 'argv[0]' # becuase arg1 is $func_arg for i in "${!argv[@]}"; do new_array+=( "${argv[i]}" ); done @@ -112,7 +166,17 @@ main() { local argvs=("$@") local argc=${#argvs[@]} - assert_arg() { + assert_aditional_args() { + var=$1 # flag + index=$2 # flag's index + case ${var} in + -p=* | --path=*) + nvchad_path="${var#*=}" + ;; + esac + } + + assert_args() { var=$1 # flag index=$2 # flag's index case ${var} in @@ -120,27 +184,25 @@ main() { _usage ;; -i | --install) - prompt -i "installing..." + prompt -i "Installing NvChad..." + _install ;; -r | --remove) - prompt -i "removing..." + prompt -i "Removing NvChad..." + _remove ;; - -a | --action) - action=${argvs[index+1]} - prompt -i "Action to perform -> ${action}" - _skip_ahead 1 - ;; - -p=* | --path=*) - path="${var#*=}" - prompt -i "Path was set to -> ${path}" - ;; + -u | --update) + prompt -i "Updating NvChad..." + ;; + -p=* | --path=*) ;; *) prompt -w "Warning: unknown command '${var}'" ;; esac } - _parse_args "assert_arg" "${argvs[@]}" + _parse_args "assert_aditional_args" "${argvs[@]}" + _parse_args "assert_args" "${argvs[@]}" } init() { From c5fd109a2d6e311fd252e95507028e5405460c18 Mon Sep 17 00:00:00 2001 From: Pocco81 Date: Wed, 4 Aug 2021 14:49:33 -0500 Subject: [PATCH 0499/1541] done --- install.sh | 293 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 220 insertions(+), 73 deletions(-) diff --git a/install.sh b/install.sh index 8f20647..52a1a87 100755 --- a/install.sh +++ b/install.sh @@ -7,15 +7,19 @@ BLUE='\033[0;34m' NC='\033[0m' # No Color REPO="https://github.com/siduck76/NvChad.git" +BACKUP_PATH="/tmp/nvchad/" +TMP_NVCHAD="/tmp/nvchad_updates/" skip=0 -nvchad_path="$HOME/.config/nvim/" +# nvchad_path="$HOME/.config/nvim/" +nvchad_path="/tmp/test_chad/" +do_startup="true" dependencies=( - "git" + "git" ) preserved_files=( - "lua/mappings.lua" - "lua/user_config.lua" + "lua/mappings.lua" + "lua/user_config.lua" ) # https://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux @@ -41,73 +45,192 @@ prompt() { _usage() { printf "%s" \ - "Usage: ./${0##*/} [ options ] - -h, --help -> Show this help. - -i, --install -> Install the config. - -r, --remove -> Remove the config. - -u, --update -> Update the existing config without removing existing stuff. + "Usage: ./${0##*/} [ options ] + -h, --help -> Show this help. + -i, --install -> Install the config. + -r, --remove -> Remove the config. + -u, --update -> Update the existing config without removing existing stuff. + -s, --skip-startup -> Skip starting up nvim after installing the config. + -c, --clean-backups -> Remove backups (if any) from your system. + -p=*, --path=* -> Path to NvChad. Relevant for installing and updating. " } _remove() { - prompt -w "Removing config -> ($HOME/.config/nvim/)" - # rm -rf "$HOME/.config/nvim/" - prompt -w "Removing miscellaneous -> ($HOME/.local/share/nvim/)" - # rm -rf "$HOME/.local/share/nvim/" - prompt -w "Removing cache -> ($HOME/.cache/nvim/)" - # rm -rf "$HOME/.cache/nvim/" + + read -p "Are you sure you want to uninstall NvChad? This will 'flush' dirs such as $HOME/.config/nvim/. (y/n): " u_reply + + if [[ "${u_reply}" == "y" ]]; then + printf " + %s\n" "$(prompt -w "Removing config -> ($HOME/.config/nvim/)")" + rm -rf "$HOME/.config/nvim/" + + printf " + %s\n" "$(prompt -w "Removing miscellaneous -> ($HOME/.local/share/nvim/)")" + rm -rf "$HOME/.local/share/nvim/" + + printf " + %s\n" "$(prompt -w "Removing cache -> ($HOME/.cache/nvim/)")" + rm -rf "$HOME/.cache/nvim/" + elif [[ "${u_reply}" == "n" ]]; then + prompt -i "Ok, enjoy NvChad :)" + else + prompt -e "Error: you must type either 'n' for no or 'y' for yes." + fi + } _check_dependencies() { - local err + local err for i in "${dependencies[@]}"; do - - if ! command -v "${i}" &> /dev/null - then - prompt -e "Error: You need to install the dependency '${i}'" - err="true" - fi - done - if [[ "${err}" == "true" ]]; then - exit 1 - fi + if ! command -v "${i}" &>/dev/null; then + prompt -e "Error: You need to install the dependency '${i}'" + err="true" + fi + done + + if [[ "${err}" == "true" ]]; then + exit 1 + fi } _fetch() { - printf " + %s\n" "$(prompt -i "Fetching repo...")" - git clone -n ${REPO} --depth 1 "${nvchad_path}" - cd "${nvchad_path}" || return + printf " + %s\n" "$(prompt -i "Cleaning workspace")" + rm -rf ${nvchad_path} + printf " + %s\n" "$(prompt -i "Fetching repo")" + git clone -n ${REPO} --depth 1 "${nvchad_path}" + cd "${nvchad_path}" || return - printf " + %s\n" "$(prompt -i "Checking out core...")" - git checkout HEAD lua/ - printf " + %s\n" "$(prompt -i "Checking out init file...")" - git checkout HEAD init.lua + printf " + %s\n" "$(prompt -i "Checking out core")" + git checkout HEAD lua/ + printf " + %s\n" "$(prompt -i "Checking out init file")" + git checkout HEAD init.lua +} + +_check_prev_conf() { + if [[ -d "${nvchad_path}" ]]; then + mkdir -p "${BACKUP_PATH}" + amount_files=$(ls "${BACKUP_PATH}" | wc -l) + printf " + %s\n" "$(prompt -i "Previous config found, backing it up (/tmp/nvchad/backup_${amount_files})")" + cp -r "${nvchad_path}" "${BACKUP_PATH}backup_${amount_files}" + fi +} + +_check_nvim_version() { + version_string="$(nvim --version | grep -Eo 'NVIM.*v[0-9.]+' -m 1 | grep -Eo '[0-9.]+')" || return 1 + printf "%s\n" "${version_string}" | while IFS=. read -r num1 num2 num3; do + { [ "${num1}" -ge 0 ] && [ "${num2}" -ge 5 ] && [ "${num3}" -ge 0 ]; } || return 1 + done +} + +_startup() { + + printf " + %s\n" "$(prompt -i "Checking nvim version")" + if _NVIM="$(command -v nvim)"; then + if _check_nvim_version; then + printf " + %s\n" "$(prompt -i "NeoVim will open now")" + sleep 1 + "${_NVIM}" +'autocmd User PackerComplete ++once lua print "Waiting for PackerCompile.." vim.cmd "PackerCompile"' \ + +'autocmd User PackerCompileDone ++once quitall' \ + +'lua print "Wait for PackerUpdate and PackerCompile to complete.." require "pluginList" vim.cmd "PackerUpdate"' + "${_NVIM}" + else + prompt -e "Error: Neovim is installed, but version is lower than 0.5.x, install Neovim >= 5.x and then run nvim & do :PackerSync" + fi + else + prompt -e "Error: Neovim is not installed, install Neovim >= 5.x and then run neovim & do :PackerSync" + fi } _install() { - prompt -w "-> Checking dependencies..." - _check_dependencies - prompt -w "-> Cloning..." - _fetch + prompt -w "-> Checking dependencies..." + _check_dependencies + prompt -w "-> Checking for previous confs..." + _check_prev_conf + prompt -w "-> Cloning..." + _fetch + + if [[ "$do_startup" == "true" ]]; then + prompt -w "-> Loading nvim..." + _startup + fi } -# _update() {} +_clean_backups() { + prompt -w "-> Looking for backups..." + if [[ -d "${BACKUP_PATH}" ]]; then + if [[ -z "$(ls -A ${BACKUP_PATH})" ]]; then + printf " + %s\n" "$(prompt -w "No backups were found")" + else + printf " + %s\n" "$(prompt -i "Backups were found, removing them...")" + rm -rf "${BACKUP_PATH}" + fi + else + printf " + %s\n" "$(prompt -w "No backups were found")" + fi +} + +_update() { + + prompt -w "-> Checking if conf is eligible for being updated..." + + if [[ -z "$(ls -A ${nvchad_path})" ]]; then + printf " + %s\n" "$(prompt -e "Error: there is nothing to update")" + else + printf " + %s\n" "$(prompt -i "Updating config")" + mkdir -p ${TMP_NVCHAD} + for to_preservef in "${!preserved_files[@]}"; do + file="${nvchad_path}${preserved_files[to_preservef]}" + printf " + %s\n" "$(prompt -i "saving file: ${preserved_files[to_preservef]}")" + if [[ -e "${file}" ]]; then + mv "${file}" "${TMP_NVCHAD}" + fi + done + + do_startup="false" + _install + + for to_preservef in "${!preserved_files[@]}"; do + destination_file="${nvchad_path}${preserved_files[to_preservef]}" + file_name=$(basename "${preserved_files[to_preservef]}") + location_path=$(dirname "${destination_file}") + stored_file="${TMP_NVCHAD}${file_name}" + printf " + %s\n" "$(prompt -i "restoring file: ${preserved_files[to_preservef]}")" + + if [[ -e "${stored_file}" ]]; then + rm -rf "${destination_file}" + mkdir -p "${location_path}" + mv "${stored_file}" "${destination_file}" + fi + done + rm -rf "${TMP_NVCHAD}" + fi +} _skip_ahead() { - amount=$1 - skip=$((skip + amount)) + amount=$1 + skip=$((skip + amount)) +} + +_reorder_array() { + local arr=("$@") + + for i in "${!arr[@]}"; do + new_array+=("${arr[i]}") + done + arr=("${new_array[@]}") + unset new_array + + echo "${arr[@]}" } _parse_args() { - local func_args=$1 - local argv=("$@") + local func_args=$1 + local argv=("$@") - unset 'argv[0]' # becuase arg1 is $func_arg - for i in "${!argv[@]}"; do new_array+=( "${argv[i]}" ); done - argv=("${new_array[@]}") - unset new_array + unset 'argv[0]' # becuase arg1 is $func_arg + for i in "${!argv[@]}"; do new_array+=("${argv[i]}"); done + argv=("${new_array[@]}") + unset new_array local argc=${#argv[@]} @@ -116,14 +239,14 @@ _parse_args() { skip=$((skip + amount)) } - _clean_arg() { - arg=$1 - if [[ "$arg" == "--"* ]]; then - echo "${arg:2}" - elif [[ "$arg" == "-"* ]]; then - echo "${arg:1}" - fi - } + _clean_arg() { + arg=$1 + if [[ "$arg" == "--"* ]]; then + echo "${arg:2}" + elif [[ "$arg" == "-"* ]]; then + echo "${arg:1}" + fi + } for j in "${!argv[@]}"; do if [[ ${skip} -gt 0 ]]; then @@ -146,14 +269,14 @@ _parse_args() { esac ;; -*) - if [[ ${#argv[j]} -le 2 ]]; then - eval "${func_args}" "${argv[j]}" "$j" - else - tangled_args=$(_clean_arg "${argv[j]}") - for ((k = 0; k < ${#tangled_args}; k++)); do - eval "${func_args}" "-${tangled_args:$k:1}" "$j" - done - fi + if [[ ${#argv[j]} -le 2 ]]; then + eval "${func_args}" "${argv[j]}" "$j" + else + tangled_args=$(_clean_arg "${argv[j]}") + for ((k = 0; k < ${#tangled_args}; k++)); do + eval "${func_args}" "-${tangled_args:$k:1}" "$j" + done + fi ;; *) eval "${func_args}" "${argv[j]}" "$j" @@ -165,19 +288,37 @@ _parse_args() { main() { local argvs=("$@") local argc=${#argvs[@]} + local counter=0 + + _set_params() { + argc=${#argvs[@]} + counter=0 + } + + _free_arg() { + local index=$1 + unset 'argvs[index-counter]' + argvs=($(_reorder_array "${argvs[@]}")) + ((counter++)) + } assert_aditional_args() { - var=$1 # flag + var=$1 # flag index=$2 # flag's index case ${var} in - -p=* | --path=*) - nvchad_path="${var#*=}" - ;; + -p=* | --path=*) + nvchad_path="${var#*=}" + _free_arg "${index}" + ;; + -s | --skip-startup) + do_startup="false" + _free_arg "${index}" + ;; esac } assert_args() { - var=$1 # flag + var=$1 # flag index=$2 # flag's index case ${var} in -h | --help) @@ -185,24 +326,30 @@ main() { ;; -i | --install) prompt -i "Installing NvChad..." - _install + _install ;; -r | --remove) prompt -i "Removing NvChad..." - _remove + _remove ;; -u | --update) prompt -i "Updating NvChad..." + _update + ;; + -c | --clean-backups) + prompt -i "Cleaning NvChad backups..." + _clean_backups ;; - -p=* | --path=*) ;; *) - prompt -w "Warning: unknown command '${var}'" + prompt -w "Warning: --unknown command '${var}'" ;; esac } - _parse_args "assert_aditional_args" "${argvs[@]}" - _parse_args "assert_args" "${argvs[@]}" + _set_params + _parse_args "assert_aditional_args" "${argvs[@]}" + _set_params + _parse_args "assert_args" "${argvs[@]}" } init() { From 9e7bec1198ab331ec2e8023b1f6f0c97294f1b75 Mon Sep 17 00:00:00 2001 From: Pocco81 Date: Wed, 4 Aug 2021 17:19:38 -0500 Subject: [PATCH 0500/1541] changed nvchad_path --- install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 3979030..4fdd3fd 100755 --- a/install.sh +++ b/install.sh @@ -11,8 +11,7 @@ BACKUP_PATH="/tmp/nvchad/" TMP_NVCHAD="/tmp/nvchad_updates/" skip=0 -# nvchad_path="$HOME/.config/nvim/" -nvchad_path="/tmp/test_chad/" +nvchad_path="$HOME/.config/nvim/" do_startup="true" dependencies=( "git" @@ -360,4 +359,4 @@ init() { fi } -init "${@}" \ No newline at end of file +init "${@}" From ef16aa7f1cb1507a9b08627a2d65741725690188 Mon Sep 17 00:00:00 2001 From: Pocco81 <58336662+Pocco81@users.noreply.github.com> Date: Thu, 5 Aug 2021 21:31:49 -0500 Subject: [PATCH 0501/1541] replaced 'bin/bash' with 'usr/bin/env bash' for better compatibility (#216) --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 4fdd3fd..5cc3af5 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash RED='\033[0;31m' GREEN='\033[0;32m' @@ -256,7 +256,7 @@ _parse_args() { fi case ${argv[j]} in - --*) # End of all options. + --*) # End of all opt case ${argv[j]} in --) # End of all options. break From 232bb5fd7c8082cc3cf654a441408d2c5d5b3ee2 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 6 Aug 2021 21:25:24 +0530 Subject: [PATCH 0502/1541] add tokyonight theme (#215) --- lua/highlights.lua | 1 + lua/themes/tokyonight.lua | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 lua/themes/tokyonight.lua diff --git a/lua/highlights.lua b/lua/highlights.lua index f47ea78..b6f891d 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -46,6 +46,7 @@ fg("Comment", grey_fg) fg("NvimInternalError", red) fg("VertSplit", line) fg("EndOfBuffer", black) +--fg_bg("Visual",light_grey, colors.lightbg) -- Pmenu bg("Pmenu", one_bg) diff --git a/lua/themes/tokyonight.lua b/lua/themes/tokyonight.lua new file mode 100644 index 0000000..67e635e --- /dev/null +++ b/lua/themes/tokyonight.lua @@ -0,0 +1,33 @@ +local colors = { + white = "#c0caf5", + darker_black = "#151621", + black = "#171823", -- nvim bg + black2 = "#20212c", + one_bg = "#242530", + one_bg2 = "#292a35", + one_bg3 = "#353b45", + grey = "#40486a", + grey_fg = "#4a5274", + grey_fg2 = "#4f5779", + light_grey = "#545c7e", + red = "#f7768e", + baby_pink = "#DE8C92", + pink = "#ff75a0", + line = "#242530", -- for lines like vertsplit + green = "#9ece6a", + vibrant_green = "#73daca", + nord_blue = "#80a8fd", + blue = "#7aa2f7", + yellow = "#e7c787", + sun = "#EBCB8B", + purple = "#bb9af7", + dark_purple = "#9d7cd8", + teal = "#0db9d7", + orange = "#ff9e64", + cyan = "#7dcfff", + statusline_bg = "#1d1e29", + lightbg = "#252631", + lightbg2 = "#22232e" +} + +return colors From d4193727bd474d4454fa8fdec6764bf2064aaf5b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 7 Aug 2021 11:25:23 +0530 Subject: [PATCH 0503/1541] add lsp-signature.nvim (#142) --- lua/highlights.lua | 5 ++--- lua/pluginList.lua | 12 ++++++++++-- lua/plugins/others.lua | 26 ++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/lua/highlights.lua b/lua/highlights.lua index b6f891d..44a6d5b 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -112,9 +112,8 @@ fg("DashboardFooter", grey_fg) -- packer's floating window -bg("NormalFloat", black2) -bg("FloatBorder", black2) -fg("FloatBorder", black2) +bg("NormalFloat", "NONE") +fg("FloatBorder", blue) -- set bg color for nvim -- bg("Normal", black) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index cfac9e6..168d9d4 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -57,7 +57,7 @@ return packer.startup( end } - -- language related plugins + -- lsp stuff use { "nvim-treesitter/nvim-treesitter", event = "BufRead", @@ -68,7 +68,7 @@ return packer.startup( use { "kabouzeid/nvim-lspinstall", - event = "BufEnter" + event = "BufRead" } use { @@ -87,6 +87,14 @@ return packer.startup( end } + use { + after = "nvim-lspconfig", + "ray-x/lsp_signature.nvim", + config = function() + require("plugins.others").signature() + end + } + -- load compe in insert mode only use { "hrsh7th/nvim-compe", diff --git a/lua/plugins/others.lua b/lua/plugins/others.lua index 0a060a6..b3c1032 100644 --- a/lua/plugins/others.lua +++ b/lua/plugins/others.lua @@ -46,4 +46,30 @@ M.blankline = function() vim.g.indent_blankline_show_first_indent_level = false end +M.signature = function() + local present, lspsignature = pcall(require, "lsp_signature") + if present then + lspsignature.setup( + { + bind = true, + doc_lines = 2, + floating_window = true, + fix_pos = true, + hint_enable = true, + hint_prefix = " ", + hint_scheme = "String", + use_lspsaga = false, + hi_parameter = "Search", + max_height = 22, + max_width = 120, -- max_width of signature floating_window, line will be wrapped if exceed max_width + handler_opts = { + border = "single" -- double, single, shadow, none + }, + zindex = 200, -- by default it will be on top of all floating windows, set to 50 send it to bottom + padding = "", -- character to pad on left and right of signature can be ' ', or '|' etc + } + ) + end +end + return M From d390966b4d8dbde781d0e851e717c564042a8313 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 7 Aug 2021 11:42:56 +0530 Subject: [PATCH 0504/1541] disable indentline in packer float window --- lua/plugins/others.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/others.lua b/lua/plugins/others.lua index b3c1032..761b0ff 100644 --- a/lua/plugins/others.lua +++ b/lua/plugins/others.lua @@ -39,7 +39,7 @@ M.blankline = function() vim.g.indentLine_enabled = 1 vim.g.indent_blankline_char = "▏" - vim.g.indent_blankline_filetype_exclude = {"help", "terminal", "dashboard"} + vim.g.indent_blankline_filetype_exclude = {"help", "terminal", "dashboard", "packer"} vim.g.indent_blankline_buftype_exclude = {"terminal"} vim.g.indent_blankline_show_trailing_blankline_indent = false @@ -66,7 +66,7 @@ M.signature = function() border = "single" -- double, single, shadow, none }, zindex = 200, -- by default it will be on top of all floating windows, set to 50 send it to bottom - padding = "", -- character to pad on left and right of signature can be ' ', or '|' etc + padding = "" -- character to pad on left and right of signature can be ' ', or '|' etc } ) end From ea992308f1221e07f3ae0fe417bed37d351a0634 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 7 Aug 2021 11:48:13 +0530 Subject: [PATCH 0505/1541] disable tilde on end of buffer --- lua/options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/options.lua b/lua/options.lua index e3e9697..50d63ba 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -20,7 +20,7 @@ opt.clipboard = "unnamedplus" opt.shortmess:append("sI") -- disable tilde on end of buffer: https://github.com/ neovim/neovim/pull/8546#issuecomment-643643758 -vim.cmd("let &fcs='eob: '") +opt.fillchars = {eob = " "} -- Numbers opt.number = true From 2795ed4fb379e2cf49821f2adabf09716dcd0076 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Sat, 7 Aug 2021 15:24:31 +0530 Subject: [PATCH 0506/1541] Added .gitignore and lazy load lsp_signature more (#218) --- .gitignore | 1 + lua/pluginList.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8cb205e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +plugin diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 168d9d4..6704364 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -88,8 +88,8 @@ return packer.startup( } use { - after = "nvim-lspconfig", "ray-x/lsp_signature.nvim", + event = "InsertEnter", config = function() require("plugins.others").signature() end From b16e2bf29cb50de08cf626cefdcc61c067cc5799 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 7 Aug 2021 15:33:10 +0530 Subject: [PATCH 0507/1541] load signature.nvim after lspconfig only https://github.com/siduck76/NvChad/pull/218#issuecomment-894633359 --- lua/pluginList.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 6704364..3701f1e 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -89,7 +89,7 @@ return packer.startup( use { "ray-x/lsp_signature.nvim", - event = "InsertEnter", + after = "nvim-lspconfig", config = function() require("plugins.others").signature() end From 98e2957234c8c5c06d7707c86d32bd0c67129856 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 7 Aug 2021 20:30:17 +0530 Subject: [PATCH 0509/1541] add mountaineer theme --- lua/themes/mountaineer.lua | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 lua/themes/mountaineer.lua diff --git a/lua/themes/mountaineer.lua b/lua/themes/mountaineer.lua new file mode 100644 index 0000000..29268f1 --- /dev/null +++ b/lua/themes/mountaineer.lua @@ -0,0 +1,33 @@ +local colors = { + white = "#b0b0b0", + darker_black = "#171d23", + black = "#1a2026", -- nvim bg + black2 = "#20262c", + one_bg = "#242a30", + one_bg2 = "#292f35", + one_bg3 = "#2e343a", + grey = "#42484e", + grey_fg = "#474d53", + grey_fg2 = "#50565c", + light_grey = "#565c62", + red = "#ac8a8c", + baby_pink = "#de878f", + pink = "#e89199", + line = "#2d3339", -- for lines like vertsplit + green = "#8aac8b", + vibrant_green = "#9ec49f", + blue = "#6b8bab", + nord_blue = "#7797b7", + yellow = "#c4c19e", + sun = "#aca98a", + purple = "#a39ec4", + dark_purple = "#8f8aac", + teal = "#7c9cbc", + orange = "#e39a83", + cyan = "#9aafe6", + statusline_bg = "#1e242a", + lightbg = "#2d3339", + lightbg2 = "#252b31" +} + +return colors From 62841e3dc2db991da96a541fcd3509cab31d66d2 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 8 Aug 2021 09:33:57 +0530 Subject: [PATCH 0510/1541] update discord server invite link the previous one expired after 7 days --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 542c7cc..af39975 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ src="https://img.shields.io/github/license/siduck76/NvChad?style=flat-square&logo=GNU&label=License" alt="License" /> -[![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/5Stgvfww) +[![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/gADmkJb9Fb) [![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.5+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white)](https://github.com/neovim/neovim) [![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square&label=Issues&color=fc0330)](https://github.com/siduck76/NvChad/issues) [![Last Commit](https://img.shields.io/github/last-commit/siduck76/NvChad.svg?style=flat-square&label=Last%20Commit&color=58eb34)](https://github.com/siduck76/NvChad/pulse) From f22366eac9adf38be1411ee3cb5a0a663a646a70 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 9 Aug 2021 21:30:17 +0530 Subject: [PATCH 0511/1541] truezen.nvim : update var --- lua/plugins/zenmode.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/zenmode.lua b/lua/plugins/zenmode.lua index 40d01c0..3990559 100644 --- a/lua/plugins/zenmode.lua +++ b/lua/plugins/zenmode.lua @@ -29,7 +29,7 @@ true_zen.setup( top_padding = 1, bottom_padding = 1, ideal_writing_area_width = {0}, - just_do_it_for_me = true, + auto_padding = true, keep_default_fold_fillchars = true, custome_bg = "", bg_configuration = true, From 0423da189cd2a4f5ab3832c4277a56a7346da945 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 10 Aug 2021 16:49:18 +0530 Subject: [PATCH 0512/1541] base16: Change syntax for new changes in base16 repo (#226) --- lua/telescope/_extensions/themes.lua | 2 +- lua/theme.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/telescope/_extensions/themes.lua b/lua/telescope/_extensions/themes.lua index 2f0e4d6..8957aa9 100644 --- a/lua/telescope/_extensions/themes.lua +++ b/lua/telescope/_extensions/themes.lua @@ -24,7 +24,7 @@ M.reload_theme = function(theme_name) print("Error: Cannot load base16 plugin!") return false end - base16(base16.themes[theme_name], true) + base16(base16.themes(theme_name), true) if not reload_plugin { diff --git a/lua/theme.lua b/lua/theme.lua index 236f379..2de9294 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -4,7 +4,7 @@ vim.g.nvchad_theme = chad_theme local present, base16 = pcall(require, "base16") if present then - base16(base16.themes[chad_theme], true) + base16(base16.themes(chad_theme), true) require "highlights" return true else From ae30324ed4edf8079208b234e35a6383f96080d5 Mon Sep 17 00:00:00 2001 From: Iorvethe <58810330+Iorvethe@users.noreply.github.com> Date: Tue, 10 Aug 2021 14:19:33 +0300 Subject: [PATCH 0513/1541] Add theme: Dracula (#225) * Add theme: Dracula * Dracula theme: make black2 lighter --- lua/themes/dracula.lua | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 lua/themes/dracula.lua diff --git a/lua/themes/dracula.lua b/lua/themes/dracula.lua new file mode 100644 index 0000000..30008a5 --- /dev/null +++ b/lua/themes/dracula.lua @@ -0,0 +1,33 @@ +local colors = { + white = "#F8F8F2", + darker_black = "#1E2029", + black = "#282A36", -- nvim bg + black2 = "#303341", + one_bg = "#373844", -- real bg of onedark + one_bg2 = "#44475a", + one_bg3 = "#565761", + grey = "#6272a4", + grey_fg = "#b6b6b2", + grey_fg2 = "#ccccc7", + light_grey = "#f8f8f2", + red = "#FF5555", + baby_pink = "#DE8C92", + pink = "#FF79C6", + line = "#373844", -- for lines like vertsplit + green = "#50FA7B", + vibrant_green = "#69FF94", + nord_blue = "#D6ACFF", + blue = "#BD93F9", + yellow = "#F1FA8C", + sun = "#FFFFA5", + purple = "#BD93F9", + dark_purple = "#BD93F9", + teal = "#0088cc", + orange = "#FFB86C", + cyan = "#8BE9FD", + statusline_bg = "#373844", + lightbg = "#44475a", + lightbg2 = "#565761" +} + +return colors From d5c64d335ea4eafa1f7b39ca073a24254c405c4c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 10 Aug 2021 20:09:55 +0530 Subject: [PATCH 0514/1541] add chadracula theme --- lua/themes/{dracula.lua => chadracula.lua} | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename lua/themes/{dracula.lua => chadracula.lua} (70%) diff --git a/lua/themes/dracula.lua b/lua/themes/chadracula.lua similarity index 70% rename from lua/themes/dracula.lua rename to lua/themes/chadracula.lua index 30008a5..8a01a59 100644 --- a/lua/themes/dracula.lua +++ b/lua/themes/chadracula.lua @@ -1,22 +1,22 @@ local colors = { white = "#F8F8F2", - darker_black = "#1E2029", + darker_black = "#232531", black = "#282A36", -- nvim bg black2 = "#303341", one_bg = "#373844", -- real bg of onedark one_bg2 = "#44475a", one_bg3 = "#565761", - grey = "#6272a4", - grey_fg = "#b6b6b2", - grey_fg2 = "#ccccc7", - light_grey = "#f8f8f2", + grey = "#41434f", + grey_fg = "#5a5c68", + grey_fg2 = "#5a5c68", + light_grey = "#636571", red = "#FF5555", baby_pink = "#DE8C92", pink = "#FF79C6", line = "#373844", -- for lines like vertsplit green = "#50FA7B", vibrant_green = "#69FF94", - nord_blue = "#D6ACFF", + nord_blue = "#b389ef", blue = "#BD93F9", yellow = "#F1FA8C", sun = "#FFFFA5", @@ -25,9 +25,9 @@ local colors = { teal = "#0088cc", orange = "#FFB86C", cyan = "#8BE9FD", - statusline_bg = "#373844", - lightbg = "#44475a", - lightbg2 = "#565761" + statusline_bg = "#2b2d39", + lightbg = "#343642", + lightbg2 = "#2f313d" } return colors From 0efa21c9c987c10ef9ccb572ab268d85d308060b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 12 Aug 2021 17:28:03 +0530 Subject: [PATCH 0515/1541] add user_config --- install.sh | 2 +- lua/chadrc.lua | 100 +++++++++++++++++++++++++++++++++ lua/highlights.lua | 2 +- lua/mappings.lua | 131 +++++++++++++++++++++++++++----------------- lua/options.lua | 35 ++++++------ lua/packerInit.lua | 14 +++-- lua/pluginList.lua | 42 +++++++++++++- lua/theme.lua | 2 +- lua/user_config.lua | 7 --- lua/utils.lua | 2 +- 10 files changed, 253 insertions(+), 84 deletions(-) create mode 100644 lua/chadrc.lua delete mode 100644 lua/user_config.lua diff --git a/install.sh b/install.sh index 5cc3af5..1558e59 100755 --- a/install.sh +++ b/install.sh @@ -18,7 +18,7 @@ dependencies=( ) preserved_files=( "lua/mappings.lua" - "lua/user_config.lua" + "lua/chadrc.lua" ) # https://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux diff --git a/lua/chadrc.lua b/lua/chadrc.lua new file mode 100644 index 0000000..e006e11 --- /dev/null +++ b/lua/chadrc.lua @@ -0,0 +1,100 @@ +local M = { + ui = { + theme = "onedark" + }, + options = { + permanent_undo = true, + ruler = false, + hidden = true, + ignorecase = true, + mouse = "a", + cmdheight = 1, + updatetime = 250, + timeoutlen = 400, + clipboard = "unnamedplus", + number = true, + numberwidth = 2, + expandtab = true, + shiftwidth = 2, + smartindent = true, + mapleader = " ", + autosave = false + }, + -- enable / disable plugins (true for disable) + plugin_status = { + better_esc = false, + nvim_bufferline = false, + galaxyline = false, + nvim_colorizer = false, + lspkind = false, + lspsignature = false, + neoformat = false, + gitsigns = false, + vim_matchup = false, + dashboard_nvim = false, + autosave_nvim = false, + truezen_nvim = false, + blankline = false, + vim_fugitive = false, + nvim_comment = false, + neoscroll_nvim = false + }, + -- make sure you dont use same keys twice + mappings = { + truezen = { + ataraxisMode = "zz", + minimalisticmode = "zm", + focusmode = "zf" + }, + comment_nvim = { + comment_toggle = "/" + }, + nvimtree = { + treetoggle = "" + }, + neoformat = { + format = "fm" + }, + dashboard = { + open = "db", + newfile = "fn", + bookmarks = "bm", + sessionload = "l", + sessionsave = "s" + }, + telescope = { + live_grep = "fw", + git_status = "gt", + git_commits = "cm", + find_files = "ff", + media_files = "fp", + buffers = "fb", + help_tags = "fh", + oldfiles = "fo", + themes = "th" + }, + bufferline = { + new_buffer = "", + newtab = "b", + close = "", + cycleNext = "", + cyclePrev = "" + }, + fugitive = { + Git = "gs", + diffget_2 = "gh", + diffget_3 = "gl", + git_blame = "gb" + }, + misc = { + openTerm_right = "", + openTerm_bottom = "", + openTerm_currentBuf = "t", + copywhole_file = "", + toggle_linenr = "n", + esc_Termmode = "jk" + } + } +} + +return M diff --git a/lua/highlights.lua b/lua/highlights.lua index 44a6d5b..dfea700 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -76,7 +76,7 @@ fg("NvimTreeVertSplit", darker_black) bg("NvimTreeVertSplit", darker_black) fg("NvimTreeEndOfBuffer", darker_black) -vim.cmd("hi NvimTreeRootFolder gui=underline guifg=" .. purple) +cmd("hi NvimTreeRootFolder gui=underline guifg=" .. purple) bg("NvimTreeNormal", darker_black) fg_bg("NvimTreeStatuslineNc", darker_black, darker_black) fg_bg("NvimTreeWindowPicker", red, black2) diff --git a/lua/mappings.lua b/lua/mappings.lua index 5562bb5..b1f16c9 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -1,3 +1,9 @@ +local user_map = require("chadrc").mappings +local miscMap = user_map.misc + +local M = {} +local cmd = vim.cmd + local function map(mode, lhs, rhs, opts) local options = {noremap = true, silent = true} if opts then @@ -30,26 +36,31 @@ map("", "", 'v:count ? "j" : "gj"', {expr = true}) map("", "", 'v:count ? "k" : "gk"', {expr = true}) -- OPEN TERMINALS -- -map("n", "", ":vnew +terminal | setlocal nobuflisted ", opt) -- term over right -map("n", "", ":10new +terminal | setlocal nobuflisted ", opt) -- term bottom -map("n", "t", ":terminal ", opt) -- term buffer +map("n", miscMap.openTerm_right, ":vnew +terminal | setlocal nobuflisted ", opt) -- term over right +map("n", miscMap.openTerm_bottom, ":10new +terminal | setlocal nobuflisted ", opt) -- term bottom +map("n", miscMap.openTerm_currentBuf, ":terminal ", opt) -- term buffer -- copy whole file content -map("n", "", ":%y+", opt) +map("n", miscMap.copywhole_file, ":%y+", opt) -- toggle numbers -map("n", "n", ":set nu!", opt) +map("n", miscMap.toggle_linenr, ":set nu!", opt) --- Truezen.nvim -map("n", "zz", ":TZAtaraxis", opt) -map("n", "zm", ":TZMinimalist", opt) -map("n", "zf", ":TZFocus", opt) +M.truezen = function() + local m = user_map.truezen + + map("n", m.ataraxisMode, ":TZAtaraxis", opt) + map("n", m.minimalisticmode, ":TZMinimalist", opt) + map("n", m.focusmode, ":TZFocus", opt) +end map("n", "", ":w ", opt) --- Commenter Keybinding -map("n", "/", ":CommentToggle", opt) -map("v", "/", ":CommentToggle", opt) +M.comment_nvim = function() + local m = user_map.comment_nvim.comment_toggle + map("n", m, ":CommentToggle", opt) + map("v", m, ":CommentToggle", opt) +end -- compe stuff local t = function(str) @@ -112,54 +123,74 @@ map("i", "", "v:lua.s_tab_complete()", {expr = true}) map("s", "", "v:lua.s_tab_complete()", {expr = true}) map("i", "", "v:lua.completions()", {expr = true}) --- nvimtree -map("n", "", ":NvimTreeToggle", opt) +M.nvimtree = function() + local m = user_map.nvimtree.treetoggle --- format code -map("n", "fm", ":Neoformat", opt) + map("n", m, ":NvimTreeToggle", opt) +end --- dashboard stuff -map("n", "db", ":Dashboard", opt) -map("n", "fn", ":DashboardNewFile", opt) -map("n", "bm", ":DashboardJumpMarks", opt) -map("n", "l", ":SessionLoad", opt) -map("n", "s", ":SessionSave", opt) +M.neoformat = function() + local m = user_map.neoformat.format + map("n", m, ":Neoformat", opt) +end --- Telescope -map("n", "fw", ":Telescope live_grep", opt) -map("n", "gt", ":Telescope git_status ", opt) -map("n", "cm", ":Telescope git_commits ", opt) -map("n", "ff", ":Telescope find_files ", opt) -map("n", "fp", ":Telescope media_files ", opt) -map("n", "fb", ":Telescope buffers", opt) -map("n", "fh", ":Telescope help_tags", opt) -map("n", "fo", ":Telescope oldfiles", opt) -map("n", "th", ":Telescope themes", opt) +M.dashboard = function() + local m = user_map.dashboard --- bufferline tab stuff -map("n", "", ":enew", opt) -- new buffer -map("n", "b", ":tabnew", opt) -- new tab -map("n", "", ":bd!", opt) -- close tab + map("n", m.open, ":Dashboard", opt) + map("n", m.newfile, ":DashboardNewFile", opt) + map("n", m.bookmarks, ":DashboardJumpMarks", opt) + map("n", m.sessionload, ":SessionLoad", opt) + map("n", m.sessionsave, ":SessionSave", opt) +end --- move between tabs -map("n", "", ":BufferLineCycleNext", opt) -map("n", "", ":BufferLineCyclePrev", opt) +M.telescope = function() + local m = user_map.telescope + + map("n", m.live_grep, ":Telescope live_grep", opt) + map("n", m.git_status, ":Telescope git_status ", opt) + map("n", m.git_commits, ":Telescope git_commits ", opt) + map("n", m.find_files, ":Telescope find_files ", opt) + map("n", m.media_files, ":Telescope media_files ", opt) + map("n", m.buffers, ":Telescope buffers", opt) + map("n", m.help_tags, ":Telescope help_tags", opt) + map("n", m.oldfiles, ":Telescope oldfiles", opt) + map("n", m.themes, ":Telescope themes", opt) +end + +M.bufferline = function() + local m = user_map.bufferline + + map("n", m.new_buffer, ":enew", opt) -- new buffer + map("n", m.newtab, ":tabnew", opt) -- new tab + map("n", m.close, ":bd!", opt) -- close buffer + + -- move between tabs + + map("n", m.cycleNext, ":BufferLineCycleNext", opt) + map("n", m.cyclePrev, ":BufferLineCyclePrev", opt) +end -- use ESC to turn off search highlighting map("n", "", ":noh", opt) -- get out of terminal with jk -map("t", "jk", "", opt) +map("t", miscMap.esc_Termmode, "", opt) -- Packer commands till because we are not loading it at startup -vim.cmd("silent! command PackerCompile lua require 'pluginList' require('packer').compile()") -vim.cmd("silent! command PackerInstall lua require 'pluginList' require('packer').install()") -vim.cmd("silent! command PackerStatus lua require 'pluginList' require('packer').status()") -vim.cmd("silent! command PackerSync lua require 'pluginList' require('packer').sync()") -vim.cmd("silent! command PackerUpdate lua require 'pluginList' require('packer').update()") +cmd("silent! command PackerCompile lua require 'pluginList' require('packer').compile()") +cmd("silent! command PackerInstall lua require 'pluginList' require('packer').install()") +cmd("silent! command PackerStatus lua require 'pluginList' require('packer').status()") +cmd("silent! command PackerSync lua require 'pluginList' require('packer').sync()") +cmd("silent! command PackerUpdate lua require 'pluginList' require('packer').update()") --- Vim Fugitive -map("n", "gs", ":Git", opt) -map("n", "gh", ":diffget //2", opt) -map("n", "gl", ":diffget //3", opt) -map("n", "gb", ":Git blame", opt) +M.fugitive = function() + local m = user_map.fugitive + + map("n", m.Git, ":Git", opt) + map("n", m.diffget_2, ":diffget //2", opt) + map("n", m.diffget_3, ":diffget //3", opt) + map("n", m.git_blame, ":Git blame", opt) +end + +return M diff --git a/lua/options.lua b/lua/options.lua index 50d63ba..15abb39 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -1,20 +1,21 @@ +local options = require("chadrc").options local opt = vim.opt local g = vim.g -opt.undofile = true -opt.ruler = false -opt.hidden = true -opt.ignorecase = true +opt.undofile = options.permanent_undo +opt.ruler = options.ruler +opt.hidden = options.hidden +opt.ignorecase = options.ignorecase opt.splitbelow = true opt.splitright = true opt.termguicolors = true opt.cul = true -opt.mouse = "a" +opt.mouse = options.mouse opt.signcolumn = "yes" -opt.cmdheight = 1 -opt.updatetime = 250 -- update interval for gitsigns -opt.timeoutlen = 400 -opt.clipboard = "unnamedplus" +opt.cmdheight = options.cmdheight +opt.updatetime = options.updatetime -- update interval for gitsigns +opt.timeoutlen = options.timeoutlen +opt.clipboard = options.clipboard -- disable nvim intro opt.shortmess:append("sI") @@ -23,21 +24,21 @@ opt.shortmess:append("sI") opt.fillchars = {eob = " "} -- Numbers -opt.number = true -opt.numberwidth = 2 +opt.number = options.number +opt.numberwidth = options.numberwidth -- opt.relativenumber = true -- Indenline -opt.expandtab = true -opt.shiftwidth = 2 -opt.smartindent = true +opt.expandtab = options.expandtab +opt.shiftwidth = options.shiftwidth +opt.smartindent = options.smartindent -- go to previous/next line with h,l,left arrow and right arrow -- when cursor reaches end/beginning of line opt.whichwrap:append("<>hl") -g.mapleader = " " -g.auto_save = false +g.mapleader = options.mapleader +g.auto_save = options.autosave -- disable builtin vim plugins local disabled_built_ins = { @@ -62,7 +63,7 @@ local disabled_built_ins = { } for _, plugin in pairs(disabled_built_ins) do - vim.g["loaded_" .. plugin] = 1 + g["loaded_" .. plugin] = 1 end -- Don't show status line on vim terminals diff --git a/lua/packerInit.lua b/lua/packerInit.lua index aa9101a..73975bb 100644 --- a/lua/packerInit.lua +++ b/lua/packerInit.lua @@ -1,4 +1,6 @@ -vim.cmd("packadd packer.nvim") +local cmd = vim.cmd + +cmd("packadd packer.nvim") local present, packer = pcall(require, "packer") @@ -19,7 +21,7 @@ if not present then } ) - vim.cmd("packadd packer.nvim") + cmd("packadd packer.nvim") present, packer = pcall(require, "packer") if present then @@ -33,9 +35,13 @@ return packer.init { display = { open_fn = function() return require("packer.util").float {border = "single"} - end + end, + prompt_border = "single" }, git = { clone_timeout = 600 -- Timeout, in seconds, for git clones - } + }, + auto_clean = true, + compile_on_sync = true + -- auto_reload_compiled = true } diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 3701f1e..bf7c76b 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -1,3 +1,5 @@ +local plugin_status = require("chadrc").plugin_status + local present, _ = pcall(require, "packerInit") local packer @@ -18,6 +20,7 @@ return packer.startup( use { "jdhao/better-escape.vim", + disable = plugin_status.better_esc, event = "InsertEnter", config = function() require "plugins.others".escape() @@ -26,14 +29,19 @@ return packer.startup( use { "akinsho/nvim-bufferline.lua", + disable = plugin_status.nvim_bufferline, after = "nvim-base16.lua", config = function() require "plugins.bufferline" + end, + setup = function() + require "mappings".bufferline() end } use { "glepnir/galaxyline.nvim", + disable = plugin_status.galaxyline, after = "nvim-base16.lua", config = function() require "plugins.statusline" @@ -51,6 +59,7 @@ return packer.startup( use { "norcalli/nvim-colorizer.lua", + disable = plugin_status.nvim_colorizer, event = "BufRead", config = function() require("plugins.others").colorizer() @@ -81,6 +90,7 @@ return packer.startup( use { "onsails/lspkind-nvim", + disable = plugin_status.lspkind, event = "BufEnter", config = function() require("plugins.others").lspkind() @@ -89,6 +99,7 @@ return packer.startup( use { "ray-x/lsp_signature.nvim", + disable = plugin_status.lspsignature, after = "nvim-lspconfig", config = function() require("plugins.others").signature() @@ -121,7 +132,11 @@ return packer.startup( use { "sbdchd/neoformat", - cmd = "Neoformat" + disable = plugin_status.neoformat, + cmd = "Neoformat", + setup = function() + require "mappings".neoformat() + end } -- file managing , picker etc @@ -130,6 +145,9 @@ return packer.startup( cmd = "NvimTreeToggle", config = function() require "plugins.nvimtree" + end, + setup = function() + require "mappings".nvimtree() end } @@ -155,6 +173,9 @@ return packer.startup( cmd = "Telescope", config = function() require "plugins.telescope" + end, + setup = function() + require "mappings".telescope() end } @@ -171,6 +192,7 @@ return packer.startup( -- git stuff use { "lewis6991/gitsigns.nvim", + disable = plugin_status.gitsigns, after = "plenary.nvim", config = function() require "plugins.gitsigns" @@ -188,19 +210,23 @@ return packer.startup( use { "andymass/vim-matchup", + disable = plugin_status.vim_matchup, event = "CursorMoved" } use { "terrortylor/nvim-comment", + disable = plugin_status.nvim_comment, cmd = "CommentToggle", config = function() require("plugins.others").comment() + require "mappings".comment_nvim() end } use { "glepnir/dashboard-nvim", + disable = plugin_status.dashboard_nvim, cmd = { "Dashboard", "DashboardNewFile", @@ -210,11 +236,13 @@ return packer.startup( }, setup = function() require "plugins.dashboard" + require "mappings".dashboard() end } -- load autosave only if its globally enabled use { + disable = plugin_status.autosave_nvim, "Pocco81/AutoSave.nvim", config = function() require "plugins.autosave" @@ -227,6 +255,7 @@ return packer.startup( -- smooth scroll use { "karb94/neoscroll.nvim", + disable = plugin_status.neoscroll_nvim, event = "WinScrolled", config = function() require("plugins.others").neoscroll() @@ -235,6 +264,7 @@ return packer.startup( use { "Pocco81/TrueZen.nvim", + disable = plugin_status.truezen_nvim, cmd = { "TZAtaraxis", "TZMinimalist", @@ -242,6 +272,9 @@ return packer.startup( }, config = function() require "plugins.zenmode" + end, + setup = function() + require "mappings".truezen() end } @@ -249,6 +282,7 @@ return packer.startup( use { "lukas-reineke/indent-blankline.nvim", + disable = plugin_status.blankline, event = "BufRead", setup = function() require("plugins.others").blankline() @@ -257,9 +291,13 @@ return packer.startup( use { "tpope/vim-fugitive", + disable = plugin_status.vim_fugitive, cmd = { "Git" - } + }, + setup = function() + require "mappings".fugitive() + end } end ) diff --git a/lua/theme.lua b/lua/theme.lua index 2de9294..1e0d36b 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -1,4 +1,4 @@ -local chad_theme = require("user_config").ui.theme +local chad_theme = require("chadrc").ui.theme vim.g.nvchad_theme = chad_theme local present, base16 = pcall(require, "base16") diff --git a/lua/user_config.lua b/lua/user_config.lua deleted file mode 100644 index bd0f741..0000000 --- a/lua/user_config.lua +++ /dev/null @@ -1,7 +0,0 @@ -local M = { - ui = { - theme = "onedark" - } -} - -return M diff --git a/lua/utils.lua b/lua/utils.lua index 87e1e48..ced2dc7 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -84,7 +84,7 @@ M.change_theme = function(current_theme, new_theme) return end - local file = vim.fn.stdpath("config") .. "/lua/user_config.lua" + local file = vim.fn.stdpath("config") .. "/lua/chadrc.lua" -- store in data variable local data = assert(M.file("r", file)) local find = "theme = .?" .. current_theme .. ".?" From a21ef38dc54e0d93fea4a70b783b4c91054831fe Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 12 Aug 2021 18:37:02 +0530 Subject: [PATCH 0516/1541] fix comment toggle mapping (#233) --- lua/pluginList.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index bf7c76b..fca8e8c 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -220,6 +220,8 @@ return packer.startup( cmd = "CommentToggle", config = function() require("plugins.others").comment() + end, + setup = function() require "mappings".comment_nvim() end } From 0df87e4e729e62c1b5231825a7e1d23b3cbf6393 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 12 Aug 2021 22:23:43 +0530 Subject: [PATCH 0517/1541] fix telescope commands not working! (#230) --- lua/pluginList.lua | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index fca8e8c..773cf8d 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -171,6 +171,15 @@ return packer.startup( use { "nvim-telescope/telescope.nvim", cmd = "Telescope", + requires = { + { + "nvim-telescope/telescope-fzf-native.nvim", + run = "make" + }, + { + "nvim-telescope/telescope-media-files.nvim" + } + }, config = function() require "plugins.telescope" end, @@ -179,16 +188,6 @@ return packer.startup( end } - use { - "nvim-telescope/telescope-fzf-native.nvim", - run = "make", - cmd = "Telescope" - } - use { - "nvim-telescope/telescope-media-files.nvim", - cmd = "Telescope" - } - -- git stuff use { "lewis6991/gitsigns.nvim", From 2884254afec5036908252d2cb8d120e7c1904297 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 12 Aug 2021 23:10:00 +0530 Subject: [PATCH 0518/1541] add everforest theme (#219) --- lua/highlights.lua | 1 + lua/themes/everforest.lua | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 lua/themes/everforest.lua diff --git a/lua/highlights.lua b/lua/highlights.lua index dfea700..a9bd1bd 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -69,6 +69,7 @@ fg_bg("DiffModified", nord_blue, "none") -- NvimTree fg("NvimTreeFolderIcon", blue) fg("NvimTreeFolderName", blue) +fg("NvimTreeGitDirty", red) fg("NvimTreeOpenedFolderName", blue) fg("NvimTreeEmptyFolderName", blue) fg("NvimTreeIndentMarker", one_bg2) diff --git a/lua/themes/everforest.lua b/lua/themes/everforest.lua new file mode 100644 index 0000000..924cad7 --- /dev/null +++ b/lua/themes/everforest.lua @@ -0,0 +1,33 @@ +local colors = { + white = "#fff9e8", + darker_black = "#252d33", + black = "#2b3339", -- nvim bg + black2 = "#323a40", + one_bg = "#333b41", + one_bg2 = "#363e44", + one_bg3 = "#3a4248", + grey = "#4a5258", + grey_fg = "#50585e", + grey_fg2 = "#545c62", + light_grey = "#586066", + red = "#e67e80", + baby_pink = "#ce8196", + pink = "#ff75a0", + line = "#3a4248", -- for lines like vertsplit + green = "#83c092", + vibrant_green = "#a7c080", + nord_blue = "#78b4ac", + blue = "#7fbbb3", + yellow = "#dbbc7f", + sun = "#d1b171", + purple = "#b4bbc8", + dark_purple = "#d699b6", + teal = "#69a59d", + orange = "#e69875", + cyan = "#95d1c9", + statusline_bg = "#2e363c", + lightbg = "#3d454b", + lightbg2 = "#333b41" +} + +return colors From f884caa606dd7982b3c44b6c5556609930177fdb Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 12 Aug 2021 23:14:28 +0530 Subject: [PATCH 0519/1541] everforest theme : better dark color --- lua/themes/everforest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/themes/everforest.lua b/lua/themes/everforest.lua index 924cad7..1ae64c3 100644 --- a/lua/themes/everforest.lua +++ b/lua/themes/everforest.lua @@ -1,6 +1,6 @@ local colors = { white = "#fff9e8", - darker_black = "#252d33", + darker_black = "#272f35", black = "#2b3339", -- nvim bg black2 = "#323a40", one_bg = "#333b41", From f832195a8138793f823e9052ad1e9a9d3a466292 Mon Sep 17 00:00:00 2001 From: curtain <1410768946@qq.com> Date: Fri, 13 Aug 2021 12:35:31 +0800 Subject: [PATCH 0520/1541] fix luasnip complete and move it to reasonable place (#235) Co-authored-by: curtain --- lua/mappings.lua | 61 ----------------------------------------- lua/plugins/luasnip.lua | 61 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index b1f16c9..5cf0634 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -62,67 +62,6 @@ M.comment_nvim = function() map("v", m, ":CommentToggle", opt) end --- compe stuff -local t = function(str) - return vim.api.nvim_replace_termcodes(str, true, true, true) -end - -local check_back_space = function() - local col = vim.fn.col(".") - 1 - if col == 0 or vim.fn.getline("."):sub(col, col):match("%s") then - return true - else - return false - end -end - -_G.tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t "" - elseif check_back_space() then - return t "" - else - return vim.fn["compe#complete"]() - end -end - -_G.s_tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t "" - elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then - return t "(vsnip-jump-prev)" - else - return t "" - end -end - -function _G.completions() - local npairs - if - not pcall( - function() - npairs = require "nvim-autopairs" - end - ) - then - return - end - - if vim.fn.pumvisible() == 1 then - if vim.fn.complete_info()["selected"] ~= -1 then - return vim.fn["compe#confirm"]("") - end - end - return npairs.check_break_line_char() -end - --- compe mappings -map("i", "", "v:lua.tab_complete()", {expr = true}) -map("s", "", "v:lua.tab_complete()", {expr = true}) -map("i", "", "v:lua.s_tab_complete()", {expr = true}) -map("s", "", "v:lua.s_tab_complete()", {expr = true}) -map("i", "", "v:lua.completions()", {expr = true}) - M.nvimtree = function() local m = user_map.nvimtree.treetoggle diff --git a/lua/plugins/luasnip.lua b/lua/plugins/luasnip.lua index dc60d0a..bd7ee39 100644 --- a/lua/plugins/luasnip.lua +++ b/lua/plugins/luasnip.lua @@ -3,6 +3,67 @@ if not present then return end +local t = function(str) + return vim.api.nvim_replace_termcodes(str, true, true, true) +end + +local check_back_space = function() + local col = vim.fn.col('.') - 1 + if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then + return true + else + return false + end +end + +_G.tab_complete = function() + if vim.fn.pumvisible() == 1 then + return t "" + elseif luasnip and luasnip.expand_or_jumpable() then + return t "luasnip-expand-or-jump" + elseif check_back_space() then + return t "" + else + return vim.fn['compe#complete']() + end +end +_G.s_tab_complete = function() + if vim.fn.pumvisible() == 1 then + return t "" + elseif luasnip and luasnip.jumpable(-1) then + return t "luasnip-jump-prev" + else + return t "" + end +end + +_G.completions = function() + local npairs + if + not pcall( + function() + npairs = require "nvim-autopairs" + end + ) + then + return + end + + if vim.fn.pumvisible() == 1 then + if vim.fn.complete_info()["selected"] ~= -1 then + return vim.fn["compe#confirm"]("") + end + end + return npairs.check_break_line_char() +end + + +vim.api.nvim_set_keymap("i", "", "v:lua.tab_complete()", {expr = true}) +vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", {expr = true}) +vim.api.nvim_set_keymap("i", "", "v:lua.s_tab_complete()", {expr = true}) +vim.api.nvim_set_keymap("s", "", "v:lua.s_tab_complete()", {expr = true}) +vim.api.nvim_set_keymap("i", "", "v:lua.completions()", {expr = true}) + luasnip.config.set_config( { history = true, From c7fdd680729ced2a3805f9aacd8c9910a902de1d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 13 Aug 2021 12:12:43 +0530 Subject: [PATCH 0521/1541] statusline : add vimode colors --- lua/plugins/luasnip.lua | 7 ++-- lua/plugins/statusline.lua | 81 ++++++++++++++++++++++++-------------- lua/themes/norchad.lua | 4 +- 3 files changed, 56 insertions(+), 36 deletions(-) diff --git a/lua/plugins/luasnip.lua b/lua/plugins/luasnip.lua index bd7ee39..d15cd79 100644 --- a/lua/plugins/luasnip.lua +++ b/lua/plugins/luasnip.lua @@ -8,8 +8,8 @@ local t = function(str) end local check_back_space = function() - local col = vim.fn.col('.') - 1 - if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then + local col = vim.fn.col(".") - 1 + if col == 0 or vim.fn.getline("."):sub(col, col):match("%s") then return true else return false @@ -24,7 +24,7 @@ _G.tab_complete = function() elseif check_back_space() then return t "" else - return vim.fn['compe#complete']() + return vim.fn["compe#complete"]() end end _G.s_tab_complete = function() @@ -57,7 +57,6 @@ _G.completions = function() return npairs.check_break_line_char() end - vim.api.nvim_set_keymap("i", "", "v:lua.tab_complete()", {expr = true}) vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", {expr = true}) vim.api.nvim_set_keymap("i", "", "v:lua.s_tab_complete()", {expr = true}) diff --git a/lua/plugins/statusline.lua b/lua/plugins/statusline.lua index 07af61e..bbc49ae 100644 --- a/lua/plugins/statusline.lua +++ b/lua/plugins/statusline.lua @@ -8,6 +8,9 @@ local gls = gl.section gl.short_line_list = {" "} +local left_separator = "" -- or " " +local right_separator = " " -- or "" + local global_theme = "themes/" .. vim.g.nvchad_theme local colors = require(global_theme) @@ -26,7 +29,7 @@ gls.left[2] = { return "  " end, highlight = {colors.statusline_bg, colors.nord_blue}, - separator = " ", + separator = right_separator .. " ", separator_highlight = {colors.nord_blue, colors.lightbg} } } @@ -44,7 +47,7 @@ gls.left[4] = { provider = {"FileName"}, condition = condition.buffer_not_empty, highlight = {colors.white, colors.lightbg}, - separator = " ", + separator = right_separator, separator_highlight = {colors.lightbg, colors.lightbg2} } } @@ -56,7 +59,7 @@ gls.left[5] = { return "  " .. dir_name .. " " end, highlight = {colors.grey_fg2, colors.lightbg2}, - separator = " ", + separator = right_separator, separator_highlight = {colors.lightbg2, colors.statusline_bg} } } @@ -121,7 +124,7 @@ gls.right[1] = { for _, client in ipairs(clients) do local filetypes = client.config.filetypes if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then - return " " .. "  " .. " LSP " + return " " .. "  " .. " LSP" end end return "" @@ -153,53 +156,71 @@ gls.right[3] = { } } +local active_mode = { + n = {"Normal", colors.red}, + i = {"Insert", colors.dark_purple}, + c = {"Command", colors.pink}, + V = {"Visual", colors.cyan}, + [""] = {"Visual", colors.cyan}, + v = {"Visual", colors.cyan}, + R = {"Replace", colors.orange}, + t = {"Terminal", colors.green} +} + +local function mode(m) + local chad_mode = active_mode[vim.fn.mode()][m] + + if chad_mode == "nil" then + return active_mode[vim.fn.mode()]["t"] + else + return chad_mode + end +end + gls.right[4] = { - viMode_icon = { + left_round = { provider = function() - return " " + vim.cmd("hi Galaxyleft_round guifg=" .. mode(2)) + return left_separator end, - highlight = {colors.statusline_bg, colors.red}, - separator = " ", - separator_highlight = {colors.red, colors.statusline_bg} + separator = " ", + separator_highlight = {colors.statusline_bg, colors.statusline_bg}, + highlight = {"GalaxyViMode", colors.statusline_bg} } } gls.right[5] = { - ViMode = { + viMode_icon = { provider = function() - local alias = { - n = "Normal", - i = "Insert", - c = "Command", - V = "Visual", - [""] = "Visual", - v = "Visual", - R = "Replace" - } - local current_Mode = alias[vim.fn.mode()] - - if current_Mode == nil then - return " Terminal " - else - return " " .. current_Mode .. " " - end + vim.cmd("hi GalaxyviMode_icon guibg=" .. mode(2)) + return " " end, - highlight = {colors.red, colors.lightbg} + highlight = {colors.statusline_bg, colors.red} } } gls.right[6] = { - some_icon = { + ViMode = { + provider = function() + vim.cmd("hi GalaxyViMode guifg=" .. mode(2)) + return " " .. mode(1) .. " " + end, + highlight = {"GalaxyViMode", colors.lightbg} -- colors.red here will be overriden many times + } +} + +gls.right[7] = { + some_RoundIcon = { provider = function() return " " end, - separator = "", + separator = left_separator, separator_highlight = {colors.green, colors.lightbg}, highlight = {colors.lightbg, colors.green} } } -gls.right[7] = { +gls.right[8] = { line_percentage = { provider = function() local current_line = vim.fn.line(".") diff --git a/lua/themes/norchad.lua b/lua/themes/norchad.lua index 7f67627..f3e3e8d 100644 --- a/lua/themes/norchad.lua +++ b/lua/themes/norchad.lua @@ -12,7 +12,7 @@ local colors = { light_grey = "#646a76", red = "#BF616A", baby_pink = "#de878f", - pink = "#e89199", + pink = "#d57780", line = "#3a404c", -- for lines like vertsplit green = "#A3BE8C", vibrant_green = "#afca98", @@ -21,7 +21,7 @@ local colors = { yellow = "#EBCB8B", sun = "#e1c181", purple = "#aab1be", - dark_purple = "##B48EAD", + dark_purple = "#B48EAD", teal = "#6484a4", orange = "#e39a83", cyan = "#9aafe6", From 3f44f0761afa579152ba2fd9f2ca12f5cd82fb46 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 13 Aug 2021 13:17:41 +0530 Subject: [PATCH 0522/1541] fix statusline missing after termclose (#236) --- lua/options.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/options.lua b/lua/options.lua index 15abb39..48d7339 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -68,6 +68,7 @@ end -- Don't show status line on vim terminals vim.cmd [[ au TermOpen term://* setlocal nonumber laststatus=0 ]] +vim.cmd [[ au TermClose term://* setlocal number laststatus=2 ]] -- Open a file from its last left off position -- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] From 91c8736146a9371bd97befacf55486b9416d154b Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Sat, 14 Aug 2021 01:59:17 +1000 Subject: [PATCH 0523/1541] WIP - Added toggleterm, based upon curtanips work (#237) * Added toggleterm, based upon curtanips work Also other various term fixes & changed term mappings * new NvChad config to hide statusline by filetype --- lua/chadrc.lua | 18 ++++++++++++------ lua/mappings.lua | 26 +++++++++++++++++++------- lua/options.lua | 6 +++--- lua/pluginList.lua | 10 ++++++++++ lua/plugins/nvimtree.lua | 3 --- lua/plugins/toggleterm.lua | 33 +++++++++++++++++++++++++++++++++ 6 files changed, 77 insertions(+), 19 deletions(-) create mode 100644 lua/plugins/toggleterm.lua diff --git a/lua/chadrc.lua b/lua/chadrc.lua index e006e11..53d5c22 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -1,6 +1,10 @@ local M = { ui = { - theme = "onedark" + theme = "onedark", + hidden_statusline = { -- these are filetypes, not pattern matched + "NvimTree", + "toggleterm" + } }, options = { permanent_undo = true, @@ -86,13 +90,15 @@ local M = { diffget_3 = "gl", git_blame = "gb" }, + toggleterm = { + toggle_window = "w", + toggle_right = "v", + toggle_bot = "h", + }, misc = { - openTerm_right = "", - openTerm_bottom = "", - openTerm_currentBuf = "t", + esc_Termmode = "jk", copywhole_file = "", - toggle_linenr = "n", - esc_Termmode = "jk" + toggle_linenr = "n" } } } diff --git a/lua/mappings.lua b/lua/mappings.lua index 5cf0634..81b58db 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -35,10 +35,6 @@ map("", "k", 'v:count ? "k" : "gk"', {expr = true}) map("", "", 'v:count ? "j" : "gj"', {expr = true}) map("", "", 'v:count ? "k" : "gk"', {expr = true}) --- OPEN TERMINALS -- -map("n", miscMap.openTerm_right, ":vnew +terminal | setlocal nobuflisted ", opt) -- term over right -map("n", miscMap.openTerm_bottom, ":10new +terminal | setlocal nobuflisted ", opt) -- term bottom -map("n", miscMap.openTerm_currentBuf, ":terminal ", opt) -- term buffer -- copy whole file content map("n", miscMap.copywhole_file, ":%y+", opt) @@ -46,6 +42,25 @@ map("n", miscMap.copywhole_file, ":%y+", opt) -- toggle numbers map("n", miscMap.toggle_linenr, ":set nu!", opt) +-- open a new buffer as a Terminal +-- get out of terminal with jk +map("t", miscMap.esc_Termmode, "", opt) + + +M.toggleterm = function() + local m = user_map.toggleterm + + -- Open terminals + map("n", m.toggle_window, ":execute v:count . 'ToggleTerm direction=window' ", opt) + map("n", m.toggle_right, ":execute v:count . 'ToggleTerm direction=vertical' ", opt) + map("n", m.toggle_bot, ":execute v:count . 'ToggleTerm direction=horizontal' ", opt) + + -- 'Un' toggle a term from within terminal edit mode + map("t", m.toggle_window, " :ToggleTerm ", opt) + map("t", m.toggle_right, " :ToggleTerm ", opt) + map("t", m.toggle_bot, " :ToggleTerm ", opt) +end + M.truezen = function() local m = user_map.truezen @@ -113,9 +128,6 @@ end -- use ESC to turn off search highlighting map("n", "", ":noh", opt) --- get out of terminal with jk -map("t", miscMap.esc_Termmode, "", opt) - -- Packer commands till because we are not loading it at startup cmd("silent! command PackerCompile lua require 'pluginList' require('packer').compile()") cmd("silent! command PackerInstall lua require 'pluginList' require('packer').install()") diff --git a/lua/options.lua b/lua/options.lua index 48d7339..9b88ed2 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -66,9 +66,9 @@ for _, plugin in pairs(disabled_built_ins) do g["loaded_" .. plugin] = 1 end --- Don't show status line on vim terminals -vim.cmd [[ au TermOpen term://* setlocal nonumber laststatus=0 ]] -vim.cmd [[ au TermClose term://* setlocal number laststatus=2 ]] +-- Don't show status line on certain windows +vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber ]] +vim.cmd [[let hidden_statusline = luaeval('require("chadrc").ui.hidden_statusline') | autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * nested if index(hidden_statusline, &ft) >= 0 | set laststatus=0 | else | set laststatus=2 | endif]] -- Open a file from its last left off position -- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 773cf8d..458fb0e 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -199,6 +199,16 @@ return packer.startup( } -- misc plugins + use { + "akinsho/nvim-toggleterm.lua", + event = "BufWinEnter", + config = function() + require "plugins.toggleterm" + end, + setup = function() + require "mappings".toggleterm() + end + } use { "windwp/nvim-autopairs", after = "nvim-compe", diff --git a/lua/plugins/nvimtree.lua b/lua/plugins/nvimtree.lua index 5713bd1..4444755 100644 --- a/lua/plugins/nvimtree.lua +++ b/lua/plugins/nvimtree.lua @@ -93,6 +93,3 @@ g.nvim_tree_bindings = { {key = "q", cb = tree_cb("close")}, {key = "g?", cb = tree_cb("toggle_help")} } - --- hide statusline when nvim tree is opened -vim.cmd [[au BufEnter,BufWinEnter,WinEnter,CmdwinEnter * if bufname('%') == "NvimTree" | set laststatus=0 | else | set laststatus=2 | endif]] diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua new file mode 100644 index 0000000..174e544 --- /dev/null +++ b/lua/plugins/toggleterm.lua @@ -0,0 +1,33 @@ +local present, toggleterm = pcall(require, "toggleterm") +if not present then + return +end + +toggleterm.setup { + -- size can be a number or function which is passed the current terminal + size = function(term) + if term.direction == "horizontal" then + return 15 + elseif term.direction == "vertical" then + return vim.o.columns * 0.4 + end + end, + -- open_mapping = [[]], -- mapping set in mappings.lua + hide_numbers = true, -- hide the number column in toggleterm buffers + shade_terminals = false, + start_in_insert = true, + -- insert_mappings = true, -- see 'open_mapping', not set on purpose + -- whether or not the open mapping applies in insert mode + persist_size = true, + direction = 'vertical', + close_on_exit = true, -- close the terminal window when the process exits + -- This field is only relevant if direction is set to 'float' + float_opts = { + border = 'single', + winblend = 0, + highlights = { + border = "Normal", + background = "Normal", + } + } +} From f805cb1cbdc147ddc2484600306a615121ceb788 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 14 Aug 2021 13:00:01 +0530 Subject: [PATCH 0524/1541] user_config : add option to disable telescope media plugin --- lua/chadrc.lua | 30 +++++++++++++++++++----------- lua/mappings.lua | 8 +++++--- lua/pluginList.lua | 6 +++++- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 53d5c22..b04c9b9 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -1,7 +1,8 @@ local M = { ui = { theme = "onedark", - hidden_statusline = { -- these are filetypes, not pattern matched + hidden_statusline = { + -- these are filetypes, not pattern matched "NvimTree", "toggleterm" } @@ -26,22 +27,27 @@ local M = { }, -- enable / disable plugins (true for disable) plugin_status = { - better_esc = false, + -- UI nvim_bufferline = false, galaxyline = false, nvim_colorizer = false, + dashboard_nvim = false, + blankline = false, + truezen_nvim = false, + better_esc = false, + -- lsp stuff lspkind = false, lspsignature = false, - neoformat = false, + -- git stuff gitsigns = false, - vim_matchup = false, - dashboard_nvim = false, - autosave_nvim = false, - truezen_nvim = false, - blankline = false, vim_fugitive = false, + -- misc + neoformat = false, + vim_matchup = false, + autosave_nvim = false, nvim_comment = false, - neoscroll_nvim = false + neoscroll_nvim = false, + telescope_media = false }, -- make sure you dont use same keys twice mappings = { @@ -71,12 +77,14 @@ local M = { git_status = "gt", git_commits = "cm", find_files = "ff", - media_files = "fp", buffers = "fb", help_tags = "fh", oldfiles = "fo", themes = "th" }, + telescope_media = { + media_files = "fp" + }, bufferline = { new_buffer = "", newtab = "b", @@ -93,7 +101,7 @@ local M = { toggleterm = { toggle_window = "w", toggle_right = "v", - toggle_bot = "h", + toggle_bot = "h" }, misc = { esc_Termmode = "jk", diff --git a/lua/mappings.lua b/lua/mappings.lua index 81b58db..d32cdac 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -35,7 +35,6 @@ map("", "k", 'v:count ? "k" : "gk"', {expr = true}) map("", "", 'v:count ? "j" : "gj"', {expr = true}) map("", "", 'v:count ? "k" : "gk"', {expr = true}) - -- copy whole file content map("n", miscMap.copywhole_file, ":%y+", opt) @@ -46,7 +45,6 @@ map("n", miscMap.toggle_linenr, ":set nu!", opt) -- get out of terminal with jk map("t", miscMap.esc_Termmode, "", opt) - M.toggleterm = function() local m = user_map.toggleterm @@ -105,13 +103,17 @@ M.telescope = function() map("n", m.git_status, ":Telescope git_status ", opt) map("n", m.git_commits, ":Telescope git_commits ", opt) map("n", m.find_files, ":Telescope find_files ", opt) - map("n", m.media_files, ":Telescope media_files ", opt) map("n", m.buffers, ":Telescope buffers", opt) map("n", m.help_tags, ":Telescope help_tags", opt) map("n", m.oldfiles, ":Telescope oldfiles", opt) map("n", m.themes, ":Telescope themes", opt) end +M.telescope_media = function() + local m = user_map.telescope_media + map("n", m.media_files, ":Telescope media_files ", opt) +end + M.bufferline = function() local m = user_map.bufferline diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 458fb0e..c31cf5a 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -177,7 +177,11 @@ return packer.startup( run = "make" }, { - "nvim-telescope/telescope-media-files.nvim" + "nvim-telescope/telescope-media-files.nvim", + disable = plugin_status.telescope_media, + setup = function() + require "mappings".telescope_media() + end } }, config = function() From 2b331e7fa1ceb11eaa0734f294b58d30a441993b Mon Sep 17 00:00:00 2001 From: curtain <1410768946@qq.com> Date: Sat, 14 Aug 2021 15:56:54 +0800 Subject: [PATCH 0525/1541] add some useful keymap in insert/command mode with switch to toggle (#240) Co-authored-by: curtain --- lua/chadrc.lua | 7 +++++++ lua/mappings.lua | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index b04c9b9..221fb48 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -103,6 +103,13 @@ local M = { toggle_right = "v", toggle_bot = "h" }, + unix_keymap = { + toggle_unix_keymap = "k", + forward = "", + backward = "", + top_of_line = "", + end_of_line = "" + }, misc = { esc_Termmode = "jk", copywhole_file = "", diff --git a/lua/mappings.lua b/lua/mappings.lua index d32cdac..5d5ef4c 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -24,6 +24,45 @@ map("v", "x", [=[ "_x ]=], opt) this line too ]] -- +-- toggle unix readline's keymap +map("n", user_map.unix_keymap.toggle_unix_keymap,"lua require 'mappings'.unix_keymap()",{nowait = true}) + +local _cmap_containp = function (key) + local cmap_tab = vim.api.nvim_get_keymap("c") + + for _, value in ipairs(cmap_tab) do + if value['lhs'] == key then + return true + end + end + return false +end + +M.unix_keymap = function() + local m = user_map.unix_keymap + + if _cmap_containp("") then + vim.api.nvim_del_keymap("i", m.forward) + vim.api.nvim_del_keymap("i", m.backward) + vim.api.nvim_del_keymap("i", m.top_of_line) + vim.api.nvim_del_keymap("i", m.end_of_line) + vim.api.nvim_del_keymap("c", m.forward) + vim.api.nvim_del_keymap("c", m.backward) + vim.api.nvim_del_keymap("c", m.top_of_line) + vim.api.nvim_del_keymap("c", m.end_of_line) + else + map("i", m.forward, '', opt) + map("i", m.backward, '', opt) + map("i", m.top_of_line, '^i', opt) + map("i", m.end_of_line, '', opt) + vim.api.nvim_set_keymap("c", m.forward, '', {noremap = true}) + vim.api.nvim_set_keymap("c", m.backward, '', {noremap = true}) + vim.api.nvim_set_keymap("c", m.top_of_line, '', {noremap = true}) + vim.api.nvim_set_keymap("c", m.end_of_line, '', {noremap = true}) + end +end + + -- Don't copy the replaced text after pasting in visual mode map("v", "p", '"_dP', opt) From fd2aa6095f7b662add66e664db28b88cb4e83795 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 14 Aug 2021 13:44:28 +0530 Subject: [PATCH 0526/1541] improve nav_in insertmode (#240) --- lua/chadrc.lua | 16 ++++++++------- lua/mappings.lua | 53 +++++++++++++----------------------------------- 2 files changed, 23 insertions(+), 46 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 221fb48..cd1df7a 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -23,7 +23,8 @@ local M = { shiftwidth = 2, smartindent = true, mapleader = " ", - autosave = false + autosave = false, + enable_insertNav = true -- navigation within insertmode }, -- enable / disable plugins (true for disable) plugin_status = { @@ -103,12 +104,13 @@ local M = { toggle_right = "v", toggle_bot = "h" }, - unix_keymap = { - toggle_unix_keymap = "k", - forward = "", - backward = "", - top_of_line = "", - end_of_line = "" + insert_nav = { + forward = "", + backward = "", + top_of_line = "", + end_of_line = "", + prev_line = "", + next_line = "" }, misc = { esc_Termmode = "jk", diff --git a/lua/mappings.lua b/lua/mappings.lua index 5d5ef4c..77fb1ca 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -24,45 +24,6 @@ map("v", "x", [=[ "_x ]=], opt) this line too ]] -- --- toggle unix readline's keymap -map("n", user_map.unix_keymap.toggle_unix_keymap,"lua require 'mappings'.unix_keymap()",{nowait = true}) - -local _cmap_containp = function (key) - local cmap_tab = vim.api.nvim_get_keymap("c") - - for _, value in ipairs(cmap_tab) do - if value['lhs'] == key then - return true - end - end - return false -end - -M.unix_keymap = function() - local m = user_map.unix_keymap - - if _cmap_containp("") then - vim.api.nvim_del_keymap("i", m.forward) - vim.api.nvim_del_keymap("i", m.backward) - vim.api.nvim_del_keymap("i", m.top_of_line) - vim.api.nvim_del_keymap("i", m.end_of_line) - vim.api.nvim_del_keymap("c", m.forward) - vim.api.nvim_del_keymap("c", m.backward) - vim.api.nvim_del_keymap("c", m.top_of_line) - vim.api.nvim_del_keymap("c", m.end_of_line) - else - map("i", m.forward, '', opt) - map("i", m.backward, '', opt) - map("i", m.top_of_line, '^i', opt) - map("i", m.end_of_line, '', opt) - vim.api.nvim_set_keymap("c", m.forward, '', {noremap = true}) - vim.api.nvim_set_keymap("c", m.backward, '', {noremap = true}) - vim.api.nvim_set_keymap("c", m.top_of_line, '', {noremap = true}) - vim.api.nvim_set_keymap("c", m.end_of_line, '', {noremap = true}) - end -end - - -- Don't copy the replaced text after pasting in visual mode map("v", "p", '"_dP', opt) @@ -185,4 +146,18 @@ M.fugitive = function() map("n", m.git_blame, ":Git blame", opt) end +-- navigation within insert mode +local check_insertNav = require("chadrc").options.enable_insertNav + +if check_insertNav == true then + local m = user_map.insert_nav + + map("i", m.forward, "", opt) + map("i", m.backward, "", opt) + map("i", m.top_of_line, "^i", opt) + map("i", m.end_of_line, "", opt) + map("i", m.next_line, "", opt) + map("i", m.prev_line, "", opt) +end + return M From 59359943eb7548fcbbb7d56c8ab69a8880653e52 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 14 Aug 2021 16:12:44 +0530 Subject: [PATCH 0527/1541] show chadributors in the readme --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index af39975..b1da5ec 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,12 @@ It would be nice if NvChad focuses on existing plugins and config before adding - NvChad isnt a Framework. NvChad wont keep adding more and more features ( adding new plugins most likely) as requested , no spoonfeeding!! If you think the plugin you want to be added is very useful and many NvChaders would find it useful, then such feature's PR is welcomed! - But adding specific features like adding config for https://github.com/wakatime/vim-wakatime etc will be added in this https://github.com/siduck76/NvChad/wiki/Chad-user-configs. This lets the user select the things only they want ( from extra configs ) . +# Chad contributors + +
+ + + ## :gift_heart: Support If you enjoy using NvChad and would like to show your appreciation, you may want to tip me here. From c80d79a7cc3ede5c424d32efdc4f8ab58059b4ff Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 14 Aug 2021 18:12:28 +0530 Subject: [PATCH 0528/1541] set completeopt for compe --- lua/options.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/options.lua b/lua/options.lua index 9b88ed2..df485ce 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -2,6 +2,7 @@ local options = require("chadrc").options local opt = vim.opt local g = vim.g +opt.completeopt = {"menuone", "noselect"} opt.undofile = options.permanent_undo opt.ruler = options.ruler opt.hidden = options.hidden From e80a6935d63bd1b66f1dd2fa5defc63ebf227d9f Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Sat, 14 Aug 2021 23:58:24 +1000 Subject: [PATCH 0529/1541] Now have 3 separate terms, window, vert & hori, renamed some variables (#251) --- lua/chadrc.lua | 5 +++-- lua/mappings.lua | 14 +++++++------- lua/plugins/toggleterm.lua | 14 ++++++++++++++ 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index cd1df7a..84d5690 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -101,8 +101,9 @@ local M = { }, toggleterm = { toggle_window = "w", - toggle_right = "v", - toggle_bot = "h" + toggle_vert = "v", + toggle_hori = "h", + hide_term = "JK" }, insert_nav = { forward = "", diff --git a/lua/mappings.lua b/lua/mappings.lua index 77fb1ca..b0624ef 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -49,14 +49,14 @@ M.toggleterm = function() local m = user_map.toggleterm -- Open terminals - map("n", m.toggle_window, ":execute v:count . 'ToggleTerm direction=window' ", opt) - map("n", m.toggle_right, ":execute v:count . 'ToggleTerm direction=vertical' ", opt) - map("n", m.toggle_bot, ":execute v:count . 'ToggleTerm direction=horizontal' ", opt) + map("n", m.toggle_window, ":lua termW:toggle() ", opt) + map("n", m.toggle_vert, ":lua termV:toggle() ", opt) + map("n", m.toggle_hori, ":lua termH:toggle() ", opt) - -- 'Un' toggle a term from within terminal edit mode - map("t", m.toggle_window, " :ToggleTerm ", opt) - map("t", m.toggle_right, " :ToggleTerm ", opt) - map("t", m.toggle_bot, " :ToggleTerm ", opt) + -- toggle(HIDE) a term from within terminal edit mode + map("t", m.hide_term, " :ToggleTerm ", opt) + map("t", m.hide_term, " :ToggleTerm ", opt) + map("t", m.hide_term, " :ToggleTerm ", opt) end M.truezen = function() diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua index 174e544..a3f7722 100644 --- a/lua/plugins/toggleterm.lua +++ b/lua/plugins/toggleterm.lua @@ -31,3 +31,17 @@ toggleterm.setup { } } } + +local Terminal = require("toggleterm.terminal").Terminal + +_G.termW = Terminal:new { + direction = "window", +} + +_G.termV = Terminal:new { + direction = "vertical", +} + +_G.termH = Terminal:new { + direction = "horizontal", +} From c656d6a3bdab91fffaa98f7c2fc6837680a4eb29 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 14 Aug 2021 22:11:20 +0530 Subject: [PATCH 0530/1541] Fix theme switcher reload | Move reload_theme to utils (#252) * rearrange functions in utils.lua alphabetically --- lua/telescope/_extensions/themes.lua | 48 +----- lua/utils.lua | 227 ++++++++++++++++++--------- 2 files changed, 154 insertions(+), 121 deletions(-) diff --git a/lua/telescope/_extensions/themes.lua b/lua/telescope/_extensions/themes.lua index 8957aa9..1c6ec44 100644 --- a/lua/telescope/_extensions/themes.lua +++ b/lua/telescope/_extensions/themes.lua @@ -1,52 +1,6 @@ -- This file can be loaded as a telescope extension local M = {} --- reload themes without restarting vim --- if no theme name given then reload the current theme -M.reload_theme = function(theme_name) - local reload_plugin = require("utils").reload_plugin - - -- if theme name is empty or nil, then reload the current theme - if (theme_name == nil or theme_name == "") then - theme_name = vim.g.nvchad_theme - end - - if not pcall(require, "themes/" .. theme_name) then - print("No such theme ( " .. theme_name .. " )") - return false - end - - vim.g.nvchad_theme = theme_name - - -- reload the base16 theme - local ok, base16 = pcall(require, "base16") - if not ok then - print("Error: Cannot load base16 plugin!") - return false - end - base16(base16.themes(theme_name), true) - - if - not reload_plugin { - "highlights", - "plugins.bufferline", - "galaxyline", - "plugins.statusline" - } - then - print "Error: Not able to reload all plugins." - return false - end - - -- now send the provider info to actual refresh - require("galaxyline.provider").async_load_providers:send() - - return true - -- open a buffer and close it to reload the statusline - -- vim.cmd("new|bwipeout") - -- commented out here as it will not work with telescope picker -end - -- Custom theme picker -- Most of the code is copied from telescope colorscheme plugin, mostly for preview creation M.theme_switcher = function(opts) @@ -65,7 +19,7 @@ M.theme_switcher = function(opts) end local local_utils = require "utils" - local reload_theme = M.reload_theme + local reload_theme = local_utils.reload_theme -- get a table of available themes local themes = local_utils.list_themes() diff --git a/lua/utils.lua b/lua/utils.lua index ced2dc7..a330d25 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -1,79 +1,5 @@ local M = {} --- reload a plugin ( will try to load even if not loaded) --- can take a string or list ( table ) --- return true or false -M.reload_plugin = function(plugins) - local status = true - local function _reload_plugin(plugin) - local loaded = package.loaded[plugin] - if loaded then - package.loaded[plugin] = nil - end - if not pcall(require, plugin) then - print("Error: Cannot load " .. plugin .. " plugin!") - status = false - end - end - - if type(plugins) == "string" then - _reload_plugin(plugins) - elseif type(plugins) == "table" then - for _, plugin in ipairs(plugins) do - _reload_plugin(plugin) - end - end - return status -end - --- return a table of available themes -M.list_themes = function(return_type) - local themes = {} - -- folder where theme files are stored - local themes_folder = vim.fn.stdpath("config") .. "/lua/themes" - -- list all the contents of the folder and filter out files with .lua extension, then append to themes table - local fd = vim.loop.fs_scandir(themes_folder) - if fd then - while true do - local name, typ = vim.loop.fs_scandir_next(fd) - if name == nil then - break - end - if typ ~= "directory" and string.find(name, ".lua") then - -- return the table values as keys if specified - if return_type == "keys_as_value" then - themes[vim.fn.fnamemodify(name, ":r")] = true - else - table.insert(themes, vim.fn.fnamemodify(name, ":r")) - end - end - end - end - return themes -end - --- 1st arg - r or w --- 2nd arg - file path --- 3rd arg - content if 1st arg is w --- return file data on read, nothing on write -M.file = function(mode, filepath, content) - local data - local fd = assert(vim.loop.fs_open(filepath, mode, 438)) - local stat = assert(vim.loop.fs_fstat(fd)) - if stat.type ~= "file" then - data = false - else - if mode == "r" then - data = assert(vim.loop.fs_read(fd, stat.size, 0)) - else - assert(vim.loop.fs_write(fd, content, 0)) - data = true - end - end - assert(vim.loop.fs_close(fd)) - return data -end - -- 1st arg as current theme, 2nd as new theme M.change_theme = function(current_theme, new_theme) if current_theme == nil or new_theme == nil then @@ -108,4 +34,157 @@ M.clear_cmdline = function() ) end +-- 1st arg - r or w +-- 2nd arg - file path +-- 3rd arg - content if 1st arg is w +-- return file data on read, nothing on write +M.file = function(mode, filepath, content) + local data + local fd = assert(vim.loop.fs_open(filepath, mode, 438)) + local stat = assert(vim.loop.fs_fstat(fd)) + if stat.type ~= "file" then + data = false + else + if mode == "r" then + data = assert(vim.loop.fs_read(fd, stat.size, 0)) + else + assert(vim.loop.fs_write(fd, content, 0)) + data = true + end + end + assert(vim.loop.fs_close(fd)) + return data +end + +-- return a table of available themes +M.list_themes = function(return_type) + local themes = {} + -- folder where theme files are stored + local themes_folder = vim.fn.stdpath("config") .. "/lua/themes" + -- list all the contents of the folder and filter out files with .lua extension, then append to themes table + local fd = vim.loop.fs_scandir(themes_folder) + if fd then + while true do + local name, typ = vim.loop.fs_scandir_next(fd) + if name == nil then + break + end + if typ ~= "directory" and string.find(name, ".lua") then + -- return the table values as keys if specified + if return_type == "keys_as_value" then + themes[vim.fn.fnamemodify(name, ":r")] = true + else + table.insert(themes, vim.fn.fnamemodify(name, ":r")) + end + end + end + end + return themes +end + +-- reload a plugin ( will try to load even if not loaded) +-- can take a string or list ( table ) +-- return true or false +M.reload_plugin = function(plugins) + local status = true + local function _reload_plugin(plugin) + local loaded = package.loaded[plugin] + if loaded then + package.loaded[plugin] = nil + end + if not pcall(require, plugin) then + print("Error: Cannot load " .. plugin .. " plugin!") + status = false + end + end + + if type(plugins) == "string" then + _reload_plugin(plugins) + elseif type(plugins) == "table" then + for _, plugin in ipairs(plugins) do + _reload_plugin(plugin) + end + end + return status +end + +-- reload themes without restarting vim +-- if no theme name given then reload the current theme +M.reload_theme = function(theme_name) + local reload_plugin = require("utils").reload_plugin + + -- if theme name is empty or nil, then reload the current theme + if (theme_name == nil or theme_name == "") then + theme_name = vim.g.nvchad_theme + end + + if not pcall(require, "themes/" .. theme_name) then + print("No such theme ( " .. theme_name .. " )") + return false + end + + vim.g.nvchad_theme = theme_name + + -- reload the base16 theme + local ok, base16 = pcall(require, "base16") + if not ok then + print("Error: Cannot load base16 plugin!") + return false + end + base16(base16.themes(theme_name), true) + + if + not reload_plugin { + "highlights", + "plugins.bufferline", + "galaxyline", + "plugins.statusline" + } + then + print "Error: Not able to reload all plugins." + return false + end + + -- yes, this is very hacky, but due to new_async in + -- https://github.com/glepnir/galaxyline.nvim/blob/main/lua/galaxyline/provider.lua#L5-L36 + -- it doesn't work properly and some statusline stuff dissapears + local vcs = require("galaxyline.provider_vcs") + local fileinfo = require("galaxyline.provider_fileinfo") + local buffer = require("galaxyline.provider_buffer") + local extension = require("galaxyline.provider_extensions") + local whitespace = require("galaxyline.provider_whitespace") + local lspclient = require("galaxyline.provider_lsp") + _G.galaxyline_providers = { + BufferIcon = buffer.get_buffer_type_icon, + BufferNumber = buffer.get_buffer_number, + FileTypeName = buffer.get_buffer_filetype, + GitBranch = vcs.get_git_branch, + DiffAdd = vcs.diff_add, + DiffModified = vcs.diff_modified, + DiffRemove = vcs.diff_remove, + LineColumn = fileinfo.line_column, + FileFormat = fileinfo.get_file_format, + FileEncode = fileinfo.get_file_encode, + FileSize = fileinfo.get_file_size, + FileIcon = fileinfo.get_file_icon, + FileName = fileinfo.get_current_file_name, + SFileName = fileinfo.filename_in_special_buffer, + LinePercent = fileinfo.current_line_percent, + ScrollBar = extension.scrollbar_instance, + VistaPlugin = extension.vista_nearest, + WhiteSpace = whitespace.get_item, + GetLspClient = lspclient.get_lsp_client + } + local diagnostic = require("galaxyline.provider_diagnostic") + _G.galaxyline_providers.DiagnosticError = diagnostic.get_diagnostic_error + _G.galaxyline_providers.DiagnosticWarn = diagnostic.get_diagnostic_warn + _G.galaxyline_providers.DiagnosticHint = diagnostic.get_diagnostic_hint + _G.galaxyline_providers.DiagnosticInfo = diagnostic.get_diagnostic_info + + return true + -- open a buffer and close it to reload the statusline + -- vim.cmd("new|bwipeout") + -- commented out here as it will not work with telescope picker +end + return M From e0feea94071d754bd3cd72f3472cd1c4845dd32a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 14 Aug 2021 22:31:32 +0530 Subject: [PATCH 0531/1541] cleanup ! --- lua/telescope/_extensions/themes.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/telescope/_extensions/themes.lua b/lua/telescope/_extensions/themes.lua index 1c6ec44..79ff444 100644 --- a/lua/telescope/_extensions/themes.lua +++ b/lua/telescope/_extensions/themes.lua @@ -120,9 +120,7 @@ M.theme_switcher = function(opts) -- will be used in restoring nvchad theme var final_theme = current_theme end - end - -- open a buffer and close it to reload the statusline - vim.cmd("new|bwipeout") + end else final_theme = current_theme end From 05e587cfc0f3b088169b7683ad5c71f9abed70aa Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 14 Aug 2021 22:32:32 +0530 Subject: [PATCH 0532/1541] Clean up utils --- lua/utils.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/lua/utils.lua b/lua/utils.lua index a330d25..46b2312 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -182,9 +182,6 @@ M.reload_theme = function(theme_name) _G.galaxyline_providers.DiagnosticInfo = diagnostic.get_diagnostic_info return true - -- open a buffer and close it to reload the statusline - -- vim.cmd("new|bwipeout") - -- commented out here as it will not work with telescope picker end return M From ebdcd4cae1b61dc52c975c65f80489d664c9f047 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 14 Aug 2021 22:35:10 +0530 Subject: [PATCH 0533/1541] fix luasnip creating statusline errors (#250) --- lua/plugins/statusline.lua | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/lua/plugins/statusline.lua b/lua/plugins/statusline.lua index bbc49ae..e74bea9 100644 --- a/lua/plugins/statusline.lua +++ b/lua/plugins/statusline.lua @@ -156,25 +156,21 @@ gls.right[3] = { } } -local active_mode = { - n = {"Normal", colors.red}, - i = {"Insert", colors.dark_purple}, - c = {"Command", colors.pink}, - V = {"Visual", colors.cyan}, - [""] = {"Visual", colors.cyan}, - v = {"Visual", colors.cyan}, - R = {"Replace", colors.orange}, - t = {"Terminal", colors.green} +local mode_colors = { + [110] = {"NORMAL", colors.red}, + [105] = {"INSERT", colors.dark_purple}, + [99] = {"COMMAND", colors.pink}, + [116] = {"TERMINAL", colors.green}, + [118] = {"VISUAL", colors.cyan}, + [22] = {"V-BLOCK", colors.cyan}, + [86] = {"V_LINE", colors.cyan}, + [82] = {"REPLACE", colors.orange}, + [115] = {"SELECT", colors.nord_blue}, + [83] = {"S-LINE", colors.nord_blue} } -local function mode(m) - local chad_mode = active_mode[vim.fn.mode()][m] - - if chad_mode == "nil" then - return active_mode[vim.fn.mode()]["t"] - else - return chad_mode - end +local mode = function(n) + return mode_colors[vim.fn.mode():byte()][n] end gls.right[4] = { @@ -205,7 +201,7 @@ gls.right[6] = { vim.cmd("hi GalaxyViMode guifg=" .. mode(2)) return " " .. mode(1) .. " " end, - highlight = {"GalaxyViMode", colors.lightbg} -- colors.red here will be overriden many times + highlight = {"GalaxyViMode", colors.lightbg} } } From ea0a221230532bfd2af0a516feb0dca53d62e5ba Mon Sep 17 00:00:00 2001 From: Sage Baram <50245184+JustSage@users.noreply.github.com> Date: Sat, 14 Aug 2021 21:26:34 +0300 Subject: [PATCH 0534/1541] (feat) add filename edit/lock icons provider (#253) * (feat) add filename edit/lock icons provider * Update statusline.lua Co-authored-by: Sage Baram Co-authored-by: siduck76 --- lua/plugins/statusline.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/plugins/statusline.lua b/lua/plugins/statusline.lua index e74bea9..5e0a282 100644 --- a/lua/plugins/statusline.lua +++ b/lua/plugins/statusline.lua @@ -44,7 +44,10 @@ gls.left[3] = { gls.left[4] = { FileName = { - provider = {"FileName"}, + provider = function() + local fileinfo = require('galaxyline.provider_fileinfo') + return fileinfo.get_current_file_name("", "") + end, condition = condition.buffer_not_empty, highlight = {colors.white, colors.lightbg}, separator = right_separator, From 154ba7d41931566a62f83932f0792fa5def468ee Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 15 Aug 2021 00:44:55 +0530 Subject: [PATCH 0535/1541] add theme toggler (#245) --- lua/chadrc.lua | 9 ++++++--- lua/mappings.lua | 7 +++++++ lua/telescope/_extensions/themes.lua | 8 ++++++-- lua/theme.lua | 3 +++ lua/utils.lua | 18 ++++++++++++++++++ 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 84d5690..0faa9b2 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -1,6 +1,8 @@ local M = { ui = { theme = "onedark", + fav_themes = {"onedark", "gruvchad"}, -- for theme toggle + theme_toggler = false, hidden_statusline = { -- these are filetypes, not pattern matched "NvimTree", @@ -24,9 +26,9 @@ local M = { smartindent = true, mapleader = " ", autosave = false, - enable_insertNav = true -- navigation within insertmode + enable_insertNav = true -- navigation in insertmode }, - -- enable / disable plugins (true for disable) + -- enable and disable plugins (true for disable) plugin_status = { -- UI nvim_bufferline = false, @@ -116,7 +118,8 @@ local M = { misc = { esc_Termmode = "jk", copywhole_file = "", - toggle_linenr = "n" + toggle_linenr = "n", + theme_toggle = "x" } } } diff --git a/lua/mappings.lua b/lua/mappings.lua index b0624ef..16940c1 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -160,4 +160,11 @@ if check_insertNav == true then map("i", m.prev_line, "", opt) end +local theme_toggler = require("chadrc").ui.theme_toggler + +if theme_toggler == true then + local m = user_map.misc.theme_toggle + + map("n", m, ":lua require('utils').toggle_theme(require('chadrc').ui.fav_themes)", opt) +end return M diff --git a/lua/telescope/_extensions/themes.lua b/lua/telescope/_extensions/themes.lua index 79ff444..e0bf3d9 100644 --- a/lua/telescope/_extensions/themes.lua +++ b/lua/telescope/_extensions/themes.lua @@ -110,6 +110,7 @@ M.theme_switcher = function(opts) end if reload_theme(final_theme) then + vim.g.current_nvchad_theme = final_theme if change then -- ask for confirmation to set as default theme local ans = string.lower(vim.fn.input("Set " .. new_theme .. " as default theme ? [y/N] ")) == "y" @@ -119,8 +120,11 @@ M.theme_switcher = function(opts) else -- will be used in restoring nvchad theme var final_theme = current_theme + vim.g.current_nvchad_theme = final_theme end - end + end + -- open a buffer and close it to reload the statusline + vim.cmd("new|bwipeout") else final_theme = current_theme end @@ -130,7 +134,7 @@ M.theme_switcher = function(opts) -- launch the telescope picker picker:find() else - print("No themes found in " .. themes_folder) + print("No themes found in " .. vim.fn.stdpath("config") .. "/lua/themes") end end diff --git a/lua/theme.lua b/lua/theme.lua index 1e0d36b..f1ecdaa 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -1,6 +1,9 @@ local chad_theme = require("chadrc").ui.theme vim.g.nvchad_theme = chad_theme +-- this stores the current set theme, if later theme switcher is used but not set to default +vim.g.current_nvchad_theme = chad_theme + local present, base16 = pcall(require, "base16") if present then diff --git a/lua/utils.lua b/lua/utils.lua index 46b2312..a54be63 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -184,4 +184,22 @@ M.reload_theme = function(theme_name) return true end +-- toggle between 2 themes +-- argument should be a table with 2 theme names +M.toggle_theme = function(themes) + local current_theme = vim.g.current_nvchad_theme or vim.g.nvchad_theme + for _, name in ipairs(themes) do + if name ~= current_theme then + if require("utils").reload_theme(name) then + -- open a buffer and close it to reload the statusline + vim.cmd("new|bwipeout") + vim.g.current_nvchad_theme = name + if M.change_theme(vim.g.nvchad_theme, name) then + vim.g.nvchad_theme = name + end + end + end + end +end + return M From 49120177ce0667697a46d75cae6c06d784382836 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 15 Aug 2021 01:10:05 +0530 Subject: [PATCH 0536/1541] Update theme.lua --- lua/theme.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/lua/theme.lua b/lua/theme.lua index f1ecdaa..b2ce61b 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -1,8 +1,5 @@ local chad_theme = require("chadrc").ui.theme - vim.g.nvchad_theme = chad_theme --- this stores the current set theme, if later theme switcher is used but not set to default -vim.g.current_nvchad_theme = chad_theme local present, base16 = pcall(require, "base16") From 27031acd08751fb4338c7a08f911ae085cb37383 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 15 Aug 2021 13:22:41 +0530 Subject: [PATCH 0537/1541] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b1da5ec..14d661f 100644 --- a/README.md +++ b/README.md @@ -154,10 +154,10 @@ It would be nice if NvChad focuses on existing plugins and config before adding # Contribute -- PR's are always welcomed however NvChad aims to be less bloated and suckless. So PR's regarding existing plugin's enhancement , bug fixes are more encouraged. -- PR's regarding adding new plugins and their configs must be given some thought since NvChad aims to have a minimal config and meant to be used as a "base" neovim config so it will have only a set of important plugins. So adding more and more plugins, making NvChad bloated + slow wont help!. -- NvChad isnt a Framework. NvChad wont keep adding more and more features ( adding new plugins most likely) as requested , no spoonfeeding!! If you think the plugin you want to be added is very useful and many NvChaders would find it useful, then such feature's PR is welcomed! -- But adding specific features like adding config for https://github.com/wakatime/vim-wakatime etc will be added in this https://github.com/siduck76/NvChad/wiki/Chad-user-configs. This lets the user select the things only they want ( from extra configs ) . +- PR's are always welcomed however NvChad aims to be less bloated. So PR's regarding existing plugin's enhancement and creating new features with existing plugins itself ( without adding a new plugin), bug fixes and corrections are more encouraged. +- PR's regarding adding new plugins and their configs must be given some thought since NvChad is meant to be used as a "base" neovim config so it will have only a set of important plugins. So adding more and more opiniated plugins, making NvChad's config large unnecessarily + slow wont help!. +- NvChad wont keep adding more and more features (like adding new plugins most likely) as requested if they feel unneeded and arent usable by the majority, no spoonfeeding!! If you think the plugin you want to be added is very useful and many NvChaders would find it useful, then such feature's PR is welcomed! +- But adding specific features like adding config for https://github.com/wakatime/vim-wakatime etc will be added in this https://github.com/siduck76/NvChad/wiki/Chad-user-configs. This lets the user select the things only they want ( adding configs from extra configs ) . # Chad contributors From 7b796294a40f60a89e134038759c5cdb660df8fc Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Mon, 16 Aug 2021 06:16:14 +0530 Subject: [PATCH 0538/1541] refact: move false to true in plugins and change disable to 'not' so that the user does'nt be confused (#257) --- lua/chadrc.lua | 34 +++++++++++++++++----------------- lua/pluginList.lua | 34 +++++++++++++++++----------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 0faa9b2..241dd43 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -31,26 +31,26 @@ local M = { -- enable and disable plugins (true for disable) plugin_status = { -- UI - nvim_bufferline = false, - galaxyline = false, - nvim_colorizer = false, - dashboard_nvim = false, - blankline = false, - truezen_nvim = false, - better_esc = false, + nvim_bufferline = true, + galaxyline = true, + nvim_colorizer = true, + dashboard_nvim = true, + blankline = true, + truezen_nvim = true, + better_esc = true, -- lsp stuff - lspkind = false, - lspsignature = false, + lspkind = true, + lspsignature = true, -- git stuff - gitsigns = false, - vim_fugitive = false, + gitsigns = true, + vim_fugitive = true, -- misc - neoformat = false, - vim_matchup = false, - autosave_nvim = false, - nvim_comment = false, - neoscroll_nvim = false, - telescope_media = false + neoformat = true, + vim_matchup = true, + autosave_nvim = true, + nvim_comment = true, + neoscroll_nvim = true, + telescope_media = true }, -- make sure you dont use same keys twice mappings = { diff --git a/lua/pluginList.lua b/lua/pluginList.lua index c31cf5a..4b84a32 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -20,7 +20,7 @@ return packer.startup( use { "jdhao/better-escape.vim", - disable = plugin_status.better_esc, + disable = not plugin_status.better_esc, event = "InsertEnter", config = function() require "plugins.others".escape() @@ -29,7 +29,7 @@ return packer.startup( use { "akinsho/nvim-bufferline.lua", - disable = plugin_status.nvim_bufferline, + disable = not plugin_status.nvim_bufferline, after = "nvim-base16.lua", config = function() require "plugins.bufferline" @@ -41,7 +41,7 @@ return packer.startup( use { "glepnir/galaxyline.nvim", - disable = plugin_status.galaxyline, + disable = not plugin_status.galaxyline, after = "nvim-base16.lua", config = function() require "plugins.statusline" @@ -59,7 +59,7 @@ return packer.startup( use { "norcalli/nvim-colorizer.lua", - disable = plugin_status.nvim_colorizer, + disable = not plugin_status.nvim_colorizer, event = "BufRead", config = function() require("plugins.others").colorizer() @@ -90,7 +90,7 @@ return packer.startup( use { "onsails/lspkind-nvim", - disable = plugin_status.lspkind, + disable = not plugin_status.lspkind, event = "BufEnter", config = function() require("plugins.others").lspkind() @@ -99,7 +99,7 @@ return packer.startup( use { "ray-x/lsp_signature.nvim", - disable = plugin_status.lspsignature, + disable = not plugin_status.lspsignature, after = "nvim-lspconfig", config = function() require("plugins.others").signature() @@ -132,7 +132,7 @@ return packer.startup( use { "sbdchd/neoformat", - disable = plugin_status.neoformat, + disable = not plugin_status.neoformat, cmd = "Neoformat", setup = function() require "mappings".neoformat() @@ -178,7 +178,7 @@ return packer.startup( }, { "nvim-telescope/telescope-media-files.nvim", - disable = plugin_status.telescope_media, + disable = not plugin_status.telescope_media, setup = function() require "mappings".telescope_media() end @@ -195,7 +195,7 @@ return packer.startup( -- git stuff use { "lewis6991/gitsigns.nvim", - disable = plugin_status.gitsigns, + disable = not plugin_status.gitsigns, after = "plenary.nvim", config = function() require "plugins.gitsigns" @@ -223,13 +223,13 @@ return packer.startup( use { "andymass/vim-matchup", - disable = plugin_status.vim_matchup, + disable = not plugin_status.vim_matchup, event = "CursorMoved" } use { "terrortylor/nvim-comment", - disable = plugin_status.nvim_comment, + disable = not plugin_status.nvim_comment, cmd = "CommentToggle", config = function() require("plugins.others").comment() @@ -241,7 +241,7 @@ return packer.startup( use { "glepnir/dashboard-nvim", - disable = plugin_status.dashboard_nvim, + disable = not plugin_status.dashboard_nvim, cmd = { "Dashboard", "DashboardNewFile", @@ -257,7 +257,7 @@ return packer.startup( -- load autosave only if its globally enabled use { - disable = plugin_status.autosave_nvim, + disable = not plugin_status.autosave_nvim, "Pocco81/AutoSave.nvim", config = function() require "plugins.autosave" @@ -270,7 +270,7 @@ return packer.startup( -- smooth scroll use { "karb94/neoscroll.nvim", - disable = plugin_status.neoscroll_nvim, + disable = not plugin_status.neoscroll_nvim, event = "WinScrolled", config = function() require("plugins.others").neoscroll() @@ -279,7 +279,7 @@ return packer.startup( use { "Pocco81/TrueZen.nvim", - disable = plugin_status.truezen_nvim, + disable = not plugin_status.truezen_nvim, cmd = { "TZAtaraxis", "TZMinimalist", @@ -297,7 +297,7 @@ return packer.startup( use { "lukas-reineke/indent-blankline.nvim", - disable = plugin_status.blankline, + disable = not plugin_status.blankline, event = "BufRead", setup = function() require("plugins.others").blankline() @@ -306,7 +306,7 @@ return packer.startup( use { "tpope/vim-fugitive", - disable = plugin_status.vim_fugitive, + disable = not plugin_status.vim_fugitive, cmd = { "Git" }, From c251f885677c07e0458438e43b0f63573de6c000 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 16 Aug 2021 08:14:16 +0530 Subject: [PATCH 0539/1541] update nvim-base16 repo link --- lua/pluginList.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 4b84a32..d67e7aa 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -50,7 +50,7 @@ return packer.startup( -- color related stuff use { - "siduck76/nvim-base16.lua", + "NvChad/nvim-base16.lua", after = "packer.nvim", config = function() require "theme" From aabc3e692f641d9567144d9110803231023c5952 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 16 Aug 2021 08:43:39 +0530 Subject: [PATCH 0540/1541] update tomorrow night theme name --- lua/themes/{tomorrow-night.lua => tomorrow_night.lua} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lua/themes/{tomorrow-night.lua => tomorrow_night.lua} (100%) diff --git a/lua/themes/tomorrow-night.lua b/lua/themes/tomorrow_night.lua similarity index 100% rename from lua/themes/tomorrow-night.lua rename to lua/themes/tomorrow_night.lua From 9c134872fbec9604fae388b96d00597539876e25 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 16 Aug 2021 08:57:25 +0530 Subject: [PATCH 0541/1541] rename theme name --- lua/themes/{tomorrow_night.lua => tomorrow-night.lua} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lua/themes/{tomorrow_night.lua => tomorrow-night.lua} (100%) diff --git a/lua/themes/tomorrow_night.lua b/lua/themes/tomorrow-night.lua similarity index 100% rename from lua/themes/tomorrow_night.lua rename to lua/themes/tomorrow-night.lua From 4abf43aa9908e76c095209409410825f74b2c596 Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 16 Aug 2021 09:18:31 +0530 Subject: [PATCH 0542/1541] Fixes (#259) * Missed in 154ba7d * utils/change-theme: Check theme name for magic chars --- lua/telescope/_extensions/themes.lua | 4 ---- lua/utils.lua | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lua/telescope/_extensions/themes.lua b/lua/telescope/_extensions/themes.lua index e0bf3d9..ba3ed95 100644 --- a/lua/telescope/_extensions/themes.lua +++ b/lua/telescope/_extensions/themes.lua @@ -110,7 +110,6 @@ M.theme_switcher = function(opts) end if reload_theme(final_theme) then - vim.g.current_nvchad_theme = final_theme if change then -- ask for confirmation to set as default theme local ans = string.lower(vim.fn.input("Set " .. new_theme .. " as default theme ? [y/N] ")) == "y" @@ -120,11 +119,8 @@ M.theme_switcher = function(opts) else -- will be used in restoring nvchad theme var final_theme = current_theme - vim.g.current_nvchad_theme = final_theme end end - -- open a buffer and close it to reload the statusline - vim.cmd("new|bwipeout") else final_theme = current_theme end diff --git a/lua/utils.lua b/lua/utils.lua index a54be63..7301689 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -13,6 +13,9 @@ M.change_theme = function(current_theme, new_theme) local file = vim.fn.stdpath("config") .. "/lua/chadrc.lua" -- store in data variable local data = assert(M.file("r", file)) + -- escape characters which can be parsed as magic chars + current_theme = current_theme:gsub("%p", "%%%0") + new_theme = new_theme:gsub("%p", "%%%0") local find = "theme = .?" .. current_theme .. ".?" local replace = 'theme = "' .. new_theme .. '"' local content = string.gsub(data, find, replace) From 86903ab982d041a5f2988c72db30593101b48f79 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Mon, 16 Aug 2021 17:49:09 +1000 Subject: [PATCH 0543/1541] chore: stylua formatting update (#261) * addded stylua config file * chore: formatted with stylua --- .stylua.toml | 6 + init.lua | 6 +- lua/chadrc.lua | 246 ++++++------ lua/highlights.lua | 6 +- lua/mappings.lua | 144 +++---- lua/options.lua | 46 +-- lua/packerInit.lua | 66 ++- lua/pluginList.lua | 578 +++++++++++++-------------- lua/plugins/autopairs.lua | 12 +- lua/plugins/autosave.lua | 30 +- lua/plugins/bufferline.lua | 190 ++++----- lua/plugins/compe.lua | 38 +- lua/plugins/dashboard.lua | 48 +-- lua/plugins/gitsigns.lua | 52 +-- lua/plugins/icons.lua | 226 +++++------ lua/plugins/lspconfig.lua | 168 ++++---- lua/plugins/luasnip.lua | 96 +++-- lua/plugins/nvimtree.lua | 122 +++--- lua/plugins/others.lua | 94 +++-- lua/plugins/statusline.lua | 320 +++++++-------- lua/plugins/telescope.lua | 154 ++++--- lua/plugins/toggleterm.lua | 60 +-- lua/plugins/treesitter.lua | 18 +- lua/plugins/zenmode.lua | 130 +++--- lua/telescope/_extensions/themes.lua | 239 ++++++----- lua/theme.lua | 8 +- lua/themes/chadracula.lua | 58 +-- lua/themes/everforest.lua | 58 +-- lua/themes/gruvchad.lua | 58 +-- lua/themes/javacafe.lua | 58 +-- lua/themes/mountaineer.lua | 58 +-- lua/themes/norchad.lua | 58 +-- lua/themes/onedark.lua | 58 +-- lua/themes/tokyonight.lua | 58 +-- lua/themes/tomorrow-night.lua | 58 +-- lua/utils.lua | 317 ++++++++------- 36 files changed, 1955 insertions(+), 1987 deletions(-) create mode 100644 .stylua.toml diff --git a/.stylua.toml b/.stylua.toml new file mode 100644 index 0000000..e9bf648 --- /dev/null +++ b/.stylua.toml @@ -0,0 +1,6 @@ +column_width = 120 +line_endings = "Unix" +indent_type = "Spaces" +indent_width = 3 +quote_style = "AutoPreferDouble" +no_call_parentheses = true diff --git a/init.lua b/init.lua index 54610ae..b65c997 100644 --- a/init.lua +++ b/init.lua @@ -1,8 +1,8 @@ local chad_modules = { - "options", - "mappings" + "options", + "mappings", } for i = 1, #chad_modules, 1 do - pcall(require, chad_modules[i]) + pcall(require, chad_modules[i]) end diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 241dd43..5ec40d8 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -1,127 +1,127 @@ local M = { - ui = { - theme = "onedark", - fav_themes = {"onedark", "gruvchad"}, -- for theme toggle - theme_toggler = false, - hidden_statusline = { - -- these are filetypes, not pattern matched - "NvimTree", - "toggleterm" - } - }, - options = { - permanent_undo = true, - ruler = false, - hidden = true, - ignorecase = true, - mouse = "a", - cmdheight = 1, - updatetime = 250, - timeoutlen = 400, - clipboard = "unnamedplus", - number = true, - numberwidth = 2, - expandtab = true, - shiftwidth = 2, - smartindent = true, - mapleader = " ", - autosave = false, - enable_insertNav = true -- navigation in insertmode - }, - -- enable and disable plugins (true for disable) - plugin_status = { - -- UI - nvim_bufferline = true, - galaxyline = true, - nvim_colorizer = true, - dashboard_nvim = true, - blankline = true, - truezen_nvim = true, - better_esc = true, - -- lsp stuff - lspkind = true, - lspsignature = true, - -- git stuff - gitsigns = true, - vim_fugitive = true, - -- misc - neoformat = true, - vim_matchup = true, - autosave_nvim = true, - nvim_comment = true, - neoscroll_nvim = true, - telescope_media = true - }, - -- make sure you dont use same keys twice - mappings = { - truezen = { - ataraxisMode = "zz", - minimalisticmode = "zm", - focusmode = "zf" - }, - comment_nvim = { - comment_toggle = "/" - }, - nvimtree = { - treetoggle = "" - }, - neoformat = { - format = "fm" - }, - dashboard = { - open = "db", - newfile = "fn", - bookmarks = "bm", - sessionload = "l", - sessionsave = "s" - }, - telescope = { - live_grep = "fw", - git_status = "gt", - git_commits = "cm", - find_files = "ff", - buffers = "fb", - help_tags = "fh", - oldfiles = "fo", - themes = "th" - }, - telescope_media = { - media_files = "fp" - }, - bufferline = { - new_buffer = "", - newtab = "b", - close = "", - cycleNext = "", - cyclePrev = "" - }, - fugitive = { - Git = "gs", - diffget_2 = "gh", - diffget_3 = "gl", - git_blame = "gb" - }, - toggleterm = { - toggle_window = "w", - toggle_vert = "v", - toggle_hori = "h", - hide_term = "JK" - }, - insert_nav = { - forward = "", - backward = "", - top_of_line = "", - end_of_line = "", - prev_line = "", - next_line = "" - }, - misc = { - esc_Termmode = "jk", - copywhole_file = "", - toggle_linenr = "n", - theme_toggle = "x" - } - } + ui = { + theme = "onedark", + fav_themes = { "onedark", "gruvchad" }, -- for theme toggle + theme_toggler = false, + hidden_statusline = { + -- these are filetypes, not pattern matched + "NvimTree", + "toggleterm", + }, + }, + options = { + permanent_undo = true, + ruler = false, + hidden = true, + ignorecase = true, + mouse = "a", + cmdheight = 1, + updatetime = 250, + timeoutlen = 400, + clipboard = "unnamedplus", + number = true, + numberwidth = 2, + expandtab = true, + shiftwidth = 2, + smartindent = true, + mapleader = " ", + autosave = false, + enable_insertNav = true, -- navigation in insertmode + }, + -- enable and disable plugins (true for disable) + plugin_status = { + -- UI + nvim_bufferline = true, + galaxyline = true, + nvim_colorizer = true, + dashboard_nvim = true, + blankline = true, + truezen_nvim = true, + better_esc = true, + -- lsp stuff + lspkind = true, + lspsignature = true, + -- git stuff + gitsigns = true, + vim_fugitive = true, + -- misc + neoformat = true, + vim_matchup = true, + autosave_nvim = true, + nvim_comment = true, + neoscroll_nvim = true, + telescope_media = true, + }, + -- make sure you dont use same keys twice + mappings = { + truezen = { + ataraxisMode = "zz", + minimalisticmode = "zm", + focusmode = "zf", + }, + comment_nvim = { + comment_toggle = "/", + }, + nvimtree = { + treetoggle = "", + }, + neoformat = { + format = "fm", + }, + dashboard = { + open = "db", + newfile = "fn", + bookmarks = "bm", + sessionload = "l", + sessionsave = "s", + }, + telescope = { + live_grep = "fw", + git_status = "gt", + git_commits = "cm", + find_files = "ff", + buffers = "fb", + help_tags = "fh", + oldfiles = "fo", + themes = "th", + }, + telescope_media = { + media_files = "fp", + }, + bufferline = { + new_buffer = "", + newtab = "b", + close = "", + cycleNext = "", + cyclePrev = "", + }, + fugitive = { + Git = "gs", + diffget_2 = "gh", + diffget_3 = "gl", + git_blame = "gb", + }, + toggleterm = { + toggle_window = "w", + toggle_vert = "v", + toggle_hori = "h", + hide_term = "JK", + }, + insert_nav = { + forward = "", + backward = "", + top_of_line = "", + end_of_line = "", + prev_line = "", + next_line = "", + }, + misc = { + esc_Termmode = "jk", + copywhole_file = "", + toggle_linenr = "n", + theme_toggle = "x", + }, + }, } return M diff --git a/lua/highlights.lua b/lua/highlights.lua index a9bd1bd..02e70c2 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -25,15 +25,15 @@ local purple = colors.purple -- for guifg , bg local function fg(group, color) - cmd("hi " .. group .. " guifg=" .. color) + cmd("hi " .. group .. " guifg=" .. color) end local function bg(group, color) - cmd("hi " .. group .. " guibg=" .. color) + cmd("hi " .. group .. " guibg=" .. color) end local function fg_bg(group, fgcol, bgcol) - cmd("hi " .. group .. " guifg=" .. fgcol .. " guibg=" .. bgcol) + cmd("hi " .. group .. " guifg=" .. fgcol .. " guibg=" .. bgcol) end -- blankline diff --git a/lua/mappings.lua b/lua/mappings.lua index 16940c1..329e5dd 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -5,11 +5,11 @@ local M = {} local cmd = vim.cmd local function map(mode, lhs, rhs, opts) - local options = {noremap = true, silent = true} - if opts then - options = vim.tbl_extend("force", options, opts) - end - vim.api.nvim_set_keymap(mode, lhs, rhs, options) + local options = { noremap = true, silent = true } + if opts then + options = vim.tbl_extend("force", options, opts) + end + vim.api.nvim_set_keymap(mode, lhs, rhs, options) end local opt = {} @@ -30,10 +30,10 @@ map("v", "p", '"_dP', opt) -- Allow moving the cursor through wrapped lines with j, k, and -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ -- empty mode is same as using :map -map("", "j", 'v:count ? "j" : "gj"', {expr = true}) -map("", "k", 'v:count ? "k" : "gk"', {expr = true}) -map("", "", 'v:count ? "j" : "gj"', {expr = true}) -map("", "", 'v:count ? "k" : "gk"', {expr = true}) +map("", "j", 'v:count ? "j" : "gj"', { expr = true }) +map("", "k", 'v:count ? "k" : "gk"', { expr = true }) +map("", "", 'v:count ? "j" : "gj"', { expr = true }) +map("", "", 'v:count ? "k" : "gk"', { expr = true }) -- copy whole file content map("n", miscMap.copywhole_file, ":%y+", opt) @@ -46,125 +46,125 @@ map("n", miscMap.toggle_linenr, ":set nu!", opt) map("t", miscMap.esc_Termmode, "", opt) M.toggleterm = function() - local m = user_map.toggleterm + local m = user_map.toggleterm - -- Open terminals - map("n", m.toggle_window, ":lua termW:toggle() ", opt) - map("n", m.toggle_vert, ":lua termV:toggle() ", opt) - map("n", m.toggle_hori, ":lua termH:toggle() ", opt) + -- Open terminals + map("n", m.toggle_window, ":lua termW:toggle() ", opt) + map("n", m.toggle_vert, ":lua termV:toggle() ", opt) + map("n", m.toggle_hori, ":lua termH:toggle() ", opt) - -- toggle(HIDE) a term from within terminal edit mode - map("t", m.hide_term, " :ToggleTerm ", opt) - map("t", m.hide_term, " :ToggleTerm ", opt) - map("t", m.hide_term, " :ToggleTerm ", opt) + -- toggle(HIDE) a term from within terminal edit mode + map("t", m.hide_term, " :ToggleTerm ", opt) + map("t", m.hide_term, " :ToggleTerm ", opt) + map("t", m.hide_term, " :ToggleTerm ", opt) end M.truezen = function() - local m = user_map.truezen + local m = user_map.truezen - map("n", m.ataraxisMode, ":TZAtaraxis", opt) - map("n", m.minimalisticmode, ":TZMinimalist", opt) - map("n", m.focusmode, ":TZFocus", opt) + map("n", m.ataraxisMode, ":TZAtaraxis", opt) + map("n", m.minimalisticmode, ":TZMinimalist", opt) + map("n", m.focusmode, ":TZFocus", opt) end map("n", "", ":w ", opt) M.comment_nvim = function() - local m = user_map.comment_nvim.comment_toggle - map("n", m, ":CommentToggle", opt) - map("v", m, ":CommentToggle", opt) + local m = user_map.comment_nvim.comment_toggle + map("n", m, ":CommentToggle", opt) + map("v", m, ":CommentToggle", opt) end M.nvimtree = function() - local m = user_map.nvimtree.treetoggle + local m = user_map.nvimtree.treetoggle - map("n", m, ":NvimTreeToggle", opt) + map("n", m, ":NvimTreeToggle", opt) end M.neoformat = function() - local m = user_map.neoformat.format - map("n", m, ":Neoformat", opt) + local m = user_map.neoformat.format + map("n", m, ":Neoformat", opt) end M.dashboard = function() - local m = user_map.dashboard + local m = user_map.dashboard - map("n", m.open, ":Dashboard", opt) - map("n", m.newfile, ":DashboardNewFile", opt) - map("n", m.bookmarks, ":DashboardJumpMarks", opt) - map("n", m.sessionload, ":SessionLoad", opt) - map("n", m.sessionsave, ":SessionSave", opt) + map("n", m.open, ":Dashboard", opt) + map("n", m.newfile, ":DashboardNewFile", opt) + map("n", m.bookmarks, ":DashboardJumpMarks", opt) + map("n", m.sessionload, ":SessionLoad", opt) + map("n", m.sessionsave, ":SessionSave", opt) end M.telescope = function() - local m = user_map.telescope + local m = user_map.telescope - map("n", m.live_grep, ":Telescope live_grep", opt) - map("n", m.git_status, ":Telescope git_status ", opt) - map("n", m.git_commits, ":Telescope git_commits ", opt) - map("n", m.find_files, ":Telescope find_files ", opt) - map("n", m.buffers, ":Telescope buffers", opt) - map("n", m.help_tags, ":Telescope help_tags", opt) - map("n", m.oldfiles, ":Telescope oldfiles", opt) - map("n", m.themes, ":Telescope themes", opt) + map("n", m.live_grep, ":Telescope live_grep", opt) + map("n", m.git_status, ":Telescope git_status ", opt) + map("n", m.git_commits, ":Telescope git_commits ", opt) + map("n", m.find_files, ":Telescope find_files ", opt) + map("n", m.buffers, ":Telescope buffers", opt) + map("n", m.help_tags, ":Telescope help_tags", opt) + map("n", m.oldfiles, ":Telescope oldfiles", opt) + map("n", m.themes, ":Telescope themes", opt) end M.telescope_media = function() - local m = user_map.telescope_media - map("n", m.media_files, ":Telescope media_files ", opt) + local m = user_map.telescope_media + map("n", m.media_files, ":Telescope media_files ", opt) end M.bufferline = function() - local m = user_map.bufferline + local m = user_map.bufferline - map("n", m.new_buffer, ":enew", opt) -- new buffer - map("n", m.newtab, ":tabnew", opt) -- new tab - map("n", m.close, ":bd!", opt) -- close buffer + map("n", m.new_buffer, ":enew", opt) -- new buffer + map("n", m.newtab, ":tabnew", opt) -- new tab + map("n", m.close, ":bd!", opt) -- close buffer - -- move between tabs + -- move between tabs - map("n", m.cycleNext, ":BufferLineCycleNext", opt) - map("n", m.cyclePrev, ":BufferLineCyclePrev", opt) + map("n", m.cycleNext, ":BufferLineCycleNext", opt) + map("n", m.cyclePrev, ":BufferLineCyclePrev", opt) end -- use ESC to turn off search highlighting map("n", "", ":noh", opt) -- Packer commands till because we are not loading it at startup -cmd("silent! command PackerCompile lua require 'pluginList' require('packer').compile()") -cmd("silent! command PackerInstall lua require 'pluginList' require('packer').install()") -cmd("silent! command PackerStatus lua require 'pluginList' require('packer').status()") -cmd("silent! command PackerSync lua require 'pluginList' require('packer').sync()") -cmd("silent! command PackerUpdate lua require 'pluginList' require('packer').update()") +cmd "silent! command PackerCompile lua require 'pluginList' require('packer').compile()" +cmd "silent! command PackerInstall lua require 'pluginList' require('packer').install()" +cmd "silent! command PackerStatus lua require 'pluginList' require('packer').status()" +cmd "silent! command PackerSync lua require 'pluginList' require('packer').sync()" +cmd "silent! command PackerUpdate lua require 'pluginList' require('packer').update()" M.fugitive = function() - local m = user_map.fugitive + local m = user_map.fugitive - map("n", m.Git, ":Git", opt) - map("n", m.diffget_2, ":diffget //2", opt) - map("n", m.diffget_3, ":diffget //3", opt) - map("n", m.git_blame, ":Git blame", opt) + map("n", m.Git, ":Git", opt) + map("n", m.diffget_2, ":diffget //2", opt) + map("n", m.diffget_3, ":diffget //3", opt) + map("n", m.git_blame, ":Git blame", opt) end -- navigation within insert mode local check_insertNav = require("chadrc").options.enable_insertNav if check_insertNav == true then - local m = user_map.insert_nav + local m = user_map.insert_nav - map("i", m.forward, "", opt) - map("i", m.backward, "", opt) - map("i", m.top_of_line, "^i", opt) - map("i", m.end_of_line, "", opt) - map("i", m.next_line, "", opt) - map("i", m.prev_line, "", opt) + map("i", m.forward, "", opt) + map("i", m.backward, "", opt) + map("i", m.top_of_line, "^i", opt) + map("i", m.end_of_line, "", opt) + map("i", m.next_line, "", opt) + map("i", m.prev_line, "", opt) end local theme_toggler = require("chadrc").ui.theme_toggler if theme_toggler == true then - local m = user_map.misc.theme_toggle + local m = user_map.misc.theme_toggle - map("n", m, ":lua require('utils').toggle_theme(require('chadrc').ui.fav_themes)", opt) + map("n", m, ":lua require('utils').toggle_theme(require('chadrc').ui.fav_themes)", opt) end return M diff --git a/lua/options.lua b/lua/options.lua index df485ce..96016ec 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -2,7 +2,7 @@ local options = require("chadrc").options local opt = vim.opt local g = vim.g -opt.completeopt = {"menuone", "noselect"} +opt.completeopt = { "menuone", "noselect" } opt.undofile = options.permanent_undo opt.ruler = options.ruler opt.hidden = options.hidden @@ -19,10 +19,10 @@ opt.timeoutlen = options.timeoutlen opt.clipboard = options.clipboard -- disable nvim intro -opt.shortmess:append("sI") +opt.shortmess:append "sI" -- disable tilde on end of buffer: https://github.com/ neovim/neovim/pull/8546#issuecomment-643643758 -opt.fillchars = {eob = " "} +opt.fillchars = { eob = " " } -- Numbers opt.number = options.number @@ -36,35 +36,35 @@ opt.smartindent = options.smartindent -- go to previous/next line with h,l,left arrow and right arrow -- when cursor reaches end/beginning of line -opt.whichwrap:append("<>hl") +opt.whichwrap:append "<>hl" g.mapleader = options.mapleader g.auto_save = options.autosave -- disable builtin vim plugins local disabled_built_ins = { - "netrw", - "netrwPlugin", - "netrwSettings", - "netrwFileHandlers", - "gzip", - "zip", - "zipPlugin", - "tar", - "tarPlugin", - "getscript", - "getscriptPlugin", - "vimball", - "vimballPlugin", - "2html_plugin", - "logipat", - "rrhelper", - "spellfile_plugin", - "matchit" + "netrw", + "netrwPlugin", + "netrwSettings", + "netrwFileHandlers", + "gzip", + "zip", + "zipPlugin", + "tar", + "tarPlugin", + "getscript", + "getscriptPlugin", + "vimball", + "vimballPlugin", + "2html_plugin", + "logipat", + "rrhelper", + "spellfile_plugin", + "matchit", } for _, plugin in pairs(disabled_built_ins) do - g["loaded_" .. plugin] = 1 + g["loaded_" .. plugin] = 1 end -- Don't show status line on certain windows diff --git a/lua/packerInit.lua b/lua/packerInit.lua index 73975bb..8b0561c 100644 --- a/lua/packerInit.lua +++ b/lua/packerInit.lua @@ -1,47 +1,45 @@ local cmd = vim.cmd -cmd("packadd packer.nvim") +cmd "packadd packer.nvim" local present, packer = pcall(require, "packer") if not present then - local packer_path = vim.fn.stdpath("data") .. "/site/pack/packer/opt/packer.nvim" + local packer_path = vim.fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim" - print("Cloning packer..") - -- remove the dir before cloning - vim.fn.delete(packer_path, "rf") - vim.fn.system( - { - "git", - "clone", - "https://github.com/wbthomason/packer.nvim", - "--depth", - "20", - packer_path - } - ) + print "Cloning packer.." + -- remove the dir before cloning + vim.fn.delete(packer_path, "rf") + vim.fn.system { + "git", + "clone", + "https://github.com/wbthomason/packer.nvim", + "--depth", + "20", + packer_path, + } - cmd("packadd packer.nvim") - present, packer = pcall(require, "packer") + cmd "packadd packer.nvim" + present, packer = pcall(require, "packer") - if present then - print("Packer cloned successfully.") - else - error("Couldn't clone packer !\nPacker path: " .. packer_path) - end + if present then + print "Packer cloned successfully." + else + error("Couldn't clone packer !\nPacker path: " .. packer_path) + end end return packer.init { - display = { - open_fn = function() - return require("packer.util").float {border = "single"} - end, - prompt_border = "single" - }, - git = { - clone_timeout = 600 -- Timeout, in seconds, for git clones - }, - auto_clean = true, - compile_on_sync = true - -- auto_reload_compiled = true + display = { + open_fn = function() + return require("packer.util").float { border = "single" } + end, + prompt_border = "single", + }, + git = { + clone_timeout = 600, -- Timeout, in seconds, for git clones + }, + auto_clean = true, + compile_on_sync = true, + -- auto_reload_compiled = true } diff --git a/lua/pluginList.lua b/lua/pluginList.lua index d67e7aa..06acb47 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -4,315 +4,313 @@ local present, _ = pcall(require, "packerInit") local packer if present then - packer = require "packer" + packer = require "packer" else - return false + return false end local use = packer.use -return packer.startup( - function() - use { - "wbthomason/packer.nvim", - event = "VimEnter" - } +return packer.startup(function() + use { + "wbthomason/packer.nvim", + event = "VimEnter", + } - use { - "jdhao/better-escape.vim", - disable = not plugin_status.better_esc, - event = "InsertEnter", - config = function() - require "plugins.others".escape() - end - } + use { + "jdhao/better-escape.vim", + disable = not plugin_status.better_esc, + event = "InsertEnter", + config = function() + require("plugins.others").escape() + end, + } - use { - "akinsho/nvim-bufferline.lua", - disable = not plugin_status.nvim_bufferline, - after = "nvim-base16.lua", + use { + "akinsho/nvim-bufferline.lua", + disable = not plugin_status.nvim_bufferline, + after = "nvim-base16.lua", + config = function() + require "plugins.bufferline" + end, + setup = function() + require("mappings").bufferline() + end, + } + + use { + "glepnir/galaxyline.nvim", + disable = not plugin_status.galaxyline, + after = "nvim-base16.lua", + config = function() + require "plugins.statusline" + end, + } + + -- color related stuff + use { + "NvChad/nvim-base16.lua", + after = "packer.nvim", + config = function() + require "theme" + end, + } + + use { + "norcalli/nvim-colorizer.lua", + disable = not plugin_status.nvim_colorizer, + event = "BufRead", + config = function() + require("plugins.others").colorizer() + end, + } + + -- lsp stuff + use { + "nvim-treesitter/nvim-treesitter", + event = "BufRead", + config = function() + require "plugins.treesitter" + end, + } + + use { + "kabouzeid/nvim-lspinstall", + event = "BufRead", + } + + use { + "neovim/nvim-lspconfig", + after = "nvim-lspinstall", + config = function() + require "plugins.lspconfig" + end, + } + + use { + "onsails/lspkind-nvim", + disable = not plugin_status.lspkind, + event = "BufEnter", + config = function() + require("plugins.others").lspkind() + end, + } + + use { + "ray-x/lsp_signature.nvim", + disable = not plugin_status.lspsignature, + after = "nvim-lspconfig", + config = function() + require("plugins.others").signature() + end, + } + + -- load compe in insert mode only + use { + "hrsh7th/nvim-compe", + event = "InsertEnter", + config = function() + require "plugins.compe" + end, + wants = "LuaSnip", + requires = { + { + "L3MON4D3/LuaSnip", + wants = "friendly-snippets", + event = "InsertCharPre", config = function() - require "plugins.bufferline" + require "plugins.luasnip" end, + }, + { + "rafamadriz/friendly-snippets", + event = "InsertCharPre", + }, + }, + } + + use { + "sbdchd/neoformat", + disable = not plugin_status.neoformat, + cmd = "Neoformat", + setup = function() + require("mappings").neoformat() + end, + } + + -- file managing , picker etc + use { + "kyazdani42/nvim-tree.lua", + cmd = "NvimTreeToggle", + config = function() + require "plugins.nvimtree" + end, + setup = function() + require("mappings").nvimtree() + end, + } + + use { + "kyazdani42/nvim-web-devicons", + after = "nvim-base16.lua", + config = function() + require "plugins.icons" + end, + } + + use { + "nvim-lua/plenary.nvim", + event = "BufRead", + } + use { + "nvim-lua/popup.nvim", + after = "plenary.nvim", + } + + use { + "nvim-telescope/telescope.nvim", + cmd = "Telescope", + requires = { + { + "nvim-telescope/telescope-fzf-native.nvim", + run = "make", + }, + { + "nvim-telescope/telescope-media-files.nvim", + disable = not plugin_status.telescope_media, setup = function() - require "mappings".bufferline() - end - } - - use { - "glepnir/galaxyline.nvim", - disable = not plugin_status.galaxyline, - after = "nvim-base16.lua", - config = function() - require "plugins.statusline" - end - } - - -- color related stuff - use { - "NvChad/nvim-base16.lua", - after = "packer.nvim", - config = function() - require "theme" - end - } - - use { - "norcalli/nvim-colorizer.lua", - disable = not plugin_status.nvim_colorizer, - event = "BufRead", - config = function() - require("plugins.others").colorizer() - end - } - - -- lsp stuff - use { - "nvim-treesitter/nvim-treesitter", - event = "BufRead", - config = function() - require "plugins.treesitter" - end - } - - use { - "kabouzeid/nvim-lspinstall", - event = "BufRead" - } - - use { - "neovim/nvim-lspconfig", - after = "nvim-lspinstall", - config = function() - require "plugins.lspconfig" - end - } - - use { - "onsails/lspkind-nvim", - disable = not plugin_status.lspkind, - event = "BufEnter", - config = function() - require("plugins.others").lspkind() - end - } - - use { - "ray-x/lsp_signature.nvim", - disable = not plugin_status.lspsignature, - after = "nvim-lspconfig", - config = function() - require("plugins.others").signature() - end - } - - -- load compe in insert mode only - use { - "hrsh7th/nvim-compe", - event = "InsertEnter", - config = function() - require "plugins.compe" + require("mappings").telescope_media() end, - wants = "LuaSnip", - requires = { - { - "L3MON4D3/LuaSnip", - wants = "friendly-snippets", - event = "InsertCharPre", - config = function() - require "plugins.luasnip" - end - }, - { - "rafamadriz/friendly-snippets", - event = "InsertCharPre" - } - } - } + }, + }, + config = function() + require "plugins.telescope" + end, + setup = function() + require("mappings").telescope() + end, + } - use { - "sbdchd/neoformat", - disable = not plugin_status.neoformat, - cmd = "Neoformat", - setup = function() - require "mappings".neoformat() - end - } + -- git stuff + use { + "lewis6991/gitsigns.nvim", + disable = not plugin_status.gitsigns, + after = "plenary.nvim", + config = function() + require "plugins.gitsigns" + end, + } - -- file managing , picker etc - use { - "kyazdani42/nvim-tree.lua", - cmd = "NvimTreeToggle", - config = function() - require "plugins.nvimtree" - end, - setup = function() - require "mappings".nvimtree() - end - } + -- misc plugins + use { + "akinsho/nvim-toggleterm.lua", + event = "BufWinEnter", + config = function() + require "plugins.toggleterm" + end, + setup = function() + require("mappings").toggleterm() + end, + } + use { + "windwp/nvim-autopairs", + after = "nvim-compe", + config = function() + require "plugins.autopairs" + end, + } - use { - "kyazdani42/nvim-web-devicons", - after = "nvim-base16.lua", - config = function() - require "plugins.icons" - end - } + use { + "andymass/vim-matchup", + disable = not plugin_status.vim_matchup, + event = "CursorMoved", + } - use { - "nvim-lua/plenary.nvim", - event = "BufRead" - } - use { - "nvim-lua/popup.nvim", - after = "plenary.nvim" - } + use { + "terrortylor/nvim-comment", + disable = not plugin_status.nvim_comment, + cmd = "CommentToggle", + config = function() + require("plugins.others").comment() + end, + setup = function() + require("mappings").comment_nvim() + end, + } - use { - "nvim-telescope/telescope.nvim", - cmd = "Telescope", - requires = { - { - "nvim-telescope/telescope-fzf-native.nvim", - run = "make" - }, - { - "nvim-telescope/telescope-media-files.nvim", - disable = not plugin_status.telescope_media, - setup = function() - require "mappings".telescope_media() - end - } - }, - config = function() - require "plugins.telescope" - end, - setup = function() - require "mappings".telescope() - end - } + use { + "glepnir/dashboard-nvim", + disable = not plugin_status.dashboard_nvim, + cmd = { + "Dashboard", + "DashboardNewFile", + "DashboardJumpMarks", + "SessionLoad", + "SessionSave", + }, + setup = function() + require "plugins.dashboard" + require("mappings").dashboard() + end, + } - -- git stuff - use { - "lewis6991/gitsigns.nvim", - disable = not plugin_status.gitsigns, - after = "plenary.nvim", - config = function() - require "plugins.gitsigns" - end - } + -- load autosave only if its globally enabled + use { + disable = not plugin_status.autosave_nvim, + "Pocco81/AutoSave.nvim", + config = function() + require "plugins.autosave" + end, + cond = function() + return vim.g.auto_save == true + end, + } - -- misc plugins - use { - "akinsho/nvim-toggleterm.lua", - event = "BufWinEnter", - config = function() - require "plugins.toggleterm" - end, - setup = function() - require "mappings".toggleterm() - end - } - use { - "windwp/nvim-autopairs", - after = "nvim-compe", - config = function() - require "plugins.autopairs" - end - } + -- smooth scroll + use { + "karb94/neoscroll.nvim", + disable = not plugin_status.neoscroll_nvim, + event = "WinScrolled", + config = function() + require("plugins.others").neoscroll() + end, + } - use { - "andymass/vim-matchup", - disable = not plugin_status.vim_matchup, - event = "CursorMoved" - } + use { + "Pocco81/TrueZen.nvim", + disable = not plugin_status.truezen_nvim, + cmd = { + "TZAtaraxis", + "TZMinimalist", + "TZFocus", + }, + config = function() + require "plugins.zenmode" + end, + setup = function() + require("mappings").truezen() + end, + } - use { - "terrortylor/nvim-comment", - disable = not plugin_status.nvim_comment, - cmd = "CommentToggle", - config = function() - require("plugins.others").comment() - end, - setup = function() - require "mappings".comment_nvim() - end - } + -- use "alvan/vim-closetag" -- for html autoclosing tag - use { - "glepnir/dashboard-nvim", - disable = not plugin_status.dashboard_nvim, - cmd = { - "Dashboard", - "DashboardNewFile", - "DashboardJumpMarks", - "SessionLoad", - "SessionSave" - }, - setup = function() - require "plugins.dashboard" - require "mappings".dashboard() - end - } + use { + "lukas-reineke/indent-blankline.nvim", + disable = not plugin_status.blankline, + event = "BufRead", + setup = function() + require("plugins.others").blankline() + end, + } - -- load autosave only if its globally enabled - use { - disable = not plugin_status.autosave_nvim, - "Pocco81/AutoSave.nvim", - config = function() - require "plugins.autosave" - end, - cond = function() - return vim.g.auto_save == true - end - } - - -- smooth scroll - use { - "karb94/neoscroll.nvim", - disable = not plugin_status.neoscroll_nvim, - event = "WinScrolled", - config = function() - require("plugins.others").neoscroll() - end - } - - use { - "Pocco81/TrueZen.nvim", - disable = not plugin_status.truezen_nvim, - cmd = { - "TZAtaraxis", - "TZMinimalist", - "TZFocus" - }, - config = function() - require "plugins.zenmode" - end, - setup = function() - require "mappings".truezen() - end - } - - -- use "alvan/vim-closetag" -- for html autoclosing tag - - use { - "lukas-reineke/indent-blankline.nvim", - disable = not plugin_status.blankline, - event = "BufRead", - setup = function() - require("plugins.others").blankline() - end - } - - use { - "tpope/vim-fugitive", - disable = not plugin_status.vim_fugitive, - cmd = { - "Git" - }, - setup = function() - require "mappings".fugitive() - end - } - end -) + use { + "tpope/vim-fugitive", + disable = not plugin_status.vim_fugitive, + cmd = { + "Git", + }, + setup = function() + require("mappings").fugitive() + end, + } +end) diff --git a/lua/plugins/autopairs.lua b/lua/plugins/autopairs.lua index 4d035e6..333a852 100644 --- a/lua/plugins/autopairs.lua +++ b/lua/plugins/autopairs.lua @@ -2,13 +2,11 @@ local present1, autopairs = pcall(require, "nvim-autopairs") local present2, autopairs_completion = pcall(require, "nvim-autopairs.completion.compe") if not (present1 or present2) then - return + return end autopairs.setup() -autopairs_completion.setup( - { - map_cr = true, - map_complete = true -- insert () func completion - } -) +autopairs_completion.setup { + map_cr = true, + map_complete = true, -- insert () func completion +} diff --git a/lua/plugins/autosave.lua b/lua/plugins/autosave.lua index 559ce3f..4041401 100644 --- a/lua/plugins/autosave.lua +++ b/lua/plugins/autosave.lua @@ -1,21 +1,19 @@ -- autosave.nvim plugin disabled by default local present, autosave = pcall(require, "autosave") if not present then - return + return end -autosave.setup( - { - enabled = vim.g.auto_save, -- takes boolean value from init.lua - execution_message = "autosaved at : " .. vim.fn.strftime("%H:%M:%S"), - events = {"InsertLeave", "TextChanged"}, - conditions = { - exists = true, - filetype_is_not = {}, - modifiable = true - }, - write_all_buffers = false, - on_off_commands = true, - clean_command_line_interval = 2500 - } -) +autosave.setup { + enabled = vim.g.auto_save, -- takes boolean value from init.lua + execution_message = "autosaved at : " .. vim.fn.strftime "%H:%M:%S", + events = { "InsertLeave", "TextChanged" }, + conditions = { + exists = true, + filetype_is_not = {}, + modifiable = true, + }, + write_all_buffers = false, + on_off_commands = true, + clean_command_line_interval = 2500, +} diff --git a/lua/plugins/bufferline.lua b/lua/plugins/bufferline.lua index ed01a76..06236d5 100644 --- a/lua/plugins/bufferline.lua +++ b/lua/plugins/bufferline.lua @@ -3,103 +3,103 @@ local colors = require(global_theme) local present, bufferline = pcall(require, "bufferline") if not present then - return + return end bufferline.setup { - options = { - offsets = {{filetype = "NvimTree", text = "", padding = 1}}, - buffer_close_icon = "", - modified_icon = "", - close_icon = "", - left_trunc_marker = "", - right_trunc_marker = "", - max_name_length = 14, - max_prefix_length = 13, - tab_size = 20, - show_tab_indicators = true, - enforce_regular_tabs = false, - view = "multiwindow", - show_buffer_close_icons = true, - separator_style = "thin", - mappings = true, - always_show_bufferline = true - }, - highlights = { - fill = { - guifg = colors.grey_fg, - guibg = colors.black2 - }, - background = { - guifg = colors.grey_fg, - guibg = colors.black2 - }, - -- buffers - buffer_visible = { - guifg = colors.light_grey, - guibg = colors.black2 - }, - buffer_selected = { - guifg = colors.white, - guibg = colors.black, - gui = "bold" - }, - -- tabs - tab = { - guifg = colors.light_grey, - guibg = colors.one_bg3 - }, - tab_selected = { - guifg = colors.black2, - guibg = colors.nord_blue - }, - tab_close = { - guifg = colors.red, - guibg = colors.black - }, - indicator_selected = { - guifg = colors.black, - guibg = colors.black - }, - -- separators - separator = { - guifg = colors.black2, - guibg = colors.black2 - }, - separator_visible = { - guifg = colors.black2, - guibg = colors.black2 - }, - separator_selected = { - guifg = colors.black2, - guibg = colors.black2 - }, - -- modified - modified = { - guifg = colors.red, - guibg = colors.black2 - }, - modified_visible = { - guifg = colors.red, - guibg = colors.black2 - }, - modified_selected = { - guifg = colors.green, - guibg = colors.black - }, - -- close buttons + options = { + offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, + buffer_close_icon = "", + modified_icon = "", + close_icon = "", + left_trunc_marker = "", + right_trunc_marker = "", + max_name_length = 14, + max_prefix_length = 13, + tab_size = 20, + show_tab_indicators = true, + enforce_regular_tabs = false, + view = "multiwindow", + show_buffer_close_icons = true, + separator_style = "thin", + mappings = true, + always_show_bufferline = true, + }, + highlights = { + fill = { + guifg = colors.grey_fg, + guibg = colors.black2, + }, + background = { + guifg = colors.grey_fg, + guibg = colors.black2, + }, + -- buffers + buffer_visible = { + guifg = colors.light_grey, + guibg = colors.black2, + }, + buffer_selected = { + guifg = colors.white, + guibg = colors.black, + gui = "bold", + }, + -- tabs + tab = { + guifg = colors.light_grey, + guibg = colors.one_bg3, + }, + tab_selected = { + guifg = colors.black2, + guibg = colors.nord_blue, + }, + tab_close = { + guifg = colors.red, + guibg = colors.black, + }, + indicator_selected = { + guifg = colors.black, + guibg = colors.black, + }, + -- separators + separator = { + guifg = colors.black2, + guibg = colors.black2, + }, + separator_visible = { + guifg = colors.black2, + guibg = colors.black2, + }, + separator_selected = { + guifg = colors.black2, + guibg = colors.black2, + }, + -- modified + modified = { + guifg = colors.red, + guibg = colors.black2, + }, + modified_visible = { + guifg = colors.red, + guibg = colors.black2, + }, + modified_selected = { + guifg = colors.green, + guibg = colors.black, + }, + -- close buttons - close_button = { - guifg = colors.light_grey, - guibg = colors.black2 - }, - close_button_visible = { - guifg = colors.light_grey, - guibg = colors.black2 - }, - close_button_selected = { - guifg = colors.red, - guibg = colors.black - } - } + close_button = { + guifg = colors.light_grey, + guibg = colors.black2, + }, + close_button_visible = { + guifg = colors.light_grey, + guibg = colors.black2, + }, + close_button_selected = { + guifg = colors.red, + guibg = colors.black, + }, + }, } diff --git a/lua/plugins/compe.lua b/lua/plugins/compe.lua index 238ca7c..0fa4d0f 100644 --- a/lua/plugins/compe.lua +++ b/lua/plugins/compe.lua @@ -1,25 +1,25 @@ local present, compe = pcall(require, "compe") if not present then - return + return end compe.setup { - enabled = true, - autocomplete = true, - debug = false, - min_length = 1, - preselect = "enable", - throttle_time = 80, - source_timeout = 200, - incomplete_delay = 400, - max_abbr_width = 100, - max_kind_width = 100, - max_menu_width = 100, - documentation = true, - source = { - buffer = {kind = "﬘", true}, - luasnip = {kind = "﬌", true}, - nvim_lsp = true, - nvim_lua = true - } + enabled = true, + autocomplete = true, + debug = false, + min_length = 1, + preselect = "enable", + throttle_time = 80, + source_timeout = 200, + incomplete_delay = 400, + max_abbr_width = 100, + max_kind_width = 100, + max_menu_width = 100, + documentation = true, + source = { + buffer = { kind = "﬘", true }, + luasnip = { kind = "﬌", true }, + nvim_lsp = true, + nvim_lua = true, + }, } diff --git a/lua/plugins/dashboard.lua b/lua/plugins/dashboard.lua index 54d317e..d7296c8 100644 --- a/lua/plugins/dashboard.lua +++ b/lua/plugins/dashboard.lua @@ -7,34 +7,34 @@ g.dashboard_disable_at_vimenter = 1 -- dashboard is disabled by default g.dashboard_disable_statusline = 1 g.dashboard_default_executive = "telescope" g.dashboard_custom_header = { - " ", - " ", - " ", - " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", - " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", - " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", - " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", - " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", - " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", - " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", - " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", - " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", - " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", - " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", - " " + " ", + " ", + " ", + " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", + " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", + " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", + " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", + " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", + " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", + " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", + " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", + " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", + " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", + " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", + " ", } g.dashboard_custom_section = { - a = {description = {" Find File SPC f f"}, command = "Telescope find_files"}, - b = {description = {" Recents SPC f o"}, command = "Telescope oldfiles"}, - c = {description = {" Find Word SPC f w"}, command = "Telescope live_grep"}, - d = {description = {"洛 New File SPC f n"}, command = "DashboardNewFile"}, - e = {description = {" Bookmarks SPC b m"}, command = "Telescope marks"}, - f = {description = {" Load Last Session SPC s l"}, command = "SessionLoad"} + a = { description = { " Find File SPC f f" }, command = "Telescope find_files" }, + b = { description = { " Recents SPC f o" }, command = "Telescope oldfiles" }, + c = { description = { " Find Word SPC f w" }, command = "Telescope live_grep" }, + d = { description = { "洛 New File SPC f n" }, command = "DashboardNewFile" }, + e = { description = { " Bookmarks SPC b m" }, command = "Telescope marks" }, + f = { description = { " Load Last Session SPC s l" }, command = "SessionLoad" }, } g.dashboard_custom_footer = { - " ", - -- "NvChad Loaded " .. plugins_count .. " plugins", - "NvChad v0.5" + " ", + -- "NvChad Loaded " .. plugins_count .. " plugins", + "NvChad v0.5", } diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index e2309ec..e1fa6c8 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -1,32 +1,32 @@ local present, gitsigns = pcall(require, "gitsigns") if not present then - return + return end gitsigns.setup { - signs = { - add = {hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr"}, - change = {hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr"}, - delete = {hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr"}, - topdelete = {hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr"}, - changedelete = {hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr"} - }, - numhl = false, - keymaps = { - -- Default keymap options - noremap = true, - buffer = true, - ["n ]c"] = {expr = true, '&diff ? \']c\' : \'lua require"gitsigns".next_hunk()\''}, - ["n [c"] = {expr = true, '&diff ? \'[c\' : \'lua require"gitsigns".prev_hunk()\''}, - ["n hs"] = 'lua require"gitsigns".stage_hunk()', - ["n hu"] = 'lua require"gitsigns".undo_stage_hunk()', - ["n hr"] = 'lua require"gitsigns".reset_hunk()', - ["n hp"] = 'lua require"gitsigns".preview_hunk()', - ["n hb"] = 'lua require"gitsigns".blame_line()' - }, - watch_index = { - interval = 100 - }, - sign_priority = 5, - status_formatter = nil -- Use default + signs = { + add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, + change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, + delete = { hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr" }, + topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, + changedelete = { hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr" }, + }, + numhl = false, + keymaps = { + -- Default keymap options + noremap = true, + buffer = true, + ["n ]c"] = { expr = true, "&diff ? ']c' : 'lua require\"gitsigns\".next_hunk()'" }, + ["n [c"] = { expr = true, "&diff ? '[c' : 'lua require\"gitsigns\".prev_hunk()'" }, + ["n hs"] = 'lua require"gitsigns".stage_hunk()', + ["n hu"] = 'lua require"gitsigns".undo_stage_hunk()', + ["n hr"] = 'lua require"gitsigns".reset_hunk()', + ["n hp"] = 'lua require"gitsigns".preview_hunk()', + ["n hb"] = 'lua require"gitsigns".blame_line()', + }, + watch_index = { + interval = 100, + }, + sign_priority = 5, + status_formatter = nil, -- Use default } diff --git a/lua/plugins/icons.lua b/lua/plugins/icons.lua index 3425fde..47fa00f 100644 --- a/lua/plugins/icons.lua +++ b/lua/plugins/icons.lua @@ -1,122 +1,122 @@ local present, icons = pcall(require, "nvim-web-devicons") if not present then - return + return end local global_theme = "themes/" .. vim.g.nvchad_theme local colors = require(global_theme) icons.setup { - override = { - html = { - icon = "", - color = colors.baby_pink, - name = "html" - }, - css = { - icon = "", - color = colors.blue, - name = "css" - }, - js = { - icon = "", - color = colors.sun, - name = "js" - }, - ts = { - icon = "ﯤ", - color = colors.teal, - name = "ts" - }, - kt = { - icon = "󱈙", - color = colors.orange, - name = "kt" - }, - png = { - icon = "", - color = colors.dark_purple, - name = "png" - }, - jpg = { - icon = "", - color = colors.dark_purple, - name = "jpg" - }, - jpeg = { - icon = "", - color = colors.dark_purple, - name = "jpeg" - }, - mp3 = { - icon = "", - color = colors.white, - name = "mp3" - }, - mp4 = { - icon = "", - color = colors.white, - name = "mp4" - }, - out = { - icon = "", - color = colors.white, - name = "out" - }, - Dockerfile = { - icon = "", - color = colors.cyan, - name = "Dockerfile" - }, - rb = { - icon = "", - color = colors.pink, - name = "rb" - }, - vue = { - icon = "﵂", - color = colors.vibrant_green, - name = "vue" - }, - py = { - icon = "", - color = colors.cyan, - name = "py" - }, - toml = { - icon = "", - color = colors.blue, - name = "toml" - }, - lock = { - icon = "", - color = colors.red, - name = "lock" - }, - zip = { - icon = "", - color = colors.sun, - name = "zip" - }, - xz = { - icon = "", - color = colors.sun, - name = "xz" - }, - deb = { - icon = "", - color = colors.cyan, - name = "deb" - }, - rpm = { - icon = "", - color = colors.orange, - name = "rpm" - }, - lua = { - icon = "", - color = colors.blue, - name = "lua" - } - } + override = { + html = { + icon = "", + color = colors.baby_pink, + name = "html", + }, + css = { + icon = "", + color = colors.blue, + name = "css", + }, + js = { + icon = "", + color = colors.sun, + name = "js", + }, + ts = { + icon = "ﯤ", + color = colors.teal, + name = "ts", + }, + kt = { + icon = "󱈙", + color = colors.orange, + name = "kt", + }, + png = { + icon = "", + color = colors.dark_purple, + name = "png", + }, + jpg = { + icon = "", + color = colors.dark_purple, + name = "jpg", + }, + jpeg = { + icon = "", + color = colors.dark_purple, + name = "jpeg", + }, + mp3 = { + icon = "", + color = colors.white, + name = "mp3", + }, + mp4 = { + icon = "", + color = colors.white, + name = "mp4", + }, + out = { + icon = "", + color = colors.white, + name = "out", + }, + Dockerfile = { + icon = "", + color = colors.cyan, + name = "Dockerfile", + }, + rb = { + icon = "", + color = colors.pink, + name = "rb", + }, + vue = { + icon = "﵂", + color = colors.vibrant_green, + name = "vue", + }, + py = { + icon = "", + color = colors.cyan, + name = "py", + }, + toml = { + icon = "", + color = colors.blue, + name = "toml", + }, + lock = { + icon = "", + color = colors.red, + name = "lock", + }, + zip = { + icon = "", + color = colors.sun, + name = "zip", + }, + xz = { + icon = "", + color = colors.sun, + name = "xz", + }, + deb = { + icon = "", + color = colors.cyan, + name = "deb", + }, + rpm = { + icon = "", + color = colors.orange, + name = "rpm", + }, + lua = { + icon = "", + color = colors.blue, + name = "lua", + }, + }, } diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 2799e05..8e67559 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,42 +1,42 @@ local present1, lspconfig = pcall(require, "lspconfig") local present2, lspinstall = pcall(require, "lspinstall") if not (present1 or present2) then - return + return end local function on_attach(client, bufnr) - vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") + vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") - local opts = {noremap = true, silent = true} + local opts = { noremap = true, silent = true } - local function buf_set_keymap(...) - vim.api.nvim_buf_set_keymap(bufnr, ...) - end + local function buf_set_keymap(...) + vim.api.nvim_buf_set_keymap(bufnr, ...) + end - -- Mappings. + -- Mappings. - buf_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) - buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) - buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()", opts) - buf_set_keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) - buf_set_keymap("n", "", "lua vim.lsp.buf.signature_help()", opts) - buf_set_keymap("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) - buf_set_keymap("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) - buf_set_keymap("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) - buf_set_keymap("n", "D", "lua vim.lsp.buf.type_definition()", opts) - buf_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", opts) - buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()", opts) - buf_set_keymap("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) - buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) - buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) - buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) + buf_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) + buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) + buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()", opts) + buf_set_keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) + buf_set_keymap("n", "", "lua vim.lsp.buf.signature_help()", opts) + buf_set_keymap("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) + buf_set_keymap("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) + buf_set_keymap("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) + buf_set_keymap("n", "D", "lua vim.lsp.buf.type_definition()", opts) + buf_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", opts) + buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()", opts) + buf_set_keymap("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) + buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) + buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) + buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) - -- Set some keybinds conditional on server capabilities - if client.resolved_capabilities.document_formatting then - buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) - elseif client.resolved_capabilities.document_range_formatting then - buf_set_keymap("n", "f", "lua vim.lsp.buf.range_formatting()", opts) - end + -- Set some keybinds conditional on server capabilities + if client.resolved_capabilities.document_formatting then + buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) + elseif client.resolved_capabilities.document_range_formatting then + buf_set_keymap("n", "f", "lua vim.lsp.buf.range_formatting()", opts) + end end local capabilities = vim.lsp.protocol.make_client_capabilities() @@ -45,53 +45,53 @@ capabilities.textDocument.completion.completionItem.snippetSupport = true -- lspInstall + lspconfig stuff local function setup_servers() - lspinstall.setup() - local servers = lspinstall.installed_servers() + lspinstall.setup() + local servers = lspinstall.installed_servers() - for _, lang in pairs(servers) do - if lang ~= "lua" then - lspconfig[lang].setup { - on_attach = on_attach, - capabilities = capabilities, - root_dir = vim.loop.cwd - } - elseif lang == "lua" then - lspconfig[lang].setup { - root_dir = vim.loop.cwd, - settings = { - Lua = { - diagnostics = { - globals = {"vim"} - }, - workspace = { - library = { - [vim.fn.expand("$VIMRUNTIME/lua")] = true, - [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true - }, - maxPreload = 100000, - preloadFileSize = 10000 - }, - telemetry = { - enable = false - } - } - } - } - end - end + for _, lang in pairs(servers) do + if lang ~= "lua" then + lspconfig[lang].setup { + on_attach = on_attach, + capabilities = capabilities, + root_dir = vim.loop.cwd, + } + elseif lang == "lua" then + lspconfig[lang].setup { + root_dir = vim.loop.cwd, + settings = { + Lua = { + diagnostics = { + globals = { "vim" }, + }, + workspace = { + library = { + [vim.fn.expand "$VIMRUNTIME/lua"] = true, + [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true, + }, + maxPreload = 100000, + preloadFileSize = 10000, + }, + telemetry = { + enable = false, + }, + }, + }, + } + end + end end setup_servers() -- Automatically reload after `:LspInstall ` so we don't have to restart neovim lspinstall.post_install_hook = function() - setup_servers() -- reload installed servers - vim.cmd("bufdo e") -- triggers FileType autocmd that starts the server + setup_servers() -- reload installed servers + vim.cmd "bufdo e" end -- replace the default lsp diagnostic symbols function lspSymbol(name, icon) - vim.fn.sign_define("LspDiagnosticsSign" .. name, {text = icon, numhl = "LspDiagnosticsDefaul" .. name}) + vim.fn.sign_define("LspDiagnosticsSign" .. name, { text = icon, numhl = "LspDiagnosticsDefaul" .. name }) end lspSymbol("Error", "") @@ -99,29 +99,25 @@ lspSymbol("Warning", "") lspSymbol("Information", "") lspSymbol("Hint", "") -vim.lsp.handlers["textDocument/publishDiagnostics"] = - vim.lsp.with( - vim.lsp.diagnostic.on_publish_diagnostics, - { - virtual_text = { - prefix = "", - spacing = 0 - }, - signs = true, - underline = true, - -- set this to true if you want diagnostics to show in insert mode - update_in_insert = false - } -) +vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { + virtual_text = { + prefix = "", + spacing = 0, + }, + signs = true, + underline = true, + -- set this to true if you want diagnostics to show in insert mode + update_in_insert = false, +}) -- suppress error messages from lang servers vim.notify = function(msg, log_level, _opts) - if msg:match("exit code") then - return - end - if log_level == vim.log.levels.ERROR then - vim.api.nvim_err_writeln(msg) - else - vim.api.nvim_echo({{msg}}, true, {}) - end + if msg:match "exit code" then + return + end + if log_level == vim.log.levels.ERROR then + vim.api.nvim_err_writeln(msg) + else + vim.api.nvim_echo({ { msg } }, true, {}) + end end diff --git a/lua/plugins/luasnip.lua b/lua/plugins/luasnip.lua index d15cd79..ef67a1c 100644 --- a/lua/plugins/luasnip.lua +++ b/lua/plugins/luasnip.lua @@ -1,72 +1,66 @@ local present, luasnip = pcall(require, "luasnip") if not present then - return + return end local t = function(str) - return vim.api.nvim_replace_termcodes(str, true, true, true) + return vim.api.nvim_replace_termcodes(str, true, true, true) end local check_back_space = function() - local col = vim.fn.col(".") - 1 - if col == 0 or vim.fn.getline("."):sub(col, col):match("%s") then - return true - else - return false - end + local col = vim.fn.col "." - 1 + if col == 0 or vim.fn.getline("."):sub(col, col):match "%s" then + return true + else + return false + end end _G.tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t "" - elseif luasnip and luasnip.expand_or_jumpable() then - return t "luasnip-expand-or-jump" - elseif check_back_space() then - return t "" - else - return vim.fn["compe#complete"]() - end + if vim.fn.pumvisible() == 1 then + return t "" + elseif luasnip and luasnip.expand_or_jumpable() then + return t "luasnip-expand-or-jump" + elseif check_back_space() then + return t "" + else + return vim.fn["compe#complete"]() + end end _G.s_tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t "" - elseif luasnip and luasnip.jumpable(-1) then - return t "luasnip-jump-prev" - else - return t "" - end + if vim.fn.pumvisible() == 1 then + return t "" + elseif luasnip and luasnip.jumpable(-1) then + return t "luasnip-jump-prev" + else + return t "" + end end _G.completions = function() - local npairs - if - not pcall( - function() - npairs = require "nvim-autopairs" - end - ) - then - return - end + local npairs + if not pcall(function() + npairs = require "nvim-autopairs" + end) then + return + end - if vim.fn.pumvisible() == 1 then - if vim.fn.complete_info()["selected"] ~= -1 then - return vim.fn["compe#confirm"]("") - end - end - return npairs.check_break_line_char() + if vim.fn.pumvisible() == 1 then + if vim.fn.complete_info()["selected"] ~= -1 then + return vim.fn["compe#confirm"] "" + end + end + return npairs.check_break_line_char() end -vim.api.nvim_set_keymap("i", "", "v:lua.tab_complete()", {expr = true}) -vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", {expr = true}) -vim.api.nvim_set_keymap("i", "", "v:lua.s_tab_complete()", {expr = true}) -vim.api.nvim_set_keymap("s", "", "v:lua.s_tab_complete()", {expr = true}) -vim.api.nvim_set_keymap("i", "", "v:lua.completions()", {expr = true}) +vim.api.nvim_set_keymap("i", "", "v:lua.tab_complete()", { expr = true }) +vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", { expr = true }) +vim.api.nvim_set_keymap("i", "", "v:lua.s_tab_complete()", { expr = true }) +vim.api.nvim_set_keymap("s", "", "v:lua.s_tab_complete()", { expr = true }) +vim.api.nvim_set_keymap("i", "", "v:lua.completions()", { expr = true }) -luasnip.config.set_config( - { - history = true, - updateevents = "TextChanged,TextChangedI" - } -) +luasnip.config.set_config { + history = true, + updateevents = "TextChanged,TextChangedI", +} require("luasnip/loaders/from_vscode").load() diff --git a/lua/plugins/nvimtree.lua b/lua/plugins/nvimtree.lua index 4444755..cd5c735 100644 --- a/lua/plugins/nvimtree.lua +++ b/lua/plugins/nvimtree.lua @@ -1,6 +1,6 @@ local present, tree_c = pcall(require, "nvim-tree.config") if not present then - return + return end local tree_cb = tree_c.nvim_tree_callback @@ -10,9 +10,9 @@ vim.o.termguicolors = true g.nvim_tree_side = "left" g.nvim_tree_width = 25 -g.nvim_tree_ignore = {".git", "node_modules", ".cache"} +g.nvim_tree_ignore = { ".git", "node_modules", ".cache" } g.nvim_tree_gitignore = 1 -g.nvim_tree_auto_ignore_ft = {"dashboard"} -- don't open tree on specific fiypes. +g.nvim_tree_auto_ignore_ft = { "dashboard" } -- don't open tree on specific fiypes. g.nvim_tree_auto_open = 0 g.nvim_tree_auto_close = 0 -- closes tree when it's the last window g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened @@ -21,7 +21,7 @@ g.nvim_tree_indent_markers = 1 g.nvim_tree_hide_dotfiles = 1 g.nvim_tree_git_hl = 1 g.nvim_tree_highlight_opened_files = 0 -g.nvim_tree_root_folder_modifier = table.concat {":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??"} +g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" } g.nvim_tree_tab_open = 0 g.nvim_tree_allow_resize = 1 g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names @@ -30,66 +30,66 @@ g.nvim_tree_hijack_netrw = 0 g.nvim_tree_update_cwd = 1 g.nvim_tree_show_icons = { - git = 1, - folders = 1, - files = 1 - -- folder_arrows= 1 + git = 1, + folders = 1, + files = 1, + -- folder_arrows= 1 } g.nvim_tree_icons = { - default = "", - symlink = "", - git = { - unstaged = "✗", - staged = "✓", - unmerged = "", - renamed = "➜", - untracked = "★", - deleted = "", - ignored = "◌" - }, - folder = { - -- disable indent_markers option to get arrows working or if you want both arrows and indent then just add the arrow icons in front ofthe default and opened folders below! - -- arrow_open = "", - -- arrow_closed = "", - default = "", - open = "", - empty = "", --  - empty_open = "", - symlink = "", - symlink_open = "" - } + default = "", + symlink = "", + git = { + unstaged = "✗", + staged = "✓", + unmerged = "", + renamed = "➜", + untracked = "★", + deleted = "", + ignored = "◌", + }, + folder = { + -- disable indent_markers option to get arrows working or if you want both arrows and indent then just add the arrow icons in front ofthe default and opened folders below! + -- arrow_open = "", + -- arrow_closed = "", + default = "", + open = "", + empty = "", --  + empty_open = "", + symlink = "", + symlink_open = "", + }, } g.nvim_tree_bindings = { - {key = {"", "o", "<2-LeftMouse>"}, cb = tree_cb("edit")}, - {key = {"<2-RightMouse>", ""}, cb = tree_cb("cd")}, - {key = "", cb = tree_cb("vsplit")}, - {key = "", cb = tree_cb("split")}, - {key = "", cb = tree_cb("tabnew")}, - {key = "<", cb = tree_cb("prev_sibling")}, - {key = ">", cb = tree_cb("next_sibling")}, - {key = "P", cb = tree_cb("parent_node")}, - {key = "", cb = tree_cb("close_node")}, - {key = "", cb = tree_cb("close_node")}, - {key = "", cb = tree_cb("preview")}, - {key = "K", cb = tree_cb("first_sibling")}, - {key = "J", cb = tree_cb("last_sibling")}, - {key = "I", cb = tree_cb("toggle_ignored")}, - {key = "H", cb = tree_cb("toggle_dotfiles")}, - {key = "R", cb = tree_cb("refresh")}, - {key = "a", cb = tree_cb("create")}, - {key = "d", cb = tree_cb("remove")}, - {key = "r", cb = tree_cb("rename")}, - {key = "", cb = tree_cb("full_rename")}, - {key = "x", cb = tree_cb("cut")}, - {key = "c", cb = tree_cb("copy")}, - {key = "p", cb = tree_cb("paste")}, - {key = "y", cb = tree_cb("copy_name")}, - {key = "Y", cb = tree_cb("copy_path")}, - {key = "gy", cb = tree_cb("copy_absolute_path")}, - {key = "[c", cb = tree_cb("prev_git_item")}, - {key = "}c", cb = tree_cb("next_git_item")}, - {key = "-", cb = tree_cb("dir_up")}, - {key = "q", cb = tree_cb("close")}, - {key = "g?", cb = tree_cb("toggle_help")} + { key = { "", "o", "<2-LeftMouse>" }, cb = tree_cb "edit" }, + { key = { "<2-RightMouse>", "" }, cb = tree_cb "cd" }, + { key = "", cb = tree_cb "vsplit" }, + { key = "", cb = tree_cb "split" }, + { key = "", cb = tree_cb "tabnew" }, + { key = "<", cb = tree_cb "prev_sibling" }, + { key = ">", cb = tree_cb "next_sibling" }, + { key = "P", cb = tree_cb "parent_node" }, + { key = "", cb = tree_cb "close_node" }, + { key = "", cb = tree_cb "close_node" }, + { key = "", cb = tree_cb "preview" }, + { key = "K", cb = tree_cb "first_sibling" }, + { key = "J", cb = tree_cb "last_sibling" }, + { key = "I", cb = tree_cb "toggle_ignored" }, + { key = "H", cb = tree_cb "toggle_dotfiles" }, + { key = "R", cb = tree_cb "refresh" }, + { key = "a", cb = tree_cb "create" }, + { key = "d", cb = tree_cb "remove" }, + { key = "r", cb = tree_cb "rename" }, + { key = "", cb = tree_cb "full_rename" }, + { key = "x", cb = tree_cb "cut" }, + { key = "c", cb = tree_cb "copy" }, + { key = "p", cb = tree_cb "paste" }, + { key = "y", cb = tree_cb "copy_name" }, + { key = "Y", cb = tree_cb "copy_path" }, + { key = "gy", cb = tree_cb "copy_absolute_path" }, + { key = "[c", cb = tree_cb "prev_git_item" }, + { key = "}c", cb = tree_cb "next_git_item" }, + { key = "-", cb = tree_cb "dir_up" }, + { key = "q", cb = tree_cb "close" }, + { key = "g?", cb = tree_cb "toggle_help" }, } diff --git a/lua/plugins/others.lua b/lua/plugins/others.lua index 761b0ff..3236721 100644 --- a/lua/plugins/others.lua +++ b/lua/plugins/others.lua @@ -1,75 +1,71 @@ local M = {} M.colorizer = function() - local present, colorizer = pcall(require, "colorizer") - if present then - colorizer.setup() - vim.cmd("ColorizerReloadAllBuffers") - end + local present, colorizer = pcall(require, "colorizer") + if present then + colorizer.setup() + vim.cmd "ColorizerReloadAllBuffers" + end end M.comment = function() - local present, nvim_comment = pcall(require, "nvim_comment") - if present then - nvim_comment.setup() - end + local present, nvim_comment = pcall(require, "nvim_comment") + if present then + nvim_comment.setup() + end end M.escape = function() - vim.g.better_escape_interval = 300 - vim.g.better_escape_shortcut = {"jk"} + vim.g.better_escape_interval = 300 + vim.g.better_escape_shortcut = { "jk" } end M.lspkind = function() - local present, lspkind = pcall(require, "lspkind") - if present then - lspkind.init() - end + local present, lspkind = pcall(require, "lspkind") + if present then + lspkind.init() + end end M.neoscroll = function() - pcall( - function() - require("neoscroll").setup() - end - ) + pcall(function() + require("neoscroll").setup() + end) end M.blankline = function() - vim.g.indentLine_enabled = 1 - vim.g.indent_blankline_char = "▏" + vim.g.indentLine_enabled = 1 + vim.g.indent_blankline_char = "▏" - vim.g.indent_blankline_filetype_exclude = {"help", "terminal", "dashboard", "packer"} - vim.g.indent_blankline_buftype_exclude = {"terminal"} + vim.g.indent_blankline_filetype_exclude = { "help", "terminal", "dashboard", "packer" } + vim.g.indent_blankline_buftype_exclude = { "terminal" } - vim.g.indent_blankline_show_trailing_blankline_indent = false - vim.g.indent_blankline_show_first_indent_level = false + vim.g.indent_blankline_show_trailing_blankline_indent = false + vim.g.indent_blankline_show_first_indent_level = false end M.signature = function() - local present, lspsignature = pcall(require, "lsp_signature") - if present then - lspsignature.setup( - { - bind = true, - doc_lines = 2, - floating_window = true, - fix_pos = true, - hint_enable = true, - hint_prefix = " ", - hint_scheme = "String", - use_lspsaga = false, - hi_parameter = "Search", - max_height = 22, - max_width = 120, -- max_width of signature floating_window, line will be wrapped if exceed max_width - handler_opts = { - border = "single" -- double, single, shadow, none - }, - zindex = 200, -- by default it will be on top of all floating windows, set to 50 send it to bottom - padding = "" -- character to pad on left and right of signature can be ' ', or '|' etc - } - ) - end + local present, lspsignature = pcall(require, "lsp_signature") + if present then + lspsignature.setup { + bind = true, + doc_lines = 2, + floating_window = true, + fix_pos = true, + hint_enable = true, + hint_prefix = " ", + hint_scheme = "String", + use_lspsaga = false, + hi_parameter = "Search", + max_height = 22, + max_width = 120, -- max_width of signature floating_window, line will be wrapped if exceed max_width + handler_opts = { + border = "single", -- double, single, shadow, none + }, + zindex = 200, -- by default it will be on top of all floating windows, set to 50 send it to bottom + padding = "", -- character to pad on left and right of signature can be ' ', or '|' etc + } + end end return M diff --git a/lua/plugins/statusline.lua b/lua/plugins/statusline.lua index 5e0a282..0cea604 100644 --- a/lua/plugins/statusline.lua +++ b/lua/plugins/statusline.lua @@ -1,12 +1,12 @@ local present1, gl = pcall(require, "galaxyline") local present2, condition = pcall(require, "galaxyline.condition") if not (present1 or present2) then - return + return end local gls = gl.section -gl.short_line_list = {" "} +gl.short_line_list = { " " } local left_separator = "" -- or " " local right_separator = " " -- or "" @@ -15,224 +15,224 @@ local global_theme = "themes/" .. vim.g.nvchad_theme local colors = require(global_theme) gls.left[1] = { - FirstElement = { - provider = function() - return "▋" - end, - highlight = {colors.nord_blue, colors.nord_blue} - } + FirstElement = { + provider = function() + return "▋" + end, + highlight = { colors.nord_blue, colors.nord_blue }, + }, } gls.left[2] = { - statusIcon = { - provider = function() - return "  " - end, - highlight = {colors.statusline_bg, colors.nord_blue}, - separator = right_separator .. " ", - separator_highlight = {colors.nord_blue, colors.lightbg} - } + statusIcon = { + provider = function() + return "  " + end, + highlight = { colors.statusline_bg, colors.nord_blue }, + separator = right_separator .. " ", + separator_highlight = { colors.nord_blue, colors.lightbg }, + }, } gls.left[3] = { - FileIcon = { - provider = "FileIcon", - condition = condition.buffer_not_empty, - highlight = {colors.white, colors.lightbg} - } + FileIcon = { + provider = "FileIcon", + condition = condition.buffer_not_empty, + highlight = { colors.white, colors.lightbg }, + }, } gls.left[4] = { - FileName = { - provider = function() - local fileinfo = require('galaxyline.provider_fileinfo') - return fileinfo.get_current_file_name("", "") - end, - condition = condition.buffer_not_empty, - highlight = {colors.white, colors.lightbg}, - separator = right_separator, - separator_highlight = {colors.lightbg, colors.lightbg2} - } + FileName = { + provider = function() + local fileinfo = require "galaxyline.provider_fileinfo" + return fileinfo.get_current_file_name("", "") + end, + condition = condition.buffer_not_empty, + highlight = { colors.white, colors.lightbg }, + separator = right_separator, + separator_highlight = { colors.lightbg, colors.lightbg2 }, + }, } gls.left[5] = { - current_dir = { - provider = function() - local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") - return "  " .. dir_name .. " " - end, - highlight = {colors.grey_fg2, colors.lightbg2}, - separator = right_separator, - separator_highlight = {colors.lightbg2, colors.statusline_bg} - } + current_dir = { + provider = function() + local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") + return "  " .. dir_name .. " " + end, + highlight = { colors.grey_fg2, colors.lightbg2 }, + separator = right_separator, + separator_highlight = { colors.lightbg2, colors.statusline_bg }, + }, } local checkwidth = function() - local squeeze_width = vim.fn.winwidth(0) / 2 - if squeeze_width > 30 then - return true - end - return false + local squeeze_width = vim.fn.winwidth(0) / 2 + if squeeze_width > 30 then + return true + end + return false end gls.left[6] = { - DiffAdd = { - provider = "DiffAdd", - condition = checkwidth, - icon = "  ", - highlight = {colors.white, colors.statusline_bg} - } + DiffAdd = { + provider = "DiffAdd", + condition = checkwidth, + icon = "  ", + highlight = { colors.white, colors.statusline_bg }, + }, } gls.left[7] = { - DiffModified = { - provider = "DiffModified", - condition = checkwidth, - icon = "  ", - highlight = {colors.grey_fg2, colors.statusline_bg} - } + DiffModified = { + provider = "DiffModified", + condition = checkwidth, + icon = "  ", + highlight = { colors.grey_fg2, colors.statusline_bg }, + }, } gls.left[8] = { - DiffRemove = { - provider = "DiffRemove", - condition = checkwidth, - icon = "  ", - highlight = {colors.grey_fg2, colors.statusline_bg} - } + DiffRemove = { + provider = "DiffRemove", + condition = checkwidth, + icon = "  ", + highlight = { colors.grey_fg2, colors.statusline_bg }, + }, } gls.left[9] = { - DiagnosticError = { - provider = "DiagnosticError", - icon = "  ", - highlight = {colors.red, colors.statusline_bg} - } + DiagnosticError = { + provider = "DiagnosticError", + icon = "  ", + highlight = { colors.red, colors.statusline_bg }, + }, } gls.left[10] = { - DiagnosticWarn = { - provider = "DiagnosticWarn", - icon = "  ", - highlight = {colors.yellow, colors.statusline_bg} - } + DiagnosticWarn = { + provider = "DiagnosticWarn", + icon = "  ", + highlight = { colors.yellow, colors.statusline_bg }, + }, } gls.right[1] = { - lsp_status = { - provider = function() - local clients = vim.lsp.get_active_clients() - if next(clients) ~= nil then - local buf_ft = vim.api.nvim_buf_get_option(0, "filetype") - for _, client in ipairs(clients) do - local filetypes = client.config.filetypes - if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then - return " " .. "  " .. " LSP" - end - end - return "" - else - return "" + lsp_status = { + provider = function() + local clients = vim.lsp.get_active_clients() + if next(clients) ~= nil then + local buf_ft = vim.api.nvim_buf_get_option(0, "filetype") + for _, client in ipairs(clients) do + local filetypes = client.config.filetypes + if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then + return " " .. "  " .. " LSP" + end end - end, - highlight = {colors.grey_fg2, colors.statusline_bg} - } + return "" + else + return "" + end + end, + highlight = { colors.grey_fg2, colors.statusline_bg }, + }, } gls.right[2] = { - GitIcon = { - provider = function() - return " " - end, - condition = require("galaxyline.condition").check_git_workspace, - highlight = {colors.grey_fg2, colors.statusline_bg}, - separator = " ", - separator_highlight = {colors.statusline_bg, colors.statusline_bg} - } + GitIcon = { + provider = function() + return " " + end, + condition = require("galaxyline.condition").check_git_workspace, + highlight = { colors.grey_fg2, colors.statusline_bg }, + separator = " ", + separator_highlight = { colors.statusline_bg, colors.statusline_bg }, + }, } gls.right[3] = { - GitBranch = { - provider = "GitBranch", - condition = require("galaxyline.condition").check_git_workspace, - highlight = {colors.grey_fg2, colors.statusline_bg} - } + GitBranch = { + provider = "GitBranch", + condition = require("galaxyline.condition").check_git_workspace, + highlight = { colors.grey_fg2, colors.statusline_bg }, + }, } local mode_colors = { - [110] = {"NORMAL", colors.red}, - [105] = {"INSERT", colors.dark_purple}, - [99] = {"COMMAND", colors.pink}, - [116] = {"TERMINAL", colors.green}, - [118] = {"VISUAL", colors.cyan}, - [22] = {"V-BLOCK", colors.cyan}, - [86] = {"V_LINE", colors.cyan}, - [82] = {"REPLACE", colors.orange}, - [115] = {"SELECT", colors.nord_blue}, - [83] = {"S-LINE", colors.nord_blue} + [110] = { "NORMAL", colors.red }, + [105] = { "INSERT", colors.dark_purple }, + [99] = { "COMMAND", colors.pink }, + [116] = { "TERMINAL", colors.green }, + [118] = { "VISUAL", colors.cyan }, + [22] = { "V-BLOCK", colors.cyan }, + [86] = { "V_LINE", colors.cyan }, + [82] = { "REPLACE", colors.orange }, + [115] = { "SELECT", colors.nord_blue }, + [83] = { "S-LINE", colors.nord_blue }, } local mode = function(n) - return mode_colors[vim.fn.mode():byte()][n] + return mode_colors[vim.fn.mode():byte()][n] end gls.right[4] = { - left_round = { - provider = function() - vim.cmd("hi Galaxyleft_round guifg=" .. mode(2)) - return left_separator - end, - separator = " ", - separator_highlight = {colors.statusline_bg, colors.statusline_bg}, - highlight = {"GalaxyViMode", colors.statusline_bg} - } + left_round = { + provider = function() + vim.cmd("hi Galaxyleft_round guifg=" .. mode(2)) + return left_separator + end, + separator = " ", + separator_highlight = { colors.statusline_bg, colors.statusline_bg }, + highlight = { "GalaxyViMode", colors.statusline_bg }, + }, } gls.right[5] = { - viMode_icon = { - provider = function() - vim.cmd("hi GalaxyviMode_icon guibg=" .. mode(2)) - return " " - end, - highlight = {colors.statusline_bg, colors.red} - } + viMode_icon = { + provider = function() + vim.cmd("hi GalaxyviMode_icon guibg=" .. mode(2)) + return " " + end, + highlight = { colors.statusline_bg, colors.red }, + }, } gls.right[6] = { - ViMode = { - provider = function() - vim.cmd("hi GalaxyViMode guifg=" .. mode(2)) - return " " .. mode(1) .. " " - end, - highlight = {"GalaxyViMode", colors.lightbg} - } + ViMode = { + provider = function() + vim.cmd("hi GalaxyViMode guifg=" .. mode(2)) + return " " .. mode(1) .. " " + end, + highlight = { "GalaxyViMode", colors.lightbg }, + }, } gls.right[7] = { - some_RoundIcon = { - provider = function() - return " " - end, - separator = left_separator, - separator_highlight = {colors.green, colors.lightbg}, - highlight = {colors.lightbg, colors.green} - } + some_RoundIcon = { + provider = function() + return " " + end, + separator = left_separator, + separator_highlight = { colors.green, colors.lightbg }, + highlight = { colors.lightbg, colors.green }, + }, } gls.right[8] = { - line_percentage = { - provider = function() - local current_line = vim.fn.line(".") - local total_line = vim.fn.line("$") + line_percentage = { + provider = function() + local current_line = vim.fn.line "." + local total_line = vim.fn.line "$" - if current_line == 1 then - return " Top " - elseif current_line == vim.fn.line("$") then - return " Bot " - end - local result, _ = math.modf((current_line / total_line) * 100) - return " " .. result .. "% " - end, - highlight = {colors.green, colors.lightbg} - } + if current_line == 1 then + return " Top " + elseif current_line == vim.fn.line "$" then + return " Bot " + end + local result, _ = math.modf((current_line / total_line) * 100) + return " " .. result .. "% " + end, + highlight = { colors.green, colors.lightbg }, + }, } diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index d3a9447..46f91ae 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -1,88 +1,82 @@ local present, telescope = pcall(require, "telescope") if not present then - return + return end -telescope.setup( - { - defaults = { - vimgrep_arguments = { - "rg", - "--color=never", - "--no-heading", - "--with-filename", - "--line-number", - "--column", - "--smart-case" - }, - prompt_prefix = "  ", - selection_caret = " ", - entry_prefix = " ", - initial_mode = "insert", - selection_strategy = "reset", - sorting_strategy = "descending", - layout_strategy = "horizontal", - layout_config = { - horizontal = { - prompt_position = "top", - preview_width = 0.55, - results_width = 0.8 - }, - vertical = { - mirror = false - }, - width = 0.87, - height = 0.80, - preview_cutoff = 120 - }, - file_sorter = require("telescope.sorters").get_fuzzy_file, - file_ignore_patterns = {}, - generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, - path_display = {"absolute"}, - winblend = 0, - border = {}, - borderchars = {"─", "│", "─", "│", "╭", "╮", "╯", "╰"}, - color_devicons = true, - use_less = true, - set_env = {["COLORTERM"] = "truecolor"}, -- default = nil, - file_previewer = require("telescope.previewers").vim_buffer_cat.new, - grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, - qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, - -- Developer configurations: Not meant for general override - buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker - }, - extensions = { - fzf = { - fuzzy = true, -- false will only do exact matching - override_generic_sorter = false, -- override the generic sorter - override_file_sorter = true, -- override the file sorter - case_mode = "smart_case" -- or "ignore_case" or "respect_case" - -- the default case_mode is "smart_case" - }, - media_files = { - filetypes = {"png", "webp", "jpg", "jpeg"}, - find_cmd = "rg" -- find command (defaults to `fd`) - } - } - } -) +telescope.setup { + defaults = { + vimgrep_arguments = { + "rg", + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + "--smart-case", + }, + prompt_prefix = "  ", + selection_caret = " ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "descending", + layout_strategy = "horizontal", + layout_config = { + horizontal = { + prompt_position = "top", + preview_width = 0.55, + results_width = 0.8, + }, + vertical = { + mirror = false, + }, + width = 0.87, + height = 0.80, + preview_cutoff = 120, + }, + file_sorter = require("telescope.sorters").get_fuzzy_file, + file_ignore_patterns = {}, + generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, + path_display = { "absolute" }, + winblend = 0, + border = {}, + borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, + color_devicons = true, + use_less = true, + set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, + file_previewer = require("telescope.previewers").vim_buffer_cat.new, + grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, + qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, + -- Developer configurations: Not meant for general override + buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, + }, + extensions = { + fzf = { + fuzzy = true, -- false will only do exact matching + override_generic_sorter = false, -- override the generic sorter + override_file_sorter = true, -- override the file sorter + case_mode = "smart_case", -- or "ignore_case" or "respect_case" + -- the default case_mode is "smart_case" + }, + media_files = { + filetypes = { "png", "webp", "jpg", "jpeg" }, + find_cmd = "rg", -- find command (defaults to `fd`) + }, + }, +} -- load the theme_switcher extension -require("telescope").load_extension("themes") +require("telescope").load_extension "themes" -if - not pcall( - function() - telescope.load_extension("fzf") - telescope.load_extension("media_files") - end - ) - then - -- This should only trigger when in need of PackerSync, so better do it - print("After completion of PackerCompile, restart neovim.") - -- Trigger packer compile on PackerComplete, so it properly waits for PackerSync - vim.cmd 'autocmd User PackerComplete ++once lua print "Waiting for PackerCompile.." require("packer").compile()' - vim.cmd 'autocmd User PackerCompileDone ++once echo "Packer Compile done, restart neovim."' - require "pluginList" - require("packer").update("telescope-fzf-native.nvim", "telescope-media-files.nvim") +if not pcall(function() + telescope.load_extension "fzf" + telescope.load_extension "media_files" +end) then + -- This should only trigger when in need of PackerSync, so better do it + print "After completion of PackerCompile, restart neovim." + -- Trigger packer compile on PackerComplete, so it properly waits for PackerSync + vim.cmd 'autocmd User PackerComplete ++once lua print "Waiting for PackerCompile.." require("packer").compile()' + vim.cmd 'autocmd User PackerCompileDone ++once echo "Packer Compile done, restart neovim."' + require "pluginList" + require("packer").update("telescope-fzf-native.nvim", "telescope-media-files.nvim") end diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua index a3f7722..7baaa64 100644 --- a/lua/plugins/toggleterm.lua +++ b/lua/plugins/toggleterm.lua @@ -1,47 +1,47 @@ local present, toggleterm = pcall(require, "toggleterm") if not present then - return + return end toggleterm.setup { - -- size can be a number or function which is passed the current terminal - size = function(term) - if term.direction == "horizontal" then - return 15 - elseif term.direction == "vertical" then - return vim.o.columns * 0.4 - end - end, - -- open_mapping = [[]], -- mapping set in mappings.lua - hide_numbers = true, -- hide the number column in toggleterm buffers - shade_terminals = false, - start_in_insert = true, - -- insert_mappings = true, -- see 'open_mapping', not set on purpose - -- whether or not the open mapping applies in insert mode - persist_size = true, - direction = 'vertical', - close_on_exit = true, -- close the terminal window when the process exits - -- This field is only relevant if direction is set to 'float' - float_opts = { - border = 'single', - winblend = 0, - highlights = { - border = "Normal", - background = "Normal", - } - } + -- size can be a number or function which is passed the current terminal + size = function(term) + if term.direction == "horizontal" then + return 15 + elseif term.direction == "vertical" then + return vim.o.columns * 0.4 + end + end, + -- open_mapping = [[]], -- mapping set in mappings.lua + hide_numbers = true, -- hide the number column in toggleterm buffers + shade_terminals = false, + start_in_insert = true, + -- insert_mappings = true, -- see 'open_mapping', not set on purpose + -- whether or not the open mapping applies in insert mode + persist_size = true, + direction = "vertical", + close_on_exit = true, -- close the terminal window when the process exits + -- This field is only relevant if direction is set to 'float' + float_opts = { + border = "single", + winblend = 0, + highlights = { + border = "Normal", + background = "Normal", + }, + }, } local Terminal = require("toggleterm.terminal").Terminal _G.termW = Terminal:new { - direction = "window", + direction = "window", } _G.termV = Terminal:new { - direction = "vertical", + direction = "vertical", } _G.termH = Terminal:new { - direction = "horizontal", + direction = "horizontal", } diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index c1ca2ef..39c9a75 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,15 +1,15 @@ local present, ts_config = pcall(require, "nvim-treesitter.configs") if not present then - return + return end ts_config.setup { - ensure_installed = { - "bash", - "lua" - }, - highlight = { - enable = true, - use_languagetree = true - } + ensure_installed = { + "bash", + "lua", + }, + highlight = { + enable = true, + use_languagetree = true, + }, } diff --git a/lua/plugins/zenmode.lua b/lua/plugins/zenmode.lua index 3990559..16b5b62 100644 --- a/lua/plugins/zenmode.lua +++ b/lua/plugins/zenmode.lua @@ -1,70 +1,68 @@ local present, true_zen = pcall(require, "true-zen") if not present then - return + return end -true_zen.setup( - { - ui = { - bottom = { - laststatus = 0, - ruler = false, - showmode = false, - showcmd = false, - cmdheight = 1 - }, - top = { - showtabline = 0 - }, - left = { - number = false, - relativenumber = false, - signcolumn = "no" - } - }, - modes = { - ataraxis = { - left_padding = 32, - right_padding = 32, - top_padding = 1, - bottom_padding = 1, - ideal_writing_area_width = {0}, - auto_padding = true, - keep_default_fold_fillchars = true, - custome_bg = "", - bg_configuration = true, - affected_higroups = { - NonText = {}, - FoldColumn = {}, - ColorColumn = {}, - VertSplit = {}, - StatusLine = {}, - StatusLineNC = {}, - SignColumn = {} - } - }, - focus = { - margin_of_error = 5, - focus_method = "experimental" - } - }, - integrations = { - vim_gitgutter = false, - galaxyline = true, - tmux = false, - gitsigns = false, - nvim_bufferline = true, - limelight = false, - vim_airline = false, - vim_powerline = false, - vim_signify = false, - express_line = false, - lualine = false - }, - misc = { - on_off_commands = false, - ui_elements_commands = false, - cursor_by_mode = false - } - } -) +true_zen.setup { + ui = { + bottom = { + laststatus = 0, + ruler = false, + showmode = false, + showcmd = false, + cmdheight = 1, + }, + top = { + showtabline = 0, + }, + left = { + number = false, + relativenumber = false, + signcolumn = "no", + }, + }, + modes = { + ataraxis = { + left_padding = 32, + right_padding = 32, + top_padding = 1, + bottom_padding = 1, + ideal_writing_area_width = { 0 }, + auto_padding = true, + keep_default_fold_fillchars = true, + custome_bg = "", + bg_configuration = true, + affected_higroups = { + NonText = {}, + FoldColumn = {}, + ColorColumn = {}, + VertSplit = {}, + StatusLine = {}, + StatusLineNC = {}, + SignColumn = {}, + }, + }, + focus = { + margin_of_error = 5, + focus_method = "experimental", + }, + }, + integrations = { + vim_gitgutter = false, + galaxyline = true, + tmux = false, + gitsigns = false, + nvim_bufferline = true, + limelight = false, + vim_airline = false, + vim_powerline = false, + vim_signify = false, + express_line = false, + lualine = false, + }, + misc = { + on_off_commands = false, + ui_elements_commands = false, + cursor_by_mode = false, + }, +} diff --git a/lua/telescope/_extensions/themes.lua b/lua/telescope/_extensions/themes.lua index ba3ed95..e0aed13 100644 --- a/lua/telescope/_extensions/themes.lua +++ b/lua/telescope/_extensions/themes.lua @@ -4,144 +4,139 @@ local M = {} -- Custom theme picker -- Most of the code is copied from telescope colorscheme plugin, mostly for preview creation M.theme_switcher = function(opts) - local pickers, finders, previewers, actions, action_state, utils, conf - if pcall(require, "telescope") then - pickers = require "telescope.pickers" - finders = require "telescope.finders" - previewers = require "telescope.previewers" + local pickers, finders, previewers, actions, action_state, utils, conf + if pcall(require, "telescope") then + pickers = require "telescope.pickers" + finders = require "telescope.finders" + previewers = require "telescope.previewers" - actions = require "telescope.actions" - action_state = require "telescope.actions.state" - utils = require "telescope.utils" - conf = require("telescope.config").values - else - error "Cannot find telescope!" - end + actions = require "telescope.actions" + action_state = require "telescope.actions.state" + utils = require "telescope.utils" + conf = require("telescope.config").values + else + error "Cannot find telescope!" + end - local local_utils = require "utils" - local reload_theme = local_utils.reload_theme + local local_utils = require "utils" + local reload_theme = local_utils.reload_theme - -- get a table of available themes - local themes = local_utils.list_themes() - if next(themes) ~= nil then - -- save this to use it for later to restore if theme not changed - local current_theme = vim.g.nvchad_theme - local new_theme = "" - local change = false + -- get a table of available themes + local themes = local_utils.list_themes() + if next(themes) ~= nil then + -- save this to use it for later to restore if theme not changed + local current_theme = vim.g.nvchad_theme + local new_theme = "" + local change = false - -- buffer number and name - local bufnr = vim.api.nvim_get_current_buf() - local bufname = vim.api.nvim_buf_get_name(bufnr) + -- buffer number and name + local bufnr = vim.api.nvim_get_current_buf() + local bufname = vim.api.nvim_buf_get_name(bufnr) - local previewer + local previewer - -- in case its not a normal buffer - if vim.fn.buflisted(bufnr) ~= 1 then - local deleted = false - local function del_win(win_id) - if win_id and vim.api.nvim_win_is_valid(win_id) then - utils.buf_delete(vim.api.nvim_win_get_buf(win_id)) - pcall(vim.api.nvim_win_close, win_id, true) - end + -- in case its not a normal buffer + if vim.fn.buflisted(bufnr) ~= 1 then + local deleted = false + local function del_win(win_id) + if win_id and vim.api.nvim_win_is_valid(win_id) then + utils.buf_delete(vim.api.nvim_win_get_buf(win_id)) + pcall(vim.api.nvim_win_close, win_id, true) end + end - previewer = - previewers.new { - preview_fn = function(_, entry, status) - if not deleted then - deleted = true - del_win(status.preview_win) - del_win(status.preview_border_win) - end - reload_theme(entry.value) - end - } - else - -- show current buffer content in previewer - previewer = - previewers.new_buffer_previewer { - get_buffer_by_name = function() - return bufname - end, - define_preview = function(self, entry) - if vim.loop.fs_stat(bufname) then - conf.buffer_previewer_maker(bufname, self.state.bufnr, {bufname = self.state.bufname}) - else - local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false) - vim.api.nvim_buf_set_lines(self.state.bufnr, 0, -1, false, lines) - end - reload_theme(entry.value) - end - } - end + previewer = previewers.new { + preview_fn = function(_, entry, status) + if not deleted then + deleted = true + del_win(status.preview_win) + del_win(status.preview_border_win) + end + reload_theme(entry.value) + end, + } + else + -- show current buffer content in previewer + previewer = previewers.new_buffer_previewer { + get_buffer_by_name = function() + return bufname + end, + define_preview = function(self, entry) + if vim.loop.fs_stat(bufname) then + conf.buffer_previewer_maker(bufname, self.state.bufnr, { bufname = self.state.bufname }) + else + local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false) + vim.api.nvim_buf_set_lines(self.state.bufnr, 0, -1, false, lines) + end + reload_theme(entry.value) + end, + } + end - local picker = - pickers.new( - { - prompt_title = "Set NvChad color", - finder = finders.new_table(themes), - previewer = previewer, - sorter = conf.generic_sorter(opts), - attach_mappings = function() - actions.select_default:replace( - -- if a entry is selected, change current_theme to that - function(prompt_bufnr) - local selection = action_state.get_selected_entry() - new_theme = selection.value - change = true - actions.close(prompt_bufnr) - end - ) - return true - end - } - ) + local picker = pickers.new { + prompt_title = "Set NvChad color", + finder = finders.new_table(themes), + previewer = previewer, + sorter = conf.generic_sorter(opts), + attach_mappings = function() + actions.select_default:replace( + -- if a entry is selected, change current_theme to that + function(prompt_bufnr) + local selection = action_state.get_selected_entry() + new_theme = selection.value + change = true + actions.close(prompt_bufnr) + end + ) + return true + end, + } - -- rewrite picker.close_windows - local close_windows = picker.close_windows - picker.close_windows = function(status) - close_windows(status) - -- now apply the theme, if success, then ask for default theme change - local final_theme + -- rewrite picker.close_windows + local close_windows = picker.close_windows + picker.close_windows = function(status) + close_windows(status) + -- now apply the theme, if success, then ask for default theme change + local final_theme + if change then + final_theme = new_theme + else + final_theme = current_theme + end + + if reload_theme(final_theme) then if change then - final_theme = new_theme - else - final_theme = current_theme + -- ask for confirmation to set as default theme + local ans = string.lower(vim.fn.input("Set " .. new_theme .. " as default theme ? [y/N] ")) == "y" + local_utils.clear_cmdline() + if ans then + local_utils.change_theme(current_theme, final_theme) + else + -- will be used in restoring nvchad theme var + final_theme = current_theme + end end - - if reload_theme(final_theme) then - if change then - -- ask for confirmation to set as default theme - local ans = string.lower(vim.fn.input("Set " .. new_theme .. " as default theme ? [y/N] ")) == "y" - local_utils.clear_cmdline() - if ans then - local_utils.change_theme(current_theme, final_theme) - else - -- will be used in restoring nvchad theme var - final_theme = current_theme - end - end - else - final_theme = current_theme - end - -- set nvchad_theme global var - vim.g.nvchad_theme = final_theme - end - -- launch the telescope picker - picker:find() - else - print("No themes found in " .. vim.fn.stdpath("config") .. "/lua/themes") - end + else + final_theme = current_theme + end + -- set nvchad_theme global var + vim.g.nvchad_theme = final_theme + end + -- launch the telescope picker + picker:find() + else + print("No themes found in " .. vim.fn.stdpath "config" .. "/lua/themes") + end end -- register theme swticher as themes to telescope local present, telescope = pcall(require, "telescope") if present then - return telescope.register_extension { - exports = { - themes = M.theme_switcher - } - } + return telescope.register_extension { + exports = { + themes = M.theme_switcher, + }, + } else - error "Cannot find telescope!" + error "Cannot find telescope!" end diff --git a/lua/theme.lua b/lua/theme.lua index b2ce61b..04f0871 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -4,9 +4,9 @@ vim.g.nvchad_theme = chad_theme local present, base16 = pcall(require, "base16") if present then - base16(base16.themes(chad_theme), true) - require "highlights" - return true + base16(base16.themes(chad_theme), true) + require "highlights" + return true else - return false + return false end diff --git a/lua/themes/chadracula.lua b/lua/themes/chadracula.lua index 8a01a59..63af494 100644 --- a/lua/themes/chadracula.lua +++ b/lua/themes/chadracula.lua @@ -1,33 +1,33 @@ local colors = { - white = "#F8F8F2", - darker_black = "#232531", - black = "#282A36", -- nvim bg - black2 = "#303341", - one_bg = "#373844", -- real bg of onedark - one_bg2 = "#44475a", - one_bg3 = "#565761", - grey = "#41434f", - grey_fg = "#5a5c68", - grey_fg2 = "#5a5c68", - light_grey = "#636571", - red = "#FF5555", - baby_pink = "#DE8C92", - pink = "#FF79C6", - line = "#373844", -- for lines like vertsplit - green = "#50FA7B", - vibrant_green = "#69FF94", - nord_blue = "#b389ef", - blue = "#BD93F9", - yellow = "#F1FA8C", - sun = "#FFFFA5", - purple = "#BD93F9", - dark_purple = "#BD93F9", - teal = "#0088cc", - orange = "#FFB86C", - cyan = "#8BE9FD", - statusline_bg = "#2b2d39", - lightbg = "#343642", - lightbg2 = "#2f313d" + white = "#F8F8F2", + darker_black = "#232531", + black = "#282A36", -- nvim bg + black2 = "#303341", + one_bg = "#373844", -- real bg of onedark + one_bg2 = "#44475a", + one_bg3 = "#565761", + grey = "#41434f", + grey_fg = "#5a5c68", + grey_fg2 = "#5a5c68", + light_grey = "#636571", + red = "#FF5555", + baby_pink = "#DE8C92", + pink = "#FF79C6", + line = "#373844", -- for lines like vertsplit + green = "#50FA7B", + vibrant_green = "#69FF94", + nord_blue = "#b389ef", + blue = "#BD93F9", + yellow = "#F1FA8C", + sun = "#FFFFA5", + purple = "#BD93F9", + dark_purple = "#BD93F9", + teal = "#0088cc", + orange = "#FFB86C", + cyan = "#8BE9FD", + statusline_bg = "#2b2d39", + lightbg = "#343642", + lightbg2 = "#2f313d", } return colors diff --git a/lua/themes/everforest.lua b/lua/themes/everforest.lua index 1ae64c3..37ba4b6 100644 --- a/lua/themes/everforest.lua +++ b/lua/themes/everforest.lua @@ -1,33 +1,33 @@ local colors = { - white = "#fff9e8", - darker_black = "#272f35", - black = "#2b3339", -- nvim bg - black2 = "#323a40", - one_bg = "#333b41", - one_bg2 = "#363e44", - one_bg3 = "#3a4248", - grey = "#4a5258", - grey_fg = "#50585e", - grey_fg2 = "#545c62", - light_grey = "#586066", - red = "#e67e80", - baby_pink = "#ce8196", - pink = "#ff75a0", - line = "#3a4248", -- for lines like vertsplit - green = "#83c092", - vibrant_green = "#a7c080", - nord_blue = "#78b4ac", - blue = "#7fbbb3", - yellow = "#dbbc7f", - sun = "#d1b171", - purple = "#b4bbc8", - dark_purple = "#d699b6", - teal = "#69a59d", - orange = "#e69875", - cyan = "#95d1c9", - statusline_bg = "#2e363c", - lightbg = "#3d454b", - lightbg2 = "#333b41" + white = "#fff9e8", + darker_black = "#272f35", + black = "#2b3339", -- nvim bg + black2 = "#323a40", + one_bg = "#333b41", + one_bg2 = "#363e44", + one_bg3 = "#3a4248", + grey = "#4a5258", + grey_fg = "#50585e", + grey_fg2 = "#545c62", + light_grey = "#586066", + red = "#e67e80", + baby_pink = "#ce8196", + pink = "#ff75a0", + line = "#3a4248", -- for lines like vertsplit + green = "#83c092", + vibrant_green = "#a7c080", + nord_blue = "#78b4ac", + blue = "#7fbbb3", + yellow = "#dbbc7f", + sun = "#d1b171", + purple = "#b4bbc8", + dark_purple = "#d699b6", + teal = "#69a59d", + orange = "#e69875", + cyan = "#95d1c9", + statusline_bg = "#2e363c", + lightbg = "#3d454b", + lightbg2 = "#333b41", } return colors diff --git a/lua/themes/gruvchad.lua b/lua/themes/gruvchad.lua index 415e858..4c1ee5a 100644 --- a/lua/themes/gruvchad.lua +++ b/lua/themes/gruvchad.lua @@ -1,33 +1,33 @@ local colors = { - white = "#c7b89d", - darker_black = "#1e2122", - black = "#222526", -- nvim bg - black2 = "#26292a", - one_bg = "#2b2e2f", - one_bg2 = "#2f3233", - one_bg3 = "#313435", - grey = "#46494a", - grey_fg = "#5d6061", - grey_fg2 = "#5b5e5f", - light_grey = "#585b5c", - red = "#ec6b64", - baby_pink = "#ce8196", - pink = "#ff75a0", - line = "#2c2f30", -- for lines like vertsplit - green = "#89b482", - vibrant_green = "#a9b665", - nord_blue = "#6f8faf", - blue = "#6d8dad", - yellow = "#d6b676", - sun = "#d1b171", - purple = "#b4bbc8", - dark_purple = "#cc7f94", - teal = "#749689", - orange = "#e78a4e", - cyan = "#82b3a8", - statusline_bg = "#252829", - lightbg = "#2d3139", - lightbg2 = "#262a32" + white = "#c7b89d", + darker_black = "#1e2122", + black = "#222526", -- nvim bg + black2 = "#26292a", + one_bg = "#2b2e2f", + one_bg2 = "#2f3233", + one_bg3 = "#313435", + grey = "#46494a", + grey_fg = "#5d6061", + grey_fg2 = "#5b5e5f", + light_grey = "#585b5c", + red = "#ec6b64", + baby_pink = "#ce8196", + pink = "#ff75a0", + line = "#2c2f30", -- for lines like vertsplit + green = "#89b482", + vibrant_green = "#a9b665", + nord_blue = "#6f8faf", + blue = "#6d8dad", + yellow = "#d6b676", + sun = "#d1b171", + purple = "#b4bbc8", + dark_purple = "#cc7f94", + teal = "#749689", + orange = "#e78a4e", + cyan = "#82b3a8", + statusline_bg = "#252829", + lightbg = "#2d3139", + lightbg2 = "#262a32", } return colors diff --git a/lua/themes/javacafe.lua b/lua/themes/javacafe.lua index 5785290..227b9a4 100644 --- a/lua/themes/javacafe.lua +++ b/lua/themes/javacafe.lua @@ -1,33 +1,33 @@ local colors = { - white = "#b5bcc9", - darker_black = "#10171e", - black = "#131a21", -- nvim bg - black2 = "#1a2128", - one_bg = "#1e252c", - one_bg2 = "#272e35", - one_bg3 = "#2a3138", - grey = "#363d44", - grey_fg = "#4e555c", - grey_fg2 = "#51585f", - light_grey = "#545b62", - red = "#ef8891", - baby_pink = "#fca2aa", - pink = "#fca2af", - line = "#20272e", -- for lines like vertsplit - green = "#9ce5c0", - vibrant_green = "#a5d4af", - blue = "#99aee5", - nord_blue = "#9aa8cf", - yellow = "#fbdf90", - sun = "#fbdf9a", - purple = "#d7c1ed", - dark_purple = "#ccaced", - teal = "#92dbb6", - orange = "#EDA685", - cyan = "#b5c3ea", - statusline_bg = "#181f26", - lightbg = "#222930", - lightbg2 = "#1d242b" + white = "#b5bcc9", + darker_black = "#10171e", + black = "#131a21", -- nvim bg + black2 = "#1a2128", + one_bg = "#1e252c", + one_bg2 = "#272e35", + one_bg3 = "#2a3138", + grey = "#363d44", + grey_fg = "#4e555c", + grey_fg2 = "#51585f", + light_grey = "#545b62", + red = "#ef8891", + baby_pink = "#fca2aa", + pink = "#fca2af", + line = "#20272e", -- for lines like vertsplit + green = "#9ce5c0", + vibrant_green = "#a5d4af", + blue = "#99aee5", + nord_blue = "#9aa8cf", + yellow = "#fbdf90", + sun = "#fbdf9a", + purple = "#d7c1ed", + dark_purple = "#ccaced", + teal = "#92dbb6", + orange = "#EDA685", + cyan = "#b5c3ea", + statusline_bg = "#181f26", + lightbg = "#222930", + lightbg2 = "#1d242b", } return colors diff --git a/lua/themes/mountaineer.lua b/lua/themes/mountaineer.lua index 29268f1..af85873 100644 --- a/lua/themes/mountaineer.lua +++ b/lua/themes/mountaineer.lua @@ -1,33 +1,33 @@ local colors = { - white = "#b0b0b0", - darker_black = "#171d23", - black = "#1a2026", -- nvim bg - black2 = "#20262c", - one_bg = "#242a30", - one_bg2 = "#292f35", - one_bg3 = "#2e343a", - grey = "#42484e", - grey_fg = "#474d53", - grey_fg2 = "#50565c", - light_grey = "#565c62", - red = "#ac8a8c", - baby_pink = "#de878f", - pink = "#e89199", - line = "#2d3339", -- for lines like vertsplit - green = "#8aac8b", - vibrant_green = "#9ec49f", - blue = "#6b8bab", - nord_blue = "#7797b7", - yellow = "#c4c19e", - sun = "#aca98a", - purple = "#a39ec4", - dark_purple = "#8f8aac", - teal = "#7c9cbc", - orange = "#e39a83", - cyan = "#9aafe6", - statusline_bg = "#1e242a", - lightbg = "#2d3339", - lightbg2 = "#252b31" + white = "#b0b0b0", + darker_black = "#171d23", + black = "#1a2026", -- nvim bg + black2 = "#20262c", + one_bg = "#242a30", + one_bg2 = "#292f35", + one_bg3 = "#2e343a", + grey = "#42484e", + grey_fg = "#474d53", + grey_fg2 = "#50565c", + light_grey = "#565c62", + red = "#ac8a8c", + baby_pink = "#de878f", + pink = "#e89199", + line = "#2d3339", -- for lines like vertsplit + green = "#8aac8b", + vibrant_green = "#9ec49f", + blue = "#6b8bab", + nord_blue = "#7797b7", + yellow = "#c4c19e", + sun = "#aca98a", + purple = "#a39ec4", + dark_purple = "#8f8aac", + teal = "#7c9cbc", + orange = "#e39a83", + cyan = "#9aafe6", + statusline_bg = "#1e242a", + lightbg = "#2d3339", + lightbg2 = "#252b31", } return colors diff --git a/lua/themes/norchad.lua b/lua/themes/norchad.lua index f3e3e8d..47d723a 100644 --- a/lua/themes/norchad.lua +++ b/lua/themes/norchad.lua @@ -1,33 +1,33 @@ local colors = { - white = "#abb2bf", - darker_black = "#2a303c", - black = "#2E3440", -- nvim bg - black2 = "#343a46", - one_bg = "#373d49", - one_bg2 = "#3a404c", - one_bg3 = "#3d434f", - grey = "#474d59", - grey_fg = "#565c68", - grey_fg2 = "#606672", - light_grey = "#646a76", - red = "#BF616A", - baby_pink = "#de878f", - pink = "#d57780", - line = "#3a404c", -- for lines like vertsplit - green = "#A3BE8C", - vibrant_green = "#afca98", - blue = "#7797b7", - nord_blue = "#81A1C1", - yellow = "#EBCB8B", - sun = "#e1c181", - purple = "#aab1be", - dark_purple = "#B48EAD", - teal = "#6484a4", - orange = "#e39a83", - cyan = "#9aafe6", - statusline_bg = "#333945", - lightbg = "#3f4551", - lightbg2 = "#393f4b" + white = "#abb2bf", + darker_black = "#2a303c", + black = "#2E3440", -- nvim bg + black2 = "#343a46", + one_bg = "#373d49", + one_bg2 = "#3a404c", + one_bg3 = "#3d434f", + grey = "#474d59", + grey_fg = "#565c68", + grey_fg2 = "#606672", + light_grey = "#646a76", + red = "#BF616A", + baby_pink = "#de878f", + pink = "#d57780", + line = "#3a404c", -- for lines like vertsplit + green = "#A3BE8C", + vibrant_green = "#afca98", + blue = "#7797b7", + nord_blue = "#81A1C1", + yellow = "#EBCB8B", + sun = "#e1c181", + purple = "#aab1be", + dark_purple = "#B48EAD", + teal = "#6484a4", + orange = "#e39a83", + cyan = "#9aafe6", + statusline_bg = "#333945", + lightbg = "#3f4551", + lightbg2 = "#393f4b", } return colors diff --git a/lua/themes/onedark.lua b/lua/themes/onedark.lua index 02d7d43..c9f2432 100644 --- a/lua/themes/onedark.lua +++ b/lua/themes/onedark.lua @@ -1,33 +1,33 @@ local colors = { - white = "#abb2bf", - darker_black = "#1b1f27", - black = "#1e222a", -- nvim bg - black2 = "#252931", - one_bg = "#282c34", -- real bg of onedark - one_bg2 = "#353b45", - one_bg3 = "#30343c", - grey = "#42464e", - grey_fg = "#565c64", - grey_fg2 = "#6f737b", - light_grey = "#6f737b", - red = "#d47d85", - baby_pink = "#DE8C92", - pink = "#ff75a0", - line = "#2a2e36", -- for lines like vertsplit - green = "#A3BE8C", - vibrant_green = "#7eca9c", - nord_blue = "#81A1C1", - blue = "#61afef", - yellow = "#e7c787", - sun = "#EBCB8B", - purple = "#b4bbc8", - dark_purple = "#c882e7", - teal = "#519ABA", - orange = "#fca2aa", - cyan = "#a3b8ef", - statusline_bg = "#22262e", - lightbg = "#2d3139", - lightbg2 = "#262a32" + white = "#abb2bf", + darker_black = "#1b1f27", + black = "#1e222a", -- nvim bg + black2 = "#252931", + one_bg = "#282c34", -- real bg of onedark + one_bg2 = "#353b45", + one_bg3 = "#30343c", + grey = "#42464e", + grey_fg = "#565c64", + grey_fg2 = "#6f737b", + light_grey = "#6f737b", + red = "#d47d85", + baby_pink = "#DE8C92", + pink = "#ff75a0", + line = "#2a2e36", -- for lines like vertsplit + green = "#A3BE8C", + vibrant_green = "#7eca9c", + nord_blue = "#81A1C1", + blue = "#61afef", + yellow = "#e7c787", + sun = "#EBCB8B", + purple = "#b4bbc8", + dark_purple = "#c882e7", + teal = "#519ABA", + orange = "#fca2aa", + cyan = "#a3b8ef", + statusline_bg = "#22262e", + lightbg = "#2d3139", + lightbg2 = "#262a32", } return colors diff --git a/lua/themes/tokyonight.lua b/lua/themes/tokyonight.lua index 67e635e..b241eb5 100644 --- a/lua/themes/tokyonight.lua +++ b/lua/themes/tokyonight.lua @@ -1,33 +1,33 @@ local colors = { - white = "#c0caf5", - darker_black = "#151621", - black = "#171823", -- nvim bg - black2 = "#20212c", - one_bg = "#242530", - one_bg2 = "#292a35", - one_bg3 = "#353b45", - grey = "#40486a", - grey_fg = "#4a5274", - grey_fg2 = "#4f5779", - light_grey = "#545c7e", - red = "#f7768e", - baby_pink = "#DE8C92", - pink = "#ff75a0", - line = "#242530", -- for lines like vertsplit - green = "#9ece6a", - vibrant_green = "#73daca", - nord_blue = "#80a8fd", - blue = "#7aa2f7", - yellow = "#e7c787", - sun = "#EBCB8B", - purple = "#bb9af7", - dark_purple = "#9d7cd8", - teal = "#0db9d7", - orange = "#ff9e64", - cyan = "#7dcfff", - statusline_bg = "#1d1e29", - lightbg = "#252631", - lightbg2 = "#22232e" + white = "#c0caf5", + darker_black = "#151621", + black = "#171823", -- nvim bg + black2 = "#20212c", + one_bg = "#242530", + one_bg2 = "#292a35", + one_bg3 = "#353b45", + grey = "#40486a", + grey_fg = "#4a5274", + grey_fg2 = "#4f5779", + light_grey = "#545c7e", + red = "#f7768e", + baby_pink = "#DE8C92", + pink = "#ff75a0", + line = "#242530", -- for lines like vertsplit + green = "#9ece6a", + vibrant_green = "#73daca", + nord_blue = "#80a8fd", + blue = "#7aa2f7", + yellow = "#e7c787", + sun = "#EBCB8B", + purple = "#bb9af7", + dark_purple = "#9d7cd8", + teal = "#0db9d7", + orange = "#ff9e64", + cyan = "#7dcfff", + statusline_bg = "#1d1e29", + lightbg = "#252631", + lightbg2 = "#22232e", } return colors diff --git a/lua/themes/tomorrow-night.lua b/lua/themes/tomorrow-night.lua index 7d721c7..be64656 100644 --- a/lua/themes/tomorrow-night.lua +++ b/lua/themes/tomorrow-night.lua @@ -1,33 +1,33 @@ local colors = { - white = "#C5C8C2", - darker_black = "#191b1d", - black = "#1d1f21", -- nvim bg - black2 = "#232527", - one_bg = "#363a41", - one_bg2 = "#353b45", - one_bg3 = "#30343c", - grey = "#434547", - grey_fg = "#545B68", - grey_fg2 = "#616875", - light_grey = "#676e7b", - red = "#cc6666", - baby_pink = "#FF6E79", - pink = "#ff9ca3", - line = "#27292b", -- for lines like vertsplit - green = "#a4b595", - vibrant_green = "#a3b991", - nord_blue = "#728da8", - blue = "#6f8dab", - yellow = "#d7bd8d", - sun = "#e4c180", - purple = "#b4bbc8", - dark_purple = "#b290ac", - teal = "#8abdb6", - orange = "#DE935F", - cyan = "#70c0b1", - statusline_bg = "#212326", - lightbg = "#373B41", - lightbg2 = "#2D3035" + white = "#C5C8C2", + darker_black = "#191b1d", + black = "#1d1f21", -- nvim bg + black2 = "#232527", + one_bg = "#363a41", + one_bg2 = "#353b45", + one_bg3 = "#30343c", + grey = "#434547", + grey_fg = "#545B68", + grey_fg2 = "#616875", + light_grey = "#676e7b", + red = "#cc6666", + baby_pink = "#FF6E79", + pink = "#ff9ca3", + line = "#27292b", -- for lines like vertsplit + green = "#a4b595", + vibrant_green = "#a3b991", + nord_blue = "#728da8", + blue = "#6f8dab", + yellow = "#d7bd8d", + sun = "#e4c180", + purple = "#b4bbc8", + dark_purple = "#b290ac", + teal = "#8abdb6", + orange = "#DE935F", + cyan = "#70c0b1", + statusline_bg = "#212326", + lightbg = "#373B41", + lightbg2 = "#2D3035", } return colors diff --git a/lua/utils.lua b/lua/utils.lua index 7301689..2709988 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -2,39 +2,36 @@ local M = {} -- 1st arg as current theme, 2nd as new theme M.change_theme = function(current_theme, new_theme) - if current_theme == nil or new_theme == nil then - print "Error: Provide current and new theme name" - return false - end - if current_theme == new_theme then - return - end + if current_theme == nil or new_theme == nil then + print "Error: Provide current and new theme name" + return false + end + if current_theme == new_theme then + return + end - local file = vim.fn.stdpath("config") .. "/lua/chadrc.lua" - -- store in data variable - local data = assert(M.file("r", file)) - -- escape characters which can be parsed as magic chars - current_theme = current_theme:gsub("%p", "%%%0") - new_theme = new_theme:gsub("%p", "%%%0") - local find = "theme = .?" .. current_theme .. ".?" - local replace = 'theme = "' .. new_theme .. '"' - local content = string.gsub(data, find, replace) - -- see if the find string exists in file - if content == data then - print("Error: Cannot change default theme with " .. new_theme .. ", edit " .. file .. " manually") - return false - else - assert(M.file("w", file, content)) - end + local file = vim.fn.stdpath "config" .. "/lua/chadrc.lua" + -- store in data variable + local data = assert(M.file("r", file)) + -- escape characters which can be parsed as magic chars + current_theme = current_theme:gsub("%p", "%%%0") + new_theme = new_theme:gsub("%p", "%%%0") + local find = "theme = .?" .. current_theme .. ".?" + local replace = 'theme = "' .. new_theme .. '"' + local content = string.gsub(data, find, replace) + -- see if the find string exists in file + if content == data then + print("Error: Cannot change default theme with " .. new_theme .. ", edit " .. file .. " manually") + return false + else + assert(M.file("w", file, content)) + end end M.clear_cmdline = function() - vim.defer_fn( - function() - vim.cmd("echo") - end, - 0 - ) + vim.defer_fn(function() + vim.cmd "echo" + end, 0) end -- 1st arg - r or w @@ -42,167 +39,167 @@ end -- 3rd arg - content if 1st arg is w -- return file data on read, nothing on write M.file = function(mode, filepath, content) - local data - local fd = assert(vim.loop.fs_open(filepath, mode, 438)) - local stat = assert(vim.loop.fs_fstat(fd)) - if stat.type ~= "file" then - data = false - else - if mode == "r" then - data = assert(vim.loop.fs_read(fd, stat.size, 0)) - else - assert(vim.loop.fs_write(fd, content, 0)) - data = true - end - end - assert(vim.loop.fs_close(fd)) - return data + local data + local fd = assert(vim.loop.fs_open(filepath, mode, 438)) + local stat = assert(vim.loop.fs_fstat(fd)) + if stat.type ~= "file" then + data = false + else + if mode == "r" then + data = assert(vim.loop.fs_read(fd, stat.size, 0)) + else + assert(vim.loop.fs_write(fd, content, 0)) + data = true + end + end + assert(vim.loop.fs_close(fd)) + return data end -- return a table of available themes M.list_themes = function(return_type) - local themes = {} - -- folder where theme files are stored - local themes_folder = vim.fn.stdpath("config") .. "/lua/themes" - -- list all the contents of the folder and filter out files with .lua extension, then append to themes table - local fd = vim.loop.fs_scandir(themes_folder) - if fd then - while true do - local name, typ = vim.loop.fs_scandir_next(fd) - if name == nil then - break + local themes = {} + -- folder where theme files are stored + local themes_folder = vim.fn.stdpath "config" .. "/lua/themes" + -- list all the contents of the folder and filter out files with .lua extension, then append to themes table + local fd = vim.loop.fs_scandir(themes_folder) + if fd then + while true do + local name, typ = vim.loop.fs_scandir_next(fd) + if name == nil then + break + end + if typ ~= "directory" and string.find(name, ".lua") then + -- return the table values as keys if specified + if return_type == "keys_as_value" then + themes[vim.fn.fnamemodify(name, ":r")] = true + else + table.insert(themes, vim.fn.fnamemodify(name, ":r")) end - if typ ~= "directory" and string.find(name, ".lua") then - -- return the table values as keys if specified - if return_type == "keys_as_value" then - themes[vim.fn.fnamemodify(name, ":r")] = true - else - table.insert(themes, vim.fn.fnamemodify(name, ":r")) - end - end - end - end - return themes + end + end + end + return themes end -- reload a plugin ( will try to load even if not loaded) -- can take a string or list ( table ) -- return true or false M.reload_plugin = function(plugins) - local status = true - local function _reload_plugin(plugin) - local loaded = package.loaded[plugin] - if loaded then - package.loaded[plugin] = nil - end - if not pcall(require, plugin) then - print("Error: Cannot load " .. plugin .. " plugin!") - status = false - end - end + local status = true + local function _reload_plugin(plugin) + local loaded = package.loaded[plugin] + if loaded then + package.loaded[plugin] = nil + end + if not pcall(require, plugin) then + print("Error: Cannot load " .. plugin .. " plugin!") + status = false + end + end - if type(plugins) == "string" then - _reload_plugin(plugins) - elseif type(plugins) == "table" then - for _, plugin in ipairs(plugins) do - _reload_plugin(plugin) - end - end - return status + if type(plugins) == "string" then + _reload_plugin(plugins) + elseif type(plugins) == "table" then + for _, plugin in ipairs(plugins) do + _reload_plugin(plugin) + end + end + return status end -- reload themes without restarting vim -- if no theme name given then reload the current theme M.reload_theme = function(theme_name) - local reload_plugin = require("utils").reload_plugin + local reload_plugin = require("utils").reload_plugin - -- if theme name is empty or nil, then reload the current theme - if (theme_name == nil or theme_name == "") then - theme_name = vim.g.nvchad_theme - end + -- if theme name is empty or nil, then reload the current theme + if theme_name == nil or theme_name == "" then + theme_name = vim.g.nvchad_theme + end - if not pcall(require, "themes/" .. theme_name) then - print("No such theme ( " .. theme_name .. " )") - return false - end + if not pcall(require, "themes/" .. theme_name) then + print("No such theme ( " .. theme_name .. " )") + return false + end - vim.g.nvchad_theme = theme_name + vim.g.nvchad_theme = theme_name - -- reload the base16 theme - local ok, base16 = pcall(require, "base16") - if not ok then - print("Error: Cannot load base16 plugin!") - return false - end - base16(base16.themes(theme_name), true) + -- reload the base16 theme + local ok, base16 = pcall(require, "base16") + if not ok then + print "Error: Cannot load base16 plugin!" + return false + end + base16(base16.themes(theme_name), true) - if - not reload_plugin { - "highlights", - "plugins.bufferline", - "galaxyline", - "plugins.statusline" - } - then - print "Error: Not able to reload all plugins." - return false - end + if + not reload_plugin { + "highlights", + "plugins.bufferline", + "galaxyline", + "plugins.statusline", + } + then + print "Error: Not able to reload all plugins." + return false + end - -- yes, this is very hacky, but due to new_async in - -- https://github.com/glepnir/galaxyline.nvim/blob/main/lua/galaxyline/provider.lua#L5-L36 - -- it doesn't work properly and some statusline stuff dissapears - local vcs = require("galaxyline.provider_vcs") - local fileinfo = require("galaxyline.provider_fileinfo") - local buffer = require("galaxyline.provider_buffer") - local extension = require("galaxyline.provider_extensions") - local whitespace = require("galaxyline.provider_whitespace") - local lspclient = require("galaxyline.provider_lsp") - _G.galaxyline_providers = { - BufferIcon = buffer.get_buffer_type_icon, - BufferNumber = buffer.get_buffer_number, - FileTypeName = buffer.get_buffer_filetype, - GitBranch = vcs.get_git_branch, - DiffAdd = vcs.diff_add, - DiffModified = vcs.diff_modified, - DiffRemove = vcs.diff_remove, - LineColumn = fileinfo.line_column, - FileFormat = fileinfo.get_file_format, - FileEncode = fileinfo.get_file_encode, - FileSize = fileinfo.get_file_size, - FileIcon = fileinfo.get_file_icon, - FileName = fileinfo.get_current_file_name, - SFileName = fileinfo.filename_in_special_buffer, - LinePercent = fileinfo.current_line_percent, - ScrollBar = extension.scrollbar_instance, - VistaPlugin = extension.vista_nearest, - WhiteSpace = whitespace.get_item, - GetLspClient = lspclient.get_lsp_client - } - local diagnostic = require("galaxyline.provider_diagnostic") - _G.galaxyline_providers.DiagnosticError = diagnostic.get_diagnostic_error - _G.galaxyline_providers.DiagnosticWarn = diagnostic.get_diagnostic_warn - _G.galaxyline_providers.DiagnosticHint = diagnostic.get_diagnostic_hint - _G.galaxyline_providers.DiagnosticInfo = diagnostic.get_diagnostic_info + -- yes, this is very hacky, but due to new_async in + -- https://github.com/glepnir/galaxyline.nvim/blob/main/lua/galaxyline/provider.lua#L5-L36 + -- it doesn't work properly and some statusline stuff dissapears + local vcs = require "galaxyline.provider_vcs" + local fileinfo = require "galaxyline.provider_fileinfo" + local buffer = require "galaxyline.provider_buffer" + local extension = require "galaxyline.provider_extensions" + local whitespace = require "galaxyline.provider_whitespace" + local lspclient = require "galaxyline.provider_lsp" + _G.galaxyline_providers = { + BufferIcon = buffer.get_buffer_type_icon, + BufferNumber = buffer.get_buffer_number, + FileTypeName = buffer.get_buffer_filetype, + GitBranch = vcs.get_git_branch, + DiffAdd = vcs.diff_add, + DiffModified = vcs.diff_modified, + DiffRemove = vcs.diff_remove, + LineColumn = fileinfo.line_column, + FileFormat = fileinfo.get_file_format, + FileEncode = fileinfo.get_file_encode, + FileSize = fileinfo.get_file_size, + FileIcon = fileinfo.get_file_icon, + FileName = fileinfo.get_current_file_name, + SFileName = fileinfo.filename_in_special_buffer, + LinePercent = fileinfo.current_line_percent, + ScrollBar = extension.scrollbar_instance, + VistaPlugin = extension.vista_nearest, + WhiteSpace = whitespace.get_item, + GetLspClient = lspclient.get_lsp_client, + } + local diagnostic = require "galaxyline.provider_diagnostic" + _G.galaxyline_providers.DiagnosticError = diagnostic.get_diagnostic_error + _G.galaxyline_providers.DiagnosticWarn = diagnostic.get_diagnostic_warn + _G.galaxyline_providers.DiagnosticHint = diagnostic.get_diagnostic_hint + _G.galaxyline_providers.DiagnosticInfo = diagnostic.get_diagnostic_info - return true + return true end -- toggle between 2 themes -- argument should be a table with 2 theme names M.toggle_theme = function(themes) - local current_theme = vim.g.current_nvchad_theme or vim.g.nvchad_theme - for _, name in ipairs(themes) do - if name ~= current_theme then - if require("utils").reload_theme(name) then - -- open a buffer and close it to reload the statusline - vim.cmd("new|bwipeout") - vim.g.current_nvchad_theme = name - if M.change_theme(vim.g.nvchad_theme, name) then - vim.g.nvchad_theme = name - end + local current_theme = vim.g.current_nvchad_theme or vim.g.nvchad_theme + for _, name in ipairs(themes) do + if name ~= current_theme then + if require("utils").reload_theme(name) then + -- open a buffer and close it to reload the statusline + vim.cmd "new|bwipeout" + vim.g.current_nvchad_theme = name + if M.change_theme(vim.g.nvchad_theme, name) then + vim.g.nvchad_theme = name end - end - end + end + end + end end return M From eaaefc236d1c0f3b0c6309bbb86a29067b5c515f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 16 Aug 2021 19:04:09 +0530 Subject: [PATCH 0544/1541] add one-light (#243) --- lua/highlights.lua | 11 +++++------ lua/themes/chadracula.lua | 2 ++ lua/themes/everforest.lua | 2 ++ lua/themes/gruvchad.lua | 2 ++ lua/themes/javacafe.lua | 2 ++ lua/themes/mountaineer.lua | 2 ++ lua/themes/norchad.lua | 2 ++ lua/themes/one-light.lua | 35 +++++++++++++++++++++++++++++++++++ lua/themes/onedark.lua | 2 ++ lua/themes/tokyonight.lua | 2 ++ lua/themes/tomorrow-night.lua | 2 ++ 11 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 lua/themes/one-light.lua diff --git a/lua/highlights.lua b/lua/highlights.lua index 02e70c2..3b6499b 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -9,11 +9,8 @@ local black = colors.black local black2 = colors.black2 local one_bg = colors.one_bg local one_bg2 = colors.one_bg2 -local one_bg3 = colors.one_bg3 -local light_grey = colors.light_grey local grey = colors.grey local grey_fg = colors.grey_fg -local grey_fg2 = colors.grey_fg2 local red = colors.red local line = colors.line local green = colors.green @@ -21,6 +18,8 @@ local nord_blue = colors.nord_blue local blue = colors.blue local yellow = colors.yellow local purple = colors.purple +local pmenu_bg = colors.pmenu_bg +local folder_bg = colors.folder_bg -- for guifg , bg @@ -51,7 +50,7 @@ fg("EndOfBuffer", black) -- Pmenu bg("Pmenu", one_bg) bg("PmenuSbar", one_bg2) -bg("PmenuSel", green) +bg("PmenuSel", pmenu_bg) bg("PmenuThumb", nord_blue) -- inactive statuslines as thin splitlines @@ -67,8 +66,8 @@ fg_bg("DiffChange", grey_fg, "none") fg_bg("DiffModified", nord_blue, "none") -- NvimTree -fg("NvimTreeFolderIcon", blue) -fg("NvimTreeFolderName", blue) +fg("NvimTreeFolderIcon", folder_bg) +fg("NvimTreeFolderName", folder_bg) fg("NvimTreeGitDirty", red) fg("NvimTreeOpenedFolderName", blue) fg("NvimTreeEmptyFolderName", blue) diff --git a/lua/themes/chadracula.lua b/lua/themes/chadracula.lua index 63af494..236de87 100644 --- a/lua/themes/chadracula.lua +++ b/lua/themes/chadracula.lua @@ -28,6 +28,8 @@ local colors = { statusline_bg = "#2b2d39", lightbg = "#343642", lightbg2 = "#2f313d", + pmenu_bg = "#b389ef", + folder_bg = "#BD93F9" } return colors diff --git a/lua/themes/everforest.lua b/lua/themes/everforest.lua index 37ba4b6..baa715a 100644 --- a/lua/themes/everforest.lua +++ b/lua/themes/everforest.lua @@ -28,6 +28,8 @@ local colors = { statusline_bg = "#2e363c", lightbg = "#3d454b", lightbg2 = "#333b41", + pmenu_bg = "#83c092", + folder_bg = "#7fbbb3" } return colors diff --git a/lua/themes/gruvchad.lua b/lua/themes/gruvchad.lua index 4c1ee5a..37a88fd 100644 --- a/lua/themes/gruvchad.lua +++ b/lua/themes/gruvchad.lua @@ -28,6 +28,8 @@ local colors = { statusline_bg = "#252829", lightbg = "#2d3139", lightbg2 = "#262a32", + pmenu_bg = "#89b482", + folder_bg = "#6d8dad" } return colors diff --git a/lua/themes/javacafe.lua b/lua/themes/javacafe.lua index 227b9a4..6633653 100644 --- a/lua/themes/javacafe.lua +++ b/lua/themes/javacafe.lua @@ -28,6 +28,8 @@ local colors = { statusline_bg = "#181f26", lightbg = "#222930", lightbg2 = "#1d242b", + pmenu_bg = "#ef8891", + folder_bg = "#99aee5", } return colors diff --git a/lua/themes/mountaineer.lua b/lua/themes/mountaineer.lua index af85873..f26d227 100644 --- a/lua/themes/mountaineer.lua +++ b/lua/themes/mountaineer.lua @@ -28,6 +28,8 @@ local colors = { statusline_bg = "#1e242a", lightbg = "#2d3339", lightbg2 = "#252b31", + pmenu_bg = "#8aac8b", + folder_bg = "#6b8bab" } return colors diff --git a/lua/themes/norchad.lua b/lua/themes/norchad.lua index 47d723a..a1a6a53 100644 --- a/lua/themes/norchad.lua +++ b/lua/themes/norchad.lua @@ -28,6 +28,8 @@ local colors = { statusline_bg = "#333945", lightbg = "#3f4551", lightbg2 = "#393f4b", + pmenu_bg = "#A3BE8C", + folder_bg = "#7797b7" } return colors diff --git a/lua/themes/one-light.lua b/lua/themes/one-light.lua new file mode 100644 index 0000000..d287dfd --- /dev/null +++ b/lua/themes/one-light.lua @@ -0,0 +1,35 @@ +local colors = { + white = "#54555b", + darker_black = "#f5f5f5", + black = "#fafafa", -- nvim bg + black2 = "#f1f1f1", + one_bg = "#f0f0f0", -- real bg of onedark + one_bg2 = "#ececec", + one_bg3 = "#e7e7e7", + grey = "#cbcbcb", + grey_fg = "#c6c6c6", + grey_fg2 = "#b7b7b7", + light_grey = "#b7b7b7", + red = "#e6676e", + baby_pink = "#F07178", + pink = "#ff75a0", + line = "#e9e9e9", -- for lines like vertsplit + green = "#7b90c7", + vibrant_green = "#7eca9c", + nord_blue = "#5e5f65", + blue = "#28a2f4", + yellow = "#7e7e7e", + sun = "#dea95f", + purple = "#a28dcd", + dark_purple = "#8e79b9", + teal = "#519ABA", + orange = "#FF6A00", + cyan = "#a3b8ef", + statusline_bg = "#f0f0f0", + lightbg = "#d6d6d6", + lightbg2 = "#5e5f65", + pmenu_bg = "#5e5f65", + folder_bg = "#6C6C6C" +} + +return colors diff --git a/lua/themes/onedark.lua b/lua/themes/onedark.lua index c9f2432..ec8980d 100644 --- a/lua/themes/onedark.lua +++ b/lua/themes/onedark.lua @@ -28,6 +28,8 @@ local colors = { statusline_bg = "#22262e", lightbg = "#2d3139", lightbg2 = "#262a32", + pmenu_bg = "#A3BE8C", + folder_bg = "#61afef" } return colors diff --git a/lua/themes/tokyonight.lua b/lua/themes/tokyonight.lua index b241eb5..5296414 100644 --- a/lua/themes/tokyonight.lua +++ b/lua/themes/tokyonight.lua @@ -28,6 +28,8 @@ local colors = { statusline_bg = "#1d1e29", lightbg = "#252631", lightbg2 = "#22232e", + pmenu_bg = "#7aa2f7", + folder_bg = "#7aa2f7" } return colors diff --git a/lua/themes/tomorrow-night.lua b/lua/themes/tomorrow-night.lua index be64656..2598533 100644 --- a/lua/themes/tomorrow-night.lua +++ b/lua/themes/tomorrow-night.lua @@ -28,6 +28,8 @@ local colors = { statusline_bg = "#212326", lightbg = "#373B41", lightbg2 = "#2D3035", + pmenu_bg = "#a4b595", + folder_bg = "#6f8dab" } return colors From c62e94923a58a11d57346b0f81dd01d5f3b4450b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 16 Aug 2021 22:18:08 +0530 Subject: [PATCH 0545/1541] add mapping cheatsheet (#244) --- lua/chadrc.lua | 5 +++++ lua/mappings.lua | 12 ++++++++++++ lua/pluginList.lua | 13 ++++++++++++- lua/plugins/chadsheet.lua | 25 +++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/chadsheet.lua diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 5ec40d8..4fea792 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -51,6 +51,7 @@ local M = { nvim_comment = true, neoscroll_nvim = true, telescope_media = true, + cheatsheet = false, }, -- make sure you dont use same keys twice mappings = { @@ -88,6 +89,10 @@ local M = { telescope_media = { media_files = "fp", }, + chadsheet = { + default_keys = "dk", + user_keys = "uk", + }, bufferline = { new_buffer = "", newtab = "b", diff --git a/lua/mappings.lua b/lua/mappings.lua index 329e5dd..7630dcd 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -114,6 +114,18 @@ M.telescope_media = function() map("n", m.media_files, ":Telescope media_files ", opt) end +M.chadsheet = function() + local m = user_map.chadsheet + + map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope()", opt) + map( + "n", + m.user_keys, + ":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false }", + opt + ) +end + M.bufferline = function() local m = user_map.bufferline diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 06acb47..7fbf998 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -169,7 +169,7 @@ return packer.startup(function() use { "nvim-telescope/telescope.nvim", - cmd = "Telescope", + after = "plenary.nvim", requires = { { "nvim-telescope/telescope-fzf-native.nvim", @@ -182,6 +182,17 @@ return packer.startup(function() require("mappings").telescope_media() end, }, + { + "sudormrfbin/cheatsheet.nvim", + disable = not plugin_status.cheatsheet, + after = "telescope.nvim", + config = function() + require "plugins.chadsheet" + end, + setup = function() + require("mappings").chadsheet() + end, + }, }, config = function() require "plugins.telescope" diff --git a/lua/plugins/chadsheet.lua b/lua/plugins/chadsheet.lua new file mode 100644 index 0000000..4ccd2b5 --- /dev/null +++ b/lua/plugins/chadsheet.lua @@ -0,0 +1,25 @@ +local present, chadsheet = pcall(require, "cheatsheet") + +if not present then + return +end + +local mappings = require("chadrc").mappings + +-- add user mappings to the cheetsheet +for section, data in pairs(mappings) do + for description, keymap in pairs(data) do + chadsheet.add_cheat(description, keymap, section) + end +end + +require("cheatsheet").setup { + + bundled_cheatsheets = { + enabled = { "default" }, + disabled = { "unicode", "nerd-fonts" }, + }, + + bundled_plugin_cheatsheets = false, + include_only_installed_plugins = true, +} From 00e76c72ecf826357857b2aa3d09ae022eab6e60 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 17 Aug 2021 10:11:58 +0530 Subject: [PATCH 0546/1541] rm install script --- install.sh | 362 ----------------------------------------------------- 1 file changed, 362 deletions(-) delete mode 100755 install.sh diff --git a/install.sh b/install.sh deleted file mode 100755 index 1558e59..0000000 --- a/install.sh +++ /dev/null @@ -1,362 +0,0 @@ -#!/usr/bin/env bash - -RED='\033[0;31m' -GREEN='\033[0;32m' -ORANGE='\033[0;33m' -BLUE='\033[0;34m' -NC='\033[0m' # No Color - -REPO="https://github.com/siduck76/NvChad.git" -BACKUP_PATH="/tmp/nvchad/" -TMP_NVCHAD="/tmp/nvchad_updates/" - -skip=0 -nvchad_path="$HOME/.config/nvim/" -do_startup="true" -dependencies=( - "git" -) -preserved_files=( - "lua/mappings.lua" - "lua/chadrc.lua" -) - -# https://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux -prompt() { - case ${1} in - "-s" | "--success") - printf "${GREEN}%s${NC}\n" "${2}" - ;; - "-e" | "--error") - printf "${RED}%s${NC}\n" "${2}" - ;; - "-w" | "--warning") - printf "${ORANGE}%s${NC}\n" "${2}" - ;; - "-i" | "--info") - printf "${BLUE}%s${NC}\n" "${2}" - ;; - *) - printf "${GREEN}%s${NC}\n" "${2}" - ;; - esac -} - -_usage() { - printf "%s" \ - "Usage: ./${0##*/} [ options ] - -h, --help -> Show this help. - -i, --install -> Install the config. - -r, --remove -> Remove the config. - -u, --update -> Update the existing config without removing existing stuff. - -s, --skip-startup -> Skip starting up nvim after installing the config. - -c, --clean-backups -> Remove backups (if any) from your system. - -p=*, --path=* -> Path to NvChad. Relevant for installing and updating. -" -} - -_remove() { - - read -p "Are you sure you want to uninstall NvChad? This will 'flush' dirs such as $HOME/.config/nvim/. (y/n): " u_reply - - if [[ "${u_reply}" == "y" ]]; then - printf " + %s\n" "$(prompt -w "Removing config -> ($HOME/.config/nvim/)")" - rm -rf "$HOME/.config/nvim/" - - printf " + %s\n" "$(prompt -w "Removing miscellaneous -> ($HOME/.local/share/nvim/)")" - rm -rf "$HOME/.local/share/nvim/" - - printf " + %s\n" "$(prompt -w "Removing cache -> ($HOME/.cache/nvim/)")" - rm -rf "$HOME/.cache/nvim/" - elif [[ "${u_reply}" == "n" ]]; then - prompt -i "Ok, enjoy NvChad :)" - else - prompt -e "Error: you must type either 'n' for no or 'y' for yes." - fi - -} - -_check_dependencies() { - local err - - for i in "${dependencies[@]}"; do - - if ! command -v "${i}" &>/dev/null; then - prompt -e "Error: You need to install the dependency '${i}'" - err="true" - fi - done - - if [[ "${err}" == "true" ]]; then - exit 1 - fi -} - -_fetch() { - printf " + %s\n" "$(prompt -i "Cleaning workspace")" - rm -rf ${nvchad_path} - printf " + %s\n" "$(prompt -i "Fetching repo")" - git clone -n ${REPO} --depth 1 "${nvchad_path}" - cd "${nvchad_path}" || return - - printf " + %s\n" "$(prompt -i "Checking out core")" - git checkout HEAD lua/ - printf " + %s\n" "$(prompt -i "Checking out init file")" - git checkout HEAD init.lua -} - -_check_prev_conf() { - if [[ -d "${nvchad_path}" ]]; then - mkdir -p "${BACKUP_PATH}" - amount_files=$(ls "${BACKUP_PATH}" | wc -l) - printf " + %s\n" "$(prompt -i "Previous config found, backing it up (/tmp/nvchad/backup_${amount_files})")" - cp -r "${nvchad_path}" "${BACKUP_PATH}backup_${amount_files}" - fi -} - -_check_nvim_version() { - version_string="$(nvim --version | grep -Eo 'NVIM.*v[0-9.]+' -m 1 | grep -Eo '[0-9.]+')" || return 1 - printf "%s\n" "${version_string}" | while IFS=. read -r num1 num2 num3; do - { [ "${num1}" -ge 0 ] && [ "${num2}" -ge 5 ] && [ "${num3}" -ge 0 ]; } || return 1 - done -} - -_startup() { - - printf " + %s\n" "$(prompt -i "Checking nvim version")" - if _NVIM="$(command -v nvim)"; then - if _check_nvim_version; then - printf " + %s\n" "$(prompt -i "NeoVim will open now")" - sleep 1 - "${_NVIM}" +'autocmd User PackerComplete ++once lua print "Waiting for PackerCompile.." vim.cmd "PackerCompile"' \ - +'autocmd User PackerCompileDone ++once quitall' \ - +'lua print "Wait for PackerUpdate and PackerCompile to complete.." require "pluginList" vim.cmd "PackerUpdate"' - "${_NVIM}" - else - prompt -e "Error: Neovim is installed, but version is lower than 0.5.x, install Neovim >= 5.x and then run nvim & do :PackerSync" - fi - else - prompt -e "Error: Neovim is not installed, install Neovim >= 5.x and then run neovim & do :PackerSync" - fi -} - -_install() { - prompt -w "-> Checking dependencies..." - _check_dependencies - prompt -w "-> Checking for previous confs..." - _check_prev_conf - prompt -w "-> Cloning..." - _fetch - - if [[ "$do_startup" == "true" ]]; then - prompt -w "-> Loading nvim..." - _startup - fi -} - -_clean_backups() { - prompt -w "-> Looking for backups..." - if [[ -d "${BACKUP_PATH}" ]]; then - if [[ -z "$(ls -A ${BACKUP_PATH})" ]]; then - printf " + %s\n" "$(prompt -w "No backups were found")" - else - printf " + %s\n" "$(prompt -i "Backups were found, removing them...")" - rm -rf "${BACKUP_PATH}" - fi - else - printf " + %s\n" "$(prompt -w "No backups were found")" - fi -} - -_update() { - - prompt -w "-> Checking if conf is eligible for being updated..." - - if [[ -z "$(ls -A ${nvchad_path})" ]]; then - printf " + %s\n" "$(prompt -e "Error: there is nothing to update")" - else - printf " + %s\n" "$(prompt -i "Updating config")" - mkdir -p ${TMP_NVCHAD} - for to_preservef in "${!preserved_files[@]}"; do - file="${nvchad_path}${preserved_files[to_preservef]}" - printf " + %s\n" "$(prompt -i "saving file: ${preserved_files[to_preservef]}")" - if [[ -e "${file}" ]]; then - mv "${file}" "${TMP_NVCHAD}" - fi - done - - do_startup="false" - _install - - for to_preservef in "${!preserved_files[@]}"; do - destination_file="${nvchad_path}${preserved_files[to_preservef]}" - file_name=$(basename "${preserved_files[to_preservef]}") - location_path=$(dirname "${destination_file}") - stored_file="${TMP_NVCHAD}${file_name}" - printf " + %s\n" "$(prompt -i "restoring file: ${preserved_files[to_preservef]}")" - - if [[ -e "${stored_file}" ]]; then - rm -rf "${destination_file}" - mkdir -p "${location_path}" - mv "${stored_file}" "${destination_file}" - fi - done - rm -rf "${TMP_NVCHAD}" - fi -} - -_skip_ahead() { - amount=$1 - skip=$((skip + amount)) -} - -_reorder_array() { - local arr=("$@") - - for i in "${!arr[@]}"; do - new_array+=("${arr[i]}") - done - arr=("${new_array[@]}") - unset new_array - - echo "${arr[@]}" -} - -_parse_args() { - local func_args=$1 - local argv=("$@") - - unset 'argv[0]' # becuase arg1 is $func_arg - for i in "${!argv[@]}"; do new_array+=("${argv[i]}"); done - argv=("${new_array[@]}") - unset new_array - - local argc=${#argv[@]} - - _skip_ahead() { - amount=$1 - skip=$((skip + amount)) - } - - _clean_arg() { - arg=$1 - if [[ "$arg" == "--"* ]]; then - echo "${arg:2}" - elif [[ "$arg" == "-"* ]]; then - echo "${arg:1}" - fi - } - - for j in "${!argv[@]}"; do - if [[ ${skip} -gt 0 ]]; then - left=$((argc - j)) - while [[ ${skip} > ${left} ]]; do ((skip--)); done - skip=$((skip - 1)) - continue - fi - - case ${argv[j]} in - --*) # End of all opt - case ${argv[j]} in - --) # End of all options. - break - ;; - *) - # eval "${func_args}" "$(_clean_arg "${argv[j]}")" "$j" - eval "${func_args}" "${argv[j]}" "$j" - ;; - esac - ;; - -*) - if [[ ${#argv[j]} -le 2 ]]; then - eval "${func_args}" "${argv[j]}" "$j" - else - tangled_args=$(_clean_arg "${argv[j]}") - for ((k = 0; k < ${#tangled_args}; k++)); do - eval "${func_args}" "-${tangled_args:$k:1}" "$j" - done - fi - ;; - *) - eval "${func_args}" "${argv[j]}" "$j" - ;; - esac - done -} - -main() { - local argvs=("$@") - local argc=${#argvs[@]} - local counter=0 - - _set_params() { - argc=${#argvs[@]} - counter=0 - } - - _free_arg() { - local index=$1 - unset 'argvs[index-counter]' - argvs=($(_reorder_array "${argvs[@]}")) - ((counter++)) - } - - assert_aditional_args() { - var=$1 # flag - index=$2 # flag's index - case ${var} in - -p=* | --path=*) - nvchad_path="${var#*=}" - _free_arg "${index}" - ;; - -s | --skip-startup) - do_startup="false" - _free_arg "${index}" - ;; - esac - } - - assert_args() { - var=$1 # flag - index=$2 # flag's index - case ${var} in - -h | --help) - _usage - ;; - -i | --install) - prompt -i "Installing NvChad..." - _install - ;; - -r | --remove) - prompt -i "Removing NvChad..." - _remove - ;; - -u | --update) - prompt -i "Updating NvChad..." - _update - ;; - -c | --clean-backups) - prompt -i "Cleaning NvChad backups..." - _clean_backups - ;; - *) - prompt -w "Warning: --unknown command '${var}'" - ;; - esac - } - - _set_params - _parse_args "assert_aditional_args" "${argvs[@]}" - _set_params - _parse_args "assert_args" "${argvs[@]}" -} - -init() { - if [ $# -eq 0 ]; then - prompt -e "ERROR: This script needs at least one argument" - else - main "${@}" - fi -} - -init "${@}" From cf4e0a2c53d77866327c313e88b7042de9351e3b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 17 Aug 2021 12:12:33 +0530 Subject: [PATCH 0547/1541] fix plenary.nvim not loading (#256) --- lua/pluginList.lua | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 7fbf998..c5ff17a 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -26,10 +26,18 @@ return packer.startup(function() end, } + use { + "glepnir/galaxyline.nvim", + disable = not plugin_status.galaxyline, + after = "nvim-web-devicons", + config = function() + require "plugins.statusline" + end, + } use { "akinsho/nvim-bufferline.lua", disable = not plugin_status.nvim_bufferline, - after = "nvim-base16.lua", + after = "galaxyline.nvim", config = function() require "plugins.bufferline" end, @@ -38,15 +46,6 @@ return packer.startup(function() end, } - use { - "glepnir/galaxyline.nvim", - disable = not plugin_status.galaxyline, - after = "nvim-base16.lua", - config = function() - require "plugins.statusline" - end, - } - -- color related stuff use { "NvChad/nvim-base16.lua", @@ -160,7 +159,7 @@ return packer.startup(function() use { "nvim-lua/plenary.nvim", - event = "BufRead", + after = "nvim-bufferline.lua", } use { "nvim-lua/popup.nvim", From 9c3f9adb2249ae1f83a9e99a95793bc43dc5690a Mon Sep 17 00:00:00 2001 From: sprlptr48 <63254295+sprlptr48@users.noreply.github.com> Date: Tue, 17 Aug 2021 16:10:41 +0300 Subject: [PATCH 0548/1541] Fix wrong link in README (#266) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 14d661f..1df4824 100644 --- a/README.md +++ b/README.md @@ -157,7 +157,7 @@ It would be nice if NvChad focuses on existing plugins and config before adding - PR's are always welcomed however NvChad aims to be less bloated. So PR's regarding existing plugin's enhancement and creating new features with existing plugins itself ( without adding a new plugin), bug fixes and corrections are more encouraged. - PR's regarding adding new plugins and their configs must be given some thought since NvChad is meant to be used as a "base" neovim config so it will have only a set of important plugins. So adding more and more opiniated plugins, making NvChad's config large unnecessarily + slow wont help!. - NvChad wont keep adding more and more features (like adding new plugins most likely) as requested if they feel unneeded and arent usable by the majority, no spoonfeeding!! If you think the plugin you want to be added is very useful and many NvChaders would find it useful, then such feature's PR is welcomed! -- But adding specific features like adding config for https://github.com/wakatime/vim-wakatime etc will be added in this https://github.com/siduck76/NvChad/wiki/Chad-user-configs. This lets the user select the things only they want ( adding configs from extra configs ) . +- But adding specific features like adding config for https://github.com/wakatime/vim-wakatime etc will be added in this https://github.com/NvChad/NvChad/wiki/Chad-user-configs. This lets the user select the things only they want ( adding configs from extra configs ) . # Chad contributors From e25f30899d63cda726db1a627ea29cb84c55cc67 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 17 Aug 2021 19:13:03 +0530 Subject: [PATCH 0549/1541] rename mountaineer --- lua/themes/{mountaineer.lua => mountain.lua} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lua/themes/{mountaineer.lua => mountain.lua} (100%) diff --git a/lua/themes/mountaineer.lua b/lua/themes/mountain.lua similarity index 100% rename from lua/themes/mountaineer.lua rename to lua/themes/mountain.lua From 9cee2c092180fbcb52a295a9b8b419c5049e5e40 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 17 Aug 2021 19:41:43 +0530 Subject: [PATCH 0550/1541] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 1df4824..806bed0 100644 --- a/README.md +++ b/README.md @@ -176,3 +176,7 @@ It is never required but always appreciated. undefined undefined

+ +## PS + +I get hearings from some plugin devs that nvchad users bring their issue , on nvim plugin repos . Please dont do that :/ . Bring NvChad related issues here only and not trouble plugin devs !! From 29f3259c420106efec5b97d30f92a4290b51c4c3 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 17 Aug 2021 20:13:58 +0530 Subject: [PATCH 0551/1541] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 806bed0..c0a5ed7 100644 --- a/README.md +++ b/README.md @@ -177,6 +177,6 @@ It is never required but always appreciated. undefined

-## PS +## Warning -I get hearings from some plugin devs that nvchad users bring their issue , on nvim plugin repos . Please dont do that :/ . Bring NvChad related issues here only and not trouble plugin devs !! +I get hearings from some plugin devs that nvchad users bring issues on discourse/reddit/matrix/gh repos etc. Please dont do that :/ . Bring NvChad related issues here ONLY and dont ever bother plugin devs, THIS IS A CLEAR WARNING! 😠 From 98086892a75a65d9aff81704128f953cf4c2a40d Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 17 Aug 2021 23:21:10 +0530 Subject: [PATCH 0552/1541] tree-wide: Format files | Reformat chadrc | Misc (#268) chadrc: looks cleaner this way move close buffer to misc as it is not dependent on buffer plugin --- lua/chadrc.lua | 260 ++++++++++++++++++---------------- lua/mappings.lua | 5 +- lua/themes/chadracula.lua | 2 +- lua/themes/everforest.lua | 2 +- lua/themes/gruvchad.lua | 2 +- lua/themes/mountain.lua | 2 +- lua/themes/norchad.lua | 2 +- lua/themes/one-light.lua | 2 +- lua/themes/onedark.lua | 2 +- lua/themes/tokyonight.lua | 2 +- lua/themes/tomorrow-night.lua | 2 +- 11 files changed, 148 insertions(+), 135 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 4fea792..23d94dc 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -1,131 +1,141 @@ -local M = { - ui = { - theme = "onedark", - fav_themes = { "onedark", "gruvchad" }, -- for theme toggle - theme_toggler = false, - hidden_statusline = { - -- these are filetypes, not pattern matched - "NvimTree", - "toggleterm", - }, +local M = {} + +M.ui = { + theme = "onedark", + -- for theme toggle + fav_themes = { + "onedark", + "gruvchad", }, - options = { - permanent_undo = true, - ruler = false, - hidden = true, - ignorecase = true, - mouse = "a", - cmdheight = 1, - updatetime = 250, - timeoutlen = 400, - clipboard = "unnamedplus", - number = true, - numberwidth = 2, - expandtab = true, - shiftwidth = 2, - smartindent = true, - mapleader = " ", - autosave = false, - enable_insertNav = true, -- navigation in insertmode + theme_toggler = false, + hidden_statusline = { + -- these are filetypes, not pattern matched + "NvimTree", + "toggleterm", }, - -- enable and disable plugins (true for disable) - plugin_status = { - -- UI - nvim_bufferline = true, - galaxyline = true, - nvim_colorizer = true, - dashboard_nvim = true, - blankline = true, - truezen_nvim = true, - better_esc = true, - -- lsp stuff - lspkind = true, - lspsignature = true, - -- git stuff - gitsigns = true, - vim_fugitive = true, - -- misc - neoformat = true, - vim_matchup = true, - autosave_nvim = true, - nvim_comment = true, - neoscroll_nvim = true, - telescope_media = true, - cheatsheet = false, +} + +M.options = { + permanent_undo = true, + ruler = false, + hidden = true, + ignorecase = true, + mouse = "a", + cmdheight = 1, + updatetime = 250, + timeoutlen = 400, + clipboard = "unnamedplus", + number = true, + numberwidth = 2, + expandtab = true, + shiftwidth = 2, + smartindent = true, + mapleader = " ", + autosave = false, + enable_insertNav = true, -- navigation in insertmode +} + +-- enable and disable plugins (false for disable) +M.plugin_status = { + -- UI + nvim_bufferline = true, + galaxyline = true, + nvim_colorizer = true, + dashboard_nvim = true, + blankline = true, + truezen_nvim = true, + better_esc = true, + -- lsp stuff + lspkind = true, + lspsignature = true, + -- git stuff + gitsigns = true, + vim_fugitive = true, + -- misc + neoformat = true, + vim_matchup = true, + autosave_nvim = true, + nvim_comment = true, + neoscroll_nvim = true, + telescope_media = true, + cheatsheet = false, +} + +-- make sure you dont use same keys twice +M.mappings = { + -- plugin specific + truezen = { + ataraxisMode = "zz", + minimalisticmode = "zm", + focusmode = "zf", }, - -- make sure you dont use same keys twice - mappings = { - truezen = { - ataraxisMode = "zz", - minimalisticmode = "zm", - focusmode = "zf", - }, - comment_nvim = { - comment_toggle = "/", - }, - nvimtree = { - treetoggle = "", - }, - neoformat = { - format = "fm", - }, - dashboard = { - open = "db", - newfile = "fn", - bookmarks = "bm", - sessionload = "l", - sessionsave = "s", - }, - telescope = { - live_grep = "fw", - git_status = "gt", - git_commits = "cm", - find_files = "ff", - buffers = "fb", - help_tags = "fh", - oldfiles = "fo", - themes = "th", - }, - telescope_media = { - media_files = "fp", - }, - chadsheet = { - default_keys = "dk", - user_keys = "uk", - }, - bufferline = { - new_buffer = "", - newtab = "b", - close = "", - cycleNext = "", - cyclePrev = "", - }, - fugitive = { - Git = "gs", - diffget_2 = "gh", - diffget_3 = "gl", - git_blame = "gb", - }, - toggleterm = { - toggle_window = "w", - toggle_vert = "v", - toggle_hori = "h", - hide_term = "JK", - }, - insert_nav = { - forward = "", - backward = "", - top_of_line = "", - end_of_line = "", - prev_line = "", - next_line = "", - }, - misc = { - esc_Termmode = "jk", - copywhole_file = "", - toggle_linenr = "n", - theme_toggle = "x", - }, + comment_nvim = { + comment_toggle = "/", + }, + nvimtree = { + treetoggle = "", -- file manager + }, + neoformat = { + format = "fm", + }, + dashboard = { + open = "db", + newfile = "fn", + bookmarks = "bm", + sessionload = "l", + sessionsave = "s", + }, + telescope = { + live_grep = "fw", + git_status = "gt", + git_commits = "cm", + find_files = "ff", + buffers = "fb", + help_tags = "fh", + oldfiles = "fo", + themes = "th", + }, + telescope_media = { + media_files = "fp", + }, + chadsheet = { + default_keys = "dk", + user_keys = "uk", + }, + bufferline = { + new_buffer = "", + newtab = "b", + cycleNext = "", -- next buffer + cyclePrev = "", -- previous buffer + }, + fugitive = { + Git = "gs", + diffget_2 = "gh", + diffget_3 = "gl", + git_blame = "gb", + }, + toggleterm = { + toggle_window = "w", + toggle_vert = "v", + toggle_hori = "h", + hide_term = "JK", + }, + -- navigation in insert mode + insert_nav = { + forward = "", + backward = "", + top_of_line = "", + end_of_line = "", + prev_line = "", + next_line = "", + }, + -- non plugin + misc = { + esc_Termmode = "jk", -- get out of terminal mode + close_buffer = "", -- close current focused buffer + copywhole_file = "", + toggle_linenr = "n", -- show or hide line number + theme_toggle = "x", }, } diff --git a/lua/mappings.lua b/lua/mappings.lua index 7630dcd..ecd02d8 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -45,6 +45,10 @@ map("n", miscMap.toggle_linenr, ":set nu!", opt) -- get out of terminal with jk map("t", miscMap.esc_Termmode, "", opt) +-- close current focused buffer, terminal or normal +-- todo: don't close if non-terminal buffer is saved +map("n", miscMap.close_buffer, ":bd!", opt) + M.toggleterm = function() local m = user_map.toggleterm @@ -131,7 +135,6 @@ M.bufferline = function() map("n", m.new_buffer, ":enew", opt) -- new buffer map("n", m.newtab, ":tabnew", opt) -- new tab - map("n", m.close, ":bd!", opt) -- close buffer -- move between tabs diff --git a/lua/themes/chadracula.lua b/lua/themes/chadracula.lua index 236de87..1cd6146 100644 --- a/lua/themes/chadracula.lua +++ b/lua/themes/chadracula.lua @@ -29,7 +29,7 @@ local colors = { lightbg = "#343642", lightbg2 = "#2f313d", pmenu_bg = "#b389ef", - folder_bg = "#BD93F9" + folder_bg = "#BD93F9", } return colors diff --git a/lua/themes/everforest.lua b/lua/themes/everforest.lua index baa715a..da9f59f 100644 --- a/lua/themes/everforest.lua +++ b/lua/themes/everforest.lua @@ -29,7 +29,7 @@ local colors = { lightbg = "#3d454b", lightbg2 = "#333b41", pmenu_bg = "#83c092", - folder_bg = "#7fbbb3" + folder_bg = "#7fbbb3", } return colors diff --git a/lua/themes/gruvchad.lua b/lua/themes/gruvchad.lua index 37a88fd..c7b174f 100644 --- a/lua/themes/gruvchad.lua +++ b/lua/themes/gruvchad.lua @@ -29,7 +29,7 @@ local colors = { lightbg = "#2d3139", lightbg2 = "#262a32", pmenu_bg = "#89b482", - folder_bg = "#6d8dad" + folder_bg = "#6d8dad", } return colors diff --git a/lua/themes/mountain.lua b/lua/themes/mountain.lua index f26d227..9bf5989 100644 --- a/lua/themes/mountain.lua +++ b/lua/themes/mountain.lua @@ -29,7 +29,7 @@ local colors = { lightbg = "#2d3339", lightbg2 = "#252b31", pmenu_bg = "#8aac8b", - folder_bg = "#6b8bab" + folder_bg = "#6b8bab", } return colors diff --git a/lua/themes/norchad.lua b/lua/themes/norchad.lua index a1a6a53..01b6e52 100644 --- a/lua/themes/norchad.lua +++ b/lua/themes/norchad.lua @@ -29,7 +29,7 @@ local colors = { lightbg = "#3f4551", lightbg2 = "#393f4b", pmenu_bg = "#A3BE8C", - folder_bg = "#7797b7" + folder_bg = "#7797b7", } return colors diff --git a/lua/themes/one-light.lua b/lua/themes/one-light.lua index d287dfd..683d69a 100644 --- a/lua/themes/one-light.lua +++ b/lua/themes/one-light.lua @@ -29,7 +29,7 @@ local colors = { lightbg = "#d6d6d6", lightbg2 = "#5e5f65", pmenu_bg = "#5e5f65", - folder_bg = "#6C6C6C" + folder_bg = "#6C6C6C", } return colors diff --git a/lua/themes/onedark.lua b/lua/themes/onedark.lua index ec8980d..2ff66aa 100644 --- a/lua/themes/onedark.lua +++ b/lua/themes/onedark.lua @@ -29,7 +29,7 @@ local colors = { lightbg = "#2d3139", lightbg2 = "#262a32", pmenu_bg = "#A3BE8C", - folder_bg = "#61afef" + folder_bg = "#61afef", } return colors diff --git a/lua/themes/tokyonight.lua b/lua/themes/tokyonight.lua index 5296414..5f7df4b 100644 --- a/lua/themes/tokyonight.lua +++ b/lua/themes/tokyonight.lua @@ -29,7 +29,7 @@ local colors = { lightbg = "#252631", lightbg2 = "#22232e", pmenu_bg = "#7aa2f7", - folder_bg = "#7aa2f7" + folder_bg = "#7aa2f7", } return colors diff --git a/lua/themes/tomorrow-night.lua b/lua/themes/tomorrow-night.lua index 2598533..01c78b6 100644 --- a/lua/themes/tomorrow-night.lua +++ b/lua/themes/tomorrow-night.lua @@ -29,7 +29,7 @@ local colors = { lightbg = "#373B41", lightbg2 = "#2D3035", pmenu_bg = "#a4b595", - folder_bg = "#6f8dab" + folder_bg = "#6f8dab", } return colors From 0d35b9ddaceb0a35d247b56cd37bbcd70f3c73de Mon Sep 17 00:00:00 2001 From: Pocco81 <58336662+Pocco81@users.noreply.github.com> Date: Tue, 17 Aug 2021 13:32:48 -0500 Subject: [PATCH 0553/1541] feat: added default conf and deep extension capabilities (#269) --- lua/chadrc.lua | 2 + lua/default_config.lua | 142 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 lua/default_config.lua diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 23d94dc..17981d2 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -139,4 +139,6 @@ M.mappings = { }, } +M = vim.tbl_deep_extend("force", require("default_config"), M) + return M diff --git a/lua/default_config.lua b/lua/default_config.lua new file mode 100644 index 0000000..23d94dc --- /dev/null +++ b/lua/default_config.lua @@ -0,0 +1,142 @@ +local M = {} + +M.ui = { + theme = "onedark", + -- for theme toggle + fav_themes = { + "onedark", + "gruvchad", + }, + theme_toggler = false, + hidden_statusline = { + -- these are filetypes, not pattern matched + "NvimTree", + "toggleterm", + }, +} + +M.options = { + permanent_undo = true, + ruler = false, + hidden = true, + ignorecase = true, + mouse = "a", + cmdheight = 1, + updatetime = 250, + timeoutlen = 400, + clipboard = "unnamedplus", + number = true, + numberwidth = 2, + expandtab = true, + shiftwidth = 2, + smartindent = true, + mapleader = " ", + autosave = false, + enable_insertNav = true, -- navigation in insertmode +} + +-- enable and disable plugins (false for disable) +M.plugin_status = { + -- UI + nvim_bufferline = true, + galaxyline = true, + nvim_colorizer = true, + dashboard_nvim = true, + blankline = true, + truezen_nvim = true, + better_esc = true, + -- lsp stuff + lspkind = true, + lspsignature = true, + -- git stuff + gitsigns = true, + vim_fugitive = true, + -- misc + neoformat = true, + vim_matchup = true, + autosave_nvim = true, + nvim_comment = true, + neoscroll_nvim = true, + telescope_media = true, + cheatsheet = false, +} + +-- make sure you dont use same keys twice +M.mappings = { + -- plugin specific + truezen = { + ataraxisMode = "zz", + minimalisticmode = "zm", + focusmode = "zf", + }, + comment_nvim = { + comment_toggle = "/", + }, + nvimtree = { + treetoggle = "", -- file manager + }, + neoformat = { + format = "fm", + }, + dashboard = { + open = "db", + newfile = "fn", + bookmarks = "bm", + sessionload = "l", + sessionsave = "s", + }, + telescope = { + live_grep = "fw", + git_status = "gt", + git_commits = "cm", + find_files = "ff", + buffers = "fb", + help_tags = "fh", + oldfiles = "fo", + themes = "th", + }, + telescope_media = { + media_files = "fp", + }, + chadsheet = { + default_keys = "dk", + user_keys = "uk", + }, + bufferline = { + new_buffer = "", + newtab = "b", + cycleNext = "", -- next buffer + cyclePrev = "", -- previous buffer + }, + fugitive = { + Git = "gs", + diffget_2 = "gh", + diffget_3 = "gl", + git_blame = "gb", + }, + toggleterm = { + toggle_window = "w", + toggle_vert = "v", + toggle_hori = "h", + hide_term = "JK", + }, + -- navigation in insert mode + insert_nav = { + forward = "", + backward = "", + top_of_line = "", + end_of_line = "", + prev_line = "", + next_line = "", + }, + -- non plugin + misc = { + esc_Termmode = "jk", -- get out of terminal mode + close_buffer = "", -- close current focused buffer + copywhole_file = "", + toggle_linenr = "n", -- show or hide line number + theme_toggle = "x", + }, +} + +return M From b571fd9d40da98cefe6af4955a846cefae128b70 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 18 Aug 2021 00:08:38 +0530 Subject: [PATCH 0554/1541] test user config xD --- lua/default_config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/default_config.lua b/lua/default_config.lua index 23d94dc..8a97ff4 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -1,7 +1,7 @@ local M = {} M.ui = { - theme = "onedark", + theme = "gruvchad", -- for theme toggle fav_themes = { "onedark", From 056fcb51f5a4cffd8b825ec7de306836e3975fad Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 18 Aug 2021 00:33:37 +0530 Subject: [PATCH 0555/1541] User config works --- lua/default_config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/default_config.lua b/lua/default_config.lua index 8a97ff4..23d94dc 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -1,7 +1,7 @@ local M = {} M.ui = { - theme = "gruvchad", + theme = "onedark", -- for theme toggle fav_themes = { "onedark", From 51760c21f5a54ec4fd5b1e025a48267462c6daa2 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 18 Aug 2021 11:10:13 +0530 Subject: [PATCH 0556/1541] Add important notes for user , default config --- lua/chadrc.lua | 4 +++- lua/default_config.lua | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 17981d2..0e32766 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -1,3 +1,5 @@ +-- IMPORTANT NOTE : This is user config + local M = {} M.ui = { @@ -139,6 +141,6 @@ M.mappings = { }, } -M = vim.tbl_deep_extend("force", require("default_config"), M) +M = vim.tbl_deep_extend("force", require "default_config", M) return M diff --git a/lua/default_config.lua b/lua/default_config.lua index 23d94dc..71f1dc9 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -1,3 +1,5 @@ +-- IMPORTANT NOTE : This is default config, so dont change anything here. (check chadrc.lua instead) + local M = {} M.ui = { From 575dc10ddcf940d321a5cbfcf5915ed2f134ab56 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Wed, 18 Aug 2021 20:13:35 +1000 Subject: [PATCH 0557/1541] Greatly improve terminal features! Persistent terminals (#275) * remove toggleTerm plugin * Adding term binds, term hider & Telescope terms to bring them back * Adding many term features! --- lua/chadrc.lua | 17 ++-- lua/mappings.lua | 32 +++---- lua/pluginList.lua | 10 -- lua/plugins/bufferline.lua | 20 +++- lua/plugins/telescope.lua | 3 + lua/plugins/toggleterm.lua | 47 --------- lua/telescope/_extensions/terms.lua | 144 ++++++++++++++++++++++++++++ lua/utils.lua | 113 ++++++++++++++++++++++ 8 files changed, 303 insertions(+), 83 deletions(-) delete mode 100644 lua/plugins/toggleterm.lua create mode 100644 lua/telescope/_extensions/terms.lua diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 0e32766..1f8d7d0 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -13,7 +13,6 @@ M.ui = { hidden_statusline = { -- these are filetypes, not pattern matched "NvimTree", - "toggleterm", }, } @@ -107,6 +106,7 @@ M.mappings = { bufferline = { new_buffer = "", newtab = "b", + close = "", -- close a buffer with custom func in utils.lua cycleNext = "", -- next buffer cyclePrev = "", -- previous buffer }, @@ -116,11 +116,13 @@ M.mappings = { diffget_3 = "gl", git_blame = "gb", }, - toggleterm = { - toggle_window = "w", - toggle_vert = "v", - toggle_hori = "h", - hide_term = "JK", + terms = { -- below are NvChad mappings, not plugin mappings + esc_termmode = "jk", + esc_hide_termmode = "JK", + pick_term = "W", -- note: this is a telescope extension + new_wind = "w", + new_vert = "v", + new_hori = "h", }, -- navigation in insert mode insert_nav = { @@ -131,10 +133,7 @@ M.mappings = { prev_line = "", next_line = "", }, - -- non plugin misc = { - esc_Termmode = "jk", -- get out of terminal mode - close_buffer = "", -- close current focused buffer copywhole_file = "", toggle_linenr = "n", -- show or hide line number theme_toggle = "x", diff --git a/lua/mappings.lua b/lua/mappings.lua index ecd02d8..17e8d9e 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -41,28 +41,27 @@ map("n", miscMap.copywhole_file, ":%y+", opt) -- toggle numbers map("n", miscMap.toggle_linenr, ":set nu!", opt) --- open a new buffer as a Terminal --- get out of terminal with jk -map("t", miscMap.esc_Termmode, "", opt) --- close current focused buffer, terminal or normal --- todo: don't close if non-terminal buffer is saved -map("n", miscMap.close_buffer, ":bd!", opt) +-- terminals +local function terms() + local m = user_map.terms -M.toggleterm = function() - local m = user_map.toggleterm + -- get out of terminal mode + map("t", m.esc_termmode, "", opt) + -- hide a term from within terminal mode + map("t", m.esc_hide_termmode, " :lua require('utils').close_buffer() ", opt) + -- pick a hidden term + map("n", m.pick_term, ":Telescope terms ", opt) -- Open terminals - map("n", m.toggle_window, ":lua termW:toggle() ", opt) - map("n", m.toggle_vert, ":lua termV:toggle() ", opt) - map("n", m.toggle_hori, ":lua termH:toggle() ", opt) - - -- toggle(HIDE) a term from within terminal edit mode - map("t", m.hide_term, " :ToggleTerm ", opt) - map("t", m.hide_term, " :ToggleTerm ", opt) - map("t", m.hide_term, " :ToggleTerm ", opt) + -- TODO this opens on top of an existing vert/hori term, fixme + map("n", m.new_wind, ":execute 'terminal' | let b:term_type = 'wind' | startinsert ", opt) + map("n", m.new_vert, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert ", opt) + map("n", m.new_hori, ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert ", opt) end +terms() + M.truezen = function() local m = user_map.truezen @@ -135,6 +134,7 @@ M.bufferline = function() map("n", m.new_buffer, ":enew", opt) -- new buffer map("n", m.newtab, ":tabnew", opt) -- new tab + map("n", m.close, ":lua require('utils').close_buffer() ", opt) -- close buffer -- move between tabs diff --git a/lua/pluginList.lua b/lua/pluginList.lua index c5ff17a..79ad14b 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -212,16 +212,6 @@ return packer.startup(function() } -- misc plugins - use { - "akinsho/nvim-toggleterm.lua", - event = "BufWinEnter", - config = function() - require "plugins.toggleterm" - end, - setup = function() - require("mappings").toggleterm() - end, - } use { "windwp/nvim-autopairs", after = "nvim-compe", diff --git a/lua/plugins/bufferline.lua b/lua/plugins/bufferline.lua index 06236d5..d55b70c 100644 --- a/lua/plugins/bufferline.lua +++ b/lua/plugins/bufferline.lua @@ -5,7 +5,7 @@ local present, bufferline = pcall(require, "bufferline") if not present then return end - + bufferline.setup { options = { offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, @@ -24,6 +24,24 @@ bufferline.setup { separator_style = "thin", mappings = true, always_show_bufferline = true, + custom_filter = function(buf_number) + -- Func to filter out our managed/persistent split terms + local present_type, type = pcall(function() + return vim.api.nvim_buf_get_var(buf_number, "term_type") + end) + + if present_type then + if type == "vert" then + return false + elseif type == "hori" then + return false + else + return true + end + else + return true + end + end, }, highlights = { fill = { diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 46f91ae..40b7383 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -65,8 +65,11 @@ telescope.setup { }, } +-- NvChad pickers -- load the theme_switcher extension require("telescope").load_extension "themes" +-- load the term_picker extension +require("telescope").load_extension "terms" if not pcall(function() telescope.load_extension "fzf" diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua deleted file mode 100644 index 7baaa64..0000000 --- a/lua/plugins/toggleterm.lua +++ /dev/null @@ -1,47 +0,0 @@ -local present, toggleterm = pcall(require, "toggleterm") -if not present then - return -end - -toggleterm.setup { - -- size can be a number or function which is passed the current terminal - size = function(term) - if term.direction == "horizontal" then - return 15 - elseif term.direction == "vertical" then - return vim.o.columns * 0.4 - end - end, - -- open_mapping = [[]], -- mapping set in mappings.lua - hide_numbers = true, -- hide the number column in toggleterm buffers - shade_terminals = false, - start_in_insert = true, - -- insert_mappings = true, -- see 'open_mapping', not set on purpose - -- whether or not the open mapping applies in insert mode - persist_size = true, - direction = "vertical", - close_on_exit = true, -- close the terminal window when the process exits - -- This field is only relevant if direction is set to 'float' - float_opts = { - border = "single", - winblend = 0, - highlights = { - border = "Normal", - background = "Normal", - }, - }, -} - -local Terminal = require("toggleterm.terminal").Terminal - -_G.termW = Terminal:new { - direction = "window", -} - -_G.termV = Terminal:new { - direction = "vertical", -} - -_G.termH = Terminal:new { - direction = "horizontal", -} diff --git a/lua/telescope/_extensions/terms.lua b/lua/telescope/_extensions/terms.lua new file mode 100644 index 0000000..7913666 --- /dev/null +++ b/lua/telescope/_extensions/terms.lua @@ -0,0 +1,144 @@ +-- This file can be loaded as a telescope extension +local M = {} + +-- Custom theme picker +-- Most of the code is copied from telescope buffer builtin +-- Src: https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/builtin/internal.lua +M.term_picker = function(opts) + local pickers, finders, previewers, make_entry, actions, action_state, utils, conf + if pcall(require, "telescope") then + pickers = require "telescope.pickers" + finders = require "telescope.finders" + previewers = require "telescope.previewers" + + make_entry = require "telescope.make_entry" + actions = require "telescope.actions" + action_state = require "telescope.actions.state" + utils = require "telescope.utils" + conf = require("telescope.config").values + else + error "Cannot find telescope!" + end + + local filter = vim.tbl_filter + + local local_utils = require "utils" + + -- buffer number and name + local bufnr = vim.api.nvim_get_current_buf() + local bufname = vim.api.nvim_buf_get_name(bufnr) + + local bufnrs = filter(function(b) + local present_type, type = pcall(function() + return vim.api.nvim_buf_get_var(b, "term_type") + end) + + if not present_type then + -- let's only terms that we created + return false + end + + + -- if 1 ~= vim.fn.buflisted(b) then + -- return false + -- end + -- only hide unloaded buffers if opts.show_all_buffers is false, keep them listed if true or nil + if opts.show_all_buffers == false and not vim.api.nvim_buf_is_loaded(b) then + return false + end + if opts.ignore_current_buffer and b == vim.api.nvim_get_current_buf() then + return false + end + return true + end, vim.api.nvim_list_bufs()) + if not next(bufnrs) then + return + end + if opts.sort_mru then + table.sort(bufnrs, function(a, b) + return vim.fn.getbufinfo(a)[1].lastused > vim.fn.getbufinfo(b)[1].lastused + end) + end + + local buffers = {} + local default_selection_idx = 1 + for _, bufnr in ipairs(bufnrs) do + local flag = bufnr == vim.fn.bufnr "" and "%" or (bufnr == vim.fn.bufnr "#" and "#" or " ") + + if opts.sort_lastused and not opts.ignore_current_buffer and flag == "#" then + default_selection_idx = 2 + end + + local element = { + bufnr = bufnr, + flag = flag, + info = vim.fn.getbufinfo(bufnr)[1], + } + + if opts.sort_lastused and (flag == "#" or flag == "%") then + local idx = ((buffers[1] ~= nil and buffers[1].flag == "%") and 2 or 1) + table.insert(buffers, idx, element) + else + table.insert(buffers, element) + end + end + + if not opts.bufnr_width then + local max_bufnr = math.max(unpack(bufnrs)) + opts.bufnr_width = #tostring(max_bufnr) + end + + pickers.new(opts, { + prompt_title = "Terminal buffers", + finder = finders.new_table { + results = buffers, + entry_maker = opts.entry_maker or make_entry.gen_from_buffer(opts), + }, + previewer = conf.grep_previewer(opts), + sorter = conf.generic_sorter(opts), + default_selection_index = default_selection_idx, + attach_mappings = function(prompt_bufnr) + actions.select_default:replace(function() + local entry = action_state.get_selected_entry() + actions.close(prompt_bufnr) + + local buf = entry.bufnr + + local chad_term, type = pcall(function() + return vim.api.nvim_buf_get_var(buf, "term_type") + end) + + -- TODO buffer checks/error detection (make sure we do get a buf) + + if chad_term then + if type == "wind" then + -- swtich to term buff & show in bufferline + vim.cmd(string.format('b %d | setlocal bl', buf)) + -- vim.cmd('startinsert') TODO fix this + elseif type == "vert" then + vim.cmd(string.format('vsp #%d', buf)) + -- vim.cmd('startinsert') TODO fix this + elseif type == "hori" then + -- TODO change 15 to a chad config var number + vim.cmd(string.format('15 sp #%d ', buf)) + -- vim.cmd('startinsert') TODO fix this + end + end + end) + + return true + end, + }):find() +end + +-- register term picker as terms to telescope +local present, telescope = pcall(require, "telescope") +if present then + return telescope.register_extension { + exports = { + terms = M.term_picker, + }, + } +else + error "Cannot find telescope!" +end diff --git a/lua/utils.lua b/lua/utils.lua index 2709988..367dd3e 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -34,6 +34,119 @@ M.clear_cmdline = function() end, 0) end +M.close_buffer = function(bufexpr, force) + -- This is a modification of a NeoVim plugin from + -- Author: ojroques - Olivier Roques + -- Src: https://github.com/ojroques/nvim-bufdel + -- (Author has okayed copy-paste) + + -- Options + local opts = { + next = 'cycle', -- how to retrieve the next buffer + quit = false, -- exit when last buffer is deleted + --TODO make this a chadrc flag/option + } + + -- ---------------- + -- Helper functions + -- ---------------- + + -- Switch to buffer 'buf' on each window from list 'windows' + local function switch_buffer(windows, buf) + local cur_win = vim.fn.winnr() + for _, winid in ipairs(windows) do + vim.cmd(string.format('%d wincmd w', vim.fn.win_id2win(winid))) + vim.cmd(string.format('buffer %d', buf)) + end + vim.cmd(string.format('%d wincmd w', cur_win)) -- return to original window + end + + -- Select the first buffer with a number greater than given buffer + local function get_next_buf(buf) + local next = vim.fn.bufnr('#') + if opts.next == 'alternate' and vim.fn.buflisted(next) == 1 then + return next + end + for i = 0, vim.fn.bufnr('$') - 1 do + next = (buf + i) % vim.fn.bufnr('$') + 1 -- will loop back to 1 + if vim.fn.buflisted(next) == 1 then + return next + end + end + end + + -- ---------------- + -- End helper functions + -- ---------------- + + local buf = vim.fn.bufnr() + if vim.fn.buflisted(buf) == 0 then -- exit if buffer number is invalid + return + end + + if #vim.fn.getbufinfo({buflisted = 1}) < 2 then + if opts.quit then + -- exit when there is only one buffer left + if force then + vim.cmd('qall!') + else + vim.cmd('confirm qall') + end + return + end + + local chad_term, type = pcall(function() + return vim.api.nvim_buf_get_var(buf, "term_type") + end) + + if chad_term then + -- Must be a window type + vim.cmd(string.format('setlocal nobl', buf)) + vim.cmd('enew') + return + end + -- don't exit and create a new empty buffer + vim.cmd('enew') + vim.cmd('bp') + end + + local next_buf = get_next_buf(buf) + local windows = vim.fn.getbufinfo(buf)[1].windows + + -- force deletion of terminal buffers to avoid the prompt + if force or vim.fn.getbufvar(buf, '&buftype') == 'terminal' then + local chad_term, type = pcall(function() + return vim.api.nvim_buf_get_var(buf, "term_type") + end) + + -- TODO this scope is error prone, make resilient + if chad_term then + if type == "wind" then + -- hide from bufferline + vim.cmd(string.format('%d bufdo setlocal nobl', buf)) + -- swtich to another buff + -- TODO switch to next bufffer, this works too + vim.cmd('BufferLineCycleNext') + else + local cur_win = vim.fn.winnr() + -- we can close this window + vim.cmd(string.format('%d wincmd c', cur_win)) + return + end + else + switch_buffer(windows, next_buf) + vim.cmd(string.format('bd! %d', buf)) + end + else + switch_buffer(windows, next_buf) + vim.cmd(string.format('silent! confirm bd %d', buf)) + end + -- revert buffer switches if user has canceled deletion + if vim.fn.buflisted(buf) == 1 then + switch_buffer(windows, buf) + end +end + -- 1st arg - r or w -- 2nd arg - file path -- 3rd arg - content if 1st arg is w From e6631226385fa6480ba9d35f1b06711c4393c75a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 18 Aug 2021 15:25:58 +0530 Subject: [PATCH 0558/1541] add bg to Floating window --- lua/highlights.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/highlights.lua b/lua/highlights.lua index 3b6499b..88604f6 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -112,7 +112,7 @@ fg("DashboardFooter", grey_fg) -- packer's floating window -bg("NormalFloat", "NONE") +bg("NormalFloat", one_bg) fg("FloatBorder", blue) -- set bg color for nvim From fa965c979733dbdb964df3d4deff3b11c8604cbc Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Wed, 18 Aug 2021 22:13:56 +1000 Subject: [PATCH 0559/1541] added relativenumber option & statusline option (#279) --- lua/chadrc.lua | 3 +++ lua/default_config.lua | 3 ++- lua/options.lua | 13 ++++++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 1f8d7d0..ed859b5 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -13,6 +13,7 @@ M.ui = { hidden_statusline = { -- these are filetypes, not pattern matched "NvimTree", + -- "terminal", }, } @@ -27,6 +28,8 @@ M.options = { timeoutlen = 400, clipboard = "unnamedplus", number = true, + -- relative numbers in normal mode tool at the bottom of options.lua + relativenumber = false, numberwidth = 2, expandtab = true, shiftwidth = 2, diff --git a/lua/default_config.lua b/lua/default_config.lua index 71f1dc9..459b05f 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -13,7 +13,7 @@ M.ui = { hidden_statusline = { -- these are filetypes, not pattern matched "NvimTree", - "toggleterm", + -- "terminal", }, } @@ -28,6 +28,7 @@ M.options = { timeoutlen = 400, clipboard = "unnamedplus", number = true, + relativenumber = false, numberwidth = 2, expandtab = true, shiftwidth = 2, diff --git a/lua/options.lua b/lua/options.lua index 96016ec..225bf58 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -27,7 +27,7 @@ opt.fillchars = { eob = " " } -- Numbers opt.number = options.number opt.numberwidth = options.numberwidth --- opt.relativenumber = true +opt.relativenumber = options.relativenumber -- Indenline opt.expandtab = options.expandtab @@ -67,9 +67,16 @@ for _, plugin in pairs(disabled_built_ins) do g["loaded_" .. plugin] = 1 end --- Don't show status line on certain windows +-- Use relative & absolute line numbers in 'n' & 'i' modes respectively +-- vim.cmd[[ au InsertEnter * set norelativenumber ]] +-- vim.cmd[[ au InsertLeave * set relativenumber ]] + +-- Don't show any numbers inside terminals vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber ]] -vim.cmd [[let hidden_statusline = luaeval('require("chadrc").ui.hidden_statusline') | autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * nested if index(hidden_statusline, &ft) >= 0 | set laststatus=0 | else | set laststatus=2 | endif]] + +-- Don't show status line on certain windows +vim.cmd [[ au TermOpen term://* setfiletype terminal ]] +vim.cmd [[ let hidden_statusline = luaeval('require("chadrc").ui.hidden_statusline') | autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * nested if index(hidden_statusline, &ft) >= 0 | set laststatus=0 | else | set laststatus=2 | endif ]] -- Open a file from its last left off position -- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] From 1fac41047def94f5f672382754d778c32196f7d4 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Wed, 18 Aug 2021 23:35:51 +1000 Subject: [PATCH 0560/1541] add a quick install section to NvChad & removed 2 showcase photos (#280) * add a quick install section to NvChad & removed 2 showcase photos * Update README.md Co-authored-by: siduck76 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c0a5ed7..51db4c2 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,11 @@ -
+# Showcase
+


-
# Very Very Useful lua plugins used in my config From f82b390aba75d188b9ad911351e865c10aed8c69 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Thu, 19 Aug 2021 00:01:02 +1000 Subject: [PATCH 0561/1541] make cheatsheet enabled by default (#281) --- lua/chadrc.lua | 2 +- lua/default_config.lua | 2 +- lua/pluginList.lua | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index ed859b5..5489172 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -62,7 +62,7 @@ M.plugin_status = { nvim_comment = true, neoscroll_nvim = true, telescope_media = true, - cheatsheet = false, + cheatsheet = true, } -- make sure you dont use same keys twice diff --git a/lua/default_config.lua b/lua/default_config.lua index 459b05f..5b06ce2 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -61,7 +61,7 @@ M.plugin_status = { nvim_comment = true, neoscroll_nvim = true, telescope_media = true, - cheatsheet = false, + cheatsheet = true, } -- make sure you dont use same keys twice diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 79ad14b..df3cdcf 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -184,6 +184,7 @@ return packer.startup(function() { "sudormrfbin/cheatsheet.nvim", disable = not plugin_status.cheatsheet, + event = "VimEnter", after = "telescope.nvim", config = function() require "plugins.chadsheet" From fdb2fa115dbf04721b6368027ec6314a2da6f09f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 19 Aug 2021 08:40:08 +0530 Subject: [PATCH 0562/1541] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 51db4c2..9295144 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ Lua fork of vim devicons which lets me change icons of filetypes ### Nvim-treesitter -Better syntax highlighting for programming languages ( my config just has html,css,js support for now ). +Better syntax highlighting for programming languages ( NvChad by default comes with lua/bash treesitter parsers ). without / with Treesitter : From 1d78add91ea88d91cd0d4357940db21ddfb0c94f Mon Sep 17 00:00:00 2001 From: Tuan Nguyen <2762678+tuan3w@users.noreply.github.com> Date: Thu, 19 Aug 2021 11:06:32 +0700 Subject: [PATCH 0563/1541] chore: update path_display (#285) --- lua/plugins/telescope.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 40b7383..0fe5312 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -37,7 +37,10 @@ telescope.setup { file_sorter = require("telescope.sorters").get_fuzzy_file, file_ignore_patterns = {}, generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, - path_display = { "absolute" }, + path_display = function(opts, path) + local tail = require("telescope.utils").path_tail(path) + return string.format("%s (%s)", tail, path) + end, winblend = 0, border = {}, borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, From 88ff5595addfd5e3299b5f2c37db7a7060290427 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 19 Aug 2021 10:25:22 +0530 Subject: [PATCH 0564/1541] Update README.md --- README.md | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 9295144..b4d927b 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@

NvChad

- Home + Home - Install + Install - Contribute + Contribute Support @@ -123,18 +123,6 @@ without / with Treesitter : - Code formatting / prettifying - gitsigns for git diffs -# Requirements - -- neovim 0.5 -- A terminal that supports [nerdfonts](https://github.com/ryanoasis/nerd-fonts) -- Set terminal's inner padding to 0. - -# Wiki - -- [pre-requisite](https://github.com/siduck76/NvChad/wiki/Lua-guides) -- [config-structure](https://github.com/siduck76/NvChad/wiki#config-structure) -- [mappings](https://github.com/siduck76/NvChad/wiki/mappings) - # Bloat - To all those who think this is probably bloated , sure it is . Bloat means different to everyone . NvChad has like 30 ~ plugins but that doesnt mean those plugins are compromsing neovim's speed, snappiness or making it slow. No matter how many plugins I'd add on nvchad , it wouldnt compromise speed / snappiness / make it slow or whatever since it uses packer.nvim as plugin manager , packer.nvim lets you lazy load plugins i.e loading plugins on certain events , mappings , sequentially loading them etc so loading them only when needed , I have lazy loaded all the plugins so most plugins arent loaded by default , hence not affecting neovim's startup/launch time. @@ -152,13 +140,6 @@ It would be nice if NvChad focuses on existing plugins and config before adding - Preview shortcuts in the form of a pretty [cheatsheet](https://user-images.githubusercontent.com/59060246/122490009-95fd9980-cffe-11eb-9676-78019aa2cd65.png). - Add a user config so it doesnt get hard to update :c -# Contribute - -- PR's are always welcomed however NvChad aims to be less bloated. So PR's regarding existing plugin's enhancement and creating new features with existing plugins itself ( without adding a new plugin), bug fixes and corrections are more encouraged. -- PR's regarding adding new plugins and their configs must be given some thought since NvChad is meant to be used as a "base" neovim config so it will have only a set of important plugins. So adding more and more opiniated plugins, making NvChad's config large unnecessarily + slow wont help!. -- NvChad wont keep adding more and more features (like adding new plugins most likely) as requested if they feel unneeded and arent usable by the majority, no spoonfeeding!! If you think the plugin you want to be added is very useful and many NvChaders would find it useful, then such feature's PR is welcomed! -- But adding specific features like adding config for https://github.com/wakatime/vim-wakatime etc will be added in this https://github.com/NvChad/NvChad/wiki/Chad-user-configs. This lets the user select the things only they want ( adding configs from extra configs ) . - # Chad contributors From 623a2a0d1a7ac40ed659f23daa6b3104fb37aac0 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 19 Aug 2021 11:59:42 +0530 Subject: [PATCH 0565/1541] default_config : add statusline separators style --- lua/default_config.lua | 3 ++- lua/plugins/statusline.lua | 51 ++++++++++++++++++++++++++++++++------ 2 files changed, 46 insertions(+), 8 deletions(-) diff --git a/lua/default_config.lua b/lua/default_config.lua index 5b06ce2..0abbee5 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -13,8 +13,9 @@ M.ui = { hidden_statusline = { -- these are filetypes, not pattern matched "NvimTree", - -- "terminal", + "terminal", }, + statusline_style = "default", -- round , slant , block } M.options = { diff --git a/lua/plugins/statusline.lua b/lua/plugins/statusline.lua index 0cea604..f6e0ad9 100644 --- a/lua/plugins/statusline.lua +++ b/lua/plugins/statusline.lua @@ -1,3 +1,6 @@ +local global_theme = "themes/" .. vim.g.nvchad_theme +local colors = require(global_theme) + local present1, gl = pcall(require, "galaxyline") local present2, condition = pcall(require, "galaxyline.condition") if not (present1 or present2) then @@ -8,11 +11,45 @@ local gls = gl.section gl.short_line_list = { " " } -local left_separator = "" -- or " " -local right_separator = " " -- or "" +local icon_styles = { + default = { + left = "", + right = " ", + main_icon = "  ", + vi_mode_icon = " ", + position_icon = " ", + }, -local global_theme = "themes/" .. vim.g.nvchad_theme -local colors = require(global_theme) + round = { + left = "", + right = "", + main_icon = "  ", + vi_mode_icon = " ", + position_icon = " ", + }, + + slant = { + left = " ", + right = "", + main_icon = "  ", + vi_mode_icon = " ", + position_icon = " ", + }, + + block = { + left = " ", + right = " ", + main_icon = "  ", + vi_mode_icon = "  ", + position_icon = "  ", + }, +} + +local user_statusline_style = require("chadrc").ui.statusline_style +local statusline_style = icon_styles[user_statusline_style] + +local left_separator = statusline_style.left +local right_separator = statusline_style.right gls.left[1] = { FirstElement = { @@ -26,7 +63,7 @@ gls.left[1] = { gls.left[2] = { statusIcon = { provider = function() - return "  " + return statusline_style.main_icon end, highlight = { colors.statusline_bg, colors.nord_blue }, separator = right_separator .. " ", @@ -192,7 +229,7 @@ gls.right[5] = { viMode_icon = { provider = function() vim.cmd("hi GalaxyviMode_icon guibg=" .. mode(2)) - return " " + return statusline_style.vi_mode_icon end, highlight = { colors.statusline_bg, colors.red }, }, @@ -211,7 +248,7 @@ gls.right[6] = { gls.right[7] = { some_RoundIcon = { provider = function() - return " " + return statusline_style.position_icon end, separator = left_separator, separator_highlight = { colors.green, colors.lightbg }, From 36cb57ecceee4fc61a9af2418da3832b714569c3 Mon Sep 17 00:00:00 2001 From: Aki Date: Thu, 19 Aug 2021 12:33:11 +0530 Subject: [PATCH 0566/1541] NvChad Updater | Chadrc Fixes | Cleanup and Formatting | Misc (#288) * tree-wide: Format files ugh why do people don't push formatted stuff * mappings|init: Move init mappings to a function, only call when required | Show err message for init because mappings.lua is called from multiple places, so there should't be any code that executes without calling a specific function show error message when something fails in init.lua makes no sense to not rearrange plugin functions alphabetically, but keep misc at top * feat: Do not depend on user config | Fix merging of configs because it is a user config, so our config shoudn't break even we if dont have it use our own table merge function move loading config to a function use a global variable to store the config, so no need to call the table function everytime * Add NvChadUpdate command and shortcut for it map leader+uu to it summary of what it does: first ask the user for confirmation and tell that the updater is gonna run git reset --hard in config repo and chadrc will be restored take backup of chadrc in a lua string and locally in a file with chadrc.bak.(random numbers) git reset on config dir and git pull whether success or error, restore the chadrc file if restore fails, then print backup file path for more deep understanding, read the comments in utils.lua * NvChadUpdater: Make update repo and url configurable | Improvr logging --- init.lua | 6 +- lua/chadrc.lua | 10 +- lua/default_config.lua | 4 + lua/mappings.lua | 233 +++++++++++++------------- lua/options.lua | 10 +- lua/pluginList.lua | 2 +- lua/plugins/bufferline.lua | 26 +-- lua/plugins/chadsheet.lua | 2 +- lua/plugins/telescope.lua | 4 +- lua/telescope/_extensions/terms.lua | 39 +++-- lua/theme.lua | 2 +- lua/utils.lua | 248 ++++++++++++++++++++++++---- 12 files changed, 389 insertions(+), 197 deletions(-) diff --git a/init.lua b/init.lua index b65c997..6353271 100644 --- a/init.lua +++ b/init.lua @@ -4,5 +4,9 @@ local chad_modules = { } for i = 1, #chad_modules, 1 do - pcall(require, chad_modules[i]) + if not pcall(require, chad_modules[i]) then + error("Error loading " .. chad_modules[i] .. "\n") + end end + +require("mappings").misc() diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 5489172..e6f9821 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -13,7 +13,7 @@ M.ui = { hidden_statusline = { -- these are filetypes, not pattern matched "NvimTree", - -- "terminal", + -- "terminal", }, } @@ -28,7 +28,7 @@ M.options = { timeoutlen = 400, clipboard = "unnamedplus", number = true, - -- relative numbers in normal mode tool at the bottom of options.lua + -- relative numbers in normal mode tool at the bottom of options.lua relativenumber = false, numberwidth = 2, expandtab = true, @@ -37,6 +37,9 @@ M.options = { mapleader = " ", autosave = false, enable_insertNav = true, -- navigation in insertmode + -- used for updater + update_url = "https://github.com/NvChad/NvChad", + update_branch = "main", } -- enable and disable plugins (false for disable) @@ -140,9 +143,8 @@ M.mappings = { copywhole_file = "", toggle_linenr = "n", -- show or hide line number theme_toggle = "x", + update_nvchad = "uu", }, } -M = vim.tbl_deep_extend("force", require "default_config", M) - return M diff --git a/lua/default_config.lua b/lua/default_config.lua index 0abbee5..f8bd1aa 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -37,6 +37,9 @@ M.options = { mapleader = " ", autosave = false, enable_insertNav = true, -- navigation in insertmode + -- used for updater + update_url = "https://github.com/NvChad/NvChad", + update_branch = "main", } -- enable and disable plugins (false for disable) @@ -140,6 +143,7 @@ M.mappings = { copywhole_file = "", toggle_linenr = "n", -- show or hide line number theme_toggle = "x", + update_nvchad = "uu", }, } diff --git a/lua/mappings.lua b/lua/mappings.lua index 17e8d9e..9be5fde 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -1,7 +1,6 @@ -local user_map = require("chadrc").mappings +local user_map = require("utils").load_config().mappings local miscMap = user_map.misc -local M = {} local cmd = vim.cmd local function map(mode, lhs, rhs, opts) @@ -12,65 +11,117 @@ local function map(mode, lhs, rhs, opts) vim.api.nvim_set_keymap(mode, lhs, rhs, options) end +local M = {} local opt = {} --- dont copy any deleted text , this is disabled by default so uncomment the below mappings if you want them ---[[ remove this line +-- these mappings will only be called during initialization +M.misc = function() + -- dont copy any deleted text , this is disabled by default so uncomment the below mappings if you want them + -- map("n", "dd", [=[ "_dd ]=], opt) + -- map("v", "dd", [=[ "_dd ]=], opt) + -- map("v", "x", [=[ "_x ]=], opt) + -- todo: this should be configurable via chadrc -map("n", "dd", [=[ "_dd ]=], opt) -map("v", "dd", [=[ "_dd ]=], opt) -map("v", "x", [=[ "_x ]=], opt) + -- Don't copy the replaced text after pasting in visual mode + map("v", "p", '"_dP', opt) - this line too ]] --- + -- Allow moving the cursor through wrapped lines with j, k, and + -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ + -- empty mode is same as using :map + map("", "j", 'v:count ? "j" : "gj"', { expr = true }) + map("", "k", 'v:count ? "k" : "gk"', { expr = true }) + map("", "", 'v:count ? "j" : "gj"', { expr = true }) + map("", "", 'v:count ? "k" : "gk"', { expr = true }) --- Don't copy the replaced text after pasting in visual mode -map("v", "p", '"_dP', opt) + -- copy whole file content + map("n", miscMap.copywhole_file, ":%y+", opt) --- Allow moving the cursor through wrapped lines with j, k, and --- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ --- empty mode is same as using :map -map("", "j", 'v:count ? "j" : "gj"', { expr = true }) -map("", "k", 'v:count ? "k" : "gk"', { expr = true }) -map("", "", 'v:count ? "j" : "gj"', { expr = true }) -map("", "", 'v:count ? "k" : "gk"', { expr = true }) + -- toggle numbers + map("n", miscMap.toggle_linenr, ":set nu!", opt) --- copy whole file content -map("n", miscMap.copywhole_file, ":%y+", opt) + -- terminals + local function terms() + local m = user_map.terms --- toggle numbers -map("n", miscMap.toggle_linenr, ":set nu!", opt) + -- get out of terminal mode + map("t", m.esc_termmode, "", opt) + -- hide a term from within terminal mode + map("t", m.esc_hide_termmode, " :lua require('utils').close_buffer() ", opt) + -- pick a hidden term + map("n", m.pick_term, ":Telescope terms ", opt) + -- Open terminals + -- TODO this opens on top of an existing vert/hori term, fixme + map("n", m.new_wind, ":execute 'terminal' | let b:term_type = 'wind' | startinsert ", opt) + map("n", m.new_vert, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert ", opt) + map("n", m.new_hori, ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert ", opt) + end + terms() --- terminals -local function terms() - local m = user_map.terms + -- ctrl + s to save file + map("n", "", ":w ", opt) - -- get out of terminal mode - map("t", m.esc_termmode, "", opt) - -- hide a term from within terminal mode - map("t", m.esc_hide_termmode, " :lua require('utils').close_buffer() ", opt) - -- pick a hidden term - map("n", m.pick_term, ":Telescope terms ", opt) + -- use ESC to turn off search highlighting + map("n", "", ":noh", opt) - -- Open terminals - -- TODO this opens on top of an existing vert/hori term, fixme - map("n", m.new_wind, ":execute 'terminal' | let b:term_type = 'wind' | startinsert ", opt) - map("n", m.new_vert, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert ", opt) - map("n", m.new_hori, ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert ", opt) + -- navigation within insert mode + local check_insertNav = require("utils").load_config().options.enable_insertNav + + if check_insertNav == true then + local m = user_map.insert_nav + + map("i", m.forward, "", opt) + map("i", m.backward, "", opt) + map("i", m.top_of_line, "^i", opt) + map("i", m.end_of_line, "", opt) + map("i", m.next_line, "", opt) + map("i", m.prev_line, "", opt) + end + + -- check the theme toggler + local theme_toggler = require("utils").load_config().ui.theme_toggler + if theme_toggler == true then + local m = user_map.misc.theme_toggle + + map("n", m, ":lua require('utils').toggle_theme(require('utils').load_config().ui.fav_themes)", opt) + end + + -- Packer commands till because we are not loading it at startup + cmd "silent! command PackerCompile lua require 'pluginList' require('packer').compile()" + cmd "silent! command PackerInstall lua require 'pluginList' require('packer').install()" + cmd "silent! command PackerStatus lua require 'pluginList' require('packer').status()" + cmd "silent! command PackerSync lua require 'pluginList' require('packer').sync()" + cmd "silent! command PackerUpdate lua require 'pluginList' require('packer').update()" + + -- add NvChadUpdate command and mapping + cmd "silent! command! NvChadUpdate lua require('utils').update_nvchad()" + map("n", user_map.misc.update_nvchad, ":NvChadUpdate", opt) end -terms() +M.bufferline = function() + local m = user_map.bufferline -M.truezen = function() - local m = user_map.truezen + map("n", m.new_buffer, ":enew", opt) -- new buffer + map("n", m.newtab, ":tabnew", opt) -- new tab + map("n", m.close, ":lua require('utils').close_buffer() ", opt) -- close buffer - map("n", m.ataraxisMode, ":TZAtaraxis", opt) - map("n", m.minimalisticmode, ":TZMinimalist", opt) - map("n", m.focusmode, ":TZFocus", opt) + -- move between tabs + + map("n", m.cycleNext, ":BufferLineCycleNext", opt) + map("n", m.cyclePrev, ":BufferLineCyclePrev", opt) end -map("n", "", ":w ", opt) +M.chadsheet = function() + local m = user_map.chadsheet + + map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope()", opt) + map( + "n", + m.user_keys, + ":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false }", + opt + ) +end M.comment_nvim = function() local m = user_map.comment_nvim.comment_toggle @@ -78,6 +129,25 @@ M.comment_nvim = function() map("v", m, ":CommentToggle", opt) end +M.dashboard = function() + local m = user_map.dashboard + + map("n", m.open, ":Dashboard", opt) + map("n", m.newfile, ":DashboardNewFile", opt) + map("n", m.bookmarks, ":DashboardJumpMarks", opt) + map("n", m.sessionload, ":SessionLoad", opt) + map("n", m.sessionsave, ":SessionSave", opt) +end + +M.fugitive = function() + local m = user_map.fugitive + + map("n", m.Git, ":Git", opt) + map("n", m.diffget_2, ":diffget //2", opt) + map("n", m.diffget_3, ":diffget //3", opt) + map("n", m.git_blame, ":Git blame", opt) +end + M.nvimtree = function() local m = user_map.nvimtree.treetoggle @@ -89,14 +159,12 @@ M.neoformat = function() map("n", m, ":Neoformat", opt) end -M.dashboard = function() - local m = user_map.dashboard +M.truezen = function() + local m = user_map.truezen - map("n", m.open, ":Dashboard", opt) - map("n", m.newfile, ":DashboardNewFile", opt) - map("n", m.bookmarks, ":DashboardJumpMarks", opt) - map("n", m.sessionload, ":SessionLoad", opt) - map("n", m.sessionsave, ":SessionSave", opt) + map("n", m.ataraxisMode, ":TZAtaraxis", opt) + map("n", m.minimalisticmode, ":TZMinimalist", opt) + map("n", m.focusmode, ":TZFocus", opt) end M.telescope = function() @@ -117,69 +185,4 @@ M.telescope_media = function() map("n", m.media_files, ":Telescope media_files ", opt) end -M.chadsheet = function() - local m = user_map.chadsheet - - map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope()", opt) - map( - "n", - m.user_keys, - ":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false }", - opt - ) -end - -M.bufferline = function() - local m = user_map.bufferline - - map("n", m.new_buffer, ":enew", opt) -- new buffer - map("n", m.newtab, ":tabnew", opt) -- new tab - map("n", m.close, ":lua require('utils').close_buffer() ", opt) -- close buffer - - -- move between tabs - - map("n", m.cycleNext, ":BufferLineCycleNext", opt) - map("n", m.cyclePrev, ":BufferLineCyclePrev", opt) -end - --- use ESC to turn off search highlighting -map("n", "", ":noh", opt) - --- Packer commands till because we are not loading it at startup -cmd "silent! command PackerCompile lua require 'pluginList' require('packer').compile()" -cmd "silent! command PackerInstall lua require 'pluginList' require('packer').install()" -cmd "silent! command PackerStatus lua require 'pluginList' require('packer').status()" -cmd "silent! command PackerSync lua require 'pluginList' require('packer').sync()" -cmd "silent! command PackerUpdate lua require 'pluginList' require('packer').update()" - -M.fugitive = function() - local m = user_map.fugitive - - map("n", m.Git, ":Git", opt) - map("n", m.diffget_2, ":diffget //2", opt) - map("n", m.diffget_3, ":diffget //3", opt) - map("n", m.git_blame, ":Git blame", opt) -end - --- navigation within insert mode -local check_insertNav = require("chadrc").options.enable_insertNav - -if check_insertNav == true then - local m = user_map.insert_nav - - map("i", m.forward, "", opt) - map("i", m.backward, "", opt) - map("i", m.top_of_line, "^i", opt) - map("i", m.end_of_line, "", opt) - map("i", m.next_line, "", opt) - map("i", m.prev_line, "", opt) -end - -local theme_toggler = require("chadrc").ui.theme_toggler - -if theme_toggler == true then - local m = user_map.misc.theme_toggle - - map("n", m, ":lua require('utils').toggle_theme(require('chadrc').ui.fav_themes)", opt) -end return M diff --git a/lua/options.lua b/lua/options.lua index 225bf58..e0aff03 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -1,7 +1,11 @@ -local options = require("chadrc").options local opt = vim.opt local g = vim.g +-- export user config as a global varibale +g.nvchad_user_config = "chadrc" + +local options = require("utils").load_config().options + opt.completeopt = { "menuone", "noselect" } opt.undofile = options.permanent_undo opt.ruler = options.ruler @@ -27,7 +31,7 @@ opt.fillchars = { eob = " " } -- Numbers opt.number = options.number opt.numberwidth = options.numberwidth -opt.relativenumber = options.relativenumber +opt.relativenumber = options.relativenumber -- Indenline opt.expandtab = options.expandtab @@ -76,7 +80,7 @@ vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber ]] -- Don't show status line on certain windows vim.cmd [[ au TermOpen term://* setfiletype terminal ]] -vim.cmd [[ let hidden_statusline = luaeval('require("chadrc").ui.hidden_statusline') | autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * nested if index(hidden_statusline, &ft) >= 0 | set laststatus=0 | else | set laststatus=2 | endif ]] +vim.cmd [[ let hidden_statusline = luaeval('require("utils").load_config().ui.hidden_statusline') | autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * nested if index(hidden_statusline, &ft) >= 0 | set laststatus=0 | else | set laststatus=2 | endif ]] -- Open a file from its last left off position -- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] diff --git a/lua/pluginList.lua b/lua/pluginList.lua index df3cdcf..5c56855 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -1,4 +1,4 @@ -local plugin_status = require("chadrc").plugin_status +local plugin_status = require("utils").load_config().plugin_status local present, _ = pcall(require, "packerInit") local packer diff --git a/lua/plugins/bufferline.lua b/lua/plugins/bufferline.lua index d55b70c..cd7e8b4 100644 --- a/lua/plugins/bufferline.lua +++ b/lua/plugins/bufferline.lua @@ -5,7 +5,7 @@ local present, bufferline = pcall(require, "bufferline") if not present then return end - + bufferline.setup { options = { offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, @@ -25,23 +25,23 @@ bufferline.setup { mappings = true, always_show_bufferline = true, custom_filter = function(buf_number) - -- Func to filter out our managed/persistent split terms - local present_type, type = pcall(function() - return vim.api.nvim_buf_get_var(buf_number, "term_type") - end) - - if present_type then - if type == "vert" then + -- Func to filter out our managed/persistent split terms + local present_type, type = pcall(function() + return vim.api.nvim_buf_get_var(buf_number, "term_type") + end) + + if present_type then + if type == "vert" then return false elseif type == "hori" then return false else - return true + return true end - else - return true - end - end, + else + return true + end + end, }, highlights = { fill = { diff --git a/lua/plugins/chadsheet.lua b/lua/plugins/chadsheet.lua index 4ccd2b5..21862c1 100644 --- a/lua/plugins/chadsheet.lua +++ b/lua/plugins/chadsheet.lua @@ -4,7 +4,7 @@ if not present then return end -local mappings = require("chadrc").mappings +local mappings = require("utils").load_config().mappings -- add user mappings to the cheetsheet for section, data in pairs(mappings) do diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 0fe5312..4146356 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -38,8 +38,8 @@ telescope.setup { file_ignore_patterns = {}, generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, path_display = function(opts, path) - local tail = require("telescope.utils").path_tail(path) - return string.format("%s (%s)", tail, path) + local tail = require("telescope.utils").path_tail(path) + return string.format("%s (%s)", tail, path) end, winblend = 0, border = {}, diff --git a/lua/telescope/_extensions/terms.lua b/lua/telescope/_extensions/terms.lua index 7913666..2acd08a 100644 --- a/lua/telescope/_extensions/terms.lua +++ b/lua/telescope/_extensions/terms.lua @@ -10,7 +10,7 @@ M.term_picker = function(opts) pickers = require "telescope.pickers" finders = require "telescope.finders" previewers = require "telescope.previewers" - + make_entry = require "telescope.make_entry" actions = require "telescope.actions" action_state = require "telescope.actions.state" @@ -19,26 +19,25 @@ M.term_picker = function(opts) else error "Cannot find telescope!" end - + local filter = vim.tbl_filter - + local local_utils = require "utils" -- buffer number and name local bufnr = vim.api.nvim_get_current_buf() local bufname = vim.api.nvim_buf_get_name(bufnr) - + local bufnrs = filter(function(b) local present_type, type = pcall(function() return vim.api.nvim_buf_get_var(b, "term_type") end) - + if not present_type then -- let's only terms that we created return false end - - + -- if 1 ~= vim.fn.buflisted(b) then -- return false -- end @@ -59,22 +58,22 @@ M.term_picker = function(opts) return vim.fn.getbufinfo(a)[1].lastused > vim.fn.getbufinfo(b)[1].lastused end) end - + local buffers = {} local default_selection_idx = 1 for _, bufnr in ipairs(bufnrs) do local flag = bufnr == vim.fn.bufnr "" and "%" or (bufnr == vim.fn.bufnr "#" and "#" or " ") - + if opts.sort_lastused and not opts.ignore_current_buffer and flag == "#" then default_selection_idx = 2 end - + local element = { bufnr = bufnr, flag = flag, info = vim.fn.getbufinfo(bufnr)[1], } - + if opts.sort_lastused and (flag == "#" or flag == "%") then local idx = ((buffers[1] ~= nil and buffers[1].flag == "%") and 2 or 1) table.insert(buffers, idx, element) @@ -82,12 +81,12 @@ M.term_picker = function(opts) table.insert(buffers, element) end end - + if not opts.bufnr_width then local max_bufnr = math.max(unpack(bufnrs)) opts.bufnr_width = #tostring(max_bufnr) end - + pickers.new(opts, { prompt_title = "Terminal buffers", finder = finders.new_table { @@ -103,24 +102,24 @@ M.term_picker = function(opts) actions.close(prompt_bufnr) local buf = entry.bufnr - + local chad_term, type = pcall(function() - return vim.api.nvim_buf_get_var(buf, "term_type") - end) - + return vim.api.nvim_buf_get_var(buf, "term_type") + end) + -- TODO buffer checks/error detection (make sure we do get a buf) if chad_term then if type == "wind" then -- swtich to term buff & show in bufferline - vim.cmd(string.format('b %d | setlocal bl', buf)) + vim.cmd(string.format("b %d | setlocal bl", buf)) -- vim.cmd('startinsert') TODO fix this elseif type == "vert" then - vim.cmd(string.format('vsp #%d', buf)) + vim.cmd(string.format("vsp #%d", buf)) -- vim.cmd('startinsert') TODO fix this elseif type == "hori" then -- TODO change 15 to a chad config var number - vim.cmd(string.format('15 sp #%d ', buf)) + vim.cmd(string.format("15 sp #%d ", buf)) -- vim.cmd('startinsert') TODO fix this end end diff --git a/lua/theme.lua b/lua/theme.lua index 04f0871..3002ac2 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -1,4 +1,4 @@ -local chad_theme = require("chadrc").ui.theme +local chad_theme = require("utils").load_config().ui.theme vim.g.nvchad_theme = chad_theme local present, base16 = pcall(require, "base16") diff --git a/lua/utils.lua b/lua/utils.lua index 367dd3e..a568feb 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -10,7 +10,8 @@ M.change_theme = function(current_theme, new_theme) return end - local file = vim.fn.stdpath "config" .. "/lua/chadrc.lua" + local user_config = vim.g.nvchad_user_config + local file = vim.fn.stdpath "config" .. "/lua/" .. user_config .. ".lua" -- store in data variable local data = assert(M.file("r", file)) -- escape characters which can be parsed as magic chars @@ -36,39 +37,39 @@ end M.close_buffer = function(bufexpr, force) -- This is a modification of a NeoVim plugin from - -- Author: ojroques - Olivier Roques + -- Author: ojroques - Olivier Roques -- Src: https://github.com/ojroques/nvim-bufdel -- (Author has okayed copy-paste) -- Options local opts = { - next = 'cycle', -- how to retrieve the next buffer - quit = false, -- exit when last buffer is deleted + next = "cycle", -- how to retrieve the next buffer + quit = false, -- exit when last buffer is deleted --TODO make this a chadrc flag/option } -- ---------------- -- Helper functions -- ---------------- - + -- Switch to buffer 'buf' on each window from list 'windows' local function switch_buffer(windows, buf) local cur_win = vim.fn.winnr() for _, winid in ipairs(windows) do - vim.cmd(string.format('%d wincmd w', vim.fn.win_id2win(winid))) - vim.cmd(string.format('buffer %d', buf)) + vim.cmd(string.format("%d wincmd w", vim.fn.win_id2win(winid))) + vim.cmd(string.format("buffer %d", buf)) end - vim.cmd(string.format('%d wincmd w', cur_win)) -- return to original window + vim.cmd(string.format("%d wincmd w", cur_win)) -- return to original window end - + -- Select the first buffer with a number greater than given buffer local function get_next_buf(buf) - local next = vim.fn.bufnr('#') - if opts.next == 'alternate' and vim.fn.buflisted(next) == 1 then + local next = vim.fn.bufnr "#" + if opts.next == "alternate" and vim.fn.buflisted(next) == 1 then return next end - for i = 0, vim.fn.bufnr('$') - 1 do - next = (buf + i) % vim.fn.bufnr('$') + 1 -- will loop back to 1 + for i = 0, vim.fn.bufnr "$" - 1 do + next = (buf + i) % vim.fn.bufnr "$" + 1 -- will loop back to 1 if vim.fn.buflisted(next) == 1 then return next end @@ -78,68 +79,68 @@ M.close_buffer = function(bufexpr, force) -- ---------------- -- End helper functions -- ---------------- - + local buf = vim.fn.bufnr() - if vim.fn.buflisted(buf) == 0 then -- exit if buffer number is invalid + if vim.fn.buflisted(buf) == 0 then -- exit if buffer number is invalid return end - - if #vim.fn.getbufinfo({buflisted = 1}) < 2 then + + if #vim.fn.getbufinfo { buflisted = 1 } < 2 then if opts.quit then -- exit when there is only one buffer left if force then - vim.cmd('qall!') + vim.cmd "qall!" else - vim.cmd('confirm qall') + vim.cmd "confirm qall" end return end - + local chad_term, type = pcall(function() return vim.api.nvim_buf_get_var(buf, "term_type") - end) - + end) + if chad_term then -- Must be a window type - vim.cmd(string.format('setlocal nobl', buf)) - vim.cmd('enew') + vim.cmd(string.format("setlocal nobl", buf)) + vim.cmd "enew" return end -- don't exit and create a new empty buffer - vim.cmd('enew') - vim.cmd('bp') + vim.cmd "enew" + vim.cmd "bp" end - + local next_buf = get_next_buf(buf) local windows = vim.fn.getbufinfo(buf)[1].windows - + -- force deletion of terminal buffers to avoid the prompt - if force or vim.fn.getbufvar(buf, '&buftype') == 'terminal' then + if force or vim.fn.getbufvar(buf, "&buftype") == "terminal" then local chad_term, type = pcall(function() return vim.api.nvim_buf_get_var(buf, "term_type") - end) - + end) + -- TODO this scope is error prone, make resilient if chad_term then if type == "wind" then -- hide from bufferline - vim.cmd(string.format('%d bufdo setlocal nobl', buf)) + vim.cmd(string.format("%d bufdo setlocal nobl", buf)) -- swtich to another buff -- TODO switch to next bufffer, this works too - vim.cmd('BufferLineCycleNext') + vim.cmd "BufferLineCycleNext" else local cur_win = vim.fn.winnr() -- we can close this window - vim.cmd(string.format('%d wincmd c', cur_win)) + vim.cmd(string.format("%d wincmd c", cur_win)) return end else switch_buffer(windows, next_buf) - vim.cmd(string.format('bd! %d', buf)) + vim.cmd(string.format("bd! %d", buf)) end else switch_buffer(windows, next_buf) - vim.cmd(string.format('silent! confirm bd %d', buf)) + vim.cmd(string.format("silent! confirm bd %d", buf)) end -- revert buffer switches if user has canceled deletion if vim.fn.buflisted(buf) == 1 then @@ -147,6 +148,16 @@ M.close_buffer = function(bufexpr, force) end end +-- wrapper to use vim.api.nvim_echo +-- table of {string, highlight} +-- e.g echo({{"Hello", "Title"}, {"World"}}) +M.echo = function(opts) + if opts == nil or type(opts) ~= "table" then + return + end + vim.api.nvim_echo(opts, false, {}) +end + -- 1st arg - r or w -- 2nd arg - file path -- 3rd arg - content if 1st arg is w @@ -195,6 +206,89 @@ M.list_themes = function(return_type) return themes end +-- Base code: https://gist.github.com/revolucas/184aec7998a6be5d2f61b984fac1d7f7 +-- Changes over it: preserving table 1 contents and also update with table b, without duplicating +-- 1st arg - base table, 2nd arg - table to merge +M.merge_table = function(into, from) + -- make sure both are table + if type(into) ~= "table" or type(from) ~= "table" then + return 1 + end + local stack, seen = {}, {} + local table1, table2 = into, from + while true do + for k, v in pairs(table2) do + if type(v) == "table" and type(table1[k]) == "table" then + table.insert(stack, { table1[k], table2[k] }) + else + local present = seen[v] or false + if not present then + -- add the value to seen table until value is found + for _, value in pairs(table1) do + seen[value] = true + if value == v then + present = true + break + end + end + end + seen[v] = true + if not present then + -- if type is number, then it is a sub table value, so append + if type(k) == "number" then + table1[#table1 + 1] = v + else + table1[k] = v + end + end + end + end + if #stack > 0 then + local t = stack[#stack] + table1, table2 = t[1], t[2] + stack[#stack] = nil + else + break + end + end + return into +end + +-- load config +-- 1st arg = boolean - whether to force reload +-- Modifies _G._NVCHAD_CONFIG global variable +M.load_config = function(reload) + -- only do the stuff below one time, otherwise just return the set config + if _G._NVCHAD_CONFIG_CONTENTS ~= nil and not (reload or false) then + return _G._NVCHAD_CONFIG_CONTENTS + end + + -- don't enclose in pcall, it better break when default config is faulty + _G._NVCHAD_CONFIG_CONTENTS = require "default_config" + + -- user config is not required to run nvchad but a optional + -- Make sure the config doesn't break the whole system if user config is not present or in bad state or not a table + -- print warning texts if user config file is present + local config_name = vim.g.nvchad_user_config or "chadrc" + local config_file = vim.fn.stdpath "config" .. "/lua/" .. config_name .. ".lua" + -- check if the user config is present + if vim.fn.empty(vim.fn.glob(config_file)) < 1 then + local present, config = pcall(require, config_name) + if present then + -- make sure the returned value is table + if type(config) == "table" then + -- data = require(config_name) + _G._NVCHAD_CONFIG_CONTENTS = require("utils").merge_table(_G._NVCHAD_CONFIG_CONTENTS, config) + else + print("Warning: " .. config_name .. " sourced successfully but did not return a lua table.") + end + else + print("Warning: " .. config_file .. " is present but sourcing failed.") + end + end + return _G._NVCHAD_CONFIG_CONTENTS +end + -- reload a plugin ( will try to load even if not loaded) -- can take a string or list ( table ) -- return true or false @@ -315,4 +409,86 @@ M.toggle_theme = function(themes) end end +-- update nvchad +M.update_nvchad = function() + -- in all the comments below, config means user config + local config_path = vim.fn.stdpath "config" + local config_name = vim.g.nvchad_user_config or "chadrc" + local config_file = config_path .. "/lua/" .. config_name .. ".lua" + -- generate a random file name + local config_file_backup = config_path .. "/" .. config_name .. ".lua.bak." .. math.random() + local utils = require "utils" + local echo = utils.echo + local current_config = utils.load_config() + local update_url = current_config.options.update_url or "https://github.com/NvChad/NvChad" + local update_branch = current_config.options.update_branch or "main" + + -- ask the user for confirmation to update because we are going to run git reset --hard + echo { { "Url: ", "Title" }, { update_url } } + echo { { "Branch: ", "Title" }, { update_branch } } + echo { + { "\nUpdater will run", "WarningMsg" }, + { " git reset --hard " }, + { + "in config folder, so changes to existing repo files except ", + "WarningMsg", + }, + + { config_name }, + { " will be lost!\n\nUpdate NvChad ? [y/N]", "WarningMsg" }, + } + + local ans = string.lower(vim.fn.input "-> ") == "y" + utils.clear_cmdline() + if not ans then + echo { { "Update cancelled!", "Title" } } + return + end + + -- first try to fetch contents of config, this will make sure it is readable and taking backup of its contents + local config_contents = utils.file("r", config_file) + -- also make a local backup in ~/.config/nvim, will be removed when config is succesfully restored + utils.file("w", config_file_backup, config_contents) + -- write original config file with its contents, will make sure charc is writable, this maybe overkill but a little precaution always helps + utils.file("w", config_file, config_contents) + + -- function that will executed when git commands are done + local function update_exit(_, code) + -- restore config file irrespective of whether git commands were succesfull or not + if pcall(function() + utils.file("w", config_file, config_contents) + end) then + -- config restored succesfully, remove backup file that was created + if not pcall(os.remove, config_file_backup) then + echo { { "Warning: Failed to remove backup chadrc, remove manually.", "WarningMsg" } } + echo { { "Path: ", "WarningMsg" }, { config_file_backup } } + end + else + echo { { "Error: Restoring " .. config_name .. " failed.\n", "ErrorMsg" } } + echo { { "Backed up " .. config_name .. " path: " .. config_file_backup .. "\n\n", "None" } } + end + + -- close the terminal buffer only if update was success, as in case of error, we need the error message + if code == 0 then + vim.cmd "bd!" + echo { { "NvChad succesfully updated.\n", "String" } } + else + echo { { "Error: NvChad Update failed.\n", "ErrorMsg" } } + end + end + + -- git commands that will executed, reset in case config was modfied + -- use --ff-only to not mess up if the local repo is outdated + local update_script = [[git reset --hard && git pull --set-upstream https://github.com/NvChad/NvChad main --ff-only]] + + -- open a new buffer + vim.cmd "new" + -- finally open the pseudo terminal buffer + vim.fn.termopen(update_script, { + -- change dir to config path so we don't need to move in script + cwd = config_path, + on_exit = update_exit, + }) +end + return M From aa8df57cae0996868040f964d7bd81418322ef6a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 19 Aug 2021 12:36:01 +0530 Subject: [PATCH 0567/1541] Revert "NvChad Updater | Chadrc Fixes | Cleanup and Formatting | Misc (#288)" This reverts commit 36cb57ecceee4fc61a9af2418da3832b714569c3. --- init.lua | 6 +- lua/chadrc.lua | 10 +- lua/default_config.lua | 4 - lua/mappings.lua | 233 +++++++++++++------------- lua/options.lua | 10 +- lua/pluginList.lua | 2 +- lua/plugins/bufferline.lua | 26 +-- lua/plugins/chadsheet.lua | 2 +- lua/plugins/telescope.lua | 4 +- lua/telescope/_extensions/terms.lua | 39 ++--- lua/theme.lua | 2 +- lua/utils.lua | 248 ++++------------------------ 12 files changed, 197 insertions(+), 389 deletions(-) diff --git a/init.lua b/init.lua index 6353271..b65c997 100644 --- a/init.lua +++ b/init.lua @@ -4,9 +4,5 @@ local chad_modules = { } for i = 1, #chad_modules, 1 do - if not pcall(require, chad_modules[i]) then - error("Error loading " .. chad_modules[i] .. "\n") - end + pcall(require, chad_modules[i]) end - -require("mappings").misc() diff --git a/lua/chadrc.lua b/lua/chadrc.lua index e6f9821..5489172 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -13,7 +13,7 @@ M.ui = { hidden_statusline = { -- these are filetypes, not pattern matched "NvimTree", - -- "terminal", + -- "terminal", }, } @@ -28,7 +28,7 @@ M.options = { timeoutlen = 400, clipboard = "unnamedplus", number = true, - -- relative numbers in normal mode tool at the bottom of options.lua + -- relative numbers in normal mode tool at the bottom of options.lua relativenumber = false, numberwidth = 2, expandtab = true, @@ -37,9 +37,6 @@ M.options = { mapleader = " ", autosave = false, enable_insertNav = true, -- navigation in insertmode - -- used for updater - update_url = "https://github.com/NvChad/NvChad", - update_branch = "main", } -- enable and disable plugins (false for disable) @@ -143,8 +140,9 @@ M.mappings = { copywhole_file = "", toggle_linenr = "n", -- show or hide line number theme_toggle = "x", - update_nvchad = "uu", }, } +M = vim.tbl_deep_extend("force", require "default_config", M) + return M diff --git a/lua/default_config.lua b/lua/default_config.lua index f8bd1aa..0abbee5 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -37,9 +37,6 @@ M.options = { mapleader = " ", autosave = false, enable_insertNav = true, -- navigation in insertmode - -- used for updater - update_url = "https://github.com/NvChad/NvChad", - update_branch = "main", } -- enable and disable plugins (false for disable) @@ -143,7 +140,6 @@ M.mappings = { copywhole_file = "", toggle_linenr = "n", -- show or hide line number theme_toggle = "x", - update_nvchad = "uu", }, } diff --git a/lua/mappings.lua b/lua/mappings.lua index 9be5fde..17e8d9e 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -1,6 +1,7 @@ -local user_map = require("utils").load_config().mappings +local user_map = require("chadrc").mappings local miscMap = user_map.misc +local M = {} local cmd = vim.cmd local function map(mode, lhs, rhs, opts) @@ -11,117 +12,65 @@ local function map(mode, lhs, rhs, opts) vim.api.nvim_set_keymap(mode, lhs, rhs, options) end -local M = {} local opt = {} --- these mappings will only be called during initialization -M.misc = function() - -- dont copy any deleted text , this is disabled by default so uncomment the below mappings if you want them - -- map("n", "dd", [=[ "_dd ]=], opt) - -- map("v", "dd", [=[ "_dd ]=], opt) - -- map("v", "x", [=[ "_x ]=], opt) - -- todo: this should be configurable via chadrc +-- dont copy any deleted text , this is disabled by default so uncomment the below mappings if you want them +--[[ remove this line - -- Don't copy the replaced text after pasting in visual mode - map("v", "p", '"_dP', opt) +map("n", "dd", [=[ "_dd ]=], opt) +map("v", "dd", [=[ "_dd ]=], opt) +map("v", "x", [=[ "_x ]=], opt) - -- Allow moving the cursor through wrapped lines with j, k, and - -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ - -- empty mode is same as using :map - map("", "j", 'v:count ? "j" : "gj"', { expr = true }) - map("", "k", 'v:count ? "k" : "gk"', { expr = true }) - map("", "", 'v:count ? "j" : "gj"', { expr = true }) - map("", "", 'v:count ? "k" : "gk"', { expr = true }) + this line too ]] +-- - -- copy whole file content - map("n", miscMap.copywhole_file, ":%y+", opt) +-- Don't copy the replaced text after pasting in visual mode +map("v", "p", '"_dP', opt) - -- toggle numbers - map("n", miscMap.toggle_linenr, ":set nu!", opt) +-- Allow moving the cursor through wrapped lines with j, k, and +-- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ +-- empty mode is same as using :map +map("", "j", 'v:count ? "j" : "gj"', { expr = true }) +map("", "k", 'v:count ? "k" : "gk"', { expr = true }) +map("", "", 'v:count ? "j" : "gj"', { expr = true }) +map("", "", 'v:count ? "k" : "gk"', { expr = true }) - -- terminals - local function terms() - local m = user_map.terms +-- copy whole file content +map("n", miscMap.copywhole_file, ":%y+", opt) - -- get out of terminal mode - map("t", m.esc_termmode, "", opt) - -- hide a term from within terminal mode - map("t", m.esc_hide_termmode, " :lua require('utils').close_buffer() ", opt) - -- pick a hidden term - map("n", m.pick_term, ":Telescope terms ", opt) +-- toggle numbers +map("n", miscMap.toggle_linenr, ":set nu!", opt) - -- Open terminals - -- TODO this opens on top of an existing vert/hori term, fixme - map("n", m.new_wind, ":execute 'terminal' | let b:term_type = 'wind' | startinsert ", opt) - map("n", m.new_vert, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert ", opt) - map("n", m.new_hori, ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert ", opt) - end - terms() - -- ctrl + s to save file - map("n", "", ":w ", opt) +-- terminals +local function terms() + local m = user_map.terms - -- use ESC to turn off search highlighting - map("n", "", ":noh", opt) + -- get out of terminal mode + map("t", m.esc_termmode, "", opt) + -- hide a term from within terminal mode + map("t", m.esc_hide_termmode, " :lua require('utils').close_buffer() ", opt) + -- pick a hidden term + map("n", m.pick_term, ":Telescope terms ", opt) - -- navigation within insert mode - local check_insertNav = require("utils").load_config().options.enable_insertNav - - if check_insertNav == true then - local m = user_map.insert_nav - - map("i", m.forward, "", opt) - map("i", m.backward, "", opt) - map("i", m.top_of_line, "^i", opt) - map("i", m.end_of_line, "", opt) - map("i", m.next_line, "", opt) - map("i", m.prev_line, "", opt) - end - - -- check the theme toggler - local theme_toggler = require("utils").load_config().ui.theme_toggler - if theme_toggler == true then - local m = user_map.misc.theme_toggle - - map("n", m, ":lua require('utils').toggle_theme(require('utils').load_config().ui.fav_themes)", opt) - end - - -- Packer commands till because we are not loading it at startup - cmd "silent! command PackerCompile lua require 'pluginList' require('packer').compile()" - cmd "silent! command PackerInstall lua require 'pluginList' require('packer').install()" - cmd "silent! command PackerStatus lua require 'pluginList' require('packer').status()" - cmd "silent! command PackerSync lua require 'pluginList' require('packer').sync()" - cmd "silent! command PackerUpdate lua require 'pluginList' require('packer').update()" - - -- add NvChadUpdate command and mapping - cmd "silent! command! NvChadUpdate lua require('utils').update_nvchad()" - map("n", user_map.misc.update_nvchad, ":NvChadUpdate", opt) + -- Open terminals + -- TODO this opens on top of an existing vert/hori term, fixme + map("n", m.new_wind, ":execute 'terminal' | let b:term_type = 'wind' | startinsert ", opt) + map("n", m.new_vert, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert ", opt) + map("n", m.new_hori, ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert ", opt) end -M.bufferline = function() - local m = user_map.bufferline +terms() - map("n", m.new_buffer, ":enew", opt) -- new buffer - map("n", m.newtab, ":tabnew", opt) -- new tab - map("n", m.close, ":lua require('utils').close_buffer() ", opt) -- close buffer +M.truezen = function() + local m = user_map.truezen - -- move between tabs - - map("n", m.cycleNext, ":BufferLineCycleNext", opt) - map("n", m.cyclePrev, ":BufferLineCyclePrev", opt) + map("n", m.ataraxisMode, ":TZAtaraxis", opt) + map("n", m.minimalisticmode, ":TZMinimalist", opt) + map("n", m.focusmode, ":TZFocus", opt) end -M.chadsheet = function() - local m = user_map.chadsheet - - map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope()", opt) - map( - "n", - m.user_keys, - ":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false }", - opt - ) -end +map("n", "", ":w ", opt) M.comment_nvim = function() local m = user_map.comment_nvim.comment_toggle @@ -129,25 +78,6 @@ M.comment_nvim = function() map("v", m, ":CommentToggle", opt) end -M.dashboard = function() - local m = user_map.dashboard - - map("n", m.open, ":Dashboard", opt) - map("n", m.newfile, ":DashboardNewFile", opt) - map("n", m.bookmarks, ":DashboardJumpMarks", opt) - map("n", m.sessionload, ":SessionLoad", opt) - map("n", m.sessionsave, ":SessionSave", opt) -end - -M.fugitive = function() - local m = user_map.fugitive - - map("n", m.Git, ":Git", opt) - map("n", m.diffget_2, ":diffget //2", opt) - map("n", m.diffget_3, ":diffget //3", opt) - map("n", m.git_blame, ":Git blame", opt) -end - M.nvimtree = function() local m = user_map.nvimtree.treetoggle @@ -159,12 +89,14 @@ M.neoformat = function() map("n", m, ":Neoformat", opt) end -M.truezen = function() - local m = user_map.truezen +M.dashboard = function() + local m = user_map.dashboard - map("n", m.ataraxisMode, ":TZAtaraxis", opt) - map("n", m.minimalisticmode, ":TZMinimalist", opt) - map("n", m.focusmode, ":TZFocus", opt) + map("n", m.open, ":Dashboard", opt) + map("n", m.newfile, ":DashboardNewFile", opt) + map("n", m.bookmarks, ":DashboardJumpMarks", opt) + map("n", m.sessionload, ":SessionLoad", opt) + map("n", m.sessionsave, ":SessionSave", opt) end M.telescope = function() @@ -185,4 +117,69 @@ M.telescope_media = function() map("n", m.media_files, ":Telescope media_files ", opt) end +M.chadsheet = function() + local m = user_map.chadsheet + + map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope()", opt) + map( + "n", + m.user_keys, + ":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false }", + opt + ) +end + +M.bufferline = function() + local m = user_map.bufferline + + map("n", m.new_buffer, ":enew", opt) -- new buffer + map("n", m.newtab, ":tabnew", opt) -- new tab + map("n", m.close, ":lua require('utils').close_buffer() ", opt) -- close buffer + + -- move between tabs + + map("n", m.cycleNext, ":BufferLineCycleNext", opt) + map("n", m.cyclePrev, ":BufferLineCyclePrev", opt) +end + +-- use ESC to turn off search highlighting +map("n", "", ":noh", opt) + +-- Packer commands till because we are not loading it at startup +cmd "silent! command PackerCompile lua require 'pluginList' require('packer').compile()" +cmd "silent! command PackerInstall lua require 'pluginList' require('packer').install()" +cmd "silent! command PackerStatus lua require 'pluginList' require('packer').status()" +cmd "silent! command PackerSync lua require 'pluginList' require('packer').sync()" +cmd "silent! command PackerUpdate lua require 'pluginList' require('packer').update()" + +M.fugitive = function() + local m = user_map.fugitive + + map("n", m.Git, ":Git", opt) + map("n", m.diffget_2, ":diffget //2", opt) + map("n", m.diffget_3, ":diffget //3", opt) + map("n", m.git_blame, ":Git blame", opt) +end + +-- navigation within insert mode +local check_insertNav = require("chadrc").options.enable_insertNav + +if check_insertNav == true then + local m = user_map.insert_nav + + map("i", m.forward, "", opt) + map("i", m.backward, "", opt) + map("i", m.top_of_line, "^i", opt) + map("i", m.end_of_line, "", opt) + map("i", m.next_line, "", opt) + map("i", m.prev_line, "", opt) +end + +local theme_toggler = require("chadrc").ui.theme_toggler + +if theme_toggler == true then + local m = user_map.misc.theme_toggle + + map("n", m, ":lua require('utils').toggle_theme(require('chadrc').ui.fav_themes)", opt) +end return M diff --git a/lua/options.lua b/lua/options.lua index e0aff03..225bf58 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -1,11 +1,7 @@ +local options = require("chadrc").options local opt = vim.opt local g = vim.g --- export user config as a global varibale -g.nvchad_user_config = "chadrc" - -local options = require("utils").load_config().options - opt.completeopt = { "menuone", "noselect" } opt.undofile = options.permanent_undo opt.ruler = options.ruler @@ -31,7 +27,7 @@ opt.fillchars = { eob = " " } -- Numbers opt.number = options.number opt.numberwidth = options.numberwidth -opt.relativenumber = options.relativenumber +opt.relativenumber = options.relativenumber -- Indenline opt.expandtab = options.expandtab @@ -80,7 +76,7 @@ vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber ]] -- Don't show status line on certain windows vim.cmd [[ au TermOpen term://* setfiletype terminal ]] -vim.cmd [[ let hidden_statusline = luaeval('require("utils").load_config().ui.hidden_statusline') | autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * nested if index(hidden_statusline, &ft) >= 0 | set laststatus=0 | else | set laststatus=2 | endif ]] +vim.cmd [[ let hidden_statusline = luaeval('require("chadrc").ui.hidden_statusline') | autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * nested if index(hidden_statusline, &ft) >= 0 | set laststatus=0 | else | set laststatus=2 | endif ]] -- Open a file from its last left off position -- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 5c56855..df3cdcf 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -1,4 +1,4 @@ -local plugin_status = require("utils").load_config().plugin_status +local plugin_status = require("chadrc").plugin_status local present, _ = pcall(require, "packerInit") local packer diff --git a/lua/plugins/bufferline.lua b/lua/plugins/bufferline.lua index cd7e8b4..d55b70c 100644 --- a/lua/plugins/bufferline.lua +++ b/lua/plugins/bufferline.lua @@ -5,7 +5,7 @@ local present, bufferline = pcall(require, "bufferline") if not present then return end - + bufferline.setup { options = { offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, @@ -25,23 +25,23 @@ bufferline.setup { mappings = true, always_show_bufferline = true, custom_filter = function(buf_number) - -- Func to filter out our managed/persistent split terms - local present_type, type = pcall(function() - return vim.api.nvim_buf_get_var(buf_number, "term_type") - end) - - if present_type then - if type == "vert" then + -- Func to filter out our managed/persistent split terms + local present_type, type = pcall(function() + return vim.api.nvim_buf_get_var(buf_number, "term_type") + end) + + if present_type then + if type == "vert" then return false elseif type == "hori" then return false else - return true + return true end - else - return true - end - end, + else + return true + end + end, }, highlights = { fill = { diff --git a/lua/plugins/chadsheet.lua b/lua/plugins/chadsheet.lua index 21862c1..4ccd2b5 100644 --- a/lua/plugins/chadsheet.lua +++ b/lua/plugins/chadsheet.lua @@ -4,7 +4,7 @@ if not present then return end -local mappings = require("utils").load_config().mappings +local mappings = require("chadrc").mappings -- add user mappings to the cheetsheet for section, data in pairs(mappings) do diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 4146356..0fe5312 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -38,8 +38,8 @@ telescope.setup { file_ignore_patterns = {}, generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, path_display = function(opts, path) - local tail = require("telescope.utils").path_tail(path) - return string.format("%s (%s)", tail, path) + local tail = require("telescope.utils").path_tail(path) + return string.format("%s (%s)", tail, path) end, winblend = 0, border = {}, diff --git a/lua/telescope/_extensions/terms.lua b/lua/telescope/_extensions/terms.lua index 2acd08a..7913666 100644 --- a/lua/telescope/_extensions/terms.lua +++ b/lua/telescope/_extensions/terms.lua @@ -10,7 +10,7 @@ M.term_picker = function(opts) pickers = require "telescope.pickers" finders = require "telescope.finders" previewers = require "telescope.previewers" - + make_entry = require "telescope.make_entry" actions = require "telescope.actions" action_state = require "telescope.actions.state" @@ -19,25 +19,26 @@ M.term_picker = function(opts) else error "Cannot find telescope!" end - + local filter = vim.tbl_filter - + local local_utils = require "utils" -- buffer number and name local bufnr = vim.api.nvim_get_current_buf() local bufname = vim.api.nvim_buf_get_name(bufnr) - + local bufnrs = filter(function(b) local present_type, type = pcall(function() return vim.api.nvim_buf_get_var(b, "term_type") end) - + if not present_type then -- let's only terms that we created return false end - + + -- if 1 ~= vim.fn.buflisted(b) then -- return false -- end @@ -58,22 +59,22 @@ M.term_picker = function(opts) return vim.fn.getbufinfo(a)[1].lastused > vim.fn.getbufinfo(b)[1].lastused end) end - + local buffers = {} local default_selection_idx = 1 for _, bufnr in ipairs(bufnrs) do local flag = bufnr == vim.fn.bufnr "" and "%" or (bufnr == vim.fn.bufnr "#" and "#" or " ") - + if opts.sort_lastused and not opts.ignore_current_buffer and flag == "#" then default_selection_idx = 2 end - + local element = { bufnr = bufnr, flag = flag, info = vim.fn.getbufinfo(bufnr)[1], } - + if opts.sort_lastused and (flag == "#" or flag == "%") then local idx = ((buffers[1] ~= nil and buffers[1].flag == "%") and 2 or 1) table.insert(buffers, idx, element) @@ -81,12 +82,12 @@ M.term_picker = function(opts) table.insert(buffers, element) end end - + if not opts.bufnr_width then local max_bufnr = math.max(unpack(bufnrs)) opts.bufnr_width = #tostring(max_bufnr) end - + pickers.new(opts, { prompt_title = "Terminal buffers", finder = finders.new_table { @@ -102,24 +103,24 @@ M.term_picker = function(opts) actions.close(prompt_bufnr) local buf = entry.bufnr - + local chad_term, type = pcall(function() - return vim.api.nvim_buf_get_var(buf, "term_type") - end) - + return vim.api.nvim_buf_get_var(buf, "term_type") + end) + -- TODO buffer checks/error detection (make sure we do get a buf) if chad_term then if type == "wind" then -- swtich to term buff & show in bufferline - vim.cmd(string.format("b %d | setlocal bl", buf)) + vim.cmd(string.format('b %d | setlocal bl', buf)) -- vim.cmd('startinsert') TODO fix this elseif type == "vert" then - vim.cmd(string.format("vsp #%d", buf)) + vim.cmd(string.format('vsp #%d', buf)) -- vim.cmd('startinsert') TODO fix this elseif type == "hori" then -- TODO change 15 to a chad config var number - vim.cmd(string.format("15 sp #%d ", buf)) + vim.cmd(string.format('15 sp #%d ', buf)) -- vim.cmd('startinsert') TODO fix this end end diff --git a/lua/theme.lua b/lua/theme.lua index 3002ac2..04f0871 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -1,4 +1,4 @@ -local chad_theme = require("utils").load_config().ui.theme +local chad_theme = require("chadrc").ui.theme vim.g.nvchad_theme = chad_theme local present, base16 = pcall(require, "base16") diff --git a/lua/utils.lua b/lua/utils.lua index a568feb..367dd3e 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -10,8 +10,7 @@ M.change_theme = function(current_theme, new_theme) return end - local user_config = vim.g.nvchad_user_config - local file = vim.fn.stdpath "config" .. "/lua/" .. user_config .. ".lua" + local file = vim.fn.stdpath "config" .. "/lua/chadrc.lua" -- store in data variable local data = assert(M.file("r", file)) -- escape characters which can be parsed as magic chars @@ -37,39 +36,39 @@ end M.close_buffer = function(bufexpr, force) -- This is a modification of a NeoVim plugin from - -- Author: ojroques - Olivier Roques + -- Author: ojroques - Olivier Roques -- Src: https://github.com/ojroques/nvim-bufdel -- (Author has okayed copy-paste) -- Options local opts = { - next = "cycle", -- how to retrieve the next buffer - quit = false, -- exit when last buffer is deleted + next = 'cycle', -- how to retrieve the next buffer + quit = false, -- exit when last buffer is deleted --TODO make this a chadrc flag/option } -- ---------------- -- Helper functions -- ---------------- - + -- Switch to buffer 'buf' on each window from list 'windows' local function switch_buffer(windows, buf) local cur_win = vim.fn.winnr() for _, winid in ipairs(windows) do - vim.cmd(string.format("%d wincmd w", vim.fn.win_id2win(winid))) - vim.cmd(string.format("buffer %d", buf)) + vim.cmd(string.format('%d wincmd w', vim.fn.win_id2win(winid))) + vim.cmd(string.format('buffer %d', buf)) end - vim.cmd(string.format("%d wincmd w", cur_win)) -- return to original window + vim.cmd(string.format('%d wincmd w', cur_win)) -- return to original window end - + -- Select the first buffer with a number greater than given buffer local function get_next_buf(buf) - local next = vim.fn.bufnr "#" - if opts.next == "alternate" and vim.fn.buflisted(next) == 1 then + local next = vim.fn.bufnr('#') + if opts.next == 'alternate' and vim.fn.buflisted(next) == 1 then return next end - for i = 0, vim.fn.bufnr "$" - 1 do - next = (buf + i) % vim.fn.bufnr "$" + 1 -- will loop back to 1 + for i = 0, vim.fn.bufnr('$') - 1 do + next = (buf + i) % vim.fn.bufnr('$') + 1 -- will loop back to 1 if vim.fn.buflisted(next) == 1 then return next end @@ -79,68 +78,68 @@ M.close_buffer = function(bufexpr, force) -- ---------------- -- End helper functions -- ---------------- - + local buf = vim.fn.bufnr() - if vim.fn.buflisted(buf) == 0 then -- exit if buffer number is invalid + if vim.fn.buflisted(buf) == 0 then -- exit if buffer number is invalid return end - - if #vim.fn.getbufinfo { buflisted = 1 } < 2 then + + if #vim.fn.getbufinfo({buflisted = 1}) < 2 then if opts.quit then -- exit when there is only one buffer left if force then - vim.cmd "qall!" + vim.cmd('qall!') else - vim.cmd "confirm qall" + vim.cmd('confirm qall') end return end - + local chad_term, type = pcall(function() return vim.api.nvim_buf_get_var(buf, "term_type") - end) - + end) + if chad_term then -- Must be a window type - vim.cmd(string.format("setlocal nobl", buf)) - vim.cmd "enew" + vim.cmd(string.format('setlocal nobl', buf)) + vim.cmd('enew') return end -- don't exit and create a new empty buffer - vim.cmd "enew" - vim.cmd "bp" + vim.cmd('enew') + vim.cmd('bp') end - + local next_buf = get_next_buf(buf) local windows = vim.fn.getbufinfo(buf)[1].windows - + -- force deletion of terminal buffers to avoid the prompt - if force or vim.fn.getbufvar(buf, "&buftype") == "terminal" then + if force or vim.fn.getbufvar(buf, '&buftype') == 'terminal' then local chad_term, type = pcall(function() return vim.api.nvim_buf_get_var(buf, "term_type") - end) - + end) + -- TODO this scope is error prone, make resilient if chad_term then if type == "wind" then -- hide from bufferline - vim.cmd(string.format("%d bufdo setlocal nobl", buf)) + vim.cmd(string.format('%d bufdo setlocal nobl', buf)) -- swtich to another buff -- TODO switch to next bufffer, this works too - vim.cmd "BufferLineCycleNext" + vim.cmd('BufferLineCycleNext') else local cur_win = vim.fn.winnr() -- we can close this window - vim.cmd(string.format("%d wincmd c", cur_win)) + vim.cmd(string.format('%d wincmd c', cur_win)) return end else switch_buffer(windows, next_buf) - vim.cmd(string.format("bd! %d", buf)) + vim.cmd(string.format('bd! %d', buf)) end else switch_buffer(windows, next_buf) - vim.cmd(string.format("silent! confirm bd %d", buf)) + vim.cmd(string.format('silent! confirm bd %d', buf)) end -- revert buffer switches if user has canceled deletion if vim.fn.buflisted(buf) == 1 then @@ -148,16 +147,6 @@ M.close_buffer = function(bufexpr, force) end end --- wrapper to use vim.api.nvim_echo --- table of {string, highlight} --- e.g echo({{"Hello", "Title"}, {"World"}}) -M.echo = function(opts) - if opts == nil or type(opts) ~= "table" then - return - end - vim.api.nvim_echo(opts, false, {}) -end - -- 1st arg - r or w -- 2nd arg - file path -- 3rd arg - content if 1st arg is w @@ -206,89 +195,6 @@ M.list_themes = function(return_type) return themes end --- Base code: https://gist.github.com/revolucas/184aec7998a6be5d2f61b984fac1d7f7 --- Changes over it: preserving table 1 contents and also update with table b, without duplicating --- 1st arg - base table, 2nd arg - table to merge -M.merge_table = function(into, from) - -- make sure both are table - if type(into) ~= "table" or type(from) ~= "table" then - return 1 - end - local stack, seen = {}, {} - local table1, table2 = into, from - while true do - for k, v in pairs(table2) do - if type(v) == "table" and type(table1[k]) == "table" then - table.insert(stack, { table1[k], table2[k] }) - else - local present = seen[v] or false - if not present then - -- add the value to seen table until value is found - for _, value in pairs(table1) do - seen[value] = true - if value == v then - present = true - break - end - end - end - seen[v] = true - if not present then - -- if type is number, then it is a sub table value, so append - if type(k) == "number" then - table1[#table1 + 1] = v - else - table1[k] = v - end - end - end - end - if #stack > 0 then - local t = stack[#stack] - table1, table2 = t[1], t[2] - stack[#stack] = nil - else - break - end - end - return into -end - --- load config --- 1st arg = boolean - whether to force reload --- Modifies _G._NVCHAD_CONFIG global variable -M.load_config = function(reload) - -- only do the stuff below one time, otherwise just return the set config - if _G._NVCHAD_CONFIG_CONTENTS ~= nil and not (reload or false) then - return _G._NVCHAD_CONFIG_CONTENTS - end - - -- don't enclose in pcall, it better break when default config is faulty - _G._NVCHAD_CONFIG_CONTENTS = require "default_config" - - -- user config is not required to run nvchad but a optional - -- Make sure the config doesn't break the whole system if user config is not present or in bad state or not a table - -- print warning texts if user config file is present - local config_name = vim.g.nvchad_user_config or "chadrc" - local config_file = vim.fn.stdpath "config" .. "/lua/" .. config_name .. ".lua" - -- check if the user config is present - if vim.fn.empty(vim.fn.glob(config_file)) < 1 then - local present, config = pcall(require, config_name) - if present then - -- make sure the returned value is table - if type(config) == "table" then - -- data = require(config_name) - _G._NVCHAD_CONFIG_CONTENTS = require("utils").merge_table(_G._NVCHAD_CONFIG_CONTENTS, config) - else - print("Warning: " .. config_name .. " sourced successfully but did not return a lua table.") - end - else - print("Warning: " .. config_file .. " is present but sourcing failed.") - end - end - return _G._NVCHAD_CONFIG_CONTENTS -end - -- reload a plugin ( will try to load even if not loaded) -- can take a string or list ( table ) -- return true or false @@ -409,86 +315,4 @@ M.toggle_theme = function(themes) end end --- update nvchad -M.update_nvchad = function() - -- in all the comments below, config means user config - local config_path = vim.fn.stdpath "config" - local config_name = vim.g.nvchad_user_config or "chadrc" - local config_file = config_path .. "/lua/" .. config_name .. ".lua" - -- generate a random file name - local config_file_backup = config_path .. "/" .. config_name .. ".lua.bak." .. math.random() - local utils = require "utils" - local echo = utils.echo - local current_config = utils.load_config() - local update_url = current_config.options.update_url or "https://github.com/NvChad/NvChad" - local update_branch = current_config.options.update_branch or "main" - - -- ask the user for confirmation to update because we are going to run git reset --hard - echo { { "Url: ", "Title" }, { update_url } } - echo { { "Branch: ", "Title" }, { update_branch } } - echo { - { "\nUpdater will run", "WarningMsg" }, - { " git reset --hard " }, - { - "in config folder, so changes to existing repo files except ", - "WarningMsg", - }, - - { config_name }, - { " will be lost!\n\nUpdate NvChad ? [y/N]", "WarningMsg" }, - } - - local ans = string.lower(vim.fn.input "-> ") == "y" - utils.clear_cmdline() - if not ans then - echo { { "Update cancelled!", "Title" } } - return - end - - -- first try to fetch contents of config, this will make sure it is readable and taking backup of its contents - local config_contents = utils.file("r", config_file) - -- also make a local backup in ~/.config/nvim, will be removed when config is succesfully restored - utils.file("w", config_file_backup, config_contents) - -- write original config file with its contents, will make sure charc is writable, this maybe overkill but a little precaution always helps - utils.file("w", config_file, config_contents) - - -- function that will executed when git commands are done - local function update_exit(_, code) - -- restore config file irrespective of whether git commands were succesfull or not - if pcall(function() - utils.file("w", config_file, config_contents) - end) then - -- config restored succesfully, remove backup file that was created - if not pcall(os.remove, config_file_backup) then - echo { { "Warning: Failed to remove backup chadrc, remove manually.", "WarningMsg" } } - echo { { "Path: ", "WarningMsg" }, { config_file_backup } } - end - else - echo { { "Error: Restoring " .. config_name .. " failed.\n", "ErrorMsg" } } - echo { { "Backed up " .. config_name .. " path: " .. config_file_backup .. "\n\n", "None" } } - end - - -- close the terminal buffer only if update was success, as in case of error, we need the error message - if code == 0 then - vim.cmd "bd!" - echo { { "NvChad succesfully updated.\n", "String" } } - else - echo { { "Error: NvChad Update failed.\n", "ErrorMsg" } } - end - end - - -- git commands that will executed, reset in case config was modfied - -- use --ff-only to not mess up if the local repo is outdated - local update_script = [[git reset --hard && git pull --set-upstream https://github.com/NvChad/NvChad main --ff-only]] - - -- open a new buffer - vim.cmd "new" - -- finally open the pseudo terminal buffer - vim.fn.termopen(update_script, { - -- change dir to config path so we don't need to move in script - cwd = config_path, - on_exit = update_exit, - }) -end - return M From 32a6fd8d29a0b6a1c6dada11f6667a89d8d03195 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 19 Aug 2021 12:38:50 +0530 Subject: [PATCH 0568/1541] add statusline_style to chadrc --- lua/chadrc.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 5489172..acb5012 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -13,8 +13,9 @@ M.ui = { hidden_statusline = { -- these are filetypes, not pattern matched "NvimTree", - -- "terminal", + -- "terminal", }, + statusline_style = "default", -- round , slant , block } M.options = { @@ -28,7 +29,7 @@ M.options = { timeoutlen = 400, clipboard = "unnamedplus", number = true, - -- relative numbers in normal mode tool at the bottom of options.lua + -- relative numbers in normal mode tool at the bottom of options.lua relativenumber = false, numberwidth = 2, expandtab = true, From 6224ed6283f744f85c9a0b370f8debb82d8331b8 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 19 Aug 2021 13:24:35 +0530 Subject: [PATCH 0569/1541] Revert "chore: update path_display (#285)" This reverts commit 1d78add91ea88d91cd0d4357940db21ddfb0c94f. --- lua/plugins/telescope.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 0fe5312..40b7383 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -37,10 +37,7 @@ telescope.setup { file_sorter = require("telescope.sorters").get_fuzzy_file, file_ignore_patterns = {}, generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, - path_display = function(opts, path) - local tail = require("telescope.utils").path_tail(path) - return string.format("%s (%s)", tail, path) - end, + path_display = { "absolute" }, winblend = 0, border = {}, borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, From e3f0429a72b0f2e3dfe35bdf565f37c656710623 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 19 Aug 2021 13:58:07 +0530 Subject: [PATCH 0570/1541] tree-wide: Format files ugh why do people don't push formatted stuff --- lua/mappings.lua | 3 +- lua/options.lua | 2 +- lua/plugins/bufferline.lua | 26 +++++------ lua/telescope/_extensions/terms.lua | 39 ++++++++-------- lua/utils.lua | 70 ++++++++++++++--------------- 5 files changed, 69 insertions(+), 71 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index 17e8d9e..01ae785 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -41,7 +41,6 @@ map("n", miscMap.copywhole_file, ":%y+", opt) -- toggle numbers map("n", miscMap.toggle_linenr, ":set nu!", opt) - -- terminals local function terms() local m = user_map.terms @@ -50,7 +49,7 @@ local function terms() map("t", m.esc_termmode, "", opt) -- hide a term from within terminal mode map("t", m.esc_hide_termmode, " :lua require('utils').close_buffer() ", opt) - -- pick a hidden term + -- pick a hidden term map("n", m.pick_term, ":Telescope terms ", opt) -- Open terminals diff --git a/lua/options.lua b/lua/options.lua index 225bf58..c64589b 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -27,7 +27,7 @@ opt.fillchars = { eob = " " } -- Numbers opt.number = options.number opt.numberwidth = options.numberwidth -opt.relativenumber = options.relativenumber +opt.relativenumber = options.relativenumber -- Indenline opt.expandtab = options.expandtab diff --git a/lua/plugins/bufferline.lua b/lua/plugins/bufferline.lua index d55b70c..cd7e8b4 100644 --- a/lua/plugins/bufferline.lua +++ b/lua/plugins/bufferline.lua @@ -5,7 +5,7 @@ local present, bufferline = pcall(require, "bufferline") if not present then return end - + bufferline.setup { options = { offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, @@ -25,23 +25,23 @@ bufferline.setup { mappings = true, always_show_bufferline = true, custom_filter = function(buf_number) - -- Func to filter out our managed/persistent split terms - local present_type, type = pcall(function() - return vim.api.nvim_buf_get_var(buf_number, "term_type") - end) - - if present_type then - if type == "vert" then + -- Func to filter out our managed/persistent split terms + local present_type, type = pcall(function() + return vim.api.nvim_buf_get_var(buf_number, "term_type") + end) + + if present_type then + if type == "vert" then return false elseif type == "hori" then return false else - return true + return true end - else - return true - end - end, + else + return true + end + end, }, highlights = { fill = { diff --git a/lua/telescope/_extensions/terms.lua b/lua/telescope/_extensions/terms.lua index 7913666..2acd08a 100644 --- a/lua/telescope/_extensions/terms.lua +++ b/lua/telescope/_extensions/terms.lua @@ -10,7 +10,7 @@ M.term_picker = function(opts) pickers = require "telescope.pickers" finders = require "telescope.finders" previewers = require "telescope.previewers" - + make_entry = require "telescope.make_entry" actions = require "telescope.actions" action_state = require "telescope.actions.state" @@ -19,26 +19,25 @@ M.term_picker = function(opts) else error "Cannot find telescope!" end - + local filter = vim.tbl_filter - + local local_utils = require "utils" -- buffer number and name local bufnr = vim.api.nvim_get_current_buf() local bufname = vim.api.nvim_buf_get_name(bufnr) - + local bufnrs = filter(function(b) local present_type, type = pcall(function() return vim.api.nvim_buf_get_var(b, "term_type") end) - + if not present_type then -- let's only terms that we created return false end - - + -- if 1 ~= vim.fn.buflisted(b) then -- return false -- end @@ -59,22 +58,22 @@ M.term_picker = function(opts) return vim.fn.getbufinfo(a)[1].lastused > vim.fn.getbufinfo(b)[1].lastused end) end - + local buffers = {} local default_selection_idx = 1 for _, bufnr in ipairs(bufnrs) do local flag = bufnr == vim.fn.bufnr "" and "%" or (bufnr == vim.fn.bufnr "#" and "#" or " ") - + if opts.sort_lastused and not opts.ignore_current_buffer and flag == "#" then default_selection_idx = 2 end - + local element = { bufnr = bufnr, flag = flag, info = vim.fn.getbufinfo(bufnr)[1], } - + if opts.sort_lastused and (flag == "#" or flag == "%") then local idx = ((buffers[1] ~= nil and buffers[1].flag == "%") and 2 or 1) table.insert(buffers, idx, element) @@ -82,12 +81,12 @@ M.term_picker = function(opts) table.insert(buffers, element) end end - + if not opts.bufnr_width then local max_bufnr = math.max(unpack(bufnrs)) opts.bufnr_width = #tostring(max_bufnr) end - + pickers.new(opts, { prompt_title = "Terminal buffers", finder = finders.new_table { @@ -103,24 +102,24 @@ M.term_picker = function(opts) actions.close(prompt_bufnr) local buf = entry.bufnr - + local chad_term, type = pcall(function() - return vim.api.nvim_buf_get_var(buf, "term_type") - end) - + return vim.api.nvim_buf_get_var(buf, "term_type") + end) + -- TODO buffer checks/error detection (make sure we do get a buf) if chad_term then if type == "wind" then -- swtich to term buff & show in bufferline - vim.cmd(string.format('b %d | setlocal bl', buf)) + vim.cmd(string.format("b %d | setlocal bl", buf)) -- vim.cmd('startinsert') TODO fix this elseif type == "vert" then - vim.cmd(string.format('vsp #%d', buf)) + vim.cmd(string.format("vsp #%d", buf)) -- vim.cmd('startinsert') TODO fix this elseif type == "hori" then -- TODO change 15 to a chad config var number - vim.cmd(string.format('15 sp #%d ', buf)) + vim.cmd(string.format("15 sp #%d ", buf)) -- vim.cmd('startinsert') TODO fix this end end diff --git a/lua/utils.lua b/lua/utils.lua index 367dd3e..afde106 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -36,39 +36,39 @@ end M.close_buffer = function(bufexpr, force) -- This is a modification of a NeoVim plugin from - -- Author: ojroques - Olivier Roques + -- Author: ojroques - Olivier Roques -- Src: https://github.com/ojroques/nvim-bufdel -- (Author has okayed copy-paste) -- Options local opts = { - next = 'cycle', -- how to retrieve the next buffer - quit = false, -- exit when last buffer is deleted + next = "cycle", -- how to retrieve the next buffer + quit = false, -- exit when last buffer is deleted --TODO make this a chadrc flag/option } -- ---------------- -- Helper functions -- ---------------- - + -- Switch to buffer 'buf' on each window from list 'windows' local function switch_buffer(windows, buf) local cur_win = vim.fn.winnr() for _, winid in ipairs(windows) do - vim.cmd(string.format('%d wincmd w', vim.fn.win_id2win(winid))) - vim.cmd(string.format('buffer %d', buf)) + vim.cmd(string.format("%d wincmd w", vim.fn.win_id2win(winid))) + vim.cmd(string.format("buffer %d", buf)) end - vim.cmd(string.format('%d wincmd w', cur_win)) -- return to original window + vim.cmd(string.format("%d wincmd w", cur_win)) -- return to original window end - + -- Select the first buffer with a number greater than given buffer local function get_next_buf(buf) - local next = vim.fn.bufnr('#') - if opts.next == 'alternate' and vim.fn.buflisted(next) == 1 then + local next = vim.fn.bufnr "#" + if opts.next == "alternate" and vim.fn.buflisted(next) == 1 then return next end - for i = 0, vim.fn.bufnr('$') - 1 do - next = (buf + i) % vim.fn.bufnr('$') + 1 -- will loop back to 1 + for i = 0, vim.fn.bufnr "$" - 1 do + next = (buf + i) % vim.fn.bufnr "$" + 1 -- will loop back to 1 if vim.fn.buflisted(next) == 1 then return next end @@ -78,68 +78,68 @@ M.close_buffer = function(bufexpr, force) -- ---------------- -- End helper functions -- ---------------- - + local buf = vim.fn.bufnr() - if vim.fn.buflisted(buf) == 0 then -- exit if buffer number is invalid + if vim.fn.buflisted(buf) == 0 then -- exit if buffer number is invalid return end - - if #vim.fn.getbufinfo({buflisted = 1}) < 2 then + + if #vim.fn.getbufinfo { buflisted = 1 } < 2 then if opts.quit then -- exit when there is only one buffer left if force then - vim.cmd('qall!') + vim.cmd "qall!" else - vim.cmd('confirm qall') + vim.cmd "confirm qall" end return end - + local chad_term, type = pcall(function() return vim.api.nvim_buf_get_var(buf, "term_type") - end) - + end) + if chad_term then -- Must be a window type - vim.cmd(string.format('setlocal nobl', buf)) - vim.cmd('enew') + vim.cmd(string.format("setlocal nobl", buf)) + vim.cmd "enew" return end -- don't exit and create a new empty buffer - vim.cmd('enew') - vim.cmd('bp') + vim.cmd "enew" + vim.cmd "bp" end - + local next_buf = get_next_buf(buf) local windows = vim.fn.getbufinfo(buf)[1].windows - + -- force deletion of terminal buffers to avoid the prompt - if force or vim.fn.getbufvar(buf, '&buftype') == 'terminal' then + if force or vim.fn.getbufvar(buf, "&buftype") == "terminal" then local chad_term, type = pcall(function() return vim.api.nvim_buf_get_var(buf, "term_type") - end) - + end) + -- TODO this scope is error prone, make resilient if chad_term then if type == "wind" then -- hide from bufferline - vim.cmd(string.format('%d bufdo setlocal nobl', buf)) + vim.cmd(string.format("%d bufdo setlocal nobl", buf)) -- swtich to another buff -- TODO switch to next bufffer, this works too - vim.cmd('BufferLineCycleNext') + vim.cmd "BufferLineCycleNext" else local cur_win = vim.fn.winnr() -- we can close this window - vim.cmd(string.format('%d wincmd c', cur_win)) + vim.cmd(string.format("%d wincmd c", cur_win)) return end else switch_buffer(windows, next_buf) - vim.cmd(string.format('bd! %d', buf)) + vim.cmd(string.format("bd! %d", buf)) end else switch_buffer(windows, next_buf) - vim.cmd(string.format('silent! confirm bd %d', buf)) + vim.cmd(string.format("silent! confirm bd %d", buf)) end -- revert buffer switches if user has canceled deletion if vim.fn.buflisted(buf) == 1 then From 02f0122ab425bb0aa5308d32147728e074bd0553 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 19 Aug 2021 08:45:59 +0530 Subject: [PATCH 0571/1541] mappings|init: Move init mappings to a function, only call when required | Show err message for init because mappings.lua is called from multiple places, so there should't be any code that executes without calling a specific function show error message when something fails in init.lua makes no sense to not rearrange plugin functions alphabetically, but keep misc at top --- init.lua | 6 +- lua/mappings.lua | 228 +++++++++++++++++++++++------------------------ 2 files changed, 119 insertions(+), 115 deletions(-) diff --git a/init.lua b/init.lua index b65c997..6353271 100644 --- a/init.lua +++ b/init.lua @@ -4,5 +4,9 @@ local chad_modules = { } for i = 1, #chad_modules, 1 do - pcall(require, chad_modules[i]) + if not pcall(require, chad_modules[i]) then + error("Error loading " .. chad_modules[i] .. "\n") + end end + +require("mappings").misc() diff --git a/lua/mappings.lua b/lua/mappings.lua index 01ae785..14740aa 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -1,7 +1,6 @@ local user_map = require("chadrc").mappings local miscMap = user_map.misc -local M = {} local cmd = vim.cmd local function map(mode, lhs, rhs, opts) @@ -12,64 +11,113 @@ local function map(mode, lhs, rhs, opts) vim.api.nvim_set_keymap(mode, lhs, rhs, options) end +local M = {} local opt = {} --- dont copy any deleted text , this is disabled by default so uncomment the below mappings if you want them ---[[ remove this line +-- these mappings will only be called during initialization +M.misc = function() + -- dont copy any deleted text , this is disabled by default so uncomment the below mappings if you want them + -- map("n", "dd", [=[ "_dd ]=], opt) + -- map("v", "dd", [=[ "_dd ]=], opt) + -- map("v", "x", [=[ "_x ]=], opt) + -- todo: this should be configurable via chadrc -map("n", "dd", [=[ "_dd ]=], opt) -map("v", "dd", [=[ "_dd ]=], opt) -map("v", "x", [=[ "_x ]=], opt) + -- Don't copy the replaced text after pasting in visual mode + map("v", "p", '"_dP', opt) - this line too ]] --- + -- Allow moving the cursor through wrapped lines with j, k, and + -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ + -- empty mode is same as using :map + map("", "j", 'v:count ? "j" : "gj"', { expr = true }) + map("", "k", 'v:count ? "k" : "gk"', { expr = true }) + map("", "", 'v:count ? "j" : "gj"', { expr = true }) + map("", "", 'v:count ? "k" : "gk"', { expr = true }) --- Don't copy the replaced text after pasting in visual mode -map("v", "p", '"_dP', opt) + -- copy whole file content + map("n", miscMap.copywhole_file, ":%y+", opt) --- Allow moving the cursor through wrapped lines with j, k, and --- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ --- empty mode is same as using :map -map("", "j", 'v:count ? "j" : "gj"', { expr = true }) -map("", "k", 'v:count ? "k" : "gk"', { expr = true }) -map("", "", 'v:count ? "j" : "gj"', { expr = true }) -map("", "", 'v:count ? "k" : "gk"', { expr = true }) + -- toggle numbers + map("n", miscMap.toggle_linenr, ":set nu!", opt) --- copy whole file content -map("n", miscMap.copywhole_file, ":%y+", opt) + -- terminals + local function terms() + local m = user_map.terms --- toggle numbers -map("n", miscMap.toggle_linenr, ":set nu!", opt) + -- get out of terminal mode + map("t", m.esc_termmode, "", opt) + -- hide a term from within terminal mode + map("t", m.esc_hide_termmode, " :lua require('utils').close_buffer() ", opt) + -- pick a hidden term + map("n", m.pick_term, ":Telescope terms ", opt) --- terminals -local function terms() - local m = user_map.terms + -- Open terminals + -- TODO this opens on top of an existing vert/hori term, fixme + map("n", m.new_wind, ":execute 'terminal' | let b:term_type = 'wind' | startinsert ", opt) + map("n", m.new_vert, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert ", opt) + map("n", m.new_hori, ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert ", opt) + end + terms() - -- get out of terminal mode - map("t", m.esc_termmode, "", opt) - -- hide a term from within terminal mode - map("t", m.esc_hide_termmode, " :lua require('utils').close_buffer() ", opt) - -- pick a hidden term - map("n", m.pick_term, ":Telescope terms ", opt) + -- ctrl + s to save file + map("n", "", ":w ", opt) - -- Open terminals - -- TODO this opens on top of an existing vert/hori term, fixme - map("n", m.new_wind, ":execute 'terminal' | let b:term_type = 'wind' | startinsert ", opt) - map("n", m.new_vert, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert ", opt) - map("n", m.new_hori, ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert ", opt) + -- use ESC to turn off search highlighting + map("n", "", ":noh", opt) + + -- navigation within insert mode + local check_insertNav = require("chadrc").options.enable_insertNav + + if check_insertNav == true then + local m = user_map.insert_nav + + map("i", m.forward, "", opt) + map("i", m.backward, "", opt) + map("i", m.top_of_line, "^i", opt) + map("i", m.end_of_line, "", opt) + map("i", m.next_line, "", opt) + map("i", m.prev_line, "", opt) + end + + -- check the theme toggler + local theme_toggler = require("chadrc").ui.theme_toggler + if theme_toggler == true then + local m = user_map.misc.theme_toggle + + map("n", m, ":lua require('utils').toggle_theme(require('chadrc').ui.fav_themes)", opt) + end + + -- Packer commands till because we are not loading it at startup + cmd "silent! command PackerCompile lua require 'pluginList' require('packer').compile()" + cmd "silent! command PackerInstall lua require 'pluginList' require('packer').install()" + cmd "silent! command PackerStatus lua require 'pluginList' require('packer').status()" + cmd "silent! command PackerSync lua require 'pluginList' require('packer').sync()" + cmd "silent! command PackerUpdate lua require 'pluginList' require('packer').update()" end -terms() +M.bufferline = function() + local m = user_map.bufferline -M.truezen = function() - local m = user_map.truezen + map("n", m.new_buffer, ":enew", opt) -- new buffer + map("n", m.newtab, ":tabnew", opt) -- new tab + map("n", m.close, ":lua require('utils').close_buffer() ", opt) -- close buffer - map("n", m.ataraxisMode, ":TZAtaraxis", opt) - map("n", m.minimalisticmode, ":TZMinimalist", opt) - map("n", m.focusmode, ":TZFocus", opt) + -- move between tabs + + map("n", m.cycleNext, ":BufferLineCycleNext", opt) + map("n", m.cyclePrev, ":BufferLineCyclePrev", opt) end -map("n", "", ":w ", opt) +M.chadsheet = function() + local m = user_map.chadsheet + + map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope()", opt) + map( + "n", + m.user_keys, + ":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false }", + opt + ) +end M.comment_nvim = function() local m = user_map.comment_nvim.comment_toggle @@ -77,6 +125,25 @@ M.comment_nvim = function() map("v", m, ":CommentToggle", opt) end +M.dashboard = function() + local m = user_map.dashboard + + map("n", m.open, ":Dashboard", opt) + map("n", m.newfile, ":DashboardNewFile", opt) + map("n", m.bookmarks, ":DashboardJumpMarks", opt) + map("n", m.sessionload, ":SessionLoad", opt) + map("n", m.sessionsave, ":SessionSave", opt) +end + +M.fugitive = function() + local m = user_map.fugitive + + map("n", m.Git, ":Git", opt) + map("n", m.diffget_2, ":diffget //2", opt) + map("n", m.diffget_3, ":diffget //3", opt) + map("n", m.git_blame, ":Git blame", opt) +end + M.nvimtree = function() local m = user_map.nvimtree.treetoggle @@ -88,14 +155,12 @@ M.neoformat = function() map("n", m, ":Neoformat", opt) end -M.dashboard = function() - local m = user_map.dashboard +M.truezen = function() + local m = user_map.truezen - map("n", m.open, ":Dashboard", opt) - map("n", m.newfile, ":DashboardNewFile", opt) - map("n", m.bookmarks, ":DashboardJumpMarks", opt) - map("n", m.sessionload, ":SessionLoad", opt) - map("n", m.sessionsave, ":SessionSave", opt) + map("n", m.ataraxisMode, ":TZAtaraxis", opt) + map("n", m.minimalisticmode, ":TZMinimalist", opt) + map("n", m.focusmode, ":TZFocus", opt) end M.telescope = function() @@ -116,69 +181,4 @@ M.telescope_media = function() map("n", m.media_files, ":Telescope media_files ", opt) end -M.chadsheet = function() - local m = user_map.chadsheet - - map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope()", opt) - map( - "n", - m.user_keys, - ":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false }", - opt - ) -end - -M.bufferline = function() - local m = user_map.bufferline - - map("n", m.new_buffer, ":enew", opt) -- new buffer - map("n", m.newtab, ":tabnew", opt) -- new tab - map("n", m.close, ":lua require('utils').close_buffer() ", opt) -- close buffer - - -- move between tabs - - map("n", m.cycleNext, ":BufferLineCycleNext", opt) - map("n", m.cyclePrev, ":BufferLineCyclePrev", opt) -end - --- use ESC to turn off search highlighting -map("n", "", ":noh", opt) - --- Packer commands till because we are not loading it at startup -cmd "silent! command PackerCompile lua require 'pluginList' require('packer').compile()" -cmd "silent! command PackerInstall lua require 'pluginList' require('packer').install()" -cmd "silent! command PackerStatus lua require 'pluginList' require('packer').status()" -cmd "silent! command PackerSync lua require 'pluginList' require('packer').sync()" -cmd "silent! command PackerUpdate lua require 'pluginList' require('packer').update()" - -M.fugitive = function() - local m = user_map.fugitive - - map("n", m.Git, ":Git", opt) - map("n", m.diffget_2, ":diffget //2", opt) - map("n", m.diffget_3, ":diffget //3", opt) - map("n", m.git_blame, ":Git blame", opt) -end - --- navigation within insert mode -local check_insertNav = require("chadrc").options.enable_insertNav - -if check_insertNav == true then - local m = user_map.insert_nav - - map("i", m.forward, "", opt) - map("i", m.backward, "", opt) - map("i", m.top_of_line, "^i", opt) - map("i", m.end_of_line, "", opt) - map("i", m.next_line, "", opt) - map("i", m.prev_line, "", opt) -end - -local theme_toggler = require("chadrc").ui.theme_toggler - -if theme_toggler == true then - local m = user_map.misc.theme_toggle - - map("n", m, ":lua require('utils').toggle_theme(require('chadrc').ui.fav_themes)", opt) -end return M From 7753e03b9e561fa359912c1d632a5e69c035d90c Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 19 Aug 2021 08:51:42 +0530 Subject: [PATCH 0572/1541] feat: Do not depend on user config | Fix merging of configs because it is a user config, so our config shoudn't break even we if dont have it use our own table merge function move loading config to a function use a global variable to store the config, so no need to call the table function everytime --- lua/chadrc.lua | 2 - lua/mappings.lua | 8 ++-- lua/options.lua | 8 +++- lua/pluginList.lua | 2 +- lua/plugins/chadsheet.lua | 2 +- lua/theme.lua | 2 +- lua/utils.lua | 86 ++++++++++++++++++++++++++++++++++++++- 7 files changed, 98 insertions(+), 12 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index acb5012..7c98cd3 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -144,6 +144,4 @@ M.mappings = { }, } -M = vim.tbl_deep_extend("force", require "default_config", M) - return M diff --git a/lua/mappings.lua b/lua/mappings.lua index 14740aa..bcf5e96 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -1,4 +1,4 @@ -local user_map = require("chadrc").mappings +local user_map = require("utils").load_config().mappings local miscMap = user_map.misc local cmd = vim.cmd @@ -65,7 +65,7 @@ M.misc = function() map("n", "", ":noh", opt) -- navigation within insert mode - local check_insertNav = require("chadrc").options.enable_insertNav + local check_insertNav = require("utils").load_config().options.enable_insertNav if check_insertNav == true then local m = user_map.insert_nav @@ -79,11 +79,11 @@ M.misc = function() end -- check the theme toggler - local theme_toggler = require("chadrc").ui.theme_toggler + local theme_toggler = require("utils").load_config().ui.theme_toggler if theme_toggler == true then local m = user_map.misc.theme_toggle - map("n", m, ":lua require('utils').toggle_theme(require('chadrc').ui.fav_themes)", opt) + map("n", m, ":lua require('utils').toggle_theme(require('utils').load_config().ui.fav_themes)", opt) end -- Packer commands till because we are not loading it at startup diff --git a/lua/options.lua b/lua/options.lua index c64589b..e0aff03 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -1,7 +1,11 @@ -local options = require("chadrc").options local opt = vim.opt local g = vim.g +-- export user config as a global varibale +g.nvchad_user_config = "chadrc" + +local options = require("utils").load_config().options + opt.completeopt = { "menuone", "noselect" } opt.undofile = options.permanent_undo opt.ruler = options.ruler @@ -76,7 +80,7 @@ vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber ]] -- Don't show status line on certain windows vim.cmd [[ au TermOpen term://* setfiletype terminal ]] -vim.cmd [[ let hidden_statusline = luaeval('require("chadrc").ui.hidden_statusline') | autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * nested if index(hidden_statusline, &ft) >= 0 | set laststatus=0 | else | set laststatus=2 | endif ]] +vim.cmd [[ let hidden_statusline = luaeval('require("utils").load_config().ui.hidden_statusline') | autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * nested if index(hidden_statusline, &ft) >= 0 | set laststatus=0 | else | set laststatus=2 | endif ]] -- Open a file from its last left off position -- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] diff --git a/lua/pluginList.lua b/lua/pluginList.lua index df3cdcf..5c56855 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -1,4 +1,4 @@ -local plugin_status = require("chadrc").plugin_status +local plugin_status = require("utils").load_config().plugin_status local present, _ = pcall(require, "packerInit") local packer diff --git a/lua/plugins/chadsheet.lua b/lua/plugins/chadsheet.lua index 4ccd2b5..21862c1 100644 --- a/lua/plugins/chadsheet.lua +++ b/lua/plugins/chadsheet.lua @@ -4,7 +4,7 @@ if not present then return end -local mappings = require("chadrc").mappings +local mappings = require("utils").load_config().mappings -- add user mappings to the cheetsheet for section, data in pairs(mappings) do diff --git a/lua/theme.lua b/lua/theme.lua index 04f0871..3002ac2 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -1,4 +1,4 @@ -local chad_theme = require("chadrc").ui.theme +local chad_theme = require("utils").load_config().ui.theme vim.g.nvchad_theme = chad_theme local present, base16 = pcall(require, "base16") diff --git a/lua/utils.lua b/lua/utils.lua index afde106..fb7c13f 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -10,7 +10,8 @@ M.change_theme = function(current_theme, new_theme) return end - local file = vim.fn.stdpath "config" .. "/lua/chadrc.lua" + local user_config = vim.g.nvchad_user_config + local file = vim.fn.stdpath "config" .. "/lua/" .. user_config .. ".lua" -- store in data variable local data = assert(M.file("r", file)) -- escape characters which can be parsed as magic chars @@ -195,6 +196,89 @@ M.list_themes = function(return_type) return themes end +-- Base code: https://gist.github.com/revolucas/184aec7998a6be5d2f61b984fac1d7f7 +-- Changes over it: preserving table 1 contents and also update with table b, without duplicating +-- 1st arg - base table, 2nd arg - table to merge +M.merge_table = function(into, from) + -- make sure both are table + if type(into) ~= "table" or type(from) ~= "table" then + return 1 + end + local stack, seen = {}, {} + local table1, table2 = into, from + while true do + for k, v in pairs(table2) do + if type(v) == "table" and type(table1[k]) == "table" then + table.insert(stack, { table1[k], table2[k] }) + else + local present = seen[v] or false + if not present then + -- add the value to seen table until value is found + -- todo: maybe improve this + for _, value in pairs(table1) do + if value == v then + present = true + break + end + end + end + seen[v] = true + if not present then + -- if type is number, then it is a sub table value, so append + if type(k) == "number" then + table1[#table1 + 1] = v + else + table1[k] = v + end + end + end + end + if #stack > 0 then + local t = stack[#stack] + table1, table2 = t[1], t[2] + stack[#stack] = nil + else + break + end + end + return into +end + +-- load config +-- 1st arg = boolean - whether to force reload +-- Modifies _G._NVCHAD_CONFIG global variable +M.load_config = function(reload) + -- only do the stuff below one time, otherwise just return the set config + if _G._NVCHAD_CONFIG_CONTENTS ~= nil and not (reload or false) then + return _G._NVCHAD_CONFIG_CONTENTS + end + + -- don't enclose in pcall, it better break when default config is faulty + _G._NVCHAD_CONFIG_CONTENTS = require "default_config" + + -- user config is not required to run nvchad but a optional + -- Make sure the config doesn't break the whole system if user config is not present or in bad state or not a table + -- print warning texts if user config file is present + local config_name = vim.g.nvchad_user_config or "chadrc" + local config_file = vim.fn.stdpath "config" .. "/lua/" .. config_name .. ".lua" + -- check if the user config is present + if vim.fn.empty(vim.fn.glob(config_file)) < 1 then + local present, config = pcall(require, config_name) + if present then + -- make sure the returned value is table + if type(config) == "table" then + -- data = require(config_name) + _G._NVCHAD_CONFIG_CONTENTS = require("utils").merge_table(_G._NVCHAD_CONFIG_CONTENTS, config) + else + print("Warning: " .. config_name .. " sourced successfully but did not return a lua table.") + end + else + print("Warning: " .. config_file .. " is present but sourcing failed.") + end + end + return _G._NVCHAD_CONFIG_CONTENTS +end + -- reload a plugin ( will try to load even if not loaded) -- can take a string or list ( table ) -- return true or false From 4801ec86f1d9caa6660ca466a0b161a722485c53 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Wed, 18 Aug 2021 10:45:27 +0530 Subject: [PATCH 0573/1541] Add NvChadUpdate command and shortcut for it map leader+uu to it summary of what it does: first ask the user for confirmation and tell that the updater is gonna run git reset --hard in config repo and chadrc will be restored take backup of chadrc in a lua string and locally in a file with chadrc.bak.(random numbers) git reset on config dir and git pull whether success or error, restore the chadrc file if restore fails, then print backup file path for more deep understanding, read the comments in utils.lua --- lua/chadrc.lua | 1 + lua/default_config.lua | 1 + lua/mappings.lua | 4 +++ lua/utils.lua | 81 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 87 insertions(+) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 7c98cd3..41e82ed 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -141,6 +141,7 @@ M.mappings = { copywhole_file = "", toggle_linenr = "n", -- show or hide line number theme_toggle = "x", + update_nvchad = "uu", }, } diff --git a/lua/default_config.lua b/lua/default_config.lua index 0abbee5..b9adb10 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -140,6 +140,7 @@ M.mappings = { copywhole_file = "", toggle_linenr = "n", -- show or hide line number theme_toggle = "x", + update_nvchad = "uu", }, } diff --git a/lua/mappings.lua b/lua/mappings.lua index bcf5e96..9be5fde 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -92,6 +92,10 @@ M.misc = function() cmd "silent! command PackerStatus lua require 'pluginList' require('packer').status()" cmd "silent! command PackerSync lua require 'pluginList' require('packer').sync()" cmd "silent! command PackerUpdate lua require 'pluginList' require('packer').update()" + + -- add NvChadUpdate command and mapping + cmd "silent! command! NvChadUpdate lua require('utils').update_nvchad()" + map("n", user_map.misc.update_nvchad, ":NvChadUpdate", opt) end M.bufferline = function() diff --git a/lua/utils.lua b/lua/utils.lua index fb7c13f..e48d591 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -148,6 +148,16 @@ M.close_buffer = function(bufexpr, force) end end +-- wrapper to use vim.api.nvim_echo +-- 1st arg - text - required +-- 2nd arg - highlight group - if not present then use None +M.echo = function(text, group) + if text == nil then + return + end + vim.api.nvim_echo({ { text, group or "None" } }, false, {}) +end + -- 1st arg - r or w -- 2nd arg - file path -- 3rd arg - content if 1st arg is w @@ -399,4 +409,75 @@ M.toggle_theme = function(themes) end end +-- update nvchad +M.update_nvchad = function() + -- in all the comments below, config means user config + local config_path = vim.fn.stdpath "config" + local config_name = vim.g.nvchad_user_config or "chadrc" + local config_file = config_path .. "/lua/" .. config_name .. ".lua" + -- generate a random file name + local config_file_backup = config_path .. "/" .. config_name .. ".lua.bak." .. math.random() + local utils = require "utils" + local echo = utils.echo + + -- ask the user for confirmation to update because we are going to run git reset --hard + echo( + "Updater will run git reset --hard in config folder, so changes to existing repo files except " + .. config_name + .. " will be lost!\nUpdate NvChad ? [y/N]", + "WarningMsg" + ) + local ans = string.lower(vim.fn.input "-> ") == "y" + utils.clear_cmdline() + if not ans then + echo("Update cancelled!", "Title") + return + end + + -- first try to fetch contents of config, this will make sure it is readable and taking backup of its contents + local config_contents = utils.file("r", config_file) + -- also make a local backup in ~/.config/nvim, will be removed when config is succesfully restored + utils.file("w", config_file_backup, config_contents) + -- write original config file with its contents, will make sure charc is writable, this maybe overkill but a little precaution always helps + utils.file("w", config_file, config_contents) + + -- function that will executed when git commands are done + local function update_exit(_, code) + -- restore config file irrespective of whether git commands were succesfull or not + if pcall(function() + utils.file("w", config_file, config_contents) + end) then + -- config restored succesfully, remove backup file that was created + if not pcall(os.remove, config_file_backup) then + echo("Warning: Failed to remove backup chadrc, remove manually.", "WarningMsg") + echo("Path: " .. config_file_backup, "WarningMsg") + end + else + echo("Error: Restoring " .. config_name .. " failed.\n", "ErrorMsg") + echo("Backed up " .. config_name .. " path: " .. config_file_backup .. "\n\n", "None") + end + + -- close the terminal buffer only if update was success, as in case of error, we need the error message + if code == 0 then + vim.cmd "bd!" + echo("NvChad succesfully updated.\n", "String") + else + echo("Error: NvChad Update failed.\n", "ErrorMsg") + end + end + + -- git commands that will executed, reset in case config was modfied + -- use --ff-only to not mess up if the local repo is outdated + local update_script = [[git reset --hard && git pull --set-upstream https://github.com/NvChad/NvChad main --ff-only]] + + -- open a new buffer + vim.cmd "new" + -- finally open the pseudo terminal buffer + vim.fn.termopen(update_script, { + -- change dir to config path so we don't need to move in script + cwd = config_path, + on_exit = update_exit, + }) +end + return M From 880d4dc312962c1ca209c5b34efda9e977e41b89 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 19 Aug 2021 11:20:00 +0530 Subject: [PATCH 0574/1541] NvChadUpdater: Make update repo and url configurable | Improve logging --- lua/chadrc.lua | 3 +++ lua/default_config.lua | 3 +++ lua/utils.lua | 54 +++++++++++++++++++++++++++--------------- 3 files changed, 41 insertions(+), 19 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 41e82ed..ab59eb9 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -38,6 +38,9 @@ M.options = { mapleader = " ", autosave = false, enable_insertNav = true, -- navigation in insertmode + -- used for updater + update_url = "https://github.com/NvChad/NvChad", + update_branch = "main", } -- enable and disable plugins (false for disable) diff --git a/lua/default_config.lua b/lua/default_config.lua index b9adb10..f8bd1aa 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -37,6 +37,9 @@ M.options = { mapleader = " ", autosave = false, enable_insertNav = true, -- navigation in insertmode + -- used for updater + update_url = "https://github.com/NvChad/NvChad", + update_branch = "main", } -- enable and disable plugins (false for disable) diff --git a/lua/utils.lua b/lua/utils.lua index e48d591..58cf816 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -149,13 +149,13 @@ M.close_buffer = function(bufexpr, force) end -- wrapper to use vim.api.nvim_echo --- 1st arg - text - required --- 2nd arg - highlight group - if not present then use None -M.echo = function(text, group) - if text == nil then +-- table of {string, highlight} +-- e.g echo({{"Hello", "Title"}, {"World"}}) +M.echo = function(opts) + if opts == nil or type(opts) ~= "table" then return end - vim.api.nvim_echo({ { text, group or "None" } }, false, {}) + vim.api.nvim_echo(opts, false, {}) end -- 1st arg - r or w @@ -419,18 +419,29 @@ M.update_nvchad = function() local config_file_backup = config_path .. "/" .. config_name .. ".lua.bak." .. math.random() local utils = require "utils" local echo = utils.echo + local current_config = utils.load_config() + local update_url = current_config.options.update_url or "https://github.com/NvChad/NvChad" + local update_branch = current_config.options.update_branch or "main" -- ask the user for confirmation to update because we are going to run git reset --hard - echo( - "Updater will run git reset --hard in config folder, so changes to existing repo files except " - .. config_name - .. " will be lost!\nUpdate NvChad ? [y/N]", - "WarningMsg" - ) + echo { { "Url: ", "Title" }, { update_url } } + echo { { "Branch: ", "Title" }, { update_branch } } + echo { + { "\nUpdater will run", "WarningMsg" }, + { " git reset --hard " }, + { + "in config folder, so changes to existing repo files except ", + "WarningMsg", + }, + + { config_name }, + { " will be lost!\n\nUpdate NvChad ? [y/N]", "WarningMsg" }, + } + local ans = string.lower(vim.fn.input "-> ") == "y" utils.clear_cmdline() if not ans then - echo("Update cancelled!", "Title") + echo { { "Update cancelled!", "Title" } } return end @@ -449,26 +460,31 @@ M.update_nvchad = function() end) then -- config restored succesfully, remove backup file that was created if not pcall(os.remove, config_file_backup) then - echo("Warning: Failed to remove backup chadrc, remove manually.", "WarningMsg") - echo("Path: " .. config_file_backup, "WarningMsg") + echo { { "Warning: Failed to remove backup chadrc, remove manually.", "WarningMsg" } } + echo { { "Path: ", "WarningMsg" }, { config_file_backup } } end else - echo("Error: Restoring " .. config_name .. " failed.\n", "ErrorMsg") - echo("Backed up " .. config_name .. " path: " .. config_file_backup .. "\n\n", "None") + echo { { "Error: Restoring " .. config_name .. " failed.\n", "ErrorMsg" } } + echo { { "Backed up " .. config_name .. " path: " .. config_file_backup .. "\n\n", "None" } } end -- close the terminal buffer only if update was success, as in case of error, we need the error message if code == 0 then vim.cmd "bd!" - echo("NvChad succesfully updated.\n", "String") + echo { { "NvChad succesfully updated.\n", "String" } } else - echo("Error: NvChad Update failed.\n", "ErrorMsg") + echo { { "Error: NvChad Update failed.\n", "ErrorMsg" } } end end -- git commands that will executed, reset in case config was modfied -- use --ff-only to not mess up if the local repo is outdated - local update_script = [[git reset --hard && git pull --set-upstream https://github.com/NvChad/NvChad main --ff-only]] + local update_script = table.concat({ + "git reset --hard && git pull --set-upstream", + update_url, + update_branch, + "--ff-only", + }, " ") -- open a new buffer vim.cmd "new" From f10fb4763752bf09e25dc8d87c9db2907b40f854 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 19 Aug 2021 14:36:49 +0530 Subject: [PATCH 0575/1541] add transparency option to user config --- lua/chadrc.lua | 10 ++++++++-- lua/default_config.lua | 10 ++++++++-- lua/highlights.lua | 15 +++++++++++---- lua/plugins/statusline.lua | 4 ++-- 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index ab59eb9..3e6d52b 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -4,12 +4,18 @@ local M = {} M.ui = { theme = "onedark", - -- for theme toggle + + -- theme toggle + theme_toggler = false, fav_themes = { "onedark", "gruvchad", }, - theme_toggler = false, + + -- Enable this only if your terminal has the colorscheme set which nvchad uses + -- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal + transparency = true, + hidden_statusline = { -- these are filetypes, not pattern matched "NvimTree", diff --git a/lua/default_config.lua b/lua/default_config.lua index f8bd1aa..7f87246 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -4,12 +4,18 @@ local M = {} M.ui = { theme = "onedark", - -- for theme toggle + + -- theme toggle + theme_toggler = false, fav_themes = { "onedark", "gruvchad", }, - theme_toggler = false, + + -- Enable this only if your terminal has the colorscheme set which nvchad uses + -- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal + transparency = true, + hidden_statusline = { -- these are filetypes, not pattern matched "NvimTree", diff --git a/lua/highlights.lua b/lua/highlights.lua index 88604f6..61023ae 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -110,10 +110,17 @@ fg("DashboardCenter", grey_fg) fg("DashboardShortcut", grey_fg) fg("DashboardFooter", grey_fg) --- packer's floating window +if require("utils").load_config().ui.transparency then + bg("Normal", "NONE") + bg("Folded", "NONE") + fg("Folded", "NONE") + bg("NvimTreeNormal", "NONE") + bg("NvimTreeVertSplit", "NONE") + fg("NvimTreeVertSplit", grey) + bg("NvimTreeStatusLineNC", "NONE") + fg("Comment", grey) +end +-- For floating windows bg("NormalFloat", one_bg) fg("FloatBorder", blue) - --- set bg color for nvim --- bg("Normal", black) diff --git a/lua/plugins/statusline.lua b/lua/plugins/statusline.lua index f6e0ad9..4f9a4ca 100644 --- a/lua/plugins/statusline.lua +++ b/lua/plugins/statusline.lua @@ -1,4 +1,4 @@ -local global_theme = "themes/" .. vim.g.nvchad_theme +local global_theme = "themes/" .. require("utils").load_config().ui.theme local colors = require(global_theme) local present1, gl = pcall(require, "galaxyline") @@ -45,7 +45,7 @@ local icon_styles = { }, } -local user_statusline_style = require("chadrc").ui.statusline_style +local user_statusline_style = require("utils").load_config().ui.statusline_style local statusline_style = icon_styles[user_statusline_style] local left_separator = statusline_style.left From e75fbed32243a8dd9301f672b8662e1549ecabff Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 19 Aug 2021 14:39:27 +0530 Subject: [PATCH 0576/1541] disable transparency by default --- lua/chadrc.lua | 2 +- lua/default_config.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 3e6d52b..fff9bdd 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -14,7 +14,7 @@ M.ui = { -- Enable this only if your terminal has the colorscheme set which nvchad uses -- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal - transparency = true, + transparency = false, hidden_statusline = { -- these are filetypes, not pattern matched diff --git a/lua/default_config.lua b/lua/default_config.lua index 7f87246..ecf14e7 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -14,7 +14,7 @@ M.ui = { -- Enable this only if your terminal has the colorscheme set which nvchad uses -- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal - transparency = true, + transparency = false, hidden_statusline = { -- these are filetypes, not pattern matched From 114d699fc57e2e1204ea355c418d7c48031a131a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 19 Aug 2021 16:09:24 +0530 Subject: [PATCH 0577/1541] change nvimtree rootfolder fg --- lua/highlights.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/highlights.lua b/lua/highlights.lua index 61023ae..13a3f94 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -76,7 +76,7 @@ fg("NvimTreeVertSplit", darker_black) bg("NvimTreeVertSplit", darker_black) fg("NvimTreeEndOfBuffer", darker_black) -cmd("hi NvimTreeRootFolder gui=underline guifg=" .. purple) +cmd("hi NvimTreeRootFolder gui=underline guifg=" .. red) bg("NvimTreeNormal", darker_black) fg_bg("NvimTreeStatuslineNc", darker_black, darker_black) fg_bg("NvimTreeWindowPicker", red, black2) From 224873b937e5df4028794ac7e6221c53f0987925 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 19 Aug 2021 16:37:27 +0530 Subject: [PATCH 0578/1541] Missed in 67c6ec6 and 575dc10 --- lua/default_config.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lua/default_config.lua b/lua/default_config.lua index ecf14e7..825c4a7 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -118,6 +118,7 @@ M.mappings = { bufferline = { new_buffer = "", newtab = "b", + close = "", -- close a buffer with custom func in utils.lua cycleNext = "", -- next buffer cyclePrev = "", -- previous buffer }, @@ -127,13 +128,14 @@ M.mappings = { diffget_3 = "gl", git_blame = "gb", }, - toggleterm = { - toggle_window = "w", - toggle_vert = "v", - toggle_hori = "h", - hide_term = "JK", - }, - -- navigation in insert mode + terms = { -- below are NvChad mappings, not plugin mappings + esc_termmode = "jk", + esc_hide_termmode = "JK", + pick_term = "W", -- note: this is a telescope extension + new_wind = "w", + new_vert = "v", + new_hori = "h", + }, -- navigation in insert mode insert_nav = { forward = "", backward = "", From 7244492b3635667d8e854f58ca3a80aeec653ef4 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 19 Aug 2021 16:40:19 +0530 Subject: [PATCH 0579/1541] utils/merge_table: Handle another edgecase --- lua/utils.lua | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/lua/utils.lua b/lua/utils.lua index 58cf816..483db39 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -212,7 +212,7 @@ end M.merge_table = function(into, from) -- make sure both are table if type(into) ~= "table" or type(from) ~= "table" then - return 1 + return into end local stack, seen = {}, {} local table1, table2 = into, from @@ -223,20 +223,21 @@ M.merge_table = function(into, from) else local present = seen[v] or false if not present then - -- add the value to seen table until value is found - -- todo: maybe improve this - for _, value in pairs(table1) do - if value == v then - present = true - break - end - end - end - seen[v] = true - if not present then - -- if type is number, then it is a sub table value, so append if type(k) == "number" then - table1[#table1 + 1] = v + -- add the value to seen table until value is found + -- only do when key is number we just want to append to subtables + -- todo: maybe improve this + + for _, value in pairs(table1) do + if value == v then + present = true + break + end + end + seen[v] = true + if not present then + table1[#table1 + 1] = v + end else table1[k] = v end From 5ae6fba20d6fcb42286071bbda548222074c8a7c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 19 Aug 2021 17:35:24 +0530 Subject: [PATCH 0580/1541] make statusline more pretty --- lua/chadrc.lua | 2 +- lua/default_config.lua | 2 +- lua/plugins/statusline.lua | 66 +++++++++++++++++++++++++++----------- 3 files changed, 50 insertions(+), 20 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index fff9bdd..6e84c34 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -21,7 +21,7 @@ M.ui = { "NvimTree", -- "terminal", }, - statusline_style = "default", -- round , slant , block + statusline_style = "default", -- default, round , slant , block , arrow } M.options = { diff --git a/lua/default_config.lua b/lua/default_config.lua index 825c4a7..0adda31 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -21,7 +21,7 @@ M.ui = { "NvimTree", "terminal", }, - statusline_style = "default", -- round , slant , block + statusline_style = "default", -- default, round , slant , block , arrow } M.options = { diff --git a/lua/plugins/statusline.lua b/lua/plugins/statusline.lua index 4f9a4ca..70e982c 100644 --- a/lua/plugins/statusline.lua +++ b/lua/plugins/statusline.lua @@ -30,7 +30,7 @@ local icon_styles = { slant = { left = " ", - right = "", + right = " ", main_icon = "  ", vi_mode_icon = " ", position_icon = " ", @@ -43,6 +43,14 @@ local icon_styles = { vi_mode_icon = "  ", position_icon = "  ", }, + + arrow = { + left = "", + right = "", + main_icon = "  ", + vi_mode_icon = " ", + position_icon = " ", + }, } local user_statusline_style = require("utils").load_config().ui.statusline_style @@ -66,12 +74,20 @@ gls.left[2] = { return statusline_style.main_icon end, highlight = { colors.statusline_bg, colors.nord_blue }, - separator = right_separator .. " ", - separator_highlight = { colors.nord_blue, colors.lightbg }, + separator = right_separator, + separator_highlight = { colors.nord_blue, colors.one_bg2 }, }, } gls.left[3] = { + left_arow2 = { + provider = function() end, + separator = right_separator .. " ", + separator_highlight = { colors.one_bg2, colors.lightbg }, + }, +} + +gls.left[4] = { FileIcon = { provider = "FileIcon", condition = condition.buffer_not_empty, @@ -79,7 +95,7 @@ gls.left[3] = { }, } -gls.left[4] = { +gls.left[5] = { FileName = { provider = function() local fileinfo = require "galaxyline.provider_fileinfo" @@ -92,7 +108,7 @@ gls.left[4] = { }, } -gls.left[5] = { +gls.left[6] = { current_dir = { provider = function() local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") @@ -112,7 +128,7 @@ local checkwidth = function() return false end -gls.left[6] = { +gls.left[7] = { DiffAdd = { provider = "DiffAdd", condition = checkwidth, @@ -121,7 +137,7 @@ gls.left[6] = { }, } -gls.left[7] = { +gls.left[8] = { DiffModified = { provider = "DiffModified", condition = checkwidth, @@ -130,7 +146,7 @@ gls.left[7] = { }, } -gls.left[8] = { +gls.left[9] = { DiffRemove = { provider = "DiffRemove", condition = checkwidth, @@ -139,7 +155,7 @@ gls.left[8] = { }, } -gls.left[9] = { +gls.left[10] = { DiagnosticError = { provider = "DiagnosticError", icon = "  ", @@ -147,7 +163,7 @@ gls.left[9] = { }, } -gls.left[10] = { +gls.left[11] = { DiagnosticWarn = { provider = "DiagnosticWarn", icon = "  ", @@ -214,18 +230,24 @@ local mode = function(n) end gls.right[4] = { + left_arrow = { + provider = function() end, + separator = " " .. left_separator, + separator_highlight = { colors.one_bg2, colors.statusline_bg }, + }, +} + +gls.right[5] = { left_round = { provider = function() vim.cmd("hi Galaxyleft_round guifg=" .. mode(2)) return left_separator end, - separator = " ", - separator_highlight = { colors.statusline_bg, colors.statusline_bg }, - highlight = { "GalaxyViMode", colors.statusline_bg }, + highlight = { "GalaxyViMode", colors.one_bg2 }, }, } -gls.right[5] = { +gls.right[6] = { viMode_icon = { provider = function() vim.cmd("hi GalaxyviMode_icon guibg=" .. mode(2)) @@ -235,7 +257,7 @@ gls.right[5] = { }, } -gls.right[6] = { +gls.right[7] = { ViMode = { provider = function() vim.cmd("hi GalaxyViMode guifg=" .. mode(2)) @@ -245,18 +267,26 @@ gls.right[6] = { }, } -gls.right[7] = { +gls.right[8] = { + left_arrow2 = { + provider = function() end, + separator = left_separator, + separator_highlight = { colors.grey, colors.lightbg }, + }, +} + +gls.right[9] = { some_RoundIcon = { provider = function() return statusline_style.position_icon end, separator = left_separator, - separator_highlight = { colors.green, colors.lightbg }, + separator_highlight = { colors.green, colors.grey }, highlight = { colors.lightbg, colors.green }, }, } -gls.right[8] = { +gls.right[10] = { line_percentage = { provider = function() local current_line = vim.fn.line "." From 112d3866a584cf9e5b99c9f1927984d8d3b44626 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 19 Aug 2021 17:44:48 +0530 Subject: [PATCH 0581/1541] improve various theme colors --- lua/themes/chadracula.lua | 4 ++-- lua/themes/norchad.lua | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/themes/chadracula.lua b/lua/themes/chadracula.lua index 1cd6146..6925bdf 100644 --- a/lua/themes/chadracula.lua +++ b/lua/themes/chadracula.lua @@ -10,11 +10,11 @@ local colors = { grey_fg = "#5a5c68", grey_fg2 = "#5a5c68", light_grey = "#636571", - red = "#FF5555", + red = "#E95678", baby_pink = "#DE8C92", pink = "#FF79C6", line = "#373844", -- for lines like vertsplit - green = "#50FA7B", + green = "#69ff94", vibrant_green = "#69FF94", nord_blue = "#b389ef", blue = "#BD93F9", diff --git a/lua/themes/norchad.lua b/lua/themes/norchad.lua index 01b6e52..ce715b3 100644 --- a/lua/themes/norchad.lua +++ b/lua/themes/norchad.lua @@ -4,9 +4,9 @@ local colors = { black = "#2E3440", -- nvim bg black2 = "#343a46", one_bg = "#373d49", - one_bg2 = "#3a404c", - one_bg3 = "#3d434f", - grey = "#474d59", + one_bg2 = "#464c58", + one_bg3 = "#494f5b", + grey = "#4b515d", grey_fg = "#565c68", grey_fg2 = "#606672", light_grey = "#646a76", From a49f62d3c621e243045be5e7c51685508f2bf18b Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Thu, 19 Aug 2021 17:59:08 +0530 Subject: [PATCH 0582/1541] feat: Added option for italic_comments --- lua/chadrc.lua | 1 + lua/default_config.lua | 1 + lua/highlights.lua | 13 +++++++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 6e84c34..e9a6002 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -11,6 +11,7 @@ M.ui = { "onedark", "gruvchad", }, + italic_comments = false, -- Enable this only if your terminal has the colorscheme set which nvchad uses -- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal diff --git a/lua/default_config.lua b/lua/default_config.lua index 0adda31..036c4e1 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -11,6 +11,7 @@ M.ui = { "onedark", "gruvchad", }, + italic_comments = false, -- Enable this only if your terminal has the colorscheme set which nvchad uses -- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal diff --git a/lua/highlights.lua b/lua/highlights.lua index 13a3f94..99e0d03 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -41,11 +41,20 @@ fg("IndentBlanklineChar", line) -- misc -- fg("LineNr", grey) -fg("Comment", grey_fg) + +-- Comments +local ui = require("utils").load_config().ui + +if ui.italic_comments then + cmd("hi Comment gui=italic guifg=" .. grey_fg) +else + fg("Comment", grey_fg) +end + fg("NvimInternalError", red) fg("VertSplit", line) fg("EndOfBuffer", black) ---fg_bg("Visual",light_grey, colors.lightbg) +-- fg_bg("Visual",light_grey, colors.lightbg) -- Pmenu bg("Pmenu", one_bg) From 47ab9c28a1dd16464da2e14ddd5adae6cb2360ed Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 19 Aug 2021 18:13:58 +0530 Subject: [PATCH 0583/1541] add no buffer icon to statusline --- lua/plugins/statusline.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/plugins/statusline.lua b/lua/plugins/statusline.lua index 70e982c..c884b46 100644 --- a/lua/plugins/statusline.lua +++ b/lua/plugins/statusline.lua @@ -99,9 +99,13 @@ gls.left[5] = { FileName = { provider = function() local fileinfo = require "galaxyline.provider_fileinfo" + + if vim.api.nvim_buf_get_name(0):len() == 0 then + return "" + end + return fileinfo.get_current_file_name("", "") end, - condition = condition.buffer_not_empty, highlight = { colors.white, colors.lightbg }, separator = right_separator, separator_highlight = { colors.lightbg, colors.lightbg2 }, From df00e8ba51dd322dc168dcabaae59d864eb5cd32 Mon Sep 17 00:00:00 2001 From: godspeed-x <74945202+godspeed-x@users.noreply.github.com> Date: Thu, 19 Aug 2021 17:46:51 +0530 Subject: [PATCH 0584/1541] link image to nvchad's contributor page --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b4d927b..5dda937 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ It would be nice if NvChad focuses on existing plugins and config before adding # Chad contributors - + From 6bfd2043e86e6ec524e679fca7080e17b71550dd Mon Sep 17 00:00:00 2001 From: Dhruv Jain Date: Thu, 19 Aug 2021 18:16:22 +0530 Subject: [PATCH 0585/1541] fix typos in TODO section --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5dda937..75f6d1e 100644 --- a/README.md +++ b/README.md @@ -131,10 +131,10 @@ without / with Treesitter : # TODO -It would be nice if NvChad focuses on existing plugins and config before adding new things , some plugins like whichkey , telescope , treesitter still have basic configs! Also adding new features that'd make NvChad slow or its startuptime slow wouldnt be encouraged , if that feature's really needed then It'll be mentioned in the wiki with its config. +It would be nice if NvChad focuses on existing plugins and config before adding new things. Some plugins like whichkey, telescope and treesitter still have basic configs! Also adding new features that'd make NvChad slow or its startup time slow wouldn't be encouraged. If that feature is really needed then it'll be mentioned in the wiki with its config. - Debloat the config. -- Make NvChad more faster (reduce startuptime too). +- Make NvChad more faster (reduce startup time too). - Add another section in the wiki explaining the whole config (must be helpful for newbies). - Add more themes. - Preview shortcuts in the form of a pretty [cheatsheet](https://user-images.githubusercontent.com/59060246/122490009-95fd9980-cffe-11eb-9676-78019aa2cd65.png). From 9b719a6db622523806946784998a10550f181e40 Mon Sep 17 00:00:00 2001 From: Dhruv Jain Date: Thu, 19 Aug 2021 18:30:23 +0530 Subject: [PATCH 0586/1541] Fix typos in Bloat section --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 75f6d1e..935b163 100644 --- a/README.md +++ b/README.md @@ -124,8 +124,8 @@ without / with Treesitter : - gitsigns for git diffs # Bloat - -- To all those who think this is probably bloated , sure it is . Bloat means different to everyone . NvChad has like 30 ~ plugins but that doesnt mean those plugins are compromsing neovim's speed, snappiness or making it slow. No matter how many plugins I'd add on nvchad , it wouldnt compromise speed / snappiness / make it slow or whatever since it uses packer.nvim as plugin manager , packer.nvim lets you lazy load plugins i.e loading plugins on certain events , mappings , sequentially loading them etc so loading them only when needed , I have lazy loaded all the plugins so most plugins arent loaded by default , hence not affecting neovim's startup/launch time. + +- To all those who think this is probably bloated, sure it is. Bloat means different to everyone. NvChad has like 30 ~ plugins but that doesn't mean those plugins are compromising neovim's speed, snappiness, or making it slow. No matter how many plugins I'd add on NvChad, it wouldn't compromise speed/snappiness/make it slow or whatever since it uses packer.nvim as plugin manager. packer.nvim lets you lazy load plugins i.e. loading plugins on certain events, mappings, sequentially loading them, etc, thus loading them only when needed. I have lazy loaded all the plugins so most plugins aren't loaded by default, hence not affecting neovim's startup/launch time. From 3ec8c80abe1e1081b31526fa3057cdede111626b Mon Sep 17 00:00:00 2001 From: Dhruv Jain Date: Thu, 19 Aug 2021 18:33:55 +0530 Subject: [PATCH 0587/1541] Fix typos in Feature section --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 935b163..e01b1fe 100644 --- a/README.md +++ b/README.md @@ -102,25 +102,25 @@ without / with Treesitter : - Using plugins that are mouse friendly - Beautiful inbuilt themes - lazy loading 100% of plugins -- managing tabs , buffers with bufferline +- managing tabs, buffers with bufferline - autosave -- icons on nvimtree , telescope , bufferline/statusline and almost everywhere! with nvim-web-devicons -- minimal status line ( galaxyline) +- icons on nvimtree, telescope, bufferline/statusline and almost everywhere! with nvim-web-devicons +- minimal status line (galaxyline) - gitsigns (colored bars for git in my config) - nvim-lspconfig for nvim-lsp configuration - lspInstall for installing lsp servers easily - nvim-compe for autocompletion - lspkind to show pictograms on autocompletion items -- telescope for file finding , picking , previewing (files and even images) +- telescope for file finding, picking, previewing (files and even images) - nvim-treesitter for syntax highlighting - nvim-autopairs for autolosing braces and stuffs -- neoformat for prettifying / formatting code +- neoformat for prettifying/formatting code - packer.nvim as package manager - indent-blankline.Nvim for indentlines - smooth scrolling - luasnip for snippet plugin and snip support from VSCode through vsnip supporting custom and predefined snips (friendly-snippets) -- Distraction free modes ( modes in which statusline , tabline etc stuff get disabled so its just the text visible in the buffer similar to goyo.vim) -- Code formatting / prettifying +- Distraction free modes (modes in which statusline, tabline etc. stuff get disabled so its just the text visible in the buffer similar to goyo.vim) +- Code formatting/prettifying - gitsigns for git diffs # Bloat From b97d9a8f85731ba68b45c5effc9d99414411e83e Mon Sep 17 00:00:00 2001 From: Dhruv Jain Date: Thu, 19 Aug 2021 18:35:56 +0530 Subject: [PATCH 0588/1541] Very minor typos in plugin sections --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e01b1fe..48fb0b0 100644 --- a/README.md +++ b/README.md @@ -49,13 +49,13 @@ #### Lspkind-nvim -This tiny plugin adds vscode-like pictograms to neovim built-in lsp completion items : +This tiny plugin adds vscode-like pictograms to neovim built-in lsp completion items:
#### Nvim-tree.lua -fast file tree : +fast file tree:
@@ -67,7 +67,7 @@ A fuzzy file finder, picker, sorter, previewer and much more: ### Indent-blankline.nvim -adds indentline : +adds indentline: ### Galaxyline @@ -82,14 +82,14 @@ As a top tabline like thing which lets me handle tabs and buffers like switching ### Nvim-web-devicons -Lua fork of vim devicons which lets me change icons of filetypes +Lua fork of vim devicons which lets me change icons of filetypes: ### Nvim-treesitter Better syntax highlighting for programming languages ( NvChad by default comes with lua/bash treesitter parsers ). -without / with Treesitter : +without / with Treesitter: # Credits From 2c0a0944420137c02cc3d6f9607a3d65690153e6 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 19 Aug 2021 21:08:47 +0530 Subject: [PATCH 0589/1541] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 48fb0b0..9149a74 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,8 @@ without / with Treesitter: # Credits -[Elianiva](https://github.com/elianiva) helped me with neovim lua related issues many times, NvChad wouldnt exist without his help at all! +- [Elianiva](https://github.com/elianiva) helped me with neovim lua related issues many times, NvChad wouldnt exist without his help at all! +- @lorvethe for making NvChad logo! # Features From 06c324a1a75f177d032a6bc2e299e82f31c39adc Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 19 Aug 2021 22:28:55 +0530 Subject: [PATCH 0590/1541] Update README.md --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 9149a74..1a85304 100644 --- a/README.md +++ b/README.md @@ -135,11 +135,8 @@ without / with Treesitter: It would be nice if NvChad focuses on existing plugins and config before adding new things. Some plugins like whichkey, telescope and treesitter still have basic configs! Also adding new features that'd make NvChad slow or its startup time slow wouldn't be encouraged. If that feature is really needed then it'll be mentioned in the wiki with its config. - Debloat the config. -- Make NvChad more faster (reduce startup time too). -- Add another section in the wiki explaining the whole config (must be helpful for newbies). +- Make NvChad more and more faster (reduce startup time as low as possible). - Add more themes. -- Preview shortcuts in the form of a pretty [cheatsheet](https://user-images.githubusercontent.com/59060246/122490009-95fd9980-cffe-11eb-9676-78019aa2cd65.png). -- Add a user config so it doesnt get hard to update :c # Chad contributors From 89c371397f60135ac57f14699b88010935906556 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 20 Aug 2021 00:28:42 +0530 Subject: [PATCH 0591/1541] better colors --- lua/plugins/icons.lua | 5 +++++ lua/themes/gruvchad.lua | 2 +- lua/themes/javacafe.lua | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lua/plugins/icons.lua b/lua/plugins/icons.lua index 47fa00f..e38e4fd 100644 --- a/lua/plugins/icons.lua +++ b/lua/plugins/icons.lua @@ -13,6 +13,11 @@ icons.setup { color = colors.baby_pink, name = "html", }, + c = { + icon = "", + color = colors.blue, + name = "c", + }, css = { icon = "", color = colors.blue, diff --git a/lua/themes/gruvchad.lua b/lua/themes/gruvchad.lua index c7b174f..b51d968 100644 --- a/lua/themes/gruvchad.lua +++ b/lua/themes/gruvchad.lua @@ -4,7 +4,7 @@ local colors = { black = "#222526", -- nvim bg black2 = "#26292a", one_bg = "#2b2e2f", - one_bg2 = "#2f3233", + one_bg2 = "#3b3e3f", one_bg3 = "#313435", grey = "#46494a", grey_fg = "#5d6061", diff --git a/lua/themes/javacafe.lua b/lua/themes/javacafe.lua index 6633653..ef7efea 100644 --- a/lua/themes/javacafe.lua +++ b/lua/themes/javacafe.lua @@ -4,8 +4,8 @@ local colors = { black = "#131a21", -- nvim bg black2 = "#1a2128", one_bg = "#1e252c", - one_bg2 = "#272e35", - one_bg3 = "#2a3138", + one_bg2 = "#2a3138", + one_bg3 = "#363d44", grey = "#363d44", grey_fg = "#4e555c", grey_fg2 = "#51585f", From 44182c0ca1dc9e8cb5ab4cd72b7659e6ebfffdc8 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 20 Aug 2021 00:40:45 +0530 Subject: [PATCH 0592/1541] 1.0v screenshots! --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 1a85304..0b401cf 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,14 @@

+ +# Some theme showcases :D + +![onedark](https://user-images.githubusercontent.com/59060246/130129880-59ab1ad5-9aa6-4f50-9ddd-d8dde0c16257.png) +![nord](https://user-images.githubusercontent.com/59060246/130129890-c01117df-ac3d-40dd-b95d-2681c2461bb4.png) +![gruvchad](https://user-images.githubusercontent.com/59060246/130129897-a68b1585-f42d-4325-8482-102dd2fe1e9e.png) +![everforest](https://user-images.githubusercontent.com/59060246/130129901-5e582f3e-b776-4d0c-9790-be5ae738b5a8.png) + # Very Very Useful lua plugins used in my config #### Lspkind-nvim From f7d2bacb5178f441e3d2a17bfa58140ea2891f42 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 20 Aug 2021 00:08:45 +0530 Subject: [PATCH 0593/1541] Fix theme switcher statusline reload --- lua/plugins/statusline.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/statusline.lua b/lua/plugins/statusline.lua index c884b46..f3b80c0 100644 --- a/lua/plugins/statusline.lua +++ b/lua/plugins/statusline.lua @@ -1,4 +1,4 @@ -local global_theme = "themes/" .. require("utils").load_config().ui.theme +local global_theme = "themes/" .. vim.g.nvchad_theme local colors = require(global_theme) local present1, gl = pcall(require, "galaxyline") From 5fab35f2e1c11374f0bdb885b430180ee945a37d Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 20 Aug 2021 00:21:02 +0530 Subject: [PATCH 0594/1541] utils/load_config: Implement force reload of config --- lua/utils.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lua/utils.lua b/lua/utils.lua index 483db39..73b70d4 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -264,14 +264,22 @@ M.load_config = function(reload) return _G._NVCHAD_CONFIG_CONTENTS end + local default_config = "default_config" + local config_name = vim.g.nvchad_user_config or "chadrc" + local config_file = vim.fn.stdpath "config" .. "/lua/" .. config_name .. ".lua" + + -- unload the modules if force reload + if reload then + package.loaded[default_config or false] = nil + package.loaded[config_name or false] = nil + end + -- don't enclose in pcall, it better break when default config is faulty - _G._NVCHAD_CONFIG_CONTENTS = require "default_config" + _G._NVCHAD_CONFIG_CONTENTS = require(default_config) -- user config is not required to run nvchad but a optional -- Make sure the config doesn't break the whole system if user config is not present or in bad state or not a table -- print warning texts if user config file is present - local config_name = vim.g.nvchad_user_config or "chadrc" - local config_file = vim.fn.stdpath "config" .. "/lua/" .. config_name .. ".lua" -- check if the user config is present if vim.fn.empty(vim.fn.glob(config_file)) < 1 then local present, config = pcall(require, config_name) From 3ccd804da94e57a807a84bb62b968a75add62a0a Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 20 Aug 2021 00:57:50 +0530 Subject: [PATCH 0595/1541] utils/update_nvchad: Use --rebase instead of --ff-only --- lua/utils.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/utils.lua b/lua/utils.lua index 73b70d4..387ee17 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -487,12 +487,12 @@ M.update_nvchad = function() end -- git commands that will executed, reset in case config was modfied - -- use --ff-only to not mess up if the local repo is outdated + -- use --rebase, to not mess up if the local repo is outdated local update_script = table.concat({ "git reset --hard && git pull --set-upstream", update_url, update_branch, - "--ff-only", + "--rebase", }, " ") -- open a new buffer From fd5d50f194292686af331e7103cd4a2e177ce8e5 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Fri, 20 Aug 2021 12:08:40 +1000 Subject: [PATCH 0596/1541] fix Dashboard docs, fix default_config issue --- lua/chadrc.lua | 2 +- lua/default_config.lua | 3 ++- lua/plugins/dashboard.lua | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index e9a6002..c2d7343 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -20,7 +20,7 @@ M.ui = { hidden_statusline = { -- these are filetypes, not pattern matched "NvimTree", - -- "terminal", + "terminal", }, statusline_style = "default", -- default, round , slant , block , arrow } diff --git a/lua/default_config.lua b/lua/default_config.lua index 036c4e1..3ebcaf6 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -20,7 +20,7 @@ M.ui = { hidden_statusline = { -- these are filetypes, not pattern matched "NvimTree", - "terminal", + -- "terminal", }, statusline_style = "default", -- default, round , slant , block , arrow } @@ -36,6 +36,7 @@ M.options = { timeoutlen = 400, clipboard = "unnamedplus", number = true, + -- relative numbers in normal mode tool at the bottom of options.lua relativenumber = false, numberwidth = 2, expandtab = true, diff --git a/lua/plugins/dashboard.lua b/lua/plugins/dashboard.lua index d7296c8..8ac6fd8 100644 --- a/lua/plugins/dashboard.lua +++ b/lua/plugins/dashboard.lua @@ -30,7 +30,7 @@ g.dashboard_custom_section = { c = { description = { " Find Word SPC f w" }, command = "Telescope live_grep" }, d = { description = { "洛 New File SPC f n" }, command = "DashboardNewFile" }, e = { description = { " Bookmarks SPC b m" }, command = "Telescope marks" }, - f = { description = { " Load Last Session SPC s l" }, command = "SessionLoad" }, + f = { description = { " Load Last Session SPC l" }, command = "SessionLoad" }, } g.dashboard_custom_footer = { From dbf0b560592ef08ae5a2d4722583a8ae2fe2749e Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Fri, 20 Aug 2021 15:44:31 +1000 Subject: [PATCH 0597/1541] quickfix for not properly closing unlisted buffers, should be revised again --- lua/utils.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/utils.lua b/lua/utils.lua index 387ee17..abbfcf8 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -82,6 +82,7 @@ M.close_buffer = function(bufexpr, force) local buf = vim.fn.bufnr() if vim.fn.buflisted(buf) == 0 then -- exit if buffer number is invalid + vim.cmd "close" return end From 1f6dbed26b9f42805069dea5d788d5a985e70917 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 20 Aug 2021 14:52:27 +0530 Subject: [PATCH 0598/1541] Improve hiding/showing statusline via config --- lua/chadrc.lua | 12 ++++++++---- lua/default_config.lua | 13 +++++++++---- lua/options.lua | 5 +++-- lua/utils.lua | 22 ++++++++++++++++++++++ 4 files changed, 42 insertions(+), 10 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index c2d7343..522b9e8 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -17,12 +17,16 @@ M.ui = { -- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal transparency = false, - hidden_statusline = { + -- statusline related options + statusline = { -- these are filetypes, not pattern matched - "NvimTree", - "terminal", + -- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden + hidden = {}, + shown = { + -- "terminal" + }, + style = "default", -- default, round , slant , block , arrow }, - statusline_style = "default", -- default, round , slant , block , arrow } M.options = { diff --git a/lua/default_config.lua b/lua/default_config.lua index 3ebcaf6..27da9ba 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -17,12 +17,17 @@ M.ui = { -- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal transparency = false, - hidden_statusline = { + -- statusline related options + statusline = { -- these are filetypes, not pattern matched - "NvimTree", - -- "terminal", + -- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden + hidden = { + "NvimTree", + "terminal", + }, + shown = {}, + style = "default", -- default, round , slant , block , arrow }, - statusline_style = "default", -- default, round , slant , block , arrow } M.options = { diff --git a/lua/options.lua b/lua/options.lua index e0aff03..62f4515 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -78,9 +78,10 @@ end -- Don't show any numbers inside terminals vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber ]] --- Don't show status line on certain windows vim.cmd [[ au TermOpen term://* setfiletype terminal ]] -vim.cmd [[ let hidden_statusline = luaeval('require("utils").load_config().ui.hidden_statusline') | autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * nested if index(hidden_statusline, &ft) >= 0 | set laststatus=0 | else | set laststatus=2 | endif ]] + +-- Don't show status line on certain windows +vim.cmd [[ autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * lua require("utils").hide_statusline() ]] -- Open a file from its last left off position -- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] diff --git a/lua/utils.lua b/lua/utils.lua index abbfcf8..96d5771 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -181,6 +181,28 @@ M.file = function(mode, filepath, content) return data end +-- hide statusline +-- tables fetched from load_config function +M.hide_statusline = function(values) + local hidden = require("utils").load_config().ui.statusline.hidden + local shown = require("utils").load_config().ui.statusline.shown + local api = vim.api + local buftype = api.nvim_buf_get_option("%", "ft") + + -- shown table from config has the highest priority + if vim.tbl_contains(shown, buftype) then + api.nvim_set_option("laststatus", 2) + return + end + + if vim.tbl_contains(hidden, buftype) then + api.nvim_set_option("laststatus", 0) + return + else + api.nvim_set_option("laststatus", 2) + end +end + -- return a table of available themes M.list_themes = function(return_type) local themes = {} From e15e79b5195cebaecb657cb3c04ea1355848283b Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 20 Aug 2021 15:14:15 +0530 Subject: [PATCH 0599/1541] options.lua: Merge the TermOpen autocommands --- lua/options.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/options.lua b/lua/options.lua index 62f4515..647ee3e 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -76,9 +76,7 @@ end -- vim.cmd[[ au InsertLeave * set relativenumber ]] -- Don't show any numbers inside terminals -vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber ]] - -vim.cmd [[ au TermOpen term://* setfiletype terminal ]] +vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype terminal ]] -- Don't show status line on certain windows vim.cmd [[ autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * lua require("utils").hide_statusline() ]] From 4c04160b87799518f33183a4941697425aacecc3 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 20 Aug 2021 15:23:04 +0530 Subject: [PATCH 0600/1541] dashboard: Fix alignment --- lua/plugins/dashboard.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/dashboard.lua b/lua/plugins/dashboard.lua index 8ac6fd8..4158cac 100644 --- a/lua/plugins/dashboard.lua +++ b/lua/plugins/dashboard.lua @@ -30,7 +30,7 @@ g.dashboard_custom_section = { c = { description = { " Find Word SPC f w" }, command = "Telescope live_grep" }, d = { description = { "洛 New File SPC f n" }, command = "DashboardNewFile" }, e = { description = { " Bookmarks SPC b m" }, command = "Telescope marks" }, - f = { description = { " Load Last Session SPC l" }, command = "SessionLoad" }, + f = { description = { " Load Last Session SPC l " }, command = "SessionLoad" }, } g.dashboard_custom_footer = { From b817c555426b2dc121b6556c197c58811648fda7 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 20 Aug 2021 15:53:31 +0530 Subject: [PATCH 0601/1541] mappings: Close buffer -> leader+x | Resolve #6 move theme toggle to leader+tt --- lua/default_config.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/default_config.lua b/lua/default_config.lua index 27da9ba..ed79ab1 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -154,10 +154,10 @@ M.mappings = { -- non plugin misc = { esc_Termmode = "jk", -- get out of terminal mode - close_buffer = "", -- close current focused buffer + close_buffer = "x", -- close current focused buffer copywhole_file = "", toggle_linenr = "n", -- show or hide line number - theme_toggle = "x", + theme_toggle = "tt", update_nvchad = "uu", }, } From b57cb6cdc0e5bc10f64bade182bf753eb8603dc2 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Fri, 20 Aug 2021 16:48:02 +0530 Subject: [PATCH 0602/1541] fix: fixed error of statusline. --- lua/plugins/statusline.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/statusline.lua b/lua/plugins/statusline.lua index f3b80c0..eb7ea23 100644 --- a/lua/plugins/statusline.lua +++ b/lua/plugins/statusline.lua @@ -53,7 +53,7 @@ local icon_styles = { }, } -local user_statusline_style = require("utils").load_config().ui.statusline_style +local user_statusline_style = require("utils").load_config().ui.statusline.style local statusline_style = icon_styles[user_statusline_style] local left_separator = statusline_style.left From aca43539022acd830ff3cfbc319dc452f6eb1907 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 20 Aug 2021 22:02:41 +0530 Subject: [PATCH 0603/1541] Replace personal donate links with charity stuff Many have contributed to NvChad , I would feel very bad if I get the all the donation alone. So I removed links for my paypal , buy my a coffee etc and replaced it with some gofundme links. --- README.md | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 0b401cf..3e1f342 100644 --- a/README.md +++ b/README.md @@ -152,18 +152,17 @@ It would be nice if NvChad focuses on existing plugins and config before adding -## :gift_heart: Support - -If you enjoy using NvChad and would like to show your appreciation, you may want to tip me here. - -It is never required but always appreciated. - -

- undefined - undefined - undefined -

- ## Warning I get hearings from some plugin devs that nvchad users bring issues on discourse/reddit/matrix/gh repos etc. Please dont do that :/ . Bring NvChad related issues here ONLY and dont ever bother plugin devs, THIS IS A CLEAR WARNING! 😠 + +## :gift_heart: Support + +I (siduck76) would happily accept donations but I would be upset and feel bad since Im not the only one who has worked on NvChad. NvChad has been made possible by many contributors so dividing the donations for just me feels very bad and thanks to all the plugin creators once again :'). If you enjoy using NvChad and would like to show your support trully and show your appreciation to my work then try to be a better you! Help the needy people whenever possible (in real life), do some charity.Be nice to your parents and loved ones.Do not be rude , always try to be helpful / caring to one another, stray animals. Its easier to hate now and harder to care , hate used to be rare but now you see it everywhere. Please be respectful to any software/work done by other people rather than making fun of them. Do not compare software (In a bad way). Im grateful to be even able to use neovim! But cant still be fully happy when I think there are people who barely get food to eat, starve for weeks, dont have access to proper education, comupters, basic health care facilities etc. + +The following links are some donation (gofundme) links for supporting needy people. Feel free to donate if you can : + +https://www.gofundme.com/f/WeCareAboutSyria +https://www.gofundme.com/f/Burundi-Nutrition +https://charity.gofundme.com/o/en/campaign/feedingyemen +https://www.gofundme.com/f/6p8ea-give-ghanaian-orphans-the-gift-of-a-ride-to-school From 513a2797881da1ec58fa0b52afde243b0c5c3b9b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 20 Aug 2021 22:03:25 +0530 Subject: [PATCH 0604/1541] format charity links --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3e1f342..90f2aa9 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,7 @@ I (siduck76) would happily accept donations but I would be upset and feel bad si The following links are some donation (gofundme) links for supporting needy people. Feel free to donate if you can : -https://www.gofundme.com/f/WeCareAboutSyria -https://www.gofundme.com/f/Burundi-Nutrition -https://charity.gofundme.com/o/en/campaign/feedingyemen -https://www.gofundme.com/f/6p8ea-give-ghanaian-orphans-the-gift-of-a-ride-to-school +- https://www.gofundme.com/f/WeCareAboutSyria +- https://www.gofundme.com/f/Burundi-Nutrition +- https://charity.gofundme.com/o/en/campaign/feedingyemen +- https://www.gofundme.com/f/6p8ea-give-ghanaian-orphans-the-gift-of-a-ride-to-school From 6206a9e27b36ab252775aa339270f27b26597756 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 20 Aug 2021 23:20:12 +0530 Subject: [PATCH 0605/1541] rm popup.nvim --- lua/pluginList.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 5c56855..74a1f16 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -161,10 +161,6 @@ return packer.startup(function() "nvim-lua/plenary.nvim", after = "nvim-bufferline.lua", } - use { - "nvim-lua/popup.nvim", - after = "plenary.nvim", - } use { "nvim-telescope/telescope.nvim", From b5668a037a0b25b7733b941d23c5eee5b8314391 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 21 Aug 2021 11:04:07 +0530 Subject: [PATCH 0606/1541] avoid setting root_dir for lspservers --- lua/plugins/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 8e67559..8bd087d 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -53,7 +53,7 @@ local function setup_servers() lspconfig[lang].setup { on_attach = on_attach, capabilities = capabilities, - root_dir = vim.loop.cwd, + -- root_dir = vim.loop.cwd, } elseif lang == "lua" then lspconfig[lang].setup { From cbb0ddc0a56e03e24aa222bcf1a23d1c562a8714 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 21 Aug 2021 11:23:20 +0530 Subject: [PATCH 0607/1541] clean lspconfig --- lua/plugins/lspconfig.lua | 51 +++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 8bd087d..4dc4f3f 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -9,33 +9,34 @@ local function on_attach(client, bufnr) local opts = { noremap = true, silent = true } - local function buf_set_keymap(...) - vim.api.nvim_buf_set_keymap(bufnr, ...) - end - - -- Mappings. - - buf_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) - buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) - buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()", opts) - buf_set_keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) - buf_set_keymap("n", "", "lua vim.lsp.buf.signature_help()", opts) - buf_set_keymap("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) - buf_set_keymap("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) - buf_set_keymap("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) - buf_set_keymap("n", "D", "lua vim.lsp.buf.type_definition()", opts) - buf_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", opts) - buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()", opts) - buf_set_keymap("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) - buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) - buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) - buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) + -- lsp Mappings. + vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", "lua vim.lsp.buf.declaration()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "gd", "lua vim.lsp.buf.definition()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "K", "lua vim.lsp.buf.hover()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "gi", "lua vim.lsp.buf.implementation()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "", "lua vim.lsp.buf.signature_help()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) + vim.api.nvim_buf_set_keymap( + bufnr, + "n", + "wl", + "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", + opts + ) + vim.api.nvim_buf_set_keymap(bufnr, "n", "D", "lua vim.lsp.buf.type_definition()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "rn", "lua vim.lsp.buf.rename()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "gr", "lua vim.lsp.buf.references()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) -- Set some keybinds conditional on server capabilities if client.resolved_capabilities.document_formatting then - buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "f", "lua vim.lsp.buf.formatting()", opts) elseif client.resolved_capabilities.document_range_formatting then - buf_set_keymap("n", "f", "lua vim.lsp.buf.range_formatting()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "f", "lua vim.lsp.buf.range_formatting()", opts) end end @@ -57,7 +58,6 @@ local function setup_servers() } elseif lang == "lua" then lspconfig[lang].setup { - root_dir = vim.loop.cwd, settings = { Lua = { diagnostics = { @@ -106,8 +106,7 @@ vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagn }, signs = true, underline = true, - -- set this to true if you want diagnostics to show in insert mode - update_in_insert = false, + update_in_insert = false, -- update diagnostics insert mode }) -- suppress error messages from lang servers From 83992378a4b78ce98075f2f630d8e1f52be5b64c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 21 Aug 2021 11:28:25 +0530 Subject: [PATCH 0608/1541] treesitter : keep only lua parser installed by default --- lua/plugins/treesitter.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 39c9a75..42ab87e 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -5,7 +5,6 @@ end ts_config.setup { ensure_installed = { - "bash", "lua", }, highlight = { From c60df482e9708b49be1b9f35dd85b41de866ee83 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 21 Aug 2021 13:57:15 +0530 Subject: [PATCH 0609/1541] open dir with nvim (#316) opening dir with nvim will work by default but since we have lazy loaded nvimtree , it doesnt update the cwd in nvimtree. This will fix that. --- lua/options.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/options.lua b/lua/options.lua index 647ee3e..84e1a72 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -71,6 +71,8 @@ for _, plugin in pairs(disabled_built_ins) do g["loaded_" .. plugin] = 1 end +vim.cmd [[ autocmd BufEnter * if &buftype != "terminal" | lcd %:p:h | endif ]] + -- Use relative & absolute line numbers in 'n' & 'i' modes respectively -- vim.cmd[[ au InsertEnter * set norelativenumber ]] -- vim.cmd[[ au InsertLeave * set relativenumber ]] From 18705c4da4f12dc7c335e8ab355b15d5481fe695 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 21 Aug 2021 15:45:24 +0530 Subject: [PATCH 0610/1541] fix plenary.nvim not installed (#307) --- lua/pluginList.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 74a1f16..9031c84 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -180,7 +180,6 @@ return packer.startup(function() { "sudormrfbin/cheatsheet.nvim", disable = not plugin_status.cheatsheet, - event = "VimEnter", after = "telescope.nvim", config = function() require "plugins.chadsheet" From 7a06fbb0be41f0e4982474a17ce41bd81f2ae4c1 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 21 Aug 2021 17:19:11 +0530 Subject: [PATCH 0611/1541] disable autocwd by default --- lua/options.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/options.lua b/lua/options.lua index 84e1a72..2e603c4 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -71,7 +71,8 @@ for _, plugin in pairs(disabled_built_ins) do g["loaded_" .. plugin] = 1 end -vim.cmd [[ autocmd BufEnter * if &buftype != "terminal" | lcd %:p:h | endif ]] +-- uncomment this if you want to open nvim with a dir +-- vim.cmd [[ autocmd BufEnter * if &buftype != "terminal" | lcd %:p:h | endif ]] -- Use relative & absolute line numbers in 'n' & 'i' modes respectively -- vim.cmd[[ au InsertEnter * set norelativenumber ]] From dceb6a70d42041512df8fc81587c86333a29f74c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 21 Aug 2021 17:36:55 +0530 Subject: [PATCH 0612/1541] rm mappings var from bufferline conf --- lua/plugins/bufferline.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/bufferline.lua b/lua/plugins/bufferline.lua index cd7e8b4..7ac865a 100644 --- a/lua/plugins/bufferline.lua +++ b/lua/plugins/bufferline.lua @@ -22,7 +22,6 @@ bufferline.setup { view = "multiwindow", show_buffer_close_icons = true, separator_style = "thin", - mappings = true, always_show_bufferline = true, custom_filter = function(buf_number) -- Func to filter out our managed/persistent split terms From ce5d33a93b3177295a5b3b8b11d31b8657d60384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Acu=C3=B1a?= <1724136+pacuna@users.noreply.github.com> Date: Sat, 21 Aug 2021 18:26:48 -0500 Subject: [PATCH 0613/1541] Fix installation link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 90f2aa9..59ba045 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@
Home - Install + Install Contribute From 44ae0178f4b9fa657afbb1ee742a7c2d4a6f45fa Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Sun, 22 Aug 2021 12:58:59 +0530 Subject: [PATCH 0614/1541] Change dest of bufferline since commit https://github.com/akinsho/bufferline.nvim/commit/720555e --- lua/pluginList.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 9031c84..90dfbcf 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -35,7 +35,7 @@ return packer.startup(function() end, } use { - "akinsho/nvim-bufferline.lua", + "akinsho/bufferline.nvim", disable = not plugin_status.nvim_bufferline, after = "galaxyline.nvim", config = function() @@ -159,7 +159,7 @@ return packer.startup(function() use { "nvim-lua/plenary.nvim", - after = "nvim-bufferline.lua", + after = "bufferline.nvim", } use { From 9ffddb6b524aaef2bc2b1b89f52875a452781908 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 22 Aug 2021 13:19:15 +0530 Subject: [PATCH 0615/1541] Restructure config | Move some to a packer plugin | Lot of cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * move teleacope files, updater and related utils to https://github.com/NvChad/core * restructure config file and directory structure * expose mappings for better escape * allow multiple mappings for some * improve merge table function for the same * move autocommands to a seperate file * rearrange everything alphabetically where sanely possible * rearrange packer plugin list on the basis of trigerred state config structure now . ├── init.lua ├── LICENSE ├── lua │ ├── chadrc.lua │ ├── colors │ │ ├── highlights.lua │ │ ├── init.lua │ │ └── themes │ │ ├── chadracula.lua │ │ ├── everforest.lua │ │ ├── gruvchad.lua │ │ ├── javacafe.lua │ │ ├── mountain.lua │ │ ├── norchad.lua │ │ ├── one-light.lua │ │ ├── onedark.lua │ │ ├── tokyonight.lua │ │ └── tomorrow-night.lua │ ├── core │ │ ├── autocmds.lua │ │ ├── init.lua │ │ ├── mappings.lua │ │ ├── options.lua │ │ └── utils.lua │ ├── default_config.lua │ └── plugins │ ├── configs │ │ ├── autopairs.lua │ │ ├── autosave.lua │ │ ├── bufferline.lua │ │ ├── chadsheet.lua │ │ ├── compe.lua │ │ ├── dashboard.lua │ │ ├── gitsigns.lua │ │ ├── icons.lua │ │ ├── lspconfig.lua │ │ ├── luasnip.lua │ │ ├── nvimtree.lua │ │ ├── others.lua │ │ ├── statusline.lua │ │ ├── telescope.lua │ │ ├── treesitter.lua │ │ └── zenmode.lua │ ├── init.lua │ └── packerInit.lua └── README.md --- init.lua | 14 +- lua/chadrc.lua | 264 +++++----- lua/{ => colors}/highlights.lua | 152 +++--- lua/colors/init.lua | 36 ++ lua/{ => colors}/themes/chadracula.lua | 0 lua/{ => colors}/themes/everforest.lua | 0 lua/{ => colors}/themes/gruvchad.lua | 0 lua/{ => colors}/themes/javacafe.lua | 0 lua/{ => colors}/themes/mountain.lua | 0 lua/{ => colors}/themes/norchad.lua | 0 lua/{ => colors}/themes/one-light.lua | 0 lua/{ => colors}/themes/onedark.lua | 0 lua/{ => colors}/themes/tokyonight.lua | 0 lua/{ => colors}/themes/tomorrow-night.lua | 0 lua/core/autocmds.lua | 17 + lua/core/init.lua | 15 + lua/core/mappings.lua | 202 ++++++++ lua/{ => core}/options.lua | 86 ++-- lua/core/utils.lua | 265 ++++++++++ lua/default_config.lua | 266 ++++++----- lua/mappings.lua | 188 -------- lua/plugins/chadsheet.lua | 25 - lua/plugins/{ => configs}/autopairs.lua | 2 +- lua/plugins/{ => configs}/autosave.lua | 6 +- lua/plugins/{ => configs}/bufferline.lua | 110 ++--- lua/plugins/configs/chadsheet.lua | 44 ++ lua/plugins/{ => configs}/compe.lua | 11 +- lua/plugins/{ => configs}/dashboard.lua | 2 +- lua/plugins/{ => configs}/gitsigns.lua | 24 +- lua/plugins/{ => configs}/icons.lua | 121 +++-- lua/plugins/{ => configs}/lspconfig.lua | 12 +- lua/plugins/{ => configs}/luasnip.lua | 6 +- lua/plugins/{ => configs}/nvimtree.lua | 47 +- lua/plugins/{ => configs}/others.lua | 32 +- lua/plugins/{ => configs}/statusline.lua | 37 +- lua/plugins/{ => configs}/telescope.lua | 24 +- lua/plugins/{ => configs}/treesitter.lua | 0 lua/plugins/{ => configs}/zenmode.lua | 2 +- lua/{pluginList.lua => plugins/init.lua} | 330 ++++++------- lua/{ => plugins}/packerInit.lua | 4 +- lua/telescope/_extensions/terms.lua | 143 ------ lua/telescope/_extensions/themes.lua | 142 ------ lua/theme.lua | 12 - lua/utils.lua | 531 --------------------- 44 files changed, 1383 insertions(+), 1789 deletions(-) rename lua/{ => colors}/highlights.lua (79%) create mode 100644 lua/colors/init.lua rename lua/{ => colors}/themes/chadracula.lua (100%) rename lua/{ => colors}/themes/everforest.lua (100%) rename lua/{ => colors}/themes/gruvchad.lua (100%) rename lua/{ => colors}/themes/javacafe.lua (100%) rename lua/{ => colors}/themes/mountain.lua (100%) rename lua/{ => colors}/themes/norchad.lua (100%) rename lua/{ => colors}/themes/one-light.lua (100%) rename lua/{ => colors}/themes/onedark.lua (100%) rename lua/{ => colors}/themes/tokyonight.lua (100%) rename lua/{ => colors}/themes/tomorrow-night.lua (100%) create mode 100644 lua/core/autocmds.lua create mode 100644 lua/core/init.lua create mode 100644 lua/core/mappings.lua rename lua/{ => core}/options.lua (56%) create mode 100644 lua/core/utils.lua delete mode 100644 lua/mappings.lua delete mode 100644 lua/plugins/chadsheet.lua rename lua/plugins/{ => configs}/autopairs.lua (100%) rename lua/plugins/{ => configs}/autosave.lua (85%) rename lua/plugins/{ => configs}/bufferline.lua (97%) create mode 100644 lua/plugins/configs/chadsheet.lua rename lua/plugins/{ => configs}/compe.lua (99%) rename lua/plugins/{ => configs}/dashboard.lua (95%) rename lua/plugins/{ => configs}/gitsigns.lua (99%) rename lua/plugins/{ => configs}/icons.lua (96%) rename lua/plugins/{ => configs}/lspconfig.lua (100%) rename lua/plugins/{ => configs}/luasnip.lua (100%) rename lua/plugins/{ => configs}/nvimtree.lua (99%) rename lua/plugins/{ => configs}/others.lua (91%) rename lua/plugins/{ => configs}/statusline.lua (97%) rename lua/plugins/{ => configs}/telescope.lua (86%) rename lua/plugins/{ => configs}/treesitter.lua (100%) rename lua/plugins/{ => configs}/zenmode.lua (100%) rename lua/{pluginList.lua => plugins/init.lua} (66%) rename lua/{ => plugins}/packerInit.lua (97%) delete mode 100644 lua/telescope/_extensions/terms.lua delete mode 100644 lua/telescope/_extensions/themes.lua delete mode 100644 lua/theme.lua delete mode 100644 lua/utils.lua diff --git a/init.lua b/init.lua index 6353271..08b4f10 100644 --- a/init.lua +++ b/init.lua @@ -1,12 +1,10 @@ -local chad_modules = { - "options", - "mappings", +local init_modules = { + "core", } -for i = 1, #chad_modules, 1 do - if not pcall(require, chad_modules[i]) then - error("Error loading " .. chad_modules[i] .. "\n") +for _, module in ipairs(init_modules) do + local ok, err = pcall(require, module) + if not ok then + error("Error loading " .. module .. "\n\n" .. err) end end - -require("mappings").misc() diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 522b9e8..8a35f0f 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -1,161 +1,191 @@ --- IMPORTANT NOTE : This is user config +-- IMPORTANT NOTE : This is the user config, can be edited. Will be preserved if updated with internal updater local M = {} M.ui = { + italic_comments = false, + + -- theme to be used, to see all available themes, open the theme switcher by + th theme = "onedark", - -- theme toggle - theme_toggler = false, - fav_themes = { - "onedark", - "gruvchad", + -- theme toggler, toggle between two themes, see theme_toggleer mappings + theme_toggler = { + enabled = false, + fav_themes = { + "onedark", + "gruvchad", + }, }, - italic_comments = false, -- Enable this only if your terminal has the colorscheme set which nvchad uses -- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal transparency = false, - -- statusline related options - statusline = { - -- these are filetypes, not pattern matched - -- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden - hidden = {}, - shown = { - -- "terminal" + -- plugin related ui options + plugin = { + -- statusline related options + statusline = { + -- these are filetypes, not pattern matched + -- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden + hidden = {}, + shown = { + -- "terminal" + }, + -- default, round , slant , block , arrow + style = "default", }, - style = "default", -- default, round , slant , block , arrow }, } M.options = { - permanent_undo = true, - ruler = false, + clipboard = "unnamedplus", + cmdheight = 1, + expandtab = true, hidden = true, ignorecase = true, + insert_nav = true, -- navigation in insertmode + mapleader = " ", mouse = "a", - cmdheight = 1, - updatetime = 250, - timeoutlen = 400, - clipboard = "unnamedplus", number = true, -- relative numbers in normal mode tool at the bottom of options.lua - relativenumber = false, numberwidth = 2, - expandtab = true, + permanent_undo = true, shiftwidth = 2, smartindent = true, - mapleader = " ", - autosave = false, - enable_insertNav = true, -- navigation in insertmode + timeoutlen = 400, + relativenumber = false, + ruler = false, + updatetime = 250, -- used for updater update_url = "https://github.com/NvChad/NvChad", update_branch = "main", + + -- these are plugin related options + plugin = { + autosave = false, -- autosave on changed text or insert mode leave + -- timeout to be used for using escape with a key combination, see mappings.plugin.better_escape + esc_insertmode_timeout = 300, + }, } -- enable and disable plugins (false for disable) M.plugin_status = { - -- UI - nvim_bufferline = true, - galaxyline = true, - nvim_colorizer = true, - dashboard_nvim = true, - blankline = true, - truezen_nvim = true, - better_esc = true, - -- lsp stuff - lspkind = true, - lspsignature = true, - -- git stuff - gitsigns = true, - vim_fugitive = true, - -- misc - neoformat = true, - vim_matchup = true, - autosave_nvim = true, - nvim_comment = true, - neoscroll_nvim = true, - telescope_media = true, - cheatsheet = true, + autosave = true, -- to autosave files + blankline = true, -- beautified blank lines + bufferline = true, -- buffer shown as tabs + cheatsheet = true, -- fuzzy search your commands/keymappings + colorizer = true, + comment = true, -- universal commentor + dashboard = true, -- a nice looking dashboard + esc_insertmode = true, -- escape from insert mode using custom keys + galaxyline = true, -- statusline + gitsigns = true, -- gitsigns in statusline + lspkind = true, -- lsp enhancements + lspsignature = true, -- lsp enhancements + neoformat = true, -- universal formatter + neoscroll = true, -- smooth scroll + telescope_media = true, -- see media files in telescope picker + truezen = true, -- no distraction mode for nvim + vim_fugitive = true, -- git in nvim + vim_matchup = true, -- % magic, match it but improved } -- make sure you dont use same keys twice M.mappings = { - -- plugin specific - truezen = { - ataraxisMode = "zz", - minimalisticmode = "zm", - focusmode = "zf", - }, - comment_nvim = { - comment_toggle = "/", - }, - nvimtree = { - treetoggle = "", -- file manager - }, - neoformat = { - format = "fm", - }, - dashboard = { - open = "db", - newfile = "fn", - bookmarks = "bm", - sessionload = "l", - sessionsave = "s", - }, - telescope = { - live_grep = "fw", - git_status = "gt", - git_commits = "cm", - find_files = "ff", - buffers = "fb", - help_tags = "fh", - oldfiles = "fo", - themes = "th", - }, - telescope_media = { - media_files = "fp", - }, - chadsheet = { - default_keys = "dk", - user_keys = "uk", - }, - bufferline = { - new_buffer = "", - newtab = "b", - close = "", -- close a buffer with custom func in utils.lua - cycleNext = "", -- next buffer - cyclePrev = "", -- previous buffer - }, - fugitive = { - Git = "gs", - diffget_2 = "gh", - diffget_3 = "gl", - git_blame = "gb", - }, - terms = { -- below are NvChad mappings, not plugin mappings - esc_termmode = "jk", - esc_hide_termmode = "JK", - pick_term = "W", -- note: this is a telescope extension - new_wind = "w", - new_vert = "v", - new_hori = "h", - }, - -- navigation in insert mode + -- close current focused buffer + close_buffer = "x", + copy_whole_file = "", -- copy all contents of the current buffer + + -- navigation in insert mode, only if enabled in options insert_nav = { - forward = "", backward = "", - top_of_line = "", end_of_line = "", - prev_line = "", + forward = "", next_line = "", + prev_line = "", + top_of_line = "", }, - misc = { - copywhole_file = "", - toggle_linenr = "n", -- show or hide line number - theme_toggle = "x", - update_nvchad = "uu", + + line_number_toggle = "n", -- show or hide line number + new_buffer = "", -- open a new buffer + new_tab = "b", -- open a new vim tab + save_file = "", -- save file using :w + theme_toggler = "tt", -- for theme toggler, see in ui.theme_toggler + + -- terminal related mappings + terminal = { + -- multiple mappings can be given for esc_termmode and esc_hide_termmode + -- get out of terminal mode + esc_termmode = { "jk" }, -- multiple mappings allowed + -- get out of terminal mode and hide it + -- it does not close it, see pick_term mapping to see hidden terminals + esc_hide_termmode = { "JK" }, -- multiple mappings allowed + -- show hidden terminal buffers in a telescope picker + pick_term = "W", + -- below three are for spawning terminals + new_horizontal = "h", + new_vertical = "v", + new_window = "w", + }, + + -- update nvchad from nvchad, chadness 101 + update_nvchad = "uu", + + -- all plugins related mappings + -- to get short info about a plugin, see the respective string in plugin_status, if not present, then info here + plugin = { + bufferline = { + next_buffer = "", -- next buffer + prev_buffer = "", -- previous buffer + }, + chadsheet = { + default_keys = "dk", + user_keys = "uk", + }, + comment = { + toggle = "/", -- trigger comment on a single/selected lines/number prefix + }, + dashboard = { + bookmarks = "bm", + new_file = "fn", -- basically create a new buffer + open = "db", -- open dashboard + session_load = "l", -- load a saved session + session_save = "s", -- save a session + }, + -- note: this is an edditional mapping to escape, escape key will still work + better_escape = { + esc_insertmode = { "jk" }, -- multiple mappings allowed + }, + nvimtree = { + toggle = "", -- file manager + }, + neoformat = { + format = "fm", + }, + telescope = { + buffers = "fb", + find_files = "ff", + git_commits = "cm", + git_status = "gt", + help_tags = "fh", + live_grep = "fw", + oldfiles = "fo", + themes = "th", + }, + telescope_media = { + media_files = "fp", + }, + truezen = { -- distraction free modes mapping, hide statusline, tabline, line numbers + ataraxis_mode = "zz", -- center + focus_mode = "zf", + minimalistic_mode = "zm", -- as it is + }, + vim_fugitive = { + diff_get_2 = "gh", + diff_get_3 = "gl", + git = "gs", + git_blame = "gb", + }, }, } diff --git a/lua/highlights.lua b/lua/colors/highlights.lua similarity index 79% rename from lua/highlights.lua rename to lua/colors/highlights.lua index 99e0d03..74bd77e 100644 --- a/lua/highlights.lua +++ b/lua/colors/highlights.lua @@ -1,60 +1,55 @@ local cmd = vim.cmd -local global_theme = "themes/" .. vim.g.nvchad_theme -local colors = require(global_theme) +local colors = require("colors").get() -local white = colors.white -local darker_black = colors.darker_black local black = colors.black local black2 = colors.black2 -local one_bg = colors.one_bg -local one_bg2 = colors.one_bg2 +local blue = colors.blue +local darker_black = colors.darker_black +local folder_bg = colors.folder_bg +local green = colors.green local grey = colors.grey local grey_fg = colors.grey_fg -local red = colors.red local line = colors.line -local green = colors.green local nord_blue = colors.nord_blue -local blue = colors.blue -local yellow = colors.yellow -local purple = colors.purple +local one_bg = colors.one_bg +local one_bg2 = colors.one_bg2 local pmenu_bg = colors.pmenu_bg -local folder_bg = colors.folder_bg +local purple = colors.purple +local red = colors.red +local white = colors.white +local yellow = colors.yellow --- for guifg , bg - -local function fg(group, color) - cmd("hi " .. group .. " guifg=" .. color) -end +local ui = require("core.utils").load_config().ui local function bg(group, color) cmd("hi " .. group .. " guibg=" .. color) end +local function fg(group, color) + cmd("hi " .. group .. " guifg=" .. color) +end + local function fg_bg(group, fgcol, bgcol) cmd("hi " .. group .. " guifg=" .. fgcol .. " guibg=" .. bgcol) end --- blankline - -fg("IndentBlanklineChar", line) - --- misc -- -fg("LineNr", grey) - -- Comments -local ui = require("utils").load_config().ui - if ui.italic_comments then - cmd("hi Comment gui=italic guifg=" .. grey_fg) + fg("Comment", grey_fg .. " gui=italic") else fg("Comment", grey_fg) end -fg("NvimInternalError", red) -fg("VertSplit", line) +cmd "hi clear CursorLine" -- disable cusror line +fg("cursorlinenr", white) -- line number + +-- same it bg, so it doesn't appear fg("EndOfBuffer", black) --- fg_bg("Visual",light_grey, colors.lightbg) + +-- For floating windows +fg("FloatBorder", blue) +bg("NormalFloat", one_bg) -- Pmenu bg("Pmenu", one_bg) @@ -62,74 +57,79 @@ bg("PmenuSbar", one_bg2) bg("PmenuSel", pmenu_bg) bg("PmenuThumb", nord_blue) +-- misc +fg("LineNr", grey) + +fg("NvimInternalError", red) + -- inactive statuslines as thin splitlines -cmd("hi! StatusLineNC gui=underline guifg=" .. line) +fg("StatusLineNC", line .. " gui=underline") --- line n.o -cmd "hi clear CursorLine" -fg("cursorlinenr", white) +fg("VertSplit", line) +-- fg_bg("Visual",light_grey, colors.lightbg) --- git signs --- +if ui.transparency then + bg("Normal", "NONE") + bg("Folded", "NONE") + fg("Folded", "NONE") + fg("Comment", grey) +end + +----- plugin related highlights ----- + +-- dashboard -- +fg("DashboardCenter", grey_fg) +fg("DashboardFooter", grey_fg) +fg("DashboardHeader", grey_fg) +fg("DashboardShortcut", grey_fg) + +-- git signs -- fg_bg("DiffAdd", nord_blue, "none") fg_bg("DiffChange", grey_fg, "none") fg_bg("DiffModified", nord_blue, "none") --- NvimTree -fg("NvimTreeFolderIcon", folder_bg) -fg("NvimTreeFolderName", folder_bg) -fg("NvimTreeGitDirty", red) -fg("NvimTreeOpenedFolderName", blue) -fg("NvimTreeEmptyFolderName", blue) -fg("NvimTreeIndentMarker", one_bg2) -fg("NvimTreeVertSplit", darker_black) -bg("NvimTreeVertSplit", darker_black) -fg("NvimTreeEndOfBuffer", darker_black) - -cmd("hi NvimTreeRootFolder gui=underline guifg=" .. red) -bg("NvimTreeNormal", darker_black) -fg_bg("NvimTreeStatuslineNc", darker_black, darker_black) -fg_bg("NvimTreeWindowPicker", red, black2) - --- telescope -fg("TelescopeBorder", line) -fg("TelescopePromptBorder", line) -fg("TelescopeResultsBorder", line) -fg("TelescopePreviewBorder", grey) - --- LspDiagnostics --- +-- indent blankline plugin -- +fg("IndentBlanklineChar", line) +-- LspDiagnostics -- -- error / warnings fg("LspDiagnosticsSignError", red) -fg("LspDiagnosticsVirtualTextError", red) fg("LspDiagnosticsSignWarning", yellow) +fg("LspDiagnosticsVirtualTextError", red) fg("LspDiagnosticsVirtualTextWarning", yellow) -- info fg("LspDiagnosticsSignInformation", green) fg("LspDiagnosticsVirtualTextInformation", green) --- hint +-- hints fg("LspDiagnosticsSignHint", purple) fg("LspDiagnosticsVirtualTextHint", purple) --- dashboard - -fg("DashboardHeader", grey_fg) -fg("DashboardCenter", grey_fg) -fg("DashboardShortcut", grey_fg) -fg("DashboardFooter", grey_fg) - -if require("utils").load_config().ui.transparency then - bg("Normal", "NONE") - bg("Folded", "NONE") - fg("Folded", "NONE") +-- NvimTree -- +fg("NvimTreeEmptyFolderName", blue) +fg("NvimTreeEndOfBuffer", darker_black) +fg("NvimTreeFolderIcon", folder_bg) +fg("NvimTreeFolderName", folder_bg) +fg("NvimTreeGitDirty", red) +fg("NvimTreeIndentMarker", one_bg2) +bg("NvimTreeNormal", darker_black) +fg("NvimTreeOpenedFolderName", blue) +fg("NvimTreeRootFolder", red .. " gui=underline") -- enable underline for root folder in nvim tree +fg_bg("NvimTreeStatuslineNc", darker_black, darker_black) +fg("NvimTreeVertSplit", darker_black) +bg("NvimTreeVertSplit", darker_black) +fg_bg("NvimTreeWindowPicker", red, black2) +-- disable some highlight in nvim tree if transparency enabled +if ui.transparency then bg("NvimTreeNormal", "NONE") + bg("NvimTreeStatusLineNC", "NONE") bg("NvimTreeVertSplit", "NONE") fg("NvimTreeVertSplit", grey) - bg("NvimTreeStatusLineNC", "NONE") - fg("Comment", grey) end --- For floating windows -bg("NormalFloat", one_bg) -fg("FloatBorder", blue) +-- telescope -- +fg("TelescopeBorder", line) +fg("TelescopePreviewBorder", grey) +fg("TelescopePromptBorder", line) +fg("TelescopeResultsBorder", line) diff --git a/lua/colors/init.lua b/lua/colors/init.lua new file mode 100644 index 0000000..a0d38d4 --- /dev/null +++ b/lua/colors/init.lua @@ -0,0 +1,36 @@ +local M = {} + +-- if theme given, load given theme if given, otherwise nvchad_theme +M.init = function(theme) + if not theme then + theme = require("core.utils").load_config().ui.theme + end + + -- set the global theme, used at various places like theme switcher, highlights + vim.g.nvchad_theme = theme + + local present, base16 = pcall(require, "base16") + + if present then + -- first load the base16 theme + base16(base16.themes(theme), true) + + -- unload to force reload + package.loaded["colors.highlights" or false] = nil + -- then load the highlights + require "colors.highlights" + else + return false + end +end + +-- returns a table of colors for givem or current theme +M.get = function(theme) + if not theme then + theme = vim.g.nvchad_theme + end + + return require("colors.themes." .. theme) +end + +return M diff --git a/lua/themes/chadracula.lua b/lua/colors/themes/chadracula.lua similarity index 100% rename from lua/themes/chadracula.lua rename to lua/colors/themes/chadracula.lua diff --git a/lua/themes/everforest.lua b/lua/colors/themes/everforest.lua similarity index 100% rename from lua/themes/everforest.lua rename to lua/colors/themes/everforest.lua diff --git a/lua/themes/gruvchad.lua b/lua/colors/themes/gruvchad.lua similarity index 100% rename from lua/themes/gruvchad.lua rename to lua/colors/themes/gruvchad.lua diff --git a/lua/themes/javacafe.lua b/lua/colors/themes/javacafe.lua similarity index 100% rename from lua/themes/javacafe.lua rename to lua/colors/themes/javacafe.lua diff --git a/lua/themes/mountain.lua b/lua/colors/themes/mountain.lua similarity index 100% rename from lua/themes/mountain.lua rename to lua/colors/themes/mountain.lua diff --git a/lua/themes/norchad.lua b/lua/colors/themes/norchad.lua similarity index 100% rename from lua/themes/norchad.lua rename to lua/colors/themes/norchad.lua diff --git a/lua/themes/one-light.lua b/lua/colors/themes/one-light.lua similarity index 100% rename from lua/themes/one-light.lua rename to lua/colors/themes/one-light.lua diff --git a/lua/themes/onedark.lua b/lua/colors/themes/onedark.lua similarity index 100% rename from lua/themes/onedark.lua rename to lua/colors/themes/onedark.lua diff --git a/lua/themes/tokyonight.lua b/lua/colors/themes/tokyonight.lua similarity index 100% rename from lua/themes/tokyonight.lua rename to lua/colors/themes/tokyonight.lua diff --git a/lua/themes/tomorrow-night.lua b/lua/colors/themes/tomorrow-night.lua similarity index 100% rename from lua/themes/tomorrow-night.lua rename to lua/colors/themes/tomorrow-night.lua diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua new file mode 100644 index 0000000..56306b8 --- /dev/null +++ b/lua/core/autocmds.lua @@ -0,0 +1,17 @@ +-- uncomment this if you want to open nvim with a dir +-- vim.cmd [[ autocmd BufEnter * if &buftype != "terminal" | lcd %:p:h | endif ]] + +-- Use relative & absolute line numbers in 'n' & 'i' modes respectively +-- vim.cmd[[ au InsertEnter * set norelativenumber ]] +-- vim.cmd[[ au InsertLeave * set relativenumber ]] + +-- Don't show any numbers inside terminals +vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype terminal ]] + +-- Don't show status line on certain windows +vim.cmd [[ autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * lua require("core.utils").hide_statusline() ]] + +-- Open a file from its last left off position +-- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] +-- File extension specific tabbing +-- vim.cmd [[ autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 ]] diff --git a/lua/core/init.lua b/lua/core/init.lua new file mode 100644 index 0000000..999576f --- /dev/null +++ b/lua/core/init.lua @@ -0,0 +1,15 @@ +local core_modules = { + "core.options", + "core.autocmds", + "core.mappings", +} + +for _, module in ipairs(core_modules) do + local ok, err = pcall(require, module) + if not ok then + error("Error loading " .. module .. "\n\n" .. err) + end +end + +-- set all the non plugin mappings +require("core.mappings").misc() diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua new file mode 100644 index 0000000..340fd94 --- /dev/null +++ b/lua/core/mappings.lua @@ -0,0 +1,202 @@ +local config = require("core.utils").load_config() +local maps = config.mappings +local plugin_maps = maps.plugin +local cmd = vim.cmd + +local function map(mode, lhs, rhs, opts) + local options = { noremap = true, silent = true } + if opts then + options = vim.tbl_extend("force", options, opts) + end + + -- if list of keys provided then run set for all of them + if type(lhs) == "table" then + for _, key in ipairs(lhs) do + vim.api.nvim_set_keymap(mode, key, rhs, options) + end + else + vim.api.nvim_set_keymap(mode, lhs, rhs, options) + end +end + +local opt, M = {}, {} + +-- these mappings will only be called during initialization +M.misc = function() + local function non_config_mappings() + -- dont copy any deleted text , this is disabled by default so uncomment the below mappings if you want them + -- map("n", "dd", [=[ "_dd ]=], opt) + -- map("v", "dd", [=[ "_dd ]=], opt) + -- map("v", "x", [=[ "_x ]=], opt) + -- todo: this should be configurable via chadrc + + -- Don't copy the replaced text after pasting in visual mode + map("v", "p", '"_dP', opt) + + -- Allow moving the cursor through wrapped lines with j, k, and + -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ + -- empty mode is same as using :map + map("", "j", 'v:count ? "j" : "gj"', { expr = true }) + map("", "k", 'v:count ? "k" : "gk"', { expr = true }) + map("", "", 'v:count ? "j" : "gj"', { expr = true }) + map("", "", 'v:count ? "k" : "gk"', { expr = true }) + + -- use ESC to turn off search highlighting + map("n", "", ":noh ", opt) + end + + local function optional_mappings() + -- navigation within insert mode + if config.options.insert_nav then + local inav = maps.insert_nav + + map("i", inav.backward, "", opt) + map("i", inav.end_of_line, "", opt) + map("i", inav.forward, "", opt) + map("i", inav.next_line, "", opt) + map("i", inav.prev_line, "", opt) + map("i", inav.top_of_line, "^i", opt) + end + + -- check the theme toggler + if config.ui.theme_toggler then + map( + "n", + maps.theme_toggler, + ":lua require('nvchad').toggle_theme(require('core.utils').load_config().ui.theme_toggler.fav_themes) ", + opt + ) + end + end + + local function required_mappings() + map("n", maps.close_buffer, ":lua require('core.utils').close_buffer() ", opt) -- close buffer + map("n", maps.copy_whole_file, ":%y+ ", opt) -- copy whole file content + map("n", maps.new_buffer, ":enew ", opt) -- new buffer + map("n", maps.new_tab, ":tabnew ", opt) -- new tabs + map("n", maps.line_number_toggle, ":set nu! ", opt) -- toggle numbers + map("n", maps.save_file, ":w ", opt) -- ctrl + s to save file + + -- terminal mappings -- + local term_maps = maps.terminal + -- get out of terminal mode + map("t", term_maps.esc_termmode, "", opt) + -- hide a term from within terminal mode + map("t", term_maps.esc_hide_termmode, " :lua require('core.utils').close_buffer() ", opt) + -- pick a hidden term + map("n", term_maps.pick_term, ":Telescope terms ", opt) + -- Open terminals + -- TODO this opens on top of an existing vert/hori term, fixme + map( + "n", + term_maps.new_horizontal, + ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert ", + opt + ) + map("n", term_maps.new_vertical, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert ", opt) + map("n", term_maps.new_window, ":execute 'terminal' | let b:term_type = 'wind' | startinsert ", opt) + -- terminal mappings end -- + + -- Add Packer commands because we are not loading it at startup + cmd "silent! command PackerCompile lua require 'plugins' require('packer').compile()" + cmd "silent! command PackerInstall lua require 'plugins' require('packer').install()" + cmd "silent! command PackerStatus lua require 'plugins' require('packer').status()" + cmd "silent! command PackerSync lua require 'plugins' require('packer').sync()" + cmd "silent! command PackerUpdate lua require 'plugins' require('packer').update()" + + -- add NvChadUpdate command and mapping + cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" + map("n", maps.update_nvchad, ":NvChadUpdate ", opt) + end + + non_config_mappings() + optional_mappings() + required_mappings() +end + +-- below are all plugin related mappinsg + +M.better_escape = function() + vim.g.better_escape_shortcut = plugin_maps.better_escape.esc_insertmode or { "" } +end + +M.bufferline = function() + local m = plugin_maps.bufferline + + map("n", m.next_buffer, ":BufferLineCycleNext ", opt) + map("n", m.prev_buffer, ":BufferLineCyclePrev ", opt) +end + +M.chadsheet = function() + local m = plugin_maps.chadsheet + + map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope() ", opt) + map( + "n", + m.user_keys, + ":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false } ", + opt + ) +end + +M.comment = function() + local m = plugin_maps.comment.toggle + map("n", m, ":CommentToggle ", opt) + map("v", m, ":CommentToggle ", opt) +end + +M.dashboard = function() + local m = plugin_maps.dashboard + + map("n", m.bookmarks, ":DashboardJumpMarks ", opt) + map("n", m.new_file, ":DashboardNewFile ", opt) + map("n", m.open, ":Dashboard ", opt) + map("n", m.session_load, ":SessionLoad ", opt) + map("n", m.session_save, ":SessionSave ", opt) +end + +M.nvimtree = function() + map("n", plugin_maps.nvimtree.toggle, ":NvimTreeToggle ", opt) +end + +M.neoformat = function() + map("n", plugin_maps.neoformat.format, ":Neoformat ", opt) +end + +M.telescope = function() + local m = plugin_maps.telescope + + map("n", m.buffers, ":Telescope buffers ", opt) + map("n", m.find_files, ":Telescope find_files ", opt) + map("n", m.git_commits, ":Telescope git_commits ", opt) + map("n", m.git_status, ":Telescope git_status ", opt) + map("n", m.help_tags, ":Telescope help_tags ", opt) + map("n", m.live_grep, ":Telescope live_grep ", opt) + map("n", m.oldfiles, ":Telescope oldfiles ", opt) + map("n", m.themes, ":Telescope themes ", opt) +end + +M.telescope_media = function() + local m = plugin_maps.telescope_media + + map("n", m.media_files, ":Telescope media_files ", opt) +end + +M.truezen = function() + local m = plugin_maps.truezen + + map("n", m.ataraxis_mode, ":TZAtaraxis ", opt) + map("n", m.focus_mode, ":TZFocus ", opt) + map("n", m.minimalistic_mode, ":TZMinimalist ", opt) +end + +M.vim_fugitive = function() + local m = plugin_maps.vim_fugitive + + map("n", m.git, ":Git ", opt) + map("n", m.git_blame, ":Git blame ", opt) + map("n", m.diff_get_2, ":diffget //2 ", opt) + map("n", m.diff_get_3, ":diffget //3 ", opt) +end + +return M diff --git a/lua/options.lua b/lua/core/options.lua similarity index 56% rename from lua/options.lua rename to lua/core/options.lua index 2e603c4..5882103 100644 --- a/lua/options.lua +++ b/lua/core/options.lua @@ -4,87 +4,71 @@ local g = vim.g -- export user config as a global varibale g.nvchad_user_config = "chadrc" -local options = require("utils").load_config().options +local options = require("core.utils").load_config().options -opt.completeopt = { "menuone", "noselect" } -opt.undofile = options.permanent_undo -opt.ruler = options.ruler -opt.hidden = options.hidden -opt.ignorecase = options.ignorecase -opt.splitbelow = true -opt.splitright = true -opt.termguicolors = true -opt.cul = true -opt.mouse = options.mouse -opt.signcolumn = "yes" -opt.cmdheight = options.cmdheight -opt.updatetime = options.updatetime -- update interval for gitsigns -opt.timeoutlen = options.timeoutlen opt.clipboard = options.clipboard +opt.cmdheight = options.cmdheight +opt.completeopt = { "menuone", "noselect" } +opt.cul = true -- cursor line --- disable nvim intro -opt.shortmess:append "sI" +-- Indentline +opt.expandtab = options.expandtab +opt.shiftwidth = options.shiftwidth +opt.smartindent = options.smartindent -- disable tilde on end of buffer: https://github.com/ neovim/neovim/pull/8546#issuecomment-643643758 opt.fillchars = { eob = " " } +opt.hidden = options.hidden +opt.ignorecase = options.ignorecase +opt.mouse = options.mouse + -- Numbers opt.number = options.number opt.numberwidth = options.numberwidth opt.relativenumber = options.relativenumber +opt.ruler = options.ruler --- Indenline -opt.expandtab = options.expandtab -opt.shiftwidth = options.shiftwidth -opt.smartindent = options.smartindent +-- disable nvim intro +opt.shortmess:append "sI" +opt.signcolumn = "yes" +opt.splitbelow = true +opt.splitright = true +opt.termguicolors = true +opt.timeoutlen = options.timeoutlen +opt.undofile = options.permanent_undo + +-- interval for writing swap file to disk, also used by gitsigns +opt.updatetime = options.updatetime -- go to previous/next line with h,l,left arrow and right arrow -- when cursor reaches end/beginning of line opt.whichwrap:append "<>hl" g.mapleader = options.mapleader -g.auto_save = options.autosave --- disable builtin vim plugins +-- disable some builtin vim plugins local disabled_built_ins = { + "2html_plugin", + "getscript", + "getscriptPlugin", + "gzip", + "logipat", "netrw", "netrwPlugin", "netrwSettings", "netrwFileHandlers", - "gzip", - "zip", - "zipPlugin", + "matchit", "tar", "tarPlugin", - "getscript", - "getscriptPlugin", - "vimball", - "vimballPlugin", - "2html_plugin", - "logipat", "rrhelper", "spellfile_plugin", - "matchit", + "vimball", + "vimballPlugin", + "zip", + "zipPlugin", } for _, plugin in pairs(disabled_built_ins) do g["loaded_" .. plugin] = 1 end - --- uncomment this if you want to open nvim with a dir --- vim.cmd [[ autocmd BufEnter * if &buftype != "terminal" | lcd %:p:h | endif ]] - --- Use relative & absolute line numbers in 'n' & 'i' modes respectively --- vim.cmd[[ au InsertEnter * set norelativenumber ]] --- vim.cmd[[ au InsertLeave * set relativenumber ]] - --- Don't show any numbers inside terminals -vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype terminal ]] - --- Don't show status line on certain windows -vim.cmd [[ autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * lua require("utils").hide_statusline() ]] - --- Open a file from its last left off position --- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] --- File extension specific tabbing --- vim.cmd [[ autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 ]] diff --git a/lua/core/utils.lua b/lua/core/utils.lua new file mode 100644 index 0000000..cafd1e3 --- /dev/null +++ b/lua/core/utils.lua @@ -0,0 +1,265 @@ +local M = {} + +M.close_buffer = function(bufexpr, force) + -- This is a modification of a NeoVim plugin from + -- Author: ojroques - Olivier Roques + -- Src: https://github.com/ojroques/nvim-bufdel + -- (Author has okayed copy-paste) + + -- Options + local opts = { + next = "cycle", -- how to retrieve the next buffer + quit = false, -- exit when last buffer is deleted + --TODO make this a chadrc flag/option + } + + -- ---------------- + -- Helper functions + -- ---------------- + + -- Switch to buffer 'buf' on each window from list 'windows' + local function switch_buffer(windows, buf) + local cur_win = vim.fn.winnr() + for _, winid in ipairs(windows) do + vim.cmd(string.format("%d wincmd w", vim.fn.win_id2win(winid))) + vim.cmd(string.format("buffer %d", buf)) + end + vim.cmd(string.format("%d wincmd w", cur_win)) -- return to original window + end + + -- Select the first buffer with a number greater than given buffer + local function get_next_buf(buf) + local next = vim.fn.bufnr "#" + if opts.next == "alternate" and vim.fn.buflisted(next) == 1 then + return next + end + for i = 0, vim.fn.bufnr "$" - 1 do + next = (buf + i) % vim.fn.bufnr "$" + 1 -- will loop back to 1 + if vim.fn.buflisted(next) == 1 then + return next + end + end + end + + -- ---------------- + -- End helper functions + -- ---------------- + + local buf = vim.fn.bufnr() + if vim.fn.buflisted(buf) == 0 then -- exit if buffer number is invalid + vim.cmd "close" + return + end + + if #vim.fn.getbufinfo { buflisted = 1 } < 2 then + if opts.quit then + -- exit when there is only one buffer left + if force then + vim.cmd "qall!" + else + vim.cmd "confirm qall" + end + return + end + + local chad_term, type = pcall(function() + return vim.api.nvim_buf_get_var(buf, "term_type") + end) + + if chad_term then + -- Must be a window type + vim.cmd(string.format("setlocal nobl", buf)) + vim.cmd "enew" + return + end + -- don't exit and create a new empty buffer + vim.cmd "enew" + vim.cmd "bp" + end + + local next_buf = get_next_buf(buf) + local windows = vim.fn.getbufinfo(buf)[1].windows + + -- force deletion of terminal buffers to avoid the prompt + if force or vim.fn.getbufvar(buf, "&buftype") == "terminal" then + local chad_term, type = pcall(function() + return vim.api.nvim_buf_get_var(buf, "term_type") + end) + + -- TODO this scope is error prone, make resilient + if chad_term then + if type == "wind" then + -- hide from bufferline + vim.cmd(string.format("%d bufdo setlocal nobl", buf)) + -- swtich to another buff + -- TODO switch to next bufffer, this works too + vim.cmd "BufferLineCycleNext" + else + local cur_win = vim.fn.winnr() + -- we can close this window + vim.cmd(string.format("%d wincmd c", cur_win)) + return + end + else + switch_buffer(windows, next_buf) + vim.cmd(string.format("bd! %d", buf)) + end + else + switch_buffer(windows, next_buf) + vim.cmd(string.format("silent! confirm bd %d", buf)) + end + -- revert buffer switches if user has canceled deletion + if vim.fn.buflisted(buf) == 1 then + switch_buffer(windows, buf) + end +end + +-- hide statusline +-- tables fetched from load_config function +M.hide_statusline = function() + local hidden = require("core.utils").load_config().ui.plugin.statusline.hidden + local shown = require("core.utils").load_config().ui.plugin.statusline.shown + local api = vim.api + local buftype = api.nvim_buf_get_option("%", "ft") + + -- shown table from config has the highest priority + if vim.tbl_contains(shown, buftype) then + api.nvim_set_option("laststatus", 2) + return + end + + if vim.tbl_contains(hidden, buftype) then + api.nvim_set_option("laststatus", 0) + return + else + api.nvim_set_option("laststatus", 2) + end +end + +-- Base code: https://gist.github.com/revolucas/184aec7998a6be5d2f61b984fac1d7f7 +-- Changes over it: preserving table 1 contents and also update with table b, without duplicating +-- 1st arg - base table +-- 2nd arg - table to merge +-- 3rg arg - list of nodes as a table, if the node is found replace the from table2 to result, rather than adding the value +-- e.g: merge_table(t1, t2, { ['plugin']['truezen']['mappings'] }) +M.merge_table = function(into, from, nodes_to_replace) + -- make sure both are table + if type(into) ~= "table" or type(from) ~= "table" then + return into + end + + local stack, seen = {}, {} + local table1, table2 = into, from + + if type(nodes_to_replace) == "table" then + -- function that will be executed with loadstring + local base_fn = [[ +return function(table1, table2) + local t1, t2 = table1_node or false , table2_node or false + if t1 and t2 then + table1_node = table2_node + end + return table1 +end]] + for _, node in ipairs(nodes_to_replace) do + -- replace the _node in base_fn to actual given node value + local fn = base_fn:gsub("_node", node) + -- if the node if found, it is replaced, otherwise table 1 is returned + table1 = loadstring(fn)()(table1, table2) + end + end + + while true do + for k, v in pairs(table2) do + if type(v) == "table" and type(table1[k]) == "table" then + table.insert(stack, { table1[k], table2[k] }) + else + local present = seen[v] or false + if not present then + if type(k) == "number" then + -- add the value to seen table until value is found + -- only do when key is number we just want to append to subtables + -- todo: maybe improve this + + for _, value in pairs(table1) do + if value == v then + present = true + break + end + end + seen[v] = true + if not present then + table1[#table1 + 1] = v + end + else + table1[k] = v + end + end + end + end + if #stack > 0 then + local t = stack[#stack] + table1, table2 = t[1], t[2] + stack[#stack] = nil + else + break + end + end + return into +end + +-- load config +-- 1st arg = boolean - whether to force reload +-- Modifies _G._NVCHAD_CONFIG global variable +M.load_config = function(reload) + -- only do the stuff below one time, otherwise just return the set config + if _G._NVCHAD_CONFIG_CONTENTS ~= nil and not (reload or false) then + return _G._NVCHAD_CONFIG_CONTENTS + end + + -- these are the table value which will be always prioritiezed to take user config value + local to_replace = { + "['mappings']['plugin']['esc_insertmode']", + "['mappings']['terminal']['esc_termmode']", + "['mappings']['terminal']['esc_hide_termmode']", + } + + local default_config = "default_config" + local config_name = vim.g.nvchad_user_config or "chadrc" + local config_file = vim.fn.stdpath "config" .. "/lua/" .. config_name .. ".lua" + + -- unload the modules if force reload + if reload then + package.loaded[default_config or false] = nil + package.loaded[config_name or false] = nil + end + + -- don't enclose in pcall, it better break when default config is faulty + _G._NVCHAD_CONFIG_CONTENTS = require(default_config) + + -- user config is not required to run nvchad but a optional + -- Make sure the config doesn't break the whole system if user config is not present or in bad state or not a table + -- print warning texts if user config file is present + -- check if the user config is present + if vim.fn.empty(vim.fn.glob(config_file)) < 1 then + local present, config = pcall(require, config_name) + if present then + -- make sure the returned value is table + if type(config) == "table" then + -- data = require(config_name) + _G._NVCHAD_CONFIG_CONTENTS = require("core.utils").merge_table( + _G._NVCHAD_CONFIG_CONTENTS, + config, + to_replace + ) + else + print("Warning: " .. config_name .. " sourced successfully but did not return a lua table.") + end + else + print("Warning: " .. config_file .. " is present but sourcing failed.") + end + end + return _G._NVCHAD_CONFIG_CONTENTS +end + +return M diff --git a/lua/default_config.lua b/lua/default_config.lua index ed79ab1..c744f8f 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -3,162 +3,190 @@ local M = {} M.ui = { + italic_comments = false, + + -- theme to be used, to see all available themes, open the theme switcher by + th theme = "onedark", - -- theme toggle - theme_toggler = false, - fav_themes = { - "onedark", - "gruvchad", + -- theme toggler, toggle between two themes, see theme_toggleer mappings + theme_toggler = { + enabled = false, + fav_themes = { + "onedark", + "gruvchad", + }, }, - italic_comments = false, -- Enable this only if your terminal has the colorscheme set which nvchad uses -- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal transparency = false, - -- statusline related options - statusline = { - -- these are filetypes, not pattern matched - -- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden - hidden = { - "NvimTree", - "terminal", + -- plugin related ui options + plugin = { + -- statusline related options + statusline = { + -- these are filetypes, not pattern matched + -- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden + hidden = { + "NvimTree", + "terminal", + }, + shown = {}, + -- default, round , slant , block , arrow + style = "default", }, - shown = {}, - style = "default", -- default, round , slant , block , arrow }, } M.options = { - permanent_undo = true, - ruler = false, + clipboard = "unnamedplus", + cmdheight = 1, + expandtab = true, hidden = true, ignorecase = true, + insert_nav = true, -- navigation in insertmode + mapleader = " ", mouse = "a", - cmdheight = 1, - updatetime = 250, - timeoutlen = 400, - clipboard = "unnamedplus", number = true, -- relative numbers in normal mode tool at the bottom of options.lua - relativenumber = false, numberwidth = 2, - expandtab = true, + permanent_undo = true, shiftwidth = 2, smartindent = true, - mapleader = " ", - autosave = false, - enable_insertNav = true, -- navigation in insertmode + timeoutlen = 400, + relativenumber = false, + ruler = false, + updatetime = 250, -- used for updater update_url = "https://github.com/NvChad/NvChad", update_branch = "main", + + -- these are plugin related options + plugin = { + autosave = false, -- autosave on changed text or insert mode leave + -- timeout to be used for using escape with a key combination, see mappings.plugin.better_escape + esc_insertmode_timeout = 300, + }, } -- enable and disable plugins (false for disable) M.plugin_status = { - -- UI - nvim_bufferline = true, - galaxyline = true, - nvim_colorizer = true, - dashboard_nvim = true, - blankline = true, - truezen_nvim = true, - better_esc = true, - -- lsp stuff - lspkind = true, - lspsignature = true, - -- git stuff - gitsigns = true, - vim_fugitive = true, - -- misc - neoformat = true, - vim_matchup = true, - autosave_nvim = true, - nvim_comment = true, - neoscroll_nvim = true, - telescope_media = true, - cheatsheet = true, + autosave = true, -- to autosave files + blankline = true, -- beautified blank lines + bufferline = true, -- buffer shown as tabs + cheatsheet = true, -- fuzzy search your commands/keymappings + colorizer = true, + comment = true, -- universal commentor + dashboard = true, -- a nice looking dashboard + esc_insertmode = true, -- escape from insert mode using custom keys + galaxyline = true, -- statusline + gitsigns = true, -- gitsigns in statusline + lspkind = true, -- lsp enhancements + lspsignature = true, -- lsp enhancements + neoformat = true, -- universal formatter + neoscroll = true, -- smooth scroll + telescope_media = true, -- see media files in telescope picker + truezen = true, -- no distraction mode for nvim + vim_fugitive = true, -- git in nvim + vim_matchup = true, -- % magic, match it but improved } -- make sure you dont use same keys twice M.mappings = { - -- plugin specific - truezen = { - ataraxisMode = "zz", - minimalisticmode = "zm", - focusmode = "zf", - }, - comment_nvim = { - comment_toggle = "/", - }, - nvimtree = { - treetoggle = "", -- file manager - }, - neoformat = { - format = "fm", - }, - dashboard = { - open = "db", - newfile = "fn", - bookmarks = "bm", - sessionload = "l", - sessionsave = "s", - }, - telescope = { - live_grep = "fw", - git_status = "gt", - git_commits = "cm", - find_files = "ff", - buffers = "fb", - help_tags = "fh", - oldfiles = "fo", - themes = "th", - }, - telescope_media = { - media_files = "fp", - }, - chadsheet = { - default_keys = "dk", - user_keys = "uk", - }, - bufferline = { - new_buffer = "", - newtab = "b", - close = "", -- close a buffer with custom func in utils.lua - cycleNext = "", -- next buffer - cyclePrev = "", -- previous buffer - }, - fugitive = { - Git = "gs", - diffget_2 = "gh", - diffget_3 = "gl", - git_blame = "gb", - }, - terms = { -- below are NvChad mappings, not plugin mappings - esc_termmode = "jk", - esc_hide_termmode = "JK", - pick_term = "W", -- note: this is a telescope extension - new_wind = "w", - new_vert = "v", - new_hori = "h", - }, -- navigation in insert mode + -- close current focused buffer + close_buffer = "x", + copy_whole_file = "", -- copy all contents of the current buffer + + -- navigation in insert mode, only if enabled in options insert_nav = { - forward = "", backward = "", - top_of_line = "", end_of_line = "", - prev_line = "", + forward = "", next_line = "", + prev_line = "", + top_of_line = "", }, - -- non plugin - misc = { - esc_Termmode = "jk", -- get out of terminal mode - close_buffer = "x", -- close current focused buffer - copywhole_file = "", - toggle_linenr = "n", -- show or hide line number - theme_toggle = "tt", - update_nvchad = "uu", + + line_number_toggle = "n", -- show or hide line number + new_buffer = "", -- open a new buffer + new_tab = "b", -- open a new vim tab + save_file = "", -- save file using :w + theme_toggler = "tt", -- for theme toggler, see in ui.theme_toggler + + -- terminal related mappings + terminal = { + -- multiple mappings can be given for esc_termmode and esc_hide_termmode + -- get out of terminal mode + esc_termmode = { "jk" }, -- multiple mappings allowed + -- get out of terminal mode and hide it + -- it does not close it, see pick_term mapping to see hidden terminals + esc_hide_termmode = { "JK" }, -- multiple mappings allowed + -- show hidden terminal buffers in a telescope picker + pick_term = "W", + -- below three are for spawning terminals + new_horizontal = "h", + new_vertical = "v", + new_window = "w", + }, + + -- update nvchad from nvchad, chadness 101 + update_nvchad = "uu", + + -- all plugins related mappings + -- to get short info about a plugin, see the respective string in plugin_status, if not present, then info here + plugin = { + bufferline = { + next_buffer = "", -- next buffer + prev_buffer = "", -- previous buffer + }, + chadsheet = { + default_keys = "dk", + user_keys = "uk", + }, + comment = { + toggle = "/", -- trigger comment on a single/selected lines/number prefix + }, + dashboard = { + bookmarks = "bm", + new_file = "fn", -- basically create a new buffer + open = "db", -- open dashboard + session_load = "l", -- load a saved session + session_save = "s", -- save a session + }, + -- note: this is an edditional mapping to escape, escape key will still work + better_escape = { + esc_insertmode = { "jk" }, -- multiple mappings allowed + }, + nvimtree = { + toggle = "", -- file manager + }, + neoformat = { + format = "fm", + }, + telescope = { + buffers = "fb", + find_files = "ff", + git_commits = "cm", + git_status = "gt", + help_tags = "fh", + live_grep = "fw", + oldfiles = "fo", + themes = "th", + }, + telescope_media = { + media_files = "fp", + }, + truezen = { -- distraction free modes mapping, hide statusline, tabline, line numbers + ataraxis_mode = "zz", -- center + focus_mode = "zf", + minimalistic_mode = "zm", -- as it is + }, + vim_fugitive = { + diff_get_2 = "gh", + diff_get_3 = "gl", + git = "gs", + git_blame = "gb", + }, }, } diff --git a/lua/mappings.lua b/lua/mappings.lua deleted file mode 100644 index 9be5fde..0000000 --- a/lua/mappings.lua +++ /dev/null @@ -1,188 +0,0 @@ -local user_map = require("utils").load_config().mappings -local miscMap = user_map.misc - -local cmd = vim.cmd - -local function map(mode, lhs, rhs, opts) - local options = { noremap = true, silent = true } - if opts then - options = vim.tbl_extend("force", options, opts) - end - vim.api.nvim_set_keymap(mode, lhs, rhs, options) -end - -local M = {} -local opt = {} - --- these mappings will only be called during initialization -M.misc = function() - -- dont copy any deleted text , this is disabled by default so uncomment the below mappings if you want them - -- map("n", "dd", [=[ "_dd ]=], opt) - -- map("v", "dd", [=[ "_dd ]=], opt) - -- map("v", "x", [=[ "_x ]=], opt) - -- todo: this should be configurable via chadrc - - -- Don't copy the replaced text after pasting in visual mode - map("v", "p", '"_dP', opt) - - -- Allow moving the cursor through wrapped lines with j, k, and - -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ - -- empty mode is same as using :map - map("", "j", 'v:count ? "j" : "gj"', { expr = true }) - map("", "k", 'v:count ? "k" : "gk"', { expr = true }) - map("", "", 'v:count ? "j" : "gj"', { expr = true }) - map("", "", 'v:count ? "k" : "gk"', { expr = true }) - - -- copy whole file content - map("n", miscMap.copywhole_file, ":%y+", opt) - - -- toggle numbers - map("n", miscMap.toggle_linenr, ":set nu!", opt) - - -- terminals - local function terms() - local m = user_map.terms - - -- get out of terminal mode - map("t", m.esc_termmode, "", opt) - -- hide a term from within terminal mode - map("t", m.esc_hide_termmode, " :lua require('utils').close_buffer() ", opt) - -- pick a hidden term - map("n", m.pick_term, ":Telescope terms ", opt) - - -- Open terminals - -- TODO this opens on top of an existing vert/hori term, fixme - map("n", m.new_wind, ":execute 'terminal' | let b:term_type = 'wind' | startinsert ", opt) - map("n", m.new_vert, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert ", opt) - map("n", m.new_hori, ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert ", opt) - end - terms() - - -- ctrl + s to save file - map("n", "", ":w ", opt) - - -- use ESC to turn off search highlighting - map("n", "", ":noh", opt) - - -- navigation within insert mode - local check_insertNav = require("utils").load_config().options.enable_insertNav - - if check_insertNav == true then - local m = user_map.insert_nav - - map("i", m.forward, "", opt) - map("i", m.backward, "", opt) - map("i", m.top_of_line, "^i", opt) - map("i", m.end_of_line, "", opt) - map("i", m.next_line, "", opt) - map("i", m.prev_line, "", opt) - end - - -- check the theme toggler - local theme_toggler = require("utils").load_config().ui.theme_toggler - if theme_toggler == true then - local m = user_map.misc.theme_toggle - - map("n", m, ":lua require('utils').toggle_theme(require('utils').load_config().ui.fav_themes)", opt) - end - - -- Packer commands till because we are not loading it at startup - cmd "silent! command PackerCompile lua require 'pluginList' require('packer').compile()" - cmd "silent! command PackerInstall lua require 'pluginList' require('packer').install()" - cmd "silent! command PackerStatus lua require 'pluginList' require('packer').status()" - cmd "silent! command PackerSync lua require 'pluginList' require('packer').sync()" - cmd "silent! command PackerUpdate lua require 'pluginList' require('packer').update()" - - -- add NvChadUpdate command and mapping - cmd "silent! command! NvChadUpdate lua require('utils').update_nvchad()" - map("n", user_map.misc.update_nvchad, ":NvChadUpdate", opt) -end - -M.bufferline = function() - local m = user_map.bufferline - - map("n", m.new_buffer, ":enew", opt) -- new buffer - map("n", m.newtab, ":tabnew", opt) -- new tab - map("n", m.close, ":lua require('utils').close_buffer() ", opt) -- close buffer - - -- move between tabs - - map("n", m.cycleNext, ":BufferLineCycleNext", opt) - map("n", m.cyclePrev, ":BufferLineCyclePrev", opt) -end - -M.chadsheet = function() - local m = user_map.chadsheet - - map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope()", opt) - map( - "n", - m.user_keys, - ":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false }", - opt - ) -end - -M.comment_nvim = function() - local m = user_map.comment_nvim.comment_toggle - map("n", m, ":CommentToggle", opt) - map("v", m, ":CommentToggle", opt) -end - -M.dashboard = function() - local m = user_map.dashboard - - map("n", m.open, ":Dashboard", opt) - map("n", m.newfile, ":DashboardNewFile", opt) - map("n", m.bookmarks, ":DashboardJumpMarks", opt) - map("n", m.sessionload, ":SessionLoad", opt) - map("n", m.sessionsave, ":SessionSave", opt) -end - -M.fugitive = function() - local m = user_map.fugitive - - map("n", m.Git, ":Git", opt) - map("n", m.diffget_2, ":diffget //2", opt) - map("n", m.diffget_3, ":diffget //3", opt) - map("n", m.git_blame, ":Git blame", opt) -end - -M.nvimtree = function() - local m = user_map.nvimtree.treetoggle - - map("n", m, ":NvimTreeToggle", opt) -end - -M.neoformat = function() - local m = user_map.neoformat.format - map("n", m, ":Neoformat", opt) -end - -M.truezen = function() - local m = user_map.truezen - - map("n", m.ataraxisMode, ":TZAtaraxis", opt) - map("n", m.minimalisticmode, ":TZMinimalist", opt) - map("n", m.focusmode, ":TZFocus", opt) -end - -M.telescope = function() - local m = user_map.telescope - - map("n", m.live_grep, ":Telescope live_grep", opt) - map("n", m.git_status, ":Telescope git_status ", opt) - map("n", m.git_commits, ":Telescope git_commits ", opt) - map("n", m.find_files, ":Telescope find_files ", opt) - map("n", m.buffers, ":Telescope buffers", opt) - map("n", m.help_tags, ":Telescope help_tags", opt) - map("n", m.oldfiles, ":Telescope oldfiles", opt) - map("n", m.themes, ":Telescope themes", opt) -end - -M.telescope_media = function() - local m = user_map.telescope_media - map("n", m.media_files, ":Telescope media_files ", opt) -end - -return M diff --git a/lua/plugins/chadsheet.lua b/lua/plugins/chadsheet.lua deleted file mode 100644 index 21862c1..0000000 --- a/lua/plugins/chadsheet.lua +++ /dev/null @@ -1,25 +0,0 @@ -local present, chadsheet = pcall(require, "cheatsheet") - -if not present then - return -end - -local mappings = require("utils").load_config().mappings - --- add user mappings to the cheetsheet -for section, data in pairs(mappings) do - for description, keymap in pairs(data) do - chadsheet.add_cheat(description, keymap, section) - end -end - -require("cheatsheet").setup { - - bundled_cheatsheets = { - enabled = { "default" }, - disabled = { "unicode", "nerd-fonts" }, - }, - - bundled_plugin_cheatsheets = false, - include_only_installed_plugins = true, -} diff --git a/lua/plugins/autopairs.lua b/lua/plugins/configs/autopairs.lua similarity index 100% rename from lua/plugins/autopairs.lua rename to lua/plugins/configs/autopairs.lua index 333a852..921307a 100644 --- a/lua/plugins/autopairs.lua +++ b/lua/plugins/configs/autopairs.lua @@ -7,6 +7,6 @@ end autopairs.setup() autopairs_completion.setup { - map_cr = true, map_complete = true, -- insert () func completion + map_cr = true, } diff --git a/lua/plugins/autosave.lua b/lua/plugins/configs/autosave.lua similarity index 85% rename from lua/plugins/autosave.lua rename to lua/plugins/configs/autosave.lua index 4041401..2f41ff7 100644 --- a/lua/plugins/autosave.lua +++ b/lua/plugins/configs/autosave.lua @@ -5,7 +5,7 @@ if not present then end autosave.setup { - enabled = vim.g.auto_save, -- takes boolean value from init.lua + enabled = vim.g.auto_save or false, -- takes boolean value from init.lua execution_message = "autosaved at : " .. vim.fn.strftime "%H:%M:%S", events = { "InsertLeave", "TextChanged" }, conditions = { @@ -13,7 +13,7 @@ autosave.setup { filetype_is_not = {}, modifiable = true, }, - write_all_buffers = false, - on_off_commands = true, clean_command_line_interval = 2500, + on_off_commands = true, + write_all_buffers = false, } diff --git a/lua/plugins/bufferline.lua b/lua/plugins/configs/bufferline.lua similarity index 97% rename from lua/plugins/bufferline.lua rename to lua/plugins/configs/bufferline.lua index 7ac865a..8441bf0 100644 --- a/lua/plugins/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -1,5 +1,4 @@ -local global_theme = "themes/" .. vim.g.nvchad_theme -local colors = require(global_theme) +local colors = require("colors").get() local present, bufferline = pcall(require, "bufferline") if not present then @@ -43,24 +42,71 @@ bufferline.setup { end, }, highlights = { - fill = { - guifg = colors.grey_fg, - guibg = colors.black2, - }, background = { guifg = colors.grey_fg, guibg = colors.black2, }, + -- buffers - buffer_visible = { - guifg = colors.light_grey, - guibg = colors.black2, - }, buffer_selected = { guifg = colors.white, guibg = colors.black, gui = "bold", }, + buffer_visible = { + guifg = colors.light_grey, + guibg = colors.black2, + }, + + -- close buttons + close_button = { + guifg = colors.light_grey, + guibg = colors.black2, + }, + close_button_visible = { + guifg = colors.light_grey, + guibg = colors.black2, + }, + close_button_selected = { + guifg = colors.red, + guibg = colors.black, + }, + fill = { + guifg = colors.grey_fg, + guibg = colors.black2, + }, + indicator_selected = { + guifg = colors.black, + guibg = colors.black, + }, + + -- modified + modified = { + guifg = colors.red, + guibg = colors.black2, + }, + modified_visible = { + guifg = colors.red, + guibg = colors.black2, + }, + modified_selected = { + guifg = colors.green, + guibg = colors.black, + }, + + -- separators + separator = { + guifg = colors.black2, + guibg = colors.black2, + }, + separator_visible = { + guifg = colors.black2, + guibg = colors.black2, + }, + separator_selected = { + guifg = colors.black2, + guibg = colors.black2, + }, -- tabs tab = { guifg = colors.light_grey, @@ -74,49 +120,5 @@ bufferline.setup { guifg = colors.red, guibg = colors.black, }, - indicator_selected = { - guifg = colors.black, - guibg = colors.black, - }, - -- separators - separator = { - guifg = colors.black2, - guibg = colors.black2, - }, - separator_visible = { - guifg = colors.black2, - guibg = colors.black2, - }, - separator_selected = { - guifg = colors.black2, - guibg = colors.black2, - }, - -- modified - modified = { - guifg = colors.red, - guibg = colors.black2, - }, - modified_visible = { - guifg = colors.red, - guibg = colors.black2, - }, - modified_selected = { - guifg = colors.green, - guibg = colors.black, - }, - -- close buttons - - close_button = { - guifg = colors.light_grey, - guibg = colors.black2, - }, - close_button_visible = { - guifg = colors.light_grey, - guibg = colors.black2, - }, - close_button_selected = { - guifg = colors.red, - guibg = colors.black, - }, }, } diff --git a/lua/plugins/configs/chadsheet.lua b/lua/plugins/configs/chadsheet.lua new file mode 100644 index 0000000..0a6cc02 --- /dev/null +++ b/lua/plugins/configs/chadsheet.lua @@ -0,0 +1,44 @@ +local present, chadsheet = pcall(require, "cheatsheet") + +if not present then + return +end + +local mappings = require("core.utils").load_config().mappings + +-- add user mappings to the cheetsheet +-- improve this function to not hardcode plugin +local function add_to_chadsheet(section, keymap, desc) + if section == "plugin" then + for sec, key in pairs(mappings.plugin) do + add_to_chadsheet(sec, key, sec) + end + else + if type(keymap) == "table" then + for sec, key in pairs(keymap) do + if type(sec) == "number" then + add_to_chadsheet(section, key, desc or section) + else + add_to_chadsheet(sec, key, desc or section) + end + end + else + chadsheet.add_cheat(section, keymap, desc or "Misc") + end + end +end + +for section, keymap in pairs(mappings) do + add_to_chadsheet(section, keymap) +end + +require("cheatsheet").setup { + + bundled_cheatsheets = { + enabled = { "default" }, + disabled = { "unicode", "nerd-fonts" }, + }, + + bundled_plugin_cheatsheets = false, + include_only_installed_plugins = true, +} diff --git a/lua/plugins/compe.lua b/lua/plugins/configs/compe.lua similarity index 99% rename from lua/plugins/compe.lua rename to lua/plugins/configs/compe.lua index 0fa4d0f..d5c7a3d 100644 --- a/lua/plugins/compe.lua +++ b/lua/plugins/configs/compe.lua @@ -5,21 +5,22 @@ end compe.setup { enabled = true, + autocomplete = true, debug = false, - min_length = 1, - preselect = "enable", - throttle_time = 80, - source_timeout = 200, + documentation = true, incomplete_delay = 400, max_abbr_width = 100, max_kind_width = 100, max_menu_width = 100, - documentation = true, + min_length = 1, + preselect = "enable", + source_timeout = 200, source = { buffer = { kind = "﬘", true }, luasnip = { kind = "﬌", true }, nvim_lsp = true, nvim_lua = true, }, + throttle_time = 80, } diff --git a/lua/plugins/dashboard.lua b/lua/plugins/configs/dashboard.lua similarity index 95% rename from lua/plugins/dashboard.lua rename to lua/plugins/configs/dashboard.lua index 4158cac..63b26a3 100644 --- a/lua/plugins/dashboard.lua +++ b/lua/plugins/configs/dashboard.lua @@ -1,7 +1,7 @@ local g = vim.g local fn = vim.fn -local plugins_count = fn.len(fn.globpath("~/.local/share/nvim/site/pack/packer/start", "*", 0, 1)) +-- local plugins_count = fn.len(fn.globpath("~/.local/share/nvim/site/pack/packer/start", "*", 0, 1)) g.dashboard_disable_at_vimenter = 1 -- dashboard is disabled by default g.dashboard_disable_statusline = 1 diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/configs/gitsigns.lua similarity index 99% rename from lua/plugins/gitsigns.lua rename to lua/plugins/configs/gitsigns.lua index e1fa6c8..a33a46a 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/configs/gitsigns.lua @@ -4,18 +4,10 @@ if not present then end gitsigns.setup { - signs = { - add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, - change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, - delete = { hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr" }, - topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, - changedelete = { hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr" }, - }, - numhl = false, keymaps = { -- Default keymap options - noremap = true, buffer = true, + noremap = true, ["n ]c"] = { expr = true, "&diff ? ']c' : 'lua require\"gitsigns\".next_hunk()'" }, ["n [c"] = { expr = true, "&diff ? '[c' : 'lua require\"gitsigns\".prev_hunk()'" }, ["n hs"] = 'lua require"gitsigns".stage_hunk()', @@ -24,9 +16,19 @@ gitsigns.setup { ["n hp"] = 'lua require"gitsigns".preview_hunk()', ["n hb"] = 'lua require"gitsigns".blame_line()', }, + numhl = false, + + sign_priority = 5, + signs = { + add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, + change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, + changedelete = { hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr" }, + delete = { hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr" }, + topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, + }, + + status_formatter = nil, -- Use default watch_index = { interval = 100, }, - sign_priority = 5, - status_formatter = nil, -- Use default } diff --git a/lua/plugins/icons.lua b/lua/plugins/configs/icons.lua similarity index 96% rename from lua/plugins/icons.lua rename to lua/plugins/configs/icons.lua index e38e4fd..7fc28a3 100644 --- a/lua/plugins/icons.lua +++ b/lua/plugins/configs/icons.lua @@ -3,16 +3,10 @@ if not present then return end -local global_theme = "themes/" .. vim.g.nvchad_theme -local colors = require(global_theme) +local colors = require("colors").get() icons.setup { override = { - html = { - icon = "", - color = colors.baby_pink, - name = "html", - }, c = { icon = "", color = colors.blue, @@ -23,35 +17,50 @@ icons.setup { color = colors.blue, name = "css", }, - js = { - icon = "", - color = colors.sun, - name = "js", + deb = { + icon = "", + color = colors.cyan, + name = "deb", }, - ts = { - icon = "ﯤ", - color = colors.teal, - name = "ts", + Dockerfile = { + icon = "", + color = colors.cyan, + name = "Dockerfile", }, - kt = { - icon = "󱈙", - color = colors.orange, - name = "kt", + html = { + icon = "", + color = colors.baby_pink, + name = "html", }, - png = { + jpeg = { icon = "", color = colors.dark_purple, - name = "png", + name = "jpeg", }, jpg = { icon = "", color = colors.dark_purple, name = "jpg", }, - jpeg = { - icon = "", - color = colors.dark_purple, - name = "jpeg", + js = { + icon = "", + color = colors.sun, + name = "js", + }, + kt = { + icon = "󱈙", + color = colors.orange, + name = "kt", + }, + lock = { + icon = "", + color = colors.red, + name = "lock", + }, + lua = { + icon = "", + color = colors.blue, + name = "lua", }, mp3 = { icon = "", @@ -68,20 +77,10 @@ icons.setup { color = colors.white, name = "out", }, - Dockerfile = { - icon = "", - color = colors.cyan, - name = "Dockerfile", - }, - rb = { - icon = "", - color = colors.pink, - name = "rb", - }, - vue = { - icon = "﵂", - color = colors.vibrant_green, - name = "vue", + png = { + icon = "", + color = colors.dark_purple, + name = "png", }, py = { icon = "", @@ -93,35 +92,35 @@ icons.setup { color = colors.blue, name = "toml", }, - lock = { - icon = "", - color = colors.red, - name = "lock", + ts = { + icon = "ﯤ", + color = colors.teal, + name = "ts", }, - zip = { - icon = "", - color = colors.sun, - name = "zip", - }, - xz = { - icon = "", - color = colors.sun, - name = "xz", - }, - deb = { - icon = "", - color = colors.cyan, - name = "deb", + rb = { + icon = "", + color = colors.pink, + name = "rb", }, rpm = { icon = "", color = colors.orange, name = "rpm", }, - lua = { - icon = "", - color = colors.blue, - name = "lua", + vue = { + icon = "﵂", + color = colors.vibrant_green, + name = "vue", + }, + xz = { + icon = "", + color = colors.sun, + name = "xz", + }, + zip = { + icon = "", + color = colors.sun, + name = "zip", }, }, } diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/configs/lspconfig.lua similarity index 100% rename from lua/plugins/lspconfig.lua rename to lua/plugins/configs/lspconfig.lua index 4dc4f3f..19e7f99 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -10,13 +10,13 @@ local function on_attach(client, bufnr) local opts = { noremap = true, silent = true } -- lsp Mappings. + vim.api.nvim_buf_set_keymap(bufnr, "n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", "lua vim.lsp.buf.declaration()", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "gd", "lua vim.lsp.buf.definition()", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "K", "lua vim.lsp.buf.hover()", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "gi", "lua vim.lsp.buf.implementation()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "", "lua vim.lsp.buf.signature_help()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "", "lua vim.lsp.buf.signature_help()", opts) vim.api.nvim_buf_set_keymap( bufnr, "n", @@ -24,13 +24,13 @@ local function on_attach(client, bufnr) "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts ) - vim.api.nvim_buf_set_keymap(bufnr, "n", "D", "lua vim.lsp.buf.type_definition()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "rn", "lua vim.lsp.buf.rename()", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "gr", "lua vim.lsp.buf.references()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "rn", "lua vim.lsp.buf.rename()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "D", "lua vim.lsp.buf.type_definition()", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) -- Set some keybinds conditional on server capabilities if client.resolved_capabilities.document_formatting then @@ -95,9 +95,9 @@ function lspSymbol(name, icon) end lspSymbol("Error", "") -lspSymbol("Warning", "") lspSymbol("Information", "") lspSymbol("Hint", "") +lspSymbol("Warning", "") vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { virtual_text = { diff --git a/lua/plugins/luasnip.lua b/lua/plugins/configs/luasnip.lua similarity index 100% rename from lua/plugins/luasnip.lua rename to lua/plugins/configs/luasnip.lua index ef67a1c..8b83cb7 100644 --- a/lua/plugins/luasnip.lua +++ b/lua/plugins/configs/luasnip.lua @@ -53,11 +53,11 @@ _G.completions = function() return npairs.check_break_line_char() end -vim.api.nvim_set_keymap("i", "", "v:lua.tab_complete()", { expr = true }) -vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", { expr = true }) +vim.api.nvim_set_keymap("i", "", "v:lua.completions()", { expr = true }) vim.api.nvim_set_keymap("i", "", "v:lua.s_tab_complete()", { expr = true }) vim.api.nvim_set_keymap("s", "", "v:lua.s_tab_complete()", { expr = true }) -vim.api.nvim_set_keymap("i", "", "v:lua.completions()", { expr = true }) +vim.api.nvim_set_keymap("i", "", "v:lua.tab_complete()", { expr = true }) +vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", { expr = true }) luasnip.config.set_config { history = true, diff --git a/lua/plugins/nvimtree.lua b/lua/plugins/configs/nvimtree.lua similarity index 99% rename from lua/plugins/nvimtree.lua rename to lua/plugins/configs/nvimtree.lua index cd5c735..fbfb4a8 100644 --- a/lua/plugins/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -8,53 +8,54 @@ local g = vim.g vim.o.termguicolors = true -g.nvim_tree_side = "left" -g.nvim_tree_width = 25 -g.nvim_tree_ignore = { ".git", "node_modules", ".cache" } -g.nvim_tree_gitignore = 1 +g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names +g.nvim_tree_allow_resize = 1 +g.nvim_tree_auto_close = 0 -- closes tree when it's the last window g.nvim_tree_auto_ignore_ft = { "dashboard" } -- don't open tree on specific fiypes. g.nvim_tree_auto_open = 0 -g.nvim_tree_auto_close = 0 -- closes tree when it's the last window -g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened -g.nvim_tree_follow = 1 -g.nvim_tree_indent_markers = 1 -g.nvim_tree_hide_dotfiles = 1 -g.nvim_tree_git_hl = 1 -g.nvim_tree_highlight_opened_files = 0 -g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" } -g.nvim_tree_tab_open = 0 -g.nvim_tree_allow_resize = 1 -g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names g.nvim_tree_disable_netrw = 1 +g.nvim_tree_follow = 1 +g.nvim_tree_git_hl = 1 +g.nvim_tree_gitignore = 1 +g.nvim_tree_hide_dotfiles = 1 +g.nvim_tree_highlight_opened_files = 0 g.nvim_tree_hijack_netrw = 0 +g.nvim_tree_indent_markers = 1 +g.nvim_tree_ignore = { ".git", "node_modules", ".cache" } +g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened +g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" } +g.nvim_tree_side = "left" +g.nvim_tree_tab_open = 0 g.nvim_tree_update_cwd = 1 +g.nvim_tree_width = 25 g.nvim_tree_show_icons = { - git = 1, folders = 1, - files = 1, -- folder_arrows= 1 + files = 1, + git = 1, } + g.nvim_tree_icons = { default = "", symlink = "", git = { - unstaged = "✗", - staged = "✓", - unmerged = "", - renamed = "➜", - untracked = "★", deleted = "", ignored = "◌", + renamed = "➜", + staged = "✓", + unmerged = "", + unstaged = "✗", + untracked = "★", }, folder = { -- disable indent_markers option to get arrows working or if you want both arrows and indent then just add the arrow icons in front ofthe default and opened folders below! -- arrow_open = "", -- arrow_closed = "", default = "", - open = "", empty = "", --  empty_open = "", + open = "", symlink = "", symlink_open = "", }, diff --git a/lua/plugins/others.lua b/lua/plugins/configs/others.lua similarity index 91% rename from lua/plugins/others.lua rename to lua/plugins/configs/others.lua index 3236721..2363557 100644 --- a/lua/plugins/others.lua +++ b/lua/plugins/configs/others.lua @@ -1,5 +1,21 @@ local M = {} +M.better_escape = function() + local config = require("core.utils").load_config() + vim.g.better_escape_interval = config.options.plugin.esc_insertmode_timeout or 300 +end + +M.blankline = function() + vim.g.indentLine_enabled = 1 + vim.g.indent_blankline_char = "▏" + + vim.g.indent_blankline_filetype_exclude = { "help", "terminal", "dashboard", "packer" } + vim.g.indent_blankline_buftype_exclude = { "terminal" } + + vim.g.indent_blankline_show_trailing_blankline_indent = false + vim.g.indent_blankline_show_first_indent_level = false +end + M.colorizer = function() local present, colorizer = pcall(require, "colorizer") if present then @@ -15,11 +31,6 @@ M.comment = function() end end -M.escape = function() - vim.g.better_escape_interval = 300 - vim.g.better_escape_shortcut = { "jk" } -end - M.lspkind = function() local present, lspkind = pcall(require, "lspkind") if present then @@ -33,17 +44,6 @@ M.neoscroll = function() end) end -M.blankline = function() - vim.g.indentLine_enabled = 1 - vim.g.indent_blankline_char = "▏" - - vim.g.indent_blankline_filetype_exclude = { "help", "terminal", "dashboard", "packer" } - vim.g.indent_blankline_buftype_exclude = { "terminal" } - - vim.g.indent_blankline_show_trailing_blankline_indent = false - vim.g.indent_blankline_show_first_indent_level = false -end - M.signature = function() local present, lspsignature = pcall(require, "lsp_signature") if present then diff --git a/lua/plugins/statusline.lua b/lua/plugins/configs/statusline.lua similarity index 97% rename from lua/plugins/statusline.lua rename to lua/plugins/configs/statusline.lua index eb7ea23..06b94ac 100644 --- a/lua/plugins/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -1,5 +1,4 @@ -local global_theme = "themes/" .. vim.g.nvchad_theme -local colors = require(global_theme) +local colors = require("colors").get() local present1, gl = pcall(require, "galaxyline") local present2, condition = pcall(require, "galaxyline.condition") @@ -20,6 +19,22 @@ local icon_styles = { position_icon = " ", }, + arrow = { + left = "", + right = "", + main_icon = "  ", + vi_mode_icon = " ", + position_icon = " ", + }, + + block = { + left = " ", + right = " ", + main_icon = "  ", + vi_mode_icon = "  ", + position_icon = "  ", + }, + round = { left = "", right = "", @@ -35,25 +50,9 @@ local icon_styles = { vi_mode_icon = " ", position_icon = " ", }, - - block = { - left = " ", - right = " ", - main_icon = "  ", - vi_mode_icon = "  ", - position_icon = "  ", - }, - - arrow = { - left = "", - right = "", - main_icon = "  ", - vi_mode_icon = " ", - position_icon = " ", - }, } -local user_statusline_style = require("utils").load_config().ui.statusline.style +local user_statusline_style = require("core.utils").load_config().ui.plugin.statusline.style local statusline_style = icon_styles[user_statusline_style] local left_separator = statusline_style.left diff --git a/lua/plugins/telescope.lua b/lua/plugins/configs/telescope.lua similarity index 86% rename from lua/plugins/telescope.lua rename to lua/plugins/configs/telescope.lua index 40b7383..9496667 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -65,21 +65,23 @@ telescope.setup { }, } --- NvChad pickers --- load the theme_switcher extension -require("telescope").load_extension "themes" --- load the term_picker extension -require("telescope").load_extension "terms" +if + not pcall(function() + -- NvChad pickers + -- load the theme_switcher extension + telescope.load_extension "themes" + -- load the term_picker extension + telescope.load_extension "terms" -if not pcall(function() - telescope.load_extension "fzf" - telescope.load_extension "media_files" -end) then + telescope.load_extension "fzf" + telescope.load_extension "media_files" + end) +then -- This should only trigger when in need of PackerSync, so better do it print "After completion of PackerCompile, restart neovim." -- Trigger packer compile on PackerComplete, so it properly waits for PackerSync vim.cmd 'autocmd User PackerComplete ++once lua print "Waiting for PackerCompile.." require("packer").compile()' vim.cmd 'autocmd User PackerCompileDone ++once echo "Packer Compile done, restart neovim."' - require "pluginList" - require("packer").update("telescope-fzf-native.nvim", "telescope-media-files.nvim") + require "plugins" + require("packer").update("core", "telescope-fzf-native.nvim", "telescope-media-files.nvim") end diff --git a/lua/plugins/treesitter.lua b/lua/plugins/configs/treesitter.lua similarity index 100% rename from lua/plugins/treesitter.lua rename to lua/plugins/configs/treesitter.lua diff --git a/lua/plugins/zenmode.lua b/lua/plugins/configs/zenmode.lua similarity index 100% rename from lua/plugins/zenmode.lua rename to lua/plugins/configs/zenmode.lua index 16b5b62..695ddc9 100644 --- a/lua/plugins/zenmode.lua +++ b/lua/plugins/configs/zenmode.lua @@ -6,11 +6,11 @@ end true_zen.setup { ui = { bottom = { + cmdheight = 1, laststatus = 0, ruler = false, showmode = false, showcmd = false, - cmdheight = 1, }, top = { showtabline = 0, diff --git a/lua/pluginList.lua b/lua/plugins/init.lua similarity index 66% rename from lua/pluginList.lua rename to lua/plugins/init.lua index 90dfbcf..2068684 100644 --- a/lua/pluginList.lua +++ b/lua/plugins/init.lua @@ -1,28 +1,39 @@ -local plugin_status = require("utils").load_config().plugin_status +local present, packer = pcall(require, "plugins.packerInit") -local present, _ = pcall(require, "packerInit") -local packer - -if present then - packer = require "packer" -else +if not present then return false end local use = packer.use return packer.startup(function() + local plugin_status = require("core.utils").load_config().plugin_status + + -- this is arranged on the basis of when a plugin starts + + -- this is the nvchad core repo containing utilities for some features like theme swticher, no need to lazy load + use { + "Nvchad/core", + } + use { "wbthomason/packer.nvim", event = "VimEnter", } use { - "jdhao/better-escape.vim", - disable = not plugin_status.better_esc, - event = "InsertEnter", + "NvChad/nvim-base16.lua", + after = "packer.nvim", config = function() - require("plugins.others").escape() + require("colors").init() + end, + } + + use { + "kyazdani42/nvim-web-devicons", + after = "nvim-base16.lua", + config = function() + require "plugins.configs.icons" end, } @@ -31,36 +42,99 @@ return packer.startup(function() disable = not plugin_status.galaxyline, after = "nvim-web-devicons", config = function() - require "plugins.statusline" - end, - } - use { - "akinsho/bufferline.nvim", - disable = not plugin_status.nvim_bufferline, - after = "galaxyline.nvim", - config = function() - require "plugins.bufferline" - end, - setup = function() - require("mappings").bufferline() + require "plugins.configs.statusline" end, } - -- color related stuff use { - "NvChad/nvim-base16.lua", - after = "packer.nvim", + "akinsho/bufferline.nvim", + disable = not plugin_status.bufferline, + after = "galaxyline.nvim", config = function() - require "theme" + require "plugins.configs.bufferline" + end, + setup = function() + require("core.mappings").bufferline() + end, + } + + use { + "nvim-lua/plenary.nvim", + after = "bufferline.nvim", + } + + -- git stuff + use { + "lewis6991/gitsigns.nvim", + disable = not plugin_status.gitsigns, + after = "plenary.nvim", + config = function() + require "plugins.configs.gitsigns" + end, + } + + use { + "nvim-telescope/telescope.nvim", + after = "plenary.nvim", + requires = { + { + "sudormrfbin/cheatsheet.nvim", + disable = not plugin_status.cheatsheet, + after = "telescope.nvim", + config = function() + require "plugins.configs.chadsheet" + end, + setup = function() + require("core.mappings").chadsheet() + end, + }, + { + "nvim-telescope/telescope-fzf-native.nvim", + run = "make", + }, + { + "nvim-telescope/telescope-media-files.nvim", + disable = not plugin_status.telescope_media, + setup = function() + require("core.mappings").telescope_media() + end, + }, + }, + config = function() + require "plugins.configs.telescope" + end, + setup = function() + require("core.mappings").telescope() + end, + } + + -- load autosave only if its globally enabled + use { + disable = not plugin_status.autosave, + "Pocco81/AutoSave.nvim", + config = function() + require "plugins.configs.autosave" + end, + cond = function() + return require("core.utils").load_config().options.plugin.autosave == true + end, + } + + use { + "lukas-reineke/indent-blankline.nvim", + disable = not plugin_status.blankline, + event = "BufRead", + config = function() + require("plugins.configs.others").blankline() end, } use { "norcalli/nvim-colorizer.lua", - disable = not plugin_status.nvim_colorizer, + disable = not plugin_status.colorizer, event = "BufRead", config = function() - require("plugins.others").colorizer() + require("plugins.configs.others").colorizer() end, } @@ -69,7 +143,7 @@ return packer.startup(function() "nvim-treesitter/nvim-treesitter", event = "BufRead", config = function() - require "plugins.treesitter" + require "plugins.configs.treesitter" end, } @@ -82,16 +156,7 @@ return packer.startup(function() "neovim/nvim-lspconfig", after = "nvim-lspinstall", config = function() - require "plugins.lspconfig" - end, - } - - use { - "onsails/lspkind-nvim", - disable = not plugin_status.lspkind, - event = "BufEnter", - config = function() - require("plugins.others").lspkind() + require "plugins.configs.lspconfig" end, } @@ -100,7 +165,28 @@ return packer.startup(function() disable = not plugin_status.lspsignature, after = "nvim-lspconfig", config = function() - require("plugins.others").signature() + require("plugins.configs.others").signature() + end, + } + + use { + "onsails/lspkind-nvim", + disable = not plugin_status.lspkind, + event = "BufEnter", + config = function() + require("plugins.configs.others").lspkind() + end, + } + + use { + "jdhao/better-escape.vim", + disable = not plugin_status.esc_insertmode, + event = "InsertEnter", + config = function() + require("plugins.configs.others").better_escape() + end, + setup = function() + require("core.mappings").better_escape() end, } @@ -109,7 +195,7 @@ return packer.startup(function() "hrsh7th/nvim-compe", event = "InsertEnter", config = function() - require "plugins.compe" + require "plugins.configs.compe" end, wants = "LuaSnip", requires = { @@ -118,7 +204,7 @@ return packer.startup(function() wants = "friendly-snippets", event = "InsertCharPre", config = function() - require "plugins.luasnip" + require "plugins.configs.luasnip" end, }, { @@ -128,91 +214,12 @@ return packer.startup(function() }, } - use { - "sbdchd/neoformat", - disable = not plugin_status.neoformat, - cmd = "Neoformat", - setup = function() - require("mappings").neoformat() - end, - } - - -- file managing , picker etc - use { - "kyazdani42/nvim-tree.lua", - cmd = "NvimTreeToggle", - config = function() - require "plugins.nvimtree" - end, - setup = function() - require("mappings").nvimtree() - end, - } - - use { - "kyazdani42/nvim-web-devicons", - after = "nvim-base16.lua", - config = function() - require "plugins.icons" - end, - } - - use { - "nvim-lua/plenary.nvim", - after = "bufferline.nvim", - } - - use { - "nvim-telescope/telescope.nvim", - after = "plenary.nvim", - requires = { - { - "nvim-telescope/telescope-fzf-native.nvim", - run = "make", - }, - { - "nvim-telescope/telescope-media-files.nvim", - disable = not plugin_status.telescope_media, - setup = function() - require("mappings").telescope_media() - end, - }, - { - "sudormrfbin/cheatsheet.nvim", - disable = not plugin_status.cheatsheet, - after = "telescope.nvim", - config = function() - require "plugins.chadsheet" - end, - setup = function() - require("mappings").chadsheet() - end, - }, - }, - config = function() - require "plugins.telescope" - end, - setup = function() - require("mappings").telescope() - end, - } - - -- git stuff - use { - "lewis6991/gitsigns.nvim", - disable = not plugin_status.gitsigns, - after = "plenary.nvim", - config = function() - require "plugins.gitsigns" - end, - } - -- misc plugins use { "windwp/nvim-autopairs", after = "nvim-compe", config = function() - require "plugins.autopairs" + require "plugins.configs.autopairs" end, } @@ -222,21 +229,19 @@ return packer.startup(function() event = "CursorMoved", } + -- smooth scroll use { - "terrortylor/nvim-comment", - disable = not plugin_status.nvim_comment, - cmd = "CommentToggle", + "karb94/neoscroll.nvim", + disable = not plugin_status.neoscroll, + event = "WinScrolled", config = function() - require("plugins.others").comment() - end, - setup = function() - require("mappings").comment_nvim() + require("plugins.configs.others").neoscroll() end, } use { "glepnir/dashboard-nvim", - disable = not plugin_status.dashboard_nvim, + disable = not plugin_status.dashboard, cmd = { "Dashboard", "DashboardNewFile", @@ -244,58 +249,61 @@ return packer.startup(function() "SessionLoad", "SessionSave", }, + config = function() + require "plugins.configs.dashboard" + end, setup = function() - require "plugins.dashboard" - require("mappings").dashboard() + require("core.mappings").dashboard() end, } - -- load autosave only if its globally enabled use { - disable = not plugin_status.autosave_nvim, - "Pocco81/AutoSave.nvim", - config = function() - require "plugins.autosave" - end, - cond = function() - return vim.g.auto_save == true + "sbdchd/neoformat", + disable = not plugin_status.neoformat, + cmd = "Neoformat", + setup = function() + require("core.mappings").neoformat() end, } - -- smooth scroll + -- use "alvan/vim-closetag" -- for html autoclosing tag use { - "karb94/neoscroll.nvim", - disable = not plugin_status.neoscroll_nvim, - event = "WinScrolled", + "terrortylor/nvim-comment", + disable = not plugin_status.comment, + cmd = "CommentToggle", config = function() - require("plugins.others").neoscroll() + require("plugins.configs.others").comment() + end, + setup = function() + require("core.mappings").comment() + end, + } + + -- file managing , picker etc + use { + "kyazdani42/nvim-tree.lua", + cmd = "NvimTreeToggle", + config = function() + require "plugins.configs.nvimtree" + end, + setup = function() + require("core.mappings").nvimtree() end, } use { "Pocco81/TrueZen.nvim", - disable = not plugin_status.truezen_nvim, + disable = not plugin_status.truezen, cmd = { "TZAtaraxis", "TZMinimalist", "TZFocus", }, config = function() - require "plugins.zenmode" + require "plugins.configs.zenmode" end, setup = function() - require("mappings").truezen() - end, - } - - -- use "alvan/vim-closetag" -- for html autoclosing tag - - use { - "lukas-reineke/indent-blankline.nvim", - disable = not plugin_status.blankline, - event = "BufRead", - setup = function() - require("plugins.others").blankline() + require("core.mappings").truezen() end, } @@ -306,7 +314,7 @@ return packer.startup(function() "Git", }, setup = function() - require("mappings").fugitive() + require("core.mappings").vim_fugitive() end, } end) diff --git a/lua/packerInit.lua b/lua/plugins/packerInit.lua similarity index 97% rename from lua/packerInit.lua rename to lua/plugins/packerInit.lua index 8b0561c..bd6505c 100644 --- a/lua/packerInit.lua +++ b/lua/plugins/packerInit.lua @@ -29,7 +29,7 @@ if not present then end end -return packer.init { +packer.init { display = { open_fn = function() return require("packer.util").float { border = "single" } @@ -43,3 +43,5 @@ return packer.init { compile_on_sync = true, -- auto_reload_compiled = true } + +return packer diff --git a/lua/telescope/_extensions/terms.lua b/lua/telescope/_extensions/terms.lua deleted file mode 100644 index 2acd08a..0000000 --- a/lua/telescope/_extensions/terms.lua +++ /dev/null @@ -1,143 +0,0 @@ --- This file can be loaded as a telescope extension -local M = {} - --- Custom theme picker --- Most of the code is copied from telescope buffer builtin --- Src: https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/builtin/internal.lua -M.term_picker = function(opts) - local pickers, finders, previewers, make_entry, actions, action_state, utils, conf - if pcall(require, "telescope") then - pickers = require "telescope.pickers" - finders = require "telescope.finders" - previewers = require "telescope.previewers" - - make_entry = require "telescope.make_entry" - actions = require "telescope.actions" - action_state = require "telescope.actions.state" - utils = require "telescope.utils" - conf = require("telescope.config").values - else - error "Cannot find telescope!" - end - - local filter = vim.tbl_filter - - local local_utils = require "utils" - - -- buffer number and name - local bufnr = vim.api.nvim_get_current_buf() - local bufname = vim.api.nvim_buf_get_name(bufnr) - - local bufnrs = filter(function(b) - local present_type, type = pcall(function() - return vim.api.nvim_buf_get_var(b, "term_type") - end) - - if not present_type then - -- let's only terms that we created - return false - end - - -- if 1 ~= vim.fn.buflisted(b) then - -- return false - -- end - -- only hide unloaded buffers if opts.show_all_buffers is false, keep them listed if true or nil - if opts.show_all_buffers == false and not vim.api.nvim_buf_is_loaded(b) then - return false - end - if opts.ignore_current_buffer and b == vim.api.nvim_get_current_buf() then - return false - end - return true - end, vim.api.nvim_list_bufs()) - if not next(bufnrs) then - return - end - if opts.sort_mru then - table.sort(bufnrs, function(a, b) - return vim.fn.getbufinfo(a)[1].lastused > vim.fn.getbufinfo(b)[1].lastused - end) - end - - local buffers = {} - local default_selection_idx = 1 - for _, bufnr in ipairs(bufnrs) do - local flag = bufnr == vim.fn.bufnr "" and "%" or (bufnr == vim.fn.bufnr "#" and "#" or " ") - - if opts.sort_lastused and not opts.ignore_current_buffer and flag == "#" then - default_selection_idx = 2 - end - - local element = { - bufnr = bufnr, - flag = flag, - info = vim.fn.getbufinfo(bufnr)[1], - } - - if opts.sort_lastused and (flag == "#" or flag == "%") then - local idx = ((buffers[1] ~= nil and buffers[1].flag == "%") and 2 or 1) - table.insert(buffers, idx, element) - else - table.insert(buffers, element) - end - end - - if not opts.bufnr_width then - local max_bufnr = math.max(unpack(bufnrs)) - opts.bufnr_width = #tostring(max_bufnr) - end - - pickers.new(opts, { - prompt_title = "Terminal buffers", - finder = finders.new_table { - results = buffers, - entry_maker = opts.entry_maker or make_entry.gen_from_buffer(opts), - }, - previewer = conf.grep_previewer(opts), - sorter = conf.generic_sorter(opts), - default_selection_index = default_selection_idx, - attach_mappings = function(prompt_bufnr) - actions.select_default:replace(function() - local entry = action_state.get_selected_entry() - actions.close(prompt_bufnr) - - local buf = entry.bufnr - - local chad_term, type = pcall(function() - return vim.api.nvim_buf_get_var(buf, "term_type") - end) - - -- TODO buffer checks/error detection (make sure we do get a buf) - - if chad_term then - if type == "wind" then - -- swtich to term buff & show in bufferline - vim.cmd(string.format("b %d | setlocal bl", buf)) - -- vim.cmd('startinsert') TODO fix this - elseif type == "vert" then - vim.cmd(string.format("vsp #%d", buf)) - -- vim.cmd('startinsert') TODO fix this - elseif type == "hori" then - -- TODO change 15 to a chad config var number - vim.cmd(string.format("15 sp #%d ", buf)) - -- vim.cmd('startinsert') TODO fix this - end - end - end) - - return true - end, - }):find() -end - --- register term picker as terms to telescope -local present, telescope = pcall(require, "telescope") -if present then - return telescope.register_extension { - exports = { - terms = M.term_picker, - }, - } -else - error "Cannot find telescope!" -end diff --git a/lua/telescope/_extensions/themes.lua b/lua/telescope/_extensions/themes.lua deleted file mode 100644 index e0aed13..0000000 --- a/lua/telescope/_extensions/themes.lua +++ /dev/null @@ -1,142 +0,0 @@ --- This file can be loaded as a telescope extension -local M = {} - --- Custom theme picker --- Most of the code is copied from telescope colorscheme plugin, mostly for preview creation -M.theme_switcher = function(opts) - local pickers, finders, previewers, actions, action_state, utils, conf - if pcall(require, "telescope") then - pickers = require "telescope.pickers" - finders = require "telescope.finders" - previewers = require "telescope.previewers" - - actions = require "telescope.actions" - action_state = require "telescope.actions.state" - utils = require "telescope.utils" - conf = require("telescope.config").values - else - error "Cannot find telescope!" - end - - local local_utils = require "utils" - local reload_theme = local_utils.reload_theme - - -- get a table of available themes - local themes = local_utils.list_themes() - if next(themes) ~= nil then - -- save this to use it for later to restore if theme not changed - local current_theme = vim.g.nvchad_theme - local new_theme = "" - local change = false - - -- buffer number and name - local bufnr = vim.api.nvim_get_current_buf() - local bufname = vim.api.nvim_buf_get_name(bufnr) - - local previewer - - -- in case its not a normal buffer - if vim.fn.buflisted(bufnr) ~= 1 then - local deleted = false - local function del_win(win_id) - if win_id and vim.api.nvim_win_is_valid(win_id) then - utils.buf_delete(vim.api.nvim_win_get_buf(win_id)) - pcall(vim.api.nvim_win_close, win_id, true) - end - end - - previewer = previewers.new { - preview_fn = function(_, entry, status) - if not deleted then - deleted = true - del_win(status.preview_win) - del_win(status.preview_border_win) - end - reload_theme(entry.value) - end, - } - else - -- show current buffer content in previewer - previewer = previewers.new_buffer_previewer { - get_buffer_by_name = function() - return bufname - end, - define_preview = function(self, entry) - if vim.loop.fs_stat(bufname) then - conf.buffer_previewer_maker(bufname, self.state.bufnr, { bufname = self.state.bufname }) - else - local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false) - vim.api.nvim_buf_set_lines(self.state.bufnr, 0, -1, false, lines) - end - reload_theme(entry.value) - end, - } - end - - local picker = pickers.new { - prompt_title = "Set NvChad color", - finder = finders.new_table(themes), - previewer = previewer, - sorter = conf.generic_sorter(opts), - attach_mappings = function() - actions.select_default:replace( - -- if a entry is selected, change current_theme to that - function(prompt_bufnr) - local selection = action_state.get_selected_entry() - new_theme = selection.value - change = true - actions.close(prompt_bufnr) - end - ) - return true - end, - } - - -- rewrite picker.close_windows - local close_windows = picker.close_windows - picker.close_windows = function(status) - close_windows(status) - -- now apply the theme, if success, then ask for default theme change - local final_theme - if change then - final_theme = new_theme - else - final_theme = current_theme - end - - if reload_theme(final_theme) then - if change then - -- ask for confirmation to set as default theme - local ans = string.lower(vim.fn.input("Set " .. new_theme .. " as default theme ? [y/N] ")) == "y" - local_utils.clear_cmdline() - if ans then - local_utils.change_theme(current_theme, final_theme) - else - -- will be used in restoring nvchad theme var - final_theme = current_theme - end - end - else - final_theme = current_theme - end - -- set nvchad_theme global var - vim.g.nvchad_theme = final_theme - end - -- launch the telescope picker - picker:find() - else - print("No themes found in " .. vim.fn.stdpath "config" .. "/lua/themes") - end -end - --- register theme swticher as themes to telescope -local present, telescope = pcall(require, "telescope") -if present then - return telescope.register_extension { - exports = { - themes = M.theme_switcher, - }, - } -else - error "Cannot find telescope!" -end diff --git a/lua/theme.lua b/lua/theme.lua deleted file mode 100644 index 3002ac2..0000000 --- a/lua/theme.lua +++ /dev/null @@ -1,12 +0,0 @@ -local chad_theme = require("utils").load_config().ui.theme -vim.g.nvchad_theme = chad_theme - -local present, base16 = pcall(require, "base16") - -if present then - base16(base16.themes(chad_theme), true) - require "highlights" - return true -else - return false -end diff --git a/lua/utils.lua b/lua/utils.lua deleted file mode 100644 index 96d5771..0000000 --- a/lua/utils.lua +++ /dev/null @@ -1,531 +0,0 @@ -local M = {} - --- 1st arg as current theme, 2nd as new theme -M.change_theme = function(current_theme, new_theme) - if current_theme == nil or new_theme == nil then - print "Error: Provide current and new theme name" - return false - end - if current_theme == new_theme then - return - end - - local user_config = vim.g.nvchad_user_config - local file = vim.fn.stdpath "config" .. "/lua/" .. user_config .. ".lua" - -- store in data variable - local data = assert(M.file("r", file)) - -- escape characters which can be parsed as magic chars - current_theme = current_theme:gsub("%p", "%%%0") - new_theme = new_theme:gsub("%p", "%%%0") - local find = "theme = .?" .. current_theme .. ".?" - local replace = 'theme = "' .. new_theme .. '"' - local content = string.gsub(data, find, replace) - -- see if the find string exists in file - if content == data then - print("Error: Cannot change default theme with " .. new_theme .. ", edit " .. file .. " manually") - return false - else - assert(M.file("w", file, content)) - end -end - -M.clear_cmdline = function() - vim.defer_fn(function() - vim.cmd "echo" - end, 0) -end - -M.close_buffer = function(bufexpr, force) - -- This is a modification of a NeoVim plugin from - -- Author: ojroques - Olivier Roques - -- Src: https://github.com/ojroques/nvim-bufdel - -- (Author has okayed copy-paste) - - -- Options - local opts = { - next = "cycle", -- how to retrieve the next buffer - quit = false, -- exit when last buffer is deleted - --TODO make this a chadrc flag/option - } - - -- ---------------- - -- Helper functions - -- ---------------- - - -- Switch to buffer 'buf' on each window from list 'windows' - local function switch_buffer(windows, buf) - local cur_win = vim.fn.winnr() - for _, winid in ipairs(windows) do - vim.cmd(string.format("%d wincmd w", vim.fn.win_id2win(winid))) - vim.cmd(string.format("buffer %d", buf)) - end - vim.cmd(string.format("%d wincmd w", cur_win)) -- return to original window - end - - -- Select the first buffer with a number greater than given buffer - local function get_next_buf(buf) - local next = vim.fn.bufnr "#" - if opts.next == "alternate" and vim.fn.buflisted(next) == 1 then - return next - end - for i = 0, vim.fn.bufnr "$" - 1 do - next = (buf + i) % vim.fn.bufnr "$" + 1 -- will loop back to 1 - if vim.fn.buflisted(next) == 1 then - return next - end - end - end - - -- ---------------- - -- End helper functions - -- ---------------- - - local buf = vim.fn.bufnr() - if vim.fn.buflisted(buf) == 0 then -- exit if buffer number is invalid - vim.cmd "close" - return - end - - if #vim.fn.getbufinfo { buflisted = 1 } < 2 then - if opts.quit then - -- exit when there is only one buffer left - if force then - vim.cmd "qall!" - else - vim.cmd "confirm qall" - end - return - end - - local chad_term, type = pcall(function() - return vim.api.nvim_buf_get_var(buf, "term_type") - end) - - if chad_term then - -- Must be a window type - vim.cmd(string.format("setlocal nobl", buf)) - vim.cmd "enew" - return - end - -- don't exit and create a new empty buffer - vim.cmd "enew" - vim.cmd "bp" - end - - local next_buf = get_next_buf(buf) - local windows = vim.fn.getbufinfo(buf)[1].windows - - -- force deletion of terminal buffers to avoid the prompt - if force or vim.fn.getbufvar(buf, "&buftype") == "terminal" then - local chad_term, type = pcall(function() - return vim.api.nvim_buf_get_var(buf, "term_type") - end) - - -- TODO this scope is error prone, make resilient - if chad_term then - if type == "wind" then - -- hide from bufferline - vim.cmd(string.format("%d bufdo setlocal nobl", buf)) - -- swtich to another buff - -- TODO switch to next bufffer, this works too - vim.cmd "BufferLineCycleNext" - else - local cur_win = vim.fn.winnr() - -- we can close this window - vim.cmd(string.format("%d wincmd c", cur_win)) - return - end - else - switch_buffer(windows, next_buf) - vim.cmd(string.format("bd! %d", buf)) - end - else - switch_buffer(windows, next_buf) - vim.cmd(string.format("silent! confirm bd %d", buf)) - end - -- revert buffer switches if user has canceled deletion - if vim.fn.buflisted(buf) == 1 then - switch_buffer(windows, buf) - end -end - --- wrapper to use vim.api.nvim_echo --- table of {string, highlight} --- e.g echo({{"Hello", "Title"}, {"World"}}) -M.echo = function(opts) - if opts == nil or type(opts) ~= "table" then - return - end - vim.api.nvim_echo(opts, false, {}) -end - --- 1st arg - r or w --- 2nd arg - file path --- 3rd arg - content if 1st arg is w --- return file data on read, nothing on write -M.file = function(mode, filepath, content) - local data - local fd = assert(vim.loop.fs_open(filepath, mode, 438)) - local stat = assert(vim.loop.fs_fstat(fd)) - if stat.type ~= "file" then - data = false - else - if mode == "r" then - data = assert(vim.loop.fs_read(fd, stat.size, 0)) - else - assert(vim.loop.fs_write(fd, content, 0)) - data = true - end - end - assert(vim.loop.fs_close(fd)) - return data -end - --- hide statusline --- tables fetched from load_config function -M.hide_statusline = function(values) - local hidden = require("utils").load_config().ui.statusline.hidden - local shown = require("utils").load_config().ui.statusline.shown - local api = vim.api - local buftype = api.nvim_buf_get_option("%", "ft") - - -- shown table from config has the highest priority - if vim.tbl_contains(shown, buftype) then - api.nvim_set_option("laststatus", 2) - return - end - - if vim.tbl_contains(hidden, buftype) then - api.nvim_set_option("laststatus", 0) - return - else - api.nvim_set_option("laststatus", 2) - end -end - --- return a table of available themes -M.list_themes = function(return_type) - local themes = {} - -- folder where theme files are stored - local themes_folder = vim.fn.stdpath "config" .. "/lua/themes" - -- list all the contents of the folder and filter out files with .lua extension, then append to themes table - local fd = vim.loop.fs_scandir(themes_folder) - if fd then - while true do - local name, typ = vim.loop.fs_scandir_next(fd) - if name == nil then - break - end - if typ ~= "directory" and string.find(name, ".lua") then - -- return the table values as keys if specified - if return_type == "keys_as_value" then - themes[vim.fn.fnamemodify(name, ":r")] = true - else - table.insert(themes, vim.fn.fnamemodify(name, ":r")) - end - end - end - end - return themes -end - --- Base code: https://gist.github.com/revolucas/184aec7998a6be5d2f61b984fac1d7f7 --- Changes over it: preserving table 1 contents and also update with table b, without duplicating --- 1st arg - base table, 2nd arg - table to merge -M.merge_table = function(into, from) - -- make sure both are table - if type(into) ~= "table" or type(from) ~= "table" then - return into - end - local stack, seen = {}, {} - local table1, table2 = into, from - while true do - for k, v in pairs(table2) do - if type(v) == "table" and type(table1[k]) == "table" then - table.insert(stack, { table1[k], table2[k] }) - else - local present = seen[v] or false - if not present then - if type(k) == "number" then - -- add the value to seen table until value is found - -- only do when key is number we just want to append to subtables - -- todo: maybe improve this - - for _, value in pairs(table1) do - if value == v then - present = true - break - end - end - seen[v] = true - if not present then - table1[#table1 + 1] = v - end - else - table1[k] = v - end - end - end - end - if #stack > 0 then - local t = stack[#stack] - table1, table2 = t[1], t[2] - stack[#stack] = nil - else - break - end - end - return into -end - --- load config --- 1st arg = boolean - whether to force reload --- Modifies _G._NVCHAD_CONFIG global variable -M.load_config = function(reload) - -- only do the stuff below one time, otherwise just return the set config - if _G._NVCHAD_CONFIG_CONTENTS ~= nil and not (reload or false) then - return _G._NVCHAD_CONFIG_CONTENTS - end - - local default_config = "default_config" - local config_name = vim.g.nvchad_user_config or "chadrc" - local config_file = vim.fn.stdpath "config" .. "/lua/" .. config_name .. ".lua" - - -- unload the modules if force reload - if reload then - package.loaded[default_config or false] = nil - package.loaded[config_name or false] = nil - end - - -- don't enclose in pcall, it better break when default config is faulty - _G._NVCHAD_CONFIG_CONTENTS = require(default_config) - - -- user config is not required to run nvchad but a optional - -- Make sure the config doesn't break the whole system if user config is not present or in bad state or not a table - -- print warning texts if user config file is present - -- check if the user config is present - if vim.fn.empty(vim.fn.glob(config_file)) < 1 then - local present, config = pcall(require, config_name) - if present then - -- make sure the returned value is table - if type(config) == "table" then - -- data = require(config_name) - _G._NVCHAD_CONFIG_CONTENTS = require("utils").merge_table(_G._NVCHAD_CONFIG_CONTENTS, config) - else - print("Warning: " .. config_name .. " sourced successfully but did not return a lua table.") - end - else - print("Warning: " .. config_file .. " is present but sourcing failed.") - end - end - return _G._NVCHAD_CONFIG_CONTENTS -end - --- reload a plugin ( will try to load even if not loaded) --- can take a string or list ( table ) --- return true or false -M.reload_plugin = function(plugins) - local status = true - local function _reload_plugin(plugin) - local loaded = package.loaded[plugin] - if loaded then - package.loaded[plugin] = nil - end - if not pcall(require, plugin) then - print("Error: Cannot load " .. plugin .. " plugin!") - status = false - end - end - - if type(plugins) == "string" then - _reload_plugin(plugins) - elseif type(plugins) == "table" then - for _, plugin in ipairs(plugins) do - _reload_plugin(plugin) - end - end - return status -end - --- reload themes without restarting vim --- if no theme name given then reload the current theme -M.reload_theme = function(theme_name) - local reload_plugin = require("utils").reload_plugin - - -- if theme name is empty or nil, then reload the current theme - if theme_name == nil or theme_name == "" then - theme_name = vim.g.nvchad_theme - end - - if not pcall(require, "themes/" .. theme_name) then - print("No such theme ( " .. theme_name .. " )") - return false - end - - vim.g.nvchad_theme = theme_name - - -- reload the base16 theme - local ok, base16 = pcall(require, "base16") - if not ok then - print "Error: Cannot load base16 plugin!" - return false - end - base16(base16.themes(theme_name), true) - - if - not reload_plugin { - "highlights", - "plugins.bufferline", - "galaxyline", - "plugins.statusline", - } - then - print "Error: Not able to reload all plugins." - return false - end - - -- yes, this is very hacky, but due to new_async in - -- https://github.com/glepnir/galaxyline.nvim/blob/main/lua/galaxyline/provider.lua#L5-L36 - -- it doesn't work properly and some statusline stuff dissapears - local vcs = require "galaxyline.provider_vcs" - local fileinfo = require "galaxyline.provider_fileinfo" - local buffer = require "galaxyline.provider_buffer" - local extension = require "galaxyline.provider_extensions" - local whitespace = require "galaxyline.provider_whitespace" - local lspclient = require "galaxyline.provider_lsp" - _G.galaxyline_providers = { - BufferIcon = buffer.get_buffer_type_icon, - BufferNumber = buffer.get_buffer_number, - FileTypeName = buffer.get_buffer_filetype, - GitBranch = vcs.get_git_branch, - DiffAdd = vcs.diff_add, - DiffModified = vcs.diff_modified, - DiffRemove = vcs.diff_remove, - LineColumn = fileinfo.line_column, - FileFormat = fileinfo.get_file_format, - FileEncode = fileinfo.get_file_encode, - FileSize = fileinfo.get_file_size, - FileIcon = fileinfo.get_file_icon, - FileName = fileinfo.get_current_file_name, - SFileName = fileinfo.filename_in_special_buffer, - LinePercent = fileinfo.current_line_percent, - ScrollBar = extension.scrollbar_instance, - VistaPlugin = extension.vista_nearest, - WhiteSpace = whitespace.get_item, - GetLspClient = lspclient.get_lsp_client, - } - local diagnostic = require "galaxyline.provider_diagnostic" - _G.galaxyline_providers.DiagnosticError = diagnostic.get_diagnostic_error - _G.galaxyline_providers.DiagnosticWarn = diagnostic.get_diagnostic_warn - _G.galaxyline_providers.DiagnosticHint = diagnostic.get_diagnostic_hint - _G.galaxyline_providers.DiagnosticInfo = diagnostic.get_diagnostic_info - - return true -end - --- toggle between 2 themes --- argument should be a table with 2 theme names -M.toggle_theme = function(themes) - local current_theme = vim.g.current_nvchad_theme or vim.g.nvchad_theme - for _, name in ipairs(themes) do - if name ~= current_theme then - if require("utils").reload_theme(name) then - -- open a buffer and close it to reload the statusline - vim.cmd "new|bwipeout" - vim.g.current_nvchad_theme = name - if M.change_theme(vim.g.nvchad_theme, name) then - vim.g.nvchad_theme = name - end - end - end - end -end - --- update nvchad -M.update_nvchad = function() - -- in all the comments below, config means user config - local config_path = vim.fn.stdpath "config" - local config_name = vim.g.nvchad_user_config or "chadrc" - local config_file = config_path .. "/lua/" .. config_name .. ".lua" - -- generate a random file name - local config_file_backup = config_path .. "/" .. config_name .. ".lua.bak." .. math.random() - local utils = require "utils" - local echo = utils.echo - local current_config = utils.load_config() - local update_url = current_config.options.update_url or "https://github.com/NvChad/NvChad" - local update_branch = current_config.options.update_branch or "main" - - -- ask the user for confirmation to update because we are going to run git reset --hard - echo { { "Url: ", "Title" }, { update_url } } - echo { { "Branch: ", "Title" }, { update_branch } } - echo { - { "\nUpdater will run", "WarningMsg" }, - { " git reset --hard " }, - { - "in config folder, so changes to existing repo files except ", - "WarningMsg", - }, - - { config_name }, - { " will be lost!\n\nUpdate NvChad ? [y/N]", "WarningMsg" }, - } - - local ans = string.lower(vim.fn.input "-> ") == "y" - utils.clear_cmdline() - if not ans then - echo { { "Update cancelled!", "Title" } } - return - end - - -- first try to fetch contents of config, this will make sure it is readable and taking backup of its contents - local config_contents = utils.file("r", config_file) - -- also make a local backup in ~/.config/nvim, will be removed when config is succesfully restored - utils.file("w", config_file_backup, config_contents) - -- write original config file with its contents, will make sure charc is writable, this maybe overkill but a little precaution always helps - utils.file("w", config_file, config_contents) - - -- function that will executed when git commands are done - local function update_exit(_, code) - -- restore config file irrespective of whether git commands were succesfull or not - if pcall(function() - utils.file("w", config_file, config_contents) - end) then - -- config restored succesfully, remove backup file that was created - if not pcall(os.remove, config_file_backup) then - echo { { "Warning: Failed to remove backup chadrc, remove manually.", "WarningMsg" } } - echo { { "Path: ", "WarningMsg" }, { config_file_backup } } - end - else - echo { { "Error: Restoring " .. config_name .. " failed.\n", "ErrorMsg" } } - echo { { "Backed up " .. config_name .. " path: " .. config_file_backup .. "\n\n", "None" } } - end - - -- close the terminal buffer only if update was success, as in case of error, we need the error message - if code == 0 then - vim.cmd "bd!" - echo { { "NvChad succesfully updated.\n", "String" } } - else - echo { { "Error: NvChad Update failed.\n", "ErrorMsg" } } - end - end - - -- git commands that will executed, reset in case config was modfied - -- use --rebase, to not mess up if the local repo is outdated - local update_script = table.concat({ - "git reset --hard && git pull --set-upstream", - update_url, - update_branch, - "--rebase", - }, " ") - - -- open a new buffer - vim.cmd "new" - -- finally open the pseudo terminal buffer - vim.fn.termopen(update_script, { - -- change dir to config path so we don't need to move in script - cwd = config_path, - on_exit = update_exit, - }) -end - -return M From e1d0678f6ee5b663f9f7bfc06658ae0d4912e3e4 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 21 Aug 2021 22:29:15 +0530 Subject: [PATCH 0616/1541] mappings: Add PackerClean command --- lua/core/mappings.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 340fd94..9722b4e 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -98,6 +98,7 @@ M.misc = function() -- terminal mappings end -- -- Add Packer commands because we are not loading it at startup + cmd "silent! command PackerClean lua require 'plugins' require('packer').clean()" cmd "silent! command PackerCompile lua require 'plugins' require('packer').compile()" cmd "silent! command PackerInstall lua require 'plugins' require('packer').install()" cmd "silent! command PackerStatus lua require 'plugins' require('packer').status()" From 3719521d9aa27e310654161579c2bb87aec0f12d Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 21 Aug 2021 23:51:36 +0530 Subject: [PATCH 0617/1541] Disable statusline in dashboard need here because out custom statusline hide function doesn't care about dashboard settings --- lua/default_config.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/default_config.lua b/lua/default_config.lua index c744f8f..64c76a6 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -30,6 +30,7 @@ M.ui = { hidden = { "NvimTree", "terminal", + "dashboard", }, shown = {}, -- default, round , slant , block , arrow From aa95c05179dfb9a348fd887cca0c7671bab5a820 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 22 Aug 2021 08:40:23 +0530 Subject: [PATCH 0618/1541] Remove some unneeded events when hiding statusline dunno why cmdwinenter was there term enter is not needed as it will handled with Buf events use filetype events as a buffer may not trigger other events but change the filetype --- lua/core/autocmds.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index 56306b8..c74ef95 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -9,7 +9,7 @@ vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype terminal ]] -- Don't show status line on certain windows -vim.cmd [[ autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * lua require("core.utils").hide_statusline() ]] +vim.cmd [[ autocmd BufEnter,BufWinEnter,FileType,WinEnter * lua require("core.utils").hide_statusline() ]] -- Open a file from its last left off position -- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] From e08a46054373c891c522b72137a9e46f7458875c Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 22 Aug 2021 08:51:52 +0530 Subject: [PATCH 0619/1541] config: Expose tabstop option --- lua/chadrc.lua | 1 + lua/core/options.lua | 2 ++ lua/default_config.lua | 1 + 3 files changed, 4 insertions(+) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 8a35f0f..0f7ad7e 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -52,6 +52,7 @@ M.options = { permanent_undo = true, shiftwidth = 2, smartindent = true, + tabstop = 8, -- Number of spaces that a in the file counts for timeoutlen = 400, relativenumber = false, ruler = false, diff --git a/lua/core/options.lua b/lua/core/options.lua index 5882103..149d556 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -31,9 +31,11 @@ opt.ruler = options.ruler -- disable nvim intro opt.shortmess:append "sI" + opt.signcolumn = "yes" opt.splitbelow = true opt.splitright = true +opt.tabstop = options.tabstop opt.termguicolors = true opt.timeoutlen = options.timeoutlen opt.undofile = options.permanent_undo diff --git a/lua/default_config.lua b/lua/default_config.lua index 64c76a6..08df822 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -54,6 +54,7 @@ M.options = { permanent_undo = true, shiftwidth = 2, smartindent = true, + tabstop = 8, -- Number of spaces that a in the file counts for timeoutlen = 400, relativenumber = false, ruler = false, From 3ee3b0368a19859bfc480685481aadc894aa2018 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 22 Aug 2021 11:58:15 +0530 Subject: [PATCH 0620/1541] config: Seperate plugin and non-plugin configs --- lua/chadrc.lua | 151 +++++++++++++++++++-------------------- lua/default_config.lua | 155 +++++++++++++++++++++-------------------- 2 files changed, 155 insertions(+), 151 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 0f7ad7e..2cec148 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -2,6 +2,7 @@ local M = {} +-- non plugin ui configs, available without any plugins M.ui = { italic_comments = false, @@ -20,23 +21,22 @@ M.ui = { -- Enable this only if your terminal has the colorscheme set which nvchad uses -- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal transparency = false, +} - -- plugin related ui options - plugin = { - -- statusline related options - statusline = { - -- these are filetypes, not pattern matched - -- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden - hidden = {}, - shown = { - -- "terminal" - }, - -- default, round , slant , block , arrow - style = "default", - }, +-- plugin related ui options +M.ui.plugin = { + -- statusline related options + statusline = { + -- these are filetypes, not pattern matched + -- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden + hidden = {}, + shown = {}, + -- default, round , slant , block , arrow + style = "default", }, } +-- non plugin normal, available without any plugins M.options = { clipboard = "unnamedplus", cmdheight = 1, @@ -60,13 +60,13 @@ M.options = { -- used for updater update_url = "https://github.com/NvChad/NvChad", update_branch = "main", +} - -- these are plugin related options - plugin = { - autosave = false, -- autosave on changed text or insert mode leave - -- timeout to be used for using escape with a key combination, see mappings.plugin.better_escape - esc_insertmode_timeout = 300, - }, +-- these are plugin related options +M.options.plugin = { + autosave = false, -- autosave on changed text or insert mode leave + -- timeout to be used for using escape with a key combination, see mappings.plugin.better_escape + esc_insertmode_timeout = 300, } -- enable and disable plugins (false for disable) @@ -91,7 +91,8 @@ M.plugin_status = { vim_matchup = true, -- % magic, match it but improved } --- make sure you dont use same keys twice +-- mappings -- don't use a single keymap twice -- +-- non plugin mappings M.mappings = { -- close current focused buffer close_buffer = "x", @@ -131,62 +132,62 @@ M.mappings = { -- update nvchad from nvchad, chadness 101 update_nvchad = "uu", +} - -- all plugins related mappings - -- to get short info about a plugin, see the respective string in plugin_status, if not present, then info here - plugin = { - bufferline = { - next_buffer = "", -- next buffer - prev_buffer = "", -- previous buffer - }, - chadsheet = { - default_keys = "dk", - user_keys = "uk", - }, - comment = { - toggle = "/", -- trigger comment on a single/selected lines/number prefix - }, - dashboard = { - bookmarks = "bm", - new_file = "fn", -- basically create a new buffer - open = "db", -- open dashboard - session_load = "l", -- load a saved session - session_save = "s", -- save a session - }, - -- note: this is an edditional mapping to escape, escape key will still work - better_escape = { - esc_insertmode = { "jk" }, -- multiple mappings allowed - }, - nvimtree = { - toggle = "", -- file manager - }, - neoformat = { - format = "fm", - }, - telescope = { - buffers = "fb", - find_files = "ff", - git_commits = "cm", - git_status = "gt", - help_tags = "fh", - live_grep = "fw", - oldfiles = "fo", - themes = "th", - }, - telescope_media = { - media_files = "fp", - }, - truezen = { -- distraction free modes mapping, hide statusline, tabline, line numbers - ataraxis_mode = "zz", -- center - focus_mode = "zf", - minimalistic_mode = "zm", -- as it is - }, - vim_fugitive = { - diff_get_2 = "gh", - diff_get_3 = "gl", - git = "gs", - git_blame = "gb", - }, +-- all plugins related mappings +-- to get short info about a plugin, see the respective string in plugin_status, if not present, then info here +M.mappings.plugin = { + bufferline = { + next_buffer = "", -- next buffer + prev_buffer = "", -- previous buffer + }, + chadsheet = { + default_keys = "dk", + user_keys = "uk", + }, + comment = { + toggle = "/", -- trigger comment on a single/selected lines/number prefix + }, + dashboard = { + bookmarks = "bm", + new_file = "fn", -- basically create a new buffer + open = "db", -- open dashboard + session_load = "l", -- load a saved session + session_save = "s", -- save a session + }, + -- note: this is an edditional mapping to escape, escape key will still work + better_escape = { + esc_insertmode = { "jk" }, -- multiple mappings allowed + }, + nvimtree = { + toggle = "", -- file manager + }, + neoformat = { + format = "fm", + }, + telescope = { + buffers = "fb", + find_files = "ff", + git_commits = "cm", + git_status = "gt", + help_tags = "fh", + live_grep = "fw", + oldfiles = "fo", + themes = "th", + }, + telescope_media = { + media_files = "fp", + }, + truezen = { -- distraction free modes mapping, hide statusline, tabline, line numbers + ataraxis_mode = "zz", -- center + focus_mode = "zf", + minimalistic_mode = "zm", -- as it is + }, + vim_fugitive = { + diff_get_2 = "gh", + diff_get_3 = "gl", + git = "gs", + git_blame = "gb", }, } diff --git a/lua/default_config.lua b/lua/default_config.lua index 08df822..1f5df32 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -2,6 +2,7 @@ local M = {} +-- non plugin ui configs, available without any plugins M.ui = { italic_comments = false, @@ -20,25 +21,26 @@ M.ui = { -- Enable this only if your terminal has the colorscheme set which nvchad uses -- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal transparency = false, +} - -- plugin related ui options - plugin = { - -- statusline related options - statusline = { - -- these are filetypes, not pattern matched - -- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden - hidden = { - "NvimTree", - "terminal", - "dashboard", - }, - shown = {}, - -- default, round , slant , block , arrow - style = "default", +-- plugin related ui options +M.ui.plugin = { + -- statusline related options + statusline = { + -- these are filetypes, not pattern matched + -- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden + hidden = { + "NvimTree", + "terminal", + "dashboard", }, + shown = {}, + -- default, round , slant , block , arrow + style = "default", }, } +-- non plugin normal, available without any plugins M.options = { clipboard = "unnamedplus", cmdheight = 1, @@ -62,13 +64,13 @@ M.options = { -- used for updater update_url = "https://github.com/NvChad/NvChad", update_branch = "main", +} - -- these are plugin related options - plugin = { - autosave = false, -- autosave on changed text or insert mode leave - -- timeout to be used for using escape with a key combination, see mappings.plugin.better_escape - esc_insertmode_timeout = 300, - }, +-- these are plugin related options +M.options.plugin = { + autosave = false, -- autosave on changed text or insert mode leave + -- timeout to be used for using escape with a key combination, see mappings.plugin.better_escape + esc_insertmode_timeout = 300, } -- enable and disable plugins (false for disable) @@ -93,7 +95,8 @@ M.plugin_status = { vim_matchup = true, -- % magic, match it but improved } --- make sure you dont use same keys twice +-- mappings -- don't use a single keymap twice -- +-- non plugin mappings M.mappings = { -- close current focused buffer close_buffer = "x", @@ -133,62 +136,62 @@ M.mappings = { -- update nvchad from nvchad, chadness 101 update_nvchad = "uu", +} - -- all plugins related mappings - -- to get short info about a plugin, see the respective string in plugin_status, if not present, then info here - plugin = { - bufferline = { - next_buffer = "", -- next buffer - prev_buffer = "", -- previous buffer - }, - chadsheet = { - default_keys = "dk", - user_keys = "uk", - }, - comment = { - toggle = "/", -- trigger comment on a single/selected lines/number prefix - }, - dashboard = { - bookmarks = "bm", - new_file = "fn", -- basically create a new buffer - open = "db", -- open dashboard - session_load = "l", -- load a saved session - session_save = "s", -- save a session - }, - -- note: this is an edditional mapping to escape, escape key will still work - better_escape = { - esc_insertmode = { "jk" }, -- multiple mappings allowed - }, - nvimtree = { - toggle = "", -- file manager - }, - neoformat = { - format = "fm", - }, - telescope = { - buffers = "fb", - find_files = "ff", - git_commits = "cm", - git_status = "gt", - help_tags = "fh", - live_grep = "fw", - oldfiles = "fo", - themes = "th", - }, - telescope_media = { - media_files = "fp", - }, - truezen = { -- distraction free modes mapping, hide statusline, tabline, line numbers - ataraxis_mode = "zz", -- center - focus_mode = "zf", - minimalistic_mode = "zm", -- as it is - }, - vim_fugitive = { - diff_get_2 = "gh", - diff_get_3 = "gl", - git = "gs", - git_blame = "gb", - }, +-- all plugins related mappings +-- to get short info about a plugin, see the respective string in plugin_status, if not present, then info here +M.mappings.plugin = { + bufferline = { + next_buffer = "", -- next buffer + prev_buffer = "", -- previous buffer + }, + chadsheet = { + default_keys = "dk", + user_keys = "uk", + }, + comment = { + toggle = "/", -- trigger comment on a single/selected lines/number prefix + }, + dashboard = { + bookmarks = "bm", + new_file = "fn", -- basically create a new buffer + open = "db", -- open dashboard + session_load = "l", -- load a saved session + session_save = "s", -- save a session + }, + -- note: this is an edditional mapping to escape, escape key will still work + better_escape = { + esc_insertmode = { "jk" }, -- multiple mappings allowed + }, + nvimtree = { + toggle = "", -- file manager + }, + neoformat = { + format = "fm", + }, + telescope = { + buffers = "fb", + find_files = "ff", + git_commits = "cm", + git_status = "gt", + help_tags = "fh", + live_grep = "fw", + oldfiles = "fo", + themes = "th", + }, + telescope_media = { + media_files = "fp", + }, + truezen = { -- distraction free modes mapping, hide statusline, tabline, line numbers + ataraxis_mode = "zz", -- center + focus_mode = "zf", + minimalistic_mode = "zm", -- as it is + }, + vim_fugitive = { + diff_get_2 = "gh", + diff_get_3 = "gl", + git = "gs", + git_blame = "gb", }, } From ef40dfcbc192c8aca6862350ab5860ac269d9fd7 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 22 Aug 2021 13:15:25 +0530 Subject: [PATCH 0621/1541] plugins: Properly lazy load telescope from packer docs module = string or list -- Specifies Lua module names for require. When requiring a string which starts -- with one of these module names, the plugin will be loaded. --- lua/plugins/init.lua | 72 +++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 2068684..1701b08 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -73,41 +73,6 @@ return packer.startup(function() end, } - use { - "nvim-telescope/telescope.nvim", - after = "plenary.nvim", - requires = { - { - "sudormrfbin/cheatsheet.nvim", - disable = not plugin_status.cheatsheet, - after = "telescope.nvim", - config = function() - require "plugins.configs.chadsheet" - end, - setup = function() - require("core.mappings").chadsheet() - end, - }, - { - "nvim-telescope/telescope-fzf-native.nvim", - run = "make", - }, - { - "nvim-telescope/telescope-media-files.nvim", - disable = not plugin_status.telescope_media, - setup = function() - require("core.mappings").telescope_media() - end, - }, - }, - config = function() - require "plugins.configs.telescope" - end, - setup = function() - require("core.mappings").telescope() - end, - } - -- load autosave only if its globally enabled use { disable = not plugin_status.autosave, @@ -291,6 +256,43 @@ return packer.startup(function() end, } + use { + "nvim-telescope/telescope.nvim", + cmd = "Telescope", + -- because cheatsheet is not activated by a teleacope command + module = "cheatsheet", + requires = { + { + "sudormrfbin/cheatsheet.nvim", + disable = not plugin_status.cheatsheet, + after = "telescope.nvim", + config = function() + require "plugins.configs.chadsheet" + end, + setup = function() + require("core.mappings").chadsheet() + end, + }, + { + "nvim-telescope/telescope-fzf-native.nvim", + run = "make", + }, + { + "nvim-telescope/telescope-media-files.nvim", + disable = not plugin_status.telescope_media, + setup = function() + require("core.mappings").telescope_media() + end, + }, + }, + config = function() + require "plugins.configs.telescope" + end, + setup = function() + require("core.mappings").telescope() + end, + } + use { "Pocco81/TrueZen.nvim", disable = not plugin_status.truezen, From a82f71334fbfebd65fc76e57825dda6259083147 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 22 Aug 2021 16:05:50 +0530 Subject: [PATCH 0622/1541] telescope-media: Check if ueberzug is available before loading the extension --- lua/plugins/configs/telescope.lua | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 9496667..ee55f63 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -65,23 +65,24 @@ telescope.setup { }, } -if - not pcall(function() - -- NvChad pickers - -- load the theme_switcher extension - telescope.load_extension "themes" - -- load the term_picker extension - telescope.load_extension "terms" +local extensions = { "themes", "terms", "fzf" } +local packer_repos = [["core", "telescope-fzf-native.nvim"]] - telescope.load_extension "fzf" - telescope.load_extension "media_files" - end) -then +if vim.fn.executable "ueberzug" == 1 then + table.insert(extensions, "media_files") + packer_repos = packer_repos .. ', "telescope-media-files.nvim"' +end + +if not pcall(function() + for _, ext in ipairs(extensions) do + telescope.load_extension(ext) + end +end) then -- This should only trigger when in need of PackerSync, so better do it print "After completion of PackerCompile, restart neovim." -- Trigger packer compile on PackerComplete, so it properly waits for PackerSync vim.cmd 'autocmd User PackerComplete ++once lua print "Waiting for PackerCompile.." require("packer").compile()' vim.cmd 'autocmd User PackerCompileDone ++once echo "Packer Compile done, restart neovim."' require "plugins" - require("packer").update("core", "telescope-fzf-native.nvim", "telescope-media-files.nvim") + loadstring('require("packer").update(' .. packer_repos .. ")")() end From a28a838c06e22897df46d362e2973780b36f7b88 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 22 Aug 2021 17:47:14 +0530 Subject: [PATCH 0623/1541] NvChad/core -> Nvchad/extensions --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 1701b08..e652089 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -13,7 +13,7 @@ return packer.startup(function() -- this is the nvchad core repo containing utilities for some features like theme swticher, no need to lazy load use { - "Nvchad/core", + "Nvchad/extensions", } use { From bf3d4b31a696676f4756318383383a7cf5973f69 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 22 Aug 2021 17:57:59 +0530 Subject: [PATCH 0624/1541] Missed in previous commit --- lua/plugins/configs/telescope.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index ee55f63..697d08c 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -66,7 +66,7 @@ telescope.setup { } local extensions = { "themes", "terms", "fzf" } -local packer_repos = [["core", "telescope-fzf-native.nvim"]] +local packer_repos = [["extensions", "telescope-fzf-native.nvim"]] if vim.fn.executable "ueberzug" == 1 then table.insert(extensions, "media_files") From f97490d179bd9b5f5303cc17ef9f984e74d57113 Mon Sep 17 00:00:00 2001 From: Niels Mentink Date: Sun, 22 Aug 2021 16:09:45 +0200 Subject: [PATCH 0625/1541] Added a command to quickly spin up a working NvChad docker container --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 59ba045..1911549 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,20 @@ It would be nice if NvChad focuses on existing plugins and config before adding - Make NvChad more and more faster (reduce startup time as low as possible). - Add more themes. -# Chad contributors +# Try in docker + +Try NvChad in a docker container. This will leave your current Neovim configuration untouched. Once you exit Neovim, the image is deleted. + +```zsh + docker run -w /root -it --rm alpine:edge sh -uelic ' + apk add git nodejs neovim ripgrep alpine-sdk --update + git clone https://github.com/NvChad/NvChad ~/.config/nvim + nvim -c "autocmd User PackerComplete quitall" -c "PackerSync" + nvim + ' +``` + +# Chad contributors From a65368aed97ca843a4265077b2b9089c611f2c29 Mon Sep 17 00:00:00 2001 From: Nicolas Dermine Date: Sun, 22 Aug 2021 20:57:18 +0200 Subject: [PATCH 0626/1541] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1911549..6320cc6 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,7 @@ I get hearings from some plugin devs that nvchad users bring issues on discourse ## :gift_heart: Support -I (siduck76) would happily accept donations but I would be upset and feel bad since Im not the only one who has worked on NvChad. NvChad has been made possible by many contributors so dividing the donations for just me feels very bad and thanks to all the plugin creators once again :'). If you enjoy using NvChad and would like to show your support trully and show your appreciation to my work then try to be a better you! Help the needy people whenever possible (in real life), do some charity.Be nice to your parents and loved ones.Do not be rude , always try to be helpful / caring to one another, stray animals. Its easier to hate now and harder to care , hate used to be rare but now you see it everywhere. Please be respectful to any software/work done by other people rather than making fun of them. Do not compare software (In a bad way). Im grateful to be even able to use neovim! But cant still be fully happy when I think there are people who barely get food to eat, starve for weeks, dont have access to proper education, comupters, basic health care facilities etc. +I (siduck76) would happily accept donations but I would be upset and feel bad since Im not the only one who has worked on NvChad. NvChad has been made possible by many contributors so dividing the donations for just me feels very bad and thanks to all the plugin creators once again :'). If you enjoy using NvChad and would like to show your support truly and show your appreciation to my work then try to be a better you! Help the needy people whenever possible (in real life), do some charity.Be nice to your parents and loved ones.Do not be rude , always try to be helpful / caring to one another, stray animals. Its easier to hate now and harder to care , hate used to be rare but now you see it everywhere. Please be respectful to any software/work done by other people rather than making fun of them. Do not compare software (In a bad way). Im grateful to be even able to use neovim! But cant still be fully happy when I think there are people who barely get food to eat, starve for weeks, dont have access to proper education, comupters, basic health care facilities etc. The following links are some donation (gofundme) links for supporting needy people. Feel free to donate if you can : From 49c809b6beebcd846b8927b86e5eaeddd7553328 Mon Sep 17 00:00:00 2001 From: Charlie Strawn Date: Sun, 22 Aug 2021 19:44:33 -0500 Subject: [PATCH 0627/1541] fix contribute link in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6320cc6..15a65e0 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Install - Contribute + Contribute Support From b2ec48ef3052bb26d7d97b0a552b00a1e0b7767a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 23 Aug 2021 16:06:02 +0530 Subject: [PATCH 0628/1541] avoid using global function : lspconfig --- lua/plugins/configs/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 19e7f99..21c8b74 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -90,7 +90,7 @@ lspinstall.post_install_hook = function() end -- replace the default lsp diagnostic symbols -function lspSymbol(name, icon) +local function lspSymbol(name, icon) vim.fn.sign_define("LspDiagnosticsSign" .. name, { text = icon, numhl = "LspDiagnosticsDefaul" .. name }) end From ac83f1d580e40fa1cdcb76b3684b456a6c24f0d3 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 23 Aug 2021 16:44:52 +0530 Subject: [PATCH 0629/1541] add mapping to focus nvimtree (349) --- lua/core/mappings.lua | 1 + lua/default_config.lua | 6 ++++-- lua/plugins/init.lua | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 9722b4e..358c843 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -158,6 +158,7 @@ end M.nvimtree = function() map("n", plugin_maps.nvimtree.toggle, ":NvimTreeToggle ", opt) + map("n", plugin_maps.nvimtree.focus, ":NvimTreeFocus ", opt) end M.neoformat = function() diff --git a/lua/default_config.lua b/lua/default_config.lua index 1f5df32..afa0370 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -157,14 +157,16 @@ M.mappings.plugin = { new_file = "fn", -- basically create a new buffer open = "db", -- open dashboard session_load = "l", -- load a saved session - session_save = "s", -- save a session + session_save = "s", }, -- note: this is an edditional mapping to escape, escape key will still work better_escape = { esc_insertmode = { "jk" }, -- multiple mappings allowed }, nvimtree = { - toggle = "", -- file manager + -- file tree + toggle = "", + focus = "", }, neoformat = { format = "fm", diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e652089..3ecf339 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -247,7 +247,7 @@ return packer.startup(function() -- file managing , picker etc use { "kyazdani42/nvim-tree.lua", - cmd = "NvimTreeToggle", + cmd = {"NvimTreeToggle", "NvimTreeFocus"}, config = function() require "plugins.configs.nvimtree" end, From 6fbb503a16c37fdd238c9531ddefdc4865d3ad30 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 23 Aug 2021 17:15:29 +0530 Subject: [PATCH 0630/1541] use ascending sorting : telescope (#346) --- lua/plugins/configs/telescope.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 697d08c..7b887cb 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -19,7 +19,7 @@ telescope.setup { entry_prefix = " ", initial_mode = "insert", selection_strategy = "reset", - sorting_strategy = "descending", + sorting_strategy = "ascending", layout_strategy = "horizontal", layout_config = { horizontal = { From 09f6c4c06776d8586f22de7ed71acfd5098d23f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Mon, 23 Aug 2021 14:20:24 +0200 Subject: [PATCH 0631/1541] fix: don't hide dot files by default --- lua/plugins/configs/nvimtree.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index fbfb4a8..8bc3cb4 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -17,7 +17,7 @@ g.nvim_tree_disable_netrw = 1 g.nvim_tree_follow = 1 g.nvim_tree_git_hl = 1 g.nvim_tree_gitignore = 1 -g.nvim_tree_hide_dotfiles = 1 +g.nvim_tree_hide_dotfiles = 0 g.nvim_tree_highlight_opened_files = 0 g.nvim_tree_hijack_netrw = 0 g.nvim_tree_indent_markers = 1 From fba26a3a4030a5ff4b0951c62446a1e827e73305 Mon Sep 17 00:00:00 2001 From: Noah Lidell Date: Mon, 23 Aug 2021 18:11:02 -0500 Subject: [PATCH 0632/1541] commands to load fugitive --- lua/plugins/init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 3ecf339..f5aaef1 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -314,6 +314,11 @@ return packer.startup(function() disable = not plugin_status.vim_fugitive, cmd = { "Git", + "Gdiff", + "Gdiffsplit", + "Gvdiffsplit", + "Gwrite", + "Gw", }, setup = function() require("core.mappings").vim_fugitive() From bce7e624e2a8cfbe736440c0fb387542dc5bf25f Mon Sep 17 00:00:00 2001 From: Cam Cope Date: Mon, 23 Aug 2021 18:16:47 -0700 Subject: [PATCH 0633/1541] Add LSP code action mappings Tested with rust-analyzer --- lua/plugins/configs/lspconfig.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 21c8b74..e3681b5 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -31,6 +31,8 @@ local function on_attach(client, bufnr) vim.api.nvim_buf_set_keymap(bufnr, "n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", 'ca', 'lua vim.lsp.buf.code_action()', opts) + vim.api.nvim_buf_set_keymap(bufnr, "v", 'ca', 'lua vim.lsp.buf.range_code_action()', opts) -- Set some keybinds conditional on server capabilities if client.resolved_capabilities.document_formatting then From a3dbef5872f2f0bc71fce4eb603ab3bf1836d69f Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Tue, 24 Aug 2021 14:20:32 +1000 Subject: [PATCH 0634/1541] fix statusline bug, handle all Vim modes --- lua/plugins/configs/statusline.lua | 32 ++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 06b94ac..b2a71c8 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -216,20 +216,30 @@ gls.right[3] = { } local mode_colors = { - [110] = { "NORMAL", colors.red }, - [105] = { "INSERT", colors.dark_purple }, - [99] = { "COMMAND", colors.pink }, - [116] = { "TERMINAL", colors.green }, - [118] = { "VISUAL", colors.cyan }, - [22] = { "V-BLOCK", colors.cyan }, - [86] = { "V_LINE", colors.cyan }, - [82] = { "REPLACE", colors.orange }, - [115] = { "SELECT", colors.nord_blue }, - [83] = { "S-LINE", colors.nord_blue }, + ['n'] = { "NORMAL", colors.red }, + ['no'] = { "N-PENDING", colors.red }, + ['i'] = { "INSERT", colors.dark_purple }, + ['ic'] = { "INSERT", colors.dark_purple }, + ['t'] = { "TERMINAL", colors.green }, + ['v'] = { "VISUAL", colors.cyan }, + ['V'] = { "V-LINE", colors.cyan }, + [''] = { "V-BLOCK", colors.cyan }, + ['R'] = { "REPLACE", colors.orange }, + ['Rv'] = { "V-REPLACE", colors.orange }, + ['s'] = { "SELECT", colors.nord_blue }, + ['S'] = { "S-LINE", colors.nord_blue }, + [''] = { "S-BLOCK", colors.nord_blue }, + ['c'] = { "COMMAND", colors.pink }, + ['cv'] = { "COMMAND", colors.pink }, + ['ce'] = { "COMMAND", colors.pink }, + ['r'] = { "PROMPT", colors.teal }, + ['rm'] = { "MORE", colors.teal }, + ['r?'] = { "CONFIRM", colors.teal }, + ['!'] = { "SHELL", colors.green }, } local mode = function(n) - return mode_colors[vim.fn.mode():byte()][n] + return mode_colors[vim.fn.mode()][n] end gls.right[4] = { From 7d74ca4767abf67ad1254ed1e820932155d71e24 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 24 Aug 2021 11:01:01 +0530 Subject: [PATCH 0635/1541] use default lspconfig --- lua/plugins/configs/lspconfig.lua | 65 +++++++++++++++---------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index e3681b5..55bc1af 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -4,42 +4,39 @@ if not (present1 or present2) then return end -local function on_attach(client, bufnr) - vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") +local function on_attach(_, bufnr) + local function buf_set_keymap(...) + vim.api.nvim_buf_set_keymap(bufnr, ...) + end + local function buf_set_option(...) + vim.api.nvim_buf_set_option(bufnr, ...) + end + -- Enable completion triggered by + buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") + + -- Mappings. local opts = { noremap = true, silent = true } - -- lsp Mappings. - vim.api.nvim_buf_set_keymap(bufnr, "n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", "lua vim.lsp.buf.declaration()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "gd", "lua vim.lsp.buf.definition()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "K", "lua vim.lsp.buf.hover()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "gi", "lua vim.lsp.buf.implementation()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "", "lua vim.lsp.buf.signature_help()", opts) - vim.api.nvim_buf_set_keymap( - bufnr, - "n", - "wl", - "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", - opts - ) - vim.api.nvim_buf_set_keymap(bufnr, "n", "gr", "lua vim.lsp.buf.references()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "rn", "lua vim.lsp.buf.rename()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "D", "lua vim.lsp.buf.type_definition()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", 'ca', 'lua vim.lsp.buf.code_action()', opts) - vim.api.nvim_buf_set_keymap(bufnr, "v", 'ca', 'lua vim.lsp.buf.range_code_action()', opts) - - -- Set some keybinds conditional on server capabilities - if client.resolved_capabilities.document_formatting then - vim.api.nvim_buf_set_keymap(bufnr, "n", "f", "lua vim.lsp.buf.formatting()", opts) - elseif client.resolved_capabilities.document_range_formatting then - vim.api.nvim_buf_set_keymap(bufnr, "n", "f", "lua vim.lsp.buf.range_formatting()", opts) - end + -- See `:help vim.lsp.*` for documentation on any of the below functions + buf_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) + buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) + buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()", opts) + buf_set_keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) + buf_set_keymap("n", "", "lua vim.lsp.buf.signature_help()", opts) + buf_set_keymap("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) + buf_set_keymap("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) + buf_set_keymap("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) + buf_set_keymap("n", "D", "lua vim.lsp.buf.type_definition()", opts) + buf_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", opts) + buf_set_keymap("n", "ca", "lua vim.lsp.buf.code_action()", opts) + buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()", opts) + buf_set_keymap("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) + buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) + buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) + buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) + buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) + buf_set_keymap("v", "ca", "lua vim.lsp.buf.range_code_action()", opts) end local capabilities = vim.lsp.protocol.make_client_capabilities() @@ -60,6 +57,8 @@ local function setup_servers() } elseif lang == "lua" then lspconfig[lang].setup { + on_attach = on_attach, + capabilities = capabilities, settings = { Lua = { diagnostics = { From 2f61dbfcd82cf8ed58afe4b5695fdf7fae2b5e78 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Tue, 24 Aug 2021 13:23:01 +0530 Subject: [PATCH 0636/1541] feat: Added border for lsp hover doc --- lua/plugins/configs/lspconfig.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 55bc1af..f0636f1 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -109,6 +109,12 @@ vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagn underline = true, update_in_insert = false, -- update diagnostics insert mode }) +vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { + border = "single", +}) +vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { + border = "single", +}) -- suppress error messages from lang servers vim.notify = function(msg, log_level, _opts) From bf3e9a323fcf7dd82adf14c286b44aa761d3d422 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 24 Aug 2021 15:37:38 +0530 Subject: [PATCH 0637/1541] make gitsigns plugin load on dir containing .git only --- lua/plugins/init.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index f5aaef1..f760882 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -60,14 +60,15 @@ return packer.startup(function() use { "nvim-lua/plenary.nvim", - after = "bufferline.nvim", } -- git stuff use { "lewis6991/gitsigns.nvim", disable = not plugin_status.gitsigns, - after = "plenary.nvim", + cond = function() + return vim.fn.isdirectory ".git" == 1 + end, config = function() require "plugins.configs.gitsigns" end, @@ -247,7 +248,7 @@ return packer.startup(function() -- file managing , picker etc use { "kyazdani42/nvim-tree.lua", - cmd = {"NvimTreeToggle", "NvimTreeFocus"}, + cmd = { "NvimTreeToggle", "NvimTreeFocus" }, config = function() require "plugins.configs.nvimtree" end, From cd5433d24b265e4d142d4a16788814da2350bc90 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 24 Aug 2021 15:58:33 +0530 Subject: [PATCH 0638/1541] fix incorrect bg in tokyonight theme --- lua/colors/themes/tokyonight.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/colors/themes/tokyonight.lua b/lua/colors/themes/tokyonight.lua index 5f7df4b..3fb9b7c 100644 --- a/lua/colors/themes/tokyonight.lua +++ b/lua/colors/themes/tokyonight.lua @@ -1,7 +1,7 @@ local colors = { white = "#c0caf5", darker_black = "#151621", - black = "#171823", -- nvim bg + black = "#1A1B26", -- nvim bg black2 = "#20212c", one_bg = "#242530", one_bg2 = "#292a35", From c66fb4ff3d149f6b388c10f9a1f9f537278c305a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 24 Aug 2021 21:15:05 +0530 Subject: [PATCH 0639/1541] add diagnostics options to bufferline/nvimtree --- lua/plugins/configs/bufferline.lua | 1 + lua/plugins/configs/nvimtree.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 8441bf0..10ed945 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -22,6 +22,7 @@ bufferline.setup { show_buffer_close_icons = true, separator_style = "thin", always_show_bufferline = true, + diagnostics = false, -- "or nvim-lsp" custom_filter = function(buf_number) -- Func to filter out our managed/persistent split terms local present_type, type = pcall(function() diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 8bc3cb4..4387569 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -28,6 +28,7 @@ g.nvim_tree_side = "left" g.nvim_tree_tab_open = 0 g.nvim_tree_update_cwd = 1 g.nvim_tree_width = 25 +g.nvim_tree_lsp_diagnostics = 0 g.nvim_tree_show_icons = { folders = 1, From 3dc1db884ca896da780ce6bc36154efab7f71e08 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 25 Aug 2021 05:11:55 +0530 Subject: [PATCH 0640/1541] disable some plugins by default --- lua/default_config.lua | 8 ++++---- lua/plugins/configs/lspconfig.lua | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lua/default_config.lua b/lua/default_config.lua index afa0370..949d85b 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -75,7 +75,7 @@ M.options.plugin = { -- enable and disable plugins (false for disable) M.plugin_status = { - autosave = true, -- to autosave files + autosave = false, -- to autosave files blankline = true, -- beautified blank lines bufferline = true, -- buffer shown as tabs cheatsheet = true, -- fuzzy search your commands/keymappings @@ -89,9 +89,9 @@ M.plugin_status = { lspsignature = true, -- lsp enhancements neoformat = true, -- universal formatter neoscroll = true, -- smooth scroll - telescope_media = true, -- see media files in telescope picker - truezen = true, -- no distraction mode for nvim - vim_fugitive = true, -- git in nvim + telescope_media = false, -- see media files in telescope picker + truezen = false, -- no distraction mode for nvim + vim_fugitive = false, -- git in nvim vim_matchup = true, -- % magic, match it but improved } diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index f0636f1..6902706 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,5 +1,6 @@ local present1, lspconfig = pcall(require, "lspconfig") local present2, lspinstall = pcall(require, "lspinstall") + if not (present1 or present2) then return end @@ -110,10 +111,10 @@ vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagn update_in_insert = false, -- update diagnostics insert mode }) vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { - border = "single", + border = "single", }) vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { - border = "single", + border = "single", }) -- suppress error messages from lang servers From 4828cfd282a6b8985d52276503966c0196c9eb83 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 25 Aug 2021 05:36:44 +0530 Subject: [PATCH 0641/1541] add mapping for finding hidden files with telescope (#360) --- lua/core/mappings.lua | 3 ++- lua/default_config.lua | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 358c843..6c36cd0 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -158,7 +158,7 @@ end M.nvimtree = function() map("n", plugin_maps.nvimtree.toggle, ":NvimTreeToggle ", opt) - map("n", plugin_maps.nvimtree.focus, ":NvimTreeFocus ", opt) + map("n", plugin_maps.nvimtree.focus, ":NvimTreeFocus ", opt) end M.neoformat = function() @@ -170,6 +170,7 @@ M.telescope = function() map("n", m.buffers, ":Telescope buffers ", opt) map("n", m.find_files, ":Telescope find_files ", opt) + map("n", m.find_hiddenfiles, ":Telescope find_files hidden=true ", opt) map("n", m.git_commits, ":Telescope git_commits ", opt) map("n", m.git_status, ":Telescope git_status ", opt) map("n", m.help_tags, ":Telescope help_tags ", opt) diff --git a/lua/default_config.lua b/lua/default_config.lua index 949d85b..63509a3 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -174,6 +174,7 @@ M.mappings.plugin = { telescope = { buffers = "fb", find_files = "ff", + find_hiddenfiles = "fa", git_commits = "cm", git_status = "gt", help_tags = "fh", From 49216a9c9335e2543f014181ac22cfc359f7a63b Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Wed, 25 Aug 2021 10:58:56 +0530 Subject: [PATCH 0642/1541] feat: Support for custom user mappings | Improve map function move map function to utils rearrange utils, was missed --- lua/chadrc.lua | 17 +++++ lua/core/mappings.lua | 141 +++++++++++++++++++------------------ lua/core/utils.lua | 156 +++++++++++++++++++++++++++-------------- lua/default_config.lua | 17 +++++ 4 files changed, 207 insertions(+), 124 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 2cec148..edadb13 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -1,6 +1,7 @@ -- IMPORTANT NOTE : This is the user config, can be edited. Will be preserved if updated with internal updater local M = {} +M.ui, M.options, M.plugin_status, M.mappings, M.custom = {}, {}, {}, {}, {} -- non plugin ui configs, available without any plugins M.ui = { @@ -191,4 +192,20 @@ M.mappings.plugin = { }, } +-- user custom mappings +-- e.g: name = { "mode" , "keys" , "cmd" , "options"} +-- name: can be empty or something unique with repect to other custom mappings +-- { mode, key, cmd } or name = { mode, key, cmd } +-- mode: usage: mode or { mode1, mode2 }, multiple modes allowed, available modes => :h map-modes, +-- keys: multiple keys allowed, same synxtax as modes +-- cmd: for vim commands, must use ':' at start and add at the end if want to execute +-- options: see :h nvim_set_keymap() opts section +M.custom.mappings = { + -- clear_all = { + -- "n", + -- "cc", + -- "gg0vG$d", + -- }, +} + return M diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 6c36cd0..547fe60 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -1,37 +1,26 @@ -local config = require("core.utils").load_config() +local utils = require "core.utils" + +local config = utils.load_config() +local map = utils.map + local maps = config.mappings local plugin_maps = maps.plugin + local cmd = vim.cmd -local function map(mode, lhs, rhs, opts) - local options = { noremap = true, silent = true } - if opts then - options = vim.tbl_extend("force", options, opts) - end - - -- if list of keys provided then run set for all of them - if type(lhs) == "table" then - for _, key in ipairs(lhs) do - vim.api.nvim_set_keymap(mode, key, rhs, options) - end - else - vim.api.nvim_set_keymap(mode, lhs, rhs, options) - end -end - -local opt, M = {}, {} +local M = {} -- these mappings will only be called during initialization M.misc = function() local function non_config_mappings() -- dont copy any deleted text , this is disabled by default so uncomment the below mappings if you want them - -- map("n", "dd", [=[ "_dd ]=], opt) - -- map("v", "dd", [=[ "_dd ]=], opt) - -- map("v", "x", [=[ "_x ]=], opt) + -- map("n", "dd", [=[ "_dd ]=]) + -- map("v", "dd", [=[ "_dd ]=]) + -- map("v", "x", [=[ "_x ]=]) -- todo: this should be configurable via chadrc -- Don't copy the replaced text after pasting in visual mode - map("v", "p", '"_dP', opt) + map("v", "p", '"_dP') -- Allow moving the cursor through wrapped lines with j, k, and -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ @@ -42,7 +31,7 @@ M.misc = function() map("", "", 'v:count ? "k" : "gk"', { expr = true }) -- use ESC to turn off search highlighting - map("n", "", ":noh ", opt) + map("n", "", ":noh ") end local function optional_mappings() @@ -50,12 +39,12 @@ M.misc = function() if config.options.insert_nav then local inav = maps.insert_nav - map("i", inav.backward, "", opt) - map("i", inav.end_of_line, "", opt) - map("i", inav.forward, "", opt) - map("i", inav.next_line, "", opt) - map("i", inav.prev_line, "", opt) - map("i", inav.top_of_line, "^i", opt) + map("i", inav.backward, "") + map("i", inav.end_of_line, "") + map("i", inav.forward, "") + map("i", inav.next_line, "") + map("i", inav.prev_line, "") + map("i", inav.top_of_line, "^i") end -- check the theme toggler @@ -70,21 +59,21 @@ M.misc = function() end local function required_mappings() - map("n", maps.close_buffer, ":lua require('core.utils').close_buffer() ", opt) -- close buffer - map("n", maps.copy_whole_file, ":%y+ ", opt) -- copy whole file content - map("n", maps.new_buffer, ":enew ", opt) -- new buffer - map("n", maps.new_tab, ":tabnew ", opt) -- new tabs - map("n", maps.line_number_toggle, ":set nu! ", opt) -- toggle numbers - map("n", maps.save_file, ":w ", opt) -- ctrl + s to save file + map("n", maps.close_buffer, ":lua require('core.utils').close_buffer() ") -- close buffer + map("n", maps.copy_whole_file, ":%y+ ") -- copy whole file content + map("n", maps.new_buffer, ":enew ") -- new buffer + map("n", maps.new_tab, ":tabnew ") -- new tabs + map("n", maps.line_number_toggle, ":set nu! ") -- toggle numbers + map("n", maps.save_file, ":w ") -- ctrl + s to save file -- terminal mappings -- local term_maps = maps.terminal -- get out of terminal mode - map("t", term_maps.esc_termmode, "", opt) + map("t", term_maps.esc_termmode, "") -- hide a term from within terminal mode - map("t", term_maps.esc_hide_termmode, " :lua require('core.utils').close_buffer() ", opt) + map("t", term_maps.esc_hide_termmode, " :lua require('core.utils').close_buffer() ") -- pick a hidden term - map("n", term_maps.pick_term, ":Telescope terms ", opt) + map("n", term_maps.pick_term, ":Telescope terms ") -- Open terminals -- TODO this opens on top of an existing vert/hori term, fixme map( @@ -93,8 +82,8 @@ M.misc = function() ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert ", opt ) - map("n", term_maps.new_vertical, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert ", opt) - map("n", term_maps.new_window, ":execute 'terminal' | let b:term_type = 'wind' | startinsert ", opt) + map("n", term_maps.new_vertical, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert ") + map("n", term_maps.new_window, ":execute 'terminal' | let b:term_type = 'wind' | startinsert ") -- terminal mappings end -- -- Add Packer commands because we are not loading it at startup @@ -107,12 +96,24 @@ M.misc = function() -- add NvChadUpdate command and mapping cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" - map("n", maps.update_nvchad, ":NvChadUpdate ", opt) + map("n", maps.update_nvchad, ":NvChadUpdate ") + end + + local function user_config_mappings() + local custom_maps = config.custom.mappings or "" + if type(custom_maps) ~= "table" then + return + end + + for _, map_table in pairs(custom_maps) do + map(unpack(map_table)) + end end non_config_mappings() optional_mappings() required_mappings() + user_config_mappings() end -- below are all plugin related mappinsg @@ -124,14 +125,14 @@ end M.bufferline = function() local m = plugin_maps.bufferline - map("n", m.next_buffer, ":BufferLineCycleNext ", opt) - map("n", m.prev_buffer, ":BufferLineCyclePrev ", opt) + map("n", m.next_buffer, ":BufferLineCycleNext ") + map("n", m.prev_buffer, ":BufferLineCyclePrev ") end M.chadsheet = function() local m = plugin_maps.chadsheet - map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope() ", opt) + map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope() ") map( "n", m.user_keys, @@ -142,64 +143,64 @@ end M.comment = function() local m = plugin_maps.comment.toggle - map("n", m, ":CommentToggle ", opt) - map("v", m, ":CommentToggle ", opt) + map("n", m, ":CommentToggle ") + map("v", m, ":CommentToggle ") end M.dashboard = function() local m = plugin_maps.dashboard - map("n", m.bookmarks, ":DashboardJumpMarks ", opt) - map("n", m.new_file, ":DashboardNewFile ", opt) - map("n", m.open, ":Dashboard ", opt) - map("n", m.session_load, ":SessionLoad ", opt) - map("n", m.session_save, ":SessionSave ", opt) + map("n", m.bookmarks, ":DashboardJumpMarks ") + map("n", m.new_file, ":DashboardNewFile ") + map("n", m.open, ":Dashboard ") + map("n", m.session_load, ":SessionLoad ") + map("n", m.session_save, ":SessionSave ") end M.nvimtree = function() - map("n", plugin_maps.nvimtree.toggle, ":NvimTreeToggle ", opt) - map("n", plugin_maps.nvimtree.focus, ":NvimTreeFocus ", opt) + map("n", plugin_maps.nvimtree.toggle, ":NvimTreeToggle ") + map("n", plugin_maps.nvimtree.focus, ":NvimTreeFocus ") end M.neoformat = function() - map("n", plugin_maps.neoformat.format, ":Neoformat ", opt) + map("n", plugin_maps.neoformat.format, ":Neoformat ") end M.telescope = function() local m = plugin_maps.telescope - map("n", m.buffers, ":Telescope buffers ", opt) - map("n", m.find_files, ":Telescope find_files ", opt) + map("n", m.buffers, ":Telescope buffers ") + map("n", m.find_files, ":Telescope find_files ") map("n", m.find_hiddenfiles, ":Telescope find_files hidden=true ", opt) - map("n", m.git_commits, ":Telescope git_commits ", opt) - map("n", m.git_status, ":Telescope git_status ", opt) - map("n", m.help_tags, ":Telescope help_tags ", opt) - map("n", m.live_grep, ":Telescope live_grep ", opt) - map("n", m.oldfiles, ":Telescope oldfiles ", opt) - map("n", m.themes, ":Telescope themes ", opt) + map("n", m.git_commits, ":Telescope git_commits ") + map("n", m.git_status, ":Telescope git_status ") + map("n", m.help_tags, ":Telescope help_tags ") + map("n", m.live_grep, ":Telescope live_grep ") + map("n", m.oldfiles, ":Telescope oldfiles ") + map("n", m.themes, ":Telescope themes ") end M.telescope_media = function() local m = plugin_maps.telescope_media - map("n", m.media_files, ":Telescope media_files ", opt) + map("n", m.media_files, ":Telescope media_files ") end M.truezen = function() local m = plugin_maps.truezen - map("n", m.ataraxis_mode, ":TZAtaraxis ", opt) - map("n", m.focus_mode, ":TZFocus ", opt) - map("n", m.minimalistic_mode, ":TZMinimalist ", opt) + map("n", m.ataraxis_mode, ":TZAtaraxis ") + map("n", m.focus_mode, ":TZFocus ") + map("n", m.minimalistic_mode, ":TZMinimalist ") end M.vim_fugitive = function() local m = plugin_maps.vim_fugitive - map("n", m.git, ":Git ", opt) - map("n", m.git_blame, ":Git blame ", opt) - map("n", m.diff_get_2, ":diffget //2 ", opt) - map("n", m.diff_get_3, ":diffget //3 ", opt) + map("n", m.git, ":Git ") + map("n", m.git_blame, ":Git blame ") + map("n", m.diff_get_2, ":diffget //2 ") + map("n", m.diff_get_3, ":diffget //3 ") end return M diff --git a/lua/core/utils.lua b/lua/core/utils.lua index cafd1e3..e42cc67 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -136,6 +136,108 @@ M.hide_statusline = function() end end +-- load config +-- 1st arg = boolean - whether to force reload +-- Modifies _G._NVCHAD_CONFIG global variable +M.load_config = function(reload) + -- only do the stuff below one time, otherwise just return the set config + if _G._NVCHAD_CONFIG_CONTENTS ~= nil and not (reload or false) then + return _G._NVCHAD_CONFIG_CONTENTS + end + + -- these are the table value which will be always prioritiezed to take user config value + local to_replace = { + "['mappings']['plugin']['esc_insertmode']", + "['mappings']['terminal']['esc_termmode']", + "['mappings']['terminal']['esc_hide_termmode']", + } + + local default_config = "default_config" + local config_name = vim.g.nvchad_user_config or "chadrc" + local config_file = vim.fn.stdpath "config" .. "/lua/" .. config_name .. ".lua" + + -- unload the modules if force reload + if reload then + package.loaded[default_config or false] = nil + package.loaded[config_name or false] = nil + end + + -- don't enclose in pcall, it better break when default config is faulty + _G._NVCHAD_CONFIG_CONTENTS = require(default_config) + + -- user config is not required to run nvchad but a optional + -- Make sure the config doesn't break the whole system if user config is not present or in bad state or not a table + -- print warning texts if user config file is present + -- check if the user config is present + if vim.fn.empty(vim.fn.glob(config_file)) < 1 then + local present, config = pcall(require, config_name) + if present then + -- make sure the returned value is table + if type(config) == "table" then + -- data = require(config_name) + _G._NVCHAD_CONFIG_CONTENTS = require("core.utils").merge_table( + _G._NVCHAD_CONFIG_CONTENTS, + config, + to_replace + ) + else + print("Warning: " .. config_name .. " sourced successfully but did not return a lua table.") + end + else + print("Warning: " .. config_file .. " is present but sourcing failed.") + end + end + return _G._NVCHAD_CONFIG_CONTENTS +end + +M.map = function(mode, keys, cmd, opt) + local options = { noremap = true, silent = true } + if opt then + options = vim.tbl_extend("force", options, opt) + end + + -- all valid modes allowed for mappings + -- :h map-modes + local valid_modes = { + [""] = true, + ["n"] = true, + ["v"] = true, + ["s"] = true, + ["x"] = true, + ["o"] = true, + ["!"] = true, + ["i"] = true, + ["l"] = true, + ["c"] = true, + ["t"] = true, + } + + -- helper function for M.map + -- can gives multiple modes and keys + local function map_wrapper(mode, lhs, rhs, options) + if type(lhs) == "table" then + for _, key in ipairs(lhs) do + map_wrapper(mode, key, rhs, options) + end + else + if type(mode) == "table" then + for _, m in ipairs(mode) do + map_wrapper(m, lhs, rhs, options) + end + else + if valid_modes[mode] and lhs and rhs then + vim.api.nvim_set_keymap(mode, lhs, rhs, options) + else + mode, lhs, rhs = mode or "", lhs or "", rhs or "" + print("Cannot set mapping [ mode = '" .. mode .. "' | key = '" .. lhs .. "' | cmd = '" .. rhs .. "' ]") + end + end + end + end + + map_wrapper(mode, keys, cmd, options) +end + -- Base code: https://gist.github.com/revolucas/184aec7998a6be5d2f61b984fac1d7f7 -- Changes over it: preserving table 1 contents and also update with table b, without duplicating -- 1st arg - base table @@ -208,58 +310,4 @@ end]] return into end --- load config --- 1st arg = boolean - whether to force reload --- Modifies _G._NVCHAD_CONFIG global variable -M.load_config = function(reload) - -- only do the stuff below one time, otherwise just return the set config - if _G._NVCHAD_CONFIG_CONTENTS ~= nil and not (reload or false) then - return _G._NVCHAD_CONFIG_CONTENTS - end - - -- these are the table value which will be always prioritiezed to take user config value - local to_replace = { - "['mappings']['plugin']['esc_insertmode']", - "['mappings']['terminal']['esc_termmode']", - "['mappings']['terminal']['esc_hide_termmode']", - } - - local default_config = "default_config" - local config_name = vim.g.nvchad_user_config or "chadrc" - local config_file = vim.fn.stdpath "config" .. "/lua/" .. config_name .. ".lua" - - -- unload the modules if force reload - if reload then - package.loaded[default_config or false] = nil - package.loaded[config_name or false] = nil - end - - -- don't enclose in pcall, it better break when default config is faulty - _G._NVCHAD_CONFIG_CONTENTS = require(default_config) - - -- user config is not required to run nvchad but a optional - -- Make sure the config doesn't break the whole system if user config is not present or in bad state or not a table - -- print warning texts if user config file is present - -- check if the user config is present - if vim.fn.empty(vim.fn.glob(config_file)) < 1 then - local present, config = pcall(require, config_name) - if present then - -- make sure the returned value is table - if type(config) == "table" then - -- data = require(config_name) - _G._NVCHAD_CONFIG_CONTENTS = require("core.utils").merge_table( - _G._NVCHAD_CONFIG_CONTENTS, - config, - to_replace - ) - else - print("Warning: " .. config_name .. " sourced successfully but did not return a lua table.") - end - else - print("Warning: " .. config_file .. " is present but sourcing failed.") - end - end - return _G._NVCHAD_CONFIG_CONTENTS -end - return M diff --git a/lua/default_config.lua b/lua/default_config.lua index 63509a3..080254c 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -1,6 +1,7 @@ -- IMPORTANT NOTE : This is default config, so dont change anything here. (check chadrc.lua instead) local M = {} +M.ui, M.options, M.plugin_status, M.mappings, M.custom = {}, {}, {}, {}, {} -- non plugin ui configs, available without any plugins M.ui = { @@ -198,4 +199,20 @@ M.mappings.plugin = { }, } +-- user custom mappings +-- e.g: name = { "mode" , "keys" , "cmd" , "options"} +-- name: can be empty or something unique with repect to other custom mappings +-- { mode, key, cmd } or name = { mode, key, cmd } +-- mode: usage: mode or { mode1, mode2 }, multiple modes allowed, available modes => :h map-modes, +-- keys: multiple keys allowed, same synxtax as modes +-- cmd: for vim commands, must use ':' at start and add at the end if want to execute +-- options: see :h nvim_set_keymap() opts section +M.custom.mappings = { + -- clear_all = { + -- "n", + -- "cc", + -- "gg0vG$d", + -- }, +} + return M From 1b2ec94b759731c67e3e1957a60fd47b2e267fe4 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Mon, 23 Aug 2021 01:10:31 +0530 Subject: [PATCH 0643/1541] feat: Add copy_del and copy_cut options to config --- lua/chadrc.lua | 2 ++ lua/core/mappings.lua | 16 ++++++++++------ lua/default_config.lua | 2 ++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index edadb13..490598f 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -41,6 +41,8 @@ M.ui.plugin = { M.options = { clipboard = "unnamedplus", cmdheight = 1, + copy_cut = true, -- copy cut text ( x key ), visual and normal mode + copy_del = true, -- copy deleted text ( dd key ), visual and normal mode expandtab = true, hidden = true, ignorecase = true, diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 547fe60..5fb9764 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -13,12 +13,6 @@ local M = {} -- these mappings will only be called during initialization M.misc = function() local function non_config_mappings() - -- dont copy any deleted text , this is disabled by default so uncomment the below mappings if you want them - -- map("n", "dd", [=[ "_dd ]=]) - -- map("v", "dd", [=[ "_dd ]=]) - -- map("v", "x", [=[ "_x ]=]) - -- todo: this should be configurable via chadrc - -- Don't copy the replaced text after pasting in visual mode map("v", "p", '"_dP') @@ -35,6 +29,16 @@ M.misc = function() end local function optional_mappings() + -- don't yank text on cut ( x ) + if not config.options.copy_cut then + map({ "n", "v" }, "x", '"_x') + end + + -- don't yank text on delete ( dd ) + if not config.options.copy_del then + map({ "n", "v" }, "dd", '"_dd') + end + -- navigation within insert mode if config.options.insert_nav then local inav = maps.insert_nav diff --git a/lua/default_config.lua b/lua/default_config.lua index 080254c..7f6e355 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -45,6 +45,8 @@ M.ui.plugin = { M.options = { clipboard = "unnamedplus", cmdheight = 1, + copy_cut = true, -- copy cut text ( x key ), visual and normal mode + copy_del = true, -- copy deleted text ( dd key ), visual and normal mode expandtab = true, hidden = true, ignorecase = true, From 753f144d3f37cd1ddc0c0dc4d10ad37e3055c24f Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Mon, 23 Aug 2021 11:07:44 +0530 Subject: [PATCH 0644/1541] packerInit: Print error on clone failed --- lua/plugins/packerInit.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/packerInit.lua b/lua/plugins/packerInit.lua index bd6505c..964ff59 100644 --- a/lua/plugins/packerInit.lua +++ b/lua/plugins/packerInit.lua @@ -25,7 +25,7 @@ if not present then if present then print "Packer cloned successfully." else - error("Couldn't clone packer !\nPacker path: " .. packer_path) + error("Couldn't clone packer !\nPacker path: " .. packer_path .. "\n" .. packer) end end From 9b4b288d01d66bfbdc7ada4d031269938f8ef7a7 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Mon, 23 Aug 2021 15:15:22 +0530 Subject: [PATCH 0645/1541] utils: load_config: Use filereadable to check if file exists --- lua/core/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index e42cc67..a9c6188 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -169,7 +169,7 @@ M.load_config = function(reload) -- Make sure the config doesn't break the whole system if user config is not present or in bad state or not a table -- print warning texts if user config file is present -- check if the user config is present - if vim.fn.empty(vim.fn.glob(config_file)) < 1 then + if vim.fn.filereadable(vim.fn.glob(config_file)) == 1 then local present, config = pcall(require, config_name) if present then -- make sure the returned value is table From c02b1a063fd3ba8e6fef637af127ffa99e5cc33b Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Wed, 25 Aug 2021 20:09:20 +0530 Subject: [PATCH 0646/1541] feat: Added cmd for ChadReload --- lua/core/mappings.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 5fb9764..b430da5 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -101,6 +101,10 @@ M.misc = function() -- add NvChadUpdate command and mapping cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" map("n", maps.update_nvchad, ":NvChadUpdate ") + + -- add ChadReload command and maping + cmd "silent! command! NvChadReload lua require('chad_reload').Restart()" + end local function user_config_mappings() From 9635b45404201eab5965a790e1c93fd4762d967f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 25 Aug 2021 20:13:47 +0530 Subject: [PATCH 0647/1541] clean mappings conf --- lua/core/mappings.lua | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index b430da5..cee78d8 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -56,8 +56,7 @@ M.misc = function() map( "n", maps.theme_toggler, - ":lua require('nvchad').toggle_theme(require('core.utils').load_config().ui.theme_toggler.fav_themes) ", - opt + ":lua require('nvchad').toggle_theme(require('core.utils').load_config().ui.theme_toggler.fav_themes) " ) end end @@ -80,12 +79,7 @@ M.misc = function() map("n", term_maps.pick_term, ":Telescope terms ") -- Open terminals -- TODO this opens on top of an existing vert/hori term, fixme - map( - "n", - term_maps.new_horizontal, - ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert ", - opt - ) + map("n", term_maps.new_horizontal, ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert ") map("n", term_maps.new_vertical, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert ") map("n", term_maps.new_window, ":execute 'terminal' | let b:term_type = 'wind' | startinsert ") -- terminal mappings end -- @@ -104,7 +98,6 @@ M.misc = function() -- add ChadReload command and maping cmd "silent! command! NvChadReload lua require('chad_reload').Restart()" - end local function user_config_mappings() @@ -144,8 +137,7 @@ M.chadsheet = function() map( "n", m.user_keys, - ":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false } ", - opt + ":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false } " ) end @@ -167,7 +159,7 @@ end M.nvimtree = function() map("n", plugin_maps.nvimtree.toggle, ":NvimTreeToggle ") - map("n", plugin_maps.nvimtree.focus, ":NvimTreeFocus ") + map("n", plugin_maps.nvimtree.focus, ":NvimTreeFocus ") end M.neoformat = function() @@ -179,7 +171,7 @@ M.telescope = function() map("n", m.buffers, ":Telescope buffers ") map("n", m.find_files, ":Telescope find_files ") - map("n", m.find_hiddenfiles, ":Telescope find_files hidden=true ", opt) + map("n", m.find_hiddenfiles, ":Telescope find_files hidden=true ") map("n", m.git_commits, ":Telescope git_commits ") map("n", m.git_status, ":Telescope git_status ") map("n", m.help_tags, ":Telescope help_tags ") From 80d36cca00f6ec3ed74ce96b69607ccfd03f7058 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 26 Aug 2021 10:48:13 +0530 Subject: [PATCH 0648/1541] move to feline.nvim --- lua/chadrc.lua | 2 +- lua/default_config.lua | 2 +- lua/plugins/configs/statusline.lua | 439 ++++++++++++++--------------- lua/plugins/init.lua | 6 +- 4 files changed, 219 insertions(+), 230 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 490598f..c8fdfd7 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -82,7 +82,7 @@ M.plugin_status = { comment = true, -- universal commentor dashboard = true, -- a nice looking dashboard esc_insertmode = true, -- escape from insert mode using custom keys - galaxyline = true, -- statusline + feline = true, -- statusline gitsigns = true, -- gitsigns in statusline lspkind = true, -- lsp enhancements lspsignature = true, -- lsp enhancements diff --git a/lua/default_config.lua b/lua/default_config.lua index 7f6e355..c4920ec 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -86,7 +86,7 @@ M.plugin_status = { comment = true, -- universal commentor dashboard = true, -- a nice looking dashboard esc_insertmode = true, -- escape from insert mode using custom keys - galaxyline = true, -- statusline + feline = true, -- statusline gitsigns = true, -- gitsigns in statusline lspkind = true, -- lsp enhancements lspsignature = true, -- lsp enhancements diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index b2a71c8..f9b9a47 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -1,14 +1,5 @@ local colors = require("colors").get() - -local present1, gl = pcall(require, "galaxyline") -local present2, condition = pcall(require, "galaxyline.condition") -if not (present1 or present2) then - return -end - -local gls = gl.section - -gl.short_line_list = { " " } +local lsp = require "feline.providers.lsp" local icon_styles = { default = { @@ -18,7 +9,6 @@ local icon_styles = { vi_mode_icon = " ", position_icon = " ", }, - arrow = { left = "", right = "", @@ -55,264 +45,263 @@ local icon_styles = { local user_statusline_style = require("core.utils").load_config().ui.plugin.statusline.style local statusline_style = icon_styles[user_statusline_style] -local left_separator = statusline_style.left -local right_separator = statusline_style.right +-- Initialize the components table +local components = { + left = { active = {}, inactive = {} }, + mid = { active = {}, inactive = {} }, + right = { active = {}, inactive = {} }, +} -gls.left[1] = { - FirstElement = { - provider = function() - return "▋" - end, - highlight = { colors.nord_blue, colors.nord_blue }, +components.left.active[1] = { + provider = statusline_style.main_icon, + + hl = { + fg = colors.statusline_bg, + bg = colors.nord_blue, + }, + + right_sep = { str = statusline_style.right, hl = { + fg = colors.nord_blue, + bg = colors.one_bg2, + } }, +} + +components.left.active[2] = { + provider = statusline_style.right, + + hl = { + fg = colors.one_bg2, + bg = colors.lightbg, }, } -gls.left[2] = { - statusIcon = { - provider = function() - return statusline_style.main_icon - end, - highlight = { colors.statusline_bg, colors.nord_blue }, - separator = right_separator, - separator_highlight = { colors.nord_blue, colors.one_bg2 }, +components.left.active[3] = { + provider = function() + local filename = vim.fn.expand "%:t" + local extension = vim.fn.expand "%:e" + local icon = require("nvim-web-devicons").get_icon(filename, extension) + if icon == nil then + icon = "" + return icon + end + return icon .. " " .. filename .. " " + end, + hl = { + fg = colors.white, + bg = colors.lightbg, }, + + right_sep = { str = statusline_style.right, hl = { fg = colors.lightbg, bg = colors.lightbg2 } }, } -gls.left[3] = { - left_arow2 = { - provider = function() end, - separator = right_separator .. " ", - separator_highlight = { colors.one_bg2, colors.lightbg }, +components.left.active[4] = { + provider = function() + local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") + return " " .. dir_name .. " " + end, + + hl = { + fg = colors.grey_fg2, + bg = colors.lightbg2, }, + right_sep = { str = statusline_style.right, hi = { + fg = colors.lightbg2, + bg = colors.statusline_bg, + } }, } -gls.left[4] = { - FileIcon = { - provider = "FileIcon", - condition = condition.buffer_not_empty, - highlight = { colors.white, colors.lightbg }, +components.left.active[5] = { + provider = "git_diff_added", + hl = { + fg = colors.grey_fg2, + bg = colors.statusline_bg, }, + icon = " ", +} +-- diffModfified +components.left.active[6] = { + provider = "git_diff_changed", + hl = { + fg = colors.grey_fg2, + bg = colors.statusline_bg, + }, + icon = "  ", +} +-- diffRemove +components.left.active[7] = { + provider = "git_diff_removed", + hl = { + fg = colors.grey_fg2, + bg = colors.statusline_bg, + }, + icon = "  ", } -gls.left[5] = { - FileName = { - provider = function() - local fileinfo = require "galaxyline.provider_fileinfo" - - if vim.api.nvim_buf_get_name(0):len() == 0 then - return "" - end - - return fileinfo.get_current_file_name("", "") - end, - highlight = { colors.white, colors.lightbg }, - separator = right_separator, - separator_highlight = { colors.lightbg, colors.lightbg2 }, - }, +components.left.active[8] = { + provider = "diagnostic_errors", + enabled = function() + return lsp.diagnostics_exist "Error" + end, + hl = { fg = colors.red }, + icon = "  ", } -gls.left[6] = { - current_dir = { - provider = function() - local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") - return "  " .. dir_name .. " " - end, - highlight = { colors.grey_fg2, colors.lightbg2 }, - separator = right_separator, - separator_highlight = { colors.lightbg2, colors.statusline_bg }, - }, +components.left.active[9] = { + provider = "diagnostic_warnings", + enabled = function() + return lsp.diagnostics_exist "Warning" + end, + hl = { fg = colors.yellow }, + icon = "  ", } -local checkwidth = function() - local squeeze_width = vim.fn.winwidth(0) / 2 - if squeeze_width > 30 then - return true - end - return false -end - -gls.left[7] = { - DiffAdd = { - provider = "DiffAdd", - condition = checkwidth, - icon = "  ", - highlight = { colors.white, colors.statusline_bg }, - }, +components.left.active[10] = { + provider = "diagnostic_hints", + enabled = function() + return lsp.diagnostics_exist "Hint" + end, + hl = { fg = colors.grey_fg2 }, + icon = "  ", } -gls.left[8] = { - DiffModified = { - provider = "DiffModified", - condition = checkwidth, - icon = "  ", - highlight = { colors.grey_fg2, colors.statusline_bg }, - }, +components.left.active[11] = { + provider = "diagnostic_info", + enabled = function() + return lsp.diagnostics_exist "Information" + end, + hl = { fg = colors.green }, + icon = "  ", } -gls.left[9] = { - DiffRemove = { - provider = "DiffRemove", - condition = checkwidth, - icon = "  ", - highlight = { colors.grey_fg2, colors.statusline_bg }, - }, +components.right.active[1] = { + provider = function() + if lsp.is_lsp_attached then + return " " .. "  " .. " LSP" + end + end, + hl = { fg = colors.grey_fg2, bg = colors.statusline_bg }, } -gls.left[10] = { - DiagnosticError = { - provider = "DiagnosticError", - icon = "  ", - highlight = { colors.red, colors.statusline_bg }, +components.right.active[2] = { + provider = "git_branch", + hl = { + fg = colors.grey_fg2, + bg = colors.statusline_bg, }, + icon = "  ", } -gls.left[11] = { - DiagnosticWarn = { - provider = "DiagnosticWarn", - icon = "  ", - highlight = { colors.yellow, colors.statusline_bg }, - }, -} - -gls.right[1] = { - lsp_status = { - provider = function() - local clients = vim.lsp.get_active_clients() - if next(clients) ~= nil then - local buf_ft = vim.api.nvim_buf_get_option(0, "filetype") - for _, client in ipairs(clients) do - local filetypes = client.config.filetypes - if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then - return " " .. "  " .. " LSP" - end - end - return "" - else - return "" - end - end, - highlight = { colors.grey_fg2, colors.statusline_bg }, - }, -} - -gls.right[2] = { - GitIcon = { - provider = function() - return " " - end, - condition = require("galaxyline.condition").check_git_workspace, - highlight = { colors.grey_fg2, colors.statusline_bg }, - separator = " ", - separator_highlight = { colors.statusline_bg, colors.statusline_bg }, - }, -} - -gls.right[3] = { - GitBranch = { - provider = "GitBranch", - condition = require("galaxyline.condition").check_git_workspace, - highlight = { colors.grey_fg2, colors.statusline_bg }, +components.right.active[3] = { + provider = " " .. statusline_style.left, + hl = { + fg = colors.one_bg2, + bg = colors.statusline_bg, }, } local mode_colors = { - ['n'] = { "NORMAL", colors.red }, - ['no'] = { "N-PENDING", colors.red }, - ['i'] = { "INSERT", colors.dark_purple }, - ['ic'] = { "INSERT", colors.dark_purple }, - ['t'] = { "TERMINAL", colors.green }, - ['v'] = { "VISUAL", colors.cyan }, - ['V'] = { "V-LINE", colors.cyan }, - [''] = { "V-BLOCK", colors.cyan }, - ['R'] = { "REPLACE", colors.orange }, - ['Rv'] = { "V-REPLACE", colors.orange }, - ['s'] = { "SELECT", colors.nord_blue }, - ['S'] = { "S-LINE", colors.nord_blue }, - [''] = { "S-BLOCK", colors.nord_blue }, - ['c'] = { "COMMAND", colors.pink }, - ['cv'] = { "COMMAND", colors.pink }, - ['ce'] = { "COMMAND", colors.pink }, - ['r'] = { "PROMPT", colors.teal }, - ['rm'] = { "MORE", colors.teal }, - ['r?'] = { "CONFIRM", colors.teal }, - ['!'] = { "SHELL", colors.green }, + ["n"] = { "NORMAL", colors.red }, + ["no"] = { "N-PENDING", colors.red }, + ["i"] = { "INSERT", colors.dark_purple }, + ["ic"] = { "INSERT", colors.dark_purple }, + ["t"] = { "TERMINAL", colors.green }, + ["v"] = { "VISUAL", colors.cyan }, + ["V"] = { "V-LINE", colors.cyan }, + [""] = { "V-BLOCK", colors.cyan }, + ["R"] = { "REPLACE", colors.orange }, + ["Rv"] = { "V-REPLACE", colors.orange }, + ["s"] = { "SELECT", colors.nord_blue }, + ["S"] = { "S-LINE", colors.nord_blue }, + [""] = { "S-BLOCK", colors.nord_blue }, + ["c"] = { "COMMAND", colors.pink }, + ["cv"] = { "COMMAND", colors.pink }, + ["ce"] = { "COMMAND", colors.pink }, + ["r"] = { "PROMPT", colors.teal }, + ["rm"] = { "MORE", colors.teal }, + ["r?"] = { "CONFIRM", colors.teal }, + ["!"] = { "SHELL", colors.green }, } -local mode = function(n) - return mode_colors[vim.fn.mode()][n] +local chad_mode_hl = function() + return { + fg = mode_colors[vim.fn.mode()][2], + bg = colors.one_bg, + } end -gls.right[4] = { - left_arrow = { - provider = function() end, - separator = " " .. left_separator, - separator_highlight = { colors.one_bg2, colors.statusline_bg }, +components.right.active[4] = { + provider = statusline_style.left, + hl = function() + return { + fg = mode_colors[vim.fn.mode()][2], + bg = colors.one_bg2, + } + end, +} + +components.right.active[5] = { + provider = statusline_style.vi_mode_icon, + hl = function() + return { + fg = colors.statusline_bg, + bg = mode_colors[vim.fn.mode()][2], + } + end, +} + +components.right.active[6] = { + provider = function() + return " " .. mode_colors[vim.fn.mode()][1] .. " " + end, + hl = chad_mode_hl, +} + +components.right.active[7] = { + provider = statusline_style.left, + hl = { + fg = colors.grey, + bg = colors.one_bg, }, } -gls.right[5] = { - left_round = { - provider = function() - vim.cmd("hi Galaxyleft_round guifg=" .. mode(2)) - return left_separator - end, - highlight = { "GalaxyViMode", colors.one_bg2 }, +components.right.active[8] = { + provider = statusline_style.left, + hl = { + fg = colors.green, + bg = colors.grey, }, } -gls.right[6] = { - viMode_icon = { - provider = function() - vim.cmd("hi GalaxyviMode_icon guibg=" .. mode(2)) - return statusline_style.vi_mode_icon - end, - highlight = { colors.statusline_bg, colors.red }, +components.right.active[9] = { + provider = statusline_style.position_icon, + hl = { + fg = colors.black, + bg = colors.green, }, } -gls.right[7] = { - ViMode = { - provider = function() - vim.cmd("hi GalaxyViMode guifg=" .. mode(2)) - return " " .. mode(1) .. " " - end, - highlight = { "GalaxyViMode", colors.lightbg }, +components.right.active[10] = { + provider = function() + local current_line = vim.fn.line "." + local total_line = vim.fn.line "$" + + if current_line == 1 then + return " Top " + elseif current_line == vim.fn.line "$" then + return " Bot " + end + local result, _ = math.modf((current_line / total_line) * 100) + return " " .. result .. " % " + end, + + hl = { + fg = colors.green, + bg = colors.one_bg, }, } -gls.right[8] = { - left_arrow2 = { - provider = function() end, - separator = left_separator, - separator_highlight = { colors.grey, colors.lightbg }, - }, -} - -gls.right[9] = { - some_RoundIcon = { - provider = function() - return statusline_style.position_icon - end, - separator = left_separator, - separator_highlight = { colors.green, colors.grey }, - highlight = { colors.lightbg, colors.green }, - }, -} - -gls.right[10] = { - line_percentage = { - provider = function() - local current_line = vim.fn.line "." - local total_line = vim.fn.line "$" - - if current_line == 1 then - return " Top " - elseif current_line == vim.fn.line "$" then - return " Bot " - end - local result, _ = math.modf((current_line / total_line) * 100) - return " " .. result .. "% " - end, - highlight = { colors.green, colors.lightbg }, - }, +require("feline").setup { + default_bg = colors.statusline_bg, + default_fg = colors.fg, + components = components, } diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index f760882..fd167e1 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -38,8 +38,8 @@ return packer.startup(function() } use { - "glepnir/galaxyline.nvim", - disable = not plugin_status.galaxyline, + "famiu/feline.nvim", + disable = not plugin_status.feline, after = "nvim-web-devicons", config = function() require "plugins.configs.statusline" @@ -49,7 +49,7 @@ return packer.startup(function() use { "akinsho/bufferline.nvim", disable = not plugin_status.bufferline, - after = "galaxyline.nvim", + after = "feline.nvim", config = function() require "plugins.configs.bufferline" end, From 7d8f6b85c76a52e6b878c2d0452c6acbc92a8f40 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Thu, 26 Aug 2021 10:34:48 +0530 Subject: [PATCH 0649/1541] feat: Load lspkind on insert event. --- lua/colors/highlights.lua | 44 +++++++++++++++++++++++++++------------ lua/plugins/init.lua | 2 +- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 74bd77e..ded4d02 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -22,14 +22,24 @@ local yellow = colors.yellow local ui = require("core.utils").load_config().ui +-- Define bg color +-- @param group Group +-- @param color Color local function bg(group, color) cmd("hi " .. group .. " guibg=" .. color) end +-- Define fg color +-- @param group Group +-- @param color Color local function fg(group, color) cmd("hi " .. group .. " guifg=" .. color) end +-- Define bg and fg color +-- @param group Group +-- @param fgcol Fg Color +-- @param bgcol Bg Color local function fg_bg(group, fgcol, bgcol) cmd("hi " .. group .. " guifg=" .. fgcol .. " guibg=" .. bgcol) end @@ -41,8 +51,10 @@ else fg("Comment", grey_fg) end -cmd "hi clear CursorLine" -- disable cusror line -fg("cursorlinenr", white) -- line number +-- Disable cusror line +cmd "hi clear CursorLine" +-- Line number +fg("cursorlinenr", white) -- same it bg, so it doesn't appear fg("EndOfBuffer", black) @@ -75,38 +87,43 @@ if ui.transparency then fg("Comment", grey) end ------ plugin related highlights ----- +-- [[ Plugin Highlights --- dashboard -- +-- Dashboard fg("DashboardCenter", grey_fg) fg("DashboardFooter", grey_fg) fg("DashboardHeader", grey_fg) fg("DashboardShortcut", grey_fg) --- git signs -- +-- Git signs fg_bg("DiffAdd", nord_blue, "none") fg_bg("DiffChange", grey_fg, "none") fg_bg("DiffModified", nord_blue, "none") --- indent blankline plugin -- +-- Indent blankline plugin fg("IndentBlanklineChar", line) --- LspDiagnostics -- --- error / warnings +-- ]] + +-- [[ LspDiagnostics + +-- Errors fg("LspDiagnosticsSignError", red) fg("LspDiagnosticsSignWarning", yellow) fg("LspDiagnosticsVirtualTextError", red) fg("LspDiagnosticsVirtualTextWarning", yellow) --- info +-- Info fg("LspDiagnosticsSignInformation", green) fg("LspDiagnosticsVirtualTextInformation", green) --- hints +-- Hints fg("LspDiagnosticsSignHint", purple) fg("LspDiagnosticsVirtualTextHint", purple) --- NvimTree -- +-- ]] + +-- NvimTree fg("NvimTreeEmptyFolderName", blue) fg("NvimTreeEndOfBuffer", darker_black) fg("NvimTreeFolderIcon", folder_bg) @@ -120,7 +137,8 @@ fg_bg("NvimTreeStatuslineNc", darker_black, darker_black) fg("NvimTreeVertSplit", darker_black) bg("NvimTreeVertSplit", darker_black) fg_bg("NvimTreeWindowPicker", red, black2) --- disable some highlight in nvim tree if transparency enabled + +-- Disable some highlight in nvim tree if transparency enabled if ui.transparency then bg("NvimTreeNormal", "NONE") bg("NvimTreeStatusLineNC", "NONE") @@ -128,7 +146,7 @@ if ui.transparency then fg("NvimTreeVertSplit", grey) end --- telescope -- +-- Telescope fg("TelescopeBorder", line) fg("TelescopePreviewBorder", grey) fg("TelescopePromptBorder", line) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index f760882..3b4c47e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -138,7 +138,7 @@ return packer.startup(function() use { "onsails/lspkind-nvim", disable = not plugin_status.lspkind, - event = "BufEnter", + event = "InsertEnter", config = function() require("plugins.configs.others").lspkind() end, From 2f2389a31bed07cfdbfbd3f3cf3f7631ab5d6622 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 26 Aug 2021 10:59:37 +0530 Subject: [PATCH 0650/1541] statusline add lsp status --- lua/plugins/configs/statusline.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index f9b9a47..43d9d73 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -175,8 +175,10 @@ components.left.active[11] = { components.right.active[1] = { provider = function() - if lsp.is_lsp_attached then + if next(vim.lsp.buf_get_clients()) ~= nil then return " " .. "  " .. " LSP" + else + return "" end end, hl = { fg = colors.grey_fg2, bg = colors.statusline_bg }, From 80b632ee959f10eb3d39487fd84382e46fecb8dc Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Thu, 26 Aug 2021 13:22:48 +0530 Subject: [PATCH 0651/1541] feat: Added lsp radial progress --- lua/plugins/configs/statusline.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 43d9d73..5f927e0 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -173,6 +173,34 @@ components.left.active[11] = { icon = "  ", } +components.mid.active[1] = { + provider = function() + local Lsp = vim.lsp.util.get_progress_messages()[1] + if Lsp then + local msg = Lsp.message or "" + local percentage = Lsp.percentage or 0 + local title = Lsp.title or "" + local spinners = { + "󰝦", + "󰪞", + "󰪟", + "󰪠", + "󰪡", + "󰪢", + "󰪣", + "󰪤", + "󰪥", + } + + local ms = vim.loop.hrtime() / 1000000 + local frame = math.floor(ms / 120) % #spinners + return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage) + end + return "" + end, + hl = { fg = colors.green }, +} + components.right.active[1] = { provider = function() if next(vim.lsp.buf_get_clients()) ~= nil then From 8f733755e84361a4f93fcf69b84595b3aea10b5a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 26 Aug 2021 15:01:48 +0530 Subject: [PATCH 0652/1541] add clickable btn for exiting nvim --- lua/plugins/configs/bufferline.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 10ed945..b30eedf 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -5,12 +5,19 @@ if not present then return end +vim.cmd [[ + function MyFunc(a,b,c,d) + q! + endfunction +]] + bufferline.setup { options = { offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, buffer_close_icon = "", modified_icon = "", close_icon = "", + show_close_icon = false, left_trunc_marker = "", right_trunc_marker = "", max_name_length = 14, @@ -23,6 +30,14 @@ bufferline.setup { separator_style = "thin", always_show_bufferline = true, diagnostics = false, -- "or nvim-lsp" + + custom_areas = { + right = function() + local result = {} + table.insert(result, { text = "%@MyFunc@  %X", guifg = colors.red, guibg = colors.black }) + return result + end, + }, custom_filter = function(buf_number) -- Func to filter out our managed/persistent split terms local present_type, type = pcall(function() @@ -42,6 +57,7 @@ bufferline.setup { end end, }, + highlights = { background = { guifg = colors.grey_fg, From 8a21e73cc5f175e1b274a13fe6bc0234c2a6d9cf Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 26 Aug 2021 16:28:21 +0530 Subject: [PATCH 0653/1541] avoid using q! for quitting vim --- lua/plugins/configs/bufferline.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index b30eedf..f47846a 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -6,8 +6,8 @@ if not present then end vim.cmd [[ - function MyFunc(a,b,c,d) - q! + function Quitvim(a,b,c,d) + q endfunction ]] @@ -34,7 +34,7 @@ bufferline.setup { custom_areas = { right = function() local result = {} - table.insert(result, { text = "%@MyFunc@  %X", guifg = colors.red, guibg = colors.black }) + table.insert(result, { text = "%@Quitvim@  %X", guifg = colors.red, guibg = colors.black }) return result end, }, From ee981f4f4a23fa48a1282edd78d02c0fe0d40e69 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 26 Aug 2021 11:58:40 +0530 Subject: [PATCH 0654/1541] plugins/configs/statusline: Fix git branch not appearing without opening files * the default provider given by feline uses gitsigns which only updates when a file is opened * code taken from: https://github.com/hoob3rt/lualine.nvim/blob/master/lua/lualine/components/branch.lua * use gitsigns var when available Co-authored-by: Famiu Haque Co-authored-by: hoob3rt Co-authored-by: Shadman --- lua/plugins/configs/statusline.lua | 52 ++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 5f927e0..10b9107 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -213,12 +213,60 @@ components.right.active[1] = { } components.right.active[2] = { - provider = "git_branch", + -- taken from: https://github.com/hoob3rt/lualine.nvim/blob/master/lua/lualine/components/branch.lua + provider = function() + local git_branch = "" + + -- first try with gitsigns + local gs_dict = vim.b.gitsigns_status_dict + if gs_dict then + git_branch = (gs_dict.head and #gs_dict.head > 0 and gs_dict.head) or git_branch + else + -- get file dir so we can search from that dir + local file_dir = vim.fn.expand "%:p:h" .. ";" + -- find .git/ folder genaral case + local git_dir = vim.fn.finddir(".git", file_dir) + -- find .git file in case of submodules or any other case git dir is in + -- any other place than .git/ + local git_file = vim.fn.findfile(".git", file_dir) + -- for some weird reason findfile gives relative path so expand it to fullpath + if #git_file > 0 then + git_file = vim.fn.fnamemodify(git_file, ":p") + end + if #git_file > #git_dir then + -- separate git-dir or submodule is used + local file = io.open(git_file) + git_dir = file:read() + git_dir = git_dir:match "gitdir: (.+)$" + file:close() + -- submodule / relative file path + if git_dir:sub(1, 1) ~= Branch.sep and not git_dir:match "^%a:.*$" then + git_dir = git_file:match "(.*).git" .. git_dir + end + end + + if #git_dir > 0 then + branch_sep = package.config:sub(1, 1) + local head_file = git_dir .. branch_sep .. "HEAD" + local f_head = io.open(head_file) + if f_head then + local HEAD = f_head:read() + f_head:close() + local branch = HEAD:match "ref: refs/heads/(.+)$" + if branch then + git_branch = branch + else + git_branch = HEAD:sub(1, 6) + end + end + end + end + return (git_branch ~= "" and "  " .. git_branch) or git_branch + end, hl = { fg = colors.grey_fg2, bg = colors.statusline_bg, }, - icon = "  ", } components.right.active[3] = { From af597372ec998b918f9ec939c54665c361b087e2 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 26 Aug 2021 13:53:48 +0530 Subject: [PATCH 0655/1541] plugins/configs/statusline: Remove extra space in lsp indicator --- lua/plugins/configs/statusline.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 10b9107..0cfb83d 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -204,7 +204,7 @@ components.mid.active[1] = { components.right.active[1] = { provider = function() if next(vim.lsp.buf_get_clients()) ~= nil then - return " " .. "  " .. " LSP" + return "  LSP " else return "" end From 66de975543bfa447e5459e18895cee173e5d28c4 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 26 Aug 2021 15:34:29 +0530 Subject: [PATCH 0656/1541] plugins/configs/statusline: Fix % icon for page position --- lua/plugins/configs/statusline.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 0cfb83d..b6c226c 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -369,7 +369,7 @@ components.right.active[10] = { return " Bot " end local result, _ = math.modf((current_line / total_line) * 100) - return " " .. result .. " % " + return " " .. result .. " %% " end, hl = { From adf0168dcca24ddecce76c82d724e4d18b5bacea Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 26 Aug 2021 15:10:26 +0530 Subject: [PATCH 0657/1541] plugins: More lazy load, yay use vim.defer_fn to load the plugins after entering the ui add the lazy load to setup lazy load gitsigns, neoscroll, lspinstall and vim-matchup using this method rearrange according to startup sequence --- lua/core/utils.lua | 10 +++++ lua/plugins/init.lua | 102 ++++++++++++++++++++++++------------------- 2 files changed, 66 insertions(+), 46 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index a9c6188..91e31d6 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -310,4 +310,14 @@ end]] return into end +-- load plugin after entering vim ui +M.packer_lazy_load = function(plugin, timer) + if plugin then + timer = timer or 0 + vim.defer_fn(function() + require("packer").loader(plugin) + end, timer) + end +end + return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 36446af..7e10672 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -16,6 +16,10 @@ return packer.startup(function() "Nvchad/extensions", } + use { + "nvim-lua/plenary.nvim", + } + use { "wbthomason/packer.nvim", event = "VimEnter", @@ -49,7 +53,7 @@ return packer.startup(function() use { "akinsho/bufferline.nvim", disable = not plugin_status.bufferline, - after = "feline.nvim", + after = "nvim-web-devicons", config = function() require "plugins.configs.bufferline" end, @@ -58,34 +62,6 @@ return packer.startup(function() end, } - use { - "nvim-lua/plenary.nvim", - } - - -- git stuff - use { - "lewis6991/gitsigns.nvim", - disable = not plugin_status.gitsigns, - cond = function() - return vim.fn.isdirectory ".git" == 1 - end, - config = function() - require "plugins.configs.gitsigns" - end, - } - - -- load autosave only if its globally enabled - use { - disable = not plugin_status.autosave, - "Pocco81/AutoSave.nvim", - config = function() - require "plugins.configs.autosave" - end, - cond = function() - return require("core.utils").load_config().options.plugin.autosave == true - end, - } - use { "lukas-reineke/indent-blankline.nvim", disable = not plugin_status.blankline, @@ -113,9 +89,38 @@ return packer.startup(function() end, } + -- git stuff + use { + "lewis6991/gitsigns.nvim", + disable = not plugin_status.gitsigns, + opt = true, + config = function() + require "plugins.configs.gitsigns" + end, + setup = function() + require("core.utils").packer_lazy_load "gitsigns.nvim" + end, + } + + -- smooth scroll + use { + "karb94/neoscroll.nvim", + disable = not plugin_status.neoscroll, + opt = true, + config = function() + require("plugins.configs.others").neoscroll() + end, + setup = function() + require("core.utils").packer_lazy_load "neoscroll.nvim" + end, + } + use { "kabouzeid/nvim-lspinstall", - event = "BufRead", + opt = true, + setup = function() + require("core.utils").packer_lazy_load "nvim-lspinstall" + end, } use { @@ -135,6 +140,27 @@ return packer.startup(function() end, } + use { + "andymass/vim-matchup", + disable = not plugin_status.vim_matchup, + opt = true, + setup = function() + require("core.utils").packer_lazy_load "vim-matchup" + end, + } + + -- load autosave only if its globally enabled + use { + disable = not plugin_status.autosave, + "Pocco81/AutoSave.nvim", + config = function() + require "plugins.configs.autosave" + end, + cond = function() + return require("core.utils").load_config().options.plugin.autosave == true + end, + } + use { "onsails/lspkind-nvim", disable = not plugin_status.lspkind, @@ -189,22 +215,6 @@ return packer.startup(function() end, } - use { - "andymass/vim-matchup", - disable = not plugin_status.vim_matchup, - event = "CursorMoved", - } - - -- smooth scroll - use { - "karb94/neoscroll.nvim", - disable = not plugin_status.neoscroll, - event = "WinScrolled", - config = function() - require("plugins.configs.others").neoscroll() - end, - } - use { "glepnir/dashboard-nvim", disable = not plugin_status.dashboard, From 780142b1504f8ad311b23557e198c859c324bd7f Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 26 Aug 2021 17:11:42 +0530 Subject: [PATCH 0658/1541] plugins/configs/bufferline: Use a more unique func name quit all, to avoid conflicts format file --- lua/plugins/configs/bufferline.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index f47846a..3a93953 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -5,11 +5,8 @@ if not present then return end -vim.cmd [[ - function Quitvim(a,b,c,d) - q - endfunction -]] +-- function executed for top right close button in bufferline +vim.cmd "function! NvChad_bufferline_quitvim(a,b,c,d) \n qa \n endfunction" bufferline.setup { options = { @@ -34,7 +31,10 @@ bufferline.setup { custom_areas = { right = function() local result = {} - table.insert(result, { text = "%@Quitvim@  %X", guifg = colors.red, guibg = colors.black }) + table.insert( + result, + { text = "%@NvChad_bufferline_quitvim@  %X", guifg = colors.red, guibg = colors.black } + ) return result end, }, From 4e645c3c9f5cda8bbad21271d725dd4aedb5be13 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 26 Aug 2021 18:58:48 +0530 Subject: [PATCH 0659/1541] mappings: Change reload_config function name changed in nvchad/extensions repo --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index cee78d8..06c132d 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -97,7 +97,7 @@ M.misc = function() map("n", maps.update_nvchad, ":NvChadUpdate ") -- add ChadReload command and maping - cmd "silent! command! NvChadReload lua require('chad_reload').Restart()" + cmd "silent! command! NvChadReload lua require('nvchad').reload_config()" end local function user_config_mappings() From e107e1aaf7f523815e6ffba25cfb9981f93d2364 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 26 Aug 2021 20:07:48 +0530 Subject: [PATCH 0660/1541] add space between lsp text/icon in statusline --- lua/plugins/configs/statusline.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index b6c226c..9467856 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -204,7 +204,7 @@ components.mid.active[1] = { components.right.active[1] = { provider = function() if next(vim.lsp.buf_get_clients()) ~= nil then - return "  LSP " + return "  LSP " else return "" end From 3c7de7a890b47f9b4704f0a13577add8e73f38c9 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 26 Aug 2021 22:59:05 +0530 Subject: [PATCH 0661/1541] keep chadreload on hold for now --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 06c132d..b372c30 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -97,7 +97,7 @@ M.misc = function() map("n", maps.update_nvchad, ":NvChadUpdate ") -- add ChadReload command and maping - cmd "silent! command! NvChadReload lua require('nvchad').reload_config()" + -- cmd "silent! command! NvChadReload lua require('nvchad').reload_config()" end local function user_config_mappings() From 59ec5a5fed955a984a8facd56b5706d2099855c3 Mon Sep 17 00:00:00 2001 From: Prescott Murphy Date: Thu, 26 Aug 2021 20:29:55 +0000 Subject: [PATCH 0662/1541] Correct bufferline diagnostics alternate setting Tiny change: the correct setting is `nvim_lsp` with an underscore, not a hyphen. https://github.com/akinsho/bufferline.nvim#lsp-indicators --- lua/plugins/configs/bufferline.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 3a93953..8a15943 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -26,7 +26,7 @@ bufferline.setup { show_buffer_close_icons = true, separator_style = "thin", always_show_bufferline = true, - diagnostics = false, -- "or nvim-lsp" + diagnostics = false, -- "or nvim_lsp" custom_areas = { right = function() From 475a4c5f38c06537cb708cfafe84261d7b529a58 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 27 Aug 2021 06:44:58 +0530 Subject: [PATCH 0663/1541] replace compe with cmp --- lua/core/options.lua | 1 - lua/plugins/configs/autopairs.lua | 12 ------ lua/plugins/configs/autosave.lua | 19 --------- lua/plugins/configs/cmp.lua | 63 ++++++++++++++++++++++++++++++ lua/plugins/configs/compe.lua | 26 ------------- lua/plugins/configs/lspconfig.lua | 14 +++++++ lua/plugins/configs/luasnip.lua | 57 +-------------------------- lua/plugins/configs/others.lua | 37 ++++++++++++++++++ lua/plugins/init.lua | 64 ++++++++++++++++++++----------- 9 files changed, 157 insertions(+), 136 deletions(-) delete mode 100644 lua/plugins/configs/autopairs.lua delete mode 100644 lua/plugins/configs/autosave.lua create mode 100644 lua/plugins/configs/cmp.lua delete mode 100644 lua/plugins/configs/compe.lua diff --git a/lua/core/options.lua b/lua/core/options.lua index 149d556..6872be6 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -8,7 +8,6 @@ local options = require("core.utils").load_config().options opt.clipboard = options.clipboard opt.cmdheight = options.cmdheight -opt.completeopt = { "menuone", "noselect" } opt.cul = true -- cursor line -- Indentline diff --git a/lua/plugins/configs/autopairs.lua b/lua/plugins/configs/autopairs.lua deleted file mode 100644 index 921307a..0000000 --- a/lua/plugins/configs/autopairs.lua +++ /dev/null @@ -1,12 +0,0 @@ -local present1, autopairs = pcall(require, "nvim-autopairs") -local present2, autopairs_completion = pcall(require, "nvim-autopairs.completion.compe") - -if not (present1 or present2) then - return -end - -autopairs.setup() -autopairs_completion.setup { - map_complete = true, -- insert () func completion - map_cr = true, -} diff --git a/lua/plugins/configs/autosave.lua b/lua/plugins/configs/autosave.lua deleted file mode 100644 index 2f41ff7..0000000 --- a/lua/plugins/configs/autosave.lua +++ /dev/null @@ -1,19 +0,0 @@ --- autosave.nvim plugin disabled by default -local present, autosave = pcall(require, "autosave") -if not present then - return -end - -autosave.setup { - enabled = vim.g.auto_save or false, -- takes boolean value from init.lua - execution_message = "autosaved at : " .. vim.fn.strftime "%H:%M:%S", - events = { "InsertLeave", "TextChanged" }, - conditions = { - exists = true, - filetype_is_not = {}, - modifiable = true, - }, - clean_command_line_interval = 2500, - on_off_commands = true, - write_all_buffers = false, -} diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua new file mode 100644 index 0000000..b149882 --- /dev/null +++ b/lua/plugins/configs/cmp.lua @@ -0,0 +1,63 @@ +vim.opt.completeopt = "menuone,noselect" + +local lspkind = require "lspkind" +local luasnip = require "luasnip" + +-- nvim-cmp setup +local cmp = require "cmp" +cmp.setup { + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + formatting = { + format = function(entry, vim_item) + vim_item.kind = lspkind.presets.default[vim_item.kind] .. " " .. vim_item.kind + + vim_item.menu = ({ + nvim_lsp = "[LSP]", + nvim_lua = "[Lua]", + buffer = "[BUF]", + })[entry.source.name] + + return vim_item + end, + }, + mapping = { + [""] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.close(), + [""] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }, + [""] = function(fallback) + if vim.fn.pumvisible() == 1 then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("", true, true, true), "n") + elseif luasnip.expand_or_jumpable() then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") + else + fallback() + end + end, + [""] = function(fallback) + if vim.fn.pumvisible() == 1 then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("", true, true, true), "n") + elseif luasnip.jumpable(-1) then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") + else + fallback() + end + end, + }, + sources = { + { name = "nvim_lsp" }, + { name = "luasnip" }, + { name = "buffer" }, + { name = "nvim_lua" }, + }, +} diff --git a/lua/plugins/configs/compe.lua b/lua/plugins/configs/compe.lua deleted file mode 100644 index d5c7a3d..0000000 --- a/lua/plugins/configs/compe.lua +++ /dev/null @@ -1,26 +0,0 @@ -local present, compe = pcall(require, "compe") -if not present then - return -end - -compe.setup { - enabled = true, - - autocomplete = true, - debug = false, - documentation = true, - incomplete_delay = 400, - max_abbr_width = 100, - max_kind_width = 100, - max_menu_width = 100, - min_length = 1, - preselect = "enable", - source_timeout = 200, - source = { - buffer = { kind = "﬘", true }, - luasnip = { kind = "﬌", true }, - nvim_lsp = true, - nvim_lua = true, - }, - throttle_time = 80, -} diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 6902706..ec74add 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -41,7 +41,21 @@ local function on_attach(_, bufnr) end local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.documentationFormat = { "markdown", "plaintext" } capabilities.textDocument.completion.completionItem.snippetSupport = true +capabilities.textDocument.completion.completionItem.preselectSupport = true +capabilities.textDocument.completion.completionItem.insertReplaceSupport = true +capabilities.textDocument.completion.completionItem.labelDetailsSupport = true +capabilities.textDocument.completion.completionItem.deprecatedSupport = true +capabilities.textDocument.completion.completionItem.commitCharactersSupport = true +capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } } +capabilities.textDocument.completion.completionItem.resolveSupport = { + properties = { + "documentation", + "detail", + "additionalTextEdits", + }, +} -- lspInstall + lspconfig stuff diff --git a/lua/plugins/configs/luasnip.lua b/lua/plugins/configs/luasnip.lua index 8b83cb7..aa14912 100644 --- a/lua/plugins/configs/luasnip.lua +++ b/lua/plugins/configs/luasnip.lua @@ -3,64 +3,9 @@ if not present then return end -local t = function(str) - return vim.api.nvim_replace_termcodes(str, true, true, true) -end - -local check_back_space = function() - local col = vim.fn.col "." - 1 - if col == 0 or vim.fn.getline("."):sub(col, col):match "%s" then - return true - else - return false - end -end - -_G.tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t "" - elseif luasnip and luasnip.expand_or_jumpable() then - return t "luasnip-expand-or-jump" - elseif check_back_space() then - return t "" - else - return vim.fn["compe#complete"]() - end -end -_G.s_tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t "" - elseif luasnip and luasnip.jumpable(-1) then - return t "luasnip-jump-prev" - else - return t "" - end -end - -_G.completions = function() - local npairs - if not pcall(function() - npairs = require "nvim-autopairs" - end) then - return - end - - if vim.fn.pumvisible() == 1 then - if vim.fn.complete_info()["selected"] ~= -1 then - return vim.fn["compe#confirm"] "" - end - end - return npairs.check_break_line_char() -end - -vim.api.nvim_set_keymap("i", "", "v:lua.completions()", { expr = true }) -vim.api.nvim_set_keymap("i", "", "v:lua.s_tab_complete()", { expr = true }) -vim.api.nvim_set_keymap("s", "", "v:lua.s_tab_complete()", { expr = true }) -vim.api.nvim_set_keymap("i", "", "v:lua.tab_complete()", { expr = true }) -vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", { expr = true }) - luasnip.config.set_config { history = true, updateevents = "TextChanged,TextChangedI", } + require("luasnip/loaders/from_vscode").load() diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 2363557..0364db1 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -1,5 +1,42 @@ local M = {} +M.autopairs = function() + local present1, autopairs = pcall(require, "nvim-autopairs") + local present2, autopairs_completion = pcall(require, "nvim-autopairs.completion.cmp") + + if not (present1 or present2) then + return + end + + autopairs.setup() + autopairs_completion.setup { + map_complete = true, -- insert () func completion + map_cr = true, + } +end + +M.autosave = function() + -- autosave.nvim plugin is disabled by default + local present, autosave = pcall(require, "autosave") + if not present then + return + end + + autosave.setup { + enabled = vim.g.auto_save or false, -- takes boolean value from init.lua + execution_message = "autosaved at : " .. vim.fn.strftime "%H:%M:%S", + events = { "InsertLeave", "TextChanged" }, + conditions = { + exists = true, + filetype_is_not = {}, + modifiable = true, + }, + clean_command_line_interval = 2500, + on_off_commands = true, + write_all_buffers = false, + } +end + M.better_escape = function() local config = require("core.utils").load_config() vim.g.better_escape_interval = config.options.plugin.esc_insertmode_timeout or 300 diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 7e10672..11dd0ac 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -154,7 +154,7 @@ return packer.startup(function() disable = not plugin_status.autosave, "Pocco81/AutoSave.nvim", config = function() - require "plugins.configs.autosave" + require("plugins.configs.others").autosave() end, cond = function() return require("core.utils").load_config().options.plugin.autosave == true @@ -164,7 +164,7 @@ return packer.startup(function() use { "onsails/lspkind-nvim", disable = not plugin_status.lspkind, - event = "InsertEnter", + after = "LuaSnip", config = function() require("plugins.configs.others").lspkind() end, @@ -182,36 +182,56 @@ return packer.startup(function() end, } - -- load compe in insert mode only + -- load luasnips + cmp related in insert mode only + use { - "hrsh7th/nvim-compe", + "L3MON4D3/LuaSnip", event = "InsertEnter", + wants = "friendly-snippets", config = function() - require "plugins.configs.compe" + require "plugins.configs.luasnip" end, - wants = "LuaSnip", - requires = { - { - "L3MON4D3/LuaSnip", - wants = "friendly-snippets", - event = "InsertCharPre", - config = function() - require "plugins.configs.luasnip" - end, - }, - { - "rafamadriz/friendly-snippets", - event = "InsertCharPre", - }, - }, + } + + use { + "hrsh7th/nvim-cmp", + config = function() + require "plugins.configs.cmp" + end, + after = "lspkind-nvim", + } + + use { + "saadparwaiz1/cmp_luasnip", + after = "nvim-cmp", + } + + use { + "hrsh7th/cmp-nvim-lua", + after = "cmp_luasnip", + } + + use { + "hrsh7th/cmp-nvim-lsp", + after = "cmp-nvim-lua", + } + + use { + "hrsh7th/cmp-buffer", + after = "cmp-nvim-lsp", + } + + use { + "rafamadriz/friendly-snippets", + after = "cmp-buffer", } -- misc plugins use { "windwp/nvim-autopairs", - after = "nvim-compe", + after = "nvim-cmp", config = function() - require "plugins.configs.autopairs" + require("plugins.configs.others").autopairs() end, } From 253047747ab657711d957ed6d4375ecdec319f3f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 27 Aug 2021 07:53:06 +0530 Subject: [PATCH 0664/1541] remove lspkind --- lua/plugins/configs/cmp.lua | 5 +++-- lua/plugins/configs/lspkind_icons.lua | 31 +++++++++++++++++++++++++++ lua/plugins/init.lua | 20 ++++++++--------- 3 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 lua/plugins/configs/lspkind_icons.lua diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index b149882..e8518e6 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -1,6 +1,6 @@ vim.opt.completeopt = "menuone,noselect" -local lspkind = require "lspkind" +local lspkind = require "plugins.configs.lspkind_icons" local luasnip = require "luasnip" -- nvim-cmp setup @@ -13,7 +13,8 @@ cmp.setup { }, formatting = { format = function(entry, vim_item) - vim_item.kind = lspkind.presets.default[vim_item.kind] .. " " .. vim_item.kind + -- load lspkind icons + vim_item.kind = string.format("%s %s", lspkind.icons[vim_item.kind], vim_item.kind) vim_item.menu = ({ nvim_lsp = "[LSP]", diff --git a/lua/plugins/configs/lspkind_icons.lua b/lua/plugins/configs/lspkind_icons.lua new file mode 100644 index 0000000..dd775b7 --- /dev/null +++ b/lua/plugins/configs/lspkind_icons.lua @@ -0,0 +1,31 @@ +local M = {} + +M.icons = { + Text = "", + Method = "", + Function = "", + Constructor = "", + Field = "ﰠ", + Variable = "", + Class = "ﴯ", + Interface = "", + Module = "", + Property = "ﰠ", + Unit = "塞", + Value = "", + Enum = "", + Keyword = "", + Snippet = "", + Color = "", + File = "", + Reference = "", + Folder = "", + EnumMember = "", + Constant = "", + Struct = "פּ", + Event = "", + Operator = "", + TypeParameter = "", +} + +return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 11dd0ac..51fab2e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -161,15 +161,15 @@ return packer.startup(function() end, } - use { - "onsails/lspkind-nvim", - disable = not plugin_status.lspkind, - after = "LuaSnip", - config = function() - require("plugins.configs.others").lspkind() - end, - } - + -- use { + -- "onsails/lspkind-nvim", + -- disable = not plugin_status.lspkind, + -- after = "LuaSnip", + -- config = function() + -- require("plugins.configs.others").lspkind() + -- end, + -- } + -- use { "jdhao/better-escape.vim", disable = not plugin_status.esc_insertmode, @@ -198,7 +198,7 @@ return packer.startup(function() config = function() require "plugins.configs.cmp" end, - after = "lspkind-nvim", + after = "LuaSnip", } use { From 647c3730aed98208cdc6d7b703516c1d3d040452 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 27 Aug 2021 07:56:44 +0530 Subject: [PATCH 0665/1541] clean up --- lua/plugins/init.lua | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 51fab2e..e80605e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -80,7 +80,6 @@ return packer.startup(function() end, } - -- lsp stuff use { "nvim-treesitter/nvim-treesitter", event = "BufRead", @@ -115,6 +114,7 @@ return packer.startup(function() end, } + -- lsp stuff use { "kabouzeid/nvim-lspinstall", opt = true, @@ -161,15 +161,6 @@ return packer.startup(function() end, } - -- use { - -- "onsails/lspkind-nvim", - -- disable = not plugin_status.lspkind, - -- after = "LuaSnip", - -- config = function() - -- require("plugins.configs.others").lspkind() - -- end, - -- } - -- use { "jdhao/better-escape.vim", disable = not plugin_status.esc_insertmode, From c87482f107a91364ac95302e6ac3f4c1030cf432 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 27 Aug 2021 08:11:46 +0530 Subject: [PATCH 0666/1541] lazy load luasnip after cmp --- lua/plugins/configs/cmp.lua | 3 +-- lua/plugins/init.lua | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index e8518e6..064f8c9 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -1,10 +1,9 @@ vim.opt.completeopt = "menuone,noselect" local lspkind = require "plugins.configs.lspkind_icons" -local luasnip = require "luasnip" +local cmp = require "cmp" -- nvim-cmp setup -local cmp = require "cmp" cmp.setup { snippet = { expand = function(args) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e80605e..90e394e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -176,25 +176,25 @@ return packer.startup(function() -- load luasnips + cmp related in insert mode only use { - "L3MON4D3/LuaSnip", + "hrsh7th/nvim-cmp", event = "InsertEnter", + config = function() + require "plugins.configs.cmp" + end, + } + + use { + "L3MON4D3/LuaSnip", wants = "friendly-snippets", + after = "nvim-cmp", config = function() require "plugins.configs.luasnip" end, } - use { - "hrsh7th/nvim-cmp", - config = function() - require "plugins.configs.cmp" - end, - after = "LuaSnip", - } - use { "saadparwaiz1/cmp_luasnip", - after = "nvim-cmp", + after = "LuaSnip", } use { From 828217b9da4a2b6def830e871f0f467e05d2424f Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Fri, 27 Aug 2021 08:57:58 +0530 Subject: [PATCH 0667/1541] feat: Added gh action formatter --- .github/workflows/format.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/format.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..b9cfe24 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,30 @@ +name: format + +on: + push: + paths: '**.lua' + branches: [main, dev] + +jobs: + stylua: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup and run stylua + uses: JohnnyMorganz/stylua-action@1.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --config-path=./.stylua.toml -g *.lua -g !lua/core/**/*.lua -g !lua/modules/**/*.lua -g !lua/utils/*.lua -- . + - name: Commit files + run: | + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + if [[ ! -z $(git status -s) ]]; then + git add . + git commit -m "chore: format source code" + fi + - name: Push formatted files + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} From 130b2bfe001521fbf72dab2b7e30d30a4dbc2434 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 27 Aug 2021 09:16:10 +0530 Subject: [PATCH 0668/1541] Update format.yml --- .github/workflows/format.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index b9cfe24..1c342d0 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -1,9 +1,12 @@ -name: format + name: format on: push: - paths: '**.lua' - branches: [main, dev] + branches: "**" + pull_request: + branches: + - "main" + - "develop" jobs: stylua: From f7ff16e84ee31b02d3a45ac5400b7d0905dc72d8 Mon Sep 17 00:00:00 2001 From: Ashin Antony <83629316+ashincoder@users.noreply.github.com> Date: Fri, 27 Aug 2021 09:38:16 +0530 Subject: [PATCH 0669/1541] Update format.yml A document of yaml must not have a indent in the start of the line. --- .github/workflows/format.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 1c342d0..e1f9eba 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -1,4 +1,4 @@ - name: format +name: format on: push: From 97e155f3a263e96ca48bf9dc9ec8f7599ceedcd1 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 27 Aug 2021 09:58:54 +0530 Subject: [PATCH 0670/1541] use nerdfont glyphs for lsp progress spinners --- lua/plugins/configs/statusline.lua | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 9467856..a1830e8 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -181,20 +181,25 @@ components.mid.active[1] = { local percentage = Lsp.percentage or 0 local title = Lsp.title or "" local spinners = { - "󰝦", - "󰪞", - "󰪟", - "󰪠", - "󰪡", - "󰪢", - "󰪣", - "󰪤", - "󰪥", + "", + "", + "", + } + + local success_icon = { + "", + "", + "", } local ms = vim.loop.hrtime() / 1000000 local frame = math.floor(ms / 120) % #spinners - return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage) + + if percentage >= 70 then + return string.format(" %%<%s %s %s (%s%%%%) ", success_icon[frame + 1], title, msg, percentage) + else + return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage) + end end return "" end, From a1c103b6a856f420886b9c24ac39ae943ef94ad4 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 26 Aug 2021 23:44:12 +0530 Subject: [PATCH 0671/1541] lsp: Reload current buffer after startup so lsp aftually starts for the current buffer, rest buffers are fine --- lua/plugins/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 90e394e..1389d40 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -120,6 +120,10 @@ return packer.startup(function() opt = true, setup = function() require("core.utils").packer_lazy_load "nvim-lspinstall" + -- reload the current file so lsp actually starts for it + vim.defer_fn(function() + vim.cmd "silent! e %" + end, 0) end, } From 2c33e3dd3892f737dc4639ee4c99840a34516206 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 27 Aug 2021 08:30:14 +0530 Subject: [PATCH 0672/1541] mappings: Fix strange delete/yank/cut behaviour | Resolve #379 use mode() to detect if currently in operator pending mode, if then use normal j otherwise gj --- lua/core/mappings.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index b372c30..6f58bdb 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -19,10 +19,11 @@ M.misc = function() -- Allow moving the cursor through wrapped lines with j, k, and -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ -- empty mode is same as using :map - map("", "j", 'v:count ? "j" : "gj"', { expr = true }) - map("", "k", 'v:count ? "k" : "gk"', { expr = true }) - map("", "", 'v:count ? "j" : "gj"', { expr = true }) - map("", "", 'v:count ? "k" : "gk"', { expr = true }) + -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour + map("", "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) + map("", "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) + map("", "", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) + map("", "", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) -- use ESC to turn off search highlighting map("n", "", ":noh ") From 0e09c3f4717ec2a4e3fcba6948eab6905b9881cb Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 27 Aug 2021 13:48:04 +0530 Subject: [PATCH 0673/1541] rm extra space from statusline icons --- lua/plugins/configs/lspconfig.lua | 6 ++++++ lua/plugins/configs/statusline.lua | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index ec74add..87076f4 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -68,12 +68,18 @@ local function setup_servers() lspconfig[lang].setup { on_attach = on_attach, capabilities = capabilities, + flags = { + debounce_text_changes = 500, + }, -- root_dir = vim.loop.cwd, } elseif lang == "lua" then lspconfig[lang].setup { on_attach = on_attach, capabilities = capabilities, + flags = { + debounce_text_changes = 500, + }, settings = { Lua = { diagnostics = { diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index a1830e8..04ffb71 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -21,7 +21,7 @@ local icon_styles = { left = " ", right = " ", main_icon = "  ", - vi_mode_icon = "  ", + vi_mode_icon = "  ", position_icon = "  ", }, @@ -209,7 +209,7 @@ components.mid.active[1] = { components.right.active[1] = { provider = function() if next(vim.lsp.buf_get_clients()) ~= nil then - return "  LSP " + return " LSP" else return "" end From 57d071436211891e8744fe4789844db2239627a9 Mon Sep 17 00:00:00 2001 From: Ashin Antony <83629316+ashincoder@users.noreply.github.com> Date: Fri, 27 Aug 2021 13:50:43 +0530 Subject: [PATCH 0674/1541] format on pushes only not PR's. --- .github/workflows/format.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index e1f9eba..b3af233 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -1,12 +1,7 @@ name: format - on: push: branches: "**" - pull_request: - branches: - - "main" - - "develop" jobs: stylua: From b63e1502a5e935eb0b0b67c791465d087ab5e959 Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Fri, 27 Aug 2021 14:53:58 +0530 Subject: [PATCH 0675/1541] fix: Fixing the luasnip error while tabbing --- lua/plugins/configs/cmp.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 064f8c9..65b536c 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -1,6 +1,5 @@ vim.opt.completeopt = "menuone,noselect" -local lspkind = require "plugins.configs.lspkind_icons" local cmp = require "cmp" -- nvim-cmp setup @@ -13,7 +12,11 @@ cmp.setup { formatting = { format = function(entry, vim_item) -- load lspkind icons - vim_item.kind = string.format("%s %s", lspkind.icons[vim_item.kind], vim_item.kind) + vim_item.kind = string.format( + "%s %s", + require("plugins.configs.lspkind_icons").icons[vim_item.kind], + vim_item.kind + ) vim_item.menu = ({ nvim_lsp = "[LSP]", @@ -38,7 +41,7 @@ cmp.setup { [""] = function(fallback) if vim.fn.pumvisible() == 1 then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("", true, true, true), "n") - elseif luasnip.expand_or_jumpable() then + elseif require("luasnip").expand_or_jumpable() then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") else fallback() @@ -47,7 +50,7 @@ cmp.setup { [""] = function(fallback) if vim.fn.pumvisible() == 1 then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("", true, true, true), "n") - elseif luasnip.jumpable(-1) then + elseif require("luasnip").jumpable(-1) then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") else fallback() From 6b31861aeb6bcf9a08926ba0c68b5b6aa574e734 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 27 Aug 2021 16:00:44 +0530 Subject: [PATCH 0676/1541] remove custom area from bufferline --- lua/plugins/configs/bufferline.lua | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 8a15943..5a91cc3 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -13,8 +13,8 @@ bufferline.setup { offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, buffer_close_icon = "", modified_icon = "", - close_icon = "", - show_close_icon = false, + close_icon = "%@NvChad_bufferline_quitvim@%X", + show_close_icon = true, left_trunc_marker = "", right_trunc_marker = "", max_name_length = 14, @@ -27,17 +27,6 @@ bufferline.setup { separator_style = "thin", always_show_bufferline = true, diagnostics = false, -- "or nvim_lsp" - - custom_areas = { - right = function() - local result = {} - table.insert( - result, - { text = "%@NvChad_bufferline_quitvim@  %X", guifg = colors.red, guibg = colors.black } - ) - return result - end, - }, custom_filter = function(buf_number) -- Func to filter out our managed/persistent split terms local present_type, type = pcall(function() From cdf925063603af55ecc5b89a4086e13b9f6a9b02 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 27 Aug 2021 11:57:25 +0530 Subject: [PATCH 0677/1541] Hide statusline in help too --- lua/default_config.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/default_config.lua b/lua/default_config.lua index c4920ec..c176557 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -31,9 +31,10 @@ M.ui.plugin = { -- these are filetypes, not pattern matched -- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden hidden = { + "help", + "dashboard", "NvimTree", "terminal", - "dashboard", }, shown = {}, -- default, round , slant , block , arrow From d90747415fc6cd487fa7a9cdcc59f45784e81809 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 27 Aug 2021 13:40:20 +0530 Subject: [PATCH 0678/1541] plugins/configs/statusline: Fix branch seperator --- lua/plugins/configs/statusline.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 04ffb71..07a0b55 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -227,6 +227,8 @@ components.right.active[2] = { if gs_dict then git_branch = (gs_dict.head and #gs_dict.head > 0 and gs_dict.head) or git_branch else + -- path seperator + local branch_sep = package.config:sub(1, 1) -- get file dir so we can search from that dir local file_dir = vim.fn.expand "%:p:h" .. ";" -- find .git/ folder genaral case @@ -245,13 +247,12 @@ components.right.active[2] = { git_dir = git_dir:match "gitdir: (.+)$" file:close() -- submodule / relative file path - if git_dir:sub(1, 1) ~= Branch.sep and not git_dir:match "^%a:.*$" then + if git_dir:sub(1, 1) ~= branch_sep and not git_dir:match "^%a:.*$" then git_dir = git_file:match "(.*).git" .. git_dir end end if #git_dir > 0 then - branch_sep = package.config:sub(1, 1) local head_file = git_dir .. branch_sep .. "HEAD" local f_head = io.open(head_file) if f_head then From e800122b45f5ec7f49de732cc89ed913eda7c47b Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 27 Aug 2021 15:32:33 +0530 Subject: [PATCH 0679/1541] plugins/configs/cmp: Enclose in pcall --- lua/plugins/configs/cmp.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 65b536c..6c1b7f3 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -1,6 +1,10 @@ -vim.opt.completeopt = "menuone,noselect" +local present, cmp = pcall(require, "cmp") -local cmp = require "cmp" +if not present then + return +end + +vim.opt.completeopt = "menuone,noselect" -- nvim-cmp setup cmp.setup { From 2efac1cd675f2e192a344b7a46b085f492539888 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 28 Aug 2021 06:22:26 +0530 Subject: [PATCH 0680/1541] add original nord theme | rename norchad --- lua/colors/themes/{norchad.lua => nord.lua} | 0 lua/colors/themes/onenord.lua | 35 +++++++++++++++++++++ 2 files changed, 35 insertions(+) rename lua/colors/themes/{norchad.lua => nord.lua} (100%) create mode 100644 lua/colors/themes/onenord.lua diff --git a/lua/colors/themes/norchad.lua b/lua/colors/themes/nord.lua similarity index 100% rename from lua/colors/themes/norchad.lua rename to lua/colors/themes/nord.lua diff --git a/lua/colors/themes/onenord.lua b/lua/colors/themes/onenord.lua new file mode 100644 index 0000000..ce715b3 --- /dev/null +++ b/lua/colors/themes/onenord.lua @@ -0,0 +1,35 @@ +local colors = { + white = "#abb2bf", + darker_black = "#2a303c", + black = "#2E3440", -- nvim bg + black2 = "#343a46", + one_bg = "#373d49", + one_bg2 = "#464c58", + one_bg3 = "#494f5b", + grey = "#4b515d", + grey_fg = "#565c68", + grey_fg2 = "#606672", + light_grey = "#646a76", + red = "#BF616A", + baby_pink = "#de878f", + pink = "#d57780", + line = "#3a404c", -- for lines like vertsplit + green = "#A3BE8C", + vibrant_green = "#afca98", + blue = "#7797b7", + nord_blue = "#81A1C1", + yellow = "#EBCB8B", + sun = "#e1c181", + purple = "#aab1be", + dark_purple = "#B48EAD", + teal = "#6484a4", + orange = "#e39a83", + cyan = "#9aafe6", + statusline_bg = "#333945", + lightbg = "#3f4551", + lightbg2 = "#393f4b", + pmenu_bg = "#A3BE8C", + folder_bg = "#7797b7", +} + +return colors From d5f4c044246244e97175dcf6272f239ef44defac Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 28 Aug 2021 06:48:51 +0530 Subject: [PATCH 0681/1541] add original gruvbox theme --- lua/colors/themes/gruvbox.lua | 35 ++++++++++++++++++++++++++++++ lua/plugins/configs/statusline.lua | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 lua/colors/themes/gruvbox.lua diff --git a/lua/colors/themes/gruvbox.lua b/lua/colors/themes/gruvbox.lua new file mode 100644 index 0000000..d1fb272 --- /dev/null +++ b/lua/colors/themes/gruvbox.lua @@ -0,0 +1,35 @@ +local colors = { + white = "#ebdbb2", + darker_black = "#232323", + black = "#282828", -- nvim bg + black2 = "#2e2e2e", + one_bg = "#353535", + one_bg2 = "#3f3f3f", + one_bg3 = "#444444", + grey = "#464646", + grey_fg = "#4e4e4e", + grey_fg2 = "#505050", + light_grey = "#565656", + red = "#fb4934", + baby_pink = "#cc241d", + pink = "#ff75a0", + line = "#2c2f30", -- for lines like vertsplit + green = "#b8bb26", + vibrant_green = "#a9b665", + nord_blue = "#83a598", + blue = "#458588", + yellow = "#d79921", + sun = "#fabd2f", + purple = "#b4bbc8", + dark_purple = "#d3869b", + teal = "#749689", + orange = "#e78a4e", + cyan = "#82b3a8", + statusline_bg = "#2c2c2c", + lightbg = "#353535", + lightbg2 = "#303030", + pmenu_bg = "#83a598", + folder_bg = "#83a598", +} + +return colors diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 07a0b55..826e37f 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -97,7 +97,7 @@ components.left.active[3] = { components.left.active[4] = { provider = function() local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") - return " " .. dir_name .. " " + return "  " .. dir_name .. " " end, hl = { From 5db010e870edc791138e6145b379c328029466f3 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 28 Aug 2021 09:39:38 +0530 Subject: [PATCH 0682/1541] mv luasnip config to others.lua --- lua/plugins/configs/luasnip.lua | 11 ----------- lua/plugins/configs/others.lua | 13 +++++++++++++ lua/plugins/configs/statusline.lua | 2 +- lua/plugins/init.lua | 2 +- 4 files changed, 15 insertions(+), 13 deletions(-) delete mode 100644 lua/plugins/configs/luasnip.lua diff --git a/lua/plugins/configs/luasnip.lua b/lua/plugins/configs/luasnip.lua deleted file mode 100644 index aa14912..0000000 --- a/lua/plugins/configs/luasnip.lua +++ /dev/null @@ -1,11 +0,0 @@ -local present, luasnip = pcall(require, "luasnip") -if not present then - return -end - -luasnip.config.set_config { - history = true, - updateevents = "TextChanged,TextChangedI", -} - -require("luasnip/loaders/from_vscode").load() diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 0364db1..a7f36a6 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -68,6 +68,19 @@ M.comment = function() end end +M.luasnip = function() + local present, luasnip = pcall(require, "luasnip") + if not present then + return + end + + luasnip.config.set_config { + history = true, + updateevents = "TextChanged,TextChangedI", + } + require("luasnip/loaders/from_vscode").load() +end + M.lspkind = function() local present, lspkind = pcall(require, "lspkind") if present then diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 826e37f..cb4ff88 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -375,7 +375,7 @@ components.right.active[10] = { return " Bot " end local result, _ = math.modf((current_line / total_line) * 100) - return " " .. result .. " %% " + return " " .. result .. "%% " end, hl = { diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 1389d40..ff4c3a2 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -192,7 +192,7 @@ return packer.startup(function() wants = "friendly-snippets", after = "nvim-cmp", config = function() - require "plugins.configs.luasnip" + require("plugins.configs.others").luasnip() end, } From df9a7808461504a4f986ff653eba3eadcfd60bd1 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 29 Aug 2021 08:07:02 +0530 Subject: [PATCH 0683/1541] change mapping keys for nvimtreefocus --- lua/default_config.lua | 2 +- lua/plugins/configs/zenmode.lua | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/default_config.lua b/lua/default_config.lua index c176557..82c457f 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -170,7 +170,7 @@ M.mappings.plugin = { nvimtree = { -- file tree toggle = "", - focus = "", + focus = "e", }, neoformat = { format = "fm", diff --git a/lua/plugins/configs/zenmode.lua b/lua/plugins/configs/zenmode.lua index 695ddc9..f51439a 100644 --- a/lua/plugins/configs/zenmode.lua +++ b/lua/plugins/configs/zenmode.lua @@ -49,7 +49,6 @@ true_zen.setup { }, integrations = { vim_gitgutter = false, - galaxyline = true, tmux = false, gitsigns = false, nvim_bufferline = true, From 1dacbeb46295d85ee6605ed7d06db61ecc54f96f Mon Sep 17 00:00:00 2001 From: Frenzy Date: Fri, 27 Aug 2021 13:20:23 -0400 Subject: [PATCH 0684/1541] Added Aquarium --- lua/colors/themes/aquarium.lua | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 lua/colors/themes/aquarium.lua diff --git a/lua/colors/themes/aquarium.lua b/lua/colors/themes/aquarium.lua new file mode 100644 index 0000000..17b7151 --- /dev/null +++ b/lua/colors/themes/aquarium.lua @@ -0,0 +1,35 @@ +local colors = { + white = "#63718b", + darker_black = "#10171e", + black = "#20202A", -- nvim bg + black2 = "#1d2021", + one_bg = "#20202A", + one_bg2 = "#2c2e3e", + one_bg3 = "#3D4059", + grey = "#4e5c70", + grey_fg = "#c8cedc", + grey_fg2 = "#63718b", + light_grey = "#A6AFC1", + red = "#ebb9b9", + baby_pink = "#EAC1C1", + pink = "#E9D1D1", + line = "#313449", -- for lines like vertsplit + green = "#b1dba4", + vibrant_green = "#BEE0A8", + blue = "#CDDBF9", + nord_blue = "#BCCAEB", + yellow = "#E6DFB8", + sun = "#EEE8BA", + purple = "#f6bbe7", + dark_purple = "#E8B6E9", + teal = "#AEDCB7", + orange = "#E8CCA7", + cyan = "#b8dceb", + statusline_bg = "#2c2e3e", + lightbg = "#222930", + lightbg2 = "#1d242b", + pmenu_bg = "#63718b", + folder_bg = "#b8dceb", +} + +return colors From 146c0ed54f3fe6e6dd89eb994f6a9f37f9920745 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 29 Aug 2021 10:01:41 +0530 Subject: [PATCH 0685/1541] improve aquarium theme colors --- lua/colors/themes/aquarium.lua | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lua/colors/themes/aquarium.lua b/lua/colors/themes/aquarium.lua index 17b7151..f125a00 100644 --- a/lua/colors/themes/aquarium.lua +++ b/lua/colors/themes/aquarium.lua @@ -1,19 +1,19 @@ local colors = { - white = "#63718b", - darker_black = "#10171e", + white = "#ced4df", + darker_black = "#1a1a24", black = "#20202A", -- nvim bg - black2 = "#1d2021", - one_bg = "#20202A", - one_bg2 = "#2c2e3e", - one_bg3 = "#3D4059", - grey = "#4e5c70", - grey_fg = "#c8cedc", - grey_fg2 = "#63718b", - light_grey = "#A6AFC1", + black2 = "#25252f", + one_bg = "#2a2a34", + one_bg2 = "#34343e", + one_bg3 = "#3e3e48", + grey = "#484852", + grey_fg = "#4e4e58", + grey_fg2 = "#54545e", + light_grey = "#5a5a64", red = "#ebb9b9", baby_pink = "#EAC1C1", pink = "#E9D1D1", - line = "#313449", -- for lines like vertsplit + line = "#292933", -- for lines like vertsplit green = "#b1dba4", vibrant_green = "#BEE0A8", blue = "#CDDBF9", @@ -25,10 +25,10 @@ local colors = { teal = "#AEDCB7", orange = "#E8CCA7", cyan = "#b8dceb", - statusline_bg = "#2c2e3e", - lightbg = "#222930", - lightbg2 = "#1d242b", - pmenu_bg = "#63718b", + statusline_bg = "#262630", + lightbg = "#2e2e38", + lightbg2 = "#2a2a34", + pmenu_bg = "#ebb9b9", folder_bg = "#b8dceb", } From 28015f639c052c50803f805937bf15ebd1964339 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 29 Aug 2021 10:04:50 +0530 Subject: [PATCH 0686/1541] change keys for lsp signature help mapping --- lua/plugins/configs/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 87076f4..2bfd1dd 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -24,7 +24,7 @@ local function on_attach(_, bufnr) buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()", opts) buf_set_keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) - buf_set_keymap("n", "", "lua vim.lsp.buf.signature_help()", opts) + buf_set_keymap("n", "gk", "lua vim.lsp.buf.signature_help()", opts) buf_set_keymap("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) buf_set_keymap("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) buf_set_keymap("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) From 7ddd394172c0e3c117b8198db86fab3e40f21c00 Mon Sep 17 00:00:00 2001 From: JoakoV3 Date: Fri, 27 Aug 2021 02:50:07 -0300 Subject: [PATCH 0687/1541] Changed mappings to move between windows/terminals with Ctrl+h,j,k,l --- lua/chadrc.lua | 5 +++++ lua/core/mappings.lua | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index c8fdfd7..f730f8e 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -143,6 +143,11 @@ M.mappings.plugin = { bufferline = { next_buffer = "", -- next buffer prev_buffer = "", -- previous buffer + --better window movement + moveLeft = "", + moveRight = "", + moveUp = "", + moveDown = "", }, chadsheet = { default_keys = "dk", diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 6f58bdb..aa941ce 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -129,6 +129,10 @@ M.bufferline = function() map("n", m.next_buffer, ":BufferLineCycleNext ") map("n", m.prev_buffer, ":BufferLineCyclePrev ") + map("n", m.moveLeft, "h") + map("n", m.moveRight, "l") + map("n", m.moveUp, "k") + map("n", m.moveDown, "j") end M.chadsheet = function() From 60db2ec6266e203f2625501488e745ae9c837ecf Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 29 Aug 2021 12:20:15 +0530 Subject: [PATCH 0688/1541] disable some plugins by default --- lua/chadrc.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index f730f8e..988081f 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -74,7 +74,7 @@ M.options.plugin = { -- enable and disable plugins (false for disable) M.plugin_status = { - autosave = true, -- to autosave files + autosave = false, -- to autosave files blankline = true, -- beautified blank lines bufferline = true, -- buffer shown as tabs cheatsheet = true, -- fuzzy search your commands/keymappings @@ -88,9 +88,9 @@ M.plugin_status = { lspsignature = true, -- lsp enhancements neoformat = true, -- universal formatter neoscroll = true, -- smooth scroll - telescope_media = true, -- see media files in telescope picker - truezen = true, -- no distraction mode for nvim - vim_fugitive = true, -- git in nvim + telescope_media = false, -- see media files in telescope picker + truezen = false, -- no distraction mode for nvim + vim_fugitive = false, -- git in nvim vim_matchup = true, -- % magic, match it but improved } From e1dfaa7a453d91dc19daf76ed9ea852f2234aa83 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 30 Aug 2021 05:54:31 +0530 Subject: [PATCH 0689/1541] add default config for nvim-colorizer --- lua/colors/themes/gruvchad.lua | 2 +- lua/plugins/configs/others.lua | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lua/colors/themes/gruvchad.lua b/lua/colors/themes/gruvchad.lua index b51d968..2142f2b 100644 --- a/lua/colors/themes/gruvchad.lua +++ b/lua/colors/themes/gruvchad.lua @@ -2,7 +2,7 @@ local colors = { white = "#c7b89d", darker_black = "#1e2122", black = "#222526", -- nvim bg - black2 = "#26292a", + black2 = "#282b2c", one_bg = "#2b2e2f", one_bg2 = "#3b3e3f", one_bg3 = "#313435", diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index a7f36a6..9b7ac0b 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -56,7 +56,19 @@ end M.colorizer = function() local present, colorizer = pcall(require, "colorizer") if present then - colorizer.setup() + colorizer.setup({ "*" }, { + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + names = false, -- "Name" codes like Blue + RRGGBBAA = false, -- #RRGGBBAA hex codes + rgb_fn = false, -- CSS rgb() and rgba() functions + hsl_fn = false, -- CSS hsl() and hsla() functions + css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn + + -- Available modes: foreground, background + mode = "background", -- Set the display mode. + }) vim.cmd "ColorizerReloadAllBuffers" end end From ad35d6b6e2807f57c017a744619a6e118b043950 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 30 Aug 2021 11:40:58 +0530 Subject: [PATCH 0690/1541] use the default close_icon in bufferline --- lua/plugins/configs/bufferline.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 5a91cc3..0b15ae5 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -13,7 +13,8 @@ bufferline.setup { offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, buffer_close_icon = "", modified_icon = "", - close_icon = "%@NvChad_bufferline_quitvim@%X", + -- close_icon = "%@NvChad_bufferline_quitvim@%X", + close_icon = "", show_close_icon = true, left_trunc_marker = "", right_trunc_marker = "", From 56ea1714f6e46855981258a05435e663c1281b4e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 30 Aug 2021 11:48:52 +0530 Subject: [PATCH 0691/1541] fix packer compile spam on startup (#325) --- lua/plugins/configs/telescope.lua | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 7b887cb..df20753 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -73,16 +73,8 @@ if vim.fn.executable "ueberzug" == 1 then packer_repos = packer_repos .. ', "telescope-media-files.nvim"' end -if not pcall(function() +pcall(function() for _, ext in ipairs(extensions) do telescope.load_extension(ext) end -end) then - -- This should only trigger when in need of PackerSync, so better do it - print "After completion of PackerCompile, restart neovim." - -- Trigger packer compile on PackerComplete, so it properly waits for PackerSync - vim.cmd 'autocmd User PackerComplete ++once lua print "Waiting for PackerCompile.." require("packer").compile()' - vim.cmd 'autocmd User PackerCompileDone ++once echo "Packer Compile done, restart neovim."' - require "plugins" - loadstring('require("packer").update(' .. packer_repos .. ")")() -end +end) From a12455509bb924736efbef8d2bf6b6b7f7f49c43 Mon Sep 17 00:00:00 2001 From: mxzel <976508106@qq.com> Date: Tue, 31 Aug 2021 23:16:57 +0800 Subject: [PATCH 0692/1541] fix typo --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index aa941ce..fd69e20 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -118,7 +118,7 @@ M.misc = function() user_config_mappings() end --- below are all plugin related mappinsg +-- below are all plugin related mappings M.better_escape = function() vim.g.better_escape_shortcut = plugin_maps.better_escape.esc_insertmode or { "" } From 2cf3e2cac5fac14e128f2caa01586414e3f6c126 Mon Sep 17 00:00:00 2001 From: Prescott Murphy Date: Tue, 31 Aug 2021 18:07:17 +0000 Subject: [PATCH 0693/1541] Set colors for lsp diagnostics Fixes a small issue with coloring when `diagnostics = "nvim_lsp"` is set to enhance color consistency. --- lua/plugins/configs/bufferline.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 0b15ae5..1f7421b 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -64,6 +64,16 @@ bufferline.setup { guifg = colors.light_grey, guibg = colors.black2, }, + + -- for diagnostics = "nvim_lsp" + error = { + guifg = colors.light_grey, + guibg = colors.black2, + }, + error_diagnostic = { + guifg = colors.light_grey, + guibg = colors.black2 + }, -- close buttons close_button = { From a125c388c3aada0cfbb9d88ef191e409b64a9d2c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 31 Aug 2021 19:02:03 +0000 Subject: [PATCH 0694/1541] chore: format source code --- lua/plugins/configs/bufferline.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 1f7421b..fe19be7 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -64,7 +64,7 @@ bufferline.setup { guifg = colors.light_grey, guibg = colors.black2, }, - + -- for diagnostics = "nvim_lsp" error = { guifg = colors.light_grey, @@ -72,7 +72,7 @@ bufferline.setup { }, error_diagnostic = { guifg = colors.light_grey, - guibg = colors.black2 + guibg = colors.black2, }, -- close buttons From ec7b15feada4dcf13a0ed15cff2606bad38017ee Mon Sep 17 00:00:00 2001 From: Marwan Mustafa Date: Wed, 1 Sep 2021 07:57:56 +1200 Subject: [PATCH 0695/1541] fix(plugin): indentline using config instead of setup --- lua/plugins/configs/others.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 9b7ac0b..ea9478d 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -43,14 +43,14 @@ M.better_escape = function() end M.blankline = function() - vim.g.indentLine_enabled = 1 - vim.g.indent_blankline_char = "▏" - - vim.g.indent_blankline_filetype_exclude = { "help", "terminal", "dashboard", "packer" } - vim.g.indent_blankline_buftype_exclude = { "terminal" } - - vim.g.indent_blankline_show_trailing_blankline_indent = false - vim.g.indent_blankline_show_first_indent_level = false + require("indent_blankline").setup { + indentLine_enabled = 1, + char = "▏", + indent_blankline_filetype_exclude = { "help", "terminal", "dashboard", "packer" }, + indent_blankline_buftype_exclude = { "terminal" }, + indent_blankline_show_trailing_blankline_indent = false, + indent_blankline_show_first_indent_level = false, + } end M.colorizer = function() From a3e436d16d12e0eb7c63020c138b1908fe69af57 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 1 Sep 2021 10:09:02 +0530 Subject: [PATCH 0696/1541] update blankline config --- lua/plugins/configs/others.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index ea9478d..12f0860 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -43,13 +43,22 @@ M.better_escape = function() end M.blankline = function() + vim.g.indent_blankline_show_trailing_blankline_indent = false + vim.g.indent_blankline_show_first_indent_level = false + require("indent_blankline").setup { indentLine_enabled = 1, char = "▏", - indent_blankline_filetype_exclude = { "help", "terminal", "dashboard", "packer" }, + indent_blankline_filetype_exclude = { + "help", + "terminal", + "dashboard", + "packer", + "lspinfo", + "TelescopePrompt", + "TelescopeResults", + }, indent_blankline_buftype_exclude = { "terminal" }, - indent_blankline_show_trailing_blankline_indent = false, - indent_blankline_show_first_indent_level = false, } end From 19e17eac586874e81ec8b9db4902de1576f6b5d4 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 1 Sep 2021 19:03:34 +0530 Subject: [PATCH 0697/1541] add uwu theme --- lua/colors/themes/uwu.lua | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 lua/colors/themes/uwu.lua diff --git a/lua/colors/themes/uwu.lua b/lua/colors/themes/uwu.lua new file mode 100644 index 0000000..5f1d740 --- /dev/null +++ b/lua/colors/themes/uwu.lua @@ -0,0 +1,35 @@ +local colors = { + white = "#d6d6d6", + darker_black = "#0b0f11", + black = "#0F1315", -- nvim bg + black2 = "#161a1c", + one_bg = "#1b1f21", + one_bg2 = "#202426", + one_bg3 = "#25292b", + grey = "#3c4042", + grey_fg = "#464a4c", + grey_fg2 = "#4a4e50", + light_grey = "#515557", + red = "#e74c4c", + baby_pink = "#FF6E79", + pink = "#ef7cbb", + line = "#1a1e20", -- for lines like vertsplit + green = "#6bb05d", + vibrant_green = "#8dc776", + nord_blue = "#51a39f", + blue = "#66a3b4", + yellow = "#f0a972", + sun = "#e59e67", + purple = "#b4bbc8", + dark_purple = "#946fa8", + teal = "#5b98a9", + orange = "#eaa36c", + cyan = "#74b1c2", + statusline_bg = "#131719", + lightbg = "#2e3238", + lightbg2 = "#1d2123", + pmenu_bg = "#6bb05d", + folder_bg = "#5b98a9", +} + +return colors From 5742567630009a2f88a74614b3ff2330a91525e1 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 2 Sep 2021 08:45:05 +0530 Subject: [PATCH 0698/1541] avoid using globals in blankline config --- lua/plugins/configs/others.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 12f0860..2bc7c27 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -43,9 +43,6 @@ M.better_escape = function() end M.blankline = function() - vim.g.indent_blankline_show_trailing_blankline_indent = false - vim.g.indent_blankline_show_first_indent_level = false - require("indent_blankline").setup { indentLine_enabled = 1, char = "▏", @@ -59,6 +56,8 @@ M.blankline = function() "TelescopeResults", }, indent_blankline_buftype_exclude = { "terminal" }, + show_trailing_blankline_indent = false, + show_first_indent_level = false, } end From 873b846d50f30f6b26419d62eb86ea2dc0a431b0 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 2 Sep 2021 09:45:28 +0530 Subject: [PATCH 0699/1541] disable dashboard by default --- lua/chadrc.lua | 2 +- lua/default_config.lua | 2 +- lua/plugins/configs/dashboard.lua | 4 ++-- lua/plugins/init.lua | 7 ------- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 988081f..7c0d5e9 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -80,7 +80,7 @@ M.plugin_status = { cheatsheet = true, -- fuzzy search your commands/keymappings colorizer = true, comment = true, -- universal commentor - dashboard = true, -- a nice looking dashboard + dashboard = false, -- a nice looking dashboard esc_insertmode = true, -- escape from insert mode using custom keys feline = true, -- statusline gitsigns = true, -- gitsigns in statusline diff --git a/lua/default_config.lua b/lua/default_config.lua index 82c457f..7de2485 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -85,7 +85,7 @@ M.plugin_status = { cheatsheet = true, -- fuzzy search your commands/keymappings colorizer = true, comment = true, -- universal commentor - dashboard = true, -- a nice looking dashboard + dashboard = false, -- a nice looking dashboard esc_insertmode = true, -- escape from insert mode using custom keys feline = true, -- statusline gitsigns = true, -- gitsigns in statusline diff --git a/lua/plugins/configs/dashboard.lua b/lua/plugins/configs/dashboard.lua index 63b26a3..f16e716 100644 --- a/lua/plugins/configs/dashboard.lua +++ b/lua/plugins/configs/dashboard.lua @@ -1,9 +1,9 @@ local g = vim.g -local fn = vim.fn +-- local fn = vim.fn -- local plugins_count = fn.len(fn.globpath("~/.local/share/nvim/site/pack/packer/start", "*", 0, 1)) -g.dashboard_disable_at_vimenter = 1 -- dashboard is disabled by default +g.dashboard_disable_at_vimenter = 0 g.dashboard_disable_statusline = 1 g.dashboard_default_executive = "telescope" g.dashboard_custom_header = { diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index ff4c3a2..f248f28 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -233,13 +233,6 @@ return packer.startup(function() use { "glepnir/dashboard-nvim", disable = not plugin_status.dashboard, - cmd = { - "Dashboard", - "DashboardNewFile", - "DashboardJumpMarks", - "SessionLoad", - "SessionSave", - }, config = function() require "plugins.configs.dashboard" end, From ba6592c4a9ce20a182d3235ecd3857937550cd8a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 2 Sep 2021 13:41:43 +0530 Subject: [PATCH 0700/1541] use better colors for vertsplit/statuslineNc --- lua/colors/highlights.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index ded4d02..d09881b 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -75,9 +75,8 @@ fg("LineNr", grey) fg("NvimInternalError", red) -- inactive statuslines as thin splitlines -fg("StatusLineNC", line .. " gui=underline") - -fg("VertSplit", line) +fg("StatusLineNC", one_bg2 .. " gui=underline") +fg("VertSplit", one_bg2) -- fg_bg("Visual",light_grey, colors.lightbg) if ui.transparency then From 287b4bae9a16c297d26121a9713ec0e7bf5268a3 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 2 Sep 2021 16:16:19 +0530 Subject: [PATCH 0701/1541] fix typo in blankline config --- lua/chadrc.lua | 1 - lua/default_config.lua | 1 - lua/plugins/configs/others.lua | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 7c0d5e9..986a835 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -84,7 +84,6 @@ M.plugin_status = { esc_insertmode = true, -- escape from insert mode using custom keys feline = true, -- statusline gitsigns = true, -- gitsigns in statusline - lspkind = true, -- lsp enhancements lspsignature = true, -- lsp enhancements neoformat = true, -- universal formatter neoscroll = true, -- smooth scroll diff --git a/lua/default_config.lua b/lua/default_config.lua index 7de2485..35b08b8 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -89,7 +89,6 @@ M.plugin_status = { esc_insertmode = true, -- escape from insert mode using custom keys feline = true, -- statusline gitsigns = true, -- gitsigns in statusline - lspkind = true, -- lsp enhancements lspsignature = true, -- lsp enhancements neoformat = true, -- universal formatter neoscroll = true, -- smooth scroll diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 2bc7c27..5cf70ed 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -46,7 +46,7 @@ M.blankline = function() require("indent_blankline").setup { indentLine_enabled = 1, char = "▏", - indent_blankline_filetype_exclude = { + filetype_exclude = { "help", "terminal", "dashboard", @@ -55,7 +55,7 @@ M.blankline = function() "TelescopePrompt", "TelescopeResults", }, - indent_blankline_buftype_exclude = { "terminal" }, + buftype_exclude = { "terminal" }, show_trailing_blankline_indent = false, show_first_indent_level = false, } From 13abea43402bd60c0aa0ba30e562201835fa7d4f Mon Sep 17 00:00:00 2001 From: Matthew Wareing Date: Thu, 2 Sep 2021 19:40:26 +0100 Subject: [PATCH 0702/1541] Update README.md Lua should be stylized with a capital L, see: https://www.lua.org/about.html What's in a name? --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 15a65e0..b317ba8 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ ![gruvchad](https://user-images.githubusercontent.com/59060246/130129897-a68b1585-f42d-4325-8482-102dd2fe1e9e.png) ![everforest](https://user-images.githubusercontent.com/59060246/130129901-5e582f3e-b776-4d0c-9790-be5ae738b5a8.png) -# Very Very Useful lua plugins used in my config +# Very Very Useful Lua plugins used in my config #### Lspkind-nvim @@ -95,14 +95,14 @@ Lua fork of vim devicons which lets me change icons of filetypes: ### Nvim-treesitter -Better syntax highlighting for programming languages ( NvChad by default comes with lua/bash treesitter parsers ). +Better syntax highlighting for programming languages ( NvChad by default comes with Lua/bash treesitter parsers ). without / with Treesitter: # Credits -- [Elianiva](https://github.com/elianiva) helped me with neovim lua related issues many times, NvChad wouldnt exist without his help at all! +- [Elianiva](https://github.com/elianiva) helped me with neovim Lua related issues many times, NvChad wouldnt exist without his help at all! - @lorvethe for making NvChad logo! # Features From 69718c7138d196c6d920aea659a706c0bfa934eb Mon Sep 17 00:00:00 2001 From: Dazai-san <77652388+3hree6ix0@users.noreply.github.com> Date: Fri, 3 Sep 2021 18:26:47 +0530 Subject: [PATCH 0703/1541] added bunny's blossom theme adding rayes0's(githubname) blossom theme --- lua/colors/themes/blossom.lua | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 lua/colors/themes/blossom.lua diff --git a/lua/colors/themes/blossom.lua b/lua/colors/themes/blossom.lua new file mode 100644 index 0000000..ed98e1e --- /dev/null +++ b/lua/colors/themes/blossom.lua @@ -0,0 +1,35 @@ +local colors = { + white = "", + darker_black = "#dad3d0", + black = "#ede6e3", -- nvim bg + black2 = "#dad3d0", + one_bg = "#dad3d0", + one_bg2 = "#dad3d0", + one_bg3 = "#dad3d0", + grey = "#685c56", + grey_fg = "#938680", + grey_fg2 = "#938680", + light_grey = "#938680", + red = "#ce9c85", + baby_pink = "#ce9c85", + pink = "#ce9c85", + line = "#937f74", -- for lines like vertsplit + green = "#839773", + vibrant_green = "#839773", + blue = "#8f8678", + alt_blue = "#8f8678", + yellow = "#a09c80", + sun = "#a09c80", + purple = "#9c7b9c", + dark_purple = "#9c7b9c", + teal = "#8f8678", + orange = "#e39a83", + cyan = "#75998e", + statusline_bg = "#ede6e3", + lightbg = "#685c56", + lightbg2 = "#938680", + pmenu_bg = "#A3BE8C", + folder_bg = "#7797b7", +} + +return colors From 472fab40cff9a63e53f7133a8a66e63727f48047 Mon Sep 17 00:00:00 2001 From: Dazai-san <77652388+3hree6ix0@users.noreply.github.com> Date: Fri, 3 Sep 2021 19:22:00 +0530 Subject: [PATCH 0704/1541] fixed & cleaned blossom theme --- lua/colors/themes/blossom.lua | 62 +++++++++++++++++------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/lua/colors/themes/blossom.lua b/lua/colors/themes/blossom.lua index ed98e1e..0746c1a 100644 --- a/lua/colors/themes/blossom.lua +++ b/lua/colors/themes/blossom.lua @@ -1,35 +1,35 @@ local colors = { - white = "", - darker_black = "#dad3d0", - black = "#ede6e3", -- nvim bg - black2 = "#dad3d0", - one_bg = "#dad3d0", - one_bg2 = "#dad3d0", - one_bg3 = "#dad3d0", - grey = "#685c56", - grey_fg = "#938680", - grey_fg2 = "#938680", - light_grey = "#938680", - red = "#ce9c85", - baby_pink = "#ce9c85", - pink = "#ce9c85", - line = "#937f74", -- for lines like vertsplit - green = "#839773", - vibrant_green = "#839773", - blue = "#8f8678", - alt_blue = "#8f8678", - yellow = "#a09c80", - sun = "#a09c80", - purple = "#9c7b9c", - dark_purple = "#9c7b9c", - teal = "#8f8678", - orange = "#e39a83", - cyan = "#75998e", - statusline_bg = "#ede6e3", - lightbg = "#685c56", - lightbg2 = "#938680", - pmenu_bg = "#A3BE8C", - folder_bg = "#7797b7", + white = "#685c56", + darker_black = "#dad3d0", + black = "#ede6e3", -- nvim bg + black2 = "#dad3d0", + one_bg = "#dad3d0", + one_bg2 = "#dad3d0", + one_bg3 = "#dad3d0", + grey = "#685c56", + grey_fg = "#938680", + grey_fg2 = "#938680", + light_grey = "#938680", + red = "#ce9c85", + baby_pink = "#ce9c85", + pink = "#ce9c85", + line = "#937f74", -- for lines like vertsplit + green = "#839773", + vibrant_green = "#839773", + blue = "#8f8678", + nord_blue = "#8f8678", + yellow = "#a09c80", + sun = "#a09c80", + purple = "#9c7b9c", + dark_purple = "#9c7b9c", + teal = "#8f8678", + orange = "#e39a83", + cyan = "#75998e", + statusline_bg = "#ede6e3", + lightbg = "#685c56", + lightbg2 = "#938680", + pmenu_bg = "#A3BE8C", + folder_bg = "#ede6e3", } return colors From 98b531682e0a7df965aae09702e4276947042037 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 3 Sep 2021 13:57:49 +0000 Subject: [PATCH 0705/1541] chore: format source code --- lua/colors/themes/blossom.lua | 62 +++++++++++++++++------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/lua/colors/themes/blossom.lua b/lua/colors/themes/blossom.lua index 0746c1a..f6ce697 100644 --- a/lua/colors/themes/blossom.lua +++ b/lua/colors/themes/blossom.lua @@ -1,35 +1,35 @@ local colors = { - white = "#685c56", - darker_black = "#dad3d0", - black = "#ede6e3", -- nvim bg - black2 = "#dad3d0", - one_bg = "#dad3d0", - one_bg2 = "#dad3d0", - one_bg3 = "#dad3d0", - grey = "#685c56", - grey_fg = "#938680", - grey_fg2 = "#938680", - light_grey = "#938680", - red = "#ce9c85", - baby_pink = "#ce9c85", - pink = "#ce9c85", - line = "#937f74", -- for lines like vertsplit - green = "#839773", - vibrant_green = "#839773", - blue = "#8f8678", - nord_blue = "#8f8678", - yellow = "#a09c80", - sun = "#a09c80", - purple = "#9c7b9c", - dark_purple = "#9c7b9c", - teal = "#8f8678", - orange = "#e39a83", - cyan = "#75998e", - statusline_bg = "#ede6e3", - lightbg = "#685c56", - lightbg2 = "#938680", - pmenu_bg = "#A3BE8C", - folder_bg = "#ede6e3", + white = "#685c56", + darker_black = "#dad3d0", + black = "#ede6e3", -- nvim bg + black2 = "#dad3d0", + one_bg = "#dad3d0", + one_bg2 = "#dad3d0", + one_bg3 = "#dad3d0", + grey = "#685c56", + grey_fg = "#938680", + grey_fg2 = "#938680", + light_grey = "#938680", + red = "#ce9c85", + baby_pink = "#ce9c85", + pink = "#ce9c85", + line = "#937f74", -- for lines like vertsplit + green = "#839773", + vibrant_green = "#839773", + blue = "#8f8678", + nord_blue = "#8f8678", + yellow = "#a09c80", + sun = "#a09c80", + purple = "#9c7b9c", + dark_purple = "#9c7b9c", + teal = "#8f8678", + orange = "#e39a83", + cyan = "#75998e", + statusline_bg = "#ede6e3", + lightbg = "#685c56", + lightbg2 = "#938680", + pmenu_bg = "#A3BE8C", + folder_bg = "#ede6e3", } return colors From 5c71f1421b5980297b0625620fd4b107091eb311 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 3 Sep 2021 20:28:12 +0530 Subject: [PATCH 0706/1541] chadify blossom theme colors --- lua/colors/themes/blossom.lua | 46 +++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/lua/colors/themes/blossom.lua b/lua/colors/themes/blossom.lua index f6ce697..0f06a10 100644 --- a/lua/colors/themes/blossom.lua +++ b/lua/colors/themes/blossom.lua @@ -1,35 +1,35 @@ local colors = { white = "#685c56", - darker_black = "#dad3d0", + darker_black = "#e5dedb", black = "#ede6e3", -- nvim bg - black2 = "#dad3d0", - one_bg = "#dad3d0", - one_bg2 = "#dad3d0", - one_bg3 = "#dad3d0", - grey = "#685c56", - grey_fg = "#938680", - grey_fg2 = "#938680", - light_grey = "#938680", - red = "#ce9c85", + black2 = "#e0d9d6", + one_bg = "#e2dbd8", + one_bg2 = "#d1cac7", + one_bg3 = "#cac3c0", + grey = "#bab3b0", + grey_fg = "#aea7a4", + grey_fg2 = "#a29b98", + light_grey = "#958e8b", + red = "#c99780", baby_pink = "#ce9c85", pink = "#ce9c85", - line = "#937f74", -- for lines like vertsplit + line = "#d9d2cf", -- for lines like vertsplit green = "#839773", - vibrant_green = "#839773", - blue = "#8f8678", - nord_blue = "#8f8678", - yellow = "#a09c80", - sun = "#a09c80", - purple = "#9c7b9c", + vibrant_green = "#899d79", + blue = "#6c8aa8", + nord_blue = "#5e5f65", + yellow = "#a9a29f", + sun = "#eaa18a", + purple = "#a685a6", dark_purple = "#9c7b9c", - teal = "#8f8678", + teal = "#62809e", orange = "#e39a83", cyan = "#75998e", - statusline_bg = "#ede6e3", - lightbg = "#685c56", - lightbg2 = "#938680", - pmenu_bg = "#A3BE8C", - folder_bg = "#ede6e3", + statusline_bg = "#e4ddda", + lightbg = "#cac3c0", + lightbg2 = "#dbd4d1", + pmenu_bg = "#857e7b", + folder_bg = "#817a77", } return colors From 53b7498d649afe6161aeab2d0659d6d3c428300f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 4 Sep 2021 16:59:19 +0530 Subject: [PATCH 0707/1541] remove un-needed config --- README.md | 9 +-------- lua/chadrc.lua | 2 +- lua/plugins/configs/others.lua | 7 ------- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index b317ba8..689342d 100644 --- a/README.md +++ b/README.md @@ -53,13 +53,7 @@ ![gruvchad](https://user-images.githubusercontent.com/59060246/130129897-a68b1585-f42d-4325-8482-102dd2fe1e9e.png) ![everforest](https://user-images.githubusercontent.com/59060246/130129901-5e582f3e-b776-4d0c-9790-be5ae738b5a8.png) -# Very Very Useful Lua plugins used in my config - -#### Lspkind-nvim - -This tiny plugin adds vscode-like pictograms to neovim built-in lsp completion items: - -
+# Very Very Useful Lua plugins used in our config #### Nvim-tree.lua @@ -119,7 +113,6 @@ without / with Treesitter: - nvim-lspconfig for nvim-lsp configuration - lspInstall for installing lsp servers easily - nvim-compe for autocompletion -- lspkind to show pictograms on autocompletion items - telescope for file finding, picking, previewing (files and even images) - nvim-treesitter for syntax highlighting - nvim-autopairs for autolosing braces and stuffs diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 986a835..6572d06 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -8,7 +8,7 @@ M.ui = { italic_comments = false, -- theme to be used, to see all available themes, open the theme switcher by + th - theme = "onedark", + theme = "gruvchad", -- theme toggler, toggle between two themes, see theme_toggleer mappings theme_toggler = { diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 5cf70ed..b2594bb 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -101,13 +101,6 @@ M.luasnip = function() require("luasnip/loaders/from_vscode").load() end -M.lspkind = function() - local present, lspkind = pcall(require, "lspkind") - if present then - lspkind.init() - end -end - M.neoscroll = function() pcall(function() require("neoscroll").setup() From 0fece65c3f27164944f8ae6d817a8e01e257fea4 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 4 Sep 2021 17:07:36 +0530 Subject: [PATCH 0708/1541] update readme --- README.md | 25 +++++++++++++------------ lua/chadrc.lua | 2 +- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 689342d..9fe550e 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,6 @@

- # Some theme showcases :D ![onedark](https://user-images.githubusercontent.com/59060246/130129880-59ab1ad5-9aa6-4f50-9ddd-d8dde0c16257.png) @@ -72,9 +71,9 @@ A fuzzy file finder, picker, sorter, previewer and much more: adds indentline: -### Galaxyline +### Feline.nvim -fastest statusline plugin I've used so far: +Highly configurable statusline plugin:
### Nvim-bufferline.lua @@ -102,17 +101,16 @@ without / with Treesitter: # Features - File navigation with Nvimtree -- Using plugins that are mouse friendly - Beautiful inbuilt themes -- lazy loading 100% of plugins +- lazy loading 90% of plugins - managing tabs, buffers with bufferline - autosave - icons on nvimtree, telescope, bufferline/statusline and almost everywhere! with nvim-web-devicons -- minimal status line (galaxyline) +- beautiful statusline (feline.nvim) - gitsigns (colored bars for git in my config) - nvim-lspconfig for nvim-lsp configuration - lspInstall for installing lsp servers easily -- nvim-compe for autocompletion +- nvim-cmp for autocompletion - telescope for file finding, picking, previewing (files and even images) - nvim-treesitter for syntax highlighting - nvim-autopairs for autolosing braces and stuffs @@ -120,14 +118,17 @@ without / with Treesitter: - packer.nvim as package manager - indent-blankline.Nvim for indentlines - smooth scrolling -- luasnip for snippet plugin and snip support from VSCode through vsnip supporting custom and predefined snips (friendly-snippets) +- luasnip for snippet plugin and snip support from VSCode custom and predefined snippets (friendly-snippets) - Distraction free modes (modes in which statusline, tabline etc. stuff get disabled so its just the text visible in the buffer similar to goyo.vim) -- Code formatting/prettifying +- Code formatting via neoformat - gitsigns for git diffs +- Hiding terminal buffers and unhiding + previewing them with Telescope-nvim +- Theme switcher +- Theme toggler # Bloat -- To all those who think this is probably bloated, sure it is. Bloat means different to everyone. NvChad has like 30 ~ plugins but that doesn't mean those plugins are compromising neovim's speed, snappiness, or making it slow. No matter how many plugins I'd add on NvChad, it wouldn't compromise speed/snappiness/make it slow or whatever since it uses packer.nvim as plugin manager. packer.nvim lets you lazy load plugins i.e. loading plugins on certain events, mappings, sequentially loading them, etc, thus loading them only when needed. I have lazy loaded all the plugins so most plugins aren't loaded by default, hence not affecting neovim's startup/launch time. +- To all those who think this is probably bloated, sure it is. Bloat means different to everyone. NvChad has like 38 ~ plugins but that doesn't mean those plugins are compromising neovim's speed, snappiness, or making it slow. No matter how many plugins are added on NvChad, it wouldn't compromise speed/snappiness/make it slow or whatever since it uses packer.nvim as plugin manager. Packer.nvim lets you lazy load plugins i.e. loading plugins on certain events, mappings, sequentially loading them, etc, thus loading them only when needed. We have lazy loaded almost all the plugins so most plugins aren't loaded by default, hence not affecting neovim's startup/launch time. you can disable the plugins which you dont use in chadrc.lua @@ -152,7 +153,7 @@ Try NvChad in a docker container. This will leave your current Neovim configurat ' ``` -# Chad contributors +# Chadributors @@ -160,7 +161,7 @@ Try NvChad in a docker container. This will leave your current Neovim configurat ## Warning -I get hearings from some plugin devs that nvchad users bring issues on discourse/reddit/matrix/gh repos etc. Please dont do that :/ . Bring NvChad related issues here ONLY and dont ever bother plugin devs, THIS IS A CLEAR WARNING! 😠 +I get hearings from some plugin devs that nvchad users bring issues on discourse/reddit/matrix/gh repos etc. Please dont do that :( . Bring NvChad related issues here ONLY and dont ever bother plugin devs, THIS IS A CLEAR WARNING! 😠 ## :gift_heart: Support diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 6572d06..986a835 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -8,7 +8,7 @@ M.ui = { italic_comments = false, -- theme to be used, to see all available themes, open the theme switcher by + th - theme = "gruvchad", + theme = "onedark", -- theme toggler, toggle between two themes, see theme_toggleer mappings theme_toggler = { From d1777dfbdfffc252c46b7590f489a4c8834ef545 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 7 Sep 2021 07:07:39 +0530 Subject: [PATCH 0709/1541] load friendly-snippets before nvim-cmp --- lua/plugins/init.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index f248f28..d146966 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -180,8 +180,13 @@ return packer.startup(function() -- load luasnips + cmp related in insert mode only use { - "hrsh7th/nvim-cmp", + "rafamadriz/friendly-snippets", event = "InsertEnter", + } + + use { + "hrsh7th/nvim-cmp", + after = "friendly-snippets", config = function() require "plugins.configs.cmp" end, @@ -216,11 +221,6 @@ return packer.startup(function() after = "cmp-nvim-lsp", } - use { - "rafamadriz/friendly-snippets", - after = "cmp-buffer", - } - -- misc plugins use { "windwp/nvim-autopairs", From 9ee56ce229282343bbd8a4363fe6a66d605d0677 Mon Sep 17 00:00:00 2001 From: curtain Date: Tue, 7 Sep 2021 10:32:51 +0800 Subject: [PATCH 0710/1541] use_lspsaga deprecated, see lsp_signature upstream commit --- lua/plugins/configs/others.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index b2594bb..735fb39 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -118,7 +118,6 @@ M.signature = function() hint_enable = true, hint_prefix = " ", hint_scheme = "String", - use_lspsaga = false, hi_parameter = "Search", max_height = 22, max_width = 120, -- max_width of signature floating_window, line will be wrapped if exceed max_width From 2ac6931c6922c1f6b4d47ff1b378b1e6264d8887 Mon Sep 17 00:00:00 2001 From: VULKAN Date: Tue, 7 Sep 2021 14:17:29 +0530 Subject: [PATCH 0711/1541] Auto close Nvimtree incase of quitting last buffer --- lua/core/autocmds.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index c74ef95..74062cd 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -11,6 +11,9 @@ vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype -- Don't show status line on certain windows vim.cmd [[ autocmd BufEnter,BufWinEnter,FileType,WinEnter * lua require("core.utils").hide_statusline() ]] +--auto close file exploer when quiting incase a single buffer is left +vim.cmd([[ autocmd BufEnter * if (winnr("$") == 1 && &filetype == 'nvimtree') | q | endif ]]) + -- Open a file from its last left off position -- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] -- File extension specific tabbing From 1107be6417e8bbacb1ce8dfb643c5d634708b915 Mon Sep 17 00:00:00 2001 From: Marco Mayer Date: Tue, 7 Sep 2021 11:45:46 +0200 Subject: [PATCH 0712/1541] Update feline config to new format --- lua/plugins/configs/statusline.lua | 57 +++++++++++++++++------------- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index cb4ff88..69097a6 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -47,12 +47,19 @@ local statusline_style = icon_styles[user_statusline_style] -- Initialize the components table local components = { - left = { active = {}, inactive = {} }, - mid = { active = {}, inactive = {} }, - right = { active = {}, inactive = {} }, + active = {}, + inactive = {} } -components.left.active[1] = { +-- Initialize left, mid and right +table.insert(components.active, {}) +table.insert(components.active, {}) +table.insert(components.active, {}) +table.insert(components.inactive, {}) +table.insert(components.inactive, {}) +table.insert(components.inactive, {}) + +components.active[1][1] = { provider = statusline_style.main_icon, hl = { @@ -66,7 +73,7 @@ components.left.active[1] = { } }, } -components.left.active[2] = { +components.active[1][2] = { provider = statusline_style.right, hl = { @@ -75,7 +82,7 @@ components.left.active[2] = { }, } -components.left.active[3] = { +components.active[1][3] = { provider = function() local filename = vim.fn.expand "%:t" local extension = vim.fn.expand "%:e" @@ -94,7 +101,7 @@ components.left.active[3] = { right_sep = { str = statusline_style.right, hl = { fg = colors.lightbg, bg = colors.lightbg2 } }, } -components.left.active[4] = { +components.active[1][4] = { provider = function() local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") return "  " .. dir_name .. " " @@ -110,7 +117,7 @@ components.left.active[4] = { } }, } -components.left.active[5] = { +components.active[1][5] = { provider = "git_diff_added", hl = { fg = colors.grey_fg2, @@ -119,7 +126,7 @@ components.left.active[5] = { icon = " ", } -- diffModfified -components.left.active[6] = { +components.active[1][6] = { provider = "git_diff_changed", hl = { fg = colors.grey_fg2, @@ -128,7 +135,7 @@ components.left.active[6] = { icon = "  ", } -- diffRemove -components.left.active[7] = { +components.active[1][7] = { provider = "git_diff_removed", hl = { fg = colors.grey_fg2, @@ -137,7 +144,7 @@ components.left.active[7] = { icon = "  ", } -components.left.active[8] = { +components.active[1][8] = { provider = "diagnostic_errors", enabled = function() return lsp.diagnostics_exist "Error" @@ -146,7 +153,7 @@ components.left.active[8] = { icon = "  ", } -components.left.active[9] = { +components.active[1][9] = { provider = "diagnostic_warnings", enabled = function() return lsp.diagnostics_exist "Warning" @@ -155,7 +162,7 @@ components.left.active[9] = { icon = "  ", } -components.left.active[10] = { +components.active[1][10] = { provider = "diagnostic_hints", enabled = function() return lsp.diagnostics_exist "Hint" @@ -164,7 +171,7 @@ components.left.active[10] = { icon = "  ", } -components.left.active[11] = { +components.active[1][11] = { provider = "diagnostic_info", enabled = function() return lsp.diagnostics_exist "Information" @@ -173,7 +180,7 @@ components.left.active[11] = { icon = "  ", } -components.mid.active[1] = { +components.active[2][1] = { provider = function() local Lsp = vim.lsp.util.get_progress_messages()[1] if Lsp then @@ -206,7 +213,7 @@ components.mid.active[1] = { hl = { fg = colors.green }, } -components.right.active[1] = { +components.active[3][1] = { provider = function() if next(vim.lsp.buf_get_clients()) ~= nil then return " LSP" @@ -217,7 +224,7 @@ components.right.active[1] = { hl = { fg = colors.grey_fg2, bg = colors.statusline_bg }, } -components.right.active[2] = { +components.active[3][2] = { -- taken from: https://github.com/hoob3rt/lualine.nvim/blob/master/lua/lualine/components/branch.lua provider = function() local git_branch = "" @@ -275,7 +282,7 @@ components.right.active[2] = { }, } -components.right.active[3] = { +components.active[3][3] = { provider = " " .. statusline_style.left, hl = { fg = colors.one_bg2, @@ -313,7 +320,7 @@ local chad_mode_hl = function() } end -components.right.active[4] = { +components.active[3][4] = { provider = statusline_style.left, hl = function() return { @@ -323,7 +330,7 @@ components.right.active[4] = { end, } -components.right.active[5] = { +components.active[3][5] = { provider = statusline_style.vi_mode_icon, hl = function() return { @@ -333,14 +340,14 @@ components.right.active[5] = { end, } -components.right.active[6] = { +components.active[3][6] = { provider = function() return " " .. mode_colors[vim.fn.mode()][1] .. " " end, hl = chad_mode_hl, } -components.right.active[7] = { +components.active[3][7] = { provider = statusline_style.left, hl = { fg = colors.grey, @@ -348,7 +355,7 @@ components.right.active[7] = { }, } -components.right.active[8] = { +components.active[3][8] = { provider = statusline_style.left, hl = { fg = colors.green, @@ -356,7 +363,7 @@ components.right.active[8] = { }, } -components.right.active[9] = { +components.active[3][9] = { provider = statusline_style.position_icon, hl = { fg = colors.black, @@ -364,7 +371,7 @@ components.right.active[9] = { }, } -components.right.active[10] = { +components.active[3][10] = { provider = function() local current_line = vim.fn.line "." local total_line = vim.fn.line "$" From 299ce1cde3c68383991ff9552a9a02c6bd75c103 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 7 Sep 2021 10:00:34 +0000 Subject: [PATCH 0713/1541] chore: format source code --- lua/plugins/configs/statusline.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 69097a6..fa091dc 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -47,8 +47,8 @@ local statusline_style = icon_styles[user_statusline_style] -- Initialize the components table local components = { - active = {}, - inactive = {} + active = {}, + inactive = {}, } -- Initialize left, mid and right From f016bf634e626552f34cbe76ca58a0ca4647d2c7 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 7 Sep 2021 15:18:33 +0530 Subject: [PATCH 0714/1541] fix lazyloading for autosave.nvim --- lua/plugins/configs/others.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 735fb39..7199c89 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -1,5 +1,7 @@ local M = {} +local config = require("core.utils").load_config() + M.autopairs = function() local present1, autopairs = pcall(require, "nvim-autopairs") local present2, autopairs_completion = pcall(require, "nvim-autopairs.completion.cmp") @@ -23,7 +25,7 @@ M.autosave = function() end autosave.setup { - enabled = vim.g.auto_save or false, -- takes boolean value from init.lua + enabled = config.options.plugin.autosave, -- takes boolean value from chadrc.lua execution_message = "autosaved at : " .. vim.fn.strftime "%H:%M:%S", events = { "InsertLeave", "TextChanged" }, conditions = { @@ -38,7 +40,6 @@ M.autosave = function() end M.better_escape = function() - local config = require("core.utils").load_config() vim.g.better_escape_interval = config.options.plugin.esc_insertmode_timeout or 300 end From fed72bd15d1c2b1a7b6b12370598affb24b440a3 Mon Sep 17 00:00:00 2001 From: Kyle <76597257+Gitleptune@users.noreply.github.com> Date: Sat, 4 Sep 2021 18:42:39 +0300 Subject: [PATCH 0715/1541] add: links to features section --- README.md | 63 +++++++++++++++++++++++++------------------------------ 1 file changed, 29 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 9fe550e..0fa9587 100644 --- a/README.md +++ b/README.md @@ -39,32 +39,33 @@
-# Showcase +## Showcase +



-# Some theme showcases :D +## Theme showcase ![onedark](https://user-images.githubusercontent.com/59060246/130129880-59ab1ad5-9aa6-4f50-9ddd-d8dde0c16257.png) ![nord](https://user-images.githubusercontent.com/59060246/130129890-c01117df-ac3d-40dd-b95d-2681c2461bb4.png) ![gruvchad](https://user-images.githubusercontent.com/59060246/130129897-a68b1585-f42d-4325-8482-102dd2fe1e9e.png) ![everforest](https://user-images.githubusercontent.com/59060246/130129901-5e582f3e-b776-4d0c-9790-be5ae738b5a8.png) -# Very Very Useful Lua plugins used in our config +## Very useful plugins used -#### Nvim-tree.lua +### Nvim-tree.lua -fast file tree: +Fast file tree: -
+
### Telescope-nvim A fuzzy file finder, picker, sorter, previewer and much more: - -
+ +
### Indent-blankline.nvim @@ -98,33 +99,27 @@ without / with Treesitter: - [Elianiva](https://github.com/elianiva) helped me with neovim Lua related issues many times, NvChad wouldnt exist without his help at all! - @lorvethe for making NvChad logo! -# Features +## Features -- File navigation with Nvimtree -- Beautiful inbuilt themes -- lazy loading 90% of plugins -- managing tabs, buffers with bufferline -- autosave -- icons on nvimtree, telescope, bufferline/statusline and almost everywhere! with nvim-web-devicons -- beautiful statusline (feline.nvim) -- gitsigns (colored bars for git in my config) -- nvim-lspconfig for nvim-lsp configuration -- lspInstall for installing lsp servers easily -- nvim-cmp for autocompletion -- telescope for file finding, picking, previewing (files and even images) -- nvim-treesitter for syntax highlighting -- nvim-autopairs for autolosing braces and stuffs -- neoformat for prettifying/formatting code -- packer.nvim as package manager -- indent-blankline.Nvim for indentlines -- smooth scrolling -- luasnip for snippet plugin and snip support from VSCode custom and predefined snippets (friendly-snippets) -- Distraction free modes (modes in which statusline, tabline etc. stuff get disabled so its just the text visible in the buffer similar to goyo.vim) -- Code formatting via neoformat -- gitsigns for git diffs -- Hiding terminal buffers and unhiding + previewing them with Telescope-nvim -- Theme switcher -- Theme toggler +- Many beautiful themes to choose from +- Distraction free modes +- Fast plugin loading +- Smooth scrolling +- Autosaving +- File navigation with [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua) +- Managing tabs, buffers with [bufferline.nvim](https://github.com/akinsho/bufferline.nvim) +- Beautiful and configurable icons with [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) +- Pretty and functional statusline with [feline.nvim](https://github.com/Famiu/feline.nvim) +- Git diffs and more with [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) +- NeoVim Lisp configuration with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) +- Easy Lisp server installation with [nvim-lspinstall](https://github.com/kabouzeid/nvim-lspinstall) +- Autocompletion with [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) +- File searching, previewing image and text files and more with [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) +- Syntax highlighting with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) +- Autoclosing braces and html tags with [nvim-autopairs](https://github.com/windwp/nvim-autopairs) +- Formatting code with [neoformat](https://github.com/sbdchd/neoformat) +- Indentlines with [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) +- Useful snippets with [LuaSnip](https://github.com/L3MON4D3/LuaSnip) # Bloat From 562a3b2824e0a4d19021e56bb47e21ae607ea071 Mon Sep 17 00:00:00 2001 From: Kyle <76597257+Gitleptune@users.noreply.github.com> Date: Sat, 4 Sep 2021 19:25:57 +0300 Subject: [PATCH 0716/1541] refactor: warning, bloat & previous things --- README.md | 127 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 65 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index 0fa9587..c309877 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@
-[![Lua](https://img.shields.io/badge/Made%20with%20Lua-blueviolet.svg?style=for-the-badge&logo=lua)]() +[![Lua](https://img.shields.io/badge/Made%20with%20Lua-blueviolet.svg?style=for-the-badge&logo=lua)](https://lua.org)
@@ -41,10 +41,10 @@ ## Showcase -
-
-
-
+
+
+
+
## Theme showcase @@ -64,80 +64,94 @@ Fast file tree: ### Telescope-nvim A fuzzy file finder, picker, sorter, previewer and much more: - -
+ +
+ +
### Indent-blankline.nvim -adds indentline: - +Adds indentline: + +
+ ### Feline.nvim Highly configurable statusline plugin: -
+ +
+
### Nvim-bufferline.lua -As a top tabline like thing which lets me handle tabs and buffers like switching , sorting and closing them etc. - +Better tab implementation: + +
+ ### Nvim-web-devicons -Lua fork of vim devicons which lets me change icons of filetypes: - +Lua fork of Vim Devicons which offers more file icon customisability: + +
+ ### Nvim-treesitter -Better syntax highlighting for programming languages ( NvChad by default comes with Lua/bash treesitter parsers ). +Better syntax highlighting for programming languages (NvChad by default comes with Lua/bash treesitter parsers). -without / with Treesitter: - +Without/with Treesitter: -# Credits +
+ -- [Elianiva](https://github.com/elianiva) helped me with neovim Lua related issues many times, NvChad wouldnt exist without his help at all! -- @lorvethe for making NvChad logo! +## Credits + +- [Elianiva](https://github.com/elianiva) helped me with NeoVim Lua related issues many times, NvChad wouldnt exist without his help at all. +- @lorvethe for making the beautiful NvChad logo. ## Features -- Many beautiful themes to choose from -- Distraction free modes -- Fast plugin loading -- Smooth scrolling -- Autosaving -- File navigation with [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua) -- Managing tabs, buffers with [bufferline.nvim](https://github.com/akinsho/bufferline.nvim) -- Beautiful and configurable icons with [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) -- Pretty and functional statusline with [feline.nvim](https://github.com/Famiu/feline.nvim) -- Git diffs and more with [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) -- NeoVim Lisp configuration with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) -- Easy Lisp server installation with [nvim-lspinstall](https://github.com/kabouzeid/nvim-lspinstall) -- Autocompletion with [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) -- File searching, previewing image and text files and more with [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) -- Syntax highlighting with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) -- Autoclosing braces and html tags with [nvim-autopairs](https://github.com/windwp/nvim-autopairs) -- Formatting code with [neoformat](https://github.com/sbdchd/neoformat) -- Indentlines with [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) -- Useful snippets with [LuaSnip](https://github.com/L3MON4D3/LuaSnip) +- Many beautiful themes to choose from. +- Distraction free modes. +- Fast plugin loading. +- Smooth scrolling. +- Autosaving. +- File navigation with [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua). +- Managing tabs, buffers with [bufferline.nvim](https://github.com/akinsho/bufferline.nvim). +- Beautiful and configurable icons with [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons). +- Pretty and functional statusline with [feline.nvim](https://github.com/Famiu/feline.nvim). +- Git diffs and more with [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) . +- NeoVim Lisp configuration with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig). +- Easy Lisp server installation with [nvim-lspinstall](https://github.com/kabouzeid/nvim-lspinstall). +- Autocompletion with [nvim-cmp](https://github.com/hrsh7th/nvim-cmp). +- File searching, previewing image and text files and more with [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim). +- Syntax highlighting with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter). +- Autoclosing braces and html tags with [nvim-autopairs](https://github.com/windwp/nvim-autopairs). +- Formatting code with [neoformat](https://github.com/sbdchd/neoformat). +- Indentlines with [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim). +- Useful snippets with [LuaSnip](https://github.com/L3MON4D3/LuaSnip). -# Bloat +## Bloat -- To all those who think this is probably bloated, sure it is. Bloat means different to everyone. NvChad has like 38 ~ plugins but that doesn't mean those plugins are compromising neovim's speed, snappiness, or making it slow. No matter how many plugins are added on NvChad, it wouldn't compromise speed/snappiness/make it slow or whatever since it uses packer.nvim as plugin manager. Packer.nvim lets you lazy load plugins i.e. loading plugins on certain events, mappings, sequentially loading them, etc, thus loading them only when needed. We have lazy loaded almost all the plugins so most plugins aren't loaded by default, hence not affecting neovim's startup/launch time. you can disable the plugins which you dont use in chadrc.lua +To everyone who thinks that NvChad is bloat: Bloat means different things to everyone. + +NvChad has 38 plugins installed by default yet it is still very fast because it uses Packer plugin maanager. Packer.nvim allows you lets you lazy load plugins, meaning they get loaded only when absoloutely required. Furthermore, you can disable plugins you don't use in `chardr`. # TODO -It would be nice if NvChad focuses on existing plugins and config before adding new things. Some plugins like whichkey, telescope and treesitter still have basic configs! Also adding new features that'd make NvChad slow or its startup time slow wouldn't be encouraged. If that feature is really needed then it'll be mentioned in the wiki with its config. +NvChad is focusing more on improving its already existing plugins and features instead of adding more plugins. Things you can do to help currently are: -- Debloat the config. -- Make NvChad more and more faster (reduce startup time as low as possible). -- Add more themes. +- Improving base plugins configurations +- Debloating the config. +- Adding more themes. -# Try in docker +## Try NvChad in a Docker container -Try NvChad in a docker container. This will leave your current Neovim configuration untouched. Once you exit Neovim, the image is deleted. +This will leave your current Neovim configuration untouched. Once you exit Neovim, the image is deleted. ```zsh docker run -w /root -it --rm alpine:edge sh -uelic ' @@ -148,23 +162,12 @@ Try NvChad in a docker container. This will leave your current Neovim configurat ' ``` -# Chadributors +## Chadributors -
- + + ## Warning -I get hearings from some plugin devs that nvchad users bring issues on discourse/reddit/matrix/gh repos etc. Please dont do that :( . Bring NvChad related issues here ONLY and dont ever bother plugin devs, THIS IS A CLEAR WARNING! 😠 - -## :gift_heart: Support - -I (siduck76) would happily accept donations but I would be upset and feel bad since Im not the only one who has worked on NvChad. NvChad has been made possible by many contributors so dividing the donations for just me feels very bad and thanks to all the plugin creators once again :'). If you enjoy using NvChad and would like to show your support truly and show your appreciation to my work then try to be a better you! Help the needy people whenever possible (in real life), do some charity.Be nice to your parents and loved ones.Do not be rude , always try to be helpful / caring to one another, stray animals. Its easier to hate now and harder to care , hate used to be rare but now you see it everywhere. Please be respectful to any software/work done by other people rather than making fun of them. Do not compare software (In a bad way). Im grateful to be even able to use neovim! But cant still be fully happy when I think there are people who barely get food to eat, starve for weeks, dont have access to proper education, comupters, basic health care facilities etc. - -The following links are some donation (gofundme) links for supporting needy people. Feel free to donate if you can : - -- https://www.gofundme.com/f/WeCareAboutSyria -- https://www.gofundme.com/f/Burundi-Nutrition -- https://charity.gofundme.com/o/en/campaign/feedingyemen -- https://www.gofundme.com/f/6p8ea-give-ghanaian-orphans-the-gift-of-a-ride-to-school +If you have an issue with a plugin in NvChad, first you should report it to NvChad to see if it's an issue with it. From 803143c2e9c48c8d2b7e17b7bb4984b40edf96b7 Mon Sep 17 00:00:00 2001 From: Kyle <76597257+Gitleptune@users.noreply.github.com> Date: Sat, 4 Sep 2021 19:58:54 +0300 Subject: [PATCH 0717/1541] add: collapsible themes, support refactor --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c309877..7133ae6 100644 --- a/README.md +++ b/README.md @@ -46,13 +46,15 @@

-## Theme showcase +

Theme Showcase (Click to expand!)

![onedark](https://user-images.githubusercontent.com/59060246/130129880-59ab1ad5-9aa6-4f50-9ddd-d8dde0c16257.png) ![nord](https://user-images.githubusercontent.com/59060246/130129890-c01117df-ac3d-40dd-b95d-2681c2461bb4.png) ![gruvchad](https://user-images.githubusercontent.com/59060246/130129897-a68b1585-f42d-4325-8482-102dd2fe1e9e.png) ![everforest](https://user-images.githubusercontent.com/59060246/130129901-5e582f3e-b776-4d0c-9790-be5ae738b5a8.png) +
+ ## Very useful plugins used ### Nvim-tree.lua @@ -171,3 +173,12 @@ This will leave your current Neovim configuration untouched. Once you exit Neovi ## Warning If you have an issue with a plugin in NvChad, first you should report it to NvChad to see if it's an issue with it. + +## :gift_heart: Support + +If you want to donate, I (siduck76) would direct you to one of the donation links below, since NvChad wouldn't have been able without all of its great contributors, I don't feel comfortable taking donations for myself, so donate to one of these charities instead: + +- https://www.gofundme.com/f/WeCareAboutSyria +- https://www.gofundme.com/f/Burundi-Nutrition +- https://charity.gofundme.com/o/en/campaign/feedingyemen +- https://www.gofundme.com/f/6p8ea-give-ghanaian-orphans-the-gift-of-a-ride-to-school From b515097dce856635e5ad9e022987db6192c60787 Mon Sep 17 00:00:00 2001 From: Kyle <76597257+Gitleptune@users.noreply.github.com> Date: Sat, 4 Sep 2021 20:07:25 +0300 Subject: [PATCH 0718/1541] fix: chadrc --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7133ae6..b7a6415 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ Without/with Treesitter: To everyone who thinks that NvChad is bloat: Bloat means different things to everyone. -NvChad has 38 plugins installed by default yet it is still very fast because it uses Packer plugin maanager. Packer.nvim allows you lets you lazy load plugins, meaning they get loaded only when absoloutely required. Furthermore, you can disable plugins you don't use in `chardr`. +NvChad has 38 plugins installed by default yet it is still very fast because it uses Packer plugin maanager. Packer.nvim allows you lets you lazy load plugins, meaning they get loaded only when absoloutely required. Furthermore, you can disable plugins you don't use in `chardrc.lua`. From 62fc276f8c8bb0cb52de97fe82bf07518ab8bda2 Mon Sep 17 00:00:00 2001 From: Kyle <76597257+Gitleptune@users.noreply.github.com> Date: Sat, 4 Sep 2021 20:14:12 +0300 Subject: [PATCH 0719/1541] add: plugin developers to support section --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b7a6415..83aa84b 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,7 @@ If you have an issue with a plugin in NvChad, first you should report it to NvCh ## :gift_heart: Support -If you want to donate, I (siduck76) would direct you to one of the donation links below, since NvChad wouldn't have been able without all of its great contributors, I don't feel comfortable taking donations for myself, so donate to one of these charities instead: +If you want to donate, I (siduck76) would direct you to one of the donation links below, since NvChad wouldn't have been able without all of its great contributors and plugin developers, I don't feel comfortable taking donations for myself, so donate to one of these charities instead: - https://www.gofundme.com/f/WeCareAboutSyria - https://www.gofundme.com/f/Burundi-Nutrition From 72812acb76be8db02e2abd85151d74914e414c9e Mon Sep 17 00:00:00 2001 From: Kyle <76597257+Gitleptune@users.noreply.github.com> Date: Tue, 7 Sep 2021 13:25:53 +0300 Subject: [PATCH 0720/1541] revert: Support section but with better wording --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 83aa84b..9a6ce0d 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,7 @@ If you have an issue with a plugin in NvChad, first you should report it to NvCh ## :gift_heart: Support -If you want to donate, I (siduck76) would direct you to one of the donation links below, since NvChad wouldn't have been able without all of its great contributors and plugin developers, I don't feel comfortable taking donations for myself, so donate to one of these charities instead: +I would happily accept donations but would feel awful since I'm not the only one who has worked on NvChad. The project has only been made possible by the many great contributors and plugin developers, thus taking the donations just for me feels unjustified. If you enjoy using NvChad and would like to show your support then try to be a better you! Help the people in need whenever possible and do charity work. Be nice to loved ones and strangers alike. Do not be rude, always try to be helpful and caring for one another. It's easy to hate but hard to care. Be respectful to any software/work done by other people rather than making fun of them. Do not compare software (In a bad way). I'm grateful to even be able to use NeoVim! But I still cannot be fully happy when I know that there are people who barely have any food to eat, starve for weeks, dont have access to proper education, comupters, basic health care facilities and more. Here are some charites and gofundme links you can donate to instead: - https://www.gofundme.com/f/WeCareAboutSyria - https://www.gofundme.com/f/Burundi-Nutrition From daa05d668897f35da754306f336f282e9707f437 Mon Sep 17 00:00:00 2001 From: Kyle <76597257+Gitleptune@users.noreply.github.com> Date: Tue, 7 Sep 2021 13:34:07 +0300 Subject: [PATCH 0721/1541] add: collapsible sections --- README.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 9a6ce0d..fb0e47d 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,9 @@

-

Theme Showcase (Click to expand!)

+## Theme Showcase + +
Images (Click to expand!) ![onedark](https://user-images.githubusercontent.com/59060246/130129880-59ab1ad5-9aa6-4f50-9ddd-d8dde0c16257.png) ![nord](https://user-images.githubusercontent.com/59060246/130129890-c01117df-ac3d-40dd-b95d-2681c2461bb4.png) @@ -57,13 +59,15 @@ ## Very useful plugins used -### Nvim-tree.lua +
Images (Click to expand!) + +

Nvim-tree.lua

Fast file tree:
-### Telescope-nvim +

Telescope-nvim

A fuzzy file finder, picker, sorter, previewer and much more: @@ -71,42 +75,44 @@ A fuzzy file finder, picker, sorter, previewer and much more:
-### Indent-blankline.nvim +

Indent-blankline.nvim

Adds indentline:
- + -### Feline.nvim +

Feline.nvim

Highly configurable statusline plugin:

-### Nvim-bufferline.lua +

Nvim-bufferline.lua

Better tab implementation:
-### Nvim-web-devicons +

Nvim-web-devicons

Lua fork of Vim Devicons which offers more file icon customisability:
-### Nvim-treesitter +

Nvim-treesitter


- + + +
## Credits From ddb11c6bc1819e28f5becb297533710d0fd83bce Mon Sep 17 00:00:00 2001 From: boppyt <71049646+boppyt@users.noreply.github.com> Date: Tue, 7 Sep 2021 08:14:52 -0700 Subject: [PATCH 0722/1541] add lfgruv theme --- lua/colors/themes/lfgruv.lua | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 lua/colors/themes/lfgruv.lua diff --git a/lua/colors/themes/lfgruv.lua b/lua/colors/themes/lfgruv.lua new file mode 100644 index 0000000..c5bed9f --- /dev/null +++ b/lua/colors/themes/lfgruv.lua @@ -0,0 +1,35 @@ +local colors = { + white = "#ebdbb2", + darker_black = "#232323", + black = "#282828", -- nvim bg + black2 = "#2e2e2e", + one_bg = "#353535", + one_bg2 = "#3f3f3f", + one_bg3 = "#444444", + grey = "#464646", + grey_fg = "#4e4e4e", + grey_fg2 = "#505050", + light_grey = "#565656", + red = "#b66467", + baby_pink = "#fbe6ea", + pink = "#e193ab", + line = "#2c2f30", -- for lines like vertsplit + green = "#8d987e", + vibrant_green = "#9cab51", + nord_blue = "#87a197", + blue = "#4d7d80", + yellow = "#dcbb8c", + sun = "#f1bf77", + purple = "#958793", + dark_purple = "#d3869b", + teal = "#6ec2bf", + orange = "#e78a4e", + cyan = "#8aa6a5", + statusline_bg = "#2c2c2c", + lightbg = "#353535", + lightbg2 = "#303030", + pmenu_bg = "#8aa6a5", + folder_bg = "#8aa6a5", +} + +return colors From 094ad617850ff81a32fa3f45053152dbd743d8cb Mon Sep 17 00:00:00 2001 From: boppyt <71049646+boppyt@users.noreply.github.com> Date: Tue, 7 Sep 2021 15:55:22 -0700 Subject: [PATCH 0723/1541] add jellybeans theme --- lua/colors/themes/jellybeans.lua | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 lua/colors/themes/jellybeans.lua diff --git a/lua/colors/themes/jellybeans.lua b/lua/colors/themes/jellybeans.lua new file mode 100644 index 0000000..e0a2619 --- /dev/null +++ b/lua/colors/themes/jellybeans.lua @@ -0,0 +1,35 @@ +local colors = { + white = "#e8e8d3", + darker_black = "#232323", + black = "#151515", -- nvim bg + black2 = "#1c1c1c", + one_bg = "#353535", + one_bg2 = "#3f3f3f", + one_bg3 = "#444444", + grey = "#464646", + grey_fg = "#4e4e4e", + grey_fg2 = "#505050", + light_grey = "#565656", + red = "#cf6a4c", + baby_pink = "#f6c6d9", + pink = "#f0a0c0", + line = "#605958", -- for lines like vertsplit + green = "#99ad6a", + vibrant_green = "#c2cea6", + nord_blue = "#bcd9ea", + blue = "#8fbfdc", + yellow = "#fad07a", + sun = "#ffb964", + purple = "#c6b6ee", + dark_purple = "#9e83e7", + teal = "#668799", + orange = "#e78a4e", + cyan = "#8197bf", + statusline_bg = "#2c2c2c", + lightbg = "#353535", + lightbg2 = "#303030", + pmenu_bg = "#8197bf", + folder_bg = "#8197bf", +} + +return colors From 5c223548178c9087541304b04e5fe2ec699d92e1 Mon Sep 17 00:00:00 2001 From: boppyt <71049646+boppyt@users.noreply.github.com> Date: Tue, 7 Sep 2021 16:01:03 -0700 Subject: [PATCH 0724/1541] fix jellybeans theme --- lua/colors/themes/jellybeans.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/colors/themes/jellybeans.lua b/lua/colors/themes/jellybeans.lua index e0a2619..09067c2 100644 --- a/lua/colors/themes/jellybeans.lua +++ b/lua/colors/themes/jellybeans.lua @@ -17,14 +17,14 @@ local colors = { green = "#99ad6a", vibrant_green = "#c2cea6", nord_blue = "#bcd9ea", - blue = "#8fbfdc", + blue = "#8197bf", yellow = "#fad07a", sun = "#ffb964", purple = "#c6b6ee", dark_purple = "#9e83e7", teal = "#668799", orange = "#e78a4e", - cyan = "#8197bf", + cyan = "#8fbfdc", statusline_bg = "#2c2c2c", lightbg = "#353535", lightbg2 = "#303030", From f6f13908fcbcdc89cf5fc725f66b06db3f146953 Mon Sep 17 00:00:00 2001 From: boppyt <71049646+boppyt@users.noreply.github.com> Date: Tue, 7 Sep 2021 16:09:44 -0700 Subject: [PATCH 0725/1541] jellybeans: increase overall readability --- lua/colors/themes/jellybeans.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lua/colors/themes/jellybeans.lua b/lua/colors/themes/jellybeans.lua index 09067c2..fd59486 100644 --- a/lua/colors/themes/jellybeans.lua +++ b/lua/colors/themes/jellybeans.lua @@ -3,13 +3,13 @@ local colors = { darker_black = "#232323", black = "#151515", -- nvim bg black2 = "#1c1c1c", - one_bg = "#353535", - one_bg2 = "#3f3f3f", - one_bg3 = "#444444", - grey = "#464646", - grey_fg = "#4e4e4e", - grey_fg2 = "#505050", - light_grey = "#565656", + one_bg = "#373737", + one_bg2 = "#4f4f4f", + one_bg3 = "#555555", + grey = "#565656", + grey_fg = "#6e6e6e", + grey_fg2 = "#707070", + light_grey = "#898989", red = "#cf6a4c", baby_pink = "#f6c6d9", pink = "#f0a0c0", @@ -20,8 +20,8 @@ local colors = { blue = "#8197bf", yellow = "#fad07a", sun = "#ffb964", - purple = "#c6b6ee", - dark_purple = "#9e83e7", + purple = "#b4bbc8", + dark_purple = "#c6b6ee", teal = "#668799", orange = "#e78a4e", cyan = "#8fbfdc", From 8056b07cdcb0b31446a39887d80cf2514498c041 Mon Sep 17 00:00:00 2001 From: boppyt <71049646+boppyt@users.noreply.github.com> Date: Tue, 7 Sep 2021 16:26:09 -0700 Subject: [PATCH 0726/1541] use jellybeans colors for bg --- lua/colors/themes/jellybeans.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/colors/themes/jellybeans.lua b/lua/colors/themes/jellybeans.lua index fd59486..fef80c0 100644 --- a/lua/colors/themes/jellybeans.lua +++ b/lua/colors/themes/jellybeans.lua @@ -25,9 +25,9 @@ local colors = { teal = "#668799", orange = "#e78a4e", cyan = "#8fbfdc", - statusline_bg = "#2c2c2c", - lightbg = "#353535", - lightbg2 = "#303030", + statusline_bg = "#222222", + lightbg = "#242424", + lightbg2 = "#262626", pmenu_bg = "#8197bf", folder_bg = "#8197bf", } From d53761839d9d8b1b47f68f50cd72a7e2de57487b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 8 Sep 2021 17:56:54 +0530 Subject: [PATCH 0727/1541] use pretty colors for jellybean theme --- lua/colors/themes/jellybeans.lua | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lua/colors/themes/jellybeans.lua b/lua/colors/themes/jellybeans.lua index fef80c0..3928522 100644 --- a/lua/colors/themes/jellybeans.lua +++ b/lua/colors/themes/jellybeans.lua @@ -1,22 +1,22 @@ local colors = { white = "#e8e8d3", - darker_black = "#232323", + darker_black = "#101010", black = "#151515", -- nvim bg black2 = "#1c1c1c", - one_bg = "#373737", - one_bg2 = "#4f4f4f", - one_bg3 = "#555555", - grey = "#565656", - grey_fg = "#6e6e6e", - grey_fg2 = "#707070", - light_grey = "#898989", + one_bg = "#252525", + one_bg2 = "#2e2e2e", + one_bg3 = "#3a3a3a", + grey = "#424242", + grey_fg = "#474747", + grey_fg2 = "#4c4c4c", + light_grey = "#525252", red = "#cf6a4c", baby_pink = "#f6c6d9", pink = "#f0a0c0", - line = "#605958", -- for lines like vertsplit + line = "#232323", -- for lines like vertsplit green = "#99ad6a", vibrant_green = "#c2cea6", - nord_blue = "#bcd9ea", + nord_blue = "#768cb4", blue = "#8197bf", yellow = "#fad07a", sun = "#ffb964", @@ -25,9 +25,9 @@ local colors = { teal = "#668799", orange = "#e78a4e", cyan = "#8fbfdc", - statusline_bg = "#222222", - lightbg = "#242424", - lightbg2 = "#262626", + statusline_bg = "#191919", + lightbg = "#252525", + lightbg2 = "#1e1e1e", pmenu_bg = "#8197bf", folder_bg = "#8197bf", } From fe84f3952dce05255c98320d4019303efa46847f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 8 Sep 2021 19:03:29 +0530 Subject: [PATCH 0728/1541] add onejelly theme --- lua/colors/themes/jellybeans.lua | 6 +++--- lua/colors/themes/onejelly.lua | 35 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 lua/colors/themes/onejelly.lua diff --git a/lua/colors/themes/jellybeans.lua b/lua/colors/themes/jellybeans.lua index 3928522..0161f63 100644 --- a/lua/colors/themes/jellybeans.lua +++ b/lua/colors/themes/jellybeans.lua @@ -11,7 +11,7 @@ local colors = { grey_fg2 = "#4c4c4c", light_grey = "#525252", red = "#cf6a4c", - baby_pink = "#f6c6d9", + baby_pink = "#da7557", pink = "#f0a0c0", line = "#232323", -- for lines like vertsplit green = "#99ad6a", @@ -20,8 +20,8 @@ local colors = { blue = "#8197bf", yellow = "#fad07a", sun = "#ffb964", - purple = "#b4bbc8", - dark_purple = "#c6b6ee", + purple = "#ea94ea", + dark_purple = "#e18be1", teal = "#668799", orange = "#e78a4e", cyan = "#8fbfdc", diff --git a/lua/colors/themes/onejelly.lua b/lua/colors/themes/onejelly.lua new file mode 100644 index 0000000..0161f63 --- /dev/null +++ b/lua/colors/themes/onejelly.lua @@ -0,0 +1,35 @@ +local colors = { + white = "#e8e8d3", + darker_black = "#101010", + black = "#151515", -- nvim bg + black2 = "#1c1c1c", + one_bg = "#252525", + one_bg2 = "#2e2e2e", + one_bg3 = "#3a3a3a", + grey = "#424242", + grey_fg = "#474747", + grey_fg2 = "#4c4c4c", + light_grey = "#525252", + red = "#cf6a4c", + baby_pink = "#da7557", + pink = "#f0a0c0", + line = "#232323", -- for lines like vertsplit + green = "#99ad6a", + vibrant_green = "#c2cea6", + nord_blue = "#768cb4", + blue = "#8197bf", + yellow = "#fad07a", + sun = "#ffb964", + purple = "#ea94ea", + dark_purple = "#e18be1", + teal = "#668799", + orange = "#e78a4e", + cyan = "#8fbfdc", + statusline_bg = "#191919", + lightbg = "#252525", + lightbg2 = "#1e1e1e", + pmenu_bg = "#8197bf", + folder_bg = "#8197bf", +} + +return colors From 3d6d429793cbfab500d407801710c413ff52ed21 Mon Sep 17 00:00:00 2001 From: Ashin Antony <83629316+ashincoder@users.noreply.github.com> Date: Thu, 9 Sep 2021 06:50:15 +0530 Subject: [PATCH 0729/1541] feat: Move treesitter branch to compat-0.5 If you want to use this plugin with Neovim 0.5, please use the 0.5-compat branch. Be aware though that most improvements will require neovim nightly. https://github.com/nvim-treesitter/nvim-treesitter --- lua/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index d146966..6fd905a 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -82,6 +82,7 @@ return packer.startup(function() use { "nvim-treesitter/nvim-treesitter", + branch = "0.5-compat", event = "BufRead", config = function() require "plugins.configs.treesitter" From f73ba68c08c7e3d0da783e5322b19692676363d3 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 9 Sep 2021 08:10:12 +0530 Subject: [PATCH 0730/1541] move highlight themes to base16 repo --- lua/colors/init.lua | 2 +- lua/colors/themes/aquarium.lua | 35 ---------------------------- lua/colors/themes/blossom.lua | 35 ---------------------------- lua/colors/themes/chadracula.lua | 35 ---------------------------- lua/colors/themes/everforest.lua | 35 ---------------------------- lua/colors/themes/gruvbox.lua | 35 ---------------------------- lua/colors/themes/gruvchad.lua | 35 ---------------------------- lua/colors/themes/javacafe.lua | 35 ---------------------------- lua/colors/themes/jellybeans.lua | 35 ---------------------------- lua/colors/themes/lfgruv.lua | 35 ---------------------------- lua/colors/themes/mountain.lua | 35 ---------------------------- lua/colors/themes/nord.lua | 35 ---------------------------- lua/colors/themes/one-light.lua | 35 ---------------------------- lua/colors/themes/onedark.lua | 35 ---------------------------- lua/colors/themes/onejelly.lua | 35 ---------------------------- lua/colors/themes/onenord.lua | 35 ---------------------------- lua/colors/themes/tokyonight.lua | 35 ---------------------------- lua/colors/themes/tomorrow-night.lua | 35 ---------------------------- lua/colors/themes/uwu.lua | 35 ---------------------------- 19 files changed, 1 insertion(+), 631 deletions(-) delete mode 100644 lua/colors/themes/aquarium.lua delete mode 100644 lua/colors/themes/blossom.lua delete mode 100644 lua/colors/themes/chadracula.lua delete mode 100644 lua/colors/themes/everforest.lua delete mode 100644 lua/colors/themes/gruvbox.lua delete mode 100644 lua/colors/themes/gruvchad.lua delete mode 100644 lua/colors/themes/javacafe.lua delete mode 100644 lua/colors/themes/jellybeans.lua delete mode 100644 lua/colors/themes/lfgruv.lua delete mode 100644 lua/colors/themes/mountain.lua delete mode 100644 lua/colors/themes/nord.lua delete mode 100644 lua/colors/themes/one-light.lua delete mode 100644 lua/colors/themes/onedark.lua delete mode 100644 lua/colors/themes/onejelly.lua delete mode 100644 lua/colors/themes/onenord.lua delete mode 100644 lua/colors/themes/tokyonight.lua delete mode 100644 lua/colors/themes/tomorrow-night.lua delete mode 100644 lua/colors/themes/uwu.lua diff --git a/lua/colors/init.lua b/lua/colors/init.lua index a0d38d4..3b23c86 100644 --- a/lua/colors/init.lua +++ b/lua/colors/init.lua @@ -30,7 +30,7 @@ M.get = function(theme) theme = vim.g.nvchad_theme end - return require("colors.themes." .. theme) + return require("hl_themes." .. theme) end return M diff --git a/lua/colors/themes/aquarium.lua b/lua/colors/themes/aquarium.lua deleted file mode 100644 index f125a00..0000000 --- a/lua/colors/themes/aquarium.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#ced4df", - darker_black = "#1a1a24", - black = "#20202A", -- nvim bg - black2 = "#25252f", - one_bg = "#2a2a34", - one_bg2 = "#34343e", - one_bg3 = "#3e3e48", - grey = "#484852", - grey_fg = "#4e4e58", - grey_fg2 = "#54545e", - light_grey = "#5a5a64", - red = "#ebb9b9", - baby_pink = "#EAC1C1", - pink = "#E9D1D1", - line = "#292933", -- for lines like vertsplit - green = "#b1dba4", - vibrant_green = "#BEE0A8", - blue = "#CDDBF9", - nord_blue = "#BCCAEB", - yellow = "#E6DFB8", - sun = "#EEE8BA", - purple = "#f6bbe7", - dark_purple = "#E8B6E9", - teal = "#AEDCB7", - orange = "#E8CCA7", - cyan = "#b8dceb", - statusline_bg = "#262630", - lightbg = "#2e2e38", - lightbg2 = "#2a2a34", - pmenu_bg = "#ebb9b9", - folder_bg = "#b8dceb", -} - -return colors diff --git a/lua/colors/themes/blossom.lua b/lua/colors/themes/blossom.lua deleted file mode 100644 index 0f06a10..0000000 --- a/lua/colors/themes/blossom.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#685c56", - darker_black = "#e5dedb", - black = "#ede6e3", -- nvim bg - black2 = "#e0d9d6", - one_bg = "#e2dbd8", - one_bg2 = "#d1cac7", - one_bg3 = "#cac3c0", - grey = "#bab3b0", - grey_fg = "#aea7a4", - grey_fg2 = "#a29b98", - light_grey = "#958e8b", - red = "#c99780", - baby_pink = "#ce9c85", - pink = "#ce9c85", - line = "#d9d2cf", -- for lines like vertsplit - green = "#839773", - vibrant_green = "#899d79", - blue = "#6c8aa8", - nord_blue = "#5e5f65", - yellow = "#a9a29f", - sun = "#eaa18a", - purple = "#a685a6", - dark_purple = "#9c7b9c", - teal = "#62809e", - orange = "#e39a83", - cyan = "#75998e", - statusline_bg = "#e4ddda", - lightbg = "#cac3c0", - lightbg2 = "#dbd4d1", - pmenu_bg = "#857e7b", - folder_bg = "#817a77", -} - -return colors diff --git a/lua/colors/themes/chadracula.lua b/lua/colors/themes/chadracula.lua deleted file mode 100644 index 6925bdf..0000000 --- a/lua/colors/themes/chadracula.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#F8F8F2", - darker_black = "#232531", - black = "#282A36", -- nvim bg - black2 = "#303341", - one_bg = "#373844", -- real bg of onedark - one_bg2 = "#44475a", - one_bg3 = "#565761", - grey = "#41434f", - grey_fg = "#5a5c68", - grey_fg2 = "#5a5c68", - light_grey = "#636571", - red = "#E95678", - baby_pink = "#DE8C92", - pink = "#FF79C6", - line = "#373844", -- for lines like vertsplit - green = "#69ff94", - vibrant_green = "#69FF94", - nord_blue = "#b389ef", - blue = "#BD93F9", - yellow = "#F1FA8C", - sun = "#FFFFA5", - purple = "#BD93F9", - dark_purple = "#BD93F9", - teal = "#0088cc", - orange = "#FFB86C", - cyan = "#8BE9FD", - statusline_bg = "#2b2d39", - lightbg = "#343642", - lightbg2 = "#2f313d", - pmenu_bg = "#b389ef", - folder_bg = "#BD93F9", -} - -return colors diff --git a/lua/colors/themes/everforest.lua b/lua/colors/themes/everforest.lua deleted file mode 100644 index da9f59f..0000000 --- a/lua/colors/themes/everforest.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#fff9e8", - darker_black = "#272f35", - black = "#2b3339", -- nvim bg - black2 = "#323a40", - one_bg = "#333b41", - one_bg2 = "#363e44", - one_bg3 = "#3a4248", - grey = "#4a5258", - grey_fg = "#50585e", - grey_fg2 = "#545c62", - light_grey = "#586066", - red = "#e67e80", - baby_pink = "#ce8196", - pink = "#ff75a0", - line = "#3a4248", -- for lines like vertsplit - green = "#83c092", - vibrant_green = "#a7c080", - nord_blue = "#78b4ac", - blue = "#7fbbb3", - yellow = "#dbbc7f", - sun = "#d1b171", - purple = "#b4bbc8", - dark_purple = "#d699b6", - teal = "#69a59d", - orange = "#e69875", - cyan = "#95d1c9", - statusline_bg = "#2e363c", - lightbg = "#3d454b", - lightbg2 = "#333b41", - pmenu_bg = "#83c092", - folder_bg = "#7fbbb3", -} - -return colors diff --git a/lua/colors/themes/gruvbox.lua b/lua/colors/themes/gruvbox.lua deleted file mode 100644 index d1fb272..0000000 --- a/lua/colors/themes/gruvbox.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#ebdbb2", - darker_black = "#232323", - black = "#282828", -- nvim bg - black2 = "#2e2e2e", - one_bg = "#353535", - one_bg2 = "#3f3f3f", - one_bg3 = "#444444", - grey = "#464646", - grey_fg = "#4e4e4e", - grey_fg2 = "#505050", - light_grey = "#565656", - red = "#fb4934", - baby_pink = "#cc241d", - pink = "#ff75a0", - line = "#2c2f30", -- for lines like vertsplit - green = "#b8bb26", - vibrant_green = "#a9b665", - nord_blue = "#83a598", - blue = "#458588", - yellow = "#d79921", - sun = "#fabd2f", - purple = "#b4bbc8", - dark_purple = "#d3869b", - teal = "#749689", - orange = "#e78a4e", - cyan = "#82b3a8", - statusline_bg = "#2c2c2c", - lightbg = "#353535", - lightbg2 = "#303030", - pmenu_bg = "#83a598", - folder_bg = "#83a598", -} - -return colors diff --git a/lua/colors/themes/gruvchad.lua b/lua/colors/themes/gruvchad.lua deleted file mode 100644 index 2142f2b..0000000 --- a/lua/colors/themes/gruvchad.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#c7b89d", - darker_black = "#1e2122", - black = "#222526", -- nvim bg - black2 = "#282b2c", - one_bg = "#2b2e2f", - one_bg2 = "#3b3e3f", - one_bg3 = "#313435", - grey = "#46494a", - grey_fg = "#5d6061", - grey_fg2 = "#5b5e5f", - light_grey = "#585b5c", - red = "#ec6b64", - baby_pink = "#ce8196", - pink = "#ff75a0", - line = "#2c2f30", -- for lines like vertsplit - green = "#89b482", - vibrant_green = "#a9b665", - nord_blue = "#6f8faf", - blue = "#6d8dad", - yellow = "#d6b676", - sun = "#d1b171", - purple = "#b4bbc8", - dark_purple = "#cc7f94", - teal = "#749689", - orange = "#e78a4e", - cyan = "#82b3a8", - statusline_bg = "#252829", - lightbg = "#2d3139", - lightbg2 = "#262a32", - pmenu_bg = "#89b482", - folder_bg = "#6d8dad", -} - -return colors diff --git a/lua/colors/themes/javacafe.lua b/lua/colors/themes/javacafe.lua deleted file mode 100644 index ef7efea..0000000 --- a/lua/colors/themes/javacafe.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#b5bcc9", - darker_black = "#10171e", - black = "#131a21", -- nvim bg - black2 = "#1a2128", - one_bg = "#1e252c", - one_bg2 = "#2a3138", - one_bg3 = "#363d44", - grey = "#363d44", - grey_fg = "#4e555c", - grey_fg2 = "#51585f", - light_grey = "#545b62", - red = "#ef8891", - baby_pink = "#fca2aa", - pink = "#fca2af", - line = "#20272e", -- for lines like vertsplit - green = "#9ce5c0", - vibrant_green = "#a5d4af", - blue = "#99aee5", - nord_blue = "#9aa8cf", - yellow = "#fbdf90", - sun = "#fbdf9a", - purple = "#d7c1ed", - dark_purple = "#ccaced", - teal = "#92dbb6", - orange = "#EDA685", - cyan = "#b5c3ea", - statusline_bg = "#181f26", - lightbg = "#222930", - lightbg2 = "#1d242b", - pmenu_bg = "#ef8891", - folder_bg = "#99aee5", -} - -return colors diff --git a/lua/colors/themes/jellybeans.lua b/lua/colors/themes/jellybeans.lua deleted file mode 100644 index 0161f63..0000000 --- a/lua/colors/themes/jellybeans.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#e8e8d3", - darker_black = "#101010", - black = "#151515", -- nvim bg - black2 = "#1c1c1c", - one_bg = "#252525", - one_bg2 = "#2e2e2e", - one_bg3 = "#3a3a3a", - grey = "#424242", - grey_fg = "#474747", - grey_fg2 = "#4c4c4c", - light_grey = "#525252", - red = "#cf6a4c", - baby_pink = "#da7557", - pink = "#f0a0c0", - line = "#232323", -- for lines like vertsplit - green = "#99ad6a", - vibrant_green = "#c2cea6", - nord_blue = "#768cb4", - blue = "#8197bf", - yellow = "#fad07a", - sun = "#ffb964", - purple = "#ea94ea", - dark_purple = "#e18be1", - teal = "#668799", - orange = "#e78a4e", - cyan = "#8fbfdc", - statusline_bg = "#191919", - lightbg = "#252525", - lightbg2 = "#1e1e1e", - pmenu_bg = "#8197bf", - folder_bg = "#8197bf", -} - -return colors diff --git a/lua/colors/themes/lfgruv.lua b/lua/colors/themes/lfgruv.lua deleted file mode 100644 index c5bed9f..0000000 --- a/lua/colors/themes/lfgruv.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#ebdbb2", - darker_black = "#232323", - black = "#282828", -- nvim bg - black2 = "#2e2e2e", - one_bg = "#353535", - one_bg2 = "#3f3f3f", - one_bg3 = "#444444", - grey = "#464646", - grey_fg = "#4e4e4e", - grey_fg2 = "#505050", - light_grey = "#565656", - red = "#b66467", - baby_pink = "#fbe6ea", - pink = "#e193ab", - line = "#2c2f30", -- for lines like vertsplit - green = "#8d987e", - vibrant_green = "#9cab51", - nord_blue = "#87a197", - blue = "#4d7d80", - yellow = "#dcbb8c", - sun = "#f1bf77", - purple = "#958793", - dark_purple = "#d3869b", - teal = "#6ec2bf", - orange = "#e78a4e", - cyan = "#8aa6a5", - statusline_bg = "#2c2c2c", - lightbg = "#353535", - lightbg2 = "#303030", - pmenu_bg = "#8aa6a5", - folder_bg = "#8aa6a5", -} - -return colors diff --git a/lua/colors/themes/mountain.lua b/lua/colors/themes/mountain.lua deleted file mode 100644 index 9bf5989..0000000 --- a/lua/colors/themes/mountain.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#b0b0b0", - darker_black = "#171d23", - black = "#1a2026", -- nvim bg - black2 = "#20262c", - one_bg = "#242a30", - one_bg2 = "#292f35", - one_bg3 = "#2e343a", - grey = "#42484e", - grey_fg = "#474d53", - grey_fg2 = "#50565c", - light_grey = "#565c62", - red = "#ac8a8c", - baby_pink = "#de878f", - pink = "#e89199", - line = "#2d3339", -- for lines like vertsplit - green = "#8aac8b", - vibrant_green = "#9ec49f", - blue = "#6b8bab", - nord_blue = "#7797b7", - yellow = "#c4c19e", - sun = "#aca98a", - purple = "#a39ec4", - dark_purple = "#8f8aac", - teal = "#7c9cbc", - orange = "#e39a83", - cyan = "#9aafe6", - statusline_bg = "#1e242a", - lightbg = "#2d3339", - lightbg2 = "#252b31", - pmenu_bg = "#8aac8b", - folder_bg = "#6b8bab", -} - -return colors diff --git a/lua/colors/themes/nord.lua b/lua/colors/themes/nord.lua deleted file mode 100644 index ce715b3..0000000 --- a/lua/colors/themes/nord.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#abb2bf", - darker_black = "#2a303c", - black = "#2E3440", -- nvim bg - black2 = "#343a46", - one_bg = "#373d49", - one_bg2 = "#464c58", - one_bg3 = "#494f5b", - grey = "#4b515d", - grey_fg = "#565c68", - grey_fg2 = "#606672", - light_grey = "#646a76", - red = "#BF616A", - baby_pink = "#de878f", - pink = "#d57780", - line = "#3a404c", -- for lines like vertsplit - green = "#A3BE8C", - vibrant_green = "#afca98", - blue = "#7797b7", - nord_blue = "#81A1C1", - yellow = "#EBCB8B", - sun = "#e1c181", - purple = "#aab1be", - dark_purple = "#B48EAD", - teal = "#6484a4", - orange = "#e39a83", - cyan = "#9aafe6", - statusline_bg = "#333945", - lightbg = "#3f4551", - lightbg2 = "#393f4b", - pmenu_bg = "#A3BE8C", - folder_bg = "#7797b7", -} - -return colors diff --git a/lua/colors/themes/one-light.lua b/lua/colors/themes/one-light.lua deleted file mode 100644 index 683d69a..0000000 --- a/lua/colors/themes/one-light.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#54555b", - darker_black = "#f5f5f5", - black = "#fafafa", -- nvim bg - black2 = "#f1f1f1", - one_bg = "#f0f0f0", -- real bg of onedark - one_bg2 = "#ececec", - one_bg3 = "#e7e7e7", - grey = "#cbcbcb", - grey_fg = "#c6c6c6", - grey_fg2 = "#b7b7b7", - light_grey = "#b7b7b7", - red = "#e6676e", - baby_pink = "#F07178", - pink = "#ff75a0", - line = "#e9e9e9", -- for lines like vertsplit - green = "#7b90c7", - vibrant_green = "#7eca9c", - nord_blue = "#5e5f65", - blue = "#28a2f4", - yellow = "#7e7e7e", - sun = "#dea95f", - purple = "#a28dcd", - dark_purple = "#8e79b9", - teal = "#519ABA", - orange = "#FF6A00", - cyan = "#a3b8ef", - statusline_bg = "#f0f0f0", - lightbg = "#d6d6d6", - lightbg2 = "#5e5f65", - pmenu_bg = "#5e5f65", - folder_bg = "#6C6C6C", -} - -return colors diff --git a/lua/colors/themes/onedark.lua b/lua/colors/themes/onedark.lua deleted file mode 100644 index 2ff66aa..0000000 --- a/lua/colors/themes/onedark.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#abb2bf", - darker_black = "#1b1f27", - black = "#1e222a", -- nvim bg - black2 = "#252931", - one_bg = "#282c34", -- real bg of onedark - one_bg2 = "#353b45", - one_bg3 = "#30343c", - grey = "#42464e", - grey_fg = "#565c64", - grey_fg2 = "#6f737b", - light_grey = "#6f737b", - red = "#d47d85", - baby_pink = "#DE8C92", - pink = "#ff75a0", - line = "#2a2e36", -- for lines like vertsplit - green = "#A3BE8C", - vibrant_green = "#7eca9c", - nord_blue = "#81A1C1", - blue = "#61afef", - yellow = "#e7c787", - sun = "#EBCB8B", - purple = "#b4bbc8", - dark_purple = "#c882e7", - teal = "#519ABA", - orange = "#fca2aa", - cyan = "#a3b8ef", - statusline_bg = "#22262e", - lightbg = "#2d3139", - lightbg2 = "#262a32", - pmenu_bg = "#A3BE8C", - folder_bg = "#61afef", -} - -return colors diff --git a/lua/colors/themes/onejelly.lua b/lua/colors/themes/onejelly.lua deleted file mode 100644 index 0161f63..0000000 --- a/lua/colors/themes/onejelly.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#e8e8d3", - darker_black = "#101010", - black = "#151515", -- nvim bg - black2 = "#1c1c1c", - one_bg = "#252525", - one_bg2 = "#2e2e2e", - one_bg3 = "#3a3a3a", - grey = "#424242", - grey_fg = "#474747", - grey_fg2 = "#4c4c4c", - light_grey = "#525252", - red = "#cf6a4c", - baby_pink = "#da7557", - pink = "#f0a0c0", - line = "#232323", -- for lines like vertsplit - green = "#99ad6a", - vibrant_green = "#c2cea6", - nord_blue = "#768cb4", - blue = "#8197bf", - yellow = "#fad07a", - sun = "#ffb964", - purple = "#ea94ea", - dark_purple = "#e18be1", - teal = "#668799", - orange = "#e78a4e", - cyan = "#8fbfdc", - statusline_bg = "#191919", - lightbg = "#252525", - lightbg2 = "#1e1e1e", - pmenu_bg = "#8197bf", - folder_bg = "#8197bf", -} - -return colors diff --git a/lua/colors/themes/onenord.lua b/lua/colors/themes/onenord.lua deleted file mode 100644 index ce715b3..0000000 --- a/lua/colors/themes/onenord.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#abb2bf", - darker_black = "#2a303c", - black = "#2E3440", -- nvim bg - black2 = "#343a46", - one_bg = "#373d49", - one_bg2 = "#464c58", - one_bg3 = "#494f5b", - grey = "#4b515d", - grey_fg = "#565c68", - grey_fg2 = "#606672", - light_grey = "#646a76", - red = "#BF616A", - baby_pink = "#de878f", - pink = "#d57780", - line = "#3a404c", -- for lines like vertsplit - green = "#A3BE8C", - vibrant_green = "#afca98", - blue = "#7797b7", - nord_blue = "#81A1C1", - yellow = "#EBCB8B", - sun = "#e1c181", - purple = "#aab1be", - dark_purple = "#B48EAD", - teal = "#6484a4", - orange = "#e39a83", - cyan = "#9aafe6", - statusline_bg = "#333945", - lightbg = "#3f4551", - lightbg2 = "#393f4b", - pmenu_bg = "#A3BE8C", - folder_bg = "#7797b7", -} - -return colors diff --git a/lua/colors/themes/tokyonight.lua b/lua/colors/themes/tokyonight.lua deleted file mode 100644 index 3fb9b7c..0000000 --- a/lua/colors/themes/tokyonight.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#c0caf5", - darker_black = "#151621", - black = "#1A1B26", -- nvim bg - black2 = "#20212c", - one_bg = "#242530", - one_bg2 = "#292a35", - one_bg3 = "#353b45", - grey = "#40486a", - grey_fg = "#4a5274", - grey_fg2 = "#4f5779", - light_grey = "#545c7e", - red = "#f7768e", - baby_pink = "#DE8C92", - pink = "#ff75a0", - line = "#242530", -- for lines like vertsplit - green = "#9ece6a", - vibrant_green = "#73daca", - nord_blue = "#80a8fd", - blue = "#7aa2f7", - yellow = "#e7c787", - sun = "#EBCB8B", - purple = "#bb9af7", - dark_purple = "#9d7cd8", - teal = "#0db9d7", - orange = "#ff9e64", - cyan = "#7dcfff", - statusline_bg = "#1d1e29", - lightbg = "#252631", - lightbg2 = "#22232e", - pmenu_bg = "#7aa2f7", - folder_bg = "#7aa2f7", -} - -return colors diff --git a/lua/colors/themes/tomorrow-night.lua b/lua/colors/themes/tomorrow-night.lua deleted file mode 100644 index 01c78b6..0000000 --- a/lua/colors/themes/tomorrow-night.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#C5C8C2", - darker_black = "#191b1d", - black = "#1d1f21", -- nvim bg - black2 = "#232527", - one_bg = "#363a41", - one_bg2 = "#353b45", - one_bg3 = "#30343c", - grey = "#434547", - grey_fg = "#545B68", - grey_fg2 = "#616875", - light_grey = "#676e7b", - red = "#cc6666", - baby_pink = "#FF6E79", - pink = "#ff9ca3", - line = "#27292b", -- for lines like vertsplit - green = "#a4b595", - vibrant_green = "#a3b991", - nord_blue = "#728da8", - blue = "#6f8dab", - yellow = "#d7bd8d", - sun = "#e4c180", - purple = "#b4bbc8", - dark_purple = "#b290ac", - teal = "#8abdb6", - orange = "#DE935F", - cyan = "#70c0b1", - statusline_bg = "#212326", - lightbg = "#373B41", - lightbg2 = "#2D3035", - pmenu_bg = "#a4b595", - folder_bg = "#6f8dab", -} - -return colors diff --git a/lua/colors/themes/uwu.lua b/lua/colors/themes/uwu.lua deleted file mode 100644 index 5f1d740..0000000 --- a/lua/colors/themes/uwu.lua +++ /dev/null @@ -1,35 +0,0 @@ -local colors = { - white = "#d6d6d6", - darker_black = "#0b0f11", - black = "#0F1315", -- nvim bg - black2 = "#161a1c", - one_bg = "#1b1f21", - one_bg2 = "#202426", - one_bg3 = "#25292b", - grey = "#3c4042", - grey_fg = "#464a4c", - grey_fg2 = "#4a4e50", - light_grey = "#515557", - red = "#e74c4c", - baby_pink = "#FF6E79", - pink = "#ef7cbb", - line = "#1a1e20", -- for lines like vertsplit - green = "#6bb05d", - vibrant_green = "#8dc776", - nord_blue = "#51a39f", - blue = "#66a3b4", - yellow = "#f0a972", - sun = "#e59e67", - purple = "#b4bbc8", - dark_purple = "#946fa8", - teal = "#5b98a9", - orange = "#eaa36c", - cyan = "#74b1c2", - statusline_bg = "#131719", - lightbg = "#2e3238", - lightbg2 = "#1d2123", - pmenu_bg = "#6bb05d", - folder_bg = "#5b98a9", -} - -return colors From 85117ef95e800e64f75a79c121b655212226cee6 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 9 Sep 2021 08:36:25 +0530 Subject: [PATCH 0731/1541] statusline: feline: Use default git provider now it handles dirs too https://github.com/famiu/feline.nvim/commit/092442db0c7eb6087f0ae2cbeb776781bcc16176 --- lua/plugins/configs/statusline.lua | 53 ++---------------------------- 1 file changed, 2 insertions(+), 51 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index fa091dc..45cfd7f 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -225,61 +225,12 @@ components.active[3][1] = { } components.active[3][2] = { - -- taken from: https://github.com/hoob3rt/lualine.nvim/blob/master/lua/lualine/components/branch.lua - provider = function() - local git_branch = "" - - -- first try with gitsigns - local gs_dict = vim.b.gitsigns_status_dict - if gs_dict then - git_branch = (gs_dict.head and #gs_dict.head > 0 and gs_dict.head) or git_branch - else - -- path seperator - local branch_sep = package.config:sub(1, 1) - -- get file dir so we can search from that dir - local file_dir = vim.fn.expand "%:p:h" .. ";" - -- find .git/ folder genaral case - local git_dir = vim.fn.finddir(".git", file_dir) - -- find .git file in case of submodules or any other case git dir is in - -- any other place than .git/ - local git_file = vim.fn.findfile(".git", file_dir) - -- for some weird reason findfile gives relative path so expand it to fullpath - if #git_file > 0 then - git_file = vim.fn.fnamemodify(git_file, ":p") - end - if #git_file > #git_dir then - -- separate git-dir or submodule is used - local file = io.open(git_file) - git_dir = file:read() - git_dir = git_dir:match "gitdir: (.+)$" - file:close() - -- submodule / relative file path - if git_dir:sub(1, 1) ~= branch_sep and not git_dir:match "^%a:.*$" then - git_dir = git_file:match "(.*).git" .. git_dir - end - end - - if #git_dir > 0 then - local head_file = git_dir .. branch_sep .. "HEAD" - local f_head = io.open(head_file) - if f_head then - local HEAD = f_head:read() - f_head:close() - local branch = HEAD:match "ref: refs/heads/(.+)$" - if branch then - git_branch = branch - else - git_branch = HEAD:sub(1, 6) - end - end - end - end - return (git_branch ~= "" and "  " .. git_branch) or git_branch - end, + provider = "git_branch", hl = { fg = colors.grey_fg2, bg = colors.statusline_bg, }, + icon = "", } components.active[3][3] = { From 2309f7c2490181d214ac1a8498669141bb46782e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 9 Sep 2021 08:44:30 +0530 Subject: [PATCH 0732/1541] Update statusline.lua --- lua/plugins/configs/statusline.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 45cfd7f..28930f1 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -230,7 +230,7 @@ components.active[3][2] = { fg = colors.grey_fg2, bg = colors.statusline_bg, }, - icon = "", + icon = "  ", } components.active[3][3] = { From 14f0460317c1d2759ebd7bcc073bc9a01bf56086 Mon Sep 17 00:00:00 2001 From: bruhtus Date: Thu, 9 Sep 2021 18:20:20 +0700 Subject: [PATCH 0733/1541] Remove duplicate nvim-tree images in readme --- README.md | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index fb0e47d..615c016 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -

NvChad

+

NvChad

Home @@ -14,13 +14,13 @@
- + [![Lua](https://img.shields.io/badge/Made%20with%20Lua-blueviolet.svg?style=for-the-badge&logo=lua)](https://lua.org) - +
- + [![Super Linter](https://img.shields.io/github/workflow/status/siduck76/NvChad/Super-Linter/main?style=flat-square&logo=github&label=Build&color=green)]() ## Showcase @@ -47,7 +47,7 @@
## Theme Showcase - +
Images (Click to expand!) ![onedark](https://user-images.githubusercontent.com/59060246/130129880-59ab1ad5-9aa6-4f50-9ddd-d8dde0c16257.png) @@ -71,7 +71,6 @@ Fast file tree: A fuzzy file finder, picker, sorter, previewer and much more: -

@@ -79,29 +78,25 @@ A fuzzy file finder, picker, sorter, previewer and much more: Adds indentline: -
- +

Feline.nvim

Highly configurable statusline plugin: -

Nvim-bufferline.lua

Better tab implementation: -
- +

Nvim-web-devicons

Lua fork of Vim Devicons which offers more file icon customisability: -
- +

Nvim-treesitter


- +
@@ -142,7 +136,7 @@ Without/with Treesitter: - Useful snippets with [LuaSnip](https://github.com/L3MON4D3/LuaSnip). ## Bloat - + To everyone who thinks that NvChad is bloat: Bloat means different things to everyone. NvChad has 38 plugins installed by default yet it is still very fast because it uses Packer plugin maanager. Packer.nvim allows you lets you lazy load plugins, meaning they get loaded only when absoloutely required. Furthermore, you can disable plugins you don't use in `chardrc.lua`. From 4c025cd1bf67264fd4f12747569c2cbb042e7093 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 10 Sep 2021 15:40:54 +0530 Subject: [PATCH 0734/1541] debloat config | remove lspinstall --- lua/chadrc.lua | 7 ++++ lua/core/autocmds.lua | 2 +- lua/default_config.lua | 6 +++ lua/plugins/configs/lspconfig.lua | 68 +++++++------------------------ lua/plugins/init.lua | 10 ++--- 5 files changed, 31 insertions(+), 62 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 986a835..177dbd7 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -214,4 +214,11 @@ M.custom.mappings = { -- }, } +M.plugins = { + lspconfig = { + -- servers = {"html", "cssls"} + servers = {}, + }, +} + return M diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index 74062cd..c2e5a67 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -12,7 +12,7 @@ vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype vim.cmd [[ autocmd BufEnter,BufWinEnter,FileType,WinEnter * lua require("core.utils").hide_statusline() ]] --auto close file exploer when quiting incase a single buffer is left -vim.cmd([[ autocmd BufEnter * if (winnr("$") == 1 && &filetype == 'nvimtree') | q | endif ]]) +-- vim.cmd([[ autocmd BufEnter * if (winnr("$") == 1 && &filetype == 'nvimtree') | q | endif ]]) -- Open a file from its last left off position -- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] diff --git a/lua/default_config.lua b/lua/default_config.lua index 35b08b8..134586e 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -217,4 +217,10 @@ M.custom.mappings = { -- }, } +M.plugins = { + lspconfig = { + -- servers = {"html", "cssls"} + servers = {}, + }, +} return M diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 2bfd1dd..6cd102b 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,7 +1,6 @@ -local present1, lspconfig = pcall(require, "lspconfig") -local present2, lspinstall = pcall(require, "lspinstall") +local present1, nvim_lsp = pcall(require, "lspconfig") -if not (present1 or present2) then +if not present1 then return end @@ -57,63 +56,24 @@ capabilities.textDocument.completion.completionItem.resolveSupport = { }, } --- lspInstall + lspconfig stuff +local servers = require("core.utils").load_config().plugins.lspconfig.servers -local function setup_servers() - lspinstall.setup() - local servers = lspinstall.installed_servers() - - for _, lang in pairs(servers) do - if lang ~= "lua" then - lspconfig[lang].setup { - on_attach = on_attach, - capabilities = capabilities, - flags = { - debounce_text_changes = 500, - }, - -- root_dir = vim.loop.cwd, - } - elseif lang == "lua" then - lspconfig[lang].setup { - on_attach = on_attach, - capabilities = capabilities, - flags = { - debounce_text_changes = 500, - }, - settings = { - Lua = { - diagnostics = { - globals = { "vim" }, - }, - workspace = { - library = { - [vim.fn.expand "$VIMRUNTIME/lua"] = true, - [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true, - }, - maxPreload = 100000, - preloadFileSize = 10000, - }, - telemetry = { - enable = false, - }, - }, - }, - } - end - end +for _, lsp in ipairs(servers) do + nvim_lsp[lsp].setup { + on_attach = on_attach, + capabilities = capabilities, + -- root_dir = vim.loop.cwd, + flags = { + debounce_text_changes = 150, + }, + } end -setup_servers() - --- Automatically reload after `:LspInstall ` so we don't have to restart neovim -lspinstall.post_install_hook = function() - setup_servers() -- reload installed servers - vim.cmd "bufdo e" -end +-- require("anyfile").setup_luaLsp(on_attach, capabilities) -- this will be removed soon after the custom hooks PR -- replace the default lsp diagnostic symbols local function lspSymbol(name, icon) - vim.fn.sign_define("LspDiagnosticsSign" .. name, { text = icon, numhl = "LspDiagnosticsDefaul" .. name }) + vim.fn.sign_define("LspDiagnosticsSign" .. name, { text = icon, numhl = "LspDiagnosticsDefault" .. name }) end lspSymbol("Error", "") diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 6fd905a..73fc46e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -116,21 +116,17 @@ return packer.startup(function() } -- lsp stuff + use { - "kabouzeid/nvim-lspinstall", + "neovim/nvim-lspconfig", opt = true, setup = function() - require("core.utils").packer_lazy_load "nvim-lspinstall" + require("core.utils").packer_lazy_load "nvim-lspconfig" -- reload the current file so lsp actually starts for it vim.defer_fn(function() vim.cmd "silent! e %" end, 0) end, - } - - use { - "neovim/nvim-lspconfig", - after = "nvim-lspinstall", config = function() require "plugins.configs.lspconfig" end, From 4fcf9524ee9b1a5010a02db2f5dc021ba9c3e05f Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 10 Sep 2021 16:34:06 +0530 Subject: [PATCH 0735/1541] rm lspinstall from readme --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 615c016..b6d8251 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,6 @@ Without/with Treesitter: - Pretty and functional statusline with [feline.nvim](https://github.com/Famiu/feline.nvim). - Git diffs and more with [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) . - NeoVim Lisp configuration with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig). -- Easy Lisp server installation with [nvim-lspinstall](https://github.com/kabouzeid/nvim-lspinstall). - Autocompletion with [nvim-cmp](https://github.com/hrsh7th/nvim-cmp). - File searching, previewing image and text files and more with [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim). - Syntax highlighting with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter). From cafd078e8f443369c0b86da9dd7eeca9a1e1d326 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 10 Sep 2021 16:21:54 +0530 Subject: [PATCH 0736/1541] fix esc_insertmode settings not getting applied in chadrc (#422) --- lua/core/mappings.lua | 4 ---- lua/plugins/configs/others.lua | 3 +++ lua/plugins/init.lua | 5 +---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index fd69e20..ce199cb 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -120,10 +120,6 @@ end -- below are all plugin related mappings -M.better_escape = function() - vim.g.better_escape_shortcut = plugin_maps.better_escape.esc_insertmode or { "" } -end - M.bufferline = function() local m = plugin_maps.bufferline diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 7199c89..7d06c76 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -40,7 +40,10 @@ M.autosave = function() end M.better_escape = function() + local m = require("core.utils").load_config().mappings.plugin.better_escape.esc_insertmode + vim.g.better_escape_interval = config.options.plugin.esc_insertmode_timeout or 300 + vim.g.better_escape_shortcut = m end M.blankline = function() diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 73fc46e..4a67097 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -166,11 +166,8 @@ return packer.startup(function() "jdhao/better-escape.vim", disable = not plugin_status.esc_insertmode, event = "InsertEnter", - config = function() - require("plugins.configs.others").better_escape() - end, setup = function() - require("core.mappings").better_escape() + require("plugins.configs.others").better_escape() end, } From d0980b7109b3098d22b16cdd78c98386ba6182b3 Mon Sep 17 00:00:00 2001 From: mxzel <976508106@qq.com> Date: Fri, 10 Sep 2021 23:34:18 +0800 Subject: [PATCH 0737/1541] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b6d8251..beef884 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ Without/with Treesitter: - Beautiful and configurable icons with [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons). - Pretty and functional statusline with [feline.nvim](https://github.com/Famiu/feline.nvim). - Git diffs and more with [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) . -- NeoVim Lisp configuration with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig). +- NeoVim Lsp configuration with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig). - Autocompletion with [nvim-cmp](https://github.com/hrsh7th/nvim-cmp). - File searching, previewing image and text files and more with [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim). - Syntax highlighting with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter). From 67e1038b592e2f81dba37d283eea3ffdbdf02b51 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 11 Sep 2021 11:07:04 +0530 Subject: [PATCH 0738/1541] update felin.nvim config --- lua/plugins/configs/statusline.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 28930f1..4e1010a 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -343,7 +343,9 @@ components.active[3][10] = { } require("feline").setup { - default_bg = colors.statusline_bg, - default_fg = colors.fg, + colors = { + bg = colors.statusline_bg, + fg = colors.fg, + }, components = components, } From 256ba205e14b1c02fa5f1991a9760d445d7fcde4 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 14 Sep 2021 09:31:48 +0530 Subject: [PATCH 0739/1541] rm un-needed separator from statusline --- lua/plugins/configs/statusline.lua | 31 +++++++++++------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 4e1010a..cd34bee 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -69,29 +69,20 @@ components.active[1][1] = { right_sep = { str = statusline_style.right, hl = { fg = colors.nord_blue, - bg = colors.one_bg2, + bg = colors.lightbg, } }, } components.active[1][2] = { - provider = statusline_style.right, - - hl = { - fg = colors.one_bg2, - bg = colors.lightbg, - }, -} - -components.active[1][3] = { provider = function() local filename = vim.fn.expand "%:t" local extension = vim.fn.expand "%:e" local icon = require("nvim-web-devicons").get_icon(filename, extension) if icon == nil then - icon = "" + icon = " " return icon end - return icon .. " " .. filename .. " " + return " " .. icon .. " " .. filename .. " " end, hl = { fg = colors.white, @@ -101,7 +92,7 @@ components.active[1][3] = { right_sep = { str = statusline_style.right, hl = { fg = colors.lightbg, bg = colors.lightbg2 } }, } -components.active[1][4] = { +components.active[1][3] = { provider = function() local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") return "  " .. dir_name .. " " @@ -117,7 +108,7 @@ components.active[1][4] = { } }, } -components.active[1][5] = { +components.active[1][4] = { provider = "git_diff_added", hl = { fg = colors.grey_fg2, @@ -126,7 +117,7 @@ components.active[1][5] = { icon = " ", } -- diffModfified -components.active[1][6] = { +components.active[1][5] = { provider = "git_diff_changed", hl = { fg = colors.grey_fg2, @@ -135,7 +126,7 @@ components.active[1][6] = { icon = "  ", } -- diffRemove -components.active[1][7] = { +components.active[1][6] = { provider = "git_diff_removed", hl = { fg = colors.grey_fg2, @@ -144,7 +135,7 @@ components.active[1][7] = { icon = "  ", } -components.active[1][8] = { +components.active[1][7] = { provider = "diagnostic_errors", enabled = function() return lsp.diagnostics_exist "Error" @@ -153,7 +144,7 @@ components.active[1][8] = { icon = "  ", } -components.active[1][9] = { +components.active[1][8] = { provider = "diagnostic_warnings", enabled = function() return lsp.diagnostics_exist "Warning" @@ -162,7 +153,7 @@ components.active[1][9] = { icon = "  ", } -components.active[1][10] = { +components.active[1][9] = { provider = "diagnostic_hints", enabled = function() return lsp.diagnostics_exist "Hint" @@ -171,7 +162,7 @@ components.active[1][10] = { icon = "  ", } -components.active[1][11] = { +components.active[1][10] = { provider = "diagnostic_info", enabled = function() return lsp.diagnostics_exist "Information" From a52382c6faa20761ab30921ef474e096487a0c02 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 14 Sep 2021 23:47:37 +0530 Subject: [PATCH 0740/1541] fix dashboard ascii spacing --- lua/plugins/configs/dashboard.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/dashboard.lua b/lua/plugins/configs/dashboard.lua index f16e716..44169e1 100644 --- a/lua/plugins/configs/dashboard.lua +++ b/lua/plugins/configs/dashboard.lua @@ -10,7 +10,7 @@ g.dashboard_custom_header = { " ", " ", " ", - " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", + " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", @@ -19,7 +19,7 @@ g.dashboard_custom_header = { " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", - " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", + " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", " ", } From 61b6eda6afaf2e5bb703140c1113435fcadced95 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 16 Sep 2021 14:20:13 +0530 Subject: [PATCH 0741/1541] add light theme in theme toggler --- lua/chadrc.lua | 2 +- lua/core/mappings.lua | 2 +- lua/default_config.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 177dbd7..1fea4ad 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -15,7 +15,7 @@ M.ui = { enabled = false, fav_themes = { "onedark", - "gruvchad", + "one-light", }, }, diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index ce199cb..568b2af 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -53,7 +53,7 @@ M.misc = function() end -- check the theme toggler - if config.ui.theme_toggler then + if config.ui.theme_toggler.enabled then map( "n", maps.theme_toggler, diff --git a/lua/default_config.lua b/lua/default_config.lua index 134586e..c8a9a36 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -15,7 +15,7 @@ M.ui = { enabled = false, fav_themes = { "onedark", - "gruvchad", + "one-light", }, }, From 62538e0b37f25c17ca491eb48e738746bbc796c5 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 17 Sep 2021 18:15:06 +0530 Subject: [PATCH 0742/1541] clean dashboard config --- lua/plugins/configs/dashboard.lua | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lua/plugins/configs/dashboard.lua b/lua/plugins/configs/dashboard.lua index 44169e1..abd93e2 100644 --- a/lua/plugins/configs/dashboard.lua +++ b/lua/plugins/configs/dashboard.lua @@ -1,8 +1,5 @@ local g = vim.g --- local fn = vim.fn --- local plugins_count = fn.len(fn.globpath("~/.local/share/nvim/site/pack/packer/start", "*", 0, 1)) - g.dashboard_disable_at_vimenter = 0 g.dashboard_disable_statusline = 1 g.dashboard_default_executive = "telescope" @@ -35,6 +32,4 @@ g.dashboard_custom_section = { g.dashboard_custom_footer = { " ", - -- "NvChad Loaded " .. plugins_count .. " plugins", - "NvChad v0.5", } From 1b2473bb9cec15560249b24e4b1a6fb6b033eb62 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 17 Sep 2021 13:06:32 +0000 Subject: [PATCH 0743/1541] chore: format source code --- lua/plugins/configs/statusline.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index cd34bee..813fce7 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -102,10 +102,13 @@ components.active[1][3] = { fg = colors.grey_fg2, bg = colors.lightbg2, }, - right_sep = { str = statusline_style.right, hi = { - fg = colors.lightbg2, - bg = colors.statusline_bg, - } }, + right_sep = { + str = statusline_style.right, + hi = { + fg = colors.lightbg2, + bg = colors.statusline_bg, + }, + }, } components.active[1][4] = { From 31d605608f664cc4bf132493e21ba5b0e6efdfd3 Mon Sep 17 00:00:00 2001 From: Ay355 <77558710+Ay-355@users.noreply.github.com> Date: Fri, 17 Sep 2021 22:17:44 -0700 Subject: [PATCH 0744/1541] docs: fix grammer in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index beef884..f419085 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,7 @@ Without/with Treesitter: To everyone who thinks that NvChad is bloat: Bloat means different things to everyone. -NvChad has 38 plugins installed by default yet it is still very fast because it uses Packer plugin maanager. Packer.nvim allows you lets you lazy load plugins, meaning they get loaded only when absoloutely required. Furthermore, you can disable plugins you don't use in `chardrc.lua`. +NvChad has 38 plugins installed by default, yet it is still very fast because it uses the Packer plugin manager. Packer.nvim allows you to lazy load plugins, meaning they only get loaded when absolutely required. Furthermore, you can disable plugins you don't use in `chardrc.lua`. From c84f3cd6cfc1da4f94027a738e310cb9ebc8146a Mon Sep 17 00:00:00 2001 From: "ayushjaipuriyar21@gmail.com" Date: Fri, 17 Sep 2021 18:49:42 +0530 Subject: [PATCH 0745/1541] ignore node_module folder in telescope --- lua/plugins/configs/telescope.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index df20753..4222ab7 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -35,7 +35,7 @@ telescope.setup { preview_cutoff = 120, }, file_sorter = require("telescope.sorters").get_fuzzy_file, - file_ignore_patterns = {}, + file_ignore_patterns = {"node_modules"}, generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, path_display = { "absolute" }, winblend = 0, From 1658bf9fc6c04926bb1c96fd89b7d364466794f1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 19 Sep 2021 14:36:13 +0000 Subject: [PATCH 0746/1541] chore: format source code --- lua/plugins/configs/telescope.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 4222ab7..6db93db 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -35,7 +35,7 @@ telescope.setup { preview_cutoff = 120, }, file_sorter = require("telescope.sorters").get_fuzzy_file, - file_ignore_patterns = {"node_modules"}, + file_ignore_patterns = { "node_modules" }, generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, path_display = { "absolute" }, winblend = 0, From 0b30ed27d571adff7a7c875ae19ad4303c38bda9 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 22 Sep 2021 21:26:30 +0530 Subject: [PATCH 0747/1541] replace better-escape.vim with better-escape.nvim --- lua/plugins/configs/others.lua | 7 ++++--- lua/plugins/init.lua | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 7d06c76..d967f26 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -41,9 +41,10 @@ end M.better_escape = function() local m = require("core.utils").load_config().mappings.plugin.better_escape.esc_insertmode - - vim.g.better_escape_interval = config.options.plugin.esc_insertmode_timeout or 300 - vim.g.better_escape_shortcut = m + require("better_escape").setup { + mapping = m, + timeout = config.options.plugin.esc_insertmode_timeout or 300, + } end M.blankline = function() diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 4a67097..01456ce 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -163,10 +163,10 @@ return packer.startup(function() } use { - "jdhao/better-escape.vim", + "max397574/better-escape.nvim", disable = not plugin_status.esc_insertmode, event = "InsertEnter", - setup = function() + config = function() require("plugins.configs.others").better_escape() end, } From f3fe3d46c8e07c194b0ed498ba426ac7a506f714 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 24 Sep 2021 18:22:04 +0530 Subject: [PATCH 0748/1541] remove cheatsheet.nvim for now --- lua/chadrc.lua | 5 ---- lua/core/mappings.lua | 11 -------- lua/default_config.lua | 5 ---- lua/plugins/configs/chadsheet.lua | 44 ------------------------------- lua/plugins/init.lua | 13 --------- 5 files changed, 78 deletions(-) delete mode 100644 lua/plugins/configs/chadsheet.lua diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 1fea4ad..2b7ec23 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -77,7 +77,6 @@ M.plugin_status = { autosave = false, -- to autosave files blankline = true, -- beautified blank lines bufferline = true, -- buffer shown as tabs - cheatsheet = true, -- fuzzy search your commands/keymappings colorizer = true, comment = true, -- universal commentor dashboard = false, -- a nice looking dashboard @@ -148,10 +147,6 @@ M.mappings.plugin = { moveUp = "", moveDown = "", }, - chadsheet = { - default_keys = "dk", - user_keys = "uk", - }, comment = { toggle = "/", -- trigger comment on a single/selected lines/number prefix }, diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 568b2af..2bcd048 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -131,17 +131,6 @@ M.bufferline = function() map("n", m.moveDown, "j") end -M.chadsheet = function() - local m = plugin_maps.chadsheet - - map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope() ") - map( - "n", - m.user_keys, - ":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false } " - ) -end - M.comment = function() local m = plugin_maps.comment.toggle map("n", m, ":CommentToggle ") diff --git a/lua/default_config.lua b/lua/default_config.lua index c8a9a36..bcc3cce 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -82,7 +82,6 @@ M.plugin_status = { autosave = false, -- to autosave files blankline = true, -- beautified blank lines bufferline = true, -- buffer shown as tabs - cheatsheet = true, -- fuzzy search your commands/keymappings colorizer = true, comment = true, -- universal commentor dashboard = false, -- a nice looking dashboard @@ -148,10 +147,6 @@ M.mappings.plugin = { next_buffer = "", -- next buffer prev_buffer = "", -- previous buffer }, - chadsheet = { - default_keys = "dk", - user_keys = "uk", - }, comment = { toggle = "/", -- trigger comment on a single/selected lines/number prefix }, diff --git a/lua/plugins/configs/chadsheet.lua b/lua/plugins/configs/chadsheet.lua deleted file mode 100644 index 0a6cc02..0000000 --- a/lua/plugins/configs/chadsheet.lua +++ /dev/null @@ -1,44 +0,0 @@ -local present, chadsheet = pcall(require, "cheatsheet") - -if not present then - return -end - -local mappings = require("core.utils").load_config().mappings - --- add user mappings to the cheetsheet --- improve this function to not hardcode plugin -local function add_to_chadsheet(section, keymap, desc) - if section == "plugin" then - for sec, key in pairs(mappings.plugin) do - add_to_chadsheet(sec, key, sec) - end - else - if type(keymap) == "table" then - for sec, key in pairs(keymap) do - if type(sec) == "number" then - add_to_chadsheet(section, key, desc or section) - else - add_to_chadsheet(sec, key, desc or section) - end - end - else - chadsheet.add_cheat(section, keymap, desc or "Misc") - end - end -end - -for section, keymap in pairs(mappings) do - add_to_chadsheet(section, keymap) -end - -require("cheatsheet").setup { - - bundled_cheatsheets = { - enabled = { "default" }, - disabled = { "unicode", "nerd-fonts" }, - }, - - bundled_plugin_cheatsheets = false, - include_only_installed_plugins = true, -} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 01456ce..cee6992 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -272,20 +272,7 @@ return packer.startup(function() use { "nvim-telescope/telescope.nvim", cmd = "Telescope", - -- because cheatsheet is not activated by a teleacope command - module = "cheatsheet", requires = { - { - "sudormrfbin/cheatsheet.nvim", - disable = not plugin_status.cheatsheet, - after = "telescope.nvim", - config = function() - require "plugins.configs.chadsheet" - end, - setup = function() - require("core.mappings").chadsheet() - end, - }, { "nvim-telescope/telescope-fzf-native.nvim", run = "make", From 22f89cfeef6dabb5b7757d9dd861b91ffba87ef0 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 24 Sep 2021 18:31:42 +0530 Subject: [PATCH 0749/1541] Revert "remove cheatsheet.nvim for now" This reverts commit f3fe3d46c8e07c194b0ed498ba426ac7a506f714. --- lua/chadrc.lua | 5 ++++ lua/core/mappings.lua | 11 ++++++++ lua/default_config.lua | 5 ++++ lua/plugins/configs/chadsheet.lua | 44 +++++++++++++++++++++++++++++++ lua/plugins/init.lua | 13 +++++++++ 5 files changed, 78 insertions(+) create mode 100644 lua/plugins/configs/chadsheet.lua diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 2b7ec23..1fea4ad 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -77,6 +77,7 @@ M.plugin_status = { autosave = false, -- to autosave files blankline = true, -- beautified blank lines bufferline = true, -- buffer shown as tabs + cheatsheet = true, -- fuzzy search your commands/keymappings colorizer = true, comment = true, -- universal commentor dashboard = false, -- a nice looking dashboard @@ -147,6 +148,10 @@ M.mappings.plugin = { moveUp = "", moveDown = "", }, + chadsheet = { + default_keys = "dk", + user_keys = "uk", + }, comment = { toggle = "/", -- trigger comment on a single/selected lines/number prefix }, diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 2bcd048..568b2af 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -131,6 +131,17 @@ M.bufferline = function() map("n", m.moveDown, "j") end +M.chadsheet = function() + local m = plugin_maps.chadsheet + + map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope() ") + map( + "n", + m.user_keys, + ":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false } " + ) +end + M.comment = function() local m = plugin_maps.comment.toggle map("n", m, ":CommentToggle ") diff --git a/lua/default_config.lua b/lua/default_config.lua index bcc3cce..c8a9a36 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -82,6 +82,7 @@ M.plugin_status = { autosave = false, -- to autosave files blankline = true, -- beautified blank lines bufferline = true, -- buffer shown as tabs + cheatsheet = true, -- fuzzy search your commands/keymappings colorizer = true, comment = true, -- universal commentor dashboard = false, -- a nice looking dashboard @@ -147,6 +148,10 @@ M.mappings.plugin = { next_buffer = "", -- next buffer prev_buffer = "", -- previous buffer }, + chadsheet = { + default_keys = "dk", + user_keys = "uk", + }, comment = { toggle = "/", -- trigger comment on a single/selected lines/number prefix }, diff --git a/lua/plugins/configs/chadsheet.lua b/lua/plugins/configs/chadsheet.lua new file mode 100644 index 0000000..0a6cc02 --- /dev/null +++ b/lua/plugins/configs/chadsheet.lua @@ -0,0 +1,44 @@ +local present, chadsheet = pcall(require, "cheatsheet") + +if not present then + return +end + +local mappings = require("core.utils").load_config().mappings + +-- add user mappings to the cheetsheet +-- improve this function to not hardcode plugin +local function add_to_chadsheet(section, keymap, desc) + if section == "plugin" then + for sec, key in pairs(mappings.plugin) do + add_to_chadsheet(sec, key, sec) + end + else + if type(keymap) == "table" then + for sec, key in pairs(keymap) do + if type(sec) == "number" then + add_to_chadsheet(section, key, desc or section) + else + add_to_chadsheet(sec, key, desc or section) + end + end + else + chadsheet.add_cheat(section, keymap, desc or "Misc") + end + end +end + +for section, keymap in pairs(mappings) do + add_to_chadsheet(section, keymap) +end + +require("cheatsheet").setup { + + bundled_cheatsheets = { + enabled = { "default" }, + disabled = { "unicode", "nerd-fonts" }, + }, + + bundled_plugin_cheatsheets = false, + include_only_installed_plugins = true, +} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index cee6992..01456ce 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -272,7 +272,20 @@ return packer.startup(function() use { "nvim-telescope/telescope.nvim", cmd = "Telescope", + -- because cheatsheet is not activated by a teleacope command + module = "cheatsheet", requires = { + { + "sudormrfbin/cheatsheet.nvim", + disable = not plugin_status.cheatsheet, + after = "telescope.nvim", + config = function() + require "plugins.configs.chadsheet" + end, + setup = function() + require("core.mappings").chadsheet() + end, + }, { "nvim-telescope/telescope-fzf-native.nvim", run = "make", From ca1ad15ad259d09ea8abec5a68c66452f04b71ad Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Sat, 4 Sep 2021 00:03:25 +1000 Subject: [PATCH 0750/1541] refactor: Cleaning chadrc, moved to custom & moved default_config to core --- lua/chadrc.lua | 224 ------------------ lua/{ => core}/default_config.lua | 13 +- lua/core/mappings.lua | 4 +- lua/core/utils.lua | 6 +- lua/custom/chadrc.lua | 29 +++ .../configs/{chadsheet.lua => cheatsheet.lua} | 14 +- lua/plugins/init.lua | 4 +- 7 files changed, 53 insertions(+), 241 deletions(-) delete mode 100644 lua/chadrc.lua rename lua/{ => core}/default_config.lua (96%) create mode 100644 lua/custom/chadrc.lua rename lua/plugins/configs/{chadsheet.lua => cheatsheet.lua} (66%) diff --git a/lua/chadrc.lua b/lua/chadrc.lua deleted file mode 100644 index 1fea4ad..0000000 --- a/lua/chadrc.lua +++ /dev/null @@ -1,224 +0,0 @@ --- IMPORTANT NOTE : This is the user config, can be edited. Will be preserved if updated with internal updater - -local M = {} -M.ui, M.options, M.plugin_status, M.mappings, M.custom = {}, {}, {}, {}, {} - --- non plugin ui configs, available without any plugins -M.ui = { - italic_comments = false, - - -- theme to be used, to see all available themes, open the theme switcher by + th - theme = "onedark", - - -- theme toggler, toggle between two themes, see theme_toggleer mappings - theme_toggler = { - enabled = false, - fav_themes = { - "onedark", - "one-light", - }, - }, - - -- Enable this only if your terminal has the colorscheme set which nvchad uses - -- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal - transparency = false, -} - --- plugin related ui options -M.ui.plugin = { - -- statusline related options - statusline = { - -- these are filetypes, not pattern matched - -- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden - hidden = {}, - shown = {}, - -- default, round , slant , block , arrow - style = "default", - }, -} - --- non plugin normal, available without any plugins -M.options = { - clipboard = "unnamedplus", - cmdheight = 1, - copy_cut = true, -- copy cut text ( x key ), visual and normal mode - copy_del = true, -- copy deleted text ( dd key ), visual and normal mode - expandtab = true, - hidden = true, - ignorecase = true, - insert_nav = true, -- navigation in insertmode - mapleader = " ", - mouse = "a", - number = true, - -- relative numbers in normal mode tool at the bottom of options.lua - numberwidth = 2, - permanent_undo = true, - shiftwidth = 2, - smartindent = true, - tabstop = 8, -- Number of spaces that a in the file counts for - timeoutlen = 400, - relativenumber = false, - ruler = false, - updatetime = 250, - -- used for updater - update_url = "https://github.com/NvChad/NvChad", - update_branch = "main", -} - --- these are plugin related options -M.options.plugin = { - autosave = false, -- autosave on changed text or insert mode leave - -- timeout to be used for using escape with a key combination, see mappings.plugin.better_escape - esc_insertmode_timeout = 300, -} - --- enable and disable plugins (false for disable) -M.plugin_status = { - autosave = false, -- to autosave files - blankline = true, -- beautified blank lines - bufferline = true, -- buffer shown as tabs - cheatsheet = true, -- fuzzy search your commands/keymappings - colorizer = true, - comment = true, -- universal commentor - dashboard = false, -- a nice looking dashboard - esc_insertmode = true, -- escape from insert mode using custom keys - feline = true, -- statusline - gitsigns = true, -- gitsigns in statusline - lspsignature = true, -- lsp enhancements - neoformat = true, -- universal formatter - neoscroll = true, -- smooth scroll - telescope_media = false, -- see media files in telescope picker - truezen = false, -- no distraction mode for nvim - vim_fugitive = false, -- git in nvim - vim_matchup = true, -- % magic, match it but improved -} - --- mappings -- don't use a single keymap twice -- --- non plugin mappings -M.mappings = { - -- close current focused buffer - close_buffer = "x", - copy_whole_file = "", -- copy all contents of the current buffer - - -- navigation in insert mode, only if enabled in options - insert_nav = { - backward = "", - end_of_line = "", - forward = "", - next_line = "", - prev_line = "", - top_of_line = "", - }, - - line_number_toggle = "n", -- show or hide line number - new_buffer = "", -- open a new buffer - new_tab = "b", -- open a new vim tab - save_file = "", -- save file using :w - theme_toggler = "tt", -- for theme toggler, see in ui.theme_toggler - - -- terminal related mappings - terminal = { - -- multiple mappings can be given for esc_termmode and esc_hide_termmode - -- get out of terminal mode - esc_termmode = { "jk" }, -- multiple mappings allowed - -- get out of terminal mode and hide it - -- it does not close it, see pick_term mapping to see hidden terminals - esc_hide_termmode = { "JK" }, -- multiple mappings allowed - -- show hidden terminal buffers in a telescope picker - pick_term = "W", - -- below three are for spawning terminals - new_horizontal = "h", - new_vertical = "v", - new_window = "w", - }, - - -- update nvchad from nvchad, chadness 101 - update_nvchad = "uu", -} - --- all plugins related mappings --- to get short info about a plugin, see the respective string in plugin_status, if not present, then info here -M.mappings.plugin = { - bufferline = { - next_buffer = "", -- next buffer - prev_buffer = "", -- previous buffer - --better window movement - moveLeft = "", - moveRight = "", - moveUp = "", - moveDown = "", - }, - chadsheet = { - default_keys = "dk", - user_keys = "uk", - }, - comment = { - toggle = "/", -- trigger comment on a single/selected lines/number prefix - }, - dashboard = { - bookmarks = "bm", - new_file = "fn", -- basically create a new buffer - open = "db", -- open dashboard - session_load = "l", -- load a saved session - session_save = "s", -- save a session - }, - -- note: this is an edditional mapping to escape, escape key will still work - better_escape = { - esc_insertmode = { "jk" }, -- multiple mappings allowed - }, - nvimtree = { - toggle = "", -- file manager - }, - neoformat = { - format = "fm", - }, - telescope = { - buffers = "fb", - find_files = "ff", - git_commits = "cm", - git_status = "gt", - help_tags = "fh", - live_grep = "fw", - oldfiles = "fo", - themes = "th", - }, - telescope_media = { - media_files = "fp", - }, - truezen = { -- distraction free modes mapping, hide statusline, tabline, line numbers - ataraxis_mode = "zz", -- center - focus_mode = "zf", - minimalistic_mode = "zm", -- as it is - }, - vim_fugitive = { - diff_get_2 = "gh", - diff_get_3 = "gl", - git = "gs", - git_blame = "gb", - }, -} - --- user custom mappings --- e.g: name = { "mode" , "keys" , "cmd" , "options"} --- name: can be empty or something unique with repect to other custom mappings --- { mode, key, cmd } or name = { mode, key, cmd } --- mode: usage: mode or { mode1, mode2 }, multiple modes allowed, available modes => :h map-modes, --- keys: multiple keys allowed, same synxtax as modes --- cmd: for vim commands, must use ':' at start and add at the end if want to execute --- options: see :h nvim_set_keymap() opts section -M.custom.mappings = { - -- clear_all = { - -- "n", - -- "cc", - -- "gg0vG$d", - -- }, -} - -M.plugins = { - lspconfig = { - -- servers = {"html", "cssls"} - servers = {}, - }, -} - -return M diff --git a/lua/default_config.lua b/lua/core/default_config.lua similarity index 96% rename from lua/default_config.lua rename to lua/core/default_config.lua index c8a9a36..069faeb 100644 --- a/lua/default_config.lua +++ b/lua/core/default_config.lua @@ -1,4 +1,5 @@ --- IMPORTANT NOTE : This is default config, so dont change anything here. (check chadrc.lua instead) +-- IMPORTANT NOTE : This is default config, so dont change anything here. +-- use custom/chadrc.lua instead local M = {} M.ui, M.options, M.plugin_status, M.mappings, M.custom = {}, {}, {}, {}, {} @@ -147,8 +148,14 @@ M.mappings.plugin = { bufferline = { next_buffer = "", -- next buffer prev_buffer = "", -- previous buffer + --TODO move out of bufferline + --better window movement + moveLeft = "", + moveRight = "", + moveUp = "", + moveDown = "", }, - chadsheet = { + cheatsheet = { default_keys = "dk", user_keys = "uk", }, @@ -160,7 +167,7 @@ M.mappings.plugin = { new_file = "fn", -- basically create a new buffer open = "db", -- open dashboard session_load = "l", -- load a saved session - session_save = "s", + session_save = "s", -- save a session }, -- note: this is an edditional mapping to escape, escape key will still work better_escape = { diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 568b2af..2e86198 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -131,8 +131,8 @@ M.bufferline = function() map("n", m.moveDown, "j") end -M.chadsheet = function() - local m = plugin_maps.chadsheet +M.cheatsheet = function() + local m = plugin_maps.cheatsheet map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope() ") map( diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 91e31d6..df3f81d 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -152,9 +152,9 @@ M.load_config = function(reload) "['mappings']['terminal']['esc_hide_termmode']", } - local default_config = "default_config" + local default_config = "core.default_config" local config_name = vim.g.nvchad_user_config or "chadrc" - local config_file = vim.fn.stdpath "config" .. "/lua/" .. config_name .. ".lua" + local config_file = vim.fn.stdpath "config" .. "/lua/custom/" .. config_name .. ".lua" -- unload the modules if force reload if reload then @@ -170,7 +170,7 @@ M.load_config = function(reload) -- print warning texts if user config file is present -- check if the user config is present if vim.fn.filereadable(vim.fn.glob(config_file)) == 1 then - local present, config = pcall(require, config_name) + local present, config = pcall(require, "custom/" .. config_name) if present then -- make sure the returned value is table if type(config) == "table" then diff --git a/lua/custom/chadrc.lua b/lua/custom/chadrc.lua new file mode 100644 index 0000000..3f3d168 --- /dev/null +++ b/lua/custom/chadrc.lua @@ -0,0 +1,29 @@ +-- IMPORTANT NOTE : This is the user config, can be edited. Will be preserved if updated with internal updater + +local M = {} +M.ui, M.options, M.plugin_status, M.mappings, M.custom = {}, {}, {}, {}, {} + +-- To use this file, copy the strucutre of `core/default_config.lua`, +-- then define your new var, an example of setting relative number: + +-- M.options = { +-- relativenumber = true, +-- } + +-- user custom mappings +-- e.g: name = { "mode" , "keys" , "cmd" , "options"} +-- name: can be empty or something unique with repect to other custom mappings +-- { mode, key, cmd } or name = { mode, key, cmd } +-- mode: usage: mode or { mode1, mode2 }, multiple modes allowed, available modes => :h map-modes, +-- keys: multiple keys allowed, same synxtax as modes +-- cmd: for vim commands, must use ':' at start and add at the end if want to execute +-- options: see :h nvim_set_keymap() opts section +M.custom.mappings = { + -- clear_all = { + -- "n", + -- "cc", + -- "gg0vG$d", + -- }, +} + +return M diff --git a/lua/plugins/configs/chadsheet.lua b/lua/plugins/configs/cheatsheet.lua similarity index 66% rename from lua/plugins/configs/chadsheet.lua rename to lua/plugins/configs/cheatsheet.lua index 0a6cc02..39d0b1f 100644 --- a/lua/plugins/configs/chadsheet.lua +++ b/lua/plugins/configs/cheatsheet.lua @@ -1,4 +1,4 @@ -local present, chadsheet = pcall(require, "cheatsheet") +local present, cheatsheet = pcall(require, "cheatsheet") if not present then return @@ -8,28 +8,28 @@ local mappings = require("core.utils").load_config().mappings -- add user mappings to the cheetsheet -- improve this function to not hardcode plugin -local function add_to_chadsheet(section, keymap, desc) +local function add_to_cheatsheet(section, keymap, desc) if section == "plugin" then for sec, key in pairs(mappings.plugin) do - add_to_chadsheet(sec, key, sec) + add_to_cheatsheet(sec, key, sec) end else if type(keymap) == "table" then for sec, key in pairs(keymap) do if type(sec) == "number" then - add_to_chadsheet(section, key, desc or section) + add_to_cheatsheet(section, key, desc or section) else - add_to_chadsheet(sec, key, desc or section) + add_to_cheatsheet(sec, key, desc or section) end end else - chadsheet.add_cheat(section, keymap, desc or "Misc") + cheatsheet.add_cheat(section, keymap, desc or "Misc") end end end for section, keymap in pairs(mappings) do - add_to_chadsheet(section, keymap) + add_to_cheatsheet(section, keymap) end require("cheatsheet").setup { diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 01456ce..e9e23a1 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -280,10 +280,10 @@ return packer.startup(function() disable = not plugin_status.cheatsheet, after = "telescope.nvim", config = function() - require "plugins.configs.chadsheet" + require "plugins.configs.cheatsheet" end, setup = function() - require("core.mappings").chadsheet() + require("core.mappings").cheatsheet() end, }, { From bfc10e60341578c7a6fa209277c0259002d84847 Mon Sep 17 00:00:00 2001 From: Morten Olsen Date: Tue, 24 Aug 2021 21:45:59 +0200 Subject: [PATCH 0751/1541] feat: Add custom scripts and hook based setup This commit introduces a hook system that allows the user to add custom modules which can use these hooks to invoke function af specific NvChad events to allow for extending og functionality --- lua/core/custom.lua | 22 ++++++++++++++++++++++ lua/core/hooks.lua | 38 ++++++++++++++++++++++++++++++++++++++ lua/core/init.lua | 5 +++++ lua/core/mappings.lua | 3 ++- lua/custom/init.lua | 2 ++ lua/plugins/init.lua | 2 ++ 6 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 lua/core/custom.lua create mode 100644 lua/core/hooks.lua create mode 100644 lua/custom/init.lua diff --git a/lua/core/custom.lua b/lua/core/custom.lua new file mode 100644 index 0000000..05a7329 --- /dev/null +++ b/lua/core/custom.lua @@ -0,0 +1,22 @@ +local function isModuleAvailable(name) + if package.loaded[name] then + return true + else + for _, searcher in ipairs(package.searchers or package.loaders) do + local loader = searcher(name) + if type(loader) == 'function' then + package.preload[name] = loader + return true + end + end + return false + end +end + +local loadIfExists = function (module) + if isModuleAvailable(module) then + require(module) + end +end + +loadIfExists('custom') diff --git a/lua/core/hooks.lua b/lua/core/hooks.lua new file mode 100644 index 0000000..3353d71 --- /dev/null +++ b/lua/core/hooks.lua @@ -0,0 +1,38 @@ +local hooks, M = {}, {}; +local allowed_hooks = { + "install_plugins", + "setup_mappings", + "ready", +} + +local function has_value (tab, val) + for _, value in ipairs(tab) do + if value == val then + return true + end + end + + return false +end + +M.add = function(name, fn) + if not(has_value(allowed_hooks, name)) then + error("Custom lua uses unallowed hook " .. name) + end + if hooks[name] == nil then + hooks[name] = {} + end + table.insert(hooks[name], fn); +end + +M.run = function(name, args) + if hooks[name] == nil then + return; + end + + for _, hook in pairs(hooks[name]) do + hook(args) + end +end + +return M; diff --git a/lua/core/init.lua b/lua/core/init.lua index 999576f..819bc51 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -1,9 +1,12 @@ local core_modules = { + "core.custom", "core.options", "core.autocmds", "core.mappings", } +local hooks = require('core.hooks'); + for _, module in ipairs(core_modules) do local ok, err = pcall(require, module) if not ok then @@ -13,3 +16,5 @@ end -- set all the non plugin mappings require("core.mappings").misc() + +hooks.run("ready") diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 2e86198..3a41a83 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -1,8 +1,8 @@ local utils = require "core.utils" +local hooks = require "core.hooks" local config = utils.load_config() local map = utils.map - local maps = config.mappings local plugin_maps = maps.plugin @@ -116,6 +116,7 @@ M.misc = function() optional_mappings() required_mappings() user_config_mappings() + hooks.run("setup_mappings", map) end -- below are all plugin related mappings diff --git a/lua/custom/init.lua b/lua/custom/init.lua new file mode 100644 index 0000000..56508a9 --- /dev/null +++ b/lua/custom/init.lua @@ -0,0 +1,2 @@ +-- This is where you custom modules and plugins goes. +-- See the wiki for a guide on how to extend NvChad diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e9e23a1..fbdb606 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -337,4 +337,6 @@ return packer.startup(function() require("core.mappings").vim_fugitive() end, } + + require("core.hooks").run("install_plugins", use) end) From eced5f2ec4dcac38a0460f0c9e9aa23201e7902b Mon Sep 17 00:00:00 2001 From: Morten Olsen Date: Tue, 31 Aug 2021 16:20:57 +0200 Subject: [PATCH 0752/1541] feat: Hook based overrides --- lua/core/hooks.lua | 33 ++++++++++++++++++++++++++++++- lua/custom/init.lua | 9 +++++++++ lua/plugins/configs/lspconfig.lua | 4 +++- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/lua/core/hooks.lua b/lua/core/hooks.lua index 3353d71..8c7f351 100644 --- a/lua/core/hooks.lua +++ b/lua/core/hooks.lua @@ -1,4 +1,4 @@ -local hooks, M = {}, {}; +local hooks, overrides, M = {}, {}, {}; local allowed_hooks = { "install_plugins", "setup_mappings", @@ -35,4 +35,35 @@ M.run = function(name, args) end end +M.createOverrides = function(module) + local O = {}; + + O.get = function(name, default) + local current = default; + if overrides[module] and overrides[module][name] then + if type(overrides[module][name]) == "function" then + current = overrides[module][name] + elseif type(overrides[module][name]) == "table" then + for _, override in pairs(overrides[module][name]) do + current = override(current) + end + end + end + return current; + end + + return O; +end + +M.override = function(module, name, overwrite) + if overrides[module] == nil then + overrides[module] = {}; + end + if overrides[module][name] == nil then + overrides[module][name] = {}; + end + table.insert(overrides[module][name], overwrite) +end + + return M; diff --git a/lua/custom/init.lua b/lua/custom/init.lua index 56508a9..5a80710 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -1,2 +1,11 @@ -- This is where you custom modules and plugins goes. -- See the wiki for a guide on how to extend NvChad + +local hooks = require "core.hooks" + +-- For example, the hook below overrieds 'publish_diagnostics' in the 'lspconfig' file, +-- +-- hooks.override("lsp", "publish_diagnostics", function(current) +-- current.virtual_text = false; +-- return current; +-- end) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 6cd102b..6704a21 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,4 +1,5 @@ local present1, nvim_lsp = pcall(require, "lspconfig") +local overrides = require("core.hooks").createOverrides("lsp") if not present1 then return @@ -81,7 +82,7 @@ lspSymbol("Information", "") lspSymbol("Hint", "") lspSymbol("Warning", "") -vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { +local lsp_publish_diagnostics_options = overrides.get('publish_diagnostics', { virtual_text = { prefix = "", spacing = 0, @@ -90,6 +91,7 @@ vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagn underline = true, update_in_insert = false, -- update diagnostics insert mode }) +vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, lsp_publish_diagnostics_options) vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "single", }) From a5ae8899d5b8281c301807eb7cdcb57a9500b245 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Sat, 4 Sep 2021 13:35:46 +1000 Subject: [PATCH 0753/1541] fix: merge_tables bug caught --- lua/core/utils.lua | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index df3f81d..3ef5977 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -255,7 +255,8 @@ M.merge_table = function(into, from, nodes_to_replace) if type(nodes_to_replace) == "table" then -- function that will be executed with loadstring - local base_fn = [[ + local replace_fn = function(node) + local base_fn = [[ return function(table1, table2) local t1, t2 = table1_node or false , table2_node or false if t1 and t2 then @@ -263,11 +264,20 @@ return function(table1, table2) end return table1 end]] - for _, node in ipairs(nodes_to_replace) do + -- replace the _node in base_fn to actual given node value local fn = base_fn:gsub("_node", node) - -- if the node if found, it is replaced, otherwise table 1 is returned - table1 = loadstring(fn)()(table1, table2) + -- return the function created from the string base_fn + return loadstring(fn)()(table1, table2) + end + + for _, node in ipairs(nodes_to_replace) do + -- pcall() is a poor workaround for if "['mappings']['plugin']['esc_insertmode']" 'plugin' sub-table does not exist + local ok, result = pcall(replace_fn, node) + if ok then + -- if the node is found then replace + table1 = result + end end end From a5a5a8220cf9ccea12f3c6850a1dd6bdd667f245 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Sat, 4 Sep 2021 14:34:16 +1000 Subject: [PATCH 0754/1541] refactor: clean & small reorgnaisation of default_config --- lua/core/default_config.lua | 21 ++++++++------------- lua/core/mappings.lua | 15 +++++++++++---- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 069faeb..554b171 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -7,10 +7,8 @@ M.ui, M.options, M.plugin_status, M.mappings, M.custom = {}, {}, {}, {}, {} -- non plugin ui configs, available without any plugins M.ui = { italic_comments = false, - -- theme to be used, to see all available themes, open the theme switcher by + th theme = "onedark", - -- theme toggler, toggle between two themes, see theme_toggleer mappings theme_toggler = { enabled = false, @@ -19,7 +17,6 @@ M.ui = { "one-light", }, }, - -- Enable this only if your terminal has the colorscheme set which nvchad uses -- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal transparency = false, @@ -53,6 +50,7 @@ M.options = { hidden = true, ignorecase = true, insert_nav = true, -- navigation in insertmode + window_nav = true, mapleader = " ", mouse = "a", number = true, @@ -105,7 +103,6 @@ M.mappings = { -- close current focused buffer close_buffer = "x", copy_whole_file = "", -- copy all contents of the current buffer - -- navigation in insert mode, only if enabled in options insert_nav = { backward = "", @@ -115,13 +112,18 @@ M.mappings = { prev_line = "", top_of_line = "", }, - + window_nav = { + --better window movement + moveLeft = "", + moveRight = "", + moveUp = "", + moveDown = "", + }, line_number_toggle = "n", -- show or hide line number new_buffer = "", -- open a new buffer new_tab = "b", -- open a new vim tab save_file = "", -- save file using :w theme_toggler = "tt", -- for theme toggler, see in ui.theme_toggler - -- terminal related mappings terminal = { -- multiple mappings can be given for esc_termmode and esc_hide_termmode @@ -137,7 +139,6 @@ M.mappings = { new_vertical = "v", new_window = "w", }, - -- update nvchad from nvchad, chadness 101 update_nvchad = "uu", } @@ -148,12 +149,6 @@ M.mappings.plugin = { bufferline = { next_buffer = "", -- next buffer prev_buffer = "", -- previous buffer - --TODO move out of bufferline - --better window movement - moveLeft = "", - moveRight = "", - moveUp = "", - moveDown = "", }, cheatsheet = { default_keys = "dk", diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 3a41a83..8de91d7 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -3,6 +3,7 @@ local hooks = require "core.hooks" local config = utils.load_config() local map = utils.map + local maps = config.mappings local plugin_maps = maps.plugin @@ -52,6 +53,16 @@ M.misc = function() map("i", inav.top_of_line, "^i") end + -- easier navigation between windows + if config.options.window_nav then + local wnav = maps.window_nav + + map("n", wnav.moveLeft, "h") + map("n", wnav.moveRight, "l") + map("n", wnav.moveUp, "k") + map("n", wnav.moveDown, "j") + end + -- check the theme toggler if config.ui.theme_toggler.enabled then map( @@ -126,10 +137,6 @@ M.bufferline = function() map("n", m.next_buffer, ":BufferLineCycleNext ") map("n", m.prev_buffer, ":BufferLineCyclePrev ") - map("n", m.moveLeft, "h") - map("n", m.moveRight, "l") - map("n", m.moveUp, "k") - map("n", m.moveDown, "j") end M.cheatsheet = function() From 80c8bf424398452b0d06ed6520a34ecada90267a Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Tue, 14 Sep 2021 12:21:35 +1000 Subject: [PATCH 0755/1541] feat: allow packaged plugin config overrides within chadrc --- lua/custom/chadrc.lua | 11 +++++ lua/plugins/init.lua | 102 +++++++++++++++++++----------------------- 2 files changed, 56 insertions(+), 57 deletions(-) diff --git a/lua/custom/chadrc.lua b/lua/custom/chadrc.lua index 3f3d168..385b6f2 100644 --- a/lua/custom/chadrc.lua +++ b/lua/custom/chadrc.lua @@ -10,6 +10,17 @@ M.ui, M.options, M.plugin_status, M.mappings, M.custom = {}, {}, {}, {}, {} -- relativenumber = true, -- } + +-- To change the Packer `config` of a plugin that comes with NvChad, +-- add a table entry below matching the plugin github name +-- '-' -> '_', remove any '.lua', '.nvim' extensions +-- this string will be called in a `require` +-- use "(custom.configs).my_func()" to call a function +-- use "custom.blankline" to call a file +M.custom.default_plugin_overrides = { + -- indent_blankline = "custom.blankline", +} + -- user custom mappings -- e.g: name = { "mode" , "keys" , "cmd" , "options"} -- name: can be empty or something unique with repect to other custom mappings diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index fbdb606..a2bea44 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -9,6 +9,31 @@ local use = packer.use return packer.startup(function() local plugin_status = require("core.utils").load_config().plugin_status + -- local plugin_overrides = require("core.utils").load_config().custom.plugin_overrides + + -- FUNCTION: override_req, use `chadrc` plugin config override if present + -- name = name inside `default_config` / `chadrc` + -- default_req = run this if 'name' does not exist in `default_config` / `chadrc` + -- if override or default_req start with `(`, then strip that and assume override calls a function, not a whole file + local override_req = function(name, default_req) + local override = require("core.utils").load_config().custom.default_plugin_overrides[name] + local result + + if override == nil then + result = default_req + else + result = override + end + + if string.match(result, '^%(') then + result = result:sub(2) + result = result:gsub("%)%.", "').", 1) + return "require('" .. result + else + return "require('" .. result .. "')" + end + end + -- this is arranged on the basis of when a plugin starts -- this is the nvchad core repo containing utilities for some features like theme swticher, no need to lazy load @@ -36,57 +61,46 @@ return packer.startup(function() use { "kyazdani42/nvim-web-devicons", after = "nvim-base16.lua", - config = function() - require "plugins.configs.icons" - end, + config = override_req("nvim_web_devicons", "plugins.configs.icons"), } use { "famiu/feline.nvim", disable = not plugin_status.feline, after = "nvim-web-devicons", - config = function() - require "plugins.configs.statusline" - end, + config = override_req("feline", "plugins.configs.statusline"), } use { "akinsho/bufferline.nvim", disable = not plugin_status.bufferline, after = "nvim-web-devicons", - config = function() - require "plugins.configs.bufferline" - end, + config = override_req("bufferline", "plugins.configs.bufferline"), setup = function() require("core.mappings").bufferline() end, } + use { "lukas-reineke/indent-blankline.nvim", disable = not plugin_status.blankline, event = "BufRead", - config = function() - require("plugins.configs.others").blankline() - end, + config = override_req("indent_blankline", "(plugins.configs.others).blankline()"), } use { "norcalli/nvim-colorizer.lua", disable = not plugin_status.colorizer, event = "BufRead", - config = function() - require("plugins.configs.others").colorizer() - end, + config = override_req("nvim_colorizer", "(plugins.configs.others).colorizer()"), } use { "nvim-treesitter/nvim-treesitter", branch = "0.5-compat", event = "BufRead", - config = function() - require "plugins.configs.treesitter" - end, + config = override_req("nvim_treesitter", "plugins.configs.treesitter"), } -- git stuff @@ -94,9 +108,7 @@ return packer.startup(function() "lewis6991/gitsigns.nvim", disable = not plugin_status.gitsigns, opt = true, - config = function() - require "plugins.configs.gitsigns" - end, + config = override_req("gitsigns", "plugins.configs.gitsigns"), setup = function() require("core.utils").packer_lazy_load "gitsigns.nvim" end, @@ -107,9 +119,7 @@ return packer.startup(function() "karb94/neoscroll.nvim", disable = not plugin_status.neoscroll, opt = true, - config = function() - require("plugins.configs.others").neoscroll() - end, + config = override_req("neoscroll", "(plugins.configs.others).neoscroll()"), setup = function() require("core.utils").packer_lazy_load "neoscroll.nvim" end, @@ -154,9 +164,7 @@ return packer.startup(function() use { disable = not plugin_status.autosave, "Pocco81/AutoSave.nvim", - config = function() - require("plugins.configs.others").autosave() - end, + config = override_req("autosave", "(plugins.configs.others).autosave()"), cond = function() return require("core.utils").load_config().options.plugin.autosave == true end, @@ -166,9 +174,7 @@ return packer.startup(function() "max397574/better-escape.nvim", disable = not plugin_status.esc_insertmode, event = "InsertEnter", - config = function() - require("plugins.configs.others").better_escape() - end, + config = override_req("better_escape", "(plugins.configs.others).better_escape()"), } -- load luasnips + cmp related in insert mode only @@ -181,18 +187,14 @@ return packer.startup(function() use { "hrsh7th/nvim-cmp", after = "friendly-snippets", - config = function() - require "plugins.configs.cmp" - end, + config = override_req("nvim_cmp", "plugins.configs.cmp"), } use { "L3MON4D3/LuaSnip", wants = "friendly-snippets", after = "nvim-cmp", - config = function() - require("plugins.configs.others").luasnip() - end, + config = override_req("luasnip", "(plugins.configs.others).luasnip()"), } use { @@ -219,17 +221,13 @@ return packer.startup(function() use { "windwp/nvim-autopairs", after = "nvim-cmp", - config = function() - require("plugins.configs.others").autopairs() - end, + config = override_req("nvim_autopairs", "(plugins.configs.others).autopairs()"), } use { "glepnir/dashboard-nvim", disable = not plugin_status.dashboard, - config = function() - require "plugins.configs.dashboard" - end, + config = override_req("dashboard", "plugins.configs.dashboard"), setup = function() require("core.mappings").dashboard() end, @@ -249,9 +247,7 @@ return packer.startup(function() "terrortylor/nvim-comment", disable = not plugin_status.comment, cmd = "CommentToggle", - config = function() - require("plugins.configs.others").comment() - end, + config = override_req("nvim_comment", "(plugins.configs.others).comment()"), setup = function() require("core.mappings").comment() end, @@ -261,9 +257,7 @@ return packer.startup(function() use { "kyazdani42/nvim-tree.lua", cmd = { "NvimTreeToggle", "NvimTreeFocus" }, - config = function() - require "plugins.configs.nvimtree" - end, + config = override_req("nvim_tree", "plugins.configs.nvimtree"), setup = function() require("core.mappings").nvimtree() end, @@ -279,9 +273,7 @@ return packer.startup(function() "sudormrfbin/cheatsheet.nvim", disable = not plugin_status.cheatsheet, after = "telescope.nvim", - config = function() - require "plugins.configs.cheatsheet" - end, + config = override_req("cheatsheet", "plugins.configs.cheatsheet"), setup = function() require("core.mappings").cheatsheet() end, @@ -298,9 +290,7 @@ return packer.startup(function() end, }, }, - config = function() - require "plugins.configs.telescope" - end, + config = override_req("telescope", "plugins.configs.telescope"), setup = function() require("core.mappings").telescope() end, @@ -314,9 +304,7 @@ return packer.startup(function() "TZMinimalist", "TZFocus", }, - config = function() - require "plugins.configs.zenmode" - end, + config = override_req("truezen", "plugins.configs.zenmode"), setup = function() require("core.mappings").truezen() end, From 9961cc0113191ed5db81f9d6dfc9443ed4e00702 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Sun, 19 Sep 2021 18:11:28 +1000 Subject: [PATCH 0756/1541] refactor: clean & re-organise default_config + chadrc this completely overhauls the design of the two configuration files, aiming to move options & various tables into a more sensible table structure BREAKING CHANGE: this will break any user modificiations to the current config --- lua/core/default_config.lua | 216 ++++++++++++++--------------- lua/core/mappings.lua | 19 +-- lua/core/options.lua | 4 +- lua/core/utils.lua | 4 +- lua/custom/chadrc.lua | 47 ++++--- lua/plugins/configs/lspconfig.lua | 2 +- lua/plugins/configs/others.lua | 10 +- lua/plugins/configs/statusline.lua | 2 +- lua/plugins/init.lua | 8 +- 9 files changed, 154 insertions(+), 158 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 554b171..4fa4a76 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -2,107 +2,116 @@ -- use custom/chadrc.lua instead local M = {} -M.ui, M.options, M.plugin_status, M.mappings, M.custom = {}, {}, {}, {}, {} - --- non plugin ui configs, available without any plugins -M.ui = { - italic_comments = false, - -- theme to be used, to see all available themes, open the theme switcher by + th - theme = "onedark", - -- theme toggler, toggle between two themes, see theme_toggleer mappings - theme_toggler = { - enabled = false, - fav_themes = { - "onedark", - "one-light", - }, - }, - -- Enable this only if your terminal has the colorscheme set which nvchad uses - -- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal - transparency = false, -} - --- plugin related ui options -M.ui.plugin = { - -- statusline related options - statusline = { - -- these are filetypes, not pattern matched - -- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden - hidden = { - "help", - "dashboard", - "NvimTree", - "terminal", - }, - shown = {}, - -- default, round , slant , block , arrow - style = "default", - }, -} +M.options, M.ui, M.mappings, M.plugin = {}, {}, {}, {} -- non plugin normal, available without any plugins M.options = { + -- NeoVim/Vim options clipboard = "unnamedplus", cmdheight = 1, - copy_cut = true, -- copy cut text ( x key ), visual and normal mode - copy_del = true, -- copy deleted text ( dd key ), visual and normal mode - expandtab = true, + ruler = false, hidden = true, ignorecase = true, - insert_nav = true, -- navigation in insertmode - window_nav = true, mapleader = " ", mouse = "a", number = true, -- relative numbers in normal mode tool at the bottom of options.lua numberwidth = 2, - permanent_undo = true, + relativenumber = false, + expandtab = true, shiftwidth = 2, smartindent = true, tabstop = 8, -- Number of spaces that a in the file counts for timeoutlen = 400, - relativenumber = false, - ruler = false, + -- interval for writing swap file to disk, also used by gitsigns updatetime = 250, - -- used for updater - update_url = "https://github.com/NvChad/NvChad", - update_branch = "main", + undofile = true, -- keep a permanent undo (across restarts) + -- NvChad options + nvChad = { + copy_cut = true, -- copy cut text ( x key ), visual and normal mode + copy_del = true, -- copy deleted text ( dd key ), visual and normal mode + insert_nav = true, -- navigation in insertmode + window_nav = true, + theme_toggler = false, + -- used for updater + update_url = "https://github.com/NvChad/NvChad", + update_branch = "main", + }, } +-- ui configs +M.ui = { + italic_comments = false, + -- theme to be used, check available themes with ` + t + h` + theme = "onedark", + -- toggle between two themes, see theme_toggler mappings + theme_toggler = { + "onedark", + "gruvchad", + }, + -- Enable this only if your terminal has the colorscheme set which nvchad uses + -- For Ex : if you have onedark set in nvchad, set onedark's bg color on your terminal + transparency = false, +} + -- these are plugin related options -M.options.plugin = { - autosave = false, -- autosave on changed text or insert mode leave - -- timeout to be used for using escape with a key combination, see mappings.plugin.better_escape - esc_insertmode_timeout = 300, -} - --- enable and disable plugins (false for disable) -M.plugin_status = { - autosave = false, -- to autosave files - blankline = true, -- beautified blank lines - bufferline = true, -- buffer shown as tabs - cheatsheet = true, -- fuzzy search your commands/keymappings - colorizer = true, - comment = true, -- universal commentor - dashboard = false, -- a nice looking dashboard - esc_insertmode = true, -- escape from insert mode using custom keys - feline = true, -- statusline - gitsigns = true, -- gitsigns in statusline - lspsignature = true, -- lsp enhancements - neoformat = true, -- universal formatter - neoscroll = true, -- smooth scroll - telescope_media = false, -- see media files in telescope picker - truezen = false, -- no distraction mode for nvim - vim_fugitive = false, -- git in nvim - vim_matchup = true, -- % magic, match it but improved +M.plugins = { + -- enable and disable plugins (false for disable) + plugin_status = { + autosave = false, -- to autosave files + blankline = true, -- show code scope with symbols + bufferline = true, -- list open buffers up the top, easy switching too + cheatsheet = true, -- search your commands/keymappings + colorizer = true, -- color RGB, HEX, CSS, NAME color codes + comment = true, -- easily (un)comment code, language aware + dashboard = false, -- NeoVim 'home screen' on open + esc_insertmode = true, -- map to with no lag + feline = true, -- statusline + gitsigns = true, -- gitsigns in statusline + lspsignature = true, -- lsp enhancements + neoformat = true, -- universal code formatter + neoscroll = true, -- smooth scroll + telescope_media = false, -- media previews within telescope finders + truezen = false, -- distraction free & minimalist UI mode + vim_fugitive = false, -- git integration & tooling + vim_matchup = true, -- % operator enhancements + }, + options = { + lspconfig = { + servers = {} -- eg: "HTML" + }, + statusline = { -- statusline related options + -- these are filetypes, not pattern matched + -- shown filetypes will overrule hidden filetypes + hidden = { + "help", + "dashboard", + "NvimTree", + "terminal", + }, + shown = {}, + -- default, round , slant , block , arrow + style = "default", + }, + autosave = false, -- autosave on changed text or insert mode leave + -- timeout to be used for using escape with a key combination, see mappings.plugin.better_escape + esc_insertmode_timeout = 300, + }, + default_plugin_config_replace = {}, } -- mappings -- don't use a single keymap twice -- -- non plugin mappings M.mappings = { + -- custom = {}, -- all custom user mappings -- close current focused buffer close_buffer = "x", copy_whole_file = "", -- copy all contents of the current buffer + line_number_toggle = "n", -- show or hide line number + new_buffer = "", -- open a new buffer + new_tab = "b", -- open a new vim tab + save_file = "", -- save file using :w + theme_toggler = "tt", -- for theme toggler, see in ui.theme_toggler -- navigation in insert mode, only if enabled in options insert_nav = { backward = "", @@ -112,27 +121,21 @@ M.mappings = { prev_line = "", top_of_line = "", }, + --better window movement window_nav = { - --better window movement moveLeft = "", moveRight = "", moveUp = "", moveDown = "", }, - line_number_toggle = "n", -- show or hide line number - new_buffer = "", -- open a new buffer - new_tab = "b", -- open a new vim tab - save_file = "", -- save file using :w - theme_toggler = "tt", -- for theme toggler, see in ui.theme_toggler -- terminal related mappings terminal = { -- multiple mappings can be given for esc_termmode and esc_hide_termmode -- get out of terminal mode esc_termmode = { "jk" }, -- multiple mappings allowed -- get out of terminal mode and hide it - -- it does not close it, see pick_term mapping to see hidden terminals esc_hide_termmode = { "JK" }, -- multiple mappings allowed - -- show hidden terminal buffers in a telescope picker + -- show & recover hidden terminal buffers in a telescope picker pick_term = "W", -- below three are for spawning terminals new_horizontal = "h", @@ -144,19 +147,22 @@ M.mappings = { } -- all plugins related mappings --- to get short info about a plugin, see the respective string in plugin_status, if not present, then info here -M.mappings.plugin = { +M.mappings.plugins = { + -- list open buffers up the top, easy switching too bufferline = { next_buffer = "", -- next buffer prev_buffer = "", -- previous buffer }, + -- search your commands/keymappings cheatsheet = { default_keys = "dk", user_keys = "uk", }, + -- easily (un)comment code, language aware comment = { - toggle = "/", -- trigger comment on a single/selected lines/number prefix + toggle = "/", -- toggle comment (works on multiple lines) }, + -- NeoVim 'home screen' on open dashboard = { bookmarks = "bm", new_file = "fn", -- basically create a new buffer @@ -164,18 +170,20 @@ M.mappings.plugin = { session_load = "l", -- load a saved session session_save = "s", -- save a session }, - -- note: this is an edditional mapping to escape, escape key will still work - better_escape = { + -- map to with no lag + better_escape = { -- will still work esc_insertmode = { "jk" }, -- multiple mappings allowed }, + -- file explorer/tree nvimtree = { - -- file tree toggle = "", focus = "e", }, + -- universal code formatter neoformat = { format = "fm", }, + -- multitool for finding & picking things telescope = { buffers = "fb", find_files = "ff", @@ -185,16 +193,19 @@ M.mappings.plugin = { help_tags = "fh", live_grep = "fw", oldfiles = "fo", - themes = "th", + themes = "th", -- NvChad theme picker + -- media previews within telescope finders + telescope_media = { + media_files = "fp", + }, }, - telescope_media = { - media_files = "fp", - }, - truezen = { -- distraction free modes mapping, hide statusline, tabline, line numbers + -- distraction free & minimalist UI mode + truezen = { ataraxis_mode = "zz", -- center focus_mode = "zf", minimalistic_mode = "zm", -- as it is }, + -- git integration & tooling vim_fugitive = { diff_get_2 = "gh", diff_get_3 = "gl", @@ -203,26 +214,5 @@ M.mappings.plugin = { }, } --- user custom mappings --- e.g: name = { "mode" , "keys" , "cmd" , "options"} --- name: can be empty or something unique with repect to other custom mappings --- { mode, key, cmd } or name = { mode, key, cmd } --- mode: usage: mode or { mode1, mode2 }, multiple modes allowed, available modes => :h map-modes, --- keys: multiple keys allowed, same synxtax as modes --- cmd: for vim commands, must use ':' at start and add at the end if want to execute --- options: see :h nvim_set_keymap() opts section -M.custom.mappings = { - -- clear_all = { - -- "n", - -- "cc", - -- "gg0vG$d", - -- }, -} -M.plugins = { - lspconfig = { - -- servers = {"html", "cssls"} - servers = {}, - }, -} return M diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 8de91d7..d87fd04 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -5,7 +5,8 @@ local config = utils.load_config() local map = utils.map local maps = config.mappings -local plugin_maps = maps.plugin +local plugin_maps = maps.plugins +local nvChad_options = config.options.nvChad local cmd = vim.cmd @@ -32,17 +33,17 @@ M.misc = function() local function optional_mappings() -- don't yank text on cut ( x ) - if not config.options.copy_cut then + if not nvChad_options.copy_cut then map({ "n", "v" }, "x", '"_x') end -- don't yank text on delete ( dd ) - if not config.options.copy_del then + if not nvChad_options.copy_del then map({ "n", "v" }, "dd", '"_dd') end -- navigation within insert mode - if config.options.insert_nav then + if nvChad_options.insert_nav then local inav = maps.insert_nav map("i", inav.backward, "") @@ -54,7 +55,7 @@ M.misc = function() end -- easier navigation between windows - if config.options.window_nav then + if nvChad_options.window_nav then local wnav = maps.window_nav map("n", wnav.moveLeft, "h") @@ -64,11 +65,11 @@ M.misc = function() end -- check the theme toggler - if config.ui.theme_toggler.enabled then + if nvChad_options.theme_toggler then map( "n", maps.theme_toggler, - ":lua require('nvchad').toggle_theme(require('core.utils').load_config().ui.theme_toggler.fav_themes) " + ":lua require('nvchad').toggle_theme(require('core.utils').load_config().ui.theme_toggler) " ) end end @@ -113,7 +114,7 @@ M.misc = function() end local function user_config_mappings() - local custom_maps = config.custom.mappings or "" + local custom_maps = config.mappings.custom or "" if type(custom_maps) ~= "table" then return end @@ -190,7 +191,7 @@ M.telescope = function() end M.telescope_media = function() - local m = plugin_maps.telescope_media + local m = plugin_maps.telescope.telescope_media map("n", m.media_files, ":Telescope media_files ") end diff --git a/lua/core/options.lua b/lua/core/options.lua index 6872be6..dd46b42 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -15,7 +15,7 @@ opt.expandtab = options.expandtab opt.shiftwidth = options.shiftwidth opt.smartindent = options.smartindent --- disable tilde on end of buffer: https://github.com/ neovim/neovim/pull/8546#issuecomment-643643758 +-- disable tilde on end of buffer: https://github.com/neovim/neovim/pull/8546#issuecomment-643643758 opt.fillchars = { eob = " " } opt.hidden = options.hidden @@ -37,7 +37,7 @@ opt.splitright = true opt.tabstop = options.tabstop opt.termguicolors = true opt.timeoutlen = options.timeoutlen -opt.undofile = options.permanent_undo +opt.undofile = options.undofile -- interval for writing swap file to disk, also used by gitsigns opt.updatetime = options.updatetime diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 3ef5977..92928be 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -117,8 +117,8 @@ end -- hide statusline -- tables fetched from load_config function M.hide_statusline = function() - local hidden = require("core.utils").load_config().ui.plugin.statusline.hidden - local shown = require("core.utils").load_config().ui.plugin.statusline.shown + local hidden = require("core.utils").load_config().plugins.options.statusline.hidden + local shown = require("core.utils").load_config().plugins.options.statusline.shown local api = vim.api local buftype = api.nvim_buf_get_option("%", "ft") diff --git a/lua/custom/chadrc.lua b/lua/custom/chadrc.lua index 385b6f2..cab9743 100644 --- a/lua/custom/chadrc.lua +++ b/lua/custom/chadrc.lua @@ -1,7 +1,7 @@ -- IMPORTANT NOTE : This is the user config, can be edited. Will be preserved if updated with internal updater local M = {} -M.ui, M.options, M.plugin_status, M.mappings, M.custom = {}, {}, {}, {}, {} +M.options, M.ui, M.mappings, M.plugins = {}, {}, {}, {} -- To use this file, copy the strucutre of `core/default_config.lua`, -- then define your new var, an example of setting relative number: @@ -11,25 +11,15 @@ M.ui, M.options, M.plugin_status, M.mappings, M.custom = {}, {}, {}, {}, {} -- } --- To change the Packer `config` of a plugin that comes with NvChad, --- add a table entry below matching the plugin github name --- '-' -> '_', remove any '.lua', '.nvim' extensions --- this string will be called in a `require` --- use "(custom.configs).my_func()" to call a function --- use "custom.blankline" to call a file -M.custom.default_plugin_overrides = { - -- indent_blankline = "custom.blankline", -} - -- user custom mappings --- e.g: name = { "mode" , "keys" , "cmd" , "options"} --- name: can be empty or something unique with repect to other custom mappings --- { mode, key, cmd } or name = { mode, key, cmd } --- mode: usage: mode or { mode1, mode2 }, multiple modes allowed, available modes => :h map-modes, --- keys: multiple keys allowed, same synxtax as modes --- cmd: for vim commands, must use ':' at start and add at the end if want to execute --- options: see :h nvim_set_keymap() opts section -M.custom.mappings = { +-- format: name = { "mode" , "keys" , "cmd" , "options"} + -- name: can be empty or something unique with repect to other custom mappings + -- { mode, key, cmd } or name = { mode, key, cmd } + -- mode: usage: mode or { mode1, mode2 }, multiple modes allowed, available modes => :h map-modes, + -- keys: multiple keys allowed, same synxtax as modes + -- cmd: for vim commands, must use ':' at start and add at the end if want to execute + -- options: see :h nvim_set_keymap() opts section +M.mappings.custom = { -- clear_all = { -- "n", -- "cc", @@ -37,4 +27,23 @@ M.custom.mappings = { -- }, } +-- NvChad included plugin options & overrides +M.plugins = { + options = { + -- lspconfig = { + -- -- servers = {"html", "cssls"} + -- servers = {}, + -- }, + }, + -- To change the Packer `config` of a plugin that comes with NvChad, + -- add a table entry below matching the plugin github name + -- '-' -> '_', remove any '.lua', '.nvim' extensions + -- this string will be called in a `require` + -- use "(custom.configs).my_func()" to call a function + -- use "custom.blankline" to call a file + default_plugin_config_replace = { + + }, +} + return M diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 6704a21..96017c8 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -57,7 +57,7 @@ capabilities.textDocument.completion.completionItem.resolveSupport = { }, } -local servers = require("core.utils").load_config().plugins.lspconfig.servers +local servers = require("core.utils").load_config().plugins.options.lspconfig.servers for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup { diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index d967f26..959e5f3 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -1,7 +1,5 @@ local M = {} -local config = require("core.utils").load_config() - M.autopairs = function() local present1, autopairs = pcall(require, "nvim-autopairs") local present2, autopairs_completion = pcall(require, "nvim-autopairs.completion.cmp") @@ -25,7 +23,7 @@ M.autosave = function() end autosave.setup { - enabled = config.options.plugin.autosave, -- takes boolean value from chadrc.lua + enabled = config.plugins.options.autosave, -- takes boolean value from init.lua execution_message = "autosaved at : " .. vim.fn.strftime "%H:%M:%S", events = { "InsertLeave", "TextChanged" }, conditions = { @@ -40,10 +38,10 @@ M.autosave = function() end M.better_escape = function() - local m = require("core.utils").load_config().mappings.plugin.better_escape.esc_insertmode + local config = require("core.utils").load_config() require("better_escape").setup { - mapping = m, - timeout = config.options.plugin.esc_insertmode_timeout or 300, + mapping = config.mappings.plugins.better_escape.esc_insertmode, + timeout = config.plugins.options.esc_insertmode_timeout, } end diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 813fce7..d485e6f 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -42,7 +42,7 @@ local icon_styles = { }, } -local user_statusline_style = require("core.utils").load_config().ui.plugin.statusline.style +local user_statusline_style = require("core.utils").load_config().plugins.options.statusline.style local statusline_style = icon_styles[user_statusline_style] -- Initialize the components table diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index a2bea44..b9f6519 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -7,16 +7,14 @@ end local use = packer.use return packer.startup(function() - local plugin_status = require("core.utils").load_config().plugin_status - - -- local plugin_overrides = require("core.utils").load_config().custom.plugin_overrides + local plugin_status = require("core.utils").load_config().plugins.plugin_status -- FUNCTION: override_req, use `chadrc` plugin config override if present -- name = name inside `default_config` / `chadrc` -- default_req = run this if 'name' does not exist in `default_config` / `chadrc` -- if override or default_req start with `(`, then strip that and assume override calls a function, not a whole file local override_req = function(name, default_req) - local override = require("core.utils").load_config().custom.default_plugin_overrides[name] + local override = require("core.utils").load_config().plugins.default_plugin_config_replace[name] local result if override == nil then @@ -166,7 +164,7 @@ return packer.startup(function() "Pocco81/AutoSave.nvim", config = override_req("autosave", "(plugins.configs.others).autosave()"), cond = function() - return require("core.utils").load_config().options.plugin.autosave == true + return require("core.utils").load_config().plugins.options.autosave == true end, } From ee586047e55b6a5ac741d4efa1eab0cf260a5475 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Fri, 24 Sep 2021 18:03:33 +1000 Subject: [PATCH 0757/1541] feat: improve mappings, move `custom/init.lua & chadrc.lua` -> `custom/example_init.lua & example_chadrc.lua` --- lua/core/mappings.lua | 12 ----- lua/custom/{chadrc.lua => example_chadrc.lua} | 26 ++++------ lua/custom/example_init.lua | 48 +++++++++++++++++++ lua/custom/init.lua | 11 ----- 4 files changed, 57 insertions(+), 40 deletions(-) rename lua/custom/{chadrc.lua => example_chadrc.lua} (56%) create mode 100644 lua/custom/example_init.lua delete mode 100644 lua/custom/init.lua diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index d87fd04..3299925 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -113,21 +113,9 @@ M.misc = function() -- cmd "silent! command! NvChadReload lua require('nvchad').reload_config()" end - local function user_config_mappings() - local custom_maps = config.mappings.custom or "" - if type(custom_maps) ~= "table" then - return - end - - for _, map_table in pairs(custom_maps) do - map(unpack(map_table)) - end - end - non_config_mappings() optional_mappings() required_mappings() - user_config_mappings() hooks.run("setup_mappings", map) end diff --git a/lua/custom/chadrc.lua b/lua/custom/example_chadrc.lua similarity index 56% rename from lua/custom/chadrc.lua rename to lua/custom/example_chadrc.lua index cab9743..881dc5e 100644 --- a/lua/custom/chadrc.lua +++ b/lua/custom/example_chadrc.lua @@ -1,31 +1,23 @@ -- IMPORTANT NOTE : This is the user config, can be edited. Will be preserved if updated with internal updater +-- This file is for NvChad options & tools, custom settings are split between here and 'lua/custom/init.lua' local M = {} M.options, M.ui, M.mappings, M.plugins = {}, {}, {}, {} +-- NOTE: To use this, make a copy with `cp example_chadrc.lua chadrc.lua` + +-------------------------------------------------------------------- + -- To use this file, copy the strucutre of `core/default_config.lua`, --- then define your new var, an example of setting relative number: +-- examples of setting relative number & changing theme: -- M.options = { -- relativenumber = true, -- } - --- user custom mappings --- format: name = { "mode" , "keys" , "cmd" , "options"} - -- name: can be empty or something unique with repect to other custom mappings - -- { mode, key, cmd } or name = { mode, key, cmd } - -- mode: usage: mode or { mode1, mode2 }, multiple modes allowed, available modes => :h map-modes, - -- keys: multiple keys allowed, same synxtax as modes - -- cmd: for vim commands, must use ':' at start and add at the end if want to execute - -- options: see :h nvim_set_keymap() opts section -M.mappings.custom = { - -- clear_all = { - -- "n", - -- "cc", - -- "gg0vG$d", - -- }, -} +-- M.ui = { +-- theme = "nord" +-- } -- NvChad included plugin options & overrides M.plugins = { diff --git a/lua/custom/example_init.lua b/lua/custom/example_init.lua new file mode 100644 index 0000000..8b2aad4 --- /dev/null +++ b/lua/custom/example_init.lua @@ -0,0 +1,48 @@ +-- This is where you custom modules and plugins goes. +-- See the wiki for a guide on how to extend NvChad + +local hooks = require "core.hooks" + +-- NOTE: To use this, make a copy with `cp example_init.lua init.lua` + +-------------------------------------------------------------------- + +-- To modify packaged plugin configs, use the overrides functionality +-- if the override does not exist in the plugin config, make or request a PR, +-- or you can override the whole plugin config with 'chadrc' -> M.plugins.default_plugin_config_replace{} + -- this will run your config instead of the NvChad config for the given plugin + +-- hooks.override("lsp", "publish_diagnostics", function(current) +-- current.virtual_text = false; +-- return current; +-- end) + + + +-- To add new mappings, use the "setup_mappings" hook, +-- you can set one or many mappings +-- example below: + +-- hooks.add("setup_mappings", function(map) +-- map("n", "cc", "gg0vG$d", opt) -- example to delete the buffer +-- .... many more mappings .... +-- end) + + + +-- To add new plugins, use the "install_plugin" hook, +-- NOTE: we heavily suggest using Packer's lazy loading (with the 'event' field) + -- see: https://github.com/wbthomason/packer.nvim +-- examples below: + +-- hooks.add("install_plugins", function(use) +-- use { +-- "max397574/better-escape.nvim", +-- event = "InsertEnter", +-- } +-- end) + +-- alternatively, put this in a sub-folder like "lua/custom/plugins/mkdir" +-- then source it with + +-- require "custom.plugins.mkdir" diff --git a/lua/custom/init.lua b/lua/custom/init.lua deleted file mode 100644 index 5a80710..0000000 --- a/lua/custom/init.lua +++ /dev/null @@ -1,11 +0,0 @@ --- This is where you custom modules and plugins goes. --- See the wiki for a guide on how to extend NvChad - -local hooks = require "core.hooks" - --- For example, the hook below overrieds 'publish_diagnostics' in the 'lspconfig' file, --- --- hooks.override("lsp", "publish_diagnostics", function(current) --- current.virtual_text = false; --- return current; --- end) From 3d0a0e53f70d3f9398f0ddc418df5fe31fe27c2e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 24 Sep 2021 09:30:20 +0000 Subject: [PATCH 0758/1541] chore: format source code --- lua/custom/example_chadrc.lua | 28 +++++++++++++--------------- lua/custom/example_init.lua | 10 +++------- lua/plugins/configs/lspconfig.lua | 9 ++++++--- lua/plugins/init.lua | 31 +++++++++++++++---------------- 4 files changed, 37 insertions(+), 41 deletions(-) diff --git a/lua/custom/example_chadrc.lua b/lua/custom/example_chadrc.lua index 881dc5e..24bff0d 100644 --- a/lua/custom/example_chadrc.lua +++ b/lua/custom/example_chadrc.lua @@ -21,21 +21,19 @@ M.options, M.ui, M.mappings, M.plugins = {}, {}, {}, {} -- NvChad included plugin options & overrides M.plugins = { - options = { - -- lspconfig = { - -- -- servers = {"html", "cssls"} - -- servers = {}, - -- }, - }, - -- To change the Packer `config` of a plugin that comes with NvChad, - -- add a table entry below matching the plugin github name - -- '-' -> '_', remove any '.lua', '.nvim' extensions - -- this string will be called in a `require` - -- use "(custom.configs).my_func()" to call a function - -- use "custom.blankline" to call a file - default_plugin_config_replace = { - - }, + options = { + -- lspconfig = { + -- -- servers = {"html", "cssls"} + -- servers = {}, + -- }, + }, + -- To change the Packer `config` of a plugin that comes with NvChad, + -- add a table entry below matching the plugin github name + -- '-' -> '_', remove any '.lua', '.nvim' extensions + -- this string will be called in a `require` + -- use "(custom.configs).my_func()" to call a function + -- use "custom.blankline" to call a file + default_plugin_config_replace = {}, } return M diff --git a/lua/custom/example_init.lua b/lua/custom/example_init.lua index 8b2aad4..28b8ccb 100644 --- a/lua/custom/example_init.lua +++ b/lua/custom/example_init.lua @@ -10,29 +10,25 @@ local hooks = require "core.hooks" -- To modify packaged plugin configs, use the overrides functionality -- if the override does not exist in the plugin config, make or request a PR, -- or you can override the whole plugin config with 'chadrc' -> M.plugins.default_plugin_config_replace{} - -- this will run your config instead of the NvChad config for the given plugin +-- this will run your config instead of the NvChad config for the given plugin -- hooks.override("lsp", "publish_diagnostics", function(current) -- current.virtual_text = false; -- return current; -- end) - - -- To add new mappings, use the "setup_mappings" hook, -- you can set one or many mappings -- example below: - + -- hooks.add("setup_mappings", function(map) -- map("n", "cc", "gg0vG$d", opt) -- example to delete the buffer -- .... many more mappings .... -- end) - - -- To add new plugins, use the "install_plugin" hook, -- NOTE: we heavily suggest using Packer's lazy loading (with the 'event' field) - -- see: https://github.com/wbthomason/packer.nvim +-- see: https://github.com/wbthomason/packer.nvim -- examples below: -- hooks.add("install_plugins", function(use) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 96017c8..145600c 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,5 +1,5 @@ local present1, nvim_lsp = pcall(require, "lspconfig") -local overrides = require("core.hooks").createOverrides("lsp") +local overrides = require("core.hooks").createOverrides "lsp" if not present1 then return @@ -82,7 +82,7 @@ lspSymbol("Information", "") lspSymbol("Hint", "") lspSymbol("Warning", "") -local lsp_publish_diagnostics_options = overrides.get('publish_diagnostics', { +local lsp_publish_diagnostics_options = overrides.get("publish_diagnostics", { virtual_text = { prefix = "", spacing = 0, @@ -91,7 +91,10 @@ local lsp_publish_diagnostics_options = overrides.get('publish_diagnostics', { underline = true, update_in_insert = false, -- update diagnostics insert mode }) -vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, lsp_publish_diagnostics_options) +vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( + vim.lsp.diagnostic.on_publish_diagnostics, + lsp_publish_diagnostics_options +) vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "single", }) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index b9f6519..5363c96 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -14,22 +14,22 @@ return packer.startup(function() -- default_req = run this if 'name' does not exist in `default_config` / `chadrc` -- if override or default_req start with `(`, then strip that and assume override calls a function, not a whole file local override_req = function(name, default_req) - local override = require("core.utils").load_config().plugins.default_plugin_config_replace[name] - local result - - if override == nil then - result = default_req - else - result = override - end + local override = require("core.utils").load_config().plugins.default_plugin_config_replace[name] + local result - if string.match(result, '^%(') then - result = result:sub(2) - result = result:gsub("%)%.", "').", 1) - return "require('" .. result - else - return "require('" .. result .. "')" - end + if override == nil then + result = default_req + else + result = override + end + + if string.match(result, "^%(") then + result = result:sub(2) + result = result:gsub("%)%.", "').", 1) + return "require('" .. result + else + return "require('" .. result .. "')" + end end -- this is arranged on the basis of when a plugin starts @@ -79,7 +79,6 @@ return packer.startup(function() end, } - use { "lukas-reineke/indent-blankline.nvim", disable = not plugin_status.blankline, From cc48bfb5c8cebc3d1367dd8e5cfbdf8213c4a5b5 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 24 Sep 2021 18:57:36 +0530 Subject: [PATCH 0759/1541] remove cheatsheet.nvim --- lua/core/default_config.lua | 6 ---- lua/core/mappings.lua | 13 +-------- lua/plugins/configs/cheatsheet.lua | 44 ------------------------------ lua/plugins/init.lua | 11 -------- 4 files changed, 1 insertion(+), 73 deletions(-) delete mode 100644 lua/plugins/configs/cheatsheet.lua diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 4fa4a76..f3f192d 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -61,7 +61,6 @@ M.plugins = { autosave = false, -- to autosave files blankline = true, -- show code scope with symbols bufferline = true, -- list open buffers up the top, easy switching too - cheatsheet = true, -- search your commands/keymappings colorizer = true, -- color RGB, HEX, CSS, NAME color codes comment = true, -- easily (un)comment code, language aware dashboard = false, -- NeoVim 'home screen' on open @@ -153,11 +152,6 @@ M.mappings.plugins = { next_buffer = "", -- next buffer prev_buffer = "", -- previous buffer }, - -- search your commands/keymappings - cheatsheet = { - default_keys = "dk", - user_keys = "uk", - }, -- easily (un)comment code, language aware comment = { toggle = "/", -- toggle comment (works on multiple lines) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 3299925..15f29ae 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -62,7 +62,7 @@ M.misc = function() map("n", wnav.moveRight, "l") map("n", wnav.moveUp, "k") map("n", wnav.moveDown, "j") - end + end -- check the theme toggler if nvChad_options.theme_toggler then @@ -128,17 +128,6 @@ M.bufferline = function() map("n", m.prev_buffer, ":BufferLineCyclePrev ") end -M.cheatsheet = function() - local m = plugin_maps.cheatsheet - - map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope() ") - map( - "n", - m.user_keys, - ":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false } " - ) -end - M.comment = function() local m = plugin_maps.comment.toggle map("n", m, ":CommentToggle ") diff --git a/lua/plugins/configs/cheatsheet.lua b/lua/plugins/configs/cheatsheet.lua deleted file mode 100644 index 39d0b1f..0000000 --- a/lua/plugins/configs/cheatsheet.lua +++ /dev/null @@ -1,44 +0,0 @@ -local present, cheatsheet = pcall(require, "cheatsheet") - -if not present then - return -end - -local mappings = require("core.utils").load_config().mappings - --- add user mappings to the cheetsheet --- improve this function to not hardcode plugin -local function add_to_cheatsheet(section, keymap, desc) - if section == "plugin" then - for sec, key in pairs(mappings.plugin) do - add_to_cheatsheet(sec, key, sec) - end - else - if type(keymap) == "table" then - for sec, key in pairs(keymap) do - if type(sec) == "number" then - add_to_cheatsheet(section, key, desc or section) - else - add_to_cheatsheet(sec, key, desc or section) - end - end - else - cheatsheet.add_cheat(section, keymap, desc or "Misc") - end - end -end - -for section, keymap in pairs(mappings) do - add_to_cheatsheet(section, keymap) -end - -require("cheatsheet").setup { - - bundled_cheatsheets = { - enabled = { "default" }, - disabled = { "unicode", "nerd-fonts" }, - }, - - bundled_plugin_cheatsheets = false, - include_only_installed_plugins = true, -} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 5363c96..d7d9cfc 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -263,18 +263,7 @@ return packer.startup(function() use { "nvim-telescope/telescope.nvim", cmd = "Telescope", - -- because cheatsheet is not activated by a teleacope command - module = "cheatsheet", requires = { - { - "sudormrfbin/cheatsheet.nvim", - disable = not plugin_status.cheatsheet, - after = "telescope.nvim", - config = override_req("cheatsheet", "plugins.configs.cheatsheet"), - setup = function() - require("core.mappings").cheatsheet() - end, - }, { "nvim-telescope/telescope-fzf-native.nvim", run = "make", From 595be18680f0d2643829bc52e9a405a2af7de9a6 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 24 Sep 2021 19:07:24 +0530 Subject: [PATCH 0760/1541] feat : option to disable git status on nvimtree (#487) --- lua/core/default_config.lua | 5 ++++- lua/plugins/configs/nvimtree.lua | 8 +++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index f3f192d..a934ae0 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -77,7 +77,10 @@ M.plugins = { }, options = { lspconfig = { - servers = {} -- eg: "HTML" + servers = {} -- eg: "html" + }, + nvimtree = { + disable_git = 1 }, statusline = { -- statusline related options -- these are filetypes, not pattern matched diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 4387569..669379a 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -1,4 +1,6 @@ local present, tree_c = pcall(require, "nvim-tree.config") +local git_status = require("core.utils").load_config().plugins.options.nvimtree.disable_git + if not present then return end @@ -15,8 +17,8 @@ g.nvim_tree_auto_ignore_ft = { "dashboard" } -- don't open tree on specific fiyp g.nvim_tree_auto_open = 0 g.nvim_tree_disable_netrw = 1 g.nvim_tree_follow = 1 -g.nvim_tree_git_hl = 1 -g.nvim_tree_gitignore = 1 +g.nvim_tree_git_hl = git_status +g.nvim_tree_gitignore = git_status g.nvim_tree_hide_dotfiles = 0 g.nvim_tree_highlight_opened_files = 0 g.nvim_tree_hijack_netrw = 0 @@ -34,7 +36,7 @@ g.nvim_tree_show_icons = { folders = 1, -- folder_arrows= 1 files = 1, - git = 1, + git = git_status, } g.nvim_tree_icons = { From a820c3cafd46922729a57b74200b432f73cb0eaa Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 24 Sep 2021 19:12:44 +0530 Subject: [PATCH 0761/1541] fix : typo in default_config.lua --- lua/core/default_config.lua | 2 +- lua/plugins/configs/nvimtree.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index a934ae0..545b836 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -80,7 +80,7 @@ M.plugins = { servers = {} -- eg: "html" }, nvimtree = { - disable_git = 1 + enable_git = 0 }, statusline = { -- statusline related options -- these are filetypes, not pattern matched diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 669379a..d282b30 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -1,5 +1,5 @@ local present, tree_c = pcall(require, "nvim-tree.config") -local git_status = require("core.utils").load_config().plugins.options.nvimtree.disable_git +local git_status = require("core.utils").load_config().plugins.options.nvimtree.enable_git if not present then return From 9e8fb9db7488dd3fa9ae1efe21928728047a30e8 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 24 Sep 2021 20:47:53 +0530 Subject: [PATCH 0762/1541] feat: add overrides for more plugins | disable some by default --- lua/core/default_config.lua | 6 +++--- lua/plugins/init.lua | 8 ++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 545b836..389095a 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -61,7 +61,7 @@ M.plugins = { autosave = false, -- to autosave files blankline = true, -- show code scope with symbols bufferline = true, -- list open buffers up the top, easy switching too - colorizer = true, -- color RGB, HEX, CSS, NAME color codes + colorizer = false, -- color RGB, HEX, CSS, NAME color codes comment = true, -- easily (un)comment code, language aware dashboard = false, -- NeoVim 'home screen' on open esc_insertmode = true, -- map to with no lag @@ -69,11 +69,11 @@ M.plugins = { gitsigns = true, -- gitsigns in statusline lspsignature = true, -- lsp enhancements neoformat = true, -- universal code formatter - neoscroll = true, -- smooth scroll + neoscroll = false, -- smooth scroll telescope_media = false, -- media previews within telescope finders truezen = false, -- distraction free & minimalist UI mode vim_fugitive = false, -- git integration & tooling - vim_matchup = true, -- % operator enhancements + vim_matchup = false, -- % operator enhancements }, options = { lspconfig = { diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index d7d9cfc..eb11b9f 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -134,18 +134,14 @@ return packer.startup(function() vim.cmd "silent! e %" end, 0) end, - config = function() - require "plugins.configs.lspconfig" - end, + config = override_req("lspconfig", "plugins.configs.lspconfig"), } use { "ray-x/lsp_signature.nvim", disable = not plugin_status.lspsignature, after = "nvim-lspconfig", - config = function() - require("plugins.configs.others").signature() - end, + config = override_req("signature", "(plugins.configs.others).signature()"), } use { From e408a1168f45fef3698c809eed5e50116680abf2 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 24 Sep 2021 21:55:44 +0530 Subject: [PATCH 0763/1541] feat: update conf for gitsigns | format stuff --- lua/core/default_config.lua | 89 ++++++++++++++++---------------- lua/plugins/configs/gitsigns.lua | 2 +- 2 files changed, 45 insertions(+), 46 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 389095a..1224e8e 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -53,53 +53,53 @@ M.ui = { -- For Ex : if you have onedark set in nvchad, set onedark's bg color on your terminal transparency = false, } - + -- these are plugin related options M.plugins = { - -- enable and disable plugins (false for disable) - plugin_status = { - autosave = false, -- to autosave files - blankline = true, -- show code scope with symbols - bufferline = true, -- list open buffers up the top, easy switching too - colorizer = false, -- color RGB, HEX, CSS, NAME color codes - comment = true, -- easily (un)comment code, language aware - dashboard = false, -- NeoVim 'home screen' on open - esc_insertmode = true, -- map to with no lag - feline = true, -- statusline - gitsigns = true, -- gitsigns in statusline - lspsignature = true, -- lsp enhancements - neoformat = true, -- universal code formatter - neoscroll = false, -- smooth scroll - telescope_media = false, -- media previews within telescope finders - truezen = false, -- distraction free & minimalist UI mode - vim_fugitive = false, -- git integration & tooling - vim_matchup = false, -- % operator enhancements + -- enable and disable plugins (false for disable) + plugin_status = { + autosave = false, -- to autosave files + blankline = true, -- show code scope with symbols + bufferline = true, -- list open buffers up the top, easy switching too + colorizer = false, -- color RGB, HEX, CSS, NAME color codes + comment = true, -- easily (un)comment code, language aware + dashboard = false, -- NeoVim 'home screen' on open + esc_insertmode = true, -- map to with no lag + feline = true, -- statusline + gitsigns = true, -- gitsigns in statusline + lspsignature = true, -- lsp enhancements + neoformat = true, -- universal code formatter + neoscroll = false, -- smooth scroll + telescope_media = false, -- media previews within telescope finders + truezen = false, -- distraction free & minimalist UI mode + vim_fugitive = false, -- git integration & tooling + vim_matchup = true, -- % operator enhancements }, - options = { - lspconfig = { - servers = {} -- eg: "html" - }, - nvimtree = { - enable_git = 0 - }, - statusline = { -- statusline related options - -- these are filetypes, not pattern matched - -- shown filetypes will overrule hidden filetypes - hidden = { - "help", - "dashboard", - "NvimTree", - "terminal", + options = { + lspconfig = { + servers = {}, -- eg: "html" }, - shown = {}, - -- default, round , slant , block , arrow - style = "default", - }, - autosave = false, -- autosave on changed text or insert mode leave - -- timeout to be used for using escape with a key combination, see mappings.plugin.better_escape - esc_insertmode_timeout = 300, - }, - default_plugin_config_replace = {}, + nvimtree = { + enable_git = 0, + }, + statusline = { -- statusline related options + -- these are filetypes, not pattern matched + -- shown filetypes will overrule hidden filetypes + hidden = { + "help", + "dashboard", + "NvimTree", + "terminal", + }, + shown = {}, + -- default, round , slant , block , arrow + style = "default", + }, + autosave = false, -- autosave on changed text or insert mode leave + -- timeout to be used for using escape with a key combination, see mappings.plugin.better_escape + esc_insertmode_timeout = 300, + }, + default_plugin_config_replace = {}, } -- mappings -- don't use a single keymap twice -- @@ -129,7 +129,7 @@ M.mappings = { moveRight = "", moveUp = "", moveDown = "", - }, + }, -- terminal related mappings terminal = { -- multiple mappings can be given for esc_termmode and esc_hide_termmode @@ -211,5 +211,4 @@ M.mappings.plugins = { }, } - return M diff --git a/lua/plugins/configs/gitsigns.lua b/lua/plugins/configs/gitsigns.lua index a33a46a..f2b58f6 100644 --- a/lua/plugins/configs/gitsigns.lua +++ b/lua/plugins/configs/gitsigns.lua @@ -28,7 +28,7 @@ gitsigns.setup { }, status_formatter = nil, -- Use default - watch_index = { + watch_gitdir = { interval = 100, }, } From 2685ad8e30c8fc6ef0eebd003107a9ec1ff6a2a2 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 25 Sep 2021 22:11:27 +0530 Subject: [PATCH 0764/1541] fix : update nvimtree config --- lua/plugins/configs/nvimtree.lua | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index d282b30..f030e7a 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -12,23 +12,15 @@ vim.o.termguicolors = true g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names g.nvim_tree_allow_resize = 1 -g.nvim_tree_auto_close = 0 -- closes tree when it's the last window -g.nvim_tree_auto_ignore_ft = { "dashboard" } -- don't open tree on specific fiypes. -g.nvim_tree_auto_open = 0 -g.nvim_tree_disable_netrw = 1 -g.nvim_tree_follow = 1 g.nvim_tree_git_hl = git_status g.nvim_tree_gitignore = git_status g.nvim_tree_hide_dotfiles = 0 g.nvim_tree_highlight_opened_files = 0 -g.nvim_tree_hijack_netrw = 0 g.nvim_tree_indent_markers = 1 g.nvim_tree_ignore = { ".git", "node_modules", ".cache" } g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" } g.nvim_tree_side = "left" -g.nvim_tree_tab_open = 0 -g.nvim_tree_update_cwd = 1 g.nvim_tree_width = 25 g.nvim_tree_lsp_diagnostics = 0 @@ -97,3 +89,17 @@ g.nvim_tree_bindings = { { key = "q", cb = tree_cb "close" }, { key = "g?", cb = tree_cb "toggle_help" }, } + +require("nvim-tree").setup { + disable_netrw = true, + hijack_netrw = true, + ignore_ft_on_setup = { "dashboard" }, + auto_close = false, + open_on_tab = false, + hijack_cursor = true, + update_cwd = true, + update_focused_file = { + enable = true, + update_cwd = true, + }, +} From 50a5bcc870276c8e986282a5803647602730d7e0 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 25 Sep 2021 23:11:59 +0530 Subject: [PATCH 0765/1541] rm : vim-fugitive plugin --- lua/core/default_config.lua | 8 -------- lua/core/mappings.lua | 9 --------- lua/plugins/init.lua | 16 ---------------- 3 files changed, 33 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 1224e8e..312500e 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -72,7 +72,6 @@ M.plugins = { neoscroll = false, -- smooth scroll telescope_media = false, -- media previews within telescope finders truezen = false, -- distraction free & minimalist UI mode - vim_fugitive = false, -- git integration & tooling vim_matchup = true, -- % operator enhancements }, options = { @@ -202,13 +201,6 @@ M.mappings.plugins = { focus_mode = "zf", minimalistic_mode = "zm", -- as it is }, - -- git integration & tooling - vim_fugitive = { - diff_get_2 = "gh", - diff_get_3 = "gl", - git = "gs", - git_blame = "gb", - }, } return M diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 15f29ae..4d9d157 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -181,13 +181,4 @@ M.truezen = function() map("n", m.minimalistic_mode, ":TZMinimalist ") end -M.vim_fugitive = function() - local m = plugin_maps.vim_fugitive - - map("n", m.git, ":Git ") - map("n", m.git_blame, ":Git blame ") - map("n", m.diff_get_2, ":diffget //2 ") - map("n", m.diff_get_3, ":diffget //3 ") -end - return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index eb11b9f..a2afc55 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -292,21 +292,5 @@ return packer.startup(function() end, } - use { - "tpope/vim-fugitive", - disable = not plugin_status.vim_fugitive, - cmd = { - "Git", - "Gdiff", - "Gdiffsplit", - "Gvdiffsplit", - "Gwrite", - "Gw", - }, - setup = function() - require("core.mappings").vim_fugitive() - end, - } - require("core.hooks").run("install_plugins", use) end) From 8e0dfc1de69a35142e84e39114282c1f25e16223 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 26 Sep 2021 07:03:00 +0530 Subject: [PATCH 0766/1541] fix : add path for luasnip snippets (#483) --- lua/core/default_config.lua | 3 +++ lua/plugins/configs/others.lua | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 312500e..1e7f839 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -81,6 +81,9 @@ M.plugins = { nvimtree = { enable_git = 0, }, + luasnip = { + snippet_path = {}, + }, statusline = { -- statusline related options -- these are filetypes, not pattern matched -- shown filetypes will overrule hidden filetypes diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 959e5f3..2d1576c 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -1,5 +1,6 @@ local M = {} +local chadrc_config = require("core.utils").load_config() M.autopairs = function() local present1, autopairs = pcall(require, "nvim-autopairs") local present2, autopairs_completion = pcall(require, "nvim-autopairs.completion.cmp") @@ -23,7 +24,7 @@ M.autosave = function() end autosave.setup { - enabled = config.plugins.options.autosave, -- takes boolean value from init.lua + enabled = chadrc_config.plugins.options.autosave, -- takes boolean value from init.lua execution_message = "autosaved at : " .. vim.fn.strftime "%H:%M:%S", events = { "InsertLeave", "TextChanged" }, conditions = { @@ -38,10 +39,9 @@ M.autosave = function() end M.better_escape = function() - local config = require("core.utils").load_config() require("better_escape").setup { - mapping = config.mappings.plugins.better_escape.esc_insertmode, - timeout = config.plugins.options.esc_insertmode_timeout, + mapping = chadrc_config.mappings.plugins.better_escape.esc_insertmode, + timeout = chadrc_config.plugins.options.esc_insertmode_timeout, } end @@ -101,7 +101,7 @@ M.luasnip = function() history = true, updateevents = "TextChanged,TextChangedI", } - require("luasnip/loaders/from_vscode").load() + require("luasnip/loaders/from_vscode").load { path = { chadrc_config.plugins.options.luasnip.snippet_path } } end M.neoscroll = function() From a41ab8b830a53f208275370763c16674a4b90c20 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 26 Sep 2021 07:21:07 +0530 Subject: [PATCH 0767/1541] fix : Add option to disable cmp (#482) --- lua/core/default_config.lua | 1 + lua/plugins/init.lua | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 1e7f839..052ead7 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -73,6 +73,7 @@ M.plugins = { telescope_media = false, -- media previews within telescope finders truezen = false, -- distraction free & minimalist UI mode vim_matchup = true, -- % operator enhancements + cmp = true, }, options = { lspconfig = { diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index a2afc55..62789a1 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -174,17 +174,20 @@ return packer.startup(function() use { "rafamadriz/friendly-snippets", + disable = not plugin_status.cmp, event = "InsertEnter", } use { "hrsh7th/nvim-cmp", + disable = not plugin_status.cmp, after = "friendly-snippets", config = override_req("nvim_cmp", "plugins.configs.cmp"), } use { "L3MON4D3/LuaSnip", + disable = not plugin_status.cmp, wants = "friendly-snippets", after = "nvim-cmp", config = override_req("luasnip", "(plugins.configs.others).luasnip()"), @@ -192,27 +195,32 @@ return packer.startup(function() use { "saadparwaiz1/cmp_luasnip", + disable = not plugin_status.cmp, after = "LuaSnip", } use { "hrsh7th/cmp-nvim-lua", + disable = not plugin_status.cmp, after = "cmp_luasnip", } use { "hrsh7th/cmp-nvim-lsp", + disable = not plugin_status.cmp, after = "cmp-nvim-lua", } use { "hrsh7th/cmp-buffer", + disable = not plugin_status.cmp, after = "cmp-nvim-lsp", } -- misc plugins use { "windwp/nvim-autopairs", + disable = not plugin_status.cmp, after = "nvim-cmp", config = override_req("nvim_autopairs", "(plugins.configs.others).autopairs()"), } From 555f61493adc047a2dadd29950ff626c4932a71c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 26 Sep 2021 09:57:33 +0530 Subject: [PATCH 0768/1541] fix : update image links --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f419085..20cb111 100644 --- a/README.md +++ b/README.md @@ -41,10 +41,10 @@ ## Showcase -
+

-
-
+
+
## Theme Showcase @@ -65,38 +65,38 @@ Fast file tree: -
+

Telescope-nvim

A fuzzy file finder, picker, sorter, previewer and much more: - -
+ +

Indent-blankline.nvim

Adds indentline: -
+

Feline.nvim

Highly configurable statusline plugin: -
+

Nvim-bufferline.lua

Better tab implementation: -
+

Nvim-web-devicons

Lua fork of Vim Devicons which offers more file icon customisability: -
+

Nvim-treesitter


+
From 7051afe43c4ec7374da22cf314cd832c835f2600 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 26 Sep 2021 15:40:12 +0530 Subject: [PATCH 0769/1541] fix : update nvimtree config --- lua/plugins/configs/nvimtree.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index f030e7a..52c7fd8 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -22,7 +22,6 @@ g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" } g.nvim_tree_side = "left" g.nvim_tree_width = 25 -g.nvim_tree_lsp_diagnostics = 0 g.nvim_tree_show_icons = { folders = 1, @@ -91,6 +90,7 @@ g.nvim_tree_bindings = { } require("nvim-tree").setup { + lsp_diagnostics = false, disable_netrw = true, hijack_netrw = true, ignore_ft_on_setup = { "dashboard" }, From ac28a9f99eabc8918794d59b45fda511344f9625 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 26 Sep 2021 15:53:50 +0530 Subject: [PATCH 0770/1541] fix : shortline for small screens (#468) --- lua/plugins/configs/statusline.lua | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index d485e6f..1b45878 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -84,6 +84,9 @@ components.active[1][2] = { end return " " .. icon .. " " .. filename .. " " end, + enabled = function(winid) + return vim.api.nvim_win_get_width(winid) > 70 + end, hl = { fg = colors.white, bg = colors.lightbg, @@ -98,6 +101,10 @@ components.active[1][3] = { return "  " .. dir_name .. " " end, + enabled = function(winid) + return vim.api.nvim_win_get_width(winid) > 80 + end, + hl = { fg = colors.grey_fg2, bg = colors.lightbg2, @@ -143,6 +150,7 @@ components.active[1][7] = { enabled = function() return lsp.diagnostics_exist "Error" end, + hl = { fg = colors.red }, icon = "  ", } @@ -204,6 +212,9 @@ components.active[2][1] = { end return "" end, + enabled = function(winid) + return vim.api.nvim_win_get_width(winid) > 80 + end, hl = { fg = colors.green }, } @@ -215,11 +226,17 @@ components.active[3][1] = { return "" end end, + enabled = function(winid) + return vim.api.nvim_win_get_width(winid) > 70 + end, hl = { fg = colors.grey_fg2, bg = colors.statusline_bg }, } components.active[3][2] = { provider = "git_branch", + enabled = function(winid) + return vim.api.nvim_win_get_width(winid) > 70 + end, hl = { fg = colors.grey_fg2, bg = colors.statusline_bg, @@ -294,6 +311,9 @@ components.active[3][6] = { components.active[3][7] = { provider = statusline_style.left, + enabled = function(winid) + return vim.api.nvim_win_get_width(winid) > 90 + end, hl = { fg = colors.grey, bg = colors.one_bg, @@ -302,6 +322,9 @@ components.active[3][7] = { components.active[3][8] = { provider = statusline_style.left, + enabled = function(winid) + return vim.api.nvim_win_get_width(winid) > 90 + end, hl = { fg = colors.green, bg = colors.grey, @@ -310,6 +333,9 @@ components.active[3][8] = { components.active[3][9] = { provider = statusline_style.position_icon, + enabled = function(winid) + return vim.api.nvim_win_get_width(winid) > 90 + end, hl = { fg = colors.black, bg = colors.green, @@ -330,6 +356,10 @@ components.active[3][10] = { return " " .. result .. "%% " end, + enabled = function(winid) + return vim.api.nvim_win_get_width(winid) > 90 + end, + hl = { fg = colors.green, bg = colors.one_bg, From d6e08ba2aa6c03291c525c8ad7812a341f92fcb1 Mon Sep 17 00:00:00 2001 From: marvelman3284 Date: Sun, 26 Sep 2021 08:45:34 -0400 Subject: [PATCH 0771/1541] fix: Replace Website Link in README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 20cb111..51cea8c 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@

NvChad

- Home + Home - Install + Install - Contribute + Contribute Support From 5bb7cd3360fecd7a8685499fa6c8d58819fe7774 Mon Sep 17 00:00:00 2001 From: marvelman3284 Date: Sun, 26 Sep 2021 09:27:33 -0400 Subject: [PATCH 0772/1541] chore: add contributing.md --- CONTRIBUTING.md | 157 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..8ba70be --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,157 @@ +# [CONTRIBUTING](https://nvchad.github.io/contribute) + +## NvChad install for contributors + +If you wish to contribute to NvChad, you should: +1. [create a fork on GitHub](https://docs.github.com/en/get-started/quickstart/fork-a-repo) +2. clone your fork to your machine + - For ssh: + ```shell + $ git clone git@github.com:/NvChad.git ~/.config/nvim + ``` + - For https: + ```shell + $ git clone https://github.com//NvChad.git ~/.config/nvim + ``` +3. [add a new remote repo to track](https://www.atlassian.com/git/tutorials/git-forks-and-upstreams) + - this means you can push/pull as normal to your own repo, but also easily track & update from the NvChad repo + - for ssh: + ```shell + $ git remote add upstream git@github.com:NvChad/NvChad.git + ``` + - for https: + ```shell + $ git remote add upstream https://github.com/NvChad/NvChad.git + ``` +4. any time you create a branch to do some work, use + ```shell + $ git fetch upstream && git checkout -b dev-myFEAT upstream/main + ``` +5. only use the **--rebase** flag to update your dev branch + - this means that there are no `Merge NvChad/main into devBranch` commits, which are to be avoided + ```shell + $ git pull upstream --rebase + ``` + +## Things to know before contributing + +- When making a PR (pull request), please be very descriptive about what you've done! + +- We are open to all PRs, but may decline some for a myriad of reasons. Though don't be discouraged! We'll still be open to discussions. + +- PR's are always welcomed however NvChad aims to be less bloated. So PR's regarding existing plugin's enhancement and creating new features with existing plugins itself ( without adding a new plugin), bug fixes and corrections are more encouraged. + +- NvChad wont keep adding more and more features (like adding new plugins most likely) as requested if they feel unneeded and arent usable by the majority!! If you think the plugin you want to be added is very useful and many NvChaders would find it useful, then such feature's PR is welcomed! + +- But adding specific features like adding config for [wakatime](https://github.com/wakatime/vim-wakatime) etc will be added in this [chad user configs](https://github.com/NvChad/NvChad/wiki/Chad-user-configs). This lets the user select the things only they want ( adding configs from extra configs ). + +## How to remove or edit commits from your PR +> You may have been directed here to remove a commit such as a merge commit: `Merge NvChad/main into devBranch` from your PR + +> As these commands edit your git history, you may need to **force push** with `git push origin --force` + +1. Run the following: + ``` + $ git rebase -i HEAD~ + ``` +
Example +

+ + ```shell + $ git rebase -i HEAD~4 + ``` + + ```shell + pick 28b2dcb statusline add lsp status + pick dad9a39 feat: Added lsp radial progress + pick 68f72f1 add clickable btn for exiting nvim + pick b281b53 avoid using q! for quitting vim + + # Rebase 52b655b..b281b53 onto 52b655b (4 commands) + # + # Commands: + # p, pick = use commit + # r, reword = use commit, but edit the commit message + # e, edit = use commit, but stop for amending + # s, squash = use commit, but meld into previous commit + # f, fixup = like "squash", but discard this commit's log message + # x, exec = run command (the rest of the line) using shell + # b, break = stop here (continue rebase later with 'git rebase --continue') + # d, drop = remove commit + # l, label

+
+ +2. Change the `pick` commands to whatever you wish, you may wish to `d` `drop` or `e` `edit` a commit. Then save & quit this git file to run it. + +
Example +

+ + ```shell {3,4} + pick 28b2dcb statusline add lsp status + pick dad9a39 feat: Added lsp radial progress + edit 68f72f1 add clickable btn for exiting nvim + d b281b53 avoid using q! for quitting vim + + # Rebase 52b655b..b281b53 onto 52b655b (4 commands) + # + # Commands: + # p, pick = use commit + # r, reword = use commit, but edit the commit message + # e, edit = use commit, but stop for amending + # s, squash = use commit, but meld into previous commit + # f, fixup = like "squash", but discard this commit's log message + # x, exec = run command (the rest of the line) using shell + # b, break = stop here (continue rebase later with 'git rebase --continue') + # d, drop = remove commit + # l, label

+
+ +3. If you picked `drop` you are done, if you picked `edit` then edit your files, then run: + ```shell + $ git add + ``` + +4. Once you have edited & added your files, run: + ```shell + $ git rebase --continue + ``` + +5. You will likely need to push using: + ```shell + $ git push origin --force + ``` + +## Help +For help with contributing and anything else nvChad related join the [discord](https://discord.gg/VyPxsGArXc) From f65338092d70f3298f3808b44c11942126f7b78a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 26 Sep 2021 18:47:12 +0530 Subject: [PATCH 0773/1541] feat : window title option --- lua/core/options.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/core/options.lua b/lua/core/options.lua index dd46b42..96bdd4a 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -6,6 +6,7 @@ g.nvchad_user_config = "chadrc" local options = require("core.utils").load_config().options +opt.title = true opt.clipboard = options.clipboard opt.cmdheight = options.cmdheight opt.cul = true -- cursor line From 54d5c13d386b552e08a8a29e19e19c696063f6d4 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Sun, 26 Sep 2021 23:53:49 +1000 Subject: [PATCH 0774/1541] docs: move the README & CONTRIBUTING to the '.github.' folder, this will keep user's nvim configs cleaner, this is specifically a GitHub standard, not base Git --- CONTRIBUTING.md => .github/CONTRIBUTING.md | 0 README.md => .github/README.md | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename CONTRIBUTING.md => .github/CONTRIBUTING.md (100%) rename README.md => .github/README.md (100%) diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/README.md b/.github/README.md similarity index 100% rename from README.md rename to .github/README.md From 98ec153e8f27c33bb8f40ea231c3a25f6d5ec237 Mon Sep 17 00:00:00 2001 From: Sravanth <54331348+chebro@users.noreply.github.com> Date: Sun, 26 Sep 2021 19:35:11 +0530 Subject: [PATCH 0775/1541] fix: ignore unwanted files custom dir - since it's pointless to track user specific files, added the custom dir to the ignore list except for the example files. --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 8cb205e..291d121 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ plugin +lua/custom/* +!lua/custom/example_init.lua +!lua/custom/example_chadrc.lua From cb3c5682a8a71571fd016daaa59e31105ce084f2 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 26 Sep 2021 23:48:25 +0530 Subject: [PATCH 0776/1541] fix : make inactive statuslines as thin lines --- lua/colors/highlights.lua | 5 ----- lua/plugins/configs/statusline.lua | 18 +++++++++++++++--- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index d09881b..0141415 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -71,13 +71,8 @@ bg("PmenuThumb", nord_blue) -- misc fg("LineNr", grey) - fg("NvimInternalError", red) - --- inactive statuslines as thin splitlines -fg("StatusLineNC", one_bg2 .. " gui=underline") fg("VertSplit", one_bg2) --- fg_bg("Visual",light_grey, colors.lightbg) if ui.transparency then bg("Normal", "NONE") diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 1b45878..04fa185 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -55,9 +55,6 @@ local components = { table.insert(components.active, {}) table.insert(components.active, {}) table.insert(components.active, {}) -table.insert(components.inactive, {}) -table.insert(components.inactive, {}) -table.insert(components.inactive, {}) components.active[1][1] = { provider = statusline_style.main_icon, @@ -366,6 +363,21 @@ components.active[3][10] = { }, } +local InactiveStatusHL = { + fg = colors.one_bg2, + bg = "NONE", + style = "underline", +} + +components.inactive = { + { + { + provider = " ", + hl = InactiveStatusHL, + }, + }, +} + require("feline").setup { colors = { bg = colors.statusline_bg, From 1cd3faffb32302e13a8e95209382683a687ae09d Mon Sep 17 00:00:00 2001 From: Justin MacCarthy Date: Mon, 27 Sep 2021 01:08:18 +0700 Subject: [PATCH 0777/1541] Moved more setting into the setup, in line with the changes in NvimTree --- lua/plugins/configs/nvimtree.lua | 83 ++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 37 deletions(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 52c7fd8..ab77965 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -11,7 +11,6 @@ local g = vim.g vim.o.termguicolors = true g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names -g.nvim_tree_allow_resize = 1 g.nvim_tree_git_hl = git_status g.nvim_tree_gitignore = git_status g.nvim_tree_hide_dotfiles = 0 @@ -20,9 +19,7 @@ g.nvim_tree_indent_markers = 1 g.nvim_tree_ignore = { ".git", "node_modules", ".cache" } g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" } -g.nvim_tree_side = "left" -g.nvim_tree_width = 25 - +-- g.nvim_tree_show_icons = { folders = 1, -- folder_arrows= 1 @@ -55,39 +52,7 @@ g.nvim_tree_icons = { }, } -g.nvim_tree_bindings = { - { key = { "", "o", "<2-LeftMouse>" }, cb = tree_cb "edit" }, - { key = { "<2-RightMouse>", "" }, cb = tree_cb "cd" }, - { key = "", cb = tree_cb "vsplit" }, - { key = "", cb = tree_cb "split" }, - { key = "", cb = tree_cb "tabnew" }, - { key = "<", cb = tree_cb "prev_sibling" }, - { key = ">", cb = tree_cb "next_sibling" }, - { key = "P", cb = tree_cb "parent_node" }, - { key = "", cb = tree_cb "close_node" }, - { key = "", cb = tree_cb "close_node" }, - { key = "", cb = tree_cb "preview" }, - { key = "K", cb = tree_cb "first_sibling" }, - { key = "J", cb = tree_cb "last_sibling" }, - { key = "I", cb = tree_cb "toggle_ignored" }, - { key = "H", cb = tree_cb "toggle_dotfiles" }, - { key = "R", cb = tree_cb "refresh" }, - { key = "a", cb = tree_cb "create" }, - { key = "d", cb = tree_cb "remove" }, - { key = "r", cb = tree_cb "rename" }, - { key = "", cb = tree_cb "full_rename" }, - { key = "x", cb = tree_cb "cut" }, - { key = "c", cb = tree_cb "copy" }, - { key = "p", cb = tree_cb "paste" }, - { key = "y", cb = tree_cb "copy_name" }, - { key = "Y", cb = tree_cb "copy_path" }, - { key = "gy", cb = tree_cb "copy_absolute_path" }, - { key = "[c", cb = tree_cb "prev_git_item" }, - { key = "}c", cb = tree_cb "next_git_item" }, - { key = "-", cb = tree_cb "dir_up" }, - { key = "q", cb = tree_cb "close" }, - { key = "g?", cb = tree_cb "toggle_help" }, -} + require("nvim-tree").setup { lsp_diagnostics = false, @@ -102,4 +67,48 @@ require("nvim-tree").setup { enable = true, update_cwd = true, }, + view = { + allow_resize = true, + side = 'left', + width = '25', + mappings = { + list = { + { key = { "", "o", "<2-LeftMouse>" }, cb = tree_cb "edit" }, + { key = { "<2-RightMouse>", "" }, cb = tree_cb "cd" }, + { key = "", cb = tree_cb "vsplit" }, + { key = "", cb = tree_cb "split" }, + { key = "", cb = tree_cb "tabnew" }, + { key = "<", cb = tree_cb "prev_sibling" }, + { key = ">", cb = tree_cb "next_sibling" }, + { key = "P", cb = tree_cb "parent_node" }, + { key = "", cb = tree_cb "close_node" }, + { key = "", cb = tree_cb "close_node" }, + { key = "", cb = tree_cb "preview" }, + { key = "K", cb = tree_cb "first_sibling" }, + { key = "J", cb = tree_cb "last_sibling" }, + { key = "I", cb = tree_cb "toggle_ignored" }, + { key = "H", cb = tree_cb "toggle_dotfiles" }, + { key = "R", cb = tree_cb "refresh" }, + { key = "a", cb = tree_cb "create" }, + { key = "d", cb = tree_cb "remove" }, + { key = "r", cb = tree_cb "rename" }, + { key = "", cb = tree_cb "full_rename" }, + { key = "x", cb = tree_cb "cut" }, + { key = "c", cb = tree_cb "copy" }, + { key = "p", cb = tree_cb "paste" }, + { key = "y", cb = tree_cb "copy_name" }, + { key = "Y", cb = tree_cb "copy_path" }, + { key = "gy", cb = tree_cb "copy_absolute_path" }, + { key = "[c", cb = tree_cb "prev_git_item" }, + { key = "}c", cb = tree_cb "next_git_item" }, + { key = "-", cb = tree_cb "dir_up" }, + { key = "q", cb = tree_cb "close" }, + { key = "g?", cb = tree_cb "toggle_help" }, + }, + }, + }, } + + + + From 962c2bfe690828d6b53b208da8642b7be1938f6b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 26 Sep 2021 18:08:47 +0000 Subject: [PATCH 0778/1541] chore: format source code --- lua/plugins/configs/nvimtree.lua | 86 +++++++++++++++----------------- 1 file changed, 40 insertions(+), 46 deletions(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index ab77965..c4d4a3d 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -19,7 +19,7 @@ g.nvim_tree_indent_markers = 1 g.nvim_tree_ignore = { ".git", "node_modules", ".cache" } g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" } --- +-- g.nvim_tree_show_icons = { folders = 1, -- folder_arrows= 1 @@ -52,8 +52,6 @@ g.nvim_tree_icons = { }, } - - require("nvim-tree").setup { lsp_diagnostics = false, disable_netrw = true, @@ -67,48 +65,44 @@ require("nvim-tree").setup { enable = true, update_cwd = true, }, - view = { - allow_resize = true, - side = 'left', - width = '25', - mappings = { - list = { - { key = { "", "o", "<2-LeftMouse>" }, cb = tree_cb "edit" }, - { key = { "<2-RightMouse>", "" }, cb = tree_cb "cd" }, - { key = "", cb = tree_cb "vsplit" }, - { key = "", cb = tree_cb "split" }, - { key = "", cb = tree_cb "tabnew" }, - { key = "<", cb = tree_cb "prev_sibling" }, - { key = ">", cb = tree_cb "next_sibling" }, - { key = "P", cb = tree_cb "parent_node" }, - { key = "", cb = tree_cb "close_node" }, - { key = "", cb = tree_cb "close_node" }, - { key = "", cb = tree_cb "preview" }, - { key = "K", cb = tree_cb "first_sibling" }, - { key = "J", cb = tree_cb "last_sibling" }, - { key = "I", cb = tree_cb "toggle_ignored" }, - { key = "H", cb = tree_cb "toggle_dotfiles" }, - { key = "R", cb = tree_cb "refresh" }, - { key = "a", cb = tree_cb "create" }, - { key = "d", cb = tree_cb "remove" }, - { key = "r", cb = tree_cb "rename" }, - { key = "", cb = tree_cb "full_rename" }, - { key = "x", cb = tree_cb "cut" }, - { key = "c", cb = tree_cb "copy" }, - { key = "p", cb = tree_cb "paste" }, - { key = "y", cb = tree_cb "copy_name" }, - { key = "Y", cb = tree_cb "copy_path" }, - { key = "gy", cb = tree_cb "copy_absolute_path" }, - { key = "[c", cb = tree_cb "prev_git_item" }, - { key = "}c", cb = tree_cb "next_git_item" }, - { key = "-", cb = tree_cb "dir_up" }, - { key = "q", cb = tree_cb "close" }, - { key = "g?", cb = tree_cb "toggle_help" }, + view = { + allow_resize = true, + side = "left", + width = "25", + mappings = { + list = { + { key = { "", "o", "<2-LeftMouse>" }, cb = tree_cb "edit" }, + { key = { "<2-RightMouse>", "" }, cb = tree_cb "cd" }, + { key = "", cb = tree_cb "vsplit" }, + { key = "", cb = tree_cb "split" }, + { key = "", cb = tree_cb "tabnew" }, + { key = "<", cb = tree_cb "prev_sibling" }, + { key = ">", cb = tree_cb "next_sibling" }, + { key = "P", cb = tree_cb "parent_node" }, + { key = "", cb = tree_cb "close_node" }, + { key = "", cb = tree_cb "close_node" }, + { key = "", cb = tree_cb "preview" }, + { key = "K", cb = tree_cb "first_sibling" }, + { key = "J", cb = tree_cb "last_sibling" }, + { key = "I", cb = tree_cb "toggle_ignored" }, + { key = "H", cb = tree_cb "toggle_dotfiles" }, + { key = "R", cb = tree_cb "refresh" }, + { key = "a", cb = tree_cb "create" }, + { key = "d", cb = tree_cb "remove" }, + { key = "r", cb = tree_cb "rename" }, + { key = "", cb = tree_cb "full_rename" }, + { key = "x", cb = tree_cb "cut" }, + { key = "c", cb = tree_cb "copy" }, + { key = "p", cb = tree_cb "paste" }, + { key = "y", cb = tree_cb "copy_name" }, + { key = "Y", cb = tree_cb "copy_path" }, + { key = "gy", cb = tree_cb "copy_absolute_path" }, + { key = "[c", cb = tree_cb "prev_git_item" }, + { key = "}c", cb = tree_cb "next_git_item" }, + { key = "-", cb = tree_cb "dir_up" }, + { key = "q", cb = tree_cb "close" }, + { key = "g?", cb = tree_cb "toggle_help" }, + }, }, - }, - }, + }, } - - - - From 548e4e4a9db356f80634641cd33fb13670585729 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 27 Sep 2021 11:19:08 +0530 Subject: [PATCH 0779/1541] fix : typo of nvimtree size --- lua/plugins/configs/nvimtree.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index c4d4a3d..551dcc9 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -68,7 +68,7 @@ require("nvim-tree").setup { view = { allow_resize = true, side = "left", - width = "25", + width = 25, mappings = { list = { { key = { "", "o", "<2-LeftMouse>" }, cb = tree_cb "edit" }, From f2a0051aa9c0556d9e7cbd5bc287df3aa4e18bea Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 27 Sep 2021 12:07:32 +0530 Subject: [PATCH 0780/1541] fix : clean nvim-tree config --- lua/plugins/configs/nvimtree.lua | 40 ++------------------------------ 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 551dcc9..f457def 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -1,11 +1,10 @@ -local present, tree_c = pcall(require, "nvim-tree.config") +local present, nvimtree = pcall(require, "nvim-tree") local git_status = require("core.utils").load_config().plugins.options.nvimtree.enable_git if not present then return end -local tree_cb = tree_c.nvim_tree_callback local g = vim.g vim.o.termguicolors = true @@ -52,7 +51,7 @@ g.nvim_tree_icons = { }, } -require("nvim-tree").setup { +nvimtree.setup { lsp_diagnostics = false, disable_netrw = true, hijack_netrw = true, @@ -69,40 +68,5 @@ require("nvim-tree").setup { allow_resize = true, side = "left", width = 25, - mappings = { - list = { - { key = { "", "o", "<2-LeftMouse>" }, cb = tree_cb "edit" }, - { key = { "<2-RightMouse>", "" }, cb = tree_cb "cd" }, - { key = "", cb = tree_cb "vsplit" }, - { key = "", cb = tree_cb "split" }, - { key = "", cb = tree_cb "tabnew" }, - { key = "<", cb = tree_cb "prev_sibling" }, - { key = ">", cb = tree_cb "next_sibling" }, - { key = "P", cb = tree_cb "parent_node" }, - { key = "", cb = tree_cb "close_node" }, - { key = "", cb = tree_cb "close_node" }, - { key = "", cb = tree_cb "preview" }, - { key = "K", cb = tree_cb "first_sibling" }, - { key = "J", cb = tree_cb "last_sibling" }, - { key = "I", cb = tree_cb "toggle_ignored" }, - { key = "H", cb = tree_cb "toggle_dotfiles" }, - { key = "R", cb = tree_cb "refresh" }, - { key = "a", cb = tree_cb "create" }, - { key = "d", cb = tree_cb "remove" }, - { key = "r", cb = tree_cb "rename" }, - { key = "", cb = tree_cb "full_rename" }, - { key = "x", cb = tree_cb "cut" }, - { key = "c", cb = tree_cb "copy" }, - { key = "p", cb = tree_cb "paste" }, - { key = "y", cb = tree_cb "copy_name" }, - { key = "Y", cb = tree_cb "copy_path" }, - { key = "gy", cb = tree_cb "copy_absolute_path" }, - { key = "[c", cb = tree_cb "prev_git_item" }, - { key = "}c", cb = tree_cb "next_git_item" }, - { key = "-", cb = tree_cb "dir_up" }, - { key = "q", cb = tree_cb "close" }, - { key = "g?", cb = tree_cb "toggle_help" }, - }, - }, }, } From 94b01be48331af1e00f41bf46bbbb53427b4c371 Mon Sep 17 00:00:00 2001 From: Galen Rowell Date: Mon, 27 Sep 2021 18:01:03 +1000 Subject: [PATCH 0781/1541] fix: `default_config` var `plugin` -> `plugins` instead --- lua/core/default_config.lua | 4 ++-- lua/core/utils.lua | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 052ead7..2e4e860 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -2,7 +2,7 @@ -- use custom/chadrc.lua instead local M = {} -M.options, M.ui, M.mappings, M.plugin = {}, {}, {}, {} +M.options, M.ui, M.mappings, M.plugins = {}, {}, {}, {} -- non plugin normal, available without any plugins M.options = { @@ -99,7 +99,7 @@ M.plugins = { style = "default", }, autosave = false, -- autosave on changed text or insert mode leave - -- timeout to be used for using escape with a key combination, see mappings.plugin.better_escape + -- timeout to be used for using escape with a key combination, see mappings.plugins.better_escape esc_insertmode_timeout = 300, }, default_plugin_config_replace = {}, diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 92928be..188f6a1 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -147,7 +147,7 @@ M.load_config = function(reload) -- these are the table value which will be always prioritiezed to take user config value local to_replace = { - "['mappings']['plugin']['esc_insertmode']", + "['mappings']['plugins']['esc_insertmode']", "['mappings']['terminal']['esc_termmode']", "['mappings']['terminal']['esc_hide_termmode']", } @@ -243,7 +243,7 @@ end -- 1st arg - base table -- 2nd arg - table to merge -- 3rg arg - list of nodes as a table, if the node is found replace the from table2 to result, rather than adding the value --- e.g: merge_table(t1, t2, { ['plugin']['truezen']['mappings'] }) +-- e.g: merge_table(t1, t2, { ['mappings']['plugins']['bufferline'] }) M.merge_table = function(into, from, nodes_to_replace) -- make sure both are table if type(into) ~= "table" or type(from) ~= "table" then @@ -272,7 +272,7 @@ end]] end for _, node in ipairs(nodes_to_replace) do - -- pcall() is a poor workaround for if "['mappings']['plugin']['esc_insertmode']" 'plugin' sub-table does not exist + -- pcall() is a poor workaround for if "['mappings']['plugins']['esc_insertmode']" 'plugins' sub-table does not exist local ok, result = pcall(replace_fn, node) if ok then -- if the node is found then replace From dc80ae5795ed701ebbbffeaeddadafcb46dae850 Mon Sep 17 00:00:00 2001 From: Jeevan Shah Date: Mon, 27 Sep 2021 09:01:45 -0400 Subject: [PATCH 0782/1541] chore: Dev pr template (#495) * chore: add pr templates * Move title formatting and make speed optional --- .github/CONTRIBUTING.md | 4 ++++ .github/PULL_REQUEST_TEMPLATE/feature.md | 14 ++++++++++++++ .github/PULL_REQUEST_TEMPLATE/plugin.md | 16 ++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE/feature.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/plugin.md diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 8ba70be..a70fc6a 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -37,6 +37,10 @@ If you wish to contribute to NvChad, you should: - When making a PR (pull request), please be very descriptive about what you've done! +- PR titles should be formatted with 'fix', 'chore' or 'feat'. ex: `feat: add new plugin` + +- PRs should follow the pull request formats where applicable + - We are open to all PRs, but may decline some for a myriad of reasons. Though don't be discouraged! We'll still be open to discussions. - PR's are always welcomed however NvChad aims to be less bloated. So PR's regarding existing plugin's enhancement and creating new features with existing plugins itself ( without adding a new plugin), bug fixes and corrections are more encouraged. diff --git a/.github/PULL_REQUEST_TEMPLATE/feature.md b/.github/PULL_REQUEST_TEMPLATE/feature.md new file mode 100644 index 0000000..a622846 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/feature.md @@ -0,0 +1,14 @@ + +Fixes Issue # (If it doesn't fix an issue then delete this line) + +Features Added: +- Plugin Name (Add links if possible too) + +Reasoning: +List why the feature is needed + +Speed (If applicable): +Show the impact on the speed of nvChad + +Other: +Anything else relevant goes here diff --git a/.github/PULL_REQUEST_TEMPLATE/plugin.md b/.github/PULL_REQUEST_TEMPLATE/plugin.md new file mode 100644 index 0000000..28ae8d3 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/plugin.md @@ -0,0 +1,16 @@ +(Make sure your title is either: 'fix', 'chore', or 'feat' then your title. ex: `fix: add new plugin`) + +Fixes Issue # (If it doesn't fix an issue then delete this line) + +Plugins Added: +- [Plugin Name](Plugin Link) +- [Plugin Name](Plugin Link) + +Reasoning: +List why the plugin(s) should be added + +Speed: +Show the impact on the speed of nvChad + +Other: +Anything else relevant goes here From 8726de1faa9cc121b35876744ca2d01eeb0f06d7 Mon Sep 17 00:00:00 2001 From: Ashin Antony <83629316+ashincoder@users.noreply.github.com> Date: Tue, 28 Sep 2021 14:53:26 +0530 Subject: [PATCH 0783/1541] chore: Clean init.lua Why do we have a table to require a single module. We had this when we had plugins, colors etc. But we only have one module now. So why bother a list and looping through for a single module ? --- init.lua | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/init.lua b/init.lua index 08b4f10..ada52a5 100644 --- a/init.lua +++ b/init.lua @@ -1,10 +1,4 @@ -local init_modules = { - "core", -} - -for _, module in ipairs(init_modules) do - local ok, err = pcall(require, module) - if not ok then - error("Error loading " .. module .. "\n\n" .. err) - end +local ok, err = pcall(require, "core") +if not ok then + error("Error loading " .. module .. "\n\n" .. err) end From 7cab4295ee1f9b104b726ae8536c004cefb7d304 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 28 Sep 2021 09:23:43 +0000 Subject: [PATCH 0784/1541] chore: format source code --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index ada52a5..40d400b 100644 --- a/init.lua +++ b/init.lua @@ -1,4 +1,4 @@ local ok, err = pcall(require, "core") if not ok then - error("Error loading " .. module .. "\n\n" .. err) + error("Error loading " .. module .. "\n\n" .. err) end From 92a9e13e7c30b5e6cf39cb6b18fedc8da6428a98 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 28 Sep 2021 15:10:52 +0530 Subject: [PATCH 0785/1541] Update init.lua --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index 40d400b..bafa624 100644 --- a/init.lua +++ b/init.lua @@ -1,4 +1,5 @@ local ok, err = pcall(require, "core") + if not ok then error("Error loading " .. module .. "\n\n" .. err) end From 3d7f0159f540bf1e06e3c82c5b81240b23fdf933 Mon Sep 17 00:00:00 2001 From: Ashin Antony <83629316+ashincoder@users.noreply.github.com> Date: Wed, 29 Sep 2021 06:34:32 +0530 Subject: [PATCH 0786/1541] fix: Fixes telescope issue where requiring telescope module this fixes the following issue https://github.com/nvim-telescope/telescope.nvim/issues/1276 --- lua/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 62789a1..e0d93a8 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -266,6 +266,7 @@ return packer.startup(function() use { "nvim-telescope/telescope.nvim", + module = "telescope", cmd = "Telescope", requires = { { From 5bf92c524689642f839ec99b7253f06a7ffdd56c Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 29 Sep 2021 15:17:41 +0530 Subject: [PATCH 0787/1541] chore : dont gitignore custom dir contents --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index 291d121..8cb205e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1 @@ plugin -lua/custom/* -!lua/custom/example_init.lua -!lua/custom/example_chadrc.lua From e137fddf6eaeb9ea2202e3eeac16230a1cdb8701 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 29 Sep 2021 18:16:43 +0530 Subject: [PATCH 0788/1541] add : cmp-path plugin --- lua/plugins/configs/cmp.lua | 1 + lua/plugins/init.lua | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 6c1b7f3..7461d78 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -66,5 +66,6 @@ cmp.setup { { name = "luasnip" }, { name = "buffer" }, { name = "nvim_lua" }, + { name = "path" }, }, } diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e0d93a8..4c35c3b 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -217,6 +217,11 @@ return packer.startup(function() after = "cmp-nvim-lsp", } + use { + "hrsh7th/cmp-path", + disable = not plugin_status.cmp, + after = "cmp-buffer", + } -- misc plugins use { "windwp/nvim-autopairs", From 5db8d84515bd77ddc8bc7e4c01add21536c5e018 Mon Sep 17 00:00:00 2001 From: Ashin Antony <83629316+ashincoder@users.noreply.github.com> Date: Wed, 29 Sep 2021 22:02:19 +0530 Subject: [PATCH 0789/1541] Update init.lua --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index bafa624..6ea9843 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,5 @@ local ok, err = pcall(require, "core") if not ok then - error("Error loading " .. module .. "\n\n" .. err) + error("Error loading core" .. "\n\n" .. err) end From 0b55d4584559de61a715ec78af940e44481b71b5 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 29 Sep 2021 22:34:22 +0530 Subject: [PATCH 0790/1541] rm neoformat plugin --- lua/core/default_config.lua | 5 ----- lua/core/mappings.lua | 4 ---- lua/plugins/configs/lspconfig.lua | 2 +- lua/plugins/init.lua | 10 ---------- 4 files changed, 1 insertion(+), 20 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 2e4e860..3ef78c0 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -68,7 +68,6 @@ M.plugins = { feline = true, -- statusline gitsigns = true, -- gitsigns in statusline lspsignature = true, -- lsp enhancements - neoformat = true, -- universal code formatter neoscroll = false, -- smooth scroll telescope_media = false, -- media previews within telescope finders truezen = false, -- distraction free & minimalist UI mode @@ -179,10 +178,6 @@ M.mappings.plugins = { toggle = "", focus = "e", }, - -- universal code formatter - neoformat = { - format = "fm", - }, -- multitool for finding & picking things telescope = { buffers = "fb", diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 4d9d157..c2300cf 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -149,10 +149,6 @@ M.nvimtree = function() map("n", plugin_maps.nvimtree.focus, ":NvimTreeFocus ") end -M.neoformat = function() - map("n", plugin_maps.neoformat.format, ":Neoformat ") -end - M.telescope = function() local m = plugin_maps.telescope diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 145600c..f704b9f 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -36,7 +36,7 @@ local function on_attach(_, bufnr) buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) - buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) + buf_set_keymap("n", "fm", "lua vim.lsp.buf.formatting()", opts) buf_set_keymap("v", "ca", "lua vim.lsp.buf.range_code_action()", opts) end diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 4c35c3b..2a326f5 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -239,16 +239,6 @@ return packer.startup(function() end, } - use { - "sbdchd/neoformat", - disable = not plugin_status.neoformat, - cmd = "Neoformat", - setup = function() - require("core.mappings").neoformat() - end, - } - - -- use "alvan/vim-closetag" -- for html autoclosing tag use { "terrortylor/nvim-comment", disable = not plugin_status.comment, From 1756c9260987741adc221bc8e6a8e857ca2cd64e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 30 Sep 2021 09:51:00 +0530 Subject: [PATCH 0791/1541] refactor : separate lspconfig setups --- lua/core/default_config.lua | 4 +-- lua/plugins/configs/lspconfig.lua | 23 ++++++--------- lua/plugins/configs/nvimtree.lua | 2 +- lua/plugins/init.lua | 48 +++++++++++++++---------------- 4 files changed, 35 insertions(+), 42 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 3ef78c0..92f47b0 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -57,7 +57,7 @@ M.ui = { -- these are plugin related options M.plugins = { -- enable and disable plugins (false for disable) - plugin_status = { + status = { autosave = false, -- to autosave files blankline = true, -- show code scope with symbols bufferline = true, -- list open buffers up the top, easy switching too @@ -76,7 +76,7 @@ M.plugins = { }, options = { lspconfig = { - servers = {}, -- eg: "html" + setup_lspconf = "", -- path of file containing setups of different lsps }, nvimtree = { enable_git = 0, diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index f704b9f..1d463e9 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -57,21 +57,6 @@ capabilities.textDocument.completion.completionItem.resolveSupport = { }, } -local servers = require("core.utils").load_config().plugins.options.lspconfig.servers - -for _, lsp in ipairs(servers) do - nvim_lsp[lsp].setup { - on_attach = on_attach, - capabilities = capabilities, - -- root_dir = vim.loop.cwd, - flags = { - debounce_text_changes = 150, - }, - } -end - --- require("anyfile").setup_luaLsp(on_attach, capabilities) -- this will be removed soon after the custom hooks PR - -- replace the default lsp diagnostic symbols local function lspSymbol(name, icon) vim.fn.sign_define("LspDiagnosticsSign" .. name, { text = icon, numhl = "LspDiagnosticsDefault" .. name }) @@ -113,3 +98,11 @@ vim.notify = function(msg, log_level, _opts) vim.api.nvim_echo({ { msg } }, true, {}) end end + +-- requires a file containing user's lspconfigs + +local addlsp_confs = require("core.utils").load_config().plugins.options.lspconfig.setup_lspconf + +if string.len(addlsp_confs) ~= 0 then + require(addlsp_confs).setup_lsp(on_attach, capabilities) +end diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index f457def..25eeb26 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -11,7 +11,7 @@ vim.o.termguicolors = true g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names g.nvim_tree_git_hl = git_status -g.nvim_tree_gitignore = git_status +g.nvim_tree_gitignore = 0 g.nvim_tree_hide_dotfiles = 0 g.nvim_tree_highlight_opened_files = 0 g.nvim_tree_indent_markers = 1 diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 2a326f5..04fc7d6 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -7,7 +7,7 @@ end local use = packer.use return packer.startup(function() - local plugin_status = require("core.utils").load_config().plugins.plugin_status + local status = require("core.utils").load_config().plugins.status -- FUNCTION: override_req, use `chadrc` plugin config override if present -- name = name inside `default_config` / `chadrc` @@ -64,14 +64,14 @@ return packer.startup(function() use { "famiu/feline.nvim", - disable = not plugin_status.feline, + disable = not status.feline, after = "nvim-web-devicons", config = override_req("feline", "plugins.configs.statusline"), } use { "akinsho/bufferline.nvim", - disable = not plugin_status.bufferline, + disable = not status.bufferline, after = "nvim-web-devicons", config = override_req("bufferline", "plugins.configs.bufferline"), setup = function() @@ -81,14 +81,14 @@ return packer.startup(function() use { "lukas-reineke/indent-blankline.nvim", - disable = not plugin_status.blankline, + disable = not status.blankline, event = "BufRead", config = override_req("indent_blankline", "(plugins.configs.others).blankline()"), } use { "norcalli/nvim-colorizer.lua", - disable = not plugin_status.colorizer, + disable = not status.colorizer, event = "BufRead", config = override_req("nvim_colorizer", "(plugins.configs.others).colorizer()"), } @@ -103,7 +103,7 @@ return packer.startup(function() -- git stuff use { "lewis6991/gitsigns.nvim", - disable = not plugin_status.gitsigns, + disable = not status.gitsigns, opt = true, config = override_req("gitsigns", "plugins.configs.gitsigns"), setup = function() @@ -114,7 +114,7 @@ return packer.startup(function() -- smooth scroll use { "karb94/neoscroll.nvim", - disable = not plugin_status.neoscroll, + disable = not status.neoscroll, opt = true, config = override_req("neoscroll", "(plugins.configs.others).neoscroll()"), setup = function() @@ -139,14 +139,14 @@ return packer.startup(function() use { "ray-x/lsp_signature.nvim", - disable = not plugin_status.lspsignature, + disable = not status.lspsignature, after = "nvim-lspconfig", config = override_req("signature", "(plugins.configs.others).signature()"), } use { "andymass/vim-matchup", - disable = not plugin_status.vim_matchup, + disable = not status.vim_matchup, opt = true, setup = function() require("core.utils").packer_lazy_load "vim-matchup" @@ -155,7 +155,7 @@ return packer.startup(function() -- load autosave only if its globally enabled use { - disable = not plugin_status.autosave, + disable = not status.autosave, "Pocco81/AutoSave.nvim", config = override_req("autosave", "(plugins.configs.others).autosave()"), cond = function() @@ -165,7 +165,7 @@ return packer.startup(function() use { "max397574/better-escape.nvim", - disable = not plugin_status.esc_insertmode, + disable = not status.esc_insertmode, event = "InsertEnter", config = override_req("better_escape", "(plugins.configs.others).better_escape()"), } @@ -174,20 +174,20 @@ return packer.startup(function() use { "rafamadriz/friendly-snippets", - disable = not plugin_status.cmp, + disable = not status.cmp, event = "InsertEnter", } use { "hrsh7th/nvim-cmp", - disable = not plugin_status.cmp, + disable = not status.cmp, after = "friendly-snippets", config = override_req("nvim_cmp", "plugins.configs.cmp"), } use { "L3MON4D3/LuaSnip", - disable = not plugin_status.cmp, + disable = not status.cmp, wants = "friendly-snippets", after = "nvim-cmp", config = override_req("luasnip", "(plugins.configs.others).luasnip()"), @@ -195,44 +195,44 @@ return packer.startup(function() use { "saadparwaiz1/cmp_luasnip", - disable = not plugin_status.cmp, + disable = not status.cmp, after = "LuaSnip", } use { "hrsh7th/cmp-nvim-lua", - disable = not plugin_status.cmp, + disable = not status.cmp, after = "cmp_luasnip", } use { "hrsh7th/cmp-nvim-lsp", - disable = not plugin_status.cmp, + disable = not status.cmp, after = "cmp-nvim-lua", } use { "hrsh7th/cmp-buffer", - disable = not plugin_status.cmp, + disable = not status.cmp, after = "cmp-nvim-lsp", } use { "hrsh7th/cmp-path", - disable = not plugin_status.cmp, + disable = not status.cmp, after = "cmp-buffer", } -- misc plugins use { "windwp/nvim-autopairs", - disable = not plugin_status.cmp, + disable = not status.cmp, after = "nvim-cmp", config = override_req("nvim_autopairs", "(plugins.configs.others).autopairs()"), } use { "glepnir/dashboard-nvim", - disable = not plugin_status.dashboard, + disable = not status.dashboard, config = override_req("dashboard", "plugins.configs.dashboard"), setup = function() require("core.mappings").dashboard() @@ -241,7 +241,7 @@ return packer.startup(function() use { "terrortylor/nvim-comment", - disable = not plugin_status.comment, + disable = not status.comment, cmd = "CommentToggle", config = override_req("nvim_comment", "(plugins.configs.others).comment()"), setup = function() @@ -270,7 +270,7 @@ return packer.startup(function() }, { "nvim-telescope/telescope-media-files.nvim", - disable = not plugin_status.telescope_media, + disable = not status.telescope_media, setup = function() require("core.mappings").telescope_media() end, @@ -284,7 +284,7 @@ return packer.startup(function() use { "Pocco81/TrueZen.nvim", - disable = not plugin_status.truezen, + disable = not status.truezen, cmd = { "TZAtaraxis", "TZMinimalist", From bcb4b15669cf9143ec6c3fef3847155bb06646b5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 30 Sep 2021 04:23:09 +0000 Subject: [PATCH 0792/1541] chore: format source code --- lua/plugins/configs/lspconfig.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 1d463e9..d2b7f1e 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -100,9 +100,9 @@ vim.notify = function(msg, log_level, _opts) end -- requires a file containing user's lspconfigs - + local addlsp_confs = require("core.utils").load_config().plugins.options.lspconfig.setup_lspconf if string.len(addlsp_confs) ~= 0 then - require(addlsp_confs).setup_lsp(on_attach, capabilities) + require(addlsp_confs).setup_lsp(on_attach, capabilities) end From 1c9b5b46e4258d0d9b3c07963823351ecff69715 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 1 Oct 2021 05:14:02 +0530 Subject: [PATCH 0793/1541] rm : outdated lspconfig in example_chadrc --- lua/custom/example_chadrc.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/custom/example_chadrc.lua b/lua/custom/example_chadrc.lua index 24bff0d..a3b3e96 100644 --- a/lua/custom/example_chadrc.lua +++ b/lua/custom/example_chadrc.lua @@ -22,10 +22,10 @@ M.options, M.ui, M.mappings, M.plugins = {}, {}, {}, {} -- NvChad included plugin options & overrides M.plugins = { options = { - -- lspconfig = { - -- -- servers = {"html", "cssls"} - -- servers = {}, - -- }, + -- lspconfig = { + -- path of file containing setups of different lsps (ex : "custom.plugins.lspconfig"), read the docs for more info + -- setup_lspconf = "", + -- }, }, -- To change the Packer `config` of a plugin that comes with NvChad, -- add a table entry below matching the plugin github name From 9a2430132f1161ef88751a2d6f74fe8746d5ad98 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 1 Oct 2021 17:15:23 +0530 Subject: [PATCH 0794/1541] fix : packer blank window on PackerSync --- lua/plugins/init.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 04fc7d6..e10f331 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -129,10 +129,6 @@ return packer.startup(function() opt = true, setup = function() require("core.utils").packer_lazy_load "nvim-lspconfig" - -- reload the current file so lsp actually starts for it - vim.defer_fn(function() - vim.cmd "silent! e %" - end, 0) end, config = override_req("lspconfig", "plugins.configs.lspconfig"), } From cd9b2c481096086c715c95f092778c2d7d4fa8d7 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 1 Oct 2021 19:34:18 +0530 Subject: [PATCH 0795/1541] Revert "fix : packer blank window on PackerSync" This reverts commit 9a2430132f1161ef88751a2d6f74fe8746d5ad98. --- lua/plugins/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e10f331..04fc7d6 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -129,6 +129,10 @@ return packer.startup(function() opt = true, setup = function() require("core.utils").packer_lazy_load "nvim-lspconfig" + -- reload the current file so lsp actually starts for it + vim.defer_fn(function() + vim.cmd "silent! e %" + end, 0) end, config = override_req("lspconfig", "plugins.configs.lspconfig"), } From bd1319895d05ec13bea4399f2b284f312dac2b11 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 2 Oct 2021 07:52:46 +0530 Subject: [PATCH 0796/1541] rm : unused function in bufferline config --- lua/plugins/configs/bufferline.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index fe19be7..cda1a7a 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -5,9 +5,6 @@ if not present then return end --- function executed for top right close button in bufferline -vim.cmd "function! NvChad_bufferline_quitvim(a,b,c,d) \n qa \n endfunction" - bufferline.setup { options = { offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, From ba3af27de036d55e1667cf7909d6dc32c09df66d Mon Sep 17 00:00:00 2001 From: Nathan Wallace Date: Fri, 1 Oct 2021 21:50:17 -0500 Subject: [PATCH 0797/1541] add config option to disable nvimtree --- lua/core/default_config.lua | 3 ++- lua/plugins/init.lua | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 92f47b0..1425bf3 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -57,7 +57,7 @@ M.ui = { -- these are plugin related options M.plugins = { -- enable and disable plugins (false for disable) - status = { + status = { autosave = false, -- to autosave files blankline = true, -- show code scope with symbols bufferline = true, -- list open buffers up the top, easy switching too @@ -73,6 +73,7 @@ M.plugins = { truezen = false, -- distraction free & minimalist UI mode vim_matchup = true, -- % operator enhancements cmp = true, + nvimtree = true, }, options = { lspconfig = { diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 04fc7d6..2183750 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -252,6 +252,7 @@ return packer.startup(function() -- file managing , picker etc use { "kyazdani42/nvim-tree.lua", + disable = not status.nvimtree, cmd = { "NvimTreeToggle", "NvimTreeFocus" }, config = override_req("nvim_tree", "plugins.configs.nvimtree"), setup = function() From a1c234e001a44c9393be16a96b2303bd6af06883 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 2 Oct 2021 10:41:50 +0530 Subject: [PATCH 0798/1541] clean : debloat config | rm un-needed plugins --- lua/core/default_config.lua | 11 ----- lua/core/mappings.lua | 8 ---- lua/plugins/configs/lspconfig.lua | 5 --- lua/plugins/configs/others.lua | 28 ------------- lua/plugins/configs/zenmode.lua | 67 ------------------------------- lua/plugins/init.lua | 35 ---------------- 6 files changed, 154 deletions(-) delete mode 100644 lua/plugins/configs/zenmode.lua diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 1425bf3..ef6ee25 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -58,7 +58,6 @@ M.ui = { M.plugins = { -- enable and disable plugins (false for disable) status = { - autosave = false, -- to autosave files blankline = true, -- show code scope with symbols bufferline = true, -- list open buffers up the top, easy switching too colorizer = false, -- color RGB, HEX, CSS, NAME color codes @@ -68,9 +67,7 @@ M.plugins = { feline = true, -- statusline gitsigns = true, -- gitsigns in statusline lspsignature = true, -- lsp enhancements - neoscroll = false, -- smooth scroll telescope_media = false, -- media previews within telescope finders - truezen = false, -- distraction free & minimalist UI mode vim_matchup = true, -- % operator enhancements cmp = true, nvimtree = true, @@ -98,8 +95,6 @@ M.plugins = { -- default, round , slant , block , arrow style = "default", }, - autosave = false, -- autosave on changed text or insert mode leave - -- timeout to be used for using escape with a key combination, see mappings.plugins.better_escape esc_insertmode_timeout = 300, }, default_plugin_config_replace = {}, @@ -195,12 +190,6 @@ M.mappings.plugins = { media_files = "fp", }, }, - -- distraction free & minimalist UI mode - truezen = { - ataraxis_mode = "zz", -- center - focus_mode = "zf", - minimalistic_mode = "zm", -- as it is - }, } return M diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index c2300cf..f15a487 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -169,12 +169,4 @@ M.telescope_media = function() map("n", m.media_files, ":Telescope media_files ") end -M.truezen = function() - local m = plugin_maps.truezen - - map("n", m.ataraxis_mode, ":TZAtaraxis ") - map("n", m.focus_mode, ":TZFocus ") - map("n", m.minimalistic_mode, ":TZMinimalist ") -end - return M diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index d2b7f1e..02688f7 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,10 +1,5 @@ -local present1, nvim_lsp = pcall(require, "lspconfig") local overrides = require("core.hooks").createOverrides "lsp" -if not present1 then - return -end - local function on_attach(_, bufnr) local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 2d1576c..b4c6d12 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -16,28 +16,6 @@ M.autopairs = function() } end -M.autosave = function() - -- autosave.nvim plugin is disabled by default - local present, autosave = pcall(require, "autosave") - if not present then - return - end - - autosave.setup { - enabled = chadrc_config.plugins.options.autosave, -- takes boolean value from init.lua - execution_message = "autosaved at : " .. vim.fn.strftime "%H:%M:%S", - events = { "InsertLeave", "TextChanged" }, - conditions = { - exists = true, - filetype_is_not = {}, - modifiable = true, - }, - clean_command_line_interval = 2500, - on_off_commands = true, - write_all_buffers = false, - } -end - M.better_escape = function() require("better_escape").setup { mapping = chadrc_config.mappings.plugins.better_escape.esc_insertmode, @@ -104,12 +82,6 @@ M.luasnip = function() require("luasnip/loaders/from_vscode").load { path = { chadrc_config.plugins.options.luasnip.snippet_path } } end -M.neoscroll = function() - pcall(function() - require("neoscroll").setup() - end) -end - M.signature = function() local present, lspsignature = pcall(require, "lsp_signature") if present then diff --git a/lua/plugins/configs/zenmode.lua b/lua/plugins/configs/zenmode.lua deleted file mode 100644 index f51439a..0000000 --- a/lua/plugins/configs/zenmode.lua +++ /dev/null @@ -1,67 +0,0 @@ -local present, true_zen = pcall(require, "true-zen") -if not present then - return -end - -true_zen.setup { - ui = { - bottom = { - cmdheight = 1, - laststatus = 0, - ruler = false, - showmode = false, - showcmd = false, - }, - top = { - showtabline = 0, - }, - left = { - number = false, - relativenumber = false, - signcolumn = "no", - }, - }, - modes = { - ataraxis = { - left_padding = 32, - right_padding = 32, - top_padding = 1, - bottom_padding = 1, - ideal_writing_area_width = { 0 }, - auto_padding = true, - keep_default_fold_fillchars = true, - custome_bg = "", - bg_configuration = true, - affected_higroups = { - NonText = {}, - FoldColumn = {}, - ColorColumn = {}, - VertSplit = {}, - StatusLine = {}, - StatusLineNC = {}, - SignColumn = {}, - }, - }, - focus = { - margin_of_error = 5, - focus_method = "experimental", - }, - }, - integrations = { - vim_gitgutter = false, - tmux = false, - gitsigns = false, - nvim_bufferline = true, - limelight = false, - vim_airline = false, - vim_powerline = false, - vim_signify = false, - express_line = false, - lualine = false, - }, - misc = { - on_off_commands = false, - ui_elements_commands = false, - cursor_by_mode = false, - }, -} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 2183750..127a5ef 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -111,17 +111,6 @@ return packer.startup(function() end, } - -- smooth scroll - use { - "karb94/neoscroll.nvim", - disable = not status.neoscroll, - opt = true, - config = override_req("neoscroll", "(plugins.configs.others).neoscroll()"), - setup = function() - require("core.utils").packer_lazy_load "neoscroll.nvim" - end, - } - -- lsp stuff use { @@ -153,16 +142,6 @@ return packer.startup(function() end, } - -- load autosave only if its globally enabled - use { - disable = not status.autosave, - "Pocco81/AutoSave.nvim", - config = override_req("autosave", "(plugins.configs.others).autosave()"), - cond = function() - return require("core.utils").load_config().plugins.options.autosave == true - end, - } - use { "max397574/better-escape.nvim", disable = not status.esc_insertmode, @@ -283,19 +262,5 @@ return packer.startup(function() end, } - use { - "Pocco81/TrueZen.nvim", - disable = not status.truezen, - cmd = { - "TZAtaraxis", - "TZMinimalist", - "TZFocus", - }, - config = override_req("truezen", "plugins.configs.zenmode"), - setup = function() - require("core.mappings").truezen() - end, - } - require("core.hooks").run("install_plugins", use) end) From 317eedd9b277b4457fbdfc6314e2cee955531c24 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 2 Oct 2021 10:37:42 +0530 Subject: [PATCH 0799/1541] feat: Make short statusline toggleable from chadrc --- lua/core/default_config.lua | 2 ++ lua/plugins/configs/statusline.lua | 24 ++++++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index ef6ee25..681e78b 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -91,6 +91,8 @@ M.plugins = { "NvimTree", "terminal", }, + -- show short statusline on small screens + shortline = true, shown = {}, -- default, round , slant , block , arrow style = "default", diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 04fa185..1f7aa44 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -42,8 +42,12 @@ local icon_styles = { }, } -local user_statusline_style = require("core.utils").load_config().plugins.options.statusline.style +local config = require("core.utils").load_config().plugins.options.statusline +-- statusline style +local user_statusline_style = config.style local statusline_style = icon_styles[user_statusline_style] +-- if show short statusline on small screens +local shortline = config.shortline -- Initialize the components table local components = { @@ -81,7 +85,7 @@ components.active[1][2] = { end return " " .. icon .. " " .. filename .. " " end, - enabled = function(winid) + enabled = shortline and function(winid) return vim.api.nvim_win_get_width(winid) > 70 end, hl = { @@ -98,7 +102,7 @@ components.active[1][3] = { return "  " .. dir_name .. " " end, - enabled = function(winid) + enabled = shortline and function(winid) return vim.api.nvim_win_get_width(winid) > 80 end, @@ -209,7 +213,7 @@ components.active[2][1] = { end return "" end, - enabled = function(winid) + enabled = shortline and function(winid) return vim.api.nvim_win_get_width(winid) > 80 end, hl = { fg = colors.green }, @@ -223,7 +227,7 @@ components.active[3][1] = { return "" end end, - enabled = function(winid) + enabled = shortline and function(winid) return vim.api.nvim_win_get_width(winid) > 70 end, hl = { fg = colors.grey_fg2, bg = colors.statusline_bg }, @@ -231,7 +235,7 @@ components.active[3][1] = { components.active[3][2] = { provider = "git_branch", - enabled = function(winid) + enabled = shortline and function(winid) return vim.api.nvim_win_get_width(winid) > 70 end, hl = { @@ -308,7 +312,7 @@ components.active[3][6] = { components.active[3][7] = { provider = statusline_style.left, - enabled = function(winid) + enabled = shortline and function(winid) return vim.api.nvim_win_get_width(winid) > 90 end, hl = { @@ -319,7 +323,7 @@ components.active[3][7] = { components.active[3][8] = { provider = statusline_style.left, - enabled = function(winid) + enabled = shortline and function(winid) return vim.api.nvim_win_get_width(winid) > 90 end, hl = { @@ -330,7 +334,7 @@ components.active[3][8] = { components.active[3][9] = { provider = statusline_style.position_icon, - enabled = function(winid) + enabled = shortline and function(winid) return vim.api.nvim_win_get_width(winid) > 90 end, hl = { @@ -353,7 +357,7 @@ components.active[3][10] = { return " " .. result .. "%% " end, - enabled = function(winid) + enabled = shortline and function(winid) return vim.api.nvim_win_get_width(winid) > 90 end, From d810cc35a7026c4b3723665a2730f7f753f899ea Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 2 Oct 2021 10:45:50 +0530 Subject: [PATCH 0800/1541] chore: format files --- lua/core/custom.lua | 32 ++++++++-------- lua/core/hooks.lua | 91 ++++++++++++++++++++++----------------------- lua/core/init.lua | 4 +- lua/core/utils.lua | 2 +- 4 files changed, 64 insertions(+), 65 deletions(-) diff --git a/lua/core/custom.lua b/lua/core/custom.lua index 05a7329..c058061 100644 --- a/lua/core/custom.lua +++ b/lua/core/custom.lua @@ -1,22 +1,22 @@ local function isModuleAvailable(name) - if package.loaded[name] then - return true - else - for _, searcher in ipairs(package.searchers or package.loaders) do - local loader = searcher(name) - if type(loader) == 'function' then - package.preload[name] = loader - return true + if package.loaded[name] then + return true + else + for _, searcher in ipairs(package.searchers or package.loaders) do + local loader = searcher(name) + if type(loader) == "function" then + package.preload[name] = loader + return true + end end - end - return false - end + return false + end end -local loadIfExists = function (module) - if isModuleAvailable(module) then - require(module) - end +local loadIfExists = function(module) + if isModuleAvailable(module) then + require(module) + end end -loadIfExists('custom') +loadIfExists "custom" diff --git a/lua/core/hooks.lua b/lua/core/hooks.lua index 8c7f351..2602ff7 100644 --- a/lua/core/hooks.lua +++ b/lua/core/hooks.lua @@ -1,69 +1,68 @@ -local hooks, overrides, M = {}, {}, {}; +local hooks, overrides, M = {}, {}, {} local allowed_hooks = { - "install_plugins", - "setup_mappings", - "ready", + "install_plugins", + "setup_mappings", + "ready", } -local function has_value (tab, val) - for _, value in ipairs(tab) do - if value == val then - return true - end - end +local function has_value(tab, val) + for _, value in ipairs(tab) do + if value == val then + return true + end + end - return false + return false end M.add = function(name, fn) - if not(has_value(allowed_hooks, name)) then - error("Custom lua uses unallowed hook " .. name) - end - if hooks[name] == nil then - hooks[name] = {} - end - table.insert(hooks[name], fn); + if not (has_value(allowed_hooks, name)) then + error("Custom lua uses unallowed hook " .. name) + end + if hooks[name] == nil then + hooks[name] = {} + end + table.insert(hooks[name], fn) end M.run = function(name, args) - if hooks[name] == nil then - return; - end + if hooks[name] == nil then + return + end - for _, hook in pairs(hooks[name]) do - hook(args) - end + for _, hook in pairs(hooks[name]) do + hook(args) + end end M.createOverrides = function(module) - local O = {}; + local O = {} - O.get = function(name, default) - local current = default; - if overrides[module] and overrides[module][name] then - if type(overrides[module][name]) == "function" then - current = overrides[module][name] - elseif type(overrides[module][name]) == "table" then - for _, override in pairs(overrides[module][name]) do - current = override(current) + O.get = function(name, default) + local current = default + if overrides[module] and overrides[module][name] then + if type(overrides[module][name]) == "function" then + current = overrides[module][name] + elseif type(overrides[module][name]) == "table" then + for _, override in pairs(overrides[module][name]) do + current = override(current) + end end end - end - return current; - end + return current + end - return O; + return O end M.override = function(module, name, overwrite) - if overrides[module] == nil then - overrides[module] = {}; - end - if overrides[module][name] == nil then - overrides[module][name] = {}; - end - table.insert(overrides[module][name], overwrite) + if overrides[module] == nil then + overrides[module] = {} + end + if overrides[module][name] == nil then + overrides[module][name] = {} + end + table.insert(overrides[module][name], overwrite) end - -return M; +return M diff --git a/lua/core/init.lua b/lua/core/init.lua index 819bc51..dc1198c 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -5,7 +5,7 @@ local core_modules = { "core.mappings", } -local hooks = require('core.hooks'); +local hooks = require "core.hooks" for _, module in ipairs(core_modules) do local ok, err = pcall(require, module) @@ -17,4 +17,4 @@ end -- set all the non plugin mappings require("core.mappings").misc() -hooks.run("ready") +hooks.run "ready" diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 188f6a1..bab04fc 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -269,7 +269,7 @@ end]] local fn = base_fn:gsub("_node", node) -- return the function created from the string base_fn return loadstring(fn)()(table1, table2) - end + end for _, node in ipairs(nodes_to_replace) do -- pcall() is a poor workaround for if "['mappings']['plugins']['esc_insertmode']" 'plugins' sub-table does not exist From 585266dcefae246db3e5e1febc25dc749e762fd6 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 2 Oct 2021 10:59:23 +0530 Subject: [PATCH 0801/1541] fix: Packer blank window on PackerSync --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 127a5ef..52ccef4 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -120,7 +120,7 @@ return packer.startup(function() require("core.utils").packer_lazy_load "nvim-lspconfig" -- reload the current file so lsp actually starts for it vim.defer_fn(function() - vim.cmd "silent! e %" + vim.cmd 'if &ft == "packer" | echo "" | else | silent! e %' end, 0) end, config = override_req("lspconfig", "plugins.configs.lspconfig"), From 2356ba069e13dd38ad327df93ba6931b12cfedcc Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 2 Oct 2021 11:50:51 +0530 Subject: [PATCH 0802/1541] fix: #501 | delay when use d in visual mode only if copy_del = false --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index f15a487..9efc6d1 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -39,7 +39,7 @@ M.misc = function() -- don't yank text on delete ( dd ) if not nvChad_options.copy_del then - map({ "n", "v" }, "dd", '"_dd') + map({ "n", "v" }, "d", '"_d') end -- navigation within insert mode From b2cd5e38f5b5e691886a4d600b88c7395d2b4195 Mon Sep 17 00:00:00 2001 From: Ashin Antony <83629316+ashincoder@users.noreply.github.com> Date: Thu, 30 Sep 2021 22:22:52 +0530 Subject: [PATCH 0803/1541] fix: fix issue #455. 1. Show line diagnostics have been changed to `ge`. Since there are keybindings starting with g. Also `ge` is fast very useful for this reason. --- lua/plugins/configs/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 02688f7..36446d1 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -27,7 +27,7 @@ local function on_attach(_, bufnr) buf_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", opts) buf_set_keymap("n", "ca", "lua vim.lsp.buf.code_action()", opts) buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()", opts) - buf_set_keymap("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) + buf_set_keymap("n", "ge", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) From 6fb97be55c647ccfe2f46e3b981dbcd5f5bd8598 Mon Sep 17 00:00:00 2001 From: ashincoder Date: Fri, 1 Oct 2021 07:41:46 +0530 Subject: [PATCH 0804/1541] chore: Removed superLinter --- .github/workflows/superLinter.yml | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 .github/workflows/superLinter.yml diff --git a/.github/workflows/superLinter.yml b/.github/workflows/superLinter.yml deleted file mode 100644 index 88ea034..0000000 --- a/.github/workflows/superLinter.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Super-Linter - -# Run this workflow every time a new commit pushed to your repository -on: push - -jobs: - # Set the job key. The key is displayed as the job name - # when a job name is not provided - super-lint: - # Name the Job - name: Lint code base - # Set the type of machine to run on - runs-on: ubuntu-latest - - steps: - # Checks out a copy of your repository on the ubuntu-latest machine - - name: Checkout code - uses: actions/checkout@v2 - - # Runs the Super-Linter action - - name: Run Super-Linter - uses: github/super-linter@v3 - env: - VALIDATE_YAML: true - VALIDATE_BASH_EXEC: true - #VALIDATE_LUA: true #removed because the lua gets caught with all the vim - OUTPUT_FOLDER: super-linter.report - OUTPUT_DETAILS: detailed - DEFAULT_BRANCH: main - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - From 7d5a15f7ce4fb754e0f1bb33dbd75225690d4362 Mon Sep 17 00:00:00 2001 From: Ashin Antony <83629316+ashincoder@users.noreply.github.com> Date: Mon, 4 Oct 2021 10:11:57 +0530 Subject: [PATCH 0805/1541] fix(CI): CI bug fixed | docs: Added charity contribution link (#532) * fix: Fix stylua CI formatter | add charity link Update format.yml * chore: format with stylua Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/README.md | 3 ++- .github/workflows/format.yml | 17 +++++++++-------- lua/core/autocmds.lua | 3 --- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/README.md b/.github/README.md index 51cea8c..2ff7e58 100644 --- a/.github/README.md +++ b/.github/README.md @@ -27,7 +27,7 @@ src="https://img.shields.io/github/repo-size/siduck76/NvChad?style=flat-square&label=Repo" alt="GitHub repository size" /> - License 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] -- File extension specific tabbing From 4a349a3b45bdd64f963382731a93545f6a17e02a Mon Sep 17 00:00:00 2001 From: vladislav doster Date: Mon, 4 Oct 2021 04:26:36 -0500 Subject: [PATCH 0806/1541] fix(CI): CI bug fixed | docs: Added charity contribution link (#532) (#533) * fix: Fix stylua CI formatter | add charity link Update format.yml * chore: format with stylua Co-authored-by: Ashin Antony <83629316+ashincoder@users.noreply.github.com> Signed-off-by: Vladislav Doster Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/workflows/format.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 5a12f8a..cabf3cd 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -19,8 +19,8 @@ jobs: run: | git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - if ! [[ -z $(git status -s) ]]; then - git commit --all -m "chore: format with stylua" init.lua lua/** + if [[ -n $(git status -s) ]]; then + git commit --all --message "chore: format with stylua" fi - name: Push changes uses: ad-m/github-push-action@master From 86d92a2fd212fe7d7abffe5349686f2c87c3f9bf Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 5 Oct 2021 06:59:00 +0530 Subject: [PATCH 0807/1541] update : capabalities cmp stuff in lspconfig | load cmp_lsp after lspconfig --- lua/plugins/configs/lspconfig.lua | 16 +--------------- lua/plugins/init.lua | 4 +++- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 36446d1..d0c6727 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -36,21 +36,7 @@ local function on_attach(_, bufnr) end local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities.textDocument.completion.completionItem.documentationFormat = { "markdown", "plaintext" } -capabilities.textDocument.completion.completionItem.snippetSupport = true -capabilities.textDocument.completion.completionItem.preselectSupport = true -capabilities.textDocument.completion.completionItem.insertReplaceSupport = true -capabilities.textDocument.completion.completionItem.labelDetailsSupport = true -capabilities.textDocument.completion.completionItem.deprecatedSupport = true -capabilities.textDocument.completion.completionItem.commitCharactersSupport = true -capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } } -capabilities.textDocument.completion.completionItem.resolveSupport = { - properties = { - "documentation", - "detail", - "additionalTextEdits", - }, -} +capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities) -- replace the default lsp diagnostic symbols local function lspSymbol(name, icon) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 52ccef4..8538568 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -159,6 +159,7 @@ return packer.startup(function() use { "hrsh7th/nvim-cmp", + module = "cmp", disable = not status.cmp, after = "friendly-snippets", config = override_req("nvim_cmp", "plugins.configs.cmp"), @@ -187,7 +188,8 @@ return packer.startup(function() use { "hrsh7th/cmp-nvim-lsp", disable = not status.cmp, - after = "cmp-nvim-lua", + module = "cmp_nvim_lsp", + after = "nvim-lspconfig", } use { From e0ac314fabd3b0d7e0fb8b66d075f862569296cd Mon Sep 17 00:00:00 2001 From: ashincoder Date: Wed, 6 Oct 2021 21:09:53 +0530 Subject: [PATCH 0808/1541] chore: Remove unsupported featurs from README.md --- .github/README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/README.md b/.github/README.md index 2ff7e58..6134ce0 100644 --- a/.github/README.md +++ b/.github/README.md @@ -9,7 +9,7 @@ Support - Extras + Extras

@@ -116,10 +116,7 @@ Without/with Treesitter: ## Features - Many beautiful themes to choose from. -- Distraction free modes. - Fast plugin loading. -- Smooth scrolling. -- Autosaving. - File navigation with [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua). - Managing tabs, buffers with [bufferline.nvim](https://github.com/akinsho/bufferline.nvim). - Beautiful and configurable icons with [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons). @@ -130,7 +127,6 @@ Without/with Treesitter: - File searching, previewing image and text files and more with [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim). - Syntax highlighting with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter). - Autoclosing braces and html tags with [nvim-autopairs](https://github.com/windwp/nvim-autopairs). -- Formatting code with [neoformat](https://github.com/sbdchd/neoformat). - Indentlines with [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim). - Useful snippets with [LuaSnip](https://github.com/L3MON4D3/LuaSnip). From 7449c9e4f6039b1b7c7637416b616d38b2125f20 Mon Sep 17 00:00:00 2001 From: peppapig450 Date: Wed, 6 Oct 2021 14:25:51 -0700 Subject: [PATCH 0809/1541] fix spelling/grammar in the example files --- lua/custom/example_chadrc.lua | 2 +- lua/custom/example_init.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/custom/example_chadrc.lua b/lua/custom/example_chadrc.lua index a3b3e96..02d5566 100644 --- a/lua/custom/example_chadrc.lua +++ b/lua/custom/example_chadrc.lua @@ -8,7 +8,7 @@ M.options, M.ui, M.mappings, M.plugins = {}, {}, {}, {} -------------------------------------------------------------------- --- To use this file, copy the strucutre of `core/default_config.lua`, +-- To use this file, copy the structure of `core/default_config.lua`, -- examples of setting relative number & changing theme: -- M.options = { diff --git a/lua/custom/example_init.lua b/lua/custom/example_init.lua index 28b8ccb..fd53b2e 100644 --- a/lua/custom/example_init.lua +++ b/lua/custom/example_init.lua @@ -1,4 +1,4 @@ --- This is where you custom modules and plugins goes. +-- This is where your custom modules and plugins goes. -- See the wiki for a guide on how to extend NvChad local hooks = require "core.hooks" From 5aa370e375278e5f583a3debf98e2856e2db9620 Mon Sep 17 00:00:00 2001 From: Sravanth C <54331348+chebro@users.noreply.github.com> Date: Thu, 7 Oct 2021 00:43:23 +0530 Subject: [PATCH 0810/1541] feat: robots.txt icon - added robots.txt font glyph for nvim-web-dev-icons --- lua/plugins/configs/icons.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/plugins/configs/icons.lua b/lua/plugins/configs/icons.lua index 7fc28a3..ce64cf7 100644 --- a/lua/plugins/configs/icons.lua +++ b/lua/plugins/configs/icons.lua @@ -87,6 +87,11 @@ icons.setup { color = colors.cyan, name = "py", }, + ["robots.txt"] = { + icon = "ﮧ", + color = colors.red, + name = "robots" + }, toml = { icon = "", color = colors.blue, From d47fcda9ef00e95ca74319d93ebf1a07c1342463 Mon Sep 17 00:00:00 2001 From: Sravanth C <54331348+chebro@users.noreply.github.com> Date: Thu, 7 Oct 2021 00:53:53 +0530 Subject: [PATCH 0811/1541] add: ttf, woff, woff2 icons --- lua/plugins/configs/icons.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lua/plugins/configs/icons.lua b/lua/plugins/configs/icons.lua index ce64cf7..801613d 100644 --- a/lua/plugins/configs/icons.lua +++ b/lua/plugins/configs/icons.lua @@ -102,6 +102,11 @@ icons.setup { color = colors.teal, name = "ts", }, + ttf = { + icon = "", + color = colors.white, + name = "TrueTypeFont" + }, rb = { icon = "", color = colors.pink, @@ -117,6 +122,16 @@ icons.setup { color = colors.vibrant_green, name = "vue", }, + woff = { + icon = "", + color = colors.white, + name = "WebOpenFontFormat" + }, + woff2 = { + icon = "", + color = colors.white, + name = "WebOpenFontFormat2" + }, xz = { icon = "", color = colors.sun, From 5799af49e20563d76f4ff613f8b3103339579436 Mon Sep 17 00:00:00 2001 From: peppapig450 Date: Thu, 7 Oct 2021 15:17:28 -0700 Subject: [PATCH 0812/1541] Fix another grammar mistake in example_init.lua --- lua/custom/example_init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/custom/example_init.lua b/lua/custom/example_init.lua index fd53b2e..51e3dcb 100644 --- a/lua/custom/example_init.lua +++ b/lua/custom/example_init.lua @@ -1,4 +1,4 @@ --- This is where your custom modules and plugins goes. +-- This is where your custom modules and plugins go. -- See the wiki for a guide on how to extend NvChad local hooks = require "core.hooks" From 40554c80ad1a395bb982808837c1b5861d948709 Mon Sep 17 00:00:00 2001 From: max397574 Date: Fri, 8 Oct 2021 15:08:57 +0200 Subject: [PATCH 0813/1541] fix: new function to check for cmp completitions --- lua/plugins/configs/cmp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 7461d78..045a9d9 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -43,7 +43,7 @@ cmp.setup { select = true, }, [""] = function(fallback) - if vim.fn.pumvisible() == 1 then + if cmp.visible() then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("", true, true, true), "n") elseif require("luasnip").expand_or_jumpable() then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") @@ -52,7 +52,7 @@ cmp.setup { end end, [""] = function(fallback) - if vim.fn.pumvisible() == 1 then + if cmp.visible() then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("", true, true, true), "n") elseif require("luasnip").jumpable(-1) then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") From 8a426b9e62c1e31b5bb1057f259b30e11011c03d Mon Sep 17 00:00:00 2001 From: max397574 Date: Fri, 8 Oct 2021 15:26:20 +0200 Subject: [PATCH 0814/1541] fix cmp use new function --- lua/plugins/configs/cmp.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 045a9d9..e928e54 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -44,7 +44,7 @@ cmp.setup { }, [""] = function(fallback) if cmp.visible() then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("", true, true, true), "n") + cmp.select_next_item() elseif require("luasnip").expand_or_jumpable() then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") else @@ -52,9 +52,9 @@ cmp.setup { end end, [""] = function(fallback) - if cmp.visible() then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("", true, true, true), "n") - elseif require("luasnip").jumpable(-1) then + if cmp.visible() then + cmp.select_next_item() + elseif require("luasnip").jumpable(-1) then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") else fallback() From 1af5510d03e5268a4a69bfdbf6817617c5836338 Mon Sep 17 00:00:00 2001 From: max397574 Date: Fri, 8 Oct 2021 15:30:15 +0200 Subject: [PATCH 0815/1541] fix cmp use correct function --- lua/plugins/configs/cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index e928e54..ede4792 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -53,7 +53,7 @@ cmp.setup { end, [""] = function(fallback) if cmp.visible() then - cmp.select_next_item() + cmp.select_prev_item() elseif require("luasnip").jumpable(-1) then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") else From 1ec9f80bdbd60a700e119c3f63df6a62186cbbb3 Mon Sep 17 00:00:00 2001 From: max397574 Date: Fri, 8 Oct 2021 15:36:15 +0200 Subject: [PATCH 0816/1541] fixed formatting --- lua/plugins/configs/cmp.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index ede4792..eab3bd2 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -44,7 +44,7 @@ cmp.setup { }, [""] = function(fallback) if cmp.visible() then - cmp.select_next_item() + cmp.select_next_item() elseif require("luasnip").expand_or_jumpable() then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") else @@ -52,9 +52,9 @@ cmp.setup { end end, [""] = function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif require("luasnip").jumpable(-1) then + if cmp.visible() then + cmp.select_prev_item() + elseif require("luasnip").jumpable(-1) then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") else fallback() From d2215044822ce5d4c7fa236b5be1cc38415cec3b Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 9 Oct 2021 10:03:49 +0530 Subject: [PATCH 0817/1541] add: cmp highlight groups --- lua/colors/highlights.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 0141415..1c6650d 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -68,6 +68,10 @@ bg("Pmenu", one_bg) bg("PmenuSbar", one_bg2) bg("PmenuSel", pmenu_bg) bg("PmenuThumb", nord_blue) +fg("CmpItemAbbr", white) +fg("CmpItemAbbrMatch", white) +fg("CmpItemKind", white) +fg("CmpItemMenu", white) -- misc fg("LineNr", grey) From e8bbe1e4a1b9b4f27c88ccad7e47defc81e37163 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 9 Oct 2021 11:17:21 +0530 Subject: [PATCH 0818/1541] Revert "update : capabalities cmp stuff in lspconfig | load cmp_lsp after lspconfig" This reverts commit 86d92a2fd212fe7d7abffe5349686f2c87c3f9bf. --- lua/plugins/configs/lspconfig.lua | 16 +++++++++++++++- lua/plugins/init.lua | 4 +--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index d0c6727..36446d1 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -36,7 +36,21 @@ local function on_attach(_, bufnr) end local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities) +capabilities.textDocument.completion.completionItem.documentationFormat = { "markdown", "plaintext" } +capabilities.textDocument.completion.completionItem.snippetSupport = true +capabilities.textDocument.completion.completionItem.preselectSupport = true +capabilities.textDocument.completion.completionItem.insertReplaceSupport = true +capabilities.textDocument.completion.completionItem.labelDetailsSupport = true +capabilities.textDocument.completion.completionItem.deprecatedSupport = true +capabilities.textDocument.completion.completionItem.commitCharactersSupport = true +capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } } +capabilities.textDocument.completion.completionItem.resolveSupport = { + properties = { + "documentation", + "detail", + "additionalTextEdits", + }, +} -- replace the default lsp diagnostic symbols local function lspSymbol(name, icon) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 8538568..52ccef4 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -159,7 +159,6 @@ return packer.startup(function() use { "hrsh7th/nvim-cmp", - module = "cmp", disable = not status.cmp, after = "friendly-snippets", config = override_req("nvim_cmp", "plugins.configs.cmp"), @@ -188,8 +187,7 @@ return packer.startup(function() use { "hrsh7th/cmp-nvim-lsp", disable = not status.cmp, - module = "cmp_nvim_lsp", - after = "nvim-lspconfig", + after = "cmp-nvim-lua", } use { From 1b44d4f2b9f2596d6f18a57a74a8f02c5c1e8567 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 9 Oct 2021 12:10:09 +0530 Subject: [PATCH 0819/1541] add : highlight color for matchparen --- lua/colors/highlights.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 1c6650d..c8bfc9f 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -51,6 +51,8 @@ else fg("Comment", grey_fg) end +fg_bg("MatchParen", black, red) + -- Disable cusror line cmd "hi clear CursorLine" -- Line number From cb977a5313f849bd3002d9d90860c0f32f063c51 Mon Sep 17 00:00:00 2001 From: Ay355 <77558710+Ay-355@users.noreply.github.com> Date: Fri, 8 Oct 2021 18:02:53 -0700 Subject: [PATCH 0820/1541] fix: use of left/right arrow keys in insert mode This allows the left and right arrows to move between lines in insert mode. --- lua/core/options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index 96bdd4a..6633d33 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -45,7 +45,7 @@ opt.updatetime = options.updatetime -- go to previous/next line with h,l,left arrow and right arrow -- when cursor reaches end/beginning of line -opt.whichwrap:append "<>hl" +opt.whichwrap:append "<>[]hl" g.mapleader = options.mapleader From fb9c54bc5d27df9d60dafc2061756ba24434b50e Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 10 Oct 2021 07:41:47 +0530 Subject: [PATCH 0821/1541] add: highlight color for NvimTreeNormalNC --- lua/colors/highlights.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index c8bfc9f..3318866 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -131,6 +131,7 @@ fg("NvimTreeFolderName", folder_bg) fg("NvimTreeGitDirty", red) fg("NvimTreeIndentMarker", one_bg2) bg("NvimTreeNormal", darker_black) +bg("NvimTreeNormalNC", darker_black) fg("NvimTreeOpenedFolderName", blue) fg("NvimTreeRootFolder", red .. " gui=underline") -- enable underline for root folder in nvim tree fg_bg("NvimTreeStatuslineNc", darker_black, darker_black) From a24a65ab6b2119b8afd1e20acea8468b2a396c91 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 11 Oct 2021 09:55:44 +0530 Subject: [PATCH 0822/1541] update : nvimtree diagnostic config --- lua/plugins/configs/nvimtree.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 25eeb26..84004d9 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -52,7 +52,15 @@ g.nvim_tree_icons = { } nvimtree.setup { - lsp_diagnostics = false, + diagnostics = { + enable = false, + icons = { + hint = "", + info = "", + warning = "", + error = "", + }, + }, disable_netrw = true, hijack_netrw = true, ignore_ft_on_setup = { "dashboard" }, From 1b4a67a1e15fc9b933f71ce5fde43450d6a0f5b3 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Mon, 11 Oct 2021 16:46:34 +0530 Subject: [PATCH 0823/1541] nvimtree: disable updating cwd on focused files (#546) --- lua/plugins/configs/nvimtree.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 84004d9..b47ecc2 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -70,7 +70,7 @@ nvimtree.setup { update_cwd = true, update_focused_file = { enable = true, - update_cwd = true, + update_cwd = false, }, view = { allow_resize = true, From 9a45bb3f20e42099a985652197714ed2341b8703 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 14 Oct 2021 10:57:28 +0530 Subject: [PATCH 0824/1541] fix: Disabling shortline from chadrc missed in https://github.com/NvChad/NvChad/commit/317eedd9b277b4457fbdfc6314e2cee955531c24 chore: format files --- lua/plugins/configs/icons.lua | 40 +++++++++++++++--------------- lua/plugins/configs/statusline.lua | 20 +++++++-------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/lua/plugins/configs/icons.lua b/lua/plugins/configs/icons.lua index 801613d..7f66d3c 100644 --- a/lua/plugins/configs/icons.lua +++ b/lua/plugins/configs/icons.lua @@ -87,11 +87,11 @@ icons.setup { color = colors.cyan, name = "py", }, - ["robots.txt"] = { - icon = "ﮧ", - color = colors.red, - name = "robots" - }, + ["robots.txt"] = { + icon = "ﮧ", + color = colors.red, + name = "robots", + }, toml = { icon = "", color = colors.blue, @@ -102,11 +102,11 @@ icons.setup { color = colors.teal, name = "ts", }, - ttf = { - icon = "", - color = colors.white, - name = "TrueTypeFont" - }, + ttf = { + icon = "", + color = colors.white, + name = "TrueTypeFont", + }, rb = { icon = "", color = colors.pink, @@ -122,16 +122,16 @@ icons.setup { color = colors.vibrant_green, name = "vue", }, - woff = { - icon = "", - color = colors.white, - name = "WebOpenFontFormat" - }, - woff2 = { - icon = "", - color = colors.white, - name = "WebOpenFontFormat2" - }, + woff = { + icon = "", + color = colors.white, + name = "WebOpenFontFormat", + }, + woff2 = { + icon = "", + color = colors.white, + name = "WebOpenFontFormat2", + }, xz = { icon = "", color = colors.sun, diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 1f7aa44..2a1e6c4 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -47,7 +47,7 @@ local config = require("core.utils").load_config().plugins.options.statusline local user_statusline_style = config.style local statusline_style = icon_styles[user_statusline_style] -- if show short statusline on small screens -local shortline = config.shortline +local shortline = config.shortline == false and true -- Initialize the components table local components = { @@ -85,7 +85,7 @@ components.active[1][2] = { end return " " .. icon .. " " .. filename .. " " end, - enabled = shortline and function(winid) + enabled = shortline or function(winid) return vim.api.nvim_win_get_width(winid) > 70 end, hl = { @@ -102,7 +102,7 @@ components.active[1][3] = { return "  " .. dir_name .. " " end, - enabled = shortline and function(winid) + enabled = shortline or function(winid) return vim.api.nvim_win_get_width(winid) > 80 end, @@ -213,7 +213,7 @@ components.active[2][1] = { end return "" end, - enabled = shortline and function(winid) + enabled = shortline or function(winid) return vim.api.nvim_win_get_width(winid) > 80 end, hl = { fg = colors.green }, @@ -227,7 +227,7 @@ components.active[3][1] = { return "" end end, - enabled = shortline and function(winid) + enabled = shortline or function(winid) return vim.api.nvim_win_get_width(winid) > 70 end, hl = { fg = colors.grey_fg2, bg = colors.statusline_bg }, @@ -235,7 +235,7 @@ components.active[3][1] = { components.active[3][2] = { provider = "git_branch", - enabled = shortline and function(winid) + enabled = shortline or function(winid) return vim.api.nvim_win_get_width(winid) > 70 end, hl = { @@ -312,7 +312,7 @@ components.active[3][6] = { components.active[3][7] = { provider = statusline_style.left, - enabled = shortline and function(winid) + enabled = shortline or function(winid) return vim.api.nvim_win_get_width(winid) > 90 end, hl = { @@ -323,7 +323,7 @@ components.active[3][7] = { components.active[3][8] = { provider = statusline_style.left, - enabled = shortline and function(winid) + enabled = shortline or function(winid) return vim.api.nvim_win_get_width(winid) > 90 end, hl = { @@ -334,7 +334,7 @@ components.active[3][8] = { components.active[3][9] = { provider = statusline_style.position_icon, - enabled = shortline and function(winid) + enabled = shortline or function(winid) return vim.api.nvim_win_get_width(winid) > 90 end, hl = { @@ -357,7 +357,7 @@ components.active[3][10] = { return " " .. result .. "%% " end, - enabled = shortline and function(winid) + enabled = shortline or function(winid) return vim.api.nvim_win_get_width(winid) > 90 end, From 16a0c97fc9dca5fa4d2e55bea9f73e773c3ae6f0 Mon Sep 17 00:00:00 2001 From: max397574 Date: Sat, 16 Oct 2021 17:54:17 +0200 Subject: [PATCH 0825/1541] fix: use better name for mapping --- lua/core/default_config.lua | 2 +- lua/core/mappings.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 681e78b..b66aae1 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -121,7 +121,7 @@ M.mappings = { forward = "", next_line = "", prev_line = "", - top_of_line = "", + beginning_of_line = "", }, --better window movement window_nav = { diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 9efc6d1..cf9d2a0 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -51,7 +51,7 @@ M.misc = function() map("i", inav.forward, "") map("i", inav.next_line, "") map("i", inav.prev_line, "") - map("i", inav.top_of_line, "^i") + map("i", inav.beginning_of_line, "^i") end -- easier navigation between windows From eefee5e17d82e62f1b748449f0c4042d4c624633 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sun, 17 Oct 2021 11:28:47 +0530 Subject: [PATCH 0826/1541] clean config for inactive statusline --- lua/colors/highlights.lua | 4 ++++ lua/plugins/configs/statusline.lua | 15 --------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 3318866..34ecb41 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -76,6 +76,10 @@ fg("CmpItemKind", white) fg("CmpItemMenu", white) -- misc + +-- inactive statuslines as thin lines +fg("StatusLineNC", one_bg2 .. " gui=underline") + fg("LineNr", grey) fg("NvimInternalError", red) fg("VertSplit", one_bg2) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 2a1e6c4..0a8f4aa 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -367,21 +367,6 @@ components.active[3][10] = { }, } -local InactiveStatusHL = { - fg = colors.one_bg2, - bg = "NONE", - style = "underline", -} - -components.inactive = { - { - { - provider = " ", - hl = InactiveStatusHL, - }, - }, -} - require("feline").setup { colors = { bg = colors.statusline_bg, From 003038b2a7f6229392a4ba0d41205e0fb11318d2 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 21 Oct 2021 09:12:31 +0530 Subject: [PATCH 0827/1541] rm : doc lines from signature.nvim popups --- lua/plugins/configs/others.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index b4c6d12..0705a86 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -87,7 +87,7 @@ M.signature = function() if present then lspsignature.setup { bind = true, - doc_lines = 2, + doc_lines = 0, floating_window = true, fix_pos = true, hint_enable = true, From 56d05ac9d9e1759bbd9310a6c3b4c253acf791bf Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 21 Oct 2021 14:21:50 +0530 Subject: [PATCH 0828/1541] rm matchparen highlight (#557) --- lua/colors/highlights.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 34ecb41..bf6631c 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -51,8 +51,6 @@ else fg("Comment", grey_fg) end -fg_bg("MatchParen", black, red) - -- Disable cusror line cmd "hi clear CursorLine" -- Line number From 67962828bb04d38eb7e63753c0fe3d23cdee4078 Mon Sep 17 00:00:00 2001 From: Andrew Balmos Date: Thu, 21 Oct 2021 17:36:23 -0400 Subject: [PATCH 0829/1541] Add smartcase option --- lua/core/default_config.lua | 1 + lua/core/options.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index b66aae1..ac954d4 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -12,6 +12,7 @@ M.options = { ruler = false, hidden = true, ignorecase = true, + smartcase = true, mapleader = " ", mouse = "a", number = true, diff --git a/lua/core/options.lua b/lua/core/options.lua index 6633d33..2438b16 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -21,6 +21,7 @@ opt.fillchars = { eob = " " } opt.hidden = options.hidden opt.ignorecase = options.ignorecase +opt.smartcase = options.smartcase opt.mouse = options.mouse -- Numbers From 068ae08f6c6ad28cf09ac278cba5c4d6fcfd84d7 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 22 Oct 2021 05:47:35 +0530 Subject: [PATCH 0830/1541] avoid using cmp disable var for autopairs (#567) --- lua/core/default_config.lua | 1 + lua/plugins/configs/others.lua | 3 +++ lua/plugins/init.lua | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index ac954d4..f958e23 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -72,6 +72,7 @@ M.plugins = { vim_matchup = true, -- % operator enhancements cmp = true, nvimtree = true, + autopairs = true, }, options = { lspconfig = { diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 0705a86..5e36288 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -10,6 +10,9 @@ M.autopairs = function() end autopairs.setup() + + -- not needed if you disable cmp, the above var related to cmp tooo! override default config for autopairs + autopairs_completion.setup { map_complete = true, -- insert () func completion map_cr = true, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 52ccef4..02389b2 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -204,7 +204,7 @@ return packer.startup(function() -- misc plugins use { "windwp/nvim-autopairs", - disable = not status.cmp, + disable = not status.autopairs, after = "nvim-cmp", config = override_req("nvim_autopairs", "(plugins.configs.others).autopairs()"), } From 0e493bcaccff011372f4c0596cab5b6297302a16 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 27 Oct 2021 12:10:13 +0530 Subject: [PATCH 0831/1541] add telescope title highlights --- lua/colors/highlights.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index bf6631c..ce14692 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -19,6 +19,7 @@ local purple = colors.purple local red = colors.red local white = colors.white local yellow = colors.yellow +local one_bg3 = colors.one_bg3 local ui = require("core.utils").load_config().ui @@ -76,7 +77,7 @@ fg("CmpItemMenu", white) -- misc -- inactive statuslines as thin lines -fg("StatusLineNC", one_bg2 .. " gui=underline") +fg("StatusLineNC", one_bg3 .. " gui=underline") fg("LineNr", grey) fg("NvimInternalError", red) @@ -150,7 +151,7 @@ if ui.transparency then end -- Telescope -fg("TelescopeBorder", line) -fg("TelescopePreviewBorder", grey) -fg("TelescopePromptBorder", line) -fg("TelescopeResultsBorder", line) +fg("TelescopeBorder", one_bg) +fg_bg("TelescopePreviewTitle", green, one_bg) +fg_bg("TelescopePromptTitle", blue, one_bg) +fg_bg("TelescopeResultsTitle", red, one_bg) From 6e3e0bf029ae670bbbdf4cdd938ad4b7eecbb6ed Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 28 Oct 2021 06:04:50 +0530 Subject: [PATCH 0832/1541] fix luasnip incorrect path (#526) --- lua/plugins/configs/others.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 5e36288..2235130 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -82,7 +82,9 @@ M.luasnip = function() history = true, updateevents = "TextChanged,TextChangedI", } - require("luasnip/loaders/from_vscode").load { path = { chadrc_config.plugins.options.luasnip.snippet_path } } + + require("luasnip/loaders/from_vscode").load { paths = chadrc_config.plugins.options.luasnip.snippet_path } + require("luasnip/loaders/from_vscode").load() end M.signature = function() From 2cf5fe7cea72e1d6cb79e87ac15016a200fcdb60 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 29 Oct 2021 19:10:52 +0530 Subject: [PATCH 0833/1541] update screenshot links --- .github/README.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/README.md b/.github/README.md index 6134ce0..6889347 100644 --- a/.github/README.md +++ b/.github/README.md @@ -7,7 +7,7 @@ Contribute - Support + Support Extras

@@ -21,30 +21,30 @@
-[![Super Linter](https://img.shields.io/github/workflow/status/siduck76/NvChad/Super-Linter/main?style=flat-square&logo=github&label=Build&color=green)]() -GitHub repository size -License [![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/gADmkJb9Fb) [![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.5+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white)](https://github.com/neovim/neovim) -[![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square&label=Issues&color=fc0330)](https://github.com/siduck76/NvChad/issues) -[![Last Commit](https://img.shields.io/github/last-commit/siduck76/NvChad.svg?style=flat-square&label=Last%20Commit&color=58eb34)](https://github.com/siduck76/NvChad/pulse) +[![GitHub Issues](https://img.shields.io/github/issues/siduck/NvChad.svg?style=flat-square&label=Issues&color=fc0330)](https://github.com/siduck/NvChad/issues) +[![Last Commit](https://img.shields.io/github/last-commit/siduck/NvChad.svg?style=flat-square&label=Last%20Commit&color=58eb34)](https://github.com/siduck/NvChad/pulse)
## Showcase -
+

-
-
+
+
## Theme Showcase @@ -65,38 +65,38 @@ Fast file tree: -
+

Telescope-nvim

A fuzzy file finder, picker, sorter, previewer and much more: - -
+ +

Indent-blankline.nvim

Adds indentline: -
+

Feline.nvim

Highly configurable statusline plugin: -
+

Nvim-bufferline.lua

Better tab implementation: -
+

Nvim-web-devicons

Lua fork of Vim Devicons which offers more file icon customisability: -
+

Nvim-treesitter


+
@@ -162,7 +162,7 @@ This will leave your current Neovim configuration untouched. Once you exit Neovi ## Chadributors - + ## Warning From 69c0f38a7a828280fc8bc6267a845135368089f5 Mon Sep 17 00:00:00 2001 From: bsmirks Date: Fri, 29 Oct 2021 17:58:10 -0500 Subject: [PATCH 0834/1541] fixing broken links --- .github/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/README.md b/.github/README.md index 6889347..c5a44cd 100644 --- a/.github/README.md +++ b/.github/README.md @@ -22,20 +22,20 @@
[![Super Linter](https://img.shields.io/github/workflow/status/NvChad/NvChad/Super-Linter/main?style=flat-square&logo=github&label=Build&color=green)]() -GitHub repository size -License [![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/gADmkJb9Fb) [![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.5+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white)](https://github.com/neovim/neovim) -[![GitHub Issues](https://img.shields.io/github/issues/siduck/NvChad.svg?style=flat-square&label=Issues&color=fc0330)](https://github.com/siduck/NvChad/issues) -[![Last Commit](https://img.shields.io/github/last-commit/siduck/NvChad.svg?style=flat-square&label=Last%20Commit&color=58eb34)](https://github.com/siduck/NvChad/pulse) +[![GitHub Issues](https://img.shields.io/github/issues/NvChad/NvChad.svg?style=flat-square&label=Issues&color=fc0330)](https://github.com/siduck/NvChad/issues) +[![Last Commit](https://img.shields.io/github/last-commit/NvChad/NvChad.svg?style=flat-square&label=Last%20Commit&color=58eb34)](https://github.com/siduck/NvChad/pulse)
From c7a36fe7d866325b476450c8f591533d8754c3f0 Mon Sep 17 00:00:00 2001 From: bsmirks Date: Fri, 29 Oct 2021 17:59:11 -0500 Subject: [PATCH 0835/1541] fixing broken links --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index c5a44cd..dfb2a0a 100644 --- a/.github/README.md +++ b/.github/README.md @@ -29,7 +29,7 @@ /> License [![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/gADmkJb9Fb) From 01eec524be86654b5f9d93b72d901799a0c8bf46 Mon Sep 17 00:00:00 2001 From: bsmirks Date: Fri, 29 Oct 2021 18:00:03 -0500 Subject: [PATCH 0836/1541] fixing broken links to chadtributors --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index dfb2a0a..49a4a90 100644 --- a/.github/README.md +++ b/.github/README.md @@ -162,7 +162,7 @@ This will leave your current Neovim configuration untouched. Once you exit Neovi ## Chadributors - + ## Warning From 4b2bbe5d1c2d3587cd284703d2a61075990e8723 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 30 Oct 2021 15:48:44 +0530 Subject: [PATCH 0837/1541] update configs for nvimtree and autopairs --- lua/plugins/configs/nvimtree.lua | 4 +++- lua/plugins/configs/others.lua | 9 +++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index b47ecc2..95b0319 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -12,7 +12,6 @@ vim.o.termguicolors = true g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names g.nvim_tree_git_hl = git_status g.nvim_tree_gitignore = 0 -g.nvim_tree_hide_dotfiles = 0 g.nvim_tree_highlight_opened_files = 0 g.nvim_tree_indent_markers = 1 g.nvim_tree_ignore = { ".git", "node_modules", ".cache" } @@ -61,6 +60,9 @@ nvimtree.setup { error = "", }, }, + filters = { + dotfiles = false, + }, disable_netrw = true, hijack_netrw = true, ignore_ft_on_setup = { "dashboard" }, diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 2235130..af24c60 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -3,7 +3,7 @@ local M = {} local chadrc_config = require("core.utils").load_config() M.autopairs = function() local present1, autopairs = pcall(require, "nvim-autopairs") - local present2, autopairs_completion = pcall(require, "nvim-autopairs.completion.cmp") + local present2, cmp_autopairs = pcall(require, "nvim-autopairs.completion.cmp") if not (present1 or present2) then return @@ -12,11 +12,8 @@ M.autopairs = function() autopairs.setup() -- not needed if you disable cmp, the above var related to cmp tooo! override default config for autopairs - - autopairs_completion.setup { - map_complete = true, -- insert () func completion - map_cr = true, - } + local cmp = require "cmp" + cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) end M.better_escape = function() From c5fe1f711e2edc08899bcfa3de484485f64e5f3f Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 5 Nov 2021 20:04:52 +0530 Subject: [PATCH 0838/1541] add : option to load autopairs sequentially (#584) --- lua/core/default_config.lua | 1 + lua/plugins/init.lua | 46 ++++++++++++++++++------------------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index f958e23..9859c4e 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -75,6 +75,7 @@ M.plugins = { autopairs = true, }, options = { + autopairs = { loadAfter = "nvim-cmp" }, lspconfig = { setup_lspconf = "", -- path of file containing setups of different lsps }, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 02389b2..283d05c 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -7,7 +7,7 @@ end local use = packer.use return packer.startup(function() - local status = require("core.utils").load_config().plugins.status + local plugin_settings = require("core.utils").load_config().plugins -- FUNCTION: override_req, use `chadrc` plugin config override if present -- name = name inside `default_config` / `chadrc` @@ -64,14 +64,14 @@ return packer.startup(function() use { "famiu/feline.nvim", - disable = not status.feline, + disable = not plugin_settings.status.feline, after = "nvim-web-devicons", config = override_req("feline", "plugins.configs.statusline"), } use { "akinsho/bufferline.nvim", - disable = not status.bufferline, + disable = not plugin_settings.status.bufferline, after = "nvim-web-devicons", config = override_req("bufferline", "plugins.configs.bufferline"), setup = function() @@ -81,14 +81,14 @@ return packer.startup(function() use { "lukas-reineke/indent-blankline.nvim", - disable = not status.blankline, + disable = not plugin_settings.status.blankline, event = "BufRead", config = override_req("indent_blankline", "(plugins.configs.others).blankline()"), } use { "norcalli/nvim-colorizer.lua", - disable = not status.colorizer, + disable = not plugin_settings.status.colorizer, event = "BufRead", config = override_req("nvim_colorizer", "(plugins.configs.others).colorizer()"), } @@ -103,7 +103,7 @@ return packer.startup(function() -- git stuff use { "lewis6991/gitsigns.nvim", - disable = not status.gitsigns, + disable = not plugin_settings.status.gitsigns, opt = true, config = override_req("gitsigns", "plugins.configs.gitsigns"), setup = function() @@ -128,14 +128,14 @@ return packer.startup(function() use { "ray-x/lsp_signature.nvim", - disable = not status.lspsignature, + disable = not plugin_settings.status.lspsignature, after = "nvim-lspconfig", config = override_req("signature", "(plugins.configs.others).signature()"), } use { "andymass/vim-matchup", - disable = not status.vim_matchup, + disable = not plugin_settings.status.vim_matchup, opt = true, setup = function() require("core.utils").packer_lazy_load "vim-matchup" @@ -144,7 +144,7 @@ return packer.startup(function() use { "max397574/better-escape.nvim", - disable = not status.esc_insertmode, + disable = not plugin_settings.status.esc_insertmode, event = "InsertEnter", config = override_req("better_escape", "(plugins.configs.others).better_escape()"), } @@ -153,20 +153,20 @@ return packer.startup(function() use { "rafamadriz/friendly-snippets", - disable = not status.cmp, + disable = not plugin_settings.status.cmp, event = "InsertEnter", } use { "hrsh7th/nvim-cmp", - disable = not status.cmp, + disable = not plugin_settings.status.cmp, after = "friendly-snippets", config = override_req("nvim_cmp", "plugins.configs.cmp"), } use { "L3MON4D3/LuaSnip", - disable = not status.cmp, + disable = not plugin_settings.status.cmp, wants = "friendly-snippets", after = "nvim-cmp", config = override_req("luasnip", "(plugins.configs.others).luasnip()"), @@ -174,44 +174,44 @@ return packer.startup(function() use { "saadparwaiz1/cmp_luasnip", - disable = not status.cmp, + disable = not plugin_settings.status.cmp, after = "LuaSnip", } use { "hrsh7th/cmp-nvim-lua", - disable = not status.cmp, + disable = not plugin_settings.status.cmp, after = "cmp_luasnip", } use { "hrsh7th/cmp-nvim-lsp", - disable = not status.cmp, + disable = not plugin_settings.status.cmp, after = "cmp-nvim-lua", } use { "hrsh7th/cmp-buffer", - disable = not status.cmp, + disable = not plugin_settings.status.cmp, after = "cmp-nvim-lsp", } use { "hrsh7th/cmp-path", - disable = not status.cmp, + disable = not plugin_settings.status.cmp, after = "cmp-buffer", } -- misc plugins use { "windwp/nvim-autopairs", - disable = not status.autopairs, - after = "nvim-cmp", + disable = not plugin_settings.status.autopairs, + after = plugin_settings.options.autopairs.loadAfter, config = override_req("nvim_autopairs", "(plugins.configs.others).autopairs()"), } use { "glepnir/dashboard-nvim", - disable = not status.dashboard, + disable = not plugin_settings.status.dashboard, config = override_req("dashboard", "plugins.configs.dashboard"), setup = function() require("core.mappings").dashboard() @@ -220,7 +220,7 @@ return packer.startup(function() use { "terrortylor/nvim-comment", - disable = not status.comment, + disable = not plugin_settings.status.comment, cmd = "CommentToggle", config = override_req("nvim_comment", "(plugins.configs.others).comment()"), setup = function() @@ -231,7 +231,7 @@ return packer.startup(function() -- file managing , picker etc use { "kyazdani42/nvim-tree.lua", - disable = not status.nvimtree, + disable = not plugin_settings.status.nvimtree, cmd = { "NvimTreeToggle", "NvimTreeFocus" }, config = override_req("nvim_tree", "plugins.configs.nvimtree"), setup = function() @@ -250,7 +250,7 @@ return packer.startup(function() }, { "nvim-telescope/telescope-media-files.nvim", - disable = not status.telescope_media, + disable = not plugin_settings.status.telescope_media, setup = function() require("core.mappings").telescope_media() end, From fd668e559ed6ccfdd565e3f43a7ae1c6efc16582 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 9 Nov 2021 06:21:27 +0530 Subject: [PATCH 0839/1541] add option for overriding highlights (#596) --- lua/colors/highlights.lua | 30 +++++++++--------------------- lua/core/default_config.lua | 1 + lua/core/utils.lua | 26 ++++++++++++++++++++++++++ lua/plugins/configs/lspconfig.lua | 2 +- 4 files changed, 37 insertions(+), 22 deletions(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index ce14692..c16675d 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -1,3 +1,5 @@ +local override = require("core.utils").load_config().ui.hl_override + local cmd = vim.cmd local colors = require("colors").get() @@ -23,27 +25,9 @@ local one_bg3 = colors.one_bg3 local ui = require("core.utils").load_config().ui --- Define bg color --- @param group Group --- @param color Color -local function bg(group, color) - cmd("hi " .. group .. " guibg=" .. color) -end - --- Define fg color --- @param group Group --- @param color Color -local function fg(group, color) - cmd("hi " .. group .. " guifg=" .. color) -end - --- Define bg and fg color --- @param group Group --- @param fgcol Fg Color --- @param bgcol Bg Color -local function fg_bg(group, fgcol, bgcol) - cmd("hi " .. group .. " guifg=" .. fgcol .. " guibg=" .. bgcol) -end +local fg = require("core.utils").fg +local fg_bg = require("core.utils").fg_bg +local bg = require("core.utils").bg -- Comments if ui.italic_comments then @@ -155,3 +139,7 @@ fg("TelescopeBorder", one_bg) fg_bg("TelescopePreviewTitle", green, one_bg) fg_bg("TelescopePromptTitle", blue, one_bg) fg_bg("TelescopeResultsTitle", red, one_bg) + +if #override ~= 0 then + require(override) +end diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 9859c4e..9b087cf 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -42,6 +42,7 @@ M.options = { -- ui configs M.ui = { + hl_override = "", -- path of your file which contains highlight stuffs italic_comments = false, -- theme to be used, check available themes with ` + t + h` theme = "onedark", diff --git a/lua/core/utils.lua b/lua/core/utils.lua index bab04fc..e9fbd1f 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -1,5 +1,6 @@ local M = {} +local cmd = vim.cmd M.close_buffer = function(bufexpr, force) -- This is a modification of a NeoVim plugin from -- Author: ojroques - Olivier Roques @@ -330,4 +331,29 @@ M.packer_lazy_load = function(plugin, timer) end end +-- Highlights functions + +-- Define bg color +-- @param group Group +-- @param color Color + +M.bg = function(group, col) + cmd("hi " .. group .. " guibg=" .. col) +end + +-- Define fg color +-- @param group Group +-- @param color Color +M.fg = function(group, col) + cmd("hi " .. group .. " guifg=" .. col) +end + +-- Define bg and fg color +-- @param group Group +-- @param fgcol Fg Color +-- @param bgcol Bg Color +M.fg_bg = function(group, fgcol, bgcol) + cmd("hi " .. group .. " guifg=" .. fgcol .. " guibg=" .. bgcol) +end + return M diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 36446d1..be12585 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -98,6 +98,6 @@ end local addlsp_confs = require("core.utils").load_config().plugins.options.lspconfig.setup_lspconf -if string.len(addlsp_confs) ~= 0 then +if #addlsp_confs ~= 0 then require(addlsp_confs).setup_lsp(on_attach, capabilities) end From c8a27d701c5f119a97a2ae619a3138638592ed21 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 13 Nov 2021 21:59:31 +0530 Subject: [PATCH 0840/1541] cleanup! --- lua/core/custom.lua | 23 +++------------- lua/core/hooks.lua | 44 ++++--------------------------- lua/core/init.lua | 4 --- lua/core/options.lua | 3 --- lua/core/utils.lua | 2 +- lua/plugins/configs/lspconfig.lua | 8 +----- 6 files changed, 10 insertions(+), 74 deletions(-) diff --git a/lua/core/custom.lua b/lua/core/custom.lua index c058061..44c1696 100644 --- a/lua/core/custom.lua +++ b/lua/core/custom.lua @@ -1,22 +1,5 @@ -local function isModuleAvailable(name) - if package.loaded[name] then - return true - else - for _, searcher in ipairs(package.searchers or package.loaders) do - local loader = searcher(name) - if type(loader) == "function" then - package.preload[name] = loader - return true - end - end - return false - end -end +local moduleExists = pcall(require, "custom") -local loadIfExists = function(module) - if isModuleAvailable(module) then - require(module) - end +if moduleExists then + require "custom" end - -loadIfExists "custom" diff --git a/lua/core/hooks.lua b/lua/core/hooks.lua index 2602ff7..af70156 100644 --- a/lua/core/hooks.lua +++ b/lua/core/hooks.lua @@ -1,4 +1,4 @@ -local hooks, overrides, M = {}, {}, {} +local hooks, M = {}, {} local allowed_hooks = { "install_plugins", "setup_mappings", @@ -11,13 +11,11 @@ local function has_value(tab, val) return true end end - - return false end M.add = function(name, fn) if not (has_value(allowed_hooks, name)) then - error("Custom lua uses unallowed hook " .. name) + print("Custom lua uses unallowed hook " .. name) end if hooks[name] == nil then hooks[name] = {} @@ -26,43 +24,11 @@ M.add = function(name, fn) end M.run = function(name, args) - if hooks[name] == nil then - return - end - - for _, hook in pairs(hooks[name]) do - hook(args) - end -end - -M.createOverrides = function(module) - local O = {} - - O.get = function(name, default) - local current = default - if overrides[module] and overrides[module][name] then - if type(overrides[module][name]) == "function" then - current = overrides[module][name] - elseif type(overrides[module][name]) == "table" then - for _, override in pairs(overrides[module][name]) do - current = override(current) - end - end + if hooks[name] ~= nil then + for _, hook in pairs(hooks[name]) do + hook(args) end - return current end - - return O -end - -M.override = function(module, name, overwrite) - if overrides[module] == nil then - overrides[module] = {} - end - if overrides[module][name] == nil then - overrides[module][name] = {} - end - table.insert(overrides[module][name], overwrite) end return M diff --git a/lua/core/init.lua b/lua/core/init.lua index dc1198c..634087f 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -5,8 +5,6 @@ local core_modules = { "core.mappings", } -local hooks = require "core.hooks" - for _, module in ipairs(core_modules) do local ok, err = pcall(require, module) if not ok then @@ -16,5 +14,3 @@ end -- set all the non plugin mappings require("core.mappings").misc() - -hooks.run "ready" diff --git a/lua/core/options.lua b/lua/core/options.lua index 2438b16..5be456d 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -1,9 +1,6 @@ local opt = vim.opt local g = vim.g --- export user config as a global varibale -g.nvchad_user_config = "chadrc" - local options = require("core.utils").load_config().options opt.title = true diff --git a/lua/core/utils.lua b/lua/core/utils.lua index e9fbd1f..d7fa99b 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -154,7 +154,7 @@ M.load_config = function(reload) } local default_config = "core.default_config" - local config_name = vim.g.nvchad_user_config or "chadrc" + local config_name = "chadrc" local config_file = vim.fn.stdpath "config" .. "/lua/custom/" .. config_name .. ".lua" -- unload the modules if force reload diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index be12585..76fe1b0 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,5 +1,3 @@ -local overrides = require("core.hooks").createOverrides "lsp" - local function on_attach(_, bufnr) local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) @@ -62,7 +60,7 @@ lspSymbol("Information", "") lspSymbol("Hint", "") lspSymbol("Warning", "") -local lsp_publish_diagnostics_options = overrides.get("publish_diagnostics", { +vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { virtual_text = { prefix = "", spacing = 0, @@ -71,10 +69,6 @@ local lsp_publish_diagnostics_options = overrides.get("publish_diagnostics", { underline = true, update_in_insert = false, -- update diagnostics insert mode }) -vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( - vim.lsp.diagnostic.on_publish_diagnostics, - lsp_publish_diagnostics_options -) vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "single", }) From b4c50fa443279095f648630709400d38f1cb9809 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 13 Nov 2021 22:26:38 +0530 Subject: [PATCH 0841/1541] misc change in override function --- lua/plugins/init.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 283d05c..078233d 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -15,11 +15,9 @@ return packer.startup(function() -- if override or default_req start with `(`, then strip that and assume override calls a function, not a whole file local override_req = function(name, default_req) local override = require("core.utils").load_config().plugins.default_plugin_config_replace[name] - local result + local result = default_req - if override == nil then - result = default_req - else + if override ~= nil then result = override end From a256591e90cafdf397db7c1739c96837facc1fcc Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 13 Nov 2021 23:07:20 +0530 Subject: [PATCH 0842/1541] move plugin override function to utils | increase packer clone timeout --- lua/core/utils.lua | 23 +++++++++++++++++++++++ lua/plugins/init.lua | 33 ++++----------------------------- lua/plugins/packerInit.lua | 9 +++------ 3 files changed, 30 insertions(+), 35 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index d7fa99b..d3e0df5 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -356,4 +356,27 @@ M.fg_bg = function(group, fgcol, bgcol) cmd("hi " .. group .. " guifg=" .. fgcol .. " guibg=" .. bgcol) end +-- Override default config of a plugin based on the path provided in the chadrc + +-- FUNCTION: override_req, use `chadrc` plugin config override if present +-- name = name inside `default_config` / `chadrc` +-- default_req = run this if 'name' does not exist in `default_config` / `chadrc` +-- if override or default_req start with `(`, then strip that and assume override calls a function, not a whole file +M.override_req = function(name, default_req) + local override = require("core.utils").load_config().plugins.default_plugin_config_replace[name] + local result = default_req + + if override ~= nil then + result = override + end + + if string.match(result, "^%(") then + result = result:sub(2) + result = result:gsub("%)%.", "').", 1) + return "require('" .. result + else + return "require('" .. result .. "')" + end +end + return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 078233d..39a3c14 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -8,38 +8,13 @@ local use = packer.use return packer.startup(function() local plugin_settings = require("core.utils").load_config().plugins - - -- FUNCTION: override_req, use `chadrc` plugin config override if present - -- name = name inside `default_config` / `chadrc` - -- default_req = run this if 'name' does not exist in `default_config` / `chadrc` - -- if override or default_req start with `(`, then strip that and assume override calls a function, not a whole file - local override_req = function(name, default_req) - local override = require("core.utils").load_config().plugins.default_plugin_config_replace[name] - local result = default_req - - if override ~= nil then - result = override - end - - if string.match(result, "^%(") then - result = result:sub(2) - result = result:gsub("%)%.", "').", 1) - return "require('" .. result - else - return "require('" .. result .. "')" - end - end + local override_req = require("core.utils").override_req -- this is arranged on the basis of when a plugin starts -- this is the nvchad core repo containing utilities for some features like theme swticher, no need to lazy load - use { - "Nvchad/extensions", - } - - use { - "nvim-lua/plenary.nvim", - } + use "Nvchad/extensions" + use "nvim-lua/plenary.nvim" use { "wbthomason/packer.nvim", @@ -259,6 +234,6 @@ return packer.startup(function() require("core.mappings").telescope() end, } - + -- load user defined plugins require("core.hooks").run("install_plugins", use) end) diff --git a/lua/plugins/packerInit.lua b/lua/plugins/packerInit.lua index 964ff59..cafdd4f 100644 --- a/lua/plugins/packerInit.lua +++ b/lua/plugins/packerInit.lua @@ -1,6 +1,4 @@ -local cmd = vim.cmd - -cmd "packadd packer.nvim" +vim.cmd "packadd packer.nvim" local present, packer = pcall(require, "packer") @@ -19,7 +17,7 @@ if not present then packer_path, } - cmd "packadd packer.nvim" + vim.cmd "packadd packer.nvim" present, packer = pcall(require, "packer") if present then @@ -37,11 +35,10 @@ packer.init { prompt_border = "single", }, git = { - clone_timeout = 600, -- Timeout, in seconds, for git clones + clone_timeout = 6000, -- seconds }, auto_clean = true, compile_on_sync = true, - -- auto_reload_compiled = true } return packer From 8de3f4e84c5f4c41db3b3142734929cc89ed5b45 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 14 Nov 2021 06:49:33 +0530 Subject: [PATCH 0843/1541] restructure init.lua | lspconfig --- init.lua | 22 ++++++++++++++--- lua/core/custom.lua | 5 ---- lua/core/init.lua | 16 ------------ lua/core/utils.lua | 18 +++++++------- lua/plugins/configs/lspconfig.lua | 41 ++----------------------------- lua/plugins/configs/others.lua | 39 +++++++++++++++++++++++++++++ 6 files changed, 69 insertions(+), 72 deletions(-) delete mode 100644 lua/core/custom.lua delete mode 100644 lua/core/init.lua diff --git a/init.lua b/init.lua index 6ea9843..23322bd 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,21 @@ -local ok, err = pcall(require, "core") +local userconf = pcall(require, "custom") -if not ok then - error("Error loading core" .. "\n\n" .. err) +if userconf then + require "custom" end + +local core_modules = { + "core.options", + "core.autocmds", + "core.mappings", +} + +for _, module in ipairs(core_modules) do + local ok, err = pcall(require, module) + if not ok then + error("Error loading " .. module .. "\n\n" .. err) + end +end + +-- non plugin mappings +require("core.mappings").misc() diff --git a/lua/core/custom.lua b/lua/core/custom.lua deleted file mode 100644 index 44c1696..0000000 --- a/lua/core/custom.lua +++ /dev/null @@ -1,5 +0,0 @@ -local moduleExists = pcall(require, "custom") - -if moduleExists then - require "custom" -end diff --git a/lua/core/init.lua b/lua/core/init.lua deleted file mode 100644 index 634087f..0000000 --- a/lua/core/init.lua +++ /dev/null @@ -1,16 +0,0 @@ -local core_modules = { - "core.custom", - "core.options", - "core.autocmds", - "core.mappings", -} - -for _, module in ipairs(core_modules) do - local ok, err = pcall(require, module) - if not ok then - error("Error loading " .. module .. "\n\n" .. err) - end -end - --- set all the non plugin mappings -require("core.mappings").misc() diff --git a/lua/core/utils.lua b/lua/core/utils.lua index d3e0df5..37ffa68 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -258,13 +258,13 @@ M.merge_table = function(into, from, nodes_to_replace) -- function that will be executed with loadstring local replace_fn = function(node) local base_fn = [[ -return function(table1, table2) - local t1, t2 = table1_node or false , table2_node or false - if t1 and t2 then - table1_node = table2_node - end - return table1 -end]] + return function(table1, table2) + local t1, t2 = table1_node or false , table2_node or false + if t1 and t2 then + table1_node = table2_node + end + return table1 + end]] -- replace the _node in base_fn to actual given node value local fn = base_fn:gsub("_node", node) @@ -374,9 +374,9 @@ M.override_req = function(name, default_req) result = result:sub(2) result = result:gsub("%)%.", "').", 1) return "require('" .. result - else - return "require('" .. result .. "')" end + + return "require('" .. result .. "')" end return M diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 76fe1b0..391a9fb 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -50,48 +50,11 @@ capabilities.textDocument.completion.completionItem.resolveSupport = { }, } --- replace the default lsp diagnostic symbols -local function lspSymbol(name, icon) - vim.fn.sign_define("LspDiagnosticsSign" .. name, { text = icon, numhl = "LspDiagnosticsDefault" .. name }) -end - -lspSymbol("Error", "") -lspSymbol("Information", "") -lspSymbol("Hint", "") -lspSymbol("Warning", "") - -vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { - virtual_text = { - prefix = "", - spacing = 0, - }, - signs = true, - underline = true, - update_in_insert = false, -- update diagnostics insert mode -}) -vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { - border = "single", -}) -vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { - border = "single", -}) - --- suppress error messages from lang servers -vim.notify = function(msg, log_level, _opts) - if msg:match "exit code" then - return - end - if log_level == vim.log.levels.ERROR then - vim.api.nvim_err_writeln(msg) - else - vim.api.nvim_echo({ { msg } }, true, {}) - end -end - -- requires a file containing user's lspconfigs - local addlsp_confs = require("core.utils").load_config().plugins.options.lspconfig.setup_lspconf if #addlsp_confs ~= 0 then require(addlsp_confs).setup_lsp(on_attach, capabilities) end + +require("plugins.configs.others").lsp_handlers() diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index af24c60..9a55fab 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -107,4 +107,43 @@ M.signature = function() end end +M.lsp_handlers = function() + local function lspSymbol(name, icon) + vim.fn.sign_define("LspDiagnosticsSign" .. name, { text = icon, numhl = "LspDiagnosticsDefault" .. name }) + end + + lspSymbol("Error", "") + lspSymbol("Information", "") + lspSymbol("Hint", "") + lspSymbol("Warning", "") + + vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { + virtual_text = { + prefix = "", + spacing = 0, + }, + signs = true, + underline = true, + update_in_insert = false, -- update diagnostics insert mode + }) + vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { + border = "single", + }) + vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { + border = "single", + }) + + -- suppress error messages from lang servers + vim.notify = function(msg, log_level, _opts) + if msg:match "exit code" then + return + end + if log_level == vim.log.levels.ERROR then + vim.api.nvim_err_writeln(msg) + else + vim.api.nvim_echo({ { msg } }, true, {}) + end + end +end + return M From 5db36d44fb632e2d996721c3f8451fcda105359c Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 14 Nov 2021 06:57:49 +0530 Subject: [PATCH 0844/1541] restructure highlights.lua --- lua/colors/highlights.lua | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index c16675d..895a929 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -1,8 +1,8 @@ -local override = require("core.utils").load_config().ui.hl_override - local cmd = vim.cmd +local override = require("core.utils").load_config().ui.hl_override local colors = require("colors").get() +local ui = require("core.utils").load_config().ui local black = colors.black local black2 = colors.black2 @@ -23,8 +23,7 @@ local white = colors.white local yellow = colors.yellow local one_bg3 = colors.one_bg3 -local ui = require("core.utils").load_config().ui - +-- functions for setting highlights local fg = require("core.utils").fg local fg_bg = require("core.utils").fg_bg local bg = require("core.utils").bg @@ -126,20 +125,20 @@ fg("NvimTreeVertSplit", darker_black) bg("NvimTreeVertSplit", darker_black) fg_bg("NvimTreeWindowPicker", red, black2) --- Disable some highlight in nvim tree if transparency enabled -if ui.transparency then - bg("NvimTreeNormal", "NONE") - bg("NvimTreeStatusLineNC", "NONE") - bg("NvimTreeVertSplit", "NONE") - fg("NvimTreeVertSplit", grey) -end - -- Telescope fg("TelescopeBorder", one_bg) fg_bg("TelescopePreviewTitle", green, one_bg) fg_bg("TelescopePromptTitle", blue, one_bg) fg_bg("TelescopeResultsTitle", red, one_bg) +-- Disable some highlight in nvim tree if transparency enabled +if ui.transparency then + bg("NvimTreeNormal", "NONE") + bg("NvimTreeStatusLineNC", "NONE") + bg("NvimTreeVertSplit", "NONE") + fg("NvimTreeVertSplit", grey) + end + if #override ~= 0 then require(override) end From bdd6dc12c27208ed34af6948eec5f7d20a2b16b1 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 14 Nov 2021 12:43:36 +0530 Subject: [PATCH 0845/1541] restructure | clean default_config --- lua/core/default_config.lua | 127 ++++++++++++++++++++---------------- lua/core/hooks.lua | 1 + lua/core/mappings.lua | 16 ++--- lua/core/utils.lua | 9 ++- 4 files changed, 83 insertions(+), 70 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 9b087cf..fde5bd9 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -4,9 +4,10 @@ local M = {} M.options, M.ui, M.mappings, M.plugins = {}, {}, {}, {} --- non plugin normal, available without any plugins M.options = { - -- NeoVim/Vim options + -- custom = {} + -- general nvim/vim options , check :h optionname to know more about an option + clipboard = "unnamedplus", cmdheight = 1, ruler = false, @@ -16,17 +17,16 @@ M.options = { mapleader = " ", mouse = "a", number = true, - -- relative numbers in normal mode tool at the bottom of options.lua numberwidth = 2, relativenumber = false, expandtab = true, shiftwidth = 2, smartindent = true, - tabstop = 8, -- Number of spaces that a in the file counts for + tabstop = 8, timeoutlen = 400, - -- interval for writing swap file to disk, also used by gitsigns updatetime = 250, - undofile = true, -- keep a permanent undo (across restarts) + undofile = true, + -- NvChad options nvChad = { copy_cut = true, -- copy cut text ( x key ), visual and normal mode @@ -34,43 +34,46 @@ M.options = { insert_nav = true, -- navigation in insertmode window_nav = true, theme_toggler = false, - -- used for updater + + -- updater update_url = "https://github.com/NvChad/NvChad", update_branch = "main", }, } --- ui configs +---- UI ----- + M.ui = { - hl_override = "", -- path of your file which contains highlight stuffs + hl_override = "", -- path of your file that contains highlights italic_comments = false, - -- theme to be used, check available themes with ` + t + h` - theme = "onedark", + theme = "onedark", -- default theme -- toggle between two themes, see theme_toggler mappings theme_toggler = { "onedark", "gruvchad", }, - -- Enable this only if your terminal has the colorscheme set which nvchad uses + + -- Change terminal bg to nvim theme's bg color so it'll match well -- For Ex : if you have onedark set in nvchad, set onedark's bg color on your terminal transparency = false, } --- these are plugin related options +---- PLUGIN OPTIONS ---- + M.plugins = { - -- enable and disable plugins (false for disable) + -- enable/disable plugins (false for disable) status = { - blankline = true, -- show code scope with symbols - bufferline = true, -- list open buffers up the top, easy switching too + blankline = true, -- indentline stuff + bufferline = true, -- manage and preview opened buffers colorizer = false, -- color RGB, HEX, CSS, NAME color codes comment = true, -- easily (un)comment code, language aware - dashboard = false, -- NeoVim 'home screen' on open + dashboard = false, esc_insertmode = true, -- map to with no lag feline = true, -- statusline - gitsigns = true, -- gitsigns in statusline + gitsigns = true, lspsignature = true, -- lsp enhancements - telescope_media = false, -- media previews within telescope finders - vim_matchup = true, -- % operator enhancements + telescope_media = false, + vim_matchup = true, -- improved matchit cmp = true, nvimtree = true, autopairs = true, @@ -86,39 +89,46 @@ M.plugins = { luasnip = { snippet_path = {}, }, - statusline = { -- statusline related options - -- these are filetypes, not pattern matched - -- shown filetypes will overrule hidden filetypes + statusline = { + -- hide, show on specific filetypes hidden = { "help", "dashboard", "NvimTree", "terminal", }, - -- show short statusline on small screens - shortline = true, shown = {}, - -- default, round , slant , block , arrow - style = "default", + + -- truncate statusline on small screens + shortline = true, + style = "default", -- default, round , slant , block , arrow }, esc_insertmode_timeout = 300, }, default_plugin_config_replace = {}, } --- mappings -- don't use a single keymap twice -- --- non plugin mappings +-- Don't use a single keymap twice + +--- MAPPINGS ---- + +-- non plugin M.mappings = { - -- custom = {}, -- all custom user mappings - -- close current focused buffer - close_buffer = "x", - copy_whole_file = "", -- copy all contents of the current buffer - line_number_toggle = "n", -- show or hide line number - new_buffer = "", -- open a new buffer - new_tab = "b", -- open a new vim tab - save_file = "", -- save file using :w - theme_toggler = "tt", -- for theme toggler, see in ui.theme_toggler + -- custom = {}, -- custom user mappings + + misc = { + close_buffer = "x", + copy_whole_file = "", -- copy all contents of current buffer + line_number_toggle = "n", -- toggle line number + update_nvchad = "uu", + new_buffer = "", + new_tab = "b", + save_file = "", -- save file using :w + theme_toggler = "tt", -- see in ui.theme_toggler + }, + -- navigation in insert mode, only if enabled in options + insert_nav = { backward = "", end_of_line = "", @@ -127,60 +137,63 @@ M.mappings = { prev_line = "", beginning_of_line = "", }, - --better window movement + + -- better window movement window_nav = { moveLeft = "", moveRight = "", moveUp = "", moveDown = "", }, + -- terminal related mappings terminal = { - -- multiple mappings can be given for esc_termmode and esc_hide_termmode + -- multiple mappings can be given for esc_termmode, esc_hide_termmode + -- get out of terminal mode - esc_termmode = { "jk" }, -- multiple mappings allowed + esc_termmode = { "jk" }, + -- get out of terminal mode and hide it - esc_hide_termmode = { "JK" }, -- multiple mappings allowed + esc_hide_termmode = { "JK" }, -- show & recover hidden terminal buffers in a telescope picker pick_term = "W", - -- below three are for spawning terminals + + -- spawn terminals new_horizontal = "h", new_vertical = "v", new_window = "w", }, - -- update nvchad from nvchad, chadness 101 - update_nvchad = "uu", } --- all plugins related mappings +-- plugins related mappings + M.mappings.plugins = { - -- list open buffers up the top, easy switching too bufferline = { - next_buffer = "", -- next buffer - prev_buffer = "", -- previous buffer + next_buffer = "", + prev_buffer = "", }, - -- easily (un)comment code, language aware comment = { - toggle = "/", -- toggle comment (works on multiple lines) + toggle = "/", }, - -- NeoVim 'home screen' on open + dashboard = { bookmarks = "bm", new_file = "fn", -- basically create a new buffer open = "db", -- open dashboard - session_load = "l", -- load a saved session - session_save = "s", -- save a session + session_load = "l", + session_save = "s", }, + -- map to with no lag better_escape = { -- will still work esc_insertmode = { "jk" }, -- multiple mappings allowed }, - -- file explorer/tree + nvimtree = { toggle = "", focus = "e", }, - -- multitool for finding & picking things + telescope = { buffers = "fb", find_files = "ff", @@ -191,7 +204,7 @@ M.mappings.plugins = { live_grep = "fw", oldfiles = "fo", themes = "th", -- NvChad theme picker - -- media previews within telescope finders + telescope_media = { media_files = "fp", }, diff --git a/lua/core/hooks.lua b/lua/core/hooks.lua index af70156..02394a1 100644 --- a/lua/core/hooks.lua +++ b/lua/core/hooks.lua @@ -1,4 +1,5 @@ local hooks, M = {}, {} + local allowed_hooks = { "install_plugins", "setup_mappings", diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index cf9d2a0..3e0162b 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -68,19 +68,19 @@ M.misc = function() if nvChad_options.theme_toggler then map( "n", - maps.theme_toggler, + maps.misc.theme_toggler, ":lua require('nvchad').toggle_theme(require('core.utils').load_config().ui.theme_toggler) " ) end end local function required_mappings() - map("n", maps.close_buffer, ":lua require('core.utils').close_buffer() ") -- close buffer - map("n", maps.copy_whole_file, ":%y+ ") -- copy whole file content - map("n", maps.new_buffer, ":enew ") -- new buffer - map("n", maps.new_tab, ":tabnew ") -- new tabs - map("n", maps.line_number_toggle, ":set nu! ") -- toggle numbers - map("n", maps.save_file, ":w ") -- ctrl + s to save file + map("n", maps.misc.close_buffer, ":lua require('core.utils').close_buffer() ") -- close buffer + map("n", maps.misc.copy_whole_file, ":%y+ ") -- copy whole file content + map("n", maps.misc.new_buffer, ":enew ") -- new buffer + map("n", maps.misc.new_tab, ":tabnew ") -- new tabs + map("n", maps.misc.line_number_toggle, ":set nu! ") -- toggle numbers + map("n", maps.misc.save_file, ":w ") -- ctrl + s to save file -- terminal mappings -- local term_maps = maps.terminal @@ -107,7 +107,7 @@ M.misc = function() -- add NvChadUpdate command and mapping cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" - map("n", maps.update_nvchad, ":NvChadUpdate ") + map("n", maps.misc.update_nvchad, ":NvChadUpdate ") -- add ChadReload command and maping -- cmd "silent! command! NvChadReload lua require('nvchad').reload_config()" diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 37ffa68..be6da90 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -154,13 +154,12 @@ M.load_config = function(reload) } local default_config = "core.default_config" - local config_name = "chadrc" - local config_file = vim.fn.stdpath "config" .. "/lua/custom/" .. config_name .. ".lua" + local config_file = vim.fn.stdpath "config" .. "/lua/custom/" .. "chadrc.lua" -- unload the modules if force reload if reload then package.loaded[default_config or false] = nil - package.loaded[config_name or false] = nil + package.loaded["chadrc" or false] = nil end -- don't enclose in pcall, it better break when default config is faulty @@ -171,7 +170,7 @@ M.load_config = function(reload) -- print warning texts if user config file is present -- check if the user config is present if vim.fn.filereadable(vim.fn.glob(config_file)) == 1 then - local present, config = pcall(require, "custom/" .. config_name) + local present, config = pcall(require, "custom/chadrc") if present then -- make sure the returned value is table if type(config) == "table" then @@ -182,7 +181,7 @@ M.load_config = function(reload) to_replace ) else - print("Warning: " .. config_name .. " sourced successfully but did not return a lua table.") + print("Warning: chadrc " .. " sourced successfully but did not return a lua table.") end else print("Warning: " .. config_file .. " is present but sourcing failed.") From e8b919723e57beb1aa8d9886dfd2447c3d925968 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 14 Nov 2021 18:23:59 +0530 Subject: [PATCH 0846/1541] add cheatsheet.nvim --- lua/colors/highlights.lua | 2 +- lua/core/default_config.lua | 7 +++++ lua/core/mappings.lua | 11 ++++++++ lua/plugins/configs/cheatsheet.lua | 45 ++++++++++++++++++++++++++++++ lua/plugins/init.lua | 14 +++++++++- 5 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 lua/plugins/configs/cheatsheet.lua diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 895a929..46823d2 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -137,7 +137,7 @@ if ui.transparency then bg("NvimTreeStatusLineNC", "NONE") bg("NvimTreeVertSplit", "NONE") fg("NvimTreeVertSplit", grey) - end +end if #override ~= 0 then require(override) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index fde5bd9..91147f9 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -67,6 +67,7 @@ M.plugins = { bufferline = true, -- manage and preview opened buffers colorizer = false, -- color RGB, HEX, CSS, NAME color codes comment = true, -- easily (un)comment code, language aware + cheatsheet = true, dashboard = false, esc_insertmode = true, -- map to with no lag feline = true, -- statusline @@ -172,6 +173,12 @@ M.mappings.plugins = { next_buffer = "", prev_buffer = "", }, + + cheatsheet = { + default_keys = "dk", + user_keys = "uk", + }, + comment = { toggle = "/", }, diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 3e0162b..37a1a73 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -169,4 +169,15 @@ M.telescope_media = function() map("n", m.media_files, ":Telescope media_files ") end +M.cheatsheet = function() + local m = plugin_maps.cheatsheet + + map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope() ") + map( + "n", + m.user_keys, + ":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false } " + ) +end + return M diff --git a/lua/plugins/configs/cheatsheet.lua b/lua/plugins/configs/cheatsheet.lua new file mode 100644 index 0000000..aece17c --- /dev/null +++ b/lua/plugins/configs/cheatsheet.lua @@ -0,0 +1,45 @@ +local present, cheatsheet = pcall(require, "cheatsheet") + +if not present then + return +end + +local mappings = require("core.utils").load_config().mappings + +-- add user mappings to the cheetsheet +-- improve this function to not hardcode plugin +local function add_to_cheatsheet(section, keymap, desc) + if section == "plugins" then + for sec, key in pairs(mappings.plugins) do + add_to_cheatsheet(sec, key, sec) + end + + else + if type(keymap) == "table" then + for sec, key in pairs(keymap) do + if type(sec) == "number" then + add_to_cheatsheet(section, key, desc or section) + else + add_to_cheatsheet(sec, key, desc or section) + end + end + else + cheatsheet.add_cheat(section, keymap, desc or "Misc") + end + end +end + +for section, keymap in pairs(mappings) do + add_to_cheatsheet(section, keymap) +end + +require("cheatsheet").setup { + + bundled_cheatsheets = { + enabled = { "default" }, + disabled = { "unicode", "nerd-fonts" }, + }, + + bundled_plugin_cheatsheets = false, + include_only_installed_plugins = true, +} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 39a3c14..6825cf0 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -234,6 +234,18 @@ return packer.startup(function() require("core.mappings").telescope() end, } - -- load user defined plugins + + use { + "sudormrfbin/cheatsheet.nvim", + disable = not plugin_settings.status.cheatsheet, + module = "cheatsheet", + config = function() + require "plugins.configs.cheatsheet" + end, + setup = function() + require("core.mappings").cheatsheet() + end, + } + require("core.hooks").run("install_plugins", use) end) From 1567a9c73a7e1f25ca571db53cd6e430813bef37 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 15 Nov 2021 21:39:35 +0530 Subject: [PATCH 0847/1541] use tbl_deep_extend to merge configs | rm other functions --- lua/core/default_config.lua | 1 - lua/core/utils.lua | 138 +++------------------------------- lua/custom/example_chadrc.lua | 37 +-------- 3 files changed, 14 insertions(+), 162 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 91147f9..c7c3ba8 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -2,7 +2,6 @@ -- use custom/chadrc.lua instead local M = {} -M.options, M.ui, M.mappings, M.plugins = {}, {}, {}, {} M.options = { -- custom = {} diff --git a/lua/core/utils.lua b/lua/core/utils.lua index be6da90..ee1002e 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -137,57 +137,21 @@ M.hide_statusline = function() end end --- load config --- 1st arg = boolean - whether to force reload --- Modifies _G._NVCHAD_CONFIG global variable M.load_config = function(reload) - -- only do the stuff below one time, otherwise just return the set config - if _G._NVCHAD_CONFIG_CONTENTS ~= nil and not (reload or false) then - return _G._NVCHAD_CONFIG_CONTENTS - end + local conf = require "core.default_config" - -- these are the table value which will be always prioritiezed to take user config value - local to_replace = { - "['mappings']['plugins']['esc_insertmode']", - "['mappings']['terminal']['esc_termmode']", - "['mappings']['terminal']['esc_hide_termmode']", - } + local chadrcExists, _ = pcall(require, "custom.chadrc") - local default_config = "core.default_config" - local config_file = vim.fn.stdpath "config" .. "/lua/custom/" .. "chadrc.lua" +-- if chadrc exists , then merge its table into the default config's - -- unload the modules if force reload - if reload then - package.loaded[default_config or false] = nil - package.loaded["chadrc" or false] = nil - end +if chadrcExists then + local change = require "custom.chadrc" + conf = vim.tbl_deep_extend("force", conf, change) + return conf +end - -- don't enclose in pcall, it better break when default config is faulty - _G._NVCHAD_CONFIG_CONTENTS = require(default_config) - - -- user config is not required to run nvchad but a optional - -- Make sure the config doesn't break the whole system if user config is not present or in bad state or not a table - -- print warning texts if user config file is present - -- check if the user config is present - if vim.fn.filereadable(vim.fn.glob(config_file)) == 1 then - local present, config = pcall(require, "custom/chadrc") - if present then - -- make sure the returned value is table - if type(config) == "table" then - -- data = require(config_name) - _G._NVCHAD_CONFIG_CONTENTS = require("core.utils").merge_table( - _G._NVCHAD_CONFIG_CONTENTS, - config, - to_replace - ) - else - print("Warning: chadrc " .. " sourced successfully but did not return a lua table.") - end - else - print("Warning: " .. config_file .. " is present but sourcing failed.") - end - end - return _G._NVCHAD_CONFIG_CONTENTS +-- or load default config + return conf end M.map = function(mode, keys, cmd, opt) @@ -238,88 +202,6 @@ M.map = function(mode, keys, cmd, opt) map_wrapper(mode, keys, cmd, options) end --- Base code: https://gist.github.com/revolucas/184aec7998a6be5d2f61b984fac1d7f7 --- Changes over it: preserving table 1 contents and also update with table b, without duplicating --- 1st arg - base table --- 2nd arg - table to merge --- 3rg arg - list of nodes as a table, if the node is found replace the from table2 to result, rather than adding the value --- e.g: merge_table(t1, t2, { ['mappings']['plugins']['bufferline'] }) -M.merge_table = function(into, from, nodes_to_replace) - -- make sure both are table - if type(into) ~= "table" or type(from) ~= "table" then - return into - end - - local stack, seen = {}, {} - local table1, table2 = into, from - - if type(nodes_to_replace) == "table" then - -- function that will be executed with loadstring - local replace_fn = function(node) - local base_fn = [[ - return function(table1, table2) - local t1, t2 = table1_node or false , table2_node or false - if t1 and t2 then - table1_node = table2_node - end - return table1 - end]] - - -- replace the _node in base_fn to actual given node value - local fn = base_fn:gsub("_node", node) - -- return the function created from the string base_fn - return loadstring(fn)()(table1, table2) - end - - for _, node in ipairs(nodes_to_replace) do - -- pcall() is a poor workaround for if "['mappings']['plugins']['esc_insertmode']" 'plugins' sub-table does not exist - local ok, result = pcall(replace_fn, node) - if ok then - -- if the node is found then replace - table1 = result - end - end - end - - while true do - for k, v in pairs(table2) do - if type(v) == "table" and type(table1[k]) == "table" then - table.insert(stack, { table1[k], table2[k] }) - else - local present = seen[v] or false - if not present then - if type(k) == "number" then - -- add the value to seen table until value is found - -- only do when key is number we just want to append to subtables - -- todo: maybe improve this - - for _, value in pairs(table1) do - if value == v then - present = true - break - end - end - seen[v] = true - if not present then - table1[#table1 + 1] = v - end - else - table1[k] = v - end - end - end - end - if #stack > 0 then - local t = stack[#stack] - table1, table2 = t[1], t[2] - stack[#stack] = nil - else - break - end - end - return into -end - -- load plugin after entering vim ui M.packer_lazy_load = function(plugin, timer) if plugin then diff --git a/lua/custom/example_chadrc.lua b/lua/custom/example_chadrc.lua index 02d5566..f503361 100644 --- a/lua/custom/example_chadrc.lua +++ b/lua/custom/example_chadrc.lua @@ -1,39 +1,10 @@ --- IMPORTANT NOTE : This is the user config, can be edited. Will be preserved if updated with internal updater --- This file is for NvChad options & tools, custom settings are split between here and 'lua/custom/init.lua' - local M = {} -M.options, M.ui, M.mappings, M.plugins = {}, {}, {}, {} --- NOTE: To use this, make a copy with `cp example_chadrc.lua chadrc.lua` +-- make sure you maintain the structure of `core/default_config.lua` here, +-- example of changing theme: --------------------------------------------------------------------- - --- To use this file, copy the structure of `core/default_config.lua`, --- examples of setting relative number & changing theme: - --- M.options = { --- relativenumber = true, --- } - --- M.ui = { --- theme = "nord" --- } - --- NvChad included plugin options & overrides -M.plugins = { - options = { - -- lspconfig = { - -- path of file containing setups of different lsps (ex : "custom.plugins.lspconfig"), read the docs for more info - -- setup_lspconf = "", - -- }, - }, - -- To change the Packer `config` of a plugin that comes with NvChad, - -- add a table entry below matching the plugin github name - -- '-' -> '_', remove any '.lua', '.nvim' extensions - -- this string will be called in a `require` - -- use "(custom.configs).my_func()" to call a function - -- use "custom.blankline" to call a file - default_plugin_config_replace = {}, +M.ui = { + theme = "gruvchad", } return M From aa9667a5de855c271eab255e87d3d0b40d337235 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 15 Nov 2021 22:51:51 +0530 Subject: [PATCH 0848/1541] Revert "add cheatsheet.nvim" This reverts commit e8b919723e57beb1aa8d9886dfd2447c3d925968. --- lua/colors/highlights.lua | 2 +- lua/core/default_config.lua | 7 ----- lua/core/mappings.lua | 11 -------- lua/plugins/configs/cheatsheet.lua | 45 ------------------------------ lua/plugins/init.lua | 14 +--------- 5 files changed, 2 insertions(+), 77 deletions(-) delete mode 100644 lua/plugins/configs/cheatsheet.lua diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 46823d2..895a929 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -137,7 +137,7 @@ if ui.transparency then bg("NvimTreeStatusLineNC", "NONE") bg("NvimTreeVertSplit", "NONE") fg("NvimTreeVertSplit", grey) -end + end if #override ~= 0 then require(override) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index c7c3ba8..6c73a9d 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -66,7 +66,6 @@ M.plugins = { bufferline = true, -- manage and preview opened buffers colorizer = false, -- color RGB, HEX, CSS, NAME color codes comment = true, -- easily (un)comment code, language aware - cheatsheet = true, dashboard = false, esc_insertmode = true, -- map to with no lag feline = true, -- statusline @@ -172,12 +171,6 @@ M.mappings.plugins = { next_buffer = "", prev_buffer = "", }, - - cheatsheet = { - default_keys = "dk", - user_keys = "uk", - }, - comment = { toggle = "/", }, diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 37a1a73..3e0162b 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -169,15 +169,4 @@ M.telescope_media = function() map("n", m.media_files, ":Telescope media_files ") end -M.cheatsheet = function() - local m = plugin_maps.cheatsheet - - map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope() ") - map( - "n", - m.user_keys, - ":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false } " - ) -end - return M diff --git a/lua/plugins/configs/cheatsheet.lua b/lua/plugins/configs/cheatsheet.lua deleted file mode 100644 index aece17c..0000000 --- a/lua/plugins/configs/cheatsheet.lua +++ /dev/null @@ -1,45 +0,0 @@ -local present, cheatsheet = pcall(require, "cheatsheet") - -if not present then - return -end - -local mappings = require("core.utils").load_config().mappings - --- add user mappings to the cheetsheet --- improve this function to not hardcode plugin -local function add_to_cheatsheet(section, keymap, desc) - if section == "plugins" then - for sec, key in pairs(mappings.plugins) do - add_to_cheatsheet(sec, key, sec) - end - - else - if type(keymap) == "table" then - for sec, key in pairs(keymap) do - if type(sec) == "number" then - add_to_cheatsheet(section, key, desc or section) - else - add_to_cheatsheet(sec, key, desc or section) - end - end - else - cheatsheet.add_cheat(section, keymap, desc or "Misc") - end - end -end - -for section, keymap in pairs(mappings) do - add_to_cheatsheet(section, keymap) -end - -require("cheatsheet").setup { - - bundled_cheatsheets = { - enabled = { "default" }, - disabled = { "unicode", "nerd-fonts" }, - }, - - bundled_plugin_cheatsheets = false, - include_only_installed_plugins = true, -} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 6825cf0..39a3c14 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -234,18 +234,6 @@ return packer.startup(function() require("core.mappings").telescope() end, } - - use { - "sudormrfbin/cheatsheet.nvim", - disable = not plugin_settings.status.cheatsheet, - module = "cheatsheet", - config = function() - require "plugins.configs.cheatsheet" - end, - setup = function() - require("core.mappings").cheatsheet() - end, - } - + -- load user defined plugins require("core.hooks").run("install_plugins", use) end) From 3330d1cc06f79625c01f6eb4b3d01ec9a42985d6 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 17 Nov 2021 11:00:57 +0530 Subject: [PATCH 0849/1541] clean up! --- lua/colors/highlights.lua | 10 +++--- lua/colors/init.lua | 4 +-- lua/core/mappings.lua | 3 -- lua/core/utils.lua | 20 +++++------ lua/plugins/configs/bufferline.lua | 9 +++-- lua/plugins/configs/cmp.lua | 9 ++--- lua/plugins/configs/gitsigns.lua | 34 ------------------ lua/plugins/configs/lspkind_icons.lua | 6 ++-- lua/plugins/configs/nvimtree.lua | 8 ++--- lua/plugins/configs/others.lua | 51 ++++++++++++++++----------- lua/plugins/configs/statusline.lua | 11 +++--- lua/plugins/configs/telescope.lua | 1 + lua/plugins/configs/treesitter.lua | 1 + lua/plugins/init.lua | 2 +- 14 files changed, 68 insertions(+), 101 deletions(-) delete mode 100644 lua/plugins/configs/gitsigns.lua diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 895a929..d460a64 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -82,9 +82,11 @@ fg("DashboardHeader", grey_fg) fg("DashboardShortcut", grey_fg) -- Git signs -fg_bg("DiffAdd", nord_blue, "none") -fg_bg("DiffChange", grey_fg, "none") -fg_bg("DiffModified", nord_blue, "none") +fg_bg("DiffAdd", blue, "NONE") +fg_bg("DiffChange", grey_fg, "NONE") +fg_bg("DiffChangeDelete", red, "NONE") +fg_bg("DiffModified", red, "NONE") +fg_bg("DiffDelete", red, "NONE") -- Indent blankline plugin fg("IndentBlanklineChar", line) @@ -137,7 +139,7 @@ if ui.transparency then bg("NvimTreeStatusLineNC", "NONE") bg("NvimTreeVertSplit", "NONE") fg("NvimTreeVertSplit", grey) - end +end if #override ~= 0 then require(override) diff --git a/lua/colors/init.lua b/lua/colors/init.lua index 3b23c86..1de4a62 100644 --- a/lua/colors/init.lua +++ b/lua/colors/init.lua @@ -19,9 +19,7 @@ M.init = function(theme) package.loaded["colors.highlights" or false] = nil -- then load the highlights require "colors.highlights" - else - return false - end + end end -- returns a table of colors for givem or current theme diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 3e0162b..e192ea5 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -108,9 +108,6 @@ M.misc = function() -- add NvChadUpdate command and mapping cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" map("n", maps.misc.update_nvchad, ":NvChadUpdate ") - - -- add ChadReload command and maping - -- cmd "silent! command! NvChadReload lua require('nvchad').reload_config()" end non_config_mappings() diff --git a/lua/core/utils.lua b/lua/core/utils.lua index ee1002e..41c70e1 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -132,25 +132,25 @@ M.hide_statusline = function() if vim.tbl_contains(hidden, buftype) then api.nvim_set_option("laststatus", 0) return - else - api.nvim_set_option("laststatus", 2) end + + api.nvim_set_option("laststatus", 2) end -M.load_config = function(reload) +M.load_config = function() local conf = require "core.default_config" local chadrcExists, _ = pcall(require, "custom.chadrc") --- if chadrc exists , then merge its table into the default config's + -- if chadrc exists , then merge its table into the default config's -if chadrcExists then - local change = require "custom.chadrc" - conf = vim.tbl_deep_extend("force", conf, change) - return conf -end + if chadrcExists then + local change = require "custom.chadrc" + conf = vim.tbl_deep_extend("force", conf, change) + return conf + end --- or load default config + -- or load default config return conf end diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index cda1a7a..a396ed4 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -10,7 +10,6 @@ bufferline.setup { offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, buffer_close_icon = "", modified_icon = "", - -- close_icon = "%@NvChad_bufferline_quitvim@%X", close_icon = "", show_close_icon = true, left_trunc_marker = "", @@ -24,7 +23,7 @@ bufferline.setup { show_buffer_close_icons = true, separator_style = "thin", always_show_bufferline = true, - diagnostics = false, -- "or nvim_lsp" + diagnostics = false, custom_filter = function(buf_number) -- Func to filter out our managed/persistent split terms local present_type, type = pcall(function() @@ -36,12 +35,11 @@ bufferline.setup { return false elseif type == "hori" then return false - else - return true end - else return true end + + return true end, }, @@ -121,6 +119,7 @@ bufferline.setup { guifg = colors.black2, guibg = colors.black2, }, + -- tabs tab = { guifg = colors.light_grey, diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index eab3bd2..80e2df4 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -6,7 +6,6 @@ end vim.opt.completeopt = "menuone,noselect" --- nvim-cmp setup cmp.setup { snippet = { expand = function(args) @@ -15,12 +14,8 @@ cmp.setup { }, formatting = { format = function(entry, vim_item) - -- load lspkind icons - vim_item.kind = string.format( - "%s %s", - require("plugins.configs.lspkind_icons").icons[vim_item.kind], - vim_item.kind - ) + local icons = require "plugins.configs.lspkind_icons" + vim_item.kind = string.format("%s %s", icons[vim_item.kind], vim_item.kind) vim_item.menu = ({ nvim_lsp = "[LSP]", diff --git a/lua/plugins/configs/gitsigns.lua b/lua/plugins/configs/gitsigns.lua deleted file mode 100644 index f2b58f6..0000000 --- a/lua/plugins/configs/gitsigns.lua +++ /dev/null @@ -1,34 +0,0 @@ -local present, gitsigns = pcall(require, "gitsigns") -if not present then - return -end - -gitsigns.setup { - keymaps = { - -- Default keymap options - buffer = true, - noremap = true, - ["n ]c"] = { expr = true, "&diff ? ']c' : 'lua require\"gitsigns\".next_hunk()'" }, - ["n [c"] = { expr = true, "&diff ? '[c' : 'lua require\"gitsigns\".prev_hunk()'" }, - ["n hs"] = 'lua require"gitsigns".stage_hunk()', - ["n hu"] = 'lua require"gitsigns".undo_stage_hunk()', - ["n hr"] = 'lua require"gitsigns".reset_hunk()', - ["n hp"] = 'lua require"gitsigns".preview_hunk()', - ["n hb"] = 'lua require"gitsigns".blame_line()', - }, - numhl = false, - - sign_priority = 5, - signs = { - add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, - change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, - changedelete = { hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr" }, - delete = { hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr" }, - topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, - }, - - status_formatter = nil, -- Use default - watch_gitdir = { - interval = 100, - }, -} diff --git a/lua/plugins/configs/lspkind_icons.lua b/lua/plugins/configs/lspkind_icons.lua index dd775b7..ea584ae 100644 --- a/lua/plugins/configs/lspkind_icons.lua +++ b/lua/plugins/configs/lspkind_icons.lua @@ -1,6 +1,4 @@ -local M = {} - -M.icons = { +local icons = { Text = "", Method = "", Function = "", @@ -28,4 +26,4 @@ M.icons = { TypeParameter = "", } -return M +return icons diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 95b0319..e741d69 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -17,10 +17,9 @@ g.nvim_tree_indent_markers = 1 g.nvim_tree_ignore = { ".git", "node_modules", ".cache" } g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" } --- + g.nvim_tree_show_icons = { folders = 1, - -- folder_arrows= 1 files = 1, git = git_status, } @@ -38,11 +37,8 @@ g.nvim_tree_icons = { untracked = "★", }, folder = { - -- disable indent_markers option to get arrows working or if you want both arrows and indent then just add the arrow icons in front ofthe default and opened folders below! - -- arrow_open = "", - -- arrow_closed = "", default = "", - empty = "", --  + empty = "", empty_open = "", open = "", symlink = "", diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 9a55fab..e44ed8e 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -1,19 +1,17 @@ local M = {} local chadrc_config = require("core.utils").load_config() + M.autopairs = function() local present1, autopairs = pcall(require, "nvim-autopairs") local present2, cmp_autopairs = pcall(require, "nvim-autopairs.completion.cmp") - if not (present1 or present2) then - return + if present1 and present2 then + autopairs.setup() + + local cmp = require "cmp" + cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) end - - autopairs.setup() - - -- not needed if you disable cmp, the above var related to cmp tooo! override default config for autopairs - local cmp = require "cmp" - cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) end M.better_escape = function() @@ -71,17 +69,15 @@ end M.luasnip = function() local present, luasnip = pcall(require, "luasnip") - if not present then - return + if present then + luasnip.config.set_config { + history = true, + updateevents = "TextChanged,TextChangedI", + } + + require("luasnip/loaders/from_vscode").load { paths = chadrc_config.plugins.options.luasnip.snippet_path } + require("luasnip/loaders/from_vscode").load() end - - luasnip.config.set_config { - history = true, - updateevents = "TextChanged,TextChangedI", - } - - require("luasnip/loaders/from_vscode").load { paths = chadrc_config.plugins.options.luasnip.snippet_path } - require("luasnip/loaders/from_vscode").load() end M.signature = function() @@ -114,8 +110,8 @@ M.lsp_handlers = function() lspSymbol("Error", "") lspSymbol("Information", "") - lspSymbol("Hint", "") - lspSymbol("Warning", "") + lspSymbol("Hint", "") + lspSymbol("Warning", "") vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { virtual_text = { @@ -146,4 +142,19 @@ M.lsp_handlers = function() end end +M.gitsigns = function() + local present, gitsigns = pcall(require, "gitsigns") + if present then + gitsigns.setup { + signs = { + add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, + change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, + delete = { hl = "DiffDelete", text = "", numhl = "GitSignsDeleteNr" }, + topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, + changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" }, + }, + } + end +end + return M diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 0a8f4aa..b7bf633 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -43,10 +43,12 @@ local icon_styles = { } local config = require("core.utils").load_config().plugins.options.statusline + -- statusline style local user_statusline_style = config.style local statusline_style = icon_styles[user_statusline_style] --- if show short statusline on small screens + +-- show short statusline on small screens local shortline = config.shortline == false and true -- Initialize the components table @@ -55,7 +57,6 @@ local components = { inactive = {}, } --- Initialize left, mid and right table.insert(components.active, {}) table.insert(components.active, {}) table.insert(components.active, {}) @@ -186,6 +187,7 @@ components.active[1][10] = { components.active[2][1] = { provider = function() local Lsp = vim.lsp.util.get_progress_messages()[1] + if Lsp then local msg = Lsp.message or "" local percentage = Lsp.percentage or 0 @@ -207,10 +209,11 @@ components.active[2][1] = { if percentage >= 70 then return string.format(" %%<%s %s %s (%s%%%%) ", success_icon[frame + 1], title, msg, percentage) - else - return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage) end + + return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage) end + return "" end, enabled = shortline or function(winid) diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 6db93db..c29b28d 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -1,4 +1,5 @@ local present, telescope = pcall(require, "telescope") + if not present then return end diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index 42ab87e..a9a7f49 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -1,4 +1,5 @@ local present, ts_config = pcall(require, "nvim-treesitter.configs") + if not present then return end diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 39a3c14..5a7fa7b 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -78,7 +78,7 @@ return packer.startup(function() "lewis6991/gitsigns.nvim", disable = not plugin_settings.status.gitsigns, opt = true, - config = override_req("gitsigns", "plugins.configs.gitsigns"), + config = override_req("gitsigns", "(plugins.configs.others).gitsigns()"), setup = function() require("core.utils").packer_lazy_load "gitsigns.nvim" end, From 07b4d19b8fa13ec6093ebd8e2626e58ffcf70a60 Mon Sep 17 00:00:00 2001 From: Daniel Cardona Rojas Date: Wed, 17 Nov 2021 10:04:37 -0500 Subject: [PATCH 0850/1541] feat(nvimtree): exclude terminal from window picker --- lua/plugins/configs/nvimtree.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 95b0319..4b142db 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -17,6 +17,11 @@ g.nvim_tree_indent_markers = 1 g.nvim_tree_ignore = { ".git", "node_modules", ".cache" } g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" } +g.nvim_tree_window_picker_exclude = { + filetype = { 'notify', 'packer', 'qf' }, + buftype = {'terminal' }, +} + -- g.nvim_tree_show_icons = { folders = 1, From 5c69d46dd671f7923bbde0eac20b4ab905ce882c Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 19 Nov 2021 07:17:09 +0530 Subject: [PATCH 0851/1541] rm unused config in nvimtree | include vim highlighting support by default --- lua/plugins/configs/nvimtree.lua | 17 +++++------------ lua/plugins/configs/treesitter.lua | 1 + lua/plugins/init.lua | 1 - 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index e741d69..b4d3d17 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -7,17 +7,19 @@ end local g = vim.g -vim.o.termguicolors = true - g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names g.nvim_tree_git_hl = git_status g.nvim_tree_gitignore = 0 g.nvim_tree_highlight_opened_files = 0 g.nvim_tree_indent_markers = 1 -g.nvim_tree_ignore = { ".git", "node_modules", ".cache" } g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" } +g.nvim_tree_window_picker_exclude = { + filetype = { "notify", "packer", "qf" }, + buftype = { "terminal" }, +} + g.nvim_tree_show_icons = { folders = 1, files = 1, @@ -47,15 +49,6 @@ g.nvim_tree_icons = { } nvimtree.setup { - diagnostics = { - enable = false, - icons = { - hint = "", - info = "", - warning = "", - error = "", - }, - }, filters = { dotfiles = false, }, diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index a9a7f49..6e65340 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -7,6 +7,7 @@ end ts_config.setup { ensure_installed = { "lua", + "vim", }, highlight = { enable = true, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 5a7fa7b..bc1004a 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -68,7 +68,6 @@ return packer.startup(function() use { "nvim-treesitter/nvim-treesitter", - branch = "0.5-compat", event = "BufRead", config = override_req("nvim_treesitter", "plugins.configs.treesitter"), } From b4da4901382aebb948ff018d63f7206897287643 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 19 Nov 2021 07:44:06 +0530 Subject: [PATCH 0852/1541] gitignore custom dir | add example configs --- .gitignore | 1 + examples/example_chadrc.lua | 13 +++++++++++ examples/example_init.lua | 39 ++++++++++++++++++++++++++++++++ lua/plugins/configs/nvimtree.lua | 1 - 4 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 examples/example_chadrc.lua create mode 100644 examples/example_init.lua diff --git a/.gitignore b/.gitignore index 8cb205e..cfcf4e2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ plugin +custom/ diff --git a/examples/example_chadrc.lua b/examples/example_chadrc.lua new file mode 100644 index 0000000..e810f1c --- /dev/null +++ b/examples/example_chadrc.lua @@ -0,0 +1,13 @@ +-- This is an example chadrc file , its supposed to be placed in /lua/custom dir +-- lua/custom/chadrc.lua + +local M = {} + +-- make sure you maintain the structure of `core/default_config.lua` here, +-- example of changing theme: + +M.ui = { + theme = "gruvchad", +} + +return M diff --git a/examples/example_init.lua b/examples/example_init.lua new file mode 100644 index 0000000..5d08fd5 --- /dev/null +++ b/examples/example_init.lua @@ -0,0 +1,39 @@ +-- This is an example init file , its supposed to be placed in /lua/custom dir +-- lua/custom/init.lua + +-- This is where your custom modules and plugins go. +-- Please check NvChad docs if you're totally new to nvchad + dont know lua!! + +local hooks = require "core.hooks" + +-- MAPPINGS +-- To add new plugins, use the "setup_mappings" hook, + +hooks.add("setup_mappings", function(map) + map("n", "cc", ":Telescope ", opt) + map("n", "q", ":q ", opt) +end) + +-- NOTE : opt is a variable there (most likely a table if you want multiple options), +-- you can remove it if you dont have any custom options + +-- Install plugins +-- To add new plugins, use the "install_plugin" hook, + +-- examples below: + +hooks.add("install_plugins", function(use) + use { + "max397574/better-escape.nvim", + event = "InsertEnter", + } + + use { + "user or orgname/reponame", + --further packer options + } +end) + +-- NOTE: we heavily suggest using Packer's lazy loading (with the 'event' field) +-- see: https://github.com/wbthomason/packer.nvim +-- https://nvchad.github.io/config/walkthrough diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index b4d3d17..22d2f41 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -9,7 +9,6 @@ local g = vim.g g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names g.nvim_tree_git_hl = git_status -g.nvim_tree_gitignore = 0 g.nvim_tree_highlight_opened_files = 0 g.nvim_tree_indent_markers = 1 g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened From 7114ebd945a96387bfbd00012106fb9efabc9a80 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 19 Nov 2021 09:27:55 +0530 Subject: [PATCH 0853/1541] Delete example_chadrc.lua --- lua/custom/example_chadrc.lua | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 lua/custom/example_chadrc.lua diff --git a/lua/custom/example_chadrc.lua b/lua/custom/example_chadrc.lua deleted file mode 100644 index f503361..0000000 --- a/lua/custom/example_chadrc.lua +++ /dev/null @@ -1,10 +0,0 @@ -local M = {} - --- make sure you maintain the structure of `core/default_config.lua` here, --- example of changing theme: - -M.ui = { - theme = "gruvchad", -} - -return M From 067c6cc7fc4b56fb1aab2946decdd506cc8f7409 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 19 Nov 2021 09:28:09 +0530 Subject: [PATCH 0854/1541] Delete example_init.lua --- lua/custom/example_init.lua | 44 ------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 lua/custom/example_init.lua diff --git a/lua/custom/example_init.lua b/lua/custom/example_init.lua deleted file mode 100644 index 51e3dcb..0000000 --- a/lua/custom/example_init.lua +++ /dev/null @@ -1,44 +0,0 @@ --- This is where your custom modules and plugins go. --- See the wiki for a guide on how to extend NvChad - -local hooks = require "core.hooks" - --- NOTE: To use this, make a copy with `cp example_init.lua init.lua` - --------------------------------------------------------------------- - --- To modify packaged plugin configs, use the overrides functionality --- if the override does not exist in the plugin config, make or request a PR, --- or you can override the whole plugin config with 'chadrc' -> M.plugins.default_plugin_config_replace{} --- this will run your config instead of the NvChad config for the given plugin - --- hooks.override("lsp", "publish_diagnostics", function(current) --- current.virtual_text = false; --- return current; --- end) - --- To add new mappings, use the "setup_mappings" hook, --- you can set one or many mappings --- example below: - --- hooks.add("setup_mappings", function(map) --- map("n", "cc", "gg0vG$d", opt) -- example to delete the buffer --- .... many more mappings .... --- end) - --- To add new plugins, use the "install_plugin" hook, --- NOTE: we heavily suggest using Packer's lazy loading (with the 'event' field) --- see: https://github.com/wbthomason/packer.nvim --- examples below: - --- hooks.add("install_plugins", function(use) --- use { --- "max397574/better-escape.nvim", --- event = "InsertEnter", --- } --- end) - --- alternatively, put this in a sub-folder like "lua/custom/plugins/mkdir" --- then source it with - --- require "custom.plugins.mkdir" From 9e8af5ad93a84a005a314a8cb619e0b1a617c05a Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 24 Nov 2021 20:08:11 +0530 Subject: [PATCH 0855/1541] include NvimTreeNormalNC for transparency | add #608 --- lua/colors/highlights.lua | 1 + lua/core/mappings.lua | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index d460a64..3fed96b 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -136,6 +136,7 @@ fg_bg("TelescopeResultsTitle", red, one_bg) -- Disable some highlight in nvim tree if transparency enabled if ui.transparency then bg("NvimTreeNormal", "NONE") + bg("NvimTreeNormalNC", "NONE") bg("NvimTreeStatusLineNC", "NONE") bg("NvimTreeVertSplit", "NONE") fg("NvimTreeVertSplit", grey) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index e192ea5..0036234 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -29,6 +29,12 @@ M.misc = function() -- use ESC to turn off search highlighting map("n", "", ":noh ") + + -- center cursor when moving (goto_definition) + + + -- yank from current cursor to end of line + map("n", "Y", "yg$") end local function optional_mappings() @@ -150,7 +156,7 @@ M.telescope = function() local m = plugin_maps.telescope map("n", m.buffers, ":Telescope buffers ") - map("n", m.find_files, ":Telescope find_files ") + map("n", m.find_files, ":Telescope find_files no_ignore=true ") map("n", m.find_hiddenfiles, ":Telescope find_files hidden=true ") map("n", m.git_commits, ":Telescope git_commits ") map("n", m.git_status, ":Telescope git_status ") From 653a2f5337371eaabbb114f8d942952b7f659392 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 4 Dec 2021 20:42:44 +0530 Subject: [PATCH 0856/1541] add flat look to telescope | disable gitignore on nvimtree --- .gitignore | 2 +- lua/colors/highlights.lua | 17 +++++++++++++---- lua/plugins/configs/nvimtree.lua | 4 ++++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index cfcf4e2..8389435 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ plugin -custom/ +custom diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 3fed96b..5d2fcd0 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -128,10 +128,19 @@ bg("NvimTreeVertSplit", darker_black) fg_bg("NvimTreeWindowPicker", red, black2) -- Telescope -fg("TelescopeBorder", one_bg) -fg_bg("TelescopePreviewTitle", green, one_bg) -fg_bg("TelescopePromptTitle", blue, one_bg) -fg_bg("TelescopeResultsTitle", red, one_bg) +fg_bg("TelescopeBorder", darker_black, darker_black) +fg_bg("TelescopePromptBorder", black2, black2) + +fg_bg("TelescopePromptNormal", white, black2) +fg_bg("TelescopePromptPrefix", red, black2) + +bg("TelescopeNormal", darker_black) + +fg_bg("TelescopePreviewTitle", black, green) +fg_bg("TelescopePromptTitle", black, red) +fg_bg("TelescopeResultsTitle", darker_black,darker_black) + +bg("TelescopeSelection", black2) -- Disable some highlight in nvim tree if transparency enabled if ui.transparency then diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 22d2f41..58c89d4 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -67,4 +67,8 @@ nvimtree.setup { side = "left", width = 25, }, + + git = { + ignore = false, + }, } From 6347a00023002fa4d609cfebd031c14d6618f32c Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 4 Dec 2021 21:04:04 +0530 Subject: [PATCH 0857/1541] add mapping, highlights for keybind cheatsheet | disable indentline in it --- lua/colors/highlights.lua | 24 ++++++++++++++++++++++-- lua/core/default_config.lua | 1 + lua/core/mappings.lua | 2 +- lua/plugins/configs/others.lua | 1 + 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 5d2fcd0..75e5580 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -21,6 +21,7 @@ local purple = colors.purple local red = colors.red local white = colors.white local yellow = colors.yellow +local orange = colors.orange local one_bg3 = colors.one_bg3 -- functions for setting highlights @@ -45,7 +46,7 @@ fg("EndOfBuffer", black) -- For floating windows fg("FloatBorder", blue) -bg("NormalFloat", one_bg) +bg("NormalFloat", darker_black) -- Pmenu bg("Pmenu", one_bg) @@ -138,10 +139,29 @@ bg("TelescopeNormal", darker_black) fg_bg("TelescopePreviewTitle", black, green) fg_bg("TelescopePromptTitle", black, red) -fg_bg("TelescopeResultsTitle", darker_black,darker_black) +fg_bg("TelescopeResultsTitle", darker_black, darker_black) bg("TelescopeSelection", black2) +-- keybinds cheatsheet + +fg_bg("CheatsheetBorder", black, black) +bg("CheatsheetSectionContent", black) +fg("CheatsheetHeading", white) + +local section_title_colors = { + white, + blue, + red, + green, + yellow, + purple, + orange, +} +for i, color in ipairs(section_title_colors) do + vim.cmd("highlight CheatsheetTitle" .. i .. " guibg = " .. color .. " guifg=" .. black) +end + -- Disable some highlight in nvim tree if transparency enabled if ui.transparency then bg("NvimTreeNormal", "NONE") diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 6c73a9d..1791f7e 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -116,6 +116,7 @@ M.mappings = { -- custom = {}, -- custom user mappings misc = { + cheatsheet = "ch", close_buffer = "x", copy_whole_file = "", -- copy all contents of current buffer line_number_toggle = "n", -- toggle line number diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 0036234..9e5f84a 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -31,7 +31,6 @@ M.misc = function() map("n", "", ":noh ") -- center cursor when moving (goto_definition) - -- yank from current cursor to end of line map("n", "Y", "yg$") @@ -81,6 +80,7 @@ M.misc = function() end local function required_mappings() + map("n", maps.misc.cheatsheet, ":lua require('nvchad.cheatsheet').show() ") -- show keybinds map("n", maps.misc.close_buffer, ":lua require('core.utils').close_buffer() ") -- close buffer map("n", maps.misc.copy_whole_file, ":%y+ ") -- copy whole file content map("n", maps.misc.new_buffer, ":enew ") -- new buffer diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index e44ed8e..310118f 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -33,6 +33,7 @@ M.blankline = function() "lspinfo", "TelescopePrompt", "TelescopeResults", + "nvchad_cheatsheet", }, buftype_exclude = { "terminal" }, show_trailing_blankline_indent = false, From 84c3a18fab9e374dacd87b405195183ccfddc57e Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 4 Dec 2021 21:38:30 +0530 Subject: [PATCH 0858/1541] include telescope highlights for transparency --- lua/colors/highlights.lua | 11 +++++++++++ lua/plugins/configs/telescope.lua | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 75e5580..0da5e41 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -164,11 +164,22 @@ end -- Disable some highlight in nvim tree if transparency enabled if ui.transparency then + bg("NormalFloat", "NONE") bg("NvimTreeNormal", "NONE") bg("NvimTreeNormalNC", "NONE") bg("NvimTreeStatusLineNC", "NONE") bg("NvimTreeVertSplit", "NONE") fg("NvimTreeVertSplit", grey) + + -- telescope + bg("TelescopeBorder", "NONE") + bg("TelescopePrompt", "NONE") + bg("TelescopeResults", "NONE") + bg("TelescopePromptBorder", "NONE") + bg("TelescopePromptNormal", "NONE") + bg("TelescopeNormal", "NONE") + bg("TelescopePromptPrefix", "NONE") + fg("TelescopeBorder", one_bg) end if #override ~= 0 then diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index c29b28d..5567de6 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -38,7 +38,7 @@ telescope.setup { file_sorter = require("telescope.sorters").get_fuzzy_file, file_ignore_patterns = { "node_modules" }, generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, - path_display = { "absolute" }, + path_display = { "truncate" }, winblend = 0, border = {}, borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, From 03d55e94a44b24cddf57dea5a98236754f9f1d42 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 4 Dec 2021 23:06:07 +0530 Subject: [PATCH 0859/1541] update highlights for lsp diagnostics --- lua/colors/highlights.lua | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 0da5e41..4ac4ff2 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -92,25 +92,12 @@ fg_bg("DiffDelete", red, "NONE") -- Indent blankline plugin fg("IndentBlanklineChar", line) --- ]] +-- Lsp diagnostics --- [[ LspDiagnostics - --- Errors -fg("LspDiagnosticsSignError", red) -fg("LspDiagnosticsSignWarning", yellow) -fg("LspDiagnosticsVirtualTextError", red) -fg("LspDiagnosticsVirtualTextWarning", yellow) - --- Info -fg("LspDiagnosticsSignInformation", green) -fg("LspDiagnosticsVirtualTextInformation", green) - --- Hints -fg("LspDiagnosticsSignHint", purple) -fg("LspDiagnosticsVirtualTextHint", purple) - --- ]] +fg("DiagnosticHint", purple) +fg("DiagnosticError", red) +fg("DiagnosticWarn", yellow) +fg("DiagnosticInformation", green) -- NvimTree fg("NvimTreeEmptyFolderName", blue) From 97572ee1bb2459caaf539812969e5560cdeae5ac Mon Sep 17 00:00:00 2001 From: Deneir Uy Date: Tue, 7 Dec 2021 16:19:31 +0800 Subject: [PATCH 0860/1541] Fix LSP diagnostic icons --- lua/plugins/configs/others.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 310118f..5a851cc 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -106,13 +106,14 @@ end M.lsp_handlers = function() local function lspSymbol(name, icon) - vim.fn.sign_define("LspDiagnosticsSign" .. name, { text = icon, numhl = "LspDiagnosticsDefault" .. name }) + local hl = "DiagnosticSign" .. name + vim.fn.sign_define(hl, { text = icon, numhl = hl, texthl = hl }) end lspSymbol("Error", "") - lspSymbol("Information", "") - lspSymbol("Hint", "") - lspSymbol("Warning", "") + lspSymbol("Info", "") + lspSymbol("Hint", "") + lspSymbol("Warn", "") vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { virtual_text = { From fc593d03214e83b701673f7822954e2851e757e1 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 7 Dec 2021 14:05:58 +0530 Subject: [PATCH 0861/1541] Delete format.yml --- .github/workflows/format.yml | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 .github/workflows/format.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml deleted file mode 100644 index cabf3cd..0000000 --- a/.github/workflows/format.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: formatting -on: - push: - paths-ignore: - - ".github/**" - - "*.md" - branches: "**" - -jobs: - stylua: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: JohnnyMorganz/stylua-action@1.0.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --config-path=./.stylua.toml -g *.lua -g !lua/core/*.lua -g !lua/plugins/**/*.lua -g !lua/colors/*.lua -- . - - name: Commit files - run: | - git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - if [[ -n $(git status -s) ]]; then - git commit --all --message "chore: format with stylua" - fi - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.ref }} From 2a8afcb7b60a599c50a45f3ff24f14c7eb4c2329 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 7 Dec 2021 14:06:34 +0530 Subject: [PATCH 0862/1541] rm theme toggler config --- lua/core/default_config.lua | 7 ------- lua/core/mappings.lua | 9 --------- 2 files changed, 16 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 1791f7e..9c167c1 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -32,7 +32,6 @@ M.options = { copy_del = true, -- copy deleted text ( dd key ), visual and normal mode insert_nav = true, -- navigation in insertmode window_nav = true, - theme_toggler = false, -- updater update_url = "https://github.com/NvChad/NvChad", @@ -46,11 +45,6 @@ M.ui = { hl_override = "", -- path of your file that contains highlights italic_comments = false, theme = "onedark", -- default theme - -- toggle between two themes, see theme_toggler mappings - theme_toggler = { - "onedark", - "gruvchad", - }, -- Change terminal bg to nvim theme's bg color so it'll match well -- For Ex : if you have onedark set in nvchad, set onedark's bg color on your terminal @@ -124,7 +118,6 @@ M.mappings = { new_buffer = "", new_tab = "b", save_file = "", -- save file using :w - theme_toggler = "tt", -- see in ui.theme_toggler }, -- navigation in insert mode, only if enabled in options diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 9e5f84a..2019ff5 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -68,15 +68,6 @@ M.misc = function() map("n", wnav.moveUp, "k") map("n", wnav.moveDown, "j") end - - -- check the theme toggler - if nvChad_options.theme_toggler then - map( - "n", - maps.misc.theme_toggler, - ":lua require('nvchad').toggle_theme(require('core.utils').load_config().ui.theme_toggler) " - ) - end end local function required_mappings() From 01babafd7286e42199bf69d6f6a70c6958c73940 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 8 Dec 2021 12:30:16 +0530 Subject: [PATCH 0863/1541] add option for fillchars --- lua/core/default_config.lua | 1 + lua/core/options.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 9c167c1..001c5a8 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -25,6 +25,7 @@ M.options = { timeoutlen = 400, updatetime = 250, undofile = true, + fillchars = { eob = " " }, -- NvChad options nvChad = { diff --git a/lua/core/options.lua b/lua/core/options.lua index 5be456d..01b3a39 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -14,7 +14,7 @@ opt.shiftwidth = options.shiftwidth opt.smartindent = options.smartindent -- disable tilde on end of buffer: https://github.com/neovim/neovim/pull/8546#issuecomment-643643758 -opt.fillchars = { eob = " " } +opt.fillchars = options.fillchars opt.hidden = options.hidden opt.ignorecase = options.ignorecase From 52d4b564ba46e2f96be409ac538e7cd7f954fbd9 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 8 Dec 2021 22:37:22 +0530 Subject: [PATCH 0864/1541] add more charity links ^^ --- .github/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/README.md b/.github/README.md index 49a4a90..68b3ceb 100644 --- a/.github/README.md +++ b/.github/README.md @@ -178,3 +178,9 @@ I would happily accept donations but would feel awful since I'm not the only one - https://charity.gofundme.com/o/en/campaign/feedingyemen - https://www.gofundme.com/f/6p8ea-give-ghanaian-orphans-the-gift-of-a-ride-to-school - https://www.isupportmyanmar.com +- https://www.justgiving.com/campaign/somaliawater +- https://www.justgiving.com/crowdfunding/acaappeal +- https://www.justgiving.com/fundraising/muslim-chat +- https://www.gofundme.com/f/help-kids-in-mali-have-warm-clothing-in-winter +- https://www.justgiving.com/crowdfunding/carevenezuela +- https://www.justgiving.com/campaign/yemen From 773d25980cedb7df446a7a613c12d2b5e9efe7a0 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 9 Dec 2021 05:59:15 +0530 Subject: [PATCH 0865/1541] fix blank telescope results title (#638) --- lua/colors/highlights.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 4ac4ff2..4f53ba6 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -167,6 +167,7 @@ if ui.transparency then bg("TelescopeNormal", "NONE") bg("TelescopePromptPrefix", "NONE") fg("TelescopeBorder", one_bg) + fg_bg("TelescopeResultsTitle", black, blue) end if #override ~= 0 then From 2293b16709250c56ec9b483a262553574283da84 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 11 Dec 2021 01:49:35 +0530 Subject: [PATCH 0866/1541] Cleanup | Format files * fix some lint warnings * remove some unneeded code --- init.lua | 7 ++----- lua/colors/init.lua | 2 +- lua/core/hooks.lua | 20 ++++++------------- lua/core/options.lua | 2 +- lua/core/utils.lua | 33 ++++++++++++++++---------------- lua/plugins/configs/nvimtree.lua | 2 +- lua/plugins/configs/others.lua | 2 +- 7 files changed, 28 insertions(+), 40 deletions(-) diff --git a/init.lua b/init.lua index 23322bd..d53453a 100644 --- a/init.lua +++ b/init.lua @@ -1,8 +1,5 @@ -local userconf = pcall(require, "custom") - -if userconf then - require "custom" -end +-- try to call cuatom init +pcall(require, "custom") local core_modules = { "core.options", diff --git a/lua/colors/init.lua b/lua/colors/init.lua index 1de4a62..9630d75 100644 --- a/lua/colors/init.lua +++ b/lua/colors/init.lua @@ -19,7 +19,7 @@ M.init = function(theme) package.loaded["colors.highlights" or false] = nil -- then load the highlights require "colors.highlights" - end + end end -- returns a table of colors for givem or current theme diff --git a/lua/core/hooks.lua b/lua/core/hooks.lua index 02394a1..9f394ce 100644 --- a/lua/core/hooks.lua +++ b/lua/core/hooks.lua @@ -1,31 +1,23 @@ local hooks, M = {}, {} local allowed_hooks = { - "install_plugins", - "setup_mappings", - "ready", + ["install_plugins"] = true, + ["setup_mappings"] = true, + ["ready"] = true, } -local function has_value(tab, val) - for _, value in ipairs(tab) do - if value == val then - return true - end - end -end - M.add = function(name, fn) - if not (has_value(allowed_hooks, name)) then + if not allowed_hooks[name] then print("Custom lua uses unallowed hook " .. name) end - if hooks[name] == nil then + if not hooks[name] then hooks[name] = {} end table.insert(hooks[name], fn) end M.run = function(name, args) - if hooks[name] ~= nil then + if hooks[name] then for _, hook in pairs(hooks[name]) do hook(args) end diff --git a/lua/core/options.lua b/lua/core/options.lua index 01b3a39..b9509a4 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -14,7 +14,7 @@ opt.shiftwidth = options.shiftwidth opt.smartindent = options.smartindent -- disable tilde on end of buffer: https://github.com/neovim/neovim/pull/8546#issuecomment-643643758 -opt.fillchars = options.fillchars +opt.fillchars = options.fillchars opt.hidden = options.hidden opt.ignorecase = options.ignorecase diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 41c70e1..c1fcd3e 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -1,7 +1,7 @@ local M = {} local cmd = vim.cmd -M.close_buffer = function(bufexpr, force) +M.close_buffer = function(force) -- This is a modification of a NeoVim plugin from -- Author: ojroques - Olivier Roques -- Src: https://github.com/ojroques/nvim-bufdel @@ -63,7 +63,7 @@ M.close_buffer = function(bufexpr, force) return end - local chad_term, type = pcall(function() + local chad_term, _ = pcall(function() return vim.api.nvim_buf_get_var(buf, "term_type") end) @@ -140,21 +140,18 @@ end M.load_config = function() local conf = require "core.default_config" - local chadrcExists, _ = pcall(require, "custom.chadrc") + local chadrcExists, change = pcall(require, "custom.chadrc") -- if chadrc exists , then merge its table into the default config's if chadrcExists then - local change = require "custom.chadrc" conf = vim.tbl_deep_extend("force", conf, change) - return conf end - -- or load default config return conf end -M.map = function(mode, keys, cmd, opt) +M.map = function(mode, keys, command, opt) local options = { noremap = true, silent = true } if opt then options = vim.tbl_extend("force", options, opt) @@ -178,28 +175,30 @@ M.map = function(mode, keys, cmd, opt) -- helper function for M.map -- can gives multiple modes and keys - local function map_wrapper(mode, lhs, rhs, options) + local function map_wrapper(sub_mode, lhs, rhs, sub_options) if type(lhs) == "table" then for _, key in ipairs(lhs) do - map_wrapper(mode, key, rhs, options) + map_wrapper(sub_mode, key, rhs, sub_options) end else - if type(mode) == "table" then - for _, m in ipairs(mode) do - map_wrapper(m, lhs, rhs, options) + if type(sub_mode) == "table" then + for _, m in ipairs(sub_mode) do + map_wrapper(m, lhs, rhs, sub_options) end else - if valid_modes[mode] and lhs and rhs then - vim.api.nvim_set_keymap(mode, lhs, rhs, options) + if valid_modes[sub_mode] and lhs and rhs then + vim.api.nvim_set_keymap(sub_mode, lhs, rhs, sub_options) else - mode, lhs, rhs = mode or "", lhs or "", rhs or "" - print("Cannot set mapping [ mode = '" .. mode .. "' | key = '" .. lhs .. "' | cmd = '" .. rhs .. "' ]") + sub_mode, lhs, rhs = sub_mode or "", lhs or "", rhs or "" + print( + "Cannot set mapping [ mode = '" .. sub_mode .. "' | key = '" .. lhs .. "' | cmd = '" .. rhs .. "' ]" + ) end end end end - map_wrapper(mode, keys, cmd, options) + map_wrapper(mode, keys, command, options) end -- load plugin after entering vim ui diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 282641e..58c89d4 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -13,7 +13,7 @@ g.nvim_tree_highlight_opened_files = 0 g.nvim_tree_indent_markers = 1 g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" } - + g.nvim_tree_window_picker_exclude = { filetype = { "notify", "packer", "qf" }, buftype = { "terminal" }, diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 5a851cc..df25ef5 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -132,7 +132,7 @@ M.lsp_handlers = function() }) -- suppress error messages from lang servers - vim.notify = function(msg, log_level, _opts) + vim.notify = function(msg, log_level) if msg:match "exit code" then return end From 16d035c031c5c4420925551cfa67bb4f39fe1947 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 11 Dec 2021 11:52:41 +0530 Subject: [PATCH 0867/1541] fix silly spelling mistake --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index d53453a..c76b47e 100644 --- a/init.lua +++ b/init.lua @@ -1,4 +1,4 @@ --- try to call cuatom init +-- try to call custom init pcall(require, "custom") local core_modules = { From d2db2cc1cd4cdb8197ceffbfb84c3fdfb704d5d0 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 11 Dec 2021 22:23:09 +0530 Subject: [PATCH 0868/1541] plugin: Use Comment.nvim | Resolve #646 & #626 --- lua/core/mappings.lua | 4 ++-- lua/plugins/configs/others.lua | 2 +- lua/plugins/init.lua | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 2019ff5..c55bd40 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -124,8 +124,8 @@ end M.comment = function() local m = plugin_maps.comment.toggle - map("n", m, ":CommentToggle ") - map("v", m, ":CommentToggle ") + map("n", m, ":lua require('Comment.api').toggle()") + map("v", m, ":lua require('Comment.api').gc(vim.fn.visualmode())") end M.dashboard = function() diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index df25ef5..d9bb64c 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -62,7 +62,7 @@ M.colorizer = function() end M.comment = function() - local present, nvim_comment = pcall(require, "nvim_comment") + local present, nvim_comment = pcall(require, "Comment") if present then nvim_comment.setup() end diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index bc1004a..a622e29 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -191,11 +191,12 @@ return packer.startup(function() } use { - "terrortylor/nvim-comment", + "numToStr/Comment.nvim", disable = not plugin_settings.status.comment, - cmd = "CommentToggle", + module = "Comment", config = override_req("nvim_comment", "(plugins.configs.others).comment()"), setup = function() + require("core.utils").packer_lazy_load "Comment.nvim" require("core.mappings").comment() end, } From 7c9bf9cbe38b898bada23bd8da98eeac23625c73 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 12 Dec 2021 08:49:40 +0530 Subject: [PATCH 0869/1541] add some options for nvimtree --- lua/core/default_config.lua | 6 ++++++ lua/plugins/configs/nvimtree.lua | 13 ++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 001c5a8..975a01d 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -79,6 +79,12 @@ M.plugins = { }, nvimtree = { enable_git = 0, + + ui = { + allow_resize = true, + side = "left", + width = 25, + }, }, luasnip = { snippet_path = {}, diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 58c89d4..131f4ad 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -1,5 +1,9 @@ local present, nvimtree = pcall(require, "nvim-tree") -local git_status = require("core.utils").load_config().plugins.options.nvimtree.enable_git + +local conf = require("core.utils").load_config().plugins.options.nvimtree + +local git_status = conf.enable_git +local ui = conf.ui if not present then return @@ -62,12 +66,7 @@ nvimtree.setup { enable = true, update_cwd = false, }, - view = { - allow_resize = true, - side = "left", - width = 25, - }, - + view = ui, git = { ignore = false, }, From 01f652fcc47207edbe15c04c88ed957dd1dde85b Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 13 Dec 2021 18:59:14 +0530 Subject: [PATCH 0870/1541] hide nvimtree rootdir by default --- lua/core/default_config.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 975a01d..7d4ed1c 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -84,6 +84,7 @@ M.plugins = { allow_resize = true, side = "left", width = 25, + hide_root_folder = true, }, }, luasnip = { From abcd035e894b3797f36b4743d57f64f8c1b50366 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 15 Dec 2021 20:27:54 +0530 Subject: [PATCH 0871/1541] make lsphandlers overridable --- lua/plugins/configs/lspconfig.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 391a9fb..7194964 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,3 +1,5 @@ +require("plugins.configs.others").lsp_handlers() + local function on_attach(_, bufnr) local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) @@ -56,5 +58,3 @@ local addlsp_confs = require("core.utils").load_config().plugins.options.lspconf if #addlsp_confs ~= 0 then require(addlsp_confs).setup_lsp(on_attach, capabilities) end - -require("plugins.configs.others").lsp_handlers() From f7180602609a17dc76353c99078a886a33729739 Mon Sep 17 00:00:00 2001 From: Sravanth C <54331348+chebro@users.noreply.github.com> Date: Thu, 16 Dec 2021 13:02:49 +0530 Subject: [PATCH 0872/1541] Rename esc_insertmode to better_escape - change the plugin status name for better_escape --- lua/core/default_config.lua | 2 +- lua/plugins/init.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 7d4ed1c..7d06d30 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -62,7 +62,7 @@ M.plugins = { colorizer = false, -- color RGB, HEX, CSS, NAME color codes comment = true, -- easily (un)comment code, language aware dashboard = false, - esc_insertmode = true, -- map to with no lag + better_escape = true, -- map to with no lag feline = true, -- statusline gitsigns = true, lspsignature = true, -- lsp enhancements diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index a622e29..ece2de4 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -116,7 +116,7 @@ return packer.startup(function() use { "max397574/better-escape.nvim", - disable = not plugin_settings.status.esc_insertmode, + disable = not plugin_settings.status.better_escape, event = "InsertEnter", config = override_req("better_escape", "(plugins.configs.others).better_escape()"), } From 1cd5150b704434feea66c137411d0b70ecc5b679 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 16 Dec 2021 18:55:33 +0530 Subject: [PATCH 0873/1541] update comment toggle mappings (#658) --- lua/core/mappings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index c55bd40..3e22721 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -124,8 +124,8 @@ end M.comment = function() local m = plugin_maps.comment.toggle - map("n", m, ":lua require('Comment.api').toggle()") - map("v", m, ":lua require('Comment.api').gc(vim.fn.visualmode())") + map("n", m, ":lua require('Comment.api').toggle_current_linewise()") + map("v", m, ":lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())") end M.dashboard = function() From 31e551af3072df8e3d0f8c65d98adb3d32b0b0fb Mon Sep 17 00:00:00 2001 From: Danilo Horta Date: Sat, 18 Dec 2021 22:39:59 +0000 Subject: [PATCH 0874/1541] Make lspconfig mappings configurable. --- lua/core/default_config.lua | 21 +++++++++++++++++++++ lua/core/mappings.lua | 24 ++++++++++++++++++++++++ lua/plugins/configs/lspconfig.lua | 26 +------------------------- 3 files changed, 46 insertions(+), 25 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 7d06d30..1713a16 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -190,6 +190,27 @@ M.mappings.plugins = { esc_insertmode = { "jk" }, -- multiple mappings allowed }, + lspconfig = { + declaration = "gD", + definition = "gd", + hover = "K", + implementation = "gi", + signature_help = "gk", + add_workspace_folder = "wa", + remove_workspace_folder = "wr", + list_workspace_folders = "wl", + type_definition = "D", + rename = "rn", + code_action = "ca", + references = "gr", + show_line_diagnostics = "ge", + goto_prev = "[d", + goto_next = "]d", + set_loclist = "q", + formatting = "fm", + range_code_action = "ca", + }, + nvimtree = { toggle = "", focus = "e", diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 3e22721..0ce75c6 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -138,6 +138,30 @@ M.dashboard = function() map("n", m.session_save, ":SessionSave ") end +M.lspconfig = function() + local m = plugin_maps.lspconfig + + -- See `:help vim.lsp.*` for documentation on any of the below functions + map("n", m.declaration, "lua vim.lsp.buf.declaration()") + map("n", m.definition, "lua vim.lsp.buf.definition()") + map("n", m.hover, "lua vim.lsp.buf.hover()") + map("n", m.implementation, "lua vim.lsp.buf.implementation()") + map("n", m.signature_help, "lua vim.lsp.buf.signature_help()") + map("n", m.add_workspace_folder, "lua vim.lsp.buf.add_workspace_folder()") + map("n", m.remove_workspace_folder, "lua vim.lsp.buf.remove_workspace_folder()") + map("n", m.list_workspace_folders, "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))") + map("n", m.type_definition, "lua vim.lsp.buf.type_definition()") + map("n", m.rename, "lua vim.lsp.buf.rename()") + map("n", m.code_action, "lua vim.lsp.buf.code_action()") + map("n", m.references, "lua vim.lsp.buf.references()") + map("n", m.show_line_diagnostics, "lua vim.lsp.diagnostic.show_line_diagnostics()") + map("n", m.goto_prev, "lua vim.lsp.diagnostic.goto_prev()") + map("n", m.goto_next, "lua vim.lsp.diagnostic.goto_next()") + map("n", m.set_loclist, "lua vim.lsp.diagnostic.set_loclist()") + map("n", m.formatting, "lua vim.lsp.buf.formatting()") + map("v", m.range_code_action, "lua vim.lsp.buf.range_code_action()") +end + M.nvimtree = function() map("n", plugin_maps.nvimtree.toggle, ":NvimTreeToggle ") map("n", plugin_maps.nvimtree.focus, ":NvimTreeFocus ") diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 7194964..2d1273b 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,9 +1,6 @@ require("plugins.configs.others").lsp_handlers() local function on_attach(_, bufnr) - local function buf_set_keymap(...) - vim.api.nvim_buf_set_keymap(bufnr, ...) - end local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end @@ -11,28 +8,7 @@ local function on_attach(_, bufnr) -- Enable completion triggered by buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") - -- Mappings. - local opts = { noremap = true, silent = true } - - -- See `:help vim.lsp.*` for documentation on any of the below functions - buf_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) - buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) - buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()", opts) - buf_set_keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) - buf_set_keymap("n", "gk", "lua vim.lsp.buf.signature_help()", opts) - buf_set_keymap("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) - buf_set_keymap("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) - buf_set_keymap("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) - buf_set_keymap("n", "D", "lua vim.lsp.buf.type_definition()", opts) - buf_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", opts) - buf_set_keymap("n", "ca", "lua vim.lsp.buf.code_action()", opts) - buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()", opts) - buf_set_keymap("n", "ge", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) - buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) - buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) - buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) - buf_set_keymap("n", "fm", "lua vim.lsp.buf.formatting()", opts) - buf_set_keymap("v", "ca", "lua vim.lsp.buf.range_code_action()", opts) + require("core.mappings").lspconfig() end local capabilities = vim.lsp.protocol.make_client_capabilities() From 3a966955d4d71b8661b35588c8b12288e6d3c6f3 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 22 Dec 2021 18:05:07 +0530 Subject: [PATCH 0875/1541] make lspconfig mappings compatible with nvim 0.6v --- lua/core/default_config.lua | 3 +-- lua/core/mappings.lua | 9 ++++----- lua/plugins/configs/others.lua | 7 ++++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 1713a16..39240ed 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -203,12 +203,11 @@ M.mappings.plugins = { rename = "rn", code_action = "ca", references = "gr", - show_line_diagnostics = "ge", + float_diagnostics = "ge", goto_prev = "[d", goto_next = "]d", set_loclist = "q", formatting = "fm", - range_code_action = "ca", }, nvimtree = { diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 0ce75c6..2c7f7b5 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -154,12 +154,11 @@ M.lspconfig = function() map("n", m.rename, "lua vim.lsp.buf.rename()") map("n", m.code_action, "lua vim.lsp.buf.code_action()") map("n", m.references, "lua vim.lsp.buf.references()") - map("n", m.show_line_diagnostics, "lua vim.lsp.diagnostic.show_line_diagnostics()") - map("n", m.goto_prev, "lua vim.lsp.diagnostic.goto_prev()") - map("n", m.goto_next, "lua vim.lsp.diagnostic.goto_next()") - map("n", m.set_loclist, "lua vim.lsp.diagnostic.set_loclist()") + map("n", m.float_diagnostics, "lua vim.diagnostic.open_float()") + map("n", m.goto_prev, "lua vim.diagnostic.goto_prev()") + map("n", m.goto_next, "lua vim.diagnostic.goto_next()") + map("n", m.set_loclist, "lua vim.diagnostic.set_loclist()") map("n", m.formatting, "lua vim.lsp.buf.formatting()") - map("v", m.range_code_action, "lua vim.lsp.buf.range_code_action()") end M.nvimtree = function() diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index d9bb64c..ffa6258 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -115,15 +115,16 @@ M.lsp_handlers = function() lspSymbol("Hint", "") lspSymbol("Warn", "") - vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { + vim.diagnostic.config { virtual_text = { prefix = "", spacing = 0, }, signs = true, underline = true, - update_in_insert = false, -- update diagnostics insert mode - }) + update_in_insert = false, + } + vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "single", }) From dbc95e41bf343172ba5b9266540f14000e6017bd Mon Sep 17 00:00:00 2001 From: boppyt <71049646+boppyt@users.noreply.github.com> Date: Thu, 23 Dec 2021 01:23:46 +0900 Subject: [PATCH 0876/1541] fix feline with new diagnostic api --- lua/plugins/configs/statusline.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index b7bf633..a374091 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -1,5 +1,6 @@ local colors = require("colors").get() local lsp = require "feline.providers.lsp" +local lsp_severity = vim.diagnostic.severity local icon_styles = { default = { @@ -150,7 +151,7 @@ components.active[1][6] = { components.active[1][7] = { provider = "diagnostic_errors", enabled = function() - return lsp.diagnostics_exist "Error" + return lsp.diagnostics_exist(lsp_severity.ERROR) end, hl = { fg = colors.red }, @@ -160,7 +161,7 @@ components.active[1][7] = { components.active[1][8] = { provider = "diagnostic_warnings", enabled = function() - return lsp.diagnostics_exist "Warning" + return lsp.diagnostics_exist(lsp_severity.WARN) end, hl = { fg = colors.yellow }, icon = "  ", @@ -169,7 +170,7 @@ components.active[1][8] = { components.active[1][9] = { provider = "diagnostic_hints", enabled = function() - return lsp.diagnostics_exist "Hint" + return lsp.diagnostics_exist(lsp_severity.HINT) end, hl = { fg = colors.grey_fg2 }, icon = "  ", @@ -178,7 +179,7 @@ components.active[1][9] = { components.active[1][10] = { provider = "diagnostic_info", enabled = function() - return lsp.diagnostics_exist "Information" + return lsp.diagnostics_exist(lsp_severity.INFO) end, hl = { fg = colors.green }, icon = "  ", From e5435e93de033c716932ed1da47304596d9c8ec7 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 22 Dec 2021 22:35:16 +0530 Subject: [PATCH 0877/1541] update feline config (rename colors table to theme) --- lua/plugins/configs/statusline.lua | 2 +- lua/plugins/init.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index a374091..c8ae753 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -372,7 +372,7 @@ components.active[3][10] = { } require("feline").setup { - colors = { + theme = { bg = colors.statusline_bg, fg = colors.fg, }, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index ece2de4..e4e6907 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -36,7 +36,7 @@ return packer.startup(function() } use { - "famiu/feline.nvim", + "feline.nvim/feline.nvim", disable = not plugin_settings.status.feline, after = "nvim-web-devicons", config = override_req("feline", "plugins.configs.statusline"), From 344a9aa90cff77a0df332232c3baf0d04da59a3a Mon Sep 17 00:00:00 2001 From: boppyt <71049646+boppyt@users.noreply.github.com> Date: Thu, 23 Dec 2021 08:43:49 +0900 Subject: [PATCH 0878/1541] fix typo in feline repo --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e4e6907..679c62d 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -36,7 +36,7 @@ return packer.startup(function() } use { - "feline.nvim/feline.nvim", + "feline-nvim/feline.nvim", disable = not plugin_settings.status.feline, after = "nvim-web-devicons", config = override_req("feline", "plugins.configs.statusline"), From ae90cca3f0e513d8b9e881043d0829fbe2ab05d6 Mon Sep 17 00:00:00 2001 From: Erasin Date: Thu, 23 Dec 2021 20:54:42 +0800 Subject: [PATCH 0879/1541] lua vim.diagnostic.setloclist --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 2c7f7b5..d180694 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -157,7 +157,7 @@ M.lspconfig = function() map("n", m.float_diagnostics, "lua vim.diagnostic.open_float()") map("n", m.goto_prev, "lua vim.diagnostic.goto_prev()") map("n", m.goto_next, "lua vim.diagnostic.goto_next()") - map("n", m.set_loclist, "lua vim.diagnostic.set_loclist()") + map("n", m.set_loclist, "lua vim.diagnostic.setloclist()") map("n", m.formatting, "lua vim.lsp.buf.formatting()") end From 7be01383ab537295358f499079f3eafdb8ab65ac Mon Sep 17 00:00:00 2001 From: boppyt <71049646+boppyt@users.noreply.github.com> Date: Thu, 23 Dec 2021 22:54:08 +0900 Subject: [PATCH 0880/1541] raise the minimum version to 0.6+ --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index 68b3ceb..35a2f1a 100644 --- a/.github/README.md +++ b/.github/README.md @@ -33,7 +33,7 @@ alt="License" /> [![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/gADmkJb9Fb) -[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.5+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white)](https://github.com/neovim/neovim) +[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.6+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white)](https://github.com/neovim/neovim) [![GitHub Issues](https://img.shields.io/github/issues/NvChad/NvChad.svg?style=flat-square&label=Issues&color=fc0330)](https://github.com/siduck/NvChad/issues) [![Last Commit](https://img.shields.io/github/last-commit/NvChad/NvChad.svg?style=flat-square&label=Last%20Commit&color=58eb34)](https://github.com/siduck/NvChad/pulse) From a2d91acc845a893553fcc65e12298366a8a1c9c0 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 24 Dec 2021 23:35:13 +0530 Subject: [PATCH 0881/1541] nvimtree: Allow changing lazy load from chadrc | Resolve https://github.com/NvChad/NvChad/issues/621 a packerCompile is needed after changin the config value in chadrc --- lua/core/default_config.lua | 2 ++ lua/plugins/init.lua | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 39240ed..34f19af 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -79,6 +79,8 @@ M.plugins = { }, nvimtree = { enable_git = 0, + -- packerCompile required after changing lazy_load + lazy_load = true, ui = { allow_resize = true, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 679c62d..42c55ff 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -205,7 +205,8 @@ return packer.startup(function() use { "kyazdani42/nvim-tree.lua", disable = not plugin_settings.status.nvimtree, - cmd = { "NvimTreeToggle", "NvimTreeFocus" }, + -- only set cmd if lazy load is enabled + cmd = plugin_settings.options.nvimtree.lazy_load and { "NvimTreeToggle", "NvimTreeFocus" }, config = override_req("nvim_tree", "plugins.configs.nvimtree"), setup = function() require("core.mappings").nvimtree() From 19cb35d80eca8e299500531772660422ce6aca7c Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 25 Dec 2021 10:57:25 +0530 Subject: [PATCH 0882/1541] make nvimtree folder match its icon color --- lua/colors/highlights.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 4f53ba6..9f0ba83 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -100,7 +100,7 @@ fg("DiagnosticWarn", yellow) fg("DiagnosticInformation", green) -- NvimTree -fg("NvimTreeEmptyFolderName", blue) +fg("NvimTreeEmptyFolderName", folder_bg) fg("NvimTreeEndOfBuffer", darker_black) fg("NvimTreeFolderIcon", folder_bg) fg("NvimTreeFolderName", folder_bg) @@ -108,7 +108,7 @@ fg("NvimTreeGitDirty", red) fg("NvimTreeIndentMarker", one_bg2) bg("NvimTreeNormal", darker_black) bg("NvimTreeNormalNC", darker_black) -fg("NvimTreeOpenedFolderName", blue) +fg("NvimTreeOpenedFolderName", folder_bg) fg("NvimTreeRootFolder", red .. " gui=underline") -- enable underline for root folder in nvim tree fg_bg("NvimTreeStatuslineNc", darker_black, darker_black) fg("NvimTreeVertSplit", darker_black) From 60212005cb8a58fc951ce0a0f853de53efd17a10 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 26 Dec 2021 10:09:19 +0530 Subject: [PATCH 0883/1541] statusline: Refresh after BufRead too sometimes events like BufEnter, BufWinEnter, etc are not enough for triggering a refresh, like opening nvim when nvimtree is not lazy load --- lua/core/autocmds.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index c74ef95..ab20601 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -9,7 +9,7 @@ vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype terminal ]] -- Don't show status line on certain windows -vim.cmd [[ autocmd BufEnter,BufWinEnter,FileType,WinEnter * lua require("core.utils").hide_statusline() ]] +vim.cmd [[ autocmd BufEnter,BufRead,BufWinEnter,FileType,WinEnter * lua require("core.utils").hide_statusline() ]] -- Open a file from its last left off position -- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] From 331754a89092ae04f8d24212b7c5fd2d5e5d1307 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 26 Dec 2021 10:04:19 +0530 Subject: [PATCH 0884/1541] nvimtree: Load after nvim-web-devicons when lazy load disabled this is necessary as nvimtree depends on nvim-web-devicons follow up commit for a2d91ac --- lua/plugins/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 42c55ff..6a87f76 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -205,7 +205,8 @@ return packer.startup(function() use { "kyazdani42/nvim-tree.lua", disable = not plugin_settings.status.nvimtree, - -- only set cmd if lazy load is enabled + -- only set "after" if lazy load is disabled and vice versa for "cmd" + after = not plugin_settings.options.nvimtree.lazy_load and "nvim-web-devicons", cmd = plugin_settings.options.nvimtree.lazy_load and { "NvimTreeToggle", "NvimTreeFocus" }, config = override_req("nvim_tree", "plugins.configs.nvimtree"), setup = function() From 688586eeeca0bd94f9b2ba18049addd1d8c61f93 Mon Sep 17 00:00:00 2001 From: ryanb-dev Date: Sun, 26 Dec 2021 18:20:58 -0600 Subject: [PATCH 0885/1541] Telescope: Remove no_ignore option from find files Prior to this change, searches through large repositories would include files within the .gitignore, resulting in long search results and many useless results. This change results in find_files respecting .gitignore and find_hiddenfiles instead being an exhaustive search over all files within the current directory. --- lua/core/mappings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index d180694..a2d47b8 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -170,8 +170,8 @@ M.telescope = function() local m = plugin_maps.telescope map("n", m.buffers, ":Telescope buffers ") - map("n", m.find_files, ":Telescope find_files no_ignore=true ") - map("n", m.find_hiddenfiles, ":Telescope find_files hidden=true ") + map("n", m.find_files, ":Telescope find_files ") + map("n", m.find_hiddenfiles, ":Telescope find_files no_ignore=true hidden=true ") map("n", m.git_commits, ":Telescope git_commits ") map("n", m.git_status, ":Telescope git_status ") map("n", m.help_tags, ":Telescope help_tags ") From de9b702f0ed6ec60795156ccb94101774be743e2 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 27 Dec 2021 07:42:51 +0530 Subject: [PATCH 0886/1541] hide indentline on telescope preview window --- lua/plugins/configs/others.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index ffa6258..5240ba1 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -34,6 +34,7 @@ M.blankline = function() "TelescopePrompt", "TelescopeResults", "nvchad_cheatsheet", + "", }, buftype_exclude = { "terminal" }, show_trailing_blankline_indent = false, From e77be17fe694de3fb779f84cfc73d6e29d3fb6e7 Mon Sep 17 00:00:00 2001 From: justin-f-perez Date: Tue, 28 Dec 2021 13:25:47 -0600 Subject: [PATCH 0887/1541] fix typo in example_init.lua "install_plugin" -> "install_plugins" --- examples/example_init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/example_init.lua b/examples/example_init.lua index 5d08fd5..2425cc2 100644 --- a/examples/example_init.lua +++ b/examples/example_init.lua @@ -18,7 +18,7 @@ end) -- you can remove it if you dont have any custom options -- Install plugins --- To add new plugins, use the "install_plugin" hook, +-- To add new plugins, use the "install_plugins" hook, -- examples below: From edcf93ea81286c59057107c41a085a8ccf312daa Mon Sep 17 00:00:00 2001 From: Jorde Vorstenbosch Date: Fri, 31 Dec 2021 14:21:46 +0100 Subject: [PATCH 0888/1541] docs: fix some old links Change some old links that were linking to the old repo. --- .github/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/README.md b/.github/README.md index 35a2f1a..1a6ab9a 100644 --- a/.github/README.md +++ b/.github/README.md @@ -7,7 +7,7 @@ Contribute - Support + Support Extras

@@ -34,8 +34,8 @@ /> [![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/gADmkJb9Fb) [![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.6+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white)](https://github.com/neovim/neovim) -[![GitHub Issues](https://img.shields.io/github/issues/NvChad/NvChad.svg?style=flat-square&label=Issues&color=fc0330)](https://github.com/siduck/NvChad/issues) -[![Last Commit](https://img.shields.io/github/last-commit/NvChad/NvChad.svg?style=flat-square&label=Last%20Commit&color=58eb34)](https://github.com/siduck/NvChad/pulse) +[![GitHub Issues](https://img.shields.io/github/issues/NvChad/NvChad.svg?style=flat-square&label=Issues&color=fc0330)](https://github.com/NvChad/NvChad/issues) +[![Last Commit](https://img.shields.io/github/last-commit/NvChad/NvChad.svg?style=flat-square&label=Last%20Commit&color=58eb34)](https://github.com/NvChad/NvChad/pulse)
From abe720b881dea07e636e1c431ac9930444e9fa36 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 1 Jan 2022 16:24:19 +0530 Subject: [PATCH 0889/1541] remove telescope fzf-native.nvim plugin --- lua/plugins/configs/telescope.lua | 11 ++--------- lua/plugins/init.lua | 17 +++++------------ 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 5567de6..acbde8a 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -52,13 +52,6 @@ telescope.setup { buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, }, extensions = { - fzf = { - fuzzy = true, -- false will only do exact matching - override_generic_sorter = false, -- override the generic sorter - override_file_sorter = true, -- override the file sorter - case_mode = "smart_case", -- or "ignore_case" or "respect_case" - -- the default case_mode is "smart_case" - }, media_files = { filetypes = { "png", "webp", "jpg", "jpeg" }, find_cmd = "rg", -- find command (defaults to `fd`) @@ -66,8 +59,8 @@ telescope.setup { }, } -local extensions = { "themes", "terms", "fzf" } -local packer_repos = [["extensions", "telescope-fzf-native.nvim"]] +local extensions = { "themes", "terms" } +local packer_repos = [["extensions"]] if vim.fn.executable "ueberzug" == 1 then table.insert(extensions, "media_files") diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 6a87f76..bfd30fc 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -216,20 +216,13 @@ return packer.startup(function() use { "nvim-telescope/telescope.nvim", - module = "telescope", cmd = "Telescope", requires = { - { - "nvim-telescope/telescope-fzf-native.nvim", - run = "make", - }, - { - "nvim-telescope/telescope-media-files.nvim", - disable = not plugin_settings.status.telescope_media, - setup = function() - require("core.mappings").telescope_media() - end, - }, + "nvim-telescope/telescope-media-files.nvim", + disable = not plugin_settings.status.telescope_media, + setup = function() + require("core.mappings").telescope_media() + end, }, config = override_req("telescope", "plugins.configs.telescope"), setup = function() From 9551ce7031fe1e8513861650893b32b64ef1a1f3 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 1 Jan 2022 17:30:42 +0530 Subject: [PATCH 0890/1541] rm telescope-media-files.nvim! it heavily relies on xorg so doesnt fully work on linux!, forget about macos,windows. Added a basic config doc for it here : https://nvchad.github.io/Extras#telescope-media-filesnvim --- .github/README.md | 1 - lua/core/default_config.lua | 5 ----- lua/core/mappings.lua | 6 ------ lua/plugins/configs/telescope.lua | 12 ------------ lua/plugins/init.lua | 7 ------- 5 files changed, 31 deletions(-) diff --git a/.github/README.md b/.github/README.md index 1a6ab9a..23b3c94 100644 --- a/.github/README.md +++ b/.github/README.md @@ -72,7 +72,6 @@ Fast file tree: A fuzzy file finder, picker, sorter, previewer and much more: -

Indent-blankline.nvim

diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 34f19af..06692b0 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -66,7 +66,6 @@ M.plugins = { feline = true, -- statusline gitsigns = true, lspsignature = true, -- lsp enhancements - telescope_media = false, vim_matchup = true, -- improved matchit cmp = true, nvimtree = true, @@ -227,10 +226,6 @@ M.mappings.plugins = { live_grep = "fw", oldfiles = "fo", themes = "th", -- NvChad theme picker - - telescope_media = { - media_files = "fp", - }, }, } diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index a2d47b8..93f74e1 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -180,10 +180,4 @@ M.telescope = function() map("n", m.themes, ":Telescope themes ") end -M.telescope_media = function() - local m = plugin_maps.telescope.telescope_media - - map("n", m.media_files, ":Telescope media_files ") -end - return M diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index acbde8a..35ee0c9 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -51,21 +51,9 @@ telescope.setup { -- Developer configurations: Not meant for general override buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, }, - extensions = { - media_files = { - filetypes = { "png", "webp", "jpg", "jpeg" }, - find_cmd = "rg", -- find command (defaults to `fd`) - }, - }, } local extensions = { "themes", "terms" } -local packer_repos = [["extensions"]] - -if vim.fn.executable "ueberzug" == 1 then - table.insert(extensions, "media_files") - packer_repos = packer_repos .. ', "telescope-media-files.nvim"' -end pcall(function() for _, ext in ipairs(extensions) do diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index bfd30fc..6709c2b 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -217,13 +217,6 @@ return packer.startup(function() use { "nvim-telescope/telescope.nvim", cmd = "Telescope", - requires = { - "nvim-telescope/telescope-media-files.nvim", - disable = not plugin_settings.status.telescope_media, - setup = function() - require("core.mappings").telescope_media() - end, - }, config = override_req("telescope", "plugins.configs.telescope"), setup = function() require("core.mappings").telescope() From 9d013a3529a6882f4e652e9e3fa7b09b96e00f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dundar=20G=C3=B6c?= Date: Mon, 3 Jan 2022 22:28:09 +0100 Subject: [PATCH 0891/1541] chore: fix typos --- .github/CONTRIBUTING.md | 2 +- .github/README.md | 4 ++-- lua/colors/init.lua | 2 +- lua/core/utils.lua | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index a70fc6a..12d436d 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -45,7 +45,7 @@ If you wish to contribute to NvChad, you should: - PR's are always welcomed however NvChad aims to be less bloated. So PR's regarding existing plugin's enhancement and creating new features with existing plugins itself ( without adding a new plugin), bug fixes and corrections are more encouraged. -- NvChad wont keep adding more and more features (like adding new plugins most likely) as requested if they feel unneeded and arent usable by the majority!! If you think the plugin you want to be added is very useful and many NvChaders would find it useful, then such feature's PR is welcomed! +- NvChad won't keep adding more and more features (like adding new plugins most likely) as requested if they feel unneeded and aren't usable by the majority!! If you think the plugin you want to be added is very useful and many NvChaders would find it useful, then such feature's PR is welcomed! - But adding specific features like adding config for [wakatime](https://github.com/wakatime/vim-wakatime) etc will be added in this [chad user configs](https://github.com/NvChad/NvChad/wiki/Chad-user-configs). This lets the user select the things only they want ( adding configs from extra configs ). diff --git a/.github/README.md b/.github/README.md index 23b3c94..413a093 100644 --- a/.github/README.md +++ b/.github/README.md @@ -109,7 +109,7 @@ Without/with Treesitter: ## Credits -- [Elianiva](https://github.com/elianiva) helped me with NeoVim Lua related issues many times, NvChad wouldnt exist without his help at all. +- [Elianiva](https://github.com/elianiva) helped me with NeoVim Lua related issues many times, NvChad wouldn't exist without his help at all. - @lorvethe for making the beautiful NvChad logo. ## Features @@ -170,7 +170,7 @@ If you have an issue with a plugin in NvChad, first you should report it to NvCh ## :gift_heart: Support -I would happily accept donations but would feel awful since I'm not the only one who has worked on NvChad. The project has only been made possible by the many great contributors and plugin developers, thus taking the donations just for me feels unjustified. If you enjoy using NvChad and would like to show your support then try to be a better you! Help the people in need whenever possible and do charity work. Be nice to loved ones and strangers alike. Do not be rude, always try to be helpful and caring for one another. It's easy to hate but hard to care. Be respectful to any software/work done by other people rather than making fun of them. Do not compare software (In a bad way). I'm grateful to even be able to use NeoVim! But I still cannot be fully happy when I know that there are people who barely have any food to eat, starve for weeks, dont have access to proper education, comupters, basic health care facilities and more. Here are some charites and gofundme links you can donate to instead: +I would happily accept donations but would feel awful since I'm not the only one who has worked on NvChad. The project has only been made possible by the many great contributors and plugin developers, thus taking the donations just for me feels unjustified. If you enjoy using NvChad and would like to show your support then try to be a better you! Help the people in need whenever possible and do charity work. Be nice to loved ones and strangers alike. Do not be rude, always try to be helpful and caring for one another. It's easy to hate but hard to care. Be respectful to any software/work done by other people rather than making fun of them. Do not compare software (In a bad way). I'm grateful to even be able to use NeoVim! But I still cannot be fully happy when I know that there are people who barely have any food to eat, starve for weeks, don't have access to proper education, computers, basic health care facilities and more. Here are some charities and gofundme links you can donate to instead: - https://www.gofundme.com/f/WeCareAboutSyria - https://www.gofundme.com/f/Burundi-Nutrition diff --git a/lua/colors/init.lua b/lua/colors/init.lua index 9630d75..8927251 100644 --- a/lua/colors/init.lua +++ b/lua/colors/init.lua @@ -22,7 +22,7 @@ M.init = function(theme) end end --- returns a table of colors for givem or current theme +-- returns a table of colors for given or current theme M.get = function(theme) if not theme then theme = vim.g.nvchad_theme diff --git a/lua/core/utils.lua b/lua/core/utils.lua index c1fcd3e..e795021 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -92,8 +92,8 @@ M.close_buffer = function(force) if type == "wind" then -- hide from bufferline vim.cmd(string.format("%d bufdo setlocal nobl", buf)) - -- swtich to another buff - -- TODO switch to next bufffer, this works too + -- switch to another buff + -- TODO switch to next buffer, this works too vim.cmd "BufferLineCycleNext" else local cur_win = vim.fn.winnr() From 1e6f9a2e52b67f8760045bafe8236a429d9599c1 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Mon, 3 Jan 2022 15:50:00 -0500 Subject: [PATCH 0892/1541] fix errors thrown by neovim no longer allowing implicit conversions of nil to 0 in api function calls. See neovim/neovim#16745 for details on why this is now an error --- lua/core/utils.lua | 3 ++- lua/plugins/configs/statusline.lua | 18 +++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index e795021..15c4c66 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -22,6 +22,7 @@ M.close_buffer = function(force) local function switch_buffer(windows, buf) local cur_win = vim.fn.winnr() for _, winid in ipairs(windows) do + winid = tonumber(winid) or 0 vim.cmd(string.format("%d wincmd w", vim.fn.win_id2win(winid))) vim.cmd(string.format("buffer %d", buf)) end @@ -121,7 +122,7 @@ M.hide_statusline = function() local hidden = require("core.utils").load_config().plugins.options.statusline.hidden local shown = require("core.utils").load_config().plugins.options.statusline.shown local api = vim.api - local buftype = api.nvim_buf_get_option("%", "ft") + local buftype = api.nvim_buf_get_option(0, "ft") -- shown table from config has the highest priority if vim.tbl_contains(shown, buftype) then diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index c8ae753..7a8aaa2 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -88,7 +88,7 @@ components.active[1][2] = { return " " .. icon .. " " .. filename .. " " end, enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(winid) > 70 + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 end, hl = { fg = colors.white, @@ -105,7 +105,7 @@ components.active[1][3] = { end, enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(winid) > 80 + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 80 end, hl = { @@ -218,7 +218,7 @@ components.active[2][1] = { return "" end, enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(winid) > 80 + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 80 end, hl = { fg = colors.green }, } @@ -232,7 +232,7 @@ components.active[3][1] = { end end, enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(winid) > 70 + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 end, hl = { fg = colors.grey_fg2, bg = colors.statusline_bg }, } @@ -240,7 +240,7 @@ components.active[3][1] = { components.active[3][2] = { provider = "git_branch", enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(winid) > 70 + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 end, hl = { fg = colors.grey_fg2, @@ -317,7 +317,7 @@ components.active[3][6] = { components.active[3][7] = { provider = statusline_style.left, enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(winid) > 90 + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 end, hl = { fg = colors.grey, @@ -328,7 +328,7 @@ components.active[3][7] = { components.active[3][8] = { provider = statusline_style.left, enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(winid) > 90 + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 end, hl = { fg = colors.green, @@ -339,7 +339,7 @@ components.active[3][8] = { components.active[3][9] = { provider = statusline_style.position_icon, enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(winid) > 90 + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 end, hl = { fg = colors.black, @@ -362,7 +362,7 @@ components.active[3][10] = { end, enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(winid) > 90 + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 end, hl = { From 4c88eaec492d8038cc6866bf8a29495dd205a4b3 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 4 Jan 2022 06:44:45 +0530 Subject: [PATCH 0893/1541] readme badge : update nvim version --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index 413a093..a703b18 100644 --- a/.github/README.md +++ b/.github/README.md @@ -33,7 +33,7 @@ alt="License" /> [![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/gADmkJb9Fb) -[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.6+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white)](https://github.com/neovim/neovim) +[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.6.1-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white)](https://github.com/neovim/neovim) [![GitHub Issues](https://img.shields.io/github/issues/NvChad/NvChad.svg?style=flat-square&label=Issues&color=fc0330)](https://github.com/NvChad/NvChad/issues) [![Last Commit](https://img.shields.io/github/last-commit/NvChad/NvChad.svg?style=flat-square&label=Last%20Commit&color=58eb34)](https://github.com/NvChad/NvChad/pulse) From 0a546e472039b901c7a7d077f99a4317efe04d99 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 6 Jan 2022 22:30:48 +0530 Subject: [PATCH 0894/1541] rm unused hook --- lua/core/hooks.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/core/hooks.lua b/lua/core/hooks.lua index 9f394ce..a4f9be3 100644 --- a/lua/core/hooks.lua +++ b/lua/core/hooks.lua @@ -3,7 +3,6 @@ local hooks, M = {}, {} local allowed_hooks = { ["install_plugins"] = true, ["setup_mappings"] = true, - ["ready"] = true, } M.add = function(name, fn) From 799432e99e343c64737005961d1ab05551bdd5f4 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 7 Jan 2022 07:30:55 +0530 Subject: [PATCH 0895/1541] load custom/init.lua at last | fix (#694) --- init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index c76b47e..e2405a9 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,3 @@ --- try to call custom init -pcall(require, "custom") - local core_modules = { "core.options", "core.autocmds", @@ -16,3 +13,6 @@ end -- non plugin mappings require("core.mappings").misc() + +-- try to call custom init +pcall(require, "custom") From 4e54ee0081babd3138180bb61ea093fcac03fd46 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 7 Jan 2022 19:58:05 +0530 Subject: [PATCH 0896/1541] rm hooks --- examples/{example_chadrc.lua => chadrc.lua} | 5 ++-- examples/{example_init.lua => init.lua} | 25 +++++++------------- lua/core/customPlugins.lua | 15 ++++++++++++ lua/core/hooks.lua | 26 --------------------- lua/core/mappings.lua | 2 -- lua/plugins/init.lua | 2 +- 6 files changed, 26 insertions(+), 49 deletions(-) rename examples/{example_chadrc.lua => chadrc.lua} (76%) rename examples/{example_init.lua => init.lua} (50%) create mode 100644 lua/core/customPlugins.lua delete mode 100644 lua/core/hooks.lua diff --git a/examples/example_chadrc.lua b/examples/chadrc.lua similarity index 76% rename from examples/example_chadrc.lua rename to examples/chadrc.lua index e810f1c..6967664 100644 --- a/examples/example_chadrc.lua +++ b/examples/chadrc.lua @@ -1,5 +1,4 @@ --- This is an example chadrc file , its supposed to be placed in /lua/custom dir --- lua/custom/chadrc.lua +-- This is an example chadrc file , its supposed to be placed in /lua/custom/ local M = {} @@ -7,7 +6,7 @@ local M = {} -- example of changing theme: M.ui = { - theme = "gruvchad", + theme = "onedark", } return M diff --git a/examples/example_init.lua b/examples/init.lua similarity index 50% rename from examples/example_init.lua rename to examples/init.lua index 2425cc2..7d6e529 100644 --- a/examples/example_init.lua +++ b/examples/init.lua @@ -1,28 +1,19 @@ --- This is an example init file , its supposed to be placed in /lua/custom dir --- lua/custom/init.lua +-- This is an example init file , its supposed to be placed in /lua/custom/ -- This is where your custom modules and plugins go. -- Please check NvChad docs if you're totally new to nvchad + dont know lua!! -local hooks = require "core.hooks" - -- MAPPINGS --- To add new plugins, use the "setup_mappings" hook, +local map = require("core.utils").map -hooks.add("setup_mappings", function(map) - map("n", "cc", ":Telescope ", opt) - map("n", "q", ":q ", opt) -end) - --- NOTE : opt is a variable there (most likely a table if you want multiple options), --- you can remove it if you dont have any custom options +map("n", "cc", ":Telescope ") +map("n", "q", ":q ") +-- NOTE: the 4th argument in the map function can be a table i.e options but its most likely un-needed so dont worry about it -- Install plugins --- To add new plugins, use the "install_plugins" hook, +local customPlugins = require "core.customPlugins" --- examples below: - -hooks.add("install_plugins", function(use) +customPlugins.add(function(use) use { "max397574/better-escape.nvim", event = "InsertEnter", @@ -34,6 +25,6 @@ hooks.add("install_plugins", function(use) } end) --- NOTE: we heavily suggest using Packer's lazy loading (with the 'event' field) +-- NOTE: we heavily suggest using Packer's lazy loading (with the 'event','cmd' fields) -- see: https://github.com/wbthomason/packer.nvim -- https://nvchad.github.io/config/walkthrough diff --git a/lua/core/customPlugins.lua b/lua/core/customPlugins.lua new file mode 100644 index 0000000..c667936 --- /dev/null +++ b/lua/core/customPlugins.lua @@ -0,0 +1,15 @@ +local M = {} +local plugins = {} + +M.add = function(fn) + table.insert(plugins, fn) +end + +-- load custom plugins in packer startup function +M.run = function(args) + for _, hook in pairs(plugins) do + hook(args) + end +end + +return M diff --git a/lua/core/hooks.lua b/lua/core/hooks.lua deleted file mode 100644 index a4f9be3..0000000 --- a/lua/core/hooks.lua +++ /dev/null @@ -1,26 +0,0 @@ -local hooks, M = {}, {} - -local allowed_hooks = { - ["install_plugins"] = true, - ["setup_mappings"] = true, -} - -M.add = function(name, fn) - if not allowed_hooks[name] then - print("Custom lua uses unallowed hook " .. name) - end - if not hooks[name] then - hooks[name] = {} - end - table.insert(hooks[name], fn) -end - -M.run = function(name, args) - if hooks[name] then - for _, hook in pairs(hooks[name]) do - hook(args) - end - end -end - -return M diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 93f74e1..a8efc95 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -1,5 +1,4 @@ local utils = require "core.utils" -local hooks = require "core.hooks" local config = utils.load_config() local map = utils.map @@ -110,7 +109,6 @@ M.misc = function() non_config_mappings() optional_mappings() required_mappings() - hooks.run("setup_mappings", map) end -- below are all plugin related mappings diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 6709c2b..cea8082 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -223,5 +223,5 @@ return packer.startup(function() end, } -- load user defined plugins - require("core.hooks").run("install_plugins", use) + require("core.customPlugins").run(use) end) From 6f65cffaa1bababfd88b2f49cb76d04ae8aafb90 Mon Sep 17 00:00:00 2001 From: Matt Bailey Date: Fri, 7 Jan 2022 12:23:25 -0800 Subject: [PATCH 0897/1541] chore: add spell directory to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8389435..db7df8e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ plugin custom +spell From 83ad616dd382d82e6f47827f5d60ec1e69f4b091 Mon Sep 17 00:00:00 2001 From: David Stark Date: Sat, 8 Jan 2022 00:52:11 +0000 Subject: [PATCH 0898/1541] when finding all files via Telescope follow symlinks --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index a8efc95..55a75b8 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -169,7 +169,7 @@ M.telescope = function() map("n", m.buffers, ":Telescope buffers ") map("n", m.find_files, ":Telescope find_files ") - map("n", m.find_hiddenfiles, ":Telescope find_files no_ignore=true hidden=true ") + map("n", m.find_hiddenfiles, ":Telescope follow=true find_files no_ignore=true hidden=true ") map("n", m.git_commits, ":Telescope git_commits ") map("n", m.git_status, ":Telescope git_status ") map("n", m.help_tags, ":Telescope help_tags ") From ea6f2a14900562d831eead325453821dbb15ff92 Mon Sep 17 00:00:00 2001 From: David Stark Date: Sat, 8 Jan 2022 01:54:55 +0000 Subject: [PATCH 0899/1541] hotfix to :Telescope command flag order --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 55a75b8..1a72b04 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -169,7 +169,7 @@ M.telescope = function() map("n", m.buffers, ":Telescope buffers ") map("n", m.find_files, ":Telescope find_files ") - map("n", m.find_hiddenfiles, ":Telescope follow=true find_files no_ignore=true hidden=true ") + map("n", m.find_hiddenfiles, ":Telescope find_files follow=true no_ignore=true hidden=true ") map("n", m.git_commits, ":Telescope git_commits ") map("n", m.git_status, ":Telescope git_status ") map("n", m.help_tags, ":Telescope help_tags ") From 71b710b35be675b62f069434b6bf745cbf66c8be Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 9 Jan 2022 09:07:18 +0530 Subject: [PATCH 0900/1541] add option for packerInit | fix (#715) --- lua/core/default_config.lua | 3 +++ lua/plugins/init.lua | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 06692b0..4f4facd 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -72,6 +72,9 @@ M.plugins = { autopairs = true, }, options = { + packer = { + init_file = "plugins.packerInit", + }, autopairs = { loadAfter = "nvim-cmp" }, lspconfig = { setup_lspconf = "", -- path of file containing setups of different lsps diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index cea8082..50aa374 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,4 +1,5 @@ -local present, packer = pcall(require, "plugins.packerInit") +local plugin_settings = require("core.utils").load_config().plugins +local present, packer = pcall(require, plugin_settings.options.packer.init_file) if not present then return false @@ -7,7 +8,6 @@ end local use = packer.use return packer.startup(function() - local plugin_settings = require("core.utils").load_config().plugins local override_req = require("core.utils").override_req -- this is arranged on the basis of when a plugin starts From e9b25e591292cb6acd2aa1ab325e04aab41cd455 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 10 Jan 2022 06:32:27 +0530 Subject: [PATCH 0901/1541] rm un-needed lazy loading for comment.nvim loading it with our lazy_load function would mean that it would load after the UI so using module=comment doesnt make any sense at all, so keeping only the module part would mean that this plugin would load on mappings that invoke comment.nvim functions --- lua/plugins/init.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 50aa374..af686b9 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -196,7 +196,6 @@ return packer.startup(function() module = "Comment", config = override_req("nvim_comment", "(plugins.configs.others).comment()"), setup = function() - require("core.utils").packer_lazy_load "Comment.nvim" require("core.mappings").comment() end, } From 8c2bbd2143af11a0f4592ea78cbaed7e986efb26 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 11 Jan 2022 06:14:32 +0530 Subject: [PATCH 0902/1541] fix cursor bugging when using auto-completion #603 --- lua/plugins/configs/others.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 5240ba1..8784c29 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -119,7 +119,6 @@ M.lsp_handlers = function() vim.diagnostic.config { virtual_text = { prefix = "", - spacing = 0, }, signs = true, underline = true, From fa9f9aad0ba9663b254f60e7362bbf1bf8626aaa Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Mon, 10 Jan 2022 23:39:37 -0500 Subject: [PATCH 0903/1541] rewrote statusline to be compartmentalized into named components and easier to understand/customize as a basis --- lua/plugins/configs/statusline.lua | 671 +++++++++++++++-------------- 1 file changed, 357 insertions(+), 314 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 7a8aaa2..500403b 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -3,44 +3,44 @@ local lsp = require "feline.providers.lsp" local lsp_severity = vim.diagnostic.severity local icon_styles = { - default = { - left = "", - right = " ", - main_icon = "  ", - vi_mode_icon = " ", - position_icon = " ", - }, - arrow = { - left = "", - right = "", - main_icon = "  ", - vi_mode_icon = " ", - position_icon = " ", - }, + default = { + left = "", + right = " ", + main_icon = "  ", + vi_mode_icon = " ", + position_icon = " ", + }, + arrow = { + left = "", + right = "", + main_icon = "  ", + vi_mode_icon = " ", + position_icon = " ", + }, - block = { - left = " ", - right = " ", - main_icon = "  ", - vi_mode_icon = "  ", - position_icon = "  ", - }, + block = { + left = " ", + right = " ", + main_icon = "  ", + vi_mode_icon = "  ", + position_icon = "  ", + }, - round = { - left = "", - right = "", - main_icon = "  ", - vi_mode_icon = " ", - position_icon = " ", - }, + round = { + left = "", + right = "", + main_icon = "  ", + vi_mode_icon = " ", + position_icon = " ", + }, - slant = { - left = " ", - right = " ", - main_icon = "  ", - vi_mode_icon = " ", - position_icon = " ", - }, + slant = { + left = " ", + right = " ", + main_icon = "  ", + vi_mode_icon = " ", + position_icon = " ", + }, } local config = require("core.utils").load_config().plugins.options.statusline @@ -54,327 +54,370 @@ local shortline = config.shortline == false and true -- Initialize the components table local components = { - active = {}, - inactive = {}, + active = {}, + inactive = {}, } table.insert(components.active, {}) table.insert(components.active, {}) table.insert(components.active, {}) -components.active[1][1] = { - provider = statusline_style.main_icon, +local get_components = function() + local M = {} - hl = { - fg = colors.statusline_bg, - bg = colors.nord_blue, - }, + M.main_icon = { + provider = statusline_style.main_icon, - right_sep = { str = statusline_style.right, hl = { - fg = colors.nord_blue, - bg = colors.lightbg, - } }, -} + hl = { + fg = colors.statusline_bg, + bg = colors.nord_blue, + }, -components.active[1][2] = { - provider = function() - local filename = vim.fn.expand "%:t" - local extension = vim.fn.expand "%:e" - local icon = require("nvim-web-devicons").get_icon(filename, extension) - if icon == nil then - icon = " " - return icon - end - return " " .. icon .. " " .. filename .. " " - end, - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 - end, - hl = { - fg = colors.white, - bg = colors.lightbg, - }, + right_sep = { str = statusline_style.right, hl = { + fg = colors.nord_blue, + bg = colors.lightbg, + } }, + } - right_sep = { str = statusline_style.right, hl = { fg = colors.lightbg, bg = colors.lightbg2 } }, -} + M.file = { + provider = function() + local filename = vim.fn.expand "%:t" + local extension = vim.fn.expand "%:e" + local icon = require("nvim-web-devicons").get_icon(filename, extension) + if icon == nil then + icon = " " + return icon + end + return " " .. icon .. " " .. filename .. " " + end, + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 + end, + hl = { + fg = colors.white, + bg = colors.lightbg, + }, -components.active[1][3] = { - provider = function() - local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") - return "  " .. dir_name .. " " - end, + right_sep = { str = statusline_style.right, hl = { fg = colors.lightbg, bg = colors.lightbg2 } }, + } - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 80 - end, + M.dir = { + provider = function() + local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") + return "  " .. dir_name .. " " + end, - hl = { - fg = colors.grey_fg2, - bg = colors.lightbg2, - }, - right_sep = { - str = statusline_style.right, - hi = { - fg = colors.lightbg2, - bg = colors.statusline_bg, - }, - }, -} + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 80 + end, -components.active[1][4] = { - provider = "git_diff_added", - hl = { - fg = colors.grey_fg2, - bg = colors.statusline_bg, - }, - icon = " ", -} --- diffModfified -components.active[1][5] = { - provider = "git_diff_changed", - hl = { - fg = colors.grey_fg2, - bg = colors.statusline_bg, - }, - icon = "  ", -} --- diffRemove -components.active[1][6] = { - provider = "git_diff_removed", - hl = { - fg = colors.grey_fg2, - bg = colors.statusline_bg, - }, - icon = "  ", -} + hl = { + fg = colors.grey_fg2, + bg = colors.lightbg2, + }, + right_sep = { + str = statusline_style.right, + hi = { + fg = colors.lightbg2, + bg = colors.statusline_bg, + }, + }, + } -components.active[1][7] = { - provider = "diagnostic_errors", - enabled = function() - return lsp.diagnostics_exist(lsp_severity.ERROR) - end, + M.git_added = { + provider = "git_diff_added", + hl = { + fg = colors.grey_fg2, + bg = colors.statusline_bg, + }, + icon = " ", + } - hl = { fg = colors.red }, - icon = "  ", -} + M.git_modified = { + provider = "git_diff_changed", + hl = { + fg = colors.grey_fg2, + bg = colors.statusline_bg, + }, + icon = "  ", + } -components.active[1][8] = { - provider = "diagnostic_warnings", - enabled = function() - return lsp.diagnostics_exist(lsp_severity.WARN) - end, - hl = { fg = colors.yellow }, - icon = "  ", -} + M.git_removed = { + provider = "git_diff_removed", + hl = { + fg = colors.grey_fg2, + bg = colors.statusline_bg, + }, + icon = "  ", + } -components.active[1][9] = { - provider = "diagnostic_hints", - enabled = function() - return lsp.diagnostics_exist(lsp_severity.HINT) - end, - hl = { fg = colors.grey_fg2 }, - icon = "  ", -} + M.diagnostic_errors = { + provider = "diagnostic_errors", + enabled = function() + return lsp.diagnostics_exist(lsp_severity.ERROR) + end, -components.active[1][10] = { - provider = "diagnostic_info", - enabled = function() - return lsp.diagnostics_exist(lsp_severity.INFO) - end, - hl = { fg = colors.green }, - icon = "  ", -} + hl = { fg = colors.red }, + icon = "  ", + } -components.active[2][1] = { - provider = function() - local Lsp = vim.lsp.util.get_progress_messages()[1] + M.diagnostic_warnings= { + provider = "diagnostic_warnings", + enabled = function() + return lsp.diagnostics_exist(lsp_severity.WARN) + end, + hl = { fg = colors.yellow }, + icon = "  ", + } - if Lsp then - local msg = Lsp.message or "" - local percentage = Lsp.percentage or 0 - local title = Lsp.title or "" - local spinners = { - "", - "", - "", - } + M.diagnostic_hints = { + provider = "diagnostic_hints", + enabled = function() + return lsp.diagnostics_exist(lsp_severity.HINT) + end, + hl = { fg = colors.grey_fg2 }, + icon = "  ", + } - local success_icon = { - "", - "", - "", - } + M.dianostic_info ={ + provider = "diagnostic_info", + enabled = function() + return lsp.diagnostics_exist(lsp_severity.INFO) + end, + hl = { fg = colors.green }, + icon = "  ", + } - local ms = vim.loop.hrtime() / 1000000 - local frame = math.floor(ms / 120) % #spinners + M.lsp_progress = { + provider = function() + local Lsp = vim.lsp.util.get_progress_messages()[1] - if percentage >= 70 then - return string.format(" %%<%s %s %s (%s%%%%) ", success_icon[frame + 1], title, msg, percentage) - end + if Lsp then + local msg = Lsp.message or "" + local percentage = Lsp.percentage or 0 + local title = Lsp.title or "" + local spinners = { + "", + "", + "", + } - return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage) - end + local success_icon = { + "", + "", + "", + } - return "" - end, - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 80 - end, - hl = { fg = colors.green }, -} + local ms = vim.loop.hrtime() / 1000000 + local frame = math.floor(ms / 120) % #spinners -components.active[3][1] = { - provider = function() - if next(vim.lsp.buf_get_clients()) ~= nil then - return " LSP" - else - return "" - end - end, - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 - end, - hl = { fg = colors.grey_fg2, bg = colors.statusline_bg }, -} + if percentage >= 70 then + return string.format(" %%<%s %s %s (%s%%%%) ", success_icon[frame + 1], title, msg, percentage) + end -components.active[3][2] = { - provider = "git_branch", - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 - end, - hl = { - fg = colors.grey_fg2, - bg = colors.statusline_bg, - }, - icon = "  ", -} + return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage) + end -components.active[3][3] = { - provider = " " .. statusline_style.left, - hl = { - fg = colors.one_bg2, - bg = colors.statusline_bg, - }, -} + return "" + end, + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 80 + end, + hl = { fg = colors.green }, + } -local mode_colors = { - ["n"] = { "NORMAL", colors.red }, - ["no"] = { "N-PENDING", colors.red }, - ["i"] = { "INSERT", colors.dark_purple }, - ["ic"] = { "INSERT", colors.dark_purple }, - ["t"] = { "TERMINAL", colors.green }, - ["v"] = { "VISUAL", colors.cyan }, - ["V"] = { "V-LINE", colors.cyan }, - [""] = { "V-BLOCK", colors.cyan }, - ["R"] = { "REPLACE", colors.orange }, - ["Rv"] = { "V-REPLACE", colors.orange }, - ["s"] = { "SELECT", colors.nord_blue }, - ["S"] = { "S-LINE", colors.nord_blue }, - [""] = { "S-BLOCK", colors.nord_blue }, - ["c"] = { "COMMAND", colors.pink }, - ["cv"] = { "COMMAND", colors.pink }, - ["ce"] = { "COMMAND", colors.pink }, - ["r"] = { "PROMPT", colors.teal }, - ["rm"] = { "MORE", colors.teal }, - ["r?"] = { "CONFIRM", colors.teal }, - ["!"] = { "SHELL", colors.green }, -} + M.lsp = { + provider = function() + if next(vim.lsp.buf_get_clients()) ~= nil then + return " LSP" + else + return "" + end + end, + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 + end, + hl = { fg = colors.grey_fg2, bg = colors.statusline_bg }, + } -local chad_mode_hl = function() - return { - fg = mode_colors[vim.fn.mode()][2], - bg = colors.one_bg, - } + M.git_branch = { + provider = "git_branch", + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 + end, + hl = { + fg = colors.grey_fg2, + bg = colors.statusline_bg, + }, + icon = "  ", + } + + M.git_right_separator = { + provider = " " .. statusline_style.left, + hl = { + fg = colors.one_bg2, + bg = colors.statusline_bg, + }, + } + + local mode_colors = { + ["n"] = { "NORMAL", colors.red }, + ["no"] = { "N-PENDING", colors.red }, + ["i"] = { "INSERT", colors.dark_purple }, + ["ic"] = { "INSERT", colors.dark_purple }, + ["t"] = { "TERMINAL", colors.green }, + ["v"] = { "VISUAL", colors.cyan }, + ["V"] = { "V-LINE", colors.cyan }, + [""] = { "V-BLOCK", colors.cyan }, + ["R"] = { "REPLACE", colors.orange }, + ["Rv"] = { "V-REPLACE", colors.orange }, + ["s"] = { "SELECT", colors.nord_blue }, + ["S"] = { "S-LINE", colors.nord_blue }, + [""] = { "S-BLOCK", colors.nord_blue }, + ["c"] = { "COMMAND", colors.pink }, + ["cv"] = { "COMMAND", colors.pink }, + ["ce"] = { "COMMAND", colors.pink }, + ["r"] = { "PROMPT", colors.teal }, + ["rm"] = { "MORE", colors.teal }, + ["r?"] = { "CONFIRM", colors.teal }, + ["!"] = { "SHELL", colors.green }, + } + + local chad_mode_hl = function() + return { + fg = mode_colors[vim.fn.mode()][2], + bg = colors.one_bg, + } + end + + M.mode_left_separator = { + provider = statusline_style.left, + hl = function() + return { + fg = mode_colors[vim.fn.mode()][2], + bg = colors.one_bg2, + } + end, + } + + M.mode_icon = { + provider = statusline_style.vi_mode_icon, + hl = function() + return { + fg = colors.statusline_bg, + bg = mode_colors[vim.fn.mode()][2], + } + end, + } + + M.mode_string = { + provider = function() + return " " .. mode_colors[vim.fn.mode()][1] .. " " + end, + hl = chad_mode_hl, + } + + M.loc_spacer_left = { + provider = statusline_style.left, + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 + end, + hl = { + fg = colors.grey, + bg = colors.one_bg, + } + } + + M.loc_separator_left = { + provider = statusline_style.left, + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 + end, + hl = { + fg = colors.green, + bg = colors.grey, + }, + } + + M.loc_position_icon = { + provider = statusline_style.position_icon, + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 + end, + hl = { + fg = colors.black, + bg = colors.green, + } + } + + M.loc_position_text = { + provider = function() + local current_line = vim.fn.line "." + local total_line = vim.fn.line "$" + + if current_line == 1 then + return " Top " + elseif current_line == vim.fn.line "$" then + return " Bot " + end + local result, _ = math.modf((current_line / total_line) * 100) + return " " .. result .. "%% " + end, + + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 + end, + + hl = { + fg = colors.green, + bg = colors.one_bg, + }, + } + return M end -components.active[3][4] = { - provider = statusline_style.left, - hl = function() - return { - fg = mode_colors[vim.fn.mode()][2], - bg = colors.one_bg2, - } - end, -} +local components_list = get_components() -components.active[3][5] = { - provider = statusline_style.vi_mode_icon, - hl = function() - return { - fg = colors.statusline_bg, - bg = mode_colors[vim.fn.mode()][2], - } - end, -} +local left = {} +local right = {} +local middle = {} -components.active[3][6] = { - provider = function() - return " " .. mode_colors[vim.fn.mode()][1] .. " " - end, - hl = chad_mode_hl, -} +table.insert(left, components_list.main_icon) +table.insert(left, components_list.file) +table.insert(left, components_list.dir) -components.active[3][7] = { - provider = statusline_style.left, - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 - end, - hl = { - fg = colors.grey, - bg = colors.one_bg, - }, -} +table.insert(left, components_list.git_added) +table.insert(left, components_list.git_modified) +table.insert(left, components_list.git_removed) -components.active[3][8] = { - provider = statusline_style.left, - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 - end, - hl = { - fg = colors.green, - bg = colors.grey, - }, -} +table.insert(left, components_list.diagnostic_errors) +table.insert(left, components_list.diagnostic_warnings) +table.insert(left, components_list.diagnostic_hints) +table.insert(left, components_list.diagnostic_info) -components.active[3][9] = { - provider = statusline_style.position_icon, - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 - end, - hl = { - fg = colors.black, - bg = colors.green, - }, -} +table.insert(middle, components_list.lsp_progress) -components.active[3][10] = { - provider = function() - local current_line = vim.fn.line "." - local total_line = vim.fn.line "$" +table.insert(right, components_list.lsp) +table.insert(right, components_list.git_branch) +table.insert(right, components_list.git_right_separator) - if current_line == 1 then - return " Top " - elseif current_line == vim.fn.line "$" then - return " Bot " - end - local result, _ = math.modf((current_line / total_line) * 100) - return " " .. result .. "%% " - end, +table.insert(right, components_list.mode_left_separator) +table.insert(right, components_list.mode_mode_icon) +table.insert(right, components_list.mode_mode_string) - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 - end, +table.insert(right, components_list.loc_spacer_left) +table.insert(right, components_list.loc_separator_left) +table.insert(right, components_list.loc_position_icon) +table.insert(right, components_list.loc_position_text) - hl = { - fg = colors.green, - bg = colors.one_bg, - }, -} +components.active[1] = left +components.active[2] = middle +components.active[3] = right require("feline").setup { - theme = { - bg = colors.statusline_bg, - fg = colors.fg, - }, - components = components, + theme = { + bg = colors.statusline_bg, + fg = colors.fg, + }, + components = components, } From a21ee2f22fe14a98a5e26a50b4420df32bb37eba Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 11 Jan 2022 11:42:02 +0530 Subject: [PATCH 0904/1541] clean | organize statusline config --- lua/plugins/configs/statusline.lua | 716 ++++++++++++++--------------- 1 file changed, 356 insertions(+), 360 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 500403b..6bce988 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -1,46 +1,46 @@ -local colors = require("colors").get() + local colors = require("colors").get() local lsp = require "feline.providers.lsp" local lsp_severity = vim.diagnostic.severity local icon_styles = { - default = { - left = "", - right = " ", - main_icon = "  ", - vi_mode_icon = " ", - position_icon = " ", - }, - arrow = { - left = "", - right = "", - main_icon = "  ", - vi_mode_icon = " ", - position_icon = " ", - }, + default = { + left = "", + right = " ", + main_icon = "  ", + vi_mode_icon = " ", + position_icon = " ", + }, + arrow = { + left = "", + right = "", + main_icon = "  ", + vi_mode_icon = " ", + position_icon = " ", + }, - block = { - left = " ", - right = " ", - main_icon = "  ", - vi_mode_icon = "  ", - position_icon = "  ", - }, + block = { + left = " ", + right = " ", + main_icon = "  ", + vi_mode_icon = "  ", + position_icon = "  ", + }, - round = { - left = "", - right = "", - main_icon = "  ", - vi_mode_icon = " ", - position_icon = " ", - }, + round = { + left = "", + right = "", + main_icon = "  ", + vi_mode_icon = " ", + position_icon = " ", + }, - slant = { - left = " ", - right = " ", - main_icon = "  ", - vi_mode_icon = " ", - position_icon = " ", - }, + slant = { + left = " ", + right = " ", + main_icon = "  ", + vi_mode_icon = " ", + position_icon = " ", + }, } local config = require("core.utils").load_config().plugins.options.statusline @@ -54,370 +54,366 @@ local shortline = config.shortline == false and true -- Initialize the components table local components = { - active = {}, - inactive = {}, + active = {}, } -table.insert(components.active, {}) -table.insert(components.active, {}) -table.insert(components.active, {}) +local main_icon = { + provider = statusline_style.main_icon, -local get_components = function() - local M = {} + hl = { + fg = colors.statusline_bg, + bg = colors.nord_blue, + }, - M.main_icon = { - provider = statusline_style.main_icon, + right_sep = { str = statusline_style.right, hl = { + fg = colors.nord_blue, + bg = colors.lightbg, + } }, +} - hl = { - fg = colors.statusline_bg, - bg = colors.nord_blue, - }, +local file_name = { + provider = function() + local filename = vim.fn.expand "%:t" + local extension = vim.fn.expand "%:e" + local icon = require("nvim-web-devicons").get_icon(filename, extension) + if icon == nil then + icon = " " + return icon + end + return " " .. icon .. " " .. filename .. " " + end, + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 + end, + hl = { + fg = colors.white, + bg = colors.lightbg, + }, - right_sep = { str = statusline_style.right, hl = { - fg = colors.nord_blue, - bg = colors.lightbg, - } }, - } + right_sep = { str = statusline_style.right, hl = { fg = colors.lightbg, bg = colors.lightbg2 } }, +} - M.file = { - provider = function() - local filename = vim.fn.expand "%:t" - local extension = vim.fn.expand "%:e" - local icon = require("nvim-web-devicons").get_icon(filename, extension) - if icon == nil then - icon = " " - return icon - end - return " " .. icon .. " " .. filename .. " " - end, - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 - end, - hl = { - fg = colors.white, - bg = colors.lightbg, - }, +local dir_name = { + provider = function() + local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") + return "  " .. dir_name .. " " + end, - right_sep = { str = statusline_style.right, hl = { fg = colors.lightbg, bg = colors.lightbg2 } }, - } + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 80 + end, - M.dir = { - provider = function() - local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") - return "  " .. dir_name .. " " - end, + hl = { + fg = colors.grey_fg2, + bg = colors.lightbg2, + }, + right_sep = { + str = statusline_style.right, + hi = { + fg = colors.lightbg2, + bg = colors.statusline_bg, + }, + }, +} - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 80 - end, +local diff = { + add = { + provider = "git_diff_added", + hl = { + fg = colors.grey_fg2, + bg = colors.statusline_bg, + }, + icon = " ", + }, - hl = { - fg = colors.grey_fg2, - bg = colors.lightbg2, - }, - right_sep = { - str = statusline_style.right, - hi = { - fg = colors.lightbg2, - bg = colors.statusline_bg, - }, - }, - } + change = { + provider = "git_diff_changed", + hl = { + fg = colors.grey_fg2, + bg = colors.statusline_bg, + }, + icon = "  ", + }, - M.git_added = { - provider = "git_diff_added", - hl = { - fg = colors.grey_fg2, - bg = colors.statusline_bg, - }, - icon = " ", - } + remove = { + provider = "git_diff_removed", + hl = { + fg = colors.grey_fg2, + bg = colors.statusline_bg, + }, + icon = "  ", + }, +} - M.git_modified = { - provider = "git_diff_changed", - hl = { - fg = colors.grey_fg2, - bg = colors.statusline_bg, - }, - icon = "  ", - } +local git_branch = { + provider = "git_branch", + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 + end, + hl = { + fg = colors.grey_fg2, + bg = colors.statusline_bg, + }, + icon = "  ", +} - M.git_removed = { - provider = "git_diff_removed", - hl = { - fg = colors.grey_fg2, - bg = colors.statusline_bg, - }, - icon = "  ", - } +local diagnostic = { + errors = { + provider = "diagnostic_errors", + enabled = function() + return lsp.diagnostics_exist(lsp_severity.ERROR) + end, - M.diagnostic_errors = { - provider = "diagnostic_errors", - enabled = function() - return lsp.diagnostics_exist(lsp_severity.ERROR) - end, + hl = { fg = colors.red }, + icon = "  ", + }, - hl = { fg = colors.red }, - icon = "  ", - } + warning = { + provider = "diagnostic_warnings", + enabled = function() + return lsp.diagnostics_exist(lsp_severity.WARN) + end, + hl = { fg = colors.yellow }, + icon = "  ", + }, - M.diagnostic_warnings= { - provider = "diagnostic_warnings", - enabled = function() - return lsp.diagnostics_exist(lsp_severity.WARN) - end, - hl = { fg = colors.yellow }, - icon = "  ", - } + hint = { + provider = "diagnostic_hints", + enabled = function() + return lsp.diagnostics_exist(lsp_severity.HINT) + end, + hl = { fg = colors.grey_fg2 }, + icon = "  ", + }, - M.diagnostic_hints = { - provider = "diagnostic_hints", - enabled = function() - return lsp.diagnostics_exist(lsp_severity.HINT) - end, - hl = { fg = colors.grey_fg2 }, - icon = "  ", - } + info = { + provider = "diagnostic_info", + enabled = function() + return lsp.diagnostics_exist(lsp_severity.INFO) + end, + hl = { fg = colors.green }, + icon = "  ", + }, +} - M.dianostic_info ={ - provider = "diagnostic_info", - enabled = function() - return lsp.diagnostics_exist(lsp_severity.INFO) - end, - hl = { fg = colors.green }, - icon = "  ", - } +local lsp_progress = { + provider = function() + local Lsp = vim.lsp.util.get_progress_messages()[1] - M.lsp_progress = { - provider = function() - local Lsp = vim.lsp.util.get_progress_messages()[1] + if Lsp then + local msg = Lsp.message or "" + local percentage = Lsp.percentage or 0 + local title = Lsp.title or "" + local spinners = { + "", + "", + "", + } - if Lsp then - local msg = Lsp.message or "" - local percentage = Lsp.percentage or 0 - local title = Lsp.title or "" - local spinners = { - "", - "", - "", - } + local success_icon = { + "", + "", + "", + } - local success_icon = { - "", - "", - "", - } + local ms = vim.loop.hrtime() / 1000000 + local frame = math.floor(ms / 120) % #spinners - local ms = vim.loop.hrtime() / 1000000 - local frame = math.floor(ms / 120) % #spinners + if percentage >= 70 then + return string.format(" %%<%s %s %s (%s%%%%) ", success_icon[frame + 1], title, msg, percentage) + end - if percentage >= 70 then - return string.format(" %%<%s %s %s (%s%%%%) ", success_icon[frame + 1], title, msg, percentage) - end + return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage) + end - return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage) - end + return "" + end, + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 80 + end, + hl = { fg = colors.green }, +} - return "" - end, - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 80 - end, - hl = { fg = colors.green }, - } +local lsp_icon = { + provider = function() + if next(vim.lsp.buf_get_clients()) ~= nil then + return " LSP" + else + return "" + end + end, + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 + end, + hl = { fg = colors.grey_fg2, bg = colors.statusline_bg }, +} - M.lsp = { - provider = function() - if next(vim.lsp.buf_get_clients()) ~= nil then - return " LSP" - else - return "" - end - end, - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 - end, - hl = { fg = colors.grey_fg2, bg = colors.statusline_bg }, - } +local mode_colors = { + ["n"] = { "NORMAL", colors.red }, + ["no"] = { "N-PENDING", colors.red }, + ["i"] = { "INSERT", colors.dark_purple }, + ["ic"] = { "INSERT", colors.dark_purple }, + ["t"] = { "TERMINAL", colors.green }, + ["v"] = { "VISUAL", colors.cyan }, + ["V"] = { "V-LINE", colors.cyan }, + [""] = { "V-BLOCK", colors.cyan }, + ["R"] = { "REPLACE", colors.orange }, + ["Rv"] = { "V-REPLACE", colors.orange }, + ["s"] = { "SELECT", colors.nord_blue }, + ["S"] = { "S-LINE", colors.nord_blue }, + [""] = { "S-BLOCK", colors.nord_blue }, + ["c"] = { "COMMAND", colors.pink }, + ["cv"] = { "COMMAND", colors.pink }, + ["ce"] = { "COMMAND", colors.pink }, + ["r"] = { "PROMPT", colors.teal }, + ["rm"] = { "MORE", colors.teal }, + ["r?"] = { "CONFIRM", colors.teal }, + ["!"] = { "SHELL", colors.green }, +} - M.git_branch = { - provider = "git_branch", - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 - end, - hl = { - fg = colors.grey_fg2, - bg = colors.statusline_bg, - }, - icon = "  ", - } - - M.git_right_separator = { - provider = " " .. statusline_style.left, - hl = { - fg = colors.one_bg2, - bg = colors.statusline_bg, - }, - } - - local mode_colors = { - ["n"] = { "NORMAL", colors.red }, - ["no"] = { "N-PENDING", colors.red }, - ["i"] = { "INSERT", colors.dark_purple }, - ["ic"] = { "INSERT", colors.dark_purple }, - ["t"] = { "TERMINAL", colors.green }, - ["v"] = { "VISUAL", colors.cyan }, - ["V"] = { "V-LINE", colors.cyan }, - [""] = { "V-BLOCK", colors.cyan }, - ["R"] = { "REPLACE", colors.orange }, - ["Rv"] = { "V-REPLACE", colors.orange }, - ["s"] = { "SELECT", colors.nord_blue }, - ["S"] = { "S-LINE", colors.nord_blue }, - [""] = { "S-BLOCK", colors.nord_blue }, - ["c"] = { "COMMAND", colors.pink }, - ["cv"] = { "COMMAND", colors.pink }, - ["ce"] = { "COMMAND", colors.pink }, - ["r"] = { "PROMPT", colors.teal }, - ["rm"] = { "MORE", colors.teal }, - ["r?"] = { "CONFIRM", colors.teal }, - ["!"] = { "SHELL", colors.green }, - } - - local chad_mode_hl = function() - return { - fg = mode_colors[vim.fn.mode()][2], - bg = colors.one_bg, - } - end - - M.mode_left_separator = { - provider = statusline_style.left, - hl = function() - return { - fg = mode_colors[vim.fn.mode()][2], - bg = colors.one_bg2, - } - end, - } - - M.mode_icon = { - provider = statusline_style.vi_mode_icon, - hl = function() - return { - fg = colors.statusline_bg, - bg = mode_colors[vim.fn.mode()][2], - } - end, - } - - M.mode_string = { - provider = function() - return " " .. mode_colors[vim.fn.mode()][1] .. " " - end, - hl = chad_mode_hl, - } - - M.loc_spacer_left = { - provider = statusline_style.left, - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 - end, - hl = { - fg = colors.grey, - bg = colors.one_bg, - } - } - - M.loc_separator_left = { - provider = statusline_style.left, - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 - end, - hl = { - fg = colors.green, - bg = colors.grey, - }, - } - - M.loc_position_icon = { - provider = statusline_style.position_icon, - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 - end, - hl = { - fg = colors.black, - bg = colors.green, - } - } - - M.loc_position_text = { - provider = function() - local current_line = vim.fn.line "." - local total_line = vim.fn.line "$" - - if current_line == 1 then - return " Top " - elseif current_line == vim.fn.line "$" then - return " Bot " - end - local result, _ = math.modf((current_line / total_line) * 100) - return " " .. result .. "%% " - end, - - enabled = shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 - end, - - hl = { - fg = colors.green, - bg = colors.one_bg, - }, - } - return M +local chad_mode_hl = function() + return { + fg = mode_colors[vim.fn.mode()][2], + bg = colors.one_bg, + } end -local components_list = get_components() +local empty_space = { + provider = " " .. statusline_style.left, + hl = { + fg = colors.one_bg2, + bg = colors.statusline_bg, + }, +} +-- this matches the vi mode color +local empty_spaceColored = { + provider = statusline_style.left, + hl = function() + return { + fg = mode_colors[vim.fn.mode()][2], + bg = colors.one_bg2, + } + end, +} + +local mode_icon = { + provider = statusline_style.vi_mode_icon, + hl = function() + return { + fg = colors.statusline_bg, + bg = mode_colors[vim.fn.mode()][2], + } + end, +} + +local empty_space2 = { + provider = function() + return " " .. mode_colors[vim.fn.mode()][1] .. " " + end, + hl = chad_mode_hl, +} + +local separator_right = { + provider = statusline_style.left, + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 + end, + hl = { + fg = colors.grey, + bg = colors.one_bg, + }, +} + +local separator_right2 = { + provider = statusline_style.left, + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 + end, + hl = { + fg = colors.green, + bg = colors.grey, + }, +} + +local position_icon = { + provider = statusline_style.position_icon, + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 + end, + hl = { + fg = colors.black, + bg = colors.green, + }, +} + +local current_line = { + provider = function() + local current_line = vim.fn.line "." + local total_line = vim.fn.line "$" + + if current_line == 1 then + return " Top " + elseif current_line == vim.fn.line "$" then + return " Bot " + end + local result, _ = math.modf((current_line / total_line) * 100) + return " " .. result .. "%% " + end, + + enabled = shortline or function(winid) + return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 + end, + + hl = { + fg = colors.green, + bg = colors.one_bg, + }, +} + +local function add_table(a, b) + table.insert(a, b) +end + +-- components are divided in 3 sections local left = {} -local right = {} local middle = {} +local right = {} -table.insert(left, components_list.main_icon) -table.insert(left, components_list.file) -table.insert(left, components_list.dir) +-- left +add_table(left, main_icon) +add_table(left, file_name) +add_table(left, dir_name) +add_table(left, diff.add) +add_table(left, diff.change) +add_table(left, diff.remove) +add_table(left, diagnostic.error) +add_table(left, diagnostic.warning) +add_table(left, diagnostic.hint) +add_table(left, diagnostic.info) -table.insert(left, components_list.git_added) -table.insert(left, components_list.git_modified) -table.insert(left, components_list.git_removed) +add_table(middle, lsp_progress) -table.insert(left, components_list.diagnostic_errors) -table.insert(left, components_list.diagnostic_warnings) -table.insert(left, components_list.diagnostic_hints) -table.insert(left, components_list.diagnostic_info) - -table.insert(middle, components_list.lsp_progress) - -table.insert(right, components_list.lsp) -table.insert(right, components_list.git_branch) -table.insert(right, components_list.git_right_separator) - -table.insert(right, components_list.mode_left_separator) -table.insert(right, components_list.mode_mode_icon) -table.insert(right, components_list.mode_mode_string) - -table.insert(right, components_list.loc_spacer_left) -table.insert(right, components_list.loc_separator_left) -table.insert(right, components_list.loc_position_icon) -table.insert(right, components_list.loc_position_text) +-- right +add_table(right, lsp_icon) +add_table(right, git_branch) +add_table(right, empty_space) +add_table(right, empty_spaceColored) +add_table(right, mode_icon) +add_table(right, empty_space2) +add_table(right, separator_right) +add_table(right, separator_right2) +add_table(right, position_icon) +add_table(right, current_line) components.active[1] = left components.active[2] = middle components.active[3] = right require("feline").setup { - theme = { - bg = colors.statusline_bg, - fg = colors.fg, - }, - components = components, + theme = { + bg = colors.statusline_bg, + fg = colors.fg, + }, + components = components, } From b1338beb0f775deb55c91a88a09e6738e73e5f97 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 11 Jan 2022 18:43:09 +0530 Subject: [PATCH 0905/1541] add option to toggle lazy load for cmp and related --- lua/core/default_config.lua | 3 +++ lua/plugins/init.lua | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 4f4facd..3d8e2a0 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -76,6 +76,9 @@ M.plugins = { init_file = "plugins.packerInit", }, autopairs = { loadAfter = "nvim-cmp" }, + cmp = { + lazy_load = true, + }, lspconfig = { setup_lspconf = "", -- path of file containing setups of different lsps }, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index af686b9..9a6793c 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -132,7 +132,7 @@ return packer.startup(function() use { "hrsh7th/nvim-cmp", disable = not plugin_settings.status.cmp, - after = "friendly-snippets", + after = plugin_settings.options.cmp.lazy_load and "friendly-snippets", config = override_req("nvim_cmp", "plugins.configs.cmp"), } @@ -140,44 +140,44 @@ return packer.startup(function() "L3MON4D3/LuaSnip", disable = not plugin_settings.status.cmp, wants = "friendly-snippets", - after = "nvim-cmp", + after = plugin_settings.options.cmp.lazy_load and "nvim-cmp", config = override_req("luasnip", "(plugins.configs.others).luasnip()"), } use { "saadparwaiz1/cmp_luasnip", disable = not plugin_settings.status.cmp, - after = "LuaSnip", + after = plugin_settings.options.cmp.lazy_load and "LuaSnip", } use { "hrsh7th/cmp-nvim-lua", disable = not plugin_settings.status.cmp, - after = "cmp_luasnip", + after = plugin_settings.options.cmp.lazy_load and "cmp_luasnip", } use { "hrsh7th/cmp-nvim-lsp", disable = not plugin_settings.status.cmp, - after = "cmp-nvim-lua", + after = plugin_settings.options.cmp.lazy_load and "cmp-nvim-lua", } use { "hrsh7th/cmp-buffer", disable = not plugin_settings.status.cmp, - after = "cmp-nvim-lsp", + after = plugin_settings.options.cmp.lazy_load and "cmp-nvim-lsp", } use { "hrsh7th/cmp-path", disable = not plugin_settings.status.cmp, - after = "cmp-buffer", + after = plugin_settings.options.cmp.lazy_load and "cmp-buffer", } -- misc plugins use { "windwp/nvim-autopairs", disable = not plugin_settings.status.autopairs, - after = plugin_settings.options.autopairs.loadAfter, + after = plugin_settings.options.cmp.lazy_load and plugin_settings.options.autopairs.loadAfter, config = override_req("nvim_autopairs", "(plugins.configs.others).autopairs()"), } From e6223cc587d68d7184a585290b0dab2d62ef1f3d Mon Sep 17 00:00:00 2001 From: Danilo Horta Date: Tue, 11 Jan 2022 22:59:35 +0000 Subject: [PATCH 0906/1541] Enable FastWrap capabilities: https://github.com/windwp/nvim-autopairs#fastwrap --- lua/plugins/configs/others.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 8784c29..279d6d4 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -7,7 +7,7 @@ M.autopairs = function() local present2, cmp_autopairs = pcall(require, "nvim-autopairs.completion.cmp") if present1 and present2 then - autopairs.setup() + autopairs.setup({fast_wrap = {}}) local cmp = require "cmp" cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) From 8f7b19f23b17dbd9dd814299d6b52039914d21b9 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 20 Jan 2022 11:37:32 +0530 Subject: [PATCH 0907/1541] lazy load telescope module --- lua/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 9a6793c..5483c24 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -215,6 +215,7 @@ return packer.startup(function() use { "nvim-telescope/telescope.nvim", + module = "telescope", cmd = "Telescope", config = override_req("telescope", "plugins.configs.telescope"), setup = function() From cf7f8a557a8d158f2aa6b51108907ddfcc172b2a Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Thu, 20 Jan 2022 19:12:09 -0500 Subject: [PATCH 0908/1541] added helper function to support partial plugin config overrides via tables in chadrc --- lua/core/utils.lua | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 15c4c66..51272c0 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -243,21 +243,36 @@ end -- name = name inside `default_config` / `chadrc` -- default_req = run this if 'name' does not exist in `default_config` / `chadrc` -- if override or default_req start with `(`, then strip that and assume override calls a function, not a whole file +-- if override is a table, mark set the override flag for the default config to true +-- override flag being true tells the plugin to call tbl_override_req as part of configuration M.override_req = function(name, default_req) local override = require("core.utils").load_config().plugins.default_plugin_config_replace[name] local result = default_req - - if override ~= nil then + if type(override) == "string" then result = override end if string.match(result, "^%(") then result = result:sub(2) result = result:gsub("%)%.", "').", 1) + if type(override) == "table" then + result = result:gsub("%(%)", "(true)", 1) + end return "require('" .. result end return "require('" .. result .. "')" end +-- Override parts of default config of a plugin based on the table provided in the chadrc + +-- FUNCTION: tbl_override_req, use `chadrc` plugin config override to modify default config if present +-- name = name inside `default_config` / `chadrc` +-- default_table = the default configuration table of the plugin +-- returns the modified configuration table +M.tbl_override_req = function(name, default_table) + local override = require("core.utils").load_config().plugins.default_plugin_config_replace[name] + return vim.tbl_deep_extend("force", default_table, override) +end + return M From c3beea11ee0809ad0e50760d7608d3e405eb20f2 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Thu, 20 Jan 2022 19:26:05 -0500 Subject: [PATCH 0909/1541] Added support for modifying specific key values in default configs via chadrc to all plugin configurations with setup table(s) --- lua/plugins/configs/bufferline.lua | 13 ++++- lua/plugins/configs/cmp.lua | 13 ++++- lua/plugins/configs/icons.lua | 16 +++++- lua/plugins/configs/nvimtree.lua | 11 +++- lua/plugins/configs/others.lua | 84 +++++++++++++++++++++--------- lua/plugins/configs/telescope.lua | 26 ++++++--- lua/plugins/configs/treesitter.lua | 13 ++++- 7 files changed, 137 insertions(+), 39 deletions(-) diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index a396ed4..5801823 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -5,7 +5,9 @@ if not present then return end -bufferline.setup { +local M = {} + +local chad_defaults = { options = { offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, buffer_close_icon = "", @@ -135,3 +137,12 @@ bufferline.setup { }, }, } + +M.setup = function(override_flag) + if override_flag then + chad_defaults = require("core.utils").tbl_override_req("bufferline", chad_defaults) + end + bufferline.setup(chad_defaults) +end + +return M diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 80e2df4..a7948de 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -4,9 +4,11 @@ if not present then return end +local M = {} + vim.opt.completeopt = "menuone,noselect" -cmp.setup { +local chad_defaults = { snippet = { expand = function(args) require("luasnip").lsp_expand(args.body) @@ -64,3 +66,12 @@ cmp.setup { { name = "path" }, }, } + +M.setup = function (override_flag) + if override_flag then + chad_defaults = require("core.utils").tbl_override_req("nvim_cmp", chad_defaults) + end + cmp.setup(chad_defaults) +end + +return M diff --git a/lua/plugins/configs/icons.lua b/lua/plugins/configs/icons.lua index 7f66d3c..255ad5a 100644 --- a/lua/plugins/configs/icons.lua +++ b/lua/plugins/configs/icons.lua @@ -3,9 +3,11 @@ if not present then return end +local M = {} + local colors = require("colors").get() -icons.setup { +local chad_defaults = { override = { c = { icon = "", @@ -142,5 +144,15 @@ icons.setup { color = colors.sun, name = "zip", }, - }, + } } + + +M.setup = function(override_flag) + if override_flag then + chad_defaults = require("core.utils").tbl_override_req("nvim_web_devicons", chad_defaults) + end + icons.setup(chad_defaults) +end + +return M diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 131f4ad..5399903 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -51,7 +51,7 @@ g.nvim_tree_icons = { }, } -nvimtree.setup { +local chad_defaults = { filters = { dotfiles = false, }, @@ -71,3 +71,12 @@ nvimtree.setup { ignore = false, }, } + +M.setup = function (override_flag) + if override_flag then + chad_defaults = require("core.utils").tbl_override_req("nvim_tree", chad_defaults) + end + nvimtree.setup(chad_defaults) +end + +return M diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 279d6d4..24cca50 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -2,12 +2,16 @@ local M = {} local chadrc_config = require("core.utils").load_config() -M.autopairs = function() +M.autopairs = function(override_flag) local present1, autopairs = pcall(require, "nvim-autopairs") local present2, cmp_autopairs = pcall(require, "nvim-autopairs.completion.cmp") if present1 and present2 then - autopairs.setup({fast_wrap = {}}) + local chad_defaults = {fast_wrap = {}} + if override_flag then + chad_defaults = require("core.utils").tbl_override_req("nvim_autopairs", chad_defaults) + end + autopairs.setup(chad_defaults) local cmp = require "cmp" cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) @@ -21,8 +25,8 @@ M.better_escape = function() } end -M.blankline = function() - require("indent_blankline").setup { +M.blankline = function(override_flag) + local chad_defaults = { indentLine_enabled = 1, char = "▏", filetype_exclude = { @@ -40,52 +44,72 @@ M.blankline = function() show_trailing_blankline_indent = false, show_first_indent_level = false, } + if override_flag then + chad_defaults = require("core.utils").tbl_override_req("indent_blankline", chad_defaults) + end + require("indent_blankline").setup(chad_defaults) end -M.colorizer = function() +M.colorizer = function(override_flag) local present, colorizer = pcall(require, "colorizer") if present then - colorizer.setup({ "*" }, { - RGB = true, -- #RGB hex codes - RRGGBB = true, -- #RRGGBB hex codes - names = false, -- "Name" codes like Blue - RRGGBBAA = false, -- #RRGGBBAA hex codes - rgb_fn = false, -- CSS rgb() and rgba() functions - hsl_fn = false, -- CSS hsl() and hsla() functions - css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB - css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn + local chad_defaults = { + filetypes = { + "*" + }, + user_default_options = { + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + names = false, -- "Name" codes like Blue + RRGGBBAA = false, -- #RRGGBBAA hex codes + rgb_fn = false, -- CSS rgb() and rgba() functions + hsl_fn = false, -- CSS hsl() and hsla() functions + css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn - -- Available modes: foreground, background - mode = "background", -- Set the display mode. - }) + -- Available modes: foreground, background + mode = "background", -- Set the display mode. + }, + } + if override_flag then + chad_defaults = require("core.utils").tbl_override_req("nvim_colorizer", chad_defaults) + end + colorizer.setup(chad_defaults["filetypes"], chad_defaults["user_default_options"]) vim.cmd "ColorizerReloadAllBuffers" end end -M.comment = function() +M.comment = function(override_flag) local present, nvim_comment = pcall(require, "Comment") if present then - nvim_comment.setup() + local chad_defaults = {} + if override_flag then + chad_defaults = require("core.utils").tbl_override_req("nvim_comment", chad_defaults) + end + nvim_comment.setup(chad_defaults) end end -M.luasnip = function() +M.luasnip = function(override_flag) local present, luasnip = pcall(require, "luasnip") if present then - luasnip.config.set_config { + local chad_defaults = { history = true, updateevents = "TextChanged,TextChangedI", } - + if override_flag then + chad_defaults = require("core.utils").tbl_override_req("luasnip", chad_defaults) + end + luasnip.config.set_config(chad_defaults) require("luasnip/loaders/from_vscode").load { paths = chadrc_config.plugins.options.luasnip.snippet_path } require("luasnip/loaders/from_vscode").load() end end -M.signature = function() +M.signature = function(override_flag) local present, lspsignature = pcall(require, "lsp_signature") if present then - lspsignature.setup { + local chad_defaults = { bind = true, doc_lines = 0, floating_window = true, @@ -102,6 +126,10 @@ M.signature = function() zindex = 200, -- by default it will be on top of all floating windows, set to 50 send it to bottom padding = "", -- character to pad on left and right of signature can be ' ', or '|' etc } + if override_flag then + chad_defaults = require("core.utils").tbl_override_req("signature", chad_defaults) + end + lspsignature.setup(chad_defaults) end end @@ -145,10 +173,10 @@ M.lsp_handlers = function() end end -M.gitsigns = function() +M.gitsigns = function(override_flag) local present, gitsigns = pcall(require, "gitsigns") if present then - gitsigns.setup { + local chad_defaults = { signs = { add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, @@ -157,6 +185,10 @@ M.gitsigns = function() changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" }, }, } + if override_flag then + chad_defaults = require("core.utils").tbl_override_req("gitsigns", chad_defaults) + end + gitsigns.setup(chad_defaults) end end diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 35ee0c9..9b8aece 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -4,7 +4,9 @@ if not present then return end -telescope.setup { +local M = {} + +local chad_defaults = { defaults = { vimgrep_arguments = { "rg", @@ -53,10 +55,20 @@ telescope.setup { }, } -local extensions = { "themes", "terms" } - -pcall(function() - for _, ext in ipairs(extensions) do - telescope.load_extension(ext) +function M.setup(override_flag) + if override_flag then + chad_defaults = require("core.utils").tbl_override_req("telescope", chad_defaults) end -end) + + telescope.setup(chad_defaults) + + local extensions = { "themes", "terms" } + + pcall(function() + for _, ext in ipairs(extensions) do + telescope.load_extension(ext) + end + end) +end + +return M diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index 6e65340..f258bbf 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -4,7 +4,9 @@ if not present then return end -ts_config.setup { +local M = {} + +local chad_defaults = { ensure_installed = { "lua", "vim", @@ -14,3 +16,12 @@ ts_config.setup { use_languagetree = true, }, } + +M.setup = function (override_flag) + if override_flag then + chad_defaults = require("core.utils").tbl_override_req("nvim_treesitter", chad_defaults) + end + ts_config.setup(chad_defaults) +end + +return M From 82211ed829c27396e63481f8ba22736189dcf8cc Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Thu, 20 Jan 2022 19:28:01 -0500 Subject: [PATCH 0910/1541] updated init.lua requires to support new plugin default configuration format --- lua/plugins/init.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 5483c24..27faf22 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -32,7 +32,7 @@ return packer.startup(function() use { "kyazdani42/nvim-web-devicons", after = "nvim-base16.lua", - config = override_req("nvim_web_devicons", "plugins.configs.icons"), + config = override_req("nvim_web_devicons", "(plugins.configs.icons).setup()"), } use { @@ -46,7 +46,7 @@ return packer.startup(function() "akinsho/bufferline.nvim", disable = not plugin_settings.status.bufferline, after = "nvim-web-devicons", - config = override_req("bufferline", "plugins.configs.bufferline"), + config = override_req("bufferline", "(plugins.configs.bufferline).setup()"), setup = function() require("core.mappings").bufferline() end, @@ -69,7 +69,7 @@ return packer.startup(function() use { "nvim-treesitter/nvim-treesitter", event = "BufRead", - config = override_req("nvim_treesitter", "plugins.configs.treesitter"), + config = override_req("nvim_treesitter", "(plugins.configs.treesitter).setup()"), } -- git stuff @@ -133,7 +133,7 @@ return packer.startup(function() "hrsh7th/nvim-cmp", disable = not plugin_settings.status.cmp, after = plugin_settings.options.cmp.lazy_load and "friendly-snippets", - config = override_req("nvim_cmp", "plugins.configs.cmp"), + config = override_req("nvim_cmp", "(plugins.configs.cmp).setup()"), } use { @@ -207,7 +207,7 @@ return packer.startup(function() -- only set "after" if lazy load is disabled and vice versa for "cmd" after = not plugin_settings.options.nvimtree.lazy_load and "nvim-web-devicons", cmd = plugin_settings.options.nvimtree.lazy_load and { "NvimTreeToggle", "NvimTreeFocus" }, - config = override_req("nvim_tree", "plugins.configs.nvimtree"), + config = override_req("nvim_tree", "(plugins.configs.nvimtree).setup()"), setup = function() require("core.mappings").nvimtree() end, @@ -217,7 +217,7 @@ return packer.startup(function() "nvim-telescope/telescope.nvim", module = "telescope", cmd = "Telescope", - config = override_req("telescope", "plugins.configs.telescope"), + config = override_req("telescope", "(plugins.configs.telescope).setup()"), setup = function() require("core.mappings").telescope() end, From bccd8e4ab9942c57eaeee76c7e41c2b41cba17c4 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 21 Jan 2022 17:19:49 +0530 Subject: [PATCH 0911/1541] utils: Improve override functions | Fix nvimtree and statusline config | Misc * make more things configurable * use more generic variable names * handle some edgecases * cleanup * format files --- lua/core/utils.lua | 38 ++-- lua/plugins/configs/bufferline.lua | 90 ++++---- lua/plugins/configs/cmp.lua | 11 +- lua/plugins/configs/icons.lua | 70 +++---- lua/plugins/configs/nvimtree.lua | 29 +-- lua/plugins/configs/others.lua | 44 ++-- lua/plugins/configs/statusline.lua | 321 +++++++++++++++-------------- lua/plugins/configs/telescope.lua | 11 +- lua/plugins/configs/treesitter.lua | 11 +- lua/plugins/init.lua | 30 +-- 10 files changed, 338 insertions(+), 317 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 51272c0..065cfe8 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -238,30 +238,32 @@ M.fg_bg = function(group, fgcol, bgcol) end -- Override default config of a plugin based on the path provided in the chadrc - --- FUNCTION: override_req, use `chadrc` plugin config override if present --- name = name inside `default_config` / `chadrc` --- default_req = run this if 'name' does not exist in `default_config` / `chadrc` --- if override or default_req start with `(`, then strip that and assume override calls a function, not a whole file +-- Arguments: +-- 1st - name of plugin +-- 2nd - default config path +-- 3rd - optional function name which will called from default_config path +-- e.g: if given args - "telescope", "plugins.configs.telescope", "setup" +-- then return "require('plugins.configs.telescope').setup()" +-- if 3rd arg not given, then return "require('plugins.configs.telescope')" -- if override is a table, mark set the override flag for the default config to true -- override flag being true tells the plugin to call tbl_override_req as part of configuration -M.override_req = function(name, default_req) - local override = require("core.utils").load_config().plugins.default_plugin_config_replace[name] - local result = default_req - if type(override) == "string" then +M.override_req = function(name, default_config, config_function) + local override, apply_table_override = + require("core.utils").load_config().plugins.default_plugin_config_replace[name], "false" + local result = default_config + if type(override) == "string" and override ~= "" then result = override + elseif type(override) == "table" then + apply_table_override = "true" end - if string.match(result, "^%(") then - result = result:sub(2) - result = result:gsub("%)%.", "').", 1) - if type(override) == "table" then - result = result:gsub("%(%)", "(true)", 1) - end - return "require('" .. result + result = "('" .. result .. "')" + if type(config_function) == "string" and config_function ~= "" then + -- add the . to call the functions and concatenate true or false as argument + result = result .. "." .. config_function .. "(" .. apply_table_override .. ")" end - return "require('" .. result .. "')" + return "require" .. result end -- Override parts of default config of a plugin based on the table provided in the chadrc @@ -271,7 +273,7 @@ end -- default_table = the default configuration table of the plugin -- returns the modified configuration table M.tbl_override_req = function(name, default_table) - local override = require("core.utils").load_config().plugins.default_plugin_config_replace[name] + local override = require("core.utils").load_config().plugins.default_plugin_config_replace[name] or {} return vim.tbl_deep_extend("force", default_table, override) end diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 5801823..98557fd 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -1,13 +1,12 @@ -local colors = require("colors").get() - local present, bufferline = pcall(require, "bufferline") if not present then return end -local M = {} - -local chad_defaults = { +local default = { + colors = require("colors").get(), +} +default = { options = { offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, buffer_close_icon = "", @@ -47,102 +46,103 @@ local chad_defaults = { highlights = { background = { - guifg = colors.grey_fg, - guibg = colors.black2, + guifg = default.colors.grey_fg, + guibg = default.colors.black2, }, -- buffers buffer_selected = { - guifg = colors.white, - guibg = colors.black, + guifg = default.colors.white, + guibg = default.colors.black, gui = "bold", }, buffer_visible = { - guifg = colors.light_grey, - guibg = colors.black2, + guifg = default.colors.light_grey, + guibg = default.colors.black2, }, -- for diagnostics = "nvim_lsp" error = { - guifg = colors.light_grey, - guibg = colors.black2, + guifg = default.colors.light_grey, + guibg = default.colors.black2, }, error_diagnostic = { - guifg = colors.light_grey, - guibg = colors.black2, + guifg = default.colors.light_grey, + guibg = default.colors.black2, }, -- close buttons close_button = { - guifg = colors.light_grey, - guibg = colors.black2, + guifg = default.colors.light_grey, + guibg = default.colors.black2, }, close_button_visible = { - guifg = colors.light_grey, - guibg = colors.black2, + guifg = default.colors.light_grey, + guibg = default.colors.black2, }, close_button_selected = { - guifg = colors.red, - guibg = colors.black, + guifg = default.colors.red, + guibg = default.colors.black, }, fill = { - guifg = colors.grey_fg, - guibg = colors.black2, + guifg = default.colors.grey_fg, + guibg = default.colors.black2, }, indicator_selected = { - guifg = colors.black, - guibg = colors.black, + guifg = default.colors.black, + guibg = default.colors.black, }, -- modified modified = { - guifg = colors.red, - guibg = colors.black2, + guifg = default.colors.red, + guibg = default.colors.black2, }, modified_visible = { - guifg = colors.red, - guibg = colors.black2, + guifg = default.colors.red, + guibg = default.colors.black2, }, modified_selected = { - guifg = colors.green, - guibg = colors.black, + guifg = default.colors.green, + guibg = default.colors.black, }, -- separators separator = { - guifg = colors.black2, - guibg = colors.black2, + guifg = default.colors.black2, + guibg = default.colors.black2, }, separator_visible = { - guifg = colors.black2, - guibg = colors.black2, + guifg = default.colors.black2, + guibg = default.colors.black2, }, separator_selected = { - guifg = colors.black2, - guibg = colors.black2, + guifg = default.colors.black2, + guibg = default.colors.black2, }, -- tabs tab = { - guifg = colors.light_grey, - guibg = colors.one_bg3, + guifg = default.colors.light_grey, + guibg = default.colors.one_bg3, }, tab_selected = { - guifg = colors.black2, - guibg = colors.nord_blue, + guifg = default.colors.black2, + guibg = default.colors.nord_blue, }, tab_close = { - guifg = colors.red, - guibg = colors.black, + guifg = default.colors.red, + guibg = default.colors.black, }, }, } +local M = {} M.setup = function(override_flag) if override_flag then - chad_defaults = require("core.utils").tbl_override_req("bufferline", chad_defaults) + default = require("core.utils").tbl_override_req("bufferline", default) end - bufferline.setup(chad_defaults) + bufferline.setup(default) end return M diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index a7948de..94944b7 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -4,11 +4,9 @@ if not present then return end -local M = {} - vim.opt.completeopt = "menuone,noselect" -local chad_defaults = { +local default = { snippet = { expand = function(args) require("luasnip").lsp_expand(args.body) @@ -67,11 +65,12 @@ local chad_defaults = { }, } -M.setup = function (override_flag) +local M = {} +M.setup = function(override_flag) if override_flag then - chad_defaults = require("core.utils").tbl_override_req("nvim_cmp", chad_defaults) + default = require("core.utils").tbl_override_req("nvim_cmp", default) end - cmp.setup(chad_defaults) + cmp.setup(default) end return M diff --git a/lua/plugins/configs/icons.lua b/lua/plugins/configs/icons.lua index 255ad5a..4f23dd9 100644 --- a/lua/plugins/configs/icons.lua +++ b/lua/plugins/configs/icons.lua @@ -3,156 +3,156 @@ if not present then return end -local M = {} +local default = { + colors = require("colors").get(), +} -local colors = require("colors").get() - -local chad_defaults = { +default = { override = { c = { icon = "", - color = colors.blue, + color = default.colors.blue, name = "c", }, css = { icon = "", - color = colors.blue, + color = default.colors.blue, name = "css", }, deb = { icon = "", - color = colors.cyan, + color = default.colors.cyan, name = "deb", }, Dockerfile = { icon = "", - color = colors.cyan, + color = default.colors.cyan, name = "Dockerfile", }, html = { icon = "", - color = colors.baby_pink, + color = default.colors.baby_pink, name = "html", }, jpeg = { icon = "", - color = colors.dark_purple, + color = default.colors.dark_purple, name = "jpeg", }, jpg = { icon = "", - color = colors.dark_purple, + color = default.colors.dark_purple, name = "jpg", }, js = { icon = "", - color = colors.sun, + color = default.colors.sun, name = "js", }, kt = { icon = "󱈙", - color = colors.orange, + color = default.colors.orange, name = "kt", }, lock = { icon = "", - color = colors.red, + color = default.colors.red, name = "lock", }, lua = { icon = "", - color = colors.blue, + color = default.colors.blue, name = "lua", }, mp3 = { icon = "", - color = colors.white, + color = default.colors.white, name = "mp3", }, mp4 = { icon = "", - color = colors.white, + color = default.colors.white, name = "mp4", }, out = { icon = "", - color = colors.white, + color = default.colors.white, name = "out", }, png = { icon = "", - color = colors.dark_purple, + color = default.colors.dark_purple, name = "png", }, py = { icon = "", - color = colors.cyan, + color = default.colors.cyan, name = "py", }, ["robots.txt"] = { icon = "ﮧ", - color = colors.red, + color = default.colors.red, name = "robots", }, toml = { icon = "", - color = colors.blue, + color = default.colors.blue, name = "toml", }, ts = { icon = "ﯤ", - color = colors.teal, + color = default.colors.teal, name = "ts", }, ttf = { icon = "", - color = colors.white, + color = default.colors.white, name = "TrueTypeFont", }, rb = { icon = "", - color = colors.pink, + color = default.colors.pink, name = "rb", }, rpm = { icon = "", - color = colors.orange, + color = default.colors.orange, name = "rpm", }, vue = { icon = "﵂", - color = colors.vibrant_green, + color = default.colors.vibrant_green, name = "vue", }, woff = { icon = "", - color = colors.white, + color = default.colors.white, name = "WebOpenFontFormat", }, woff2 = { icon = "", - color = colors.white, + color = default.colors.white, name = "WebOpenFontFormat2", }, xz = { icon = "", - color = colors.sun, + color = default.colors.sun, name = "xz", }, zip = { icon = "", - color = colors.sun, + color = default.colors.sun, name = "zip", }, - } + }, } - +local M = {} M.setup = function(override_flag) if override_flag then - chad_defaults = require("core.utils").tbl_override_req("nvim_web_devicons", chad_defaults) + default = require("core.utils").tbl_override_req("nvim_web_devicons", default) end - icons.setup(chad_defaults) + icons.setup(default) end return M diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 5399903..5f18230 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -1,18 +1,20 @@ local present, nvimtree = pcall(require, "nvim-tree") - -local conf = require("core.utils").load_config().plugins.options.nvimtree - -local git_status = conf.enable_git -local ui = conf.ui - if not present then return end local g = vim.g +local default = { + conf = require("core.utils").load_config().plugins.options.nvimtree, +} + +default = { + git_status = default.conf.enable_git, + ui = default.conf.ui, +} g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names -g.nvim_tree_git_hl = git_status +g.nvim_tree_git_hl = default.git_status g.nvim_tree_highlight_opened_files = 0 g.nvim_tree_indent_markers = 1 g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened @@ -26,7 +28,7 @@ g.nvim_tree_window_picker_exclude = { g.nvim_tree_show_icons = { folders = 1, files = 1, - git = git_status, + git = default.git_status, } g.nvim_tree_icons = { @@ -51,7 +53,7 @@ g.nvim_tree_icons = { }, } -local chad_defaults = { +default = { filters = { dotfiles = false, }, @@ -66,17 +68,18 @@ local chad_defaults = { enable = true, update_cwd = false, }, - view = ui, + view = default.ui, git = { ignore = false, }, } -M.setup = function (override_flag) +local M = {} +M.setup = function(override_flag) if override_flag then - chad_defaults = require("core.utils").tbl_override_req("nvim_tree", chad_defaults) + default = require("core.utils").tbl_override_req("nvim_tree", default) end - nvimtree.setup(chad_defaults) + nvimtree.setup(default) end return M diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 24cca50..9ca7c6f 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -7,11 +7,11 @@ M.autopairs = function(override_flag) local present2, cmp_autopairs = pcall(require, "nvim-autopairs.completion.cmp") if present1 and present2 then - local chad_defaults = {fast_wrap = {}} + local default = { fast_wrap = {} } if override_flag then - chad_defaults = require("core.utils").tbl_override_req("nvim_autopairs", chad_defaults) + default = require("core.utils").tbl_override_req("nvim_autopairs", default) end - autopairs.setup(chad_defaults) + autopairs.setup(default) local cmp = require "cmp" cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) @@ -26,7 +26,7 @@ M.better_escape = function() end M.blankline = function(override_flag) - local chad_defaults = { + local default = { indentLine_enabled = 1, char = "▏", filetype_exclude = { @@ -45,17 +45,17 @@ M.blankline = function(override_flag) show_first_indent_level = false, } if override_flag then - chad_defaults = require("core.utils").tbl_override_req("indent_blankline", chad_defaults) + default = require("core.utils").tbl_override_req("indent_blankline", default) end - require("indent_blankline").setup(chad_defaults) + require("indent_blankline").setup(default) end M.colorizer = function(override_flag) local present, colorizer = pcall(require, "colorizer") if present then - local chad_defaults = { + local default = { filetypes = { - "*" + "*", }, user_default_options = { RGB = true, -- #RGB hex codes @@ -72,9 +72,9 @@ M.colorizer = function(override_flag) }, } if override_flag then - chad_defaults = require("core.utils").tbl_override_req("nvim_colorizer", chad_defaults) + default = require("core.utils").tbl_override_req("nvim_colorizer", default) end - colorizer.setup(chad_defaults["filetypes"], chad_defaults["user_default_options"]) + colorizer.setup(default["filetypes"], default["user_default_options"]) vim.cmd "ColorizerReloadAllBuffers" end end @@ -82,25 +82,25 @@ end M.comment = function(override_flag) local present, nvim_comment = pcall(require, "Comment") if present then - local chad_defaults = {} + local default = {} if override_flag then - chad_defaults = require("core.utils").tbl_override_req("nvim_comment", chad_defaults) + default = require("core.utils").tbl_override_req("nvim_comment", default) end - nvim_comment.setup(chad_defaults) + nvim_comment.setup(default) end end M.luasnip = function(override_flag) local present, luasnip = pcall(require, "luasnip") if present then - local chad_defaults = { + local default = { history = true, updateevents = "TextChanged,TextChangedI", } if override_flag then - chad_defaults = require("core.utils").tbl_override_req("luasnip", chad_defaults) + default = require("core.utils").tbl_override_req("luasnip", default) end - luasnip.config.set_config(chad_defaults) + luasnip.config.set_config(default) require("luasnip/loaders/from_vscode").load { paths = chadrc_config.plugins.options.luasnip.snippet_path } require("luasnip/loaders/from_vscode").load() end @@ -109,7 +109,7 @@ end M.signature = function(override_flag) local present, lspsignature = pcall(require, "lsp_signature") if present then - local chad_defaults = { + local default = { bind = true, doc_lines = 0, floating_window = true, @@ -127,9 +127,9 @@ M.signature = function(override_flag) padding = "", -- character to pad on left and right of signature can be ' ', or '|' etc } if override_flag then - chad_defaults = require("core.utils").tbl_override_req("signature", chad_defaults) + default = require("core.utils").tbl_override_req("signature", default) end - lspsignature.setup(chad_defaults) + lspsignature.setup(default) end end @@ -176,7 +176,7 @@ end M.gitsigns = function(override_flag) local present, gitsigns = pcall(require, "gitsigns") if present then - local chad_defaults = { + local default = { signs = { add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, @@ -186,9 +186,9 @@ M.gitsigns = function(override_flag) }, } if override_flag then - chad_defaults = require("core.utils").tbl_override_req("gitsigns", chad_defaults) + default = require("core.utils").tbl_override_req("gitsigns", default) end - gitsigns.setup(chad_defaults) + gitsigns.setup(default) end end diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 6bce988..9eb99e9 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -1,8 +1,16 @@ - local colors = require("colors").get() -local lsp = require "feline.providers.lsp" -local lsp_severity = vim.diagnostic.severity +local present, feline = pcall(require, "feline") +if not present then + return +end -local icon_styles = { +local default = { + colors = require("colors").get(), + lsp = require "feline.providers.lsp", + lsp_severity = vim.diagnostic.severity, + config = require("core.utils").load_config().plugins.options.statusline, +} + +default.icon_styles = { default = { left = "", right = " ", @@ -43,35 +51,35 @@ local icon_styles = { }, } -local config = require("core.utils").load_config().plugins.options.statusline - -- statusline style -local user_statusline_style = config.style -local statusline_style = icon_styles[user_statusline_style] +default.statusline_style = default.icon_styles[default.config.style] -- show short statusline on small screens -local shortline = config.shortline == false and true +default.shortline = default.config.shortline == false and true -- Initialize the components table -local components = { +default.components = { active = {}, } -local main_icon = { - provider = statusline_style.main_icon, +default.main_icon = { + provider = default.statusline_style.main_icon, hl = { - fg = colors.statusline_bg, - bg = colors.nord_blue, + fg = default.colors.statusline_bg, + bg = default.colors.nord_blue, }, - right_sep = { str = statusline_style.right, hl = { - fg = colors.nord_blue, - bg = colors.lightbg, - } }, + right_sep = { + str = default.statusline_style.right, + hl = { + fg = default.colors.nord_blue, + bg = default.colors.lightbg, + }, + }, } -local file_name = { +default.file_name = { provider = function() local filename = vim.fn.expand "%:t" local extension = vim.fn.expand "%:e" @@ -82,46 +90,49 @@ local file_name = { end return " " .. icon .. " " .. filename .. " " end, - enabled = shortline or function(winid) + enabled = default.shortline or function(winid) return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 end, hl = { - fg = colors.white, - bg = colors.lightbg, + fg = default.colors.white, + bg = default.colors.lightbg, }, - right_sep = { str = statusline_style.right, hl = { fg = colors.lightbg, bg = colors.lightbg2 } }, + right_sep = { + str = default.statusline_style.right, + hl = { fg = default.colors.lightbg, bg = default.colors.lightbg2 }, + }, } -local dir_name = { +default.dir_name = { provider = function() local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") return "  " .. dir_name .. " " end, - enabled = shortline or function(winid) + enabled = default.shortline or function(winid) return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 80 end, hl = { - fg = colors.grey_fg2, - bg = colors.lightbg2, + fg = default.colors.grey_fg2, + bg = default.colors.lightbg2, }, right_sep = { - str = statusline_style.right, + str = default.statusline_style.right, hi = { - fg = colors.lightbg2, - bg = colors.statusline_bg, + fg = default.colors.lightbg2, + bg = default.colors.statusline_bg, }, }, } -local diff = { +default.diff = { add = { provider = "git_diff_added", hl = { - fg = colors.grey_fg2, - bg = colors.statusline_bg, + fg = default.colors.grey_fg2, + bg = default.colors.statusline_bg, }, icon = " ", }, @@ -129,8 +140,8 @@ local diff = { change = { provider = "git_diff_changed", hl = { - fg = colors.grey_fg2, - bg = colors.statusline_bg, + fg = default.colors.grey_fg2, + bg = default.colors.statusline_bg, }, icon = "  ", }, @@ -138,65 +149,65 @@ local diff = { remove = { provider = "git_diff_removed", hl = { - fg = colors.grey_fg2, - bg = colors.statusline_bg, + fg = default.colors.grey_fg2, + bg = default.colors.statusline_bg, }, icon = "  ", }, } -local git_branch = { +default.git_branch = { provider = "git_branch", - enabled = shortline or function(winid) + enabled = default.shortline or function(winid) return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 end, hl = { - fg = colors.grey_fg2, - bg = colors.statusline_bg, + fg = default.colors.grey_fg2, + bg = default.colors.statusline_bg, }, icon = "  ", } -local diagnostic = { +default.diagnostic = { errors = { provider = "diagnostic_errors", enabled = function() - return lsp.diagnostics_exist(lsp_severity.ERROR) + return default.lsp.diagnostics_exist(default.lsp_severity.ERROR) end, - hl = { fg = colors.red }, + hl = { fg = default.colors.red }, icon = "  ", }, warning = { provider = "diagnostic_warnings", enabled = function() - return lsp.diagnostics_exist(lsp_severity.WARN) + return default.lsp.diagnostics_exist(default.lsp_severity.WARN) end, - hl = { fg = colors.yellow }, + hl = { fg = default.colors.yellow }, icon = "  ", }, hint = { provider = "diagnostic_hints", enabled = function() - return lsp.diagnostics_exist(lsp_severity.HINT) + return default.lsp.diagnostics_exist(default.lsp_severity.HINT) end, - hl = { fg = colors.grey_fg2 }, + hl = { fg = default.colors.grey_fg2 }, icon = "  ", }, info = { provider = "diagnostic_info", enabled = function() - return lsp.diagnostics_exist(lsp_severity.INFO) + return default.lsp.diagnostics_exist(default.lsp_severity.INFO) end, - hl = { fg = colors.green }, + hl = { fg = default.colors.green }, icon = "  ", }, } -local lsp_progress = { +default.lsp_progress = { provider = function() local Lsp = vim.lsp.util.get_progress_messages()[1] @@ -228,13 +239,13 @@ local lsp_progress = { return "" end, - enabled = shortline or function(winid) + enabled = default.shortline or function(winid) return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 80 end, - hl = { fg = colors.green }, + hl = { fg = default.colors.green }, } -local lsp_icon = { +default.lsp_icon = { provider = function() if next(vim.lsp.buf_get_clients()) ~= nil then return " LSP" @@ -242,112 +253,112 @@ local lsp_icon = { return "" end end, - enabled = shortline or function(winid) + enabled = default.shortline or function(winid) return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 end, - hl = { fg = colors.grey_fg2, bg = colors.statusline_bg }, + hl = { fg = default.colors.grey_fg2, bg = default.colors.statusline_bg }, } -local mode_colors = { - ["n"] = { "NORMAL", colors.red }, - ["no"] = { "N-PENDING", colors.red }, - ["i"] = { "INSERT", colors.dark_purple }, - ["ic"] = { "INSERT", colors.dark_purple }, - ["t"] = { "TERMINAL", colors.green }, - ["v"] = { "VISUAL", colors.cyan }, - ["V"] = { "V-LINE", colors.cyan }, - [""] = { "V-BLOCK", colors.cyan }, - ["R"] = { "REPLACE", colors.orange }, - ["Rv"] = { "V-REPLACE", colors.orange }, - ["s"] = { "SELECT", colors.nord_blue }, - ["S"] = { "S-LINE", colors.nord_blue }, - [""] = { "S-BLOCK", colors.nord_blue }, - ["c"] = { "COMMAND", colors.pink }, - ["cv"] = { "COMMAND", colors.pink }, - ["ce"] = { "COMMAND", colors.pink }, - ["r"] = { "PROMPT", colors.teal }, - ["rm"] = { "MORE", colors.teal }, - ["r?"] = { "CONFIRM", colors.teal }, - ["!"] = { "SHELL", colors.green }, +default.mode_colors = { + ["n"] = { "NORMAL", default.colors.red }, + ["no"] = { "N-PENDING", default.colors.red }, + ["i"] = { "INSERT", default.colors.dark_purple }, + ["ic"] = { "INSERT", default.colors.dark_purple }, + ["t"] = { "TERMINAL", default.colors.green }, + ["v"] = { "VISUAL", default.colors.cyan }, + ["V"] = { "V-LINE", default.colors.cyan }, + [""] = { "V-BLOCK", default.colors.cyan }, + ["R"] = { "REPLACE", default.colors.orange }, + ["Rv"] = { "V-REPLACE", default.colors.orange }, + ["s"] = { "SELECT", default.colors.nord_blue }, + ["S"] = { "S-LINE", default.colors.nord_blue }, + [""] = { "S-BLOCK", default.colors.nord_blue }, + ["c"] = { "COMMAND", default.colors.pink }, + ["cv"] = { "COMMAND", default.colors.pink }, + ["ce"] = { "COMMAND", default.colors.pink }, + ["r"] = { "PROMPT", default.colors.teal }, + ["rm"] = { "MORE", default.colors.teal }, + ["r?"] = { "CONFIRM", default.colors.teal }, + ["!"] = { "SHELL", default.colors.green }, } -local chad_mode_hl = function() +default.chad_mode_hl = function() return { - fg = mode_colors[vim.fn.mode()][2], - bg = colors.one_bg, + fg = default.mode_colors[vim.fn.mode()][2], + bg = default.colors.one_bg, } end -local empty_space = { - provider = " " .. statusline_style.left, +default.empty_space = { + provider = " " .. default.statusline_style.left, hl = { - fg = colors.one_bg2, - bg = colors.statusline_bg, + fg = default.colors.one_bg2, + bg = default.colors.statusline_bg, }, } -- this matches the vi mode color -local empty_spaceColored = { - provider = statusline_style.left, +default.empty_spaceColored = { + provider = default.statusline_style.left, hl = function() return { - fg = mode_colors[vim.fn.mode()][2], - bg = colors.one_bg2, + fg = default.mode_colors[vim.fn.mode()][2], + bg = default.colors.one_bg2, } end, } -local mode_icon = { - provider = statusline_style.vi_mode_icon, +default.mode_icon = { + provider = default.statusline_style.vi_mode_icon, hl = function() return { - fg = colors.statusline_bg, - bg = mode_colors[vim.fn.mode()][2], + fg = default.colors.statusline_bg, + bg = default.mode_colors[vim.fn.mode()][2], } end, } -local empty_space2 = { +default.empty_space2 = { provider = function() - return " " .. mode_colors[vim.fn.mode()][1] .. " " + return " " .. default.mode_colors[vim.fn.mode()][1] .. " " end, - hl = chad_mode_hl, + hl = default.chad_mode_hl, } -local separator_right = { - provider = statusline_style.left, - enabled = shortline or function(winid) +default.separator_right = { + provider = default.statusline_style.left, + enabled = default.shortline or function(winid) return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 end, hl = { - fg = colors.grey, - bg = colors.one_bg, + fg = default.colors.grey, + bg = default.colors.one_bg, }, } -local separator_right2 = { - provider = statusline_style.left, - enabled = shortline or function(winid) +default.separator_right2 = { + provider = default.statusline_style.left, + enabled = default.shortline or function(winid) return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 end, hl = { - fg = colors.green, - bg = colors.grey, + fg = default.colors.green, + bg = default.colors.grey, }, } -local position_icon = { - provider = statusline_style.position_icon, - enabled = shortline or function(winid) +default.position_icon = { + provider = default.statusline_style.position_icon, + enabled = default.shortline or function(winid) return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 end, hl = { - fg = colors.black, - bg = colors.green, + fg = default.colors.black, + bg = default.colors.green, }, } -local current_line = { +default.current_line = { provider = function() local current_line = vim.fn.line "." local total_line = vim.fn.line "$" @@ -361,13 +372,13 @@ local current_line = { return " " .. result .. "%% " end, - enabled = shortline or function(winid) + enabled = default.shortline or function(winid) return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 end, hl = { - fg = colors.green, - bg = colors.one_bg, + fg = default.colors.green, + bg = default.colors.one_bg, }, } @@ -375,45 +386,53 @@ local function add_table(a, b) table.insert(a, b) end --- components are divided in 3 sections -local left = {} -local middle = {} -local right = {} +local M = {} +M.setup = function(override_flag) + if override_flag then + default = require("core.utils").tbl_override_req("feline", default) + end + -- components are divided in 3 sections + default.left = {} + default.middle = {} + default.right = {} --- left -add_table(left, main_icon) -add_table(left, file_name) -add_table(left, dir_name) -add_table(left, diff.add) -add_table(left, diff.change) -add_table(left, diff.remove) -add_table(left, diagnostic.error) -add_table(left, diagnostic.warning) -add_table(left, diagnostic.hint) -add_table(left, diagnostic.info) + -- left + add_table(default.left, default.main_icon) + add_table(default.left, default.file_name) + add_table(default.left, default.dir_name) + add_table(default.left, default.diff.add) + add_table(default.left, default.diff.change) + add_table(default.left, default.diff.remove) + add_table(default.left, default.diagnostic.error) + add_table(default.left, default.diagnostic.warning) + add_table(default.left, default.diagnostic.hint) + add_table(default.left, default.diagnostic.info) -add_table(middle, lsp_progress) + add_table(default.middle, default.lsp_progress) --- right -add_table(right, lsp_icon) -add_table(right, git_branch) -add_table(right, empty_space) -add_table(right, empty_spaceColored) -add_table(right, mode_icon) -add_table(right, empty_space2) -add_table(right, separator_right) -add_table(right, separator_right2) -add_table(right, position_icon) -add_table(right, current_line) + -- right + add_table(default.right, default.lsp_icon) + add_table(default.right, default.git_branch) + add_table(default.right, default.empty_space) + add_table(default.right, default.empty_spaceColored) + add_table(default.right, default.mode_icon) + add_table(default.right, default.empty_space2) + add_table(default.right, default.separator_right) + add_table(default.right, default.separator_right2) + add_table(default.right, default.position_icon) + add_table(default.right, default.current_line) -components.active[1] = left -components.active[2] = middle -components.active[3] = right + default.components.active[1] = default.left + default.components.active[2] = default.middle + default.components.active[3] = default.right -require("feline").setup { - theme = { - bg = colors.statusline_bg, - fg = colors.fg, - }, - components = components, -} + feline.setup { + theme = { + bg = default.colors.statusline_bg, + fg = default.colors.fg, + }, + components = default.components, + } +end + +return M diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 9b8aece..7a5af67 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -4,9 +4,7 @@ if not present then return end -local M = {} - -local chad_defaults = { +local default = { defaults = { vimgrep_arguments = { "rg", @@ -55,12 +53,13 @@ local chad_defaults = { }, } -function M.setup(override_flag) +local M = {} +M.setup = function(override_flag) if override_flag then - chad_defaults = require("core.utils").tbl_override_req("telescope", chad_defaults) + default = require("core.utils").tbl_override_req("telescope", default) end - telescope.setup(chad_defaults) + telescope.setup(default) local extensions = { "themes", "terms" } diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index f258bbf..777b907 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -4,9 +4,7 @@ if not present then return end -local M = {} - -local chad_defaults = { +local default = { ensure_installed = { "lua", "vim", @@ -17,11 +15,12 @@ local chad_defaults = { }, } -M.setup = function (override_flag) +local M = {} +M.setup = function(override_flag) if override_flag then - chad_defaults = require("core.utils").tbl_override_req("nvim_treesitter", chad_defaults) + default = require("core.utils").tbl_override_req("nvim_treesitter", default) end - ts_config.setup(chad_defaults) + ts_config.setup(default) end return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 27faf22..79063f2 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -32,21 +32,21 @@ return packer.startup(function() use { "kyazdani42/nvim-web-devicons", after = "nvim-base16.lua", - config = override_req("nvim_web_devicons", "(plugins.configs.icons).setup()"), + config = override_req("nvim_web_devicons", "plugins.configs.icons", "setup"), } use { "feline-nvim/feline.nvim", disable = not plugin_settings.status.feline, after = "nvim-web-devicons", - config = override_req("feline", "plugins.configs.statusline"), + config = override_req("feline", "plugins.configs.statusline", "setup"), } use { "akinsho/bufferline.nvim", disable = not plugin_settings.status.bufferline, after = "nvim-web-devicons", - config = override_req("bufferline", "(plugins.configs.bufferline).setup()"), + config = override_req("bufferline", "plugins.configs.bufferline", "setup"), setup = function() require("core.mappings").bufferline() end, @@ -56,20 +56,20 @@ return packer.startup(function() "lukas-reineke/indent-blankline.nvim", disable = not plugin_settings.status.blankline, event = "BufRead", - config = override_req("indent_blankline", "(plugins.configs.others).blankline()"), + config = override_req("indent_blankline", "plugins.configs.others", "blankline"), } use { "norcalli/nvim-colorizer.lua", disable = not plugin_settings.status.colorizer, event = "BufRead", - config = override_req("nvim_colorizer", "(plugins.configs.others).colorizer()"), + config = override_req("nvim_colorizer", "plugins.configs.others", "colorizer"), } use { "nvim-treesitter/nvim-treesitter", event = "BufRead", - config = override_req("nvim_treesitter", "(plugins.configs.treesitter).setup()"), + config = override_req("nvim_treesitter", "plugins.configs.treesitter", "setup"), } -- git stuff @@ -77,7 +77,7 @@ return packer.startup(function() "lewis6991/gitsigns.nvim", disable = not plugin_settings.status.gitsigns, opt = true, - config = override_req("gitsigns", "(plugins.configs.others).gitsigns()"), + config = override_req("gitsigns", "plugins.configs.others", "gitsigns"), setup = function() require("core.utils").packer_lazy_load "gitsigns.nvim" end, @@ -102,7 +102,7 @@ return packer.startup(function() "ray-x/lsp_signature.nvim", disable = not plugin_settings.status.lspsignature, after = "nvim-lspconfig", - config = override_req("signature", "(plugins.configs.others).signature()"), + config = override_req("signature", "plugins.configs.others", "signature"), } use { @@ -118,7 +118,7 @@ return packer.startup(function() "max397574/better-escape.nvim", disable = not plugin_settings.status.better_escape, event = "InsertEnter", - config = override_req("better_escape", "(plugins.configs.others).better_escape()"), + config = override_req("better_escape", "plugins.configs.others", "better_escape"), } -- load luasnips + cmp related in insert mode only @@ -133,7 +133,7 @@ return packer.startup(function() "hrsh7th/nvim-cmp", disable = not plugin_settings.status.cmp, after = plugin_settings.options.cmp.lazy_load and "friendly-snippets", - config = override_req("nvim_cmp", "(plugins.configs.cmp).setup()"), + config = override_req("nvim_cmp", "plugins.configs.cmp", "setup"), } use { @@ -141,7 +141,7 @@ return packer.startup(function() disable = not plugin_settings.status.cmp, wants = "friendly-snippets", after = plugin_settings.options.cmp.lazy_load and "nvim-cmp", - config = override_req("luasnip", "(plugins.configs.others).luasnip()"), + config = override_req("luasnip", "plugins.configs.others", "luasnip"), } use { @@ -178,7 +178,7 @@ return packer.startup(function() "windwp/nvim-autopairs", disable = not plugin_settings.status.autopairs, after = plugin_settings.options.cmp.lazy_load and plugin_settings.options.autopairs.loadAfter, - config = override_req("nvim_autopairs", "(plugins.configs.others).autopairs()"), + config = override_req("nvim_autopairs", "plugins.configs.others", "autopairs"), } use { @@ -194,7 +194,7 @@ return packer.startup(function() "numToStr/Comment.nvim", disable = not plugin_settings.status.comment, module = "Comment", - config = override_req("nvim_comment", "(plugins.configs.others).comment()"), + config = override_req("nvim_comment", "plugins.configs.others", "comment"), setup = function() require("core.mappings").comment() end, @@ -207,7 +207,7 @@ return packer.startup(function() -- only set "after" if lazy load is disabled and vice versa for "cmd" after = not plugin_settings.options.nvimtree.lazy_load and "nvim-web-devicons", cmd = plugin_settings.options.nvimtree.lazy_load and { "NvimTreeToggle", "NvimTreeFocus" }, - config = override_req("nvim_tree", "(plugins.configs.nvimtree).setup()"), + config = override_req("nvim_tree", "plugins.configs.nvimtree", "setup"), setup = function() require("core.mappings").nvimtree() end, @@ -217,7 +217,7 @@ return packer.startup(function() "nvim-telescope/telescope.nvim", module = "telescope", cmd = "Telescope", - config = override_req("telescope", "(plugins.configs.telescope).setup()"), + config = override_req("telescope", "plugins.configs.telescope", "setup"), setup = function() require("core.mappings").telescope() end, From 4077ff3520108ec385962e289eb27bd52de208f0 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Fri, 21 Jan 2022 16:31:58 -0500 Subject: [PATCH 0912/1541] fixed chadrc string overrides calling default function parameter. Added ability to use function as config override --- lua/core/utils.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 065cfe8..637d1b6 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -247,14 +247,17 @@ end -- if 3rd arg not given, then return "require('plugins.configs.telescope')" -- if override is a table, mark set the override flag for the default config to true -- override flag being true tells the plugin to call tbl_override_req as part of configuration + M.override_req = function(name, default_config, config_function) local override, apply_table_override = require("core.utils").load_config().plugins.default_plugin_config_replace[name], "false" local result = default_config if type(override) == "string" and override ~= "" then - result = override + return "require('" .. override .. "')" elseif type(override) == "table" then apply_table_override = "true" + elseif type(override) == "function" then + return override end result = "('" .. result .. "')" From a0dd82a29292273f161ec4777810c59a48cde7b3 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 22 Jan 2022 11:05:27 +0530 Subject: [PATCH 0913/1541] clean nvimtree config --- lua/core/default_config.lua | 8 -------- lua/plugins/configs/nvimtree.lua | 24 ++++++++++++------------ 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 3d8e2a0..f2c3c33 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -83,16 +83,8 @@ M.plugins = { setup_lspconf = "", -- path of file containing setups of different lsps }, nvimtree = { - enable_git = 0, -- packerCompile required after changing lazy_load lazy_load = true, - - ui = { - allow_resize = true, - side = "left", - width = 25, - hide_root_folder = true, - }, }, luasnip = { snippet_path = {}, diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 5f18230..5b0eb75 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -1,20 +1,13 @@ local present, nvimtree = pcall(require, "nvim-tree") + if not present then return end local g = vim.g -local default = { - conf = require("core.utils").load_config().plugins.options.nvimtree, -} - -default = { - git_status = default.conf.enable_git, - ui = default.conf.ui, -} g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names -g.nvim_tree_git_hl = default.git_status +g.nvim_tree_git_hl = 0 g.nvim_tree_highlight_opened_files = 0 g.nvim_tree_indent_markers = 1 g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened @@ -28,7 +21,7 @@ g.nvim_tree_window_picker_exclude = { g.nvim_tree_show_icons = { folders = 1, files = 1, - git = default.git_status, + git = 1, } g.nvim_tree_icons = { @@ -53,7 +46,7 @@ g.nvim_tree_icons = { }, } -default = { +local default = { filters = { dotfiles = false, }, @@ -68,13 +61,20 @@ default = { enable = true, update_cwd = false, }, - view = default.ui, + view = { + allow_resize = true, + side = "left", + width = 25, + hide_root_folder = true, + }, git = { + enable = false, ignore = false, }, } local M = {} + M.setup = function(override_flag) if override_flag then default = require("core.utils").tbl_override_req("nvim_tree", default) From b86ae3b1706cc1057ded2b85a38c7635170d01fa Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 22 Jan 2022 10:19:32 +0530 Subject: [PATCH 0914/1541] configs/statusline: Fix extra space before git diff removed icon --- lua/plugins/configs/statusline.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 9eb99e9..5f13bb1 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -143,7 +143,7 @@ default.diff = { fg = default.colors.grey_fg2, bg = default.colors.statusline_bg, }, - icon = "  ", + icon = "  ", }, remove = { From 4c85f25a09e93c2f8bfe4229af22637f280fa402 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 22 Jan 2022 12:10:07 +0530 Subject: [PATCH 0915/1541] init.lua: Print error message if custom init.lua cannot be called properly --- init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index e2405a9..3df86c6 100644 --- a/init.lua +++ b/init.lua @@ -15,4 +15,7 @@ end require("core.mappings").misc() -- try to call custom init -pcall(require, "custom") +local ok, err = pcall(require, "custom") +if not ok then + vim.notify("Error loading custom/init.lua\n\n" .. err) +end From bad06dc44fbe39109d31dfb83517b987fd54ec00 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 22 Jan 2022 12:51:12 +0530 Subject: [PATCH 0916/1541] mappings: Allow to remove plugin mappings in chadrc This enables us to disable a plugin mappings individually for eg: M.mappings.plugins = { telelscope = { find_hiddenfiles = false } } This will disable the telelscope find_hiddenfiles mapping. It's also helpful when we want to use the mapping used by find_hiddenfiles for something else --- lua/core/default_config.lua | 2 +- lua/core/mappings.lua | 31 +++++++++++++++++++++---------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index f2c3c33..b23bd18 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -166,7 +166,7 @@ M.mappings = { } -- plugins related mappings - +-- To disable a mapping, equate the variable to "" or false or nil in chadrc M.mappings.plugins = { bufferline = { next_buffer = "", diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 1a72b04..b556ad5 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -1,7 +1,7 @@ local utils = require "core.utils" local config = utils.load_config() -local map = utils.map +local map_wrapper = utils.map local maps = config.mappings local plugin_maps = maps.plugins @@ -9,41 +9,52 @@ local nvChad_options = config.options.nvChad local cmd = vim.cmd +-- This is a wrapper function made to disable a plugin mapping from chadrc +-- If keys are nil, false or empty string, then the mapping will be not applied +-- Useful when one wants to use that keymap for any other purpose +local map = function(...) + local keys = select(2, ...) + if not keys or keys == "" then + return + end + map_wrapper(...) +end + local M = {} -- these mappings will only be called during initialization M.misc = function() local function non_config_mappings() -- Don't copy the replaced text after pasting in visual mode - map("v", "p", '"_dP') + map_wrapper("v", "p", '"_dP') -- Allow moving the cursor through wrapped lines with j, k, and -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ -- empty mode is same as using :map -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour - map("", "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) - map("", "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) - map("", "", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) - map("", "", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) + map_wrapper("", "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) + map_wrapper("", "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) + map_wrapper("", "", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) + map_wrapper("", "", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) -- use ESC to turn off search highlighting - map("n", "", ":noh ") + map_wrapper("n", "", ":noh ") -- center cursor when moving (goto_definition) -- yank from current cursor to end of line - map("n", "Y", "yg$") + map_wrapper("n", "Y", "yg$") end local function optional_mappings() -- don't yank text on cut ( x ) if not nvChad_options.copy_cut then - map({ "n", "v" }, "x", '"_x') + map_wrapper({ "n", "v" }, "x", '"_x') end -- don't yank text on delete ( dd ) if not nvChad_options.copy_del then - map({ "n", "v" }, "d", '"_d') + map_wrapper({ "n", "v" }, "d", '"_d') end -- navigation within insert mode From b9fcaf610f6a98eefba842a81490a7b0195dd94d Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 22 Jan 2022 13:23:15 +0530 Subject: [PATCH 0917/1541] plugins:lspconfig: Add module name to packer config https://github.com/NvChad/NvChad/issues/730 --- lua/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 79063f2..0e6a7b2 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -87,6 +87,7 @@ return packer.startup(function() use { "neovim/nvim-lspconfig", + module = "lspconfig", opt = true, setup = function() require("core.utils").packer_lazy_load "nvim-lspconfig" From c2a1298ac0c520e6e898758293c3aaff8c0b4b53 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 22 Jan 2022 18:33:05 +0530 Subject: [PATCH 0918/1541] fix error handling of custom/init.lua (#739) --- init.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 3df86c6..f1c66de 100644 --- a/init.lua +++ b/init.lua @@ -14,8 +14,12 @@ end -- non plugin mappings require("core.mappings").misc() --- try to call custom init -local ok, err = pcall(require, "custom") -if not ok then - vim.notify("Error loading custom/init.lua\n\n" .. err) +-- check if custom init.lua file exists +if vim.fn.filereadable(vim.fn.stdpath "config" .. "/lua/custom/init.lua") == 1 then + -- try to call custom init, if not successful, show error + local ok, err = pcall(require, "custom") + if not ok then + vim.notify("Error loading custom/init.lua\n\n" .. err) + end + return end From ddd13df5afe188e52ea797b1011f7fac6f77460c Mon Sep 17 00:00:00 2001 From: emincanozcan <50255411+emincanozcan@users.noreply.github.com> Date: Sat, 22 Jan 2022 22:50:22 +0300 Subject: [PATCH 0919/1541] Fix typo --- lua/colors/highlights.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 9f0ba83..aaa0596 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -36,7 +36,7 @@ else fg("Comment", grey_fg) end --- Disable cusror line +-- Disable cursor line cmd "hi clear CursorLine" -- Line number fg("cursorlinenr", white) From 4511b84d6c902aa818d7dc49c6b7b6c0dfb60004 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 23 Jan 2022 12:54:15 +0530 Subject: [PATCH 0920/1541] load lspconfig after cmp | fix (#740) if cmp isnt lazy loaded then load lspconfig after it so cmp-nvim-lsp capabilities can be used by lspconfig --- lua/plugins/init.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 0e6a7b2..85022e6 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,6 +1,13 @@ local plugin_settings = require("core.utils").load_config().plugins local present, packer = pcall(require, plugin_settings.options.packer.init_file) +-- if cmp isnt lazy loaded -> load lspconfig after it +local loadAfter_cmp = false + +if not plugin_settings.options.cmp.lazy_load then + loadAfter_cmp = "cmp-nvim-lsp" +end + if not present then return false end @@ -89,6 +96,7 @@ return packer.startup(function() "neovim/nvim-lspconfig", module = "lspconfig", opt = true, + after = loadAfter_cmp, setup = function() require("core.utils").packer_lazy_load "nvim-lspconfig" -- reload the current file so lsp actually starts for it From 20e8249efad9360652c32cbb3b0c63b9a973c0bc Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 23 Jan 2022 13:03:39 +0530 Subject: [PATCH 0921/1541] fix typo in variable --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 85022e6..274a0c7 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -5,7 +5,7 @@ local present, packer = pcall(require, plugin_settings.options.packer.init_file) local loadAfter_cmp = false if not plugin_settings.options.cmp.lazy_load then - loadAfter_cmp = "cmp-nvim-lsp" + loadAfter_cmp = "nvim-cmp" end if not present then From ee5b79d3d45eb7f1756ced7c65cf1e65561dd5b6 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 26 Jan 2022 20:17:44 +0530 Subject: [PATCH 0922/1541] fix (#740) | lazy load lspconfig on nvim_cmp_lsp module --- lua/plugins/configs/lspconfig.lua | 15 --------------- lua/plugins/configs/others.lua | 1 + lua/plugins/configs/statusline.lua | 2 +- lua/plugins/init.lua | 23 ++++++++--------------- 4 files changed, 10 insertions(+), 31 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 2d1273b..362ed07 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -12,21 +12,6 @@ local function on_attach(_, bufnr) end local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities.textDocument.completion.completionItem.documentationFormat = { "markdown", "plaintext" } -capabilities.textDocument.completion.completionItem.snippetSupport = true -capabilities.textDocument.completion.completionItem.preselectSupport = true -capabilities.textDocument.completion.completionItem.insertReplaceSupport = true -capabilities.textDocument.completion.completionItem.labelDetailsSupport = true -capabilities.textDocument.completion.completionItem.deprecatedSupport = true -capabilities.textDocument.completion.completionItem.commitCharactersSupport = true -capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } } -capabilities.textDocument.completion.completionItem.resolveSupport = { - properties = { - "documentation", - "detail", - "additionalTextEdits", - }, -} -- requires a file containing user's lspconfigs local addlsp_confs = require("core.utils").load_config().plugins.options.lspconfig.setup_lspconf diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 9ca7c6f..360d8bf 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -38,6 +38,7 @@ M.blankline = function(override_flag) "TelescopePrompt", "TelescopeResults", "nvchad_cheatsheet", + 'lsp-installer', "", }, buftype_exclude = { "terminal" }, diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 5f13bb1..ddad9d5 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -169,7 +169,7 @@ default.git_branch = { } default.diagnostic = { - errors = { + error = { provider = "diagnostic_errors", enabled = function() return default.lsp.diagnostics_exist(default.lsp_severity.ERROR) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 274a0c7..d8b54e4 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,13 +1,6 @@ local plugin_settings = require("core.utils").load_config().plugins local present, packer = pcall(require, plugin_settings.options.packer.init_file) --- if cmp isnt lazy loaded -> load lspconfig after it -local loadAfter_cmp = false - -if not plugin_settings.options.cmp.lazy_load then - loadAfter_cmp = "nvim-cmp" -end - if not present then return false end @@ -96,7 +89,6 @@ return packer.startup(function() "neovim/nvim-lspconfig", module = "lspconfig", opt = true, - after = loadAfter_cmp, setup = function() require("core.utils").packer_lazy_load "nvim-lspconfig" -- reload the current file so lsp actually starts for it @@ -134,6 +126,7 @@ return packer.startup(function() use { "rafamadriz/friendly-snippets", + module = 'cmp_nvim_lsp', disable = not plugin_settings.status.cmp, event = "InsertEnter", } @@ -141,7 +134,7 @@ return packer.startup(function() use { "hrsh7th/nvim-cmp", disable = not plugin_settings.status.cmp, - after = plugin_settings.options.cmp.lazy_load and "friendly-snippets", + after ="friendly-snippets", config = override_req("nvim_cmp", "plugins.configs.cmp", "setup"), } @@ -149,7 +142,7 @@ return packer.startup(function() "L3MON4D3/LuaSnip", disable = not plugin_settings.status.cmp, wants = "friendly-snippets", - after = plugin_settings.options.cmp.lazy_load and "nvim-cmp", + after = "nvim-cmp", config = override_req("luasnip", "plugins.configs.others", "luasnip"), } @@ -162,31 +155,31 @@ return packer.startup(function() use { "hrsh7th/cmp-nvim-lua", disable = not plugin_settings.status.cmp, - after = plugin_settings.options.cmp.lazy_load and "cmp_luasnip", + after = "cmp_luasnip", } use { "hrsh7th/cmp-nvim-lsp", disable = not plugin_settings.status.cmp, - after = plugin_settings.options.cmp.lazy_load and "cmp-nvim-lua", + after = "cmp-nvim-lua", } use { "hrsh7th/cmp-buffer", disable = not plugin_settings.status.cmp, - after = plugin_settings.options.cmp.lazy_load and "cmp-nvim-lsp", + after = "cmp-nvim-lsp", } use { "hrsh7th/cmp-path", disable = not plugin_settings.status.cmp, - after = plugin_settings.options.cmp.lazy_load and "cmp-buffer", + after = "cmp-buffer", } -- misc plugins use { "windwp/nvim-autopairs", disable = not plugin_settings.status.autopairs, - after = plugin_settings.options.cmp.lazy_load and plugin_settings.options.autopairs.loadAfter, + after = plugin_settings.options.autopairs.loadAfter, config = override_req("nvim_autopairs", "plugins.configs.others", "autopairs"), } From 2a02054a39ff81949b09eccf698cdde395524694 Mon Sep 17 00:00:00 2001 From: i3cheese Date: Sat, 29 Jan 2022 19:16:01 +0700 Subject: [PATCH 0923/1541] Add config.plugins.status.snippets to enable/disable snippets --- lua/core/default_config.lua | 1 + lua/plugins/configs/cmp.lua | 8 +++++--- lua/plugins/init.lua | 9 +++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index b23bd18..77afe83 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -68,6 +68,7 @@ M.plugins = { lspsignature = true, -- lsp enhancements vim_matchup = true, -- improved matchit cmp = true, + snippets = true, nvimtree = true, autopairs = true, }, diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 94944b7..d01b74a 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -4,10 +4,12 @@ if not present then return end +local snippets_status = require("core.utils").load_config().plugins.status.snippets + vim.opt.completeopt = "menuone,noselect" local default = { - snippet = { + snippet = snippets_status and { expand = function(args) require("luasnip").lsp_expand(args.body) end, @@ -40,7 +42,7 @@ local default = { [""] = function(fallback) if cmp.visible() then cmp.select_next_item() - elseif require("luasnip").expand_or_jumpable() then + elseif snippents_status and require("luasnip").expand_or_jumpable() then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") else fallback() @@ -49,7 +51,7 @@ local default = { [""] = function(fallback) if cmp.visible() then cmp.select_prev_item() - elseif require("luasnip").jumpable(-1) then + elseif snippets_status and require("luasnip").jumpable(-1) then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") else fallback() diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index d8b54e4..ffe6cca 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -128,19 +128,20 @@ return packer.startup(function() "rafamadriz/friendly-snippets", module = 'cmp_nvim_lsp', disable = not plugin_settings.status.cmp, + disable = not (plugin_settings.status.cmp and plugin_settings.status.snippets), event = "InsertEnter", } use { "hrsh7th/nvim-cmp", disable = not plugin_settings.status.cmp, - after ="friendly-snippets", + after = plugin_settings.status.snippets and "friendly-snippets", config = override_req("nvim_cmp", "plugins.configs.cmp", "setup"), } use { "L3MON4D3/LuaSnip", - disable = not plugin_settings.status.cmp, + disable = not (plugin_settings.status.cmp and plugin_settings.status.snippets), wants = "friendly-snippets", after = "nvim-cmp", config = override_req("luasnip", "plugins.configs.others", "luasnip"), @@ -148,14 +149,14 @@ return packer.startup(function() use { "saadparwaiz1/cmp_luasnip", - disable = not plugin_settings.status.cmp, + disable = not (plugin_settings.status.cmp and plugin_settings.status.snippets), after = plugin_settings.options.cmp.lazy_load and "LuaSnip", } use { "hrsh7th/cmp-nvim-lua", disable = not plugin_settings.status.cmp, - after = "cmp_luasnip", + after = (plugin_settings.status.snippets and "cmp_luasnip") or "nvim-cmp", } use { From 0349de6d102d34402a4c0c749c20372ad7653817 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 29 Jan 2022 19:59:40 +0530 Subject: [PATCH 0924/1541] lazy load nvim-cmp if snippets are disabled --- lua/plugins/init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index ffe6cca..5b217b7 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -131,10 +131,13 @@ return packer.startup(function() disable = not (plugin_settings.status.cmp and plugin_settings.status.snippets), event = "InsertEnter", } - + + -- cmp by default loads after friendly snippets + -- if snippets are disabled -> cmp loads on insertEnter! use { "hrsh7th/nvim-cmp", disable = not plugin_settings.status.cmp, + event = plugin_settings.status.snippets and 'InsertEnter', after = plugin_settings.status.snippets and "friendly-snippets", config = override_req("nvim_cmp", "plugins.configs.cmp", "setup"), } From 50aa25f307da1799117ef6f9d50fa0baddbebca3 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 29 Jan 2022 20:03:59 +0530 Subject: [PATCH 0925/1541] remove duplicate var | tidy --- lua/plugins/init.lua | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 5b217b7..1ac7512 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -126,18 +126,17 @@ return packer.startup(function() use { "rafamadriz/friendly-snippets", - module = 'cmp_nvim_lsp', - disable = not plugin_settings.status.cmp, + module = "cmp_nvim_lsp", disable = not (plugin_settings.status.cmp and plugin_settings.status.snippets), event = "InsertEnter", } - - -- cmp by default loads after friendly snippets - -- if snippets are disabled -> cmp loads on insertEnter! + + -- cmp by default loads after friendly snippets + -- if snippets are disabled -> cmp loads on insertEnter! use { "hrsh7th/nvim-cmp", disable = not plugin_settings.status.cmp, - event = plugin_settings.status.snippets and 'InsertEnter', + event = not plugin_settings.status.snippets and "InsertEnter", after = plugin_settings.status.snippets and "friendly-snippets", config = override_req("nvim_cmp", "plugins.configs.cmp", "setup"), } @@ -146,7 +145,7 @@ return packer.startup(function() "L3MON4D3/LuaSnip", disable = not (plugin_settings.status.cmp and plugin_settings.status.snippets), wants = "friendly-snippets", - after = "nvim-cmp", + after = "nvim-cmp", config = override_req("luasnip", "plugins.configs.others", "luasnip"), } @@ -165,7 +164,7 @@ return packer.startup(function() use { "hrsh7th/cmp-nvim-lsp", disable = not plugin_settings.status.cmp, - after = "cmp-nvim-lua", + after = "cmp-nvim-lua", } use { @@ -177,7 +176,7 @@ return packer.startup(function() use { "hrsh7th/cmp-path", disable = not plugin_settings.status.cmp, - after = "cmp-buffer", + after = "cmp-buffer", } -- misc plugins use { From e8b31c930817a08e51faa8712734d260301ca4cd Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 29 Jan 2022 23:02:23 +0530 Subject: [PATCH 0926/1541] add impatient.nvim and filetype.nvim | improve startuptime --- init.lua | 6 ++++++ lua/core/default_config.lua | 2 +- lua/core/options.lua | 1 + lua/plugins/init.lua | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index f1c66de..22177d0 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,9 @@ +local present, impatient = pcall(require, "impatient") + +if present then + impatient.enable_profile() +end + local core_modules = { "core.options", "core.autocmds", diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 77afe83..89acc5d 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -68,7 +68,7 @@ M.plugins = { lspsignature = true, -- lsp enhancements vim_matchup = true, -- improved matchit cmp = true, - snippets = true, + snippets = false, nvimtree = true, autopairs = true, }, diff --git a/lua/core/options.lua b/lua/core/options.lua index b9509a4..b72ad62 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -49,6 +49,7 @@ g.mapleader = options.mapleader -- disable some builtin vim plugins local disabled_built_ins = { + "did_load_filetypes", "2html_plugin", "getscript", "getscriptPlugin", diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 1ac7512..f2f6ff5 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -15,6 +15,8 @@ return packer.startup(function() -- this is the nvchad core repo containing utilities for some features like theme swticher, no need to lazy load use "Nvchad/extensions" use "nvim-lua/plenary.nvim" + use "lewis6991/impatient.nvim" + use "nathom/filetype.nvim" use { "wbthomason/packer.nvim", From 64c32d2e5e958c70154a4ecd17a771123d0a5662 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 30 Jan 2022 12:51:46 +0530 Subject: [PATCH 0927/1541] clean packer config | Breaking change --- examples/chadrc.lua | 11 +++ examples/init.lua | 25 +------ examples/plugins.lua | 7 ++ lua/core/customPlugins.lua | 15 ---- lua/core/default_config.lua | 1 + lua/plugins/configs/cmp.lua | 2 +- lua/plugins/init.lua | 132 ++++++++++++++++++------------------ 7 files changed, 89 insertions(+), 104 deletions(-) create mode 100644 examples/plugins.lua delete mode 100644 lua/core/customPlugins.lua diff --git a/examples/chadrc.lua b/examples/chadrc.lua index 6967664..a0f135d 100644 --- a/examples/chadrc.lua +++ b/examples/chadrc.lua @@ -9,4 +9,15 @@ M.ui = { theme = "onedark", } +-- Install plugins +local userPlugins = require "custom.plugins" -- path to table + +M.plugins = { + install = userPlugins, +} + +-- NOTE: we heavily suggest using Packer's lazy loading (with the 'event','cmd' fields) +-- see: https://github.com/wbthomason/packer.nvim +-- https://nvchad.github.io/config/walkthrough + return M diff --git a/examples/init.lua b/examples/init.lua index 7d6e529..a6b3d5c 100644 --- a/examples/init.lua +++ b/examples/init.lua @@ -1,30 +1,11 @@ --- This is an example init file , its supposed to be placed in /lua/custom/ - --- This is where your custom modules and plugins go. -- Please check NvChad docs if you're totally new to nvchad + dont know lua!! +-- This is an example init file in /lua/custom/ +-- this init.lua can load stuffs etc too so treat it like your ~/.config/nvim/ -- MAPPINGS local map = require("core.utils").map map("n", "cc", ":Telescope ") map("n", "q", ":q ") --- NOTE: the 4th argument in the map function can be a table i.e options but its most likely un-needed so dont worry about it --- Install plugins -local customPlugins = require "core.customPlugins" - -customPlugins.add(function(use) - use { - "max397574/better-escape.nvim", - event = "InsertEnter", - } - - use { - "user or orgname/reponame", - --further packer options - } -end) - --- NOTE: we heavily suggest using Packer's lazy loading (with the 'event','cmd' fields) --- see: https://github.com/wbthomason/packer.nvim --- https://nvchad.github.io/config/walkthrough +-- NOTE: the 4th argument in the map function is be a table i.e options but its most likely un-needed so dont worry about it diff --git a/examples/plugins.lua b/examples/plugins.lua new file mode 100644 index 0000000..0e0b0c9 --- /dev/null +++ b/examples/plugins.lua @@ -0,0 +1,7 @@ +-- Example plugins file! +-- (suggestion) -> lua/custom/plugins/init.lua or anywhere in custom dir + +return { + { "elkowar/yuck.vim", ft = "yuck" }, + { "ellisonleao/glow.nvim", cmd = "Glow" }, +} diff --git a/lua/core/customPlugins.lua b/lua/core/customPlugins.lua deleted file mode 100644 index c667936..0000000 --- a/lua/core/customPlugins.lua +++ /dev/null @@ -1,15 +0,0 @@ -local M = {} -local plugins = {} - -M.add = function(fn) - table.insert(plugins, fn) -end - --- load custom plugins in packer startup function -M.run = function(args) - for _, hook in pairs(plugins) do - hook(args) - end -end - -return M diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 89acc5d..1e43129 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -107,6 +107,7 @@ M.plugins = { esc_insertmode_timeout = 300, }, default_plugin_config_replace = {}, + install = nil, } -- Don't use a single keymap twice diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index d01b74a..298ba4d 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -42,7 +42,7 @@ local default = { [""] = function(fallback) if cmp.visible() then cmp.select_next_item() - elseif snippents_status and require("luasnip").expand_or_jumpable() then + elseif snippets_status and require("luasnip").expand_or_jumpable() then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") else fallback() diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index f2f6ff5..371abd9 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -5,46 +5,41 @@ if not present then return false end -local use = packer.use +local override_req = require("core.utils").override_req -return packer.startup(function() - local override_req = require("core.utils").override_req +local plugins = { + { "Nvchad/extensions" }, + { "nvim-lua/plenary.nvim" }, + { "lewis6991/impatient.nvim" }, + { "nathom/filetype.nvim" }, - -- this is arranged on the basis of when a plugin starts - - -- this is the nvchad core repo containing utilities for some features like theme swticher, no need to lazy load - use "Nvchad/extensions" - use "nvim-lua/plenary.nvim" - use "lewis6991/impatient.nvim" - use "nathom/filetype.nvim" - - use { + { "wbthomason/packer.nvim", event = "VimEnter", - } + }, - use { + { "NvChad/nvim-base16.lua", after = "packer.nvim", config = function() require("colors").init() end, - } + }, - use { + { "kyazdani42/nvim-web-devicons", after = "nvim-base16.lua", config = override_req("nvim_web_devicons", "plugins.configs.icons", "setup"), - } + }, - use { + { "feline-nvim/feline.nvim", disable = not plugin_settings.status.feline, after = "nvim-web-devicons", config = override_req("feline", "plugins.configs.statusline", "setup"), - } + }, - use { + { "akinsho/bufferline.nvim", disable = not plugin_settings.status.bufferline, after = "nvim-web-devicons", @@ -52,30 +47,30 @@ return packer.startup(function() setup = function() require("core.mappings").bufferline() end, - } + }, - use { + { "lukas-reineke/indent-blankline.nvim", disable = not plugin_settings.status.blankline, event = "BufRead", config = override_req("indent_blankline", "plugins.configs.others", "blankline"), - } + }, - use { + { "norcalli/nvim-colorizer.lua", disable = not plugin_settings.status.colorizer, event = "BufRead", config = override_req("nvim_colorizer", "plugins.configs.others", "colorizer"), - } + }, - use { + { "nvim-treesitter/nvim-treesitter", event = "BufRead", config = override_req("nvim_treesitter", "plugins.configs.treesitter", "setup"), - } + }, -- git stuff - use { + { "lewis6991/gitsigns.nvim", disable = not plugin_settings.status.gitsigns, opt = true, @@ -83,11 +78,11 @@ return packer.startup(function() setup = function() require("core.utils").packer_lazy_load "gitsigns.nvim" end, - } + }, -- lsp stuff - use { + { "neovim/nvim-lspconfig", module = "lspconfig", opt = true, @@ -99,105 +94,106 @@ return packer.startup(function() end, 0) end, config = override_req("lspconfig", "plugins.configs.lspconfig"), - } + }, - use { + { "ray-x/lsp_signature.nvim", disable = not plugin_settings.status.lspsignature, after = "nvim-lspconfig", config = override_req("signature", "plugins.configs.others", "signature"), - } + }, - use { + { "andymass/vim-matchup", disable = not plugin_settings.status.vim_matchup, opt = true, setup = function() require("core.utils").packer_lazy_load "vim-matchup" end, - } + }, - use { + { "max397574/better-escape.nvim", disable = not plugin_settings.status.better_escape, event = "InsertEnter", config = override_req("better_escape", "plugins.configs.others", "better_escape"), - } + }, -- load luasnips + cmp related in insert mode only - use { + { "rafamadriz/friendly-snippets", module = "cmp_nvim_lsp", disable = not (plugin_settings.status.cmp and plugin_settings.status.snippets), event = "InsertEnter", - } + }, -- cmp by default loads after friendly snippets -- if snippets are disabled -> cmp loads on insertEnter! - use { + { "hrsh7th/nvim-cmp", disable = not plugin_settings.status.cmp, event = not plugin_settings.status.snippets and "InsertEnter", after = plugin_settings.status.snippets and "friendly-snippets", config = override_req("nvim_cmp", "plugins.configs.cmp", "setup"), - } + }, - use { + { "L3MON4D3/LuaSnip", disable = not (plugin_settings.status.cmp and plugin_settings.status.snippets), wants = "friendly-snippets", after = "nvim-cmp", config = override_req("luasnip", "plugins.configs.others", "luasnip"), - } + }, - use { + { "saadparwaiz1/cmp_luasnip", disable = not (plugin_settings.status.cmp and plugin_settings.status.snippets), after = plugin_settings.options.cmp.lazy_load and "LuaSnip", - } + }, - use { + { "hrsh7th/cmp-nvim-lua", disable = not plugin_settings.status.cmp, after = (plugin_settings.status.snippets and "cmp_luasnip") or "nvim-cmp", - } + }, - use { + { "hrsh7th/cmp-nvim-lsp", disable = not plugin_settings.status.cmp, after = "cmp-nvim-lua", - } + }, - use { + { "hrsh7th/cmp-buffer", disable = not plugin_settings.status.cmp, after = "cmp-nvim-lsp", - } + }, - use { + { "hrsh7th/cmp-path", disable = not plugin_settings.status.cmp, after = "cmp-buffer", - } + }, + -- misc plugins - use { + { "windwp/nvim-autopairs", disable = not plugin_settings.status.autopairs, after = plugin_settings.options.autopairs.loadAfter, config = override_req("nvim_autopairs", "plugins.configs.others", "autopairs"), - } + }, - use { + { "glepnir/dashboard-nvim", disable = not plugin_settings.status.dashboard, config = override_req("dashboard", "plugins.configs.dashboard"), setup = function() require("core.mappings").dashboard() end, - } + }, - use { + { "numToStr/Comment.nvim", disable = not plugin_settings.status.comment, module = "Comment", @@ -205,10 +201,10 @@ return packer.startup(function() setup = function() require("core.mappings").comment() end, - } + }, -- file managing , picker etc - use { + { "kyazdani42/nvim-tree.lua", disable = not plugin_settings.status.nvimtree, -- only set "after" if lazy load is disabled and vice versa for "cmd" @@ -218,9 +214,9 @@ return packer.startup(function() setup = function() require("core.mappings").nvimtree() end, - } + }, - use { + { "nvim-telescope/telescope.nvim", module = "telescope", cmd = "Telescope", @@ -228,7 +224,11 @@ return packer.startup(function() setup = function() require("core.mappings").telescope() end, - } - -- load user defined plugins - require("core.customPlugins").run(use) -end) + }, +} + +-- append user plugins to default plugins +local user_Plugins = plugin_settings.install +plugins[#plugins + 1] = user_Plugins + +return packer.startup { plugins } From de246fa0f5aff645b5622968c8b200103ed54464 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 30 Jan 2022 22:34:39 +0530 Subject: [PATCH 0928/1541] Resolve https://github.com/NvChad/NvChad/issues/774 | Format --- lua/plugins/configs/others.lua | 2 +- lua/plugins/init.lua | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 360d8bf..de9ac85 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -38,7 +38,7 @@ M.blankline = function(override_flag) "TelescopePrompt", "TelescopeResults", "nvchad_cheatsheet", - 'lsp-installer', + "lsp-installer", "", }, buftype_exclude = { "terminal" }, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 371abd9..e5d4f19 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -229,6 +229,12 @@ local plugins = { -- append user plugins to default plugins local user_Plugins = plugin_settings.install -plugins[#plugins + 1] = user_Plugins +if type(user_Plugins) == "table" then + if table.maxn(user_Plugins) == 1 then + plugins[#plugins + 1] = user_Plugins[1] + else + plugins[#plugins + 1] = user_Plugins + end +end return packer.startup { plugins } From a3a5b506de49abfa3278a1fc243f97727eb3e500 Mon Sep 17 00:00:00 2001 From: i3Cheese Date: Mon, 31 Jan 2022 01:56:58 +0700 Subject: [PATCH 0929/1541] fix empty snippets --- lua/plugins/configs/cmp.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 298ba4d..3a05e18 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -9,10 +9,13 @@ local snippets_status = require("core.utils").load_config().plugins.status.snipp vim.opt.completeopt = "menuone,noselect" local default = { - snippet = snippets_status and { + snippet = (snippets_status and { expand = function(args) require("luasnip").lsp_expand(args.body) end, + }) or { + expand = function(args) + end, }, formatting = { format = function(entry, vim_item) From 4b68a758533276c7060cf4e036b197340e0f9b45 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Sun, 30 Jan 2022 20:28:19 -0500 Subject: [PATCH 0930/1541] added helper functions for removing plugins from default plugin table --- lua/core/default_config.lua | 2 ++ lua/core/utils.lua | 19 +++++++++++++++++++ lua/plugins/init.lua | 4 +++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 1e43129..6a40b31 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -107,6 +107,8 @@ M.plugins = { esc_insertmode_timeout = 300, }, default_plugin_config_replace = {}, + default_plugin_edit = {}, + default_plugin_remove = {}, install = nil, } diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 637d1b6..ed0c15c 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -280,4 +280,23 @@ M.tbl_override_req = function(name, default_table) return vim.tbl_deep_extend("force", default_table, override) end +--Helper function to get key from default plugin table +local get_plugin_index = function(plugin_table, plugin_name) + for index, plugin in ipairs(plugin_table) do + if plugin[1] == plugin_name then + return index + end + end +end + +M.remove_default_plugins = function(plugin_table) + local removals = require("core.utils").load_config().plugins.default_plugin_remove or {} + if vim.tbl_isempty(removals) then return plugin_table end + for _, plugin_removal in ipairs(removals) do + index = get_plugin_index(plugin_table, plugin_removal) + plugin_table[index] = nil + end + return plugin_table +end + return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e5d4f19..df7e615 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -226,7 +226,9 @@ local plugins = { end, }, } - +--Merge changes to plugin fields from chadrc +plugins = require("core.utils").edit_default_plugins(plugins) +plugins = require("core.utils").remove_default_plugins(plugins) -- append user plugins to default plugins local user_Plugins = plugin_settings.install if type(user_Plugins) == "table" then From 4bda425371c2ace1be2eb0cd80109e82b7f7b665 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Sun, 30 Jan 2022 20:29:35 -0500 Subject: [PATCH 0931/1541] added field for removing plugins to default config and call to plugin removal in init.lua --- lua/core/default_config.lua | 1 - lua/plugins/init.lua | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 6a40b31..6f35471 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -107,7 +107,6 @@ M.plugins = { esc_insertmode_timeout = 300, }, default_plugin_config_replace = {}, - default_plugin_edit = {}, default_plugin_remove = {}, install = nil, } diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index df7e615..3323d70 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -226,8 +226,7 @@ local plugins = { end, }, } ---Merge changes to plugin fields from chadrc -plugins = require("core.utils").edit_default_plugins(plugins) +--remove plugins specified in chadrc plugins = require("core.utils").remove_default_plugins(plugins) -- append user plugins to default plugins local user_Plugins = plugin_settings.install From e87c10f2259cb455dae07fd7191c8a4c6e45d06f Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Sun, 30 Jan 2022 21:13:53 -0500 Subject: [PATCH 0932/1541] fix for removals --- lua/core/utils.lua | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index ed0c15c..c9f84f8 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -280,23 +280,25 @@ M.tbl_override_req = function(name, default_table) return vim.tbl_deep_extend("force", default_table, override) end ---Helper function to get key from default plugin table -local get_plugin_index = function(plugin_table, plugin_name) - for index, plugin in ipairs(plugin_table) do - if plugin[1] == plugin_name then - return index - end - end -end M.remove_default_plugins = function(plugin_table) local removals = require("core.utils").load_config().plugins.default_plugin_remove or {} if vim.tbl_isempty(removals) then return plugin_table end - for _, plugin_removal in ipairs(removals) do - index = get_plugin_index(plugin_table, plugin_removal) - plugin_table[index] = nil + newtable = {} + local i = 1 + for index, value in ipairs(plugin_table) do + local removed = false + for _, removal in ipairs(removals) do + if value[1] == removal then + removed = true + end + end + if not removed then + newtable[i] = value + i = i+1 + end end - return plugin_table + return newtable end return M From bd98d76ad614807839c42bb68947cd13dc7ec9c1 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Sun, 30 Jan 2022 22:22:29 -0500 Subject: [PATCH 0933/1541] improve startup time with shada load deferral --- lua/core/options.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/core/options.lua b/lua/core/options.lua index b72ad62..9c327db 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -3,6 +3,13 @@ local g = vim.g local options = require("core.utils").load_config().options +--Defer loading shada until after startup +vim.opt.shadafile = "NONE" +vim.defer_fn(function() + vim.opt.shadafile = vim.fn.expand("$HOME") .. "/.local/share/nvim/shada/main.shada" + vim.cmd[[ rsh ]] +end, 0) + opt.title = true opt.clipboard = options.clipboard opt.cmdheight = options.cmdheight From d8dabe9e5e0c4fe6aedae137bf4b5c623ce9c46d Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Sun, 30 Jan 2022 23:33:15 -0500 Subject: [PATCH 0934/1541] defer and restore shada --- lua/core/default_config.lua | 1 + lua/core/options.lua | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 6f35471..e408db6 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -26,6 +26,7 @@ M.options = { updatetime = 250, undofile = true, fillchars = { eob = " " }, + shadafile = vim.opt.shadafile, -- NvChad options nvChad = { diff --git a/lua/core/options.lua b/lua/core/options.lua index 9c327db..2b6c7d5 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -80,3 +80,10 @@ local disabled_built_ins = { for _, plugin in pairs(disabled_built_ins) do g["loaded_" .. plugin] = 1 end + +--Defer loading shada until after startup_ +vim.opt.shadafile = "NONE" +vim.schedule(function() + vim.opt.shadafile = require("core.utils").load_config().options.shadafile + vim.cmd [[ rsh ]] +end) From 6b06bb9ed4f3c97b3886ab5f7d96fe12aa67d7e5 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Mon, 31 Jan 2022 10:58:52 +0530 Subject: [PATCH 0935/1541] Remove duplicate code, missed in d8dabe9 | Format files --- lua/core/options.lua | 7 ------- lua/core/utils.lua | 11 ++++++----- lua/plugins/configs/cmp.lua | 3 +-- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index 2b6c7d5..539c8e6 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -3,13 +3,6 @@ local g = vim.g local options = require("core.utils").load_config().options ---Defer loading shada until after startup -vim.opt.shadafile = "NONE" -vim.defer_fn(function() - vim.opt.shadafile = vim.fn.expand("$HOME") .. "/.local/share/nvim/shada/main.shada" - vim.cmd[[ rsh ]] -end, 0) - opt.title = true opt.clipboard = options.clipboard opt.cmdheight = options.cmdheight diff --git a/lua/core/utils.lua b/lua/core/utils.lua index c9f84f8..2099817 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -280,13 +280,14 @@ M.tbl_override_req = function(name, default_table) return vim.tbl_deep_extend("force", default_table, override) end - M.remove_default_plugins = function(plugin_table) local removals = require("core.utils").load_config().plugins.default_plugin_remove or {} - if vim.tbl_isempty(removals) then return plugin_table end - newtable = {} + if vim.tbl_isempty(removals) then + return plugin_table + end + local newtable = {} local i = 1 - for index, value in ipairs(plugin_table) do + for _, value in ipairs(plugin_table) do local removed = false for _, removal in ipairs(removals) do if value[1] == removal then @@ -295,7 +296,7 @@ M.remove_default_plugins = function(plugin_table) end if not removed then newtable[i] = value - i = i+1 + i = i + 1 end end return newtable diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 3a05e18..936779c 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -14,8 +14,7 @@ local default = { require("luasnip").lsp_expand(args.body) end, }) or { - expand = function(args) - end, + expand = function(args) end, }, formatting = { format = function(entry, vim_item) From 1f73ef0ec68ad065ebf12327a1ca60dd9a99006a Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 31 Jan 2022 14:13:51 +0530 Subject: [PATCH 0936/1541] clean remove_default_plugins function --- lua/core/utils.lua | 21 +++++++++------------ lua/plugins/init.lua | 2 ++ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 2099817..855e4eb 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -282,24 +282,21 @@ end M.remove_default_plugins = function(plugin_table) local removals = require("core.utils").load_config().plugins.default_plugin_remove or {} + local result = {} + if vim.tbl_isempty(removals) then return plugin_table end - local newtable = {} - local i = 1 - for _, value in ipairs(plugin_table) do - local removed = false - for _, removal in ipairs(removals) do - if value[1] == removal then - removed = true + + for _, value in pairs(plugin_table) do + for _, plugin in ipairs(removals) do + if value[1] ~= plugin then + table.insert(result, value) end end - if not removed then - newtable[i] = value - i = i + 1 - end end - return newtable + + return result end return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 3323d70..67de5ac 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -228,8 +228,10 @@ local plugins = { } --remove plugins specified in chadrc plugins = require("core.utils").remove_default_plugins(plugins) + -- append user plugins to default plugins local user_Plugins = plugin_settings.install + if type(user_Plugins) == "table" then if table.maxn(user_Plugins) == 1 then plugins[#plugins + 1] = user_Plugins[1] From 195f6f36218c98ae915d8d9f766d7b69e6ef8596 Mon Sep 17 00:00:00 2001 From: i3cheese Date: Sun, 30 Jan 2022 22:39:47 +0700 Subject: [PATCH 0937/1541] Toggle relative numbers and copy to system clipboards mappings --- lua/core/default_config.lua | 2 ++ lua/core/mappings.lua | 3 +++ 2 files changed, 5 insertions(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index e408db6..10bf225 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -124,7 +124,9 @@ M.mappings = { cheatsheet = "ch", close_buffer = "x", copy_whole_file = "", -- copy all contents of current buffer + copy_to_system_clipboard = "", -- copy selected text (visual mode) or curent line (normal) line_number_toggle = "n", -- toggle line number + relative_line_number_toggle = "nn", update_nvchad = "uu", new_buffer = "", new_tab = "b", diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index b556ad5..5518bc5 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -84,9 +84,12 @@ M.misc = function() map("n", maps.misc.cheatsheet, ":lua require('nvchad.cheatsheet').show() ") -- show keybinds map("n", maps.misc.close_buffer, ":lua require('core.utils').close_buffer() ") -- close buffer map("n", maps.misc.copy_whole_file, ":%y+ ") -- copy whole file content + map("v", maps.misc.copy_to_system_clipboard, "\"+y") + map("n", maps.misc.copy_to_system_clipboard, "\"+yy") -- copy curent line in normal mode map("n", maps.misc.new_buffer, ":enew ") -- new buffer map("n", maps.misc.new_tab, ":tabnew ") -- new tabs map("n", maps.misc.line_number_toggle, ":set nu! ") -- toggle numbers + map("n", maps.misc.relative_line_number_toggle, ":set rnu! ") -- toggle relative numbers map("n", maps.misc.save_file, ":w ") -- ctrl + s to save file -- terminal mappings -- From d0ad028efc23e9922dab7b535b6cc7313b00e5d2 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 31 Jan 2022 14:31:21 +0530 Subject: [PATCH 0938/1541] rm conflict in mappings leader n for nummber line conflicted with leader nn --- lua/core/default_config.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 10bf225..a4e8984 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -126,7 +126,7 @@ M.mappings = { copy_whole_file = "", -- copy all contents of current buffer copy_to_system_clipboard = "", -- copy selected text (visual mode) or curent line (normal) line_number_toggle = "n", -- toggle line number - relative_line_number_toggle = "nn", + relative_line_number_toggle = "rn", update_nvchad = "uu", new_buffer = "", new_tab = "b", @@ -205,7 +205,7 @@ M.mappings.plugins = { remove_workspace_folder = "wr", list_workspace_folders = "wl", type_definition = "D", - rename = "rn", + rename = "ra", code_action = "ca", references = "gr", float_diagnostics = "ge", From 2eab84f8f19060c7fa3813b817432d6b3cc5298c Mon Sep 17 00:00:00 2001 From: socialsmoker223 Date: Tue, 1 Feb 2022 21:06:01 +0800 Subject: [PATCH 0939/1541] lunasnip super-tab like mapping example from hrsh7th/nvim-cmp --- lua/plugins/configs/cmp.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 936779c..a958e74 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -41,24 +41,24 @@ local default = { behavior = cmp.ConfirmBehavior.Replace, select = true, }, - [""] = function(fallback) + [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() elseif snippets_status and require("luasnip").expand_or_jumpable() then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") + require("luasnip").expand_or_jump() else fallback() end - end, - [""] = function(fallback) + end, { "i", "s" }), + [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() - elseif snippets_status and require("luasnip").jumpable(-1) then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") + elseif require("luasnip").jumpable(-1) then + require("luasnip").jump(-1) else fallback() end - end, + end, { "i", "s" }), }, sources = { { name = "nvim_lsp" }, From 3ee787fe0815fc5555a188c420966365baf90374 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 2 Feb 2022 10:07:49 +0530 Subject: [PATCH 0940/1541] remove un-needed filetype option --- lua/core/options.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index 539c8e6..db84a1d 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -49,7 +49,6 @@ g.mapleader = options.mapleader -- disable some builtin vim plugins local disabled_built_ins = { - "did_load_filetypes", "2html_plugin", "getscript", "getscriptPlugin", From 71295f9b61144cb44a4503c41a5560ff53a3f455 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 2 Feb 2022 22:26:04 +0530 Subject: [PATCH 0941/1541] re-add lspconfig capabilities --- lua/plugins/configs/lspconfig.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 362ed07..2d1273b 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -12,6 +12,21 @@ local function on_attach(_, bufnr) end local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.documentationFormat = { "markdown", "plaintext" } +capabilities.textDocument.completion.completionItem.snippetSupport = true +capabilities.textDocument.completion.completionItem.preselectSupport = true +capabilities.textDocument.completion.completionItem.insertReplaceSupport = true +capabilities.textDocument.completion.completionItem.labelDetailsSupport = true +capabilities.textDocument.completion.completionItem.deprecatedSupport = true +capabilities.textDocument.completion.completionItem.commitCharactersSupport = true +capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } } +capabilities.textDocument.completion.completionItem.resolveSupport = { + properties = { + "documentation", + "detail", + "additionalTextEdits", + }, +} -- requires a file containing user's lspconfigs local addlsp_confs = require("core.utils").load_config().plugins.options.lspconfig.setup_lspconf From 5a3ac7300ded37772844e2e4f67b39f3b91a9af4 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Tue, 1 Feb 2022 14:19:08 +0530 Subject: [PATCH 0942/1541] plugins/lspkind_icons: Add icon for TypeParameter --- lua/plugins/configs/lspkind_icons.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/lspkind_icons.lua b/lua/plugins/configs/lspkind_icons.lua index ea584ae..2d538a7 100644 --- a/lua/plugins/configs/lspkind_icons.lua +++ b/lua/plugins/configs/lspkind_icons.lua @@ -23,7 +23,7 @@ local icons = { Struct = "פּ", Event = "", Operator = "", - TypeParameter = "", + TypeParameter = "", } return icons From 46db63749f5635bff5d85100caa828cbfc1a7b7c Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Tue, 1 Feb 2022 16:39:51 +0530 Subject: [PATCH 0943/1541] cmp: Add border to floating docs, move completeopt inside config format files --- lua/core/mappings.lua | 4 ++-- lua/plugins/configs/cmp.lua | 13 +++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 5518bc5..29557fe 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -84,8 +84,8 @@ M.misc = function() map("n", maps.misc.cheatsheet, ":lua require('nvchad.cheatsheet').show() ") -- show keybinds map("n", maps.misc.close_buffer, ":lua require('core.utils').close_buffer() ") -- close buffer map("n", maps.misc.copy_whole_file, ":%y+ ") -- copy whole file content - map("v", maps.misc.copy_to_system_clipboard, "\"+y") - map("n", maps.misc.copy_to_system_clipboard, "\"+yy") -- copy curent line in normal mode + map("v", maps.misc.copy_to_system_clipboard, '"+y') + map("n", maps.misc.copy_to_system_clipboard, '"+yy') -- copy curent line in normal mode map("n", maps.misc.new_buffer, ":enew ") -- new buffer map("n", maps.misc.new_tab, ":tabnew ") -- new tabs map("n", maps.misc.line_number_toggle, ":set nu! ") -- toggle numbers diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index a958e74..c61086b 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -6,15 +6,19 @@ end local snippets_status = require("core.utils").load_config().plugins.status.snippets -vim.opt.completeopt = "menuone,noselect" - local default = { + completion = { + completeopt = "menuone,noselect", + }, + documentation = { + border = "single", + }, snippet = (snippets_status and { expand = function(args) require("luasnip").lsp_expand(args.body) end, }) or { - expand = function(args) end, + expand = function(_) end, }, formatting = { format = function(entry, vim_item) @@ -22,9 +26,10 @@ local default = { vim_item.kind = string.format("%s %s", icons[vim_item.kind], vim_item.kind) vim_item.menu = ({ + buffer = "[BUF]", nvim_lsp = "[LSP]", nvim_lua = "[Lua]", - buffer = "[BUF]", + path = "[Path]", })[entry.source.name] return vim_item From 70baf718d243b813ab1be931b7ee2d25911040b2 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 4 Feb 2022 12:19:16 +0530 Subject: [PATCH 0944/1541] clean highlights definitions --- lua/colors/highlights.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index aaa0596..7500b2a 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -111,8 +111,7 @@ bg("NvimTreeNormalNC", darker_black) fg("NvimTreeOpenedFolderName", folder_bg) fg("NvimTreeRootFolder", red .. " gui=underline") -- enable underline for root folder in nvim tree fg_bg("NvimTreeStatuslineNc", darker_black, darker_black) -fg("NvimTreeVertSplit", darker_black) -bg("NvimTreeVertSplit", darker_black) +fg_bg("NvimTreeVertSplit", darker_black, darker_black) fg_bg("NvimTreeWindowPicker", red, black2) -- Telescope @@ -155,8 +154,7 @@ if ui.transparency then bg("NvimTreeNormal", "NONE") bg("NvimTreeNormalNC", "NONE") bg("NvimTreeStatusLineNC", "NONE") - bg("NvimTreeVertSplit", "NONE") - fg("NvimTreeVertSplit", grey) + fg_bg("NvimTreeVertSplit", grey, "NONE") -- telescope bg("TelescopeBorder", "NONE") From f4c4d8f6c6f86be7b4beeabcb4e620dbae7dfd9c Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 4 Feb 2022 22:17:10 +0530 Subject: [PATCH 0945/1541] enable snippets by default --- lua/core/default_config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index a4e8984..47f0817 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -69,7 +69,7 @@ M.plugins = { lspsignature = true, -- lsp enhancements vim_matchup = true, -- improved matchit cmp = true, - snippets = false, + snippets = true, nvimtree = true, autopairs = true, }, From 7b7c204e23510ca3bdb1a8c39851953062c5cf5d Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 4 Feb 2022 22:19:06 +0530 Subject: [PATCH 0946/1541] correct repo name for extensions plugin --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 67de5ac..506d35e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -8,7 +8,7 @@ end local override_req = require("core.utils").override_req local plugins = { - { "Nvchad/extensions" }, + { "NvChad/extensions" }, { "nvim-lua/plenary.nvim" }, { "lewis6991/impatient.nvim" }, { "nathom/filetype.nvim" }, From 748f0db4851bfd54e6f81222f37029daefdad421 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 5 Feb 2022 19:09:25 +0530 Subject: [PATCH 0947/1541] lazy load Comment.nvim on gcc keybind (#801) --- lua/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 506d35e..90b6937 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -197,6 +197,7 @@ local plugins = { "numToStr/Comment.nvim", disable = not plugin_settings.status.comment, module = "Comment", + keys = {"gcc"}, config = override_req("nvim_comment", "plugins.configs.others", "comment"), setup = function() require("core.mappings").comment() From baaa7f0d4bef6bc7874b90f387b76bcece3516a7 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 6 Feb 2022 10:16:32 +0530 Subject: [PATCH 0948/1541] fix (#793) --- lua/core/options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index db84a1d..f8436a8 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -77,5 +77,5 @@ end vim.opt.shadafile = "NONE" vim.schedule(function() vim.opt.shadafile = require("core.utils").load_config().options.shadafile - vim.cmd [[ rsh ]] + vim.cmd [[ silent! rsh ]] end) From e7bba86ccfa908c29897ad420b80d9882673c265 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Mon, 7 Feb 2022 20:17:14 +0530 Subject: [PATCH 0949/1541] plugins/colorizer: Move to our org fork --- lua/plugins/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 90b6937..f71041a 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -57,7 +57,7 @@ local plugins = { }, { - "norcalli/nvim-colorizer.lua", + "NvChad/nvim-colorizer.lua", disable = not plugin_settings.status.colorizer, event = "BufRead", config = override_req("nvim_colorizer", "plugins.configs.others", "colorizer"), @@ -197,7 +197,7 @@ local plugins = { "numToStr/Comment.nvim", disable = not plugin_settings.status.comment, module = "Comment", - keys = {"gcc"}, + keys = { "gcc" }, config = override_req("nvim_comment", "plugins.configs.others", "comment"), setup = function() require("core.mappings").comment() From ca481b1385d1b64d0aa5c5995365552afd783565 Mon Sep 17 00:00:00 2001 From: Felix Kratz Date: Thu, 10 Feb 2022 20:27:26 +0100 Subject: [PATCH 0950/1541] fix acid blue cursor --- lua/colors/highlights.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 7500b2a..13a142a 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -91,6 +91,7 @@ fg_bg("DiffDelete", red, "NONE") -- Indent blankline plugin fg("IndentBlanklineChar", line) +fg("IndentBlanklineSpaceChar", line) -- Lsp diagnostics From a21e884983ef6d99ef6fb3d3ce714953c43332a1 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 12 Feb 2022 07:31:23 +0530 Subject: [PATCH 0951/1541] remove snippet option for cmp | fix telescope first time delay --- lua/core/default_config.lua | 1 - lua/plugins/configs/cmp.lua | 29 ++++++++++------------------- lua/plugins/init.lua | 17 +++++++---------- 3 files changed, 17 insertions(+), 30 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 47f0817..2901cfa 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -69,7 +69,6 @@ M.plugins = { lspsignature = true, -- lsp enhancements vim_matchup = true, -- improved matchit cmp = true, - snippets = true, nvimtree = true, autopairs = true, }, diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index c61086b..94944b7 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -4,21 +4,13 @@ if not present then return end -local snippets_status = require("core.utils").load_config().plugins.status.snippets +vim.opt.completeopt = "menuone,noselect" local default = { - completion = { - completeopt = "menuone,noselect", - }, - documentation = { - border = "single", - }, - snippet = (snippets_status and { + snippet = { expand = function(args) require("luasnip").lsp_expand(args.body) end, - }) or { - expand = function(_) end, }, formatting = { format = function(entry, vim_item) @@ -26,10 +18,9 @@ local default = { vim_item.kind = string.format("%s %s", icons[vim_item.kind], vim_item.kind) vim_item.menu = ({ - buffer = "[BUF]", nvim_lsp = "[LSP]", nvim_lua = "[Lua]", - path = "[Path]", + buffer = "[BUF]", })[entry.source.name] return vim_item @@ -46,24 +37,24 @@ local default = { behavior = cmp.ConfirmBehavior.Replace, select = true, }, - [""] = cmp.mapping(function(fallback) + [""] = function(fallback) if cmp.visible() then cmp.select_next_item() - elseif snippets_status and require("luasnip").expand_or_jumpable() then - require("luasnip").expand_or_jump() + elseif require("luasnip").expand_or_jumpable() then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") else fallback() end - end, { "i", "s" }), - [""] = cmp.mapping(function(fallback) + end, + [""] = function(fallback) if cmp.visible() then cmp.select_prev_item() elseif require("luasnip").jumpable(-1) then - require("luasnip").jump(-1) + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") else fallback() end - end, { "i", "s" }), + end, }, sources = { { name = "nvim_lsp" }, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index f71041a..b26c8b1 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -115,7 +115,7 @@ local plugins = { { "max397574/better-escape.nvim", disable = not plugin_settings.status.better_escape, - event = "InsertEnter", + event = "InsertCharPre", config = override_req("better_escape", "plugins.configs.others", "better_escape"), }, @@ -124,23 +124,20 @@ local plugins = { { "rafamadriz/friendly-snippets", module = "cmp_nvim_lsp", - disable = not (plugin_settings.status.cmp and plugin_settings.status.snippets), - event = "InsertEnter", + disable = not plugin_settings.status.cmp, + event = "InsertCharPre", }, - -- cmp by default loads after friendly snippets - -- if snippets are disabled -> cmp loads on insertEnter! { "hrsh7th/nvim-cmp", disable = not plugin_settings.status.cmp, - event = not plugin_settings.status.snippets and "InsertEnter", - after = plugin_settings.status.snippets and "friendly-snippets", + after = "friendly-snippets", config = override_req("nvim_cmp", "plugins.configs.cmp", "setup"), }, { "L3MON4D3/LuaSnip", - disable = not (plugin_settings.status.cmp and plugin_settings.status.snippets), + disable = not plugin_settings.status.cmp, wants = "friendly-snippets", after = "nvim-cmp", config = override_req("luasnip", "plugins.configs.others", "luasnip"), @@ -148,14 +145,14 @@ local plugins = { { "saadparwaiz1/cmp_luasnip", - disable = not (plugin_settings.status.cmp and plugin_settings.status.snippets), + disable = not plugin_settings.status.cmp, after = plugin_settings.options.cmp.lazy_load and "LuaSnip", }, { "hrsh7th/cmp-nvim-lua", disable = not plugin_settings.status.cmp, - after = (plugin_settings.status.snippets and "cmp_luasnip") or "nvim-cmp", + after = "cmp_luasnip", }, { From f81531df42bf409b8d8b6f2b428e4f9960cc461b Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Sun, 13 Feb 2022 02:39:07 -0500 Subject: [PATCH 0952/1541] improve method of adding and removing plugins --- lua/core/utils.lua | 36 ++++++++++++++++++++++++------------ lua/plugins/init.lua | 20 +++++++++----------- 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 855e4eb..6141737 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -280,23 +280,35 @@ M.tbl_override_req = function(name, default_table) return vim.tbl_deep_extend("force", default_table, override) end -M.remove_default_plugins = function(plugin_table) - local removals = require("core.utils").load_config().plugins.default_plugin_remove or {} - local result = {} - - if vim.tbl_isempty(removals) then - return plugin_table +--provide labels to plugins instead of integers +M.label_plugins = function(plugins) + plugins_labeled = {} + for _, plugin in ipairs(plugins) do + plugins_labeled[plugin[1]] = plugin end + return plugins_labeled +end - for _, value in pairs(plugin_table) do - for _, plugin in ipairs(removals) do - if value[1] ~= plugin then - table.insert(result, value) - end +-- remove plugins specified by user from the plugins table +M.remove_default_plugins = function(plugins) + local removals = require("core.utils").load_config().plugins.default_plugin_remove or {} + if not vim.tbl_isempty(removals) then + for _, plugin in pairs(removals) do + plugins[plugin] = nil end end + return plugins +end - return result +-- append user plugins to default plugins +M.add_user_plugins = function(plugins) + local user_Plugins = require("core.utils").load_config().plugins.install or {} + if not vim.tbl_isempty(user_Plugins) then + for _, v in pairs(user_Plugins) do + plugins[v[1]] = v + end + end + return plugins end return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index b26c8b1..3716b9a 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -224,18 +224,16 @@ local plugins = { end, }, } + +--label plugins for operational assistance +plugins = require("core.utils").label_plugins(plugins) --remove plugins specified in chadrc plugins = require("core.utils").remove_default_plugins(plugins) +--add plugins specified in chadrc +plugins = require("core.utils").add_user_plugins(plugins) --- append user plugins to default plugins -local user_Plugins = plugin_settings.install - -if type(user_Plugins) == "table" then - if table.maxn(user_Plugins) == 1 then - plugins[#plugins + 1] = user_Plugins[1] - else - plugins[#plugins + 1] = user_Plugins +return packer.startup(function(use) + for _, v in pairs(plugins_labeled) do + use(v) end -end - -return packer.startup { plugins } +end) From d9d380e41b110ef920661bcc8d50a8b4acb2b941 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 14 Feb 2022 16:15:39 +0530 Subject: [PATCH 0953/1541] clean example chadrc Some of the recent issues have been caused when the user doesnt even have the custom.plugins file and requires it in chadrc i.e copies the example chadrc as it is without reading it, that results in chadrc not working at all --- examples/chadrc.lua | 15 ++------------- examples/plugins.lua | 7 ------- 2 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 examples/plugins.lua diff --git a/examples/chadrc.lua b/examples/chadrc.lua index a0f135d..6aa2521 100644 --- a/examples/chadrc.lua +++ b/examples/chadrc.lua @@ -1,4 +1,4 @@ --- This is an example chadrc file , its supposed to be placed in /lua/custom/ +-- Just an example, supposed to be placed in /lua/custom/ local M = {} @@ -6,18 +6,7 @@ local M = {} -- example of changing theme: M.ui = { - theme = "onedark", + theme = "gruvchad", } --- Install plugins -local userPlugins = require "custom.plugins" -- path to table - -M.plugins = { - install = userPlugins, -} - --- NOTE: we heavily suggest using Packer's lazy loading (with the 'event','cmd' fields) --- see: https://github.com/wbthomason/packer.nvim --- https://nvchad.github.io/config/walkthrough - return M diff --git a/examples/plugins.lua b/examples/plugins.lua deleted file mode 100644 index 0e0b0c9..0000000 --- a/examples/plugins.lua +++ /dev/null @@ -1,7 +0,0 @@ --- Example plugins file! --- (suggestion) -> lua/custom/plugins/init.lua or anywhere in custom dir - -return { - { "elkowar/yuck.vim", ft = "yuck" }, - { "ellisonleao/glow.nvim", cmd = "Glow" }, -} From 4be722d4a657178781e48d0c0be460a3a5ae19e1 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Mon, 14 Feb 2022 15:32:23 -0500 Subject: [PATCH 0954/1541] fix global variable causing issues --- lua/core/utils.lua | 2 +- lua/plugins/init.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 6141737..87f7b0e 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -282,7 +282,7 @@ end --provide labels to plugins instead of integers M.label_plugins = function(plugins) - plugins_labeled = {} + local plugins_labeled = {} for _, plugin in ipairs(plugins) do plugins_labeled[plugin[1]] = plugin end diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 3716b9a..43177b4 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -233,7 +233,7 @@ plugins = require("core.utils").remove_default_plugins(plugins) plugins = require("core.utils").add_user_plugins(plugins) return packer.startup(function(use) - for _, v in pairs(plugins_labeled) do + for _, v in pairs(plugins) do use(v) end end) From 9ca0af1a24601990fe7d15cb2d242ebaf768db9e Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 17 Feb 2022 19:45:43 +0530 Subject: [PATCH 0955/1541] disable nvimtree hijack on buffers https://github.com/kyazdani42/nvim-tree.lua/issues/992 --- lua/plugins/configs/nvimtree.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 5b0eb75..4ab14d2 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -56,6 +56,7 @@ local default = { auto_close = false, open_on_tab = false, hijack_cursor = true, + hijack_unnamed_buffer_when_opening = false, update_cwd = true, update_focused_file = { enable = true, From c1e372e2cd4723f6259aff413e063d5b4995ecc5 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Sat, 19 Feb 2022 21:21:55 -0500 Subject: [PATCH 0956/1541] fix autocmd breaking term plugins --- lua/core/autocmds.lua | 5 ++++- lua/core/default_config.lua | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index ab20601..362f0d3 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -1,3 +1,4 @@ +local settings=require("core.utils").load_config().options.nvChad -- uncomment this if you want to open nvim with a dir -- vim.cmd [[ autocmd BufEnter * if &buftype != "terminal" | lcd %:p:h | endif ]] @@ -6,7 +7,9 @@ -- vim.cmd[[ au InsertLeave * set relativenumber ]] -- Don't show any numbers inside terminals -vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype terminal ]] +if not settings.terminal_numbers then + vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype terminal ]] +end -- Don't show status line on certain windows vim.cmd [[ autocmd BufEnter,BufRead,BufWinEnter,FileType,WinEnter * lua require("core.utils").hide_statusline() ]] diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 2901cfa..876b93b 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -34,6 +34,7 @@ M.options = { copy_del = true, -- copy deleted text ( dd key ), visual and normal mode insert_nav = true, -- navigation in insertmode window_nav = true, + terminal_numbers = false, -- updater update_url = "https://github.com/NvChad/NvChad", From ceaf02e0bffe291a1377da907a5f45c78e1593bd Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 20 Feb 2022 11:44:43 +0530 Subject: [PATCH 0957/1541] replace dashboard with alpha.nvim (#816) --- lua/colors/highlights.lua | 7 ++- lua/core/default_config.lua | 12 +---- lua/core/mappings.lua | 10 ---- lua/plugins/configs/alpha.lua | 86 +++++++++++++++++++++++++++++++ lua/plugins/configs/dashboard.lua | 35 ------------- lua/plugins/configs/others.lua | 2 +- lua/plugins/init.lua | 9 ++-- 7 files changed, 95 insertions(+), 66 deletions(-) create mode 100644 lua/plugins/configs/alpha.lua delete mode 100644 lua/plugins/configs/dashboard.lua diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 13a142a..1c3dae8 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -12,6 +12,7 @@ local folder_bg = colors.folder_bg local green = colors.green local grey = colors.grey local grey_fg = colors.grey_fg +local light_grey = colors.light_grey local line = colors.line local nord_blue = colors.nord_blue local one_bg = colors.one_bg @@ -77,10 +78,8 @@ end -- [[ Plugin Highlights -- Dashboard -fg("DashboardCenter", grey_fg) -fg("DashboardFooter", grey_fg) -fg("DashboardHeader", grey_fg) -fg("DashboardShortcut", grey_fg) +fg("AlphaHeader", grey_fg) +fg("AlphaButtons", light_grey) -- Git signs fg_bg("DiffAdd", blue, "NONE") diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 876b93b..8954fa9 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -63,7 +63,7 @@ M.plugins = { bufferline = true, -- manage and preview opened buffers colorizer = false, -- color RGB, HEX, CSS, NAME color codes comment = true, -- easily (un)comment code, language aware - dashboard = false, + alpha = false, -- dashboard better_escape = true, -- map to with no lag feline = true, -- statusline gitsigns = true, @@ -95,9 +95,9 @@ M.plugins = { -- hide, show on specific filetypes hidden = { "help", - "dashboard", "NvimTree", "terminal", + "alpha", }, shown = {}, @@ -182,14 +182,6 @@ M.mappings.plugins = { toggle = "/", }, - dashboard = { - bookmarks = "bm", - new_file = "fn", -- basically create a new buffer - open = "db", -- open dashboard - session_load = "l", - session_save = "s", - }, - -- map to with no lag better_escape = { -- will still work esc_insertmode = { "jk" }, -- multiple mappings allowed diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 29557fe..90cd679 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -140,16 +140,6 @@ M.comment = function() map("v", m, ":lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())") end -M.dashboard = function() - local m = plugin_maps.dashboard - - map("n", m.bookmarks, ":DashboardJumpMarks ") - map("n", m.new_file, ":DashboardNewFile ") - map("n", m.open, ":Dashboard ") - map("n", m.session_load, ":SessionLoad ") - map("n", m.session_save, ":SessionSave ") -end - M.lspconfig = function() local m = plugin_maps.lspconfig diff --git a/lua/plugins/configs/alpha.lua b/lua/plugins/configs/alpha.lua new file mode 100644 index 0000000..7171306 --- /dev/null +++ b/lua/plugins/configs/alpha.lua @@ -0,0 +1,86 @@ +local present, alpha = pcall(require, "alpha") + +if not present then + return +end + +local ascii = { + " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", + " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", + " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", + " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", + " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", + " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", + " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", + " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", + " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", + " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", + " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", +} + +local header = { + type = "text", + val = ascii, + opts = { + position = "center", + hl = "AlphaHeader", + }, +} + +local function button(sc, txt, keybind) + local sc_ = sc:gsub("%s", ""):gsub("SPC", "") + + local opts = { + position = "center", + text = txt, + shortcut = sc, + cursor = 5, + width = 36, + align_shortcut = "right", + hl = "AlphaButtons", + } + + if keybind then + opts.keymap = { "n", sc_, keybind, { noremap = true, silent = true } } + end + + return { + type = "button", + val = txt, + on_press = function() + local key = vim.api.nvim_replace_termcodes(sc_, true, false, true) + vim.api.nvim_feedkeys(key, "normal", false) + end, + opts = opts, + } +end + +local buttons = { + type = "group", + val = { + button("SPC f f", " Find File ", ":Telescope find_files"), + button("SPC f o", " Recent File ", ":Telescope oldfiles"), + button("SPC f w", " Find Word ", ":Telescope live_grep"), + button("SPC b m", " Bookmarks ", ":Telescope marks"), + button("SPC t h", " Themes ", ":Telescope themes"), + button("SPC e s", " Settings", ":e $MYVIMRC | :cd %:p:h "), + }, + opts = { + spacing = 1, + }, +} + +local section = { + header = header, + buttons = buttons, +} + +alpha.setup { + layout = { + { type = "padding", val = 5 }, + section.header, + { type = "padding", val = 2 }, + section.buttons, + }, + opts = {}, +} diff --git a/lua/plugins/configs/dashboard.lua b/lua/plugins/configs/dashboard.lua deleted file mode 100644 index abd93e2..0000000 --- a/lua/plugins/configs/dashboard.lua +++ /dev/null @@ -1,35 +0,0 @@ -local g = vim.g - -g.dashboard_disable_at_vimenter = 0 -g.dashboard_disable_statusline = 1 -g.dashboard_default_executive = "telescope" -g.dashboard_custom_header = { - " ", - " ", - " ", - " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", - " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", - " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", - " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", - " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", - " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", - " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", - " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", - " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", - " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", - " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", - " ", -} - -g.dashboard_custom_section = { - a = { description = { " Find File SPC f f" }, command = "Telescope find_files" }, - b = { description = { " Recents SPC f o" }, command = "Telescope oldfiles" }, - c = { description = { " Find Word SPC f w" }, command = "Telescope live_grep" }, - d = { description = { "洛 New File SPC f n" }, command = "DashboardNewFile" }, - e = { description = { " Bookmarks SPC b m" }, command = "Telescope marks" }, - f = { description = { " Load Last Session SPC l " }, command = "SessionLoad" }, -} - -g.dashboard_custom_footer = { - " ", -} diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index de9ac85..99877cc 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -32,7 +32,7 @@ M.blankline = function(override_flag) filetype_exclude = { "help", "terminal", - "dashboard", + "alpha", "packer", "lspinfo", "TelescopePrompt", diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 43177b4..a6f915e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -182,12 +182,9 @@ local plugins = { }, { - "glepnir/dashboard-nvim", - disable = not plugin_settings.status.dashboard, - config = override_req("dashboard", "plugins.configs.dashboard"), - setup = function() - require("core.mappings").dashboard() - end, + disable = not plugin_settings.status.alpha, + "goolord/alpha-nvim", + config = override_req("alpha", "plugins.configs.alpha"), }, { From 76d194b1414d2351364ef1a84672e6b95110b65a Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Sat, 19 Feb 2022 22:53:34 -0500 Subject: [PATCH 0958/1541] fix for getting config settings from plugin table --- lua/core/utils.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 87f7b0e..9c16c53 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -303,6 +303,9 @@ end -- append user plugins to default plugins M.add_user_plugins = function(plugins) local user_Plugins = require("core.utils").load_config().plugins.install or {} + if type(user_Plugins) == "string" + then user_Plugins=require(user_Plugins) + end if not vim.tbl_isempty(user_Plugins) then for _, v in pairs(user_Plugins) do plugins[v[1]] = v From 05e48656deaba1d6a8fccd4cf5d4f548eefac45a Mon Sep 17 00:00:00 2001 From: Niclas Date: Mon, 21 Feb 2022 14:50:39 +0000 Subject: [PATCH 0959/1541] Fix typo, become chadributor --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index a703b18..9c923a0 100644 --- a/.github/README.md +++ b/.github/README.md @@ -133,7 +133,7 @@ Without/with Treesitter: To everyone who thinks that NvChad is bloat: Bloat means different things to everyone. -NvChad has 38 plugins installed by default, yet it is still very fast because it uses the Packer plugin manager. Packer.nvim allows you to lazy load plugins, meaning they only get loaded when absolutely required. Furthermore, you can disable plugins you don't use in `chardrc.lua`. +NvChad has 38 plugins installed by default, yet it is still very fast because it uses the Packer plugin manager. Packer.nvim allows you to lazy load plugins, meaning they only get loaded when absolutely required. Furthermore, you can disable plugins you don't use in `chadrc.lua`. From 0cf5d77f72593593c6190373520d7826051b1a72 Mon Sep 17 00:00:00 2001 From: Jay Patel <36803168+jayp0521@users.noreply.github.com> Date: Tue, 22 Feb 2022 23:09:21 -0500 Subject: [PATCH 0960/1541] feat: Run :TSUpdate on TS Install / Update https://github.com/NvChad/NvChad/pull/838 > TreeSitter recommends running `:TSUpdate` after update with TS or on (re-)installation of Treesitter. Reference example recommended by TS: https://github.com/nvim-treesitter/nvim-treesitter/wiki/Installation --- lua/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index a6f915e..960d7cf 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -67,6 +67,7 @@ local plugins = { "nvim-treesitter/nvim-treesitter", event = "BufRead", config = override_req("nvim_treesitter", "plugins.configs.treesitter", "setup"), + run = ":TSUpdate", }, -- git stuff From 5ec6112a59cab98e40847bff2e0f107cd03afb53 Mon Sep 17 00:00:00 2001 From: Ruben Verheyden Date: Sun, 27 Feb 2022 13:18:59 +0100 Subject: [PATCH 0961/1541] fix for (#844) Replace-paste at end of line incorrect --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 90cd679..70cf9c7 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -26,7 +26,7 @@ local M = {} M.misc = function() local function non_config_mappings() -- Don't copy the replaced text after pasting in visual mode - map_wrapper("v", "p", '"_dP') + map_wrapper("v", "p", 'p:let @+=@0') -- Allow moving the cursor through wrapped lines with j, k, and -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ From 1777be0064c5f24bcd1a589c5fbfe3bbd330f160 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Mon, 28 Feb 2022 04:40:14 -0500 Subject: [PATCH 0962/1541] fix for treesitter not loading on creating new file --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 960d7cf..622af9b 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -65,7 +65,7 @@ local plugins = { { "nvim-treesitter/nvim-treesitter", - event = "BufRead", + event = {"BufRead", "BufNewFile"}, config = override_req("nvim_treesitter", "plugins.configs.treesitter", "setup"), run = ":TSUpdate", }, From cb531cd90b6b062f9ece2376c736f31ea23126bd Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 1 Mar 2022 12:43:34 +0530 Subject: [PATCH 0963/1541] shorten some long mapping vars, fix (#849)| fix (#836) --- lua/core/default_config.lua | 7 +++---- lua/core/mappings.lua | 8 +++----- lua/plugins/init.lua | 4 ++-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 8954fa9..eb17228 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -123,10 +123,9 @@ M.mappings = { misc = { cheatsheet = "ch", close_buffer = "x", - copy_whole_file = "", -- copy all contents of current buffer - copy_to_system_clipboard = "", -- copy selected text (visual mode) or curent line (normal) - line_number_toggle = "n", -- toggle line number - relative_line_number_toggle = "rn", + cp_whole_file = "", -- copy all contents of current buffer + lineNR_toggle = "n", -- toggle line number + lineNR_rel_toggle = "rn", update_nvchad = "uu", new_buffer = "", new_tab = "b", diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 70cf9c7..1c0015b 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -26,7 +26,7 @@ local M = {} M.misc = function() local function non_config_mappings() -- Don't copy the replaced text after pasting in visual mode - map_wrapper("v", "p", 'p:let @+=@0') + map_wrapper("v", "p", "p:let @+=@0") -- Allow moving the cursor through wrapped lines with j, k, and -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ @@ -84,12 +84,10 @@ M.misc = function() map("n", maps.misc.cheatsheet, ":lua require('nvchad.cheatsheet').show() ") -- show keybinds map("n", maps.misc.close_buffer, ":lua require('core.utils').close_buffer() ") -- close buffer map("n", maps.misc.copy_whole_file, ":%y+ ") -- copy whole file content - map("v", maps.misc.copy_to_system_clipboard, '"+y') - map("n", maps.misc.copy_to_system_clipboard, '"+yy') -- copy curent line in normal mode map("n", maps.misc.new_buffer, ":enew ") -- new buffer map("n", maps.misc.new_tab, ":tabnew ") -- new tabs - map("n", maps.misc.line_number_toggle, ":set nu! ") -- toggle numbers - map("n", maps.misc.relative_line_number_toggle, ":set rnu! ") -- toggle relative numbers + map("n", maps.misc.lineNR_toggle, ":set nu! ") + map("n", maps.misc.lineNR_rel_toggle, ":set rnu! ") -- relative line numbers map("n", maps.misc.save_file, ":w ") -- ctrl + s to save file -- terminal mappings -- diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 622af9b..2e83bdd 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -65,7 +65,7 @@ local plugins = { { "nvim-treesitter/nvim-treesitter", - event = {"BufRead", "BufNewFile"}, + event = { "BufRead", "BufNewFile" }, config = override_req("nvim_treesitter", "plugins.configs.treesitter", "setup"), run = ":TSUpdate", }, @@ -126,7 +126,7 @@ local plugins = { "rafamadriz/friendly-snippets", module = "cmp_nvim_lsp", disable = not plugin_settings.status.cmp, - event = "InsertCharPre", + event = "InsertEnter", }, { From ac392cd29b51d48fe98ccfcd04f206680d4202cf Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 2 Mar 2022 14:36:21 +0530 Subject: [PATCH 0964/1541] misc cb531cd90b6b062f9ece2376c736f31ea23126bd --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 1c0015b..8cce437 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -83,7 +83,7 @@ M.misc = function() local function required_mappings() map("n", maps.misc.cheatsheet, ":lua require('nvchad.cheatsheet').show() ") -- show keybinds map("n", maps.misc.close_buffer, ":lua require('core.utils').close_buffer() ") -- close buffer - map("n", maps.misc.copy_whole_file, ":%y+ ") -- copy whole file content + map("n", maps.misc.cp_whole_file, ":%y+ ") -- copy whole file content map("n", maps.misc.new_buffer, ":enew ") -- new buffer map("n", maps.misc.new_tab, ":tabnew ") -- new tabs map("n", maps.misc.lineNR_toggle, ":set nu! ") From e1cdf92a01c6fe88e70abde2f0d7d3144262038d Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 2 Mar 2022 14:43:29 +0530 Subject: [PATCH 0965/1541] clean nvimtree config recently nvimtree had some updates regarding these options moving into the setup table of its config and these were the default ones so i removed it! --- lua/plugins/configs/nvimtree.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 4ab14d2..d74f4f5 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -10,14 +10,8 @@ g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names g.nvim_tree_git_hl = 0 g.nvim_tree_highlight_opened_files = 0 g.nvim_tree_indent_markers = 1 -g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" } -g.nvim_tree_window_picker_exclude = { - filetype = { "notify", "packer", "qf" }, - buftype = { "terminal" }, -} - g.nvim_tree_show_icons = { folders = 1, files = 1, From ef6ecab861cee3e5ec25d32b328d6ef654860384 Mon Sep 17 00:00:00 2001 From: Daniel Boll Date: Mon, 7 Mar 2022 10:12:32 -0300 Subject: [PATCH 0966/1541] fix(null-ls): stop null-ls prompt for multiple formaters add `client.resolved_capabilities.{document_formatting,document_range_formatting}` to on_attach of lspconfig in order to eliminate null-ls prompt for 2 formaters. Not tested with more formaters like in python, I'd say that then it'll prompt still Signed-off-by: Daniel Boll --- lua/plugins/configs/lspconfig.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 2d1273b..e3915e0 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,10 +1,12 @@ require("plugins.configs.others").lsp_handlers() -local function on_attach(_, bufnr) +local function on_attach(client, bufnr) local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end + client.resolved_capabilities.document_formatting = false + client.resolved_capabilities.document_range_formatting = false -- Enable completion triggered by buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") From 1278a3b70363cda48a464074a3ead4df668a6899 Mon Sep 17 00:00:00 2001 From: socialsmoker223 Date: Fri, 4 Mar 2022 07:53:40 +0800 Subject: [PATCH 0967/1541] Imporve luasnip Tab jump behaviour --- lua/plugins/configs/cmp.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 94944b7..02b77e9 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -37,7 +37,7 @@ local default = { behavior = cmp.ConfirmBehavior.Replace, select = true, }, - [""] = function(fallback) + [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() elseif require("luasnip").expand_or_jumpable() then @@ -45,8 +45,8 @@ local default = { else fallback() end - end, - [""] = function(fallback) + end, { "i", "s" }), + [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() elseif require("luasnip").jumpable(-1) then @@ -54,7 +54,7 @@ local default = { else fallback() end - end, + end, { "i", "s" }), }, sources = { { name = "nvim_lsp" }, From f58c7e7b9ea65ae683503578358729bc02632b92 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 12 Mar 2022 08:39:16 +0530 Subject: [PATCH 0968/1541] fix nvimtree opening half on file open (#606) --- lua/plugins/configs/nvimtree.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index d74f4f5..fc46b09 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -66,6 +66,11 @@ local default = { enable = false, ignore = false, }, + actions = { + open_file = { + resize_window = true, + }, + }, } local M = {} From 4ad0bf1b22c15e8ee1df5572504109d9899a9f51 Mon Sep 17 00:00:00 2001 From: Freyskeyd Date: Sun, 13 Mar 2022 11:38:57 +0100 Subject: [PATCH 0969/1541] Exposing on_attach to configure plugins in custom Signed-off-by: Freyskeyd --- lua/plugins/configs/lspconfig.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index e3915e0..962cfeb 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,6 +1,7 @@ +local M = {} require("plugins.configs.others").lsp_handlers() -local function on_attach(client, bufnr) +function M.on_attach(client, bufnr) local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end @@ -34,5 +35,7 @@ capabilities.textDocument.completion.completionItem.resolveSupport = { local addlsp_confs = require("core.utils").load_config().plugins.options.lspconfig.setup_lspconf if #addlsp_confs ~= 0 then - require(addlsp_confs).setup_lsp(on_attach, capabilities) + require(addlsp_confs).setup_lsp(M.on_attach, capabilities) end + +return M From ec274db8b2c2dabee1609e732d35e9935d4781dc Mon Sep 17 00:00:00 2001 From: johnsiras Date: Sat, 19 Mar 2022 12:19:54 +0800 Subject: [PATCH 0970/1541] Make the alpha override-abble. --- lua/plugins/configs/alpha.lua | 82 ++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 36 deletions(-) diff --git a/lua/plugins/configs/alpha.lua b/lua/plugins/configs/alpha.lua index 7171306..aee859f 100644 --- a/lua/plugins/configs/alpha.lua +++ b/lua/plugins/configs/alpha.lua @@ -4,29 +4,6 @@ if not present then return end -local ascii = { - " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", - " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", - " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", - " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", - " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", - " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", - " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", - " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", - " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", - " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", - " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", -} - -local header = { - type = "text", - val = ascii, - opts = { - position = "center", - hl = "AlphaHeader", - }, -} - local function button(sc, txt, keybind) local sc_ = sc:gsub("%s", ""):gsub("SPC", "") @@ -55,7 +32,32 @@ local function button(sc, txt, keybind) } end -local buttons = { +local default = {} + +default.ascii = { + " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", + " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", + " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", + " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", + " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", + " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", + " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", + " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", + " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", + " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", + " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", +} + +default.header = { + type = "text", + val = default.ascii, + opts = { + position = "center", + hl = "AlphaHeader", + }, +} + +default.buttons = { type = "group", val = { button("SPC f f", " Find File ", ":Telescope find_files"), @@ -70,17 +72,25 @@ local buttons = { }, } -local section = { - header = header, - buttons = buttons, +default.section = { + header = default.header, + buttons = default.buttons, } -alpha.setup { - layout = { - { type = "padding", val = 5 }, - section.header, - { type = "padding", val = 2 }, - section.buttons, - }, - opts = {}, -} +local M = {} +M.setup = function(override_flag) + if override_flag then + default = require("core.utils").tbl_override_req("alpha", default) + end + alpha.setup { + layout = { + { type = "padding", val = 5 }, + default.section.header, + { type = "padding", val = 2 }, + default.section.buttons, + }, + opts = {}, + } +end + +return M From 229ad7e00d19d4c3e38bc6d3c281bb5e6ed2e706 Mon Sep 17 00:00:00 2001 From: i3cheese Date: Sat, 19 Mar 2022 12:32:34 +0700 Subject: [PATCH 0971/1541] Fix j -> gj mapping. --- lua/core/mappings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 8cce437..1c61892 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -32,8 +32,8 @@ M.misc = function() -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ -- empty mode is same as using :map -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour - map_wrapper("", "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) - map_wrapper("", "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) + map_wrapper({"n", "x", "o"}, "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) + map_wrapper({"n", "x", "o"}, "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) map_wrapper("", "", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) map_wrapper("", "", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) From 75dbf5027d112c116ffc793f057ba7ade701f631 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 20 Mar 2022 07:30:30 +0530 Subject: [PATCH 0972/1541] fix dashboard not showing | (#888) --- lua/plugins/configs/alpha.lua | 12 ++++-------- lua/plugins/init.lua | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/lua/plugins/configs/alpha.lua b/lua/plugins/configs/alpha.lua index aee859f..573bbca 100644 --- a/lua/plugins/configs/alpha.lua +++ b/lua/plugins/configs/alpha.lua @@ -72,22 +72,18 @@ default.buttons = { }, } -default.section = { - header = default.header, - buttons = default.buttons, -} - local M = {} + M.setup = function(override_flag) if override_flag then default = require("core.utils").tbl_override_req("alpha", default) end alpha.setup { layout = { - { type = "padding", val = 5 }, - default.section.header, + { type = "padding", val = 9 }, + default.header, { type = "padding", val = 2 }, - default.section.buttons, + default.buttons, }, opts = {}, } diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 2e83bdd..eb7ac59 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -185,7 +185,7 @@ local plugins = { { disable = not plugin_settings.status.alpha, "goolord/alpha-nvim", - config = override_req("alpha", "plugins.configs.alpha"), + config = override_req("alpha", "plugins.configs.alpha", "setup"), }, { From 958a62bc6793abd30c66d1c5e47ddf30dcabcc57 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Wed, 23 Mar 2022 23:57:15 -0400 Subject: [PATCH 0973/1541] fix nvimtree vim globals not having any effect --- lua/plugins/configs/nvimtree.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index fc46b09..79e1781 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -1,9 +1,4 @@ -local present, nvimtree = pcall(require, "nvim-tree") - -if not present then - return -end - +-- globals must be set prior to requiring nvim-tree to function local g = vim.g g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names @@ -40,6 +35,12 @@ g.nvim_tree_icons = { }, } +local present, nvimtree = pcall(require, "nvim-tree") + +if not present then + return +end + local default = { filters = { dotfiles = false, From ec5017126c58fe38df897c621ac3841dbd8a4a3d Mon Sep 17 00:00:00 2001 From: tuberry <17917040+tuberry@users.noreply.github.com> Date: Sat, 26 Mar 2022 01:25:06 +0800 Subject: [PATCH 0974/1541] feat: support themes other than defaults Try to activate a theme if not presented in defaults. Accordingly, add the option `ui.colors` to provide the missing `hl_theme*` in the custom theme. --- lua/colors/init.lua | 30 +++++++++++++++++++++--------- lua/core/default_config.lua | 1 + 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/lua/colors/init.lua b/lua/colors/init.lua index 8927251..b3917ca 100644 --- a/lua/colors/init.lua +++ b/lua/colors/init.lua @@ -13,22 +13,34 @@ M.init = function(theme) if present then -- first load the base16 theme - base16(base16.themes(theme), true) + local ok, array = pcall(base16.themes, theme) - -- unload to force reload - package.loaded["colors.highlights" or false] = nil - -- then load the highlights - require "colors.highlights" + if ok then + base16(array, true) + -- unload to force reload + package.loaded["colors.highlights" or false] = nil + -- then load the highlights + require "colors.highlights" + else + pcall(vim.cmd, "colo " .. theme) + end + else + pcall(vim.cmd, "colo " .. theme) end end -- returns a table of colors for given or current theme M.get = function(theme) - if not theme then - theme = vim.g.nvchad_theme - end + local colors = require("core.utils").load_config().ui.colors - return require("hl_themes." .. theme) + if #colors ~= 0 then + return require(colors) + else + if not theme then + theme = vim.g.nvchad_theme + end + return require("hl_themes." .. theme) + end end return M diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index eb17228..9676a48 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -46,6 +46,7 @@ M.options = { M.ui = { hl_override = "", -- path of your file that contains highlights + colors = "", -- path of your file that contains colors italic_comments = false, theme = "onedark", -- default theme From 47e4f0361f3fd3428e2d194d113373256483ad14 Mon Sep 17 00:00:00 2001 From: tuberry <17917040+tuberry@users.noreply.github.com> Date: Sat, 26 Mar 2022 21:38:45 +0800 Subject: [PATCH 0975/1541] fix: let `hl_override` be compatible with custom themes load `hl_override` after the theme --- lua/colors/highlights.lua | 5 ----- lua/colors/init.lua | 10 ++++++++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 1c3dae8..d9f2616 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -1,6 +1,5 @@ local cmd = vim.cmd -local override = require("core.utils").load_config().ui.hl_override local colors = require("colors").get() local ui = require("core.utils").load_config().ui @@ -167,7 +166,3 @@ if ui.transparency then fg("TelescopeBorder", one_bg) fg_bg("TelescopeResultsTitle", black, blue) end - -if #override ~= 0 then - require(override) -end diff --git a/lua/colors/init.lua b/lua/colors/init.lua index b3917ca..a41533b 100644 --- a/lua/colors/init.lua +++ b/lua/colors/init.lua @@ -1,3 +1,6 @@ +local colors = require("core.utils").load_config().ui.colors +local override = require("core.utils").load_config().ui.hl_override + local M = {} -- if theme given, load given theme if given, otherwise nvchad_theme @@ -27,12 +30,15 @@ M.init = function(theme) else pcall(vim.cmd, "colo " .. theme) end + + if #override ~= 0 then + package.loaded[override] = nil + require(override) + end end -- returns a table of colors for given or current theme M.get = function(theme) - local colors = require("core.utils").load_config().ui.colors - if #colors ~= 0 then return require(colors) else From 6e9c78d1af88ec25722a69ecc04dfe8a731119eb Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 26 Mar 2022 22:20:39 +0530 Subject: [PATCH 0976/1541] avoid using default keymap (#910) --- lua/core/default_config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 9676a48..fe0fa89 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -124,7 +124,7 @@ M.mappings = { misc = { cheatsheet = "ch", close_buffer = "x", - cp_whole_file = "", -- copy all contents of current buffer + cp_whole_file = "", -- copy all contents of current buffer lineNR_toggle = "n", -- toggle line number lineNR_rel_toggle = "rn", update_nvchad = "uu", From b9e8f489edc49767a7dae697aa0e1ab379ca14f1 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 28 Mar 2022 21:20:14 +0530 Subject: [PATCH 0977/1541] add new readme badges for matrix and telegram --- .github/README.md | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/.github/README.md b/.github/README.md index 9c923a0..88a287b 100644 --- a/.github/README.md +++ b/.github/README.md @@ -11,31 +11,21 @@ Extras

- +
- -[![Lua](https://img.shields.io/badge/Made%20with%20Lua-blueviolet.svg?style=for-the-badge&logo=lua)](https://lua.org) - -
- -
- -[![Super Linter](https://img.shields.io/github/workflow/status/NvChad/NvChad/Super-Linter/main?style=flat-square&logo=github&label=Build&color=green)]() -GitHub repository size + +[![Super Linter](https://img.shields.io/github/workflow/status/NvChad/NvChad/Super-Linter/main?style=flat-square&logo=github&label=Build&color=8DBBE9)]() License +[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.6.1-blueviolet.svg?style=flat-square&logo=Neovim&color=90E59A&logoColor=white)](https://github.com/neovim/neovim) +[![GitHub Issues](https://img.shields.io/github/issues/NvChad/NvChad.svg?style=flat-square&label=Issues&color=d77982)](https://github.com/NvChad/NvChad/issues) [![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/gADmkJb9Fb) -[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.6.1-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white)](https://github.com/neovim/neovim) -[![GitHub Issues](https://img.shields.io/github/issues/NvChad/NvChad.svg?style=flat-square&label=Issues&color=fc0330)](https://github.com/NvChad/NvChad/issues) -[![Last Commit](https://img.shields.io/github/last-commit/NvChad/NvChad.svg?style=flat-square&label=Last%20Commit&color=58eb34)](https://github.com/NvChad/NvChad/pulse) +[![Matrix](https://img.shields.io/badge/Matrix-40aa8b.svg?style=flat-square&logo=Matrix&logoColor=white)](https://matrix.to/#/#nvchad:matrix.org) +[![Telegram](https://img.shields.io/badge/Telegram-blue.svg?style=flat-square&logo=Telegram&logoColor=white)](https://t.me/DE_WM)
From 1face444b83c89fc5a411e07462bd359d4db4e2b Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Sun, 20 Mar 2022 17:22:16 -0400 Subject: [PATCH 0978/1541] change plugin init to config terminal on load extensions, change mappings to use new chadterm --- lua/core/mappings.lua | 21 +++++++++++++++++---- lua/plugins/init.lua | 8 +++++++- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 1c61892..9e44b7f 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -6,6 +6,7 @@ local map_wrapper = utils.map local maps = config.mappings local plugin_maps = maps.plugins local nvChad_options = config.options.nvChad +local terminal_options = config.options.terminal local cmd = vim.cmd @@ -95,14 +96,26 @@ M.misc = function() -- get out of terminal mode map("t", term_maps.esc_termmode, "") -- hide a term from within terminal mode - map("t", term_maps.esc_hide_termmode, " :lua require('core.utils').close_buffer() ") + map("t", term_maps.esc_hide_termmode, "lua require('nvchad.terminal').hide() ") -- pick a hidden term map("n", term_maps.pick_term, ":Telescope terms ") -- Open terminals -- TODO this opens on top of an existing vert/hori term, fixme - map("n", term_maps.new_horizontal, ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert ") - map("n", term_maps.new_vertical, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert ") - map("n", term_maps.new_window, ":execute 'terminal' | let b:term_type = 'wind' | startinsert ") + map( + { "n", "t" }, + term_maps.new_horizontal, + "lua require('nvchad.terminal').new_or_toggle('horizontal', " + .. tostring(terminal_options.window.split_height) + .. ")" + ) + map( + { "n", "t" }, + term_maps.new_vertical, + "lua require('nvchad.terminal').new_or_toggle('vertical', " + .. tostring(terminal_options.window.vsplit_width) + .. ")" + ) + --map("n", term_maps.new_window, "") not supported yet -- terminal mappings end -- -- Add Packer commands because we are not loading it at startup diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index eb7ac59..25e7989 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -8,7 +8,6 @@ end local override_req = require("core.utils").override_req local plugins = { - { "NvChad/extensions" }, { "nvim-lua/plenary.nvim" }, { "lewis6991/impatient.nvim" }, { "nathom/filetype.nvim" }, @@ -18,6 +17,13 @@ local plugins = { event = "VimEnter", }, + { + "NvChad/extensions", + config = function () + vim.schedule_wrap(require("nvchad.terminal").init()) + end + }, + { "NvChad/nvim-base16.lua", after = "packer.nvim", From e328b86336b9fd9cb2c09e10e298392f1705b257 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Sun, 20 Mar 2022 17:22:36 -0400 Subject: [PATCH 0979/1541] add terminal customizations options to default config --- lua/core/default_config.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index fe0fa89..4562f6a 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -40,6 +40,15 @@ M.options = { update_url = "https://github.com/NvChad/NvChad", update_branch = "main", }, + terminal = { + behavior = { + close_on_exit = true, + }, + window = { + vsplit_ratio = 0.5, + split_ratio = 0.3, + }, + }, } ---- UI ----- From 4ca8d781cfaf53fcd6fd95933280e62c27574d12 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 31 Mar 2022 12:52:23 +0530 Subject: [PATCH 0980/1541] add option to enable inbuilt plugins (#919) (#914) --- lua/core/default_config.lua | 23 +++++++++++++++++++++++ lua/core/options.lua | 22 ++-------------------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 4562f6a..80b23a7 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -67,6 +67,29 @@ M.ui = { ---- PLUGIN OPTIONS ---- M.plugins = { + + -- builtin nvim plugins are disabled + builtins = { + "2html_plugin", + "getscript", + "getscriptPlugin", + "gzip", + "logipat", + "netrw", + "netrwPlugin", + "netrwSettings", + "netrwFileHandlers", + "matchit", + "tar", + "tarPlugin", + "rrhelper", + "spellfile_plugin", + "vimball", + "vimballPlugin", + "zip", + "zipPlugin", + }, + -- enable/disable plugins (false for disable) status = { blankline = true, -- indentline stuff diff --git a/lua/core/options.lua b/lua/core/options.lua index f8436a8..06f669c 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -48,26 +48,7 @@ opt.whichwrap:append "<>[]hl" g.mapleader = options.mapleader -- disable some builtin vim plugins -local disabled_built_ins = { - "2html_plugin", - "getscript", - "getscriptPlugin", - "gzip", - "logipat", - "netrw", - "netrwPlugin", - "netrwSettings", - "netrwFileHandlers", - "matchit", - "tar", - "tarPlugin", - "rrhelper", - "spellfile_plugin", - "vimball", - "vimballPlugin", - "zip", - "zipPlugin", -} +local disabled_built_ins = require("core.utils").load_config().plugins.builtins for _, plugin in pairs(disabled_built_ins) do g["loaded_" .. plugin] = 1 @@ -75,6 +56,7 @@ end --Defer loading shada until after startup_ vim.opt.shadafile = "NONE" + vim.schedule(function() vim.opt.shadafile = require("core.utils").load_config().options.shadafile vim.cmd [[ silent! rsh ]] From 63d54926a4a80e289d4c49cda70ab7b18cfa64d2 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 1 Apr 2022 11:47:05 +0530 Subject: [PATCH 0981/1541] add mappings to spawn nobufflisted terms --- lua/core/default_config.lua | 9 +++++++-- lua/core/mappings.lua | 15 ++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 80b23a7..16ad154 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -196,10 +196,15 @@ M.mappings = { -- show & recover hidden terminal buffers in a telescope picker pick_term = "W", - -- spawn terminals + -- spawn a single terminal and toggle it + -- this just works like toggleterm kinda new_horizontal = "h", new_vertical = "v", - new_window = "w", + + -- spawn new terminals + spawn_horizontal = "H", + spawn_vertical = "V", + spawn_window = "w", }, } diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 9e44b7f..edb60c2 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -33,8 +33,8 @@ M.misc = function() -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ -- empty mode is same as using :map -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour - map_wrapper({"n", "x", "o"}, "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) - map_wrapper({"n", "x", "o"}, "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) + map_wrapper({ "n", "x", "o" }, "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) + map_wrapper({ "n", "x", "o" }, "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) map_wrapper("", "", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) map_wrapper("", "", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) @@ -115,7 +115,16 @@ M.misc = function() .. tostring(terminal_options.window.vsplit_width) .. ")" ) - --map("n", term_maps.new_window, "") not supported yet + + -- spawns terminals + map( + "n", + term_maps.spawn_horizontal, + ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert " + ) + map("n", term_maps.spawn_vertical, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert ") + map("n", term_maps.new_window, ":execute 'terminal' | let b:term_type = 'wind' | startinsert ") + -- terminal mappings end -- -- Add Packer commands because we are not loading it at startup From bf89f0bf5f93759d0750ad2321929e64b54b69bc Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 1 Apr 2022 12:54:37 +0530 Subject: [PATCH 0982/1541] fix typo in mapping --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index edb60c2..4c89b2f 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -123,7 +123,7 @@ M.misc = function() ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert " ) map("n", term_maps.spawn_vertical, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert ") - map("n", term_maps.new_window, ":execute 'terminal' | let b:term_type = 'wind' | startinsert ") + map("n", term_maps.spawn_window, ":execute 'terminal' | let b:term_type = 'wind' | startinsert ") -- terminal mappings end -- From af22bee84a01a5f70dda90aeab19b8954dbeb562 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 1 Apr 2022 13:06:14 +0530 Subject: [PATCH 0983/1541] use previous split ratio for horizontal term buffer --- lua/core/default_config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 16ad154..06a53ec 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -46,7 +46,7 @@ M.options = { }, window = { vsplit_ratio = 0.5, - split_ratio = 0.3, + split_ratio = 0.4, }, }, } From 232b453c29715dc569fcec4fac29c8c434d1a7e0 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 1 Apr 2022 19:36:29 +0530 Subject: [PATCH 0984/1541] avoid using default mapping for copying --- lua/core/default_config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 06a53ec..ffa363c 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -156,7 +156,7 @@ M.mappings = { misc = { cheatsheet = "ch", close_buffer = "x", - cp_whole_file = "", -- copy all contents of current buffer + cp_whole_file = "", -- copy all contents of current buffer lineNR_toggle = "n", -- toggle line number lineNR_rel_toggle = "rn", update_nvchad = "uu", From 03563f30cc36c96562a945bfd6bcd21d6b0d62de Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Sat, 2 Apr 2022 03:51:33 -0400 Subject: [PATCH 0985/1541] add new location option for chadterm --- lua/core/default_config.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index ffa363c..2647d12 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -48,6 +48,10 @@ M.options = { vsplit_ratio = 0.5, split_ratio = 0.4, }, + location = { + horizontal = "rightbelow", + vertical = "rightbelow", + }, }, } From b21defd4e4d901bbb3615f02d510f8027dd54aa6 Mon Sep 17 00:00:00 2001 From: "Arman.H" Date: Thu, 7 Apr 2022 10:32:03 +0430 Subject: [PATCH 0986/1541] refactor: remove unnecessary mapping --- lua/core/mappings.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 4c89b2f..449013e 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -42,9 +42,6 @@ M.misc = function() map_wrapper("n", "", ":noh ") -- center cursor when moving (goto_definition) - - -- yank from current cursor to end of line - map_wrapper("n", "Y", "yg$") end local function optional_mappings() From d7522a940d3f0eb5c0b7d2c591f7900d89170569 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Fri, 8 Apr 2022 23:04:35 -0400 Subject: [PATCH 0987/1541] add disable option for statusline hide au --- lua/core/autocmds.lua | 4 +++- lua/core/default_config.lua | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index 362f0d3..7d83b74 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -12,7 +12,9 @@ if not settings.terminal_numbers then end -- Don't show status line on certain windows -vim.cmd [[ autocmd BufEnter,BufRead,BufWinEnter,FileType,WinEnter * lua require("core.utils").hide_statusline() ]] +if not require("core.utils").load_config().plugins.options.statusline.hide_disable then + vim.cmd [[ autocmd BufEnter,BufRead,BufWinEnter,FileType,WinEnter * lua require("core.utils").hide_statusline() ]] +end -- Open a file from its last left off position -- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 2647d12..6fc3676 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -129,6 +129,7 @@ M.plugins = { snippet_path = {}, }, statusline = { + hide_disable = false, -- hide, show on specific filetypes hidden = { "help", From 4a888ad03748d00e41f6a210994b5dd55a2c35e8 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Sat, 9 Apr 2022 01:32:27 -0400 Subject: [PATCH 0988/1541] add float term mappings and config --- lua/core/default_config.lua | 9 +++++++++ lua/core/mappings.lua | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 6fc3676..32e0d5a 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -51,6 +51,14 @@ M.options = { location = { horizontal = "rightbelow", vertical = "rightbelow", + float = { + relative = 'editor', + row = 0.3, + col = 0.25, + width = 0.5, + height = 0.4, + border = "single", + } }, }, } @@ -205,6 +213,7 @@ M.mappings = { -- this just works like toggleterm kinda new_horizontal = "h", new_vertical = "v", + new_float = "", -- spawn new terminals spawn_horizontal = "H", diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 449013e..ea0cafa 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -112,6 +112,11 @@ M.misc = function() .. tostring(terminal_options.window.vsplit_width) .. ")" ) + map( + { "n", "t" }, + term_maps.new_float, + "lua require('nvchad.terminal').new_or_toggle('float')" + ) -- spawns terminals map( From cbc813388d15ae71aaf531b7e044f0f9c7105e17 Mon Sep 17 00:00:00 2001 From: justin-f-perez Date: Sat, 9 Apr 2022 18:38:19 -0500 Subject: [PATCH 0989/1541] override default branch for bufferline By default packer tries to use "master" for the branch of any plugin that doesn't have a branch explicitly defined. However, the bufferline authors recently renamed their default branch from "master" to main. Thus, packer will work fine with bufferline for any new clones, but it will fail to update for anyone who had the old branch name "master" set. See also: https://github.com/wbthomason/packer.nvim/issues/86 --- lua/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 25e7989..1e15ef7 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -47,6 +47,7 @@ local plugins = { { "akinsho/bufferline.nvim", + branch = "main", disable = not plugin_settings.status.bufferline, after = "nvim-web-devicons", config = override_req("bufferline", "plugins.configs.bufferline", "setup"), From 3585ae3dfd0eefc1ea15e8ba7670cc490da91a55 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 10 Apr 2022 15:42:46 +0530 Subject: [PATCH 0990/1541] use better keybinds for spawning terms --- lua/core/default_config.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 32e0d5a..7e4b9ed 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -216,8 +216,8 @@ M.mappings = { new_float = "", -- spawn new terminals - spawn_horizontal = "H", - spawn_vertical = "V", + spawn_horizontal = "", + spawn_vertical = "", spawn_window = "w", }, } From 3d78ef347425a90456cbba3a1375a1574bd9a00f Mon Sep 17 00:00:00 2001 From: guoliang Date: Sun, 10 Apr 2022 20:10:47 +0800 Subject: [PATCH 0991/1541] fix: insert mode nav shortcut --- lua/core/default_config.lua | 4 ++-- lua/core/mappings.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 7e4b9ed..4123f4b 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -184,8 +184,8 @@ M.mappings = { backward = "", end_of_line = "", forward = "", - next_line = "", - prev_line = "", + next_line = "", + prev_line = "", beginning_of_line = "", }, diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index ea0cafa..d310f2e 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -62,8 +62,8 @@ M.misc = function() map("i", inav.backward, "") map("i", inav.end_of_line, "") map("i", inav.forward, "") - map("i", inav.next_line, "") - map("i", inav.prev_line, "") + map("i", inav.next_line, "") + map("i", inav.prev_line, "") map("i", inav.beginning_of_line, "^i") end From 6061f9455d0354b7c2cb7583ecb94a361c50630e Mon Sep 17 00:00:00 2001 From: Justin Perez Date: Sun, 10 Apr 2022 06:06:05 -0500 Subject: [PATCH 0992/1541] Typecheck return value of chadrc; propagate errors * Don't blindly assume the only way `require "custom/chadrc.lua" can fail is that the file doesn't exist. * Provide user with a more useful message when return value is wrong --- lua/core/utils.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 9c16c53..bfda660 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -141,12 +141,16 @@ end M.load_config = function() local conf = require "core.default_config" - local chadrcExists, change = pcall(require, "custom.chadrc") - - -- if chadrc exists , then merge its table into the default config's - - if chadrcExists then - conf = vim.tbl_deep_extend("force", conf, change) + -- attempt to load and merge a user config + local chadrc_exists = vim.fn.filereadable(vim.fn.stdpath "config" .. "/lua/custom/chadrc.lua") == 1 + if chadrc_exists then + -- merge user config if it exists and is a table; otherwise display an error + local user_config = require "custom.chadrc" + if type(user_config) == 'table' then + conf = vim.tbl_deep_extend("force", conf, user_config) + else + error("User config (chadrc.lua) *must* return a table!") + end end return conf From bc05e4be0864af19935b70dc6b31947998a38206 Mon Sep 17 00:00:00 2001 From: c-my Date: Mon, 11 Apr 2022 01:06:46 +0800 Subject: [PATCH 0993/1541] fix: move option "nvim_tree_indent_markers" to setup --- lua/plugins/configs/nvimtree.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 79e1781..a93a102 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -4,7 +4,6 @@ local g = vim.g g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names g.nvim_tree_git_hl = 0 g.nvim_tree_highlight_opened_files = 0 -g.nvim_tree_indent_markers = 1 g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" } g.nvim_tree_show_icons = { @@ -72,6 +71,11 @@ local default = { resize_window = true, }, }, + renderer = { + indent_markers = { + enable = true, + } + } } local M = {} From 1c8a677024179b966ba2ab420e6edbe8dfda146b Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Thu, 14 Apr 2022 13:57:11 -0400 Subject: [PATCH 0994/1541] Fix #938 --- lua/plugins/configs/others.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 99877cc..3a86715 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -18,11 +18,15 @@ M.autopairs = function(override_flag) end end -M.better_escape = function() - require("better_escape").setup { - mapping = chadrc_config.mappings.plugins.better_escape.esc_insertmode, - timeout = chadrc_config.plugins.options.esc_insertmode_timeout, +M.better_escape = function(override_flag) + local default = { + mapping = chadrc_config.mappings.plugins.better_escape.esc_insertmode, + timeout = chadrc_config.plugins.options.esc_insertmode_timeout, } + if override_flag then + default = require("core.utils").tbl_override_req("better_escape", default) + end + require("better_escape").setup(default) end M.blankline = function(override_flag) From d906bb0d9c05cb328732595af8552418880dee7b Mon Sep 17 00:00:00 2001 From: Sidhanth Rathod Date: Fri, 22 Apr 2022 08:23:40 +0530 Subject: [PATCH 0995/1541] EVERYONE CHECK THE PINNED ISSUE ASAP!!! --- init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.lua b/init.lua index 22177d0..425185d 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,6 @@ +-- REMOVE THIS LATER +print("EMERGENCY: GUYS CHECK THE PINNED ISSUE ASAP!") + local present, impatient = pcall(require, "impatient") if present then From adecbe719f14e852346dbf672d50776e4789355b Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 27 Apr 2022 21:12:28 +0530 Subject: [PATCH 0996/1541] BREAKING CHANGE | re-implementation of custom config --- examples/init.lua | 6 +- init.lua | 8 +- lua/colors/highlights.lua | 25 +-- lua/core/autocmds.lua | 11 - lua/core/default_config.lua | 250 +-------------------- lua/core/mappings.lua | 335 ++++++++++++++--------------- lua/core/options.lua | 80 ++++--- lua/core/utils.lua | 289 +++++-------------------- lua/plugins/configs/alpha.lua | 37 ++-- lua/plugins/configs/bufferline.lua | 94 ++++---- lua/plugins/configs/cmp.lua | 23 +- lua/plugins/configs/icons.lua | 74 +++---- lua/plugins/configs/lspconfig.lua | 1 + lua/plugins/configs/nvimtree.lua | 34 ++- lua/plugins/configs/nvterm.lua | 43 ++++ lua/plugins/configs/others.lua | 234 ++++++++++---------- lua/plugins/configs/statusline.lua | 321 ++++++++++++--------------- lua/plugins/configs/telescope.lua | 30 ++- lua/plugins/configs/treesitter.lua | 15 +- lua/plugins/init.lua | 234 ++++++++++---------- 20 files changed, 835 insertions(+), 1309 deletions(-) create mode 100644 lua/plugins/configs/nvterm.lua diff --git a/examples/init.lua b/examples/init.lua index a6b3d5c..721f625 100644 --- a/examples/init.lua +++ b/examples/init.lua @@ -1,6 +1,4 @@ --- Please check NvChad docs if you're totally new to nvchad + dont know lua!! --- This is an example init file in /lua/custom/ --- this init.lua can load stuffs etc too so treat it like your ~/.config/nvim/ +-- example file i.e lua/custom/init.lua -- MAPPINGS local map = require("core.utils").map @@ -8,4 +6,4 @@ local map = require("core.utils").map map("n", "cc", ":Telescope ") map("n", "q", ":q ") --- NOTE: the 4th argument in the map function is be a table i.e options but its most likely un-needed so dont worry about it +-- require("my autocmds file") or just declare them here diff --git a/init.lua b/init.lua index 425185d..96afe05 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,3 @@ --- REMOVE THIS LATER -print("EMERGENCY: GUYS CHECK THE PINNED ISSUE ASAP!") - local present, impatient = pcall(require, "impatient") if present then @@ -20,15 +17,14 @@ for _, module in ipairs(core_modules) do end end --- non plugin mappings -require("core.mappings").misc() - -- check if custom init.lua file exists if vim.fn.filereadable(vim.fn.stdpath "config" .. "/lua/custom/init.lua") == 1 then -- try to call custom init, if not successful, show error local ok, err = pcall(require, "custom") + if not ok then vim.notify("Error loading custom/init.lua\n\n" .. err) end + return end diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index d9f2616..c97c64f 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -30,11 +30,7 @@ local fg_bg = require("core.utils").fg_bg local bg = require("core.utils").bg -- Comments -if ui.italic_comments then - fg("Comment", grey_fg .. " gui=italic") -else - fg("Comment", grey_fg) -end +fg("Comment", grey_fg) -- Disable cursor line cmd "hi clear CursorLine" @@ -128,25 +124,6 @@ fg_bg("TelescopeResultsTitle", darker_black, darker_black) bg("TelescopeSelection", black2) --- keybinds cheatsheet - -fg_bg("CheatsheetBorder", black, black) -bg("CheatsheetSectionContent", black) -fg("CheatsheetHeading", white) - -local section_title_colors = { - white, - blue, - red, - green, - yellow, - purple, - orange, -} -for i, color in ipairs(section_title_colors) do - vim.cmd("highlight CheatsheetTitle" .. i .. " guibg = " .. color .. " guifg=" .. black) -end - -- Disable some highlight in nvim tree if transparency enabled if ui.transparency then bg("NormalFloat", "NONE") diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index 7d83b74..b74f61b 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -1,4 +1,3 @@ -local settings=require("core.utils").load_config().options.nvChad -- uncomment this if you want to open nvim with a dir -- vim.cmd [[ autocmd BufEnter * if &buftype != "terminal" | lcd %:p:h | endif ]] @@ -6,16 +5,6 @@ local settings=require("core.utils").load_config().options.nvChad -- vim.cmd[[ au InsertEnter * set norelativenumber ]] -- vim.cmd[[ au InsertLeave * set relativenumber ]] --- Don't show any numbers inside terminals -if not settings.terminal_numbers then - vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype terminal ]] -end - --- Don't show status line on certain windows -if not require("core.utils").load_config().plugins.options.statusline.hide_disable then - vim.cmd [[ autocmd BufEnter,BufRead,BufWinEnter,FileType,WinEnter * lua require("core.utils").hide_statusline() ]] -end - -- Open a file from its last left off position -- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] -- File extension specific tabbing diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 4123f4b..6515d83 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -1,279 +1,51 @@ -- IMPORTANT NOTE : This is default config, so dont change anything here. --- use custom/chadrc.lua instead +-- chadrc overrides this file local M = {} M.options = { - -- custom = {} - -- general nvim/vim options , check :h optionname to know more about an option - clipboard = "unnamedplus", - cmdheight = 1, - ruler = false, - hidden = true, - ignorecase = true, - smartcase = true, - mapleader = " ", - mouse = "a", - number = true, - numberwidth = 2, - relativenumber = false, - expandtab = true, - shiftwidth = 2, - smartindent = true, - tabstop = 8, - timeoutlen = 400, - updatetime = 250, - undofile = true, - fillchars = { eob = " " }, - shadafile = vim.opt.shadafile, + path = "", -- path to file that overrides core.options -- NvChad options nvChad = { - copy_cut = true, -- copy cut text ( x key ), visual and normal mode - copy_del = true, -- copy deleted text ( dd key ), visual and normal mode - insert_nav = true, -- navigation in insertmode - window_nav = true, - terminal_numbers = false, - -- updater update_url = "https://github.com/NvChad/NvChad", update_branch = "main", }, - terminal = { - behavior = { - close_on_exit = true, - }, - window = { - vsplit_ratio = 0.5, - split_ratio = 0.4, - }, - location = { - horizontal = "rightbelow", - vertical = "rightbelow", - float = { - relative = 'editor', - row = 0.3, - col = 0.25, - width = 0.5, - height = 0.4, - border = "single", - } - }, - }, } ---- UI ----- M.ui = { - hl_override = "", -- path of your file that contains highlights + hl_override = "", colors = "", -- path of your file that contains colors - italic_comments = false, theme = "onedark", -- default theme - - -- Change terminal bg to nvim theme's bg color so it'll match well - -- For Ex : if you have onedark set in nvchad, set onedark's bg color on your terminal transparency = false, } ----- PLUGIN OPTIONS ---- - M.plugins = { + override = {}, - -- builtin nvim plugins are disabled - builtins = { - "2html_plugin", - "getscript", - "getscriptPlugin", - "gzip", - "logipat", - "netrw", - "netrwPlugin", - "netrwSettings", - "netrwFileHandlers", - "matchit", - "tar", - "tarPlugin", - "rrhelper", - "spellfile_plugin", - "vimball", - "vimballPlugin", - "zip", - "zipPlugin", - }, - - -- enable/disable plugins (false for disable) - status = { - blankline = true, -- indentline stuff - bufferline = true, -- manage and preview opened buffers - colorizer = false, -- color RGB, HEX, CSS, NAME color codes - comment = true, -- easily (un)comment code, language aware - alpha = false, -- dashboard - better_escape = true, -- map to with no lag - feline = true, -- statusline - gitsigns = true, - lspsignature = true, -- lsp enhancements - vim_matchup = true, -- improved matchit - cmp = true, - nvimtree = true, - autopairs = true, - }, options = { packer = { init_file = "plugins.packerInit", }, - autopairs = { loadAfter = "nvim-cmp" }, - cmp = { - lazy_load = true, - }, lspconfig = { - setup_lspconf = "", -- path of file containing setups of different lsps - }, - nvimtree = { - -- packerCompile required after changing lazy_load - lazy_load = true, - }, - luasnip = { - snippet_path = {}, + setup_lspconf = "", -- path of lspconfig file }, statusline = { - hide_disable = false, - -- hide, show on specific filetypes - hidden = { - "help", - "NvimTree", - "terminal", - "alpha", - }, - shown = {}, - - -- truncate statusline on small screens - shortline = true, - style = "default", -- default, round , slant , block , arrow + style = "default", -- default/round/slant/block/arrow }, - esc_insertmode_timeout = 300, }, - default_plugin_config_replace = {}, - default_plugin_remove = {}, - install = nil, + + -- add, modify, remove plugins + user = {}, } --- Don't use a single keymap twice - ---- MAPPINGS ---- - --- non plugin +-- non plugin only M.mappings = { - -- custom = {}, -- custom user mappings - - misc = { - cheatsheet = "ch", - close_buffer = "x", - cp_whole_file = "", -- copy all contents of current buffer - lineNR_toggle = "n", -- toggle line number - lineNR_rel_toggle = "rn", - update_nvchad = "uu", - new_buffer = "", - new_tab = "b", - save_file = "", -- save file using :w - }, - - -- navigation in insert mode, only if enabled in options - - insert_nav = { - backward = "", - end_of_line = "", - forward = "", - next_line = "", - prev_line = "", - beginning_of_line = "", - }, - - -- better window movement - window_nav = { - moveLeft = "", - moveRight = "", - moveUp = "", - moveDown = "", - }, - - -- terminal related mappings - terminal = { - -- multiple mappings can be given for esc_termmode, esc_hide_termmode - - -- get out of terminal mode - esc_termmode = { "jk" }, - - -- get out of terminal mode and hide it - esc_hide_termmode = { "JK" }, - -- show & recover hidden terminal buffers in a telescope picker - pick_term = "W", - - -- spawn a single terminal and toggle it - -- this just works like toggleterm kinda - new_horizontal = "h", - new_vertical = "v", - new_float = "", - - -- spawn new terminals - spawn_horizontal = "", - spawn_vertical = "", - spawn_window = "w", - }, -} - --- plugins related mappings --- To disable a mapping, equate the variable to "" or false or nil in chadrc -M.mappings.plugins = { - bufferline = { - next_buffer = "", - prev_buffer = "", - }, - comment = { - toggle = "/", - }, - - -- map to with no lag - better_escape = { -- will still work - esc_insertmode = { "jk" }, -- multiple mappings allowed - }, - - lspconfig = { - declaration = "gD", - definition = "gd", - hover = "K", - implementation = "gi", - signature_help = "gk", - add_workspace_folder = "wa", - remove_workspace_folder = "wr", - list_workspace_folders = "wl", - type_definition = "D", - rename = "ra", - code_action = "ca", - references = "gr", - float_diagnostics = "ge", - goto_prev = "[d", - goto_next = "]d", - set_loclist = "q", - formatting = "fm", - }, - - nvimtree = { - toggle = "", - focus = "e", - }, - - telescope = { - buffers = "fb", - find_files = "ff", - find_hiddenfiles = "fa", - git_commits = "cm", - git_status = "gt", - help_tags = "fh", - live_grep = "fw", - oldfiles = "fo", - themes = "th", -- NvChad theme picker - }, + misc = nil, } return M diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index d310f2e..f32d1c3 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -1,207 +1,200 @@ local utils = require "core.utils" local config = utils.load_config() -local map_wrapper = utils.map +local map = utils.map + +local user_cmd = vim.api.nvim_create_user_command -local maps = config.mappings -local plugin_maps = maps.plugins local nvChad_options = config.options.nvChad -local terminal_options = config.options.terminal + +local mappings = config.mappings local cmd = vim.cmd -- This is a wrapper function made to disable a plugin mapping from chadrc -- If keys are nil, false or empty string, then the mapping will be not applied -- Useful when one wants to use that keymap for any other purpose -local map = function(...) - local keys = select(2, ...) - if not keys or keys == "" then - return + +-- Don't copy the replaced text after pasting in visual mode +map("v", "p", "p:let @+=@0") + +-- Allow moving the cursor through wrapped lines with j, k, and +-- http ://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ +-- empty mode is same as using :map +-- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour + +map({ "n", "x", "o" }, "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) +map({ "n", "x", "o" }, "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) +map("", "", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) +map("", "", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) + +-- use ESC to turn off search highlighting +map("n", "", " :noh ") + +-- move cursor within insert mode +map("i", "", "") +map("i", "", "") +map("i", "", "") +map("i", "", "") +map("i", "", "") +map("i", "", "^i") + +-- navigation between windows +map("n", "", "h") +map("n", "", "l") +map("n", "", "k") +map("n", "", "j") + +map("n", "x", function() + require("core.utils").close_buffer() +end) + +map("n", "", " :%y+ ") -- copy whole file content +map("n", "", " :enew ") -- new buffer +map("n", "b", " :tabnew ") -- new tabs +map("n", "n", " :set nu! ") +map("n", "rn", " :set rnu! ") -- relative line numbers +map("n", "", " :w ") -- ctrl + s to save file + +-- terminal mappings + +-- get out of terminal mode +map("t", { "jk" }, "") + +-- hide a term from within terminal mode +map("t", { "JK" }, function() + require("nvchad.terminal").hide() +end) + +-- Add Packer commands because we are not loading it at startup + +local packer_cmd = function(callback) + return function() + require "plugins" + require("packer")[callback]() end - map_wrapper(...) +end + +user_cmd("PackerClean", packer_cmd "clean", {}) +user_cmd("PackerCompile", packer_cmd "compile", {}) +user_cmd("PackerInstall", packer_cmd "install", {}) +user_cmd("PackerStatus", packer_cmd "status", {}) +user_cmd("PackerSync", packer_cmd "sync", {}) +user_cmd("PackerUpdate", packer_cmd "update", {}) + +-- add NvChadUpdate command and mapping +cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" +map("n", "uu", " :NvChadUpdate ") + +-- load overriden misc mappings + +if mappings.misc ~= nil and type(mappings.misc) == "function" then + mappings.misc() end local M = {} --- these mappings will only be called during initialization -M.misc = function() - local function non_config_mappings() - -- Don't copy the replaced text after pasting in visual mode - map_wrapper("v", "p", "p:let @+=@0") - - -- Allow moving the cursor through wrapped lines with j, k, and - -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ - -- empty mode is same as using :map - -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour - map_wrapper({ "n", "x", "o" }, "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) - map_wrapper({ "n", "x", "o" }, "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) - map_wrapper("", "", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) - map_wrapper("", "", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) - - -- use ESC to turn off search highlighting - map_wrapper("n", "", ":noh ") - - -- center cursor when moving (goto_definition) - end - - local function optional_mappings() - -- don't yank text on cut ( x ) - if not nvChad_options.copy_cut then - map_wrapper({ "n", "v" }, "x", '"_x') - end - - -- don't yank text on delete ( dd ) - if not nvChad_options.copy_del then - map_wrapper({ "n", "v" }, "d", '"_d') - end - - -- navigation within insert mode - if nvChad_options.insert_nav then - local inav = maps.insert_nav - - map("i", inav.backward, "") - map("i", inav.end_of_line, "") - map("i", inav.forward, "") - map("i", inav.next_line, "") - map("i", inav.prev_line, "") - map("i", inav.beginning_of_line, "^i") - end - - -- easier navigation between windows - if nvChad_options.window_nav then - local wnav = maps.window_nav - - map("n", wnav.moveLeft, "h") - map("n", wnav.moveRight, "l") - map("n", wnav.moveUp, "k") - map("n", wnav.moveDown, "j") - end - end - - local function required_mappings() - map("n", maps.misc.cheatsheet, ":lua require('nvchad.cheatsheet').show() ") -- show keybinds - map("n", maps.misc.close_buffer, ":lua require('core.utils').close_buffer() ") -- close buffer - map("n", maps.misc.cp_whole_file, ":%y+ ") -- copy whole file content - map("n", maps.misc.new_buffer, ":enew ") -- new buffer - map("n", maps.misc.new_tab, ":tabnew ") -- new tabs - map("n", maps.misc.lineNR_toggle, ":set nu! ") - map("n", maps.misc.lineNR_rel_toggle, ":set rnu! ") -- relative line numbers - map("n", maps.misc.save_file, ":w ") -- ctrl + s to save file - - -- terminal mappings -- - local term_maps = maps.terminal - -- get out of terminal mode - map("t", term_maps.esc_termmode, "") - -- hide a term from within terminal mode - map("t", term_maps.esc_hide_termmode, "lua require('nvchad.terminal').hide() ") - -- pick a hidden term - map("n", term_maps.pick_term, ":Telescope terms ") - -- Open terminals - -- TODO this opens on top of an existing vert/hori term, fixme - map( - { "n", "t" }, - term_maps.new_horizontal, - "lua require('nvchad.terminal').new_or_toggle('horizontal', " - .. tostring(terminal_options.window.split_height) - .. ")" - ) - map( - { "n", "t" }, - term_maps.new_vertical, - "lua require('nvchad.terminal').new_or_toggle('vertical', " - .. tostring(terminal_options.window.vsplit_width) - .. ")" - ) - map( - { "n", "t" }, - term_maps.new_float, - "lua require('nvchad.terminal').new_or_toggle('float')" - ) - - -- spawns terminals - map( - "n", - term_maps.spawn_horizontal, - ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert " - ) - map("n", term_maps.spawn_vertical, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert ") - map("n", term_maps.spawn_window, ":execute 'terminal' | let b:term_type = 'wind' | startinsert ") - - -- terminal mappings end -- - - -- Add Packer commands because we are not loading it at startup - cmd "silent! command PackerClean lua require 'plugins' require('packer').clean()" - cmd "silent! command PackerCompile lua require 'plugins' require('packer').compile()" - cmd "silent! command PackerInstall lua require 'plugins' require('packer').install()" - cmd "silent! command PackerStatus lua require 'plugins' require('packer').status()" - cmd "silent! command PackerSync lua require 'plugins' require('packer').sync()" - cmd "silent! command PackerUpdate lua require 'plugins' require('packer').update()" - - -- add NvChadUpdate command and mapping - cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" - map("n", maps.misc.update_nvchad, ":NvChadUpdate ") - end - - non_config_mappings() - optional_mappings() - required_mappings() -end - -- below are all plugin related mappings M.bufferline = function() - local m = plugin_maps.bufferline - - map("n", m.next_buffer, ":BufferLineCycleNext ") - map("n", m.prev_buffer, ":BufferLineCyclePrev ") + map("n", "", " :BufferLineCycleNext ") + map("n", "", " :BufferLineCyclePrev ") end M.comment = function() - local m = plugin_maps.comment.toggle - map("n", m, ":lua require('Comment.api').toggle_current_linewise()") - map("v", m, ":lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())") + map("n", "/", " :lua require('Comment.api').toggle_current_linewise()") + map("v", "/", " :lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())") end M.lspconfig = function() - local m = plugin_maps.lspconfig + -- See ` :help vim.lsp.*` for documentation on any of the below functions + map("n", "gD", function() + vim.lsp.buf.declaration() + end) - -- See `:help vim.lsp.*` for documentation on any of the below functions - map("n", m.declaration, "lua vim.lsp.buf.declaration()") - map("n", m.definition, "lua vim.lsp.buf.definition()") - map("n", m.hover, "lua vim.lsp.buf.hover()") - map("n", m.implementation, "lua vim.lsp.buf.implementation()") - map("n", m.signature_help, "lua vim.lsp.buf.signature_help()") - map("n", m.add_workspace_folder, "lua vim.lsp.buf.add_workspace_folder()") - map("n", m.remove_workspace_folder, "lua vim.lsp.buf.remove_workspace_folder()") - map("n", m.list_workspace_folders, "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))") - map("n", m.type_definition, "lua vim.lsp.buf.type_definition()") - map("n", m.rename, "lua vim.lsp.buf.rename()") - map("n", m.code_action, "lua vim.lsp.buf.code_action()") - map("n", m.references, "lua vim.lsp.buf.references()") - map("n", m.float_diagnostics, "lua vim.diagnostic.open_float()") - map("n", m.goto_prev, "lua vim.diagnostic.goto_prev()") - map("n", m.goto_next, "lua vim.diagnostic.goto_next()") - map("n", m.set_loclist, "lua vim.diagnostic.setloclist()") - map("n", m.formatting, "lua vim.lsp.buf.formatting()") + map("n", "gd", function() + vim.lsp.buf.definition() + end) + + map("n", "K", function() + vim.lsp.buf.hover() + end) + + map("n", "gi", function() + vim.lsp.buf.implementation() + end) + + map("n", "", function() + vim.lsp.buf.signature_help() + end) + + map("n", "D", function() + vim.lsp.buf.type_definition() + end) + + map("n", "ra", function() + vim.lsp.buf.rename() + end) + + map("n", "ca", function() + vim.lsp.buf.code_action() + end) + + map("n", "gr", function() + vim.lsp.buf.references() + end) + + map("n", "f", function() + vim.diagnostic.open_float() + end) + + map("n", "[d", function() + vim.diagnostic.goto_prev() + end) + + map("n", "d]", function() + vim.diagnostic.goto_next() + end) + + map("n", "q", function() + vim.diagnostic.setloclist() + end) + + map("n", "fm", function() + vim.lsp.buf.formatting() + end) + + map("n", "wa", function() + vim.lsp.buf.add_workspace_folder() + end) + + map("n", "wr", function() + vim.lsp.buf.remove_workspace_folder() + end) + + map("n", "wl", function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end) end M.nvimtree = function() - map("n", plugin_maps.nvimtree.toggle, ":NvimTreeToggle ") - map("n", plugin_maps.nvimtree.focus, ":NvimTreeFocus ") + map("n", "", " :NvimTreeToggle ") + map("n", "e", " :NvimTreeFocus ") end M.telescope = function() - local m = plugin_maps.telescope + map("n", "fb", " :Telescope buffers ") + map("n", "ff", " :Telescope find_files ") + map("n", "fa", " :Telescope find_files follow=true no_ignore=true hidden=true ") + map("n", "cm", " :Telescope git_commits ") + map("n", "gt", " :Telescope git_status ") + map("n", "fh", " :Telescope help_tags ") + map("n", "fw", " :Telescope live_grep ") + map("n", "fo", " :Telescope oldfiles ") + map("n", "th", " :Telescope themes ") - map("n", m.buffers, ":Telescope buffers ") - map("n", m.find_files, ":Telescope find_files ") - map("n", m.find_hiddenfiles, ":Telescope find_files follow=true no_ignore=true hidden=true ") - map("n", m.git_commits, ":Telescope git_commits ") - map("n", m.git_status, ":Telescope git_status ") - map("n", m.help_tags, ":Telescope help_tags ") - map("n", m.live_grep, ":Telescope live_grep ") - map("n", m.oldfiles, ":Telescope oldfiles ") - map("n", m.themes, ":Telescope themes ") + -- pick a hidden term + map("n", "W", " :Telescope terms ") end return M diff --git a/lua/core/options.lua b/lua/core/options.lua index 06f669c..6b731b4 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -1,31 +1,34 @@ local opt = vim.opt local g = vim.g -local options = require("core.utils").load_config().options +-- use filetype.lua instead of filetype.vim +g.did_load_filetypes = 0 +g.do_filetype_lua = 1 +opt.laststatus = 3 -- global statusline opt.title = true -opt.clipboard = options.clipboard -opt.cmdheight = options.cmdheight +opt.clipboard = "unnamedplus" +opt.cmdheight = 1 opt.cul = true -- cursor line -- Indentline -opt.expandtab = options.expandtab -opt.shiftwidth = options.shiftwidth -opt.smartindent = options.smartindent +opt.expandtab = true +opt.shiftwidth = 2 +opt.smartindent = true -- disable tilde on end of buffer: https://github.com/neovim/neovim/pull/8546#issuecomment-643643758 -opt.fillchars = options.fillchars +opt.fillchars = { eob = " " } -opt.hidden = options.hidden -opt.ignorecase = options.ignorecase -opt.smartcase = options.smartcase -opt.mouse = options.mouse +opt.hidden = true +opt.ignorecase = true +opt.smartcase = true +opt.mouse = "a" -- Numbers -opt.number = options.number -opt.numberwidth = options.numberwidth -opt.relativenumber = options.relativenumber -opt.ruler = options.ruler +opt.number = true +opt.numberwidth = 2 +opt.relativenumber = false +opt.ruler = false -- disable nvim intro opt.shortmess:append "sI" @@ -33,31 +36,54 @@ opt.shortmess:append "sI" opt.signcolumn = "yes" opt.splitbelow = true opt.splitright = true -opt.tabstop = options.tabstop +opt.tabstop = 8 opt.termguicolors = true -opt.timeoutlen = options.timeoutlen -opt.undofile = options.undofile +opt.timeoutlen = 400 +opt.undofile = true -- interval for writing swap file to disk, also used by gitsigns -opt.updatetime = options.updatetime +opt.updatetime = 250 -- go to previous/next line with h,l,left arrow and right arrow -- when cursor reaches end/beginning of line opt.whichwrap:append "<>[]hl" - -g.mapleader = options.mapleader +g.mapleader = " " -- disable some builtin vim plugins -local disabled_built_ins = require("core.utils").load_config().plugins.builtins -for _, plugin in pairs(disabled_built_ins) do +local default_plugins = { + "2html_plugin", + "getscript", + "getscriptPlugin", + "gzip", + "logipat", + "netrw", + "netrwPlugin", + "netrwSettings", + "netrwFileHandlers", + "matchit", + "tar", + "tarPlugin", + "rrhelper", + "spellfile_plugin", + "vimball", + "vimballPlugin", + "zip", + "zipPlugin", +} + +for _, plugin in pairs(default_plugins) do g["loaded_" .. plugin] = 1 end ---Defer loading shada until after startup_ -vim.opt.shadafile = "NONE" - vim.schedule(function() - vim.opt.shadafile = require("core.utils").load_config().options.shadafile + vim.opt.shadafile = "NONE" vim.cmd [[ silent! rsh ]] end) + +-- load user options if the file exists + +local load_ifExists = require("core.utils").load_ifExists +local user_options = require("core.utils").load_config().options.path + +load_ifExists(user_options) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index bfda660..7ebb577 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -1,141 +1,13 @@ local M = {} local cmd = vim.cmd + M.close_buffer = function(force) - -- This is a modification of a NeoVim plugin from - -- Author: ojroques - Olivier Roques - -- Src: https://github.com/ojroques/nvim-bufdel - -- (Author has okayed copy-paste) - - -- Options - local opts = { - next = "cycle", -- how to retrieve the next buffer - quit = false, -- exit when last buffer is deleted - --TODO make this a chadrc flag/option - } - - -- ---------------- - -- Helper functions - -- ---------------- - - -- Switch to buffer 'buf' on each window from list 'windows' - local function switch_buffer(windows, buf) - local cur_win = vim.fn.winnr() - for _, winid in ipairs(windows) do - winid = tonumber(winid) or 0 - vim.cmd(string.format("%d wincmd w", vim.fn.win_id2win(winid))) - vim.cmd(string.format("buffer %d", buf)) - end - vim.cmd(string.format("%d wincmd w", cur_win)) -- return to original window - end - - -- Select the first buffer with a number greater than given buffer - local function get_next_buf(buf) - local next = vim.fn.bufnr "#" - if opts.next == "alternate" and vim.fn.buflisted(next) == 1 then - return next - end - for i = 0, vim.fn.bufnr "$" - 1 do - next = (buf + i) % vim.fn.bufnr "$" + 1 -- will loop back to 1 - if vim.fn.buflisted(next) == 1 then - return next - end - end - end - - -- ---------------- - -- End helper functions - -- ---------------- - - local buf = vim.fn.bufnr() - if vim.fn.buflisted(buf) == 0 then -- exit if buffer number is invalid - vim.cmd "close" - return - end - - if #vim.fn.getbufinfo { buflisted = 1 } < 2 then - if opts.quit then - -- exit when there is only one buffer left - if force then - vim.cmd "qall!" - else - vim.cmd "confirm qall" - end - return - end - - local chad_term, _ = pcall(function() - return vim.api.nvim_buf_get_var(buf, "term_type") - end) - - if chad_term then - -- Must be a window type - vim.cmd(string.format("setlocal nobl", buf)) - vim.cmd "enew" - return - end - -- don't exit and create a new empty buffer - vim.cmd "enew" - vim.cmd "bp" - end - - local next_buf = get_next_buf(buf) - local windows = vim.fn.getbufinfo(buf)[1].windows - - -- force deletion of terminal buffers to avoid the prompt - if force or vim.fn.getbufvar(buf, "&buftype") == "terminal" then - local chad_term, type = pcall(function() - return vim.api.nvim_buf_get_var(buf, "term_type") - end) - - -- TODO this scope is error prone, make resilient - if chad_term then - if type == "wind" then - -- hide from bufferline - vim.cmd(string.format("%d bufdo setlocal nobl", buf)) - -- switch to another buff - -- TODO switch to next buffer, this works too - vim.cmd "BufferLineCycleNext" - else - local cur_win = vim.fn.winnr() - -- we can close this window - vim.cmd(string.format("%d wincmd c", cur_win)) - return - end - else - switch_buffer(windows, next_buf) - vim.cmd(string.format("bd! %d", buf)) - end + if force or not vim.bo.buflisted then + cmd ":bd!" else - switch_buffer(windows, next_buf) - vim.cmd(string.format("silent! confirm bd %d", buf)) + cmd "bd" end - -- revert buffer switches if user has canceled deletion - if vim.fn.buflisted(buf) == 1 then - switch_buffer(windows, buf) - end -end - --- hide statusline --- tables fetched from load_config function -M.hide_statusline = function() - local hidden = require("core.utils").load_config().plugins.options.statusline.hidden - local shown = require("core.utils").load_config().plugins.options.statusline.shown - local api = vim.api - local buftype = api.nvim_buf_get_option(0, "ft") - - -- shown table from config has the highest priority - if vim.tbl_contains(shown, buftype) then - api.nvim_set_option("laststatus", 2) - return - end - - if vim.tbl_contains(hidden, buftype) then - api.nvim_set_option("laststatus", 0) - return - end - - api.nvim_set_option("laststatus", 2) end M.load_config = function() @@ -146,10 +18,10 @@ M.load_config = function() if chadrc_exists then -- merge user config if it exists and is a table; otherwise display an error local user_config = require "custom.chadrc" - if type(user_config) == 'table' then + if type(user_config) == "table" then conf = vim.tbl_deep_extend("force", conf, user_config) else - error("User config (chadrc.lua) *must* return a table!") + error "User config (chadrc.lua) *must* return a table!" end end @@ -158,52 +30,19 @@ end M.map = function(mode, keys, command, opt) local options = { noremap = true, silent = true } + if opt then options = vim.tbl_extend("force", options, opt) end - -- all valid modes allowed for mappings - -- :h map-modes - local valid_modes = { - [""] = true, - ["n"] = true, - ["v"] = true, - ["s"] = true, - ["x"] = true, - ["o"] = true, - ["!"] = true, - ["i"] = true, - ["l"] = true, - ["c"] = true, - ["t"] = true, - } - - -- helper function for M.map - -- can gives multiple modes and keys - local function map_wrapper(sub_mode, lhs, rhs, sub_options) - if type(lhs) == "table" then - for _, key in ipairs(lhs) do - map_wrapper(sub_mode, key, rhs, sub_options) - end - else - if type(sub_mode) == "table" then - for _, m in ipairs(sub_mode) do - map_wrapper(m, lhs, rhs, sub_options) - end - else - if valid_modes[sub_mode] and lhs and rhs then - vim.api.nvim_set_keymap(sub_mode, lhs, rhs, sub_options) - else - sub_mode, lhs, rhs = sub_mode or "", lhs or "", rhs or "" - print( - "Cannot set mapping [ mode = '" .. sub_mode .. "' | key = '" .. lhs .. "' | cmd = '" .. rhs .. "' ]" - ) - end - end + if type(keys) == "table" then + for _, keymap in ipairs(keys) do + M.map(mode, keymap, command, opt) end + return end - map_wrapper(mode, keys, command, options) + vim.keymap.set(mode, keys, command, opt) end -- load plugin after entering vim ui @@ -241,81 +80,49 @@ M.fg_bg = function(group, fgcol, bgcol) cmd("hi " .. group .. " guifg=" .. fgcol .. " guibg=" .. bgcol) end --- Override default config of a plugin based on the path provided in the chadrc --- Arguments: --- 1st - name of plugin --- 2nd - default config path --- 3rd - optional function name which will called from default_config path --- e.g: if given args - "telescope", "plugins.configs.telescope", "setup" --- then return "require('plugins.configs.telescope').setup()" --- if 3rd arg not given, then return "require('plugins.configs.telescope')" --- if override is a table, mark set the override flag for the default config to true --- override flag being true tells the plugin to call tbl_override_req as part of configuration +M.load_ifExists = function(module) + if #module ~= 0 then + if type(module) == "string" then + require(module) -M.override_req = function(name, default_config, config_function) - local override, apply_table_override = - require("core.utils").load_config().plugins.default_plugin_config_replace[name], "false" - local result = default_config - if type(override) == "string" and override ~= "" then - return "require('" .. override .. "')" - elseif type(override) == "table" then - apply_table_override = "true" - elseif type(override) == "function" then - return override - end - - result = "('" .. result .. "')" - if type(config_function) == "string" and config_function ~= "" then - -- add the . to call the functions and concatenate true or false as argument - result = result .. "." .. config_function .. "(" .. apply_table_override .. ")" - end - - return "require" .. result -end - --- Override parts of default config of a plugin based on the table provided in the chadrc - --- FUNCTION: tbl_override_req, use `chadrc` plugin config override to modify default config if present --- name = name inside `default_config` / `chadrc` --- default_table = the default configuration table of the plugin --- returns the modified configuration table -M.tbl_override_req = function(name, default_table) - local override = require("core.utils").load_config().plugins.default_plugin_config_replace[name] or {} - return vim.tbl_deep_extend("force", default_table, override) -end - ---provide labels to plugins instead of integers -M.label_plugins = function(plugins) - local plugins_labeled = {} - for _, plugin in ipairs(plugins) do - plugins_labeled[plugin[1]] = plugin - end - return plugins_labeled -end - --- remove plugins specified by user from the plugins table -M.remove_default_plugins = function(plugins) - local removals = require("core.utils").load_config().plugins.default_plugin_remove or {} - if not vim.tbl_isempty(removals) then - for _, plugin in pairs(removals) do - plugins[plugin] = nil + -- file[1] = module & file[2] = function + elseif type(module) == "table" then + require(module[1])[module[2]]() end end - return plugins end --- append user plugins to default plugins -M.add_user_plugins = function(plugins) - local user_Plugins = require("core.utils").load_config().plugins.install or {} - if type(user_Plugins) == "string" - then user_Plugins=require(user_Plugins) +-- merge default/user plugin tables + +M.plugin_list = function(default_plugins) + local user_plugins = require("core.utils").load_config().plugins.user + local plug_override = require("core.default_config").plugins.override + + -- merge default + user plugin table + default_plugins = vim.tbl_deep_extend("force", default_plugins, user_plugins) + + local final_table = {} + + for key, _ in pairs(default_plugins) do + default_plugins[key][1] = key + + final_table[#final_table + 1] = default_plugins[key] + plug_override[#plug_override + 1] = default_plugins[key] end - if not vim.tbl_isempty(user_Plugins) then - for _, v in pairs(user_Plugins) do - plugins[v[1]] = v - end + + return final_table +end + +M.load_override = function(default_table, plugin_name) + local user_table = require("core.utils").load_config().plugins.override[plugin_name] + + if type(user_table) == "table" then + default_table = vim.tbl_deep_extend("force", default_table, user_table) + else + default_table = default_table end - return plugins + + return default_table end return M diff --git a/lua/plugins/configs/alpha.lua b/lua/plugins/configs/alpha.lua index 573bbca..8a29061 100644 --- a/lua/plugins/configs/alpha.lua +++ b/lua/plugins/configs/alpha.lua @@ -32,9 +32,9 @@ local function button(sc, txt, keybind) } end -local default = {} +local options = {} -default.ascii = { +local ascii = { " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", @@ -48,16 +48,16 @@ default.ascii = { " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", } -default.header = { +options.header = { type = "text", - val = default.ascii, + val = ascii, opts = { position = "center", hl = "AlphaHeader", }, } -default.buttons = { +options.buttons = { type = "group", val = { button("SPC f f", " Find File ", ":Telescope find_files"), @@ -72,21 +72,14 @@ default.buttons = { }, } -local M = {} +options = require("core.utils").load_override(options, "goolord/alpha-nvim") -M.setup = function(override_flag) - if override_flag then - default = require("core.utils").tbl_override_req("alpha", default) - end - alpha.setup { - layout = { - { type = "padding", val = 9 }, - default.header, - { type = "padding", val = 2 }, - default.buttons, - }, - opts = {}, - } -end - -return M +alpha.setup { + layout = { + { type = "padding", val = 9 }, + options.header, + { type = "padding", val = 2 }, + options.buttons, + }, + opts = {}, +} diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 98557fd..3c127bc 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -3,10 +3,9 @@ if not present then return end -local default = { - colors = require("colors").get(), -} -default = { +local colors = require("colors").get() + +local options = { options = { offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, buffer_close_icon = "", @@ -46,103 +45,98 @@ default = { highlights = { background = { - guifg = default.colors.grey_fg, - guibg = default.colors.black2, + guifg = colors.grey_fg, + guibg = colors.black2, }, -- buffers buffer_selected = { - guifg = default.colors.white, - guibg = default.colors.black, + guifg = colors.white, + guibg = colors.black, gui = "bold", }, buffer_visible = { - guifg = default.colors.light_grey, - guibg = default.colors.black2, + guifg = colors.light_grey, + guibg = colors.black2, }, -- for diagnostics = "nvim_lsp" error = { - guifg = default.colors.light_grey, - guibg = default.colors.black2, + guifg = colors.light_grey, + guibg = colors.black2, }, error_diagnostic = { - guifg = default.colors.light_grey, - guibg = default.colors.black2, + guifg = colors.light_grey, + guibg = colors.black2, }, -- close buttons close_button = { - guifg = default.colors.light_grey, - guibg = default.colors.black2, + guifg = colors.light_grey, + guibg = colors.black2, }, close_button_visible = { - guifg = default.colors.light_grey, - guibg = default.colors.black2, + guifg = colors.light_grey, + guibg = colors.black2, }, close_button_selected = { - guifg = default.colors.red, - guibg = default.colors.black, + guifg = colors.red, + guibg = colors.black, }, fill = { - guifg = default.colors.grey_fg, - guibg = default.colors.black2, + guifg = colors.grey_fg, + guibg = colors.black2, }, indicator_selected = { - guifg = default.colors.black, - guibg = default.colors.black, + guifg = colors.black, + guibg = colors.black, }, -- modified modified = { - guifg = default.colors.red, - guibg = default.colors.black2, + guifg = colors.red, + guibg = colors.black2, }, modified_visible = { - guifg = default.colors.red, - guibg = default.colors.black2, + guifg = colors.red, + guibg = colors.black2, }, modified_selected = { - guifg = default.colors.green, - guibg = default.colors.black, + guifg = colors.green, + guibg = colors.black, }, -- separators separator = { - guifg = default.colors.black2, - guibg = default.colors.black2, + guifg = colors.black2, + guibg = colors.black2, }, separator_visible = { - guifg = default.colors.black2, - guibg = default.colors.black2, + guifg = colors.black2, + guibg = colors.black2, }, separator_selected = { - guifg = default.colors.black2, - guibg = default.colors.black2, + guifg = colors.black2, + guibg = colors.black2, }, -- tabs tab = { - guifg = default.colors.light_grey, - guibg = default.colors.one_bg3, + guifg = colors.light_grey, + guibg = colors.one_bg3, }, tab_selected = { - guifg = default.colors.black2, - guibg = default.colors.nord_blue, + guifg = colors.black2, + guibg = colors.nord_blue, }, tab_close = { - guifg = default.colors.red, - guibg = default.colors.black, + guifg = colors.red, + guibg = colors.black, }, }, } -local M = {} -M.setup = function(override_flag) - if override_flag then - default = require("core.utils").tbl_override_req("bufferline", default) - end - bufferline.setup(default) -end +-- check for any override +options = require("core.utils").load_override(options, "akinsho/bufferline.nvim") -return M +bufferline.setup(options) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 02b77e9..7d02520 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -6,7 +6,7 @@ end vim.opt.completeopt = "menuone,noselect" -local default = { +local options = { snippet = { expand = function(args) require("luasnip").lsp_expand(args.body) @@ -45,7 +45,10 @@ local default = { else fallback() end - end, { "i", "s" }), + end, { + "i", + "s", + }), [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() @@ -54,7 +57,10 @@ local default = { else fallback() end - end, { "i", "s" }), + end, { + "i", + "s", + }), }, sources = { { name = "nvim_lsp" }, @@ -65,12 +71,7 @@ local default = { }, } -local M = {} -M.setup = function(override_flag) - if override_flag then - default = require("core.utils").tbl_override_req("nvim_cmp", default) - end - cmp.setup(default) -end +-- check for any override +-- options = require("core.utils").load_override(options, "cmp") -return M +cmp.setup(options) diff --git a/lua/plugins/configs/icons.lua b/lua/plugins/configs/icons.lua index 4f23dd9..d765ec9 100644 --- a/lua/plugins/configs/icons.lua +++ b/lua/plugins/configs/icons.lua @@ -1,158 +1,152 @@ -local present, icons = pcall(require, "nvim-web-devicons") +local present, devicons = pcall(require, "nvim-web-devicons") + if not present then return end -local default = { - colors = require("colors").get(), -} +local colors = require("colors").get() -default = { +local options = { override = { c = { icon = "", - color = default.colors.blue, + color = colors.blue, name = "c", }, css = { icon = "", - color = default.colors.blue, + color = colors.blue, name = "css", }, deb = { icon = "", - color = default.colors.cyan, + color = colors.cyan, name = "deb", }, Dockerfile = { icon = "", - color = default.colors.cyan, + color = colors.cyan, name = "Dockerfile", }, html = { icon = "", - color = default.colors.baby_pink, + color = colors.baby_pink, name = "html", }, jpeg = { icon = "", - color = default.colors.dark_purple, + color = colors.dark_purple, name = "jpeg", }, jpg = { icon = "", - color = default.colors.dark_purple, + color = colors.dark_purple, name = "jpg", }, js = { icon = "", - color = default.colors.sun, + color = colors.sun, name = "js", }, kt = { icon = "󱈙", - color = default.colors.orange, + color = colors.orange, name = "kt", }, lock = { icon = "", - color = default.colors.red, + color = colors.red, name = "lock", }, lua = { icon = "", - color = default.colors.blue, + color = colors.blue, name = "lua", }, mp3 = { icon = "", - color = default.colors.white, + color = colors.white, name = "mp3", }, mp4 = { icon = "", - color = default.colors.white, + color = colors.white, name = "mp4", }, out = { icon = "", - color = default.colors.white, + color = colors.white, name = "out", }, png = { icon = "", - color = default.colors.dark_purple, + color = colors.dark_purple, name = "png", }, py = { icon = "", - color = default.colors.cyan, + color = colors.cyan, name = "py", }, ["robots.txt"] = { icon = "ﮧ", - color = default.colors.red, + color = colors.red, name = "robots", }, toml = { icon = "", - color = default.colors.blue, + color = colors.blue, name = "toml", }, ts = { icon = "ﯤ", - color = default.colors.teal, + color = colors.teal, name = "ts", }, ttf = { icon = "", - color = default.colors.white, + color = colors.white, name = "TrueTypeFont", }, rb = { icon = "", - color = default.colors.pink, + color = colors.pink, name = "rb", }, rpm = { icon = "", - color = default.colors.orange, + color = colors.orange, name = "rpm", }, vue = { icon = "﵂", - color = default.colors.vibrant_green, + color = colors.vibrant_green, name = "vue", }, woff = { icon = "", - color = default.colors.white, + color = colors.white, name = "WebOpenFontFormat", }, woff2 = { icon = "", - color = default.colors.white, + color = colors.white, name = "WebOpenFontFormat2", }, xz = { icon = "", - color = default.colors.sun, + color = colors.sun, name = "xz", }, zip = { icon = "", - color = default.colors.sun, + color = colors.sun, name = "zip", }, }, } -local M = {} -M.setup = function(override_flag) - if override_flag then - default = require("core.utils").tbl_override_req("nvim_web_devicons", default) - end - icons.setup(default) -end +-- check for any override +-- options = require("core.utils").load_override(options, "nvim_web_devicons") -return M +devicons.setup(options) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 962cfeb..5d6452a 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,4 +1,5 @@ local M = {} + require("plugins.configs.others").lsp_handlers() function M.on_attach(client, bufnr) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index a93a102..2276248 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -1,8 +1,14 @@ +local present, nvimtree = pcall(require, "nvim-tree") + +if not present then + return +end + -- globals must be set prior to requiring nvim-tree to function local g = vim.g g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names -g.nvim_tree_git_hl = 0 +g.nvim_tree_git_hl = 1 g.nvim_tree_highlight_opened_files = 0 g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" } @@ -34,20 +40,13 @@ g.nvim_tree_icons = { }, } -local present, nvimtree = pcall(require, "nvim-tree") - -if not present then - return -end - -local default = { +local options = { filters = { dotfiles = false, }, disable_netrw = true, hijack_netrw = true, ignore_ft_on_setup = { "dashboard" }, - auto_close = false, open_on_tab = false, hijack_cursor = true, hijack_unnamed_buffer_when_opening = false, @@ -57,7 +56,6 @@ local default = { update_cwd = false, }, view = { - allow_resize = true, side = "left", width = 25, hide_root_folder = true, @@ -74,17 +72,11 @@ local default = { renderer = { indent_markers = { enable = true, - } - } + }, + }, } -local M = {} +-- check for any override +options = require("core.utils").load_override(options, "kyazdani42/nvim-tree.lua") -M.setup = function(override_flag) - if override_flag then - default = require("core.utils").tbl_override_req("nvim_tree", default) - end - nvimtree.setup(default) -end - -return M +nvimtree.setup(options) diff --git a/lua/plugins/configs/nvterm.lua b/lua/plugins/configs/nvterm.lua new file mode 100644 index 0000000..720b6d2 --- /dev/null +++ b/lua/plugins/configs/nvterm.lua @@ -0,0 +1,43 @@ +local present, nvterm = pcall(require, "nvterm") + +if not present then + return +end + +local options = { + terminals = { + list = {}, + type_opts = { + float = { + relative = "editor", + row = 0.3, + col = 0.25, + width = 0.5, + height = 0.4, + border = "single", + }, + horizontal = { location = "rightbelow", split_ratio = 0.3 }, + vertical = { location = "rightbelow", split_ratio = 0.5 }, + }, + }, + behavior = { + close_on_exit = true, + auto_insert = true, + }, + mappings = { + toggle = { + float = "", + horizontal = "", + vertical = "", + }, + new = { + horizontal = "h", + vertical = "v", + }, + }, + enable_new_mappings = true, +} + +options = require("core.utils").load_override(options, "NvChad/nvterm") + +nvterm.setup(options) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 3a86715..bad0b63 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -1,36 +1,49 @@ local M = {} -local chadrc_config = require("core.utils").load_config() - -M.autopairs = function(override_flag) +M.autopairs = function() local present1, autopairs = pcall(require, "nvim-autopairs") - local present2, cmp_autopairs = pcall(require, "nvim-autopairs.completion.cmp") + local present2, cmp = pcall(require, "cmp") - if present1 and present2 then - local default = { fast_wrap = {} } - if override_flag then - default = require("core.utils").tbl_override_req("nvim_autopairs", default) - end - autopairs.setup(default) - - local cmp = require "cmp" - cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) + if not present1 and present2 then + return end -end -M.better_escape = function(override_flag) - local default = { - mapping = chadrc_config.mappings.plugins.better_escape.esc_insertmode, - timeout = chadrc_config.plugins.options.esc_insertmode_timeout, + autopairs.setup { + fast_wrap = {}, + disable_filetype = { "TelescopePrompt", "vim" }, } - if override_flag then - default = require("core.utils").tbl_override_req("better_escape", default) - end - require("better_escape").setup(default) + + local cmp_autopairs = require "nvim-autopairs.completion.cmp" + + cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) end -M.blankline = function(override_flag) - local default = { +M.better_escape = function() + local present, escape = pcall(require, "better_escape") + + if not present then + return + end + + local options = { + mapping = { "jk" }, -- a table with mappings to use + timeout = vim.o.timeoutlen, + clear_empty_lines = false, -- clear line after escaping if there is only whitespace + keys = "", + } + + options = require("core.utils").load_override(options, "max397574/better-escape.nvim") + escape.setup(options) +end + +M.blankline = function() + local present, blankline = pcall(require, "indent_blankline") + + if not present then + return + end + + local options = { indentLine_enabled = 1, char = "▏", filetype_exclude = { @@ -49,93 +62,97 @@ M.blankline = function(override_flag) show_trailing_blankline_indent = false, show_first_indent_level = false, } - if override_flag then - default = require("core.utils").tbl_override_req("indent_blankline", default) - end - require("indent_blankline").setup(default) + + options = require("core.utils").load_override(options, "lukas-reineke/indent-blankline.nvim") + blankline.setup(options) end -M.colorizer = function(override_flag) +M.colorizer = function() local present, colorizer = pcall(require, "colorizer") - if present then - local default = { - filetypes = { - "*", - }, - user_default_options = { - RGB = true, -- #RGB hex codes - RRGGBB = true, -- #RRGGBB hex codes - names = false, -- "Name" codes like Blue - RRGGBBAA = false, -- #RRGGBBAA hex codes - rgb_fn = false, -- CSS rgb() and rgba() functions - hsl_fn = false, -- CSS hsl() and hsla() functions - css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB - css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn - -- Available modes: foreground, background - mode = "background", -- Set the display mode. - }, - } - if override_flag then - default = require("core.utils").tbl_override_req("nvim_colorizer", default) - end - colorizer.setup(default["filetypes"], default["user_default_options"]) - vim.cmd "ColorizerReloadAllBuffers" + if not present then + return end + + local options = { + filetypes = { + "*", + }, + user_default_options = { + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + names = false, -- "Name" codes like Blue + RRGGBBAA = false, -- #RRGGBBAA hex codes + rgb_fn = false, -- CSS rgb() and rgba() functions + hsl_fn = false, -- CSS hsl() and hsla() functions + css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn + + -- Available modes: foreground, background + mode = "background", -- Set the display mode. + }, + } + + options = require("core.utils").load_override(options, "NvChad/nvim-colorizer.lua") + + colorizer.setup(options["filetypes"], options["user_default_options"]) + vim.cmd "ColorizerReloadAllBuffers" end -M.comment = function(override_flag) +M.comment = function() local present, nvim_comment = pcall(require, "Comment") - if present then - local default = {} - if override_flag then - default = require("core.utils").tbl_override_req("nvim_comment", default) - end - nvim_comment.setup(default) + + if not present then + return end + + nvim_comment.setup() end -M.luasnip = function(override_flag) +M.luasnip = function() local present, luasnip = pcall(require, "luasnip") + if present then - local default = { - history = true, - updateevents = "TextChanged,TextChangedI", - } - if override_flag then - default = require("core.utils").tbl_override_req("luasnip", default) - end - luasnip.config.set_config(default) - require("luasnip/loaders/from_vscode").load { paths = chadrc_config.plugins.options.luasnip.snippet_path } - require("luasnip/loaders/from_vscode").load() + return end + + luasnip.config.set_config { + history = true, + updateevents = "TextChanged,TextChangedI", + } + + -- add snippet path here! + require("luasnip/loaders/from_vscode").load { paths = {} } + require("luasnip/loaders/from_vscode").load() end -M.signature = function(override_flag) - local present, lspsignature = pcall(require, "lsp_signature") - if present then - local default = { - bind = true, - doc_lines = 0, - floating_window = true, - fix_pos = true, - hint_enable = true, - hint_prefix = " ", - hint_scheme = "String", - hi_parameter = "Search", - max_height = 22, - max_width = 120, -- max_width of signature floating_window, line will be wrapped if exceed max_width - handler_opts = { - border = "single", -- double, single, shadow, none - }, - zindex = 200, -- by default it will be on top of all floating windows, set to 50 send it to bottom - padding = "", -- character to pad on left and right of signature can be ' ', or '|' etc - } - if override_flag then - default = require("core.utils").tbl_override_req("signature", default) - end - lspsignature.setup(default) +M.signature = function() + local present, lsp_signature = pcall(require, "lsp_signature") + + if not present then + return end + + local options = { + bind = true, + doc_lines = 0, + floating_window = true, + fix_pos = true, + hint_enable = true, + hint_prefix = " ", + hint_scheme = "String", + hi_parameter = "Search", + max_height = 22, + max_width = 120, -- max_width of signature floating_window, line will be wrapped if exceed max_width + handler_opts = { + border = "single", -- double, single, shadow, none + }, + zindex = 200, -- by default it will be on top of all floating windows, set to 50 send it to bottom + padding = "", -- character to pad on left and right of signature can be ' ', or '|' etc + } + + options = require("core.utils").load_override(options, "ray-x/lsp_signature.nvim") + lsp_signature.setup(options) end M.lsp_handlers = function() @@ -178,23 +195,22 @@ M.lsp_handlers = function() end end -M.gitsigns = function(override_flag) +M.gitsigns = function() local present, gitsigns = pcall(require, "gitsigns") - if present then - local default = { - signs = { - add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, - change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, - delete = { hl = "DiffDelete", text = "", numhl = "GitSignsDeleteNr" }, - topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, - changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" }, - }, - } - if override_flag then - default = require("core.utils").tbl_override_req("gitsigns", default) - end - gitsigns.setup(default) + + if not present then + return end + + gitsigns.setup { + signs = { + add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, + change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, + delete = { hl = "DiffDelete", text = "", numhl = "GitSignsDeleteNr" }, + topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, + changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" }, + }, + } end return M diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index ddad9d5..b667680 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -1,16 +1,14 @@ local present, feline = pcall(require, "feline") + if not present then return end -local default = { - colors = require("colors").get(), - lsp = require "feline.providers.lsp", - lsp_severity = vim.diagnostic.severity, - config = require("core.utils").load_config().plugins.options.statusline, -} +local colors = require("colors").get() +local lsp = require "feline.providers.lsp" +local lsp_severity = vim.diagnostic.severity -default.icon_styles = { +local icon_styles = { default = { left = "", right = " ", @@ -51,35 +49,31 @@ default.icon_styles = { }, } --- statusline style -default.statusline_style = default.icon_styles[default.config.style] - --- show short statusline on small screens -default.shortline = default.config.shortline == false and true +local separator_style = icon_styles.default -- Initialize the components table -default.components = { +local components = { active = {}, } -default.main_icon = { - provider = default.statusline_style.main_icon, +local main_icon = { + provider = separator_style.main_icon, hl = { - fg = default.colors.statusline_bg, - bg = default.colors.nord_blue, + fg = colors.statusline_bg, + bg = colors.nord_blue, }, right_sep = { - str = default.statusline_style.right, + str = separator_style.right, hl = { - fg = default.colors.nord_blue, - bg = default.colors.lightbg, + fg = colors.nord_blue, + bg = colors.lightbg, }, }, } -default.file_name = { +local file_name = { provider = function() local filename = vim.fn.expand "%:t" local extension = vim.fn.expand "%:e" @@ -90,49 +84,42 @@ default.file_name = { end return " " .. icon .. " " .. filename .. " " end, - enabled = default.shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 - end, hl = { - fg = default.colors.white, - bg = default.colors.lightbg, + fg = colors.white, + bg = colors.lightbg, }, right_sep = { - str = default.statusline_style.right, - hl = { fg = default.colors.lightbg, bg = default.colors.lightbg2 }, + str = separator_style.right, + hl = { fg = colors.lightbg, bg = colors.lightbg2 }, }, } -default.dir_name = { +local dir_name = { provider = function() local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") return "  " .. dir_name .. " " end, - enabled = default.shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 80 - end, - hl = { - fg = default.colors.grey_fg2, - bg = default.colors.lightbg2, + fg = colors.grey_fg2, + bg = colors.lightbg2, }, right_sep = { - str = default.statusline_style.right, + str = separator_style.right, hi = { - fg = default.colors.lightbg2, - bg = default.colors.statusline_bg, + fg = colors.lightbg2, + bg = colors.statusline_bg, }, }, } -default.diff = { +local diff = { add = { provider = "git_diff_added", hl = { - fg = default.colors.grey_fg2, - bg = default.colors.statusline_bg, + fg = colors.grey_fg2, + bg = colors.statusline_bg, }, icon = " ", }, @@ -140,8 +127,8 @@ default.diff = { change = { provider = "git_diff_changed", hl = { - fg = default.colors.grey_fg2, - bg = default.colors.statusline_bg, + fg = colors.grey_fg2, + bg = colors.statusline_bg, }, icon = "  ", }, @@ -149,65 +136,62 @@ default.diff = { remove = { provider = "git_diff_removed", hl = { - fg = default.colors.grey_fg2, - bg = default.colors.statusline_bg, + fg = colors.grey_fg2, + bg = colors.statusline_bg, }, icon = "  ", }, } -default.git_branch = { +local git_branch = { provider = "git_branch", - enabled = default.shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 - end, hl = { - fg = default.colors.grey_fg2, - bg = default.colors.statusline_bg, + fg = colors.grey_fg2, + bg = colors.statusline_bg, }, icon = "  ", } -default.diagnostic = { +local diagnostic = { error = { provider = "diagnostic_errors", enabled = function() - return default.lsp.diagnostics_exist(default.lsp_severity.ERROR) + return lsp.diagnostics_exist(lsp_severity.ERROR) end, - hl = { fg = default.colors.red }, + hl = { fg = colors.red }, icon = "  ", }, warning = { provider = "diagnostic_warnings", enabled = function() - return default.lsp.diagnostics_exist(default.lsp_severity.WARN) + return lsp.diagnostics_exist(lsp_severity.WARN) end, - hl = { fg = default.colors.yellow }, + hl = { fg = colors.yellow }, icon = "  ", }, hint = { provider = "diagnostic_hints", enabled = function() - return default.lsp.diagnostics_exist(default.lsp_severity.HINT) + return lsp.diagnostics_exist(lsp_severity.HINT) end, - hl = { fg = default.colors.grey_fg2 }, + hl = { fg = colors.grey_fg2 }, icon = "  ", }, info = { provider = "diagnostic_info", enabled = function() - return default.lsp.diagnostics_exist(default.lsp_severity.INFO) + return lsp.diagnostics_exist(lsp_severity.INFO) end, - hl = { fg = default.colors.green }, + hl = { fg = colors.green }, icon = "  ", }, } -default.lsp_progress = { +local lsp_progress = { provider = function() local Lsp = vim.lsp.util.get_progress_messages()[1] @@ -239,13 +223,10 @@ default.lsp_progress = { return "" end, - enabled = default.shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 80 - end, - hl = { fg = default.colors.green }, + hl = { fg = colors.green }, } -default.lsp_icon = { +local lsp_icon = { provider = function() if next(vim.lsp.buf_get_clients()) ~= nil then return " LSP" @@ -253,112 +234,100 @@ default.lsp_icon = { return "" end end, - enabled = default.shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70 - end, - hl = { fg = default.colors.grey_fg2, bg = default.colors.statusline_bg }, + hl = { fg = colors.grey_fg2, bg = colors.statusline_bg }, } -default.mode_colors = { - ["n"] = { "NORMAL", default.colors.red }, - ["no"] = { "N-PENDING", default.colors.red }, - ["i"] = { "INSERT", default.colors.dark_purple }, - ["ic"] = { "INSERT", default.colors.dark_purple }, - ["t"] = { "TERMINAL", default.colors.green }, - ["v"] = { "VISUAL", default.colors.cyan }, - ["V"] = { "V-LINE", default.colors.cyan }, - [""] = { "V-BLOCK", default.colors.cyan }, - ["R"] = { "REPLACE", default.colors.orange }, - ["Rv"] = { "V-REPLACE", default.colors.orange }, - ["s"] = { "SELECT", default.colors.nord_blue }, - ["S"] = { "S-LINE", default.colors.nord_blue }, - [""] = { "S-BLOCK", default.colors.nord_blue }, - ["c"] = { "COMMAND", default.colors.pink }, - ["cv"] = { "COMMAND", default.colors.pink }, - ["ce"] = { "COMMAND", default.colors.pink }, - ["r"] = { "PROMPT", default.colors.teal }, - ["rm"] = { "MORE", default.colors.teal }, - ["r?"] = { "CONFIRM", default.colors.teal }, - ["!"] = { "SHELL", default.colors.green }, +local mode_colors = { + ["n"] = { "NORMAL", colors.red }, + ["no"] = { "N-PENDING", colors.red }, + ["i"] = { "INSERT", colors.dark_purple }, + ["ic"] = { "INSERT", colors.dark_purple }, + ["t"] = { "TERMINAL", colors.green }, + ["v"] = { "VISUAL", colors.cyan }, + ["V"] = { "V-LINE", colors.cyan }, + [""] = { "V-BLOCK", colors.cyan }, + ["R"] = { "REPLACE", colors.orange }, + ["Rv"] = { "V-REPLACE", colors.orange }, + ["s"] = { "SELECT", colors.nord_blue }, + ["S"] = { "S-LINE", colors.nord_blue }, + [""] = { "S-BLOCK", colors.nord_blue }, + ["c"] = { "COMMAND", colors.pink }, + ["cv"] = { "COMMAND", colors.pink }, + ["ce"] = { "COMMAND", colors.pink }, + ["r"] = { "PROMPT", colors.teal }, + ["rm"] = { "MORE", colors.teal }, + ["r?"] = { "CONFIRM", colors.teal }, + ["!"] = { "SHELL", colors.green }, } -default.chad_mode_hl = function() +local chad_mode_hl = function() return { - fg = default.mode_colors[vim.fn.mode()][2], - bg = default.colors.one_bg, + fg = mode_colors[vim.fn.mode()][2], + bg = colors.one_bg, } end -default.empty_space = { - provider = " " .. default.statusline_style.left, +local empty_space = { + provider = " " .. separator_style.left, hl = { - fg = default.colors.one_bg2, - bg = default.colors.statusline_bg, + fg = colors.one_bg2, + bg = colors.statusline_bg, }, } -- this matches the vi mode color -default.empty_spaceColored = { - provider = default.statusline_style.left, +local empty_spaceColored = { + provider = separator_style.left, hl = function() return { - fg = default.mode_colors[vim.fn.mode()][2], - bg = default.colors.one_bg2, + fg = mode_colors[vim.fn.mode()][2], + bg = colors.one_bg2, } end, } -default.mode_icon = { - provider = default.statusline_style.vi_mode_icon, +local mode_icon = { + provider = separator_style.vi_mode_icon, hl = function() return { - fg = default.colors.statusline_bg, - bg = default.mode_colors[vim.fn.mode()][2], + fg = colors.statusline_bg, + bg = mode_colors[vim.fn.mode()][2], } end, } -default.empty_space2 = { +local empty_space2 = { provider = function() - return " " .. default.mode_colors[vim.fn.mode()][1] .. " " + return " " .. mode_colors[vim.fn.mode()][1] .. " " end, - hl = default.chad_mode_hl, + hl = chad_mode_hl, } -default.separator_right = { - provider = default.statusline_style.left, - enabled = default.shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 - end, +local separator_right = { + provider = separator_style.left, hl = { - fg = default.colors.grey, - bg = default.colors.one_bg, + fg = colors.grey, + bg = colors.one_bg, }, } -default.separator_right2 = { - provider = default.statusline_style.left, - enabled = default.shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 - end, +local separator_right2 = { + provider = separator_style.left, hl = { - fg = default.colors.green, - bg = default.colors.grey, + fg = colors.green, + bg = colors.grey, }, } -default.position_icon = { - provider = default.statusline_style.position_icon, - enabled = default.shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 - end, +local position_icon = { + provider = separator_style.position_icon, hl = { - fg = default.colors.black, - bg = default.colors.green, + fg = colors.black, + bg = colors.green, }, } -default.current_line = { +local current_line = { provider = function() local current_line = vim.fn.line "." local total_line = vim.fn.line "$" @@ -372,13 +341,9 @@ default.current_line = { return " " .. result .. "%% " end, - enabled = default.shortline or function(winid) - return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90 - end, - hl = { - fg = default.colors.green, - bg = default.colors.one_bg, + fg = colors.green, + bg = colors.one_bg, }, } @@ -386,53 +351,45 @@ local function add_table(a, b) table.insert(a, b) end -local M = {} -M.setup = function(override_flag) - if override_flag then - default = require("core.utils").tbl_override_req("feline", default) - end - -- components are divided in 3 sections - default.left = {} - default.middle = {} - default.right = {} +-- components are divided in 3 sections +local left = {} +local middle = {} +local right = {} - -- left - add_table(default.left, default.main_icon) - add_table(default.left, default.file_name) - add_table(default.left, default.dir_name) - add_table(default.left, default.diff.add) - add_table(default.left, default.diff.change) - add_table(default.left, default.diff.remove) - add_table(default.left, default.diagnostic.error) - add_table(default.left, default.diagnostic.warning) - add_table(default.left, default.diagnostic.hint) - add_table(default.left, default.diagnostic.info) +-- left +add_table(left, main_icon) +add_table(left, file_name) +add_table(left, dir_name) +add_table(left, diff.add) +add_table(left, diff.change) +add_table(left, diff.remove) +add_table(left, diagnostic.error) +add_table(left, diagnostic.warning) +add_table(left, diagnostic.hint) +add_table(left, diagnostic.info) - add_table(default.middle, default.lsp_progress) +add_table(middle, lsp_progress) - -- right - add_table(default.right, default.lsp_icon) - add_table(default.right, default.git_branch) - add_table(default.right, default.empty_space) - add_table(default.right, default.empty_spaceColored) - add_table(default.right, default.mode_icon) - add_table(default.right, default.empty_space2) - add_table(default.right, default.separator_right) - add_table(default.right, default.separator_right2) - add_table(default.right, default.position_icon) - add_table(default.right, default.current_line) +-- right +add_table(right, lsp_icon) +add_table(right, git_branch) +add_table(right, empty_space) +add_table(right, empty_spaceColored) +add_table(right, mode_icon) +add_table(right, empty_space2) +add_table(right, separator_right) +add_table(right, separator_right2) +add_table(right, position_icon) +add_table(right, current_line) - default.components.active[1] = default.left - default.components.active[2] = default.middle - default.components.active[3] = default.right +components.active[1] = left +components.active[2] = middle +components.active[3] = right - feline.setup { - theme = { - bg = default.colors.statusline_bg, - fg = default.colors.fg, - }, - components = default.components, - } -end - -return M +feline.setup { + theme = { + bg = colors.statusline_bg, + fg = colors.fg, + }, + components = components, +} diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 7a5af67..aff3cc0 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -4,7 +4,7 @@ if not present then return end -local default = { +local options = { defaults = { vimgrep_arguments = { "rg", @@ -53,21 +53,15 @@ local default = { }, } -local M = {} -M.setup = function(override_flag) - if override_flag then - default = require("core.utils").tbl_override_req("telescope", default) +-- check for any override +options = require("core.utils").load_override(options, "nvim-telescope/telescope.nvim") +telescope.setup(options) + +-- load extensions +local extensions = { "themes", "terms" } + +pcall(function() + for _, ext in ipairs(extensions) do + telescope.load_extension(ext) end - - telescope.setup(default) - - local extensions = { "themes", "terms" } - - pcall(function() - for _, ext in ipairs(extensions) do - telescope.load_extension(ext) - end - end) -end - -return M +end) diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index 777b907..a6e6483 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -1,10 +1,10 @@ -local present, ts_config = pcall(require, "nvim-treesitter.configs") +local present, treesitter = pcall(require, "nvim-treesitter.configs") if not present then return end -local default = { +local options = { ensure_installed = { "lua", "vim", @@ -15,12 +15,7 @@ local default = { }, } -local M = {} -M.setup = function(override_flag) - if override_flag then - default = require("core.utils").tbl_override_req("nvim_treesitter", default) - end - ts_config.setup(default) -end +-- check for any override +options = require("core.utils").load_override(options, "nvim-treesitter/nvim-treesitter") -return M +treesitter.setup(options) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 1e15ef7..f145f45 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -5,84 +5,83 @@ if not present then return false end -local override_req = require("core.utils").override_req - local plugins = { - { "nvim-lua/plenary.nvim" }, - { "lewis6991/impatient.nvim" }, - { "nathom/filetype.nvim" }, + ["nvim-lua/plenary.nvim"] = {}, + ["lewis6991/impatient.nvim"] = {}, - { - "wbthomason/packer.nvim", + ["wbthomason/packer.nvim"] = { event = "VimEnter", }, - { - "NvChad/extensions", - config = function () - vim.schedule_wrap(require("nvchad.terminal").init()) - end - }, + ["NvChad/extensions"] = {}, - { - "NvChad/nvim-base16.lua", + ["NvChad/nvim-base16.lua"] = { after = "packer.nvim", config = function() require("colors").init() end, }, - { - "kyazdani42/nvim-web-devicons", - after = "nvim-base16.lua", - config = override_req("nvim_web_devicons", "plugins.configs.icons", "setup"), - }, - - { - "feline-nvim/feline.nvim", - disable = not plugin_settings.status.feline, - after = "nvim-web-devicons", - config = override_req("feline", "plugins.configs.statusline", "setup"), - }, - - { - "akinsho/bufferline.nvim", - branch = "main", - disable = not plugin_settings.status.bufferline, - after = "nvim-web-devicons", - config = override_req("bufferline", "plugins.configs.bufferline", "setup"), - setup = function() - require("core.mappings").bufferline() + ["NvChad/nvterm"] = { + config = function() + require "plugins.configs.nvterm" end, }, - { - "lukas-reineke/indent-blankline.nvim", - disable = not plugin_settings.status.blankline, - event = "BufRead", - config = override_req("indent_blankline", "plugins.configs.others", "blankline"), + ["kyazdani42/nvim-web-devicons"] = { + after = "nvim-base16.lua", + config = function() + require "plugins.configs.icons" + end, }, - { - "NvChad/nvim-colorizer.lua", - disable = not plugin_settings.status.colorizer, - event = "BufRead", - config = override_req("nvim_colorizer", "plugins.configs.others", "colorizer"), + ["feline-nvim/feline.nvim"] = { + after = "nvim-web-devicons", + config = function() + require "plugins.configs.statusline" + end, }, - { - "nvim-treesitter/nvim-treesitter", + ["akinsho/bufferline.nvim"] = { + after = "nvim-web-devicons", + + setup = function() + require("core.mappings").bufferline() + end, + + config = function() + require "plugins.configs.bufferline" + end, + }, + + ["lukas-reineke/indent-blankline.nvim"] = { + event = "BufRead", + config = function() + require("plugins.configs.others").blankline() + end, + }, + + ["NvChad/nvim-colorizer.lua"] = { + event = "BufRead", + config = function() + require("plugins.configs.others").colorizer() + end, + }, + + ["nvim-treesitter/nvim-treesitter"] = { event = { "BufRead", "BufNewFile" }, - config = override_req("nvim_treesitter", "plugins.configs.treesitter", "setup"), run = ":TSUpdate", + config = function() + require "plugins.configs.treesitter" + end, }, -- git stuff - { - "lewis6991/gitsigns.nvim", - disable = not plugin_settings.status.gitsigns, + ["lewis6991/gitsigns.nvim"] = { opt = true, - config = override_req("gitsigns", "plugins.configs.others", "gitsigns"), + config = function() + require("plugins.configs.others").gitsigns() + end, setup = function() require("core.utils").packer_lazy_load "gitsigns.nvim" end, @@ -90,8 +89,7 @@ local plugins = { -- lsp stuff - { - "neovim/nvim-lspconfig", + ["neovim/nvim-lspconfig"] = { module = "lspconfig", opt = true, setup = function() @@ -101,141 +99,131 @@ local plugins = { vim.cmd 'if &ft == "packer" | echo "" | else | silent! e %' end, 0) end, - config = override_req("lspconfig", "plugins.configs.lspconfig"), + config = function() + require "plugins.configs.lspconfig" + end, }, - { - "ray-x/lsp_signature.nvim", - disable = not plugin_settings.status.lspsignature, + ["ray-x/lsp_signature.nvim"] = { after = "nvim-lspconfig", - config = override_req("signature", "plugins.configs.others", "signature"), + config = function() + require("plugins.configs.others").signature() + end, }, - { - "andymass/vim-matchup", - disable = not plugin_settings.status.vim_matchup, + ["andymass/vim-matchup"] = { opt = true, setup = function() require("core.utils").packer_lazy_load "vim-matchup" end, }, - { - "max397574/better-escape.nvim", - disable = not plugin_settings.status.better_escape, + ["max397574/better-escape.nvim"] = { event = "InsertCharPre", - config = override_req("better_escape", "plugins.configs.others", "better_escape"), + config = function() + require("plugins.configs.others").better_escape() + end, }, -- load luasnips + cmp related in insert mode only - { - "rafamadriz/friendly-snippets", + ["rafamadriz/friendly-snippets"] = { module = "cmp_nvim_lsp", - disable = not plugin_settings.status.cmp, event = "InsertEnter", }, - { - "hrsh7th/nvim-cmp", - disable = not plugin_settings.status.cmp, + ["hrsh7th/nvim-cmp"] = { after = "friendly-snippets", - config = override_req("nvim_cmp", "plugins.configs.cmp", "setup"), + config = function() + require "plugins.configs.cmp" + end, }, - { - "L3MON4D3/LuaSnip", - disable = not plugin_settings.status.cmp, + ["L3MON4D3/LuaSnip"] = { wants = "friendly-snippets", after = "nvim-cmp", - config = override_req("luasnip", "plugins.configs.others", "luasnip"), + config = function() + require("plugins.configs.others").luasnip() + end, }, - { - "saadparwaiz1/cmp_luasnip", - disable = not plugin_settings.status.cmp, - after = plugin_settings.options.cmp.lazy_load and "LuaSnip", + ["saadparwaiz1/cmp_luasnip"] = { + after = "LuaSnip", }, - { - "hrsh7th/cmp-nvim-lua", - disable = not plugin_settings.status.cmp, + ["hrsh7th/cmp-nvim-lua"] = { after = "cmp_luasnip", }, - { - "hrsh7th/cmp-nvim-lsp", - disable = not plugin_settings.status.cmp, + ["hrsh7th/cmp-nvim-lsp"] = { after = "cmp-nvim-lua", }, - { - "hrsh7th/cmp-buffer", - disable = not plugin_settings.status.cmp, + ["hrsh7th/cmp-buffer"] = { after = "cmp-nvim-lsp", }, - { - "hrsh7th/cmp-path", - disable = not plugin_settings.status.cmp, + ["hrsh7th/cmp-path"] = { after = "cmp-buffer", }, -- misc plugins - { - "windwp/nvim-autopairs", - disable = not plugin_settings.status.autopairs, - after = plugin_settings.options.autopairs.loadAfter, - config = override_req("nvim_autopairs", "plugins.configs.others", "autopairs"), + ["windwp/nvim-autopairs"] = { + after = "nvim-cmp", + config = function() + require("plugins.configs.others").autopairs() + end, }, - { - disable = not plugin_settings.status.alpha, - "goolord/alpha-nvim", - config = override_req("alpha", "plugins.configs.alpha", "setup"), + ["goolord/alpha-nvim"] = { + disable = true, + config = function() + require "plugins.configs.alpha" + end, }, - { - "numToStr/Comment.nvim", - disable = not plugin_settings.status.comment, + ["numToStr/Comment.nvim"] = { module = "Comment", keys = { "gcc" }, - config = override_req("nvim_comment", "plugins.configs.others", "comment"), + setup = function() require("core.mappings").comment() end, + + config = function() + require("plugins.configs.others").comment() + end, }, -- file managing , picker etc - { - "kyazdani42/nvim-tree.lua", - disable = not plugin_settings.status.nvimtree, - -- only set "after" if lazy load is disabled and vice versa for "cmd" - after = not plugin_settings.options.nvimtree.lazy_load and "nvim-web-devicons", - cmd = plugin_settings.options.nvimtree.lazy_load and { "NvimTreeToggle", "NvimTreeFocus" }, - config = override_req("nvim_tree", "plugins.configs.nvimtree", "setup"), + ["kyazdani42/nvim-tree.lua"] = { + cmd = { "NvimTreeToggle", "NvimTreeFocus" }, + setup = function() require("core.mappings").nvimtree() end, + + config = function() + require "plugins.configs.nvimtree" + end, }, - { - "nvim-telescope/telescope.nvim", + ["nvim-telescope/telescope.nvim"] = { module = "telescope", cmd = "Telescope", - config = override_req("telescope", "plugins.configs.telescope", "setup"), + setup = function() require("core.mappings").telescope() end, + + config = function() + require "plugins.configs.telescope" + end, }, } ---label plugins for operational assistance -plugins = require("core.utils").label_plugins(plugins) ---remove plugins specified in chadrc -plugins = require("core.utils").remove_default_plugins(plugins) ---add plugins specified in chadrc -plugins = require("core.utils").add_user_plugins(plugins) +-- merge user plugin table & default plugin table +plugins = require("core.utils").plugin_list(plugins) return packer.startup(function(use) for _, v in pairs(plugins) do From 6750dee431f4e116ef3c62d9200c507f3b4c28d5 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 28 Apr 2022 03:41:36 +0530 Subject: [PATCH 0997/1541] load missing override functions for cmp/devicons --- lua/plugins/configs/cmp.lua | 2 +- lua/plugins/configs/icons.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 7d02520..4832b18 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -72,6 +72,6 @@ local options = { } -- check for any override --- options = require("core.utils").load_override(options, "cmp") +options = require("core.utils").load_override(options, "hrsh7th/nvim-cmp") cmp.setup(options) diff --git a/lua/plugins/configs/icons.lua b/lua/plugins/configs/icons.lua index d765ec9..479008d 100644 --- a/lua/plugins/configs/icons.lua +++ b/lua/plugins/configs/icons.lua @@ -147,6 +147,6 @@ local options = { } -- check for any override --- options = require("core.utils").load_override(options, "nvim_web_devicons") +options = require("core.utils").load_override(options, "kyazdani42/nvim-web-devicons") devicons.setup(options) From db18d5f356abbae43c7f1bda0dbfd4a51dc8e2c9 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 28 Apr 2022 04:03:48 +0530 Subject: [PATCH 0998/1541] add better way to change default options check http://localhost:3000/config/Custom%20config#change-default-options --- lua/core/default_config.lua | 4 ++-- lua/core/options.lua | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 6515d83..88f2d71 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -5,9 +5,9 @@ local M = {} M.options = { - path = "", -- path to file that overrides core.options + -- load your options here or load module with options1 + user = function() end, - -- NvChad options nvChad = { -- updater update_url = "https://github.com/NvChad/NvChad", diff --git a/lua/core/options.lua b/lua/core/options.lua index 6b731b4..d64494f 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -82,8 +82,4 @@ vim.schedule(function() end) -- load user options if the file exists - -local load_ifExists = require("core.utils").load_ifExists -local user_options = require("core.utils").load_config().options.path - -load_ifExists(user_options) +require("core.utils").load_config().options.user() From 08da7f6698eec163c06c91a492bebc77894bbe3c Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 28 Apr 2022 04:34:14 +0530 Subject: [PATCH 0999/1541] clean mappings.lua --- lua/core/default_config.lua | 2 +- lua/core/mappings.lua | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 88f2d71..74fd9f5 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -45,7 +45,7 @@ M.plugins = { -- non plugin only M.mappings = { - misc = nil, + misc = function() end, } return M diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index f32d1c3..9af8020 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -1,15 +1,8 @@ local utils = require "core.utils" -local config = utils.load_config() local map = utils.map - -local user_cmd = vim.api.nvim_create_user_command - -local nvChad_options = config.options.nvChad - -local mappings = config.mappings - local cmd = vim.cmd +local user_cmd = vim.api.nvim_create_user_command -- This is a wrapper function made to disable a plugin mapping from chadrc -- If keys are nil, false or empty string, then the mapping will be not applied @@ -87,10 +80,7 @@ cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" map("n", "uu", " :NvChadUpdate ") -- load overriden misc mappings - -if mappings.misc ~= nil and type(mappings.misc) == "function" then - mappings.misc() -end +require("core.utils").load_config().mappings.misc() local M = {} From aa4bab96054125ad3aaea5cc4e38862fede8667d Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Thu, 28 Apr 2022 03:58:35 -0400 Subject: [PATCH 1000/1541] fix group comments regression --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 9af8020..ee6da1b 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -93,7 +93,7 @@ end M.comment = function() map("n", "/", " :lua require('Comment.api').toggle_current_linewise()") - map("v", "/", " :lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())") + map("v", "/", " :lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())") end M.lspconfig = function() From 36a25ded76e47708e1a992fa5f2f7d9a5edf1fd7 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Thu, 28 Apr 2022 04:06:38 -0400 Subject: [PATCH 1001/1541] fix x not closing nvim-tree --- lua/core/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 7ebb577..75f3390 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -3,7 +3,7 @@ local M = {} local cmd = vim.cmd M.close_buffer = function(force) - if force or not vim.bo.buflisted then + if force or not vim.bo.buflisted or vim.bo.buftype == 'nofile' then cmd ":bd!" else cmd "bd" From 95951c86a91ad27714b44e8d78a795cdbc039ad1 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Fri, 29 Apr 2022 01:04:44 -0400 Subject: [PATCH 1002/1541] add back ability to remove plugins --- lua/core/default_config.lua | 1 + lua/core/utils.lua | 9 +++++++++ lua/plugins/init.lua | 1 + 3 files changed, 11 insertions(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 74fd9f5..be9cc7c 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -26,6 +26,7 @@ M.ui = { M.plugins = { override = {}, + remove = {}, options = { packer = { diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 75f3390..da714cd 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -92,6 +92,15 @@ M.load_ifExists = function(module) end end +-- remove plugins defined in chadrc +M.remove_default_plugins = function(plugins) + local removals = require("core.utils").load_config().plugins.remove or {} + if not vim.tbl_isempty(removals) then + for _, plugin in pairs(removals) do plugins[plugin] = nil end + end + return plugins +end + -- merge default/user plugin tables M.plugin_list = function(default_plugins) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index f145f45..06f75e8 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -222,6 +222,7 @@ local plugins = { }, } +plugins = require("core.utils").remove_default_plugins(plugins) -- merge user plugin table & default plugin table plugins = require("core.utils").plugin_list(plugins) From 83a044e90374c307bb85e8e8e6e238fffe273c90 Mon Sep 17 00:00:00 2001 From: ahhshm <87268103+ahhshm@users.noreply.github.com> Date: Fri, 29 Apr 2022 20:13:11 +0430 Subject: [PATCH 1003/1541] chore: disable omnifunc --- lua/plugins/configs/lspconfig.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 5d6452a..4c375ed 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -9,8 +9,6 @@ function M.on_attach(client, bufnr) client.resolved_capabilities.document_formatting = false client.resolved_capabilities.document_range_formatting = false - -- Enable completion triggered by - buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") require("core.mappings").lspconfig() end From 1f3a4787ce0461748fc6d99f665b4ecdf3b0a594 Mon Sep 17 00:00:00 2001 From: ahhshm <87268103+ahhshm@users.noreply.github.com> Date: Fri, 29 Apr 2022 20:32:13 +0430 Subject: [PATCH 1004/1541] fix: update neovim version badge --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index 88a287b..061ece7 100644 --- a/.github/README.md +++ b/.github/README.md @@ -21,7 +21,7 @@ src="https://img.shields.io/github/license/NvChad/NvChad?style=flat-square&logo=GNU&label=License&color=df967f" alt="License" /> -[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.6.1-blueviolet.svg?style=flat-square&logo=Neovim&color=90E59A&logoColor=white)](https://github.com/neovim/neovim) +[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.7.0-blueviolet.svg?style=flat-square&logo=Neovim&color=90E59A&logoColor=white)](https://github.com/neovim/neovim) [![GitHub Issues](https://img.shields.io/github/issues/NvChad/NvChad.svg?style=flat-square&label=Issues&color=d77982)](https://github.com/NvChad/NvChad/issues) [![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/gADmkJb9Fb) [![Matrix](https://img.shields.io/badge/Matrix-40aa8b.svg?style=flat-square&logo=Matrix&logoColor=white)](https://matrix.to/#/#nvchad:matrix.org) From a8466ccf4cd0f609e794140663fdcb4163407296 Mon Sep 17 00:00:00 2001 From: "Arman.H" Date: Fri, 29 Apr 2022 20:57:51 +0430 Subject: [PATCH 1005/1541] fix: set LSP mappings only for buffers that have a configured language server --- lua/core/mappings.lua | 42 ++++++++++++++++++------------- lua/plugins/configs/lspconfig.lua | 2 +- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index ee6da1b..bd736c3 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -96,73 +96,79 @@ M.comment = function() map("v", "/", " :lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())") end -M.lspconfig = function() +M.lspconfig = function(bufnr) -- See ` :help vim.lsp.*` for documentation on any of the below functions - map("n", "gD", function() + + local buf_map = function(...) + local key, lhs, rhs = ... + map(key, lhs, rhs, { buffer = bufnr }) + end + + buf_map("n", "gD", function() vim.lsp.buf.declaration() end) - map("n", "gd", function() + buf_map("n", "gd", function() vim.lsp.buf.definition() end) - map("n", "K", function() + buf_map("n", "K", function() vim.lsp.buf.hover() end) - map("n", "gi", function() + buf_map("n", "gi", function() vim.lsp.buf.implementation() end) - map("n", "", function() + buf_map("n", "", function() vim.lsp.buf.signature_help() end) - map("n", "D", function() + buf_map("n", "D", function() vim.lsp.buf.type_definition() end) - map("n", "ra", function() + buf_map("n", "ra", function() vim.lsp.buf.rename() end) - map("n", "ca", function() + buf_map("n", "ca", function() vim.lsp.buf.code_action() end) - map("n", "gr", function() + buf_map("n", "gr", function() vim.lsp.buf.references() end) - map("n", "f", function() + buf_map("n", "f", function() vim.diagnostic.open_float() end) - map("n", "[d", function() + buf_map("n", "[d", function() vim.diagnostic.goto_prev() end) - map("n", "d]", function() + buf_map("n", "d]", function() vim.diagnostic.goto_next() end) - map("n", "q", function() + buf_map("n", "q", function() vim.diagnostic.setloclist() end) - map("n", "fm", function() + buf_map("n", "fm", function() vim.lsp.buf.formatting() end) - map("n", "wa", function() + buf_map("n", "wa", function() vim.lsp.buf.add_workspace_folder() end) - map("n", "wr", function() + buf_map("n", "wr", function() vim.lsp.buf.remove_workspace_folder() end) - map("n", "wl", function() + buf_map("n", "wl", function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end) end diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 4c375ed..ce4553a 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -10,7 +10,7 @@ function M.on_attach(client, bufnr) client.resolved_capabilities.document_formatting = false client.resolved_capabilities.document_range_formatting = false - require("core.mappings").lspconfig() + require("core.mappings").lspconfig(bufnr) end local capabilities = vim.lsp.protocol.make_client_capabilities() From 83fe03455e4bab192f1b522101c52a8e5d4a6027 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 29 Apr 2022 22:33:18 +0530 Subject: [PATCH 1006/1541] fix (#989) Prevents auto-focus of nvimtree when there are multiple buffers opened and current buffer is closed --- lua/core/utils.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index da714cd..074f316 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -3,10 +3,11 @@ local M = {} local cmd = vim.cmd M.close_buffer = function(force) - if force or not vim.bo.buflisted or vim.bo.buftype == 'nofile' then + if force or not vim.bo.buflisted or vim.bo.buftype == "nofile" then cmd ":bd!" else - cmd "bd" + -- switch to previous buffer then close current buffer + vim.cmd(":bp | bd" .. vim.fn.bufnr()) end end From 263dcc011584108dccc4ee99195d0019e3aa9340 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 30 Apr 2022 03:57:12 +0530 Subject: [PATCH 1007/1541] make statusline separator style customizable | fix (#995) --- lua/core/default_config.lua | 2 +- lua/plugins/configs/statusline.lua | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index be9cc7c..04a1a1f 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -36,7 +36,7 @@ M.plugins = { setup_lspconf = "", -- path of lspconfig file }, statusline = { - style = "default", -- default/round/slant/block/arrow + separator_style = "default", -- default/round/slant/block/arrow }, }, diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index b667680..2d2cbf8 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -49,7 +49,8 @@ local icon_styles = { }, } -local separator_style = icon_styles.default +local separator = require("core.utils").load_config().plugins.options.statusline.separator_style +local separator_style = icon_styles[separator] -- Initialize the components table local components = { From d16546acacd61a6c7516d6c155eae9e21dd92126 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Fri, 29 Apr 2022 19:14:30 -0400 Subject: [PATCH 1008/1541] fix #977 --- lua/core/utils.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 074f316..04de6b0 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -3,12 +3,11 @@ local M = {} local cmd = vim.cmd M.close_buffer = function(force) - if force or not vim.bo.buflisted or vim.bo.buftype == "nofile" then - cmd ":bd!" - else - -- switch to previous buffer then close current buffer - vim.cmd(":bp | bd" .. vim.fn.bufnr()) - end + if vim.bo.buftype == "terminal" then vim.api.nvim_win_hide(0) return end + force = force or not vim.bo.buflisted or vim.bo.buftype == "nofile" + -- if not force, change to prev buf and then close current + local close_cmd = force and ":bd!" or ":bp | bd" .. vim.fn.bufnr() + vim.cmd(close_cmd) end M.load_config = function() From c8df6267763a85cbd8b5d7594be243a7cbe7f504 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 30 Apr 2022 15:48:45 +0530 Subject: [PATCH 1009/1541] fix (#854) --- lua/core/options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index d64494f..80863da 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -77,7 +77,7 @@ for _, plugin in pairs(default_plugins) do end vim.schedule(function() - vim.opt.shadafile = "NONE" + vim.opt.shadafile = vim.fn.expand "$HOME" .. "/.local/share/nvim/shada/main.shada" vim.cmd [[ silent! rsh ]] end) From 949a8d5aaf431fd239cb1e567c8bf3c2ae7b5596 Mon Sep 17 00:00:00 2001 From: primeapple Date: Sat, 30 Apr 2022 08:13:34 +0200 Subject: [PATCH 1010/1541] added gc and gb as keys to trigger lazy load on comment plugin, removed unnesc opt keys --- lua/plugins/init.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 06f75e8..cae043d 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -78,7 +78,6 @@ local plugins = { -- git stuff ["lewis6991/gitsigns.nvim"] = { - opt = true, config = function() require("plugins.configs.others").gitsigns() end, @@ -91,7 +90,6 @@ local plugins = { ["neovim/nvim-lspconfig"] = { module = "lspconfig", - opt = true, setup = function() require("core.utils").packer_lazy_load "nvim-lspconfig" -- reload the current file so lsp actually starts for it @@ -112,7 +110,6 @@ local plugins = { }, ["andymass/vim-matchup"] = { - opt = true, setup = function() require("core.utils").packer_lazy_load "vim-matchup" end, @@ -184,7 +181,7 @@ local plugins = { ["numToStr/Comment.nvim"] = { module = "Comment", - keys = { "gcc" }, + keys = { "gc", "gb" }, setup = function() require("core.mappings").comment() From 498513d72d9604a619d1fab173c6ee3d4b9c2045 Mon Sep 17 00:00:00 2001 From: primeapple Date: Sat, 30 Apr 2022 13:39:57 +0200 Subject: [PATCH 1011/1541] put opt keys back --- lua/plugins/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index cae043d..ae411ad 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -78,6 +78,7 @@ local plugins = { -- git stuff ["lewis6991/gitsigns.nvim"] = { + opt = true, config = function() require("plugins.configs.others").gitsigns() end, @@ -90,6 +91,7 @@ local plugins = { ["neovim/nvim-lspconfig"] = { module = "lspconfig", + opt = true, setup = function() require("core.utils").packer_lazy_load "nvim-lspconfig" -- reload the current file so lsp actually starts for it @@ -110,6 +112,7 @@ local plugins = { }, ["andymass/vim-matchup"] = { + opt = true, setup = function() require("core.utils").packer_lazy_load "vim-matchup" end, From 3c282a5fd57e1cd38d0e77d6a8a5969d98173a9d Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 30 Apr 2022 21:35:40 +0530 Subject: [PATCH 1012/1541] fix: replace vertsplit highlights wtih winseparator (#969) From v0.7, vertsplit => WinSeparator so updated the nvimtreeversplit hl group too https://github.com/kyazdani42/nvim-tree.lua/pull/1219 --- lua/colors/highlights.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index c97c64f..5d68d25 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -61,7 +61,7 @@ fg("StatusLineNC", one_bg3 .. " gui=underline") fg("LineNr", grey) fg("NvimInternalError", red) -fg("VertSplit", one_bg2) +fg("WinSeparator", one_bg2) if ui.transparency then bg("Normal", "NONE") @@ -106,7 +106,7 @@ bg("NvimTreeNormalNC", darker_black) fg("NvimTreeOpenedFolderName", folder_bg) fg("NvimTreeRootFolder", red .. " gui=underline") -- enable underline for root folder in nvim tree fg_bg("NvimTreeStatuslineNc", darker_black, darker_black) -fg_bg("NvimTreeVertSplit", darker_black, darker_black) +fg_bg("NvimTreeWinSeparator", darker_black, darker_black) fg_bg("NvimTreeWindowPicker", red, black2) -- Telescope @@ -130,7 +130,7 @@ if ui.transparency then bg("NvimTreeNormal", "NONE") bg("NvimTreeNormalNC", "NONE") bg("NvimTreeStatusLineNC", "NONE") - fg_bg("NvimTreeVertSplit", grey, "NONE") + fg_bg("NvimTreeWinSeparator", grey, "NONE") -- telescope bg("TelescopeBorder", "NONE") From 36aeebc5801053a90b1817fba9e8d5b3c87c4e45 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 30 Apr 2022 21:48:11 +0530 Subject: [PATCH 1013/1541] fix : luasnip not working (#1000) --- lua/plugins/configs/others.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index bad0b63..55b2561 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -112,7 +112,7 @@ end M.luasnip = function() local present, luasnip = pcall(require, "luasnip") - if present then + if not present then return end @@ -121,9 +121,7 @@ M.luasnip = function() updateevents = "TextChanged,TextChangedI", } - -- add snippet path here! - require("luasnip/loaders/from_vscode").load { paths = {} } - require("luasnip/loaders/from_vscode").load() + require("luasnip.loaders.from_vscode").lazy_load() end M.signature = function() From 985217b93f9274d40c408ca26c6152cc5bcf8f0b Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 30 Apr 2022 23:37:31 +0530 Subject: [PATCH 1014/1541] add: Packer snapshot feature (#721) --- lua/core/default_config.lua | 1 + lua/core/mappings.lua | 16 ++++++++++++++++ lua/plugins/packerInit.lua | 3 +++ 3 files changed, 20 insertions(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 04a1a1f..72dbf7a 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -31,6 +31,7 @@ M.plugins = { options = { packer = { init_file = "plugins.packerInit", + snapshot = nil, }, lspconfig = { setup_lspconf = "", -- path of lspconfig file diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index bd736c3..99a3d26 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -68,6 +68,22 @@ local packer_cmd = function(callback) end end +-- snapshot stuff +user_cmd("PackerSnapshot", function(info) + require "plugins" + require("packer").snapshot(info.args) +end, { nargs = "+" }) + +user_cmd("PackerSnapshotDelete", function(info) + require "plugins" + require("packer.snapshot").delete(info.args) +end, { nargs = "+" }) + +user_cmd("PackerSnapshotRollback", function(info) + require "plugins" + require("packer").rollback(info.args) +end, { nargs = "+" }) + user_cmd("PackerClean", packer_cmd "clean", {}) user_cmd("PackerCompile", packer_cmd "compile", {}) user_cmd("PackerInstall", packer_cmd "install", {}) diff --git a/lua/plugins/packerInit.lua b/lua/plugins/packerInit.lua index cafdd4f..88be509 100644 --- a/lua/plugins/packerInit.lua +++ b/lua/plugins/packerInit.lua @@ -27,6 +27,8 @@ if not present then end end +local user_snapshot = require("core.utils").load_config().snapshot + packer.init { display = { open_fn = function() @@ -39,6 +41,7 @@ packer.init { }, auto_clean = true, compile_on_sync = true, + snapshot = user_snapshot, } return packer From 9ae7c2aff3e8716ac78d579327a24ef2d2f8a2d0 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 1 May 2022 08:01:47 +0530 Subject: [PATCH 1015/1541] fix error while closing file (#1002) --- lua/core/options.lua | 1 + lua/core/utils.lua | 28 ++++++++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index 80863da..342a1cd 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -5,6 +5,7 @@ local g = vim.g g.did_load_filetypes = 0 g.do_filetype_lua = 1 +opt.confirm = true opt.laststatus = 3 -- global statusline opt.title = true opt.clipboard = "unnamedplus" diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 04de6b0..33b095f 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -3,11 +3,25 @@ local M = {} local cmd = vim.cmd M.close_buffer = function(force) - if vim.bo.buftype == "terminal" then vim.api.nvim_win_hide(0) return end - force = force or not vim.bo.buflisted or vim.bo.buftype == "nofile" - -- if not force, change to prev buf and then close current - local close_cmd = force and ":bd!" or ":bp | bd" .. vim.fn.bufnr() - vim.cmd(close_cmd) + if vim.bo.buftype == "terminal" then + vim.api.nvim_win_hide(0) + return + end + + local fileExists = vim.fn.filereadable(vim.fn.expand "%p") + local modified = vim.api.nvim_buf_get_option(vim.fn.bufnr(), "modified") + + -- if file doesnt exist & its modified + if fileExists == 0 and modified then + print "no file name? add it now!" + return + end + + force = force or not vim.bo.buflisted or vim.bo.buftype == "nofile" + + -- if not force, change to prev buf and then close current + local close_cmd = force and ":bd!" or ":bp | bd" .. vim.fn.bufnr() + vim.cmd(close_cmd) end M.load_config = function() @@ -96,7 +110,9 @@ end M.remove_default_plugins = function(plugins) local removals = require("core.utils").load_config().plugins.remove or {} if not vim.tbl_isempty(removals) then - for _, plugin in pairs(removals) do plugins[plugin] = nil end + for _, plugin in pairs(removals) do + plugins[plugin] = nil + end end return plugins end From 841f839bb626177199b9e68177e77bc6c1cd472f Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 1 May 2022 18:24:40 +0530 Subject: [PATCH 1016/1541] Revert "fix: set LSP mappings only for buffers that have a configured language server (#1004)" This reverts commit a8466ccf4cd0f609e794140663fdcb4163407296. --- lua/core/mappings.lua | 42 +++++++++++++------------------ lua/plugins/configs/lspconfig.lua | 2 +- 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 99a3d26..6f5215d 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -112,79 +112,73 @@ M.comment = function() map("v", "/", " :lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())") end -M.lspconfig = function(bufnr) +M.lspconfig = function() -- See ` :help vim.lsp.*` for documentation on any of the below functions - - local buf_map = function(...) - local key, lhs, rhs = ... - map(key, lhs, rhs, { buffer = bufnr }) - end - - buf_map("n", "gD", function() + map("n", "gD", function() vim.lsp.buf.declaration() end) - buf_map("n", "gd", function() + map("n", "gd", function() vim.lsp.buf.definition() end) - buf_map("n", "K", function() + map("n", "K", function() vim.lsp.buf.hover() end) - buf_map("n", "gi", function() + map("n", "gi", function() vim.lsp.buf.implementation() end) - buf_map("n", "", function() + map("n", "", function() vim.lsp.buf.signature_help() end) - buf_map("n", "D", function() + map("n", "D", function() vim.lsp.buf.type_definition() end) - buf_map("n", "ra", function() + map("n", "ra", function() vim.lsp.buf.rename() end) - buf_map("n", "ca", function() + map("n", "ca", function() vim.lsp.buf.code_action() end) - buf_map("n", "gr", function() + map("n", "gr", function() vim.lsp.buf.references() end) - buf_map("n", "f", function() + map("n", "f", function() vim.diagnostic.open_float() end) - buf_map("n", "[d", function() + map("n", "[d", function() vim.diagnostic.goto_prev() end) - buf_map("n", "d]", function() + map("n", "d]", function() vim.diagnostic.goto_next() end) - buf_map("n", "q", function() + map("n", "q", function() vim.diagnostic.setloclist() end) - buf_map("n", "fm", function() + map("n", "fm", function() vim.lsp.buf.formatting() end) - buf_map("n", "wa", function() + map("n", "wa", function() vim.lsp.buf.add_workspace_folder() end) - buf_map("n", "wr", function() + map("n", "wr", function() vim.lsp.buf.remove_workspace_folder() end) - buf_map("n", "wl", function() + map("n", "wl", function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end) end diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index ce4553a..4c375ed 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -10,7 +10,7 @@ function M.on_attach(client, bufnr) client.resolved_capabilities.document_formatting = false client.resolved_capabilities.document_range_formatting = false - require("core.mappings").lspconfig(bufnr) + require("core.mappings").lspconfig() end local capabilities = vim.lsp.protocol.make_client_capabilities() From 89e271c0951fe11614943dd9296e12f1475e309a Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 1 May 2022 21:24:33 +0530 Subject: [PATCH 1017/1541] ease changing/adding highlight group colors nvim_set_hl function from nvim v0.7 was used, now the highlight groups & their colors are in one whole table, can easily merge user highlghts override table, check https://nvchad.github.io/config/Custom%20config#override-default-highlights --- lua/colors/highlights.lua | 268 ++++++++++++++++++++++-------------- lua/core/default_config.lua | 2 +- 2 files changed, 164 insertions(+), 106 deletions(-) diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua index 5d68d25..9a86167 100644 --- a/lua/colors/highlights.lua +++ b/lua/colors/highlights.lua @@ -22,124 +22,182 @@ local red = colors.red local white = colors.white local yellow = colors.yellow local orange = colors.orange -local one_bg3 = colors.one_bg3 - --- functions for setting highlights -local fg = require("core.utils").fg -local fg_bg = require("core.utils").fg_bg -local bg = require("core.utils").bg - --- Comments -fg("Comment", grey_fg) -- Disable cursor line cmd "hi clear CursorLine" --- Line number -fg("cursorlinenr", white) --- same it bg, so it doesn't appear -fg("EndOfBuffer", black) +-- highlight groups & colors +local hl_cols = { --- For floating windows -fg("FloatBorder", blue) -bg("NormalFloat", darker_black) + Comment = { fg = grey_fg }, --- Pmenu -bg("Pmenu", one_bg) -bg("PmenuSbar", one_bg2) -bg("PmenuSel", pmenu_bg) -bg("PmenuThumb", nord_blue) -fg("CmpItemAbbr", white) -fg("CmpItemAbbrMatch", white) -fg("CmpItemKind", white) -fg("CmpItemMenu", white) + -- line numbers + CursorLineNr = { fg = white }, + LineNr = { fg = grey }, --- misc + -- those ugly ~'s + EndOfBuffer = { fg = black }, --- inactive statuslines as thin lines -fg("StatusLineNC", one_bg3 .. " gui=underline") + -- floating windows + FloatBorder = { fg = blue }, + NormalFloat = { bg = darker_black }, -fg("LineNr", grey) -fg("NvimInternalError", red) -fg("WinSeparator", one_bg2) + -- Pmenu i.e completion menu + Pmenu = { bg = one_bg }, + PmenuSbar = { bg = one_bg2 }, + PmenuSel = { bg = pmenu_bg, fg = black }, + PmenuThumb = { bg = nord_blue }, + + -- nvim cmp + CmpItemAbbr = { fg = white }, + CmpItemAbbrMatch = { fg = white }, + CmpItemKind = { fg = white }, + CmpItemMenu = { fg = white }, + + NvimInternalError = { fg = red }, + WinSeparator = { fg = one_bg2 }, + + -- Dashboard i.e alpha.nvim + AlphaHeader = { fg = grey_fg }, + AlphaButtons = { fg = light_grey }, + + -- Gitsigns.nvim + DiffAdd = { + fg = blue, + bg = "NONE", + }, + + DiffChange = { + fg = light_grey, + bg = "NONE", + }, + + DiffChangeDelete = { + fg = red, + bg = "NONE", + }, + + DiffModified = { + fg = orange, + bg = "NONE", + }, + + DiffDelete = { + fg = red, + bg = "NONE", + }, + + -- Indent blankline + IndentBlanklineChar = { fg = line }, + IndentBlanklineSpaceChar = { fg = line }, + + -- Lsp Diagnostics + DiagnosticHint = { fg = purple }, + DiagnosticError = { fg = red }, + DiagnosticWarn = { fg = yellow }, + DiagnosticInformation = { fg = green }, + + -- NvimTree + NvimTreeEmptyFolderName = { fg = folder_bg }, + NvimTreeEndOfBuffer = { fg = darker_black }, + NvimTreeFolderIcon = { fg = folder_bg }, + NvimTreeFolderName = { fg = folder_bg }, + NvimTreeGitDirty = { fg = red }, + NvimTreeIndentMarker = { fg = one_bg2 }, + NvimTreeNormal = { bg = darker_black }, + NvimTreeNormalNC = { bg = darker_black }, + NvimTreeOpenedFolderName = { fg = folder_bg }, + + NvimTreeWinSeparator = { + fg = darker_black, + bg = darker_black, + }, + + NvimTreeWindowPicker = { + fg = red, + bg = black2, + }, + + -- Telescope + TelescopeBorder = { + fg = darker_black, + bg = darker_black, + }, + + TelescopePromptBorder = { + fg = black2, + bg = black2, + }, + + TelescopePromptNormal = { + fg = white, + bg = black2, + }, + + TelescopePromptPrefix = { + fg = red, + bg = black2, + }, + + TelescopeNormal = { bg = darker_black }, + + TelescopePreviewTitle = { + fg = black, + bg = green, + }, + + TelescopePromptTitle = { + fg = black, + bg = red, + }, + + TelescopeResultsTitle = { + fg = darker_black, + bg = darker_black, + }, + + TelescopeSelection = { bg = black2 }, +} if ui.transparency then - bg("Normal", "NONE") - bg("Folded", "NONE") - fg("Folded", "NONE") - fg("Comment", grey) + local hl_groups = { + "NormalFloat", + "Normal", + "Folded", + "NvimTreeNormal", + "NvimTreeNormalNC", + "TelescopeNormal", + "TelescopePrompt", + "TelescopeResults", + "TelescopeBorder", + "TelescopePromptBorder", + "TelescopePromptNormal", + "TelescopePromptPrefix", + } + + for index, _ in ipairs(hl_groups) do + hl_cols[hl_groups[index]] = { + bg = "NONE", + } + end + + hl_cols.NvimTreeWinSeparator = { + fg = grey, + bg = "NONE", + } + + hl_cols.TelescopeResultsTitle = { + fg = black, + bg = blue, + } end --- [[ Plugin Highlights +local utils = require "core.utils" +local user_highlights = utils.load_config().ui.hl_override --- Dashboard -fg("AlphaHeader", grey_fg) -fg("AlphaButtons", light_grey) +-- override user highlights if there are any +hl_cols = vim.tbl_deep_extend("force", hl_cols, user_highlights) --- Git signs -fg_bg("DiffAdd", blue, "NONE") -fg_bg("DiffChange", grey_fg, "NONE") -fg_bg("DiffChangeDelete", red, "NONE") -fg_bg("DiffModified", red, "NONE") -fg_bg("DiffDelete", red, "NONE") - --- Indent blankline plugin -fg("IndentBlanklineChar", line) -fg("IndentBlanklineSpaceChar", line) - --- Lsp diagnostics - -fg("DiagnosticHint", purple) -fg("DiagnosticError", red) -fg("DiagnosticWarn", yellow) -fg("DiagnosticInformation", green) - --- NvimTree -fg("NvimTreeEmptyFolderName", folder_bg) -fg("NvimTreeEndOfBuffer", darker_black) -fg("NvimTreeFolderIcon", folder_bg) -fg("NvimTreeFolderName", folder_bg) -fg("NvimTreeGitDirty", red) -fg("NvimTreeIndentMarker", one_bg2) -bg("NvimTreeNormal", darker_black) -bg("NvimTreeNormalNC", darker_black) -fg("NvimTreeOpenedFolderName", folder_bg) -fg("NvimTreeRootFolder", red .. " gui=underline") -- enable underline for root folder in nvim tree -fg_bg("NvimTreeStatuslineNc", darker_black, darker_black) -fg_bg("NvimTreeWinSeparator", darker_black, darker_black) -fg_bg("NvimTreeWindowPicker", red, black2) - --- Telescope -fg_bg("TelescopeBorder", darker_black, darker_black) -fg_bg("TelescopePromptBorder", black2, black2) - -fg_bg("TelescopePromptNormal", white, black2) -fg_bg("TelescopePromptPrefix", red, black2) - -bg("TelescopeNormal", darker_black) - -fg_bg("TelescopePreviewTitle", black, green) -fg_bg("TelescopePromptTitle", black, red) -fg_bg("TelescopeResultsTitle", darker_black, darker_black) - -bg("TelescopeSelection", black2) - --- Disable some highlight in nvim tree if transparency enabled -if ui.transparency then - bg("NormalFloat", "NONE") - bg("NvimTreeNormal", "NONE") - bg("NvimTreeNormalNC", "NONE") - bg("NvimTreeStatusLineNC", "NONE") - fg_bg("NvimTreeWinSeparator", grey, "NONE") - - -- telescope - bg("TelescopeBorder", "NONE") - bg("TelescopePrompt", "NONE") - bg("TelescopeResults", "NONE") - bg("TelescopePromptBorder", "NONE") - bg("TelescopePromptNormal", "NONE") - bg("TelescopeNormal", "NONE") - bg("TelescopePromptPrefix", "NONE") - fg("TelescopeBorder", one_bg) - fg_bg("TelescopeResultsTitle", black, blue) +for hl, col in pairs(hl_cols) do + vim.api.nvim_set_hl(0, hl, col) end diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 72dbf7a..242caf2 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -18,7 +18,7 @@ M.options = { ---- UI ----- M.ui = { - hl_override = "", + hl_override = {}, colors = "", -- path of your file that contains colors theme = "onedark", -- default theme transparency = false, From 7123edf0efd6adb35b507c0f67c7cbc2891543c4 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 1 May 2022 21:31:39 +0530 Subject: [PATCH 1018/1541] rm un-needed module from telescope definition options --- lua/plugins/init.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index ae411ad..14e2f3a 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -209,7 +209,6 @@ local plugins = { }, ["nvim-telescope/telescope.nvim"] = { - module = "telescope", cmd = "Telescope", setup = function() From 1c4a202d0064a619c523fa88d77d95a02a6e80ba Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 1 May 2022 22:42:05 +0530 Subject: [PATCH 1019/1541] remove un-needed mapping --- lua/core/mappings.lua | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 6f5215d..5b1bd46 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -54,11 +54,6 @@ map("n", "", " :w ") -- ctrl + s to save file -- get out of terminal mode map("t", { "jk" }, "") --- hide a term from within terminal mode -map("t", { "JK" }, function() - require("nvchad.terminal").hide() -end) - -- Add Packer commands because we are not loading it at startup local packer_cmd = function(callback) From e557dc3af9f4ec8f450a0f99fc19a27b9eb27698 Mon Sep 17 00:00:00 2001 From: Freyskeyd Date: Mon, 2 May 2022 15:33:17 +0200 Subject: [PATCH 1020/1541] Fixing lsp mapping to use leader instead of space Signed-off-by: Freyskeyd --- lua/core/mappings.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 5b1bd46..f7a7303 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -129,15 +129,15 @@ M.lspconfig = function() vim.lsp.buf.signature_help() end) - map("n", "D", function() + map("n", "D", function() vim.lsp.buf.type_definition() end) - map("n", "ra", function() + map("n", "ra", function() vim.lsp.buf.rename() end) - map("n", "ca", function() + map("n", "ca", function() vim.lsp.buf.code_action() end) @@ -145,7 +145,7 @@ M.lspconfig = function() vim.lsp.buf.references() end) - map("n", "f", function() + map("n", "f", function() vim.diagnostic.open_float() end) @@ -157,23 +157,23 @@ M.lspconfig = function() vim.diagnostic.goto_next() end) - map("n", "q", function() + map("n", "q", function() vim.diagnostic.setloclist() end) - map("n", "fm", function() + map("n", "fm", function() vim.lsp.buf.formatting() end) - map("n", "wa", function() + map("n", "wa", function() vim.lsp.buf.add_workspace_folder() end) - map("n", "wr", function() + map("n", "wr", function() vim.lsp.buf.remove_workspace_folder() end) - map("n", "wl", function() + map("n", "wl", function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end) end From 02d545cd42ccb4d8bcb6120c18f8d8d27958a1e0 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 3 May 2022 00:13:38 +0530 Subject: [PATCH 1021/1541] breaking change: moved highlight stuff to base16 repo | rewrote whole base16 repo Just run :PackerSync, check https://nvchad.github.io/config/Custom%20config#local-themes and the section below it for newly added features --- lua/colors/highlights.lua | 203 ----------------------------- lua/colors/init.lua | 52 -------- lua/core/default_config.lua | 1 + lua/core/utils.lua | 39 ------ lua/plugins/configs/bufferline.lua | 2 +- lua/plugins/configs/icons.lua | 2 +- lua/plugins/configs/lspconfig.lua | 6 +- lua/plugins/configs/nvimtree.lua | 2 +- lua/plugins/configs/statusline.lua | 3 +- lua/plugins/init.lua | 6 +- 10 files changed, 12 insertions(+), 304 deletions(-) delete mode 100644 lua/colors/highlights.lua delete mode 100644 lua/colors/init.lua diff --git a/lua/colors/highlights.lua b/lua/colors/highlights.lua deleted file mode 100644 index 9a86167..0000000 --- a/lua/colors/highlights.lua +++ /dev/null @@ -1,203 +0,0 @@ -local cmd = vim.cmd - -local colors = require("colors").get() -local ui = require("core.utils").load_config().ui - -local black = colors.black -local black2 = colors.black2 -local blue = colors.blue -local darker_black = colors.darker_black -local folder_bg = colors.folder_bg -local green = colors.green -local grey = colors.grey -local grey_fg = colors.grey_fg -local light_grey = colors.light_grey -local line = colors.line -local nord_blue = colors.nord_blue -local one_bg = colors.one_bg -local one_bg2 = colors.one_bg2 -local pmenu_bg = colors.pmenu_bg -local purple = colors.purple -local red = colors.red -local white = colors.white -local yellow = colors.yellow -local orange = colors.orange - --- Disable cursor line -cmd "hi clear CursorLine" - --- highlight groups & colors -local hl_cols = { - - Comment = { fg = grey_fg }, - - -- line numbers - CursorLineNr = { fg = white }, - LineNr = { fg = grey }, - - -- those ugly ~'s - EndOfBuffer = { fg = black }, - - -- floating windows - FloatBorder = { fg = blue }, - NormalFloat = { bg = darker_black }, - - -- Pmenu i.e completion menu - Pmenu = { bg = one_bg }, - PmenuSbar = { bg = one_bg2 }, - PmenuSel = { bg = pmenu_bg, fg = black }, - PmenuThumb = { bg = nord_blue }, - - -- nvim cmp - CmpItemAbbr = { fg = white }, - CmpItemAbbrMatch = { fg = white }, - CmpItemKind = { fg = white }, - CmpItemMenu = { fg = white }, - - NvimInternalError = { fg = red }, - WinSeparator = { fg = one_bg2 }, - - -- Dashboard i.e alpha.nvim - AlphaHeader = { fg = grey_fg }, - AlphaButtons = { fg = light_grey }, - - -- Gitsigns.nvim - DiffAdd = { - fg = blue, - bg = "NONE", - }, - - DiffChange = { - fg = light_grey, - bg = "NONE", - }, - - DiffChangeDelete = { - fg = red, - bg = "NONE", - }, - - DiffModified = { - fg = orange, - bg = "NONE", - }, - - DiffDelete = { - fg = red, - bg = "NONE", - }, - - -- Indent blankline - IndentBlanklineChar = { fg = line }, - IndentBlanklineSpaceChar = { fg = line }, - - -- Lsp Diagnostics - DiagnosticHint = { fg = purple }, - DiagnosticError = { fg = red }, - DiagnosticWarn = { fg = yellow }, - DiagnosticInformation = { fg = green }, - - -- NvimTree - NvimTreeEmptyFolderName = { fg = folder_bg }, - NvimTreeEndOfBuffer = { fg = darker_black }, - NvimTreeFolderIcon = { fg = folder_bg }, - NvimTreeFolderName = { fg = folder_bg }, - NvimTreeGitDirty = { fg = red }, - NvimTreeIndentMarker = { fg = one_bg2 }, - NvimTreeNormal = { bg = darker_black }, - NvimTreeNormalNC = { bg = darker_black }, - NvimTreeOpenedFolderName = { fg = folder_bg }, - - NvimTreeWinSeparator = { - fg = darker_black, - bg = darker_black, - }, - - NvimTreeWindowPicker = { - fg = red, - bg = black2, - }, - - -- Telescope - TelescopeBorder = { - fg = darker_black, - bg = darker_black, - }, - - TelescopePromptBorder = { - fg = black2, - bg = black2, - }, - - TelescopePromptNormal = { - fg = white, - bg = black2, - }, - - TelescopePromptPrefix = { - fg = red, - bg = black2, - }, - - TelescopeNormal = { bg = darker_black }, - - TelescopePreviewTitle = { - fg = black, - bg = green, - }, - - TelescopePromptTitle = { - fg = black, - bg = red, - }, - - TelescopeResultsTitle = { - fg = darker_black, - bg = darker_black, - }, - - TelescopeSelection = { bg = black2 }, -} - -if ui.transparency then - local hl_groups = { - "NormalFloat", - "Normal", - "Folded", - "NvimTreeNormal", - "NvimTreeNormalNC", - "TelescopeNormal", - "TelescopePrompt", - "TelescopeResults", - "TelescopeBorder", - "TelescopePromptBorder", - "TelescopePromptNormal", - "TelescopePromptPrefix", - } - - for index, _ in ipairs(hl_groups) do - hl_cols[hl_groups[index]] = { - bg = "NONE", - } - end - - hl_cols.NvimTreeWinSeparator = { - fg = grey, - bg = "NONE", - } - - hl_cols.TelescopeResultsTitle = { - fg = black, - bg = blue, - } -end - -local utils = require "core.utils" -local user_highlights = utils.load_config().ui.hl_override - --- override user highlights if there are any -hl_cols = vim.tbl_deep_extend("force", hl_cols, user_highlights) - -for hl, col in pairs(hl_cols) do - vim.api.nvim_set_hl(0, hl, col) -end diff --git a/lua/colors/init.lua b/lua/colors/init.lua deleted file mode 100644 index a41533b..0000000 --- a/lua/colors/init.lua +++ /dev/null @@ -1,52 +0,0 @@ -local colors = require("core.utils").load_config().ui.colors -local override = require("core.utils").load_config().ui.hl_override - -local M = {} - --- if theme given, load given theme if given, otherwise nvchad_theme -M.init = function(theme) - if not theme then - theme = require("core.utils").load_config().ui.theme - end - - -- set the global theme, used at various places like theme switcher, highlights - vim.g.nvchad_theme = theme - - local present, base16 = pcall(require, "base16") - - if present then - -- first load the base16 theme - local ok, array = pcall(base16.themes, theme) - - if ok then - base16(array, true) - -- unload to force reload - package.loaded["colors.highlights" or false] = nil - -- then load the highlights - require "colors.highlights" - else - pcall(vim.cmd, "colo " .. theme) - end - else - pcall(vim.cmd, "colo " .. theme) - end - - if #override ~= 0 then - package.loaded[override] = nil - require(override) - end -end - --- returns a table of colors for given or current theme -M.get = function(theme) - if #colors ~= 0 then - return require(colors) - else - if not theme then - theme = vim.g.nvchad_theme - end - return require("hl_themes." .. theme) - end -end - -return M diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 242caf2..ad91ead 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -19,6 +19,7 @@ M.options = { M.ui = { hl_override = {}, + changed_themes = {}, colors = "", -- path of your file that contains colors theme = "onedark", -- default theme transparency = false, diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 33b095f..c36510f 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -1,7 +1,5 @@ local M = {} -local cmd = vim.cmd - M.close_buffer = function(force) if vim.bo.buftype == "terminal" then vim.api.nvim_win_hide(0) @@ -69,43 +67,6 @@ M.packer_lazy_load = function(plugin, timer) end end --- Highlights functions - --- Define bg color --- @param group Group --- @param color Color - -M.bg = function(group, col) - cmd("hi " .. group .. " guibg=" .. col) -end - --- Define fg color --- @param group Group --- @param color Color -M.fg = function(group, col) - cmd("hi " .. group .. " guifg=" .. col) -end - --- Define bg and fg color --- @param group Group --- @param fgcol Fg Color --- @param bgcol Bg Color -M.fg_bg = function(group, fgcol, bgcol) - cmd("hi " .. group .. " guifg=" .. fgcol .. " guibg=" .. bgcol) -end - -M.load_ifExists = function(module) - if #module ~= 0 then - if type(module) == "string" then - require(module) - - -- file[1] = module & file[2] = function - elseif type(module) == "table" then - require(module[1])[module[2]]() - end - end -end - -- remove plugins defined in chadrc M.remove_default_plugins = function(plugins) local removals = require("core.utils").load_config().plugins.remove or {} diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 3c127bc..2b80332 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -3,7 +3,7 @@ if not present then return end -local colors = require("colors").get() +local colors = require("base16").get_colors("base_30") local options = { options = { diff --git a/lua/plugins/configs/icons.lua b/lua/plugins/configs/icons.lua index 479008d..78db7d3 100644 --- a/lua/plugins/configs/icons.lua +++ b/lua/plugins/configs/icons.lua @@ -4,7 +4,7 @@ if not present then return end -local colors = require("colors").get() +local colors = require("base16").get_colors("base_30") local options = { override = { diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 4c375ed..8222cde 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -2,11 +2,7 @@ local M = {} require("plugins.configs.others").lsp_handlers() -function M.on_attach(client, bufnr) - local function buf_set_option(...) - vim.api.nvim_buf_set_option(bufnr, ...) - end - +function M.on_attach(client, _) client.resolved_capabilities.document_formatting = false client.resolved_capabilities.document_range_formatting = false diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 2276248..b242a56 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -34,7 +34,7 @@ g.nvim_tree_icons = { default = "", empty = "", empty_open = "", - open = "", + open = " ", symlink = "", symlink_open = "", }, diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 2d2cbf8..7f01fba 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -4,7 +4,8 @@ if not present then return end -local colors = require("colors").get() +local colors = require("base16").get_colors("base_30") + local lsp = require "feline.providers.lsp" local lsp_severity = vim.diagnostic.severity diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 14e2f3a..cd4330f 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -18,7 +18,11 @@ local plugins = { ["NvChad/nvim-base16.lua"] = { after = "packer.nvim", config = function() - require("colors").init() + local ok, base16 = pcall(require, "base16") + + if ok then + base16.load_theme() + end end, }, From d84e2b36a183b37bec5562133a2c4fc5e702d3ae Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 3 May 2022 12:13:32 +0530 Subject: [PATCH 1022/1541] update plugin name --- lua/plugins/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index cd4330f..e0cad34 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -15,7 +15,7 @@ local plugins = { ["NvChad/extensions"] = {}, - ["NvChad/nvim-base16.lua"] = { + ["NvChad/base46"] = { after = "packer.nvim", config = function() local ok, base16 = pcall(require, "base16") @@ -33,7 +33,7 @@ local plugins = { }, ["kyazdani42/nvim-web-devicons"] = { - after = "nvim-base16.lua", + after = "base46", config = function() require "plugins.configs.icons" end, From 174873b41fbd327d06c1941079dcc296bf73f477 Mon Sep 17 00:00:00 2001 From: "Arman.H" Date: Tue, 3 May 2022 18:36:47 +0430 Subject: [PATCH 1023/1541] refactor: remove unnecessarry keymap option --- lua/core/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index c36510f..a622c2b 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -41,7 +41,7 @@ M.load_config = function() end M.map = function(mode, keys, command, opt) - local options = { noremap = true, silent = true } + local options = { silent = true } if opt then options = vim.tbl_extend("force", options, opt) From 854534f54c302e4c88e2c23908a7ced6f6b65b16 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 3 May 2022 22:57:16 +0530 Subject: [PATCH 1024/1541] rice cmp-nvim related to https://github.com/NvChad/base46/commit/15a1b910a0ebe297cac5466c77b2b73f2aa68f8b --- lua/plugins/configs/cmp.lua | 35 +++++++++++++++++++++------ lua/plugins/configs/lspkind_icons.lua | 2 +- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 4832b18..dca01c5 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -6,23 +6,44 @@ end vim.opt.completeopt = "menuone,noselect" +local function border(hl_name) + return { + { "╭", hl_name }, + { "─", hl_name }, + { "╮", hl_name }, + { "│", hl_name }, + { "╯", hl_name }, + { "─", hl_name }, + { "╰", hl_name }, + { "│", hl_name }, + } +end + +local cmp_window = require "cmp.utils.window" + +function cmp_window:has_scrollbar() + return false +end + local options = { + window = { + completion = { + border = border "CmpBorder", + }, + documentation = { + border = border "CmpDocBorder", + }, + }, snippet = { expand = function(args) require("luasnip").lsp_expand(args.body) end, }, formatting = { - format = function(entry, vim_item) + format = function(_, vim_item) local icons = require "plugins.configs.lspkind_icons" vim_item.kind = string.format("%s %s", icons[vim_item.kind], vim_item.kind) - vim_item.menu = ({ - nvim_lsp = "[LSP]", - nvim_lua = "[Lua]", - buffer = "[BUF]", - })[entry.source.name] - return vim_item end, }, diff --git a/lua/plugins/configs/lspkind_icons.lua b/lua/plugins/configs/lspkind_icons.lua index 2d538a7..bf5af7a 100644 --- a/lua/plugins/configs/lspkind_icons.lua +++ b/lua/plugins/configs/lspkind_icons.lua @@ -1,7 +1,7 @@ local icons = { Text = "", Method = "", - Function = "", + Function = "", Constructor = "", Field = "ﰠ", Variable = "", From 5ed71fe682f8777f7af28a3385327a06717e3fd1 Mon Sep 17 00:00:00 2001 From: "Arman.H" Date: Tue, 3 May 2022 20:54:11 +0430 Subject: [PATCH 1025/1541] refactor: rewrite auto-commands in lua --- lua/core/autocmds.lua | 44 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index b74f61b..930dac0 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -1,11 +1,43 @@ --- uncomment this if you want to open nvim with a dir --- vim.cmd [[ autocmd BufEnter * if &buftype != "terminal" | lcd %:p:h | endif ]] +local autocmd = vim.api.nvim_create_autocmd + +-- Uncomment this if you want to open nvim with a dir +-- autocmd("BufEnter", { +-- callback = function() +-- if vim.api.nvim_buf_get_option(0, "buftype") ~= "terminal" then +-- vim.cmd "lcd %:p:h" +-- end +-- end, +-- }) -- Use relative & absolute line numbers in 'n' & 'i' modes respectively --- vim.cmd[[ au InsertEnter * set norelativenumber ]] --- vim.cmd[[ au InsertLeave * set relativenumber ]] +-- autocmd("InsertEnter", { +-- callback = function() +-- vim.opt.relativenumber = false +-- end, +-- }) +-- autocmd("InsertLeave", { +-- callback = function() +-- vim.opt.relativenumber = true +-- end, +-- }) -- Open a file from its last left off position --- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] +-- autocmd("BufReadPost", { +-- callback = function() +-- if not vim.fn.expand("%:p"):match ".git" and vim.fn.line "'\"" > 1 and vim.fn.line "'\"" <= vim.fn.line "$" then +-- vim.cmd "normal! g'\"" +-- vim.cmd "normal zz" +-- end +-- end, +-- }) + -- File extension specific tabbing --- vim.cmd [[ autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 ]] +-- autocmd("Filetype", { +-- pattern = "python", +-- callback = function() +-- vim.opt_local.expandtab = true +-- vim.opt_local.tabstop = 4 +-- vim.opt_local.shiftwidth = 4 +-- vim.opt_local.softtabstop = 4 +-- end, +-- }) From cb86c87e88b92b13abee55c8bce0cdccb1526df8 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 4 May 2022 06:55:36 +0530 Subject: [PATCH 1026/1541] add lsp-installer because its bette than before now! --- lua/plugins/configs/lsp_installer.lua | 36 +++++++++++++++++++++++++++ lua/plugins/configs/lspconfig.lua | 27 ++++++++++++++++++++ lua/plugins/init.lua | 12 ++++++--- 3 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 lua/plugins/configs/lsp_installer.lua diff --git a/lua/plugins/configs/lsp_installer.lua b/lua/plugins/configs/lsp_installer.lua new file mode 100644 index 0000000..4f56305 --- /dev/null +++ b/lua/plugins/configs/lsp_installer.lua @@ -0,0 +1,36 @@ +local present, lsp_installer = pcall(require, "nvim-lsp-installer") + +if not present then + return +end + +local options = { + -- ensure_installed is not needed as automatic_installation is enabled + -- then any lsp server you setup by lspconfig is going to get installed automatically! + + -- ensure_installed = { "lua" }, + automatic_installation = true, + + ui = { + icons = { + server_installed = "", + server_pending = "", + server_uninstalled = "ﮊ", + }, + keymaps = { + toggle_server_expand = "", + install_server = "i", + update_server = "u", + check_server_version = "c", + update_all_servers = "U", + check_outdated_servers = "C", + uninstall_server = "X", + }, + }, + + max_concurrent_installers = 20, +} + +options = require("core.utils").load_override(options, "williamboman/nvim-lsp-installer") + +lsp_installer.setup(options) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 8222cde..a676ccf 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,3 +1,9 @@ +local present, lspconfig = pcall(require, "lspconfig") + +if not present then + return +end + local M = {} require("plugins.configs.others").lsp_handlers() @@ -26,6 +32,27 @@ capabilities.textDocument.completion.completionItem.resolveSupport = { }, } +lspconfig.sumneko_lua.setup { + on_attach = M.on_attach, + capabilities = capabilities, + + settings = { + Lua = { + diagnostics = { + globals = { "vim" }, + }, + workspace = { + library = { + [vim.fn.expand "$VIMRUNTIME/lua"] = true, + [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true, + }, + maxPreload = 100000, + preloadFileSize = 10000, + }, + }, + }, +} + -- requires a file containing user's lspconfigs local addlsp_confs = require("core.utils").load_config().plugins.options.lspconfig.setup_lspconf diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e0cad34..727b99c 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -93,17 +93,22 @@ local plugins = { -- lsp stuff - ["neovim/nvim-lspconfig"] = { - module = "lspconfig", + ["williamboman/nvim-lsp-installer"] = { opt = true, setup = function() - require("core.utils").packer_lazy_load "nvim-lspconfig" + require("core.utils").packer_lazy_load "nvim-lsp-installer" -- reload the current file so lsp actually starts for it vim.defer_fn(function() vim.cmd 'if &ft == "packer" | echo "" | else | silent! e %' end, 0) end, + }, + + ["neovim/nvim-lspconfig"] = { + after = "nvim-lsp-installer", + module = "lspconfig", config = function() + require "plugins.configs.lsp_installer" require "plugins.configs.lspconfig" end, }, @@ -202,7 +207,6 @@ local plugins = { -- file managing , picker etc ["kyazdani42/nvim-tree.lua"] = { cmd = { "NvimTreeToggle", "NvimTreeFocus" }, - setup = function() require("core.mappings").nvimtree() end, From 1d945d19b44e72d449f8d24bb50057f4d0efc4f0 Mon Sep 17 00:00:00 2001 From: "Arman.H" Date: Wed, 4 May 2022 09:55:04 +0430 Subject: [PATCH 1027/1541] feat: add more autocommands --- lua/core/autocmds.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index 930dac0..12c5ed3 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -41,3 +41,18 @@ local autocmd = vim.api.nvim_create_autocmd -- vim.opt_local.softtabstop = 4 -- end, -- }) + +-- Highlight yanked text +-- autocmd("TextYankPost", { +-- callback = function() +-- vim.highlight.on_yank { higroup = "Visual", timeout = 200 } +-- end, +-- }) + +-- Enable spellchecking in markdown, text and gitcommit files +-- autocmd("FileType", { +-- pattern = { "gitcommit", "markdown", "text" }, +-- callback = function() +-- vim.opt_local.spell = true +-- end, +-- }) From 814f8d1ff8c8ab69c2cd109d5688cc17719d8301 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 4 May 2022 17:06:14 +0530 Subject: [PATCH 1028/1541] Create FUNDING.yml --- .github/FUNDING.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..02611f2 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +patreon: siduck +ko_fi: siduck +custom: ["https://www.buymeacoffee.com/siduck", "https://www.paypal.com/paypalme/siduck76"] From 7e3a4e9a9f5a0f2db39b56596a863a97660b9343 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 4 May 2022 17:22:18 +0530 Subject: [PATCH 1029/1541] Edited the support section --- .github/README.md | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/README.md b/.github/README.md index 061ece7..99b37ec 100644 --- a/.github/README.md +++ b/.github/README.md @@ -160,16 +160,9 @@ If you have an issue with a plugin in NvChad, first you should report it to NvCh ## :gift_heart: Support -I would happily accept donations but would feel awful since I'm not the only one who has worked on NvChad. The project has only been made possible by the many great contributors and plugin developers, thus taking the donations just for me feels unjustified. If you enjoy using NvChad and would like to show your support then try to be a better you! Help the people in need whenever possible and do charity work. Be nice to loved ones and strangers alike. Do not be rude, always try to be helpful and caring for one another. It's easy to hate but hard to care. Be respectful to any software/work done by other people rather than making fun of them. Do not compare software (In a bad way). I'm grateful to even be able to use NeoVim! But I still cannot be fully happy when I know that there are people who barely have any food to eat, starve for weeks, don't have access to proper education, computers, basic health care facilities and more. Here are some charities and gofundme links you can donate to instead: +I'm (@siduck) really very sorry to remove the previous charity links but I had to do it for various reasons. A lot has been going here regarding financial issues and I do need some support if it's possible from your end. I haven't graduated yet and it would be great to earn some stuff as that'd help me with daily minor expenses. If you like NvChad and would like to support it via donation then I'll gladly accept it. Dont worry! NvChad will still stay alive & active without your donations! I will remove the sponsor button and re-add the charity links once I get a job, probably a year or two. -- https://www.gofundme.com/f/WeCareAboutSyria -- https://www.gofundme.com/f/Burundi-Nutrition -- https://charity.gofundme.com/o/en/campaign/feedingyemen -- https://www.gofundme.com/f/6p8ea-give-ghanaian-orphans-the-gift-of-a-ride-to-school -- https://www.isupportmyanmar.com -- https://www.justgiving.com/campaign/somaliawater -- https://www.justgiving.com/crowdfunding/acaappeal -- https://www.justgiving.com/fundraising/muslim-chat -- https://www.gofundme.com/f/help-kids-in-mali-have-warm-clothing-in-winter -- https://www.justgiving.com/crowdfunding/carevenezuela -- https://www.justgiving.com/campaign/yemen +[![kofi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/siduck) +[![paypal](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white)](https://paypal.me/siduck76) +[![buymeacoffee](https://img.shields.io/badge/Buy_Me_A_Coffee-FFDD00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/siduck) +[![patreon](https://img.shields.io/badge/Patreon-F96854?style=for-the-badge&logo=patreon&logoColor=white)](https://www.patreon.com/siduck) From 6fd4fbbe98775f5f7db57dcf076426eb0b99474e Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 4 May 2022 19:12:26 +0530 Subject: [PATCH 1030/1541] add folder arrows (#1022) --- lua/plugins/configs/nvimtree.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index b242a56..c319fc7 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -10,12 +10,12 @@ local g = vim.g g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names g.nvim_tree_git_hl = 1 g.nvim_tree_highlight_opened_files = 0 -g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" } g.nvim_tree_show_icons = { folders = 1, files = 1, git = 1, + folder_arrows = 1, } g.nvim_tree_icons = { @@ -34,9 +34,11 @@ g.nvim_tree_icons = { default = "", empty = "", empty_open = "", - open = " ", + open = "", symlink = "", symlink_open = "", + arrow_open = "", + arrow_closed = "", }, } @@ -71,7 +73,7 @@ local options = { }, renderer = { indent_markers = { - enable = true, + enable = false, }, }, } From 492fee197930dbfea8116677b9d7107ac953b91c Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 5 May 2022 14:57:36 +0530 Subject: [PATCH 1031/1541] clean stuff --- lua/core/autocmds.lua | 2 +- lua/core/utils.lua | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index 12c5ed3..b34ca9d 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -1,4 +1,4 @@ -local autocmd = vim.api.nvim_create_autocmd +-- local autocmd = vim.api.nvim_create_autocmd -- Uncomment this if you want to open nvim with a dir -- autocmd("BufEnter", { diff --git a/lua/core/utils.lua b/lua/core/utils.lua index a622c2b..0125c3d 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -82,7 +82,6 @@ end M.plugin_list = function(default_plugins) local user_plugins = require("core.utils").load_config().plugins.user - local plug_override = require("core.default_config").plugins.override -- merge default + user plugin table default_plugins = vim.tbl_deep_extend("force", default_plugins, user_plugins) @@ -93,7 +92,6 @@ M.plugin_list = function(default_plugins) default_plugins[key][1] = key final_table[#final_table + 1] = default_plugins[key] - plug_override[#plug_override + 1] = default_plugins[key] end return final_table From 08e9ab363e3486034db0de4a42992c86bfedfb2c Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 5 May 2022 13:38:30 +0530 Subject: [PATCH 1032/1541] plugins/cmp: Use keymaps for command line too. will be used if cmp triggered in command line mode --- lua/plugins/configs/cmp.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index dca01c5..ddabb8a 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -69,6 +69,7 @@ local options = { end, { "i", "s", + "c", }), [""] = cmp.mapping(function(fallback) if cmp.visible() then @@ -81,6 +82,7 @@ local options = { end, { "i", "s", + "c", }), }, sources = { From 382eb7c60ead856ffa9b5da998ca7ed2da8f7e0a Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 5 May 2022 13:40:25 +0530 Subject: [PATCH 1033/1541] utils.lua: Improve plugin_list function require strings if given, if succesfull then use that table --- lua/core/utils.lua | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 0125c3d..311305d 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -79,10 +79,24 @@ M.remove_default_plugins = function(plugins) end -- merge default/user plugin tables - M.plugin_list = function(default_plugins) local user_plugins = require("core.utils").load_config().plugins.user + -- require if string is present + local ok + if type(user_plugins) == "string" then + ok, user_plugins = pcall(require, user_plugins) + if ok and not type(user_plugins) == "table" then + user_plugins = {} + end + end + if type(plug_override) == "string" then + ok, plug_override = pcall(require, plug_override) + if ok and not type(plug_override) == "table" then + plug_override = {} + end + end + -- merge default + user plugin table default_plugins = vim.tbl_deep_extend("force", default_plugins, user_plugins) @@ -99,13 +113,11 @@ end M.load_override = function(default_table, plugin_name) local user_table = require("core.utils").load_config().plugins.override[plugin_name] - if type(user_table) == "table" then default_table = vim.tbl_deep_extend("force", default_table, user_table) else default_table = default_table end - return default_table end From 9472212ceef3ebc8a44a17e6152a6ba1b4b7fc3c Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 5 May 2022 13:43:53 +0530 Subject: [PATCH 1034/1541] Format files --- lua/plugins/configs/bufferline.lua | 2 +- lua/plugins/configs/icons.lua | 2 +- lua/plugins/configs/statusline.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 2b80332..90adece 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -3,7 +3,7 @@ if not present then return end -local colors = require("base16").get_colors("base_30") +local colors = require("base16").get_colors "base_30" local options = { options = { diff --git a/lua/plugins/configs/icons.lua b/lua/plugins/configs/icons.lua index 78db7d3..27f83bd 100644 --- a/lua/plugins/configs/icons.lua +++ b/lua/plugins/configs/icons.lua @@ -4,7 +4,7 @@ if not present then return end -local colors = require("base16").get_colors("base_30") +local colors = require("base16").get_colors "base_30" local options = { override = { diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 7f01fba..1714662 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -4,7 +4,7 @@ if not present then return end -local colors = require("base16").get_colors("base_30") +local colors = require("base16").get_colors "base_30" local lsp = require "feline.providers.lsp" local lsp_severity = vim.diagnostic.severity From c74b049408f1ca2222c09084bfee14e449d8423a Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 5 May 2022 15:02:38 +0530 Subject: [PATCH 1035/1541] Update utils.lua --- lua/core/utils.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 311305d..d978a90 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -84,18 +84,13 @@ M.plugin_list = function(default_plugins) -- require if string is present local ok + if type(user_plugins) == "string" then ok, user_plugins = pcall(require, user_plugins) if ok and not type(user_plugins) == "table" then user_plugins = {} end end - if type(plug_override) == "string" then - ok, plug_override = pcall(require, plug_override) - if ok and not type(plug_override) == "table" then - plug_override = {} - end - end -- merge default + user plugin table default_plugins = vim.tbl_deep_extend("force", default_plugins, user_plugins) From 21513e3b288823bf4afaca0a43dd22e2300519a5 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 5 May 2022 17:14:51 +0530 Subject: [PATCH 1036/1541] hide gitignored files on nvimtree | exclude --- lua/plugins/configs/nvimtree.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index c319fc7..afd334f 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -45,6 +45,7 @@ g.nvim_tree_icons = { local options = { filters = { dotfiles = false, + exclude = { "custom" }, }, disable_netrw = true, hijack_netrw = true, @@ -64,7 +65,7 @@ local options = { }, git = { enable = false, - ignore = false, + ignore = true, }, actions = { open_file = { From 836ab5e98e57a379c18f693cbf927346c08f1b4c Mon Sep 17 00:00:00 2001 From: Magnus von Wachenfeldt Date: Thu, 5 May 2022 18:16:02 +0200 Subject: [PATCH 1037/1541] add mapping for :Telescope keymaps --- lua/core/mappings.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index f7a7303..dd14176 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -193,6 +193,7 @@ M.telescope = function() map("n", "fw", " :Telescope live_grep ") map("n", "fo", " :Telescope oldfiles ") map("n", "th", " :Telescope themes ") + map("n", "tk", " :Telescope keymaps ") -- pick a hidden term map("n", "W", " :Telescope terms ") From b05e90ba8b00d5199930a1b6e0f9fa8983600035 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 5 May 2022 22:49:51 +0530 Subject: [PATCH 1038/1541] rm highlight coloring of bufferline, web-devicons (#1025) --- lua/plugins/configs/bufferline.lua | 96 +----------------------------- lua/plugins/configs/icons.lua | 29 --------- 2 files changed, 2 insertions(+), 123 deletions(-) diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 90adece..2b16535 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -1,10 +1,9 @@ local present, bufferline = pcall(require, "bufferline") + if not present then return end -local colors = require("base16").get_colors "base_30" - local options = { options = { offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, @@ -24,6 +23,7 @@ local options = { separator_style = "thin", always_show_bufferline = true, diagnostics = false, + themable = true, custom_filter = function(buf_number) -- Func to filter out our managed/persistent split terms local present_type, type = pcall(function() @@ -42,98 +42,6 @@ local options = { return true end, }, - - highlights = { - background = { - guifg = colors.grey_fg, - guibg = colors.black2, - }, - - -- buffers - buffer_selected = { - guifg = colors.white, - guibg = colors.black, - gui = "bold", - }, - buffer_visible = { - guifg = colors.light_grey, - guibg = colors.black2, - }, - - -- for diagnostics = "nvim_lsp" - error = { - guifg = colors.light_grey, - guibg = colors.black2, - }, - error_diagnostic = { - guifg = colors.light_grey, - guibg = colors.black2, - }, - - -- close buttons - close_button = { - guifg = colors.light_grey, - guibg = colors.black2, - }, - close_button_visible = { - guifg = colors.light_grey, - guibg = colors.black2, - }, - close_button_selected = { - guifg = colors.red, - guibg = colors.black, - }, - fill = { - guifg = colors.grey_fg, - guibg = colors.black2, - }, - indicator_selected = { - guifg = colors.black, - guibg = colors.black, - }, - - -- modified - modified = { - guifg = colors.red, - guibg = colors.black2, - }, - modified_visible = { - guifg = colors.red, - guibg = colors.black2, - }, - modified_selected = { - guifg = colors.green, - guibg = colors.black, - }, - - -- separators - separator = { - guifg = colors.black2, - guibg = colors.black2, - }, - separator_visible = { - guifg = colors.black2, - guibg = colors.black2, - }, - separator_selected = { - guifg = colors.black2, - guibg = colors.black2, - }, - - -- tabs - tab = { - guifg = colors.light_grey, - guibg = colors.one_bg3, - }, - tab_selected = { - guifg = colors.black2, - guibg = colors.nord_blue, - }, - tab_close = { - guifg = colors.red, - guibg = colors.black, - }, - }, } -- check for any override diff --git a/lua/plugins/configs/icons.lua b/lua/plugins/configs/icons.lua index 27f83bd..c3f3ba0 100644 --- a/lua/plugins/configs/icons.lua +++ b/lua/plugins/configs/icons.lua @@ -4,143 +4,114 @@ if not present then return end -local colors = require("base16").get_colors "base_30" - local options = { override = { c = { icon = "", - color = colors.blue, name = "c", }, css = { icon = "", - color = colors.blue, name = "css", }, deb = { icon = "", - color = colors.cyan, name = "deb", }, Dockerfile = { icon = "", - color = colors.cyan, name = "Dockerfile", }, html = { icon = "", - color = colors.baby_pink, name = "html", }, jpeg = { icon = "", - color = colors.dark_purple, name = "jpeg", }, jpg = { icon = "", - color = colors.dark_purple, name = "jpg", }, js = { icon = "", - color = colors.sun, name = "js", }, kt = { icon = "󱈙", - color = colors.orange, name = "kt", }, lock = { icon = "", - color = colors.red, name = "lock", }, lua = { icon = "", - color = colors.blue, name = "lua", }, mp3 = { icon = "", - color = colors.white, name = "mp3", }, mp4 = { icon = "", - color = colors.white, name = "mp4", }, out = { icon = "", - color = colors.white, name = "out", }, png = { icon = "", - color = colors.dark_purple, name = "png", }, py = { icon = "", - color = colors.cyan, name = "py", }, ["robots.txt"] = { icon = "ﮧ", - color = colors.red, name = "robots", }, toml = { icon = "", - color = colors.blue, name = "toml", }, ts = { icon = "ﯤ", - color = colors.teal, name = "ts", }, ttf = { icon = "", - color = colors.white, name = "TrueTypeFont", }, rb = { icon = "", - color = colors.pink, name = "rb", }, rpm = { icon = "", - color = colors.orange, name = "rpm", }, vue = { icon = "﵂", - color = colors.vibrant_green, name = "vue", }, woff = { icon = "", - color = colors.white, name = "WebOpenFontFormat", }, woff2 = { icon = "", - color = colors.white, name = "WebOpenFontFormat2", }, xz = { icon = "", - color = colors.sun, name = "xz", }, zip = { icon = "", - color = colors.sun, name = "zip", }, }, From 0601876ab665648a5f761c0b5428cf1be8f3466a Mon Sep 17 00:00:00 2001 From: Mihnea Creanga <47532611+mihneaCR@users.noreply.github.com> Date: Fri, 6 May 2022 12:54:49 +0000 Subject: [PATCH 1039/1541] Update cmp.lua --- lua/plugins/configs/cmp.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index ddabb8a..dca01c5 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -69,7 +69,6 @@ local options = { end, { "i", "s", - "c", }), [""] = cmp.mapping(function(fallback) if cmp.visible() then @@ -82,7 +81,6 @@ local options = { end, { "i", "s", - "c", }), }, sources = { From b9a1038acd3b1d8f4f3e4e948baa6e500b384949 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 6 May 2022 20:14:57 +0530 Subject: [PATCH 1040/1541] feat: add theme toggle btn | update theme plugin path --- lua/core/default_config.lua | 3 ++- lua/core/options.lua | 1 + lua/plugins/configs/bufferline.lua | 22 +++++++++++++++++++++- lua/plugins/configs/statusline.lua | 2 +- lua/plugins/init.lua | 4 ++-- 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index ad91ead..3168638 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -20,7 +20,8 @@ M.options = { M.ui = { hl_override = {}, changed_themes = {}, - colors = "", -- path of your file that contains colors + colors = {}, -- dynamically generated, never edit this in chadrc + theme_toggle = { "onedark", "one_light" }, theme = "onedark", -- default theme transparency = false, } diff --git a/lua/core/options.lua b/lua/core/options.lua index 342a1cd..c9346c4 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -4,6 +4,7 @@ local g = vim.g -- use filetype.lua instead of filetype.vim g.did_load_filetypes = 0 g.do_filetype_lua = 1 +g.toggle_theme_icon = "  " opt.confirm = true opt.laststatus = 3 -- global statusline diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 2b16535..89ff4da 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -4,13 +4,23 @@ if not present then return end +vim.cmd [[ + function! Toggle_theme(a,b,c,d) + lua require('base46').toggle_theme() + endfunction + + function! Quit_vim(a,b,c,d) + qa + endfunction +]] + local options = { options = { offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, buffer_close_icon = "", modified_icon = "", close_icon = "", - show_close_icon = true, + show_close_icon = false, left_trunc_marker = "", right_trunc_marker = "", max_name_length = 14, @@ -24,6 +34,16 @@ local options = { always_show_bufferline = true, diagnostics = false, themable = true, + + custom_areas = { + right = function() + return { + { text = "%@Toggle_theme@" .. vim.g.toggle_theme_icon .. "%X" }, + { text = "%@Quit_vim@  %X" }, + } + end, + }, + custom_filter = function(buf_number) -- Func to filter out our managed/persistent split terms local present_type, type = pcall(function() diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 1714662..fdc4beb 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -4,7 +4,7 @@ if not present then return end -local colors = require("base16").get_colors "base_30" +local colors = require("base46").get_colors "base_30" local lsp = require "feline.providers.lsp" local lsp_severity = vim.diagnostic.severity diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 727b99c..4b9143f 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -18,10 +18,10 @@ local plugins = { ["NvChad/base46"] = { after = "packer.nvim", config = function() - local ok, base16 = pcall(require, "base16") + local ok, base46 = pcall(require, "base46") if ok then - base16.load_theme() + base46.load_theme() end end, }, From 78cf3e97ad97c8e6bde4faf2d3bdbefc7d4de3f1 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 7 May 2022 08:27:05 +0530 Subject: [PATCH 1041/1541] nvimtree: Don't exclude custom dir deliberatly this is not doable, can interfere with different repos --- lua/plugins/configs/nvimtree.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index afd334f..62959c4 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -45,7 +45,6 @@ g.nvim_tree_icons = { local options = { filters = { dotfiles = false, - exclude = { "custom" }, }, disable_netrw = true, hijack_netrw = true, From a1e33798b6588933e23eb49b32a1b208f773e448 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 7 May 2022 14:54:35 +0530 Subject: [PATCH 1042/1541] statusline: Make config overridable --- lua/plugins/configs/statusline.lua | 288 +++++++++++++++-------------- 1 file changed, 146 insertions(+), 142 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index fdc4beb..cbed3d2 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -4,12 +4,13 @@ if not present then return end -local colors = require("base46").get_colors "base_30" +local options = { + colors = require("base46").get_colors "base_30", + lsp = require "feline.providers.lsp", + lsp_severity = vim.diagnostic.severity, +} -local lsp = require "feline.providers.lsp" -local lsp_severity = vim.diagnostic.severity - -local icon_styles = { +options.icon_styles = { default = { left = "", right = " ", @@ -50,32 +51,26 @@ local icon_styles = { }, } -local separator = require("core.utils").load_config().plugins.options.statusline.separator_style -local separator_style = icon_styles[separator] +options.separator_style = options.icon_styles[require("core.utils").load_config().plugins.options.statusline.style] --- Initialize the components table -local components = { - active = {}, -} - -local main_icon = { - provider = separator_style.main_icon, +options.main_icon = { + provider = options.separator_style.main_icon, hl = { - fg = colors.statusline_bg, - bg = colors.nord_blue, + fg = options.colors.statusline_bg, + bg = options.colors.nord_blue, }, right_sep = { - str = separator_style.right, + str = options.separator_style.right, hl = { - fg = colors.nord_blue, - bg = colors.lightbg, + fg = options.colors.nord_blue, + bg = options.colors.lightbg, }, }, } -local file_name = { +options.file_name = { provider = function() local filename = vim.fn.expand "%:t" local extension = vim.fn.expand "%:e" @@ -87,41 +82,41 @@ local file_name = { return " " .. icon .. " " .. filename .. " " end, hl = { - fg = colors.white, - bg = colors.lightbg, + fg = options.colors.white, + bg = options.colors.lightbg, }, right_sep = { - str = separator_style.right, - hl = { fg = colors.lightbg, bg = colors.lightbg2 }, + str = options.separator_style.right, + hl = { fg = options.colors.lightbg, bg = options.colors.lightbg2 }, }, } -local dir_name = { +options.dir_name = { provider = function() local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") return "  " .. dir_name .. " " end, hl = { - fg = colors.grey_fg2, - bg = colors.lightbg2, + fg = options.colors.grey_fg2, + bg = options.colors.lightbg2, }, right_sep = { - str = separator_style.right, + str = options.separator_style.right, hi = { - fg = colors.lightbg2, - bg = colors.statusline_bg, + fg = options.colors.lightbg2, + bg = options.colors.statusline_bg, }, }, } -local diff = { +options.diff = { add = { provider = "git_diff_added", hl = { - fg = colors.grey_fg2, - bg = colors.statusline_bg, + fg = options.colors.grey_fg2, + bg = options.colors.statusline_bg, }, icon = " ", }, @@ -129,8 +124,8 @@ local diff = { change = { provider = "git_diff_changed", hl = { - fg = colors.grey_fg2, - bg = colors.statusline_bg, + fg = options.colors.grey_fg2, + bg = options.colors.statusline_bg, }, icon = "  ", }, @@ -138,62 +133,62 @@ local diff = { remove = { provider = "git_diff_removed", hl = { - fg = colors.grey_fg2, - bg = colors.statusline_bg, + fg = options.colors.grey_fg2, + bg = options.colors.statusline_bg, }, icon = "  ", }, } -local git_branch = { +options.git_branch = { provider = "git_branch", hl = { - fg = colors.grey_fg2, - bg = colors.statusline_bg, + fg = options.colors.grey_fg2, + bg = options.colors.statusline_bg, }, icon = "  ", } -local diagnostic = { +options.diagnostic = { error = { provider = "diagnostic_errors", enabled = function() - return lsp.diagnostics_exist(lsp_severity.ERROR) + return options.lsp.diagnostics_exist(options.lsp_severity.ERROR) end, - hl = { fg = colors.red }, + hl = { fg = options.colors.red }, icon = "  ", }, warning = { provider = "diagnostic_warnings", enabled = function() - return lsp.diagnostics_exist(lsp_severity.WARN) + return options.lsp.diagnostics_exist(options.lsp_severity.WARN) end, - hl = { fg = colors.yellow }, + hl = { fg = options.colors.yellow }, icon = "  ", }, hint = { provider = "diagnostic_hints", enabled = function() - return lsp.diagnostics_exist(lsp_severity.HINT) + return options.lsp.diagnostics_exist(options.lsp_severity.HINT) end, - hl = { fg = colors.grey_fg2 }, + hl = { fg = options.colors.grey_fg2 }, icon = "  ", }, info = { provider = "diagnostic_info", enabled = function() - return lsp.diagnostics_exist(lsp_severity.INFO) + return options.lsp.diagnostics_exist(options.lsp_severity.INFO) end, - hl = { fg = colors.green }, + hl = { fg = options.colors.green }, icon = "  ", }, } -local lsp_progress = { +options.lsp_progress = { provider = function() local Lsp = vim.lsp.util.get_progress_messages()[1] @@ -225,111 +220,111 @@ local lsp_progress = { return "" end, - hl = { fg = colors.green }, + hl = { fg = options.colors.green }, } -local lsp_icon = { +options.lsp_icon = { provider = function() if next(vim.lsp.buf_get_clients()) ~= nil then - return " LSP" + return "  LSP" else return "" end end, - hl = { fg = colors.grey_fg2, bg = colors.statusline_bg }, + hl = { fg = options.colors.grey_fg2, bg = options.colors.statusline_bg }, } -local mode_colors = { - ["n"] = { "NORMAL", colors.red }, - ["no"] = { "N-PENDING", colors.red }, - ["i"] = { "INSERT", colors.dark_purple }, - ["ic"] = { "INSERT", colors.dark_purple }, - ["t"] = { "TERMINAL", colors.green }, - ["v"] = { "VISUAL", colors.cyan }, - ["V"] = { "V-LINE", colors.cyan }, - [""] = { "V-BLOCK", colors.cyan }, - ["R"] = { "REPLACE", colors.orange }, - ["Rv"] = { "V-REPLACE", colors.orange }, - ["s"] = { "SELECT", colors.nord_blue }, - ["S"] = { "S-LINE", colors.nord_blue }, - [""] = { "S-BLOCK", colors.nord_blue }, - ["c"] = { "COMMAND", colors.pink }, - ["cv"] = { "COMMAND", colors.pink }, - ["ce"] = { "COMMAND", colors.pink }, - ["r"] = { "PROMPT", colors.teal }, - ["rm"] = { "MORE", colors.teal }, - ["r?"] = { "CONFIRM", colors.teal }, - ["!"] = { "SHELL", colors.green }, +options.mode_colors = { + ["n"] = { "NORMAL", options.colors.red }, + ["no"] = { "N-PENDING", options.colors.red }, + ["i"] = { "INSERT", options.colors.dark_purple }, + ["ic"] = { "INSERT", options.colors.dark_purple }, + ["t"] = { "TERMINAL", options.colors.green }, + ["v"] = { "VISUAL", options.colors.cyan }, + ["V"] = { "V-LINE", options.colors.cyan }, + [""] = { "V-BLOCK", options.colors.cyan }, + ["R"] = { "REPLACE", options.colors.orange }, + ["Rv"] = { "V-REPLACE", options.colors.orange }, + ["s"] = { "SELECT", options.colors.nord_blue }, + ["S"] = { "S-LINE", options.colors.nord_blue }, + [""] = { "S-BLOCK", options.colors.nord_blue }, + ["c"] = { "COMMAND", options.colors.pink }, + ["cv"] = { "COMMAND", options.colors.pink }, + ["ce"] = { "COMMAND", options.colors.pink }, + ["r"] = { "PROMPT", options.colors.teal }, + ["rm"] = { "MORE", options.colors.teal }, + ["r?"] = { "CONFIRM", options.colors.teal }, + ["!"] = { "SHELL", options.colors.green }, } -local chad_mode_hl = function() +options.chad_mode_hl = function() return { - fg = mode_colors[vim.fn.mode()][2], - bg = colors.one_bg, + fg = options.mode_colors[vim.fn.mode()][2], + bg = options.colors.one_bg, } end -local empty_space = { - provider = " " .. separator_style.left, +options.empty_space = { + provider = " " .. options.separator_style.left, hl = { - fg = colors.one_bg2, - bg = colors.statusline_bg, + fg = options.colors.one_bg2, + bg = options.colors.statusline_bg, }, } -- this matches the vi mode color -local empty_spaceColored = { - provider = separator_style.left, +options.empty_spaceColored = { + provider = options.separator_style.left, hl = function() return { - fg = mode_colors[vim.fn.mode()][2], - bg = colors.one_bg2, + fg = options.mode_colors[vim.fn.mode()][2], + bg = options.colors.one_bg2, } end, } -local mode_icon = { - provider = separator_style.vi_mode_icon, +options.mode_icon = { + provider = options.separator_style.vi_mode_icon, hl = function() return { - fg = colors.statusline_bg, - bg = mode_colors[vim.fn.mode()][2], + fg = options.colors.statusline_bg, + bg = options.mode_colors[vim.fn.mode()][2], } end, } -local empty_space2 = { +options.empty_space2 = { provider = function() - return " " .. mode_colors[vim.fn.mode()][1] .. " " + return " " .. options.mode_colors[vim.fn.mode()][1] .. " " end, - hl = chad_mode_hl, + hl = options.chad_mode_hl, } -local separator_right = { - provider = separator_style.left, +options.separator_right = { + provider = options.separator_style.left, hl = { - fg = colors.grey, - bg = colors.one_bg, + fg = options.colors.grey, + bg = options.colors.one_bg, }, } -local separator_right2 = { - provider = separator_style.left, +options.separator_right2 = { + provider = options.separator_style.left, hl = { - fg = colors.green, - bg = colors.grey, + fg = options.colors.green, + bg = options.colors.grey, }, } -local position_icon = { - provider = separator_style.position_icon, +options.position_icon = { + provider = options.separator_style.position_icon, hl = { - fg = colors.black, - bg = colors.green, + fg = options.colors.black, + bg = options.colors.green, }, } -local current_line = { +options.current_line = { provider = function() local current_line = vim.fn.line "." local total_line = vim.fn.line "$" @@ -344,54 +339,63 @@ local current_line = { end, hl = { - fg = colors.green, - bg = colors.one_bg, + fg = options.colors.green, + bg = options.colors.one_bg, }, } -local function add_table(a, b) - table.insert(a, b) +options = require("core.utils").load_override(options, "feline-nvim/feline.nvim") + +local function add_table(tbl, inject) + if inject then + table.insert(tbl, inject) + end end -- components are divided in 3 sections -local left = {} -local middle = {} -local right = {} +options.left = {} +options.middle = {} +options.right = {} -- left -add_table(left, main_icon) -add_table(left, file_name) -add_table(left, dir_name) -add_table(left, diff.add) -add_table(left, diff.change) -add_table(left, diff.remove) -add_table(left, diagnostic.error) -add_table(left, diagnostic.warning) -add_table(left, diagnostic.hint) -add_table(left, diagnostic.info) +add_table(options.left, options.main_icon) +add_table(options.left, options.file_name) +add_table(options.left, options.dir_name) +add_table(options.left, options.diff.add) +add_table(options.left, options.diff.change) +add_table(options.left, options.diff.remove) +add_table(options.left, options.diagnostic.error) +add_table(options.left, options.diagnostic.warning) +add_table(options.left, options.diagnostic.hint) +add_table(options.left, options.diagnostic.info) -add_table(middle, lsp_progress) +add_table(options.middle, options.lsp_progress) -- right -add_table(right, lsp_icon) -add_table(right, git_branch) -add_table(right, empty_space) -add_table(right, empty_spaceColored) -add_table(right, mode_icon) -add_table(right, empty_space2) -add_table(right, separator_right) -add_table(right, separator_right2) -add_table(right, position_icon) -add_table(right, current_line) +add_table(options.right, options.lsp_icon) +add_table(options.right, options.git_branch) +add_table(options.right, options.empty_space) +add_table(options.right, options.empty_spaceColored) +add_table(options.right, options.mode_icon) +add_table(options.right, options.empty_space2) +add_table(options.right, options.separator_right) +add_table(options.right, options.separator_right2) +add_table(options.right, options.position_icon) +add_table(options.right, options.current_line) -components.active[1] = left -components.active[2] = middle -components.active[3] = right +-- Initialize the components table +options.components = { active = {} } + +options.components.active[1] = options.left +options.components.active[2] = options.middle +options.components.active[3] = options.right + +options.theme = { + bg = options.colors.statusline_bg, + fg = options.colors.fg, +} feline.setup { - theme = { - bg = colors.statusline_bg, - fg = colors.fg, - }, - components = components, + theme = options.theme, + components = options.components, } From 5cb7aeed10a7a665780eb0d11180b562412e6dc4 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 7 May 2022 20:39:20 +0530 Subject: [PATCH 1043/1541] misc --- lua/plugins/configs/nvimtree.lua | 1 + lua/plugins/configs/statusline.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 62959c4..afd334f 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -45,6 +45,7 @@ g.nvim_tree_icons = { local options = { filters = { dotfiles = false, + exclude = { "custom" }, }, disable_netrw = true, hijack_netrw = true, diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index cbed3d2..85fd1f2 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -51,7 +51,7 @@ options.icon_styles = { }, } -options.separator_style = options.icon_styles[require("core.utils").load_config().plugins.options.statusline.style] +options.separator_style = options.icon_styles[require("core.utils").load_config().plugins.options.statusline.separator_style] options.main_icon = { provider = options.separator_style.main_icon, From d912bbe67cbb0cae96d4775a94318817f4cffd4c Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 8 May 2022 08:45:13 +0530 Subject: [PATCH 1044/1541] mapping: Fix p not copy selected text when clipboard in not set format statusline.lua --- lua/core/mappings.lua | 3 ++- lua/plugins/configs/statusline.lua | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index dd14176..5338657 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -9,7 +9,8 @@ local user_cmd = vim.api.nvim_create_user_command -- Useful when one wants to use that keymap for any other purpose -- Don't copy the replaced text after pasting in visual mode -map("v", "p", "p:let @+=@0") +-- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste +map("v", "p", 'p:let @+=@0:let @"=@0', { silent = true }) -- Allow moving the cursor through wrapped lines with j, k, and -- http ://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 85fd1f2..706c6db 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -51,7 +51,8 @@ options.icon_styles = { }, } -options.separator_style = options.icon_styles[require("core.utils").load_config().plugins.options.statusline.separator_style] +options.separator_style = + options.icon_styles[require("core.utils").load_config().plugins.options.statusline.separator_style] options.main_icon = { provider = options.separator_style.main_icon, From 08a16b9201c13eb244b14dcc8e1e078a0ac76725 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 8 May 2022 21:47:27 +0530 Subject: [PATCH 1045/1541] telescope: Add mapping to close picker with q in normal mode --- lua/plugins/configs/telescope.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index aff3cc0..5f2e817 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -50,6 +50,9 @@ local options = { qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, -- Developer configurations: Not meant for general override buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, + mappings = { + n = { ["q"] = require("telescope.actions").close }, + }, }, } From 8571787d70aa9852148420e5684eed138a2dd8da Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 10 May 2022 17:41:26 +0530 Subject: [PATCH 1046/1541] add dynamic header padding for dashboard | disable statusline in it --- lua/core/autocmds.lua | 17 ++++++++++++++++- lua/plugins/configs/alpha.lua | 7 ++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index b34ca9d..67be8b7 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -1,4 +1,19 @@ --- local autocmd = vim.api.nvim_create_autocmd +local autocmd = vim.api.nvim_create_autocmd + +-- Disable statusline in dashboard +autocmd("FileType", { + pattern = "alpha", + callback = function() + vim.opt.laststatus = 0 + end, +}) + +autocmd("BufUnload", { + buffer = 0, + callback = function() + vim.opt.laststatus = 3 + end, +}) -- Uncomment this if you want to open nvim with a dir -- autocmd("BufEnter", { diff --git a/lua/plugins/configs/alpha.lua b/lua/plugins/configs/alpha.lua index 8a29061..6a57bd6 100644 --- a/lua/plugins/configs/alpha.lua +++ b/lua/plugins/configs/alpha.lua @@ -74,9 +74,14 @@ options.buttons = { options = require("core.utils").load_override(options, "goolord/alpha-nvim") +-- dynamic header padding +local fn = vim.fn +local marginTopPercent = 0.3 +local headerPadding = fn.max { 2, fn.floor(fn.winheight(0) * marginTopPercent) } + alpha.setup { layout = { - { type = "padding", val = 9 }, + { type = "padding", val = headerPadding }, options.header, { type = "padding", val = 2 }, options.buttons, From 5a1240be82adda3545c5c13e5b795a14b74bf507 Mon Sep 17 00:00:00 2001 From: "Arman.H" Date: Tue, 10 May 2022 18:13:48 +0430 Subject: [PATCH 1047/1541] refactor: add utils to the global scope --- examples/init.lua | 2 +- init.lua | 1 + lua/core/mappings.lua | 8 +++----- lua/core/options.lua | 2 +- lua/core/utils.lua | 26 ++++++++++++-------------- lua/plugins/configs/alpha.lua | 2 +- lua/plugins/configs/bufferline.lua | 2 +- lua/plugins/configs/cmp.lua | 2 +- lua/plugins/configs/icons.lua | 2 +- lua/plugins/configs/lsp_installer.lua | 2 +- lua/plugins/configs/lspconfig.lua | 2 +- lua/plugins/configs/nvimtree.lua | 2 +- lua/plugins/configs/nvterm.lua | 2 +- lua/plugins/configs/others.lua | 8 ++++---- lua/plugins/configs/statusline.lua | 5 ++--- lua/plugins/configs/telescope.lua | 2 +- lua/plugins/configs/treesitter.lua | 2 +- lua/plugins/init.lua | 12 ++++++------ lua/plugins/packerInit.lua | 2 +- 19 files changed, 41 insertions(+), 45 deletions(-) diff --git a/examples/init.lua b/examples/init.lua index 721f625..4106717 100644 --- a/examples/init.lua +++ b/examples/init.lua @@ -1,7 +1,7 @@ -- example file i.e lua/custom/init.lua -- MAPPINGS -local map = require("core.utils").map +local map = nvchad.map map("n", "cc", ":Telescope ") map("n", "q", ":q ") diff --git a/init.lua b/init.lua index 96afe05..0bdd69a 100644 --- a/init.lua +++ b/init.lua @@ -5,6 +5,7 @@ if present then end local core_modules = { + "core.utils", "core.options", "core.autocmds", "core.mappings", diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 5338657..18273d6 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -1,6 +1,4 @@ -local utils = require "core.utils" - -local map = utils.map +local map = nvchad.map local cmd = vim.cmd local user_cmd = vim.api.nvim_create_user_command @@ -40,7 +38,7 @@ map("n", "", "k") map("n", "", "j") map("n", "x", function() - require("core.utils").close_buffer() + nvchad.close_buffer() end) map("n", "", " :%y+ ") -- copy whole file content @@ -92,7 +90,7 @@ cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" map("n", "uu", " :NvChadUpdate ") -- load overriden misc mappings -require("core.utils").load_config().mappings.misc() +nvchad.load_config().mappings.misc() local M = {} diff --git a/lua/core/options.lua b/lua/core/options.lua index c9346c4..096c2e0 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -84,4 +84,4 @@ vim.schedule(function() end) -- load user options if the file exists -require("core.utils").load_config().options.user() +nvchad.load_config().options.user() diff --git a/lua/core/utils.lua b/lua/core/utils.lua index d978a90..abd51ea 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -1,6 +1,6 @@ -local M = {} +_G.nvchad = {} -M.close_buffer = function(force) +nvchad.close_buffer = function(force) if vim.bo.buftype == "terminal" then vim.api.nvim_win_hide(0) return @@ -22,7 +22,7 @@ M.close_buffer = function(force) vim.cmd(close_cmd) end -M.load_config = function() +nvchad.load_config = function() local conf = require "core.default_config" -- attempt to load and merge a user config @@ -40,7 +40,7 @@ M.load_config = function() return conf end -M.map = function(mode, keys, command, opt) +nvchad.map = function(mode, keys, command, opt) local options = { silent = true } if opt then @@ -49,7 +49,7 @@ M.map = function(mode, keys, command, opt) if type(keys) == "table" then for _, keymap in ipairs(keys) do - M.map(mode, keymap, command, opt) + nvchad.map(mode, keymap, command, opt) end return end @@ -58,7 +58,7 @@ M.map = function(mode, keys, command, opt) end -- load plugin after entering vim ui -M.packer_lazy_load = function(plugin, timer) +nvchad.packer_lazy_load = function(plugin, timer) if plugin then timer = timer or 0 vim.defer_fn(function() @@ -68,8 +68,8 @@ M.packer_lazy_load = function(plugin, timer) end -- remove plugins defined in chadrc -M.remove_default_plugins = function(plugins) - local removals = require("core.utils").load_config().plugins.remove or {} +nvchad.remove_default_plugins = function(plugins) + local removals = nvchad.load_config().plugins.remove or {} if not vim.tbl_isempty(removals) then for _, plugin in pairs(removals) do plugins[plugin] = nil @@ -79,8 +79,8 @@ M.remove_default_plugins = function(plugins) end -- merge default/user plugin tables -M.plugin_list = function(default_plugins) - local user_plugins = require("core.utils").load_config().plugins.user +nvchad.plugin_list = function(default_plugins) + local user_plugins = nvchad.load_config().plugins.user -- require if string is present local ok @@ -106,8 +106,8 @@ M.plugin_list = function(default_plugins) return final_table end -M.load_override = function(default_table, plugin_name) - local user_table = require("core.utils").load_config().plugins.override[plugin_name] +nvchad.load_override = function(default_table, plugin_name) + local user_table = nvchad.load_config().plugins.override[plugin_name] if type(user_table) == "table" then default_table = vim.tbl_deep_extend("force", default_table, user_table) else @@ -115,5 +115,3 @@ M.load_override = function(default_table, plugin_name) end return default_table end - -return M diff --git a/lua/plugins/configs/alpha.lua b/lua/plugins/configs/alpha.lua index 6a57bd6..840cafd 100644 --- a/lua/plugins/configs/alpha.lua +++ b/lua/plugins/configs/alpha.lua @@ -72,7 +72,7 @@ options.buttons = { }, } -options = require("core.utils").load_override(options, "goolord/alpha-nvim") +options = nvchad.load_override(options, "goolord/alpha-nvim") -- dynamic header padding local fn = vim.fn diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 89ff4da..0d3a6f1 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -65,6 +65,6 @@ local options = { } -- check for any override -options = require("core.utils").load_override(options, "akinsho/bufferline.nvim") +options = nvchad.load_override(options, "akinsho/bufferline.nvim") bufferline.setup(options) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index dca01c5..ee03873 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -93,6 +93,6 @@ local options = { } -- check for any override -options = require("core.utils").load_override(options, "hrsh7th/nvim-cmp") +options = nvchad.load_override(options, "hrsh7th/nvim-cmp") cmp.setup(options) diff --git a/lua/plugins/configs/icons.lua b/lua/plugins/configs/icons.lua index c3f3ba0..7a92dd3 100644 --- a/lua/plugins/configs/icons.lua +++ b/lua/plugins/configs/icons.lua @@ -118,6 +118,6 @@ local options = { } -- check for any override -options = require("core.utils").load_override(options, "kyazdani42/nvim-web-devicons") +options = nvchad.load_override(options, "kyazdani42/nvim-web-devicons") devicons.setup(options) diff --git a/lua/plugins/configs/lsp_installer.lua b/lua/plugins/configs/lsp_installer.lua index 4f56305..112a318 100644 --- a/lua/plugins/configs/lsp_installer.lua +++ b/lua/plugins/configs/lsp_installer.lua @@ -31,6 +31,6 @@ local options = { max_concurrent_installers = 20, } -options = require("core.utils").load_override(options, "williamboman/nvim-lsp-installer") +options = nvchad.load_override(options, "williamboman/nvim-lsp-installer") lsp_installer.setup(options) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index a676ccf..05e9c67 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -54,7 +54,7 @@ lspconfig.sumneko_lua.setup { } -- requires a file containing user's lspconfigs -local addlsp_confs = require("core.utils").load_config().plugins.options.lspconfig.setup_lspconf +local addlsp_confs = nvchad.load_config().plugins.options.lspconfig.setup_lspconf if #addlsp_confs ~= 0 then require(addlsp_confs).setup_lsp(M.on_attach, capabilities) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index afd334f..ce046a3 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -80,6 +80,6 @@ local options = { } -- check for any override -options = require("core.utils").load_override(options, "kyazdani42/nvim-tree.lua") +options = nvchad.load_override(options, "kyazdani42/nvim-tree.lua") nvimtree.setup(options) diff --git a/lua/plugins/configs/nvterm.lua b/lua/plugins/configs/nvterm.lua index 720b6d2..0ca9f4b 100644 --- a/lua/plugins/configs/nvterm.lua +++ b/lua/plugins/configs/nvterm.lua @@ -38,6 +38,6 @@ local options = { enable_new_mappings = true, } -options = require("core.utils").load_override(options, "NvChad/nvterm") +options = nvchad.load_override(options, "NvChad/nvterm") nvterm.setup(options) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 55b2561..433560b 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -32,7 +32,7 @@ M.better_escape = function() keys = "", } - options = require("core.utils").load_override(options, "max397574/better-escape.nvim") + options = nvchad.load_override(options, "max397574/better-escape.nvim") escape.setup(options) end @@ -63,7 +63,7 @@ M.blankline = function() show_first_indent_level = false, } - options = require("core.utils").load_override(options, "lukas-reineke/indent-blankline.nvim") + options = nvchad.load_override(options, "lukas-reineke/indent-blankline.nvim") blankline.setup(options) end @@ -93,7 +93,7 @@ M.colorizer = function() }, } - options = require("core.utils").load_override(options, "NvChad/nvim-colorizer.lua") + options = nvchad.load_override(options, "NvChad/nvim-colorizer.lua") colorizer.setup(options["filetypes"], options["user_default_options"]) vim.cmd "ColorizerReloadAllBuffers" @@ -149,7 +149,7 @@ M.signature = function() padding = "", -- character to pad on left and right of signature can be ' ', or '|' etc } - options = require("core.utils").load_override(options, "ray-x/lsp_signature.nvim") + options = nvchad.load_override(options, "ray-x/lsp_signature.nvim") lsp_signature.setup(options) end diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 706c6db..6efae91 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -51,8 +51,7 @@ options.icon_styles = { }, } -options.separator_style = - options.icon_styles[require("core.utils").load_config().plugins.options.statusline.separator_style] +options.separator_style = options.icon_styles[nvchad.load_config().plugins.options.statusline.separator_style] options.main_icon = { provider = options.separator_style.main_icon, @@ -345,7 +344,7 @@ options.current_line = { }, } -options = require("core.utils").load_override(options, "feline-nvim/feline.nvim") +options = nvchad.load_override(options, "feline-nvim/feline.nvim") local function add_table(tbl, inject) if inject then diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 5f2e817..5e052f6 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -57,7 +57,7 @@ local options = { } -- check for any override -options = require("core.utils").load_override(options, "nvim-telescope/telescope.nvim") +options = nvchad.load_override(options, "nvim-telescope/telescope.nvim") telescope.setup(options) -- load extensions diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index a6e6483..b576b3f 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -16,6 +16,6 @@ local options = { } -- check for any override -options = require("core.utils").load_override(options, "nvim-treesitter/nvim-treesitter") +options = nvchad.load_override(options, "nvim-treesitter/nvim-treesitter") treesitter.setup(options) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 4b9143f..93d441c 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,4 +1,4 @@ -local plugin_settings = require("core.utils").load_config().plugins +local plugin_settings = nvchad.load_config().plugins local present, packer = pcall(require, plugin_settings.options.packer.init_file) if not present then @@ -87,7 +87,7 @@ local plugins = { require("plugins.configs.others").gitsigns() end, setup = function() - require("core.utils").packer_lazy_load "gitsigns.nvim" + nvchad.packer_lazy_load "gitsigns.nvim" end, }, @@ -96,7 +96,7 @@ local plugins = { ["williamboman/nvim-lsp-installer"] = { opt = true, setup = function() - require("core.utils").packer_lazy_load "nvim-lsp-installer" + nvchad.packer_lazy_load "nvim-lsp-installer" -- reload the current file so lsp actually starts for it vim.defer_fn(function() vim.cmd 'if &ft == "packer" | echo "" | else | silent! e %' @@ -123,7 +123,7 @@ local plugins = { ["andymass/vim-matchup"] = { opt = true, setup = function() - require("core.utils").packer_lazy_load "vim-matchup" + nvchad.packer_lazy_load "vim-matchup" end, }, @@ -229,9 +229,9 @@ local plugins = { }, } -plugins = require("core.utils").remove_default_plugins(plugins) +plugins = nvchad.remove_default_plugins(plugins) -- merge user plugin table & default plugin table -plugins = require("core.utils").plugin_list(plugins) +plugins = nvchad.plugin_list(plugins) return packer.startup(function(use) for _, v in pairs(plugins) do diff --git a/lua/plugins/packerInit.lua b/lua/plugins/packerInit.lua index 88be509..c763fa1 100644 --- a/lua/plugins/packerInit.lua +++ b/lua/plugins/packerInit.lua @@ -27,7 +27,7 @@ if not present then end end -local user_snapshot = require("core.utils").load_config().snapshot +local user_snapshot = nvchad.load_config().snapshot packer.init { display = { From c0ca91cb92ce99d9e5664ee215e6376b9dc4b6a7 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 10 May 2022 20:41:37 +0530 Subject: [PATCH 1048/1541] add nvchad string to sumneko globals --- lua/plugins/configs/lspconfig.lua | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 05e9c67..634f3e9 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -16,19 +16,22 @@ function M.on_attach(client, _) end local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities.textDocument.completion.completionItem.documentationFormat = { "markdown", "plaintext" } -capabilities.textDocument.completion.completionItem.snippetSupport = true -capabilities.textDocument.completion.completionItem.preselectSupport = true -capabilities.textDocument.completion.completionItem.insertReplaceSupport = true -capabilities.textDocument.completion.completionItem.labelDetailsSupport = true -capabilities.textDocument.completion.completionItem.deprecatedSupport = true -capabilities.textDocument.completion.completionItem.commitCharactersSupport = true -capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } } -capabilities.textDocument.completion.completionItem.resolveSupport = { - properties = { - "documentation", - "detail", - "additionalTextEdits", + +capabilities.textDocument.completion.completionItem = { + documentationFormat = { "markdown", "plaintext" }, + snippetSupport = true, + preselectSupport = true, + insertReplaceSupport = true, + labelDetailsSupport = true, + deprecatedSupport = true, + commitCharactersSupport = true, + tagSupport = { valueSet = { 1 } }, + resolveSupport = { + properties = { + "documentation", + "detail", + "additionalTextEdits", + }, }, } @@ -39,7 +42,7 @@ lspconfig.sumneko_lua.setup { settings = { Lua = { diagnostics = { - globals = { "vim" }, + globals = { "vim", "nvchad" }, }, workspace = { library = { From 4fa0b4ae7dfb493b3bcc15a1e9ca2646a9daa45f Mon Sep 17 00:00:00 2001 From: vlaw Date: Mon, 9 May 2022 19:54:02 +0800 Subject: [PATCH 1049/1541] feat(config): configs for telescope extensions --- lua/core/default_config.lua | 3 +++ lua/plugins/configs/telescope.lua | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 3168638..21ebfb8 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -41,6 +41,9 @@ M.plugins = { statusline = { separator_style = "default", -- default/round/slant/block/arrow }, + telescope = { + extensions = { "themes", "terms" } + } }, -- add, modify, remove plugins diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 5e052f6..1970cc8 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -61,7 +61,7 @@ options = nvchad.load_override(options, "nvim-telescope/telescope.nvim") telescope.setup(options) -- load extensions -local extensions = { "themes", "terms" } +local extensions = nvchad.load_config().plugins.options.telescope.extensions pcall(function() for _, ext in ipairs(extensions) do From 0844431d37b762c4fa0ff37dba28280848cf3f09 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 12 May 2022 18:26:01 +0530 Subject: [PATCH 1050/1541] breaking change : re-implement custom mappings | simplify it | add whichkey fixes #1057 , #1047 --- examples/init.lua | 8 +- init.lua | 15 +- lua/core/autocmds.lua | 2 +- lua/core/commands.lua | 37 +++ lua/core/default_config.lua | 10 +- lua/core/mappings.lua | 433 +++++++++++++++++------------ lua/core/utils.lua | 19 ++ lua/plugins/configs/bufferline.lua | 2 +- lua/plugins/configs/lspconfig.lua | 2 - lua/plugins/configs/nvterm.lua | 11 - lua/plugins/configs/others.lua | 18 ++ lua/plugins/configs/telescope.lua | 6 +- lua/plugins/configs/whichkey.lua | 73 +++++ lua/plugins/init.lua | 33 +-- lua/plugins/packerInit.lua | 13 +- 15 files changed, 442 insertions(+), 240 deletions(-) create mode 100644 lua/core/commands.lua create mode 100644 lua/plugins/configs/whichkey.lua diff --git a/examples/init.lua b/examples/init.lua index 4106717..809432d 100644 --- a/examples/init.lua +++ b/examples/init.lua @@ -1,9 +1,3 @@ -- example file i.e lua/custom/init.lua --- MAPPINGS -local map = nvchad.map - -map("n", "cc", ":Telescope ") -map("n", "q", ":q ") - --- require("my autocmds file") or just declare them here +-- load your globals, autocmds here or anything .__. diff --git a/init.lua b/init.lua index 0bdd69a..be2faf0 100644 --- a/init.lua +++ b/init.lua @@ -4,15 +4,16 @@ if present then impatient.enable_profile() end -local core_modules = { - "core.utils", - "core.options", - "core.autocmds", - "core.mappings", +local modules = { + "utils", + "options", + "autocmds", + "commands", } -for _, module in ipairs(core_modules) do - local ok, err = pcall(require, module) +for _, module in ipairs(modules) do + local ok, err = pcall(require, "core." .. module) + if not ok then error("Error loading " .. module .. "\n\n" .. err) end diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index 67be8b7..409abbc 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -15,7 +15,7 @@ autocmd("BufUnload", { end, }) --- Uncomment this if you want to open nvim with a dir +-- open nvim with a dir while still lazy loading nvimtree -- autocmd("BufEnter", { -- callback = function() -- if vim.api.nvim_buf_get_option(0, "buftype") ~= "terminal" then diff --git a/lua/core/commands.lua b/lua/core/commands.lua new file mode 100644 index 0000000..9c12009 --- /dev/null +++ b/lua/core/commands.lua @@ -0,0 +1,37 @@ +local user_cmd = vim.api.nvim_create_user_command +local cmd = vim.cmd + +-- snapshot stuff +user_cmd("PackerSnapshot", function(info) + require "plugins" + require("packer").snapshot(info.args) +end, { nargs = "+" }) + +user_cmd("PackerSnapshotDelete", function(info) + require "plugins" + require("packer.snapshot").delete(info.args) +end, { nargs = "+" }) + +user_cmd("PackerSnapshotRollback", function(info) + require "plugins" + require("packer").rollback(info.args) +end, { nargs = "+" }) + +-- Add Packer commands because we are not loading it at startup + +local packer_cmd = function(callback) + return function() + require "plugins" + require("packer")[callback]() + end +end + +user_cmd("PackerClean", packer_cmd "clean", {}) +user_cmd("PackerCompile", packer_cmd "compile", {}) +user_cmd("PackerInstall", packer_cmd "install", {}) +user_cmd("PackerStatus", packer_cmd "status", {}) +user_cmd("PackerSync", packer_cmd "sync", {}) +user_cmd("PackerUpdate", packer_cmd "update", {}) + +-- add NvChadUpdate command and mapping +cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 21ebfb8..e9a4804 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -31,10 +31,6 @@ M.plugins = { remove = {}, options = { - packer = { - init_file = "plugins.packerInit", - snapshot = nil, - }, lspconfig = { setup_lspconf = "", -- path of lspconfig file }, @@ -50,9 +46,7 @@ M.plugins = { user = {}, } --- non plugin only -M.mappings = { - misc = function() end, -} +-- check core.mappings for table structure +M.mappings = require "core.mappings" return M diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 18273d6..b849c1b 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -1,201 +1,288 @@ -local map = nvchad.map -local cmd = vim.cmd -local user_cmd = vim.api.nvim_create_user_command - --- This is a wrapper function made to disable a plugin mapping from chadrc --- If keys are nil, false or empty string, then the mapping will be not applied --- Useful when one wants to use that keymap for any other purpose - --- Don't copy the replaced text after pasting in visual mode --- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste -map("v", "p", 'p:let @+=@0:let @"=@0', { silent = true }) - --- Allow moving the cursor through wrapped lines with j, k, and --- http ://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ --- empty mode is same as using :map --- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour - -map({ "n", "x", "o" }, "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) -map({ "n", "x", "o" }, "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) -map("", "", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) -map("", "", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) - --- use ESC to turn off search highlighting -map("n", "", " :noh ") - --- move cursor within insert mode -map("i", "", "") -map("i", "", "") -map("i", "", "") -map("i", "", "") -map("i", "", "") -map("i", "", "^i") - --- navigation between windows -map("n", "", "h") -map("n", "", "l") -map("n", "", "k") -map("n", "", "j") - -map("n", "x", function() - nvchad.close_buffer() -end) - -map("n", "", " :%y+ ") -- copy whole file content -map("n", "", " :enew ") -- new buffer -map("n", "b", " :tabnew ") -- new tabs -map("n", "n", " :set nu! ") -map("n", "rn", " :set rnu! ") -- relative line numbers -map("n", "", " :w ") -- ctrl + s to save file - --- terminal mappings - --- get out of terminal mode -map("t", { "jk" }, "") - --- Add Packer commands because we are not loading it at startup - -local packer_cmd = function(callback) - return function() - require "plugins" - require("packer")[callback]() - end -end - --- snapshot stuff -user_cmd("PackerSnapshot", function(info) - require "plugins" - require("packer").snapshot(info.args) -end, { nargs = "+" }) - -user_cmd("PackerSnapshotDelete", function(info) - require "plugins" - require("packer.snapshot").delete(info.args) -end, { nargs = "+" }) - -user_cmd("PackerSnapshotRollback", function(info) - require "plugins" - require("packer").rollback(info.args) -end, { nargs = "+" }) - -user_cmd("PackerClean", packer_cmd "clean", {}) -user_cmd("PackerCompile", packer_cmd "compile", {}) -user_cmd("PackerInstall", packer_cmd "install", {}) -user_cmd("PackerStatus", packer_cmd "status", {}) -user_cmd("PackerSync", packer_cmd "sync", {}) -user_cmd("PackerUpdate", packer_cmd "update", {}) - --- add NvChadUpdate command and mapping -cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" -map("n", "uu", " :NvChadUpdate ") - --- load overriden misc mappings -nvchad.load_config().mappings.misc() +-- n, v, i are mode names local M = {} --- below are all plugin related mappings +M.general = { -M.bufferline = function() - map("n", "", " :BufferLineCycleNext ") - map("n", "", " :BufferLineCyclePrev ") -end + i = { -M.comment = function() - map("n", "/", " :lua require('Comment.api').toggle_current_linewise()") - map("v", "/", " :lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())") -end + -- go to beginning and end + [""] = { "^i", "論 beginning of line" }, + [""] = { "", "壟 end of line" }, -M.lspconfig = function() + -- navigate within insert mode + [""] = { "", " move left" }, + [""] = { "", " move right" }, + [""] = { "", " move down" }, + [""] = { "", " move up" }, + }, + + n = { + + -- switch between windows + [""] = { "h", " window left" }, + [""] = { "l", " window right" }, + [""] = { "j", " window down" }, + [""] = { "k", " window up" }, + + -- save + [""] = { " w ", "﬚ save file" }, + + -- Copy all + [""] = { " %y+ ", " copy whole file" }, + + -- line numbers + ["n"] = { " set nu! ", " toggle line number" }, + ["rn"] = { " set rnu! ", " toggle relative number" }, + + -- update nvchad + ["uu"] = { " :NvChadUpdate ", " update nvchad" }, + + ["tt"] = { + function() + require("base46").toggle_theme() + end, + + " toggle theme", + }, + }, +} + +M.bufferline = { + + n = { + -- new buffer + ["n"] = { " enew ", "烙 new buffer" }, + + -- cycle through buffers + [""] = { " BufferLineCycleNext ", " cycle next buffer" }, + [""] = { " BufferLineCyclePrev ", " cycle prev buffer" }, + + -- close buffer + hide terminal buffer + ["x"] = { + function() + nvchad.close_buffer() + end, + " close buffer", + }, + }, +} + +M.comment = { + + -- toggle comment in both modes + n = { + ["/"] = { " lua require('Comment.api').toggle_current_linewise()", "蘒 toggle comment" }, + }, + + v = { + ["/"] = { + " lua require('Comment.api').toggle_current_linewise_op(vim.fn.visualmode())", + "蘒 toggle comment", + }, + }, +} + +M.lspconfig = { -- See ` :help vim.lsp.*` for documentation on any of the below functions - map("n", "gD", function() - vim.lsp.buf.declaration() - end) - map("n", "gd", function() - vim.lsp.buf.definition() - end) + n = { + ["gD"] = { + function() + vim.lsp.buf.declaration() + end, + " lsp declaration", + }, - map("n", "K", function() - vim.lsp.buf.hover() - end) + ["gd"] = { + function() + vim.lsp.buf.definition() + end, + " lsp definition", + }, - map("n", "gi", function() - vim.lsp.buf.implementation() - end) + ["K"] = { + function() + vim.lsp.buf.hover() + end, + " lsp hover", + }, - map("n", "", function() - vim.lsp.buf.signature_help() - end) + ["gi"] = { + function() + vim.lsp.buf.implementation() + end, + " lsp implementation", + }, - map("n", "D", function() - vim.lsp.buf.type_definition() - end) + [""] = { + function() + vim.lsp.buf.signature_help() + end, + " lsp signature_help", + }, - map("n", "ra", function() - vim.lsp.buf.rename() - end) + ["D"] = { + function() + vim.lsp.buf.type_definition() + end, + " lsp definition type", + }, - map("n", "ca", function() - vim.lsp.buf.code_action() - end) + ["ra"] = { + function() + vim.lsp.buf.rename() + end, + " lsp rename", + }, - map("n", "gr", function() - vim.lsp.buf.references() - end) + ["ca"] = { + function() + vim.lsp.buf.code_action() + end, + " lsp code_action", + }, - map("n", "f", function() - vim.diagnostic.open_float() - end) + ["gr"] = { + function() + vim.lsp.buf.references() + end, + " lsp references", + }, - map("n", "[d", function() - vim.diagnostic.goto_prev() - end) + ["f"] = { + function() + vim.diagnostic.open_float() + end, + " floating diagnostic", + }, - map("n", "d]", function() - vim.diagnostic.goto_next() - end) + ["[d"] = { + function() + vim.diagnostic.goto_prev() + end, + " goto prev", + }, - map("n", "q", function() - vim.diagnostic.setloclist() - end) + ["d]"] = { + function() + vim.diagnostic.goto_next() + end, + " goto_next", + }, - map("n", "fm", function() - vim.lsp.buf.formatting() - end) + ["q"] = { + function() + vim.diagnostic.setloclist() + end, + " diagnostic setloclist", + }, - map("n", "wa", function() - vim.lsp.buf.add_workspace_folder() - end) + ["fm"] = { + function() + vim.lsp.buf.formatting() + end, + " lsp formatting", + }, - map("n", "wr", function() - vim.lsp.buf.remove_workspace_folder() - end) + ["wa"] = { + function() + vim.lsp.buf.add_workspace_folder() + end, + " add workspace folder", + }, - map("n", "wl", function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end) -end + ["wr"] = { + function() + vim.lsp.buf.remove_workspace_folder() + end, + " remove workspace folder", + }, -M.nvimtree = function() - map("n", "", " :NvimTreeToggle ") - map("n", "e", " :NvimTreeFocus ") -end + ["wl"] = { + function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end, + " list workspace folders", + }, + }, +} -M.telescope = function() - map("n", "fb", " :Telescope buffers ") - map("n", "ff", " :Telescope find_files ") - map("n", "fa", " :Telescope find_files follow=true no_ignore=true hidden=true ") - map("n", "cm", " :Telescope git_commits ") - map("n", "gt", " :Telescope git_status ") - map("n", "fh", " :Telescope help_tags ") - map("n", "fw", " :Telescope live_grep ") - map("n", "fo", " :Telescope oldfiles ") - map("n", "th", " :Telescope themes ") - map("n", "tk", " :Telescope keymaps ") +M.nvimtree = { - -- pick a hidden term - map("n", "W", " :Telescope terms ") -end + n = { + -- toggle + [""] = { " NvimTreeToggle ", " toggle nvimtree" }, + + -- focus + ["e"] = { " NvimTreeFocus ", " focus nvimtree" }, + }, +} + +M.telescope = { + n = { + -- find + ["ff"] = { " Telescope find_files ", " find files" }, + ["fa"] = { " Telescope find_files follow=true no_ignore=true hidden=true ", " find all" }, + ["fw"] = { " Telescope live_grep ", " live grep" }, + ["fb"] = { " Telescope buffers ", " find buffers" }, + ["fh"] = { " Telescope help_tags ", " help page" }, + ["fo"] = { " Telescope oldfiles ", " find oldfiles" }, + ["tk"] = { " Telescope keys ", " show keys" }, + + -- git + ["cm"] = { " Telescope git_commits ", " git commits" }, + ["gt"] = { " Telescope git_status ", " git status" }, + + -- pick a hidden term + ["pt"] = { " Telescope terms ", " pick hidden term" }, + + -- theme switcher + ["th"] = { " Telescope themes ", " nvchad themes" }, + }, +} + +M.nvterm = { + + n = { + -- toggle + [""] = { + function() + require("nvterm.terminal").toggle "float" + end, + " toggle floating term", + }, + + [""] = { + function() + require("nvterm.terminal").toggle "horizontal" + end, + " toggle horizontal term", + }, + + [""] = { + function() + require("nvterm.terminal").toggle "vertical" + end, + " toggle vertical term", + }, + + -- new + + ["h"] = { + function() + require("nvterm.terminal").new "horizontal" + end, + " new horizontal term", + }, + + ["v"] = { + function() + require("nvterm.terminal").new "vertical" + end, + " new vertical term", + }, + }, +} return M diff --git a/lua/core/utils.lua b/lua/core/utils.lua index abd51ea..077970c 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -57,6 +57,25 @@ nvchad.map = function(mode, keys, command, opt) vim.keymap.set(mode, keys, command, opt) end +-- For those who disabled whichkey + +nvchad.no_WhichKey_map = function() + local mappings = nvchad.load_config().mappings + + for key, _ in pairs(mappings) do + for mode, _ in pairs(mappings[key]) do + for keybind, cmd in pairs(mappings[key][mode]) do + -- disabled keys will not have cmd set + if cmd ~= "" then + nvchad.map(mode, keybind, cmd[1]) + end + end + end + end + + require("plugins.configs.others").misc_mappings() +end + -- load plugin after entering vim ui nvchad.packer_lazy_load = function(plugin, timer) if plugin then diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 0d3a6f1..4292d3b 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -39,7 +39,7 @@ local options = { right = function() return { { text = "%@Toggle_theme@" .. vim.g.toggle_theme_icon .. "%X" }, - { text = "%@Quit_vim@  %X" }, + { text = "%@Quit_vim@ %X" }, } end, }, diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 634f3e9..f43dc1e 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -11,8 +11,6 @@ require("plugins.configs.others").lsp_handlers() function M.on_attach(client, _) client.resolved_capabilities.document_formatting = false client.resolved_capabilities.document_range_formatting = false - - require("core.mappings").lspconfig() end local capabilities = vim.lsp.protocol.make_client_capabilities() diff --git a/lua/plugins/configs/nvterm.lua b/lua/plugins/configs/nvterm.lua index 0ca9f4b..5e13ec2 100644 --- a/lua/plugins/configs/nvterm.lua +++ b/lua/plugins/configs/nvterm.lua @@ -24,17 +24,6 @@ local options = { close_on_exit = true, auto_insert = true, }, - mappings = { - toggle = { - float = "", - horizontal = "", - vertical = "", - }, - new = { - horizontal = "h", - vertical = "v", - }, - }, enable_new_mappings = true, } diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 433560b..b5420fd 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -211,4 +211,22 @@ M.gitsigns = function() } end +M.misc_mappings = function() + local map = nvchad.map + + -- Don't copy the replaced text after pasting in visual mode + map("v", "p", '"_dP') + + -- Allow moving the cursor through wrapped lines with j, k, and + -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ + -- empty mode is same as using :map + -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour + map("", "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) + map("", "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) + map("", "", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) + map("", "", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) + + -- esscape from terminal mode + map("t", "jk", "") +end return M diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 1970cc8..4637492 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -54,6 +54,8 @@ local options = { n = { ["q"] = require("telescope.actions").close }, }, }, + + extensions_list = { "themes", "terms" }, } -- check for any override @@ -61,10 +63,8 @@ options = nvchad.load_override(options, "nvim-telescope/telescope.nvim") telescope.setup(options) -- load extensions -local extensions = nvchad.load_config().plugins.options.telescope.extensions - pcall(function() - for _, ext in ipairs(extensions) do + for _, ext in ipairs(options.extensions_list) do telescope.load_extension(ext) end end) diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua new file mode 100644 index 0000000..3dfd7a9 --- /dev/null +++ b/lua/plugins/configs/whichkey.lua @@ -0,0 +1,73 @@ +local present, wk = pcall(require, "which-key") + +if not present then + return +end + +local options = { + + -- NOTE : this mode_opts table isnt in the default whichkey config + -- Its added here so you could configure it in chadrc + + mode_opts = { + n = { + mode = "n", + }, + + v = { + mode = "v", + }, + + i = { + mode = "i", + }, + + t = { + mode = "t", + }, + }, + + icons = { + breadcrumb = "»", -- symbol used in the command line area that shows your active key combo + separator = "  ", -- symbol used between a key and it's label + group = "+", -- symbol prepended to a group + }, + + popup_mappings = { + scroll_down = "", -- binding to scroll down inside the popup + scroll_up = "", -- binding to scroll up inside the popup + }, + + window = { + border = "none", -- none/single/double/shadow + }, + + layout = { + spacing = 6, -- spacing between columns + }, + + hidden = { "", "", "", "", "call", "lua", "^:", "^ " }, + + triggers_blacklist = { + -- list of mode / prefixes that should never be hooked by WhichKey + i = { "j", "k" }, + v = { "j", "k" }, + }, +} + +require("plugins.configs.others").misc_mappings() + +local mappings = nvchad.load_config().mappings + +-- register mappings +for mode, opt in pairs(options.mode_opts) do + for key, _ in pairs(mappings) do + if mappings[key][mode] then + wk.register(mappings[key][mode], opt) + end + end +end + +options = nvchad.load_override(options, "folke/which-key.nvim") + +wk.setup(options) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 93d441c..24739b3 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,5 +1,4 @@ -local plugin_settings = nvchad.load_config().plugins -local present, packer = pcall(require, plugin_settings.options.packer.init_file) +local present, packer = pcall(require, "plugins.packerInit") if not present then return false @@ -48,11 +47,6 @@ local plugins = { ["akinsho/bufferline.nvim"] = { after = "nvim-web-devicons", - - setup = function() - require("core.mappings").bufferline() - end, - config = function() require "plugins.configs.bufferline" end, @@ -194,11 +188,6 @@ local plugins = { ["numToStr/Comment.nvim"] = { module = "Comment", keys = { "gc", "gb" }, - - setup = function() - require("core.mappings").comment() - end, - config = function() require("plugins.configs.others").comment() end, @@ -207,10 +196,6 @@ local plugins = { -- file managing , picker etc ["kyazdani42/nvim-tree.lua"] = { cmd = { "NvimTreeToggle", "NvimTreeFocus" }, - setup = function() - require("core.mappings").nvimtree() - end, - config = function() require "plugins.configs.nvimtree" end, @@ -218,18 +203,24 @@ local plugins = { ["nvim-telescope/telescope.nvim"] = { cmd = "Telescope", - - setup = function() - require("core.mappings").telescope() - end, - config = function() require "plugins.configs.telescope" end, }, + + ["folke/which-key.nvim"] = { + opt = true, + setup = function() + nvchad.packer_lazy_load "which-key.nvim" + end, + config = function() + require "plugins.configs.whichkey" + end, + }, } plugins = nvchad.remove_default_plugins(plugins) + -- merge user plugin table & default plugin table plugins = nvchad.plugin_list(plugins) diff --git a/lua/plugins/packerInit.lua b/lua/plugins/packerInit.lua index c763fa1..50a29f5 100644 --- a/lua/plugins/packerInit.lua +++ b/lua/plugins/packerInit.lua @@ -27,21 +27,22 @@ if not present then end end -local user_snapshot = nvchad.load_config().snapshot - -packer.init { +local options = { display = { open_fn = function() - return require("packer.util").float { border = "single" } + return require("packer.util").float { border = "double" } end, - prompt_border = "single", }, git = { clone_timeout = 6000, -- seconds }, auto_clean = true, compile_on_sync = true, - snapshot = user_snapshot, + snapshot = nil, } +options = nvchad.load_override(options, "wbthomason/packer.nvim") + +packer.init(options) + return packer From 25305eca9252b1c4892af1fc15dce91339ee7691 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 12 May 2022 19:27:11 +0530 Subject: [PATCH 1051/1541] clean up --- lua/core/default_config.lua | 1 - lua/core/mappings.lua | 2 +- lua/core/utils.lua | 14 ++++---------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index e9a4804..cdfc9c5 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -20,7 +20,6 @@ M.options = { M.ui = { hl_override = {}, changed_themes = {}, - colors = {}, -- dynamically generated, never edit this in chadrc theme_toggle = { "onedark", "one_light" }, theme = "onedark", -- default theme transparency = false, diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index b849c1b..85f57a9 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -52,7 +52,7 @@ M.bufferline = { n = { -- new buffer - ["n"] = { " enew ", "烙 new buffer" }, + [""] = { " enew ", "烙 new buffer" }, -- cycle through buffers [""] = { " BufferLineCycleNext ", " cycle next buffer" }, diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 077970c..10965b0 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -89,11 +89,13 @@ end -- remove plugins defined in chadrc nvchad.remove_default_plugins = function(plugins) local removals = nvchad.load_config().plugins.remove or {} + if not vim.tbl_isempty(removals) then for _, plugin in pairs(removals) do plugins[plugin] = nil end end + return plugins end @@ -101,16 +103,6 @@ end nvchad.plugin_list = function(default_plugins) local user_plugins = nvchad.load_config().plugins.user - -- require if string is present - local ok - - if type(user_plugins) == "string" then - ok, user_plugins = pcall(require, user_plugins) - if ok and not type(user_plugins) == "table" then - user_plugins = {} - end - end - -- merge default + user plugin table default_plugins = vim.tbl_deep_extend("force", default_plugins, user_plugins) @@ -127,10 +119,12 @@ end nvchad.load_override = function(default_table, plugin_name) local user_table = nvchad.load_config().plugins.override[plugin_name] + if type(user_table) == "table" then default_table = vim.tbl_deep_extend("force", default_table, user_table) else default_table = default_table end + return default_table end From 932bd6a74c968df5152ab53ad4ec37ec23339044 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 13 May 2022 01:21:35 +0530 Subject: [PATCH 1052/1541] add new screenshots, nvchad description & history --- .github/README.md | 111 +++++++++++++++++++--------------------------- 1 file changed, 46 insertions(+), 65 deletions(-) diff --git a/.github/README.md b/.github/README.md index 99b37ec..c8bbcad 100644 --- a/.github/README.md +++ b/.github/README.md @@ -31,23 +31,35 @@ ## Showcase -
-
-
-
+ + + +( Zoom in the screenshot ) + + + + +## What is it? + +- NvChad is a neovim config written in lua aiming to provide a base configuration with very beautiful UI and blazing fast startuptime (around 0.02 secs ~ 0.07 secs). We tweak UI plugins such as telescope, nvim-tree, bufferline etc well to provide an asethetic UI experience. + +- Lazy loading is done 93% of the time meaning that plugins will not be loaded by default, they will be loaded only when required also at specific commands, events etc. This lowers the startuptime and it was like 0.07~ secs tested on an old pentium machine 1.4ghz + 4gb ram & HDD. + +- NvChad isnt a framework! Its supposed to be used as a "base" config, so users could tweak the defaults well, can also remove the things they dont like in the default config and build their config on top of it. Users can tweak the entire default config while staying in their custom config (lua/custom dir). This is the control center of the user's config and gitignored so the users can stay update to-date with NvChad's latest config (main branch) while still controlling it with their chadrc (file that controls entire custom dir) ## Theme Showcase
Images (Click to expand!) -![onedark](https://user-images.githubusercontent.com/59060246/130129880-59ab1ad5-9aa6-4f50-9ddd-d8dde0c16257.png) -![nord](https://user-images.githubusercontent.com/59060246/130129890-c01117df-ac3d-40dd-b95d-2681c2461bb4.png) -![gruvchad](https://user-images.githubusercontent.com/59060246/130129897-a68b1585-f42d-4325-8482-102dd2fe1e9e.png) -![everforest](https://user-images.githubusercontent.com/59060246/130129901-5e582f3e-b776-4d0c-9790-be5ae738b5a8.png) +![main themes](https://github.com/NvChad/nvchad.github.io/blob/src/static/img/screenshots/four_Themes.png) +![radium](https://github.com/NvChad/nvchad.github.io/blob/src/static/img/screenshots/radium1.png) +![radium](https://github.com/NvChad/nvchad.github.io/blob/src/static/img/screenshots/radium2.png) +![radium](https://github.com/NvChad/nvchad.github.io/blob/src/static/img/screenshots/radium3.png) +(Note: these are just 4-5 themes, NvChad has around 27+ themes)
-## Very useful plugins used +## UI related plugins used
Images (Click to expand!) @@ -97,67 +109,31 @@ Without/with Treesitter:
-## Credits +## Plugins list -- [Elianiva](https://github.com/elianiva) helped me with NeoVim Lua related issues many times, NvChad wouldn't exist without his help at all. -- @lorvethe for making the beautiful NvChad logo. - -## Features - -- Many beautiful themes to choose from. -- Fast plugin loading. -- File navigation with [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua). -- Managing tabs, buffers with [bufferline.nvim](https://github.com/akinsho/bufferline.nvim). -- Beautiful and configurable icons with [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons). -- Pretty and functional statusline with [feline.nvim](https://github.com/Famiu/feline.nvim). -- Git diffs and more with [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) . -- NeoVim Lsp configuration with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig). -- Autocompletion with [nvim-cmp](https://github.com/hrsh7th/nvim-cmp). +- Many beautiful themes, theme toggler by [our base46 plugin](https://github.com/NvChad/base46) +- Inbuilt terminal toggling & management with [Nvterm](https://github.com/NvChad/nvterm) +- NvChad updater, hide & unhide terminal buffers with [NvChad extensions](https://github.com/NvChad/extensions) +- File navigation with [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua) +- Managing tabs, buffers with [bufferline.nvim](https://github.com/akinsho/bufferline.nvim) +- Beautiful and configurable icons with [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) +- Pretty and functional statusline with [feline.nvim](https://github.com/Famiu/feline.nvim) +- Git diffs and more with [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) +- NeoVim Lsp configuration with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) and [lsp-installer](https://github.com/williamboman/nvim-lsp-installer/) +- Autocompletion with [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) - File searching, previewing image and text files and more with [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim). -- Syntax highlighting with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter). -- Autoclosing braces and html tags with [nvim-autopairs](https://github.com/windwp/nvim-autopairs). -- Indentlines with [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim). -- Useful snippets with [LuaSnip](https://github.com/L3MON4D3/LuaSnip). +- Syntax highlighting with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) +- Autoclosing braces and html tags with [nvim-autopairs](https://github.com/windwp/nvim-autopairs) +- Indentlines with [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) +- Useful snippets with [friendly snippets](https://github.com/rafamadriz/friendly-snippets) + [LuaSnip](https://github.com/L3MON4D3/LuaSnip). +- Popup mappings keysheet [whichkey.nvim](https://github.com/folke/which-key.nvim) -## Bloat +## History -To everyone who thinks that NvChad is bloat: Bloat means different things to everyone. - -NvChad has 38 plugins installed by default, yet it is still very fast because it uses the Packer plugin manager. Packer.nvim allows you to lazy load plugins, meaning they only get loaded when absolutely required. Furthermore, you can disable plugins you don't use in `chadrc.lua`. - - - -# TODO - -NvChad is focusing more on improving its already existing plugins and features instead of adding more plugins. Things you can do to help currently are: - -- Improving base plugins configurations -- Debloating the config. -- Adding more themes. - -## Try NvChad in a Docker container - -This will leave your current Neovim configuration untouched. Once you exit Neovim, the image is deleted. - -```zsh - docker run -w /root -it --rm alpine:edge sh -uelic ' - apk add git nodejs neovim ripgrep alpine-sdk --update - git clone https://github.com/NvChad/NvChad ~/.config/nvim - nvim -c "autocmd User PackerComplete quitall" -c "PackerSync" - nvim - ' -``` - -## Chadributors - -
- - - -## Warning - -If you have an issue with a plugin in NvChad, first you should report it to NvChad to see if it's an issue with it. +- I (@siduck i.e creator of NvChad) in my initial days of learning to program wanted a lightweight IDE for writing code, I had a very low end system, which was like 1.4ghz pentium + 4gb ram & HDD. I was into web dev so many suggested vscode but that thing was very heavy on my system, It took more ram than my browser! ( minimal ungoogled chromium ) so I never tried it again, sublime text was nice but the fear of using proprietary software XD for a linux user bugged me a lot. Then I tried doom-emacs which looked pretty but it was slow and emacs was kinda hard, I tried lunarvim but too lazy to read the docs which got me into vim and got into neovim lua stuff real quick. I wanted to make the config ery pretty and fast. +- I'm decent at ricing i.e customizing system and making it look pretty so I posted my neovim rice on [neovim subreddit](https://www.reddit.com/r/neovim/comments/m3xl4f/neovim_rice/), my neovim-dotfiles github repo blew up and then I had to come up with a name, I was amazed by the chad meme lol so I put NvChad as the name, the chad word in the name doesnt literally mean the chad guy but in the sense such as chad linux vs windows i.e meaning superior,best etc. I + ## :gift_heart: Support I'm (@siduck) really very sorry to remove the previous charity links but I had to do it for various reasons. A lot has been going here regarding financial issues and I do need some support if it's possible from your end. I haven't graduated yet and it would be great to earn some stuff as that'd help me with daily minor expenses. If you like NvChad and would like to support it via donation then I'll gladly accept it. Dont worry! NvChad will still stay alive & active without your donations! I will remove the sponsor button and re-add the charity links once I get a job, probably a year or two. @@ -166,3 +142,8 @@ I'm (@siduck) really very sorry to remove the previous charity links but I had t [![paypal](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white)](https://paypal.me/siduck76) [![buymeacoffee](https://img.shields.io/badge/Buy_Me_A_Coffee-FFDD00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/siduck) [![patreon](https://img.shields.io/badge/Patreon-F96854?style=for-the-badge&logo=patreon&logoColor=white)](https://www.patreon.com/siduck) + +## Credits + +- [Elianiva](https://github.com/elianiva) helped me with NeoVim Lua related issues many times, NvChad wouldn't exist without his help at all as he helped me in my initial neovim journey! +- @lorvethe for making the beautiful NvChad logo. From 63651e90e654a6f91a282a7b6367421170d1bd85 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 13 May 2022 01:29:49 +0530 Subject: [PATCH 1053/1541] Update README.md --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index c8bbcad..9f7a274 100644 --- a/.github/README.md +++ b/.github/README.md @@ -132,7 +132,7 @@ Without/with Treesitter: - I (@siduck i.e creator of NvChad) in my initial days of learning to program wanted a lightweight IDE for writing code, I had a very low end system, which was like 1.4ghz pentium + 4gb ram & HDD. I was into web dev so many suggested vscode but that thing was very heavy on my system, It took more ram than my browser! ( minimal ungoogled chromium ) so I never tried it again, sublime text was nice but the fear of using proprietary software XD for a linux user bugged me a lot. Then I tried doom-emacs which looked pretty but it was slow and emacs was kinda hard, I tried lunarvim but too lazy to read the docs which got me into vim and got into neovim lua stuff real quick. I wanted to make the config ery pretty and fast. -- I'm decent at ricing i.e customizing system and making it look pretty so I posted my neovim rice on [neovim subreddit](https://www.reddit.com/r/neovim/comments/m3xl4f/neovim_rice/), my neovim-dotfiles github repo blew up and then I had to come up with a name, I was amazed by the chad meme lol so I put NvChad as the name, the chad word in the name doesnt literally mean the chad guy but in the sense such as chad linux vs windows i.e meaning superior,best etc. I +- I'm decent at ricing i.e customizing system and making it look pretty so I posted my neovim rice on [neovim subreddit](https://www.reddit.com/r/neovim/comments/m3xl4f/neovim_rice/), my neovim-dotfiles github repo blew up and then I had to come up with a name, I was amazed by the chad meme lol so I put NvChad as the name, the chad word in the name doesnt literally mean the chad guy but in the sense such as chad linux vs windows i.e meaning superior,best etc. NvChad was made for my personal use but it gained some popularity which inspired me to make a public config i.e config usable by many and less hassle to update, without the custom config stuff users would have to keep a track of every commit and copy paste git diffs to manually update nvchad. ## :gift_heart: Support From c7a4d4e3376b1684c1dd117d53e94480b2d7c9fe Mon Sep 17 00:00:00 2001 From: Leon Heidelbach Date: Thu, 12 May 2022 22:13:00 +0200 Subject: [PATCH 1054/1541] feat: fixed & added mappings & users can now add their custom "mode_opt" --- lua/core/mappings.lua | 22 +++++++++++++++++++--- lua/plugins/configs/whichkey.lua | 7 ++++--- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 85f57a9..379f233 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -224,11 +224,11 @@ M.telescope = { -- find ["ff"] = { " Telescope find_files ", " find files" }, ["fa"] = { " Telescope find_files follow=true no_ignore=true hidden=true ", " find all" }, - ["fw"] = { " Telescope live_grep ", " live grep" }, + ["fw"] = { " Telescope live_grep ", " live grep" }, ["fb"] = { " Telescope buffers ", " find buffers" }, ["fh"] = { " Telescope help_tags ", " help page" }, - ["fo"] = { " Telescope oldfiles ", " find oldfiles" }, - ["tk"] = { " Telescope keys ", " show keys" }, + ["fo"] = { " Telescope oldfiles ", " find oldfiles" }, + ["tk"] = { " Telescope keymaps ", " show keys" }, -- git ["cm"] = { " Telescope git_commits ", " git commits" }, @@ -285,4 +285,20 @@ M.nvterm = { }, } +M.whichkey = { + n = { + ["wK"] = { + function() + vim.cmd("WhichKey") + end, " which-key all keymaps", + }, + ["wk"] = { + function() + local input = vim.fn.input("WhichKey: ") + vim.cmd("WhichKey " .. input) + end, " which-key query lookup", + }, + } +} + return M diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index 3dfd7a9..73eb042 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -61,9 +61,10 @@ local mappings = nvchad.load_config().mappings -- register mappings for mode, opt in pairs(options.mode_opts) do - for key, _ in pairs(mappings) do - if mappings[key][mode] then - wk.register(mappings[key][mode], opt) + for _, value in pairs(mappings) do + if value[mode] then + local mode_opts = value["mode_opts"] and vim.tbl_deep_extend("force", opt, value["mode_opts"]) or opt + wk.register(value[mode], mode_opts) end end end From 96cd08ef455b8b813f3cc89420339afe70cce895 Mon Sep 17 00:00:00 2001 From: Leon Heidelbach Date: Sat, 14 May 2022 01:31:13 +0200 Subject: [PATCH 1055/1541] fix: default mappings can now be properly disabled, independent of load order --- lua/core/utils.lua | 57 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 50 insertions(+), 7 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 10965b0..57d4ad7 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -31,6 +31,7 @@ nvchad.load_config = function() -- merge user config if it exists and is a table; otherwise display an error local user_config = require "custom.chadrc" if type(user_config) == "table" then + conf.mappings = nvchad.prune_key_map(conf.mappings, user_config.mappings, { "mode_opts" }) conf = vim.tbl_deep_extend("force", conf, user_config) else error "User config (chadrc.lua) *must* return a table!" @@ -40,6 +41,46 @@ nvchad.load_config = function() return conf end +-- reduces a given keymap to a table of modes each containing a list of key maps for that mode +nvchad.reduce_key_map = function(key_map, ignore_modes) + local prune_keys = {} + for _, modes in pairs(key_map) do + for mode, mappings in pairs(modes) do + if not vim.tbl_contains(ignore_modes, mode) then + prune_keys[mode] = prune_keys[mode] and prune_keys[mode] or {} + prune_keys[mode] = vim.list_extend(prune_keys[mode], vim.tbl_keys(mappings)) + end + end + end + return prune_keys +end + +-- prune keys from a key map table by matching against another key map table +nvchad.prune_key_map = function(key_map, prune_map, ignore_modes) + if not prune_map then return key_map end + if not key_map then return prune_map end + local prune_keys = nvchad.reduce_key_map(prune_map, ignore_modes) + + for ext, modes in pairs(key_map) do + for mode, mappings in pairs(modes) do + if not vim.tbl_contains(ignore_modes, mode) then + if prune_keys[mode] then + -- filter mappings table so that only keys that are not in user_mappings are left + local filtered_mappings = {} + for k, v in pairs(mappings) do + if not vim.tbl_contains(prune_keys[mode], k) then + filtered_mappings[k] = v + end + end + key_map[ext][mode] = filtered_mappings + end + end + end + end + + return key_map +end + nvchad.map = function(mode, keys, command, opt) local options = { silent = true } @@ -58,16 +99,18 @@ nvchad.map = function(mode, keys, command, opt) end -- For those who disabled whichkey - nvchad.no_WhichKey_map = function() local mappings = nvchad.load_config().mappings + local ignore_modes = { "mode_opts" } - for key, _ in pairs(mappings) do - for mode, _ in pairs(mappings[key]) do - for keybind, cmd in pairs(mappings[key][mode]) do - -- disabled keys will not have cmd set - if cmd ~= "" then - nvchad.map(mode, keybind, cmd[1]) + for _, value in pairs(mappings) do + for mode, keymap in pairs(value) do + if not vim.tbl_contains(ignore_modes, mode) then + for keybind, cmd in pairs(keymap) do + -- disabled keys will not have cmd set + if cmd ~= "" then + nvchad.map(mode, keybind, cmd[1]) + end end end end From 970ddf79e59a0f235f2b1b62de05bb31412dbdbb Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 14 May 2022 11:18:29 +0530 Subject: [PATCH 1056/1541] add: LspInfo window borders --- lua/plugins/configs/lspconfig.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index f43dc1e..13d74ba 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -8,6 +8,16 @@ local M = {} require("plugins.configs.others").lsp_handlers() +-- Borders for LspInfo winodw +local win = require "lspconfig.ui.windows" +local _default_opts = win.default_opts + +win.default_opts = function(options) + local opts = _default_opts(options) + opts.border = "double" + return opts +end + function M.on_attach(client, _) client.resolved_capabilities.document_formatting = false client.resolved_capabilities.document_range_formatting = false From 0369a8ad77f22d2ad996d8846b1535d856e53dc3 Mon Sep 17 00:00:00 2001 From: Yura Shatunov <46374280+volucris1@users.noreply.github.com> Date: Sat, 14 May 2022 14:21:17 +0700 Subject: [PATCH 1057/1541] Update mappings.lua Now you can toggle terminal in terminal --- lua/core/mappings.lua | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 379f233..8208076 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -243,9 +243,32 @@ M.telescope = { } M.nvterm = { + t = { + -- toggle in terminal mode + [""] = { + function() + require("nvterm.terminal").toggle "float" + end, + " toggle floating term", + }, + [""] = { + function() + require("nvterm.terminal").toggle "horizontal" + end, + " toggle horizontal term", + }, + + [""] = { + function() + require("nvterm.terminal").toggle "vertical" + end, + " toggle vertical term", + }, + }, + n = { - -- toggle + -- toggle in normal mode [""] = { function() require("nvterm.terminal").toggle "float" From ef27ad4f2dde02ac42d0cfb23674b02d485d0d1b Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 14 May 2022 16:23:02 +0530 Subject: [PATCH 1058/1541] add mapping for escaping terminal --- lua/core/mappings.lua | 22 ++++++++++++++++------ lua/plugins/configs/others.lua | 3 --- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 8208076..aabcc78 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -1,5 +1,9 @@ -- n, v, i are mode names +local function termcodes(str) + return vim.api.nvim_replace_termcodes(str, true, true, true) +end + local M = {} M.general = { @@ -46,6 +50,10 @@ M.general = { " toggle theme", }, }, + + t = { + ["jk"] = { termcodes "", " escape terminal mode" }, + }, } M.bufferline = { @@ -266,7 +274,7 @@ M.nvterm = { " toggle vertical term", }, }, - + n = { -- toggle in normal mode [""] = { @@ -312,16 +320,18 @@ M.whichkey = { n = { ["wK"] = { function() - vim.cmd("WhichKey") - end, " which-key all keymaps", + vim.cmd "WhichKey" + end, + " which-key all keymaps", }, ["wk"] = { function() - local input = vim.fn.input("WhichKey: ") + local input = vim.fn.input "WhichKey: " vim.cmd("WhichKey " .. input) - end, " which-key query lookup", + end, + " which-key query lookup", }, - } + }, } return M diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index b5420fd..2012df8 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -225,8 +225,5 @@ M.misc_mappings = function() map("", "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) map("", "", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) map("", "", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) - - -- esscape from terminal mode - map("t", "jk", "") end return M From 1bc1d9c52af3ad6f2d12ebc68dca2db7fa02dd54 Mon Sep 17 00:00:00 2001 From: Leon Heidelbach Date: Sat, 14 May 2022 14:56:55 +0200 Subject: [PATCH 1059/1541] fix: disabled key maps are now completely removed from which-key --- lua/core/utils.lua | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 57d4ad7..e76eb7b 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -24,6 +24,7 @@ end nvchad.load_config = function() local conf = require "core.default_config" + local ignore_modes = { "mode_opts" } -- attempt to load and merge a user config local chadrc_exists = vim.fn.filereadable(vim.fn.stdpath "config" .. "/lua/custom/chadrc.lua") == 1 @@ -31,7 +32,8 @@ nvchad.load_config = function() -- merge user config if it exists and is a table; otherwise display an error local user_config = require "custom.chadrc" if type(user_config) == "table" then - conf.mappings = nvchad.prune_key_map(conf.mappings, user_config.mappings, { "mode_opts" }) + conf.mappings = nvchad.prune_key_map(conf.mappings, user_config.mappings, ignore_modes) + user_config.mappings = nvchad.prune_key_map(user_config.mappings, "rm_disabled", ignore_modes) conf = vim.tbl_deep_extend("force", conf, user_config) else error "User config (chadrc.lua) *must* return a table!" @@ -41,7 +43,7 @@ nvchad.load_config = function() return conf end --- reduces a given keymap to a table of modes each containing a list of key maps for that mode +-- reduces a given keymap to a table of modes each containing a list of key maps nvchad.reduce_key_map = function(key_map, ignore_modes) local prune_keys = {} for _, modes in pairs(key_map) do @@ -55,11 +57,25 @@ nvchad.reduce_key_map = function(key_map, ignore_modes) return prune_keys end +-- remove disabled mappings from a given key map +nvchad.remove_disabled_mappings = function(key_map) + local clean_map = {} + if type(key_map) == "table" then + for k, v in pairs(key_map) do + if v ~= nil and v ~= "" then clean_map[k] = v end + end + else + return key_map + end + return clean_map +end + -- prune keys from a key map table by matching against another key map table nvchad.prune_key_map = function(key_map, prune_map, ignore_modes) if not prune_map then return key_map end if not key_map then return prune_map end - local prune_keys = nvchad.reduce_key_map(prune_map, ignore_modes) + local prune_keys = type(prune_map) == "table" and nvchad.reduce_key_map(prune_map, ignore_modes) + or { n = {}, v = {}, i = {}, t = {} } for ext, modes in pairs(key_map) do for mode, mappings in pairs(modes) do @@ -69,7 +85,7 @@ nvchad.prune_key_map = function(key_map, prune_map, ignore_modes) local filtered_mappings = {} for k, v in pairs(mappings) do if not vim.tbl_contains(prune_keys[mode], k) then - filtered_mappings[k] = v + filtered_mappings[k] = nvchad.remove_disabled_mappings(v) end end key_map[ext][mode] = filtered_mappings @@ -171,3 +187,4 @@ nvchad.load_override = function(default_table, plugin_name) return default_table end + From 2439d2514fd7680eb6cd13097ca0cf474725a1d8 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 14 May 2022 21:27:18 +0530 Subject: [PATCH 1060/1541] add nvchad_theme global in options.lua --- lua/core/options.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/core/options.lua b/lua/core/options.lua index 096c2e0..26727c7 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -1,6 +1,8 @@ local opt = vim.opt local g = vim.g +g.nvchad_theme = nvchad.load_config().ui.theme + -- use filetype.lua instead of filetype.vim g.did_load_filetypes = 0 g.do_filetype_lua = 1 From 0e8c73527c5e70ad6ea194f4cdccee4aa680bb7b Mon Sep 17 00:00:00 2001 From: Leon Heidelbach Date: Sat, 14 May 2022 19:42:02 +0200 Subject: [PATCH 1061/1541] fix: handled bug when no mappings table was set in chadrc --- lua/core/utils.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index e76eb7b..0394160 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -32,8 +32,8 @@ nvchad.load_config = function() -- merge user config if it exists and is a table; otherwise display an error local user_config = require "custom.chadrc" if type(user_config) == "table" then - conf.mappings = nvchad.prune_key_map(conf.mappings, user_config.mappings, ignore_modes) - user_config.mappings = nvchad.prune_key_map(user_config.mappings, "rm_disabled", ignore_modes) + conf.mappings = conf.mappings and nvchad.prune_key_map(conf.mappings, user_config.mappings, ignore_modes) or {} + user_config.mappings = user_config.mappings and nvchad.prune_key_map(user_config.mappings, "rm_disabled", ignore_modes) or {} conf = vim.tbl_deep_extend("force", conf, user_config) else error "User config (chadrc.lua) *must* return a table!" @@ -187,4 +187,3 @@ nvchad.load_override = function(default_table, plugin_name) return default_table end - From 359a286aeacb0b8f4a725d88d9c1b853a752e53e Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 15 May 2022 08:12:09 +0530 Subject: [PATCH 1062/1541] fix comment.nvim visual commenting not working (#1081) --- lua/core/mappings.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index aabcc78..ad0d2d6 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -80,12 +80,18 @@ M.comment = { -- toggle comment in both modes n = { - ["/"] = { " lua require('Comment.api').toggle_current_linewise()", "蘒 toggle comment" }, + ["/"] = { + function() + require("Comment.api").toggle_current_linewise() + end, + + "蘒 toggle comment", + }, }, v = { ["/"] = { - " lua require('Comment.api').toggle_current_linewise_op(vim.fn.visualmode())", + "lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())", "蘒 toggle comment", }, }, From 3fc888c147ba187fb876e8244f59eb96a071d0c4 Mon Sep 17 00:00:00 2001 From: Leon Heidelbach Date: Sun, 15 May 2022 14:10:39 +0200 Subject: [PATCH 1063/1541] fix: remove disabled maps from which-key again --- lua/core/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 0394160..327ba24 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -64,7 +64,7 @@ nvchad.remove_disabled_mappings = function(key_map) for k, v in pairs(key_map) do if v ~= nil and v ~= "" then clean_map[k] = v end end - else + elseif not key_map == nil and not key_map == "" then return key_map end return clean_map From ec62a5cee85f841089ed3e8528dc0cc33a060ca6 Mon Sep 17 00:00:00 2001 From: Leon Heidelbach Date: Sun, 15 May 2022 15:41:27 +0200 Subject: [PATCH 1064/1541] fix: handle bug when which-key is not installed --- lua/core/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 327ba24..6bb985f 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -124,7 +124,7 @@ nvchad.no_WhichKey_map = function() if not vim.tbl_contains(ignore_modes, mode) then for keybind, cmd in pairs(keymap) do -- disabled keys will not have cmd set - if cmd ~= "" then + if cmd ~= "" and cmd[1] then nvchad.map(mode, keybind, cmd[1]) end end From 5716bbcca0c122075ebe447bfc88c1ab13b91180 Mon Sep 17 00:00:00 2001 From: Leon Heidelbach Date: Mon, 16 May 2022 14:31:47 +0200 Subject: [PATCH 1065/1541] fix: which-key group names can now be properly set with M.groups & refactoring --- lua/core/utils.lua | 18 ++++++++---------- lua/plugins/configs/whichkey.lua | 18 +++++++++++++----- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 6bb985f..63063a8 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -60,12 +60,13 @@ end -- remove disabled mappings from a given key map nvchad.remove_disabled_mappings = function(key_map) local clean_map = {} + if key_map == nil or key_map == "" then + return key_map + end if type(key_map) == "table" then for k, v in pairs(key_map) do if v ~= nil and v ~= "" then clean_map[k] = v end end - elseif not key_map == nil and not key_map == "" then - return key_map end return clean_map end @@ -80,17 +81,14 @@ nvchad.prune_key_map = function(key_map, prune_map, ignore_modes) for ext, modes in pairs(key_map) do for mode, mappings in pairs(modes) do if not vim.tbl_contains(ignore_modes, mode) then - if prune_keys[mode] then - -- filter mappings table so that only keys that are not in user_mappings are left - local filtered_mappings = {} - for k, v in pairs(mappings) do - if not vim.tbl_contains(prune_keys[mode], k) then - filtered_mappings[k] = nvchad.remove_disabled_mappings(v) - end + -- filter mappings table so that only keys that are not in user_mappings are left + for b, _ in pairs(mappings) do + if prune_keys[mode] and vim.tbl_contains(prune_keys[mode], b) then + key_map[ext][mode][b] = nil end - key_map[ext][mode] = filtered_mappings end end + key_map[ext][mode] = nvchad.remove_disabled_mappings(mappings) end end diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index 73eb042..b561d6a 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -58,17 +58,25 @@ local options = { require("plugins.configs.others").misc_mappings() local mappings = nvchad.load_config().mappings +local mapping_groups = { groups = vim.deepcopy(mappings.groups) } +mappings.disabled = nil +mappings.groups = nil -- register mappings -for mode, opt in pairs(options.mode_opts) do - for _, value in pairs(mappings) do - if value[mode] then - local mode_opts = value["mode_opts"] and vim.tbl_deep_extend("force", opt, value["mode_opts"]) or opt - wk.register(value[mode], mode_opts) +local function register_mappings(maps, opts) + for mode, opt in pairs(opts.mode_opts) do + for _, value in pairs(maps) do + if value[mode] then + local mode_opts = value["mode_opts"] and vim.tbl_deep_extend("force", opt, value["mode_opts"]) or opt + wk.register(value[mode], mode_opts) + end end end end +register_mappings(mappings, options) +register_mappings(mapping_groups, options) + options = nvchad.load_override(options, "folke/which-key.nvim") wk.setup(options) From a8fd371b088ca7f51ae5991a19abfd284de1676d Mon Sep 17 00:00:00 2001 From: "Arman.H" Date: Mon, 16 May 2022 17:39:22 +0430 Subject: [PATCH 1066/1541] fix(cmp): change the confirmation behaviour to `Insert` --- lua/plugins/configs/cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index ee03873..45a10c7 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -55,7 +55,7 @@ local options = { [""] = cmp.mapping.complete(), [""] = cmp.mapping.close(), [""] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, + behavior = cmp.ConfirmBehavior.Insert, select = true, }, [""] = cmp.mapping(function(fallback) From 8c16f487b50389f798d05e22f7cbc9cdb54c709c Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 20 May 2022 23:13:18 +0530 Subject: [PATCH 1067/1541] move statusline highlights to base46 repo related to https://github.com/NvChad/base46/issues/77 --- lua/plugins/configs/statusline.lua | 206 +++++++++++++---------------- 1 file changed, 89 insertions(+), 117 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 6efae91..d0b84e3 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -56,17 +56,11 @@ options.separator_style = options.icon_styles[nvchad.load_config().plugins.optio options.main_icon = { provider = options.separator_style.main_icon, - hl = { - fg = options.colors.statusline_bg, - bg = options.colors.nord_blue, - }, + hl = "FelineIcon", right_sep = { str = options.separator_style.right, - hl = { - fg = options.colors.nord_blue, - bg = options.colors.lightbg, - }, + hl = "FelineIconSeparator", }, } @@ -81,14 +75,12 @@ options.file_name = { end return " " .. icon .. " " .. filename .. " " end, - hl = { - fg = options.colors.white, - bg = options.colors.lightbg, - }, + + hl = "FelineFileName", right_sep = { str = options.separator_style.right, - hl = { fg = options.colors.lightbg, bg = options.colors.lightbg2 }, + hl = "FelineFileName_Separator", }, } @@ -98,57 +90,45 @@ options.dir_name = { return "  " .. dir_name .. " " end, - hl = { - fg = options.colors.grey_fg2, - bg = options.colors.lightbg2, - }, + hl = "FelineDirName", + right_sep = { str = options.separator_style.right, - hi = { - fg = options.colors.lightbg2, - bg = options.colors.statusline_bg, - }, + hi = "FelineDirName_Separator", }, } +-- Git + options.diff = { add = { provider = "git_diff_added", - hl = { - fg = options.colors.grey_fg2, - bg = options.colors.statusline_bg, - }, + hl = "Feline_diffIcons", icon = " ", }, change = { provider = "git_diff_changed", - hl = { - fg = options.colors.grey_fg2, - bg = options.colors.statusline_bg, - }, + hl = "Feline_diffIcons", + icon = "  ", }, remove = { provider = "git_diff_removed", - hl = { - fg = options.colors.grey_fg2, - bg = options.colors.statusline_bg, - }, + hl = "Feline_diffIcons", icon = "  ", }, } options.git_branch = { provider = "git_branch", - hl = { - fg = options.colors.grey_fg2, - bg = options.colors.statusline_bg, - }, + hl = "Feline_diffIcons", icon = "  ", } +-- lsp + options.diagnostic = { error = { provider = "diagnostic_errors", @@ -156,7 +136,7 @@ options.diagnostic = { return options.lsp.diagnostics_exist(options.lsp_severity.ERROR) end, - hl = { fg = options.colors.red }, + hl = "Feline_lspError", icon = "  ", }, @@ -165,7 +145,8 @@ options.diagnostic = { enabled = function() return options.lsp.diagnostics_exist(options.lsp_severity.WARN) end, - hl = { fg = options.colors.yellow }, + + hl = "Feline_lspWarning", icon = "  ", }, @@ -174,7 +155,7 @@ options.diagnostic = { enabled = function() return options.lsp.diagnostics_exist(options.lsp_severity.HINT) end, - hl = { fg = options.colors.grey_fg2 }, + hl = "Feline_LspHints", icon = "  ", }, @@ -183,11 +164,25 @@ options.diagnostic = { enabled = function() return options.lsp.diagnostics_exist(options.lsp_severity.INFO) end, - hl = { fg = options.colors.green }, + hl = "Feline_LspInfo", icon = "  ", }, } +options.lsp_icon = { + provider = function() + if next(vim.lsp.buf_get_clients()) ~= nil then + local lsp_name = vim.lsp.get_active_clients()[1].name + + return "  LSP ~ " .. lsp_name .. " " + else + return "" + end + end, + + hl = "Feline_LspIcon", +} + options.lsp_progress = { provider = function() local Lsp = vim.lsp.util.get_progress_messages()[1] @@ -196,11 +191,7 @@ options.lsp_progress = { local msg = Lsp.message or "" local percentage = Lsp.percentage or 0 local title = Lsp.title or "" - local spinners = { - "", - "", - "", - } + local spinners = { "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏" } local success_icon = { "", @@ -220,56 +211,43 @@ options.lsp_progress = { return "" end, - hl = { fg = options.colors.green }, + hl = "Feline_LspProgress", } -options.lsp_icon = { - provider = function() - if next(vim.lsp.buf_get_clients()) ~= nil then - return "  LSP" - else - return "" - end - end, - hl = { fg = options.colors.grey_fg2, bg = options.colors.statusline_bg }, -} +-- MODES options.mode_colors = { - ["n"] = { "NORMAL", options.colors.red }, - ["no"] = { "N-PENDING", options.colors.red }, - ["i"] = { "INSERT", options.colors.dark_purple }, - ["ic"] = { "INSERT", options.colors.dark_purple }, - ["t"] = { "TERMINAL", options.colors.green }, - ["v"] = { "VISUAL", options.colors.cyan }, - ["V"] = { "V-LINE", options.colors.cyan }, - [""] = { "V-BLOCK", options.colors.cyan }, - ["R"] = { "REPLACE", options.colors.orange }, - ["Rv"] = { "V-REPLACE", options.colors.orange }, - ["s"] = { "SELECT", options.colors.nord_blue }, - ["S"] = { "S-LINE", options.colors.nord_blue }, - [""] = { "S-BLOCK", options.colors.nord_blue }, - ["c"] = { "COMMAND", options.colors.pink }, - ["cv"] = { "COMMAND", options.colors.pink }, - ["ce"] = { "COMMAND", options.colors.pink }, - ["r"] = { "PROMPT", options.colors.teal }, - ["rm"] = { "MORE", options.colors.teal }, - ["r?"] = { "CONFIRM", options.colors.teal }, - ["!"] = { "SHELL", options.colors.green }, + ["n"] = { "NORMAL", "Feline_NormalMode" }, + ["no"] = { "N-PENDING", "Feline_NormalMode" }, + ["i"] = { "INSERT", "Feline_InsertMode" }, + ["ic"] = { "INSERT", "Feline_InsertMode" }, + ["t"] = { "TERMINAL", "Feline_TerminalMode" }, + ["v"] = { "VISUAL", "Feline_VisualMode" }, + ["V"] = { "V-LINE", "Feline_VisualMode" }, + [""] = { "V-BLOCK", "Feline_VisualMode" }, + ["R"] = { "REPLACE", "Feline_ReplaceMode" }, + ["Rv"] = { "V-REPLACE", "Feline_ReplaceMode" }, + ["s"] = { "SELECT", "Feline_SelectMode" }, + ["S"] = { "S-LINE", "Feline_SelectMode" }, + [""] = { "S-BLOCK", "Feline_SelectMode" }, + ["c"] = { "COMMAND", "Feline_CommandMode" }, + ["cv"] = { "COMMAND", "Feline_CommandMode" }, + ["ce"] = { "COMMAND", "Feline_CommandMode" }, + ["r"] = { "PROMPT", "Feline_ConfirmMode" }, + ["rm"] = { "MORE", "Feline_ConfirmMode" }, + ["r?"] = { "CONFIRM", "Feline_ConfirmMode" }, + ["!"] = { "SHELL", "Feline_TerminalMode" }, } -options.chad_mode_hl = function() - return { - fg = options.mode_colors[vim.fn.mode()][2], - bg = options.colors.one_bg, - } +local fn = vim.fn + +local function get_color(group, attr) + return fn.synIDattr(fn.synIDtrans(fn.hlID(group)), attr) end options.empty_space = { provider = " " .. options.separator_style.left, - hl = { - fg = options.colors.one_bg2, - bg = options.colors.statusline_bg, - }, + hl = "Feline_EmptySpace", } -- this matches the vi mode color @@ -277,51 +255,43 @@ options.empty_spaceColored = { provider = options.separator_style.left, hl = function() return { - fg = options.mode_colors[vim.fn.mode()][2], - bg = options.colors.one_bg2, + fg = get_color(options.mode_colors[vim.fn.mode()][2], "fg#"), + bg = get_color("Feline_EmptySpace", "fg#"), } end, } options.mode_icon = { provider = options.separator_style.vi_mode_icon, - hl = function() - return { - fg = options.colors.statusline_bg, - bg = options.mode_colors[vim.fn.mode()][2], - } - end, + + hl = { + fg = get_color("Normal", "bg#"), + bg = get_color(options.mode_colors[vim.fn.mode()][2], "fg#"), + }, } options.empty_space2 = { provider = function() return " " .. options.mode_colors[vim.fn.mode()][1] .. " " end, - hl = options.chad_mode_hl, + hl = function() + return options.mode_colors[vim.fn.mode()][2] + end, } options.separator_right = { provider = options.separator_style.left, - hl = { - fg = options.colors.grey, - bg = options.colors.one_bg, - }, + hl = "Feline_EmptySpace", } options.separator_right2 = { provider = options.separator_style.left, - hl = { - fg = options.colors.green, - bg = options.colors.grey, - }, + hl = "Feline_PositionSeparator", } options.position_icon = { provider = options.separator_style.position_icon, - hl = { - fg = options.colors.black, - bg = options.colors.green, - }, + hl = "Feline_PositionIcon", } options.current_line = { @@ -338,10 +308,7 @@ options.current_line = { return " " .. result .. "%% " end, - hl = { - fg = options.colors.green, - bg = options.colors.one_bg, - }, + hl = "Feline_CurrentLine", } options = nvchad.load_override(options, "feline-nvim/feline.nvim") @@ -361,9 +328,9 @@ options.right = {} add_table(options.left, options.main_icon) add_table(options.left, options.file_name) add_table(options.left, options.dir_name) -add_table(options.left, options.diff.add) -add_table(options.left, options.diff.change) -add_table(options.left, options.diff.remove) + +-- lsp +add_table(options.left, options.lsp_icon) add_table(options.left, options.diagnostic.error) add_table(options.left, options.diagnostic.warning) add_table(options.left, options.diagnostic.hint) @@ -372,8 +339,13 @@ add_table(options.left, options.diagnostic.info) add_table(options.middle, options.lsp_progress) -- right -add_table(options.right, options.lsp_icon) + +-- git diffs +add_table(options.right, options.diff.add) +add_table(options.right, options.diff.change) +add_table(options.right, options.diff.remove) add_table(options.right, options.git_branch) + add_table(options.right, options.empty_space) add_table(options.right, options.empty_spaceColored) add_table(options.right, options.mode_icon) @@ -391,8 +363,8 @@ options.components.active[2] = options.middle options.components.active[3] = options.right options.theme = { - bg = options.colors.statusline_bg, - fg = options.colors.fg, + fg = get_color("Feline", "fg#"), + bg = get_color("Feline", "bg#"), } feline.setup { From ad6752792af470de6926a1c067813c7584e15ab8 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 21 May 2022 06:10:34 +0530 Subject: [PATCH 1068/1541] minor fix to incorrect statusline in transparent mode | fix (#1107) --- lua/plugins/configs/statusline.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index d0b84e3..1a48e68 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -265,7 +265,7 @@ options.mode_icon = { provider = options.separator_style.vi_mode_icon, hl = { - fg = get_color("Normal", "bg#"), + fg = get_color("Feline", "bg#"), bg = get_color(options.mode_colors[vim.fn.mode()][2], "fg#"), }, } From bcb41ea23970b6b1efa7db29771f4e93db19d9f5 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 21 May 2022 09:02:45 +0530 Subject: [PATCH 1069/1541] misc --- lua/plugins/configs/statusline.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 1a48e68..0cb1db7 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -264,13 +264,15 @@ options.empty_spaceColored = { options.mode_icon = { provider = options.separator_style.vi_mode_icon, - hl = { - fg = get_color("Feline", "bg#"), - bg = get_color(options.mode_colors[vim.fn.mode()][2], "fg#"), - }, + hl = function() + return { + fg = get_color("Feline", "bg#"), + bg = get_color(options.mode_colors[vim.fn.mode()][2], "fg#"), + } + end, } -options.empty_space2 = { +options.mode_name = { provider = function() return " " .. options.mode_colors[vim.fn.mode()][1] .. " " end, @@ -349,7 +351,7 @@ add_table(options.right, options.git_branch) add_table(options.right, options.empty_space) add_table(options.right, options.empty_spaceColored) add_table(options.right, options.mode_icon) -add_table(options.right, options.empty_space2) +add_table(options.right, options.mode_name) add_table(options.right, options.separator_right) add_table(options.right, options.separator_right2) add_table(options.right, options.position_icon) From cef2899bba3c7421027d1200aed5a6b9732fb172 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Sat, 21 May 2022 01:18:36 -0400 Subject: [PATCH 1070/1541] fix #1109 --- lua/plugins/configs/others.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 2012df8..5a5e3bb 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -214,9 +214,6 @@ end M.misc_mappings = function() local map = nvchad.map - -- Don't copy the replaced text after pasting in visual mode - map("v", "p", '"_dP') - -- Allow moving the cursor through wrapped lines with j, k, and -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ -- empty mode is same as using :map From ed68c4b07d63e371edd1b905e6ea24b23651de68 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 21 May 2022 12:33:19 +0530 Subject: [PATCH 1071/1541] rm un-needed mappings --- lua/core/utils.lua | 2 -- lua/plugins/configs/lspconfig.lua | 2 +- lua/plugins/configs/others.lua | 12 ------------ lua/plugins/configs/whichkey.lua | 3 +-- lua/plugins/packerInit.lua | 2 +- 5 files changed, 3 insertions(+), 18 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 63063a8..6676e74 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -129,8 +129,6 @@ nvchad.no_WhichKey_map = function() end end end - - require("plugins.configs.others").misc_mappings() end -- load plugin after entering vim ui diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 13d74ba..5ef73a5 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -14,7 +14,7 @@ local _default_opts = win.default_opts win.default_opts = function(options) local opts = _default_opts(options) - opts.border = "double" + opts.border = "single" return opts end diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 5a5e3bb..433560b 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -211,16 +211,4 @@ M.gitsigns = function() } end -M.misc_mappings = function() - local map = nvchad.map - - -- Allow moving the cursor through wrapped lines with j, k, and - -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ - -- empty mode is same as using :map - -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour - map("", "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) - map("", "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) - map("", "", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true }) - map("", "", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true }) -end return M diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index b561d6a..e6037cd 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -55,10 +55,9 @@ local options = { }, } -require("plugins.configs.others").misc_mappings() - local mappings = nvchad.load_config().mappings local mapping_groups = { groups = vim.deepcopy(mappings.groups) } + mappings.disabled = nil mappings.groups = nil diff --git a/lua/plugins/packerInit.lua b/lua/plugins/packerInit.lua index 50a29f5..fbf26c7 100644 --- a/lua/plugins/packerInit.lua +++ b/lua/plugins/packerInit.lua @@ -30,7 +30,7 @@ end local options = { display = { open_fn = function() - return require("packer.util").float { border = "double" } + return require("packer.util").float { border = "single" } end, }, git = { From 45b4530fa4f8d7acc8835ee3ceabd26226f5160c Mon Sep 17 00:00:00 2001 From: lixvbnet Date: Sat, 21 May 2022 21:47:56 +0800 Subject: [PATCH 1072/1541] fix typo --- lua/plugins/configs/statusline.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 0cb1db7..c1cb780 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -94,7 +94,7 @@ options.dir_name = { right_sep = { str = options.separator_style.right, - hi = "FelineDirName_Separator", + hl = "FelineDirName_Separator", }, } From d09abcf8b309f3d3902749d4b2ed5ab344a8d697 Mon Sep 17 00:00:00 2001 From: Freddie Haddad Date: Sat, 21 May 2022 11:52:21 -0700 Subject: [PATCH 1073/1541] fix: update hide scrollbar logic to work with cmp --- lua/plugins/configs/cmp.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 45a10c7..c587eb1 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -21,8 +21,11 @@ end local cmp_window = require "cmp.utils.window" -function cmp_window:has_scrollbar() - return false +cmp_window.info_ = cmp_window.info +cmp_window.info = function(self) + local info = self:info_() + info.scrollable = false + return info end local options = { From ef9230a31bf59bbcd26ac1b2b9a93efaae8d17b5 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 22 May 2022 14:12:54 +0530 Subject: [PATCH 1074/1541] use better field name --- lua/plugins/configs/statusline.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index c1cb780..4c850a9 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -5,7 +5,6 @@ if not present then end local options = { - colors = require("base46").get_colors "base_30", lsp = require "feline.providers.lsp", lsp_severity = vim.diagnostic.severity, } @@ -216,7 +215,7 @@ options.lsp_progress = { -- MODES -options.mode_colors = { +options.mode_hlgroups = { ["n"] = { "NORMAL", "Feline_NormalMode" }, ["no"] = { "N-PENDING", "Feline_NormalMode" }, ["i"] = { "INSERT", "Feline_InsertMode" }, @@ -255,7 +254,7 @@ options.empty_spaceColored = { provider = options.separator_style.left, hl = function() return { - fg = get_color(options.mode_colors[vim.fn.mode()][2], "fg#"), + fg = get_color(options.mode_hlgroups[vim.fn.mode()][2], "fg#"), bg = get_color("Feline_EmptySpace", "fg#"), } end, @@ -267,17 +266,17 @@ options.mode_icon = { hl = function() return { fg = get_color("Feline", "bg#"), - bg = get_color(options.mode_colors[vim.fn.mode()][2], "fg#"), + bg = get_color(options.mode_hlgroups[vim.fn.mode()][2], "fg#"), } end, } options.mode_name = { provider = function() - return " " .. options.mode_colors[vim.fn.mode()][1] .. " " + return " " .. options.mode_hlgroups[vim.fn.mode()][1] .. " " end, hl = function() - return options.mode_colors[vim.fn.mode()][2] + return options.mode_hlgroups[vim.fn.mode()][2] end, } From d264c3c8e11a1acde34f2f874f5bd353a8772d2f Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 22 May 2022 15:43:22 +0530 Subject: [PATCH 1075/1541] Use to escape terminal mode | fix (#1115) --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index ad0d2d6..fd6a95c 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -52,7 +52,7 @@ M.general = { }, t = { - ["jk"] = { termcodes "", " escape terminal mode" }, + [""] = { termcodes "", " escape terminal mode" }, }, } From 0b0d6b6fc17dbd2f553f582daaf32a63fd221cc1 Mon Sep 17 00:00:00 2001 From: Mactavish Date: Sun, 22 May 2022 13:06:24 +0200 Subject: [PATCH 1076/1541] fix: override options before register keys --- lua/plugins/configs/whichkey.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index e6037cd..57ab519 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -55,6 +55,8 @@ local options = { }, } +options = nvchad.load_override(options, "folke/which-key.nvim") + local mappings = nvchad.load_config().mappings local mapping_groups = { groups = vim.deepcopy(mappings.groups) } @@ -76,6 +78,5 @@ end register_mappings(mappings, options) register_mappings(mapping_groups, options) -options = nvchad.load_override(options, "folke/which-key.nvim") wk.setup(options) From b159d4e3980c4b58809d651ebe8cb08bdc8e7cf5 Mon Sep 17 00:00:00 2001 From: nullchilly <56817415+nullchilly@users.noreply.github.com> Date: Sun, 22 May 2022 18:38:48 +0700 Subject: [PATCH 1077/1541] Changed dashboard to alpha --- lua/plugins/configs/nvimtree.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index ce046a3..8bc69f8 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -49,7 +49,7 @@ local options = { }, disable_netrw = true, hijack_netrw = true, - ignore_ft_on_setup = { "dashboard" }, + ignore_ft_on_setup = { "alpha" }, open_on_tab = false, hijack_cursor = true, hijack_unnamed_buffer_when_opening = false, From bdf45a447add58ec07a66f763289f187dfa90a3e Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 22 May 2022 20:22:08 +0530 Subject: [PATCH 1078/1541] remove conflicting mappings | (#1119) --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index fd6a95c..3655d80 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -129,7 +129,7 @@ M.lspconfig = { " lsp implementation", }, - [""] = { + ["ls"] = { function() vim.lsp.buf.signature_help() end, From a2ff5c285e3fe96026db2852f169a6703090e26e Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 23 May 2022 12:54:03 +0530 Subject: [PATCH 1079/1541] avoid un-needed lazy loading of packer | improve packer bootstrapping --- .github/README.md | 6 ++-- examples/chadrc.lua | 3 ++ init.lua | 31 ++++------------ lua/core/autocmds.lua | 73 -------------------------------------- lua/core/commands.lua | 37 ------------------- lua/core/init.lua | 18 ++++++++++ lua/core/packer.lua | 62 ++++++++++++++++++++++++++++++++ lua/core/utils.lua | 26 ++++++++++---- lua/plugins/init.lua | 26 +++----------- lua/plugins/packerInit.lua | 48 ------------------------- 10 files changed, 116 insertions(+), 214 deletions(-) delete mode 100644 lua/core/autocmds.lua delete mode 100644 lua/core/commands.lua create mode 100644 lua/core/init.lua create mode 100644 lua/core/packer.lua delete mode 100644 lua/plugins/packerInit.lua diff --git a/.github/README.md b/.github/README.md index 9f7a274..484c102 100644 --- a/.github/README.md +++ b/.github/README.md @@ -130,13 +130,13 @@ Without/with Treesitter: ## History -- I (@siduck i.e creator of NvChad) in my initial days of learning to program wanted a lightweight IDE for writing code, I had a very low end system, which was like 1.4ghz pentium + 4gb ram & HDD. I was into web dev so many suggested vscode but that thing was very heavy on my system, It took more ram than my browser! ( minimal ungoogled chromium ) so I never tried it again, sublime text was nice but the fear of using proprietary software XD for a linux user bugged me a lot. Then I tried doom-emacs which looked pretty but it was slow and emacs was kinda hard, I tried lunarvim but too lazy to read the docs which got me into vim and got into neovim lua stuff real quick. I wanted to make the config ery pretty and fast. +- I (@siduck i.e creator of NvChad) in my initial days of learning to program wanted a lightweight IDE for writing code, I had a very low end system which was like 1.4ghz pentium + 4gb ram & HDD. I was into web dev stuff so many suggested me to use vscode but that thing was very heavy on my system, It took more ram than my browser! ( minimal ungoogled chromium ) so I never tried it again, sublime text was nice but the fear of using proprietary software XD for a linux user bugged me a lot. Then I tried doom-emacs which looked pretty but it was slow and I was lost within its docs, I tried lunarvim but too lazy to read the docs. Doom-emacs and lunarvim inspired me to make a config which is the prettiest + very fast and simple. -- I'm decent at ricing i.e customizing system and making it look pretty so I posted my neovim rice on [neovim subreddit](https://www.reddit.com/r/neovim/comments/m3xl4f/neovim_rice/), my neovim-dotfiles github repo blew up and then I had to come up with a name, I was amazed by the chad meme lol so I put NvChad as the name, the chad word in the name doesnt literally mean the chad guy but in the sense such as chad linux vs windows i.e meaning superior,best etc. NvChad was made for my personal use but it gained some popularity which inspired me to make a public config i.e config usable by many and less hassle to update, without the custom config stuff users would have to keep a track of every commit and copy paste git diffs to manually update nvchad. +- I'm decent at ricing i.e customizing system and making it look pretty so I posted my neovim rice on [neovim subreddit](https://www.reddit.com/r/neovim/comments/m3xl4f/neovim_rice/), my neovim-dotfiles github repo blew up and then I had to come up with a name, I was amazed by the chad meme lol so I put NvChad as the name, the chad word in here doesnt literally mean the chad guy but in the sense such as chad linux vs windows i.e meaning superior, best etc. NvChad was made for my personal use but it gained some popularity which inspired me to make a public config i.e config usable by many and less hassle to update as everyone's going to use the same base config (NvChad) with their custom modifications (which are gitignored so that wont mess up), without the custom config stuff users would have to keep a track of every commit and copy paste git diffs to manually update nvchad. ## :gift_heart: Support -I'm (@siduck) really very sorry to remove the previous charity links but I had to do it for various reasons. A lot has been going here regarding financial issues and I do need some support if it's possible from your end. I haven't graduated yet and it would be great to earn some stuff as that'd help me with daily minor expenses. If you like NvChad and would like to support it via donation then I'll gladly accept it. Dont worry! NvChad will still stay alive & active without your donations! I will remove the sponsor button and re-add the charity links once I get a job, probably a year or two. +I'm (@siduck) really very sorry to remove the previous charity links but I had to do it for various reasons. A lot has been going here regarding financial issues and I do need some support if it's possible from your end. I haven't graduated yet and it would be great to earn some stuff as that'd help me with daily minor expenses. If you like NvChad and would like to support & appreciate it via donation then I'll gladly accept it. Dont worry! NvChad will still stay alive & active without your donations! I will remove the sponsor button and re-add the charity links once I get a job, probably a year or two. [![kofi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/siduck) [![paypal](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white)](https://paypal.me/siduck76) diff --git a/examples/chadrc.lua b/examples/chadrc.lua index 6aa2521..9b03aab 100644 --- a/examples/chadrc.lua +++ b/examples/chadrc.lua @@ -1,5 +1,8 @@ -- Just an example, supposed to be placed in /lua/custom/ +-- remove this if you dont use custom.init.lua at all +require "custom" + local M = {} -- make sure you maintain the structure of `core/default_config.lua` here, diff --git a/init.lua b/init.lua index be2faf0..1fad1f1 100644 --- a/init.lua +++ b/init.lua @@ -4,29 +4,10 @@ if present then impatient.enable_profile() end -local modules = { - "utils", - "options", - "autocmds", - "commands", -} +require "core" +require "core.utils" +require "core.options" -for _, module in ipairs(modules) do - local ok, err = pcall(require, "core." .. module) - - if not ok then - error("Error loading " .. module .. "\n\n" .. err) - end -end - --- check if custom init.lua file exists -if vim.fn.filereadable(vim.fn.stdpath "config" .. "/lua/custom/init.lua") == 1 then - -- try to call custom init, if not successful, show error - local ok, err = pcall(require, "custom") - - if not ok then - vim.notify("Error loading custom/init.lua\n\n" .. err) - end - - return -end +-- setup packer + plugins +require("core.packer").bootstrap() +require "plugins" diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua deleted file mode 100644 index 409abbc..0000000 --- a/lua/core/autocmds.lua +++ /dev/null @@ -1,73 +0,0 @@ -local autocmd = vim.api.nvim_create_autocmd - --- Disable statusline in dashboard -autocmd("FileType", { - pattern = "alpha", - callback = function() - vim.opt.laststatus = 0 - end, -}) - -autocmd("BufUnload", { - buffer = 0, - callback = function() - vim.opt.laststatus = 3 - end, -}) - --- open nvim with a dir while still lazy loading nvimtree --- autocmd("BufEnter", { --- callback = function() --- if vim.api.nvim_buf_get_option(0, "buftype") ~= "terminal" then --- vim.cmd "lcd %:p:h" --- end --- end, --- }) - --- Use relative & absolute line numbers in 'n' & 'i' modes respectively --- autocmd("InsertEnter", { --- callback = function() --- vim.opt.relativenumber = false --- end, --- }) --- autocmd("InsertLeave", { --- callback = function() --- vim.opt.relativenumber = true --- end, --- }) - --- Open a file from its last left off position --- autocmd("BufReadPost", { --- callback = function() --- if not vim.fn.expand("%:p"):match ".git" and vim.fn.line "'\"" > 1 and vim.fn.line "'\"" <= vim.fn.line "$" then --- vim.cmd "normal! g'\"" --- vim.cmd "normal zz" --- end --- end, --- }) - --- File extension specific tabbing --- autocmd("Filetype", { --- pattern = "python", --- callback = function() --- vim.opt_local.expandtab = true --- vim.opt_local.tabstop = 4 --- vim.opt_local.shiftwidth = 4 --- vim.opt_local.softtabstop = 4 --- end, --- }) - --- Highlight yanked text --- autocmd("TextYankPost", { --- callback = function() --- vim.highlight.on_yank { higroup = "Visual", timeout = 200 } --- end, --- }) - --- Enable spellchecking in markdown, text and gitcommit files --- autocmd("FileType", { --- pattern = { "gitcommit", "markdown", "text" }, --- callback = function() --- vim.opt_local.spell = true --- end, --- }) diff --git a/lua/core/commands.lua b/lua/core/commands.lua deleted file mode 100644 index 9c12009..0000000 --- a/lua/core/commands.lua +++ /dev/null @@ -1,37 +0,0 @@ -local user_cmd = vim.api.nvim_create_user_command -local cmd = vim.cmd - --- snapshot stuff -user_cmd("PackerSnapshot", function(info) - require "plugins" - require("packer").snapshot(info.args) -end, { nargs = "+" }) - -user_cmd("PackerSnapshotDelete", function(info) - require "plugins" - require("packer.snapshot").delete(info.args) -end, { nargs = "+" }) - -user_cmd("PackerSnapshotRollback", function(info) - require "plugins" - require("packer").rollback(info.args) -end, { nargs = "+" }) - --- Add Packer commands because we are not loading it at startup - -local packer_cmd = function(callback) - return function() - require "plugins" - require("packer")[callback]() - end -end - -user_cmd("PackerClean", packer_cmd "clean", {}) -user_cmd("PackerCompile", packer_cmd "compile", {}) -user_cmd("PackerInstall", packer_cmd "install", {}) -user_cmd("PackerStatus", packer_cmd "status", {}) -user_cmd("PackerSync", packer_cmd "sync", {}) -user_cmd("PackerUpdate", packer_cmd "update", {}) - --- add NvChadUpdate command and mapping -cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" diff --git a/lua/core/init.lua b/lua/core/init.lua new file mode 100644 index 0000000..8e089d5 --- /dev/null +++ b/lua/core/init.lua @@ -0,0 +1,18 @@ +vim.cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" + +local autocmd = vim.api.nvim_create_autocmd + +-- Disable statusline in dashboard +autocmd("FileType", { + pattern = "alpha", + callback = function() + vim.opt.laststatus = 0 + end, +}) + +autocmd("BufUnload", { + buffer = 0, + callback = function() + vim.opt.laststatus = 3 + end, +}) diff --git a/lua/core/packer.lua b/lua/core/packer.lua new file mode 100644 index 0000000..2bd4a6e --- /dev/null +++ b/lua/core/packer.lua @@ -0,0 +1,62 @@ +local M = {} + +M.bootstrap = function() + local fn = vim.fn + local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim" + + vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" }) + + if fn.empty(fn.glob(install_path)) > 0 then + print "Cloning packer .." + + fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } + + print "Packer cloned successfully!" + + -- install plugins + compile their configs + vim.cmd "packadd packer.nvim" + require "plugins" + vim.cmd "PackerSync" + end +end + +M.options = { + auto_clean = true, + compile_on_sync = true, + git = { clone_timeout = 6000 }, + display = { + working_sym = "ﲊ", + error_sym = "✗", + done_sym = "﫟", + removed_sym = "", + moved_sym = "", + open_fn = function() + return require("packer.util").float { border = "single" } + end, + }, +} + +-- merge overrides if there are any +M.options = nvchad.load_override(M.options, "wbthomason/packer.nvim") + +M.run = function(plugins) + local present, packer = pcall(require, "packer") + + if not present then + return + end + + -- Override with chadrc values + plugins = nvchad.remove_default_plugins(plugins) + plugins = nvchad.merge_plugins(plugins) + + packer.init(M.options) + + packer.startup(function(use) + for _, v in pairs(plugins) do + use(v) + end + end) +end + +return M diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 6676e74..d9662e8 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -28,12 +28,16 @@ nvchad.load_config = function() -- attempt to load and merge a user config local chadrc_exists = vim.fn.filereadable(vim.fn.stdpath "config" .. "/lua/custom/chadrc.lua") == 1 + if chadrc_exists then -- merge user config if it exists and is a table; otherwise display an error local user_config = require "custom.chadrc" + if type(user_config) == "table" then conf.mappings = conf.mappings and nvchad.prune_key_map(conf.mappings, user_config.mappings, ignore_modes) or {} - user_config.mappings = user_config.mappings and nvchad.prune_key_map(user_config.mappings, "rm_disabled", ignore_modes) or {} + user_config.mappings = user_config.mappings + and nvchad.prune_key_map(user_config.mappings, "rm_disabled", ignore_modes) + or {} conf = vim.tbl_deep_extend("force", conf, user_config) else error "User config (chadrc.lua) *must* return a table!" @@ -46,6 +50,7 @@ end -- reduces a given keymap to a table of modes each containing a list of key maps nvchad.reduce_key_map = function(key_map, ignore_modes) local prune_keys = {} + for _, modes in pairs(key_map) do for mode, mappings in pairs(modes) do if not vim.tbl_contains(ignore_modes, mode) then @@ -60,23 +65,32 @@ end -- remove disabled mappings from a given key map nvchad.remove_disabled_mappings = function(key_map) local clean_map = {} + if key_map == nil or key_map == "" then return key_map end + if type(key_map) == "table" then for k, v in pairs(key_map) do - if v ~= nil and v ~= "" then clean_map[k] = v end + if v ~= nil and v ~= "" then + clean_map[k] = v + end end end + return clean_map end -- prune keys from a key map table by matching against another key map table nvchad.prune_key_map = function(key_map, prune_map, ignore_modes) - if not prune_map then return key_map end - if not key_map then return prune_map end + if not prune_map then + return key_map + end + if not key_map then + return prune_map + end local prune_keys = type(prune_map) == "table" and nvchad.reduce_key_map(prune_map, ignore_modes) - or { n = {}, v = {}, i = {}, t = {} } + or { n = {}, v = {}, i = {}, t = {} } for ext, modes in pairs(key_map) do for mode, mappings in pairs(modes) do @@ -155,7 +169,7 @@ nvchad.remove_default_plugins = function(plugins) end -- merge default/user plugin tables -nvchad.plugin_list = function(default_plugins) +nvchad.merge_plugins = function(default_plugins) local user_plugins = nvchad.load_config().plugins.user -- merge default + user plugin table diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 24739b3..c6b2746 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,21 +1,12 @@ -local present, packer = pcall(require, "plugins.packerInit") - -if not present then - return false -end - local plugins = { + ["nvim-lua/plenary.nvim"] = {}, ["lewis6991/impatient.nvim"] = {}, - - ["wbthomason/packer.nvim"] = { - event = "VimEnter", - }, - + ["wbthomason/packer.nvim"] = {}, ["NvChad/extensions"] = {}, ["NvChad/base46"] = { - after = "packer.nvim", + after = "plenary.nvim", config = function() local ok, base46 = pcall(require, "base46") @@ -219,13 +210,4 @@ local plugins = { }, } -plugins = nvchad.remove_default_plugins(plugins) - --- merge user plugin table & default plugin table -plugins = nvchad.plugin_list(plugins) - -return packer.startup(function(use) - for _, v in pairs(plugins) do - use(v) - end -end) +require("core.packer").run(plugins) diff --git a/lua/plugins/packerInit.lua b/lua/plugins/packerInit.lua deleted file mode 100644 index fbf26c7..0000000 --- a/lua/plugins/packerInit.lua +++ /dev/null @@ -1,48 +0,0 @@ -vim.cmd "packadd packer.nvim" - -local present, packer = pcall(require, "packer") - -if not present then - local packer_path = vim.fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim" - - print "Cloning packer.." - -- remove the dir before cloning - vim.fn.delete(packer_path, "rf") - vim.fn.system { - "git", - "clone", - "https://github.com/wbthomason/packer.nvim", - "--depth", - "20", - packer_path, - } - - vim.cmd "packadd packer.nvim" - present, packer = pcall(require, "packer") - - if present then - print "Packer cloned successfully." - else - error("Couldn't clone packer !\nPacker path: " .. packer_path .. "\n" .. packer) - end -end - -local options = { - display = { - open_fn = function() - return require("packer.util").float { border = "single" } - end, - }, - git = { - clone_timeout = 6000, -- seconds - }, - auto_clean = true, - compile_on_sync = true, - snapshot = nil, -} - -options = nvchad.load_override(options, "wbthomason/packer.nvim") - -packer.init(options) - -return packer From ed9082dfb4bb66243ebcf698d32c5062556cbfeb Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 23 May 2022 14:54:59 +0530 Subject: [PATCH 1080/1541] load custom module | fix https://github.com/NvChad/NvChad/commit/a2ff5c285e3fe96026db2852f169a6703090e26e#commitcomment-74274032 --- init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init.lua b/init.lua index 1fad1f1..1aab68f 100644 --- a/init.lua +++ b/init.lua @@ -11,3 +11,9 @@ require "core.options" -- setup packer + plugins require("core.packer").bootstrap() require "plugins" + +local user_conf, _ = pcall(require, "custom") + +if user_conf then + require "custom" +end From b800879daa53f360be1889fd3c7757d261ce404b Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 24 May 2022 05:24:11 +0530 Subject: [PATCH 1081/1541] add mapping to disable highlight (#1121) --- lua/core/mappings.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 3655d80..8ba5d92 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -23,6 +23,8 @@ M.general = { n = { + [""] = { " noh ", " no highlight" }, + -- switch between windows [""] = { "h", " window left" }, [""] = { "l", " window right" }, From 16d54515948889af0a53a254512f25f80eaeb6f9 Mon Sep 17 00:00:00 2001 From: nullchilly <56817415+nullchilly@users.noreply.github.com> Date: Tue, 24 May 2022 00:45:30 +0700 Subject: [PATCH 1082/1541] Load nvimtree with alpha so ignore_ft_on_setup actually works --- lua/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index c6b2746..f75a86c 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -186,6 +186,7 @@ local plugins = { -- file managing , picker etc ["kyazdani42/nvim-tree.lua"] = { + ft = 'alpha', cmd = { "NvimTreeToggle", "NvimTreeFocus" }, config = function() require "plugins.configs.nvimtree" From c7cfacd360553f9aa425031729398a5da1332989 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 24 May 2022 23:01:35 +0530 Subject: [PATCH 1083/1541] register lsp mappings for buffer only --- lua/plugins/configs/lspconfig.lua | 12 +++++++++++- lua/plugins/configs/whichkey.lua | 11 ++++++----- lua/plugins/init.lua | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 5ef73a5..f660a81 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -18,9 +18,19 @@ win.default_opts = function(options) return opts end -function M.on_attach(client, _) +M.on_attach = function(client, bufnr) client.resolved_capabilities.document_formatting = false client.resolved_capabilities.document_range_formatting = false + + local lsp_mappings = nvchad.load_config().mappings.lspconfig + local wk_exists, wk = pcall(require, "which-key") + + if wk_exists then + wk.register(lsp_mappings.n, { buffer = bufnr }) + else + -- todo, make use of bufnr here + -- add no whichkey func logic here + end end local capabilities = vim.lsp.protocol.make_client_capabilities() diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index 57ab519..70b1a11 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -66,10 +66,12 @@ mappings.groups = nil -- register mappings local function register_mappings(maps, opts) for mode, opt in pairs(opts.mode_opts) do - for _, value in pairs(maps) do - if value[mode] then - local mode_opts = value["mode_opts"] and vim.tbl_deep_extend("force", opt, value["mode_opts"]) or opt - wk.register(value[mode], mode_opts) + for key, value in pairs(maps) do + if key ~= "lspconfig" then + if value[mode] then + local mode_opts = value["mode_opts"] and vim.tbl_deep_extend("force", opt, value["mode_opts"]) or opt + wk.register(value[mode], mode_opts) + end end end end @@ -78,5 +80,4 @@ end register_mappings(mappings, options) register_mappings(mapping_groups, options) - wk.setup(options) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index f75a86c..0c3d16d 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -186,7 +186,7 @@ local plugins = { -- file managing , picker etc ["kyazdani42/nvim-tree.lua"] = { - ft = 'alpha', + ft = "alpha", cmd = { "NvimTreeToggle", "NvimTreeFocus" }, config = function() require "plugins.configs.nvimtree" From 5ba309a0dfee26b882658034c7bbf5ce03ebcde3 Mon Sep 17 00:00:00 2001 From: Leon Heidelbach Date: Wed, 25 May 2022 01:16:08 +0200 Subject: [PATCH 1084/1541] fix: moved lsp mappings to lspconfig to only be set on lsp attach --- lua/core/mappings.lua | 2 + lua/core/utils.lua | 53 ++++++++++++++++++++++--- lua/plugins/configs/lspconfig.lua | 64 +++++++++++++++++++++++++++---- lua/plugins/configs/whichkey.lua | 18 +-------- 4 files changed, 108 insertions(+), 29 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 8ba5d92..fd10425 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -102,6 +102,8 @@ M.comment = { M.lspconfig = { -- See ` :help vim.lsp.*` for documentation on any of the below functions + ignore = { "/lua/plugins/configs/whichkey.lua" }, + n = { ["gD"] = { function() diff --git a/lua/core/utils.lua b/lua/core/utils.lua index d9662e8..4b97769 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -36,8 +36,8 @@ nvchad.load_config = function() if type(user_config) == "table" then conf.mappings = conf.mappings and nvchad.prune_key_map(conf.mappings, user_config.mappings, ignore_modes) or {} user_config.mappings = user_config.mappings - and nvchad.prune_key_map(user_config.mappings, "rm_disabled", ignore_modes) - or {} + and nvchad.prune_key_map(user_config.mappings, "rm_disabled", ignore_modes) + or {} conf = vim.tbl_deep_extend("force", conf, user_config) else error "User config (chadrc.lua) *must* return a table!" @@ -90,7 +90,7 @@ nvchad.prune_key_map = function(key_map, prune_map, ignore_modes) return prune_map end local prune_keys = type(prune_map) == "table" and nvchad.reduce_key_map(prune_map, ignore_modes) - or { n = {}, v = {}, i = {}, t = {} } + or { n = {}, v = {}, i = {}, t = {} } for ext, modes in pairs(key_map) do for mode, mappings in pairs(modes) do @@ -126,9 +126,33 @@ nvchad.map = function(mode, keys, command, opt) vim.keymap.set(mode, keys, command, opt) end --- For those who disabled whichkey -nvchad.no_WhichKey_map = function() - local mappings = nvchad.load_config().mappings +-- register mappings through which-key +nvchad.whichKey_map = function(maps, opts) + local present, wk = pcall(require, "which-key") + local caller_path = nvchad.get_caller_file_path() + + if not present then + return false + end + + for mode, opt in pairs(opts.mode_opts) do + for _, value in pairs(maps) do + if value[mode] then + -- check if caller_path is in the ignore list + if not value["ignore"] or not vim.tbl_contains(value["ignore"], caller_path) then + local mode_opts = value["mode_opts"] and + vim.tbl_deep_extend("force", opt, value["mode_opts"]) or opt + wk.register(value[mode], mode_opts) + end + end + end + end + + return true +end + +-- for those who disabled whichkey and want to add specific mapping tables +nvchad.no_WhichKey_table_map = function(mappings) local ignore_modes = { "mode_opts" } for _, value in pairs(mappings) do @@ -145,6 +169,13 @@ nvchad.no_WhichKey_map = function() end end +-- for those who disabled whichkey +nvchad.no_WhichKey_map = function() + local mappings = nvchad.load_config().mappings + + nvchad.no_WhichKey_table_map(mappings) +end + -- load plugin after entering vim ui nvchad.packer_lazy_load = function(plugin, timer) if plugin then @@ -197,3 +228,13 @@ nvchad.load_override = function(default_table, plugin_name) return default_table end + +nvchad.get_caller_file_path = function() + local success, result = pcall(debug.getinfo, 4, "S") + + if success then + return result.source:match("@(.*)"):gsub(vim.fn.stdpath("config"), "") + else + return "" + end +end diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index f660a81..e4593ee 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -22,14 +22,64 @@ M.on_attach = function(client, bufnr) client.resolved_capabilities.document_formatting = false client.resolved_capabilities.document_range_formatting = false - local lsp_mappings = nvchad.load_config().mappings.lspconfig - local wk_exists, wk = pcall(require, "which-key") + local options = { - if wk_exists then - wk.register(lsp_mappings.n, { buffer = bufnr }) - else - -- todo, make use of bufnr here - -- add no whichkey func logic here + -- NOTE : this mode_opts table isnt in the default whichkey config + -- Its added here so you could configure it in chadrc + + mode_opts = { + n = { + mode = "n", + }, + + v = { + mode = "v", + }, + + i = { + mode = "i", + }, + + t = { + mode = "t", + }, + }, + + icons = { + breadcrumb = "»", -- symbol used in the command line area that shows your active key combo + separator = "  ", -- symbol used between a key and it's label + group = "+", -- symbol prepended to a group + }, + + popup_mappings = { + scroll_down = "", -- binding to scroll down inside the popup + scroll_up = "", -- binding to scroll up inside the popup + }, + + window = { + border = "none", -- none/single/double/shadow + }, + + layout = { + spacing = 6, -- spacing between columns + }, + + hidden = { "", "", "", "", "call", "lua", "^:", "^ " }, + + triggers_blacklist = { + -- list of mode / prefixes that should never be hooked by WhichKey + i = { "j", "k" }, + v = { "j", "k" }, + }, + } + + options = nvchad.load_override(options, "folke/which-key.nvim") + + local lsp_mappings = { nvchad.load_config().mappings.lspconfig } + lsp_mappings[1]["mode_opts"] = { buffer = bufnr } + + if not nvchad.whichKey_map(lsp_mappings, options) then + nvchad.no_WhichKey_table_map(lsp_mappings) end end diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index 70b1a11..afcf40c 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -63,21 +63,7 @@ local mapping_groups = { groups = vim.deepcopy(mappings.groups) } mappings.disabled = nil mappings.groups = nil --- register mappings -local function register_mappings(maps, opts) - for mode, opt in pairs(opts.mode_opts) do - for key, value in pairs(maps) do - if key ~= "lspconfig" then - if value[mode] then - local mode_opts = value["mode_opts"] and vim.tbl_deep_extend("force", opt, value["mode_opts"]) or opt - wk.register(value[mode], mode_opts) - end - end - end - end -end - -register_mappings(mappings, options) -register_mappings(mapping_groups, options) +nvchad.whichKey_map(mappings, options) +nvchad.whichKey_map(mapping_groups, options) wk.setup(options) From cdf18fd3346a214baab98a44490e06c4049edf6f Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 25 May 2022 12:36:58 +0530 Subject: [PATCH 1085/1541] clean up --- lua/plugins/configs/lspconfig.lua | 55 ++----------------------------- lua/plugins/configs/whichkey.lua | 24 +++++++++----- lua/plugins/init.lua | 2 +- 3 files changed, 18 insertions(+), 63 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index e4593ee..8355385 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -22,60 +22,9 @@ M.on_attach = function(client, bufnr) client.resolved_capabilities.document_formatting = false client.resolved_capabilities.document_range_formatting = false - local options = { - - -- NOTE : this mode_opts table isnt in the default whichkey config - -- Its added here so you could configure it in chadrc - - mode_opts = { - n = { - mode = "n", - }, - - v = { - mode = "v", - }, - - i = { - mode = "i", - }, - - t = { - mode = "t", - }, - }, - - icons = { - breadcrumb = "»", -- symbol used in the command line area that shows your active key combo - separator = "  ", -- symbol used between a key and it's label - group = "+", -- symbol prepended to a group - }, - - popup_mappings = { - scroll_down = "", -- binding to scroll down inside the popup - scroll_up = "", -- binding to scroll up inside the popup - }, - - window = { - border = "none", -- none/single/double/shadow - }, - - layout = { - spacing = 6, -- spacing between columns - }, - - hidden = { "", "", "", "", "call", "lua", "^:", "^ " }, - - triggers_blacklist = { - -- list of mode / prefixes that should never be hooked by WhichKey - i = { "j", "k" }, - v = { "j", "k" }, - }, - } - - options = nvchad.load_override(options, "folke/which-key.nvim") - + local options = require("plugins.configs.whichkey").options local lsp_mappings = { nvchad.load_config().mappings.lspconfig } + lsp_mappings[1]["mode_opts"] = { buffer = bufnr } if not nvchad.whichKey_map(lsp_mappings, options) then diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index afcf40c..e113b3b 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -4,7 +4,9 @@ if not present then return end -local options = { +local M = {} + +M.options = { -- NOTE : this mode_opts table isnt in the default whichkey config -- Its added here so you could configure it in chadrc @@ -55,15 +57,19 @@ local options = { }, } -options = nvchad.load_override(options, "folke/which-key.nvim") +M.options = nvchad.load_override(M.options, "folke/which-key.nvim") -local mappings = nvchad.load_config().mappings -local mapping_groups = { groups = vim.deepcopy(mappings.groups) } +M.setup = function() + local mappings = nvchad.load_config().mappings + local mapping_groups = { groups = vim.deepcopy(mappings.groups) } -mappings.disabled = nil -mappings.groups = nil + mappings.disabled = nil + mappings.groups = nil -nvchad.whichKey_map(mappings, options) -nvchad.whichKey_map(mapping_groups, options) + nvchad.whichKey_map(mappings, M.options) + nvchad.whichKey_map(mapping_groups, M.options) -wk.setup(options) + wk.setup(M.options) +end + +return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 0c3d16d..f0c1867 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -206,7 +206,7 @@ local plugins = { nvchad.packer_lazy_load "which-key.nvim" end, config = function() - require "plugins.configs.whichkey" + require("plugins.configs.whichkey").setup() end, }, } From f8b5571466173f6518ab22351bacda186fd23b2e Mon Sep 17 00:00:00 2001 From: Leon Heidelbach Date: Thu, 26 May 2022 17:49:13 +0200 Subject: [PATCH 1086/1541] fix: fixed lspconfig issues and cleaned up --- lua/core/mappings.lua | 3 ++- lua/core/utils.lua | 36 ++++++++++++++----------------- lua/plugins/configs/lspconfig.lua | 2 +- lua/plugins/configs/whichkey.lua | 12 +++++------ 4 files changed, 25 insertions(+), 28 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index fd10425..f7c4f67 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -102,7 +102,8 @@ M.comment = { M.lspconfig = { -- See ` :help vim.lsp.*` for documentation on any of the below functions - ignore = { "/lua/plugins/configs/whichkey.lua" }, + -- define all paths from which these maps should not be applied through the mapping function + ignore = { "/lua/custom/init.lua", "/lua/plugins/configs/whichkey.lua" }, n = { ["gD"] = { diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 4b97769..a712791 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -129,7 +129,7 @@ end -- register mappings through which-key nvchad.whichKey_map = function(maps, opts) local present, wk = pcall(require, "which-key") - local caller_path = nvchad.get_caller_file_path() + local caller_path = nvchad.get_caller_file_path(4) if not present then return false @@ -140,8 +140,7 @@ nvchad.whichKey_map = function(maps, opts) if value[mode] then -- check if caller_path is in the ignore list if not value["ignore"] or not vim.tbl_contains(value["ignore"], caller_path) then - local mode_opts = value["mode_opts"] and - vim.tbl_deep_extend("force", opt, value["mode_opts"]) or opt + local mode_opts = value["mode_opts"] and vim.tbl_deep_extend("force", opt, value["mode_opts"]) or opt wk.register(value[mode], mode_opts) end end @@ -152,16 +151,20 @@ nvchad.whichKey_map = function(maps, opts) end -- for those who disabled whichkey and want to add specific mapping tables -nvchad.no_WhichKey_table_map = function(mappings) +nvchad.no_WhichKey_map = function(mappings) + local caller_path = nvchad.get_caller_file_path(4) local ignore_modes = { "mode_opts" } + mappings = mappings or nvchad.load_config().mappings for _, value in pairs(mappings) do - for mode, keymap in pairs(value) do - if not vim.tbl_contains(ignore_modes, mode) then - for keybind, cmd in pairs(keymap) do - -- disabled keys will not have cmd set - if cmd ~= "" and cmd[1] then - nvchad.map(mode, keybind, cmd[1]) + if not value["ignore"] or not vim.tbl_contains(value["ignore"], caller_path) then + for mode, keymap in pairs(value) do + if not vim.tbl_contains(ignore_modes, mode) then + for keybind, cmd in pairs(keymap) do + -- disabled keys will not have cmd set + if cmd ~= "" and cmd[1] then + nvchad.map(mode, keybind, cmd[1], value["mode_opts"] or nil) + end end end end @@ -169,13 +172,6 @@ nvchad.no_WhichKey_table_map = function(mappings) end end --- for those who disabled whichkey -nvchad.no_WhichKey_map = function() - local mappings = nvchad.load_config().mappings - - nvchad.no_WhichKey_table_map(mappings) -end - -- load plugin after entering vim ui nvchad.packer_lazy_load = function(plugin, timer) if plugin then @@ -229,11 +225,11 @@ nvchad.load_override = function(default_table, plugin_name) return default_table end -nvchad.get_caller_file_path = function() - local success, result = pcall(debug.getinfo, 4, "S") +nvchad.get_caller_file_path = function(call_stack_depth) + local success, result = pcall(debug.getinfo, call_stack_depth, "S") if success then - return result.source:match("@(.*)"):gsub(vim.fn.stdpath("config"), "") + return result.source:match("@(.*)"):gsub(vim.fn.stdpath "config", "") else return "" end diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 8355385..46d3558 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -28,7 +28,7 @@ M.on_attach = function(client, bufnr) lsp_mappings[1]["mode_opts"] = { buffer = bufnr } if not nvchad.whichKey_map(lsp_mappings, options) then - nvchad.no_WhichKey_table_map(lsp_mappings) + nvchad.no_WhichKey_map(lsp_mappings) end end diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index e113b3b..1e23133 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -1,9 +1,3 @@ -local present, wk = pcall(require, "which-key") - -if not present then - return -end - local M = {} M.options = { @@ -60,6 +54,12 @@ M.options = { M.options = nvchad.load_override(M.options, "folke/which-key.nvim") M.setup = function() + local present, wk = pcall(require, "which-key") + + if not present then + return + end + local mappings = nvchad.load_config().mappings local mapping_groups = { groups = vim.deepcopy(mappings.groups) } From c7949aa3c3770d84dcc514d9138dc62c6e199d65 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 28 May 2022 07:54:42 +0530 Subject: [PATCH 1087/1541] remove globals from nvimtree config | https://github.com/kyazdani42/nvim-tree.lua/commit/3ba383d5915e67dae99c27377a68db237d432265 --- lua/plugins/configs/nvimtree.lua | 74 ++++++++++++++++---------------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 8bc69f8..c1bda95 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -4,44 +4,6 @@ if not present then return end --- globals must be set prior to requiring nvim-tree to function -local g = vim.g - -g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names -g.nvim_tree_git_hl = 1 -g.nvim_tree_highlight_opened_files = 0 - -g.nvim_tree_show_icons = { - folders = 1, - files = 1, - git = 1, - folder_arrows = 1, -} - -g.nvim_tree_icons = { - default = "", - symlink = "", - git = { - deleted = "", - ignored = "◌", - renamed = "➜", - staged = "✓", - unmerged = "", - unstaged = "✗", - untracked = "★", - }, - folder = { - default = "", - empty = "", - empty_open = "", - open = "", - symlink = "", - symlink_open = "", - arrow_open = "", - arrow_closed = "", - }, -} - local options = { filters = { dotfiles = false, @@ -73,9 +35,45 @@ local options = { }, }, renderer = { + highlight_git = false, + highlight_opened_files = "none", + indent_markers = { enable = false, }, + icons = { + padding = " ", + symlink_arrow = " ➛ ", + show = { + file = true, + folder = true, + folder_arrow = true, + git = false, + }, + glyphs = { + default = "", + symlink = "", + folder = { + default = "", + empty = "", + empty_open = "", + open = "", + symlink = "", + symlink_open = "", + arrow_open = "", + arrow_closed = "", + }, + git = { + unstaged = "✗", + staged = "✓", + unmerged = "", + renamed = "➜", + untracked = "★", + deleted = "", + ignored = "◌", + }, + }, + }, }, } From 6e063cb3e3abfcdc3cb5200e65dfb84eaec53354 Mon Sep 17 00:00:00 2001 From: Anonymous1231-dev <87801676+Anonymous1231-dev@users.noreply.github.com> Date: Sun, 29 May 2022 12:46:31 +0800 Subject: [PATCH 1088/1541] chore: Add some beautiful icons Signed-off-by: Anonymous1231-dev <87801676+Anonymous1231-dev@users.noreply.github.com> --- lua/core/packer.lua | 8 ++++---- lua/plugins/configs/bufferline.lua | 4 ++-- lua/plugins/configs/lsp_installer.lua | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lua/core/packer.lua b/lua/core/packer.lua index 2bd4a6e..3ee917e 100644 --- a/lua/core/packer.lua +++ b/lua/core/packer.lua @@ -25,10 +25,10 @@ M.options = { compile_on_sync = true, git = { clone_timeout = 6000 }, display = { - working_sym = "ﲊ", - error_sym = "✗", - done_sym = "﫟", - removed_sym = "", + working_sym = " ﲊ", + error_sym = "✗ ", + done_sym = " ", + removed_sym = " ", moved_sym = "", open_fn = function() return require("packer.util").float { border = "single" } diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 4292d3b..b6f62da 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -21,8 +21,8 @@ local options = { modified_icon = "", close_icon = "", show_close_icon = false, - left_trunc_marker = "", - right_trunc_marker = "", + left_trunc_marker = " ", + right_trunc_marker = " ", max_name_length = 14, max_prefix_length = 13, tab_size = 20, diff --git a/lua/plugins/configs/lsp_installer.lua b/lua/plugins/configs/lsp_installer.lua index 112a318..000f536 100644 --- a/lua/plugins/configs/lsp_installer.lua +++ b/lua/plugins/configs/lsp_installer.lua @@ -13,9 +13,9 @@ local options = { ui = { icons = { - server_installed = "", - server_pending = "", - server_uninstalled = "ﮊ", + server_installed = " ", + server_pending = " ", + server_uninstalled = " ﮊ", }, keymaps = { toggle_server_expand = "", From c5bcf9d9a17ccb278138e8647343542b20cb5ae6 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Sun, 29 May 2022 02:53:03 -0400 Subject: [PATCH 1089/1541] fix #1141 --- lua/core/packer.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/core/packer.lua b/lua/core/packer.lua index 3ee917e..e48a9cd 100644 --- a/lua/core/packer.lua +++ b/lua/core/packer.lua @@ -2,11 +2,13 @@ local M = {} M.bootstrap = function() local fn = vim.fn - local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim" + local base_path = fn.stdpath "data" .. "/site/pack/packer" + local opt, start = base_path .. "/opt/packer.nvim", base_path .. "/start/packer.nvim" + local install_path = fn.isdirectory(opt) and opt or start vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" }) - if fn.empty(fn.glob(install_path)) > 0 then + if not fn.isdirectory(install_path) then print "Cloning packer .." fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } From 0f013d4e7b52da7978b386c281cd026413543417 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 29 May 2022 15:08:53 +0530 Subject: [PATCH 1090/1541] Breaking change for non-whichkey users | Refactor mapping functions --- lua/core/mappings.lua | 3 - lua/core/packer.lua | 2 - lua/core/utils.lua | 207 ++++++++++-------------------- lua/plugins/configs/lspconfig.lua | 10 +- lua/plugins/configs/whichkey.lua | 53 ++------ lua/plugins/init.lua | 2 +- 6 files changed, 85 insertions(+), 192 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index f7c4f67..8ba5d92 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -102,9 +102,6 @@ M.comment = { M.lspconfig = { -- See ` :help vim.lsp.*` for documentation on any of the below functions - -- define all paths from which these maps should not be applied through the mapping function - ignore = { "/lua/custom/init.lua", "/lua/plugins/configs/whichkey.lua" }, - n = { ["gD"] = { function() diff --git a/lua/core/packer.lua b/lua/core/packer.lua index e48a9cd..126f9ab 100644 --- a/lua/core/packer.lua +++ b/lua/core/packer.lua @@ -13,8 +13,6 @@ M.bootstrap = function() fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } - print "Packer cloned successfully!" - -- install plugins + compile their configs vim.cmd "packadd packer.nvim" require "plugins" diff --git a/lua/core/utils.lua b/lua/core/utils.lua index a712791..95beb4b 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -1,5 +1,7 @@ _G.nvchad = {} +local merge_tb = vim.tbl_deep_extend + nvchad.close_buffer = function(force) if vim.bo.buftype == "terminal" then vim.api.nvim_win_hide(0) @@ -23,150 +25,89 @@ nvchad.close_buffer = function(force) end nvchad.load_config = function() - local conf = require "core.default_config" - local ignore_modes = { "mode_opts" } - - -- attempt to load and merge a user config - local chadrc_exists = vim.fn.filereadable(vim.fn.stdpath "config" .. "/lua/custom/chadrc.lua") == 1 + local config = require "core.default_config" + local chadrc_exists, chadrc = pcall(require, "custom.chadrc") if chadrc_exists then -- merge user config if it exists and is a table; otherwise display an error - local user_config = require "custom.chadrc" - - if type(user_config) == "table" then - conf.mappings = conf.mappings and nvchad.prune_key_map(conf.mappings, user_config.mappings, ignore_modes) or {} - user_config.mappings = user_config.mappings - and nvchad.prune_key_map(user_config.mappings, "rm_disabled", ignore_modes) - or {} - conf = vim.tbl_deep_extend("force", conf, user_config) + if type(chadrc) == "table" then + nvchad.remove_default_keys() + config = merge_tb("force", config, chadrc) else - error "User config (chadrc.lua) *must* return a table!" + error "chadrc must return a table!" end end - return conf + config.mappings.disabled = nil + return config end --- reduces a given keymap to a table of modes each containing a list of key maps -nvchad.reduce_key_map = function(key_map, ignore_modes) - local prune_keys = {} +nvchad.remove_default_keys = function() + local chadrc = require "custom.chadrc" + local user_mappings = chadrc.mappings or {} + local user_keys = {} + local user_sections = vim.tbl_keys(user_mappings) - for _, modes in pairs(key_map) do - for mode, mappings in pairs(modes) do - if not vim.tbl_contains(ignore_modes, mode) then - prune_keys[mode] = prune_keys[mode] and prune_keys[mode] or {} - prune_keys[mode] = vim.list_extend(prune_keys[mode], vim.tbl_keys(mappings)) + -- push user_map keys in user_keys table + for _, section in ipairs(user_sections) do + user_keys = vim.tbl_deep_extend("force", user_keys, user_mappings[section]) + end + + local function disable_key(mode, keybind, mode_mapping) + local keys_in_mode = vim.tbl_keys(user_keys[mode] or {}) + + if vim.tbl_contains(keys_in_mode, keybind) then + mode_mapping[keybind] = nil + end + end + + local default_mappings = require("core.default_config").mappings + + -- remove user_maps from default mapping table + for _, section_mappings in pairs(default_mappings) do + for mode, mode_mapping in pairs(section_mappings) do + for keybind, _ in pairs(mode_mapping) do + disable_key(mode, keybind, mode_mapping) end end end - return prune_keys end --- remove disabled mappings from a given key map -nvchad.remove_disabled_mappings = function(key_map) - local clean_map = {} - - if key_map == nil or key_map == "" then - return key_map - end - - if type(key_map) == "table" then - for k, v in pairs(key_map) do - if v ~= nil and v ~= "" then - clean_map[k] = v - end - end - end - - return clean_map -end - --- prune keys from a key map table by matching against another key map table -nvchad.prune_key_map = function(key_map, prune_map, ignore_modes) - if not prune_map then - return key_map - end - if not key_map then - return prune_map - end - local prune_keys = type(prune_map) == "table" and nvchad.reduce_key_map(prune_map, ignore_modes) - or { n = {}, v = {}, i = {}, t = {} } - - for ext, modes in pairs(key_map) do - for mode, mappings in pairs(modes) do - if not vim.tbl_contains(ignore_modes, mode) then - -- filter mappings table so that only keys that are not in user_mappings are left - for b, _ in pairs(mappings) do - if prune_keys[mode] and vim.tbl_contains(prune_keys[mode], b) then - key_map[ext][mode][b] = nil - end - end - end - key_map[ext][mode] = nvchad.remove_disabled_mappings(mappings) - end - end - - return key_map -end - -nvchad.map = function(mode, keys, command, opt) - local options = { silent = true } - - if opt then - options = vim.tbl_extend("force", options, opt) - end - - if type(keys) == "table" then - for _, keymap in ipairs(keys) do - nvchad.map(mode, keymap, command, opt) - end - return - end - - vim.keymap.set(mode, keys, command, opt) -end - --- register mappings through which-key -nvchad.whichKey_map = function(maps, opts) - local present, wk = pcall(require, "which-key") - local caller_path = nvchad.get_caller_file_path(4) - - if not present then - return false - end - - for mode, opt in pairs(opts.mode_opts) do - for _, value in pairs(maps) do - if value[mode] then - -- check if caller_path is in the ignore list - if not value["ignore"] or not vim.tbl_contains(value["ignore"], caller_path) then - local mode_opts = value["mode_opts"] and vim.tbl_deep_extend("force", opt, value["mode_opts"]) or opt - wk.register(value[mode], mode_opts) - end - end - end - end - - return true -end - --- for those who disabled whichkey and want to add specific mapping tables -nvchad.no_WhichKey_map = function(mappings) - local caller_path = nvchad.get_caller_file_path(4) - local ignore_modes = { "mode_opts" } +nvchad.load_mappings = function(mappings, mapping_opt) mappings = mappings or nvchad.load_config().mappings - for _, value in pairs(mappings) do - if not value["ignore"] or not vim.tbl_contains(value["ignore"], caller_path) then - for mode, keymap in pairs(value) do - if not vim.tbl_contains(ignore_modes, mode) then - for keybind, cmd in pairs(keymap) do - -- disabled keys will not have cmd set - if cmd ~= "" and cmd[1] then - nvchad.map(mode, keybind, cmd[1], value["mode_opts"] or nil) - end - end + -- set mapping function with/without whichkye + local map_func + local whichkey_exists, wk = pcall(require, "which-key") + + if whichkey_exists then + map_func = function(keybind, mapping_info, opts) + wk.register({ [keybind] = mapping_info }, opts) + end + else + map_func = function(keybind, mapping_info, opts) + local mode = opts.mode + opts.mode = nil + vim.keymap.set(mode, keybind, mapping_info[1], opts) + end + end + + mappings.lspconfig = nil + + for _, section_mappings in pairs(mappings) do + -- skip mapping this as its mapppings are loaded in lspconfiguti + for mode, mode_mappings in pairs(section_mappings) do + for keybind, mapping_info in pairs(mode_mappings) do + -- merge default + user opts + + local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) + local opts = merge_tb("force", default_opts, mapping_info.opts or {}) + + if mapping_info.opts then + mapping_info.opts = nil end + + map_func(keybind, mapping_info, opts) end end end @@ -200,7 +141,7 @@ nvchad.merge_plugins = function(default_plugins) local user_plugins = nvchad.load_config().plugins.user -- merge default + user plugin table - default_plugins = vim.tbl_deep_extend("force", default_plugins, user_plugins) + default_plugins = merge_tb("force", default_plugins, user_plugins) local final_table = {} @@ -217,20 +158,10 @@ nvchad.load_override = function(default_table, plugin_name) local user_table = nvchad.load_config().plugins.override[plugin_name] if type(user_table) == "table" then - default_table = vim.tbl_deep_extend("force", default_table, user_table) + default_table = merge_tb("force", default_table, user_table) else default_table = default_table end return default_table end - -nvchad.get_caller_file_path = function(call_stack_depth) - local success, result = pcall(debug.getinfo, call_stack_depth, "S") - - if success then - return result.source:match("@(.*)"):gsub(vim.fn.stdpath "config", "") - else - return "" - end -end diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 46d3558..f123ac5 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -22,14 +22,8 @@ M.on_attach = function(client, bufnr) client.resolved_capabilities.document_formatting = false client.resolved_capabilities.document_range_formatting = false - local options = require("plugins.configs.whichkey").options - local lsp_mappings = { nvchad.load_config().mappings.lspconfig } - - lsp_mappings[1]["mode_opts"] = { buffer = bufnr } - - if not nvchad.whichKey_map(lsp_mappings, options) then - nvchad.no_WhichKey_map(lsp_mappings) - end + local lsp_mappings = nvchad.load_config().mappings.lspconfig + nvchad.load_mappings({ lsp_mappings }, { buffer = bufnr }) end local capabilities = vim.lsp.protocol.make_client_capabilities() diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index 1e23133..c2487bb 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -1,27 +1,10 @@ -local M = {} +local present, wk = pcall(require, "which-key") -M.options = { +if not present then + return +end - -- NOTE : this mode_opts table isnt in the default whichkey config - -- Its added here so you could configure it in chadrc - - mode_opts = { - n = { - mode = "n", - }, - - v = { - mode = "v", - }, - - i = { - mode = "i", - }, - - t = { - mode = "t", - }, - }, +local options = { icons = { breadcrumb = "»", -- symbol used in the command line area that shows your active key combo @@ -51,25 +34,15 @@ M.options = { }, } -M.options = nvchad.load_override(M.options, "folke/which-key.nvim") +options = nvchad.load_override(options, "folke/which-key.nvim") -M.setup = function() - local present, wk = pcall(require, "which-key") +local mappings = nvchad.load_config().mappings +local mapping_groups = { groups = vim.deepcopy(mappings.groups) } - if not present then - return - end +mappings.disabled = nil +mappings.groups = nil - local mappings = nvchad.load_config().mappings - local mapping_groups = { groups = vim.deepcopy(mappings.groups) } +nvchad.load_mappings() +nvchad.load_mappings(mapping_groups) - mappings.disabled = nil - mappings.groups = nil - - nvchad.whichKey_map(mappings, M.options) - nvchad.whichKey_map(mapping_groups, M.options) - - wk.setup(M.options) -end - -return M +wk.setup(options) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index f0c1867..0c3d16d 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -206,7 +206,7 @@ local plugins = { nvchad.packer_lazy_load "which-key.nvim" end, config = function() - require("plugins.configs.whichkey").setup() + require "plugins.configs.whichkey" end, }, } From cb97cef2a7d6ba48cdeb0d6c959cdd458ad240b8 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 29 May 2022 16:07:47 +0530 Subject: [PATCH 1091/1541] remove usage of globals for util functions --- lua/core/mappings.lua | 2 +- lua/core/options.lua | 4 ++-- lua/core/packer.lua | 6 +++--- lua/core/utils.lua | 30 ++++++++++++++------------- lua/plugins/configs/alpha.lua | 2 +- lua/plugins/configs/bufferline.lua | 2 +- lua/plugins/configs/cmp.lua | 8 +++---- lua/plugins/configs/icons.lua | 2 +- lua/plugins/configs/lsp_installer.lua | 2 +- lua/plugins/configs/lspconfig.lua | 6 +++--- lua/plugins/configs/nvimtree.lua | 2 +- lua/plugins/configs/nvterm.lua | 2 +- lua/plugins/configs/others.lua | 10 +++++---- lua/plugins/configs/statusline.lua | 4 ++-- lua/plugins/configs/telescope.lua | 2 +- lua/plugins/configs/treesitter.lua | 2 +- lua/plugins/configs/whichkey.lua | 10 +++++---- lua/plugins/init.lua | 14 ++++--------- 18 files changed, 55 insertions(+), 55 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 8ba5d92..b7c10ed 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -71,7 +71,7 @@ M.bufferline = { -- close buffer + hide terminal buffer ["x"] = { function() - nvchad.close_buffer() + require("core.utils").close_buffer() end, " close buffer", }, diff --git a/lua/core/options.lua b/lua/core/options.lua index 26727c7..05e3c76 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -1,7 +1,7 @@ local opt = vim.opt local g = vim.g -g.nvchad_theme = nvchad.load_config().ui.theme +g.nvchad_theme = require("core.utils").load_config().ui.theme -- use filetype.lua instead of filetype.vim g.did_load_filetypes = 0 @@ -86,4 +86,4 @@ vim.schedule(function() end) -- load user options if the file exists -nvchad.load_config().options.user() +require("core.utils").load_config().options.user() diff --git a/lua/core/packer.lua b/lua/core/packer.lua index 126f9ab..ceaecf5 100644 --- a/lua/core/packer.lua +++ b/lua/core/packer.lua @@ -37,7 +37,7 @@ M.options = { } -- merge overrides if there are any -M.options = nvchad.load_override(M.options, "wbthomason/packer.nvim") +M.options = require("core.utils").load_override(M.options, "wbthomason/packer.nvim") M.run = function(plugins) local present, packer = pcall(require, "packer") @@ -47,8 +47,8 @@ M.run = function(plugins) end -- Override with chadrc values - plugins = nvchad.remove_default_plugins(plugins) - plugins = nvchad.merge_plugins(plugins) + plugins = require("core.utils").remove_default_plugins(plugins) + plugins = require("core.utils").merge_plugins(plugins) packer.init(M.options) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 95beb4b..ba94f86 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -1,8 +1,8 @@ -_G.nvchad = {} +local M = {} local merge_tb = vim.tbl_deep_extend -nvchad.close_buffer = function(force) +M.close_buffer = function(force) if vim.bo.buftype == "terminal" then vim.api.nvim_win_hide(0) return @@ -24,14 +24,14 @@ nvchad.close_buffer = function(force) vim.cmd(close_cmd) end -nvchad.load_config = function() +M.load_config = function() local config = require "core.default_config" local chadrc_exists, chadrc = pcall(require, "custom.chadrc") if chadrc_exists then -- merge user config if it exists and is a table; otherwise display an error if type(chadrc) == "table" then - nvchad.remove_default_keys() + M.remove_default_keys() config = merge_tb("force", config, chadrc) else error "chadrc must return a table!" @@ -42,7 +42,7 @@ nvchad.load_config = function() return config end -nvchad.remove_default_keys = function() +M.remove_default_keys = function() local chadrc = require "custom.chadrc" local user_mappings = chadrc.mappings or {} local user_keys = {} @@ -73,8 +73,8 @@ nvchad.remove_default_keys = function() end end -nvchad.load_mappings = function(mappings, mapping_opt) - mappings = mappings or nvchad.load_config().mappings +M.load_mappings = function(mappings, mapping_opt) + mappings = mappings or M.load_config().mappings -- set mapping function with/without whichkye local map_func @@ -114,7 +114,7 @@ nvchad.load_mappings = function(mappings, mapping_opt) end -- load plugin after entering vim ui -nvchad.packer_lazy_load = function(plugin, timer) +M.packer_lazy_load = function(plugin, timer) if plugin then timer = timer or 0 vim.defer_fn(function() @@ -124,8 +124,8 @@ nvchad.packer_lazy_load = function(plugin, timer) end -- remove plugins defined in chadrc -nvchad.remove_default_plugins = function(plugins) - local removals = nvchad.load_config().plugins.remove or {} +M.remove_default_plugins = function(plugins) + local removals = M.load_config().plugins.remove or {} if not vim.tbl_isempty(removals) then for _, plugin in pairs(removals) do @@ -137,8 +137,8 @@ nvchad.remove_default_plugins = function(plugins) end -- merge default/user plugin tables -nvchad.merge_plugins = function(default_plugins) - local user_plugins = nvchad.load_config().plugins.user +M.merge_plugins = function(default_plugins) + local user_plugins = M.load_config().plugins.user -- merge default + user plugin table default_plugins = merge_tb("force", default_plugins, user_plugins) @@ -154,8 +154,8 @@ nvchad.merge_plugins = function(default_plugins) return final_table end -nvchad.load_override = function(default_table, plugin_name) - local user_table = nvchad.load_config().plugins.override[plugin_name] +M.load_override = function(default_table, plugin_name) + local user_table = M.load_config().plugins.override[plugin_name] if type(user_table) == "table" then default_table = merge_tb("force", default_table, user_table) @@ -165,3 +165,5 @@ nvchad.load_override = function(default_table, plugin_name) return default_table end + +return M diff --git a/lua/plugins/configs/alpha.lua b/lua/plugins/configs/alpha.lua index 840cafd..6a57bd6 100644 --- a/lua/plugins/configs/alpha.lua +++ b/lua/plugins/configs/alpha.lua @@ -72,7 +72,7 @@ options.buttons = { }, } -options = nvchad.load_override(options, "goolord/alpha-nvim") +options = require("core.utils").load_override(options, "goolord/alpha-nvim") -- dynamic header padding local fn = vim.fn diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index b6f62da..f554a54 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -65,6 +65,6 @@ local options = { } -- check for any override -options = nvchad.load_override(options, "akinsho/bufferline.nvim") +options = require("core.utils").load_override(options, "akinsho/bufferline.nvim") bufferline.setup(options) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index c587eb1..36baf27 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -23,9 +23,9 @@ local cmp_window = require "cmp.utils.window" cmp_window.info_ = cmp_window.info cmp_window.info = function(self) - local info = self:info_() - info.scrollable = false - return info + local info = self:info_() + info.scrollable = false + return info end local options = { @@ -96,6 +96,6 @@ local options = { } -- check for any override -options = nvchad.load_override(options, "hrsh7th/nvim-cmp") +options = require("core.utils").load_override(options, "hrsh7th/nvim-cmp") cmp.setup(options) diff --git a/lua/plugins/configs/icons.lua b/lua/plugins/configs/icons.lua index 7a92dd3..c3f3ba0 100644 --- a/lua/plugins/configs/icons.lua +++ b/lua/plugins/configs/icons.lua @@ -118,6 +118,6 @@ local options = { } -- check for any override -options = nvchad.load_override(options, "kyazdani42/nvim-web-devicons") +options = require("core.utils").load_override(options, "kyazdani42/nvim-web-devicons") devicons.setup(options) diff --git a/lua/plugins/configs/lsp_installer.lua b/lua/plugins/configs/lsp_installer.lua index 000f536..2e0cef9 100644 --- a/lua/plugins/configs/lsp_installer.lua +++ b/lua/plugins/configs/lsp_installer.lua @@ -31,6 +31,6 @@ local options = { max_concurrent_installers = 20, } -options = nvchad.load_override(options, "williamboman/nvim-lsp-installer") +options = require("core.utils").load_override(options, "williamboman/nvim-lsp-installer") lsp_installer.setup(options) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index f123ac5..c8f8ab5 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -22,8 +22,8 @@ M.on_attach = function(client, bufnr) client.resolved_capabilities.document_formatting = false client.resolved_capabilities.document_range_formatting = false - local lsp_mappings = nvchad.load_config().mappings.lspconfig - nvchad.load_mappings({ lsp_mappings }, { buffer = bufnr }) + local lsp_mappings = require("core.utils").load_config().mappings.lspconfig + require("core.utils").load_mappings({ lsp_mappings }, { buffer = bufnr }) end local capabilities = vim.lsp.protocol.make_client_capabilities() @@ -68,7 +68,7 @@ lspconfig.sumneko_lua.setup { } -- requires a file containing user's lspconfigs -local addlsp_confs = nvchad.load_config().plugins.options.lspconfig.setup_lspconf +local addlsp_confs = require("core.utils").load_config().plugins.options.lspconfig.setup_lspconf if #addlsp_confs ~= 0 then require(addlsp_confs).setup_lsp(M.on_attach, capabilities) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index c1bda95..e2866b1 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -78,6 +78,6 @@ local options = { } -- check for any override -options = nvchad.load_override(options, "kyazdani42/nvim-tree.lua") +options = require("core.utils").load_override(options, "kyazdani42/nvim-tree.lua") nvimtree.setup(options) diff --git a/lua/plugins/configs/nvterm.lua b/lua/plugins/configs/nvterm.lua index 5e13ec2..581e4c4 100644 --- a/lua/plugins/configs/nvterm.lua +++ b/lua/plugins/configs/nvterm.lua @@ -27,6 +27,6 @@ local options = { enable_new_mappings = true, } -options = nvchad.load_override(options, "NvChad/nvterm") +options = require("core.utils").load_override(options, "NvChad/nvterm") nvterm.setup(options) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 433560b..e44ee32 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -1,5 +1,7 @@ local M = {} +local load_override = require("core.utils").load_override + M.autopairs = function() local present1, autopairs = pcall(require, "nvim-autopairs") local present2, cmp = pcall(require, "cmp") @@ -32,7 +34,7 @@ M.better_escape = function() keys = "", } - options = nvchad.load_override(options, "max397574/better-escape.nvim") + options = load_override(options, "max397574/better-escape.nvim") escape.setup(options) end @@ -63,7 +65,7 @@ M.blankline = function() show_first_indent_level = false, } - options = nvchad.load_override(options, "lukas-reineke/indent-blankline.nvim") + options = load_override(options, "lukas-reineke/indent-blankline.nvim") blankline.setup(options) end @@ -93,7 +95,7 @@ M.colorizer = function() }, } - options = nvchad.load_override(options, "NvChad/nvim-colorizer.lua") + options = load_override(options, "NvChad/nvim-colorizer.lua") colorizer.setup(options["filetypes"], options["user_default_options"]) vim.cmd "ColorizerReloadAllBuffers" @@ -149,7 +151,7 @@ M.signature = function() padding = "", -- character to pad on left and right of signature can be ' ', or '|' etc } - options = nvchad.load_override(options, "ray-x/lsp_signature.nvim") + options = load_override(options, "ray-x/lsp_signature.nvim") lsp_signature.setup(options) end diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 4c850a9..6595901 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -50,7 +50,7 @@ options.icon_styles = { }, } -options.separator_style = options.icon_styles[nvchad.load_config().plugins.options.statusline.separator_style] +options.separator_style = options.icon_styles[require("core.utils").load_config().plugins.options.statusline.separator_style] options.main_icon = { provider = options.separator_style.main_icon, @@ -312,7 +312,7 @@ options.current_line = { hl = "Feline_CurrentLine", } -options = nvchad.load_override(options, "feline-nvim/feline.nvim") +options = require("core.utils").load_override(options, "feline-nvim/feline.nvim") local function add_table(tbl, inject) if inject then diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 4637492..15bd800 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -59,7 +59,7 @@ local options = { } -- check for any override -options = nvchad.load_override(options, "nvim-telescope/telescope.nvim") +options = require("core.utils").load_override(options, "nvim-telescope/telescope.nvim") telescope.setup(options) -- load extensions diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index b576b3f..a6e6483 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -16,6 +16,6 @@ local options = { } -- check for any override -options = nvchad.load_override(options, "nvim-treesitter/nvim-treesitter") +options = require("core.utils").load_override(options, "nvim-treesitter/nvim-treesitter") treesitter.setup(options) diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index c2487bb..023327f 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -34,15 +34,17 @@ local options = { }, } -options = nvchad.load_override(options, "folke/which-key.nvim") +options = require("core.utils").load_override(options, "folke/which-key.nvim") -local mappings = nvchad.load_config().mappings +local utils = require "core.utils" + +local mappings = utils.load_config().mappings local mapping_groups = { groups = vim.deepcopy(mappings.groups) } mappings.disabled = nil mappings.groups = nil -nvchad.load_mappings() -nvchad.load_mappings(mapping_groups) +utils.load_mappings() +utils.load_mappings(mapping_groups) wk.setup(options) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 0c3d16d..78bdaaa 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -71,9 +71,7 @@ local plugins = { config = function() require("plugins.configs.others").gitsigns() end, - setup = function() - nvchad.packer_lazy_load "gitsigns.nvim" - end, + setup = require("core.utils").packer_lazy_load "gitsigns.nvim", }, -- lsp stuff @@ -81,7 +79,7 @@ local plugins = { ["williamboman/nvim-lsp-installer"] = { opt = true, setup = function() - nvchad.packer_lazy_load "nvim-lsp-installer" + require("core.utils").packer_lazy_load "nvim-lsp-installer" -- reload the current file so lsp actually starts for it vim.defer_fn(function() vim.cmd 'if &ft == "packer" | echo "" | else | silent! e %' @@ -107,9 +105,7 @@ local plugins = { ["andymass/vim-matchup"] = { opt = true, - setup = function() - nvchad.packer_lazy_load "vim-matchup" - end, + setup = require("core.utils").packer_lazy_load "vim-matchup", }, ["max397574/better-escape.nvim"] = { @@ -202,9 +198,7 @@ local plugins = { ["folke/which-key.nvim"] = { opt = true, - setup = function() - nvchad.packer_lazy_load "which-key.nvim" - end, + setup = require("core.utils").packer_lazy_load "which-key.nvim", config = function() require "plugins.configs.whichkey" end, From 1a1bc99f1bdd8d4bed845882e990428295c41275 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 29 May 2022 16:21:17 +0530 Subject: [PATCH 1092/1541] misc --- lua/plugins/configs/lspconfig.lua | 7 ++++--- lua/plugins/init.lua | 8 +++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index c8f8ab5..4051dcc 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -5,6 +5,7 @@ if not present then end local M = {} +local utils = require "core.utils" require("plugins.configs.others").lsp_handlers() @@ -22,8 +23,8 @@ M.on_attach = function(client, bufnr) client.resolved_capabilities.document_formatting = false client.resolved_capabilities.document_range_formatting = false - local lsp_mappings = require("core.utils").load_config().mappings.lspconfig - require("core.utils").load_mappings({ lsp_mappings }, { buffer = bufnr }) + local lsp_mappings = utils.load_config().mappings.lspconfig + utils.load_mappings({ lsp_mappings }, { buffer = bufnr }) end local capabilities = vim.lsp.protocol.make_client_capabilities() @@ -68,7 +69,7 @@ lspconfig.sumneko_lua.setup { } -- requires a file containing user's lspconfigs -local addlsp_confs = require("core.utils").load_config().plugins.options.lspconfig.setup_lspconf +local addlsp_confs = utils.load_config().plugins.options.lspconfig.setup_lspconf if #addlsp_confs ~= 0 then require(addlsp_confs).setup_lsp(M.on_attach, capabilities) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 78bdaaa..2a34557 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,3 +1,5 @@ +local lazy_load = require("core.utils").packer_lazy_load + local plugins = { ["nvim-lua/plenary.nvim"] = {}, @@ -71,7 +73,7 @@ local plugins = { config = function() require("plugins.configs.others").gitsigns() end, - setup = require("core.utils").packer_lazy_load "gitsigns.nvim", + setup = lazy_load "gitsigns.nvim", }, -- lsp stuff @@ -105,7 +107,7 @@ local plugins = { ["andymass/vim-matchup"] = { opt = true, - setup = require("core.utils").packer_lazy_load "vim-matchup", + setup = lazy_load "vim-matchup", }, ["max397574/better-escape.nvim"] = { @@ -198,7 +200,7 @@ local plugins = { ["folke/which-key.nvim"] = { opt = true, - setup = require("core.utils").packer_lazy_load "which-key.nvim", + setup = lazy_load "which-key.nvim", config = function() require "plugins.configs.whichkey" end, From 4055b8bb196c87e89de86d8b3ac59123d08522ff Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 29 May 2022 16:56:49 +0530 Subject: [PATCH 1093/1541] fix https://github.com/NvChad/NvChad/commit/0f013d4e7b52da7978b386c281cd026413543417#commitcomment-74835702 --- lua/plugins/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 2a34557..b24c3bd 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -200,7 +200,9 @@ local plugins = { ["folke/which-key.nvim"] = { opt = true, - setup = lazy_load "which-key.nvim", + setup = function() + require("core.utils").packer_lazy_load "which-key.nvim" + end, config = function() require "plugins.configs.whichkey" end, From 34fbb2e06626b1b68ac45b11464d348a04316391 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 29 May 2022 19:26:12 +0530 Subject: [PATCH 1094/1541] Revert "fix #1141" This reverts commit c5bcf9d9a17ccb278138e8647343542b20cb5ae6. --- lua/core/packer.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/core/packer.lua b/lua/core/packer.lua index ceaecf5..1e8332f 100644 --- a/lua/core/packer.lua +++ b/lua/core/packer.lua @@ -2,13 +2,11 @@ local M = {} M.bootstrap = function() local fn = vim.fn - local base_path = fn.stdpath "data" .. "/site/pack/packer" - local opt, start = base_path .. "/opt/packer.nvim", base_path .. "/start/packer.nvim" - local install_path = fn.isdirectory(opt) and opt or start + local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim" vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" }) - if not fn.isdirectory(install_path) then + if fn.empty(fn.glob(install_path)) > 0 then print "Cloning packer .." fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } From ebe151210880782502991e7495aac205a395afab Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 29 May 2022 19:35:02 +0530 Subject: [PATCH 1095/1541] fix (#1145) --- lua/plugins/init.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index b24c3bd..e595592 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,4 +1,3 @@ -local lazy_load = require("core.utils").packer_lazy_load local plugins = { @@ -73,7 +72,9 @@ local plugins = { config = function() require("plugins.configs.others").gitsigns() end, - setup = lazy_load "gitsigns.nvim", + setup = function() + require("core.utils").packer_lazy_load "gitsigns.nvim" + end }, -- lsp stuff @@ -107,7 +108,9 @@ local plugins = { ["andymass/vim-matchup"] = { opt = true, - setup = lazy_load "vim-matchup", + setup = function() + require("core.utils").packer_lazy_load "vim-matchup" + end }, ["max397574/better-escape.nvim"] = { From 1381e924cf72c6fbc513d9ffc7a09766ff50b6f2 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 29 May 2022 20:26:16 +0530 Subject: [PATCH 1096/1541] fix no lspmappings without custom mappings | https://github.com/NvChad/NvChad/commit/0f013d4e7b52da7978b386c281cd026413543417#commitcomment-74845391 --- lua/core/utils.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index ba94f86..4303015 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -92,22 +92,22 @@ M.load_mappings = function(mappings, mapping_opt) end end - mappings.lspconfig = nil + for section, section_mappings in pairs(mappings) do + if section ~= "lspconfig" then + -- skip mapping this as its mapppings are loaded in lspconfiguti + for mode, mode_mappings in pairs(section_mappings) do + for keybind, mapping_info in pairs(mode_mappings) do + -- merge default + user opts - for _, section_mappings in pairs(mappings) do - -- skip mapping this as its mapppings are loaded in lspconfiguti - for mode, mode_mappings in pairs(section_mappings) do - for keybind, mapping_info in pairs(mode_mappings) do - -- merge default + user opts + local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) + local opts = merge_tb("force", default_opts, mapping_info.opts or {}) - local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) - local opts = merge_tb("force", default_opts, mapping_info.opts or {}) + if mapping_info.opts then + mapping_info.opts = nil + end - if mapping_info.opts then - mapping_info.opts = nil + map_func(keybind, mapping_info, opts) end - - map_func(keybind, mapping_info, opts) end end end From 70390c6e8dc78b939d132326cd8de4e9f5dc3752 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 30 May 2022 09:13:45 +0530 Subject: [PATCH 1097/1541] rm misleading code in example chadrc | (#1149) --- examples/chadrc.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/chadrc.lua b/examples/chadrc.lua index 9b03aab..6aa2521 100644 --- a/examples/chadrc.lua +++ b/examples/chadrc.lua @@ -1,8 +1,5 @@ -- Just an example, supposed to be placed in /lua/custom/ --- remove this if you dont use custom.init.lua at all -require "custom" - local M = {} -- make sure you maintain the structure of `core/default_config.lua` here, From fd96f4ddbd9c1706e1273905959d2f9dcef9bb7c Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 30 May 2022 12:16:18 +0530 Subject: [PATCH 1098/1541] make autopairs overridable | fix (#1154) --- lua/plugins/configs/others.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index e44ee32..ee76225 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -10,11 +10,14 @@ M.autopairs = function() return end - autopairs.setup { + local options = { fast_wrap = {}, disable_filetype = { "TelescopePrompt", "vim" }, } + options = load_override(options, "windwp/nvim-autopairs") + autopairs.setup(options) + local cmp_autopairs = require "nvim-autopairs.completion.cmp" cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) From 59de298d8fc05b4ee2633cd2dfe9d517cf6f6d68 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 30 May 2022 12:33:46 +0530 Subject: [PATCH 1099/1541] fix #1155, #1149 --- init.lua | 1 + lua/plugins/configs/whichkey.lua | 1 - lua/plugins/init.lua | 5 ++--- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 1aab68f..b0d1b93 100644 --- a/init.lua +++ b/init.lua @@ -7,6 +7,7 @@ end require "core" require "core.utils" require "core.options" +require("core.utils").load_mappings() -- setup packer + plugins require("core.packer").bootstrap() diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index 023327f..30630a2 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -44,7 +44,6 @@ local mapping_groups = { groups = vim.deepcopy(mappings.groups) } mappings.disabled = nil mappings.groups = nil -utils.load_mappings() utils.load_mappings(mapping_groups) wk.setup(options) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e595592..613ae4b 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,4 +1,3 @@ - local plugins = { ["nvim-lua/plenary.nvim"] = {}, @@ -74,7 +73,7 @@ local plugins = { end, setup = function() require("core.utils").packer_lazy_load "gitsigns.nvim" - end + end, }, -- lsp stuff @@ -110,7 +109,7 @@ local plugins = { opt = true, setup = function() require("core.utils").packer_lazy_load "vim-matchup" - end + end, }, ["max397574/better-escape.nvim"] = { From f78dc305086d7948c3aa31a8de2fb09462654314 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 1 Jun 2022 00:49:23 +0530 Subject: [PATCH 1100/1541] minor improvements to startuptime --- init.lua | 5 +++- lua/core/utils.lua | 40 ++++++++++++++---------------- lua/plugins/configs/statusline.lua | 12 ++++++--- 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/init.lua b/init.lua index b0d1b93..a7e171e 100644 --- a/init.lua +++ b/init.lua @@ -7,7 +7,10 @@ end require "core" require "core.utils" require "core.options" -require("core.utils").load_mappings() + +vim.defer_fn(function() + require("core.utils").load_mappings() +end, 0) -- setup packer + plugins require("core.packer").bootstrap() diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 4303015..244fc90 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -74,9 +74,7 @@ M.remove_default_keys = function() end M.load_mappings = function(mappings, mapping_opt) - mappings = mappings or M.load_config().mappings - - -- set mapping function with/without whichkye + -- set mapping function with/without whichkey local map_func local whichkey_exists, wk = pcall(require, "which-key") @@ -92,35 +90,33 @@ M.load_mappings = function(mappings, mapping_opt) end end - for section, section_mappings in pairs(mappings) do - if section ~= "lspconfig" then - -- skip mapping this as its mapppings are loaded in lspconfiguti - for mode, mode_mappings in pairs(section_mappings) do - for keybind, mapping_info in pairs(mode_mappings) do - -- merge default + user opts + mappings = mappings or vim.deepcopy(M.load_config().mappings) + mappings.lspconfig = nil - local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) - local opts = merge_tb("force", default_opts, mapping_info.opts or {}) + for _, section_mappings in pairs(mappings) do + -- skip mapping this as its mapppings are loaded in lspconfig + for mode, mode_mappings in pairs(section_mappings) do + for keybind, mapping_info in pairs(mode_mappings) do + -- merge default + user opts - if mapping_info.opts then - mapping_info.opts = nil - end + local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) + local opts = merge_tb("force", default_opts, mapping_info.opts or {}) - map_func(keybind, mapping_info, opts) + if mapping_info.opts then + mapping_info.opts = nil end + + map_func(keybind, mapping_info, opts) end end end end -- load plugin after entering vim ui -M.packer_lazy_load = function(plugin, timer) - if plugin then - timer = timer or 0 - vim.defer_fn(function() - require("packer").loader(plugin) - end, timer) - end +M.packer_lazy_load = function(plugin) + vim.defer_fn(function() + require("packer").loader(plugin) + end, 0) end -- remove plugins defined in chadrc diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 6595901..1f310c7 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -50,7 +50,8 @@ options.icon_styles = { }, } -options.separator_style = options.icon_styles[require("core.utils").load_config().plugins.options.statusline.separator_style] +options.separator_style = + options.icon_styles[require("core.utils").load_config().plugins.options.statusline.separator_style] options.main_icon = { provider = options.separator_style.main_icon, @@ -126,6 +127,11 @@ options.git_branch = { icon = "  ", } +options.empty_space_git = { + provider = " " .. options.separator_style.left, + hl = "Feline_EmptySpace_git", +} + -- lsp options.diagnostic = { @@ -255,7 +261,7 @@ options.empty_spaceColored = { hl = function() return { fg = get_color(options.mode_hlgroups[vim.fn.mode()][2], "fg#"), - bg = get_color("Feline_EmptySpace", "fg#"), + bg = get_color("Feline_EmptySpace", "bg#"), } end, } @@ -346,8 +352,8 @@ add_table(options.right, options.diff.add) add_table(options.right, options.diff.change) add_table(options.right, options.diff.remove) add_table(options.right, options.git_branch) +add_table(options.right, options.empty_space_git) -add_table(options.right, options.empty_space) add_table(options.right, options.empty_spaceColored) add_table(options.right, options.mode_icon) add_table(options.right, options.mode_name) From d802e8e2a601a9888fd3ca5147f4e75577aaaa33 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 1 Jun 2022 14:50:01 +0530 Subject: [PATCH 1101/1541] add lsp rename popup window thx to @LeonHeidelbach for fixing some outdated stuff in the original table : https://www.reddit.com/r/neovim/comments/ql4iuj/rename_hover_including_window_title_and/ --- lua/core/mappings.lua | 2 +- lua/plugins/configs/others.lua | 57 ++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index b7c10ed..bc804fa 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -147,7 +147,7 @@ M.lspconfig = { ["ra"] = { function() - vim.lsp.buf.rename() + vim.lsp.buf.rename.float() end, " lsp rename", }, diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index ee76225..3447d53 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -196,6 +196,63 @@ M.lsp_handlers = function() vim.api.nvim_echo({ { msg } }, true, {}) end end + + -- credits to @Malace : https://www.reddit.com/r/neovim/comments/ql4iuj/rename_hover_including_window_title_and/ + -- This is modified version of the above snippet + vim.lsp.buf.rename = { + float = function() + local currName = vim.fn.expand "" + + local win = require("plenary.popup").create(" ", { + title = currName, + style = "minimal", + borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, + relative = "cursor", + borderhighlight = "RenamerBorder", + titlehighlight = "RenamerTitle", + focusable = true, + width = 25, + height = 1, + line = "cursor+2", + col = "cursor-1", + }) + + local map_opts = { noremap = true, silent = true } + + vim.cmd "startinsert" + + vim.api.nvim_buf_set_keymap(0, "i", "", "stopinsert | q!", map_opts) + vim.api.nvim_buf_set_keymap(0, "n", "", "stopinsert | q!", map_opts) + + vim.api.nvim_buf_set_keymap( + 0, + "i", + "", + "stopinsert | lua vim.lsp.buf.rename.apply(" .. currName .. "," .. win .. ")", + map_opts + ) + + vim.api.nvim_buf_set_keymap( + 0, + "n", + "", + "stopinsert | lua vim.lsp.buf.rename.apply(" .. currName .. "," .. win .. ")", + map_opts + ) + end, + + apply = function(curr, win) + local newName = vim.trim(vim.fn.getline ".") + vim.api.nvim_win_close(win, true) + + if #newName > 0 and newName ~= curr then + local params = vim.lsp.util.make_position_params() + params.newName = newName + + vim.lsp.buf_request(0, "textDocument/rename", params) + end + end, + } end M.gitsigns = function() From 1f4f614415fe50c980c08560fd96e660f7c2b9cd Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 1 Jun 2022 16:22:20 +0530 Subject: [PATCH 1102/1541] rm non-existent gloabl from sumneko_lua conf https://github.com/NvChad/NvChad/issues/1162#issuecomment-1143369271 --- lua/plugins/configs/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 4051dcc..ded646b 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -54,7 +54,7 @@ lspconfig.sumneko_lua.setup { settings = { Lua = { diagnostics = { - globals = { "vim", "nvchad" }, + globals = { "vim" }, }, workspace = { library = { From b828b677bd88bee789f9ce0880d1f6dbbf30b555 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 1 Jun 2022 17:27:21 +0530 Subject: [PATCH 1103/1541] Make Comment.nvim and gitsigns configs overridable --- lua/plugins/configs/others.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 3447d53..9884a11 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -111,7 +111,9 @@ M.comment = function() return end - nvim_comment.setup() + local options = {} + options = load_override(options, "numToStr/Comment.nvim") + nvim_comment.setup(options) end M.luasnip = function() @@ -261,8 +263,7 @@ M.gitsigns = function() if not present then return end - - gitsigns.setup { + local options = { signs = { add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, @@ -271,6 +272,9 @@ M.gitsigns = function() changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" }, }, } + options = load_override(options, "lewis6991/gitsigns.nvim") + + gitsigns.setup(options) end return M From 77c1287db83d2bd74f0a7b1fa7174ae448fcd9f4 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 1 Jun 2022 19:33:11 +0530 Subject: [PATCH 1104/1541] add global for transparency and fix (#1164) vim matchup was causing #1164 as we lazy load it and its a lil high on startup so I removed it, gotta wait till v0.8 releases and then we could use winbar.nvim instead --- lua/core/options.lua | 7 +++++-- lua/plugins/init.lua | 7 ------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index 05e3c76..168a357 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -1,12 +1,15 @@ local opt = vim.opt local g = vim.g -g.nvchad_theme = require("core.utils").load_config().ui.theme +local config = require("core.utils").load_config() + +g.nvchad_theme = config.ui.theme -- use filetype.lua instead of filetype.vim g.did_load_filetypes = 0 g.do_filetype_lua = 1 g.toggle_theme_icon = "  " +g.transparency = config.ui.transparency opt.confirm = true opt.laststatus = 3 -- global statusline @@ -86,4 +89,4 @@ vim.schedule(function() end) -- load user options if the file exists -require("core.utils").load_config().options.user() +config.options.user() diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 613ae4b..7458e6f 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -105,13 +105,6 @@ local plugins = { end, }, - ["andymass/vim-matchup"] = { - opt = true, - setup = function() - require("core.utils").packer_lazy_load "vim-matchup" - end, - }, - ["max397574/better-escape.nvim"] = { event = "InsertCharPre", config = function() From 9f48587d63f19076c3fbfc35e5822942fab7f8d1 Mon Sep 17 00:00:00 2001 From: AlexanderHOtt Date: Wed, 1 Jun 2022 15:36:44 -0700 Subject: [PATCH 1105/1541] add option to override luasnip options --- lua/plugins/configs/others.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 9884a11..6b724a1 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -123,11 +123,13 @@ M.luasnip = function() return end - luasnip.config.set_config { + local options = { history = true, updateevents = "TextChanged,TextChangedI", } + options = load_override(options, "L3MON4D3/LuaSnip") + luasnip.config.set_config(options) require("luasnip.loaders.from_vscode").lazy_load() end From 9b7b44f74ff890ef89af69d99fa180a6c89d3e26 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 2 Jun 2022 23:29:15 +0530 Subject: [PATCH 1106/1541] add nvim_gps to statusline | populate renamer popup with old value --- lua/plugins/configs/gps.lua | 44 +++ lua/plugins/configs/lspkind_icons.lua | 13 +- lua/plugins/configs/others.lua | 11 +- lua/plugins/configs/statusline.lua | 435 +++++++++++++++----------- lua/plugins/init.lua | 7 + 5 files changed, 319 insertions(+), 191 deletions(-) create mode 100644 lua/plugins/configs/gps.lua diff --git a/lua/plugins/configs/gps.lua b/lua/plugins/configs/gps.lua new file mode 100644 index 0000000..23799d7 --- /dev/null +++ b/lua/plugins/configs/gps.lua @@ -0,0 +1,44 @@ +local present, gps = pcall(require, "nvim-gps") + +if not present then + return +end + +local icons = require "plugins.configs.lspkind_icons" + +local options = { + + icons = { + ["class-name"] = "%#CmpItemKindClass#" .. icons.Class .. "%*" .. " ", + ["function-name"] = "%#CmpItemKindFunction#" .. icons.Function .. "%*" .. " ", + ["method-name"] = "%#CmpItemKindMethod#" .. icons.Method .. "%*" .. " ", + ["container-name"] = "%#CmpItemKindProperty#" .. icons.Object .. "%*" .. " ", + ["tag-name"] = "%#CmpItemKindKeyword#" .. icons.Tag .. "%*" .. " ", + ["mapping-name"] = "%#CmpItemKindProperty#" .. icons.Object .. "%*" .. " ", + ["sequence-name"] = "%CmpItemKindProperty#" .. icons.Array .. "%*" .. " ", + ["null-name"] = "%CmpItemKindField#" .. icons.Field .. "%*" .. " ", + ["boolean-name"] = "%CmpItemKindValue#" .. icons.Boolean .. "%*" .. " ", + ["integer-name"] = "%CmpItemKindValue#" .. icons.Number .. "%*" .. " ", + ["float-name"] = "%CmpItemKindValue#" .. icons.Number .. "%*" .. " ", + ["string-name"] = "%CmpItemKindValue#" .. icons.String .. "%*" .. " ", + ["array-name"] = "%CmpItemKindProperty#" .. icons.Array .. "%*" .. " ", + ["object-name"] = "%CmpItemKindProperty#" .. icons.Object .. "%*" .. " ", + ["number-name"] = "%CmpItemKindValue#" .. icons.Number .. "%*" .. " ", + ["table-name"] = "%CmpItemKindProperty#" .. icons.Table .. "%*" .. " ", + ["date-name"] = "%CmpItemKindValue#" .. icons.Calendar .. "%*" .. " ", + ["date-time-name"] = "%CmpItemKindValue#" .. icons.Table .. "%*" .. " ", + ["inline-table-name"] = "%CmpItemKindProperty#" .. icons.Calendar .. "%*" .. " ", + ["time-name"] = "%CmpItemKindValue#" .. icons.Watch .. "%*" .. " ", + ["module-name"] = "%CmpItemKindModule#" .. icons.Module .. "%*" .. " ", + }, + + ["lua"] = { + icons = { + ["container-name"] = "%#CmpItemKindProperty#" .. icons.Table .. "%*" .. " ", + ["mapping-name"] = "%#CmpItemKindProperty#" .. icons.Table .. "%*" .. " ", + ["object-name"] = "%CmpItemKindProperty#" .. icons.Table .. "%*" .. " ", + }, + }, +} + +gps.setup(options) diff --git a/lua/plugins/configs/lspkind_icons.lua b/lua/plugins/configs/lspkind_icons.lua index bf5af7a..190ca40 100644 --- a/lua/plugins/configs/lspkind_icons.lua +++ b/lua/plugins/configs/lspkind_icons.lua @@ -1,4 +1,4 @@ -local icons = { +return { Text = "", Method = "", Function = "", @@ -24,6 +24,13 @@ local icons = { Event = "", Operator = "", TypeParameter = "", + Table = " ", + Object = "", + Tag = " ", + Array = " ", + Boolean = "蘒", + Number = "", + String = "", + Calendar = " ", + Watch = "", } - -return icons diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 6b724a1..777f1bf 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -127,9 +127,10 @@ M.luasnip = function() history = true, updateevents = "TextChanged,TextChangedI", } - options = load_override(options, "L3MON4D3/LuaSnip") + options = load_override(options, "L3MON4D3/LuaSnip") luasnip.config.set_config(options) + require("luasnip.loaders.from_vscode").lazy_load() end @@ -205,10 +206,10 @@ M.lsp_handlers = function() -- This is modified version of the above snippet vim.lsp.buf.rename = { float = function() - local currName = vim.fn.expand "" + local currName = vim.fn.expand "" .. " " - local win = require("plenary.popup").create(" ", { - title = currName, + local win = require("plenary.popup").create(currName, { + title = "Renamer", style = "minimal", borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, relative = "cursor", @@ -223,6 +224,7 @@ M.lsp_handlers = function() local map_opts = { noremap = true, silent = true } + vim.cmd "normal w" vim.cmd "startinsert" vim.api.nvim_buf_set_keymap(0, "i", "", "stopinsert | q!", map_opts) @@ -265,6 +267,7 @@ M.gitsigns = function() if not present then return end + local options = { signs = { add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 1f310c7..818031a 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -1,4 +1,9 @@ local present, feline = pcall(require, "feline") +local fn = vim.fn + +local function get_color(group, attr) + return fn.synIDattr(fn.synIDtrans(fn.hlID(group)), attr) +end if not present then return @@ -9,131 +14,124 @@ local options = { lsp_severity = vim.diagnostic.severity, } +options.icons = { + mode_icon = "  ", + position_icon = " ", + empty_file = " Empty ", + dir = " ", + clock = " ", +} + options.icon_styles = { + + -- mix of slant + round default = { left = "", right = " ", - main_icon = "  ", - vi_mode_icon = " ", - position_icon = " ", - }, - arrow = { - left = "", - right = "", - main_icon = "  ", - vi_mode_icon = " ", - position_icon = " ", - }, - - block = { - left = " ", - right = " ", - main_icon = "  ", - vi_mode_icon = "  ", - position_icon = "  ", }, round = { left = "", right = "", - main_icon = "  ", - vi_mode_icon = " ", - position_icon = " ", }, - slant = { - left = " ", - right = " ", - main_icon = "  ", - vi_mode_icon = " ", - position_icon = " ", + block = { + left = "█", + right = "█", + }, + + arrow = { + left = "", + right = "", }, } -options.separator_style = - options.icon_styles[require("core.utils").load_config().plugins.options.statusline.separator_style] +local statusline_opt = require("core.utils").load_config().plugins.options.statusline.separator_style +options.separator_style = options.icon_styles[statusline_opt] -options.main_icon = { - provider = options.separator_style.main_icon, +options.mode_icon = { + provider = options.icons.mode_icon, - hl = "FelineIcon", - - right_sep = { - str = options.separator_style.right, - hl = "FelineIconSeparator", - }, -} - -options.file_name = { - provider = function() - local filename = vim.fn.expand "%:t" - local extension = vim.fn.expand "%:e" - local icon = require("nvim-web-devicons").get_icon(filename, extension) - if icon == nil then - icon = " " - return icon - end - return " " .. icon .. " " .. filename .. " " + hl = function() + return { + fg = get_color("Feline", "bg#"), + bg = get_color(options.mode_hlgroups[fn.mode()][2], "fg#"), + } end, - hl = "FelineFileName", - right_sep = { str = options.separator_style.right, - hl = "FelineFileName_Separator", + hl = function() + return { + fg = get_color(options.mode_hlgroups[fn.mode()][2], "fg#"), + bg = get_color("Feline_EmptySpace", "fg#"), + } + end, }, } -options.dir_name = { +-- MODES + +options.mode_hlgroups = { + ["n"] = { "Normal", "Feline_NormalMode" }, + ["no"] = { "N-PENDING", "Feline_NormalMode" }, + ["i"] = { "INSERT", "Feline_InsertMode" }, + ["ic"] = { "INSERT", "Feline_InsertMode" }, + ["t"] = { "TERMINAL", "Feline_TerminalMode" }, + ["v"] = { "VISUAL", "Feline_VisualMode" }, + ["V"] = { "V-LINE", "Feline_VisualMode" }, + [""] = { "V-BLOCK", "Feline_VisualMode" }, + ["R"] = { "REPLACE", "Feline_ReplaceMode" }, + ["Rv"] = { "V-REPLACE", "Feline_ReplaceMode" }, + ["s"] = { "SELECT", "Feline_SelectMode" }, + ["S"] = { "S-LINE", "Feline_SelectMode" }, + [""] = { "S-BLOCK", "Feline_SelectMode" }, + ["c"] = { "COMMAND", "Feline_CommandMode" }, + ["cv"] = { "COMMAND", "Feline_CommandMode" }, + ["ce"] = { "COMMAND", "Feline_CommandMode" }, + ["r"] = { "PROMPT", "Feline_ConfirmMode" }, + ["rm"] = { "MORE", "Feline_ConfirmMode" }, + ["r?"] = { "CONFIRM", "Feline_ConfirmMode" }, + ["!"] = { "SHELL", "Feline_TerminalMode" }, +} + +options.vi_mode = { provider = function() - local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") - return "  " .. dir_name .. " " + return " " .. options.mode_hlgroups[fn.mode()][1] .. " " end, - hl = "FelineDirName", + hl = function() + return options.mode_hlgroups[fn.mode()][2] + end, right_sep = { str = options.separator_style.right, - hl = "FelineDirName_Separator", + hl = function() + return { + fg = get_color("Feline_EmptySpace", "bg#"), + bg = get_color("Feline_nvim_gps", "bg#"), + } + end, }, } --- Git - -options.diff = { - add = { - provider = "git_diff_added", - hl = "Feline_diffIcons", - icon = " ", +options.cwd = { + -- icon + left_sep = { + str = " " .. options.icons.dir, + hl = "FelineCwd", }, - change = { - provider = "git_diff_changed", - hl = "Feline_diffIcons", + -- dirname + provider = function() + local dir_name = fn.fnamemodify(fn.getcwd(), ":t") + return " " .. dir_name .. " " + end, - icon = "  ", - }, - - remove = { - provider = "git_diff_removed", - hl = "Feline_diffIcons", - icon = "  ", - }, -} - -options.git_branch = { - provider = "git_branch", - hl = "Feline_diffIcons", - icon = "  ", -} - -options.empty_space_git = { - provider = " " .. options.separator_style.left, - hl = "Feline_EmptySpace_git", + hl = "FelineCwd", } -- lsp - options.diagnostic = { error = { provider = "diagnostic_errors", @@ -174,7 +172,7 @@ options.diagnostic = { }, } -options.lsp_icon = { +options.lsp_status = { provider = function() if next(vim.lsp.buf_get_clients()) ~= nil then local lsp_name = vim.lsp.get_active_clients()[1].name @@ -192,98 +190,129 @@ options.lsp_progress = { provider = function() local Lsp = vim.lsp.util.get_progress_messages()[1] - if Lsp then - local msg = Lsp.message or "" - local percentage = Lsp.percentage or 0 - local title = Lsp.title or "" - local spinners = { "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏" } - - local success_icon = { - "", - "", - "", - } - - local ms = vim.loop.hrtime() / 1000000 - local frame = math.floor(ms / 120) % #spinners - - if percentage >= 70 then - return string.format(" %%<%s %s %s (%s%%%%) ", success_icon[frame + 1], title, msg, percentage) - end - - return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage) + if not Lsp then + return "" end - return "" + local msg = Lsp.message or "" + local percentage = Lsp.percentage or 0 + local title = Lsp.title or "" + local spinners = { "", "" } + + local ms = vim.loop.hrtime() / 1000000 + local frame = math.floor(ms / 120) % #spinners + + return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage) end, + hl = "Feline_LspProgress", } --- MODES +-- Git -options.mode_hlgroups = { - ["n"] = { "NORMAL", "Feline_NormalMode" }, - ["no"] = { "N-PENDING", "Feline_NormalMode" }, - ["i"] = { "INSERT", "Feline_InsertMode" }, - ["ic"] = { "INSERT", "Feline_InsertMode" }, - ["t"] = { "TERMINAL", "Feline_TerminalMode" }, - ["v"] = { "VISUAL", "Feline_VisualMode" }, - ["V"] = { "V-LINE", "Feline_VisualMode" }, - [""] = { "V-BLOCK", "Feline_VisualMode" }, - ["R"] = { "REPLACE", "Feline_ReplaceMode" }, - ["Rv"] = { "V-REPLACE", "Feline_ReplaceMode" }, - ["s"] = { "SELECT", "Feline_SelectMode" }, - ["S"] = { "S-LINE", "Feline_SelectMode" }, - [""] = { "S-BLOCK", "Feline_SelectMode" }, - ["c"] = { "COMMAND", "Feline_CommandMode" }, - ["cv"] = { "COMMAND", "Feline_CommandMode" }, - ["ce"] = { "COMMAND", "Feline_CommandMode" }, - ["r"] = { "PROMPT", "Feline_ConfirmMode" }, - ["rm"] = { "MORE", "Feline_ConfirmMode" }, - ["r?"] = { "CONFIRM", "Feline_ConfirmMode" }, - ["!"] = { "SHELL", "Feline_TerminalMode" }, +options.diff = { + add = { + provider = "git_diff_added", + hl = "Feline_diffIcons", + icon = "  ", + }, + + change = { + provider = "git_diff_changed", + hl = "Feline_diffIcons", + icon = "  ", + }, + + remove = { + provider = "git_diff_removed", + hl = "Feline_diffIcons", + icon = "  ", + }, } -local fn = vim.fn +options.git_branch = { + provider = "git_branch", + hl = "Feline_diffIcons", + icon = "  ", -local function get_color(group, attr) - return fn.synIDattr(fn.synIDtrans(fn.hlID(group)), attr) -end - -options.empty_space = { - provider = " " .. options.separator_style.left, - hl = "Feline_EmptySpace", + right_sep = { + str = " ", + hl = "Feline_diffIcons", + }, } --- this matches the vi mode color -options.empty_spaceColored = { - provider = options.separator_style.left, - hl = function() - return { - fg = get_color(options.mode_hlgroups[vim.fn.mode()][2], "fg#"), - bg = get_color("Feline_EmptySpace", "bg#"), - } - end, -} +options.file_info = { + left_sep = { + str = options.separator_style.left, + hl = "Feline_file_info_sep", + }, -options.mode_icon = { - provider = options.separator_style.vi_mode_icon, - - hl = function() - return { - fg = get_color("Feline", "bg#"), - bg = get_color(options.mode_hlgroups[vim.fn.mode()][2], "fg#"), - } - end, -} - -options.mode_name = { + -- file icon provider = function() - return " " .. options.mode_hlgroups[vim.fn.mode()][1] .. " " + local filename = fn.expand "%:t" + local extension = fn.expand "%:e" + + local icon = require("nvim-web-devicons").get_icon(filename, extension) + + if icon == nil and fn.expand "%:t" == "" then + return options.icons.empty_file + else + icon = icon .. " " or " " + return icon + end end, - hl = function() - return options.mode_hlgroups[vim.fn.mode()][2] + + hl = "Feline_file_info", + + -- file name + right_sep = { + str = function() + local filename = fn.expand "%:t" + return " " .. fn.fnamemodify(filename, ":r") .. " " + end, + + hl = function() + return { + fg = get_color("Feline_file_info", "bg#"), + bg = get_color("Feline_file_info", "fg#"), + } + end, + }, +} + +options.nvim_gps = { + provider = function() + -- nvim-gps loads at cursorMoved so need to handle this + local gps_loaded, gps = pcall(require, "nvim-gps") + + if not gps_loaded then + return + end + + return " " .. gps.get_location() end, + + enabled = function() + local gps_loaded, gps = pcall(require, "nvim-gps") + + if not gps_loaded then + return false + end + + return gps.is_available() + end, + + right_sep = { + str = " ", + hl = "Feline_nvim_gps", + }, + + hl = "Feline_nvim_gps", +} + +options.separator_left = { + provider = options.separator_style.right, + hl = "Feline_EmptySpace", } options.separator_right = { @@ -291,24 +320,63 @@ options.separator_right = { hl = "Feline_EmptySpace", } -options.separator_right2 = { +options.separator_right_file = { provider = options.separator_style.left, - hl = "Feline_PositionSeparator", + hl = function() + return { + fg = get_color("Feline_EmptySpace", "fg#"), + bg = get_color("Feline_nvim_gps", "bg#"), + } + end, } -options.position_icon = { - provider = options.separator_style.position_icon, - hl = "Feline_PositionIcon", +options.time = { + left_sep = { + str = options.separator_style.left, + hl = function() + return { + fg = get_color("Feline_time", "fg#"), + bg = get_color("Feline_EmptySpace", "fg#"), + } + end, + }, + + icon = { + str = options.icons.clock, + hl = function() + return { + fg = get_color("Feline_time", "bg#"), + bg = get_color("Feline_time", "fg#"), + } + end, + }, + + provider = function() + return " " .. fn.strftime "%H:%M" .. " " + end, + + hl = "Feline_time", } options.current_line = { + + left_sep = { + str = options.separator_style.left, + hl = "Feline_PositionSeparator", + }, + + icon = { + str = options.icons.position_icon, + hl = "Feline_PositionIcon", + }, + provider = function() - local current_line = vim.fn.line "." - local total_line = vim.fn.line "$" + local current_line = fn.line "." + local total_line = fn.line "$" if current_line == 1 then return " Top " - elseif current_line == vim.fn.line "$" then + elseif current_line == fn.line "$" then return " Bot " end local result, _ = math.modf((current_line / total_line) * 100) @@ -332,34 +400,33 @@ options.middle = {} options.right = {} -- left -add_table(options.left, options.main_icon) -add_table(options.left, options.file_name) -add_table(options.left, options.dir_name) +add_table(options.left, options.mode_icon) +add_table(options.left, options.separator_left) +add_table(options.left, options.vi_mode) +add_table(options.left, options.cwd) -- lsp -add_table(options.left, options.lsp_icon) +add_table(options.left, options.lsp_status) add_table(options.left, options.diagnostic.error) add_table(options.left, options.diagnostic.warning) add_table(options.left, options.diagnostic.hint) add_table(options.left, options.diagnostic.info) add_table(options.middle, options.lsp_progress) - --- right +add_table(options.middle, options.nvim_gps) -- git diffs add_table(options.right, options.diff.add) add_table(options.right, options.diff.change) add_table(options.right, options.diff.remove) add_table(options.right, options.git_branch) -add_table(options.right, options.empty_space_git) -add_table(options.right, options.empty_spaceColored) -add_table(options.right, options.mode_icon) -add_table(options.right, options.mode_name) +add_table(options.right, options.separator_right_file) +add_table(options.right, options.file_info) + +add_table(options.right, options.separator_right) +add_table(options.right, options.time) add_table(options.right, options.separator_right) -add_table(options.right, options.separator_right2) -add_table(options.right, options.position_icon) add_table(options.right, options.current_line) -- Initialize the components table diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 7458e6f..6a82e17 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -36,6 +36,13 @@ local plugins = { end, }, + ["SmiteshP/nvim-gps"] = { + event = "CursorMoved", + config = function() + require "plugins.configs.gps" + end, + }, + ["akinsho/bufferline.nvim"] = { after = "nvim-web-devicons", config = function() From 56c9b087ea96a55ebd3fbc1da65bf89b18e3a086 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 2 Jun 2022 23:58:08 +0530 Subject: [PATCH 1107/1541] fix edgecase for nonicon filetypes in statusline --- lua/plugins/configs/statusline.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 818031a..d47aed0 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -252,14 +252,19 @@ options.file_info = { local filename = fn.expand "%:t" local extension = fn.expand "%:e" + if filename == "" then + return options.icons.empty_file + end + local icon = require("nvim-web-devicons").get_icon(filename, extension) - if icon == nil and fn.expand "%:t" == "" then - return options.icons.empty_file + if icon == nil then + icon = " " else - icon = icon .. " " or " " - return icon + icon = icon .. " " end + + return icon end, hl = "Feline_file_info", From 88bd63d4077e3ef136bceed7f1b9eba5801b27e4 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 3 Jun 2022 01:08:09 +0530 Subject: [PATCH 1108/1541] fix #1168 | make disabling of default plugins in options.lua overridable --- lua/core/options.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/core/options.lua b/lua/core/options.lua index 168a357..4b2fb17 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -79,10 +79,14 @@ local default_plugins = { "zipPlugin", } +local overridden_opts = config.options.disable_default_plugins +default_plugins = vim.tbl_deep_extend("force", default_plugins, overridden_opts or default_plugins) + for _, plugin in pairs(default_plugins) do g["loaded_" .. plugin] = 1 end +-- set shada path vim.schedule(function() vim.opt.shadafile = vim.fn.expand "$HOME" .. "/.local/share/nvim/shada/main.shada" vim.cmd [[ silent! rsh ]] From fd96cc3c6379a59e3da25ecfb787c44eb1410d0a Mon Sep 17 00:00:00 2001 From: Mohammad Hosein Date: Fri, 3 Jun 2022 05:42:06 +0430 Subject: [PATCH 1109/1541] change proiority of completion list in nvim-cmp --- lua/plugins/configs/cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 36baf27..b28162b 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -87,8 +87,8 @@ local options = { }), }, sources = { - { name = "nvim_lsp" }, { name = "luasnip" }, + { name = "nvim_lsp" }, { name = "buffer" }, { name = "nvim_lua" }, { name = "path" }, From 9e3a43302c57d61f78b21e6f565d8026f5bd8d19 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 3 Jun 2022 12:03:07 +0530 Subject: [PATCH 1110/1541] rm un-needed code --- lua/core/options.lua | 3 --- lua/plugins/configs/statusline.lua | 5 ----- 2 files changed, 8 deletions(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index 4b2fb17..dce5fcf 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -79,9 +79,6 @@ local default_plugins = { "zipPlugin", } -local overridden_opts = config.options.disable_default_plugins -default_plugins = vim.tbl_deep_extend("force", default_plugins, overridden_opts or default_plugins) - for _, plugin in pairs(default_plugins) do g["loaded_" .. plugin] = 1 end diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index d47aed0..6bdea53 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -307,11 +307,6 @@ options.nvim_gps = { return gps.is_available() end, - right_sep = { - str = " ", - hl = "Feline_nvim_gps", - }, - hl = "Feline_nvim_gps", } From 48b12269613a5a7f1ed2c23601fdd12b103fee15 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 5 Jun 2022 19:11:26 +0530 Subject: [PATCH 1111/1541] write own statusline | remove feline --- lua/core/init.lua | 3 + lua/core/utils.lua | 10 +- lua/plugins/configs/gps.lua | 52 ++-- lua/plugins/configs/icons.lua | 5 + lua/plugins/configs/statusline.lua | 447 ----------------------------- lua/plugins/init.lua | 8 +- lua/ui/statusline.lua | 186 ++++++++++++ 7 files changed, 224 insertions(+), 487 deletions(-) delete mode 100644 lua/plugins/configs/statusline.lua create mode 100644 lua/ui/statusline.lua diff --git a/lua/core/init.lua b/lua/core/init.lua index 8e089d5..51bde5c 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -16,3 +16,6 @@ autocmd("BufUnload", { vim.opt.laststatus = 3 end, }) + +-- load statusline +vim.opt.statusline = "%!v:lua.require'ui.statusline'.run()" diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 244fc90..76e0a19 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -1,15 +1,17 @@ local M = {} +local api = vim.api +local fn = vim.fn local merge_tb = vim.tbl_deep_extend M.close_buffer = function(force) if vim.bo.buftype == "terminal" then - vim.api.nvim_win_hide(0) + api.nvim_win_hide(0) return end - local fileExists = vim.fn.filereadable(vim.fn.expand "%p") - local modified = vim.api.nvim_buf_get_option(vim.fn.bufnr(), "modified") + local fileExists = fn.filereadable(fn.expand "%p") + local modified = api.nvim_buf_get_option(fn.bufnr(), "modified") -- if file doesnt exist & its modified if fileExists == 0 and modified then @@ -20,7 +22,7 @@ M.close_buffer = function(force) force = force or not vim.bo.buflisted or vim.bo.buftype == "nofile" -- if not force, change to prev buf and then close current - local close_cmd = force and ":bd!" or ":bp | bd" .. vim.fn.bufnr() + local close_cmd = force and ":bd!" or ":bp | bd" .. fn.bufnr() vim.cmd(close_cmd) end diff --git a/lua/plugins/configs/gps.lua b/lua/plugins/configs/gps.lua index 23799d7..920f218 100644 --- a/lua/plugins/configs/gps.lua +++ b/lua/plugins/configs/gps.lua @@ -9,36 +9,30 @@ local icons = require "plugins.configs.lspkind_icons" local options = { icons = { - ["class-name"] = "%#CmpItemKindClass#" .. icons.Class .. "%*" .. " ", - ["function-name"] = "%#CmpItemKindFunction#" .. icons.Function .. "%*" .. " ", - ["method-name"] = "%#CmpItemKindMethod#" .. icons.Method .. "%*" .. " ", - ["container-name"] = "%#CmpItemKindProperty#" .. icons.Object .. "%*" .. " ", - ["tag-name"] = "%#CmpItemKindKeyword#" .. icons.Tag .. "%*" .. " ", - ["mapping-name"] = "%#CmpItemKindProperty#" .. icons.Object .. "%*" .. " ", - ["sequence-name"] = "%CmpItemKindProperty#" .. icons.Array .. "%*" .. " ", - ["null-name"] = "%CmpItemKindField#" .. icons.Field .. "%*" .. " ", - ["boolean-name"] = "%CmpItemKindValue#" .. icons.Boolean .. "%*" .. " ", - ["integer-name"] = "%CmpItemKindValue#" .. icons.Number .. "%*" .. " ", - ["float-name"] = "%CmpItemKindValue#" .. icons.Number .. "%*" .. " ", - ["string-name"] = "%CmpItemKindValue#" .. icons.String .. "%*" .. " ", - ["array-name"] = "%CmpItemKindProperty#" .. icons.Array .. "%*" .. " ", - ["object-name"] = "%CmpItemKindProperty#" .. icons.Object .. "%*" .. " ", - ["number-name"] = "%CmpItemKindValue#" .. icons.Number .. "%*" .. " ", - ["table-name"] = "%CmpItemKindProperty#" .. icons.Table .. "%*" .. " ", - ["date-name"] = "%CmpItemKindValue#" .. icons.Calendar .. "%*" .. " ", - ["date-time-name"] = "%CmpItemKindValue#" .. icons.Table .. "%*" .. " ", - ["inline-table-name"] = "%CmpItemKindProperty#" .. icons.Calendar .. "%*" .. " ", - ["time-name"] = "%CmpItemKindValue#" .. icons.Watch .. "%*" .. " ", - ["module-name"] = "%CmpItemKindModule#" .. icons.Module .. "%*" .. " ", - }, - - ["lua"] = { - icons = { - ["container-name"] = "%#CmpItemKindProperty#" .. icons.Table .. "%*" .. " ", - ["mapping-name"] = "%#CmpItemKindProperty#" .. icons.Table .. "%*" .. " ", - ["object-name"] = "%CmpItemKindProperty#" .. icons.Table .. "%*" .. " ", - }, + ["class-name"] = "%#GpsItemKindClass#" .. icons.Class .. "%*" .. " ", + ["function-name"] = "%#GpsItemKindFunction#" .. icons.Function .. "%*" .. " ", + ["method-name"] = "%#GpsItemKindMethod#" .. icons.Method .. "%*" .. " ", + ["container-name"] = "%#GpsItemKindProperty#" .. icons.Object .. "%*" .. " ", + ["tag-name"] = "%#GpsItemKindKeyword#" .. icons.Tag .. "%*" .. " ", + ["mapping-name"] = "%#GpsItemKindProperty#" .. icons.Object .. "%*" .. " ", + ["sequence-name"] = "%GpsItemKindProperty#" .. icons.Array .. "%*" .. " ", + ["null-name"] = "%GpsItemKindField#" .. icons.Field .. "%*" .. " ", + ["boolean-name"] = "%GpsItemKindValue#" .. icons.Boolean .. "%*" .. " ", + ["integer-name"] = "%GpsItemKindValue#" .. icons.Number .. "%*" .. " ", + ["float-name"] = "%GpsItemKindValue#" .. icons.Number .. "%*" .. " ", + ["string-name"] = "%GpsItemKindValue#" .. icons.String .. "%*" .. " ", + ["array-name"] = "%GpsItemKindProperty#" .. icons.Array .. "%*" .. " ", + ["object-name"] = "%GpsItemKindProperty#" .. icons.Object .. "%*" .. " ", + ["number-name"] = "%GpsItemKindValue#" .. icons.Number .. "%*" .. " ", + ["table-name"] = "%GpsItemKindProperty#" .. icons.Table .. "%*" .. " ", + ["date-name"] = "%GpsItemKindValue#" .. icons.Calendar .. "%*" .. " ", + ["date-time-name"] = "%GpsItemKindValue#" .. icons.Table .. "%*" .. " ", + ["inline-table-name"] = "%GpsItemKindProperty#" .. icons.Calendar .. "%*" .. " ", + ["time-name"] = "%GpsItemKindValue#" .. icons.Watch .. "%*" .. " ", + ["module-name"] = "%GpsItemKindModule#" .. icons.Module .. "%*" .. " ", }, } +options = require("core.utils").load_override(options, "SmiteshP/nvim-gps") + gps.setup(options) diff --git a/lua/plugins/configs/icons.lua b/lua/plugins/configs/icons.lua index c3f3ba0..bccc134 100644 --- a/lua/plugins/configs/icons.lua +++ b/lua/plugins/configs/icons.lua @@ -6,6 +6,11 @@ end local options = { override = { + default_icon = { + icon = "", + name = "Default", + }, + c = { icon = "", name = "c", diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua deleted file mode 100644 index 6bdea53..0000000 --- a/lua/plugins/configs/statusline.lua +++ /dev/null @@ -1,447 +0,0 @@ -local present, feline = pcall(require, "feline") -local fn = vim.fn - -local function get_color(group, attr) - return fn.synIDattr(fn.synIDtrans(fn.hlID(group)), attr) -end - -if not present then - return -end - -local options = { - lsp = require "feline.providers.lsp", - lsp_severity = vim.diagnostic.severity, -} - -options.icons = { - mode_icon = "  ", - position_icon = " ", - empty_file = " Empty ", - dir = " ", - clock = " ", -} - -options.icon_styles = { - - -- mix of slant + round - default = { - left = "", - right = " ", - }, - - round = { - left = "", - right = "", - }, - - block = { - left = "█", - right = "█", - }, - - arrow = { - left = "", - right = "", - }, -} - -local statusline_opt = require("core.utils").load_config().plugins.options.statusline.separator_style -options.separator_style = options.icon_styles[statusline_opt] - -options.mode_icon = { - provider = options.icons.mode_icon, - - hl = function() - return { - fg = get_color("Feline", "bg#"), - bg = get_color(options.mode_hlgroups[fn.mode()][2], "fg#"), - } - end, - - right_sep = { - str = options.separator_style.right, - hl = function() - return { - fg = get_color(options.mode_hlgroups[fn.mode()][2], "fg#"), - bg = get_color("Feline_EmptySpace", "fg#"), - } - end, - }, -} - --- MODES - -options.mode_hlgroups = { - ["n"] = { "Normal", "Feline_NormalMode" }, - ["no"] = { "N-PENDING", "Feline_NormalMode" }, - ["i"] = { "INSERT", "Feline_InsertMode" }, - ["ic"] = { "INSERT", "Feline_InsertMode" }, - ["t"] = { "TERMINAL", "Feline_TerminalMode" }, - ["v"] = { "VISUAL", "Feline_VisualMode" }, - ["V"] = { "V-LINE", "Feline_VisualMode" }, - [""] = { "V-BLOCK", "Feline_VisualMode" }, - ["R"] = { "REPLACE", "Feline_ReplaceMode" }, - ["Rv"] = { "V-REPLACE", "Feline_ReplaceMode" }, - ["s"] = { "SELECT", "Feline_SelectMode" }, - ["S"] = { "S-LINE", "Feline_SelectMode" }, - [""] = { "S-BLOCK", "Feline_SelectMode" }, - ["c"] = { "COMMAND", "Feline_CommandMode" }, - ["cv"] = { "COMMAND", "Feline_CommandMode" }, - ["ce"] = { "COMMAND", "Feline_CommandMode" }, - ["r"] = { "PROMPT", "Feline_ConfirmMode" }, - ["rm"] = { "MORE", "Feline_ConfirmMode" }, - ["r?"] = { "CONFIRM", "Feline_ConfirmMode" }, - ["!"] = { "SHELL", "Feline_TerminalMode" }, -} - -options.vi_mode = { - provider = function() - return " " .. options.mode_hlgroups[fn.mode()][1] .. " " - end, - - hl = function() - return options.mode_hlgroups[fn.mode()][2] - end, - - right_sep = { - str = options.separator_style.right, - hl = function() - return { - fg = get_color("Feline_EmptySpace", "bg#"), - bg = get_color("Feline_nvim_gps", "bg#"), - } - end, - }, -} - -options.cwd = { - -- icon - left_sep = { - str = " " .. options.icons.dir, - hl = "FelineCwd", - }, - - -- dirname - provider = function() - local dir_name = fn.fnamemodify(fn.getcwd(), ":t") - return " " .. dir_name .. " " - end, - - hl = "FelineCwd", -} - --- lsp -options.diagnostic = { - error = { - provider = "diagnostic_errors", - enabled = function() - return options.lsp.diagnostics_exist(options.lsp_severity.ERROR) - end, - - hl = "Feline_lspError", - icon = "  ", - }, - - warning = { - provider = "diagnostic_warnings", - enabled = function() - return options.lsp.diagnostics_exist(options.lsp_severity.WARN) - end, - - hl = "Feline_lspWarning", - icon = "  ", - }, - - hint = { - provider = "diagnostic_hints", - enabled = function() - return options.lsp.diagnostics_exist(options.lsp_severity.HINT) - end, - hl = "Feline_LspHints", - icon = "  ", - }, - - info = { - provider = "diagnostic_info", - enabled = function() - return options.lsp.diagnostics_exist(options.lsp_severity.INFO) - end, - hl = "Feline_LspInfo", - icon = "  ", - }, -} - -options.lsp_status = { - provider = function() - if next(vim.lsp.buf_get_clients()) ~= nil then - local lsp_name = vim.lsp.get_active_clients()[1].name - - return "  LSP ~ " .. lsp_name .. " " - else - return "" - end - end, - - hl = "Feline_LspIcon", -} - -options.lsp_progress = { - provider = function() - local Lsp = vim.lsp.util.get_progress_messages()[1] - - if not Lsp then - return "" - end - - local msg = Lsp.message or "" - local percentage = Lsp.percentage or 0 - local title = Lsp.title or "" - local spinners = { "", "" } - - local ms = vim.loop.hrtime() / 1000000 - local frame = math.floor(ms / 120) % #spinners - - return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage) - end, - - hl = "Feline_LspProgress", -} - --- Git - -options.diff = { - add = { - provider = "git_diff_added", - hl = "Feline_diffIcons", - icon = "  ", - }, - - change = { - provider = "git_diff_changed", - hl = "Feline_diffIcons", - icon = "  ", - }, - - remove = { - provider = "git_diff_removed", - hl = "Feline_diffIcons", - icon = "  ", - }, -} - -options.git_branch = { - provider = "git_branch", - hl = "Feline_diffIcons", - icon = "  ", - - right_sep = { - str = " ", - hl = "Feline_diffIcons", - }, -} - -options.file_info = { - left_sep = { - str = options.separator_style.left, - hl = "Feline_file_info_sep", - }, - - -- file icon - provider = function() - local filename = fn.expand "%:t" - local extension = fn.expand "%:e" - - if filename == "" then - return options.icons.empty_file - end - - local icon = require("nvim-web-devicons").get_icon(filename, extension) - - if icon == nil then - icon = " " - else - icon = icon .. " " - end - - return icon - end, - - hl = "Feline_file_info", - - -- file name - right_sep = { - str = function() - local filename = fn.expand "%:t" - return " " .. fn.fnamemodify(filename, ":r") .. " " - end, - - hl = function() - return { - fg = get_color("Feline_file_info", "bg#"), - bg = get_color("Feline_file_info", "fg#"), - } - end, - }, -} - -options.nvim_gps = { - provider = function() - -- nvim-gps loads at cursorMoved so need to handle this - local gps_loaded, gps = pcall(require, "nvim-gps") - - if not gps_loaded then - return - end - - return " " .. gps.get_location() - end, - - enabled = function() - local gps_loaded, gps = pcall(require, "nvim-gps") - - if not gps_loaded then - return false - end - - return gps.is_available() - end, - - hl = "Feline_nvim_gps", -} - -options.separator_left = { - provider = options.separator_style.right, - hl = "Feline_EmptySpace", -} - -options.separator_right = { - provider = options.separator_style.left, - hl = "Feline_EmptySpace", -} - -options.separator_right_file = { - provider = options.separator_style.left, - hl = function() - return { - fg = get_color("Feline_EmptySpace", "fg#"), - bg = get_color("Feline_nvim_gps", "bg#"), - } - end, -} - -options.time = { - left_sep = { - str = options.separator_style.left, - hl = function() - return { - fg = get_color("Feline_time", "fg#"), - bg = get_color("Feline_EmptySpace", "fg#"), - } - end, - }, - - icon = { - str = options.icons.clock, - hl = function() - return { - fg = get_color("Feline_time", "bg#"), - bg = get_color("Feline_time", "fg#"), - } - end, - }, - - provider = function() - return " " .. fn.strftime "%H:%M" .. " " - end, - - hl = "Feline_time", -} - -options.current_line = { - - left_sep = { - str = options.separator_style.left, - hl = "Feline_PositionSeparator", - }, - - icon = { - str = options.icons.position_icon, - hl = "Feline_PositionIcon", - }, - - provider = function() - local current_line = fn.line "." - local total_line = fn.line "$" - - if current_line == 1 then - return " Top " - elseif current_line == fn.line "$" then - return " Bot " - end - local result, _ = math.modf((current_line / total_line) * 100) - return " " .. result .. "%% " - end, - - hl = "Feline_CurrentLine", -} - -options = require("core.utils").load_override(options, "feline-nvim/feline.nvim") - -local function add_table(tbl, inject) - if inject then - table.insert(tbl, inject) - end -end - --- components are divided in 3 sections -options.left = {} -options.middle = {} -options.right = {} - --- left -add_table(options.left, options.mode_icon) -add_table(options.left, options.separator_left) -add_table(options.left, options.vi_mode) -add_table(options.left, options.cwd) - --- lsp -add_table(options.left, options.lsp_status) -add_table(options.left, options.diagnostic.error) -add_table(options.left, options.diagnostic.warning) -add_table(options.left, options.diagnostic.hint) -add_table(options.left, options.diagnostic.info) - -add_table(options.middle, options.lsp_progress) -add_table(options.middle, options.nvim_gps) - --- git diffs -add_table(options.right, options.diff.add) -add_table(options.right, options.diff.change) -add_table(options.right, options.diff.remove) -add_table(options.right, options.git_branch) - -add_table(options.right, options.separator_right_file) -add_table(options.right, options.file_info) - -add_table(options.right, options.separator_right) -add_table(options.right, options.time) -add_table(options.right, options.separator_right) -add_table(options.right, options.current_line) - --- Initialize the components table -options.components = { active = {} } - -options.components.active[1] = options.left -options.components.active[2] = options.middle -options.components.active[3] = options.right - -options.theme = { - fg = get_color("Feline", "fg#"), - bg = get_color("Feline", "bg#"), -} - -feline.setup { - theme = options.theme, - components = options.components, -} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 6a82e17..7add238 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -17,6 +17,7 @@ local plugins = { }, ["NvChad/nvterm"] = { + module = "nvterm", config = function() require "plugins.configs.nvterm" end, @@ -29,13 +30,6 @@ local plugins = { end, }, - ["feline-nvim/feline.nvim"] = { - after = "nvim-web-devicons", - config = function() - require "plugins.configs.statusline" - end, - }, - ["SmiteshP/nvim-gps"] = { event = "CursorMoved", config = function() diff --git a/lua/ui/statusline.lua b/lua/ui/statusline.lua new file mode 100644 index 0000000..a0ca5cf --- /dev/null +++ b/lua/ui/statusline.lua @@ -0,0 +1,186 @@ +local fn = vim.fn + +local sep_style = { + default = { + left = "", + right = " ", + }, + + round = { + left = "", + right = "", + }, + + block = { + left = "█", + right = "█", + }, +} + +local user_sep_style = require("core.utils").load_config().plugins.options.statusline.separator_style +local sep_l = sep_style[user_sep_style]["left"] +local sep_r = sep_style[user_sep_style]["right"] + +local width_below = function(text, thresh) + return vim.o.columns / #text >= thresh +end + +local modes = { + ["n"] = { "NORMAL", "St_NormalMode" }, + ["no"] = { "N-PENDING", "St_NormalMode" }, + ["i"] = { "INSERT", "St_InsertMode" }, + ["ic"] = { "INSERT", "St_InsertMode" }, + ["t"] = { "TERMINAL", "St_TerminalMode" }, + ["nt"] = { "NTERMINAL", "St_NTerminalMode" }, + ["v"] = { "VISUAL", "St_VisualMode" }, + ["V"] = { "V-LINE", "St_VisualMode" }, + [""] = { "V-BLOCK", "St_VisualMode" }, + ["R"] = { "REPLACE", "St_ReplaceMode" }, + ["Rv"] = { "V-REPLACE", "St_ReplaceMode" }, + ["s"] = { "SELECT", "St_SelectMode" }, + ["S"] = { "S-LINE", "St_SelectMode" }, + [""] = { "S-BLOCK", "St_SelectMode" }, + ["c"] = { "COMMAND", "St_CommandMode" }, + ["cv"] = { "COMMAND", "St_CommandMode" }, + ["ce"] = { "COMMAND", "St_CommandMode" }, + ["r"] = { "PROMPT", "St_ConfirmMode" }, + ["rm"] = { "MORE", "St_ConfirmMode" }, + ["r?"] = { "CONFIRM", "St_ConfirmMode" }, + ["!"] = { "SHELL", "St_TerminalMode" }, +} + +local M = {} + +M.mode = function() + local m = vim.api.nvim_get_mode().mode + local current_mode = "%#" .. modes[m][2] .. "#" .. "  " .. modes[m][1] + local mode_sep1 = "%#" .. modes[m][2] .. "Sep" .. "#" .. sep_r + + return current_mode .. mode_sep1 .. "%#ST_EmptySpace#" .. sep_r +end + +M.fileInfo = function() + local icon = "" + local filename = fn.fnamemodify(fn.expand "%:t", ":r") + local extension = fn.expand "%:e" + + if filename == "" then + icon = icon .. "  Empty " + else + filename = " " .. filename .. " " + end + + local ft_icon = require("nvim-web-devicons").get_icon(filename, extension) + icon = (ft_icon ~= nil and " " .. ft_icon) or icon + + return "%#St_file_info#" .. icon .. filename .. "%#St_file_sep#" .. sep_r +end + +M.gps = function() + local gps_present, gps = pcall(require, "nvim-gps") + return gps_present and gps.is_available() and gps.get_location() or "" +end + +M.git = function() + if not vim.b.gitsigns_head or vim.b.gitsigns_git_status then + return "" + end + + local git_status = vim.b.gitsigns_status_dict + + local added = (git_status.added and git_status.added ~= 0) and ("  " .. git_status.added) or "" + local changed = (git_status.changed and git_status.changed ~= 0) and ("  " .. git_status.changed) or "" + local removed = (git_status.removed and git_status.removed ~= 0) and ("  " .. git_status.removed) or "" + local branch_name = "  " .. git_status.head .. " " + local git_info = branch_name .. added .. changed .. removed + + return "%#St_gitIcons#" .. git_info +end + +-- LSP STUFF +M.LSP_progress = function() + local Lsp = vim.lsp.util.get_progress_messages()[1] + + if not Lsp then + return "" + end + + local msg = Lsp.message or "" + local percentage = Lsp.percentage or 0 + local title = Lsp.title or "" + local spinners = { "", "" } + local ms = vim.loop.hrtime() / 1000000 + local frame = math.floor(ms / 120) % #spinners + local content = string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage) + + return width_below(content, 5.3) and ("%#St_LspProgress#" .. content) or "" +end + +M.LSP_Diagnostics = function() + if not #vim.diagnostic.get(0) then + return "" + end + + local errors = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR }) + local warnings = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN }) + local hints = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT }) + local info = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.INFO }) + + errors = (errors and errors > 0) and ("%#St_lspError#" .. " " .. errors .. " ") or "" + warnings = (warnings and warnings > 0) and ("%#St_lspWarning#" .. " " .. warnings .. " ") or "" + hints = (hints and hints > 0) and ("%#St_lspHints#" .. "ﯧ " .. hints .. " ") or "" + info = (info and info > 0) and ("%#St_lspInfo#" .. " " .. info .. " ") or "" + + return errors .. warnings .. hints .. info +end + +M.LSP_status = function() + local lsp_attached = next(vim.lsp.buf_get_clients()) ~= nil + local content = lsp_attached and "  LSP ~ " .. vim.lsp.get_active_clients()[1].name .. " " or false + return content and width_below(content, 5.3) and ("%#St_LspStatus#" .. content) or "" +end + +M.cwd = function() + local left_sep = "%#ST_EmptySpace2#" .. sep_l .. "%#St_cwd_sep#" .. sep_l + local dir_icon = "%#St_cwd_icon#" .. " " + local dir_name = "%#St_cwd_text#" .. " " .. fn.fnamemodify(fn.getcwd(), ":t") .. " " + + return left_sep .. dir_icon .. dir_name +end + +M.cursor_position = function() + local left_sep = "%#ST_EmptySpace#" .. sep_l .. "%#St_pos_sep#" .. sep_l + local icon = "%#St_pos_icon#" .. " " + + local current_line = fn.line "." + local total_line = fn.line "$" + local text = math.modf((current_line / total_line) * 100) .. tostring "%%" + + if current_line == 1 then + text = "Top " + elseif current_line == total_line then + text = "Bot " + end + + return left_sep .. icon .. "%#St_pos_text#" .. " " .. text +end + +M.run = function() + return table.concat { + M.mode(), + M.fileInfo(), + M.git(), + + "%=", + M.LSP_progress(), + M.gps(), + "%=", + + M.LSP_Diagnostics(), + M.LSP_status(), + M.cwd(), + M.cursor_position(), + } +end + +return M From 1b5ecdce45f1a5f3b13d521c620ff5038c802d21 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 5 Jun 2022 20:30:21 +0530 Subject: [PATCH 1112/1541] add depth field to nvim-gps conf So 5 is the limit for amount of context shown, by default its 0 which means that there wouldnt be any limit so gps could get veryyyyyyyyy long! --- lua/core/default_config.lua | 5 +---- lua/plugins/configs/gps.lua | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index cdfc9c5..f34f4e2 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -34,11 +34,8 @@ M.plugins = { setup_lspconf = "", -- path of lspconfig file }, statusline = { - separator_style = "default", -- default/round/slant/block/arrow + separator_style = "default", -- default/round/block }, - telescope = { - extensions = { "themes", "terms" } - } }, -- add, modify, remove plugins diff --git a/lua/plugins/configs/gps.lua b/lua/plugins/configs/gps.lua index 920f218..ce7fff0 100644 --- a/lua/plugins/configs/gps.lua +++ b/lua/plugins/configs/gps.lua @@ -7,6 +7,7 @@ end local icons = require "plugins.configs.lspkind_icons" local options = { + depth = 5, icons = { ["class-name"] = "%#GpsItemKindClass#" .. icons.Class .. "%*" .. " ", From 671321e0c8cac75f6a2170b4e2134591a7696f35 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 6 Jun 2022 05:51:02 +0530 Subject: [PATCH 1113/1541] trunacate statusline components on less space --- lua/ui/statusline.lua | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lua/ui/statusline.lua b/lua/ui/statusline.lua index a0ca5cf..df0b3de 100644 --- a/lua/ui/statusline.lua +++ b/lua/ui/statusline.lua @@ -21,10 +21,6 @@ local user_sep_style = require("core.utils").load_config().plugins.options.statu local sep_l = sep_style[user_sep_style]["left"] local sep_r = sep_style[user_sep_style]["right"] -local width_below = function(text, thresh) - return vim.o.columns / #text >= thresh -end - local modes = { ["n"] = { "NORMAL", "St_NormalMode" }, ["no"] = { "N-PENDING", "St_NormalMode" }, @@ -77,8 +73,12 @@ M.fileInfo = function() end M.gps = function() - local gps_present, gps = pcall(require, "nvim-gps") - return gps_present and gps.is_available() and gps.get_location() or "" + if vim.o.columns < 140 or not package.loaded["nvim-gps"] then + return "" + end + + local gps = require "nvim-gps" + return (gps.is_available() and gps.get_location()) or "" end M.git = function() @@ -101,7 +101,7 @@ end M.LSP_progress = function() local Lsp = vim.lsp.util.get_progress_messages()[1] - if not Lsp then + if vim.o.columns < 120 or not Lsp then return "" end @@ -113,7 +113,7 @@ M.LSP_progress = function() local frame = math.floor(ms / 120) % #spinners local content = string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage) - return width_below(content, 5.3) and ("%#St_LspProgress#" .. content) or "" + return ("%#St_LspProgress#" .. content) or "" end M.LSP_Diagnostics = function() @@ -137,15 +137,14 @@ end M.LSP_status = function() local lsp_attached = next(vim.lsp.buf_get_clients()) ~= nil local content = lsp_attached and "  LSP ~ " .. vim.lsp.get_active_clients()[1].name .. " " or false - return content and width_below(content, 5.3) and ("%#St_LspStatus#" .. content) or "" + return content and ("%#St_LspStatus#" .. content) or "" end M.cwd = function() local left_sep = "%#ST_EmptySpace2#" .. sep_l .. "%#St_cwd_sep#" .. sep_l local dir_icon = "%#St_cwd_icon#" .. " " local dir_name = "%#St_cwd_text#" .. " " .. fn.fnamemodify(fn.getcwd(), ":t") .. " " - - return left_sep .. dir_icon .. dir_name + return (vim.o.columns > 120 and left_sep .. dir_icon .. dir_name) or "" end M.cursor_position = function() From 39a7f60682d9741d2d26e0729f285e8a9bc93f27 Mon Sep 17 00:00:00 2001 From: TianYaX Date: Mon, 6 Jun 2022 11:46:48 +0800 Subject: [PATCH 1114/1541] add arrow style for statusline --- lua/ui/statusline.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/ui/statusline.lua b/lua/ui/statusline.lua index df0b3de..4a34f63 100644 --- a/lua/ui/statusline.lua +++ b/lua/ui/statusline.lua @@ -15,6 +15,11 @@ local sep_style = { left = "█", right = "█", }, + + arrow = { + left = "", + right = "", + }, } local user_sep_style = require("core.utils").load_config().plugins.options.statusline.separator_style From d9263b3718dca8fdd9fdaefa98ee63d6fd608733 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 6 Jun 2022 10:10:35 +0530 Subject: [PATCH 1115/1541] add error handling in statusline for devicons plugin --- lua/ui/statusline.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/ui/statusline.lua b/lua/ui/statusline.lua index 4a34f63..71fa0f8 100644 --- a/lua/ui/statusline.lua +++ b/lua/ui/statusline.lua @@ -71,7 +71,13 @@ M.fileInfo = function() filename = " " .. filename .. " " end - local ft_icon = require("nvim-web-devicons").get_icon(filename, extension) + local devicons_present, devicons = pcall(require, "nvim-web-devicons") + + if not devicons_present then + return " " + end + + local ft_icon = devicons.get_icon(filename, extension) icon = (ft_icon ~= nil and " " .. ft_icon) or icon return "%#St_file_info#" .. icon .. filename .. "%#St_file_sep#" .. sep_r From 1b4ac82718400edb976dd4d40a7e740fdb1a0573 Mon Sep 17 00:00:00 2001 From: Waldir Borba Junior Date: Mon, 6 Jun 2022 09:56:29 -0300 Subject: [PATCH 1116/1541] Update init.lua --- lua/core/init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/core/init.lua b/lua/core/init.lua index 51bde5c..a4cc556 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -17,5 +17,11 @@ autocmd("BufUnload", { end, }) +-- Don't auto commenting new lines +autocmd('BufEnter', { + pattern = '*', + command = 'set fo-=c fo-=r fo-=o' +}) + -- load statusline vim.opt.statusline = "%!v:lua.require'ui.statusline'.run()" From 4a603d1a1de3697cfe852f81cdaa7a8c19eb6e11 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 6 Jun 2022 20:10:56 +0530 Subject: [PATCH 1117/1541] add tag release field in bufferline packer definition (#1176) --- lua/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 7add238..af9e9ba 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -38,6 +38,7 @@ local plugins = { }, ["akinsho/bufferline.nvim"] = { + tag = "v2.*", after = "nvim-web-devicons", config = function() require "plugins.configs.bufferline" From 700801b3131af63970a9c6091bb0b5e34c7347ce Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 7 Jun 2022 11:11:55 +0530 Subject: [PATCH 1118/1541] avoid overriding default vim.lsp functions read https://github.com/NvChad/NvChad/discussions/1180 --- lua/core/mappings.lua | 2 +- lua/plugins/configs/others.lua | 58 -------------------------------- lua/ui/renamer.lua | 60 ++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 59 deletions(-) create mode 100644 lua/ui/renamer.lua diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index bc804fa..ac3eb10 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -147,7 +147,7 @@ M.lspconfig = { ["ra"] = { function() - vim.lsp.buf.rename.float() + require("ui.renamer").open() end, " lsp rename", }, diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 777f1bf..41e9714 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -201,64 +201,6 @@ M.lsp_handlers = function() vim.api.nvim_echo({ { msg } }, true, {}) end end - - -- credits to @Malace : https://www.reddit.com/r/neovim/comments/ql4iuj/rename_hover_including_window_title_and/ - -- This is modified version of the above snippet - vim.lsp.buf.rename = { - float = function() - local currName = vim.fn.expand "" .. " " - - local win = require("plenary.popup").create(currName, { - title = "Renamer", - style = "minimal", - borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, - relative = "cursor", - borderhighlight = "RenamerBorder", - titlehighlight = "RenamerTitle", - focusable = true, - width = 25, - height = 1, - line = "cursor+2", - col = "cursor-1", - }) - - local map_opts = { noremap = true, silent = true } - - vim.cmd "normal w" - vim.cmd "startinsert" - - vim.api.nvim_buf_set_keymap(0, "i", "", "stopinsert | q!", map_opts) - vim.api.nvim_buf_set_keymap(0, "n", "", "stopinsert | q!", map_opts) - - vim.api.nvim_buf_set_keymap( - 0, - "i", - "", - "stopinsert | lua vim.lsp.buf.rename.apply(" .. currName .. "," .. win .. ")", - map_opts - ) - - vim.api.nvim_buf_set_keymap( - 0, - "n", - "", - "stopinsert | lua vim.lsp.buf.rename.apply(" .. currName .. "," .. win .. ")", - map_opts - ) - end, - - apply = function(curr, win) - local newName = vim.trim(vim.fn.getline ".") - vim.api.nvim_win_close(win, true) - - if #newName > 0 and newName ~= curr then - local params = vim.lsp.util.make_position_params() - params.newName = newName - - vim.lsp.buf_request(0, "textDocument/rename", params) - end - end, - } end M.gitsigns = function() diff --git a/lua/ui/renamer.lua b/lua/ui/renamer.lua new file mode 100644 index 0000000..dcad896 --- /dev/null +++ b/lua/ui/renamer.lua @@ -0,0 +1,60 @@ +-- credits to @Malace : https://www.reddit.com/r/neovim/comments/ql4iuj/rename_hover_including_window_title_and/ +-- This is modified version of the above snippet + +local M = {} + +M.open = function() + local currName = vim.fn.expand "" .. " " + + local win = require("plenary.popup").create(currName, { + title = "Renamer", + style = "minimal", + borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, + relative = "cursor", + borderhighlight = "RenamerBorder", + titlehighlight = "RenamerTitle", + focusable = true, + width = 25, + height = 1, + line = "cursor+2", + col = "cursor-1", + }) + + local map_opts = { noremap = true, silent = true } + + vim.cmd "normal w" + vim.cmd "startinsert" + + vim.api.nvim_buf_set_keymap(0, "i", "", "stopinsert | q!", map_opts) + vim.api.nvim_buf_set_keymap(0, "n", "", "stopinsert | q!", map_opts) + + vim.api.nvim_buf_set_keymap( + 0, + "i", + "", + "stopinsert | lua require'ui.renamer'.apply(" .. currName .. "," .. win .. ")", + map_opts + ) + + vim.api.nvim_buf_set_keymap( + 0, + "n", + "", + "stopinsert | lua require'ui.renamer'.apply(" .. currName .. "," .. win .. ")", + map_opts + ) +end + +M.apply = function(curr, win) + local newName = vim.trim(vim.fn.getline ".") + vim.api.nvim_win_close(win, true) + + if #newName > 0 and newName ~= curr then + local params = vim.lsp.util.make_position_params() + params.newName = newName + + vim.lsp.buf_request(0, "textDocument/rename", params) + end +end + +return M From dd260cb4d5ee5fe40d50996b9637e47b0a19a006 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 9 Jun 2022 05:55:35 +0530 Subject: [PATCH 1119/1541] add custom highlight group for cmp so cmp will not take the bg from Pmenu --- lua/plugins/configs/cmp.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index b28162b..2c19bab 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -32,6 +32,7 @@ local options = { window = { completion = { border = border "CmpBorder", + winhighlight = "Normal:CmpPmenu,CursorLine:PmenuSel,Search:None", }, documentation = { border = border "CmpDocBorder", From 5ee4f93309ad4dc54b9141a0b22ab700c6fc76bc Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 9 Jun 2022 08:45:28 +0530 Subject: [PATCH 1120/1541] clean readme | rm outdated info & update img links --- .github/README.md | 28 ++++++++++++---------------- lua/core/default_config.lua | 1 + lua/core/init.lua | 3 --- lua/core/options.lua | 4 ++++ lua/ui/statusline.lua | 6 +++--- 5 files changed, 20 insertions(+), 22 deletions(-) diff --git a/.github/README.md b/.github/README.md index 484c102..4285aa8 100644 --- a/.github/README.md +++ b/.github/README.md @@ -32,7 +32,7 @@ ## Showcase - + ( Zoom in the screenshot ) @@ -67,45 +67,42 @@ Fast file tree: -
+

Telescope-nvim

A fuzzy file finder, picker, sorter, previewer and much more: - +

Indent-blankline.nvim

Adds indentline: -
+
-

Feline.nvim

+

Our own statusline written from scratch

-Highly configurable statusline plugin: +[link](https://github.com/NvChad/NvChad/blob/main/lua/ui/statusline.lua) -
+
+

Nvim-bufferline.lua

-Better tab implementation: +A snazzy bufferline for Neovim -
+

Nvim-web-devicons

Lua fork of Vim Devicons which offers more file icon customisability: -
+

Nvim-treesitter


+NeoVim Treesitter configurations and abstraction layer. We mostly use this for syntax highlighting. The pretty syntax highlighting you see in all of our screenshots has gotten possible due to treesitter @@ -117,7 +114,6 @@ Without/with Treesitter: - File navigation with [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua) - Managing tabs, buffers with [bufferline.nvim](https://github.com/akinsho/bufferline.nvim) - Beautiful and configurable icons with [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) -- Pretty and functional statusline with [feline.nvim](https://github.com/Famiu/feline.nvim) - Git diffs and more with [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) - NeoVim Lsp configuration with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) and [lsp-installer](https://github.com/williamboman/nvim-lsp-installer/) - Autocompletion with [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index f34f4e2..2562dfb 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -35,6 +35,7 @@ M.plugins = { }, statusline = { separator_style = "default", -- default/round/block + config = "%!v:lua.require'ui.statusline'.run()", }, }, diff --git a/lua/core/init.lua b/lua/core/init.lua index a4cc556..3d6df8c 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -22,6 +22,3 @@ autocmd('BufEnter', { pattern = '*', command = 'set fo-=c fo-=r fo-=o' }) - --- load statusline -vim.opt.statusline = "%!v:lua.require'ui.statusline'.run()" diff --git a/lua/core/options.lua b/lua/core/options.lua index dce5fcf..6b20277 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -12,7 +12,11 @@ g.toggle_theme_icon = "  " g.transparency = config.ui.transparency opt.confirm = true + opt.laststatus = 3 -- global statusline +opt.statusline = config.plugins.options.statusline.config +opt.showmode = false + opt.title = true opt.clipboard = "unnamedplus" opt.cmdheight = 1 diff --git a/lua/ui/statusline.lua b/lua/ui/statusline.lua index 71fa0f8..963f804 100644 --- a/lua/ui/statusline.lua +++ b/lua/ui/statusline.lua @@ -152,14 +152,14 @@ M.LSP_status = function() end M.cwd = function() - local left_sep = "%#ST_EmptySpace2#" .. sep_l .. "%#St_cwd_sep#" .. sep_l - local dir_icon = "%#St_cwd_icon#" .. " " + local left_sep = "%#St_cwd_sep#" .. sep_l + local dir_icon = "%#St_cwd_icon#" .. " " local dir_name = "%#St_cwd_text#" .. " " .. fn.fnamemodify(fn.getcwd(), ":t") .. " " return (vim.o.columns > 120 and left_sep .. dir_icon .. dir_name) or "" end M.cursor_position = function() - local left_sep = "%#ST_EmptySpace#" .. sep_l .. "%#St_pos_sep#" .. sep_l + local left_sep = "%#St_pos_sep#" .. sep_l local icon = "%#St_pos_icon#" .. " " local current_line = fn.line "." From 5b37cb587525c891abf24ad6a483bc7084a2dc86 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 10 Jun 2022 17:24:02 +0530 Subject: [PATCH 1121/1541] fix #1188 | remove options that already have default vim values | remove better-escape.nvim as it feels un-needed, ESC or Ctrl c can be used for escaping normal mode or just map jk to ESC --- lua/core/options.lua | 5 ----- lua/plugins/init.lua | 7 +------ lua/ui/statusline.lua | 4 ++++ 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index 6b20277..e0f7074 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -11,15 +11,12 @@ g.do_filetype_lua = 1 g.toggle_theme_icon = "  " g.transparency = config.ui.transparency -opt.confirm = true - opt.laststatus = 3 -- global statusline opt.statusline = config.plugins.options.statusline.config opt.showmode = false opt.title = true opt.clipboard = "unnamedplus" -opt.cmdheight = 1 opt.cul = true -- cursor line -- Indentline @@ -30,7 +27,6 @@ opt.smartindent = true -- disable tilde on end of buffer: https://github.com/neovim/neovim/pull/8546#issuecomment-643643758 opt.fillchars = { eob = " " } -opt.hidden = true opt.ignorecase = true opt.smartcase = true opt.mouse = "a" @@ -38,7 +34,6 @@ opt.mouse = "a" -- Numbers opt.number = true opt.numberwidth = 2 -opt.relativenumber = false opt.ruler = false -- disable nvim intro diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index af9e9ba..e7ab43b 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -107,12 +107,7 @@ local plugins = { end, }, - ["max397574/better-escape.nvim"] = { - event = "InsertCharPre", - config = function() - require("plugins.configs.others").better_escape() - end, - }, + -- load luasnips + cmp related in insert mode only diff --git a/lua/ui/statusline.lua b/lua/ui/statusline.lua index 963f804..cdde087 100644 --- a/lua/ui/statusline.lua +++ b/lua/ui/statusline.lua @@ -28,9 +28,13 @@ local sep_r = sep_style[user_sep_style]["right"] local modes = { ["n"] = { "NORMAL", "St_NormalMode" }, + ["niI"] = { "NORMAL i", "St_NormalMode" }, + ["niR"] = { "NORMAL r", "St_NormalMode" }, + ["niV"] = { "NORMAL v", "St_NormalMode" }, ["no"] = { "N-PENDING", "St_NormalMode" }, ["i"] = { "INSERT", "St_InsertMode" }, ["ic"] = { "INSERT", "St_InsertMode" }, + ["ix"] = { "INSERT completion", "St_InsertMode" }, ["t"] = { "TERMINAL", "St_TerminalMode" }, ["nt"] = { "NTERMINAL", "St_NTerminalMode" }, ["v"] = { "VISUAL", "St_VisualMode" }, From d42ffe1ac71938d42213ec78fda50ab1e61d012b Mon Sep 17 00:00:00 2001 From: kiyon Date: Mon, 13 Jun 2022 12:39:47 +0800 Subject: [PATCH 1122/1541] fetch correct lsp name while existing multi actived lsp clients --- lua/ui/statusline.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lua/ui/statusline.lua b/lua/ui/statusline.lua index cdde087..3caf27a 100644 --- a/lua/ui/statusline.lua +++ b/lua/ui/statusline.lua @@ -150,8 +150,15 @@ M.LSP_Diagnostics = function() end M.LSP_status = function() - local lsp_attached = next(vim.lsp.buf_get_clients()) ~= nil - local content = lsp_attached and "  LSP ~ " .. vim.lsp.get_active_clients()[1].name .. " " or false + local clients = vim.lsp.get_active_clients() + local name = false + for _, client in ipairs(clients) do + if client.attached_buffers[vim.api.nvim_get_current_buf()] then + name = client.name + break + end + end + local content = name and "  LSP ~ " .. name .. " " or false return content and ("%#St_LspStatus#" .. content) or "" end From 0bde81a074f95a6e5096989d0f229bc221ead683 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 14 Jun 2022 17:36:27 +0530 Subject: [PATCH 1123/1541] Improve startuptime | remove un-needed plugins | lazy load plugin highlights too removed nvim-gps as nvim-navic or winbar.nvim will be added when v0.8 neovim releases. Removed lsp signature as I was able to emulate showing args with the default signature help() window --- init.lua | 6 - lua/core/lazy_load.lua | 111 ++++++++++++++++ lua/core/options.lua | 19 ++- lua/core/utils.lua | 7 - lua/plugins/configs/alpha.lua | 2 + lua/plugins/configs/bufferline.lua | 2 + lua/plugins/configs/cmp.lua | 5 +- lua/plugins/configs/gps.lua | 39 ------ lua/plugins/configs/icons.lua | 128 ------------------ lua/plugins/configs/lspconfig.lua | 24 ++-- lua/plugins/configs/lspkind_icons.lua | 36 ----- lua/plugins/configs/nvimtree.lua | 2 + lua/plugins/configs/nvterm.lua | 2 + lua/plugins/configs/others.lua | 112 +++------------- lua/plugins/configs/telescope.lua | 4 + lua/plugins/configs/treesitter.lua | 3 + lua/plugins/configs/whichkey.lua | 2 + lua/plugins/init.lua | 57 +++----- lua/ui/icons.lua | 185 ++++++++++++++++++++++++++ lua/ui/lsp.lua | 54 ++++++++ lua/ui/statusline.lua | 54 ++++---- 21 files changed, 463 insertions(+), 391 deletions(-) create mode 100644 lua/core/lazy_load.lua delete mode 100644 lua/plugins/configs/gps.lua delete mode 100644 lua/plugins/configs/icons.lua delete mode 100644 lua/plugins/configs/lspkind_icons.lua create mode 100644 lua/ui/icons.lua create mode 100644 lua/ui/lsp.lua diff --git a/init.lua b/init.lua index a7e171e..87a1bdf 100644 --- a/init.lua +++ b/init.lua @@ -1,9 +1,3 @@ -local present, impatient = pcall(require, "impatient") - -if present then - impatient.enable_profile() -end - require "core" require "core.utils" require "core.options" diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua new file mode 100644 index 0000000..30f3578 --- /dev/null +++ b/lua/core/lazy_load.lua @@ -0,0 +1,111 @@ +-- https://github.com/max397574/omega-nvim/blob/master/lua/omega/modules/ui/bufferline.lua +local lazy_load = function(tb) + vim.api.nvim_create_autocmd(tb.events, { + pattern = "*", + group = vim.api.nvim_create_augroup(tb.augroup_name, {}), + callback = function() + if tb.condition() then + vim.api.nvim_del_augroup_by_name(tb.augroup_name) + + -- dont defer for treesitter as it will show slow highlighting + -- This deferring only happens only when we do "nvim filename" + if tb.plugins ~= "nvim-treesitter" then + vim.defer_fn(function() + vim.cmd("PackerLoad " .. tb.plugins) + end, 0) + else + vim.cmd("PackerLoad " .. tb.plugins) + end + end + end, + }) +end + +local M = {} + +M.bufferline = function() + lazy_load { + events = { "BufNewFile", "BufAdd", "TabEnter" }, + augroup_name = "BufferLineLazy", + plugins = "bufferline.nvim", + + condition = function() + return #vim.fn.getbufinfo { buflisted = 1 } >= 2 + end, + } +end + +M.colorizer = function() + lazy_load { + events = { "BufRead", "BufNewFile" }, + augroup_name = "ColorizerLazy", + plugins = "nvim-colorizer.lua", + + condition = function() + local items = { "#", "rgb", "hsl" } + + for _, val in ipairs(items) do + if vim.fn.search(val) ~= 0 then + return true + end + end + end, + } +end + +-- load certain plugins only when there's a file opened in the buffer +-- if "nvim-file" is executed -> load the plugin after nvim gui loads +-- This gives an instant preview of nvim with the file opened + +M.on_file_open = function() + lazy_load { + events = { "BufRead", "BufWinEnter", "BufNewFile" }, + augroup_name = "BeLazyOnFileOpen", + plugins = "nvim-lsp-installer indent-blankline.nvim", + + condition = function() + local file = vim.fn.expand "%" + return file ~= "NvimTree_1" and file ~= "[packer]" and file ~= "" + end, + } +end + +M.treesitter = function() + lazy_load { + events = { "BufRead", "BufWinEnter", "BufNewFile" }, + augroup_name = "Treesitter_lazy", + plugins = "nvim-treesitter", + + condition = function() + local file = vim.fn.expand "%" + return file ~= "NvimTree_1" and file ~= "[packer]" and file ~= "" + end, + } +end + +M.gitsigns = function() + -- taken from https://github.com/max397574 + vim.api.nvim_create_autocmd({ "BufAdd", "VimEnter" }, { + callback = function() + local function onexit(code, _) + if code == 0 then + vim.schedule(function() + require("packer").loader "gitsigns.nvim" + end) + end + end + local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false) + if lines ~= { "" } then + vim.loop.spawn("git", { + args = { + "ls-files", + "--error-unmatch", + vim.fn.expand "%", + }, + }, onexit) + end + end, + }) +end + +return M diff --git a/lua/core/options.lua b/lua/core/options.lua index e0f7074..c39d2c9 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -1,15 +1,15 @@ local opt = vim.opt local g = vim.g - local config = require("core.utils").load_config() g.nvchad_theme = config.ui.theme +g.toggle_theme_icon = "  " +g.transparency = config.ui.transparency +g.theme_switcher_loaded = false -- use filetype.lua instead of filetype.vim g.did_load_filetypes = 0 g.do_filetype_lua = 1 -g.toggle_theme_icon = "  " -g.transparency = config.ui.transparency opt.laststatus = 3 -- global statusline opt.statusline = config.plugins.options.statusline.config @@ -76,6 +76,19 @@ local default_plugins = { "vimballPlugin", "zip", "zipPlugin", + "python3_provider", + "python_provider", + "node_provider", + "ruby_provider", + "perl_provider", + "tutor", + "rplugin", + "syntax", + "synmenu", + "optwin", + "compiler", + "bugreport", + "ftplugin", } for _, plugin in pairs(default_plugins) do diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 76e0a19..8d5bd29 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -114,13 +114,6 @@ M.load_mappings = function(mappings, mapping_opt) end end --- load plugin after entering vim ui -M.packer_lazy_load = function(plugin) - vim.defer_fn(function() - require("packer").loader(plugin) - end, 0) -end - -- remove plugins defined in chadrc M.remove_default_plugins = function(plugins) local removals = M.load_config().plugins.remove or {} diff --git a/lua/plugins/configs/alpha.lua b/lua/plugins/configs/alpha.lua index 6a57bd6..319ea50 100644 --- a/lua/plugins/configs/alpha.lua +++ b/lua/plugins/configs/alpha.lua @@ -4,6 +4,8 @@ if not present then return end +require("base46").load_highlight "alpha" + local function button(sc, txt, keybind) local sc_ = sc:gsub("%s", ""):gsub("SPC", "") diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index f554a54..67d258a 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -4,6 +4,8 @@ if not present then return end +require("base46").load_highlight "bufferline" + vim.cmd [[ function! Toggle_theme(a,b,c,d) lua require('base46').toggle_theme() diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 2c19bab..658f131 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -4,6 +4,8 @@ if not present then return end +require("base46").load_highlight "cmp" + vim.opt.completeopt = "menuone,noselect" local function border(hl_name) @@ -45,9 +47,8 @@ local options = { }, formatting = { format = function(_, vim_item) - local icons = require "plugins.configs.lspkind_icons" + local icons = require("ui.icons").lspkind vim_item.kind = string.format("%s %s", icons[vim_item.kind], vim_item.kind) - return vim_item end, }, diff --git a/lua/plugins/configs/gps.lua b/lua/plugins/configs/gps.lua deleted file mode 100644 index ce7fff0..0000000 --- a/lua/plugins/configs/gps.lua +++ /dev/null @@ -1,39 +0,0 @@ -local present, gps = pcall(require, "nvim-gps") - -if not present then - return -end - -local icons = require "plugins.configs.lspkind_icons" - -local options = { - depth = 5, - - icons = { - ["class-name"] = "%#GpsItemKindClass#" .. icons.Class .. "%*" .. " ", - ["function-name"] = "%#GpsItemKindFunction#" .. icons.Function .. "%*" .. " ", - ["method-name"] = "%#GpsItemKindMethod#" .. icons.Method .. "%*" .. " ", - ["container-name"] = "%#GpsItemKindProperty#" .. icons.Object .. "%*" .. " ", - ["tag-name"] = "%#GpsItemKindKeyword#" .. icons.Tag .. "%*" .. " ", - ["mapping-name"] = "%#GpsItemKindProperty#" .. icons.Object .. "%*" .. " ", - ["sequence-name"] = "%GpsItemKindProperty#" .. icons.Array .. "%*" .. " ", - ["null-name"] = "%GpsItemKindField#" .. icons.Field .. "%*" .. " ", - ["boolean-name"] = "%GpsItemKindValue#" .. icons.Boolean .. "%*" .. " ", - ["integer-name"] = "%GpsItemKindValue#" .. icons.Number .. "%*" .. " ", - ["float-name"] = "%GpsItemKindValue#" .. icons.Number .. "%*" .. " ", - ["string-name"] = "%GpsItemKindValue#" .. icons.String .. "%*" .. " ", - ["array-name"] = "%GpsItemKindProperty#" .. icons.Array .. "%*" .. " ", - ["object-name"] = "%GpsItemKindProperty#" .. icons.Object .. "%*" .. " ", - ["number-name"] = "%GpsItemKindValue#" .. icons.Number .. "%*" .. " ", - ["table-name"] = "%GpsItemKindProperty#" .. icons.Table .. "%*" .. " ", - ["date-name"] = "%GpsItemKindValue#" .. icons.Calendar .. "%*" .. " ", - ["date-time-name"] = "%GpsItemKindValue#" .. icons.Table .. "%*" .. " ", - ["inline-table-name"] = "%GpsItemKindProperty#" .. icons.Calendar .. "%*" .. " ", - ["time-name"] = "%GpsItemKindValue#" .. icons.Watch .. "%*" .. " ", - ["module-name"] = "%GpsItemKindModule#" .. icons.Module .. "%*" .. " ", - }, -} - -options = require("core.utils").load_override(options, "SmiteshP/nvim-gps") - -gps.setup(options) diff --git a/lua/plugins/configs/icons.lua b/lua/plugins/configs/icons.lua deleted file mode 100644 index bccc134..0000000 --- a/lua/plugins/configs/icons.lua +++ /dev/null @@ -1,128 +0,0 @@ -local present, devicons = pcall(require, "nvim-web-devicons") - -if not present then - return -end - -local options = { - override = { - default_icon = { - icon = "", - name = "Default", - }, - - c = { - icon = "", - name = "c", - }, - css = { - icon = "", - name = "css", - }, - deb = { - icon = "", - name = "deb", - }, - Dockerfile = { - icon = "", - name = "Dockerfile", - }, - html = { - icon = "", - name = "html", - }, - jpeg = { - icon = "", - name = "jpeg", - }, - jpg = { - icon = "", - name = "jpg", - }, - js = { - icon = "", - name = "js", - }, - kt = { - icon = "󱈙", - name = "kt", - }, - lock = { - icon = "", - name = "lock", - }, - lua = { - icon = "", - name = "lua", - }, - mp3 = { - icon = "", - name = "mp3", - }, - mp4 = { - icon = "", - name = "mp4", - }, - out = { - icon = "", - name = "out", - }, - png = { - icon = "", - name = "png", - }, - py = { - icon = "", - name = "py", - }, - ["robots.txt"] = { - icon = "ﮧ", - name = "robots", - }, - toml = { - icon = "", - name = "toml", - }, - ts = { - icon = "ﯤ", - name = "ts", - }, - ttf = { - icon = "", - name = "TrueTypeFont", - }, - rb = { - icon = "", - name = "rb", - }, - rpm = { - icon = "", - name = "rpm", - }, - vue = { - icon = "﵂", - name = "vue", - }, - woff = { - icon = "", - name = "WebOpenFontFormat", - }, - woff2 = { - icon = "", - name = "WebOpenFontFormat2", - }, - xz = { - icon = "", - name = "xz", - }, - zip = { - icon = "", - name = "zip", - }, - }, -} - --- check for any override -options = require("core.utils").load_override(options, "kyazdani42/nvim-web-devicons") - -devicons.setup(options) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index ded646b..f077421 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -4,20 +4,12 @@ if not present then return end +require("base46").load_highlight "lsp" + local M = {} local utils = require "core.utils" -require("plugins.configs.others").lsp_handlers() - --- Borders for LspInfo winodw -local win = require "lspconfig.ui.windows" -local _default_opts = win.default_opts - -win.default_opts = function(options) - local opts = _default_opts(options) - opts.border = "single" - return opts -end +require "ui.lsp" M.on_attach = function(client, bufnr) client.resolved_capabilities.document_formatting = false @@ -25,6 +17,16 @@ M.on_attach = function(client, bufnr) local lsp_mappings = utils.load_config().mappings.lspconfig utils.load_mappings({ lsp_mappings }, { buffer = bufnr }) + + if client.supports_method "textDocument/signatureHelp" then + vim.api.nvim_create_autocmd({ "CursorHoldI" }, { + pattern = "*", + group = vim.api.nvim_create_augroup("LspSignature", {}), + callback = function() + vim.lsp.buf.signature_help() + end, + }) + end end local capabilities = vim.lsp.protocol.make_client_capabilities() diff --git a/lua/plugins/configs/lspkind_icons.lua b/lua/plugins/configs/lspkind_icons.lua deleted file mode 100644 index 190ca40..0000000 --- a/lua/plugins/configs/lspkind_icons.lua +++ /dev/null @@ -1,36 +0,0 @@ -return { - Text = "", - Method = "", - Function = "", - Constructor = "", - Field = "ﰠ", - Variable = "", - Class = "ﴯ", - Interface = "", - Module = "", - Property = "ﰠ", - Unit = "塞", - Value = "", - Enum = "", - Keyword = "", - Snippet = "", - Color = "", - File = "", - Reference = "", - Folder = "", - EnumMember = "", - Constant = "", - Struct = "פּ", - Event = "", - Operator = "", - TypeParameter = "", - Table = " ", - Object = "", - Tag = " ", - Array = " ", - Boolean = "蘒", - Number = "", - String = "", - Calendar = " ", - Watch = "", -} diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index e2866b1..646e06b 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -4,6 +4,8 @@ if not present then return end +require("base46").load_highlight "nvimtree" + local options = { filters = { dotfiles = false, diff --git a/lua/plugins/configs/nvterm.lua b/lua/plugins/configs/nvterm.lua index 581e4c4..d0580eb 100644 --- a/lua/plugins/configs/nvterm.lua +++ b/lua/plugins/configs/nvterm.lua @@ -4,6 +4,8 @@ if not present then return end +require "base46.term" + local options = { terminals = { list = {}, diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 41e9714..56955e1 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -19,28 +19,9 @@ M.autopairs = function() autopairs.setup(options) local cmp_autopairs = require "nvim-autopairs.completion.cmp" - cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) end -M.better_escape = function() - local present, escape = pcall(require, "better_escape") - - if not present then - return - end - - local options = { - mapping = { "jk" }, -- a table with mappings to use - timeout = vim.o.timeoutlen, - clear_empty_lines = false, -- clear line after escaping if there is only whitespace - keys = "", - } - - options = load_override(options, "max397574/better-escape.nvim") - escape.setup(options) -end - M.blankline = function() local present, blankline = pcall(require, "indent_blankline") @@ -48,6 +29,8 @@ M.blankline = function() return end + require("base46").load_highlight "blankline" + local options = { indentLine_enabled = 1, char = "▏", @@ -59,7 +42,6 @@ M.blankline = function() "lspinfo", "TelescopePrompt", "TelescopeResults", - "nvchad_cheatsheet", "lsp-installer", "", }, @@ -99,9 +81,9 @@ M.colorizer = function() } options = load_override(options, "NvChad/nvim-colorizer.lua") - colorizer.setup(options["filetypes"], options["user_default_options"]) - vim.cmd "ColorizerReloadAllBuffers" + + vim.cmd "ColorizerAttachToBuffer" end M.comment = function() @@ -130,79 +112,9 @@ M.luasnip = function() options = load_override(options, "L3MON4D3/LuaSnip") luasnip.config.set_config(options) - require("luasnip.loaders.from_vscode").lazy_load() end -M.signature = function() - local present, lsp_signature = pcall(require, "lsp_signature") - - if not present then - return - end - - local options = { - bind = true, - doc_lines = 0, - floating_window = true, - fix_pos = true, - hint_enable = true, - hint_prefix = " ", - hint_scheme = "String", - hi_parameter = "Search", - max_height = 22, - max_width = 120, -- max_width of signature floating_window, line will be wrapped if exceed max_width - handler_opts = { - border = "single", -- double, single, shadow, none - }, - zindex = 200, -- by default it will be on top of all floating windows, set to 50 send it to bottom - padding = "", -- character to pad on left and right of signature can be ' ', or '|' etc - } - - options = load_override(options, "ray-x/lsp_signature.nvim") - lsp_signature.setup(options) -end - -M.lsp_handlers = function() - local function lspSymbol(name, icon) - local hl = "DiagnosticSign" .. name - vim.fn.sign_define(hl, { text = icon, numhl = hl, texthl = hl }) - end - - lspSymbol("Error", "") - lspSymbol("Info", "") - lspSymbol("Hint", "") - lspSymbol("Warn", "") - - vim.diagnostic.config { - virtual_text = { - prefix = "", - }, - signs = true, - underline = true, - update_in_insert = false, - } - - vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { - border = "single", - }) - vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { - border = "single", - }) - - -- suppress error messages from lang servers - vim.notify = function(msg, log_level) - if msg:match "exit code" then - return - end - if log_level == vim.log.levels.ERROR then - vim.api.nvim_err_writeln(msg) - else - vim.api.nvim_echo({ { msg } }, true, {}) - end - end -end - M.gitsigns = function() local present, gitsigns = pcall(require, "gitsigns") @@ -210,6 +122,8 @@ M.gitsigns = function() return end + require("base46").load_highlight "git" + local options = { signs = { add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, @@ -219,9 +133,21 @@ M.gitsigns = function() changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" }, }, } - options = load_override(options, "lewis6991/gitsigns.nvim") + options = load_override(options, "lewis6991/gitsigns.nvim") gitsigns.setup(options) end +M.devicons = function() + local present, devicons = pcall(require, "nvim-web-devicons") + + if present then + require("base46").load_highlight "devicons" + + local options = { override = require("ui.icons").devicons } + options = require("core.utils").load_override(options, "kyazdani42/nvim-web-devicons") + devicons.setup(options) + end +end + return M diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 15bd800..9f55894 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -4,6 +4,10 @@ if not present then return end +vim.g.theme_switcher_loaded = true + +require("base46").load_highlight "telescope" + local options = { defaults = { vimgrep_arguments = { diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index a6e6483..8c0717f 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -4,6 +4,9 @@ if not present then return end +require("base46").load_highlight "syntax" +require("base46").load_highlight "treesitter" + local options = { ensure_installed = { "lua", diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index 30630a2..e29e385 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -4,6 +4,8 @@ if not present then return end +require("base46").load_highlight "whichkey" + local options = { icons = { diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e7ab43b..28c0152 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,9 +1,12 @@ +vim.cmd "packadd packer.nvim" + +local lazy_load = require "core.lazy_load" + local plugins = { ["nvim-lua/plenary.nvim"] = {}, - ["lewis6991/impatient.nvim"] = {}, ["wbthomason/packer.nvim"] = {}, - ["NvChad/extensions"] = {}, + ["NvChad/extensions"] = { module = "nvchad", cmd = "Telescope" }, ["NvChad/base46"] = { after = "plenary.nvim", @@ -24,43 +27,40 @@ local plugins = { }, ["kyazdani42/nvim-web-devicons"] = { - after = "base46", + module = "nvim-web-devicons", config = function() - require "plugins.configs.icons" - end, - }, - - ["SmiteshP/nvim-gps"] = { - event = "CursorMoved", - config = function() - require "plugins.configs.gps" + require("plugins.configs.others").devicons() end, }, ["akinsho/bufferline.nvim"] = { tag = "v2.*", - after = "nvim-web-devicons", + opt = true, + setup = lazy_load.bufferline(), config = function() require "plugins.configs.bufferline" end, }, ["lukas-reineke/indent-blankline.nvim"] = { - event = "BufRead", + opt = true, config = function() require("plugins.configs.others").blankline() end, }, ["NvChad/nvim-colorizer.lua"] = { - event = "BufRead", + opt = true, + setup = lazy_load.colorizer(), config = function() require("plugins.configs.others").colorizer() end, }, ["nvim-treesitter/nvim-treesitter"] = { - event = { "BufRead", "BufNewFile" }, + module = "nvim-treesitter", + cmd = { "TSInstall", "TSUninstall" }, + setup = lazy_load.treesitter(), run = ":TSUpdate", config = function() require "plugins.configs.treesitter" @@ -70,25 +70,17 @@ local plugins = { -- git stuff ["lewis6991/gitsigns.nvim"] = { opt = true, + setup = lazy_load.gitsigns(), config = function() require("plugins.configs.others").gitsigns() end, - setup = function() - require("core.utils").packer_lazy_load "gitsigns.nvim" - end, }, -- lsp stuff ["williamboman/nvim-lsp-installer"] = { opt = true, - setup = function() - require("core.utils").packer_lazy_load "nvim-lsp-installer" - -- reload the current file so lsp actually starts for it - vim.defer_fn(function() - vim.cmd 'if &ft == "packer" | echo "" | else | silent! e %' - end, 0) - end, + setup = lazy_load.on_file_open(), }, ["neovim/nvim-lspconfig"] = { @@ -100,15 +92,6 @@ local plugins = { end, }, - ["ray-x/lsp_signature.nvim"] = { - after = "nvim-lspconfig", - config = function() - require("plugins.configs.others").signature() - end, - }, - - - -- load luasnips + cmp related in insert mode only ["rafamadriz/friendly-snippets"] = { @@ -190,11 +173,9 @@ local plugins = { end, }, + -- Only load whichkey after all the gui ["folke/which-key.nvim"] = { - opt = true, - setup = function() - require("core.utils").packer_lazy_load "which-key.nvim" - end, + module = "which-key", config = function() require "plugins.configs.whichkey" end, diff --git a/lua/ui/icons.lua b/lua/ui/icons.lua new file mode 100644 index 0000000..7686a8f --- /dev/null +++ b/lua/ui/icons.lua @@ -0,0 +1,185 @@ +local M = {} + +M.lspkind = { + Namespace = "", + Text = " ", + Method = " ", + Function = " ", + Constructor = " ", + Field = "ﰠ ", + Variable = " ", + Class = "ﴯ ", + Interface = " ", + Module = " ", + Property = "ﰠ ", + Unit = "塞 ", + Value = " ", + Enum = " ", + Keyword = " ", + Snippet = " ", + Color = " ", + File = " ", + Reference = " ", + Folder = " ", + EnumMember = " ", + Constant = " ", + Struct = "פּ ", + Event = " ", + Operator = " ", + TypeParameter = " ", + Table = "", + Object = " ", + Tag = "", + Array = "[]", + Boolean = " ", + Number = " ", + Null = "ﳠ", + String = " ", + Calendar = "", + Watch = " ", + Package = "", +} + +M.devicons = { + default_icon = { + icon = "", + name = "Default", + }, + + c = { + icon = "", + name = "c", + }, + + css = { + icon = "", + name = "css", + }, + + deb = { + icon = "", + name = "deb", + }, + + Dockerfile = { + icon = "", + name = "Dockerfile", + }, + + html = { + icon = "", + name = "html", + }, + + jpeg = { + icon = "", + name = "jpeg", + }, + + jpg = { + icon = "", + name = "jpg", + }, + + js = { + icon = "", + name = "js", + }, + + kt = { + icon = "󱈙", + name = "kt", + }, + + lock = { + icon = "", + name = "lock", + }, + + lua = { + icon = "", + name = "lua", + }, + + mp3 = { + icon = "", + name = "mp3", + }, + + mp4 = { + icon = "", + name = "mp4", + }, + + out = { + icon = "", + name = "out", + }, + + png = { + icon = "", + name = "png", + }, + + py = { + icon = "", + name = "py", + }, + + ["robots.txt"] = { + icon = "ﮧ", + name = "robots", + }, + + toml = { + icon = "", + name = "toml", + }, + + ts = { + icon = "ﯤ", + name = "ts", + }, + + ttf = { + icon = "", + name = "TrueTypeFont", + }, + + rb = { + icon = "", + name = "rb", + }, + + rpm = { + icon = "", + name = "rpm", + }, + + vue = { + icon = "﵂", + name = "vue", + }, + + woff = { + icon = "", + name = "WebOpenFontFormat", + }, + + woff2 = { + icon = "", + name = "WebOpenFontFormat2", + }, + + xz = { + icon = "", + name = "xz", + }, + + zip = { + icon = "", + name = "zip", + }, +} + +return M diff --git a/lua/ui/lsp.lua b/lua/ui/lsp.lua new file mode 100644 index 0000000..1cbde80 --- /dev/null +++ b/lua/ui/lsp.lua @@ -0,0 +1,54 @@ +local function lspSymbol(name, icon) + local hl = "DiagnosticSign" .. name + vim.fn.sign_define(hl, { text = icon, numhl = hl, texthl = hl }) +end + +lspSymbol("Error", "") +lspSymbol("Info", "") +lspSymbol("Hint", "") +lspSymbol("Warn", "") + +vim.diagnostic.config { + virtual_text = { + prefix = "", + }, + signs = true, + underline = true, + update_in_insert = false, +} + +vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { + border = "single", +}) +vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { + border = "single", +}) + +-- suppress error messages from lang servers +vim.notify = function(msg, log_level) + if msg:match "exit code" then + return + end + if log_level == vim.log.levels.ERROR then + vim.api.nvim_err_writeln(msg) + else + vim.api.nvim_echo({ { msg } }, true, {}) + end +end + +-- Borders for LspInfo winodw +local win = require "lspconfig.ui.windows" +local _default_opts = win.default_opts + +win.default_opts = function(options) + local opts = _default_opts(options) + opts.border = "single" + return opts +end + +vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { + border = "single", + silent = true, + focusable = false, + close_events = { "InsertCharPre", "CursorMoved" }, +}) diff --git a/lua/ui/statusline.lua b/lua/ui/statusline.lua index 3caf27a..43dae4e 100644 --- a/lua/ui/statusline.lua +++ b/lua/ui/statusline.lua @@ -64,36 +64,34 @@ M.mode = function() return current_mode .. mode_sep1 .. "%#ST_EmptySpace#" .. sep_r end -M.fileInfo = function() - local icon = "" +M.fileicon = function() + local icon = "  " + local filename = fn.fnamemodify(fn.expand "%:t", ":r") local extension = fn.expand "%:e" + if filename ~= "" then + local devicons_present, devicons = pcall(require, "nvim-web-devicons") + + if devicons_present then + local ft_icon = devicons.get_icon(filename, extension) + icon = (ft_icon ~= nil and " " .. ft_icon) or "" + end + end + + return "%#St_file_info#" .. icon +end + +M.filename = function() + local filename = fn.fnamemodify(fn.expand "%:t", ":r") + if filename == "" then - icon = icon .. "  Empty " + filename = "Empty " else filename = " " .. filename .. " " end - local devicons_present, devicons = pcall(require, "nvim-web-devicons") - - if not devicons_present then - return " " - end - - local ft_icon = devicons.get_icon(filename, extension) - icon = (ft_icon ~= nil and " " .. ft_icon) or icon - - return "%#St_file_info#" .. icon .. filename .. "%#St_file_sep#" .. sep_r -end - -M.gps = function() - if vim.o.columns < 140 or not package.loaded["nvim-gps"] then - return "" - end - - local gps = require "nvim-gps" - return (gps.is_available() and gps.get_location()) or "" + return "%#St_file_info#" .. filename .. "%#St_file_sep#" .. sep_r end M.git = function() @@ -153,10 +151,10 @@ M.LSP_status = function() local clients = vim.lsp.get_active_clients() local name = false for _, client in ipairs(clients) do - if client.attached_buffers[vim.api.nvim_get_current_buf()] then - name = client.name - break - end + if client.attached_buffers[vim.api.nvim_get_current_buf()] then + name = client.name + break + end end local content = name and "  LSP ~ " .. name .. " " or false return content and ("%#St_LspStatus#" .. content) or "" @@ -189,12 +187,12 @@ end M.run = function() return table.concat { M.mode(), - M.fileInfo(), + M.fileicon(), + M.filename(), M.git(), "%=", M.LSP_progress(), - M.gps(), "%=", M.LSP_Diagnostics(), From 31f0a2bd4c1faa53a1f43e3205b566262a5c72c0 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 14 Jun 2022 19:50:34 +0530 Subject: [PATCH 1124/1541] fix creepy issue related to lazyloading --- lua/plugins/init.lua | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 28c0152..914d609 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,7 +1,5 @@ vim.cmd "packadd packer.nvim" -local lazy_load = require "core.lazy_load" - local plugins = { ["nvim-lua/plenary.nvim"] = {}, @@ -36,7 +34,9 @@ local plugins = { ["akinsho/bufferline.nvim"] = { tag = "v2.*", opt = true, - setup = lazy_load.bufferline(), + setup = function() + require("core.lazy_load").bufferline() + end, config = function() require "plugins.configs.bufferline" end, @@ -51,7 +51,9 @@ local plugins = { ["NvChad/nvim-colorizer.lua"] = { opt = true, - setup = lazy_load.colorizer(), + setup = function() + require("core.lazy_load").colorizer() + end, config = function() require("plugins.configs.others").colorizer() end, @@ -60,7 +62,9 @@ local plugins = { ["nvim-treesitter/nvim-treesitter"] = { module = "nvim-treesitter", cmd = { "TSInstall", "TSUninstall" }, - setup = lazy_load.treesitter(), + setup = function() + require("core.lazy_load").treesitter() + end, run = ":TSUpdate", config = function() require "plugins.configs.treesitter" @@ -70,7 +74,9 @@ local plugins = { -- git stuff ["lewis6991/gitsigns.nvim"] = { opt = true, - setup = lazy_load.gitsigns(), + setup = function() + require("core.lazy_load").gitsigns() + end, config = function() require("plugins.configs.others").gitsigns() end, @@ -80,7 +86,9 @@ local plugins = { ["williamboman/nvim-lsp-installer"] = { opt = true, - setup = lazy_load.on_file_open(), + setup = function() + require("core.lazy_load").on_file_open() + end, }, ["neovim/nvim-lspconfig"] = { From 50fdc12f80ab90ed4961ab8aa47cc6f5c9b095e5 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 14 Jun 2022 22:56:57 +0530 Subject: [PATCH 1125/1541] fix #1207 --- lua/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 914d609..7f3235d 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -151,6 +151,7 @@ local plugins = { }, ["goolord/alpha-nvim"] = { + after = "base46", disable = true, config = function() require "plugins.configs.alpha" From a7a6945f52f079caca0ff4f1eaecf8196a61851c Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 14 Jun 2022 23:23:13 +0530 Subject: [PATCH 1126/1541] dont lazy load extensions plugin as its useless to do so fix https://github.com/NvChad/NvChad/commit/0bde81a074f95a6e5096989d0f229bc221ead683#commitcomment-76091612 --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 7f3235d..7be9744 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -4,7 +4,7 @@ local plugins = { ["nvim-lua/plenary.nvim"] = {}, ["wbthomason/packer.nvim"] = {}, - ["NvChad/extensions"] = { module = "nvchad", cmd = "Telescope" }, + ["NvChad/extensions"] = {}, ["NvChad/base46"] = { after = "plenary.nvim", From aabf8ca22556c64fba1f117f773c21cb7528f4c5 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 15 Jun 2022 07:26:10 +0530 Subject: [PATCH 1127/1541] make lspsignature window float above the cursor to avoid cmp overlapping special thanks to https://www.reddit.com/r/neovim/comments/vbsryc/comment/icehk2c/?utm_source=share&utm_medium=web2x&context=3 --- lua/core/init.lua | 6 +++--- lua/ui/lsp.lua | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 3d6df8c..41efe52 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -18,7 +18,7 @@ autocmd("BufUnload", { }) -- Don't auto commenting new lines -autocmd('BufEnter', { - pattern = '*', - command = 'set fo-=c fo-=r fo-=o' +autocmd("BufEnter", { + pattern = "*", + command = "set fo-=c fo-=r fo-=o", }) diff --git a/lua/ui/lsp.lua b/lua/ui/lsp.lua index 1cbde80..17e874b 100644 --- a/lua/ui/lsp.lua +++ b/lua/ui/lsp.lua @@ -51,4 +51,7 @@ vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.s silent = true, focusable = false, close_events = { "InsertCharPre", "CursorMoved" }, + anchor = "SW", + relative = "cursor", + row = -1, }) From d66c000d48a403b5e1d0010fa1d214e4ff7e3842 Mon Sep 17 00:00:00 2001 From: DragonBillow <42114817+cathaysia@users.noreply.github.com> Date: Wed, 15 Jun 2022 17:18:38 +0800 Subject: [PATCH 1128/1541] fix: show all lsp of mulit-lsps workspace --- lua/ui/statusline.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lua/ui/statusline.lua b/lua/ui/statusline.lua index 43dae4e..b0f2d9c 100644 --- a/lua/ui/statusline.lua +++ b/lua/ui/statusline.lua @@ -149,13 +149,18 @@ end M.LSP_status = function() local clients = vim.lsp.get_active_clients() - local name = false + local names = {} for _, client in ipairs(clients) do if client.attached_buffers[vim.api.nvim_get_current_buf()] then - name = client.name - break + table.insert(names, client.name) end end + + local name = false + if names ~= {} then + name = table.concat(names, '/') + end + local content = name and "  LSP ~ " .. name .. " " or false return content and ("%#St_LspStatus#" .. content) or "" end From e1be20329e99c3e6a2c840a3c7b6ae06c55989ae Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 15 Jun 2022 17:03:30 +0530 Subject: [PATCH 1129/1541] Update statusline.lua --- lua/ui/statusline.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/ui/statusline.lua b/lua/ui/statusline.lua index b0f2d9c..341b893 100644 --- a/lua/ui/statusline.lua +++ b/lua/ui/statusline.lua @@ -158,7 +158,7 @@ M.LSP_status = function() local name = false if names ~= {} then - name = table.concat(names, '/') + name = table.concat(names, '|') end local content = name and "  LSP ~ " .. name .. " " or false From 20911604344929662d3db8f083e9a1a21700f040 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 15 Jun 2022 17:08:39 +0530 Subject: [PATCH 1130/1541] BREAKING change for hl_override users put your new highlight groups to hl_add and put your overriden highlight groups which are present in our default theme in hl_override --- lua/core/default_config.lua | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 2562dfb..a2ef345 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -5,19 +5,18 @@ local M = {} M.options = { - -- load your options here or load module with options1 + -- load your options here or load module with options user = function() end, nvChad = { - -- updater update_url = "https://github.com/NvChad/NvChad", update_branch = "main", }, } ----- UI ----- - M.ui = { + -- hl = highlights + hl_add = {}, hl_override = {}, changed_themes = {}, theme_toggle = { "onedark", "one_light" }, @@ -28,19 +27,17 @@ M.ui = { M.plugins = { override = {}, remove = {}, + user = {}, options = { lspconfig = { setup_lspconf = "", -- path of lspconfig file }, statusline = { - separator_style = "default", -- default/round/block + separator_style = "default", -- default/round/block/arrow config = "%!v:lua.require'ui.statusline'.run()", }, }, - - -- add, modify, remove plugins - user = {}, } -- check core.mappings for table structure From 771046a7385b22eb544f64d7e72f324cfb29e215 Mon Sep 17 00:00:00 2001 From: a690700752 Date: Wed, 15 Jun 2022 20:11:53 +0800 Subject: [PATCH 1131/1541] feature: make override can be a function --- lua/core/utils.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 8d5bd29..59d771b 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -148,6 +148,10 @@ end M.load_override = function(default_table, plugin_name) local user_table = M.load_config().plugins.override[plugin_name] + if type(user_table) == "function" then + user_table = user_table() + end + if type(user_table) == "table" then default_table = merge_tb("force", default_table, user_table) else From 1383117bd3f3fb51bffa38384a7e9f73e6229d3b Mon Sep 17 00:00:00 2001 From: tomaswyz Date: Wed, 15 Jun 2022 22:26:10 +0800 Subject: [PATCH 1132/1541] Update lazy_load.lua just check dir ,not check every file --- lua/core/lazy_load.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 30f3578..d86c8b4 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -85,7 +85,7 @@ end M.gitsigns = function() -- taken from https://github.com/max397574 - vim.api.nvim_create_autocmd({ "BufAdd", "VimEnter" }, { + vim.api.nvim_create_autocmd({ "BufRead" }, { callback = function() local function onexit(code, _) if code == 0 then @@ -100,7 +100,7 @@ M.gitsigns = function() args = { "ls-files", "--error-unmatch", - vim.fn.expand "%", + vim.fn.expand "%:p:h", }, }, onexit) end From 6bb209a83414f2aad192a2aee046e6f3f17baafe Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Thu, 16 Jun 2022 00:01:15 -0400 Subject: [PATCH 1133/1541] fix #1215 --- lua/core/utils.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 59d771b..9cc8611 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -6,8 +6,9 @@ local merge_tb = vim.tbl_deep_extend M.close_buffer = function(force) if vim.bo.buftype == "terminal" then - api.nvim_win_hide(0) - return + force = force or #api.nvim_list_wins() < 2 and ":bd!" + local swap = force and #api.nvim_list_bufs() > 1 and ":bp | bd!" .. fn.bufnr() + return vim.cmd(swap or force or "hide") end local fileExists = fn.filereadable(fn.expand "%p") @@ -20,7 +21,6 @@ M.close_buffer = function(force) end force = force or not vim.bo.buflisted or vim.bo.buftype == "nofile" - -- if not force, change to prev buf and then close current local close_cmd = force and ":bd!" or ":bp | bd" .. fn.bufnr() vim.cmd(close_cmd) From dac05df972219312793e9530e9e5ff4c35f95801 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Thu, 16 Jun 2022 00:15:17 -0400 Subject: [PATCH 1134/1541] Fix deprecation notice on nightly --- lua/plugins/configs/lspconfig.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index f077421..f149456 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -12,8 +12,8 @@ local utils = require "core.utils" require "ui.lsp" M.on_attach = function(client, bufnr) - client.resolved_capabilities.document_formatting = false - client.resolved_capabilities.document_range_formatting = false + client.server_capabilities.documentFormattingProvider = false + client.server_capabilities.documentRangeFormattingProvider = false local lsp_mappings = utils.load_config().mappings.lspconfig utils.load_mappings({ lsp_mappings }, { buffer = bufnr }) From c0d75edea00656df4952a61bb92239a4fb61fc6a Mon Sep 17 00:00:00 2001 From: tomaswyz Date: Thu, 16 Jun 2022 11:29:31 +0800 Subject: [PATCH 1135/1541] fix: always display `LSP ~` --- lua/ui/statusline.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/ui/statusline.lua b/lua/ui/statusline.lua index 341b893..7dd9ad8 100644 --- a/lua/ui/statusline.lua +++ b/lua/ui/statusline.lua @@ -157,7 +157,7 @@ M.LSP_status = function() end local name = false - if names ~= {} then + if next(names) then name = table.concat(names, '|') end From 977864e24d5f95fa4e985b14e95f77b02dcbd0f6 Mon Sep 17 00:00:00 2001 From: tomaswyz Date: Thu, 16 Jun 2022 15:11:12 +0800 Subject: [PATCH 1136/1541] Update lazy_load.lua just load bufferline once. let `nvim somedir/*lua` working --- lua/core/lazy_load.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index d86c8b4..d0c610d 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -25,7 +25,7 @@ local M = {} M.bufferline = function() lazy_load { - events = { "BufNewFile", "BufAdd", "TabEnter" }, + events = { "BufNewFile", "BufRead", "TabEnter" }, augroup_name = "BufferLineLazy", plugins = "bufferline.nvim", From 92082d64e541370db0959c4622ab49b5b4810a11 Mon Sep 17 00:00:00 2001 From: Leon Heidelbach Date: Thu, 16 Jun 2022 19:41:19 +0200 Subject: [PATCH 1137/1541] feat: (BETA release) NvChadSnapshots are here. Look at the pinned issue for more information! --- lua/core/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/core/init.lua b/lua/core/init.lua index 41efe52..d26d3f2 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -1,4 +1,7 @@ vim.cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" +vim.cmd "silent! command! NvChadSnapshotCreate lua require('nvchad').snap_create()" +vim.cmd "silent! command! NvChadSnapshotDelete lua require('nvchad').snap_delete()" +vim.cmd "silent! command! NvChadSnapshotCheckout lua require('nvchad').snap_checkout()" local autocmd = vim.api.nvim_create_autocmd From 349ee96a2008ce12c3b029de78e921c30ba5bcd9 Mon Sep 17 00:00:00 2001 From: vlaw Date: Fri, 17 Jun 2022 19:06:03 +0800 Subject: [PATCH 1138/1541] feat: export lazy_load function for user custom plugins --- lua/core/lazy_load.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index d0c610d..0a43fea 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -23,6 +23,8 @@ end local M = {} +M.lazy_load = lazy_load + M.bufferline = function() lazy_load { events = { "BufNewFile", "BufRead", "TabEnter" }, From 9bca3eacaefd9857194372564767c0037bd6d67f Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 18 Jun 2022 09:57:17 +0530 Subject: [PATCH 1139/1541] clean config | fix (#1225) (#1226) --- init.lua | 1 - lua/core/init.lua | 2 + lua/core/lazy_load.lua | 40 ++++++------------ lua/core/mappings.lua | 24 ++++++++++- lua/core/options.lua | 8 ++-- lua/core/packer.lua | 3 +- lua/core/utils.lua | 5 +-- lua/plugins/configs/bufferline.lua | 25 ++--------- lua/plugins/configs/lsp_installer.lua | 2 +- lua/plugins/configs/lspconfig.lua | 14 ++----- lua/plugins/configs/nvimtree.lua | 7 ++-- lua/plugins/configs/others.lua | 5 ++- lua/plugins/init.lua | 8 ++-- lua/ui/lsp.lua | 10 ----- lua/ui/renamer.lua | 60 --------------------------- lua/ui/statusline.lua | 20 ++++----- 16 files changed, 69 insertions(+), 165 deletions(-) delete mode 100644 lua/ui/renamer.lua diff --git a/init.lua b/init.lua index 87a1bdf..467fb0f 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,4 @@ require "core" -require "core.utils" require "core.options" vim.defer_fn(function() diff --git a/lua/core/init.lua b/lua/core/init.lua index d26d3f2..12f0782 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -1,8 +1,10 @@ +-- commands vim.cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" vim.cmd "silent! command! NvChadSnapshotCreate lua require('nvchad').snap_create()" vim.cmd "silent! command! NvChadSnapshotDelete lua require('nvchad').snap_delete()" vim.cmd "silent! command! NvChadSnapshotCheckout lua require('nvchad').snap_checkout()" +-- autocmds local autocmd = vim.api.nvim_create_autocmd -- Disable statusline in dashboard diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 0a43fea..1be8d0f 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -1,5 +1,7 @@ --- https://github.com/max397574/omega-nvim/blob/master/lua/omega/modules/ui/bufferline.lua -local lazy_load = function(tb) +-- thx to https://github.com/max397574/omega-nvim/blob/master/lua/omega/modules/ui/bufferline.lua +local M = {} + +M.lazy_load = function(tb) vim.api.nvim_create_autocmd(tb.events, { pattern = "*", group = vim.api.nvim_create_augroup(tb.augroup_name, {}), @@ -21,12 +23,8 @@ local lazy_load = function(tb) }) end -local M = {} - -M.lazy_load = lazy_load - M.bufferline = function() - lazy_load { + M.lazy_load { events = { "BufNewFile", "BufRead", "TabEnter" }, augroup_name = "BufferLineLazy", plugins = "bufferline.nvim", @@ -38,13 +36,13 @@ M.bufferline = function() end M.colorizer = function() - lazy_load { + M.lazy_load { events = { "BufRead", "BufNewFile" }, augroup_name = "ColorizerLazy", plugins = "nvim-colorizer.lua", condition = function() - local items = { "#", "rgb", "hsl" } + local items = { "#", "rgb", "hsl", "rgba", "hsla" } for _, val in ipairs(items) do if vim.fn.search(val) ~= 0 then @@ -56,28 +54,14 @@ M.colorizer = function() end -- load certain plugins only when there's a file opened in the buffer --- if "nvim-file" is executed -> load the plugin after nvim gui loads +-- if "nvim filename" is executed -> load the plugin after nvim gui loads -- This gives an instant preview of nvim with the file opened -M.on_file_open = function() - lazy_load { +M.on_file_open = function(plugin_name) + M.lazy_load { events = { "BufRead", "BufWinEnter", "BufNewFile" }, - augroup_name = "BeLazyOnFileOpen", - plugins = "nvim-lsp-installer indent-blankline.nvim", - - condition = function() - local file = vim.fn.expand "%" - return file ~= "NvimTree_1" and file ~= "[packer]" and file ~= "" - end, - } -end - -M.treesitter = function() - lazy_load { - events = { "BufRead", "BufWinEnter", "BufNewFile" }, - augroup_name = "Treesitter_lazy", - plugins = "nvim-treesitter", - + augroup_name = "BeLazyOnFileOpen" .. plugin_name, + plugins = plugin_name, condition = function() local file = vim.fn.expand "%" return file ~= "NvimTree_1" and file ~= "[packer]" and file ~= "" diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index ac3eb10..b9fd81d 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -1,4 +1,4 @@ --- n, v, i are mode names +-- n, v, i, tare mode names local function termcodes(str) return vim.api.nvim_replace_termcodes(str, true, true, true) @@ -147,7 +147,7 @@ M.lspconfig = { ["ra"] = { function() - require("ui.renamer").open() + require("nvchad.ui.renamer").open() end, " lsp rename", }, @@ -342,4 +342,24 @@ M.whichkey = { }, } +M.blankline = { + n = { + ["bc"] = { + function() + local ok, start = require("indent_blankline.utils").get_current_context( + vim.g.indent_blankline_context_patterns, + vim.g.indent_blankline_use_treesitter_scope + ) + + if ok then + vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start, 0 }) + vim.cmd [[normal! _]] + end + end, + + " Jump to current_context", + }, + }, +} + return M diff --git a/lua/core/options.lua b/lua/core/options.lua index c39d2c9..e171a8d 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -19,14 +19,12 @@ opt.title = true opt.clipboard = "unnamedplus" opt.cul = true -- cursor line --- Indentline +-- Indenting opt.expandtab = true opt.shiftwidth = 2 opt.smartindent = true --- disable tilde on end of buffer: https://github.com/neovim/neovim/pull/8546#issuecomment-643643758 opt.fillchars = { eob = " " } - opt.ignorecase = true opt.smartcase = true opt.mouse = "a" @@ -53,10 +51,10 @@ opt.updatetime = 250 -- go to previous/next line with h,l,left arrow and right arrow -- when cursor reaches end/beginning of line opt.whichwrap:append "<>[]hl" + g.mapleader = " " -- disable some builtin vim plugins - local default_plugins = { "2html_plugin", "getscript", @@ -101,5 +99,5 @@ vim.schedule(function() vim.cmd [[ silent! rsh ]] end) --- load user options if the file exists +-- load user options config.options.user() diff --git a/lua/core/packer.lua b/lua/core/packer.lua index 1e8332f..575cefc 100644 --- a/lua/core/packer.lua +++ b/lua/core/packer.lua @@ -8,7 +8,6 @@ M.bootstrap = function() if fn.empty(fn.glob(install_path)) > 0 then print "Cloning packer .." - fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } -- install plugins + compile their configs @@ -23,7 +22,7 @@ M.options = { compile_on_sync = true, git = { clone_timeout = 6000 }, display = { - working_sym = " ﲊ", + working_sym = "ﲊ", error_sym = "✗ ", done_sym = " ", removed_sym = " ", diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 9cc8611..7090e7e 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -21,6 +21,7 @@ M.close_buffer = function(force) end force = force or not vim.bo.buflisted or vim.bo.buftype == "nofile" + -- if not force, change to prev buf and then close current local close_cmd = force and ":bd!" or ":bp | bd" .. fn.bufnr() vim.cmd(close_cmd) @@ -150,9 +151,7 @@ M.load_override = function(default_table, plugin_name) if type(user_table) == "function" then user_table = user_table() - end - - if type(user_table) == "table" then + elseif type(user_table) == "table" then default_table = merge_tb("force", default_table, user_table) else default_table = default_table diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 67d258a..cb55bd5 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -7,6 +7,7 @@ end require("base46").load_highlight "bufferline" vim.cmd [[ + function! Toggle_theme(a,b,c,d) lua require('base46').toggle_theme() endfunction @@ -25,18 +26,16 @@ local options = { show_close_icon = false, left_trunc_marker = " ", right_trunc_marker = " ", - max_name_length = 14, + max_name_length = 20, max_prefix_length = 13, tab_size = 20, show_tab_indicators = true, enforce_regular_tabs = false, - view = "multiwindow", show_buffer_close_icons = true, separator_style = "thin", - always_show_bufferline = true, - diagnostics = false, themable = true, + -- top right buttons in bufferline custom_areas = { right = function() return { @@ -45,24 +44,6 @@ local options = { } end, }, - - custom_filter = function(buf_number) - -- Func to filter out our managed/persistent split terms - local present_type, type = pcall(function() - return vim.api.nvim_buf_get_var(buf_number, "term_type") - end) - - if present_type then - if type == "vert" then - return false - elseif type == "hori" then - return false - end - return true - end - - return true - end, }, } diff --git a/lua/plugins/configs/lsp_installer.lua b/lua/plugins/configs/lsp_installer.lua index 2e0cef9..4a78c3d 100644 --- a/lua/plugins/configs/lsp_installer.lua +++ b/lua/plugins/configs/lsp_installer.lua @@ -28,7 +28,7 @@ local options = { }, }, - max_concurrent_installers = 20, + max_concurrent_installers = 10, } options = require("core.utils").load_override(options, "williamboman/nvim-lsp-installer") diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index f149456..9a62a3e 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -12,20 +12,14 @@ local utils = require "core.utils" require "ui.lsp" M.on_attach = function(client, bufnr) - client.server_capabilities.documentFormattingProvider = false - client.server_capabilities.documentRangeFormattingProvider = false + client.resolved_capabilities.document_formatting = false + client.resolved_capabilities.document_range_formatting = false local lsp_mappings = utils.load_config().mappings.lspconfig utils.load_mappings({ lsp_mappings }, { buffer = bufnr }) - if client.supports_method "textDocument/signatureHelp" then - vim.api.nvim_create_autocmd({ "CursorHoldI" }, { - pattern = "*", - group = vim.api.nvim_create_augroup("LspSignature", {}), - callback = function() - vim.lsp.buf.signature_help() - end, - }) + if client.server_capabilities.signatureHelpProvider then + require("nvchad.ui.signature").setup(client) end end diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 646e06b..1bea58a 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -9,12 +9,11 @@ require("base46").load_highlight "nvimtree" local options = { filters = { dotfiles = false, - exclude = { "custom" }, }, disable_netrw = true, hijack_netrw = true, + open_on_setup = false, ignore_ft_on_setup = { "alpha" }, - open_on_tab = false, hijack_cursor = true, hijack_unnamed_buffer_when_opening = false, update_cwd = true, @@ -43,15 +42,15 @@ local options = { indent_markers = { enable = false, }, + icons = { - padding = " ", - symlink_arrow = " ➛ ", show = { file = true, folder = true, folder_arrow = true, git = false, }, + glyphs = { default = "", symlink = "", diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 56955e1..730e8e2 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -48,6 +48,8 @@ M.blankline = function() buftype_exclude = { "terminal" }, show_trailing_blankline_indent = false, show_first_indent_level = false, + show_current_context = true, + show_current_context_start = true, } options = load_override(options, "lukas-reineke/indent-blankline.nvim") @@ -74,8 +76,6 @@ M.colorizer = function() hsl_fn = false, -- CSS hsl() and hsla() functions css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn - - -- Available modes: foreground, background mode = "background", -- Set the display mode. }, } @@ -146,6 +146,7 @@ M.devicons = function() local options = { override = require("ui.icons").devicons } options = require("core.utils").load_override(options, "kyazdani42/nvim-web-devicons") + devicons.setup(options) end end diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 7be9744..4262fbb 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -44,6 +44,9 @@ local plugins = { ["lukas-reineke/indent-blankline.nvim"] = { opt = true, + setup = function() + require("core.lazy_load").on_file_open "indent-blankline.nvim" + end, config = function() require("plugins.configs.others").blankline() end, @@ -61,9 +64,8 @@ local plugins = { ["nvim-treesitter/nvim-treesitter"] = { module = "nvim-treesitter", - cmd = { "TSInstall", "TSUninstall" }, setup = function() - require("core.lazy_load").treesitter() + require("core.lazy_load").on_file_open "nvim-treesitter" end, run = ":TSUpdate", config = function() @@ -87,7 +89,7 @@ local plugins = { ["williamboman/nvim-lsp-installer"] = { opt = true, setup = function() - require("core.lazy_load").on_file_open() + require("core.lazy_load").on_file_open "nvim-lsp-installer" end, }, diff --git a/lua/ui/lsp.lua b/lua/ui/lsp.lua index 17e874b..798b051 100644 --- a/lua/ui/lsp.lua +++ b/lua/ui/lsp.lua @@ -45,13 +45,3 @@ win.default_opts = function(options) opts.border = "single" return opts end - -vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { - border = "single", - silent = true, - focusable = false, - close_events = { "InsertCharPre", "CursorMoved" }, - anchor = "SW", - relative = "cursor", - row = -1, -}) diff --git a/lua/ui/renamer.lua b/lua/ui/renamer.lua deleted file mode 100644 index dcad896..0000000 --- a/lua/ui/renamer.lua +++ /dev/null @@ -1,60 +0,0 @@ --- credits to @Malace : https://www.reddit.com/r/neovim/comments/ql4iuj/rename_hover_including_window_title_and/ --- This is modified version of the above snippet - -local M = {} - -M.open = function() - local currName = vim.fn.expand "" .. " " - - local win = require("plenary.popup").create(currName, { - title = "Renamer", - style = "minimal", - borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, - relative = "cursor", - borderhighlight = "RenamerBorder", - titlehighlight = "RenamerTitle", - focusable = true, - width = 25, - height = 1, - line = "cursor+2", - col = "cursor-1", - }) - - local map_opts = { noremap = true, silent = true } - - vim.cmd "normal w" - vim.cmd "startinsert" - - vim.api.nvim_buf_set_keymap(0, "i", "", "stopinsert | q!", map_opts) - vim.api.nvim_buf_set_keymap(0, "n", "", "stopinsert | q!", map_opts) - - vim.api.nvim_buf_set_keymap( - 0, - "i", - "", - "stopinsert | lua require'ui.renamer'.apply(" .. currName .. "," .. win .. ")", - map_opts - ) - - vim.api.nvim_buf_set_keymap( - 0, - "n", - "", - "stopinsert | lua require'ui.renamer'.apply(" .. currName .. "," .. win .. ")", - map_opts - ) -end - -M.apply = function(curr, win) - local newName = vim.trim(vim.fn.getline ".") - vim.api.nvim_win_close(win, true) - - if #newName > 0 and newName ~= curr then - local params = vim.lsp.util.make_position_params() - params.newName = newName - - vim.lsp.buf_request(0, "textDocument/rename", params) - end -end - -return M diff --git a/lua/ui/statusline.lua b/lua/ui/statusline.lua index 7dd9ad8..ddeb2c1 100644 --- a/lua/ui/statusline.lua +++ b/lua/ui/statusline.lua @@ -149,18 +149,14 @@ end M.LSP_status = function() local clients = vim.lsp.get_active_clients() - local names = {} + local name = false for _, client in ipairs(clients) do if client.attached_buffers[vim.api.nvim_get_current_buf()] then - table.insert(names, client.name) + name = client.name + break end end - - local name = false - if next(names) then - name = table.concat(names, '|') - end - + local content = name and "  LSP ~ " .. name .. " " or false return content and ("%#St_LspStatus#" .. content) or "" end @@ -174,19 +170,19 @@ end M.cursor_position = function() local left_sep = "%#St_pos_sep#" .. sep_l - local icon = "%#St_pos_icon#" .. " " + local icon = "%#St_pos_icon#" .. " " local current_line = fn.line "." local total_line = fn.line "$" local text = math.modf((current_line / total_line) * 100) .. tostring "%%" if current_line == 1 then - text = "Top " + text = "Top" elseif current_line == total_line then - text = "Bot " + text = "Bot" end - return left_sep .. icon .. "%#St_pos_text#" .. " " .. text + return left_sep .. icon .. "%#St_pos_text#" .. " " .. text .. " " end M.run = function() From a99a789f74479ec4a21984866c877aed2bff8af7 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 18 Jun 2022 14:25:23 +0530 Subject: [PATCH 1140/1541] fix #1223 --- lua/core/init.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lua/core/init.lua b/lua/core/init.lua index 12f0782..edb0a71 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -27,3 +27,14 @@ autocmd("BufEnter", { pattern = "*", command = "set fo-=c fo-=r fo-=o", }) + +autocmd("InsertLeave", { + callback = function() + if + require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()] + and not require("luasnip").session.jump_active + then + require("luasnip").unlink_current() + end + end, +}) From 099e075a010eb5954e98f06e5a6c65bd4974f66d Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 18 Jun 2022 16:25:37 +0530 Subject: [PATCH 1141/1541] lazy load plenary.nvim --- lua/plugins/init.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 4262fbb..ea9142b 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -2,12 +2,11 @@ vim.cmd "packadd packer.nvim" local plugins = { - ["nvim-lua/plenary.nvim"] = {}, + ["nvim-lua/plenary.nvim"] = { module = "plenary" }, ["wbthomason/packer.nvim"] = {}, ["NvChad/extensions"] = {}, ["NvChad/base46"] = { - after = "plenary.nvim", config = function() local ok, base46 = pcall(require, "base46") From 4f1ee6ec8ffa9ea1773b148c3cc90b854cf355a3 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 19 Jun 2022 13:43:11 +0530 Subject: [PATCH 1142/1541] Breaking change for statusline_separator field users | optimize statusline & make it overridable added cmd fields for various plugins for example lspinstaller+lspconfig gets loaded only when a file opened but their commands can be run before a file is opened so I additionally lazy loaded them on their cmds too --- lua/core/default_config.lua | 11 +++-- lua/core/lazy_load.lua | 25 ++++++++++ lua/core/mappings.lua | 2 +- lua/core/options.lua | 2 +- lua/plugins/init.lua | 2 + lua/ui/icons.lua | 22 +++++++++ lua/ui/statusline.lua | 91 +++++++++---------------------------- 7 files changed, 78 insertions(+), 77 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index a2ef345..cf92e3b 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -22,21 +22,22 @@ M.ui = { theme_toggle = { "onedark", "one_light" }, theme = "onedark", -- default theme transparency = false, + + statusline = { + separator_style = "default", -- default/round/block/arrow + config = "%!v:lua.require'ui.statusline'.run()", + override = {}, + }, } M.plugins = { override = {}, remove = {}, user = {}, - options = { lspconfig = { setup_lspconf = "", -- path of lspconfig file }, - statusline = { - separator_style = "default", -- default/round/block/arrow - config = "%!v:lua.require'ui.statusline'.run()", - }, }, } diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 1be8d0f..edb32be 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -69,6 +69,31 @@ M.on_file_open = function(plugin_name) } end +-- lspinstaller & lspconfig cmds for lazyloading +M.lsp_cmds = { + "LspInfo", + "LspStart", + "LspRestart", + "LspStop", + "LspInstall", + "LspUnInstall", + "LspUnInstallAll", + "LspInstall", + "LspInstallInfo", + "LspInstallLog", + "LspLog", + "LspPrintInstalled", +} + +M.treesitter_cmds = { + "TSInstall", + "TSBufEnable", + "TSBufDisable", + "TSEnable", + "TSDisable", + "TSModuleInhfo", +} + M.gitsigns = function() -- taken from https://github.com/max397574 vim.api.nvim_create_autocmd({ "BufRead" }, { diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index b9fd81d..9b08bc4 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -1,4 +1,4 @@ --- n, v, i, tare mode names +-- n, v, i, t = mode names local function termcodes(str) return vim.api.nvim_replace_termcodes(str, true, true, true) diff --git a/lua/core/options.lua b/lua/core/options.lua index e171a8d..3b12fec 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -12,7 +12,7 @@ g.did_load_filetypes = 0 g.do_filetype_lua = 1 opt.laststatus = 3 -- global statusline -opt.statusline = config.plugins.options.statusline.config +opt.statusline = config.ui.statusline.config opt.showmode = false opt.title = true diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index ea9142b..68661b6 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -66,6 +66,7 @@ local plugins = { setup = function() require("core.lazy_load").on_file_open "nvim-treesitter" end, + cmd = require("core.lazy_load").treesitter_cmds, run = ":TSUpdate", config = function() require "plugins.configs.treesitter" @@ -87,6 +88,7 @@ local plugins = { ["williamboman/nvim-lsp-installer"] = { opt = true, + cmd = require("core.lazy_load").lsp_cmds, setup = function() require("core.lazy_load").on_file_open "nvim-lsp-installer" end, diff --git a/lua/ui/icons.lua b/lua/ui/icons.lua index 7686a8f..ee0b09c 100644 --- a/lua/ui/icons.lua +++ b/lua/ui/icons.lua @@ -40,6 +40,28 @@ M.lspkind = { Package = "", } +M.statusline_separators = { + default = { + left = "", + right = " ", + }, + + round = { + left = "", + right = "", + }, + + block = { + left = "█", + right = "█", + }, + + arrow = { + left = "", + right = "", + }, +} + M.devicons = { default_icon = { icon = "", diff --git a/lua/ui/statusline.lua b/lua/ui/statusline.lua index ddeb2c1..da2d2c4 100644 --- a/lua/ui/statusline.lua +++ b/lua/ui/statusline.lua @@ -1,30 +1,8 @@ local fn = vim.fn - -local sep_style = { - default = { - left = "", - right = " ", - }, - - round = { - left = "", - right = "", - }, - - block = { - left = "█", - right = "█", - }, - - arrow = { - left = "", - right = "", - }, -} - -local user_sep_style = require("core.utils").load_config().plugins.options.statusline.separator_style -local sep_l = sep_style[user_sep_style]["left"] -local sep_r = sep_style[user_sep_style]["right"] +local sep_style = require("ui.icons").statusline_separators +local user_sep = require("core.utils").load_config().ui.statusline.separator_style +local sep_l = sep_style[user_sep]["left"] +local sep_r = sep_style[user_sep]["right"] local modes = { ["n"] = { "NORMAL", "St_NormalMode" }, @@ -64,34 +42,22 @@ M.mode = function() return current_mode .. mode_sep1 .. "%#ST_EmptySpace#" .. sep_r end -M.fileicon = function() +M.fileInfo = function() local icon = "  " + local filename = (fn.expand "%" == "" and "Empty ") or fn.expand "%:t" - local filename = fn.fnamemodify(fn.expand "%:t", ":r") - local extension = fn.expand "%:e" - - if filename ~= "" then + if filename ~= "Empty " then local devicons_present, devicons = pcall(require, "nvim-web-devicons") if devicons_present then - local ft_icon = devicons.get_icon(filename, extension) + local ft_icon = devicons.get_icon(filename, fn.expand "%:e") icon = (ft_icon ~= nil and " " .. ft_icon) or "" end - end - return "%#St_file_info#" .. icon -end - -M.filename = function() - local filename = fn.fnamemodify(fn.expand "%:t", ":r") - - if filename == "" then - filename = "Empty " - else filename = " " .. filename .. " " end - return "%#St_file_info#" .. filename .. "%#St_file_sep#" .. sep_r + return "%#St_file_info#" .. icon .. filename .. "%#St_file_sep#" .. sep_r end M.git = function() @@ -105,9 +71,8 @@ M.git = function() local changed = (git_status.changed and git_status.changed ~= 0) and ("  " .. git_status.changed) or "" local removed = (git_status.removed and git_status.removed ~= 0) and ("  " .. git_status.removed) or "" local branch_name = "  " .. git_status.head .. " " - local git_info = branch_name .. added .. changed .. removed - return "%#St_gitIcons#" .. git_info + return "%#St_gitIcons#" .. branch_name .. added .. changed .. removed end -- LSP STUFF @@ -130,10 +95,6 @@ M.LSP_progress = function() end M.LSP_Diagnostics = function() - if not #vim.diagnostic.get(0) then - return "" - end - local errors = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR }) local warnings = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN }) local hints = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT }) @@ -148,48 +109,36 @@ M.LSP_Diagnostics = function() end M.LSP_status = function() - local clients = vim.lsp.get_active_clients() - local name = false - for _, client in ipairs(clients) do + for _, client in ipairs(vim.lsp.get_active_clients()) do if client.attached_buffers[vim.api.nvim_get_current_buf()] then - name = client.name - break + return (vim.o.columns > 70 and "%#St_LspStatus#" .. "  LSP ~ " .. client.name .. " ") or "  LSP " end end - - local content = name and "  LSP ~ " .. name .. " " or false - return content and ("%#St_LspStatus#" .. content) or "" end M.cwd = function() - local left_sep = "%#St_cwd_sep#" .. sep_l local dir_icon = "%#St_cwd_icon#" .. " " local dir_name = "%#St_cwd_text#" .. " " .. fn.fnamemodify(fn.getcwd(), ":t") .. " " - return (vim.o.columns > 120 and left_sep .. dir_icon .. dir_name) or "" + return (vim.o.columns > 120 and ("%#St_cwd_sep#" .. sep_l .. dir_icon .. dir_name)) end M.cursor_position = function() - local left_sep = "%#St_pos_sep#" .. sep_l - local icon = "%#St_pos_icon#" .. " " + local left_sep = "%#St_pos_sep#" .. sep_l .. "%#St_pos_icon#" .. " " local current_line = fn.line "." local total_line = fn.line "$" local text = math.modf((current_line / total_line) * 100) .. tostring "%%" - if current_line == 1 then - text = "Top" - elseif current_line == total_line then - text = "Bot" - end + text = (current_line == 1 and "Top") or text + text = (current_line == total_line and "Bot") or text - return left_sep .. icon .. "%#St_pos_text#" .. " " .. text .. " " + return left_sep .. "%#St_pos_text#" .. " " .. text .. " " end M.run = function() return table.concat { M.mode(), - M.fileicon(), - M.filename(), + M.fileInfo(), M.git(), "%=", @@ -197,10 +146,12 @@ M.run = function() "%=", M.LSP_Diagnostics(), - M.LSP_status(), + M.LSP_status() or "", M.cwd(), M.cursor_position(), } end +M = vim.tbl_deep_extend("force", M, require("core.utils").load_config().ui.statusline.override) + return M From 46590c377294029443cf8888a74c295794f229da Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 19 Jun 2022 16:55:40 +0530 Subject: [PATCH 1143/1541] fix https://github.com/NvChad/NvChad/commit/4f1ee6ec8ffa9ea1773b148c3cc90b854cf355a3#commitcomment-76448502 --- lua/ui/statusline.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/ui/statusline.lua b/lua/ui/statusline.lua index da2d2c4..c7b9a0c 100644 --- a/lua/ui/statusline.lua +++ b/lua/ui/statusline.lua @@ -119,7 +119,7 @@ end M.cwd = function() local dir_icon = "%#St_cwd_icon#" .. " " local dir_name = "%#St_cwd_text#" .. " " .. fn.fnamemodify(fn.getcwd(), ":t") .. " " - return (vim.o.columns > 120 and ("%#St_cwd_sep#" .. sep_l .. dir_icon .. dir_name)) + return (vim.o.columns > 120 and ("%#St_cwd_sep#" .. sep_l .. dir_icon .. dir_name)) or "" end M.cursor_position = function() From 7bb3afbb969807db7d6638c5695d61853584be81 Mon Sep 17 00:00:00 2001 From: Leon Heidelbach Date: Mon, 20 Jun 2022 01:26:13 +0200 Subject: [PATCH 1144/1541] feat: add warning message when using PackerSync on snapshot branches --- lua/core/init.lua | 13 ++++++++++--- lua/core/utils.lua | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index edb0a71..e0a889a 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -4,9 +4,17 @@ vim.cmd "silent! command! NvChadSnapshotCreate lua require('nvchad').snap_create vim.cmd "silent! command! NvChadSnapshotDelete lua require('nvchad').snap_delete()" vim.cmd "silent! command! NvChadSnapshotCheckout lua require('nvchad').snap_checkout()" + -- autocmds local autocmd = vim.api.nvim_create_autocmd +-- wrap the PackerSync command to warn people before using it in NvChadSnapshots +autocmd("VimEnter", { + callback = function() + vim.cmd "command! -nargs=* -complete=customlist,v:lua.require'packer'.plugin_complete PackerSync lua require('core.utils').packer_sync()" + end, +}) + -- Disable statusline in dashboard autocmd("FileType", { pattern = "alpha", @@ -30,9 +38,8 @@ autocmd("BufEnter", { autocmd("InsertLeave", { callback = function() - if - require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()] - and not require("luasnip").session.jump_active + if require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()] + and not require("luasnip").session.jump_active then require("luasnip").unlink_current() end diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 7090e7e..62d838f 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -160,4 +160,38 @@ M.load_override = function(default_table, plugin_name) return default_table end +M.packer_sync = function(...) + local git_exists, git = pcall(require, "nvchad.utils.git") + local defaults_exists, defaults = pcall(require, "nvchad.utils.config") + local packer_exists, packer = pcall(require, "packer") + + if git_exists and defaults_exists then + local current_branch_name = git.get_current_branch_name() + + -- warn the user if we are on a snapshot branch + if current_branch_name:match(defaults.snaps.base_snap_branch_name .. "(.+)" .. "$") then + vim.api.nvim_echo({ + { "WARNING: You are trying to use ", "WarningMsg" }, + { "PackerSync" }, + { " on a NvChadSnapshot. This will cause issues if NvChad dependencies contain " + .. "any breaking changes! Plugin updates will not be included in this " + .. "snapshot, so they will be lost after switching between snapshots! Would " + .. "you still like to continue? [y/N]\n", "WarningMsg" } + }, false, {}) + + local ans = vim.trim(string.lower(vim.fn.input("-> "))) + + if ans ~= "y" then + return + end + end + end + + if packer_exists then + packer.sync(...) + else + error("Packer could not be loaded!") + end +end + return M From 2138c846be62fb8a1818bf5cb2c1871307d3bb1c Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 19 Jun 2022 13:38:29 -0400 Subject: [PATCH 1145/1541] Fix Plugin Override Function Capabilities In order to ensure that plugin configuration that is overridden with a function instead of a table is still merged with the default plugin configuration, this commit splits up the if/elseif/else statement in lua/core/utils.lua. This is necessary as we want to take the resulting table returned from the override function and merge it with the default_table before setting up the plugin. Fixes [this issue](https://github.com/NvChad/NvChad/issues/1239) --- lua/core/utils.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 62d838f..33545ee 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -151,7 +151,9 @@ M.load_override = function(default_table, plugin_name) if type(user_table) == "function" then user_table = user_table() - elseif type(user_table) == "table" then + end + + if type(user_table) == "table" then default_table = merge_tb("force", default_table, user_table) else default_table = default_table From e57a3b5de952e58e2dd13f02a4a6ae26449d1040 Mon Sep 17 00:00:00 2001 From: Rentib Date: Tue, 21 Jun 2022 13:24:31 +0200 Subject: [PATCH 1146/1541] added missing brackets --- lua/plugins/configs/others.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 730e8e2..0ca3bf3 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -6,7 +6,7 @@ M.autopairs = function() local present1, autopairs = pcall(require, "nvim-autopairs") local present2, cmp = pcall(require, "cmp") - if not present1 and present2 then + if not (present1 and present2) then return end From 8b0a28195b3a123ff41509d841cc6c2c40b2de6e Mon Sep 17 00:00:00 2001 From: Dikson Santos Date: Tue, 21 Jun 2022 18:20:05 -0300 Subject: [PATCH 1147/1541] fix: typo on readme [asethetic] -> [aesthetic] --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index 4285aa8..7ed5c7c 100644 --- a/.github/README.md +++ b/.github/README.md @@ -41,7 +41,7 @@ ## What is it? -- NvChad is a neovim config written in lua aiming to provide a base configuration with very beautiful UI and blazing fast startuptime (around 0.02 secs ~ 0.07 secs). We tweak UI plugins such as telescope, nvim-tree, bufferline etc well to provide an asethetic UI experience. +- NvChad is a neovim config written in lua aiming to provide a base configuration with very beautiful UI and blazing fast startuptime (around 0.02 secs ~ 0.07 secs). We tweak UI plugins such as telescope, nvim-tree, bufferline etc well to provide an aesthetic UI experience. - Lazy loading is done 93% of the time meaning that plugins will not be loaded by default, they will be loaded only when required also at specific commands, events etc. This lowers the startuptime and it was like 0.07~ secs tested on an old pentium machine 1.4ghz + 4gb ram & HDD. From d327582dc033759e7a5c4a0046d88a168e1da97a Mon Sep 17 00:00:00 2001 From: Sabu Siyad Date: Wed, 22 Jun 2022 13:08:13 +0530 Subject: [PATCH 1148/1541] telescope: remove deprecated option: `use_less` --- lua/plugins/configs/telescope.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 9f55894..f0e27cc 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -47,7 +47,6 @@ local options = { border = {}, borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, color_devicons = true, - use_less = true, set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, file_previewer = require("telescope.previewers").vim_buffer_cat.new, grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, From 5e4b2e6a117bd62a29f02b4825d1f1b1f2f21172 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 24 Jun 2022 10:24:45 +0530 Subject: [PATCH 1149/1541] avoid cmp to take over "" #1258 --- lua/plugins/configs/cmp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 658f131..3433fdb 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -60,8 +60,8 @@ local options = { [""] = cmp.mapping.complete(), [""] = cmp.mapping.close(), [""] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Insert, - select = true, + behavior = cmp.ConfirmBehavior.Replace, + select = false, }, [""] = cmp.mapping(function(fallback) if cmp.visible() then From 845d5b48661a8d8fbc2d43c8f3cb636f62bce109 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 24 Jun 2022 19:24:59 +0530 Subject: [PATCH 1150/1541] write own lightweight tabufline | remove bufferline --- .github/README.md | 8 +- lua/core/default_config.lua | 5 +- lua/core/init.lua | 47 +++++++++-- lua/core/lazy_load.lua | 34 ++++---- lua/core/mappings.lua | 10 ++- lua/core/utils.lua | 83 +++++++++++++------ lua/plugins/configs/bufferline.lua | 53 ------------ lua/plugins/configs/others.lua | 11 +++ lua/plugins/init.lua | 13 +-- lua/ui/statusline.lua | 2 +- lua/ui/tabline.lua | 126 +++++++++++++++++++++++++++++ 11 files changed, 269 insertions(+), 123 deletions(-) delete mode 100644 lua/plugins/configs/bufferline.lua create mode 100644 lua/ui/tabline.lua diff --git a/.github/README.md b/.github/README.md index 7ed5c7c..c49cc01 100644 --- a/.github/README.md +++ b/.github/README.md @@ -88,11 +88,11 @@ Adds indentline:

-

Nvim-bufferline.lua

+

Tabufline (our own pertab bufferline)

-A snazzy bufferline for Neovim - -
+
+
+

Nvim-web-devicons

diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index cf92e3b..e5e0dd9 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -4,7 +4,6 @@ local M = {} M.options = { - -- load your options here or load module with options user = function() end, @@ -25,9 +24,11 @@ M.ui = { statusline = { separator_style = "default", -- default/round/block/arrow - config = "%!v:lua.require'ui.statusline'.run()", + config = "%!v:lua.require('ui.statusline').run()", override = {}, }, + + tabufline_enabled = true, } M.plugins = { diff --git a/lua/core/init.lua b/lua/core/init.lua index e0a889a..709f878 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -4,9 +4,9 @@ vim.cmd "silent! command! NvChadSnapshotCreate lua require('nvchad').snap_create vim.cmd "silent! command! NvChadSnapshotDelete lua require('nvchad').snap_delete()" vim.cmd "silent! command! NvChadSnapshotCheckout lua require('nvchad').snap_checkout()" - -- autocmds local autocmd = vim.api.nvim_create_autocmd +local api = vim.api -- wrap the PackerSync command to warn people before using it in NvChadSnapshots autocmd("VimEnter", { @@ -36,12 +36,45 @@ autocmd("BufEnter", { command = "set fo-=c fo-=r fo-=o", }) -autocmd("InsertLeave", { - callback = function() - if require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()] - and not require("luasnip").session.jump_active - then - require("luasnip").unlink_current() +vim.t.bufs = vim.api.nvim_list_bufs() + +-- thx to https://github.com/ii14 && stores buffer per tab -> table +autocmd({ "BufAdd" }, { + callback = function(args) + if vim.t.bufs == nil then + vim.t.bufs = { args.buf } + else + local bufs = vim.t.bufs + + -- check for duplicates + if not vim.tbl_contains(bufs, args.buf) then + table.insert(bufs, args.buf) + vim.t.bufs = bufs + end end end, }) + +autocmd("BufDelete", { + callback = function(args) + for _, tab in ipairs(api.nvim_list_tabpages()) do + local bufs = vim.t[tab].bufs + if bufs then + for i, bufnr in ipairs(bufs) do + if bufnr == args.buf then + table.remove(bufs, i) + vim.t[tab].bufs = bufs + break + end + end + end + end + end, +}) + +if require("core.utils").load_config().ui.tabufline_enabled then + require("core.lazy_load").tabufline() +else + vim.opt.showtabline = 2 + vim.opt.tabline = "%!v:lua.require('ui.tabline').run()" +end diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index edb32be..8712f68 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -1,8 +1,8 @@ --- thx to https://github.com/max397574/omega-nvim/blob/master/lua/omega/modules/ui/bufferline.lua local M = {} +local autocmd = vim.api.nvim_create_autocmd M.lazy_load = function(tb) - vim.api.nvim_create_autocmd(tb.events, { + autocmd(tb.events, { pattern = "*", group = vim.api.nvim_create_augroup(tb.augroup_name, {}), callback = function() @@ -23,18 +23,6 @@ M.lazy_load = function(tb) }) end -M.bufferline = function() - M.lazy_load { - events = { "BufNewFile", "BufRead", "TabEnter" }, - augroup_name = "BufferLineLazy", - plugins = "bufferline.nvim", - - condition = function() - return #vim.fn.getbufinfo { buflisted = 1 } >= 2 - end, - } -end - M.colorizer = function() M.lazy_load { events = { "BufRead", "BufNewFile" }, @@ -96,7 +84,7 @@ M.treesitter_cmds = { M.gitsigns = function() -- taken from https://github.com/max397574 - vim.api.nvim_create_autocmd({ "BufRead" }, { + autocmd({ "BufRead" }, { callback = function() local function onexit(code, _) if code == 0 then @@ -119,4 +107,20 @@ M.gitsigns = function() }) end +M.tabufline = function() + autocmd({ "BufNewFile", "BufRead", "TabEnter" }, { + pattern = "*", + group = vim.api.nvim_create_augroup("TabuflineLazyLoad", {}), + callback = function() + if #vim.fn.getbufinfo { buflisted = 1 } >= 2 then + vim.opt.showtabline = 2 + vim.opt.tabline = "%!v:lua.require('ui.tabline').run()" + vim.api.nvim_del_augroup_by_name "TabuflineLazyLoad" + else + return "" + end + end, + }) +end + return M diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 9b08bc4..5638d38 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -58,15 +58,19 @@ M.general = { }, } -M.bufferline = { +M.tabufline = { n = { -- new buffer [""] = { " enew ", "烙 new buffer" }, -- cycle through buffers - [""] = { " BufferLineCycleNext ", " cycle next buffer" }, - [""] = { " BufferLineCyclePrev ", " cycle prev buffer" }, + [""] = { " Tbufnext ", " goto next buffer" }, + [""] = { " Tbufprev ", " goto prev buffer" }, + + -- cycle through tabs + ["tp"] = { " tabprevious ", " goto next tab" }, + ["tn"] = { " tabnext ", " goto prev tab" }, -- close buffer + hide terminal buffer ["x"] = { diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 33545ee..b1c09c8 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -1,30 +1,28 @@ local M = {} local api = vim.api -local fn = vim.fn local merge_tb = vim.tbl_deep_extend -M.close_buffer = function(force) +M.close_buffer = function(bufnr) if vim.bo.buftype == "terminal" then - force = force or #api.nvim_list_wins() < 2 and ":bd!" - local swap = force and #api.nvim_list_bufs() > 1 and ":bp | bd!" .. fn.bufnr() - return vim.cmd(swap or force or "hide") - end - - local fileExists = fn.filereadable(fn.expand "%p") - local modified = api.nvim_buf_get_option(fn.bufnr(), "modified") - - -- if file doesnt exist & its modified - if fileExists == 0 and modified then - print "no file name? add it now!" + if vim.bo.buflisted then + vim.bo.buflisted = false + vim.cmd "enew" + else + vim.cmd "hide" + end return end - force = force or not vim.bo.buflisted or vim.bo.buftype == "nofile" + -- if file doesnt exist & its modified + if vim.bo.modified then + print "save the file!" + return + end - -- if not force, change to prev buf and then close current - local close_cmd = force and ":bd!" or ":bp | bd" .. fn.bufnr() - vim.cmd(close_cmd) + bufnr = bufnr or api.nvim_get_current_buf() + require("core.utils").tabuflinePrev() + vim.cmd("bd" .. bufnr) end M.load_config = function() @@ -151,9 +149,7 @@ M.load_override = function(default_table, plugin_name) if type(user_table) == "function" then user_table = user_table() - end - - if type(user_table) == "table" then + elseif type(user_table) == "table" then default_table = merge_tb("force", default_table, user_table) else default_table = default_table @@ -175,13 +171,16 @@ M.packer_sync = function(...) vim.api.nvim_echo({ { "WARNING: You are trying to use ", "WarningMsg" }, { "PackerSync" }, - { " on a NvChadSnapshot. This will cause issues if NvChad dependencies contain " - .. "any breaking changes! Plugin updates will not be included in this " - .. "snapshot, so they will be lost after switching between snapshots! Would " - .. "you still like to continue? [y/N]\n", "WarningMsg" } + { + " on a NvChadSnapshot. This will cause issues if NvChad dependencies contain " + .. "any breaking changes! Plugin updates will not be included in this " + .. "snapshot, so they will be lost after switching between snapshots! Would " + .. "you still like to continue? [y/N]\n", + "WarningMsg", + }, }, false, {}) - local ans = vim.trim(string.lower(vim.fn.input("-> "))) + local ans = vim.trim(string.lower(vim.fn.input "-> ")) if ans ~= "y" then return @@ -192,7 +191,39 @@ M.packer_sync = function(...) if packer_exists then packer.sync(...) else - error("Packer could not be loaded!") + error "Packer could not be loaded!" + end +end + +M.tabuflineNext = function() + local bufs = vim.t.bufs or {} + + for i, v in ipairs(bufs) do + if api.nvim_get_current_buf() == v then + vim.cmd(i == #bufs and "b" .. bufs[1] or "b" .. bufs[i + 1]) + break + end + end +end + +M.tabuflinePrev = function() + local bufs = vim.t.bufs or {} + + for i, v in ipairs(bufs) do + if api.nvim_get_current_buf() == v then + vim.cmd(i == 1 and "b" .. bufs[#bufs] or "b" .. bufs[i - 1]) + break + end + end +end +-- closes tab + all of its buffers +M.tabuflineCloseTab = function() + local bufs = vim.t.bufs or {} + + vim.cmd "tabclose" + + for _, buf in ipairs(bufs) do + vim.cmd("bd" .. buf) end end diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua deleted file mode 100644 index cb55bd5..0000000 --- a/lua/plugins/configs/bufferline.lua +++ /dev/null @@ -1,53 +0,0 @@ -local present, bufferline = pcall(require, "bufferline") - -if not present then - return -end - -require("base46").load_highlight "bufferline" - -vim.cmd [[ - - function! Toggle_theme(a,b,c,d) - lua require('base46').toggle_theme() - endfunction - - function! Quit_vim(a,b,c,d) - qa - endfunction -]] - -local options = { - options = { - offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, - buffer_close_icon = "", - modified_icon = "", - close_icon = "", - show_close_icon = false, - left_trunc_marker = " ", - right_trunc_marker = " ", - max_name_length = 20, - max_prefix_length = 13, - tab_size = 20, - show_tab_indicators = true, - enforce_regular_tabs = false, - show_buffer_close_icons = true, - separator_style = "thin", - themable = true, - - -- top right buttons in bufferline - custom_areas = { - right = function() - return { - { text = "%@Toggle_theme@" .. vim.g.toggle_theme_icon .. "%X" }, - { text = "%@Quit_vim@ %X" }, - } - end, - }, - }, -} - --- check for any override -options = require("core.utils").load_override(options, "akinsho/bufferline.nvim") - -bufferline.setup(options) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 0ca3bf3..161b097 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -113,6 +113,17 @@ M.luasnip = function() options = load_override(options, "L3MON4D3/LuaSnip") luasnip.config.set_config(options) require("luasnip.loaders.from_vscode").lazy_load() + + vim.api.nvim_create_autocmd("InsertLeave", { + callback = function() + if + require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()] + and not require("luasnip").session.jump_active + then + require("luasnip").unlink_current() + end + end, + }) end M.gitsigns = function() diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 68661b6..bc3e1bf 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -4,7 +4,7 @@ local plugins = { ["nvim-lua/plenary.nvim"] = { module = "plenary" }, ["wbthomason/packer.nvim"] = {}, - ["NvChad/extensions"] = {}, + ["NvChad/extensions"] = { module = { "telescope", "nvchad" } }, ["NvChad/base46"] = { config = function() @@ -30,17 +30,6 @@ local plugins = { end, }, - ["akinsho/bufferline.nvim"] = { - tag = "v2.*", - opt = true, - setup = function() - require("core.lazy_load").bufferline() - end, - config = function() - require "plugins.configs.bufferline" - end, - }, - ["lukas-reineke/indent-blankline.nvim"] = { opt = true, setup = function() diff --git a/lua/ui/statusline.lua b/lua/ui/statusline.lua index c7b9a0c..df52cb9 100644 --- a/lua/ui/statusline.lua +++ b/lua/ui/statusline.lua @@ -50,7 +50,7 @@ M.fileInfo = function() local devicons_present, devicons = pcall(require, "nvim-web-devicons") if devicons_present then - local ft_icon = devicons.get_icon(filename, fn.expand "%:e") + local ft_icon = devicons.get_icon(filename) icon = (ft_icon ~= nil and " " .. ft_icon) or "" end diff --git a/lua/ui/tabline.lua b/lua/ui/tabline.lua new file mode 100644 index 0000000..09112a2 --- /dev/null +++ b/lua/ui/tabline.lua @@ -0,0 +1,126 @@ +require("base46").load_highlight "tbline" +local api = vim.api + +-- btn click functions +vim.cmd "function! TbGoToBuf(bufnr,b,c,d) \n execute 'b'..a:bufnr \n endfunction" + +vim.cmd [[ + function! TbKillBuf(bufnr,b,c,d) + call luaeval('require("core.utils").close_buffer(_A)', a:bufnr) + endfunction]] + +vim.cmd "function! TbNewTab(a,b,c,d) \n tabnew \n endfunction" +vim.cmd "function! TbGotoTab(tabnr,b,c,d) \n execute a:tabnr ..'tabnext' \n endfunction" +vim.cmd "function! TbTabClose(a,b,c,d) \n lua require('core.utils').tabuflineCloseTab() \n endfunction" +vim.cmd "function! TbToggle_theme(a,b,c,d) \n lua require('base46').toggle_theme() \n endfunction" +vim.cmd "function! TbToggleTabs(a,b,c,d) \n let g:TbTabsToggled = !g:TbTabsToggled | redrawtabline \n endfunction" + +local devicons_present, devicons = pcall(require, "nvim-web-devicons") +local fn = vim.fn +local new_cmd = api.nvim_create_user_command + +new_cmd("Tbufnext", function() + require("core.utils").tabuflineNext() +end, {}) + +new_cmd("Tbufprev", function() + require("core.utils").tabuflinePrev() +end, {}) + +new_cmd("Tbufclose", function() + require("core.utils").close_buffer() +end, {}) + +local function new_hl(group1, group2) + local fg = fn.synIDattr(fn.synIDtrans(fn.hlID(group1)), "fg#") + local bg = fn.synIDattr(fn.synIDtrans(fn.hlID(group2)), "bg#") + api.nvim_set_hl(0, "Tbline" .. group1 .. group2, { fg = fg, bg = bg }) + return "%#" .. "Tbline" .. group1 .. group2 .. "#" +end + +local function Offset() + for _, win in pairs(api.nvim_tabpage_list_wins(0)) do + if vim.bo[api.nvim_win_get_buf(win)].ft == "NvimTree" then + return "%#NvimTreeNormal#" .. string.rep(" ", api.nvim_win_get_width(win) + 1) + end + end +end + +local function add_fileInfo(name, bufnr) + if devicons_present then + local icon, icon_hl = devicons.get_icon(name, string.match(name, "%a+$")) + + if not icon then + icon, icon_hl = devicons.get_icon "default_icon" + end + + local fileInfo = " " .. icon .. " " .. name .. " " -- initial value + local pad = (24 - #fileInfo) / 2 + + icon = ( + api.nvim_get_current_buf() == bufnr and new_hl(icon_hl, "TbLineBufOn") .. " " .. icon + or new_hl(icon_hl, "TbLineBufOff") .. " " .. icon + ) + + name = (#name > 20 and string.sub(name, 1, 15) .. "...") or name + name = (api.nvim_get_current_buf() == bufnr and "%#TbLineBufOn# " .. name .. " ") + or ("%#TbLineBufOff# " .. name .. " ") + + return string.rep(" ", pad) .. icon .. name .. string.rep(" ", pad - 1) + end +end + +local function bufferlist() + local buffers = "" + + for _, nr in ipairs(vim.t.bufs or {}) do -- buf = bufnr + local name = (#api.nvim_buf_get_name(nr) ~= 0) and fn.fnamemodify(api.nvim_buf_get_name(nr), ":t") or " No Name " + local close_btn = "%" .. nr .. "@TbKillBuf@ %X" + name = "%" .. nr .. "@TbGoToBuf@" .. add_fileInfo(name, nr) .. "%X" + + -- color close btn for focused / hidden buffers + if nr == api.nvim_get_current_buf() then + close_btn = (vim.bo[0].modified and "%#TbLineBufOnModified# ") or ("%#TbLineBufOnClose#" .. close_btn) + name = "%#TbLineBufOn#" .. name .. close_btn + else + close_btn = (vim.bo[nr].modified and "%#TbBufLineBufOffModified# ") or ("%#TbLineBufOffClose#" .. close_btn) + name = "%#TbLineBufOff#" .. name .. close_btn + end + + buffers = buffers .. name + end + + return buffers .. "%#TblineFill#" .. "%=" -- buffers + empty space +end + +vim.g.TbTabsToggled = 0 + +local function tablist() + local result, number_of_tabs = "", fn.tabpagenr "$" + + if number_of_tabs > 1 then + for i = 1, number_of_tabs, 1 do + local tab_hl = ((i == fn.tabpagenr()) and "%#TbLineTabOn# ") or "%#TbLineTabOff# " + result = result .. ("%" .. i .. "@TbGotoTab@" .. tab_hl .. i .. " ") + result = (i == fn.tabpagenr() and result .. "%#TbLineTabCloseBtn#" .. "%@TbTabClose@ %X") or result + end + + local new_tabtn = "%#TblineTabNewBtn#" .. "%@TbNewTab@  %X" + local tabstoggleBtn = "%@TbToggleTabs@ %#TBTabTitle# TABS %X" + + result = (vim.g.TbTabsToggled == 1 and tabstoggleBtn:gsub("()", { [36] = " " })) + or new_tabtn .. tabstoggleBtn .. result + + return result + end +end + +local function buttons() + return "%@TbToggle_theme@%#TbLineThemeToggleBtn#" .. vim.g.toggle_theme_icon .. "%X" +end + +return { + run = function() + return (Offset() or "") .. bufferlist() .. (tablist() or "") .. buttons() + end, +} From 876295ec028ed345e5d9162b0b0c3e5775979fb7 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 25 Jun 2022 11:21:50 +0530 Subject: [PATCH 1151/1541] rm misleading field name for tabufline in default_config --- lua/core/default_config.lua | 6 +++--- lua/core/init.lua | 4 ++-- lua/core/lazy_load.lua | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index e5e0dd9..48203d1 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -1,5 +1,4 @@ --- IMPORTANT NOTE : This is default config, so dont change anything here. --- chadrc overrides this file +-- Chadrc overrides this file local M = {} @@ -28,7 +27,8 @@ M.ui = { override = {}, }, - tabufline_enabled = true, + -- lazyload it when there are 1+ buffers + tabufline_lazyloaded = true, } M.plugins = { diff --git a/lua/core/init.lua b/lua/core/init.lua index 709f878..7fdf605 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -38,7 +38,7 @@ autocmd("BufEnter", { vim.t.bufs = vim.api.nvim_list_bufs() --- thx to https://github.com/ii14 && stores buffer per tab -> table +-- thx to https://github.com/ii14 & stores buffer per tab -> table autocmd({ "BufAdd" }, { callback = function(args) if vim.t.bufs == nil then @@ -72,7 +72,7 @@ autocmd("BufDelete", { end, }) -if require("core.utils").load_config().ui.tabufline_enabled then +if require("core.utils").load_config().ui.tabufline_lazyloaded then require("core.lazy_load").tabufline() else vim.opt.showtabline = 2 diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 8712f68..873b593 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -116,8 +116,6 @@ M.tabufline = function() vim.opt.showtabline = 2 vim.opt.tabline = "%!v:lua.require('ui.tabline').run()" vim.api.nvim_del_augroup_by_name "TabuflineLazyLoad" - else - return "" end end, }) From 62b9c09f44dd2e0b4b44bdbe7e4f7347c935589d Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 26 Jun 2022 06:24:52 +0530 Subject: [PATCH 1152/1541] fix tabufline crash when formatting buf | (#1265) --- init.lua | 6 +----- lua/core/init.lua | 4 ++-- lua/core/lazy_load.lua | 2 +- lua/core/utils.lua | 16 ++++++++++++++-- lua/plugins/configs/nvimtree.lua | 1 + lua/ui/tabline.lua | 28 ++++++++++++++++------------ 6 files changed, 35 insertions(+), 22 deletions(-) diff --git a/init.lua b/init.lua index 467fb0f..2237c5c 100644 --- a/init.lua +++ b/init.lua @@ -9,8 +9,4 @@ end, 0) require("core.packer").bootstrap() require "plugins" -local user_conf, _ = pcall(require, "custom") - -if user_conf then - require "custom" -end +pcall(require, "custom") diff --git a/lua/core/init.lua b/lua/core/init.lua index 7fdf605..d731be5 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -39,7 +39,7 @@ autocmd("BufEnter", { vim.t.bufs = vim.api.nvim_list_bufs() -- thx to https://github.com/ii14 & stores buffer per tab -> table -autocmd({ "BufAdd" }, { +autocmd("BufAdd", { callback = function(args) if vim.t.bufs == nil then vim.t.bufs = { args.buf } @@ -76,5 +76,5 @@ if require("core.utils").load_config().ui.tabufline_lazyloaded then require("core.lazy_load").tabufline() else vim.opt.showtabline = 2 - vim.opt.tabline = "%!v:lua.require('ui.tabline').run()" + vim.opt.tabline = "%!v:lua.require'ui.tabline'.run()" end diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 873b593..036be76 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -114,7 +114,7 @@ M.tabufline = function() callback = function() if #vim.fn.getbufinfo { buflisted = 1 } >= 2 then vim.opt.showtabline = 2 - vim.opt.tabline = "%!v:lua.require('ui.tabline').run()" + vim.opt.tabline = "%!v:lua.require'ui.tabline'.run()" vim.api.nvim_del_augroup_by_name "TabuflineLazyLoad" end end, diff --git a/lua/core/utils.lua b/lua/core/utils.lua index b1c09c8..59d0ec5 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -195,8 +195,20 @@ M.packer_sync = function(...) end end +M.bufilter = function() + local bufs = vim.t.bufs + + for i = #bufs, 1, -1 do + if not vim.api.nvim_buf_is_loaded(bufs[i]) then + table.remove(bufs, i) + end + end + + return bufs +end + M.tabuflineNext = function() - local bufs = vim.t.bufs or {} + local bufs = M.bufilter() or {} for i, v in ipairs(bufs) do if api.nvim_get_current_buf() == v then @@ -207,7 +219,7 @@ M.tabuflineNext = function() end M.tabuflinePrev = function() - local bufs = vim.t.bufs or {} + local bufs = M.bufilter() or {} for i, v in ipairs(bufs) do if api.nvim_get_current_buf() == v then diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 1bea58a..fdfb636 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -9,6 +9,7 @@ require("base46").load_highlight "nvimtree" local options = { filters = { dotfiles = false, + exclude = { vim.fn.stdpath "config" .. "/lua/custom" }, }, disable_netrw = true, hijack_netrw = true, diff --git a/lua/ui/tabline.lua b/lua/ui/tabline.lua index 09112a2..900b692 100644 --- a/lua/ui/tabline.lua +++ b/lua/ui/tabline.lua @@ -74,20 +74,24 @@ local function bufferlist() local buffers = "" for _, nr in ipairs(vim.t.bufs or {}) do -- buf = bufnr - local name = (#api.nvim_buf_get_name(nr) ~= 0) and fn.fnamemodify(api.nvim_buf_get_name(nr), ":t") or " No Name " - local close_btn = "%" .. nr .. "@TbKillBuf@ %X" - name = "%" .. nr .. "@TbGoToBuf@" .. add_fileInfo(name, nr) .. "%X" + if api.nvim_buf_is_loaded(nr) then + local name = (#api.nvim_buf_get_name(nr) ~= 0) and fn.fnamemodify(api.nvim_buf_get_name(nr), ":t") + or " No Name " + local close_btn = "%" .. nr .. "@TbKillBuf@ %X" + name = "%" .. nr .. "@TbGoToBuf@" .. add_fileInfo(name, nr) .. "%X" - -- color close btn for focused / hidden buffers - if nr == api.nvim_get_current_buf() then - close_btn = (vim.bo[0].modified and "%#TbLineBufOnModified# ") or ("%#TbLineBufOnClose#" .. close_btn) - name = "%#TbLineBufOn#" .. name .. close_btn - else - close_btn = (vim.bo[nr].modified and "%#TbBufLineBufOffModified# ") or ("%#TbLineBufOffClose#" .. close_btn) - name = "%#TbLineBufOff#" .. name .. close_btn + -- color close btn for focused / hidden buffers + if nr == api.nvim_get_current_buf() then + close_btn = (vim.bo[0].modified and "%#TbLineBufOnModified# ") or ("%#TbLineBufOnClose#" .. close_btn) + name = "%#TbLineBufOn#" .. name .. close_btn + else + close_btn = (vim.bo[nr].modified and "%#TbBufLineBufOffModified# ") + or ("%#TbLineBufOffClose#" .. close_btn) + name = "%#TbLineBufOff#" .. name .. close_btn + end + + buffers = buffers .. name end - - buffers = buffers .. name end return buffers .. "%#TblineFill#" .. "%=" -- buffers + empty space From 1fdf01ccd40fe35256a08e7451d6e78ca6ef7bb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=B6hl=2C=20Lukas?= Date: Sun, 26 Jun 2022 14:33:51 +0200 Subject: [PATCH 1153/1541] feat(nvim-tree): enable adaptize size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Höhl, Lukas --- lua/plugins/configs/nvimtree.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index fdfb636..a557f0a 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -23,6 +23,7 @@ local options = { update_cwd = false, }, view = { + adaptive_size = true, side = "left", width = 25, hide_root_folder = true, From 9c07c5c2ed10a02caeec0a8610c93e42fa999023 Mon Sep 17 00:00:00 2001 From: asiryk Date: Sun, 26 Jun 2022 16:58:51 +0300 Subject: [PATCH 1154/1541] fix typo in treesitter init cmds --- lua/core/lazy_load.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 036be76..b5458e3 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -79,7 +79,7 @@ M.treesitter_cmds = { "TSBufDisable", "TSEnable", "TSDisable", - "TSModuleInhfo", + "TSModuleInfo", } M.gitsigns = function() From 33550e9587e607f9ad56498660e75321a80e7be6 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 27 Jun 2022 07:16:33 +0530 Subject: [PATCH 1155/1541] add options for tabufline : enabled, lazyload, override | fix (#1274) --- lua/core/default_config.lua | 6 +++++- lua/core/init.lua | 6 ++++-- lua/core/utils.lua | 9 +++++---- lua/ui/tabline.lua | 30 +++++++++++++++++++----------- 4 files changed, 33 insertions(+), 18 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 48203d1..98ecbb6 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -28,7 +28,11 @@ M.ui = { }, -- lazyload it when there are 1+ buffers - tabufline_lazyloaded = true, + tabufline = { + enabled = true, + lazyload = true, + override = {}, + }, } M.plugins = { diff --git a/lua/core/init.lua b/lua/core/init.lua index d731be5..f9c364e 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -72,9 +72,11 @@ autocmd("BufDelete", { end, }) -if require("core.utils").load_config().ui.tabufline_lazyloaded then +local tabufline_opts = require("core.utils").load_config().ui.tabufline + +if tabufline_opts.enabled and tabufline_opts.lazyload then require("core.lazy_load").tabufline() -else +elseif tabufline_opts.enabled then vim.opt.showtabline = 2 vim.opt.tabline = "%!v:lua.require'ui.tabline'.run()" end diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 59d0ec5..075f976 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -228,15 +228,16 @@ M.tabuflinePrev = function() end end end + -- closes tab + all of its buffers -M.tabuflineCloseTab = function() +M.closeAllBufs = function(action) local bufs = vim.t.bufs or {} - vim.cmd "tabclose" - for _, buf in ipairs(bufs) do - vim.cmd("bd" .. buf) + M.close_buffer(buf) end + + vim.cmd(action == "closeTab" and "tabclose" or "enew") end return M diff --git a/lua/ui/tabline.lua b/lua/ui/tabline.lua index 900b692..d4505af 100644 --- a/lua/ui/tabline.lua +++ b/lua/ui/tabline.lua @@ -11,7 +11,8 @@ vim.cmd [[ vim.cmd "function! TbNewTab(a,b,c,d) \n tabnew \n endfunction" vim.cmd "function! TbGotoTab(tabnr,b,c,d) \n execute a:tabnr ..'tabnext' \n endfunction" -vim.cmd "function! TbTabClose(a,b,c,d) \n lua require('core.utils').tabuflineCloseTab() \n endfunction" +vim.cmd "function! TbTabClose(a,b,c,d) \n lua require('core.utils').closeAllBufs('closeTab') \n endfunction" +vim.cmd "function! TbCloseAllBufs(a,b,c,d) \n lua require('core.utils').closeAllBufs() \n endfunction" vim.cmd "function! TbToggle_theme(a,b,c,d) \n lua require('base46').toggle_theme() \n endfunction" vim.cmd "function! TbToggleTabs(a,b,c,d) \n let g:TbTabsToggled = !g:TbTabsToggled | redrawtabline \n endfunction" @@ -38,7 +39,10 @@ local function new_hl(group1, group2) return "%#" .. "Tbline" .. group1 .. group2 .. "#" end -local function Offset() +local M = {} + +-- covers area of nvimtree on tabufline +M.Offset = function() for _, win in pairs(api.nvim_tabpage_list_wins(0)) do if vim.bo[api.nvim_win_get_buf(win)].ft == "NvimTree" then return "%#NvimTreeNormal#" .. string.rep(" ", api.nvim_win_get_width(win) + 1) @@ -70,7 +74,7 @@ local function add_fileInfo(name, bufnr) end end -local function bufferlist() +M.bufferlist = function() local buffers = "" for _, nr in ipairs(vim.t.bufs or {}) do -- buf = bufnr @@ -99,7 +103,7 @@ end vim.g.TbTabsToggled = 0 -local function tablist() +M.tablist = function() local result, number_of_tabs = "", fn.tabpagenr "$" if number_of_tabs > 1 then @@ -119,12 +123,16 @@ local function tablist() end end -local function buttons() - return "%@TbToggle_theme@%#TbLineThemeToggleBtn#" .. vim.g.toggle_theme_icon .. "%X" +M.buttons = function() + local toggle_themeBtn = "%@TbToggle_theme@%#TbLineThemeToggleBtn#" .. vim.g.toggle_theme_icon .. "%X" + local CloseAllBufsBtn = "%@TbCloseAllBufs@%#TbLineCloseAllBufsBtn#" .. "  " .. "%X" + return toggle_themeBtn .. CloseAllBufsBtn end -return { - run = function() - return (Offset() or "") .. bufferlist() .. (tablist() or "") .. buttons() - end, -} +M.run = function() + return (M.Offset() or "") .. M.bufferlist() .. (M.tablist() or "") .. M.buttons() +end + +M = vim.tbl_deep_extend("force", M, require("core.utils").load_config().ui.tabufline.override) + +return M From dbb34399828eef32cc65d9dcad3c41119a5e9d65 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 27 Jun 2022 19:15:28 +0530 Subject: [PATCH 1156/1541] fix tabufline not showing multiple files on startup | fix #1277 --- lua/ui/tabline.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/ui/tabline.lua b/lua/ui/tabline.lua index d4505af..49ce0a7 100644 --- a/lua/ui/tabline.lua +++ b/lua/ui/tabline.lua @@ -78,7 +78,7 @@ M.bufferlist = function() local buffers = "" for _, nr in ipairs(vim.t.bufs or {}) do -- buf = bufnr - if api.nvim_buf_is_loaded(nr) then + if api.nvim_buf_is_valid(nr) then local name = (#api.nvim_buf_get_name(nr) ~= 0) and fn.fnamemodify(api.nvim_buf_get_name(nr), ":t") or " No Name " local close_btn = "%" .. nr .. "@TbKillBuf@ %X" From 73cfdd7367d98003246eb05d09edf414828288a7 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 27 Jun 2022 20:11:20 +0530 Subject: [PATCH 1157/1541] remove buf_loaded check As this causes issues (buf switching i.e tbufbnext/tbufprev) not working properly when nvim is opened with multiple files https://github.com/NvChad/NvChad/commit/dbb34399828eef32cc65d9dcad3c41119a5e9d65#commitcomment-77092312 --- lua/core/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 075f976..6dd1f8c 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -199,7 +199,7 @@ M.bufilter = function() local bufs = vim.t.bufs for i = #bufs, 1, -1 do - if not vim.api.nvim_buf_is_loaded(bufs[i]) then + if not vim.api.nvim_buf_is_valid(bufs[i]) then table.remove(bufs, i) end end From e52ba32fa3e86c009cab0bc8f974f5986b8fa486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=B6hl=2C=20Lukas?= Date: Mon, 27 Jun 2022 16:14:43 +0200 Subject: [PATCH 1158/1541] feat(nvimtree): enable filesystem watchers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Höhl, Lukas --- lua/plugins/configs/nvimtree.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index a557f0a..5a75101 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -32,6 +32,9 @@ local options = { enable = false, ignore = true, }, + filesystem_watchers = { + enable = true, + }, actions = { open_file = { resize_window = true, From aef0a987cca188d046e5f798233306ba9e9159a8 Mon Sep 17 00:00:00 2001 From: McAuley Penney Date: Mon, 27 Jun 2022 08:54:19 -0700 Subject: [PATCH 1159/1541] fix: providers are not disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • problem: providers are incorrectly disabled • why: providers must be disabled by setting their global value to 0, unlike default plugins. • solution: disable built-in providers by setting their values to 0 instead of 1 --- lua/core/options.lua | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index 3b12fec..5a49d26 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -74,11 +74,6 @@ local default_plugins = { "vimballPlugin", "zip", "zipPlugin", - "python3_provider", - "python_provider", - "node_provider", - "ruby_provider", - "perl_provider", "tutor", "rplugin", "syntax", @@ -93,6 +88,18 @@ for _, plugin in pairs(default_plugins) do g["loaded_" .. plugin] = 1 end +local default_providers = { + "node", + "perl", + "python", + "python3", + "ruby", +} + +for _, provider in ipairs(default_providers) do + vim.g["loaded_" .. provider .. "_provider"] = 0 +end + -- set shada path vim.schedule(function() vim.opt.shadafile = vim.fn.expand "$HOME" .. "/.local/share/nvim/shada/main.shada" From 9ccc95ea6c65440dc4e75508b9f3ac93a22240e3 Mon Sep 17 00:00:00 2001 From: McAuley Penney Date: Mon, 27 Jun 2022 09:21:19 -0700 Subject: [PATCH 1160/1541] refactor: remove python2 provider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • since neovim/neovim@baec0d3152afeab3007ebb505f3fc274511db434 python2 support has been removed. The Python provider for Python2 no longer exists on v0.7 and newer --- lua/core/options.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index 5a49d26..9df3027 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -91,7 +91,6 @@ end local default_providers = { "node", "perl", - "python", "python3", "ruby", } From 5a3fcd7326359b8e4f0b2db79a5a577ac6f26530 Mon Sep 17 00:00:00 2001 From: Manas Mengle Date: Mon, 27 Jun 2022 15:58:14 +0100 Subject: [PATCH 1161/1541] feat(luasnip): added snippet_paths option for luasnip --- lua/core/default_config.lua | 3 +++ lua/plugins/configs/others.lua | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 98ecbb6..ba5fb91 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -43,6 +43,9 @@ M.plugins = { lspconfig = { setup_lspconf = "", -- path of lspconfig file }, + luasnip = { + snippet_paths = {""}, -- list of custom snippet locations + }, }, } diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 161b097..ee1b719 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -1,6 +1,7 @@ local M = {} local load_override = require("core.utils").load_override +local load_config = require("core.utils").load_config M.autopairs = function() local present1, autopairs = pcall(require, "nvim-autopairs") @@ -112,7 +113,8 @@ M.luasnip = function() options = load_override(options, "L3MON4D3/LuaSnip") luasnip.config.set_config(options) - require("luasnip.loaders.from_vscode").lazy_load() + snippet_paths = load_config().plugins.options.luasnip.snippet_paths + require("luasnip.loaders.from_vscode").lazy_load({ paths = snippet_paths }) vim.api.nvim_create_autocmd("InsertLeave", { callback = function() From 34628a17892ce93605feece05e0d840987e0e7c1 Mon Sep 17 00:00:00 2001 From: Manas Mengle Date: Mon, 27 Jun 2022 16:19:11 +0100 Subject: [PATCH 1162/1541] fix(luasnip): make sure friendly-snippets are loaded too --- lua/plugins/configs/others.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index ee1b719..b78bde5 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -114,6 +114,7 @@ M.luasnip = function() options = load_override(options, "L3MON4D3/LuaSnip") luasnip.config.set_config(options) snippet_paths = load_config().plugins.options.luasnip.snippet_paths + require("luasnip.loaders.from_vscode").lazy_load() require("luasnip.loaders.from_vscode").lazy_load({ paths = snippet_paths }) vim.api.nvim_create_autocmd("InsertLeave", { From ce2a5d8596977da9be1c899b99e603f7c40b868c Mon Sep 17 00:00:00 2001 From: Manas Mengle Date: Mon, 27 Jun 2022 16:25:47 +0100 Subject: [PATCH 1163/1541] fix(luasnip): switch to using global variables --- lua/core/default_config.lua | 3 --- lua/plugins/configs/others.lua | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index ba5fb91..98ecbb6 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -43,9 +43,6 @@ M.plugins = { lspconfig = { setup_lspconf = "", -- path of lspconfig file }, - luasnip = { - snippet_paths = {""}, -- list of custom snippet locations - }, }, } diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index b78bde5..a78c71e 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -1,7 +1,6 @@ local M = {} local load_override = require("core.utils").load_override -local load_config = require("core.utils").load_config M.autopairs = function() local present1, autopairs = pcall(require, "nvim-autopairs") @@ -113,9 +112,8 @@ M.luasnip = function() options = load_override(options, "L3MON4D3/LuaSnip") luasnip.config.set_config(options) - snippet_paths = load_config().plugins.options.luasnip.snippet_paths require("luasnip.loaders.from_vscode").lazy_load() - require("luasnip.loaders.from_vscode").lazy_load({ paths = snippet_paths }) + require("luasnip.loaders.from_vscode").lazy_load({ paths = vim.g.luasnippets_path or "" }) vim.api.nvim_create_autocmd("InsertLeave", { callback = function() From 5b24c94a60d0caca68072ee6c31af7a04f4f297d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Mon, 27 Jun 2022 22:56:05 +0200 Subject: [PATCH 1164/1541] docs: fix broken links in README.md --- .github/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/README.md b/.github/README.md index c49cc01..ae61616 100644 --- a/.github/README.md +++ b/.github/README.md @@ -3,13 +3,13 @@ From f5b6a67ebbb0ca944e94ef7a5cac5b9df6b2201b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Mon, 27 Jun 2022 22:56:40 +0200 Subject: [PATCH 1165/1541] Update README.md --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index ae61616..cbd6b83 100644 --- a/.github/README.md +++ b/.github/README.md @@ -9,7 +9,7 @@ Support - Features + Features

From 6ff356ae932a16df38ac50b7ef4301055f7a8842 Mon Sep 17 00:00:00 2001 From: tomasky Date: Tue, 28 Jun 2022 12:33:34 +0800 Subject: [PATCH 1166/1541] fix: let override function works,fix #1287 #1278 --- lua/core/utils.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 6dd1f8c..2b3fea0 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -149,7 +149,8 @@ M.load_override = function(default_table, plugin_name) if type(user_table) == "function" then user_table = user_table() - elseif type(user_table) == "table" then + end + if type(user_table) == "table" then default_table = merge_tb("force", default_table, user_table) else default_table = default_table From 519a2df1a0b02a698e59655b9c992d3bf6dc1686 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 28 Jun 2022 11:11:11 +0530 Subject: [PATCH 1167/1541] clean up --- lua/core/utils.lua | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 2b3fea0..92e5100 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -144,19 +144,12 @@ M.merge_plugins = function(default_plugins) return final_table end + M.load_override = function(default_table, plugin_name) - local user_table = M.load_config().plugins.override[plugin_name] + local user_table = M.load_config().plugins.override[plugin_name] or {} + user_table = type(user_table) == "table" and user_table or user_table() - if type(user_table) == "function" then - user_table = user_table() - end - if type(user_table) == "table" then - default_table = merge_tb("force", default_table, user_table) - else - default_table = default_table - end - - return default_table + return user_table and merge_tb("force", default_table, user_table) end M.packer_sync = function(...) From ae77406a6446e6989c5a4ecb020d3a48036fde51 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 28 Jun 2022 20:09:02 +0530 Subject: [PATCH 1168/1541] fix #1276 --- lua/core/utils.lua | 35 +++++++++++++++-------------------- lua/ui/tabline.lua | 35 ++++++++++++++++++++++------------- 2 files changed, 37 insertions(+), 33 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 92e5100..45ae3e0 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -5,24 +5,14 @@ local merge_tb = vim.tbl_deep_extend M.close_buffer = function(bufnr) if vim.bo.buftype == "terminal" then - if vim.bo.buflisted then - vim.bo.buflisted = false - vim.cmd "enew" - else - vim.cmd "hide" - end - return + vim.cmd(vim.bo.buflisted and "set nobl | enew" or "hide") + elseif vim.bo.modified then + print "save the file bruh" + else + bufnr = bufnr or api.nvim_get_current_buf() + require("core.utils").tabuflinePrev() + vim.cmd("bd" .. bufnr) end - - -- if file doesnt exist & its modified - if vim.bo.modified then - print "save the file!" - return - end - - bufnr = bufnr or api.nvim_get_current_buf() - require("core.utils").tabuflinePrev() - vim.cmd("bd" .. bufnr) end M.load_config = function() @@ -144,7 +134,6 @@ M.merge_plugins = function(default_plugins) return final_table end - M.load_override = function(default_table, plugin_name) local user_table = M.load_config().plugins.override[plugin_name] or {} user_table = type(user_table) == "table" and user_table or user_table() @@ -225,13 +214,19 @@ end -- closes tab + all of its buffers M.closeAllBufs = function(action) - local bufs = vim.t.bufs or {} + local bufs = vim.t.bufs + + if action == "closeTab" then + vim.cmd "tabclose" + end for _, buf in ipairs(bufs) do M.close_buffer(buf) end - vim.cmd(action == "closeTab" and "tabclose" or "enew") + if action ~= "closeTab" then + vim.cmd "enew" + end end return M diff --git a/lua/ui/tabline.lua b/lua/ui/tabline.lua index 49ce0a7..0307bbc 100644 --- a/lua/ui/tabline.lua +++ b/lua/ui/tabline.lua @@ -39,15 +39,20 @@ local function new_hl(group1, group2) return "%#" .. "Tbline" .. group1 .. group2 .. "#" end +local function getNvimTreeWidth() + for _, win in pairs(api.nvim_tabpage_list_wins(0)) do + if vim.bo[api.nvim_win_get_buf(win)].ft == "NvimTree" then + return api.nvim_win_get_width(win) + 1 + end + end + return 0 +end + local M = {} -- covers area of nvimtree on tabufline -M.Offset = function() - for _, win in pairs(api.nvim_tabpage_list_wins(0)) do - if vim.bo[api.nvim_win_get_buf(win)].ft == "NvimTree" then - return "%#NvimTreeNormal#" .. string.rep(" ", api.nvim_win_get_width(win) + 1) - end - end +M.NvimTreeOffset = function() + return "%#NvimTreeNormal#" .. string.rep(" ", getNvimTreeWidth()) end local function add_fileInfo(name, bufnr) @@ -66,7 +71,7 @@ local function add_fileInfo(name, bufnr) or new_hl(icon_hl, "TbLineBufOff") .. " " .. icon ) - name = (#name > 20 and string.sub(name, 1, 15) .. "...") or name + name = (#name > 15 and string.sub(name, 1, 13) .. "..") or name name = (api.nvim_get_current_buf() == bufnr and "%#TbLineBufOn# " .. name .. " ") or ("%#TbLineBufOff# " .. name .. " ") @@ -77,24 +82,28 @@ end M.bufferlist = function() local buffers = "" - for _, nr in ipairs(vim.t.bufs or {}) do -- buf = bufnr + for index, nr in ipairs(vim.t.bufs or {}) do -- buf = bufnr if api.nvim_buf_is_valid(nr) then + local close_btn = "%" .. nr .. "@TbKillBuf@ %X" local name = (#api.nvim_buf_get_name(nr) ~= 0) and fn.fnamemodify(api.nvim_buf_get_name(nr), ":t") or " No Name " - local close_btn = "%" .. nr .. "@TbKillBuf@ %X" + name = "%" .. nr .. "@TbGoToBuf@" .. add_fileInfo(name, nr) .. "%X" -- color close btn for focused / hidden buffers if nr == api.nvim_get_current_buf() then - close_btn = (vim.bo[0].modified and "%#TbLineBufOnModified# ") or ("%#TbLineBufOnClose#" .. close_btn) + close_btn = (vim.bo[0].modified and "%" .. nr .. "@TbKillBuf@%#TbLineBufOnModified# ") + or ("%#TbLineBufOnClose#" .. close_btn) name = "%#TbLineBufOn#" .. name .. close_btn else - close_btn = (vim.bo[nr].modified and "%#TbBufLineBufOffModified# ") + close_btn = (vim.bo[nr].modified and "%" .. nr .. "@TbKillBuf@%#TbBufLineBufOffModified# ") or ("%#TbLineBufOffClose#" .. close_btn) name = "%#TbLineBufOff#" .. name .. close_btn end - buffers = buffers .. name + -- 1 buffer tab = 21 whitespaces + buffers = (21 * index + getNvimTreeWidth() < vim.o.columns - getNvimTreeWidth()) and buffers .. name + or buffers .. "" end end @@ -130,7 +139,7 @@ M.buttons = function() end M.run = function() - return (M.Offset() or "") .. M.bufferlist() .. (M.tablist() or "") .. M.buttons() + return M.NvimTreeOffset() .. M.bufferlist() .. (M.tablist() or "") .. M.buttons() end M = vim.tbl_deep_extend("force", M, require("core.utils").load_config().ui.tabufline.override) From d4c71e14729fb35e2e9b5b9931a3f95f4e38d835 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 29 Jun 2022 10:17:28 +0530 Subject: [PATCH 1169/1541] fix hidden buffer tabs not showing in tabufline with less space credits to @ii14 for helping me fix this issue --- lua/core/utils.lua | 3 +- lua/ui/tabline.lua | 94 ++++++++++++++++++++++++++++------------------ 2 files changed, 59 insertions(+), 38 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 45ae3e0..6a57d26 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -137,8 +137,7 @@ end M.load_override = function(default_table, plugin_name) local user_table = M.load_config().plugins.override[plugin_name] or {} user_table = type(user_table) == "table" and user_table or user_table() - - return user_table and merge_tb("force", default_table, user_table) + return merge_tb("force", default_table, user_table) end M.packer_sync = function(...) diff --git a/lua/ui/tabline.lua b/lua/ui/tabline.lua index 0307bbc..ec68b6c 100644 --- a/lua/ui/tabline.lua +++ b/lua/ui/tabline.lua @@ -1,7 +1,12 @@ -require("base46").load_highlight "tbline" local api = vim.api +local devicons_present, devicons = pcall(require, "nvim-web-devicons") +local fn = vim.fn +local new_cmd = api.nvim_create_user_command + +require("base46").load_highlight "tbline" + +---------------------------------------------------------- btn onclick functions ---------------------------------------------- --- btn click functions vim.cmd "function! TbGoToBuf(bufnr,b,c,d) \n execute 'b'..a:bufnr \n endfunction" vim.cmd [[ @@ -16,10 +21,7 @@ vim.cmd "function! TbCloseAllBufs(a,b,c,d) \n lua require('core.utils').closeAll vim.cmd "function! TbToggle_theme(a,b,c,d) \n lua require('base46').toggle_theme() \n endfunction" vim.cmd "function! TbToggleTabs(a,b,c,d) \n let g:TbTabsToggled = !g:TbTabsToggled | redrawtabline \n endfunction" -local devicons_present, devicons = pcall(require, "nvim-web-devicons") -local fn = vim.fn -local new_cmd = api.nvim_create_user_command - +---------------------------------------------------------- commands ------------------------------------------------------------ new_cmd("Tbufnext", function() require("core.utils").tabuflineNext() end, {}) @@ -32,6 +34,7 @@ new_cmd("Tbufclose", function() require("core.utils").close_buffer() end, {}) +-------------------------------------------------------- functions ------------------------------------------------------------ local function new_hl(group1, group2) local fg = fn.synIDattr(fn.synIDtrans(fn.hlID(group1)), "fg#") local bg = fn.synIDattr(fn.synIDtrans(fn.hlID(group2)), "bg#") @@ -48,11 +51,13 @@ local function getNvimTreeWidth() return 0 end -local M = {} - --- covers area of nvimtree on tabufline -M.NvimTreeOffset = function() - return "%#NvimTreeNormal#" .. string.rep(" ", getNvimTreeWidth()) +local function getBtnsWidth() + local width = 6 + if fn.tabpagenr "$" ~= 1 then + width = width + ((3 * fn.tabpagenr "$") + 2) + 10 + width = not vim.g.TbTabsToggled and 8 or width + end + return width end local function add_fileInfo(name, bufnr) @@ -79,35 +84,54 @@ local function add_fileInfo(name, bufnr) end end +local function styleBufferTab(nr) + local close_btn = "%" .. nr .. "@TbKillBuf@ %X" + local name = (#api.nvim_buf_get_name(nr) ~= 0) and fn.fnamemodify(api.nvim_buf_get_name(nr), ":t") or " No Name " + name = "%" .. nr .. "@TbGoToBuf@" .. add_fileInfo(name, nr) .. "%X" + + -- color close btn for focused / hidden buffers + if nr == api.nvim_get_current_buf() then + close_btn = (vim.bo[0].modified and "%" .. nr .. "@TbKillBuf@%#TbLineBufOnModified# ") + or ("%#TbLineBufOnClose#" .. close_btn) + name = "%#TbLineBufOn#" .. name .. close_btn + else + close_btn = (vim.bo[nr].modified and "%" .. nr .. "@TbKillBuf@%#TbBufLineBufOffModified# ") + or ("%#TbLineBufOffClose#" .. close_btn) + name = "%#TbLineBufOff#" .. name .. close_btn + end + + return name +end + +---------------------------------------------------------- components ------------------------------------------------------------ +local M = {} + +M.CoverNvimTree = function() + return "%#NvimTreeNormal#" .. string.rep(" ", getNvimTreeWidth()) +end + M.bufferlist = function() - local buffers = "" + local buffers = {} -- buffersults + local available_space = vim.o.columns - getNvimTreeWidth() - getBtnsWidth() + local current_buf = api.nvim_get_current_buf() + local has_current = false -- have we seen current buffer yet? - for index, nr in ipairs(vim.t.bufs or {}) do -- buf = bufnr - if api.nvim_buf_is_valid(nr) then - local close_btn = "%" .. nr .. "@TbKillBuf@ %X" - local name = (#api.nvim_buf_get_name(nr) ~= 0) and fn.fnamemodify(api.nvim_buf_get_name(nr), ":t") - or " No Name " + for _, bufnr in ipairs(vim.t.bufs) do + if api.nvim_buf_is_valid(bufnr) then + if ((#buffers + 1) * 21) > available_space then + if has_current then + break + end - name = "%" .. nr .. "@TbGoToBuf@" .. add_fileInfo(name, nr) .. "%X" - - -- color close btn for focused / hidden buffers - if nr == api.nvim_get_current_buf() then - close_btn = (vim.bo[0].modified and "%" .. nr .. "@TbKillBuf@%#TbLineBufOnModified# ") - or ("%#TbLineBufOnClose#" .. close_btn) - name = "%#TbLineBufOn#" .. name .. close_btn - else - close_btn = (vim.bo[nr].modified and "%" .. nr .. "@TbKillBuf@%#TbBufLineBufOffModified# ") - or ("%#TbLineBufOffClose#" .. close_btn) - name = "%#TbLineBufOff#" .. name .. close_btn + table.remove(buffers, 1) end - -- 1 buffer tab = 21 whitespaces - buffers = (21 * index + getNvimTreeWidth() < vim.o.columns - getNvimTreeWidth()) and buffers .. name - or buffers .. "" + has_current = (bufnr == current_buf and true) or has_current + table.insert(buffers, styleBufferTab(bufnr)) end end - return buffers .. "%#TblineFill#" .. "%=" -- buffers + empty space + return table.concat(buffers) .. "%#TblineFill#" .. "%=" -- buffers + empty space end vim.g.TbTabsToggled = 0 @@ -125,10 +149,8 @@ M.tablist = function() local new_tabtn = "%#TblineTabNewBtn#" .. "%@TbNewTab@  %X" local tabstoggleBtn = "%@TbToggleTabs@ %#TBTabTitle# TABS %X" - result = (vim.g.TbTabsToggled == 1 and tabstoggleBtn:gsub("()", { [36] = " " })) + return vim.g.TbTabsToggled == 1 and tabstoggleBtn:gsub("()", { [36] = " " }) or new_tabtn .. tabstoggleBtn .. result - - return result end end @@ -139,7 +161,7 @@ M.buttons = function() end M.run = function() - return M.NvimTreeOffset() .. M.bufferlist() .. (M.tablist() or "") .. M.buttons() + return M.CoverNvimTree() .. M.bufferlist() .. (M.tablist() or "") .. M.buttons() end M = vim.tbl_deep_extend("force", M, require("core.utils").load_config().ui.tabufline.override) From 7654a1fc8c77780753a222c2bd1fb850fa789eab Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 1 Jul 2022 06:27:40 +0530 Subject: [PATCH 1170/1541] allow showing of buffer in a different tab if its already opened in another tab #1297 --- lua/core/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index f9c364e..7e98731 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -39,7 +39,7 @@ autocmd("BufEnter", { vim.t.bufs = vim.api.nvim_list_bufs() -- thx to https://github.com/ii14 & stores buffer per tab -> table -autocmd("BufAdd", { +autocmd({ "BufAdd", "BufEnter" }, { callback = function(args) if vim.t.bufs == nil then vim.t.bufs = { args.buf } @@ -47,7 +47,7 @@ autocmd("BufAdd", { local bufs = vim.t.bufs -- check for duplicates - if not vim.tbl_contains(bufs, args.buf) then + if not vim.tbl_contains(bufs, args.buf) and (args.event == "BufAdd" or vim.bo[args.buf].buflisted) then table.insert(bufs, args.buf) vim.t.bufs = bufs end From d0cd5714a2746b90eb62a914dfd5b87edf0671b3 Mon Sep 17 00:00:00 2001 From: sitiom Date: Sat, 2 Jul 2022 19:24:37 +0800 Subject: [PATCH 1171/1541] Update stylua option: `no_call_parentheses` -> `call_parentheses` --- .stylua.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stylua.toml b/.stylua.toml index e9bf648..f4c1cee 100644 --- a/.stylua.toml +++ b/.stylua.toml @@ -3,4 +3,4 @@ line_endings = "Unix" indent_type = "Spaces" indent_width = 3 quote_style = "AutoPreferDouble" -no_call_parentheses = true +call_parentheses = "None" From cd5d85a11b5eecaf12d9a9f420e8924ed6a214d7 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 4 Jul 2022 07:09:38 +0530 Subject: [PATCH 1172/1541] modularize statusline config | Make overriding of it actually work (#1307) --- lua/core/default_config.lua | 2 +- lua/ui/statusline/init.lua | 19 +++++++++++++++++++ .../modules.lua} | 19 ------------------- 3 files changed, 20 insertions(+), 20 deletions(-) create mode 100644 lua/ui/statusline/init.lua rename lua/ui/{statusline.lua => statusline/modules.lua} (93%) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 98ecbb6..3659f9a 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -23,7 +23,7 @@ M.ui = { statusline = { separator_style = "default", -- default/round/block/arrow - config = "%!v:lua.require('ui.statusline').run()", + config = "%!v:lua.require('ui.statusline')", override = {}, }, diff --git a/lua/ui/statusline/init.lua b/lua/ui/statusline/init.lua new file mode 100644 index 0000000..9b73c09 --- /dev/null +++ b/lua/ui/statusline/init.lua @@ -0,0 +1,19 @@ +local modules = require "ui.statusline.modules" + +local user_override = require("core.utils").load_config().ui.statusline.override +modules = vim.tbl_deep_extend("force", modules, user_override) + +return table.concat { + modules.mode(), + modules.fileInfo(), + modules.git(), + + "%=", + modules.LSP_progress(), + "%=", + + modules.LSP_Diagnostics(), + modules.LSP_status() or "", + modules.cwd(), + modules.cursor_position(), +} diff --git a/lua/ui/statusline.lua b/lua/ui/statusline/modules.lua similarity index 93% rename from lua/ui/statusline.lua rename to lua/ui/statusline/modules.lua index df52cb9..3b1f517 100644 --- a/lua/ui/statusline.lua +++ b/lua/ui/statusline/modules.lua @@ -135,23 +135,4 @@ M.cursor_position = function() return left_sep .. "%#St_pos_text#" .. " " .. text .. " " end -M.run = function() - return table.concat { - M.mode(), - M.fileInfo(), - M.git(), - - "%=", - M.LSP_progress(), - "%=", - - M.LSP_Diagnostics(), - M.LSP_status() or "", - M.cwd(), - M.cursor_position(), - } -end - -M = vim.tbl_deep_extend("force", M, require("core.utils").load_config().ui.statusline.override) - return M From c19398b3f6254626b866e7e7217357d7cbf8499c Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 4 Jul 2022 11:51:43 +0530 Subject: [PATCH 1173/1541] fix #1309 --- lua/core/default_config.lua | 2 +- lua/ui/statusline/init.lua | 27 +++++++++++++++------------ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 3659f9a..98ecbb6 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -23,7 +23,7 @@ M.ui = { statusline = { separator_style = "default", -- default/round/block/arrow - config = "%!v:lua.require('ui.statusline')", + config = "%!v:lua.require('ui.statusline').run()", override = {}, }, diff --git a/lua/ui/statusline/init.lua b/lua/ui/statusline/init.lua index 9b73c09..76c9416 100644 --- a/lua/ui/statusline/init.lua +++ b/lua/ui/statusline/init.lua @@ -1,19 +1,22 @@ local modules = require "ui.statusline.modules" - local user_override = require("core.utils").load_config().ui.statusline.override modules = vim.tbl_deep_extend("force", modules, user_override) -return table.concat { - modules.mode(), - modules.fileInfo(), - modules.git(), +return { + run = function() + return table.concat { + modules.mode(), + modules.fileInfo(), + modules.git(), - "%=", - modules.LSP_progress(), - "%=", + "%=", + modules.LSP_progress(), + "%=", - modules.LSP_Diagnostics(), - modules.LSP_status() or "", - modules.cwd(), - modules.cursor_position(), + modules.LSP_Diagnostics(), + modules.LSP_status() or "", + modules.cwd(), + modules.cursor_position(), + } + end, } From 71f30f72c0c8338ff842026ca017a8d9f794383c Mon Sep 17 00:00:00 2001 From: Maximiliano Curia Date: Mon, 4 Jul 2022 18:02:08 +0200 Subject: [PATCH 1174/1541] signatureHelp: don't capture focus --- lua/ui/lsp.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/ui/lsp.lua b/lua/ui/lsp.lua index 798b051..cb7b67f 100644 --- a/lua/ui/lsp.lua +++ b/lua/ui/lsp.lua @@ -22,6 +22,8 @@ vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { }) vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "single", + focusable = false, + relative = "cursor", }) -- suppress error messages from lang servers From 1500ff15169d8ea9c8d675ef327df86b1c2acfb9 Mon Sep 17 00:00:00 2001 From: Thieu Nguyen Date: Wed, 6 Jul 2022 10:23:37 +0700 Subject: [PATCH 1175/1541] enhancement: update lsp syntax to support both stable and nightly --- lua/plugins/configs/lspconfig.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 9a62a3e..e548525 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -12,8 +12,17 @@ local utils = require "core.utils" require "ui.lsp" M.on_attach = function(client, bufnr) - client.resolved_capabilities.document_formatting = false - client.resolved_capabilities.document_range_formatting = false + local vim_version = vim.version() + + if vim_version.minor > 7 then + -- nightly + client.server_capabilities.documentFormattingProvider = false + client.server_capabilities.documentRangeFormattingProvider = false + else + -- stable + client.resolved_capabilities.document_formatting = false + client.resolved_capabilities.document_range_formatting = false + end local lsp_mappings = utils.load_config().mappings.lspconfig utils.load_mappings({ lsp_mappings }, { buffer = bufnr }) From 86b3b6e96bad85727378a5849e89d2f65afe3cc7 Mon Sep 17 00:00:00 2001 From: Sidhanth Rathod Date: Fri, 8 Jul 2022 19:20:57 +0530 Subject: [PATCH 1176/1541] Dont list quickfix buffers #1310 --- lua/core/init.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/core/init.lua b/lua/core/init.lua index 7e98731..6ba95e8 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -8,6 +8,14 @@ vim.cmd "silent! command! NvChadSnapshotCheckout lua require('nvchad').snap_chec local autocmd = vim.api.nvim_create_autocmd local api = vim.api +-- dont list quickfix buffers +autocmd("FileType", { + pattern = "qf", + callback = function() + vim.opt_local.buflisted = false + end, +}) + -- wrap the PackerSync command to warn people before using it in NvChadSnapshots autocmd("VimEnter", { callback = function() From 5339bc42aef13fad87af7e29c1bb29f522b2c056 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 12 Jul 2022 21:54:25 +0530 Subject: [PATCH 1177/1541] clean stuff remove vim tsparser as it is adviced to have 100% lua config and vim.cmd adds a lil overhead as compared to native vim api functions, increase shiftwidth as it looks better --- lua/core/options.lua | 2 +- lua/core/utils.lua | 22 ++++++++-------------- lua/plugins/configs/treesitter.lua | 1 - 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index 9df3027..32cf12d 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -21,7 +21,7 @@ opt.cul = true -- cursor line -- Indenting opt.expandtab = true -opt.shiftwidth = 2 +opt.shiftwidth = 3 opt.smartindent = true opt.fillchars = { eob = " " } diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 6a57d26..ba3f8bf 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -66,15 +66,15 @@ end M.load_mappings = function(mappings, mapping_opt) -- set mapping function with/without whichkey - local map_func + local set_maps local whichkey_exists, wk = pcall(require, "which-key") if whichkey_exists then - map_func = function(keybind, mapping_info, opts) + set_maps = function(keybind, mapping_info, opts) wk.register({ [keybind] = mapping_info }, opts) end else - map_func = function(keybind, mapping_info, opts) + set_maps = function(keybind, mapping_info, opts) local mode = opts.mode opts.mode = nil vim.keymap.set(mode, keybind, mapping_info[1], opts) @@ -84,20 +84,15 @@ M.load_mappings = function(mappings, mapping_opt) mappings = mappings or vim.deepcopy(M.load_config().mappings) mappings.lspconfig = nil - for _, section_mappings in pairs(mappings) do - -- skip mapping this as its mapppings are loaded in lspconfig - for mode, mode_mappings in pairs(section_mappings) do - for keybind, mapping_info in pairs(mode_mappings) do + for _, section in pairs(mappings) do + for mode, mode_values in pairs(section) do + for keybind, mapping_info in pairs(mode_values) do -- merge default + user opts - local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) local opts = merge_tb("force", default_opts, mapping_info.opts or {}) + mapping_info.opts = nil - if mapping_info.opts then - mapping_info.opts = nil - end - - map_func(keybind, mapping_info, opts) + set_maps(keybind, mapping_info, opts) end end end @@ -127,7 +122,6 @@ M.merge_plugins = function(default_plugins) for key, _ in pairs(default_plugins) do default_plugins[key][1] = key - final_table[#final_table + 1] = default_plugins[key] end diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index 8c0717f..563c8c6 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -10,7 +10,6 @@ require("base46").load_highlight "treesitter" local options = { ensure_installed = { "lua", - "vim", }, highlight = { enable = true, From 7b683eaf637947fd7543150fdbda6bb53b946054 Mon Sep 17 00:00:00 2001 From: Leon Heidelbach Date: Tue, 12 Jul 2022 18:34:22 +0200 Subject: [PATCH 1178/1541] fix: only access mapping_info.opts field if possible --- lua/core/utils.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index ba3f8bf..f6041bf 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -90,7 +90,10 @@ M.load_mappings = function(mappings, mapping_opt) -- merge default + user opts local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) local opts = merge_tb("force", default_opts, mapping_info.opts or {}) - mapping_info.opts = nil + + if mapping_info.opts then + mapping_info.opts = nil + end set_maps(keybind, mapping_info, opts) end @@ -149,9 +152,9 @@ M.packer_sync = function(...) { "PackerSync" }, { " on a NvChadSnapshot. This will cause issues if NvChad dependencies contain " - .. "any breaking changes! Plugin updates will not be included in this " - .. "snapshot, so they will be lost after switching between snapshots! Would " - .. "you still like to continue? [y/N]\n", + .. "any breaking changes! Plugin updates will not be included in this " + .. "snapshot, so they will be lost after switching between snapshots! Would " + .. "you still like to continue? [y/N]\n", "WarningMsg", }, }, false, {}) From 37b2c53a467b73b49d247b06ef0b9ab8e098d082 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 13 Jul 2022 09:51:20 +0530 Subject: [PATCH 1179/1541] fix diff highlights not working on gitcommit filetypes (#1317) removed indentline char as it moves indentline a lil bit towards right whenever contextstart highlight shows , check https://github.com/lukas-reineke/indent-blankline.nvim/issues/454 --- lua/plugins/configs/others.lua | 1 - lua/plugins/init.lua | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index a78c71e..ade0fde 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -33,7 +33,6 @@ M.blankline = function() local options = { indentLine_enabled = 1, - char = "▏", filetype_exclude = { "help", "terminal", diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index bc3e1bf..2270611 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -64,7 +64,7 @@ local plugins = { -- git stuff ["lewis6991/gitsigns.nvim"] = { - opt = true, + ft = "gitcommit", setup = function() require("core.lazy_load").gitsigns() end, From b9f0e4623e89c0c04bf7da82fd52a667fd7eab96 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 14 Jul 2022 15:37:52 +0530 Subject: [PATCH 1180/1541] mappings: Add back mappings removed in https://github.com/NvChad/NvChad/commit/0844431d37b762c4fa0ff37dba28280848cf3f09 | Format files --- lua/core/mappings.lua | 16 ++++++++++++++++ lua/core/utils.lua | 6 +++--- lua/plugins/configs/nvimtree.lua | 2 +- lua/plugins/configs/others.lua | 2 +- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 5638d38..8accde7 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -7,6 +7,16 @@ end local M = {} M.general = { + [""] = { + -- Allow moving the cursor through wrapped lines with j, k, and + -- http ://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ + -- empty mode is same as using :map + -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, + ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, + }, i = { @@ -56,6 +66,12 @@ M.general = { t = { [""] = { termcodes "", " escape terminal mode" }, }, + + v = { + -- Don't copy the replaced text after pasting in visual mode + -- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste + ["p"] = { 'p:let @+=@0:let @"=@0', opts = { silent = true } }, + }, } M.tabufline = { diff --git a/lua/core/utils.lua b/lua/core/utils.lua index f6041bf..131369c 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -152,9 +152,9 @@ M.packer_sync = function(...) { "PackerSync" }, { " on a NvChadSnapshot. This will cause issues if NvChad dependencies contain " - .. "any breaking changes! Plugin updates will not be included in this " - .. "snapshot, so they will be lost after switching between snapshots! Would " - .. "you still like to continue? [y/N]\n", + .. "any breaking changes! Plugin updates will not be included in this " + .. "snapshot, so they will be lost after switching between snapshots! Would " + .. "you still like to continue? [y/N]\n", "WarningMsg", }, }, false, {}) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 5a75101..d579238 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -34,7 +34,7 @@ local options = { }, filesystem_watchers = { enable = true, - }, + }, actions = { open_file = { resize_window = true, diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index ade0fde..2b437c0 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -112,7 +112,7 @@ M.luasnip = function() options = load_override(options, "L3MON4D3/LuaSnip") luasnip.config.set_config(options) require("luasnip.loaders.from_vscode").lazy_load() - require("luasnip.loaders.from_vscode").lazy_load({ paths = vim.g.luasnippets_path or "" }) + require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.luasnippets_path or "" } vim.api.nvim_create_autocmd("InsertLeave", { callback = function() From fb9a7b9206b952270b4c271d492bbeb2604fb743 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 14 Jul 2022 17:42:00 +0530 Subject: [PATCH 1181/1541] add nvchad ui plugin --- lua/core/mappings.lua | 2 +- lua/plugins/configs/lspconfig.lua | 2 +- lua/plugins/init.lua | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 8accde7..6650f7e 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -167,7 +167,7 @@ M.lspconfig = { ["ra"] = { function() - require("nvchad.ui.renamer").open() + require("nvchad_ui.renamer").open() end, " lsp rename", }, diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index e548525..81a69de 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -28,7 +28,7 @@ M.on_attach = function(client, bufnr) utils.load_mappings({ lsp_mappings }, { buffer = bufnr }) if client.server_capabilities.signatureHelpProvider then - require("nvchad.ui.signature").setup(client) + require("nvchad_ui.signature").setup(client) end end diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 2270611..194bb5e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -16,6 +16,8 @@ local plugins = { end, }, + ["Nvchad/ui"] = {}, + ["NvChad/nvterm"] = { module = "nvterm", config = function() From fa68c6645412f1c6acf987f2ccc46b32a3733bee Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 14 Jul 2022 23:13:49 +0530 Subject: [PATCH 1182/1541] mappings: Do not use j,k mappings in operator mode --- lua/core/mappings.lua | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 6650f7e..5ad223f 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -7,17 +7,6 @@ end local M = {} M.general = { - [""] = { - -- Allow moving the cursor through wrapped lines with j, k, and - -- http ://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ - -- empty mode is same as using :map - -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour - ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, - ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, - [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, - [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, - }, - i = { -- go to beginning and end @@ -61,6 +50,15 @@ M.general = { " toggle theme", }, + + -- Allow moving the cursor through wrapped lines with j, k, and + -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ + -- empty mode is same as using :map + -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, + ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, }, t = { @@ -68,6 +66,10 @@ M.general = { }, v = { + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, + ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, -- Don't copy the replaced text after pasting in visual mode -- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste ["p"] = { 'p:let @+=@0:let @"=@0', opts = { silent = true } }, From 74f2efca9f9f4c9a8228cfb86ff2649f4600da86 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 15 Jul 2022 09:37:12 +0530 Subject: [PATCH 1183/1541] BREAKING Change for statusline_separator & tabufline overriders moved statusline & tabufline into a new plugin to keep the base config clean and fix issues like (#1307) --- lua/core/default_config.lua | 13 -- lua/core/init.lua | 11 +- lua/core/lazy_load.lua | 16 +-- lua/core/options.lua | 1 - lua/plugins/configs/cmp.lua | 2 +- lua/plugins/configs/lspconfig.lua | 3 +- lua/plugins/configs/nvchad_ui.lua | 40 ++++++ lua/plugins/configs/others.lua | 2 +- lua/plugins/init.lua | 7 +- lua/ui/icons.lua | 207 ------------------------------ lua/ui/lsp.lua | 49 ------- lua/ui/statusline/init.lua | 22 ---- lua/ui/statusline/modules.lua | 138 -------------------- lua/ui/tabline.lua | 169 ------------------------ 14 files changed, 53 insertions(+), 627 deletions(-) create mode 100644 lua/plugins/configs/nvchad_ui.lua delete mode 100644 lua/ui/icons.lua delete mode 100644 lua/ui/lsp.lua delete mode 100644 lua/ui/statusline/init.lua delete mode 100644 lua/ui/statusline/modules.lua delete mode 100644 lua/ui/tabline.lua diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 98ecbb6..db0935a 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -20,19 +20,6 @@ M.ui = { theme_toggle = { "onedark", "one_light" }, theme = "onedark", -- default theme transparency = false, - - statusline = { - separator_style = "default", -- default/round/block/arrow - config = "%!v:lua.require('ui.statusline').run()", - override = {}, - }, - - -- lazyload it when there are 1+ buffers - tabufline = { - enabled = true, - lazyload = true, - override = {}, - }, } M.plugins = { diff --git a/lua/core/init.lua b/lua/core/init.lua index 6ba95e8..c9c5a1e 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -44,8 +44,10 @@ autocmd("BufEnter", { command = "set fo-=c fo-=r fo-=o", }) +-- store listed buffers in tab local var vim.t.bufs = vim.api.nvim_list_bufs() +-- autocmds for tabufline -> store bufnrs on bufadd, bufenter events -- thx to https://github.com/ii14 & stores buffer per tab -> table autocmd({ "BufAdd", "BufEnter" }, { callback = function(args) @@ -79,12 +81,3 @@ autocmd("BufDelete", { end end, }) - -local tabufline_opts = require("core.utils").load_config().ui.tabufline - -if tabufline_opts.enabled and tabufline_opts.lazyload then - require("core.lazy_load").tabufline() -elseif tabufline_opts.enabled then - vim.opt.showtabline = 2 - vim.opt.tabline = "%!v:lua.require'ui.tabline'.run()" -end diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index b5458e3..37f1c22 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -1,6 +1,8 @@ local M = {} local autocmd = vim.api.nvim_create_autocmd +-- This must be used for plugins that need to be loaded just after a file +-- ex : treesitter, lspconfig etc M.lazy_load = function(tb) autocmd(tb.events, { pattern = "*", @@ -107,18 +109,4 @@ M.gitsigns = function() }) end -M.tabufline = function() - autocmd({ "BufNewFile", "BufRead", "TabEnter" }, { - pattern = "*", - group = vim.api.nvim_create_augroup("TabuflineLazyLoad", {}), - callback = function() - if #vim.fn.getbufinfo { buflisted = 1 } >= 2 then - vim.opt.showtabline = 2 - vim.opt.tabline = "%!v:lua.require'ui.tabline'.run()" - vim.api.nvim_del_augroup_by_name "TabuflineLazyLoad" - end - end, - }) -end - return M diff --git a/lua/core/options.lua b/lua/core/options.lua index 32cf12d..73e56ef 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -12,7 +12,6 @@ g.did_load_filetypes = 0 g.do_filetype_lua = 1 opt.laststatus = 3 -- global statusline -opt.statusline = config.ui.statusline.config opt.showmode = false opt.title = true diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 3433fdb..2453182 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -47,7 +47,7 @@ local options = { }, formatting = { format = function(_, vim_item) - local icons = require("ui.icons").lspkind + local icons = require("nvchad_ui.icons").lspkind vim_item.kind = string.format("%s %s", icons[vim_item.kind], vim_item.kind) return vim_item end, diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 81a69de..cf5c7d6 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -5,12 +5,11 @@ if not present then end require("base46").load_highlight "lsp" +require "nvchad_ui.lsp" local M = {} local utils = require "core.utils" -require "ui.lsp" - M.on_attach = function(client, bufnr) local vim_version = vim.version() diff --git a/lua/plugins/configs/nvchad_ui.lua b/lua/plugins/configs/nvchad_ui.lua new file mode 100644 index 0000000..d59ff3a --- /dev/null +++ b/lua/plugins/configs/nvchad_ui.lua @@ -0,0 +1,40 @@ +local present, _ = pcall(require, "nvchad_ui") + +if not present then + return +end + +local options = { + + statusline = { + separator_style = "default", -- default/round/block/arrow + overriden_modules = nil, + }, + + -- lazyload it when there are 1+ buffers + tabufline = { + enabled = true, + lazyload = true, + overriden_modules = nil, + }, +} + +options = require("core.utils").load_override(options, "NvChad/ui") + +require "nvchad_ui.tabufline.lazyload"(options.tabufline) + +-- ignore this as it might scare you XD +return { + statusline = function() + return require("nvchad_ui.statusline").setup(options) + end, + + tabufline = function() + return require("nvchad_ui.tabufline").setup(options) + end, + + load_ui_plugins = function() + vim.opt.statusline = "%!v:lua.require('plugins.configs.nvchad_ui').statusline()" + vim.opt.tabline = "%!v:lua.require('plugins.configs.nvchad_ui').tabufline()" + end, +} diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 2b437c0..6f83394 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -155,7 +155,7 @@ M.devicons = function() if present then require("base46").load_highlight "devicons" - local options = { override = require("ui.icons").devicons } + local options = { override = require("nvchad_ui.icons").devicons } options = require("core.utils").load_override(options, "kyazdani42/nvim-web-devicons") devicons.setup(options) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 194bb5e..f8dc1bf 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -16,7 +16,12 @@ local plugins = { end, }, - ["Nvchad/ui"] = {}, + ["NvChad/ui"] = { + after = "base46", + config = function() + require("plugins.configs.nvchad_ui").load_ui_plugins() + end, + }, ["NvChad/nvterm"] = { module = "nvterm", diff --git a/lua/ui/icons.lua b/lua/ui/icons.lua deleted file mode 100644 index ee0b09c..0000000 --- a/lua/ui/icons.lua +++ /dev/null @@ -1,207 +0,0 @@ -local M = {} - -M.lspkind = { - Namespace = "", - Text = " ", - Method = " ", - Function = " ", - Constructor = " ", - Field = "ﰠ ", - Variable = " ", - Class = "ﴯ ", - Interface = " ", - Module = " ", - Property = "ﰠ ", - Unit = "塞 ", - Value = " ", - Enum = " ", - Keyword = " ", - Snippet = " ", - Color = " ", - File = " ", - Reference = " ", - Folder = " ", - EnumMember = " ", - Constant = " ", - Struct = "פּ ", - Event = " ", - Operator = " ", - TypeParameter = " ", - Table = "", - Object = " ", - Tag = "", - Array = "[]", - Boolean = " ", - Number = " ", - Null = "ﳠ", - String = " ", - Calendar = "", - Watch = " ", - Package = "", -} - -M.statusline_separators = { - default = { - left = "", - right = " ", - }, - - round = { - left = "", - right = "", - }, - - block = { - left = "█", - right = "█", - }, - - arrow = { - left = "", - right = "", - }, -} - -M.devicons = { - default_icon = { - icon = "", - name = "Default", - }, - - c = { - icon = "", - name = "c", - }, - - css = { - icon = "", - name = "css", - }, - - deb = { - icon = "", - name = "deb", - }, - - Dockerfile = { - icon = "", - name = "Dockerfile", - }, - - html = { - icon = "", - name = "html", - }, - - jpeg = { - icon = "", - name = "jpeg", - }, - - jpg = { - icon = "", - name = "jpg", - }, - - js = { - icon = "", - name = "js", - }, - - kt = { - icon = "󱈙", - name = "kt", - }, - - lock = { - icon = "", - name = "lock", - }, - - lua = { - icon = "", - name = "lua", - }, - - mp3 = { - icon = "", - name = "mp3", - }, - - mp4 = { - icon = "", - name = "mp4", - }, - - out = { - icon = "", - name = "out", - }, - - png = { - icon = "", - name = "png", - }, - - py = { - icon = "", - name = "py", - }, - - ["robots.txt"] = { - icon = "ﮧ", - name = "robots", - }, - - toml = { - icon = "", - name = "toml", - }, - - ts = { - icon = "ﯤ", - name = "ts", - }, - - ttf = { - icon = "", - name = "TrueTypeFont", - }, - - rb = { - icon = "", - name = "rb", - }, - - rpm = { - icon = "", - name = "rpm", - }, - - vue = { - icon = "﵂", - name = "vue", - }, - - woff = { - icon = "", - name = "WebOpenFontFormat", - }, - - woff2 = { - icon = "", - name = "WebOpenFontFormat2", - }, - - xz = { - icon = "", - name = "xz", - }, - - zip = { - icon = "", - name = "zip", - }, -} - -return M diff --git a/lua/ui/lsp.lua b/lua/ui/lsp.lua deleted file mode 100644 index cb7b67f..0000000 --- a/lua/ui/lsp.lua +++ /dev/null @@ -1,49 +0,0 @@ -local function lspSymbol(name, icon) - local hl = "DiagnosticSign" .. name - vim.fn.sign_define(hl, { text = icon, numhl = hl, texthl = hl }) -end - -lspSymbol("Error", "") -lspSymbol("Info", "") -lspSymbol("Hint", "") -lspSymbol("Warn", "") - -vim.diagnostic.config { - virtual_text = { - prefix = "", - }, - signs = true, - underline = true, - update_in_insert = false, -} - -vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { - border = "single", -}) -vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { - border = "single", - focusable = false, - relative = "cursor", -}) - --- suppress error messages from lang servers -vim.notify = function(msg, log_level) - if msg:match "exit code" then - return - end - if log_level == vim.log.levels.ERROR then - vim.api.nvim_err_writeln(msg) - else - vim.api.nvim_echo({ { msg } }, true, {}) - end -end - --- Borders for LspInfo winodw -local win = require "lspconfig.ui.windows" -local _default_opts = win.default_opts - -win.default_opts = function(options) - local opts = _default_opts(options) - opts.border = "single" - return opts -end diff --git a/lua/ui/statusline/init.lua b/lua/ui/statusline/init.lua deleted file mode 100644 index 76c9416..0000000 --- a/lua/ui/statusline/init.lua +++ /dev/null @@ -1,22 +0,0 @@ -local modules = require "ui.statusline.modules" -local user_override = require("core.utils").load_config().ui.statusline.override -modules = vim.tbl_deep_extend("force", modules, user_override) - -return { - run = function() - return table.concat { - modules.mode(), - modules.fileInfo(), - modules.git(), - - "%=", - modules.LSP_progress(), - "%=", - - modules.LSP_Diagnostics(), - modules.LSP_status() or "", - modules.cwd(), - modules.cursor_position(), - } - end, -} diff --git a/lua/ui/statusline/modules.lua b/lua/ui/statusline/modules.lua deleted file mode 100644 index 3b1f517..0000000 --- a/lua/ui/statusline/modules.lua +++ /dev/null @@ -1,138 +0,0 @@ -local fn = vim.fn -local sep_style = require("ui.icons").statusline_separators -local user_sep = require("core.utils").load_config().ui.statusline.separator_style -local sep_l = sep_style[user_sep]["left"] -local sep_r = sep_style[user_sep]["right"] - -local modes = { - ["n"] = { "NORMAL", "St_NormalMode" }, - ["niI"] = { "NORMAL i", "St_NormalMode" }, - ["niR"] = { "NORMAL r", "St_NormalMode" }, - ["niV"] = { "NORMAL v", "St_NormalMode" }, - ["no"] = { "N-PENDING", "St_NormalMode" }, - ["i"] = { "INSERT", "St_InsertMode" }, - ["ic"] = { "INSERT", "St_InsertMode" }, - ["ix"] = { "INSERT completion", "St_InsertMode" }, - ["t"] = { "TERMINAL", "St_TerminalMode" }, - ["nt"] = { "NTERMINAL", "St_NTerminalMode" }, - ["v"] = { "VISUAL", "St_VisualMode" }, - ["V"] = { "V-LINE", "St_VisualMode" }, - [""] = { "V-BLOCK", "St_VisualMode" }, - ["R"] = { "REPLACE", "St_ReplaceMode" }, - ["Rv"] = { "V-REPLACE", "St_ReplaceMode" }, - ["s"] = { "SELECT", "St_SelectMode" }, - ["S"] = { "S-LINE", "St_SelectMode" }, - [""] = { "S-BLOCK", "St_SelectMode" }, - ["c"] = { "COMMAND", "St_CommandMode" }, - ["cv"] = { "COMMAND", "St_CommandMode" }, - ["ce"] = { "COMMAND", "St_CommandMode" }, - ["r"] = { "PROMPT", "St_ConfirmMode" }, - ["rm"] = { "MORE", "St_ConfirmMode" }, - ["r?"] = { "CONFIRM", "St_ConfirmMode" }, - ["!"] = { "SHELL", "St_TerminalMode" }, -} - -local M = {} - -M.mode = function() - local m = vim.api.nvim_get_mode().mode - local current_mode = "%#" .. modes[m][2] .. "#" .. "  " .. modes[m][1] - local mode_sep1 = "%#" .. modes[m][2] .. "Sep" .. "#" .. sep_r - - return current_mode .. mode_sep1 .. "%#ST_EmptySpace#" .. sep_r -end - -M.fileInfo = function() - local icon = "  " - local filename = (fn.expand "%" == "" and "Empty ") or fn.expand "%:t" - - if filename ~= "Empty " then - local devicons_present, devicons = pcall(require, "nvim-web-devicons") - - if devicons_present then - local ft_icon = devicons.get_icon(filename) - icon = (ft_icon ~= nil and " " .. ft_icon) or "" - end - - filename = " " .. filename .. " " - end - - return "%#St_file_info#" .. icon .. filename .. "%#St_file_sep#" .. sep_r -end - -M.git = function() - if not vim.b.gitsigns_head or vim.b.gitsigns_git_status then - return "" - end - - local git_status = vim.b.gitsigns_status_dict - - local added = (git_status.added and git_status.added ~= 0) and ("  " .. git_status.added) or "" - local changed = (git_status.changed and git_status.changed ~= 0) and ("  " .. git_status.changed) or "" - local removed = (git_status.removed and git_status.removed ~= 0) and ("  " .. git_status.removed) or "" - local branch_name = "  " .. git_status.head .. " " - - return "%#St_gitIcons#" .. branch_name .. added .. changed .. removed -end - --- LSP STUFF -M.LSP_progress = function() - local Lsp = vim.lsp.util.get_progress_messages()[1] - - if vim.o.columns < 120 or not Lsp then - return "" - end - - local msg = Lsp.message or "" - local percentage = Lsp.percentage or 0 - local title = Lsp.title or "" - local spinners = { "", "" } - local ms = vim.loop.hrtime() / 1000000 - local frame = math.floor(ms / 120) % #spinners - local content = string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage) - - return ("%#St_LspProgress#" .. content) or "" -end - -M.LSP_Diagnostics = function() - local errors = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR }) - local warnings = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN }) - local hints = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT }) - local info = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.INFO }) - - errors = (errors and errors > 0) and ("%#St_lspError#" .. " " .. errors .. " ") or "" - warnings = (warnings and warnings > 0) and ("%#St_lspWarning#" .. " " .. warnings .. " ") or "" - hints = (hints and hints > 0) and ("%#St_lspHints#" .. "ﯧ " .. hints .. " ") or "" - info = (info and info > 0) and ("%#St_lspInfo#" .. " " .. info .. " ") or "" - - return errors .. warnings .. hints .. info -end - -M.LSP_status = function() - for _, client in ipairs(vim.lsp.get_active_clients()) do - if client.attached_buffers[vim.api.nvim_get_current_buf()] then - return (vim.o.columns > 70 and "%#St_LspStatus#" .. "  LSP ~ " .. client.name .. " ") or "  LSP " - end - end -end - -M.cwd = function() - local dir_icon = "%#St_cwd_icon#" .. " " - local dir_name = "%#St_cwd_text#" .. " " .. fn.fnamemodify(fn.getcwd(), ":t") .. " " - return (vim.o.columns > 120 and ("%#St_cwd_sep#" .. sep_l .. dir_icon .. dir_name)) or "" -end - -M.cursor_position = function() - local left_sep = "%#St_pos_sep#" .. sep_l .. "%#St_pos_icon#" .. " " - - local current_line = fn.line "." - local total_line = fn.line "$" - local text = math.modf((current_line / total_line) * 100) .. tostring "%%" - - text = (current_line == 1 and "Top") or text - text = (current_line == total_line and "Bot") or text - - return left_sep .. "%#St_pos_text#" .. " " .. text .. " " -end - -return M diff --git a/lua/ui/tabline.lua b/lua/ui/tabline.lua deleted file mode 100644 index ec68b6c..0000000 --- a/lua/ui/tabline.lua +++ /dev/null @@ -1,169 +0,0 @@ -local api = vim.api -local devicons_present, devicons = pcall(require, "nvim-web-devicons") -local fn = vim.fn -local new_cmd = api.nvim_create_user_command - -require("base46").load_highlight "tbline" - ----------------------------------------------------------- btn onclick functions ---------------------------------------------- - -vim.cmd "function! TbGoToBuf(bufnr,b,c,d) \n execute 'b'..a:bufnr \n endfunction" - -vim.cmd [[ - function! TbKillBuf(bufnr,b,c,d) - call luaeval('require("core.utils").close_buffer(_A)', a:bufnr) - endfunction]] - -vim.cmd "function! TbNewTab(a,b,c,d) \n tabnew \n endfunction" -vim.cmd "function! TbGotoTab(tabnr,b,c,d) \n execute a:tabnr ..'tabnext' \n endfunction" -vim.cmd "function! TbTabClose(a,b,c,d) \n lua require('core.utils').closeAllBufs('closeTab') \n endfunction" -vim.cmd "function! TbCloseAllBufs(a,b,c,d) \n lua require('core.utils').closeAllBufs() \n endfunction" -vim.cmd "function! TbToggle_theme(a,b,c,d) \n lua require('base46').toggle_theme() \n endfunction" -vim.cmd "function! TbToggleTabs(a,b,c,d) \n let g:TbTabsToggled = !g:TbTabsToggled | redrawtabline \n endfunction" - ----------------------------------------------------------- commands ------------------------------------------------------------ -new_cmd("Tbufnext", function() - require("core.utils").tabuflineNext() -end, {}) - -new_cmd("Tbufprev", function() - require("core.utils").tabuflinePrev() -end, {}) - -new_cmd("Tbufclose", function() - require("core.utils").close_buffer() -end, {}) - --------------------------------------------------------- functions ------------------------------------------------------------ -local function new_hl(group1, group2) - local fg = fn.synIDattr(fn.synIDtrans(fn.hlID(group1)), "fg#") - local bg = fn.synIDattr(fn.synIDtrans(fn.hlID(group2)), "bg#") - api.nvim_set_hl(0, "Tbline" .. group1 .. group2, { fg = fg, bg = bg }) - return "%#" .. "Tbline" .. group1 .. group2 .. "#" -end - -local function getNvimTreeWidth() - for _, win in pairs(api.nvim_tabpage_list_wins(0)) do - if vim.bo[api.nvim_win_get_buf(win)].ft == "NvimTree" then - return api.nvim_win_get_width(win) + 1 - end - end - return 0 -end - -local function getBtnsWidth() - local width = 6 - if fn.tabpagenr "$" ~= 1 then - width = width + ((3 * fn.tabpagenr "$") + 2) + 10 - width = not vim.g.TbTabsToggled and 8 or width - end - return width -end - -local function add_fileInfo(name, bufnr) - if devicons_present then - local icon, icon_hl = devicons.get_icon(name, string.match(name, "%a+$")) - - if not icon then - icon, icon_hl = devicons.get_icon "default_icon" - end - - local fileInfo = " " .. icon .. " " .. name .. " " -- initial value - local pad = (24 - #fileInfo) / 2 - - icon = ( - api.nvim_get_current_buf() == bufnr and new_hl(icon_hl, "TbLineBufOn") .. " " .. icon - or new_hl(icon_hl, "TbLineBufOff") .. " " .. icon - ) - - name = (#name > 15 and string.sub(name, 1, 13) .. "..") or name - name = (api.nvim_get_current_buf() == bufnr and "%#TbLineBufOn# " .. name .. " ") - or ("%#TbLineBufOff# " .. name .. " ") - - return string.rep(" ", pad) .. icon .. name .. string.rep(" ", pad - 1) - end -end - -local function styleBufferTab(nr) - local close_btn = "%" .. nr .. "@TbKillBuf@ %X" - local name = (#api.nvim_buf_get_name(nr) ~= 0) and fn.fnamemodify(api.nvim_buf_get_name(nr), ":t") or " No Name " - name = "%" .. nr .. "@TbGoToBuf@" .. add_fileInfo(name, nr) .. "%X" - - -- color close btn for focused / hidden buffers - if nr == api.nvim_get_current_buf() then - close_btn = (vim.bo[0].modified and "%" .. nr .. "@TbKillBuf@%#TbLineBufOnModified# ") - or ("%#TbLineBufOnClose#" .. close_btn) - name = "%#TbLineBufOn#" .. name .. close_btn - else - close_btn = (vim.bo[nr].modified and "%" .. nr .. "@TbKillBuf@%#TbBufLineBufOffModified# ") - or ("%#TbLineBufOffClose#" .. close_btn) - name = "%#TbLineBufOff#" .. name .. close_btn - end - - return name -end - ----------------------------------------------------------- components ------------------------------------------------------------ -local M = {} - -M.CoverNvimTree = function() - return "%#NvimTreeNormal#" .. string.rep(" ", getNvimTreeWidth()) -end - -M.bufferlist = function() - local buffers = {} -- buffersults - local available_space = vim.o.columns - getNvimTreeWidth() - getBtnsWidth() - local current_buf = api.nvim_get_current_buf() - local has_current = false -- have we seen current buffer yet? - - for _, bufnr in ipairs(vim.t.bufs) do - if api.nvim_buf_is_valid(bufnr) then - if ((#buffers + 1) * 21) > available_space then - if has_current then - break - end - - table.remove(buffers, 1) - end - - has_current = (bufnr == current_buf and true) or has_current - table.insert(buffers, styleBufferTab(bufnr)) - end - end - - return table.concat(buffers) .. "%#TblineFill#" .. "%=" -- buffers + empty space -end - -vim.g.TbTabsToggled = 0 - -M.tablist = function() - local result, number_of_tabs = "", fn.tabpagenr "$" - - if number_of_tabs > 1 then - for i = 1, number_of_tabs, 1 do - local tab_hl = ((i == fn.tabpagenr()) and "%#TbLineTabOn# ") or "%#TbLineTabOff# " - result = result .. ("%" .. i .. "@TbGotoTab@" .. tab_hl .. i .. " ") - result = (i == fn.tabpagenr() and result .. "%#TbLineTabCloseBtn#" .. "%@TbTabClose@ %X") or result - end - - local new_tabtn = "%#TblineTabNewBtn#" .. "%@TbNewTab@  %X" - local tabstoggleBtn = "%@TbToggleTabs@ %#TBTabTitle# TABS %X" - - return vim.g.TbTabsToggled == 1 and tabstoggleBtn:gsub("()", { [36] = " " }) - or new_tabtn .. tabstoggleBtn .. result - end -end - -M.buttons = function() - local toggle_themeBtn = "%@TbToggle_theme@%#TbLineThemeToggleBtn#" .. vim.g.toggle_theme_icon .. "%X" - local CloseAllBufsBtn = "%@TbCloseAllBufs@%#TbLineCloseAllBufsBtn#" .. "  " .. "%X" - return toggle_themeBtn .. CloseAllBufsBtn -end - -M.run = function() - return M.CoverNvimTree() .. M.bufferlist() .. (M.tablist() or "") .. M.buttons() -end - -M = vim.tbl_deep_extend("force", M, require("core.utils").load_config().ui.tabufline.override) - -return M From e94a8c1e252742df05702d777ee24ddd2c339a25 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 15 Jul 2022 15:17:42 +0530 Subject: [PATCH 1184/1541] add global for tabufline CoverNvimtree module | (#1338) https://github.com/NvChad/ui/commit/7292775ca00e8cb33458e02be07a0f7b071483e0 --- lua/plugins/configs/nvimtree.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index d579238..d573755 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -85,5 +85,6 @@ local options = { -- check for any override options = require("core.utils").load_override(options, "kyazdani42/nvim-tree.lua") +vim.g.nvimtree_side = options.view.side nvimtree.setup(options) From d8a92c75b1b8801ba3d3d589c7dcf45af19ae532 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 15 Jul 2022 13:08:42 +0530 Subject: [PATCH 1185/1541] Fix colorizer lazy load messing up cursor position when file is opened --- lua/core/lazy_load.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 37f1c22..63da723 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -32,13 +32,7 @@ M.colorizer = function() plugins = "nvim-colorizer.lua", condition = function() - local items = { "#", "rgb", "hsl", "rgba", "hsla" } - - for _, val in ipairs(items) do - if vim.fn.search(val) ~= 0 then - return true - end - end + return true end, } end From 84cc8ec750ba73ea19f2fa615d6682f8ee6785df Mon Sep 17 00:00:00 2001 From: Pratik Pingale Date: Fri, 15 Jul 2022 23:28:48 +0530 Subject: [PATCH 1186/1541] Add: `NvChad/ui` plugin link --- .github/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/README.md b/.github/README.md index cbd6b83..59b6e86 100644 --- a/.github/README.md +++ b/.github/README.md @@ -111,6 +111,7 @@ NeoVim Treesitter configurations and abstraction layer. We mostly use this for s - Many beautiful themes, theme toggler by [our base46 plugin](https://github.com/NvChad/base46) - Inbuilt terminal toggling & management with [Nvterm](https://github.com/NvChad/nvterm) - NvChad updater, hide & unhide terminal buffers with [NvChad extensions](https://github.com/NvChad/extensions) +- Lightweight & performant ui plugin with [NvChad UI](https://github.com/NvChad/ui) - File navigation with [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua) - Managing tabs, buffers with [bufferline.nvim](https://github.com/akinsho/bufferline.nvim) - Beautiful and configurable icons with [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) From ce027efbe9569711b19f307f40c81e27f79ebb96 Mon Sep 17 00:00:00 2001 From: Pratik Pingale Date: Fri, 15 Jul 2022 23:42:01 +0530 Subject: [PATCH 1187/1541] Update README.md --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index 59b6e86..38b7769 100644 --- a/.github/README.md +++ b/.github/README.md @@ -83,7 +83,7 @@ Adds indentline:

Our own statusline written from scratch

-[link](https://github.com/NvChad/NvChad/blob/main/lua/ui/statusline.lua) +[NvChad UI](https://github.com/NvChad/ui)

From 6f0aa376a8f8e52d33cede45e903767644c7e401 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 22 Jul 2022 16:00:00 +0000 Subject: [PATCH 1188/1541] set shiftwidth to 2 | format all files big thanks to @ghifarit53 --- .stylua.toml | 2 +- examples/chadrc.lua | 2 +- init.lua | 2 +- lua/core/default_config.lua | 42 +- lua/core/init.lua | 82 ++-- lua/core/lazy_load.lua | 150 +++---- lua/core/mappings.lua | 598 +++++++++++++------------- lua/core/options.lua | 73 ++-- lua/core/packer.lua | 74 ++-- lua/core/utils.lua | 312 +++++++------- lua/plugins/configs/alpha.lua | 118 ++--- lua/plugins/configs/cmp.lua | 156 +++---- lua/plugins/configs/lsp_installer.lua | 44 +- lua/plugins/configs/lspconfig.lua | 96 ++--- lua/plugins/configs/nvchad_ui.lua | 42 +- lua/plugins/configs/nvimtree.lua | 140 +++--- lua/plugins/configs/nvterm.lua | 40 +- lua/plugins/configs/others.lua | 228 +++++----- lua/plugins/configs/telescope.lua | 102 ++--- lua/plugins/configs/treesitter.lua | 16 +- lua/plugins/configs/whichkey.lua | 44 +- lua/plugins/init.lua | 318 +++++++------- 22 files changed, 1341 insertions(+), 1340 deletions(-) diff --git a/.stylua.toml b/.stylua.toml index f4c1cee..ecb6dca 100644 --- a/.stylua.toml +++ b/.stylua.toml @@ -1,6 +1,6 @@ column_width = 120 line_endings = "Unix" indent_type = "Spaces" -indent_width = 3 +indent_width = 2 quote_style = "AutoPreferDouble" call_parentheses = "None" diff --git a/examples/chadrc.lua b/examples/chadrc.lua index 6aa2521..62bfd71 100644 --- a/examples/chadrc.lua +++ b/examples/chadrc.lua @@ -6,7 +6,7 @@ local M = {} -- example of changing theme: M.ui = { - theme = "gruvchad", + theme = "gruvchad", } return M diff --git a/init.lua b/init.lua index 2237c5c..05ee549 100644 --- a/init.lua +++ b/init.lua @@ -2,7 +2,7 @@ require "core" require "core.options" vim.defer_fn(function() - require("core.utils").load_mappings() + require("core.utils").load_mappings() end, 0) -- setup packer + plugins diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index db0935a..755a134 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -3,34 +3,34 @@ local M = {} M.options = { - -- load your options here or load module with options - user = function() end, + -- load your options here or load module with options + user = function() end, - nvChad = { - update_url = "https://github.com/NvChad/NvChad", - update_branch = "main", - }, + nvChad = { + update_url = "https://github.com/NvChad/NvChad", + update_branch = "main", + }, } M.ui = { - -- hl = highlights - hl_add = {}, - hl_override = {}, - changed_themes = {}, - theme_toggle = { "onedark", "one_light" }, - theme = "onedark", -- default theme - transparency = false, + -- hl = highlights + hl_add = {}, + hl_override = {}, + changed_themes = {}, + theme_toggle = { "onedark", "one_light" }, + theme = "onedark", -- default theme + transparency = false, } M.plugins = { - override = {}, - remove = {}, - user = {}, - options = { - lspconfig = { - setup_lspconf = "", -- path of lspconfig file - }, - }, + override = {}, + remove = {}, + user = {}, + options = { + lspconfig = { + setup_lspconf = "", -- path of lspconfig file + }, + }, } -- check core.mappings for table structure diff --git a/lua/core/init.lua b/lua/core/init.lua index c9c5a1e..4ec415e 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -10,38 +10,38 @@ local api = vim.api -- dont list quickfix buffers autocmd("FileType", { - pattern = "qf", - callback = function() - vim.opt_local.buflisted = false - end, + pattern = "qf", + callback = function() + vim.opt_local.buflisted = false + end, }) -- wrap the PackerSync command to warn people before using it in NvChadSnapshots autocmd("VimEnter", { - callback = function() - vim.cmd "command! -nargs=* -complete=customlist,v:lua.require'packer'.plugin_complete PackerSync lua require('core.utils').packer_sync()" - end, + callback = function() + vim.cmd "command! -nargs=* -complete=customlist,v:lua.require'packer'.plugin_complete PackerSync lua require('core.utils').packer_sync()" + end, }) -- Disable statusline in dashboard autocmd("FileType", { - pattern = "alpha", - callback = function() - vim.opt.laststatus = 0 - end, + pattern = "alpha", + callback = function() + vim.opt.laststatus = 0 + end, }) autocmd("BufUnload", { - buffer = 0, - callback = function() - vim.opt.laststatus = 3 - end, + buffer = 0, + callback = function() + vim.opt.laststatus = 3 + end, }) -- Don't auto commenting new lines autocmd("BufEnter", { - pattern = "*", - command = "set fo-=c fo-=r fo-=o", + pattern = "*", + command = "set fo-=c fo-=r fo-=o", }) -- store listed buffers in tab local var @@ -50,34 +50,34 @@ vim.t.bufs = vim.api.nvim_list_bufs() -- autocmds for tabufline -> store bufnrs on bufadd, bufenter events -- thx to https://github.com/ii14 & stores buffer per tab -> table autocmd({ "BufAdd", "BufEnter" }, { - callback = function(args) - if vim.t.bufs == nil then - vim.t.bufs = { args.buf } - else - local bufs = vim.t.bufs + callback = function(args) + if vim.t.bufs == nil then + vim.t.bufs = { args.buf } + else + local bufs = vim.t.bufs - -- check for duplicates - if not vim.tbl_contains(bufs, args.buf) and (args.event == "BufAdd" or vim.bo[args.buf].buflisted) then - table.insert(bufs, args.buf) - vim.t.bufs = bufs - end + -- check for duplicates + if not vim.tbl_contains(bufs, args.buf) and (args.event == "BufAdd" or vim.bo[args.buf].buflisted) then + table.insert(bufs, args.buf) + vim.t.bufs = bufs end - end, + end + end, }) autocmd("BufDelete", { - callback = function(args) - for _, tab in ipairs(api.nvim_list_tabpages()) do - local bufs = vim.t[tab].bufs - if bufs then - for i, bufnr in ipairs(bufs) do - if bufnr == args.buf then - table.remove(bufs, i) - vim.t[tab].bufs = bufs - break - end - end - end + callback = function(args) + for _, tab in ipairs(api.nvim_list_tabpages()) do + local bufs = vim.t[tab].bufs + if bufs then + for i, bufnr in ipairs(bufs) do + if bufnr == args.buf then + table.remove(bufs, i) + vim.t[tab].bufs = bufs + break + end + end end - end, + end + end, }) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 63da723..0237897 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -4,37 +4,37 @@ local autocmd = vim.api.nvim_create_autocmd -- This must be used for plugins that need to be loaded just after a file -- ex : treesitter, lspconfig etc M.lazy_load = function(tb) - autocmd(tb.events, { - pattern = "*", - group = vim.api.nvim_create_augroup(tb.augroup_name, {}), - callback = function() - if tb.condition() then - vim.api.nvim_del_augroup_by_name(tb.augroup_name) + autocmd(tb.events, { + pattern = "*", + group = vim.api.nvim_create_augroup(tb.augroup_name, {}), + callback = function() + if tb.condition() then + vim.api.nvim_del_augroup_by_name(tb.augroup_name) - -- dont defer for treesitter as it will show slow highlighting - -- This deferring only happens only when we do "nvim filename" - if tb.plugins ~= "nvim-treesitter" then - vim.defer_fn(function() - vim.cmd("PackerLoad " .. tb.plugins) - end, 0) - else - vim.cmd("PackerLoad " .. tb.plugins) - end - end - end, - }) + -- dont defer for treesitter as it will show slow highlighting + -- This deferring only happens only when we do "nvim filename" + if tb.plugins ~= "nvim-treesitter" then + vim.defer_fn(function() + vim.cmd("PackerLoad " .. tb.plugins) + end, 0) + else + vim.cmd("PackerLoad " .. tb.plugins) + end + end + end, + }) end M.colorizer = function() - M.lazy_load { - events = { "BufRead", "BufNewFile" }, - augroup_name = "ColorizerLazy", - plugins = "nvim-colorizer.lua", + M.lazy_load { + events = { "BufRead", "BufNewFile" }, + augroup_name = "ColorizerLazy", + plugins = "nvim-colorizer.lua", - condition = function() - return true - end, - } + condition = function() + return true + end, + } end -- load certain plugins only when there's a file opened in the buffer @@ -42,65 +42,65 @@ end -- This gives an instant preview of nvim with the file opened M.on_file_open = function(plugin_name) - M.lazy_load { - events = { "BufRead", "BufWinEnter", "BufNewFile" }, - augroup_name = "BeLazyOnFileOpen" .. plugin_name, - plugins = plugin_name, - condition = function() - local file = vim.fn.expand "%" - return file ~= "NvimTree_1" and file ~= "[packer]" and file ~= "" - end, - } + M.lazy_load { + events = { "BufRead", "BufWinEnter", "BufNewFile" }, + augroup_name = "BeLazyOnFileOpen" .. plugin_name, + plugins = plugin_name, + condition = function() + local file = vim.fn.expand "%" + return file ~= "NvimTree_1" and file ~= "[packer]" and file ~= "" + end, + } end -- lspinstaller & lspconfig cmds for lazyloading M.lsp_cmds = { - "LspInfo", - "LspStart", - "LspRestart", - "LspStop", - "LspInstall", - "LspUnInstall", - "LspUnInstallAll", - "LspInstall", - "LspInstallInfo", - "LspInstallLog", - "LspLog", - "LspPrintInstalled", + "LspInfo", + "LspStart", + "LspRestart", + "LspStop", + "LspInstall", + "LspUnInstall", + "LspUnInstallAll", + "LspInstall", + "LspInstallInfo", + "LspInstallLog", + "LspLog", + "LspPrintInstalled", } M.treesitter_cmds = { - "TSInstall", - "TSBufEnable", - "TSBufDisable", - "TSEnable", - "TSDisable", - "TSModuleInfo", + "TSInstall", + "TSBufEnable", + "TSBufDisable", + "TSEnable", + "TSDisable", + "TSModuleInfo", } M.gitsigns = function() - -- taken from https://github.com/max397574 - autocmd({ "BufRead" }, { - callback = function() - local function onexit(code, _) - if code == 0 then - vim.schedule(function() - require("packer").loader "gitsigns.nvim" - end) - end - end - local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false) - if lines ~= { "" } then - vim.loop.spawn("git", { - args = { - "ls-files", - "--error-unmatch", - vim.fn.expand "%:p:h", - }, - }, onexit) - end - end, - }) + -- taken from https://github.com/max397574 + autocmd({ "BufRead" }, { + callback = function() + local function onexit(code, _) + if code == 0 then + vim.schedule(function() + require("packer").loader "gitsigns.nvim" + end) + end + end + local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false) + if lines ~= { "" } then + vim.loop.spawn("git", { + args = { + "ls-files", + "--error-unmatch", + vim.fn.expand "%:p:h", + }, + }, onexit) + end + end, + }) end return M diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 5ad223f..d44c73f 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -1,387 +1,387 @@ -- n, v, i, t = mode names local function termcodes(str) - return vim.api.nvim_replace_termcodes(str, true, true, true) + return vim.api.nvim_replace_termcodes(str, true, true, true) end local M = {} M.general = { - i = { + i = { - -- go to beginning and end - [""] = { "^i", "論 beginning of line" }, - [""] = { "", "壟 end of line" }, + -- go to beginning and end + [""] = { "^i", "論 beginning of line" }, + [""] = { "", "壟 end of line" }, - -- navigate within insert mode - [""] = { "", " move left" }, - [""] = { "", " move right" }, - [""] = { "", " move down" }, - [""] = { "", " move up" }, - }, + -- navigate within insert mode + [""] = { "", " move left" }, + [""] = { "", " move right" }, + [""] = { "", " move down" }, + [""] = { "", " move up" }, + }, - n = { + n = { - [""] = { " noh ", " no highlight" }, + [""] = { " noh ", " no highlight" }, - -- switch between windows - [""] = { "h", " window left" }, - [""] = { "l", " window right" }, - [""] = { "j", " window down" }, - [""] = { "k", " window up" }, + -- switch between windows + [""] = { "h", " window left" }, + [""] = { "l", " window right" }, + [""] = { "j", " window down" }, + [""] = { "k", " window up" }, - -- save - [""] = { " w ", "﬚ save file" }, + -- save + [""] = { " w ", "﬚ save file" }, - -- Copy all - [""] = { " %y+ ", " copy whole file" }, + -- Copy all + [""] = { " %y+ ", " copy whole file" }, - -- line numbers - ["n"] = { " set nu! ", " toggle line number" }, - ["rn"] = { " set rnu! ", " toggle relative number" }, + -- line numbers + ["n"] = { " set nu! ", " toggle line number" }, + ["rn"] = { " set rnu! ", " toggle relative number" }, - -- update nvchad - ["uu"] = { " :NvChadUpdate ", " update nvchad" }, + -- update nvchad + ["uu"] = { " :NvChadUpdate ", " update nvchad" }, - ["tt"] = { - function() - require("base46").toggle_theme() - end, + ["tt"] = { + function() + require("base46").toggle_theme() + end, - " toggle theme", - }, + " toggle theme", + }, - -- Allow moving the cursor through wrapped lines with j, k, and - -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ - -- empty mode is same as using :map - -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour - ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, - ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, - [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, - [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, - }, + -- Allow moving the cursor through wrapped lines with j, k, and + -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ + -- empty mode is same as using :map + -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, + ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, + }, - t = { - [""] = { termcodes "", " escape terminal mode" }, - }, + t = { + [""] = { termcodes "", " escape terminal mode" }, + }, - v = { - ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, - ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, - [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, - [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, - -- Don't copy the replaced text after pasting in visual mode - -- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste - ["p"] = { 'p:let @+=@0:let @"=@0', opts = { silent = true } }, - }, + v = { + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, + ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, + -- Don't copy the replaced text after pasting in visual mode + -- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste + ["p"] = { 'p:let @+=@0:let @"=@0', opts = { silent = true } }, + }, } M.tabufline = { - n = { - -- new buffer - [""] = { " enew ", "烙 new buffer" }, + n = { + -- new buffer + [""] = { " enew ", "烙 new buffer" }, - -- cycle through buffers - [""] = { " Tbufnext ", " goto next buffer" }, - [""] = { " Tbufprev ", " goto prev buffer" }, + -- cycle through buffers + [""] = { " Tbufnext ", " goto next buffer" }, + [""] = { " Tbufprev ", " goto prev buffer" }, - -- cycle through tabs - ["tp"] = { " tabprevious ", " goto next tab" }, - ["tn"] = { " tabnext ", " goto prev tab" }, + -- cycle through tabs + ["tp"] = { " tabprevious ", " goto next tab" }, + ["tn"] = { " tabnext ", " goto prev tab" }, - -- close buffer + hide terminal buffer - ["x"] = { - function() - require("core.utils").close_buffer() - end, - " close buffer", - }, - }, + -- close buffer + hide terminal buffer + ["x"] = { + function() + require("core.utils").close_buffer() + end, + " close buffer", + }, + }, } M.comment = { - -- toggle comment in both modes - n = { - ["/"] = { - function() - require("Comment.api").toggle_current_linewise() - end, + -- toggle comment in both modes + n = { + ["/"] = { + function() + require("Comment.api").toggle_current_linewise() + end, - "蘒 toggle comment", - }, - }, + "蘒 toggle comment", + }, + }, - v = { - ["/"] = { - "lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())", - "蘒 toggle comment", - }, - }, + v = { + ["/"] = { + "lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())", + "蘒 toggle comment", + }, + }, } M.lspconfig = { - -- See ` :help vim.lsp.*` for documentation on any of the below functions + -- See ` :help vim.lsp.*` for documentation on any of the below functions - n = { - ["gD"] = { - function() - vim.lsp.buf.declaration() - end, - " lsp declaration", - }, + n = { + ["gD"] = { + function() + vim.lsp.buf.declaration() + end, + " lsp declaration", + }, - ["gd"] = { - function() - vim.lsp.buf.definition() - end, - " lsp definition", - }, + ["gd"] = { + function() + vim.lsp.buf.definition() + end, + " lsp definition", + }, - ["K"] = { - function() - vim.lsp.buf.hover() - end, - " lsp hover", - }, + ["K"] = { + function() + vim.lsp.buf.hover() + end, + " lsp hover", + }, - ["gi"] = { - function() - vim.lsp.buf.implementation() - end, - " lsp implementation", - }, + ["gi"] = { + function() + vim.lsp.buf.implementation() + end, + " lsp implementation", + }, - ["ls"] = { - function() - vim.lsp.buf.signature_help() - end, - " lsp signature_help", - }, + ["ls"] = { + function() + vim.lsp.buf.signature_help() + end, + " lsp signature_help", + }, - ["D"] = { - function() - vim.lsp.buf.type_definition() - end, - " lsp definition type", - }, + ["D"] = { + function() + vim.lsp.buf.type_definition() + end, + " lsp definition type", + }, - ["ra"] = { - function() - require("nvchad_ui.renamer").open() - end, - " lsp rename", - }, + ["ra"] = { + function() + require("nvchad_ui.renamer").open() + end, + " lsp rename", + }, - ["ca"] = { - function() - vim.lsp.buf.code_action() - end, - " lsp code_action", - }, + ["ca"] = { + function() + vim.lsp.buf.code_action() + end, + " lsp code_action", + }, - ["gr"] = { - function() - vim.lsp.buf.references() - end, - " lsp references", - }, + ["gr"] = { + function() + vim.lsp.buf.references() + end, + " lsp references", + }, - ["f"] = { - function() - vim.diagnostic.open_float() - end, - " floating diagnostic", - }, + ["f"] = { + function() + vim.diagnostic.open_float() + end, + " floating diagnostic", + }, - ["[d"] = { - function() - vim.diagnostic.goto_prev() - end, - " goto prev", - }, + ["[d"] = { + function() + vim.diagnostic.goto_prev() + end, + " goto prev", + }, - ["d]"] = { - function() - vim.diagnostic.goto_next() - end, - " goto_next", - }, + ["d]"] = { + function() + vim.diagnostic.goto_next() + end, + " goto_next", + }, - ["q"] = { - function() - vim.diagnostic.setloclist() - end, - " diagnostic setloclist", - }, + ["q"] = { + function() + vim.diagnostic.setloclist() + end, + " diagnostic setloclist", + }, - ["fm"] = { - function() - vim.lsp.buf.formatting() - end, - " lsp formatting", - }, + ["fm"] = { + function() + vim.lsp.buf.formatting() + end, + " lsp formatting", + }, - ["wa"] = { - function() - vim.lsp.buf.add_workspace_folder() - end, - " add workspace folder", - }, + ["wa"] = { + function() + vim.lsp.buf.add_workspace_folder() + end, + " add workspace folder", + }, - ["wr"] = { - function() - vim.lsp.buf.remove_workspace_folder() - end, - " remove workspace folder", - }, + ["wr"] = { + function() + vim.lsp.buf.remove_workspace_folder() + end, + " remove workspace folder", + }, - ["wl"] = { - function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end, - " list workspace folders", - }, - }, + ["wl"] = { + function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end, + " list workspace folders", + }, + }, } M.nvimtree = { - n = { - -- toggle - [""] = { " NvimTreeToggle ", " toggle nvimtree" }, + n = { + -- toggle + [""] = { " NvimTreeToggle ", " toggle nvimtree" }, - -- focus - ["e"] = { " NvimTreeFocus ", " focus nvimtree" }, - }, + -- focus + ["e"] = { " NvimTreeFocus ", " focus nvimtree" }, + }, } M.telescope = { - n = { - -- find - ["ff"] = { " Telescope find_files ", " find files" }, - ["fa"] = { " Telescope find_files follow=true no_ignore=true hidden=true ", " find all" }, - ["fw"] = { " Telescope live_grep ", " live grep" }, - ["fb"] = { " Telescope buffers ", " find buffers" }, - ["fh"] = { " Telescope help_tags ", " help page" }, - ["fo"] = { " Telescope oldfiles ", " find oldfiles" }, - ["tk"] = { " Telescope keymaps ", " show keys" }, + n = { + -- find + ["ff"] = { " Telescope find_files ", " find files" }, + ["fa"] = { " Telescope find_files follow=true no_ignore=true hidden=true ", " find all" }, + ["fw"] = { " Telescope live_grep ", " live grep" }, + ["fb"] = { " Telescope buffers ", " find buffers" }, + ["fh"] = { " Telescope help_tags ", " help page" }, + ["fo"] = { " Telescope oldfiles ", " find oldfiles" }, + ["tk"] = { " Telescope keymaps ", " show keys" }, - -- git - ["cm"] = { " Telescope git_commits ", " git commits" }, - ["gt"] = { " Telescope git_status ", " git status" }, + -- git + ["cm"] = { " Telescope git_commits ", " git commits" }, + ["gt"] = { " Telescope git_status ", " git status" }, - -- pick a hidden term - ["pt"] = { " Telescope terms ", " pick hidden term" }, + -- pick a hidden term + ["pt"] = { " Telescope terms ", " pick hidden term" }, - -- theme switcher - ["th"] = { " Telescope themes ", " nvchad themes" }, - }, + -- theme switcher + ["th"] = { " Telescope themes ", " nvchad themes" }, + }, } M.nvterm = { - t = { - -- toggle in terminal mode - [""] = { - function() - require("nvterm.terminal").toggle "float" - end, - " toggle floating term", - }, + t = { + -- toggle in terminal mode + [""] = { + function() + require("nvterm.terminal").toggle "float" + end, + " toggle floating term", + }, - [""] = { - function() - require("nvterm.terminal").toggle "horizontal" - end, - " toggle horizontal term", - }, + [""] = { + function() + require("nvterm.terminal").toggle "horizontal" + end, + " toggle horizontal term", + }, - [""] = { - function() - require("nvterm.terminal").toggle "vertical" - end, - " toggle vertical term", - }, - }, + [""] = { + function() + require("nvterm.terminal").toggle "vertical" + end, + " toggle vertical term", + }, + }, - n = { - -- toggle in normal mode - [""] = { - function() - require("nvterm.terminal").toggle "float" - end, - " toggle floating term", - }, + n = { + -- toggle in normal mode + [""] = { + function() + require("nvterm.terminal").toggle "float" + end, + " toggle floating term", + }, - [""] = { - function() - require("nvterm.terminal").toggle "horizontal" - end, - " toggle horizontal term", - }, + [""] = { + function() + require("nvterm.terminal").toggle "horizontal" + end, + " toggle horizontal term", + }, - [""] = { - function() - require("nvterm.terminal").toggle "vertical" - end, - " toggle vertical term", - }, + [""] = { + function() + require("nvterm.terminal").toggle "vertical" + end, + " toggle vertical term", + }, - -- new + -- new - ["h"] = { - function() - require("nvterm.terminal").new "horizontal" - end, - " new horizontal term", - }, + ["h"] = { + function() + require("nvterm.terminal").new "horizontal" + end, + " new horizontal term", + }, - ["v"] = { - function() - require("nvterm.terminal").new "vertical" - end, - " new vertical term", - }, - }, + ["v"] = { + function() + require("nvterm.terminal").new "vertical" + end, + " new vertical term", + }, + }, } M.whichkey = { - n = { - ["wK"] = { - function() - vim.cmd "WhichKey" - end, - " which-key all keymaps", - }, - ["wk"] = { - function() - local input = vim.fn.input "WhichKey: " - vim.cmd("WhichKey " .. input) - end, - " which-key query lookup", - }, - }, + n = { + ["wK"] = { + function() + vim.cmd "WhichKey" + end, + " which-key all keymaps", + }, + ["wk"] = { + function() + local input = vim.fn.input "WhichKey: " + vim.cmd("WhichKey " .. input) + end, + " which-key query lookup", + }, + }, } M.blankline = { - n = { - ["bc"] = { - function() - local ok, start = require("indent_blankline.utils").get_current_context( - vim.g.indent_blankline_context_patterns, - vim.g.indent_blankline_use_treesitter_scope - ) + n = { + ["bc"] = { + function() + local ok, start = require("indent_blankline.utils").get_current_context( + vim.g.indent_blankline_context_patterns, + vim.g.indent_blankline_use_treesitter_scope + ) - if ok then - vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start, 0 }) - vim.cmd [[normal! _]] - end - end, + if ok then + vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start, 0 }) + vim.cmd [[normal! _]] + end + end, - " Jump to current_context", - }, - }, + " Jump to current_context", + }, + }, } return M diff --git a/lua/core/options.lua b/lua/core/options.lua index 73e56ef..793d483 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -20,8 +20,10 @@ opt.cul = true -- cursor line -- Indenting opt.expandtab = true -opt.shiftwidth = 3 +opt.shiftwidth = 2 opt.smartindent = true +opt.tabstop = 2 +opt.softtabstop = 2 opt.fillchars = { eob = " " } opt.ignorecase = true @@ -39,7 +41,6 @@ opt.shortmess:append "sI" opt.signcolumn = "yes" opt.splitbelow = true opt.splitright = true -opt.tabstop = 8 opt.termguicolors = true opt.timeoutlen = 400 opt.undofile = true @@ -55,53 +56,53 @@ g.mapleader = " " -- disable some builtin vim plugins local default_plugins = { - "2html_plugin", - "getscript", - "getscriptPlugin", - "gzip", - "logipat", - "netrw", - "netrwPlugin", - "netrwSettings", - "netrwFileHandlers", - "matchit", - "tar", - "tarPlugin", - "rrhelper", - "spellfile_plugin", - "vimball", - "vimballPlugin", - "zip", - "zipPlugin", - "tutor", - "rplugin", - "syntax", - "synmenu", - "optwin", - "compiler", - "bugreport", - "ftplugin", + "2html_plugin", + "getscript", + "getscriptPlugin", + "gzip", + "logipat", + "netrw", + "netrwPlugin", + "netrwSettings", + "netrwFileHandlers", + "matchit", + "tar", + "tarPlugin", + "rrhelper", + "spellfile_plugin", + "vimball", + "vimballPlugin", + "zip", + "zipPlugin", + "tutor", + "rplugin", + "syntax", + "synmenu", + "optwin", + "compiler", + "bugreport", + "ftplugin", } for _, plugin in pairs(default_plugins) do - g["loaded_" .. plugin] = 1 + g["loaded_" .. plugin] = 1 end local default_providers = { - "node", - "perl", - "python3", - "ruby", + "node", + "perl", + "python3", + "ruby", } for _, provider in ipairs(default_providers) do - vim.g["loaded_" .. provider .. "_provider"] = 0 + vim.g["loaded_" .. provider .. "_provider"] = 0 end -- set shada path vim.schedule(function() - vim.opt.shadafile = vim.fn.expand "$HOME" .. "/.local/share/nvim/shada/main.shada" - vim.cmd [[ silent! rsh ]] + vim.opt.shadafile = vim.fn.expand "$HOME" .. "/.local/share/nvim/shada/main.shada" + vim.cmd [[ silent! rsh ]] end) -- load user options diff --git a/lua/core/packer.lua b/lua/core/packer.lua index 575cefc..b193b75 100644 --- a/lua/core/packer.lua +++ b/lua/core/packer.lua @@ -1,59 +1,59 @@ local M = {} M.bootstrap = function() - local fn = vim.fn - local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim" + local fn = vim.fn + local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim" - vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" }) + vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" }) - if fn.empty(fn.glob(install_path)) > 0 then - print "Cloning packer .." - fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } + if fn.empty(fn.glob(install_path)) > 0 then + print "Cloning packer .." + fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } - -- install plugins + compile their configs - vim.cmd "packadd packer.nvim" - require "plugins" - vim.cmd "PackerSync" - end + -- install plugins + compile their configs + vim.cmd "packadd packer.nvim" + require "plugins" + vim.cmd "PackerSync" + end end M.options = { - auto_clean = true, - compile_on_sync = true, - git = { clone_timeout = 6000 }, - display = { - working_sym = "ﲊ", - error_sym = "✗ ", - done_sym = " ", - removed_sym = " ", - moved_sym = "", - open_fn = function() - return require("packer.util").float { border = "single" } - end, - }, + auto_clean = true, + compile_on_sync = true, + git = { clone_timeout = 6000 }, + display = { + working_sym = "ﲊ", + error_sym = "✗ ", + done_sym = " ", + removed_sym = " ", + moved_sym = "", + open_fn = function() + return require("packer.util").float { border = "single" } + end, + }, } -- merge overrides if there are any M.options = require("core.utils").load_override(M.options, "wbthomason/packer.nvim") M.run = function(plugins) - local present, packer = pcall(require, "packer") + local present, packer = pcall(require, "packer") - if not present then - return - end + if not present then + return + end - -- Override with chadrc values - plugins = require("core.utils").remove_default_plugins(plugins) - plugins = require("core.utils").merge_plugins(plugins) + -- Override with chadrc values + plugins = require("core.utils").remove_default_plugins(plugins) + plugins = require("core.utils").merge_plugins(plugins) - packer.init(M.options) + packer.init(M.options) - packer.startup(function(use) - for _, v in pairs(plugins) do - use(v) - end - end) + packer.startup(function(use) + for _, v in pairs(plugins) do + use(v) + end + end) end return M diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 131369c..c54d4c2 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -4,225 +4,225 @@ local api = vim.api local merge_tb = vim.tbl_deep_extend M.close_buffer = function(bufnr) - if vim.bo.buftype == "terminal" then - vim.cmd(vim.bo.buflisted and "set nobl | enew" or "hide") - elseif vim.bo.modified then - print "save the file bruh" - else - bufnr = bufnr or api.nvim_get_current_buf() - require("core.utils").tabuflinePrev() - vim.cmd("bd" .. bufnr) - end + if vim.bo.buftype == "terminal" then + vim.cmd(vim.bo.buflisted and "set nobl | enew" or "hide") + elseif vim.bo.modified then + print "save the file bruh" + else + bufnr = bufnr or api.nvim_get_current_buf() + require("core.utils").tabuflinePrev() + vim.cmd("bd" .. bufnr) + end end M.load_config = function() - local config = require "core.default_config" - local chadrc_exists, chadrc = pcall(require, "custom.chadrc") + local config = require "core.default_config" + local chadrc_exists, chadrc = pcall(require, "custom.chadrc") - if chadrc_exists then - -- merge user config if it exists and is a table; otherwise display an error - if type(chadrc) == "table" then - M.remove_default_keys() - config = merge_tb("force", config, chadrc) - else - error "chadrc must return a table!" - end - end + if chadrc_exists then + -- merge user config if it exists and is a table; otherwise display an error + if type(chadrc) == "table" then + M.remove_default_keys() + config = merge_tb("force", config, chadrc) + else + error "chadrc must return a table!" + end + end - config.mappings.disabled = nil - return config + config.mappings.disabled = nil + return config end M.remove_default_keys = function() - local chadrc = require "custom.chadrc" - local user_mappings = chadrc.mappings or {} - local user_keys = {} - local user_sections = vim.tbl_keys(user_mappings) + local chadrc = require "custom.chadrc" + local user_mappings = chadrc.mappings or {} + local user_keys = {} + local user_sections = vim.tbl_keys(user_mappings) - -- push user_map keys in user_keys table - for _, section in ipairs(user_sections) do - user_keys = vim.tbl_deep_extend("force", user_keys, user_mappings[section]) - end + -- push user_map keys in user_keys table + for _, section in ipairs(user_sections) do + user_keys = vim.tbl_deep_extend("force", user_keys, user_mappings[section]) + end - local function disable_key(mode, keybind, mode_mapping) - local keys_in_mode = vim.tbl_keys(user_keys[mode] or {}) + local function disable_key(mode, keybind, mode_mapping) + local keys_in_mode = vim.tbl_keys(user_keys[mode] or {}) - if vim.tbl_contains(keys_in_mode, keybind) then - mode_mapping[keybind] = nil + if vim.tbl_contains(keys_in_mode, keybind) then + mode_mapping[keybind] = nil + end + end + + local default_mappings = require("core.default_config").mappings + + -- remove user_maps from default mapping table + for _, section_mappings in pairs(default_mappings) do + for mode, mode_mapping in pairs(section_mappings) do + for keybind, _ in pairs(mode_mapping) do + disable_key(mode, keybind, mode_mapping) end - end - - local default_mappings = require("core.default_config").mappings - - -- remove user_maps from default mapping table - for _, section_mappings in pairs(default_mappings) do - for mode, mode_mapping in pairs(section_mappings) do - for keybind, _ in pairs(mode_mapping) do - disable_key(mode, keybind, mode_mapping) - end - end - end + end + end end M.load_mappings = function(mappings, mapping_opt) - -- set mapping function with/without whichkey - local set_maps - local whichkey_exists, wk = pcall(require, "which-key") + -- set mapping function with/without whichkey + local set_maps + local whichkey_exists, wk = pcall(require, "which-key") - if whichkey_exists then - set_maps = function(keybind, mapping_info, opts) - wk.register({ [keybind] = mapping_info }, opts) + if whichkey_exists then + set_maps = function(keybind, mapping_info, opts) + wk.register({ [keybind] = mapping_info }, opts) + end + else + set_maps = function(keybind, mapping_info, opts) + local mode = opts.mode + opts.mode = nil + vim.keymap.set(mode, keybind, mapping_info[1], opts) + end + end + + mappings = mappings or vim.deepcopy(M.load_config().mappings) + mappings.lspconfig = nil + + for _, section in pairs(mappings) do + for mode, mode_values in pairs(section) do + for keybind, mapping_info in pairs(mode_values) do + -- merge default + user opts + local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) + local opts = merge_tb("force", default_opts, mapping_info.opts or {}) + + if mapping_info.opts then + mapping_info.opts = nil + end + + set_maps(keybind, mapping_info, opts) end - else - set_maps = function(keybind, mapping_info, opts) - local mode = opts.mode - opts.mode = nil - vim.keymap.set(mode, keybind, mapping_info[1], opts) - end - end - - mappings = mappings or vim.deepcopy(M.load_config().mappings) - mappings.lspconfig = nil - - for _, section in pairs(mappings) do - for mode, mode_values in pairs(section) do - for keybind, mapping_info in pairs(mode_values) do - -- merge default + user opts - local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) - local opts = merge_tb("force", default_opts, mapping_info.opts or {}) - - if mapping_info.opts then - mapping_info.opts = nil - end - - set_maps(keybind, mapping_info, opts) - end - end - end + end + end end -- remove plugins defined in chadrc M.remove_default_plugins = function(plugins) - local removals = M.load_config().plugins.remove or {} + local removals = M.load_config().plugins.remove or {} - if not vim.tbl_isempty(removals) then - for _, plugin in pairs(removals) do - plugins[plugin] = nil - end - end + if not vim.tbl_isempty(removals) then + for _, plugin in pairs(removals) do + plugins[plugin] = nil + end + end - return plugins + return plugins end -- merge default/user plugin tables M.merge_plugins = function(default_plugins) - local user_plugins = M.load_config().plugins.user + local user_plugins = M.load_config().plugins.user - -- merge default + user plugin table - default_plugins = merge_tb("force", default_plugins, user_plugins) + -- merge default + user plugin table + default_plugins = merge_tb("force", default_plugins, user_plugins) - local final_table = {} + local final_table = {} - for key, _ in pairs(default_plugins) do - default_plugins[key][1] = key - final_table[#final_table + 1] = default_plugins[key] - end + for key, _ in pairs(default_plugins) do + default_plugins[key][1] = key + final_table[#final_table + 1] = default_plugins[key] + end - return final_table + return final_table end M.load_override = function(default_table, plugin_name) - local user_table = M.load_config().plugins.override[plugin_name] or {} - user_table = type(user_table) == "table" and user_table or user_table() - return merge_tb("force", default_table, user_table) + local user_table = M.load_config().plugins.override[plugin_name] or {} + user_table = type(user_table) == "table" and user_table or user_table() + return merge_tb("force", default_table, user_table) end M.packer_sync = function(...) - local git_exists, git = pcall(require, "nvchad.utils.git") - local defaults_exists, defaults = pcall(require, "nvchad.utils.config") - local packer_exists, packer = pcall(require, "packer") + local git_exists, git = pcall(require, "nvchad.utils.git") + local defaults_exists, defaults = pcall(require, "nvchad.utils.config") + local packer_exists, packer = pcall(require, "packer") - if git_exists and defaults_exists then - local current_branch_name = git.get_current_branch_name() + if git_exists and defaults_exists then + local current_branch_name = git.get_current_branch_name() - -- warn the user if we are on a snapshot branch - if current_branch_name:match(defaults.snaps.base_snap_branch_name .. "(.+)" .. "$") then - vim.api.nvim_echo({ - { "WARNING: You are trying to use ", "WarningMsg" }, - { "PackerSync" }, - { - " on a NvChadSnapshot. This will cause issues if NvChad dependencies contain " - .. "any breaking changes! Plugin updates will not be included in this " - .. "snapshot, so they will be lost after switching between snapshots! Would " - .. "you still like to continue? [y/N]\n", - "WarningMsg", - }, - }, false, {}) + -- warn the user if we are on a snapshot branch + if current_branch_name:match(defaults.snaps.base_snap_branch_name .. "(.+)" .. "$") then + vim.api.nvim_echo({ + { "WARNING: You are trying to use ", "WarningMsg" }, + { "PackerSync" }, + { + " on a NvChadSnapshot. This will cause issues if NvChad dependencies contain " + .. "any breaking changes! Plugin updates will not be included in this " + .. "snapshot, so they will be lost after switching between snapshots! Would " + .. "you still like to continue? [y/N]\n", + "WarningMsg", + }, + }, false, {}) - local ans = vim.trim(string.lower(vim.fn.input "-> ")) + local ans = vim.trim(string.lower(vim.fn.input "-> ")) - if ans ~= "y" then - return - end + if ans ~= "y" then + return end - end + end + end - if packer_exists then - packer.sync(...) - else - error "Packer could not be loaded!" - end + if packer_exists then + packer.sync(...) + else + error "Packer could not be loaded!" + end end M.bufilter = function() - local bufs = vim.t.bufs + local bufs = vim.t.bufs - for i = #bufs, 1, -1 do - if not vim.api.nvim_buf_is_valid(bufs[i]) then - table.remove(bufs, i) - end - end + for i = #bufs, 1, -1 do + if not vim.api.nvim_buf_is_valid(bufs[i]) then + table.remove(bufs, i) + end + end - return bufs + return bufs end M.tabuflineNext = function() - local bufs = M.bufilter() or {} + local bufs = M.bufilter() or {} - for i, v in ipairs(bufs) do - if api.nvim_get_current_buf() == v then - vim.cmd(i == #bufs and "b" .. bufs[1] or "b" .. bufs[i + 1]) - break - end - end + for i, v in ipairs(bufs) do + if api.nvim_get_current_buf() == v then + vim.cmd(i == #bufs and "b" .. bufs[1] or "b" .. bufs[i + 1]) + break + end + end end M.tabuflinePrev = function() - local bufs = M.bufilter() or {} + local bufs = M.bufilter() or {} - for i, v in ipairs(bufs) do - if api.nvim_get_current_buf() == v then - vim.cmd(i == 1 and "b" .. bufs[#bufs] or "b" .. bufs[i - 1]) - break - end - end + for i, v in ipairs(bufs) do + if api.nvim_get_current_buf() == v then + vim.cmd(i == 1 and "b" .. bufs[#bufs] or "b" .. bufs[i - 1]) + break + end + end end -- closes tab + all of its buffers M.closeAllBufs = function(action) - local bufs = vim.t.bufs + local bufs = vim.t.bufs - if action == "closeTab" then - vim.cmd "tabclose" - end + if action == "closeTab" then + vim.cmd "tabclose" + end - for _, buf in ipairs(bufs) do - M.close_buffer(buf) - end + for _, buf in ipairs(bufs) do + M.close_buffer(buf) + end - if action ~= "closeTab" then - vim.cmd "enew" - end + if action ~= "closeTab" then + vim.cmd "enew" + end end return M diff --git a/lua/plugins/configs/alpha.lua b/lua/plugins/configs/alpha.lua index 319ea50..92191b8 100644 --- a/lua/plugins/configs/alpha.lua +++ b/lua/plugins/configs/alpha.lua @@ -1,77 +1,77 @@ local present, alpha = pcall(require, "alpha") if not present then - return + return end require("base46").load_highlight "alpha" local function button(sc, txt, keybind) - local sc_ = sc:gsub("%s", ""):gsub("SPC", "") + local sc_ = sc:gsub("%s", ""):gsub("SPC", "") - local opts = { - position = "center", - text = txt, - shortcut = sc, - cursor = 5, - width = 36, - align_shortcut = "right", - hl = "AlphaButtons", - } + local opts = { + position = "center", + text = txt, + shortcut = sc, + cursor = 5, + width = 36, + align_shortcut = "right", + hl = "AlphaButtons", + } - if keybind then - opts.keymap = { "n", sc_, keybind, { noremap = true, silent = true } } - end + if keybind then + opts.keymap = { "n", sc_, keybind, { noremap = true, silent = true } } + end - return { - type = "button", - val = txt, - on_press = function() - local key = vim.api.nvim_replace_termcodes(sc_, true, false, true) - vim.api.nvim_feedkeys(key, "normal", false) - end, - opts = opts, - } + return { + type = "button", + val = txt, + on_press = function() + local key = vim.api.nvim_replace_termcodes(sc_, true, false, true) + vim.api.nvim_feedkeys(key, "normal", false) + end, + opts = opts, + } end local options = {} local ascii = { - " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", - " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", - " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", - " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", - " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", - " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", - " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", - " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", - " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", - " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", - " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", + " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", + " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", + " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", + " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", + " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", + " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", + " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", + " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", + " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", + " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", + " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", } options.header = { - type = "text", - val = ascii, - opts = { - position = "center", - hl = "AlphaHeader", - }, + type = "text", + val = ascii, + opts = { + position = "center", + hl = "AlphaHeader", + }, } options.buttons = { - type = "group", - val = { - button("SPC f f", " Find File ", ":Telescope find_files"), - button("SPC f o", " Recent File ", ":Telescope oldfiles"), - button("SPC f w", " Find Word ", ":Telescope live_grep"), - button("SPC b m", " Bookmarks ", ":Telescope marks"), - button("SPC t h", " Themes ", ":Telescope themes"), - button("SPC e s", " Settings", ":e $MYVIMRC | :cd %:p:h "), - }, - opts = { - spacing = 1, - }, + type = "group", + val = { + button("SPC f f", " Find File ", ":Telescope find_files"), + button("SPC f o", " Recent File ", ":Telescope oldfiles"), + button("SPC f w", " Find Word ", ":Telescope live_grep"), + button("SPC b m", " Bookmarks ", ":Telescope marks"), + button("SPC t h", " Themes ", ":Telescope themes"), + button("SPC e s", " Settings", ":e $MYVIMRC | :cd %:p:h "), + }, + opts = { + spacing = 1, + }, } options = require("core.utils").load_override(options, "goolord/alpha-nvim") @@ -82,11 +82,11 @@ local marginTopPercent = 0.3 local headerPadding = fn.max { 2, fn.floor(fn.winheight(0) * marginTopPercent) } alpha.setup { - layout = { - { type = "padding", val = headerPadding }, - options.header, - { type = "padding", val = 2 }, - options.buttons, - }, - opts = {}, + layout = { + { type = "padding", val = headerPadding }, + options.header, + { type = "padding", val = 2 }, + options.buttons, + }, + opts = {}, } diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 2453182..2b69b6b 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -1,7 +1,7 @@ local present, cmp = pcall(require, "cmp") if not present then - return + return end require("base46").load_highlight "cmp" @@ -9,92 +9,92 @@ require("base46").load_highlight "cmp" vim.opt.completeopt = "menuone,noselect" local function border(hl_name) - return { - { "╭", hl_name }, - { "─", hl_name }, - { "╮", hl_name }, - { "│", hl_name }, - { "╯", hl_name }, - { "─", hl_name }, - { "╰", hl_name }, - { "│", hl_name }, - } + return { + { "╭", hl_name }, + { "─", hl_name }, + { "╮", hl_name }, + { "│", hl_name }, + { "╯", hl_name }, + { "─", hl_name }, + { "╰", hl_name }, + { "│", hl_name }, + } end local cmp_window = require "cmp.utils.window" cmp_window.info_ = cmp_window.info cmp_window.info = function(self) - local info = self:info_() - info.scrollable = false - return info + local info = self:info_() + info.scrollable = false + return info end local options = { - window = { - completion = { - border = border "CmpBorder", - winhighlight = "Normal:CmpPmenu,CursorLine:PmenuSel,Search:None", - }, - documentation = { - border = border "CmpDocBorder", - }, - }, - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, - formatting = { - format = function(_, vim_item) - local icons = require("nvchad_ui.icons").lspkind - vim_item.kind = string.format("%s %s", icons[vim_item.kind], vim_item.kind) - return vim_item - end, - }, - mapping = { - [""] = cmp.mapping.select_prev_item(), - [""] = cmp.mapping.select_next_item(), - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.close(), - [""] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, - select = false, - }, - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif require("luasnip").expand_or_jumpable() then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") - else - fallback() - end - end, { - "i", - "s", - }), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif require("luasnip").jumpable(-1) then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") - else - fallback() - end - end, { - "i", - "s", - }), - }, - sources = { - { name = "luasnip" }, - { name = "nvim_lsp" }, - { name = "buffer" }, - { name = "nvim_lua" }, - { name = "path" }, - }, + window = { + completion = { + border = border "CmpBorder", + winhighlight = "Normal:CmpPmenu,CursorLine:PmenuSel,Search:None", + }, + documentation = { + border = border "CmpDocBorder", + }, + }, + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + formatting = { + format = function(_, vim_item) + local icons = require("nvchad_ui.icons").lspkind + vim_item.kind = string.format("%s %s", icons[vim_item.kind], vim_item.kind) + return vim_item + end, + }, + mapping = { + [""] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.close(), + [""] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = false, + }, + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif require("luasnip").expand_or_jumpable() then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") + else + fallback() + end + end, { + "i", + "s", + }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif require("luasnip").jumpable(-1) then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") + else + fallback() + end + end, { + "i", + "s", + }), + }, + sources = { + { name = "luasnip" }, + { name = "nvim_lsp" }, + { name = "buffer" }, + { name = "nvim_lua" }, + { name = "path" }, + }, } -- check for any override diff --git a/lua/plugins/configs/lsp_installer.lua b/lua/plugins/configs/lsp_installer.lua index 4a78c3d..3afe108 100644 --- a/lua/plugins/configs/lsp_installer.lua +++ b/lua/plugins/configs/lsp_installer.lua @@ -1,34 +1,34 @@ local present, lsp_installer = pcall(require, "nvim-lsp-installer") if not present then - return + return end local options = { - -- ensure_installed is not needed as automatic_installation is enabled - -- then any lsp server you setup by lspconfig is going to get installed automatically! + -- ensure_installed is not needed as automatic_installation is enabled + -- then any lsp server you setup by lspconfig is going to get installed automatically! - -- ensure_installed = { "lua" }, - automatic_installation = true, + -- ensure_installed = { "lua" }, + automatic_installation = true, - ui = { - icons = { - server_installed = " ", - server_pending = " ", - server_uninstalled = " ﮊ", - }, - keymaps = { - toggle_server_expand = "", - install_server = "i", - update_server = "u", - check_server_version = "c", - update_all_servers = "U", - check_outdated_servers = "C", - uninstall_server = "X", - }, - }, + ui = { + icons = { + server_installed = " ", + server_pending = " ", + server_uninstalled = " ﮊ", + }, + keymaps = { + toggle_server_expand = "", + install_server = "i", + update_server = "u", + check_server_version = "c", + update_all_servers = "U", + check_outdated_servers = "C", + uninstall_server = "X", + }, + }, - max_concurrent_installers = 10, + max_concurrent_installers = 10, } options = require("core.utils").load_override(options, "williamboman/nvim-lsp-installer") diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index cf5c7d6..6f7547b 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,7 +1,7 @@ local present, lspconfig = pcall(require, "lspconfig") if not present then - return + return end require("base46").load_highlight "lsp" @@ -11,72 +11,72 @@ local M = {} local utils = require "core.utils" M.on_attach = function(client, bufnr) - local vim_version = vim.version() + local vim_version = vim.version() - if vim_version.minor > 7 then - -- nightly - client.server_capabilities.documentFormattingProvider = false - client.server_capabilities.documentRangeFormattingProvider = false - else - -- stable - client.resolved_capabilities.document_formatting = false - client.resolved_capabilities.document_range_formatting = false - end + if vim_version.minor > 7 then + -- nightly + client.server_capabilities.documentFormattingProvider = false + client.server_capabilities.documentRangeFormattingProvider = false + else + -- stable + client.resolved_capabilities.document_formatting = false + client.resolved_capabilities.document_range_formatting = false + end - local lsp_mappings = utils.load_config().mappings.lspconfig - utils.load_mappings({ lsp_mappings }, { buffer = bufnr }) + local lsp_mappings = utils.load_config().mappings.lspconfig + utils.load_mappings({ lsp_mappings }, { buffer = bufnr }) - if client.server_capabilities.signatureHelpProvider then - require("nvchad_ui.signature").setup(client) - end + if client.server_capabilities.signatureHelpProvider then + require("nvchad_ui.signature").setup(client) + end end local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.textDocument.completion.completionItem = { - documentationFormat = { "markdown", "plaintext" }, - snippetSupport = true, - preselectSupport = true, - insertReplaceSupport = true, - labelDetailsSupport = true, - deprecatedSupport = true, - commitCharactersSupport = true, - tagSupport = { valueSet = { 1 } }, - resolveSupport = { - properties = { - "documentation", - "detail", - "additionalTextEdits", - }, - }, + documentationFormat = { "markdown", "plaintext" }, + snippetSupport = true, + preselectSupport = true, + insertReplaceSupport = true, + labelDetailsSupport = true, + deprecatedSupport = true, + commitCharactersSupport = true, + tagSupport = { valueSet = { 1 } }, + resolveSupport = { + properties = { + "documentation", + "detail", + "additionalTextEdits", + }, + }, } lspconfig.sumneko_lua.setup { - on_attach = M.on_attach, - capabilities = capabilities, + on_attach = M.on_attach, + capabilities = capabilities, - settings = { - Lua = { - diagnostics = { - globals = { "vim" }, - }, - workspace = { - library = { - [vim.fn.expand "$VIMRUNTIME/lua"] = true, - [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true, - }, - maxPreload = 100000, - preloadFileSize = 10000, - }, + settings = { + Lua = { + diagnostics = { + globals = { "vim" }, }, - }, + workspace = { + library = { + [vim.fn.expand "$VIMRUNTIME/lua"] = true, + [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true, + }, + maxPreload = 100000, + preloadFileSize = 10000, + }, + }, + }, } -- requires a file containing user's lspconfigs local addlsp_confs = utils.load_config().plugins.options.lspconfig.setup_lspconf if #addlsp_confs ~= 0 then - require(addlsp_confs).setup_lsp(M.on_attach, capabilities) + require(addlsp_confs).setup_lsp(M.on_attach, capabilities) end return M diff --git a/lua/plugins/configs/nvchad_ui.lua b/lua/plugins/configs/nvchad_ui.lua index d59ff3a..e19d87e 100644 --- a/lua/plugins/configs/nvchad_ui.lua +++ b/lua/plugins/configs/nvchad_ui.lua @@ -1,22 +1,22 @@ local present, _ = pcall(require, "nvchad_ui") if not present then - return + return end local options = { - statusline = { - separator_style = "default", -- default/round/block/arrow - overriden_modules = nil, - }, + statusline = { + separator_style = "default", -- default/round/block/arrow + overriden_modules = nil, + }, - -- lazyload it when there are 1+ buffers - tabufline = { - enabled = true, - lazyload = true, - overriden_modules = nil, - }, + -- lazyload it when there are 1+ buffers + tabufline = { + enabled = true, + lazyload = true, + overriden_modules = nil, + }, } options = require("core.utils").load_override(options, "NvChad/ui") @@ -25,16 +25,16 @@ require "nvchad_ui.tabufline.lazyload"(options.tabufline) -- ignore this as it might scare you XD return { - statusline = function() - return require("nvchad_ui.statusline").setup(options) - end, + statusline = function() + return require("nvchad_ui.statusline").setup(options) + end, - tabufline = function() - return require("nvchad_ui.tabufline").setup(options) - end, + tabufline = function() + return require("nvchad_ui.tabufline").setup(options) + end, - load_ui_plugins = function() - vim.opt.statusline = "%!v:lua.require('plugins.configs.nvchad_ui').statusline()" - vim.opt.tabline = "%!v:lua.require('plugins.configs.nvchad_ui').tabufline()" - end, + load_ui_plugins = function() + vim.opt.statusline = "%!v:lua.require('plugins.configs.nvchad_ui').statusline()" + vim.opt.tabline = "%!v:lua.require('plugins.configs.nvchad_ui').tabufline()" + end, } diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index d573755..0f1733e 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -1,86 +1,86 @@ local present, nvimtree = pcall(require, "nvim-tree") if not present then - return + return end require("base46").load_highlight "nvimtree" local options = { - filters = { - dotfiles = false, - exclude = { vim.fn.stdpath "config" .. "/lua/custom" }, - }, - disable_netrw = true, - hijack_netrw = true, - open_on_setup = false, - ignore_ft_on_setup = { "alpha" }, - hijack_cursor = true, - hijack_unnamed_buffer_when_opening = false, - update_cwd = true, - update_focused_file = { - enable = true, - update_cwd = false, - }, - view = { - adaptive_size = true, - side = "left", - width = 25, - hide_root_folder = true, - }, - git = { + filters = { + dotfiles = false, + exclude = { vim.fn.stdpath "config" .. "/lua/custom" }, + }, + disable_netrw = true, + hijack_netrw = true, + open_on_setup = false, + ignore_ft_on_setup = { "alpha" }, + hijack_cursor = true, + hijack_unnamed_buffer_when_opening = false, + update_cwd = true, + update_focused_file = { + enable = true, + update_cwd = false, + }, + view = { + adaptive_size = true, + side = "left", + width = 25, + hide_root_folder = true, + }, + git = { + enable = false, + ignore = true, + }, + filesystem_watchers = { + enable = true, + }, + actions = { + open_file = { + resize_window = true, + }, + }, + renderer = { + highlight_git = false, + highlight_opened_files = "none", + + indent_markers = { enable = false, - ignore = true, - }, - filesystem_watchers = { - enable = true, - }, - actions = { - open_file = { - resize_window = true, - }, - }, - renderer = { - highlight_git = false, - highlight_opened_files = "none", + }, - indent_markers = { - enable = false, + icons = { + show = { + file = true, + folder = true, + folder_arrow = true, + git = false, }, - icons = { - show = { - file = true, - folder = true, - folder_arrow = true, - git = false, - }, - - glyphs = { - default = "", - symlink = "", - folder = { - default = "", - empty = "", - empty_open = "", - open = "", - symlink = "", - symlink_open = "", - arrow_open = "", - arrow_closed = "", - }, - git = { - unstaged = "✗", - staged = "✓", - unmerged = "", - renamed = "➜", - untracked = "★", - deleted = "", - ignored = "◌", - }, - }, + glyphs = { + default = "", + symlink = "", + folder = { + default = "", + empty = "", + empty_open = "", + open = "", + symlink = "", + symlink_open = "", + arrow_open = "", + arrow_closed = "", + }, + git = { + unstaged = "✗", + staged = "✓", + unmerged = "", + renamed = "➜", + untracked = "★", + deleted = "", + ignored = "◌", + }, }, - }, + }, + }, } -- check for any override diff --git a/lua/plugins/configs/nvterm.lua b/lua/plugins/configs/nvterm.lua index d0580eb..2c82e14 100644 --- a/lua/plugins/configs/nvterm.lua +++ b/lua/plugins/configs/nvterm.lua @@ -1,32 +1,32 @@ local present, nvterm = pcall(require, "nvterm") if not present then - return + return end require "base46.term" local options = { - terminals = { - list = {}, - type_opts = { - float = { - relative = "editor", - row = 0.3, - col = 0.25, - width = 0.5, - height = 0.4, - border = "single", - }, - horizontal = { location = "rightbelow", split_ratio = 0.3 }, - vertical = { location = "rightbelow", split_ratio = 0.5 }, + terminals = { + list = {}, + type_opts = { + float = { + relative = "editor", + row = 0.3, + col = 0.25, + width = 0.5, + height = 0.4, + border = "single", }, - }, - behavior = { - close_on_exit = true, - auto_insert = true, - }, - enable_new_mappings = true, + horizontal = { location = "rightbelow", split_ratio = 0.3 }, + vertical = { location = "rightbelow", split_ratio = 0.5 }, + }, + }, + behavior = { + close_on_exit = true, + auto_insert = true, + }, + enable_new_mappings = true, } options = require("core.utils").load_override(options, "NvChad/nvterm") diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 6f83394..0b2e255 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -3,163 +3,163 @@ local M = {} local load_override = require("core.utils").load_override M.autopairs = function() - local present1, autopairs = pcall(require, "nvim-autopairs") - local present2, cmp = pcall(require, "cmp") + local present1, autopairs = pcall(require, "nvim-autopairs") + local present2, cmp = pcall(require, "cmp") - if not (present1 and present2) then - return - end + if not (present1 and present2) then + return + end - local options = { - fast_wrap = {}, - disable_filetype = { "TelescopePrompt", "vim" }, - } + local options = { + fast_wrap = {}, + disable_filetype = { "TelescopePrompt", "vim" }, + } - options = load_override(options, "windwp/nvim-autopairs") - autopairs.setup(options) + options = load_override(options, "windwp/nvim-autopairs") + autopairs.setup(options) - local cmp_autopairs = require "nvim-autopairs.completion.cmp" - cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) + local cmp_autopairs = require "nvim-autopairs.completion.cmp" + cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) end M.blankline = function() - local present, blankline = pcall(require, "indent_blankline") + local present, blankline = pcall(require, "indent_blankline") - if not present then - return - end + if not present then + return + end - require("base46").load_highlight "blankline" + require("base46").load_highlight "blankline" - local options = { - indentLine_enabled = 1, - filetype_exclude = { - "help", - "terminal", - "alpha", - "packer", - "lspinfo", - "TelescopePrompt", - "TelescopeResults", - "lsp-installer", - "", - }, - buftype_exclude = { "terminal" }, - show_trailing_blankline_indent = false, - show_first_indent_level = false, - show_current_context = true, - show_current_context_start = true, - } + local options = { + indentLine_enabled = 1, + filetype_exclude = { + "help", + "terminal", + "alpha", + "packer", + "lspinfo", + "TelescopePrompt", + "TelescopeResults", + "lsp-installer", + "", + }, + buftype_exclude = { "terminal" }, + show_trailing_blankline_indent = false, + show_first_indent_level = false, + show_current_context = true, + show_current_context_start = true, + } - options = load_override(options, "lukas-reineke/indent-blankline.nvim") - blankline.setup(options) + options = load_override(options, "lukas-reineke/indent-blankline.nvim") + blankline.setup(options) end M.colorizer = function() - local present, colorizer = pcall(require, "colorizer") + local present, colorizer = pcall(require, "colorizer") - if not present then - return - end + if not present then + return + end - local options = { - filetypes = { - "*", - }, - user_default_options = { - RGB = true, -- #RGB hex codes - RRGGBB = true, -- #RRGGBB hex codes - names = false, -- "Name" codes like Blue - RRGGBBAA = false, -- #RRGGBBAA hex codes - rgb_fn = false, -- CSS rgb() and rgba() functions - hsl_fn = false, -- CSS hsl() and hsla() functions - css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB - css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn - mode = "background", -- Set the display mode. - }, - } + local options = { + filetypes = { + "*", + }, + user_default_options = { + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + names = false, -- "Name" codes like Blue + RRGGBBAA = false, -- #RRGGBBAA hex codes + rgb_fn = false, -- CSS rgb() and rgba() functions + hsl_fn = false, -- CSS hsl() and hsla() functions + css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn + mode = "background", -- Set the display mode. + }, + } - options = load_override(options, "NvChad/nvim-colorizer.lua") - colorizer.setup(options["filetypes"], options["user_default_options"]) + options = load_override(options, "NvChad/nvim-colorizer.lua") + colorizer.setup(options["filetypes"], options["user_default_options"]) - vim.cmd "ColorizerAttachToBuffer" + vim.cmd "ColorizerAttachToBuffer" end M.comment = function() - local present, nvim_comment = pcall(require, "Comment") + local present, nvim_comment = pcall(require, "Comment") - if not present then - return - end + if not present then + return + end - local options = {} - options = load_override(options, "numToStr/Comment.nvim") - nvim_comment.setup(options) + local options = {} + options = load_override(options, "numToStr/Comment.nvim") + nvim_comment.setup(options) end M.luasnip = function() - local present, luasnip = pcall(require, "luasnip") + local present, luasnip = pcall(require, "luasnip") - if not present then - return - end + if not present then + return + end - local options = { - history = true, - updateevents = "TextChanged,TextChangedI", - } + local options = { + history = true, + updateevents = "TextChanged,TextChangedI", + } - options = load_override(options, "L3MON4D3/LuaSnip") - luasnip.config.set_config(options) - require("luasnip.loaders.from_vscode").lazy_load() - require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.luasnippets_path or "" } + options = load_override(options, "L3MON4D3/LuaSnip") + luasnip.config.set_config(options) + require("luasnip.loaders.from_vscode").lazy_load() + require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.luasnippets_path or "" } - vim.api.nvim_create_autocmd("InsertLeave", { - callback = function() - if - require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()] - and not require("luasnip").session.jump_active - then - require("luasnip").unlink_current() - end - end, - }) + vim.api.nvim_create_autocmd("InsertLeave", { + callback = function() + if + require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()] + and not require("luasnip").session.jump_active + then + require("luasnip").unlink_current() + end + end, + }) end M.gitsigns = function() - local present, gitsigns = pcall(require, "gitsigns") + local present, gitsigns = pcall(require, "gitsigns") - if not present then - return - end + if not present then + return + end - require("base46").load_highlight "git" + require("base46").load_highlight "git" - local options = { - signs = { - add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, - change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, - delete = { hl = "DiffDelete", text = "", numhl = "GitSignsDeleteNr" }, - topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, - changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" }, - }, - } + local options = { + signs = { + add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, + change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, + delete = { hl = "DiffDelete", text = "", numhl = "GitSignsDeleteNr" }, + topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, + changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" }, + }, + } - options = load_override(options, "lewis6991/gitsigns.nvim") - gitsigns.setup(options) + options = load_override(options, "lewis6991/gitsigns.nvim") + gitsigns.setup(options) end M.devicons = function() - local present, devicons = pcall(require, "nvim-web-devicons") + local present, devicons = pcall(require, "nvim-web-devicons") - if present then - require("base46").load_highlight "devicons" + if present then + require("base46").load_highlight "devicons" - local options = { override = require("nvchad_ui.icons").devicons } - options = require("core.utils").load_override(options, "kyazdani42/nvim-web-devicons") + local options = { override = require("nvchad_ui.icons").devicons } + options = require("core.utils").load_override(options, "kyazdani42/nvim-web-devicons") - devicons.setup(options) - end + devicons.setup(options) + end end return M diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index f0e27cc..03e1467 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -1,7 +1,7 @@ local present, telescope = pcall(require, "telescope") if not present then - return + return end vim.g.theme_switcher_loaded = true @@ -9,56 +9,56 @@ vim.g.theme_switcher_loaded = true require("base46").load_highlight "telescope" local options = { - defaults = { - vimgrep_arguments = { - "rg", - "--color=never", - "--no-heading", - "--with-filename", - "--line-number", - "--column", - "--smart-case", + defaults = { + vimgrep_arguments = { + "rg", + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + "--smart-case", + }, + prompt_prefix = "  ", + selection_caret = " ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "ascending", + layout_strategy = "horizontal", + layout_config = { + horizontal = { + prompt_position = "top", + preview_width = 0.55, + results_width = 0.8, }, - prompt_prefix = "  ", - selection_caret = " ", - entry_prefix = " ", - initial_mode = "insert", - selection_strategy = "reset", - sorting_strategy = "ascending", - layout_strategy = "horizontal", - layout_config = { - horizontal = { - prompt_position = "top", - preview_width = 0.55, - results_width = 0.8, - }, - vertical = { - mirror = false, - }, - width = 0.87, - height = 0.80, - preview_cutoff = 120, + vertical = { + mirror = false, }, - file_sorter = require("telescope.sorters").get_fuzzy_file, - file_ignore_patterns = { "node_modules" }, - generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, - path_display = { "truncate" }, - winblend = 0, - border = {}, - borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, - color_devicons = true, - set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, - file_previewer = require("telescope.previewers").vim_buffer_cat.new, - grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, - qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, - -- Developer configurations: Not meant for general override - buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, - mappings = { - n = { ["q"] = require("telescope.actions").close }, - }, - }, + width = 0.87, + height = 0.80, + preview_cutoff = 120, + }, + file_sorter = require("telescope.sorters").get_fuzzy_file, + file_ignore_patterns = { "node_modules" }, + generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, + path_display = { "truncate" }, + winblend = 0, + border = {}, + borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, + color_devicons = true, + set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, + file_previewer = require("telescope.previewers").vim_buffer_cat.new, + grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, + qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, + -- Developer configurations: Not meant for general override + buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, + mappings = { + n = { ["q"] = require("telescope.actions").close }, + }, + }, - extensions_list = { "themes", "terms" }, + extensions_list = { "themes", "terms" }, } -- check for any override @@ -67,7 +67,7 @@ telescope.setup(options) -- load extensions pcall(function() - for _, ext in ipairs(options.extensions_list) do - telescope.load_extension(ext) - end + for _, ext in ipairs(options.extensions_list) do + telescope.load_extension(ext) + end end) diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index 563c8c6..73476f0 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -1,20 +1,20 @@ local present, treesitter = pcall(require, "nvim-treesitter.configs") if not present then - return + return end require("base46").load_highlight "syntax" require("base46").load_highlight "treesitter" local options = { - ensure_installed = { - "lua", - }, - highlight = { - enable = true, - use_languagetree = true, - }, + ensure_installed = { + "lua", + }, + highlight = { + enable = true, + use_languagetree = true, + }, } -- check for any override diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index e29e385..7bc8ef4 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -1,39 +1,39 @@ local present, wk = pcall(require, "which-key") if not present then - return + return end require("base46").load_highlight "whichkey" local options = { - icons = { - breadcrumb = "»", -- symbol used in the command line area that shows your active key combo - separator = "  ", -- symbol used between a key and it's label - group = "+", -- symbol prepended to a group - }, + icons = { + breadcrumb = "»", -- symbol used in the command line area that shows your active key combo + separator = "  ", -- symbol used between a key and it's label + group = "+", -- symbol prepended to a group + }, - popup_mappings = { - scroll_down = "", -- binding to scroll down inside the popup - scroll_up = "", -- binding to scroll up inside the popup - }, + popup_mappings = { + scroll_down = "", -- binding to scroll down inside the popup + scroll_up = "", -- binding to scroll up inside the popup + }, - window = { - border = "none", -- none/single/double/shadow - }, + window = { + border = "none", -- none/single/double/shadow + }, - layout = { - spacing = 6, -- spacing between columns - }, + layout = { + spacing = 6, -- spacing between columns + }, - hidden = { "", "", "", "", "call", "lua", "^:", "^ " }, + hidden = { "", "", "", "", "call", "lua", "^:", "^ " }, - triggers_blacklist = { - -- list of mode / prefixes that should never be hooked by WhichKey - i = { "j", "k" }, - v = { "j", "k" }, - }, + triggers_blacklist = { + -- list of mode / prefixes that should never be hooked by WhichKey + i = { "j", "k" }, + v = { "j", "k" }, + }, } options = require("core.utils").load_override(options, "folke/which-key.nvim") diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index f8dc1bf..0c12e93 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -2,192 +2,192 @@ vim.cmd "packadd packer.nvim" local plugins = { - ["nvim-lua/plenary.nvim"] = { module = "plenary" }, - ["wbthomason/packer.nvim"] = {}, - ["NvChad/extensions"] = { module = { "telescope", "nvchad" } }, + ["nvim-lua/plenary.nvim"] = { module = "plenary" }, + ["wbthomason/packer.nvim"] = {}, + ["NvChad/extensions"] = { module = { "telescope", "nvchad" } }, - ["NvChad/base46"] = { - config = function() - local ok, base46 = pcall(require, "base46") + ["NvChad/base46"] = { + config = function() + local ok, base46 = pcall(require, "base46") - if ok then - base46.load_theme() - end - end, - }, + if ok then + base46.load_theme() + end + end, + }, - ["NvChad/ui"] = { - after = "base46", - config = function() - require("plugins.configs.nvchad_ui").load_ui_plugins() - end, - }, + ["NvChad/ui"] = { + after = "base46", + config = function() + require("plugins.configs.nvchad_ui").load_ui_plugins() + end, + }, - ["NvChad/nvterm"] = { - module = "nvterm", - config = function() - require "plugins.configs.nvterm" - end, - }, + ["NvChad/nvterm"] = { + module = "nvterm", + config = function() + require "plugins.configs.nvterm" + end, + }, - ["kyazdani42/nvim-web-devicons"] = { - module = "nvim-web-devicons", - config = function() - require("plugins.configs.others").devicons() - end, - }, + ["kyazdani42/nvim-web-devicons"] = { + module = "nvim-web-devicons", + config = function() + require("plugins.configs.others").devicons() + end, + }, - ["lukas-reineke/indent-blankline.nvim"] = { - opt = true, - setup = function() - require("core.lazy_load").on_file_open "indent-blankline.nvim" - end, - config = function() - require("plugins.configs.others").blankline() - end, - }, + ["lukas-reineke/indent-blankline.nvim"] = { + opt = true, + setup = function() + require("core.lazy_load").on_file_open "indent-blankline.nvim" + end, + config = function() + require("plugins.configs.others").blankline() + end, + }, - ["NvChad/nvim-colorizer.lua"] = { - opt = true, - setup = function() - require("core.lazy_load").colorizer() - end, - config = function() - require("plugins.configs.others").colorizer() - end, - }, + ["NvChad/nvim-colorizer.lua"] = { + opt = true, + setup = function() + require("core.lazy_load").colorizer() + end, + config = function() + require("plugins.configs.others").colorizer() + end, + }, - ["nvim-treesitter/nvim-treesitter"] = { - module = "nvim-treesitter", - setup = function() - require("core.lazy_load").on_file_open "nvim-treesitter" - end, - cmd = require("core.lazy_load").treesitter_cmds, - run = ":TSUpdate", - config = function() - require "plugins.configs.treesitter" - end, - }, + ["nvim-treesitter/nvim-treesitter"] = { + module = "nvim-treesitter", + setup = function() + require("core.lazy_load").on_file_open "nvim-treesitter" + end, + cmd = require("core.lazy_load").treesitter_cmds, + run = ":TSUpdate", + config = function() + require "plugins.configs.treesitter" + end, + }, - -- git stuff - ["lewis6991/gitsigns.nvim"] = { - ft = "gitcommit", - setup = function() - require("core.lazy_load").gitsigns() - end, - config = function() - require("plugins.configs.others").gitsigns() - end, - }, + -- git stuff + ["lewis6991/gitsigns.nvim"] = { + ft = "gitcommit", + setup = function() + require("core.lazy_load").gitsigns() + end, + config = function() + require("plugins.configs.others").gitsigns() + end, + }, - -- lsp stuff + -- lsp stuff - ["williamboman/nvim-lsp-installer"] = { - opt = true, - cmd = require("core.lazy_load").lsp_cmds, - setup = function() - require("core.lazy_load").on_file_open "nvim-lsp-installer" - end, - }, + ["williamboman/nvim-lsp-installer"] = { + opt = true, + cmd = require("core.lazy_load").lsp_cmds, + setup = function() + require("core.lazy_load").on_file_open "nvim-lsp-installer" + end, + }, - ["neovim/nvim-lspconfig"] = { - after = "nvim-lsp-installer", - module = "lspconfig", - config = function() - require "plugins.configs.lsp_installer" - require "plugins.configs.lspconfig" - end, - }, + ["neovim/nvim-lspconfig"] = { + after = "nvim-lsp-installer", + module = "lspconfig", + config = function() + require "plugins.configs.lsp_installer" + require "plugins.configs.lspconfig" + end, + }, - -- load luasnips + cmp related in insert mode only + -- load luasnips + cmp related in insert mode only - ["rafamadriz/friendly-snippets"] = { - module = "cmp_nvim_lsp", - event = "InsertEnter", - }, + ["rafamadriz/friendly-snippets"] = { + module = "cmp_nvim_lsp", + event = "InsertEnter", + }, - ["hrsh7th/nvim-cmp"] = { - after = "friendly-snippets", - config = function() - require "plugins.configs.cmp" - end, - }, + ["hrsh7th/nvim-cmp"] = { + after = "friendly-snippets", + config = function() + require "plugins.configs.cmp" + end, + }, - ["L3MON4D3/LuaSnip"] = { - wants = "friendly-snippets", - after = "nvim-cmp", - config = function() - require("plugins.configs.others").luasnip() - end, - }, + ["L3MON4D3/LuaSnip"] = { + wants = "friendly-snippets", + after = "nvim-cmp", + config = function() + require("plugins.configs.others").luasnip() + end, + }, - ["saadparwaiz1/cmp_luasnip"] = { - after = "LuaSnip", - }, + ["saadparwaiz1/cmp_luasnip"] = { + after = "LuaSnip", + }, - ["hrsh7th/cmp-nvim-lua"] = { - after = "cmp_luasnip", - }, + ["hrsh7th/cmp-nvim-lua"] = { + after = "cmp_luasnip", + }, - ["hrsh7th/cmp-nvim-lsp"] = { - after = "cmp-nvim-lua", - }, + ["hrsh7th/cmp-nvim-lsp"] = { + after = "cmp-nvim-lua", + }, - ["hrsh7th/cmp-buffer"] = { - after = "cmp-nvim-lsp", - }, + ["hrsh7th/cmp-buffer"] = { + after = "cmp-nvim-lsp", + }, - ["hrsh7th/cmp-path"] = { - after = "cmp-buffer", - }, + ["hrsh7th/cmp-path"] = { + after = "cmp-buffer", + }, - -- misc plugins - ["windwp/nvim-autopairs"] = { - after = "nvim-cmp", - config = function() - require("plugins.configs.others").autopairs() - end, - }, + -- misc plugins + ["windwp/nvim-autopairs"] = { + after = "nvim-cmp", + config = function() + require("plugins.configs.others").autopairs() + end, + }, - ["goolord/alpha-nvim"] = { - after = "base46", - disable = true, - config = function() - require "plugins.configs.alpha" - end, - }, + ["goolord/alpha-nvim"] = { + after = "base46", + disable = true, + config = function() + require "plugins.configs.alpha" + end, + }, - ["numToStr/Comment.nvim"] = { - module = "Comment", - keys = { "gc", "gb" }, - config = function() - require("plugins.configs.others").comment() - end, - }, + ["numToStr/Comment.nvim"] = { + module = "Comment", + keys = { "gc", "gb" }, + config = function() + require("plugins.configs.others").comment() + end, + }, - -- file managing , picker etc - ["kyazdani42/nvim-tree.lua"] = { - ft = "alpha", - cmd = { "NvimTreeToggle", "NvimTreeFocus" }, - config = function() - require "plugins.configs.nvimtree" - end, - }, + -- file managing , picker etc + ["kyazdani42/nvim-tree.lua"] = { + ft = "alpha", + cmd = { "NvimTreeToggle", "NvimTreeFocus" }, + config = function() + require "plugins.configs.nvimtree" + end, + }, - ["nvim-telescope/telescope.nvim"] = { - cmd = "Telescope", - config = function() - require "plugins.configs.telescope" - end, - }, + ["nvim-telescope/telescope.nvim"] = { + cmd = "Telescope", + config = function() + require "plugins.configs.telescope" + end, + }, - -- Only load whichkey after all the gui - ["folke/which-key.nvim"] = { - module = "which-key", - config = function() - require "plugins.configs.whichkey" - end, - }, + -- Only load whichkey after all the gui + ["folke/which-key.nvim"] = { + module = "which-key", + config = function() + require "plugins.configs.whichkey" + end, + }, } require("core.packer").run(plugins) From 6a789fa37df1deecaefd18337ab84aef331b5095 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 24 Jul 2022 07:35:12 +0000 Subject: [PATCH 1189/1541] breaking change for option overriders | rm un-necessary things from config Put all your options in custom/init.lua --- examples/init.lua | 4 ++-- lua/core/default_config.lua | 3 --- lua/core/options.lua | 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/examples/init.lua b/examples/init.lua index 809432d..3dccbd2 100644 --- a/examples/init.lua +++ b/examples/init.lua @@ -1,3 +1,3 @@ -- example file i.e lua/custom/init.lua - --- load your globals, autocmds here or anything .__. +-- load your options globals, autocmds here or anything .__. +-- you can even override default options here (core/options.lua) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 755a134..43ece40 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -3,9 +3,6 @@ local M = {} M.options = { - -- load your options here or load module with options - user = function() end, - nvChad = { update_url = "https://github.com/NvChad/NvChad", update_branch = "main", diff --git a/lua/core/options.lua b/lua/core/options.lua index 793d483..b2dbdbf 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -104,6 +104,3 @@ vim.schedule(function() vim.opt.shadafile = vim.fn.expand "$HOME" .. "/.local/share/nvim/shada/main.shada" vim.cmd [[ silent! rsh ]] end) - --- load user options -config.options.user() From 2b55f9bb7856aad4cd92c1bf2251ac9088a31c9f Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 24 Jul 2022 10:17:46 +0000 Subject: [PATCH 1190/1541] rm un-needed nvim-colorizer lazyloading function --- lua/core/lazy_load.lua | 12 ------------ lua/plugins/init.lua | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 0237897..a4018b0 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -25,18 +25,6 @@ M.lazy_load = function(tb) }) end -M.colorizer = function() - M.lazy_load { - events = { "BufRead", "BufNewFile" }, - augroup_name = "ColorizerLazy", - plugins = "nvim-colorizer.lua", - - condition = function() - return true - end, - } -end - -- load certain plugins only when there's a file opened in the buffer -- if "nvim filename" is executed -> load the plugin after nvim gui loads -- This gives an instant preview of nvim with the file opened diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 0c12e93..43636c1 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -50,7 +50,7 @@ local plugins = { ["NvChad/nvim-colorizer.lua"] = { opt = true, setup = function() - require("core.lazy_load").colorizer() + require("core.lazy_load").on_file_open "nvim-colorizer.lua" end, config = function() require("plugins.configs.others").colorizer() From 26fc9b5a6ce811a020c096922152e6e845fd0a3a Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 24 Jul 2022 10:45:14 +0000 Subject: [PATCH 1191/1541] Breaking change : easen up custom lspconfig setup before we were using variables/fields to setup custom lspconfig but today I realized that we dont even need that, we can just modify default lspconfigs config --- lua/core/default_config.lua | 5 ----- lua/plugins/configs/lspconfig.lua | 16 ++++++---------- lua/plugins/init.lua | 2 -- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 43ece40..17444b0 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -23,11 +23,6 @@ M.plugins = { override = {}, remove = {}, user = {}, - options = { - lspconfig = { - setup_lspconf = "", -- path of lspconfig file - }, - }, } -- check core.mappings for table structure diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 6f7547b..ecb376a 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -6,10 +6,13 @@ end require("base46").load_highlight "lsp" require "nvchad_ui.lsp" +require "plugins.configs.lsp_installer" local M = {} local utils = require "core.utils" +-- export on_attach & capabilities for custom lspconfigs + M.on_attach = function(client, bufnr) local vim_version = vim.version() @@ -31,9 +34,9 @@ M.on_attach = function(client, bufnr) end end -local capabilities = vim.lsp.protocol.make_client_capabilities() +M.capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities.textDocument.completion.completionItem = { +M.capabilities.textDocument.completion.completionItem = { documentationFormat = { "markdown", "plaintext" }, snippetSupport = true, preselectSupport = true, @@ -53,7 +56,7 @@ capabilities.textDocument.completion.completionItem = { lspconfig.sumneko_lua.setup { on_attach = M.on_attach, - capabilities = capabilities, + capabilities = M.capabilities, settings = { Lua = { @@ -72,11 +75,4 @@ lspconfig.sumneko_lua.setup { }, } --- requires a file containing user's lspconfigs -local addlsp_confs = utils.load_config().plugins.options.lspconfig.setup_lspconf - -if #addlsp_confs ~= 0 then - require(addlsp_confs).setup_lsp(M.on_attach, capabilities) -end - return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 43636c1..f245359 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -83,7 +83,6 @@ local plugins = { -- lsp stuff ["williamboman/nvim-lsp-installer"] = { - opt = true, cmd = require("core.lazy_load").lsp_cmds, setup = function() require("core.lazy_load").on_file_open "nvim-lsp-installer" @@ -94,7 +93,6 @@ local plugins = { after = "nvim-lsp-installer", module = "lspconfig", config = function() - require "plugins.configs.lsp_installer" require "plugins.configs.lspconfig" end, }, From 5d4c51127c4baffa37757de9f5ec816adf4eb690 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 24 Jul 2022 17:00:09 +0000 Subject: [PATCH 1192/1541] clean stuff https://github.com/NvChad/ui/commit/5501044bfddb58ff43143fbda4b2c67141d0d90f --- lua/plugins/configs/nvchad_ui.lua | 40 ------------------------------- lua/plugins/configs/others.lua | 8 +++++++ lua/plugins/init.lua | 2 +- 3 files changed, 9 insertions(+), 41 deletions(-) delete mode 100644 lua/plugins/configs/nvchad_ui.lua diff --git a/lua/plugins/configs/nvchad_ui.lua b/lua/plugins/configs/nvchad_ui.lua deleted file mode 100644 index e19d87e..0000000 --- a/lua/plugins/configs/nvchad_ui.lua +++ /dev/null @@ -1,40 +0,0 @@ -local present, _ = pcall(require, "nvchad_ui") - -if not present then - return -end - -local options = { - - statusline = { - separator_style = "default", -- default/round/block/arrow - overriden_modules = nil, - }, - - -- lazyload it when there are 1+ buffers - tabufline = { - enabled = true, - lazyload = true, - overriden_modules = nil, - }, -} - -options = require("core.utils").load_override(options, "NvChad/ui") - -require "nvchad_ui.tabufline.lazyload"(options.tabufline) - --- ignore this as it might scare you XD -return { - statusline = function() - return require("nvchad_ui.statusline").setup(options) - end, - - tabufline = function() - return require("nvchad_ui.tabufline").setup(options) - end, - - load_ui_plugins = function() - vim.opt.statusline = "%!v:lua.require('plugins.configs.nvchad_ui').statusline()" - vim.opt.tabline = "%!v:lua.require('plugins.configs.nvchad_ui').tabufline()" - end, -} diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 0b2e255..3272f8a 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -2,6 +2,14 @@ local M = {} local load_override = require("core.utils").load_override +M.nvchad_ui = function() + local present, nvchad_ui = pcall(require, "nvchad_ui") + + if present then + nvchad_ui.setup() + end +end + M.autopairs = function() local present1, autopairs = pcall(require, "nvim-autopairs") local present2, cmp = pcall(require, "cmp") diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index f245359..729c0de 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -19,7 +19,7 @@ local plugins = { ["NvChad/ui"] = { after = "base46", config = function() - require("plugins.configs.nvchad_ui").load_ui_plugins() + require("plugins.configs.others").nvchad_ui() end, }, From a83ebc34e547c0e28022e2a5f414deaba22c485f Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 25 Jul 2022 13:49:33 +0000 Subject: [PATCH 1193/1541] Breaking Change : LSPInstaller is dead so use mason.nvim (#1368) --- lua/core/init.lua | 3 +++ lua/core/lazy_load.lua | 37 ++++++++++++--------------- lua/plugins/configs/lsp_installer.lua | 36 -------------------------- lua/plugins/configs/lspconfig.lua | 1 - lua/plugins/configs/mason.lua | 36 ++++++++++++++++++++++++++ lua/plugins/configs/others.lua | 2 +- lua/plugins/init.lua | 14 +++++----- 7 files changed, 64 insertions(+), 65 deletions(-) delete mode 100644 lua/plugins/configs/lsp_installer.lua create mode 100644 lua/plugins/configs/mason.lua diff --git a/lua/core/init.lua b/lua/core/init.lua index 4ec415e..1dbb4c3 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -1,3 +1,6 @@ +-- add binaries installed by mason.nvim to path +vim.env.PATH = vim.env.PATH .. ":" .. vim.fn.stdpath "data" .. "/mason/bin" + -- commands vim.cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" vim.cmd "silent! command! NvChadSnapshotCreate lua require('nvchad').snap_create()" diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index a4018b0..68b9df9 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -1,11 +1,11 @@ local M = {} local autocmd = vim.api.nvim_create_autocmd +-- require("packer").loader(tb.plugins) -- This must be used for plugins that need to be loaded just after a file -- ex : treesitter, lspconfig etc M.lazy_load = function(tb) autocmd(tb.events, { - pattern = "*", group = vim.api.nvim_create_augroup(tb.augroup_name, {}), callback = function() if tb.condition() then @@ -13,12 +13,15 @@ M.lazy_load = function(tb) -- dont defer for treesitter as it will show slow highlighting -- This deferring only happens only when we do "nvim filename" - if tb.plugins ~= "nvim-treesitter" then + if tb.plugin ~= "nvim-treesitter" then vim.defer_fn(function() - vim.cmd("PackerLoad " .. tb.plugins) + require("packer").loader(tb.plugin) + if tb.plugin == "nvim-lspconfig" then + vim.cmd "silent! e %" + end end, 0) else - vim.cmd("PackerLoad " .. tb.plugins) + require("packer").loader(tb.plugin) end end end, @@ -33,7 +36,7 @@ M.on_file_open = function(plugin_name) M.lazy_load { events = { "BufRead", "BufWinEnter", "BufNewFile" }, augroup_name = "BeLazyOnFileOpen" .. plugin_name, - plugins = plugin_name, + plugin = plugin_name, condition = function() local file = vim.fn.expand "%" return file ~= "NvimTree_1" and file ~= "[packer]" and file ~= "" @@ -41,22 +44,6 @@ M.on_file_open = function(plugin_name) } end --- lspinstaller & lspconfig cmds for lazyloading -M.lsp_cmds = { - "LspInfo", - "LspStart", - "LspRestart", - "LspStop", - "LspInstall", - "LspUnInstall", - "LspUnInstallAll", - "LspInstall", - "LspInstallInfo", - "LspInstallLog", - "LspLog", - "LspPrintInstalled", -} - M.treesitter_cmds = { "TSInstall", "TSBufEnable", @@ -66,6 +53,14 @@ M.treesitter_cmds = { "TSModuleInfo", } +M.mason_cmds = { + "Mason", + "MasonInstall", + "MasonUninstall", + "MasonUninstallAll", + "MasonLog", +} + M.gitsigns = function() -- taken from https://github.com/max397574 autocmd({ "BufRead" }, { diff --git a/lua/plugins/configs/lsp_installer.lua b/lua/plugins/configs/lsp_installer.lua deleted file mode 100644 index 3afe108..0000000 --- a/lua/plugins/configs/lsp_installer.lua +++ /dev/null @@ -1,36 +0,0 @@ -local present, lsp_installer = pcall(require, "nvim-lsp-installer") - -if not present then - return -end - -local options = { - -- ensure_installed is not needed as automatic_installation is enabled - -- then any lsp server you setup by lspconfig is going to get installed automatically! - - -- ensure_installed = { "lua" }, - automatic_installation = true, - - ui = { - icons = { - server_installed = " ", - server_pending = " ", - server_uninstalled = " ﮊ", - }, - keymaps = { - toggle_server_expand = "", - install_server = "i", - update_server = "u", - check_server_version = "c", - update_all_servers = "U", - check_outdated_servers = "C", - uninstall_server = "X", - }, - }, - - max_concurrent_installers = 10, -} - -options = require("core.utils").load_override(options, "williamboman/nvim-lsp-installer") - -lsp_installer.setup(options) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index ecb376a..f69c5c3 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -6,7 +6,6 @@ end require("base46").load_highlight "lsp" require "nvchad_ui.lsp" -require "plugins.configs.lsp_installer" local M = {} local utils = require "core.utils" diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua new file mode 100644 index 0000000..6c2a800 --- /dev/null +++ b/lua/plugins/configs/mason.lua @@ -0,0 +1,36 @@ +local present, mason = pcall(require, "mason") + +if not present then + return +end + +require("base46").load_highlight "mason" + +local options = { + ensure_installed = { "pyright" }, + + ui = { + icons = { + package_pending = " ", + package_installed = " ", + package_uninstalled = " ﮊ", + }, + + keymaps = { + toggle_server_expand = "", + install_server = "i", + update_server = "u", + check_server_version = "c", + update_all_servers = "U", + check_outdated_servers = "C", + uninstall_server = "X", + cancel_installation = "", + }, + }, + + max_concurrent_installers = 10, +} + +options = require("core.utils").load_override(options, "williamboman/mason") + +mason.setup(options) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 3272f8a..a8d4283 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -49,7 +49,7 @@ M.blankline = function() "lspinfo", "TelescopePrompt", "TelescopeResults", - "lsp-installer", + "Mason", "", }, buftype_exclude = { "terminal" }, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 729c0de..3757141 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -82,16 +82,18 @@ local plugins = { -- lsp stuff - ["williamboman/nvim-lsp-installer"] = { - cmd = require("core.lazy_load").lsp_cmds, - setup = function() - require("core.lazy_load").on_file_open "nvim-lsp-installer" + ["williamboman/mason.nvim"] = { + cmd = require("core.lazy_load").mason_cmds, + config = function() + require "plugins.configs.mason" end, }, ["neovim/nvim-lspconfig"] = { - after = "nvim-lsp-installer", - module = "lspconfig", + opt = true, + setup = function() + require("core.lazy_load").on_file_open "nvim-lspconfig" + end, config = function() require "plugins.configs.lspconfig" end, From fd30351b0d2e8e2379f3d556208d6b49958121f0 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 25 Jul 2022 14:25:31 +0000 Subject: [PATCH 1194/1541] add cmd to install all mason.nvim packages --- lua/core/lazy_load.lua | 1 + lua/plugins/configs/mason.lua | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 68b9df9..fccb152 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -56,6 +56,7 @@ M.treesitter_cmds = { M.mason_cmds = { "Mason", "MasonInstall", + "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog", diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua index 6c2a800..50c6855 100644 --- a/lua/plugins/configs/mason.lua +++ b/lua/plugins/configs/mason.lua @@ -7,7 +7,7 @@ end require("base46").load_highlight "mason" local options = { - ensure_installed = { "pyright" }, + ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim ui = { icons = { @@ -33,4 +33,8 @@ local options = { options = require("core.utils").load_override(options, "williamboman/mason") +vim.api.nvim_create_user_command("MasonInstallAll", function() + vim.cmd("MasonInstall " .. table.concat(options.ensure_installed, " ")) +end, {}) + mason.setup(options) From 45f3a0e32da3890d0e2d06e53cb002aa99c6ab76 Mon Sep 17 00:00:00 2001 From: Roberto Silva <97632716+luovkle@users.noreply.github.com> Date: Mon, 25 Jul 2022 12:44:35 -0500 Subject: [PATCH 1195/1541] Update README.md --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index 38b7769..90783f6 100644 --- a/.github/README.md +++ b/.github/README.md @@ -116,7 +116,7 @@ NeoVim Treesitter configurations and abstraction layer. We mostly use this for s - Managing tabs, buffers with [bufferline.nvim](https://github.com/akinsho/bufferline.nvim) - Beautiful and configurable icons with [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) - Git diffs and more with [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) -- NeoVim Lsp configuration with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) and [lsp-installer](https://github.com/williamboman/nvim-lsp-installer/) +- NeoVim Lsp configuration with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) and [mason.nvim](https://github.com/williamboman/mason.nvim) - Autocompletion with [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) - File searching, previewing image and text files and more with [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim). - Syntax highlighting with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) From be5fe4ea62985797ff1c4518e1bfbbcabfa531c6 Mon Sep 17 00:00:00 2001 From: Ryan Caezar Itang Date: Tue, 26 Jul 2022 09:27:50 +0800 Subject: [PATCH 1196/1541] fix: meson.nvim override typo --- lua/plugins/configs/mason.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua index 50c6855..f91077f 100644 --- a/lua/plugins/configs/mason.lua +++ b/lua/plugins/configs/mason.lua @@ -31,7 +31,7 @@ local options = { max_concurrent_installers = 10, } -options = require("core.utils").load_override(options, "williamboman/mason") +options = require("core.utils").load_override(options, "williamboman/mason.nvim") vim.api.nvim_create_user_command("MasonInstallAll", function() vim.cmd("MasonInstall " .. table.concat(options.ensure_installed, " ")) From a522cebca81ee8f472701de3fd24296ede8377bd Mon Sep 17 00:00:00 2001 From: ahhshm <87268103+ahhshm@users.noreply.github.com> Date: Tue, 26 Jul 2022 11:10:27 +0430 Subject: [PATCH 1197/1541] fix(options): don't set `did_load_filetypes` in neovim nightly Lua filetype detection is enabled by default in neovim nightly so we don't need those two options. The reason we can't simply override them in `custom/init.lua` is that setting `did_load_filetypes` to any value, completely disables filetype detection (and therefore syntax highlighting) and this may confuse people that use neovim nightly. I know NvChad doesn't officially support neovim nightly but people may want to try it to see the new features and this PR makes their life easier. Also, you do a similar check in `plugins/configs/lspconfig.lua` so I thought it's ok :) --- lua/core/options.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index b2dbdbf..d8f7fe7 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -1,15 +1,19 @@ local opt = vim.opt local g = vim.g local config = require("core.utils").load_config() +local vim_version = vim.version() g.nvchad_theme = config.ui.theme g.toggle_theme_icon = "  " g.transparency = config.ui.transparency g.theme_switcher_loaded = false --- use filetype.lua instead of filetype.vim -g.did_load_filetypes = 0 -g.do_filetype_lua = 1 +-- use filetype.lua instead of filetype.vim. it's enabled by default in neovim 0.8 (nightly) +if vim_version.minor < 8 then + g.did_load_filetypes = 0 + g.do_filetype_lua = 1 +end + opt.laststatus = 3 -- global statusline opt.showmode = false From 8eb56b66442b7ade74d68adab69fbf6fb1834ed1 Mon Sep 17 00:00:00 2001 From: Lilin Lao Date: Tue, 26 Jul 2022 15:22:16 +0800 Subject: [PATCH 1198/1541] Fix windows env path separator Fix: mason installed binaries path appended to env.PATH when os is windows, the env path separator is ";". --- lua/core/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 1dbb4c3..a26beb5 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -1,5 +1,6 @@ -- add binaries installed by mason.nvim to path -vim.env.PATH = vim.env.PATH .. ":" .. vim.fn.stdpath "data" .. "/mason/bin" +local is_windows = vim.loop.os_uname().sysname == "Windows_NT" +vim.env.PATH = vim.env.PATH .. (is_windows and ";" or ":") .. vim.fn.stdpath "data" .. "/mason/bin" -- commands vim.cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" From 429ce94da17d850ea022cf7bf188ec676e4c7be7 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 26 Jul 2022 13:05:58 +0000 Subject: [PATCH 1199/1541] store vim version in global for v0.8 compatibility checks so we dont have to run vim.version() function in many places of the config cuz we will be making nvchad 0.8 compatible too bit by bit --- lua/core/options.lua | 4 ++-- lua/plugins/configs/lspconfig.lua | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index d8f7fe7..6673303 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -1,15 +1,15 @@ local opt = vim.opt local g = vim.g local config = require("core.utils").load_config() -local vim_version = vim.version() +g.vim_version = vim.version().minor g.nvchad_theme = config.ui.theme g.toggle_theme_icon = "  " g.transparency = config.ui.transparency g.theme_switcher_loaded = false -- use filetype.lua instead of filetype.vim. it's enabled by default in neovim 0.8 (nightly) -if vim_version.minor < 8 then +if g.vim_version < 8 then g.did_load_filetypes = 0 g.do_filetype_lua = 1 end diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index f69c5c3..4b83eab 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -13,9 +13,7 @@ local utils = require "core.utils" -- export on_attach & capabilities for custom lspconfigs M.on_attach = function(client, bufnr) - local vim_version = vim.version() - - if vim_version.minor > 7 then + if vim.g.vim_version > 7 then -- nightly client.server_capabilities.documentFormattingProvider = false client.server_capabilities.documentRangeFormattingProvider = false From 817aeea9a12ccef2656499fa3d065e7e6b620954 Mon Sep 17 00:00:00 2001 From: tomasky Date: Tue, 26 Jul 2022 17:22:26 +0800 Subject: [PATCH 1200/1541] fix(0.8): :bug: update session data dir in neovim nightly Nvim now stores "session data" (shada, persistent undo, ...) in $XDG_STATE_HOME (~/.local/state) --- lua/core/options.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index 6673303..60b91db 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -14,7 +14,6 @@ if g.vim_version < 8 then g.do_filetype_lua = 1 end - opt.laststatus = 3 -- global statusline opt.showmode = false @@ -105,6 +104,6 @@ end -- set shada path vim.schedule(function() - vim.opt.shadafile = vim.fn.expand "$HOME" .. "/.local/share/nvim/shada/main.shada" + vim.opt.shadafile = vim.fn.stdpath(g.vim_version > 7 and "state" or "data") .. "/shada/main.shada" vim.cmd [[ silent! rsh ]] end) From 4a2d344de4061ea0b39f0093ecee3373a84150c6 Mon Sep 17 00:00:00 2001 From: tomasky Date: Wed, 27 Jul 2022 20:37:12 +0800 Subject: [PATCH 1201/1541] chore: update issue template --- .github/ISSUE_TEMPLATE/bug_report.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 470452f..43b4ec0 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,6 +7,8 @@ assignees: '' --- + + **Describe the bug** A clear and concise description of what the bug is. From 27f01cbb105f618b6abd64463edb30738cc69337 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 30 Jul 2022 08:42:18 +0530 Subject: [PATCH 1202/1541] make alpha.nvim options structure match to all other plugin config options this was creating confusion among people those who override alpha-nvim config --- lua/plugins/configs/alpha.lua | 67 +++++++++++++++++------------------ 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/lua/plugins/configs/alpha.lua b/lua/plugins/configs/alpha.lua index 92191b8..1572aa9 100644 --- a/lua/plugins/configs/alpha.lua +++ b/lua/plugins/configs/alpha.lua @@ -34,43 +34,42 @@ local function button(sc, txt, keybind) } end -local options = {} +local options = { -local ascii = { - " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", - " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", - " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", - " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", - " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", - " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", - " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", - " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", - " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", - " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", - " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", -} - -options.header = { - type = "text", - val = ascii, - opts = { - position = "center", - hl = "AlphaHeader", + header = { + type = "text", + val = { + " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", + " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", + " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", + " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", + " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", + " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", + " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", + " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", + " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", + " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", + " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", + }, + opts = { + position = "center", + hl = "AlphaHeader", + }, }, -} -options.buttons = { - type = "group", - val = { - button("SPC f f", " Find File ", ":Telescope find_files"), - button("SPC f o", " Recent File ", ":Telescope oldfiles"), - button("SPC f w", " Find Word ", ":Telescope live_grep"), - button("SPC b m", " Bookmarks ", ":Telescope marks"), - button("SPC t h", " Themes ", ":Telescope themes"), - button("SPC e s", " Settings", ":e $MYVIMRC | :cd %:p:h "), - }, - opts = { - spacing = 1, + buttons = { + type = "group", + val = { + button("SPC f f", " Find File ", ":Telescope find_files"), + button("SPC f o", " Recent File ", ":Telescope oldfiles"), + button("SPC f w", " Find Word ", ":Telescope live_grep"), + button("SPC b m", " Bookmarks ", ":Telescope marks"), + button("SPC t h", " Themes ", ":Telescope themes"), + button("SPC e s", " Settings", ":e $MYVIMRC | :cd %:p:h "), + }, + opts = { + spacing = 1, + }, }, } From 243552c21e87be32d0e4ec45ca60e06039eb2198 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 30 Jul 2022 16:01:47 +0530 Subject: [PATCH 1203/1541] override mason.nvim higlights with an autocmd temporarily https://github.com/williamboman/mason.nvim/discussions/133 --- lua/plugins/configs/mason.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua index f91077f..5546340 100644 --- a/lua/plugins/configs/mason.lua +++ b/lua/plugins/configs/mason.lua @@ -4,7 +4,14 @@ if not present then return end -require("base46").load_highlight "mason" +vim.api.nvim_create_augroup("_mason", { clear = true }) +vim.api.nvim_create_autocmd("Filetype", { + pattern = "mason.nvim", + callback = function() + require("base46").load_highlight "mason" + end, + group = "_mason", +}) local options = { ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim From f51e91a391218d0aae70b52faaa3eb999d8eb2b4 Mon Sep 17 00:00:00 2001 From: tomasky Date: Sun, 31 Jul 2022 22:35:43 +0800 Subject: [PATCH 1204/1541] fix(lsp): lsp on_attach was not called at normal mode --- lua/core/lazy_load.lua | 2 +- lua/plugins/init.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index fccb152..84d5f00 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -17,7 +17,7 @@ M.lazy_load = function(tb) vim.defer_fn(function() require("packer").loader(tb.plugin) if tb.plugin == "nvim-lspconfig" then - vim.cmd "silent! e %" + vim.cmd "silent! do FileType" end end, 0) else diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 3757141..7a8b8f5 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -18,6 +18,7 @@ local plugins = { ["NvChad/ui"] = { after = "base46", + module = "nvchad_ui", config = function() require("plugins.configs.others").nvchad_ui() end, From 60fb7fd0a93f56a5a9d6aa5a323bf80b1d9d3a94 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 1 Aug 2022 14:00:06 +0530 Subject: [PATCH 1205/1541] load webdevicons plugin after nvchad_ui --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 7a8b8f5..298e3cf 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -18,7 +18,6 @@ local plugins = { ["NvChad/ui"] = { after = "base46", - module = "nvchad_ui", config = function() require("plugins.configs.others").nvchad_ui() end, @@ -32,6 +31,7 @@ local plugins = { }, ["kyazdani42/nvim-web-devicons"] = { + after = 'ui', module = "nvim-web-devicons", config = function() require("plugins.configs.others").devicons() From d8b966730cdb8f245613b2f2ae91b8039ba2d827 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 2 Aug 2022 20:21:40 +0530 Subject: [PATCH 1206/1541] remove useless mappings | gt & gT already exists --- lua/core/mappings.lua | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index d44c73f..53793a9 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -83,12 +83,19 @@ M.tabufline = { [""] = { " enew ", "烙 new buffer" }, -- cycle through buffers - [""] = { " Tbufnext ", " goto next buffer" }, - [""] = { " Tbufprev ", " goto prev buffer" }, + [""] = { + function() + require("core.utils").tabuflineNext() + end, + " goto next buffer", + }, - -- cycle through tabs - ["tp"] = { " tabprevious ", " goto next tab" }, - ["tn"] = { " tabnext ", " goto prev tab" }, + [""] = { + function() + require("core.utils").tabuflinePrev() + end, + " goto prev buffer", + }, -- close buffer + hide terminal buffer ["x"] = { From cf5e7e9811250364c9bd3fa37230c377d904e61e Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 2 Aug 2022 21:11:18 +0530 Subject: [PATCH 1207/1541] add mapping for tbufpick command --- lua/core/mappings.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 53793a9..31d194d 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -104,6 +104,9 @@ M.tabufline = { end, " close buffer", }, + + -- pick buffers via numbers + [""] = { " TbufPick ", " Pick buffer" }, }, } From df3ae31e941a06fd4fe22f565598626460979002 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 6 Aug 2022 08:19:14 +0530 Subject: [PATCH 1208/1541] simplify gitsigns lazyloading --- lua/core/lazy_load.lua | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 84d5f00..049813d 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -63,25 +63,12 @@ M.mason_cmds = { } M.gitsigns = function() - -- taken from https://github.com/max397574 autocmd({ "BufRead" }, { callback = function() - local function onexit(code, _) - if code == 0 then - vim.schedule(function() - require("packer").loader "gitsigns.nvim" - end) - end - end - local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false) - if lines ~= { "" } then - vim.loop.spawn("git", { - args = { - "ls-files", - "--error-unmatch", - vim.fn.expand "%:p:h", - }, - }, onexit) + if vim.fn.isdirectory ".git" ~= 0 then + vim.schedule(function() + require("packer").loader "gitsigns.nvim" + end) end end, }) From 5bd4282835affed72696f53f67eb2f5126e78780 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 29 Jul 2022 13:57:08 +0530 Subject: [PATCH 1209/1541] cmp: load if cmp module is called --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 298e3cf..8224e92 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -103,7 +103,7 @@ local plugins = { -- load luasnips + cmp related in insert mode only ["rafamadriz/friendly-snippets"] = { - module = "cmp_nvim_lsp", + module = { "cmp", "cmp_nvim_lsp" }, event = "InsertEnter", }, From d7b97dfe63f47590021e47bdf19f70009015ccc0 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 6 Aug 2022 20:59:40 +0530 Subject: [PATCH 1210/1541] utils: Improve remove_default_keys function undo this black magic --- lua/core/utils.lua | 52 +++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index c54d4c2..7fd7fc3 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -22,8 +22,8 @@ M.load_config = function() if chadrc_exists then -- merge user config if it exists and is a table; otherwise display an error if type(chadrc) == "table" then - M.remove_default_keys() - config = merge_tb("force", config, chadrc) + config.mappings = M.remove_default_keys(chadrc.mappings.disabled or nil, config.mappings) + config = merge_tb("force", config, chadrc) or {} else error "chadrc must return a table!" end @@ -33,35 +33,35 @@ M.load_config = function() return config end -M.remove_default_keys = function() - local chadrc = require "custom.chadrc" - local user_mappings = chadrc.mappings or {} - local user_keys = {} - local user_sections = vim.tbl_keys(user_mappings) - - -- push user_map keys in user_keys table - for _, section in ipairs(user_sections) do - user_keys = vim.tbl_deep_extend("force", user_keys, user_mappings[section]) +M.remove_default_keys = function(disabled_mappings, default_mappings) + if not disabled_mappings then + return default_mappings end - local function disable_key(mode, keybind, mode_mapping) - local keys_in_mode = vim.tbl_keys(user_keys[mode] or {}) - - if vim.tbl_contains(keys_in_mode, keybind) then - mode_mapping[keybind] = nil - end - end - - local default_mappings = require("core.default_config").mappings - - -- remove user_maps from default mapping table - for _, section_mappings in pairs(default_mappings) do - for mode, mode_mapping in pairs(section_mappings) do - for keybind, _ in pairs(mode_mapping) do - disable_key(mode, keybind, mode_mapping) + -- store keys in a array with true value to compare + local keys_to_disable = {} + for _, section_keys in pairs(disabled_mappings) do + if type(section_keys) == "table" then + for k, _ in pairs(section_keys) do + keys_to_disable[k] = true end end end + + -- make a copy as we need to modify default_mappings + for section_name, section_mappings in pairs(default_mappings) do + section_mappings.plugin = nil + for mode, mode_mapping in pairs(section_mappings) do + for k, _ in pairs(mode_mapping) do + -- if key if found then remove from default_mappings + if keys_to_disable[k] then + default_mappings[section_name][mode][k] = nil + end + end + end + end + + return default_mappings end M.load_mappings = function(mappings, mapping_opt) From f4655e13ec0f0d905d2eabfe5c2cc1fe036cebf3 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 4 Aug 2022 20:02:16 +0530 Subject: [PATCH 1211/1541] mappings: Only set mappings if the plugin is enabled format files fix some lsp warnings --- lua/core/mappings.lua | 45 +++++++++++++++---------------- lua/core/utils.lua | 28 ++++++++++++------- lua/plugins/configs/lspconfig.lua | 3 +-- lua/plugins/configs/whichkey.lua | 10 ------- lua/plugins/init.lua | 24 ++++++++++++++++- 5 files changed, 65 insertions(+), 45 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 31d194d..9d94c06 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -8,7 +8,6 @@ local M = {} M.general = { i = { - -- go to beginning and end [""] = { "^i", "論 beginning of line" }, [""] = { "", "壟 end of line" }, @@ -21,7 +20,6 @@ M.general = { }, n = { - [""] = { " noh ", " no highlight" }, -- switch between windows @@ -47,7 +45,6 @@ M.general = { function() require("base46").toggle_theme() end, - " toggle theme", }, @@ -59,11 +56,20 @@ M.general = { ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, + + -- new buffer + [""] = { " enew ", "烙 new buffer" }, + + -- close buffer + hide terminal buffer + ["x"] = { + function() + require("core.utils").close_buffer() + end, + " close buffer", + }, }, - t = { - [""] = { termcodes "", " escape terminal mode" }, - }, + t = { [""] = { termcodes "", " escape terminal mode" } }, v = { ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, @@ -77,11 +83,8 @@ M.general = { } M.tabufline = { - + plugin = true, n = { - -- new buffer - [""] = { " enew ", "烙 new buffer" }, - -- cycle through buffers [""] = { function() @@ -97,28 +100,19 @@ M.tabufline = { " goto prev buffer", }, - -- close buffer + hide terminal buffer - ["x"] = { - function() - require("core.utils").close_buffer() - end, - " close buffer", - }, - -- pick buffers via numbers [""] = { " TbufPick ", " Pick buffer" }, }, } M.comment = { - + plugin = true, -- toggle comment in both modes n = { ["/"] = { function() require("Comment.api").toggle_current_linewise() end, - "蘒 toggle comment", }, }, @@ -132,6 +126,7 @@ M.comment = { } M.lspconfig = { + plugin = true, -- See ` :help vim.lsp.*` for documentation on any of the below functions n = { @@ -193,7 +188,7 @@ M.lspconfig = { ["gr"] = { function() - vim.lsp.buf.references() + vim.lsp.buf.references {} end, " lsp references", }, @@ -228,7 +223,7 @@ M.lspconfig = { ["fm"] = { function() - vim.lsp.buf.formatting() + vim.lsp.buf.formatting {} end, " lsp formatting", }, @@ -257,7 +252,7 @@ M.lspconfig = { } M.nvimtree = { - + plugin = true, n = { -- toggle [""] = { " NvimTreeToggle ", " toggle nvimtree" }, @@ -268,6 +263,7 @@ M.nvimtree = { } M.telescope = { + plugin = true, n = { -- find ["ff"] = { " Telescope find_files ", " find files" }, @@ -291,6 +287,7 @@ M.telescope = { } M.nvterm = { + plugin = true, t = { -- toggle in terminal mode [""] = { @@ -357,6 +354,7 @@ M.nvterm = { } M.whichkey = { + plugin = true, n = { ["wK"] = { function() @@ -375,6 +373,7 @@ M.whichkey = { } M.blankline = { + plugin = true, n = { ["bc"] = { function() diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 7fd7fc3..1047a7f 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -64,7 +64,7 @@ M.remove_default_keys = function(disabled_mappings, default_mappings) return default_mappings end -M.load_mappings = function(mappings, mapping_opt) +M.load_mappings = function(section, mapping_opt) -- set mapping function with/without whichkey local set_maps local whichkey_exists, wk = pcall(require, "which-key") @@ -81,11 +81,9 @@ M.load_mappings = function(mappings, mapping_opt) end end - mappings = mappings or vim.deepcopy(M.load_config().mappings) - mappings.lspconfig = nil - - for _, section in pairs(mappings) do - for mode, mode_values in pairs(section) do + local set_section_map = function(section_values) + section_values.plugin = nil + for mode, mode_values in pairs(section_values) do for keybind, mapping_info in pairs(mode_values) do -- merge default + user opts local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) @@ -99,6 +97,18 @@ M.load_mappings = function(mappings, mapping_opt) end end end + + local mappings = require("core.utils").load_config().mappings + + if type(section) == "string" then + set_section_map(mappings[section]) + else + for _, sect in pairs(mappings) do + if sect.plugin == nil or sect.plugin == false then + set_section_map(sect) + end + end + end end -- remove plugins defined in chadrc @@ -119,7 +129,7 @@ M.merge_plugins = function(default_plugins) local user_plugins = M.load_config().plugins.user -- merge default + user plugin table - default_plugins = merge_tb("force", default_plugins, user_plugins) + default_plugins = merge_tb("force", default_plugins, user_plugins) or {} local final_table = {} @@ -133,8 +143,8 @@ end M.load_override = function(default_table, plugin_name) local user_table = M.load_config().plugins.override[plugin_name] or {} - user_table = type(user_table) == "table" and user_table or user_table() - return merge_tb("force", default_table, user_table) + user_table = type(user_table) == "function" and user_table() or user_table + return merge_tb("force", default_table, user_table or {}) or {} end M.packer_sync = function(...) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 4b83eab..0c16830 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -23,8 +23,7 @@ M.on_attach = function(client, bufnr) client.resolved_capabilities.document_range_formatting = false end - local lsp_mappings = utils.load_config().mappings.lspconfig - utils.load_mappings({ lsp_mappings }, { buffer = bufnr }) + utils.load_mappings("lspconfig", { buffer = bufnr }) if client.server_capabilities.signatureHelpProvider then require("nvchad_ui.signature").setup(client) diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index 7bc8ef4..89e7c3e 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -38,14 +38,4 @@ local options = { options = require("core.utils").load_override(options, "folke/which-key.nvim") -local utils = require "core.utils" - -local mappings = utils.load_config().mappings -local mapping_groups = { groups = vim.deepcopy(mappings.groups) } - -mappings.disabled = nil -mappings.groups = nil - -utils.load_mappings(mapping_groups) - wk.setup(options) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 8224e92..1c57b2c 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -21,6 +21,12 @@ local plugins = { config = function() require("plugins.configs.others").nvchad_ui() end, + setup = function() + local load_override = require("core.utils").load_override + if load_override({}, "NvChad/ui")["tabufline"]["enabled"] then + require("core.utils").load_mappings "tabufline" + end + end, }, ["NvChad/nvterm"] = { @@ -28,10 +34,13 @@ local plugins = { config = function() require "plugins.configs.nvterm" end, + setup = function() + require("core.utils").load_mappings "nvterm" + end, }, ["kyazdani42/nvim-web-devicons"] = { - after = 'ui', + after = "ui", module = "nvim-web-devicons", config = function() require("plugins.configs.others").devicons() @@ -42,6 +51,7 @@ local plugins = { opt = true, setup = function() require("core.lazy_load").on_file_open "indent-blankline.nvim" + require("core.utils").load_mappings "blankline" end, config = function() require("plugins.configs.others").blankline() @@ -164,6 +174,9 @@ local plugins = { config = function() require("plugins.configs.others").comment() end, + setup = function() + require("core.utils").load_mappings "comment" + end, }, -- file managing , picker etc @@ -173,6 +186,9 @@ local plugins = { config = function() require "plugins.configs.nvimtree" end, + setup = function() + require("core.utils").load_mappings "nvimtree" + end, }, ["nvim-telescope/telescope.nvim"] = { @@ -180,6 +196,9 @@ local plugins = { config = function() require "plugins.configs.telescope" end, + setup = function() + require("core.utils").load_mappings "telescope" + end, }, -- Only load whichkey after all the gui @@ -188,6 +207,9 @@ local plugins = { config = function() require "plugins.configs.whichkey" end, + setup = function() + require("core.utils").load_mappings "whichkey" + end, }, } From 650614d14bdc406275247105a0b6c0d826b47b16 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 7 Aug 2022 08:11:29 +0530 Subject: [PATCH 1212/1541] avoid loading tabufline mappings in nvchad/uis packer table --- lua/plugins/init.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 1c57b2c..62082da 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -21,12 +21,6 @@ local plugins = { config = function() require("plugins.configs.others").nvchad_ui() end, - setup = function() - local load_override = require("core.utils").load_override - if load_override({}, "NvChad/ui")["tabufline"]["enabled"] then - require("core.utils").load_mappings "tabufline" - end - end, }, ["NvChad/nvterm"] = { From 0b83d9cc0cc36950324ddc23751c57ec049855ac Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 7 Aug 2022 08:25:07 +0530 Subject: [PATCH 1213/1541] shorten some mapping functions in utils.lua --- init.lua | 4 +- lua/core/utils.lua | 98 ++++++++++++++++++++++++---------------------- 2 files changed, 52 insertions(+), 50 deletions(-) diff --git a/init.lua b/init.lua index 05ee549..b35b972 100644 --- a/init.lua +++ b/init.lua @@ -1,9 +1,7 @@ require "core" require "core.options" -vim.defer_fn(function() - require("core.utils").load_mappings() -end, 0) +require("core.utils").load_mappings() -- setup packer + plugins require("core.packer").bootstrap() diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 1047a7f..6d174df 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -22,8 +22,8 @@ M.load_config = function() if chadrc_exists then -- merge user config if it exists and is a table; otherwise display an error if type(chadrc) == "table" then - config.mappings = M.remove_default_keys(chadrc.mappings.disabled or nil, config.mappings) - config = merge_tb("force", config, chadrc) or {} + M.remove_default_keys(chadrc.mappings or {}) + config = merge_tb("force", config, chadrc) else error "chadrc must return a table!" end @@ -33,38 +33,43 @@ M.load_config = function() return config end -M.remove_default_keys = function(disabled_mappings, default_mappings) - if not disabled_mappings then - return default_mappings +-- store mapping section names which have plugin key = true +local lazyload_mappings_list = {} + +M.remove_default_keys = function(user_mappings) + local user_keys = {} + local user_sections = vim.tbl_keys(user_mappings) + + -- push user_map keys in user_keys table + for _, section in ipairs(user_sections) do + user_keys = vim.tbl_deep_extend("force", user_keys, user_mappings[section]) end - -- store keys in a array with true value to compare - local keys_to_disable = {} - for _, section_keys in pairs(disabled_mappings) do - if type(section_keys) == "table" then - for k, _ in pairs(section_keys) do - keys_to_disable[k] = true - end + local function disable_key(mode, keybind, mode_mapping) + if user_keys[mode] and user_keys[mode][keybind] then + mode_mapping[keybind] = nil end end - -- make a copy as we need to modify default_mappings + local default_mappings = require("core.default_config").mappings + + -- remove user_maps from default mapping table for section_name, section_mappings in pairs(default_mappings) do - section_mappings.plugin = nil + -- store mapping section name into a table + if section_mappings.plugin then + lazyload_mappings_list[section_name] = true + section_mappings.plugin = nil + end + for mode, mode_mapping in pairs(section_mappings) do - for k, _ in pairs(mode_mapping) do - -- if key if found then remove from default_mappings - if keys_to_disable[k] then - default_mappings[section_name][mode][k] = nil - end + for keybind, _ in pairs(mode_mapping) do + disable_key(mode, keybind, mode_mapping) end end end - - return default_mappings end -M.load_mappings = function(section, mapping_opt) +M.load_mappings = function(mappings, mapping_opt) -- set mapping function with/without whichkey local set_maps local whichkey_exists, wk = pcall(require, "which-key") @@ -81,34 +86,33 @@ M.load_mappings = function(section, mapping_opt) end end - local set_section_map = function(section_values) - section_values.plugin = nil - for mode, mode_values in pairs(section_values) do - for keybind, mapping_info in pairs(mode_values) do - -- merge default + user opts - local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) - local opts = merge_tb("force", default_opts, mapping_info.opts or {}) + local mappings_tb = M.load_config().mappings + mappings = vim.deepcopy(type(mappings) == "string" and { mappings_tb[mappings] } or mappings_tb) - if mapping_info.opts then - mapping_info.opts = nil + local function set_mappings() + for name, section in pairs(mappings) do + -- skip mapping section with plugin=true + if not lazyload_mappings_list[name] then + for mode, mode_values in pairs(section) do + for keybind, mapping_info in pairs(mode_values) do + -- merge default + user opts + local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) + local opts = merge_tb("force", default_opts, mapping_info.opts or {}) + + if mapping_info.opts then + mapping_info.opts = nil + end + + set_maps(keybind, mapping_info, opts) + end end - - set_maps(keybind, mapping_info, opts) end end end - local mappings = require("core.utils").load_config().mappings - - if type(section) == "string" then - set_section_map(mappings[section]) - else - for _, sect in pairs(mappings) do - if sect.plugin == nil or sect.plugin == false then - set_section_map(sect) - end - end - end + vim.defer_fn(function() + set_mappings() + end, 0) end -- remove plugins defined in chadrc @@ -129,7 +133,7 @@ M.merge_plugins = function(default_plugins) local user_plugins = M.load_config().plugins.user -- merge default + user plugin table - default_plugins = merge_tb("force", default_plugins, user_plugins) or {} + default_plugins = merge_tb("force", default_plugins, user_plugins) local final_table = {} @@ -143,8 +147,8 @@ end M.load_override = function(default_table, plugin_name) local user_table = M.load_config().plugins.override[plugin_name] or {} - user_table = type(user_table) == "function" and user_table() or user_table - return merge_tb("force", default_table, user_table or {}) or {} + user_table = type(user_table) == "table" and user_table or user_table() + return merge_tb("force", default_table, user_table) end M.packer_sync = function(...) From d2dec96ad6b90ab0fdf1870b7cbfe94b319c0164 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 7 Aug 2022 08:50:36 +0530 Subject: [PATCH 1214/1541] add whichkey groups back --- lua/core/utils.lua | 28 ++++++++++++++++++---------- lua/plugins/configs/whichkey.lua | 10 ++++++++++ 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 6d174df..bb986ab 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -15,10 +15,27 @@ M.close_buffer = function(bufnr) end end +-- store mapping section names which have plugin key = true +local lazyload_mappings_list = {} + +local add_mappingSection_toList = function() + local default_mappings = require("core.default_config").mappings + + -- store mapping section name into a table + for section_name, section_mappings in pairs(default_mappings) do + if section_mappings.plugin then + lazyload_mappings_list[section_name] = true + section_mappings.plugin = nil + end + end +end + M.load_config = function() local config = require "core.default_config" local chadrc_exists, chadrc = pcall(require, "custom.chadrc") + add_mappingSection_toList() + if chadrc_exists then -- merge user config if it exists and is a table; otherwise display an error if type(chadrc) == "table" then @@ -33,9 +50,6 @@ M.load_config = function() return config end --- store mapping section names which have plugin key = true -local lazyload_mappings_list = {} - M.remove_default_keys = function(user_mappings) local user_keys = {} local user_sections = vim.tbl_keys(user_mappings) @@ -54,13 +68,7 @@ M.remove_default_keys = function(user_mappings) local default_mappings = require("core.default_config").mappings -- remove user_maps from default mapping table - for section_name, section_mappings in pairs(default_mappings) do - -- store mapping section name into a table - if section_mappings.plugin then - lazyload_mappings_list[section_name] = true - section_mappings.plugin = nil - end - + for _, section_mappings in pairs(default_mappings) do for mode, mode_mapping in pairs(section_mappings) do for keybind, _ in pairs(mode_mapping) do disable_key(mode, keybind, mode_mapping) diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index 89e7c3e..7bc8ef4 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -38,4 +38,14 @@ local options = { options = require("core.utils").load_override(options, "folke/which-key.nvim") +local utils = require "core.utils" + +local mappings = utils.load_config().mappings +local mapping_groups = { groups = vim.deepcopy(mappings.groups) } + +mappings.disabled = nil +mappings.groups = nil + +utils.load_mappings(mapping_groups) + wk.setup(options) From 74ad741e633d8435452ade6667b52efd8c879dda Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 7 Aug 2022 10:10:50 +0530 Subject: [PATCH 1215/1541] keep whichkey disabled by default due to startuptime issues --- lua/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 62082da..adeb5ae 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -197,6 +197,7 @@ local plugins = { -- Only load whichkey after all the gui ["folke/which-key.nvim"] = { + disable = true, module = "which-key", config = function() require "plugins.configs.whichkey" From 22c3cc0c0db29300f77d8d3a0b6c0bc66ef394f2 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Sat, 6 Aug 2022 10:35:20 +0700 Subject: [PATCH 1216/1541] Don't load packer at startup --- init.lua | 1 - lua/core/packer.lua | 2 +- lua/plugins/init.lua | 30 +++++++++++++++++++++++++++++- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index b35b972..10e2b9d 100644 --- a/init.lua +++ b/init.lua @@ -5,6 +5,5 @@ require("core.utils").load_mappings() -- setup packer + plugins require("core.packer").bootstrap() -require "plugins" pcall(require, "custom") diff --git a/lua/core/packer.lua b/lua/core/packer.lua index b193b75..4f68b66 100644 --- a/lua/core/packer.lua +++ b/lua/core/packer.lua @@ -2,7 +2,7 @@ local M = {} M.bootstrap = function() local fn = vim.fn - local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim" + local install_path = fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim" vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" }) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index adeb5ae..074e9a3 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -3,7 +3,24 @@ vim.cmd "packadd packer.nvim" local plugins = { ["nvim-lua/plenary.nvim"] = { module = "plenary" }, - ["wbthomason/packer.nvim"] = {}, + ["wbthomason/packer.nvim"] = { + cmd = { + "PackerSnapshot", + "PackerSnapshotRollback", + "PackerSnapshotDelete", + "PackerInstall", + "PackerUpdate", + "PackerSync", + "PackerClean", + "PackerCompile", + "PackerStatus", + "PackerProfile", + "PackerLoad" + }, + config = function() + require "plugins" + end + }, ["NvChad/extensions"] = { module = { "telescope", "nvchad" } }, ["NvChad/base46"] = { @@ -206,6 +223,17 @@ local plugins = { require("core.utils").load_mappings "whichkey" end, }, + + -- Speed up deffered plugins + ["lewis6991/impatient.nvim"] = { + event = "VimEnter", + config = function() + vim.defer_fn(function() + local present, impatient = pcall(require, "impatient") + if present then impatient.enable_profile() end + end, 0) + end, + }, } require("core.packer").run(plugins) From b3d3c5a7dd4a5abccc6d17b199b4e6ad66fcedfc Mon Sep 17 00:00:00 2001 From: nullchilly Date: Sat, 6 Aug 2022 10:58:05 +0700 Subject: [PATCH 1217/1541] Don't load packer at startup --- init.lua | 14 +++++++++++++- lua/core/init.lua | 2 +- lua/core/packer.lua | 17 ----------------- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/init.lua b/init.lua index 10e2b9d..b80c53d 100644 --- a/init.lua +++ b/init.lua @@ -4,6 +4,18 @@ require "core.options" require("core.utils").load_mappings() -- setup packer + plugins -require("core.packer").bootstrap() +local fn = vim.fn +local install_path = fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim" + +if fn.empty(fn.glob(install_path)) > 0 then + vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" }) + print "Cloning packer .." + fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } + + -- install plugins + compile their configs + vim.cmd "packadd packer.nvim" + require "plugins" + vim.cmd "PackerSync" +end pcall(require, "custom") diff --git a/lua/core/init.lua b/lua/core/init.lua index a26beb5..0e30564 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -23,7 +23,7 @@ autocmd("FileType", { -- wrap the PackerSync command to warn people before using it in NvChadSnapshots autocmd("VimEnter", { callback = function() - vim.cmd "command! -nargs=* -complete=customlist,v:lua.require'packer'.plugin_complete PackerSync lua require('core.utils').packer_sync()" + vim.cmd "command! -nargs=* -complete=customlist,v:lua.require'packer'.plugin_complete PackerSync lua require('plugins') require('core.utils').packer_sync()" end, }) diff --git a/lua/core/packer.lua b/lua/core/packer.lua index 4f68b66..33bfa38 100644 --- a/lua/core/packer.lua +++ b/lua/core/packer.lua @@ -1,22 +1,5 @@ local M = {} -M.bootstrap = function() - local fn = vim.fn - local install_path = fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim" - - vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" }) - - if fn.empty(fn.glob(install_path)) > 0 then - print "Cloning packer .." - fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } - - -- install plugins + compile their configs - vim.cmd "packadd packer.nvim" - require "plugins" - vim.cmd "PackerSync" - end -end - M.options = { auto_clean = true, compile_on_sync = true, From 20f45c3962db88d7dc19dcd14ae6e5e02e817fb4 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Sat, 6 Aug 2022 11:06:06 +0700 Subject: [PATCH 1218/1541] Remove impatient profiling --- lua/plugins/init.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 074e9a3..0b7e7d9 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -228,10 +228,7 @@ local plugins = { ["lewis6991/impatient.nvim"] = { event = "VimEnter", config = function() - vim.defer_fn(function() - local present, impatient = pcall(require, "impatient") - if present then impatient.enable_profile() end - end, 0) + vim.defer_fn(function() require "impatient" end, 0) end, }, } From aee1c8b830f2b47149947b096dee29392ac93bad Mon Sep 17 00:00:00 2001 From: nullchilly Date: Sun, 7 Aug 2022 12:26:15 +0700 Subject: [PATCH 1219/1541] fix: impatient loading order --- lua/core/lazy_load.lua | 1 + lua/plugins/init.lua | 5 +- rplugin.vim | 15 + site/pack/packer/opt/Comment.nvim | 1 + site/pack/packer/opt/LuaSnip | 1 + site/pack/packer/opt/cmp-buffer | 1 + site/pack/packer/opt/cmp-nvim-lsp | 1 + site/pack/packer/opt/cmp-nvim-lua | 1 + site/pack/packer/opt/cmp-path | 1 + site/pack/packer/opt/cmp_luasnip | 1 + site/pack/packer/opt/extensions | 1 + site/pack/packer/opt/friendly-snippets | 1 + site/pack/packer/opt/gitsigns.nvim | 1 + site/pack/packer/opt/impatient.nvim | 1 + site/pack/packer/opt/indent-blankline.nvim | 1 + site/pack/packer/opt/mason.nvim | 1 + site/pack/packer/opt/nvim-autopairs | 1 + site/pack/packer/opt/nvim-cmp | 1 + site/pack/packer/opt/nvim-colorizer.lua | 1 + site/pack/packer/opt/nvim-lspconfig | 1 + site/pack/packer/opt/nvim-tree.lua | 1 + site/pack/packer/opt/nvim-treesitter | 1 + site/pack/packer/opt/nvim-web-devicons | 1 + site/pack/packer/opt/nvterm | 1 + site/pack/packer/opt/packer.nvim | 1 + site/pack/packer/opt/plenary.nvim | 1 + site/pack/packer/opt/telescope.nvim | 1 + site/pack/packer/opt/ui | 1 + site/pack/packer/opt/which-key.nvim | 1 + site/pack/packer/start/base46 | 1 + tree-sitter-c/.appveyor.yml | 22 + tree-sitter-c/.gitattributes | 2 + tree-sitter-c/.gitignore | 6 + tree-sitter-c/.npmignore | 6 + tree-sitter-c/.travis.yml | 5 + tree-sitter-c/Cargo.toml | 23 + tree-sitter-c/LICENSE | 21 + tree-sitter-c/Package.swift | 36 + tree-sitter-c/README.md | 7 + tree-sitter-c/binding.gyp | 18 + tree-sitter-c/bindings/node/binding.cc | 28 + tree-sitter-c/bindings/node/index.js | 19 + tree-sitter-c/bindings/rust/README.md | 37 + tree-sitter-c/bindings/rust/build.rs | 17 + tree-sitter-c/bindings/rust/lib.rs | 66 + tree-sitter-c/bindings/swift/TreeSitterC/c.h | 16 + tree-sitter-c/examples/cluster.c | 5446 ++ tree-sitter-c/examples/malloc.c | 532 + tree-sitter-c/examples/parser.c | 1283 + tree-sitter-c/grammar.js | 1082 + tree-sitter-c/package.json | 36 + tree-sitter-c/parser.so | Bin 0 -> 389904 bytes tree-sitter-c/queries/highlights.scm | 81 + tree-sitter-c/src/grammar.json | 6629 ++ tree-sitter-c/src/node-types.json | 3664 + tree-sitter-c/src/parser.c | 75781 +++++++++++++++++ tree-sitter-c/src/tree_sitter/parser.h | 224 + tree-sitter-c/test/corpus/ambiguities.txt | 178 + tree-sitter-c/test/corpus/crlf.txt | 13 + tree-sitter-c/test/corpus/declarations.txt | 530 + tree-sitter-c/test/corpus/expressions.txt | 518 + tree-sitter-c/test/corpus/microsoft.txt | 187 + tree-sitter-c/test/corpus/preprocessor.txt | 274 + tree-sitter-c/test/corpus/statements.txt | 326 + tree-sitter-c/test/corpus/types.txt | 80 + tree-sitter-c/test/highlight/keywords.c | 6 + tree-sitter-c/test/highlight/names.c | 33 + 67 files changed, 97276 insertions(+), 4 deletions(-) create mode 100644 rplugin.vim create mode 160000 site/pack/packer/opt/Comment.nvim create mode 160000 site/pack/packer/opt/LuaSnip create mode 160000 site/pack/packer/opt/cmp-buffer create mode 160000 site/pack/packer/opt/cmp-nvim-lsp create mode 160000 site/pack/packer/opt/cmp-nvim-lua create mode 160000 site/pack/packer/opt/cmp-path create mode 160000 site/pack/packer/opt/cmp_luasnip create mode 160000 site/pack/packer/opt/extensions create mode 160000 site/pack/packer/opt/friendly-snippets create mode 160000 site/pack/packer/opt/gitsigns.nvim create mode 160000 site/pack/packer/opt/impatient.nvim create mode 160000 site/pack/packer/opt/indent-blankline.nvim create mode 160000 site/pack/packer/opt/mason.nvim create mode 160000 site/pack/packer/opt/nvim-autopairs create mode 160000 site/pack/packer/opt/nvim-cmp create mode 160000 site/pack/packer/opt/nvim-colorizer.lua create mode 160000 site/pack/packer/opt/nvim-lspconfig create mode 160000 site/pack/packer/opt/nvim-tree.lua create mode 160000 site/pack/packer/opt/nvim-treesitter create mode 160000 site/pack/packer/opt/nvim-web-devicons create mode 160000 site/pack/packer/opt/nvterm create mode 160000 site/pack/packer/opt/packer.nvim create mode 160000 site/pack/packer/opt/plenary.nvim create mode 160000 site/pack/packer/opt/telescope.nvim create mode 160000 site/pack/packer/opt/ui create mode 160000 site/pack/packer/opt/which-key.nvim create mode 160000 site/pack/packer/start/base46 create mode 100644 tree-sitter-c/.appveyor.yml create mode 100644 tree-sitter-c/.gitattributes create mode 100644 tree-sitter-c/.gitignore create mode 100644 tree-sitter-c/.npmignore create mode 100644 tree-sitter-c/.travis.yml create mode 100644 tree-sitter-c/Cargo.toml create mode 100644 tree-sitter-c/LICENSE create mode 100644 tree-sitter-c/Package.swift create mode 100644 tree-sitter-c/README.md create mode 100644 tree-sitter-c/binding.gyp create mode 100644 tree-sitter-c/bindings/node/binding.cc create mode 100644 tree-sitter-c/bindings/node/index.js create mode 100644 tree-sitter-c/bindings/rust/README.md create mode 100644 tree-sitter-c/bindings/rust/build.rs create mode 100644 tree-sitter-c/bindings/rust/lib.rs create mode 100644 tree-sitter-c/bindings/swift/TreeSitterC/c.h create mode 100644 tree-sitter-c/examples/cluster.c create mode 100644 tree-sitter-c/examples/malloc.c create mode 100644 tree-sitter-c/examples/parser.c create mode 100644 tree-sitter-c/grammar.js create mode 100644 tree-sitter-c/package.json create mode 100755 tree-sitter-c/parser.so create mode 100644 tree-sitter-c/queries/highlights.scm create mode 100644 tree-sitter-c/src/grammar.json create mode 100644 tree-sitter-c/src/node-types.json create mode 100644 tree-sitter-c/src/parser.c create mode 100644 tree-sitter-c/src/tree_sitter/parser.h create mode 100644 tree-sitter-c/test/corpus/ambiguities.txt create mode 100644 tree-sitter-c/test/corpus/crlf.txt create mode 100644 tree-sitter-c/test/corpus/declarations.txt create mode 100644 tree-sitter-c/test/corpus/expressions.txt create mode 100644 tree-sitter-c/test/corpus/microsoft.txt create mode 100644 tree-sitter-c/test/corpus/preprocessor.txt create mode 100644 tree-sitter-c/test/corpus/statements.txt create mode 100644 tree-sitter-c/test/corpus/types.txt create mode 100644 tree-sitter-c/test/highlight/keywords.c create mode 100644 tree-sitter-c/test/highlight/names.c diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 049813d..eba5cfa 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -10,6 +10,7 @@ M.lazy_load = function(tb) callback = function() if tb.condition() then vim.api.nvim_del_augroup_by_name(tb.augroup_name) + require "impatient" -- dont defer for treesitter as it will show slow highlighting -- This deferring only happens only when we do "nvim filename" diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 0b7e7d9..361ef6a 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -226,10 +226,7 @@ local plugins = { -- Speed up deffered plugins ["lewis6991/impatient.nvim"] = { - event = "VimEnter", - config = function() - vim.defer_fn(function() require "impatient" end, 0) - end, + module = "impatient" }, } diff --git a/rplugin.vim b/rplugin.vim new file mode 100644 index 0000000..3beadb1 --- /dev/null +++ b/rplugin.vim @@ -0,0 +1,15 @@ +" perl plugins + + +" node plugins + + +" python3 plugins + + +" ruby plugins + + +" python plugins + + diff --git a/site/pack/packer/opt/Comment.nvim b/site/pack/packer/opt/Comment.nvim new file mode 160000 index 0000000..9b76787 --- /dev/null +++ b/site/pack/packer/opt/Comment.nvim @@ -0,0 +1 @@ +Subproject commit 9b76787e273567c0e3027304bd16ffedc751c04c diff --git a/site/pack/packer/opt/LuaSnip b/site/pack/packer/opt/LuaSnip new file mode 160000 index 0000000..ac27343 --- /dev/null +++ b/site/pack/packer/opt/LuaSnip @@ -0,0 +1 @@ +Subproject commit ac27343b52796a0aa1bb3db824d16e66d1def182 diff --git a/site/pack/packer/opt/cmp-buffer b/site/pack/packer/opt/cmp-buffer new file mode 160000 index 0000000..62fc67a --- /dev/null +++ b/site/pack/packer/opt/cmp-buffer @@ -0,0 +1 @@ +Subproject commit 62fc67a2b0205136bc3e312664624ba2ab4a9323 diff --git a/site/pack/packer/opt/cmp-nvim-lsp b/site/pack/packer/opt/cmp-nvim-lsp new file mode 160000 index 0000000..affe808 --- /dev/null +++ b/site/pack/packer/opt/cmp-nvim-lsp @@ -0,0 +1 @@ +Subproject commit affe808a5c56b71630f17aa7c38e15c59fd648a8 diff --git a/site/pack/packer/opt/cmp-nvim-lua b/site/pack/packer/opt/cmp-nvim-lua new file mode 160000 index 0000000..d276254 --- /dev/null +++ b/site/pack/packer/opt/cmp-nvim-lua @@ -0,0 +1 @@ +Subproject commit d276254e7198ab7d00f117e88e223b4bd8c02d21 diff --git a/site/pack/packer/opt/cmp-path b/site/pack/packer/opt/cmp-path new file mode 160000 index 0000000..447c87c --- /dev/null +++ b/site/pack/packer/opt/cmp-path @@ -0,0 +1 @@ +Subproject commit 447c87cdd6e6d6a1d2488b1d43108bfa217f56e1 diff --git a/site/pack/packer/opt/cmp_luasnip b/site/pack/packer/opt/cmp_luasnip new file mode 160000 index 0000000..a9de941 --- /dev/null +++ b/site/pack/packer/opt/cmp_luasnip @@ -0,0 +1 @@ +Subproject commit a9de941bcbda508d0a45d28ae366bb3f08db2e36 diff --git a/site/pack/packer/opt/extensions b/site/pack/packer/opt/extensions new file mode 160000 index 0000000..e82d9f5 --- /dev/null +++ b/site/pack/packer/opt/extensions @@ -0,0 +1 @@ +Subproject commit e82d9f5e612ade06202591ed76ecb095e946f7f8 diff --git a/site/pack/packer/opt/friendly-snippets b/site/pack/packer/opt/friendly-snippets new file mode 160000 index 0000000..7339def --- /dev/null +++ b/site/pack/packer/opt/friendly-snippets @@ -0,0 +1 @@ +Subproject commit 7339def34e46237eb7c9a893cb7d42dcb90e05e6 diff --git a/site/pack/packer/opt/gitsigns.nvim b/site/pack/packer/opt/gitsigns.nvim new file mode 160000 index 0000000..9c3ca02 --- /dev/null +++ b/site/pack/packer/opt/gitsigns.nvim @@ -0,0 +1 @@ +Subproject commit 9c3ca027661136a618c82275427746e481c84a4e diff --git a/site/pack/packer/opt/impatient.nvim b/site/pack/packer/opt/impatient.nvim new file mode 160000 index 0000000..4ccbe74 --- /dev/null +++ b/site/pack/packer/opt/impatient.nvim @@ -0,0 +1 @@ +Subproject commit 4ccbe749ce439fa25d387d459e8c339131cc5d1f diff --git a/site/pack/packer/opt/indent-blankline.nvim b/site/pack/packer/opt/indent-blankline.nvim new file mode 160000 index 0000000..c15bbe9 --- /dev/null +++ b/site/pack/packer/opt/indent-blankline.nvim @@ -0,0 +1 @@ +Subproject commit c15bbe9f23d88b5c0b4ca45a446e01a0a3913707 diff --git a/site/pack/packer/opt/mason.nvim b/site/pack/packer/opt/mason.nvim new file mode 160000 index 0000000..cd1af57 --- /dev/null +++ b/site/pack/packer/opt/mason.nvim @@ -0,0 +1 @@ +Subproject commit cd1af57253b3ac3652765e4d0f83b56802ec2a5f diff --git a/site/pack/packer/opt/nvim-autopairs b/site/pack/packer/opt/nvim-autopairs new file mode 160000 index 0000000..ca89ab9 --- /dev/null +++ b/site/pack/packer/opt/nvim-autopairs @@ -0,0 +1 @@ +Subproject commit ca89ab9e7e42aa9279f1cdad15398d6e18ccee86 diff --git a/site/pack/packer/opt/nvim-cmp b/site/pack/packer/opt/nvim-cmp new file mode 160000 index 0000000..706371f --- /dev/null +++ b/site/pack/packer/opt/nvim-cmp @@ -0,0 +1 @@ +Subproject commit 706371f1300e7c0acb98b346f80dad2dd9b5f679 diff --git a/site/pack/packer/opt/nvim-colorizer.lua b/site/pack/packer/opt/nvim-colorizer.lua new file mode 160000 index 0000000..8fe6ec2 --- /dev/null +++ b/site/pack/packer/opt/nvim-colorizer.lua @@ -0,0 +1 @@ +Subproject commit 8fe6ec269c6bcd19a7c2d69cb0bdcf8bb86a85fe diff --git a/site/pack/packer/opt/nvim-lspconfig b/site/pack/packer/opt/nvim-lspconfig new file mode 160000 index 0000000..6e047f1 --- /dev/null +++ b/site/pack/packer/opt/nvim-lspconfig @@ -0,0 +1 @@ +Subproject commit 6e047f11861bfb6ec28a6ad0138a8f0a62bb8806 diff --git a/site/pack/packer/opt/nvim-tree.lua b/site/pack/packer/opt/nvim-tree.lua new file mode 160000 index 0000000..ff6e796 --- /dev/null +++ b/site/pack/packer/opt/nvim-tree.lua @@ -0,0 +1 @@ +Subproject commit ff6e7966f39a897ac4d1358f4d022cfecdc88ff1 diff --git a/site/pack/packer/opt/nvim-treesitter b/site/pack/packer/opt/nvim-treesitter new file mode 160000 index 0000000..a9a6493 --- /dev/null +++ b/site/pack/packer/opt/nvim-treesitter @@ -0,0 +1 @@ +Subproject commit a9a6493b1eeba458757903352e0d3dc4b54fd4f2 diff --git a/site/pack/packer/opt/nvim-web-devicons b/site/pack/packer/opt/nvim-web-devicons new file mode 160000 index 0000000..2d02a56 --- /dev/null +++ b/site/pack/packer/opt/nvim-web-devicons @@ -0,0 +1 @@ +Subproject commit 2d02a56189e2bde11edd4712fea16f08a6656944 diff --git a/site/pack/packer/opt/nvterm b/site/pack/packer/opt/nvterm new file mode 160000 index 0000000..1317d62 --- /dev/null +++ b/site/pack/packer/opt/nvterm @@ -0,0 +1 @@ +Subproject commit 1317d6238f089e117e3ed98b3cecc37cc4364675 diff --git a/site/pack/packer/opt/packer.nvim b/site/pack/packer/opt/packer.nvim new file mode 160000 index 0000000..afab895 --- /dev/null +++ b/site/pack/packer/opt/packer.nvim @@ -0,0 +1 @@ +Subproject commit afab89594f4f702dc3368769c95b782dbdaeaf0a diff --git a/site/pack/packer/opt/plenary.nvim b/site/pack/packer/opt/plenary.nvim new file mode 160000 index 0000000..31807ee --- /dev/null +++ b/site/pack/packer/opt/plenary.nvim @@ -0,0 +1 @@ +Subproject commit 31807eef4ed574854b8a53ae40ea3292033a78ea diff --git a/site/pack/packer/opt/telescope.nvim b/site/pack/packer/opt/telescope.nvim new file mode 160000 index 0000000..4725867 --- /dev/null +++ b/site/pack/packer/opt/telescope.nvim @@ -0,0 +1 @@ +Subproject commit 4725867ec66b9a0f5e5ad95a1fd94c2f97fa2d2c diff --git a/site/pack/packer/opt/ui b/site/pack/packer/opt/ui new file mode 160000 index 0000000..bca1182 --- /dev/null +++ b/site/pack/packer/opt/ui @@ -0,0 +1 @@ +Subproject commit bca1182e872db0ea52d86b2f4cf4ee7cb092de45 diff --git a/site/pack/packer/opt/which-key.nvim b/site/pack/packer/opt/which-key.nvim new file mode 160000 index 0000000..bd4411a --- /dev/null +++ b/site/pack/packer/opt/which-key.nvim @@ -0,0 +1 @@ +Subproject commit bd4411a2ed4dd8bb69c125e339d837028a6eea71 diff --git a/site/pack/packer/start/base46 b/site/pack/packer/start/base46 new file mode 160000 index 0000000..dfdcff9 --- /dev/null +++ b/site/pack/packer/start/base46 @@ -0,0 +1 @@ +Subproject commit dfdcff9c6b2bd1ad3c364973a2497bf62c6f0f20 diff --git a/tree-sitter-c/.appveyor.yml b/tree-sitter-c/.appveyor.yml new file mode 100644 index 0000000..b21947b --- /dev/null +++ b/tree-sitter-c/.appveyor.yml @@ -0,0 +1,22 @@ +image: Visual Studio 2015 + +environment: + nodejs_version: "8" + +platform: + - x64 + +install: + - ps: Install-Product node $env:nodejs_version + - node --version + - npm --version + - npm install + +test_script: + - npm run test-windows + +build: off + +branches: + only: + - master diff --git a/tree-sitter-c/.gitattributes b/tree-sitter-c/.gitattributes new file mode 100644 index 0000000..f60d7b9 --- /dev/null +++ b/tree-sitter-c/.gitattributes @@ -0,0 +1,2 @@ +/src/** linguist-vendored +/examples/* linguist-vendored diff --git a/tree-sitter-c/.gitignore b/tree-sitter-c/.gitignore new file mode 100644 index 0000000..bd77f41 --- /dev/null +++ b/tree-sitter-c/.gitignore @@ -0,0 +1,6 @@ +Cargo.lock +node_modules +build +package-lock.json +/target/ +.build/ \ No newline at end of file diff --git a/tree-sitter-c/.npmignore b/tree-sitter-c/.npmignore new file mode 100644 index 0000000..bed0e3d --- /dev/null +++ b/tree-sitter-c/.npmignore @@ -0,0 +1,6 @@ +/test +/examples +/build +/script +/target + diff --git a/tree-sitter-c/.travis.yml b/tree-sitter-c/.travis.yml new file mode 100644 index 0000000..5dcacdc --- /dev/null +++ b/tree-sitter-c/.travis.yml @@ -0,0 +1,5 @@ +language: node_js + +sudo: false + +node_js: 10 diff --git a/tree-sitter-c/Cargo.toml b/tree-sitter-c/Cargo.toml new file mode 100644 index 0000000..9e2e88c --- /dev/null +++ b/tree-sitter-c/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "tree-sitter-c" +description = "C grammar for the tree-sitter parsing library" +version = "0.20.2" +authors = ["Max Brunsfeld "] +license = "MIT" +readme = "bindings/rust/README.md" +keywords = ["incremental", "parsing", "c"] +categories = ["parsing", "text-editors"] +repository = "https://github.com/tree-sitter/tree-sitter-c" +edition = "2018" + +build = "bindings/rust/build.rs" +include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"] + +[lib] +path = "bindings/rust/lib.rs" + +[dependencies] +tree-sitter = "0.20" + +[build-dependencies] +cc = "1.0" diff --git a/tree-sitter-c/LICENSE b/tree-sitter-c/LICENSE new file mode 100644 index 0000000..4b52d19 --- /dev/null +++ b/tree-sitter-c/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Max Brunsfeld + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tree-sitter-c/Package.swift b/tree-sitter-c/Package.swift new file mode 100644 index 0000000..c6c5376 --- /dev/null +++ b/tree-sitter-c/Package.swift @@ -0,0 +1,36 @@ +// swift-tools-version:5.3 +import PackageDescription + +let package = Package( + name: "TreeSitterC", + platforms: [.macOS(.v10_13), .iOS(.v11)], + products: [ + .library(name: "TreeSitterC", targets: ["TreeSitterC"]), + ], + dependencies: [], + targets: [ + .target(name: "TreeSitterC", + path: ".", + exclude: [ + "binding.gyp", + "bindings", + "Cargo.toml", + "examples", + "grammar.js", + "LICENSE", + "Makefile", + "package.json", + "README.md", + "src/grammar.json", + "src/node-types.json", + ], + sources: [ + "src/parser.c", + ], + resources: [ + .copy("queries") + ], + publicHeadersPath: "bindings/swift", + cSettings: [.headerSearchPath("src")]) + ] +) \ No newline at end of file diff --git a/tree-sitter-c/README.md b/tree-sitter-c/README.md new file mode 100644 index 0000000..d89830b --- /dev/null +++ b/tree-sitter-c/README.md @@ -0,0 +1,7 @@ +tree-sitter-c +================== + +[![Build Status](https://travis-ci.org/tree-sitter/tree-sitter-c.svg?branch=master)](https://travis-ci.org/tree-sitter/tree-sitter-c) +[![Build status](https://ci.appveyor.com/api/projects/status/7u0sy6ajmxro4wfh/branch/master?svg=true)](https://ci.appveyor.com/project/maxbrunsfeld/tree-sitter-c/branch/master) + +C grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter). Adapted from [this C99 grammar](http://slps.github.io/zoo/c/iso-9899-tc3.html). diff --git a/tree-sitter-c/binding.gyp b/tree-sitter-c/binding.gyp new file mode 100644 index 0000000..3aa8cad --- /dev/null +++ b/tree-sitter-c/binding.gyp @@ -0,0 +1,18 @@ +{ + "targets": [ + { + "target_name": "tree_sitter_c_binding", + "include_dirs": [ + " +#include "nan.h" + +using namespace v8; + +extern "C" TSLanguage * tree_sitter_c(); + +namespace { + +NAN_METHOD(New) {} + +void Init(Local exports, Local module) { + Local tpl = Nan::New(New); + tpl->SetClassName(Nan::New("Language").ToLocalChecked()); + tpl->InstanceTemplate()->SetInternalFieldCount(1); + + Local constructor = Nan::GetFunction(tpl).ToLocalChecked(); + Local instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); + Nan::SetInternalFieldPointer(instance, 0, tree_sitter_c()); + + Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("c").ToLocalChecked()); + Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); +} + +NODE_MODULE(tree_sitter_c_binding, Init) + +} // namespace diff --git a/tree-sitter-c/bindings/node/index.js b/tree-sitter-c/bindings/node/index.js new file mode 100644 index 0000000..51a5d6c --- /dev/null +++ b/tree-sitter-c/bindings/node/index.js @@ -0,0 +1,19 @@ +try { + module.exports = require("../../build/Release/tree_sitter_c_binding"); +} catch (error1) { + if (error1.code !== 'MODULE_NOT_FOUND') { + throw error1; + } + try { + module.exports = require("../../build/Debug/tree_sitter_c_binding"); + } catch (error2) { + if (error2.code !== 'MODULE_NOT_FOUND') { + throw error2; + } + throw error1 + } +} + +try { + module.exports.nodeTypeInfo = require("../../src/node-types.json"); +} catch (_) {} diff --git a/tree-sitter-c/bindings/rust/README.md b/tree-sitter-c/bindings/rust/README.md new file mode 100644 index 0000000..d5a2e90 --- /dev/null +++ b/tree-sitter-c/bindings/rust/README.md @@ -0,0 +1,37 @@ +# tree-sitter-c + +This crate provides a C grammar for the [tree-sitter][] parsing library. To +use this crate, add it to the `[dependencies]` section of your `Cargo.toml` +file. (Note that you will probably also need to depend on the +[`tree-sitter`][tree-sitter crate] crate to use the parsed result in any useful +way.) + +``` toml +[dependencies] +tree-sitter = "0.17" +tree-sitter-c = "0.16" +``` + +Typically, you will use the [language][language func] function to add this +grammar to a tree-sitter [Parser][], and then use the parser to parse some code: + +``` rust +let code = r#" + int double(int x) { + return x * 2; + } +"#; +let mut parser = Parser::new(); +parser.set_language(tree_sitter_c::language()).expect("Error loading C grammar"); +let parsed = parser.parse(code, None); +``` + +If you have any questions, please reach out to us in the [tree-sitter +discussions] page. + +[Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html +[language func]: https://docs.rs/tree-sitter-c/*/tree_sitter_c/fn.language.html +[Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html +[tree-sitter]: https://tree-sitter.github.io/ +[tree-sitter crate]: https://crates.io/crates/tree-sitter +[tree-sitter discussions]: https://github.com/tree-sitter/tree-sitter/discussions diff --git a/tree-sitter-c/bindings/rust/build.rs b/tree-sitter-c/bindings/rust/build.rs new file mode 100644 index 0000000..3efc628 --- /dev/null +++ b/tree-sitter-c/bindings/rust/build.rs @@ -0,0 +1,17 @@ +use std::path::Path; +extern crate cc; + +fn main() { + let src_dir = Path::new("src"); + + let mut c_config = cc::Build::new(); + c_config.include(&src_dir); + c_config + .flag_if_supported("-Wno-unused-parameter") + .flag_if_supported("-Wno-unused-but-set-variable") + .flag_if_supported("-Wno-trigraphs"); + let parser_path = src_dir.join("parser.c"); + c_config.file(&parser_path); + println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); + c_config.compile("parser"); +} diff --git a/tree-sitter-c/bindings/rust/lib.rs b/tree-sitter-c/bindings/rust/lib.rs new file mode 100644 index 0000000..3402110 --- /dev/null +++ b/tree-sitter-c/bindings/rust/lib.rs @@ -0,0 +1,66 @@ +// -*- coding: utf-8 -*- +// ------------------------------------------------------------------------------------------------ +// Copyright © 2021, tree-sitter-c authors. +// See the LICENSE file in this repo for license details. +// ------------------------------------------------------------------------------------------------ + +//! This crate provides a C grammar for the [tree-sitter][] parsing library. +//! +//! Typically, you will use the [language][language func] function to add this grammar to a +//! tree-sitter [Parser][], and then use the parser to parse some code: +//! +//! ``` +//! use tree_sitter::Parser; +//! +//! let code = r#" +//! int double(int x) { +//! return x * 2; +//! } +//! "#; +//! let mut parser = Parser::new(); +//! parser.set_language(tree_sitter_c::language()).expect("Error loading C grammar"); +//! let parsed = parser.parse(code, None); +//! # let parsed = parsed.unwrap(); +//! # let root = parsed.root_node(); +//! # assert!(!root.has_error()); +//! ``` +//! +//! [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html +//! [language func]: fn.language.html +//! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html +//! [tree-sitter]: https://tree-sitter.github.io/ + +use tree_sitter::Language; + +extern "C" { + fn tree_sitter_c() -> Language; +} + +/// Returns the tree-sitter [Language][] for this grammar. +/// +/// [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html +pub fn language() -> Language { + unsafe { tree_sitter_c() } +} + +/// The source of the C tree-sitter grammar description. +pub const GRAMMAR: &str = include_str!("../../grammar.js"); + +/// The syntax highlighting query for this language. +pub const HIGHLIGHT_QUERY: &str = include_str!("../../queries/highlights.scm"); + +/// The content of the [`node-types.json`][] file for this grammar. +/// +/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types +pub const NODE_TYPES: &str = include_str!("../../src/node-types.json"); + +#[cfg(test)] +mod tests { + #[test] + fn can_load_grammar() { + let mut parser = tree_sitter::Parser::new(); + parser + .set_language(super::language()) + .expect("Error loading C grammar"); + } +} diff --git a/tree-sitter-c/bindings/swift/TreeSitterC/c.h b/tree-sitter-c/bindings/swift/TreeSitterC/c.h new file mode 100644 index 0000000..ae1557a --- /dev/null +++ b/tree-sitter-c/bindings/swift/TreeSitterC/c.h @@ -0,0 +1,16 @@ +#ifndef TREE_SITTER_C_H_ +#define TREE_SITTER_C_H_ + +typedef struct TSLanguage TSLanguage; + +#ifdef __cplusplus +extern "C" { +#endif + +extern TSLanguage *tree_sitter_c(); + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_C_H_ \ No newline at end of file diff --git a/tree-sitter-c/examples/cluster.c b/tree-sitter-c/examples/cluster.c new file mode 100644 index 0000000..77ec2f1 --- /dev/null +++ b/tree-sitter-c/examples/cluster.c @@ -0,0 +1,5446 @@ +/* Redis Cluster implementation. + * + * Copyright (c) 2009-2012, Salvatore Sanfilippo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Redis nor the names of its contributors may be used + * to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "server.h" +#include "cluster.h" +#include "endianconv.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +/* A global reference to myself is handy to make code more clear. + * Myself always points to server.cluster->myself, that is, the clusterNode + * that represents this node. */ +clusterNode *myself = NULL; + +clusterNode *createClusterNode(char *nodename, int flags); +int clusterAddNode(clusterNode *node); +void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask); +void clusterReadHandler(aeEventLoop *el, int fd, void *privdata, int mask); +void clusterSendPing(clusterLink *link, int type); +void clusterSendFail(char *nodename); +void clusterSendFailoverAuthIfNeeded(clusterNode *node, clusterMsg *request); +void clusterUpdateState(void); +int clusterNodeGetSlotBit(clusterNode *n, int slot); +sds clusterGenNodesDescription(int filter); +clusterNode *clusterLookupNode(char *name); +int clusterNodeAddSlave(clusterNode *master, clusterNode *slave); +int clusterAddSlot(clusterNode *n, int slot); +int clusterDelSlot(int slot); +int clusterDelNodeSlots(clusterNode *node); +int clusterNodeSetSlotBit(clusterNode *n, int slot); +void clusterSetMaster(clusterNode *n); +void clusterHandleSlaveFailover(void); +void clusterHandleSlaveMigration(int max_slaves); +int bitmapTestBit(unsigned char *bitmap, int pos); +void clusterDoBeforeSleep(int flags); +void clusterSendUpdate(clusterLink *link, clusterNode *node); +void resetManualFailover(void); +void clusterCloseAllSlots(void); +void clusterSetNodeAsMaster(clusterNode *n); +void clusterDelNode(clusterNode *delnode); +sds representClusterNodeFlags(sds ci, uint16_t flags); +uint64_t clusterGetMaxEpoch(void); +int clusterBumpConfigEpochWithoutConsensus(void); + +/* ----------------------------------------------------------------------------- + * Initialization + * -------------------------------------------------------------------------- */ + +/* Load the cluster config from 'filename'. + * + * If the file does not exist or is zero-length (this may happen because + * when we lock the nodes.conf file, we create a zero-length one for the + * sake of locking if it does not already exist), C_ERR is returned. + * If the configuration was loaded from the file, C_OK is returned. */ +int clusterLoadConfig(char *filename) { + FILE *fp = fopen(filename,"r"); + struct stat sb; + char *line; + int maxline, j; + + if (fp == NULL) { + if (errno == ENOENT) { + return C_ERR; + } else { + serverLog(LL_WARNING, + "Loading the cluster node config from %s: %s", + filename, strerror(errno)); + exit(1); + } + } + + /* Check if the file is zero-length: if so return C_ERR to signal + * we have to write the config. */ + if (fstat(fileno(fp),&sb) != -1 && sb.st_size == 0) { + fclose(fp); + return C_ERR; + } + + /* Parse the file. Note that single lines of the cluster config file can + * be really long as they include all the hash slots of the node. + * This means in the worst possible case, half of the Redis slots will be + * present in a single line, possibly in importing or migrating state, so + * together with the node ID of the sender/receiver. + * + * To simplify we allocate 1024+CLUSTER_SLOTS*128 bytes per line. */ + maxline = 1024+CLUSTER_SLOTS*128; + line = zmalloc(maxline); + while(fgets(line,maxline,fp) != NULL) { + int argc; + sds *argv; + clusterNode *n, *master; + char *p, *s; + + /* Skip blank lines, they can be created either by users manually + * editing nodes.conf or by the config writing process if stopped + * before the truncate() call. */ + if (line[0] == '\n' || line[0] == '\0') continue; + + /* Split the line into arguments for processing. */ + argv = sdssplitargs(line,&argc); + if (argv == NULL) goto fmterr; + + /* Handle the special "vars" line. Don't pretend it is the last + * line even if it actually is when generated by Redis. */ + if (strcasecmp(argv[0],"vars") == 0) { + for (j = 1; j < argc; j += 2) { + if (strcasecmp(argv[j],"currentEpoch") == 0) { + server.cluster->currentEpoch = + strtoull(argv[j+1],NULL,10); + } else if (strcasecmp(argv[j],"lastVoteEpoch") == 0) { + server.cluster->lastVoteEpoch = + strtoull(argv[j+1],NULL,10); + } else { + serverLog(LL_WARNING, + "Skipping unknown cluster config variable '%s'", + argv[j]); + } + } + sdsfreesplitres(argv,argc); + continue; + } + + /* Regular config lines have at least eight fields */ + if (argc < 8) goto fmterr; + + /* Create this node if it does not exist */ + n = clusterLookupNode(argv[0]); + if (!n) { + n = createClusterNode(argv[0],0); + clusterAddNode(n); + } + /* Address and port */ + if ((p = strrchr(argv[1],':')) == NULL) goto fmterr; + *p = '\0'; + memcpy(n->ip,argv[1],strlen(argv[1])+1); + char *port = p+1; + char *busp = strchr(port,'@'); + if (busp) { + *busp = '\0'; + busp++; + } + n->port = atoi(port); + /* In older versions of nodes.conf the "@busport" part is missing. + * In this case we set it to the default offset of 10000 from the + * base port. */ + n->cport = busp ? atoi(busp) : n->port + CLUSTER_PORT_INCR; + + /* Parse flags */ + p = s = argv[2]; + while(p) { + p = strchr(s,','); + if (p) *p = '\0'; + if (!strcasecmp(s,"myself")) { + serverAssert(server.cluster->myself == NULL); + myself = server.cluster->myself = n; + n->flags |= CLUSTER_NODE_MYSELF; + } else if (!strcasecmp(s,"master")) { + n->flags |= CLUSTER_NODE_MASTER; + } else if (!strcasecmp(s,"slave")) { + n->flags |= CLUSTER_NODE_SLAVE; + } else if (!strcasecmp(s,"fail?")) { + n->flags |= CLUSTER_NODE_PFAIL; + } else if (!strcasecmp(s,"fail")) { + n->flags |= CLUSTER_NODE_FAIL; + n->fail_time = mstime(); + } else if (!strcasecmp(s,"handshake")) { + n->flags |= CLUSTER_NODE_HANDSHAKE; + } else if (!strcasecmp(s,"noaddr")) { + n->flags |= CLUSTER_NODE_NOADDR; + } else if (!strcasecmp(s,"noflags")) { + /* nothing to do */ + } else { + serverPanic("Unknown flag in redis cluster config file"); + } + if (p) s = p+1; + } + + /* Get master if any. Set the master and populate master's + * slave list. */ + if (argv[3][0] != '-') { + master = clusterLookupNode(argv[3]); + if (!master) { + master = createClusterNode(argv[3],0); + clusterAddNode(master); + } + n->slaveof = master; + clusterNodeAddSlave(master,n); + } + + /* Set ping sent / pong received timestamps */ + if (atoi(argv[4])) n->ping_sent = mstime(); + if (atoi(argv[5])) n->pong_received = mstime(); + + /* Set configEpoch for this node. */ + n->configEpoch = strtoull(argv[6],NULL,10); + + /* Populate hash slots served by this instance. */ + for (j = 8; j < argc; j++) { + int start, stop; + + if (argv[j][0] == '[') { + /* Here we handle migrating / importing slots */ + int slot; + char direction; + clusterNode *cn; + + p = strchr(argv[j],'-'); + serverAssert(p != NULL); + *p = '\0'; + direction = p[1]; /* Either '>' or '<' */ + slot = atoi(argv[j]+1); + p += 3; + cn = clusterLookupNode(p); + if (!cn) { + cn = createClusterNode(p,0); + clusterAddNode(cn); + } + if (direction == '>') { + server.cluster->migrating_slots_to[slot] = cn; + } else { + server.cluster->importing_slots_from[slot] = cn; + } + continue; + } else if ((p = strchr(argv[j],'-')) != NULL) { + *p = '\0'; + start = atoi(argv[j]); + stop = atoi(p+1); + } else { + start = stop = atoi(argv[j]); + } + while(start <= stop) clusterAddSlot(n, start++); + } + + sdsfreesplitres(argv,argc); + } + /* Config sanity check */ + if (server.cluster->myself == NULL) goto fmterr; + + zfree(line); + fclose(fp); + + serverLog(LL_NOTICE,"Node configuration loaded, I'm %.40s", myself->name); + + /* Something that should never happen: currentEpoch smaller than + * the max epoch found in the nodes configuration. However we handle this + * as some form of protection against manual editing of critical files. */ + if (clusterGetMaxEpoch() > server.cluster->currentEpoch) { + server.cluster->currentEpoch = clusterGetMaxEpoch(); + } + return C_OK; + +fmterr: + serverLog(LL_WARNING, + "Unrecoverable error: corrupted cluster config file."); + zfree(line); + if (fp) fclose(fp); + exit(1); +} + +/* Cluster node configuration is exactly the same as CLUSTER NODES output. + * + * This function writes the node config and returns 0, on error -1 + * is returned. + * + * Note: we need to write the file in an atomic way from the point of view + * of the POSIX filesystem semantics, so that if the server is stopped + * or crashes during the write, we'll end with either the old file or the + * new one. Since we have the full payload to write available we can use + * a single write to write the whole file. If the pre-existing file was + * bigger we pad our payload with newlines that are anyway ignored and truncate + * the file afterward. */ +int clusterSaveConfig(int do_fsync) { + sds ci; + size_t content_size; + struct stat sb; + int fd; + + server.cluster->todo_before_sleep &= ~CLUSTER_TODO_SAVE_CONFIG; + + /* Get the nodes description and concatenate our "vars" directive to + * save currentEpoch and lastVoteEpoch. */ + ci = clusterGenNodesDescription(CLUSTER_NODE_HANDSHAKE); + ci = sdscatprintf(ci,"vars currentEpoch %llu lastVoteEpoch %llu\n", + (unsigned long long) server.cluster->currentEpoch, + (unsigned long long) server.cluster->lastVoteEpoch); + content_size = sdslen(ci); + + if ((fd = open(server.cluster_configfile,O_WRONLY|O_CREAT,0644)) + == -1) goto err; + + /* Pad the new payload if the existing file length is greater. */ + if (fstat(fd,&sb) != -1) { + if (sb.st_size > (off_t)content_size) { + ci = sdsgrowzero(ci,sb.st_size); + memset(ci+content_size,'\n',sb.st_size-content_size); + } + } + if (write(fd,ci,sdslen(ci)) != (ssize_t)sdslen(ci)) goto err; + if (do_fsync) { + server.cluster->todo_before_sleep &= ~CLUSTER_TODO_FSYNC_CONFIG; + fsync(fd); + } + + /* Truncate the file if needed to remove the final \n padding that + * is just garbage. */ + if (content_size != sdslen(ci) && ftruncate(fd,content_size) == -1) { + /* ftruncate() failing is not a critical error. */ + } + close(fd); + sdsfree(ci); + return 0; + +err: + if (fd != -1) close(fd); + sdsfree(ci); + return -1; +} + +void clusterSaveConfigOrDie(int do_fsync) { + if (clusterSaveConfig(do_fsync) == -1) { + serverLog(LL_WARNING,"Fatal: can't update cluster config file."); + exit(1); + } +} + +/* Lock the cluster config using flock(), and leaks the file descritor used to + * acquire the lock so that the file will be locked forever. + * + * This works because we always update nodes.conf with a new version + * in-place, reopening the file, and writing to it in place (later adjusting + * the length with ftruncate()). + * + * On success C_OK is returned, otherwise an error is logged and + * the function returns C_ERR to signal a lock was not acquired. */ +int clusterLockConfig(char *filename) { +/* flock() does not exist on Solaris + * and a fcntl-based solution won't help, as we constantly re-open that file, + * which will release _all_ locks anyway + */ +#if !defined(__sun) + /* To lock it, we need to open the file in a way it is created if + * it does not exist, otherwise there is a race condition with other + * processes. */ + int fd = open(filename,O_WRONLY|O_CREAT,0644); + if (fd == -1) { + serverLog(LL_WARNING, + "Can't open %s in order to acquire a lock: %s", + filename, strerror(errno)); + return C_ERR; + } + + if (flock(fd,LOCK_EX|LOCK_NB) == -1) { + if (errno == EWOULDBLOCK) { + serverLog(LL_WARNING, + "Sorry, the cluster configuration file %s is already used " + "by a different Redis Cluster node. Please make sure that " + "different nodes use different cluster configuration " + "files.", filename); + } else { + serverLog(LL_WARNING, + "Impossible to lock %s: %s", filename, strerror(errno)); + } + close(fd); + return C_ERR; + } + /* Lock acquired: leak the 'fd' by not closing it, so that we'll retain the + * lock to the file as long as the process exists. */ +#endif /* __sun */ + + return C_OK; +} + +void clusterInit(void) { + int saveconf = 0; + + server.cluster = zmalloc(sizeof(clusterState)); + server.cluster->myself = NULL; + server.cluster->currentEpoch = 0; + server.cluster->state = CLUSTER_FAIL; + server.cluster->size = 1; + server.cluster->todo_before_sleep = 0; + server.cluster->nodes = dictCreate(&clusterNodesDictType,NULL); + server.cluster->nodes_black_list = + dictCreate(&clusterNodesBlackListDictType,NULL); + server.cluster->failover_auth_time = 0; + server.cluster->failover_auth_count = 0; + server.cluster->failover_auth_rank = 0; + server.cluster->failover_auth_epoch = 0; + server.cluster->cant_failover_reason = CLUSTER_CANT_FAILOVER_NONE; + server.cluster->lastVoteEpoch = 0; + for (int i = 0; i < CLUSTERMSG_TYPE_COUNT; i++) { + server.cluster->stats_bus_messages_sent[i] = 0; + server.cluster->stats_bus_messages_received[i] = 0; + } + server.cluster->stats_pfail_nodes = 0; + memset(server.cluster->slots,0, sizeof(server.cluster->slots)); + clusterCloseAllSlots(); + + /* Lock the cluster config file to make sure every node uses + * its own nodes.conf. */ + if (clusterLockConfig(server.cluster_configfile) == C_ERR) + exit(1); + + /* Load or create a new nodes configuration. */ + if (clusterLoadConfig(server.cluster_configfile) == C_ERR) { + /* No configuration found. We will just use the random name provided + * by the createClusterNode() function. */ + myself = server.cluster->myself = + createClusterNode(NULL,CLUSTER_NODE_MYSELF|CLUSTER_NODE_MASTER); + serverLog(LL_NOTICE,"No cluster configuration found, I'm %.40s", + myself->name); + clusterAddNode(myself); + saveconf = 1; + } + if (saveconf) clusterSaveConfigOrDie(1); + + /* We need a listening TCP port for our cluster messaging needs. */ + server.cfd_count = 0; + + /* Port sanity check II + * The other handshake port check is triggered too late to stop + * us from trying to use a too-high cluster port number. */ + if (server.port > (65535-CLUSTER_PORT_INCR)) { + serverLog(LL_WARNING, "Redis port number too high. " + "Cluster communication port is 10,000 port " + "numbers higher than your Redis port. " + "Your Redis port number must be " + "lower than 55535."); + exit(1); + } + + if (listenToPort(server.port+CLUSTER_PORT_INCR, + server.cfd,&server.cfd_count) == C_ERR) + { + exit(1); + } else { + int j; + + for (j = 0; j < server.cfd_count; j++) { + if (aeCreateFileEvent(server.el, server.cfd[j], AE_READABLE, + clusterAcceptHandler, NULL) == AE_ERR) + serverPanic("Unrecoverable error creating Redis Cluster " + "file event."); + } + } + + /* The slots -> keys map is a radix tree. Initialize it here. */ + server.cluster->slots_to_keys = raxNew(); + memset(server.cluster->slots_keys_count,0, + sizeof(server.cluster->slots_keys_count)); + + /* Set myself->port / cport to my listening ports, we'll just need to + * discover the IP address via MEET messages. */ + myself->port = server.port; + myself->cport = server.port+CLUSTER_PORT_INCR; + if (server.cluster_announce_port) + myself->port = server.cluster_announce_port; + if (server.cluster_announce_bus_port) + myself->cport = server.cluster_announce_bus_port; + + server.cluster->mf_end = 0; + resetManualFailover(); +} + +/* Reset a node performing a soft or hard reset: + * + * 1) All other nodes are forget. + * 2) All the assigned / open slots are released. + * 3) If the node is a slave, it turns into a master. + * 5) Only for hard reset: a new Node ID is generated. + * 6) Only for hard reset: currentEpoch and configEpoch are set to 0. + * 7) The new configuration is saved and the cluster state updated. + * 8) If the node was a slave, the whole data set is flushed away. */ +void clusterReset(int hard) { + dictIterator *di; + dictEntry *de; + int j; + + /* Turn into master. */ + if (nodeIsSlave(myself)) { + clusterSetNodeAsMaster(myself); + replicationUnsetMaster(); + emptyDb(-1,EMPTYDB_NO_FLAGS,NULL); + } + + /* Close slots, reset manual failover state. */ + clusterCloseAllSlots(); + resetManualFailover(); + + /* Unassign all the slots. */ + for (j = 0; j < CLUSTER_SLOTS; j++) clusterDelSlot(j); + + /* Forget all the nodes, but myself. */ + di = dictGetSafeIterator(server.cluster->nodes); + while((de = dictNext(di)) != NULL) { + clusterNode *node = dictGetVal(de); + + if (node == myself) continue; + clusterDelNode(node); + } + dictReleaseIterator(di); + + /* Hard reset only: set epochs to 0, change node ID. */ + if (hard) { + sds oldname; + + server.cluster->currentEpoch = 0; + server.cluster->lastVoteEpoch = 0; + myself->configEpoch = 0; + serverLog(LL_WARNING, "configEpoch set to 0 via CLUSTER RESET HARD"); + + /* To change the Node ID we need to remove the old name from the + * nodes table, change the ID, and re-add back with new name. */ + oldname = sdsnewlen(myself->name, CLUSTER_NAMELEN); + dictDelete(server.cluster->nodes,oldname); + sdsfree(oldname); + getRandomHexChars(myself->name, CLUSTER_NAMELEN); + clusterAddNode(myself); + serverLog(LL_NOTICE,"Node hard reset, now I'm %.40s", myself->name); + } + + /* Make sure to persist the new config and update the state. */ + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| + CLUSTER_TODO_UPDATE_STATE| + CLUSTER_TODO_FSYNC_CONFIG); +} + +/* ----------------------------------------------------------------------------- + * CLUSTER communication link + * -------------------------------------------------------------------------- */ + +clusterLink *createClusterLink(clusterNode *node) { + clusterLink *link = zmalloc(sizeof(*link)); + link->ctime = mstime(); + link->sndbuf = sdsempty(); + link->rcvbuf = sdsempty(); + link->node = node; + link->fd = -1; + return link; +} + +/* Free a cluster link, but does not free the associated node of course. + * This function will just make sure that the original node associated + * with this link will have the 'link' field set to NULL. */ +void freeClusterLink(clusterLink *link) { + if (link->fd != -1) { + aeDeleteFileEvent(server.el, link->fd, AE_WRITABLE); + aeDeleteFileEvent(server.el, link->fd, AE_READABLE); + } + sdsfree(link->sndbuf); + sdsfree(link->rcvbuf); + if (link->node) + link->node->link = NULL; + close(link->fd); + zfree(link); +} + +#define MAX_CLUSTER_ACCEPTS_PER_CALL 1000 +void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) { + int cport, cfd; + int max = MAX_CLUSTER_ACCEPTS_PER_CALL; + char cip[NET_IP_STR_LEN]; + clusterLink *link; + UNUSED(el); + UNUSED(mask); + UNUSED(privdata); + + /* If the server is starting up, don't accept cluster connections: + * UPDATE messages may interact with the database content. */ + if (server.masterhost == NULL && server.loading) return; + + while(max--) { + cfd = anetTcpAccept(server.neterr, fd, cip, sizeof(cip), &cport); + if (cfd == ANET_ERR) { + if (errno != EWOULDBLOCK) + serverLog(LL_VERBOSE, + "Error accepting cluster node: %s", server.neterr); + return; + } + anetNonBlock(NULL,cfd); + anetEnableTcpNoDelay(NULL,cfd); + + /* Use non-blocking I/O for cluster messages. */ + serverLog(LL_VERBOSE,"Accepted cluster node %s:%d", cip, cport); + /* Create a link object we use to handle the connection. + * It gets passed to the readable handler when data is available. + * Initiallly the link->node pointer is set to NULL as we don't know + * which node is, but the right node is references once we know the + * node identity. */ + link = createClusterLink(NULL); + link->fd = cfd; + aeCreateFileEvent(server.el,cfd,AE_READABLE,clusterReadHandler,link); + } +} + +/* ----------------------------------------------------------------------------- + * Key space handling + * -------------------------------------------------------------------------- */ + +/* We have 16384 hash slots. The hash slot of a given key is obtained + * as the least significant 14 bits of the crc16 of the key. + * + * However if the key contains the {...} pattern, only the part between + * { and } is hashed. This may be useful in the future to force certain + * keys to be in the same node (assuming no resharding is in progress). */ +unsigned int keyHashSlot(char *key, int keylen) { + int s, e; /* start-end indexes of { and } */ + + for (s = 0; s < keylen; s++) + if (key[s] == '{') break; + + /* No '{' ? Hash the whole key. This is the base case. */ + if (s == keylen) return crc16(key,keylen) & 0x3FFF; + + /* '{' found? Check if we have the corresponding '}'. */ + for (e = s+1; e < keylen; e++) + if (key[e] == '}') break; + + /* No '}' or nothing betweeen {} ? Hash the whole key. */ + if (e == keylen || e == s+1) return crc16(key,keylen) & 0x3FFF; + + /* If we are here there is both a { and a } on its right. Hash + * what is in the middle between { and }. */ + return crc16(key+s+1,e-s-1) & 0x3FFF; +} + +/* ----------------------------------------------------------------------------- + * CLUSTER node API + * -------------------------------------------------------------------------- */ + +/* Create a new cluster node, with the specified flags. + * If "nodename" is NULL this is considered a first handshake and a random + * node name is assigned to this node (it will be fixed later when we'll + * receive the first pong). + * + * The node is created and returned to the user, but it is not automatically + * added to the nodes hash table. */ +clusterNode *createClusterNode(char *nodename, int flags) { + clusterNode *node = zmalloc(sizeof(*node)); + + if (nodename) + memcpy(node->name, nodename, CLUSTER_NAMELEN); + else + getRandomHexChars(node->name, CLUSTER_NAMELEN); + node->ctime = mstime(); + node->configEpoch = 0; + node->flags = flags; + memset(node->slots,0,sizeof(node->slots)); + node->numslots = 0; + node->numslaves = 0; + node->slaves = NULL; + node->slaveof = NULL; + node->ping_sent = node->pong_received = 0; + node->fail_time = 0; + node->link = NULL; + memset(node->ip,0,sizeof(node->ip)); + node->port = 0; + node->cport = 0; + node->fail_reports = listCreate(); + node->voted_time = 0; + node->orphaned_time = 0; + node->repl_offset_time = 0; + node->repl_offset = 0; + listSetFreeMethod(node->fail_reports,zfree); + return node; +} + +/* This function is called every time we get a failure report from a node. + * The side effect is to populate the fail_reports list (or to update + * the timestamp of an existing report). + * + * 'failing' is the node that is in failure state according to the + * 'sender' node. + * + * The function returns 0 if it just updates a timestamp of an existing + * failure report from the same sender. 1 is returned if a new failure + * report is created. */ +int clusterNodeAddFailureReport(clusterNode *failing, clusterNode *sender) { + list *l = failing->fail_reports; + listNode *ln; + listIter li; + clusterNodeFailReport *fr; + + /* If a failure report from the same sender already exists, just update + * the timestamp. */ + listRewind(l,&li); + while ((ln = listNext(&li)) != NULL) { + fr = ln->value; + if (fr->node == sender) { + fr->time = mstime(); + return 0; + } + } + + /* Otherwise create a new report. */ + fr = zmalloc(sizeof(*fr)); + fr->node = sender; + fr->time = mstime(); + listAddNodeTail(l,fr); + return 1; +} + +/* Remove failure reports that are too old, where too old means reasonably + * older than the global node timeout. Note that anyway for a node to be + * flagged as FAIL we need to have a local PFAIL state that is at least + * older than the global node timeout, so we don't just trust the number + * of failure reports from other nodes. */ +void clusterNodeCleanupFailureReports(clusterNode *node) { + list *l = node->fail_reports; + listNode *ln; + listIter li; + clusterNodeFailReport *fr; + mstime_t maxtime = server.cluster_node_timeout * + CLUSTER_FAIL_REPORT_VALIDITY_MULT; + mstime_t now = mstime(); + + listRewind(l,&li); + while ((ln = listNext(&li)) != NULL) { + fr = ln->value; + if (now - fr->time > maxtime) listDelNode(l,ln); + } +} + +/* Remove the failing report for 'node' if it was previously considered + * failing by 'sender'. This function is called when a node informs us via + * gossip that a node is OK from its point of view (no FAIL or PFAIL flags). + * + * Note that this function is called relatively often as it gets called even + * when there are no nodes failing, and is O(N), however when the cluster is + * fine the failure reports list is empty so the function runs in constant + * time. + * + * The function returns 1 if the failure report was found and removed. + * Otherwise 0 is returned. */ +int clusterNodeDelFailureReport(clusterNode *node, clusterNode *sender) { + list *l = node->fail_reports; + listNode *ln; + listIter li; + clusterNodeFailReport *fr; + + /* Search for a failure report from this sender. */ + listRewind(l,&li); + while ((ln = listNext(&li)) != NULL) { + fr = ln->value; + if (fr->node == sender) break; + } + if (!ln) return 0; /* No failure report from this sender. */ + + /* Remove the failure report. */ + listDelNode(l,ln); + clusterNodeCleanupFailureReports(node); + return 1; +} + +/* Return the number of external nodes that believe 'node' is failing, + * not including this node, that may have a PFAIL or FAIL state for this + * node as well. */ +int clusterNodeFailureReportsCount(clusterNode *node) { + clusterNodeCleanupFailureReports(node); + return listLength(node->fail_reports); +} + +int clusterNodeRemoveSlave(clusterNode *master, clusterNode *slave) { + int j; + + for (j = 0; j < master->numslaves; j++) { + if (master->slaves[j] == slave) { + if ((j+1) < master->numslaves) { + int remaining_slaves = (master->numslaves - j) - 1; + memmove(master->slaves+j,master->slaves+(j+1), + (sizeof(*master->slaves) * remaining_slaves)); + } + master->numslaves--; + if (master->numslaves == 0) + master->flags &= ~CLUSTER_NODE_MIGRATE_TO; + return C_OK; + } + } + return C_ERR; +} + +int clusterNodeAddSlave(clusterNode *master, clusterNode *slave) { + int j; + + /* If it's already a slave, don't add it again. */ + for (j = 0; j < master->numslaves; j++) + if (master->slaves[j] == slave) return C_ERR; + master->slaves = zrealloc(master->slaves, + sizeof(clusterNode*)*(master->numslaves+1)); + master->slaves[master->numslaves] = slave; + master->numslaves++; + master->flags |= CLUSTER_NODE_MIGRATE_TO; + return C_OK; +} + +int clusterCountNonFailingSlaves(clusterNode *n) { + int j, okslaves = 0; + + for (j = 0; j < n->numslaves; j++) + if (!nodeFailed(n->slaves[j])) okslaves++; + return okslaves; +} + +/* Low level cleanup of the node structure. Only called by clusterDelNode(). */ +void freeClusterNode(clusterNode *n) { + sds nodename; + int j; + + /* If the node has associated slaves, we have to set + * all the slaves->slaveof fields to NULL (unknown). */ + for (j = 0; j < n->numslaves; j++) + n->slaves[j]->slaveof = NULL; + + /* Remove this node from the list of slaves of its master. */ + if (nodeIsSlave(n) && n->slaveof) clusterNodeRemoveSlave(n->slaveof,n); + + /* Unlink from the set of nodes. */ + nodename = sdsnewlen(n->name, CLUSTER_NAMELEN); + serverAssert(dictDelete(server.cluster->nodes,nodename) == DICT_OK); + sdsfree(nodename); + + /* Release link and associated data structures. */ + if (n->link) freeClusterLink(n->link); + listRelease(n->fail_reports); + zfree(n->slaves); + zfree(n); +} + +/* Add a node to the nodes hash table */ +int clusterAddNode(clusterNode *node) { + int retval; + + retval = dictAdd(server.cluster->nodes, + sdsnewlen(node->name,CLUSTER_NAMELEN), node); + return (retval == DICT_OK) ? C_OK : C_ERR; +} + +/* Remove a node from the cluster. The functio performs the high level + * cleanup, calling freeClusterNode() for the low level cleanup. + * Here we do the following: + * + * 1) Mark all the slots handled by it as unassigned. + * 2) Remove all the failure reports sent by this node and referenced by + * other nodes. + * 3) Free the node with freeClusterNode() that will in turn remove it + * from the hash table and from the list of slaves of its master, if + * it is a slave node. + */ +void clusterDelNode(clusterNode *delnode) { + int j; + dictIterator *di; + dictEntry *de; + + /* 1) Mark slots as unassigned. */ + for (j = 0; j < CLUSTER_SLOTS; j++) { + if (server.cluster->importing_slots_from[j] == delnode) + server.cluster->importing_slots_from[j] = NULL; + if (server.cluster->migrating_slots_to[j] == delnode) + server.cluster->migrating_slots_to[j] = NULL; + if (server.cluster->slots[j] == delnode) + clusterDelSlot(j); + } + + /* 2) Remove failure reports. */ + di = dictGetSafeIterator(server.cluster->nodes); + while((de = dictNext(di)) != NULL) { + clusterNode *node = dictGetVal(de); + + if (node == delnode) continue; + clusterNodeDelFailureReport(node,delnode); + } + dictReleaseIterator(di); + + /* 3) Free the node, unlinking it from the cluster. */ + freeClusterNode(delnode); +} + +/* Node lookup by name */ +clusterNode *clusterLookupNode(char *name) { + sds s = sdsnewlen(name, CLUSTER_NAMELEN); + dictEntry *de; + + de = dictFind(server.cluster->nodes,s); + sdsfree(s); + if (de == NULL) return NULL; + return dictGetVal(de); +} + +/* This is only used after the handshake. When we connect a given IP/PORT + * as a result of CLUSTER MEET we don't have the node name yet, so we + * pick a random one, and will fix it when we receive the PONG request using + * this function. */ +void clusterRenameNode(clusterNode *node, char *newname) { + int retval; + sds s = sdsnewlen(node->name, CLUSTER_NAMELEN); + + serverLog(LL_DEBUG,"Renaming node %.40s into %.40s", + node->name, newname); + retval = dictDelete(server.cluster->nodes, s); + sdsfree(s); + serverAssert(retval == DICT_OK); + memcpy(node->name, newname, CLUSTER_NAMELEN); + clusterAddNode(node); +} + +/* ----------------------------------------------------------------------------- + * CLUSTER config epoch handling + * -------------------------------------------------------------------------- */ + +/* Return the greatest configEpoch found in the cluster, or the current + * epoch if greater than any node configEpoch. */ +uint64_t clusterGetMaxEpoch(void) { + uint64_t max = 0; + dictIterator *di; + dictEntry *de; + + di = dictGetSafeIterator(server.cluster->nodes); + while((de = dictNext(di)) != NULL) { + clusterNode *node = dictGetVal(de); + if (node->configEpoch > max) max = node->configEpoch; + } + dictReleaseIterator(di); + if (max < server.cluster->currentEpoch) max = server.cluster->currentEpoch; + return max; +} + +/* If this node epoch is zero or is not already the greatest across the + * cluster (from the POV of the local configuration), this function will: + * + * 1) Generate a new config epoch, incrementing the current epoch. + * 2) Assign the new epoch to this node, WITHOUT any consensus. + * 3) Persist the configuration on disk before sending packets with the + * new configuration. + * + * If the new config epoch is generated and assigend, C_OK is returned, + * otherwise C_ERR is returned (since the node has already the greatest + * configuration around) and no operation is performed. + * + * Important note: this function violates the principle that config epochs + * should be generated with consensus and should be unique across the cluster. + * However Redis Cluster uses this auto-generated new config epochs in two + * cases: + * + * 1) When slots are closed after importing. Otherwise resharding would be + * too expensive. + * 2) When CLUSTER FAILOVER is called with options that force a slave to + * failover its master even if there is not master majority able to + * create a new configuration epoch. + * + * Redis Cluster will not explode using this function, even in the case of + * a collision between this node and another node, generating the same + * configuration epoch unilaterally, because the config epoch conflict + * resolution algorithm will eventually move colliding nodes to different + * config epochs. However using this function may violate the "last failover + * wins" rule, so should only be used with care. */ +int clusterBumpConfigEpochWithoutConsensus(void) { + uint64_t maxEpoch = clusterGetMaxEpoch(); + + if (myself->configEpoch == 0 || + myself->configEpoch != maxEpoch) + { + server.cluster->currentEpoch++; + myself->configEpoch = server.cluster->currentEpoch; + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| + CLUSTER_TODO_FSYNC_CONFIG); + serverLog(LL_WARNING, + "New configEpoch set to %llu", + (unsigned long long) myself->configEpoch); + return C_OK; + } else { + return C_ERR; + } +} + +/* This function is called when this node is a master, and we receive from + * another master a configuration epoch that is equal to our configuration + * epoch. + * + * BACKGROUND + * + * It is not possible that different slaves get the same config + * epoch during a failover election, because the slaves need to get voted + * by a majority. However when we perform a manual resharding of the cluster + * the node will assign a configuration epoch to itself without to ask + * for agreement. Usually resharding happens when the cluster is working well + * and is supervised by the sysadmin, however it is possible for a failover + * to happen exactly while the node we are resharding a slot to assigns itself + * a new configuration epoch, but before it is able to propagate it. + * + * So technically it is possible in this condition that two nodes end with + * the same configuration epoch. + * + * Another possibility is that there are bugs in the implementation causing + * this to happen. + * + * Moreover when a new cluster is created, all the nodes start with the same + * configEpoch. This collision resolution code allows nodes to automatically + * end with a different configEpoch at startup automatically. + * + * In all the cases, we want a mechanism that resolves this issue automatically + * as a safeguard. The same configuration epoch for masters serving different + * set of slots is not harmful, but it is if the nodes end serving the same + * slots for some reason (manual errors or software bugs) without a proper + * failover procedure. + * + * In general we want a system that eventually always ends with different + * masters having different configuration epochs whatever happened, since + * nothign is worse than a split-brain condition in a distributed system. + * + * BEHAVIOR + * + * When this function gets called, what happens is that if this node + * has the lexicographically smaller Node ID compared to the other node + * with the conflicting epoch (the 'sender' node), it will assign itself + * the greatest configuration epoch currently detected among nodes plus 1. + * + * This means that even if there are multiple nodes colliding, the node + * with the greatest Node ID never moves forward, so eventually all the nodes + * end with a different configuration epoch. + */ +void clusterHandleConfigEpochCollision(clusterNode *sender) { + /* Prerequisites: nodes have the same configEpoch and are both masters. */ + if (sender->configEpoch != myself->configEpoch || + !nodeIsMaster(sender) || !nodeIsMaster(myself)) return; + /* Don't act if the colliding node has a smaller Node ID. */ + if (memcmp(sender->name,myself->name,CLUSTER_NAMELEN) <= 0) return; + /* Get the next ID available at the best of this node knowledge. */ + server.cluster->currentEpoch++; + myself->configEpoch = server.cluster->currentEpoch; + clusterSaveConfigOrDie(1); + serverLog(LL_VERBOSE, + "WARNING: configEpoch collision with node %.40s." + " configEpoch set to %llu", + sender->name, + (unsigned long long) myself->configEpoch); +} + +/* ----------------------------------------------------------------------------- + * CLUSTER nodes blacklist + * + * The nodes blacklist is just a way to ensure that a given node with a given + * Node ID is not readded before some time elapsed (this time is specified + * in seconds in CLUSTER_BLACKLIST_TTL). + * + * This is useful when we want to remove a node from the cluster completely: + * when CLUSTER FORGET is called, it also puts the node into the blacklist so + * that even if we receive gossip messages from other nodes that still remember + * about the node we want to remove, we don't re-add it before some time. + * + * Currently the CLUSTER_BLACKLIST_TTL is set to 1 minute, this means + * that redis-trib has 60 seconds to send CLUSTER FORGET messages to nodes + * in the cluster without dealing with the problem of other nodes re-adding + * back the node to nodes we already sent the FORGET command to. + * + * The data structure used is a hash table with an sds string representing + * the node ID as key, and the time when it is ok to re-add the node as + * value. + * -------------------------------------------------------------------------- */ + +#define CLUSTER_BLACKLIST_TTL 60 /* 1 minute. */ + + +/* Before of the addNode() or Exists() operations we always remove expired + * entries from the black list. This is an O(N) operation but it is not a + * problem since add / exists operations are called very infrequently and + * the hash table is supposed to contain very little elements at max. + * However without the cleanup during long uptimes and with some automated + * node add/removal procedures, entries could accumulate. */ +void clusterBlacklistCleanup(void) { + dictIterator *di; + dictEntry *de; + + di = dictGetSafeIterator(server.cluster->nodes_black_list); + while((de = dictNext(di)) != NULL) { + int64_t expire = dictGetUnsignedIntegerVal(de); + + if (expire < server.unixtime) + dictDelete(server.cluster->nodes_black_list,dictGetKey(de)); + } + dictReleaseIterator(di); +} + +/* Cleanup the blacklist and add a new node ID to the black list. */ +void clusterBlacklistAddNode(clusterNode *node) { + dictEntry *de; + sds id = sdsnewlen(node->name,CLUSTER_NAMELEN); + + clusterBlacklistCleanup(); + if (dictAdd(server.cluster->nodes_black_list,id,NULL) == DICT_OK) { + /* If the key was added, duplicate the sds string representation of + * the key for the next lookup. We'll free it at the end. */ + id = sdsdup(id); + } + de = dictFind(server.cluster->nodes_black_list,id); + dictSetUnsignedIntegerVal(de,time(NULL)+CLUSTER_BLACKLIST_TTL); + sdsfree(id); +} + +/* Return non-zero if the specified node ID exists in the blacklist. + * You don't need to pass an sds string here, any pointer to 40 bytes + * will work. */ +int clusterBlacklistExists(char *nodeid) { + sds id = sdsnewlen(nodeid,CLUSTER_NAMELEN); + int retval; + + clusterBlacklistCleanup(); + retval = dictFind(server.cluster->nodes_black_list,id) != NULL; + sdsfree(id); + return retval; +} + +/* ----------------------------------------------------------------------------- + * CLUSTER messages exchange - PING/PONG and gossip + * -------------------------------------------------------------------------- */ + +/* This function checks if a given node should be marked as FAIL. + * It happens if the following conditions are met: + * + * 1) We received enough failure reports from other master nodes via gossip. + * Enough means that the majority of the masters signaled the node is + * down recently. + * 2) We believe this node is in PFAIL state. + * + * If a failure is detected we also inform the whole cluster about this + * event trying to force every other node to set the FAIL flag for the node. + * + * Note that the form of agreement used here is weak, as we collect the majority + * of masters state during some time, and even if we force agreement by + * propagating the FAIL message, because of partitions we may not reach every + * node. However: + * + * 1) Either we reach the majority and eventually the FAIL state will propagate + * to all the cluster. + * 2) Or there is no majority so no slave promotion will be authorized and the + * FAIL flag will be cleared after some time. + */ +void markNodeAsFailingIfNeeded(clusterNode *node) { + int failures; + int needed_quorum = (server.cluster->size / 2) + 1; + + if (!nodeTimedOut(node)) return; /* We can reach it. */ + if (nodeFailed(node)) return; /* Already FAILing. */ + + failures = clusterNodeFailureReportsCount(node); + /* Also count myself as a voter if I'm a master. */ + if (nodeIsMaster(myself)) failures++; + if (failures < needed_quorum) return; /* No weak agreement from masters. */ + + serverLog(LL_NOTICE, + "Marking node %.40s as failing (quorum reached).", node->name); + + /* Mark the node as failing. */ + node->flags &= ~CLUSTER_NODE_PFAIL; + node->flags |= CLUSTER_NODE_FAIL; + node->fail_time = mstime(); + + /* Broadcast the failing node name to everybody, forcing all the other + * reachable nodes to flag the node as FAIL. */ + if (nodeIsMaster(myself)) clusterSendFail(node->name); + clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE|CLUSTER_TODO_SAVE_CONFIG); +} + +/* This function is called only if a node is marked as FAIL, but we are able + * to reach it again. It checks if there are the conditions to undo the FAIL + * state. */ +void clearNodeFailureIfNeeded(clusterNode *node) { + mstime_t now = mstime(); + + serverAssert(nodeFailed(node)); + + /* For slaves we always clear the FAIL flag if we can contact the + * node again. */ + if (nodeIsSlave(node) || node->numslots == 0) { + serverLog(LL_NOTICE, + "Clear FAIL state for node %.40s: %s is reachable again.", + node->name, + nodeIsSlave(node) ? "slave" : "master without slots"); + node->flags &= ~CLUSTER_NODE_FAIL; + clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE|CLUSTER_TODO_SAVE_CONFIG); + } + + /* If it is a master and... + * 1) The FAIL state is old enough. + * 2) It is yet serving slots from our point of view (not failed over). + * Apparently no one is going to fix these slots, clear the FAIL flag. */ + if (nodeIsMaster(node) && node->numslots > 0 && + (now - node->fail_time) > + (server.cluster_node_timeout * CLUSTER_FAIL_UNDO_TIME_MULT)) + { + serverLog(LL_NOTICE, + "Clear FAIL state for node %.40s: is reachable again and nobody is serving its slots after some time.", + node->name); + node->flags &= ~CLUSTER_NODE_FAIL; + clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE|CLUSTER_TODO_SAVE_CONFIG); + } +} + +/* Return true if we already have a node in HANDSHAKE state matching the + * specified ip address and port number. This function is used in order to + * avoid adding a new handshake node for the same address multiple times. */ +int clusterHandshakeInProgress(char *ip, int port, int cport) { + dictIterator *di; + dictEntry *de; + + di = dictGetSafeIterator(server.cluster->nodes); + while((de = dictNext(di)) != NULL) { + clusterNode *node = dictGetVal(de); + + if (!nodeInHandshake(node)) continue; + if (!strcasecmp(node->ip,ip) && + node->port == port && + node->cport == cport) break; + } + dictReleaseIterator(di); + return de != NULL; +} + +/* Start an handshake with the specified address if there is not one + * already in progress. Returns non-zero if the handshake was actually + * started. On error zero is returned and errno is set to one of the + * following values: + * + * EAGAIN - There is already an handshake in progress for this address. + * EINVAL - IP or port are not valid. */ +int clusterStartHandshake(char *ip, int port, int cport) { + clusterNode *n; + char norm_ip[NET_IP_STR_LEN]; + struct sockaddr_storage sa; + + /* IP sanity check */ + if (inet_pton(AF_INET,ip, + &(((struct sockaddr_in *)&sa)->sin_addr))) + { + sa.ss_family = AF_INET; + } else if (inet_pton(AF_INET6,ip, + &(((struct sockaddr_in6 *)&sa)->sin6_addr))) + { + sa.ss_family = AF_INET6; + } else { + errno = EINVAL; + return 0; + } + + /* Port sanity check */ + if (port <= 0 || port > 65535 || cport <= 0 || cport > 65535) { + errno = EINVAL; + return 0; + } + + /* Set norm_ip as the normalized string representation of the node + * IP address. */ + memset(norm_ip,0,NET_IP_STR_LEN); + if (sa.ss_family == AF_INET) + inet_ntop(AF_INET, + (void*)&(((struct sockaddr_in *)&sa)->sin_addr), + norm_ip,NET_IP_STR_LEN); + else + inet_ntop(AF_INET6, + (void*)&(((struct sockaddr_in6 *)&sa)->sin6_addr), + norm_ip,NET_IP_STR_LEN); + + if (clusterHandshakeInProgress(norm_ip,port,cport)) { + errno = EAGAIN; + return 0; + } + + /* Add the node with a random address (NULL as first argument to + * createClusterNode()). Everything will be fixed during the + * handshake. */ + n = createClusterNode(NULL,CLUSTER_NODE_HANDSHAKE|CLUSTER_NODE_MEET); + memcpy(n->ip,norm_ip,sizeof(n->ip)); + n->port = port; + n->cport = cport; + clusterAddNode(n); + return 1; +} + +/* Process the gossip section of PING or PONG packets. + * Note that this function assumes that the packet is already sanity-checked + * by the caller, not in the content of the gossip section, but in the + * length. */ +void clusterProcessGossipSection(clusterMsg *hdr, clusterLink *link) { + uint16_t count = ntohs(hdr->count); + clusterMsgDataGossip *g = (clusterMsgDataGossip*) hdr->data.ping.gossip; + clusterNode *sender = link->node ? link->node : clusterLookupNode(hdr->sender); + + while(count--) { + uint16_t flags = ntohs(g->flags); + clusterNode *node; + sds ci; + + ci = representClusterNodeFlags(sdsempty(), flags); + serverLog(LL_DEBUG,"GOSSIP %.40s %s:%d@%d %s", + g->nodename, + g->ip, + ntohs(g->port), + ntohs(g->cport), + ci); + sdsfree(ci); + + /* Update our state accordingly to the gossip sections */ + node = clusterLookupNode(g->nodename); + if (node) { + /* We already know this node. + Handle failure reports, only when the sender is a master. */ + if (sender && nodeIsMaster(sender) && node != myself) { + if (flags & (CLUSTER_NODE_FAIL|CLUSTER_NODE_PFAIL)) { + if (clusterNodeAddFailureReport(node,sender)) { + serverLog(LL_VERBOSE, + "Node %.40s reported node %.40s as not reachable.", + sender->name, node->name); + } + markNodeAsFailingIfNeeded(node); + } else { + if (clusterNodeDelFailureReport(node,sender)) { + serverLog(LL_VERBOSE, + "Node %.40s reported node %.40s is back online.", + sender->name, node->name); + } + } + } + + /* If from our POV the node is up (no failure flags are set), + * we have no pending ping for the node, nor we have failure + * reports for this node, update the last pong time with the + * one we see from the other nodes. */ + if (!(flags & (CLUSTER_NODE_FAIL|CLUSTER_NODE_PFAIL)) && + node->ping_sent == 0 && + clusterNodeFailureReportsCount(node) == 0) + { + mstime_t pongtime = ntohl(g->pong_received); + pongtime *= 1000; /* Convert back to milliseconds. */ + + /* Replace the pong time with the received one only if + * it's greater than our view but is not in the future + * (with 500 milliseconds tolerance) from the POV of our + * clock. */ + if (pongtime <= (server.mstime+500) && + pongtime > node->pong_received) + { + node->pong_received = pongtime; + } + } + + /* If we already know this node, but it is not reachable, and + * we see a different address in the gossip section of a node that + * can talk with this other node, update the address, disconnect + * the old link if any, so that we'll attempt to connect with the + * new address. */ + if (node->flags & (CLUSTER_NODE_FAIL|CLUSTER_NODE_PFAIL) && + !(flags & CLUSTER_NODE_NOADDR) && + !(flags & (CLUSTER_NODE_FAIL|CLUSTER_NODE_PFAIL)) && + (strcasecmp(node->ip,g->ip) || + node->port != ntohs(g->port) || + node->cport != ntohs(g->cport))) + { + if (node->link) freeClusterLink(node->link); + memcpy(node->ip,g->ip,NET_IP_STR_LEN); + node->port = ntohs(g->port); + node->cport = ntohs(g->cport); + node->flags &= ~CLUSTER_NODE_NOADDR; + } + } else { + /* If it's not in NOADDR state and we don't have it, we + * start a handshake process against this IP/PORT pairs. + * + * Note that we require that the sender of this gossip message + * is a well known node in our cluster, otherwise we risk + * joining another cluster. */ + if (sender && + !(flags & CLUSTER_NODE_NOADDR) && + !clusterBlacklistExists(g->nodename)) + { + clusterStartHandshake(g->ip,ntohs(g->port),ntohs(g->cport)); + } + } + + /* Next node */ + g++; + } +} + +/* IP -> string conversion. 'buf' is supposed to at least be 46 bytes. + * If 'announced_ip' length is non-zero, it is used instead of extracting + * the IP from the socket peer address. */ +void nodeIp2String(char *buf, clusterLink *link, char *announced_ip) { + if (announced_ip[0] != '\0') { + memcpy(buf,announced_ip,NET_IP_STR_LEN); + buf[NET_IP_STR_LEN-1] = '\0'; /* We are not sure the input is sane. */ + } else { + anetPeerToString(link->fd, buf, NET_IP_STR_LEN, NULL); + } +} + +/* Update the node address to the IP address that can be extracted + * from link->fd, or if hdr->myip is non empty, to the address the node + * is announcing us. The port is taken from the packet header as well. + * + * If the address or port changed, disconnect the node link so that we'll + * connect again to the new address. + * + * If the ip/port pair are already correct no operation is performed at + * all. + * + * The function returns 0 if the node address is still the same, + * otherwise 1 is returned. */ +int nodeUpdateAddressIfNeeded(clusterNode *node, clusterLink *link, + clusterMsg *hdr) +{ + char ip[NET_IP_STR_LEN] = {0}; + int port = ntohs(hdr->port); + int cport = ntohs(hdr->cport); + + /* We don't proceed if the link is the same as the sender link, as this + * function is designed to see if the node link is consistent with the + * symmetric link that is used to receive PINGs from the node. + * + * As a side effect this function never frees the passed 'link', so + * it is safe to call during packet processing. */ + if (link == node->link) return 0; + + nodeIp2String(ip,link,hdr->myip); + if (node->port == port && node->cport == cport && + strcmp(ip,node->ip) == 0) return 0; + + /* IP / port is different, update it. */ + memcpy(node->ip,ip,sizeof(ip)); + node->port = port; + node->cport = cport; + if (node->link) freeClusterLink(node->link); + node->flags &= ~CLUSTER_NODE_NOADDR; + serverLog(LL_WARNING,"Address updated for node %.40s, now %s:%d", + node->name, node->ip, node->port); + + /* Check if this is our master and we have to change the + * replication target as well. */ + if (nodeIsSlave(myself) && myself->slaveof == node) + replicationSetMaster(node->ip, node->port); + return 1; +} + +/* Reconfigure the specified node 'n' as a master. This function is called when + * a node that we believed to be a slave is now acting as master in order to + * update the state of the node. */ +void clusterSetNodeAsMaster(clusterNode *n) { + if (nodeIsMaster(n)) return; + + if (n->slaveof) { + clusterNodeRemoveSlave(n->slaveof,n); + if (n != myself) n->flags |= CLUSTER_NODE_MIGRATE_TO; + } + n->flags &= ~CLUSTER_NODE_SLAVE; + n->flags |= CLUSTER_NODE_MASTER; + n->slaveof = NULL; + + /* Update config and state. */ + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| + CLUSTER_TODO_UPDATE_STATE); +} + +/* This function is called when we receive a master configuration via a + * PING, PONG or UPDATE packet. What we receive is a node, a configEpoch of the + * node, and the set of slots claimed under this configEpoch. + * + * What we do is to rebind the slots with newer configuration compared to our + * local configuration, and if needed, we turn ourself into a replica of the + * node (see the function comments for more info). + * + * The 'sender' is the node for which we received a configuration update. + * Sometimes it is not actually the "Sender" of the information, like in the + * case we receive the info via an UPDATE packet. */ +void clusterUpdateSlotsConfigWith(clusterNode *sender, uint64_t senderConfigEpoch, unsigned char *slots) { + int j; + clusterNode *curmaster, *newmaster = NULL; + /* The dirty slots list is a list of slots for which we lose the ownership + * while having still keys inside. This usually happens after a failover + * or after a manual cluster reconfiguration operated by the admin. + * + * If the update message is not able to demote a master to slave (in this + * case we'll resync with the master updating the whole key space), we + * need to delete all the keys in the slots we lost ownership. */ + uint16_t dirty_slots[CLUSTER_SLOTS]; + int dirty_slots_count = 0; + + /* Here we set curmaster to this node or the node this node + * replicates to if it's a slave. In the for loop we are + * interested to check if slots are taken away from curmaster. */ + curmaster = nodeIsMaster(myself) ? myself : myself->slaveof; + + if (sender == myself) { + serverLog(LL_WARNING,"Discarding UPDATE message about myself."); + return; + } + + for (j = 0; j < CLUSTER_SLOTS; j++) { + if (bitmapTestBit(slots,j)) { + /* The slot is already bound to the sender of this message. */ + if (server.cluster->slots[j] == sender) continue; + + /* The slot is in importing state, it should be modified only + * manually via redis-trib (example: a resharding is in progress + * and the migrating side slot was already closed and is advertising + * a new config. We still want the slot to be closed manually). */ + if (server.cluster->importing_slots_from[j]) continue; + + /* We rebind the slot to the new node claiming it if: + * 1) The slot was unassigned or the new node claims it with a + * greater configEpoch. + * 2) We are not currently importing the slot. */ + if (server.cluster->slots[j] == NULL || + server.cluster->slots[j]->configEpoch < senderConfigEpoch) + { + /* Was this slot mine, and still contains keys? Mark it as + * a dirty slot. */ + if (server.cluster->slots[j] == myself && + countKeysInSlot(j) && + sender != myself) + { + dirty_slots[dirty_slots_count] = j; + dirty_slots_count++; + } + + if (server.cluster->slots[j] == curmaster) + newmaster = sender; + clusterDelSlot(j); + clusterAddSlot(sender,j); + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| + CLUSTER_TODO_UPDATE_STATE| + CLUSTER_TODO_FSYNC_CONFIG); + } + } + } + + /* If at least one slot was reassigned from a node to another node + * with a greater configEpoch, it is possible that: + * 1) We are a master left without slots. This means that we were + * failed over and we should turn into a replica of the new + * master. + * 2) We are a slave and our master is left without slots. We need + * to replicate to the new slots owner. */ + if (newmaster && curmaster->numslots == 0) { + serverLog(LL_WARNING, + "Configuration change detected. Reconfiguring myself " + "as a replica of %.40s", sender->name); + clusterSetMaster(sender); + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| + CLUSTER_TODO_UPDATE_STATE| + CLUSTER_TODO_FSYNC_CONFIG); + } else if (dirty_slots_count) { + /* If we are here, we received an update message which removed + * ownership for certain slots we still have keys about, but still + * we are serving some slots, so this master node was not demoted to + * a slave. + * + * In order to maintain a consistent state between keys and slots + * we need to remove all the keys from the slots we lost. */ + for (j = 0; j < dirty_slots_count; j++) + delKeysInSlot(dirty_slots[j]); + } +} + +/* When this function is called, there is a packet to process starting + * at node->rcvbuf. Releasing the buffer is up to the caller, so this + * function should just handle the higher level stuff of processing the + * packet, modifying the cluster state if needed. + * + * The function returns 1 if the link is still valid after the packet + * was processed, otherwise 0 if the link was freed since the packet + * processing lead to some inconsistency error (for instance a PONG + * received from the wrong sender ID). */ +int clusterProcessPacket(clusterLink *link) { + clusterMsg *hdr = (clusterMsg*) link->rcvbuf; + uint32_t totlen = ntohl(hdr->totlen); + uint16_t type = ntohs(hdr->type); + + if (type < CLUSTERMSG_TYPE_COUNT) + server.cluster->stats_bus_messages_received[type]++; + serverLog(LL_DEBUG,"--- Processing packet of type %d, %lu bytes", + type, (unsigned long) totlen); + + /* Perform sanity checks */ + if (totlen < 16) return 1; /* At least signature, version, totlen, count. */ + if (totlen > sdslen(link->rcvbuf)) return 1; + + if (ntohs(hdr->ver) != CLUSTER_PROTO_VER) { + /* Can't handle messages of different versions. */ + return 1; + } + + uint16_t flags = ntohs(hdr->flags); + uint64_t senderCurrentEpoch = 0, senderConfigEpoch = 0; + clusterNode *sender; + + if (type == CLUSTERMSG_TYPE_PING || type == CLUSTERMSG_TYPE_PONG || + type == CLUSTERMSG_TYPE_MEET) + { + uint16_t count = ntohs(hdr->count); + uint32_t explen; /* expected length of this packet */ + + explen = sizeof(clusterMsg)-sizeof(union clusterMsgData); + explen += (sizeof(clusterMsgDataGossip)*count); + if (totlen != explen) return 1; + } else if (type == CLUSTERMSG_TYPE_FAIL) { + uint32_t explen = sizeof(clusterMsg)-sizeof(union clusterMsgData); + + explen += sizeof(clusterMsgDataFail); + if (totlen != explen) return 1; + } else if (type == CLUSTERMSG_TYPE_PUBLISH) { + uint32_t explen = sizeof(clusterMsg)-sizeof(union clusterMsgData); + + explen += sizeof(clusterMsgDataPublish) - + 8 + + ntohl(hdr->data.publish.msg.channel_len) + + ntohl(hdr->data.publish.msg.message_len); + if (totlen != explen) return 1; + } else if (type == CLUSTERMSG_TYPE_FAILOVER_AUTH_REQUEST || + type == CLUSTERMSG_TYPE_FAILOVER_AUTH_ACK || + type == CLUSTERMSG_TYPE_MFSTART) + { + uint32_t explen = sizeof(clusterMsg)-sizeof(union clusterMsgData); + + if (totlen != explen) return 1; + } else if (type == CLUSTERMSG_TYPE_UPDATE) { + uint32_t explen = sizeof(clusterMsg)-sizeof(union clusterMsgData); + + explen += sizeof(clusterMsgDataUpdate); + if (totlen != explen) return 1; + } + + /* Check if the sender is a known node. */ + sender = clusterLookupNode(hdr->sender); + if (sender && !nodeInHandshake(sender)) { + /* Update our curretEpoch if we see a newer epoch in the cluster. */ + senderCurrentEpoch = ntohu64(hdr->currentEpoch); + senderConfigEpoch = ntohu64(hdr->configEpoch); + if (senderCurrentEpoch > server.cluster->currentEpoch) + server.cluster->currentEpoch = senderCurrentEpoch; + /* Update the sender configEpoch if it is publishing a newer one. */ + if (senderConfigEpoch > sender->configEpoch) { + sender->configEpoch = senderConfigEpoch; + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| + CLUSTER_TODO_FSYNC_CONFIG); + } + /* Update the replication offset info for this node. */ + sender->repl_offset = ntohu64(hdr->offset); + sender->repl_offset_time = mstime(); + /* If we are a slave performing a manual failover and our master + * sent its offset while already paused, populate the MF state. */ + if (server.cluster->mf_end && + nodeIsSlave(myself) && + myself->slaveof == sender && + hdr->mflags[0] & CLUSTERMSG_FLAG0_PAUSED && + server.cluster->mf_master_offset == 0) + { + server.cluster->mf_master_offset = sender->repl_offset; + serverLog(LL_WARNING, + "Received replication offset for paused " + "master manual failover: %lld", + server.cluster->mf_master_offset); + } + } + + /* Initial processing of PING and MEET requests replying with a PONG. */ + if (type == CLUSTERMSG_TYPE_PING || type == CLUSTERMSG_TYPE_MEET) { + serverLog(LL_DEBUG,"Ping packet received: %p", (void*)link->node); + + /* We use incoming MEET messages in order to set the address + * for 'myself', since only other cluster nodes will send us + * MEET messages on handshakes, when the cluster joins, or + * later if we changed address, and those nodes will use our + * official address to connect to us. So by obtaining this address + * from the socket is a simple way to discover / update our own + * address in the cluster without it being hardcoded in the config. + * + * However if we don't have an address at all, we update the address + * even with a normal PING packet. If it's wrong it will be fixed + * by MEET later. */ + if ((type == CLUSTERMSG_TYPE_MEET || myself->ip[0] == '\0') && + server.cluster_announce_ip == NULL) + { + char ip[NET_IP_STR_LEN]; + + if (anetSockName(link->fd,ip,sizeof(ip),NULL) != -1 && + strcmp(ip,myself->ip)) + { + memcpy(myself->ip,ip,NET_IP_STR_LEN); + serverLog(LL_WARNING,"IP address for this node updated to %s", + myself->ip); + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG); + } + } + + /* Add this node if it is new for us and the msg type is MEET. + * In this stage we don't try to add the node with the right + * flags, slaveof pointer, and so forth, as this details will be + * resolved when we'll receive PONGs from the node. */ + if (!sender && type == CLUSTERMSG_TYPE_MEET) { + clusterNode *node; + + node = createClusterNode(NULL,CLUSTER_NODE_HANDSHAKE); + nodeIp2String(node->ip,link,hdr->myip); + node->port = ntohs(hdr->port); + node->cport = ntohs(hdr->cport); + clusterAddNode(node); + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG); + } + + /* If this is a MEET packet from an unknown node, we still process + * the gossip section here since we have to trust the sender because + * of the message type. */ + if (!sender && type == CLUSTERMSG_TYPE_MEET) + clusterProcessGossipSection(hdr,link); + + /* Anyway reply with a PONG */ + clusterSendPing(link,CLUSTERMSG_TYPE_PONG); + } + + /* PING, PONG, MEET: process config information. */ + if (type == CLUSTERMSG_TYPE_PING || type == CLUSTERMSG_TYPE_PONG || + type == CLUSTERMSG_TYPE_MEET) + { + serverLog(LL_DEBUG,"%s packet received: %p", + type == CLUSTERMSG_TYPE_PING ? "ping" : "pong", + (void*)link->node); + if (link->node) { + if (nodeInHandshake(link->node)) { + /* If we already have this node, try to change the + * IP/port of the node with the new one. */ + if (sender) { + serverLog(LL_VERBOSE, + "Handshake: we already know node %.40s, " + "updating the address if needed.", sender->name); + if (nodeUpdateAddressIfNeeded(sender,link,hdr)) + { + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| + CLUSTER_TODO_UPDATE_STATE); + } + /* Free this node as we already have it. This will + * cause the link to be freed as well. */ + clusterDelNode(link->node); + return 0; + } + + /* First thing to do is replacing the random name with the + * right node name if this was a handshake stage. */ + clusterRenameNode(link->node, hdr->sender); + serverLog(LL_DEBUG,"Handshake with node %.40s completed.", + link->node->name); + link->node->flags &= ~CLUSTER_NODE_HANDSHAKE; + link->node->flags |= flags&(CLUSTER_NODE_MASTER|CLUSTER_NODE_SLAVE); + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG); + } else if (memcmp(link->node->name,hdr->sender, + CLUSTER_NAMELEN) != 0) + { + /* If the reply has a non matching node ID we + * disconnect this node and set it as not having an associated + * address. */ + serverLog(LL_DEBUG,"PONG contains mismatching sender ID. About node %.40s added %d ms ago, having flags %d", + link->node->name, + (int)(mstime()-(link->node->ctime)), + link->node->flags); + link->node->flags |= CLUSTER_NODE_NOADDR; + link->node->ip[0] = '\0'; + link->node->port = 0; + link->node->cport = 0; + freeClusterLink(link); + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG); + return 0; + } + } + + /* Update the node address if it changed. */ + if (sender && type == CLUSTERMSG_TYPE_PING && + !nodeInHandshake(sender) && + nodeUpdateAddressIfNeeded(sender,link,hdr)) + { + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| + CLUSTER_TODO_UPDATE_STATE); + } + + /* Update our info about the node */ + if (link->node && type == CLUSTERMSG_TYPE_PONG) { + link->node->pong_received = mstime(); + link->node->ping_sent = 0; + + /* The PFAIL condition can be reversed without external + * help if it is momentary (that is, if it does not + * turn into a FAIL state). + * + * The FAIL condition is also reversible under specific + * conditions detected by clearNodeFailureIfNeeded(). */ + if (nodeTimedOut(link->node)) { + link->node->flags &= ~CLUSTER_NODE_PFAIL; + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| + CLUSTER_TODO_UPDATE_STATE); + } else if (nodeFailed(link->node)) { + clearNodeFailureIfNeeded(link->node); + } + } + + /* Check for role switch: slave -> master or master -> slave. */ + if (sender) { + if (!memcmp(hdr->slaveof,CLUSTER_NODE_NULL_NAME, + sizeof(hdr->slaveof))) + { + /* Node is a master. */ + clusterSetNodeAsMaster(sender); + } else { + /* Node is a slave. */ + clusterNode *master = clusterLookupNode(hdr->slaveof); + + if (nodeIsMaster(sender)) { + /* Master turned into a slave! Reconfigure the node. */ + clusterDelNodeSlots(sender); + sender->flags &= ~(CLUSTER_NODE_MASTER| + CLUSTER_NODE_MIGRATE_TO); + sender->flags |= CLUSTER_NODE_SLAVE; + + /* Update config and state. */ + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| + CLUSTER_TODO_UPDATE_STATE); + } + + /* Master node changed for this slave? */ + if (master && sender->slaveof != master) { + if (sender->slaveof) + clusterNodeRemoveSlave(sender->slaveof,sender); + clusterNodeAddSlave(master,sender); + sender->slaveof = master; + + /* Update config. */ + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG); + } + } + } + + /* Update our info about served slots. + * + * Note: this MUST happen after we update the master/slave state + * so that CLUSTER_NODE_MASTER flag will be set. */ + + /* Many checks are only needed if the set of served slots this + * instance claims is different compared to the set of slots we have + * for it. Check this ASAP to avoid other computational expansive + * checks later. */ + clusterNode *sender_master = NULL; /* Sender or its master if slave. */ + int dirty_slots = 0; /* Sender claimed slots don't match my view? */ + + if (sender) { + sender_master = nodeIsMaster(sender) ? sender : sender->slaveof; + if (sender_master) { + dirty_slots = memcmp(sender_master->slots, + hdr->myslots,sizeof(hdr->myslots)) != 0; + } + } + + /* 1) If the sender of the message is a master, and we detected that + * the set of slots it claims changed, scan the slots to see if we + * need to update our configuration. */ + if (sender && nodeIsMaster(sender) && dirty_slots) + clusterUpdateSlotsConfigWith(sender,senderConfigEpoch,hdr->myslots); + + /* 2) We also check for the reverse condition, that is, the sender + * claims to serve slots we know are served by a master with a + * greater configEpoch. If this happens we inform the sender. + * + * This is useful because sometimes after a partition heals, a + * reappearing master may be the last one to claim a given set of + * hash slots, but with a configuration that other instances know to + * be deprecated. Example: + * + * A and B are master and slave for slots 1,2,3. + * A is partitioned away, B gets promoted. + * B is partitioned away, and A returns available. + * + * Usually B would PING A publishing its set of served slots and its + * configEpoch, but because of the partition B can't inform A of the + * new configuration, so other nodes that have an updated table must + * do it. In this way A will stop to act as a master (or can try to + * failover if there are the conditions to win the election). */ + if (sender && dirty_slots) { + int j; + + for (j = 0; j < CLUSTER_SLOTS; j++) { + if (bitmapTestBit(hdr->myslots,j)) { + if (server.cluster->slots[j] == sender || + server.cluster->slots[j] == NULL) continue; + if (server.cluster->slots[j]->configEpoch > + senderConfigEpoch) + { + serverLog(LL_VERBOSE, + "Node %.40s has old slots configuration, sending " + "an UPDATE message about %.40s", + sender->name, server.cluster->slots[j]->name); + clusterSendUpdate(sender->link, + server.cluster->slots[j]); + + /* TODO: instead of exiting the loop send every other + * UPDATE packet for other nodes that are the new owner + * of sender's slots. */ + break; + } + } + } + } + + /* If our config epoch collides with the sender's try to fix + * the problem. */ + if (sender && + nodeIsMaster(myself) && nodeIsMaster(sender) && + senderConfigEpoch == myself->configEpoch) + { + clusterHandleConfigEpochCollision(sender); + } + + /* Get info from the gossip section */ + if (sender) clusterProcessGossipSection(hdr,link); + } else if (type == CLUSTERMSG_TYPE_FAIL) { + clusterNode *failing; + + if (sender) { + failing = clusterLookupNode(hdr->data.fail.about.nodename); + if (failing && + !(failing->flags & (CLUSTER_NODE_FAIL|CLUSTER_NODE_MYSELF))) + { + serverLog(LL_NOTICE, + "FAIL message received from %.40s about %.40s", + hdr->sender, hdr->data.fail.about.nodename); + failing->flags |= CLUSTER_NODE_FAIL; + failing->fail_time = mstime(); + failing->flags &= ~CLUSTER_NODE_PFAIL; + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| + CLUSTER_TODO_UPDATE_STATE); + } + } else { + serverLog(LL_NOTICE, + "Ignoring FAIL message from unknown node %.40s about %.40s", + hdr->sender, hdr->data.fail.about.nodename); + } + } else if (type == CLUSTERMSG_TYPE_PUBLISH) { + robj *channel, *message; + uint32_t channel_len, message_len; + + /* Don't bother creating useless objects if there are no + * Pub/Sub subscribers. */ + if (dictSize(server.pubsub_channels) || + listLength(server.pubsub_patterns)) + { + channel_len = ntohl(hdr->data.publish.msg.channel_len); + message_len = ntohl(hdr->data.publish.msg.message_len); + channel = createStringObject( + (char*)hdr->data.publish.msg.bulk_data,channel_len); + message = createStringObject( + (char*)hdr->data.publish.msg.bulk_data+channel_len, + message_len); + pubsubPublishMessage(channel,message); + decrRefCount(channel); + decrRefCount(message); + } + } else if (type == CLUSTERMSG_TYPE_FAILOVER_AUTH_REQUEST) { + if (!sender) return 1; /* We don't know that node. */ + clusterSendFailoverAuthIfNeeded(sender,hdr); + } else if (type == CLUSTERMSG_TYPE_FAILOVER_AUTH_ACK) { + if (!sender) return 1; /* We don't know that node. */ + /* We consider this vote only if the sender is a master serving + * a non zero number of slots, and its currentEpoch is greater or + * equal to epoch where this node started the election. */ + if (nodeIsMaster(sender) && sender->numslots > 0 && + senderCurrentEpoch >= server.cluster->failover_auth_epoch) + { + server.cluster->failover_auth_count++; + /* Maybe we reached a quorum here, set a flag to make sure + * we check ASAP. */ + clusterDoBeforeSleep(CLUSTER_TODO_HANDLE_FAILOVER); + } + } else if (type == CLUSTERMSG_TYPE_MFSTART) { + /* This message is acceptable only if I'm a master and the sender + * is one of my slaves. */ + if (!sender || sender->slaveof != myself) return 1; + /* Manual failover requested from slaves. Initialize the state + * accordingly. */ + resetManualFailover(); + server.cluster->mf_end = mstime() + CLUSTER_MF_TIMEOUT; + server.cluster->mf_slave = sender; + pauseClients(mstime()+(CLUSTER_MF_TIMEOUT*2)); + serverLog(LL_WARNING,"Manual failover requested by slave %.40s.", + sender->name); + } else if (type == CLUSTERMSG_TYPE_UPDATE) { + clusterNode *n; /* The node the update is about. */ + uint64_t reportedConfigEpoch = + ntohu64(hdr->data.update.nodecfg.configEpoch); + + if (!sender) return 1; /* We don't know the sender. */ + n = clusterLookupNode(hdr->data.update.nodecfg.nodename); + if (!n) return 1; /* We don't know the reported node. */ + if (n->configEpoch >= reportedConfigEpoch) return 1; /* Nothing new. */ + + /* If in our current config the node is a slave, set it as a master. */ + if (nodeIsSlave(n)) clusterSetNodeAsMaster(n); + + /* Update the node's configEpoch. */ + n->configEpoch = reportedConfigEpoch; + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| + CLUSTER_TODO_FSYNC_CONFIG); + + /* Check the bitmap of served slots and update our + * config accordingly. */ + clusterUpdateSlotsConfigWith(n,reportedConfigEpoch, + hdr->data.update.nodecfg.slots); + } else { + serverLog(LL_WARNING,"Received unknown packet type: %d", type); + } + return 1; +} + +/* This function is called when we detect the link with this node is lost. + We set the node as no longer connected. The Cluster Cron will detect + this connection and will try to get it connected again. + + Instead if the node is a temporary node used to accept a query, we + completely free the node on error. */ +void handleLinkIOError(clusterLink *link) { + freeClusterLink(link); +} + +/* Send data. This is handled using a trivial send buffer that gets + * consumed by write(). We don't try to optimize this for speed too much + * as this is a very low traffic channel. */ +void clusterWriteHandler(aeEventLoop *el, int fd, void *privdata, int mask) { + clusterLink *link = (clusterLink*) privdata; + ssize_t nwritten; + UNUSED(el); + UNUSED(mask); + + nwritten = write(fd, link->sndbuf, sdslen(link->sndbuf)); + if (nwritten <= 0) { + serverLog(LL_DEBUG,"I/O error writing to node link: %s", + strerror(errno)); + handleLinkIOError(link); + return; + } + sdsrange(link->sndbuf,nwritten,-1); + if (sdslen(link->sndbuf) == 0) + aeDeleteFileEvent(server.el, link->fd, AE_WRITABLE); +} + +/* Read data. Try to read the first field of the header first to check the + * full length of the packet. When a whole packet is in memory this function + * will call the function to process the packet. And so forth. */ +void clusterReadHandler(aeEventLoop *el, int fd, void *privdata, int mask) { + char buf[sizeof(clusterMsg)]; + ssize_t nread; + clusterMsg *hdr; + clusterLink *link = (clusterLink*) privdata; + unsigned int readlen, rcvbuflen; + UNUSED(el); + UNUSED(mask); + + while(1) { /* Read as long as there is data to read. */ + rcvbuflen = sdslen(link->rcvbuf); + if (rcvbuflen < 8) { + /* First, obtain the first 8 bytes to get the full message + * length. */ + readlen = 8 - rcvbuflen; + } else { + /* Finally read the full message. */ + hdr = (clusterMsg*) link->rcvbuf; + if (rcvbuflen == 8) { + /* Perform some sanity check on the message signature + * and length. */ + if (memcmp(hdr->sig,"RCmb",4) != 0 || + ntohl(hdr->totlen) < CLUSTERMSG_MIN_LEN) + { + serverLog(LL_WARNING, + "Bad message length or signature received " + "from Cluster bus."); + handleLinkIOError(link); + return; + } + } + readlen = ntohl(hdr->totlen) - rcvbuflen; + if (readlen > sizeof(buf)) readlen = sizeof(buf); + } + + nread = read(fd,buf,readlen); + if (nread == -1 && errno == EAGAIN) return; /* No more data ready. */ + + if (nread <= 0) { + /* I/O error... */ + serverLog(LL_DEBUG,"I/O error reading from node link: %s", + (nread == 0) ? "connection closed" : strerror(errno)); + handleLinkIOError(link); + return; + } else { + /* Read data and recast the pointer to the new buffer. */ + link->rcvbuf = sdscatlen(link->rcvbuf,buf,nread); + hdr = (clusterMsg*) link->rcvbuf; + rcvbuflen += nread; + } + + /* Total length obtained? Process this packet. */ + if (rcvbuflen >= 8 && rcvbuflen == ntohl(hdr->totlen)) { + if (clusterProcessPacket(link)) { + sdsfree(link->rcvbuf); + link->rcvbuf = sdsempty(); + } else { + return; /* Link no longer valid. */ + } + } + } +} + +/* Put stuff into the send buffer. + * + * It is guaranteed that this function will never have as a side effect + * the link to be invalidated, so it is safe to call this function + * from event handlers that will do stuff with the same link later. */ +void clusterSendMessage(clusterLink *link, unsigned char *msg, size_t msglen) { + if (sdslen(link->sndbuf) == 0 && msglen != 0) + aeCreateFileEvent(server.el,link->fd,AE_WRITABLE, + clusterWriteHandler,link); + + link->sndbuf = sdscatlen(link->sndbuf, msg, msglen); + + /* Populate sent messages stats. */ + clusterMsg *hdr = (clusterMsg*) msg; + uint16_t type = ntohs(hdr->type); + if (type < CLUSTERMSG_TYPE_COUNT) + server.cluster->stats_bus_messages_sent[type]++; +} + +/* Send a message to all the nodes that are part of the cluster having + * a connected link. + * + * It is guaranteed that this function will never have as a side effect + * some node->link to be invalidated, so it is safe to call this function + * from event handlers that will do stuff with node links later. */ +void clusterBroadcastMessage(void *buf, size_t len) { + dictIterator *di; + dictEntry *de; + + di = dictGetSafeIterator(server.cluster->nodes); + while((de = dictNext(di)) != NULL) { + clusterNode *node = dictGetVal(de); + + if (!node->link) continue; + if (node->flags & (CLUSTER_NODE_MYSELF|CLUSTER_NODE_HANDSHAKE)) + continue; + clusterSendMessage(node->link,buf,len); + } + dictReleaseIterator(di); +} + +/* Build the message header. hdr must point to a buffer at least + * sizeof(clusterMsg) in bytes. */ +void clusterBuildMessageHdr(clusterMsg *hdr, int type) { + int totlen = 0; + uint64_t offset; + clusterNode *master; + + /* If this node is a master, we send its slots bitmap and configEpoch. + * If this node is a slave we send the master's information instead (the + * node is flagged as slave so the receiver knows that it is NOT really + * in charge for this slots. */ + master = (nodeIsSlave(myself) && myself->slaveof) ? + myself->slaveof : myself; + + memset(hdr,0,sizeof(*hdr)); + hdr->ver = htons(CLUSTER_PROTO_VER); + hdr->sig[0] = 'R'; + hdr->sig[1] = 'C'; + hdr->sig[2] = 'm'; + hdr->sig[3] = 'b'; + hdr->type = htons(type); + memcpy(hdr->sender,myself->name,CLUSTER_NAMELEN); + + /* If cluster-announce-ip option is enabled, force the receivers of our + * packets to use the specified address for this node. Otherwise if the + * first byte is zero, they'll do auto discovery. */ + memset(hdr->myip,0,NET_IP_STR_LEN); + if (server.cluster_announce_ip) { + strncpy(hdr->myip,server.cluster_announce_ip,NET_IP_STR_LEN); + hdr->myip[NET_IP_STR_LEN-1] = '\0'; + } + + /* Handle cluster-announce-port as well. */ + int announced_port = server.cluster_announce_port ? + server.cluster_announce_port : server.port; + int announced_cport = server.cluster_announce_bus_port ? + server.cluster_announce_bus_port : + (server.port + CLUSTER_PORT_INCR); + + memcpy(hdr->myslots,master->slots,sizeof(hdr->myslots)); + memset(hdr->slaveof,0,CLUSTER_NAMELEN); + if (myself->slaveof != NULL) + memcpy(hdr->slaveof,myself->slaveof->name, CLUSTER_NAMELEN); + hdr->port = htons(announced_port); + hdr->cport = htons(announced_cport); + hdr->flags = htons(myself->flags); + hdr->state = server.cluster->state; + + /* Set the currentEpoch and configEpochs. */ + hdr->currentEpoch = htonu64(server.cluster->currentEpoch); + hdr->configEpoch = htonu64(master->configEpoch); + + /* Set the replication offset. */ + if (nodeIsSlave(myself)) + offset = replicationGetSlaveOffset(); + else + offset = server.master_repl_offset; + hdr->offset = htonu64(offset); + + /* Set the message flags. */ + if (nodeIsMaster(myself) && server.cluster->mf_end) + hdr->mflags[0] |= CLUSTERMSG_FLAG0_PAUSED; + + /* Compute the message length for certain messages. For other messages + * this is up to the caller. */ + if (type == CLUSTERMSG_TYPE_FAIL) { + totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData); + totlen += sizeof(clusterMsgDataFail); + } else if (type == CLUSTERMSG_TYPE_UPDATE) { + totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData); + totlen += sizeof(clusterMsgDataUpdate); + } + hdr->totlen = htonl(totlen); + /* For PING, PONG, and MEET, fixing the totlen field is up to the caller. */ +} + +/* Return non zero if the node is already present in the gossip section of the + * message pointed by 'hdr' and having 'count' gossip entries. Otherwise + * zero is returned. Helper for clusterSendPing(). */ +int clusterNodeIsInGossipSection(clusterMsg *hdr, int count, clusterNode *n) { + int j; + for (j = 0; j < count; j++) { + if (memcmp(hdr->data.ping.gossip[j].nodename,n->name, + CLUSTER_NAMELEN) == 0) break; + } + return j != count; +} + +/* Set the i-th entry of the gossip section in the message pointed by 'hdr' + * to the info of the specified node 'n'. */ +void clusterSetGossipEntry(clusterMsg *hdr, int i, clusterNode *n) { + clusterMsgDataGossip *gossip; + gossip = &(hdr->data.ping.gossip[i]); + memcpy(gossip->nodename,n->name,CLUSTER_NAMELEN); + gossip->ping_sent = htonl(n->ping_sent/1000); + gossip->pong_received = htonl(n->pong_received/1000); + memcpy(gossip->ip,n->ip,sizeof(n->ip)); + gossip->port = htons(n->port); + gossip->cport = htons(n->cport); + gossip->flags = htons(n->flags); + gossip->notused1 = 0; +} + +/* Send a PING or PONG packet to the specified node, making sure to add enough + * gossip informations. */ +void clusterSendPing(clusterLink *link, int type) { + unsigned char *buf; + clusterMsg *hdr; + int gossipcount = 0; /* Number of gossip sections added so far. */ + int wanted; /* Number of gossip sections we want to append if possible. */ + int totlen; /* Total packet length. */ + /* freshnodes is the max number of nodes we can hope to append at all: + * nodes available minus two (ourself and the node we are sending the + * message to). However practically there may be less valid nodes since + * nodes in handshake state, disconnected, are not considered. */ + int freshnodes = dictSize(server.cluster->nodes)-2; + + /* How many gossip sections we want to add? 1/10 of the number of nodes + * and anyway at least 3. Why 1/10? + * + * If we have N masters, with N/10 entries, and we consider that in + * node_timeout we exchange with each other node at least 4 packets + * (we ping in the worst case in node_timeout/2 time, and we also + * receive two pings from the host), we have a total of 8 packets + * in the node_timeout*2 falure reports validity time. So we have + * that, for a single PFAIL node, we can expect to receive the following + * number of failure reports (in the specified window of time): + * + * PROB * GOSSIP_ENTRIES_PER_PACKET * TOTAL_PACKETS: + * + * PROB = probability of being featured in a single gossip entry, + * which is 1 / NUM_OF_NODES. + * ENTRIES = 10. + * TOTAL_PACKETS = 2 * 4 * NUM_OF_MASTERS. + * + * If we assume we have just masters (so num of nodes and num of masters + * is the same), with 1/10 we always get over the majority, and specifically + * 80% of the number of nodes, to account for many masters failing at the + * same time. + * + * Since we have non-voting slaves that lower the probability of an entry + * to feature our node, we set the number of entires per packet as + * 10% of the total nodes we have. */ + wanted = floor(dictSize(server.cluster->nodes)/10); + if (wanted < 3) wanted = 3; + if (wanted > freshnodes) wanted = freshnodes; + + /* Include all the nodes in PFAIL state, so that failure reports are + * faster to propagate to go from PFAIL to FAIL state. */ + int pfail_wanted = server.cluster->stats_pfail_nodes; + + /* Compute the maxium totlen to allocate our buffer. We'll fix the totlen + * later according to the number of gossip sections we really were able + * to put inside the packet. */ + totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData); + totlen += (sizeof(clusterMsgDataGossip)*(wanted+pfail_wanted)); + /* Note: clusterBuildMessageHdr() expects the buffer to be always at least + * sizeof(clusterMsg) or more. */ + if (totlen < (int)sizeof(clusterMsg)) totlen = sizeof(clusterMsg); + buf = zcalloc(totlen); + hdr = (clusterMsg*) buf; + + /* Populate the header. */ + if (link->node && type == CLUSTERMSG_TYPE_PING) + link->node->ping_sent = mstime(); + clusterBuildMessageHdr(hdr,type); + + /* Populate the gossip fields */ + int maxiterations = wanted*3; + while(freshnodes > 0 && gossipcount < wanted && maxiterations--) { + dictEntry *de = dictGetRandomKey(server.cluster->nodes); + clusterNode *this = dictGetVal(de); + + /* Don't include this node: the whole packet header is about us + * already, so we just gossip about other nodes. */ + if (this == myself) continue; + + /* PFAIL nodes will be added later. */ + if (this->flags & CLUSTER_NODE_PFAIL) continue; + + /* In the gossip section don't include: + * 1) Nodes in HANDSHAKE state. + * 3) Nodes with the NOADDR flag set. + * 4) Disconnected nodes if they don't have configured slots. + */ + if (this->flags & (CLUSTER_NODE_HANDSHAKE|CLUSTER_NODE_NOADDR) || + (this->link == NULL && this->numslots == 0)) + { + freshnodes--; /* Tecnically not correct, but saves CPU. */ + continue; + } + + /* Do not add a node we already have. */ + if (clusterNodeIsInGossipSection(hdr,gossipcount,this)) continue; + + /* Add it */ + clusterSetGossipEntry(hdr,gossipcount,this); + freshnodes--; + gossipcount++; + } + + /* If there are PFAIL nodes, add them at the end. */ + if (pfail_wanted) { + dictIterator *di; + dictEntry *de; + + di = dictGetSafeIterator(server.cluster->nodes); + while((de = dictNext(di)) != NULL && pfail_wanted > 0) { + clusterNode *node = dictGetVal(de); + if (node->flags & CLUSTER_NODE_HANDSHAKE) continue; + if (node->flags & CLUSTER_NODE_NOADDR) continue; + if (!(node->flags & CLUSTER_NODE_PFAIL)) continue; + clusterSetGossipEntry(hdr,gossipcount,node); + freshnodes--; + gossipcount++; + /* We take the count of the slots we allocated, since the + * PFAIL stats may not match perfectly with the current number + * of PFAIL nodes. */ + pfail_wanted--; + } + dictReleaseIterator(di); + } + + /* Ready to send... fix the totlen fiend and queue the message in the + * output buffer. */ + totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData); + totlen += (sizeof(clusterMsgDataGossip)*gossipcount); + hdr->count = htons(gossipcount); + hdr->totlen = htonl(totlen); + clusterSendMessage(link,buf,totlen); + zfree(buf); +} + +/* Send a PONG packet to every connected node that's not in handshake state + * and for which we have a valid link. + * + * In Redis Cluster pongs are not used just for failure detection, but also + * to carry important configuration information. So broadcasting a pong is + * useful when something changes in the configuration and we want to make + * the cluster aware ASAP (for instance after a slave promotion). + * + * The 'target' argument specifies the receiving instances using the + * defines below: + * + * CLUSTER_BROADCAST_ALL -> All known instances. + * CLUSTER_BROADCAST_LOCAL_SLAVES -> All slaves in my master-slaves ring. + */ +#define CLUSTER_BROADCAST_ALL 0 +#define CLUSTER_BROADCAST_LOCAL_SLAVES 1 +void clusterBroadcastPong(int target) { + dictIterator *di; + dictEntry *de; + + di = dictGetSafeIterator(server.cluster->nodes); + while((de = dictNext(di)) != NULL) { + clusterNode *node = dictGetVal(de); + + if (!node->link) continue; + if (node == myself || nodeInHandshake(node)) continue; + if (target == CLUSTER_BROADCAST_LOCAL_SLAVES) { + int local_slave = + nodeIsSlave(node) && node->slaveof && + (node->slaveof == myself || node->slaveof == myself->slaveof); + if (!local_slave) continue; + } + clusterSendPing(node->link,CLUSTERMSG_TYPE_PONG); + } + dictReleaseIterator(di); +} + +/* Send a PUBLISH message. + * + * If link is NULL, then the message is broadcasted to the whole cluster. */ +void clusterSendPublish(clusterLink *link, robj *channel, robj *message) { + unsigned char buf[sizeof(clusterMsg)], *payload; + clusterMsg *hdr = (clusterMsg*) buf; + uint32_t totlen; + uint32_t channel_len, message_len; + + channel = getDecodedObject(channel); + message = getDecodedObject(message); + channel_len = sdslen(channel->ptr); + message_len = sdslen(message->ptr); + + clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_PUBLISH); + totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData); + totlen += sizeof(clusterMsgDataPublish) - 8 + channel_len + message_len; + + hdr->data.publish.msg.channel_len = htonl(channel_len); + hdr->data.publish.msg.message_len = htonl(message_len); + hdr->totlen = htonl(totlen); + + /* Try to use the local buffer if possible */ + if (totlen < sizeof(buf)) { + payload = buf; + } else { + payload = zmalloc(totlen); + memcpy(payload,hdr,sizeof(*hdr)); + hdr = (clusterMsg*) payload; + } + memcpy(hdr->data.publish.msg.bulk_data,channel->ptr,sdslen(channel->ptr)); + memcpy(hdr->data.publish.msg.bulk_data+sdslen(channel->ptr), + message->ptr,sdslen(message->ptr)); + + if (link) + clusterSendMessage(link,payload,totlen); + else + clusterBroadcastMessage(payload,totlen); + + decrRefCount(channel); + decrRefCount(message); + if (payload != buf) zfree(payload); +} + +/* Send a FAIL message to all the nodes we are able to contact. + * The FAIL message is sent when we detect that a node is failing + * (CLUSTER_NODE_PFAIL) and we also receive a gossip confirmation of this: + * we switch the node state to CLUSTER_NODE_FAIL and ask all the other + * nodes to do the same ASAP. */ +void clusterSendFail(char *nodename) { + unsigned char buf[sizeof(clusterMsg)]; + clusterMsg *hdr = (clusterMsg*) buf; + + clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_FAIL); + memcpy(hdr->data.fail.about.nodename,nodename,CLUSTER_NAMELEN); + clusterBroadcastMessage(buf,ntohl(hdr->totlen)); +} + +/* Send an UPDATE message to the specified link carrying the specified 'node' + * slots configuration. The node name, slots bitmap, and configEpoch info + * are included. */ +void clusterSendUpdate(clusterLink *link, clusterNode *node) { + unsigned char buf[sizeof(clusterMsg)]; + clusterMsg *hdr = (clusterMsg*) buf; + + if (link == NULL) return; + clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_UPDATE); + memcpy(hdr->data.update.nodecfg.nodename,node->name,CLUSTER_NAMELEN); + hdr->data.update.nodecfg.configEpoch = htonu64(node->configEpoch); + memcpy(hdr->data.update.nodecfg.slots,node->slots,sizeof(node->slots)); + clusterSendMessage(link,buf,ntohl(hdr->totlen)); +} + +/* ----------------------------------------------------------------------------- + * CLUSTER Pub/Sub support + * + * For now we do very little, just propagating PUBLISH messages across the whole + * cluster. In the future we'll try to get smarter and avoiding propagating those + * messages to hosts without receives for a given channel. + * -------------------------------------------------------------------------- */ +void clusterPropagatePublish(robj *channel, robj *message) { + clusterSendPublish(NULL, channel, message); +} + +/* ----------------------------------------------------------------------------- + * SLAVE node specific functions + * -------------------------------------------------------------------------- */ + +/* This function sends a FAILOVE_AUTH_REQUEST message to every node in order to + * see if there is the quorum for this slave instance to failover its failing + * master. + * + * Note that we send the failover request to everybody, master and slave nodes, + * but only the masters are supposed to reply to our query. */ +void clusterRequestFailoverAuth(void) { + unsigned char buf[sizeof(clusterMsg)]; + clusterMsg *hdr = (clusterMsg*) buf; + uint32_t totlen; + + clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_FAILOVER_AUTH_REQUEST); + /* If this is a manual failover, set the CLUSTERMSG_FLAG0_FORCEACK bit + * in the header to communicate the nodes receiving the message that + * they should authorized the failover even if the master is working. */ + if (server.cluster->mf_end) hdr->mflags[0] |= CLUSTERMSG_FLAG0_FORCEACK; + totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData); + hdr->totlen = htonl(totlen); + clusterBroadcastMessage(buf,totlen); +} + +/* Send a FAILOVER_AUTH_ACK message to the specified node. */ +void clusterSendFailoverAuth(clusterNode *node) { + unsigned char buf[sizeof(clusterMsg)]; + clusterMsg *hdr = (clusterMsg*) buf; + uint32_t totlen; + + if (!node->link) return; + clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_FAILOVER_AUTH_ACK); + totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData); + hdr->totlen = htonl(totlen); + clusterSendMessage(node->link,buf,totlen); +} + +/* Send a MFSTART message to the specified node. */ +void clusterSendMFStart(clusterNode *node) { + unsigned char buf[sizeof(clusterMsg)]; + clusterMsg *hdr = (clusterMsg*) buf; + uint32_t totlen; + + if (!node->link) return; + clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_MFSTART); + totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData); + hdr->totlen = htonl(totlen); + clusterSendMessage(node->link,buf,totlen); +} + +/* Vote for the node asking for our vote if there are the conditions. */ +void clusterSendFailoverAuthIfNeeded(clusterNode *node, clusterMsg *request) { + clusterNode *master = node->slaveof; + uint64_t requestCurrentEpoch = ntohu64(request->currentEpoch); + uint64_t requestConfigEpoch = ntohu64(request->configEpoch); + unsigned char *claimed_slots = request->myslots; + int force_ack = request->mflags[0] & CLUSTERMSG_FLAG0_FORCEACK; + int j; + + /* IF we are not a master serving at least 1 slot, we don't have the + * right to vote, as the cluster size in Redis Cluster is the number + * of masters serving at least one slot, and quorum is the cluster + * size + 1 */ + if (nodeIsSlave(myself) || myself->numslots == 0) return; + + /* Request epoch must be >= our currentEpoch. + * Note that it is impossible for it to actually be greater since + * our currentEpoch was updated as a side effect of receiving this + * request, if the request epoch was greater. */ + if (requestCurrentEpoch < server.cluster->currentEpoch) { + serverLog(LL_WARNING, + "Failover auth denied to %.40s: reqEpoch (%llu) < curEpoch(%llu)", + node->name, + (unsigned long long) requestCurrentEpoch, + (unsigned long long) server.cluster->currentEpoch); + return; + } + + /* I already voted for this epoch? Return ASAP. */ + if (server.cluster->lastVoteEpoch == server.cluster->currentEpoch) { + serverLog(LL_WARNING, + "Failover auth denied to %.40s: already voted for epoch %llu", + node->name, + (unsigned long long) server.cluster->currentEpoch); + return; + } + + /* Node must be a slave and its master down. + * The master can be non failing if the request is flagged + * with CLUSTERMSG_FLAG0_FORCEACK (manual failover). */ + if (nodeIsMaster(node) || master == NULL || + (!nodeFailed(master) && !force_ack)) + { + if (nodeIsMaster(node)) { + serverLog(LL_WARNING, + "Failover auth denied to %.40s: it is a master node", + node->name); + } else if (master == NULL) { + serverLog(LL_WARNING, + "Failover auth denied to %.40s: I don't know its master", + node->name); + } else if (!nodeFailed(master)) { + serverLog(LL_WARNING, + "Failover auth denied to %.40s: its master is up", + node->name); + } + return; + } + + /* We did not voted for a slave about this master for two + * times the node timeout. This is not strictly needed for correctness + * of the algorithm but makes the base case more linear. */ + if (mstime() - node->slaveof->voted_time < server.cluster_node_timeout * 2) + { + serverLog(LL_WARNING, + "Failover auth denied to %.40s: " + "can't vote about this master before %lld milliseconds", + node->name, + (long long) ((server.cluster_node_timeout*2)- + (mstime() - node->slaveof->voted_time))); + return; + } + + /* The slave requesting the vote must have a configEpoch for the claimed + * slots that is >= the one of the masters currently serving the same + * slots in the current configuration. */ + for (j = 0; j < CLUSTER_SLOTS; j++) { + if (bitmapTestBit(claimed_slots, j) == 0) continue; + if (server.cluster->slots[j] == NULL || + server.cluster->slots[j]->configEpoch <= requestConfigEpoch) + { + continue; + } + /* If we reached this point we found a slot that in our current slots + * is served by a master with a greater configEpoch than the one claimed + * by the slave requesting our vote. Refuse to vote for this slave. */ + serverLog(LL_WARNING, + "Failover auth denied to %.40s: " + "slot %d epoch (%llu) > reqEpoch (%llu)", + node->name, j, + (unsigned long long) server.cluster->slots[j]->configEpoch, + (unsigned long long) requestConfigEpoch); + return; + } + + /* We can vote for this slave. */ + clusterSendFailoverAuth(node); + server.cluster->lastVoteEpoch = server.cluster->currentEpoch; + node->slaveof->voted_time = mstime(); + serverLog(LL_WARNING, "Failover auth granted to %.40s for epoch %llu", + node->name, (unsigned long long) server.cluster->currentEpoch); +} + +/* This function returns the "rank" of this instance, a slave, in the context + * of its master-slaves ring. The rank of the slave is given by the number of + * other slaves for the same master that have a better replication offset + * compared to the local one (better means, greater, so they claim more data). + * + * A slave with rank 0 is the one with the greatest (most up to date) + * replication offset, and so forth. Note that because how the rank is computed + * multiple slaves may have the same rank, in case they have the same offset. + * + * The slave rank is used to add a delay to start an election in order to + * get voted and replace a failing master. Slaves with better replication + * offsets are more likely to win. */ +int clusterGetSlaveRank(void) { + long long myoffset; + int j, rank = 0; + clusterNode *master; + + serverAssert(nodeIsSlave(myself)); + master = myself->slaveof; + if (master == NULL) return 0; /* Never called by slaves without master. */ + + myoffset = replicationGetSlaveOffset(); + for (j = 0; j < master->numslaves; j++) + if (master->slaves[j] != myself && + master->slaves[j]->repl_offset > myoffset) rank++; + return rank; +} + +/* This function is called by clusterHandleSlaveFailover() in order to + * let the slave log why it is not able to failover. Sometimes there are + * not the conditions, but since the failover function is called again and + * again, we can't log the same things continuously. + * + * This function works by logging only if a given set of conditions are + * true: + * + * 1) The reason for which the failover can't be initiated changed. + * The reasons also include a NONE reason we reset the state to + * when the slave finds that its master is fine (no FAIL flag). + * 2) Also, the log is emitted again if the master is still down and + * the reason for not failing over is still the same, but more than + * CLUSTER_CANT_FAILOVER_RELOG_PERIOD seconds elapsed. + * 3) Finally, the function only logs if the slave is down for more than + * five seconds + NODE_TIMEOUT. This way nothing is logged when a + * failover starts in a reasonable time. + * + * The function is called with the reason why the slave can't failover + * which is one of the integer macros CLUSTER_CANT_FAILOVER_*. + * + * The function is guaranteed to be called only if 'myself' is a slave. */ +void clusterLogCantFailover(int reason) { + char *msg; + static time_t lastlog_time = 0; + mstime_t nolog_fail_time = server.cluster_node_timeout + 5000; + + /* Don't log if we have the same reason for some time. */ + if (reason == server.cluster->cant_failover_reason && + time(NULL)-lastlog_time < CLUSTER_CANT_FAILOVER_RELOG_PERIOD) + return; + + server.cluster->cant_failover_reason = reason; + + /* We also don't emit any log if the master failed no long ago, the + * goal of this function is to log slaves in a stalled condition for + * a long time. */ + if (myself->slaveof && + nodeFailed(myself->slaveof) && + (mstime() - myself->slaveof->fail_time) < nolog_fail_time) return; + + switch(reason) { + case CLUSTER_CANT_FAILOVER_DATA_AGE: + msg = "Disconnected from master for longer than allowed. " + "Please check the 'cluster-slave-validity-factor' configuration " + "option."; + break; + case CLUSTER_CANT_FAILOVER_WAITING_DELAY: + msg = "Waiting the delay before I can start a new failover."; + break; + case CLUSTER_CANT_FAILOVER_EXPIRED: + msg = "Failover attempt expired."; + break; + case CLUSTER_CANT_FAILOVER_WAITING_VOTES: + msg = "Waiting for votes, but majority still not reached."; + break; + default: + msg = "Unknown reason code."; + break; + } + lastlog_time = time(NULL); + serverLog(LL_WARNING,"Currently unable to failover: %s", msg); +} + +/* This function implements the final part of automatic and manual failovers, + * where the slave grabs its master's hash slots, and propagates the new + * configuration. + * + * Note that it's up to the caller to be sure that the node got a new + * configuration epoch already. */ +void clusterFailoverReplaceYourMaster(void) { + int j; + clusterNode *oldmaster = myself->slaveof; + + if (nodeIsMaster(myself) || oldmaster == NULL) return; + + /* 1) Turn this node into a master. */ + clusterSetNodeAsMaster(myself); + replicationUnsetMaster(); + + /* 2) Claim all the slots assigned to our master. */ + for (j = 0; j < CLUSTER_SLOTS; j++) { + if (clusterNodeGetSlotBit(oldmaster,j)) { + clusterDelSlot(j); + clusterAddSlot(myself,j); + } + } + + /* 3) Update state and save config. */ + clusterUpdateState(); + clusterSaveConfigOrDie(1); + + /* 4) Pong all the other nodes so that they can update the state + * accordingly and detect that we switched to master role. */ + clusterBroadcastPong(CLUSTER_BROADCAST_ALL); + + /* 5) If there was a manual failover in progress, clear the state. */ + resetManualFailover(); +} + +/* This function is called if we are a slave node and our master serving + * a non-zero amount of hash slots is in FAIL state. + * + * The gaol of this function is: + * 1) To check if we are able to perform a failover, is our data updated? + * 2) Try to get elected by masters. + * 3) Perform the failover informing all the other nodes. + */ +void clusterHandleSlaveFailover(void) { + mstime_t data_age; + mstime_t auth_age = mstime() - server.cluster->failover_auth_time; + int needed_quorum = (server.cluster->size / 2) + 1; + int manual_failover = server.cluster->mf_end != 0 && + server.cluster->mf_can_start; + mstime_t auth_timeout, auth_retry_time; + + server.cluster->todo_before_sleep &= ~CLUSTER_TODO_HANDLE_FAILOVER; + + /* Compute the failover timeout (the max time we have to send votes + * and wait for replies), and the failover retry time (the time to wait + * before trying to get voted again). + * + * Timeout is MAX(NODE_TIMEOUT*2,2000) milliseconds. + * Retry is two times the Timeout. + */ + auth_timeout = server.cluster_node_timeout*2; + if (auth_timeout < 2000) auth_timeout = 2000; + auth_retry_time = auth_timeout*2; + + /* Pre conditions to run the function, that must be met both in case + * of an automatic or manual failover: + * 1) We are a slave. + * 2) Our master is flagged as FAIL, or this is a manual failover. + * 3) It is serving slots. */ + if (nodeIsMaster(myself) || + myself->slaveof == NULL || + (!nodeFailed(myself->slaveof) && !manual_failover) || + myself->slaveof->numslots == 0) + { + /* There are no reasons to failover, so we set the reason why we + * are returning without failing over to NONE. */ + server.cluster->cant_failover_reason = CLUSTER_CANT_FAILOVER_NONE; + return; + } + + /* Set data_age to the number of seconds we are disconnected from + * the master. */ + if (server.repl_state == REPL_STATE_CONNECTED) { + data_age = (mstime_t)(server.unixtime - server.master->lastinteraction) + * 1000; + } else { + data_age = (mstime_t)(server.unixtime - server.repl_down_since) * 1000; + } + + /* Remove the node timeout from the data age as it is fine that we are + * disconnected from our master at least for the time it was down to be + * flagged as FAIL, that's the baseline. */ + if (data_age > server.cluster_node_timeout) + data_age -= server.cluster_node_timeout; + + /* Check if our data is recent enough according to the slave validity + * factor configured by the user. + * + * Check bypassed for manual failovers. */ + if (server.cluster_slave_validity_factor && + data_age > + (((mstime_t)server.repl_ping_slave_period * 1000) + + (server.cluster_node_timeout * server.cluster_slave_validity_factor))) + { + if (!manual_failover) { + clusterLogCantFailover(CLUSTER_CANT_FAILOVER_DATA_AGE); + return; + } + } + + /* If the previous failover attempt timedout and the retry time has + * elapsed, we can setup a new one. */ + if (auth_age > auth_retry_time) { + server.cluster->failover_auth_time = mstime() + + 500 + /* Fixed delay of 500 milliseconds, let FAIL msg propagate. */ + random() % 500; /* Random delay between 0 and 500 milliseconds. */ + server.cluster->failover_auth_count = 0; + server.cluster->failover_auth_sent = 0; + server.cluster->failover_auth_rank = clusterGetSlaveRank(); + /* We add another delay that is proportional to the slave rank. + * Specifically 1 second * rank. This way slaves that have a probably + * less updated replication offset, are penalized. */ + server.cluster->failover_auth_time += + server.cluster->failover_auth_rank * 1000; + /* However if this is a manual failover, no delay is needed. */ + if (server.cluster->mf_end) { + server.cluster->failover_auth_time = mstime(); + server.cluster->failover_auth_rank = 0; + } + serverLog(LL_WARNING, + "Start of election delayed for %lld milliseconds " + "(rank #%d, offset %lld).", + server.cluster->failover_auth_time - mstime(), + server.cluster->failover_auth_rank, + replicationGetSlaveOffset()); + /* Now that we have a scheduled election, broadcast our offset + * to all the other slaves so that they'll updated their offsets + * if our offset is better. */ + clusterBroadcastPong(CLUSTER_BROADCAST_LOCAL_SLAVES); + return; + } + + /* It is possible that we received more updated offsets from other + * slaves for the same master since we computed our election delay. + * Update the delay if our rank changed. + * + * Not performed if this is a manual failover. */ + if (server.cluster->failover_auth_sent == 0 && + server.cluster->mf_end == 0) + { + int newrank = clusterGetSlaveRank(); + if (newrank > server.cluster->failover_auth_rank) { + long long added_delay = + (newrank - server.cluster->failover_auth_rank) * 1000; + server.cluster->failover_auth_time += added_delay; + server.cluster->failover_auth_rank = newrank; + serverLog(LL_WARNING, + "Slave rank updated to #%d, added %lld milliseconds of delay.", + newrank, added_delay); + } + } + + /* Return ASAP if we can't still start the election. */ + if (mstime() < server.cluster->failover_auth_time) { + clusterLogCantFailover(CLUSTER_CANT_FAILOVER_WAITING_DELAY); + return; + } + + /* Return ASAP if the election is too old to be valid. */ + if (auth_age > auth_timeout) { + clusterLogCantFailover(CLUSTER_CANT_FAILOVER_EXPIRED); + return; + } + + /* Ask for votes if needed. */ + if (server.cluster->failover_auth_sent == 0) { + server.cluster->currentEpoch++; + server.cluster->failover_auth_epoch = server.cluster->currentEpoch; + serverLog(LL_WARNING,"Starting a failover election for epoch %llu.", + (unsigned long long) server.cluster->currentEpoch); + clusterRequestFailoverAuth(); + server.cluster->failover_auth_sent = 1; + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| + CLUSTER_TODO_UPDATE_STATE| + CLUSTER_TODO_FSYNC_CONFIG); + return; /* Wait for replies. */ + } + + /* Check if we reached the quorum. */ + if (server.cluster->failover_auth_count >= needed_quorum) { + /* We have the quorum, we can finally failover the master. */ + + serverLog(LL_WARNING, + "Failover election won: I'm the new master."); + + /* Update my configEpoch to the epoch of the election. */ + if (myself->configEpoch < server.cluster->failover_auth_epoch) { + myself->configEpoch = server.cluster->failover_auth_epoch; + serverLog(LL_WARNING, + "configEpoch set to %llu after successful failover", + (unsigned long long) myself->configEpoch); + } + + /* Take responsability for the cluster slots. */ + clusterFailoverReplaceYourMaster(); + } else { + clusterLogCantFailover(CLUSTER_CANT_FAILOVER_WAITING_VOTES); + } +} + +/* ----------------------------------------------------------------------------- + * CLUSTER slave migration + * + * Slave migration is the process that allows a slave of a master that is + * already covered by at least another slave, to "migrate" to a master that + * is orpaned, that is, left with no working slaves. + * ------------------------------------------------------------------------- */ + +/* This function is responsible to decide if this replica should be migrated + * to a different (orphaned) master. It is called by the clusterCron() function + * only if: + * + * 1) We are a slave node. + * 2) It was detected that there is at least one orphaned master in + * the cluster. + * 3) We are a slave of one of the masters with the greatest number of + * slaves. + * + * This checks are performed by the caller since it requires to iterate + * the nodes anyway, so we spend time into clusterHandleSlaveMigration() + * if definitely needed. + * + * The fuction is called with a pre-computed max_slaves, that is the max + * number of working (not in FAIL state) slaves for a single master. + * + * Additional conditions for migration are examined inside the function. + */ +void clusterHandleSlaveMigration(int max_slaves) { + int j, okslaves = 0; + clusterNode *mymaster = myself->slaveof, *target = NULL, *candidate = NULL; + dictIterator *di; + dictEntry *de; + + /* Step 1: Don't migrate if the cluster state is not ok. */ + if (server.cluster->state != CLUSTER_OK) return; + + /* Step 2: Don't migrate if my master will not be left with at least + * 'migration-barrier' slaves after my migration. */ + if (mymaster == NULL) return; + for (j = 0; j < mymaster->numslaves; j++) + if (!nodeFailed(mymaster->slaves[j]) && + !nodeTimedOut(mymaster->slaves[j])) okslaves++; + if (okslaves <= server.cluster_migration_barrier) return; + + /* Step 3: Idenitfy a candidate for migration, and check if among the + * masters with the greatest number of ok slaves, I'm the one with the + * smallest node ID (the "candidate slave"). + * + * Note: this means that eventually a replica migration will occurr + * since slaves that are reachable again always have their FAIL flag + * cleared, so eventually there must be a candidate. At the same time + * this does not mean that there are no race conditions possible (two + * slaves migrating at the same time), but this is unlikely to + * happen, and harmless when happens. */ + candidate = myself; + di = dictGetSafeIterator(server.cluster->nodes); + while((de = dictNext(di)) != NULL) { + clusterNode *node = dictGetVal(de); + int okslaves = 0, is_orphaned = 1; + + /* We want to migrate only if this master is working, orphaned, and + * used to have slaves or if failed over a master that had slaves + * (MIGRATE_TO flag). This way we only migrate to instances that were + * supposed to have replicas. */ + if (nodeIsSlave(node) || nodeFailed(node)) is_orphaned = 0; + if (!(node->flags & CLUSTER_NODE_MIGRATE_TO)) is_orphaned = 0; + + /* Check number of working slaves. */ + if (nodeIsMaster(node)) okslaves = clusterCountNonFailingSlaves(node); + if (okslaves > 0) is_orphaned = 0; + + if (is_orphaned) { + if (!target && node->numslots > 0) target = node; + + /* Track the starting time of the orphaned condition for this + * master. */ + if (!node->orphaned_time) node->orphaned_time = mstime(); + } else { + node->orphaned_time = 0; + } + + /* Check if I'm the slave candidate for the migration: attached + * to a master with the maximum number of slaves and with the smallest + * node ID. */ + if (okslaves == max_slaves) { + for (j = 0; j < node->numslaves; j++) { + if (memcmp(node->slaves[j]->name, + candidate->name, + CLUSTER_NAMELEN) < 0) + { + candidate = node->slaves[j]; + } + } + } + } + dictReleaseIterator(di); + + /* Step 4: perform the migration if there is a target, and if I'm the + * candidate, but only if the master is continuously orphaned for a + * couple of seconds, so that during failovers, we give some time to + * the natural slaves of this instance to advertise their switch from + * the old master to the new one. */ + if (target && candidate == myself && + (mstime()-target->orphaned_time) > CLUSTER_SLAVE_MIGRATION_DELAY) + { + serverLog(LL_WARNING,"Migrating to orphaned master %.40s", + target->name); + clusterSetMaster(target); + } +} + +/* ----------------------------------------------------------------------------- + * CLUSTER manual failover + * + * This are the important steps performed by slaves during a manual failover: + * 1) User send CLUSTER FAILOVER command. The failover state is initialized + * setting mf_end to the millisecond unix time at which we'll abort the + * attempt. + * 2) Slave sends a MFSTART message to the master requesting to pause clients + * for two times the manual failover timeout CLUSTER_MF_TIMEOUT. + * When master is paused for manual failover, it also starts to flag + * packets with CLUSTERMSG_FLAG0_PAUSED. + * 3) Slave waits for master to send its replication offset flagged as PAUSED. + * 4) If slave received the offset from the master, and its offset matches, + * mf_can_start is set to 1, and clusterHandleSlaveFailover() will perform + * the failover as usually, with the difference that the vote request + * will be modified to force masters to vote for a slave that has a + * working master. + * + * From the point of view of the master things are simpler: when a + * PAUSE_CLIENTS packet is received the master sets mf_end as well and + * the sender in mf_slave. During the time limit for the manual failover + * the master will just send PINGs more often to this slave, flagged with + * the PAUSED flag, so that the slave will set mf_master_offset when receiving + * a packet from the master with this flag set. + * + * The gaol of the manual failover is to perform a fast failover without + * data loss due to the asynchronous master-slave replication. + * -------------------------------------------------------------------------- */ + +/* Reset the manual failover state. This works for both masters and slavesa + * as all the state about manual failover is cleared. + * + * The function can be used both to initialize the manual failover state at + * startup or to abort a manual failover in progress. */ +void resetManualFailover(void) { + if (server.cluster->mf_end && clientsArePaused()) { + server.clients_pause_end_time = 0; + clientsArePaused(); /* Just use the side effect of the function. */ + } + server.cluster->mf_end = 0; /* No manual failover in progress. */ + server.cluster->mf_can_start = 0; + server.cluster->mf_slave = NULL; + server.cluster->mf_master_offset = 0; +} + +/* If a manual failover timed out, abort it. */ +void manualFailoverCheckTimeout(void) { + if (server.cluster->mf_end && server.cluster->mf_end < mstime()) { + serverLog(LL_WARNING,"Manual failover timed out."); + resetManualFailover(); + } +} + +/* This function is called from the cluster cron function in order to go + * forward with a manual failover state machine. */ +void clusterHandleManualFailover(void) { + /* Return ASAP if no manual failover is in progress. */ + if (server.cluster->mf_end == 0) return; + + /* If mf_can_start is non-zero, the failover was already triggered so the + * next steps are performed by clusterHandleSlaveFailover(). */ + if (server.cluster->mf_can_start) return; + + if (server.cluster->mf_master_offset == 0) return; /* Wait for offset... */ + + if (server.cluster->mf_master_offset == replicationGetSlaveOffset()) { + /* Our replication offset matches the master replication offset + * announced after clients were paused. We can start the failover. */ + server.cluster->mf_can_start = 1; + serverLog(LL_WARNING, + "All master replication stream processed, " + "manual failover can start."); + } +} + +/* ----------------------------------------------------------------------------- + * CLUSTER cron job + * -------------------------------------------------------------------------- */ + +/* This is executed 10 times every second */ +void clusterCron(void) { + dictIterator *di; + dictEntry *de; + int update_state = 0; + int orphaned_masters; /* How many masters there are without ok slaves. */ + int max_slaves; /* Max number of ok slaves for a single master. */ + int this_slaves; /* Number of ok slaves for our master (if we are slave). */ + mstime_t min_pong = 0, now = mstime(); + clusterNode *min_pong_node = NULL; + static unsigned long long iteration = 0; + mstime_t handshake_timeout; + + iteration++; /* Number of times this function was called so far. */ + + /* We want to take myself->ip in sync with the cluster-announce-ip option. + * The option can be set at runtime via CONFIG SET, so we periodically check + * if the option changed to reflect this into myself->ip. */ + { + static char *prev_ip = NULL; + char *curr_ip = server.cluster_announce_ip; + int changed = 0; + + if (prev_ip == NULL && curr_ip != NULL) changed = 1; + if (prev_ip != NULL && curr_ip == NULL) changed = 1; + if (prev_ip && curr_ip && strcmp(prev_ip,curr_ip)) changed = 1; + + if (changed) { + prev_ip = curr_ip; + if (prev_ip) prev_ip = zstrdup(prev_ip); + + if (curr_ip) { + strncpy(myself->ip,server.cluster_announce_ip,NET_IP_STR_LEN); + myself->ip[NET_IP_STR_LEN-1] = '\0'; + } else { + myself->ip[0] = '\0'; /* Force autodetection. */ + } + } + } + + /* The handshake timeout is the time after which a handshake node that was + * not turned into a normal node is removed from the nodes. Usually it is + * just the NODE_TIMEOUT value, but when NODE_TIMEOUT is too small we use + * the value of 1 second. */ + handshake_timeout = server.cluster_node_timeout; + if (handshake_timeout < 1000) handshake_timeout = 1000; + + /* Check if we have disconnected nodes and re-establish the connection. + * Also update a few stats while we are here, that can be used to make + * better decisions in other part of the code. */ + di = dictGetSafeIterator(server.cluster->nodes); + server.cluster->stats_pfail_nodes = 0; + while((de = dictNext(di)) != NULL) { + clusterNode *node = dictGetVal(de); + + /* Not interested in reconnecting the link with myself or nodes + * for which we have no address. */ + if (node->flags & (CLUSTER_NODE_MYSELF|CLUSTER_NODE_NOADDR)) continue; + + if (node->flags & CLUSTER_NODE_PFAIL) + server.cluster->stats_pfail_nodes++; + + /* A Node in HANDSHAKE state has a limited lifespan equal to the + * configured node timeout. */ + if (nodeInHandshake(node) && now - node->ctime > handshake_timeout) { + clusterDelNode(node); + continue; + } + + if (node->link == NULL) { + int fd; + mstime_t old_ping_sent; + clusterLink *link; + + fd = anetTcpNonBlockBindConnect(server.neterr, node->ip, + node->cport, NET_FIRST_BIND_ADDR); + if (fd == -1) { + /* We got a synchronous error from connect before + * clusterSendPing() had a chance to be called. + * If node->ping_sent is zero, failure detection can't work, + * so we claim we actually sent a ping now (that will + * be really sent as soon as the link is obtained). */ + if (node->ping_sent == 0) node->ping_sent = mstime(); + serverLog(LL_DEBUG, "Unable to connect to " + "Cluster Node [%s]:%d -> %s", node->ip, + node->cport, server.neterr); + continue; + } + link = createClusterLink(node); + link->fd = fd; + node->link = link; + aeCreateFileEvent(server.el,link->fd,AE_READABLE, + clusterReadHandler,link); + /* Queue a PING in the new connection ASAP: this is crucial + * to avoid false positives in failure detection. + * + * If the node is flagged as MEET, we send a MEET message instead + * of a PING one, to force the receiver to add us in its node + * table. */ + old_ping_sent = node->ping_sent; + clusterSendPing(link, node->flags & CLUSTER_NODE_MEET ? + CLUSTERMSG_TYPE_MEET : CLUSTERMSG_TYPE_PING); + if (old_ping_sent) { + /* If there was an active ping before the link was + * disconnected, we want to restore the ping time, otherwise + * replaced by the clusterSendPing() call. */ + node->ping_sent = old_ping_sent; + } + /* We can clear the flag after the first packet is sent. + * If we'll never receive a PONG, we'll never send new packets + * to this node. Instead after the PONG is received and we + * are no longer in meet/handshake status, we want to send + * normal PING packets. */ + node->flags &= ~CLUSTER_NODE_MEET; + + serverLog(LL_DEBUG,"Connecting with Node %.40s at %s:%d", + node->name, node->ip, node->cport); + } + } + dictReleaseIterator(di); + + /* Ping some random node 1 time every 10 iterations, so that we usually ping + * one random node every second. */ + if (!(iteration % 10)) { + int j; + + /* Check a few random nodes and ping the one with the oldest + * pong_received time. */ + for (j = 0; j < 5; j++) { + de = dictGetRandomKey(server.cluster->nodes); + clusterNode *this = dictGetVal(de); + + /* Don't ping nodes disconnected or with a ping currently active. */ + if (this->link == NULL || this->ping_sent != 0) continue; + if (this->flags & (CLUSTER_NODE_MYSELF|CLUSTER_NODE_HANDSHAKE)) + continue; + if (min_pong_node == NULL || min_pong > this->pong_received) { + min_pong_node = this; + min_pong = this->pong_received; + } + } + if (min_pong_node) { + serverLog(LL_DEBUG,"Pinging node %.40s", min_pong_node->name); + clusterSendPing(min_pong_node->link, CLUSTERMSG_TYPE_PING); + } + } + + /* Iterate nodes to check if we need to flag something as failing. + * This loop is also responsible to: + * 1) Check if there are orphaned masters (masters without non failing + * slaves). + * 2) Count the max number of non failing slaves for a single master. + * 3) Count the number of slaves for our master, if we are a slave. */ + orphaned_masters = 0; + max_slaves = 0; + this_slaves = 0; + di = dictGetSafeIterator(server.cluster->nodes); + while((de = dictNext(di)) != NULL) { + clusterNode *node = dictGetVal(de); + now = mstime(); /* Use an updated time at every iteration. */ + mstime_t delay; + + if (node->flags & + (CLUSTER_NODE_MYSELF|CLUSTER_NODE_NOADDR|CLUSTER_NODE_HANDSHAKE)) + continue; + + /* Orphaned master check, useful only if the current instance + * is a slave that may migrate to another master. */ + if (nodeIsSlave(myself) && nodeIsMaster(node) && !nodeFailed(node)) { + int okslaves = clusterCountNonFailingSlaves(node); + + /* A master is orphaned if it is serving a non-zero number of + * slots, have no working slaves, but used to have at least one + * slave, or failed over a master that used to have slaves. */ + if (okslaves == 0 && node->numslots > 0 && + node->flags & CLUSTER_NODE_MIGRATE_TO) + { + orphaned_masters++; + } + if (okslaves > max_slaves) max_slaves = okslaves; + if (nodeIsSlave(myself) && myself->slaveof == node) + this_slaves = okslaves; + } + + /* If we are waiting for the PONG more than half the cluster + * timeout, reconnect the link: maybe there is a connection + * issue even if the node is alive. */ + if (node->link && /* is connected */ + now - node->link->ctime > + server.cluster_node_timeout && /* was not already reconnected */ + node->ping_sent && /* we already sent a ping */ + node->pong_received < node->ping_sent && /* still waiting pong */ + /* and we are waiting for the pong more than timeout/2 */ + now - node->ping_sent > server.cluster_node_timeout/2) + { + /* Disconnect the link, it will be reconnected automatically. */ + freeClusterLink(node->link); + } + + /* If we have currently no active ping in this instance, and the + * received PONG is older than half the cluster timeout, send + * a new ping now, to ensure all the nodes are pinged without + * a too big delay. */ + if (node->link && + node->ping_sent == 0 && + (now - node->pong_received) > server.cluster_node_timeout/2) + { + clusterSendPing(node->link, CLUSTERMSG_TYPE_PING); + continue; + } + + /* If we are a master and one of the slaves requested a manual + * failover, ping it continuously. */ + if (server.cluster->mf_end && + nodeIsMaster(myself) && + server.cluster->mf_slave == node && + node->link) + { + clusterSendPing(node->link, CLUSTERMSG_TYPE_PING); + continue; + } + + /* Check only if we have an active ping for this instance. */ + if (node->ping_sent == 0) continue; + + /* Compute the delay of the PONG. Note that if we already received + * the PONG, then node->ping_sent is zero, so can't reach this + * code at all. */ + delay = now - node->ping_sent; + + if (delay > server.cluster_node_timeout) { + /* Timeout reached. Set the node as possibly failing if it is + * not already in this state. */ + if (!(node->flags & (CLUSTER_NODE_PFAIL|CLUSTER_NODE_FAIL))) { + serverLog(LL_DEBUG,"*** NODE %.40s possibly failing", + node->name); + node->flags |= CLUSTER_NODE_PFAIL; + update_state = 1; + } + } + } + dictReleaseIterator(di); + + /* If we are a slave node but the replication is still turned off, + * enable it if we know the address of our master and it appears to + * be up. */ + if (nodeIsSlave(myself) && + server.masterhost == NULL && + myself->slaveof && + nodeHasAddr(myself->slaveof)) + { + replicationSetMaster(myself->slaveof->ip, myself->slaveof->port); + } + + /* Abourt a manual failover if the timeout is reached. */ + manualFailoverCheckTimeout(); + + if (nodeIsSlave(myself)) { + clusterHandleManualFailover(); + clusterHandleSlaveFailover(); + /* If there are orphaned slaves, and we are a slave among the masters + * with the max number of non-failing slaves, consider migrating to + * the orphaned masters. Note that it does not make sense to try + * a migration if there is no master with at least *two* working + * slaves. */ + if (orphaned_masters && max_slaves >= 2 && this_slaves == max_slaves) + clusterHandleSlaveMigration(max_slaves); + } + + if (update_state || server.cluster->state == CLUSTER_FAIL) + clusterUpdateState(); +} + +/* This function is called before the event handler returns to sleep for + * events. It is useful to perform operations that must be done ASAP in + * reaction to events fired but that are not safe to perform inside event + * handlers, or to perform potentially expansive tasks that we need to do + * a single time before replying to clients. */ +void clusterBeforeSleep(void) { + /* Handle failover, this is needed when it is likely that there is already + * the quorum from masters in order to react fast. */ + if (server.cluster->todo_before_sleep & CLUSTER_TODO_HANDLE_FAILOVER) + clusterHandleSlaveFailover(); + + /* Update the cluster state. */ + if (server.cluster->todo_before_sleep & CLUSTER_TODO_UPDATE_STATE) + clusterUpdateState(); + + /* Save the config, possibly using fsync. */ + if (server.cluster->todo_before_sleep & CLUSTER_TODO_SAVE_CONFIG) { + int fsync = server.cluster->todo_before_sleep & + CLUSTER_TODO_FSYNC_CONFIG; + clusterSaveConfigOrDie(fsync); + } + + /* Reset our flags (not strictly needed since every single function + * called for flags set should be able to clear its flag). */ + server.cluster->todo_before_sleep = 0; +} + +void clusterDoBeforeSleep(int flags) { + server.cluster->todo_before_sleep |= flags; +} + +/* ----------------------------------------------------------------------------- + * Slots management + * -------------------------------------------------------------------------- */ + +/* Test bit 'pos' in a generic bitmap. Return 1 if the bit is set, + * otherwise 0. */ +int bitmapTestBit(unsigned char *bitmap, int pos) { + off_t byte = pos/8; + int bit = pos&7; + return (bitmap[byte] & (1<nodes); + dictEntry *de; + int slaves = 0; + while((de = dictNext(di)) != NULL) { + clusterNode *node = dictGetVal(de); + + if (nodeIsSlave(node)) continue; + slaves += node->numslaves; + } + dictReleaseIterator(di); + return slaves != 0; +} + +/* Set the slot bit and return the old value. */ +int clusterNodeSetSlotBit(clusterNode *n, int slot) { + int old = bitmapTestBit(n->slots,slot); + bitmapSetBit(n->slots,slot); + if (!old) { + n->numslots++; + /* When a master gets its first slot, even if it has no slaves, + * it gets flagged with MIGRATE_TO, that is, the master is a valid + * target for replicas migration, if and only if at least one of + * the other masters has slaves right now. + * + * Normally masters are valid targerts of replica migration if: + * 1. The used to have slaves (but no longer have). + * 2. They are slaves failing over a master that used to have slaves. + * + * However new masters with slots assigned are considered valid + * migration tagets if the rest of the cluster is not a slave-less. + * + * See https://github.com/antirez/redis/issues/3043 for more info. */ + if (n->numslots == 1 && clusterMastersHaveSlaves()) + n->flags |= CLUSTER_NODE_MIGRATE_TO; + } + return old; +} + +/* Clear the slot bit and return the old value. */ +int clusterNodeClearSlotBit(clusterNode *n, int slot) { + int old = bitmapTestBit(n->slots,slot); + bitmapClearBit(n->slots,slot); + if (old) n->numslots--; + return old; +} + +/* Return the slot bit from the cluster node structure. */ +int clusterNodeGetSlotBit(clusterNode *n, int slot) { + return bitmapTestBit(n->slots,slot); +} + +/* Add the specified slot to the list of slots that node 'n' will + * serve. Return C_OK if the operation ended with success. + * If the slot is already assigned to another instance this is considered + * an error and C_ERR is returned. */ +int clusterAddSlot(clusterNode *n, int slot) { + if (server.cluster->slots[slot]) return C_ERR; + clusterNodeSetSlotBit(n,slot); + server.cluster->slots[slot] = n; + return C_OK; +} + +/* Delete the specified slot marking it as unassigned. + * Returns C_OK if the slot was assigned, otherwise if the slot was + * already unassigned C_ERR is returned. */ +int clusterDelSlot(int slot) { + clusterNode *n = server.cluster->slots[slot]; + + if (!n) return C_ERR; + serverAssert(clusterNodeClearSlotBit(n,slot) == 1); + server.cluster->slots[slot] = NULL; + return C_OK; +} + +/* Delete all the slots associated with the specified node. + * The number of deleted slots is returned. */ +int clusterDelNodeSlots(clusterNode *node) { + int deleted = 0, j; + + for (j = 0; j < CLUSTER_SLOTS; j++) { + if (clusterNodeGetSlotBit(node,j)) clusterDelSlot(j); + deleted++; + } + return deleted; +} + +/* Clear the migrating / importing state for all the slots. + * This is useful at initialization and when turning a master into slave. */ +void clusterCloseAllSlots(void) { + memset(server.cluster->migrating_slots_to,0, + sizeof(server.cluster->migrating_slots_to)); + memset(server.cluster->importing_slots_from,0, + sizeof(server.cluster->importing_slots_from)); +} + +/* ----------------------------------------------------------------------------- + * Cluster state evaluation function + * -------------------------------------------------------------------------- */ + +/* The following are defines that are only used in the evaluation function + * and are based on heuristics. Actaully the main point about the rejoin and + * writable delay is that they should be a few orders of magnitude larger + * than the network latency. */ +#define CLUSTER_MAX_REJOIN_DELAY 5000 +#define CLUSTER_MIN_REJOIN_DELAY 500 +#define CLUSTER_WRITABLE_DELAY 2000 + +void clusterUpdateState(void) { + int j, new_state; + int reachable_masters = 0; + static mstime_t among_minority_time; + static mstime_t first_call_time = 0; + + server.cluster->todo_before_sleep &= ~CLUSTER_TODO_UPDATE_STATE; + + /* If this is a master node, wait some time before turning the state + * into OK, since it is not a good idea to rejoin the cluster as a writable + * master, after a reboot, without giving the cluster a chance to + * reconfigure this node. Note that the delay is calculated starting from + * the first call to this function and not since the server start, in order + * to don't count the DB loading time. */ + if (first_call_time == 0) first_call_time = mstime(); + if (nodeIsMaster(myself) && + server.cluster->state == CLUSTER_FAIL && + mstime() - first_call_time < CLUSTER_WRITABLE_DELAY) return; + + /* Start assuming the state is OK. We'll turn it into FAIL if there + * are the right conditions. */ + new_state = CLUSTER_OK; + + /* Check if all the slots are covered. */ + if (server.cluster_require_full_coverage) { + for (j = 0; j < CLUSTER_SLOTS; j++) { + if (server.cluster->slots[j] == NULL || + server.cluster->slots[j]->flags & (CLUSTER_NODE_FAIL)) + { + new_state = CLUSTER_FAIL; + break; + } + } + } + + /* Compute the cluster size, that is the number of master nodes + * serving at least a single slot. + * + * At the same time count the number of reachable masters having + * at least one slot. */ + { + dictIterator *di; + dictEntry *de; + + server.cluster->size = 0; + di = dictGetSafeIterator(server.cluster->nodes); + while((de = dictNext(di)) != NULL) { + clusterNode *node = dictGetVal(de); + + if (nodeIsMaster(node) && node->numslots) { + server.cluster->size++; + if ((node->flags & (CLUSTER_NODE_FAIL|CLUSTER_NODE_PFAIL)) == 0) + reachable_masters++; + } + } + dictReleaseIterator(di); + } + + /* If we are in a minority partition, change the cluster state + * to FAIL. */ + { + int needed_quorum = (server.cluster->size / 2) + 1; + + if (reachable_masters < needed_quorum) { + new_state = CLUSTER_FAIL; + among_minority_time = mstime(); + } + } + + /* Log a state change */ + if (new_state != server.cluster->state) { + mstime_t rejoin_delay = server.cluster_node_timeout; + + /* If the instance is a master and was partitioned away with the + * minority, don't let it accept queries for some time after the + * partition heals, to make sure there is enough time to receive + * a configuration update. */ + if (rejoin_delay > CLUSTER_MAX_REJOIN_DELAY) + rejoin_delay = CLUSTER_MAX_REJOIN_DELAY; + if (rejoin_delay < CLUSTER_MIN_REJOIN_DELAY) + rejoin_delay = CLUSTER_MIN_REJOIN_DELAY; + + if (new_state == CLUSTER_OK && + nodeIsMaster(myself) && + mstime() - among_minority_time < rejoin_delay) + { + return; + } + + /* Change the state and log the event. */ + serverLog(LL_WARNING,"Cluster state changed: %s", + new_state == CLUSTER_OK ? "ok" : "fail"); + server.cluster->state = new_state; + } +} + +/* This function is called after the node startup in order to verify that data + * loaded from disk is in agreement with the cluster configuration: + * + * 1) If we find keys about hash slots we have no responsibility for, the + * following happens: + * A) If no other node is in charge according to the current cluster + * configuration, we add these slots to our node. + * B) If according to our config other nodes are already in charge for + * this lots, we set the slots as IMPORTING from our point of view + * in order to justify we have those slots, and in order to make + * redis-trib aware of the issue, so that it can try to fix it. + * 2) If we find data in a DB different than DB0 we return C_ERR to + * signal the caller it should quit the server with an error message + * or take other actions. + * + * The function always returns C_OK even if it will try to correct + * the error described in "1". However if data is found in DB different + * from DB0, C_ERR is returned. + * + * The function also uses the logging facility in order to warn the user + * about desynchronizations between the data we have in memory and the + * cluster configuration. */ +int verifyClusterConfigWithData(void) { + int j; + int update_config = 0; + + /* If this node is a slave, don't perform the check at all as we + * completely depend on the replication stream. */ + if (nodeIsSlave(myself)) return C_OK; + + /* Make sure we only have keys in DB0. */ + for (j = 1; j < server.dbnum; j++) { + if (dictSize(server.db[j].dict)) return C_ERR; + } + + /* Check that all the slots we see populated memory have a corresponding + * entry in the cluster table. Otherwise fix the table. */ + for (j = 0; j < CLUSTER_SLOTS; j++) { + if (!countKeysInSlot(j)) continue; /* No keys in this slot. */ + /* Check if we are assigned to this slot or if we are importing it. + * In both cases check the next slot as the configuration makes + * sense. */ + if (server.cluster->slots[j] == myself || + server.cluster->importing_slots_from[j] != NULL) continue; + + /* If we are here data and cluster config don't agree, and we have + * slot 'j' populated even if we are not importing it, nor we are + * assigned to this slot. Fix this condition. */ + + update_config++; + /* Case A: slot is unassigned. Take responsibility for it. */ + if (server.cluster->slots[j] == NULL) { + serverLog(LL_WARNING, "I have keys for unassigned slot %d. " + "Taking responsibility for it.",j); + clusterAddSlot(myself,j); + } else { + serverLog(LL_WARNING, "I have keys for slot %d, but the slot is " + "assigned to another node. " + "Setting it to importing state.",j); + server.cluster->importing_slots_from[j] = server.cluster->slots[j]; + } + } + if (update_config) clusterSaveConfigOrDie(1); + return C_OK; +} + +/* ----------------------------------------------------------------------------- + * SLAVE nodes handling + * -------------------------------------------------------------------------- */ + +/* Set the specified node 'n' as master for this node. + * If this node is currently a master, it is turned into a slave. */ +void clusterSetMaster(clusterNode *n) { + serverAssert(n != myself); + serverAssert(myself->numslots == 0); + + if (nodeIsMaster(myself)) { + myself->flags &= ~(CLUSTER_NODE_MASTER|CLUSTER_NODE_MIGRATE_TO); + myself->flags |= CLUSTER_NODE_SLAVE; + clusterCloseAllSlots(); + } else { + if (myself->slaveof) + clusterNodeRemoveSlave(myself->slaveof,myself); + } + myself->slaveof = n; + clusterNodeAddSlave(n,myself); + replicationSetMaster(n->ip, n->port); + resetManualFailover(); +} + +/* ----------------------------------------------------------------------------- + * Nodes to string representation functions. + * -------------------------------------------------------------------------- */ + +struct redisNodeFlags { + uint16_t flag; + char *name; +}; + +static struct redisNodeFlags redisNodeFlagsTable[] = { + {CLUSTER_NODE_MYSELF, "myself,"}, + {CLUSTER_NODE_MASTER, "master,"}, + {CLUSTER_NODE_SLAVE, "slave,"}, + {CLUSTER_NODE_PFAIL, "fail?,"}, + {CLUSTER_NODE_FAIL, "fail,"}, + {CLUSTER_NODE_HANDSHAKE, "handshake,"}, + {CLUSTER_NODE_NOADDR, "noaddr,"} +}; + +/* Concatenate the comma separated list of node flags to the given SDS + * string 'ci'. */ +sds representClusterNodeFlags(sds ci, uint16_t flags) { + if (flags == 0) { + ci = sdscat(ci,"noflags,"); + } else { + int i, size = sizeof(redisNodeFlagsTable)/sizeof(struct redisNodeFlags); + for (i = 0; i < size; i++) { + struct redisNodeFlags *nodeflag = redisNodeFlagsTable + i; + if (flags & nodeflag->flag) ci = sdscat(ci, nodeflag->name); + } + } + sdsIncrLen(ci,-1); /* Remove trailing comma. */ + return ci; +} + +/* Generate a csv-alike representation of the specified cluster node. + * See clusterGenNodesDescription() top comment for more information. + * + * The function returns the string representation as an SDS string. */ +sds clusterGenNodeDescription(clusterNode *node) { + int j, start; + sds ci; + + /* Node coordinates */ + ci = sdscatprintf(sdsempty(),"%.40s %s:%d@%d ", + node->name, + node->ip, + node->port, + node->cport); + + /* Flags */ + ci = representClusterNodeFlags(ci, node->flags); + + /* Slave of... or just "-" */ + if (node->slaveof) + ci = sdscatprintf(ci," %.40s ",node->slaveof->name); + else + ci = sdscatlen(ci," - ",3); + + /* Latency from the POV of this node, config epoch, link status */ + ci = sdscatprintf(ci,"%lld %lld %llu %s", + (long long) node->ping_sent, + (long long) node->pong_received, + (unsigned long long) node->configEpoch, + (node->link || node->flags & CLUSTER_NODE_MYSELF) ? + "connected" : "disconnected"); + + /* Slots served by this instance */ + start = -1; + for (j = 0; j < CLUSTER_SLOTS; j++) { + int bit; + + if ((bit = clusterNodeGetSlotBit(node,j)) != 0) { + if (start == -1) start = j; + } + if (start != -1 && (!bit || j == CLUSTER_SLOTS-1)) { + if (bit && j == CLUSTER_SLOTS-1) j++; + + if (start == j-1) { + ci = sdscatprintf(ci," %d",start); + } else { + ci = sdscatprintf(ci," %d-%d",start,j-1); + } + start = -1; + } + } + + /* Just for MYSELF node we also dump info about slots that + * we are migrating to other instances or importing from other + * instances. */ + if (node->flags & CLUSTER_NODE_MYSELF) { + for (j = 0; j < CLUSTER_SLOTS; j++) { + if (server.cluster->migrating_slots_to[j]) { + ci = sdscatprintf(ci," [%d->-%.40s]",j, + server.cluster->migrating_slots_to[j]->name); + } else if (server.cluster->importing_slots_from[j]) { + ci = sdscatprintf(ci," [%d-<-%.40s]",j, + server.cluster->importing_slots_from[j]->name); + } + } + } + return ci; +} + +/* Generate a csv-alike representation of the nodes we are aware of, + * including the "myself" node, and return an SDS string containing the + * representation (it is up to the caller to free it). + * + * All the nodes matching at least one of the node flags specified in + * "filter" are excluded from the output, so using zero as a filter will + * include all the known nodes in the representation, including nodes in + * the HANDSHAKE state. + * + * The representation obtained using this function is used for the output + * of the CLUSTER NODES function, and as format for the cluster + * configuration file (nodes.conf) for a given node. */ +sds clusterGenNodesDescription(int filter) { + sds ci = sdsempty(), ni; + dictIterator *di; + dictEntry *de; + + di = dictGetSafeIterator(server.cluster->nodes); + while((de = dictNext(di)) != NULL) { + clusterNode *node = dictGetVal(de); + + if (node->flags & filter) continue; + ni = clusterGenNodeDescription(node); + ci = sdscatsds(ci,ni); + sdsfree(ni); + ci = sdscatlen(ci,"\n",1); + } + dictReleaseIterator(di); + return ci; +} + +/* ----------------------------------------------------------------------------- + * CLUSTER command + * -------------------------------------------------------------------------- */ + +const char *clusterGetMessageTypeString(int type) { + switch(type) { + case CLUSTERMSG_TYPE_PING: return "ping"; + case CLUSTERMSG_TYPE_PONG: return "pong"; + case CLUSTERMSG_TYPE_MEET: return "meet"; + case CLUSTERMSG_TYPE_FAIL: return "fail"; + case CLUSTERMSG_TYPE_PUBLISH: return "publish"; + case CLUSTERMSG_TYPE_FAILOVER_AUTH_REQUEST: return "auth-req"; + case CLUSTERMSG_TYPE_FAILOVER_AUTH_ACK: return "auth-ack"; + case CLUSTERMSG_TYPE_UPDATE: return "update"; + case CLUSTERMSG_TYPE_MFSTART: return "mfstart"; + } + return "unknown"; +} + +int getSlotOrReply(client *c, robj *o) { + long long slot; + + if (getLongLongFromObject(o,&slot) != C_OK || + slot < 0 || slot >= CLUSTER_SLOTS) + { + addReplyError(c,"Invalid or out of range slot"); + return -1; + } + return (int) slot; +} + +void clusterReplyMultiBulkSlots(client *c) { + /* Format: 1) 1) start slot + * 2) end slot + * 3) 1) master IP + * 2) master port + * 3) node ID + * 4) 1) replica IP + * 2) replica port + * 3) node ID + * ... continued until done + */ + + int num_masters = 0; + void *slot_replylen = addDeferredMultiBulkLength(c); + + dictEntry *de; + dictIterator *di = dictGetSafeIterator(server.cluster->nodes); + while((de = dictNext(di)) != NULL) { + clusterNode *node = dictGetVal(de); + int j = 0, start = -1; + + /* Skip slaves (that are iterated when producing the output of their + * master) and masters not serving any slot. */ + if (!nodeIsMaster(node) || node->numslots == 0) continue; + + for (j = 0; j < CLUSTER_SLOTS; j++) { + int bit, i; + + if ((bit = clusterNodeGetSlotBit(node,j)) != 0) { + if (start == -1) start = j; + } + if (start != -1 && (!bit || j == CLUSTER_SLOTS-1)) { + int nested_elements = 3; /* slots (2) + master addr (1). */ + void *nested_replylen = addDeferredMultiBulkLength(c); + + if (bit && j == CLUSTER_SLOTS-1) j++; + + /* If slot exists in output map, add to it's list. + * else, create a new output map for this slot */ + if (start == j-1) { + addReplyLongLong(c, start); /* only one slot; low==high */ + addReplyLongLong(c, start); + } else { + addReplyLongLong(c, start); /* low */ + addReplyLongLong(c, j-1); /* high */ + } + start = -1; + + /* First node reply position is always the master */ + addReplyMultiBulkLen(c, 3); + addReplyBulkCString(c, node->ip); + addReplyLongLong(c, node->port); + addReplyBulkCBuffer(c, node->name, CLUSTER_NAMELEN); + + /* Remaining nodes in reply are replicas for slot range */ + for (i = 0; i < node->numslaves; i++) { + /* This loop is copy/pasted from clusterGenNodeDescription() + * with modifications for per-slot node aggregation */ + if (nodeFailed(node->slaves[i])) continue; + addReplyMultiBulkLen(c, 3); + addReplyBulkCString(c, node->slaves[i]->ip); + addReplyLongLong(c, node->slaves[i]->port); + addReplyBulkCBuffer(c, node->slaves[i]->name, CLUSTER_NAMELEN); + nested_elements++; + } + setDeferredMultiBulkLength(c, nested_replylen, nested_elements); + num_masters++; + } + } + } + dictReleaseIterator(di); + setDeferredMultiBulkLength(c, slot_replylen, num_masters); +} + +void clusterCommand(client *c) { + if (server.cluster_enabled == 0) { + addReplyError(c,"This instance has cluster support disabled"); + return; + } + + if (!strcasecmp(c->argv[1]->ptr,"meet") && (c->argc == 4 || c->argc == 5)) { + /* CLUSTER MEET [cport] */ + long long port, cport; + + if (getLongLongFromObject(c->argv[3], &port) != C_OK) { + addReplyErrorFormat(c,"Invalid TCP base port specified: %s", + (char*)c->argv[3]->ptr); + return; + } + + if (c->argc == 5) { + if (getLongLongFromObject(c->argv[4], &cport) != C_OK) { + addReplyErrorFormat(c,"Invalid TCP bus port specified: %s", + (char*)c->argv[4]->ptr); + return; + } + } else { + cport = port + CLUSTER_PORT_INCR; + } + + if (clusterStartHandshake(c->argv[2]->ptr,port,cport) == 0 && + errno == EINVAL) + { + addReplyErrorFormat(c,"Invalid node address specified: %s:%s", + (char*)c->argv[2]->ptr, (char*)c->argv[3]->ptr); + } else { + addReply(c,shared.ok); + } + } else if (!strcasecmp(c->argv[1]->ptr,"nodes") && c->argc == 2) { + /* CLUSTER NODES */ + robj *o; + sds ci = clusterGenNodesDescription(0); + + o = createObject(OBJ_STRING,ci); + addReplyBulk(c,o); + decrRefCount(o); + } else if (!strcasecmp(c->argv[1]->ptr,"myid") && c->argc == 2) { + /* CLUSTER MYID */ + addReplyBulkCBuffer(c,myself->name, CLUSTER_NAMELEN); + } else if (!strcasecmp(c->argv[1]->ptr,"slots") && c->argc == 2) { + /* CLUSTER SLOTS */ + clusterReplyMultiBulkSlots(c); + } else if (!strcasecmp(c->argv[1]->ptr,"flushslots") && c->argc == 2) { + /* CLUSTER FLUSHSLOTS */ + if (dictSize(server.db[0].dict) != 0) { + addReplyError(c,"DB must be empty to perform CLUSTER FLUSHSLOTS."); + return; + } + clusterDelNodeSlots(myself); + clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE|CLUSTER_TODO_SAVE_CONFIG); + addReply(c,shared.ok); + } else if ((!strcasecmp(c->argv[1]->ptr,"addslots") || + !strcasecmp(c->argv[1]->ptr,"delslots")) && c->argc >= 3) + { + /* CLUSTER ADDSLOTS [slot] ... */ + /* CLUSTER DELSLOTS [slot] ... */ + int j, slot; + unsigned char *slots = zmalloc(CLUSTER_SLOTS); + int del = !strcasecmp(c->argv[1]->ptr,"delslots"); + + memset(slots,0,CLUSTER_SLOTS); + /* Check that all the arguments are parseable and that all the + * slots are not already busy. */ + for (j = 2; j < c->argc; j++) { + if ((slot = getSlotOrReply(c,c->argv[j])) == -1) { + zfree(slots); + return; + } + if (del && server.cluster->slots[slot] == NULL) { + addReplyErrorFormat(c,"Slot %d is already unassigned", slot); + zfree(slots); + return; + } else if (!del && server.cluster->slots[slot]) { + addReplyErrorFormat(c,"Slot %d is already busy", slot); + zfree(slots); + return; + } + if (slots[slot]++ == 1) { + addReplyErrorFormat(c,"Slot %d specified multiple times", + (int)slot); + zfree(slots); + return; + } + } + for (j = 0; j < CLUSTER_SLOTS; j++) { + if (slots[j]) { + int retval; + + /* If this slot was set as importing we can clear this + * state as now we are the real owner of the slot. */ + if (server.cluster->importing_slots_from[j]) + server.cluster->importing_slots_from[j] = NULL; + + retval = del ? clusterDelSlot(j) : + clusterAddSlot(myself,j); + serverAssertWithInfo(c,NULL,retval == C_OK); + } + } + zfree(slots); + clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE|CLUSTER_TODO_SAVE_CONFIG); + addReply(c,shared.ok); + } else if (!strcasecmp(c->argv[1]->ptr,"setslot") && c->argc >= 4) { + /* SETSLOT 10 MIGRATING */ + /* SETSLOT 10 IMPORTING */ + /* SETSLOT 10 STABLE */ + /* SETSLOT 10 NODE */ + int slot; + clusterNode *n; + + if (nodeIsSlave(myself)) { + addReplyError(c,"Please use SETSLOT only with masters."); + return; + } + + if ((slot = getSlotOrReply(c,c->argv[2])) == -1) return; + + if (!strcasecmp(c->argv[3]->ptr,"migrating") && c->argc == 5) { + if (server.cluster->slots[slot] != myself) { + addReplyErrorFormat(c,"I'm not the owner of hash slot %u",slot); + return; + } + if ((n = clusterLookupNode(c->argv[4]->ptr)) == NULL) { + addReplyErrorFormat(c,"I don't know about node %s", + (char*)c->argv[4]->ptr); + return; + } + server.cluster->migrating_slots_to[slot] = n; + } else if (!strcasecmp(c->argv[3]->ptr,"importing") && c->argc == 5) { + if (server.cluster->slots[slot] == myself) { + addReplyErrorFormat(c, + "I'm already the owner of hash slot %u",slot); + return; + } + if ((n = clusterLookupNode(c->argv[4]->ptr)) == NULL) { + addReplyErrorFormat(c,"I don't know about node %s", + (char*)c->argv[3]->ptr); + return; + } + server.cluster->importing_slots_from[slot] = n; + } else if (!strcasecmp(c->argv[3]->ptr,"stable") && c->argc == 4) { + /* CLUSTER SETSLOT STABLE */ + server.cluster->importing_slots_from[slot] = NULL; + server.cluster->migrating_slots_to[slot] = NULL; + } else if (!strcasecmp(c->argv[3]->ptr,"node") && c->argc == 5) { + /* CLUSTER SETSLOT NODE */ + clusterNode *n = clusterLookupNode(c->argv[4]->ptr); + + if (!n) { + addReplyErrorFormat(c,"Unknown node %s", + (char*)c->argv[4]->ptr); + return; + } + /* If this hash slot was served by 'myself' before to switch + * make sure there are no longer local keys for this hash slot. */ + if (server.cluster->slots[slot] == myself && n != myself) { + if (countKeysInSlot(slot) != 0) { + addReplyErrorFormat(c, + "Can't assign hashslot %d to a different node " + "while I still hold keys for this hash slot.", slot); + return; + } + } + /* If this slot is in migrating status but we have no keys + * for it assigning the slot to another node will clear + * the migratig status. */ + if (countKeysInSlot(slot) == 0 && + server.cluster->migrating_slots_to[slot]) + server.cluster->migrating_slots_to[slot] = NULL; + + /* If this node was importing this slot, assigning the slot to + * itself also clears the importing status. */ + if (n == myself && + server.cluster->importing_slots_from[slot]) + { + /* This slot was manually migrated, set this node configEpoch + * to a new epoch so that the new version can be propagated + * by the cluster. + * + * Note that if this ever results in a collision with another + * node getting the same configEpoch, for example because a + * failover happens at the same time we close the slot, the + * configEpoch collision resolution will fix it assigning + * a different epoch to each node. */ + if (clusterBumpConfigEpochWithoutConsensus() == C_OK) { + serverLog(LL_WARNING, + "configEpoch updated after importing slot %d", slot); + } + server.cluster->importing_slots_from[slot] = NULL; + } + clusterDelSlot(slot); + clusterAddSlot(n,slot); + } else { + addReplyError(c, + "Invalid CLUSTER SETSLOT action or number of arguments"); + return; + } + clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG|CLUSTER_TODO_UPDATE_STATE); + addReply(c,shared.ok); + } else if (!strcasecmp(c->argv[1]->ptr,"bumpepoch") && c->argc == 2) { + /* CLUSTER BUMPEPOCH */ + int retval = clusterBumpConfigEpochWithoutConsensus(); + sds reply = sdscatprintf(sdsempty(),"+%s %llu\r\n", + (retval == C_OK) ? "BUMPED" : "STILL", + (unsigned long long) myself->configEpoch); + addReplySds(c,reply); + } else if (!strcasecmp(c->argv[1]->ptr,"info") && c->argc == 2) { + /* CLUSTER INFO */ + char *statestr[] = {"ok","fail","needhelp"}; + int slots_assigned = 0, slots_ok = 0, slots_pfail = 0, slots_fail = 0; + uint64_t myepoch; + int j; + + for (j = 0; j < CLUSTER_SLOTS; j++) { + clusterNode *n = server.cluster->slots[j]; + + if (n == NULL) continue; + slots_assigned++; + if (nodeFailed(n)) { + slots_fail++; + } else if (nodeTimedOut(n)) { + slots_pfail++; + } else { + slots_ok++; + } + } + + myepoch = (nodeIsSlave(myself) && myself->slaveof) ? + myself->slaveof->configEpoch : myself->configEpoch; + + sds info = sdscatprintf(sdsempty(), + "cluster_state:%s\r\n" + "cluster_slots_assigned:%d\r\n" + "cluster_slots_ok:%d\r\n" + "cluster_slots_pfail:%d\r\n" + "cluster_slots_fail:%d\r\n" + "cluster_known_nodes:%lu\r\n" + "cluster_size:%d\r\n" + "cluster_current_epoch:%llu\r\n" + "cluster_my_epoch:%llu\r\n" + , statestr[server.cluster->state], + slots_assigned, + slots_ok, + slots_pfail, + slots_fail, + dictSize(server.cluster->nodes), + server.cluster->size, + (unsigned long long) server.cluster->currentEpoch, + (unsigned long long) myepoch + ); + + /* Show stats about messages sent and received. */ + long long tot_msg_sent = 0; + long long tot_msg_received = 0; + + for (int i = 0; i < CLUSTERMSG_TYPE_COUNT; i++) { + if (server.cluster->stats_bus_messages_sent[i] == 0) continue; + tot_msg_sent += server.cluster->stats_bus_messages_sent[i]; + info = sdscatprintf(info, + "cluster_stats_messages_%s_sent:%lld\r\n", + clusterGetMessageTypeString(i), + server.cluster->stats_bus_messages_sent[i]); + } + info = sdscatprintf(info, + "cluster_stats_messages_sent:%lld\r\n", tot_msg_sent); + + for (int i = 0; i < CLUSTERMSG_TYPE_COUNT; i++) { + if (server.cluster->stats_bus_messages_received[i] == 0) continue; + tot_msg_received += server.cluster->stats_bus_messages_received[i]; + info = sdscatprintf(info, + "cluster_stats_messages_%s_received:%lld\r\n", + clusterGetMessageTypeString(i), + server.cluster->stats_bus_messages_received[i]); + } + info = sdscatprintf(info, + "cluster_stats_messages_received:%lld\r\n", tot_msg_received); + + /* Produce the reply protocol. */ + addReplySds(c,sdscatprintf(sdsempty(),"$%lu\r\n", + (unsigned long)sdslen(info))); + addReplySds(c,info); + addReply(c,shared.crlf); + } else if (!strcasecmp(c->argv[1]->ptr,"saveconfig") && c->argc == 2) { + int retval = clusterSaveConfig(1); + + if (retval == 0) + addReply(c,shared.ok); + else + addReplyErrorFormat(c,"error saving the cluster node config: %s", + strerror(errno)); + } else if (!strcasecmp(c->argv[1]->ptr,"keyslot") && c->argc == 3) { + /* CLUSTER KEYSLOT */ + sds key = c->argv[2]->ptr; + + addReplyLongLong(c,keyHashSlot(key,sdslen(key))); + } else if (!strcasecmp(c->argv[1]->ptr,"countkeysinslot") && c->argc == 3) { + /* CLUSTER COUNTKEYSINSLOT */ + long long slot; + + if (getLongLongFromObjectOrReply(c,c->argv[2],&slot,NULL) != C_OK) + return; + if (slot < 0 || slot >= CLUSTER_SLOTS) { + addReplyError(c,"Invalid slot"); + return; + } + addReplyLongLong(c,countKeysInSlot(slot)); + } else if (!strcasecmp(c->argv[1]->ptr,"getkeysinslot") && c->argc == 4) { + /* CLUSTER GETKEYSINSLOT */ + long long maxkeys, slot; + unsigned int numkeys, j; + robj **keys; + + if (getLongLongFromObjectOrReply(c,c->argv[2],&slot,NULL) != C_OK) + return; + if (getLongLongFromObjectOrReply(c,c->argv[3],&maxkeys,NULL) + != C_OK) + return; + if (slot < 0 || slot >= CLUSTER_SLOTS || maxkeys < 0) { + addReplyError(c,"Invalid slot or number of keys"); + return; + } + + keys = zmalloc(sizeof(robj*)*maxkeys); + numkeys = getKeysInSlot(slot, keys, maxkeys); + addReplyMultiBulkLen(c,numkeys); + for (j = 0; j < numkeys; j++) { + addReplyBulk(c,keys[j]); + decrRefCount(keys[j]); + } + zfree(keys); + } else if (!strcasecmp(c->argv[1]->ptr,"forget") && c->argc == 3) { + /* CLUSTER FORGET */ + clusterNode *n = clusterLookupNode(c->argv[2]->ptr); + + if (!n) { + addReplyErrorFormat(c,"Unknown node %s", (char*)c->argv[2]->ptr); + return; + } else if (n == myself) { + addReplyError(c,"I tried hard but I can't forget myself..."); + return; + } else if (nodeIsSlave(myself) && myself->slaveof == n) { + addReplyError(c,"Can't forget my master!"); + return; + } + clusterBlacklistAddNode(n); + clusterDelNode(n); + clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE| + CLUSTER_TODO_SAVE_CONFIG); + addReply(c,shared.ok); + } else if (!strcasecmp(c->argv[1]->ptr,"replicate") && c->argc == 3) { + /* CLUSTER REPLICATE */ + clusterNode *n = clusterLookupNode(c->argv[2]->ptr); + + /* Lookup the specified node in our table. */ + if (!n) { + addReplyErrorFormat(c,"Unknown node %s", (char*)c->argv[2]->ptr); + return; + } + + /* I can't replicate myself. */ + if (n == myself) { + addReplyError(c,"Can't replicate myself"); + return; + } + + /* Can't replicate a slave. */ + if (nodeIsSlave(n)) { + addReplyError(c,"I can only replicate a master, not a slave."); + return; + } + + /* If the instance is currently a master, it should have no assigned + * slots nor keys to accept to replicate some other node. + * Slaves can switch to another master without issues. */ + if (nodeIsMaster(myself) && + (myself->numslots != 0 || dictSize(server.db[0].dict) != 0)) { + addReplyError(c, + "To set a master the node must be empty and " + "without assigned slots."); + return; + } + + /* Set the master. */ + clusterSetMaster(n); + clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE|CLUSTER_TODO_SAVE_CONFIG); + addReply(c,shared.ok); + } else if (!strcasecmp(c->argv[1]->ptr,"slaves") && c->argc == 3) { + /* CLUSTER SLAVES */ + clusterNode *n = clusterLookupNode(c->argv[2]->ptr); + int j; + + /* Lookup the specified node in our table. */ + if (!n) { + addReplyErrorFormat(c,"Unknown node %s", (char*)c->argv[2]->ptr); + return; + } + + if (nodeIsSlave(n)) { + addReplyError(c,"The specified node is not a master"); + return; + } + + addReplyMultiBulkLen(c,n->numslaves); + for (j = 0; j < n->numslaves; j++) { + sds ni = clusterGenNodeDescription(n->slaves[j]); + addReplyBulkCString(c,ni); + sdsfree(ni); + } + } else if (!strcasecmp(c->argv[1]->ptr,"count-failure-reports") && + c->argc == 3) + { + /* CLUSTER COUNT-FAILURE-REPORTS */ + clusterNode *n = clusterLookupNode(c->argv[2]->ptr); + + if (!n) { + addReplyErrorFormat(c,"Unknown node %s", (char*)c->argv[2]->ptr); + return; + } else { + addReplyLongLong(c,clusterNodeFailureReportsCount(n)); + } + } else if (!strcasecmp(c->argv[1]->ptr,"failover") && + (c->argc == 2 || c->argc == 3)) + { + /* CLUSTER FAILOVER [FORCE|TAKEOVER] */ + int force = 0, takeover = 0; + + if (c->argc == 3) { + if (!strcasecmp(c->argv[2]->ptr,"force")) { + force = 1; + } else if (!strcasecmp(c->argv[2]->ptr,"takeover")) { + takeover = 1; + force = 1; /* Takeover also implies force. */ + } else { + addReply(c,shared.syntaxerr); + return; + } + } + + /* Check preconditions. */ + if (nodeIsMaster(myself)) { + addReplyError(c,"You should send CLUSTER FAILOVER to a slave"); + return; + } else if (myself->slaveof == NULL) { + addReplyError(c,"I'm a slave but my master is unknown to me"); + return; + } else if (!force && + (nodeFailed(myself->slaveof) || + myself->slaveof->link == NULL)) + { + addReplyError(c,"Master is down or failed, " + "please use CLUSTER FAILOVER FORCE"); + return; + } + resetManualFailover(); + server.cluster->mf_end = mstime() + CLUSTER_MF_TIMEOUT; + + if (takeover) { + /* A takeover does not perform any initial check. It just + * generates a new configuration epoch for this node without + * consensus, claims the master's slots, and broadcast the new + * configuration. */ + serverLog(LL_WARNING,"Taking over the master (user request)."); + clusterBumpConfigEpochWithoutConsensus(); + clusterFailoverReplaceYourMaster(); + } else if (force) { + /* If this is a forced failover, we don't need to talk with our + * master to agree about the offset. We just failover taking over + * it without coordination. */ + serverLog(LL_WARNING,"Forced failover user request accepted."); + server.cluster->mf_can_start = 1; + } else { + serverLog(LL_WARNING,"Manual failover user request accepted."); + clusterSendMFStart(myself->slaveof); + } + addReply(c,shared.ok); + } else if (!strcasecmp(c->argv[1]->ptr,"set-config-epoch") && c->argc == 3) + { + /* CLUSTER SET-CONFIG-EPOCH + * + * The user is allowed to set the config epoch only when a node is + * totally fresh: no config epoch, no other known node, and so forth. + * This happens at cluster creation time to start with a cluster where + * every node has a different node ID, without to rely on the conflicts + * resolution system which is too slow when a big cluster is created. */ + long long epoch; + + if (getLongLongFromObjectOrReply(c,c->argv[2],&epoch,NULL) != C_OK) + return; + + if (epoch < 0) { + addReplyErrorFormat(c,"Invalid config epoch specified: %lld",epoch); + } else if (dictSize(server.cluster->nodes) > 1) { + addReplyError(c,"The user can assign a config epoch only when the " + "node does not know any other node."); + } else if (myself->configEpoch != 0) { + addReplyError(c,"Node config epoch is already non-zero"); + } else { + myself->configEpoch = epoch; + serverLog(LL_WARNING, + "configEpoch set to %llu via CLUSTER SET-CONFIG-EPOCH", + (unsigned long long) myself->configEpoch); + + if (server.cluster->currentEpoch < (uint64_t)epoch) + server.cluster->currentEpoch = epoch; + /* No need to fsync the config here since in the unlucky event + * of a failure to persist the config, the conflict resolution code + * will assign an unique config to this node. */ + clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE| + CLUSTER_TODO_SAVE_CONFIG); + addReply(c,shared.ok); + } + } else if (!strcasecmp(c->argv[1]->ptr,"reset") && + (c->argc == 2 || c->argc == 3)) + { + /* CLUSTER RESET [SOFT|HARD] */ + int hard = 0; + + /* Parse soft/hard argument. Default is soft. */ + if (c->argc == 3) { + if (!strcasecmp(c->argv[2]->ptr,"hard")) { + hard = 1; + } else if (!strcasecmp(c->argv[2]->ptr,"soft")) { + hard = 0; + } else { + addReply(c,shared.syntaxerr); + return; + } + } + + /* Slaves can be reset while containing data, but not master nodes + * that must be empty. */ + if (nodeIsMaster(myself) && dictSize(c->db->dict) != 0) { + addReplyError(c,"CLUSTER RESET can't be called with " + "master nodes containing keys"); + return; + } + clusterReset(hard); + addReply(c,shared.ok); + } else { + addReplyError(c,"Wrong CLUSTER subcommand or number of arguments"); + } +} + +/* ----------------------------------------------------------------------------- + * DUMP, RESTORE and MIGRATE commands + * -------------------------------------------------------------------------- */ + +/* Generates a DUMP-format representation of the object 'o', adding it to the + * io stream pointed by 'rio'. This function can't fail. */ +void createDumpPayload(rio *payload, robj *o) { + unsigned char buf[2]; + uint64_t crc; + + /* Serialize the object in a RDB-like format. It consist of an object type + * byte followed by the serialized object. This is understood by RESTORE. */ + rioInitWithBuffer(payload,sdsempty()); + serverAssert(rdbSaveObjectType(payload,o)); + serverAssert(rdbSaveObject(payload,o)); + + /* Write the footer, this is how it looks like: + * ----------------+---------------------+---------------+ + * ... RDB payload | 2 bytes RDB version | 8 bytes CRC64 | + * ----------------+---------------------+---------------+ + * RDB version and CRC are both in little endian. + */ + + /* RDB version */ + buf[0] = RDB_VERSION & 0xff; + buf[1] = (RDB_VERSION >> 8) & 0xff; + payload->io.buffer.ptr = sdscatlen(payload->io.buffer.ptr,buf,2); + + /* CRC64 */ + crc = crc64(0,(unsigned char*)payload->io.buffer.ptr, + sdslen(payload->io.buffer.ptr)); + memrev64ifbe(&crc); + payload->io.buffer.ptr = sdscatlen(payload->io.buffer.ptr,&crc,8); +} + +/* Verify that the RDB version of the dump payload matches the one of this Redis + * instance and that the checksum is ok. + * If the DUMP payload looks valid C_OK is returned, otherwise C_ERR + * is returned. */ +int verifyDumpPayload(unsigned char *p, size_t len) { + unsigned char *footer; + uint16_t rdbver; + uint64_t crc; + + /* At least 2 bytes of RDB version and 8 of CRC64 should be present. */ + if (len < 10) return C_ERR; + footer = p+(len-10); + + /* Verify RDB version */ + rdbver = (footer[1] << 8) | footer[0]; + if (rdbver > RDB_VERSION) return C_ERR; + + /* Verify CRC64 */ + crc = crc64(0,p,len-8); + memrev64ifbe(&crc); + return (memcmp(&crc,footer+2,8) == 0) ? C_OK : C_ERR; +} + +/* DUMP keyname + * DUMP is actually not used by Redis Cluster but it is the obvious + * complement of RESTORE and can be useful for different applications. */ +void dumpCommand(client *c) { + robj *o, *dumpobj; + rio payload; + + /* Check if the key is here. */ + if ((o = lookupKeyRead(c->db,c->argv[1])) == NULL) { + addReply(c,shared.nullbulk); + return; + } + + /* Create the DUMP encoded representation. */ + createDumpPayload(&payload,o); + + /* Transfer to the client */ + dumpobj = createObject(OBJ_STRING,payload.io.buffer.ptr); + addReplyBulk(c,dumpobj); + decrRefCount(dumpobj); + return; +} + +/* RESTORE key ttl serialized-value [REPLACE] */ +void restoreCommand(client *c) { + long long ttl; + rio payload; + int j, type, replace = 0; + robj *obj; + + /* Parse additional options */ + for (j = 4; j < c->argc; j++) { + if (!strcasecmp(c->argv[j]->ptr,"replace")) { + replace = 1; + } else { + addReply(c,shared.syntaxerr); + return; + } + } + + /* Make sure this key does not already exist here... */ + if (!replace && lookupKeyWrite(c->db,c->argv[1]) != NULL) { + addReply(c,shared.busykeyerr); + return; + } + + /* Check if the TTL value makes sense */ + if (getLongLongFromObjectOrReply(c,c->argv[2],&ttl,NULL) != C_OK) { + return; + } else if (ttl < 0) { + addReplyError(c,"Invalid TTL value, must be >= 0"); + return; + } + + /* Verify RDB version and data checksum. */ + if (verifyDumpPayload(c->argv[3]->ptr,sdslen(c->argv[3]->ptr)) == C_ERR) + { + addReplyError(c,"DUMP payload version or checksum are wrong"); + return; + } + + rioInitWithBuffer(&payload,c->argv[3]->ptr); + if (((type = rdbLoadObjectType(&payload)) == -1) || + ((obj = rdbLoadObject(type,&payload)) == NULL)) + { + addReplyError(c,"Bad data format"); + return; + } + + /* Remove the old key if needed. */ + if (replace) dbDelete(c->db,c->argv[1]); + + /* Create the key and set the TTL if any */ + dbAdd(c->db,c->argv[1],obj); + if (ttl) setExpire(c,c->db,c->argv[1],mstime()+ttl); + signalModifiedKey(c->db,c->argv[1]); + addReply(c,shared.ok); + server.dirty++; +} + +/* MIGRATE socket cache implementation. + * + * We take a map between host:ip and a TCP socket that we used to connect + * to this instance in recent time. + * This sockets are closed when the max number we cache is reached, and also + * in serverCron() when they are around for more than a few seconds. */ +#define MIGRATE_SOCKET_CACHE_ITEMS 64 /* max num of items in the cache. */ +#define MIGRATE_SOCKET_CACHE_TTL 10 /* close cached sockets after 10 sec. */ + +typedef struct migrateCachedSocket { + int fd; + long last_dbid; + time_t last_use_time; +} migrateCachedSocket; + +/* Return a migrateCachedSocket containing a TCP socket connected with the + * target instance, possibly returning a cached one. + * + * This function is responsible of sending errors to the client if a + * connection can't be established. In this case -1 is returned. + * Otherwise on success the socket is returned, and the caller should not + * attempt to free it after usage. + * + * If the caller detects an error while using the socket, migrateCloseSocket() + * should be called so that the connection will be created from scratch + * the next time. */ +migrateCachedSocket* migrateGetSocket(client *c, robj *host, robj *port, long timeout) { + int fd; + sds name = sdsempty(); + migrateCachedSocket *cs; + + /* Check if we have an already cached socket for this ip:port pair. */ + name = sdscatlen(name,host->ptr,sdslen(host->ptr)); + name = sdscatlen(name,":",1); + name = sdscatlen(name,port->ptr,sdslen(port->ptr)); + cs = dictFetchValue(server.migrate_cached_sockets,name); + if (cs) { + sdsfree(name); + cs->last_use_time = server.unixtime; + return cs; + } + + /* No cached socket, create one. */ + if (dictSize(server.migrate_cached_sockets) == MIGRATE_SOCKET_CACHE_ITEMS) { + /* Too many items, drop one at random. */ + dictEntry *de = dictGetRandomKey(server.migrate_cached_sockets); + cs = dictGetVal(de); + close(cs->fd); + zfree(cs); + dictDelete(server.migrate_cached_sockets,dictGetKey(de)); + } + + /* Create the socket */ + fd = anetTcpNonBlockConnect(server.neterr,c->argv[1]->ptr, + atoi(c->argv[2]->ptr)); + if (fd == -1) { + sdsfree(name); + addReplyErrorFormat(c,"Can't connect to target node: %s", + server.neterr); + return NULL; + } + anetEnableTcpNoDelay(server.neterr,fd); + + /* Check if it connects within the specified timeout. */ + if ((aeWait(fd,AE_WRITABLE,timeout) & AE_WRITABLE) == 0) { + sdsfree(name); + addReplySds(c, + sdsnew("-IOERR error or timeout connecting to the client\r\n")); + close(fd); + return NULL; + } + + /* Add to the cache and return it to the caller. */ + cs = zmalloc(sizeof(*cs)); + cs->fd = fd; + cs->last_dbid = -1; + cs->last_use_time = server.unixtime; + dictAdd(server.migrate_cached_sockets,name,cs); + return cs; +} + +/* Free a migrate cached connection. */ +void migrateCloseSocket(robj *host, robj *port) { + sds name = sdsempty(); + migrateCachedSocket *cs; + + name = sdscatlen(name,host->ptr,sdslen(host->ptr)); + name = sdscatlen(name,":",1); + name = sdscatlen(name,port->ptr,sdslen(port->ptr)); + cs = dictFetchValue(server.migrate_cached_sockets,name); + if (!cs) { + sdsfree(name); + return; + } + + close(cs->fd); + zfree(cs); + dictDelete(server.migrate_cached_sockets,name); + sdsfree(name); +} + +void migrateCloseTimedoutSockets(void) { + dictIterator *di = dictGetSafeIterator(server.migrate_cached_sockets); + dictEntry *de; + + while((de = dictNext(di)) != NULL) { + migrateCachedSocket *cs = dictGetVal(de); + + if ((server.unixtime - cs->last_use_time) > MIGRATE_SOCKET_CACHE_TTL) { + close(cs->fd); + zfree(cs); + dictDelete(server.migrate_cached_sockets,dictGetKey(de)); + } + } + dictReleaseIterator(di); +} + +/* MIGRATE host port key dbid timeout [COPY | REPLACE] + * + * On in the multiple keys form: + * + * MIGRATE host port "" dbid timeout [COPY | REPLACE] KEYS key1 key2 ... keyN */ +void migrateCommand(client *c) { + migrateCachedSocket *cs; + int copy, replace, j; + long timeout; + long dbid; + robj **ov = NULL; /* Objects to migrate. */ + robj **kv = NULL; /* Key names. */ + robj **newargv = NULL; /* Used to rewrite the command as DEL ... keys ... */ + rio cmd, payload; + int may_retry = 1; + int write_error = 0; + int argv_rewritten = 0; + + /* To support the KEYS option we need the following additional state. */ + int first_key = 3; /* Argument index of the first key. */ + int num_keys = 1; /* By default only migrate the 'key' argument. */ + + /* Initialization */ + copy = 0; + replace = 0; + + /* Parse additional options */ + for (j = 6; j < c->argc; j++) { + if (!strcasecmp(c->argv[j]->ptr,"copy")) { + copy = 1; + } else if (!strcasecmp(c->argv[j]->ptr,"replace")) { + replace = 1; + } else if (!strcasecmp(c->argv[j]->ptr,"keys")) { + if (sdslen(c->argv[3]->ptr) != 0) { + addReplyError(c, + "When using MIGRATE KEYS option, the key argument" + " must be set to the empty string"); + return; + } + first_key = j+1; + num_keys = c->argc - j - 1; + break; /* All the remaining args are keys. */ + } else { + addReply(c,shared.syntaxerr); + return; + } + } + + /* Sanity check */ + if (getLongFromObjectOrReply(c,c->argv[5],&timeout,NULL) != C_OK || + getLongFromObjectOrReply(c,c->argv[4],&dbid,NULL) != C_OK) + { + return; + } + if (timeout <= 0) timeout = 1000; + + /* Check if the keys are here. If at least one key is to migrate, do it + * otherwise if all the keys are missing reply with "NOKEY" to signal + * the caller there was nothing to migrate. We don't return an error in + * this case, since often this is due to a normal condition like the key + * expiring in the meantime. */ + ov = zrealloc(ov,sizeof(robj*)*num_keys); + kv = zrealloc(kv,sizeof(robj*)*num_keys); + int oi = 0; + + for (j = 0; j < num_keys; j++) { + if ((ov[oi] = lookupKeyRead(c->db,c->argv[first_key+j])) != NULL) { + kv[oi] = c->argv[first_key+j]; + oi++; + } + } + num_keys = oi; + if (num_keys == 0) { + zfree(ov); zfree(kv); + addReplySds(c,sdsnew("+NOKEY\r\n")); + return; + } + +try_again: + write_error = 0; + + /* Connect */ + cs = migrateGetSocket(c,c->argv[1],c->argv[2],timeout); + if (cs == NULL) { + zfree(ov); zfree(kv); + return; /* error sent to the client by migrateGetSocket() */ + } + + rioInitWithBuffer(&cmd,sdsempty()); + + /* Send the SELECT command if the current DB is not already selected. */ + int select = cs->last_dbid != dbid; /* Should we emit SELECT? */ + if (select) { + serverAssertWithInfo(c,NULL,rioWriteBulkCount(&cmd,'*',2)); + serverAssertWithInfo(c,NULL,rioWriteBulkString(&cmd,"SELECT",6)); + serverAssertWithInfo(c,NULL,rioWriteBulkLongLong(&cmd,dbid)); + } + + /* Create RESTORE payload and generate the protocol to call the command. */ + for (j = 0; j < num_keys; j++) { + long long ttl = 0; + long long expireat = getExpire(c->db,kv[j]); + + if (expireat != -1) { + ttl = expireat-mstime(); + if (ttl < 1) ttl = 1; + } + serverAssertWithInfo(c,NULL,rioWriteBulkCount(&cmd,'*',replace ? 5 : 4)); + if (server.cluster_enabled) + serverAssertWithInfo(c,NULL, + rioWriteBulkString(&cmd,"RESTORE-ASKING",14)); + else + serverAssertWithInfo(c,NULL,rioWriteBulkString(&cmd,"RESTORE",7)); + serverAssertWithInfo(c,NULL,sdsEncodedObject(kv[j])); + serverAssertWithInfo(c,NULL,rioWriteBulkString(&cmd,kv[j]->ptr, + sdslen(kv[j]->ptr))); + serverAssertWithInfo(c,NULL,rioWriteBulkLongLong(&cmd,ttl)); + + /* Emit the payload argument, that is the serialized object using + * the DUMP format. */ + createDumpPayload(&payload,ov[j]); + serverAssertWithInfo(c,NULL, + rioWriteBulkString(&cmd,payload.io.buffer.ptr, + sdslen(payload.io.buffer.ptr))); + sdsfree(payload.io.buffer.ptr); + + /* Add the REPLACE option to the RESTORE command if it was specified + * as a MIGRATE option. */ + if (replace) + serverAssertWithInfo(c,NULL,rioWriteBulkString(&cmd,"REPLACE",7)); + } + + /* Transfer the query to the other node in 64K chunks. */ + errno = 0; + { + sds buf = cmd.io.buffer.ptr; + size_t pos = 0, towrite; + int nwritten = 0; + + while ((towrite = sdslen(buf)-pos) > 0) { + towrite = (towrite > (64*1024) ? (64*1024) : towrite); + nwritten = syncWrite(cs->fd,buf+pos,towrite,timeout); + if (nwritten != (signed)towrite) { + write_error = 1; + goto socket_err; + } + pos += nwritten; + } + } + + char buf1[1024]; /* Select reply. */ + char buf2[1024]; /* Restore reply. */ + + /* Read the SELECT reply if needed. */ + if (select && syncReadLine(cs->fd, buf1, sizeof(buf1), timeout) <= 0) + goto socket_err; + + /* Read the RESTORE replies. */ + int error_from_target = 0; + int socket_error = 0; + int del_idx = 1; /* Index of the key argument for the replicated DEL op. */ + + if (!copy) newargv = zmalloc(sizeof(robj*)*(num_keys+1)); + + for (j = 0; j < num_keys; j++) { + if (syncReadLine(cs->fd, buf2, sizeof(buf2), timeout) <= 0) { + socket_error = 1; + break; + } + if ((select && buf1[0] == '-') || buf2[0] == '-') { + /* On error assume that last_dbid is no longer valid. */ + if (!error_from_target) { + cs->last_dbid = -1; + addReplyErrorFormat(c,"Target instance replied with error: %s", + (select && buf1[0] == '-') ? buf1+1 : buf2+1); + error_from_target = 1; + } + } else { + if (!copy) { + /* No COPY option: remove the local key, signal the change. */ + dbDelete(c->db,kv[j]); + signalModifiedKey(c->db,kv[j]); + server.dirty++; + + /* Populate the argument vector to replace the old one. */ + newargv[del_idx++] = kv[j]; + incrRefCount(kv[j]); + } + } + } + + /* On socket error, if we want to retry, do it now before rewriting the + * command vector. We only retry if we are sure nothing was processed + * and we failed to read the first reply (j == 0 test). */ + if (!error_from_target && socket_error && j == 0 && may_retry && + errno != ETIMEDOUT) + { + goto socket_err; /* A retry is guaranteed because of tested conditions.*/ + } + + /* On socket errors, close the migration socket now that we still have + * the original host/port in the ARGV. Later the original command may be + * rewritten to DEL and will be too later. */ + if (socket_error) migrateCloseSocket(c->argv[1],c->argv[2]); + + if (!copy) { + /* Translate MIGRATE as DEL for replication/AOF. Note that we do + * this only for the keys for which we received an acknowledgement + * from the receiving Redis server, by using the del_idx index. */ + if (del_idx > 1) { + newargv[0] = createStringObject("DEL",3); + /* Note that the following call takes ownership of newargv. */ + replaceClientCommandVector(c,del_idx,newargv); + argv_rewritten = 1; + } else { + /* No key transfer acknowledged, no need to rewrite as DEL. */ + zfree(newargv); + } + newargv = NULL; /* Make it safe to call zfree() on it in the future. */ + } + + /* If we are here and a socket error happened, we don't want to retry. + * Just signal the problem to the client, but only do it if we did not + * already queue a different error reported by the destination server. */ + if (!error_from_target && socket_error) { + may_retry = 0; + goto socket_err; + } + + if (!error_from_target) { + /* Success! Update the last_dbid in migrateCachedSocket, so that we can + * avoid SELECT the next time if the target DB is the same. Reply +OK. + * + * Note: If we reached this point, even if socket_error is true + * still the SELECT command succeeded (otherwise the code jumps to + * socket_err label. */ + cs->last_dbid = dbid; + addReply(c,shared.ok); + } else { + /* On error we already sent it in the for loop above, and set + * the curretly selected socket to -1 to force SELECT the next time. */ + } + + sdsfree(cmd.io.buffer.ptr); + zfree(ov); zfree(kv); zfree(newargv); + return; + +/* On socket errors we try to close the cached socket and try again. + * It is very common for the cached socket to get closed, if just reopening + * it works it's a shame to notify the error to the caller. */ +socket_err: + /* Cleanup we want to perform in both the retry and no retry case. + * Note: Closing the migrate socket will also force SELECT next time. */ + sdsfree(cmd.io.buffer.ptr); + + /* If the command was rewritten as DEL and there was a socket error, + * we already closed the socket earlier. While migrateCloseSocket() + * is idempotent, the host/port arguments are now gone, so don't do it + * again. */ + if (!argv_rewritten) migrateCloseSocket(c->argv[1],c->argv[2]); + zfree(newargv); + newargv = NULL; /* This will get reallocated on retry. */ + + /* Retry only if it's not a timeout and we never attempted a retry + * (or the code jumping here did not set may_retry to zero). */ + if (errno != ETIMEDOUT && may_retry) { + may_retry = 0; + goto try_again; + } + + /* Cleanup we want to do if no retry is attempted. */ + zfree(ov); zfree(kv); + addReplySds(c, + sdscatprintf(sdsempty(), + "-IOERR error or timeout %s to target instance\r\n", + write_error ? "writing" : "reading")); + return; +} + +/* ----------------------------------------------------------------------------- + * Cluster functions related to serving / redirecting clients + * -------------------------------------------------------------------------- */ + +/* The ASKING command is required after a -ASK redirection. + * The client should issue ASKING before to actually send the command to + * the target instance. See the Redis Cluster specification for more + * information. */ +void askingCommand(client *c) { + if (server.cluster_enabled == 0) { + addReplyError(c,"This instance has cluster support disabled"); + return; + } + c->flags |= CLIENT_ASKING; + addReply(c,shared.ok); +} + +/* The READONLY command is used by clients to enter the read-only mode. + * In this mode slaves will not redirect clients as long as clients access + * with read-only commands to keys that are served by the slave's master. */ +void readonlyCommand(client *c) { + if (server.cluster_enabled == 0) { + addReplyError(c,"This instance has cluster support disabled"); + return; + } + c->flags |= CLIENT_READONLY; + addReply(c,shared.ok); +} + +/* The READWRITE command just clears the READONLY command state. */ +void readwriteCommand(client *c) { + c->flags &= ~CLIENT_READONLY; + addReply(c,shared.ok); +} + +/* Return the pointer to the cluster node that is able to serve the command. + * For the function to succeed the command should only target either: + * + * 1) A single key (even multiple times like LPOPRPUSH mylist mylist). + * 2) Multiple keys in the same hash slot, while the slot is stable (no + * resharding in progress). + * + * On success the function returns the node that is able to serve the request. + * If the node is not 'myself' a redirection must be perfomed. The kind of + * redirection is specified setting the integer passed by reference + * 'error_code', which will be set to CLUSTER_REDIR_ASK or + * CLUSTER_REDIR_MOVED. + * + * When the node is 'myself' 'error_code' is set to CLUSTER_REDIR_NONE. + * + * If the command fails NULL is returned, and the reason of the failure is + * provided via 'error_code', which will be set to: + * + * CLUSTER_REDIR_CROSS_SLOT if the request contains multiple keys that + * don't belong to the same hash slot. + * + * CLUSTER_REDIR_UNSTABLE if the request contains multiple keys + * belonging to the same slot, but the slot is not stable (in migration or + * importing state, likely because a resharding is in progress). + * + * CLUSTER_REDIR_DOWN_UNBOUND if the request addresses a slot which is + * not bound to any node. In this case the cluster global state should be + * already "down" but it is fragile to rely on the update of the global state, + * so we also handle it here. + * + * CLUSTER_REDIR_DOWN_STATE if the cluster is down but the user attempts to + * execute a command that addresses one or more keys. */ +clusterNode *getNodeByQuery(client *c, struct redisCommand *cmd, robj **argv, int argc, int *hashslot, int *error_code) { + clusterNode *n = NULL; + robj *firstkey = NULL; + int multiple_keys = 0; + multiState *ms, _ms; + multiCmd mc; + int i, slot = 0, migrating_slot = 0, importing_slot = 0, missing_keys = 0; + + /* Set error code optimistically for the base case. */ + if (error_code) *error_code = CLUSTER_REDIR_NONE; + + /* We handle all the cases as if they were EXEC commands, so we have + * a common code path for everything */ + if (cmd->proc == execCommand) { + /* If CLIENT_MULTI flag is not set EXEC is just going to return an + * error. */ + if (!(c->flags & CLIENT_MULTI)) return myself; + ms = &c->mstate; + } else { + /* In order to have a single codepath create a fake Multi State + * structure if the client is not in MULTI/EXEC state, this way + * we have a single codepath below. */ + ms = &_ms; + _ms.commands = &mc; + _ms.count = 1; + mc.argv = argv; + mc.argc = argc; + mc.cmd = cmd; + } + + /* Check that all the keys are in the same hash slot, and obtain this + * slot and the node associated. */ + for (i = 0; i < ms->count; i++) { + struct redisCommand *mcmd; + robj **margv; + int margc, *keyindex, numkeys, j; + + mcmd = ms->commands[i].cmd; + margc = ms->commands[i].argc; + margv = ms->commands[i].argv; + + keyindex = getKeysFromCommand(mcmd,margv,margc,&numkeys); + for (j = 0; j < numkeys; j++) { + robj *thiskey = margv[keyindex[j]]; + int thisslot = keyHashSlot((char*)thiskey->ptr, + sdslen(thiskey->ptr)); + + if (firstkey == NULL) { + /* This is the first key we see. Check what is the slot + * and node. */ + firstkey = thiskey; + slot = thisslot; + n = server.cluster->slots[slot]; + + /* Error: If a slot is not served, we are in "cluster down" + * state. However the state is yet to be updated, so this was + * not trapped earlier in processCommand(). Report the same + * error to the client. */ + if (n == NULL) { + getKeysFreeResult(keyindex); + if (error_code) + *error_code = CLUSTER_REDIR_DOWN_UNBOUND; + return NULL; + } + + /* If we are migrating or importing this slot, we need to check + * if we have all the keys in the request (the only way we + * can safely serve the request, otherwise we return a TRYAGAIN + * error). To do so we set the importing/migrating state and + * increment a counter for every missing key. */ + if (n == myself && + server.cluster->migrating_slots_to[slot] != NULL) + { + migrating_slot = 1; + } else if (server.cluster->importing_slots_from[slot] != NULL) { + importing_slot = 1; + } + } else { + /* If it is not the first key, make sure it is exactly + * the same key as the first we saw. */ + if (!equalStringObjects(firstkey,thiskey)) { + if (slot != thisslot) { + /* Error: multiple keys from different slots. */ + getKeysFreeResult(keyindex); + if (error_code) + *error_code = CLUSTER_REDIR_CROSS_SLOT; + return NULL; + } else { + /* Flag this request as one with multiple different + * keys. */ + multiple_keys = 1; + } + } + } + + /* Migarting / Improrting slot? Count keys we don't have. */ + if ((migrating_slot || importing_slot) && + lookupKeyRead(&server.db[0],thiskey) == NULL) + { + missing_keys++; + } + } + getKeysFreeResult(keyindex); + } + + /* No key at all in command? then we can serve the request + * without redirections or errors in all the cases. */ + if (n == NULL) return myself; + + /* Cluster is globally down but we got keys? We can't serve the request. */ + if (server.cluster->state != CLUSTER_OK) { + if (error_code) *error_code = CLUSTER_REDIR_DOWN_STATE; + return NULL; + } + + /* Return the hashslot by reference. */ + if (hashslot) *hashslot = slot; + + /* MIGRATE always works in the context of the local node if the slot + * is open (migrating or importing state). We need to be able to freely + * move keys among instances in this case. */ + if ((migrating_slot || importing_slot) && cmd->proc == migrateCommand) + return myself; + + /* If we don't have all the keys and we are migrating the slot, send + * an ASK redirection. */ + if (migrating_slot && missing_keys) { + if (error_code) *error_code = CLUSTER_REDIR_ASK; + return server.cluster->migrating_slots_to[slot]; + } + + /* If we are receiving the slot, and the client correctly flagged the + * request as "ASKING", we can serve the request. However if the request + * involves multiple keys and we don't have them all, the only option is + * to send a TRYAGAIN error. */ + if (importing_slot && + (c->flags & CLIENT_ASKING || cmd->flags & CMD_ASKING)) + { + if (multiple_keys && missing_keys) { + if (error_code) *error_code = CLUSTER_REDIR_UNSTABLE; + return NULL; + } else { + return myself; + } + } + + /* Handle the read-only client case reading from a slave: if this + * node is a slave and the request is about an hash slot our master + * is serving, we can reply without redirection. */ + if (c->flags & CLIENT_READONLY && + cmd->flags & CMD_READONLY && + nodeIsSlave(myself) && + myself->slaveof == n) + { + return myself; + } + + /* Base case: just return the right node. However if this node is not + * myself, set error_code to MOVED since we need to issue a rediretion. */ + if (n != myself && error_code) *error_code = CLUSTER_REDIR_MOVED; + return n; +} + +/* Send the client the right redirection code, according to error_code + * that should be set to one of CLUSTER_REDIR_* macros. + * + * If CLUSTER_REDIR_ASK or CLUSTER_REDIR_MOVED error codes + * are used, then the node 'n' should not be NULL, but should be the + * node we want to mention in the redirection. Moreover hashslot should + * be set to the hash slot that caused the redirection. */ +void clusterRedirectClient(client *c, clusterNode *n, int hashslot, int error_code) { + if (error_code == CLUSTER_REDIR_CROSS_SLOT) { + addReplySds(c,sdsnew("-CROSSSLOT Keys in request don't hash to the same slot\r\n")); + } else if (error_code == CLUSTER_REDIR_UNSTABLE) { + /* The request spawns mutliple keys in the same slot, + * but the slot is not "stable" currently as there is + * a migration or import in progress. */ + addReplySds(c,sdsnew("-TRYAGAIN Multiple keys request during rehashing of slot\r\n")); + } else if (error_code == CLUSTER_REDIR_DOWN_STATE) { + addReplySds(c,sdsnew("-CLUSTERDOWN The cluster is down\r\n")); + } else if (error_code == CLUSTER_REDIR_DOWN_UNBOUND) { + addReplySds(c,sdsnew("-CLUSTERDOWN Hash slot not served\r\n")); + } else if (error_code == CLUSTER_REDIR_MOVED || + error_code == CLUSTER_REDIR_ASK) + { + addReplySds(c,sdscatprintf(sdsempty(), + "-%s %d %s:%d\r\n", + (error_code == CLUSTER_REDIR_ASK) ? "ASK" : "MOVED", + hashslot,n->ip,n->port)); + } else { + serverPanic("getNodeByQuery() unknown error."); + } +} + +/* This function is called by the function processing clients incrementally + * to detect timeouts, in order to handle the following case: + * + * 1) A client blocks with BLPOP or similar blocking operation. + * 2) The master migrates the hash slot elsewhere or turns into a slave. + * 3) The client may remain blocked forever (or up to the max timeout time) + * waiting for a key change that will never happen. + * + * If the client is found to be blocked into an hash slot this node no + * longer handles, the client is sent a redirection error, and the function + * returns 1. Otherwise 0 is returned and no operation is performed. */ +int clusterRedirectBlockedClientIfNeeded(client *c) { + if (c->flags & CLIENT_BLOCKED && c->btype == BLOCKED_LIST) { + dictEntry *de; + dictIterator *di; + + /* If the cluster is down, unblock the client with the right error. */ + if (server.cluster->state == CLUSTER_FAIL) { + clusterRedirectClient(c,NULL,0,CLUSTER_REDIR_DOWN_STATE); + return 1; + } + + di = dictGetIterator(c->bpop.keys); + while((de = dictNext(di)) != NULL) { + robj *key = dictGetKey(de); + int slot = keyHashSlot((char*)key->ptr, sdslen(key->ptr)); + clusterNode *node = server.cluster->slots[slot]; + + /* We send an error and unblock the client if: + * 1) The slot is unassigned, emitting a cluster down error. + * 2) The slot is not handled by this node, nor being imported. */ + if (node != myself && + server.cluster->importing_slots_from[slot] == NULL) + { + if (node == NULL) { + clusterRedirectClient(c,NULL,0, + CLUSTER_REDIR_DOWN_UNBOUND); + } else { + clusterRedirectClient(c,node,slot, + CLUSTER_REDIR_MOVED); + } + return 1; + } + } + dictReleaseIterator(di); + } + return 0; +} diff --git a/tree-sitter-c/examples/malloc.c b/tree-sitter-c/examples/malloc.c new file mode 100644 index 0000000..d5ee428 --- /dev/null +++ b/tree-sitter-c/examples/malloc.c @@ -0,0 +1,532 @@ +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include +#include "libc.h" +#include "atomic.h" +#include "pthread_impl.h" + +#if defined(__GNUC__) && defined(__PIC__) +#define inline inline __attribute__((always_inline)) +#endif + +void *__mmap(void *, size_t, int, int, int, off_t); +int __munmap(void *, size_t); +void *__mremap(void *, size_t, size_t, int, ...); +int __madvise(void *, size_t, int); + +struct chunk { + size_t psize, csize; + struct chunk *next, *prev; +}; + +struct bin { + volatile int lock[2]; + struct chunk *head; + struct chunk *tail; +}; + +static struct { + volatile uint64_t binmap; + struct bin bins[64]; + volatile int free_lock[2]; +} mal; + + +#define SIZE_ALIGN (4*sizeof(size_t)) +#define SIZE_MASK (-SIZE_ALIGN) +#define OVERHEAD (2*sizeof(size_t)) +#define MMAP_THRESHOLD (0x1c00*SIZE_ALIGN) +#define DONTCARE 16 +#define RECLAIM 163840 + +#define CHUNK_SIZE(c) ((c)->csize & -2) +#define CHUNK_PSIZE(c) ((c)->psize & -2) +#define PREV_CHUNK(c) ((struct chunk *)((char *)(c) - CHUNK_PSIZE(c))) +#define NEXT_CHUNK(c) ((struct chunk *)((char *)(c) + CHUNK_SIZE(c))) +#define MEM_TO_CHUNK(p) (struct chunk *)((char *)(p) - OVERHEAD) +#define CHUNK_TO_MEM(c) (void *)((char *)(c) + OVERHEAD) +#define BIN_TO_CHUNK(i) (MEM_TO_CHUNK(&mal.bins[i].head)) + +#define C_INUSE ((size_t)1) + +#define IS_MMAPPED(c) !((c)->csize & (C_INUSE)) + + +/* Synchronization tools */ + +static inline void lock(volatile int *lk) +{ + if (libc.threads_minus_1) + while(a_swap(lk, 1)) __wait(lk, lk+1, 1, 1); +} + +static inline void unlock(volatile int *lk) +{ + if (lk[0]) { + a_store(lk, 0); + if (lk[1]) __wake(lk, 1, 1); + } +} + +static inline void lock_bin(int i) +{ + lock(mal.bins[i].lock); + if (!mal.bins[i].head) + mal.bins[i].head = mal.bins[i].tail = BIN_TO_CHUNK(i); +} + +static inline void unlock_bin(int i) +{ + unlock(mal.bins[i].lock); +} + +static int first_set(uint64_t x) +{ +#if 1 + return a_ctz_64(x); +#else + static const char debruijn64[64] = { + 0, 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28, + 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11, + 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10, + 51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12 + }; + static const char debruijn32[32] = { + 0, 1, 23, 2, 29, 24, 19, 3, 30, 27, 25, 11, 20, 8, 4, 13, + 31, 22, 28, 18, 26, 10, 7, 12, 21, 17, 9, 6, 16, 5, 15, 14 + }; + if (sizeof(long) < 8) { + uint32_t y = x; + if (!y) { + y = x>>32; + return 32 + debruijn32[(y&-y)*0x076be629 >> 27]; + } + return debruijn32[(y&-y)*0x076be629 >> 27]; + } + return debruijn64[(x&-x)*0x022fdd63cc95386dull >> 58]; +#endif +} + +static const unsigned char bin_tab[60] = { + 32,33,34,35,36,36,37,37,38,38,39,39, + 40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43, + 44,44,44,44,44,44,44,44,45,45,45,45,45,45,45,45, + 46,46,46,46,46,46,46,46,47,47,47,47,47,47,47,47, +}; + +static int bin_index(size_t x) +{ + x = x / SIZE_ALIGN - 1; + if (x <= 32) return x; + if (x < 512) return bin_tab[x/8-4]; + if (x > 0x1c00) return 63; + return bin_tab[x/128-4] + 16; +} + +static int bin_index_up(size_t x) +{ + x = x / SIZE_ALIGN - 1; + if (x <= 32) return x; + x--; + if (x < 512) return bin_tab[x/8-4] + 1; + return bin_tab[x/128-4] + 17; +} + +#if 0 +void __dump_heap(int x) +{ + struct chunk *c; + int i; + for (c = (void *)mal.heap; CHUNK_SIZE(c); c = NEXT_CHUNK(c)) + fprintf(stderr, "base %p size %zu (%d) flags %d/%d\n", + c, CHUNK_SIZE(c), bin_index(CHUNK_SIZE(c)), + c->csize & 15, + NEXT_CHUNK(c)->psize & 15); + for (i=0; i<64; i++) { + if (mal.bins[i].head != BIN_TO_CHUNK(i) && mal.bins[i].head) { + fprintf(stderr, "bin %d: %p\n", i, mal.bins[i].head); + if (!(mal.binmap & 1ULL<psize = 0 | C_INUSE; + } + + /* Record new heap end and fill in footer. */ + end = (char *)p + n; + w = MEM_TO_CHUNK(end); + w->psize = n | C_INUSE; + w->csize = 0 | C_INUSE; + + /* Fill in header, which may be new or may be replacing a + * zero-size sentinel header at the old end-of-heap. */ + w = MEM_TO_CHUNK(p); + w->csize = n | C_INUSE; + + unlock(heap_lock); + + return w; +} + +static int adjust_size(size_t *n) +{ + /* Result of pointer difference must fit in ptrdiff_t. */ + if (*n-1 > PTRDIFF_MAX - SIZE_ALIGN - PAGE_SIZE) { + if (*n) { + errno = ENOMEM; + return -1; + } else { + *n = SIZE_ALIGN; + return 0; + } + } + *n = (*n + OVERHEAD + SIZE_ALIGN - 1) & SIZE_MASK; + return 0; +} + +static void unbin(struct chunk *c, int i) +{ + if (c->prev == c->next) + a_and_64(&mal.binmap, ~(1ULL<prev->next = c->next; + c->next->prev = c->prev; + c->csize |= C_INUSE; + NEXT_CHUNK(c)->psize |= C_INUSE; +} + +static int alloc_fwd(struct chunk *c) +{ + int i; + size_t k; + while (!((k=c->csize) & C_INUSE)) { + i = bin_index(k); + lock_bin(i); + if (c->csize == k) { + unbin(c, i); + unlock_bin(i); + return 1; + } + unlock_bin(i); + } + return 0; +} + +static int alloc_rev(struct chunk *c) +{ + int i; + size_t k; + while (!((k=c->psize) & C_INUSE)) { + i = bin_index(k); + lock_bin(i); + if (c->psize == k) { + unbin(PREV_CHUNK(c), i); + unlock_bin(i); + return 1; + } + unlock_bin(i); + } + return 0; +} + + +/* pretrim - trims a chunk _prior_ to removing it from its bin. + * Must be called with i as the ideal bin for size n, j the bin + * for the _free_ chunk self, and bin j locked. */ +static int pretrim(struct chunk *self, size_t n, int i, int j) +{ + size_t n1; + struct chunk *next, *split; + + /* We cannot pretrim if it would require re-binning. */ + if (j < 40) return 0; + if (j < i+3) { + if (j != 63) return 0; + n1 = CHUNK_SIZE(self); + if (n1-n <= MMAP_THRESHOLD) return 0; + } else { + n1 = CHUNK_SIZE(self); + } + if (bin_index(n1-n) != j) return 0; + + next = NEXT_CHUNK(self); + split = (void *)((char *)self + n); + + split->prev = self->prev; + split->next = self->next; + split->prev->next = split; + split->next->prev = split; + split->psize = n | C_INUSE; + split->csize = n1-n; + next->psize = n1-n; + self->csize = n | C_INUSE; + return 1; +} + +static void trim(struct chunk *self, size_t n) +{ + size_t n1 = CHUNK_SIZE(self); + struct chunk *next, *split; + + if (n >= n1 - DONTCARE) return; + + next = NEXT_CHUNK(self); + split = (void *)((char *)self + n); + + split->psize = n | C_INUSE; + split->csize = n1-n | C_INUSE; + next->psize = n1-n | C_INUSE; + self->csize = n | C_INUSE; + + free(CHUNK_TO_MEM(split)); +} + +void *malloc(size_t n) +{ + struct chunk *c; + int i, j; + + if (adjust_size(&n) < 0) return 0; + + if (n > MMAP_THRESHOLD) { + size_t len = n + OVERHEAD + PAGE_SIZE - 1 & -PAGE_SIZE; + char *base = __mmap(0, len, PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); + if (base == (void *)-1) return 0; + c = (void *)(base + SIZE_ALIGN - OVERHEAD); + c->csize = len - (SIZE_ALIGN - OVERHEAD); + c->psize = SIZE_ALIGN - OVERHEAD; + return CHUNK_TO_MEM(c); + } + + i = bin_index_up(n); + for (;;) { + uint64_t mask = mal.binmap & -(1ULL<psize = c->csize = + x->csize + CHUNK_SIZE(c); + } + break; + } + j = first_set(mask); + lock_bin(j); + c = mal.bins[j].head; + if (c != BIN_TO_CHUNK(j)) { + if (!pretrim(c, n, i, j)) unbin(c, j); + unlock_bin(j); + break; + } + unlock_bin(j); + } + + /* Now patch up in case we over-allocated */ + trim(c, n); + + return CHUNK_TO_MEM(c); +} + +void *__malloc0(size_t n) +{ + void *p = malloc(n); + if (p && !IS_MMAPPED(MEM_TO_CHUNK(p))) { + size_t *z; + n = (n + sizeof *z - 1)/sizeof *z; + for (z=p; n; n--, z++) if (*z) *z=0; + } + return p; +} + +void *realloc(void *p, size_t n) +{ + struct chunk *self, *next; + size_t n0, n1; + void *new; + + if (!p) return malloc(n); + + if (adjust_size(&n) < 0) return 0; + + self = MEM_TO_CHUNK(p); + n1 = n0 = CHUNK_SIZE(self); + + if (IS_MMAPPED(self)) { + size_t extra = self->psize; + char *base = (char *)self - extra; + size_t oldlen = n0 + extra; + size_t newlen = n + extra; + /* Crash on realloc of freed chunk */ + if (extra & 1) a_crash(); + if (newlen < PAGE_SIZE && (new = malloc(n))) { + memcpy(new, p, n-OVERHEAD); + free(p); + return new; + } + newlen = (newlen + PAGE_SIZE-1) & -PAGE_SIZE; + if (oldlen == newlen) return p; + base = __mremap(base, oldlen, newlen, MREMAP_MAYMOVE); + if (base == (void *)-1) + goto copy_realloc; + self = (void *)(base + extra); + self->csize = newlen - extra; + return CHUNK_TO_MEM(self); + } + + next = NEXT_CHUNK(self); + + /* Crash on corrupted footer (likely from buffer overflow) */ + if (next->psize != self->csize) a_crash(); + + /* Merge adjacent chunks if we need more space. This is not + * a waste of time even if we fail to get enough space, because our + * subsequent call to free would otherwise have to do the merge. */ + if (n > n1 && alloc_fwd(next)) { + n1 += CHUNK_SIZE(next); + next = NEXT_CHUNK(next); + } + /* FIXME: find what's wrong here and reenable it..? */ + if (0 && n > n1 && alloc_rev(self)) { + self = PREV_CHUNK(self); + n1 += CHUNK_SIZE(self); + } + self->csize = n1 | C_INUSE; + next->psize = n1 | C_INUSE; + + /* If we got enough space, split off the excess and return */ + if (n <= n1) { + //memmove(CHUNK_TO_MEM(self), p, n0-OVERHEAD); + trim(self, n); + return CHUNK_TO_MEM(self); + } + +copy_realloc: + /* As a last resort, allocate a new chunk and copy to it. */ + new = malloc(n-OVERHEAD); + if (!new) return 0; + memcpy(new, p, n0-OVERHEAD); + free(CHUNK_TO_MEM(self)); + return new; +} + +void free(void *p) +{ + struct chunk *self = MEM_TO_CHUNK(p); + struct chunk *next; + size_t final_size, new_size, size; + int reclaim=0; + int i; + + if (!p) return; + + if (IS_MMAPPED(self)) { + size_t extra = self->psize; + char *base = (char *)self - extra; + size_t len = CHUNK_SIZE(self) + extra; + /* Crash on double free */ + if (extra & 1) a_crash(); + __munmap(base, len); + return; + } + + final_size = new_size = CHUNK_SIZE(self); + next = NEXT_CHUNK(self); + + /* Crash on corrupted footer (likely from buffer overflow) */ + if (next->psize != self->csize) a_crash(); + + for (;;) { + if (self->psize & next->csize & C_INUSE) { + self->csize = final_size | C_INUSE; + next->psize = final_size | C_INUSE; + i = bin_index(final_size); + lock_bin(i); + lock(mal.free_lock); + if (self->psize & next->csize & C_INUSE) + break; + unlock(mal.free_lock); + unlock_bin(i); + } + + if (alloc_rev(self)) { + self = PREV_CHUNK(self); + size = CHUNK_SIZE(self); + final_size += size; + if (new_size+size > RECLAIM && (new_size+size^size) > size) + reclaim = 1; + } + + if (alloc_fwd(next)) { + size = CHUNK_SIZE(next); + final_size += size; + if (new_size+size > RECLAIM && (new_size+size^size) > size) + reclaim = 1; + next = NEXT_CHUNK(next); + } + } + + if (!(mal.binmap & 1ULL<csize = final_size; + next->psize = final_size; + unlock(mal.free_lock); + + self->next = BIN_TO_CHUNK(i); + self->prev = mal.bins[i].tail; + self->next->prev = self; + self->prev->next = self; + + /* Replace middle of large chunks with fresh zero pages */ + if (reclaim) { + uintptr_t a = (uintptr_t)self + SIZE_ALIGN+PAGE_SIZE-1 & -PAGE_SIZE; + uintptr_t b = (uintptr_t)next - SIZE_ALIGN & -PAGE_SIZE; +#if 1 + __madvise((void *)a, b-a, MADV_DONTNEED); +#else + __mmap((void *)a, b-a, PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED, -1, 0); +#endif + } + + unlock_bin(i); +} diff --git a/tree-sitter-c/examples/parser.c b/tree-sitter-c/examples/parser.c new file mode 100644 index 0000000..2bb8638 --- /dev/null +++ b/tree-sitter-c/examples/parser.c @@ -0,0 +1,1283 @@ +#include "runtime/parser.h" +#include +#include +#include +#include +#include "tree_sitter/runtime.h" +#include "runtime/tree.h" +#include "runtime/lexer.h" +#include "runtime/length.h" +#include "runtime/array.h" +#include "runtime/language.h" +#include "runtime/alloc.h" +#include "runtime/reduce_action.h" +#include "runtime/error_costs.h" + +#define LOG(...) \ + if (self->lexer.logger.log) { \ + snprintf(self->lexer.debug_buffer, TS_DEBUG_BUFFER_SIZE, __VA_ARGS__); \ + self->lexer.logger.log(self->lexer.logger.payload, TSLogTypeParse, \ + self->lexer.debug_buffer); \ + } \ + if (self->print_debugging_graphs) { \ + fprintf(stderr, "graph {\nlabel=\""); \ + fprintf(stderr, __VA_ARGS__); \ + fprintf(stderr, "\"\n}\n\n"); \ + } + +#define LOG_STACK() \ + if (self->print_debugging_graphs) { \ + ts_stack_print_dot_graph(self->stack, self->language->symbol_names, \ + stderr); \ + fputs("\n\n", stderr); \ + } + +#define LOG_TREE() \ + if (self->print_debugging_graphs) { \ + ts_tree_print_dot_graph(self->finished_tree, self->language, stderr); \ + fputs("\n", stderr); \ + } + +#define SYM_NAME(symbol) ts_language_symbol_name(self->language, symbol) + +typedef struct { + Parser *parser; + TSSymbol lookahead_symbol; + TreeArray *trees_above_error; + uint32_t tree_count_above_error; + bool found_repair; + ReduceAction best_repair; + TSStateId best_repair_next_state; + uint32_t best_repair_skip_count; +} ErrorRepairSession; + +typedef struct { + Parser *parser; + TSSymbol lookahead_symbol; +} SkipPrecedingTreesSession; + +static void parser__push(Parser *self, StackVersion version, Tree *tree, + TSStateId state) { + ts_stack_push(self->stack, version, tree, false, state); + ts_tree_release(tree); +} + +static bool parser__breakdown_top_of_stack(Parser *self, StackVersion version) { + bool did_break_down = false; + bool pending = false; + + do { + StackPopResult pop = ts_stack_pop_pending(self->stack, version); + if (!pop.slices.size) + break; + + did_break_down = true; + pending = false; + for (uint32_t i = 0; i < pop.slices.size; i++) { + StackSlice slice = pop.slices.contents[i]; + TSStateId state = ts_stack_top_state(self->stack, slice.version); + Tree *parent = *array_front(&slice.trees); + + for (uint32_t j = 0; j < parent->child_count; j++) { + Tree *child = parent->children[j]; + pending = child->child_count > 0; + + if (child->symbol == ts_builtin_sym_error) { + state = ERROR_STATE; + } else if (!child->extra) { + state = ts_language_next_state(self->language, state, child->symbol); + } + + ts_stack_push(self->stack, slice.version, child, pending, state); + } + + for (uint32_t j = 1; j < slice.trees.size; j++) { + Tree *tree = slice.trees.contents[j]; + parser__push(self, slice.version, tree, state); + } + + LOG("breakdown_top_of_stack tree:%s", SYM_NAME(parent->symbol)); + LOG_STACK(); + + ts_stack_decrease_push_count(self->stack, slice.version, + parent->child_count + 1); + ts_tree_release(parent); + array_delete(&slice.trees); + } + } while (pending); + + return did_break_down; +} + +static bool parser__breakdown_lookahead(Parser *self, Tree **lookahead, + TSStateId state, + ReusableNode *reusable_node) { + bool result = false; + while (reusable_node->tree->child_count > 0 && + (self->is_split || reusable_node->tree->parse_state != state || + reusable_node->tree->fragile_left || + reusable_node->tree->fragile_right)) { + LOG("state_mismatch sym:%s", SYM_NAME(reusable_node->tree->symbol)); + reusable_node_breakdown(reusable_node); + result = true; + } + + if (result) { + ts_tree_release(*lookahead); + ts_tree_retain(*lookahead = reusable_node->tree); + } + + return result; +} + +static inline bool ts_lex_mode_eq(TSLexMode self, TSLexMode other) { + return self.lex_state == other.lex_state && + self.external_lex_state == other.external_lex_state; +} + +static bool parser__can_reuse(Parser *self, TSStateId state, Tree *tree, + TableEntry *table_entry) { + TSLexMode current_lex_mode = self->language->lex_modes[state]; + if (ts_lex_mode_eq(tree->first_leaf.lex_mode, current_lex_mode)) + return true; + if (current_lex_mode.external_lex_state != 0) + return false; + if (tree->size.bytes == 0) + return false; + if (!table_entry->is_reusable) + return false; + if (!table_entry->depends_on_lookahead) + return true; + return tree->child_count > 1 && tree->error_cost == 0; +} + +typedef int CondenseResult; +static int CondenseResultMadeChange = 1; +static int CondenseResultAllVersionsHadError = 2; + +static CondenseResult parser__condense_stack(Parser *self) { + CondenseResult result = 0; + bool has_version_without_errors = false; + + for (StackVersion i = 0; i < ts_stack_version_count(self->stack); i++) { + if (ts_stack_is_halted(self->stack, i)) { + ts_stack_remove_version(self->stack, i); + result |= CondenseResultMadeChange; + i--; + continue; + } + + ErrorStatus error_status = ts_stack_error_status(self->stack, i); + if (error_status.count == 0) has_version_without_errors = true; + + for (StackVersion j = 0; j < i; j++) { + if (ts_stack_merge(self->stack, j, i)) { + result |= CondenseResultMadeChange; + i--; + break; + } + + switch (error_status_compare(error_status, + ts_stack_error_status(self->stack, j))) { + case -1: + ts_stack_remove_version(self->stack, j); + result |= CondenseResultMadeChange; + i--; + j--; + break; + case 1: + ts_stack_remove_version(self->stack, i); + result |= CondenseResultMadeChange; + i--; + break; + } + } + } + + if (!has_version_without_errors && ts_stack_version_count(self->stack) > 0) { + result |= CondenseResultAllVersionsHadError; + } + + return result; +} + +static void parser__restore_external_scanner(Parser *self, StackVersion version) { + const TSExternalTokenState *state = ts_stack_external_token_state(self->stack, version); + if (self->lexer.last_external_token_state != state) { + LOG("restore_external_scanner"); + self->lexer.last_external_token_state = state; + if (state) { + self->language->external_scanner.deserialize( + self->external_scanner_payload, + *state + ); + } else { + self->language->external_scanner.reset(self->external_scanner_payload); + } + } +} + +static Tree *parser__lex(Parser *self, StackVersion version) { + TSStateId parse_state = ts_stack_top_state(self->stack, version); + Length start_position = ts_stack_top_position(self->stack, version); + TSLexMode lex_mode = self->language->lex_modes[parse_state]; + const bool *valid_external_tokens = ts_language_enabled_external_tokens( + self->language, + lex_mode.external_lex_state + ); + + bool found_external_token = false; + bool found_error = false; + bool skipped_error = false; + int32_t first_error_character = 0; + Length error_start_position, error_end_position; + ts_lexer_reset(&self->lexer, start_position); + + for (;;) { + Length current_position = self->lexer.current_position; + + if (valid_external_tokens) { + LOG("lex_external state:%d, row:%u, column:%u", lex_mode.external_lex_state, + current_position.extent.row, current_position.extent.column); + parser__restore_external_scanner(self, version); + ts_lexer_start(&self->lexer); + if (self->language->external_scanner.scan(self->external_scanner_payload, + &self->lexer.data, valid_external_tokens)) { + if (length_has_unknown_chars(self->lexer.token_end_position)) { + self->lexer.token_end_position = self->lexer.current_position; + } + if (lex_mode.lex_state != 0 || + self->lexer.token_end_position.bytes > current_position.bytes) { + found_external_token = true; + break; + } + } + ts_lexer_reset(&self->lexer, current_position); + } + + LOG("lex_internal state:%d, row:%u, column:%u", lex_mode.lex_state, + current_position.extent.row, current_position.extent.column); + ts_lexer_start(&self->lexer); + if (self->language->lex_fn(&self->lexer.data, lex_mode.lex_state)) { + if (length_has_unknown_chars(self->lexer.token_end_position)) { + self->lexer.token_end_position = self->lexer.current_position; + } + break; + } + + if (!found_error) { + LOG("retry_in_error_mode"); + found_error = true; + lex_mode = self->language->lex_modes[ERROR_STATE]; + valid_external_tokens = ts_language_enabled_external_tokens( + self->language, + lex_mode.external_lex_state + ); + ts_lexer_reset(&self->lexer, start_position); + continue; + } + + if (!skipped_error) { + LOG("skip_unrecognized_character"); + skipped_error = true; + error_start_position = self->lexer.token_start_position; + error_end_position = self->lexer.token_start_position; + first_error_character = self->lexer.data.lookahead; + } + + if (self->lexer.current_position.bytes == error_end_position.bytes) { + if (self->lexer.data.lookahead == 0) { + self->lexer.data.result_symbol = ts_builtin_sym_error; + break; + } + self->lexer.data.advance(&self->lexer, false); + } + + error_end_position = self->lexer.current_position; + } + + Tree *result; + if (skipped_error) { + Length padding = length_sub(error_start_position, start_position); + Length size = length_sub(error_end_position, error_start_position); + result = ts_tree_make_error(size, padding, first_error_character); + } else { + TSSymbol symbol = self->lexer.data.result_symbol; + if (found_external_token) { + symbol = self->language->external_scanner.symbol_map[symbol]; + } + + Length padding = length_sub(self->lexer.token_start_position, start_position); + Length size = length_sub(self->lexer.token_end_position, self->lexer.token_start_position); + TSSymbolMetadata metadata = ts_language_symbol_metadata(self->language, symbol); + result = ts_tree_make_leaf(symbol, padding, size, metadata); + + if (found_external_token) { + result->has_external_tokens = true; + result->has_external_token_state = true; + memset(result->external_token_state, 0, sizeof(TSExternalTokenState)); + self->language->external_scanner.serialize(self->external_scanner_payload, result->external_token_state); + self->lexer.last_external_token_state = &result->external_token_state; + } + } + + result->bytes_scanned = self->lexer.current_position.bytes - start_position.bytes + 1; + result->parse_state = parse_state; + result->first_leaf.lex_mode = lex_mode; + + LOG("lexed_lookahead sym:%s, size:%u", SYM_NAME(result->symbol), result->size.bytes); + return result; +} + +static void parser__clear_cached_token(Parser *self) { + ts_tree_release(self->cached_token); + self->cached_token = NULL; +} + +static Tree *parser__get_lookahead(Parser *self, StackVersion version, + ReusableNode *reusable_node, + bool *is_fresh) { + Length position = ts_stack_top_position(self->stack, version); + + while (reusable_node->tree) { + if (reusable_node->byte_index > position.bytes) { + LOG("before_reusable_node sym:%s", SYM_NAME(reusable_node->tree->symbol)); + break; + } + + if (reusable_node->byte_index < position.bytes) { + LOG("past_reusable sym:%s", SYM_NAME(reusable_node->tree->symbol)); + reusable_node_pop(reusable_node); + continue; + } + + if (reusable_node->tree->has_changes) { + LOG("cant_reuse_changed tree:%s, size:%u", + SYM_NAME(reusable_node->tree->symbol), + reusable_node->tree->size.bytes); + if (!reusable_node_breakdown(reusable_node)) { + reusable_node_pop(reusable_node); + parser__breakdown_top_of_stack(self, version); + } + continue; + } + + if (reusable_node->tree->symbol == ts_builtin_sym_error) { + LOG("cant_reuse_error tree:%s, size:%u", + SYM_NAME(reusable_node->tree->symbol), + reusable_node->tree->size.bytes); + if (!reusable_node_breakdown(reusable_node)) { + reusable_node_pop(reusable_node); + parser__breakdown_top_of_stack(self, version); + } + continue; + } + + if (!ts_external_token_state_eq( + reusable_node->preceding_external_token_state, + ts_stack_external_token_state(self->stack, version))) { + LOG("cant_reuse_external_tokens tree:%s, size:%u", + SYM_NAME(reusable_node->tree->symbol), + reusable_node->tree->size.bytes); + if (!reusable_node_breakdown(reusable_node)) { + reusable_node_pop(reusable_node); + parser__breakdown_top_of_stack(self, version); + } + continue; + } + + Tree *result = reusable_node->tree; + ts_tree_retain(result); + return result; + } + + if (self->cached_token && position.bytes == self->cached_token_byte_index) { + ts_tree_retain(self->cached_token); + return self->cached_token; + } + + *is_fresh = true; + return parser__lex(self, version); +} + +static bool parser__select_tree(Parser *self, Tree *left, Tree *right) { + if (!left) + return true; + if (!right) + return false; + if (right->error_cost < left->error_cost) { + LOG("select_smaller_error symbol:%s, over_symbol:%s", + SYM_NAME(right->symbol), SYM_NAME(left->symbol)); + return true; + } + if (left->error_cost < right->error_cost) { + LOG("select_smaller_error symbol:%s, over_symbol:%s", + SYM_NAME(left->symbol), SYM_NAME(right->symbol)); + return false; + } + + int comparison = ts_tree_compare(left, right); + switch (comparison) { + case -1: + LOG("select_earlier symbol:%s, over_symbol:%s", SYM_NAME(left->symbol), + SYM_NAME(right->symbol)); + return false; + break; + case 1: + LOG("select_earlier symbol:%s, over_symbol:%s", SYM_NAME(right->symbol), + SYM_NAME(left->symbol)); + return true; + default: + LOG("select_existing symbol:%s, over_symbol:%s", SYM_NAME(left->symbol), + SYM_NAME(right->symbol)); + return false; + } +} + +static bool parser__better_version_exists(Parser *self, StackVersion version, + ErrorStatus my_error_status) { + if (self->finished_tree && + self->finished_tree->error_cost <= my_error_status.cost) + return true; + + for (StackVersion i = 0, n = ts_stack_version_count(self->stack); i < n; i++) { + if (i == version || ts_stack_is_halted(self->stack, i)) + continue; + + switch (error_status_compare(my_error_status, + ts_stack_error_status(self->stack, i))) { + case -1: + LOG("halt_other version:%u", i); + ts_stack_halt(self->stack, i); + break; + case 1: + return true; + } + } + + return false; +} + +static void parser__shift(Parser *self, StackVersion version, TSStateId state, + Tree *lookahead, bool extra) { + if (extra != lookahead->extra) { + TSSymbolMetadata metadata = + ts_language_symbol_metadata(self->language, lookahead->symbol); + if (metadata.structural && ts_stack_version_count(self->stack) > 1) { + lookahead = ts_tree_make_copy(lookahead); + } else { + ts_tree_retain(lookahead); + } + lookahead->extra = extra; + } else { + ts_tree_retain(lookahead); + } + + bool is_pending = lookahead->child_count > 0; + ts_stack_push(self->stack, version, lookahead, is_pending, state); + if (lookahead->has_external_token_state) { + ts_stack_set_external_token_state( + self->stack, version, ts_tree_last_external_token_state(lookahead)); + } + ts_tree_release(lookahead); +} + +static bool parser__switch_children(Parser *self, Tree *tree, + Tree **children, uint32_t count) { + self->scratch_tree.symbol = tree->symbol; + self->scratch_tree.child_count = 0; + ts_tree_set_children(&self->scratch_tree, count, children); + if (parser__select_tree(self, tree, &self->scratch_tree)) { + tree->size = self->scratch_tree.size; + tree->padding = self->scratch_tree.padding; + tree->error_cost = self->scratch_tree.error_cost; + tree->children = self->scratch_tree.children; + tree->child_count = self->scratch_tree.child_count; + tree->named_child_count = self->scratch_tree.named_child_count; + tree->visible_child_count = self->scratch_tree.visible_child_count; + return true; + } else { + return false; + } +} + +static StackPopResult parser__reduce(Parser *self, StackVersion version, + TSSymbol symbol, unsigned count, + bool fragile, bool allow_skipping) { + uint32_t initial_version_count = ts_stack_version_count(self->stack); + + StackPopResult pop = ts_stack_pop_count(self->stack, version, count); + if (pop.stopped_at_error) + return pop; + + const TSLanguage *language = self->language; + TSSymbolMetadata metadata = ts_language_symbol_metadata(language, symbol); + + for (uint32_t i = 0; i < pop.slices.size; i++) { + StackSlice slice = pop.slices.contents[i]; + + // Extra tokens on top of the stack should not be included in this new parent + // node. They will be re-pushed onto the stack after the parent node is + // created and pushed. + uint32_t child_count = slice.trees.size; + while (child_count > 0 && slice.trees.contents[child_count - 1]->extra) + child_count--; + + Tree *parent = ts_tree_make_node(symbol, child_count, slice.trees.contents, metadata); + + // This pop operation may have caused multiple stack versions to collapse + // into one, because they all diverged from a common state. In that case, + // choose one of the arrays of trees to be the parent node's children, and + // delete the rest of the tree arrays. + while (i + 1 < pop.slices.size) { + StackSlice next_slice = pop.slices.contents[i + 1]; + if (next_slice.version != slice.version) + break; + i++; + + uint32_t child_count = next_slice.trees.size; + while (child_count > 0 && next_slice.trees.contents[child_count - 1]->extra) + child_count--; + + if (parser__switch_children(self, parent, next_slice.trees.contents, child_count)) { + ts_tree_array_delete(&slice.trees); + slice = next_slice; + } else { + ts_tree_array_delete(&next_slice.trees); + } + } + + TSStateId state = ts_stack_top_state(self->stack, slice.version); + TSStateId next_state = ts_language_next_state(language, state, symbol); + if (fragile || self->is_split || pop.slices.size > 1 || initial_version_count > 1) { + parent->fragile_left = true; + parent->fragile_right = true; + parent->parse_state = TS_TREE_STATE_NONE; + } else { + parent->parse_state = state; + } + + // If this pop operation terminated at the end of an error region, then + // create two stack versions: one in which the parent node is interpreted + // normally, and one in which the parent node is skipped. + if (state == ERROR_STATE && allow_skipping && child_count > 1) { + StackVersion other_version = ts_stack_copy_version(self->stack, slice.version); + + ts_stack_push(self->stack, other_version, parent, false, ERROR_STATE); + for (uint32_t j = parent->child_count; j < slice.trees.size; j++) { + Tree *tree = slice.trees.contents[j]; + ts_stack_push(self->stack, other_version, tree, false, ERROR_STATE); + } + + ErrorStatus error_status = ts_stack_error_status(self->stack, other_version); + if (parser__better_version_exists(self, version, error_status)) + ts_stack_remove_version(self->stack, other_version); + } + + // Push the parent node onto the stack, along with any extra tokens that + // were previously on top of the stack. + parser__push(self, slice.version, parent, next_state); + for (uint32_t j = parent->child_count; j < slice.trees.size; j++) { + Tree *tree = slice.trees.contents[j]; + parser__push(self, slice.version, tree, next_state); + } + } + + for (StackVersion i = initial_version_count; i < ts_stack_version_count(self->stack); i++) { + for (StackVersion j = initial_version_count; j < i; j++) { + if (ts_stack_merge(self->stack, j, i)) { + i--; + break; + } + } + } + + return pop; +} + +static inline const TSParseAction *parser__reductions_after_sequence( + Parser *self, TSStateId start_state, const TreeArray *trees_below, + uint32_t tree_count_below, const TreeArray *trees_above, + TSSymbol lookahead_symbol, uint32_t *count) { + TSStateId state = start_state; + uint32_t child_count = 0; + *count = 0; + + for (uint32_t i = 0; i < trees_below->size; i++) { + if (child_count == tree_count_below) + break; + Tree *tree = trees_below->contents[trees_below->size - 1 - i]; + if (tree->extra) continue; + TSStateId next_state = ts_language_next_state(self->language, state, tree->symbol); + if (next_state == ERROR_STATE) + return NULL; + if (next_state != state) { + child_count++; + state = next_state; + } + } + + for (uint32_t i = 0; i < trees_above->size; i++) { + Tree *tree = trees_above->contents[i]; + if (tree->extra) continue; + TSStateId next_state = ts_language_next_state(self->language, state, tree->symbol); + if (next_state == ERROR_STATE) + return NULL; + if (next_state != state) { + child_count++; + state = next_state; + } + } + + const TSParseAction *actions = + ts_language_actions(self->language, state, lookahead_symbol, count); + + if (*count > 0 && actions[*count - 1].type != TSParseActionTypeReduce) { + (*count)--; + } + + while (*count > 0 && actions[0].params.child_count < child_count) { + actions++; + (*count)--; + } + + while (*count > 0 && actions[*count - 1].params.child_count > child_count) { + (*count)--; + } + + return actions; +} + +static StackIterateAction parser__repair_error_callback( + void *payload, TSStateId state, TreeArray *trees, uint32_t tree_count, + bool is_done, bool is_pending) { + + ErrorRepairSession *session = (ErrorRepairSession *)payload; + Parser *self = session->parser; + TSSymbol lookahead_symbol = session->lookahead_symbol; + ReduceActionSet *repairs = &self->reduce_actions; + TreeArray *trees_above_error = session->trees_above_error; + uint32_t tree_count_above_error = session->tree_count_above_error; + + StackIterateAction result = StackIterateNone; + + uint32_t last_repair_count = -1; + uint32_t repair_reduction_count = -1; + const TSParseAction *repair_reductions = NULL; + + for (uint32_t i = 0; i < repairs->size; i++) { + ReduceAction *repair = &repairs->contents[i]; + uint32_t count_needed_below_error = repair->count - tree_count_above_error; + if (count_needed_below_error > tree_count) + break; + + uint32_t skip_count = tree_count - count_needed_below_error; + if (session->found_repair && skip_count >= session->best_repair_skip_count) { + array_erase(repairs, i--); + continue; + } + + TSStateId state_after_repair = ts_language_next_state(self->language, state, repair->symbol); + if (state == ERROR_STATE || state_after_repair == ERROR_STATE) + continue; + + uint32_t action_count; + ts_language_actions(self->language, state_after_repair, lookahead_symbol, &action_count); + if (action_count == 0) + continue; + + if (count_needed_below_error != last_repair_count) { + last_repair_count = count_needed_below_error; + repair_reductions = parser__reductions_after_sequence( + self, state, trees, count_needed_below_error, trees_above_error, + lookahead_symbol, &repair_reduction_count); + } + + for (uint32_t j = 0; j < repair_reduction_count; j++) { + if (repair_reductions[j].params.symbol == repair->symbol) { + result |= StackIteratePop; + session->found_repair = true; + session->best_repair = *repair; + session->best_repair_skip_count = skip_count; + session->best_repair_next_state = state_after_repair; + array_erase(repairs, i--); + break; + } + } + } + + if (repairs->size == 0) + result |= StackIterateStop; + + return result; +} + +static bool parser__repair_error(Parser *self, StackSlice slice, + TSSymbol lookahead_symbol, TableEntry entry) { + LOG("repair_error"); + ErrorRepairSession session = { + .parser = self, + .lookahead_symbol = lookahead_symbol, + .found_repair = false, + .trees_above_error = &slice.trees, + .tree_count_above_error = ts_tree_array_essential_count(&slice.trees), + }; + + array_clear(&self->reduce_actions); + for (uint32_t i = 0; i < entry.action_count; i++) { + if (entry.actions[i].type == TSParseActionTypeReduce) { + TSSymbol symbol = entry.actions[i].params.symbol; + uint32_t child_count = entry.actions[i].params.child_count; + if ((child_count > session.tree_count_above_error) || + (child_count == session.tree_count_above_error && + !ts_language_symbol_metadata(self->language, symbol).visible)) + array_push(&self->reduce_actions, ((ReduceAction){ + .symbol = symbol, + .count = child_count + })); + } + } + + StackPopResult pop = ts_stack_iterate( + self->stack, slice.version, parser__repair_error_callback, &session); + + if (!session.found_repair) { + LOG("no_repair_found"); + ts_stack_remove_version(self->stack, slice.version); + ts_tree_array_delete(&slice.trees); + return false; + } + + ReduceAction repair = session.best_repair; + TSStateId next_state = session.best_repair_next_state; + uint32_t skip_count = session.best_repair_skip_count; + TSSymbol symbol = repair.symbol; + + StackSlice new_slice = array_pop(&pop.slices); + TreeArray children = new_slice.trees; + ts_stack_renumber_version(self->stack, new_slice.version, slice.version); + + for (uint32_t i = pop.slices.size - 1; i + 1 > 0; i--) { + StackSlice other_slice = pop.slices.contents[i]; + ts_tree_array_delete(&other_slice.trees); + if (other_slice.version != pop.slices.contents[i + 1].version) + ts_stack_remove_version(self->stack, other_slice.version); + } + + TreeArray skipped_children = ts_tree_array_remove_last_n(&children, skip_count); + TreeArray trailing_extras = ts_tree_array_remove_trailing_extras(&skipped_children); + Tree *error = ts_tree_make_error_node(&skipped_children); + array_push(&children, error); + array_push_all(&children, &trailing_extras); + trailing_extras.size = 0; + array_delete(&trailing_extras); + + for (uint32_t i = 0; i < slice.trees.size; i++) + array_push(&children, slice.trees.contents[i]); + array_delete(&slice.trees); + + Tree *parent = + ts_tree_make_node(symbol, children.size, children.contents, + ts_language_symbol_metadata(self->language, symbol)); + parser__push(self, slice.version, parent, next_state); + ts_stack_decrease_push_count(self->stack, slice.version, error->child_count); + + ErrorStatus error_status = ts_stack_error_status(self->stack, slice.version); + if (parser__better_version_exists(self, slice.version, error_status)) { + LOG("no_better_repair_found"); + ts_stack_halt(self->stack, slice.version); + return false; + } else { + LOG("repair_found sym:%s, child_count:%u, cost:%u", SYM_NAME(symbol), + repair.count, parent->error_cost); + return true; + } +} + +static void parser__start(Parser *self, TSInput input, Tree *previous_tree) { + if (previous_tree) { + LOG("parse_after_edit"); + } else { + LOG("new_parse"); + } + + if (self->language->external_scanner.reset) { + self->language->external_scanner.reset(self->external_scanner_payload); + } + + ts_lexer_set_input(&self->lexer, input); + ts_stack_clear(self->stack); + self->reusable_node = reusable_node_new(previous_tree); + self->cached_token = NULL; + self->finished_tree = NULL; +} + +static void parser__accept(Parser *self, StackVersion version, + Tree *lookahead) { + lookahead->extra = true; + assert(lookahead->symbol == ts_builtin_sym_end); + ts_stack_push(self->stack, version, lookahead, false, 1); + StackPopResult pop = ts_stack_pop_all(self->stack, version); + + for (uint32_t i = 0; i < pop.slices.size; i++) { + StackSlice slice = pop.slices.contents[i]; + TreeArray trees = slice.trees; + + Tree *root = NULL; + if (trees.size == 1) { + root = trees.contents[0]; + array_delete(&trees); + } else { + for (uint32_t j = trees.size - 1; j + 1 > 0; j--) { + Tree *child = trees.contents[j]; + if (!child->extra) { + root = ts_tree_make_copy(child); + root->child_count = 0; + for (uint32_t k = 0; k < child->child_count; k++) + ts_tree_retain(child->children[k]); + array_splice(&trees, j, 1, child->child_count, child->children); + ts_tree_set_children(root, trees.size, trees.contents); + ts_tree_release(child); + break; + } + } + } + + if (parser__select_tree(self, self->finished_tree, root)) { + ts_tree_release(self->finished_tree); + assert(root->ref_count > 0); + self->finished_tree = root; + } else { + ts_tree_release(root); + } + } + + ts_stack_remove_version(self->stack, pop.slices.contents[0].version); + ts_stack_halt(self->stack, version); +} + +static bool parser__do_potential_reductions(Parser *self, StackVersion version) { + bool has_shift_action = false; + TSStateId state = ts_stack_top_state(self->stack, version); + uint32_t previous_version_count = ts_stack_version_count(self->stack); + + array_clear(&self->reduce_actions); + for (TSSymbol symbol = 0; symbol < self->language->token_count; symbol++) { + TableEntry entry; + ts_language_table_entry(self->language, state, symbol, &entry); + for (uint32_t i = 0; i < entry.action_count; i++) { + TSParseAction action = entry.actions[i]; + if (action.extra) + continue; + switch (action.type) { + case TSParseActionTypeShift: + case TSParseActionTypeRecover: + has_shift_action = true; + break; + case TSParseActionTypeReduce: + if (action.params.child_count > 0) + ts_reduce_action_set_add(&self->reduce_actions, (ReduceAction){ + .symbol = action.params.symbol, + .count = action.params.child_count, + }); + default: + break; + } + } + } + + bool did_reduce = false; + for (uint32_t i = 0; i < self->reduce_actions.size; i++) { + ReduceAction action = self->reduce_actions.contents[i]; + StackPopResult reduction = + parser__reduce(self, version, action.symbol, action.count, true, false); + if (reduction.stopped_at_error) { + ts_tree_array_delete(&reduction.slices.contents[0].trees); + ts_stack_remove_version(self->stack, reduction.slices.contents[0].version); + continue; + } else { + did_reduce = true; + } + } + + if (did_reduce) { + if (has_shift_action) { + return true; + } else { + ts_stack_renumber_version(self->stack, previous_version_count, version); + return false; + } + } else { + return true; + } +} + +static StackIterateAction parser__skip_preceding_trees_callback( + void *payload, TSStateId state, TreeArray *trees, uint32_t tree_count, + bool is_done, bool is_pending) { + if (tree_count > 0 && state != ERROR_STATE) { + uint32_t bytes_skipped = 0; + for (uint32_t i = 0; i < trees->size; i++) { + bytes_skipped += ts_tree_total_bytes(trees->contents[i]); + } + if (bytes_skipped == 0) return StackIterateNone; + SkipPrecedingTreesSession *session = payload; + Parser *self = session->parser; + TSSymbol lookahead_symbol = session->lookahead_symbol; + uint32_t action_count; + const TSParseAction *actions = + ts_language_actions(self->language, state, lookahead_symbol, &action_count); + if (action_count > 0 && actions[0].type == TSParseActionTypeReduce) { + return StackIteratePop | StackIterateStop; + } + } + return StackIterateNone; +} + +static bool parser__skip_preceding_trees(Parser *self, StackVersion version, + TSSymbol lookahead_symbol) { + SkipPrecedingTreesSession session = { self, lookahead_symbol }; + StackPopResult pop = ts_stack_iterate( + self->stack, version, parser__skip_preceding_trees_callback, &session); + + StackVersion previous_version = STACK_VERSION_NONE; + for (uint32_t i = 0; i < pop.slices.size; i++) { + StackSlice slice = pop.slices.contents[i]; + if (slice.version == previous_version) { + ts_tree_array_delete(&slice.trees); + continue; + } + + previous_version = slice.version; + Tree *error = ts_tree_make_error_node(&slice.trees); + error->extra = true; + TSStateId state = ts_stack_top_state(self->stack, slice.version); + parser__push(self, slice.version, error, state); + } + + return pop.slices.size > 0; +} + +static void parser__handle_error(Parser *self, StackVersion version, + TSSymbol lookahead_symbol) { + // If there are other stack versions that are clearly better than this one, + // just halt this version. + ErrorStatus error_status = ts_stack_error_status(self->stack, version); + error_status.count++; + if (parser__better_version_exists(self, version, error_status)) { + ts_stack_halt(self->stack, version); + LOG("bail_on_error"); + return; + } + + LOG("handle_error"); + + // If the current lookahead symbol would have been valid in some previous + // state on the stack, create one stack version that repairs the error + // immediately by simply skipping all of the trees that came after that state. + if (parser__skip_preceding_trees(self, version, lookahead_symbol)) { + LOG("skip_preceding_trees"); + LOG_STACK(); + } + + // Perform any reductions that could have happened in this state, regardless + // of the lookahead. + uint32_t previous_version_count = ts_stack_version_count(self->stack); + for (StackVersion v = version; v < ts_stack_version_count(self->stack);) { + if (parser__do_potential_reductions(self, v)) { + if (v == version) { + v = previous_version_count; + } else { + v++; + } + } + } + + // Push a discontinuity onto the stack. Merge all of the stack versions that + // were created in the previous step. + ts_stack_push(self->stack, version, NULL, false, ERROR_STATE); + while (ts_stack_version_count(self->stack) > previous_version_count) { + ts_stack_push(self->stack, previous_version_count, NULL, false, ERROR_STATE); + assert(ts_stack_merge(self->stack, version, previous_version_count)); + } +} + +static void parser__halt_parse(Parser *self) { + LOG("halting_parse"); + LOG_STACK(); + + ts_lexer_advance_to_end(&self->lexer); + Length remaining_length = length_sub( + self->lexer.current_position, + ts_stack_top_position(self->stack, 0) + ); + + Tree *filler_node = ts_tree_make_error(remaining_length, length_zero(), 0); + filler_node->visible = false; + parser__push(self, 0, filler_node, 0); + + TreeArray children = array_new(); + Tree *root_error = ts_tree_make_error_node(&children); + parser__push(self, 0, root_error, 0); + + TSSymbolMetadata metadata = ts_language_symbol_metadata(self->language, ts_builtin_sym_end); + Tree *eof = ts_tree_make_leaf(ts_builtin_sym_end, length_zero(), length_zero(), metadata); + parser__accept(self, 0, eof); + ts_tree_release(eof); +} + +static void parser__recover(Parser *self, StackVersion version, TSStateId state, + Tree *lookahead) { + if (lookahead->symbol == ts_builtin_sym_end) { + LOG("recover_eof"); + TreeArray children = array_new(); + Tree *parent = ts_tree_make_error_node(&children); + parser__push(self, version, parent, 1); + parser__accept(self, version, lookahead); + } + + LOG("recover state:%u", state); + + StackVersion new_version = ts_stack_copy_version(self->stack, version); + + parser__shift( + self, new_version, ERROR_STATE, lookahead, + ts_language_symbol_metadata(self->language, lookahead->symbol).extra); + ErrorStatus error_status = ts_stack_error_status(self->stack, new_version); + if (parser__better_version_exists(self, version, error_status)) { + ts_stack_remove_version(self->stack, new_version); + LOG("bail_on_recovery"); + } + + parser__shift(self, version, state, lookahead, false); +} + +static void parser__advance(Parser *self, StackVersion version, + ReusableNode *reusable_node) { + bool validated_lookahead = false; + Tree *lookahead = parser__get_lookahead(self, version, reusable_node, &validated_lookahead); + + for (;;) { + TSStateId state = ts_stack_top_state(self->stack, version); + + TableEntry table_entry; + ts_language_table_entry(self->language, state, lookahead->first_leaf.symbol, &table_entry); + + if (!validated_lookahead) { + if (!parser__can_reuse(self, state, lookahead, &table_entry)) { + if (lookahead == reusable_node->tree) { + reusable_node_pop_leaf(reusable_node); + } else { + parser__clear_cached_token(self); + } + + ts_tree_release(lookahead); + lookahead = parser__get_lookahead(self, version, reusable_node, &validated_lookahead); + continue; + } + + validated_lookahead = true; + LOG("reused_lookahead sym:%s, size:%u", SYM_NAME(lookahead->symbol), lookahead->size.bytes); + } + + bool reduction_stopped_at_error = false; + StackVersion last_reduction_version = STACK_VERSION_NONE; + + for (uint32_t i = 0; i < table_entry.action_count; i++) { + TSParseAction action = table_entry.actions[i]; + + switch (action.type) { + case TSParseActionTypeShift: { + bool extra = action.extra; + TSStateId next_state; + + if (action.extra) { + next_state = state; + LOG("shift_extra"); + } else { + next_state = action.params.to_state; + LOG("shift state:%u", next_state); + } + + if (lookahead->child_count > 0) { + if (parser__breakdown_lookahead(self, &lookahead, state, reusable_node)) { + if (!parser__can_reuse(self, state, lookahead, &table_entry)) { + reusable_node_pop(reusable_node); + ts_tree_release(lookahead); + lookahead = parser__get_lookahead(self, version, reusable_node, &validated_lookahead); + } + } + + next_state = ts_language_next_state(self->language, state, lookahead->symbol); + } + + parser__shift(self, version, next_state, lookahead, extra); + + if (lookahead == reusable_node->tree) + reusable_node_pop(reusable_node); + + ts_tree_release(lookahead); + return; + } + + case TSParseActionTypeReduce: { + if (reduction_stopped_at_error) + continue; + + unsigned child_count = action.params.child_count; + TSSymbol symbol = action.params.symbol; + bool fragile = action.fragile; + + LOG("reduce sym:%s, child_count:%u", SYM_NAME(symbol), child_count); + + StackPopResult reduction = + parser__reduce(self, version, symbol, child_count, fragile, true); + StackSlice slice = *array_front(&reduction.slices); + if (reduction.stopped_at_error) { + reduction_stopped_at_error = true; + if (!parser__repair_error(self, slice, lookahead->first_leaf.symbol, + table_entry)) + break; + } + + last_reduction_version = slice.version; + break; + } + + case TSParseActionTypeAccept: { + if (ts_stack_error_status(self->stack, version).count > 0) + continue; + + LOG("accept"); + parser__accept(self, version, lookahead); + ts_tree_release(lookahead); + return; + } + + case TSParseActionTypeRecover: { + while (lookahead->child_count > 0) { + reusable_node_breakdown(reusable_node); + ts_tree_release(lookahead); + lookahead = reusable_node->tree; + ts_tree_retain(lookahead); + } + + parser__recover(self, version, action.params.to_state, lookahead); + if (lookahead == reusable_node->tree) + reusable_node_pop(reusable_node); + ts_tree_release(lookahead); + return; + } + } + } + + if (last_reduction_version != STACK_VERSION_NONE) { + ts_stack_renumber_version(self->stack, last_reduction_version, version); + LOG_STACK(); + continue; + } + + if (parser__breakdown_top_of_stack(self, version)) { + continue; + } + + if (state == ERROR_STATE) { + parser__push(self, version, lookahead, ERROR_STATE); + return; + } + + parser__handle_error(self, version, lookahead->first_leaf.symbol); + + if (ts_stack_is_halted(self->stack, version)) { + ts_tree_release(lookahead); + return; + } + } +} + +bool parser_init(Parser *self) { + ts_lexer_init(&self->lexer); + array_init(&self->reduce_actions); + array_init(&self->tree_path1); + array_init(&self->tree_path2); + array_grow(&self->reduce_actions, 4); + self->stack = ts_stack_new(); + self->finished_tree = NULL; + return true; +} + +void parser_set_language(Parser *self, const TSLanguage *language) { + if (self->external_scanner_payload && self->language->external_scanner.destroy) + self->language->external_scanner.destroy(self->external_scanner_payload); + + if (language && language->external_scanner.create) + self->external_scanner_payload = language->external_scanner.create(); + else + self->external_scanner_payload = NULL; + + self->language = language; +} + +void parser_destroy(Parser *self) { + if (self->stack) + ts_stack_delete(self->stack); + if (self->reduce_actions.contents) + array_delete(&self->reduce_actions); + if (self->tree_path1.contents) + array_delete(&self->tree_path1); + if (self->tree_path2.contents) + array_delete(&self->tree_path2); + parser_set_language(self, NULL); +} + +Tree *parser_parse(Parser *self, TSInput input, Tree *old_tree, bool halt_on_error) { + parser__start(self, input, old_tree); + + StackVersion version = STACK_VERSION_NONE; + uint32_t position = 0, last_position = 0; + ReusableNode reusable_node; + + do { + for (version = 0; version < ts_stack_version_count(self->stack); version++) { + reusable_node = self->reusable_node; + last_position = position; + + while (!ts_stack_is_halted(self->stack, version)) { + position = ts_stack_top_position(self->stack, version).chars; + if (position > last_position || (version > 0 && position == last_position)) + break; + + LOG("process version:%d, version_count:%u, state:%d, row:%u, col:%u", + version, ts_stack_version_count(self->stack), + ts_stack_top_state(self->stack, version), + ts_stack_top_position(self->stack, version).extent.row, + ts_stack_top_position(self->stack, version).extent.column); + + parser__advance(self, version, &reusable_node); + LOG_STACK(); + } + } + + self->reusable_node = reusable_node; + + CondenseResult condense_result = parser__condense_stack(self); + if (halt_on_error && (condense_result & CondenseResultAllVersionsHadError)) { + parser__halt_parse(self); + break; + } + + if (condense_result & CondenseResultMadeChange) { + LOG("condense"); + LOG_STACK(); + } + + self->is_split = (version > 1); + } while (version != 0); + + LOG("done"); + LOG_TREE(); + ts_stack_clear(self->stack); + parser__clear_cached_token(self); + ts_tree_assign_parents(self->finished_tree, &self->tree_path1); + return self->finished_tree; +} diff --git a/tree-sitter-c/grammar.js b/tree-sitter-c/grammar.js new file mode 100644 index 0000000..73619fc --- /dev/null +++ b/tree-sitter-c/grammar.js @@ -0,0 +1,1082 @@ +const PREC = { + PAREN_DECLARATOR: -10, + ASSIGNMENT: -1, + CONDITIONAL: -2, + DEFAULT: 0, + LOGICAL_OR: 1, + LOGICAL_AND: 2, + INCLUSIVE_OR: 3, + EXCLUSIVE_OR: 4, + BITWISE_AND: 5, + EQUAL: 6, + RELATIONAL: 7, + SIZEOF: 8, + SHIFT: 9, + ADD: 10, + MULTIPLY: 11, + CAST: 12, + UNARY: 13, + CALL: 14, + FIELD: 15, + SUBSCRIPT: 16 +}; + +module.exports = grammar({ + name: 'c', + + extras: $ => [ + /\s|\\\r?\n/, + $.comment, + ], + + inline: $ => [ + $._statement, + $._top_level_item, + $._type_identifier, + $._field_identifier, + $._statement_identifier, + $._non_case_statement, + $._assignment_left_expression, + ], + + conflicts: $ => [ + [$._type_specifier, $._declarator], + [$._type_specifier, $._declarator, $.macro_type_specifier], + [$._type_specifier, $._expression], + [$._type_specifier, $._expression, $.macro_type_specifier], + [$._type_specifier, $.macro_type_specifier], + [$.sized_type_specifier], + [$.attributed_statement], + [$._declaration_modifiers, $.attributed_statement], + ], + + word: $ => $.identifier, + + rules: { + translation_unit: $ => repeat($._top_level_item), + + _top_level_item: $ => choice( + $.function_definition, + $.linkage_specification, + $.declaration, + $._statement, + $.attributed_statement, + $.type_definition, + $._empty_declaration, + $.preproc_if, + $.preproc_ifdef, + $.preproc_include, + $.preproc_def, + $.preproc_function_def, + $.preproc_call + ), + + // Preprocesser + + preproc_include: $ => seq( + preprocessor('include'), + field('path', choice( + $.string_literal, + $.system_lib_string, + $.identifier, + alias($.preproc_call_expression, $.call_expression), + )), + '\n' + ), + + preproc_def: $ => seq( + preprocessor('define'), + field('name', $.identifier), + field('value', optional($.preproc_arg)), + '\n' + ), + + preproc_function_def: $ => seq( + preprocessor('define'), + field('name', $.identifier), + field('parameters', $.preproc_params), + field('value', optional($.preproc_arg)), + '\n' + ), + + preproc_params: $ => seq( + token.immediate('('), commaSep(choice($.identifier, '...')), ')' + ), + + preproc_call: $ => seq( + field('directive', $.preproc_directive), + field('argument', optional($.preproc_arg)), + '\n' + ), + + ...preprocIf('', $ => $._top_level_item), + ...preprocIf('_in_field_declaration_list', $ => $._field_declaration_list_item), + + preproc_directive: $ => /#[ \t]*[a-zA-Z]\w*/, + preproc_arg: $ => token(prec(-1, repeat1(/.|\\\r?\n/))), + + _preproc_expression: $ => choice( + $.identifier, + alias($.preproc_call_expression, $.call_expression), + $.number_literal, + $.char_literal, + $.preproc_defined, + alias($.preproc_unary_expression, $.unary_expression), + alias($.preproc_binary_expression, $.binary_expression), + alias($.preproc_parenthesized_expression, $.parenthesized_expression) + ), + + preproc_parenthesized_expression: $ => seq( + '(', + $._preproc_expression, + ')' + ), + + preproc_defined: $ => choice( + prec(PREC.CALL, seq('defined', '(', $.identifier, ')')), + seq('defined', $.identifier), + ), + + preproc_unary_expression: $ => prec.left(PREC.UNARY, seq( + field('operator', choice('!', '~', '-', '+')), + field('argument', $._preproc_expression) + )), + + preproc_call_expression: $ => prec(PREC.CALL, seq( + field('function', $.identifier), + field('arguments', alias($.preproc_argument_list, $.argument_list)) + )), + + preproc_argument_list: $ => seq( + '(', + commaSep($._preproc_expression), + ')' + ), + + preproc_binary_expression: $ => { + const table = [ + ['+', PREC.ADD], + ['-', PREC.ADD], + ['*', PREC.MULTIPLY], + ['/', PREC.MULTIPLY], + ['%', PREC.MULTIPLY], + ['||', PREC.LOGICAL_OR], + ['&&', PREC.LOGICAL_AND], + ['|', PREC.INCLUSIVE_OR], + ['^', PREC.EXCLUSIVE_OR], + ['&', PREC.BITWISE_AND], + ['==', PREC.EQUAL], + ['!=', PREC.EQUAL], + ['>', PREC.RELATIONAL], + ['>=', PREC.RELATIONAL], + ['<=', PREC.RELATIONAL], + ['<', PREC.RELATIONAL], + ['<<', PREC.SHIFT], + ['>>', PREC.SHIFT], + ]; + + return choice(...table.map(([operator, precedence]) => { + return prec.left(precedence, seq( + field('left', $._preproc_expression), + field('operator', operator), + field('right', $._preproc_expression) + )) + })); + }, + + // Main Grammar + + function_definition: $ => seq( + optional($.ms_call_modifier), + $._declaration_specifiers, + field('declarator', $._declarator), + field('body', $.compound_statement) + ), + + declaration: $ => seq( + $._declaration_specifiers, + commaSep1(field('declarator', choice( + $._declarator, + $.init_declarator + ))), + ';' + ), + + type_definition: $ => seq( + 'typedef', + repeat($.type_qualifier), + field('type', $._type_specifier), + commaSep1(field('declarator', $._type_declarator)), + ';' + ), + + _declaration_modifiers: $ => choice( + $.storage_class_specifier, + $.type_qualifier, + $.attribute_specifier, + $.attribute_declaration, + $.ms_declspec_modifier + ), + + _declaration_specifiers: $ => seq( + repeat($._declaration_modifiers), + field('type', $._type_specifier), + repeat($._declaration_modifiers), + ), + + linkage_specification: $ => seq( + 'extern', + field('value', $.string_literal), + field('body', choice( + $.function_definition, + $.declaration, + $.declaration_list + )) + ), + + attribute_specifier: $ => seq( + '__attribute__', + '(', + $.argument_list, + ')' + ), + + attribute: $ => seq( + optional(seq(field('prefix', $.identifier), '::')), + field('name', $.identifier), + optional($.argument_list) + ), + + attribute_declaration: $ => seq( + '[[', + commaSep1($.attribute), + ']]' + ), + + ms_declspec_modifier: $ => seq( + '__declspec', + '(', + $.identifier, + ')', + ), + + ms_based_modifier: $ => seq( + '__based', + $.argument_list, + ), + + ms_call_modifier: $ => choice( + '__cdecl', + '__clrcall', + '__stdcall', + '__fastcall', + '__thiscall', + '__vectorcall' + ), + + ms_restrict_modifier: $ => '__restrict', + + ms_unsigned_ptr_modifier: $ => '__uptr', + + ms_signed_ptr_modifier: $ => '__sptr', + + ms_unaligned_ptr_modifier: $ => choice('_unaligned', '__unaligned'), + + ms_pointer_modifier: $ => choice( + $.ms_unaligned_ptr_modifier, + $.ms_restrict_modifier, + $.ms_unsigned_ptr_modifier, + $.ms_signed_ptr_modifier, + ), + + declaration_list: $ => seq( + '{', + repeat($._top_level_item), + '}' + ), + + _declarator: $ => choice( + $.attributed_declarator, + $.pointer_declarator, + $.function_declarator, + $.array_declarator, + $.parenthesized_declarator, + $.identifier + ), + + _field_declarator: $ => choice( + alias($.attributed_field_declarator, $.attributed_declarator), + alias($.pointer_field_declarator, $.pointer_declarator), + alias($.function_field_declarator, $.function_declarator), + alias($.array_field_declarator, $.array_declarator), + alias($.parenthesized_field_declarator, $.parenthesized_declarator), + $._field_identifier + ), + + _type_declarator: $ => choice( + alias($.attributed_type_declarator, $.attributed_declarator), + alias($.pointer_type_declarator, $.pointer_declarator), + alias($.function_type_declarator, $.function_declarator), + alias($.array_type_declarator, $.array_declarator), + alias($.parenthesized_type_declarator, $.parenthesized_declarator), + $._type_identifier + ), + + _abstract_declarator: $ => choice( + $.abstract_pointer_declarator, + $.abstract_function_declarator, + $.abstract_array_declarator, + $.abstract_parenthesized_declarator, + ), + + parenthesized_declarator: $ => prec.dynamic(PREC.PAREN_DECLARATOR, seq( + '(', + $._declarator, + ')' + )), + parenthesized_field_declarator: $ => prec.dynamic(PREC.PAREN_DECLARATOR, seq( + '(', + $._field_declarator, + ')' + )), + parenthesized_type_declarator: $ => prec.dynamic(PREC.PAREN_DECLARATOR, seq( + '(', + $._type_declarator, + ')' + )), + abstract_parenthesized_declarator: $ => prec(1, seq( + '(', + $._abstract_declarator, + ')' + )), + + + attributed_declarator: $ => prec.right(seq( + $._declarator, + repeat1($.attribute_declaration), + )), + attributed_field_declarator: $ => prec.right(seq( + $._field_declarator, + repeat1($.attribute_declaration), + )), + attributed_type_declarator: $ => prec.right(seq( + $._type_declarator, + repeat1($.attribute_declaration), + )), + + pointer_declarator: $ => prec.dynamic(1, prec.right(seq( + optional($.ms_based_modifier), + '*', + repeat($.ms_pointer_modifier), + repeat($.type_qualifier), + field('declarator', $._declarator) + ))), + pointer_field_declarator: $ => prec.dynamic(1, prec.right(seq( + optional($.ms_based_modifier), + '*', + repeat($.ms_pointer_modifier), + repeat($.type_qualifier), + field('declarator', $._field_declarator) + ))), + pointer_type_declarator: $ => prec.dynamic(1, prec.right(seq( + optional($.ms_based_modifier), + '*', + repeat($.ms_pointer_modifier), + repeat($.type_qualifier), + field('declarator', $._type_declarator) + ))), + abstract_pointer_declarator: $ => prec.dynamic(1, prec.right(seq('*', + repeat($.type_qualifier), + field('declarator', optional($._abstract_declarator)) + ))), + + function_declarator: $ => prec(1, + seq( + field('declarator', $._declarator), + field('parameters', $.parameter_list), + repeat($.attribute_specifier), + )), + function_field_declarator: $ => prec(1, seq( + field('declarator', $._field_declarator), + field('parameters', $.parameter_list) + )), + function_type_declarator: $ => prec(1, seq( + field('declarator', $._type_declarator), + field('parameters', $.parameter_list) + )), + abstract_function_declarator: $ => prec(1, seq( + field('declarator', optional($._abstract_declarator)), + field('parameters', $.parameter_list) + )), + + array_declarator: $ => prec(1, seq( + field('declarator', $._declarator), + '[', + repeat($.type_qualifier), + field('size', optional(choice($._expression, '*'))), + ']' + )), + array_field_declarator: $ => prec(1, seq( + field('declarator', $._field_declarator), + '[', + repeat($.type_qualifier), + field('size', optional(choice($._expression, '*'))), + ']' + )), + array_type_declarator: $ => prec(1, seq( + field('declarator', $._type_declarator), + '[', + repeat($.type_qualifier), + field('size', optional(choice($._expression, '*'))), + ']' + )), + abstract_array_declarator: $ => prec(1, seq( + field('declarator', optional($._abstract_declarator)), + '[', + repeat($.type_qualifier), + field('size', optional(choice($._expression, '*'))), + ']' + )), + + init_declarator: $ => seq( + field('declarator', $._declarator), + '=', + field('value', choice($.initializer_list, $._expression)) + ), + + compound_statement: $ => seq( + '{', + repeat($._top_level_item), + '}' + ), + + storage_class_specifier: $ => choice( + 'extern', + 'static' , + 'auto', + 'register', + 'inline' + ), + + type_qualifier: $ => choice( + 'const', + 'volatile', + 'restrict', + '_Atomic' + ), + + _type_specifier: $ => choice( + $.struct_specifier, + $.union_specifier, + $.enum_specifier, + $.macro_type_specifier, + $.sized_type_specifier, + $.primitive_type, + $._type_identifier + ), + + sized_type_specifier: $ => seq( + repeat1(choice( + 'signed', + 'unsigned', + 'long', + 'short' + )), + field('type', optional(choice( + prec.dynamic(-1, $._type_identifier), + $.primitive_type + ))) + ), + + primitive_type: $ => token(choice( + 'bool', + 'char', + 'int', + 'float', + 'double', + 'void', + 'size_t', + 'ssize_t', + 'intptr_t', + 'uintptr_t', + 'charptr_t', + ...[8, 16, 32, 64].map(n => `int${n}_t`), + ...[8, 16, 32, 64].map(n => `uint${n}_t`), + ...[8, 16, 32, 64].map(n => `char${n}_t`) + )), + + enum_specifier: $ => seq( + 'enum', + choice( + seq( + field('name', $._type_identifier), + field('body', optional($.enumerator_list)) + ), + field('body', $.enumerator_list) + ) + ), + + enumerator_list: $ => seq( + '{', + commaSep($.enumerator), + optional(','), + '}' + ), + + struct_specifier: $ => seq( + 'struct', + optional($.ms_declspec_modifier), + choice( + seq( + field('name', $._type_identifier), + field('body', optional($.field_declaration_list)) + ), + field('body', $.field_declaration_list) + ) + ), + + union_specifier: $ => seq( + 'union', + optional($.ms_declspec_modifier), + choice( + seq( + field('name', $._type_identifier), + field('body', optional($.field_declaration_list)) + ), + field('body', $.field_declaration_list) + ) + ), + + field_declaration_list: $ => seq( + '{', + repeat($._field_declaration_list_item), + '}' + ), + + _field_declaration_list_item: $ => choice( + $.field_declaration, + $.preproc_def, + $.preproc_function_def, + $.preproc_call, + alias($.preproc_if_in_field_declaration_list, $.preproc_if), + alias($.preproc_ifdef_in_field_declaration_list, $.preproc_ifdef), + ), + + field_declaration: $ => seq( + $._declaration_specifiers, + commaSep(field('declarator', $._field_declarator)), + optional($.bitfield_clause), + ';' + ), + + bitfield_clause: $ => seq(':', $._expression), + + enumerator: $ => seq( + field('name', $.identifier), + optional(seq('=', field('value', $._expression))) + ), + + variadic_parameter: $ => seq( + '...', + ), + + parameter_list: $ => seq( + '(', + commaSep(choice($.parameter_declaration, $.variadic_parameter)), + ')' + ), + + parameter_declaration: $ => seq( + $._declaration_specifiers, + optional(field('declarator', choice( + $._declarator, + $._abstract_declarator + ))) + ), + + // Statements + + attributed_statement: $ => seq( + repeat1($.attribute_declaration), + $._statement + ), + + _statement: $ => choice( + $.case_statement, + $._non_case_statement + ), + + _non_case_statement: $ => choice( + $.attributed_statement, + $.labeled_statement, + $.compound_statement, + $.expression_statement, + $.if_statement, + $.switch_statement, + $.do_statement, + $.while_statement, + $.for_statement, + $.return_statement, + $.break_statement, + $.continue_statement, + $.goto_statement + ), + + labeled_statement: $ => seq( + field('label', $._statement_identifier), + ':', + $._statement + ), + + expression_statement: $ => seq( + optional(choice( + $._expression, + $.comma_expression + )), + ';' + ), + + if_statement: $ => prec.right(seq( + 'if', + field('condition', $.parenthesized_expression), + field('consequence', $._statement), + optional(seq( + 'else', + field('alternative', $._statement) + )) + )), + + switch_statement: $ => seq( + 'switch', + field('condition', $.parenthesized_expression), + field('body', $.compound_statement) + ), + + case_statement: $ => prec.right(seq( + choice( + seq('case', field('value', $._expression)), + 'default' + ), + ':', + repeat(choice( + $._non_case_statement, + $.declaration, + $.type_definition + )) + )), + + while_statement: $ => seq( + 'while', + field('condition', $.parenthesized_expression), + field('body', $._statement) + ), + + do_statement: $ => seq( + 'do', + field('body', $._statement), + 'while', + field('condition', $.parenthesized_expression), + ';' + ), + + for_statement: $ => seq( + 'for', + '(', + choice( + field('initializer', $.declaration), + seq(field('initializer', optional(choice($._expression, $.comma_expression))), ';') + ), + field('condition', optional(choice($._expression, $.comma_expression))), ';', + field('update', optional(choice($._expression, $.comma_expression))), + ')', + field('body', $._statement) + ), + + return_statement: $ => seq( + 'return', + optional(choice($._expression, $.comma_expression)), + ';' + ), + + break_statement: $ => seq( + 'break', ';' + ), + + continue_statement: $ => seq( + 'continue', ';' + ), + + goto_statement: $ => seq( + 'goto', + field('label', $._statement_identifier), + ';' + ), + + // Expressions + + _expression: $ => choice( + $.conditional_expression, + $.assignment_expression, + $.binary_expression, + $.unary_expression, + $.update_expression, + $.cast_expression, + $.pointer_expression, + $.sizeof_expression, + $.subscript_expression, + $.call_expression, + $.field_expression, + $.compound_literal_expression, + $.identifier, + $.number_literal, + $.string_literal, + $.true, + $.false, + $.null, + $.concatenated_string, + $.char_literal, + $.parenthesized_expression + ), + + comma_expression: $ => seq( + field('left', $._expression), + ',', + field('right', choice($._expression, $.comma_expression)) + ), + + conditional_expression: $ => prec.right(PREC.CONDITIONAL, seq( + field('condition', $._expression), + '?', + field('consequence', $._expression), + ':', + field('alternative', $._expression) + )), + + _assignment_left_expression: $ => choice( + $.identifier, + $.call_expression, + $.field_expression, + $.pointer_expression, + $.subscript_expression, + $.parenthesized_expression + ), + + assignment_expression: $ => prec.right(PREC.ASSIGNMENT, seq( + field('left', $._assignment_left_expression), + field('operator', choice( + '=', + '*=', + '/=', + '%=', + '+=', + '-=', + '<<=', + '>>=', + '&=', + '^=', + '|=' + )), + field('right', $._expression) + )), + + pointer_expression: $ => prec.left(PREC.CAST, seq( + field('operator', choice('*', '&')), + field('argument', $._expression) + )), + + unary_expression: $ => prec.left(PREC.UNARY, seq( + field('operator', choice('!', '~', '-', '+')), + field('argument', $._expression) + )), + + binary_expression: $ => { + const table = [ + ['+', PREC.ADD], + ['-', PREC.ADD], + ['*', PREC.MULTIPLY], + ['/', PREC.MULTIPLY], + ['%', PREC.MULTIPLY], + ['||', PREC.LOGICAL_OR], + ['&&', PREC.LOGICAL_AND], + ['|', PREC.INCLUSIVE_OR], + ['^', PREC.EXCLUSIVE_OR], + ['&', PREC.BITWISE_AND], + ['==', PREC.EQUAL], + ['!=', PREC.EQUAL], + ['>', PREC.RELATIONAL], + ['>=', PREC.RELATIONAL], + ['<=', PREC.RELATIONAL], + ['<', PREC.RELATIONAL], + ['<<', PREC.SHIFT], + ['>>', PREC.SHIFT], + ]; + + return choice(...table.map(([operator, precedence]) => { + return prec.left(precedence, seq( + field('left', $._expression), + field('operator', operator), + field('right', $._expression) + )) + })); + }, + + update_expression: $ => { + const argument = field('argument', $._expression); + const operator = field('operator', choice('--', '++')); + return prec.right(PREC.UNARY, choice( + seq(operator, argument), + seq(argument, operator), + )); + }, + + cast_expression: $ => prec(PREC.CAST, seq( + '(', + field('type', $.type_descriptor), + ')', + field('value', $._expression) + )), + + type_descriptor: $ => seq( + repeat($.type_qualifier), + field('type', $._type_specifier), + repeat($.type_qualifier), + field('declarator', optional($._abstract_declarator)) + ), + + sizeof_expression: $ => prec(PREC.SIZEOF, seq( + 'sizeof', + choice( + field('value', $._expression), + seq('(', field('type', $.type_descriptor), ')') + ) + )), + + subscript_expression: $ => prec(PREC.SUBSCRIPT, seq( + field('argument', $._expression), + '[', + field('index', $._expression), + ']' + )), + + call_expression: $ => prec(PREC.CALL, seq( + field('function', $._expression), + field('arguments', $.argument_list) + )), + + argument_list: $ => seq('(', commaSep($._expression), ')'), + + field_expression: $ => seq( + prec(PREC.FIELD, seq( + field('argument', $._expression), + field('operator', choice('.', '->')) + )), + field('field', $._field_identifier) + ), + + compound_literal_expression: $ => seq( + '(', + field('type', $.type_descriptor), + ')', + field('value', $.initializer_list) + ), + + parenthesized_expression: $ => seq( + '(', + choice($._expression, $.comma_expression), + ')' + ), + + initializer_list: $ => seq( + '{', + commaSep(choice( + $.initializer_pair, + $._expression, + $.initializer_list + )), + optional(','), + '}' + ), + + initializer_pair: $ => seq( + field('designator', repeat1(choice($.subscript_designator, $.field_designator))), + '=', + field('value', choice($._expression, $.initializer_list)) + ), + + subscript_designator: $ => seq('[', $._expression, ']'), + + field_designator: $ => seq('.', $._field_identifier), + + number_literal: $ => { + const separator = "'"; + const hex = /[0-9a-fA-F]/; + const decimal = /[0-9]/; + const hexDigits = seq(repeat1(hex), repeat(seq(separator, repeat1(hex)))); + const decimalDigits = seq(repeat1(decimal), repeat(seq(separator, repeat1(decimal)))); + return token(seq( + optional(/[-\+]/), + optional(choice('0x', '0b')), + choice( + seq( + choice( + decimalDigits, + seq('0b', decimalDigits), + seq('0x', hexDigits) + ), + optional(seq('.', optional(hexDigits))) + ), + seq('.', decimalDigits) + ), + optional(seq( + /[eEpP]/, + optional(seq( + optional(/[-\+]/), + hexDigits + )) + )), + repeat(choice('u', 'l', 'U', 'L', 'f', 'F')) + )) + }, + + char_literal: $ => seq( + choice('L\'', 'u\'', 'U\'', 'u8\'', '\''), + choice( + $.escape_sequence, + token.immediate(/[^\n']/) + ), + '\'' + ), + + concatenated_string: $ => seq( + $.string_literal, + repeat1($.string_literal) + ), + + string_literal: $ => seq( + choice('L"', 'u"', 'U"', 'u8"', '"'), + repeat(choice( + token.immediate(prec(1, /[^\\"\n]+/)), + $.escape_sequence + )), + '"', + ), + + escape_sequence: $ => token(prec(1, seq( + '\\', + choice( + /[^xuU]/, + /\d{2,3}/, + /x[0-9a-fA-F]{2,}/, + /u[0-9a-fA-F]{4}/, + /U[0-9a-fA-F]{8}/ + ) + ))), + + system_lib_string: $ => token(seq( + '<', + repeat(choice(/[^>\n]/, '\\>')), + '>' + )), + + true: $ => token(choice('TRUE', 'true')), + false: $ => token(choice('FALSE', 'false')), + null: $ => 'NULL', + + identifier: $ => /[a-zA-Z_]\w*/, + + _type_identifier: $ => alias($.identifier, $.type_identifier), + _field_identifier: $ => alias($.identifier, $.field_identifier), + _statement_identifier: $ => alias($.identifier, $.statement_identifier), + + _empty_declaration: $ => seq( + $._type_specifier, + ';' + ), + + macro_type_specifier: $ => prec.dynamic(-1, seq( + field('name', $.identifier), + '(', + field('type', $.type_descriptor), + ')' + )), + + // http://stackoverflow.com/questions/13014947/regex-to-match-a-c-style-multiline-comment/36328890#36328890 + comment: $ => token(choice( + seq('//', /(\\(.|\r?\n)|[^\\\n])*/), + seq( + '/*', + /[^*]*\*+([^/*][^*]*\*+)*/, + '/' + ) + )), + }, + + supertypes: $ => [ + $._expression, + $._statement, + $._type_specifier, + $._declarator, + $._field_declarator, + $._type_declarator, + $._abstract_declarator, + ] +}); + +module.exports.PREC = PREC + +function preprocIf (suffix, content) { + function elseBlock ($) { + return choice( + suffix ? alias($['preproc_else' + suffix], $.preproc_else) : $.preproc_else, + suffix ? alias($['preproc_elif' + suffix], $.preproc_elif) : $.preproc_elif, + ); + } + + return { + ['preproc_if' + suffix]: $ => seq( + preprocessor('if'), + field('condition', $._preproc_expression), + '\n', + repeat(content($)), + field('alternative', optional(elseBlock($))), + preprocessor('endif') + ), + + ['preproc_ifdef' + suffix]: $ => seq( + choice(preprocessor('ifdef'), preprocessor('ifndef')), + field('name', $.identifier), + repeat(content($)), + field('alternative', optional(elseBlock($))), + preprocessor('endif') + ), + + ['preproc_else' + suffix]: $ => seq( + preprocessor('else'), + repeat(content($)) + ), + + ['preproc_elif' + suffix]: $ => seq( + preprocessor('elif'), + field('condition', $._preproc_expression), + '\n', + repeat(content($)), + field('alternative', optional(elseBlock($))), + ) + } +} + +function preprocessor (command) { + return alias(new RegExp('#[ \t]*' + command), '#' + command) +} + +function commaSep (rule) { + return optional(commaSep1(rule)) +} + +function commaSep1 (rule) { + return seq(rule, repeat(seq(',', rule))) +} + +function commaSepTrailing (recurSymbol, rule) { + return choice(rule, seq(recurSymbol, ',', rule)) +} diff --git a/tree-sitter-c/package.json b/tree-sitter-c/package.json new file mode 100644 index 0000000..707facf --- /dev/null +++ b/tree-sitter-c/package.json @@ -0,0 +1,36 @@ +{ + "name": "tree-sitter-c", + "version": "0.20.2", + "description": "C grammar for node-tree-sitter", + "main": "bindings/node", + "keywords": [ + "parser", + "lexer" + ], + "repository": { + "type": "git", + "url": "https://github.com/tree-sitter/tree-sitter-c.git" + }, + "author": "Max Brunsfeld", + "license": "MIT", + "dependencies": { + "nan": "^2.14.0" + }, + "devDependencies": { + "tree-sitter-cli": "^0.20.0" + }, + "scripts": { + "build": "tree-sitter generate && node-gyp build", + "test": "tree-sitter test && tree-sitter parse examples/* --quiet --time", + "test-windows": "tree-sitter test" + }, + "tree-sitter": [ + { + "scope": "source.c", + "file-types": [ + "c", + "h" + ] + } + ] +} diff --git a/tree-sitter-c/parser.so b/tree-sitter-c/parser.so new file mode 100755 index 0000000000000000000000000000000000000000..18ed4f3df74981bdd32d5eeaea4b85a050e9f5a5 GIT binary patch literal 389904 zcmeFad7RDl`~UwsGh>e`Ft(cIrFLC=k~pQ|M=d_`~B!Vulw_QUeEQlzs@naU6=Mr zp^#($lATtLXE{!5lQHY(0@ekrnNtk^t>RQ>-xN0|K2frYF#GA06r1Yci1kew^?Ba_ z;r7#Cj_aFe%Bjy&4Wym+(_gM2iX7i9`NzKxe%3!v;x#j$wp$h z+0Vif#-TQn7E^!(pQ^i#F1N>&)1TEOoMS(!4*KiyL;4;6oBFz$a&ol zOLePyP2DkHef?VIbDys*d(8x7IW)`^lj2Z+l9(WYKjPiH&AN+?eE!oOyh?&R>Tjh4 zoa#x$>*T|GftPZMI(IyV1pe$gar*Tea`(s){l=uEo?ZLhF=+IlA;ZR` z4;tOGYn$OCM-1wD`+(ttBrkDJzk%a!?>BhZh}(w`8$ZZNA3bPLzcIto5uo2dXZWxI zW76*!Si5%JF(d0XC3B#pI&|rHZJT}#>o%<01TDhIoBvV!C_NgVcD^&p4=X}G6Dbpa zcDu9vIAAt}Q)YX#e3s!g56il=+{u;=qrT$no6yKQPBYD`32&`<|99ElNmKm54^m$@ z#T~tkDBf(0 zj6-45KReFlH%Xk5ieF}US;gxaUP40nE% za(3NrH@vXopBr9M@h=T8tN1sDS5o|2!)q$O&+z(+A2Pg|;!(p}D}LPYG{sLD-c9j; z4DYRY%4Qjt{)%5@_)x{|_>59Kb(_Q)r+5_;CsXlihEG*|zga)C6hCD69K|m)apoyr z)9}TL*D`#m;&lvPp?E#R*DHR7;ae4NX!uUW>l?mD@y3Q9Q2a{6k0}0&8HeMF?=t+9 z;yVm?ehRMt7AAgS#ji5Fq~a|NFROTK!z(F%t>HBl?__v=#k(8cO!0n(w^n?B;c1Ew zGQ6AOLk;h(_!z_cD?Y*Sp^8TgAEkJX;o}s4%J59Z=Nmp%@z)KXrT9w2=P3TE;qw$f zV)$akoh`BsmMR`I{wowOX8hMHUfl4liVrk#b}ByD@I8t*GyH(!;Vsh6BZ^;S_;JNA zHvE+0)eLuz1lNCU!wW0k!0?iaUuAe%#oHKON%5|R*HpZ-;q?{oX?QcmZ#KNO;{6Oy zQ+$Ns-4q{VcyGnW8{S{>{$^f=D!$(wM@A`r+VF9TXPWq#icc|os^X6rK1=Z@44qT}{D9&g8h%9aEruUg z{3F9pDgKG!PBggwKQp|r;$IkEQt>^8msNbP;guBMXLwD;4;o%y@xz8UQ+$tESFIJ# zHU4ReA2Yn0;%5!-t+=yQ#-+dF$%YSAyrAKu6fbP}IK_(^o~d{R!>1}<+3;D4S2KK$ z;x!DPr}*WDFIK#^;Y$@yHGGBQ-3?!__&~$ADn8Wkor;eze2?N|3_qaw1jCOg{)pkn z6@S+7Q;IJ(+%fkh?fL&2!wW0E-SCo%e{FbK#Sa@^N%0eg*Hk=aczwlf{AP;V_^lPU z@zWHy@w+L0-Zok1y%n!ycz?y48$ML=j)sp?{1(H#o8-_1de3Riz75~og6^j3E_On+VBI4UuXCc z#rqk4T=Dx1Kc)DeA4@x(T=}%?|2N}bSn(XgODg_?;bj$HYIr5ZcNktXA6`En-c0dL zCQfU`e=3w;?oV^qxcJkA5eU*;YSpI)9~YpuQmLX z;yVm?ehIGs{e~A-{8z(EDqhg+f66Le)$mG+H!-}X;_VEtuXs1Zn<+lf@YaftHat!7 zsfKq`{5ivWEB>b8{T2Vv@S%!-X80(@4;emA@!t&3R6O*F%*Ry4OBg;&@kMDe92&T+*z z7=B9eU4}bHgX{m0;e{3d!|;-d+v9s##qIIElHx_o{q~xQmp8n=;`ThGnc_{2e{01% z*!%g4_cpwn;&&U~Tk%PT_g8$n;X@UF!SGRvzhU?|#Xm4SQ}HhipQ`w;hR;&G;HNTw za};l6_&mk0H}}aGE8gAsFI9Y);VTq>!0`2ozi9YY#n&0WQ}OQ%-=p{`!w)E4+O+?O z;tlNmf5kf*eoFCyhC9cC>wmoAg%xjM+EY^TM~#13#g`afN%4(_*HnDJ;q?_iX?Qcm z3z_Hbtrfq-@Uq8){j&C+Uxm}NYI(9L&+iWSxOsJeGmiK;Jqx#g$9>#B)3W7goZ5j|_~(@NP>VBty4t99%bCF^k)~aj=&TS8VN2yyy`4rry{kr%8#C zj+5G}U4x^kJv&bOyVtZod!$akq*|A0Kc&WcR;xMqfwRRz;VGrAb)4|>FFFn^{bZNW ziP)j6_30NkSihzx;^!7vvko8O_l}z~g>%>D^w=LcbKBTDX*tFB*P&}O7SiBI%i8c_gaCSw3mlC|hSCm09Tl92mZV}x{h@M1S zxz@u1FD7_UAlJ%ZCj->FR=nu;MRb)d`ij8H1Q+^>GMH_PM#QTSd1cz7BLr3=c$cpz zgIjFTH1Wba=uWhqE!s#Ry|*8&?<>lnqAglnyo!-mQCsxXH9P@@-_5M1di%HS1S^eOQQlh+fr=z{_;AUN4ql)(sFw2ye5PhK}$FRa`f z38XP-HMvJ5uj1qjBH!ml@`{ABFXtlB+LW1FDUw$qJmn&ww44j4-$QFTWo}w%XY2ri z)T1ED@LL*+{{43>22_{OaZX3_`eqbeGoQeIfHf~770H_z&iV{iB(G06dtECYxKiY@ znjzNf5`k3-E)vKqhryE!Fq&E7MPKKLK4862|4jr&F{qhw9>C26`Tn-jws& z-4Bpc5kQF_%ZtUb_lC2MwR9YWpuo{wFy7W|tG;1Sk6T57quUttVZZ@b08HBxIgl4Q zRV4hxdh8LxPi!c>GoAX8NhO|w1J&~o>XBNqIfiV})yO5CK@|>ql)ylM$u&&hud{tW zfh^Pa$br!1n;NW-UIj-~bPPG%=UN=8&zf=oE6G3H?&s)*fNMBzF{G$1XRhWxlSA~c zGhUznAn+rD;@q0w34Fnz7lSSYK4g%=AdSG=48}2_Z_-5P1LU;Xi7^>V196hr3^1zv zeyN;8kLQ9i6!g`Z=r9H{;6D-Q%|HhHM*3NiX zL(y&OP z>9;9eOVZC!x`L!4lWNz;KWdgc`O>uE|KlXM?SACmOLl>SoEhbjG$q!&_p zt)!o$^fF1ep!7mX^MaczX*zaBXCS?Xy|XCAF~(DhBaaeKuJI0{+>To)#jWc`DQCU7O7VD~{0pf(V!t4TqijJ+A0WDl zQeRSvXKy>D&Jx=|DW2&Sl$uBE4NCE89q*NcvXdt0X;#(r-$d zC-5an^Ta+S>Bi(U9qCBkZM^+8A}}6ca-&Gzt&AEH8p1x<;4u@}BAw`s40>hUjj`it zYR6y#7vVW*%wQ4&9`>pXGBU105uUG70Bg7jg^>c~Cjb2>4Koffq41OIBYDMT&s{%y zI1vwLe*zrIYd*PRB(MIYqB4)~GpiKNUUVhT+$&VH^Sa3C=HV$%0Hv+ODOVdPIc@jP znTK%5nglB6e)n@(-y{xa&>}pOzSPE(ILJ<7x$u;GWD;*29-Ks;tcECwUhyPeCTX6m z@{+Dj<5)t{ttp)(=~_-~g^71=_%is&@Rc(~SC_F~# zijw9YULfh##0yFKDN5&^V1M4#{wisn?(Zed)BP3Fc3MkPq0Io3t3>j;@b*UEIgh^0 zKD{#9qw*vI^BKq)LNb9z8BEHk1`pmuGXWB9dqWfPaCUbtAKdm@GQ*(P#+Hq}<`q=b z40>6h_(4wsl|jb^A$lc)F6Y0$5$GG9c_Et1+g^7hcn5lQcuG5@G3a*=3l2IT72ZQh z^oqB=C6eaj#`8#HA6A0K>@ndhDgBV7|EBbKNuQzg2uZJ}^Z-foG3!Q2^O3BRq+chW zR+5(OU(#!dUnc2iC|zFCw^F)` z%p>pt03YlkdH092-X`lG@JL=pIO}Ctxpb+`&3TIQxZ^oU(ZR5?KD4D%hCQ_P#Ze%^ zk+B0X=C~ur@XcE@2AH?XJa1LPGw$Mf`z~^-MR-a-nYV>Q6U^H`zjD8EBz2-EB+c{o zBhr|+qQt)u&duK;>Gi}nNSf#8JxTNYERi(N&-0Sz`FTvzJRlEAn&)S{q(7mUBP9JO zr3Xlw=j}#GKS{ikq{ZFOxLSVR=dO9G2j;Zw}8M^UvY0WGzP}k-Q1v ztb?#}FUK5mwYy;<%}v`PX>Rf=q!Z5Qe9Evh`Ut+WoM1*XfH9+EIfidW2Qz3Dp7{ee z1~dAMozaWKQ)bGHemEpJqf2OX>YyZ=i9M?mtt4rlmC}-agLq*{^Q`=Rl>K>Dj!Swj z`5cyXElTf^^bAUGmo(4HdPzS{{2fX2QFF1Rc~+j4G|$Q`Nxw|~S(1L1(&LcEhc*lGxN+K-Ix18wt zl5Rxl0!U*6KabLRn@TjEM6F(?v-oU?*G%uxXlI9J3jih-gy(MX0N-s;AH}Iz= z&09;3q|=mNp-4Gu!zTSaFpv!0cy@=6t{4q~uq`7f8u) z_G1FkKqorW!uti@LU24o-=Gg;;2ZSb3^3^JQ7pl-tOtxiZ@_L>;r_Qoe}|%9!mwpH zyQsj$1PfXC=jGhjMFda$M15_=WAzt-gAAk{4G8Q6peb30QgpXG>pd%wT_C756icD#la9;S7AexRpU%6>SN7Rn&2-sLlSqD#|nPRZ)b2uNS9&ppM5? zageZA#Wrk$GEiID-&e(Q2EIlwOdN4$FydG@;=MZJAYVit>7I!rwhTtB?nbO85yRP~ zfUr5Yq`?g{l%Z%v;Ge_X^9))SCpcXx{g3E=>{}vvgTvWhB7w4f$#pkp4-031An3eNrc6 z(aqoekt3;*Qw8|$*w+-NfiM0gD3JT3cH{CzeQtl^Xch0ai=uu1z1NE!3Eh4tx79wk zMG4*7k=tyaTV_JH_T)Cg=XP^Kw+`gi!ROX6p<5ccRr0wNOX${-+)f|zdV088q5WrrOM5PG$g>PDsBSEXKoEl-leQ~L6`Y4Q8|(7CC7nw&$WBJkqp%F+8MwSw44 zO3kCxAWAK#)UA{{OR4UZ;nYuU=t@e}pi~~EE~V6IN?kyy^^__? zsaGf!JAl+0O8rSGKBLX0)Z4@kQi|^>eMPBfhHb(B)QD7B7KosqIVz6NPJ znJs0Wzt@x-vNeGdoF){m!lwyEksEvfe`-H%0OkSwp~{ZqUxRxoGw-(WOuC1K%EB|~ zMi9?0ZVJ&2BD^hdeqerAQ9EBkIkdAorJq9D-2b3d9G7P?akn=!V3N_|SHmXw-BsYaCIS-6~1vx!xt)Er7(NGYC$VwB=p2vLe>;jev2 zEg-+6lxjw)?Lf_>42^pCU5qIVc#( zn-tD^3|8(P*tEIfS+L^o{WXaWC*I?)$Qj&^-@y0dKPdcBdZB4MqcXWQjxIFA=BGnaiq6OeK!<+p<=><8Q(WpPubJHqmH0>lCO9;I~f)` ztjTmR)&t=swWm1Iy=b8r1>C0OJ|U!_M;;VX$R*LcV>U`*5B7Fp5f{>lUs$RiPSqd& zmKup8`%qLZd?D2m=mqy8s}jVx<+x_gmH}$xCxzX`xkbj zM)C%Rvwud0)P5h;ew|yp-|voa_6FB)EcsoQpWj^9?=JHDXRqyziZ|NzyPN#JOz1Z# zoZZRw8%2I^zrD$?Z+?EeT)$rA*EB!BC9dBX@+*;_--E7S zI{E$hO`>rbY*)x_xtDy(B=o_?O?!3m8$^D; z?n%`D;Tc23XCnE0oX}@PMjP?DlYAB>^vSSo8caTs1U_;Vzz<^k$%9z4OS+#*bVmt$ zO@Is6$Ijq*azK_-N#9d3SvSCYLV%%b{W^IhmrZOkC2|coX?N2_JenCp*P08zDXkTtYoS=16v{l+iEx z`{{(u31@wS3>+3SYD%#OsaUhbEeL15&dz;oQywDcVsOsho7*OS;A(}ls$)k^H^458 zRzYXuUHYWIOCwN*<>@Jlwo9-qDpu77yVC@lMznasV5xXJj4x2ur&ijO-W=gF zs^bKs5XK<7_X}J7WZxpgCBW&6?6y;c{N9EiU(THQ%eJE!@n_uf-onb>n_h;8WC&iu z;~{wsiRf=;T(XxVM6@$df_`U*d5&=UPy_DKN8l=6=ex~|j&X@6X>J&=F#OWL<>?&n*7+ehU!1@> zx)Do9YAWN7Q8d-9-h&*mrW^4Cinwi;EnL`UERpC`YyuHU6@tmx_AZD9{`lMf(6mee*X{D51yf>(I8TiAp2{zvvp zZs8ZGaN7ih;b+zWy-y-FZ6)V2u5(4NrW@RvDtWM_3oE;j2FGkOuTr#aJ82@Zx=XsX zEF=CFxJ*@`Z2E`nEbo)hrtlUyXSvQ*+=`;>PS^-lJ-Eb$)m#|KyV^EsDMf3_O~StH zemG0VUn5?@ttD7?xA?qCK4(6)l~#A-N1M2ndXVSv61RfQRCtYB_%g5Xso!iw4|3uC z$dH=1P~l9sa1F2UDz|WL4=!|J9S=V0!Ye#D(S+By#4&EfZeHOx+`=A=(q0@8h%VzhIg@%J&Dm7kx}c~#_e{qREzaM>G;0!a;@Q4J5fH3X0PSx0aKB&YMr z$mx1xC#9`yo#{BF6*!4<(smz6%ifvMJ8dOdOtN>T_m1vC5!vMgVx^CX#auYEY{MvzH^B6;1yS%;bR3TJJQKC#^Kx99r-s@_HL97&#cKgb<-d79^fR8HHRRsqCHh@9x*-4 zuXWJ)eNGW-C$2qXn6&U3@+m~c^V)`I(EUxURW*XgaON!|n7x)y$p>Kn=hkvLMcA|r z5ikMS=efKl@z;sx4Vc`F!_P<fv z5~exffEVF;&Ir#O3^%lBa%o@>&{+m$p)s*w7}xd2)4Z1?j^lpP$p_i^zeqxCA7Zzj!^gPalsL zNuzWSz-mgr8{cTk>xHF>x+8gm(yxp@&N-vPSq%`0-!ANmyxe;dc6mH^d5~?&9;&A- znlc&J30=Zj7ogg|DbTz9P)pi-O#C@7-LV6 z%!%RnIuOpzqdA<9Iokp}xf+@i&f@Q2Vc(9unS<=yG~SUGXU{IVjk&@Yxnpgi!exAx zj|yv$^Tj-b_u1NJb0%tg1PR}^9e$`1#WNf9`$y1}Fo2%mY2QQ+;R~ARFMa(_jxl3X z-4*+OCe|-0Eqg1z4u>kz-p8N<(AouxV*RAO&;RZYFK3{A)FP?(q2si?eol>?Ne)kG zLT%U&5Z4BN@_eejU0}NqJi2@n%}NGs^_?dd&FS$)jj(-zebVGO=+VYJUtcw;%R z+=s$x7!}%_(evH>e%&2_(F@%>H6y&^cPHdX@R1&D;=)lLtmMLbJXp+yqdj;MuUJUT zF&;da0MgS{vt$2*2IKAzX(WqV_B*kgnf0=)3$b?0GAv6Y)_~bK%i0sW6wJI^V5&Ju zxF9gy$hrd8OR4{5bpVgk^EJ>*pVA9p$L}bk{H4 z8=B4Vk@3p#;9D-d*MrZxaI6QXxNw{YN4xMo7y3GLoEr1b2Gg0%uw)>3XY?buv?pQN zU#aW{DVtFycXI;Q^e^y+;Jw&y_Q{wT{pm2R$bYaK!2j)cqH}+YFILYE^)afUKi5!c zY@Lp4=pW{y)jaL%j=PVhX8sUL$JeN$*CcFam3vF@J+(ThD>^)3)rX|&@$SGx+rm#n zj#3*LGBP}U+dtr~HQu#I_@QOkUqti1&(~qfe&k84KdFD2h$Vq0cnw(v9}VfXG_!pF zqJkZ$5g1v+8W3v)mc3W*WERB>7r2ud&Z758a3ixmIh1m13%Rvnj>6duF|g9ADEa-o z-Znt_ErVa~m(n(sRmKgGOCc8J7h+_7A#7KErs6|UoWHe6?TO?y3uj;H#*dLhhs5#I zSFtm_N+SKCB@->5*csnqM=0_8g@T?~mruXxzG0$%<3{BRZioXE;?0C1YGh21Y7UXl z^n85GTplE!A@D(0>@$@V>PC-z%2kxu-&47I34G$7sbqwG4^g@vv@4R|ygs(pj=^Mi zjYKbpkIcFUY4vrKnx|0B?3tHWi|Nq& zE-YOq?waE~1bftnP%d{NlIbr-A4%*edw|<0)QvF;jQizXk%;zzKYldg*0$4*+?LuW z^|sW$8&hv=*WhGoua48sruOWTQ~muGj?=5hwBJ*w)5-0xsj*)8HHp0L_%(^+6>w^{ zd}GIfDOp`Y2Vw^zXWM5KX>f8CrpLkA;@Pp`nLFVUIoow|&B)o}870IUO`{v}- z$k8H^vk0^VUYwVED01|=$l1%oQ=S6CRbf_Zd<;xkBHuhdxe6CTPVO4ifpZ8a_npXD zyy-C9Exmw)tir{mlRF1a1t>8SiGq}P2#G>SM8~7!NaLIbZ>mbV*8=ko5VKPLgyfO4Bb)ApQlE{#nwcDZLNr z$l26z_LG-lYdpE?LW0{E;@bQHfq2q_Z&)zA0sR+PhTsbf@#S$Ii3WS4GZ^6UOnZ3A z@RTLTdzq)=?bws6ct<{nK|coN$)hKO3|!Jl{EG=*W8q(yaP#nAe8ZaING=LrCt8ld z=y3LD;)MxvqA3h-XRnF`ey8)xvqKqFB5;Vo$Z+;tDOQ=_Ck*Kw&6BHe(8C*s)+=4S zsuEnpa5#HaBk&}H5e%vm$YwAuoZV82T}E&eLunJA&GhrdsYxE!F+iINN-@6LZEoRj z7!FAA(n@No^Pr%B*O1Sc>Y&0dWO+{xg+aCQ~(YC^CV zL#eGPfwm0Loxia>(1a@q)?hRM&MNhkJFXVS-`~t zTM*pK5Uc%hfmajU%n&=tNq}~7zr`>;oIOlDTaxFq3}sGR5tvTk=zz%C(%~ts;fUSJ z7l`TKt+XaT`h^Mf>l#YmBr*v4-9VpG$ zmS-`5w85bwK1n}@eRt$6y0B1SNAmodAx8C4ft?8QFHD@pBAF<#Gr>366K_il5y%$< za~a+q&b~n)A8oQ3qV|>oucP9l7~+;yO@Y@FycH0~nszBSnSFK1$XVPrx*+x?KW`gt!6A_x6 z3IcB-*qz}JE_y40)(m8e>qDTPjr9|DzZiwv2$pAvZtN1+mtX;3tbPRkz;pP>+3|Q+ zT)g@d+|Lki&O9aXc7h);#4qxP}2{{VyDY(BEMMYx%tHBv6h4CigS(x{F|n zc;Q`Pfx`*@ibv*=vpw)z0RrzP_zgqs6&@2fg5V~G?eIuT;7Ec?8DgY|3LHi78HQLJ zJp|rE@F9lSCRzy`P4FIu^u>jftHu!M&j1ZCD_-dYJ2S+Fmn<-YU{f3K7>>{=elNkw z*7IwDV+o$ea1>WEjzAusr1K{Kws_q~@JEK&XFe}*Ji*Tx%0X-bf%Ob9bK}HoBEeS~ zqJ0Ae-cRsJhUo8g0w)oCfFXvfxxmQ;hciTDK1?vjdbSfdo!~fzSjP1QK0nv{?8zXE4UQe{DZ)m1k2h|UF@DHa<&1k>3H`!i#+HTCL(7WS@tNgL(H05 z_874p%$iyDI5GN#3EqA$<)aJjlAj8LO8DS`tT zVqbBwz&Ql3V~FW3DDY{5%^6}}@mnb#h`9u-F~pR7EASbDVTRbrZ4vk^!83SH&Ktlo zfzJ{Afgx&tPT=zdcUsS>0$(7wiXkc*Bart53oYy`a2|O+YKwOi_#(lH46zY37C4{a z5QZ3~iUMCENN)s0&f;y_q5?As(i;I-wBhVO&*#1`AXt+jwxI(8UnWSuFcCT14(ERY z7ZUtO9;CNRnS_lDhXh_*6S0%w!vogt^WwaSoIisz57ab)iwUk~h_#z8@D+lK7-CHN z30y+(F@~7CP6A&gNN)s0&f-<#CIVk0IMl|hB=B{DJuECH@C|~k7-Hp|EXmz}li=kH zF;E8uE+tr+A%=9jz_$p-@JO6TZ@Iu_1b=3TnDYg`P4EkbXlIVVcL=U$h;be#@Lhth z0`f4X%0Y(HU7YAC-tpcQ&h9ME?~(H)>)g|cegy~PEElCX(Q&uZ<>cLs>vOl#6~wM) z=5D3$6RXM0-AY#yE6oi1YI^%jw)|DZ|HjjCp44~3Jc6qU{=^W2^@6}P1nG?cKJ|K7 z;97!f7-HMY5V(%uVul!({sPw%d>oLwcLN?{WB<$PuJ{=zyT@)M&L5ETV2*$VR6!sw z*6s{3F+~JslIPVnY#)4$i$kF?M@n#CHju-`T&ig}d$+)i1Pd~3h?^V&KP31YJt{xj zIGp{8z)b|dW!NvA{e-~H1h+6mOC}54LU0)%cd8RkGPxz#D*B4UR&schOJM`(C~zCW zi54~%_z}S&Hhx8c9}~QRA;zSr!0iNEGL-A&PYBdufc?qg;yeaB2$r!$KNa{X!6b&5 zR^`_gFYf;4Xq28DcA&AaFOqHyAeHvy0COJjb9BgD(g?!k{UG zF9}Rw(2T)X1ny*jm0Cpt?;+TWA*Qytz^@6mW{4xqsq?t6-w>?L5Oedrz`X=7Vu-QZ zA@Ey*AwZt6`|%np9~m$huZzQXI+FVcI_XG!6SYF^^f?XM+Nd*M{K(HA@)PB4ekHe1yt1`qA z+$-=Wf+ZND_RRv15Il{C3z_zj ze_`S*x|}I6M(}O+#3H;)Am818-p0I9ApaKCG={jiNEOJxN0rVHvrtDMeV;Gdk0F** z8G(GOy%R$$rzC-VYrF|VET^M|c^vp#1CusqUagoWT(EZ`!z;BnoU`yR3@I30&!wfO_*9t67 zFoPjB%qs+zAlRQFPVUMI3={0k5ZiUKKzfZT+LR$`KURple?Gy=46%y77Fdeld4RkO zn&Bdwj{u0jLL4q2hg{s1=Oe&N0!tJ8k|DZ3Lm>SGSM&ow4s|7NGT6h;-QsW&In3iy z*gy9cNYA07(-~q?+6XL5@Lmh+3M@zPb_>f1EKjftLrhl%Udf?jkqLkvPKfi(!;#t_@Zg#zjI zyl5IAcf11*vb;;j_4pqt+}X>?p@wy+hsU_~NKqd@<7*EJTg15*IiJCkc)osJCa^Za z9~ffOcurs)f;$;vE0`*fe%dIyiXmD!Mqpin{0kFwS=Lt|{k&)NQTD{<&{1H0f)g2H zC>jfFKyU~{?1Cx^q-Vg<8yI3FiwfkC}2?`g1V;p!mfrhpFE@sY(fzhF@$G7flUcMX2aIR zPR8zpTlqrWV@qA`gMBP4?SmZ{qA#%|?lnDtjy7b7{p!yGn-RQ}Av*YlK>B5>Xkmuf zGprYQ6~W)>%>cRu{Hj3uvS4%{Lll2fAid=o-DW)>5ZIF7I}B<6FR&HC7p&(^0&J58c{#NG6Rc#11WrzVk1`GFscx_Y$%ku%i=Awa)EulifN`73a28^(yP!02i6;fI%1{ z4)k68=v+APz}_IRJ;7{-sFwy04emg2lnvDogUmZ>Ob6|@;gCiS*K;ZKosQ&y9SQO; zOwhJQr+9#!2v%oLECxD}2kcC+q%FQxU>AaU^8CDAN?kl;M5R1pjj)rk>89BK+jL{> z|G8m^9FZVhDad;WLU;8?qpIr&ylkU3$416G@_re;ka<02PPLg=nV&I2$!5sxMwxeU zsD2qW0O$dJaPaXc$OZl9IoACH*by@0dP{kJCEe_aA?J@2I>io zhh{?WLLWiLp#qP`Vzr^x&|qi+^dj^g^euGX6S3F~=pCrjZ2X!X)auDtY!y`NsaWjy zr|}iVXJWB+&&6VmUx>winHP(#oga&RvLF__dtofrWD)9w-i3aI3NDVtZh{_#7DB6_ zlvmJBs4mn7x*u8&ZHEp*ZI{Gii=d*fA||vBI{&p;>@uh;Gyob4JpwI&RztZ^sn=t% z=1_lV3iJl_1@t#m^$qj~x(AvAZH988%5TPE?V*WKr?=4lw_~vmP!7}++6C>0euI+V ziN(r7S3tv{Nzim?4)ij#3|a^M1cl#?#jb?orEeZ zM_Zr~(38+E=nT|;1@fRfp&8IJ=uas1eas)U6FLjkT^WmYhbBUMp_;2=vANK0=rmMf zHO2wz4E2XHpzomD*PtEHQm7cT2|5auUmJ_ngW5vFp@*Rlp|7FPx>)QYs5W#xG!}XU zdI#DD{RUN7AB#1D(x5EpEod{e7b^2XEY~IY0X2fspixjZ zG#8>TB7FtLpwb&-vCE-WP!DJ*bU*YMvYZ$r(bDoLMKG06+G*l}G{dpAI@snsD(qo^9#U6mBLx0c0z5t)ELd}r( zEm*C4$OpAGOyW&TYLe0IbCJLo6qHz*JKw{kka!0dl76VAtH#Iv#3%GWT@$gh`= zkFM{3V>izyb{p`n&`r?o(8DvZ4}`Kl@s#;I))YkS(#Pd98@_W4TVOtynoob(e@m}M znMtT`D?aaf4ErHyEb8ci&kj%vs2)@mDgzaRVze%x2QY3w;d3k)mH9V~n2T*1{+~h{ zq2zTC*-*o>BlC$p5d0>nGt>xLh_Ne(_PlR2 z9P@ex>=;Ds5I)C&eTmO3e9nTNh3GhK%luEDYvH%-Kl=Vpapoe%I<)6XY@el3KdCm- z6`>0ZD}>KH_)y-j`1~IF3i{YETke1Qd>g(CQGPBo1FDSu&x7W(FFx;u?u2fDUPa#L zPl+P<9Ba~d;jU^QcK5#OD{#HfRm>7W6XoG?W98|9{Z~@XdgR zLAOEepyMbTdIochebrWo(yQ^g6j}hyfgXV}p>${{L_YsTec;;-Y6~@k>OhsC|5En< zluv2YR~Y&m{X7iKeF^8~3vfOL?Sqy;^Pnf8N1z9xanK0p4(JxB8`K`U8lp1)rmgU4 z2-SotK&7Fg(7%<_`ObeRa}xd0<;ea8`~dVNv^^i6MCJbfvJLsfUIG3Fv;dj~ZAY6n zKr5i;FN@wldI2;Sngu-sO@u~6L!rJM?y_}2N4WfH}!@*m2U&Bvz% zcoK99eWvTG5c)a}pF948$k!?l{ujK7ecF52zpW7cwjAf4khT4vV|;$ZuY=#+AHpB! z>~!9~ANm8j6zA$ap<&QWXfyN+R2Ap+w?HGI+0YVb9YjAD(+au+x(}KG(XZL8fIfi^ zL4QHBaQ^=?v=aIhIt-nLO5mEHD%1?>3yp!MLeD|Vpe@k1&~H#7TsK?+T?^d@&4Av4 zwn4u_DY$kh2i1kzK*Jz=P4Pa`JD~5OQ&4f7J63_xpxdC)&=lx(XajTvIt!KBf$L7_ zYN$Ij7@7dR2yKDBg?@ty;(Fs^s6NyV>JANtCP2SI1?jp2st>h;Zh=NZ^wWM%LvKJE zp*_%1DCsjCyP!HyDs&@s7nBLjhF*kThc-Z8LBBwuUAVS{YD2A|UeKM;WatU#6=*HA z8#)600Xe&4u?wNf&{NQB&YgpNW< zU!eU^9VivL5t;}+3N3_IK|7%zpjKbv_zew(?uQFswnE=QC!j)K#bTF04WRbW zt%Yv1(9r=sM^YXe5*cJq^79ZG`qfN1>#z(Qc>?lnUJl z-34Vrk3cU%??E3!2cSQpqTk@W4{8i`g!)2bpsCPv&@0edXg9PU`U5Jm7yEvw5tIhq z291WMK#xO-(k$422gwG z2Bj*LG(`&JPo}8ZG`qf^zR`g z?Z@~*b)Zz}M(8dm6PgVzf!>2QKwm+>K=^rpSaGNdbS2aUx*fU~nhwo_=r;~Ng7!my zK=ki&RDc>mY0z!ZXlN4jF!Ut!DzqHh2OpOxo1qa<1eyaafR;k5 zp{>w&&@t!?RP1~752^_@huT3i*2!4Wc=?r`54S#xeEDyi^lE%=fUbP)Dd2bUV~~Bi1O?1-b+C+uM9n`acQ&qo9etg&zuN>PyN?MzKjEere?Ae_3Z2G4X{P`2{3ZmbBi>vVbSE&5eQr>mASK_;N zExgs`k7sN*zn9&|f}F)qjh!dn@}lW#=k8k6Y?C*IA77D<|NAKa%3O=v9Oqe8 ze!psOZ{>fh^1ncAH()vC|EFsICS})E>*+n!-rtq~bQOQO^8Z2g|814ORM`WR-A9$b zOWC(8o8I;Fk2k&l=-Hv6eJ6(gurA@rlLgD;Sf2?w)@eeH^$L#v^Pi0q9~bL3 zVR@`i;wFGC?>N}+Cgj-PCX8cvTpa9=6UM=IkT4FmhlCv4MM94Kb;9`AZzuG}{yQPZ zemr3uY<~&;v0qQfv42mkvENC^vHu|s(Vw@Tahyr$k4-S4KaL{_IgURGIgUdK z<4YW5nZG%l^z0gHfBcuS-%!VgOV$4Mr1-l5>C1yW^rpU>RC)TrV&uF27qg#dw^r>t zuG;ghvP-Jt&FiXtCzStusgM6l|9MCGf3NDlQsvW^U;O>6Dz@7n`dUJw{pwTs%>QNi z%v(-A>uXUy+v|P#_#ew>y*$I6h~H25%_n}neD+UO^NF)9pMLGihhLD-cHcOketn!z zoJcsq7>3gM~ZTB1T_27CZ zVg0!7Nyu^ilaS*&C?Uu7P(qIDBH|FY(>;&C^-V&5T<0X@xZX(^2iGkL{c$~!kmI@{ zA;dbNyu?Ml91!NBq7K33Ane8(q+8C@6V@S zdGOm^#OD9ff3V-dpIh9){w82!KNGOAfAQI&&{Q&g<*}a$*x0|2?N)&O3fcT$`VaOe z`15S+N62@NZ~_7edc`-gyy{X)Qwkm-w${XoFR_8+jZ-3M&?UZcM} zwsW%G_ScZ|u04mc6YL*w+=Wm4_Kf3iLXP8bLXP8cLXP8dLXP7zaftrxe#LQcoKEPE z<8?xg<95P0IDRMe$8kF$$MHKM$8kI%$MHNN$8kL&pPx^AaGX!*kK=tpj^lnpj^lqq zj`IL;Z(R(4<=LT7CYj{If1xC^U0LAV5%71M-pZaLkPhWpouCKooH-T+j$I;hc)?Z(LS+1|YEZ5gNmh0;;%k}k_ z<>vY;uATZi%lhl+2)S_4SeE`ufOneSKtk@cJl}MB9yT`{3=!w;h}9 z%5Fc7^C%}h`*E=iu-ifWc8GHDiQn$@`IK#^IiFH-9Y>!xS$}=rWVt?XvRt1BS+386 zEZ65jmh1B%%k_DX<@!9x^5A)pJ1@5XdS1-_FMgac9|^}vPoqpx!;*ViqU<2;4h85dt)w^)CD-D0`EZn0cnw^(kjTTH!<^BDI$z8&BR z$5Ee0*tq6AB5oY@`GWP==L?qW^99TG@!#_K`HZ7J{#$>2{I^^m|1HW}7b-}IY@Kbib5@$#*0^HZKes-~B3ZJVD= zzkyc9%eS_hPrrQT&o{Q4Pd}`7k*~b5O}^uN%qe%glIbV-&~5`l)@BM`fZBVNmv8Mr zehZZk+s&u?Tl(^i?dH=Dx3%)+8{6g=r25-=`PR1iNuO}aZNIf`e)5;Wd~4f$p1=0K z_%y$;ZGIuLJA3)ow)x5QlXvC4d~4hM5dHd{Z+xw7^EqA@ue`Mb`CU~$>_Gl?Dj#+r z|9X`V+vX>!_F3EJ7pDGq^U7O0kl$V9!w%%%pz>kc{G>gc^5)OjHlOS3p~}Oy`9-LG zJ-vKu+x(>9eTR^>ZGQ6CNR{=NOo8vSL*rB9sl*Fa8slc^u`wGx~h$ddXwQYV1 zC$^Z*7~Or0Tb}%};&+ zsp4LFYuo$+YJFKdkl)lR&-t)zeu`SZ)(+%X^U8BRY?JReLu9?VV4u3rHB|Cl|D~K_ zh*T(vel3vx?qK9ycUX?=ef-69dA}t-j^U;~UVJ%^h>s)p1>?E&Bc4~K=J?KsZ9C=u zV0?SzK4CnU`-Smb?i z8M1hPT<21I;^qt2%L%!>*AgFJ;+QZfDeK9zheZXT;A`A=klIUJeT)<;<>!{6VGw~iP}&9!JoH&zz+HL3?l=oRG_N@A&w*4o>JV&%xvUaUG05Z+}3)!RWVd=OSKyA!Q#*_WOrYo+HzD zTr@UQ@MM*5ZIkaf_e*@Y!f~oSB~-q)^?6_s)!xEv^MAOVbGYVENRC(T`Hr=1yW?yr z=dP=eisSa@Z5bc8Km0G1x#QzF<>b7;&3{n(>)H>g_J1kI;R|p(nVNW;zrKeZxIVc5Rz49M@!lc-EhTQY1H?_FsNAlKZu$`XY&+O;fF|{6VQ|;&%7$3*^hyC6DC7m=qz&b>W;yKo1 zLXLF_&YeJnkckst9_uqY;fw zP^T|Ke*SwKVkXp{?a~z{P!eR>G?;Me~UnWLP_)s>t6q@?QZ`j-*M!*niuyc75DZ) zT)cOn@<*%uUsZksmH)HKZ?E!CsQhbG{z;Xert;~xc>Uveoyz}1<&OyDhmwv{ahe+b zb8QQpWvcu>SvPL}g;LJgp=A1Z5q$Bi?fRDu_|rXc_IL9y57?n370=qP|9b&{$N5s( zPbm8$F6qtx8fAZ_YbJR|ADfD_gNihl`6ki`G2SE zL(1N*>}4w6g(`or%70tgeS+IlvN@k%FN}+|IV!;>0e{D7tL%QtZm0HxT~z+n%5JCZ ziK_erm4BDAy9Vq~$|1D5hHt-pRK~~lFD}1=s;{!L@ypTp^VZ|oz<7sJqEeq5-`MW> z-5>N%+7C}Yv~Y=#wT*u$PKRGuT-`X}miTsQB_OHfv z^M6EsQD45XZGOrR$ZzcBTifO*tNvNr&8PiGIk&vybeH)6mA`Ikey&q?n(}Y0?3T)I zrph-}`At;5v2Aml`T_q?vT48RkK^3ODZ73`$@H)HU_F`gu5E!cKImUS&6l-}e<(?f zr?qW<@&VN3jc3T(HopMvk5j$&Sli?~&Mkrdhmw!Lzmn%~Z5uB|wb$A(rKRsPi~-`Hq{{IyW|ot522#iM_}z?)yk zIVJ6N8%+O{fj_^oif3$c!e1yUPd-g~YjYuAzT@cYCMoAQ`nt(-ecfcazHYKyuAAI$ zIE_-ceYRbpWxOW5{2v47>yGo2Iu8rp2MHww&r_`J^;7ckekH%h>ebUgjbCZ8dDQ4X z+P*~jYx`1_f1$E3Qt|0up};)34JxPd%d7m0mHii&w8cXy&rmowo@+A&PkCPD8{6iG z)&}#H?KqdK`l|=p8%o}S^8WWijBVp{es!;X*0%Xc>Ie_z=@ zDm$#~1Im6twfB2vFHrUdRlZ=r4kZ-`*p9PO*+*5p*Ok37V26@d!LIL)x8rPA@jh1e zJAv}J->2+9l>M%<>#BI4Df@F}f28aeRJ`Q@JCsb%w>o+2iRZhR+dr9a&vu+6D*g^- z9|**EoINUkhRT;a;p~K*P%^DIuf8}tDLB85(?a6$f9XGU0^1Ar&4K-^YugH)g33Qh z`TwKZe^zX_zDlZme^tJw%GY)Qm4BJCD=NDx+x#E2Arx9~T5@0De8zIyO>N_SCh>Rs zF+Nb8SG0Q+BEvH(X5P&uec7mETsar#8y&rtEv9fBav> zP2Px9X*a&M9cR9jxBf{VAXU)wSGMDfm-f2;6yNV}Y&ZWym2YgDpG>yDeaa5$?SHt8 zk1cQWt*z zl>aj-|2dWag36z#@?TQ<+I~6UA4=K4BVpI0YuoYR^-#zgA8XtE6q>)?D*k+fyy_w zoe*cGiuZM(d?@KLMDyS8G`3s*u|WAyl03(^*{*GYL;ujI*S=8FqpW}w8zz!upPT9Wg)7YlJ zp%gWK)^^9^!9YC6S*`4dva^((9k4@5sy)_r>)ROccbuup{!rNy19m7y#kaN_e@npM zaUNFoj({CXo~g#q*lxT}1O9m4rR;Z zy9si;KXvz)s+`*$=M|}sqtbs~RrZ_8UaD;RXL-H#<~Y-poull>#daGogHx{Qyr%qL zSN`Wyb-wK>BIVrx^smJF^9z&d^WU!G+MVh&y28#b|E%QO_J!sL+h=Vz|3#G_v>oSH6@P%L|5+(-;yKO|?uysGPn6wQ+2ZN>_X@Tr z`EA%0-1+1C`5+vGK2?4w>u4kL?Ik@LX z?)M(#_W;~>8SeEfDbS8kQjGiQ#Sz;+ukhjsw{b#AW<0nwt-s*-gbGl5)7{zFO)*IH@=~yk5xQl+juD|-`X}mS>;>X&8PbO<9`bEdGmvN z>4EbVobLqMgYBCm+3~~gMFi|nlDYrJrD#0${kZESo@o!(OTZ4LycHM^$JrOmPojLZ z*Tl#DWYylgm0eSwx4Zt2tNa=&f4a(FEctGQS%LP@cVg+!jz_2fwa=Sh-1}DJLo3u9 z?@%)NV?Hqx-QfU0Sw#_d<{vEyY*0%Y{ zi=C6$WNiCF*0%XcZ%ADJFU_~H-F!Np`=0-#sPfYwg9iwvAta+Up+=W83^>)jw<7{3N;`@1GB2+x+AuYP}fSmL%>{&B4@{xTi- zZx3bPpzK=%^*hc&Ss!ls^8)chDfE7wHy@7kygI&@5`VY+{6KlfNmucWZTb^Rrufa= z{)z2dH=OUSSI1eQ+JB#lZ)_Vs<$J_$?u-8_x73bjD4E9ha$i3A*Hrdpo}EPRS99E{2vKg-?v zLp1K^d+iA=qUwC(_D!HYj&o0-e%Ce~kn5C^zVh#Ij;+semP&c!k8xJxey7ZI&JP;8w&T3a*vZRv;UCw}8WwTt$*UVYd;l|6yudF`|{uT||7ZgcTon~F0@^?#sh*Fx3q z=T!dFs(cfb|Dvj|v&x^W?9$5art0sd?Di`D7kV7o_Qpw`bMyN&sLA7haU6cm0q%|0 zwW>WU)VRxYR>ygP5AI&MSJb!^3)rD#{XE@#uYhZ#rnFW4>cqC!-apyKdmC!Lg?sH- zp~hp48jn+mL+cyY%f5bxl7xG4rl~l0sCnqB+V{6_e&zaiRrPmK@`cSJn1A zT;<=b?7_+&s_aWueJ`l^^OSwQ@_$O@r>Xe;l>LwLk14yUiXT#TF=dyM?SpHfWHVLY zZOYcil_WLaWmWvgRDAusjR{R{dL|{IivR1!cEU?a5U6jZ}X-sQezvUZebbs{AG@zl5?o2HGD=dO@|Xfbt)p z>`|(|3}u_+6H^NPkjgKt;*C_>cQMtTa@t?z7ghPQ1O3DIveo=`Q{^kF@`F@+o>1}H zDF2zNe{)s-B2~V-@?W6xJF5Ins{LbC`|nZycdGVtcz1gU6_|$d*SfajOi=MAs`8ao z{lk@id)41NRemqkzN=J!?^pi6Dtm)!PbpR3DCPf%%D+{WzfIZ0l|4wsyIuAFCe@#B zl|4e)>jSp@UW0#swLVaPs6YGxM5vULMiUaW-JR6}u zZ~xgu*;grhrHZ#o#k*bkKdRbyhstlQ?1L(PU6r4zY z+YnwuanhjIppw|l-2?4{8lQ(>m4*I*ZY+-aq4Fj0i+s>mP(wTt9tnK}RmbDvOlS>M z7LTgOKs%tzaTw2nK7eXo;5ZRzC3InF#~B5E3?*HNr}of7=oHlHB0SB3jzO){Z{)hUNx5`cC>Rm$V85wsa9d$Hr(39W`oT;e$Wp=D6YrRW2+7&-%Wsen70 z&~fP6iuhNxpdX=Tm2hVa`WC8N8GV9wLDj0@U$%m_LglME&TwcgRJ3Ub@9{!dIZ`7RjY?Oq5050s8)THg*HGX8sHmv&?C?us9HnJ z2ecY0+z9gl&4Ye{n&H&tPUu-^2UNZZ>V@V&KSNEMI?jX84ygQEY+yG@k>!H%v zE%b*TgFb{xw#M3r7DInPty9rQXb)8OTJ#y32OWVLw!s>LwnLY+#r6cf1D$}XwL?Fk zWzauRqxO!I4ZQJyfzQemNG(fYv|-u7eLW8~O&Sc0J}B%7H$IF71YSgL0tl zQ1R}_haQLiKlZKzUWy{=*Y51&J(7rsC?aP(P6Tt}5IK%RnV$R{i zoH2_z2Mm}ahvCeM`AnytIeq`?+S=}ZGqbbty_MbWU-fi#_;+=8O;68EPtU(WT{pze zuAqsaGeCEN-UKZ@mS{cDUZAr<_kresnm59E2HF6$59mD51EBXooyMU)paVb`fo6g} z2Fi|2pvypyfx2x%G#+#j=tIzQo8n0+Xa=ZxGpt$%O$EIL z>bE(@8PIK@_dx@12t`lb_X2{dIZ#UE64@90Q5d+;MPbBx)0Q}4cZ)Z2Iw`= z5)+7a1>FSt0kp`rMB9U|2Ymw?vK{&Z^bDxyKZv#jO#^)fT4j6mHRxK<*Py{WU~B_D z1?sUQ>IymmGz+xAPT)bOf?fpm-WjV~LC1rh1I@n+zQh6@1iB3LDClEQmtD~=pbbHj zL1%;B0MS1oJ7_J?&Y%-Pvq1j?^_mF%2VDZ13F^2TR``R)g7yJj0Gb18nuPHfG#a!U z=rqu+pqD{?cE{BgbOdM`=yA{wpg-?{uiQX0LBXClXF-R8?gqU9T3|2eJm?V6C7_w0 zPeAkRjny`wO+W{NZUoH+eG6J>GR6VWX`q)t3-5#T8FVD*3eel2Ui(5nK~q5Yg1!dz z-;Zbl=xoq)pbq<^zd(C~E(JXg`V}^ebrD zgCGy+WYGPfw?V&vdLN8F0__Gm0dy7U5zrjaLWf`s1dRpl4muBXFX$D}x1gSfVypp; z1?>(x33LtUG0=OUZihim&?wLjpkqOogPsO`1X}QL^fhR2(8Zu9L0^G-AAxc~n}Lo1 zT?l#iMXzUwgOE7T?)Dn z^Z}^HNzh-=1kkad8$d6CegQ3cGR_0go}jZq_k-R8bvgxg2CWa;2Xq$b9?(0W=2LN= zfK~vF2OSK$4D>MQT~Kfu&QZ{C&~~8XKv#pF0DTOi(=pzFRtIek+6Qz7=tj^}ppQUJ zXJBpv8VcGNv=``9&@G_nK_7xLXX2aztqvLo+7omN=sM67p!Yz{XJHHljRb88+7~nx zbO&e_=o8Q{pl<(1v>0eGXk*Y`pi@E9Ko5c50(}qaIThy#XgFvS&_vMjpesQSfZhOo z3+i?@+7`41XdTcFpnX86f-VN#2$~6c6ZAc3-gBTYpyfeBLF<9G1nmtv5_B%;YS5ja z$3QQEJ_G#(>Ub{33DDA@)j%UaV?h%@lR$@q&IC;Z-41#J^eX5x5S@oNjG!e!D}&Yq ztq0l)v=eAg&_SRRLFa?60No0j33>taCg^j}ub`ImalV571X>aFSJ3*PZ9uz#4gehw zIumpuXgcVA(6gX7K_7v>2Q^)QITGj(paGykptV3_LEC^Pf(`&313D9Q31~X#9?;{U z7eRACUx0oFb-WPcGiV9W@}ME0zk|ku{sGzpbO`7K(Al7ApqoK6Ku?2S1kC|`0s0x# z@gkh}pv6GTf(C=u28{!43z`Hv2y`6iOwc8u>7aW+kAq$W%>jJ^`W{3V<9q|n2kHY_ z60|I6bu z`Y-5vQ2J6_%Rvi(76tVOtqfWdGy=2^Xe?+m&;-y7d&{_ktbq{%1WI3qegn-5>ILcxS_(7(v=Zpgpkbi3L1RE0 zgSG_y1GFn>Ptg9L!$8M?P6nL?Iv;cy=o-*XpgTb`K#zi+0lffv4KxSzG3dXb??AtT znl4A%fO>#>gBAn*3A7w&RnQR7-$0{58-g|kZ3Eg7v>RwL=pfLMpyNTOfzAe91iAur zJ?K`@J)nm`Pk^2Wy$pI2^gifQ(AS_JLAL9X1sx4K33MjtJkX_}t3fw{?f~5ndIa<|Xg26o&^w@yKwp5q1^oib zT!EF;|h_1vn1vC$+C#Vl-2~dB~3ZT_NLqThS)&*?@ z+8nekXlKywpnXAyfTn;>1hqB+@$240X++aP)Qo*wy5n1;`KcFH;Pk`aQU>E`(E9j8 z_s%qtcB4tOJMBSx(%v+g_Mv@gKN{ZjM|=yl0M_^P#~Q35^cNb2XII1Vescu=Z7~w- zGDqQC>Cv0wKaGXki^jvck^A=6>dzv&jj}GHF%#)hOVWX>2|ssUw1a4 z9kdPhMjt&u57NUllfK5TI!$yH)>z*_x6mClCEZMCW7=~8T}b!Q{n$IBchR-o3-YCC zGTaQ-IHj<+*Zy!j(ZO)L8tLbu!{P7d)%JZ;+XJC@ov917GfgMbNwKxdSEFzpPE57X z5p*O?q2uWU?3eKveOr-wg==)Asj1tGe!b4CXuZyBvwBTQsMqclt=Fk-ReZv7 z^*W)=>UCT~z1FR0z1mI>Pe`cO8WpYAac$OLCneOYQ$_35cKvlqLcN-Qr}a85pLcNato!0BDgnFG*(Rv-#X5+@xgnF%4(Rv-SFG@7Q`J}AKb6?HFtV)w{}5O*X-Taa=CjAy|2a{3u2qiU7p_K^~2pA->L74d%Ps6 zZmvnGZfzH-Iw$nt?U1S;-IZ6ii_njLZ`i&ly^oV56WtQ|;xw!}k|pU^{?;nJMe=KX zQhSMhwMTm;NharGdq~zXLHpzMs#<;6D=QE0c!XzbaCgBoL;L(~2+qS4-2=Co?t{Aq z&44?E9)!DV_Q~7L=9ybhN@t&Crp*|;5O{vBIR-}_ClAIGpHJvhJcZO}avNYN|7Y|$ zHK+1DlbcY`Q#h^1!;mXQkHXE+6L34yEV$k1Ww`z6Rk#D_4Y_ zzJNO>;;GKFxT^6}ou}~(u@jyF%|mZD*{4?T!mm%QUTBJcQWbu#6Lo!CprHP6``{}` zy+*btz9^_CW>>W*im$={YODsnE)}jh-=ZEF`T=f7`VDS3;>|$U@HFaO^PKSKtVUHv zk1mXu|LL>z{O7f+NAeWC7BooPzwjs2^2|1a*3M7|xE-kz+-}q*ru|zw$Qd2?^trg_ zvr+9|Y8~b=b(q)GVLrH>XaTtXv*!1V4$WWDI$R#1L#5Us+z$()4pHYpW&7dc3f95x z2kC*{rZ?PYmTF;xDNswJJX0wC^}q?$Fh=WiPzxY<(9z zlveDpNcO!nztOb!x@(yCnd{@8H|oAx?}H0#uR*5020QK52P4|66xYi)q8{zv%R`LR zLmjER<&}C`O-Mb=NIl$(6=H>-s9US7B$=C?oY~N9vAwrLK)}b6q3#7)R;>zXPc^Fj9|or0$wm>ghG1A>)kH z;~lA&$SZZVHAKe&y+--tz~*_cQJa=^jVgXch`aJd*15?2#+GQ!?zFXOS$AG2D_`6- zFO^#D5`KoD_j$$MD@}mZgXsv&Q!e)IPd|lLoI`8jBlfefGvZ|>tzhYgbwbNyP0@;2 zQM5AF6NRPLb!Xe>?dR<}EMCT3#Ljq1ZKEAc8yy*HqyL&V+6%L+YPM0SQtxb}J}M;j z|BTc_tK74tO1-O*`tXp{pBSn4tg_UqkCXE1?G26g<6#+daE>bU*lYb?A>+ zBl>D~ji^4E{wKC3;@ReIIPzWPJ~;B7OkwTVt)S=9N$ofp?bt8d*Uy@ET&&&NG5oAh z^l@LOub(zD{;lR@+}~-(Cyb0EYfi=k9U1R4GLC3B8ReXjHP-IanDLNE&lz_`b?bX` zUg64bcl1e2VdqR?PhFDEnS&jDe8aTk;_cRsap%mTj*M>`8Cz;j#={*M-!d{TS#vTT z>BxAmk#U)tlW~e8GV)sG z+M1i4RE>%M^%KSoRk@9}| z-$uq~@FmbEHFZC8mebdF7#TA))Q-}EQym#!HZpEsb26Ue=;J*`#wj%?<9UvZ9~&8Y z23%WX_yta1-)&_41?Nm{$#{_?<84O9pK4CVOB@;hV`MzD-TK;nP9Y;>7qnM*S^#d; zJ=Z)~r^U}F=EaepPt1=aKcCQhufp!RD)XG;GUuF`W!mw?c5BDDd#-6tUq5DK+_~mt zywZ{Jek0>5H7DcMPG7%kWE@a)GG6P*_^6R_V9m*Rz0=q48yVNHAsNGSGxr&3Ej??# z!D+|WO*@XMp>~wH*-efh9#pSR2^1g$9xI^E_H4%fc zzM6NONm`+q)CP~WYa1j<_e4!d7kB?5Pq=O}n)6_r-w7wR-BUH)cF#aMy&e(A}MaJtL>40%>S__ z^e5a;o!Y#gw7o>H<5q+9!)nU#H(L5Gq8jVK3X|)P?Iu@#{gU&oEoZUXUhXaqa`*kQ zIRj;UI-||?UhizH`E{4pJ--ewRinD{P`mZXXL(27Ps;kzrm#L4)NXx}Uso1ybGf4S zhPe)ROhf5*thQ~z)$-;wy8Vmh0*#^JAf^X*L()mO3>_zP$3_{!*MTdoC;l1ui1 zc2_Fz)#h?F$IfkZPV;r%GwaI^3l=q};n|Xoqu=F4{wC&}9cZ2q#?6@+pJ!r)&)I&; zE5#2b&e`Og3_qKdYggMpl`TyFc58F}Q(b6_Yij;^&VSqd+EuuY{+3rqe<@K%^S8%w zZQdTLqxt3fzDDI*t48HItw!ZKwaw+yu_kEFw>v|sxt!e@3e(|J+Pv$iRf^hC zKk7Oa9!EB5^Yc}8V|3nL85N@&h0Ptbj4^r3ShuV)qS`lneot!i^Sdy)_OA)K!umL} z&Gj*=y~1*B+Rk#t-Sf_0qxZbBCZqPAL2c3I{iuIlbgviD-!SOA1^ez`SaVCOzl;v0 zVy{>FC&R+a55L10*4)97qj(v*M!bW`-v-I=RfaWZvNEwe^LuL{^Sx`Cr)XIUf7j#7 zG+$1peDZXQkVoD_0^R4n^EM7L3wP9r>zl6U59`AksP(!2c` zty5N4hBbFGE9d<`Ll-|@>il(V-udeWWzAnJaa|bS>bfwl$a^W(NqJ5kH^*7Bo#!}l za`kU>x%8hm@=Ztl_Z#w$@~D4cUDPC3fbOmSM9%kBygETw@#|e~;eUm3|8XOKw+a8z zCh0FW#r-u?&yta-lliwF{yV%8jiZfeJZ*x1Flw4#A%tMm6=syEWbi zk@ubNhyVBvHuarIyU`@to%WzToxj|5$X=JFtqc3pd31~OoqFr`9^$mM*5i>5h1KKX z4#m_%(T5krNaJFUs@~q{ULu+FYOFS>JPu9!v2h2TAg%lQn6=Q-1+r5_V;{} zo-XO1OW}Vk>C9BVyWZ41<=q-?-Hn=P@JFnlb-})bU7Uktb@dL_0&S-n1*+g=r$(J~RpLBD4qGxTkJ~ z%4?+@-rN~GBt<=K)2EScTSdMH&l{QJ+C#q{3zt{u*JJY+R1RMcbY?4M$=ua# z`*5pA*Sz@l9*X%-Z?t&yKST9yAWkk<4=N{7em&J$Rk&YT?^vL%p=X8Fvhb{`FrCoZ zlv}o(uW~L#w}IY`sXR$%uaz_DoGtvENczgEu=?wry<7k2Iu~D8|IR+Y4(QX4!sUn? zDQ#Q(<+4_X7@b-4wHR=glVdd%_Vsg1|d2x4$ zg_Wr@1}RfkD!XHG+;y;0=RwcrF0tcr;X0S}My{~7(3x%0TgC-j&Axe;!{{rD-u>u( z)?S!B45i7qtB<&TX1df-| zuXHl*rBuot%Ak z@_)@eAh|v}Su@Xb6P<;*&rL5v{T7V5Yn1tCUpf!<;=9KSaO_13(Iq(Y-Q#6A^4;S! z9Qp2XD8>tJ2j0tT5%~ru`(=%`a=7FxQGRc_8t%e$E!;kIJ={g;2Dou|vxUlY6XfE% z-JaQzPM^W+9c!`D+ya^6?pTYJX*kAWZYz;V=V)PxqGt!KOOrWhU(+i?v+GZ6FK{1m z|7iWYM7-C^rw6S|)Bg5L?b@pExl}DtpH~!GzhX5{dwOVdM@I@RT}KRPk}dVPwMpz=CD6z`|?T-0`ml0sUbT4!FA6#C4r(1CJb}?3meJNd<8-chNA`@6Ssp)EABwr&ZFn2B zG-is+n)#j12z8#QS5iCQQ?z@sT4mAJr@KnTx(`Llfcj+m zU>?wsI#FlpLS1Pd>Xxl#at#-V9TW3kq2!wIAV!mBdKhj?_F8%|Bx*{vezMehB#pb0 z>UgI08`UJbtL?r%jch8d2Ooos1L%?F(pySpddeU@Q30gq4AL_dK zVqAF#Qs}sHB6_ZJ5~e`^rb=iq5??Y z7^JT&fb@ew`mO>rb?Ub=YS*)@D|&$Pn`7>ai@l0B zweSv~{V>-F@I>KI3ePtSnPW5?i8{hvBP-V_7z;X-J;$g-J9UOsIzm-y&a)l%59j&n z_8od>XK~BZ3bZ1vL@U!Oxu=*qdkoK6D^ahm6|7e!lV@lJ^|KQCGpxqiXLyatGor@&Yh;bdGpfe= zYjg$MrxxZ)>zcVz3*NDn^VCV6gN>=NzS^LIeN~C}8CzrWjH{qLwV=!6jV|}Ah%Rqh zL0#6j9}~0BDkrt$v&zjYSg%T)6I)hL2P+}Z)-@*2gc_4)yBd>c`x=vHN61r4&z5(t zF?n{aF?lA|m^_mpPo>_G)xtG-kHlwjdlm4kV{)r!9iLa_S=_!AZ2L-Fi}tTE-8`_y z+UMXJYo9}FOrFCl*kAF_DvvDS{GHP3{0%>=tc9`anCw_po-D_q)z`1k+hvvH75ss9 z&Fufv+Bh+YNV8eehzwaFcwuRypo{;p5!{8+o!StTiL zCC)Uoex>yw-1>!Rz?G0>%@~br-A_q+p!*hF4a^kX40jz`5%1I}bz_VDy6U=?)+>>x zw{*?3mb|={zO@Q1U0R>tUO`FpslikDK4}2nWFQFI-5c__MuyF3(Kzg-@R zuH7yVMZcIR59P6}20zjc8hkG_xKj7ysx6CSmmWSN7tNG%Mk>l@*;e_aq*hUsZ?Y&~ zmxVGri!!S$lpnGv-<5=-Bh~D7zwT?>rZD&6e*Ueb`Y6h>S#23mlD258%xd>mQAwU_ zcS*Emb>)6(qm$O>sdlfAe`UO*LRZGuvS;HfWohr1S(GnILh);MTbVV}9+O${aLgmt zr1rTRQVrDaSxVDDMbYnT%0tnwkjg{(Yj(8yOG%@Z)=0mtDo>VGv$CvQmMr?kSZT7T z&OO-fqlC6?-)yV&DXCR-kA-6IB%|;0dt!9pd-h`QBDF61b!cgQqbT~dYH29?eRsG; zqU)?rOv2xHcW(7GgP)sl>*%-a;S%DW+(egLY%34Njv})Ao@(*S?XJZtNw_Tvd6IEI zX7iPLlA-$?ge3_-Nvl+UWQ>NePWYwEJ`?V>%zchm`OJ$4BwH@0O|~Mepp`xnN0Sr|yhXuIzEoSb6UWyB`a;mdgEcb{6(wNwY9L z=U!{~vtR3@--DMnVk^qa*;aY6q*n3grni?lH&vPR8{qP4_FT4R&y-a&c`iHCc`o}< z=(+3zE&8;K_i$_d+-)5^q)_wh<4DXrz7s9?*NC&^P4 zltgt}_hTtdrxoR`?D_RZN#~c&Ci3sg_p{lNZ!Erp_jlxb2G93+Z=^l5JMp=D1;+2Y zr?UXr|L-}pY>H;V?M}1d_R8)8xFAZKM$4O>|8&Q{e`m{iJMWHvL$J%=)pR}GNVn3R z*qun$WlL!mwiHUcf_Cvr`&+h@e`QOJ-e2(VDD4`WPB+nQbXTj=;_5bk zMBVtdm(RW`RW$el2N5;Df#;?Uum*SDW%Cin10=Kuglqa`z>E-as9SLgqFNoP)nB5 zZ{L{_#jo2d1(lYsZgJ;ZpNRAArGiS!cfJ)<+Fwu_?@_9yMr(;*nm$(ve|`HF&VYXS z1~-jwa8tAlj=ZOgJNo)x;)cJxjmLhcirDW~5&QkJvGsoD6Ce$y9igF*(8rs-4@jdw7z{t}Y)rvzE`E-AmPva|88M&hWsi@VRUFJ&?KzZv|^B3hv`_-Tx4Ga~0+ z<>J3)B$vL7YM=OCET(?o^5 zd*R5fu@sKHO0*x2yh?Ow9JyVV!O?A-3k>T8;0 zM;ZQ;#sI7hzM!eF@#3E$iFZkmSjRcN`t8=y{srOxvU|$&oO=kJiGQOkm-{P1crWL@ zLS^rfP`0+#zM-6x3(R?7DChnK<~%f%^WXw=9vRAcctTEJ&s`0lg5GYSW8fy~`F0^a z*Va2BB+qdP@@UReLOD+=Fy|SeoTnw^)ITlC2-x~+F%?>;*VVH+w*Kow>+9)M?>c-| z$E549evxtx+Brq%nKSGHxbx9vrsXfnjxd*GN0@2e2y=IA%U|uuab=<$dVe8p5O+Oo z-8M;A(z7}SW**Wz_vMA)hp*JdBWJS63%9~{um4lghJA{@{-1>&*WKpzU4h6gvx-tt zY1i!#puc3UNYJJXu^!~YaQvv7NQ?d2A&8yEXiS>z> zM80@~ogBJiFl z0PnC^yzn{yQ~~w9zX-f%3c$NP7BAd>&lOPL!$WvFf12%$NwX5iB+d7-m+!^IeDVGN zN&)g85t3i=!u|DH0quKlEMB;M-zY%7BSUz4Pa@~2K2h+mJ@T&_9(TjfU9^5-dEP2O zo})tY#N)kF0N#`kp6bE-o*ukgupWf_?ZX24?ctCd@%8$+fO;KU1l}hF;LR)o@3R8% z4hrFEyMO7m`xj-j`_~1u`(q(F;@kb30_t^qEM8bIzAHe!XG3_}PCt3=^g|i#^h*J9 zJQtEf+bLYH-wME+RRmtD6W@X7zYn~%2)v*Gyhn?`YbpTm`6BR|3&4A(2)vF3;5`z; z)BEB4YjXaKC!v?qrf~f=Ih{MnY%6~KjXraj7t(d7`QZ+sYnnJ$FY1ciEqJzeL6iO3 zy!D#K6#o0QB{c0&+yn9x#f5=@Cx&qGe>Av#iSO(9`qK+&d@WiGN4^tU3P*m*y-=qB zWi5#3;Y)PNiZoFdn(x_n=33uKgbf$(r|mzGH{EPCmz|w9B4`@t)^d? zntoYeO#@m1Uu ziZT_?<9)Q2NR+~^PyBq{qG>z)VA|oQ0^6aZSH4^=^&F3vg75LPWVe1956vATx|!>) z=ILv$zW%#B_X<9>KzeT>w0t!U%ht`zuw{*E6k0yn!hO07&~z1c6k2qj zZiz2Ay3^Khd(r8b{SBdEI6GQs2WQ^@R(1u?aLlFkKW*;pU$rfaHNs#`2G&!wpFw=1 zWUP?}Yez>etz|KCorpTNWNW&SgY{0ya*Z-_ZRcPm$))dnKEUdTOK4r(v+$e#4RIVq zeNL7j2dn_lmQUfo$nwQOxV@jj3XB$VzoRHr7TG6k9O{zF?iO|( zzDjE`k`1Bh@N4<*E@JuyG45O*54?V~DctobgBF@b%VFi_ZEe+Q9=mkBeSBSvUr!o_={j_zb&gc#48SXD_7rt|ne%U^oa=X}+x{7fL zv^Kuj!!@+RI>V=3w36Vd+yO(T(uv_aC(T<#Z|X+(R-3`r}&@_ilKD{o&;HhsAd(x{GI2Dz+` zCH2L8rY@(KT$i3Ef9bmLk!g$g^7YNe{-|evIuPy<>VWg-Jo=6H?WC(jdCk{goNF!F z^Egg(S2WT_>8y_IaxTibEa!}zxq8kX+)36p^fTq@$S1jEoRhqVLegeB-1N?oM(W`x z`zhKGZaTG_8Lbx0jsu03J;f_KsjjQX*457$o+}MRP90bM(Ya7bkI5rxc>dEL<>~y# zpX>ONhI1}ma?U>#m@_>3jYQ7NBgZ|})f3R)1L$Pa>#1xXALr;QYwG%~bTwQz-XE~E zR^j~#qjM(dt7z(}Mr%c1#{nyyTFBE^zgNO7v~pq#orx0q(^S(!dN!Z#v`}GZ^Pt3X zWYjp%l=BVdi9BkYlTc3heE2KMi9R3vmI(LZ0OXABiKLv1m7Mc0CFfkSkfTZ6?hvk!cE*?+!;k zJ(t6C2e|`~wz~`W7R``ZXA(Lyb93DT$(rdtxcz8`k#Y<)`YAdL?vJ!uR7lvr4vq~!Kxm;P=cC&z)q8H&FNPoh+(bKWl@@%x--ZYu^p?zt;-1mwvo0PAZ zl>PFie9feM!=$__GG$Ut-$LGgBz=B_SJR}N?>ITH_Hq{5AMfVcD5zsR1;s*yTEeGSYZ^kwV}L(V3-qjT>u zc609EbbL_E?+oTQ37GOE!o}R)xxa6X`IEu?A%v-A{$}ET3B_v*N z#N&rQBFfVUSGKJpWb^aL(-1e$IuUuI`bn;RGUhgQmK6`J>)+8x-rTwM{iD{utBLO% z8{gf;ck67g;rz{!=I&`?d&I;pWMX@@ijAs?jC~6ueM|PtZmn;BFj$KefFw(Ns%eq+FI{CxAVW3bn@*q(^8fFfYtqdBgS6ksu0ZFN3qQ!TG-|j=Te% zjF^D-h1*2?!=0BtL;O*cMkudxIxsip4M7UYBdHHIIS(~?J}`MS{&0ltM@PclpQgY) zfc8dw$CP3o<6vsoaS>rBIAMx?lEFU3V4r5N_cz#4y?F-WTS$6c%Q?%z)bA^$=e_{W zhcq?YXHj_PICxR<=Q;6O-UUv1S_f&ri;y~?OW@8+Grabb_{&WEG!y@>iC4@kV==Eb zd9F2i=6IObBWypq0q*{E6Wjx6E5zGAxg{3!Hlz;d4!HBuYX(!>?Jk5hXV1EO(QZ6v z(K@=le?QXg*GdN-@X8Zib9MS5?w~nLJk_=KCC)#H6}#ef${divTfe(5J}rL@rMg!f=meVva{l3hlNz)?jqcj&hw4 z6J);<*LHglZ)lsT3u0R6T;yqLm1mxaJhFGfye7|i$n#xJg0C>{uR-%6rkO58jO|nD zx%m+@kS;=u?K!FG0*L8Hw<4x>8!TvIj>*Qj_34e6*7cEc`j~RA^U9I_>1)t@4UsF; zqKHY+Hs*?=ts^muo0z@47?FBOgLb(m^&b(|On-vgLemiQO|Es;HSdf2n|N(&(cXvA zOD#0e#Au7UHC-Mtt!pa1u%anP^9b58=A2sDphfkksg)4)O^R8d?%QEetADbCR<(;_Fm)Xw0@dp zjZ7ML5>QffD)OD5lXEj8=fGC^-pgW(oTnhoUbw=mOs5%{&M-1*`%TEzSNiQN#CE5t zDDOWxY$<=HDPLuhbZ41#iZwMWlk)mEc+Dg2y_R^ckq)tkp_J!Fknd zNBwi8=Fz|2Dt`em_?%W*WWKr~Wce`HuNNVWs~_@oVW4@UpnZP{(ny<1d&v`(DL}qA z*Up!jI!!Zm((**+e;b)KOrChWpUo?H($zzMmno&(oS!9ecOV3JRWJCo-pM-l`T)|^o$96&V*^7&ocS!IU?ny(VwHh1blfF7L+gDO=$@_ISoya!Z$o8Tq+soi^r=9J&SHShlaZ8!2w#L1N zxK6pau3p?5UcO#l+*@7=GV4{$9!P1+8{y@9$HUyfi|g)j6Flx++ zUdmKgSI!{IiJVQ~xOD}y*^3*UZ3&6%=*4vg$2uW#UA?$&;B0$#2WR_lI4~`@wb#}? zvX~;-c3#}h*?dx7&un?Z$xK&ek=dYXkNjm>xn7}H zXf<#xIXOFf`38A$W4*Yc9=8ZMi#gaUVUQO$1aY>NhI-sEue|-U`9uqbBaY8T>4y;PZ&Pr# z?wfmYTYB8qUP_tOYTYMzaod5j_9s_6FCFT+7+`*q3|*6E&8`D1b?I{X`;hZ#)YpG!x&T2>jZnl5{c{Mh&)m5d+7_CQt4EB0!S=$9^3@T!eM+A z!?D+<{s?@op*1Y|M~3}2m)6D-ZH_;v5pA6dnn2sp_OLtB&Um_8oK8%nNwfzg>%?BU z(vo#zGScpgH(>|T!FW%5I2}n-=omUKhv0jP)d|9zJhpmVplJbSB8;S)lKwAtw6{8O zWMrF0WN#J37*o>8H;I}=c-PMlCzI?)ARbag@d$gyiv zSHJmkO)2rL6J08x6O55xC#1Y6w^*I%0-fL*T2s7EoK#mj(Ft?#PG~MU?%A|wj7~^A z>qMst=mcZr*9j>v$}LtWIzcD6hSn6X6Q|UbPRx(J+2==d$+2S-Hjjuj63;p@e+6`c zG4kt#lo#a|s}u7>C%A^z6t5Gf)v-?eq3I6|orsuYo>9j-aYoY_4V{S4iL>fTC%O__ zGHzE|scEGcose{V?dV#8YX@WGzjjD@QEsu+%!2x zC+d4XaZVlU#M(`3H*_N6+Hqc8=|o37$K@xvay+u>$QYfFc)oUYtiZK{G4fwKq`WA% z*lR~eTsydi))as3xS+0d!oPO>nE5ed+s^gX_qF4qI@XB;nhuB=C+b@#E~#UkIK1ib zhE7DxCoZcio#3yhn{knl3IASn>!z(^bfTW_JFcf2p+L9f zl<0Q43%l;#1NSbvAE6I|X2L!O`(!Q^dwh;Vo}uSyHoXMjE1=gwZ#foh*33~4y`Qxo zVJ#TjPqOxN?0NM+vli$_r2Pep%YsygRL4}8RJYW8sh+6?c@b%ZSva+Ds;`M#EVX3L zVhvzQtz_z-V$16>eVvGa%m&qyP7F*fhc;Xx*TyTsw@PXi!>2>pr6H;E3`)PXVqQ;3{&smoJWqJOT*_7Tzb@ZFfY(eSsxeGrXQ=p6I*)Lp523z%chFzDR+$#cwykoJ+( zg^nY--pG|G5g?ugna;_M<35}63^cT_HlIL@U%@)jE^z$ ze;X*}MY+X(8`uXr!8Npobt2!lf$cL+yqoRQ_Mc-mt{qla)Ym>b@qR-m60RLlPbMU+ z*lS1e&nMbPCqAqho#;z!$+&!sGm?(y6Mda)N2&LsjFEpnA>~E6#p*;~Ts!=l<)2Rw zwU17GTr)b+xORlkf=^PPp?|)}_7TySsjpMtz;ep(;1=_~Bwsb5lyA!q*g9lzyD zOP)`pFdquiP3h)z$8_g(*L1gZ_jHeR&zQMg@$WlihYZ~*Biue3BI)=!WF(U&`-^>!*$?AHKdpv2@;Fg@&oO&t`!rc6s{I_ZF-~~uVwm>1b}UpgI?*5h zL+g*0&||oTBt+tQKGEM9CrX`9Fh>6Qgp?QM7CWElk8y%)Xid_5V&QaO^v`11KEm@n z`1+;$8NNT<2LV;+^NE4!<Pn^`D`uKSN!vd#yFvEXOHbOPHdL#)5f(UZa*v0)hM^vaiZ9J(Jj*Ty~mk-e%W}A zX~&81eaBYmdb;n>brX8DE#vznzOjCydTZ~tshMlXQrNR`DRjRceNC{O#Pb|;sS3<7 z86*E3Q_72Si@kO%g*hhI(3+$lS|QeKo> ztWGQdo$zZ`n>z82n$d~IeMk5#*de_W`iDu(PT;LA?l~s!nYxU(XR1ZAB@q5-qbB*j zV=`ph7qnBlI(w$7B*{nK=XXl_b9?~6=b7xIo17~;1tU#KKb+n>b{}2cS$H4-te<_w ze)Gfo^!ie;{QjP)T#7Y2q<29ICNaB!x3*lJut>IqVs&B{=mg`mw@$GBR!S!rDZftW z*|H3}#roM-4V~aptodhp67+#d%p~yE677MQz0-TA_k}$mmx|N+9ETj7J}iA?`e>v& z4s;^OBH0p%PRZdMiS%qw&)T!nV$V*Wm%cE43DR8-X|6O9U6Z~(ePjBT^zG@p()Z>N zxLj*yq-UfbGI5WjAJ18$r_yRA?XzjNtxg{c6X~m`abgzQkV(v}v}?;9Cwwd|qqu9w zEQ}M3)86C6a@ZffQsV?8iu+f?F6qHWqH6rBLC=Ij zj;qmXIJ>{D$Q+ZA@{bc-npn#DgfDhIX7n7>Uyr$(*8s1?+;?yyzE>zlCwTpYuM^St z9mTDm*eM;DJE7{VpYR$ZFEa@L5}A_zsvnEah!e2iz$f@~j z={GQc^XHf{Gvq`ZQ_LLm?ex0^%`ra!u9)OG=EsolQ!~f>BK=kRoAmeTpVGgk%_rds z;vB0v$6S$Ctk^igNcnYwOA|{upYYWfCsuUY5W50|t{pPobE0Ce9pP~z`r1+4II#=H z3C3yfabg8pp2Pfi~@~$1x_Z`LQ#4P9p`OZ}C9N8^qoCxbg^u1_tIx!nM z!8q-$6MQwVlup$0e4+(9(fWM{-*3p;#=)oQ6)c-5j&^I3edY z4<^Nq6X7{#^f*!6d}21{6O7Z|^9jBmtcQD1{2MK3eJ?u6-1)Ii6nih)HJCRj3_fd(j0T-$I~C={~_9g2jWSfik@Q* zO=Yrus&D-CZLmDiUk>+P`p?~UuGDap46t$}gkvx+>kVx;_YOfF3< z)~$QC*fllL&#e4C&erfMze2!IA>>&$M+hf8yT!~g!#WZDd}3(oMRQ+c-vZ~;iCv%* zjMLsaF@%OxOeYvAzfN#zVkzenz8X3)q?Jyzo==p1-x1b{==sFZREHwQiP_Kz#%XVz zSd-SQm`*TKex2ab#8S>Dd^L1p%~m>5x%-Z=PDI~#3{ABZp%XhnCm5%p6K$mvD~0Bm zrN8f3H5gRT9CMA}wd}Pcd5$?0^8MA!F-HVz2cv`af(?R=g7I0M^3)qlHRqVzBbAy@ z)b=>BSxoC{YZo)0*aBEG$J`1&fBm@P`N!lrrk_5EEB?FkBt#qk3chEw&#ZXtw{gY$ zlCB-`h_9r_7qvfT^c++0qxZ+Gq)u!zSL?+6HKG&mq%Zm%>BP2kwNAWMBRcU+`s&}2 zPW)r8)``b!L?>pXZ>q9R?0|k$vs18>!%65a2>EBQTkucV-Ge=0ITasw&-#?-7)8o| z+}q?N+A}eIJR+AGw)+J81p65o$I`f*B^sZzBH5KAEBG6bP7B6u*;VD zZm>ig)-9dM&U85LTBI)491t9UrePApytUZ>95Dw42bnPTTjO&aE~yxc;{?~m(!4gO zjg9s(O0-oh|0t4j82i+^oTL{_uR1<8VpE zSR5y~E|%uCIc;pTk5QtnV);jrl*8Dk*5xF^lPjt^AV+|j|&Xc{Il z%v(!zEMkrgjx}NIx5no#|f^BrFm^m8yoFolxVA1{!t|5F!rf+IY}>=UUht+ zy5^1#jz`lliDBMaeBptbnMo72Wd`xqtKDwcl~NjZ#t zYF$p!3#L~cAE>UmlY^7dG)!Wcx0dKs#GD$OYQorWjn8qoq+%?N6I>Td^V*y?HrmH1 z(N?kiqe#kO>{IJi9r)&G8JpaoA~sH2_`YjTT65%V$KZCG-2$w z#^*R(QZW|C39gH!d2LP`8|`D1|8wNAsT9jUiliLIKD90<=>^BDjt^AV+}Xj|Xc{Il z%v(!zE@I9N&NX4|x5no#|f^BrFm^m8yoFolxVA1{!t|5F!rf+IY}>=UUht+ zy5`Og&PUTQiDBMaq6-moVQ`@dW4|>%$KjHSu{cg}T`bLObK2NwAEQKD#qy6LDTlF7 zt;wUYpa#M*A2g z+A5ZR6iGRZeQI4!(hH_n9UrK!xyysg(KJkAn75Yb3dCFyTw%i4Z;j7!xTIn%juTuL zOY_>CHa6PFDA882{G&+9VeC`ua*|#!z3TWtbtbnMo72Wd`xqtKDwcl~ zNjZ#tYF$p!3#L~cAE>UmJA*sXG)!Wcx0dK`#M~X+ZNk`Zjn8qoq+%?N6I>Td^V*y? zHrmH1(N?kiqe#kO>{IJi9r)&GB2~#=G*mR)J9E?+xySPB4jK-ddvj5p#cV zzX@Z%H9p7Tl8Ui7PHpXg4wqDn#c_h`VrgER)5b>o7$w>&mVXpUIgEX3T~5*qrdJ&w zsIIx0!Avv_lNjc$C3+Mwj|PvLF!o#Ha~v+I7>nZs*TvGjHm8k^_AyGdRV@D~l5!aP z)ViFc7fi1@K2TkAj|Y#VX_&+?Z!OW2hF!Lufe{nq##hf6BP;yA%| zu{5vEX=9^(j1p}X%Rh>w9L7GiE+^>))2ogTRM*_|!SiSuCNa!gOY|?q{44mE31h!C zKF8sbim^COa9u3TYjfJzXdk0QTgCE^A}NQlPp!*IdcpLn;{(+-_d@UjnubXX^VSl* zgqW9tmrNM@t?@YymsE_!af0h&X%$KjHSu{cg}T`bLObK2NwAEQKD#qy6LDTlF7t;wUYpa#M*A2g+A5ZR z6iGRZeQI4!(hH_n9UrK!xwnJ2(KJkAn75W_4r1m6b4(cft?@YymsE_!af0h&XvED_Fum&dKy}T16nuoHVG_fYDp+@Lx0ylNjc$CHe|6Uj<*8F!o#Ha~v+I7>nZs*TvGjHm8k^_AyGdRV@D~l5!aP z)ViFc7fi1@K2TkA{|o+yrePApytPE%BIeuRTNB29YkZEwB^6_FoZz}xn%CyEvC%$8 ziMER6A4O6QW1m`=lk|e=RmTUaYwr8tdo&G`80M`d`Vlcd20xlG_FLm~94@ICi{k{> z#nQYsr;UyFF-o*mEdMByav1y6x}2mJOs_gVP+fCB2S1}}n8Yw|Ezz%t`8D{}gt6Zm zpW|>z#aJ9CxGt9FwK;8Uw2x7utz!8{k(9&Or`F{pypXg4wqDnW#TxsMRM{wIo)^isc_gQVwIET9=db zg3{0lzx9-B$+V#Vn8Yw|E&lI;m`<5aCXD^o_#B5zD#qeC!F91Tugz&=qkUl%O{ZA? zQ6%Ls_NjF_NiQf3o$y;vxg8Q3rVDy^p3JiA4CqBKQn)30Z6%1F!%0-xR2TUu$p@zE|^&mz0M?td25M!Bc^wzw+UmvH9p7T zl8Ui7PHnZs*TvGjHm8k^_JvV2onrY%k(9&Or`F{py`VI7!f!q07R@Y* z{$mouytPD&BWCf;;wFs!*7zKUODe|VIKg$XG_TERW21dx6iugC{!t|5F!rf+IY}=l z4V~~?Pq`&COQQdn#4v9y(H{}>$IKs182hd9IS!XpjKy(+>tbnMo72Wd`@$%iPO zNXlXCQ|oe)UQil3;kTZ0f6Dv`{l_GRd25OKBc^|*zX@Z%H9p7Tl8Ui7PH#nQYsr;UyFg;6w}V);jrl*8Dk*5xFwL~i-X2r~k zCXD^o_#B5zD#qeC!F91Tugz&=qkUl%O{ZA?Q6%Ls_NjF_NiQf3o$y;vxs@|3qyL!1 zFmEmXpN^PSGpm{~_FLm~94@ICi{k{>#nQYsr;UyFg;6w}V);jrl*8Dk*5xFwM2hL%%3xVHeu|y#^*R(QZW|C39gH!d2LP`8|@3DXgbC6k0L3D zu}`hbNqRwP=!D;T%B_)E1O3M&hIwo8Z%f3inOW0>vELe><8VpESR5y~E|%uCIc;pT zFN~t;6w5z~q#VXRwJs;=1*M@Ae(Ndsm&{+#e@tSSx0dLyi1};guO^KB*7zKUODe|V zIKg$XG_TERW21dx6iugC{!t|5F!rf+IY}=l4V~~?Pr1Kk{)YZz62rW;L~9{tt;|{` zjQ!U59EVFP#^N}^b+I(B&1qw!ePI+$r&#_`B;_#nsdYI?FDMP2@LNy0wKHp@|Cq!u zZ!OW^5%c%V-%S|%t?@YymsE_!af0h&XTL#(ryjj>9DtV{x3|x>%am=CrZVzA%cWQ!M`|l5!aP z)ViFc7nFuh_^qeh`kD37e@tSSx0Yx_#B7+^(1fwy8lU5ENyS(kC%7(_=CwI(Y_uLr#y+(!C+P*Hp%Z@VDYsE(BlI7W80M`d+88k#XErur?6=0}I9yUO7RL#$ zi=}yOP8%ET3!`W{#qy6LDTlF7t;wUYpa#M*G4jnohC&qe#kO>{IJsm`VcuGz ztq`+SW-AlMertS=!zC4Cah%|~Sen=7w6W2?Fp8#AEdMByav1y6x}2mJl!i|Dt*6{J znQhR2Ok$X~mS|hVY@6BEgt6ZmpW|>z#aJ9CxGt9FwK;8Uv@eXJ=@iR9iliLIKD90< z=>?^s6MpL{_Ybe1HPjw^z}pkH7wked7(Sols6n~^An%YDb!aY~2N=l=N7@mok*QIs z(W!M)V^SNW#-_%l#>XIxp)s_9!KwCo%&#J)Ei|xmjQlo#=Tw}1Bt59e|CL)*>&qwq zPI-Hes2H7CI9FtTome`TF4;2(Ne0sp8cM@xIE|o@G>S&kx-l8sPA5K!k)W{P2NRP$ zNOAVP^o14BiFo;CcL0B{0r|e4h1OjI{?piNAh8eUrUbWQ-}|V2`MHi9bGxC&zWj4j zpC{FY|Gpaa&somLF{c`8{Bt&`9p|R_#(bi*-i*H<7lJpvDJj+TrZ`*e`GoxGkLY5I z24dKEG5*!Z9J`kql6361#^*R(QfV$lVl+jR+%~7i#T`YKs8}n9>$@~y890P}YF$oJ z3!+yY7pBhr{5SWgf7o-gaLkE@8vn4bCpF=}G)MiLn%jV5&NS4X|EAt0WB*8PebIf? z_&0TQyA&77e`${TH#MVh%(;dd|E4akRe#^98*|Lk`mek>=C_H3eoJw-+H*{N^WS)m znb<#33Ch!n=~0kg*mR1s)z%65>%9LDd--oX3wS=R8y6aC{KMYsu(_ORj1#4GaCzgz zw8ZBV)0*OJwZ{pfeDP~R054qJt`PbC^mP@Cl#2-`G>BX5gKLMZcWWOQN{IJi9r)&3%M_rugfuIE2F* z>#XWkG5D_qQU7Y-_TU))uY&vm;eYt|f!j(x$1#n6HMs5b`}O~feea|8<>wmd4*S10 z_T~Tmc5n%jH|CfnG#awR&(R9OJ0daB5fo>uJ;&5FRkAjT1=Tf8;%}_8O6KVcBnu&vCe<(p&~p(fF7%PEI#I z%Fi-H+Z>wf;s3TsN%995aU1`1aoZ@_-xw#7+bAkUzIRAb>HV)qht$Gnk2cQ6@3WOPGW{ikL@(M@<;}t?@YymsE_!ae}LOwgib492*<$ zW0YuX<#2r>DTlC6t;F-o+xa=1Q`ltb93*5xF%V0zVYVd~s}moxW^YKmgsflbT-;niEH`KZHlwiA15039i{0+{JgyoyloQ` zZA)>s+V>qq4V_5rp2!5{>BKgXm~P-U6lbfg6Vrq1V2PN-2q!$d(+x>F_FLm~94@Ie zmm+ZqQi|raIW;cs$dW}{#qy8S1D1iq*r(RzB)wpI)$xJqnrqA_O6&ge<`eHF7Wy8= z+A8mbcu;TvED@6!;e==RAVZRl{nq##hf6BWrAS{IJi9r)%{Ar|rFDOK^NFn!3*DOHY_;bT@*SxEy(n}1rD)@O(Zr6MOB39a z@D8k)@5=AbVdej>{J~thQs$M+>zTJQb7BzM?z{49l10yx z;_5tc5_L7j*~&bhh?l=HpGfSSI!thMa5SzHOk$XqFbO>tF~AF^LgQcy?Nj zwJs;=1=FjJ4^-D&V~$x`_m?-v+#<2iEhx@bdyd(7SDx58F$v1kiOpkBZSdw4XB#>( zcdq5%%yxc^Z!?Os)z^u}eMd~EBn0Q1w8Ur8rytaiXCUZch~MFHa{nPAq6+inG<%30_^|uc?vsCM-0^G}hE4cHdl=prI3U zU6+Jpp^s3UZOk#}&U?`ji8?U?|7MT2)t^r^=9r1y6PcjAIp#)@ zm~P-k6lbfg6WLwK{5{TOUojRCE8KWLvh2=bjXloXPMeGUjrl}rom<{~;_1XfpQbol z{rSWL!2`JCWD>)?gh}W_hv9ZxUMv1mo4%a7= zatQm>x}2mIOs_gFOkMl$5AKB}ViF^q@a*1iNYb(28lU5ENu{|IiA#`DG_TF6adAhM zEZQoTf4o0n890o6YF$p!3#L~cAE=JGCxgdfiI~I)Cp^1P8j^JEx5no0DX_L&vCe<(p-wf zB}gfn*XGo?xFbszZ57Ku{wrV^IE;O2T~5*qrdJ&wsIIxjwWGA|FYns%@5Dm?O>wr` z*AAjjgHLg~Fo|Ja!X)%_#C#rnZo=4ajn8qoq+%?N6I{i!B}lB`*w|>F$QKo7<#2r> zDTlC6t;`x&yYgaNOwyP4u6#^l zq5Ow|Xj|=f5$BQMkXnd(qPp3p$PBZ1wL&8#nF0CG$ucMWbn5xA`1@+x-u$Je_#UkvZD?7RA}>>jdvc?(e}a`;)Vz95dZe zV-NP|o|`*EdABcrk2Bf-i)*X9mGNF-9BTI_<5-`Q5Y5YRjXln|O@4po&ER!dA|^4y z3D54Eh9n*Pt?@YymsFZdk+=jYMf2L68W(qD$)c@d`NuZ{mVv|Ar`F{pyDs|yhoUQ)7XhSEGdM7%*Je`;m4eEr>p*UM@oj5l*89FD=29dsK}ylQHmAnL9a*wyt62W=+<;}^F!rf+IY}>=UUht+I_BmC zZ^IHXi4jhCcIOz9bnLgr=QvzaX)Zs@Vwu(Q`p~n80^`j&o1nQ9B?NjwJs;=1=FjJ4^-D&V~$x`_m?-v{4lZ54=K)8 zdyd(7FPhjnF$v1kiBDosZSW@)XB#?^N)rX?rgU?N65b2@lHzRjb>iaSVq8|4#0V!myO$ce6sax_*l&%`ak!+?T#Cdwr4-G3X%0!_ z;*Km?v{fws$jBl)`_!^zY9+m3de!lP>X?%+GW_p5%0pD3;G%6nJ-L1LjFP@Jv)yYlyA{>rFA7xOR4k8)V~|0VfJE}fPV zfBYP2zs&qE^Ihi0%r6;g3Yt1Jb!_Sq^UX}#{Y&zlc##W;*)TE9h7@Njvu-<|{JcAd zzbA?8*TF(_4DTNzJAFKkJwDv3_#DSH_9SuJ=lAPxJfA47@5;OH_*3G0(Lbf)Y_;z@ z&J0e6C1MgIobc?PX-Lws-x{Cea7m@P6p2faQZ%p4sc~^fmaJP-RIFn8$1?+#fy3CR z*5xFE|3vS_PV z{_(_sW#BOOsdYI?FPL6+e4sk!z6$;eOT;8bIN{m-%8;aEzcoI`;gU*oDH4|;rD$H8 zQ{&=}ELpTwEdTgbz%pzju-B>%)!0G0z%m>|In(O44{f zQCe?bQ(CrcuB#JsUrlkgGS4UC9FD=29dsK}ylQ zHmAnL9a*wyt62W=)PQB+F!rf+IY}>=UUht+y5<^t4V2dX9FD=29fi zDWz!MM{`IT7k6aIqOD^2M@AOe*{7BzQ!D8O)2ogTRM%YNIc90yU*2=f{)x{q`={b; zwVz|&9^48`#3V*I;n}_2kfdY3H9p7Tl1g(a5|<#QXkMFBj)VR1KOBQVv z%Rl}YunZi=KD90<=>^lPjt^AVT;sl@wC>M0Z%;-Xm6&7{_Edkq6Gg)Sl`kEb?ph;3w9x|-af}sgK{&c9rB_M&871IBbnhyJ0dkQ zH7YeawQg!mYJ=3+)VS367=*T4qq}5`1d){p1ul`8dx=z>eIz}oDV0v8CxFBfF*gD0 zmN|@%VmS8Nn3D3z-?(;Y3l?`Q@7ggsv9QtDjVIbx|Ju>G7ftM*$OPrxi!Kv$_S&MB zNyXV}-;2t;-oNjVIXO$GcMvk0{~q&rE3@2@xP0Tj!*7k>D<^+{Bzhp%+w9{%Epm<6 zeaKMbUy{Gq9xg@h#(bibRwH_+v~1a2wY_eeGO%s_Z|bz(mvHI%to$cCDn(?Ur1}5Z z2Ah3q#(%+kQQ!uE>mDYiUCp z>oF6RrwR!g&#X#o)UQg*md*8JV(uR)&Q|7`RX+LoZ)t7+4e{sMOL^4a-`p_yp4kmi ze{`eD*UlWL|A*tF%Sk>#$qEq-RmY*ci%;9{U8K7gMej>wLmPV+wTEiHZT5+KJ9o;k zPr_t3ygA_KnBC;whU-e`a~xCnzIU3JOUh>(``)=N-d29zWw`D4R@U8>qxVg=p^d$j z+e#1IavF0?w>1j)=bNJ?qx_th6&wLe#3V*I;n_XPkfdY3H9p7Tl1g(a z5|<#QXkMFBp%cF(7Wxat*@jNk>N>0P#);(<$BE@raklz85nhie|9NFauHJe~Ugaqz z$m-8HS7eEbmHe&U#y@9Uw@4{`&3$T~&7PvNCr-R8vP8v4RtCH3@Qykh$3C?#C;0@iF-}CcVq-oL-7ZO?<;^F4 zOM<80Vr}*36X88md9PI7Ew!3^raqZHMP+~1cvobJijQto+1-`n*r(RzB%dHQ#);@w zyf?TPO~WKcIN{m7-_ZR?b#K6aYkZEwC6(q^lPjt^AVT;tkNTKAWC?PyATX4RC6v(>+LG<2dpbfP&?Cz?}nwxJVq=dMHhe@QYb8~JZ#yc?fF^0#&m3s_PPWuID?lN?fF zR*2Rhba^mmsBRUYk?n;*Km?v{fws_-nv2 za2Wg4x}2mJOs_gVP+fD4`9x{mU)~(EOX9VoODfJ*|Jre9a3@X|CNaVZ&+grZ?nbIR z1NK|va~v+IG?yZAPANt6-kn3zxVR%r7Ht*FKQgk&&OWs)nOaFNm|k^!pt|O+3$8=c zFo_XPcy^~7nvPW01?;!R=QvzaX)ZlS5@YDDpj2X2$7c%9%2(>cqJVYAVwe|4*~%LL=qStN>SZiNtbk2w^h}U zAj9JNfK_A}7H1d+@v-1$bypdO(fv6iFLivQGLD;J5RgFzbyiT3#ms2-``_>T-+RvO zTX~Tbuzko$ve3ch5cdRNZ?|-QK^@F7N&^v9Y*OK08n}DW^QPpN`6>MQdXb zbdo|2a@C?0J;732q3x$*PpoT)h%7tPSBUVev4dhpWX!6sK7-u}9gS=5uHs$NH7J^t zQy$w-MdeeXbypE|l0pu0)uI(W!BShH?WbZ-tZRpeEIZRzi14hjgJMQx%&MD4LX09@`hA@}g+HPz0T%kb_*cXhl!3)K+NwV(f`^?GTY=XZi{eo;7w* z%!rIx_0?yvJE5a-&EctW_^e!?BcoGLb6-?;^|NwzdG>SgM4CS_7s+6ry&j6Jcg9U`*q zOkW|wv&IgJ8IduozWNMyCv-Hfxo3;dO4p!hQcihne;$>ei`KJ6&`An8$W@D0^aM+7 zg|>P?F<&?+vhN!3>=p=<4 z1T_q^<>RJltKnyR`~Uo0UA$Vl21S!{%42&?RIU-NtBatM6mpQO7Om(Bmf8w!uZcaet{oz> z>`Y%F!n4K>iW!kHtG@aSb|-W+t~vBhJ|@QX5E!%bw-s-bF@d5xCn@A0S1norleeFOV@fRj`Yby1;A_xVh>uH*+7c*cM8>T8>d6Z! zbTiJmTZ*?x*Pv)pPI+u^jmoW}bxRR+l0pu0)uI(W!BShH?X9sV*0n=Kc1l-PEq#Ru z&l)=@W<Z{LScS1+wn!C4nuXGKHCgqgJ_6t$@f@s}a1f8UigIu*}MNhEQR%rW$*c0p8AtKAp z^c5mJYwVzy5gD`UtIuF}LPz78!+)#~|A#&Qul?@)ANHH=aG>?AWsN0EBm1CjE^dzY z$2m~UKBso-F&`7zy{P}M{(-oAK<)njVgHb|hnBXMHI^)m?7exY_>lNR9Vlj>Q#nyR*(6Z@cS;I zXO(8j(L&LrobuTAM5RZxW|crEDdZqmEn3kNEVUKd_Qal8*A6wZtXldC5uP=6P|S#o zS@qRpJ|@E6BX@e~bUD%}nv_!>+cTnahG?B$0-dCggIu*}MNhEQR%m-h?1^>lP$SE# zrLPd-Sz`yqjL4W(Up?kyBJ4fo7L`tw>>P?F<&?*EQB+h9bdo|2a@C?0J)s3{g|>+$ z>)N44mQ_n%AucK*2FO4$`<&{l$9znLy+;nc)A=#MQIU1DeOW#xc$_+klS`9jOrU5| zPI+wijLM#(HMs;jNg)ThYSD_GV5zOpcF))o>)N44mQ_n%A;Po94vHC(F{{3M%;$-) z_sCsdx?GMliYDch$F?^ry`pt_33QS|4sz9^6+OXHTcK@l?1^>lP$SE#rLPd-Sz`yq zjL4W(Up?kyBJ4eKZ!f)Fjx>rU<&?+vvZ!1pT5m6bPEyE0u3EIBCs=ALw7o3$#JYB< zk!97=SBUVev4dhpWX!6s9`i8~_8z$fr3G@NQ8a;9nMzNVnv+W>M>5b!3OUGC3%*dN ze(5i1L2K1dQkzYU^+LTQ4xiFUApyngbE>Ug@-gA}T|%!ct(4=3qDeXBu{}2`=Ze!yUcwKBnH| zLp^G6#}W4ckw7OYm0SJv`UT^iYD+XQ|b9qbAIXk zNCrAdAqTl?!58Y(Fa0GgXs!B5YO|@aUZ|JE;ZqtZB%qjmPPNrbK2P|4m(a(Tj+f(y zq6xgpR60*;=9T6}GSEp1ImlHDzEG!r=`U$PYt>Iun@x@NLcJsopVCMn0mbZds;yq~ zG2!(hAAWp=eT0d2G*)it2$*QpiEB zTC}1kw4klfHnC(~JJiUsYUwM)vrC8pGEmGur~2wK|2`4+9=XM(#nOi;nv_!>+oe%i zDq4$6ppz7GkgFE0=n0nE3T>Cho>ThF)nh&;!roI(pHOuE zc?V<3dXnMG^5-4wsZJtRCU$;3CRb!;t+e!I`FhMwjs>=byEoxID{zph^n9W8PS7g3 z2Sh7i$f-o{1!8EUT8jLY!Vg43L3h_Bqv8kNKDgdygDetA=ZI zb^R*pQFBIAu<~_RuF>^d*Y>iv`5ImJROj%*(i+Lmp=eT0d2BC?it2$*QpiEBTC}1k zw4klfHnC(~JJiUsYUwM)3rmOrGEmGur~2wKpC`iJBd5)torIPpC`iJBZpbE^Pe63^vL>D@MZaD2ai+dP|xhn&lB9ktQo+U1Y`fD4LX09@}H1a;#__T>_n?kb_*cXhl!3)K+MFZ0w13?NB4js->?G;aOt`#f-?9 zRbM^kpB-WEDW|{4==|?H7)#bKH+)(C`wsS0CvjS7nw0nKJNgBCms3o z4))S`!?9~>bWIET;Y1l3^P`f#<7_;Q3#^bqDt_>x#mc<<}kTsm`IUjOzS4EAC;|3MyZgud`xLbrP{kI$XD{>!uL{ zYI>uxtKU<@J@nUTXVLk(ZT3_r5m#m5wJ12fa>RD`T#NELmRFYTFuxY<f7Ovl^WS%{r#gvvx)46^(B}<^fp4b5yPzNq-(VGT(BJ;|SwS1gf3}fD z=g&K|pE|q6m0x%*s@H;u0yVqmH$U7*|GG1a&aXw;Q=LStbPLzs>Do8MfSOC9va8qV zau5A=c3E`3_KrQ(NgTUISJ%iQ2CUx2YFho(#2Wd%gdbVRp(g)*hu=T1T^cJB!}XZD zRuOxI8myhvRgQ0hdQ886UaPdOcr#gxFZ)xHGh|~X{h8R%O z6O~>4KjOHDS^xdbm*xK>jy=^m)bl@_C%|Eb$mfa99fwy_OZvPsd@c$OPek+QqOYbS z)yY`K-k-pI3EY|3o%bhrZ$s~ewBKqBS@qd{q<2zK$KQ$qeNOGvW4@L@s~7cqLil|G z9KK29-zTzq?Ein6{0kzu}V5zx2@}@5d&)Qt5E#b64LM& zq9F(U?f<{Z7E%wGLt;^N|C#g=5}bi2Jf z`|N~2?ZVN<@z?wj;r%f|PpHM1KpRXKd$e;;1srwqF~OebH14`FabZ3twsP>s=R9#+ zJ|^-pk^1boE*}&5m`II@#rc@X$3$vOd@dgo`ItzJi97N!k&lVgm{_`t$3)V>tA#vl z7Z&(Kd4nPOcGylYEzgS4ZwLBmn=DzoI1Uy2tTtW^vRxgU-v{YFBA@O{+OVEHkTTk& z(bw_qC{N4U@$}oSJ}qZlX*qb`mrqldvaR{>b*WDov7Matz$~4#EX~tCEl=~*d!=z} zakZwzHw_s~x*#A9h8ITl3@BZH?w}Vm#C(Qci3q zXFU;mERb;wKt`RHi`(l9dfZRi07l;k>6gVAMOwA&>xhiG3}T2uz9VO!zJeZcOY))XYFGsAn6X z53zcI`1nE2HbBFk2|N@0`1SCGwkvY;OJ@W(b-hgc{l`u;#O;X2Pxew{D( zY1#l$_P65G(9e=*=};GK!v;Ej@?)Y;;Pxi?Tb)v78$kFc@3)mQ30UaU1{I9km(dqx z>6qCrkTiTzA2fY{W=hM_JnZR%==(<;;3>Z(-x3N+-< zVZHAQ_25zHhq&700`YN$9^}+P9TH?nK)*nbb*SHVno`)d&dzG=PT%R6I@wmbZRfID z&ytO`+?HgoZ62R(Yiz5H9jo7Sn-T4pzum2!9q+C=I=ege+<&_s$Uds=v~#)k0KQA@ zA!ULqxP1lpiAuqhgg;oy1mX7;EK1o+=z|3JkK~2OZj#XOv7eNZXu}4$kKjInpu2>g z=+RS!f1UY#y~w8u4L|0q02|ViBHyYHUBt7eY!MUMI9O=leu8KR5rdbQ3X_D^?~2eX zicjzw*8$?EBr?Q!P-KIBL%S%5$3?z1t_cP82cHFrFZNYHJX0cjjREbTw=@>`FUYkE z_N^GTt^SMRk21uoZK3CqzA6Zfc2IErgCm4`dDBZw!#CoEPDy;Czq_KccO);FZP87( zHcDbWO*DY;4}`8S15Y_TKyO;)S83HpJCn>-X>8SYa-^+#6Q$+tNjP>mdT1N_jxnQS zVzS6^%%=#CvbPk}PZb%C-+n^xFNpDhew`)-$ZxH%$iT?<}=~9jq*_(tvTJTsY zvxJ@_I9JLEQh%c0e8D#hzD3F@QWi=lvup*^T=(U0aQdbkaLioDii10}7622w$sK~AoTrYUFlxw71E9E+= zf3K7e2z`U#hor~;v*0aKJ|c9Gq*Kwa+xNFa%G>F4n`+wV_6IrE;mffd>n&3y*TaRfSGtWGkc}|pHCC!&vXMxN*C(EpJs?0iz zWX4%6GtN@COy-;AGS{3bbIn=qY?*CV%4~D4{7!9^{8H_Fxx!l`GtPxF<6I;&&L!?r znQz|VE|VGOa+z^@Wya}uRhe_v$(&Pj@01y5&<)9)Gc0q?yIjLHWxg48SITU&-ffV% z=G`*a{ISe6|3T)O_qhKkv(5Y5`(?hlUgn$s6yr_q=k8|rgnP#Qi+fULoh5xPyHC0Q<~Bz8Gwy#x`Ew5W^X{*r`~~;LD1XWQ zjr&{oWp|&u-#y?SbPu_&xUagexxaH?ci(W|bl-B{cHeQ|bq~Amx$nClxJTUIyC1rL za6fYY+ii0H=pJ?d;XpdrtYRxw(#l9n!24Wfv^DG+)pfO|?2{b2L3Aq) zam!sfJSZxIRjJm-U3p1scu0)cup1n%uXD|T;YLe3vNj~g{mN+AHEOc*L=#E?HX5)~^q_SwCo4L?kw$NQ8vf1vql>)VHRaau71jD&w{p50o$fA>?SkouyH;OEW2#i;(2P{e@!)T6 zkUkp{tzJ2pFmSTFa!yn*-s+=rl>3HmkyFO(qp?E98{c{cup&AE5=QjOF}Gf*W)sIpT+4YsP{qmDU#@x;JZYkHu3rvk zrLnZ^3h2ob41i<9P~{Wh;fcZCqvW8u)U(P zP7aQW`XW1*oS(63B18)rg(-9X5ljDR5#4`b_A00ZXbZYSw zqDjW%!w$xo7mdbL$5URGd16RE&fh%QCB<%5= zjy(}3W{<^OSMg^7G0|@fm2h&9*=AiG!^2nR36ku!eg6AOvVVb*%^A(UMr{Nq2gcFx zTHm5M+N-s`P!FirQap0))52HwzRc)B^#vo9nzS0X(Jyo7I{6+Yp>XuY0{=4yA8s;3 zRYf&A}|;BwVS(RyZFTLPnWT^{=62~a{MIIT3nSetHpI$Gf!NZoa@n% zkL5hJI!9s#iTjIRYD0tYyo|N|k%YM^vjRgbuE-cSaa}lmVzCBW>zDJ*CR@(VWltC# zN{=rbT0Es&t|am5gD;miZ#h+P$|pB(SueQY!OdIl6~uiV(HX>C~f7pW3~2 z>NL?=I(2endy$yj_=(M1W?@lSWV<}JT>;xAk?oW>rfhNV@m49pjv3PLc{q56n=!{I4U{J^536 z9gN}S_bLD6-zYwCztw+5@f&|_^~5`s|Cze>`!fya7{0}Dk>Lu% zUw=#Wn-42a`8&lmR)2|MpJB~#)bQPg*BQRw@Fv4QH@wsEZo|(Q*1oRo-DCV04by$} zWt0E=_f`KvboA!^aFCH+;(QXNJ!kzGV0Z!;^}E!-a;64VN08ZTL3B zvSF`b)o{SDY4~o#_ZoiK@XriCY4|@4zhwA5!)Fbh#k)W_XU_TMgG3UTj!4tQ$5BuQt5g;&{Tw#qSKSv-;}|Z#2Bs@OHzG z8h*lXqv2-_zi9ZkhW8mhX!upbuN!{L@VkaTF#HF@O@{wu__*Ou44*dKWc%?8<9})R zdqejP9p^>EiH4I6_cT1*@Cd^hhDRA5V|bk562rF{_8ATs)(xA6?>4;A@D9U`hF>=P zj^RHVK5h7G!!6rcKgG`PZo{`2o@IE6;X4i28-CF6nD1!6-D&)14ZmjiW5eGVPO^D; zU&EsePc=N(uxz-&@VDRAc7A32hYdewc#q-3ZSZR*|Ccs6(fp_J_ohGH>eG0z$xmy8 z^G&|W@N&bZ;fD-AW_Y{d=M3*NeAw^_!{-bqTK^wuc#`3A!&QcTh7H3T3_oi4Im53S z{=o1l!(SN|zN^P!s^MXVvkey-t}^U5EE|p(UT^qOLyk9&uX{}Xkl`bSPZ_>om>!>d z*ysBph8)-PjX%@yBEuoWYYjhS_%XxJ8a`~s5V#@7trWB3Wf z`wf3=_>$oPW$;%O<4Pagtg>ISd)P?VvpO|&d2d1R7ufyVnOQvVT-oE%JjDw&whB`_{CQLJL4Bn zA@bV!&5B>Lr^2?UJ+JaJmn}QF`{*;zz2KPcx$}DF_SoTzm2nNMR|eKYroeUhJihF| z*w6^IKTNZUR~< zL>srq1bGe|rQ&IYl`BUV&Y2*qeF`FH_Y@y-g||+Sg)xQ8L~lo$iS{wth&%RP@hI^Y ztvA?X0(-D{oXL86=Ey^u{_03`&iV!O%kxj1)7NO#dRDtRy`#0k{yFR9*-hV^W~0xj zzUHWt0noi5IxSL&*xO44> zN8}J29H)}|l|1kb6NU>`A9be&HrA{`zA7a@!sNVurnff>fz?{wcHW>pq-9dDB8~G_ zB$UlNrNBS0$0@&32&{(VJV^ORgvg5jPLab8ubZQLOCr15YM+B07F9m*hUtopK%5JKdp(w4mY{`smAmD$cvn#kzD-PeS|gItXpDo-dE_?$;Vx2a^7b+O2cMY-Llc-AI35oaEkzl`*!x)<#8(RM3>tmAk;9LbuKSts%M%S+Gk+m*WKAJDLhU78YaJ?$e zK+EzZXWig%uRK`kmxm3_a%FTqo;8mQ%7Ti1`QXabkemJWT3H|C$=%?_2DcVVFv|U- zLqi+H#N*`AfIQptRplu{v)Yh|TFvsHtnpANUs2s~)o`Oqg~KpENF2k#@ON z=^dZBqoODdjgYq>7B^5rS*kUX#+EX%{mN|P}u!zcey6w(WLoEsgFGtOUf&hql| zb5ECbAmy@rf|Qr9D64SA>F48cG>6Lrm3qJQM|2om)WfcP`o-riIp?fpqOsgwV%SDv+WS$SU1yq=R})j?Gr`_)=_ zz$|M{&RTPhJV4>N5x*EUYocROF0UJseUyicjTSZ3ifl15hZv^Kb&SQLG%&aU;lNMWGT9B@7T8|varvDMI;D`nje9%)5t#+0S5Q5~$n z!1Z7Rx}KISwQ)TdxKcM99krh7fDP4wez72@7CL6tf;6n)SR6z_RIq}jN1k3ro1PI_ zhSH;+dz($ygXfqsXhc@+9bG3*WMs=hHnvt@3olyLD^E$UBo{55u^Q1ej>o-gN!ok4v6!gqI>MxwOQ2x4klw67edEP!u!zWpY%C(cMzBg($c$I>N2y(r)9 z*?x3m9kup(M0?tCo}`1f3V~}8+Vgsac(WJT$eu57_ zT`CN&U1-ni6(YZ0Gk)q32gDxNLgaZpMC`W4((#*ERw&~0G>MR*_y0X& zi+$qtUi>*|2cFlJq7o(gA%DFPzCFJe5?A(8Q*ob=bstXI^YfXwcS=9q{(muh_MiK> z85qu*YhOrA+-*qs3n36c?fHFzID?9Y>GuD7%6^r7A0ci`*|YyC{wpEy-PwkF{5|&h zzt_0a`s9iCi!FXTLVJF1erY@Hzb&@df7(0yp6h<7?XTd4zvv)!N84nxNl1(x+VlI; zipSL+&vKD?6c{(h!B3>lZ-3Kss=4V2#cmjTiT1>2q|UdGzkfZc_8jMQK|A7eDSLiz zoM!gaOWTwGtq{=R{_}fbcN=@_4w}o_T8-aMw^&YlT!j0H_QawPqAExjH|DG59AC))q%^CxXTt4;gIn*BFZuG99o9|T#t|9)fk7q_ve zpJi?AS3afjpRx`6)n=bkbJv^w(o_Z8r5HTt9?F2Gts(w=DZvKU4d@ltGGh{|~LCc546t literal 0 HcmV?d00001 diff --git a/tree-sitter-c/queries/highlights.scm b/tree-sitter-c/queries/highlights.scm new file mode 100644 index 0000000..04d9a04 --- /dev/null +++ b/tree-sitter-c/queries/highlights.scm @@ -0,0 +1,81 @@ +"break" @keyword +"case" @keyword +"const" @keyword +"continue" @keyword +"default" @keyword +"do" @keyword +"else" @keyword +"enum" @keyword +"extern" @keyword +"for" @keyword +"if" @keyword +"inline" @keyword +"return" @keyword +"sizeof" @keyword +"static" @keyword +"struct" @keyword +"switch" @keyword +"typedef" @keyword +"union" @keyword +"volatile" @keyword +"while" @keyword + +"#define" @keyword +"#elif" @keyword +"#else" @keyword +"#endif" @keyword +"#if" @keyword +"#ifdef" @keyword +"#ifndef" @keyword +"#include" @keyword +(preproc_directive) @keyword + +"--" @operator +"-" @operator +"-=" @operator +"->" @operator +"=" @operator +"!=" @operator +"*" @operator +"&" @operator +"&&" @operator +"+" @operator +"++" @operator +"+=" @operator +"<" @operator +"==" @operator +">" @operator +"||" @operator + +"." @delimiter +";" @delimiter + +(string_literal) @string +(system_lib_string) @string + +(null) @constant +(number_literal) @number +(char_literal) @number + +(call_expression + function: (identifier) @function) +(call_expression + function: (field_expression + field: (field_identifier) @function)) +(function_declarator + declarator: (identifier) @function) +(preproc_function_def + name: (identifier) @function.special) + +(field_identifier) @property +(statement_identifier) @label +(type_identifier) @type +(primitive_type) @type +(sized_type_specifier) @type + +((identifier) @constant + (#match? @constant "^[A-Z][A-Z\\d_]*$")) + +(identifier) @variable + +(comment) @comment diff --git a/tree-sitter-c/src/grammar.json b/tree-sitter-c/src/grammar.json new file mode 100644 index 0000000..3b3ba31 --- /dev/null +++ b/tree-sitter-c/src/grammar.json @@ -0,0 +1,6629 @@ +{ + "name": "c", + "word": "identifier", + "rules": { + "translation_unit": { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_top_level_item" + } + }, + "_top_level_item": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "function_definition" + }, + { + "type": "SYMBOL", + "name": "linkage_specification" + }, + { + "type": "SYMBOL", + "name": "declaration" + }, + { + "type": "SYMBOL", + "name": "_statement" + }, + { + "type": "SYMBOL", + "name": "attributed_statement" + }, + { + "type": "SYMBOL", + "name": "type_definition" + }, + { + "type": "SYMBOL", + "name": "_empty_declaration" + }, + { + "type": "SYMBOL", + "name": "preproc_if" + }, + { + "type": "SYMBOL", + "name": "preproc_ifdef" + }, + { + "type": "SYMBOL", + "name": "preproc_include" + }, + { + "type": "SYMBOL", + "name": "preproc_def" + }, + { + "type": "SYMBOL", + "name": "preproc_function_def" + }, + { + "type": "SYMBOL", + "name": "preproc_call" + } + ] + }, + "preproc_include": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "#[ \t]*include" + }, + "named": false, + "value": "#include" + }, + { + "type": "FIELD", + "name": "path", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "string_literal" + }, + { + "type": "SYMBOL", + "name": "system_lib_string" + }, + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "preproc_call_expression" + }, + "named": true, + "value": "call_expression" + } + ] + } + }, + { + "type": "STRING", + "value": "\n" + } + ] + }, + "preproc_def": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "#[ \t]*define" + }, + "named": false, + "value": "#define" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "preproc_arg" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "\n" + } + ] + }, + "preproc_function_def": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "#[ \t]*define" + }, + "named": false, + "value": "#define" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "SYMBOL", + "name": "preproc_params" + } + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "preproc_arg" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "\n" + } + ] + }, + "preproc_params": { + "type": "SEQ", + "members": [ + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "(" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": "..." + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": "..." + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "preproc_call": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "directive", + "content": { + "type": "SYMBOL", + "name": "preproc_directive" + } + }, + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "preproc_arg" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "\n" + } + ] + }, + "preproc_if": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "#[ \t]*if" + }, + "named": false, + "value": "#if" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "STRING", + "value": "\n" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_top_level_item" + } + }, + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "preproc_else" + }, + { + "type": "SYMBOL", + "name": "preproc_elif" + } + ] + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "#[ \t]*endif" + }, + "named": false, + "value": "#endif" + } + ] + }, + "preproc_ifdef": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "#[ \t]*ifdef" + }, + "named": false, + "value": "#ifdef" + }, + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "#[ \t]*ifndef" + }, + "named": false, + "value": "#ifndef" + } + ] + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_top_level_item" + } + }, + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "preproc_else" + }, + { + "type": "SYMBOL", + "name": "preproc_elif" + } + ] + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "#[ \t]*endif" + }, + "named": false, + "value": "#endif" + } + ] + }, + "preproc_else": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "#[ \t]*else" + }, + "named": false, + "value": "#else" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_top_level_item" + } + } + ] + }, + "preproc_elif": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "#[ \t]*elif" + }, + "named": false, + "value": "#elif" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "STRING", + "value": "\n" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_top_level_item" + } + }, + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "preproc_else" + }, + { + "type": "SYMBOL", + "name": "preproc_elif" + } + ] + }, + { + "type": "BLANK" + } + ] + } + } + ] + }, + "preproc_if_in_field_declaration_list": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "#[ \t]*if" + }, + "named": false, + "value": "#if" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "STRING", + "value": "\n" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_field_declaration_list_item" + } + }, + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "preproc_else_in_field_declaration_list" + }, + "named": true, + "value": "preproc_else" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "preproc_elif_in_field_declaration_list" + }, + "named": true, + "value": "preproc_elif" + } + ] + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "#[ \t]*endif" + }, + "named": false, + "value": "#endif" + } + ] + }, + "preproc_ifdef_in_field_declaration_list": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "#[ \t]*ifdef" + }, + "named": false, + "value": "#ifdef" + }, + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "#[ \t]*ifndef" + }, + "named": false, + "value": "#ifndef" + } + ] + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_field_declaration_list_item" + } + }, + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "preproc_else_in_field_declaration_list" + }, + "named": true, + "value": "preproc_else" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "preproc_elif_in_field_declaration_list" + }, + "named": true, + "value": "preproc_elif" + } + ] + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "#[ \t]*endif" + }, + "named": false, + "value": "#endif" + } + ] + }, + "preproc_else_in_field_declaration_list": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "#[ \t]*else" + }, + "named": false, + "value": "#else" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_field_declaration_list_item" + } + } + ] + }, + "preproc_elif_in_field_declaration_list": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "#[ \t]*elif" + }, + "named": false, + "value": "#elif" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "STRING", + "value": "\n" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_field_declaration_list_item" + } + }, + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "preproc_else_in_field_declaration_list" + }, + "named": true, + "value": "preproc_else" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "preproc_elif_in_field_declaration_list" + }, + "named": true, + "value": "preproc_elif" + } + ] + }, + { + "type": "BLANK" + } + ] + } + } + ] + }, + "preproc_directive": { + "type": "PATTERN", + "value": "#[ \\t]*[a-zA-Z]\\w*" + }, + "preproc_arg": { + "type": "TOKEN", + "content": { + "type": "PREC", + "value": -1, + "content": { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": ".|\\\\\\r?\\n" + } + } + } + }, + "_preproc_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "preproc_call_expression" + }, + "named": true, + "value": "call_expression" + }, + { + "type": "SYMBOL", + "name": "number_literal" + }, + { + "type": "SYMBOL", + "name": "char_literal" + }, + { + "type": "SYMBOL", + "name": "preproc_defined" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "preproc_unary_expression" + }, + "named": true, + "value": "unary_expression" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "preproc_binary_expression" + }, + "named": true, + "value": "binary_expression" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "preproc_parenthesized_expression" + }, + "named": true, + "value": "parenthesized_expression" + } + ] + }, + "preproc_parenthesized_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_preproc_expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "preproc_defined": { + "type": "CHOICE", + "members": [ + { + "type": "PREC", + "value": 14, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "defined" + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "defined" + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + } + ] + }, + "preproc_unary_expression": { + "type": "PREC_LEFT", + "value": 13, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "STRING", + "value": "~" + }, + { + "type": "STRING", + "value": "-" + }, + { + "type": "STRING", + "value": "+" + } + ] + } + }, + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + "preproc_call_expression": { + "type": "PREC", + "value": 14, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "function", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "FIELD", + "name": "arguments", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "preproc_argument_list" + }, + "named": true, + "value": "argument_list" + } + } + ] + } + }, + "preproc_argument_list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_preproc_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_preproc_expression" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "preproc_binary_expression": { + "type": "CHOICE", + "members": [ + { + "type": "PREC_LEFT", + "value": 10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "+" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "-" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 11, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "*" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 11, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "/" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 11, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "%" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "||" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "&&" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "|" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 4, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "^" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 5, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "&" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "==" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "!=" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 7, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": ">" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 7, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": ">=" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 7, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "<=" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 7, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "<" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 9, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "<<" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 9, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": ">>" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_preproc_expression" + } + } + ] + } + } + ] + }, + "function_definition": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "ms_call_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_declaration_specifiers" + }, + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "SYMBOL", + "name": "_declarator" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "compound_statement" + } + } + ] + }, + "declaration": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_declaration_specifiers" + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_declarator" + }, + { + "type": "SYMBOL", + "name": "init_declarator" + } + ] + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_declarator" + }, + { + "type": "SYMBOL", + "name": "init_declarator" + } + ] + } + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "type_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "typedef" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "type_qualifier" + } + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type_specifier" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "SYMBOL", + "name": "_type_declarator" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "SYMBOL", + "name": "_type_declarator" + } + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "_declaration_modifiers": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "storage_class_specifier" + }, + { + "type": "SYMBOL", + "name": "type_qualifier" + }, + { + "type": "SYMBOL", + "name": "attribute_specifier" + }, + { + "type": "SYMBOL", + "name": "attribute_declaration" + }, + { + "type": "SYMBOL", + "name": "ms_declspec_modifier" + } + ] + }, + "_declaration_specifiers": { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_declaration_modifiers" + } + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type_specifier" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_declaration_modifiers" + } + } + ] + }, + "linkage_specification": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "extern" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "string_literal" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "function_definition" + }, + { + "type": "SYMBOL", + "name": "declaration" + }, + { + "type": "SYMBOL", + "name": "declaration_list" + } + ] + } + } + ] + }, + "attribute_specifier": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "__attribute__" + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "argument_list" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "attribute": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "prefix", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "STRING", + "value": "::" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "argument_list" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "attribute_declaration": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[[" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "attribute" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "attribute" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": "]]" + } + ] + }, + "ms_declspec_modifier": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "__declspec" + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "ms_based_modifier": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "__based" + }, + { + "type": "SYMBOL", + "name": "argument_list" + } + ] + }, + "ms_call_modifier": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "__cdecl" + }, + { + "type": "STRING", + "value": "__clrcall" + }, + { + "type": "STRING", + "value": "__stdcall" + }, + { + "type": "STRING", + "value": "__fastcall" + }, + { + "type": "STRING", + "value": "__thiscall" + }, + { + "type": "STRING", + "value": "__vectorcall" + } + ] + }, + "ms_restrict_modifier": { + "type": "STRING", + "value": "__restrict" + }, + "ms_unsigned_ptr_modifier": { + "type": "STRING", + "value": "__uptr" + }, + "ms_signed_ptr_modifier": { + "type": "STRING", + "value": "__sptr" + }, + "ms_unaligned_ptr_modifier": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "_unaligned" + }, + { + "type": "STRING", + "value": "__unaligned" + } + ] + }, + "ms_pointer_modifier": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "ms_unaligned_ptr_modifier" + }, + { + "type": "SYMBOL", + "name": "ms_restrict_modifier" + }, + { + "type": "SYMBOL", + "name": "ms_unsigned_ptr_modifier" + }, + { + "type": "SYMBOL", + "name": "ms_signed_ptr_modifier" + } + ] + }, + "declaration_list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_top_level_item" + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "_declarator": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "attributed_declarator" + }, + { + "type": "SYMBOL", + "name": "pointer_declarator" + }, + { + "type": "SYMBOL", + "name": "function_declarator" + }, + { + "type": "SYMBOL", + "name": "array_declarator" + }, + { + "type": "SYMBOL", + "name": "parenthesized_declarator" + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + }, + "_field_declarator": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "attributed_field_declarator" + }, + "named": true, + "value": "attributed_declarator" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "pointer_field_declarator" + }, + "named": true, + "value": "pointer_declarator" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "function_field_declarator" + }, + "named": true, + "value": "function_declarator" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "array_field_declarator" + }, + "named": true, + "value": "array_declarator" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "parenthesized_field_declarator" + }, + "named": true, + "value": "parenthesized_declarator" + }, + { + "type": "SYMBOL", + "name": "_field_identifier" + } + ] + }, + "_type_declarator": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "attributed_type_declarator" + }, + "named": true, + "value": "attributed_declarator" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "pointer_type_declarator" + }, + "named": true, + "value": "pointer_declarator" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "function_type_declarator" + }, + "named": true, + "value": "function_declarator" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "array_type_declarator" + }, + "named": true, + "value": "array_declarator" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "parenthesized_type_declarator" + }, + "named": true, + "value": "parenthesized_declarator" + }, + { + "type": "SYMBOL", + "name": "_type_identifier" + } + ] + }, + "_abstract_declarator": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "abstract_pointer_declarator" + }, + { + "type": "SYMBOL", + "name": "abstract_function_declarator" + }, + { + "type": "SYMBOL", + "name": "abstract_array_declarator" + }, + { + "type": "SYMBOL", + "name": "abstract_parenthesized_declarator" + } + ] + }, + "parenthesized_declarator": { + "type": "PREC_DYNAMIC", + "value": -10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_declarator" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + }, + "parenthesized_field_declarator": { + "type": "PREC_DYNAMIC", + "value": -10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_field_declarator" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + }, + "parenthesized_type_declarator": { + "type": "PREC_DYNAMIC", + "value": -10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_type_declarator" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + }, + "abstract_parenthesized_declarator": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_abstract_declarator" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + }, + "attributed_declarator": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_declarator" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "attribute_declaration" + } + } + ] + } + }, + "attributed_field_declarator": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_field_declarator" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "attribute_declaration" + } + } + ] + } + }, + "attributed_type_declarator": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type_declarator" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "attribute_declaration" + } + } + ] + } + }, + "pointer_declarator": { + "type": "PREC_DYNAMIC", + "value": 1, + "content": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "ms_based_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "*" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "ms_pointer_modifier" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "type_qualifier" + } + }, + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "SYMBOL", + "name": "_declarator" + } + } + ] + } + } + }, + "pointer_field_declarator": { + "type": "PREC_DYNAMIC", + "value": 1, + "content": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "ms_based_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "*" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "ms_pointer_modifier" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "type_qualifier" + } + }, + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "SYMBOL", + "name": "_field_declarator" + } + } + ] + } + } + }, + "pointer_type_declarator": { + "type": "PREC_DYNAMIC", + "value": 1, + "content": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "ms_based_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "*" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "ms_pointer_modifier" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "type_qualifier" + } + }, + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "SYMBOL", + "name": "_type_declarator" + } + } + ] + } + } + }, + "abstract_pointer_declarator": { + "type": "PREC_DYNAMIC", + "value": 1, + "content": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "*" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "type_qualifier" + } + }, + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_abstract_declarator" + }, + { + "type": "BLANK" + } + ] + } + } + ] + } + } + }, + "function_declarator": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "SYMBOL", + "name": "_declarator" + } + }, + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "SYMBOL", + "name": "parameter_list" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute_specifier" + } + } + ] + } + }, + "function_field_declarator": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "SYMBOL", + "name": "_field_declarator" + } + }, + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "SYMBOL", + "name": "parameter_list" + } + } + ] + } + }, + "function_type_declarator": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "SYMBOL", + "name": "_type_declarator" + } + }, + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "SYMBOL", + "name": "parameter_list" + } + } + ] + } + }, + "abstract_function_declarator": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_abstract_declarator" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "SYMBOL", + "name": "parameter_list" + } + } + ] + } + }, + "array_declarator": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "SYMBOL", + "name": "_declarator" + } + }, + { + "type": "STRING", + "value": "[" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "type_qualifier" + } + }, + { + "type": "FIELD", + "name": "size", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "*" + } + ] + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "]" + } + ] + } + }, + "array_field_declarator": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "SYMBOL", + "name": "_field_declarator" + } + }, + { + "type": "STRING", + "value": "[" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "type_qualifier" + } + }, + { + "type": "FIELD", + "name": "size", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "*" + } + ] + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "]" + } + ] + } + }, + "array_type_declarator": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "SYMBOL", + "name": "_type_declarator" + } + }, + { + "type": "STRING", + "value": "[" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "type_qualifier" + } + }, + { + "type": "FIELD", + "name": "size", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "*" + } + ] + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "]" + } + ] + } + }, + "abstract_array_declarator": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_abstract_declarator" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "[" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "type_qualifier" + } + }, + { + "type": "FIELD", + "name": "size", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "*" + } + ] + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "]" + } + ] + } + }, + "init_declarator": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "SYMBOL", + "name": "_declarator" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "initializer_list" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] + }, + "compound_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_top_level_item" + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "storage_class_specifier": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "extern" + }, + { + "type": "STRING", + "value": "static" + }, + { + "type": "STRING", + "value": "auto" + }, + { + "type": "STRING", + "value": "register" + }, + { + "type": "STRING", + "value": "inline" + } + ] + }, + "type_qualifier": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "const" + }, + { + "type": "STRING", + "value": "volatile" + }, + { + "type": "STRING", + "value": "restrict" + }, + { + "type": "STRING", + "value": "_Atomic" + } + ] + }, + "_type_specifier": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "struct_specifier" + }, + { + "type": "SYMBOL", + "name": "union_specifier" + }, + { + "type": "SYMBOL", + "name": "enum_specifier" + }, + { + "type": "SYMBOL", + "name": "macro_type_specifier" + }, + { + "type": "SYMBOL", + "name": "sized_type_specifier" + }, + { + "type": "SYMBOL", + "name": "primitive_type" + }, + { + "type": "SYMBOL", + "name": "_type_identifier" + } + ] + }, + "sized_type_specifier": { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "signed" + }, + { + "type": "STRING", + "value": "unsigned" + }, + { + "type": "STRING", + "value": "long" + }, + { + "type": "STRING", + "value": "short" + } + ] + } + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "PREC_DYNAMIC", + "value": -1, + "content": { + "type": "SYMBOL", + "name": "_type_identifier" + } + }, + { + "type": "SYMBOL", + "name": "primitive_type" + } + ] + }, + { + "type": "BLANK" + } + ] + } + } + ] + }, + "primitive_type": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "bool" + }, + { + "type": "STRING", + "value": "char" + }, + { + "type": "STRING", + "value": "int" + }, + { + "type": "STRING", + "value": "float" + }, + { + "type": "STRING", + "value": "double" + }, + { + "type": "STRING", + "value": "void" + }, + { + "type": "STRING", + "value": "size_t" + }, + { + "type": "STRING", + "value": "ssize_t" + }, + { + "type": "STRING", + "value": "intptr_t" + }, + { + "type": "STRING", + "value": "uintptr_t" + }, + { + "type": "STRING", + "value": "charptr_t" + }, + { + "type": "STRING", + "value": "int8_t" + }, + { + "type": "STRING", + "value": "int16_t" + }, + { + "type": "STRING", + "value": "int32_t" + }, + { + "type": "STRING", + "value": "int64_t" + }, + { + "type": "STRING", + "value": "uint8_t" + }, + { + "type": "STRING", + "value": "uint16_t" + }, + { + "type": "STRING", + "value": "uint32_t" + }, + { + "type": "STRING", + "value": "uint64_t" + }, + { + "type": "STRING", + "value": "char8_t" + }, + { + "type": "STRING", + "value": "char16_t" + }, + { + "type": "STRING", + "value": "char32_t" + }, + { + "type": "STRING", + "value": "char64_t" + } + ] + } + }, + "enum_specifier": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "enum" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_type_identifier" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "enumerator_list" + }, + { + "type": "BLANK" + } + ] + } + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "enumerator_list" + } + } + ] + } + ] + }, + "enumerator_list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "enumerator" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "enumerator" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "struct_specifier": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "struct" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "ms_declspec_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_type_identifier" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "field_declaration_list" + }, + { + "type": "BLANK" + } + ] + } + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "field_declaration_list" + } + } + ] + } + ] + }, + "union_specifier": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "union" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "ms_declspec_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_type_identifier" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "field_declaration_list" + }, + { + "type": "BLANK" + } + ] + } + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "field_declaration_list" + } + } + ] + } + ] + }, + "field_declaration_list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_field_declaration_list_item" + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "_field_declaration_list_item": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "field_declaration" + }, + { + "type": "SYMBOL", + "name": "preproc_def" + }, + { + "type": "SYMBOL", + "name": "preproc_function_def" + }, + { + "type": "SYMBOL", + "name": "preproc_call" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "preproc_if_in_field_declaration_list" + }, + "named": true, + "value": "preproc_if" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "preproc_ifdef_in_field_declaration_list" + }, + "named": true, + "value": "preproc_ifdef" + } + ] + }, + "field_declaration": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_declaration_specifiers" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "SYMBOL", + "name": "_field_declarator" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "SYMBOL", + "name": "_field_declarator" + } + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "bitfield_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "bitfield_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + "enumerator": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "variadic_parameter": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "..." + } + ] + }, + "parameter_list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "parameter_declaration" + }, + { + "type": "SYMBOL", + "name": "variadic_parameter" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "parameter_declaration" + }, + { + "type": "SYMBOL", + "name": "variadic_parameter" + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "parameter_declaration": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_declaration_specifiers" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_declarator" + }, + { + "type": "SYMBOL", + "name": "_abstract_declarator" + } + ] + } + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "attributed_statement": { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "attribute_declaration" + } + }, + { + "type": "SYMBOL", + "name": "_statement" + } + ] + }, + "_statement": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "case_statement" + }, + { + "type": "SYMBOL", + "name": "_non_case_statement" + } + ] + }, + "_non_case_statement": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "attributed_statement" + }, + { + "type": "SYMBOL", + "name": "labeled_statement" + }, + { + "type": "SYMBOL", + "name": "compound_statement" + }, + { + "type": "SYMBOL", + "name": "expression_statement" + }, + { + "type": "SYMBOL", + "name": "if_statement" + }, + { + "type": "SYMBOL", + "name": "switch_statement" + }, + { + "type": "SYMBOL", + "name": "do_statement" + }, + { + "type": "SYMBOL", + "name": "while_statement" + }, + { + "type": "SYMBOL", + "name": "for_statement" + }, + { + "type": "SYMBOL", + "name": "return_statement" + }, + { + "type": "SYMBOL", + "name": "break_statement" + }, + { + "type": "SYMBOL", + "name": "continue_statement" + }, + { + "type": "SYMBOL", + "name": "goto_statement" + } + ] + }, + "labeled_statement": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "label", + "content": { + "type": "SYMBOL", + "name": "_statement_identifier" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_statement" + } + ] + }, + "expression_statement": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "SYMBOL", + "name": "comma_expression" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "if_statement": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "if" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "parenthesized_expression" + } + }, + { + "type": "FIELD", + "name": "consequence", + "content": { + "type": "SYMBOL", + "name": "_statement" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "else" + }, + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "SYMBOL", + "name": "_statement" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "switch_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "switch" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "parenthesized_expression" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "compound_statement" + } + } + ] + }, + "case_statement": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "case" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + }, + { + "type": "STRING", + "value": "default" + } + ] + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_non_case_statement" + }, + { + "type": "SYMBOL", + "name": "declaration" + }, + { + "type": "SYMBOL", + "name": "type_definition" + } + ] + } + } + ] + } + }, + "while_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "while" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "parenthesized_expression" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_statement" + } + } + ] + }, + "do_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "do" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_statement" + } + }, + { + "type": "STRING", + "value": "while" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "parenthesized_expression" + } + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "for_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "for" + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "initializer", + "content": { + "type": "SYMBOL", + "name": "declaration" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "initializer", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "SYMBOL", + "name": "comma_expression" + } + ] + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": ";" + } + ] + } + ] + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "SYMBOL", + "name": "comma_expression" + } + ] + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": ";" + }, + { + "type": "FIELD", + "name": "update", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "SYMBOL", + "name": "comma_expression" + } + ] + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": ")" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_statement" + } + } + ] + }, + "return_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "return" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "SYMBOL", + "name": "comma_expression" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "break_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "break" + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "continue_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "continue" + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "goto_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "goto" + }, + { + "type": "FIELD", + "name": "label", + "content": { + "type": "SYMBOL", + "name": "_statement_identifier" + } + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "conditional_expression" + }, + { + "type": "SYMBOL", + "name": "assignment_expression" + }, + { + "type": "SYMBOL", + "name": "binary_expression" + }, + { + "type": "SYMBOL", + "name": "unary_expression" + }, + { + "type": "SYMBOL", + "name": "update_expression" + }, + { + "type": "SYMBOL", + "name": "cast_expression" + }, + { + "type": "SYMBOL", + "name": "pointer_expression" + }, + { + "type": "SYMBOL", + "name": "sizeof_expression" + }, + { + "type": "SYMBOL", + "name": "subscript_expression" + }, + { + "type": "SYMBOL", + "name": "call_expression" + }, + { + "type": "SYMBOL", + "name": "field_expression" + }, + { + "type": "SYMBOL", + "name": "compound_literal_expression" + }, + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "number_literal" + }, + { + "type": "SYMBOL", + "name": "string_literal" + }, + { + "type": "SYMBOL", + "name": "true" + }, + { + "type": "SYMBOL", + "name": "false" + }, + { + "type": "SYMBOL", + "name": "null" + }, + { + "type": "SYMBOL", + "name": "concatenated_string" + }, + { + "type": "SYMBOL", + "name": "char_literal" + }, + { + "type": "SYMBOL", + "name": "parenthesized_expression" + } + ] + }, + "comma_expression": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "SYMBOL", + "name": "comma_expression" + } + ] + } + } + ] + }, + "conditional_expression": { + "type": "PREC_RIGHT", + "value": -2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "STRING", + "value": "?" + }, + { + "type": "FIELD", + "name": "consequence", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + "_assignment_left_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "call_expression" + }, + { + "type": "SYMBOL", + "name": "field_expression" + }, + { + "type": "SYMBOL", + "name": "pointer_expression" + }, + { + "type": "SYMBOL", + "name": "subscript_expression" + }, + { + "type": "SYMBOL", + "name": "parenthesized_expression" + } + ] + }, + "assignment_expression": { + "type": "PREC_RIGHT", + "value": -1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_assignment_left_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "STRING", + "value": "*=" + }, + { + "type": "STRING", + "value": "/=" + }, + { + "type": "STRING", + "value": "%=" + }, + { + "type": "STRING", + "value": "+=" + }, + { + "type": "STRING", + "value": "-=" + }, + { + "type": "STRING", + "value": "<<=" + }, + { + "type": "STRING", + "value": ">>=" + }, + { + "type": "STRING", + "value": "&=" + }, + { + "type": "STRING", + "value": "^=" + }, + { + "type": "STRING", + "value": "|=" + } + ] + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + "pointer_expression": { + "type": "PREC_LEFT", + "value": 12, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "*" + }, + { + "type": "STRING", + "value": "&" + } + ] + } + }, + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + "unary_expression": { + "type": "PREC_LEFT", + "value": 13, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "STRING", + "value": "~" + }, + { + "type": "STRING", + "value": "-" + }, + { + "type": "STRING", + "value": "+" + } + ] + } + }, + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + "binary_expression": { + "type": "CHOICE", + "members": [ + { + "type": "PREC_LEFT", + "value": 10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "+" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "-" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 11, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "*" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 11, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "/" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 11, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "%" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "||" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "&&" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "|" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 4, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "^" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 5, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "&" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "==" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "!=" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 7, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": ">" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 7, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": ">=" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 7, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "<=" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 7, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "<" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 9, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "<<" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 9, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": ">>" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + } + ] + }, + "update_expression": { + "type": "PREC_RIGHT", + "value": 13, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "--" + }, + { + "type": "STRING", + "value": "++" + } + ] + } + }, + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "--" + }, + { + "type": "STRING", + "value": "++" + } + ] + } + } + ] + } + ] + } + }, + "cast_expression": { + "type": "PREC", + "value": 12, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "type_descriptor" + } + }, + { + "type": "STRING", + "value": ")" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + "type_descriptor": { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "type_qualifier" + } + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type_specifier" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "type_qualifier" + } + }, + { + "type": "FIELD", + "name": "declarator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_abstract_declarator" + }, + { + "type": "BLANK" + } + ] + } + } + ] + }, + "sizeof_expression": { + "type": "PREC", + "value": 8, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "sizeof" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "type_descriptor" + } + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + } + ] + } + }, + "subscript_expression": { + "type": "PREC", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "STRING", + "value": "[" + }, + { + "type": "FIELD", + "name": "index", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "STRING", + "value": "]" + } + ] + } + }, + "call_expression": { + "type": "PREC", + "value": 14, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "function", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "arguments", + "content": { + "type": "SYMBOL", + "name": "argument_list" + } + } + ] + } + }, + "argument_list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "field_expression": { + "type": "SEQ", + "members": [ + { + "type": "PREC", + "value": 15, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "STRING", + "value": "->" + } + ] + } + } + ] + } + }, + { + "type": "FIELD", + "name": "field", + "content": { + "type": "SYMBOL", + "name": "_field_identifier" + } + } + ] + }, + "compound_literal_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "type_descriptor" + } + }, + { + "type": "STRING", + "value": ")" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "initializer_list" + } + } + ] + }, + "parenthesized_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "SYMBOL", + "name": "comma_expression" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "initializer_list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "initializer_pair" + }, + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "SYMBOL", + "name": "initializer_list" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "initializer_pair" + }, + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "SYMBOL", + "name": "initializer_list" + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "initializer_pair": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "designator", + "content": { + "type": "REPEAT1", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "subscript_designator" + }, + { + "type": "SYMBOL", + "name": "field_designator" + } + ] + } + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "SYMBOL", + "name": "initializer_list" + } + ] + } + } + ] + }, + "subscript_designator": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "field_designator": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_field_identifier" + } + ] + }, + "number_literal": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[-\\+]" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0x" + }, + { + "type": "STRING", + "value": "0b" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9]" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "'" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9]" + } + } + ] + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "0b" + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9]" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "'" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9]" + } + } + ] + } + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "0x" + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9a-fA-F]" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "'" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9a-fA-F]" + } + } + ] + } + } + ] + } + ] + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9a-fA-F]" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "'" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9a-fA-F]" + } + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9]" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "'" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9]" + } + } + ] + } + } + ] + } + ] + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[eEpP]" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[-\\+]" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9a-fA-F]" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "'" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9a-fA-F]" + } + } + ] + } + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "u" + }, + { + "type": "STRING", + "value": "l" + }, + { + "type": "STRING", + "value": "U" + }, + { + "type": "STRING", + "value": "L" + }, + { + "type": "STRING", + "value": "f" + }, + { + "type": "STRING", + "value": "F" + } + ] + } + } + ] + } + }, + "char_literal": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "L'" + }, + { + "type": "STRING", + "value": "u'" + }, + { + "type": "STRING", + "value": "U'" + }, + { + "type": "STRING", + "value": "u8'" + }, + { + "type": "STRING", + "value": "'" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "escape_sequence" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "[^\\n']" + } + } + ] + }, + { + "type": "STRING", + "value": "'" + } + ] + }, + "concatenated_string": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "string_literal" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "string_literal" + } + } + ] + }, + "string_literal": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "L\"" + }, + { + "type": "STRING", + "value": "u\"" + }, + { + "type": "STRING", + "value": "U\"" + }, + { + "type": "STRING", + "value": "u8\"" + }, + { + "type": "STRING", + "value": "\"" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PREC", + "value": 1, + "content": { + "type": "PATTERN", + "value": "[^\\\\\"\\n]+" + } + } + }, + { + "type": "SYMBOL", + "name": "escape_sequence" + } + ] + } + }, + { + "type": "STRING", + "value": "\"" + } + ] + }, + "escape_sequence": { + "type": "TOKEN", + "content": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\\" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[^xuU]" + }, + { + "type": "PATTERN", + "value": "\\d{2,3}" + }, + { + "type": "PATTERN", + "value": "x[0-9a-fA-F]{2,}" + }, + { + "type": "PATTERN", + "value": "u[0-9a-fA-F]{4}" + }, + { + "type": "PATTERN", + "value": "U[0-9a-fA-F]{8}" + } + ] + } + ] + } + } + }, + "system_lib_string": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "<" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[^>\\n]" + }, + { + "type": "STRING", + "value": "\\>" + } + ] + } + }, + { + "type": "STRING", + "value": ">" + } + ] + } + }, + "true": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "TRUE" + }, + { + "type": "STRING", + "value": "true" + } + ] + } + }, + "false": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "FALSE" + }, + { + "type": "STRING", + "value": "false" + } + ] + } + }, + "null": { + "type": "STRING", + "value": "NULL" + }, + "identifier": { + "type": "PATTERN", + "value": "[a-zA-Z_]\\w*" + }, + "_type_identifier": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "identifier" + }, + "named": true, + "value": "type_identifier" + }, + "_field_identifier": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "identifier" + }, + "named": true, + "value": "field_identifier" + }, + "_statement_identifier": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "identifier" + }, + "named": true, + "value": "statement_identifier" + }, + "_empty_declaration": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type_specifier" + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "macro_type_specifier": { + "type": "PREC_DYNAMIC", + "value": -1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "type_descriptor" + } + }, + { + "type": "STRING", + "value": ")" + } + ] + } + }, + "comment": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "//" + }, + { + "type": "PATTERN", + "value": "(\\\\(.|\\r?\\n)|[^\\\\\\n])*" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "/*" + }, + { + "type": "PATTERN", + "value": "[^*]*\\*+([^/*][^*]*\\*+)*" + }, + { + "type": "STRING", + "value": "/" + } + ] + } + ] + } + } + }, + "extras": [ + { + "type": "PATTERN", + "value": "\\s|\\\\\\r?\\n" + }, + { + "type": "SYMBOL", + "name": "comment" + } + ], + "conflicts": [ + [ + "_type_specifier", + "_declarator" + ], + [ + "_type_specifier", + "_declarator", + "macro_type_specifier" + ], + [ + "_type_specifier", + "_expression" + ], + [ + "_type_specifier", + "_expression", + "macro_type_specifier" + ], + [ + "_type_specifier", + "macro_type_specifier" + ], + [ + "sized_type_specifier" + ], + [ + "attributed_statement" + ], + [ + "_declaration_modifiers", + "attributed_statement" + ] + ], + "precedences": [], + "externals": [], + "inline": [ + "_statement", + "_top_level_item", + "_type_identifier", + "_field_identifier", + "_statement_identifier", + "_non_case_statement", + "_assignment_left_expression" + ], + "supertypes": [ + "_expression", + "_statement", + "_type_specifier", + "_declarator", + "_field_declarator", + "_type_declarator", + "_abstract_declarator" + ], + "PREC": { + "PAREN_DECLARATOR": -10, + "ASSIGNMENT": -1, + "CONDITIONAL": -2, + "DEFAULT": 0, + "LOGICAL_OR": 1, + "LOGICAL_AND": 2, + "INCLUSIVE_OR": 3, + "EXCLUSIVE_OR": 4, + "BITWISE_AND": 5, + "EQUAL": 6, + "RELATIONAL": 7, + "SIZEOF": 8, + "SHIFT": 9, + "ADD": 10, + "MULTIPLY": 11, + "CAST": 12, + "UNARY": 13, + "CALL": 14, + "FIELD": 15, + "SUBSCRIPT": 16 + } +} + diff --git a/tree-sitter-c/src/node-types.json b/tree-sitter-c/src/node-types.json new file mode 100644 index 0000000..ce327ec --- /dev/null +++ b/tree-sitter-c/src/node-types.json @@ -0,0 +1,3664 @@ +[ + { + "type": "_abstract_declarator", + "named": true, + "subtypes": [ + { + "type": "abstract_array_declarator", + "named": true + }, + { + "type": "abstract_function_declarator", + "named": true + }, + { + "type": "abstract_parenthesized_declarator", + "named": true + }, + { + "type": "abstract_pointer_declarator", + "named": true + } + ] + }, + { + "type": "_declarator", + "named": true, + "subtypes": [ + { + "type": "array_declarator", + "named": true + }, + { + "type": "attributed_declarator", + "named": true + }, + { + "type": "function_declarator", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "parenthesized_declarator", + "named": true + }, + { + "type": "pointer_declarator", + "named": true + } + ] + }, + { + "type": "_expression", + "named": true, + "subtypes": [ + { + "type": "assignment_expression", + "named": true + }, + { + "type": "binary_expression", + "named": true + }, + { + "type": "call_expression", + "named": true + }, + { + "type": "cast_expression", + "named": true + }, + { + "type": "char_literal", + "named": true + }, + { + "type": "compound_literal_expression", + "named": true + }, + { + "type": "concatenated_string", + "named": true + }, + { + "type": "conditional_expression", + "named": true + }, + { + "type": "false", + "named": true + }, + { + "type": "field_expression", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "null", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "pointer_expression", + "named": true + }, + { + "type": "sizeof_expression", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "subscript_expression", + "named": true + }, + { + "type": "true", + "named": true + }, + { + "type": "unary_expression", + "named": true + }, + { + "type": "update_expression", + "named": true + } + ] + }, + { + "type": "_field_declarator", + "named": true, + "subtypes": [ + { + "type": "array_declarator", + "named": true + }, + { + "type": "attributed_declarator", + "named": true + }, + { + "type": "field_identifier", + "named": true + }, + { + "type": "function_declarator", + "named": true + }, + { + "type": "parenthesized_declarator", + "named": true + }, + { + "type": "pointer_declarator", + "named": true + } + ] + }, + { + "type": "_statement", + "named": true, + "subtypes": [ + { + "type": "attributed_statement", + "named": true + }, + { + "type": "break_statement", + "named": true + }, + { + "type": "case_statement", + "named": true + }, + { + "type": "compound_statement", + "named": true + }, + { + "type": "continue_statement", + "named": true + }, + { + "type": "do_statement", + "named": true + }, + { + "type": "expression_statement", + "named": true + }, + { + "type": "for_statement", + "named": true + }, + { + "type": "goto_statement", + "named": true + }, + { + "type": "if_statement", + "named": true + }, + { + "type": "labeled_statement", + "named": true + }, + { + "type": "return_statement", + "named": true + }, + { + "type": "switch_statement", + "named": true + }, + { + "type": "while_statement", + "named": true + } + ] + }, + { + "type": "_type_declarator", + "named": true, + "subtypes": [ + { + "type": "array_declarator", + "named": true + }, + { + "type": "attributed_declarator", + "named": true + }, + { + "type": "function_declarator", + "named": true + }, + { + "type": "parenthesized_declarator", + "named": true + }, + { + "type": "pointer_declarator", + "named": true + }, + { + "type": "type_identifier", + "named": true + } + ] + }, + { + "type": "_type_specifier", + "named": true, + "subtypes": [ + { + "type": "enum_specifier", + "named": true + }, + { + "type": "macro_type_specifier", + "named": true + }, + { + "type": "primitive_type", + "named": true + }, + { + "type": "sized_type_specifier", + "named": true + }, + { + "type": "struct_specifier", + "named": true + }, + { + "type": "type_identifier", + "named": true + }, + { + "type": "union_specifier", + "named": true + } + ] + }, + { + "type": "abstract_array_declarator", + "named": true, + "fields": { + "declarator": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_abstract_declarator", + "named": true + } + ] + }, + "size": { + "multiple": false, + "required": false, + "types": [ + { + "type": "*", + "named": false + }, + { + "type": "_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "type_qualifier", + "named": true + } + ] + } + }, + { + "type": "abstract_function_declarator", + "named": true, + "fields": { + "declarator": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_abstract_declarator", + "named": true + } + ] + }, + "parameters": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parameter_list", + "named": true + } + ] + } + } + }, + { + "type": "abstract_parenthesized_declarator", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_abstract_declarator", + "named": true + } + ] + } + }, + { + "type": "abstract_pointer_declarator", + "named": true, + "fields": { + "declarator": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_abstract_declarator", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "type_qualifier", + "named": true + } + ] + } + }, + { + "type": "argument_list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "preproc_defined", + "named": true + } + ] + } + }, + { + "type": "array_declarator", + "named": true, + "fields": { + "declarator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_declarator", + "named": true + }, + { + "type": "_field_declarator", + "named": true + }, + { + "type": "_type_declarator", + "named": true + } + ] + }, + "size": { + "multiple": false, + "required": false, + "types": [ + { + "type": "*", + "named": false + }, + { + "type": "_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "type_qualifier", + "named": true + } + ] + } + }, + { + "type": "assignment_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "call_expression", + "named": true + }, + { + "type": "field_expression", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "pointer_expression", + "named": true + }, + { + "type": "subscript_expression", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "%=", + "named": false + }, + { + "type": "&=", + "named": false + }, + { + "type": "*=", + "named": false + }, + { + "type": "+=", + "named": false + }, + { + "type": "-=", + "named": false + }, + { + "type": "/=", + "named": false + }, + { + "type": "<<=", + "named": false + }, + { + "type": "=", + "named": false + }, + { + "type": ">>=", + "named": false + }, + { + "type": "^=", + "named": false + }, + { + "type": "|=", + "named": false + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + } + }, + { + "type": "attribute", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "prefix": { + "multiple": false, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "argument_list", + "named": true + } + ] + } + }, + { + "type": "attribute_declaration", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute", + "named": true + } + ] + } + }, + { + "type": "attribute_specifier", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "argument_list", + "named": true + } + ] + } + }, + { + "type": "attributed_declarator", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_declarator", + "named": true + }, + { + "type": "_field_declarator", + "named": true + }, + { + "type": "_type_declarator", + "named": true + }, + { + "type": "attribute_declaration", + "named": true + } + ] + } + }, + { + "type": "attributed_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_statement", + "named": true + }, + { + "type": "attribute_declaration", + "named": true + } + ] + } + }, + { + "type": "binary_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "preproc_defined", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "!=", + "named": false + }, + { + "type": "%", + "named": false + }, + { + "type": "&", + "named": false + }, + { + "type": "&&", + "named": false + }, + { + "type": "*", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "/", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<<", + "named": false + }, + { + "type": "<=", + "named": false + }, + { + "type": "==", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">=", + "named": false + }, + { + "type": ">>", + "named": false + }, + { + "type": "^", + "named": false + }, + { + "type": "|", + "named": false + }, + { + "type": "||", + "named": false + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "preproc_defined", + "named": true + } + ] + } + } + }, + { + "type": "bitfield_clause", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + }, + { + "type": "break_statement", + "named": true, + "fields": {} + }, + { + "type": "call_expression", + "named": true, + "fields": { + "arguments": { + "multiple": false, + "required": true, + "types": [ + { + "type": "argument_list", + "named": true + } + ] + }, + "function": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + } + }, + { + "type": "case_statement", + "named": true, + "fields": { + "value": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "attributed_statement", + "named": true + }, + { + "type": "break_statement", + "named": true + }, + { + "type": "compound_statement", + "named": true + }, + { + "type": "continue_statement", + "named": true + }, + { + "type": "declaration", + "named": true + }, + { + "type": "do_statement", + "named": true + }, + { + "type": "expression_statement", + "named": true + }, + { + "type": "for_statement", + "named": true + }, + { + "type": "goto_statement", + "named": true + }, + { + "type": "if_statement", + "named": true + }, + { + "type": "labeled_statement", + "named": true + }, + { + "type": "return_statement", + "named": true + }, + { + "type": "switch_statement", + "named": true + }, + { + "type": "type_definition", + "named": true + }, + { + "type": "while_statement", + "named": true + } + ] + } + }, + { + "type": "cast_expression", + "named": true, + "fields": { + "type": { + "multiple": false, + "required": true, + "types": [ + { + "type": "type_descriptor", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + } + }, + { + "type": "char_literal", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "escape_sequence", + "named": true + } + ] + } + }, + { + "type": "comma_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "comma_expression", + "named": true + } + ] + } + } + }, + { + "type": "compound_literal_expression", + "named": true, + "fields": { + "type": { + "multiple": false, + "required": true, + "types": [ + { + "type": "type_descriptor", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "initializer_list", + "named": true + } + ] + } + } + }, + { + "type": "compound_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_statement", + "named": true + }, + { + "type": "_type_specifier", + "named": true + }, + { + "type": "declaration", + "named": true + }, + { + "type": "function_definition", + "named": true + }, + { + "type": "linkage_specification", + "named": true + }, + { + "type": "preproc_call", + "named": true + }, + { + "type": "preproc_def", + "named": true + }, + { + "type": "preproc_function_def", + "named": true + }, + { + "type": "preproc_if", + "named": true + }, + { + "type": "preproc_ifdef", + "named": true + }, + { + "type": "preproc_include", + "named": true + }, + { + "type": "type_definition", + "named": true + } + ] + } + }, + { + "type": "concatenated_string", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "string_literal", + "named": true + } + ] + } + }, + { + "type": "conditional_expression", + "named": true, + "fields": { + "alternative": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + }, + "consequence": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + } + }, + { + "type": "continue_statement", + "named": true, + "fields": {} + }, + { + "type": "declaration", + "named": true, + "fields": { + "declarator": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_declarator", + "named": true + }, + { + "type": "init_declarator", + "named": true + } + ] + }, + "type": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_type_specifier", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "attribute_declaration", + "named": true + }, + { + "type": "attribute_specifier", + "named": true + }, + { + "type": "ms_declspec_modifier", + "named": true + }, + { + "type": "storage_class_specifier", + "named": true + }, + { + "type": "type_qualifier", + "named": true + } + ] + } + }, + { + "type": "declaration_list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_statement", + "named": true + }, + { + "type": "_type_specifier", + "named": true + }, + { + "type": "declaration", + "named": true + }, + { + "type": "function_definition", + "named": true + }, + { + "type": "linkage_specification", + "named": true + }, + { + "type": "preproc_call", + "named": true + }, + { + "type": "preproc_def", + "named": true + }, + { + "type": "preproc_function_def", + "named": true + }, + { + "type": "preproc_if", + "named": true + }, + { + "type": "preproc_ifdef", + "named": true + }, + { + "type": "preproc_include", + "named": true + }, + { + "type": "type_definition", + "named": true + } + ] + } + }, + { + "type": "do_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_statement", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parenthesized_expression", + "named": true + } + ] + } + } + }, + { + "type": "enum_specifier", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "enumerator_list", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": false, + "types": [ + { + "type": "type_identifier", + "named": true + } + ] + } + } + }, + { + "type": "enumerator", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + } + }, + { + "type": "enumerator_list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "enumerator", + "named": true + } + ] + } + }, + { + "type": "expression_statement", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "comma_expression", + "named": true + } + ] + } + }, + { + "type": "field_declaration", + "named": true, + "fields": { + "declarator": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_field_declarator", + "named": true + } + ] + }, + "type": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_type_specifier", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "attribute_declaration", + "named": true + }, + { + "type": "attribute_specifier", + "named": true + }, + { + "type": "bitfield_clause", + "named": true + }, + { + "type": "ms_declspec_modifier", + "named": true + }, + { + "type": "storage_class_specifier", + "named": true + }, + { + "type": "type_qualifier", + "named": true + } + ] + } + }, + { + "type": "field_declaration_list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "field_declaration", + "named": true + }, + { + "type": "preproc_call", + "named": true + }, + { + "type": "preproc_def", + "named": true + }, + { + "type": "preproc_function_def", + "named": true + }, + { + "type": "preproc_if", + "named": true + }, + { + "type": "preproc_ifdef", + "named": true + } + ] + } + }, + { + "type": "field_designator", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "field_identifier", + "named": true + } + ] + } + }, + { + "type": "field_expression", + "named": true, + "fields": { + "argument": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + }, + "field": { + "multiple": false, + "required": true, + "types": [ + { + "type": "field_identifier", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "->", + "named": false + }, + { + "type": ".", + "named": false + } + ] + } + } + }, + { + "type": "for_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_statement", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "comma_expression", + "named": true + } + ] + }, + "initializer": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "comma_expression", + "named": true + }, + { + "type": "declaration", + "named": true + } + ] + }, + "update": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "comma_expression", + "named": true + } + ] + } + } + }, + { + "type": "function_declarator", + "named": true, + "fields": { + "declarator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_declarator", + "named": true + }, + { + "type": "_field_declarator", + "named": true + }, + { + "type": "_type_declarator", + "named": true + } + ] + }, + "parameters": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parameter_list", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "attribute_specifier", + "named": true + } + ] + } + }, + { + "type": "function_definition", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "compound_statement", + "named": true + } + ] + }, + "declarator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_declarator", + "named": true + } + ] + }, + "type": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_type_specifier", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "attribute_declaration", + "named": true + }, + { + "type": "attribute_specifier", + "named": true + }, + { + "type": "ms_call_modifier", + "named": true + }, + { + "type": "ms_declspec_modifier", + "named": true + }, + { + "type": "storage_class_specifier", + "named": true + }, + { + "type": "type_qualifier", + "named": true + } + ] + } + }, + { + "type": "goto_statement", + "named": true, + "fields": { + "label": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement_identifier", + "named": true + } + ] + } + } + }, + { + "type": "if_statement", + "named": true, + "fields": { + "alternative": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_statement", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parenthesized_expression", + "named": true + } + ] + }, + "consequence": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_statement", + "named": true + } + ] + } + } + }, + { + "type": "init_declarator", + "named": true, + "fields": { + "declarator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_declarator", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "initializer_list", + "named": true + } + ] + } + } + }, + { + "type": "initializer_list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "initializer_list", + "named": true + }, + { + "type": "initializer_pair", + "named": true + } + ] + } + }, + { + "type": "initializer_pair", + "named": true, + "fields": { + "designator": { + "multiple": true, + "required": true, + "types": [ + { + "type": "field_designator", + "named": true + }, + { + "type": "subscript_designator", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "initializer_list", + "named": true + } + ] + } + } + }, + { + "type": "labeled_statement", + "named": true, + "fields": { + "label": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement_identifier", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_statement", + "named": true + } + ] + } + }, + { + "type": "linkage_specification", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "declaration", + "named": true + }, + { + "type": "declaration_list", + "named": true + }, + { + "type": "function_definition", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "string_literal", + "named": true + } + ] + } + } + }, + { + "type": "macro_type_specifier", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "type": { + "multiple": false, + "required": true, + "types": [ + { + "type": "type_descriptor", + "named": true + } + ] + } + } + }, + { + "type": "ms_based_modifier", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "argument_list", + "named": true + } + ] + } + }, + { + "type": "ms_call_modifier", + "named": true, + "fields": {} + }, + { + "type": "ms_declspec_modifier", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "ms_pointer_modifier", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "ms_restrict_modifier", + "named": true + }, + { + "type": "ms_signed_ptr_modifier", + "named": true + }, + { + "type": "ms_unaligned_ptr_modifier", + "named": true + }, + { + "type": "ms_unsigned_ptr_modifier", + "named": true + } + ] + } + }, + { + "type": "ms_unaligned_ptr_modifier", + "named": true, + "fields": {} + }, + { + "type": "parameter_declaration", + "named": true, + "fields": { + "declarator": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_abstract_declarator", + "named": true + }, + { + "type": "_declarator", + "named": true + } + ] + }, + "type": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_type_specifier", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "attribute_declaration", + "named": true + }, + { + "type": "attribute_specifier", + "named": true + }, + { + "type": "ms_declspec_modifier", + "named": true + }, + { + "type": "storage_class_specifier", + "named": true + }, + { + "type": "type_qualifier", + "named": true + } + ] + } + }, + { + "type": "parameter_list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "parameter_declaration", + "named": true + }, + { + "type": "variadic_parameter", + "named": true + } + ] + } + }, + { + "type": "parenthesized_declarator", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_declarator", + "named": true + }, + { + "type": "_field_declarator", + "named": true + }, + { + "type": "_type_declarator", + "named": true + } + ] + } + }, + { + "type": "parenthesized_expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "comma_expression", + "named": true + }, + { + "type": "preproc_defined", + "named": true + } + ] + } + }, + { + "type": "pointer_declarator", + "named": true, + "fields": { + "declarator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_declarator", + "named": true + }, + { + "type": "_field_declarator", + "named": true + }, + { + "type": "_type_declarator", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "ms_based_modifier", + "named": true + }, + { + "type": "ms_pointer_modifier", + "named": true + }, + { + "type": "type_qualifier", + "named": true + } + ] + } + }, + { + "type": "pointer_expression", + "named": true, + "fields": { + "argument": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "&", + "named": false + }, + { + "type": "*", + "named": false + } + ] + } + } + }, + { + "type": "preproc_call", + "named": true, + "fields": { + "argument": { + "multiple": false, + "required": false, + "types": [ + { + "type": "preproc_arg", + "named": true + } + ] + }, + "directive": { + "multiple": false, + "required": true, + "types": [ + { + "type": "preproc_directive", + "named": true + } + ] + } + } + }, + { + "type": "preproc_def", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": false, + "types": [ + { + "type": "preproc_arg", + "named": true + } + ] + } + } + }, + { + "type": "preproc_defined", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "preproc_elif", + "named": true, + "fields": { + "alternative": { + "multiple": false, + "required": false, + "types": [ + { + "type": "preproc_elif", + "named": true + }, + { + "type": "preproc_else", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "binary_expression", + "named": true + }, + { + "type": "call_expression", + "named": true + }, + { + "type": "char_literal", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "preproc_defined", + "named": true + }, + { + "type": "unary_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_statement", + "named": true + }, + { + "type": "_type_specifier", + "named": true + }, + { + "type": "declaration", + "named": true + }, + { + "type": "field_declaration", + "named": true + }, + { + "type": "function_definition", + "named": true + }, + { + "type": "linkage_specification", + "named": true + }, + { + "type": "preproc_call", + "named": true + }, + { + "type": "preproc_def", + "named": true + }, + { + "type": "preproc_function_def", + "named": true + }, + { + "type": "preproc_if", + "named": true + }, + { + "type": "preproc_ifdef", + "named": true + }, + { + "type": "preproc_include", + "named": true + }, + { + "type": "type_definition", + "named": true + } + ] + } + }, + { + "type": "preproc_else", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_statement", + "named": true + }, + { + "type": "_type_specifier", + "named": true + }, + { + "type": "declaration", + "named": true + }, + { + "type": "field_declaration", + "named": true + }, + { + "type": "function_definition", + "named": true + }, + { + "type": "linkage_specification", + "named": true + }, + { + "type": "preproc_call", + "named": true + }, + { + "type": "preproc_def", + "named": true + }, + { + "type": "preproc_function_def", + "named": true + }, + { + "type": "preproc_if", + "named": true + }, + { + "type": "preproc_ifdef", + "named": true + }, + { + "type": "preproc_include", + "named": true + }, + { + "type": "type_definition", + "named": true + } + ] + } + }, + { + "type": "preproc_function_def", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "parameters": { + "multiple": false, + "required": true, + "types": [ + { + "type": "preproc_params", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": false, + "types": [ + { + "type": "preproc_arg", + "named": true + } + ] + } + } + }, + { + "type": "preproc_if", + "named": true, + "fields": { + "alternative": { + "multiple": false, + "required": false, + "types": [ + { + "type": "preproc_elif", + "named": true + }, + { + "type": "preproc_else", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "binary_expression", + "named": true + }, + { + "type": "call_expression", + "named": true + }, + { + "type": "char_literal", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "preproc_defined", + "named": true + }, + { + "type": "unary_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_statement", + "named": true + }, + { + "type": "_type_specifier", + "named": true + }, + { + "type": "declaration", + "named": true + }, + { + "type": "field_declaration", + "named": true + }, + { + "type": "function_definition", + "named": true + }, + { + "type": "linkage_specification", + "named": true + }, + { + "type": "preproc_call", + "named": true + }, + { + "type": "preproc_def", + "named": true + }, + { + "type": "preproc_function_def", + "named": true + }, + { + "type": "preproc_if", + "named": true + }, + { + "type": "preproc_ifdef", + "named": true + }, + { + "type": "preproc_include", + "named": true + }, + { + "type": "type_definition", + "named": true + } + ] + } + }, + { + "type": "preproc_ifdef", + "named": true, + "fields": { + "alternative": { + "multiple": false, + "required": false, + "types": [ + { + "type": "preproc_elif", + "named": true + }, + { + "type": "preproc_else", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_statement", + "named": true + }, + { + "type": "_type_specifier", + "named": true + }, + { + "type": "declaration", + "named": true + }, + { + "type": "field_declaration", + "named": true + }, + { + "type": "function_definition", + "named": true + }, + { + "type": "linkage_specification", + "named": true + }, + { + "type": "preproc_call", + "named": true + }, + { + "type": "preproc_def", + "named": true + }, + { + "type": "preproc_function_def", + "named": true + }, + { + "type": "preproc_if", + "named": true + }, + { + "type": "preproc_ifdef", + "named": true + }, + { + "type": "preproc_include", + "named": true + }, + { + "type": "type_definition", + "named": true + } + ] + } + }, + { + "type": "preproc_include", + "named": true, + "fields": { + "path": { + "multiple": false, + "required": true, + "types": [ + { + "type": "call_expression", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "system_lib_string", + "named": true + } + ] + } + } + }, + { + "type": "preproc_params", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "return_statement", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "comma_expression", + "named": true + } + ] + } + }, + { + "type": "sized_type_specifier", + "named": true, + "fields": { + "type": { + "multiple": false, + "required": false, + "types": [ + { + "type": "primitive_type", + "named": true + }, + { + "type": "type_identifier", + "named": true + } + ] + } + } + }, + { + "type": "sizeof_expression", + "named": true, + "fields": { + "type": { + "multiple": false, + "required": false, + "types": [ + { + "type": "type_descriptor", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + } + }, + { + "type": "storage_class_specifier", + "named": true, + "fields": {} + }, + { + "type": "string_literal", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "escape_sequence", + "named": true + } + ] + } + }, + { + "type": "struct_specifier", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "field_declaration_list", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": false, + "types": [ + { + "type": "type_identifier", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "ms_declspec_modifier", + "named": true + } + ] + } + }, + { + "type": "subscript_designator", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + }, + { + "type": "subscript_expression", + "named": true, + "fields": { + "argument": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + }, + "index": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + } + }, + { + "type": "switch_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "compound_statement", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parenthesized_expression", + "named": true + } + ] + } + } + }, + { + "type": "translation_unit", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_statement", + "named": true + }, + { + "type": "_type_specifier", + "named": true + }, + { + "type": "declaration", + "named": true + }, + { + "type": "function_definition", + "named": true + }, + { + "type": "linkage_specification", + "named": true + }, + { + "type": "preproc_call", + "named": true + }, + { + "type": "preproc_def", + "named": true + }, + { + "type": "preproc_function_def", + "named": true + }, + { + "type": "preproc_if", + "named": true + }, + { + "type": "preproc_ifdef", + "named": true + }, + { + "type": "preproc_include", + "named": true + }, + { + "type": "type_definition", + "named": true + } + ] + } + }, + { + "type": "type_definition", + "named": true, + "fields": { + "declarator": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type_declarator", + "named": true + } + ] + }, + "type": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_type_specifier", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "type_qualifier", + "named": true + } + ] + } + }, + { + "type": "type_descriptor", + "named": true, + "fields": { + "declarator": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_abstract_declarator", + "named": true + } + ] + }, + "type": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_type_specifier", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "type_qualifier", + "named": true + } + ] + } + }, + { + "type": "type_qualifier", + "named": true, + "fields": {} + }, + { + "type": "unary_expression", + "named": true, + "fields": { + "argument": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "preproc_defined", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "!", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "~", + "named": false + } + ] + } + } + }, + { + "type": "union_specifier", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "field_declaration_list", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": false, + "types": [ + { + "type": "type_identifier", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "ms_declspec_modifier", + "named": true + } + ] + } + }, + { + "type": "update_expression", + "named": true, + "fields": { + "argument": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "++", + "named": false + }, + { + "type": "--", + "named": false + } + ] + } + } + }, + { + "type": "variadic_parameter", + "named": true, + "fields": {} + }, + { + "type": "while_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_statement", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parenthesized_expression", + "named": true + } + ] + } + } + }, + { + "type": "\n", + "named": false + }, + { + "type": "!", + "named": false + }, + { + "type": "!=", + "named": false + }, + { + "type": "\"", + "named": false + }, + { + "type": "#define", + "named": false + }, + { + "type": "#elif", + "named": false + }, + { + "type": "#else", + "named": false + }, + { + "type": "#endif", + "named": false + }, + { + "type": "#if", + "named": false + }, + { + "type": "#ifdef", + "named": false + }, + { + "type": "#ifndef", + "named": false + }, + { + "type": "#include", + "named": false + }, + { + "type": "%", + "named": false + }, + { + "type": "%=", + "named": false + }, + { + "type": "&", + "named": false + }, + { + "type": "&&", + "named": false + }, + { + "type": "&=", + "named": false + }, + { + "type": "'", + "named": false + }, + { + "type": "(", + "named": false + }, + { + "type": ")", + "named": false + }, + { + "type": "*", + "named": false + }, + { + "type": "*=", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "++", + "named": false + }, + { + "type": "+=", + "named": false + }, + { + "type": ",", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "--", + "named": false + }, + { + "type": "-=", + "named": false + }, + { + "type": "->", + "named": false + }, + { + "type": ".", + "named": false + }, + { + "type": "...", + "named": false + }, + { + "type": "/", + "named": false + }, + { + "type": "/=", + "named": false + }, + { + "type": ":", + "named": false + }, + { + "type": "::", + "named": false + }, + { + "type": ";", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<<", + "named": false + }, + { + "type": "<<=", + "named": false + }, + { + "type": "<=", + "named": false + }, + { + "type": "=", + "named": false + }, + { + "type": "==", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">=", + "named": false + }, + { + "type": ">>", + "named": false + }, + { + "type": ">>=", + "named": false + }, + { + "type": "?", + "named": false + }, + { + "type": "L\"", + "named": false + }, + { + "type": "L'", + "named": false + }, + { + "type": "U\"", + "named": false + }, + { + "type": "U'", + "named": false + }, + { + "type": "[", + "named": false + }, + { + "type": "[[", + "named": false + }, + { + "type": "]", + "named": false + }, + { + "type": "]]", + "named": false + }, + { + "type": "^", + "named": false + }, + { + "type": "^=", + "named": false + }, + { + "type": "_Atomic", + "named": false + }, + { + "type": "__attribute__", + "named": false + }, + { + "type": "__based", + "named": false + }, + { + "type": "__cdecl", + "named": false + }, + { + "type": "__clrcall", + "named": false + }, + { + "type": "__declspec", + "named": false + }, + { + "type": "__fastcall", + "named": false + }, + { + "type": "__stdcall", + "named": false + }, + { + "type": "__thiscall", + "named": false + }, + { + "type": "__unaligned", + "named": false + }, + { + "type": "__vectorcall", + "named": false + }, + { + "type": "_unaligned", + "named": false + }, + { + "type": "auto", + "named": false + }, + { + "type": "break", + "named": false + }, + { + "type": "case", + "named": false + }, + { + "type": "comment", + "named": true + }, + { + "type": "const", + "named": false + }, + { + "type": "continue", + "named": false + }, + { + "type": "default", + "named": false + }, + { + "type": "defined", + "named": false + }, + { + "type": "do", + "named": false + }, + { + "type": "else", + "named": false + }, + { + "type": "enum", + "named": false + }, + { + "type": "escape_sequence", + "named": true + }, + { + "type": "extern", + "named": false + }, + { + "type": "false", + "named": true + }, + { + "type": "field_identifier", + "named": true + }, + { + "type": "for", + "named": false + }, + { + "type": "goto", + "named": false + }, + { + "type": "identifier", + "named": true + }, + { + "type": "if", + "named": false + }, + { + "type": "inline", + "named": false + }, + { + "type": "long", + "named": false + }, + { + "type": "ms_restrict_modifier", + "named": true + }, + { + "type": "ms_signed_ptr_modifier", + "named": true + }, + { + "type": "ms_unsigned_ptr_modifier", + "named": true + }, + { + "type": "null", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "preproc_arg", + "named": true + }, + { + "type": "preproc_directive", + "named": true + }, + { + "type": "primitive_type", + "named": true + }, + { + "type": "register", + "named": false + }, + { + "type": "restrict", + "named": false + }, + { + "type": "return", + "named": false + }, + { + "type": "short", + "named": false + }, + { + "type": "signed", + "named": false + }, + { + "type": "sizeof", + "named": false + }, + { + "type": "statement_identifier", + "named": true + }, + { + "type": "static", + "named": false + }, + { + "type": "struct", + "named": false + }, + { + "type": "switch", + "named": false + }, + { + "type": "system_lib_string", + "named": true + }, + { + "type": "true", + "named": true + }, + { + "type": "type_identifier", + "named": true + }, + { + "type": "typedef", + "named": false + }, + { + "type": "u\"", + "named": false + }, + { + "type": "u'", + "named": false + }, + { + "type": "u8\"", + "named": false + }, + { + "type": "u8'", + "named": false + }, + { + "type": "union", + "named": false + }, + { + "type": "unsigned", + "named": false + }, + { + "type": "volatile", + "named": false + }, + { + "type": "while", + "named": false + }, + { + "type": "{", + "named": false + }, + { + "type": "|", + "named": false + }, + { + "type": "|=", + "named": false + }, + { + "type": "||", + "named": false + }, + { + "type": "}", + "named": false + }, + { + "type": "~", + "named": false + } +] \ No newline at end of file diff --git a/tree-sitter-c/src/parser.c b/tree-sitter-c/src/parser.c new file mode 100644 index 0000000..cf7f8c8 --- /dev/null +++ b/tree-sitter-c/src/parser.c @@ -0,0 +1,75781 @@ +#include + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#endif + +#define LANGUAGE_VERSION 13 +#define STATE_COUNT 1466 +#define LARGE_STATE_COUNT 382 +#define SYMBOL_COUNT 266 +#define ALIAS_COUNT 3 +#define TOKEN_COUNT 128 +#define EXTERNAL_TOKEN_COUNT 0 +#define FIELD_COUNT 25 +#define MAX_ALIAS_SEQUENCE_LENGTH 9 +#define PRODUCTION_ID_COUNT 85 + +enum { + sym_identifier = 1, + aux_sym_preproc_include_token1 = 2, + anon_sym_LF = 3, + aux_sym_preproc_def_token1 = 4, + anon_sym_LPAREN = 5, + anon_sym_DOT_DOT_DOT = 6, + anon_sym_COMMA = 7, + anon_sym_RPAREN = 8, + aux_sym_preproc_if_token1 = 9, + aux_sym_preproc_if_token2 = 10, + aux_sym_preproc_ifdef_token1 = 11, + aux_sym_preproc_ifdef_token2 = 12, + aux_sym_preproc_else_token1 = 13, + aux_sym_preproc_elif_token1 = 14, + sym_preproc_directive = 15, + sym_preproc_arg = 16, + anon_sym_LPAREN2 = 17, + anon_sym_defined = 18, + anon_sym_BANG = 19, + anon_sym_TILDE = 20, + anon_sym_DASH = 21, + anon_sym_PLUS = 22, + anon_sym_STAR = 23, + anon_sym_SLASH = 24, + anon_sym_PERCENT = 25, + anon_sym_PIPE_PIPE = 26, + anon_sym_AMP_AMP = 27, + anon_sym_PIPE = 28, + anon_sym_CARET = 29, + anon_sym_AMP = 30, + anon_sym_EQ_EQ = 31, + anon_sym_BANG_EQ = 32, + anon_sym_GT = 33, + anon_sym_GT_EQ = 34, + anon_sym_LT_EQ = 35, + anon_sym_LT = 36, + anon_sym_LT_LT = 37, + anon_sym_GT_GT = 38, + anon_sym_SEMI = 39, + anon_sym_typedef = 40, + anon_sym_extern = 41, + anon_sym___attribute__ = 42, + anon_sym_COLON_COLON = 43, + anon_sym_LBRACK_LBRACK = 44, + anon_sym_RBRACK_RBRACK = 45, + anon_sym___declspec = 46, + anon_sym___based = 47, + anon_sym___cdecl = 48, + anon_sym___clrcall = 49, + anon_sym___stdcall = 50, + anon_sym___fastcall = 51, + anon_sym___thiscall = 52, + anon_sym___vectorcall = 53, + sym_ms_restrict_modifier = 54, + sym_ms_unsigned_ptr_modifier = 55, + sym_ms_signed_ptr_modifier = 56, + anon_sym__unaligned = 57, + anon_sym___unaligned = 58, + anon_sym_LBRACE = 59, + anon_sym_RBRACE = 60, + anon_sym_LBRACK = 61, + anon_sym_RBRACK = 62, + anon_sym_EQ = 63, + anon_sym_static = 64, + anon_sym_auto = 65, + anon_sym_register = 66, + anon_sym_inline = 67, + anon_sym_const = 68, + anon_sym_volatile = 69, + anon_sym_restrict = 70, + anon_sym__Atomic = 71, + anon_sym_signed = 72, + anon_sym_unsigned = 73, + anon_sym_long = 74, + anon_sym_short = 75, + sym_primitive_type = 76, + anon_sym_enum = 77, + anon_sym_struct = 78, + anon_sym_union = 79, + anon_sym_COLON = 80, + anon_sym_if = 81, + anon_sym_else = 82, + anon_sym_switch = 83, + anon_sym_case = 84, + anon_sym_default = 85, + anon_sym_while = 86, + anon_sym_do = 87, + anon_sym_for = 88, + anon_sym_return = 89, + anon_sym_break = 90, + anon_sym_continue = 91, + anon_sym_goto = 92, + anon_sym_QMARK = 93, + anon_sym_STAR_EQ = 94, + anon_sym_SLASH_EQ = 95, + anon_sym_PERCENT_EQ = 96, + anon_sym_PLUS_EQ = 97, + anon_sym_DASH_EQ = 98, + anon_sym_LT_LT_EQ = 99, + anon_sym_GT_GT_EQ = 100, + anon_sym_AMP_EQ = 101, + anon_sym_CARET_EQ = 102, + anon_sym_PIPE_EQ = 103, + anon_sym_DASH_DASH = 104, + anon_sym_PLUS_PLUS = 105, + anon_sym_sizeof = 106, + anon_sym_DOT = 107, + anon_sym_DASH_GT = 108, + sym_number_literal = 109, + anon_sym_L_SQUOTE = 110, + anon_sym_u_SQUOTE = 111, + anon_sym_U_SQUOTE = 112, + anon_sym_u8_SQUOTE = 113, + anon_sym_SQUOTE = 114, + aux_sym_char_literal_token1 = 115, + anon_sym_L_DQUOTE = 116, + anon_sym_u_DQUOTE = 117, + anon_sym_U_DQUOTE = 118, + anon_sym_u8_DQUOTE = 119, + anon_sym_DQUOTE = 120, + aux_sym_string_literal_token1 = 121, + sym_escape_sequence = 122, + sym_system_lib_string = 123, + sym_true = 124, + sym_false = 125, + sym_null = 126, + sym_comment = 127, + sym_translation_unit = 128, + sym_preproc_include = 129, + sym_preproc_def = 130, + sym_preproc_function_def = 131, + sym_preproc_params = 132, + sym_preproc_call = 133, + sym_preproc_if = 134, + sym_preproc_ifdef = 135, + sym_preproc_else = 136, + sym_preproc_elif = 137, + sym_preproc_if_in_field_declaration_list = 138, + sym_preproc_ifdef_in_field_declaration_list = 139, + sym_preproc_else_in_field_declaration_list = 140, + sym_preproc_elif_in_field_declaration_list = 141, + sym__preproc_expression = 142, + sym_preproc_parenthesized_expression = 143, + sym_preproc_defined = 144, + sym_preproc_unary_expression = 145, + sym_preproc_call_expression = 146, + sym_preproc_argument_list = 147, + sym_preproc_binary_expression = 148, + sym_function_definition = 149, + sym_declaration = 150, + sym_type_definition = 151, + sym__declaration_modifiers = 152, + sym__declaration_specifiers = 153, + sym_linkage_specification = 154, + sym_attribute_specifier = 155, + sym_attribute = 156, + sym_attribute_declaration = 157, + sym_ms_declspec_modifier = 158, + sym_ms_based_modifier = 159, + sym_ms_call_modifier = 160, + sym_ms_unaligned_ptr_modifier = 161, + sym_ms_pointer_modifier = 162, + sym_declaration_list = 163, + sym__declarator = 164, + sym__field_declarator = 165, + sym__type_declarator = 166, + sym__abstract_declarator = 167, + sym_parenthesized_declarator = 168, + sym_parenthesized_field_declarator = 169, + sym_parenthesized_type_declarator = 170, + sym_abstract_parenthesized_declarator = 171, + sym_attributed_declarator = 172, + sym_attributed_field_declarator = 173, + sym_attributed_type_declarator = 174, + sym_pointer_declarator = 175, + sym_pointer_field_declarator = 176, + sym_pointer_type_declarator = 177, + sym_abstract_pointer_declarator = 178, + sym_function_declarator = 179, + sym_function_field_declarator = 180, + sym_function_type_declarator = 181, + sym_abstract_function_declarator = 182, + sym_array_declarator = 183, + sym_array_field_declarator = 184, + sym_array_type_declarator = 185, + sym_abstract_array_declarator = 186, + sym_init_declarator = 187, + sym_compound_statement = 188, + sym_storage_class_specifier = 189, + sym_type_qualifier = 190, + sym__type_specifier = 191, + sym_sized_type_specifier = 192, + sym_enum_specifier = 193, + sym_enumerator_list = 194, + sym_struct_specifier = 195, + sym_union_specifier = 196, + sym_field_declaration_list = 197, + sym__field_declaration_list_item = 198, + sym_field_declaration = 199, + sym_bitfield_clause = 200, + sym_enumerator = 201, + sym_variadic_parameter = 202, + sym_parameter_list = 203, + sym_parameter_declaration = 204, + sym_attributed_statement = 205, + sym_labeled_statement = 206, + sym_expression_statement = 207, + sym_if_statement = 208, + sym_switch_statement = 209, + sym_case_statement = 210, + sym_while_statement = 211, + sym_do_statement = 212, + sym_for_statement = 213, + sym_return_statement = 214, + sym_break_statement = 215, + sym_continue_statement = 216, + sym_goto_statement = 217, + sym__expression = 218, + sym_comma_expression = 219, + sym_conditional_expression = 220, + sym_assignment_expression = 221, + sym_pointer_expression = 222, + sym_unary_expression = 223, + sym_binary_expression = 224, + sym_update_expression = 225, + sym_cast_expression = 226, + sym_type_descriptor = 227, + sym_sizeof_expression = 228, + sym_subscript_expression = 229, + sym_call_expression = 230, + sym_argument_list = 231, + sym_field_expression = 232, + sym_compound_literal_expression = 233, + sym_parenthesized_expression = 234, + sym_initializer_list = 235, + sym_initializer_pair = 236, + sym_subscript_designator = 237, + sym_field_designator = 238, + sym_char_literal = 239, + sym_concatenated_string = 240, + sym_string_literal = 241, + sym__empty_declaration = 242, + sym_macro_type_specifier = 243, + aux_sym_translation_unit_repeat1 = 244, + aux_sym_preproc_params_repeat1 = 245, + aux_sym_preproc_if_in_field_declaration_list_repeat1 = 246, + aux_sym_preproc_argument_list_repeat1 = 247, + aux_sym_declaration_repeat1 = 248, + aux_sym_type_definition_repeat1 = 249, + aux_sym_type_definition_repeat2 = 250, + aux_sym__declaration_specifiers_repeat1 = 251, + aux_sym_attribute_declaration_repeat1 = 252, + aux_sym_attributed_declarator_repeat1 = 253, + aux_sym_pointer_declarator_repeat1 = 254, + aux_sym_function_declarator_repeat1 = 255, + aux_sym_sized_type_specifier_repeat1 = 256, + aux_sym_enumerator_list_repeat1 = 257, + aux_sym_field_declaration_repeat1 = 258, + aux_sym_parameter_list_repeat1 = 259, + aux_sym_case_statement_repeat1 = 260, + aux_sym_argument_list_repeat1 = 261, + aux_sym_initializer_list_repeat1 = 262, + aux_sym_initializer_pair_repeat1 = 263, + aux_sym_concatenated_string_repeat1 = 264, + aux_sym_string_literal_repeat1 = 265, + alias_sym_field_identifier = 266, + alias_sym_statement_identifier = 267, + alias_sym_type_identifier = 268, +}; + +static const char * const ts_symbol_names[] = { + [ts_builtin_sym_end] = "end", + [sym_identifier] = "identifier", + [aux_sym_preproc_include_token1] = "#include", + [anon_sym_LF] = "\n", + [aux_sym_preproc_def_token1] = "#define", + [anon_sym_LPAREN] = "(", + [anon_sym_DOT_DOT_DOT] = "...", + [anon_sym_COMMA] = ",", + [anon_sym_RPAREN] = ")", + [aux_sym_preproc_if_token1] = "#if", + [aux_sym_preproc_if_token2] = "#endif", + [aux_sym_preproc_ifdef_token1] = "#ifdef", + [aux_sym_preproc_ifdef_token2] = "#ifndef", + [aux_sym_preproc_else_token1] = "#else", + [aux_sym_preproc_elif_token1] = "#elif", + [sym_preproc_directive] = "preproc_directive", + [sym_preproc_arg] = "preproc_arg", + [anon_sym_LPAREN2] = "(", + [anon_sym_defined] = "defined", + [anon_sym_BANG] = "!", + [anon_sym_TILDE] = "~", + [anon_sym_DASH] = "-", + [anon_sym_PLUS] = "+", + [anon_sym_STAR] = "*", + [anon_sym_SLASH] = "/", + [anon_sym_PERCENT] = "%", + [anon_sym_PIPE_PIPE] = "||", + [anon_sym_AMP_AMP] = "&&", + [anon_sym_PIPE] = "|", + [anon_sym_CARET] = "^", + [anon_sym_AMP] = "&", + [anon_sym_EQ_EQ] = "==", + [anon_sym_BANG_EQ] = "!=", + [anon_sym_GT] = ">", + [anon_sym_GT_EQ] = ">=", + [anon_sym_LT_EQ] = "<=", + [anon_sym_LT] = "<", + [anon_sym_LT_LT] = "<<", + [anon_sym_GT_GT] = ">>", + [anon_sym_SEMI] = ";", + [anon_sym_typedef] = "typedef", + [anon_sym_extern] = "extern", + [anon_sym___attribute__] = "__attribute__", + [anon_sym_COLON_COLON] = "::", + [anon_sym_LBRACK_LBRACK] = "[[", + [anon_sym_RBRACK_RBRACK] = "]]", + [anon_sym___declspec] = "__declspec", + [anon_sym___based] = "__based", + [anon_sym___cdecl] = "__cdecl", + [anon_sym___clrcall] = "__clrcall", + [anon_sym___stdcall] = "__stdcall", + [anon_sym___fastcall] = "__fastcall", + [anon_sym___thiscall] = "__thiscall", + [anon_sym___vectorcall] = "__vectorcall", + [sym_ms_restrict_modifier] = "ms_restrict_modifier", + [sym_ms_unsigned_ptr_modifier] = "ms_unsigned_ptr_modifier", + [sym_ms_signed_ptr_modifier] = "ms_signed_ptr_modifier", + [anon_sym__unaligned] = "_unaligned", + [anon_sym___unaligned] = "__unaligned", + [anon_sym_LBRACE] = "{", + [anon_sym_RBRACE] = "}", + [anon_sym_LBRACK] = "[", + [anon_sym_RBRACK] = "]", + [anon_sym_EQ] = "=", + [anon_sym_static] = "static", + [anon_sym_auto] = "auto", + [anon_sym_register] = "register", + [anon_sym_inline] = "inline", + [anon_sym_const] = "const", + [anon_sym_volatile] = "volatile", + [anon_sym_restrict] = "restrict", + [anon_sym__Atomic] = "_Atomic", + [anon_sym_signed] = "signed", + [anon_sym_unsigned] = "unsigned", + [anon_sym_long] = "long", + [anon_sym_short] = "short", + [sym_primitive_type] = "primitive_type", + [anon_sym_enum] = "enum", + [anon_sym_struct] = "struct", + [anon_sym_union] = "union", + [anon_sym_COLON] = ":", + [anon_sym_if] = "if", + [anon_sym_else] = "else", + [anon_sym_switch] = "switch", + [anon_sym_case] = "case", + [anon_sym_default] = "default", + [anon_sym_while] = "while", + [anon_sym_do] = "do", + [anon_sym_for] = "for", + [anon_sym_return] = "return", + [anon_sym_break] = "break", + [anon_sym_continue] = "continue", + [anon_sym_goto] = "goto", + [anon_sym_QMARK] = "\?", + [anon_sym_STAR_EQ] = "*=", + [anon_sym_SLASH_EQ] = "/=", + [anon_sym_PERCENT_EQ] = "%=", + [anon_sym_PLUS_EQ] = "+=", + [anon_sym_DASH_EQ] = "-=", + [anon_sym_LT_LT_EQ] = "<<=", + [anon_sym_GT_GT_EQ] = ">>=", + [anon_sym_AMP_EQ] = "&=", + [anon_sym_CARET_EQ] = "^=", + [anon_sym_PIPE_EQ] = "|=", + [anon_sym_DASH_DASH] = "--", + [anon_sym_PLUS_PLUS] = "++", + [anon_sym_sizeof] = "sizeof", + [anon_sym_DOT] = ".", + [anon_sym_DASH_GT] = "->", + [sym_number_literal] = "number_literal", + [anon_sym_L_SQUOTE] = "L'", + [anon_sym_u_SQUOTE] = "u'", + [anon_sym_U_SQUOTE] = "U'", + [anon_sym_u8_SQUOTE] = "u8'", + [anon_sym_SQUOTE] = "'", + [aux_sym_char_literal_token1] = "char_literal_token1", + [anon_sym_L_DQUOTE] = "L\"", + [anon_sym_u_DQUOTE] = "u\"", + [anon_sym_U_DQUOTE] = "U\"", + [anon_sym_u8_DQUOTE] = "u8\"", + [anon_sym_DQUOTE] = "\"", + [aux_sym_string_literal_token1] = "string_literal_token1", + [sym_escape_sequence] = "escape_sequence", + [sym_system_lib_string] = "system_lib_string", + [sym_true] = "true", + [sym_false] = "false", + [sym_null] = "null", + [sym_comment] = "comment", + [sym_translation_unit] = "translation_unit", + [sym_preproc_include] = "preproc_include", + [sym_preproc_def] = "preproc_def", + [sym_preproc_function_def] = "preproc_function_def", + [sym_preproc_params] = "preproc_params", + [sym_preproc_call] = "preproc_call", + [sym_preproc_if] = "preproc_if", + [sym_preproc_ifdef] = "preproc_ifdef", + [sym_preproc_else] = "preproc_else", + [sym_preproc_elif] = "preproc_elif", + [sym_preproc_if_in_field_declaration_list] = "preproc_if", + [sym_preproc_ifdef_in_field_declaration_list] = "preproc_ifdef", + [sym_preproc_else_in_field_declaration_list] = "preproc_else", + [sym_preproc_elif_in_field_declaration_list] = "preproc_elif", + [sym__preproc_expression] = "_preproc_expression", + [sym_preproc_parenthesized_expression] = "parenthesized_expression", + [sym_preproc_defined] = "preproc_defined", + [sym_preproc_unary_expression] = "unary_expression", + [sym_preproc_call_expression] = "call_expression", + [sym_preproc_argument_list] = "argument_list", + [sym_preproc_binary_expression] = "binary_expression", + [sym_function_definition] = "function_definition", + [sym_declaration] = "declaration", + [sym_type_definition] = "type_definition", + [sym__declaration_modifiers] = "_declaration_modifiers", + [sym__declaration_specifiers] = "_declaration_specifiers", + [sym_linkage_specification] = "linkage_specification", + [sym_attribute_specifier] = "attribute_specifier", + [sym_attribute] = "attribute", + [sym_attribute_declaration] = "attribute_declaration", + [sym_ms_declspec_modifier] = "ms_declspec_modifier", + [sym_ms_based_modifier] = "ms_based_modifier", + [sym_ms_call_modifier] = "ms_call_modifier", + [sym_ms_unaligned_ptr_modifier] = "ms_unaligned_ptr_modifier", + [sym_ms_pointer_modifier] = "ms_pointer_modifier", + [sym_declaration_list] = "declaration_list", + [sym__declarator] = "_declarator", + [sym__field_declarator] = "_field_declarator", + [sym__type_declarator] = "_type_declarator", + [sym__abstract_declarator] = "_abstract_declarator", + [sym_parenthesized_declarator] = "parenthesized_declarator", + [sym_parenthesized_field_declarator] = "parenthesized_declarator", + [sym_parenthesized_type_declarator] = "parenthesized_declarator", + [sym_abstract_parenthesized_declarator] = "abstract_parenthesized_declarator", + [sym_attributed_declarator] = "attributed_declarator", + [sym_attributed_field_declarator] = "attributed_declarator", + [sym_attributed_type_declarator] = "attributed_declarator", + [sym_pointer_declarator] = "pointer_declarator", + [sym_pointer_field_declarator] = "pointer_declarator", + [sym_pointer_type_declarator] = "pointer_declarator", + [sym_abstract_pointer_declarator] = "abstract_pointer_declarator", + [sym_function_declarator] = "function_declarator", + [sym_function_field_declarator] = "function_declarator", + [sym_function_type_declarator] = "function_declarator", + [sym_abstract_function_declarator] = "abstract_function_declarator", + [sym_array_declarator] = "array_declarator", + [sym_array_field_declarator] = "array_declarator", + [sym_array_type_declarator] = "array_declarator", + [sym_abstract_array_declarator] = "abstract_array_declarator", + [sym_init_declarator] = "init_declarator", + [sym_compound_statement] = "compound_statement", + [sym_storage_class_specifier] = "storage_class_specifier", + [sym_type_qualifier] = "type_qualifier", + [sym__type_specifier] = "_type_specifier", + [sym_sized_type_specifier] = "sized_type_specifier", + [sym_enum_specifier] = "enum_specifier", + [sym_enumerator_list] = "enumerator_list", + [sym_struct_specifier] = "struct_specifier", + [sym_union_specifier] = "union_specifier", + [sym_field_declaration_list] = "field_declaration_list", + [sym__field_declaration_list_item] = "_field_declaration_list_item", + [sym_field_declaration] = "field_declaration", + [sym_bitfield_clause] = "bitfield_clause", + [sym_enumerator] = "enumerator", + [sym_variadic_parameter] = "variadic_parameter", + [sym_parameter_list] = "parameter_list", + [sym_parameter_declaration] = "parameter_declaration", + [sym_attributed_statement] = "attributed_statement", + [sym_labeled_statement] = "labeled_statement", + [sym_expression_statement] = "expression_statement", + [sym_if_statement] = "if_statement", + [sym_switch_statement] = "switch_statement", + [sym_case_statement] = "case_statement", + [sym_while_statement] = "while_statement", + [sym_do_statement] = "do_statement", + [sym_for_statement] = "for_statement", + [sym_return_statement] = "return_statement", + [sym_break_statement] = "break_statement", + [sym_continue_statement] = "continue_statement", + [sym_goto_statement] = "goto_statement", + [sym__expression] = "_expression", + [sym_comma_expression] = "comma_expression", + [sym_conditional_expression] = "conditional_expression", + [sym_assignment_expression] = "assignment_expression", + [sym_pointer_expression] = "pointer_expression", + [sym_unary_expression] = "unary_expression", + [sym_binary_expression] = "binary_expression", + [sym_update_expression] = "update_expression", + [sym_cast_expression] = "cast_expression", + [sym_type_descriptor] = "type_descriptor", + [sym_sizeof_expression] = "sizeof_expression", + [sym_subscript_expression] = "subscript_expression", + [sym_call_expression] = "call_expression", + [sym_argument_list] = "argument_list", + [sym_field_expression] = "field_expression", + [sym_compound_literal_expression] = "compound_literal_expression", + [sym_parenthesized_expression] = "parenthesized_expression", + [sym_initializer_list] = "initializer_list", + [sym_initializer_pair] = "initializer_pair", + [sym_subscript_designator] = "subscript_designator", + [sym_field_designator] = "field_designator", + [sym_char_literal] = "char_literal", + [sym_concatenated_string] = "concatenated_string", + [sym_string_literal] = "string_literal", + [sym__empty_declaration] = "_empty_declaration", + [sym_macro_type_specifier] = "macro_type_specifier", + [aux_sym_translation_unit_repeat1] = "translation_unit_repeat1", + [aux_sym_preproc_params_repeat1] = "preproc_params_repeat1", + [aux_sym_preproc_if_in_field_declaration_list_repeat1] = "preproc_if_in_field_declaration_list_repeat1", + [aux_sym_preproc_argument_list_repeat1] = "preproc_argument_list_repeat1", + [aux_sym_declaration_repeat1] = "declaration_repeat1", + [aux_sym_type_definition_repeat1] = "type_definition_repeat1", + [aux_sym_type_definition_repeat2] = "type_definition_repeat2", + [aux_sym__declaration_specifiers_repeat1] = "_declaration_specifiers_repeat1", + [aux_sym_attribute_declaration_repeat1] = "attribute_declaration_repeat1", + [aux_sym_attributed_declarator_repeat1] = "attributed_declarator_repeat1", + [aux_sym_pointer_declarator_repeat1] = "pointer_declarator_repeat1", + [aux_sym_function_declarator_repeat1] = "function_declarator_repeat1", + [aux_sym_sized_type_specifier_repeat1] = "sized_type_specifier_repeat1", + [aux_sym_enumerator_list_repeat1] = "enumerator_list_repeat1", + [aux_sym_field_declaration_repeat1] = "field_declaration_repeat1", + [aux_sym_parameter_list_repeat1] = "parameter_list_repeat1", + [aux_sym_case_statement_repeat1] = "case_statement_repeat1", + [aux_sym_argument_list_repeat1] = "argument_list_repeat1", + [aux_sym_initializer_list_repeat1] = "initializer_list_repeat1", + [aux_sym_initializer_pair_repeat1] = "initializer_pair_repeat1", + [aux_sym_concatenated_string_repeat1] = "concatenated_string_repeat1", + [aux_sym_string_literal_repeat1] = "string_literal_repeat1", + [alias_sym_field_identifier] = "field_identifier", + [alias_sym_statement_identifier] = "statement_identifier", + [alias_sym_type_identifier] = "type_identifier", +}; + +static const TSSymbol ts_symbol_map[] = { + [ts_builtin_sym_end] = ts_builtin_sym_end, + [sym_identifier] = sym_identifier, + [aux_sym_preproc_include_token1] = aux_sym_preproc_include_token1, + [anon_sym_LF] = anon_sym_LF, + [aux_sym_preproc_def_token1] = aux_sym_preproc_def_token1, + [anon_sym_LPAREN] = anon_sym_LPAREN, + [anon_sym_DOT_DOT_DOT] = anon_sym_DOT_DOT_DOT, + [anon_sym_COMMA] = anon_sym_COMMA, + [anon_sym_RPAREN] = anon_sym_RPAREN, + [aux_sym_preproc_if_token1] = aux_sym_preproc_if_token1, + [aux_sym_preproc_if_token2] = aux_sym_preproc_if_token2, + [aux_sym_preproc_ifdef_token1] = aux_sym_preproc_ifdef_token1, + [aux_sym_preproc_ifdef_token2] = aux_sym_preproc_ifdef_token2, + [aux_sym_preproc_else_token1] = aux_sym_preproc_else_token1, + [aux_sym_preproc_elif_token1] = aux_sym_preproc_elif_token1, + [sym_preproc_directive] = sym_preproc_directive, + [sym_preproc_arg] = sym_preproc_arg, + [anon_sym_LPAREN2] = anon_sym_LPAREN, + [anon_sym_defined] = anon_sym_defined, + [anon_sym_BANG] = anon_sym_BANG, + [anon_sym_TILDE] = anon_sym_TILDE, + [anon_sym_DASH] = anon_sym_DASH, + [anon_sym_PLUS] = anon_sym_PLUS, + [anon_sym_STAR] = anon_sym_STAR, + [anon_sym_SLASH] = anon_sym_SLASH, + [anon_sym_PERCENT] = anon_sym_PERCENT, + [anon_sym_PIPE_PIPE] = anon_sym_PIPE_PIPE, + [anon_sym_AMP_AMP] = anon_sym_AMP_AMP, + [anon_sym_PIPE] = anon_sym_PIPE, + [anon_sym_CARET] = anon_sym_CARET, + [anon_sym_AMP] = anon_sym_AMP, + [anon_sym_EQ_EQ] = anon_sym_EQ_EQ, + [anon_sym_BANG_EQ] = anon_sym_BANG_EQ, + [anon_sym_GT] = anon_sym_GT, + [anon_sym_GT_EQ] = anon_sym_GT_EQ, + [anon_sym_LT_EQ] = anon_sym_LT_EQ, + [anon_sym_LT] = anon_sym_LT, + [anon_sym_LT_LT] = anon_sym_LT_LT, + [anon_sym_GT_GT] = anon_sym_GT_GT, + [anon_sym_SEMI] = anon_sym_SEMI, + [anon_sym_typedef] = anon_sym_typedef, + [anon_sym_extern] = anon_sym_extern, + [anon_sym___attribute__] = anon_sym___attribute__, + [anon_sym_COLON_COLON] = anon_sym_COLON_COLON, + [anon_sym_LBRACK_LBRACK] = anon_sym_LBRACK_LBRACK, + [anon_sym_RBRACK_RBRACK] = anon_sym_RBRACK_RBRACK, + [anon_sym___declspec] = anon_sym___declspec, + [anon_sym___based] = anon_sym___based, + [anon_sym___cdecl] = anon_sym___cdecl, + [anon_sym___clrcall] = anon_sym___clrcall, + [anon_sym___stdcall] = anon_sym___stdcall, + [anon_sym___fastcall] = anon_sym___fastcall, + [anon_sym___thiscall] = anon_sym___thiscall, + [anon_sym___vectorcall] = anon_sym___vectorcall, + [sym_ms_restrict_modifier] = sym_ms_restrict_modifier, + [sym_ms_unsigned_ptr_modifier] = sym_ms_unsigned_ptr_modifier, + [sym_ms_signed_ptr_modifier] = sym_ms_signed_ptr_modifier, + [anon_sym__unaligned] = anon_sym__unaligned, + [anon_sym___unaligned] = anon_sym___unaligned, + [anon_sym_LBRACE] = anon_sym_LBRACE, + [anon_sym_RBRACE] = anon_sym_RBRACE, + [anon_sym_LBRACK] = anon_sym_LBRACK, + [anon_sym_RBRACK] = anon_sym_RBRACK, + [anon_sym_EQ] = anon_sym_EQ, + [anon_sym_static] = anon_sym_static, + [anon_sym_auto] = anon_sym_auto, + [anon_sym_register] = anon_sym_register, + [anon_sym_inline] = anon_sym_inline, + [anon_sym_const] = anon_sym_const, + [anon_sym_volatile] = anon_sym_volatile, + [anon_sym_restrict] = anon_sym_restrict, + [anon_sym__Atomic] = anon_sym__Atomic, + [anon_sym_signed] = anon_sym_signed, + [anon_sym_unsigned] = anon_sym_unsigned, + [anon_sym_long] = anon_sym_long, + [anon_sym_short] = anon_sym_short, + [sym_primitive_type] = sym_primitive_type, + [anon_sym_enum] = anon_sym_enum, + [anon_sym_struct] = anon_sym_struct, + [anon_sym_union] = anon_sym_union, + [anon_sym_COLON] = anon_sym_COLON, + [anon_sym_if] = anon_sym_if, + [anon_sym_else] = anon_sym_else, + [anon_sym_switch] = anon_sym_switch, + [anon_sym_case] = anon_sym_case, + [anon_sym_default] = anon_sym_default, + [anon_sym_while] = anon_sym_while, + [anon_sym_do] = anon_sym_do, + [anon_sym_for] = anon_sym_for, + [anon_sym_return] = anon_sym_return, + [anon_sym_break] = anon_sym_break, + [anon_sym_continue] = anon_sym_continue, + [anon_sym_goto] = anon_sym_goto, + [anon_sym_QMARK] = anon_sym_QMARK, + [anon_sym_STAR_EQ] = anon_sym_STAR_EQ, + [anon_sym_SLASH_EQ] = anon_sym_SLASH_EQ, + [anon_sym_PERCENT_EQ] = anon_sym_PERCENT_EQ, + [anon_sym_PLUS_EQ] = anon_sym_PLUS_EQ, + [anon_sym_DASH_EQ] = anon_sym_DASH_EQ, + [anon_sym_LT_LT_EQ] = anon_sym_LT_LT_EQ, + [anon_sym_GT_GT_EQ] = anon_sym_GT_GT_EQ, + [anon_sym_AMP_EQ] = anon_sym_AMP_EQ, + [anon_sym_CARET_EQ] = anon_sym_CARET_EQ, + [anon_sym_PIPE_EQ] = anon_sym_PIPE_EQ, + [anon_sym_DASH_DASH] = anon_sym_DASH_DASH, + [anon_sym_PLUS_PLUS] = anon_sym_PLUS_PLUS, + [anon_sym_sizeof] = anon_sym_sizeof, + [anon_sym_DOT] = anon_sym_DOT, + [anon_sym_DASH_GT] = anon_sym_DASH_GT, + [sym_number_literal] = sym_number_literal, + [anon_sym_L_SQUOTE] = anon_sym_L_SQUOTE, + [anon_sym_u_SQUOTE] = anon_sym_u_SQUOTE, + [anon_sym_U_SQUOTE] = anon_sym_U_SQUOTE, + [anon_sym_u8_SQUOTE] = anon_sym_u8_SQUOTE, + [anon_sym_SQUOTE] = anon_sym_SQUOTE, + [aux_sym_char_literal_token1] = aux_sym_char_literal_token1, + [anon_sym_L_DQUOTE] = anon_sym_L_DQUOTE, + [anon_sym_u_DQUOTE] = anon_sym_u_DQUOTE, + [anon_sym_U_DQUOTE] = anon_sym_U_DQUOTE, + [anon_sym_u8_DQUOTE] = anon_sym_u8_DQUOTE, + [anon_sym_DQUOTE] = anon_sym_DQUOTE, + [aux_sym_string_literal_token1] = aux_sym_string_literal_token1, + [sym_escape_sequence] = sym_escape_sequence, + [sym_system_lib_string] = sym_system_lib_string, + [sym_true] = sym_true, + [sym_false] = sym_false, + [sym_null] = sym_null, + [sym_comment] = sym_comment, + [sym_translation_unit] = sym_translation_unit, + [sym_preproc_include] = sym_preproc_include, + [sym_preproc_def] = sym_preproc_def, + [sym_preproc_function_def] = sym_preproc_function_def, + [sym_preproc_params] = sym_preproc_params, + [sym_preproc_call] = sym_preproc_call, + [sym_preproc_if] = sym_preproc_if, + [sym_preproc_ifdef] = sym_preproc_ifdef, + [sym_preproc_else] = sym_preproc_else, + [sym_preproc_elif] = sym_preproc_elif, + [sym_preproc_if_in_field_declaration_list] = sym_preproc_if, + [sym_preproc_ifdef_in_field_declaration_list] = sym_preproc_ifdef, + [sym_preproc_else_in_field_declaration_list] = sym_preproc_else, + [sym_preproc_elif_in_field_declaration_list] = sym_preproc_elif, + [sym__preproc_expression] = sym__preproc_expression, + [sym_preproc_parenthesized_expression] = sym_parenthesized_expression, + [sym_preproc_defined] = sym_preproc_defined, + [sym_preproc_unary_expression] = sym_unary_expression, + [sym_preproc_call_expression] = sym_call_expression, + [sym_preproc_argument_list] = sym_argument_list, + [sym_preproc_binary_expression] = sym_binary_expression, + [sym_function_definition] = sym_function_definition, + [sym_declaration] = sym_declaration, + [sym_type_definition] = sym_type_definition, + [sym__declaration_modifiers] = sym__declaration_modifiers, + [sym__declaration_specifiers] = sym__declaration_specifiers, + [sym_linkage_specification] = sym_linkage_specification, + [sym_attribute_specifier] = sym_attribute_specifier, + [sym_attribute] = sym_attribute, + [sym_attribute_declaration] = sym_attribute_declaration, + [sym_ms_declspec_modifier] = sym_ms_declspec_modifier, + [sym_ms_based_modifier] = sym_ms_based_modifier, + [sym_ms_call_modifier] = sym_ms_call_modifier, + [sym_ms_unaligned_ptr_modifier] = sym_ms_unaligned_ptr_modifier, + [sym_ms_pointer_modifier] = sym_ms_pointer_modifier, + [sym_declaration_list] = sym_declaration_list, + [sym__declarator] = sym__declarator, + [sym__field_declarator] = sym__field_declarator, + [sym__type_declarator] = sym__type_declarator, + [sym__abstract_declarator] = sym__abstract_declarator, + [sym_parenthesized_declarator] = sym_parenthesized_declarator, + [sym_parenthesized_field_declarator] = sym_parenthesized_declarator, + [sym_parenthesized_type_declarator] = sym_parenthesized_declarator, + [sym_abstract_parenthesized_declarator] = sym_abstract_parenthesized_declarator, + [sym_attributed_declarator] = sym_attributed_declarator, + [sym_attributed_field_declarator] = sym_attributed_declarator, + [sym_attributed_type_declarator] = sym_attributed_declarator, + [sym_pointer_declarator] = sym_pointer_declarator, + [sym_pointer_field_declarator] = sym_pointer_declarator, + [sym_pointer_type_declarator] = sym_pointer_declarator, + [sym_abstract_pointer_declarator] = sym_abstract_pointer_declarator, + [sym_function_declarator] = sym_function_declarator, + [sym_function_field_declarator] = sym_function_declarator, + [sym_function_type_declarator] = sym_function_declarator, + [sym_abstract_function_declarator] = sym_abstract_function_declarator, + [sym_array_declarator] = sym_array_declarator, + [sym_array_field_declarator] = sym_array_declarator, + [sym_array_type_declarator] = sym_array_declarator, + [sym_abstract_array_declarator] = sym_abstract_array_declarator, + [sym_init_declarator] = sym_init_declarator, + [sym_compound_statement] = sym_compound_statement, + [sym_storage_class_specifier] = sym_storage_class_specifier, + [sym_type_qualifier] = sym_type_qualifier, + [sym__type_specifier] = sym__type_specifier, + [sym_sized_type_specifier] = sym_sized_type_specifier, + [sym_enum_specifier] = sym_enum_specifier, + [sym_enumerator_list] = sym_enumerator_list, + [sym_struct_specifier] = sym_struct_specifier, + [sym_union_specifier] = sym_union_specifier, + [sym_field_declaration_list] = sym_field_declaration_list, + [sym__field_declaration_list_item] = sym__field_declaration_list_item, + [sym_field_declaration] = sym_field_declaration, + [sym_bitfield_clause] = sym_bitfield_clause, + [sym_enumerator] = sym_enumerator, + [sym_variadic_parameter] = sym_variadic_parameter, + [sym_parameter_list] = sym_parameter_list, + [sym_parameter_declaration] = sym_parameter_declaration, + [sym_attributed_statement] = sym_attributed_statement, + [sym_labeled_statement] = sym_labeled_statement, + [sym_expression_statement] = sym_expression_statement, + [sym_if_statement] = sym_if_statement, + [sym_switch_statement] = sym_switch_statement, + [sym_case_statement] = sym_case_statement, + [sym_while_statement] = sym_while_statement, + [sym_do_statement] = sym_do_statement, + [sym_for_statement] = sym_for_statement, + [sym_return_statement] = sym_return_statement, + [sym_break_statement] = sym_break_statement, + [sym_continue_statement] = sym_continue_statement, + [sym_goto_statement] = sym_goto_statement, + [sym__expression] = sym__expression, + [sym_comma_expression] = sym_comma_expression, + [sym_conditional_expression] = sym_conditional_expression, + [sym_assignment_expression] = sym_assignment_expression, + [sym_pointer_expression] = sym_pointer_expression, + [sym_unary_expression] = sym_unary_expression, + [sym_binary_expression] = sym_binary_expression, + [sym_update_expression] = sym_update_expression, + [sym_cast_expression] = sym_cast_expression, + [sym_type_descriptor] = sym_type_descriptor, + [sym_sizeof_expression] = sym_sizeof_expression, + [sym_subscript_expression] = sym_subscript_expression, + [sym_call_expression] = sym_call_expression, + [sym_argument_list] = sym_argument_list, + [sym_field_expression] = sym_field_expression, + [sym_compound_literal_expression] = sym_compound_literal_expression, + [sym_parenthesized_expression] = sym_parenthesized_expression, + [sym_initializer_list] = sym_initializer_list, + [sym_initializer_pair] = sym_initializer_pair, + [sym_subscript_designator] = sym_subscript_designator, + [sym_field_designator] = sym_field_designator, + [sym_char_literal] = sym_char_literal, + [sym_concatenated_string] = sym_concatenated_string, + [sym_string_literal] = sym_string_literal, + [sym__empty_declaration] = sym__empty_declaration, + [sym_macro_type_specifier] = sym_macro_type_specifier, + [aux_sym_translation_unit_repeat1] = aux_sym_translation_unit_repeat1, + [aux_sym_preproc_params_repeat1] = aux_sym_preproc_params_repeat1, + [aux_sym_preproc_if_in_field_declaration_list_repeat1] = aux_sym_preproc_if_in_field_declaration_list_repeat1, + [aux_sym_preproc_argument_list_repeat1] = aux_sym_preproc_argument_list_repeat1, + [aux_sym_declaration_repeat1] = aux_sym_declaration_repeat1, + [aux_sym_type_definition_repeat1] = aux_sym_type_definition_repeat1, + [aux_sym_type_definition_repeat2] = aux_sym_type_definition_repeat2, + [aux_sym__declaration_specifiers_repeat1] = aux_sym__declaration_specifiers_repeat1, + [aux_sym_attribute_declaration_repeat1] = aux_sym_attribute_declaration_repeat1, + [aux_sym_attributed_declarator_repeat1] = aux_sym_attributed_declarator_repeat1, + [aux_sym_pointer_declarator_repeat1] = aux_sym_pointer_declarator_repeat1, + [aux_sym_function_declarator_repeat1] = aux_sym_function_declarator_repeat1, + [aux_sym_sized_type_specifier_repeat1] = aux_sym_sized_type_specifier_repeat1, + [aux_sym_enumerator_list_repeat1] = aux_sym_enumerator_list_repeat1, + [aux_sym_field_declaration_repeat1] = aux_sym_field_declaration_repeat1, + [aux_sym_parameter_list_repeat1] = aux_sym_parameter_list_repeat1, + [aux_sym_case_statement_repeat1] = aux_sym_case_statement_repeat1, + [aux_sym_argument_list_repeat1] = aux_sym_argument_list_repeat1, + [aux_sym_initializer_list_repeat1] = aux_sym_initializer_list_repeat1, + [aux_sym_initializer_pair_repeat1] = aux_sym_initializer_pair_repeat1, + [aux_sym_concatenated_string_repeat1] = aux_sym_concatenated_string_repeat1, + [aux_sym_string_literal_repeat1] = aux_sym_string_literal_repeat1, + [alias_sym_field_identifier] = alias_sym_field_identifier, + [alias_sym_statement_identifier] = alias_sym_statement_identifier, + [alias_sym_type_identifier] = alias_sym_type_identifier, +}; + +static const TSSymbolMetadata ts_symbol_metadata[] = { + [ts_builtin_sym_end] = { + .visible = false, + .named = true, + }, + [sym_identifier] = { + .visible = true, + .named = true, + }, + [aux_sym_preproc_include_token1] = { + .visible = true, + .named = false, + }, + [anon_sym_LF] = { + .visible = true, + .named = false, + }, + [aux_sym_preproc_def_token1] = { + .visible = true, + .named = false, + }, + [anon_sym_LPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_DOT_DOT_DOT] = { + .visible = true, + .named = false, + }, + [anon_sym_COMMA] = { + .visible = true, + .named = false, + }, + [anon_sym_RPAREN] = { + .visible = true, + .named = false, + }, + [aux_sym_preproc_if_token1] = { + .visible = true, + .named = false, + }, + [aux_sym_preproc_if_token2] = { + .visible = true, + .named = false, + }, + [aux_sym_preproc_ifdef_token1] = { + .visible = true, + .named = false, + }, + [aux_sym_preproc_ifdef_token2] = { + .visible = true, + .named = false, + }, + [aux_sym_preproc_else_token1] = { + .visible = true, + .named = false, + }, + [aux_sym_preproc_elif_token1] = { + .visible = true, + .named = false, + }, + [sym_preproc_directive] = { + .visible = true, + .named = true, + }, + [sym_preproc_arg] = { + .visible = true, + .named = true, + }, + [anon_sym_LPAREN2] = { + .visible = true, + .named = false, + }, + [anon_sym_defined] = { + .visible = true, + .named = false, + }, + [anon_sym_BANG] = { + .visible = true, + .named = false, + }, + [anon_sym_TILDE] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH] = { + .visible = true, + .named = false, + }, + [anon_sym_PLUS] = { + .visible = true, + .named = false, + }, + [anon_sym_STAR] = { + .visible = true, + .named = false, + }, + [anon_sym_SLASH] = { + .visible = true, + .named = false, + }, + [anon_sym_PERCENT] = { + .visible = true, + .named = false, + }, + [anon_sym_PIPE_PIPE] = { + .visible = true, + .named = false, + }, + [anon_sym_AMP_AMP] = { + .visible = true, + .named = false, + }, + [anon_sym_PIPE] = { + .visible = true, + .named = false, + }, + [anon_sym_CARET] = { + .visible = true, + .named = false, + }, + [anon_sym_AMP] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_BANG_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_GT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_LT] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_LT] = { + .visible = true, + .named = false, + }, + [anon_sym_GT_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_SEMI] = { + .visible = true, + .named = false, + }, + [anon_sym_typedef] = { + .visible = true, + .named = false, + }, + [anon_sym_extern] = { + .visible = true, + .named = false, + }, + [anon_sym___attribute__] = { + .visible = true, + .named = false, + }, + [anon_sym_COLON_COLON] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACK_LBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACK_RBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym___declspec] = { + .visible = true, + .named = false, + }, + [anon_sym___based] = { + .visible = true, + .named = false, + }, + [anon_sym___cdecl] = { + .visible = true, + .named = false, + }, + [anon_sym___clrcall] = { + .visible = true, + .named = false, + }, + [anon_sym___stdcall] = { + .visible = true, + .named = false, + }, + [anon_sym___fastcall] = { + .visible = true, + .named = false, + }, + [anon_sym___thiscall] = { + .visible = true, + .named = false, + }, + [anon_sym___vectorcall] = { + .visible = true, + .named = false, + }, + [sym_ms_restrict_modifier] = { + .visible = true, + .named = true, + }, + [sym_ms_unsigned_ptr_modifier] = { + .visible = true, + .named = true, + }, + [sym_ms_signed_ptr_modifier] = { + .visible = true, + .named = true, + }, + [anon_sym__unaligned] = { + .visible = true, + .named = false, + }, + [anon_sym___unaligned] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACE] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACE] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_static] = { + .visible = true, + .named = false, + }, + [anon_sym_auto] = { + .visible = true, + .named = false, + }, + [anon_sym_register] = { + .visible = true, + .named = false, + }, + [anon_sym_inline] = { + .visible = true, + .named = false, + }, + [anon_sym_const] = { + .visible = true, + .named = false, + }, + [anon_sym_volatile] = { + .visible = true, + .named = false, + }, + [anon_sym_restrict] = { + .visible = true, + .named = false, + }, + [anon_sym__Atomic] = { + .visible = true, + .named = false, + }, + [anon_sym_signed] = { + .visible = true, + .named = false, + }, + [anon_sym_unsigned] = { + .visible = true, + .named = false, + }, + [anon_sym_long] = { + .visible = true, + .named = false, + }, + [anon_sym_short] = { + .visible = true, + .named = false, + }, + [sym_primitive_type] = { + .visible = true, + .named = true, + }, + [anon_sym_enum] = { + .visible = true, + .named = false, + }, + [anon_sym_struct] = { + .visible = true, + .named = false, + }, + [anon_sym_union] = { + .visible = true, + .named = false, + }, + [anon_sym_COLON] = { + .visible = true, + .named = false, + }, + [anon_sym_if] = { + .visible = true, + .named = false, + }, + [anon_sym_else] = { + .visible = true, + .named = false, + }, + [anon_sym_switch] = { + .visible = true, + .named = false, + }, + [anon_sym_case] = { + .visible = true, + .named = false, + }, + [anon_sym_default] = { + .visible = true, + .named = false, + }, + [anon_sym_while] = { + .visible = true, + .named = false, + }, + [anon_sym_do] = { + .visible = true, + .named = false, + }, + [anon_sym_for] = { + .visible = true, + .named = false, + }, + [anon_sym_return] = { + .visible = true, + .named = false, + }, + [anon_sym_break] = { + .visible = true, + .named = false, + }, + [anon_sym_continue] = { + .visible = true, + .named = false, + }, + [anon_sym_goto] = { + .visible = true, + .named = false, + }, + [anon_sym_QMARK] = { + .visible = true, + .named = false, + }, + [anon_sym_STAR_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_SLASH_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_PERCENT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_PLUS_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_LT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_GT_GT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_AMP_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_CARET_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_PIPE_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH_DASH] = { + .visible = true, + .named = false, + }, + [anon_sym_PLUS_PLUS] = { + .visible = true, + .named = false, + }, + [anon_sym_sizeof] = { + .visible = true, + .named = false, + }, + [anon_sym_DOT] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH_GT] = { + .visible = true, + .named = false, + }, + [sym_number_literal] = { + .visible = true, + .named = true, + }, + [anon_sym_L_SQUOTE] = { + .visible = true, + .named = false, + }, + [anon_sym_u_SQUOTE] = { + .visible = true, + .named = false, + }, + [anon_sym_U_SQUOTE] = { + .visible = true, + .named = false, + }, + [anon_sym_u8_SQUOTE] = { + .visible = true, + .named = false, + }, + [anon_sym_SQUOTE] = { + .visible = true, + .named = false, + }, + [aux_sym_char_literal_token1] = { + .visible = false, + .named = false, + }, + [anon_sym_L_DQUOTE] = { + .visible = true, + .named = false, + }, + [anon_sym_u_DQUOTE] = { + .visible = true, + .named = false, + }, + [anon_sym_U_DQUOTE] = { + .visible = true, + .named = false, + }, + [anon_sym_u8_DQUOTE] = { + .visible = true, + .named = false, + }, + [anon_sym_DQUOTE] = { + .visible = true, + .named = false, + }, + [aux_sym_string_literal_token1] = { + .visible = false, + .named = false, + }, + [sym_escape_sequence] = { + .visible = true, + .named = true, + }, + [sym_system_lib_string] = { + .visible = true, + .named = true, + }, + [sym_true] = { + .visible = true, + .named = true, + }, + [sym_false] = { + .visible = true, + .named = true, + }, + [sym_null] = { + .visible = true, + .named = true, + }, + [sym_comment] = { + .visible = true, + .named = true, + }, + [sym_translation_unit] = { + .visible = true, + .named = true, + }, + [sym_preproc_include] = { + .visible = true, + .named = true, + }, + [sym_preproc_def] = { + .visible = true, + .named = true, + }, + [sym_preproc_function_def] = { + .visible = true, + .named = true, + }, + [sym_preproc_params] = { + .visible = true, + .named = true, + }, + [sym_preproc_call] = { + .visible = true, + .named = true, + }, + [sym_preproc_if] = { + .visible = true, + .named = true, + }, + [sym_preproc_ifdef] = { + .visible = true, + .named = true, + }, + [sym_preproc_else] = { + .visible = true, + .named = true, + }, + [sym_preproc_elif] = { + .visible = true, + .named = true, + }, + [sym_preproc_if_in_field_declaration_list] = { + .visible = true, + .named = true, + }, + [sym_preproc_ifdef_in_field_declaration_list] = { + .visible = true, + .named = true, + }, + [sym_preproc_else_in_field_declaration_list] = { + .visible = true, + .named = true, + }, + [sym_preproc_elif_in_field_declaration_list] = { + .visible = true, + .named = true, + }, + [sym__preproc_expression] = { + .visible = false, + .named = true, + }, + [sym_preproc_parenthesized_expression] = { + .visible = true, + .named = true, + }, + [sym_preproc_defined] = { + .visible = true, + .named = true, + }, + [sym_preproc_unary_expression] = { + .visible = true, + .named = true, + }, + [sym_preproc_call_expression] = { + .visible = true, + .named = true, + }, + [sym_preproc_argument_list] = { + .visible = true, + .named = true, + }, + [sym_preproc_binary_expression] = { + .visible = true, + .named = true, + }, + [sym_function_definition] = { + .visible = true, + .named = true, + }, + [sym_declaration] = { + .visible = true, + .named = true, + }, + [sym_type_definition] = { + .visible = true, + .named = true, + }, + [sym__declaration_modifiers] = { + .visible = false, + .named = true, + }, + [sym__declaration_specifiers] = { + .visible = false, + .named = true, + }, + [sym_linkage_specification] = { + .visible = true, + .named = true, + }, + [sym_attribute_specifier] = { + .visible = true, + .named = true, + }, + [sym_attribute] = { + .visible = true, + .named = true, + }, + [sym_attribute_declaration] = { + .visible = true, + .named = true, + }, + [sym_ms_declspec_modifier] = { + .visible = true, + .named = true, + }, + [sym_ms_based_modifier] = { + .visible = true, + .named = true, + }, + [sym_ms_call_modifier] = { + .visible = true, + .named = true, + }, + [sym_ms_unaligned_ptr_modifier] = { + .visible = true, + .named = true, + }, + [sym_ms_pointer_modifier] = { + .visible = true, + .named = true, + }, + [sym_declaration_list] = { + .visible = true, + .named = true, + }, + [sym__declarator] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym__field_declarator] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym__type_declarator] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym__abstract_declarator] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_parenthesized_declarator] = { + .visible = true, + .named = true, + }, + [sym_parenthesized_field_declarator] = { + .visible = true, + .named = true, + }, + [sym_parenthesized_type_declarator] = { + .visible = true, + .named = true, + }, + [sym_abstract_parenthesized_declarator] = { + .visible = true, + .named = true, + }, + [sym_attributed_declarator] = { + .visible = true, + .named = true, + }, + [sym_attributed_field_declarator] = { + .visible = true, + .named = true, + }, + [sym_attributed_type_declarator] = { + .visible = true, + .named = true, + }, + [sym_pointer_declarator] = { + .visible = true, + .named = true, + }, + [sym_pointer_field_declarator] = { + .visible = true, + .named = true, + }, + [sym_pointer_type_declarator] = { + .visible = true, + .named = true, + }, + [sym_abstract_pointer_declarator] = { + .visible = true, + .named = true, + }, + [sym_function_declarator] = { + .visible = true, + .named = true, + }, + [sym_function_field_declarator] = { + .visible = true, + .named = true, + }, + [sym_function_type_declarator] = { + .visible = true, + .named = true, + }, + [sym_abstract_function_declarator] = { + .visible = true, + .named = true, + }, + [sym_array_declarator] = { + .visible = true, + .named = true, + }, + [sym_array_field_declarator] = { + .visible = true, + .named = true, + }, + [sym_array_type_declarator] = { + .visible = true, + .named = true, + }, + [sym_abstract_array_declarator] = { + .visible = true, + .named = true, + }, + [sym_init_declarator] = { + .visible = true, + .named = true, + }, + [sym_compound_statement] = { + .visible = true, + .named = true, + }, + [sym_storage_class_specifier] = { + .visible = true, + .named = true, + }, + [sym_type_qualifier] = { + .visible = true, + .named = true, + }, + [sym__type_specifier] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_sized_type_specifier] = { + .visible = true, + .named = true, + }, + [sym_enum_specifier] = { + .visible = true, + .named = true, + }, + [sym_enumerator_list] = { + .visible = true, + .named = true, + }, + [sym_struct_specifier] = { + .visible = true, + .named = true, + }, + [sym_union_specifier] = { + .visible = true, + .named = true, + }, + [sym_field_declaration_list] = { + .visible = true, + .named = true, + }, + [sym__field_declaration_list_item] = { + .visible = false, + .named = true, + }, + [sym_field_declaration] = { + .visible = true, + .named = true, + }, + [sym_bitfield_clause] = { + .visible = true, + .named = true, + }, + [sym_enumerator] = { + .visible = true, + .named = true, + }, + [sym_variadic_parameter] = { + .visible = true, + .named = true, + }, + [sym_parameter_list] = { + .visible = true, + .named = true, + }, + [sym_parameter_declaration] = { + .visible = true, + .named = true, + }, + [sym_attributed_statement] = { + .visible = true, + .named = true, + }, + [sym_labeled_statement] = { + .visible = true, + .named = true, + }, + [sym_expression_statement] = { + .visible = true, + .named = true, + }, + [sym_if_statement] = { + .visible = true, + .named = true, + }, + [sym_switch_statement] = { + .visible = true, + .named = true, + }, + [sym_case_statement] = { + .visible = true, + .named = true, + }, + [sym_while_statement] = { + .visible = true, + .named = true, + }, + [sym_do_statement] = { + .visible = true, + .named = true, + }, + [sym_for_statement] = { + .visible = true, + .named = true, + }, + [sym_return_statement] = { + .visible = true, + .named = true, + }, + [sym_break_statement] = { + .visible = true, + .named = true, + }, + [sym_continue_statement] = { + .visible = true, + .named = true, + }, + [sym_goto_statement] = { + .visible = true, + .named = true, + }, + [sym__expression] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_comma_expression] = { + .visible = true, + .named = true, + }, + [sym_conditional_expression] = { + .visible = true, + .named = true, + }, + [sym_assignment_expression] = { + .visible = true, + .named = true, + }, + [sym_pointer_expression] = { + .visible = true, + .named = true, + }, + [sym_unary_expression] = { + .visible = true, + .named = true, + }, + [sym_binary_expression] = { + .visible = true, + .named = true, + }, + [sym_update_expression] = { + .visible = true, + .named = true, + }, + [sym_cast_expression] = { + .visible = true, + .named = true, + }, + [sym_type_descriptor] = { + .visible = true, + .named = true, + }, + [sym_sizeof_expression] = { + .visible = true, + .named = true, + }, + [sym_subscript_expression] = { + .visible = true, + .named = true, + }, + [sym_call_expression] = { + .visible = true, + .named = true, + }, + [sym_argument_list] = { + .visible = true, + .named = true, + }, + [sym_field_expression] = { + .visible = true, + .named = true, + }, + [sym_compound_literal_expression] = { + .visible = true, + .named = true, + }, + [sym_parenthesized_expression] = { + .visible = true, + .named = true, + }, + [sym_initializer_list] = { + .visible = true, + .named = true, + }, + [sym_initializer_pair] = { + .visible = true, + .named = true, + }, + [sym_subscript_designator] = { + .visible = true, + .named = true, + }, + [sym_field_designator] = { + .visible = true, + .named = true, + }, + [sym_char_literal] = { + .visible = true, + .named = true, + }, + [sym_concatenated_string] = { + .visible = true, + .named = true, + }, + [sym_string_literal] = { + .visible = true, + .named = true, + }, + [sym__empty_declaration] = { + .visible = false, + .named = true, + }, + [sym_macro_type_specifier] = { + .visible = true, + .named = true, + }, + [aux_sym_translation_unit_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_preproc_params_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_preproc_if_in_field_declaration_list_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_preproc_argument_list_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_declaration_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_type_definition_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_type_definition_repeat2] = { + .visible = false, + .named = false, + }, + [aux_sym__declaration_specifiers_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_attribute_declaration_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_attributed_declarator_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_pointer_declarator_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_function_declarator_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_sized_type_specifier_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_enumerator_list_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_field_declaration_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_parameter_list_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_case_statement_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_argument_list_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_initializer_list_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_initializer_pair_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_concatenated_string_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_string_literal_repeat1] = { + .visible = false, + .named = false, + }, + [alias_sym_field_identifier] = { + .visible = true, + .named = true, + }, + [alias_sym_statement_identifier] = { + .visible = true, + .named = true, + }, + [alias_sym_type_identifier] = { + .visible = true, + .named = true, + }, +}; + +enum { + field_alternative = 1, + field_argument = 2, + field_arguments = 3, + field_body = 4, + field_condition = 5, + field_consequence = 6, + field_declarator = 7, + field_designator = 8, + field_directive = 9, + field_field = 10, + field_function = 11, + field_index = 12, + field_initializer = 13, + field_label = 14, + field_left = 15, + field_name = 16, + field_operator = 17, + field_parameters = 18, + field_path = 19, + field_prefix = 20, + field_right = 21, + field_size = 22, + field_type = 23, + field_update = 24, + field_value = 25, +}; + +static const char * const ts_field_names[] = { + [0] = NULL, + [field_alternative] = "alternative", + [field_argument] = "argument", + [field_arguments] = "arguments", + [field_body] = "body", + [field_condition] = "condition", + [field_consequence] = "consequence", + [field_declarator] = "declarator", + [field_designator] = "designator", + [field_directive] = "directive", + [field_field] = "field", + [field_function] = "function", + [field_index] = "index", + [field_initializer] = "initializer", + [field_label] = "label", + [field_left] = "left", + [field_name] = "name", + [field_operator] = "operator", + [field_parameters] = "parameters", + [field_path] = "path", + [field_prefix] = "prefix", + [field_right] = "right", + [field_size] = "size", + [field_type] = "type", + [field_update] = "update", + [field_value] = "value", +}; + +static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { + [2] = {.index = 0, .length = 1}, + [3] = {.index = 1, .length = 1}, + [4] = {.index = 2, .length = 2}, + [5] = {.index = 4, .length = 1}, + [6] = {.index = 5, .length = 1}, + [7] = {.index = 6, .length = 1}, + [8] = {.index = 7, .length = 1}, + [9] = {.index = 8, .length = 2}, + [10] = {.index = 10, .length = 2}, + [11] = {.index = 12, .length = 1}, + [12] = {.index = 12, .length = 1}, + [13] = {.index = 13, .length = 1}, + [14] = {.index = 5, .length = 1}, + [15] = {.index = 14, .length = 2}, + [16] = {.index = 16, .length = 2}, + [17] = {.index = 18, .length = 1}, + [18] = {.index = 19, .length = 2}, + [19] = {.index = 21, .length = 2}, + [20] = {.index = 23, .length = 1}, + [21] = {.index = 24, .length = 1}, + [22] = {.index = 25, .length = 2}, + [23] = {.index = 27, .length = 2}, + [24] = {.index = 29, .length = 1}, + [25] = {.index = 30, .length = 3}, + [26] = {.index = 33, .length = 1}, + [27] = {.index = 34, .length = 1}, + [28] = {.index = 35, .length = 2}, + [29] = {.index = 37, .length = 3}, + [30] = {.index = 40, .length = 2}, + [31] = {.index = 42, .length = 2}, + [32] = {.index = 44, .length = 3}, + [33] = {.index = 47, .length = 2}, + [34] = {.index = 49, .length = 2}, + [35] = {.index = 51, .length = 1}, + [36] = {.index = 52, .length = 2}, + [37] = {.index = 54, .length = 1}, + [38] = {.index = 55, .length = 2}, + [39] = {.index = 57, .length = 2}, + [40] = {.index = 59, .length = 2}, + [41] = {.index = 61, .length = 2}, + [43] = {.index = 63, .length = 2}, + [44] = {.index = 65, .length = 1}, + [45] = {.index = 66, .length = 2}, + [46] = {.index = 68, .length = 1}, + [47] = {.index = 69, .length = 1}, + [48] = {.index = 70, .length = 2}, + [49] = {.index = 72, .length = 3}, + [50] = {.index = 75, .length = 2}, + [51] = {.index = 77, .length = 3}, + [52] = {.index = 80, .length = 2}, + [53] = {.index = 82, .length = 3}, + [54] = {.index = 85, .length = 2}, + [55] = {.index = 87, .length = 2}, + [56] = {.index = 89, .length = 1}, + [57] = {.index = 90, .length = 2}, + [58] = {.index = 92, .length = 3}, + [59] = {.index = 95, .length = 2}, + [60] = {.index = 97, .length = 2}, + [61] = {.index = 99, .length = 3}, + [62] = {.index = 102, .length = 2}, + [63] = {.index = 104, .length = 1}, + [64] = {.index = 105, .length = 2}, + [65] = {.index = 107, .length = 3}, + [66] = {.index = 110, .length = 2}, + [67] = {.index = 112, .length = 1}, + [69] = {.index = 113, .length = 3}, + [70] = {.index = 116, .length = 1}, + [71] = {.index = 117, .length = 2}, + [72] = {.index = 119, .length = 1}, + [73] = {.index = 120, .length = 2}, + [74] = {.index = 122, .length = 2}, + [75] = {.index = 124, .length = 2}, + [76] = {.index = 126, .length = 2}, + [77] = {.index = 128, .length = 3}, + [78] = {.index = 131, .length = 3}, + [79] = {.index = 134, .length = 2}, + [80] = {.index = 136, .length = 3}, + [81] = {.index = 139, .length = 4}, + [82] = {.index = 143, .length = 3}, + [83] = {.index = 146, .length = 3}, + [84] = {.index = 149, .length = 4}, +}; + +static const TSFieldMapEntry ts_field_map_entries[] = { + [0] = + {field_type, 0}, + [1] = + {field_directive, 0}, + [2] = + {field_argument, 1}, + {field_operator, 0}, + [4] = + {field_name, 0}, + [5] = + {field_name, 1}, + [6] = + {field_body, 1}, + [7] = + {field_value, 1}, + [8] = + {field_argument, 0}, + {field_operator, 1}, + [10] = + {field_arguments, 1}, + {field_function, 0}, + [12] = + {field_type, 1}, + [13] = + {field_path, 1}, + [14] = + {field_argument, 1}, + {field_directive, 0}, + [16] = + {field_declarator, 1}, + {field_type, 0}, + [18] = + {field_parameters, 0}, + [19] = + {field_body, 2}, + {field_value, 1}, + [21] = + {field_body, 2}, + {field_name, 1}, + [23] = + {field_name, 2}, + [24] = + {field_body, 2}, + [25] = + {field_condition, 1}, + {field_consequence, 2}, + [27] = + {field_body, 2}, + {field_condition, 1}, + [29] = + {field_label, 1}, + [30] = + {field_left, 0}, + {field_operator, 1}, + {field_right, 2}, + [33] = + {field_label, 0}, + [34] = + {field_declarator, 1}, + [35] = + {field_declarator, 1}, + {field_type, 0, .inherited = true}, + [37] = + {field_body, 2}, + {field_declarator, 1}, + {field_type, 0, .inherited = true}, + [40] = + {field_declarator, 0}, + {field_parameters, 1}, + [42] = + {field_left, 0}, + {field_right, 2}, + [44] = + {field_argument, 0}, + {field_field, 2}, + {field_operator, 1}, + [47] = + {field_name, 1}, + {field_value, 2}, + [49] = + {field_name, 1}, + {field_parameters, 2}, + [51] = + {field_condition, 1}, + [52] = + {field_alternative, 2}, + {field_name, 1}, + [54] = + {field_type, 0, .inherited = true}, + [55] = + {field_declarator, 2}, + {field_type, 0}, + [57] = + {field_type, 1}, + {field_value, 3}, + [59] = + {field_declarator, 2}, + {field_type, 1}, + [61] = + {field_name, 2}, + {field_prefix, 0}, + [63] = + {field_body, 3}, + {field_name, 2}, + [65] = + {field_type, 2}, + [66] = + {field_name, 0}, + {field_type, 2}, + [68] = + {field_declarator, 2}, + [69] = + {field_declarator, 0}, + [70] = + {field_declarator, 0}, + {field_value, 2}, + [72] = + {field_declarator, 1}, + {field_declarator, 2, .inherited = true}, + {field_type, 0, .inherited = true}, + [75] = + {field_declarator, 0, .inherited = true}, + {field_declarator, 1, .inherited = true}, + [77] = + {field_body, 3}, + {field_declarator, 2}, + {field_type, 1, .inherited = true}, + [80] = + {field_argument, 0}, + {field_index, 2}, + [82] = + {field_name, 1}, + {field_parameters, 2}, + {field_value, 3}, + [85] = + {field_alternative, 3}, + {field_condition, 1}, + [87] = + {field_alternative, 3}, + {field_name, 1}, + [89] = + {field_size, 1}, + [90] = + {field_declarator, 3}, + {field_type, 1}, + [92] = + {field_declarator, 2}, + {field_declarator, 3, .inherited = true}, + {field_type, 1}, + [95] = + {field_declarator, 3}, + {field_type, 2}, + [97] = + {field_name, 0}, + {field_value, 2}, + [99] = + {field_alternative, 4}, + {field_condition, 1}, + {field_consequence, 2}, + [102] = + {field_body, 1}, + {field_condition, 3}, + [104] = + {field_declarator, 3}, + [105] = + {field_declarator, 0}, + {field_size, 2}, + [107] = + {field_alternative, 4}, + {field_condition, 0}, + {field_consequence, 2}, + [110] = + {field_alternative, 4}, + {field_condition, 1}, + [112] = + {field_size, 2}, + [113] = + {field_declarator, 3}, + {field_declarator, 4, .inherited = true}, + {field_type, 2}, + [116] = + {field_body, 5}, + [117] = + {field_body, 5}, + {field_initializer, 2}, + [119] = + {field_declarator, 4}, + [120] = + {field_declarator, 0}, + {field_size, 3}, + [122] = + {field_designator, 0}, + {field_value, 2}, + [124] = + {field_body, 6}, + {field_update, 4}, + [126] = + {field_body, 6}, + {field_condition, 3}, + [128] = + {field_body, 6}, + {field_initializer, 2}, + {field_update, 4}, + [131] = + {field_body, 6}, + {field_condition, 3}, + {field_initializer, 2}, + [134] = + {field_body, 6}, + {field_initializer, 2}, + [136] = + {field_body, 7}, + {field_condition, 3}, + {field_update, 5}, + [139] = + {field_body, 7}, + {field_condition, 3}, + {field_initializer, 2}, + {field_update, 5}, + [143] = + {field_body, 7}, + {field_initializer, 2}, + {field_update, 5}, + [146] = + {field_body, 7}, + {field_condition, 4}, + {field_initializer, 2}, + [149] = + {field_body, 8}, + {field_condition, 4}, + {field_initializer, 2}, + {field_update, 6}, +}; + +static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { + [0] = {0}, + [1] = { + [0] = alias_sym_type_identifier, + }, + [6] = { + [1] = alias_sym_type_identifier, + }, + [12] = { + [1] = alias_sym_type_identifier, + }, + [19] = { + [1] = alias_sym_type_identifier, + }, + [20] = { + [2] = alias_sym_type_identifier, + }, + [24] = { + [1] = alias_sym_statement_identifier, + }, + [26] = { + [0] = alias_sym_statement_identifier, + }, + [32] = { + [2] = alias_sym_field_identifier, + }, + [42] = { + [0] = alias_sym_field_identifier, + }, + [43] = { + [2] = alias_sym_type_identifier, + }, + [68] = { + [1] = alias_sym_field_identifier, + }, +}; + +static const uint16_t ts_non_terminal_alias_map[] = { + 0, +}; + +static bool ts_lex(TSLexer *lexer, TSStateId state) { + START_LEXER(); + eof = lexer->eof(lexer); + switch (state) { + case 0: + if (eof) ADVANCE(84); + if (lookahead == '!') ADVANCE(140); + if (lookahead == '"') ADVANCE(237); + if (lookahead == '#') ADVANCE(52); + if (lookahead == '%') ADVANCE(157); + if (lookahead == '&') ADVANCE(166); + if (lookahead == '\'') ADVANCE(228); + if (lookahead == '(') ADVANCE(89); + if (lookahead == ')') ADVANCE(92); + if (lookahead == '*') ADVANCE(153); + if (lookahead == '+') ADVANCE(148); + if (lookahead == ',') ADVANCE(91); + if (lookahead == '-') ADVANCE(143); + if (lookahead == '.') ADVANCE(206); + if (lookahead == '/') ADVANCE(155); + if (lookahead == '0') ADVANCE(213); + if (lookahead == ':') ADVANCE(191); + if (lookahead == ';') ADVANCE(179); + if (lookahead == '<') ADVANCE(173); + if (lookahead == '=') ADVANCE(189); + if (lookahead == '>') ADVANCE(169); + if (lookahead == '?') ADVANCE(192); + if (lookahead == 'L') ADVANCE(249); + if (lookahead == 'U') ADVANCE(251); + if (lookahead == '[') ADVANCE(186); + if (lookahead == '\\') SKIP(79) + if (lookahead == ']') ADVANCE(187); + if (lookahead == '^') ADVANCE(163); + if (lookahead == 'u') ADVANCE(253); + if (lookahead == '{') ADVANCE(183); + if (lookahead == '|') ADVANCE(160); + if (lookahead == '}') ADVANCE(184); + if (lookahead == '~') ADVANCE(141); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(82) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); + if (('A' <= lookahead && lookahead <= '_') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 1: + if (lookahead == '\n') SKIP(28) + END_STATE(); + case 2: + if (lookahead == '\n') SKIP(28) + if (lookahead == '\r') SKIP(1) + END_STATE(); + case 3: + if (lookahead == '\n') SKIP(29) + END_STATE(); + case 4: + if (lookahead == '\n') SKIP(29) + if (lookahead == '\r') SKIP(3) + END_STATE(); + case 5: + if (lookahead == '\n') SKIP(27) + END_STATE(); + case 6: + if (lookahead == '\n') SKIP(27) + if (lookahead == '\r') SKIP(5) + END_STATE(); + case 7: + if (lookahead == '\n') SKIP(33) + END_STATE(); + case 8: + if (lookahead == '\n') SKIP(33) + if (lookahead == '\r') SKIP(7) + END_STATE(); + case 9: + if (lookahead == '\n') SKIP(32) + END_STATE(); + case 10: + if (lookahead == '\n') SKIP(32) + if (lookahead == '\r') SKIP(9) + END_STATE(); + case 11: + if (lookahead == '\n') SKIP(34) + END_STATE(); + case 12: + if (lookahead == '\n') SKIP(34) + if (lookahead == '\r') SKIP(11) + END_STATE(); + case 13: + if (lookahead == '\n') SKIP(31) + END_STATE(); + case 14: + if (lookahead == '\n') SKIP(31) + if (lookahead == '\r') SKIP(13) + END_STATE(); + case 15: + if (lookahead == '\n') SKIP(30) + END_STATE(); + case 16: + if (lookahead == '\n') SKIP(30) + if (lookahead == '\r') SKIP(15) + END_STATE(); + case 17: + if (lookahead == '\n') SKIP(19) + END_STATE(); + case 18: + if (lookahead == '\n') SKIP(19) + if (lookahead == '\r') SKIP(17) + END_STATE(); + case 19: + if (lookahead == '\n') ADVANCE(86); + if (lookahead == '!') ADVANCE(46); + if (lookahead == '%') ADVANCE(156); + if (lookahead == '&') ADVANCE(165); + if (lookahead == '(') ADVANCE(138); + if (lookahead == '*') ADVANCE(152); + if (lookahead == '+') ADVANCE(147); + if (lookahead == '-') ADVANCE(142); + if (lookahead == '/') ADVANCE(154); + if (lookahead == '<') ADVANCE(174); + if (lookahead == '=') ADVANCE(47); + if (lookahead == '>') ADVANCE(170); + if (lookahead == '\\') SKIP(18) + if (lookahead == '^') ADVANCE(162); + if (lookahead == '|') ADVANCE(161); + if (lookahead == '\t' || + lookahead == '\r' || + lookahead == ' ') SKIP(19) + END_STATE(); + case 20: + if (lookahead == '\n') SKIP(35) + END_STATE(); + case 21: + if (lookahead == '\n') SKIP(35) + if (lookahead == '\r') SKIP(20) + END_STATE(); + case 22: + if (lookahead == '\n') ADVANCE(87); + if (lookahead == '(') ADVANCE(89); + if (lookahead == '/') ADVANCE(131); + if (lookahead == '\\') ADVANCE(129); + if (lookahead == '\t' || + lookahead == '\r' || + lookahead == ' ') ADVANCE(128); + if (lookahead != 0) ADVANCE(132); + END_STATE(); + case 23: + if (lookahead == '\n') ADVANCE(87); + if (lookahead == '/') ADVANCE(131); + if (lookahead == '\\') ADVANCE(129); + if (lookahead == '\t' || + lookahead == '\r' || + lookahead == ' ') ADVANCE(128); + if (lookahead != 0) ADVANCE(132); + END_STATE(); + case 24: + if (lookahead == '\n') SKIP(36) + if (lookahead == '"') ADVANCE(237); + if (lookahead == '/') ADVANCE(238); + if (lookahead == '\\') ADVANCE(25); + if (lookahead == '\t' || + lookahead == '\r' || + lookahead == ' ') ADVANCE(241); + if (lookahead != 0) ADVANCE(242); + END_STATE(); + case 25: + if (lookahead == '\n') ADVANCE(244); + if (lookahead == '\r') ADVANCE(243); + if (lookahead == 'U') ADVANCE(76); + if (lookahead == 'u') ADVANCE(72); + if (lookahead == 'x') ADVANCE(70); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(246); + if (lookahead != 0) ADVANCE(243); + END_STATE(); + case 26: + if (lookahead == '\n') SKIP(44) + if (lookahead == '/') ADVANCE(231); + if (lookahead == '\\') ADVANCE(230); + if (lookahead == '\t' || + lookahead == '\r' || + lookahead == ' ') ADVANCE(232); + if (lookahead != 0 && + lookahead != '\'') ADVANCE(229); + END_STATE(); + case 27: + if (lookahead == '!') ADVANCE(140); + if (lookahead == '"') ADVANCE(237); + if (lookahead == '#') ADVANCE(59); + if (lookahead == '%') ADVANCE(157); + if (lookahead == '&') ADVANCE(166); + if (lookahead == '\'') ADVANCE(228); + if (lookahead == '(') ADVANCE(138); + if (lookahead == ')') ADVANCE(92); + if (lookahead == '*') ADVANCE(153); + if (lookahead == '+') ADVANCE(148); + if (lookahead == ',') ADVANCE(91); + if (lookahead == '-') ADVANCE(143); + if (lookahead == '.') ADVANCE(207); + if (lookahead == '/') ADVANCE(155); + if (lookahead == '0') ADVANCE(213); + if (lookahead == ':') ADVANCE(190); + if (lookahead == ';') ADVANCE(179); + if (lookahead == '<') ADVANCE(173); + if (lookahead == '=') ADVANCE(189); + if (lookahead == '>') ADVANCE(169); + if (lookahead == '?') ADVANCE(192); + if (lookahead == 'L') ADVANCE(249); + if (lookahead == 'U') ADVANCE(251); + if (lookahead == '[') ADVANCE(185); + if (lookahead == '\\') SKIP(6) + if (lookahead == ']') ADVANCE(187); + if (lookahead == '^') ADVANCE(163); + if (lookahead == 'u') ADVANCE(253); + if (lookahead == '{') ADVANCE(183); + if (lookahead == '|') ADVANCE(160); + if (lookahead == '}') ADVANCE(184); + if (lookahead == '~') ADVANCE(141); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(27) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); + if (('A' <= lookahead && lookahead <= '_') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 28: + if (lookahead == '!') ADVANCE(139); + if (lookahead == '"') ADVANCE(237); + if (lookahead == '#') ADVANCE(52); + if (lookahead == '&') ADVANCE(164); + if (lookahead == '\'') ADVANCE(228); + if (lookahead == '(') ADVANCE(138); + if (lookahead == '*') ADVANCE(152); + if (lookahead == '+') ADVANCE(149); + if (lookahead == ',') ADVANCE(91); + if (lookahead == '-') ADVANCE(144); + if (lookahead == '.') ADVANCE(64); + if (lookahead == '/') ADVANCE(37); + if (lookahead == '0') ADVANCE(213); + if (lookahead == ':') ADVANCE(45); + if (lookahead == ';') ADVANCE(179); + if (lookahead == 'L') ADVANCE(249); + if (lookahead == 'U') ADVANCE(251); + if (lookahead == '[') ADVANCE(50); + if (lookahead == '\\') SKIP(2) + if (lookahead == ']') ADVANCE(51); + if (lookahead == 'u') ADVANCE(253); + if (lookahead == '{') ADVANCE(183); + if (lookahead == '~') ADVANCE(141); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(28) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 29: + if (lookahead == '!') ADVANCE(139); + if (lookahead == '"') ADVANCE(237); + if (lookahead == '#') ADVANCE(54); + if (lookahead == '&') ADVANCE(164); + if (lookahead == '\'') ADVANCE(228); + if (lookahead == '(') ADVANCE(138); + if (lookahead == '*') ADVANCE(152); + if (lookahead == '+') ADVANCE(149); + if (lookahead == '-') ADVANCE(144); + if (lookahead == '.') ADVANCE(64); + if (lookahead == '/') ADVANCE(37); + if (lookahead == '0') ADVANCE(213); + if (lookahead == ';') ADVANCE(179); + if (lookahead == 'L') ADVANCE(249); + if (lookahead == 'U') ADVANCE(251); + if (lookahead == '[') ADVANCE(50); + if (lookahead == '\\') SKIP(4) + if (lookahead == 'u') ADVANCE(253); + if (lookahead == '{') ADVANCE(183); + if (lookahead == '~') ADVANCE(141); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(29) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 30: + if (lookahead == '!') ADVANCE(139); + if (lookahead == '\'') ADVANCE(228); + if (lookahead == '(') ADVANCE(138); + if (lookahead == ')') ADVANCE(92); + if (lookahead == '+') ADVANCE(151); + if (lookahead == '-') ADVANCE(146); + if (lookahead == '.') ADVANCE(64); + if (lookahead == '/') ADVANCE(37); + if (lookahead == '0') ADVANCE(213); + if (lookahead == 'L') ADVANCE(257); + if (lookahead == 'U') ADVANCE(258); + if (lookahead == '\\') SKIP(16) + if (lookahead == 'u') ADVANCE(259); + if (lookahead == '~') ADVANCE(141); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(30) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 31: + if (lookahead == '!') ADVANCE(46); + if (lookahead == '"') ADVANCE(237); + if (lookahead == '%') ADVANCE(157); + if (lookahead == '&') ADVANCE(166); + if (lookahead == '(') ADVANCE(138); + if (lookahead == ')') ADVANCE(92); + if (lookahead == '*') ADVANCE(153); + if (lookahead == '+') ADVANCE(150); + if (lookahead == ',') ADVANCE(91); + if (lookahead == '-') ADVANCE(145); + if (lookahead == '.') ADVANCE(205); + if (lookahead == '/') ADVANCE(155); + if (lookahead == ':') ADVANCE(190); + if (lookahead == ';') ADVANCE(179); + if (lookahead == '<') ADVANCE(173); + if (lookahead == '=') ADVANCE(189); + if (lookahead == '>') ADVANCE(169); + if (lookahead == '?') ADVANCE(192); + if (lookahead == 'L') ADVANCE(250); + if (lookahead == 'U') ADVANCE(252); + if (lookahead == '[') ADVANCE(186); + if (lookahead == '\\') SKIP(14) + if (lookahead == ']') ADVANCE(187); + if (lookahead == '^') ADVANCE(163); + if (lookahead == 'u') ADVANCE(254); + if (lookahead == '|') ADVANCE(160); + if (lookahead == '}') ADVANCE(184); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(31) + if (('A' <= lookahead && lookahead <= '_') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 32: + if (lookahead == '!') ADVANCE(46); + if (lookahead == '#') ADVANCE(57); + if (lookahead == '%') ADVANCE(157); + if (lookahead == '&') ADVANCE(166); + if (lookahead == '(') ADVANCE(138); + if (lookahead == ')') ADVANCE(92); + if (lookahead == '*') ADVANCE(153); + if (lookahead == '+') ADVANCE(150); + if (lookahead == ',') ADVANCE(91); + if (lookahead == '-') ADVANCE(145); + if (lookahead == '.') ADVANCE(205); + if (lookahead == '/') ADVANCE(155); + if (lookahead == ':') ADVANCE(190); + if (lookahead == ';') ADVANCE(179); + if (lookahead == '<') ADVANCE(173); + if (lookahead == '=') ADVANCE(189); + if (lookahead == '>') ADVANCE(169); + if (lookahead == '?') ADVANCE(192); + if (lookahead == '[') ADVANCE(186); + if (lookahead == '\\') SKIP(10) + if (lookahead == ']') ADVANCE(187); + if (lookahead == '^') ADVANCE(163); + if (lookahead == '{') ADVANCE(183); + if (lookahead == '|') ADVANCE(160); + if (lookahead == '}') ADVANCE(184); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(32) + if (('A' <= lookahead && lookahead <= '_') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 33: + if (lookahead == '!') ADVANCE(46); + if (lookahead == '#') ADVANCE(53); + if (lookahead == '%') ADVANCE(156); + if (lookahead == '&') ADVANCE(165); + if (lookahead == '(') ADVANCE(138); + if (lookahead == ')') ADVANCE(92); + if (lookahead == '*') ADVANCE(152); + if (lookahead == '+') ADVANCE(147); + if (lookahead == ',') ADVANCE(91); + if (lookahead == '-') ADVANCE(142); + if (lookahead == '.') ADVANCE(42); + if (lookahead == '/') ADVANCE(154); + if (lookahead == ':') ADVANCE(190); + if (lookahead == ';') ADVANCE(179); + if (lookahead == '<') ADVANCE(174); + if (lookahead == '=') ADVANCE(189); + if (lookahead == '>') ADVANCE(170); + if (lookahead == '[') ADVANCE(186); + if (lookahead == '\\') SKIP(8) + if (lookahead == '^') ADVANCE(162); + if (lookahead == '{') ADVANCE(183); + if (lookahead == '|') ADVANCE(161); + if (lookahead == '}') ADVANCE(184); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(33) + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 34: + if (lookahead == '!') ADVANCE(46); + if (lookahead == '#') ADVANCE(55); + if (lookahead == '%') ADVANCE(157); + if (lookahead == '&') ADVANCE(166); + if (lookahead == '(') ADVANCE(138); + if (lookahead == ')') ADVANCE(92); + if (lookahead == '*') ADVANCE(153); + if (lookahead == '+') ADVANCE(150); + if (lookahead == ',') ADVANCE(91); + if (lookahead == '-') ADVANCE(145); + if (lookahead == '.') ADVANCE(205); + if (lookahead == '/') ADVANCE(155); + if (lookahead == ':') ADVANCE(190); + if (lookahead == ';') ADVANCE(179); + if (lookahead == '<') ADVANCE(173); + if (lookahead == '=') ADVANCE(189); + if (lookahead == '>') ADVANCE(169); + if (lookahead == '?') ADVANCE(192); + if (lookahead == '[') ADVANCE(186); + if (lookahead == '\\') SKIP(12) + if (lookahead == ']') ADVANCE(51); + if (lookahead == '^') ADVANCE(163); + if (lookahead == '|') ADVANCE(160); + if (lookahead == '}') ADVANCE(184); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(34) + if (('A' <= lookahead && lookahead <= '_') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 35: + if (lookahead == '"') ADVANCE(237); + if (lookahead == '/') ADVANCE(37); + if (lookahead == '<') ADVANCE(48); + if (lookahead == 'L') ADVANCE(250); + if (lookahead == 'U') ADVANCE(252); + if (lookahead == '\\') SKIP(21) + if (lookahead == 'u') ADVANCE(254); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(35) + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 36: + if (lookahead == '"') ADVANCE(237); + if (lookahead == '/') ADVANCE(37); + if (lookahead == '\\') ADVANCE(25); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(36) + END_STATE(); + case 37: + if (lookahead == '*') ADVANCE(39); + if (lookahead == '/') ADVANCE(264); + END_STATE(); + case 38: + if (lookahead == '*') ADVANCE(38); + if (lookahead == '/') ADVANCE(262); + if (lookahead != 0) ADVANCE(39); + END_STATE(); + case 39: + if (lookahead == '*') ADVANCE(38); + if (lookahead != 0) ADVANCE(39); + END_STATE(); + case 40: + if (lookahead == '.') ADVANCE(64); + if (lookahead == '0') ADVANCE(211); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(212); + if (('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(220); + END_STATE(); + case 41: + if (lookahead == '.') ADVANCE(64); + if (lookahead == '0') ADVANCE(214); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); + END_STATE(); + case 42: + if (lookahead == '.') ADVANCE(43); + END_STATE(); + case 43: + if (lookahead == '.') ADVANCE(90); + END_STATE(); + case 44: + if (lookahead == '/') ADVANCE(37); + if (lookahead == '\\') ADVANCE(25); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(44) + END_STATE(); + case 45: + if (lookahead == ':') ADVANCE(180); + END_STATE(); + case 46: + if (lookahead == '=') ADVANCE(168); + END_STATE(); + case 47: + if (lookahead == '=') ADVANCE(167); + END_STATE(); + case 48: + if (lookahead == '>') ADVANCE(247); + if (lookahead == '\\') ADVANCE(49); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(48); + END_STATE(); + case 49: + if (lookahead == '>') ADVANCE(248); + if (lookahead == '\\') ADVANCE(49); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(48); + END_STATE(); + case 50: + if (lookahead == '[') ADVANCE(181); + END_STATE(); + case 51: + if (lookahead == ']') ADVANCE(182); + END_STATE(); + case 52: + if (lookahead == 'd') ADVANCE(104); + if (lookahead == 'e') ADVANCE(120); + if (lookahead == 'i') ADVANCE(110); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(52); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 53: + if (lookahead == 'd') ADVANCE(104); + if (lookahead == 'e') ADVANCE(120); + if (lookahead == 'i') ADVANCE(111); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(53); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 54: + if (lookahead == 'd') ADVANCE(104); + if (lookahead == 'e') ADVANCE(122); + if (lookahead == 'i') ADVANCE(110); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(54); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 55: + if (lookahead == 'd') ADVANCE(104); + if (lookahead == 'e') ADVANCE(122); + if (lookahead == 'i') ADVANCE(111); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(55); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 56: + if (lookahead == 'd') ADVANCE(104); + if (lookahead == 'i') ADVANCE(110); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(56); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 57: + if (lookahead == 'd') ADVANCE(104); + if (lookahead == 'i') ADVANCE(111); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(57); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 58: + if (lookahead == 'd') ADVANCE(61); + END_STATE(); + case 59: + if (lookahead == 'e') ADVANCE(62); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(59); + END_STATE(); + case 60: + if (lookahead == 'f') ADVANCE(94); + END_STATE(); + case 61: + if (lookahead == 'i') ADVANCE(60); + END_STATE(); + case 62: + if (lookahead == 'n') ADVANCE(58); + END_STATE(); + case 63: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(215); + END_STATE(); + case 64: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(209); + END_STATE(); + case 65: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(212); + if (('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(220); + END_STATE(); + case 66: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(217); + END_STATE(); + case 67: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(220); + END_STATE(); + case 68: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(210); + END_STATE(); + case 69: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(243); + END_STATE(); + case 70: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(69); + END_STATE(); + case 71: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(70); + END_STATE(); + case 72: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(71); + END_STATE(); + case 73: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(72); + END_STATE(); + case 74: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(73); + END_STATE(); + case 75: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(74); + END_STATE(); + case 76: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(75); + END_STATE(); + case 77: + if (lookahead != 0 && + lookahead != '\r') ADVANCE(264); + if (lookahead == '\r') ADVANCE(266); + END_STATE(); + case 78: + if (eof) ADVANCE(84); + if (lookahead == '\n') SKIP(82) + END_STATE(); + case 79: + if (eof) ADVANCE(84); + if (lookahead == '\n') SKIP(82) + if (lookahead == '\r') SKIP(78) + END_STATE(); + case 80: + if (eof) ADVANCE(84); + if (lookahead == '\n') SKIP(83) + END_STATE(); + case 81: + if (eof) ADVANCE(84); + if (lookahead == '\n') SKIP(83) + if (lookahead == '\r') SKIP(80) + END_STATE(); + case 82: + if (eof) ADVANCE(84); + if (lookahead == '!') ADVANCE(140); + if (lookahead == '"') ADVANCE(237); + if (lookahead == '#') ADVANCE(52); + if (lookahead == '%') ADVANCE(157); + if (lookahead == '&') ADVANCE(166); + if (lookahead == '\'') ADVANCE(228); + if (lookahead == '(') ADVANCE(138); + if (lookahead == ')') ADVANCE(92); + if (lookahead == '*') ADVANCE(153); + if (lookahead == '+') ADVANCE(148); + if (lookahead == ',') ADVANCE(91); + if (lookahead == '-') ADVANCE(143); + if (lookahead == '.') ADVANCE(206); + if (lookahead == '/') ADVANCE(155); + if (lookahead == '0') ADVANCE(213); + if (lookahead == ':') ADVANCE(191); + if (lookahead == ';') ADVANCE(179); + if (lookahead == '<') ADVANCE(173); + if (lookahead == '=') ADVANCE(189); + if (lookahead == '>') ADVANCE(169); + if (lookahead == '?') ADVANCE(192); + if (lookahead == 'L') ADVANCE(249); + if (lookahead == 'U') ADVANCE(251); + if (lookahead == '[') ADVANCE(186); + if (lookahead == '\\') SKIP(79) + if (lookahead == ']') ADVANCE(187); + if (lookahead == '^') ADVANCE(163); + if (lookahead == 'u') ADVANCE(253); + if (lookahead == '{') ADVANCE(183); + if (lookahead == '|') ADVANCE(160); + if (lookahead == '}') ADVANCE(184); + if (lookahead == '~') ADVANCE(141); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(82) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); + if (('A' <= lookahead && lookahead <= '_') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 83: + if (eof) ADVANCE(84); + if (lookahead == '!') ADVANCE(139); + if (lookahead == '"') ADVANCE(237); + if (lookahead == '#') ADVANCE(56); + if (lookahead == '&') ADVANCE(164); + if (lookahead == '\'') ADVANCE(228); + if (lookahead == '(') ADVANCE(138); + if (lookahead == ')') ADVANCE(92); + if (lookahead == '*') ADVANCE(152); + if (lookahead == '+') ADVANCE(149); + if (lookahead == ',') ADVANCE(91); + if (lookahead == '-') ADVANCE(144); + if (lookahead == '.') ADVANCE(207); + if (lookahead == '/') ADVANCE(37); + if (lookahead == '0') ADVANCE(213); + if (lookahead == ':') ADVANCE(190); + if (lookahead == ';') ADVANCE(179); + if (lookahead == '=') ADVANCE(188); + if (lookahead == 'L') ADVANCE(249); + if (lookahead == 'U') ADVANCE(251); + if (lookahead == '[') ADVANCE(186); + if (lookahead == '\\') SKIP(81) + if (lookahead == ']') ADVANCE(187); + if (lookahead == 'u') ADVANCE(253); + if (lookahead == '{') ADVANCE(183); + if (lookahead == '}') ADVANCE(184); + if (lookahead == '~') ADVANCE(141); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(83) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 84: + ACCEPT_TOKEN(ts_builtin_sym_end); + END_STATE(); + case 85: + ACCEPT_TOKEN(aux_sym_preproc_include_token1); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 86: + ACCEPT_TOKEN(anon_sym_LF); + if (lookahead == '\n') ADVANCE(86); + END_STATE(); + case 87: + ACCEPT_TOKEN(anon_sym_LF); + if (lookahead == '\n') ADVANCE(87); + if (lookahead == '\\') ADVANCE(129); + if (lookahead == '\t' || + lookahead == '\r' || + lookahead == ' ') ADVANCE(128); + END_STATE(); + case 88: + ACCEPT_TOKEN(aux_sym_preproc_def_token1); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 89: + ACCEPT_TOKEN(anon_sym_LPAREN); + END_STATE(); + case 90: + ACCEPT_TOKEN(anon_sym_DOT_DOT_DOT); + END_STATE(); + case 91: + ACCEPT_TOKEN(anon_sym_COMMA); + END_STATE(); + case 92: + ACCEPT_TOKEN(anon_sym_RPAREN); + END_STATE(); + case 93: + ACCEPT_TOKEN(aux_sym_preproc_if_token1); + if (lookahead == 'd') ADVANCE(108); + if (lookahead == 'n') ADVANCE(103); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 94: + ACCEPT_TOKEN(aux_sym_preproc_if_token2); + END_STATE(); + case 95: + ACCEPT_TOKEN(aux_sym_preproc_if_token2); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 96: + ACCEPT_TOKEN(aux_sym_preproc_ifdef_token1); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 97: + ACCEPT_TOKEN(aux_sym_preproc_ifdef_token2); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 98: + ACCEPT_TOKEN(aux_sym_preproc_else_token1); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 99: + ACCEPT_TOKEN(aux_sym_preproc_elif_token1); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 100: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'c') ADVANCE(121); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 101: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'd') ADVANCE(119); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 102: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'd') ADVANCE(107); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 103: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'd') ADVANCE(109); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 104: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'e') ADVANCE(112); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 105: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'e') ADVANCE(98); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 106: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'e') ADVANCE(88); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 107: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'e') ADVANCE(85); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 108: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'e') ADVANCE(115); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 109: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'e') ADVANCE(116); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 110: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'f') ADVANCE(93); + if (lookahead == 'n') ADVANCE(100); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 111: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'f') ADVANCE(93); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 112: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'f') ADVANCE(117); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 113: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'f') ADVANCE(99); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 114: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'f') ADVANCE(95); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 115: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'f') ADVANCE(96); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 116: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'f') ADVANCE(97); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 117: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'i') ADVANCE(123); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 118: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'i') ADVANCE(113); + if (lookahead == 's') ADVANCE(105); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 119: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'i') ADVANCE(114); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 120: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'l') ADVANCE(118); + if (lookahead == 'n') ADVANCE(101); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 121: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'l') ADVANCE(124); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 122: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'n') ADVANCE(101); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 123: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'n') ADVANCE(106); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 124: + ACCEPT_TOKEN(sym_preproc_directive); + if (lookahead == 'u') ADVANCE(102); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 125: + ACCEPT_TOKEN(sym_preproc_directive); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); + END_STATE(); + case 126: + ACCEPT_TOKEN(sym_preproc_arg); + if (lookahead == '\n') ADVANCE(39); + if (lookahead == '*') ADVANCE(126); + if (lookahead == '/') ADVANCE(262); + if (lookahead == '\\') ADVANCE(133); + if (lookahead != 0) ADVANCE(127); + END_STATE(); + case 127: + ACCEPT_TOKEN(sym_preproc_arg); + if (lookahead == '\n') ADVANCE(39); + if (lookahead == '*') ADVANCE(126); + if (lookahead == '\\') ADVANCE(133); + if (lookahead != 0) ADVANCE(127); + END_STATE(); + case 128: + ACCEPT_TOKEN(sym_preproc_arg); + if (lookahead == '\n') ADVANCE(87); + if (lookahead == '/') ADVANCE(131); + if (lookahead == '\\') ADVANCE(129); + if (lookahead == '\t' || + lookahead == '\r' || + lookahead == ' ') ADVANCE(128); + if (lookahead != 0) ADVANCE(132); + END_STATE(); + case 129: + ACCEPT_TOKEN(sym_preproc_arg); + if (lookahead == '\n') ADVANCE(128); + if (lookahead == '\r') ADVANCE(130); + if (lookahead == '\\') ADVANCE(134); + if (lookahead != 0) ADVANCE(132); + END_STATE(); + case 130: + ACCEPT_TOKEN(sym_preproc_arg); + if (lookahead == '\n') ADVANCE(128); + if (lookahead == '\\') ADVANCE(134); + if (lookahead != 0) ADVANCE(132); + END_STATE(); + case 131: + ACCEPT_TOKEN(sym_preproc_arg); + if (lookahead == '*') ADVANCE(127); + if (lookahead == '/') ADVANCE(265); + if (lookahead == '\\') ADVANCE(134); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(132); + END_STATE(); + case 132: + ACCEPT_TOKEN(sym_preproc_arg); + if (lookahead == '\\') ADVANCE(134); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(132); + END_STATE(); + case 133: + ACCEPT_TOKEN(sym_preproc_arg); + if (lookahead != 0 && + lookahead != '\r' && + lookahead != '*' && + lookahead != '\\') ADVANCE(127); + if (lookahead == '\r') ADVANCE(136); + if (lookahead == '*') ADVANCE(126); + if (lookahead == '\\') ADVANCE(133); + END_STATE(); + case 134: + ACCEPT_TOKEN(sym_preproc_arg); + if (lookahead != 0 && + lookahead != '\r' && + lookahead != '\\') ADVANCE(132); + if (lookahead == '\r') ADVANCE(137); + if (lookahead == '\\') ADVANCE(134); + END_STATE(); + case 135: + ACCEPT_TOKEN(sym_preproc_arg); + if (lookahead != 0 && + lookahead != '\r' && + lookahead != '\\') ADVANCE(265); + if (lookahead == '\r') ADVANCE(267); + if (lookahead == '\\') ADVANCE(263); + END_STATE(); + case 136: + ACCEPT_TOKEN(sym_preproc_arg); + if (lookahead != 0 && + lookahead != '*' && + lookahead != '\\') ADVANCE(127); + if (lookahead == '*') ADVANCE(126); + if (lookahead == '\\') ADVANCE(133); + END_STATE(); + case 137: + ACCEPT_TOKEN(sym_preproc_arg); + if (lookahead != 0 && + lookahead != '\\') ADVANCE(132); + if (lookahead == '\\') ADVANCE(134); + END_STATE(); + case 138: + ACCEPT_TOKEN(anon_sym_LPAREN2); + END_STATE(); + case 139: + ACCEPT_TOKEN(anon_sym_BANG); + END_STATE(); + case 140: + ACCEPT_TOKEN(anon_sym_BANG); + if (lookahead == '=') ADVANCE(168); + END_STATE(); + case 141: + ACCEPT_TOKEN(anon_sym_TILDE); + END_STATE(); + case 142: + ACCEPT_TOKEN(anon_sym_DASH); + END_STATE(); + case 143: + ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == '-') ADVANCE(203); + if (lookahead == '.') ADVANCE(64); + if (lookahead == '0') ADVANCE(213); + if (lookahead == '=') ADVANCE(197); + if (lookahead == '>') ADVANCE(208); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); + END_STATE(); + case 144: + ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == '-') ADVANCE(203); + if (lookahead == '.') ADVANCE(64); + if (lookahead == '0') ADVANCE(213); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); + END_STATE(); + case 145: + ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == '-') ADVANCE(203); + if (lookahead == '=') ADVANCE(197); + if (lookahead == '>') ADVANCE(208); + END_STATE(); + case 146: + ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == '.') ADVANCE(64); + if (lookahead == '0') ADVANCE(213); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); + END_STATE(); + case 147: + ACCEPT_TOKEN(anon_sym_PLUS); + END_STATE(); + case 148: + ACCEPT_TOKEN(anon_sym_PLUS); + if (lookahead == '+') ADVANCE(204); + if (lookahead == '.') ADVANCE(64); + if (lookahead == '0') ADVANCE(213); + if (lookahead == '=') ADVANCE(196); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); + END_STATE(); + case 149: + ACCEPT_TOKEN(anon_sym_PLUS); + if (lookahead == '+') ADVANCE(204); + if (lookahead == '.') ADVANCE(64); + if (lookahead == '0') ADVANCE(213); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); + END_STATE(); + case 150: + ACCEPT_TOKEN(anon_sym_PLUS); + if (lookahead == '+') ADVANCE(204); + if (lookahead == '=') ADVANCE(196); + END_STATE(); + case 151: + ACCEPT_TOKEN(anon_sym_PLUS); + if (lookahead == '.') ADVANCE(64); + if (lookahead == '0') ADVANCE(213); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); + END_STATE(); + case 152: + ACCEPT_TOKEN(anon_sym_STAR); + END_STATE(); + case 153: + ACCEPT_TOKEN(anon_sym_STAR); + if (lookahead == '=') ADVANCE(193); + END_STATE(); + case 154: + ACCEPT_TOKEN(anon_sym_SLASH); + if (lookahead == '*') ADVANCE(39); + if (lookahead == '/') ADVANCE(264); + END_STATE(); + case 155: + ACCEPT_TOKEN(anon_sym_SLASH); + if (lookahead == '*') ADVANCE(39); + if (lookahead == '/') ADVANCE(264); + if (lookahead == '=') ADVANCE(194); + END_STATE(); + case 156: + ACCEPT_TOKEN(anon_sym_PERCENT); + END_STATE(); + case 157: + ACCEPT_TOKEN(anon_sym_PERCENT); + if (lookahead == '=') ADVANCE(195); + END_STATE(); + case 158: + ACCEPT_TOKEN(anon_sym_PIPE_PIPE); + END_STATE(); + case 159: + ACCEPT_TOKEN(anon_sym_AMP_AMP); + END_STATE(); + case 160: + ACCEPT_TOKEN(anon_sym_PIPE); + if (lookahead == '=') ADVANCE(202); + if (lookahead == '|') ADVANCE(158); + END_STATE(); + case 161: + ACCEPT_TOKEN(anon_sym_PIPE); + if (lookahead == '|') ADVANCE(158); + END_STATE(); + case 162: + ACCEPT_TOKEN(anon_sym_CARET); + END_STATE(); + case 163: + ACCEPT_TOKEN(anon_sym_CARET); + if (lookahead == '=') ADVANCE(201); + END_STATE(); + case 164: + ACCEPT_TOKEN(anon_sym_AMP); + END_STATE(); + case 165: + ACCEPT_TOKEN(anon_sym_AMP); + if (lookahead == '&') ADVANCE(159); + END_STATE(); + case 166: + ACCEPT_TOKEN(anon_sym_AMP); + if (lookahead == '&') ADVANCE(159); + if (lookahead == '=') ADVANCE(200); + END_STATE(); + case 167: + ACCEPT_TOKEN(anon_sym_EQ_EQ); + END_STATE(); + case 168: + ACCEPT_TOKEN(anon_sym_BANG_EQ); + END_STATE(); + case 169: + ACCEPT_TOKEN(anon_sym_GT); + if (lookahead == '=') ADVANCE(171); + if (lookahead == '>') ADVANCE(178); + END_STATE(); + case 170: + ACCEPT_TOKEN(anon_sym_GT); + if (lookahead == '=') ADVANCE(171); + if (lookahead == '>') ADVANCE(177); + END_STATE(); + case 171: + ACCEPT_TOKEN(anon_sym_GT_EQ); + END_STATE(); + case 172: + ACCEPT_TOKEN(anon_sym_LT_EQ); + END_STATE(); + case 173: + ACCEPT_TOKEN(anon_sym_LT); + if (lookahead == '<') ADVANCE(176); + if (lookahead == '=') ADVANCE(172); + END_STATE(); + case 174: + ACCEPT_TOKEN(anon_sym_LT); + if (lookahead == '<') ADVANCE(175); + if (lookahead == '=') ADVANCE(172); + END_STATE(); + case 175: + ACCEPT_TOKEN(anon_sym_LT_LT); + END_STATE(); + case 176: + ACCEPT_TOKEN(anon_sym_LT_LT); + if (lookahead == '=') ADVANCE(198); + END_STATE(); + case 177: + ACCEPT_TOKEN(anon_sym_GT_GT); + END_STATE(); + case 178: + ACCEPT_TOKEN(anon_sym_GT_GT); + if (lookahead == '=') ADVANCE(199); + END_STATE(); + case 179: + ACCEPT_TOKEN(anon_sym_SEMI); + END_STATE(); + case 180: + ACCEPT_TOKEN(anon_sym_COLON_COLON); + END_STATE(); + case 181: + ACCEPT_TOKEN(anon_sym_LBRACK_LBRACK); + END_STATE(); + case 182: + ACCEPT_TOKEN(anon_sym_RBRACK_RBRACK); + END_STATE(); + case 183: + ACCEPT_TOKEN(anon_sym_LBRACE); + END_STATE(); + case 184: + ACCEPT_TOKEN(anon_sym_RBRACE); + END_STATE(); + case 185: + ACCEPT_TOKEN(anon_sym_LBRACK); + END_STATE(); + case 186: + ACCEPT_TOKEN(anon_sym_LBRACK); + if (lookahead == '[') ADVANCE(181); + END_STATE(); + case 187: + ACCEPT_TOKEN(anon_sym_RBRACK); + END_STATE(); + case 188: + ACCEPT_TOKEN(anon_sym_EQ); + END_STATE(); + case 189: + ACCEPT_TOKEN(anon_sym_EQ); + if (lookahead == '=') ADVANCE(167); + END_STATE(); + case 190: + ACCEPT_TOKEN(anon_sym_COLON); + END_STATE(); + case 191: + ACCEPT_TOKEN(anon_sym_COLON); + if (lookahead == ':') ADVANCE(180); + END_STATE(); + case 192: + ACCEPT_TOKEN(anon_sym_QMARK); + END_STATE(); + case 193: + ACCEPT_TOKEN(anon_sym_STAR_EQ); + END_STATE(); + case 194: + ACCEPT_TOKEN(anon_sym_SLASH_EQ); + END_STATE(); + case 195: + ACCEPT_TOKEN(anon_sym_PERCENT_EQ); + END_STATE(); + case 196: + ACCEPT_TOKEN(anon_sym_PLUS_EQ); + END_STATE(); + case 197: + ACCEPT_TOKEN(anon_sym_DASH_EQ); + END_STATE(); + case 198: + ACCEPT_TOKEN(anon_sym_LT_LT_EQ); + END_STATE(); + case 199: + ACCEPT_TOKEN(anon_sym_GT_GT_EQ); + END_STATE(); + case 200: + ACCEPT_TOKEN(anon_sym_AMP_EQ); + END_STATE(); + case 201: + ACCEPT_TOKEN(anon_sym_CARET_EQ); + END_STATE(); + case 202: + ACCEPT_TOKEN(anon_sym_PIPE_EQ); + END_STATE(); + case 203: + ACCEPT_TOKEN(anon_sym_DASH_DASH); + END_STATE(); + case 204: + ACCEPT_TOKEN(anon_sym_PLUS_PLUS); + END_STATE(); + case 205: + ACCEPT_TOKEN(anon_sym_DOT); + END_STATE(); + case 206: + ACCEPT_TOKEN(anon_sym_DOT); + if (lookahead == '.') ADVANCE(43); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(209); + END_STATE(); + case 207: + ACCEPT_TOKEN(anon_sym_DOT); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(209); + END_STATE(); + case 208: + ACCEPT_TOKEN(anon_sym_DASH_GT); + END_STATE(); + case 209: + ACCEPT_TOKEN(sym_number_literal); + if (lookahead == '\'') ADVANCE(64); + if (lookahead == 'F' || + lookahead == 'L' || + lookahead == 'U' || + lookahead == 'f' || + lookahead == 'l' || + lookahead == 'u') ADVANCE(223); + if (lookahead == 'E' || + lookahead == 'P' || + lookahead == 'e' || + lookahead == 'p') ADVANCE(222); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(209); + END_STATE(); + case 210: + ACCEPT_TOKEN(sym_number_literal); + if (lookahead == '\'') ADVANCE(68); + if (lookahead == 'F' || + lookahead == 'f') ADVANCE(210); + if (lookahead == 'L' || + lookahead == 'U' || + lookahead == 'l' || + lookahead == 'u') ADVANCE(223); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'E') || + ('a' <= lookahead && lookahead <= 'e')) ADVANCE(210); + END_STATE(); + case 211: + ACCEPT_TOKEN(sym_number_literal); + if (lookahead == '\'') ADVANCE(65); + if (lookahead == '.') ADVANCE(221); + if (lookahead == 'F' || + lookahead == 'f') ADVANCE(220); + if (lookahead == 'L' || + lookahead == 'U' || + lookahead == 'l' || + lookahead == 'u') ADVANCE(223); + if (lookahead == 'b') ADVANCE(219); + if (lookahead == 'x') ADVANCE(67); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(218); + if (lookahead == 'P' || + lookahead == 'p') ADVANCE(222); + if (('A' <= lookahead && lookahead <= 'D') || + ('a' <= lookahead && lookahead <= 'd')) ADVANCE(220); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(212); + END_STATE(); + case 212: + ACCEPT_TOKEN(sym_number_literal); + if (lookahead == '\'') ADVANCE(65); + if (lookahead == '.') ADVANCE(221); + if (lookahead == 'F' || + lookahead == 'f') ADVANCE(220); + if (lookahead == 'L' || + lookahead == 'U' || + lookahead == 'l' || + lookahead == 'u') ADVANCE(223); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(218); + if (lookahead == 'P' || + lookahead == 'p') ADVANCE(222); + if (('A' <= lookahead && lookahead <= 'D') || + ('a' <= lookahead && lookahead <= 'd')) ADVANCE(220); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(212); + END_STATE(); + case 213: + ACCEPT_TOKEN(sym_number_literal); + if (lookahead == '\'') ADVANCE(63); + if (lookahead == '.') ADVANCE(221); + if (lookahead == 'F' || + lookahead == 'L' || + lookahead == 'U' || + lookahead == 'f' || + lookahead == 'l' || + lookahead == 'u') ADVANCE(223); + if (lookahead == 'b') ADVANCE(41); + if (lookahead == 'x') ADVANCE(40); + if (lookahead == 'E' || + lookahead == 'P' || + lookahead == 'e' || + lookahead == 'p') ADVANCE(222); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(215); + END_STATE(); + case 214: + ACCEPT_TOKEN(sym_number_literal); + if (lookahead == '\'') ADVANCE(63); + if (lookahead == '.') ADVANCE(221); + if (lookahead == 'F' || + lookahead == 'L' || + lookahead == 'U' || + lookahead == 'f' || + lookahead == 'l' || + lookahead == 'u') ADVANCE(223); + if (lookahead == 'b') ADVANCE(63); + if (lookahead == 'x') ADVANCE(67); + if (lookahead == 'E' || + lookahead == 'P' || + lookahead == 'e' || + lookahead == 'p') ADVANCE(222); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(215); + END_STATE(); + case 215: + ACCEPT_TOKEN(sym_number_literal); + if (lookahead == '\'') ADVANCE(63); + if (lookahead == '.') ADVANCE(221); + if (lookahead == 'F' || + lookahead == 'L' || + lookahead == 'U' || + lookahead == 'f' || + lookahead == 'l' || + lookahead == 'u') ADVANCE(223); + if (lookahead == 'E' || + lookahead == 'P' || + lookahead == 'e' || + lookahead == 'p') ADVANCE(222); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(215); + END_STATE(); + case 216: + ACCEPT_TOKEN(sym_number_literal); + if (lookahead == '\'') ADVANCE(66); + if (lookahead == 'F' || + lookahead == 'f') ADVANCE(217); + if (lookahead == 'L' || + lookahead == 'U' || + lookahead == 'l' || + lookahead == 'u') ADVANCE(223); + if (lookahead == '+' || + lookahead == '-') ADVANCE(68); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(216); + if (lookahead == 'P' || + lookahead == 'p') ADVANCE(222); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'D') || + ('a' <= lookahead && lookahead <= 'd')) ADVANCE(217); + END_STATE(); + case 217: + ACCEPT_TOKEN(sym_number_literal); + if (lookahead == '\'') ADVANCE(66); + if (lookahead == 'F' || + lookahead == 'f') ADVANCE(217); + if (lookahead == 'L' || + lookahead == 'U' || + lookahead == 'l' || + lookahead == 'u') ADVANCE(223); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(216); + if (lookahead == 'P' || + lookahead == 'p') ADVANCE(222); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'D') || + ('a' <= lookahead && lookahead <= 'd')) ADVANCE(217); + END_STATE(); + case 218: + ACCEPT_TOKEN(sym_number_literal); + if (lookahead == '\'') ADVANCE(67); + if (lookahead == '.') ADVANCE(221); + if (lookahead == 'F' || + lookahead == 'f') ADVANCE(220); + if (lookahead == 'L' || + lookahead == 'U' || + lookahead == 'l' || + lookahead == 'u') ADVANCE(223); + if (lookahead == '+' || + lookahead == '-') ADVANCE(68); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(218); + if (lookahead == 'P' || + lookahead == 'p') ADVANCE(222); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'D') || + ('a' <= lookahead && lookahead <= 'd')) ADVANCE(220); + END_STATE(); + case 219: + ACCEPT_TOKEN(sym_number_literal); + if (lookahead == '\'') ADVANCE(67); + if (lookahead == '.') ADVANCE(221); + if (lookahead == 'F' || + lookahead == 'f') ADVANCE(220); + if (lookahead == 'L' || + lookahead == 'U' || + lookahead == 'l' || + lookahead == 'u') ADVANCE(223); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(218); + if (lookahead == 'P' || + lookahead == 'p') ADVANCE(222); + if (('A' <= lookahead && lookahead <= 'D') || + ('a' <= lookahead && lookahead <= 'd')) ADVANCE(220); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(212); + END_STATE(); + case 220: + ACCEPT_TOKEN(sym_number_literal); + if (lookahead == '\'') ADVANCE(67); + if (lookahead == '.') ADVANCE(221); + if (lookahead == 'F' || + lookahead == 'f') ADVANCE(220); + if (lookahead == 'L' || + lookahead == 'U' || + lookahead == 'l' || + lookahead == 'u') ADVANCE(223); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(218); + if (lookahead == 'P' || + lookahead == 'p') ADVANCE(222); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'D') || + ('a' <= lookahead && lookahead <= 'd')) ADVANCE(220); + END_STATE(); + case 221: + ACCEPT_TOKEN(sym_number_literal); + if (lookahead == 'F' || + lookahead == 'f') ADVANCE(217); + if (lookahead == 'L' || + lookahead == 'U' || + lookahead == 'l' || + lookahead == 'u') ADVANCE(223); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(216); + if (lookahead == 'P' || + lookahead == 'p') ADVANCE(222); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'D') || + ('a' <= lookahead && lookahead <= 'd')) ADVANCE(217); + END_STATE(); + case 222: + ACCEPT_TOKEN(sym_number_literal); + if (lookahead == 'F' || + lookahead == 'f') ADVANCE(210); + if (lookahead == 'L' || + lookahead == 'U' || + lookahead == 'l' || + lookahead == 'u') ADVANCE(223); + if (lookahead == '+' || + lookahead == '-') ADVANCE(68); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'E') || + ('a' <= lookahead && lookahead <= 'e')) ADVANCE(210); + END_STATE(); + case 223: + ACCEPT_TOKEN(sym_number_literal); + if (lookahead == 'F' || + lookahead == 'L' || + lookahead == 'U' || + lookahead == 'f' || + lookahead == 'l' || + lookahead == 'u') ADVANCE(223); + END_STATE(); + case 224: + ACCEPT_TOKEN(anon_sym_L_SQUOTE); + END_STATE(); + case 225: + ACCEPT_TOKEN(anon_sym_u_SQUOTE); + END_STATE(); + case 226: + ACCEPT_TOKEN(anon_sym_U_SQUOTE); + END_STATE(); + case 227: + ACCEPT_TOKEN(anon_sym_u8_SQUOTE); + END_STATE(); + case 228: + ACCEPT_TOKEN(anon_sym_SQUOTE); + END_STATE(); + case 229: + ACCEPT_TOKEN(aux_sym_char_literal_token1); + END_STATE(); + case 230: + ACCEPT_TOKEN(aux_sym_char_literal_token1); + if (lookahead == '\n') ADVANCE(244); + if (lookahead == '\r') ADVANCE(243); + if (lookahead == 'U') ADVANCE(76); + if (lookahead == 'u') ADVANCE(72); + if (lookahead == 'x') ADVANCE(70); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(246); + if (lookahead != 0) ADVANCE(243); + END_STATE(); + case 231: + ACCEPT_TOKEN(aux_sym_char_literal_token1); + if (lookahead == '*') ADVANCE(39); + if (lookahead == '/') ADVANCE(264); + END_STATE(); + case 232: + ACCEPT_TOKEN(aux_sym_char_literal_token1); + if (lookahead == '\\') ADVANCE(25); + END_STATE(); + case 233: + ACCEPT_TOKEN(anon_sym_L_DQUOTE); + END_STATE(); + case 234: + ACCEPT_TOKEN(anon_sym_u_DQUOTE); + END_STATE(); + case 235: + ACCEPT_TOKEN(anon_sym_U_DQUOTE); + END_STATE(); + case 236: + ACCEPT_TOKEN(anon_sym_u8_DQUOTE); + END_STATE(); + case 237: + ACCEPT_TOKEN(anon_sym_DQUOTE); + END_STATE(); + case 238: + ACCEPT_TOKEN(aux_sym_string_literal_token1); + if (lookahead == '*') ADVANCE(240); + if (lookahead == '/') ADVANCE(242); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '"' && + lookahead != '\\') ADVANCE(242); + END_STATE(); + case 239: + ACCEPT_TOKEN(aux_sym_string_literal_token1); + if (lookahead == '*') ADVANCE(239); + if (lookahead == '/') ADVANCE(242); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '"' && + lookahead != '\\') ADVANCE(240); + END_STATE(); + case 240: + ACCEPT_TOKEN(aux_sym_string_literal_token1); + if (lookahead == '*') ADVANCE(239); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '"' && + lookahead != '\\') ADVANCE(240); + END_STATE(); + case 241: + ACCEPT_TOKEN(aux_sym_string_literal_token1); + if (lookahead == '/') ADVANCE(238); + if (lookahead == '\t' || + lookahead == '\r' || + lookahead == ' ') ADVANCE(241); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '"' && + lookahead != '\\') ADVANCE(242); + END_STATE(); + case 242: + ACCEPT_TOKEN(aux_sym_string_literal_token1); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '"' && + lookahead != '\\') ADVANCE(242); + END_STATE(); + case 243: + ACCEPT_TOKEN(sym_escape_sequence); + END_STATE(); + case 244: + ACCEPT_TOKEN(sym_escape_sequence); + if (lookahead == '\\') ADVANCE(25); + END_STATE(); + case 245: + ACCEPT_TOKEN(sym_escape_sequence); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(243); + END_STATE(); + case 246: + ACCEPT_TOKEN(sym_escape_sequence); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(245); + END_STATE(); + case 247: + ACCEPT_TOKEN(sym_system_lib_string); + END_STATE(); + case 248: + ACCEPT_TOKEN(sym_system_lib_string); + if (lookahead == '>') ADVANCE(247); + if (lookahead == '\\') ADVANCE(49); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(48); + END_STATE(); + case 249: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '"') ADVANCE(233); + if (lookahead == '\'') ADVANCE(224); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 250: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '"') ADVANCE(233); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 251: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '"') ADVANCE(235); + if (lookahead == '\'') ADVANCE(226); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 252: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '"') ADVANCE(235); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 253: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '"') ADVANCE(234); + if (lookahead == '\'') ADVANCE(225); + if (lookahead == '8') ADVANCE(255); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 254: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '"') ADVANCE(234); + if (lookahead == '8') ADVANCE(256); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 255: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '"') ADVANCE(236); + if (lookahead == '\'') ADVANCE(227); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 256: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '"') ADVANCE(236); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 257: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '\'') ADVANCE(224); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 258: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '\'') ADVANCE(226); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 259: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '\'') ADVANCE(225); + if (lookahead == '8') ADVANCE(260); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 260: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '\'') ADVANCE(227); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 261: + ACCEPT_TOKEN(sym_identifier); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); + END_STATE(); + case 262: + ACCEPT_TOKEN(sym_comment); + END_STATE(); + case 263: + ACCEPT_TOKEN(sym_comment); + if (lookahead == '\r') ADVANCE(265); + if (lookahead == '\\') ADVANCE(135); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(265); + END_STATE(); + case 264: + ACCEPT_TOKEN(sym_comment); + if (lookahead == '\\') ADVANCE(77); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(264); + END_STATE(); + case 265: + ACCEPT_TOKEN(sym_comment); + if (lookahead == '\\') ADVANCE(135); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(265); + END_STATE(); + case 266: + ACCEPT_TOKEN(sym_comment); + if (lookahead != 0 && + lookahead != '\\') ADVANCE(264); + if (lookahead == '\\') ADVANCE(77); + END_STATE(); + case 267: + ACCEPT_TOKEN(sym_comment); + if (lookahead != 0 && + lookahead != '\\') ADVANCE(265); + if (lookahead == '\\') ADVANCE(135); + END_STATE(); + default: + return false; + } +} + +static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { + START_LEXER(); + eof = lexer->eof(lexer); + switch (state) { + case 0: + if (lookahead == 'F') ADVANCE(1); + if (lookahead == 'N') ADVANCE(2); + if (lookahead == 'T') ADVANCE(3); + if (lookahead == '\\') SKIP(4) + if (lookahead == '_') ADVANCE(5); + if (lookahead == 'a') ADVANCE(6); + if (lookahead == 'b') ADVANCE(7); + if (lookahead == 'c') ADVANCE(8); + if (lookahead == 'd') ADVANCE(9); + if (lookahead == 'e') ADVANCE(10); + if (lookahead == 'f') ADVANCE(11); + if (lookahead == 'g') ADVANCE(12); + if (lookahead == 'i') ADVANCE(13); + if (lookahead == 'l') ADVANCE(14); + if (lookahead == 'r') ADVANCE(15); + if (lookahead == 's') ADVANCE(16); + if (lookahead == 't') ADVANCE(17); + if (lookahead == 'u') ADVANCE(18); + if (lookahead == 'v') ADVANCE(19); + if (lookahead == 'w') ADVANCE(20); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(0) + END_STATE(); + case 1: + if (lookahead == 'A') ADVANCE(21); + END_STATE(); + case 2: + if (lookahead == 'U') ADVANCE(22); + END_STATE(); + case 3: + if (lookahead == 'R') ADVANCE(23); + END_STATE(); + case 4: + if (lookahead == '\n') SKIP(0) + if (lookahead == '\r') SKIP(24) + END_STATE(); + case 5: + if (lookahead == 'A') ADVANCE(25); + if (lookahead == '_') ADVANCE(26); + if (lookahead == 'u') ADVANCE(27); + END_STATE(); + case 6: + if (lookahead == 'u') ADVANCE(28); + END_STATE(); + case 7: + if (lookahead == 'o') ADVANCE(29); + if (lookahead == 'r') ADVANCE(30); + END_STATE(); + case 8: + if (lookahead == 'a') ADVANCE(31); + if (lookahead == 'h') ADVANCE(32); + if (lookahead == 'o') ADVANCE(33); + END_STATE(); + case 9: + if (lookahead == 'e') ADVANCE(34); + if (lookahead == 'o') ADVANCE(35); + END_STATE(); + case 10: + if (lookahead == 'l') ADVANCE(36); + if (lookahead == 'n') ADVANCE(37); + if (lookahead == 'x') ADVANCE(38); + END_STATE(); + case 11: + if (lookahead == 'a') ADVANCE(39); + if (lookahead == 'l') ADVANCE(40); + if (lookahead == 'o') ADVANCE(41); + END_STATE(); + case 12: + if (lookahead == 'o') ADVANCE(42); + END_STATE(); + case 13: + if (lookahead == 'f') ADVANCE(43); + if (lookahead == 'n') ADVANCE(44); + END_STATE(); + case 14: + if (lookahead == 'o') ADVANCE(45); + END_STATE(); + case 15: + if (lookahead == 'e') ADVANCE(46); + END_STATE(); + case 16: + if (lookahead == 'h') ADVANCE(47); + if (lookahead == 'i') ADVANCE(48); + if (lookahead == 's') ADVANCE(49); + if (lookahead == 't') ADVANCE(50); + if (lookahead == 'w') ADVANCE(51); + END_STATE(); + case 17: + if (lookahead == 'r') ADVANCE(52); + if (lookahead == 'y') ADVANCE(53); + END_STATE(); + case 18: + if (lookahead == 'i') ADVANCE(54); + if (lookahead == 'n') ADVANCE(55); + END_STATE(); + case 19: + if (lookahead == 'o') ADVANCE(56); + END_STATE(); + case 20: + if (lookahead == 'h') ADVANCE(57); + END_STATE(); + case 21: + if (lookahead == 'L') ADVANCE(58); + END_STATE(); + case 22: + if (lookahead == 'L') ADVANCE(59); + END_STATE(); + case 23: + if (lookahead == 'U') ADVANCE(60); + END_STATE(); + case 24: + if (lookahead == '\n') SKIP(0) + END_STATE(); + case 25: + if (lookahead == 't') ADVANCE(61); + END_STATE(); + case 26: + if (lookahead == 'a') ADVANCE(62); + if (lookahead == 'b') ADVANCE(63); + if (lookahead == 'c') ADVANCE(64); + if (lookahead == 'd') ADVANCE(65); + if (lookahead == 'f') ADVANCE(66); + if (lookahead == 'r') ADVANCE(67); + if (lookahead == 's') ADVANCE(68); + if (lookahead == 't') ADVANCE(69); + if (lookahead == 'u') ADVANCE(70); + if (lookahead == 'v') ADVANCE(71); + END_STATE(); + case 27: + if (lookahead == 'n') ADVANCE(72); + END_STATE(); + case 28: + if (lookahead == 't') ADVANCE(73); + END_STATE(); + case 29: + if (lookahead == 'o') ADVANCE(74); + END_STATE(); + case 30: + if (lookahead == 'e') ADVANCE(75); + END_STATE(); + case 31: + if (lookahead == 's') ADVANCE(76); + END_STATE(); + case 32: + if (lookahead == 'a') ADVANCE(77); + END_STATE(); + case 33: + if (lookahead == 'n') ADVANCE(78); + END_STATE(); + case 34: + if (lookahead == 'f') ADVANCE(79); + END_STATE(); + case 35: + ACCEPT_TOKEN(anon_sym_do); + if (lookahead == 'u') ADVANCE(80); + END_STATE(); + case 36: + if (lookahead == 's') ADVANCE(81); + END_STATE(); + case 37: + if (lookahead == 'u') ADVANCE(82); + END_STATE(); + case 38: + if (lookahead == 't') ADVANCE(83); + END_STATE(); + case 39: + if (lookahead == 'l') ADVANCE(84); + END_STATE(); + case 40: + if (lookahead == 'o') ADVANCE(85); + END_STATE(); + case 41: + if (lookahead == 'r') ADVANCE(86); + END_STATE(); + case 42: + if (lookahead == 't') ADVANCE(87); + END_STATE(); + case 43: + ACCEPT_TOKEN(anon_sym_if); + END_STATE(); + case 44: + if (lookahead == 'l') ADVANCE(88); + if (lookahead == 't') ADVANCE(89); + END_STATE(); + case 45: + if (lookahead == 'n') ADVANCE(90); + END_STATE(); + case 46: + if (lookahead == 'g') ADVANCE(91); + if (lookahead == 's') ADVANCE(92); + if (lookahead == 't') ADVANCE(93); + END_STATE(); + case 47: + if (lookahead == 'o') ADVANCE(94); + END_STATE(); + case 48: + if (lookahead == 'g') ADVANCE(95); + if (lookahead == 'z') ADVANCE(96); + END_STATE(); + case 49: + if (lookahead == 'i') ADVANCE(97); + END_STATE(); + case 50: + if (lookahead == 'a') ADVANCE(98); + if (lookahead == 'r') ADVANCE(99); + END_STATE(); + case 51: + if (lookahead == 'i') ADVANCE(100); + END_STATE(); + case 52: + if (lookahead == 'u') ADVANCE(101); + END_STATE(); + case 53: + if (lookahead == 'p') ADVANCE(102); + END_STATE(); + case 54: + if (lookahead == 'n') ADVANCE(103); + END_STATE(); + case 55: + if (lookahead == 'i') ADVANCE(104); + if (lookahead == 's') ADVANCE(105); + END_STATE(); + case 56: + if (lookahead == 'i') ADVANCE(106); + if (lookahead == 'l') ADVANCE(107); + END_STATE(); + case 57: + if (lookahead == 'i') ADVANCE(108); + END_STATE(); + case 58: + if (lookahead == 'S') ADVANCE(109); + END_STATE(); + case 59: + if (lookahead == 'L') ADVANCE(110); + END_STATE(); + case 60: + if (lookahead == 'E') ADVANCE(111); + END_STATE(); + case 61: + if (lookahead == 'o') ADVANCE(112); + END_STATE(); + case 62: + if (lookahead == 't') ADVANCE(113); + END_STATE(); + case 63: + if (lookahead == 'a') ADVANCE(114); + END_STATE(); + case 64: + if (lookahead == 'd') ADVANCE(115); + if (lookahead == 'l') ADVANCE(116); + END_STATE(); + case 65: + if (lookahead == 'e') ADVANCE(117); + END_STATE(); + case 66: + if (lookahead == 'a') ADVANCE(118); + END_STATE(); + case 67: + if (lookahead == 'e') ADVANCE(119); + END_STATE(); + case 68: + if (lookahead == 'p') ADVANCE(120); + if (lookahead == 't') ADVANCE(121); + END_STATE(); + case 69: + if (lookahead == 'h') ADVANCE(122); + END_STATE(); + case 70: + if (lookahead == 'n') ADVANCE(123); + if (lookahead == 'p') ADVANCE(124); + END_STATE(); + case 71: + if (lookahead == 'e') ADVANCE(125); + END_STATE(); + case 72: + if (lookahead == 'a') ADVANCE(126); + END_STATE(); + case 73: + if (lookahead == 'o') ADVANCE(127); + END_STATE(); + case 74: + if (lookahead == 'l') ADVANCE(128); + END_STATE(); + case 75: + if (lookahead == 'a') ADVANCE(129); + END_STATE(); + case 76: + if (lookahead == 'e') ADVANCE(130); + END_STATE(); + case 77: + if (lookahead == 'r') ADVANCE(131); + END_STATE(); + case 78: + if (lookahead == 's') ADVANCE(132); + if (lookahead == 't') ADVANCE(133); + END_STATE(); + case 79: + if (lookahead == 'a') ADVANCE(134); + if (lookahead == 'i') ADVANCE(135); + END_STATE(); + case 80: + if (lookahead == 'b') ADVANCE(136); + END_STATE(); + case 81: + if (lookahead == 'e') ADVANCE(137); + END_STATE(); + case 82: + if (lookahead == 'm') ADVANCE(138); + END_STATE(); + case 83: + if (lookahead == 'e') ADVANCE(139); + END_STATE(); + case 84: + if (lookahead == 's') ADVANCE(140); + END_STATE(); + case 85: + if (lookahead == 'a') ADVANCE(141); + END_STATE(); + case 86: + ACCEPT_TOKEN(anon_sym_for); + END_STATE(); + case 87: + if (lookahead == 'o') ADVANCE(142); + END_STATE(); + case 88: + if (lookahead == 'i') ADVANCE(143); + END_STATE(); + case 89: + ACCEPT_TOKEN(sym_primitive_type); + if (lookahead == '1') ADVANCE(144); + if (lookahead == '3') ADVANCE(145); + if (lookahead == '6') ADVANCE(146); + if (lookahead == '8') ADVANCE(147); + if (lookahead == 'p') ADVANCE(148); + END_STATE(); + case 90: + if (lookahead == 'g') ADVANCE(149); + END_STATE(); + case 91: + if (lookahead == 'i') ADVANCE(150); + END_STATE(); + case 92: + if (lookahead == 't') ADVANCE(151); + END_STATE(); + case 93: + if (lookahead == 'u') ADVANCE(152); + END_STATE(); + case 94: + if (lookahead == 'r') ADVANCE(153); + END_STATE(); + case 95: + if (lookahead == 'n') ADVANCE(154); + END_STATE(); + case 96: + if (lookahead == 'e') ADVANCE(155); + END_STATE(); + case 97: + if (lookahead == 'z') ADVANCE(156); + END_STATE(); + case 98: + if (lookahead == 't') ADVANCE(157); + END_STATE(); + case 99: + if (lookahead == 'u') ADVANCE(158); + END_STATE(); + case 100: + if (lookahead == 't') ADVANCE(159); + END_STATE(); + case 101: + if (lookahead == 'e') ADVANCE(111); + END_STATE(); + case 102: + if (lookahead == 'e') ADVANCE(160); + END_STATE(); + case 103: + if (lookahead == 't') ADVANCE(161); + END_STATE(); + case 104: + if (lookahead == 'o') ADVANCE(162); + END_STATE(); + case 105: + if (lookahead == 'i') ADVANCE(163); + END_STATE(); + case 106: + if (lookahead == 'd') ADVANCE(128); + END_STATE(); + case 107: + if (lookahead == 'a') ADVANCE(164); + END_STATE(); + case 108: + if (lookahead == 'l') ADVANCE(165); + END_STATE(); + case 109: + if (lookahead == 'E') ADVANCE(166); + END_STATE(); + case 110: + ACCEPT_TOKEN(sym_null); + END_STATE(); + case 111: + ACCEPT_TOKEN(sym_true); + END_STATE(); + case 112: + if (lookahead == 'm') ADVANCE(167); + END_STATE(); + case 113: + if (lookahead == 't') ADVANCE(168); + END_STATE(); + case 114: + if (lookahead == 's') ADVANCE(169); + END_STATE(); + case 115: + if (lookahead == 'e') ADVANCE(170); + END_STATE(); + case 116: + if (lookahead == 'r') ADVANCE(171); + END_STATE(); + case 117: + if (lookahead == 'c') ADVANCE(172); + END_STATE(); + case 118: + if (lookahead == 's') ADVANCE(173); + END_STATE(); + case 119: + if (lookahead == 's') ADVANCE(174); + END_STATE(); + case 120: + if (lookahead == 't') ADVANCE(175); + END_STATE(); + case 121: + if (lookahead == 'd') ADVANCE(176); + END_STATE(); + case 122: + if (lookahead == 'i') ADVANCE(177); + END_STATE(); + case 123: + if (lookahead == 'a') ADVANCE(178); + END_STATE(); + case 124: + if (lookahead == 't') ADVANCE(179); + END_STATE(); + case 125: + if (lookahead == 'c') ADVANCE(180); + END_STATE(); + case 126: + if (lookahead == 'l') ADVANCE(181); + END_STATE(); + case 127: + ACCEPT_TOKEN(anon_sym_auto); + END_STATE(); + case 128: + ACCEPT_TOKEN(sym_primitive_type); + END_STATE(); + case 129: + if (lookahead == 'k') ADVANCE(182); + END_STATE(); + case 130: + ACCEPT_TOKEN(anon_sym_case); + END_STATE(); + case 131: + ACCEPT_TOKEN(sym_primitive_type); + if (lookahead == '1') ADVANCE(183); + if (lookahead == '3') ADVANCE(184); + if (lookahead == '6') ADVANCE(185); + if (lookahead == '8') ADVANCE(186); + if (lookahead == 'p') ADVANCE(187); + END_STATE(); + case 132: + if (lookahead == 't') ADVANCE(188); + END_STATE(); + case 133: + if (lookahead == 'i') ADVANCE(189); + END_STATE(); + case 134: + if (lookahead == 'u') ADVANCE(190); + END_STATE(); + case 135: + if (lookahead == 'n') ADVANCE(191); + END_STATE(); + case 136: + if (lookahead == 'l') ADVANCE(192); + END_STATE(); + case 137: + ACCEPT_TOKEN(anon_sym_else); + END_STATE(); + case 138: + ACCEPT_TOKEN(anon_sym_enum); + END_STATE(); + case 139: + if (lookahead == 'r') ADVANCE(193); + END_STATE(); + case 140: + if (lookahead == 'e') ADVANCE(166); + END_STATE(); + case 141: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 142: + ACCEPT_TOKEN(anon_sym_goto); + END_STATE(); + case 143: + if (lookahead == 'n') ADVANCE(194); + END_STATE(); + case 144: + if (lookahead == '6') ADVANCE(195); + END_STATE(); + case 145: + if (lookahead == '2') ADVANCE(196); + END_STATE(); + case 146: + if (lookahead == '4') ADVANCE(197); + END_STATE(); + case 147: + if (lookahead == '_') ADVANCE(198); + END_STATE(); + case 148: + if (lookahead == 't') ADVANCE(199); + END_STATE(); + case 149: + ACCEPT_TOKEN(anon_sym_long); + END_STATE(); + case 150: + if (lookahead == 's') ADVANCE(200); + END_STATE(); + case 151: + if (lookahead == 'r') ADVANCE(201); + END_STATE(); + case 152: + if (lookahead == 'r') ADVANCE(202); + END_STATE(); + case 153: + if (lookahead == 't') ADVANCE(203); + END_STATE(); + case 154: + if (lookahead == 'e') ADVANCE(204); + END_STATE(); + case 155: + if (lookahead == '_') ADVANCE(205); + if (lookahead == 'o') ADVANCE(206); + END_STATE(); + case 156: + if (lookahead == 'e') ADVANCE(207); + END_STATE(); + case 157: + if (lookahead == 'i') ADVANCE(208); + END_STATE(); + case 158: + if (lookahead == 'c') ADVANCE(209); + END_STATE(); + case 159: + if (lookahead == 'c') ADVANCE(210); + END_STATE(); + case 160: + if (lookahead == 'd') ADVANCE(211); + END_STATE(); + case 161: + if (lookahead == '1') ADVANCE(212); + if (lookahead == '3') ADVANCE(213); + if (lookahead == '6') ADVANCE(214); + if (lookahead == '8') ADVANCE(215); + if (lookahead == 'p') ADVANCE(216); + END_STATE(); + case 162: + if (lookahead == 'n') ADVANCE(217); + END_STATE(); + case 163: + if (lookahead == 'g') ADVANCE(218); + END_STATE(); + case 164: + if (lookahead == 't') ADVANCE(219); + END_STATE(); + case 165: + if (lookahead == 'e') ADVANCE(220); + END_STATE(); + case 166: + ACCEPT_TOKEN(sym_false); + END_STATE(); + case 167: + if (lookahead == 'i') ADVANCE(221); + END_STATE(); + case 168: + if (lookahead == 'r') ADVANCE(222); + END_STATE(); + case 169: + if (lookahead == 'e') ADVANCE(223); + END_STATE(); + case 170: + if (lookahead == 'c') ADVANCE(224); + END_STATE(); + case 171: + if (lookahead == 'c') ADVANCE(225); + END_STATE(); + case 172: + if (lookahead == 'l') ADVANCE(226); + END_STATE(); + case 173: + if (lookahead == 't') ADVANCE(227); + END_STATE(); + case 174: + if (lookahead == 't') ADVANCE(228); + END_STATE(); + case 175: + if (lookahead == 'r') ADVANCE(229); + END_STATE(); + case 176: + if (lookahead == 'c') ADVANCE(230); + END_STATE(); + case 177: + if (lookahead == 's') ADVANCE(231); + END_STATE(); + case 178: + if (lookahead == 'l') ADVANCE(232); + END_STATE(); + case 179: + if (lookahead == 'r') ADVANCE(233); + END_STATE(); + case 180: + if (lookahead == 't') ADVANCE(234); + END_STATE(); + case 181: + if (lookahead == 'i') ADVANCE(235); + END_STATE(); + case 182: + ACCEPT_TOKEN(anon_sym_break); + END_STATE(); + case 183: + if (lookahead == '6') ADVANCE(236); + END_STATE(); + case 184: + if (lookahead == '2') ADVANCE(237); + END_STATE(); + case 185: + if (lookahead == '4') ADVANCE(238); + END_STATE(); + case 186: + if (lookahead == '_') ADVANCE(239); + END_STATE(); + case 187: + if (lookahead == 't') ADVANCE(240); + END_STATE(); + case 188: + ACCEPT_TOKEN(anon_sym_const); + END_STATE(); + case 189: + if (lookahead == 'n') ADVANCE(241); + END_STATE(); + case 190: + if (lookahead == 'l') ADVANCE(242); + END_STATE(); + case 191: + if (lookahead == 'e') ADVANCE(243); + END_STATE(); + case 192: + if (lookahead == 'e') ADVANCE(128); + END_STATE(); + case 193: + if (lookahead == 'n') ADVANCE(244); + END_STATE(); + case 194: + if (lookahead == 'e') ADVANCE(245); + END_STATE(); + case 195: + if (lookahead == '_') ADVANCE(246); + END_STATE(); + case 196: + if (lookahead == '_') ADVANCE(247); + END_STATE(); + case 197: + if (lookahead == '_') ADVANCE(248); + END_STATE(); + case 198: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 199: + if (lookahead == 'r') ADVANCE(249); + END_STATE(); + case 200: + if (lookahead == 't') ADVANCE(250); + END_STATE(); + case 201: + if (lookahead == 'i') ADVANCE(251); + END_STATE(); + case 202: + if (lookahead == 'n') ADVANCE(252); + END_STATE(); + case 203: + ACCEPT_TOKEN(anon_sym_short); + END_STATE(); + case 204: + if (lookahead == 'd') ADVANCE(253); + END_STATE(); + case 205: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 206: + if (lookahead == 'f') ADVANCE(254); + END_STATE(); + case 207: + if (lookahead == '_') ADVANCE(255); + END_STATE(); + case 208: + if (lookahead == 'c') ADVANCE(256); + END_STATE(); + case 209: + if (lookahead == 't') ADVANCE(257); + END_STATE(); + case 210: + if (lookahead == 'h') ADVANCE(258); + END_STATE(); + case 211: + if (lookahead == 'e') ADVANCE(259); + END_STATE(); + case 212: + if (lookahead == '6') ADVANCE(260); + END_STATE(); + case 213: + if (lookahead == '2') ADVANCE(261); + END_STATE(); + case 214: + if (lookahead == '4') ADVANCE(262); + END_STATE(); + case 215: + if (lookahead == '_') ADVANCE(263); + END_STATE(); + case 216: + if (lookahead == 't') ADVANCE(264); + END_STATE(); + case 217: + ACCEPT_TOKEN(anon_sym_union); + END_STATE(); + case 218: + if (lookahead == 'n') ADVANCE(265); + END_STATE(); + case 219: + if (lookahead == 'i') ADVANCE(266); + END_STATE(); + case 220: + ACCEPT_TOKEN(anon_sym_while); + END_STATE(); + case 221: + if (lookahead == 'c') ADVANCE(267); + END_STATE(); + case 222: + if (lookahead == 'i') ADVANCE(268); + END_STATE(); + case 223: + if (lookahead == 'd') ADVANCE(269); + END_STATE(); + case 224: + if (lookahead == 'l') ADVANCE(270); + END_STATE(); + case 225: + if (lookahead == 'a') ADVANCE(271); + END_STATE(); + case 226: + if (lookahead == 's') ADVANCE(272); + END_STATE(); + case 227: + if (lookahead == 'c') ADVANCE(273); + END_STATE(); + case 228: + if (lookahead == 'r') ADVANCE(274); + END_STATE(); + case 229: + ACCEPT_TOKEN(sym_ms_signed_ptr_modifier); + END_STATE(); + case 230: + if (lookahead == 'a') ADVANCE(275); + END_STATE(); + case 231: + if (lookahead == 'c') ADVANCE(276); + END_STATE(); + case 232: + if (lookahead == 'i') ADVANCE(277); + END_STATE(); + case 233: + ACCEPT_TOKEN(sym_ms_unsigned_ptr_modifier); + END_STATE(); + case 234: + if (lookahead == 'o') ADVANCE(278); + END_STATE(); + case 235: + if (lookahead == 'g') ADVANCE(279); + END_STATE(); + case 236: + if (lookahead == '_') ADVANCE(280); + END_STATE(); + case 237: + if (lookahead == '_') ADVANCE(281); + END_STATE(); + case 238: + if (lookahead == '_') ADVANCE(282); + END_STATE(); + case 239: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 240: + if (lookahead == 'r') ADVANCE(283); + END_STATE(); + case 241: + if (lookahead == 'u') ADVANCE(284); + END_STATE(); + case 242: + if (lookahead == 't') ADVANCE(285); + END_STATE(); + case 243: + if (lookahead == 'd') ADVANCE(286); + END_STATE(); + case 244: + ACCEPT_TOKEN(anon_sym_extern); + END_STATE(); + case 245: + ACCEPT_TOKEN(anon_sym_inline); + END_STATE(); + case 246: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 247: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 248: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 249: + if (lookahead == '_') ADVANCE(287); + END_STATE(); + case 250: + if (lookahead == 'e') ADVANCE(288); + END_STATE(); + case 251: + if (lookahead == 'c') ADVANCE(289); + END_STATE(); + case 252: + ACCEPT_TOKEN(anon_sym_return); + END_STATE(); + case 253: + ACCEPT_TOKEN(anon_sym_signed); + END_STATE(); + case 254: + ACCEPT_TOKEN(anon_sym_sizeof); + END_STATE(); + case 255: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 256: + ACCEPT_TOKEN(anon_sym_static); + END_STATE(); + case 257: + ACCEPT_TOKEN(anon_sym_struct); + END_STATE(); + case 258: + ACCEPT_TOKEN(anon_sym_switch); + END_STATE(); + case 259: + if (lookahead == 'f') ADVANCE(290); + END_STATE(); + case 260: + if (lookahead == '_') ADVANCE(291); + END_STATE(); + case 261: + if (lookahead == '_') ADVANCE(292); + END_STATE(); + case 262: + if (lookahead == '_') ADVANCE(293); + END_STATE(); + case 263: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 264: + if (lookahead == 'r') ADVANCE(294); + END_STATE(); + case 265: + if (lookahead == 'e') ADVANCE(295); + END_STATE(); + case 266: + if (lookahead == 'l') ADVANCE(296); + END_STATE(); + case 267: + ACCEPT_TOKEN(anon_sym__Atomic); + END_STATE(); + case 268: + if (lookahead == 'b') ADVANCE(297); + END_STATE(); + case 269: + ACCEPT_TOKEN(anon_sym___based); + END_STATE(); + case 270: + ACCEPT_TOKEN(anon_sym___cdecl); + END_STATE(); + case 271: + if (lookahead == 'l') ADVANCE(298); + END_STATE(); + case 272: + if (lookahead == 'p') ADVANCE(299); + END_STATE(); + case 273: + if (lookahead == 'a') ADVANCE(300); + END_STATE(); + case 274: + if (lookahead == 'i') ADVANCE(301); + END_STATE(); + case 275: + if (lookahead == 'l') ADVANCE(302); + END_STATE(); + case 276: + if (lookahead == 'a') ADVANCE(303); + END_STATE(); + case 277: + if (lookahead == 'g') ADVANCE(304); + END_STATE(); + case 278: + if (lookahead == 'r') ADVANCE(305); + END_STATE(); + case 279: + if (lookahead == 'n') ADVANCE(306); + END_STATE(); + case 280: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 281: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 282: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 283: + if (lookahead == '_') ADVANCE(307); + END_STATE(); + case 284: + if (lookahead == 'e') ADVANCE(308); + END_STATE(); + case 285: + ACCEPT_TOKEN(anon_sym_default); + END_STATE(); + case 286: + ACCEPT_TOKEN(anon_sym_defined); + END_STATE(); + case 287: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 288: + if (lookahead == 'r') ADVANCE(309); + END_STATE(); + case 289: + if (lookahead == 't') ADVANCE(310); + END_STATE(); + case 290: + ACCEPT_TOKEN(anon_sym_typedef); + END_STATE(); + case 291: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 292: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 293: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 294: + if (lookahead == '_') ADVANCE(311); + END_STATE(); + case 295: + if (lookahead == 'd') ADVANCE(312); + END_STATE(); + case 296: + if (lookahead == 'e') ADVANCE(313); + END_STATE(); + case 297: + if (lookahead == 'u') ADVANCE(314); + END_STATE(); + case 298: + if (lookahead == 'l') ADVANCE(315); + END_STATE(); + case 299: + if (lookahead == 'e') ADVANCE(316); + END_STATE(); + case 300: + if (lookahead == 'l') ADVANCE(317); + END_STATE(); + case 301: + if (lookahead == 'c') ADVANCE(318); + END_STATE(); + case 302: + if (lookahead == 'l') ADVANCE(319); + END_STATE(); + case 303: + if (lookahead == 'l') ADVANCE(320); + END_STATE(); + case 304: + if (lookahead == 'n') ADVANCE(321); + END_STATE(); + case 305: + if (lookahead == 'c') ADVANCE(322); + END_STATE(); + case 306: + if (lookahead == 'e') ADVANCE(323); + END_STATE(); + case 307: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 308: + ACCEPT_TOKEN(anon_sym_continue); + END_STATE(); + case 309: + ACCEPT_TOKEN(anon_sym_register); + END_STATE(); + case 310: + ACCEPT_TOKEN(anon_sym_restrict); + END_STATE(); + case 311: + if (lookahead == 't') ADVANCE(128); + END_STATE(); + case 312: + ACCEPT_TOKEN(anon_sym_unsigned); + END_STATE(); + case 313: + ACCEPT_TOKEN(anon_sym_volatile); + END_STATE(); + case 314: + if (lookahead == 't') ADVANCE(324); + END_STATE(); + case 315: + ACCEPT_TOKEN(anon_sym___clrcall); + END_STATE(); + case 316: + if (lookahead == 'c') ADVANCE(325); + END_STATE(); + case 317: + if (lookahead == 'l') ADVANCE(326); + END_STATE(); + case 318: + if (lookahead == 't') ADVANCE(327); + END_STATE(); + case 319: + ACCEPT_TOKEN(anon_sym___stdcall); + END_STATE(); + case 320: + if (lookahead == 'l') ADVANCE(328); + END_STATE(); + case 321: + if (lookahead == 'e') ADVANCE(329); + END_STATE(); + case 322: + if (lookahead == 'a') ADVANCE(330); + END_STATE(); + case 323: + if (lookahead == 'd') ADVANCE(331); + END_STATE(); + case 324: + if (lookahead == 'e') ADVANCE(332); + END_STATE(); + case 325: + ACCEPT_TOKEN(anon_sym___declspec); + END_STATE(); + case 326: + ACCEPT_TOKEN(anon_sym___fastcall); + END_STATE(); + case 327: + ACCEPT_TOKEN(sym_ms_restrict_modifier); + END_STATE(); + case 328: + ACCEPT_TOKEN(anon_sym___thiscall); + END_STATE(); + case 329: + if (lookahead == 'd') ADVANCE(333); + END_STATE(); + case 330: + if (lookahead == 'l') ADVANCE(334); + END_STATE(); + case 331: + ACCEPT_TOKEN(anon_sym__unaligned); + END_STATE(); + case 332: + if (lookahead == '_') ADVANCE(335); + END_STATE(); + case 333: + ACCEPT_TOKEN(anon_sym___unaligned); + END_STATE(); + case 334: + if (lookahead == 'l') ADVANCE(336); + END_STATE(); + case 335: + if (lookahead == '_') ADVANCE(337); + END_STATE(); + case 336: + ACCEPT_TOKEN(anon_sym___vectorcall); + END_STATE(); + case 337: + ACCEPT_TOKEN(anon_sym___attribute__); + END_STATE(); + default: + return false; + } +} + +static const TSLexMode ts_lex_modes[STATE_COUNT] = { + [0] = {.lex_state = 0}, + [1] = {.lex_state = 83}, + [2] = {.lex_state = 28}, + [3] = {.lex_state = 28}, + [4] = {.lex_state = 28}, + [5] = {.lex_state = 28}, + [6] = {.lex_state = 28}, + [7] = {.lex_state = 28}, + [8] = {.lex_state = 28}, + [9] = {.lex_state = 28}, + [10] = {.lex_state = 28}, + [11] = {.lex_state = 28}, + [12] = {.lex_state = 28}, + [13] = {.lex_state = 28}, + [14] = {.lex_state = 28}, + [15] = {.lex_state = 28}, + [16] = {.lex_state = 28}, + [17] = {.lex_state = 28}, + [18] = {.lex_state = 28}, + [19] = {.lex_state = 28}, + [20] = {.lex_state = 28}, + [21] = {.lex_state = 83}, + [22] = {.lex_state = 83}, + [23] = {.lex_state = 29}, + [24] = {.lex_state = 83}, + [25] = {.lex_state = 83}, + [26] = {.lex_state = 83}, + [27] = {.lex_state = 83}, + [28] = {.lex_state = 83}, + [29] = {.lex_state = 83}, + [30] = {.lex_state = 83}, + [31] = {.lex_state = 83}, + [32] = {.lex_state = 83}, + [33] = {.lex_state = 29}, + [34] = {.lex_state = 83}, + [35] = {.lex_state = 83}, + [36] = {.lex_state = 83}, + [37] = {.lex_state = 83}, + [38] = {.lex_state = 83}, + [39] = {.lex_state = 29}, + [40] = {.lex_state = 83}, + [41] = {.lex_state = 83}, + [42] = {.lex_state = 83}, + [43] = {.lex_state = 28}, + [44] = {.lex_state = 28}, + [45] = {.lex_state = 28}, + [46] = {.lex_state = 28}, + [47] = {.lex_state = 28}, + [48] = {.lex_state = 83}, + [49] = {.lex_state = 29}, + [50] = {.lex_state = 83}, + [51] = {.lex_state = 29}, + [52] = {.lex_state = 29}, + [53] = {.lex_state = 83}, + [54] = {.lex_state = 83}, + [55] = {.lex_state = 83}, + [56] = {.lex_state = 29}, + [57] = {.lex_state = 29}, + [58] = {.lex_state = 83}, + [59] = {.lex_state = 83}, + [60] = {.lex_state = 83}, + [61] = {.lex_state = 83}, + [62] = {.lex_state = 83}, + [63] = {.lex_state = 83}, + [64] = {.lex_state = 83}, + [65] = {.lex_state = 83}, + [66] = {.lex_state = 83}, + [67] = {.lex_state = 27}, + [68] = {.lex_state = 28}, + [69] = {.lex_state = 28}, + [70] = {.lex_state = 28}, + [71] = {.lex_state = 28}, + [72] = {.lex_state = 28}, + [73] = {.lex_state = 28}, + [74] = {.lex_state = 28}, + [75] = {.lex_state = 28}, + [76] = {.lex_state = 28}, + [77] = {.lex_state = 28}, + [78] = {.lex_state = 28}, + [79] = {.lex_state = 28}, + [80] = {.lex_state = 28}, + [81] = {.lex_state = 28}, + [82] = {.lex_state = 28}, + [83] = {.lex_state = 28}, + [84] = {.lex_state = 28}, + [85] = {.lex_state = 28}, + [86] = {.lex_state = 28}, + [87] = {.lex_state = 28}, + [88] = {.lex_state = 28}, + [89] = {.lex_state = 28}, + [90] = {.lex_state = 28}, + [91] = {.lex_state = 28}, + [92] = {.lex_state = 28}, + [93] = {.lex_state = 28}, + [94] = {.lex_state = 28}, + [95] = {.lex_state = 28}, + [96] = {.lex_state = 28}, + [97] = {.lex_state = 28}, + [98] = {.lex_state = 28}, + [99] = {.lex_state = 28}, + [100] = {.lex_state = 28}, + [101] = {.lex_state = 28}, + [102] = {.lex_state = 28}, + [103] = {.lex_state = 28}, + [104] = {.lex_state = 28}, + [105] = {.lex_state = 28}, + [106] = {.lex_state = 27}, + [107] = {.lex_state = 28}, + [108] = {.lex_state = 28}, + [109] = {.lex_state = 28}, + [110] = {.lex_state = 28}, + [111] = {.lex_state = 28}, + [112] = {.lex_state = 28}, + [113] = {.lex_state = 28}, + [114] = {.lex_state = 28}, + [115] = {.lex_state = 28}, + [116] = {.lex_state = 28}, + [117] = {.lex_state = 28}, + [118] = {.lex_state = 28}, + [119] = {.lex_state = 28}, + [120] = {.lex_state = 28}, + [121] = {.lex_state = 28}, + [122] = {.lex_state = 28}, + [123] = {.lex_state = 28}, + [124] = {.lex_state = 28}, + [125] = {.lex_state = 28}, + [126] = {.lex_state = 83}, + [127] = {.lex_state = 83}, + [128] = {.lex_state = 83}, + [129] = {.lex_state = 29}, + [130] = {.lex_state = 29}, + [131] = {.lex_state = 83}, + [132] = {.lex_state = 83}, + [133] = {.lex_state = 29}, + [134] = {.lex_state = 29}, + [135] = {.lex_state = 29}, + [136] = {.lex_state = 83}, + [137] = {.lex_state = 83}, + [138] = {.lex_state = 83}, + [139] = {.lex_state = 83}, + [140] = {.lex_state = 83}, + [141] = {.lex_state = 29}, + [142] = {.lex_state = 29}, + [143] = {.lex_state = 83}, + [144] = {.lex_state = 83}, + [145] = {.lex_state = 83}, + [146] = {.lex_state = 29}, + [147] = {.lex_state = 29}, + [148] = {.lex_state = 29}, + [149] = {.lex_state = 83}, + [150] = {.lex_state = 29}, + [151] = {.lex_state = 83}, + [152] = {.lex_state = 29}, + [153] = {.lex_state = 83}, + [154] = {.lex_state = 83}, + [155] = {.lex_state = 29}, + [156] = {.lex_state = 29}, + [157] = {.lex_state = 83}, + [158] = {.lex_state = 83}, + [159] = {.lex_state = 83}, + [160] = {.lex_state = 83}, + [161] = {.lex_state = 29}, + [162] = {.lex_state = 83}, + [163] = {.lex_state = 83}, + [164] = {.lex_state = 83}, + [165] = {.lex_state = 83}, + [166] = {.lex_state = 83}, + [167] = {.lex_state = 83}, + [168] = {.lex_state = 83}, + [169] = {.lex_state = 83}, + [170] = {.lex_state = 83}, + [171] = {.lex_state = 83}, + [172] = {.lex_state = 29}, + [173] = {.lex_state = 83}, + [174] = {.lex_state = 83}, + [175] = {.lex_state = 83}, + [176] = {.lex_state = 83}, + [177] = {.lex_state = 83}, + [178] = {.lex_state = 83}, + [179] = {.lex_state = 83}, + [180] = {.lex_state = 83}, + [181] = {.lex_state = 83}, + [182] = {.lex_state = 83}, + [183] = {.lex_state = 83}, + [184] = {.lex_state = 29}, + [185] = {.lex_state = 29}, + [186] = {.lex_state = 83}, + [187] = {.lex_state = 83}, + [188] = {.lex_state = 83}, + [189] = {.lex_state = 83}, + [190] = {.lex_state = 83}, + [191] = {.lex_state = 29}, + [192] = {.lex_state = 83}, + [193] = {.lex_state = 83}, + [194] = {.lex_state = 29}, + [195] = {.lex_state = 83}, + [196] = {.lex_state = 83}, + [197] = {.lex_state = 83}, + [198] = {.lex_state = 83}, + [199] = {.lex_state = 29}, + [200] = {.lex_state = 83}, + [201] = {.lex_state = 29}, + [202] = {.lex_state = 29}, + [203] = {.lex_state = 83}, + [204] = {.lex_state = 83}, + [205] = {.lex_state = 83}, + [206] = {.lex_state = 83}, + [207] = {.lex_state = 83}, + [208] = {.lex_state = 83}, + [209] = {.lex_state = 83}, + [210] = {.lex_state = 29}, + [211] = {.lex_state = 29}, + [212] = {.lex_state = 83}, + [213] = {.lex_state = 83}, + [214] = {.lex_state = 83}, + [215] = {.lex_state = 83}, + [216] = {.lex_state = 83}, + [217] = {.lex_state = 29}, + [218] = {.lex_state = 83}, + [219] = {.lex_state = 83}, + [220] = {.lex_state = 83}, + [221] = {.lex_state = 83}, + [222] = {.lex_state = 83}, + [223] = {.lex_state = 83}, + [224] = {.lex_state = 83}, + [225] = {.lex_state = 83}, + [226] = {.lex_state = 29}, + [227] = {.lex_state = 83}, + [228] = {.lex_state = 83}, + [229] = {.lex_state = 83}, + [230] = {.lex_state = 83}, + [231] = {.lex_state = 29}, + [232] = {.lex_state = 83}, + [233] = {.lex_state = 83}, + [234] = {.lex_state = 83}, + [235] = {.lex_state = 29}, + [236] = {.lex_state = 83}, + [237] = {.lex_state = 83}, + [238] = {.lex_state = 83}, + [239] = {.lex_state = 83}, + [240] = {.lex_state = 83}, + [241] = {.lex_state = 29}, + [242] = {.lex_state = 83}, + [243] = {.lex_state = 83}, + [244] = {.lex_state = 83}, + [245] = {.lex_state = 29}, + [246] = {.lex_state = 83}, + [247] = {.lex_state = 83}, + [248] = {.lex_state = 83}, + [249] = {.lex_state = 83}, + [250] = {.lex_state = 83}, + [251] = {.lex_state = 83}, + [252] = {.lex_state = 83}, + [253] = {.lex_state = 83}, + [254] = {.lex_state = 83}, + [255] = {.lex_state = 83}, + [256] = {.lex_state = 83}, + [257] = {.lex_state = 83}, + [258] = {.lex_state = 83}, + [259] = {.lex_state = 83}, + [260] = {.lex_state = 83}, + [261] = {.lex_state = 83}, + [262] = {.lex_state = 83}, + [263] = {.lex_state = 83}, + [264] = {.lex_state = 83}, + [265] = {.lex_state = 83}, + [266] = {.lex_state = 83}, + [267] = {.lex_state = 83}, + [268] = {.lex_state = 83}, + [269] = {.lex_state = 83}, + [270] = {.lex_state = 83}, + [271] = {.lex_state = 83}, + [272] = {.lex_state = 83}, + [273] = {.lex_state = 83}, + [274] = {.lex_state = 83}, + [275] = {.lex_state = 83}, + [276] = {.lex_state = 83}, + [277] = {.lex_state = 83}, + [278] = {.lex_state = 83}, + [279] = {.lex_state = 83}, + [280] = {.lex_state = 83}, + [281] = {.lex_state = 83}, + [282] = {.lex_state = 83}, + [283] = {.lex_state = 29}, + [284] = {.lex_state = 83}, + [285] = {.lex_state = 83}, + [286] = {.lex_state = 83}, + [287] = {.lex_state = 83}, + [288] = {.lex_state = 83}, + [289] = {.lex_state = 83}, + [290] = {.lex_state = 29}, + [291] = {.lex_state = 83}, + [292] = {.lex_state = 83}, + [293] = {.lex_state = 83}, + [294] = {.lex_state = 83}, + [295] = {.lex_state = 83}, + [296] = {.lex_state = 29}, + [297] = {.lex_state = 83}, + [298] = {.lex_state = 29}, + [299] = {.lex_state = 29}, + [300] = {.lex_state = 83}, + [301] = {.lex_state = 83}, + [302] = {.lex_state = 83}, + [303] = {.lex_state = 83}, + [304] = {.lex_state = 83}, + [305] = {.lex_state = 83}, + [306] = {.lex_state = 83}, + [307] = {.lex_state = 83}, + [308] = {.lex_state = 83}, + [309] = {.lex_state = 83}, + [310] = {.lex_state = 83}, + [311] = {.lex_state = 83}, + [312] = {.lex_state = 83}, + [313] = {.lex_state = 83}, + [314] = {.lex_state = 83}, + [315] = {.lex_state = 83}, + [316] = {.lex_state = 83}, + [317] = {.lex_state = 83}, + [318] = {.lex_state = 83}, + [319] = {.lex_state = 29}, + [320] = {.lex_state = 83}, + [321] = {.lex_state = 29}, + [322] = {.lex_state = 29}, + [323] = {.lex_state = 29}, + [324] = {.lex_state = 83}, + [325] = {.lex_state = 83}, + [326] = {.lex_state = 83}, + [327] = {.lex_state = 83}, + [328] = {.lex_state = 83}, + [329] = {.lex_state = 83}, + [330] = {.lex_state = 83}, + [331] = {.lex_state = 83}, + [332] = {.lex_state = 83}, + [333] = {.lex_state = 83}, + [334] = {.lex_state = 29}, + [335] = {.lex_state = 83}, + [336] = {.lex_state = 83}, + [337] = {.lex_state = 83}, + [338] = {.lex_state = 83}, + [339] = {.lex_state = 83}, + [340] = {.lex_state = 83}, + [341] = {.lex_state = 83}, + [342] = {.lex_state = 83}, + [343] = {.lex_state = 83}, + [344] = {.lex_state = 83}, + [345] = {.lex_state = 29}, + [346] = {.lex_state = 83}, + [347] = {.lex_state = 29}, + [348] = {.lex_state = 29}, + [349] = {.lex_state = 83}, + [350] = {.lex_state = 83}, + [351] = {.lex_state = 29}, + [352] = {.lex_state = 83}, + [353] = {.lex_state = 29}, + [354] = {.lex_state = 29}, + [355] = {.lex_state = 83}, + [356] = {.lex_state = 29}, + [357] = {.lex_state = 29}, + [358] = {.lex_state = 29}, + [359] = {.lex_state = 29}, + [360] = {.lex_state = 29}, + [361] = {.lex_state = 83}, + [362] = {.lex_state = 29}, + [363] = {.lex_state = 83}, + [364] = {.lex_state = 29}, + [365] = {.lex_state = 29}, + [366] = {.lex_state = 83}, + [367] = {.lex_state = 83}, + [368] = {.lex_state = 83}, + [369] = {.lex_state = 83}, + [370] = {.lex_state = 83}, + [371] = {.lex_state = 29}, + [372] = {.lex_state = 29}, + [373] = {.lex_state = 27}, + [374] = {.lex_state = 83}, + [375] = {.lex_state = 83}, + [376] = {.lex_state = 83}, + [377] = {.lex_state = 83}, + [378] = {.lex_state = 83}, + [379] = {.lex_state = 83}, + [380] = {.lex_state = 83}, + [381] = {.lex_state = 83}, + [382] = {.lex_state = 83}, + [383] = {.lex_state = 83}, + [384] = {.lex_state = 27}, + [385] = {.lex_state = 83}, + [386] = {.lex_state = 33}, + [387] = {.lex_state = 33}, + [388] = {.lex_state = 33}, + [389] = {.lex_state = 33}, + [390] = {.lex_state = 33}, + [391] = {.lex_state = 33}, + [392] = {.lex_state = 33}, + [393] = {.lex_state = 33}, + [394] = {.lex_state = 33}, + [395] = {.lex_state = 33}, + [396] = {.lex_state = 33}, + [397] = {.lex_state = 33}, + [398] = {.lex_state = 33}, + [399] = {.lex_state = 33}, + [400] = {.lex_state = 33}, + [401] = {.lex_state = 32}, + [402] = {.lex_state = 32}, + [403] = {.lex_state = 32}, + [404] = {.lex_state = 32}, + [405] = {.lex_state = 32}, + [406] = {.lex_state = 32}, + [407] = {.lex_state = 32}, + [408] = {.lex_state = 32}, + [409] = {.lex_state = 32}, + [410] = {.lex_state = 83}, + [411] = {.lex_state = 33}, + [412] = {.lex_state = 83}, + [413] = {.lex_state = 83}, + [414] = {.lex_state = 32}, + [415] = {.lex_state = 83}, + [416] = {.lex_state = 32}, + [417] = {.lex_state = 34}, + [418] = {.lex_state = 32}, + [419] = {.lex_state = 34}, + [420] = {.lex_state = 34}, + [421] = {.lex_state = 83}, + [422] = {.lex_state = 83}, + [423] = {.lex_state = 31}, + [424] = {.lex_state = 83}, + [425] = {.lex_state = 83}, + [426] = {.lex_state = 83}, + [427] = {.lex_state = 31}, + [428] = {.lex_state = 83}, + [429] = {.lex_state = 83}, + [430] = {.lex_state = 83}, + [431] = {.lex_state = 83}, + [432] = {.lex_state = 83}, + [433] = {.lex_state = 31}, + [434] = {.lex_state = 33}, + [435] = {.lex_state = 33}, + [436] = {.lex_state = 31}, + [437] = {.lex_state = 33}, + [438] = {.lex_state = 33}, + [439] = {.lex_state = 33}, + [440] = {.lex_state = 31}, + [441] = {.lex_state = 83}, + [442] = {.lex_state = 83}, + [443] = {.lex_state = 83}, + [444] = {.lex_state = 83}, + [445] = {.lex_state = 83}, + [446] = {.lex_state = 83}, + [447] = {.lex_state = 83}, + [448] = {.lex_state = 83}, + [449] = {.lex_state = 83}, + [450] = {.lex_state = 83}, + [451] = {.lex_state = 83}, + [452] = {.lex_state = 83}, + [453] = {.lex_state = 83}, + [454] = {.lex_state = 83}, + [455] = {.lex_state = 83}, + [456] = {.lex_state = 83}, + [457] = {.lex_state = 83}, + [458] = {.lex_state = 83}, + [459] = {.lex_state = 83}, + [460] = {.lex_state = 83}, + [461] = {.lex_state = 83}, + [462] = {.lex_state = 83}, + [463] = {.lex_state = 83}, + [464] = {.lex_state = 83}, + [465] = {.lex_state = 83}, + [466] = {.lex_state = 83}, + [467] = {.lex_state = 83}, + [468] = {.lex_state = 83}, + [469] = {.lex_state = 83}, + [470] = {.lex_state = 83}, + [471] = {.lex_state = 83}, + [472] = {.lex_state = 83}, + [473] = {.lex_state = 83}, + [474] = {.lex_state = 83}, + [475] = {.lex_state = 83}, + [476] = {.lex_state = 83}, + [477] = {.lex_state = 83}, + [478] = {.lex_state = 83}, + [479] = {.lex_state = 83}, + [480] = {.lex_state = 83}, + [481] = {.lex_state = 83}, + [482] = {.lex_state = 83}, + [483] = {.lex_state = 83}, + [484] = {.lex_state = 83}, + [485] = {.lex_state = 83}, + [486] = {.lex_state = 83}, + [487] = {.lex_state = 83}, + [488] = {.lex_state = 32}, + [489] = {.lex_state = 83}, + [490] = {.lex_state = 83}, + [491] = {.lex_state = 83}, + [492] = {.lex_state = 83}, + [493] = {.lex_state = 83}, + [494] = {.lex_state = 83}, + [495] = {.lex_state = 83}, + [496] = {.lex_state = 83}, + [497] = {.lex_state = 83}, + [498] = {.lex_state = 83}, + [499] = {.lex_state = 83}, + [500] = {.lex_state = 83}, + [501] = {.lex_state = 83}, + [502] = {.lex_state = 83}, + [503] = {.lex_state = 83}, + [504] = {.lex_state = 83}, + [505] = {.lex_state = 83}, + [506] = {.lex_state = 32}, + [507] = {.lex_state = 83}, + [508] = {.lex_state = 83}, + [509] = {.lex_state = 83}, + [510] = {.lex_state = 83}, + [511] = {.lex_state = 83}, + [512] = {.lex_state = 83}, + [513] = {.lex_state = 32}, + [514] = {.lex_state = 83}, + [515] = {.lex_state = 83}, + [516] = {.lex_state = 32}, + [517] = {.lex_state = 83}, + [518] = {.lex_state = 83}, + [519] = {.lex_state = 32}, + [520] = {.lex_state = 83}, + [521] = {.lex_state = 83}, + [522] = {.lex_state = 32}, + [523] = {.lex_state = 34}, + [524] = {.lex_state = 32}, + [525] = {.lex_state = 83}, + [526] = {.lex_state = 83}, + [527] = {.lex_state = 32}, + [528] = {.lex_state = 83}, + [529] = {.lex_state = 32}, + [530] = {.lex_state = 83}, + [531] = {.lex_state = 83}, + [532] = {.lex_state = 83}, + [533] = {.lex_state = 83}, + [534] = {.lex_state = 83}, + [535] = {.lex_state = 32}, + [536] = {.lex_state = 83}, + [537] = {.lex_state = 83}, + [538] = {.lex_state = 83}, + [539] = {.lex_state = 83}, + [540] = {.lex_state = 83}, + [541] = {.lex_state = 83}, + [542] = {.lex_state = 83}, + [543] = {.lex_state = 83}, + [544] = {.lex_state = 83}, + [545] = {.lex_state = 32}, + [546] = {.lex_state = 32}, + [547] = {.lex_state = 32}, + [548] = {.lex_state = 83}, + [549] = {.lex_state = 34}, + [550] = {.lex_state = 83}, + [551] = {.lex_state = 32}, + [552] = {.lex_state = 83}, + [553] = {.lex_state = 83}, + [554] = {.lex_state = 83}, + [555] = {.lex_state = 83}, + [556] = {.lex_state = 83}, + [557] = {.lex_state = 83}, + [558] = {.lex_state = 83}, + [559] = {.lex_state = 83}, + [560] = {.lex_state = 83}, + [561] = {.lex_state = 83}, + [562] = {.lex_state = 83}, + [563] = {.lex_state = 83}, + [564] = {.lex_state = 83}, + [565] = {.lex_state = 83}, + [566] = {.lex_state = 83}, + [567] = {.lex_state = 83}, + [568] = {.lex_state = 83}, + [569] = {.lex_state = 83}, + [570] = {.lex_state = 32}, + [571] = {.lex_state = 83}, + [572] = {.lex_state = 83}, + [573] = {.lex_state = 83}, + [574] = {.lex_state = 83}, + [575] = {.lex_state = 83}, + [576] = {.lex_state = 83}, + [577] = {.lex_state = 83}, + [578] = {.lex_state = 83}, + [579] = {.lex_state = 83}, + [580] = {.lex_state = 32}, + [581] = {.lex_state = 34}, + [582] = {.lex_state = 32}, + [583] = {.lex_state = 32}, + [584] = {.lex_state = 83}, + [585] = {.lex_state = 32}, + [586] = {.lex_state = 32}, + [587] = {.lex_state = 83}, + [588] = {.lex_state = 83}, + [589] = {.lex_state = 83}, + [590] = {.lex_state = 83}, + [591] = {.lex_state = 83}, + [592] = {.lex_state = 83}, + [593] = {.lex_state = 83}, + [594] = {.lex_state = 32}, + [595] = {.lex_state = 32}, + [596] = {.lex_state = 32}, + [597] = {.lex_state = 32}, + [598] = {.lex_state = 32}, + [599] = {.lex_state = 32}, + [600] = {.lex_state = 32}, + [601] = {.lex_state = 32}, + [602] = {.lex_state = 83}, + [603] = {.lex_state = 83}, + [604] = {.lex_state = 32}, + [605] = {.lex_state = 32}, + [606] = {.lex_state = 32}, + [607] = {.lex_state = 83}, + [608] = {.lex_state = 83}, + [609] = {.lex_state = 32}, + [610] = {.lex_state = 33}, + [611] = {.lex_state = 83}, + [612] = {.lex_state = 32}, + [613] = {.lex_state = 83}, + [614] = {.lex_state = 83}, + [615] = {.lex_state = 32}, + [616] = {.lex_state = 32}, + [617] = {.lex_state = 32}, + [618] = {.lex_state = 33}, + [619] = {.lex_state = 32}, + [620] = {.lex_state = 32}, + [621] = {.lex_state = 32}, + [622] = {.lex_state = 32}, + [623] = {.lex_state = 32}, + [624] = {.lex_state = 32}, + [625] = {.lex_state = 32}, + [626] = {.lex_state = 32}, + [627] = {.lex_state = 32}, + [628] = {.lex_state = 32}, + [629] = {.lex_state = 32}, + [630] = {.lex_state = 32}, + [631] = {.lex_state = 32}, + [632] = {.lex_state = 32}, + [633] = {.lex_state = 32}, + [634] = {.lex_state = 32}, + [635] = {.lex_state = 32}, + [636] = {.lex_state = 32}, + [637] = {.lex_state = 32}, + [638] = {.lex_state = 32}, + [639] = {.lex_state = 32}, + [640] = {.lex_state = 33}, + [641] = {.lex_state = 33}, + [642] = {.lex_state = 33}, + [643] = {.lex_state = 33}, + [644] = {.lex_state = 33}, + [645] = {.lex_state = 33}, + [646] = {.lex_state = 33}, + [647] = {.lex_state = 83}, + [648] = {.lex_state = 32}, + [649] = {.lex_state = 32}, + [650] = {.lex_state = 32}, + [651] = {.lex_state = 32}, + [652] = {.lex_state = 32}, + [653] = {.lex_state = 32}, + [654] = {.lex_state = 32}, + [655] = {.lex_state = 32}, + [656] = {.lex_state = 32}, + [657] = {.lex_state = 32}, + [658] = {.lex_state = 32}, + [659] = {.lex_state = 32}, + [660] = {.lex_state = 33}, + [661] = {.lex_state = 33}, + [662] = {.lex_state = 83}, + [663] = {.lex_state = 33}, + [664] = {.lex_state = 32}, + [665] = {.lex_state = 33}, + [666] = {.lex_state = 33}, + [667] = {.lex_state = 33}, + [668] = {.lex_state = 33}, + [669] = {.lex_state = 33}, + [670] = {.lex_state = 33}, + [671] = {.lex_state = 33}, + [672] = {.lex_state = 33}, + [673] = {.lex_state = 33}, + [674] = {.lex_state = 33}, + [675] = {.lex_state = 33}, + [676] = {.lex_state = 33}, + [677] = {.lex_state = 33}, + [678] = {.lex_state = 32}, + [679] = {.lex_state = 33}, + [680] = {.lex_state = 33}, + [681] = {.lex_state = 33}, + [682] = {.lex_state = 33}, + [683] = {.lex_state = 33}, + [684] = {.lex_state = 33}, + [685] = {.lex_state = 33}, + [686] = {.lex_state = 33}, + [687] = {.lex_state = 33}, + [688] = {.lex_state = 33}, + [689] = {.lex_state = 32}, + [690] = {.lex_state = 32}, + [691] = {.lex_state = 32}, + [692] = {.lex_state = 33}, + [693] = {.lex_state = 32}, + [694] = {.lex_state = 32}, + [695] = {.lex_state = 32}, + [696] = {.lex_state = 32}, + [697] = {.lex_state = 32}, + [698] = {.lex_state = 32}, + [699] = {.lex_state = 32}, + [700] = {.lex_state = 32}, + [701] = {.lex_state = 32}, + [702] = {.lex_state = 32}, + [703] = {.lex_state = 32}, + [704] = {.lex_state = 32}, + [705] = {.lex_state = 32}, + [706] = {.lex_state = 32}, + [707] = {.lex_state = 33}, + [708] = {.lex_state = 32}, + [709] = {.lex_state = 32}, + [710] = {.lex_state = 32}, + [711] = {.lex_state = 32}, + [712] = {.lex_state = 33}, + [713] = {.lex_state = 32}, + [714] = {.lex_state = 32}, + [715] = {.lex_state = 32}, + [716] = {.lex_state = 32}, + [717] = {.lex_state = 32}, + [718] = {.lex_state = 32}, + [719] = {.lex_state = 32}, + [720] = {.lex_state = 32}, + [721] = {.lex_state = 32}, + [722] = {.lex_state = 32}, + [723] = {.lex_state = 32}, + [724] = {.lex_state = 32}, + [725] = {.lex_state = 32}, + [726] = {.lex_state = 32}, + [727] = {.lex_state = 32}, + [728] = {.lex_state = 32}, + [729] = {.lex_state = 32}, + [730] = {.lex_state = 33}, + [731] = {.lex_state = 32}, + [732] = {.lex_state = 32}, + [733] = {.lex_state = 32}, + [734] = {.lex_state = 32}, + [735] = {.lex_state = 32}, + [736] = {.lex_state = 32}, + [737] = {.lex_state = 32}, + [738] = {.lex_state = 32}, + [739] = {.lex_state = 32}, + [740] = {.lex_state = 32}, + [741] = {.lex_state = 32}, + [742] = {.lex_state = 32}, + [743] = {.lex_state = 33}, + [744] = {.lex_state = 32}, + [745] = {.lex_state = 32}, + [746] = {.lex_state = 32}, + [747] = {.lex_state = 32}, + [748] = {.lex_state = 32}, + [749] = {.lex_state = 32}, + [750] = {.lex_state = 33}, + [751] = {.lex_state = 32}, + [752] = {.lex_state = 32}, + [753] = {.lex_state = 32}, + [754] = {.lex_state = 32}, + [755] = {.lex_state = 32}, + [756] = {.lex_state = 32}, + [757] = {.lex_state = 32}, + [758] = {.lex_state = 33}, + [759] = {.lex_state = 32}, + [760] = {.lex_state = 32}, + [761] = {.lex_state = 32}, + [762] = {.lex_state = 32}, + [763] = {.lex_state = 31}, + [764] = {.lex_state = 34}, + [765] = {.lex_state = 34}, + [766] = {.lex_state = 34}, + [767] = {.lex_state = 34}, + [768] = {.lex_state = 34}, + [769] = {.lex_state = 34}, + [770] = {.lex_state = 32}, + [771] = {.lex_state = 32}, + [772] = {.lex_state = 32}, + [773] = {.lex_state = 32}, + [774] = {.lex_state = 32}, + [775] = {.lex_state = 32}, + [776] = {.lex_state = 32}, + [777] = {.lex_state = 32}, + [778] = {.lex_state = 32}, + [779] = {.lex_state = 32}, + [780] = {.lex_state = 32}, + [781] = {.lex_state = 32}, + [782] = {.lex_state = 34}, + [783] = {.lex_state = 32}, + [784] = {.lex_state = 31}, + [785] = {.lex_state = 32}, + [786] = {.lex_state = 32}, + [787] = {.lex_state = 31}, + [788] = {.lex_state = 32}, + [789] = {.lex_state = 34}, + [790] = {.lex_state = 34}, + [791] = {.lex_state = 34}, + [792] = {.lex_state = 32}, + [793] = {.lex_state = 34}, + [794] = {.lex_state = 32}, + [795] = {.lex_state = 34}, + [796] = {.lex_state = 32}, + [797] = {.lex_state = 32}, + [798] = {.lex_state = 32}, + [799] = {.lex_state = 34}, + [800] = {.lex_state = 34}, + [801] = {.lex_state = 32}, + [802] = {.lex_state = 32}, + [803] = {.lex_state = 32}, + [804] = {.lex_state = 32}, + [805] = {.lex_state = 32}, + [806] = {.lex_state = 32}, + [807] = {.lex_state = 32}, + [808] = {.lex_state = 32}, + [809] = {.lex_state = 32}, + [810] = {.lex_state = 32}, + [811] = {.lex_state = 32}, + [812] = {.lex_state = 32}, + [813] = {.lex_state = 34}, + [814] = {.lex_state = 32}, + [815] = {.lex_state = 31}, + [816] = {.lex_state = 34}, + [817] = {.lex_state = 32}, + [818] = {.lex_state = 33}, + [819] = {.lex_state = 34}, + [820] = {.lex_state = 32}, + [821] = {.lex_state = 34}, + [822] = {.lex_state = 32}, + [823] = {.lex_state = 34}, + [824] = {.lex_state = 32}, + [825] = {.lex_state = 32}, + [826] = {.lex_state = 32}, + [827] = {.lex_state = 32}, + [828] = {.lex_state = 32}, + [829] = {.lex_state = 34}, + [830] = {.lex_state = 32}, + [831] = {.lex_state = 33}, + [832] = {.lex_state = 33}, + [833] = {.lex_state = 33}, + [834] = {.lex_state = 33}, + [835] = {.lex_state = 33}, + [836] = {.lex_state = 33}, + [837] = {.lex_state = 33}, + [838] = {.lex_state = 33}, + [839] = {.lex_state = 33}, + [840] = {.lex_state = 33}, + [841] = {.lex_state = 33}, + [842] = {.lex_state = 33}, + [843] = {.lex_state = 33}, + [844] = {.lex_state = 33}, + [845] = {.lex_state = 33}, + [846] = {.lex_state = 33}, + [847] = {.lex_state = 33}, + [848] = {.lex_state = 33}, + [849] = {.lex_state = 33}, + [850] = {.lex_state = 33}, + [851] = {.lex_state = 33}, + [852] = {.lex_state = 33}, + [853] = {.lex_state = 33}, + [854] = {.lex_state = 33}, + [855] = {.lex_state = 33}, + [856] = {.lex_state = 33}, + [857] = {.lex_state = 33}, + [858] = {.lex_state = 33}, + [859] = {.lex_state = 33}, + [860] = {.lex_state = 33}, + [861] = {.lex_state = 33}, + [862] = {.lex_state = 33}, + [863] = {.lex_state = 33}, + [864] = {.lex_state = 33}, + [865] = {.lex_state = 33}, + [866] = {.lex_state = 33}, + [867] = {.lex_state = 33}, + [868] = {.lex_state = 33}, + [869] = {.lex_state = 33}, + [870] = {.lex_state = 33}, + [871] = {.lex_state = 33}, + [872] = {.lex_state = 33}, + [873] = {.lex_state = 33}, + [874] = {.lex_state = 33}, + [875] = {.lex_state = 33}, + [876] = {.lex_state = 30}, + [877] = {.lex_state = 19}, + [878] = {.lex_state = 33}, + [879] = {.lex_state = 33}, + [880] = {.lex_state = 33}, + [881] = {.lex_state = 33}, + [882] = {.lex_state = 33}, + [883] = {.lex_state = 33}, + [884] = {.lex_state = 33}, + [885] = {.lex_state = 33}, + [886] = {.lex_state = 33}, + [887] = {.lex_state = 33}, + [888] = {.lex_state = 30}, + [889] = {.lex_state = 33}, + [890] = {.lex_state = 33}, + [891] = {.lex_state = 33}, + [892] = {.lex_state = 33}, + [893] = {.lex_state = 33}, + [894] = {.lex_state = 30}, + [895] = {.lex_state = 33}, + [896] = {.lex_state = 33}, + [897] = {.lex_state = 33}, + [898] = {.lex_state = 33}, + [899] = {.lex_state = 33}, + [900] = {.lex_state = 33}, + [901] = {.lex_state = 33}, + [902] = {.lex_state = 30}, + [903] = {.lex_state = 33}, + [904] = {.lex_state = 33}, + [905] = {.lex_state = 30}, + [906] = {.lex_state = 33}, + [907] = {.lex_state = 30}, + [908] = {.lex_state = 33}, + [909] = {.lex_state = 30}, + [910] = {.lex_state = 30}, + [911] = {.lex_state = 30}, + [912] = {.lex_state = 30}, + [913] = {.lex_state = 30}, + [914] = {.lex_state = 33}, + [915] = {.lex_state = 30}, + [916] = {.lex_state = 30}, + [917] = {.lex_state = 30}, + [918] = {.lex_state = 30}, + [919] = {.lex_state = 30}, + [920] = {.lex_state = 30}, + [921] = {.lex_state = 33}, + [922] = {.lex_state = 33}, + [923] = {.lex_state = 30}, + [924] = {.lex_state = 30}, + [925] = {.lex_state = 30}, + [926] = {.lex_state = 33}, + [927] = {.lex_state = 30}, + [928] = {.lex_state = 30}, + [929] = {.lex_state = 33}, + [930] = {.lex_state = 30}, + [931] = {.lex_state = 30}, + [932] = {.lex_state = 30}, + [933] = {.lex_state = 30}, + [934] = {.lex_state = 33}, + [935] = {.lex_state = 30}, + [936] = {.lex_state = 30}, + [937] = {.lex_state = 30}, + [938] = {.lex_state = 33}, + [939] = {.lex_state = 30}, + [940] = {.lex_state = 30}, + [941] = {.lex_state = 30}, + [942] = {.lex_state = 30}, + [943] = {.lex_state = 30}, + [944] = {.lex_state = 30}, + [945] = {.lex_state = 30}, + [946] = {.lex_state = 33}, + [947] = {.lex_state = 33}, + [948] = {.lex_state = 19}, + [949] = {.lex_state = 19}, + [950] = {.lex_state = 19}, + [951] = {.lex_state = 19}, + [952] = {.lex_state = 19}, + [953] = {.lex_state = 19}, + [954] = {.lex_state = 19}, + [955] = {.lex_state = 19}, + [956] = {.lex_state = 19}, + [957] = {.lex_state = 19}, + [958] = {.lex_state = 19}, + [959] = {.lex_state = 19}, + [960] = {.lex_state = 19}, + [961] = {.lex_state = 33}, + [962] = {.lex_state = 19}, + [963] = {.lex_state = 19}, + [964] = {.lex_state = 33}, + [965] = {.lex_state = 19}, + [966] = {.lex_state = 19}, + [967] = {.lex_state = 19}, + [968] = {.lex_state = 19}, + [969] = {.lex_state = 19}, + [970] = {.lex_state = 19}, + [971] = {.lex_state = 19}, + [972] = {.lex_state = 19}, + [973] = {.lex_state = 19}, + [974] = {.lex_state = 19}, + [975] = {.lex_state = 19}, + [976] = {.lex_state = 19}, + [977] = {.lex_state = 19}, + [978] = {.lex_state = 33}, + [979] = {.lex_state = 33}, + [980] = {.lex_state = 33}, + [981] = {.lex_state = 33}, + [982] = {.lex_state = 33}, + [983] = {.lex_state = 33}, + [984] = {.lex_state = 33}, + [985] = {.lex_state = 33}, + [986] = {.lex_state = 33}, + [987] = {.lex_state = 33}, + [988] = {.lex_state = 33}, + [989] = {.lex_state = 33}, + [990] = {.lex_state = 33}, + [991] = {.lex_state = 33}, + [992] = {.lex_state = 33}, + [993] = {.lex_state = 33}, + [994] = {.lex_state = 33}, + [995] = {.lex_state = 33}, + [996] = {.lex_state = 33}, + [997] = {.lex_state = 33}, + [998] = {.lex_state = 33}, + [999] = {.lex_state = 33}, + [1000] = {.lex_state = 83}, + [1001] = {.lex_state = 83}, + [1002] = {.lex_state = 83}, + [1003] = {.lex_state = 33}, + [1004] = {.lex_state = 33}, + [1005] = {.lex_state = 33}, + [1006] = {.lex_state = 33}, + [1007] = {.lex_state = 33}, + [1008] = {.lex_state = 33}, + [1009] = {.lex_state = 83}, + [1010] = {.lex_state = 33}, + [1011] = {.lex_state = 33}, + [1012] = {.lex_state = 33}, + [1013] = {.lex_state = 33}, + [1014] = {.lex_state = 33}, + [1015] = {.lex_state = 83}, + [1016] = {.lex_state = 83}, + [1017] = {.lex_state = 83}, + [1018] = {.lex_state = 33}, + [1019] = {.lex_state = 33}, + [1020] = {.lex_state = 83}, + [1021] = {.lex_state = 33}, + [1022] = {.lex_state = 33}, + [1023] = {.lex_state = 33}, + [1024] = {.lex_state = 33}, + [1025] = {.lex_state = 83}, + [1026] = {.lex_state = 33}, + [1027] = {.lex_state = 33}, + [1028] = {.lex_state = 83}, + [1029] = {.lex_state = 33}, + [1030] = {.lex_state = 33}, + [1031] = {.lex_state = 33}, + [1032] = {.lex_state = 33}, + [1033] = {.lex_state = 33}, + [1034] = {.lex_state = 33}, + [1035] = {.lex_state = 33}, + [1036] = {.lex_state = 33}, + [1037] = {.lex_state = 33}, + [1038] = {.lex_state = 33}, + [1039] = {.lex_state = 83}, + [1040] = {.lex_state = 83}, + [1041] = {.lex_state = 83}, + [1042] = {.lex_state = 83}, + [1043] = {.lex_state = 83}, + [1044] = {.lex_state = 83}, + [1045] = {.lex_state = 83}, + [1046] = {.lex_state = 83}, + [1047] = {.lex_state = 83}, + [1048] = {.lex_state = 83}, + [1049] = {.lex_state = 33}, + [1050] = {.lex_state = 33}, + [1051] = {.lex_state = 33}, + [1052] = {.lex_state = 83}, + [1053] = {.lex_state = 83}, + [1054] = {.lex_state = 83}, + [1055] = {.lex_state = 83}, + [1056] = {.lex_state = 83}, + [1057] = {.lex_state = 83}, + [1058] = {.lex_state = 83}, + [1059] = {.lex_state = 83}, + [1060] = {.lex_state = 83}, + [1061] = {.lex_state = 83}, + [1062] = {.lex_state = 35}, + [1063] = {.lex_state = 35}, + [1064] = {.lex_state = 35}, + [1065] = {.lex_state = 83}, + [1066] = {.lex_state = 83}, + [1067] = {.lex_state = 83}, + [1068] = {.lex_state = 83}, + [1069] = {.lex_state = 83}, + [1070] = {.lex_state = 83}, + [1071] = {.lex_state = 35}, + [1072] = {.lex_state = 83}, + [1073] = {.lex_state = 83}, + [1074] = {.lex_state = 83}, + [1075] = {.lex_state = 83}, + [1076] = {.lex_state = 83}, + [1077] = {.lex_state = 83}, + [1078] = {.lex_state = 83}, + [1079] = {.lex_state = 83}, + [1080] = {.lex_state = 83}, + [1081] = {.lex_state = 83}, + [1082] = {.lex_state = 83}, + [1083] = {.lex_state = 83}, + [1084] = {.lex_state = 83}, + [1085] = {.lex_state = 83}, + [1086] = {.lex_state = 83}, + [1087] = {.lex_state = 83}, + [1088] = {.lex_state = 83}, + [1089] = {.lex_state = 83}, + [1090] = {.lex_state = 83}, + [1091] = {.lex_state = 83}, + [1092] = {.lex_state = 83}, + [1093] = {.lex_state = 83}, + [1094] = {.lex_state = 83}, + [1095] = {.lex_state = 83}, + [1096] = {.lex_state = 83}, + [1097] = {.lex_state = 83}, + [1098] = {.lex_state = 83}, + [1099] = {.lex_state = 83}, + [1100] = {.lex_state = 83}, + [1101] = {.lex_state = 83}, + [1102] = {.lex_state = 83}, + [1103] = {.lex_state = 83}, + [1104] = {.lex_state = 83}, + [1105] = {.lex_state = 83}, + [1106] = {.lex_state = 83}, + [1107] = {.lex_state = 83}, + [1108] = {.lex_state = 83}, + [1109] = {.lex_state = 83}, + [1110] = {.lex_state = 28}, + [1111] = {.lex_state = 83}, + [1112] = {.lex_state = 33}, + [1113] = {.lex_state = 83}, + [1114] = {.lex_state = 33}, + [1115] = {.lex_state = 22}, + [1116] = {.lex_state = 83}, + [1117] = {.lex_state = 22}, + [1118] = {.lex_state = 24}, + [1119] = {.lex_state = 83}, + [1120] = {.lex_state = 83}, + [1121] = {.lex_state = 83}, + [1122] = {.lex_state = 24}, + [1123] = {.lex_state = 83}, + [1124] = {.lex_state = 83}, + [1125] = {.lex_state = 28}, + [1126] = {.lex_state = 83}, + [1127] = {.lex_state = 83}, + [1128] = {.lex_state = 83}, + [1129] = {.lex_state = 22}, + [1130] = {.lex_state = 22}, + [1131] = {.lex_state = 83}, + [1132] = {.lex_state = 22}, + [1133] = {.lex_state = 24}, + [1134] = {.lex_state = 83}, + [1135] = {.lex_state = 22}, + [1136] = {.lex_state = 83}, + [1137] = {.lex_state = 24}, + [1138] = {.lex_state = 83}, + [1139] = {.lex_state = 83}, + [1140] = {.lex_state = 24}, + [1141] = {.lex_state = 83}, + [1142] = {.lex_state = 83}, + [1143] = {.lex_state = 24}, + [1144] = {.lex_state = 83}, + [1145] = {.lex_state = 24}, + [1146] = {.lex_state = 33}, + [1147] = {.lex_state = 83}, + [1148] = {.lex_state = 22}, + [1149] = {.lex_state = 0}, + [1150] = {.lex_state = 0}, + [1151] = {.lex_state = 28}, + [1152] = {.lex_state = 0}, + [1153] = {.lex_state = 0}, + [1154] = {.lex_state = 0}, + [1155] = {.lex_state = 0}, + [1156] = {.lex_state = 33}, + [1157] = {.lex_state = 0}, + [1158] = {.lex_state = 0}, + [1159] = {.lex_state = 0}, + [1160] = {.lex_state = 0}, + [1161] = {.lex_state = 33}, + [1162] = {.lex_state = 0}, + [1163] = {.lex_state = 19}, + [1164] = {.lex_state = 0}, + [1165] = {.lex_state = 19}, + [1166] = {.lex_state = 0}, + [1167] = {.lex_state = 0}, + [1168] = {.lex_state = 28}, + [1169] = {.lex_state = 0}, + [1170] = {.lex_state = 0}, + [1171] = {.lex_state = 19}, + [1172] = {.lex_state = 28}, + [1173] = {.lex_state = 0}, + [1174] = {.lex_state = 33}, + [1175] = {.lex_state = 33}, + [1176] = {.lex_state = 0}, + [1177] = {.lex_state = 0}, + [1178] = {.lex_state = 0}, + [1179] = {.lex_state = 0}, + [1180] = {.lex_state = 19}, + [1181] = {.lex_state = 0}, + [1182] = {.lex_state = 0}, + [1183] = {.lex_state = 28}, + [1184] = {.lex_state = 0}, + [1185] = {.lex_state = 83}, + [1186] = {.lex_state = 0}, + [1187] = {.lex_state = 0}, + [1188] = {.lex_state = 0}, + [1189] = {.lex_state = 0}, + [1190] = {.lex_state = 33}, + [1191] = {.lex_state = 0}, + [1192] = {.lex_state = 0}, + [1193] = {.lex_state = 0}, + [1194] = {.lex_state = 33}, + [1195] = {.lex_state = 28}, + [1196] = {.lex_state = 28}, + [1197] = {.lex_state = 0}, + [1198] = {.lex_state = 0}, + [1199] = {.lex_state = 0}, + [1200] = {.lex_state = 0}, + [1201] = {.lex_state = 0}, + [1202] = {.lex_state = 0}, + [1203] = {.lex_state = 28}, + [1204] = {.lex_state = 0}, + [1205] = {.lex_state = 0}, + [1206] = {.lex_state = 0}, + [1207] = {.lex_state = 83}, + [1208] = {.lex_state = 0}, + [1209] = {.lex_state = 23}, + [1210] = {.lex_state = 83}, + [1211] = {.lex_state = 0}, + [1212] = {.lex_state = 23}, + [1213] = {.lex_state = 23}, + [1214] = {.lex_state = 33}, + [1215] = {.lex_state = 23}, + [1216] = {.lex_state = 83}, + [1217] = {.lex_state = 0}, + [1218] = {.lex_state = 83}, + [1219] = {.lex_state = 33}, + [1220] = {.lex_state = 28}, + [1221] = {.lex_state = 83}, + [1222] = {.lex_state = 26}, + [1223] = {.lex_state = 23}, + [1224] = {.lex_state = 0}, + [1225] = {.lex_state = 83}, + [1226] = {.lex_state = 33}, + [1227] = {.lex_state = 83}, + [1228] = {.lex_state = 28}, + [1229] = {.lex_state = 0}, + [1230] = {.lex_state = 83}, + [1231] = {.lex_state = 23}, + [1232] = {.lex_state = 0}, + [1233] = {.lex_state = 0}, + [1234] = {.lex_state = 83}, + [1235] = {.lex_state = 0}, + [1236] = {.lex_state = 0}, + [1237] = {.lex_state = 33}, + [1238] = {.lex_state = 83}, + [1239] = {.lex_state = 23}, + [1240] = {.lex_state = 0}, + [1241] = {.lex_state = 26}, + [1242] = {.lex_state = 0}, + [1243] = {.lex_state = 23}, + [1244] = {.lex_state = 83}, + [1245] = {.lex_state = 0}, + [1246] = {.lex_state = 33}, + [1247] = {.lex_state = 23}, + [1248] = {.lex_state = 33}, + [1249] = {.lex_state = 83}, + [1250] = {.lex_state = 23}, + [1251] = {.lex_state = 23}, + [1252] = {.lex_state = 0}, + [1253] = {.lex_state = 23}, + [1254] = {.lex_state = 23}, + [1255] = {.lex_state = 23}, + [1256] = {.lex_state = 33}, + [1257] = {.lex_state = 26}, + [1258] = {.lex_state = 83}, + [1259] = {.lex_state = 83}, + [1260] = {.lex_state = 0}, + [1261] = {.lex_state = 23}, + [1262] = {.lex_state = 23}, + [1263] = {.lex_state = 28}, + [1264] = {.lex_state = 83}, + [1265] = {.lex_state = 83}, + [1266] = {.lex_state = 83}, + [1267] = {.lex_state = 83}, + [1268] = {.lex_state = 33}, + [1269] = {.lex_state = 83}, + [1270] = {.lex_state = 23}, + [1271] = {.lex_state = 33}, + [1272] = {.lex_state = 0}, + [1273] = {.lex_state = 0}, + [1274] = {.lex_state = 27}, + [1275] = {.lex_state = 0}, + [1276] = {.lex_state = 0}, + [1277] = {.lex_state = 0}, + [1278] = {.lex_state = 33}, + [1279] = {.lex_state = 0}, + [1280] = {.lex_state = 0}, + [1281] = {.lex_state = 0}, + [1282] = {.lex_state = 0}, + [1283] = {.lex_state = 0}, + [1284] = {.lex_state = 0}, + [1285] = {.lex_state = 0}, + [1286] = {.lex_state = 0}, + [1287] = {.lex_state = 27}, + [1288] = {.lex_state = 0}, + [1289] = {.lex_state = 27}, + [1290] = {.lex_state = 27}, + [1291] = {.lex_state = 19}, + [1292] = {.lex_state = 19}, + [1293] = {.lex_state = 27}, + [1294] = {.lex_state = 19}, + [1295] = {.lex_state = 19}, + [1296] = {.lex_state = 0}, + [1297] = {.lex_state = 19}, + [1298] = {.lex_state = 19}, + [1299] = {.lex_state = 27}, + [1300] = {.lex_state = 19}, + [1301] = {.lex_state = 19}, + [1302] = {.lex_state = 27}, + [1303] = {.lex_state = 19}, + [1304] = {.lex_state = 19}, + [1305] = {.lex_state = 0}, + [1306] = {.lex_state = 19}, + [1307] = {.lex_state = 0}, + [1308] = {.lex_state = 19}, + [1309] = {.lex_state = 33}, + [1310] = {.lex_state = 19}, + [1311] = {.lex_state = 27}, + [1312] = {.lex_state = 0}, + [1313] = {.lex_state = 0}, + [1314] = {.lex_state = 0}, + [1315] = {.lex_state = 33}, + [1316] = {.lex_state = 0}, + [1317] = {.lex_state = 0}, + [1318] = {.lex_state = 19}, + [1319] = {.lex_state = 19}, + [1320] = {.lex_state = 19}, + [1321] = {.lex_state = 0}, + [1322] = {.lex_state = 0}, + [1323] = {.lex_state = 0}, + [1324] = {.lex_state = 0}, + [1325] = {.lex_state = 0}, + [1326] = {.lex_state = 0}, + [1327] = {.lex_state = 0}, + [1328] = {.lex_state = 0}, + [1329] = {.lex_state = 0}, + [1330] = {.lex_state = 0}, + [1331] = {.lex_state = 27}, + [1332] = {.lex_state = 83}, + [1333] = {.lex_state = 0}, + [1334] = {.lex_state = 0}, + [1335] = {.lex_state = 0}, + [1336] = {.lex_state = 27}, + [1337] = {.lex_state = 0}, + [1338] = {.lex_state = 27}, + [1339] = {.lex_state = 33}, + [1340] = {.lex_state = 27}, + [1341] = {.lex_state = 0}, + [1342] = {.lex_state = 33}, + [1343] = {.lex_state = 0}, + [1344] = {.lex_state = 0}, + [1345] = {.lex_state = 0}, + [1346] = {.lex_state = 0}, + [1347] = {.lex_state = 0}, + [1348] = {.lex_state = 0}, + [1349] = {.lex_state = 0}, + [1350] = {.lex_state = 0}, + [1351] = {.lex_state = 0}, + [1352] = {.lex_state = 27}, + [1353] = {.lex_state = 27}, + [1354] = {.lex_state = 0}, + [1355] = {.lex_state = 0}, + [1356] = {.lex_state = 19}, + [1357] = {.lex_state = 27}, + [1358] = {.lex_state = 27}, + [1359] = {.lex_state = 0}, + [1360] = {.lex_state = 0}, + [1361] = {.lex_state = 33}, + [1362] = {.lex_state = 0}, + [1363] = {.lex_state = 27}, + [1364] = {.lex_state = 0}, + [1365] = {.lex_state = 19}, + [1366] = {.lex_state = 0}, + [1367] = {.lex_state = 0}, + [1368] = {.lex_state = 0}, + [1369] = {.lex_state = 33}, + [1370] = {.lex_state = 27}, + [1371] = {.lex_state = 33}, + [1372] = {.lex_state = 33}, + [1373] = {.lex_state = 27}, + [1374] = {.lex_state = 0}, + [1375] = {.lex_state = 27}, + [1376] = {.lex_state = 0}, + [1377] = {.lex_state = 0}, + [1378] = {.lex_state = 33}, + [1379] = {.lex_state = 0}, + [1380] = {.lex_state = 0}, + [1381] = {.lex_state = 0}, + [1382] = {.lex_state = 0}, + [1383] = {.lex_state = 33}, + [1384] = {.lex_state = 0}, + [1385] = {.lex_state = 0}, + [1386] = {.lex_state = 0}, + [1387] = {.lex_state = 33}, + [1388] = {.lex_state = 0}, + [1389] = {.lex_state = 0}, + [1390] = {.lex_state = 0}, + [1391] = {.lex_state = 27}, + [1392] = {.lex_state = 27}, + [1393] = {.lex_state = 0}, + [1394] = {.lex_state = 27}, + [1395] = {.lex_state = 0}, + [1396] = {.lex_state = 33}, + [1397] = {.lex_state = 27}, + [1398] = {.lex_state = 0}, + [1399] = {.lex_state = 19}, + [1400] = {.lex_state = 33}, + [1401] = {.lex_state = 33}, + [1402] = {.lex_state = 27}, + [1403] = {.lex_state = 27}, + [1404] = {.lex_state = 33}, + [1405] = {.lex_state = 33}, + [1406] = {.lex_state = 19}, + [1407] = {.lex_state = 0}, + [1408] = {.lex_state = 0}, + [1409] = {.lex_state = 27}, + [1410] = {.lex_state = 0}, + [1411] = {.lex_state = 27}, + [1412] = {.lex_state = 0}, + [1413] = {.lex_state = 0}, + [1414] = {.lex_state = 33}, + [1415] = {.lex_state = 0}, + [1416] = {.lex_state = 27}, + [1417] = {.lex_state = 0}, + [1418] = {.lex_state = 19}, + [1419] = {.lex_state = 0}, + [1420] = {.lex_state = 0}, + [1421] = {.lex_state = 33}, + [1422] = {.lex_state = 33}, + [1423] = {.lex_state = 33}, + [1424] = {.lex_state = 0}, + [1425] = {.lex_state = 33}, + [1426] = {.lex_state = 0}, + [1427] = {.lex_state = 27}, + [1428] = {.lex_state = 0}, + [1429] = {.lex_state = 0}, + [1430] = {.lex_state = 0}, + [1431] = {.lex_state = 19}, + [1432] = {.lex_state = 0}, + [1433] = {.lex_state = 27}, + [1434] = {.lex_state = 33}, + [1435] = {.lex_state = 27}, + [1436] = {.lex_state = 0}, + [1437] = {.lex_state = 19}, + [1438] = {.lex_state = 0}, + [1439] = {.lex_state = 0}, + [1440] = {.lex_state = 0}, + [1441] = {.lex_state = 19}, + [1442] = {.lex_state = 19}, + [1443] = {.lex_state = 33}, + [1444] = {.lex_state = 0}, + [1445] = {.lex_state = 33}, + [1446] = {.lex_state = 0}, + [1447] = {.lex_state = 83}, + [1448] = {.lex_state = 19}, + [1449] = {.lex_state = 0}, + [1450] = {.lex_state = 83}, + [1451] = {.lex_state = 0}, + [1452] = {.lex_state = 19}, + [1453] = {.lex_state = 83}, + [1454] = {.lex_state = 33}, + [1455] = {.lex_state = 0}, + [1456] = {.lex_state = 0}, + [1457] = {.lex_state = 0}, + [1458] = {.lex_state = 83}, + [1459] = {.lex_state = 0}, + [1460] = {.lex_state = 83}, + [1461] = {.lex_state = 83}, + [1462] = {.lex_state = 83}, + [1463] = {.lex_state = 83}, + [1464] = {.lex_state = 33}, + [1465] = {.lex_state = 83}, +}; + +static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { + [0] = { + [ts_builtin_sym_end] = ACTIONS(1), + [sym_identifier] = ACTIONS(1), + [aux_sym_preproc_include_token1] = ACTIONS(1), + [aux_sym_preproc_def_token1] = ACTIONS(1), + [anon_sym_LPAREN] = ACTIONS(1), + [anon_sym_DOT_DOT_DOT] = ACTIONS(1), + [anon_sym_COMMA] = ACTIONS(1), + [anon_sym_RPAREN] = ACTIONS(1), + [aux_sym_preproc_if_token1] = ACTIONS(1), + [aux_sym_preproc_if_token2] = ACTIONS(1), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1), + [aux_sym_preproc_else_token1] = ACTIONS(1), + [aux_sym_preproc_elif_token1] = ACTIONS(1), + [sym_preproc_directive] = ACTIONS(1), + [anon_sym_LPAREN2] = ACTIONS(1), + [anon_sym_defined] = ACTIONS(1), + [anon_sym_BANG] = ACTIONS(1), + [anon_sym_TILDE] = ACTIONS(1), + [anon_sym_DASH] = ACTIONS(1), + [anon_sym_PLUS] = ACTIONS(1), + [anon_sym_STAR] = ACTIONS(1), + [anon_sym_SLASH] = ACTIONS(1), + [anon_sym_PERCENT] = ACTIONS(1), + [anon_sym_PIPE_PIPE] = ACTIONS(1), + [anon_sym_AMP_AMP] = ACTIONS(1), + [anon_sym_PIPE] = ACTIONS(1), + [anon_sym_CARET] = ACTIONS(1), + [anon_sym_AMP] = ACTIONS(1), + [anon_sym_EQ_EQ] = ACTIONS(1), + [anon_sym_BANG_EQ] = ACTIONS(1), + [anon_sym_GT] = ACTIONS(1), + [anon_sym_GT_EQ] = ACTIONS(1), + [anon_sym_LT_EQ] = ACTIONS(1), + [anon_sym_LT] = ACTIONS(1), + [anon_sym_LT_LT] = ACTIONS(1), + [anon_sym_GT_GT] = ACTIONS(1), + [anon_sym_SEMI] = ACTIONS(1), + [anon_sym_typedef] = ACTIONS(1), + [anon_sym_extern] = ACTIONS(1), + [anon_sym___attribute__] = ACTIONS(1), + [anon_sym_COLON_COLON] = ACTIONS(1), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1), + [anon_sym___declspec] = ACTIONS(1), + [anon_sym___based] = ACTIONS(1), + [anon_sym___cdecl] = ACTIONS(1), + [anon_sym___clrcall] = ACTIONS(1), + [anon_sym___stdcall] = ACTIONS(1), + [anon_sym___fastcall] = ACTIONS(1), + [anon_sym___thiscall] = ACTIONS(1), + [anon_sym___vectorcall] = ACTIONS(1), + [sym_ms_restrict_modifier] = ACTIONS(1), + [sym_ms_unsigned_ptr_modifier] = ACTIONS(1), + [sym_ms_signed_ptr_modifier] = ACTIONS(1), + [anon_sym__unaligned] = ACTIONS(1), + [anon_sym___unaligned] = ACTIONS(1), + [anon_sym_LBRACE] = ACTIONS(1), + [anon_sym_RBRACE] = ACTIONS(1), + [anon_sym_LBRACK] = ACTIONS(1), + [anon_sym_RBRACK] = ACTIONS(1), + [anon_sym_EQ] = ACTIONS(1), + [anon_sym_static] = ACTIONS(1), + [anon_sym_auto] = ACTIONS(1), + [anon_sym_register] = ACTIONS(1), + [anon_sym_inline] = ACTIONS(1), + [anon_sym_const] = ACTIONS(1), + [anon_sym_volatile] = ACTIONS(1), + [anon_sym_restrict] = ACTIONS(1), + [anon_sym__Atomic] = ACTIONS(1), + [anon_sym_signed] = ACTIONS(1), + [anon_sym_unsigned] = ACTIONS(1), + [anon_sym_long] = ACTIONS(1), + [anon_sym_short] = ACTIONS(1), + [sym_primitive_type] = ACTIONS(1), + [anon_sym_enum] = ACTIONS(1), + [anon_sym_struct] = ACTIONS(1), + [anon_sym_union] = ACTIONS(1), + [anon_sym_COLON] = ACTIONS(1), + [anon_sym_if] = ACTIONS(1), + [anon_sym_else] = ACTIONS(1), + [anon_sym_switch] = ACTIONS(1), + [anon_sym_case] = ACTIONS(1), + [anon_sym_default] = ACTIONS(1), + [anon_sym_while] = ACTIONS(1), + [anon_sym_do] = ACTIONS(1), + [anon_sym_for] = ACTIONS(1), + [anon_sym_return] = ACTIONS(1), + [anon_sym_break] = ACTIONS(1), + [anon_sym_continue] = ACTIONS(1), + [anon_sym_goto] = ACTIONS(1), + [anon_sym_QMARK] = ACTIONS(1), + [anon_sym_STAR_EQ] = ACTIONS(1), + [anon_sym_SLASH_EQ] = ACTIONS(1), + [anon_sym_PERCENT_EQ] = ACTIONS(1), + [anon_sym_PLUS_EQ] = ACTIONS(1), + [anon_sym_DASH_EQ] = ACTIONS(1), + [anon_sym_LT_LT_EQ] = ACTIONS(1), + [anon_sym_GT_GT_EQ] = ACTIONS(1), + [anon_sym_AMP_EQ] = ACTIONS(1), + [anon_sym_CARET_EQ] = ACTIONS(1), + [anon_sym_PIPE_EQ] = ACTIONS(1), + [anon_sym_DASH_DASH] = ACTIONS(1), + [anon_sym_PLUS_PLUS] = ACTIONS(1), + [anon_sym_sizeof] = ACTIONS(1), + [anon_sym_DOT] = ACTIONS(1), + [anon_sym_DASH_GT] = ACTIONS(1), + [sym_number_literal] = ACTIONS(1), + [anon_sym_L_SQUOTE] = ACTIONS(1), + [anon_sym_u_SQUOTE] = ACTIONS(1), + [anon_sym_U_SQUOTE] = ACTIONS(1), + [anon_sym_u8_SQUOTE] = ACTIONS(1), + [anon_sym_SQUOTE] = ACTIONS(1), + [anon_sym_L_DQUOTE] = ACTIONS(1), + [anon_sym_u_DQUOTE] = ACTIONS(1), + [anon_sym_U_DQUOTE] = ACTIONS(1), + [anon_sym_u8_DQUOTE] = ACTIONS(1), + [anon_sym_DQUOTE] = ACTIONS(1), + [sym_true] = ACTIONS(1), + [sym_false] = ACTIONS(1), + [sym_null] = ACTIONS(1), + [sym_comment] = ACTIONS(3), + }, + [1] = { + [sym_translation_unit] = STATE(1440), + [sym_preproc_include] = STATE(38), + [sym_preproc_def] = STATE(38), + [sym_preproc_function_def] = STATE(38), + [sym_preproc_call] = STATE(38), + [sym_preproc_if] = STATE(38), + [sym_preproc_ifdef] = STATE(38), + [sym_function_definition] = STATE(38), + [sym_declaration] = STATE(38), + [sym_type_definition] = STATE(38), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1003), + [sym_linkage_specification] = STATE(38), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(641), + [sym_compound_statement] = STATE(38), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(844), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(38), + [sym_labeled_statement] = STATE(38), + [sym_expression_statement] = STATE(38), + [sym_if_statement] = STATE(38), + [sym_switch_statement] = STATE(38), + [sym_case_statement] = STATE(38), + [sym_while_statement] = STATE(38), + [sym_do_statement] = STATE(38), + [sym_for_statement] = STATE(38), + [sym_return_statement] = STATE(38), + [sym_break_statement] = STATE(38), + [sym_continue_statement] = STATE(38), + [sym_goto_statement] = STATE(38), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(38), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(38), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [ts_builtin_sym_end] = ACTIONS(5), + [sym_identifier] = ACTIONS(7), + [aux_sym_preproc_include_token1] = ACTIONS(9), + [aux_sym_preproc_def_token1] = ACTIONS(11), + [aux_sym_preproc_if_token1] = ACTIONS(13), + [aux_sym_preproc_ifdef_token1] = ACTIONS(15), + [aux_sym_preproc_ifdef_token2] = ACTIONS(15), + [sym_preproc_directive] = ACTIONS(17), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_typedef] = ACTIONS(29), + [anon_sym_extern] = ACTIONS(31), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [2] = { + [sym_preproc_include] = STATE(5), + [sym_preproc_def] = STATE(5), + [sym_preproc_function_def] = STATE(5), + [sym_preproc_call] = STATE(5), + [sym_preproc_if] = STATE(5), + [sym_preproc_ifdef] = STATE(5), + [sym_preproc_else] = STATE(1302), + [sym_preproc_elif] = STATE(1302), + [sym_function_definition] = STATE(5), + [sym_declaration] = STATE(5), + [sym_type_definition] = STATE(5), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(5), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(5), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(5), + [sym_labeled_statement] = STATE(5), + [sym_expression_statement] = STATE(5), + [sym_if_statement] = STATE(5), + [sym_switch_statement] = STATE(5), + [sym_case_statement] = STATE(5), + [sym_while_statement] = STATE(5), + [sym_do_statement] = STATE(5), + [sym_for_statement] = STATE(5), + [sym_return_statement] = STATE(5), + [sym_break_statement] = STATE(5), + [sym_continue_statement] = STATE(5), + [sym_goto_statement] = STATE(5), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(5), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(5), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(99), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [3] = { + [sym_preproc_include] = STATE(12), + [sym_preproc_def] = STATE(12), + [sym_preproc_function_def] = STATE(12), + [sym_preproc_call] = STATE(12), + [sym_preproc_if] = STATE(12), + [sym_preproc_ifdef] = STATE(12), + [sym_preproc_else] = STATE(1293), + [sym_preproc_elif] = STATE(1293), + [sym_function_definition] = STATE(12), + [sym_declaration] = STATE(12), + [sym_type_definition] = STATE(12), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(12), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(12), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(12), + [sym_labeled_statement] = STATE(12), + [sym_expression_statement] = STATE(12), + [sym_if_statement] = STATE(12), + [sym_switch_statement] = STATE(12), + [sym_case_statement] = STATE(12), + [sym_while_statement] = STATE(12), + [sym_do_statement] = STATE(12), + [sym_for_statement] = STATE(12), + [sym_return_statement] = STATE(12), + [sym_break_statement] = STATE(12), + [sym_continue_statement] = STATE(12), + [sym_goto_statement] = STATE(12), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(12), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(12), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(139), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [4] = { + [sym_preproc_include] = STATE(10), + [sym_preproc_def] = STATE(10), + [sym_preproc_function_def] = STATE(10), + [sym_preproc_call] = STATE(10), + [sym_preproc_if] = STATE(10), + [sym_preproc_ifdef] = STATE(10), + [sym_preproc_else] = STATE(1394), + [sym_preproc_elif] = STATE(1394), + [sym_function_definition] = STATE(10), + [sym_declaration] = STATE(10), + [sym_type_definition] = STATE(10), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(10), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(10), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(10), + [sym_labeled_statement] = STATE(10), + [sym_expression_statement] = STATE(10), + [sym_if_statement] = STATE(10), + [sym_switch_statement] = STATE(10), + [sym_case_statement] = STATE(10), + [sym_while_statement] = STATE(10), + [sym_do_statement] = STATE(10), + [sym_for_statement] = STATE(10), + [sym_return_statement] = STATE(10), + [sym_break_statement] = STATE(10), + [sym_continue_statement] = STATE(10), + [sym_goto_statement] = STATE(10), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(10), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(10), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(141), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [5] = { + [sym_preproc_include] = STATE(20), + [sym_preproc_def] = STATE(20), + [sym_preproc_function_def] = STATE(20), + [sym_preproc_call] = STATE(20), + [sym_preproc_if] = STATE(20), + [sym_preproc_ifdef] = STATE(20), + [sym_preproc_else] = STATE(1289), + [sym_preproc_elif] = STATE(1289), + [sym_function_definition] = STATE(20), + [sym_declaration] = STATE(20), + [sym_type_definition] = STATE(20), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(20), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(20), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(20), + [sym_labeled_statement] = STATE(20), + [sym_expression_statement] = STATE(20), + [sym_if_statement] = STATE(20), + [sym_switch_statement] = STATE(20), + [sym_case_statement] = STATE(20), + [sym_while_statement] = STATE(20), + [sym_do_statement] = STATE(20), + [sym_for_statement] = STATE(20), + [sym_return_statement] = STATE(20), + [sym_break_statement] = STATE(20), + [sym_continue_statement] = STATE(20), + [sym_goto_statement] = STATE(20), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(20), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(20), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(143), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [6] = { + [sym_preproc_include] = STATE(20), + [sym_preproc_def] = STATE(20), + [sym_preproc_function_def] = STATE(20), + [sym_preproc_call] = STATE(20), + [sym_preproc_if] = STATE(20), + [sym_preproc_ifdef] = STATE(20), + [sym_preproc_else] = STATE(1311), + [sym_preproc_elif] = STATE(1311), + [sym_function_definition] = STATE(20), + [sym_declaration] = STATE(20), + [sym_type_definition] = STATE(20), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(20), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(20), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(20), + [sym_labeled_statement] = STATE(20), + [sym_expression_statement] = STATE(20), + [sym_if_statement] = STATE(20), + [sym_switch_statement] = STATE(20), + [sym_case_statement] = STATE(20), + [sym_while_statement] = STATE(20), + [sym_do_statement] = STATE(20), + [sym_for_statement] = STATE(20), + [sym_return_statement] = STATE(20), + [sym_break_statement] = STATE(20), + [sym_continue_statement] = STATE(20), + [sym_goto_statement] = STATE(20), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(20), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(20), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(145), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [7] = { + [sym_preproc_include] = STATE(20), + [sym_preproc_def] = STATE(20), + [sym_preproc_function_def] = STATE(20), + [sym_preproc_call] = STATE(20), + [sym_preproc_if] = STATE(20), + [sym_preproc_ifdef] = STATE(20), + [sym_preproc_else] = STATE(1427), + [sym_preproc_elif] = STATE(1427), + [sym_function_definition] = STATE(20), + [sym_declaration] = STATE(20), + [sym_type_definition] = STATE(20), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(20), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(20), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(20), + [sym_labeled_statement] = STATE(20), + [sym_expression_statement] = STATE(20), + [sym_if_statement] = STATE(20), + [sym_switch_statement] = STATE(20), + [sym_case_statement] = STATE(20), + [sym_while_statement] = STATE(20), + [sym_do_statement] = STATE(20), + [sym_for_statement] = STATE(20), + [sym_return_statement] = STATE(20), + [sym_break_statement] = STATE(20), + [sym_continue_statement] = STATE(20), + [sym_goto_statement] = STATE(20), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(20), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(20), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(147), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [8] = { + [sym_preproc_include] = STATE(13), + [sym_preproc_def] = STATE(13), + [sym_preproc_function_def] = STATE(13), + [sym_preproc_call] = STATE(13), + [sym_preproc_if] = STATE(13), + [sym_preproc_ifdef] = STATE(13), + [sym_preproc_else] = STATE(1331), + [sym_preproc_elif] = STATE(1331), + [sym_function_definition] = STATE(13), + [sym_declaration] = STATE(13), + [sym_type_definition] = STATE(13), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(13), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(13), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(13), + [sym_labeled_statement] = STATE(13), + [sym_expression_statement] = STATE(13), + [sym_if_statement] = STATE(13), + [sym_switch_statement] = STATE(13), + [sym_case_statement] = STATE(13), + [sym_while_statement] = STATE(13), + [sym_do_statement] = STATE(13), + [sym_for_statement] = STATE(13), + [sym_return_statement] = STATE(13), + [sym_break_statement] = STATE(13), + [sym_continue_statement] = STATE(13), + [sym_goto_statement] = STATE(13), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(13), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(13), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(149), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [9] = { + [sym_preproc_include] = STATE(20), + [sym_preproc_def] = STATE(20), + [sym_preproc_function_def] = STATE(20), + [sym_preproc_call] = STATE(20), + [sym_preproc_if] = STATE(20), + [sym_preproc_ifdef] = STATE(20), + [sym_preproc_else] = STATE(1397), + [sym_preproc_elif] = STATE(1397), + [sym_function_definition] = STATE(20), + [sym_declaration] = STATE(20), + [sym_type_definition] = STATE(20), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(20), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(20), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(20), + [sym_labeled_statement] = STATE(20), + [sym_expression_statement] = STATE(20), + [sym_if_statement] = STATE(20), + [sym_switch_statement] = STATE(20), + [sym_case_statement] = STATE(20), + [sym_while_statement] = STATE(20), + [sym_do_statement] = STATE(20), + [sym_for_statement] = STATE(20), + [sym_return_statement] = STATE(20), + [sym_break_statement] = STATE(20), + [sym_continue_statement] = STATE(20), + [sym_goto_statement] = STATE(20), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(20), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(20), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(151), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [10] = { + [sym_preproc_include] = STATE(20), + [sym_preproc_def] = STATE(20), + [sym_preproc_function_def] = STATE(20), + [sym_preproc_call] = STATE(20), + [sym_preproc_if] = STATE(20), + [sym_preproc_ifdef] = STATE(20), + [sym_preproc_else] = STATE(1352), + [sym_preproc_elif] = STATE(1352), + [sym_function_definition] = STATE(20), + [sym_declaration] = STATE(20), + [sym_type_definition] = STATE(20), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(20), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(20), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(20), + [sym_labeled_statement] = STATE(20), + [sym_expression_statement] = STATE(20), + [sym_if_statement] = STATE(20), + [sym_switch_statement] = STATE(20), + [sym_case_statement] = STATE(20), + [sym_while_statement] = STATE(20), + [sym_do_statement] = STATE(20), + [sym_for_statement] = STATE(20), + [sym_return_statement] = STATE(20), + [sym_break_statement] = STATE(20), + [sym_continue_statement] = STATE(20), + [sym_goto_statement] = STATE(20), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(20), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(20), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(153), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [11] = { + [sym_preproc_include] = STATE(9), + [sym_preproc_def] = STATE(9), + [sym_preproc_function_def] = STATE(9), + [sym_preproc_call] = STATE(9), + [sym_preproc_if] = STATE(9), + [sym_preproc_ifdef] = STATE(9), + [sym_preproc_else] = STATE(1411), + [sym_preproc_elif] = STATE(1411), + [sym_function_definition] = STATE(9), + [sym_declaration] = STATE(9), + [sym_type_definition] = STATE(9), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(9), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(9), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(9), + [sym_labeled_statement] = STATE(9), + [sym_expression_statement] = STATE(9), + [sym_if_statement] = STATE(9), + [sym_switch_statement] = STATE(9), + [sym_case_statement] = STATE(9), + [sym_while_statement] = STATE(9), + [sym_do_statement] = STATE(9), + [sym_for_statement] = STATE(9), + [sym_return_statement] = STATE(9), + [sym_break_statement] = STATE(9), + [sym_continue_statement] = STATE(9), + [sym_goto_statement] = STATE(9), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(9), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(9), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(155), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [12] = { + [sym_preproc_include] = STATE(20), + [sym_preproc_def] = STATE(20), + [sym_preproc_function_def] = STATE(20), + [sym_preproc_call] = STATE(20), + [sym_preproc_if] = STATE(20), + [sym_preproc_ifdef] = STATE(20), + [sym_preproc_else] = STATE(1274), + [sym_preproc_elif] = STATE(1274), + [sym_function_definition] = STATE(20), + [sym_declaration] = STATE(20), + [sym_type_definition] = STATE(20), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(20), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(20), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(20), + [sym_labeled_statement] = STATE(20), + [sym_expression_statement] = STATE(20), + [sym_if_statement] = STATE(20), + [sym_switch_statement] = STATE(20), + [sym_case_statement] = STATE(20), + [sym_while_statement] = STATE(20), + [sym_do_statement] = STATE(20), + [sym_for_statement] = STATE(20), + [sym_return_statement] = STATE(20), + [sym_break_statement] = STATE(20), + [sym_continue_statement] = STATE(20), + [sym_goto_statement] = STATE(20), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(20), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(20), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(157), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [13] = { + [sym_preproc_include] = STATE(20), + [sym_preproc_def] = STATE(20), + [sym_preproc_function_def] = STATE(20), + [sym_preproc_call] = STATE(20), + [sym_preproc_if] = STATE(20), + [sym_preproc_ifdef] = STATE(20), + [sym_preproc_else] = STATE(1402), + [sym_preproc_elif] = STATE(1402), + [sym_function_definition] = STATE(20), + [sym_declaration] = STATE(20), + [sym_type_definition] = STATE(20), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(20), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(20), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(20), + [sym_labeled_statement] = STATE(20), + [sym_expression_statement] = STATE(20), + [sym_if_statement] = STATE(20), + [sym_switch_statement] = STATE(20), + [sym_case_statement] = STATE(20), + [sym_while_statement] = STATE(20), + [sym_do_statement] = STATE(20), + [sym_for_statement] = STATE(20), + [sym_return_statement] = STATE(20), + [sym_break_statement] = STATE(20), + [sym_continue_statement] = STATE(20), + [sym_goto_statement] = STATE(20), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(20), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(20), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(159), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [14] = { + [sym_preproc_include] = STATE(20), + [sym_preproc_def] = STATE(20), + [sym_preproc_function_def] = STATE(20), + [sym_preproc_call] = STATE(20), + [sym_preproc_if] = STATE(20), + [sym_preproc_ifdef] = STATE(20), + [sym_preproc_else] = STATE(1409), + [sym_preproc_elif] = STATE(1409), + [sym_function_definition] = STATE(20), + [sym_declaration] = STATE(20), + [sym_type_definition] = STATE(20), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(20), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(20), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(20), + [sym_labeled_statement] = STATE(20), + [sym_expression_statement] = STATE(20), + [sym_if_statement] = STATE(20), + [sym_switch_statement] = STATE(20), + [sym_case_statement] = STATE(20), + [sym_while_statement] = STATE(20), + [sym_do_statement] = STATE(20), + [sym_for_statement] = STATE(20), + [sym_return_statement] = STATE(20), + [sym_break_statement] = STATE(20), + [sym_continue_statement] = STATE(20), + [sym_goto_statement] = STATE(20), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(20), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(20), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(161), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [15] = { + [sym_preproc_include] = STATE(7), + [sym_preproc_def] = STATE(7), + [sym_preproc_function_def] = STATE(7), + [sym_preproc_call] = STATE(7), + [sym_preproc_if] = STATE(7), + [sym_preproc_ifdef] = STATE(7), + [sym_preproc_else] = STATE(1391), + [sym_preproc_elif] = STATE(1391), + [sym_function_definition] = STATE(7), + [sym_declaration] = STATE(7), + [sym_type_definition] = STATE(7), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(7), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(7), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(7), + [sym_labeled_statement] = STATE(7), + [sym_expression_statement] = STATE(7), + [sym_if_statement] = STATE(7), + [sym_switch_statement] = STATE(7), + [sym_case_statement] = STATE(7), + [sym_while_statement] = STATE(7), + [sym_do_statement] = STATE(7), + [sym_for_statement] = STATE(7), + [sym_return_statement] = STATE(7), + [sym_break_statement] = STATE(7), + [sym_continue_statement] = STATE(7), + [sym_goto_statement] = STATE(7), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(7), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(7), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(163), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [16] = { + [sym_preproc_include] = STATE(6), + [sym_preproc_def] = STATE(6), + [sym_preproc_function_def] = STATE(6), + [sym_preproc_call] = STATE(6), + [sym_preproc_if] = STATE(6), + [sym_preproc_ifdef] = STATE(6), + [sym_preproc_else] = STATE(1353), + [sym_preproc_elif] = STATE(1353), + [sym_function_definition] = STATE(6), + [sym_declaration] = STATE(6), + [sym_type_definition] = STATE(6), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(6), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(6), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(6), + [sym_labeled_statement] = STATE(6), + [sym_expression_statement] = STATE(6), + [sym_if_statement] = STATE(6), + [sym_switch_statement] = STATE(6), + [sym_case_statement] = STATE(6), + [sym_while_statement] = STATE(6), + [sym_do_statement] = STATE(6), + [sym_for_statement] = STATE(6), + [sym_return_statement] = STATE(6), + [sym_break_statement] = STATE(6), + [sym_continue_statement] = STATE(6), + [sym_goto_statement] = STATE(6), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(6), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(6), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(165), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [17] = { + [sym_preproc_include] = STATE(19), + [sym_preproc_def] = STATE(19), + [sym_preproc_function_def] = STATE(19), + [sym_preproc_call] = STATE(19), + [sym_preproc_if] = STATE(19), + [sym_preproc_ifdef] = STATE(19), + [sym_preproc_else] = STATE(1403), + [sym_preproc_elif] = STATE(1403), + [sym_function_definition] = STATE(19), + [sym_declaration] = STATE(19), + [sym_type_definition] = STATE(19), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(19), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(19), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(19), + [sym_labeled_statement] = STATE(19), + [sym_expression_statement] = STATE(19), + [sym_if_statement] = STATE(19), + [sym_switch_statement] = STATE(19), + [sym_case_statement] = STATE(19), + [sym_while_statement] = STATE(19), + [sym_do_statement] = STATE(19), + [sym_for_statement] = STATE(19), + [sym_return_statement] = STATE(19), + [sym_break_statement] = STATE(19), + [sym_continue_statement] = STATE(19), + [sym_goto_statement] = STATE(19), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(19), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(19), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(167), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [18] = { + [sym_preproc_include] = STATE(14), + [sym_preproc_def] = STATE(14), + [sym_preproc_function_def] = STATE(14), + [sym_preproc_call] = STATE(14), + [sym_preproc_if] = STATE(14), + [sym_preproc_ifdef] = STATE(14), + [sym_preproc_else] = STATE(1338), + [sym_preproc_elif] = STATE(1338), + [sym_function_definition] = STATE(14), + [sym_declaration] = STATE(14), + [sym_type_definition] = STATE(14), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(14), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(14), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(14), + [sym_labeled_statement] = STATE(14), + [sym_expression_statement] = STATE(14), + [sym_if_statement] = STATE(14), + [sym_switch_statement] = STATE(14), + [sym_case_statement] = STATE(14), + [sym_while_statement] = STATE(14), + [sym_do_statement] = STATE(14), + [sym_for_statement] = STATE(14), + [sym_return_statement] = STATE(14), + [sym_break_statement] = STATE(14), + [sym_continue_statement] = STATE(14), + [sym_goto_statement] = STATE(14), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(14), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(14), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(169), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [19] = { + [sym_preproc_include] = STATE(20), + [sym_preproc_def] = STATE(20), + [sym_preproc_function_def] = STATE(20), + [sym_preproc_call] = STATE(20), + [sym_preproc_if] = STATE(20), + [sym_preproc_ifdef] = STATE(20), + [sym_preproc_else] = STATE(1375), + [sym_preproc_elif] = STATE(1375), + [sym_function_definition] = STATE(20), + [sym_declaration] = STATE(20), + [sym_type_definition] = STATE(20), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(20), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(20), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(20), + [sym_labeled_statement] = STATE(20), + [sym_expression_statement] = STATE(20), + [sym_if_statement] = STATE(20), + [sym_switch_statement] = STATE(20), + [sym_case_statement] = STATE(20), + [sym_while_statement] = STATE(20), + [sym_do_statement] = STATE(20), + [sym_for_statement] = STATE(20), + [sym_return_statement] = STATE(20), + [sym_break_statement] = STATE(20), + [sym_continue_statement] = STATE(20), + [sym_goto_statement] = STATE(20), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(20), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(20), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(91), + [aux_sym_preproc_include_token1] = ACTIONS(93), + [aux_sym_preproc_def_token1] = ACTIONS(95), + [aux_sym_preproc_if_token1] = ACTIONS(97), + [aux_sym_preproc_if_token2] = ACTIONS(171), + [aux_sym_preproc_ifdef_token1] = ACTIONS(101), + [aux_sym_preproc_ifdef_token2] = ACTIONS(101), + [aux_sym_preproc_else_token1] = ACTIONS(103), + [aux_sym_preproc_elif_token1] = ACTIONS(105), + [sym_preproc_directive] = ACTIONS(107), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(113), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [20] = { + [sym_preproc_include] = STATE(20), + [sym_preproc_def] = STATE(20), + [sym_preproc_function_def] = STATE(20), + [sym_preproc_call] = STATE(20), + [sym_preproc_if] = STATE(20), + [sym_preproc_ifdef] = STATE(20), + [sym_function_definition] = STATE(20), + [sym_declaration] = STATE(20), + [sym_type_definition] = STATE(20), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1008), + [sym_linkage_specification] = STATE(20), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(643), + [sym_compound_statement] = STATE(20), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(847), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(20), + [sym_labeled_statement] = STATE(20), + [sym_expression_statement] = STATE(20), + [sym_if_statement] = STATE(20), + [sym_switch_statement] = STATE(20), + [sym_case_statement] = STATE(20), + [sym_while_statement] = STATE(20), + [sym_do_statement] = STATE(20), + [sym_for_statement] = STATE(20), + [sym_return_statement] = STATE(20), + [sym_break_statement] = STATE(20), + [sym_continue_statement] = STATE(20), + [sym_goto_statement] = STATE(20), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(20), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(20), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(173), + [aux_sym_preproc_include_token1] = ACTIONS(176), + [aux_sym_preproc_def_token1] = ACTIONS(179), + [aux_sym_preproc_if_token1] = ACTIONS(182), + [aux_sym_preproc_if_token2] = ACTIONS(185), + [aux_sym_preproc_ifdef_token1] = ACTIONS(187), + [aux_sym_preproc_ifdef_token2] = ACTIONS(187), + [aux_sym_preproc_else_token1] = ACTIONS(185), + [aux_sym_preproc_elif_token1] = ACTIONS(185), + [sym_preproc_directive] = ACTIONS(190), + [anon_sym_LPAREN2] = ACTIONS(193), + [anon_sym_BANG] = ACTIONS(196), + [anon_sym_TILDE] = ACTIONS(196), + [anon_sym_DASH] = ACTIONS(199), + [anon_sym_PLUS] = ACTIONS(199), + [anon_sym_STAR] = ACTIONS(202), + [anon_sym_AMP] = ACTIONS(202), + [anon_sym_SEMI] = ACTIONS(205), + [anon_sym_typedef] = ACTIONS(208), + [anon_sym_extern] = ACTIONS(211), + [anon_sym___attribute__] = ACTIONS(214), + [anon_sym_LBRACK_LBRACK] = ACTIONS(217), + [anon_sym___declspec] = ACTIONS(220), + [anon_sym___cdecl] = ACTIONS(223), + [anon_sym___clrcall] = ACTIONS(223), + [anon_sym___stdcall] = ACTIONS(223), + [anon_sym___fastcall] = ACTIONS(223), + [anon_sym___thiscall] = ACTIONS(223), + [anon_sym___vectorcall] = ACTIONS(223), + [anon_sym_LBRACE] = ACTIONS(226), + [anon_sym_static] = ACTIONS(229), + [anon_sym_auto] = ACTIONS(229), + [anon_sym_register] = ACTIONS(229), + [anon_sym_inline] = ACTIONS(229), + [anon_sym_const] = ACTIONS(232), + [anon_sym_volatile] = ACTIONS(232), + [anon_sym_restrict] = ACTIONS(232), + [anon_sym__Atomic] = ACTIONS(232), + [anon_sym_signed] = ACTIONS(235), + [anon_sym_unsigned] = ACTIONS(235), + [anon_sym_long] = ACTIONS(235), + [anon_sym_short] = ACTIONS(235), + [sym_primitive_type] = ACTIONS(238), + [anon_sym_enum] = ACTIONS(241), + [anon_sym_struct] = ACTIONS(244), + [anon_sym_union] = ACTIONS(247), + [anon_sym_if] = ACTIONS(250), + [anon_sym_switch] = ACTIONS(253), + [anon_sym_case] = ACTIONS(256), + [anon_sym_default] = ACTIONS(259), + [anon_sym_while] = ACTIONS(262), + [anon_sym_do] = ACTIONS(265), + [anon_sym_for] = ACTIONS(268), + [anon_sym_return] = ACTIONS(271), + [anon_sym_break] = ACTIONS(274), + [anon_sym_continue] = ACTIONS(277), + [anon_sym_goto] = ACTIONS(280), + [anon_sym_DASH_DASH] = ACTIONS(283), + [anon_sym_PLUS_PLUS] = ACTIONS(283), + [anon_sym_sizeof] = ACTIONS(286), + [sym_number_literal] = ACTIONS(289), + [anon_sym_L_SQUOTE] = ACTIONS(292), + [anon_sym_u_SQUOTE] = ACTIONS(292), + [anon_sym_U_SQUOTE] = ACTIONS(292), + [anon_sym_u8_SQUOTE] = ACTIONS(292), + [anon_sym_SQUOTE] = ACTIONS(292), + [anon_sym_L_DQUOTE] = ACTIONS(295), + [anon_sym_u_DQUOTE] = ACTIONS(295), + [anon_sym_U_DQUOTE] = ACTIONS(295), + [anon_sym_u8_DQUOTE] = ACTIONS(295), + [anon_sym_DQUOTE] = ACTIONS(295), + [sym_true] = ACTIONS(298), + [sym_false] = ACTIONS(298), + [sym_null] = ACTIONS(298), + [sym_comment] = ACTIONS(3), + }, + [21] = { + [sym_preproc_include] = STATE(26), + [sym_preproc_def] = STATE(26), + [sym_preproc_function_def] = STATE(26), + [sym_preproc_call] = STATE(26), + [sym_preproc_if] = STATE(26), + [sym_preproc_ifdef] = STATE(26), + [sym_function_definition] = STATE(26), + [sym_declaration] = STATE(26), + [sym_type_definition] = STATE(26), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1004), + [sym_linkage_specification] = STATE(26), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(642), + [sym_compound_statement] = STATE(26), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(846), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(26), + [sym_labeled_statement] = STATE(26), + [sym_expression_statement] = STATE(26), + [sym_if_statement] = STATE(26), + [sym_switch_statement] = STATE(26), + [sym_case_statement] = STATE(26), + [sym_while_statement] = STATE(26), + [sym_do_statement] = STATE(26), + [sym_for_statement] = STATE(26), + [sym_return_statement] = STATE(26), + [sym_break_statement] = STATE(26), + [sym_continue_statement] = STATE(26), + [sym_goto_statement] = STATE(26), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(26), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(26), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(301), + [aux_sym_preproc_include_token1] = ACTIONS(303), + [aux_sym_preproc_def_token1] = ACTIONS(305), + [aux_sym_preproc_if_token1] = ACTIONS(307), + [aux_sym_preproc_ifdef_token1] = ACTIONS(309), + [aux_sym_preproc_ifdef_token2] = ACTIONS(309), + [sym_preproc_directive] = ACTIONS(311), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(317), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(321), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [22] = { + [sym_preproc_include] = STATE(36), + [sym_preproc_def] = STATE(36), + [sym_preproc_function_def] = STATE(36), + [sym_preproc_call] = STATE(36), + [sym_preproc_if] = STATE(36), + [sym_preproc_ifdef] = STATE(36), + [sym_function_definition] = STATE(36), + [sym_declaration] = STATE(36), + [sym_type_definition] = STATE(36), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1004), + [sym_linkage_specification] = STATE(36), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(642), + [sym_compound_statement] = STATE(36), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(846), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(36), + [sym_labeled_statement] = STATE(36), + [sym_expression_statement] = STATE(36), + [sym_if_statement] = STATE(36), + [sym_switch_statement] = STATE(36), + [sym_case_statement] = STATE(36), + [sym_while_statement] = STATE(36), + [sym_do_statement] = STATE(36), + [sym_for_statement] = STATE(36), + [sym_return_statement] = STATE(36), + [sym_break_statement] = STATE(36), + [sym_continue_statement] = STATE(36), + [sym_goto_statement] = STATE(36), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(36), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(36), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(301), + [aux_sym_preproc_include_token1] = ACTIONS(303), + [aux_sym_preproc_def_token1] = ACTIONS(305), + [aux_sym_preproc_if_token1] = ACTIONS(307), + [aux_sym_preproc_ifdef_token1] = ACTIONS(309), + [aux_sym_preproc_ifdef_token2] = ACTIONS(309), + [sym_preproc_directive] = ACTIONS(311), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(317), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(345), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [23] = { + [sym_preproc_include] = STATE(23), + [sym_preproc_def] = STATE(23), + [sym_preproc_function_def] = STATE(23), + [sym_preproc_call] = STATE(23), + [sym_preproc_if] = STATE(23), + [sym_preproc_ifdef] = STATE(23), + [sym_function_definition] = STATE(23), + [sym_declaration] = STATE(23), + [sym_type_definition] = STATE(23), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1012), + [sym_linkage_specification] = STATE(23), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(644), + [sym_compound_statement] = STATE(23), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(845), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(23), + [sym_labeled_statement] = STATE(23), + [sym_expression_statement] = STATE(23), + [sym_if_statement] = STATE(23), + [sym_switch_statement] = STATE(23), + [sym_case_statement] = STATE(23), + [sym_while_statement] = STATE(23), + [sym_do_statement] = STATE(23), + [sym_for_statement] = STATE(23), + [sym_return_statement] = STATE(23), + [sym_break_statement] = STATE(23), + [sym_continue_statement] = STATE(23), + [sym_goto_statement] = STATE(23), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(23), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(23), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(347), + [aux_sym_preproc_include_token1] = ACTIONS(350), + [aux_sym_preproc_def_token1] = ACTIONS(353), + [aux_sym_preproc_if_token1] = ACTIONS(356), + [aux_sym_preproc_if_token2] = ACTIONS(185), + [aux_sym_preproc_ifdef_token1] = ACTIONS(359), + [aux_sym_preproc_ifdef_token2] = ACTIONS(359), + [sym_preproc_directive] = ACTIONS(362), + [anon_sym_LPAREN2] = ACTIONS(193), + [anon_sym_BANG] = ACTIONS(196), + [anon_sym_TILDE] = ACTIONS(196), + [anon_sym_DASH] = ACTIONS(199), + [anon_sym_PLUS] = ACTIONS(199), + [anon_sym_STAR] = ACTIONS(202), + [anon_sym_AMP] = ACTIONS(202), + [anon_sym_SEMI] = ACTIONS(365), + [anon_sym_typedef] = ACTIONS(368), + [anon_sym_extern] = ACTIONS(371), + [anon_sym___attribute__] = ACTIONS(214), + [anon_sym_LBRACK_LBRACK] = ACTIONS(217), + [anon_sym___declspec] = ACTIONS(220), + [anon_sym___cdecl] = ACTIONS(223), + [anon_sym___clrcall] = ACTIONS(223), + [anon_sym___stdcall] = ACTIONS(223), + [anon_sym___fastcall] = ACTIONS(223), + [anon_sym___thiscall] = ACTIONS(223), + [anon_sym___vectorcall] = ACTIONS(223), + [anon_sym_LBRACE] = ACTIONS(374), + [anon_sym_static] = ACTIONS(229), + [anon_sym_auto] = ACTIONS(229), + [anon_sym_register] = ACTIONS(229), + [anon_sym_inline] = ACTIONS(229), + [anon_sym_const] = ACTIONS(232), + [anon_sym_volatile] = ACTIONS(232), + [anon_sym_restrict] = ACTIONS(232), + [anon_sym__Atomic] = ACTIONS(232), + [anon_sym_signed] = ACTIONS(235), + [anon_sym_unsigned] = ACTIONS(235), + [anon_sym_long] = ACTIONS(235), + [anon_sym_short] = ACTIONS(235), + [sym_primitive_type] = ACTIONS(238), + [anon_sym_enum] = ACTIONS(241), + [anon_sym_struct] = ACTIONS(244), + [anon_sym_union] = ACTIONS(247), + [anon_sym_if] = ACTIONS(377), + [anon_sym_switch] = ACTIONS(380), + [anon_sym_case] = ACTIONS(383), + [anon_sym_default] = ACTIONS(386), + [anon_sym_while] = ACTIONS(389), + [anon_sym_do] = ACTIONS(392), + [anon_sym_for] = ACTIONS(395), + [anon_sym_return] = ACTIONS(398), + [anon_sym_break] = ACTIONS(401), + [anon_sym_continue] = ACTIONS(404), + [anon_sym_goto] = ACTIONS(407), + [anon_sym_DASH_DASH] = ACTIONS(283), + [anon_sym_PLUS_PLUS] = ACTIONS(283), + [anon_sym_sizeof] = ACTIONS(286), + [sym_number_literal] = ACTIONS(289), + [anon_sym_L_SQUOTE] = ACTIONS(292), + [anon_sym_u_SQUOTE] = ACTIONS(292), + [anon_sym_U_SQUOTE] = ACTIONS(292), + [anon_sym_u8_SQUOTE] = ACTIONS(292), + [anon_sym_SQUOTE] = ACTIONS(292), + [anon_sym_L_DQUOTE] = ACTIONS(295), + [anon_sym_u_DQUOTE] = ACTIONS(295), + [anon_sym_U_DQUOTE] = ACTIONS(295), + [anon_sym_u8_DQUOTE] = ACTIONS(295), + [anon_sym_DQUOTE] = ACTIONS(295), + [sym_true] = ACTIONS(298), + [sym_false] = ACTIONS(298), + [sym_null] = ACTIONS(298), + [sym_comment] = ACTIONS(3), + }, + [24] = { + [sym_preproc_include] = STATE(29), + [sym_preproc_def] = STATE(29), + [sym_preproc_function_def] = STATE(29), + [sym_preproc_call] = STATE(29), + [sym_preproc_if] = STATE(29), + [sym_preproc_ifdef] = STATE(29), + [sym_function_definition] = STATE(29), + [sym_declaration] = STATE(29), + [sym_type_definition] = STATE(29), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1004), + [sym_linkage_specification] = STATE(29), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(642), + [sym_compound_statement] = STATE(29), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(846), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(29), + [sym_labeled_statement] = STATE(29), + [sym_expression_statement] = STATE(29), + [sym_if_statement] = STATE(29), + [sym_switch_statement] = STATE(29), + [sym_case_statement] = STATE(29), + [sym_while_statement] = STATE(29), + [sym_do_statement] = STATE(29), + [sym_for_statement] = STATE(29), + [sym_return_statement] = STATE(29), + [sym_break_statement] = STATE(29), + [sym_continue_statement] = STATE(29), + [sym_goto_statement] = STATE(29), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(29), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(29), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(301), + [aux_sym_preproc_include_token1] = ACTIONS(303), + [aux_sym_preproc_def_token1] = ACTIONS(305), + [aux_sym_preproc_if_token1] = ACTIONS(307), + [aux_sym_preproc_ifdef_token1] = ACTIONS(309), + [aux_sym_preproc_ifdef_token2] = ACTIONS(309), + [sym_preproc_directive] = ACTIONS(311), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(317), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(410), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [25] = { + [sym_preproc_include] = STATE(32), + [sym_preproc_def] = STATE(32), + [sym_preproc_function_def] = STATE(32), + [sym_preproc_call] = STATE(32), + [sym_preproc_if] = STATE(32), + [sym_preproc_ifdef] = STATE(32), + [sym_function_definition] = STATE(32), + [sym_declaration] = STATE(32), + [sym_type_definition] = STATE(32), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1004), + [sym_linkage_specification] = STATE(32), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(642), + [sym_compound_statement] = STATE(32), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(846), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(32), + [sym_labeled_statement] = STATE(32), + [sym_expression_statement] = STATE(32), + [sym_if_statement] = STATE(32), + [sym_switch_statement] = STATE(32), + [sym_case_statement] = STATE(32), + [sym_while_statement] = STATE(32), + [sym_do_statement] = STATE(32), + [sym_for_statement] = STATE(32), + [sym_return_statement] = STATE(32), + [sym_break_statement] = STATE(32), + [sym_continue_statement] = STATE(32), + [sym_goto_statement] = STATE(32), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(32), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(32), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(301), + [aux_sym_preproc_include_token1] = ACTIONS(303), + [aux_sym_preproc_def_token1] = ACTIONS(305), + [aux_sym_preproc_if_token1] = ACTIONS(307), + [aux_sym_preproc_ifdef_token1] = ACTIONS(309), + [aux_sym_preproc_ifdef_token2] = ACTIONS(309), + [sym_preproc_directive] = ACTIONS(311), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(317), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(412), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [26] = { + [sym_preproc_include] = STATE(36), + [sym_preproc_def] = STATE(36), + [sym_preproc_function_def] = STATE(36), + [sym_preproc_call] = STATE(36), + [sym_preproc_if] = STATE(36), + [sym_preproc_ifdef] = STATE(36), + [sym_function_definition] = STATE(36), + [sym_declaration] = STATE(36), + [sym_type_definition] = STATE(36), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1004), + [sym_linkage_specification] = STATE(36), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(642), + [sym_compound_statement] = STATE(36), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(846), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(36), + [sym_labeled_statement] = STATE(36), + [sym_expression_statement] = STATE(36), + [sym_if_statement] = STATE(36), + [sym_switch_statement] = STATE(36), + [sym_case_statement] = STATE(36), + [sym_while_statement] = STATE(36), + [sym_do_statement] = STATE(36), + [sym_for_statement] = STATE(36), + [sym_return_statement] = STATE(36), + [sym_break_statement] = STATE(36), + [sym_continue_statement] = STATE(36), + [sym_goto_statement] = STATE(36), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(36), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(36), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(301), + [aux_sym_preproc_include_token1] = ACTIONS(303), + [aux_sym_preproc_def_token1] = ACTIONS(305), + [aux_sym_preproc_if_token1] = ACTIONS(307), + [aux_sym_preproc_ifdef_token1] = ACTIONS(309), + [aux_sym_preproc_ifdef_token2] = ACTIONS(309), + [sym_preproc_directive] = ACTIONS(311), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(317), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(414), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [27] = { + [sym_preproc_include] = STATE(34), + [sym_preproc_def] = STATE(34), + [sym_preproc_function_def] = STATE(34), + [sym_preproc_call] = STATE(34), + [sym_preproc_if] = STATE(34), + [sym_preproc_ifdef] = STATE(34), + [sym_function_definition] = STATE(34), + [sym_declaration] = STATE(34), + [sym_type_definition] = STATE(34), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1004), + [sym_linkage_specification] = STATE(34), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(642), + [sym_compound_statement] = STATE(34), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(846), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(34), + [sym_labeled_statement] = STATE(34), + [sym_expression_statement] = STATE(34), + [sym_if_statement] = STATE(34), + [sym_switch_statement] = STATE(34), + [sym_case_statement] = STATE(34), + [sym_while_statement] = STATE(34), + [sym_do_statement] = STATE(34), + [sym_for_statement] = STATE(34), + [sym_return_statement] = STATE(34), + [sym_break_statement] = STATE(34), + [sym_continue_statement] = STATE(34), + [sym_goto_statement] = STATE(34), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(34), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(34), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(301), + [aux_sym_preproc_include_token1] = ACTIONS(303), + [aux_sym_preproc_def_token1] = ACTIONS(305), + [aux_sym_preproc_if_token1] = ACTIONS(307), + [aux_sym_preproc_ifdef_token1] = ACTIONS(309), + [aux_sym_preproc_ifdef_token2] = ACTIONS(309), + [sym_preproc_directive] = ACTIONS(311), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(317), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(416), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [28] = { + [sym_preproc_include] = STATE(28), + [sym_preproc_def] = STATE(28), + [sym_preproc_function_def] = STATE(28), + [sym_preproc_call] = STATE(28), + [sym_preproc_if] = STATE(28), + [sym_preproc_ifdef] = STATE(28), + [sym_function_definition] = STATE(28), + [sym_declaration] = STATE(28), + [sym_type_definition] = STATE(28), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1003), + [sym_linkage_specification] = STATE(28), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(641), + [sym_compound_statement] = STATE(28), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(844), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(28), + [sym_labeled_statement] = STATE(28), + [sym_expression_statement] = STATE(28), + [sym_if_statement] = STATE(28), + [sym_switch_statement] = STATE(28), + [sym_case_statement] = STATE(28), + [sym_while_statement] = STATE(28), + [sym_do_statement] = STATE(28), + [sym_for_statement] = STATE(28), + [sym_return_statement] = STATE(28), + [sym_break_statement] = STATE(28), + [sym_continue_statement] = STATE(28), + [sym_goto_statement] = STATE(28), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(28), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(28), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [ts_builtin_sym_end] = ACTIONS(418), + [sym_identifier] = ACTIONS(420), + [aux_sym_preproc_include_token1] = ACTIONS(423), + [aux_sym_preproc_def_token1] = ACTIONS(426), + [aux_sym_preproc_if_token1] = ACTIONS(429), + [aux_sym_preproc_ifdef_token1] = ACTIONS(432), + [aux_sym_preproc_ifdef_token2] = ACTIONS(432), + [sym_preproc_directive] = ACTIONS(435), + [anon_sym_LPAREN2] = ACTIONS(193), + [anon_sym_BANG] = ACTIONS(196), + [anon_sym_TILDE] = ACTIONS(196), + [anon_sym_DASH] = ACTIONS(199), + [anon_sym_PLUS] = ACTIONS(199), + [anon_sym_STAR] = ACTIONS(202), + [anon_sym_AMP] = ACTIONS(202), + [anon_sym_SEMI] = ACTIONS(438), + [anon_sym_typedef] = ACTIONS(441), + [anon_sym_extern] = ACTIONS(444), + [anon_sym___attribute__] = ACTIONS(214), + [anon_sym_LBRACK_LBRACK] = ACTIONS(217), + [anon_sym___declspec] = ACTIONS(220), + [anon_sym___cdecl] = ACTIONS(223), + [anon_sym___clrcall] = ACTIONS(223), + [anon_sym___stdcall] = ACTIONS(223), + [anon_sym___fastcall] = ACTIONS(223), + [anon_sym___thiscall] = ACTIONS(223), + [anon_sym___vectorcall] = ACTIONS(223), + [anon_sym_LBRACE] = ACTIONS(447), + [anon_sym_static] = ACTIONS(229), + [anon_sym_auto] = ACTIONS(229), + [anon_sym_register] = ACTIONS(229), + [anon_sym_inline] = ACTIONS(229), + [anon_sym_const] = ACTIONS(232), + [anon_sym_volatile] = ACTIONS(232), + [anon_sym_restrict] = ACTIONS(232), + [anon_sym__Atomic] = ACTIONS(232), + [anon_sym_signed] = ACTIONS(235), + [anon_sym_unsigned] = ACTIONS(235), + [anon_sym_long] = ACTIONS(235), + [anon_sym_short] = ACTIONS(235), + [sym_primitive_type] = ACTIONS(238), + [anon_sym_enum] = ACTIONS(241), + [anon_sym_struct] = ACTIONS(244), + [anon_sym_union] = ACTIONS(247), + [anon_sym_if] = ACTIONS(450), + [anon_sym_switch] = ACTIONS(453), + [anon_sym_case] = ACTIONS(456), + [anon_sym_default] = ACTIONS(459), + [anon_sym_while] = ACTIONS(462), + [anon_sym_do] = ACTIONS(465), + [anon_sym_for] = ACTIONS(468), + [anon_sym_return] = ACTIONS(471), + [anon_sym_break] = ACTIONS(474), + [anon_sym_continue] = ACTIONS(477), + [anon_sym_goto] = ACTIONS(480), + [anon_sym_DASH_DASH] = ACTIONS(283), + [anon_sym_PLUS_PLUS] = ACTIONS(283), + [anon_sym_sizeof] = ACTIONS(286), + [sym_number_literal] = ACTIONS(289), + [anon_sym_L_SQUOTE] = ACTIONS(292), + [anon_sym_u_SQUOTE] = ACTIONS(292), + [anon_sym_U_SQUOTE] = ACTIONS(292), + [anon_sym_u8_SQUOTE] = ACTIONS(292), + [anon_sym_SQUOTE] = ACTIONS(292), + [anon_sym_L_DQUOTE] = ACTIONS(295), + [anon_sym_u_DQUOTE] = ACTIONS(295), + [anon_sym_U_DQUOTE] = ACTIONS(295), + [anon_sym_u8_DQUOTE] = ACTIONS(295), + [anon_sym_DQUOTE] = ACTIONS(295), + [sym_true] = ACTIONS(298), + [sym_false] = ACTIONS(298), + [sym_null] = ACTIONS(298), + [sym_comment] = ACTIONS(3), + }, + [29] = { + [sym_preproc_include] = STATE(36), + [sym_preproc_def] = STATE(36), + [sym_preproc_function_def] = STATE(36), + [sym_preproc_call] = STATE(36), + [sym_preproc_if] = STATE(36), + [sym_preproc_ifdef] = STATE(36), + [sym_function_definition] = STATE(36), + [sym_declaration] = STATE(36), + [sym_type_definition] = STATE(36), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1004), + [sym_linkage_specification] = STATE(36), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(642), + [sym_compound_statement] = STATE(36), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(846), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(36), + [sym_labeled_statement] = STATE(36), + [sym_expression_statement] = STATE(36), + [sym_if_statement] = STATE(36), + [sym_switch_statement] = STATE(36), + [sym_case_statement] = STATE(36), + [sym_while_statement] = STATE(36), + [sym_do_statement] = STATE(36), + [sym_for_statement] = STATE(36), + [sym_return_statement] = STATE(36), + [sym_break_statement] = STATE(36), + [sym_continue_statement] = STATE(36), + [sym_goto_statement] = STATE(36), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(36), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(36), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(301), + [aux_sym_preproc_include_token1] = ACTIONS(303), + [aux_sym_preproc_def_token1] = ACTIONS(305), + [aux_sym_preproc_if_token1] = ACTIONS(307), + [aux_sym_preproc_ifdef_token1] = ACTIONS(309), + [aux_sym_preproc_ifdef_token2] = ACTIONS(309), + [sym_preproc_directive] = ACTIONS(311), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(317), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(483), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [30] = { + [sym_preproc_include] = STATE(36), + [sym_preproc_def] = STATE(36), + [sym_preproc_function_def] = STATE(36), + [sym_preproc_call] = STATE(36), + [sym_preproc_if] = STATE(36), + [sym_preproc_ifdef] = STATE(36), + [sym_function_definition] = STATE(36), + [sym_declaration] = STATE(36), + [sym_type_definition] = STATE(36), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1004), + [sym_linkage_specification] = STATE(36), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(642), + [sym_compound_statement] = STATE(36), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(846), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(36), + [sym_labeled_statement] = STATE(36), + [sym_expression_statement] = STATE(36), + [sym_if_statement] = STATE(36), + [sym_switch_statement] = STATE(36), + [sym_case_statement] = STATE(36), + [sym_while_statement] = STATE(36), + [sym_do_statement] = STATE(36), + [sym_for_statement] = STATE(36), + [sym_return_statement] = STATE(36), + [sym_break_statement] = STATE(36), + [sym_continue_statement] = STATE(36), + [sym_goto_statement] = STATE(36), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(36), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(36), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(301), + [aux_sym_preproc_include_token1] = ACTIONS(303), + [aux_sym_preproc_def_token1] = ACTIONS(305), + [aux_sym_preproc_if_token1] = ACTIONS(307), + [aux_sym_preproc_ifdef_token1] = ACTIONS(309), + [aux_sym_preproc_ifdef_token2] = ACTIONS(309), + [sym_preproc_directive] = ACTIONS(311), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(317), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(485), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [31] = { + [sym_preproc_include] = STATE(30), + [sym_preproc_def] = STATE(30), + [sym_preproc_function_def] = STATE(30), + [sym_preproc_call] = STATE(30), + [sym_preproc_if] = STATE(30), + [sym_preproc_ifdef] = STATE(30), + [sym_function_definition] = STATE(30), + [sym_declaration] = STATE(30), + [sym_type_definition] = STATE(30), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1004), + [sym_linkage_specification] = STATE(30), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(642), + [sym_compound_statement] = STATE(30), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(846), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(30), + [sym_labeled_statement] = STATE(30), + [sym_expression_statement] = STATE(30), + [sym_if_statement] = STATE(30), + [sym_switch_statement] = STATE(30), + [sym_case_statement] = STATE(30), + [sym_while_statement] = STATE(30), + [sym_do_statement] = STATE(30), + [sym_for_statement] = STATE(30), + [sym_return_statement] = STATE(30), + [sym_break_statement] = STATE(30), + [sym_continue_statement] = STATE(30), + [sym_goto_statement] = STATE(30), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(30), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(30), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(301), + [aux_sym_preproc_include_token1] = ACTIONS(303), + [aux_sym_preproc_def_token1] = ACTIONS(305), + [aux_sym_preproc_if_token1] = ACTIONS(307), + [aux_sym_preproc_ifdef_token1] = ACTIONS(309), + [aux_sym_preproc_ifdef_token2] = ACTIONS(309), + [sym_preproc_directive] = ACTIONS(311), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(317), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(487), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [32] = { + [sym_preproc_include] = STATE(36), + [sym_preproc_def] = STATE(36), + [sym_preproc_function_def] = STATE(36), + [sym_preproc_call] = STATE(36), + [sym_preproc_if] = STATE(36), + [sym_preproc_ifdef] = STATE(36), + [sym_function_definition] = STATE(36), + [sym_declaration] = STATE(36), + [sym_type_definition] = STATE(36), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1004), + [sym_linkage_specification] = STATE(36), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(642), + [sym_compound_statement] = STATE(36), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(846), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(36), + [sym_labeled_statement] = STATE(36), + [sym_expression_statement] = STATE(36), + [sym_if_statement] = STATE(36), + [sym_switch_statement] = STATE(36), + [sym_case_statement] = STATE(36), + [sym_while_statement] = STATE(36), + [sym_do_statement] = STATE(36), + [sym_for_statement] = STATE(36), + [sym_return_statement] = STATE(36), + [sym_break_statement] = STATE(36), + [sym_continue_statement] = STATE(36), + [sym_goto_statement] = STATE(36), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(36), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(36), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(301), + [aux_sym_preproc_include_token1] = ACTIONS(303), + [aux_sym_preproc_def_token1] = ACTIONS(305), + [aux_sym_preproc_if_token1] = ACTIONS(307), + [aux_sym_preproc_ifdef_token1] = ACTIONS(309), + [aux_sym_preproc_ifdef_token2] = ACTIONS(309), + [sym_preproc_directive] = ACTIONS(311), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(317), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(489), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [33] = { + [sym_preproc_include] = STATE(39), + [sym_preproc_def] = STATE(39), + [sym_preproc_function_def] = STATE(39), + [sym_preproc_call] = STATE(39), + [sym_preproc_if] = STATE(39), + [sym_preproc_ifdef] = STATE(39), + [sym_function_definition] = STATE(39), + [sym_declaration] = STATE(39), + [sym_type_definition] = STATE(39), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1012), + [sym_linkage_specification] = STATE(39), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(644), + [sym_compound_statement] = STATE(39), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(845), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(39), + [sym_labeled_statement] = STATE(39), + [sym_expression_statement] = STATE(39), + [sym_if_statement] = STATE(39), + [sym_switch_statement] = STATE(39), + [sym_case_statement] = STATE(39), + [sym_while_statement] = STATE(39), + [sym_do_statement] = STATE(39), + [sym_for_statement] = STATE(39), + [sym_return_statement] = STATE(39), + [sym_break_statement] = STATE(39), + [sym_continue_statement] = STATE(39), + [sym_goto_statement] = STATE(39), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(39), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(39), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(491), + [aux_sym_preproc_include_token1] = ACTIONS(493), + [aux_sym_preproc_def_token1] = ACTIONS(495), + [aux_sym_preproc_if_token1] = ACTIONS(497), + [aux_sym_preproc_if_token2] = ACTIONS(499), + [aux_sym_preproc_ifdef_token1] = ACTIONS(501), + [aux_sym_preproc_ifdef_token2] = ACTIONS(501), + [sym_preproc_directive] = ACTIONS(503), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_typedef] = ACTIONS(507), + [anon_sym_extern] = ACTIONS(509), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [34] = { + [sym_preproc_include] = STATE(36), + [sym_preproc_def] = STATE(36), + [sym_preproc_function_def] = STATE(36), + [sym_preproc_call] = STATE(36), + [sym_preproc_if] = STATE(36), + [sym_preproc_ifdef] = STATE(36), + [sym_function_definition] = STATE(36), + [sym_declaration] = STATE(36), + [sym_type_definition] = STATE(36), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1004), + [sym_linkage_specification] = STATE(36), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(642), + [sym_compound_statement] = STATE(36), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(846), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(36), + [sym_labeled_statement] = STATE(36), + [sym_expression_statement] = STATE(36), + [sym_if_statement] = STATE(36), + [sym_switch_statement] = STATE(36), + [sym_case_statement] = STATE(36), + [sym_while_statement] = STATE(36), + [sym_do_statement] = STATE(36), + [sym_for_statement] = STATE(36), + [sym_return_statement] = STATE(36), + [sym_break_statement] = STATE(36), + [sym_continue_statement] = STATE(36), + [sym_goto_statement] = STATE(36), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(36), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(36), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(301), + [aux_sym_preproc_include_token1] = ACTIONS(303), + [aux_sym_preproc_def_token1] = ACTIONS(305), + [aux_sym_preproc_if_token1] = ACTIONS(307), + [aux_sym_preproc_ifdef_token1] = ACTIONS(309), + [aux_sym_preproc_ifdef_token2] = ACTIONS(309), + [sym_preproc_directive] = ACTIONS(311), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(317), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(535), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [35] = { + [sym_preproc_include] = STATE(42), + [sym_preproc_def] = STATE(42), + [sym_preproc_function_def] = STATE(42), + [sym_preproc_call] = STATE(42), + [sym_preproc_if] = STATE(42), + [sym_preproc_ifdef] = STATE(42), + [sym_function_definition] = STATE(42), + [sym_declaration] = STATE(42), + [sym_type_definition] = STATE(42), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1004), + [sym_linkage_specification] = STATE(42), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(642), + [sym_compound_statement] = STATE(42), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(846), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(42), + [sym_labeled_statement] = STATE(42), + [sym_expression_statement] = STATE(42), + [sym_if_statement] = STATE(42), + [sym_switch_statement] = STATE(42), + [sym_case_statement] = STATE(42), + [sym_while_statement] = STATE(42), + [sym_do_statement] = STATE(42), + [sym_for_statement] = STATE(42), + [sym_return_statement] = STATE(42), + [sym_break_statement] = STATE(42), + [sym_continue_statement] = STATE(42), + [sym_goto_statement] = STATE(42), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(42), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(42), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(301), + [aux_sym_preproc_include_token1] = ACTIONS(303), + [aux_sym_preproc_def_token1] = ACTIONS(305), + [aux_sym_preproc_if_token1] = ACTIONS(307), + [aux_sym_preproc_ifdef_token1] = ACTIONS(309), + [aux_sym_preproc_ifdef_token2] = ACTIONS(309), + [sym_preproc_directive] = ACTIONS(311), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(317), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(537), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [36] = { + [sym_preproc_include] = STATE(36), + [sym_preproc_def] = STATE(36), + [sym_preproc_function_def] = STATE(36), + [sym_preproc_call] = STATE(36), + [sym_preproc_if] = STATE(36), + [sym_preproc_ifdef] = STATE(36), + [sym_function_definition] = STATE(36), + [sym_declaration] = STATE(36), + [sym_type_definition] = STATE(36), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1004), + [sym_linkage_specification] = STATE(36), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(642), + [sym_compound_statement] = STATE(36), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(846), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(36), + [sym_labeled_statement] = STATE(36), + [sym_expression_statement] = STATE(36), + [sym_if_statement] = STATE(36), + [sym_switch_statement] = STATE(36), + [sym_case_statement] = STATE(36), + [sym_while_statement] = STATE(36), + [sym_do_statement] = STATE(36), + [sym_for_statement] = STATE(36), + [sym_return_statement] = STATE(36), + [sym_break_statement] = STATE(36), + [sym_continue_statement] = STATE(36), + [sym_goto_statement] = STATE(36), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(36), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(36), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(539), + [aux_sym_preproc_include_token1] = ACTIONS(542), + [aux_sym_preproc_def_token1] = ACTIONS(545), + [aux_sym_preproc_if_token1] = ACTIONS(548), + [aux_sym_preproc_ifdef_token1] = ACTIONS(551), + [aux_sym_preproc_ifdef_token2] = ACTIONS(551), + [sym_preproc_directive] = ACTIONS(554), + [anon_sym_LPAREN2] = ACTIONS(193), + [anon_sym_BANG] = ACTIONS(196), + [anon_sym_TILDE] = ACTIONS(196), + [anon_sym_DASH] = ACTIONS(199), + [anon_sym_PLUS] = ACTIONS(199), + [anon_sym_STAR] = ACTIONS(202), + [anon_sym_AMP] = ACTIONS(202), + [anon_sym_SEMI] = ACTIONS(557), + [anon_sym_typedef] = ACTIONS(560), + [anon_sym_extern] = ACTIONS(563), + [anon_sym___attribute__] = ACTIONS(214), + [anon_sym_LBRACK_LBRACK] = ACTIONS(217), + [anon_sym___declspec] = ACTIONS(220), + [anon_sym___cdecl] = ACTIONS(223), + [anon_sym___clrcall] = ACTIONS(223), + [anon_sym___stdcall] = ACTIONS(223), + [anon_sym___fastcall] = ACTIONS(223), + [anon_sym___thiscall] = ACTIONS(223), + [anon_sym___vectorcall] = ACTIONS(223), + [anon_sym_LBRACE] = ACTIONS(566), + [anon_sym_RBRACE] = ACTIONS(418), + [anon_sym_static] = ACTIONS(229), + [anon_sym_auto] = ACTIONS(229), + [anon_sym_register] = ACTIONS(229), + [anon_sym_inline] = ACTIONS(229), + [anon_sym_const] = ACTIONS(232), + [anon_sym_volatile] = ACTIONS(232), + [anon_sym_restrict] = ACTIONS(232), + [anon_sym__Atomic] = ACTIONS(232), + [anon_sym_signed] = ACTIONS(235), + [anon_sym_unsigned] = ACTIONS(235), + [anon_sym_long] = ACTIONS(235), + [anon_sym_short] = ACTIONS(235), + [sym_primitive_type] = ACTIONS(238), + [anon_sym_enum] = ACTIONS(241), + [anon_sym_struct] = ACTIONS(244), + [anon_sym_union] = ACTIONS(247), + [anon_sym_if] = ACTIONS(569), + [anon_sym_switch] = ACTIONS(572), + [anon_sym_case] = ACTIONS(575), + [anon_sym_default] = ACTIONS(578), + [anon_sym_while] = ACTIONS(581), + [anon_sym_do] = ACTIONS(584), + [anon_sym_for] = ACTIONS(587), + [anon_sym_return] = ACTIONS(590), + [anon_sym_break] = ACTIONS(593), + [anon_sym_continue] = ACTIONS(596), + [anon_sym_goto] = ACTIONS(599), + [anon_sym_DASH_DASH] = ACTIONS(283), + [anon_sym_PLUS_PLUS] = ACTIONS(283), + [anon_sym_sizeof] = ACTIONS(286), + [sym_number_literal] = ACTIONS(289), + [anon_sym_L_SQUOTE] = ACTIONS(292), + [anon_sym_u_SQUOTE] = ACTIONS(292), + [anon_sym_U_SQUOTE] = ACTIONS(292), + [anon_sym_u8_SQUOTE] = ACTIONS(292), + [anon_sym_SQUOTE] = ACTIONS(292), + [anon_sym_L_DQUOTE] = ACTIONS(295), + [anon_sym_u_DQUOTE] = ACTIONS(295), + [anon_sym_U_DQUOTE] = ACTIONS(295), + [anon_sym_u8_DQUOTE] = ACTIONS(295), + [anon_sym_DQUOTE] = ACTIONS(295), + [sym_true] = ACTIONS(298), + [sym_false] = ACTIONS(298), + [sym_null] = ACTIONS(298), + [sym_comment] = ACTIONS(3), + }, + [37] = { + [sym_preproc_include] = STATE(36), + [sym_preproc_def] = STATE(36), + [sym_preproc_function_def] = STATE(36), + [sym_preproc_call] = STATE(36), + [sym_preproc_if] = STATE(36), + [sym_preproc_ifdef] = STATE(36), + [sym_function_definition] = STATE(36), + [sym_declaration] = STATE(36), + [sym_type_definition] = STATE(36), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1004), + [sym_linkage_specification] = STATE(36), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(642), + [sym_compound_statement] = STATE(36), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(846), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(36), + [sym_labeled_statement] = STATE(36), + [sym_expression_statement] = STATE(36), + [sym_if_statement] = STATE(36), + [sym_switch_statement] = STATE(36), + [sym_case_statement] = STATE(36), + [sym_while_statement] = STATE(36), + [sym_do_statement] = STATE(36), + [sym_for_statement] = STATE(36), + [sym_return_statement] = STATE(36), + [sym_break_statement] = STATE(36), + [sym_continue_statement] = STATE(36), + [sym_goto_statement] = STATE(36), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(36), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(36), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(301), + [aux_sym_preproc_include_token1] = ACTIONS(303), + [aux_sym_preproc_def_token1] = ACTIONS(305), + [aux_sym_preproc_if_token1] = ACTIONS(307), + [aux_sym_preproc_ifdef_token1] = ACTIONS(309), + [aux_sym_preproc_ifdef_token2] = ACTIONS(309), + [sym_preproc_directive] = ACTIONS(311), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(317), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(602), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [38] = { + [sym_preproc_include] = STATE(28), + [sym_preproc_def] = STATE(28), + [sym_preproc_function_def] = STATE(28), + [sym_preproc_call] = STATE(28), + [sym_preproc_if] = STATE(28), + [sym_preproc_ifdef] = STATE(28), + [sym_function_definition] = STATE(28), + [sym_declaration] = STATE(28), + [sym_type_definition] = STATE(28), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1003), + [sym_linkage_specification] = STATE(28), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(641), + [sym_compound_statement] = STATE(28), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(844), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(28), + [sym_labeled_statement] = STATE(28), + [sym_expression_statement] = STATE(28), + [sym_if_statement] = STATE(28), + [sym_switch_statement] = STATE(28), + [sym_case_statement] = STATE(28), + [sym_while_statement] = STATE(28), + [sym_do_statement] = STATE(28), + [sym_for_statement] = STATE(28), + [sym_return_statement] = STATE(28), + [sym_break_statement] = STATE(28), + [sym_continue_statement] = STATE(28), + [sym_goto_statement] = STATE(28), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(28), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(28), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [ts_builtin_sym_end] = ACTIONS(604), + [sym_identifier] = ACTIONS(7), + [aux_sym_preproc_include_token1] = ACTIONS(9), + [aux_sym_preproc_def_token1] = ACTIONS(11), + [aux_sym_preproc_if_token1] = ACTIONS(13), + [aux_sym_preproc_ifdef_token1] = ACTIONS(15), + [aux_sym_preproc_ifdef_token2] = ACTIONS(15), + [sym_preproc_directive] = ACTIONS(17), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_typedef] = ACTIONS(29), + [anon_sym_extern] = ACTIONS(31), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [39] = { + [sym_preproc_include] = STATE(23), + [sym_preproc_def] = STATE(23), + [sym_preproc_function_def] = STATE(23), + [sym_preproc_call] = STATE(23), + [sym_preproc_if] = STATE(23), + [sym_preproc_ifdef] = STATE(23), + [sym_function_definition] = STATE(23), + [sym_declaration] = STATE(23), + [sym_type_definition] = STATE(23), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1012), + [sym_linkage_specification] = STATE(23), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(644), + [sym_compound_statement] = STATE(23), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(845), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(23), + [sym_labeled_statement] = STATE(23), + [sym_expression_statement] = STATE(23), + [sym_if_statement] = STATE(23), + [sym_switch_statement] = STATE(23), + [sym_case_statement] = STATE(23), + [sym_while_statement] = STATE(23), + [sym_do_statement] = STATE(23), + [sym_for_statement] = STATE(23), + [sym_return_statement] = STATE(23), + [sym_break_statement] = STATE(23), + [sym_continue_statement] = STATE(23), + [sym_goto_statement] = STATE(23), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(23), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(23), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(491), + [aux_sym_preproc_include_token1] = ACTIONS(493), + [aux_sym_preproc_def_token1] = ACTIONS(495), + [aux_sym_preproc_if_token1] = ACTIONS(497), + [aux_sym_preproc_if_token2] = ACTIONS(606), + [aux_sym_preproc_ifdef_token1] = ACTIONS(501), + [aux_sym_preproc_ifdef_token2] = ACTIONS(501), + [sym_preproc_directive] = ACTIONS(503), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_typedef] = ACTIONS(507), + [anon_sym_extern] = ACTIONS(509), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [40] = { + [sym_preproc_include] = STATE(37), + [sym_preproc_def] = STATE(37), + [sym_preproc_function_def] = STATE(37), + [sym_preproc_call] = STATE(37), + [sym_preproc_if] = STATE(37), + [sym_preproc_ifdef] = STATE(37), + [sym_function_definition] = STATE(37), + [sym_declaration] = STATE(37), + [sym_type_definition] = STATE(37), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1004), + [sym_linkage_specification] = STATE(37), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(642), + [sym_compound_statement] = STATE(37), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(846), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(37), + [sym_labeled_statement] = STATE(37), + [sym_expression_statement] = STATE(37), + [sym_if_statement] = STATE(37), + [sym_switch_statement] = STATE(37), + [sym_case_statement] = STATE(37), + [sym_while_statement] = STATE(37), + [sym_do_statement] = STATE(37), + [sym_for_statement] = STATE(37), + [sym_return_statement] = STATE(37), + [sym_break_statement] = STATE(37), + [sym_continue_statement] = STATE(37), + [sym_goto_statement] = STATE(37), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(37), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(37), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(301), + [aux_sym_preproc_include_token1] = ACTIONS(303), + [aux_sym_preproc_def_token1] = ACTIONS(305), + [aux_sym_preproc_if_token1] = ACTIONS(307), + [aux_sym_preproc_ifdef_token1] = ACTIONS(309), + [aux_sym_preproc_ifdef_token2] = ACTIONS(309), + [sym_preproc_directive] = ACTIONS(311), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(317), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(608), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [41] = { + [sym_preproc_include] = STATE(22), + [sym_preproc_def] = STATE(22), + [sym_preproc_function_def] = STATE(22), + [sym_preproc_call] = STATE(22), + [sym_preproc_if] = STATE(22), + [sym_preproc_ifdef] = STATE(22), + [sym_function_definition] = STATE(22), + [sym_declaration] = STATE(22), + [sym_type_definition] = STATE(22), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1004), + [sym_linkage_specification] = STATE(22), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(642), + [sym_compound_statement] = STATE(22), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(846), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(22), + [sym_labeled_statement] = STATE(22), + [sym_expression_statement] = STATE(22), + [sym_if_statement] = STATE(22), + [sym_switch_statement] = STATE(22), + [sym_case_statement] = STATE(22), + [sym_while_statement] = STATE(22), + [sym_do_statement] = STATE(22), + [sym_for_statement] = STATE(22), + [sym_return_statement] = STATE(22), + [sym_break_statement] = STATE(22), + [sym_continue_statement] = STATE(22), + [sym_goto_statement] = STATE(22), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(22), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(22), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(301), + [aux_sym_preproc_include_token1] = ACTIONS(303), + [aux_sym_preproc_def_token1] = ACTIONS(305), + [aux_sym_preproc_if_token1] = ACTIONS(307), + [aux_sym_preproc_ifdef_token1] = ACTIONS(309), + [aux_sym_preproc_ifdef_token2] = ACTIONS(309), + [sym_preproc_directive] = ACTIONS(311), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(317), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(610), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [42] = { + [sym_preproc_include] = STATE(36), + [sym_preproc_def] = STATE(36), + [sym_preproc_function_def] = STATE(36), + [sym_preproc_call] = STATE(36), + [sym_preproc_if] = STATE(36), + [sym_preproc_ifdef] = STATE(36), + [sym_function_definition] = STATE(36), + [sym_declaration] = STATE(36), + [sym_type_definition] = STATE(36), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1004), + [sym_linkage_specification] = STATE(36), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_ms_call_modifier] = STATE(642), + [sym_compound_statement] = STATE(36), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(846), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(36), + [sym_labeled_statement] = STATE(36), + [sym_expression_statement] = STATE(36), + [sym_if_statement] = STATE(36), + [sym_switch_statement] = STATE(36), + [sym_case_statement] = STATE(36), + [sym_while_statement] = STATE(36), + [sym_do_statement] = STATE(36), + [sym_for_statement] = STATE(36), + [sym_return_statement] = STATE(36), + [sym_break_statement] = STATE(36), + [sym_continue_statement] = STATE(36), + [sym_goto_statement] = STATE(36), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym__empty_declaration] = STATE(36), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_translation_unit_repeat1] = STATE(36), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(301), + [aux_sym_preproc_include_token1] = ACTIONS(303), + [aux_sym_preproc_def_token1] = ACTIONS(305), + [aux_sym_preproc_if_token1] = ACTIONS(307), + [aux_sym_preproc_ifdef_token1] = ACTIONS(309), + [aux_sym_preproc_ifdef_token2] = ACTIONS(309), + [sym_preproc_directive] = ACTIONS(311), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(317), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(39), + [anon_sym___clrcall] = ACTIONS(39), + [anon_sym___stdcall] = ACTIONS(39), + [anon_sym___fastcall] = ACTIONS(39), + [anon_sym___thiscall] = ACTIONS(39), + [anon_sym___vectorcall] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(612), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [43] = { + [sym_declaration] = STATE(45), + [sym_type_definition] = STATE(45), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1006), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(45), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(45), + [sym_labeled_statement] = STATE(45), + [sym_expression_statement] = STATE(45), + [sym_if_statement] = STATE(45), + [sym_switch_statement] = STATE(45), + [sym_while_statement] = STATE(45), + [sym_do_statement] = STATE(45), + [sym_for_statement] = STATE(45), + [sym_return_statement] = STATE(45), + [sym_break_statement] = STATE(45), + [sym_continue_statement] = STATE(45), + [sym_goto_statement] = STATE(45), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(45), + [sym_identifier] = ACTIONS(614), + [aux_sym_preproc_include_token1] = ACTIONS(616), + [aux_sym_preproc_def_token1] = ACTIONS(616), + [aux_sym_preproc_if_token1] = ACTIONS(616), + [aux_sym_preproc_if_token2] = ACTIONS(616), + [aux_sym_preproc_ifdef_token1] = ACTIONS(616), + [aux_sym_preproc_ifdef_token2] = ACTIONS(616), + [aux_sym_preproc_else_token1] = ACTIONS(616), + [aux_sym_preproc_elif_token1] = ACTIONS(616), + [sym_preproc_directive] = ACTIONS(616), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(616), + [anon_sym___clrcall] = ACTIONS(616), + [anon_sym___stdcall] = ACTIONS(616), + [anon_sym___fastcall] = ACTIONS(616), + [anon_sym___thiscall] = ACTIONS(616), + [anon_sym___vectorcall] = ACTIONS(616), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_else] = ACTIONS(616), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(616), + [anon_sym_default] = ACTIONS(616), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [44] = { + [sym_declaration] = STATE(43), + [sym_type_definition] = STATE(43), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1006), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(43), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(43), + [sym_labeled_statement] = STATE(43), + [sym_expression_statement] = STATE(43), + [sym_if_statement] = STATE(43), + [sym_switch_statement] = STATE(43), + [sym_while_statement] = STATE(43), + [sym_do_statement] = STATE(43), + [sym_for_statement] = STATE(43), + [sym_return_statement] = STATE(43), + [sym_break_statement] = STATE(43), + [sym_continue_statement] = STATE(43), + [sym_goto_statement] = STATE(43), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(43), + [sym_identifier] = ACTIONS(614), + [aux_sym_preproc_include_token1] = ACTIONS(618), + [aux_sym_preproc_def_token1] = ACTIONS(618), + [aux_sym_preproc_if_token1] = ACTIONS(618), + [aux_sym_preproc_if_token2] = ACTIONS(618), + [aux_sym_preproc_ifdef_token1] = ACTIONS(618), + [aux_sym_preproc_ifdef_token2] = ACTIONS(618), + [aux_sym_preproc_else_token1] = ACTIONS(618), + [aux_sym_preproc_elif_token1] = ACTIONS(618), + [sym_preproc_directive] = ACTIONS(618), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(618), + [anon_sym___clrcall] = ACTIONS(618), + [anon_sym___stdcall] = ACTIONS(618), + [anon_sym___fastcall] = ACTIONS(618), + [anon_sym___thiscall] = ACTIONS(618), + [anon_sym___vectorcall] = ACTIONS(618), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_else] = ACTIONS(618), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(618), + [anon_sym_default] = ACTIONS(618), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [45] = { + [sym_declaration] = STATE(45), + [sym_type_definition] = STATE(45), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1006), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(45), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(45), + [sym_labeled_statement] = STATE(45), + [sym_expression_statement] = STATE(45), + [sym_if_statement] = STATE(45), + [sym_switch_statement] = STATE(45), + [sym_while_statement] = STATE(45), + [sym_do_statement] = STATE(45), + [sym_for_statement] = STATE(45), + [sym_return_statement] = STATE(45), + [sym_break_statement] = STATE(45), + [sym_continue_statement] = STATE(45), + [sym_goto_statement] = STATE(45), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(45), + [sym_identifier] = ACTIONS(620), + [aux_sym_preproc_include_token1] = ACTIONS(623), + [aux_sym_preproc_def_token1] = ACTIONS(623), + [aux_sym_preproc_if_token1] = ACTIONS(623), + [aux_sym_preproc_if_token2] = ACTIONS(623), + [aux_sym_preproc_ifdef_token1] = ACTIONS(623), + [aux_sym_preproc_ifdef_token2] = ACTIONS(623), + [aux_sym_preproc_else_token1] = ACTIONS(623), + [aux_sym_preproc_elif_token1] = ACTIONS(623), + [sym_preproc_directive] = ACTIONS(623), + [anon_sym_LPAREN2] = ACTIONS(625), + [anon_sym_BANG] = ACTIONS(628), + [anon_sym_TILDE] = ACTIONS(628), + [anon_sym_DASH] = ACTIONS(631), + [anon_sym_PLUS] = ACTIONS(631), + [anon_sym_STAR] = ACTIONS(634), + [anon_sym_AMP] = ACTIONS(634), + [anon_sym_SEMI] = ACTIONS(637), + [anon_sym_typedef] = ACTIONS(640), + [anon_sym_extern] = ACTIONS(643), + [anon_sym___attribute__] = ACTIONS(646), + [anon_sym_LBRACK_LBRACK] = ACTIONS(649), + [anon_sym___declspec] = ACTIONS(652), + [anon_sym___cdecl] = ACTIONS(623), + [anon_sym___clrcall] = ACTIONS(623), + [anon_sym___stdcall] = ACTIONS(623), + [anon_sym___fastcall] = ACTIONS(623), + [anon_sym___thiscall] = ACTIONS(623), + [anon_sym___vectorcall] = ACTIONS(623), + [anon_sym_LBRACE] = ACTIONS(655), + [anon_sym_static] = ACTIONS(643), + [anon_sym_auto] = ACTIONS(643), + [anon_sym_register] = ACTIONS(643), + [anon_sym_inline] = ACTIONS(643), + [anon_sym_const] = ACTIONS(658), + [anon_sym_volatile] = ACTIONS(658), + [anon_sym_restrict] = ACTIONS(658), + [anon_sym__Atomic] = ACTIONS(658), + [anon_sym_signed] = ACTIONS(661), + [anon_sym_unsigned] = ACTIONS(661), + [anon_sym_long] = ACTIONS(661), + [anon_sym_short] = ACTIONS(661), + [sym_primitive_type] = ACTIONS(664), + [anon_sym_enum] = ACTIONS(667), + [anon_sym_struct] = ACTIONS(670), + [anon_sym_union] = ACTIONS(673), + [anon_sym_if] = ACTIONS(676), + [anon_sym_else] = ACTIONS(623), + [anon_sym_switch] = ACTIONS(679), + [anon_sym_case] = ACTIONS(623), + [anon_sym_default] = ACTIONS(623), + [anon_sym_while] = ACTIONS(682), + [anon_sym_do] = ACTIONS(685), + [anon_sym_for] = ACTIONS(688), + [anon_sym_return] = ACTIONS(691), + [anon_sym_break] = ACTIONS(694), + [anon_sym_continue] = ACTIONS(697), + [anon_sym_goto] = ACTIONS(700), + [anon_sym_DASH_DASH] = ACTIONS(703), + [anon_sym_PLUS_PLUS] = ACTIONS(703), + [anon_sym_sizeof] = ACTIONS(706), + [sym_number_literal] = ACTIONS(709), + [anon_sym_L_SQUOTE] = ACTIONS(712), + [anon_sym_u_SQUOTE] = ACTIONS(712), + [anon_sym_U_SQUOTE] = ACTIONS(712), + [anon_sym_u8_SQUOTE] = ACTIONS(712), + [anon_sym_SQUOTE] = ACTIONS(712), + [anon_sym_L_DQUOTE] = ACTIONS(715), + [anon_sym_u_DQUOTE] = ACTIONS(715), + [anon_sym_U_DQUOTE] = ACTIONS(715), + [anon_sym_u8_DQUOTE] = ACTIONS(715), + [anon_sym_DQUOTE] = ACTIONS(715), + [sym_true] = ACTIONS(718), + [sym_false] = ACTIONS(718), + [sym_null] = ACTIONS(718), + [sym_comment] = ACTIONS(3), + }, + [46] = { + [sym_declaration] = STATE(47), + [sym_type_definition] = STATE(47), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1006), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(47), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(47), + [sym_labeled_statement] = STATE(47), + [sym_expression_statement] = STATE(47), + [sym_if_statement] = STATE(47), + [sym_switch_statement] = STATE(47), + [sym_while_statement] = STATE(47), + [sym_do_statement] = STATE(47), + [sym_for_statement] = STATE(47), + [sym_return_statement] = STATE(47), + [sym_break_statement] = STATE(47), + [sym_continue_statement] = STATE(47), + [sym_goto_statement] = STATE(47), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(47), + [sym_identifier] = ACTIONS(614), + [aux_sym_preproc_include_token1] = ACTIONS(721), + [aux_sym_preproc_def_token1] = ACTIONS(721), + [aux_sym_preproc_if_token1] = ACTIONS(721), + [aux_sym_preproc_if_token2] = ACTIONS(721), + [aux_sym_preproc_ifdef_token1] = ACTIONS(721), + [aux_sym_preproc_ifdef_token2] = ACTIONS(721), + [aux_sym_preproc_else_token1] = ACTIONS(721), + [aux_sym_preproc_elif_token1] = ACTIONS(721), + [sym_preproc_directive] = ACTIONS(721), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(721), + [anon_sym___clrcall] = ACTIONS(721), + [anon_sym___stdcall] = ACTIONS(721), + [anon_sym___fastcall] = ACTIONS(721), + [anon_sym___thiscall] = ACTIONS(721), + [anon_sym___vectorcall] = ACTIONS(721), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_else] = ACTIONS(721), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(721), + [anon_sym_default] = ACTIONS(721), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [47] = { + [sym_declaration] = STATE(45), + [sym_type_definition] = STATE(45), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1006), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(45), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(45), + [sym_labeled_statement] = STATE(45), + [sym_expression_statement] = STATE(45), + [sym_if_statement] = STATE(45), + [sym_switch_statement] = STATE(45), + [sym_while_statement] = STATE(45), + [sym_do_statement] = STATE(45), + [sym_for_statement] = STATE(45), + [sym_return_statement] = STATE(45), + [sym_break_statement] = STATE(45), + [sym_continue_statement] = STATE(45), + [sym_goto_statement] = STATE(45), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(45), + [sym_identifier] = ACTIONS(614), + [aux_sym_preproc_include_token1] = ACTIONS(723), + [aux_sym_preproc_def_token1] = ACTIONS(723), + [aux_sym_preproc_if_token1] = ACTIONS(723), + [aux_sym_preproc_if_token2] = ACTIONS(723), + [aux_sym_preproc_ifdef_token1] = ACTIONS(723), + [aux_sym_preproc_ifdef_token2] = ACTIONS(723), + [aux_sym_preproc_else_token1] = ACTIONS(723), + [aux_sym_preproc_elif_token1] = ACTIONS(723), + [sym_preproc_directive] = ACTIONS(723), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_typedef] = ACTIONS(111), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(723), + [anon_sym___clrcall] = ACTIONS(723), + [anon_sym___stdcall] = ACTIONS(723), + [anon_sym___fastcall] = ACTIONS(723), + [anon_sym___thiscall] = ACTIONS(723), + [anon_sym___vectorcall] = ACTIONS(723), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(117), + [anon_sym_else] = ACTIONS(723), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(723), + [anon_sym_default] = ACTIONS(723), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [48] = { + [sym_declaration] = STATE(55), + [sym_type_definition] = STATE(55), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1011), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(55), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(55), + [sym_labeled_statement] = STATE(55), + [sym_expression_statement] = STATE(55), + [sym_if_statement] = STATE(55), + [sym_switch_statement] = STATE(55), + [sym_while_statement] = STATE(55), + [sym_do_statement] = STATE(55), + [sym_for_statement] = STATE(55), + [sym_return_statement] = STATE(55), + [sym_break_statement] = STATE(55), + [sym_continue_statement] = STATE(55), + [sym_goto_statement] = STATE(55), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(55), + [ts_builtin_sym_end] = ACTIONS(725), + [sym_identifier] = ACTIONS(727), + [aux_sym_preproc_include_token1] = ACTIONS(618), + [aux_sym_preproc_def_token1] = ACTIONS(618), + [aux_sym_preproc_if_token1] = ACTIONS(618), + [aux_sym_preproc_ifdef_token1] = ACTIONS(618), + [aux_sym_preproc_ifdef_token2] = ACTIONS(618), + [sym_preproc_directive] = ACTIONS(618), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_typedef] = ACTIONS(29), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(618), + [anon_sym___clrcall] = ACTIONS(618), + [anon_sym___stdcall] = ACTIONS(618), + [anon_sym___fastcall] = ACTIONS(618), + [anon_sym___thiscall] = ACTIONS(618), + [anon_sym___vectorcall] = ACTIONS(618), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(57), + [anon_sym_else] = ACTIONS(618), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(618), + [anon_sym_default] = ACTIONS(618), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [49] = { + [sym_declaration] = STATE(57), + [sym_type_definition] = STATE(57), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1010), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(57), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(57), + [sym_labeled_statement] = STATE(57), + [sym_expression_statement] = STATE(57), + [sym_if_statement] = STATE(57), + [sym_switch_statement] = STATE(57), + [sym_while_statement] = STATE(57), + [sym_do_statement] = STATE(57), + [sym_for_statement] = STATE(57), + [sym_return_statement] = STATE(57), + [sym_break_statement] = STATE(57), + [sym_continue_statement] = STATE(57), + [sym_goto_statement] = STATE(57), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(57), + [sym_identifier] = ACTIONS(729), + [aux_sym_preproc_include_token1] = ACTIONS(616), + [aux_sym_preproc_def_token1] = ACTIONS(616), + [aux_sym_preproc_if_token1] = ACTIONS(616), + [aux_sym_preproc_if_token2] = ACTIONS(616), + [aux_sym_preproc_ifdef_token1] = ACTIONS(616), + [aux_sym_preproc_ifdef_token2] = ACTIONS(616), + [sym_preproc_directive] = ACTIONS(616), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_typedef] = ACTIONS(507), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(616), + [anon_sym___clrcall] = ACTIONS(616), + [anon_sym___stdcall] = ACTIONS(616), + [anon_sym___fastcall] = ACTIONS(616), + [anon_sym___thiscall] = ACTIONS(616), + [anon_sym___vectorcall] = ACTIONS(616), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(513), + [anon_sym_else] = ACTIONS(616), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(616), + [anon_sym_default] = ACTIONS(616), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [50] = { + [sym_declaration] = STATE(50), + [sym_type_definition] = STATE(50), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1011), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(50), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(50), + [sym_labeled_statement] = STATE(50), + [sym_expression_statement] = STATE(50), + [sym_if_statement] = STATE(50), + [sym_switch_statement] = STATE(50), + [sym_while_statement] = STATE(50), + [sym_do_statement] = STATE(50), + [sym_for_statement] = STATE(50), + [sym_return_statement] = STATE(50), + [sym_break_statement] = STATE(50), + [sym_continue_statement] = STATE(50), + [sym_goto_statement] = STATE(50), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(50), + [ts_builtin_sym_end] = ACTIONS(731), + [sym_identifier] = ACTIONS(733), + [aux_sym_preproc_include_token1] = ACTIONS(623), + [aux_sym_preproc_def_token1] = ACTIONS(623), + [aux_sym_preproc_if_token1] = ACTIONS(623), + [aux_sym_preproc_ifdef_token1] = ACTIONS(623), + [aux_sym_preproc_ifdef_token2] = ACTIONS(623), + [sym_preproc_directive] = ACTIONS(623), + [anon_sym_LPAREN2] = ACTIONS(625), + [anon_sym_BANG] = ACTIONS(628), + [anon_sym_TILDE] = ACTIONS(628), + [anon_sym_DASH] = ACTIONS(631), + [anon_sym_PLUS] = ACTIONS(631), + [anon_sym_STAR] = ACTIONS(634), + [anon_sym_AMP] = ACTIONS(634), + [anon_sym_SEMI] = ACTIONS(736), + [anon_sym_typedef] = ACTIONS(739), + [anon_sym_extern] = ACTIONS(643), + [anon_sym___attribute__] = ACTIONS(646), + [anon_sym_LBRACK_LBRACK] = ACTIONS(649), + [anon_sym___declspec] = ACTIONS(652), + [anon_sym___cdecl] = ACTIONS(623), + [anon_sym___clrcall] = ACTIONS(623), + [anon_sym___stdcall] = ACTIONS(623), + [anon_sym___fastcall] = ACTIONS(623), + [anon_sym___thiscall] = ACTIONS(623), + [anon_sym___vectorcall] = ACTIONS(623), + [anon_sym_LBRACE] = ACTIONS(742), + [anon_sym_static] = ACTIONS(643), + [anon_sym_auto] = ACTIONS(643), + [anon_sym_register] = ACTIONS(643), + [anon_sym_inline] = ACTIONS(643), + [anon_sym_const] = ACTIONS(658), + [anon_sym_volatile] = ACTIONS(658), + [anon_sym_restrict] = ACTIONS(658), + [anon_sym__Atomic] = ACTIONS(658), + [anon_sym_signed] = ACTIONS(661), + [anon_sym_unsigned] = ACTIONS(661), + [anon_sym_long] = ACTIONS(661), + [anon_sym_short] = ACTIONS(661), + [sym_primitive_type] = ACTIONS(664), + [anon_sym_enum] = ACTIONS(667), + [anon_sym_struct] = ACTIONS(670), + [anon_sym_union] = ACTIONS(673), + [anon_sym_if] = ACTIONS(745), + [anon_sym_else] = ACTIONS(623), + [anon_sym_switch] = ACTIONS(748), + [anon_sym_case] = ACTIONS(623), + [anon_sym_default] = ACTIONS(623), + [anon_sym_while] = ACTIONS(751), + [anon_sym_do] = ACTIONS(754), + [anon_sym_for] = ACTIONS(757), + [anon_sym_return] = ACTIONS(760), + [anon_sym_break] = ACTIONS(763), + [anon_sym_continue] = ACTIONS(766), + [anon_sym_goto] = ACTIONS(769), + [anon_sym_DASH_DASH] = ACTIONS(703), + [anon_sym_PLUS_PLUS] = ACTIONS(703), + [anon_sym_sizeof] = ACTIONS(706), + [sym_number_literal] = ACTIONS(709), + [anon_sym_L_SQUOTE] = ACTIONS(712), + [anon_sym_u_SQUOTE] = ACTIONS(712), + [anon_sym_U_SQUOTE] = ACTIONS(712), + [anon_sym_u8_SQUOTE] = ACTIONS(712), + [anon_sym_SQUOTE] = ACTIONS(712), + [anon_sym_L_DQUOTE] = ACTIONS(715), + [anon_sym_u_DQUOTE] = ACTIONS(715), + [anon_sym_U_DQUOTE] = ACTIONS(715), + [anon_sym_u8_DQUOTE] = ACTIONS(715), + [anon_sym_DQUOTE] = ACTIONS(715), + [sym_true] = ACTIONS(718), + [sym_false] = ACTIONS(718), + [sym_null] = ACTIONS(718), + [sym_comment] = ACTIONS(3), + }, + [51] = { + [sym_declaration] = STATE(49), + [sym_type_definition] = STATE(49), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1010), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(49), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(49), + [sym_labeled_statement] = STATE(49), + [sym_expression_statement] = STATE(49), + [sym_if_statement] = STATE(49), + [sym_switch_statement] = STATE(49), + [sym_while_statement] = STATE(49), + [sym_do_statement] = STATE(49), + [sym_for_statement] = STATE(49), + [sym_return_statement] = STATE(49), + [sym_break_statement] = STATE(49), + [sym_continue_statement] = STATE(49), + [sym_goto_statement] = STATE(49), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(49), + [sym_identifier] = ACTIONS(729), + [aux_sym_preproc_include_token1] = ACTIONS(618), + [aux_sym_preproc_def_token1] = ACTIONS(618), + [aux_sym_preproc_if_token1] = ACTIONS(618), + [aux_sym_preproc_if_token2] = ACTIONS(618), + [aux_sym_preproc_ifdef_token1] = ACTIONS(618), + [aux_sym_preproc_ifdef_token2] = ACTIONS(618), + [sym_preproc_directive] = ACTIONS(618), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_typedef] = ACTIONS(507), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(618), + [anon_sym___clrcall] = ACTIONS(618), + [anon_sym___stdcall] = ACTIONS(618), + [anon_sym___fastcall] = ACTIONS(618), + [anon_sym___thiscall] = ACTIONS(618), + [anon_sym___vectorcall] = ACTIONS(618), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(513), + [anon_sym_else] = ACTIONS(618), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(618), + [anon_sym_default] = ACTIONS(618), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [52] = { + [sym_declaration] = STATE(56), + [sym_type_definition] = STATE(56), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1010), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(56), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(56), + [sym_labeled_statement] = STATE(56), + [sym_expression_statement] = STATE(56), + [sym_if_statement] = STATE(56), + [sym_switch_statement] = STATE(56), + [sym_while_statement] = STATE(56), + [sym_do_statement] = STATE(56), + [sym_for_statement] = STATE(56), + [sym_return_statement] = STATE(56), + [sym_break_statement] = STATE(56), + [sym_continue_statement] = STATE(56), + [sym_goto_statement] = STATE(56), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(56), + [sym_identifier] = ACTIONS(729), + [aux_sym_preproc_include_token1] = ACTIONS(721), + [aux_sym_preproc_def_token1] = ACTIONS(721), + [aux_sym_preproc_if_token1] = ACTIONS(721), + [aux_sym_preproc_if_token2] = ACTIONS(721), + [aux_sym_preproc_ifdef_token1] = ACTIONS(721), + [aux_sym_preproc_ifdef_token2] = ACTIONS(721), + [sym_preproc_directive] = ACTIONS(721), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_typedef] = ACTIONS(507), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(721), + [anon_sym___clrcall] = ACTIONS(721), + [anon_sym___stdcall] = ACTIONS(721), + [anon_sym___fastcall] = ACTIONS(721), + [anon_sym___thiscall] = ACTIONS(721), + [anon_sym___vectorcall] = ACTIONS(721), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(513), + [anon_sym_else] = ACTIONS(721), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(721), + [anon_sym_default] = ACTIONS(721), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [53] = { + [sym_declaration] = STATE(54), + [sym_type_definition] = STATE(54), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1011), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(54), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(54), + [sym_labeled_statement] = STATE(54), + [sym_expression_statement] = STATE(54), + [sym_if_statement] = STATE(54), + [sym_switch_statement] = STATE(54), + [sym_while_statement] = STATE(54), + [sym_do_statement] = STATE(54), + [sym_for_statement] = STATE(54), + [sym_return_statement] = STATE(54), + [sym_break_statement] = STATE(54), + [sym_continue_statement] = STATE(54), + [sym_goto_statement] = STATE(54), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(54), + [ts_builtin_sym_end] = ACTIONS(772), + [sym_identifier] = ACTIONS(727), + [aux_sym_preproc_include_token1] = ACTIONS(721), + [aux_sym_preproc_def_token1] = ACTIONS(721), + [aux_sym_preproc_if_token1] = ACTIONS(721), + [aux_sym_preproc_ifdef_token1] = ACTIONS(721), + [aux_sym_preproc_ifdef_token2] = ACTIONS(721), + [sym_preproc_directive] = ACTIONS(721), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_typedef] = ACTIONS(29), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(721), + [anon_sym___clrcall] = ACTIONS(721), + [anon_sym___stdcall] = ACTIONS(721), + [anon_sym___fastcall] = ACTIONS(721), + [anon_sym___thiscall] = ACTIONS(721), + [anon_sym___vectorcall] = ACTIONS(721), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(57), + [anon_sym_else] = ACTIONS(721), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(721), + [anon_sym_default] = ACTIONS(721), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [54] = { + [sym_declaration] = STATE(50), + [sym_type_definition] = STATE(50), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1011), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(50), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(50), + [sym_labeled_statement] = STATE(50), + [sym_expression_statement] = STATE(50), + [sym_if_statement] = STATE(50), + [sym_switch_statement] = STATE(50), + [sym_while_statement] = STATE(50), + [sym_do_statement] = STATE(50), + [sym_for_statement] = STATE(50), + [sym_return_statement] = STATE(50), + [sym_break_statement] = STATE(50), + [sym_continue_statement] = STATE(50), + [sym_goto_statement] = STATE(50), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(50), + [ts_builtin_sym_end] = ACTIONS(774), + [sym_identifier] = ACTIONS(727), + [aux_sym_preproc_include_token1] = ACTIONS(723), + [aux_sym_preproc_def_token1] = ACTIONS(723), + [aux_sym_preproc_if_token1] = ACTIONS(723), + [aux_sym_preproc_ifdef_token1] = ACTIONS(723), + [aux_sym_preproc_ifdef_token2] = ACTIONS(723), + [sym_preproc_directive] = ACTIONS(723), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_typedef] = ACTIONS(29), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(723), + [anon_sym___clrcall] = ACTIONS(723), + [anon_sym___stdcall] = ACTIONS(723), + [anon_sym___fastcall] = ACTIONS(723), + [anon_sym___thiscall] = ACTIONS(723), + [anon_sym___vectorcall] = ACTIONS(723), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(57), + [anon_sym_else] = ACTIONS(723), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(723), + [anon_sym_default] = ACTIONS(723), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [55] = { + [sym_declaration] = STATE(50), + [sym_type_definition] = STATE(50), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1011), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(50), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(50), + [sym_labeled_statement] = STATE(50), + [sym_expression_statement] = STATE(50), + [sym_if_statement] = STATE(50), + [sym_switch_statement] = STATE(50), + [sym_while_statement] = STATE(50), + [sym_do_statement] = STATE(50), + [sym_for_statement] = STATE(50), + [sym_return_statement] = STATE(50), + [sym_break_statement] = STATE(50), + [sym_continue_statement] = STATE(50), + [sym_goto_statement] = STATE(50), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(50), + [ts_builtin_sym_end] = ACTIONS(776), + [sym_identifier] = ACTIONS(727), + [aux_sym_preproc_include_token1] = ACTIONS(616), + [aux_sym_preproc_def_token1] = ACTIONS(616), + [aux_sym_preproc_if_token1] = ACTIONS(616), + [aux_sym_preproc_ifdef_token1] = ACTIONS(616), + [aux_sym_preproc_ifdef_token2] = ACTIONS(616), + [sym_preproc_directive] = ACTIONS(616), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_typedef] = ACTIONS(29), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(616), + [anon_sym___clrcall] = ACTIONS(616), + [anon_sym___stdcall] = ACTIONS(616), + [anon_sym___fastcall] = ACTIONS(616), + [anon_sym___thiscall] = ACTIONS(616), + [anon_sym___vectorcall] = ACTIONS(616), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(57), + [anon_sym_else] = ACTIONS(616), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(616), + [anon_sym_default] = ACTIONS(616), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [56] = { + [sym_declaration] = STATE(57), + [sym_type_definition] = STATE(57), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1010), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(57), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(57), + [sym_labeled_statement] = STATE(57), + [sym_expression_statement] = STATE(57), + [sym_if_statement] = STATE(57), + [sym_switch_statement] = STATE(57), + [sym_while_statement] = STATE(57), + [sym_do_statement] = STATE(57), + [sym_for_statement] = STATE(57), + [sym_return_statement] = STATE(57), + [sym_break_statement] = STATE(57), + [sym_continue_statement] = STATE(57), + [sym_goto_statement] = STATE(57), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(57), + [sym_identifier] = ACTIONS(729), + [aux_sym_preproc_include_token1] = ACTIONS(723), + [aux_sym_preproc_def_token1] = ACTIONS(723), + [aux_sym_preproc_if_token1] = ACTIONS(723), + [aux_sym_preproc_if_token2] = ACTIONS(723), + [aux_sym_preproc_ifdef_token1] = ACTIONS(723), + [aux_sym_preproc_ifdef_token2] = ACTIONS(723), + [sym_preproc_directive] = ACTIONS(723), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_typedef] = ACTIONS(507), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(723), + [anon_sym___clrcall] = ACTIONS(723), + [anon_sym___stdcall] = ACTIONS(723), + [anon_sym___fastcall] = ACTIONS(723), + [anon_sym___thiscall] = ACTIONS(723), + [anon_sym___vectorcall] = ACTIONS(723), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(513), + [anon_sym_else] = ACTIONS(723), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(723), + [anon_sym_default] = ACTIONS(723), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [57] = { + [sym_declaration] = STATE(57), + [sym_type_definition] = STATE(57), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1010), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(57), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(57), + [sym_labeled_statement] = STATE(57), + [sym_expression_statement] = STATE(57), + [sym_if_statement] = STATE(57), + [sym_switch_statement] = STATE(57), + [sym_while_statement] = STATE(57), + [sym_do_statement] = STATE(57), + [sym_for_statement] = STATE(57), + [sym_return_statement] = STATE(57), + [sym_break_statement] = STATE(57), + [sym_continue_statement] = STATE(57), + [sym_goto_statement] = STATE(57), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(57), + [sym_identifier] = ACTIONS(778), + [aux_sym_preproc_include_token1] = ACTIONS(623), + [aux_sym_preproc_def_token1] = ACTIONS(623), + [aux_sym_preproc_if_token1] = ACTIONS(623), + [aux_sym_preproc_if_token2] = ACTIONS(623), + [aux_sym_preproc_ifdef_token1] = ACTIONS(623), + [aux_sym_preproc_ifdef_token2] = ACTIONS(623), + [sym_preproc_directive] = ACTIONS(623), + [anon_sym_LPAREN2] = ACTIONS(625), + [anon_sym_BANG] = ACTIONS(628), + [anon_sym_TILDE] = ACTIONS(628), + [anon_sym_DASH] = ACTIONS(631), + [anon_sym_PLUS] = ACTIONS(631), + [anon_sym_STAR] = ACTIONS(634), + [anon_sym_AMP] = ACTIONS(634), + [anon_sym_SEMI] = ACTIONS(781), + [anon_sym_typedef] = ACTIONS(784), + [anon_sym_extern] = ACTIONS(643), + [anon_sym___attribute__] = ACTIONS(646), + [anon_sym_LBRACK_LBRACK] = ACTIONS(649), + [anon_sym___declspec] = ACTIONS(652), + [anon_sym___cdecl] = ACTIONS(623), + [anon_sym___clrcall] = ACTIONS(623), + [anon_sym___stdcall] = ACTIONS(623), + [anon_sym___fastcall] = ACTIONS(623), + [anon_sym___thiscall] = ACTIONS(623), + [anon_sym___vectorcall] = ACTIONS(623), + [anon_sym_LBRACE] = ACTIONS(787), + [anon_sym_static] = ACTIONS(643), + [anon_sym_auto] = ACTIONS(643), + [anon_sym_register] = ACTIONS(643), + [anon_sym_inline] = ACTIONS(643), + [anon_sym_const] = ACTIONS(658), + [anon_sym_volatile] = ACTIONS(658), + [anon_sym_restrict] = ACTIONS(658), + [anon_sym__Atomic] = ACTIONS(658), + [anon_sym_signed] = ACTIONS(661), + [anon_sym_unsigned] = ACTIONS(661), + [anon_sym_long] = ACTIONS(661), + [anon_sym_short] = ACTIONS(661), + [sym_primitive_type] = ACTIONS(664), + [anon_sym_enum] = ACTIONS(667), + [anon_sym_struct] = ACTIONS(670), + [anon_sym_union] = ACTIONS(673), + [anon_sym_if] = ACTIONS(790), + [anon_sym_else] = ACTIONS(623), + [anon_sym_switch] = ACTIONS(793), + [anon_sym_case] = ACTIONS(623), + [anon_sym_default] = ACTIONS(623), + [anon_sym_while] = ACTIONS(796), + [anon_sym_do] = ACTIONS(799), + [anon_sym_for] = ACTIONS(802), + [anon_sym_return] = ACTIONS(805), + [anon_sym_break] = ACTIONS(808), + [anon_sym_continue] = ACTIONS(811), + [anon_sym_goto] = ACTIONS(814), + [anon_sym_DASH_DASH] = ACTIONS(703), + [anon_sym_PLUS_PLUS] = ACTIONS(703), + [anon_sym_sizeof] = ACTIONS(706), + [sym_number_literal] = ACTIONS(709), + [anon_sym_L_SQUOTE] = ACTIONS(712), + [anon_sym_u_SQUOTE] = ACTIONS(712), + [anon_sym_U_SQUOTE] = ACTIONS(712), + [anon_sym_u8_SQUOTE] = ACTIONS(712), + [anon_sym_SQUOTE] = ACTIONS(712), + [anon_sym_L_DQUOTE] = ACTIONS(715), + [anon_sym_u_DQUOTE] = ACTIONS(715), + [anon_sym_U_DQUOTE] = ACTIONS(715), + [anon_sym_u8_DQUOTE] = ACTIONS(715), + [anon_sym_DQUOTE] = ACTIONS(715), + [sym_true] = ACTIONS(718), + [sym_false] = ACTIONS(718), + [sym_null] = ACTIONS(718), + [sym_comment] = ACTIONS(3), + }, + [58] = { + [sym_declaration] = STATE(60), + [sym_type_definition] = STATE(60), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1005), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(60), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(60), + [sym_labeled_statement] = STATE(60), + [sym_expression_statement] = STATE(60), + [sym_if_statement] = STATE(60), + [sym_switch_statement] = STATE(60), + [sym_while_statement] = STATE(60), + [sym_do_statement] = STATE(60), + [sym_for_statement] = STATE(60), + [sym_return_statement] = STATE(60), + [sym_break_statement] = STATE(60), + [sym_continue_statement] = STATE(60), + [sym_goto_statement] = STATE(60), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(60), + [sym_identifier] = ACTIONS(817), + [aux_sym_preproc_include_token1] = ACTIONS(721), + [aux_sym_preproc_def_token1] = ACTIONS(721), + [aux_sym_preproc_if_token1] = ACTIONS(721), + [aux_sym_preproc_ifdef_token1] = ACTIONS(721), + [aux_sym_preproc_ifdef_token2] = ACTIONS(721), + [sym_preproc_directive] = ACTIONS(721), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(721), + [anon_sym___clrcall] = ACTIONS(721), + [anon_sym___stdcall] = ACTIONS(721), + [anon_sym___fastcall] = ACTIONS(721), + [anon_sym___thiscall] = ACTIONS(721), + [anon_sym___vectorcall] = ACTIONS(721), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(772), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_else] = ACTIONS(721), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(721), + [anon_sym_default] = ACTIONS(721), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [59] = { + [sym_declaration] = STATE(61), + [sym_type_definition] = STATE(61), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1005), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(61), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(61), + [sym_labeled_statement] = STATE(61), + [sym_expression_statement] = STATE(61), + [sym_if_statement] = STATE(61), + [sym_switch_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_do_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_return_statement] = STATE(61), + [sym_break_statement] = STATE(61), + [sym_continue_statement] = STATE(61), + [sym_goto_statement] = STATE(61), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(61), + [sym_identifier] = ACTIONS(817), + [aux_sym_preproc_include_token1] = ACTIONS(618), + [aux_sym_preproc_def_token1] = ACTIONS(618), + [aux_sym_preproc_if_token1] = ACTIONS(618), + [aux_sym_preproc_ifdef_token1] = ACTIONS(618), + [aux_sym_preproc_ifdef_token2] = ACTIONS(618), + [sym_preproc_directive] = ACTIONS(618), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(618), + [anon_sym___clrcall] = ACTIONS(618), + [anon_sym___stdcall] = ACTIONS(618), + [anon_sym___fastcall] = ACTIONS(618), + [anon_sym___thiscall] = ACTIONS(618), + [anon_sym___vectorcall] = ACTIONS(618), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(725), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_else] = ACTIONS(618), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(618), + [anon_sym_default] = ACTIONS(618), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [60] = { + [sym_declaration] = STATE(62), + [sym_type_definition] = STATE(62), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1005), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(62), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(62), + [sym_labeled_statement] = STATE(62), + [sym_expression_statement] = STATE(62), + [sym_if_statement] = STATE(62), + [sym_switch_statement] = STATE(62), + [sym_while_statement] = STATE(62), + [sym_do_statement] = STATE(62), + [sym_for_statement] = STATE(62), + [sym_return_statement] = STATE(62), + [sym_break_statement] = STATE(62), + [sym_continue_statement] = STATE(62), + [sym_goto_statement] = STATE(62), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(62), + [sym_identifier] = ACTIONS(817), + [aux_sym_preproc_include_token1] = ACTIONS(723), + [aux_sym_preproc_def_token1] = ACTIONS(723), + [aux_sym_preproc_if_token1] = ACTIONS(723), + [aux_sym_preproc_ifdef_token1] = ACTIONS(723), + [aux_sym_preproc_ifdef_token2] = ACTIONS(723), + [sym_preproc_directive] = ACTIONS(723), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(723), + [anon_sym___clrcall] = ACTIONS(723), + [anon_sym___stdcall] = ACTIONS(723), + [anon_sym___fastcall] = ACTIONS(723), + [anon_sym___thiscall] = ACTIONS(723), + [anon_sym___vectorcall] = ACTIONS(723), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(774), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_else] = ACTIONS(723), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(723), + [anon_sym_default] = ACTIONS(723), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [61] = { + [sym_declaration] = STATE(62), + [sym_type_definition] = STATE(62), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1005), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(62), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(62), + [sym_labeled_statement] = STATE(62), + [sym_expression_statement] = STATE(62), + [sym_if_statement] = STATE(62), + [sym_switch_statement] = STATE(62), + [sym_while_statement] = STATE(62), + [sym_do_statement] = STATE(62), + [sym_for_statement] = STATE(62), + [sym_return_statement] = STATE(62), + [sym_break_statement] = STATE(62), + [sym_continue_statement] = STATE(62), + [sym_goto_statement] = STATE(62), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(62), + [sym_identifier] = ACTIONS(817), + [aux_sym_preproc_include_token1] = ACTIONS(616), + [aux_sym_preproc_def_token1] = ACTIONS(616), + [aux_sym_preproc_if_token1] = ACTIONS(616), + [aux_sym_preproc_ifdef_token1] = ACTIONS(616), + [aux_sym_preproc_ifdef_token2] = ACTIONS(616), + [sym_preproc_directive] = ACTIONS(616), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_typedef] = ACTIONS(315), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(35), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym___cdecl] = ACTIONS(616), + [anon_sym___clrcall] = ACTIONS(616), + [anon_sym___stdcall] = ACTIONS(616), + [anon_sym___fastcall] = ACTIONS(616), + [anon_sym___thiscall] = ACTIONS(616), + [anon_sym___vectorcall] = ACTIONS(616), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_RBRACE] = ACTIONS(776), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_if] = ACTIONS(323), + [anon_sym_else] = ACTIONS(616), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(616), + [anon_sym_default] = ACTIONS(616), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [62] = { + [sym_declaration] = STATE(62), + [sym_type_definition] = STATE(62), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1005), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(385), + [sym_ms_declspec_modifier] = STATE(645), + [sym_compound_statement] = STATE(62), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym_attributed_statement] = STATE(62), + [sym_labeled_statement] = STATE(62), + [sym_expression_statement] = STATE(62), + [sym_if_statement] = STATE(62), + [sym_switch_statement] = STATE(62), + [sym_while_statement] = STATE(62), + [sym_do_statement] = STATE(62), + [sym_for_statement] = STATE(62), + [sym_return_statement] = STATE(62), + [sym_break_statement] = STATE(62), + [sym_continue_statement] = STATE(62), + [sym_goto_statement] = STATE(62), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [aux_sym_case_statement_repeat1] = STATE(62), + [sym_identifier] = ACTIONS(819), + [aux_sym_preproc_include_token1] = ACTIONS(623), + [aux_sym_preproc_def_token1] = ACTIONS(623), + [aux_sym_preproc_if_token1] = ACTIONS(623), + [aux_sym_preproc_ifdef_token1] = ACTIONS(623), + [aux_sym_preproc_ifdef_token2] = ACTIONS(623), + [sym_preproc_directive] = ACTIONS(623), + [anon_sym_LPAREN2] = ACTIONS(625), + [anon_sym_BANG] = ACTIONS(628), + [anon_sym_TILDE] = ACTIONS(628), + [anon_sym_DASH] = ACTIONS(631), + [anon_sym_PLUS] = ACTIONS(631), + [anon_sym_STAR] = ACTIONS(634), + [anon_sym_AMP] = ACTIONS(634), + [anon_sym_SEMI] = ACTIONS(822), + [anon_sym_typedef] = ACTIONS(825), + [anon_sym_extern] = ACTIONS(643), + [anon_sym___attribute__] = ACTIONS(646), + [anon_sym_LBRACK_LBRACK] = ACTIONS(649), + [anon_sym___declspec] = ACTIONS(652), + [anon_sym___cdecl] = ACTIONS(623), + [anon_sym___clrcall] = ACTIONS(623), + [anon_sym___stdcall] = ACTIONS(623), + [anon_sym___fastcall] = ACTIONS(623), + [anon_sym___thiscall] = ACTIONS(623), + [anon_sym___vectorcall] = ACTIONS(623), + [anon_sym_LBRACE] = ACTIONS(828), + [anon_sym_RBRACE] = ACTIONS(731), + [anon_sym_static] = ACTIONS(643), + [anon_sym_auto] = ACTIONS(643), + [anon_sym_register] = ACTIONS(643), + [anon_sym_inline] = ACTIONS(643), + [anon_sym_const] = ACTIONS(658), + [anon_sym_volatile] = ACTIONS(658), + [anon_sym_restrict] = ACTIONS(658), + [anon_sym__Atomic] = ACTIONS(658), + [anon_sym_signed] = ACTIONS(661), + [anon_sym_unsigned] = ACTIONS(661), + [anon_sym_long] = ACTIONS(661), + [anon_sym_short] = ACTIONS(661), + [sym_primitive_type] = ACTIONS(664), + [anon_sym_enum] = ACTIONS(667), + [anon_sym_struct] = ACTIONS(670), + [anon_sym_union] = ACTIONS(673), + [anon_sym_if] = ACTIONS(831), + [anon_sym_else] = ACTIONS(623), + [anon_sym_switch] = ACTIONS(834), + [anon_sym_case] = ACTIONS(623), + [anon_sym_default] = ACTIONS(623), + [anon_sym_while] = ACTIONS(837), + [anon_sym_do] = ACTIONS(840), + [anon_sym_for] = ACTIONS(843), + [anon_sym_return] = ACTIONS(846), + [anon_sym_break] = ACTIONS(849), + [anon_sym_continue] = ACTIONS(852), + [anon_sym_goto] = ACTIONS(855), + [anon_sym_DASH_DASH] = ACTIONS(703), + [anon_sym_PLUS_PLUS] = ACTIONS(703), + [anon_sym_sizeof] = ACTIONS(706), + [sym_number_literal] = ACTIONS(709), + [anon_sym_L_SQUOTE] = ACTIONS(712), + [anon_sym_u_SQUOTE] = ACTIONS(712), + [anon_sym_U_SQUOTE] = ACTIONS(712), + [anon_sym_u8_SQUOTE] = ACTIONS(712), + [anon_sym_SQUOTE] = ACTIONS(712), + [anon_sym_L_DQUOTE] = ACTIONS(715), + [anon_sym_u_DQUOTE] = ACTIONS(715), + [anon_sym_U_DQUOTE] = ACTIONS(715), + [anon_sym_u8_DQUOTE] = ACTIONS(715), + [anon_sym_DQUOTE] = ACTIONS(715), + [sym_true] = ACTIONS(718), + [sym_false] = ACTIONS(718), + [sym_null] = ACTIONS(718), + [sym_comment] = ACTIONS(3), + }, + [63] = { + [sym_declaration] = STATE(473), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1011), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(645), + [sym_ms_declspec_modifier] = STATE(645), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym__expression] = STATE(729), + [sym_comma_expression] = STATE(1367), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(858), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(860), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(862), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [64] = { + [sym_declaration] = STATE(446), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1011), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(645), + [sym_ms_declspec_modifier] = STATE(645), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym__expression] = STATE(737), + [sym_comma_expression] = STATE(1439), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(858), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(864), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(862), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [65] = { + [sym_declaration] = STATE(479), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1011), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(645), + [sym_ms_declspec_modifier] = STATE(645), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym__expression] = STATE(717), + [sym_comma_expression] = STATE(1449), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(858), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(866), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(862), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [66] = { + [sym_declaration] = STATE(456), + [sym__declaration_modifiers] = STATE(645), + [sym__declaration_specifiers] = STATE(1011), + [sym_attribute_specifier] = STATE(645), + [sym_attribute_declaration] = STATE(645), + [sym_ms_declspec_modifier] = STATE(645), + [sym_storage_class_specifier] = STATE(645), + [sym_type_qualifier] = STATE(645), + [sym__type_specifier] = STATE(707), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym__expression] = STATE(703), + [sym_comma_expression] = STATE(1457), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym__declaration_specifiers_repeat1] = STATE(645), + [aux_sym_sized_type_specifier_repeat1] = STATE(758), + [sym_identifier] = ACTIONS(858), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(868), + [anon_sym_extern] = ACTIONS(43), + [anon_sym___attribute__] = ACTIONS(33), + [anon_sym_LBRACK_LBRACK] = ACTIONS(862), + [anon_sym___declspec] = ACTIONS(37), + [anon_sym_static] = ACTIONS(43), + [anon_sym_auto] = ACTIONS(43), + [anon_sym_register] = ACTIONS(43), + [anon_sym_inline] = ACTIONS(43), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(47), + [anon_sym_unsigned] = ACTIONS(47), + [anon_sym_long] = ACTIONS(47), + [anon_sym_short] = ACTIONS(47), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [67] = { + [sym__expression] = STATE(506), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(527), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(527), + [sym_call_expression] = STATE(527), + [sym_field_expression] = STATE(527), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(527), + [sym_initializer_list] = STATE(516), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_identifier] = ACTIONS(870), + [anon_sym_COMMA] = ACTIONS(872), + [anon_sym_RPAREN] = ACTIONS(872), + [anon_sym_LPAREN2] = ACTIONS(874), + [anon_sym_BANG] = ACTIONS(876), + [anon_sym_TILDE] = ACTIONS(878), + [anon_sym_DASH] = ACTIONS(876), + [anon_sym_PLUS] = ACTIONS(876), + [anon_sym_STAR] = ACTIONS(880), + [anon_sym_SLASH] = ACTIONS(882), + [anon_sym_PERCENT] = ACTIONS(882), + [anon_sym_PIPE_PIPE] = ACTIONS(872), + [anon_sym_AMP_AMP] = ACTIONS(872), + [anon_sym_PIPE] = ACTIONS(882), + [anon_sym_CARET] = ACTIONS(882), + [anon_sym_AMP] = ACTIONS(880), + [anon_sym_EQ_EQ] = ACTIONS(872), + [anon_sym_BANG_EQ] = ACTIONS(872), + [anon_sym_GT] = ACTIONS(882), + [anon_sym_GT_EQ] = ACTIONS(872), + [anon_sym_LT_EQ] = ACTIONS(872), + [anon_sym_LT] = ACTIONS(882), + [anon_sym_LT_LT] = ACTIONS(882), + [anon_sym_GT_GT] = ACTIONS(882), + [anon_sym_SEMI] = ACTIONS(872), + [anon_sym_LBRACE] = ACTIONS(884), + [anon_sym_RBRACE] = ACTIONS(872), + [anon_sym_LBRACK] = ACTIONS(872), + [anon_sym_EQ] = ACTIONS(882), + [anon_sym_COLON] = ACTIONS(872), + [anon_sym_QMARK] = ACTIONS(872), + [anon_sym_STAR_EQ] = ACTIONS(872), + [anon_sym_SLASH_EQ] = ACTIONS(872), + [anon_sym_PERCENT_EQ] = ACTIONS(872), + [anon_sym_PLUS_EQ] = ACTIONS(872), + [anon_sym_DASH_EQ] = ACTIONS(872), + [anon_sym_LT_LT_EQ] = ACTIONS(872), + [anon_sym_GT_GT_EQ] = ACTIONS(872), + [anon_sym_AMP_EQ] = ACTIONS(872), + [anon_sym_CARET_EQ] = ACTIONS(872), + [anon_sym_PIPE_EQ] = ACTIONS(872), + [anon_sym_DASH_DASH] = ACTIONS(886), + [anon_sym_PLUS_PLUS] = ACTIONS(886), + [anon_sym_sizeof] = ACTIONS(888), + [anon_sym_DOT] = ACTIONS(882), + [anon_sym_DASH_GT] = ACTIONS(872), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [68] = { + [sym_identifier] = ACTIONS(890), + [aux_sym_preproc_include_token1] = ACTIONS(890), + [aux_sym_preproc_def_token1] = ACTIONS(890), + [aux_sym_preproc_if_token1] = ACTIONS(890), + [aux_sym_preproc_if_token2] = ACTIONS(890), + [aux_sym_preproc_ifdef_token1] = ACTIONS(890), + [aux_sym_preproc_ifdef_token2] = ACTIONS(890), + [aux_sym_preproc_else_token1] = ACTIONS(890), + [aux_sym_preproc_elif_token1] = ACTIONS(890), + [sym_preproc_directive] = ACTIONS(890), + [anon_sym_LPAREN2] = ACTIONS(892), + [anon_sym_BANG] = ACTIONS(892), + [anon_sym_TILDE] = ACTIONS(892), + [anon_sym_DASH] = ACTIONS(890), + [anon_sym_PLUS] = ACTIONS(890), + [anon_sym_STAR] = ACTIONS(892), + [anon_sym_AMP] = ACTIONS(892), + [anon_sym_SEMI] = ACTIONS(892), + [anon_sym_typedef] = ACTIONS(890), + [anon_sym_extern] = ACTIONS(890), + [anon_sym___attribute__] = ACTIONS(890), + [anon_sym_LBRACK_LBRACK] = ACTIONS(892), + [anon_sym___declspec] = ACTIONS(890), + [anon_sym___cdecl] = ACTIONS(890), + [anon_sym___clrcall] = ACTIONS(890), + [anon_sym___stdcall] = ACTIONS(890), + [anon_sym___fastcall] = ACTIONS(890), + [anon_sym___thiscall] = ACTIONS(890), + [anon_sym___vectorcall] = ACTIONS(890), + [anon_sym_LBRACE] = ACTIONS(892), + [anon_sym_static] = ACTIONS(890), + [anon_sym_auto] = ACTIONS(890), + [anon_sym_register] = ACTIONS(890), + [anon_sym_inline] = ACTIONS(890), + [anon_sym_const] = ACTIONS(890), + [anon_sym_volatile] = ACTIONS(890), + [anon_sym_restrict] = ACTIONS(890), + [anon_sym__Atomic] = ACTIONS(890), + [anon_sym_signed] = ACTIONS(890), + [anon_sym_unsigned] = ACTIONS(890), + [anon_sym_long] = ACTIONS(890), + [anon_sym_short] = ACTIONS(890), + [sym_primitive_type] = ACTIONS(890), + [anon_sym_enum] = ACTIONS(890), + [anon_sym_struct] = ACTIONS(890), + [anon_sym_union] = ACTIONS(890), + [anon_sym_if] = ACTIONS(890), + [anon_sym_else] = ACTIONS(890), + [anon_sym_switch] = ACTIONS(890), + [anon_sym_case] = ACTIONS(890), + [anon_sym_default] = ACTIONS(890), + [anon_sym_while] = ACTIONS(890), + [anon_sym_do] = ACTIONS(890), + [anon_sym_for] = ACTIONS(890), + [anon_sym_return] = ACTIONS(890), + [anon_sym_break] = ACTIONS(890), + [anon_sym_continue] = ACTIONS(890), + [anon_sym_goto] = ACTIONS(890), + [anon_sym_DASH_DASH] = ACTIONS(892), + [anon_sym_PLUS_PLUS] = ACTIONS(892), + [anon_sym_sizeof] = ACTIONS(890), + [sym_number_literal] = ACTIONS(892), + [anon_sym_L_SQUOTE] = ACTIONS(892), + [anon_sym_u_SQUOTE] = ACTIONS(892), + [anon_sym_U_SQUOTE] = ACTIONS(892), + [anon_sym_u8_SQUOTE] = ACTIONS(892), + [anon_sym_SQUOTE] = ACTIONS(892), + [anon_sym_L_DQUOTE] = ACTIONS(892), + [anon_sym_u_DQUOTE] = ACTIONS(892), + [anon_sym_U_DQUOTE] = ACTIONS(892), + [anon_sym_u8_DQUOTE] = ACTIONS(892), + [anon_sym_DQUOTE] = ACTIONS(892), + [sym_true] = ACTIONS(890), + [sym_false] = ACTIONS(890), + [sym_null] = ACTIONS(890), + [sym_comment] = ACTIONS(3), + }, + [69] = { + [sym_identifier] = ACTIONS(894), + [aux_sym_preproc_include_token1] = ACTIONS(894), + [aux_sym_preproc_def_token1] = ACTIONS(894), + [aux_sym_preproc_if_token1] = ACTIONS(894), + [aux_sym_preproc_if_token2] = ACTIONS(894), + [aux_sym_preproc_ifdef_token1] = ACTIONS(894), + [aux_sym_preproc_ifdef_token2] = ACTIONS(894), + [aux_sym_preproc_else_token1] = ACTIONS(894), + [aux_sym_preproc_elif_token1] = ACTIONS(894), + [sym_preproc_directive] = ACTIONS(894), + [anon_sym_LPAREN2] = ACTIONS(896), + [anon_sym_BANG] = ACTIONS(896), + [anon_sym_TILDE] = ACTIONS(896), + [anon_sym_DASH] = ACTIONS(894), + [anon_sym_PLUS] = ACTIONS(894), + [anon_sym_STAR] = ACTIONS(896), + [anon_sym_AMP] = ACTIONS(896), + [anon_sym_SEMI] = ACTIONS(896), + [anon_sym_typedef] = ACTIONS(894), + [anon_sym_extern] = ACTIONS(894), + [anon_sym___attribute__] = ACTIONS(894), + [anon_sym_LBRACK_LBRACK] = ACTIONS(896), + [anon_sym___declspec] = ACTIONS(894), + [anon_sym___cdecl] = ACTIONS(894), + [anon_sym___clrcall] = ACTIONS(894), + [anon_sym___stdcall] = ACTIONS(894), + [anon_sym___fastcall] = ACTIONS(894), + [anon_sym___thiscall] = ACTIONS(894), + [anon_sym___vectorcall] = ACTIONS(894), + [anon_sym_LBRACE] = ACTIONS(896), + [anon_sym_static] = ACTIONS(894), + [anon_sym_auto] = ACTIONS(894), + [anon_sym_register] = ACTIONS(894), + [anon_sym_inline] = ACTIONS(894), + [anon_sym_const] = ACTIONS(894), + [anon_sym_volatile] = ACTIONS(894), + [anon_sym_restrict] = ACTIONS(894), + [anon_sym__Atomic] = ACTIONS(894), + [anon_sym_signed] = ACTIONS(894), + [anon_sym_unsigned] = ACTIONS(894), + [anon_sym_long] = ACTIONS(894), + [anon_sym_short] = ACTIONS(894), + [sym_primitive_type] = ACTIONS(894), + [anon_sym_enum] = ACTIONS(894), + [anon_sym_struct] = ACTIONS(894), + [anon_sym_union] = ACTIONS(894), + [anon_sym_if] = ACTIONS(894), + [anon_sym_else] = ACTIONS(894), + [anon_sym_switch] = ACTIONS(894), + [anon_sym_case] = ACTIONS(894), + [anon_sym_default] = ACTIONS(894), + [anon_sym_while] = ACTIONS(894), + [anon_sym_do] = ACTIONS(894), + [anon_sym_for] = ACTIONS(894), + [anon_sym_return] = ACTIONS(894), + [anon_sym_break] = ACTIONS(894), + [anon_sym_continue] = ACTIONS(894), + [anon_sym_goto] = ACTIONS(894), + [anon_sym_DASH_DASH] = ACTIONS(896), + [anon_sym_PLUS_PLUS] = ACTIONS(896), + [anon_sym_sizeof] = ACTIONS(894), + [sym_number_literal] = ACTIONS(896), + [anon_sym_L_SQUOTE] = ACTIONS(896), + [anon_sym_u_SQUOTE] = ACTIONS(896), + [anon_sym_U_SQUOTE] = ACTIONS(896), + [anon_sym_u8_SQUOTE] = ACTIONS(896), + [anon_sym_SQUOTE] = ACTIONS(896), + [anon_sym_L_DQUOTE] = ACTIONS(896), + [anon_sym_u_DQUOTE] = ACTIONS(896), + [anon_sym_U_DQUOTE] = ACTIONS(896), + [anon_sym_u8_DQUOTE] = ACTIONS(896), + [anon_sym_DQUOTE] = ACTIONS(896), + [sym_true] = ACTIONS(894), + [sym_false] = ACTIONS(894), + [sym_null] = ACTIONS(894), + [sym_comment] = ACTIONS(3), + }, + [70] = { + [sym_identifier] = ACTIONS(898), + [aux_sym_preproc_include_token1] = ACTIONS(898), + [aux_sym_preproc_def_token1] = ACTIONS(898), + [aux_sym_preproc_if_token1] = ACTIONS(898), + [aux_sym_preproc_if_token2] = ACTIONS(898), + [aux_sym_preproc_ifdef_token1] = ACTIONS(898), + [aux_sym_preproc_ifdef_token2] = ACTIONS(898), + [aux_sym_preproc_else_token1] = ACTIONS(898), + [aux_sym_preproc_elif_token1] = ACTIONS(898), + [sym_preproc_directive] = ACTIONS(898), + [anon_sym_LPAREN2] = ACTIONS(900), + [anon_sym_BANG] = ACTIONS(900), + [anon_sym_TILDE] = ACTIONS(900), + [anon_sym_DASH] = ACTIONS(898), + [anon_sym_PLUS] = ACTIONS(898), + [anon_sym_STAR] = ACTIONS(900), + [anon_sym_AMP] = ACTIONS(900), + [anon_sym_SEMI] = ACTIONS(900), + [anon_sym_typedef] = ACTIONS(898), + [anon_sym_extern] = ACTIONS(898), + [anon_sym___attribute__] = ACTIONS(898), + [anon_sym_LBRACK_LBRACK] = ACTIONS(900), + [anon_sym___declspec] = ACTIONS(898), + [anon_sym___cdecl] = ACTIONS(898), + [anon_sym___clrcall] = ACTIONS(898), + [anon_sym___stdcall] = ACTIONS(898), + [anon_sym___fastcall] = ACTIONS(898), + [anon_sym___thiscall] = ACTIONS(898), + [anon_sym___vectorcall] = ACTIONS(898), + [anon_sym_LBRACE] = ACTIONS(900), + [anon_sym_static] = ACTIONS(898), + [anon_sym_auto] = ACTIONS(898), + [anon_sym_register] = ACTIONS(898), + [anon_sym_inline] = ACTIONS(898), + [anon_sym_const] = ACTIONS(898), + [anon_sym_volatile] = ACTIONS(898), + [anon_sym_restrict] = ACTIONS(898), + [anon_sym__Atomic] = ACTIONS(898), + [anon_sym_signed] = ACTIONS(898), + [anon_sym_unsigned] = ACTIONS(898), + [anon_sym_long] = ACTIONS(898), + [anon_sym_short] = ACTIONS(898), + [sym_primitive_type] = ACTIONS(898), + [anon_sym_enum] = ACTIONS(898), + [anon_sym_struct] = ACTIONS(898), + [anon_sym_union] = ACTIONS(898), + [anon_sym_if] = ACTIONS(898), + [anon_sym_else] = ACTIONS(898), + [anon_sym_switch] = ACTIONS(898), + [anon_sym_case] = ACTIONS(898), + [anon_sym_default] = ACTIONS(898), + [anon_sym_while] = ACTIONS(898), + [anon_sym_do] = ACTIONS(898), + [anon_sym_for] = ACTIONS(898), + [anon_sym_return] = ACTIONS(898), + [anon_sym_break] = ACTIONS(898), + [anon_sym_continue] = ACTIONS(898), + [anon_sym_goto] = ACTIONS(898), + [anon_sym_DASH_DASH] = ACTIONS(900), + [anon_sym_PLUS_PLUS] = ACTIONS(900), + [anon_sym_sizeof] = ACTIONS(898), + [sym_number_literal] = ACTIONS(900), + [anon_sym_L_SQUOTE] = ACTIONS(900), + [anon_sym_u_SQUOTE] = ACTIONS(900), + [anon_sym_U_SQUOTE] = ACTIONS(900), + [anon_sym_u8_SQUOTE] = ACTIONS(900), + [anon_sym_SQUOTE] = ACTIONS(900), + [anon_sym_L_DQUOTE] = ACTIONS(900), + [anon_sym_u_DQUOTE] = ACTIONS(900), + [anon_sym_U_DQUOTE] = ACTIONS(900), + [anon_sym_u8_DQUOTE] = ACTIONS(900), + [anon_sym_DQUOTE] = ACTIONS(900), + [sym_true] = ACTIONS(898), + [sym_false] = ACTIONS(898), + [sym_null] = ACTIONS(898), + [sym_comment] = ACTIONS(3), + }, + [71] = { + [sym_identifier] = ACTIONS(902), + [aux_sym_preproc_include_token1] = ACTIONS(902), + [aux_sym_preproc_def_token1] = ACTIONS(902), + [aux_sym_preproc_if_token1] = ACTIONS(902), + [aux_sym_preproc_if_token2] = ACTIONS(902), + [aux_sym_preproc_ifdef_token1] = ACTIONS(902), + [aux_sym_preproc_ifdef_token2] = ACTIONS(902), + [aux_sym_preproc_else_token1] = ACTIONS(902), + [aux_sym_preproc_elif_token1] = ACTIONS(902), + [sym_preproc_directive] = ACTIONS(902), + [anon_sym_LPAREN2] = ACTIONS(904), + [anon_sym_BANG] = ACTIONS(904), + [anon_sym_TILDE] = ACTIONS(904), + [anon_sym_DASH] = ACTIONS(902), + [anon_sym_PLUS] = ACTIONS(902), + [anon_sym_STAR] = ACTIONS(904), + [anon_sym_AMP] = ACTIONS(904), + [anon_sym_SEMI] = ACTIONS(904), + [anon_sym_typedef] = ACTIONS(902), + [anon_sym_extern] = ACTIONS(902), + [anon_sym___attribute__] = ACTIONS(902), + [anon_sym_LBRACK_LBRACK] = ACTIONS(904), + [anon_sym___declspec] = ACTIONS(902), + [anon_sym___cdecl] = ACTIONS(902), + [anon_sym___clrcall] = ACTIONS(902), + [anon_sym___stdcall] = ACTIONS(902), + [anon_sym___fastcall] = ACTIONS(902), + [anon_sym___thiscall] = ACTIONS(902), + [anon_sym___vectorcall] = ACTIONS(902), + [anon_sym_LBRACE] = ACTIONS(904), + [anon_sym_static] = ACTIONS(902), + [anon_sym_auto] = ACTIONS(902), + [anon_sym_register] = ACTIONS(902), + [anon_sym_inline] = ACTIONS(902), + [anon_sym_const] = ACTIONS(902), + [anon_sym_volatile] = ACTIONS(902), + [anon_sym_restrict] = ACTIONS(902), + [anon_sym__Atomic] = ACTIONS(902), + [anon_sym_signed] = ACTIONS(902), + [anon_sym_unsigned] = ACTIONS(902), + [anon_sym_long] = ACTIONS(902), + [anon_sym_short] = ACTIONS(902), + [sym_primitive_type] = ACTIONS(902), + [anon_sym_enum] = ACTIONS(902), + [anon_sym_struct] = ACTIONS(902), + [anon_sym_union] = ACTIONS(902), + [anon_sym_if] = ACTIONS(902), + [anon_sym_else] = ACTIONS(902), + [anon_sym_switch] = ACTIONS(902), + [anon_sym_case] = ACTIONS(902), + [anon_sym_default] = ACTIONS(902), + [anon_sym_while] = ACTIONS(902), + [anon_sym_do] = ACTIONS(902), + [anon_sym_for] = ACTIONS(902), + [anon_sym_return] = ACTIONS(902), + [anon_sym_break] = ACTIONS(902), + [anon_sym_continue] = ACTIONS(902), + [anon_sym_goto] = ACTIONS(902), + [anon_sym_DASH_DASH] = ACTIONS(904), + [anon_sym_PLUS_PLUS] = ACTIONS(904), + [anon_sym_sizeof] = ACTIONS(902), + [sym_number_literal] = ACTIONS(904), + [anon_sym_L_SQUOTE] = ACTIONS(904), + [anon_sym_u_SQUOTE] = ACTIONS(904), + [anon_sym_U_SQUOTE] = ACTIONS(904), + [anon_sym_u8_SQUOTE] = ACTIONS(904), + [anon_sym_SQUOTE] = ACTIONS(904), + [anon_sym_L_DQUOTE] = ACTIONS(904), + [anon_sym_u_DQUOTE] = ACTIONS(904), + [anon_sym_U_DQUOTE] = ACTIONS(904), + [anon_sym_u8_DQUOTE] = ACTIONS(904), + [anon_sym_DQUOTE] = ACTIONS(904), + [sym_true] = ACTIONS(902), + [sym_false] = ACTIONS(902), + [sym_null] = ACTIONS(902), + [sym_comment] = ACTIONS(3), + }, + [72] = { + [sym_identifier] = ACTIONS(906), + [aux_sym_preproc_include_token1] = ACTIONS(906), + [aux_sym_preproc_def_token1] = ACTIONS(906), + [aux_sym_preproc_if_token1] = ACTIONS(906), + [aux_sym_preproc_if_token2] = ACTIONS(906), + [aux_sym_preproc_ifdef_token1] = ACTIONS(906), + [aux_sym_preproc_ifdef_token2] = ACTIONS(906), + [aux_sym_preproc_else_token1] = ACTIONS(906), + [aux_sym_preproc_elif_token1] = ACTIONS(906), + [sym_preproc_directive] = ACTIONS(906), + [anon_sym_LPAREN2] = ACTIONS(908), + [anon_sym_BANG] = ACTIONS(908), + [anon_sym_TILDE] = ACTIONS(908), + [anon_sym_DASH] = ACTIONS(906), + [anon_sym_PLUS] = ACTIONS(906), + [anon_sym_STAR] = ACTIONS(908), + [anon_sym_AMP] = ACTIONS(908), + [anon_sym_SEMI] = ACTIONS(908), + [anon_sym_typedef] = ACTIONS(906), + [anon_sym_extern] = ACTIONS(906), + [anon_sym___attribute__] = ACTIONS(906), + [anon_sym_LBRACK_LBRACK] = ACTIONS(908), + [anon_sym___declspec] = ACTIONS(906), + [anon_sym___cdecl] = ACTIONS(906), + [anon_sym___clrcall] = ACTIONS(906), + [anon_sym___stdcall] = ACTIONS(906), + [anon_sym___fastcall] = ACTIONS(906), + [anon_sym___thiscall] = ACTIONS(906), + [anon_sym___vectorcall] = ACTIONS(906), + [anon_sym_LBRACE] = ACTIONS(908), + [anon_sym_static] = ACTIONS(906), + [anon_sym_auto] = ACTIONS(906), + [anon_sym_register] = ACTIONS(906), + [anon_sym_inline] = ACTIONS(906), + [anon_sym_const] = ACTIONS(906), + [anon_sym_volatile] = ACTIONS(906), + [anon_sym_restrict] = ACTIONS(906), + [anon_sym__Atomic] = ACTIONS(906), + [anon_sym_signed] = ACTIONS(906), + [anon_sym_unsigned] = ACTIONS(906), + [anon_sym_long] = ACTIONS(906), + [anon_sym_short] = ACTIONS(906), + [sym_primitive_type] = ACTIONS(906), + [anon_sym_enum] = ACTIONS(906), + [anon_sym_struct] = ACTIONS(906), + [anon_sym_union] = ACTIONS(906), + [anon_sym_if] = ACTIONS(906), + [anon_sym_else] = ACTIONS(906), + [anon_sym_switch] = ACTIONS(906), + [anon_sym_case] = ACTIONS(906), + [anon_sym_default] = ACTIONS(906), + [anon_sym_while] = ACTIONS(906), + [anon_sym_do] = ACTIONS(906), + [anon_sym_for] = ACTIONS(906), + [anon_sym_return] = ACTIONS(906), + [anon_sym_break] = ACTIONS(906), + [anon_sym_continue] = ACTIONS(906), + [anon_sym_goto] = ACTIONS(906), + [anon_sym_DASH_DASH] = ACTIONS(908), + [anon_sym_PLUS_PLUS] = ACTIONS(908), + [anon_sym_sizeof] = ACTIONS(906), + [sym_number_literal] = ACTIONS(908), + [anon_sym_L_SQUOTE] = ACTIONS(908), + [anon_sym_u_SQUOTE] = ACTIONS(908), + [anon_sym_U_SQUOTE] = ACTIONS(908), + [anon_sym_u8_SQUOTE] = ACTIONS(908), + [anon_sym_SQUOTE] = ACTIONS(908), + [anon_sym_L_DQUOTE] = ACTIONS(908), + [anon_sym_u_DQUOTE] = ACTIONS(908), + [anon_sym_U_DQUOTE] = ACTIONS(908), + [anon_sym_u8_DQUOTE] = ACTIONS(908), + [anon_sym_DQUOTE] = ACTIONS(908), + [sym_true] = ACTIONS(906), + [sym_false] = ACTIONS(906), + [sym_null] = ACTIONS(906), + [sym_comment] = ACTIONS(3), + }, + [73] = { + [sym_identifier] = ACTIONS(910), + [aux_sym_preproc_include_token1] = ACTIONS(910), + [aux_sym_preproc_def_token1] = ACTIONS(910), + [aux_sym_preproc_if_token1] = ACTIONS(910), + [aux_sym_preproc_if_token2] = ACTIONS(910), + [aux_sym_preproc_ifdef_token1] = ACTIONS(910), + [aux_sym_preproc_ifdef_token2] = ACTIONS(910), + [aux_sym_preproc_else_token1] = ACTIONS(910), + [aux_sym_preproc_elif_token1] = ACTIONS(910), + [sym_preproc_directive] = ACTIONS(910), + [anon_sym_LPAREN2] = ACTIONS(912), + [anon_sym_BANG] = ACTIONS(912), + [anon_sym_TILDE] = ACTIONS(912), + [anon_sym_DASH] = ACTIONS(910), + [anon_sym_PLUS] = ACTIONS(910), + [anon_sym_STAR] = ACTIONS(912), + [anon_sym_AMP] = ACTIONS(912), + [anon_sym_SEMI] = ACTIONS(912), + [anon_sym_typedef] = ACTIONS(910), + [anon_sym_extern] = ACTIONS(910), + [anon_sym___attribute__] = ACTIONS(910), + [anon_sym_LBRACK_LBRACK] = ACTIONS(912), + [anon_sym___declspec] = ACTIONS(910), + [anon_sym___cdecl] = ACTIONS(910), + [anon_sym___clrcall] = ACTIONS(910), + [anon_sym___stdcall] = ACTIONS(910), + [anon_sym___fastcall] = ACTIONS(910), + [anon_sym___thiscall] = ACTIONS(910), + [anon_sym___vectorcall] = ACTIONS(910), + [anon_sym_LBRACE] = ACTIONS(912), + [anon_sym_static] = ACTIONS(910), + [anon_sym_auto] = ACTIONS(910), + [anon_sym_register] = ACTIONS(910), + [anon_sym_inline] = ACTIONS(910), + [anon_sym_const] = ACTIONS(910), + [anon_sym_volatile] = ACTIONS(910), + [anon_sym_restrict] = ACTIONS(910), + [anon_sym__Atomic] = ACTIONS(910), + [anon_sym_signed] = ACTIONS(910), + [anon_sym_unsigned] = ACTIONS(910), + [anon_sym_long] = ACTIONS(910), + [anon_sym_short] = ACTIONS(910), + [sym_primitive_type] = ACTIONS(910), + [anon_sym_enum] = ACTIONS(910), + [anon_sym_struct] = ACTIONS(910), + [anon_sym_union] = ACTIONS(910), + [anon_sym_if] = ACTIONS(910), + [anon_sym_else] = ACTIONS(910), + [anon_sym_switch] = ACTIONS(910), + [anon_sym_case] = ACTIONS(910), + [anon_sym_default] = ACTIONS(910), + [anon_sym_while] = ACTIONS(910), + [anon_sym_do] = ACTIONS(910), + [anon_sym_for] = ACTIONS(910), + [anon_sym_return] = ACTIONS(910), + [anon_sym_break] = ACTIONS(910), + [anon_sym_continue] = ACTIONS(910), + [anon_sym_goto] = ACTIONS(910), + [anon_sym_DASH_DASH] = ACTIONS(912), + [anon_sym_PLUS_PLUS] = ACTIONS(912), + [anon_sym_sizeof] = ACTIONS(910), + [sym_number_literal] = ACTIONS(912), + [anon_sym_L_SQUOTE] = ACTIONS(912), + [anon_sym_u_SQUOTE] = ACTIONS(912), + [anon_sym_U_SQUOTE] = ACTIONS(912), + [anon_sym_u8_SQUOTE] = ACTIONS(912), + [anon_sym_SQUOTE] = ACTIONS(912), + [anon_sym_L_DQUOTE] = ACTIONS(912), + [anon_sym_u_DQUOTE] = ACTIONS(912), + [anon_sym_U_DQUOTE] = ACTIONS(912), + [anon_sym_u8_DQUOTE] = ACTIONS(912), + [anon_sym_DQUOTE] = ACTIONS(912), + [sym_true] = ACTIONS(910), + [sym_false] = ACTIONS(910), + [sym_null] = ACTIONS(910), + [sym_comment] = ACTIONS(3), + }, + [74] = { + [sym_identifier] = ACTIONS(890), + [aux_sym_preproc_include_token1] = ACTIONS(890), + [aux_sym_preproc_def_token1] = ACTIONS(890), + [aux_sym_preproc_if_token1] = ACTIONS(890), + [aux_sym_preproc_if_token2] = ACTIONS(890), + [aux_sym_preproc_ifdef_token1] = ACTIONS(890), + [aux_sym_preproc_ifdef_token2] = ACTIONS(890), + [aux_sym_preproc_else_token1] = ACTIONS(890), + [aux_sym_preproc_elif_token1] = ACTIONS(890), + [sym_preproc_directive] = ACTIONS(890), + [anon_sym_LPAREN2] = ACTIONS(892), + [anon_sym_BANG] = ACTIONS(892), + [anon_sym_TILDE] = ACTIONS(892), + [anon_sym_DASH] = ACTIONS(890), + [anon_sym_PLUS] = ACTIONS(890), + [anon_sym_STAR] = ACTIONS(892), + [anon_sym_AMP] = ACTIONS(892), + [anon_sym_SEMI] = ACTIONS(892), + [anon_sym_typedef] = ACTIONS(890), + [anon_sym_extern] = ACTIONS(890), + [anon_sym___attribute__] = ACTIONS(890), + [anon_sym_LBRACK_LBRACK] = ACTIONS(892), + [anon_sym___declspec] = ACTIONS(890), + [anon_sym___cdecl] = ACTIONS(890), + [anon_sym___clrcall] = ACTIONS(890), + [anon_sym___stdcall] = ACTIONS(890), + [anon_sym___fastcall] = ACTIONS(890), + [anon_sym___thiscall] = ACTIONS(890), + [anon_sym___vectorcall] = ACTIONS(890), + [anon_sym_LBRACE] = ACTIONS(892), + [anon_sym_static] = ACTIONS(890), + [anon_sym_auto] = ACTIONS(890), + [anon_sym_register] = ACTIONS(890), + [anon_sym_inline] = ACTIONS(890), + [anon_sym_const] = ACTIONS(890), + [anon_sym_volatile] = ACTIONS(890), + [anon_sym_restrict] = ACTIONS(890), + [anon_sym__Atomic] = ACTIONS(890), + [anon_sym_signed] = ACTIONS(890), + [anon_sym_unsigned] = ACTIONS(890), + [anon_sym_long] = ACTIONS(890), + [anon_sym_short] = ACTIONS(890), + [sym_primitive_type] = ACTIONS(890), + [anon_sym_enum] = ACTIONS(890), + [anon_sym_struct] = ACTIONS(890), + [anon_sym_union] = ACTIONS(890), + [anon_sym_if] = ACTIONS(890), + [anon_sym_else] = ACTIONS(890), + [anon_sym_switch] = ACTIONS(890), + [anon_sym_case] = ACTIONS(890), + [anon_sym_default] = ACTIONS(890), + [anon_sym_while] = ACTIONS(890), + [anon_sym_do] = ACTIONS(890), + [anon_sym_for] = ACTIONS(890), + [anon_sym_return] = ACTIONS(890), + [anon_sym_break] = ACTIONS(890), + [anon_sym_continue] = ACTIONS(890), + [anon_sym_goto] = ACTIONS(890), + [anon_sym_DASH_DASH] = ACTIONS(892), + [anon_sym_PLUS_PLUS] = ACTIONS(892), + [anon_sym_sizeof] = ACTIONS(890), + [sym_number_literal] = ACTIONS(892), + [anon_sym_L_SQUOTE] = ACTIONS(892), + [anon_sym_u_SQUOTE] = ACTIONS(892), + [anon_sym_U_SQUOTE] = ACTIONS(892), + [anon_sym_u8_SQUOTE] = ACTIONS(892), + [anon_sym_SQUOTE] = ACTIONS(892), + [anon_sym_L_DQUOTE] = ACTIONS(892), + [anon_sym_u_DQUOTE] = ACTIONS(892), + [anon_sym_U_DQUOTE] = ACTIONS(892), + [anon_sym_u8_DQUOTE] = ACTIONS(892), + [anon_sym_DQUOTE] = ACTIONS(892), + [sym_true] = ACTIONS(890), + [sym_false] = ACTIONS(890), + [sym_null] = ACTIONS(890), + [sym_comment] = ACTIONS(3), + }, + [75] = { + [sym_identifier] = ACTIONS(914), + [aux_sym_preproc_include_token1] = ACTIONS(914), + [aux_sym_preproc_def_token1] = ACTIONS(914), + [aux_sym_preproc_if_token1] = ACTIONS(914), + [aux_sym_preproc_if_token2] = ACTIONS(914), + [aux_sym_preproc_ifdef_token1] = ACTIONS(914), + [aux_sym_preproc_ifdef_token2] = ACTIONS(914), + [aux_sym_preproc_else_token1] = ACTIONS(914), + [aux_sym_preproc_elif_token1] = ACTIONS(914), + [sym_preproc_directive] = ACTIONS(914), + [anon_sym_LPAREN2] = ACTIONS(916), + [anon_sym_BANG] = ACTIONS(916), + [anon_sym_TILDE] = ACTIONS(916), + [anon_sym_DASH] = ACTIONS(914), + [anon_sym_PLUS] = ACTIONS(914), + [anon_sym_STAR] = ACTIONS(916), + [anon_sym_AMP] = ACTIONS(916), + [anon_sym_SEMI] = ACTIONS(916), + [anon_sym_typedef] = ACTIONS(914), + [anon_sym_extern] = ACTIONS(914), + [anon_sym___attribute__] = ACTIONS(914), + [anon_sym_LBRACK_LBRACK] = ACTIONS(916), + [anon_sym___declspec] = ACTIONS(914), + [anon_sym___cdecl] = ACTIONS(914), + [anon_sym___clrcall] = ACTIONS(914), + [anon_sym___stdcall] = ACTIONS(914), + [anon_sym___fastcall] = ACTIONS(914), + [anon_sym___thiscall] = ACTIONS(914), + [anon_sym___vectorcall] = ACTIONS(914), + [anon_sym_LBRACE] = ACTIONS(916), + [anon_sym_static] = ACTIONS(914), + [anon_sym_auto] = ACTIONS(914), + [anon_sym_register] = ACTIONS(914), + [anon_sym_inline] = ACTIONS(914), + [anon_sym_const] = ACTIONS(914), + [anon_sym_volatile] = ACTIONS(914), + [anon_sym_restrict] = ACTIONS(914), + [anon_sym__Atomic] = ACTIONS(914), + [anon_sym_signed] = ACTIONS(914), + [anon_sym_unsigned] = ACTIONS(914), + [anon_sym_long] = ACTIONS(914), + [anon_sym_short] = ACTIONS(914), + [sym_primitive_type] = ACTIONS(914), + [anon_sym_enum] = ACTIONS(914), + [anon_sym_struct] = ACTIONS(914), + [anon_sym_union] = ACTIONS(914), + [anon_sym_if] = ACTIONS(914), + [anon_sym_else] = ACTIONS(918), + [anon_sym_switch] = ACTIONS(914), + [anon_sym_case] = ACTIONS(914), + [anon_sym_default] = ACTIONS(914), + [anon_sym_while] = ACTIONS(914), + [anon_sym_do] = ACTIONS(914), + [anon_sym_for] = ACTIONS(914), + [anon_sym_return] = ACTIONS(914), + [anon_sym_break] = ACTIONS(914), + [anon_sym_continue] = ACTIONS(914), + [anon_sym_goto] = ACTIONS(914), + [anon_sym_DASH_DASH] = ACTIONS(916), + [anon_sym_PLUS_PLUS] = ACTIONS(916), + [anon_sym_sizeof] = ACTIONS(914), + [sym_number_literal] = ACTIONS(916), + [anon_sym_L_SQUOTE] = ACTIONS(916), + [anon_sym_u_SQUOTE] = ACTIONS(916), + [anon_sym_U_SQUOTE] = ACTIONS(916), + [anon_sym_u8_SQUOTE] = ACTIONS(916), + [anon_sym_SQUOTE] = ACTIONS(916), + [anon_sym_L_DQUOTE] = ACTIONS(916), + [anon_sym_u_DQUOTE] = ACTIONS(916), + [anon_sym_U_DQUOTE] = ACTIONS(916), + [anon_sym_u8_DQUOTE] = ACTIONS(916), + [anon_sym_DQUOTE] = ACTIONS(916), + [sym_true] = ACTIONS(914), + [sym_false] = ACTIONS(914), + [sym_null] = ACTIONS(914), + [sym_comment] = ACTIONS(3), + }, + [76] = { + [sym_identifier] = ACTIONS(920), + [aux_sym_preproc_include_token1] = ACTIONS(920), + [aux_sym_preproc_def_token1] = ACTIONS(920), + [aux_sym_preproc_if_token1] = ACTIONS(920), + [aux_sym_preproc_if_token2] = ACTIONS(920), + [aux_sym_preproc_ifdef_token1] = ACTIONS(920), + [aux_sym_preproc_ifdef_token2] = ACTIONS(920), + [aux_sym_preproc_else_token1] = ACTIONS(920), + [aux_sym_preproc_elif_token1] = ACTIONS(920), + [sym_preproc_directive] = ACTIONS(920), + [anon_sym_LPAREN2] = ACTIONS(922), + [anon_sym_BANG] = ACTIONS(922), + [anon_sym_TILDE] = ACTIONS(922), + [anon_sym_DASH] = ACTIONS(920), + [anon_sym_PLUS] = ACTIONS(920), + [anon_sym_STAR] = ACTIONS(922), + [anon_sym_AMP] = ACTIONS(922), + [anon_sym_SEMI] = ACTIONS(922), + [anon_sym_typedef] = ACTIONS(920), + [anon_sym_extern] = ACTIONS(920), + [anon_sym___attribute__] = ACTIONS(920), + [anon_sym_LBRACK_LBRACK] = ACTIONS(922), + [anon_sym___declspec] = ACTIONS(920), + [anon_sym___cdecl] = ACTIONS(920), + [anon_sym___clrcall] = ACTIONS(920), + [anon_sym___stdcall] = ACTIONS(920), + [anon_sym___fastcall] = ACTIONS(920), + [anon_sym___thiscall] = ACTIONS(920), + [anon_sym___vectorcall] = ACTIONS(920), + [anon_sym_LBRACE] = ACTIONS(922), + [anon_sym_static] = ACTIONS(920), + [anon_sym_auto] = ACTIONS(920), + [anon_sym_register] = ACTIONS(920), + [anon_sym_inline] = ACTIONS(920), + [anon_sym_const] = ACTIONS(920), + [anon_sym_volatile] = ACTIONS(920), + [anon_sym_restrict] = ACTIONS(920), + [anon_sym__Atomic] = ACTIONS(920), + [anon_sym_signed] = ACTIONS(920), + [anon_sym_unsigned] = ACTIONS(920), + [anon_sym_long] = ACTIONS(920), + [anon_sym_short] = ACTIONS(920), + [sym_primitive_type] = ACTIONS(920), + [anon_sym_enum] = ACTIONS(920), + [anon_sym_struct] = ACTIONS(920), + [anon_sym_union] = ACTIONS(920), + [anon_sym_if] = ACTIONS(920), + [anon_sym_else] = ACTIONS(920), + [anon_sym_switch] = ACTIONS(920), + [anon_sym_case] = ACTIONS(920), + [anon_sym_default] = ACTIONS(920), + [anon_sym_while] = ACTIONS(920), + [anon_sym_do] = ACTIONS(920), + [anon_sym_for] = ACTIONS(920), + [anon_sym_return] = ACTIONS(920), + [anon_sym_break] = ACTIONS(920), + [anon_sym_continue] = ACTIONS(920), + [anon_sym_goto] = ACTIONS(920), + [anon_sym_DASH_DASH] = ACTIONS(922), + [anon_sym_PLUS_PLUS] = ACTIONS(922), + [anon_sym_sizeof] = ACTIONS(920), + [sym_number_literal] = ACTIONS(922), + [anon_sym_L_SQUOTE] = ACTIONS(922), + [anon_sym_u_SQUOTE] = ACTIONS(922), + [anon_sym_U_SQUOTE] = ACTIONS(922), + [anon_sym_u8_SQUOTE] = ACTIONS(922), + [anon_sym_SQUOTE] = ACTIONS(922), + [anon_sym_L_DQUOTE] = ACTIONS(922), + [anon_sym_u_DQUOTE] = ACTIONS(922), + [anon_sym_U_DQUOTE] = ACTIONS(922), + [anon_sym_u8_DQUOTE] = ACTIONS(922), + [anon_sym_DQUOTE] = ACTIONS(922), + [sym_true] = ACTIONS(920), + [sym_false] = ACTIONS(920), + [sym_null] = ACTIONS(920), + [sym_comment] = ACTIONS(3), + }, + [77] = { + [sym_identifier] = ACTIONS(924), + [aux_sym_preproc_include_token1] = ACTIONS(924), + [aux_sym_preproc_def_token1] = ACTIONS(924), + [aux_sym_preproc_if_token1] = ACTIONS(924), + [aux_sym_preproc_if_token2] = ACTIONS(924), + [aux_sym_preproc_ifdef_token1] = ACTIONS(924), + [aux_sym_preproc_ifdef_token2] = ACTIONS(924), + [aux_sym_preproc_else_token1] = ACTIONS(924), + [aux_sym_preproc_elif_token1] = ACTIONS(924), + [sym_preproc_directive] = ACTIONS(924), + [anon_sym_LPAREN2] = ACTIONS(926), + [anon_sym_BANG] = ACTIONS(926), + [anon_sym_TILDE] = ACTIONS(926), + [anon_sym_DASH] = ACTIONS(924), + [anon_sym_PLUS] = ACTIONS(924), + [anon_sym_STAR] = ACTIONS(926), + [anon_sym_AMP] = ACTIONS(926), + [anon_sym_SEMI] = ACTIONS(926), + [anon_sym_typedef] = ACTIONS(924), + [anon_sym_extern] = ACTIONS(924), + [anon_sym___attribute__] = ACTIONS(924), + [anon_sym_LBRACK_LBRACK] = ACTIONS(926), + [anon_sym___declspec] = ACTIONS(924), + [anon_sym___cdecl] = ACTIONS(924), + [anon_sym___clrcall] = ACTIONS(924), + [anon_sym___stdcall] = ACTIONS(924), + [anon_sym___fastcall] = ACTIONS(924), + [anon_sym___thiscall] = ACTIONS(924), + [anon_sym___vectorcall] = ACTIONS(924), + [anon_sym_LBRACE] = ACTIONS(926), + [anon_sym_static] = ACTIONS(924), + [anon_sym_auto] = ACTIONS(924), + [anon_sym_register] = ACTIONS(924), + [anon_sym_inline] = ACTIONS(924), + [anon_sym_const] = ACTIONS(924), + [anon_sym_volatile] = ACTIONS(924), + [anon_sym_restrict] = ACTIONS(924), + [anon_sym__Atomic] = ACTIONS(924), + [anon_sym_signed] = ACTIONS(924), + [anon_sym_unsigned] = ACTIONS(924), + [anon_sym_long] = ACTIONS(924), + [anon_sym_short] = ACTIONS(924), + [sym_primitive_type] = ACTIONS(924), + [anon_sym_enum] = ACTIONS(924), + [anon_sym_struct] = ACTIONS(924), + [anon_sym_union] = ACTIONS(924), + [anon_sym_if] = ACTIONS(924), + [anon_sym_else] = ACTIONS(924), + [anon_sym_switch] = ACTIONS(924), + [anon_sym_case] = ACTIONS(924), + [anon_sym_default] = ACTIONS(924), + [anon_sym_while] = ACTIONS(924), + [anon_sym_do] = ACTIONS(924), + [anon_sym_for] = ACTIONS(924), + [anon_sym_return] = ACTIONS(924), + [anon_sym_break] = ACTIONS(924), + [anon_sym_continue] = ACTIONS(924), + [anon_sym_goto] = ACTIONS(924), + [anon_sym_DASH_DASH] = ACTIONS(926), + [anon_sym_PLUS_PLUS] = ACTIONS(926), + [anon_sym_sizeof] = ACTIONS(924), + [sym_number_literal] = ACTIONS(926), + [anon_sym_L_SQUOTE] = ACTIONS(926), + [anon_sym_u_SQUOTE] = ACTIONS(926), + [anon_sym_U_SQUOTE] = ACTIONS(926), + [anon_sym_u8_SQUOTE] = ACTIONS(926), + [anon_sym_SQUOTE] = ACTIONS(926), + [anon_sym_L_DQUOTE] = ACTIONS(926), + [anon_sym_u_DQUOTE] = ACTIONS(926), + [anon_sym_U_DQUOTE] = ACTIONS(926), + [anon_sym_u8_DQUOTE] = ACTIONS(926), + [anon_sym_DQUOTE] = ACTIONS(926), + [sym_true] = ACTIONS(924), + [sym_false] = ACTIONS(924), + [sym_null] = ACTIONS(924), + [sym_comment] = ACTIONS(3), + }, + [78] = { + [sym_identifier] = ACTIONS(928), + [aux_sym_preproc_include_token1] = ACTIONS(928), + [aux_sym_preproc_def_token1] = ACTIONS(928), + [aux_sym_preproc_if_token1] = ACTIONS(928), + [aux_sym_preproc_if_token2] = ACTIONS(928), + [aux_sym_preproc_ifdef_token1] = ACTIONS(928), + [aux_sym_preproc_ifdef_token2] = ACTIONS(928), + [aux_sym_preproc_else_token1] = ACTIONS(928), + [aux_sym_preproc_elif_token1] = ACTIONS(928), + [sym_preproc_directive] = ACTIONS(928), + [anon_sym_LPAREN2] = ACTIONS(930), + [anon_sym_BANG] = ACTIONS(930), + [anon_sym_TILDE] = ACTIONS(930), + [anon_sym_DASH] = ACTIONS(928), + [anon_sym_PLUS] = ACTIONS(928), + [anon_sym_STAR] = ACTIONS(930), + [anon_sym_AMP] = ACTIONS(930), + [anon_sym_SEMI] = ACTIONS(930), + [anon_sym_typedef] = ACTIONS(928), + [anon_sym_extern] = ACTIONS(928), + [anon_sym___attribute__] = ACTIONS(928), + [anon_sym_LBRACK_LBRACK] = ACTIONS(930), + [anon_sym___declspec] = ACTIONS(928), + [anon_sym___cdecl] = ACTIONS(928), + [anon_sym___clrcall] = ACTIONS(928), + [anon_sym___stdcall] = ACTIONS(928), + [anon_sym___fastcall] = ACTIONS(928), + [anon_sym___thiscall] = ACTIONS(928), + [anon_sym___vectorcall] = ACTIONS(928), + [anon_sym_LBRACE] = ACTIONS(930), + [anon_sym_static] = ACTIONS(928), + [anon_sym_auto] = ACTIONS(928), + [anon_sym_register] = ACTIONS(928), + [anon_sym_inline] = ACTIONS(928), + [anon_sym_const] = ACTIONS(928), + [anon_sym_volatile] = ACTIONS(928), + [anon_sym_restrict] = ACTIONS(928), + [anon_sym__Atomic] = ACTIONS(928), + [anon_sym_signed] = ACTIONS(928), + [anon_sym_unsigned] = ACTIONS(928), + [anon_sym_long] = ACTIONS(928), + [anon_sym_short] = ACTIONS(928), + [sym_primitive_type] = ACTIONS(928), + [anon_sym_enum] = ACTIONS(928), + [anon_sym_struct] = ACTIONS(928), + [anon_sym_union] = ACTIONS(928), + [anon_sym_if] = ACTIONS(928), + [anon_sym_else] = ACTIONS(928), + [anon_sym_switch] = ACTIONS(928), + [anon_sym_case] = ACTIONS(928), + [anon_sym_default] = ACTIONS(928), + [anon_sym_while] = ACTIONS(928), + [anon_sym_do] = ACTIONS(928), + [anon_sym_for] = ACTIONS(928), + [anon_sym_return] = ACTIONS(928), + [anon_sym_break] = ACTIONS(928), + [anon_sym_continue] = ACTIONS(928), + [anon_sym_goto] = ACTIONS(928), + [anon_sym_DASH_DASH] = ACTIONS(930), + [anon_sym_PLUS_PLUS] = ACTIONS(930), + [anon_sym_sizeof] = ACTIONS(928), + [sym_number_literal] = ACTIONS(930), + [anon_sym_L_SQUOTE] = ACTIONS(930), + [anon_sym_u_SQUOTE] = ACTIONS(930), + [anon_sym_U_SQUOTE] = ACTIONS(930), + [anon_sym_u8_SQUOTE] = ACTIONS(930), + [anon_sym_SQUOTE] = ACTIONS(930), + [anon_sym_L_DQUOTE] = ACTIONS(930), + [anon_sym_u_DQUOTE] = ACTIONS(930), + [anon_sym_U_DQUOTE] = ACTIONS(930), + [anon_sym_u8_DQUOTE] = ACTIONS(930), + [anon_sym_DQUOTE] = ACTIONS(930), + [sym_true] = ACTIONS(928), + [sym_false] = ACTIONS(928), + [sym_null] = ACTIONS(928), + [sym_comment] = ACTIONS(3), + }, + [79] = { + [sym_identifier] = ACTIONS(932), + [aux_sym_preproc_include_token1] = ACTIONS(932), + [aux_sym_preproc_def_token1] = ACTIONS(932), + [aux_sym_preproc_if_token1] = ACTIONS(932), + [aux_sym_preproc_if_token2] = ACTIONS(932), + [aux_sym_preproc_ifdef_token1] = ACTIONS(932), + [aux_sym_preproc_ifdef_token2] = ACTIONS(932), + [aux_sym_preproc_else_token1] = ACTIONS(932), + [aux_sym_preproc_elif_token1] = ACTIONS(932), + [sym_preproc_directive] = ACTIONS(932), + [anon_sym_LPAREN2] = ACTIONS(934), + [anon_sym_BANG] = ACTIONS(934), + [anon_sym_TILDE] = ACTIONS(934), + [anon_sym_DASH] = ACTIONS(932), + [anon_sym_PLUS] = ACTIONS(932), + [anon_sym_STAR] = ACTIONS(934), + [anon_sym_AMP] = ACTIONS(934), + [anon_sym_SEMI] = ACTIONS(934), + [anon_sym_typedef] = ACTIONS(932), + [anon_sym_extern] = ACTIONS(932), + [anon_sym___attribute__] = ACTIONS(932), + [anon_sym_LBRACK_LBRACK] = ACTIONS(934), + [anon_sym___declspec] = ACTIONS(932), + [anon_sym___cdecl] = ACTIONS(932), + [anon_sym___clrcall] = ACTIONS(932), + [anon_sym___stdcall] = ACTIONS(932), + [anon_sym___fastcall] = ACTIONS(932), + [anon_sym___thiscall] = ACTIONS(932), + [anon_sym___vectorcall] = ACTIONS(932), + [anon_sym_LBRACE] = ACTIONS(934), + [anon_sym_static] = ACTIONS(932), + [anon_sym_auto] = ACTIONS(932), + [anon_sym_register] = ACTIONS(932), + [anon_sym_inline] = ACTIONS(932), + [anon_sym_const] = ACTIONS(932), + [anon_sym_volatile] = ACTIONS(932), + [anon_sym_restrict] = ACTIONS(932), + [anon_sym__Atomic] = ACTIONS(932), + [anon_sym_signed] = ACTIONS(932), + [anon_sym_unsigned] = ACTIONS(932), + [anon_sym_long] = ACTIONS(932), + [anon_sym_short] = ACTIONS(932), + [sym_primitive_type] = ACTIONS(932), + [anon_sym_enum] = ACTIONS(932), + [anon_sym_struct] = ACTIONS(932), + [anon_sym_union] = ACTIONS(932), + [anon_sym_if] = ACTIONS(932), + [anon_sym_else] = ACTIONS(932), + [anon_sym_switch] = ACTIONS(932), + [anon_sym_case] = ACTIONS(932), + [anon_sym_default] = ACTIONS(932), + [anon_sym_while] = ACTIONS(932), + [anon_sym_do] = ACTIONS(932), + [anon_sym_for] = ACTIONS(932), + [anon_sym_return] = ACTIONS(932), + [anon_sym_break] = ACTIONS(932), + [anon_sym_continue] = ACTIONS(932), + [anon_sym_goto] = ACTIONS(932), + [anon_sym_DASH_DASH] = ACTIONS(934), + [anon_sym_PLUS_PLUS] = ACTIONS(934), + [anon_sym_sizeof] = ACTIONS(932), + [sym_number_literal] = ACTIONS(934), + [anon_sym_L_SQUOTE] = ACTIONS(934), + [anon_sym_u_SQUOTE] = ACTIONS(934), + [anon_sym_U_SQUOTE] = ACTIONS(934), + [anon_sym_u8_SQUOTE] = ACTIONS(934), + [anon_sym_SQUOTE] = ACTIONS(934), + [anon_sym_L_DQUOTE] = ACTIONS(934), + [anon_sym_u_DQUOTE] = ACTIONS(934), + [anon_sym_U_DQUOTE] = ACTIONS(934), + [anon_sym_u8_DQUOTE] = ACTIONS(934), + [anon_sym_DQUOTE] = ACTIONS(934), + [sym_true] = ACTIONS(932), + [sym_false] = ACTIONS(932), + [sym_null] = ACTIONS(932), + [sym_comment] = ACTIONS(3), + }, + [80] = { + [sym_identifier] = ACTIONS(936), + [aux_sym_preproc_include_token1] = ACTIONS(936), + [aux_sym_preproc_def_token1] = ACTIONS(936), + [aux_sym_preproc_if_token1] = ACTIONS(936), + [aux_sym_preproc_if_token2] = ACTIONS(936), + [aux_sym_preproc_ifdef_token1] = ACTIONS(936), + [aux_sym_preproc_ifdef_token2] = ACTIONS(936), + [aux_sym_preproc_else_token1] = ACTIONS(936), + [aux_sym_preproc_elif_token1] = ACTIONS(936), + [sym_preproc_directive] = ACTIONS(936), + [anon_sym_LPAREN2] = ACTIONS(938), + [anon_sym_BANG] = ACTIONS(938), + [anon_sym_TILDE] = ACTIONS(938), + [anon_sym_DASH] = ACTIONS(936), + [anon_sym_PLUS] = ACTIONS(936), + [anon_sym_STAR] = ACTIONS(938), + [anon_sym_AMP] = ACTIONS(938), + [anon_sym_SEMI] = ACTIONS(938), + [anon_sym_typedef] = ACTIONS(936), + [anon_sym_extern] = ACTIONS(936), + [anon_sym___attribute__] = ACTIONS(936), + [anon_sym_LBRACK_LBRACK] = ACTIONS(938), + [anon_sym___declspec] = ACTIONS(936), + [anon_sym___cdecl] = ACTIONS(936), + [anon_sym___clrcall] = ACTIONS(936), + [anon_sym___stdcall] = ACTIONS(936), + [anon_sym___fastcall] = ACTIONS(936), + [anon_sym___thiscall] = ACTIONS(936), + [anon_sym___vectorcall] = ACTIONS(936), + [anon_sym_LBRACE] = ACTIONS(938), + [anon_sym_static] = ACTIONS(936), + [anon_sym_auto] = ACTIONS(936), + [anon_sym_register] = ACTIONS(936), + [anon_sym_inline] = ACTIONS(936), + [anon_sym_const] = ACTIONS(936), + [anon_sym_volatile] = ACTIONS(936), + [anon_sym_restrict] = ACTIONS(936), + [anon_sym__Atomic] = ACTIONS(936), + [anon_sym_signed] = ACTIONS(936), + [anon_sym_unsigned] = ACTIONS(936), + [anon_sym_long] = ACTIONS(936), + [anon_sym_short] = ACTIONS(936), + [sym_primitive_type] = ACTIONS(936), + [anon_sym_enum] = ACTIONS(936), + [anon_sym_struct] = ACTIONS(936), + [anon_sym_union] = ACTIONS(936), + [anon_sym_if] = ACTIONS(936), + [anon_sym_else] = ACTIONS(936), + [anon_sym_switch] = ACTIONS(936), + [anon_sym_case] = ACTIONS(936), + [anon_sym_default] = ACTIONS(936), + [anon_sym_while] = ACTIONS(936), + [anon_sym_do] = ACTIONS(936), + [anon_sym_for] = ACTIONS(936), + [anon_sym_return] = ACTIONS(936), + [anon_sym_break] = ACTIONS(936), + [anon_sym_continue] = ACTIONS(936), + [anon_sym_goto] = ACTIONS(936), + [anon_sym_DASH_DASH] = ACTIONS(938), + [anon_sym_PLUS_PLUS] = ACTIONS(938), + [anon_sym_sizeof] = ACTIONS(936), + [sym_number_literal] = ACTIONS(938), + [anon_sym_L_SQUOTE] = ACTIONS(938), + [anon_sym_u_SQUOTE] = ACTIONS(938), + [anon_sym_U_SQUOTE] = ACTIONS(938), + [anon_sym_u8_SQUOTE] = ACTIONS(938), + [anon_sym_SQUOTE] = ACTIONS(938), + [anon_sym_L_DQUOTE] = ACTIONS(938), + [anon_sym_u_DQUOTE] = ACTIONS(938), + [anon_sym_U_DQUOTE] = ACTIONS(938), + [anon_sym_u8_DQUOTE] = ACTIONS(938), + [anon_sym_DQUOTE] = ACTIONS(938), + [sym_true] = ACTIONS(936), + [sym_false] = ACTIONS(936), + [sym_null] = ACTIONS(936), + [sym_comment] = ACTIONS(3), + }, + [81] = { + [sym_identifier] = ACTIONS(940), + [aux_sym_preproc_include_token1] = ACTIONS(940), + [aux_sym_preproc_def_token1] = ACTIONS(940), + [aux_sym_preproc_if_token1] = ACTIONS(940), + [aux_sym_preproc_if_token2] = ACTIONS(940), + [aux_sym_preproc_ifdef_token1] = ACTIONS(940), + [aux_sym_preproc_ifdef_token2] = ACTIONS(940), + [aux_sym_preproc_else_token1] = ACTIONS(940), + [aux_sym_preproc_elif_token1] = ACTIONS(940), + [sym_preproc_directive] = ACTIONS(940), + [anon_sym_LPAREN2] = ACTIONS(942), + [anon_sym_BANG] = ACTIONS(942), + [anon_sym_TILDE] = ACTIONS(942), + [anon_sym_DASH] = ACTIONS(940), + [anon_sym_PLUS] = ACTIONS(940), + [anon_sym_STAR] = ACTIONS(942), + [anon_sym_AMP] = ACTIONS(942), + [anon_sym_SEMI] = ACTIONS(942), + [anon_sym_typedef] = ACTIONS(940), + [anon_sym_extern] = ACTIONS(940), + [anon_sym___attribute__] = ACTIONS(940), + [anon_sym_LBRACK_LBRACK] = ACTIONS(942), + [anon_sym___declspec] = ACTIONS(940), + [anon_sym___cdecl] = ACTIONS(940), + [anon_sym___clrcall] = ACTIONS(940), + [anon_sym___stdcall] = ACTIONS(940), + [anon_sym___fastcall] = ACTIONS(940), + [anon_sym___thiscall] = ACTIONS(940), + [anon_sym___vectorcall] = ACTIONS(940), + [anon_sym_LBRACE] = ACTIONS(942), + [anon_sym_static] = ACTIONS(940), + [anon_sym_auto] = ACTIONS(940), + [anon_sym_register] = ACTIONS(940), + [anon_sym_inline] = ACTIONS(940), + [anon_sym_const] = ACTIONS(940), + [anon_sym_volatile] = ACTIONS(940), + [anon_sym_restrict] = ACTIONS(940), + [anon_sym__Atomic] = ACTIONS(940), + [anon_sym_signed] = ACTIONS(940), + [anon_sym_unsigned] = ACTIONS(940), + [anon_sym_long] = ACTIONS(940), + [anon_sym_short] = ACTIONS(940), + [sym_primitive_type] = ACTIONS(940), + [anon_sym_enum] = ACTIONS(940), + [anon_sym_struct] = ACTIONS(940), + [anon_sym_union] = ACTIONS(940), + [anon_sym_if] = ACTIONS(940), + [anon_sym_else] = ACTIONS(940), + [anon_sym_switch] = ACTIONS(940), + [anon_sym_case] = ACTIONS(940), + [anon_sym_default] = ACTIONS(940), + [anon_sym_while] = ACTIONS(940), + [anon_sym_do] = ACTIONS(940), + [anon_sym_for] = ACTIONS(940), + [anon_sym_return] = ACTIONS(940), + [anon_sym_break] = ACTIONS(940), + [anon_sym_continue] = ACTIONS(940), + [anon_sym_goto] = ACTIONS(940), + [anon_sym_DASH_DASH] = ACTIONS(942), + [anon_sym_PLUS_PLUS] = ACTIONS(942), + [anon_sym_sizeof] = ACTIONS(940), + [sym_number_literal] = ACTIONS(942), + [anon_sym_L_SQUOTE] = ACTIONS(942), + [anon_sym_u_SQUOTE] = ACTIONS(942), + [anon_sym_U_SQUOTE] = ACTIONS(942), + [anon_sym_u8_SQUOTE] = ACTIONS(942), + [anon_sym_SQUOTE] = ACTIONS(942), + [anon_sym_L_DQUOTE] = ACTIONS(942), + [anon_sym_u_DQUOTE] = ACTIONS(942), + [anon_sym_U_DQUOTE] = ACTIONS(942), + [anon_sym_u8_DQUOTE] = ACTIONS(942), + [anon_sym_DQUOTE] = ACTIONS(942), + [sym_true] = ACTIONS(940), + [sym_false] = ACTIONS(940), + [sym_null] = ACTIONS(940), + [sym_comment] = ACTIONS(3), + }, + [82] = { + [sym_identifier] = ACTIONS(944), + [aux_sym_preproc_include_token1] = ACTIONS(944), + [aux_sym_preproc_def_token1] = ACTIONS(944), + [aux_sym_preproc_if_token1] = ACTIONS(944), + [aux_sym_preproc_if_token2] = ACTIONS(944), + [aux_sym_preproc_ifdef_token1] = ACTIONS(944), + [aux_sym_preproc_ifdef_token2] = ACTIONS(944), + [aux_sym_preproc_else_token1] = ACTIONS(944), + [aux_sym_preproc_elif_token1] = ACTIONS(944), + [sym_preproc_directive] = ACTIONS(944), + [anon_sym_LPAREN2] = ACTIONS(946), + [anon_sym_BANG] = ACTIONS(946), + [anon_sym_TILDE] = ACTIONS(946), + [anon_sym_DASH] = ACTIONS(944), + [anon_sym_PLUS] = ACTIONS(944), + [anon_sym_STAR] = ACTIONS(946), + [anon_sym_AMP] = ACTIONS(946), + [anon_sym_SEMI] = ACTIONS(946), + [anon_sym_typedef] = ACTIONS(944), + [anon_sym_extern] = ACTIONS(944), + [anon_sym___attribute__] = ACTIONS(944), + [anon_sym_LBRACK_LBRACK] = ACTIONS(946), + [anon_sym___declspec] = ACTIONS(944), + [anon_sym___cdecl] = ACTIONS(944), + [anon_sym___clrcall] = ACTIONS(944), + [anon_sym___stdcall] = ACTIONS(944), + [anon_sym___fastcall] = ACTIONS(944), + [anon_sym___thiscall] = ACTIONS(944), + [anon_sym___vectorcall] = ACTIONS(944), + [anon_sym_LBRACE] = ACTIONS(946), + [anon_sym_static] = ACTIONS(944), + [anon_sym_auto] = ACTIONS(944), + [anon_sym_register] = ACTIONS(944), + [anon_sym_inline] = ACTIONS(944), + [anon_sym_const] = ACTIONS(944), + [anon_sym_volatile] = ACTIONS(944), + [anon_sym_restrict] = ACTIONS(944), + [anon_sym__Atomic] = ACTIONS(944), + [anon_sym_signed] = ACTIONS(944), + [anon_sym_unsigned] = ACTIONS(944), + [anon_sym_long] = ACTIONS(944), + [anon_sym_short] = ACTIONS(944), + [sym_primitive_type] = ACTIONS(944), + [anon_sym_enum] = ACTIONS(944), + [anon_sym_struct] = ACTIONS(944), + [anon_sym_union] = ACTIONS(944), + [anon_sym_if] = ACTIONS(944), + [anon_sym_else] = ACTIONS(944), + [anon_sym_switch] = ACTIONS(944), + [anon_sym_case] = ACTIONS(944), + [anon_sym_default] = ACTIONS(944), + [anon_sym_while] = ACTIONS(944), + [anon_sym_do] = ACTIONS(944), + [anon_sym_for] = ACTIONS(944), + [anon_sym_return] = ACTIONS(944), + [anon_sym_break] = ACTIONS(944), + [anon_sym_continue] = ACTIONS(944), + [anon_sym_goto] = ACTIONS(944), + [anon_sym_DASH_DASH] = ACTIONS(946), + [anon_sym_PLUS_PLUS] = ACTIONS(946), + [anon_sym_sizeof] = ACTIONS(944), + [sym_number_literal] = ACTIONS(946), + [anon_sym_L_SQUOTE] = ACTIONS(946), + [anon_sym_u_SQUOTE] = ACTIONS(946), + [anon_sym_U_SQUOTE] = ACTIONS(946), + [anon_sym_u8_SQUOTE] = ACTIONS(946), + [anon_sym_SQUOTE] = ACTIONS(946), + [anon_sym_L_DQUOTE] = ACTIONS(946), + [anon_sym_u_DQUOTE] = ACTIONS(946), + [anon_sym_U_DQUOTE] = ACTIONS(946), + [anon_sym_u8_DQUOTE] = ACTIONS(946), + [anon_sym_DQUOTE] = ACTIONS(946), + [sym_true] = ACTIONS(944), + [sym_false] = ACTIONS(944), + [sym_null] = ACTIONS(944), + [sym_comment] = ACTIONS(3), + }, + [83] = { + [sym_identifier] = ACTIONS(948), + [aux_sym_preproc_include_token1] = ACTIONS(948), + [aux_sym_preproc_def_token1] = ACTIONS(948), + [aux_sym_preproc_if_token1] = ACTIONS(948), + [aux_sym_preproc_if_token2] = ACTIONS(948), + [aux_sym_preproc_ifdef_token1] = ACTIONS(948), + [aux_sym_preproc_ifdef_token2] = ACTIONS(948), + [aux_sym_preproc_else_token1] = ACTIONS(948), + [aux_sym_preproc_elif_token1] = ACTIONS(948), + [sym_preproc_directive] = ACTIONS(948), + [anon_sym_LPAREN2] = ACTIONS(950), + [anon_sym_BANG] = ACTIONS(950), + [anon_sym_TILDE] = ACTIONS(950), + [anon_sym_DASH] = ACTIONS(948), + [anon_sym_PLUS] = ACTIONS(948), + [anon_sym_STAR] = ACTIONS(950), + [anon_sym_AMP] = ACTIONS(950), + [anon_sym_SEMI] = ACTIONS(950), + [anon_sym_typedef] = ACTIONS(948), + [anon_sym_extern] = ACTIONS(948), + [anon_sym___attribute__] = ACTIONS(948), + [anon_sym_LBRACK_LBRACK] = ACTIONS(950), + [anon_sym___declspec] = ACTIONS(948), + [anon_sym___cdecl] = ACTIONS(948), + [anon_sym___clrcall] = ACTIONS(948), + [anon_sym___stdcall] = ACTIONS(948), + [anon_sym___fastcall] = ACTIONS(948), + [anon_sym___thiscall] = ACTIONS(948), + [anon_sym___vectorcall] = ACTIONS(948), + [anon_sym_LBRACE] = ACTIONS(950), + [anon_sym_static] = ACTIONS(948), + [anon_sym_auto] = ACTIONS(948), + [anon_sym_register] = ACTIONS(948), + [anon_sym_inline] = ACTIONS(948), + [anon_sym_const] = ACTIONS(948), + [anon_sym_volatile] = ACTIONS(948), + [anon_sym_restrict] = ACTIONS(948), + [anon_sym__Atomic] = ACTIONS(948), + [anon_sym_signed] = ACTIONS(948), + [anon_sym_unsigned] = ACTIONS(948), + [anon_sym_long] = ACTIONS(948), + [anon_sym_short] = ACTIONS(948), + [sym_primitive_type] = ACTIONS(948), + [anon_sym_enum] = ACTIONS(948), + [anon_sym_struct] = ACTIONS(948), + [anon_sym_union] = ACTIONS(948), + [anon_sym_if] = ACTIONS(948), + [anon_sym_else] = ACTIONS(948), + [anon_sym_switch] = ACTIONS(948), + [anon_sym_case] = ACTIONS(948), + [anon_sym_default] = ACTIONS(948), + [anon_sym_while] = ACTIONS(948), + [anon_sym_do] = ACTIONS(948), + [anon_sym_for] = ACTIONS(948), + [anon_sym_return] = ACTIONS(948), + [anon_sym_break] = ACTIONS(948), + [anon_sym_continue] = ACTIONS(948), + [anon_sym_goto] = ACTIONS(948), + [anon_sym_DASH_DASH] = ACTIONS(950), + [anon_sym_PLUS_PLUS] = ACTIONS(950), + [anon_sym_sizeof] = ACTIONS(948), + [sym_number_literal] = ACTIONS(950), + [anon_sym_L_SQUOTE] = ACTIONS(950), + [anon_sym_u_SQUOTE] = ACTIONS(950), + [anon_sym_U_SQUOTE] = ACTIONS(950), + [anon_sym_u8_SQUOTE] = ACTIONS(950), + [anon_sym_SQUOTE] = ACTIONS(950), + [anon_sym_L_DQUOTE] = ACTIONS(950), + [anon_sym_u_DQUOTE] = ACTIONS(950), + [anon_sym_U_DQUOTE] = ACTIONS(950), + [anon_sym_u8_DQUOTE] = ACTIONS(950), + [anon_sym_DQUOTE] = ACTIONS(950), + [sym_true] = ACTIONS(948), + [sym_false] = ACTIONS(948), + [sym_null] = ACTIONS(948), + [sym_comment] = ACTIONS(3), + }, + [84] = { + [sym_identifier] = ACTIONS(952), + [aux_sym_preproc_include_token1] = ACTIONS(952), + [aux_sym_preproc_def_token1] = ACTIONS(952), + [aux_sym_preproc_if_token1] = ACTIONS(952), + [aux_sym_preproc_if_token2] = ACTIONS(952), + [aux_sym_preproc_ifdef_token1] = ACTIONS(952), + [aux_sym_preproc_ifdef_token2] = ACTIONS(952), + [aux_sym_preproc_else_token1] = ACTIONS(952), + [aux_sym_preproc_elif_token1] = ACTIONS(952), + [sym_preproc_directive] = ACTIONS(952), + [anon_sym_LPAREN2] = ACTIONS(954), + [anon_sym_BANG] = ACTIONS(954), + [anon_sym_TILDE] = ACTIONS(954), + [anon_sym_DASH] = ACTIONS(952), + [anon_sym_PLUS] = ACTIONS(952), + [anon_sym_STAR] = ACTIONS(954), + [anon_sym_AMP] = ACTIONS(954), + [anon_sym_SEMI] = ACTIONS(954), + [anon_sym_typedef] = ACTIONS(952), + [anon_sym_extern] = ACTIONS(952), + [anon_sym___attribute__] = ACTIONS(952), + [anon_sym_LBRACK_LBRACK] = ACTIONS(954), + [anon_sym___declspec] = ACTIONS(952), + [anon_sym___cdecl] = ACTIONS(952), + [anon_sym___clrcall] = ACTIONS(952), + [anon_sym___stdcall] = ACTIONS(952), + [anon_sym___fastcall] = ACTIONS(952), + [anon_sym___thiscall] = ACTIONS(952), + [anon_sym___vectorcall] = ACTIONS(952), + [anon_sym_LBRACE] = ACTIONS(954), + [anon_sym_static] = ACTIONS(952), + [anon_sym_auto] = ACTIONS(952), + [anon_sym_register] = ACTIONS(952), + [anon_sym_inline] = ACTIONS(952), + [anon_sym_const] = ACTIONS(952), + [anon_sym_volatile] = ACTIONS(952), + [anon_sym_restrict] = ACTIONS(952), + [anon_sym__Atomic] = ACTIONS(952), + [anon_sym_signed] = ACTIONS(952), + [anon_sym_unsigned] = ACTIONS(952), + [anon_sym_long] = ACTIONS(952), + [anon_sym_short] = ACTIONS(952), + [sym_primitive_type] = ACTIONS(952), + [anon_sym_enum] = ACTIONS(952), + [anon_sym_struct] = ACTIONS(952), + [anon_sym_union] = ACTIONS(952), + [anon_sym_if] = ACTIONS(952), + [anon_sym_else] = ACTIONS(952), + [anon_sym_switch] = ACTIONS(952), + [anon_sym_case] = ACTIONS(952), + [anon_sym_default] = ACTIONS(952), + [anon_sym_while] = ACTIONS(952), + [anon_sym_do] = ACTIONS(952), + [anon_sym_for] = ACTIONS(952), + [anon_sym_return] = ACTIONS(952), + [anon_sym_break] = ACTIONS(952), + [anon_sym_continue] = ACTIONS(952), + [anon_sym_goto] = ACTIONS(952), + [anon_sym_DASH_DASH] = ACTIONS(954), + [anon_sym_PLUS_PLUS] = ACTIONS(954), + [anon_sym_sizeof] = ACTIONS(952), + [sym_number_literal] = ACTIONS(954), + [anon_sym_L_SQUOTE] = ACTIONS(954), + [anon_sym_u_SQUOTE] = ACTIONS(954), + [anon_sym_U_SQUOTE] = ACTIONS(954), + [anon_sym_u8_SQUOTE] = ACTIONS(954), + [anon_sym_SQUOTE] = ACTIONS(954), + [anon_sym_L_DQUOTE] = ACTIONS(954), + [anon_sym_u_DQUOTE] = ACTIONS(954), + [anon_sym_U_DQUOTE] = ACTIONS(954), + [anon_sym_u8_DQUOTE] = ACTIONS(954), + [anon_sym_DQUOTE] = ACTIONS(954), + [sym_true] = ACTIONS(952), + [sym_false] = ACTIONS(952), + [sym_null] = ACTIONS(952), + [sym_comment] = ACTIONS(3), + }, + [85] = { + [sym_identifier] = ACTIONS(898), + [aux_sym_preproc_include_token1] = ACTIONS(898), + [aux_sym_preproc_def_token1] = ACTIONS(898), + [aux_sym_preproc_if_token1] = ACTIONS(898), + [aux_sym_preproc_if_token2] = ACTIONS(898), + [aux_sym_preproc_ifdef_token1] = ACTIONS(898), + [aux_sym_preproc_ifdef_token2] = ACTIONS(898), + [aux_sym_preproc_else_token1] = ACTIONS(898), + [aux_sym_preproc_elif_token1] = ACTIONS(898), + [sym_preproc_directive] = ACTIONS(898), + [anon_sym_LPAREN2] = ACTIONS(900), + [anon_sym_BANG] = ACTIONS(900), + [anon_sym_TILDE] = ACTIONS(900), + [anon_sym_DASH] = ACTIONS(898), + [anon_sym_PLUS] = ACTIONS(898), + [anon_sym_STAR] = ACTIONS(900), + [anon_sym_AMP] = ACTIONS(900), + [anon_sym_SEMI] = ACTIONS(900), + [anon_sym_typedef] = ACTIONS(898), + [anon_sym_extern] = ACTIONS(898), + [anon_sym___attribute__] = ACTIONS(898), + [anon_sym_LBRACK_LBRACK] = ACTIONS(900), + [anon_sym___declspec] = ACTIONS(898), + [anon_sym___cdecl] = ACTIONS(898), + [anon_sym___clrcall] = ACTIONS(898), + [anon_sym___stdcall] = ACTIONS(898), + [anon_sym___fastcall] = ACTIONS(898), + [anon_sym___thiscall] = ACTIONS(898), + [anon_sym___vectorcall] = ACTIONS(898), + [anon_sym_LBRACE] = ACTIONS(900), + [anon_sym_static] = ACTIONS(898), + [anon_sym_auto] = ACTIONS(898), + [anon_sym_register] = ACTIONS(898), + [anon_sym_inline] = ACTIONS(898), + [anon_sym_const] = ACTIONS(898), + [anon_sym_volatile] = ACTIONS(898), + [anon_sym_restrict] = ACTIONS(898), + [anon_sym__Atomic] = ACTIONS(898), + [anon_sym_signed] = ACTIONS(898), + [anon_sym_unsigned] = ACTIONS(898), + [anon_sym_long] = ACTIONS(898), + [anon_sym_short] = ACTIONS(898), + [sym_primitive_type] = ACTIONS(898), + [anon_sym_enum] = ACTIONS(898), + [anon_sym_struct] = ACTIONS(898), + [anon_sym_union] = ACTIONS(898), + [anon_sym_if] = ACTIONS(898), + [anon_sym_else] = ACTIONS(898), + [anon_sym_switch] = ACTIONS(898), + [anon_sym_case] = ACTIONS(898), + [anon_sym_default] = ACTIONS(898), + [anon_sym_while] = ACTIONS(898), + [anon_sym_do] = ACTIONS(898), + [anon_sym_for] = ACTIONS(898), + [anon_sym_return] = ACTIONS(898), + [anon_sym_break] = ACTIONS(898), + [anon_sym_continue] = ACTIONS(898), + [anon_sym_goto] = ACTIONS(898), + [anon_sym_DASH_DASH] = ACTIONS(900), + [anon_sym_PLUS_PLUS] = ACTIONS(900), + [anon_sym_sizeof] = ACTIONS(898), + [sym_number_literal] = ACTIONS(900), + [anon_sym_L_SQUOTE] = ACTIONS(900), + [anon_sym_u_SQUOTE] = ACTIONS(900), + [anon_sym_U_SQUOTE] = ACTIONS(900), + [anon_sym_u8_SQUOTE] = ACTIONS(900), + [anon_sym_SQUOTE] = ACTIONS(900), + [anon_sym_L_DQUOTE] = ACTIONS(900), + [anon_sym_u_DQUOTE] = ACTIONS(900), + [anon_sym_U_DQUOTE] = ACTIONS(900), + [anon_sym_u8_DQUOTE] = ACTIONS(900), + [anon_sym_DQUOTE] = ACTIONS(900), + [sym_true] = ACTIONS(898), + [sym_false] = ACTIONS(898), + [sym_null] = ACTIONS(898), + [sym_comment] = ACTIONS(3), + }, + [86] = { + [sym_identifier] = ACTIONS(956), + [aux_sym_preproc_include_token1] = ACTIONS(956), + [aux_sym_preproc_def_token1] = ACTIONS(956), + [aux_sym_preproc_if_token1] = ACTIONS(956), + [aux_sym_preproc_if_token2] = ACTIONS(956), + [aux_sym_preproc_ifdef_token1] = ACTIONS(956), + [aux_sym_preproc_ifdef_token2] = ACTIONS(956), + [aux_sym_preproc_else_token1] = ACTIONS(956), + [aux_sym_preproc_elif_token1] = ACTIONS(956), + [sym_preproc_directive] = ACTIONS(956), + [anon_sym_LPAREN2] = ACTIONS(958), + [anon_sym_BANG] = ACTIONS(958), + [anon_sym_TILDE] = ACTIONS(958), + [anon_sym_DASH] = ACTIONS(956), + [anon_sym_PLUS] = ACTIONS(956), + [anon_sym_STAR] = ACTIONS(958), + [anon_sym_AMP] = ACTIONS(958), + [anon_sym_SEMI] = ACTIONS(958), + [anon_sym_typedef] = ACTIONS(956), + [anon_sym_extern] = ACTIONS(956), + [anon_sym___attribute__] = ACTIONS(956), + [anon_sym_LBRACK_LBRACK] = ACTIONS(958), + [anon_sym___declspec] = ACTIONS(956), + [anon_sym___cdecl] = ACTIONS(956), + [anon_sym___clrcall] = ACTIONS(956), + [anon_sym___stdcall] = ACTIONS(956), + [anon_sym___fastcall] = ACTIONS(956), + [anon_sym___thiscall] = ACTIONS(956), + [anon_sym___vectorcall] = ACTIONS(956), + [anon_sym_LBRACE] = ACTIONS(958), + [anon_sym_static] = ACTIONS(956), + [anon_sym_auto] = ACTIONS(956), + [anon_sym_register] = ACTIONS(956), + [anon_sym_inline] = ACTIONS(956), + [anon_sym_const] = ACTIONS(956), + [anon_sym_volatile] = ACTIONS(956), + [anon_sym_restrict] = ACTIONS(956), + [anon_sym__Atomic] = ACTIONS(956), + [anon_sym_signed] = ACTIONS(956), + [anon_sym_unsigned] = ACTIONS(956), + [anon_sym_long] = ACTIONS(956), + [anon_sym_short] = ACTIONS(956), + [sym_primitive_type] = ACTIONS(956), + [anon_sym_enum] = ACTIONS(956), + [anon_sym_struct] = ACTIONS(956), + [anon_sym_union] = ACTIONS(956), + [anon_sym_if] = ACTIONS(956), + [anon_sym_else] = ACTIONS(956), + [anon_sym_switch] = ACTIONS(956), + [anon_sym_case] = ACTIONS(956), + [anon_sym_default] = ACTIONS(956), + [anon_sym_while] = ACTIONS(956), + [anon_sym_do] = ACTIONS(956), + [anon_sym_for] = ACTIONS(956), + [anon_sym_return] = ACTIONS(956), + [anon_sym_break] = ACTIONS(956), + [anon_sym_continue] = ACTIONS(956), + [anon_sym_goto] = ACTIONS(956), + [anon_sym_DASH_DASH] = ACTIONS(958), + [anon_sym_PLUS_PLUS] = ACTIONS(958), + [anon_sym_sizeof] = ACTIONS(956), + [sym_number_literal] = ACTIONS(958), + [anon_sym_L_SQUOTE] = ACTIONS(958), + [anon_sym_u_SQUOTE] = ACTIONS(958), + [anon_sym_U_SQUOTE] = ACTIONS(958), + [anon_sym_u8_SQUOTE] = ACTIONS(958), + [anon_sym_SQUOTE] = ACTIONS(958), + [anon_sym_L_DQUOTE] = ACTIONS(958), + [anon_sym_u_DQUOTE] = ACTIONS(958), + [anon_sym_U_DQUOTE] = ACTIONS(958), + [anon_sym_u8_DQUOTE] = ACTIONS(958), + [anon_sym_DQUOTE] = ACTIONS(958), + [sym_true] = ACTIONS(956), + [sym_false] = ACTIONS(956), + [sym_null] = ACTIONS(956), + [sym_comment] = ACTIONS(3), + }, + [87] = { + [sym_identifier] = ACTIONS(960), + [aux_sym_preproc_include_token1] = ACTIONS(960), + [aux_sym_preproc_def_token1] = ACTIONS(960), + [aux_sym_preproc_if_token1] = ACTIONS(960), + [aux_sym_preproc_if_token2] = ACTIONS(960), + [aux_sym_preproc_ifdef_token1] = ACTIONS(960), + [aux_sym_preproc_ifdef_token2] = ACTIONS(960), + [aux_sym_preproc_else_token1] = ACTIONS(960), + [aux_sym_preproc_elif_token1] = ACTIONS(960), + [sym_preproc_directive] = ACTIONS(960), + [anon_sym_LPAREN2] = ACTIONS(962), + [anon_sym_BANG] = ACTIONS(962), + [anon_sym_TILDE] = ACTIONS(962), + [anon_sym_DASH] = ACTIONS(960), + [anon_sym_PLUS] = ACTIONS(960), + [anon_sym_STAR] = ACTIONS(962), + [anon_sym_AMP] = ACTIONS(962), + [anon_sym_SEMI] = ACTIONS(962), + [anon_sym_typedef] = ACTIONS(960), + [anon_sym_extern] = ACTIONS(960), + [anon_sym___attribute__] = ACTIONS(960), + [anon_sym_LBRACK_LBRACK] = ACTIONS(962), + [anon_sym___declspec] = ACTIONS(960), + [anon_sym___cdecl] = ACTIONS(960), + [anon_sym___clrcall] = ACTIONS(960), + [anon_sym___stdcall] = ACTIONS(960), + [anon_sym___fastcall] = ACTIONS(960), + [anon_sym___thiscall] = ACTIONS(960), + [anon_sym___vectorcall] = ACTIONS(960), + [anon_sym_LBRACE] = ACTIONS(962), + [anon_sym_static] = ACTIONS(960), + [anon_sym_auto] = ACTIONS(960), + [anon_sym_register] = ACTIONS(960), + [anon_sym_inline] = ACTIONS(960), + [anon_sym_const] = ACTIONS(960), + [anon_sym_volatile] = ACTIONS(960), + [anon_sym_restrict] = ACTIONS(960), + [anon_sym__Atomic] = ACTIONS(960), + [anon_sym_signed] = ACTIONS(960), + [anon_sym_unsigned] = ACTIONS(960), + [anon_sym_long] = ACTIONS(960), + [anon_sym_short] = ACTIONS(960), + [sym_primitive_type] = ACTIONS(960), + [anon_sym_enum] = ACTIONS(960), + [anon_sym_struct] = ACTIONS(960), + [anon_sym_union] = ACTIONS(960), + [anon_sym_if] = ACTIONS(960), + [anon_sym_else] = ACTIONS(960), + [anon_sym_switch] = ACTIONS(960), + [anon_sym_case] = ACTIONS(960), + [anon_sym_default] = ACTIONS(960), + [anon_sym_while] = ACTIONS(960), + [anon_sym_do] = ACTIONS(960), + [anon_sym_for] = ACTIONS(960), + [anon_sym_return] = ACTIONS(960), + [anon_sym_break] = ACTIONS(960), + [anon_sym_continue] = ACTIONS(960), + [anon_sym_goto] = ACTIONS(960), + [anon_sym_DASH_DASH] = ACTIONS(962), + [anon_sym_PLUS_PLUS] = ACTIONS(962), + [anon_sym_sizeof] = ACTIONS(960), + [sym_number_literal] = ACTIONS(962), + [anon_sym_L_SQUOTE] = ACTIONS(962), + [anon_sym_u_SQUOTE] = ACTIONS(962), + [anon_sym_U_SQUOTE] = ACTIONS(962), + [anon_sym_u8_SQUOTE] = ACTIONS(962), + [anon_sym_SQUOTE] = ACTIONS(962), + [anon_sym_L_DQUOTE] = ACTIONS(962), + [anon_sym_u_DQUOTE] = ACTIONS(962), + [anon_sym_U_DQUOTE] = ACTIONS(962), + [anon_sym_u8_DQUOTE] = ACTIONS(962), + [anon_sym_DQUOTE] = ACTIONS(962), + [sym_true] = ACTIONS(960), + [sym_false] = ACTIONS(960), + [sym_null] = ACTIONS(960), + [sym_comment] = ACTIONS(3), + }, + [88] = { + [sym_identifier] = ACTIONS(964), + [aux_sym_preproc_include_token1] = ACTIONS(964), + [aux_sym_preproc_def_token1] = ACTIONS(964), + [aux_sym_preproc_if_token1] = ACTIONS(964), + [aux_sym_preproc_if_token2] = ACTIONS(964), + [aux_sym_preproc_ifdef_token1] = ACTIONS(964), + [aux_sym_preproc_ifdef_token2] = ACTIONS(964), + [aux_sym_preproc_else_token1] = ACTIONS(964), + [aux_sym_preproc_elif_token1] = ACTIONS(964), + [sym_preproc_directive] = ACTIONS(964), + [anon_sym_LPAREN2] = ACTIONS(966), + [anon_sym_BANG] = ACTIONS(966), + [anon_sym_TILDE] = ACTIONS(966), + [anon_sym_DASH] = ACTIONS(964), + [anon_sym_PLUS] = ACTIONS(964), + [anon_sym_STAR] = ACTIONS(966), + [anon_sym_AMP] = ACTIONS(966), + [anon_sym_SEMI] = ACTIONS(966), + [anon_sym_typedef] = ACTIONS(964), + [anon_sym_extern] = ACTIONS(964), + [anon_sym___attribute__] = ACTIONS(964), + [anon_sym_LBRACK_LBRACK] = ACTIONS(966), + [anon_sym___declspec] = ACTIONS(964), + [anon_sym___cdecl] = ACTIONS(964), + [anon_sym___clrcall] = ACTIONS(964), + [anon_sym___stdcall] = ACTIONS(964), + [anon_sym___fastcall] = ACTIONS(964), + [anon_sym___thiscall] = ACTIONS(964), + [anon_sym___vectorcall] = ACTIONS(964), + [anon_sym_LBRACE] = ACTIONS(966), + [anon_sym_static] = ACTIONS(964), + [anon_sym_auto] = ACTIONS(964), + [anon_sym_register] = ACTIONS(964), + [anon_sym_inline] = ACTIONS(964), + [anon_sym_const] = ACTIONS(964), + [anon_sym_volatile] = ACTIONS(964), + [anon_sym_restrict] = ACTIONS(964), + [anon_sym__Atomic] = ACTIONS(964), + [anon_sym_signed] = ACTIONS(964), + [anon_sym_unsigned] = ACTIONS(964), + [anon_sym_long] = ACTIONS(964), + [anon_sym_short] = ACTIONS(964), + [sym_primitive_type] = ACTIONS(964), + [anon_sym_enum] = ACTIONS(964), + [anon_sym_struct] = ACTIONS(964), + [anon_sym_union] = ACTIONS(964), + [anon_sym_if] = ACTIONS(964), + [anon_sym_else] = ACTIONS(964), + [anon_sym_switch] = ACTIONS(964), + [anon_sym_case] = ACTIONS(964), + [anon_sym_default] = ACTIONS(964), + [anon_sym_while] = ACTIONS(964), + [anon_sym_do] = ACTIONS(964), + [anon_sym_for] = ACTIONS(964), + [anon_sym_return] = ACTIONS(964), + [anon_sym_break] = ACTIONS(964), + [anon_sym_continue] = ACTIONS(964), + [anon_sym_goto] = ACTIONS(964), + [anon_sym_DASH_DASH] = ACTIONS(966), + [anon_sym_PLUS_PLUS] = ACTIONS(966), + [anon_sym_sizeof] = ACTIONS(964), + [sym_number_literal] = ACTIONS(966), + [anon_sym_L_SQUOTE] = ACTIONS(966), + [anon_sym_u_SQUOTE] = ACTIONS(966), + [anon_sym_U_SQUOTE] = ACTIONS(966), + [anon_sym_u8_SQUOTE] = ACTIONS(966), + [anon_sym_SQUOTE] = ACTIONS(966), + [anon_sym_L_DQUOTE] = ACTIONS(966), + [anon_sym_u_DQUOTE] = ACTIONS(966), + [anon_sym_U_DQUOTE] = ACTIONS(966), + [anon_sym_u8_DQUOTE] = ACTIONS(966), + [anon_sym_DQUOTE] = ACTIONS(966), + [sym_true] = ACTIONS(964), + [sym_false] = ACTIONS(964), + [sym_null] = ACTIONS(964), + [sym_comment] = ACTIONS(3), + }, + [89] = { + [sym_identifier] = ACTIONS(968), + [aux_sym_preproc_include_token1] = ACTIONS(968), + [aux_sym_preproc_def_token1] = ACTIONS(968), + [aux_sym_preproc_if_token1] = ACTIONS(968), + [aux_sym_preproc_if_token2] = ACTIONS(968), + [aux_sym_preproc_ifdef_token1] = ACTIONS(968), + [aux_sym_preproc_ifdef_token2] = ACTIONS(968), + [aux_sym_preproc_else_token1] = ACTIONS(968), + [aux_sym_preproc_elif_token1] = ACTIONS(968), + [sym_preproc_directive] = ACTIONS(968), + [anon_sym_LPAREN2] = ACTIONS(970), + [anon_sym_BANG] = ACTIONS(970), + [anon_sym_TILDE] = ACTIONS(970), + [anon_sym_DASH] = ACTIONS(968), + [anon_sym_PLUS] = ACTIONS(968), + [anon_sym_STAR] = ACTIONS(970), + [anon_sym_AMP] = ACTIONS(970), + [anon_sym_SEMI] = ACTIONS(970), + [anon_sym_typedef] = ACTIONS(968), + [anon_sym_extern] = ACTIONS(968), + [anon_sym___attribute__] = ACTIONS(968), + [anon_sym_LBRACK_LBRACK] = ACTIONS(970), + [anon_sym___declspec] = ACTIONS(968), + [anon_sym___cdecl] = ACTIONS(968), + [anon_sym___clrcall] = ACTIONS(968), + [anon_sym___stdcall] = ACTIONS(968), + [anon_sym___fastcall] = ACTIONS(968), + [anon_sym___thiscall] = ACTIONS(968), + [anon_sym___vectorcall] = ACTIONS(968), + [anon_sym_LBRACE] = ACTIONS(970), + [anon_sym_static] = ACTIONS(968), + [anon_sym_auto] = ACTIONS(968), + [anon_sym_register] = ACTIONS(968), + [anon_sym_inline] = ACTIONS(968), + [anon_sym_const] = ACTIONS(968), + [anon_sym_volatile] = ACTIONS(968), + [anon_sym_restrict] = ACTIONS(968), + [anon_sym__Atomic] = ACTIONS(968), + [anon_sym_signed] = ACTIONS(968), + [anon_sym_unsigned] = ACTIONS(968), + [anon_sym_long] = ACTIONS(968), + [anon_sym_short] = ACTIONS(968), + [sym_primitive_type] = ACTIONS(968), + [anon_sym_enum] = ACTIONS(968), + [anon_sym_struct] = ACTIONS(968), + [anon_sym_union] = ACTIONS(968), + [anon_sym_if] = ACTIONS(968), + [anon_sym_else] = ACTIONS(968), + [anon_sym_switch] = ACTIONS(968), + [anon_sym_case] = ACTIONS(968), + [anon_sym_default] = ACTIONS(968), + [anon_sym_while] = ACTIONS(968), + [anon_sym_do] = ACTIONS(968), + [anon_sym_for] = ACTIONS(968), + [anon_sym_return] = ACTIONS(968), + [anon_sym_break] = ACTIONS(968), + [anon_sym_continue] = ACTIONS(968), + [anon_sym_goto] = ACTIONS(968), + [anon_sym_DASH_DASH] = ACTIONS(970), + [anon_sym_PLUS_PLUS] = ACTIONS(970), + [anon_sym_sizeof] = ACTIONS(968), + [sym_number_literal] = ACTIONS(970), + [anon_sym_L_SQUOTE] = ACTIONS(970), + [anon_sym_u_SQUOTE] = ACTIONS(970), + [anon_sym_U_SQUOTE] = ACTIONS(970), + [anon_sym_u8_SQUOTE] = ACTIONS(970), + [anon_sym_SQUOTE] = ACTIONS(970), + [anon_sym_L_DQUOTE] = ACTIONS(970), + [anon_sym_u_DQUOTE] = ACTIONS(970), + [anon_sym_U_DQUOTE] = ACTIONS(970), + [anon_sym_u8_DQUOTE] = ACTIONS(970), + [anon_sym_DQUOTE] = ACTIONS(970), + [sym_true] = ACTIONS(968), + [sym_false] = ACTIONS(968), + [sym_null] = ACTIONS(968), + [sym_comment] = ACTIONS(3), + }, + [90] = { + [sym_identifier] = ACTIONS(972), + [aux_sym_preproc_include_token1] = ACTIONS(972), + [aux_sym_preproc_def_token1] = ACTIONS(972), + [aux_sym_preproc_if_token1] = ACTIONS(972), + [aux_sym_preproc_if_token2] = ACTIONS(972), + [aux_sym_preproc_ifdef_token1] = ACTIONS(972), + [aux_sym_preproc_ifdef_token2] = ACTIONS(972), + [aux_sym_preproc_else_token1] = ACTIONS(972), + [aux_sym_preproc_elif_token1] = ACTIONS(972), + [sym_preproc_directive] = ACTIONS(972), + [anon_sym_LPAREN2] = ACTIONS(974), + [anon_sym_BANG] = ACTIONS(974), + [anon_sym_TILDE] = ACTIONS(974), + [anon_sym_DASH] = ACTIONS(972), + [anon_sym_PLUS] = ACTIONS(972), + [anon_sym_STAR] = ACTIONS(974), + [anon_sym_AMP] = ACTIONS(974), + [anon_sym_SEMI] = ACTIONS(974), + [anon_sym_typedef] = ACTIONS(972), + [anon_sym_extern] = ACTIONS(972), + [anon_sym___attribute__] = ACTIONS(972), + [anon_sym_LBRACK_LBRACK] = ACTIONS(974), + [anon_sym___declspec] = ACTIONS(972), + [anon_sym___cdecl] = ACTIONS(972), + [anon_sym___clrcall] = ACTIONS(972), + [anon_sym___stdcall] = ACTIONS(972), + [anon_sym___fastcall] = ACTIONS(972), + [anon_sym___thiscall] = ACTIONS(972), + [anon_sym___vectorcall] = ACTIONS(972), + [anon_sym_LBRACE] = ACTIONS(974), + [anon_sym_static] = ACTIONS(972), + [anon_sym_auto] = ACTIONS(972), + [anon_sym_register] = ACTIONS(972), + [anon_sym_inline] = ACTIONS(972), + [anon_sym_const] = ACTIONS(972), + [anon_sym_volatile] = ACTIONS(972), + [anon_sym_restrict] = ACTIONS(972), + [anon_sym__Atomic] = ACTIONS(972), + [anon_sym_signed] = ACTIONS(972), + [anon_sym_unsigned] = ACTIONS(972), + [anon_sym_long] = ACTIONS(972), + [anon_sym_short] = ACTIONS(972), + [sym_primitive_type] = ACTIONS(972), + [anon_sym_enum] = ACTIONS(972), + [anon_sym_struct] = ACTIONS(972), + [anon_sym_union] = ACTIONS(972), + [anon_sym_if] = ACTIONS(972), + [anon_sym_else] = ACTIONS(972), + [anon_sym_switch] = ACTIONS(972), + [anon_sym_case] = ACTIONS(972), + [anon_sym_default] = ACTIONS(972), + [anon_sym_while] = ACTIONS(972), + [anon_sym_do] = ACTIONS(972), + [anon_sym_for] = ACTIONS(972), + [anon_sym_return] = ACTIONS(972), + [anon_sym_break] = ACTIONS(972), + [anon_sym_continue] = ACTIONS(972), + [anon_sym_goto] = ACTIONS(972), + [anon_sym_DASH_DASH] = ACTIONS(974), + [anon_sym_PLUS_PLUS] = ACTIONS(974), + [anon_sym_sizeof] = ACTIONS(972), + [sym_number_literal] = ACTIONS(974), + [anon_sym_L_SQUOTE] = ACTIONS(974), + [anon_sym_u_SQUOTE] = ACTIONS(974), + [anon_sym_U_SQUOTE] = ACTIONS(974), + [anon_sym_u8_SQUOTE] = ACTIONS(974), + [anon_sym_SQUOTE] = ACTIONS(974), + [anon_sym_L_DQUOTE] = ACTIONS(974), + [anon_sym_u_DQUOTE] = ACTIONS(974), + [anon_sym_U_DQUOTE] = ACTIONS(974), + [anon_sym_u8_DQUOTE] = ACTIONS(974), + [anon_sym_DQUOTE] = ACTIONS(974), + [sym_true] = ACTIONS(972), + [sym_false] = ACTIONS(972), + [sym_null] = ACTIONS(972), + [sym_comment] = ACTIONS(3), + }, + [91] = { + [sym_identifier] = ACTIONS(976), + [aux_sym_preproc_include_token1] = ACTIONS(976), + [aux_sym_preproc_def_token1] = ACTIONS(976), + [aux_sym_preproc_if_token1] = ACTIONS(976), + [aux_sym_preproc_if_token2] = ACTIONS(976), + [aux_sym_preproc_ifdef_token1] = ACTIONS(976), + [aux_sym_preproc_ifdef_token2] = ACTIONS(976), + [aux_sym_preproc_else_token1] = ACTIONS(976), + [aux_sym_preproc_elif_token1] = ACTIONS(976), + [sym_preproc_directive] = ACTIONS(976), + [anon_sym_LPAREN2] = ACTIONS(978), + [anon_sym_BANG] = ACTIONS(978), + [anon_sym_TILDE] = ACTIONS(978), + [anon_sym_DASH] = ACTIONS(976), + [anon_sym_PLUS] = ACTIONS(976), + [anon_sym_STAR] = ACTIONS(978), + [anon_sym_AMP] = ACTIONS(978), + [anon_sym_SEMI] = ACTIONS(978), + [anon_sym_typedef] = ACTIONS(976), + [anon_sym_extern] = ACTIONS(976), + [anon_sym___attribute__] = ACTIONS(976), + [anon_sym_LBRACK_LBRACK] = ACTIONS(978), + [anon_sym___declspec] = ACTIONS(976), + [anon_sym___cdecl] = ACTIONS(976), + [anon_sym___clrcall] = ACTIONS(976), + [anon_sym___stdcall] = ACTIONS(976), + [anon_sym___fastcall] = ACTIONS(976), + [anon_sym___thiscall] = ACTIONS(976), + [anon_sym___vectorcall] = ACTIONS(976), + [anon_sym_LBRACE] = ACTIONS(978), + [anon_sym_static] = ACTIONS(976), + [anon_sym_auto] = ACTIONS(976), + [anon_sym_register] = ACTIONS(976), + [anon_sym_inline] = ACTIONS(976), + [anon_sym_const] = ACTIONS(976), + [anon_sym_volatile] = ACTIONS(976), + [anon_sym_restrict] = ACTIONS(976), + [anon_sym__Atomic] = ACTIONS(976), + [anon_sym_signed] = ACTIONS(976), + [anon_sym_unsigned] = ACTIONS(976), + [anon_sym_long] = ACTIONS(976), + [anon_sym_short] = ACTIONS(976), + [sym_primitive_type] = ACTIONS(976), + [anon_sym_enum] = ACTIONS(976), + [anon_sym_struct] = ACTIONS(976), + [anon_sym_union] = ACTIONS(976), + [anon_sym_if] = ACTIONS(976), + [anon_sym_else] = ACTIONS(976), + [anon_sym_switch] = ACTIONS(976), + [anon_sym_case] = ACTIONS(976), + [anon_sym_default] = ACTIONS(976), + [anon_sym_while] = ACTIONS(976), + [anon_sym_do] = ACTIONS(976), + [anon_sym_for] = ACTIONS(976), + [anon_sym_return] = ACTIONS(976), + [anon_sym_break] = ACTIONS(976), + [anon_sym_continue] = ACTIONS(976), + [anon_sym_goto] = ACTIONS(976), + [anon_sym_DASH_DASH] = ACTIONS(978), + [anon_sym_PLUS_PLUS] = ACTIONS(978), + [anon_sym_sizeof] = ACTIONS(976), + [sym_number_literal] = ACTIONS(978), + [anon_sym_L_SQUOTE] = ACTIONS(978), + [anon_sym_u_SQUOTE] = ACTIONS(978), + [anon_sym_U_SQUOTE] = ACTIONS(978), + [anon_sym_u8_SQUOTE] = ACTIONS(978), + [anon_sym_SQUOTE] = ACTIONS(978), + [anon_sym_L_DQUOTE] = ACTIONS(978), + [anon_sym_u_DQUOTE] = ACTIONS(978), + [anon_sym_U_DQUOTE] = ACTIONS(978), + [anon_sym_u8_DQUOTE] = ACTIONS(978), + [anon_sym_DQUOTE] = ACTIONS(978), + [sym_true] = ACTIONS(976), + [sym_false] = ACTIONS(976), + [sym_null] = ACTIONS(976), + [sym_comment] = ACTIONS(3), + }, + [92] = { + [sym_identifier] = ACTIONS(980), + [aux_sym_preproc_include_token1] = ACTIONS(980), + [aux_sym_preproc_def_token1] = ACTIONS(980), + [aux_sym_preproc_if_token1] = ACTIONS(980), + [aux_sym_preproc_if_token2] = ACTIONS(980), + [aux_sym_preproc_ifdef_token1] = ACTIONS(980), + [aux_sym_preproc_ifdef_token2] = ACTIONS(980), + [aux_sym_preproc_else_token1] = ACTIONS(980), + [aux_sym_preproc_elif_token1] = ACTIONS(980), + [sym_preproc_directive] = ACTIONS(980), + [anon_sym_LPAREN2] = ACTIONS(982), + [anon_sym_BANG] = ACTIONS(982), + [anon_sym_TILDE] = ACTIONS(982), + [anon_sym_DASH] = ACTIONS(980), + [anon_sym_PLUS] = ACTIONS(980), + [anon_sym_STAR] = ACTIONS(982), + [anon_sym_AMP] = ACTIONS(982), + [anon_sym_SEMI] = ACTIONS(982), + [anon_sym_typedef] = ACTIONS(980), + [anon_sym_extern] = ACTIONS(980), + [anon_sym___attribute__] = ACTIONS(980), + [anon_sym_LBRACK_LBRACK] = ACTIONS(982), + [anon_sym___declspec] = ACTIONS(980), + [anon_sym___cdecl] = ACTIONS(980), + [anon_sym___clrcall] = ACTIONS(980), + [anon_sym___stdcall] = ACTIONS(980), + [anon_sym___fastcall] = ACTIONS(980), + [anon_sym___thiscall] = ACTIONS(980), + [anon_sym___vectorcall] = ACTIONS(980), + [anon_sym_LBRACE] = ACTIONS(982), + [anon_sym_static] = ACTIONS(980), + [anon_sym_auto] = ACTIONS(980), + [anon_sym_register] = ACTIONS(980), + [anon_sym_inline] = ACTIONS(980), + [anon_sym_const] = ACTIONS(980), + [anon_sym_volatile] = ACTIONS(980), + [anon_sym_restrict] = ACTIONS(980), + [anon_sym__Atomic] = ACTIONS(980), + [anon_sym_signed] = ACTIONS(980), + [anon_sym_unsigned] = ACTIONS(980), + [anon_sym_long] = ACTIONS(980), + [anon_sym_short] = ACTIONS(980), + [sym_primitive_type] = ACTIONS(980), + [anon_sym_enum] = ACTIONS(980), + [anon_sym_struct] = ACTIONS(980), + [anon_sym_union] = ACTIONS(980), + [anon_sym_if] = ACTIONS(980), + [anon_sym_else] = ACTIONS(980), + [anon_sym_switch] = ACTIONS(980), + [anon_sym_case] = ACTIONS(980), + [anon_sym_default] = ACTIONS(980), + [anon_sym_while] = ACTIONS(980), + [anon_sym_do] = ACTIONS(980), + [anon_sym_for] = ACTIONS(980), + [anon_sym_return] = ACTIONS(980), + [anon_sym_break] = ACTIONS(980), + [anon_sym_continue] = ACTIONS(980), + [anon_sym_goto] = ACTIONS(980), + [anon_sym_DASH_DASH] = ACTIONS(982), + [anon_sym_PLUS_PLUS] = ACTIONS(982), + [anon_sym_sizeof] = ACTIONS(980), + [sym_number_literal] = ACTIONS(982), + [anon_sym_L_SQUOTE] = ACTIONS(982), + [anon_sym_u_SQUOTE] = ACTIONS(982), + [anon_sym_U_SQUOTE] = ACTIONS(982), + [anon_sym_u8_SQUOTE] = ACTIONS(982), + [anon_sym_SQUOTE] = ACTIONS(982), + [anon_sym_L_DQUOTE] = ACTIONS(982), + [anon_sym_u_DQUOTE] = ACTIONS(982), + [anon_sym_U_DQUOTE] = ACTIONS(982), + [anon_sym_u8_DQUOTE] = ACTIONS(982), + [anon_sym_DQUOTE] = ACTIONS(982), + [sym_true] = ACTIONS(980), + [sym_false] = ACTIONS(980), + [sym_null] = ACTIONS(980), + [sym_comment] = ACTIONS(3), + }, + [93] = { + [sym_identifier] = ACTIONS(984), + [aux_sym_preproc_include_token1] = ACTIONS(984), + [aux_sym_preproc_def_token1] = ACTIONS(984), + [aux_sym_preproc_if_token1] = ACTIONS(984), + [aux_sym_preproc_if_token2] = ACTIONS(984), + [aux_sym_preproc_ifdef_token1] = ACTIONS(984), + [aux_sym_preproc_ifdef_token2] = ACTIONS(984), + [aux_sym_preproc_else_token1] = ACTIONS(984), + [aux_sym_preproc_elif_token1] = ACTIONS(984), + [sym_preproc_directive] = ACTIONS(984), + [anon_sym_LPAREN2] = ACTIONS(986), + [anon_sym_BANG] = ACTIONS(986), + [anon_sym_TILDE] = ACTIONS(986), + [anon_sym_DASH] = ACTIONS(984), + [anon_sym_PLUS] = ACTIONS(984), + [anon_sym_STAR] = ACTIONS(986), + [anon_sym_AMP] = ACTIONS(986), + [anon_sym_SEMI] = ACTIONS(986), + [anon_sym_typedef] = ACTIONS(984), + [anon_sym_extern] = ACTIONS(984), + [anon_sym___attribute__] = ACTIONS(984), + [anon_sym_LBRACK_LBRACK] = ACTIONS(986), + [anon_sym___declspec] = ACTIONS(984), + [anon_sym___cdecl] = ACTIONS(984), + [anon_sym___clrcall] = ACTIONS(984), + [anon_sym___stdcall] = ACTIONS(984), + [anon_sym___fastcall] = ACTIONS(984), + [anon_sym___thiscall] = ACTIONS(984), + [anon_sym___vectorcall] = ACTIONS(984), + [anon_sym_LBRACE] = ACTIONS(986), + [anon_sym_static] = ACTIONS(984), + [anon_sym_auto] = ACTIONS(984), + [anon_sym_register] = ACTIONS(984), + [anon_sym_inline] = ACTIONS(984), + [anon_sym_const] = ACTIONS(984), + [anon_sym_volatile] = ACTIONS(984), + [anon_sym_restrict] = ACTIONS(984), + [anon_sym__Atomic] = ACTIONS(984), + [anon_sym_signed] = ACTIONS(984), + [anon_sym_unsigned] = ACTIONS(984), + [anon_sym_long] = ACTIONS(984), + [anon_sym_short] = ACTIONS(984), + [sym_primitive_type] = ACTIONS(984), + [anon_sym_enum] = ACTIONS(984), + [anon_sym_struct] = ACTIONS(984), + [anon_sym_union] = ACTIONS(984), + [anon_sym_if] = ACTIONS(984), + [anon_sym_else] = ACTIONS(984), + [anon_sym_switch] = ACTIONS(984), + [anon_sym_case] = ACTIONS(984), + [anon_sym_default] = ACTIONS(984), + [anon_sym_while] = ACTIONS(984), + [anon_sym_do] = ACTIONS(984), + [anon_sym_for] = ACTIONS(984), + [anon_sym_return] = ACTIONS(984), + [anon_sym_break] = ACTIONS(984), + [anon_sym_continue] = ACTIONS(984), + [anon_sym_goto] = ACTIONS(984), + [anon_sym_DASH_DASH] = ACTIONS(986), + [anon_sym_PLUS_PLUS] = ACTIONS(986), + [anon_sym_sizeof] = ACTIONS(984), + [sym_number_literal] = ACTIONS(986), + [anon_sym_L_SQUOTE] = ACTIONS(986), + [anon_sym_u_SQUOTE] = ACTIONS(986), + [anon_sym_U_SQUOTE] = ACTIONS(986), + [anon_sym_u8_SQUOTE] = ACTIONS(986), + [anon_sym_SQUOTE] = ACTIONS(986), + [anon_sym_L_DQUOTE] = ACTIONS(986), + [anon_sym_u_DQUOTE] = ACTIONS(986), + [anon_sym_U_DQUOTE] = ACTIONS(986), + [anon_sym_u8_DQUOTE] = ACTIONS(986), + [anon_sym_DQUOTE] = ACTIONS(986), + [sym_true] = ACTIONS(984), + [sym_false] = ACTIONS(984), + [sym_null] = ACTIONS(984), + [sym_comment] = ACTIONS(3), + }, + [94] = { + [sym_identifier] = ACTIONS(988), + [aux_sym_preproc_include_token1] = ACTIONS(988), + [aux_sym_preproc_def_token1] = ACTIONS(988), + [aux_sym_preproc_if_token1] = ACTIONS(988), + [aux_sym_preproc_if_token2] = ACTIONS(988), + [aux_sym_preproc_ifdef_token1] = ACTIONS(988), + [aux_sym_preproc_ifdef_token2] = ACTIONS(988), + [aux_sym_preproc_else_token1] = ACTIONS(988), + [aux_sym_preproc_elif_token1] = ACTIONS(988), + [sym_preproc_directive] = ACTIONS(988), + [anon_sym_LPAREN2] = ACTIONS(990), + [anon_sym_BANG] = ACTIONS(990), + [anon_sym_TILDE] = ACTIONS(990), + [anon_sym_DASH] = ACTIONS(988), + [anon_sym_PLUS] = ACTIONS(988), + [anon_sym_STAR] = ACTIONS(990), + [anon_sym_AMP] = ACTIONS(990), + [anon_sym_SEMI] = ACTIONS(990), + [anon_sym_typedef] = ACTIONS(988), + [anon_sym_extern] = ACTIONS(988), + [anon_sym___attribute__] = ACTIONS(988), + [anon_sym_LBRACK_LBRACK] = ACTIONS(990), + [anon_sym___declspec] = ACTIONS(988), + [anon_sym___cdecl] = ACTIONS(988), + [anon_sym___clrcall] = ACTIONS(988), + [anon_sym___stdcall] = ACTIONS(988), + [anon_sym___fastcall] = ACTIONS(988), + [anon_sym___thiscall] = ACTIONS(988), + [anon_sym___vectorcall] = ACTIONS(988), + [anon_sym_LBRACE] = ACTIONS(990), + [anon_sym_static] = ACTIONS(988), + [anon_sym_auto] = ACTIONS(988), + [anon_sym_register] = ACTIONS(988), + [anon_sym_inline] = ACTIONS(988), + [anon_sym_const] = ACTIONS(988), + [anon_sym_volatile] = ACTIONS(988), + [anon_sym_restrict] = ACTIONS(988), + [anon_sym__Atomic] = ACTIONS(988), + [anon_sym_signed] = ACTIONS(988), + [anon_sym_unsigned] = ACTIONS(988), + [anon_sym_long] = ACTIONS(988), + [anon_sym_short] = ACTIONS(988), + [sym_primitive_type] = ACTIONS(988), + [anon_sym_enum] = ACTIONS(988), + [anon_sym_struct] = ACTIONS(988), + [anon_sym_union] = ACTIONS(988), + [anon_sym_if] = ACTIONS(988), + [anon_sym_else] = ACTIONS(988), + [anon_sym_switch] = ACTIONS(988), + [anon_sym_case] = ACTIONS(988), + [anon_sym_default] = ACTIONS(988), + [anon_sym_while] = ACTIONS(988), + [anon_sym_do] = ACTIONS(988), + [anon_sym_for] = ACTIONS(988), + [anon_sym_return] = ACTIONS(988), + [anon_sym_break] = ACTIONS(988), + [anon_sym_continue] = ACTIONS(988), + [anon_sym_goto] = ACTIONS(988), + [anon_sym_DASH_DASH] = ACTIONS(990), + [anon_sym_PLUS_PLUS] = ACTIONS(990), + [anon_sym_sizeof] = ACTIONS(988), + [sym_number_literal] = ACTIONS(990), + [anon_sym_L_SQUOTE] = ACTIONS(990), + [anon_sym_u_SQUOTE] = ACTIONS(990), + [anon_sym_U_SQUOTE] = ACTIONS(990), + [anon_sym_u8_SQUOTE] = ACTIONS(990), + [anon_sym_SQUOTE] = ACTIONS(990), + [anon_sym_L_DQUOTE] = ACTIONS(990), + [anon_sym_u_DQUOTE] = ACTIONS(990), + [anon_sym_U_DQUOTE] = ACTIONS(990), + [anon_sym_u8_DQUOTE] = ACTIONS(990), + [anon_sym_DQUOTE] = ACTIONS(990), + [sym_true] = ACTIONS(988), + [sym_false] = ACTIONS(988), + [sym_null] = ACTIONS(988), + [sym_comment] = ACTIONS(3), + }, + [95] = { + [sym_identifier] = ACTIONS(992), + [aux_sym_preproc_include_token1] = ACTIONS(992), + [aux_sym_preproc_def_token1] = ACTIONS(992), + [aux_sym_preproc_if_token1] = ACTIONS(992), + [aux_sym_preproc_if_token2] = ACTIONS(992), + [aux_sym_preproc_ifdef_token1] = ACTIONS(992), + [aux_sym_preproc_ifdef_token2] = ACTIONS(992), + [aux_sym_preproc_else_token1] = ACTIONS(992), + [aux_sym_preproc_elif_token1] = ACTIONS(992), + [sym_preproc_directive] = ACTIONS(992), + [anon_sym_LPAREN2] = ACTIONS(994), + [anon_sym_BANG] = ACTIONS(994), + [anon_sym_TILDE] = ACTIONS(994), + [anon_sym_DASH] = ACTIONS(992), + [anon_sym_PLUS] = ACTIONS(992), + [anon_sym_STAR] = ACTIONS(994), + [anon_sym_AMP] = ACTIONS(994), + [anon_sym_SEMI] = ACTIONS(994), + [anon_sym_typedef] = ACTIONS(992), + [anon_sym_extern] = ACTIONS(992), + [anon_sym___attribute__] = ACTIONS(992), + [anon_sym_LBRACK_LBRACK] = ACTIONS(994), + [anon_sym___declspec] = ACTIONS(992), + [anon_sym___cdecl] = ACTIONS(992), + [anon_sym___clrcall] = ACTIONS(992), + [anon_sym___stdcall] = ACTIONS(992), + [anon_sym___fastcall] = ACTIONS(992), + [anon_sym___thiscall] = ACTIONS(992), + [anon_sym___vectorcall] = ACTIONS(992), + [anon_sym_LBRACE] = ACTIONS(994), + [anon_sym_static] = ACTIONS(992), + [anon_sym_auto] = ACTIONS(992), + [anon_sym_register] = ACTIONS(992), + [anon_sym_inline] = ACTIONS(992), + [anon_sym_const] = ACTIONS(992), + [anon_sym_volatile] = ACTIONS(992), + [anon_sym_restrict] = ACTIONS(992), + [anon_sym__Atomic] = ACTIONS(992), + [anon_sym_signed] = ACTIONS(992), + [anon_sym_unsigned] = ACTIONS(992), + [anon_sym_long] = ACTIONS(992), + [anon_sym_short] = ACTIONS(992), + [sym_primitive_type] = ACTIONS(992), + [anon_sym_enum] = ACTIONS(992), + [anon_sym_struct] = ACTIONS(992), + [anon_sym_union] = ACTIONS(992), + [anon_sym_if] = ACTIONS(992), + [anon_sym_else] = ACTIONS(992), + [anon_sym_switch] = ACTIONS(992), + [anon_sym_case] = ACTIONS(992), + [anon_sym_default] = ACTIONS(992), + [anon_sym_while] = ACTIONS(992), + [anon_sym_do] = ACTIONS(992), + [anon_sym_for] = ACTIONS(992), + [anon_sym_return] = ACTIONS(992), + [anon_sym_break] = ACTIONS(992), + [anon_sym_continue] = ACTIONS(992), + [anon_sym_goto] = ACTIONS(992), + [anon_sym_DASH_DASH] = ACTIONS(994), + [anon_sym_PLUS_PLUS] = ACTIONS(994), + [anon_sym_sizeof] = ACTIONS(992), + [sym_number_literal] = ACTIONS(994), + [anon_sym_L_SQUOTE] = ACTIONS(994), + [anon_sym_u_SQUOTE] = ACTIONS(994), + [anon_sym_U_SQUOTE] = ACTIONS(994), + [anon_sym_u8_SQUOTE] = ACTIONS(994), + [anon_sym_SQUOTE] = ACTIONS(994), + [anon_sym_L_DQUOTE] = ACTIONS(994), + [anon_sym_u_DQUOTE] = ACTIONS(994), + [anon_sym_U_DQUOTE] = ACTIONS(994), + [anon_sym_u8_DQUOTE] = ACTIONS(994), + [anon_sym_DQUOTE] = ACTIONS(994), + [sym_true] = ACTIONS(992), + [sym_false] = ACTIONS(992), + [sym_null] = ACTIONS(992), + [sym_comment] = ACTIONS(3), + }, + [96] = { + [sym_identifier] = ACTIONS(996), + [aux_sym_preproc_include_token1] = ACTIONS(996), + [aux_sym_preproc_def_token1] = ACTIONS(996), + [aux_sym_preproc_if_token1] = ACTIONS(996), + [aux_sym_preproc_if_token2] = ACTIONS(996), + [aux_sym_preproc_ifdef_token1] = ACTIONS(996), + [aux_sym_preproc_ifdef_token2] = ACTIONS(996), + [aux_sym_preproc_else_token1] = ACTIONS(996), + [aux_sym_preproc_elif_token1] = ACTIONS(996), + [sym_preproc_directive] = ACTIONS(996), + [anon_sym_LPAREN2] = ACTIONS(998), + [anon_sym_BANG] = ACTIONS(998), + [anon_sym_TILDE] = ACTIONS(998), + [anon_sym_DASH] = ACTIONS(996), + [anon_sym_PLUS] = ACTIONS(996), + [anon_sym_STAR] = ACTIONS(998), + [anon_sym_AMP] = ACTIONS(998), + [anon_sym_SEMI] = ACTIONS(998), + [anon_sym_typedef] = ACTIONS(996), + [anon_sym_extern] = ACTIONS(996), + [anon_sym___attribute__] = ACTIONS(996), + [anon_sym_LBRACK_LBRACK] = ACTIONS(998), + [anon_sym___declspec] = ACTIONS(996), + [anon_sym___cdecl] = ACTIONS(996), + [anon_sym___clrcall] = ACTIONS(996), + [anon_sym___stdcall] = ACTIONS(996), + [anon_sym___fastcall] = ACTIONS(996), + [anon_sym___thiscall] = ACTIONS(996), + [anon_sym___vectorcall] = ACTIONS(996), + [anon_sym_LBRACE] = ACTIONS(998), + [anon_sym_static] = ACTIONS(996), + [anon_sym_auto] = ACTIONS(996), + [anon_sym_register] = ACTIONS(996), + [anon_sym_inline] = ACTIONS(996), + [anon_sym_const] = ACTIONS(996), + [anon_sym_volatile] = ACTIONS(996), + [anon_sym_restrict] = ACTIONS(996), + [anon_sym__Atomic] = ACTIONS(996), + [anon_sym_signed] = ACTIONS(996), + [anon_sym_unsigned] = ACTIONS(996), + [anon_sym_long] = ACTIONS(996), + [anon_sym_short] = ACTIONS(996), + [sym_primitive_type] = ACTIONS(996), + [anon_sym_enum] = ACTIONS(996), + [anon_sym_struct] = ACTIONS(996), + [anon_sym_union] = ACTIONS(996), + [anon_sym_if] = ACTIONS(996), + [anon_sym_else] = ACTIONS(996), + [anon_sym_switch] = ACTIONS(996), + [anon_sym_case] = ACTIONS(996), + [anon_sym_default] = ACTIONS(996), + [anon_sym_while] = ACTIONS(996), + [anon_sym_do] = ACTIONS(996), + [anon_sym_for] = ACTIONS(996), + [anon_sym_return] = ACTIONS(996), + [anon_sym_break] = ACTIONS(996), + [anon_sym_continue] = ACTIONS(996), + [anon_sym_goto] = ACTIONS(996), + [anon_sym_DASH_DASH] = ACTIONS(998), + [anon_sym_PLUS_PLUS] = ACTIONS(998), + [anon_sym_sizeof] = ACTIONS(996), + [sym_number_literal] = ACTIONS(998), + [anon_sym_L_SQUOTE] = ACTIONS(998), + [anon_sym_u_SQUOTE] = ACTIONS(998), + [anon_sym_U_SQUOTE] = ACTIONS(998), + [anon_sym_u8_SQUOTE] = ACTIONS(998), + [anon_sym_SQUOTE] = ACTIONS(998), + [anon_sym_L_DQUOTE] = ACTIONS(998), + [anon_sym_u_DQUOTE] = ACTIONS(998), + [anon_sym_U_DQUOTE] = ACTIONS(998), + [anon_sym_u8_DQUOTE] = ACTIONS(998), + [anon_sym_DQUOTE] = ACTIONS(998), + [sym_true] = ACTIONS(996), + [sym_false] = ACTIONS(996), + [sym_null] = ACTIONS(996), + [sym_comment] = ACTIONS(3), + }, + [97] = { + [sym_identifier] = ACTIONS(1000), + [aux_sym_preproc_include_token1] = ACTIONS(1000), + [aux_sym_preproc_def_token1] = ACTIONS(1000), + [aux_sym_preproc_if_token1] = ACTIONS(1000), + [aux_sym_preproc_if_token2] = ACTIONS(1000), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1000), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1000), + [aux_sym_preproc_else_token1] = ACTIONS(1000), + [aux_sym_preproc_elif_token1] = ACTIONS(1000), + [sym_preproc_directive] = ACTIONS(1000), + [anon_sym_LPAREN2] = ACTIONS(1002), + [anon_sym_BANG] = ACTIONS(1002), + [anon_sym_TILDE] = ACTIONS(1002), + [anon_sym_DASH] = ACTIONS(1000), + [anon_sym_PLUS] = ACTIONS(1000), + [anon_sym_STAR] = ACTIONS(1002), + [anon_sym_AMP] = ACTIONS(1002), + [anon_sym_SEMI] = ACTIONS(1002), + [anon_sym_typedef] = ACTIONS(1000), + [anon_sym_extern] = ACTIONS(1000), + [anon_sym___attribute__] = ACTIONS(1000), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1002), + [anon_sym___declspec] = ACTIONS(1000), + [anon_sym___cdecl] = ACTIONS(1000), + [anon_sym___clrcall] = ACTIONS(1000), + [anon_sym___stdcall] = ACTIONS(1000), + [anon_sym___fastcall] = ACTIONS(1000), + [anon_sym___thiscall] = ACTIONS(1000), + [anon_sym___vectorcall] = ACTIONS(1000), + [anon_sym_LBRACE] = ACTIONS(1002), + [anon_sym_static] = ACTIONS(1000), + [anon_sym_auto] = ACTIONS(1000), + [anon_sym_register] = ACTIONS(1000), + [anon_sym_inline] = ACTIONS(1000), + [anon_sym_const] = ACTIONS(1000), + [anon_sym_volatile] = ACTIONS(1000), + [anon_sym_restrict] = ACTIONS(1000), + [anon_sym__Atomic] = ACTIONS(1000), + [anon_sym_signed] = ACTIONS(1000), + [anon_sym_unsigned] = ACTIONS(1000), + [anon_sym_long] = ACTIONS(1000), + [anon_sym_short] = ACTIONS(1000), + [sym_primitive_type] = ACTIONS(1000), + [anon_sym_enum] = ACTIONS(1000), + [anon_sym_struct] = ACTIONS(1000), + [anon_sym_union] = ACTIONS(1000), + [anon_sym_if] = ACTIONS(1000), + [anon_sym_else] = ACTIONS(1000), + [anon_sym_switch] = ACTIONS(1000), + [anon_sym_case] = ACTIONS(1000), + [anon_sym_default] = ACTIONS(1000), + [anon_sym_while] = ACTIONS(1000), + [anon_sym_do] = ACTIONS(1000), + [anon_sym_for] = ACTIONS(1000), + [anon_sym_return] = ACTIONS(1000), + [anon_sym_break] = ACTIONS(1000), + [anon_sym_continue] = ACTIONS(1000), + [anon_sym_goto] = ACTIONS(1000), + [anon_sym_DASH_DASH] = ACTIONS(1002), + [anon_sym_PLUS_PLUS] = ACTIONS(1002), + [anon_sym_sizeof] = ACTIONS(1000), + [sym_number_literal] = ACTIONS(1002), + [anon_sym_L_SQUOTE] = ACTIONS(1002), + [anon_sym_u_SQUOTE] = ACTIONS(1002), + [anon_sym_U_SQUOTE] = ACTIONS(1002), + [anon_sym_u8_SQUOTE] = ACTIONS(1002), + [anon_sym_SQUOTE] = ACTIONS(1002), + [anon_sym_L_DQUOTE] = ACTIONS(1002), + [anon_sym_u_DQUOTE] = ACTIONS(1002), + [anon_sym_U_DQUOTE] = ACTIONS(1002), + [anon_sym_u8_DQUOTE] = ACTIONS(1002), + [anon_sym_DQUOTE] = ACTIONS(1002), + [sym_true] = ACTIONS(1000), + [sym_false] = ACTIONS(1000), + [sym_null] = ACTIONS(1000), + [sym_comment] = ACTIONS(3), + }, + [98] = { + [sym_identifier] = ACTIONS(1004), + [aux_sym_preproc_include_token1] = ACTIONS(1004), + [aux_sym_preproc_def_token1] = ACTIONS(1004), + [aux_sym_preproc_if_token1] = ACTIONS(1004), + [aux_sym_preproc_if_token2] = ACTIONS(1004), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1004), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1004), + [aux_sym_preproc_else_token1] = ACTIONS(1004), + [aux_sym_preproc_elif_token1] = ACTIONS(1004), + [sym_preproc_directive] = ACTIONS(1004), + [anon_sym_LPAREN2] = ACTIONS(1006), + [anon_sym_BANG] = ACTIONS(1006), + [anon_sym_TILDE] = ACTIONS(1006), + [anon_sym_DASH] = ACTIONS(1004), + [anon_sym_PLUS] = ACTIONS(1004), + [anon_sym_STAR] = ACTIONS(1006), + [anon_sym_AMP] = ACTIONS(1006), + [anon_sym_SEMI] = ACTIONS(1006), + [anon_sym_typedef] = ACTIONS(1004), + [anon_sym_extern] = ACTIONS(1004), + [anon_sym___attribute__] = ACTIONS(1004), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1006), + [anon_sym___declspec] = ACTIONS(1004), + [anon_sym___cdecl] = ACTIONS(1004), + [anon_sym___clrcall] = ACTIONS(1004), + [anon_sym___stdcall] = ACTIONS(1004), + [anon_sym___fastcall] = ACTIONS(1004), + [anon_sym___thiscall] = ACTIONS(1004), + [anon_sym___vectorcall] = ACTIONS(1004), + [anon_sym_LBRACE] = ACTIONS(1006), + [anon_sym_static] = ACTIONS(1004), + [anon_sym_auto] = ACTIONS(1004), + [anon_sym_register] = ACTIONS(1004), + [anon_sym_inline] = ACTIONS(1004), + [anon_sym_const] = ACTIONS(1004), + [anon_sym_volatile] = ACTIONS(1004), + [anon_sym_restrict] = ACTIONS(1004), + [anon_sym__Atomic] = ACTIONS(1004), + [anon_sym_signed] = ACTIONS(1004), + [anon_sym_unsigned] = ACTIONS(1004), + [anon_sym_long] = ACTIONS(1004), + [anon_sym_short] = ACTIONS(1004), + [sym_primitive_type] = ACTIONS(1004), + [anon_sym_enum] = ACTIONS(1004), + [anon_sym_struct] = ACTIONS(1004), + [anon_sym_union] = ACTIONS(1004), + [anon_sym_if] = ACTIONS(1004), + [anon_sym_else] = ACTIONS(1004), + [anon_sym_switch] = ACTIONS(1004), + [anon_sym_case] = ACTIONS(1004), + [anon_sym_default] = ACTIONS(1004), + [anon_sym_while] = ACTIONS(1004), + [anon_sym_do] = ACTIONS(1004), + [anon_sym_for] = ACTIONS(1004), + [anon_sym_return] = ACTIONS(1004), + [anon_sym_break] = ACTIONS(1004), + [anon_sym_continue] = ACTIONS(1004), + [anon_sym_goto] = ACTIONS(1004), + [anon_sym_DASH_DASH] = ACTIONS(1006), + [anon_sym_PLUS_PLUS] = ACTIONS(1006), + [anon_sym_sizeof] = ACTIONS(1004), + [sym_number_literal] = ACTIONS(1006), + [anon_sym_L_SQUOTE] = ACTIONS(1006), + [anon_sym_u_SQUOTE] = ACTIONS(1006), + [anon_sym_U_SQUOTE] = ACTIONS(1006), + [anon_sym_u8_SQUOTE] = ACTIONS(1006), + [anon_sym_SQUOTE] = ACTIONS(1006), + [anon_sym_L_DQUOTE] = ACTIONS(1006), + [anon_sym_u_DQUOTE] = ACTIONS(1006), + [anon_sym_U_DQUOTE] = ACTIONS(1006), + [anon_sym_u8_DQUOTE] = ACTIONS(1006), + [anon_sym_DQUOTE] = ACTIONS(1006), + [sym_true] = ACTIONS(1004), + [sym_false] = ACTIONS(1004), + [sym_null] = ACTIONS(1004), + [sym_comment] = ACTIONS(3), + }, + [99] = { + [sym_identifier] = ACTIONS(1008), + [aux_sym_preproc_include_token1] = ACTIONS(1008), + [aux_sym_preproc_def_token1] = ACTIONS(1008), + [aux_sym_preproc_if_token1] = ACTIONS(1008), + [aux_sym_preproc_if_token2] = ACTIONS(1008), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1008), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1008), + [aux_sym_preproc_else_token1] = ACTIONS(1008), + [aux_sym_preproc_elif_token1] = ACTIONS(1008), + [sym_preproc_directive] = ACTIONS(1008), + [anon_sym_LPAREN2] = ACTIONS(1010), + [anon_sym_BANG] = ACTIONS(1010), + [anon_sym_TILDE] = ACTIONS(1010), + [anon_sym_DASH] = ACTIONS(1008), + [anon_sym_PLUS] = ACTIONS(1008), + [anon_sym_STAR] = ACTIONS(1010), + [anon_sym_AMP] = ACTIONS(1010), + [anon_sym_SEMI] = ACTIONS(1010), + [anon_sym_typedef] = ACTIONS(1008), + [anon_sym_extern] = ACTIONS(1008), + [anon_sym___attribute__] = ACTIONS(1008), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1010), + [anon_sym___declspec] = ACTIONS(1008), + [anon_sym___cdecl] = ACTIONS(1008), + [anon_sym___clrcall] = ACTIONS(1008), + [anon_sym___stdcall] = ACTIONS(1008), + [anon_sym___fastcall] = ACTIONS(1008), + [anon_sym___thiscall] = ACTIONS(1008), + [anon_sym___vectorcall] = ACTIONS(1008), + [anon_sym_LBRACE] = ACTIONS(1010), + [anon_sym_static] = ACTIONS(1008), + [anon_sym_auto] = ACTIONS(1008), + [anon_sym_register] = ACTIONS(1008), + [anon_sym_inline] = ACTIONS(1008), + [anon_sym_const] = ACTIONS(1008), + [anon_sym_volatile] = ACTIONS(1008), + [anon_sym_restrict] = ACTIONS(1008), + [anon_sym__Atomic] = ACTIONS(1008), + [anon_sym_signed] = ACTIONS(1008), + [anon_sym_unsigned] = ACTIONS(1008), + [anon_sym_long] = ACTIONS(1008), + [anon_sym_short] = ACTIONS(1008), + [sym_primitive_type] = ACTIONS(1008), + [anon_sym_enum] = ACTIONS(1008), + [anon_sym_struct] = ACTIONS(1008), + [anon_sym_union] = ACTIONS(1008), + [anon_sym_if] = ACTIONS(1008), + [anon_sym_else] = ACTIONS(1008), + [anon_sym_switch] = ACTIONS(1008), + [anon_sym_case] = ACTIONS(1008), + [anon_sym_default] = ACTIONS(1008), + [anon_sym_while] = ACTIONS(1008), + [anon_sym_do] = ACTIONS(1008), + [anon_sym_for] = ACTIONS(1008), + [anon_sym_return] = ACTIONS(1008), + [anon_sym_break] = ACTIONS(1008), + [anon_sym_continue] = ACTIONS(1008), + [anon_sym_goto] = ACTIONS(1008), + [anon_sym_DASH_DASH] = ACTIONS(1010), + [anon_sym_PLUS_PLUS] = ACTIONS(1010), + [anon_sym_sizeof] = ACTIONS(1008), + [sym_number_literal] = ACTIONS(1010), + [anon_sym_L_SQUOTE] = ACTIONS(1010), + [anon_sym_u_SQUOTE] = ACTIONS(1010), + [anon_sym_U_SQUOTE] = ACTIONS(1010), + [anon_sym_u8_SQUOTE] = ACTIONS(1010), + [anon_sym_SQUOTE] = ACTIONS(1010), + [anon_sym_L_DQUOTE] = ACTIONS(1010), + [anon_sym_u_DQUOTE] = ACTIONS(1010), + [anon_sym_U_DQUOTE] = ACTIONS(1010), + [anon_sym_u8_DQUOTE] = ACTIONS(1010), + [anon_sym_DQUOTE] = ACTIONS(1010), + [sym_true] = ACTIONS(1008), + [sym_false] = ACTIONS(1008), + [sym_null] = ACTIONS(1008), + [sym_comment] = ACTIONS(3), + }, + [100] = { + [sym_identifier] = ACTIONS(1012), + [aux_sym_preproc_include_token1] = ACTIONS(1012), + [aux_sym_preproc_def_token1] = ACTIONS(1012), + [aux_sym_preproc_if_token1] = ACTIONS(1012), + [aux_sym_preproc_if_token2] = ACTIONS(1012), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1012), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1012), + [aux_sym_preproc_else_token1] = ACTIONS(1012), + [aux_sym_preproc_elif_token1] = ACTIONS(1012), + [sym_preproc_directive] = ACTIONS(1012), + [anon_sym_LPAREN2] = ACTIONS(1014), + [anon_sym_BANG] = ACTIONS(1014), + [anon_sym_TILDE] = ACTIONS(1014), + [anon_sym_DASH] = ACTIONS(1012), + [anon_sym_PLUS] = ACTIONS(1012), + [anon_sym_STAR] = ACTIONS(1014), + [anon_sym_AMP] = ACTIONS(1014), + [anon_sym_SEMI] = ACTIONS(1014), + [anon_sym_typedef] = ACTIONS(1012), + [anon_sym_extern] = ACTIONS(1012), + [anon_sym___attribute__] = ACTIONS(1012), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1014), + [anon_sym___declspec] = ACTIONS(1012), + [anon_sym___cdecl] = ACTIONS(1012), + [anon_sym___clrcall] = ACTIONS(1012), + [anon_sym___stdcall] = ACTIONS(1012), + [anon_sym___fastcall] = ACTIONS(1012), + [anon_sym___thiscall] = ACTIONS(1012), + [anon_sym___vectorcall] = ACTIONS(1012), + [anon_sym_LBRACE] = ACTIONS(1014), + [anon_sym_static] = ACTIONS(1012), + [anon_sym_auto] = ACTIONS(1012), + [anon_sym_register] = ACTIONS(1012), + [anon_sym_inline] = ACTIONS(1012), + [anon_sym_const] = ACTIONS(1012), + [anon_sym_volatile] = ACTIONS(1012), + [anon_sym_restrict] = ACTIONS(1012), + [anon_sym__Atomic] = ACTIONS(1012), + [anon_sym_signed] = ACTIONS(1012), + [anon_sym_unsigned] = ACTIONS(1012), + [anon_sym_long] = ACTIONS(1012), + [anon_sym_short] = ACTIONS(1012), + [sym_primitive_type] = ACTIONS(1012), + [anon_sym_enum] = ACTIONS(1012), + [anon_sym_struct] = ACTIONS(1012), + [anon_sym_union] = ACTIONS(1012), + [anon_sym_if] = ACTIONS(1012), + [anon_sym_else] = ACTIONS(1012), + [anon_sym_switch] = ACTIONS(1012), + [anon_sym_case] = ACTIONS(1012), + [anon_sym_default] = ACTIONS(1012), + [anon_sym_while] = ACTIONS(1012), + [anon_sym_do] = ACTIONS(1012), + [anon_sym_for] = ACTIONS(1012), + [anon_sym_return] = ACTIONS(1012), + [anon_sym_break] = ACTIONS(1012), + [anon_sym_continue] = ACTIONS(1012), + [anon_sym_goto] = ACTIONS(1012), + [anon_sym_DASH_DASH] = ACTIONS(1014), + [anon_sym_PLUS_PLUS] = ACTIONS(1014), + [anon_sym_sizeof] = ACTIONS(1012), + [sym_number_literal] = ACTIONS(1014), + [anon_sym_L_SQUOTE] = ACTIONS(1014), + [anon_sym_u_SQUOTE] = ACTIONS(1014), + [anon_sym_U_SQUOTE] = ACTIONS(1014), + [anon_sym_u8_SQUOTE] = ACTIONS(1014), + [anon_sym_SQUOTE] = ACTIONS(1014), + [anon_sym_L_DQUOTE] = ACTIONS(1014), + [anon_sym_u_DQUOTE] = ACTIONS(1014), + [anon_sym_U_DQUOTE] = ACTIONS(1014), + [anon_sym_u8_DQUOTE] = ACTIONS(1014), + [anon_sym_DQUOTE] = ACTIONS(1014), + [sym_true] = ACTIONS(1012), + [sym_false] = ACTIONS(1012), + [sym_null] = ACTIONS(1012), + [sym_comment] = ACTIONS(3), + }, + [101] = { + [sym_identifier] = ACTIONS(1016), + [aux_sym_preproc_include_token1] = ACTIONS(1016), + [aux_sym_preproc_def_token1] = ACTIONS(1016), + [aux_sym_preproc_if_token1] = ACTIONS(1016), + [aux_sym_preproc_if_token2] = ACTIONS(1016), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1016), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1016), + [aux_sym_preproc_else_token1] = ACTIONS(1016), + [aux_sym_preproc_elif_token1] = ACTIONS(1016), + [sym_preproc_directive] = ACTIONS(1016), + [anon_sym_LPAREN2] = ACTIONS(1018), + [anon_sym_BANG] = ACTIONS(1018), + [anon_sym_TILDE] = ACTIONS(1018), + [anon_sym_DASH] = ACTIONS(1016), + [anon_sym_PLUS] = ACTIONS(1016), + [anon_sym_STAR] = ACTIONS(1018), + [anon_sym_AMP] = ACTIONS(1018), + [anon_sym_SEMI] = ACTIONS(1018), + [anon_sym_typedef] = ACTIONS(1016), + [anon_sym_extern] = ACTIONS(1016), + [anon_sym___attribute__] = ACTIONS(1016), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1018), + [anon_sym___declspec] = ACTIONS(1016), + [anon_sym___cdecl] = ACTIONS(1016), + [anon_sym___clrcall] = ACTIONS(1016), + [anon_sym___stdcall] = ACTIONS(1016), + [anon_sym___fastcall] = ACTIONS(1016), + [anon_sym___thiscall] = ACTIONS(1016), + [anon_sym___vectorcall] = ACTIONS(1016), + [anon_sym_LBRACE] = ACTIONS(1018), + [anon_sym_static] = ACTIONS(1016), + [anon_sym_auto] = ACTIONS(1016), + [anon_sym_register] = ACTIONS(1016), + [anon_sym_inline] = ACTIONS(1016), + [anon_sym_const] = ACTIONS(1016), + [anon_sym_volatile] = ACTIONS(1016), + [anon_sym_restrict] = ACTIONS(1016), + [anon_sym__Atomic] = ACTIONS(1016), + [anon_sym_signed] = ACTIONS(1016), + [anon_sym_unsigned] = ACTIONS(1016), + [anon_sym_long] = ACTIONS(1016), + [anon_sym_short] = ACTIONS(1016), + [sym_primitive_type] = ACTIONS(1016), + [anon_sym_enum] = ACTIONS(1016), + [anon_sym_struct] = ACTIONS(1016), + [anon_sym_union] = ACTIONS(1016), + [anon_sym_if] = ACTIONS(1016), + [anon_sym_else] = ACTIONS(1016), + [anon_sym_switch] = ACTIONS(1016), + [anon_sym_case] = ACTIONS(1016), + [anon_sym_default] = ACTIONS(1016), + [anon_sym_while] = ACTIONS(1016), + [anon_sym_do] = ACTIONS(1016), + [anon_sym_for] = ACTIONS(1016), + [anon_sym_return] = ACTIONS(1016), + [anon_sym_break] = ACTIONS(1016), + [anon_sym_continue] = ACTIONS(1016), + [anon_sym_goto] = ACTIONS(1016), + [anon_sym_DASH_DASH] = ACTIONS(1018), + [anon_sym_PLUS_PLUS] = ACTIONS(1018), + [anon_sym_sizeof] = ACTIONS(1016), + [sym_number_literal] = ACTIONS(1018), + [anon_sym_L_SQUOTE] = ACTIONS(1018), + [anon_sym_u_SQUOTE] = ACTIONS(1018), + [anon_sym_U_SQUOTE] = ACTIONS(1018), + [anon_sym_u8_SQUOTE] = ACTIONS(1018), + [anon_sym_SQUOTE] = ACTIONS(1018), + [anon_sym_L_DQUOTE] = ACTIONS(1018), + [anon_sym_u_DQUOTE] = ACTIONS(1018), + [anon_sym_U_DQUOTE] = ACTIONS(1018), + [anon_sym_u8_DQUOTE] = ACTIONS(1018), + [anon_sym_DQUOTE] = ACTIONS(1018), + [sym_true] = ACTIONS(1016), + [sym_false] = ACTIONS(1016), + [sym_null] = ACTIONS(1016), + [sym_comment] = ACTIONS(3), + }, + [102] = { + [sym_identifier] = ACTIONS(1020), + [aux_sym_preproc_include_token1] = ACTIONS(1020), + [aux_sym_preproc_def_token1] = ACTIONS(1020), + [aux_sym_preproc_if_token1] = ACTIONS(1020), + [aux_sym_preproc_if_token2] = ACTIONS(1020), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1020), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1020), + [aux_sym_preproc_else_token1] = ACTIONS(1020), + [aux_sym_preproc_elif_token1] = ACTIONS(1020), + [sym_preproc_directive] = ACTIONS(1020), + [anon_sym_LPAREN2] = ACTIONS(1022), + [anon_sym_BANG] = ACTIONS(1022), + [anon_sym_TILDE] = ACTIONS(1022), + [anon_sym_DASH] = ACTIONS(1020), + [anon_sym_PLUS] = ACTIONS(1020), + [anon_sym_STAR] = ACTIONS(1022), + [anon_sym_AMP] = ACTIONS(1022), + [anon_sym_SEMI] = ACTIONS(1022), + [anon_sym_typedef] = ACTIONS(1020), + [anon_sym_extern] = ACTIONS(1020), + [anon_sym___attribute__] = ACTIONS(1020), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1022), + [anon_sym___declspec] = ACTIONS(1020), + [anon_sym___cdecl] = ACTIONS(1020), + [anon_sym___clrcall] = ACTIONS(1020), + [anon_sym___stdcall] = ACTIONS(1020), + [anon_sym___fastcall] = ACTIONS(1020), + [anon_sym___thiscall] = ACTIONS(1020), + [anon_sym___vectorcall] = ACTIONS(1020), + [anon_sym_LBRACE] = ACTIONS(1022), + [anon_sym_static] = ACTIONS(1020), + [anon_sym_auto] = ACTIONS(1020), + [anon_sym_register] = ACTIONS(1020), + [anon_sym_inline] = ACTIONS(1020), + [anon_sym_const] = ACTIONS(1020), + [anon_sym_volatile] = ACTIONS(1020), + [anon_sym_restrict] = ACTIONS(1020), + [anon_sym__Atomic] = ACTIONS(1020), + [anon_sym_signed] = ACTIONS(1020), + [anon_sym_unsigned] = ACTIONS(1020), + [anon_sym_long] = ACTIONS(1020), + [anon_sym_short] = ACTIONS(1020), + [sym_primitive_type] = ACTIONS(1020), + [anon_sym_enum] = ACTIONS(1020), + [anon_sym_struct] = ACTIONS(1020), + [anon_sym_union] = ACTIONS(1020), + [anon_sym_if] = ACTIONS(1020), + [anon_sym_else] = ACTIONS(1020), + [anon_sym_switch] = ACTIONS(1020), + [anon_sym_case] = ACTIONS(1020), + [anon_sym_default] = ACTIONS(1020), + [anon_sym_while] = ACTIONS(1020), + [anon_sym_do] = ACTIONS(1020), + [anon_sym_for] = ACTIONS(1020), + [anon_sym_return] = ACTIONS(1020), + [anon_sym_break] = ACTIONS(1020), + [anon_sym_continue] = ACTIONS(1020), + [anon_sym_goto] = ACTIONS(1020), + [anon_sym_DASH_DASH] = ACTIONS(1022), + [anon_sym_PLUS_PLUS] = ACTIONS(1022), + [anon_sym_sizeof] = ACTIONS(1020), + [sym_number_literal] = ACTIONS(1022), + [anon_sym_L_SQUOTE] = ACTIONS(1022), + [anon_sym_u_SQUOTE] = ACTIONS(1022), + [anon_sym_U_SQUOTE] = ACTIONS(1022), + [anon_sym_u8_SQUOTE] = ACTIONS(1022), + [anon_sym_SQUOTE] = ACTIONS(1022), + [anon_sym_L_DQUOTE] = ACTIONS(1022), + [anon_sym_u_DQUOTE] = ACTIONS(1022), + [anon_sym_U_DQUOTE] = ACTIONS(1022), + [anon_sym_u8_DQUOTE] = ACTIONS(1022), + [anon_sym_DQUOTE] = ACTIONS(1022), + [sym_true] = ACTIONS(1020), + [sym_false] = ACTIONS(1020), + [sym_null] = ACTIONS(1020), + [sym_comment] = ACTIONS(3), + }, + [103] = { + [sym_identifier] = ACTIONS(1024), + [aux_sym_preproc_include_token1] = ACTIONS(1024), + [aux_sym_preproc_def_token1] = ACTIONS(1024), + [aux_sym_preproc_if_token1] = ACTIONS(1024), + [aux_sym_preproc_if_token2] = ACTIONS(1024), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1024), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1024), + [aux_sym_preproc_else_token1] = ACTIONS(1024), + [aux_sym_preproc_elif_token1] = ACTIONS(1024), + [sym_preproc_directive] = ACTIONS(1024), + [anon_sym_LPAREN2] = ACTIONS(1026), + [anon_sym_BANG] = ACTIONS(1026), + [anon_sym_TILDE] = ACTIONS(1026), + [anon_sym_DASH] = ACTIONS(1024), + [anon_sym_PLUS] = ACTIONS(1024), + [anon_sym_STAR] = ACTIONS(1026), + [anon_sym_AMP] = ACTIONS(1026), + [anon_sym_SEMI] = ACTIONS(1026), + [anon_sym_typedef] = ACTIONS(1024), + [anon_sym_extern] = ACTIONS(1024), + [anon_sym___attribute__] = ACTIONS(1024), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1026), + [anon_sym___declspec] = ACTIONS(1024), + [anon_sym___cdecl] = ACTIONS(1024), + [anon_sym___clrcall] = ACTIONS(1024), + [anon_sym___stdcall] = ACTIONS(1024), + [anon_sym___fastcall] = ACTIONS(1024), + [anon_sym___thiscall] = ACTIONS(1024), + [anon_sym___vectorcall] = ACTIONS(1024), + [anon_sym_LBRACE] = ACTIONS(1026), + [anon_sym_static] = ACTIONS(1024), + [anon_sym_auto] = ACTIONS(1024), + [anon_sym_register] = ACTIONS(1024), + [anon_sym_inline] = ACTIONS(1024), + [anon_sym_const] = ACTIONS(1024), + [anon_sym_volatile] = ACTIONS(1024), + [anon_sym_restrict] = ACTIONS(1024), + [anon_sym__Atomic] = ACTIONS(1024), + [anon_sym_signed] = ACTIONS(1024), + [anon_sym_unsigned] = ACTIONS(1024), + [anon_sym_long] = ACTIONS(1024), + [anon_sym_short] = ACTIONS(1024), + [sym_primitive_type] = ACTIONS(1024), + [anon_sym_enum] = ACTIONS(1024), + [anon_sym_struct] = ACTIONS(1024), + [anon_sym_union] = ACTIONS(1024), + [anon_sym_if] = ACTIONS(1024), + [anon_sym_else] = ACTIONS(1024), + [anon_sym_switch] = ACTIONS(1024), + [anon_sym_case] = ACTIONS(1024), + [anon_sym_default] = ACTIONS(1024), + [anon_sym_while] = ACTIONS(1024), + [anon_sym_do] = ACTIONS(1024), + [anon_sym_for] = ACTIONS(1024), + [anon_sym_return] = ACTIONS(1024), + [anon_sym_break] = ACTIONS(1024), + [anon_sym_continue] = ACTIONS(1024), + [anon_sym_goto] = ACTIONS(1024), + [anon_sym_DASH_DASH] = ACTIONS(1026), + [anon_sym_PLUS_PLUS] = ACTIONS(1026), + [anon_sym_sizeof] = ACTIONS(1024), + [sym_number_literal] = ACTIONS(1026), + [anon_sym_L_SQUOTE] = ACTIONS(1026), + [anon_sym_u_SQUOTE] = ACTIONS(1026), + [anon_sym_U_SQUOTE] = ACTIONS(1026), + [anon_sym_u8_SQUOTE] = ACTIONS(1026), + [anon_sym_SQUOTE] = ACTIONS(1026), + [anon_sym_L_DQUOTE] = ACTIONS(1026), + [anon_sym_u_DQUOTE] = ACTIONS(1026), + [anon_sym_U_DQUOTE] = ACTIONS(1026), + [anon_sym_u8_DQUOTE] = ACTIONS(1026), + [anon_sym_DQUOTE] = ACTIONS(1026), + [sym_true] = ACTIONS(1024), + [sym_false] = ACTIONS(1024), + [sym_null] = ACTIONS(1024), + [sym_comment] = ACTIONS(3), + }, + [104] = { + [sym_identifier] = ACTIONS(1028), + [aux_sym_preproc_include_token1] = ACTIONS(1028), + [aux_sym_preproc_def_token1] = ACTIONS(1028), + [aux_sym_preproc_if_token1] = ACTIONS(1028), + [aux_sym_preproc_if_token2] = ACTIONS(1028), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1028), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1028), + [aux_sym_preproc_else_token1] = ACTIONS(1028), + [aux_sym_preproc_elif_token1] = ACTIONS(1028), + [sym_preproc_directive] = ACTIONS(1028), + [anon_sym_LPAREN2] = ACTIONS(1030), + [anon_sym_BANG] = ACTIONS(1030), + [anon_sym_TILDE] = ACTIONS(1030), + [anon_sym_DASH] = ACTIONS(1028), + [anon_sym_PLUS] = ACTIONS(1028), + [anon_sym_STAR] = ACTIONS(1030), + [anon_sym_AMP] = ACTIONS(1030), + [anon_sym_SEMI] = ACTIONS(1030), + [anon_sym_typedef] = ACTIONS(1028), + [anon_sym_extern] = ACTIONS(1028), + [anon_sym___attribute__] = ACTIONS(1028), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1030), + [anon_sym___declspec] = ACTIONS(1028), + [anon_sym___cdecl] = ACTIONS(1028), + [anon_sym___clrcall] = ACTIONS(1028), + [anon_sym___stdcall] = ACTIONS(1028), + [anon_sym___fastcall] = ACTIONS(1028), + [anon_sym___thiscall] = ACTIONS(1028), + [anon_sym___vectorcall] = ACTIONS(1028), + [anon_sym_LBRACE] = ACTIONS(1030), + [anon_sym_static] = ACTIONS(1028), + [anon_sym_auto] = ACTIONS(1028), + [anon_sym_register] = ACTIONS(1028), + [anon_sym_inline] = ACTIONS(1028), + [anon_sym_const] = ACTIONS(1028), + [anon_sym_volatile] = ACTIONS(1028), + [anon_sym_restrict] = ACTIONS(1028), + [anon_sym__Atomic] = ACTIONS(1028), + [anon_sym_signed] = ACTIONS(1028), + [anon_sym_unsigned] = ACTIONS(1028), + [anon_sym_long] = ACTIONS(1028), + [anon_sym_short] = ACTIONS(1028), + [sym_primitive_type] = ACTIONS(1028), + [anon_sym_enum] = ACTIONS(1028), + [anon_sym_struct] = ACTIONS(1028), + [anon_sym_union] = ACTIONS(1028), + [anon_sym_if] = ACTIONS(1028), + [anon_sym_switch] = ACTIONS(1028), + [anon_sym_case] = ACTIONS(1028), + [anon_sym_default] = ACTIONS(1028), + [anon_sym_while] = ACTIONS(1028), + [anon_sym_do] = ACTIONS(1028), + [anon_sym_for] = ACTIONS(1028), + [anon_sym_return] = ACTIONS(1028), + [anon_sym_break] = ACTIONS(1028), + [anon_sym_continue] = ACTIONS(1028), + [anon_sym_goto] = ACTIONS(1028), + [anon_sym_DASH_DASH] = ACTIONS(1030), + [anon_sym_PLUS_PLUS] = ACTIONS(1030), + [anon_sym_sizeof] = ACTIONS(1028), + [sym_number_literal] = ACTIONS(1030), + [anon_sym_L_SQUOTE] = ACTIONS(1030), + [anon_sym_u_SQUOTE] = ACTIONS(1030), + [anon_sym_U_SQUOTE] = ACTIONS(1030), + [anon_sym_u8_SQUOTE] = ACTIONS(1030), + [anon_sym_SQUOTE] = ACTIONS(1030), + [anon_sym_L_DQUOTE] = ACTIONS(1030), + [anon_sym_u_DQUOTE] = ACTIONS(1030), + [anon_sym_U_DQUOTE] = ACTIONS(1030), + [anon_sym_u8_DQUOTE] = ACTIONS(1030), + [anon_sym_DQUOTE] = ACTIONS(1030), + [sym_true] = ACTIONS(1028), + [sym_false] = ACTIONS(1028), + [sym_null] = ACTIONS(1028), + [sym_comment] = ACTIONS(3), + }, + [105] = { + [sym_identifier] = ACTIONS(1032), + [aux_sym_preproc_include_token1] = ACTIONS(1032), + [aux_sym_preproc_def_token1] = ACTIONS(1032), + [aux_sym_preproc_if_token1] = ACTIONS(1032), + [aux_sym_preproc_if_token2] = ACTIONS(1032), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1032), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1032), + [aux_sym_preproc_else_token1] = ACTIONS(1032), + [aux_sym_preproc_elif_token1] = ACTIONS(1032), + [sym_preproc_directive] = ACTIONS(1032), + [anon_sym_LPAREN2] = ACTIONS(1034), + [anon_sym_BANG] = ACTIONS(1034), + [anon_sym_TILDE] = ACTIONS(1034), + [anon_sym_DASH] = ACTIONS(1032), + [anon_sym_PLUS] = ACTIONS(1032), + [anon_sym_STAR] = ACTIONS(1034), + [anon_sym_AMP] = ACTIONS(1034), + [anon_sym_SEMI] = ACTIONS(1034), + [anon_sym_typedef] = ACTIONS(1032), + [anon_sym_extern] = ACTIONS(1032), + [anon_sym___attribute__] = ACTIONS(1032), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1034), + [anon_sym___declspec] = ACTIONS(1032), + [anon_sym___cdecl] = ACTIONS(1032), + [anon_sym___clrcall] = ACTIONS(1032), + [anon_sym___stdcall] = ACTIONS(1032), + [anon_sym___fastcall] = ACTIONS(1032), + [anon_sym___thiscall] = ACTIONS(1032), + [anon_sym___vectorcall] = ACTIONS(1032), + [anon_sym_LBRACE] = ACTIONS(1034), + [anon_sym_static] = ACTIONS(1032), + [anon_sym_auto] = ACTIONS(1032), + [anon_sym_register] = ACTIONS(1032), + [anon_sym_inline] = ACTIONS(1032), + [anon_sym_const] = ACTIONS(1032), + [anon_sym_volatile] = ACTIONS(1032), + [anon_sym_restrict] = ACTIONS(1032), + [anon_sym__Atomic] = ACTIONS(1032), + [anon_sym_signed] = ACTIONS(1032), + [anon_sym_unsigned] = ACTIONS(1032), + [anon_sym_long] = ACTIONS(1032), + [anon_sym_short] = ACTIONS(1032), + [sym_primitive_type] = ACTIONS(1032), + [anon_sym_enum] = ACTIONS(1032), + [anon_sym_struct] = ACTIONS(1032), + [anon_sym_union] = ACTIONS(1032), + [anon_sym_if] = ACTIONS(1032), + [anon_sym_switch] = ACTIONS(1032), + [anon_sym_case] = ACTIONS(1032), + [anon_sym_default] = ACTIONS(1032), + [anon_sym_while] = ACTIONS(1032), + [anon_sym_do] = ACTIONS(1032), + [anon_sym_for] = ACTIONS(1032), + [anon_sym_return] = ACTIONS(1032), + [anon_sym_break] = ACTIONS(1032), + [anon_sym_continue] = ACTIONS(1032), + [anon_sym_goto] = ACTIONS(1032), + [anon_sym_DASH_DASH] = ACTIONS(1034), + [anon_sym_PLUS_PLUS] = ACTIONS(1034), + [anon_sym_sizeof] = ACTIONS(1032), + [sym_number_literal] = ACTIONS(1034), + [anon_sym_L_SQUOTE] = ACTIONS(1034), + [anon_sym_u_SQUOTE] = ACTIONS(1034), + [anon_sym_U_SQUOTE] = ACTIONS(1034), + [anon_sym_u8_SQUOTE] = ACTIONS(1034), + [anon_sym_SQUOTE] = ACTIONS(1034), + [anon_sym_L_DQUOTE] = ACTIONS(1034), + [anon_sym_u_DQUOTE] = ACTIONS(1034), + [anon_sym_U_DQUOTE] = ACTIONS(1034), + [anon_sym_u8_DQUOTE] = ACTIONS(1034), + [anon_sym_DQUOTE] = ACTIONS(1034), + [sym_true] = ACTIONS(1032), + [sym_false] = ACTIONS(1032), + [sym_null] = ACTIONS(1032), + [sym_comment] = ACTIONS(3), + }, + [106] = { + [sym__expression] = STATE(630), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(527), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(527), + [sym_call_expression] = STATE(527), + [sym_field_expression] = STATE(527), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(527), + [sym_initializer_list] = STATE(516), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_identifier] = ACTIONS(870), + [anon_sym_LPAREN2] = ACTIONS(1036), + [anon_sym_BANG] = ACTIONS(1038), + [anon_sym_TILDE] = ACTIONS(1040), + [anon_sym_DASH] = ACTIONS(1038), + [anon_sym_PLUS] = ACTIONS(1038), + [anon_sym_STAR] = ACTIONS(1042), + [anon_sym_SLASH] = ACTIONS(882), + [anon_sym_PERCENT] = ACTIONS(882), + [anon_sym_PIPE_PIPE] = ACTIONS(872), + [anon_sym_AMP_AMP] = ACTIONS(872), + [anon_sym_PIPE] = ACTIONS(882), + [anon_sym_CARET] = ACTIONS(882), + [anon_sym_AMP] = ACTIONS(1042), + [anon_sym_EQ_EQ] = ACTIONS(872), + [anon_sym_BANG_EQ] = ACTIONS(872), + [anon_sym_GT] = ACTIONS(882), + [anon_sym_GT_EQ] = ACTIONS(872), + [anon_sym_LT_EQ] = ACTIONS(872), + [anon_sym_LT] = ACTIONS(882), + [anon_sym_LT_LT] = ACTIONS(882), + [anon_sym_GT_GT] = ACTIONS(882), + [anon_sym_LBRACE] = ACTIONS(884), + [anon_sym_LBRACK] = ACTIONS(872), + [anon_sym_RBRACK] = ACTIONS(872), + [anon_sym_EQ] = ACTIONS(882), + [anon_sym_QMARK] = ACTIONS(872), + [anon_sym_STAR_EQ] = ACTIONS(872), + [anon_sym_SLASH_EQ] = ACTIONS(872), + [anon_sym_PERCENT_EQ] = ACTIONS(872), + [anon_sym_PLUS_EQ] = ACTIONS(872), + [anon_sym_DASH_EQ] = ACTIONS(872), + [anon_sym_LT_LT_EQ] = ACTIONS(872), + [anon_sym_GT_GT_EQ] = ACTIONS(872), + [anon_sym_AMP_EQ] = ACTIONS(872), + [anon_sym_CARET_EQ] = ACTIONS(872), + [anon_sym_PIPE_EQ] = ACTIONS(872), + [anon_sym_DASH_DASH] = ACTIONS(1044), + [anon_sym_PLUS_PLUS] = ACTIONS(1044), + [anon_sym_sizeof] = ACTIONS(1046), + [anon_sym_DOT] = ACTIONS(882), + [anon_sym_DASH_GT] = ACTIONS(872), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [107] = { + [sym_identifier] = ACTIONS(1048), + [aux_sym_preproc_include_token1] = ACTIONS(1048), + [aux_sym_preproc_def_token1] = ACTIONS(1048), + [aux_sym_preproc_if_token1] = ACTIONS(1048), + [aux_sym_preproc_if_token2] = ACTIONS(1048), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1048), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1048), + [aux_sym_preproc_else_token1] = ACTIONS(1048), + [aux_sym_preproc_elif_token1] = ACTIONS(1048), + [sym_preproc_directive] = ACTIONS(1048), + [anon_sym_LPAREN2] = ACTIONS(1050), + [anon_sym_BANG] = ACTIONS(1050), + [anon_sym_TILDE] = ACTIONS(1050), + [anon_sym_DASH] = ACTIONS(1048), + [anon_sym_PLUS] = ACTIONS(1048), + [anon_sym_STAR] = ACTIONS(1050), + [anon_sym_AMP] = ACTIONS(1050), + [anon_sym_SEMI] = ACTIONS(1050), + [anon_sym_typedef] = ACTIONS(1048), + [anon_sym_extern] = ACTIONS(1048), + [anon_sym___attribute__] = ACTIONS(1048), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1050), + [anon_sym___declspec] = ACTIONS(1048), + [anon_sym___cdecl] = ACTIONS(1048), + [anon_sym___clrcall] = ACTIONS(1048), + [anon_sym___stdcall] = ACTIONS(1048), + [anon_sym___fastcall] = ACTIONS(1048), + [anon_sym___thiscall] = ACTIONS(1048), + [anon_sym___vectorcall] = ACTIONS(1048), + [anon_sym_LBRACE] = ACTIONS(1050), + [anon_sym_static] = ACTIONS(1048), + [anon_sym_auto] = ACTIONS(1048), + [anon_sym_register] = ACTIONS(1048), + [anon_sym_inline] = ACTIONS(1048), + [anon_sym_const] = ACTIONS(1048), + [anon_sym_volatile] = ACTIONS(1048), + [anon_sym_restrict] = ACTIONS(1048), + [anon_sym__Atomic] = ACTIONS(1048), + [anon_sym_signed] = ACTIONS(1048), + [anon_sym_unsigned] = ACTIONS(1048), + [anon_sym_long] = ACTIONS(1048), + [anon_sym_short] = ACTIONS(1048), + [sym_primitive_type] = ACTIONS(1048), + [anon_sym_enum] = ACTIONS(1048), + [anon_sym_struct] = ACTIONS(1048), + [anon_sym_union] = ACTIONS(1048), + [anon_sym_if] = ACTIONS(1048), + [anon_sym_switch] = ACTIONS(1048), + [anon_sym_case] = ACTIONS(1048), + [anon_sym_default] = ACTIONS(1048), + [anon_sym_while] = ACTIONS(1048), + [anon_sym_do] = ACTIONS(1048), + [anon_sym_for] = ACTIONS(1048), + [anon_sym_return] = ACTIONS(1048), + [anon_sym_break] = ACTIONS(1048), + [anon_sym_continue] = ACTIONS(1048), + [anon_sym_goto] = ACTIONS(1048), + [anon_sym_DASH_DASH] = ACTIONS(1050), + [anon_sym_PLUS_PLUS] = ACTIONS(1050), + [anon_sym_sizeof] = ACTIONS(1048), + [sym_number_literal] = ACTIONS(1050), + [anon_sym_L_SQUOTE] = ACTIONS(1050), + [anon_sym_u_SQUOTE] = ACTIONS(1050), + [anon_sym_U_SQUOTE] = ACTIONS(1050), + [anon_sym_u8_SQUOTE] = ACTIONS(1050), + [anon_sym_SQUOTE] = ACTIONS(1050), + [anon_sym_L_DQUOTE] = ACTIONS(1050), + [anon_sym_u_DQUOTE] = ACTIONS(1050), + [anon_sym_U_DQUOTE] = ACTIONS(1050), + [anon_sym_u8_DQUOTE] = ACTIONS(1050), + [anon_sym_DQUOTE] = ACTIONS(1050), + [sym_true] = ACTIONS(1048), + [sym_false] = ACTIONS(1048), + [sym_null] = ACTIONS(1048), + [sym_comment] = ACTIONS(3), + }, + [108] = { + [sym_identifier] = ACTIONS(1052), + [aux_sym_preproc_include_token1] = ACTIONS(1052), + [aux_sym_preproc_def_token1] = ACTIONS(1052), + [aux_sym_preproc_if_token1] = ACTIONS(1052), + [aux_sym_preproc_if_token2] = ACTIONS(1052), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1052), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1052), + [aux_sym_preproc_else_token1] = ACTIONS(1052), + [aux_sym_preproc_elif_token1] = ACTIONS(1052), + [sym_preproc_directive] = ACTIONS(1052), + [anon_sym_LPAREN2] = ACTIONS(1054), + [anon_sym_BANG] = ACTIONS(1054), + [anon_sym_TILDE] = ACTIONS(1054), + [anon_sym_DASH] = ACTIONS(1052), + [anon_sym_PLUS] = ACTIONS(1052), + [anon_sym_STAR] = ACTIONS(1054), + [anon_sym_AMP] = ACTIONS(1054), + [anon_sym_SEMI] = ACTIONS(1054), + [anon_sym_typedef] = ACTIONS(1052), + [anon_sym_extern] = ACTIONS(1052), + [anon_sym___attribute__] = ACTIONS(1052), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1054), + [anon_sym___declspec] = ACTIONS(1052), + [anon_sym___cdecl] = ACTIONS(1052), + [anon_sym___clrcall] = ACTIONS(1052), + [anon_sym___stdcall] = ACTIONS(1052), + [anon_sym___fastcall] = ACTIONS(1052), + [anon_sym___thiscall] = ACTIONS(1052), + [anon_sym___vectorcall] = ACTIONS(1052), + [anon_sym_LBRACE] = ACTIONS(1054), + [anon_sym_static] = ACTIONS(1052), + [anon_sym_auto] = ACTIONS(1052), + [anon_sym_register] = ACTIONS(1052), + [anon_sym_inline] = ACTIONS(1052), + [anon_sym_const] = ACTIONS(1052), + [anon_sym_volatile] = ACTIONS(1052), + [anon_sym_restrict] = ACTIONS(1052), + [anon_sym__Atomic] = ACTIONS(1052), + [anon_sym_signed] = ACTIONS(1052), + [anon_sym_unsigned] = ACTIONS(1052), + [anon_sym_long] = ACTIONS(1052), + [anon_sym_short] = ACTIONS(1052), + [sym_primitive_type] = ACTIONS(1052), + [anon_sym_enum] = ACTIONS(1052), + [anon_sym_struct] = ACTIONS(1052), + [anon_sym_union] = ACTIONS(1052), + [anon_sym_if] = ACTIONS(1052), + [anon_sym_switch] = ACTIONS(1052), + [anon_sym_case] = ACTIONS(1052), + [anon_sym_default] = ACTIONS(1052), + [anon_sym_while] = ACTIONS(1052), + [anon_sym_do] = ACTIONS(1052), + [anon_sym_for] = ACTIONS(1052), + [anon_sym_return] = ACTIONS(1052), + [anon_sym_break] = ACTIONS(1052), + [anon_sym_continue] = ACTIONS(1052), + [anon_sym_goto] = ACTIONS(1052), + [anon_sym_DASH_DASH] = ACTIONS(1054), + [anon_sym_PLUS_PLUS] = ACTIONS(1054), + [anon_sym_sizeof] = ACTIONS(1052), + [sym_number_literal] = ACTIONS(1054), + [anon_sym_L_SQUOTE] = ACTIONS(1054), + [anon_sym_u_SQUOTE] = ACTIONS(1054), + [anon_sym_U_SQUOTE] = ACTIONS(1054), + [anon_sym_u8_SQUOTE] = ACTIONS(1054), + [anon_sym_SQUOTE] = ACTIONS(1054), + [anon_sym_L_DQUOTE] = ACTIONS(1054), + [anon_sym_u_DQUOTE] = ACTIONS(1054), + [anon_sym_U_DQUOTE] = ACTIONS(1054), + [anon_sym_u8_DQUOTE] = ACTIONS(1054), + [anon_sym_DQUOTE] = ACTIONS(1054), + [sym_true] = ACTIONS(1052), + [sym_false] = ACTIONS(1052), + [sym_null] = ACTIONS(1052), + [sym_comment] = ACTIONS(3), + }, + [109] = { + [sym_identifier] = ACTIONS(1056), + [aux_sym_preproc_include_token1] = ACTIONS(1056), + [aux_sym_preproc_def_token1] = ACTIONS(1056), + [aux_sym_preproc_if_token1] = ACTIONS(1056), + [aux_sym_preproc_if_token2] = ACTIONS(1056), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1056), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1056), + [aux_sym_preproc_else_token1] = ACTIONS(1056), + [aux_sym_preproc_elif_token1] = ACTIONS(1056), + [sym_preproc_directive] = ACTIONS(1056), + [anon_sym_LPAREN2] = ACTIONS(1058), + [anon_sym_BANG] = ACTIONS(1058), + [anon_sym_TILDE] = ACTIONS(1058), + [anon_sym_DASH] = ACTIONS(1056), + [anon_sym_PLUS] = ACTIONS(1056), + [anon_sym_STAR] = ACTIONS(1058), + [anon_sym_AMP] = ACTIONS(1058), + [anon_sym_SEMI] = ACTIONS(1058), + [anon_sym_typedef] = ACTIONS(1056), + [anon_sym_extern] = ACTIONS(1056), + [anon_sym___attribute__] = ACTIONS(1056), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1058), + [anon_sym___declspec] = ACTIONS(1056), + [anon_sym___cdecl] = ACTIONS(1056), + [anon_sym___clrcall] = ACTIONS(1056), + [anon_sym___stdcall] = ACTIONS(1056), + [anon_sym___fastcall] = ACTIONS(1056), + [anon_sym___thiscall] = ACTIONS(1056), + [anon_sym___vectorcall] = ACTIONS(1056), + [anon_sym_LBRACE] = ACTIONS(1058), + [anon_sym_static] = ACTIONS(1056), + [anon_sym_auto] = ACTIONS(1056), + [anon_sym_register] = ACTIONS(1056), + [anon_sym_inline] = ACTIONS(1056), + [anon_sym_const] = ACTIONS(1056), + [anon_sym_volatile] = ACTIONS(1056), + [anon_sym_restrict] = ACTIONS(1056), + [anon_sym__Atomic] = ACTIONS(1056), + [anon_sym_signed] = ACTIONS(1056), + [anon_sym_unsigned] = ACTIONS(1056), + [anon_sym_long] = ACTIONS(1056), + [anon_sym_short] = ACTIONS(1056), + [sym_primitive_type] = ACTIONS(1056), + [anon_sym_enum] = ACTIONS(1056), + [anon_sym_struct] = ACTIONS(1056), + [anon_sym_union] = ACTIONS(1056), + [anon_sym_if] = ACTIONS(1056), + [anon_sym_switch] = ACTIONS(1056), + [anon_sym_case] = ACTIONS(1056), + [anon_sym_default] = ACTIONS(1056), + [anon_sym_while] = ACTIONS(1056), + [anon_sym_do] = ACTIONS(1056), + [anon_sym_for] = ACTIONS(1056), + [anon_sym_return] = ACTIONS(1056), + [anon_sym_break] = ACTIONS(1056), + [anon_sym_continue] = ACTIONS(1056), + [anon_sym_goto] = ACTIONS(1056), + [anon_sym_DASH_DASH] = ACTIONS(1058), + [anon_sym_PLUS_PLUS] = ACTIONS(1058), + [anon_sym_sizeof] = ACTIONS(1056), + [sym_number_literal] = ACTIONS(1058), + [anon_sym_L_SQUOTE] = ACTIONS(1058), + [anon_sym_u_SQUOTE] = ACTIONS(1058), + [anon_sym_U_SQUOTE] = ACTIONS(1058), + [anon_sym_u8_SQUOTE] = ACTIONS(1058), + [anon_sym_SQUOTE] = ACTIONS(1058), + [anon_sym_L_DQUOTE] = ACTIONS(1058), + [anon_sym_u_DQUOTE] = ACTIONS(1058), + [anon_sym_U_DQUOTE] = ACTIONS(1058), + [anon_sym_u8_DQUOTE] = ACTIONS(1058), + [anon_sym_DQUOTE] = ACTIONS(1058), + [sym_true] = ACTIONS(1056), + [sym_false] = ACTIONS(1056), + [sym_null] = ACTIONS(1056), + [sym_comment] = ACTIONS(3), + }, + [110] = { + [sym_identifier] = ACTIONS(1060), + [aux_sym_preproc_include_token1] = ACTIONS(1060), + [aux_sym_preproc_def_token1] = ACTIONS(1060), + [aux_sym_preproc_if_token1] = ACTIONS(1060), + [aux_sym_preproc_if_token2] = ACTIONS(1060), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1060), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1060), + [aux_sym_preproc_else_token1] = ACTIONS(1060), + [aux_sym_preproc_elif_token1] = ACTIONS(1060), + [sym_preproc_directive] = ACTIONS(1060), + [anon_sym_LPAREN2] = ACTIONS(1062), + [anon_sym_BANG] = ACTIONS(1062), + [anon_sym_TILDE] = ACTIONS(1062), + [anon_sym_DASH] = ACTIONS(1060), + [anon_sym_PLUS] = ACTIONS(1060), + [anon_sym_STAR] = ACTIONS(1062), + [anon_sym_AMP] = ACTIONS(1062), + [anon_sym_SEMI] = ACTIONS(1062), + [anon_sym_typedef] = ACTIONS(1060), + [anon_sym_extern] = ACTIONS(1060), + [anon_sym___attribute__] = ACTIONS(1060), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1062), + [anon_sym___declspec] = ACTIONS(1060), + [anon_sym___cdecl] = ACTIONS(1060), + [anon_sym___clrcall] = ACTIONS(1060), + [anon_sym___stdcall] = ACTIONS(1060), + [anon_sym___fastcall] = ACTIONS(1060), + [anon_sym___thiscall] = ACTIONS(1060), + [anon_sym___vectorcall] = ACTIONS(1060), + [anon_sym_LBRACE] = ACTIONS(1062), + [anon_sym_static] = ACTIONS(1060), + [anon_sym_auto] = ACTIONS(1060), + [anon_sym_register] = ACTIONS(1060), + [anon_sym_inline] = ACTIONS(1060), + [anon_sym_const] = ACTIONS(1060), + [anon_sym_volatile] = ACTIONS(1060), + [anon_sym_restrict] = ACTIONS(1060), + [anon_sym__Atomic] = ACTIONS(1060), + [anon_sym_signed] = ACTIONS(1060), + [anon_sym_unsigned] = ACTIONS(1060), + [anon_sym_long] = ACTIONS(1060), + [anon_sym_short] = ACTIONS(1060), + [sym_primitive_type] = ACTIONS(1060), + [anon_sym_enum] = ACTIONS(1060), + [anon_sym_struct] = ACTIONS(1060), + [anon_sym_union] = ACTIONS(1060), + [anon_sym_if] = ACTIONS(1060), + [anon_sym_switch] = ACTIONS(1060), + [anon_sym_case] = ACTIONS(1060), + [anon_sym_default] = ACTIONS(1060), + [anon_sym_while] = ACTIONS(1060), + [anon_sym_do] = ACTIONS(1060), + [anon_sym_for] = ACTIONS(1060), + [anon_sym_return] = ACTIONS(1060), + [anon_sym_break] = ACTIONS(1060), + [anon_sym_continue] = ACTIONS(1060), + [anon_sym_goto] = ACTIONS(1060), + [anon_sym_DASH_DASH] = ACTIONS(1062), + [anon_sym_PLUS_PLUS] = ACTIONS(1062), + [anon_sym_sizeof] = ACTIONS(1060), + [sym_number_literal] = ACTIONS(1062), + [anon_sym_L_SQUOTE] = ACTIONS(1062), + [anon_sym_u_SQUOTE] = ACTIONS(1062), + [anon_sym_U_SQUOTE] = ACTIONS(1062), + [anon_sym_u8_SQUOTE] = ACTIONS(1062), + [anon_sym_SQUOTE] = ACTIONS(1062), + [anon_sym_L_DQUOTE] = ACTIONS(1062), + [anon_sym_u_DQUOTE] = ACTIONS(1062), + [anon_sym_U_DQUOTE] = ACTIONS(1062), + [anon_sym_u8_DQUOTE] = ACTIONS(1062), + [anon_sym_DQUOTE] = ACTIONS(1062), + [sym_true] = ACTIONS(1060), + [sym_false] = ACTIONS(1060), + [sym_null] = ACTIONS(1060), + [sym_comment] = ACTIONS(3), + }, + [111] = { + [sym_identifier] = ACTIONS(1064), + [aux_sym_preproc_include_token1] = ACTIONS(1064), + [aux_sym_preproc_def_token1] = ACTIONS(1064), + [aux_sym_preproc_if_token1] = ACTIONS(1064), + [aux_sym_preproc_if_token2] = ACTIONS(1064), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1064), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1064), + [aux_sym_preproc_else_token1] = ACTIONS(1064), + [aux_sym_preproc_elif_token1] = ACTIONS(1064), + [sym_preproc_directive] = ACTIONS(1064), + [anon_sym_LPAREN2] = ACTIONS(1066), + [anon_sym_BANG] = ACTIONS(1066), + [anon_sym_TILDE] = ACTIONS(1066), + [anon_sym_DASH] = ACTIONS(1064), + [anon_sym_PLUS] = ACTIONS(1064), + [anon_sym_STAR] = ACTIONS(1066), + [anon_sym_AMP] = ACTIONS(1066), + [anon_sym_SEMI] = ACTIONS(1066), + [anon_sym_typedef] = ACTIONS(1064), + [anon_sym_extern] = ACTIONS(1064), + [anon_sym___attribute__] = ACTIONS(1064), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1066), + [anon_sym___declspec] = ACTIONS(1064), + [anon_sym___cdecl] = ACTIONS(1064), + [anon_sym___clrcall] = ACTIONS(1064), + [anon_sym___stdcall] = ACTIONS(1064), + [anon_sym___fastcall] = ACTIONS(1064), + [anon_sym___thiscall] = ACTIONS(1064), + [anon_sym___vectorcall] = ACTIONS(1064), + [anon_sym_LBRACE] = ACTIONS(1066), + [anon_sym_static] = ACTIONS(1064), + [anon_sym_auto] = ACTIONS(1064), + [anon_sym_register] = ACTIONS(1064), + [anon_sym_inline] = ACTIONS(1064), + [anon_sym_const] = ACTIONS(1064), + [anon_sym_volatile] = ACTIONS(1064), + [anon_sym_restrict] = ACTIONS(1064), + [anon_sym__Atomic] = ACTIONS(1064), + [anon_sym_signed] = ACTIONS(1064), + [anon_sym_unsigned] = ACTIONS(1064), + [anon_sym_long] = ACTIONS(1064), + [anon_sym_short] = ACTIONS(1064), + [sym_primitive_type] = ACTIONS(1064), + [anon_sym_enum] = ACTIONS(1064), + [anon_sym_struct] = ACTIONS(1064), + [anon_sym_union] = ACTIONS(1064), + [anon_sym_if] = ACTIONS(1064), + [anon_sym_switch] = ACTIONS(1064), + [anon_sym_case] = ACTIONS(1064), + [anon_sym_default] = ACTIONS(1064), + [anon_sym_while] = ACTIONS(1064), + [anon_sym_do] = ACTIONS(1064), + [anon_sym_for] = ACTIONS(1064), + [anon_sym_return] = ACTIONS(1064), + [anon_sym_break] = ACTIONS(1064), + [anon_sym_continue] = ACTIONS(1064), + [anon_sym_goto] = ACTIONS(1064), + [anon_sym_DASH_DASH] = ACTIONS(1066), + [anon_sym_PLUS_PLUS] = ACTIONS(1066), + [anon_sym_sizeof] = ACTIONS(1064), + [sym_number_literal] = ACTIONS(1066), + [anon_sym_L_SQUOTE] = ACTIONS(1066), + [anon_sym_u_SQUOTE] = ACTIONS(1066), + [anon_sym_U_SQUOTE] = ACTIONS(1066), + [anon_sym_u8_SQUOTE] = ACTIONS(1066), + [anon_sym_SQUOTE] = ACTIONS(1066), + [anon_sym_L_DQUOTE] = ACTIONS(1066), + [anon_sym_u_DQUOTE] = ACTIONS(1066), + [anon_sym_U_DQUOTE] = ACTIONS(1066), + [anon_sym_u8_DQUOTE] = ACTIONS(1066), + [anon_sym_DQUOTE] = ACTIONS(1066), + [sym_true] = ACTIONS(1064), + [sym_false] = ACTIONS(1064), + [sym_null] = ACTIONS(1064), + [sym_comment] = ACTIONS(3), + }, + [112] = { + [sym_identifier] = ACTIONS(1068), + [aux_sym_preproc_include_token1] = ACTIONS(1068), + [aux_sym_preproc_def_token1] = ACTIONS(1068), + [aux_sym_preproc_if_token1] = ACTIONS(1068), + [aux_sym_preproc_if_token2] = ACTIONS(1068), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1068), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1068), + [aux_sym_preproc_else_token1] = ACTIONS(1068), + [aux_sym_preproc_elif_token1] = ACTIONS(1068), + [sym_preproc_directive] = ACTIONS(1068), + [anon_sym_LPAREN2] = ACTIONS(1070), + [anon_sym_BANG] = ACTIONS(1070), + [anon_sym_TILDE] = ACTIONS(1070), + [anon_sym_DASH] = ACTIONS(1068), + [anon_sym_PLUS] = ACTIONS(1068), + [anon_sym_STAR] = ACTIONS(1070), + [anon_sym_AMP] = ACTIONS(1070), + [anon_sym_SEMI] = ACTIONS(1070), + [anon_sym_typedef] = ACTIONS(1068), + [anon_sym_extern] = ACTIONS(1068), + [anon_sym___attribute__] = ACTIONS(1068), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1070), + [anon_sym___declspec] = ACTIONS(1068), + [anon_sym___cdecl] = ACTIONS(1068), + [anon_sym___clrcall] = ACTIONS(1068), + [anon_sym___stdcall] = ACTIONS(1068), + [anon_sym___fastcall] = ACTIONS(1068), + [anon_sym___thiscall] = ACTIONS(1068), + [anon_sym___vectorcall] = ACTIONS(1068), + [anon_sym_LBRACE] = ACTIONS(1070), + [anon_sym_static] = ACTIONS(1068), + [anon_sym_auto] = ACTIONS(1068), + [anon_sym_register] = ACTIONS(1068), + [anon_sym_inline] = ACTIONS(1068), + [anon_sym_const] = ACTIONS(1068), + [anon_sym_volatile] = ACTIONS(1068), + [anon_sym_restrict] = ACTIONS(1068), + [anon_sym__Atomic] = ACTIONS(1068), + [anon_sym_signed] = ACTIONS(1068), + [anon_sym_unsigned] = ACTIONS(1068), + [anon_sym_long] = ACTIONS(1068), + [anon_sym_short] = ACTIONS(1068), + [sym_primitive_type] = ACTIONS(1068), + [anon_sym_enum] = ACTIONS(1068), + [anon_sym_struct] = ACTIONS(1068), + [anon_sym_union] = ACTIONS(1068), + [anon_sym_if] = ACTIONS(1068), + [anon_sym_switch] = ACTIONS(1068), + [anon_sym_case] = ACTIONS(1068), + [anon_sym_default] = ACTIONS(1068), + [anon_sym_while] = ACTIONS(1068), + [anon_sym_do] = ACTIONS(1068), + [anon_sym_for] = ACTIONS(1068), + [anon_sym_return] = ACTIONS(1068), + [anon_sym_break] = ACTIONS(1068), + [anon_sym_continue] = ACTIONS(1068), + [anon_sym_goto] = ACTIONS(1068), + [anon_sym_DASH_DASH] = ACTIONS(1070), + [anon_sym_PLUS_PLUS] = ACTIONS(1070), + [anon_sym_sizeof] = ACTIONS(1068), + [sym_number_literal] = ACTIONS(1070), + [anon_sym_L_SQUOTE] = ACTIONS(1070), + [anon_sym_u_SQUOTE] = ACTIONS(1070), + [anon_sym_U_SQUOTE] = ACTIONS(1070), + [anon_sym_u8_SQUOTE] = ACTIONS(1070), + [anon_sym_SQUOTE] = ACTIONS(1070), + [anon_sym_L_DQUOTE] = ACTIONS(1070), + [anon_sym_u_DQUOTE] = ACTIONS(1070), + [anon_sym_U_DQUOTE] = ACTIONS(1070), + [anon_sym_u8_DQUOTE] = ACTIONS(1070), + [anon_sym_DQUOTE] = ACTIONS(1070), + [sym_true] = ACTIONS(1068), + [sym_false] = ACTIONS(1068), + [sym_null] = ACTIONS(1068), + [sym_comment] = ACTIONS(3), + }, + [113] = { + [sym_identifier] = ACTIONS(1072), + [aux_sym_preproc_include_token1] = ACTIONS(1072), + [aux_sym_preproc_def_token1] = ACTIONS(1072), + [aux_sym_preproc_if_token1] = ACTIONS(1072), + [aux_sym_preproc_if_token2] = ACTIONS(1072), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1072), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1072), + [aux_sym_preproc_else_token1] = ACTIONS(1072), + [aux_sym_preproc_elif_token1] = ACTIONS(1072), + [sym_preproc_directive] = ACTIONS(1072), + [anon_sym_LPAREN2] = ACTIONS(1074), + [anon_sym_BANG] = ACTIONS(1074), + [anon_sym_TILDE] = ACTIONS(1074), + [anon_sym_DASH] = ACTIONS(1072), + [anon_sym_PLUS] = ACTIONS(1072), + [anon_sym_STAR] = ACTIONS(1074), + [anon_sym_AMP] = ACTIONS(1074), + [anon_sym_SEMI] = ACTIONS(1074), + [anon_sym_typedef] = ACTIONS(1072), + [anon_sym_extern] = ACTIONS(1072), + [anon_sym___attribute__] = ACTIONS(1072), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1074), + [anon_sym___declspec] = ACTIONS(1072), + [anon_sym___cdecl] = ACTIONS(1072), + [anon_sym___clrcall] = ACTIONS(1072), + [anon_sym___stdcall] = ACTIONS(1072), + [anon_sym___fastcall] = ACTIONS(1072), + [anon_sym___thiscall] = ACTIONS(1072), + [anon_sym___vectorcall] = ACTIONS(1072), + [anon_sym_LBRACE] = ACTIONS(1074), + [anon_sym_static] = ACTIONS(1072), + [anon_sym_auto] = ACTIONS(1072), + [anon_sym_register] = ACTIONS(1072), + [anon_sym_inline] = ACTIONS(1072), + [anon_sym_const] = ACTIONS(1072), + [anon_sym_volatile] = ACTIONS(1072), + [anon_sym_restrict] = ACTIONS(1072), + [anon_sym__Atomic] = ACTIONS(1072), + [anon_sym_signed] = ACTIONS(1072), + [anon_sym_unsigned] = ACTIONS(1072), + [anon_sym_long] = ACTIONS(1072), + [anon_sym_short] = ACTIONS(1072), + [sym_primitive_type] = ACTIONS(1072), + [anon_sym_enum] = ACTIONS(1072), + [anon_sym_struct] = ACTIONS(1072), + [anon_sym_union] = ACTIONS(1072), + [anon_sym_if] = ACTIONS(1072), + [anon_sym_switch] = ACTIONS(1072), + [anon_sym_case] = ACTIONS(1072), + [anon_sym_default] = ACTIONS(1072), + [anon_sym_while] = ACTIONS(1072), + [anon_sym_do] = ACTIONS(1072), + [anon_sym_for] = ACTIONS(1072), + [anon_sym_return] = ACTIONS(1072), + [anon_sym_break] = ACTIONS(1072), + [anon_sym_continue] = ACTIONS(1072), + [anon_sym_goto] = ACTIONS(1072), + [anon_sym_DASH_DASH] = ACTIONS(1074), + [anon_sym_PLUS_PLUS] = ACTIONS(1074), + [anon_sym_sizeof] = ACTIONS(1072), + [sym_number_literal] = ACTIONS(1074), + [anon_sym_L_SQUOTE] = ACTIONS(1074), + [anon_sym_u_SQUOTE] = ACTIONS(1074), + [anon_sym_U_SQUOTE] = ACTIONS(1074), + [anon_sym_u8_SQUOTE] = ACTIONS(1074), + [anon_sym_SQUOTE] = ACTIONS(1074), + [anon_sym_L_DQUOTE] = ACTIONS(1074), + [anon_sym_u_DQUOTE] = ACTIONS(1074), + [anon_sym_U_DQUOTE] = ACTIONS(1074), + [anon_sym_u8_DQUOTE] = ACTIONS(1074), + [anon_sym_DQUOTE] = ACTIONS(1074), + [sym_true] = ACTIONS(1072), + [sym_false] = ACTIONS(1072), + [sym_null] = ACTIONS(1072), + [sym_comment] = ACTIONS(3), + }, + [114] = { + [sym_identifier] = ACTIONS(1076), + [aux_sym_preproc_include_token1] = ACTIONS(1076), + [aux_sym_preproc_def_token1] = ACTIONS(1076), + [aux_sym_preproc_if_token1] = ACTIONS(1076), + [aux_sym_preproc_if_token2] = ACTIONS(1076), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1076), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1076), + [aux_sym_preproc_else_token1] = ACTIONS(1076), + [aux_sym_preproc_elif_token1] = ACTIONS(1076), + [sym_preproc_directive] = ACTIONS(1076), + [anon_sym_LPAREN2] = ACTIONS(1078), + [anon_sym_BANG] = ACTIONS(1078), + [anon_sym_TILDE] = ACTIONS(1078), + [anon_sym_DASH] = ACTIONS(1076), + [anon_sym_PLUS] = ACTIONS(1076), + [anon_sym_STAR] = ACTIONS(1078), + [anon_sym_AMP] = ACTIONS(1078), + [anon_sym_SEMI] = ACTIONS(1078), + [anon_sym_typedef] = ACTIONS(1076), + [anon_sym_extern] = ACTIONS(1076), + [anon_sym___attribute__] = ACTIONS(1076), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1078), + [anon_sym___declspec] = ACTIONS(1076), + [anon_sym___cdecl] = ACTIONS(1076), + [anon_sym___clrcall] = ACTIONS(1076), + [anon_sym___stdcall] = ACTIONS(1076), + [anon_sym___fastcall] = ACTIONS(1076), + [anon_sym___thiscall] = ACTIONS(1076), + [anon_sym___vectorcall] = ACTIONS(1076), + [anon_sym_LBRACE] = ACTIONS(1078), + [anon_sym_static] = ACTIONS(1076), + [anon_sym_auto] = ACTIONS(1076), + [anon_sym_register] = ACTIONS(1076), + [anon_sym_inline] = ACTIONS(1076), + [anon_sym_const] = ACTIONS(1076), + [anon_sym_volatile] = ACTIONS(1076), + [anon_sym_restrict] = ACTIONS(1076), + [anon_sym__Atomic] = ACTIONS(1076), + [anon_sym_signed] = ACTIONS(1076), + [anon_sym_unsigned] = ACTIONS(1076), + [anon_sym_long] = ACTIONS(1076), + [anon_sym_short] = ACTIONS(1076), + [sym_primitive_type] = ACTIONS(1076), + [anon_sym_enum] = ACTIONS(1076), + [anon_sym_struct] = ACTIONS(1076), + [anon_sym_union] = ACTIONS(1076), + [anon_sym_if] = ACTIONS(1076), + [anon_sym_switch] = ACTIONS(1076), + [anon_sym_case] = ACTIONS(1076), + [anon_sym_default] = ACTIONS(1076), + [anon_sym_while] = ACTIONS(1076), + [anon_sym_do] = ACTIONS(1076), + [anon_sym_for] = ACTIONS(1076), + [anon_sym_return] = ACTIONS(1076), + [anon_sym_break] = ACTIONS(1076), + [anon_sym_continue] = ACTIONS(1076), + [anon_sym_goto] = ACTIONS(1076), + [anon_sym_DASH_DASH] = ACTIONS(1078), + [anon_sym_PLUS_PLUS] = ACTIONS(1078), + [anon_sym_sizeof] = ACTIONS(1076), + [sym_number_literal] = ACTIONS(1078), + [anon_sym_L_SQUOTE] = ACTIONS(1078), + [anon_sym_u_SQUOTE] = ACTIONS(1078), + [anon_sym_U_SQUOTE] = ACTIONS(1078), + [anon_sym_u8_SQUOTE] = ACTIONS(1078), + [anon_sym_SQUOTE] = ACTIONS(1078), + [anon_sym_L_DQUOTE] = ACTIONS(1078), + [anon_sym_u_DQUOTE] = ACTIONS(1078), + [anon_sym_U_DQUOTE] = ACTIONS(1078), + [anon_sym_u8_DQUOTE] = ACTIONS(1078), + [anon_sym_DQUOTE] = ACTIONS(1078), + [sym_true] = ACTIONS(1076), + [sym_false] = ACTIONS(1076), + [sym_null] = ACTIONS(1076), + [sym_comment] = ACTIONS(3), + }, + [115] = { + [sym_identifier] = ACTIONS(1080), + [aux_sym_preproc_include_token1] = ACTIONS(1080), + [aux_sym_preproc_def_token1] = ACTIONS(1080), + [aux_sym_preproc_if_token1] = ACTIONS(1080), + [aux_sym_preproc_if_token2] = ACTIONS(1080), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1080), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1080), + [aux_sym_preproc_else_token1] = ACTIONS(1080), + [aux_sym_preproc_elif_token1] = ACTIONS(1080), + [sym_preproc_directive] = ACTIONS(1080), + [anon_sym_LPAREN2] = ACTIONS(1082), + [anon_sym_BANG] = ACTIONS(1082), + [anon_sym_TILDE] = ACTIONS(1082), + [anon_sym_DASH] = ACTIONS(1080), + [anon_sym_PLUS] = ACTIONS(1080), + [anon_sym_STAR] = ACTIONS(1082), + [anon_sym_AMP] = ACTIONS(1082), + [anon_sym_SEMI] = ACTIONS(1082), + [anon_sym_typedef] = ACTIONS(1080), + [anon_sym_extern] = ACTIONS(1080), + [anon_sym___attribute__] = ACTIONS(1080), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1082), + [anon_sym___declspec] = ACTIONS(1080), + [anon_sym___cdecl] = ACTIONS(1080), + [anon_sym___clrcall] = ACTIONS(1080), + [anon_sym___stdcall] = ACTIONS(1080), + [anon_sym___fastcall] = ACTIONS(1080), + [anon_sym___thiscall] = ACTIONS(1080), + [anon_sym___vectorcall] = ACTIONS(1080), + [anon_sym_LBRACE] = ACTIONS(1082), + [anon_sym_static] = ACTIONS(1080), + [anon_sym_auto] = ACTIONS(1080), + [anon_sym_register] = ACTIONS(1080), + [anon_sym_inline] = ACTIONS(1080), + [anon_sym_const] = ACTIONS(1080), + [anon_sym_volatile] = ACTIONS(1080), + [anon_sym_restrict] = ACTIONS(1080), + [anon_sym__Atomic] = ACTIONS(1080), + [anon_sym_signed] = ACTIONS(1080), + [anon_sym_unsigned] = ACTIONS(1080), + [anon_sym_long] = ACTIONS(1080), + [anon_sym_short] = ACTIONS(1080), + [sym_primitive_type] = ACTIONS(1080), + [anon_sym_enum] = ACTIONS(1080), + [anon_sym_struct] = ACTIONS(1080), + [anon_sym_union] = ACTIONS(1080), + [anon_sym_if] = ACTIONS(1080), + [anon_sym_switch] = ACTIONS(1080), + [anon_sym_case] = ACTIONS(1080), + [anon_sym_default] = ACTIONS(1080), + [anon_sym_while] = ACTIONS(1080), + [anon_sym_do] = ACTIONS(1080), + [anon_sym_for] = ACTIONS(1080), + [anon_sym_return] = ACTIONS(1080), + [anon_sym_break] = ACTIONS(1080), + [anon_sym_continue] = ACTIONS(1080), + [anon_sym_goto] = ACTIONS(1080), + [anon_sym_DASH_DASH] = ACTIONS(1082), + [anon_sym_PLUS_PLUS] = ACTIONS(1082), + [anon_sym_sizeof] = ACTIONS(1080), + [sym_number_literal] = ACTIONS(1082), + [anon_sym_L_SQUOTE] = ACTIONS(1082), + [anon_sym_u_SQUOTE] = ACTIONS(1082), + [anon_sym_U_SQUOTE] = ACTIONS(1082), + [anon_sym_u8_SQUOTE] = ACTIONS(1082), + [anon_sym_SQUOTE] = ACTIONS(1082), + [anon_sym_L_DQUOTE] = ACTIONS(1082), + [anon_sym_u_DQUOTE] = ACTIONS(1082), + [anon_sym_U_DQUOTE] = ACTIONS(1082), + [anon_sym_u8_DQUOTE] = ACTIONS(1082), + [anon_sym_DQUOTE] = ACTIONS(1082), + [sym_true] = ACTIONS(1080), + [sym_false] = ACTIONS(1080), + [sym_null] = ACTIONS(1080), + [sym_comment] = ACTIONS(3), + }, + [116] = { + [sym_identifier] = ACTIONS(1084), + [aux_sym_preproc_include_token1] = ACTIONS(1084), + [aux_sym_preproc_def_token1] = ACTIONS(1084), + [aux_sym_preproc_if_token1] = ACTIONS(1084), + [aux_sym_preproc_if_token2] = ACTIONS(1084), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1084), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1084), + [aux_sym_preproc_else_token1] = ACTIONS(1084), + [aux_sym_preproc_elif_token1] = ACTIONS(1084), + [sym_preproc_directive] = ACTIONS(1084), + [anon_sym_LPAREN2] = ACTIONS(1086), + [anon_sym_BANG] = ACTIONS(1086), + [anon_sym_TILDE] = ACTIONS(1086), + [anon_sym_DASH] = ACTIONS(1084), + [anon_sym_PLUS] = ACTIONS(1084), + [anon_sym_STAR] = ACTIONS(1086), + [anon_sym_AMP] = ACTIONS(1086), + [anon_sym_SEMI] = ACTIONS(1086), + [anon_sym_typedef] = ACTIONS(1084), + [anon_sym_extern] = ACTIONS(1084), + [anon_sym___attribute__] = ACTIONS(1084), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1086), + [anon_sym___declspec] = ACTIONS(1084), + [anon_sym___cdecl] = ACTIONS(1084), + [anon_sym___clrcall] = ACTIONS(1084), + [anon_sym___stdcall] = ACTIONS(1084), + [anon_sym___fastcall] = ACTIONS(1084), + [anon_sym___thiscall] = ACTIONS(1084), + [anon_sym___vectorcall] = ACTIONS(1084), + [anon_sym_LBRACE] = ACTIONS(1086), + [anon_sym_static] = ACTIONS(1084), + [anon_sym_auto] = ACTIONS(1084), + [anon_sym_register] = ACTIONS(1084), + [anon_sym_inline] = ACTIONS(1084), + [anon_sym_const] = ACTIONS(1084), + [anon_sym_volatile] = ACTIONS(1084), + [anon_sym_restrict] = ACTIONS(1084), + [anon_sym__Atomic] = ACTIONS(1084), + [anon_sym_signed] = ACTIONS(1084), + [anon_sym_unsigned] = ACTIONS(1084), + [anon_sym_long] = ACTIONS(1084), + [anon_sym_short] = ACTIONS(1084), + [sym_primitive_type] = ACTIONS(1084), + [anon_sym_enum] = ACTIONS(1084), + [anon_sym_struct] = ACTIONS(1084), + [anon_sym_union] = ACTIONS(1084), + [anon_sym_if] = ACTIONS(1084), + [anon_sym_switch] = ACTIONS(1084), + [anon_sym_case] = ACTIONS(1084), + [anon_sym_default] = ACTIONS(1084), + [anon_sym_while] = ACTIONS(1084), + [anon_sym_do] = ACTIONS(1084), + [anon_sym_for] = ACTIONS(1084), + [anon_sym_return] = ACTIONS(1084), + [anon_sym_break] = ACTIONS(1084), + [anon_sym_continue] = ACTIONS(1084), + [anon_sym_goto] = ACTIONS(1084), + [anon_sym_DASH_DASH] = ACTIONS(1086), + [anon_sym_PLUS_PLUS] = ACTIONS(1086), + [anon_sym_sizeof] = ACTIONS(1084), + [sym_number_literal] = ACTIONS(1086), + [anon_sym_L_SQUOTE] = ACTIONS(1086), + [anon_sym_u_SQUOTE] = ACTIONS(1086), + [anon_sym_U_SQUOTE] = ACTIONS(1086), + [anon_sym_u8_SQUOTE] = ACTIONS(1086), + [anon_sym_SQUOTE] = ACTIONS(1086), + [anon_sym_L_DQUOTE] = ACTIONS(1086), + [anon_sym_u_DQUOTE] = ACTIONS(1086), + [anon_sym_U_DQUOTE] = ACTIONS(1086), + [anon_sym_u8_DQUOTE] = ACTIONS(1086), + [anon_sym_DQUOTE] = ACTIONS(1086), + [sym_true] = ACTIONS(1084), + [sym_false] = ACTIONS(1084), + [sym_null] = ACTIONS(1084), + [sym_comment] = ACTIONS(3), + }, + [117] = { + [sym_identifier] = ACTIONS(1088), + [aux_sym_preproc_include_token1] = ACTIONS(1088), + [aux_sym_preproc_def_token1] = ACTIONS(1088), + [aux_sym_preproc_if_token1] = ACTIONS(1088), + [aux_sym_preproc_if_token2] = ACTIONS(1088), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1088), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1088), + [aux_sym_preproc_else_token1] = ACTIONS(1088), + [aux_sym_preproc_elif_token1] = ACTIONS(1088), + [sym_preproc_directive] = ACTIONS(1088), + [anon_sym_LPAREN2] = ACTIONS(1090), + [anon_sym_BANG] = ACTIONS(1090), + [anon_sym_TILDE] = ACTIONS(1090), + [anon_sym_DASH] = ACTIONS(1088), + [anon_sym_PLUS] = ACTIONS(1088), + [anon_sym_STAR] = ACTIONS(1090), + [anon_sym_AMP] = ACTIONS(1090), + [anon_sym_SEMI] = ACTIONS(1090), + [anon_sym_typedef] = ACTIONS(1088), + [anon_sym_extern] = ACTIONS(1088), + [anon_sym___attribute__] = ACTIONS(1088), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1090), + [anon_sym___declspec] = ACTIONS(1088), + [anon_sym___cdecl] = ACTIONS(1088), + [anon_sym___clrcall] = ACTIONS(1088), + [anon_sym___stdcall] = ACTIONS(1088), + [anon_sym___fastcall] = ACTIONS(1088), + [anon_sym___thiscall] = ACTIONS(1088), + [anon_sym___vectorcall] = ACTIONS(1088), + [anon_sym_LBRACE] = ACTIONS(1090), + [anon_sym_static] = ACTIONS(1088), + [anon_sym_auto] = ACTIONS(1088), + [anon_sym_register] = ACTIONS(1088), + [anon_sym_inline] = ACTIONS(1088), + [anon_sym_const] = ACTIONS(1088), + [anon_sym_volatile] = ACTIONS(1088), + [anon_sym_restrict] = ACTIONS(1088), + [anon_sym__Atomic] = ACTIONS(1088), + [anon_sym_signed] = ACTIONS(1088), + [anon_sym_unsigned] = ACTIONS(1088), + [anon_sym_long] = ACTIONS(1088), + [anon_sym_short] = ACTIONS(1088), + [sym_primitive_type] = ACTIONS(1088), + [anon_sym_enum] = ACTIONS(1088), + [anon_sym_struct] = ACTIONS(1088), + [anon_sym_union] = ACTIONS(1088), + [anon_sym_if] = ACTIONS(1088), + [anon_sym_switch] = ACTIONS(1088), + [anon_sym_case] = ACTIONS(1088), + [anon_sym_default] = ACTIONS(1088), + [anon_sym_while] = ACTIONS(1088), + [anon_sym_do] = ACTIONS(1088), + [anon_sym_for] = ACTIONS(1088), + [anon_sym_return] = ACTIONS(1088), + [anon_sym_break] = ACTIONS(1088), + [anon_sym_continue] = ACTIONS(1088), + [anon_sym_goto] = ACTIONS(1088), + [anon_sym_DASH_DASH] = ACTIONS(1090), + [anon_sym_PLUS_PLUS] = ACTIONS(1090), + [anon_sym_sizeof] = ACTIONS(1088), + [sym_number_literal] = ACTIONS(1090), + [anon_sym_L_SQUOTE] = ACTIONS(1090), + [anon_sym_u_SQUOTE] = ACTIONS(1090), + [anon_sym_U_SQUOTE] = ACTIONS(1090), + [anon_sym_u8_SQUOTE] = ACTIONS(1090), + [anon_sym_SQUOTE] = ACTIONS(1090), + [anon_sym_L_DQUOTE] = ACTIONS(1090), + [anon_sym_u_DQUOTE] = ACTIONS(1090), + [anon_sym_U_DQUOTE] = ACTIONS(1090), + [anon_sym_u8_DQUOTE] = ACTIONS(1090), + [anon_sym_DQUOTE] = ACTIONS(1090), + [sym_true] = ACTIONS(1088), + [sym_false] = ACTIONS(1088), + [sym_null] = ACTIONS(1088), + [sym_comment] = ACTIONS(3), + }, + [118] = { + [sym_identifier] = ACTIONS(1092), + [aux_sym_preproc_include_token1] = ACTIONS(1092), + [aux_sym_preproc_def_token1] = ACTIONS(1092), + [aux_sym_preproc_if_token1] = ACTIONS(1092), + [aux_sym_preproc_if_token2] = ACTIONS(1092), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1092), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1092), + [aux_sym_preproc_else_token1] = ACTIONS(1092), + [aux_sym_preproc_elif_token1] = ACTIONS(1092), + [sym_preproc_directive] = ACTIONS(1092), + [anon_sym_LPAREN2] = ACTIONS(1094), + [anon_sym_BANG] = ACTIONS(1094), + [anon_sym_TILDE] = ACTIONS(1094), + [anon_sym_DASH] = ACTIONS(1092), + [anon_sym_PLUS] = ACTIONS(1092), + [anon_sym_STAR] = ACTIONS(1094), + [anon_sym_AMP] = ACTIONS(1094), + [anon_sym_SEMI] = ACTIONS(1094), + [anon_sym_typedef] = ACTIONS(1092), + [anon_sym_extern] = ACTIONS(1092), + [anon_sym___attribute__] = ACTIONS(1092), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1094), + [anon_sym___declspec] = ACTIONS(1092), + [anon_sym___cdecl] = ACTIONS(1092), + [anon_sym___clrcall] = ACTIONS(1092), + [anon_sym___stdcall] = ACTIONS(1092), + [anon_sym___fastcall] = ACTIONS(1092), + [anon_sym___thiscall] = ACTIONS(1092), + [anon_sym___vectorcall] = ACTIONS(1092), + [anon_sym_LBRACE] = ACTIONS(1094), + [anon_sym_static] = ACTIONS(1092), + [anon_sym_auto] = ACTIONS(1092), + [anon_sym_register] = ACTIONS(1092), + [anon_sym_inline] = ACTIONS(1092), + [anon_sym_const] = ACTIONS(1092), + [anon_sym_volatile] = ACTIONS(1092), + [anon_sym_restrict] = ACTIONS(1092), + [anon_sym__Atomic] = ACTIONS(1092), + [anon_sym_signed] = ACTIONS(1092), + [anon_sym_unsigned] = ACTIONS(1092), + [anon_sym_long] = ACTIONS(1092), + [anon_sym_short] = ACTIONS(1092), + [sym_primitive_type] = ACTIONS(1092), + [anon_sym_enum] = ACTIONS(1092), + [anon_sym_struct] = ACTIONS(1092), + [anon_sym_union] = ACTIONS(1092), + [anon_sym_if] = ACTIONS(1092), + [anon_sym_switch] = ACTIONS(1092), + [anon_sym_case] = ACTIONS(1092), + [anon_sym_default] = ACTIONS(1092), + [anon_sym_while] = ACTIONS(1092), + [anon_sym_do] = ACTIONS(1092), + [anon_sym_for] = ACTIONS(1092), + [anon_sym_return] = ACTIONS(1092), + [anon_sym_break] = ACTIONS(1092), + [anon_sym_continue] = ACTIONS(1092), + [anon_sym_goto] = ACTIONS(1092), + [anon_sym_DASH_DASH] = ACTIONS(1094), + [anon_sym_PLUS_PLUS] = ACTIONS(1094), + [anon_sym_sizeof] = ACTIONS(1092), + [sym_number_literal] = ACTIONS(1094), + [anon_sym_L_SQUOTE] = ACTIONS(1094), + [anon_sym_u_SQUOTE] = ACTIONS(1094), + [anon_sym_U_SQUOTE] = ACTIONS(1094), + [anon_sym_u8_SQUOTE] = ACTIONS(1094), + [anon_sym_SQUOTE] = ACTIONS(1094), + [anon_sym_L_DQUOTE] = ACTIONS(1094), + [anon_sym_u_DQUOTE] = ACTIONS(1094), + [anon_sym_U_DQUOTE] = ACTIONS(1094), + [anon_sym_u8_DQUOTE] = ACTIONS(1094), + [anon_sym_DQUOTE] = ACTIONS(1094), + [sym_true] = ACTIONS(1092), + [sym_false] = ACTIONS(1092), + [sym_null] = ACTIONS(1092), + [sym_comment] = ACTIONS(3), + }, + [119] = { + [sym_identifier] = ACTIONS(1096), + [aux_sym_preproc_include_token1] = ACTIONS(1096), + [aux_sym_preproc_def_token1] = ACTIONS(1096), + [aux_sym_preproc_if_token1] = ACTIONS(1096), + [aux_sym_preproc_if_token2] = ACTIONS(1096), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1096), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1096), + [aux_sym_preproc_else_token1] = ACTIONS(1096), + [aux_sym_preproc_elif_token1] = ACTIONS(1096), + [sym_preproc_directive] = ACTIONS(1096), + [anon_sym_LPAREN2] = ACTIONS(1098), + [anon_sym_BANG] = ACTIONS(1098), + [anon_sym_TILDE] = ACTIONS(1098), + [anon_sym_DASH] = ACTIONS(1096), + [anon_sym_PLUS] = ACTIONS(1096), + [anon_sym_STAR] = ACTIONS(1098), + [anon_sym_AMP] = ACTIONS(1098), + [anon_sym_SEMI] = ACTIONS(1098), + [anon_sym_typedef] = ACTIONS(1096), + [anon_sym_extern] = ACTIONS(1096), + [anon_sym___attribute__] = ACTIONS(1096), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1098), + [anon_sym___declspec] = ACTIONS(1096), + [anon_sym___cdecl] = ACTIONS(1096), + [anon_sym___clrcall] = ACTIONS(1096), + [anon_sym___stdcall] = ACTIONS(1096), + [anon_sym___fastcall] = ACTIONS(1096), + [anon_sym___thiscall] = ACTIONS(1096), + [anon_sym___vectorcall] = ACTIONS(1096), + [anon_sym_LBRACE] = ACTIONS(1098), + [anon_sym_static] = ACTIONS(1096), + [anon_sym_auto] = ACTIONS(1096), + [anon_sym_register] = ACTIONS(1096), + [anon_sym_inline] = ACTIONS(1096), + [anon_sym_const] = ACTIONS(1096), + [anon_sym_volatile] = ACTIONS(1096), + [anon_sym_restrict] = ACTIONS(1096), + [anon_sym__Atomic] = ACTIONS(1096), + [anon_sym_signed] = ACTIONS(1096), + [anon_sym_unsigned] = ACTIONS(1096), + [anon_sym_long] = ACTIONS(1096), + [anon_sym_short] = ACTIONS(1096), + [sym_primitive_type] = ACTIONS(1096), + [anon_sym_enum] = ACTIONS(1096), + [anon_sym_struct] = ACTIONS(1096), + [anon_sym_union] = ACTIONS(1096), + [anon_sym_if] = ACTIONS(1096), + [anon_sym_switch] = ACTIONS(1096), + [anon_sym_case] = ACTIONS(1096), + [anon_sym_default] = ACTIONS(1096), + [anon_sym_while] = ACTIONS(1096), + [anon_sym_do] = ACTIONS(1096), + [anon_sym_for] = ACTIONS(1096), + [anon_sym_return] = ACTIONS(1096), + [anon_sym_break] = ACTIONS(1096), + [anon_sym_continue] = ACTIONS(1096), + [anon_sym_goto] = ACTIONS(1096), + [anon_sym_DASH_DASH] = ACTIONS(1098), + [anon_sym_PLUS_PLUS] = ACTIONS(1098), + [anon_sym_sizeof] = ACTIONS(1096), + [sym_number_literal] = ACTIONS(1098), + [anon_sym_L_SQUOTE] = ACTIONS(1098), + [anon_sym_u_SQUOTE] = ACTIONS(1098), + [anon_sym_U_SQUOTE] = ACTIONS(1098), + [anon_sym_u8_SQUOTE] = ACTIONS(1098), + [anon_sym_SQUOTE] = ACTIONS(1098), + [anon_sym_L_DQUOTE] = ACTIONS(1098), + [anon_sym_u_DQUOTE] = ACTIONS(1098), + [anon_sym_U_DQUOTE] = ACTIONS(1098), + [anon_sym_u8_DQUOTE] = ACTIONS(1098), + [anon_sym_DQUOTE] = ACTIONS(1098), + [sym_true] = ACTIONS(1096), + [sym_false] = ACTIONS(1096), + [sym_null] = ACTIONS(1096), + [sym_comment] = ACTIONS(3), + }, + [120] = { + [sym_identifier] = ACTIONS(1100), + [aux_sym_preproc_include_token1] = ACTIONS(1100), + [aux_sym_preproc_def_token1] = ACTIONS(1100), + [aux_sym_preproc_if_token1] = ACTIONS(1100), + [aux_sym_preproc_if_token2] = ACTIONS(1100), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1100), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1100), + [aux_sym_preproc_else_token1] = ACTIONS(1100), + [aux_sym_preproc_elif_token1] = ACTIONS(1100), + [sym_preproc_directive] = ACTIONS(1100), + [anon_sym_LPAREN2] = ACTIONS(1102), + [anon_sym_BANG] = ACTIONS(1102), + [anon_sym_TILDE] = ACTIONS(1102), + [anon_sym_DASH] = ACTIONS(1100), + [anon_sym_PLUS] = ACTIONS(1100), + [anon_sym_STAR] = ACTIONS(1102), + [anon_sym_AMP] = ACTIONS(1102), + [anon_sym_SEMI] = ACTIONS(1102), + [anon_sym_typedef] = ACTIONS(1100), + [anon_sym_extern] = ACTIONS(1100), + [anon_sym___attribute__] = ACTIONS(1100), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1102), + [anon_sym___declspec] = ACTIONS(1100), + [anon_sym___cdecl] = ACTIONS(1100), + [anon_sym___clrcall] = ACTIONS(1100), + [anon_sym___stdcall] = ACTIONS(1100), + [anon_sym___fastcall] = ACTIONS(1100), + [anon_sym___thiscall] = ACTIONS(1100), + [anon_sym___vectorcall] = ACTIONS(1100), + [anon_sym_LBRACE] = ACTIONS(1102), + [anon_sym_static] = ACTIONS(1100), + [anon_sym_auto] = ACTIONS(1100), + [anon_sym_register] = ACTIONS(1100), + [anon_sym_inline] = ACTIONS(1100), + [anon_sym_const] = ACTIONS(1100), + [anon_sym_volatile] = ACTIONS(1100), + [anon_sym_restrict] = ACTIONS(1100), + [anon_sym__Atomic] = ACTIONS(1100), + [anon_sym_signed] = ACTIONS(1100), + [anon_sym_unsigned] = ACTIONS(1100), + [anon_sym_long] = ACTIONS(1100), + [anon_sym_short] = ACTIONS(1100), + [sym_primitive_type] = ACTIONS(1100), + [anon_sym_enum] = ACTIONS(1100), + [anon_sym_struct] = ACTIONS(1100), + [anon_sym_union] = ACTIONS(1100), + [anon_sym_if] = ACTIONS(1100), + [anon_sym_switch] = ACTIONS(1100), + [anon_sym_case] = ACTIONS(1100), + [anon_sym_default] = ACTIONS(1100), + [anon_sym_while] = ACTIONS(1100), + [anon_sym_do] = ACTIONS(1100), + [anon_sym_for] = ACTIONS(1100), + [anon_sym_return] = ACTIONS(1100), + [anon_sym_break] = ACTIONS(1100), + [anon_sym_continue] = ACTIONS(1100), + [anon_sym_goto] = ACTIONS(1100), + [anon_sym_DASH_DASH] = ACTIONS(1102), + [anon_sym_PLUS_PLUS] = ACTIONS(1102), + [anon_sym_sizeof] = ACTIONS(1100), + [sym_number_literal] = ACTIONS(1102), + [anon_sym_L_SQUOTE] = ACTIONS(1102), + [anon_sym_u_SQUOTE] = ACTIONS(1102), + [anon_sym_U_SQUOTE] = ACTIONS(1102), + [anon_sym_u8_SQUOTE] = ACTIONS(1102), + [anon_sym_SQUOTE] = ACTIONS(1102), + [anon_sym_L_DQUOTE] = ACTIONS(1102), + [anon_sym_u_DQUOTE] = ACTIONS(1102), + [anon_sym_U_DQUOTE] = ACTIONS(1102), + [anon_sym_u8_DQUOTE] = ACTIONS(1102), + [anon_sym_DQUOTE] = ACTIONS(1102), + [sym_true] = ACTIONS(1100), + [sym_false] = ACTIONS(1100), + [sym_null] = ACTIONS(1100), + [sym_comment] = ACTIONS(3), + }, + [121] = { + [sym_identifier] = ACTIONS(1104), + [aux_sym_preproc_include_token1] = ACTIONS(1104), + [aux_sym_preproc_def_token1] = ACTIONS(1104), + [aux_sym_preproc_if_token1] = ACTIONS(1104), + [aux_sym_preproc_if_token2] = ACTIONS(1104), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1104), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1104), + [aux_sym_preproc_else_token1] = ACTIONS(1104), + [aux_sym_preproc_elif_token1] = ACTIONS(1104), + [sym_preproc_directive] = ACTIONS(1104), + [anon_sym_LPAREN2] = ACTIONS(1106), + [anon_sym_BANG] = ACTIONS(1106), + [anon_sym_TILDE] = ACTIONS(1106), + [anon_sym_DASH] = ACTIONS(1104), + [anon_sym_PLUS] = ACTIONS(1104), + [anon_sym_STAR] = ACTIONS(1106), + [anon_sym_AMP] = ACTIONS(1106), + [anon_sym_SEMI] = ACTIONS(1106), + [anon_sym_typedef] = ACTIONS(1104), + [anon_sym_extern] = ACTIONS(1104), + [anon_sym___attribute__] = ACTIONS(1104), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1106), + [anon_sym___declspec] = ACTIONS(1104), + [anon_sym___cdecl] = ACTIONS(1104), + [anon_sym___clrcall] = ACTIONS(1104), + [anon_sym___stdcall] = ACTIONS(1104), + [anon_sym___fastcall] = ACTIONS(1104), + [anon_sym___thiscall] = ACTIONS(1104), + [anon_sym___vectorcall] = ACTIONS(1104), + [anon_sym_LBRACE] = ACTIONS(1106), + [anon_sym_static] = ACTIONS(1104), + [anon_sym_auto] = ACTIONS(1104), + [anon_sym_register] = ACTIONS(1104), + [anon_sym_inline] = ACTIONS(1104), + [anon_sym_const] = ACTIONS(1104), + [anon_sym_volatile] = ACTIONS(1104), + [anon_sym_restrict] = ACTIONS(1104), + [anon_sym__Atomic] = ACTIONS(1104), + [anon_sym_signed] = ACTIONS(1104), + [anon_sym_unsigned] = ACTIONS(1104), + [anon_sym_long] = ACTIONS(1104), + [anon_sym_short] = ACTIONS(1104), + [sym_primitive_type] = ACTIONS(1104), + [anon_sym_enum] = ACTIONS(1104), + [anon_sym_struct] = ACTIONS(1104), + [anon_sym_union] = ACTIONS(1104), + [anon_sym_if] = ACTIONS(1104), + [anon_sym_switch] = ACTIONS(1104), + [anon_sym_case] = ACTIONS(1104), + [anon_sym_default] = ACTIONS(1104), + [anon_sym_while] = ACTIONS(1104), + [anon_sym_do] = ACTIONS(1104), + [anon_sym_for] = ACTIONS(1104), + [anon_sym_return] = ACTIONS(1104), + [anon_sym_break] = ACTIONS(1104), + [anon_sym_continue] = ACTIONS(1104), + [anon_sym_goto] = ACTIONS(1104), + [anon_sym_DASH_DASH] = ACTIONS(1106), + [anon_sym_PLUS_PLUS] = ACTIONS(1106), + [anon_sym_sizeof] = ACTIONS(1104), + [sym_number_literal] = ACTIONS(1106), + [anon_sym_L_SQUOTE] = ACTIONS(1106), + [anon_sym_u_SQUOTE] = ACTIONS(1106), + [anon_sym_U_SQUOTE] = ACTIONS(1106), + [anon_sym_u8_SQUOTE] = ACTIONS(1106), + [anon_sym_SQUOTE] = ACTIONS(1106), + [anon_sym_L_DQUOTE] = ACTIONS(1106), + [anon_sym_u_DQUOTE] = ACTIONS(1106), + [anon_sym_U_DQUOTE] = ACTIONS(1106), + [anon_sym_u8_DQUOTE] = ACTIONS(1106), + [anon_sym_DQUOTE] = ACTIONS(1106), + [sym_true] = ACTIONS(1104), + [sym_false] = ACTIONS(1104), + [sym_null] = ACTIONS(1104), + [sym_comment] = ACTIONS(3), + }, + [122] = { + [sym_identifier] = ACTIONS(1108), + [aux_sym_preproc_include_token1] = ACTIONS(1108), + [aux_sym_preproc_def_token1] = ACTIONS(1108), + [aux_sym_preproc_if_token1] = ACTIONS(1108), + [aux_sym_preproc_if_token2] = ACTIONS(1108), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1108), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1108), + [aux_sym_preproc_else_token1] = ACTIONS(1108), + [aux_sym_preproc_elif_token1] = ACTIONS(1108), + [sym_preproc_directive] = ACTIONS(1108), + [anon_sym_LPAREN2] = ACTIONS(1110), + [anon_sym_BANG] = ACTIONS(1110), + [anon_sym_TILDE] = ACTIONS(1110), + [anon_sym_DASH] = ACTIONS(1108), + [anon_sym_PLUS] = ACTIONS(1108), + [anon_sym_STAR] = ACTIONS(1110), + [anon_sym_AMP] = ACTIONS(1110), + [anon_sym_SEMI] = ACTIONS(1110), + [anon_sym_typedef] = ACTIONS(1108), + [anon_sym_extern] = ACTIONS(1108), + [anon_sym___attribute__] = ACTIONS(1108), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1110), + [anon_sym___declspec] = ACTIONS(1108), + [anon_sym___cdecl] = ACTIONS(1108), + [anon_sym___clrcall] = ACTIONS(1108), + [anon_sym___stdcall] = ACTIONS(1108), + [anon_sym___fastcall] = ACTIONS(1108), + [anon_sym___thiscall] = ACTIONS(1108), + [anon_sym___vectorcall] = ACTIONS(1108), + [anon_sym_LBRACE] = ACTIONS(1110), + [anon_sym_static] = ACTIONS(1108), + [anon_sym_auto] = ACTIONS(1108), + [anon_sym_register] = ACTIONS(1108), + [anon_sym_inline] = ACTIONS(1108), + [anon_sym_const] = ACTIONS(1108), + [anon_sym_volatile] = ACTIONS(1108), + [anon_sym_restrict] = ACTIONS(1108), + [anon_sym__Atomic] = ACTIONS(1108), + [anon_sym_signed] = ACTIONS(1108), + [anon_sym_unsigned] = ACTIONS(1108), + [anon_sym_long] = ACTIONS(1108), + [anon_sym_short] = ACTIONS(1108), + [sym_primitive_type] = ACTIONS(1108), + [anon_sym_enum] = ACTIONS(1108), + [anon_sym_struct] = ACTIONS(1108), + [anon_sym_union] = ACTIONS(1108), + [anon_sym_if] = ACTIONS(1108), + [anon_sym_switch] = ACTIONS(1108), + [anon_sym_case] = ACTIONS(1108), + [anon_sym_default] = ACTIONS(1108), + [anon_sym_while] = ACTIONS(1108), + [anon_sym_do] = ACTIONS(1108), + [anon_sym_for] = ACTIONS(1108), + [anon_sym_return] = ACTIONS(1108), + [anon_sym_break] = ACTIONS(1108), + [anon_sym_continue] = ACTIONS(1108), + [anon_sym_goto] = ACTIONS(1108), + [anon_sym_DASH_DASH] = ACTIONS(1110), + [anon_sym_PLUS_PLUS] = ACTIONS(1110), + [anon_sym_sizeof] = ACTIONS(1108), + [sym_number_literal] = ACTIONS(1110), + [anon_sym_L_SQUOTE] = ACTIONS(1110), + [anon_sym_u_SQUOTE] = ACTIONS(1110), + [anon_sym_U_SQUOTE] = ACTIONS(1110), + [anon_sym_u8_SQUOTE] = ACTIONS(1110), + [anon_sym_SQUOTE] = ACTIONS(1110), + [anon_sym_L_DQUOTE] = ACTIONS(1110), + [anon_sym_u_DQUOTE] = ACTIONS(1110), + [anon_sym_U_DQUOTE] = ACTIONS(1110), + [anon_sym_u8_DQUOTE] = ACTIONS(1110), + [anon_sym_DQUOTE] = ACTIONS(1110), + [sym_true] = ACTIONS(1108), + [sym_false] = ACTIONS(1108), + [sym_null] = ACTIONS(1108), + [sym_comment] = ACTIONS(3), + }, + [123] = { + [sym_identifier] = ACTIONS(1112), + [aux_sym_preproc_include_token1] = ACTIONS(1112), + [aux_sym_preproc_def_token1] = ACTIONS(1112), + [aux_sym_preproc_if_token1] = ACTIONS(1112), + [aux_sym_preproc_if_token2] = ACTIONS(1112), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1112), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1112), + [aux_sym_preproc_else_token1] = ACTIONS(1112), + [aux_sym_preproc_elif_token1] = ACTIONS(1112), + [sym_preproc_directive] = ACTIONS(1112), + [anon_sym_LPAREN2] = ACTIONS(1114), + [anon_sym_BANG] = ACTIONS(1114), + [anon_sym_TILDE] = ACTIONS(1114), + [anon_sym_DASH] = ACTIONS(1112), + [anon_sym_PLUS] = ACTIONS(1112), + [anon_sym_STAR] = ACTIONS(1114), + [anon_sym_AMP] = ACTIONS(1114), + [anon_sym_SEMI] = ACTIONS(1114), + [anon_sym_typedef] = ACTIONS(1112), + [anon_sym_extern] = ACTIONS(1112), + [anon_sym___attribute__] = ACTIONS(1112), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1114), + [anon_sym___declspec] = ACTIONS(1112), + [anon_sym___cdecl] = ACTIONS(1112), + [anon_sym___clrcall] = ACTIONS(1112), + [anon_sym___stdcall] = ACTIONS(1112), + [anon_sym___fastcall] = ACTIONS(1112), + [anon_sym___thiscall] = ACTIONS(1112), + [anon_sym___vectorcall] = ACTIONS(1112), + [anon_sym_LBRACE] = ACTIONS(1114), + [anon_sym_static] = ACTIONS(1112), + [anon_sym_auto] = ACTIONS(1112), + [anon_sym_register] = ACTIONS(1112), + [anon_sym_inline] = ACTIONS(1112), + [anon_sym_const] = ACTIONS(1112), + [anon_sym_volatile] = ACTIONS(1112), + [anon_sym_restrict] = ACTIONS(1112), + [anon_sym__Atomic] = ACTIONS(1112), + [anon_sym_signed] = ACTIONS(1112), + [anon_sym_unsigned] = ACTIONS(1112), + [anon_sym_long] = ACTIONS(1112), + [anon_sym_short] = ACTIONS(1112), + [sym_primitive_type] = ACTIONS(1112), + [anon_sym_enum] = ACTIONS(1112), + [anon_sym_struct] = ACTIONS(1112), + [anon_sym_union] = ACTIONS(1112), + [anon_sym_if] = ACTIONS(1112), + [anon_sym_switch] = ACTIONS(1112), + [anon_sym_case] = ACTIONS(1112), + [anon_sym_default] = ACTIONS(1112), + [anon_sym_while] = ACTIONS(1112), + [anon_sym_do] = ACTIONS(1112), + [anon_sym_for] = ACTIONS(1112), + [anon_sym_return] = ACTIONS(1112), + [anon_sym_break] = ACTIONS(1112), + [anon_sym_continue] = ACTIONS(1112), + [anon_sym_goto] = ACTIONS(1112), + [anon_sym_DASH_DASH] = ACTIONS(1114), + [anon_sym_PLUS_PLUS] = ACTIONS(1114), + [anon_sym_sizeof] = ACTIONS(1112), + [sym_number_literal] = ACTIONS(1114), + [anon_sym_L_SQUOTE] = ACTIONS(1114), + [anon_sym_u_SQUOTE] = ACTIONS(1114), + [anon_sym_U_SQUOTE] = ACTIONS(1114), + [anon_sym_u8_SQUOTE] = ACTIONS(1114), + [anon_sym_SQUOTE] = ACTIONS(1114), + [anon_sym_L_DQUOTE] = ACTIONS(1114), + [anon_sym_u_DQUOTE] = ACTIONS(1114), + [anon_sym_U_DQUOTE] = ACTIONS(1114), + [anon_sym_u8_DQUOTE] = ACTIONS(1114), + [anon_sym_DQUOTE] = ACTIONS(1114), + [sym_true] = ACTIONS(1112), + [sym_false] = ACTIONS(1112), + [sym_null] = ACTIONS(1112), + [sym_comment] = ACTIONS(3), + }, + [124] = { + [sym_identifier] = ACTIONS(1116), + [aux_sym_preproc_include_token1] = ACTIONS(1116), + [aux_sym_preproc_def_token1] = ACTIONS(1116), + [aux_sym_preproc_if_token1] = ACTIONS(1116), + [aux_sym_preproc_if_token2] = ACTIONS(1116), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1116), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1116), + [aux_sym_preproc_else_token1] = ACTIONS(1116), + [aux_sym_preproc_elif_token1] = ACTIONS(1116), + [sym_preproc_directive] = ACTIONS(1116), + [anon_sym_LPAREN2] = ACTIONS(1118), + [anon_sym_BANG] = ACTIONS(1118), + [anon_sym_TILDE] = ACTIONS(1118), + [anon_sym_DASH] = ACTIONS(1116), + [anon_sym_PLUS] = ACTIONS(1116), + [anon_sym_STAR] = ACTIONS(1118), + [anon_sym_AMP] = ACTIONS(1118), + [anon_sym_SEMI] = ACTIONS(1118), + [anon_sym_typedef] = ACTIONS(1116), + [anon_sym_extern] = ACTIONS(1116), + [anon_sym___attribute__] = ACTIONS(1116), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1118), + [anon_sym___declspec] = ACTIONS(1116), + [anon_sym___cdecl] = ACTIONS(1116), + [anon_sym___clrcall] = ACTIONS(1116), + [anon_sym___stdcall] = ACTIONS(1116), + [anon_sym___fastcall] = ACTIONS(1116), + [anon_sym___thiscall] = ACTIONS(1116), + [anon_sym___vectorcall] = ACTIONS(1116), + [anon_sym_LBRACE] = ACTIONS(1118), + [anon_sym_static] = ACTIONS(1116), + [anon_sym_auto] = ACTIONS(1116), + [anon_sym_register] = ACTIONS(1116), + [anon_sym_inline] = ACTIONS(1116), + [anon_sym_const] = ACTIONS(1116), + [anon_sym_volatile] = ACTIONS(1116), + [anon_sym_restrict] = ACTIONS(1116), + [anon_sym__Atomic] = ACTIONS(1116), + [anon_sym_signed] = ACTIONS(1116), + [anon_sym_unsigned] = ACTIONS(1116), + [anon_sym_long] = ACTIONS(1116), + [anon_sym_short] = ACTIONS(1116), + [sym_primitive_type] = ACTIONS(1116), + [anon_sym_enum] = ACTIONS(1116), + [anon_sym_struct] = ACTIONS(1116), + [anon_sym_union] = ACTIONS(1116), + [anon_sym_if] = ACTIONS(1116), + [anon_sym_switch] = ACTIONS(1116), + [anon_sym_case] = ACTIONS(1116), + [anon_sym_default] = ACTIONS(1116), + [anon_sym_while] = ACTIONS(1116), + [anon_sym_do] = ACTIONS(1116), + [anon_sym_for] = ACTIONS(1116), + [anon_sym_return] = ACTIONS(1116), + [anon_sym_break] = ACTIONS(1116), + [anon_sym_continue] = ACTIONS(1116), + [anon_sym_goto] = ACTIONS(1116), + [anon_sym_DASH_DASH] = ACTIONS(1118), + [anon_sym_PLUS_PLUS] = ACTIONS(1118), + [anon_sym_sizeof] = ACTIONS(1116), + [sym_number_literal] = ACTIONS(1118), + [anon_sym_L_SQUOTE] = ACTIONS(1118), + [anon_sym_u_SQUOTE] = ACTIONS(1118), + [anon_sym_U_SQUOTE] = ACTIONS(1118), + [anon_sym_u8_SQUOTE] = ACTIONS(1118), + [anon_sym_SQUOTE] = ACTIONS(1118), + [anon_sym_L_DQUOTE] = ACTIONS(1118), + [anon_sym_u_DQUOTE] = ACTIONS(1118), + [anon_sym_U_DQUOTE] = ACTIONS(1118), + [anon_sym_u8_DQUOTE] = ACTIONS(1118), + [anon_sym_DQUOTE] = ACTIONS(1118), + [sym_true] = ACTIONS(1116), + [sym_false] = ACTIONS(1116), + [sym_null] = ACTIONS(1116), + [sym_comment] = ACTIONS(3), + }, + [125] = { + [sym_identifier] = ACTIONS(1120), + [aux_sym_preproc_include_token1] = ACTIONS(1120), + [aux_sym_preproc_def_token1] = ACTIONS(1120), + [aux_sym_preproc_if_token1] = ACTIONS(1120), + [aux_sym_preproc_if_token2] = ACTIONS(1120), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1120), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1120), + [aux_sym_preproc_else_token1] = ACTIONS(1120), + [aux_sym_preproc_elif_token1] = ACTIONS(1120), + [sym_preproc_directive] = ACTIONS(1120), + [anon_sym_LPAREN2] = ACTIONS(1122), + [anon_sym_BANG] = ACTIONS(1122), + [anon_sym_TILDE] = ACTIONS(1122), + [anon_sym_DASH] = ACTIONS(1120), + [anon_sym_PLUS] = ACTIONS(1120), + [anon_sym_STAR] = ACTIONS(1122), + [anon_sym_AMP] = ACTIONS(1122), + [anon_sym_SEMI] = ACTIONS(1122), + [anon_sym_typedef] = ACTIONS(1120), + [anon_sym_extern] = ACTIONS(1120), + [anon_sym___attribute__] = ACTIONS(1120), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1122), + [anon_sym___declspec] = ACTIONS(1120), + [anon_sym___cdecl] = ACTIONS(1120), + [anon_sym___clrcall] = ACTIONS(1120), + [anon_sym___stdcall] = ACTIONS(1120), + [anon_sym___fastcall] = ACTIONS(1120), + [anon_sym___thiscall] = ACTIONS(1120), + [anon_sym___vectorcall] = ACTIONS(1120), + [anon_sym_LBRACE] = ACTIONS(1122), + [anon_sym_static] = ACTIONS(1120), + [anon_sym_auto] = ACTIONS(1120), + [anon_sym_register] = ACTIONS(1120), + [anon_sym_inline] = ACTIONS(1120), + [anon_sym_const] = ACTIONS(1120), + [anon_sym_volatile] = ACTIONS(1120), + [anon_sym_restrict] = ACTIONS(1120), + [anon_sym__Atomic] = ACTIONS(1120), + [anon_sym_signed] = ACTIONS(1120), + [anon_sym_unsigned] = ACTIONS(1120), + [anon_sym_long] = ACTIONS(1120), + [anon_sym_short] = ACTIONS(1120), + [sym_primitive_type] = ACTIONS(1120), + [anon_sym_enum] = ACTIONS(1120), + [anon_sym_struct] = ACTIONS(1120), + [anon_sym_union] = ACTIONS(1120), + [anon_sym_if] = ACTIONS(1120), + [anon_sym_switch] = ACTIONS(1120), + [anon_sym_case] = ACTIONS(1120), + [anon_sym_default] = ACTIONS(1120), + [anon_sym_while] = ACTIONS(1120), + [anon_sym_do] = ACTIONS(1120), + [anon_sym_for] = ACTIONS(1120), + [anon_sym_return] = ACTIONS(1120), + [anon_sym_break] = ACTIONS(1120), + [anon_sym_continue] = ACTIONS(1120), + [anon_sym_goto] = ACTIONS(1120), + [anon_sym_DASH_DASH] = ACTIONS(1122), + [anon_sym_PLUS_PLUS] = ACTIONS(1122), + [anon_sym_sizeof] = ACTIONS(1120), + [sym_number_literal] = ACTIONS(1122), + [anon_sym_L_SQUOTE] = ACTIONS(1122), + [anon_sym_u_SQUOTE] = ACTIONS(1122), + [anon_sym_U_SQUOTE] = ACTIONS(1122), + [anon_sym_u8_SQUOTE] = ACTIONS(1122), + [anon_sym_SQUOTE] = ACTIONS(1122), + [anon_sym_L_DQUOTE] = ACTIONS(1122), + [anon_sym_u_DQUOTE] = ACTIONS(1122), + [anon_sym_U_DQUOTE] = ACTIONS(1122), + [anon_sym_u8_DQUOTE] = ACTIONS(1122), + [anon_sym_DQUOTE] = ACTIONS(1122), + [sym_true] = ACTIONS(1120), + [sym_false] = ACTIONS(1120), + [sym_null] = ACTIONS(1120), + [sym_comment] = ACTIONS(3), + }, + [126] = { + [sym_attribute_declaration] = STATE(242), + [sym_compound_statement] = STATE(267), + [sym_attributed_statement] = STATE(267), + [sym_labeled_statement] = STATE(267), + [sym_expression_statement] = STATE(267), + [sym_if_statement] = STATE(267), + [sym_switch_statement] = STATE(267), + [sym_case_statement] = STATE(267), + [sym_while_statement] = STATE(267), + [sym_do_statement] = STATE(267), + [sym_for_statement] = STATE(267), + [sym_return_statement] = STATE(267), + [sym_break_statement] = STATE(267), + [sym_continue_statement] = STATE(267), + [sym_goto_statement] = STATE(267), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [sym_identifier] = ACTIONS(1124), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [127] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(193), + [sym_attributed_statement] = STATE(193), + [sym_labeled_statement] = STATE(193), + [sym_expression_statement] = STATE(193), + [sym_if_statement] = STATE(193), + [sym_switch_statement] = STATE(193), + [sym_case_statement] = STATE(193), + [sym_while_statement] = STATE(193), + [sym_do_statement] = STATE(193), + [sym_for_statement] = STATE(193), + [sym_return_statement] = STATE(193), + [sym_break_statement] = STATE(193), + [sym_continue_statement] = STATE(193), + [sym_goto_statement] = STATE(193), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [128] = { + [ts_builtin_sym_end] = ACTIONS(1002), + [sym_identifier] = ACTIONS(1000), + [aux_sym_preproc_include_token1] = ACTIONS(1000), + [aux_sym_preproc_def_token1] = ACTIONS(1000), + [aux_sym_preproc_if_token1] = ACTIONS(1000), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1000), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1000), + [sym_preproc_directive] = ACTIONS(1000), + [anon_sym_LPAREN2] = ACTIONS(1002), + [anon_sym_BANG] = ACTIONS(1002), + [anon_sym_TILDE] = ACTIONS(1002), + [anon_sym_DASH] = ACTIONS(1000), + [anon_sym_PLUS] = ACTIONS(1000), + [anon_sym_STAR] = ACTIONS(1002), + [anon_sym_AMP] = ACTIONS(1002), + [anon_sym_SEMI] = ACTIONS(1002), + [anon_sym_typedef] = ACTIONS(1000), + [anon_sym_extern] = ACTIONS(1000), + [anon_sym___attribute__] = ACTIONS(1000), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1002), + [anon_sym___declspec] = ACTIONS(1000), + [anon_sym___cdecl] = ACTIONS(1000), + [anon_sym___clrcall] = ACTIONS(1000), + [anon_sym___stdcall] = ACTIONS(1000), + [anon_sym___fastcall] = ACTIONS(1000), + [anon_sym___thiscall] = ACTIONS(1000), + [anon_sym___vectorcall] = ACTIONS(1000), + [anon_sym_LBRACE] = ACTIONS(1002), + [anon_sym_static] = ACTIONS(1000), + [anon_sym_auto] = ACTIONS(1000), + [anon_sym_register] = ACTIONS(1000), + [anon_sym_inline] = ACTIONS(1000), + [anon_sym_const] = ACTIONS(1000), + [anon_sym_volatile] = ACTIONS(1000), + [anon_sym_restrict] = ACTIONS(1000), + [anon_sym__Atomic] = ACTIONS(1000), + [anon_sym_signed] = ACTIONS(1000), + [anon_sym_unsigned] = ACTIONS(1000), + [anon_sym_long] = ACTIONS(1000), + [anon_sym_short] = ACTIONS(1000), + [sym_primitive_type] = ACTIONS(1000), + [anon_sym_enum] = ACTIONS(1000), + [anon_sym_struct] = ACTIONS(1000), + [anon_sym_union] = ACTIONS(1000), + [anon_sym_if] = ACTIONS(1000), + [anon_sym_else] = ACTIONS(1000), + [anon_sym_switch] = ACTIONS(1000), + [anon_sym_case] = ACTIONS(1000), + [anon_sym_default] = ACTIONS(1000), + [anon_sym_while] = ACTIONS(1000), + [anon_sym_do] = ACTIONS(1000), + [anon_sym_for] = ACTIONS(1000), + [anon_sym_return] = ACTIONS(1000), + [anon_sym_break] = ACTIONS(1000), + [anon_sym_continue] = ACTIONS(1000), + [anon_sym_goto] = ACTIONS(1000), + [anon_sym_DASH_DASH] = ACTIONS(1002), + [anon_sym_PLUS_PLUS] = ACTIONS(1002), + [anon_sym_sizeof] = ACTIONS(1000), + [sym_number_literal] = ACTIONS(1002), + [anon_sym_L_SQUOTE] = ACTIONS(1002), + [anon_sym_u_SQUOTE] = ACTIONS(1002), + [anon_sym_U_SQUOTE] = ACTIONS(1002), + [anon_sym_u8_SQUOTE] = ACTIONS(1002), + [anon_sym_SQUOTE] = ACTIONS(1002), + [anon_sym_L_DQUOTE] = ACTIONS(1002), + [anon_sym_u_DQUOTE] = ACTIONS(1002), + [anon_sym_U_DQUOTE] = ACTIONS(1002), + [anon_sym_u8_DQUOTE] = ACTIONS(1002), + [anon_sym_DQUOTE] = ACTIONS(1002), + [sym_true] = ACTIONS(1000), + [sym_false] = ACTIONS(1000), + [sym_null] = ACTIONS(1000), + [sym_comment] = ACTIONS(3), + }, + [129] = { + [sym_identifier] = ACTIONS(948), + [aux_sym_preproc_include_token1] = ACTIONS(948), + [aux_sym_preproc_def_token1] = ACTIONS(948), + [aux_sym_preproc_if_token1] = ACTIONS(948), + [aux_sym_preproc_if_token2] = ACTIONS(948), + [aux_sym_preproc_ifdef_token1] = ACTIONS(948), + [aux_sym_preproc_ifdef_token2] = ACTIONS(948), + [sym_preproc_directive] = ACTIONS(948), + [anon_sym_LPAREN2] = ACTIONS(950), + [anon_sym_BANG] = ACTIONS(950), + [anon_sym_TILDE] = ACTIONS(950), + [anon_sym_DASH] = ACTIONS(948), + [anon_sym_PLUS] = ACTIONS(948), + [anon_sym_STAR] = ACTIONS(950), + [anon_sym_AMP] = ACTIONS(950), + [anon_sym_SEMI] = ACTIONS(950), + [anon_sym_typedef] = ACTIONS(948), + [anon_sym_extern] = ACTIONS(948), + [anon_sym___attribute__] = ACTIONS(948), + [anon_sym_LBRACK_LBRACK] = ACTIONS(950), + [anon_sym___declspec] = ACTIONS(948), + [anon_sym___cdecl] = ACTIONS(948), + [anon_sym___clrcall] = ACTIONS(948), + [anon_sym___stdcall] = ACTIONS(948), + [anon_sym___fastcall] = ACTIONS(948), + [anon_sym___thiscall] = ACTIONS(948), + [anon_sym___vectorcall] = ACTIONS(948), + [anon_sym_LBRACE] = ACTIONS(950), + [anon_sym_static] = ACTIONS(948), + [anon_sym_auto] = ACTIONS(948), + [anon_sym_register] = ACTIONS(948), + [anon_sym_inline] = ACTIONS(948), + [anon_sym_const] = ACTIONS(948), + [anon_sym_volatile] = ACTIONS(948), + [anon_sym_restrict] = ACTIONS(948), + [anon_sym__Atomic] = ACTIONS(948), + [anon_sym_signed] = ACTIONS(948), + [anon_sym_unsigned] = ACTIONS(948), + [anon_sym_long] = ACTIONS(948), + [anon_sym_short] = ACTIONS(948), + [sym_primitive_type] = ACTIONS(948), + [anon_sym_enum] = ACTIONS(948), + [anon_sym_struct] = ACTIONS(948), + [anon_sym_union] = ACTIONS(948), + [anon_sym_if] = ACTIONS(948), + [anon_sym_else] = ACTIONS(948), + [anon_sym_switch] = ACTIONS(948), + [anon_sym_case] = ACTIONS(948), + [anon_sym_default] = ACTIONS(948), + [anon_sym_while] = ACTIONS(948), + [anon_sym_do] = ACTIONS(948), + [anon_sym_for] = ACTIONS(948), + [anon_sym_return] = ACTIONS(948), + [anon_sym_break] = ACTIONS(948), + [anon_sym_continue] = ACTIONS(948), + [anon_sym_goto] = ACTIONS(948), + [anon_sym_DASH_DASH] = ACTIONS(950), + [anon_sym_PLUS_PLUS] = ACTIONS(950), + [anon_sym_sizeof] = ACTIONS(948), + [sym_number_literal] = ACTIONS(950), + [anon_sym_L_SQUOTE] = ACTIONS(950), + [anon_sym_u_SQUOTE] = ACTIONS(950), + [anon_sym_U_SQUOTE] = ACTIONS(950), + [anon_sym_u8_SQUOTE] = ACTIONS(950), + [anon_sym_SQUOTE] = ACTIONS(950), + [anon_sym_L_DQUOTE] = ACTIONS(950), + [anon_sym_u_DQUOTE] = ACTIONS(950), + [anon_sym_U_DQUOTE] = ACTIONS(950), + [anon_sym_u8_DQUOTE] = ACTIONS(950), + [anon_sym_DQUOTE] = ACTIONS(950), + [sym_true] = ACTIONS(948), + [sym_false] = ACTIONS(948), + [sym_null] = ACTIONS(948), + [sym_comment] = ACTIONS(3), + }, + [130] = { + [sym_identifier] = ACTIONS(910), + [aux_sym_preproc_include_token1] = ACTIONS(910), + [aux_sym_preproc_def_token1] = ACTIONS(910), + [aux_sym_preproc_if_token1] = ACTIONS(910), + [aux_sym_preproc_if_token2] = ACTIONS(910), + [aux_sym_preproc_ifdef_token1] = ACTIONS(910), + [aux_sym_preproc_ifdef_token2] = ACTIONS(910), + [sym_preproc_directive] = ACTIONS(910), + [anon_sym_LPAREN2] = ACTIONS(912), + [anon_sym_BANG] = ACTIONS(912), + [anon_sym_TILDE] = ACTIONS(912), + [anon_sym_DASH] = ACTIONS(910), + [anon_sym_PLUS] = ACTIONS(910), + [anon_sym_STAR] = ACTIONS(912), + [anon_sym_AMP] = ACTIONS(912), + [anon_sym_SEMI] = ACTIONS(912), + [anon_sym_typedef] = ACTIONS(910), + [anon_sym_extern] = ACTIONS(910), + [anon_sym___attribute__] = ACTIONS(910), + [anon_sym_LBRACK_LBRACK] = ACTIONS(912), + [anon_sym___declspec] = ACTIONS(910), + [anon_sym___cdecl] = ACTIONS(910), + [anon_sym___clrcall] = ACTIONS(910), + [anon_sym___stdcall] = ACTIONS(910), + [anon_sym___fastcall] = ACTIONS(910), + [anon_sym___thiscall] = ACTIONS(910), + [anon_sym___vectorcall] = ACTIONS(910), + [anon_sym_LBRACE] = ACTIONS(912), + [anon_sym_static] = ACTIONS(910), + [anon_sym_auto] = ACTIONS(910), + [anon_sym_register] = ACTIONS(910), + [anon_sym_inline] = ACTIONS(910), + [anon_sym_const] = ACTIONS(910), + [anon_sym_volatile] = ACTIONS(910), + [anon_sym_restrict] = ACTIONS(910), + [anon_sym__Atomic] = ACTIONS(910), + [anon_sym_signed] = ACTIONS(910), + [anon_sym_unsigned] = ACTIONS(910), + [anon_sym_long] = ACTIONS(910), + [anon_sym_short] = ACTIONS(910), + [sym_primitive_type] = ACTIONS(910), + [anon_sym_enum] = ACTIONS(910), + [anon_sym_struct] = ACTIONS(910), + [anon_sym_union] = ACTIONS(910), + [anon_sym_if] = ACTIONS(910), + [anon_sym_else] = ACTIONS(910), + [anon_sym_switch] = ACTIONS(910), + [anon_sym_case] = ACTIONS(910), + [anon_sym_default] = ACTIONS(910), + [anon_sym_while] = ACTIONS(910), + [anon_sym_do] = ACTIONS(910), + [anon_sym_for] = ACTIONS(910), + [anon_sym_return] = ACTIONS(910), + [anon_sym_break] = ACTIONS(910), + [anon_sym_continue] = ACTIONS(910), + [anon_sym_goto] = ACTIONS(910), + [anon_sym_DASH_DASH] = ACTIONS(912), + [anon_sym_PLUS_PLUS] = ACTIONS(912), + [anon_sym_sizeof] = ACTIONS(910), + [sym_number_literal] = ACTIONS(912), + [anon_sym_L_SQUOTE] = ACTIONS(912), + [anon_sym_u_SQUOTE] = ACTIONS(912), + [anon_sym_U_SQUOTE] = ACTIONS(912), + [anon_sym_u8_SQUOTE] = ACTIONS(912), + [anon_sym_SQUOTE] = ACTIONS(912), + [anon_sym_L_DQUOTE] = ACTIONS(912), + [anon_sym_u_DQUOTE] = ACTIONS(912), + [anon_sym_U_DQUOTE] = ACTIONS(912), + [anon_sym_u8_DQUOTE] = ACTIONS(912), + [anon_sym_DQUOTE] = ACTIONS(912), + [sym_true] = ACTIONS(910), + [sym_false] = ACTIONS(910), + [sym_null] = ACTIONS(910), + [sym_comment] = ACTIONS(3), + }, + [131] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(1454), + [sym_attributed_statement] = STATE(1454), + [sym_labeled_statement] = STATE(1454), + [sym_expression_statement] = STATE(1454), + [sym_if_statement] = STATE(1454), + [sym_switch_statement] = STATE(1454), + [sym_case_statement] = STATE(1454), + [sym_while_statement] = STATE(1454), + [sym_do_statement] = STATE(1454), + [sym_for_statement] = STATE(1454), + [sym_return_statement] = STATE(1454), + [sym_break_statement] = STATE(1454), + [sym_continue_statement] = STATE(1454), + [sym_goto_statement] = STATE(1454), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [132] = { + [ts_builtin_sym_end] = ACTIONS(930), + [sym_identifier] = ACTIONS(928), + [aux_sym_preproc_include_token1] = ACTIONS(928), + [aux_sym_preproc_def_token1] = ACTIONS(928), + [aux_sym_preproc_if_token1] = ACTIONS(928), + [aux_sym_preproc_ifdef_token1] = ACTIONS(928), + [aux_sym_preproc_ifdef_token2] = ACTIONS(928), + [sym_preproc_directive] = ACTIONS(928), + [anon_sym_LPAREN2] = ACTIONS(930), + [anon_sym_BANG] = ACTIONS(930), + [anon_sym_TILDE] = ACTIONS(930), + [anon_sym_DASH] = ACTIONS(928), + [anon_sym_PLUS] = ACTIONS(928), + [anon_sym_STAR] = ACTIONS(930), + [anon_sym_AMP] = ACTIONS(930), + [anon_sym_SEMI] = ACTIONS(930), + [anon_sym_typedef] = ACTIONS(928), + [anon_sym_extern] = ACTIONS(928), + [anon_sym___attribute__] = ACTIONS(928), + [anon_sym_LBRACK_LBRACK] = ACTIONS(930), + [anon_sym___declspec] = ACTIONS(928), + [anon_sym___cdecl] = ACTIONS(928), + [anon_sym___clrcall] = ACTIONS(928), + [anon_sym___stdcall] = ACTIONS(928), + [anon_sym___fastcall] = ACTIONS(928), + [anon_sym___thiscall] = ACTIONS(928), + [anon_sym___vectorcall] = ACTIONS(928), + [anon_sym_LBRACE] = ACTIONS(930), + [anon_sym_static] = ACTIONS(928), + [anon_sym_auto] = ACTIONS(928), + [anon_sym_register] = ACTIONS(928), + [anon_sym_inline] = ACTIONS(928), + [anon_sym_const] = ACTIONS(928), + [anon_sym_volatile] = ACTIONS(928), + [anon_sym_restrict] = ACTIONS(928), + [anon_sym__Atomic] = ACTIONS(928), + [anon_sym_signed] = ACTIONS(928), + [anon_sym_unsigned] = ACTIONS(928), + [anon_sym_long] = ACTIONS(928), + [anon_sym_short] = ACTIONS(928), + [sym_primitive_type] = ACTIONS(928), + [anon_sym_enum] = ACTIONS(928), + [anon_sym_struct] = ACTIONS(928), + [anon_sym_union] = ACTIONS(928), + [anon_sym_if] = ACTIONS(928), + [anon_sym_else] = ACTIONS(928), + [anon_sym_switch] = ACTIONS(928), + [anon_sym_case] = ACTIONS(928), + [anon_sym_default] = ACTIONS(928), + [anon_sym_while] = ACTIONS(928), + [anon_sym_do] = ACTIONS(928), + [anon_sym_for] = ACTIONS(928), + [anon_sym_return] = ACTIONS(928), + [anon_sym_break] = ACTIONS(928), + [anon_sym_continue] = ACTIONS(928), + [anon_sym_goto] = ACTIONS(928), + [anon_sym_DASH_DASH] = ACTIONS(930), + [anon_sym_PLUS_PLUS] = ACTIONS(930), + [anon_sym_sizeof] = ACTIONS(928), + [sym_number_literal] = ACTIONS(930), + [anon_sym_L_SQUOTE] = ACTIONS(930), + [anon_sym_u_SQUOTE] = ACTIONS(930), + [anon_sym_U_SQUOTE] = ACTIONS(930), + [anon_sym_u8_SQUOTE] = ACTIONS(930), + [anon_sym_SQUOTE] = ACTIONS(930), + [anon_sym_L_DQUOTE] = ACTIONS(930), + [anon_sym_u_DQUOTE] = ACTIONS(930), + [anon_sym_U_DQUOTE] = ACTIONS(930), + [anon_sym_u8_DQUOTE] = ACTIONS(930), + [anon_sym_DQUOTE] = ACTIONS(930), + [sym_true] = ACTIONS(928), + [sym_false] = ACTIONS(928), + [sym_null] = ACTIONS(928), + [sym_comment] = ACTIONS(3), + }, + [133] = { + [sym_identifier] = ACTIONS(906), + [aux_sym_preproc_include_token1] = ACTIONS(906), + [aux_sym_preproc_def_token1] = ACTIONS(906), + [aux_sym_preproc_if_token1] = ACTIONS(906), + [aux_sym_preproc_if_token2] = ACTIONS(906), + [aux_sym_preproc_ifdef_token1] = ACTIONS(906), + [aux_sym_preproc_ifdef_token2] = ACTIONS(906), + [sym_preproc_directive] = ACTIONS(906), + [anon_sym_LPAREN2] = ACTIONS(908), + [anon_sym_BANG] = ACTIONS(908), + [anon_sym_TILDE] = ACTIONS(908), + [anon_sym_DASH] = ACTIONS(906), + [anon_sym_PLUS] = ACTIONS(906), + [anon_sym_STAR] = ACTIONS(908), + [anon_sym_AMP] = ACTIONS(908), + [anon_sym_SEMI] = ACTIONS(908), + [anon_sym_typedef] = ACTIONS(906), + [anon_sym_extern] = ACTIONS(906), + [anon_sym___attribute__] = ACTIONS(906), + [anon_sym_LBRACK_LBRACK] = ACTIONS(908), + [anon_sym___declspec] = ACTIONS(906), + [anon_sym___cdecl] = ACTIONS(906), + [anon_sym___clrcall] = ACTIONS(906), + [anon_sym___stdcall] = ACTIONS(906), + [anon_sym___fastcall] = ACTIONS(906), + [anon_sym___thiscall] = ACTIONS(906), + [anon_sym___vectorcall] = ACTIONS(906), + [anon_sym_LBRACE] = ACTIONS(908), + [anon_sym_static] = ACTIONS(906), + [anon_sym_auto] = ACTIONS(906), + [anon_sym_register] = ACTIONS(906), + [anon_sym_inline] = ACTIONS(906), + [anon_sym_const] = ACTIONS(906), + [anon_sym_volatile] = ACTIONS(906), + [anon_sym_restrict] = ACTIONS(906), + [anon_sym__Atomic] = ACTIONS(906), + [anon_sym_signed] = ACTIONS(906), + [anon_sym_unsigned] = ACTIONS(906), + [anon_sym_long] = ACTIONS(906), + [anon_sym_short] = ACTIONS(906), + [sym_primitive_type] = ACTIONS(906), + [anon_sym_enum] = ACTIONS(906), + [anon_sym_struct] = ACTIONS(906), + [anon_sym_union] = ACTIONS(906), + [anon_sym_if] = ACTIONS(906), + [anon_sym_else] = ACTIONS(906), + [anon_sym_switch] = ACTIONS(906), + [anon_sym_case] = ACTIONS(906), + [anon_sym_default] = ACTIONS(906), + [anon_sym_while] = ACTIONS(906), + [anon_sym_do] = ACTIONS(906), + [anon_sym_for] = ACTIONS(906), + [anon_sym_return] = ACTIONS(906), + [anon_sym_break] = ACTIONS(906), + [anon_sym_continue] = ACTIONS(906), + [anon_sym_goto] = ACTIONS(906), + [anon_sym_DASH_DASH] = ACTIONS(908), + [anon_sym_PLUS_PLUS] = ACTIONS(908), + [anon_sym_sizeof] = ACTIONS(906), + [sym_number_literal] = ACTIONS(908), + [anon_sym_L_SQUOTE] = ACTIONS(908), + [anon_sym_u_SQUOTE] = ACTIONS(908), + [anon_sym_U_SQUOTE] = ACTIONS(908), + [anon_sym_u8_SQUOTE] = ACTIONS(908), + [anon_sym_SQUOTE] = ACTIONS(908), + [anon_sym_L_DQUOTE] = ACTIONS(908), + [anon_sym_u_DQUOTE] = ACTIONS(908), + [anon_sym_U_DQUOTE] = ACTIONS(908), + [anon_sym_u8_DQUOTE] = ACTIONS(908), + [anon_sym_DQUOTE] = ACTIONS(908), + [sym_true] = ACTIONS(906), + [sym_false] = ACTIONS(906), + [sym_null] = ACTIONS(906), + [sym_comment] = ACTIONS(3), + }, + [134] = { + [sym_identifier] = ACTIONS(914), + [aux_sym_preproc_include_token1] = ACTIONS(914), + [aux_sym_preproc_def_token1] = ACTIONS(914), + [aux_sym_preproc_if_token1] = ACTIONS(914), + [aux_sym_preproc_if_token2] = ACTIONS(914), + [aux_sym_preproc_ifdef_token1] = ACTIONS(914), + [aux_sym_preproc_ifdef_token2] = ACTIONS(914), + [sym_preproc_directive] = ACTIONS(914), + [anon_sym_LPAREN2] = ACTIONS(916), + [anon_sym_BANG] = ACTIONS(916), + [anon_sym_TILDE] = ACTIONS(916), + [anon_sym_DASH] = ACTIONS(914), + [anon_sym_PLUS] = ACTIONS(914), + [anon_sym_STAR] = ACTIONS(916), + [anon_sym_AMP] = ACTIONS(916), + [anon_sym_SEMI] = ACTIONS(916), + [anon_sym_typedef] = ACTIONS(914), + [anon_sym_extern] = ACTIONS(914), + [anon_sym___attribute__] = ACTIONS(914), + [anon_sym_LBRACK_LBRACK] = ACTIONS(916), + [anon_sym___declspec] = ACTIONS(914), + [anon_sym___cdecl] = ACTIONS(914), + [anon_sym___clrcall] = ACTIONS(914), + [anon_sym___stdcall] = ACTIONS(914), + [anon_sym___fastcall] = ACTIONS(914), + [anon_sym___thiscall] = ACTIONS(914), + [anon_sym___vectorcall] = ACTIONS(914), + [anon_sym_LBRACE] = ACTIONS(916), + [anon_sym_static] = ACTIONS(914), + [anon_sym_auto] = ACTIONS(914), + [anon_sym_register] = ACTIONS(914), + [anon_sym_inline] = ACTIONS(914), + [anon_sym_const] = ACTIONS(914), + [anon_sym_volatile] = ACTIONS(914), + [anon_sym_restrict] = ACTIONS(914), + [anon_sym__Atomic] = ACTIONS(914), + [anon_sym_signed] = ACTIONS(914), + [anon_sym_unsigned] = ACTIONS(914), + [anon_sym_long] = ACTIONS(914), + [anon_sym_short] = ACTIONS(914), + [sym_primitive_type] = ACTIONS(914), + [anon_sym_enum] = ACTIONS(914), + [anon_sym_struct] = ACTIONS(914), + [anon_sym_union] = ACTIONS(914), + [anon_sym_if] = ACTIONS(914), + [anon_sym_else] = ACTIONS(1130), + [anon_sym_switch] = ACTIONS(914), + [anon_sym_case] = ACTIONS(914), + [anon_sym_default] = ACTIONS(914), + [anon_sym_while] = ACTIONS(914), + [anon_sym_do] = ACTIONS(914), + [anon_sym_for] = ACTIONS(914), + [anon_sym_return] = ACTIONS(914), + [anon_sym_break] = ACTIONS(914), + [anon_sym_continue] = ACTIONS(914), + [anon_sym_goto] = ACTIONS(914), + [anon_sym_DASH_DASH] = ACTIONS(916), + [anon_sym_PLUS_PLUS] = ACTIONS(916), + [anon_sym_sizeof] = ACTIONS(914), + [sym_number_literal] = ACTIONS(916), + [anon_sym_L_SQUOTE] = ACTIONS(916), + [anon_sym_u_SQUOTE] = ACTIONS(916), + [anon_sym_U_SQUOTE] = ACTIONS(916), + [anon_sym_u8_SQUOTE] = ACTIONS(916), + [anon_sym_SQUOTE] = ACTIONS(916), + [anon_sym_L_DQUOTE] = ACTIONS(916), + [anon_sym_u_DQUOTE] = ACTIONS(916), + [anon_sym_U_DQUOTE] = ACTIONS(916), + [anon_sym_u8_DQUOTE] = ACTIONS(916), + [anon_sym_DQUOTE] = ACTIONS(916), + [sym_true] = ACTIONS(914), + [sym_false] = ACTIONS(914), + [sym_null] = ACTIONS(914), + [sym_comment] = ACTIONS(3), + }, + [135] = { + [sym_identifier] = ACTIONS(920), + [aux_sym_preproc_include_token1] = ACTIONS(920), + [aux_sym_preproc_def_token1] = ACTIONS(920), + [aux_sym_preproc_if_token1] = ACTIONS(920), + [aux_sym_preproc_if_token2] = ACTIONS(920), + [aux_sym_preproc_ifdef_token1] = ACTIONS(920), + [aux_sym_preproc_ifdef_token2] = ACTIONS(920), + [sym_preproc_directive] = ACTIONS(920), + [anon_sym_LPAREN2] = ACTIONS(922), + [anon_sym_BANG] = ACTIONS(922), + [anon_sym_TILDE] = ACTIONS(922), + [anon_sym_DASH] = ACTIONS(920), + [anon_sym_PLUS] = ACTIONS(920), + [anon_sym_STAR] = ACTIONS(922), + [anon_sym_AMP] = ACTIONS(922), + [anon_sym_SEMI] = ACTIONS(922), + [anon_sym_typedef] = ACTIONS(920), + [anon_sym_extern] = ACTIONS(920), + [anon_sym___attribute__] = ACTIONS(920), + [anon_sym_LBRACK_LBRACK] = ACTIONS(922), + [anon_sym___declspec] = ACTIONS(920), + [anon_sym___cdecl] = ACTIONS(920), + [anon_sym___clrcall] = ACTIONS(920), + [anon_sym___stdcall] = ACTIONS(920), + [anon_sym___fastcall] = ACTIONS(920), + [anon_sym___thiscall] = ACTIONS(920), + [anon_sym___vectorcall] = ACTIONS(920), + [anon_sym_LBRACE] = ACTIONS(922), + [anon_sym_static] = ACTIONS(920), + [anon_sym_auto] = ACTIONS(920), + [anon_sym_register] = ACTIONS(920), + [anon_sym_inline] = ACTIONS(920), + [anon_sym_const] = ACTIONS(920), + [anon_sym_volatile] = ACTIONS(920), + [anon_sym_restrict] = ACTIONS(920), + [anon_sym__Atomic] = ACTIONS(920), + [anon_sym_signed] = ACTIONS(920), + [anon_sym_unsigned] = ACTIONS(920), + [anon_sym_long] = ACTIONS(920), + [anon_sym_short] = ACTIONS(920), + [sym_primitive_type] = ACTIONS(920), + [anon_sym_enum] = ACTIONS(920), + [anon_sym_struct] = ACTIONS(920), + [anon_sym_union] = ACTIONS(920), + [anon_sym_if] = ACTIONS(920), + [anon_sym_else] = ACTIONS(920), + [anon_sym_switch] = ACTIONS(920), + [anon_sym_case] = ACTIONS(920), + [anon_sym_default] = ACTIONS(920), + [anon_sym_while] = ACTIONS(920), + [anon_sym_do] = ACTIONS(920), + [anon_sym_for] = ACTIONS(920), + [anon_sym_return] = ACTIONS(920), + [anon_sym_break] = ACTIONS(920), + [anon_sym_continue] = ACTIONS(920), + [anon_sym_goto] = ACTIONS(920), + [anon_sym_DASH_DASH] = ACTIONS(922), + [anon_sym_PLUS_PLUS] = ACTIONS(922), + [anon_sym_sizeof] = ACTIONS(920), + [sym_number_literal] = ACTIONS(922), + [anon_sym_L_SQUOTE] = ACTIONS(922), + [anon_sym_u_SQUOTE] = ACTIONS(922), + [anon_sym_U_SQUOTE] = ACTIONS(922), + [anon_sym_u8_SQUOTE] = ACTIONS(922), + [anon_sym_SQUOTE] = ACTIONS(922), + [anon_sym_L_DQUOTE] = ACTIONS(922), + [anon_sym_u_DQUOTE] = ACTIONS(922), + [anon_sym_U_DQUOTE] = ACTIONS(922), + [anon_sym_u8_DQUOTE] = ACTIONS(922), + [anon_sym_DQUOTE] = ACTIONS(922), + [sym_true] = ACTIONS(920), + [sym_false] = ACTIONS(920), + [sym_null] = ACTIONS(920), + [sym_comment] = ACTIONS(3), + }, + [136] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(246), + [sym_attributed_statement] = STATE(246), + [sym_labeled_statement] = STATE(246), + [sym_expression_statement] = STATE(246), + [sym_if_statement] = STATE(246), + [sym_switch_statement] = STATE(246), + [sym_case_statement] = STATE(246), + [sym_while_statement] = STATE(246), + [sym_do_statement] = STATE(246), + [sym_for_statement] = STATE(246), + [sym_return_statement] = STATE(246), + [sym_break_statement] = STATE(246), + [sym_continue_statement] = STATE(246), + [sym_goto_statement] = STATE(246), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [137] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(174), + [sym_attributed_statement] = STATE(174), + [sym_labeled_statement] = STATE(174), + [sym_expression_statement] = STATE(174), + [sym_if_statement] = STATE(174), + [sym_switch_statement] = STATE(174), + [sym_case_statement] = STATE(174), + [sym_while_statement] = STATE(174), + [sym_do_statement] = STATE(174), + [sym_for_statement] = STATE(174), + [sym_return_statement] = STATE(174), + [sym_break_statement] = STATE(174), + [sym_continue_statement] = STATE(174), + [sym_goto_statement] = STATE(174), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [138] = { + [ts_builtin_sym_end] = ACTIONS(926), + [sym_identifier] = ACTIONS(924), + [aux_sym_preproc_include_token1] = ACTIONS(924), + [aux_sym_preproc_def_token1] = ACTIONS(924), + [aux_sym_preproc_if_token1] = ACTIONS(924), + [aux_sym_preproc_ifdef_token1] = ACTIONS(924), + [aux_sym_preproc_ifdef_token2] = ACTIONS(924), + [sym_preproc_directive] = ACTIONS(924), + [anon_sym_LPAREN2] = ACTIONS(926), + [anon_sym_BANG] = ACTIONS(926), + [anon_sym_TILDE] = ACTIONS(926), + [anon_sym_DASH] = ACTIONS(924), + [anon_sym_PLUS] = ACTIONS(924), + [anon_sym_STAR] = ACTIONS(926), + [anon_sym_AMP] = ACTIONS(926), + [anon_sym_SEMI] = ACTIONS(926), + [anon_sym_typedef] = ACTIONS(924), + [anon_sym_extern] = ACTIONS(924), + [anon_sym___attribute__] = ACTIONS(924), + [anon_sym_LBRACK_LBRACK] = ACTIONS(926), + [anon_sym___declspec] = ACTIONS(924), + [anon_sym___cdecl] = ACTIONS(924), + [anon_sym___clrcall] = ACTIONS(924), + [anon_sym___stdcall] = ACTIONS(924), + [anon_sym___fastcall] = ACTIONS(924), + [anon_sym___thiscall] = ACTIONS(924), + [anon_sym___vectorcall] = ACTIONS(924), + [anon_sym_LBRACE] = ACTIONS(926), + [anon_sym_static] = ACTIONS(924), + [anon_sym_auto] = ACTIONS(924), + [anon_sym_register] = ACTIONS(924), + [anon_sym_inline] = ACTIONS(924), + [anon_sym_const] = ACTIONS(924), + [anon_sym_volatile] = ACTIONS(924), + [anon_sym_restrict] = ACTIONS(924), + [anon_sym__Atomic] = ACTIONS(924), + [anon_sym_signed] = ACTIONS(924), + [anon_sym_unsigned] = ACTIONS(924), + [anon_sym_long] = ACTIONS(924), + [anon_sym_short] = ACTIONS(924), + [sym_primitive_type] = ACTIONS(924), + [anon_sym_enum] = ACTIONS(924), + [anon_sym_struct] = ACTIONS(924), + [anon_sym_union] = ACTIONS(924), + [anon_sym_if] = ACTIONS(924), + [anon_sym_else] = ACTIONS(924), + [anon_sym_switch] = ACTIONS(924), + [anon_sym_case] = ACTIONS(924), + [anon_sym_default] = ACTIONS(924), + [anon_sym_while] = ACTIONS(924), + [anon_sym_do] = ACTIONS(924), + [anon_sym_for] = ACTIONS(924), + [anon_sym_return] = ACTIONS(924), + [anon_sym_break] = ACTIONS(924), + [anon_sym_continue] = ACTIONS(924), + [anon_sym_goto] = ACTIONS(924), + [anon_sym_DASH_DASH] = ACTIONS(926), + [anon_sym_PLUS_PLUS] = ACTIONS(926), + [anon_sym_sizeof] = ACTIONS(924), + [sym_number_literal] = ACTIONS(926), + [anon_sym_L_SQUOTE] = ACTIONS(926), + [anon_sym_u_SQUOTE] = ACTIONS(926), + [anon_sym_U_SQUOTE] = ACTIONS(926), + [anon_sym_u8_SQUOTE] = ACTIONS(926), + [anon_sym_SQUOTE] = ACTIONS(926), + [anon_sym_L_DQUOTE] = ACTIONS(926), + [anon_sym_u_DQUOTE] = ACTIONS(926), + [anon_sym_U_DQUOTE] = ACTIONS(926), + [anon_sym_u8_DQUOTE] = ACTIONS(926), + [anon_sym_DQUOTE] = ACTIONS(926), + [sym_true] = ACTIONS(924), + [sym_false] = ACTIONS(924), + [sym_null] = ACTIONS(924), + [sym_comment] = ACTIONS(3), + }, + [139] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(1445), + [sym_attributed_statement] = STATE(1445), + [sym_labeled_statement] = STATE(1445), + [sym_expression_statement] = STATE(1445), + [sym_if_statement] = STATE(1445), + [sym_switch_statement] = STATE(1445), + [sym_case_statement] = STATE(1445), + [sym_while_statement] = STATE(1445), + [sym_do_statement] = STATE(1445), + [sym_for_statement] = STATE(1445), + [sym_return_statement] = STATE(1445), + [sym_break_statement] = STATE(1445), + [sym_continue_statement] = STATE(1445), + [sym_goto_statement] = STATE(1445), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [140] = { + [sym_attribute_declaration] = STATE(140), + [sym_compound_statement] = STATE(141), + [sym_attributed_statement] = STATE(141), + [sym_labeled_statement] = STATE(141), + [sym_expression_statement] = STATE(141), + [sym_if_statement] = STATE(141), + [sym_switch_statement] = STATE(141), + [sym_case_statement] = STATE(141), + [sym_while_statement] = STATE(141), + [sym_do_statement] = STATE(141), + [sym_for_statement] = STATE(141), + [sym_return_statement] = STATE(141), + [sym_break_statement] = STATE(141), + [sym_continue_statement] = STATE(141), + [sym_goto_statement] = STATE(141), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(140), + [sym_identifier] = ACTIONS(1132), + [anon_sym_LPAREN2] = ACTIONS(1135), + [anon_sym_BANG] = ACTIONS(1138), + [anon_sym_TILDE] = ACTIONS(1138), + [anon_sym_DASH] = ACTIONS(1141), + [anon_sym_PLUS] = ACTIONS(1141), + [anon_sym_STAR] = ACTIONS(1144), + [anon_sym_AMP] = ACTIONS(1144), + [anon_sym_SEMI] = ACTIONS(1147), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1150), + [anon_sym_LBRACE] = ACTIONS(1153), + [anon_sym_if] = ACTIONS(1156), + [anon_sym_switch] = ACTIONS(1159), + [anon_sym_case] = ACTIONS(1162), + [anon_sym_default] = ACTIONS(1165), + [anon_sym_while] = ACTIONS(1168), + [anon_sym_do] = ACTIONS(1171), + [anon_sym_for] = ACTIONS(1174), + [anon_sym_return] = ACTIONS(1177), + [anon_sym_break] = ACTIONS(1180), + [anon_sym_continue] = ACTIONS(1183), + [anon_sym_goto] = ACTIONS(1186), + [anon_sym_DASH_DASH] = ACTIONS(1189), + [anon_sym_PLUS_PLUS] = ACTIONS(1189), + [anon_sym_sizeof] = ACTIONS(1192), + [sym_number_literal] = ACTIONS(1195), + [anon_sym_L_SQUOTE] = ACTIONS(1198), + [anon_sym_u_SQUOTE] = ACTIONS(1198), + [anon_sym_U_SQUOTE] = ACTIONS(1198), + [anon_sym_u8_SQUOTE] = ACTIONS(1198), + [anon_sym_SQUOTE] = ACTIONS(1198), + [anon_sym_L_DQUOTE] = ACTIONS(1201), + [anon_sym_u_DQUOTE] = ACTIONS(1201), + [anon_sym_U_DQUOTE] = ACTIONS(1201), + [anon_sym_u8_DQUOTE] = ACTIONS(1201), + [anon_sym_DQUOTE] = ACTIONS(1201), + [sym_true] = ACTIONS(1204), + [sym_false] = ACTIONS(1204), + [sym_null] = ACTIONS(1204), + [sym_comment] = ACTIONS(3), + }, + [141] = { + [sym_identifier] = ACTIONS(944), + [aux_sym_preproc_include_token1] = ACTIONS(944), + [aux_sym_preproc_def_token1] = ACTIONS(944), + [aux_sym_preproc_if_token1] = ACTIONS(944), + [aux_sym_preproc_if_token2] = ACTIONS(944), + [aux_sym_preproc_ifdef_token1] = ACTIONS(944), + [aux_sym_preproc_ifdef_token2] = ACTIONS(944), + [sym_preproc_directive] = ACTIONS(944), + [anon_sym_LPAREN2] = ACTIONS(946), + [anon_sym_BANG] = ACTIONS(946), + [anon_sym_TILDE] = ACTIONS(946), + [anon_sym_DASH] = ACTIONS(944), + [anon_sym_PLUS] = ACTIONS(944), + [anon_sym_STAR] = ACTIONS(946), + [anon_sym_AMP] = ACTIONS(946), + [anon_sym_SEMI] = ACTIONS(946), + [anon_sym_typedef] = ACTIONS(944), + [anon_sym_extern] = ACTIONS(944), + [anon_sym___attribute__] = ACTIONS(944), + [anon_sym_LBRACK_LBRACK] = ACTIONS(946), + [anon_sym___declspec] = ACTIONS(944), + [anon_sym___cdecl] = ACTIONS(944), + [anon_sym___clrcall] = ACTIONS(944), + [anon_sym___stdcall] = ACTIONS(944), + [anon_sym___fastcall] = ACTIONS(944), + [anon_sym___thiscall] = ACTIONS(944), + [anon_sym___vectorcall] = ACTIONS(944), + [anon_sym_LBRACE] = ACTIONS(946), + [anon_sym_static] = ACTIONS(944), + [anon_sym_auto] = ACTIONS(944), + [anon_sym_register] = ACTIONS(944), + [anon_sym_inline] = ACTIONS(944), + [anon_sym_const] = ACTIONS(944), + [anon_sym_volatile] = ACTIONS(944), + [anon_sym_restrict] = ACTIONS(944), + [anon_sym__Atomic] = ACTIONS(944), + [anon_sym_signed] = ACTIONS(944), + [anon_sym_unsigned] = ACTIONS(944), + [anon_sym_long] = ACTIONS(944), + [anon_sym_short] = ACTIONS(944), + [sym_primitive_type] = ACTIONS(944), + [anon_sym_enum] = ACTIONS(944), + [anon_sym_struct] = ACTIONS(944), + [anon_sym_union] = ACTIONS(944), + [anon_sym_if] = ACTIONS(944), + [anon_sym_else] = ACTIONS(944), + [anon_sym_switch] = ACTIONS(944), + [anon_sym_case] = ACTIONS(944), + [anon_sym_default] = ACTIONS(944), + [anon_sym_while] = ACTIONS(944), + [anon_sym_do] = ACTIONS(944), + [anon_sym_for] = ACTIONS(944), + [anon_sym_return] = ACTIONS(944), + [anon_sym_break] = ACTIONS(944), + [anon_sym_continue] = ACTIONS(944), + [anon_sym_goto] = ACTIONS(944), + [anon_sym_DASH_DASH] = ACTIONS(946), + [anon_sym_PLUS_PLUS] = ACTIONS(946), + [anon_sym_sizeof] = ACTIONS(944), + [sym_number_literal] = ACTIONS(946), + [anon_sym_L_SQUOTE] = ACTIONS(946), + [anon_sym_u_SQUOTE] = ACTIONS(946), + [anon_sym_U_SQUOTE] = ACTIONS(946), + [anon_sym_u8_SQUOTE] = ACTIONS(946), + [anon_sym_SQUOTE] = ACTIONS(946), + [anon_sym_L_DQUOTE] = ACTIONS(946), + [anon_sym_u_DQUOTE] = ACTIONS(946), + [anon_sym_U_DQUOTE] = ACTIONS(946), + [anon_sym_u8_DQUOTE] = ACTIONS(946), + [anon_sym_DQUOTE] = ACTIONS(946), + [sym_true] = ACTIONS(944), + [sym_false] = ACTIONS(944), + [sym_null] = ACTIONS(944), + [sym_comment] = ACTIONS(3), + }, + [142] = { + [sym_identifier] = ACTIONS(984), + [aux_sym_preproc_include_token1] = ACTIONS(984), + [aux_sym_preproc_def_token1] = ACTIONS(984), + [aux_sym_preproc_if_token1] = ACTIONS(984), + [aux_sym_preproc_if_token2] = ACTIONS(984), + [aux_sym_preproc_ifdef_token1] = ACTIONS(984), + [aux_sym_preproc_ifdef_token2] = ACTIONS(984), + [sym_preproc_directive] = ACTIONS(984), + [anon_sym_LPAREN2] = ACTIONS(986), + [anon_sym_BANG] = ACTIONS(986), + [anon_sym_TILDE] = ACTIONS(986), + [anon_sym_DASH] = ACTIONS(984), + [anon_sym_PLUS] = ACTIONS(984), + [anon_sym_STAR] = ACTIONS(986), + [anon_sym_AMP] = ACTIONS(986), + [anon_sym_SEMI] = ACTIONS(986), + [anon_sym_typedef] = ACTIONS(984), + [anon_sym_extern] = ACTIONS(984), + [anon_sym___attribute__] = ACTIONS(984), + [anon_sym_LBRACK_LBRACK] = ACTIONS(986), + [anon_sym___declspec] = ACTIONS(984), + [anon_sym___cdecl] = ACTIONS(984), + [anon_sym___clrcall] = ACTIONS(984), + [anon_sym___stdcall] = ACTIONS(984), + [anon_sym___fastcall] = ACTIONS(984), + [anon_sym___thiscall] = ACTIONS(984), + [anon_sym___vectorcall] = ACTIONS(984), + [anon_sym_LBRACE] = ACTIONS(986), + [anon_sym_static] = ACTIONS(984), + [anon_sym_auto] = ACTIONS(984), + [anon_sym_register] = ACTIONS(984), + [anon_sym_inline] = ACTIONS(984), + [anon_sym_const] = ACTIONS(984), + [anon_sym_volatile] = ACTIONS(984), + [anon_sym_restrict] = ACTIONS(984), + [anon_sym__Atomic] = ACTIONS(984), + [anon_sym_signed] = ACTIONS(984), + [anon_sym_unsigned] = ACTIONS(984), + [anon_sym_long] = ACTIONS(984), + [anon_sym_short] = ACTIONS(984), + [sym_primitive_type] = ACTIONS(984), + [anon_sym_enum] = ACTIONS(984), + [anon_sym_struct] = ACTIONS(984), + [anon_sym_union] = ACTIONS(984), + [anon_sym_if] = ACTIONS(984), + [anon_sym_else] = ACTIONS(984), + [anon_sym_switch] = ACTIONS(984), + [anon_sym_case] = ACTIONS(984), + [anon_sym_default] = ACTIONS(984), + [anon_sym_while] = ACTIONS(984), + [anon_sym_do] = ACTIONS(984), + [anon_sym_for] = ACTIONS(984), + [anon_sym_return] = ACTIONS(984), + [anon_sym_break] = ACTIONS(984), + [anon_sym_continue] = ACTIONS(984), + [anon_sym_goto] = ACTIONS(984), + [anon_sym_DASH_DASH] = ACTIONS(986), + [anon_sym_PLUS_PLUS] = ACTIONS(986), + [anon_sym_sizeof] = ACTIONS(984), + [sym_number_literal] = ACTIONS(986), + [anon_sym_L_SQUOTE] = ACTIONS(986), + [anon_sym_u_SQUOTE] = ACTIONS(986), + [anon_sym_U_SQUOTE] = ACTIONS(986), + [anon_sym_u8_SQUOTE] = ACTIONS(986), + [anon_sym_SQUOTE] = ACTIONS(986), + [anon_sym_L_DQUOTE] = ACTIONS(986), + [anon_sym_u_DQUOTE] = ACTIONS(986), + [anon_sym_U_DQUOTE] = ACTIONS(986), + [anon_sym_u8_DQUOTE] = ACTIONS(986), + [anon_sym_DQUOTE] = ACTIONS(986), + [sym_true] = ACTIONS(984), + [sym_false] = ACTIONS(984), + [sym_null] = ACTIONS(984), + [sym_comment] = ACTIONS(3), + }, + [143] = { + [ts_builtin_sym_end] = ACTIONS(938), + [sym_identifier] = ACTIONS(936), + [aux_sym_preproc_include_token1] = ACTIONS(936), + [aux_sym_preproc_def_token1] = ACTIONS(936), + [aux_sym_preproc_if_token1] = ACTIONS(936), + [aux_sym_preproc_ifdef_token1] = ACTIONS(936), + [aux_sym_preproc_ifdef_token2] = ACTIONS(936), + [sym_preproc_directive] = ACTIONS(936), + [anon_sym_LPAREN2] = ACTIONS(938), + [anon_sym_BANG] = ACTIONS(938), + [anon_sym_TILDE] = ACTIONS(938), + [anon_sym_DASH] = ACTIONS(936), + [anon_sym_PLUS] = ACTIONS(936), + [anon_sym_STAR] = ACTIONS(938), + [anon_sym_AMP] = ACTIONS(938), + [anon_sym_SEMI] = ACTIONS(938), + [anon_sym_typedef] = ACTIONS(936), + [anon_sym_extern] = ACTIONS(936), + [anon_sym___attribute__] = ACTIONS(936), + [anon_sym_LBRACK_LBRACK] = ACTIONS(938), + [anon_sym___declspec] = ACTIONS(936), + [anon_sym___cdecl] = ACTIONS(936), + [anon_sym___clrcall] = ACTIONS(936), + [anon_sym___stdcall] = ACTIONS(936), + [anon_sym___fastcall] = ACTIONS(936), + [anon_sym___thiscall] = ACTIONS(936), + [anon_sym___vectorcall] = ACTIONS(936), + [anon_sym_LBRACE] = ACTIONS(938), + [anon_sym_static] = ACTIONS(936), + [anon_sym_auto] = ACTIONS(936), + [anon_sym_register] = ACTIONS(936), + [anon_sym_inline] = ACTIONS(936), + [anon_sym_const] = ACTIONS(936), + [anon_sym_volatile] = ACTIONS(936), + [anon_sym_restrict] = ACTIONS(936), + [anon_sym__Atomic] = ACTIONS(936), + [anon_sym_signed] = ACTIONS(936), + [anon_sym_unsigned] = ACTIONS(936), + [anon_sym_long] = ACTIONS(936), + [anon_sym_short] = ACTIONS(936), + [sym_primitive_type] = ACTIONS(936), + [anon_sym_enum] = ACTIONS(936), + [anon_sym_struct] = ACTIONS(936), + [anon_sym_union] = ACTIONS(936), + [anon_sym_if] = ACTIONS(936), + [anon_sym_else] = ACTIONS(936), + [anon_sym_switch] = ACTIONS(936), + [anon_sym_case] = ACTIONS(936), + [anon_sym_default] = ACTIONS(936), + [anon_sym_while] = ACTIONS(936), + [anon_sym_do] = ACTIONS(936), + [anon_sym_for] = ACTIONS(936), + [anon_sym_return] = ACTIONS(936), + [anon_sym_break] = ACTIONS(936), + [anon_sym_continue] = ACTIONS(936), + [anon_sym_goto] = ACTIONS(936), + [anon_sym_DASH_DASH] = ACTIONS(938), + [anon_sym_PLUS_PLUS] = ACTIONS(938), + [anon_sym_sizeof] = ACTIONS(936), + [sym_number_literal] = ACTIONS(938), + [anon_sym_L_SQUOTE] = ACTIONS(938), + [anon_sym_u_SQUOTE] = ACTIONS(938), + [anon_sym_U_SQUOTE] = ACTIONS(938), + [anon_sym_u8_SQUOTE] = ACTIONS(938), + [anon_sym_SQUOTE] = ACTIONS(938), + [anon_sym_L_DQUOTE] = ACTIONS(938), + [anon_sym_u_DQUOTE] = ACTIONS(938), + [anon_sym_U_DQUOTE] = ACTIONS(938), + [anon_sym_u8_DQUOTE] = ACTIONS(938), + [anon_sym_DQUOTE] = ACTIONS(938), + [sym_true] = ACTIONS(936), + [sym_false] = ACTIONS(936), + [sym_null] = ACTIONS(936), + [sym_comment] = ACTIONS(3), + }, + [144] = { + [sym_attribute_declaration] = STATE(153), + [sym_compound_statement] = STATE(191), + [sym_attributed_statement] = STATE(191), + [sym_labeled_statement] = STATE(191), + [sym_expression_statement] = STATE(191), + [sym_if_statement] = STATE(191), + [sym_switch_statement] = STATE(191), + [sym_case_statement] = STATE(191), + [sym_while_statement] = STATE(191), + [sym_do_statement] = STATE(191), + [sym_for_statement] = STATE(191), + [sym_return_statement] = STATE(191), + [sym_break_statement] = STATE(191), + [sym_continue_statement] = STATE(191), + [sym_goto_statement] = STATE(191), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [sym_identifier] = ACTIONS(1207), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [145] = { + [ts_builtin_sym_end] = ACTIONS(934), + [sym_identifier] = ACTIONS(932), + [aux_sym_preproc_include_token1] = ACTIONS(932), + [aux_sym_preproc_def_token1] = ACTIONS(932), + [aux_sym_preproc_if_token1] = ACTIONS(932), + [aux_sym_preproc_ifdef_token1] = ACTIONS(932), + [aux_sym_preproc_ifdef_token2] = ACTIONS(932), + [sym_preproc_directive] = ACTIONS(932), + [anon_sym_LPAREN2] = ACTIONS(934), + [anon_sym_BANG] = ACTIONS(934), + [anon_sym_TILDE] = ACTIONS(934), + [anon_sym_DASH] = ACTIONS(932), + [anon_sym_PLUS] = ACTIONS(932), + [anon_sym_STAR] = ACTIONS(934), + [anon_sym_AMP] = ACTIONS(934), + [anon_sym_SEMI] = ACTIONS(934), + [anon_sym_typedef] = ACTIONS(932), + [anon_sym_extern] = ACTIONS(932), + [anon_sym___attribute__] = ACTIONS(932), + [anon_sym_LBRACK_LBRACK] = ACTIONS(934), + [anon_sym___declspec] = ACTIONS(932), + [anon_sym___cdecl] = ACTIONS(932), + [anon_sym___clrcall] = ACTIONS(932), + [anon_sym___stdcall] = ACTIONS(932), + [anon_sym___fastcall] = ACTIONS(932), + [anon_sym___thiscall] = ACTIONS(932), + [anon_sym___vectorcall] = ACTIONS(932), + [anon_sym_LBRACE] = ACTIONS(934), + [anon_sym_static] = ACTIONS(932), + [anon_sym_auto] = ACTIONS(932), + [anon_sym_register] = ACTIONS(932), + [anon_sym_inline] = ACTIONS(932), + [anon_sym_const] = ACTIONS(932), + [anon_sym_volatile] = ACTIONS(932), + [anon_sym_restrict] = ACTIONS(932), + [anon_sym__Atomic] = ACTIONS(932), + [anon_sym_signed] = ACTIONS(932), + [anon_sym_unsigned] = ACTIONS(932), + [anon_sym_long] = ACTIONS(932), + [anon_sym_short] = ACTIONS(932), + [sym_primitive_type] = ACTIONS(932), + [anon_sym_enum] = ACTIONS(932), + [anon_sym_struct] = ACTIONS(932), + [anon_sym_union] = ACTIONS(932), + [anon_sym_if] = ACTIONS(932), + [anon_sym_else] = ACTIONS(932), + [anon_sym_switch] = ACTIONS(932), + [anon_sym_case] = ACTIONS(932), + [anon_sym_default] = ACTIONS(932), + [anon_sym_while] = ACTIONS(932), + [anon_sym_do] = ACTIONS(932), + [anon_sym_for] = ACTIONS(932), + [anon_sym_return] = ACTIONS(932), + [anon_sym_break] = ACTIONS(932), + [anon_sym_continue] = ACTIONS(932), + [anon_sym_goto] = ACTIONS(932), + [anon_sym_DASH_DASH] = ACTIONS(934), + [anon_sym_PLUS_PLUS] = ACTIONS(934), + [anon_sym_sizeof] = ACTIONS(932), + [sym_number_literal] = ACTIONS(934), + [anon_sym_L_SQUOTE] = ACTIONS(934), + [anon_sym_u_SQUOTE] = ACTIONS(934), + [anon_sym_U_SQUOTE] = ACTIONS(934), + [anon_sym_u8_SQUOTE] = ACTIONS(934), + [anon_sym_SQUOTE] = ACTIONS(934), + [anon_sym_L_DQUOTE] = ACTIONS(934), + [anon_sym_u_DQUOTE] = ACTIONS(934), + [anon_sym_U_DQUOTE] = ACTIONS(934), + [anon_sym_u8_DQUOTE] = ACTIONS(934), + [anon_sym_DQUOTE] = ACTIONS(934), + [sym_true] = ACTIONS(932), + [sym_false] = ACTIONS(932), + [sym_null] = ACTIONS(932), + [sym_comment] = ACTIONS(3), + }, + [146] = { + [sym_identifier] = ACTIONS(1000), + [aux_sym_preproc_include_token1] = ACTIONS(1000), + [aux_sym_preproc_def_token1] = ACTIONS(1000), + [aux_sym_preproc_if_token1] = ACTIONS(1000), + [aux_sym_preproc_if_token2] = ACTIONS(1000), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1000), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1000), + [sym_preproc_directive] = ACTIONS(1000), + [anon_sym_LPAREN2] = ACTIONS(1002), + [anon_sym_BANG] = ACTIONS(1002), + [anon_sym_TILDE] = ACTIONS(1002), + [anon_sym_DASH] = ACTIONS(1000), + [anon_sym_PLUS] = ACTIONS(1000), + [anon_sym_STAR] = ACTIONS(1002), + [anon_sym_AMP] = ACTIONS(1002), + [anon_sym_SEMI] = ACTIONS(1002), + [anon_sym_typedef] = ACTIONS(1000), + [anon_sym_extern] = ACTIONS(1000), + [anon_sym___attribute__] = ACTIONS(1000), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1002), + [anon_sym___declspec] = ACTIONS(1000), + [anon_sym___cdecl] = ACTIONS(1000), + [anon_sym___clrcall] = ACTIONS(1000), + [anon_sym___stdcall] = ACTIONS(1000), + [anon_sym___fastcall] = ACTIONS(1000), + [anon_sym___thiscall] = ACTIONS(1000), + [anon_sym___vectorcall] = ACTIONS(1000), + [anon_sym_LBRACE] = ACTIONS(1002), + [anon_sym_static] = ACTIONS(1000), + [anon_sym_auto] = ACTIONS(1000), + [anon_sym_register] = ACTIONS(1000), + [anon_sym_inline] = ACTIONS(1000), + [anon_sym_const] = ACTIONS(1000), + [anon_sym_volatile] = ACTIONS(1000), + [anon_sym_restrict] = ACTIONS(1000), + [anon_sym__Atomic] = ACTIONS(1000), + [anon_sym_signed] = ACTIONS(1000), + [anon_sym_unsigned] = ACTIONS(1000), + [anon_sym_long] = ACTIONS(1000), + [anon_sym_short] = ACTIONS(1000), + [sym_primitive_type] = ACTIONS(1000), + [anon_sym_enum] = ACTIONS(1000), + [anon_sym_struct] = ACTIONS(1000), + [anon_sym_union] = ACTIONS(1000), + [anon_sym_if] = ACTIONS(1000), + [anon_sym_else] = ACTIONS(1000), + [anon_sym_switch] = ACTIONS(1000), + [anon_sym_case] = ACTIONS(1000), + [anon_sym_default] = ACTIONS(1000), + [anon_sym_while] = ACTIONS(1000), + [anon_sym_do] = ACTIONS(1000), + [anon_sym_for] = ACTIONS(1000), + [anon_sym_return] = ACTIONS(1000), + [anon_sym_break] = ACTIONS(1000), + [anon_sym_continue] = ACTIONS(1000), + [anon_sym_goto] = ACTIONS(1000), + [anon_sym_DASH_DASH] = ACTIONS(1002), + [anon_sym_PLUS_PLUS] = ACTIONS(1002), + [anon_sym_sizeof] = ACTIONS(1000), + [sym_number_literal] = ACTIONS(1002), + [anon_sym_L_SQUOTE] = ACTIONS(1002), + [anon_sym_u_SQUOTE] = ACTIONS(1002), + [anon_sym_U_SQUOTE] = ACTIONS(1002), + [anon_sym_u8_SQUOTE] = ACTIONS(1002), + [anon_sym_SQUOTE] = ACTIONS(1002), + [anon_sym_L_DQUOTE] = ACTIONS(1002), + [anon_sym_u_DQUOTE] = ACTIONS(1002), + [anon_sym_U_DQUOTE] = ACTIONS(1002), + [anon_sym_u8_DQUOTE] = ACTIONS(1002), + [anon_sym_DQUOTE] = ACTIONS(1002), + [sym_true] = ACTIONS(1000), + [sym_false] = ACTIONS(1000), + [sym_null] = ACTIONS(1000), + [sym_comment] = ACTIONS(3), + }, + [147] = { + [sym_identifier] = ACTIONS(1012), + [aux_sym_preproc_include_token1] = ACTIONS(1012), + [aux_sym_preproc_def_token1] = ACTIONS(1012), + [aux_sym_preproc_if_token1] = ACTIONS(1012), + [aux_sym_preproc_if_token2] = ACTIONS(1012), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1012), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1012), + [sym_preproc_directive] = ACTIONS(1012), + [anon_sym_LPAREN2] = ACTIONS(1014), + [anon_sym_BANG] = ACTIONS(1014), + [anon_sym_TILDE] = ACTIONS(1014), + [anon_sym_DASH] = ACTIONS(1012), + [anon_sym_PLUS] = ACTIONS(1012), + [anon_sym_STAR] = ACTIONS(1014), + [anon_sym_AMP] = ACTIONS(1014), + [anon_sym_SEMI] = ACTIONS(1014), + [anon_sym_typedef] = ACTIONS(1012), + [anon_sym_extern] = ACTIONS(1012), + [anon_sym___attribute__] = ACTIONS(1012), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1014), + [anon_sym___declspec] = ACTIONS(1012), + [anon_sym___cdecl] = ACTIONS(1012), + [anon_sym___clrcall] = ACTIONS(1012), + [anon_sym___stdcall] = ACTIONS(1012), + [anon_sym___fastcall] = ACTIONS(1012), + [anon_sym___thiscall] = ACTIONS(1012), + [anon_sym___vectorcall] = ACTIONS(1012), + [anon_sym_LBRACE] = ACTIONS(1014), + [anon_sym_static] = ACTIONS(1012), + [anon_sym_auto] = ACTIONS(1012), + [anon_sym_register] = ACTIONS(1012), + [anon_sym_inline] = ACTIONS(1012), + [anon_sym_const] = ACTIONS(1012), + [anon_sym_volatile] = ACTIONS(1012), + [anon_sym_restrict] = ACTIONS(1012), + [anon_sym__Atomic] = ACTIONS(1012), + [anon_sym_signed] = ACTIONS(1012), + [anon_sym_unsigned] = ACTIONS(1012), + [anon_sym_long] = ACTIONS(1012), + [anon_sym_short] = ACTIONS(1012), + [sym_primitive_type] = ACTIONS(1012), + [anon_sym_enum] = ACTIONS(1012), + [anon_sym_struct] = ACTIONS(1012), + [anon_sym_union] = ACTIONS(1012), + [anon_sym_if] = ACTIONS(1012), + [anon_sym_else] = ACTIONS(1012), + [anon_sym_switch] = ACTIONS(1012), + [anon_sym_case] = ACTIONS(1012), + [anon_sym_default] = ACTIONS(1012), + [anon_sym_while] = ACTIONS(1012), + [anon_sym_do] = ACTIONS(1012), + [anon_sym_for] = ACTIONS(1012), + [anon_sym_return] = ACTIONS(1012), + [anon_sym_break] = ACTIONS(1012), + [anon_sym_continue] = ACTIONS(1012), + [anon_sym_goto] = ACTIONS(1012), + [anon_sym_DASH_DASH] = ACTIONS(1014), + [anon_sym_PLUS_PLUS] = ACTIONS(1014), + [anon_sym_sizeof] = ACTIONS(1012), + [sym_number_literal] = ACTIONS(1014), + [anon_sym_L_SQUOTE] = ACTIONS(1014), + [anon_sym_u_SQUOTE] = ACTIONS(1014), + [anon_sym_U_SQUOTE] = ACTIONS(1014), + [anon_sym_u8_SQUOTE] = ACTIONS(1014), + [anon_sym_SQUOTE] = ACTIONS(1014), + [anon_sym_L_DQUOTE] = ACTIONS(1014), + [anon_sym_u_DQUOTE] = ACTIONS(1014), + [anon_sym_U_DQUOTE] = ACTIONS(1014), + [anon_sym_u8_DQUOTE] = ACTIONS(1014), + [anon_sym_DQUOTE] = ACTIONS(1014), + [sym_true] = ACTIONS(1012), + [sym_false] = ACTIONS(1012), + [sym_null] = ACTIONS(1012), + [sym_comment] = ACTIONS(3), + }, + [148] = { + [sym_identifier] = ACTIONS(1020), + [aux_sym_preproc_include_token1] = ACTIONS(1020), + [aux_sym_preproc_def_token1] = ACTIONS(1020), + [aux_sym_preproc_if_token1] = ACTIONS(1020), + [aux_sym_preproc_if_token2] = ACTIONS(1020), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1020), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1020), + [sym_preproc_directive] = ACTIONS(1020), + [anon_sym_LPAREN2] = ACTIONS(1022), + [anon_sym_BANG] = ACTIONS(1022), + [anon_sym_TILDE] = ACTIONS(1022), + [anon_sym_DASH] = ACTIONS(1020), + [anon_sym_PLUS] = ACTIONS(1020), + [anon_sym_STAR] = ACTIONS(1022), + [anon_sym_AMP] = ACTIONS(1022), + [anon_sym_SEMI] = ACTIONS(1022), + [anon_sym_typedef] = ACTIONS(1020), + [anon_sym_extern] = ACTIONS(1020), + [anon_sym___attribute__] = ACTIONS(1020), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1022), + [anon_sym___declspec] = ACTIONS(1020), + [anon_sym___cdecl] = ACTIONS(1020), + [anon_sym___clrcall] = ACTIONS(1020), + [anon_sym___stdcall] = ACTIONS(1020), + [anon_sym___fastcall] = ACTIONS(1020), + [anon_sym___thiscall] = ACTIONS(1020), + [anon_sym___vectorcall] = ACTIONS(1020), + [anon_sym_LBRACE] = ACTIONS(1022), + [anon_sym_static] = ACTIONS(1020), + [anon_sym_auto] = ACTIONS(1020), + [anon_sym_register] = ACTIONS(1020), + [anon_sym_inline] = ACTIONS(1020), + [anon_sym_const] = ACTIONS(1020), + [anon_sym_volatile] = ACTIONS(1020), + [anon_sym_restrict] = ACTIONS(1020), + [anon_sym__Atomic] = ACTIONS(1020), + [anon_sym_signed] = ACTIONS(1020), + [anon_sym_unsigned] = ACTIONS(1020), + [anon_sym_long] = ACTIONS(1020), + [anon_sym_short] = ACTIONS(1020), + [sym_primitive_type] = ACTIONS(1020), + [anon_sym_enum] = ACTIONS(1020), + [anon_sym_struct] = ACTIONS(1020), + [anon_sym_union] = ACTIONS(1020), + [anon_sym_if] = ACTIONS(1020), + [anon_sym_else] = ACTIONS(1020), + [anon_sym_switch] = ACTIONS(1020), + [anon_sym_case] = ACTIONS(1020), + [anon_sym_default] = ACTIONS(1020), + [anon_sym_while] = ACTIONS(1020), + [anon_sym_do] = ACTIONS(1020), + [anon_sym_for] = ACTIONS(1020), + [anon_sym_return] = ACTIONS(1020), + [anon_sym_break] = ACTIONS(1020), + [anon_sym_continue] = ACTIONS(1020), + [anon_sym_goto] = ACTIONS(1020), + [anon_sym_DASH_DASH] = ACTIONS(1022), + [anon_sym_PLUS_PLUS] = ACTIONS(1022), + [anon_sym_sizeof] = ACTIONS(1020), + [sym_number_literal] = ACTIONS(1022), + [anon_sym_L_SQUOTE] = ACTIONS(1022), + [anon_sym_u_SQUOTE] = ACTIONS(1022), + [anon_sym_U_SQUOTE] = ACTIONS(1022), + [anon_sym_u8_SQUOTE] = ACTIONS(1022), + [anon_sym_SQUOTE] = ACTIONS(1022), + [anon_sym_L_DQUOTE] = ACTIONS(1022), + [anon_sym_u_DQUOTE] = ACTIONS(1022), + [anon_sym_U_DQUOTE] = ACTIONS(1022), + [anon_sym_u8_DQUOTE] = ACTIONS(1022), + [anon_sym_DQUOTE] = ACTIONS(1022), + [sym_true] = ACTIONS(1020), + [sym_false] = ACTIONS(1020), + [sym_null] = ACTIONS(1020), + [sym_comment] = ACTIONS(3), + }, + [149] = { + [sym_attribute_declaration] = STATE(153), + [sym_compound_statement] = STATE(130), + [sym_attributed_statement] = STATE(130), + [sym_labeled_statement] = STATE(130), + [sym_expression_statement] = STATE(130), + [sym_if_statement] = STATE(130), + [sym_switch_statement] = STATE(130), + [sym_case_statement] = STATE(130), + [sym_while_statement] = STATE(130), + [sym_do_statement] = STATE(130), + [sym_for_statement] = STATE(130), + [sym_return_statement] = STATE(130), + [sym_break_statement] = STATE(130), + [sym_continue_statement] = STATE(130), + [sym_goto_statement] = STATE(130), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [sym_identifier] = ACTIONS(1207), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [150] = { + [sym_identifier] = ACTIONS(928), + [aux_sym_preproc_include_token1] = ACTIONS(928), + [aux_sym_preproc_def_token1] = ACTIONS(928), + [aux_sym_preproc_if_token1] = ACTIONS(928), + [aux_sym_preproc_if_token2] = ACTIONS(928), + [aux_sym_preproc_ifdef_token1] = ACTIONS(928), + [aux_sym_preproc_ifdef_token2] = ACTIONS(928), + [sym_preproc_directive] = ACTIONS(928), + [anon_sym_LPAREN2] = ACTIONS(930), + [anon_sym_BANG] = ACTIONS(930), + [anon_sym_TILDE] = ACTIONS(930), + [anon_sym_DASH] = ACTIONS(928), + [anon_sym_PLUS] = ACTIONS(928), + [anon_sym_STAR] = ACTIONS(930), + [anon_sym_AMP] = ACTIONS(930), + [anon_sym_SEMI] = ACTIONS(930), + [anon_sym_typedef] = ACTIONS(928), + [anon_sym_extern] = ACTIONS(928), + [anon_sym___attribute__] = ACTIONS(928), + [anon_sym_LBRACK_LBRACK] = ACTIONS(930), + [anon_sym___declspec] = ACTIONS(928), + [anon_sym___cdecl] = ACTIONS(928), + [anon_sym___clrcall] = ACTIONS(928), + [anon_sym___stdcall] = ACTIONS(928), + [anon_sym___fastcall] = ACTIONS(928), + [anon_sym___thiscall] = ACTIONS(928), + [anon_sym___vectorcall] = ACTIONS(928), + [anon_sym_LBRACE] = ACTIONS(930), + [anon_sym_static] = ACTIONS(928), + [anon_sym_auto] = ACTIONS(928), + [anon_sym_register] = ACTIONS(928), + [anon_sym_inline] = ACTIONS(928), + [anon_sym_const] = ACTIONS(928), + [anon_sym_volatile] = ACTIONS(928), + [anon_sym_restrict] = ACTIONS(928), + [anon_sym__Atomic] = ACTIONS(928), + [anon_sym_signed] = ACTIONS(928), + [anon_sym_unsigned] = ACTIONS(928), + [anon_sym_long] = ACTIONS(928), + [anon_sym_short] = ACTIONS(928), + [sym_primitive_type] = ACTIONS(928), + [anon_sym_enum] = ACTIONS(928), + [anon_sym_struct] = ACTIONS(928), + [anon_sym_union] = ACTIONS(928), + [anon_sym_if] = ACTIONS(928), + [anon_sym_else] = ACTIONS(928), + [anon_sym_switch] = ACTIONS(928), + [anon_sym_case] = ACTIONS(928), + [anon_sym_default] = ACTIONS(928), + [anon_sym_while] = ACTIONS(928), + [anon_sym_do] = ACTIONS(928), + [anon_sym_for] = ACTIONS(928), + [anon_sym_return] = ACTIONS(928), + [anon_sym_break] = ACTIONS(928), + [anon_sym_continue] = ACTIONS(928), + [anon_sym_goto] = ACTIONS(928), + [anon_sym_DASH_DASH] = ACTIONS(930), + [anon_sym_PLUS_PLUS] = ACTIONS(930), + [anon_sym_sizeof] = ACTIONS(928), + [sym_number_literal] = ACTIONS(930), + [anon_sym_L_SQUOTE] = ACTIONS(930), + [anon_sym_u_SQUOTE] = ACTIONS(930), + [anon_sym_U_SQUOTE] = ACTIONS(930), + [anon_sym_u8_SQUOTE] = ACTIONS(930), + [anon_sym_SQUOTE] = ACTIONS(930), + [anon_sym_L_DQUOTE] = ACTIONS(930), + [anon_sym_u_DQUOTE] = ACTIONS(930), + [anon_sym_U_DQUOTE] = ACTIONS(930), + [anon_sym_u8_DQUOTE] = ACTIONS(930), + [anon_sym_DQUOTE] = ACTIONS(930), + [sym_true] = ACTIONS(928), + [sym_false] = ACTIONS(928), + [sym_null] = ACTIONS(928), + [sym_comment] = ACTIONS(3), + }, + [151] = { + [sym_attribute_declaration] = STATE(153), + [sym_compound_statement] = STATE(134), + [sym_attributed_statement] = STATE(134), + [sym_labeled_statement] = STATE(134), + [sym_expression_statement] = STATE(134), + [sym_if_statement] = STATE(134), + [sym_switch_statement] = STATE(134), + [sym_case_statement] = STATE(134), + [sym_while_statement] = STATE(134), + [sym_do_statement] = STATE(134), + [sym_for_statement] = STATE(134), + [sym_return_statement] = STATE(134), + [sym_break_statement] = STATE(134), + [sym_continue_statement] = STATE(134), + [sym_goto_statement] = STATE(134), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [sym_identifier] = ACTIONS(1207), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [152] = { + [sym_identifier] = ACTIONS(1024), + [aux_sym_preproc_include_token1] = ACTIONS(1024), + [aux_sym_preproc_def_token1] = ACTIONS(1024), + [aux_sym_preproc_if_token1] = ACTIONS(1024), + [aux_sym_preproc_if_token2] = ACTIONS(1024), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1024), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1024), + [sym_preproc_directive] = ACTIONS(1024), + [anon_sym_LPAREN2] = ACTIONS(1026), + [anon_sym_BANG] = ACTIONS(1026), + [anon_sym_TILDE] = ACTIONS(1026), + [anon_sym_DASH] = ACTIONS(1024), + [anon_sym_PLUS] = ACTIONS(1024), + [anon_sym_STAR] = ACTIONS(1026), + [anon_sym_AMP] = ACTIONS(1026), + [anon_sym_SEMI] = ACTIONS(1026), + [anon_sym_typedef] = ACTIONS(1024), + [anon_sym_extern] = ACTIONS(1024), + [anon_sym___attribute__] = ACTIONS(1024), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1026), + [anon_sym___declspec] = ACTIONS(1024), + [anon_sym___cdecl] = ACTIONS(1024), + [anon_sym___clrcall] = ACTIONS(1024), + [anon_sym___stdcall] = ACTIONS(1024), + [anon_sym___fastcall] = ACTIONS(1024), + [anon_sym___thiscall] = ACTIONS(1024), + [anon_sym___vectorcall] = ACTIONS(1024), + [anon_sym_LBRACE] = ACTIONS(1026), + [anon_sym_static] = ACTIONS(1024), + [anon_sym_auto] = ACTIONS(1024), + [anon_sym_register] = ACTIONS(1024), + [anon_sym_inline] = ACTIONS(1024), + [anon_sym_const] = ACTIONS(1024), + [anon_sym_volatile] = ACTIONS(1024), + [anon_sym_restrict] = ACTIONS(1024), + [anon_sym__Atomic] = ACTIONS(1024), + [anon_sym_signed] = ACTIONS(1024), + [anon_sym_unsigned] = ACTIONS(1024), + [anon_sym_long] = ACTIONS(1024), + [anon_sym_short] = ACTIONS(1024), + [sym_primitive_type] = ACTIONS(1024), + [anon_sym_enum] = ACTIONS(1024), + [anon_sym_struct] = ACTIONS(1024), + [anon_sym_union] = ACTIONS(1024), + [anon_sym_if] = ACTIONS(1024), + [anon_sym_else] = ACTIONS(1024), + [anon_sym_switch] = ACTIONS(1024), + [anon_sym_case] = ACTIONS(1024), + [anon_sym_default] = ACTIONS(1024), + [anon_sym_while] = ACTIONS(1024), + [anon_sym_do] = ACTIONS(1024), + [anon_sym_for] = ACTIONS(1024), + [anon_sym_return] = ACTIONS(1024), + [anon_sym_break] = ACTIONS(1024), + [anon_sym_continue] = ACTIONS(1024), + [anon_sym_goto] = ACTIONS(1024), + [anon_sym_DASH_DASH] = ACTIONS(1026), + [anon_sym_PLUS_PLUS] = ACTIONS(1026), + [anon_sym_sizeof] = ACTIONS(1024), + [sym_number_literal] = ACTIONS(1026), + [anon_sym_L_SQUOTE] = ACTIONS(1026), + [anon_sym_u_SQUOTE] = ACTIONS(1026), + [anon_sym_U_SQUOTE] = ACTIONS(1026), + [anon_sym_u8_SQUOTE] = ACTIONS(1026), + [anon_sym_SQUOTE] = ACTIONS(1026), + [anon_sym_L_DQUOTE] = ACTIONS(1026), + [anon_sym_u_DQUOTE] = ACTIONS(1026), + [anon_sym_U_DQUOTE] = ACTIONS(1026), + [anon_sym_u8_DQUOTE] = ACTIONS(1026), + [anon_sym_DQUOTE] = ACTIONS(1026), + [sym_true] = ACTIONS(1024), + [sym_false] = ACTIONS(1024), + [sym_null] = ACTIONS(1024), + [sym_comment] = ACTIONS(3), + }, + [153] = { + [sym_attribute_declaration] = STATE(140), + [sym_compound_statement] = STATE(141), + [sym_attributed_statement] = STATE(141), + [sym_labeled_statement] = STATE(141), + [sym_expression_statement] = STATE(141), + [sym_if_statement] = STATE(141), + [sym_switch_statement] = STATE(141), + [sym_case_statement] = STATE(141), + [sym_while_statement] = STATE(141), + [sym_do_statement] = STATE(141), + [sym_for_statement] = STATE(141), + [sym_return_statement] = STATE(141), + [sym_break_statement] = STATE(141), + [sym_continue_statement] = STATE(141), + [sym_goto_statement] = STATE(141), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(140), + [sym_identifier] = ACTIONS(1207), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [154] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(177), + [sym_attributed_statement] = STATE(177), + [sym_labeled_statement] = STATE(177), + [sym_expression_statement] = STATE(177), + [sym_if_statement] = STATE(177), + [sym_switch_statement] = STATE(177), + [sym_case_statement] = STATE(177), + [sym_while_statement] = STATE(177), + [sym_do_statement] = STATE(177), + [sym_for_statement] = STATE(177), + [sym_return_statement] = STATE(177), + [sym_break_statement] = STATE(177), + [sym_continue_statement] = STATE(177), + [sym_goto_statement] = STATE(177), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [155] = { + [sym_identifier] = ACTIONS(964), + [aux_sym_preproc_include_token1] = ACTIONS(964), + [aux_sym_preproc_def_token1] = ACTIONS(964), + [aux_sym_preproc_if_token1] = ACTIONS(964), + [aux_sym_preproc_if_token2] = ACTIONS(964), + [aux_sym_preproc_ifdef_token1] = ACTIONS(964), + [aux_sym_preproc_ifdef_token2] = ACTIONS(964), + [sym_preproc_directive] = ACTIONS(964), + [anon_sym_LPAREN2] = ACTIONS(966), + [anon_sym_BANG] = ACTIONS(966), + [anon_sym_TILDE] = ACTIONS(966), + [anon_sym_DASH] = ACTIONS(964), + [anon_sym_PLUS] = ACTIONS(964), + [anon_sym_STAR] = ACTIONS(966), + [anon_sym_AMP] = ACTIONS(966), + [anon_sym_SEMI] = ACTIONS(966), + [anon_sym_typedef] = ACTIONS(964), + [anon_sym_extern] = ACTIONS(964), + [anon_sym___attribute__] = ACTIONS(964), + [anon_sym_LBRACK_LBRACK] = ACTIONS(966), + [anon_sym___declspec] = ACTIONS(964), + [anon_sym___cdecl] = ACTIONS(964), + [anon_sym___clrcall] = ACTIONS(964), + [anon_sym___stdcall] = ACTIONS(964), + [anon_sym___fastcall] = ACTIONS(964), + [anon_sym___thiscall] = ACTIONS(964), + [anon_sym___vectorcall] = ACTIONS(964), + [anon_sym_LBRACE] = ACTIONS(966), + [anon_sym_static] = ACTIONS(964), + [anon_sym_auto] = ACTIONS(964), + [anon_sym_register] = ACTIONS(964), + [anon_sym_inline] = ACTIONS(964), + [anon_sym_const] = ACTIONS(964), + [anon_sym_volatile] = ACTIONS(964), + [anon_sym_restrict] = ACTIONS(964), + [anon_sym__Atomic] = ACTIONS(964), + [anon_sym_signed] = ACTIONS(964), + [anon_sym_unsigned] = ACTIONS(964), + [anon_sym_long] = ACTIONS(964), + [anon_sym_short] = ACTIONS(964), + [sym_primitive_type] = ACTIONS(964), + [anon_sym_enum] = ACTIONS(964), + [anon_sym_struct] = ACTIONS(964), + [anon_sym_union] = ACTIONS(964), + [anon_sym_if] = ACTIONS(964), + [anon_sym_else] = ACTIONS(964), + [anon_sym_switch] = ACTIONS(964), + [anon_sym_case] = ACTIONS(964), + [anon_sym_default] = ACTIONS(964), + [anon_sym_while] = ACTIONS(964), + [anon_sym_do] = ACTIONS(964), + [anon_sym_for] = ACTIONS(964), + [anon_sym_return] = ACTIONS(964), + [anon_sym_break] = ACTIONS(964), + [anon_sym_continue] = ACTIONS(964), + [anon_sym_goto] = ACTIONS(964), + [anon_sym_DASH_DASH] = ACTIONS(966), + [anon_sym_PLUS_PLUS] = ACTIONS(966), + [anon_sym_sizeof] = ACTIONS(964), + [sym_number_literal] = ACTIONS(966), + [anon_sym_L_SQUOTE] = ACTIONS(966), + [anon_sym_u_SQUOTE] = ACTIONS(966), + [anon_sym_U_SQUOTE] = ACTIONS(966), + [anon_sym_u8_SQUOTE] = ACTIONS(966), + [anon_sym_SQUOTE] = ACTIONS(966), + [anon_sym_L_DQUOTE] = ACTIONS(966), + [anon_sym_u_DQUOTE] = ACTIONS(966), + [anon_sym_U_DQUOTE] = ACTIONS(966), + [anon_sym_u8_DQUOTE] = ACTIONS(966), + [anon_sym_DQUOTE] = ACTIONS(966), + [sym_true] = ACTIONS(964), + [sym_false] = ACTIONS(964), + [sym_null] = ACTIONS(964), + [sym_comment] = ACTIONS(3), + }, + [156] = { + [sym_identifier] = ACTIONS(898), + [aux_sym_preproc_include_token1] = ACTIONS(898), + [aux_sym_preproc_def_token1] = ACTIONS(898), + [aux_sym_preproc_if_token1] = ACTIONS(898), + [aux_sym_preproc_if_token2] = ACTIONS(898), + [aux_sym_preproc_ifdef_token1] = ACTIONS(898), + [aux_sym_preproc_ifdef_token2] = ACTIONS(898), + [sym_preproc_directive] = ACTIONS(898), + [anon_sym_LPAREN2] = ACTIONS(900), + [anon_sym_BANG] = ACTIONS(900), + [anon_sym_TILDE] = ACTIONS(900), + [anon_sym_DASH] = ACTIONS(898), + [anon_sym_PLUS] = ACTIONS(898), + [anon_sym_STAR] = ACTIONS(900), + [anon_sym_AMP] = ACTIONS(900), + [anon_sym_SEMI] = ACTIONS(900), + [anon_sym_typedef] = ACTIONS(898), + [anon_sym_extern] = ACTIONS(898), + [anon_sym___attribute__] = ACTIONS(898), + [anon_sym_LBRACK_LBRACK] = ACTIONS(900), + [anon_sym___declspec] = ACTIONS(898), + [anon_sym___cdecl] = ACTIONS(898), + [anon_sym___clrcall] = ACTIONS(898), + [anon_sym___stdcall] = ACTIONS(898), + [anon_sym___fastcall] = ACTIONS(898), + [anon_sym___thiscall] = ACTIONS(898), + [anon_sym___vectorcall] = ACTIONS(898), + [anon_sym_LBRACE] = ACTIONS(900), + [anon_sym_static] = ACTIONS(898), + [anon_sym_auto] = ACTIONS(898), + [anon_sym_register] = ACTIONS(898), + [anon_sym_inline] = ACTIONS(898), + [anon_sym_const] = ACTIONS(898), + [anon_sym_volatile] = ACTIONS(898), + [anon_sym_restrict] = ACTIONS(898), + [anon_sym__Atomic] = ACTIONS(898), + [anon_sym_signed] = ACTIONS(898), + [anon_sym_unsigned] = ACTIONS(898), + [anon_sym_long] = ACTIONS(898), + [anon_sym_short] = ACTIONS(898), + [sym_primitive_type] = ACTIONS(898), + [anon_sym_enum] = ACTIONS(898), + [anon_sym_struct] = ACTIONS(898), + [anon_sym_union] = ACTIONS(898), + [anon_sym_if] = ACTIONS(898), + [anon_sym_else] = ACTIONS(898), + [anon_sym_switch] = ACTIONS(898), + [anon_sym_case] = ACTIONS(898), + [anon_sym_default] = ACTIONS(898), + [anon_sym_while] = ACTIONS(898), + [anon_sym_do] = ACTIONS(898), + [anon_sym_for] = ACTIONS(898), + [anon_sym_return] = ACTIONS(898), + [anon_sym_break] = ACTIONS(898), + [anon_sym_continue] = ACTIONS(898), + [anon_sym_goto] = ACTIONS(898), + [anon_sym_DASH_DASH] = ACTIONS(900), + [anon_sym_PLUS_PLUS] = ACTIONS(900), + [anon_sym_sizeof] = ACTIONS(898), + [sym_number_literal] = ACTIONS(900), + [anon_sym_L_SQUOTE] = ACTIONS(900), + [anon_sym_u_SQUOTE] = ACTIONS(900), + [anon_sym_U_SQUOTE] = ACTIONS(900), + [anon_sym_u8_SQUOTE] = ACTIONS(900), + [anon_sym_SQUOTE] = ACTIONS(900), + [anon_sym_L_DQUOTE] = ACTIONS(900), + [anon_sym_u_DQUOTE] = ACTIONS(900), + [anon_sym_U_DQUOTE] = ACTIONS(900), + [anon_sym_u8_DQUOTE] = ACTIONS(900), + [anon_sym_DQUOTE] = ACTIONS(900), + [sym_true] = ACTIONS(898), + [sym_false] = ACTIONS(898), + [sym_null] = ACTIONS(898), + [sym_comment] = ACTIONS(3), + }, + [157] = { + [sym_attribute_declaration] = STATE(247), + [sym_compound_statement] = STATE(99), + [sym_attributed_statement] = STATE(99), + [sym_labeled_statement] = STATE(99), + [sym_expression_statement] = STATE(99), + [sym_if_statement] = STATE(99), + [sym_switch_statement] = STATE(99), + [sym_case_statement] = STATE(99), + [sym_while_statement] = STATE(99), + [sym_do_statement] = STATE(99), + [sym_for_statement] = STATE(99), + [sym_return_statement] = STATE(99), + [sym_break_statement] = STATE(99), + [sym_continue_statement] = STATE(99), + [sym_goto_statement] = STATE(99), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [sym_identifier] = ACTIONS(1209), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [158] = { + [ts_builtin_sym_end] = ACTIONS(966), + [sym_identifier] = ACTIONS(964), + [aux_sym_preproc_include_token1] = ACTIONS(964), + [aux_sym_preproc_def_token1] = ACTIONS(964), + [aux_sym_preproc_if_token1] = ACTIONS(964), + [aux_sym_preproc_ifdef_token1] = ACTIONS(964), + [aux_sym_preproc_ifdef_token2] = ACTIONS(964), + [sym_preproc_directive] = ACTIONS(964), + [anon_sym_LPAREN2] = ACTIONS(966), + [anon_sym_BANG] = ACTIONS(966), + [anon_sym_TILDE] = ACTIONS(966), + [anon_sym_DASH] = ACTIONS(964), + [anon_sym_PLUS] = ACTIONS(964), + [anon_sym_STAR] = ACTIONS(966), + [anon_sym_AMP] = ACTIONS(966), + [anon_sym_SEMI] = ACTIONS(966), + [anon_sym_typedef] = ACTIONS(964), + [anon_sym_extern] = ACTIONS(964), + [anon_sym___attribute__] = ACTIONS(964), + [anon_sym_LBRACK_LBRACK] = ACTIONS(966), + [anon_sym___declspec] = ACTIONS(964), + [anon_sym___cdecl] = ACTIONS(964), + [anon_sym___clrcall] = ACTIONS(964), + [anon_sym___stdcall] = ACTIONS(964), + [anon_sym___fastcall] = ACTIONS(964), + [anon_sym___thiscall] = ACTIONS(964), + [anon_sym___vectorcall] = ACTIONS(964), + [anon_sym_LBRACE] = ACTIONS(966), + [anon_sym_static] = ACTIONS(964), + [anon_sym_auto] = ACTIONS(964), + [anon_sym_register] = ACTIONS(964), + [anon_sym_inline] = ACTIONS(964), + [anon_sym_const] = ACTIONS(964), + [anon_sym_volatile] = ACTIONS(964), + [anon_sym_restrict] = ACTIONS(964), + [anon_sym__Atomic] = ACTIONS(964), + [anon_sym_signed] = ACTIONS(964), + [anon_sym_unsigned] = ACTIONS(964), + [anon_sym_long] = ACTIONS(964), + [anon_sym_short] = ACTIONS(964), + [sym_primitive_type] = ACTIONS(964), + [anon_sym_enum] = ACTIONS(964), + [anon_sym_struct] = ACTIONS(964), + [anon_sym_union] = ACTIONS(964), + [anon_sym_if] = ACTIONS(964), + [anon_sym_else] = ACTIONS(964), + [anon_sym_switch] = ACTIONS(964), + [anon_sym_case] = ACTIONS(964), + [anon_sym_default] = ACTIONS(964), + [anon_sym_while] = ACTIONS(964), + [anon_sym_do] = ACTIONS(964), + [anon_sym_for] = ACTIONS(964), + [anon_sym_return] = ACTIONS(964), + [anon_sym_break] = ACTIONS(964), + [anon_sym_continue] = ACTIONS(964), + [anon_sym_goto] = ACTIONS(964), + [anon_sym_DASH_DASH] = ACTIONS(966), + [anon_sym_PLUS_PLUS] = ACTIONS(966), + [anon_sym_sizeof] = ACTIONS(964), + [sym_number_literal] = ACTIONS(966), + [anon_sym_L_SQUOTE] = ACTIONS(966), + [anon_sym_u_SQUOTE] = ACTIONS(966), + [anon_sym_U_SQUOTE] = ACTIONS(966), + [anon_sym_u8_SQUOTE] = ACTIONS(966), + [anon_sym_SQUOTE] = ACTIONS(966), + [anon_sym_L_DQUOTE] = ACTIONS(966), + [anon_sym_u_DQUOTE] = ACTIONS(966), + [anon_sym_U_DQUOTE] = ACTIONS(966), + [anon_sym_u8_DQUOTE] = ACTIONS(966), + [anon_sym_DQUOTE] = ACTIONS(966), + [sym_true] = ACTIONS(964), + [sym_false] = ACTIONS(964), + [sym_null] = ACTIONS(964), + [sym_comment] = ACTIONS(3), + }, + [159] = { + [ts_builtin_sym_end] = ACTIONS(986), + [sym_identifier] = ACTIONS(984), + [aux_sym_preproc_include_token1] = ACTIONS(984), + [aux_sym_preproc_def_token1] = ACTIONS(984), + [aux_sym_preproc_if_token1] = ACTIONS(984), + [aux_sym_preproc_ifdef_token1] = ACTIONS(984), + [aux_sym_preproc_ifdef_token2] = ACTIONS(984), + [sym_preproc_directive] = ACTIONS(984), + [anon_sym_LPAREN2] = ACTIONS(986), + [anon_sym_BANG] = ACTIONS(986), + [anon_sym_TILDE] = ACTIONS(986), + [anon_sym_DASH] = ACTIONS(984), + [anon_sym_PLUS] = ACTIONS(984), + [anon_sym_STAR] = ACTIONS(986), + [anon_sym_AMP] = ACTIONS(986), + [anon_sym_SEMI] = ACTIONS(986), + [anon_sym_typedef] = ACTIONS(984), + [anon_sym_extern] = ACTIONS(984), + [anon_sym___attribute__] = ACTIONS(984), + [anon_sym_LBRACK_LBRACK] = ACTIONS(986), + [anon_sym___declspec] = ACTIONS(984), + [anon_sym___cdecl] = ACTIONS(984), + [anon_sym___clrcall] = ACTIONS(984), + [anon_sym___stdcall] = ACTIONS(984), + [anon_sym___fastcall] = ACTIONS(984), + [anon_sym___thiscall] = ACTIONS(984), + [anon_sym___vectorcall] = ACTIONS(984), + [anon_sym_LBRACE] = ACTIONS(986), + [anon_sym_static] = ACTIONS(984), + [anon_sym_auto] = ACTIONS(984), + [anon_sym_register] = ACTIONS(984), + [anon_sym_inline] = ACTIONS(984), + [anon_sym_const] = ACTIONS(984), + [anon_sym_volatile] = ACTIONS(984), + [anon_sym_restrict] = ACTIONS(984), + [anon_sym__Atomic] = ACTIONS(984), + [anon_sym_signed] = ACTIONS(984), + [anon_sym_unsigned] = ACTIONS(984), + [anon_sym_long] = ACTIONS(984), + [anon_sym_short] = ACTIONS(984), + [sym_primitive_type] = ACTIONS(984), + [anon_sym_enum] = ACTIONS(984), + [anon_sym_struct] = ACTIONS(984), + [anon_sym_union] = ACTIONS(984), + [anon_sym_if] = ACTIONS(984), + [anon_sym_else] = ACTIONS(984), + [anon_sym_switch] = ACTIONS(984), + [anon_sym_case] = ACTIONS(984), + [anon_sym_default] = ACTIONS(984), + [anon_sym_while] = ACTIONS(984), + [anon_sym_do] = ACTIONS(984), + [anon_sym_for] = ACTIONS(984), + [anon_sym_return] = ACTIONS(984), + [anon_sym_break] = ACTIONS(984), + [anon_sym_continue] = ACTIONS(984), + [anon_sym_goto] = ACTIONS(984), + [anon_sym_DASH_DASH] = ACTIONS(986), + [anon_sym_PLUS_PLUS] = ACTIONS(986), + [anon_sym_sizeof] = ACTIONS(984), + [sym_number_literal] = ACTIONS(986), + [anon_sym_L_SQUOTE] = ACTIONS(986), + [anon_sym_u_SQUOTE] = ACTIONS(986), + [anon_sym_U_SQUOTE] = ACTIONS(986), + [anon_sym_u8_SQUOTE] = ACTIONS(986), + [anon_sym_SQUOTE] = ACTIONS(986), + [anon_sym_L_DQUOTE] = ACTIONS(986), + [anon_sym_u_DQUOTE] = ACTIONS(986), + [anon_sym_U_DQUOTE] = ACTIONS(986), + [anon_sym_u8_DQUOTE] = ACTIONS(986), + [anon_sym_DQUOTE] = ACTIONS(986), + [sym_true] = ACTIONS(984), + [sym_false] = ACTIONS(984), + [sym_null] = ACTIONS(984), + [sym_comment] = ACTIONS(3), + }, + [160] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(233), + [sym_attributed_statement] = STATE(233), + [sym_labeled_statement] = STATE(233), + [sym_expression_statement] = STATE(233), + [sym_if_statement] = STATE(233), + [sym_switch_statement] = STATE(233), + [sym_case_statement] = STATE(233), + [sym_while_statement] = STATE(233), + [sym_do_statement] = STATE(233), + [sym_for_statement] = STATE(233), + [sym_return_statement] = STATE(233), + [sym_break_statement] = STATE(233), + [sym_continue_statement] = STATE(233), + [sym_goto_statement] = STATE(233), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [161] = { + [sym_identifier] = ACTIONS(898), + [aux_sym_preproc_include_token1] = ACTIONS(898), + [aux_sym_preproc_def_token1] = ACTIONS(898), + [aux_sym_preproc_if_token1] = ACTIONS(898), + [aux_sym_preproc_if_token2] = ACTIONS(898), + [aux_sym_preproc_ifdef_token1] = ACTIONS(898), + [aux_sym_preproc_ifdef_token2] = ACTIONS(898), + [sym_preproc_directive] = ACTIONS(898), + [anon_sym_LPAREN2] = ACTIONS(900), + [anon_sym_BANG] = ACTIONS(900), + [anon_sym_TILDE] = ACTIONS(900), + [anon_sym_DASH] = ACTIONS(898), + [anon_sym_PLUS] = ACTIONS(898), + [anon_sym_STAR] = ACTIONS(900), + [anon_sym_AMP] = ACTIONS(900), + [anon_sym_SEMI] = ACTIONS(900), + [anon_sym_typedef] = ACTIONS(898), + [anon_sym_extern] = ACTIONS(898), + [anon_sym___attribute__] = ACTIONS(898), + [anon_sym_LBRACK_LBRACK] = ACTIONS(900), + [anon_sym___declspec] = ACTIONS(898), + [anon_sym___cdecl] = ACTIONS(898), + [anon_sym___clrcall] = ACTIONS(898), + [anon_sym___stdcall] = ACTIONS(898), + [anon_sym___fastcall] = ACTIONS(898), + [anon_sym___thiscall] = ACTIONS(898), + [anon_sym___vectorcall] = ACTIONS(898), + [anon_sym_LBRACE] = ACTIONS(900), + [anon_sym_static] = ACTIONS(898), + [anon_sym_auto] = ACTIONS(898), + [anon_sym_register] = ACTIONS(898), + [anon_sym_inline] = ACTIONS(898), + [anon_sym_const] = ACTIONS(898), + [anon_sym_volatile] = ACTIONS(898), + [anon_sym_restrict] = ACTIONS(898), + [anon_sym__Atomic] = ACTIONS(898), + [anon_sym_signed] = ACTIONS(898), + [anon_sym_unsigned] = ACTIONS(898), + [anon_sym_long] = ACTIONS(898), + [anon_sym_short] = ACTIONS(898), + [sym_primitive_type] = ACTIONS(898), + [anon_sym_enum] = ACTIONS(898), + [anon_sym_struct] = ACTIONS(898), + [anon_sym_union] = ACTIONS(898), + [anon_sym_if] = ACTIONS(898), + [anon_sym_else] = ACTIONS(898), + [anon_sym_switch] = ACTIONS(898), + [anon_sym_case] = ACTIONS(898), + [anon_sym_default] = ACTIONS(898), + [anon_sym_while] = ACTIONS(898), + [anon_sym_do] = ACTIONS(898), + [anon_sym_for] = ACTIONS(898), + [anon_sym_return] = ACTIONS(898), + [anon_sym_break] = ACTIONS(898), + [anon_sym_continue] = ACTIONS(898), + [anon_sym_goto] = ACTIONS(898), + [anon_sym_DASH_DASH] = ACTIONS(900), + [anon_sym_PLUS_PLUS] = ACTIONS(900), + [anon_sym_sizeof] = ACTIONS(898), + [sym_number_literal] = ACTIONS(900), + [anon_sym_L_SQUOTE] = ACTIONS(900), + [anon_sym_u_SQUOTE] = ACTIONS(900), + [anon_sym_U_SQUOTE] = ACTIONS(900), + [anon_sym_u8_SQUOTE] = ACTIONS(900), + [anon_sym_SQUOTE] = ACTIONS(900), + [anon_sym_L_DQUOTE] = ACTIONS(900), + [anon_sym_u_DQUOTE] = ACTIONS(900), + [anon_sym_U_DQUOTE] = ACTIONS(900), + [anon_sym_u8_DQUOTE] = ACTIONS(900), + [anon_sym_DQUOTE] = ACTIONS(900), + [sym_true] = ACTIONS(898), + [sym_false] = ACTIONS(898), + [sym_null] = ACTIONS(898), + [sym_comment] = ACTIONS(3), + }, + [162] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(1434), + [sym_attributed_statement] = STATE(1434), + [sym_labeled_statement] = STATE(1434), + [sym_expression_statement] = STATE(1434), + [sym_if_statement] = STATE(1434), + [sym_switch_statement] = STATE(1434), + [sym_case_statement] = STATE(1434), + [sym_while_statement] = STATE(1434), + [sym_do_statement] = STATE(1434), + [sym_for_statement] = STATE(1434), + [sym_return_statement] = STATE(1434), + [sym_break_statement] = STATE(1434), + [sym_continue_statement] = STATE(1434), + [sym_goto_statement] = STATE(1434), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [163] = { + [sym_attribute_declaration] = STATE(247), + [sym_compound_statement] = STATE(98), + [sym_attributed_statement] = STATE(98), + [sym_labeled_statement] = STATE(98), + [sym_expression_statement] = STATE(98), + [sym_if_statement] = STATE(98), + [sym_switch_statement] = STATE(98), + [sym_case_statement] = STATE(98), + [sym_while_statement] = STATE(98), + [sym_do_statement] = STATE(98), + [sym_for_statement] = STATE(98), + [sym_return_statement] = STATE(98), + [sym_break_statement] = STATE(98), + [sym_continue_statement] = STATE(98), + [sym_goto_statement] = STATE(98), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [sym_identifier] = ACTIONS(1209), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [164] = { + [sym_attribute_declaration] = STATE(247), + [sym_compound_statement] = STATE(96), + [sym_attributed_statement] = STATE(96), + [sym_labeled_statement] = STATE(96), + [sym_expression_statement] = STATE(96), + [sym_if_statement] = STATE(96), + [sym_switch_statement] = STATE(96), + [sym_case_statement] = STATE(96), + [sym_while_statement] = STATE(96), + [sym_do_statement] = STATE(96), + [sym_for_statement] = STATE(96), + [sym_return_statement] = STATE(96), + [sym_break_statement] = STATE(96), + [sym_continue_statement] = STATE(96), + [sym_goto_statement] = STATE(96), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [sym_identifier] = ACTIONS(1209), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [165] = { + [ts_builtin_sym_end] = ACTIONS(942), + [sym_identifier] = ACTIONS(940), + [aux_sym_preproc_include_token1] = ACTIONS(940), + [aux_sym_preproc_def_token1] = ACTIONS(940), + [aux_sym_preproc_if_token1] = ACTIONS(940), + [aux_sym_preproc_ifdef_token1] = ACTIONS(940), + [aux_sym_preproc_ifdef_token2] = ACTIONS(940), + [sym_preproc_directive] = ACTIONS(940), + [anon_sym_LPAREN2] = ACTIONS(942), + [anon_sym_BANG] = ACTIONS(942), + [anon_sym_TILDE] = ACTIONS(942), + [anon_sym_DASH] = ACTIONS(940), + [anon_sym_PLUS] = ACTIONS(940), + [anon_sym_STAR] = ACTIONS(942), + [anon_sym_AMP] = ACTIONS(942), + [anon_sym_SEMI] = ACTIONS(942), + [anon_sym_typedef] = ACTIONS(940), + [anon_sym_extern] = ACTIONS(940), + [anon_sym___attribute__] = ACTIONS(940), + [anon_sym_LBRACK_LBRACK] = ACTIONS(942), + [anon_sym___declspec] = ACTIONS(940), + [anon_sym___cdecl] = ACTIONS(940), + [anon_sym___clrcall] = ACTIONS(940), + [anon_sym___stdcall] = ACTIONS(940), + [anon_sym___fastcall] = ACTIONS(940), + [anon_sym___thiscall] = ACTIONS(940), + [anon_sym___vectorcall] = ACTIONS(940), + [anon_sym_LBRACE] = ACTIONS(942), + [anon_sym_static] = ACTIONS(940), + [anon_sym_auto] = ACTIONS(940), + [anon_sym_register] = ACTIONS(940), + [anon_sym_inline] = ACTIONS(940), + [anon_sym_const] = ACTIONS(940), + [anon_sym_volatile] = ACTIONS(940), + [anon_sym_restrict] = ACTIONS(940), + [anon_sym__Atomic] = ACTIONS(940), + [anon_sym_signed] = ACTIONS(940), + [anon_sym_unsigned] = ACTIONS(940), + [anon_sym_long] = ACTIONS(940), + [anon_sym_short] = ACTIONS(940), + [sym_primitive_type] = ACTIONS(940), + [anon_sym_enum] = ACTIONS(940), + [anon_sym_struct] = ACTIONS(940), + [anon_sym_union] = ACTIONS(940), + [anon_sym_if] = ACTIONS(940), + [anon_sym_else] = ACTIONS(940), + [anon_sym_switch] = ACTIONS(940), + [anon_sym_case] = ACTIONS(940), + [anon_sym_default] = ACTIONS(940), + [anon_sym_while] = ACTIONS(940), + [anon_sym_do] = ACTIONS(940), + [anon_sym_for] = ACTIONS(940), + [anon_sym_return] = ACTIONS(940), + [anon_sym_break] = ACTIONS(940), + [anon_sym_continue] = ACTIONS(940), + [anon_sym_goto] = ACTIONS(940), + [anon_sym_DASH_DASH] = ACTIONS(942), + [anon_sym_PLUS_PLUS] = ACTIONS(942), + [anon_sym_sizeof] = ACTIONS(940), + [sym_number_literal] = ACTIONS(942), + [anon_sym_L_SQUOTE] = ACTIONS(942), + [anon_sym_u_SQUOTE] = ACTIONS(942), + [anon_sym_U_SQUOTE] = ACTIONS(942), + [anon_sym_u8_SQUOTE] = ACTIONS(942), + [anon_sym_SQUOTE] = ACTIONS(942), + [anon_sym_L_DQUOTE] = ACTIONS(942), + [anon_sym_u_DQUOTE] = ACTIONS(942), + [anon_sym_U_DQUOTE] = ACTIONS(942), + [anon_sym_u8_DQUOTE] = ACTIONS(942), + [anon_sym_DQUOTE] = ACTIONS(942), + [sym_true] = ACTIONS(940), + [sym_false] = ACTIONS(940), + [sym_null] = ACTIONS(940), + [sym_comment] = ACTIONS(3), + }, + [166] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(228), + [sym_attributed_statement] = STATE(228), + [sym_labeled_statement] = STATE(228), + [sym_expression_statement] = STATE(228), + [sym_if_statement] = STATE(228), + [sym_switch_statement] = STATE(228), + [sym_case_statement] = STATE(228), + [sym_while_statement] = STATE(228), + [sym_do_statement] = STATE(228), + [sym_for_statement] = STATE(228), + [sym_return_statement] = STATE(228), + [sym_break_statement] = STATE(228), + [sym_continue_statement] = STATE(228), + [sym_goto_statement] = STATE(228), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [167] = { + [ts_builtin_sym_end] = ACTIONS(892), + [sym_identifier] = ACTIONS(890), + [aux_sym_preproc_include_token1] = ACTIONS(890), + [aux_sym_preproc_def_token1] = ACTIONS(890), + [aux_sym_preproc_if_token1] = ACTIONS(890), + [aux_sym_preproc_ifdef_token1] = ACTIONS(890), + [aux_sym_preproc_ifdef_token2] = ACTIONS(890), + [sym_preproc_directive] = ACTIONS(890), + [anon_sym_LPAREN2] = ACTIONS(892), + [anon_sym_BANG] = ACTIONS(892), + [anon_sym_TILDE] = ACTIONS(892), + [anon_sym_DASH] = ACTIONS(890), + [anon_sym_PLUS] = ACTIONS(890), + [anon_sym_STAR] = ACTIONS(892), + [anon_sym_AMP] = ACTIONS(892), + [anon_sym_SEMI] = ACTIONS(892), + [anon_sym_typedef] = ACTIONS(890), + [anon_sym_extern] = ACTIONS(890), + [anon_sym___attribute__] = ACTIONS(890), + [anon_sym_LBRACK_LBRACK] = ACTIONS(892), + [anon_sym___declspec] = ACTIONS(890), + [anon_sym___cdecl] = ACTIONS(890), + [anon_sym___clrcall] = ACTIONS(890), + [anon_sym___stdcall] = ACTIONS(890), + [anon_sym___fastcall] = ACTIONS(890), + [anon_sym___thiscall] = ACTIONS(890), + [anon_sym___vectorcall] = ACTIONS(890), + [anon_sym_LBRACE] = ACTIONS(892), + [anon_sym_static] = ACTIONS(890), + [anon_sym_auto] = ACTIONS(890), + [anon_sym_register] = ACTIONS(890), + [anon_sym_inline] = ACTIONS(890), + [anon_sym_const] = ACTIONS(890), + [anon_sym_volatile] = ACTIONS(890), + [anon_sym_restrict] = ACTIONS(890), + [anon_sym__Atomic] = ACTIONS(890), + [anon_sym_signed] = ACTIONS(890), + [anon_sym_unsigned] = ACTIONS(890), + [anon_sym_long] = ACTIONS(890), + [anon_sym_short] = ACTIONS(890), + [sym_primitive_type] = ACTIONS(890), + [anon_sym_enum] = ACTIONS(890), + [anon_sym_struct] = ACTIONS(890), + [anon_sym_union] = ACTIONS(890), + [anon_sym_if] = ACTIONS(890), + [anon_sym_else] = ACTIONS(890), + [anon_sym_switch] = ACTIONS(890), + [anon_sym_case] = ACTIONS(890), + [anon_sym_default] = ACTIONS(890), + [anon_sym_while] = ACTIONS(890), + [anon_sym_do] = ACTIONS(890), + [anon_sym_for] = ACTIONS(890), + [anon_sym_return] = ACTIONS(890), + [anon_sym_break] = ACTIONS(890), + [anon_sym_continue] = ACTIONS(890), + [anon_sym_goto] = ACTIONS(890), + [anon_sym_DASH_DASH] = ACTIONS(892), + [anon_sym_PLUS_PLUS] = ACTIONS(892), + [anon_sym_sizeof] = ACTIONS(890), + [sym_number_literal] = ACTIONS(892), + [anon_sym_L_SQUOTE] = ACTIONS(892), + [anon_sym_u_SQUOTE] = ACTIONS(892), + [anon_sym_U_SQUOTE] = ACTIONS(892), + [anon_sym_u8_SQUOTE] = ACTIONS(892), + [anon_sym_SQUOTE] = ACTIONS(892), + [anon_sym_L_DQUOTE] = ACTIONS(892), + [anon_sym_u_DQUOTE] = ACTIONS(892), + [anon_sym_U_DQUOTE] = ACTIONS(892), + [anon_sym_u8_DQUOTE] = ACTIONS(892), + [anon_sym_DQUOTE] = ACTIONS(892), + [sym_true] = ACTIONS(890), + [sym_false] = ACTIONS(890), + [sym_null] = ACTIONS(890), + [sym_comment] = ACTIONS(3), + }, + [168] = { + [sym_attribute_declaration] = STATE(247), + [sym_compound_statement] = STATE(95), + [sym_attributed_statement] = STATE(95), + [sym_labeled_statement] = STATE(95), + [sym_expression_statement] = STATE(95), + [sym_if_statement] = STATE(95), + [sym_switch_statement] = STATE(95), + [sym_case_statement] = STATE(95), + [sym_while_statement] = STATE(95), + [sym_do_statement] = STATE(95), + [sym_for_statement] = STATE(95), + [sym_return_statement] = STATE(95), + [sym_break_statement] = STATE(95), + [sym_continue_statement] = STATE(95), + [sym_goto_statement] = STATE(95), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [sym_identifier] = ACTIONS(1209), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [169] = { + [ts_builtin_sym_end] = ACTIONS(946), + [sym_identifier] = ACTIONS(944), + [aux_sym_preproc_include_token1] = ACTIONS(944), + [aux_sym_preproc_def_token1] = ACTIONS(944), + [aux_sym_preproc_if_token1] = ACTIONS(944), + [aux_sym_preproc_ifdef_token1] = ACTIONS(944), + [aux_sym_preproc_ifdef_token2] = ACTIONS(944), + [sym_preproc_directive] = ACTIONS(944), + [anon_sym_LPAREN2] = ACTIONS(946), + [anon_sym_BANG] = ACTIONS(946), + [anon_sym_TILDE] = ACTIONS(946), + [anon_sym_DASH] = ACTIONS(944), + [anon_sym_PLUS] = ACTIONS(944), + [anon_sym_STAR] = ACTIONS(946), + [anon_sym_AMP] = ACTIONS(946), + [anon_sym_SEMI] = ACTIONS(946), + [anon_sym_typedef] = ACTIONS(944), + [anon_sym_extern] = ACTIONS(944), + [anon_sym___attribute__] = ACTIONS(944), + [anon_sym_LBRACK_LBRACK] = ACTIONS(946), + [anon_sym___declspec] = ACTIONS(944), + [anon_sym___cdecl] = ACTIONS(944), + [anon_sym___clrcall] = ACTIONS(944), + [anon_sym___stdcall] = ACTIONS(944), + [anon_sym___fastcall] = ACTIONS(944), + [anon_sym___thiscall] = ACTIONS(944), + [anon_sym___vectorcall] = ACTIONS(944), + [anon_sym_LBRACE] = ACTIONS(946), + [anon_sym_static] = ACTIONS(944), + [anon_sym_auto] = ACTIONS(944), + [anon_sym_register] = ACTIONS(944), + [anon_sym_inline] = ACTIONS(944), + [anon_sym_const] = ACTIONS(944), + [anon_sym_volatile] = ACTIONS(944), + [anon_sym_restrict] = ACTIONS(944), + [anon_sym__Atomic] = ACTIONS(944), + [anon_sym_signed] = ACTIONS(944), + [anon_sym_unsigned] = ACTIONS(944), + [anon_sym_long] = ACTIONS(944), + [anon_sym_short] = ACTIONS(944), + [sym_primitive_type] = ACTIONS(944), + [anon_sym_enum] = ACTIONS(944), + [anon_sym_struct] = ACTIONS(944), + [anon_sym_union] = ACTIONS(944), + [anon_sym_if] = ACTIONS(944), + [anon_sym_else] = ACTIONS(944), + [anon_sym_switch] = ACTIONS(944), + [anon_sym_case] = ACTIONS(944), + [anon_sym_default] = ACTIONS(944), + [anon_sym_while] = ACTIONS(944), + [anon_sym_do] = ACTIONS(944), + [anon_sym_for] = ACTIONS(944), + [anon_sym_return] = ACTIONS(944), + [anon_sym_break] = ACTIONS(944), + [anon_sym_continue] = ACTIONS(944), + [anon_sym_goto] = ACTIONS(944), + [anon_sym_DASH_DASH] = ACTIONS(946), + [anon_sym_PLUS_PLUS] = ACTIONS(946), + [anon_sym_sizeof] = ACTIONS(944), + [sym_number_literal] = ACTIONS(946), + [anon_sym_L_SQUOTE] = ACTIONS(946), + [anon_sym_u_SQUOTE] = ACTIONS(946), + [anon_sym_U_SQUOTE] = ACTIONS(946), + [anon_sym_u8_SQUOTE] = ACTIONS(946), + [anon_sym_SQUOTE] = ACTIONS(946), + [anon_sym_L_DQUOTE] = ACTIONS(946), + [anon_sym_u_DQUOTE] = ACTIONS(946), + [anon_sym_U_DQUOTE] = ACTIONS(946), + [anon_sym_u8_DQUOTE] = ACTIONS(946), + [anon_sym_DQUOTE] = ACTIONS(946), + [sym_true] = ACTIONS(944), + [sym_false] = ACTIONS(944), + [sym_null] = ACTIONS(944), + [sym_comment] = ACTIONS(3), + }, + [170] = { + [sym_attribute_declaration] = STATE(170), + [sym_compound_statement] = STATE(169), + [sym_attributed_statement] = STATE(169), + [sym_labeled_statement] = STATE(169), + [sym_expression_statement] = STATE(169), + [sym_if_statement] = STATE(169), + [sym_switch_statement] = STATE(169), + [sym_case_statement] = STATE(169), + [sym_while_statement] = STATE(169), + [sym_do_statement] = STATE(169), + [sym_for_statement] = STATE(169), + [sym_return_statement] = STATE(169), + [sym_break_statement] = STATE(169), + [sym_continue_statement] = STATE(169), + [sym_goto_statement] = STATE(169), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(170), + [sym_identifier] = ACTIONS(1211), + [anon_sym_LPAREN2] = ACTIONS(1135), + [anon_sym_BANG] = ACTIONS(1138), + [anon_sym_TILDE] = ACTIONS(1138), + [anon_sym_DASH] = ACTIONS(1141), + [anon_sym_PLUS] = ACTIONS(1141), + [anon_sym_STAR] = ACTIONS(1144), + [anon_sym_AMP] = ACTIONS(1144), + [anon_sym_SEMI] = ACTIONS(1214), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1150), + [anon_sym_LBRACE] = ACTIONS(1217), + [anon_sym_if] = ACTIONS(1220), + [anon_sym_switch] = ACTIONS(1223), + [anon_sym_case] = ACTIONS(1226), + [anon_sym_default] = ACTIONS(1229), + [anon_sym_while] = ACTIONS(1232), + [anon_sym_do] = ACTIONS(1235), + [anon_sym_for] = ACTIONS(1238), + [anon_sym_return] = ACTIONS(1241), + [anon_sym_break] = ACTIONS(1244), + [anon_sym_continue] = ACTIONS(1247), + [anon_sym_goto] = ACTIONS(1250), + [anon_sym_DASH_DASH] = ACTIONS(1189), + [anon_sym_PLUS_PLUS] = ACTIONS(1189), + [anon_sym_sizeof] = ACTIONS(1192), + [sym_number_literal] = ACTIONS(1195), + [anon_sym_L_SQUOTE] = ACTIONS(1198), + [anon_sym_u_SQUOTE] = ACTIONS(1198), + [anon_sym_U_SQUOTE] = ACTIONS(1198), + [anon_sym_u8_SQUOTE] = ACTIONS(1198), + [anon_sym_SQUOTE] = ACTIONS(1198), + [anon_sym_L_DQUOTE] = ACTIONS(1201), + [anon_sym_u_DQUOTE] = ACTIONS(1201), + [anon_sym_U_DQUOTE] = ACTIONS(1201), + [anon_sym_u8_DQUOTE] = ACTIONS(1201), + [anon_sym_DQUOTE] = ACTIONS(1201), + [sym_true] = ACTIONS(1204), + [sym_false] = ACTIONS(1204), + [sym_null] = ACTIONS(1204), + [sym_comment] = ACTIONS(3), + }, + [171] = { + [ts_builtin_sym_end] = ACTIONS(892), + [sym_identifier] = ACTIONS(890), + [aux_sym_preproc_include_token1] = ACTIONS(890), + [aux_sym_preproc_def_token1] = ACTIONS(890), + [aux_sym_preproc_if_token1] = ACTIONS(890), + [aux_sym_preproc_ifdef_token1] = ACTIONS(890), + [aux_sym_preproc_ifdef_token2] = ACTIONS(890), + [sym_preproc_directive] = ACTIONS(890), + [anon_sym_LPAREN2] = ACTIONS(892), + [anon_sym_BANG] = ACTIONS(892), + [anon_sym_TILDE] = ACTIONS(892), + [anon_sym_DASH] = ACTIONS(890), + [anon_sym_PLUS] = ACTIONS(890), + [anon_sym_STAR] = ACTIONS(892), + [anon_sym_AMP] = ACTIONS(892), + [anon_sym_SEMI] = ACTIONS(892), + [anon_sym_typedef] = ACTIONS(890), + [anon_sym_extern] = ACTIONS(890), + [anon_sym___attribute__] = ACTIONS(890), + [anon_sym_LBRACK_LBRACK] = ACTIONS(892), + [anon_sym___declspec] = ACTIONS(890), + [anon_sym___cdecl] = ACTIONS(890), + [anon_sym___clrcall] = ACTIONS(890), + [anon_sym___stdcall] = ACTIONS(890), + [anon_sym___fastcall] = ACTIONS(890), + [anon_sym___thiscall] = ACTIONS(890), + [anon_sym___vectorcall] = ACTIONS(890), + [anon_sym_LBRACE] = ACTIONS(892), + [anon_sym_static] = ACTIONS(890), + [anon_sym_auto] = ACTIONS(890), + [anon_sym_register] = ACTIONS(890), + [anon_sym_inline] = ACTIONS(890), + [anon_sym_const] = ACTIONS(890), + [anon_sym_volatile] = ACTIONS(890), + [anon_sym_restrict] = ACTIONS(890), + [anon_sym__Atomic] = ACTIONS(890), + [anon_sym_signed] = ACTIONS(890), + [anon_sym_unsigned] = ACTIONS(890), + [anon_sym_long] = ACTIONS(890), + [anon_sym_short] = ACTIONS(890), + [sym_primitive_type] = ACTIONS(890), + [anon_sym_enum] = ACTIONS(890), + [anon_sym_struct] = ACTIONS(890), + [anon_sym_union] = ACTIONS(890), + [anon_sym_if] = ACTIONS(890), + [anon_sym_else] = ACTIONS(890), + [anon_sym_switch] = ACTIONS(890), + [anon_sym_case] = ACTIONS(890), + [anon_sym_default] = ACTIONS(890), + [anon_sym_while] = ACTIONS(890), + [anon_sym_do] = ACTIONS(890), + [anon_sym_for] = ACTIONS(890), + [anon_sym_return] = ACTIONS(890), + [anon_sym_break] = ACTIONS(890), + [anon_sym_continue] = ACTIONS(890), + [anon_sym_goto] = ACTIONS(890), + [anon_sym_DASH_DASH] = ACTIONS(892), + [anon_sym_PLUS_PLUS] = ACTIONS(892), + [anon_sym_sizeof] = ACTIONS(890), + [sym_number_literal] = ACTIONS(892), + [anon_sym_L_SQUOTE] = ACTIONS(892), + [anon_sym_u_SQUOTE] = ACTIONS(892), + [anon_sym_U_SQUOTE] = ACTIONS(892), + [anon_sym_u8_SQUOTE] = ACTIONS(892), + [anon_sym_SQUOTE] = ACTIONS(892), + [anon_sym_L_DQUOTE] = ACTIONS(892), + [anon_sym_u_DQUOTE] = ACTIONS(892), + [anon_sym_U_DQUOTE] = ACTIONS(892), + [anon_sym_u8_DQUOTE] = ACTIONS(892), + [anon_sym_DQUOTE] = ACTIONS(892), + [sym_true] = ACTIONS(890), + [sym_false] = ACTIONS(890), + [sym_null] = ACTIONS(890), + [sym_comment] = ACTIONS(3), + }, + [172] = { + [sym_identifier] = ACTIONS(902), + [aux_sym_preproc_include_token1] = ACTIONS(902), + [aux_sym_preproc_def_token1] = ACTIONS(902), + [aux_sym_preproc_if_token1] = ACTIONS(902), + [aux_sym_preproc_if_token2] = ACTIONS(902), + [aux_sym_preproc_ifdef_token1] = ACTIONS(902), + [aux_sym_preproc_ifdef_token2] = ACTIONS(902), + [sym_preproc_directive] = ACTIONS(902), + [anon_sym_LPAREN2] = ACTIONS(904), + [anon_sym_BANG] = ACTIONS(904), + [anon_sym_TILDE] = ACTIONS(904), + [anon_sym_DASH] = ACTIONS(902), + [anon_sym_PLUS] = ACTIONS(902), + [anon_sym_STAR] = ACTIONS(904), + [anon_sym_AMP] = ACTIONS(904), + [anon_sym_SEMI] = ACTIONS(904), + [anon_sym_typedef] = ACTIONS(902), + [anon_sym_extern] = ACTIONS(902), + [anon_sym___attribute__] = ACTIONS(902), + [anon_sym_LBRACK_LBRACK] = ACTIONS(904), + [anon_sym___declspec] = ACTIONS(902), + [anon_sym___cdecl] = ACTIONS(902), + [anon_sym___clrcall] = ACTIONS(902), + [anon_sym___stdcall] = ACTIONS(902), + [anon_sym___fastcall] = ACTIONS(902), + [anon_sym___thiscall] = ACTIONS(902), + [anon_sym___vectorcall] = ACTIONS(902), + [anon_sym_LBRACE] = ACTIONS(904), + [anon_sym_static] = ACTIONS(902), + [anon_sym_auto] = ACTIONS(902), + [anon_sym_register] = ACTIONS(902), + [anon_sym_inline] = ACTIONS(902), + [anon_sym_const] = ACTIONS(902), + [anon_sym_volatile] = ACTIONS(902), + [anon_sym_restrict] = ACTIONS(902), + [anon_sym__Atomic] = ACTIONS(902), + [anon_sym_signed] = ACTIONS(902), + [anon_sym_unsigned] = ACTIONS(902), + [anon_sym_long] = ACTIONS(902), + [anon_sym_short] = ACTIONS(902), + [sym_primitive_type] = ACTIONS(902), + [anon_sym_enum] = ACTIONS(902), + [anon_sym_struct] = ACTIONS(902), + [anon_sym_union] = ACTIONS(902), + [anon_sym_if] = ACTIONS(902), + [anon_sym_else] = ACTIONS(902), + [anon_sym_switch] = ACTIONS(902), + [anon_sym_case] = ACTIONS(902), + [anon_sym_default] = ACTIONS(902), + [anon_sym_while] = ACTIONS(902), + [anon_sym_do] = ACTIONS(902), + [anon_sym_for] = ACTIONS(902), + [anon_sym_return] = ACTIONS(902), + [anon_sym_break] = ACTIONS(902), + [anon_sym_continue] = ACTIONS(902), + [anon_sym_goto] = ACTIONS(902), + [anon_sym_DASH_DASH] = ACTIONS(904), + [anon_sym_PLUS_PLUS] = ACTIONS(904), + [anon_sym_sizeof] = ACTIONS(902), + [sym_number_literal] = ACTIONS(904), + [anon_sym_L_SQUOTE] = ACTIONS(904), + [anon_sym_u_SQUOTE] = ACTIONS(904), + [anon_sym_U_SQUOTE] = ACTIONS(904), + [anon_sym_u8_SQUOTE] = ACTIONS(904), + [anon_sym_SQUOTE] = ACTIONS(904), + [anon_sym_L_DQUOTE] = ACTIONS(904), + [anon_sym_u_DQUOTE] = ACTIONS(904), + [anon_sym_U_DQUOTE] = ACTIONS(904), + [anon_sym_u8_DQUOTE] = ACTIONS(904), + [anon_sym_DQUOTE] = ACTIONS(904), + [sym_true] = ACTIONS(902), + [sym_false] = ACTIONS(902), + [sym_null] = ACTIONS(902), + [sym_comment] = ACTIONS(3), + }, + [173] = { + [sym_attribute_declaration] = STATE(247), + [sym_compound_statement] = STATE(94), + [sym_attributed_statement] = STATE(94), + [sym_labeled_statement] = STATE(94), + [sym_expression_statement] = STATE(94), + [sym_if_statement] = STATE(94), + [sym_switch_statement] = STATE(94), + [sym_case_statement] = STATE(94), + [sym_while_statement] = STATE(94), + [sym_do_statement] = STATE(94), + [sym_for_statement] = STATE(94), + [sym_return_statement] = STATE(94), + [sym_break_statement] = STATE(94), + [sym_continue_statement] = STATE(94), + [sym_goto_statement] = STATE(94), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [sym_identifier] = ACTIONS(1209), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [174] = { + [ts_builtin_sym_end] = ACTIONS(954), + [sym_identifier] = ACTIONS(952), + [aux_sym_preproc_include_token1] = ACTIONS(952), + [aux_sym_preproc_def_token1] = ACTIONS(952), + [aux_sym_preproc_if_token1] = ACTIONS(952), + [aux_sym_preproc_ifdef_token1] = ACTIONS(952), + [aux_sym_preproc_ifdef_token2] = ACTIONS(952), + [sym_preproc_directive] = ACTIONS(952), + [anon_sym_LPAREN2] = ACTIONS(954), + [anon_sym_BANG] = ACTIONS(954), + [anon_sym_TILDE] = ACTIONS(954), + [anon_sym_DASH] = ACTIONS(952), + [anon_sym_PLUS] = ACTIONS(952), + [anon_sym_STAR] = ACTIONS(954), + [anon_sym_AMP] = ACTIONS(954), + [anon_sym_SEMI] = ACTIONS(954), + [anon_sym_typedef] = ACTIONS(952), + [anon_sym_extern] = ACTIONS(952), + [anon_sym___attribute__] = ACTIONS(952), + [anon_sym_LBRACK_LBRACK] = ACTIONS(954), + [anon_sym___declspec] = ACTIONS(952), + [anon_sym___cdecl] = ACTIONS(952), + [anon_sym___clrcall] = ACTIONS(952), + [anon_sym___stdcall] = ACTIONS(952), + [anon_sym___fastcall] = ACTIONS(952), + [anon_sym___thiscall] = ACTIONS(952), + [anon_sym___vectorcall] = ACTIONS(952), + [anon_sym_LBRACE] = ACTIONS(954), + [anon_sym_static] = ACTIONS(952), + [anon_sym_auto] = ACTIONS(952), + [anon_sym_register] = ACTIONS(952), + [anon_sym_inline] = ACTIONS(952), + [anon_sym_const] = ACTIONS(952), + [anon_sym_volatile] = ACTIONS(952), + [anon_sym_restrict] = ACTIONS(952), + [anon_sym__Atomic] = ACTIONS(952), + [anon_sym_signed] = ACTIONS(952), + [anon_sym_unsigned] = ACTIONS(952), + [anon_sym_long] = ACTIONS(952), + [anon_sym_short] = ACTIONS(952), + [sym_primitive_type] = ACTIONS(952), + [anon_sym_enum] = ACTIONS(952), + [anon_sym_struct] = ACTIONS(952), + [anon_sym_union] = ACTIONS(952), + [anon_sym_if] = ACTIONS(952), + [anon_sym_else] = ACTIONS(952), + [anon_sym_switch] = ACTIONS(952), + [anon_sym_case] = ACTIONS(952), + [anon_sym_default] = ACTIONS(952), + [anon_sym_while] = ACTIONS(952), + [anon_sym_do] = ACTIONS(952), + [anon_sym_for] = ACTIONS(952), + [anon_sym_return] = ACTIONS(952), + [anon_sym_break] = ACTIONS(952), + [anon_sym_continue] = ACTIONS(952), + [anon_sym_goto] = ACTIONS(952), + [anon_sym_DASH_DASH] = ACTIONS(954), + [anon_sym_PLUS_PLUS] = ACTIONS(954), + [anon_sym_sizeof] = ACTIONS(952), + [sym_number_literal] = ACTIONS(954), + [anon_sym_L_SQUOTE] = ACTIONS(954), + [anon_sym_u_SQUOTE] = ACTIONS(954), + [anon_sym_U_SQUOTE] = ACTIONS(954), + [anon_sym_u8_SQUOTE] = ACTIONS(954), + [anon_sym_SQUOTE] = ACTIONS(954), + [anon_sym_L_DQUOTE] = ACTIONS(954), + [anon_sym_u_DQUOTE] = ACTIONS(954), + [anon_sym_U_DQUOTE] = ACTIONS(954), + [anon_sym_u8_DQUOTE] = ACTIONS(954), + [anon_sym_DQUOTE] = ACTIONS(954), + [sym_true] = ACTIONS(952), + [sym_false] = ACTIONS(952), + [sym_null] = ACTIONS(952), + [sym_comment] = ACTIONS(3), + }, + [175] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(192), + [sym_attributed_statement] = STATE(192), + [sym_labeled_statement] = STATE(192), + [sym_expression_statement] = STATE(192), + [sym_if_statement] = STATE(192), + [sym_switch_statement] = STATE(192), + [sym_case_statement] = STATE(192), + [sym_while_statement] = STATE(192), + [sym_do_statement] = STATE(192), + [sym_for_statement] = STATE(192), + [sym_return_statement] = STATE(192), + [sym_break_statement] = STATE(192), + [sym_continue_statement] = STATE(192), + [sym_goto_statement] = STATE(192), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [176] = { + [sym_attribute_declaration] = STATE(153), + [sym_compound_statement] = STATE(201), + [sym_attributed_statement] = STATE(201), + [sym_labeled_statement] = STATE(201), + [sym_expression_statement] = STATE(201), + [sym_if_statement] = STATE(201), + [sym_switch_statement] = STATE(201), + [sym_case_statement] = STATE(201), + [sym_while_statement] = STATE(201), + [sym_do_statement] = STATE(201), + [sym_for_statement] = STATE(201), + [sym_return_statement] = STATE(201), + [sym_break_statement] = STATE(201), + [sym_continue_statement] = STATE(201), + [sym_goto_statement] = STATE(201), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [sym_identifier] = ACTIONS(1207), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [177] = { + [ts_builtin_sym_end] = ACTIONS(896), + [sym_identifier] = ACTIONS(894), + [aux_sym_preproc_include_token1] = ACTIONS(894), + [aux_sym_preproc_def_token1] = ACTIONS(894), + [aux_sym_preproc_if_token1] = ACTIONS(894), + [aux_sym_preproc_ifdef_token1] = ACTIONS(894), + [aux_sym_preproc_ifdef_token2] = ACTIONS(894), + [sym_preproc_directive] = ACTIONS(894), + [anon_sym_LPAREN2] = ACTIONS(896), + [anon_sym_BANG] = ACTIONS(896), + [anon_sym_TILDE] = ACTIONS(896), + [anon_sym_DASH] = ACTIONS(894), + [anon_sym_PLUS] = ACTIONS(894), + [anon_sym_STAR] = ACTIONS(896), + [anon_sym_AMP] = ACTIONS(896), + [anon_sym_SEMI] = ACTIONS(896), + [anon_sym_typedef] = ACTIONS(894), + [anon_sym_extern] = ACTIONS(894), + [anon_sym___attribute__] = ACTIONS(894), + [anon_sym_LBRACK_LBRACK] = ACTIONS(896), + [anon_sym___declspec] = ACTIONS(894), + [anon_sym___cdecl] = ACTIONS(894), + [anon_sym___clrcall] = ACTIONS(894), + [anon_sym___stdcall] = ACTIONS(894), + [anon_sym___fastcall] = ACTIONS(894), + [anon_sym___thiscall] = ACTIONS(894), + [anon_sym___vectorcall] = ACTIONS(894), + [anon_sym_LBRACE] = ACTIONS(896), + [anon_sym_static] = ACTIONS(894), + [anon_sym_auto] = ACTIONS(894), + [anon_sym_register] = ACTIONS(894), + [anon_sym_inline] = ACTIONS(894), + [anon_sym_const] = ACTIONS(894), + [anon_sym_volatile] = ACTIONS(894), + [anon_sym_restrict] = ACTIONS(894), + [anon_sym__Atomic] = ACTIONS(894), + [anon_sym_signed] = ACTIONS(894), + [anon_sym_unsigned] = ACTIONS(894), + [anon_sym_long] = ACTIONS(894), + [anon_sym_short] = ACTIONS(894), + [sym_primitive_type] = ACTIONS(894), + [anon_sym_enum] = ACTIONS(894), + [anon_sym_struct] = ACTIONS(894), + [anon_sym_union] = ACTIONS(894), + [anon_sym_if] = ACTIONS(894), + [anon_sym_else] = ACTIONS(894), + [anon_sym_switch] = ACTIONS(894), + [anon_sym_case] = ACTIONS(894), + [anon_sym_default] = ACTIONS(894), + [anon_sym_while] = ACTIONS(894), + [anon_sym_do] = ACTIONS(894), + [anon_sym_for] = ACTIONS(894), + [anon_sym_return] = ACTIONS(894), + [anon_sym_break] = ACTIONS(894), + [anon_sym_continue] = ACTIONS(894), + [anon_sym_goto] = ACTIONS(894), + [anon_sym_DASH_DASH] = ACTIONS(896), + [anon_sym_PLUS_PLUS] = ACTIONS(896), + [anon_sym_sizeof] = ACTIONS(894), + [sym_number_literal] = ACTIONS(896), + [anon_sym_L_SQUOTE] = ACTIONS(896), + [anon_sym_u_SQUOTE] = ACTIONS(896), + [anon_sym_U_SQUOTE] = ACTIONS(896), + [anon_sym_u8_SQUOTE] = ACTIONS(896), + [anon_sym_SQUOTE] = ACTIONS(896), + [anon_sym_L_DQUOTE] = ACTIONS(896), + [anon_sym_u_DQUOTE] = ACTIONS(896), + [anon_sym_U_DQUOTE] = ACTIONS(896), + [anon_sym_u8_DQUOTE] = ACTIONS(896), + [anon_sym_DQUOTE] = ACTIONS(896), + [sym_true] = ACTIONS(894), + [sym_false] = ACTIONS(894), + [sym_null] = ACTIONS(894), + [sym_comment] = ACTIONS(3), + }, + [178] = { + [sym_attribute_declaration] = STATE(247), + [sym_compound_statement] = STATE(92), + [sym_attributed_statement] = STATE(92), + [sym_labeled_statement] = STATE(92), + [sym_expression_statement] = STATE(92), + [sym_if_statement] = STATE(92), + [sym_switch_statement] = STATE(92), + [sym_case_statement] = STATE(92), + [sym_while_statement] = STATE(92), + [sym_do_statement] = STATE(92), + [sym_for_statement] = STATE(92), + [sym_return_statement] = STATE(92), + [sym_break_statement] = STATE(92), + [sym_continue_statement] = STATE(92), + [sym_goto_statement] = STATE(92), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [sym_identifier] = ACTIONS(1209), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [179] = { + [sym_attribute_declaration] = STATE(247), + [sym_compound_statement] = STATE(91), + [sym_attributed_statement] = STATE(91), + [sym_labeled_statement] = STATE(91), + [sym_expression_statement] = STATE(91), + [sym_if_statement] = STATE(91), + [sym_switch_statement] = STATE(91), + [sym_case_statement] = STATE(91), + [sym_while_statement] = STATE(91), + [sym_do_statement] = STATE(91), + [sym_for_statement] = STATE(91), + [sym_return_statement] = STATE(91), + [sym_break_statement] = STATE(91), + [sym_continue_statement] = STATE(91), + [sym_goto_statement] = STATE(91), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [sym_identifier] = ACTIONS(1209), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [180] = { + [sym_attribute_declaration] = STATE(247), + [sym_compound_statement] = STATE(90), + [sym_attributed_statement] = STATE(90), + [sym_labeled_statement] = STATE(90), + [sym_expression_statement] = STATE(90), + [sym_if_statement] = STATE(90), + [sym_switch_statement] = STATE(90), + [sym_case_statement] = STATE(90), + [sym_while_statement] = STATE(90), + [sym_do_statement] = STATE(90), + [sym_for_statement] = STATE(90), + [sym_return_statement] = STATE(90), + [sym_break_statement] = STATE(90), + [sym_continue_statement] = STATE(90), + [sym_goto_statement] = STATE(90), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [sym_identifier] = ACTIONS(1209), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [181] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(196), + [sym_attributed_statement] = STATE(196), + [sym_labeled_statement] = STATE(196), + [sym_expression_statement] = STATE(196), + [sym_if_statement] = STATE(196), + [sym_switch_statement] = STATE(196), + [sym_case_statement] = STATE(196), + [sym_while_statement] = STATE(196), + [sym_do_statement] = STATE(196), + [sym_for_statement] = STATE(196), + [sym_return_statement] = STATE(196), + [sym_break_statement] = STATE(196), + [sym_continue_statement] = STATE(196), + [sym_goto_statement] = STATE(196), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [182] = { + [sym_attribute_declaration] = STATE(247), + [sym_compound_statement] = STATE(89), + [sym_attributed_statement] = STATE(89), + [sym_labeled_statement] = STATE(89), + [sym_expression_statement] = STATE(89), + [sym_if_statement] = STATE(89), + [sym_switch_statement] = STATE(89), + [sym_case_statement] = STATE(89), + [sym_while_statement] = STATE(89), + [sym_do_statement] = STATE(89), + [sym_for_statement] = STATE(89), + [sym_return_statement] = STATE(89), + [sym_break_statement] = STATE(89), + [sym_continue_statement] = STATE(89), + [sym_goto_statement] = STATE(89), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [sym_identifier] = ACTIONS(1209), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [183] = { + [sym_attribute_declaration] = STATE(247), + [sym_compound_statement] = STATE(86), + [sym_attributed_statement] = STATE(86), + [sym_labeled_statement] = STATE(86), + [sym_expression_statement] = STATE(86), + [sym_if_statement] = STATE(86), + [sym_switch_statement] = STATE(86), + [sym_case_statement] = STATE(86), + [sym_while_statement] = STATE(86), + [sym_do_statement] = STATE(86), + [sym_for_statement] = STATE(86), + [sym_return_statement] = STATE(86), + [sym_break_statement] = STATE(86), + [sym_continue_statement] = STATE(86), + [sym_goto_statement] = STATE(86), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [sym_identifier] = ACTIONS(1209), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [184] = { + [sym_identifier] = ACTIONS(890), + [aux_sym_preproc_include_token1] = ACTIONS(890), + [aux_sym_preproc_def_token1] = ACTIONS(890), + [aux_sym_preproc_if_token1] = ACTIONS(890), + [aux_sym_preproc_if_token2] = ACTIONS(890), + [aux_sym_preproc_ifdef_token1] = ACTIONS(890), + [aux_sym_preproc_ifdef_token2] = ACTIONS(890), + [sym_preproc_directive] = ACTIONS(890), + [anon_sym_LPAREN2] = ACTIONS(892), + [anon_sym_BANG] = ACTIONS(892), + [anon_sym_TILDE] = ACTIONS(892), + [anon_sym_DASH] = ACTIONS(890), + [anon_sym_PLUS] = ACTIONS(890), + [anon_sym_STAR] = ACTIONS(892), + [anon_sym_AMP] = ACTIONS(892), + [anon_sym_SEMI] = ACTIONS(892), + [anon_sym_typedef] = ACTIONS(890), + [anon_sym_extern] = ACTIONS(890), + [anon_sym___attribute__] = ACTIONS(890), + [anon_sym_LBRACK_LBRACK] = ACTIONS(892), + [anon_sym___declspec] = ACTIONS(890), + [anon_sym___cdecl] = ACTIONS(890), + [anon_sym___clrcall] = ACTIONS(890), + [anon_sym___stdcall] = ACTIONS(890), + [anon_sym___fastcall] = ACTIONS(890), + [anon_sym___thiscall] = ACTIONS(890), + [anon_sym___vectorcall] = ACTIONS(890), + [anon_sym_LBRACE] = ACTIONS(892), + [anon_sym_static] = ACTIONS(890), + [anon_sym_auto] = ACTIONS(890), + [anon_sym_register] = ACTIONS(890), + [anon_sym_inline] = ACTIONS(890), + [anon_sym_const] = ACTIONS(890), + [anon_sym_volatile] = ACTIONS(890), + [anon_sym_restrict] = ACTIONS(890), + [anon_sym__Atomic] = ACTIONS(890), + [anon_sym_signed] = ACTIONS(890), + [anon_sym_unsigned] = ACTIONS(890), + [anon_sym_long] = ACTIONS(890), + [anon_sym_short] = ACTIONS(890), + [sym_primitive_type] = ACTIONS(890), + [anon_sym_enum] = ACTIONS(890), + [anon_sym_struct] = ACTIONS(890), + [anon_sym_union] = ACTIONS(890), + [anon_sym_if] = ACTIONS(890), + [anon_sym_else] = ACTIONS(890), + [anon_sym_switch] = ACTIONS(890), + [anon_sym_case] = ACTIONS(890), + [anon_sym_default] = ACTIONS(890), + [anon_sym_while] = ACTIONS(890), + [anon_sym_do] = ACTIONS(890), + [anon_sym_for] = ACTIONS(890), + [anon_sym_return] = ACTIONS(890), + [anon_sym_break] = ACTIONS(890), + [anon_sym_continue] = ACTIONS(890), + [anon_sym_goto] = ACTIONS(890), + [anon_sym_DASH_DASH] = ACTIONS(892), + [anon_sym_PLUS_PLUS] = ACTIONS(892), + [anon_sym_sizeof] = ACTIONS(890), + [sym_number_literal] = ACTIONS(892), + [anon_sym_L_SQUOTE] = ACTIONS(892), + [anon_sym_u_SQUOTE] = ACTIONS(892), + [anon_sym_U_SQUOTE] = ACTIONS(892), + [anon_sym_u8_SQUOTE] = ACTIONS(892), + [anon_sym_SQUOTE] = ACTIONS(892), + [anon_sym_L_DQUOTE] = ACTIONS(892), + [anon_sym_u_DQUOTE] = ACTIONS(892), + [anon_sym_U_DQUOTE] = ACTIONS(892), + [anon_sym_u8_DQUOTE] = ACTIONS(892), + [anon_sym_DQUOTE] = ACTIONS(892), + [sym_true] = ACTIONS(890), + [sym_false] = ACTIONS(890), + [sym_null] = ACTIONS(890), + [sym_comment] = ACTIONS(3), + }, + [185] = { + [sym_identifier] = ACTIONS(890), + [aux_sym_preproc_include_token1] = ACTIONS(890), + [aux_sym_preproc_def_token1] = ACTIONS(890), + [aux_sym_preproc_if_token1] = ACTIONS(890), + [aux_sym_preproc_if_token2] = ACTIONS(890), + [aux_sym_preproc_ifdef_token1] = ACTIONS(890), + [aux_sym_preproc_ifdef_token2] = ACTIONS(890), + [sym_preproc_directive] = ACTIONS(890), + [anon_sym_LPAREN2] = ACTIONS(892), + [anon_sym_BANG] = ACTIONS(892), + [anon_sym_TILDE] = ACTIONS(892), + [anon_sym_DASH] = ACTIONS(890), + [anon_sym_PLUS] = ACTIONS(890), + [anon_sym_STAR] = ACTIONS(892), + [anon_sym_AMP] = ACTIONS(892), + [anon_sym_SEMI] = ACTIONS(892), + [anon_sym_typedef] = ACTIONS(890), + [anon_sym_extern] = ACTIONS(890), + [anon_sym___attribute__] = ACTIONS(890), + [anon_sym_LBRACK_LBRACK] = ACTIONS(892), + [anon_sym___declspec] = ACTIONS(890), + [anon_sym___cdecl] = ACTIONS(890), + [anon_sym___clrcall] = ACTIONS(890), + [anon_sym___stdcall] = ACTIONS(890), + [anon_sym___fastcall] = ACTIONS(890), + [anon_sym___thiscall] = ACTIONS(890), + [anon_sym___vectorcall] = ACTIONS(890), + [anon_sym_LBRACE] = ACTIONS(892), + [anon_sym_static] = ACTIONS(890), + [anon_sym_auto] = ACTIONS(890), + [anon_sym_register] = ACTIONS(890), + [anon_sym_inline] = ACTIONS(890), + [anon_sym_const] = ACTIONS(890), + [anon_sym_volatile] = ACTIONS(890), + [anon_sym_restrict] = ACTIONS(890), + [anon_sym__Atomic] = ACTIONS(890), + [anon_sym_signed] = ACTIONS(890), + [anon_sym_unsigned] = ACTIONS(890), + [anon_sym_long] = ACTIONS(890), + [anon_sym_short] = ACTIONS(890), + [sym_primitive_type] = ACTIONS(890), + [anon_sym_enum] = ACTIONS(890), + [anon_sym_struct] = ACTIONS(890), + [anon_sym_union] = ACTIONS(890), + [anon_sym_if] = ACTIONS(890), + [anon_sym_else] = ACTIONS(890), + [anon_sym_switch] = ACTIONS(890), + [anon_sym_case] = ACTIONS(890), + [anon_sym_default] = ACTIONS(890), + [anon_sym_while] = ACTIONS(890), + [anon_sym_do] = ACTIONS(890), + [anon_sym_for] = ACTIONS(890), + [anon_sym_return] = ACTIONS(890), + [anon_sym_break] = ACTIONS(890), + [anon_sym_continue] = ACTIONS(890), + [anon_sym_goto] = ACTIONS(890), + [anon_sym_DASH_DASH] = ACTIONS(892), + [anon_sym_PLUS_PLUS] = ACTIONS(892), + [anon_sym_sizeof] = ACTIONS(890), + [sym_number_literal] = ACTIONS(892), + [anon_sym_L_SQUOTE] = ACTIONS(892), + [anon_sym_u_SQUOTE] = ACTIONS(892), + [anon_sym_U_SQUOTE] = ACTIONS(892), + [anon_sym_u8_SQUOTE] = ACTIONS(892), + [anon_sym_SQUOTE] = ACTIONS(892), + [anon_sym_L_DQUOTE] = ACTIONS(892), + [anon_sym_u_DQUOTE] = ACTIONS(892), + [anon_sym_U_DQUOTE] = ACTIONS(892), + [anon_sym_u8_DQUOTE] = ACTIONS(892), + [anon_sym_DQUOTE] = ACTIONS(892), + [sym_true] = ACTIONS(890), + [sym_false] = ACTIONS(890), + [sym_null] = ACTIONS(890), + [sym_comment] = ACTIONS(3), + }, + [186] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(197), + [sym_attributed_statement] = STATE(197), + [sym_labeled_statement] = STATE(197), + [sym_expression_statement] = STATE(197), + [sym_if_statement] = STATE(197), + [sym_switch_statement] = STATE(197), + [sym_case_statement] = STATE(197), + [sym_while_statement] = STATE(197), + [sym_do_statement] = STATE(197), + [sym_for_statement] = STATE(197), + [sym_return_statement] = STATE(197), + [sym_break_statement] = STATE(197), + [sym_continue_statement] = STATE(197), + [sym_goto_statement] = STATE(197), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [187] = { + [sym_attribute_declaration] = STATE(247), + [sym_compound_statement] = STATE(69), + [sym_attributed_statement] = STATE(69), + [sym_labeled_statement] = STATE(69), + [sym_expression_statement] = STATE(69), + [sym_if_statement] = STATE(69), + [sym_switch_statement] = STATE(69), + [sym_case_statement] = STATE(69), + [sym_while_statement] = STATE(69), + [sym_do_statement] = STATE(69), + [sym_for_statement] = STATE(69), + [sym_return_statement] = STATE(69), + [sym_break_statement] = STATE(69), + [sym_continue_statement] = STATE(69), + [sym_goto_statement] = STATE(69), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [sym_identifier] = ACTIONS(1209), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [188] = { + [sym_attribute_declaration] = STATE(247), + [sym_compound_statement] = STATE(84), + [sym_attributed_statement] = STATE(84), + [sym_labeled_statement] = STATE(84), + [sym_expression_statement] = STATE(84), + [sym_if_statement] = STATE(84), + [sym_switch_statement] = STATE(84), + [sym_case_statement] = STATE(84), + [sym_while_statement] = STATE(84), + [sym_do_statement] = STATE(84), + [sym_for_statement] = STATE(84), + [sym_return_statement] = STATE(84), + [sym_break_statement] = STATE(84), + [sym_continue_statement] = STATE(84), + [sym_goto_statement] = STATE(84), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [sym_identifier] = ACTIONS(1209), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [189] = { + [ts_builtin_sym_end] = ACTIONS(1026), + [sym_identifier] = ACTIONS(1024), + [aux_sym_preproc_include_token1] = ACTIONS(1024), + [aux_sym_preproc_def_token1] = ACTIONS(1024), + [aux_sym_preproc_if_token1] = ACTIONS(1024), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1024), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1024), + [sym_preproc_directive] = ACTIONS(1024), + [anon_sym_LPAREN2] = ACTIONS(1026), + [anon_sym_BANG] = ACTIONS(1026), + [anon_sym_TILDE] = ACTIONS(1026), + [anon_sym_DASH] = ACTIONS(1024), + [anon_sym_PLUS] = ACTIONS(1024), + [anon_sym_STAR] = ACTIONS(1026), + [anon_sym_AMP] = ACTIONS(1026), + [anon_sym_SEMI] = ACTIONS(1026), + [anon_sym_typedef] = ACTIONS(1024), + [anon_sym_extern] = ACTIONS(1024), + [anon_sym___attribute__] = ACTIONS(1024), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1026), + [anon_sym___declspec] = ACTIONS(1024), + [anon_sym___cdecl] = ACTIONS(1024), + [anon_sym___clrcall] = ACTIONS(1024), + [anon_sym___stdcall] = ACTIONS(1024), + [anon_sym___fastcall] = ACTIONS(1024), + [anon_sym___thiscall] = ACTIONS(1024), + [anon_sym___vectorcall] = ACTIONS(1024), + [anon_sym_LBRACE] = ACTIONS(1026), + [anon_sym_static] = ACTIONS(1024), + [anon_sym_auto] = ACTIONS(1024), + [anon_sym_register] = ACTIONS(1024), + [anon_sym_inline] = ACTIONS(1024), + [anon_sym_const] = ACTIONS(1024), + [anon_sym_volatile] = ACTIONS(1024), + [anon_sym_restrict] = ACTIONS(1024), + [anon_sym__Atomic] = ACTIONS(1024), + [anon_sym_signed] = ACTIONS(1024), + [anon_sym_unsigned] = ACTIONS(1024), + [anon_sym_long] = ACTIONS(1024), + [anon_sym_short] = ACTIONS(1024), + [sym_primitive_type] = ACTIONS(1024), + [anon_sym_enum] = ACTIONS(1024), + [anon_sym_struct] = ACTIONS(1024), + [anon_sym_union] = ACTIONS(1024), + [anon_sym_if] = ACTIONS(1024), + [anon_sym_else] = ACTIONS(1024), + [anon_sym_switch] = ACTIONS(1024), + [anon_sym_case] = ACTIONS(1024), + [anon_sym_default] = ACTIONS(1024), + [anon_sym_while] = ACTIONS(1024), + [anon_sym_do] = ACTIONS(1024), + [anon_sym_for] = ACTIONS(1024), + [anon_sym_return] = ACTIONS(1024), + [anon_sym_break] = ACTIONS(1024), + [anon_sym_continue] = ACTIONS(1024), + [anon_sym_goto] = ACTIONS(1024), + [anon_sym_DASH_DASH] = ACTIONS(1026), + [anon_sym_PLUS_PLUS] = ACTIONS(1026), + [anon_sym_sizeof] = ACTIONS(1024), + [sym_number_literal] = ACTIONS(1026), + [anon_sym_L_SQUOTE] = ACTIONS(1026), + [anon_sym_u_SQUOTE] = ACTIONS(1026), + [anon_sym_U_SQUOTE] = ACTIONS(1026), + [anon_sym_u8_SQUOTE] = ACTIONS(1026), + [anon_sym_SQUOTE] = ACTIONS(1026), + [anon_sym_L_DQUOTE] = ACTIONS(1026), + [anon_sym_u_DQUOTE] = ACTIONS(1026), + [anon_sym_U_DQUOTE] = ACTIONS(1026), + [anon_sym_u8_DQUOTE] = ACTIONS(1026), + [anon_sym_DQUOTE] = ACTIONS(1026), + [sym_true] = ACTIONS(1024), + [sym_false] = ACTIONS(1024), + [sym_null] = ACTIONS(1024), + [sym_comment] = ACTIONS(3), + }, + [190] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(204), + [sym_attributed_statement] = STATE(204), + [sym_labeled_statement] = STATE(204), + [sym_expression_statement] = STATE(204), + [sym_if_statement] = STATE(204), + [sym_switch_statement] = STATE(204), + [sym_case_statement] = STATE(204), + [sym_while_statement] = STATE(204), + [sym_do_statement] = STATE(204), + [sym_for_statement] = STATE(204), + [sym_return_statement] = STATE(204), + [sym_break_statement] = STATE(204), + [sym_continue_statement] = STATE(204), + [sym_goto_statement] = STATE(204), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [191] = { + [sym_identifier] = ACTIONS(960), + [aux_sym_preproc_include_token1] = ACTIONS(960), + [aux_sym_preproc_def_token1] = ACTIONS(960), + [aux_sym_preproc_if_token1] = ACTIONS(960), + [aux_sym_preproc_if_token2] = ACTIONS(960), + [aux_sym_preproc_ifdef_token1] = ACTIONS(960), + [aux_sym_preproc_ifdef_token2] = ACTIONS(960), + [sym_preproc_directive] = ACTIONS(960), + [anon_sym_LPAREN2] = ACTIONS(962), + [anon_sym_BANG] = ACTIONS(962), + [anon_sym_TILDE] = ACTIONS(962), + [anon_sym_DASH] = ACTIONS(960), + [anon_sym_PLUS] = ACTIONS(960), + [anon_sym_STAR] = ACTIONS(962), + [anon_sym_AMP] = ACTIONS(962), + [anon_sym_SEMI] = ACTIONS(962), + [anon_sym_typedef] = ACTIONS(960), + [anon_sym_extern] = ACTIONS(960), + [anon_sym___attribute__] = ACTIONS(960), + [anon_sym_LBRACK_LBRACK] = ACTIONS(962), + [anon_sym___declspec] = ACTIONS(960), + [anon_sym___cdecl] = ACTIONS(960), + [anon_sym___clrcall] = ACTIONS(960), + [anon_sym___stdcall] = ACTIONS(960), + [anon_sym___fastcall] = ACTIONS(960), + [anon_sym___thiscall] = ACTIONS(960), + [anon_sym___vectorcall] = ACTIONS(960), + [anon_sym_LBRACE] = ACTIONS(962), + [anon_sym_static] = ACTIONS(960), + [anon_sym_auto] = ACTIONS(960), + [anon_sym_register] = ACTIONS(960), + [anon_sym_inline] = ACTIONS(960), + [anon_sym_const] = ACTIONS(960), + [anon_sym_volatile] = ACTIONS(960), + [anon_sym_restrict] = ACTIONS(960), + [anon_sym__Atomic] = ACTIONS(960), + [anon_sym_signed] = ACTIONS(960), + [anon_sym_unsigned] = ACTIONS(960), + [anon_sym_long] = ACTIONS(960), + [anon_sym_short] = ACTIONS(960), + [sym_primitive_type] = ACTIONS(960), + [anon_sym_enum] = ACTIONS(960), + [anon_sym_struct] = ACTIONS(960), + [anon_sym_union] = ACTIONS(960), + [anon_sym_if] = ACTIONS(960), + [anon_sym_else] = ACTIONS(960), + [anon_sym_switch] = ACTIONS(960), + [anon_sym_case] = ACTIONS(960), + [anon_sym_default] = ACTIONS(960), + [anon_sym_while] = ACTIONS(960), + [anon_sym_do] = ACTIONS(960), + [anon_sym_for] = ACTIONS(960), + [anon_sym_return] = ACTIONS(960), + [anon_sym_break] = ACTIONS(960), + [anon_sym_continue] = ACTIONS(960), + [anon_sym_goto] = ACTIONS(960), + [anon_sym_DASH_DASH] = ACTIONS(962), + [anon_sym_PLUS_PLUS] = ACTIONS(962), + [anon_sym_sizeof] = ACTIONS(960), + [sym_number_literal] = ACTIONS(962), + [anon_sym_L_SQUOTE] = ACTIONS(962), + [anon_sym_u_SQUOTE] = ACTIONS(962), + [anon_sym_U_SQUOTE] = ACTIONS(962), + [anon_sym_u8_SQUOTE] = ACTIONS(962), + [anon_sym_SQUOTE] = ACTIONS(962), + [anon_sym_L_DQUOTE] = ACTIONS(962), + [anon_sym_u_DQUOTE] = ACTIONS(962), + [anon_sym_U_DQUOTE] = ACTIONS(962), + [anon_sym_u8_DQUOTE] = ACTIONS(962), + [anon_sym_DQUOTE] = ACTIONS(962), + [sym_true] = ACTIONS(960), + [sym_false] = ACTIONS(960), + [sym_null] = ACTIONS(960), + [sym_comment] = ACTIONS(3), + }, + [192] = { + [ts_builtin_sym_end] = ACTIONS(958), + [sym_identifier] = ACTIONS(956), + [aux_sym_preproc_include_token1] = ACTIONS(956), + [aux_sym_preproc_def_token1] = ACTIONS(956), + [aux_sym_preproc_if_token1] = ACTIONS(956), + [aux_sym_preproc_ifdef_token1] = ACTIONS(956), + [aux_sym_preproc_ifdef_token2] = ACTIONS(956), + [sym_preproc_directive] = ACTIONS(956), + [anon_sym_LPAREN2] = ACTIONS(958), + [anon_sym_BANG] = ACTIONS(958), + [anon_sym_TILDE] = ACTIONS(958), + [anon_sym_DASH] = ACTIONS(956), + [anon_sym_PLUS] = ACTIONS(956), + [anon_sym_STAR] = ACTIONS(958), + [anon_sym_AMP] = ACTIONS(958), + [anon_sym_SEMI] = ACTIONS(958), + [anon_sym_typedef] = ACTIONS(956), + [anon_sym_extern] = ACTIONS(956), + [anon_sym___attribute__] = ACTIONS(956), + [anon_sym_LBRACK_LBRACK] = ACTIONS(958), + [anon_sym___declspec] = ACTIONS(956), + [anon_sym___cdecl] = ACTIONS(956), + [anon_sym___clrcall] = ACTIONS(956), + [anon_sym___stdcall] = ACTIONS(956), + [anon_sym___fastcall] = ACTIONS(956), + [anon_sym___thiscall] = ACTIONS(956), + [anon_sym___vectorcall] = ACTIONS(956), + [anon_sym_LBRACE] = ACTIONS(958), + [anon_sym_static] = ACTIONS(956), + [anon_sym_auto] = ACTIONS(956), + [anon_sym_register] = ACTIONS(956), + [anon_sym_inline] = ACTIONS(956), + [anon_sym_const] = ACTIONS(956), + [anon_sym_volatile] = ACTIONS(956), + [anon_sym_restrict] = ACTIONS(956), + [anon_sym__Atomic] = ACTIONS(956), + [anon_sym_signed] = ACTIONS(956), + [anon_sym_unsigned] = ACTIONS(956), + [anon_sym_long] = ACTIONS(956), + [anon_sym_short] = ACTIONS(956), + [sym_primitive_type] = ACTIONS(956), + [anon_sym_enum] = ACTIONS(956), + [anon_sym_struct] = ACTIONS(956), + [anon_sym_union] = ACTIONS(956), + [anon_sym_if] = ACTIONS(956), + [anon_sym_else] = ACTIONS(956), + [anon_sym_switch] = ACTIONS(956), + [anon_sym_case] = ACTIONS(956), + [anon_sym_default] = ACTIONS(956), + [anon_sym_while] = ACTIONS(956), + [anon_sym_do] = ACTIONS(956), + [anon_sym_for] = ACTIONS(956), + [anon_sym_return] = ACTIONS(956), + [anon_sym_break] = ACTIONS(956), + [anon_sym_continue] = ACTIONS(956), + [anon_sym_goto] = ACTIONS(956), + [anon_sym_DASH_DASH] = ACTIONS(958), + [anon_sym_PLUS_PLUS] = ACTIONS(958), + [anon_sym_sizeof] = ACTIONS(956), + [sym_number_literal] = ACTIONS(958), + [anon_sym_L_SQUOTE] = ACTIONS(958), + [anon_sym_u_SQUOTE] = ACTIONS(958), + [anon_sym_U_SQUOTE] = ACTIONS(958), + [anon_sym_u8_SQUOTE] = ACTIONS(958), + [anon_sym_SQUOTE] = ACTIONS(958), + [anon_sym_L_DQUOTE] = ACTIONS(958), + [anon_sym_u_DQUOTE] = ACTIONS(958), + [anon_sym_U_DQUOTE] = ACTIONS(958), + [anon_sym_u8_DQUOTE] = ACTIONS(958), + [anon_sym_DQUOTE] = ACTIONS(958), + [sym_true] = ACTIONS(956), + [sym_false] = ACTIONS(956), + [sym_null] = ACTIONS(956), + [sym_comment] = ACTIONS(3), + }, + [193] = { + [ts_builtin_sym_end] = ACTIONS(970), + [sym_identifier] = ACTIONS(968), + [aux_sym_preproc_include_token1] = ACTIONS(968), + [aux_sym_preproc_def_token1] = ACTIONS(968), + [aux_sym_preproc_if_token1] = ACTIONS(968), + [aux_sym_preproc_ifdef_token1] = ACTIONS(968), + [aux_sym_preproc_ifdef_token2] = ACTIONS(968), + [sym_preproc_directive] = ACTIONS(968), + [anon_sym_LPAREN2] = ACTIONS(970), + [anon_sym_BANG] = ACTIONS(970), + [anon_sym_TILDE] = ACTIONS(970), + [anon_sym_DASH] = ACTIONS(968), + [anon_sym_PLUS] = ACTIONS(968), + [anon_sym_STAR] = ACTIONS(970), + [anon_sym_AMP] = ACTIONS(970), + [anon_sym_SEMI] = ACTIONS(970), + [anon_sym_typedef] = ACTIONS(968), + [anon_sym_extern] = ACTIONS(968), + [anon_sym___attribute__] = ACTIONS(968), + [anon_sym_LBRACK_LBRACK] = ACTIONS(970), + [anon_sym___declspec] = ACTIONS(968), + [anon_sym___cdecl] = ACTIONS(968), + [anon_sym___clrcall] = ACTIONS(968), + [anon_sym___stdcall] = ACTIONS(968), + [anon_sym___fastcall] = ACTIONS(968), + [anon_sym___thiscall] = ACTIONS(968), + [anon_sym___vectorcall] = ACTIONS(968), + [anon_sym_LBRACE] = ACTIONS(970), + [anon_sym_static] = ACTIONS(968), + [anon_sym_auto] = ACTIONS(968), + [anon_sym_register] = ACTIONS(968), + [anon_sym_inline] = ACTIONS(968), + [anon_sym_const] = ACTIONS(968), + [anon_sym_volatile] = ACTIONS(968), + [anon_sym_restrict] = ACTIONS(968), + [anon_sym__Atomic] = ACTIONS(968), + [anon_sym_signed] = ACTIONS(968), + [anon_sym_unsigned] = ACTIONS(968), + [anon_sym_long] = ACTIONS(968), + [anon_sym_short] = ACTIONS(968), + [sym_primitive_type] = ACTIONS(968), + [anon_sym_enum] = ACTIONS(968), + [anon_sym_struct] = ACTIONS(968), + [anon_sym_union] = ACTIONS(968), + [anon_sym_if] = ACTIONS(968), + [anon_sym_else] = ACTIONS(968), + [anon_sym_switch] = ACTIONS(968), + [anon_sym_case] = ACTIONS(968), + [anon_sym_default] = ACTIONS(968), + [anon_sym_while] = ACTIONS(968), + [anon_sym_do] = ACTIONS(968), + [anon_sym_for] = ACTIONS(968), + [anon_sym_return] = ACTIONS(968), + [anon_sym_break] = ACTIONS(968), + [anon_sym_continue] = ACTIONS(968), + [anon_sym_goto] = ACTIONS(968), + [anon_sym_DASH_DASH] = ACTIONS(970), + [anon_sym_PLUS_PLUS] = ACTIONS(970), + [anon_sym_sizeof] = ACTIONS(968), + [sym_number_literal] = ACTIONS(970), + [anon_sym_L_SQUOTE] = ACTIONS(970), + [anon_sym_u_SQUOTE] = ACTIONS(970), + [anon_sym_U_SQUOTE] = ACTIONS(970), + [anon_sym_u8_SQUOTE] = ACTIONS(970), + [anon_sym_SQUOTE] = ACTIONS(970), + [anon_sym_L_DQUOTE] = ACTIONS(970), + [anon_sym_u_DQUOTE] = ACTIONS(970), + [anon_sym_U_DQUOTE] = ACTIONS(970), + [anon_sym_u8_DQUOTE] = ACTIONS(970), + [anon_sym_DQUOTE] = ACTIONS(970), + [sym_true] = ACTIONS(968), + [sym_false] = ACTIONS(968), + [sym_null] = ACTIONS(968), + [sym_comment] = ACTIONS(3), + }, + [194] = { + [sym_identifier] = ACTIONS(924), + [aux_sym_preproc_include_token1] = ACTIONS(924), + [aux_sym_preproc_def_token1] = ACTIONS(924), + [aux_sym_preproc_if_token1] = ACTIONS(924), + [aux_sym_preproc_if_token2] = ACTIONS(924), + [aux_sym_preproc_ifdef_token1] = ACTIONS(924), + [aux_sym_preproc_ifdef_token2] = ACTIONS(924), + [sym_preproc_directive] = ACTIONS(924), + [anon_sym_LPAREN2] = ACTIONS(926), + [anon_sym_BANG] = ACTIONS(926), + [anon_sym_TILDE] = ACTIONS(926), + [anon_sym_DASH] = ACTIONS(924), + [anon_sym_PLUS] = ACTIONS(924), + [anon_sym_STAR] = ACTIONS(926), + [anon_sym_AMP] = ACTIONS(926), + [anon_sym_SEMI] = ACTIONS(926), + [anon_sym_typedef] = ACTIONS(924), + [anon_sym_extern] = ACTIONS(924), + [anon_sym___attribute__] = ACTIONS(924), + [anon_sym_LBRACK_LBRACK] = ACTIONS(926), + [anon_sym___declspec] = ACTIONS(924), + [anon_sym___cdecl] = ACTIONS(924), + [anon_sym___clrcall] = ACTIONS(924), + [anon_sym___stdcall] = ACTIONS(924), + [anon_sym___fastcall] = ACTIONS(924), + [anon_sym___thiscall] = ACTIONS(924), + [anon_sym___vectorcall] = ACTIONS(924), + [anon_sym_LBRACE] = ACTIONS(926), + [anon_sym_static] = ACTIONS(924), + [anon_sym_auto] = ACTIONS(924), + [anon_sym_register] = ACTIONS(924), + [anon_sym_inline] = ACTIONS(924), + [anon_sym_const] = ACTIONS(924), + [anon_sym_volatile] = ACTIONS(924), + [anon_sym_restrict] = ACTIONS(924), + [anon_sym__Atomic] = ACTIONS(924), + [anon_sym_signed] = ACTIONS(924), + [anon_sym_unsigned] = ACTIONS(924), + [anon_sym_long] = ACTIONS(924), + [anon_sym_short] = ACTIONS(924), + [sym_primitive_type] = ACTIONS(924), + [anon_sym_enum] = ACTIONS(924), + [anon_sym_struct] = ACTIONS(924), + [anon_sym_union] = ACTIONS(924), + [anon_sym_if] = ACTIONS(924), + [anon_sym_else] = ACTIONS(924), + [anon_sym_switch] = ACTIONS(924), + [anon_sym_case] = ACTIONS(924), + [anon_sym_default] = ACTIONS(924), + [anon_sym_while] = ACTIONS(924), + [anon_sym_do] = ACTIONS(924), + [anon_sym_for] = ACTIONS(924), + [anon_sym_return] = ACTIONS(924), + [anon_sym_break] = ACTIONS(924), + [anon_sym_continue] = ACTIONS(924), + [anon_sym_goto] = ACTIONS(924), + [anon_sym_DASH_DASH] = ACTIONS(926), + [anon_sym_PLUS_PLUS] = ACTIONS(926), + [anon_sym_sizeof] = ACTIONS(924), + [sym_number_literal] = ACTIONS(926), + [anon_sym_L_SQUOTE] = ACTIONS(926), + [anon_sym_u_SQUOTE] = ACTIONS(926), + [anon_sym_U_SQUOTE] = ACTIONS(926), + [anon_sym_u8_SQUOTE] = ACTIONS(926), + [anon_sym_SQUOTE] = ACTIONS(926), + [anon_sym_L_DQUOTE] = ACTIONS(926), + [anon_sym_u_DQUOTE] = ACTIONS(926), + [anon_sym_U_DQUOTE] = ACTIONS(926), + [anon_sym_u8_DQUOTE] = ACTIONS(926), + [anon_sym_DQUOTE] = ACTIONS(926), + [sym_true] = ACTIONS(924), + [sym_false] = ACTIONS(924), + [sym_null] = ACTIONS(924), + [sym_comment] = ACTIONS(3), + }, + [195] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(212), + [sym_attributed_statement] = STATE(212), + [sym_labeled_statement] = STATE(212), + [sym_expression_statement] = STATE(212), + [sym_if_statement] = STATE(212), + [sym_switch_statement] = STATE(212), + [sym_case_statement] = STATE(212), + [sym_while_statement] = STATE(212), + [sym_do_statement] = STATE(212), + [sym_for_statement] = STATE(212), + [sym_return_statement] = STATE(212), + [sym_break_statement] = STATE(212), + [sym_continue_statement] = STATE(212), + [sym_goto_statement] = STATE(212), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [196] = { + [ts_builtin_sym_end] = ACTIONS(974), + [sym_identifier] = ACTIONS(972), + [aux_sym_preproc_include_token1] = ACTIONS(972), + [aux_sym_preproc_def_token1] = ACTIONS(972), + [aux_sym_preproc_if_token1] = ACTIONS(972), + [aux_sym_preproc_ifdef_token1] = ACTIONS(972), + [aux_sym_preproc_ifdef_token2] = ACTIONS(972), + [sym_preproc_directive] = ACTIONS(972), + [anon_sym_LPAREN2] = ACTIONS(974), + [anon_sym_BANG] = ACTIONS(974), + [anon_sym_TILDE] = ACTIONS(974), + [anon_sym_DASH] = ACTIONS(972), + [anon_sym_PLUS] = ACTIONS(972), + [anon_sym_STAR] = ACTIONS(974), + [anon_sym_AMP] = ACTIONS(974), + [anon_sym_SEMI] = ACTIONS(974), + [anon_sym_typedef] = ACTIONS(972), + [anon_sym_extern] = ACTIONS(972), + [anon_sym___attribute__] = ACTIONS(972), + [anon_sym_LBRACK_LBRACK] = ACTIONS(974), + [anon_sym___declspec] = ACTIONS(972), + [anon_sym___cdecl] = ACTIONS(972), + [anon_sym___clrcall] = ACTIONS(972), + [anon_sym___stdcall] = ACTIONS(972), + [anon_sym___fastcall] = ACTIONS(972), + [anon_sym___thiscall] = ACTIONS(972), + [anon_sym___vectorcall] = ACTIONS(972), + [anon_sym_LBRACE] = ACTIONS(974), + [anon_sym_static] = ACTIONS(972), + [anon_sym_auto] = ACTIONS(972), + [anon_sym_register] = ACTIONS(972), + [anon_sym_inline] = ACTIONS(972), + [anon_sym_const] = ACTIONS(972), + [anon_sym_volatile] = ACTIONS(972), + [anon_sym_restrict] = ACTIONS(972), + [anon_sym__Atomic] = ACTIONS(972), + [anon_sym_signed] = ACTIONS(972), + [anon_sym_unsigned] = ACTIONS(972), + [anon_sym_long] = ACTIONS(972), + [anon_sym_short] = ACTIONS(972), + [sym_primitive_type] = ACTIONS(972), + [anon_sym_enum] = ACTIONS(972), + [anon_sym_struct] = ACTIONS(972), + [anon_sym_union] = ACTIONS(972), + [anon_sym_if] = ACTIONS(972), + [anon_sym_else] = ACTIONS(972), + [anon_sym_switch] = ACTIONS(972), + [anon_sym_case] = ACTIONS(972), + [anon_sym_default] = ACTIONS(972), + [anon_sym_while] = ACTIONS(972), + [anon_sym_do] = ACTIONS(972), + [anon_sym_for] = ACTIONS(972), + [anon_sym_return] = ACTIONS(972), + [anon_sym_break] = ACTIONS(972), + [anon_sym_continue] = ACTIONS(972), + [anon_sym_goto] = ACTIONS(972), + [anon_sym_DASH_DASH] = ACTIONS(974), + [anon_sym_PLUS_PLUS] = ACTIONS(974), + [anon_sym_sizeof] = ACTIONS(972), + [sym_number_literal] = ACTIONS(974), + [anon_sym_L_SQUOTE] = ACTIONS(974), + [anon_sym_u_SQUOTE] = ACTIONS(974), + [anon_sym_U_SQUOTE] = ACTIONS(974), + [anon_sym_u8_SQUOTE] = ACTIONS(974), + [anon_sym_SQUOTE] = ACTIONS(974), + [anon_sym_L_DQUOTE] = ACTIONS(974), + [anon_sym_u_DQUOTE] = ACTIONS(974), + [anon_sym_U_DQUOTE] = ACTIONS(974), + [anon_sym_u8_DQUOTE] = ACTIONS(974), + [anon_sym_DQUOTE] = ACTIONS(974), + [sym_true] = ACTIONS(972), + [sym_false] = ACTIONS(972), + [sym_null] = ACTIONS(972), + [sym_comment] = ACTIONS(3), + }, + [197] = { + [ts_builtin_sym_end] = ACTIONS(978), + [sym_identifier] = ACTIONS(976), + [aux_sym_preproc_include_token1] = ACTIONS(976), + [aux_sym_preproc_def_token1] = ACTIONS(976), + [aux_sym_preproc_if_token1] = ACTIONS(976), + [aux_sym_preproc_ifdef_token1] = ACTIONS(976), + [aux_sym_preproc_ifdef_token2] = ACTIONS(976), + [sym_preproc_directive] = ACTIONS(976), + [anon_sym_LPAREN2] = ACTIONS(978), + [anon_sym_BANG] = ACTIONS(978), + [anon_sym_TILDE] = ACTIONS(978), + [anon_sym_DASH] = ACTIONS(976), + [anon_sym_PLUS] = ACTIONS(976), + [anon_sym_STAR] = ACTIONS(978), + [anon_sym_AMP] = ACTIONS(978), + [anon_sym_SEMI] = ACTIONS(978), + [anon_sym_typedef] = ACTIONS(976), + [anon_sym_extern] = ACTIONS(976), + [anon_sym___attribute__] = ACTIONS(976), + [anon_sym_LBRACK_LBRACK] = ACTIONS(978), + [anon_sym___declspec] = ACTIONS(976), + [anon_sym___cdecl] = ACTIONS(976), + [anon_sym___clrcall] = ACTIONS(976), + [anon_sym___stdcall] = ACTIONS(976), + [anon_sym___fastcall] = ACTIONS(976), + [anon_sym___thiscall] = ACTIONS(976), + [anon_sym___vectorcall] = ACTIONS(976), + [anon_sym_LBRACE] = ACTIONS(978), + [anon_sym_static] = ACTIONS(976), + [anon_sym_auto] = ACTIONS(976), + [anon_sym_register] = ACTIONS(976), + [anon_sym_inline] = ACTIONS(976), + [anon_sym_const] = ACTIONS(976), + [anon_sym_volatile] = ACTIONS(976), + [anon_sym_restrict] = ACTIONS(976), + [anon_sym__Atomic] = ACTIONS(976), + [anon_sym_signed] = ACTIONS(976), + [anon_sym_unsigned] = ACTIONS(976), + [anon_sym_long] = ACTIONS(976), + [anon_sym_short] = ACTIONS(976), + [sym_primitive_type] = ACTIONS(976), + [anon_sym_enum] = ACTIONS(976), + [anon_sym_struct] = ACTIONS(976), + [anon_sym_union] = ACTIONS(976), + [anon_sym_if] = ACTIONS(976), + [anon_sym_else] = ACTIONS(976), + [anon_sym_switch] = ACTIONS(976), + [anon_sym_case] = ACTIONS(976), + [anon_sym_default] = ACTIONS(976), + [anon_sym_while] = ACTIONS(976), + [anon_sym_do] = ACTIONS(976), + [anon_sym_for] = ACTIONS(976), + [anon_sym_return] = ACTIONS(976), + [anon_sym_break] = ACTIONS(976), + [anon_sym_continue] = ACTIONS(976), + [anon_sym_goto] = ACTIONS(976), + [anon_sym_DASH_DASH] = ACTIONS(978), + [anon_sym_PLUS_PLUS] = ACTIONS(978), + [anon_sym_sizeof] = ACTIONS(976), + [sym_number_literal] = ACTIONS(978), + [anon_sym_L_SQUOTE] = ACTIONS(978), + [anon_sym_u_SQUOTE] = ACTIONS(978), + [anon_sym_U_SQUOTE] = ACTIONS(978), + [anon_sym_u8_SQUOTE] = ACTIONS(978), + [anon_sym_SQUOTE] = ACTIONS(978), + [anon_sym_L_DQUOTE] = ACTIONS(978), + [anon_sym_u_DQUOTE] = ACTIONS(978), + [anon_sym_U_DQUOTE] = ACTIONS(978), + [anon_sym_u8_DQUOTE] = ACTIONS(978), + [anon_sym_DQUOTE] = ACTIONS(978), + [sym_true] = ACTIONS(976), + [sym_false] = ACTIONS(976), + [sym_null] = ACTIONS(976), + [sym_comment] = ACTIONS(3), + }, + [198] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(216), + [sym_attributed_statement] = STATE(216), + [sym_labeled_statement] = STATE(216), + [sym_expression_statement] = STATE(216), + [sym_if_statement] = STATE(216), + [sym_switch_statement] = STATE(216), + [sym_case_statement] = STATE(216), + [sym_while_statement] = STATE(216), + [sym_do_statement] = STATE(216), + [sym_for_statement] = STATE(216), + [sym_return_statement] = STATE(216), + [sym_break_statement] = STATE(216), + [sym_continue_statement] = STATE(216), + [sym_goto_statement] = STATE(216), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [199] = { + [sym_identifier] = ACTIONS(1004), + [aux_sym_preproc_include_token1] = ACTIONS(1004), + [aux_sym_preproc_def_token1] = ACTIONS(1004), + [aux_sym_preproc_if_token1] = ACTIONS(1004), + [aux_sym_preproc_if_token2] = ACTIONS(1004), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1004), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1004), + [sym_preproc_directive] = ACTIONS(1004), + [anon_sym_LPAREN2] = ACTIONS(1006), + [anon_sym_BANG] = ACTIONS(1006), + [anon_sym_TILDE] = ACTIONS(1006), + [anon_sym_DASH] = ACTIONS(1004), + [anon_sym_PLUS] = ACTIONS(1004), + [anon_sym_STAR] = ACTIONS(1006), + [anon_sym_AMP] = ACTIONS(1006), + [anon_sym_SEMI] = ACTIONS(1006), + [anon_sym_typedef] = ACTIONS(1004), + [anon_sym_extern] = ACTIONS(1004), + [anon_sym___attribute__] = ACTIONS(1004), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1006), + [anon_sym___declspec] = ACTIONS(1004), + [anon_sym___cdecl] = ACTIONS(1004), + [anon_sym___clrcall] = ACTIONS(1004), + [anon_sym___stdcall] = ACTIONS(1004), + [anon_sym___fastcall] = ACTIONS(1004), + [anon_sym___thiscall] = ACTIONS(1004), + [anon_sym___vectorcall] = ACTIONS(1004), + [anon_sym_LBRACE] = ACTIONS(1006), + [anon_sym_static] = ACTIONS(1004), + [anon_sym_auto] = ACTIONS(1004), + [anon_sym_register] = ACTIONS(1004), + [anon_sym_inline] = ACTIONS(1004), + [anon_sym_const] = ACTIONS(1004), + [anon_sym_volatile] = ACTIONS(1004), + [anon_sym_restrict] = ACTIONS(1004), + [anon_sym__Atomic] = ACTIONS(1004), + [anon_sym_signed] = ACTIONS(1004), + [anon_sym_unsigned] = ACTIONS(1004), + [anon_sym_long] = ACTIONS(1004), + [anon_sym_short] = ACTIONS(1004), + [sym_primitive_type] = ACTIONS(1004), + [anon_sym_enum] = ACTIONS(1004), + [anon_sym_struct] = ACTIONS(1004), + [anon_sym_union] = ACTIONS(1004), + [anon_sym_if] = ACTIONS(1004), + [anon_sym_else] = ACTIONS(1004), + [anon_sym_switch] = ACTIONS(1004), + [anon_sym_case] = ACTIONS(1004), + [anon_sym_default] = ACTIONS(1004), + [anon_sym_while] = ACTIONS(1004), + [anon_sym_do] = ACTIONS(1004), + [anon_sym_for] = ACTIONS(1004), + [anon_sym_return] = ACTIONS(1004), + [anon_sym_break] = ACTIONS(1004), + [anon_sym_continue] = ACTIONS(1004), + [anon_sym_goto] = ACTIONS(1004), + [anon_sym_DASH_DASH] = ACTIONS(1006), + [anon_sym_PLUS_PLUS] = ACTIONS(1006), + [anon_sym_sizeof] = ACTIONS(1004), + [sym_number_literal] = ACTIONS(1006), + [anon_sym_L_SQUOTE] = ACTIONS(1006), + [anon_sym_u_SQUOTE] = ACTIONS(1006), + [anon_sym_U_SQUOTE] = ACTIONS(1006), + [anon_sym_u8_SQUOTE] = ACTIONS(1006), + [anon_sym_SQUOTE] = ACTIONS(1006), + [anon_sym_L_DQUOTE] = ACTIONS(1006), + [anon_sym_u_DQUOTE] = ACTIONS(1006), + [anon_sym_U_DQUOTE] = ACTIONS(1006), + [anon_sym_u8_DQUOTE] = ACTIONS(1006), + [anon_sym_DQUOTE] = ACTIONS(1006), + [sym_true] = ACTIONS(1004), + [sym_false] = ACTIONS(1004), + [sym_null] = ACTIONS(1004), + [sym_comment] = ACTIONS(3), + }, + [200] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(1414), + [sym_attributed_statement] = STATE(1414), + [sym_labeled_statement] = STATE(1414), + [sym_expression_statement] = STATE(1414), + [sym_if_statement] = STATE(1414), + [sym_switch_statement] = STATE(1414), + [sym_case_statement] = STATE(1414), + [sym_while_statement] = STATE(1414), + [sym_do_statement] = STATE(1414), + [sym_for_statement] = STATE(1414), + [sym_return_statement] = STATE(1414), + [sym_break_statement] = STATE(1414), + [sym_continue_statement] = STATE(1414), + [sym_goto_statement] = STATE(1414), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [201] = { + [sym_identifier] = ACTIONS(932), + [aux_sym_preproc_include_token1] = ACTIONS(932), + [aux_sym_preproc_def_token1] = ACTIONS(932), + [aux_sym_preproc_if_token1] = ACTIONS(932), + [aux_sym_preproc_if_token2] = ACTIONS(932), + [aux_sym_preproc_ifdef_token1] = ACTIONS(932), + [aux_sym_preproc_ifdef_token2] = ACTIONS(932), + [sym_preproc_directive] = ACTIONS(932), + [anon_sym_LPAREN2] = ACTIONS(934), + [anon_sym_BANG] = ACTIONS(934), + [anon_sym_TILDE] = ACTIONS(934), + [anon_sym_DASH] = ACTIONS(932), + [anon_sym_PLUS] = ACTIONS(932), + [anon_sym_STAR] = ACTIONS(934), + [anon_sym_AMP] = ACTIONS(934), + [anon_sym_SEMI] = ACTIONS(934), + [anon_sym_typedef] = ACTIONS(932), + [anon_sym_extern] = ACTIONS(932), + [anon_sym___attribute__] = ACTIONS(932), + [anon_sym_LBRACK_LBRACK] = ACTIONS(934), + [anon_sym___declspec] = ACTIONS(932), + [anon_sym___cdecl] = ACTIONS(932), + [anon_sym___clrcall] = ACTIONS(932), + [anon_sym___stdcall] = ACTIONS(932), + [anon_sym___fastcall] = ACTIONS(932), + [anon_sym___thiscall] = ACTIONS(932), + [anon_sym___vectorcall] = ACTIONS(932), + [anon_sym_LBRACE] = ACTIONS(934), + [anon_sym_static] = ACTIONS(932), + [anon_sym_auto] = ACTIONS(932), + [anon_sym_register] = ACTIONS(932), + [anon_sym_inline] = ACTIONS(932), + [anon_sym_const] = ACTIONS(932), + [anon_sym_volatile] = ACTIONS(932), + [anon_sym_restrict] = ACTIONS(932), + [anon_sym__Atomic] = ACTIONS(932), + [anon_sym_signed] = ACTIONS(932), + [anon_sym_unsigned] = ACTIONS(932), + [anon_sym_long] = ACTIONS(932), + [anon_sym_short] = ACTIONS(932), + [sym_primitive_type] = ACTIONS(932), + [anon_sym_enum] = ACTIONS(932), + [anon_sym_struct] = ACTIONS(932), + [anon_sym_union] = ACTIONS(932), + [anon_sym_if] = ACTIONS(932), + [anon_sym_else] = ACTIONS(932), + [anon_sym_switch] = ACTIONS(932), + [anon_sym_case] = ACTIONS(932), + [anon_sym_default] = ACTIONS(932), + [anon_sym_while] = ACTIONS(932), + [anon_sym_do] = ACTIONS(932), + [anon_sym_for] = ACTIONS(932), + [anon_sym_return] = ACTIONS(932), + [anon_sym_break] = ACTIONS(932), + [anon_sym_continue] = ACTIONS(932), + [anon_sym_goto] = ACTIONS(932), + [anon_sym_DASH_DASH] = ACTIONS(934), + [anon_sym_PLUS_PLUS] = ACTIONS(934), + [anon_sym_sizeof] = ACTIONS(932), + [sym_number_literal] = ACTIONS(934), + [anon_sym_L_SQUOTE] = ACTIONS(934), + [anon_sym_u_SQUOTE] = ACTIONS(934), + [anon_sym_U_SQUOTE] = ACTIONS(934), + [anon_sym_u8_SQUOTE] = ACTIONS(934), + [anon_sym_SQUOTE] = ACTIONS(934), + [anon_sym_L_DQUOTE] = ACTIONS(934), + [anon_sym_u_DQUOTE] = ACTIONS(934), + [anon_sym_U_DQUOTE] = ACTIONS(934), + [anon_sym_u8_DQUOTE] = ACTIONS(934), + [anon_sym_DQUOTE] = ACTIONS(934), + [sym_true] = ACTIONS(932), + [sym_false] = ACTIONS(932), + [sym_null] = ACTIONS(932), + [sym_comment] = ACTIONS(3), + }, + [202] = { + [sym_identifier] = ACTIONS(936), + [aux_sym_preproc_include_token1] = ACTIONS(936), + [aux_sym_preproc_def_token1] = ACTIONS(936), + [aux_sym_preproc_if_token1] = ACTIONS(936), + [aux_sym_preproc_if_token2] = ACTIONS(936), + [aux_sym_preproc_ifdef_token1] = ACTIONS(936), + [aux_sym_preproc_ifdef_token2] = ACTIONS(936), + [sym_preproc_directive] = ACTIONS(936), + [anon_sym_LPAREN2] = ACTIONS(938), + [anon_sym_BANG] = ACTIONS(938), + [anon_sym_TILDE] = ACTIONS(938), + [anon_sym_DASH] = ACTIONS(936), + [anon_sym_PLUS] = ACTIONS(936), + [anon_sym_STAR] = ACTIONS(938), + [anon_sym_AMP] = ACTIONS(938), + [anon_sym_SEMI] = ACTIONS(938), + [anon_sym_typedef] = ACTIONS(936), + [anon_sym_extern] = ACTIONS(936), + [anon_sym___attribute__] = ACTIONS(936), + [anon_sym_LBRACK_LBRACK] = ACTIONS(938), + [anon_sym___declspec] = ACTIONS(936), + [anon_sym___cdecl] = ACTIONS(936), + [anon_sym___clrcall] = ACTIONS(936), + [anon_sym___stdcall] = ACTIONS(936), + [anon_sym___fastcall] = ACTIONS(936), + [anon_sym___thiscall] = ACTIONS(936), + [anon_sym___vectorcall] = ACTIONS(936), + [anon_sym_LBRACE] = ACTIONS(938), + [anon_sym_static] = ACTIONS(936), + [anon_sym_auto] = ACTIONS(936), + [anon_sym_register] = ACTIONS(936), + [anon_sym_inline] = ACTIONS(936), + [anon_sym_const] = ACTIONS(936), + [anon_sym_volatile] = ACTIONS(936), + [anon_sym_restrict] = ACTIONS(936), + [anon_sym__Atomic] = ACTIONS(936), + [anon_sym_signed] = ACTIONS(936), + [anon_sym_unsigned] = ACTIONS(936), + [anon_sym_long] = ACTIONS(936), + [anon_sym_short] = ACTIONS(936), + [sym_primitive_type] = ACTIONS(936), + [anon_sym_enum] = ACTIONS(936), + [anon_sym_struct] = ACTIONS(936), + [anon_sym_union] = ACTIONS(936), + [anon_sym_if] = ACTIONS(936), + [anon_sym_else] = ACTIONS(936), + [anon_sym_switch] = ACTIONS(936), + [anon_sym_case] = ACTIONS(936), + [anon_sym_default] = ACTIONS(936), + [anon_sym_while] = ACTIONS(936), + [anon_sym_do] = ACTIONS(936), + [anon_sym_for] = ACTIONS(936), + [anon_sym_return] = ACTIONS(936), + [anon_sym_break] = ACTIONS(936), + [anon_sym_continue] = ACTIONS(936), + [anon_sym_goto] = ACTIONS(936), + [anon_sym_DASH_DASH] = ACTIONS(938), + [anon_sym_PLUS_PLUS] = ACTIONS(938), + [anon_sym_sizeof] = ACTIONS(936), + [sym_number_literal] = ACTIONS(938), + [anon_sym_L_SQUOTE] = ACTIONS(938), + [anon_sym_u_SQUOTE] = ACTIONS(938), + [anon_sym_U_SQUOTE] = ACTIONS(938), + [anon_sym_u8_SQUOTE] = ACTIONS(938), + [anon_sym_SQUOTE] = ACTIONS(938), + [anon_sym_L_DQUOTE] = ACTIONS(938), + [anon_sym_u_DQUOTE] = ACTIONS(938), + [anon_sym_U_DQUOTE] = ACTIONS(938), + [anon_sym_u8_DQUOTE] = ACTIONS(938), + [anon_sym_DQUOTE] = ACTIONS(938), + [sym_true] = ACTIONS(936), + [sym_false] = ACTIONS(936), + [sym_null] = ACTIONS(936), + [sym_comment] = ACTIONS(3), + }, + [203] = { + [sym_attribute_declaration] = STATE(247), + [sym_compound_statement] = STATE(79), + [sym_attributed_statement] = STATE(79), + [sym_labeled_statement] = STATE(79), + [sym_expression_statement] = STATE(79), + [sym_if_statement] = STATE(79), + [sym_switch_statement] = STATE(79), + [sym_case_statement] = STATE(79), + [sym_while_statement] = STATE(79), + [sym_do_statement] = STATE(79), + [sym_for_statement] = STATE(79), + [sym_return_statement] = STATE(79), + [sym_break_statement] = STATE(79), + [sym_continue_statement] = STATE(79), + [sym_goto_statement] = STATE(79), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [sym_identifier] = ACTIONS(1209), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [204] = { + [ts_builtin_sym_end] = ACTIONS(982), + [sym_identifier] = ACTIONS(980), + [aux_sym_preproc_include_token1] = ACTIONS(980), + [aux_sym_preproc_def_token1] = ACTIONS(980), + [aux_sym_preproc_if_token1] = ACTIONS(980), + [aux_sym_preproc_ifdef_token1] = ACTIONS(980), + [aux_sym_preproc_ifdef_token2] = ACTIONS(980), + [sym_preproc_directive] = ACTIONS(980), + [anon_sym_LPAREN2] = ACTIONS(982), + [anon_sym_BANG] = ACTIONS(982), + [anon_sym_TILDE] = ACTIONS(982), + [anon_sym_DASH] = ACTIONS(980), + [anon_sym_PLUS] = ACTIONS(980), + [anon_sym_STAR] = ACTIONS(982), + [anon_sym_AMP] = ACTIONS(982), + [anon_sym_SEMI] = ACTIONS(982), + [anon_sym_typedef] = ACTIONS(980), + [anon_sym_extern] = ACTIONS(980), + [anon_sym___attribute__] = ACTIONS(980), + [anon_sym_LBRACK_LBRACK] = ACTIONS(982), + [anon_sym___declspec] = ACTIONS(980), + [anon_sym___cdecl] = ACTIONS(980), + [anon_sym___clrcall] = ACTIONS(980), + [anon_sym___stdcall] = ACTIONS(980), + [anon_sym___fastcall] = ACTIONS(980), + [anon_sym___thiscall] = ACTIONS(980), + [anon_sym___vectorcall] = ACTIONS(980), + [anon_sym_LBRACE] = ACTIONS(982), + [anon_sym_static] = ACTIONS(980), + [anon_sym_auto] = ACTIONS(980), + [anon_sym_register] = ACTIONS(980), + [anon_sym_inline] = ACTIONS(980), + [anon_sym_const] = ACTIONS(980), + [anon_sym_volatile] = ACTIONS(980), + [anon_sym_restrict] = ACTIONS(980), + [anon_sym__Atomic] = ACTIONS(980), + [anon_sym_signed] = ACTIONS(980), + [anon_sym_unsigned] = ACTIONS(980), + [anon_sym_long] = ACTIONS(980), + [anon_sym_short] = ACTIONS(980), + [sym_primitive_type] = ACTIONS(980), + [anon_sym_enum] = ACTIONS(980), + [anon_sym_struct] = ACTIONS(980), + [anon_sym_union] = ACTIONS(980), + [anon_sym_if] = ACTIONS(980), + [anon_sym_else] = ACTIONS(980), + [anon_sym_switch] = ACTIONS(980), + [anon_sym_case] = ACTIONS(980), + [anon_sym_default] = ACTIONS(980), + [anon_sym_while] = ACTIONS(980), + [anon_sym_do] = ACTIONS(980), + [anon_sym_for] = ACTIONS(980), + [anon_sym_return] = ACTIONS(980), + [anon_sym_break] = ACTIONS(980), + [anon_sym_continue] = ACTIONS(980), + [anon_sym_goto] = ACTIONS(980), + [anon_sym_DASH_DASH] = ACTIONS(982), + [anon_sym_PLUS_PLUS] = ACTIONS(982), + [anon_sym_sizeof] = ACTIONS(980), + [sym_number_literal] = ACTIONS(982), + [anon_sym_L_SQUOTE] = ACTIONS(982), + [anon_sym_u_SQUOTE] = ACTIONS(982), + [anon_sym_U_SQUOTE] = ACTIONS(982), + [anon_sym_u8_SQUOTE] = ACTIONS(982), + [anon_sym_SQUOTE] = ACTIONS(982), + [anon_sym_L_DQUOTE] = ACTIONS(982), + [anon_sym_u_DQUOTE] = ACTIONS(982), + [anon_sym_U_DQUOTE] = ACTIONS(982), + [anon_sym_u8_DQUOTE] = ACTIONS(982), + [anon_sym_DQUOTE] = ACTIONS(982), + [sym_true] = ACTIONS(980), + [sym_false] = ACTIONS(980), + [sym_null] = ACTIONS(980), + [sym_comment] = ACTIONS(3), + }, + [205] = { + [sym_attribute_declaration] = STATE(153), + [sym_compound_statement] = STATE(211), + [sym_attributed_statement] = STATE(211), + [sym_labeled_statement] = STATE(211), + [sym_expression_statement] = STATE(211), + [sym_if_statement] = STATE(211), + [sym_switch_statement] = STATE(211), + [sym_case_statement] = STATE(211), + [sym_while_statement] = STATE(211), + [sym_do_statement] = STATE(211), + [sym_for_statement] = STATE(211), + [sym_return_statement] = STATE(211), + [sym_break_statement] = STATE(211), + [sym_continue_statement] = STATE(211), + [sym_goto_statement] = STATE(211), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [sym_identifier] = ACTIONS(1207), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [206] = { + [sym_attribute_declaration] = STATE(153), + [sym_compound_statement] = STATE(217), + [sym_attributed_statement] = STATE(217), + [sym_labeled_statement] = STATE(217), + [sym_expression_statement] = STATE(217), + [sym_if_statement] = STATE(217), + [sym_switch_statement] = STATE(217), + [sym_case_statement] = STATE(217), + [sym_while_statement] = STATE(217), + [sym_do_statement] = STATE(217), + [sym_for_statement] = STATE(217), + [sym_return_statement] = STATE(217), + [sym_break_statement] = STATE(217), + [sym_continue_statement] = STATE(217), + [sym_goto_statement] = STATE(217), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [sym_identifier] = ACTIONS(1207), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [207] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(145), + [sym_attributed_statement] = STATE(145), + [sym_labeled_statement] = STATE(145), + [sym_expression_statement] = STATE(145), + [sym_if_statement] = STATE(145), + [sym_switch_statement] = STATE(145), + [sym_case_statement] = STATE(145), + [sym_while_statement] = STATE(145), + [sym_do_statement] = STATE(145), + [sym_for_statement] = STATE(145), + [sym_return_statement] = STATE(145), + [sym_break_statement] = STATE(145), + [sym_continue_statement] = STATE(145), + [sym_goto_statement] = STATE(145), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [208] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(218), + [sym_attributed_statement] = STATE(218), + [sym_labeled_statement] = STATE(218), + [sym_expression_statement] = STATE(218), + [sym_if_statement] = STATE(218), + [sym_switch_statement] = STATE(218), + [sym_case_statement] = STATE(218), + [sym_while_statement] = STATE(218), + [sym_do_statement] = STATE(218), + [sym_for_statement] = STATE(218), + [sym_return_statement] = STATE(218), + [sym_break_statement] = STATE(218), + [sym_continue_statement] = STATE(218), + [sym_goto_statement] = STATE(218), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [209] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(223), + [sym_attributed_statement] = STATE(223), + [sym_labeled_statement] = STATE(223), + [sym_expression_statement] = STATE(223), + [sym_if_statement] = STATE(223), + [sym_switch_statement] = STATE(223), + [sym_case_statement] = STATE(223), + [sym_while_statement] = STATE(223), + [sym_do_statement] = STATE(223), + [sym_for_statement] = STATE(223), + [sym_return_statement] = STATE(223), + [sym_break_statement] = STATE(223), + [sym_continue_statement] = STATE(223), + [sym_goto_statement] = STATE(223), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [210] = { + [sym_identifier] = ACTIONS(940), + [aux_sym_preproc_include_token1] = ACTIONS(940), + [aux_sym_preproc_def_token1] = ACTIONS(940), + [aux_sym_preproc_if_token1] = ACTIONS(940), + [aux_sym_preproc_if_token2] = ACTIONS(940), + [aux_sym_preproc_ifdef_token1] = ACTIONS(940), + [aux_sym_preproc_ifdef_token2] = ACTIONS(940), + [sym_preproc_directive] = ACTIONS(940), + [anon_sym_LPAREN2] = ACTIONS(942), + [anon_sym_BANG] = ACTIONS(942), + [anon_sym_TILDE] = ACTIONS(942), + [anon_sym_DASH] = ACTIONS(940), + [anon_sym_PLUS] = ACTIONS(940), + [anon_sym_STAR] = ACTIONS(942), + [anon_sym_AMP] = ACTIONS(942), + [anon_sym_SEMI] = ACTIONS(942), + [anon_sym_typedef] = ACTIONS(940), + [anon_sym_extern] = ACTIONS(940), + [anon_sym___attribute__] = ACTIONS(940), + [anon_sym_LBRACK_LBRACK] = ACTIONS(942), + [anon_sym___declspec] = ACTIONS(940), + [anon_sym___cdecl] = ACTIONS(940), + [anon_sym___clrcall] = ACTIONS(940), + [anon_sym___stdcall] = ACTIONS(940), + [anon_sym___fastcall] = ACTIONS(940), + [anon_sym___thiscall] = ACTIONS(940), + [anon_sym___vectorcall] = ACTIONS(940), + [anon_sym_LBRACE] = ACTIONS(942), + [anon_sym_static] = ACTIONS(940), + [anon_sym_auto] = ACTIONS(940), + [anon_sym_register] = ACTIONS(940), + [anon_sym_inline] = ACTIONS(940), + [anon_sym_const] = ACTIONS(940), + [anon_sym_volatile] = ACTIONS(940), + [anon_sym_restrict] = ACTIONS(940), + [anon_sym__Atomic] = ACTIONS(940), + [anon_sym_signed] = ACTIONS(940), + [anon_sym_unsigned] = ACTIONS(940), + [anon_sym_long] = ACTIONS(940), + [anon_sym_short] = ACTIONS(940), + [sym_primitive_type] = ACTIONS(940), + [anon_sym_enum] = ACTIONS(940), + [anon_sym_struct] = ACTIONS(940), + [anon_sym_union] = ACTIONS(940), + [anon_sym_if] = ACTIONS(940), + [anon_sym_else] = ACTIONS(940), + [anon_sym_switch] = ACTIONS(940), + [anon_sym_case] = ACTIONS(940), + [anon_sym_default] = ACTIONS(940), + [anon_sym_while] = ACTIONS(940), + [anon_sym_do] = ACTIONS(940), + [anon_sym_for] = ACTIONS(940), + [anon_sym_return] = ACTIONS(940), + [anon_sym_break] = ACTIONS(940), + [anon_sym_continue] = ACTIONS(940), + [anon_sym_goto] = ACTIONS(940), + [anon_sym_DASH_DASH] = ACTIONS(942), + [anon_sym_PLUS_PLUS] = ACTIONS(942), + [anon_sym_sizeof] = ACTIONS(940), + [sym_number_literal] = ACTIONS(942), + [anon_sym_L_SQUOTE] = ACTIONS(942), + [anon_sym_u_SQUOTE] = ACTIONS(942), + [anon_sym_U_SQUOTE] = ACTIONS(942), + [anon_sym_u8_SQUOTE] = ACTIONS(942), + [anon_sym_SQUOTE] = ACTIONS(942), + [anon_sym_L_DQUOTE] = ACTIONS(942), + [anon_sym_u_DQUOTE] = ACTIONS(942), + [anon_sym_U_DQUOTE] = ACTIONS(942), + [anon_sym_u8_DQUOTE] = ACTIONS(942), + [anon_sym_DQUOTE] = ACTIONS(942), + [sym_true] = ACTIONS(940), + [sym_false] = ACTIONS(940), + [sym_null] = ACTIONS(940), + [sym_comment] = ACTIONS(3), + }, + [211] = { + [sym_identifier] = ACTIONS(952), + [aux_sym_preproc_include_token1] = ACTIONS(952), + [aux_sym_preproc_def_token1] = ACTIONS(952), + [aux_sym_preproc_if_token1] = ACTIONS(952), + [aux_sym_preproc_if_token2] = ACTIONS(952), + [aux_sym_preproc_ifdef_token1] = ACTIONS(952), + [aux_sym_preproc_ifdef_token2] = ACTIONS(952), + [sym_preproc_directive] = ACTIONS(952), + [anon_sym_LPAREN2] = ACTIONS(954), + [anon_sym_BANG] = ACTIONS(954), + [anon_sym_TILDE] = ACTIONS(954), + [anon_sym_DASH] = ACTIONS(952), + [anon_sym_PLUS] = ACTIONS(952), + [anon_sym_STAR] = ACTIONS(954), + [anon_sym_AMP] = ACTIONS(954), + [anon_sym_SEMI] = ACTIONS(954), + [anon_sym_typedef] = ACTIONS(952), + [anon_sym_extern] = ACTIONS(952), + [anon_sym___attribute__] = ACTIONS(952), + [anon_sym_LBRACK_LBRACK] = ACTIONS(954), + [anon_sym___declspec] = ACTIONS(952), + [anon_sym___cdecl] = ACTIONS(952), + [anon_sym___clrcall] = ACTIONS(952), + [anon_sym___stdcall] = ACTIONS(952), + [anon_sym___fastcall] = ACTIONS(952), + [anon_sym___thiscall] = ACTIONS(952), + [anon_sym___vectorcall] = ACTIONS(952), + [anon_sym_LBRACE] = ACTIONS(954), + [anon_sym_static] = ACTIONS(952), + [anon_sym_auto] = ACTIONS(952), + [anon_sym_register] = ACTIONS(952), + [anon_sym_inline] = ACTIONS(952), + [anon_sym_const] = ACTIONS(952), + [anon_sym_volatile] = ACTIONS(952), + [anon_sym_restrict] = ACTIONS(952), + [anon_sym__Atomic] = ACTIONS(952), + [anon_sym_signed] = ACTIONS(952), + [anon_sym_unsigned] = ACTIONS(952), + [anon_sym_long] = ACTIONS(952), + [anon_sym_short] = ACTIONS(952), + [sym_primitive_type] = ACTIONS(952), + [anon_sym_enum] = ACTIONS(952), + [anon_sym_struct] = ACTIONS(952), + [anon_sym_union] = ACTIONS(952), + [anon_sym_if] = ACTIONS(952), + [anon_sym_else] = ACTIONS(952), + [anon_sym_switch] = ACTIONS(952), + [anon_sym_case] = ACTIONS(952), + [anon_sym_default] = ACTIONS(952), + [anon_sym_while] = ACTIONS(952), + [anon_sym_do] = ACTIONS(952), + [anon_sym_for] = ACTIONS(952), + [anon_sym_return] = ACTIONS(952), + [anon_sym_break] = ACTIONS(952), + [anon_sym_continue] = ACTIONS(952), + [anon_sym_goto] = ACTIONS(952), + [anon_sym_DASH_DASH] = ACTIONS(954), + [anon_sym_PLUS_PLUS] = ACTIONS(954), + [anon_sym_sizeof] = ACTIONS(952), + [sym_number_literal] = ACTIONS(954), + [anon_sym_L_SQUOTE] = ACTIONS(954), + [anon_sym_u_SQUOTE] = ACTIONS(954), + [anon_sym_U_SQUOTE] = ACTIONS(954), + [anon_sym_u8_SQUOTE] = ACTIONS(954), + [anon_sym_SQUOTE] = ACTIONS(954), + [anon_sym_L_DQUOTE] = ACTIONS(954), + [anon_sym_u_DQUOTE] = ACTIONS(954), + [anon_sym_U_DQUOTE] = ACTIONS(954), + [anon_sym_u8_DQUOTE] = ACTIONS(954), + [anon_sym_DQUOTE] = ACTIONS(954), + [sym_true] = ACTIONS(952), + [sym_false] = ACTIONS(952), + [sym_null] = ACTIONS(952), + [sym_comment] = ACTIONS(3), + }, + [212] = { + [ts_builtin_sym_end] = ACTIONS(990), + [sym_identifier] = ACTIONS(988), + [aux_sym_preproc_include_token1] = ACTIONS(988), + [aux_sym_preproc_def_token1] = ACTIONS(988), + [aux_sym_preproc_if_token1] = ACTIONS(988), + [aux_sym_preproc_ifdef_token1] = ACTIONS(988), + [aux_sym_preproc_ifdef_token2] = ACTIONS(988), + [sym_preproc_directive] = ACTIONS(988), + [anon_sym_LPAREN2] = ACTIONS(990), + [anon_sym_BANG] = ACTIONS(990), + [anon_sym_TILDE] = ACTIONS(990), + [anon_sym_DASH] = ACTIONS(988), + [anon_sym_PLUS] = ACTIONS(988), + [anon_sym_STAR] = ACTIONS(990), + [anon_sym_AMP] = ACTIONS(990), + [anon_sym_SEMI] = ACTIONS(990), + [anon_sym_typedef] = ACTIONS(988), + [anon_sym_extern] = ACTIONS(988), + [anon_sym___attribute__] = ACTIONS(988), + [anon_sym_LBRACK_LBRACK] = ACTIONS(990), + [anon_sym___declspec] = ACTIONS(988), + [anon_sym___cdecl] = ACTIONS(988), + [anon_sym___clrcall] = ACTIONS(988), + [anon_sym___stdcall] = ACTIONS(988), + [anon_sym___fastcall] = ACTIONS(988), + [anon_sym___thiscall] = ACTIONS(988), + [anon_sym___vectorcall] = ACTIONS(988), + [anon_sym_LBRACE] = ACTIONS(990), + [anon_sym_static] = ACTIONS(988), + [anon_sym_auto] = ACTIONS(988), + [anon_sym_register] = ACTIONS(988), + [anon_sym_inline] = ACTIONS(988), + [anon_sym_const] = ACTIONS(988), + [anon_sym_volatile] = ACTIONS(988), + [anon_sym_restrict] = ACTIONS(988), + [anon_sym__Atomic] = ACTIONS(988), + [anon_sym_signed] = ACTIONS(988), + [anon_sym_unsigned] = ACTIONS(988), + [anon_sym_long] = ACTIONS(988), + [anon_sym_short] = ACTIONS(988), + [sym_primitive_type] = ACTIONS(988), + [anon_sym_enum] = ACTIONS(988), + [anon_sym_struct] = ACTIONS(988), + [anon_sym_union] = ACTIONS(988), + [anon_sym_if] = ACTIONS(988), + [anon_sym_else] = ACTIONS(988), + [anon_sym_switch] = ACTIONS(988), + [anon_sym_case] = ACTIONS(988), + [anon_sym_default] = ACTIONS(988), + [anon_sym_while] = ACTIONS(988), + [anon_sym_do] = ACTIONS(988), + [anon_sym_for] = ACTIONS(988), + [anon_sym_return] = ACTIONS(988), + [anon_sym_break] = ACTIONS(988), + [anon_sym_continue] = ACTIONS(988), + [anon_sym_goto] = ACTIONS(988), + [anon_sym_DASH_DASH] = ACTIONS(990), + [anon_sym_PLUS_PLUS] = ACTIONS(990), + [anon_sym_sizeof] = ACTIONS(988), + [sym_number_literal] = ACTIONS(990), + [anon_sym_L_SQUOTE] = ACTIONS(990), + [anon_sym_u_SQUOTE] = ACTIONS(990), + [anon_sym_U_SQUOTE] = ACTIONS(990), + [anon_sym_u8_SQUOTE] = ACTIONS(990), + [anon_sym_SQUOTE] = ACTIONS(990), + [anon_sym_L_DQUOTE] = ACTIONS(990), + [anon_sym_u_DQUOTE] = ACTIONS(990), + [anon_sym_U_DQUOTE] = ACTIONS(990), + [anon_sym_u8_DQUOTE] = ACTIONS(990), + [anon_sym_DQUOTE] = ACTIONS(990), + [sym_true] = ACTIONS(988), + [sym_false] = ACTIONS(988), + [sym_null] = ACTIONS(988), + [sym_comment] = ACTIONS(3), + }, + [213] = { + [sym_attribute_declaration] = STATE(153), + [sym_compound_statement] = STATE(283), + [sym_attributed_statement] = STATE(283), + [sym_labeled_statement] = STATE(283), + [sym_expression_statement] = STATE(283), + [sym_if_statement] = STATE(283), + [sym_switch_statement] = STATE(283), + [sym_case_statement] = STATE(283), + [sym_while_statement] = STATE(283), + [sym_do_statement] = STATE(283), + [sym_for_statement] = STATE(283), + [sym_return_statement] = STATE(283), + [sym_break_statement] = STATE(283), + [sym_continue_statement] = STATE(283), + [sym_goto_statement] = STATE(283), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [sym_identifier] = ACTIONS(1207), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [214] = { + [sym_attribute_declaration] = STATE(153), + [sym_compound_statement] = STATE(226), + [sym_attributed_statement] = STATE(226), + [sym_labeled_statement] = STATE(226), + [sym_expression_statement] = STATE(226), + [sym_if_statement] = STATE(226), + [sym_switch_statement] = STATE(226), + [sym_case_statement] = STATE(226), + [sym_while_statement] = STATE(226), + [sym_do_statement] = STATE(226), + [sym_for_statement] = STATE(226), + [sym_return_statement] = STATE(226), + [sym_break_statement] = STATE(226), + [sym_continue_statement] = STATE(226), + [sym_goto_statement] = STATE(226), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [sym_identifier] = ACTIONS(1207), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [215] = { + [ts_builtin_sym_end] = ACTIONS(922), + [sym_identifier] = ACTIONS(920), + [aux_sym_preproc_include_token1] = ACTIONS(920), + [aux_sym_preproc_def_token1] = ACTIONS(920), + [aux_sym_preproc_if_token1] = ACTIONS(920), + [aux_sym_preproc_ifdef_token1] = ACTIONS(920), + [aux_sym_preproc_ifdef_token2] = ACTIONS(920), + [sym_preproc_directive] = ACTIONS(920), + [anon_sym_LPAREN2] = ACTIONS(922), + [anon_sym_BANG] = ACTIONS(922), + [anon_sym_TILDE] = ACTIONS(922), + [anon_sym_DASH] = ACTIONS(920), + [anon_sym_PLUS] = ACTIONS(920), + [anon_sym_STAR] = ACTIONS(922), + [anon_sym_AMP] = ACTIONS(922), + [anon_sym_SEMI] = ACTIONS(922), + [anon_sym_typedef] = ACTIONS(920), + [anon_sym_extern] = ACTIONS(920), + [anon_sym___attribute__] = ACTIONS(920), + [anon_sym_LBRACK_LBRACK] = ACTIONS(922), + [anon_sym___declspec] = ACTIONS(920), + [anon_sym___cdecl] = ACTIONS(920), + [anon_sym___clrcall] = ACTIONS(920), + [anon_sym___stdcall] = ACTIONS(920), + [anon_sym___fastcall] = ACTIONS(920), + [anon_sym___thiscall] = ACTIONS(920), + [anon_sym___vectorcall] = ACTIONS(920), + [anon_sym_LBRACE] = ACTIONS(922), + [anon_sym_static] = ACTIONS(920), + [anon_sym_auto] = ACTIONS(920), + [anon_sym_register] = ACTIONS(920), + [anon_sym_inline] = ACTIONS(920), + [anon_sym_const] = ACTIONS(920), + [anon_sym_volatile] = ACTIONS(920), + [anon_sym_restrict] = ACTIONS(920), + [anon_sym__Atomic] = ACTIONS(920), + [anon_sym_signed] = ACTIONS(920), + [anon_sym_unsigned] = ACTIONS(920), + [anon_sym_long] = ACTIONS(920), + [anon_sym_short] = ACTIONS(920), + [sym_primitive_type] = ACTIONS(920), + [anon_sym_enum] = ACTIONS(920), + [anon_sym_struct] = ACTIONS(920), + [anon_sym_union] = ACTIONS(920), + [anon_sym_if] = ACTIONS(920), + [anon_sym_else] = ACTIONS(920), + [anon_sym_switch] = ACTIONS(920), + [anon_sym_case] = ACTIONS(920), + [anon_sym_default] = ACTIONS(920), + [anon_sym_while] = ACTIONS(920), + [anon_sym_do] = ACTIONS(920), + [anon_sym_for] = ACTIONS(920), + [anon_sym_return] = ACTIONS(920), + [anon_sym_break] = ACTIONS(920), + [anon_sym_continue] = ACTIONS(920), + [anon_sym_goto] = ACTIONS(920), + [anon_sym_DASH_DASH] = ACTIONS(922), + [anon_sym_PLUS_PLUS] = ACTIONS(922), + [anon_sym_sizeof] = ACTIONS(920), + [sym_number_literal] = ACTIONS(922), + [anon_sym_L_SQUOTE] = ACTIONS(922), + [anon_sym_u_SQUOTE] = ACTIONS(922), + [anon_sym_U_SQUOTE] = ACTIONS(922), + [anon_sym_u8_SQUOTE] = ACTIONS(922), + [anon_sym_SQUOTE] = ACTIONS(922), + [anon_sym_L_DQUOTE] = ACTIONS(922), + [anon_sym_u_DQUOTE] = ACTIONS(922), + [anon_sym_U_DQUOTE] = ACTIONS(922), + [anon_sym_u8_DQUOTE] = ACTIONS(922), + [anon_sym_DQUOTE] = ACTIONS(922), + [sym_true] = ACTIONS(920), + [sym_false] = ACTIONS(920), + [sym_null] = ACTIONS(920), + [sym_comment] = ACTIONS(3), + }, + [216] = { + [ts_builtin_sym_end] = ACTIONS(994), + [sym_identifier] = ACTIONS(992), + [aux_sym_preproc_include_token1] = ACTIONS(992), + [aux_sym_preproc_def_token1] = ACTIONS(992), + [aux_sym_preproc_if_token1] = ACTIONS(992), + [aux_sym_preproc_ifdef_token1] = ACTIONS(992), + [aux_sym_preproc_ifdef_token2] = ACTIONS(992), + [sym_preproc_directive] = ACTIONS(992), + [anon_sym_LPAREN2] = ACTIONS(994), + [anon_sym_BANG] = ACTIONS(994), + [anon_sym_TILDE] = ACTIONS(994), + [anon_sym_DASH] = ACTIONS(992), + [anon_sym_PLUS] = ACTIONS(992), + [anon_sym_STAR] = ACTIONS(994), + [anon_sym_AMP] = ACTIONS(994), + [anon_sym_SEMI] = ACTIONS(994), + [anon_sym_typedef] = ACTIONS(992), + [anon_sym_extern] = ACTIONS(992), + [anon_sym___attribute__] = ACTIONS(992), + [anon_sym_LBRACK_LBRACK] = ACTIONS(994), + [anon_sym___declspec] = ACTIONS(992), + [anon_sym___cdecl] = ACTIONS(992), + [anon_sym___clrcall] = ACTIONS(992), + [anon_sym___stdcall] = ACTIONS(992), + [anon_sym___fastcall] = ACTIONS(992), + [anon_sym___thiscall] = ACTIONS(992), + [anon_sym___vectorcall] = ACTIONS(992), + [anon_sym_LBRACE] = ACTIONS(994), + [anon_sym_static] = ACTIONS(992), + [anon_sym_auto] = ACTIONS(992), + [anon_sym_register] = ACTIONS(992), + [anon_sym_inline] = ACTIONS(992), + [anon_sym_const] = ACTIONS(992), + [anon_sym_volatile] = ACTIONS(992), + [anon_sym_restrict] = ACTIONS(992), + [anon_sym__Atomic] = ACTIONS(992), + [anon_sym_signed] = ACTIONS(992), + [anon_sym_unsigned] = ACTIONS(992), + [anon_sym_long] = ACTIONS(992), + [anon_sym_short] = ACTIONS(992), + [sym_primitive_type] = ACTIONS(992), + [anon_sym_enum] = ACTIONS(992), + [anon_sym_struct] = ACTIONS(992), + [anon_sym_union] = ACTIONS(992), + [anon_sym_if] = ACTIONS(992), + [anon_sym_else] = ACTIONS(992), + [anon_sym_switch] = ACTIONS(992), + [anon_sym_case] = ACTIONS(992), + [anon_sym_default] = ACTIONS(992), + [anon_sym_while] = ACTIONS(992), + [anon_sym_do] = ACTIONS(992), + [anon_sym_for] = ACTIONS(992), + [anon_sym_return] = ACTIONS(992), + [anon_sym_break] = ACTIONS(992), + [anon_sym_continue] = ACTIONS(992), + [anon_sym_goto] = ACTIONS(992), + [anon_sym_DASH_DASH] = ACTIONS(994), + [anon_sym_PLUS_PLUS] = ACTIONS(994), + [anon_sym_sizeof] = ACTIONS(992), + [sym_number_literal] = ACTIONS(994), + [anon_sym_L_SQUOTE] = ACTIONS(994), + [anon_sym_u_SQUOTE] = ACTIONS(994), + [anon_sym_U_SQUOTE] = ACTIONS(994), + [anon_sym_u8_SQUOTE] = ACTIONS(994), + [anon_sym_SQUOTE] = ACTIONS(994), + [anon_sym_L_DQUOTE] = ACTIONS(994), + [anon_sym_u_DQUOTE] = ACTIONS(994), + [anon_sym_U_DQUOTE] = ACTIONS(994), + [anon_sym_u8_DQUOTE] = ACTIONS(994), + [anon_sym_DQUOTE] = ACTIONS(994), + [sym_true] = ACTIONS(992), + [sym_false] = ACTIONS(992), + [sym_null] = ACTIONS(992), + [sym_comment] = ACTIONS(3), + }, + [217] = { + [sym_identifier] = ACTIONS(894), + [aux_sym_preproc_include_token1] = ACTIONS(894), + [aux_sym_preproc_def_token1] = ACTIONS(894), + [aux_sym_preproc_if_token1] = ACTIONS(894), + [aux_sym_preproc_if_token2] = ACTIONS(894), + [aux_sym_preproc_ifdef_token1] = ACTIONS(894), + [aux_sym_preproc_ifdef_token2] = ACTIONS(894), + [sym_preproc_directive] = ACTIONS(894), + [anon_sym_LPAREN2] = ACTIONS(896), + [anon_sym_BANG] = ACTIONS(896), + [anon_sym_TILDE] = ACTIONS(896), + [anon_sym_DASH] = ACTIONS(894), + [anon_sym_PLUS] = ACTIONS(894), + [anon_sym_STAR] = ACTIONS(896), + [anon_sym_AMP] = ACTIONS(896), + [anon_sym_SEMI] = ACTIONS(896), + [anon_sym_typedef] = ACTIONS(894), + [anon_sym_extern] = ACTIONS(894), + [anon_sym___attribute__] = ACTIONS(894), + [anon_sym_LBRACK_LBRACK] = ACTIONS(896), + [anon_sym___declspec] = ACTIONS(894), + [anon_sym___cdecl] = ACTIONS(894), + [anon_sym___clrcall] = ACTIONS(894), + [anon_sym___stdcall] = ACTIONS(894), + [anon_sym___fastcall] = ACTIONS(894), + [anon_sym___thiscall] = ACTIONS(894), + [anon_sym___vectorcall] = ACTIONS(894), + [anon_sym_LBRACE] = ACTIONS(896), + [anon_sym_static] = ACTIONS(894), + [anon_sym_auto] = ACTIONS(894), + [anon_sym_register] = ACTIONS(894), + [anon_sym_inline] = ACTIONS(894), + [anon_sym_const] = ACTIONS(894), + [anon_sym_volatile] = ACTIONS(894), + [anon_sym_restrict] = ACTIONS(894), + [anon_sym__Atomic] = ACTIONS(894), + [anon_sym_signed] = ACTIONS(894), + [anon_sym_unsigned] = ACTIONS(894), + [anon_sym_long] = ACTIONS(894), + [anon_sym_short] = ACTIONS(894), + [sym_primitive_type] = ACTIONS(894), + [anon_sym_enum] = ACTIONS(894), + [anon_sym_struct] = ACTIONS(894), + [anon_sym_union] = ACTIONS(894), + [anon_sym_if] = ACTIONS(894), + [anon_sym_else] = ACTIONS(894), + [anon_sym_switch] = ACTIONS(894), + [anon_sym_case] = ACTIONS(894), + [anon_sym_default] = ACTIONS(894), + [anon_sym_while] = ACTIONS(894), + [anon_sym_do] = ACTIONS(894), + [anon_sym_for] = ACTIONS(894), + [anon_sym_return] = ACTIONS(894), + [anon_sym_break] = ACTIONS(894), + [anon_sym_continue] = ACTIONS(894), + [anon_sym_goto] = ACTIONS(894), + [anon_sym_DASH_DASH] = ACTIONS(896), + [anon_sym_PLUS_PLUS] = ACTIONS(896), + [anon_sym_sizeof] = ACTIONS(894), + [sym_number_literal] = ACTIONS(896), + [anon_sym_L_SQUOTE] = ACTIONS(896), + [anon_sym_u_SQUOTE] = ACTIONS(896), + [anon_sym_U_SQUOTE] = ACTIONS(896), + [anon_sym_u8_SQUOTE] = ACTIONS(896), + [anon_sym_SQUOTE] = ACTIONS(896), + [anon_sym_L_DQUOTE] = ACTIONS(896), + [anon_sym_u_DQUOTE] = ACTIONS(896), + [anon_sym_U_DQUOTE] = ACTIONS(896), + [anon_sym_u8_DQUOTE] = ACTIONS(896), + [anon_sym_DQUOTE] = ACTIONS(896), + [sym_true] = ACTIONS(894), + [sym_false] = ACTIONS(894), + [sym_null] = ACTIONS(894), + [sym_comment] = ACTIONS(3), + }, + [218] = { + [ts_builtin_sym_end] = ACTIONS(998), + [sym_identifier] = ACTIONS(996), + [aux_sym_preproc_include_token1] = ACTIONS(996), + [aux_sym_preproc_def_token1] = ACTIONS(996), + [aux_sym_preproc_if_token1] = ACTIONS(996), + [aux_sym_preproc_ifdef_token1] = ACTIONS(996), + [aux_sym_preproc_ifdef_token2] = ACTIONS(996), + [sym_preproc_directive] = ACTIONS(996), + [anon_sym_LPAREN2] = ACTIONS(998), + [anon_sym_BANG] = ACTIONS(998), + [anon_sym_TILDE] = ACTIONS(998), + [anon_sym_DASH] = ACTIONS(996), + [anon_sym_PLUS] = ACTIONS(996), + [anon_sym_STAR] = ACTIONS(998), + [anon_sym_AMP] = ACTIONS(998), + [anon_sym_SEMI] = ACTIONS(998), + [anon_sym_typedef] = ACTIONS(996), + [anon_sym_extern] = ACTIONS(996), + [anon_sym___attribute__] = ACTIONS(996), + [anon_sym_LBRACK_LBRACK] = ACTIONS(998), + [anon_sym___declspec] = ACTIONS(996), + [anon_sym___cdecl] = ACTIONS(996), + [anon_sym___clrcall] = ACTIONS(996), + [anon_sym___stdcall] = ACTIONS(996), + [anon_sym___fastcall] = ACTIONS(996), + [anon_sym___thiscall] = ACTIONS(996), + [anon_sym___vectorcall] = ACTIONS(996), + [anon_sym_LBRACE] = ACTIONS(998), + [anon_sym_static] = ACTIONS(996), + [anon_sym_auto] = ACTIONS(996), + [anon_sym_register] = ACTIONS(996), + [anon_sym_inline] = ACTIONS(996), + [anon_sym_const] = ACTIONS(996), + [anon_sym_volatile] = ACTIONS(996), + [anon_sym_restrict] = ACTIONS(996), + [anon_sym__Atomic] = ACTIONS(996), + [anon_sym_signed] = ACTIONS(996), + [anon_sym_unsigned] = ACTIONS(996), + [anon_sym_long] = ACTIONS(996), + [anon_sym_short] = ACTIONS(996), + [sym_primitive_type] = ACTIONS(996), + [anon_sym_enum] = ACTIONS(996), + [anon_sym_struct] = ACTIONS(996), + [anon_sym_union] = ACTIONS(996), + [anon_sym_if] = ACTIONS(996), + [anon_sym_else] = ACTIONS(996), + [anon_sym_switch] = ACTIONS(996), + [anon_sym_case] = ACTIONS(996), + [anon_sym_default] = ACTIONS(996), + [anon_sym_while] = ACTIONS(996), + [anon_sym_do] = ACTIONS(996), + [anon_sym_for] = ACTIONS(996), + [anon_sym_return] = ACTIONS(996), + [anon_sym_break] = ACTIONS(996), + [anon_sym_continue] = ACTIONS(996), + [anon_sym_goto] = ACTIONS(996), + [anon_sym_DASH_DASH] = ACTIONS(998), + [anon_sym_PLUS_PLUS] = ACTIONS(998), + [anon_sym_sizeof] = ACTIONS(996), + [sym_number_literal] = ACTIONS(998), + [anon_sym_L_SQUOTE] = ACTIONS(998), + [anon_sym_u_SQUOTE] = ACTIONS(998), + [anon_sym_U_SQUOTE] = ACTIONS(998), + [anon_sym_u8_SQUOTE] = ACTIONS(998), + [anon_sym_SQUOTE] = ACTIONS(998), + [anon_sym_L_DQUOTE] = ACTIONS(998), + [anon_sym_u_DQUOTE] = ACTIONS(998), + [anon_sym_U_DQUOTE] = ACTIONS(998), + [anon_sym_u8_DQUOTE] = ACTIONS(998), + [anon_sym_DQUOTE] = ACTIONS(998), + [sym_true] = ACTIONS(996), + [sym_false] = ACTIONS(996), + [sym_null] = ACTIONS(996), + [sym_comment] = ACTIONS(3), + }, + [219] = { + [sym_attribute_declaration] = STATE(153), + [sym_compound_statement] = STATE(231), + [sym_attributed_statement] = STATE(231), + [sym_labeled_statement] = STATE(231), + [sym_expression_statement] = STATE(231), + [sym_if_statement] = STATE(231), + [sym_switch_statement] = STATE(231), + [sym_case_statement] = STATE(231), + [sym_while_statement] = STATE(231), + [sym_do_statement] = STATE(231), + [sym_for_statement] = STATE(231), + [sym_return_statement] = STATE(231), + [sym_break_statement] = STATE(231), + [sym_continue_statement] = STATE(231), + [sym_goto_statement] = STATE(231), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [sym_identifier] = ACTIONS(1207), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [220] = { + [sym_attribute_declaration] = STATE(153), + [sym_compound_statement] = STATE(235), + [sym_attributed_statement] = STATE(235), + [sym_labeled_statement] = STATE(235), + [sym_expression_statement] = STATE(235), + [sym_if_statement] = STATE(235), + [sym_switch_statement] = STATE(235), + [sym_case_statement] = STATE(235), + [sym_while_statement] = STATE(235), + [sym_do_statement] = STATE(235), + [sym_for_statement] = STATE(235), + [sym_return_statement] = STATE(235), + [sym_break_statement] = STATE(235), + [sym_continue_statement] = STATE(235), + [sym_goto_statement] = STATE(235), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [sym_identifier] = ACTIONS(1207), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [221] = { + [sym_attribute_declaration] = STATE(153), + [sym_compound_statement] = STATE(241), + [sym_attributed_statement] = STATE(241), + [sym_labeled_statement] = STATE(241), + [sym_expression_statement] = STATE(241), + [sym_if_statement] = STATE(241), + [sym_switch_statement] = STATE(241), + [sym_case_statement] = STATE(241), + [sym_while_statement] = STATE(241), + [sym_do_statement] = STATE(241), + [sym_for_statement] = STATE(241), + [sym_return_statement] = STATE(241), + [sym_break_statement] = STATE(241), + [sym_continue_statement] = STATE(241), + [sym_goto_statement] = STATE(241), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [sym_identifier] = ACTIONS(1207), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [222] = { + [sym_identifier] = ACTIONS(928), + [aux_sym_preproc_include_token1] = ACTIONS(928), + [aux_sym_preproc_def_token1] = ACTIONS(928), + [aux_sym_preproc_if_token1] = ACTIONS(928), + [aux_sym_preproc_ifdef_token1] = ACTIONS(928), + [aux_sym_preproc_ifdef_token2] = ACTIONS(928), + [sym_preproc_directive] = ACTIONS(928), + [anon_sym_LPAREN2] = ACTIONS(930), + [anon_sym_BANG] = ACTIONS(930), + [anon_sym_TILDE] = ACTIONS(930), + [anon_sym_DASH] = ACTIONS(928), + [anon_sym_PLUS] = ACTIONS(928), + [anon_sym_STAR] = ACTIONS(930), + [anon_sym_AMP] = ACTIONS(930), + [anon_sym_SEMI] = ACTIONS(930), + [anon_sym_typedef] = ACTIONS(928), + [anon_sym_extern] = ACTIONS(928), + [anon_sym___attribute__] = ACTIONS(928), + [anon_sym_LBRACK_LBRACK] = ACTIONS(930), + [anon_sym___declspec] = ACTIONS(928), + [anon_sym___cdecl] = ACTIONS(928), + [anon_sym___clrcall] = ACTIONS(928), + [anon_sym___stdcall] = ACTIONS(928), + [anon_sym___fastcall] = ACTIONS(928), + [anon_sym___thiscall] = ACTIONS(928), + [anon_sym___vectorcall] = ACTIONS(928), + [anon_sym_LBRACE] = ACTIONS(930), + [anon_sym_RBRACE] = ACTIONS(930), + [anon_sym_static] = ACTIONS(928), + [anon_sym_auto] = ACTIONS(928), + [anon_sym_register] = ACTIONS(928), + [anon_sym_inline] = ACTIONS(928), + [anon_sym_const] = ACTIONS(928), + [anon_sym_volatile] = ACTIONS(928), + [anon_sym_restrict] = ACTIONS(928), + [anon_sym__Atomic] = ACTIONS(928), + [anon_sym_signed] = ACTIONS(928), + [anon_sym_unsigned] = ACTIONS(928), + [anon_sym_long] = ACTIONS(928), + [anon_sym_short] = ACTIONS(928), + [sym_primitive_type] = ACTIONS(928), + [anon_sym_enum] = ACTIONS(928), + [anon_sym_struct] = ACTIONS(928), + [anon_sym_union] = ACTIONS(928), + [anon_sym_if] = ACTIONS(928), + [anon_sym_else] = ACTIONS(928), + [anon_sym_switch] = ACTIONS(928), + [anon_sym_case] = ACTIONS(928), + [anon_sym_default] = ACTIONS(928), + [anon_sym_while] = ACTIONS(928), + [anon_sym_do] = ACTIONS(928), + [anon_sym_for] = ACTIONS(928), + [anon_sym_return] = ACTIONS(928), + [anon_sym_break] = ACTIONS(928), + [anon_sym_continue] = ACTIONS(928), + [anon_sym_goto] = ACTIONS(928), + [anon_sym_DASH_DASH] = ACTIONS(930), + [anon_sym_PLUS_PLUS] = ACTIONS(930), + [anon_sym_sizeof] = ACTIONS(928), + [sym_number_literal] = ACTIONS(930), + [anon_sym_L_SQUOTE] = ACTIONS(930), + [anon_sym_u_SQUOTE] = ACTIONS(930), + [anon_sym_U_SQUOTE] = ACTIONS(930), + [anon_sym_u8_SQUOTE] = ACTIONS(930), + [anon_sym_SQUOTE] = ACTIONS(930), + [anon_sym_L_DQUOTE] = ACTIONS(930), + [anon_sym_u_DQUOTE] = ACTIONS(930), + [anon_sym_U_DQUOTE] = ACTIONS(930), + [anon_sym_u8_DQUOTE] = ACTIONS(930), + [anon_sym_DQUOTE] = ACTIONS(930), + [sym_true] = ACTIONS(928), + [sym_false] = ACTIONS(928), + [sym_null] = ACTIONS(928), + [sym_comment] = ACTIONS(3), + }, + [223] = { + [ts_builtin_sym_end] = ACTIONS(1006), + [sym_identifier] = ACTIONS(1004), + [aux_sym_preproc_include_token1] = ACTIONS(1004), + [aux_sym_preproc_def_token1] = ACTIONS(1004), + [aux_sym_preproc_if_token1] = ACTIONS(1004), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1004), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1004), + [sym_preproc_directive] = ACTIONS(1004), + [anon_sym_LPAREN2] = ACTIONS(1006), + [anon_sym_BANG] = ACTIONS(1006), + [anon_sym_TILDE] = ACTIONS(1006), + [anon_sym_DASH] = ACTIONS(1004), + [anon_sym_PLUS] = ACTIONS(1004), + [anon_sym_STAR] = ACTIONS(1006), + [anon_sym_AMP] = ACTIONS(1006), + [anon_sym_SEMI] = ACTIONS(1006), + [anon_sym_typedef] = ACTIONS(1004), + [anon_sym_extern] = ACTIONS(1004), + [anon_sym___attribute__] = ACTIONS(1004), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1006), + [anon_sym___declspec] = ACTIONS(1004), + [anon_sym___cdecl] = ACTIONS(1004), + [anon_sym___clrcall] = ACTIONS(1004), + [anon_sym___stdcall] = ACTIONS(1004), + [anon_sym___fastcall] = ACTIONS(1004), + [anon_sym___thiscall] = ACTIONS(1004), + [anon_sym___vectorcall] = ACTIONS(1004), + [anon_sym_LBRACE] = ACTIONS(1006), + [anon_sym_static] = ACTIONS(1004), + [anon_sym_auto] = ACTIONS(1004), + [anon_sym_register] = ACTIONS(1004), + [anon_sym_inline] = ACTIONS(1004), + [anon_sym_const] = ACTIONS(1004), + [anon_sym_volatile] = ACTIONS(1004), + [anon_sym_restrict] = ACTIONS(1004), + [anon_sym__Atomic] = ACTIONS(1004), + [anon_sym_signed] = ACTIONS(1004), + [anon_sym_unsigned] = ACTIONS(1004), + [anon_sym_long] = ACTIONS(1004), + [anon_sym_short] = ACTIONS(1004), + [sym_primitive_type] = ACTIONS(1004), + [anon_sym_enum] = ACTIONS(1004), + [anon_sym_struct] = ACTIONS(1004), + [anon_sym_union] = ACTIONS(1004), + [anon_sym_if] = ACTIONS(1004), + [anon_sym_else] = ACTIONS(1004), + [anon_sym_switch] = ACTIONS(1004), + [anon_sym_case] = ACTIONS(1004), + [anon_sym_default] = ACTIONS(1004), + [anon_sym_while] = ACTIONS(1004), + [anon_sym_do] = ACTIONS(1004), + [anon_sym_for] = ACTIONS(1004), + [anon_sym_return] = ACTIONS(1004), + [anon_sym_break] = ACTIONS(1004), + [anon_sym_continue] = ACTIONS(1004), + [anon_sym_goto] = ACTIONS(1004), + [anon_sym_DASH_DASH] = ACTIONS(1006), + [anon_sym_PLUS_PLUS] = ACTIONS(1006), + [anon_sym_sizeof] = ACTIONS(1004), + [sym_number_literal] = ACTIONS(1006), + [anon_sym_L_SQUOTE] = ACTIONS(1006), + [anon_sym_u_SQUOTE] = ACTIONS(1006), + [anon_sym_U_SQUOTE] = ACTIONS(1006), + [anon_sym_u8_SQUOTE] = ACTIONS(1006), + [anon_sym_SQUOTE] = ACTIONS(1006), + [anon_sym_L_DQUOTE] = ACTIONS(1006), + [anon_sym_u_DQUOTE] = ACTIONS(1006), + [anon_sym_U_DQUOTE] = ACTIONS(1006), + [anon_sym_u8_DQUOTE] = ACTIONS(1006), + [anon_sym_DQUOTE] = ACTIONS(1006), + [sym_true] = ACTIONS(1004), + [sym_false] = ACTIONS(1004), + [sym_null] = ACTIONS(1004), + [sym_comment] = ACTIONS(3), + }, + [224] = { + [sym_attribute_declaration] = STATE(232), + [sym_compound_statement] = STATE(230), + [sym_attributed_statement] = STATE(230), + [sym_labeled_statement] = STATE(230), + [sym_expression_statement] = STATE(230), + [sym_if_statement] = STATE(230), + [sym_switch_statement] = STATE(230), + [sym_case_statement] = STATE(230), + [sym_while_statement] = STATE(230), + [sym_do_statement] = STATE(230), + [sym_for_statement] = STATE(230), + [sym_return_statement] = STATE(230), + [sym_break_statement] = STATE(230), + [sym_continue_statement] = STATE(230), + [sym_goto_statement] = STATE(230), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(232), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [225] = { + [sym_attribute_declaration] = STATE(225), + [sym_compound_statement] = STATE(82), + [sym_attributed_statement] = STATE(82), + [sym_labeled_statement] = STATE(82), + [sym_expression_statement] = STATE(82), + [sym_if_statement] = STATE(82), + [sym_switch_statement] = STATE(82), + [sym_case_statement] = STATE(82), + [sym_while_statement] = STATE(82), + [sym_do_statement] = STATE(82), + [sym_for_statement] = STATE(82), + [sym_return_statement] = STATE(82), + [sym_break_statement] = STATE(82), + [sym_continue_statement] = STATE(82), + [sym_goto_statement] = STATE(82), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(225), + [sym_identifier] = ACTIONS(1253), + [anon_sym_LPAREN2] = ACTIONS(1135), + [anon_sym_BANG] = ACTIONS(1138), + [anon_sym_TILDE] = ACTIONS(1138), + [anon_sym_DASH] = ACTIONS(1141), + [anon_sym_PLUS] = ACTIONS(1141), + [anon_sym_STAR] = ACTIONS(1144), + [anon_sym_AMP] = ACTIONS(1144), + [anon_sym_SEMI] = ACTIONS(1256), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1150), + [anon_sym_LBRACE] = ACTIONS(1259), + [anon_sym_if] = ACTIONS(1262), + [anon_sym_switch] = ACTIONS(1265), + [anon_sym_case] = ACTIONS(1268), + [anon_sym_default] = ACTIONS(1271), + [anon_sym_while] = ACTIONS(1274), + [anon_sym_do] = ACTIONS(1277), + [anon_sym_for] = ACTIONS(1280), + [anon_sym_return] = ACTIONS(1283), + [anon_sym_break] = ACTIONS(1286), + [anon_sym_continue] = ACTIONS(1289), + [anon_sym_goto] = ACTIONS(1292), + [anon_sym_DASH_DASH] = ACTIONS(1189), + [anon_sym_PLUS_PLUS] = ACTIONS(1189), + [anon_sym_sizeof] = ACTIONS(1192), + [sym_number_literal] = ACTIONS(1195), + [anon_sym_L_SQUOTE] = ACTIONS(1198), + [anon_sym_u_SQUOTE] = ACTIONS(1198), + [anon_sym_U_SQUOTE] = ACTIONS(1198), + [anon_sym_u8_SQUOTE] = ACTIONS(1198), + [anon_sym_SQUOTE] = ACTIONS(1198), + [anon_sym_L_DQUOTE] = ACTIONS(1201), + [anon_sym_u_DQUOTE] = ACTIONS(1201), + [anon_sym_U_DQUOTE] = ACTIONS(1201), + [anon_sym_u8_DQUOTE] = ACTIONS(1201), + [anon_sym_DQUOTE] = ACTIONS(1201), + [sym_true] = ACTIONS(1204), + [sym_false] = ACTIONS(1204), + [sym_null] = ACTIONS(1204), + [sym_comment] = ACTIONS(3), + }, + [226] = { + [sym_identifier] = ACTIONS(968), + [aux_sym_preproc_include_token1] = ACTIONS(968), + [aux_sym_preproc_def_token1] = ACTIONS(968), + [aux_sym_preproc_if_token1] = ACTIONS(968), + [aux_sym_preproc_if_token2] = ACTIONS(968), + [aux_sym_preproc_ifdef_token1] = ACTIONS(968), + [aux_sym_preproc_ifdef_token2] = ACTIONS(968), + [sym_preproc_directive] = ACTIONS(968), + [anon_sym_LPAREN2] = ACTIONS(970), + [anon_sym_BANG] = ACTIONS(970), + [anon_sym_TILDE] = ACTIONS(970), + [anon_sym_DASH] = ACTIONS(968), + [anon_sym_PLUS] = ACTIONS(968), + [anon_sym_STAR] = ACTIONS(970), + [anon_sym_AMP] = ACTIONS(970), + [anon_sym_SEMI] = ACTIONS(970), + [anon_sym_typedef] = ACTIONS(968), + [anon_sym_extern] = ACTIONS(968), + [anon_sym___attribute__] = ACTIONS(968), + [anon_sym_LBRACK_LBRACK] = ACTIONS(970), + [anon_sym___declspec] = ACTIONS(968), + [anon_sym___cdecl] = ACTIONS(968), + [anon_sym___clrcall] = ACTIONS(968), + [anon_sym___stdcall] = ACTIONS(968), + [anon_sym___fastcall] = ACTIONS(968), + [anon_sym___thiscall] = ACTIONS(968), + [anon_sym___vectorcall] = ACTIONS(968), + [anon_sym_LBRACE] = ACTIONS(970), + [anon_sym_static] = ACTIONS(968), + [anon_sym_auto] = ACTIONS(968), + [anon_sym_register] = ACTIONS(968), + [anon_sym_inline] = ACTIONS(968), + [anon_sym_const] = ACTIONS(968), + [anon_sym_volatile] = ACTIONS(968), + [anon_sym_restrict] = ACTIONS(968), + [anon_sym__Atomic] = ACTIONS(968), + [anon_sym_signed] = ACTIONS(968), + [anon_sym_unsigned] = ACTIONS(968), + [anon_sym_long] = ACTIONS(968), + [anon_sym_short] = ACTIONS(968), + [sym_primitive_type] = ACTIONS(968), + [anon_sym_enum] = ACTIONS(968), + [anon_sym_struct] = ACTIONS(968), + [anon_sym_union] = ACTIONS(968), + [anon_sym_if] = ACTIONS(968), + [anon_sym_else] = ACTIONS(968), + [anon_sym_switch] = ACTIONS(968), + [anon_sym_case] = ACTIONS(968), + [anon_sym_default] = ACTIONS(968), + [anon_sym_while] = ACTIONS(968), + [anon_sym_do] = ACTIONS(968), + [anon_sym_for] = ACTIONS(968), + [anon_sym_return] = ACTIONS(968), + [anon_sym_break] = ACTIONS(968), + [anon_sym_continue] = ACTIONS(968), + [anon_sym_goto] = ACTIONS(968), + [anon_sym_DASH_DASH] = ACTIONS(970), + [anon_sym_PLUS_PLUS] = ACTIONS(970), + [anon_sym_sizeof] = ACTIONS(968), + [sym_number_literal] = ACTIONS(970), + [anon_sym_L_SQUOTE] = ACTIONS(970), + [anon_sym_u_SQUOTE] = ACTIONS(970), + [anon_sym_U_SQUOTE] = ACTIONS(970), + [anon_sym_u8_SQUOTE] = ACTIONS(970), + [anon_sym_SQUOTE] = ACTIONS(970), + [anon_sym_L_DQUOTE] = ACTIONS(970), + [anon_sym_u_DQUOTE] = ACTIONS(970), + [anon_sym_U_DQUOTE] = ACTIONS(970), + [anon_sym_u8_DQUOTE] = ACTIONS(970), + [anon_sym_DQUOTE] = ACTIONS(970), + [sym_true] = ACTIONS(968), + [sym_false] = ACTIONS(968), + [sym_null] = ACTIONS(968), + [sym_comment] = ACTIONS(3), + }, + [227] = { + [sym_attribute_declaration] = STATE(153), + [sym_compound_statement] = STATE(296), + [sym_attributed_statement] = STATE(296), + [sym_labeled_statement] = STATE(296), + [sym_expression_statement] = STATE(296), + [sym_if_statement] = STATE(296), + [sym_switch_statement] = STATE(296), + [sym_case_statement] = STATE(296), + [sym_while_statement] = STATE(296), + [sym_do_statement] = STATE(296), + [sym_for_statement] = STATE(296), + [sym_return_statement] = STATE(296), + [sym_break_statement] = STATE(296), + [sym_continue_statement] = STATE(296), + [sym_goto_statement] = STATE(296), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [sym_identifier] = ACTIONS(1207), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [228] = { + [ts_builtin_sym_end] = ACTIONS(916), + [sym_identifier] = ACTIONS(914), + [aux_sym_preproc_include_token1] = ACTIONS(914), + [aux_sym_preproc_def_token1] = ACTIONS(914), + [aux_sym_preproc_if_token1] = ACTIONS(914), + [aux_sym_preproc_ifdef_token1] = ACTIONS(914), + [aux_sym_preproc_ifdef_token2] = ACTIONS(914), + [sym_preproc_directive] = ACTIONS(914), + [anon_sym_LPAREN2] = ACTIONS(916), + [anon_sym_BANG] = ACTIONS(916), + [anon_sym_TILDE] = ACTIONS(916), + [anon_sym_DASH] = ACTIONS(914), + [anon_sym_PLUS] = ACTIONS(914), + [anon_sym_STAR] = ACTIONS(916), + [anon_sym_AMP] = ACTIONS(916), + [anon_sym_SEMI] = ACTIONS(916), + [anon_sym_typedef] = ACTIONS(914), + [anon_sym_extern] = ACTIONS(914), + [anon_sym___attribute__] = ACTIONS(914), + [anon_sym_LBRACK_LBRACK] = ACTIONS(916), + [anon_sym___declspec] = ACTIONS(914), + [anon_sym___cdecl] = ACTIONS(914), + [anon_sym___clrcall] = ACTIONS(914), + [anon_sym___stdcall] = ACTIONS(914), + [anon_sym___fastcall] = ACTIONS(914), + [anon_sym___thiscall] = ACTIONS(914), + [anon_sym___vectorcall] = ACTIONS(914), + [anon_sym_LBRACE] = ACTIONS(916), + [anon_sym_static] = ACTIONS(914), + [anon_sym_auto] = ACTIONS(914), + [anon_sym_register] = ACTIONS(914), + [anon_sym_inline] = ACTIONS(914), + [anon_sym_const] = ACTIONS(914), + [anon_sym_volatile] = ACTIONS(914), + [anon_sym_restrict] = ACTIONS(914), + [anon_sym__Atomic] = ACTIONS(914), + [anon_sym_signed] = ACTIONS(914), + [anon_sym_unsigned] = ACTIONS(914), + [anon_sym_long] = ACTIONS(914), + [anon_sym_short] = ACTIONS(914), + [sym_primitive_type] = ACTIONS(914), + [anon_sym_enum] = ACTIONS(914), + [anon_sym_struct] = ACTIONS(914), + [anon_sym_union] = ACTIONS(914), + [anon_sym_if] = ACTIONS(914), + [anon_sym_else] = ACTIONS(1295), + [anon_sym_switch] = ACTIONS(914), + [anon_sym_case] = ACTIONS(914), + [anon_sym_default] = ACTIONS(914), + [anon_sym_while] = ACTIONS(914), + [anon_sym_do] = ACTIONS(914), + [anon_sym_for] = ACTIONS(914), + [anon_sym_return] = ACTIONS(914), + [anon_sym_break] = ACTIONS(914), + [anon_sym_continue] = ACTIONS(914), + [anon_sym_goto] = ACTIONS(914), + [anon_sym_DASH_DASH] = ACTIONS(916), + [anon_sym_PLUS_PLUS] = ACTIONS(916), + [anon_sym_sizeof] = ACTIONS(914), + [sym_number_literal] = ACTIONS(916), + [anon_sym_L_SQUOTE] = ACTIONS(916), + [anon_sym_u_SQUOTE] = ACTIONS(916), + [anon_sym_U_SQUOTE] = ACTIONS(916), + [anon_sym_u8_SQUOTE] = ACTIONS(916), + [anon_sym_SQUOTE] = ACTIONS(916), + [anon_sym_L_DQUOTE] = ACTIONS(916), + [anon_sym_u_DQUOTE] = ACTIONS(916), + [anon_sym_U_DQUOTE] = ACTIONS(916), + [anon_sym_u8_DQUOTE] = ACTIONS(916), + [anon_sym_DQUOTE] = ACTIONS(916), + [sym_true] = ACTIONS(914), + [sym_false] = ACTIONS(914), + [sym_null] = ACTIONS(914), + [sym_comment] = ACTIONS(3), + }, + [229] = { + [ts_builtin_sym_end] = ACTIONS(908), + [sym_identifier] = ACTIONS(906), + [aux_sym_preproc_include_token1] = ACTIONS(906), + [aux_sym_preproc_def_token1] = ACTIONS(906), + [aux_sym_preproc_if_token1] = ACTIONS(906), + [aux_sym_preproc_ifdef_token1] = ACTIONS(906), + [aux_sym_preproc_ifdef_token2] = ACTIONS(906), + [sym_preproc_directive] = ACTIONS(906), + [anon_sym_LPAREN2] = ACTIONS(908), + [anon_sym_BANG] = ACTIONS(908), + [anon_sym_TILDE] = ACTIONS(908), + [anon_sym_DASH] = ACTIONS(906), + [anon_sym_PLUS] = ACTIONS(906), + [anon_sym_STAR] = ACTIONS(908), + [anon_sym_AMP] = ACTIONS(908), + [anon_sym_SEMI] = ACTIONS(908), + [anon_sym_typedef] = ACTIONS(906), + [anon_sym_extern] = ACTIONS(906), + [anon_sym___attribute__] = ACTIONS(906), + [anon_sym_LBRACK_LBRACK] = ACTIONS(908), + [anon_sym___declspec] = ACTIONS(906), + [anon_sym___cdecl] = ACTIONS(906), + [anon_sym___clrcall] = ACTIONS(906), + [anon_sym___stdcall] = ACTIONS(906), + [anon_sym___fastcall] = ACTIONS(906), + [anon_sym___thiscall] = ACTIONS(906), + [anon_sym___vectorcall] = ACTIONS(906), + [anon_sym_LBRACE] = ACTIONS(908), + [anon_sym_static] = ACTIONS(906), + [anon_sym_auto] = ACTIONS(906), + [anon_sym_register] = ACTIONS(906), + [anon_sym_inline] = ACTIONS(906), + [anon_sym_const] = ACTIONS(906), + [anon_sym_volatile] = ACTIONS(906), + [anon_sym_restrict] = ACTIONS(906), + [anon_sym__Atomic] = ACTIONS(906), + [anon_sym_signed] = ACTIONS(906), + [anon_sym_unsigned] = ACTIONS(906), + [anon_sym_long] = ACTIONS(906), + [anon_sym_short] = ACTIONS(906), + [sym_primitive_type] = ACTIONS(906), + [anon_sym_enum] = ACTIONS(906), + [anon_sym_struct] = ACTIONS(906), + [anon_sym_union] = ACTIONS(906), + [anon_sym_if] = ACTIONS(906), + [anon_sym_else] = ACTIONS(906), + [anon_sym_switch] = ACTIONS(906), + [anon_sym_case] = ACTIONS(906), + [anon_sym_default] = ACTIONS(906), + [anon_sym_while] = ACTIONS(906), + [anon_sym_do] = ACTIONS(906), + [anon_sym_for] = ACTIONS(906), + [anon_sym_return] = ACTIONS(906), + [anon_sym_break] = ACTIONS(906), + [anon_sym_continue] = ACTIONS(906), + [anon_sym_goto] = ACTIONS(906), + [anon_sym_DASH_DASH] = ACTIONS(908), + [anon_sym_PLUS_PLUS] = ACTIONS(908), + [anon_sym_sizeof] = ACTIONS(906), + [sym_number_literal] = ACTIONS(908), + [anon_sym_L_SQUOTE] = ACTIONS(908), + [anon_sym_u_SQUOTE] = ACTIONS(908), + [anon_sym_U_SQUOTE] = ACTIONS(908), + [anon_sym_u8_SQUOTE] = ACTIONS(908), + [anon_sym_SQUOTE] = ACTIONS(908), + [anon_sym_L_DQUOTE] = ACTIONS(908), + [anon_sym_u_DQUOTE] = ACTIONS(908), + [anon_sym_U_DQUOTE] = ACTIONS(908), + [anon_sym_u8_DQUOTE] = ACTIONS(908), + [anon_sym_DQUOTE] = ACTIONS(908), + [sym_true] = ACTIONS(906), + [sym_false] = ACTIONS(906), + [sym_null] = ACTIONS(906), + [sym_comment] = ACTIONS(3), + }, + [230] = { + [ts_builtin_sym_end] = ACTIONS(1010), + [sym_identifier] = ACTIONS(1008), + [aux_sym_preproc_include_token1] = ACTIONS(1008), + [aux_sym_preproc_def_token1] = ACTIONS(1008), + [aux_sym_preproc_if_token1] = ACTIONS(1008), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1008), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1008), + [sym_preproc_directive] = ACTIONS(1008), + [anon_sym_LPAREN2] = ACTIONS(1010), + [anon_sym_BANG] = ACTIONS(1010), + [anon_sym_TILDE] = ACTIONS(1010), + [anon_sym_DASH] = ACTIONS(1008), + [anon_sym_PLUS] = ACTIONS(1008), + [anon_sym_STAR] = ACTIONS(1010), + [anon_sym_AMP] = ACTIONS(1010), + [anon_sym_SEMI] = ACTIONS(1010), + [anon_sym_typedef] = ACTIONS(1008), + [anon_sym_extern] = ACTIONS(1008), + [anon_sym___attribute__] = ACTIONS(1008), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1010), + [anon_sym___declspec] = ACTIONS(1008), + [anon_sym___cdecl] = ACTIONS(1008), + [anon_sym___clrcall] = ACTIONS(1008), + [anon_sym___stdcall] = ACTIONS(1008), + [anon_sym___fastcall] = ACTIONS(1008), + [anon_sym___thiscall] = ACTIONS(1008), + [anon_sym___vectorcall] = ACTIONS(1008), + [anon_sym_LBRACE] = ACTIONS(1010), + [anon_sym_static] = ACTIONS(1008), + [anon_sym_auto] = ACTIONS(1008), + [anon_sym_register] = ACTIONS(1008), + [anon_sym_inline] = ACTIONS(1008), + [anon_sym_const] = ACTIONS(1008), + [anon_sym_volatile] = ACTIONS(1008), + [anon_sym_restrict] = ACTIONS(1008), + [anon_sym__Atomic] = ACTIONS(1008), + [anon_sym_signed] = ACTIONS(1008), + [anon_sym_unsigned] = ACTIONS(1008), + [anon_sym_long] = ACTIONS(1008), + [anon_sym_short] = ACTIONS(1008), + [sym_primitive_type] = ACTIONS(1008), + [anon_sym_enum] = ACTIONS(1008), + [anon_sym_struct] = ACTIONS(1008), + [anon_sym_union] = ACTIONS(1008), + [anon_sym_if] = ACTIONS(1008), + [anon_sym_else] = ACTIONS(1008), + [anon_sym_switch] = ACTIONS(1008), + [anon_sym_case] = ACTIONS(1008), + [anon_sym_default] = ACTIONS(1008), + [anon_sym_while] = ACTIONS(1008), + [anon_sym_do] = ACTIONS(1008), + [anon_sym_for] = ACTIONS(1008), + [anon_sym_return] = ACTIONS(1008), + [anon_sym_break] = ACTIONS(1008), + [anon_sym_continue] = ACTIONS(1008), + [anon_sym_goto] = ACTIONS(1008), + [anon_sym_DASH_DASH] = ACTIONS(1010), + [anon_sym_PLUS_PLUS] = ACTIONS(1010), + [anon_sym_sizeof] = ACTIONS(1008), + [sym_number_literal] = ACTIONS(1010), + [anon_sym_L_SQUOTE] = ACTIONS(1010), + [anon_sym_u_SQUOTE] = ACTIONS(1010), + [anon_sym_U_SQUOTE] = ACTIONS(1010), + [anon_sym_u8_SQUOTE] = ACTIONS(1010), + [anon_sym_SQUOTE] = ACTIONS(1010), + [anon_sym_L_DQUOTE] = ACTIONS(1010), + [anon_sym_u_DQUOTE] = ACTIONS(1010), + [anon_sym_U_DQUOTE] = ACTIONS(1010), + [anon_sym_u8_DQUOTE] = ACTIONS(1010), + [anon_sym_DQUOTE] = ACTIONS(1010), + [sym_true] = ACTIONS(1008), + [sym_false] = ACTIONS(1008), + [sym_null] = ACTIONS(1008), + [sym_comment] = ACTIONS(3), + }, + [231] = { + [sym_identifier] = ACTIONS(972), + [aux_sym_preproc_include_token1] = ACTIONS(972), + [aux_sym_preproc_def_token1] = ACTIONS(972), + [aux_sym_preproc_if_token1] = ACTIONS(972), + [aux_sym_preproc_if_token2] = ACTIONS(972), + [aux_sym_preproc_ifdef_token1] = ACTIONS(972), + [aux_sym_preproc_ifdef_token2] = ACTIONS(972), + [sym_preproc_directive] = ACTIONS(972), + [anon_sym_LPAREN2] = ACTIONS(974), + [anon_sym_BANG] = ACTIONS(974), + [anon_sym_TILDE] = ACTIONS(974), + [anon_sym_DASH] = ACTIONS(972), + [anon_sym_PLUS] = ACTIONS(972), + [anon_sym_STAR] = ACTIONS(974), + [anon_sym_AMP] = ACTIONS(974), + [anon_sym_SEMI] = ACTIONS(974), + [anon_sym_typedef] = ACTIONS(972), + [anon_sym_extern] = ACTIONS(972), + [anon_sym___attribute__] = ACTIONS(972), + [anon_sym_LBRACK_LBRACK] = ACTIONS(974), + [anon_sym___declspec] = ACTIONS(972), + [anon_sym___cdecl] = ACTIONS(972), + [anon_sym___clrcall] = ACTIONS(972), + [anon_sym___stdcall] = ACTIONS(972), + [anon_sym___fastcall] = ACTIONS(972), + [anon_sym___thiscall] = ACTIONS(972), + [anon_sym___vectorcall] = ACTIONS(972), + [anon_sym_LBRACE] = ACTIONS(974), + [anon_sym_static] = ACTIONS(972), + [anon_sym_auto] = ACTIONS(972), + [anon_sym_register] = ACTIONS(972), + [anon_sym_inline] = ACTIONS(972), + [anon_sym_const] = ACTIONS(972), + [anon_sym_volatile] = ACTIONS(972), + [anon_sym_restrict] = ACTIONS(972), + [anon_sym__Atomic] = ACTIONS(972), + [anon_sym_signed] = ACTIONS(972), + [anon_sym_unsigned] = ACTIONS(972), + [anon_sym_long] = ACTIONS(972), + [anon_sym_short] = ACTIONS(972), + [sym_primitive_type] = ACTIONS(972), + [anon_sym_enum] = ACTIONS(972), + [anon_sym_struct] = ACTIONS(972), + [anon_sym_union] = ACTIONS(972), + [anon_sym_if] = ACTIONS(972), + [anon_sym_else] = ACTIONS(972), + [anon_sym_switch] = ACTIONS(972), + [anon_sym_case] = ACTIONS(972), + [anon_sym_default] = ACTIONS(972), + [anon_sym_while] = ACTIONS(972), + [anon_sym_do] = ACTIONS(972), + [anon_sym_for] = ACTIONS(972), + [anon_sym_return] = ACTIONS(972), + [anon_sym_break] = ACTIONS(972), + [anon_sym_continue] = ACTIONS(972), + [anon_sym_goto] = ACTIONS(972), + [anon_sym_DASH_DASH] = ACTIONS(974), + [anon_sym_PLUS_PLUS] = ACTIONS(974), + [anon_sym_sizeof] = ACTIONS(972), + [sym_number_literal] = ACTIONS(974), + [anon_sym_L_SQUOTE] = ACTIONS(974), + [anon_sym_u_SQUOTE] = ACTIONS(974), + [anon_sym_U_SQUOTE] = ACTIONS(974), + [anon_sym_u8_SQUOTE] = ACTIONS(974), + [anon_sym_SQUOTE] = ACTIONS(974), + [anon_sym_L_DQUOTE] = ACTIONS(974), + [anon_sym_u_DQUOTE] = ACTIONS(974), + [anon_sym_U_DQUOTE] = ACTIONS(974), + [anon_sym_u8_DQUOTE] = ACTIONS(974), + [anon_sym_DQUOTE] = ACTIONS(974), + [sym_true] = ACTIONS(972), + [sym_false] = ACTIONS(972), + [sym_null] = ACTIONS(972), + [sym_comment] = ACTIONS(3), + }, + [232] = { + [sym_attribute_declaration] = STATE(170), + [sym_compound_statement] = STATE(169), + [sym_attributed_statement] = STATE(169), + [sym_labeled_statement] = STATE(169), + [sym_expression_statement] = STATE(169), + [sym_if_statement] = STATE(169), + [sym_switch_statement] = STATE(169), + [sym_case_statement] = STATE(169), + [sym_while_statement] = STATE(169), + [sym_do_statement] = STATE(169), + [sym_for_statement] = STATE(169), + [sym_return_statement] = STATE(169), + [sym_break_statement] = STATE(169), + [sym_continue_statement] = STATE(169), + [sym_goto_statement] = STATE(169), + [sym__expression] = STATE(740), + [sym_comma_expression] = STATE(1438), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(170), + [sym_identifier] = ACTIONS(1128), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_if] = ACTIONS(57), + [anon_sym_switch] = ACTIONS(59), + [anon_sym_case] = ACTIONS(61), + [anon_sym_default] = ACTIONS(63), + [anon_sym_while] = ACTIONS(65), + [anon_sym_do] = ACTIONS(67), + [anon_sym_for] = ACTIONS(69), + [anon_sym_return] = ACTIONS(71), + [anon_sym_break] = ACTIONS(73), + [anon_sym_continue] = ACTIONS(75), + [anon_sym_goto] = ACTIONS(77), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [233] = { + [ts_builtin_sym_end] = ACTIONS(912), + [sym_identifier] = ACTIONS(910), + [aux_sym_preproc_include_token1] = ACTIONS(910), + [aux_sym_preproc_def_token1] = ACTIONS(910), + [aux_sym_preproc_if_token1] = ACTIONS(910), + [aux_sym_preproc_ifdef_token1] = ACTIONS(910), + [aux_sym_preproc_ifdef_token2] = ACTIONS(910), + [sym_preproc_directive] = ACTIONS(910), + [anon_sym_LPAREN2] = ACTIONS(912), + [anon_sym_BANG] = ACTIONS(912), + [anon_sym_TILDE] = ACTIONS(912), + [anon_sym_DASH] = ACTIONS(910), + [anon_sym_PLUS] = ACTIONS(910), + [anon_sym_STAR] = ACTIONS(912), + [anon_sym_AMP] = ACTIONS(912), + [anon_sym_SEMI] = ACTIONS(912), + [anon_sym_typedef] = ACTIONS(910), + [anon_sym_extern] = ACTIONS(910), + [anon_sym___attribute__] = ACTIONS(910), + [anon_sym_LBRACK_LBRACK] = ACTIONS(912), + [anon_sym___declspec] = ACTIONS(910), + [anon_sym___cdecl] = ACTIONS(910), + [anon_sym___clrcall] = ACTIONS(910), + [anon_sym___stdcall] = ACTIONS(910), + [anon_sym___fastcall] = ACTIONS(910), + [anon_sym___thiscall] = ACTIONS(910), + [anon_sym___vectorcall] = ACTIONS(910), + [anon_sym_LBRACE] = ACTIONS(912), + [anon_sym_static] = ACTIONS(910), + [anon_sym_auto] = ACTIONS(910), + [anon_sym_register] = ACTIONS(910), + [anon_sym_inline] = ACTIONS(910), + [anon_sym_const] = ACTIONS(910), + [anon_sym_volatile] = ACTIONS(910), + [anon_sym_restrict] = ACTIONS(910), + [anon_sym__Atomic] = ACTIONS(910), + [anon_sym_signed] = ACTIONS(910), + [anon_sym_unsigned] = ACTIONS(910), + [anon_sym_long] = ACTIONS(910), + [anon_sym_short] = ACTIONS(910), + [sym_primitive_type] = ACTIONS(910), + [anon_sym_enum] = ACTIONS(910), + [anon_sym_struct] = ACTIONS(910), + [anon_sym_union] = ACTIONS(910), + [anon_sym_if] = ACTIONS(910), + [anon_sym_else] = ACTIONS(910), + [anon_sym_switch] = ACTIONS(910), + [anon_sym_case] = ACTIONS(910), + [anon_sym_default] = ACTIONS(910), + [anon_sym_while] = ACTIONS(910), + [anon_sym_do] = ACTIONS(910), + [anon_sym_for] = ACTIONS(910), + [anon_sym_return] = ACTIONS(910), + [anon_sym_break] = ACTIONS(910), + [anon_sym_continue] = ACTIONS(910), + [anon_sym_goto] = ACTIONS(910), + [anon_sym_DASH_DASH] = ACTIONS(912), + [anon_sym_PLUS_PLUS] = ACTIONS(912), + [anon_sym_sizeof] = ACTIONS(910), + [sym_number_literal] = ACTIONS(912), + [anon_sym_L_SQUOTE] = ACTIONS(912), + [anon_sym_u_SQUOTE] = ACTIONS(912), + [anon_sym_U_SQUOTE] = ACTIONS(912), + [anon_sym_u8_SQUOTE] = ACTIONS(912), + [anon_sym_SQUOTE] = ACTIONS(912), + [anon_sym_L_DQUOTE] = ACTIONS(912), + [anon_sym_u_DQUOTE] = ACTIONS(912), + [anon_sym_U_DQUOTE] = ACTIONS(912), + [anon_sym_u8_DQUOTE] = ACTIONS(912), + [anon_sym_DQUOTE] = ACTIONS(912), + [sym_true] = ACTIONS(910), + [sym_false] = ACTIONS(910), + [sym_null] = ACTIONS(910), + [sym_comment] = ACTIONS(3), + }, + [234] = { + [sym_attribute_declaration] = STATE(247), + [sym_compound_statement] = STATE(87), + [sym_attributed_statement] = STATE(87), + [sym_labeled_statement] = STATE(87), + [sym_expression_statement] = STATE(87), + [sym_if_statement] = STATE(87), + [sym_switch_statement] = STATE(87), + [sym_case_statement] = STATE(87), + [sym_while_statement] = STATE(87), + [sym_do_statement] = STATE(87), + [sym_for_statement] = STATE(87), + [sym_return_statement] = STATE(87), + [sym_break_statement] = STATE(87), + [sym_continue_statement] = STATE(87), + [sym_goto_statement] = STATE(87), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [sym_identifier] = ACTIONS(1209), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [235] = { + [sym_identifier] = ACTIONS(976), + [aux_sym_preproc_include_token1] = ACTIONS(976), + [aux_sym_preproc_def_token1] = ACTIONS(976), + [aux_sym_preproc_if_token1] = ACTIONS(976), + [aux_sym_preproc_if_token2] = ACTIONS(976), + [aux_sym_preproc_ifdef_token1] = ACTIONS(976), + [aux_sym_preproc_ifdef_token2] = ACTIONS(976), + [sym_preproc_directive] = ACTIONS(976), + [anon_sym_LPAREN2] = ACTIONS(978), + [anon_sym_BANG] = ACTIONS(978), + [anon_sym_TILDE] = ACTIONS(978), + [anon_sym_DASH] = ACTIONS(976), + [anon_sym_PLUS] = ACTIONS(976), + [anon_sym_STAR] = ACTIONS(978), + [anon_sym_AMP] = ACTIONS(978), + [anon_sym_SEMI] = ACTIONS(978), + [anon_sym_typedef] = ACTIONS(976), + [anon_sym_extern] = ACTIONS(976), + [anon_sym___attribute__] = ACTIONS(976), + [anon_sym_LBRACK_LBRACK] = ACTIONS(978), + [anon_sym___declspec] = ACTIONS(976), + [anon_sym___cdecl] = ACTIONS(976), + [anon_sym___clrcall] = ACTIONS(976), + [anon_sym___stdcall] = ACTIONS(976), + [anon_sym___fastcall] = ACTIONS(976), + [anon_sym___thiscall] = ACTIONS(976), + [anon_sym___vectorcall] = ACTIONS(976), + [anon_sym_LBRACE] = ACTIONS(978), + [anon_sym_static] = ACTIONS(976), + [anon_sym_auto] = ACTIONS(976), + [anon_sym_register] = ACTIONS(976), + [anon_sym_inline] = ACTIONS(976), + [anon_sym_const] = ACTIONS(976), + [anon_sym_volatile] = ACTIONS(976), + [anon_sym_restrict] = ACTIONS(976), + [anon_sym__Atomic] = ACTIONS(976), + [anon_sym_signed] = ACTIONS(976), + [anon_sym_unsigned] = ACTIONS(976), + [anon_sym_long] = ACTIONS(976), + [anon_sym_short] = ACTIONS(976), + [sym_primitive_type] = ACTIONS(976), + [anon_sym_enum] = ACTIONS(976), + [anon_sym_struct] = ACTIONS(976), + [anon_sym_union] = ACTIONS(976), + [anon_sym_if] = ACTIONS(976), + [anon_sym_else] = ACTIONS(976), + [anon_sym_switch] = ACTIONS(976), + [anon_sym_case] = ACTIONS(976), + [anon_sym_default] = ACTIONS(976), + [anon_sym_while] = ACTIONS(976), + [anon_sym_do] = ACTIONS(976), + [anon_sym_for] = ACTIONS(976), + [anon_sym_return] = ACTIONS(976), + [anon_sym_break] = ACTIONS(976), + [anon_sym_continue] = ACTIONS(976), + [anon_sym_goto] = ACTIONS(976), + [anon_sym_DASH_DASH] = ACTIONS(978), + [anon_sym_PLUS_PLUS] = ACTIONS(978), + [anon_sym_sizeof] = ACTIONS(976), + [sym_number_literal] = ACTIONS(978), + [anon_sym_L_SQUOTE] = ACTIONS(978), + [anon_sym_u_SQUOTE] = ACTIONS(978), + [anon_sym_U_SQUOTE] = ACTIONS(978), + [anon_sym_u8_SQUOTE] = ACTIONS(978), + [anon_sym_SQUOTE] = ACTIONS(978), + [anon_sym_L_DQUOTE] = ACTIONS(978), + [anon_sym_u_DQUOTE] = ACTIONS(978), + [anon_sym_U_DQUOTE] = ACTIONS(978), + [anon_sym_u8_DQUOTE] = ACTIONS(978), + [anon_sym_DQUOTE] = ACTIONS(978), + [sym_true] = ACTIONS(976), + [sym_false] = ACTIONS(976), + [sym_null] = ACTIONS(976), + [sym_comment] = ACTIONS(3), + }, + [236] = { + [sym_identifier] = ACTIONS(964), + [aux_sym_preproc_include_token1] = ACTIONS(964), + [aux_sym_preproc_def_token1] = ACTIONS(964), + [aux_sym_preproc_if_token1] = ACTIONS(964), + [aux_sym_preproc_ifdef_token1] = ACTIONS(964), + [aux_sym_preproc_ifdef_token2] = ACTIONS(964), + [sym_preproc_directive] = ACTIONS(964), + [anon_sym_LPAREN2] = ACTIONS(966), + [anon_sym_BANG] = ACTIONS(966), + [anon_sym_TILDE] = ACTIONS(966), + [anon_sym_DASH] = ACTIONS(964), + [anon_sym_PLUS] = ACTIONS(964), + [anon_sym_STAR] = ACTIONS(966), + [anon_sym_AMP] = ACTIONS(966), + [anon_sym_SEMI] = ACTIONS(966), + [anon_sym_typedef] = ACTIONS(964), + [anon_sym_extern] = ACTIONS(964), + [anon_sym___attribute__] = ACTIONS(964), + [anon_sym_LBRACK_LBRACK] = ACTIONS(966), + [anon_sym___declspec] = ACTIONS(964), + [anon_sym___cdecl] = ACTIONS(964), + [anon_sym___clrcall] = ACTIONS(964), + [anon_sym___stdcall] = ACTIONS(964), + [anon_sym___fastcall] = ACTIONS(964), + [anon_sym___thiscall] = ACTIONS(964), + [anon_sym___vectorcall] = ACTIONS(964), + [anon_sym_LBRACE] = ACTIONS(966), + [anon_sym_RBRACE] = ACTIONS(966), + [anon_sym_static] = ACTIONS(964), + [anon_sym_auto] = ACTIONS(964), + [anon_sym_register] = ACTIONS(964), + [anon_sym_inline] = ACTIONS(964), + [anon_sym_const] = ACTIONS(964), + [anon_sym_volatile] = ACTIONS(964), + [anon_sym_restrict] = ACTIONS(964), + [anon_sym__Atomic] = ACTIONS(964), + [anon_sym_signed] = ACTIONS(964), + [anon_sym_unsigned] = ACTIONS(964), + [anon_sym_long] = ACTIONS(964), + [anon_sym_short] = ACTIONS(964), + [sym_primitive_type] = ACTIONS(964), + [anon_sym_enum] = ACTIONS(964), + [anon_sym_struct] = ACTIONS(964), + [anon_sym_union] = ACTIONS(964), + [anon_sym_if] = ACTIONS(964), + [anon_sym_else] = ACTIONS(964), + [anon_sym_switch] = ACTIONS(964), + [anon_sym_case] = ACTIONS(964), + [anon_sym_default] = ACTIONS(964), + [anon_sym_while] = ACTIONS(964), + [anon_sym_do] = ACTIONS(964), + [anon_sym_for] = ACTIONS(964), + [anon_sym_return] = ACTIONS(964), + [anon_sym_break] = ACTIONS(964), + [anon_sym_continue] = ACTIONS(964), + [anon_sym_goto] = ACTIONS(964), + [anon_sym_DASH_DASH] = ACTIONS(966), + [anon_sym_PLUS_PLUS] = ACTIONS(966), + [anon_sym_sizeof] = ACTIONS(964), + [sym_number_literal] = ACTIONS(966), + [anon_sym_L_SQUOTE] = ACTIONS(966), + [anon_sym_u_SQUOTE] = ACTIONS(966), + [anon_sym_U_SQUOTE] = ACTIONS(966), + [anon_sym_u8_SQUOTE] = ACTIONS(966), + [anon_sym_SQUOTE] = ACTIONS(966), + [anon_sym_L_DQUOTE] = ACTIONS(966), + [anon_sym_u_DQUOTE] = ACTIONS(966), + [anon_sym_U_DQUOTE] = ACTIONS(966), + [anon_sym_u8_DQUOTE] = ACTIONS(966), + [anon_sym_DQUOTE] = ACTIONS(966), + [sym_true] = ACTIONS(964), + [sym_false] = ACTIONS(964), + [sym_null] = ACTIONS(964), + [sym_comment] = ACTIONS(3), + }, + [237] = { + [sym_attribute_declaration] = STATE(153), + [sym_compound_statement] = STATE(298), + [sym_attributed_statement] = STATE(298), + [sym_labeled_statement] = STATE(298), + [sym_expression_statement] = STATE(298), + [sym_if_statement] = STATE(298), + [sym_switch_statement] = STATE(298), + [sym_case_statement] = STATE(298), + [sym_while_statement] = STATE(298), + [sym_do_statement] = STATE(298), + [sym_for_statement] = STATE(298), + [sym_return_statement] = STATE(298), + [sym_break_statement] = STATE(298), + [sym_continue_statement] = STATE(298), + [sym_goto_statement] = STATE(298), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [sym_identifier] = ACTIONS(1207), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [238] = { + [ts_builtin_sym_end] = ACTIONS(950), + [sym_identifier] = ACTIONS(948), + [aux_sym_preproc_include_token1] = ACTIONS(948), + [aux_sym_preproc_def_token1] = ACTIONS(948), + [aux_sym_preproc_if_token1] = ACTIONS(948), + [aux_sym_preproc_ifdef_token1] = ACTIONS(948), + [aux_sym_preproc_ifdef_token2] = ACTIONS(948), + [sym_preproc_directive] = ACTIONS(948), + [anon_sym_LPAREN2] = ACTIONS(950), + [anon_sym_BANG] = ACTIONS(950), + [anon_sym_TILDE] = ACTIONS(950), + [anon_sym_DASH] = ACTIONS(948), + [anon_sym_PLUS] = ACTIONS(948), + [anon_sym_STAR] = ACTIONS(950), + [anon_sym_AMP] = ACTIONS(950), + [anon_sym_SEMI] = ACTIONS(950), + [anon_sym_typedef] = ACTIONS(948), + [anon_sym_extern] = ACTIONS(948), + [anon_sym___attribute__] = ACTIONS(948), + [anon_sym_LBRACK_LBRACK] = ACTIONS(950), + [anon_sym___declspec] = ACTIONS(948), + [anon_sym___cdecl] = ACTIONS(948), + [anon_sym___clrcall] = ACTIONS(948), + [anon_sym___stdcall] = ACTIONS(948), + [anon_sym___fastcall] = ACTIONS(948), + [anon_sym___thiscall] = ACTIONS(948), + [anon_sym___vectorcall] = ACTIONS(948), + [anon_sym_LBRACE] = ACTIONS(950), + [anon_sym_static] = ACTIONS(948), + [anon_sym_auto] = ACTIONS(948), + [anon_sym_register] = ACTIONS(948), + [anon_sym_inline] = ACTIONS(948), + [anon_sym_const] = ACTIONS(948), + [anon_sym_volatile] = ACTIONS(948), + [anon_sym_restrict] = ACTIONS(948), + [anon_sym__Atomic] = ACTIONS(948), + [anon_sym_signed] = ACTIONS(948), + [anon_sym_unsigned] = ACTIONS(948), + [anon_sym_long] = ACTIONS(948), + [anon_sym_short] = ACTIONS(948), + [sym_primitive_type] = ACTIONS(948), + [anon_sym_enum] = ACTIONS(948), + [anon_sym_struct] = ACTIONS(948), + [anon_sym_union] = ACTIONS(948), + [anon_sym_if] = ACTIONS(948), + [anon_sym_else] = ACTIONS(948), + [anon_sym_switch] = ACTIONS(948), + [anon_sym_case] = ACTIONS(948), + [anon_sym_default] = ACTIONS(948), + [anon_sym_while] = ACTIONS(948), + [anon_sym_do] = ACTIONS(948), + [anon_sym_for] = ACTIONS(948), + [anon_sym_return] = ACTIONS(948), + [anon_sym_break] = ACTIONS(948), + [anon_sym_continue] = ACTIONS(948), + [anon_sym_goto] = ACTIONS(948), + [anon_sym_DASH_DASH] = ACTIONS(950), + [anon_sym_PLUS_PLUS] = ACTIONS(950), + [anon_sym_sizeof] = ACTIONS(948), + [sym_number_literal] = ACTIONS(950), + [anon_sym_L_SQUOTE] = ACTIONS(950), + [anon_sym_u_SQUOTE] = ACTIONS(950), + [anon_sym_U_SQUOTE] = ACTIONS(950), + [anon_sym_u8_SQUOTE] = ACTIONS(950), + [anon_sym_SQUOTE] = ACTIONS(950), + [anon_sym_L_DQUOTE] = ACTIONS(950), + [anon_sym_u_DQUOTE] = ACTIONS(950), + [anon_sym_U_DQUOTE] = ACTIONS(950), + [anon_sym_u8_DQUOTE] = ACTIONS(950), + [anon_sym_DQUOTE] = ACTIONS(950), + [sym_true] = ACTIONS(948), + [sym_false] = ACTIONS(948), + [sym_null] = ACTIONS(948), + [sym_comment] = ACTIONS(3), + }, + [239] = { + [ts_builtin_sym_end] = ACTIONS(1018), + [sym_identifier] = ACTIONS(1016), + [aux_sym_preproc_include_token1] = ACTIONS(1016), + [aux_sym_preproc_def_token1] = ACTIONS(1016), + [aux_sym_preproc_if_token1] = ACTIONS(1016), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1016), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1016), + [sym_preproc_directive] = ACTIONS(1016), + [anon_sym_LPAREN2] = ACTIONS(1018), + [anon_sym_BANG] = ACTIONS(1018), + [anon_sym_TILDE] = ACTIONS(1018), + [anon_sym_DASH] = ACTIONS(1016), + [anon_sym_PLUS] = ACTIONS(1016), + [anon_sym_STAR] = ACTIONS(1018), + [anon_sym_AMP] = ACTIONS(1018), + [anon_sym_SEMI] = ACTIONS(1018), + [anon_sym_typedef] = ACTIONS(1016), + [anon_sym_extern] = ACTIONS(1016), + [anon_sym___attribute__] = ACTIONS(1016), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1018), + [anon_sym___declspec] = ACTIONS(1016), + [anon_sym___cdecl] = ACTIONS(1016), + [anon_sym___clrcall] = ACTIONS(1016), + [anon_sym___stdcall] = ACTIONS(1016), + [anon_sym___fastcall] = ACTIONS(1016), + [anon_sym___thiscall] = ACTIONS(1016), + [anon_sym___vectorcall] = ACTIONS(1016), + [anon_sym_LBRACE] = ACTIONS(1018), + [anon_sym_static] = ACTIONS(1016), + [anon_sym_auto] = ACTIONS(1016), + [anon_sym_register] = ACTIONS(1016), + [anon_sym_inline] = ACTIONS(1016), + [anon_sym_const] = ACTIONS(1016), + [anon_sym_volatile] = ACTIONS(1016), + [anon_sym_restrict] = ACTIONS(1016), + [anon_sym__Atomic] = ACTIONS(1016), + [anon_sym_signed] = ACTIONS(1016), + [anon_sym_unsigned] = ACTIONS(1016), + [anon_sym_long] = ACTIONS(1016), + [anon_sym_short] = ACTIONS(1016), + [sym_primitive_type] = ACTIONS(1016), + [anon_sym_enum] = ACTIONS(1016), + [anon_sym_struct] = ACTIONS(1016), + [anon_sym_union] = ACTIONS(1016), + [anon_sym_if] = ACTIONS(1016), + [anon_sym_else] = ACTIONS(1016), + [anon_sym_switch] = ACTIONS(1016), + [anon_sym_case] = ACTIONS(1016), + [anon_sym_default] = ACTIONS(1016), + [anon_sym_while] = ACTIONS(1016), + [anon_sym_do] = ACTIONS(1016), + [anon_sym_for] = ACTIONS(1016), + [anon_sym_return] = ACTIONS(1016), + [anon_sym_break] = ACTIONS(1016), + [anon_sym_continue] = ACTIONS(1016), + [anon_sym_goto] = ACTIONS(1016), + [anon_sym_DASH_DASH] = ACTIONS(1018), + [anon_sym_PLUS_PLUS] = ACTIONS(1018), + [anon_sym_sizeof] = ACTIONS(1016), + [sym_number_literal] = ACTIONS(1018), + [anon_sym_L_SQUOTE] = ACTIONS(1018), + [anon_sym_u_SQUOTE] = ACTIONS(1018), + [anon_sym_U_SQUOTE] = ACTIONS(1018), + [anon_sym_u8_SQUOTE] = ACTIONS(1018), + [anon_sym_SQUOTE] = ACTIONS(1018), + [anon_sym_L_DQUOTE] = ACTIONS(1018), + [anon_sym_u_DQUOTE] = ACTIONS(1018), + [anon_sym_U_DQUOTE] = ACTIONS(1018), + [anon_sym_u8_DQUOTE] = ACTIONS(1018), + [anon_sym_DQUOTE] = ACTIONS(1018), + [sym_true] = ACTIONS(1016), + [sym_false] = ACTIONS(1016), + [sym_null] = ACTIONS(1016), + [sym_comment] = ACTIONS(3), + }, + [240] = { + [sym_attribute_declaration] = STATE(247), + [sym_compound_statement] = STATE(73), + [sym_attributed_statement] = STATE(73), + [sym_labeled_statement] = STATE(73), + [sym_expression_statement] = STATE(73), + [sym_if_statement] = STATE(73), + [sym_switch_statement] = STATE(73), + [sym_case_statement] = STATE(73), + [sym_while_statement] = STATE(73), + [sym_do_statement] = STATE(73), + [sym_for_statement] = STATE(73), + [sym_return_statement] = STATE(73), + [sym_break_statement] = STATE(73), + [sym_continue_statement] = STATE(73), + [sym_goto_statement] = STATE(73), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [sym_identifier] = ACTIONS(1209), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [241] = { + [sym_identifier] = ACTIONS(980), + [aux_sym_preproc_include_token1] = ACTIONS(980), + [aux_sym_preproc_def_token1] = ACTIONS(980), + [aux_sym_preproc_if_token1] = ACTIONS(980), + [aux_sym_preproc_if_token2] = ACTIONS(980), + [aux_sym_preproc_ifdef_token1] = ACTIONS(980), + [aux_sym_preproc_ifdef_token2] = ACTIONS(980), + [sym_preproc_directive] = ACTIONS(980), + [anon_sym_LPAREN2] = ACTIONS(982), + [anon_sym_BANG] = ACTIONS(982), + [anon_sym_TILDE] = ACTIONS(982), + [anon_sym_DASH] = ACTIONS(980), + [anon_sym_PLUS] = ACTIONS(980), + [anon_sym_STAR] = ACTIONS(982), + [anon_sym_AMP] = ACTIONS(982), + [anon_sym_SEMI] = ACTIONS(982), + [anon_sym_typedef] = ACTIONS(980), + [anon_sym_extern] = ACTIONS(980), + [anon_sym___attribute__] = ACTIONS(980), + [anon_sym_LBRACK_LBRACK] = ACTIONS(982), + [anon_sym___declspec] = ACTIONS(980), + [anon_sym___cdecl] = ACTIONS(980), + [anon_sym___clrcall] = ACTIONS(980), + [anon_sym___stdcall] = ACTIONS(980), + [anon_sym___fastcall] = ACTIONS(980), + [anon_sym___thiscall] = ACTIONS(980), + [anon_sym___vectorcall] = ACTIONS(980), + [anon_sym_LBRACE] = ACTIONS(982), + [anon_sym_static] = ACTIONS(980), + [anon_sym_auto] = ACTIONS(980), + [anon_sym_register] = ACTIONS(980), + [anon_sym_inline] = ACTIONS(980), + [anon_sym_const] = ACTIONS(980), + [anon_sym_volatile] = ACTIONS(980), + [anon_sym_restrict] = ACTIONS(980), + [anon_sym__Atomic] = ACTIONS(980), + [anon_sym_signed] = ACTIONS(980), + [anon_sym_unsigned] = ACTIONS(980), + [anon_sym_long] = ACTIONS(980), + [anon_sym_short] = ACTIONS(980), + [sym_primitive_type] = ACTIONS(980), + [anon_sym_enum] = ACTIONS(980), + [anon_sym_struct] = ACTIONS(980), + [anon_sym_union] = ACTIONS(980), + [anon_sym_if] = ACTIONS(980), + [anon_sym_else] = ACTIONS(980), + [anon_sym_switch] = ACTIONS(980), + [anon_sym_case] = ACTIONS(980), + [anon_sym_default] = ACTIONS(980), + [anon_sym_while] = ACTIONS(980), + [anon_sym_do] = ACTIONS(980), + [anon_sym_for] = ACTIONS(980), + [anon_sym_return] = ACTIONS(980), + [anon_sym_break] = ACTIONS(980), + [anon_sym_continue] = ACTIONS(980), + [anon_sym_goto] = ACTIONS(980), + [anon_sym_DASH_DASH] = ACTIONS(982), + [anon_sym_PLUS_PLUS] = ACTIONS(982), + [anon_sym_sizeof] = ACTIONS(980), + [sym_number_literal] = ACTIONS(982), + [anon_sym_L_SQUOTE] = ACTIONS(982), + [anon_sym_u_SQUOTE] = ACTIONS(982), + [anon_sym_U_SQUOTE] = ACTIONS(982), + [anon_sym_u8_SQUOTE] = ACTIONS(982), + [anon_sym_SQUOTE] = ACTIONS(982), + [anon_sym_L_DQUOTE] = ACTIONS(982), + [anon_sym_u_DQUOTE] = ACTIONS(982), + [anon_sym_U_DQUOTE] = ACTIONS(982), + [anon_sym_u8_DQUOTE] = ACTIONS(982), + [anon_sym_DQUOTE] = ACTIONS(982), + [sym_true] = ACTIONS(980), + [sym_false] = ACTIONS(980), + [sym_null] = ACTIONS(980), + [sym_comment] = ACTIONS(3), + }, + [242] = { + [sym_attribute_declaration] = STATE(292), + [sym_compound_statement] = STATE(291), + [sym_attributed_statement] = STATE(291), + [sym_labeled_statement] = STATE(291), + [sym_expression_statement] = STATE(291), + [sym_if_statement] = STATE(291), + [sym_switch_statement] = STATE(291), + [sym_case_statement] = STATE(291), + [sym_while_statement] = STATE(291), + [sym_do_statement] = STATE(291), + [sym_for_statement] = STATE(291), + [sym_return_statement] = STATE(291), + [sym_break_statement] = STATE(291), + [sym_continue_statement] = STATE(291), + [sym_goto_statement] = STATE(291), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(292), + [sym_identifier] = ACTIONS(1124), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [243] = { + [sym_attribute_declaration] = STATE(247), + [sym_compound_statement] = STATE(75), + [sym_attributed_statement] = STATE(75), + [sym_labeled_statement] = STATE(75), + [sym_expression_statement] = STATE(75), + [sym_if_statement] = STATE(75), + [sym_switch_statement] = STATE(75), + [sym_case_statement] = STATE(75), + [sym_while_statement] = STATE(75), + [sym_do_statement] = STATE(75), + [sym_for_statement] = STATE(75), + [sym_return_statement] = STATE(75), + [sym_break_statement] = STATE(75), + [sym_continue_statement] = STATE(75), + [sym_goto_statement] = STATE(75), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(247), + [sym_identifier] = ACTIONS(1209), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [244] = { + [sym_attribute_declaration] = STATE(153), + [sym_compound_statement] = STATE(299), + [sym_attributed_statement] = STATE(299), + [sym_labeled_statement] = STATE(299), + [sym_expression_statement] = STATE(299), + [sym_if_statement] = STATE(299), + [sym_switch_statement] = STATE(299), + [sym_case_statement] = STATE(299), + [sym_while_statement] = STATE(299), + [sym_do_statement] = STATE(299), + [sym_for_statement] = STATE(299), + [sym_return_statement] = STATE(299), + [sym_break_statement] = STATE(299), + [sym_continue_statement] = STATE(299), + [sym_goto_statement] = STATE(299), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [sym_identifier] = ACTIONS(1207), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [245] = { + [sym_identifier] = ACTIONS(1016), + [aux_sym_preproc_include_token1] = ACTIONS(1016), + [aux_sym_preproc_def_token1] = ACTIONS(1016), + [aux_sym_preproc_if_token1] = ACTIONS(1016), + [aux_sym_preproc_if_token2] = ACTIONS(1016), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1016), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1016), + [sym_preproc_directive] = ACTIONS(1016), + [anon_sym_LPAREN2] = ACTIONS(1018), + [anon_sym_BANG] = ACTIONS(1018), + [anon_sym_TILDE] = ACTIONS(1018), + [anon_sym_DASH] = ACTIONS(1016), + [anon_sym_PLUS] = ACTIONS(1016), + [anon_sym_STAR] = ACTIONS(1018), + [anon_sym_AMP] = ACTIONS(1018), + [anon_sym_SEMI] = ACTIONS(1018), + [anon_sym_typedef] = ACTIONS(1016), + [anon_sym_extern] = ACTIONS(1016), + [anon_sym___attribute__] = ACTIONS(1016), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1018), + [anon_sym___declspec] = ACTIONS(1016), + [anon_sym___cdecl] = ACTIONS(1016), + [anon_sym___clrcall] = ACTIONS(1016), + [anon_sym___stdcall] = ACTIONS(1016), + [anon_sym___fastcall] = ACTIONS(1016), + [anon_sym___thiscall] = ACTIONS(1016), + [anon_sym___vectorcall] = ACTIONS(1016), + [anon_sym_LBRACE] = ACTIONS(1018), + [anon_sym_static] = ACTIONS(1016), + [anon_sym_auto] = ACTIONS(1016), + [anon_sym_register] = ACTIONS(1016), + [anon_sym_inline] = ACTIONS(1016), + [anon_sym_const] = ACTIONS(1016), + [anon_sym_volatile] = ACTIONS(1016), + [anon_sym_restrict] = ACTIONS(1016), + [anon_sym__Atomic] = ACTIONS(1016), + [anon_sym_signed] = ACTIONS(1016), + [anon_sym_unsigned] = ACTIONS(1016), + [anon_sym_long] = ACTIONS(1016), + [anon_sym_short] = ACTIONS(1016), + [sym_primitive_type] = ACTIONS(1016), + [anon_sym_enum] = ACTIONS(1016), + [anon_sym_struct] = ACTIONS(1016), + [anon_sym_union] = ACTIONS(1016), + [anon_sym_if] = ACTIONS(1016), + [anon_sym_else] = ACTIONS(1016), + [anon_sym_switch] = ACTIONS(1016), + [anon_sym_case] = ACTIONS(1016), + [anon_sym_default] = ACTIONS(1016), + [anon_sym_while] = ACTIONS(1016), + [anon_sym_do] = ACTIONS(1016), + [anon_sym_for] = ACTIONS(1016), + [anon_sym_return] = ACTIONS(1016), + [anon_sym_break] = ACTIONS(1016), + [anon_sym_continue] = ACTIONS(1016), + [anon_sym_goto] = ACTIONS(1016), + [anon_sym_DASH_DASH] = ACTIONS(1018), + [anon_sym_PLUS_PLUS] = ACTIONS(1018), + [anon_sym_sizeof] = ACTIONS(1016), + [sym_number_literal] = ACTIONS(1018), + [anon_sym_L_SQUOTE] = ACTIONS(1018), + [anon_sym_u_SQUOTE] = ACTIONS(1018), + [anon_sym_U_SQUOTE] = ACTIONS(1018), + [anon_sym_u8_SQUOTE] = ACTIONS(1018), + [anon_sym_SQUOTE] = ACTIONS(1018), + [anon_sym_L_DQUOTE] = ACTIONS(1018), + [anon_sym_u_DQUOTE] = ACTIONS(1018), + [anon_sym_U_DQUOTE] = ACTIONS(1018), + [anon_sym_u8_DQUOTE] = ACTIONS(1018), + [anon_sym_DQUOTE] = ACTIONS(1018), + [sym_true] = ACTIONS(1016), + [sym_false] = ACTIONS(1016), + [sym_null] = ACTIONS(1016), + [sym_comment] = ACTIONS(3), + }, + [246] = { + [ts_builtin_sym_end] = ACTIONS(962), + [sym_identifier] = ACTIONS(960), + [aux_sym_preproc_include_token1] = ACTIONS(960), + [aux_sym_preproc_def_token1] = ACTIONS(960), + [aux_sym_preproc_if_token1] = ACTIONS(960), + [aux_sym_preproc_ifdef_token1] = ACTIONS(960), + [aux_sym_preproc_ifdef_token2] = ACTIONS(960), + [sym_preproc_directive] = ACTIONS(960), + [anon_sym_LPAREN2] = ACTIONS(962), + [anon_sym_BANG] = ACTIONS(962), + [anon_sym_TILDE] = ACTIONS(962), + [anon_sym_DASH] = ACTIONS(960), + [anon_sym_PLUS] = ACTIONS(960), + [anon_sym_STAR] = ACTIONS(962), + [anon_sym_AMP] = ACTIONS(962), + [anon_sym_SEMI] = ACTIONS(962), + [anon_sym_typedef] = ACTIONS(960), + [anon_sym_extern] = ACTIONS(960), + [anon_sym___attribute__] = ACTIONS(960), + [anon_sym_LBRACK_LBRACK] = ACTIONS(962), + [anon_sym___declspec] = ACTIONS(960), + [anon_sym___cdecl] = ACTIONS(960), + [anon_sym___clrcall] = ACTIONS(960), + [anon_sym___stdcall] = ACTIONS(960), + [anon_sym___fastcall] = ACTIONS(960), + [anon_sym___thiscall] = ACTIONS(960), + [anon_sym___vectorcall] = ACTIONS(960), + [anon_sym_LBRACE] = ACTIONS(962), + [anon_sym_static] = ACTIONS(960), + [anon_sym_auto] = ACTIONS(960), + [anon_sym_register] = ACTIONS(960), + [anon_sym_inline] = ACTIONS(960), + [anon_sym_const] = ACTIONS(960), + [anon_sym_volatile] = ACTIONS(960), + [anon_sym_restrict] = ACTIONS(960), + [anon_sym__Atomic] = ACTIONS(960), + [anon_sym_signed] = ACTIONS(960), + [anon_sym_unsigned] = ACTIONS(960), + [anon_sym_long] = ACTIONS(960), + [anon_sym_short] = ACTIONS(960), + [sym_primitive_type] = ACTIONS(960), + [anon_sym_enum] = ACTIONS(960), + [anon_sym_struct] = ACTIONS(960), + [anon_sym_union] = ACTIONS(960), + [anon_sym_if] = ACTIONS(960), + [anon_sym_else] = ACTIONS(960), + [anon_sym_switch] = ACTIONS(960), + [anon_sym_case] = ACTIONS(960), + [anon_sym_default] = ACTIONS(960), + [anon_sym_while] = ACTIONS(960), + [anon_sym_do] = ACTIONS(960), + [anon_sym_for] = ACTIONS(960), + [anon_sym_return] = ACTIONS(960), + [anon_sym_break] = ACTIONS(960), + [anon_sym_continue] = ACTIONS(960), + [anon_sym_goto] = ACTIONS(960), + [anon_sym_DASH_DASH] = ACTIONS(962), + [anon_sym_PLUS_PLUS] = ACTIONS(962), + [anon_sym_sizeof] = ACTIONS(960), + [sym_number_literal] = ACTIONS(962), + [anon_sym_L_SQUOTE] = ACTIONS(962), + [anon_sym_u_SQUOTE] = ACTIONS(962), + [anon_sym_U_SQUOTE] = ACTIONS(962), + [anon_sym_u8_SQUOTE] = ACTIONS(962), + [anon_sym_SQUOTE] = ACTIONS(962), + [anon_sym_L_DQUOTE] = ACTIONS(962), + [anon_sym_u_DQUOTE] = ACTIONS(962), + [anon_sym_U_DQUOTE] = ACTIONS(962), + [anon_sym_u8_DQUOTE] = ACTIONS(962), + [anon_sym_DQUOTE] = ACTIONS(962), + [sym_true] = ACTIONS(960), + [sym_false] = ACTIONS(960), + [sym_null] = ACTIONS(960), + [sym_comment] = ACTIONS(3), + }, + [247] = { + [sym_attribute_declaration] = STATE(225), + [sym_compound_statement] = STATE(82), + [sym_attributed_statement] = STATE(82), + [sym_labeled_statement] = STATE(82), + [sym_expression_statement] = STATE(82), + [sym_if_statement] = STATE(82), + [sym_switch_statement] = STATE(82), + [sym_case_statement] = STATE(82), + [sym_while_statement] = STATE(82), + [sym_do_statement] = STATE(82), + [sym_for_statement] = STATE(82), + [sym_return_statement] = STATE(82), + [sym_break_statement] = STATE(82), + [sym_continue_statement] = STATE(82), + [sym_goto_statement] = STATE(82), + [sym__expression] = STATE(697), + [sym_comma_expression] = STATE(1451), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(225), + [sym_identifier] = ACTIONS(1209), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(115), + [anon_sym_if] = ACTIONS(117), + [anon_sym_switch] = ACTIONS(119), + [anon_sym_case] = ACTIONS(121), + [anon_sym_default] = ACTIONS(123), + [anon_sym_while] = ACTIONS(125), + [anon_sym_do] = ACTIONS(127), + [anon_sym_for] = ACTIONS(129), + [anon_sym_return] = ACTIONS(131), + [anon_sym_break] = ACTIONS(133), + [anon_sym_continue] = ACTIONS(135), + [anon_sym_goto] = ACTIONS(137), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [248] = { + [sym_identifier] = ACTIONS(1024), + [aux_sym_preproc_include_token1] = ACTIONS(1024), + [aux_sym_preproc_def_token1] = ACTIONS(1024), + [aux_sym_preproc_if_token1] = ACTIONS(1024), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1024), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1024), + [sym_preproc_directive] = ACTIONS(1024), + [anon_sym_LPAREN2] = ACTIONS(1026), + [anon_sym_BANG] = ACTIONS(1026), + [anon_sym_TILDE] = ACTIONS(1026), + [anon_sym_DASH] = ACTIONS(1024), + [anon_sym_PLUS] = ACTIONS(1024), + [anon_sym_STAR] = ACTIONS(1026), + [anon_sym_AMP] = ACTIONS(1026), + [anon_sym_SEMI] = ACTIONS(1026), + [anon_sym_typedef] = ACTIONS(1024), + [anon_sym_extern] = ACTIONS(1024), + [anon_sym___attribute__] = ACTIONS(1024), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1026), + [anon_sym___declspec] = ACTIONS(1024), + [anon_sym___cdecl] = ACTIONS(1024), + [anon_sym___clrcall] = ACTIONS(1024), + [anon_sym___stdcall] = ACTIONS(1024), + [anon_sym___fastcall] = ACTIONS(1024), + [anon_sym___thiscall] = ACTIONS(1024), + [anon_sym___vectorcall] = ACTIONS(1024), + [anon_sym_LBRACE] = ACTIONS(1026), + [anon_sym_RBRACE] = ACTIONS(1026), + [anon_sym_static] = ACTIONS(1024), + [anon_sym_auto] = ACTIONS(1024), + [anon_sym_register] = ACTIONS(1024), + [anon_sym_inline] = ACTIONS(1024), + [anon_sym_const] = ACTIONS(1024), + [anon_sym_volatile] = ACTIONS(1024), + [anon_sym_restrict] = ACTIONS(1024), + [anon_sym__Atomic] = ACTIONS(1024), + [anon_sym_signed] = ACTIONS(1024), + [anon_sym_unsigned] = ACTIONS(1024), + [anon_sym_long] = ACTIONS(1024), + [anon_sym_short] = ACTIONS(1024), + [sym_primitive_type] = ACTIONS(1024), + [anon_sym_enum] = ACTIONS(1024), + [anon_sym_struct] = ACTIONS(1024), + [anon_sym_union] = ACTIONS(1024), + [anon_sym_if] = ACTIONS(1024), + [anon_sym_else] = ACTIONS(1024), + [anon_sym_switch] = ACTIONS(1024), + [anon_sym_case] = ACTIONS(1024), + [anon_sym_default] = ACTIONS(1024), + [anon_sym_while] = ACTIONS(1024), + [anon_sym_do] = ACTIONS(1024), + [anon_sym_for] = ACTIONS(1024), + [anon_sym_return] = ACTIONS(1024), + [anon_sym_break] = ACTIONS(1024), + [anon_sym_continue] = ACTIONS(1024), + [anon_sym_goto] = ACTIONS(1024), + [anon_sym_DASH_DASH] = ACTIONS(1026), + [anon_sym_PLUS_PLUS] = ACTIONS(1026), + [anon_sym_sizeof] = ACTIONS(1024), + [sym_number_literal] = ACTIONS(1026), + [anon_sym_L_SQUOTE] = ACTIONS(1026), + [anon_sym_u_SQUOTE] = ACTIONS(1026), + [anon_sym_U_SQUOTE] = ACTIONS(1026), + [anon_sym_u8_SQUOTE] = ACTIONS(1026), + [anon_sym_SQUOTE] = ACTIONS(1026), + [anon_sym_L_DQUOTE] = ACTIONS(1026), + [anon_sym_u_DQUOTE] = ACTIONS(1026), + [anon_sym_U_DQUOTE] = ACTIONS(1026), + [anon_sym_u8_DQUOTE] = ACTIONS(1026), + [anon_sym_DQUOTE] = ACTIONS(1026), + [sym_true] = ACTIONS(1024), + [sym_false] = ACTIONS(1024), + [sym_null] = ACTIONS(1024), + [sym_comment] = ACTIONS(3), + }, + [249] = { + [sym_attribute_declaration] = STATE(153), + [sym_compound_statement] = STATE(199), + [sym_attributed_statement] = STATE(199), + [sym_labeled_statement] = STATE(199), + [sym_expression_statement] = STATE(199), + [sym_if_statement] = STATE(199), + [sym_switch_statement] = STATE(199), + [sym_case_statement] = STATE(199), + [sym_while_statement] = STATE(199), + [sym_do_statement] = STATE(199), + [sym_for_statement] = STATE(199), + [sym_return_statement] = STATE(199), + [sym_break_statement] = STATE(199), + [sym_continue_statement] = STATE(199), + [sym_goto_statement] = STATE(199), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [sym_identifier] = ACTIONS(1207), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [250] = { + [sym_identifier] = ACTIONS(1008), + [aux_sym_preproc_include_token1] = ACTIONS(1008), + [aux_sym_preproc_def_token1] = ACTIONS(1008), + [aux_sym_preproc_if_token1] = ACTIONS(1008), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1008), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1008), + [sym_preproc_directive] = ACTIONS(1008), + [anon_sym_LPAREN2] = ACTIONS(1010), + [anon_sym_BANG] = ACTIONS(1010), + [anon_sym_TILDE] = ACTIONS(1010), + [anon_sym_DASH] = ACTIONS(1008), + [anon_sym_PLUS] = ACTIONS(1008), + [anon_sym_STAR] = ACTIONS(1010), + [anon_sym_AMP] = ACTIONS(1010), + [anon_sym_SEMI] = ACTIONS(1010), + [anon_sym_typedef] = ACTIONS(1008), + [anon_sym_extern] = ACTIONS(1008), + [anon_sym___attribute__] = ACTIONS(1008), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1010), + [anon_sym___declspec] = ACTIONS(1008), + [anon_sym___cdecl] = ACTIONS(1008), + [anon_sym___clrcall] = ACTIONS(1008), + [anon_sym___stdcall] = ACTIONS(1008), + [anon_sym___fastcall] = ACTIONS(1008), + [anon_sym___thiscall] = ACTIONS(1008), + [anon_sym___vectorcall] = ACTIONS(1008), + [anon_sym_LBRACE] = ACTIONS(1010), + [anon_sym_RBRACE] = ACTIONS(1010), + [anon_sym_static] = ACTIONS(1008), + [anon_sym_auto] = ACTIONS(1008), + [anon_sym_register] = ACTIONS(1008), + [anon_sym_inline] = ACTIONS(1008), + [anon_sym_const] = ACTIONS(1008), + [anon_sym_volatile] = ACTIONS(1008), + [anon_sym_restrict] = ACTIONS(1008), + [anon_sym__Atomic] = ACTIONS(1008), + [anon_sym_signed] = ACTIONS(1008), + [anon_sym_unsigned] = ACTIONS(1008), + [anon_sym_long] = ACTIONS(1008), + [anon_sym_short] = ACTIONS(1008), + [sym_primitive_type] = ACTIONS(1008), + [anon_sym_enum] = ACTIONS(1008), + [anon_sym_struct] = ACTIONS(1008), + [anon_sym_union] = ACTIONS(1008), + [anon_sym_if] = ACTIONS(1008), + [anon_sym_else] = ACTIONS(1008), + [anon_sym_switch] = ACTIONS(1008), + [anon_sym_case] = ACTIONS(1008), + [anon_sym_default] = ACTIONS(1008), + [anon_sym_while] = ACTIONS(1008), + [anon_sym_do] = ACTIONS(1008), + [anon_sym_for] = ACTIONS(1008), + [anon_sym_return] = ACTIONS(1008), + [anon_sym_break] = ACTIONS(1008), + [anon_sym_continue] = ACTIONS(1008), + [anon_sym_goto] = ACTIONS(1008), + [anon_sym_DASH_DASH] = ACTIONS(1010), + [anon_sym_PLUS_PLUS] = ACTIONS(1010), + [anon_sym_sizeof] = ACTIONS(1008), + [sym_number_literal] = ACTIONS(1010), + [anon_sym_L_SQUOTE] = ACTIONS(1010), + [anon_sym_u_SQUOTE] = ACTIONS(1010), + [anon_sym_U_SQUOTE] = ACTIONS(1010), + [anon_sym_u8_SQUOTE] = ACTIONS(1010), + [anon_sym_SQUOTE] = ACTIONS(1010), + [anon_sym_L_DQUOTE] = ACTIONS(1010), + [anon_sym_u_DQUOTE] = ACTIONS(1010), + [anon_sym_U_DQUOTE] = ACTIONS(1010), + [anon_sym_u8_DQUOTE] = ACTIONS(1010), + [anon_sym_DQUOTE] = ACTIONS(1010), + [sym_true] = ACTIONS(1008), + [sym_false] = ACTIONS(1008), + [sym_null] = ACTIONS(1008), + [sym_comment] = ACTIONS(3), + }, + [251] = { + [sym_attribute_declaration] = STATE(242), + [sym_compound_statement] = STATE(250), + [sym_attributed_statement] = STATE(250), + [sym_labeled_statement] = STATE(250), + [sym_expression_statement] = STATE(250), + [sym_if_statement] = STATE(250), + [sym_switch_statement] = STATE(250), + [sym_case_statement] = STATE(250), + [sym_while_statement] = STATE(250), + [sym_do_statement] = STATE(250), + [sym_for_statement] = STATE(250), + [sym_return_statement] = STATE(250), + [sym_break_statement] = STATE(250), + [sym_continue_statement] = STATE(250), + [sym_goto_statement] = STATE(250), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [sym_identifier] = ACTIONS(1124), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [252] = { + [sym_identifier] = ACTIONS(1004), + [aux_sym_preproc_include_token1] = ACTIONS(1004), + [aux_sym_preproc_def_token1] = ACTIONS(1004), + [aux_sym_preproc_if_token1] = ACTIONS(1004), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1004), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1004), + [sym_preproc_directive] = ACTIONS(1004), + [anon_sym_LPAREN2] = ACTIONS(1006), + [anon_sym_BANG] = ACTIONS(1006), + [anon_sym_TILDE] = ACTIONS(1006), + [anon_sym_DASH] = ACTIONS(1004), + [anon_sym_PLUS] = ACTIONS(1004), + [anon_sym_STAR] = ACTIONS(1006), + [anon_sym_AMP] = ACTIONS(1006), + [anon_sym_SEMI] = ACTIONS(1006), + [anon_sym_typedef] = ACTIONS(1004), + [anon_sym_extern] = ACTIONS(1004), + [anon_sym___attribute__] = ACTIONS(1004), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1006), + [anon_sym___declspec] = ACTIONS(1004), + [anon_sym___cdecl] = ACTIONS(1004), + [anon_sym___clrcall] = ACTIONS(1004), + [anon_sym___stdcall] = ACTIONS(1004), + [anon_sym___fastcall] = ACTIONS(1004), + [anon_sym___thiscall] = ACTIONS(1004), + [anon_sym___vectorcall] = ACTIONS(1004), + [anon_sym_LBRACE] = ACTIONS(1006), + [anon_sym_RBRACE] = ACTIONS(1006), + [anon_sym_static] = ACTIONS(1004), + [anon_sym_auto] = ACTIONS(1004), + [anon_sym_register] = ACTIONS(1004), + [anon_sym_inline] = ACTIONS(1004), + [anon_sym_const] = ACTIONS(1004), + [anon_sym_volatile] = ACTIONS(1004), + [anon_sym_restrict] = ACTIONS(1004), + [anon_sym__Atomic] = ACTIONS(1004), + [anon_sym_signed] = ACTIONS(1004), + [anon_sym_unsigned] = ACTIONS(1004), + [anon_sym_long] = ACTIONS(1004), + [anon_sym_short] = ACTIONS(1004), + [sym_primitive_type] = ACTIONS(1004), + [anon_sym_enum] = ACTIONS(1004), + [anon_sym_struct] = ACTIONS(1004), + [anon_sym_union] = ACTIONS(1004), + [anon_sym_if] = ACTIONS(1004), + [anon_sym_else] = ACTIONS(1004), + [anon_sym_switch] = ACTIONS(1004), + [anon_sym_case] = ACTIONS(1004), + [anon_sym_default] = ACTIONS(1004), + [anon_sym_while] = ACTIONS(1004), + [anon_sym_do] = ACTIONS(1004), + [anon_sym_for] = ACTIONS(1004), + [anon_sym_return] = ACTIONS(1004), + [anon_sym_break] = ACTIONS(1004), + [anon_sym_continue] = ACTIONS(1004), + [anon_sym_goto] = ACTIONS(1004), + [anon_sym_DASH_DASH] = ACTIONS(1006), + [anon_sym_PLUS_PLUS] = ACTIONS(1006), + [anon_sym_sizeof] = ACTIONS(1004), + [sym_number_literal] = ACTIONS(1006), + [anon_sym_L_SQUOTE] = ACTIONS(1006), + [anon_sym_u_SQUOTE] = ACTIONS(1006), + [anon_sym_U_SQUOTE] = ACTIONS(1006), + [anon_sym_u8_SQUOTE] = ACTIONS(1006), + [anon_sym_SQUOTE] = ACTIONS(1006), + [anon_sym_L_DQUOTE] = ACTIONS(1006), + [anon_sym_u_DQUOTE] = ACTIONS(1006), + [anon_sym_U_DQUOTE] = ACTIONS(1006), + [anon_sym_u8_DQUOTE] = ACTIONS(1006), + [anon_sym_DQUOTE] = ACTIONS(1006), + [sym_true] = ACTIONS(1004), + [sym_false] = ACTIONS(1004), + [sym_null] = ACTIONS(1004), + [sym_comment] = ACTIONS(3), + }, + [253] = { + [sym_identifier] = ACTIONS(996), + [aux_sym_preproc_include_token1] = ACTIONS(996), + [aux_sym_preproc_def_token1] = ACTIONS(996), + [aux_sym_preproc_if_token1] = ACTIONS(996), + [aux_sym_preproc_ifdef_token1] = ACTIONS(996), + [aux_sym_preproc_ifdef_token2] = ACTIONS(996), + [sym_preproc_directive] = ACTIONS(996), + [anon_sym_LPAREN2] = ACTIONS(998), + [anon_sym_BANG] = ACTIONS(998), + [anon_sym_TILDE] = ACTIONS(998), + [anon_sym_DASH] = ACTIONS(996), + [anon_sym_PLUS] = ACTIONS(996), + [anon_sym_STAR] = ACTIONS(998), + [anon_sym_AMP] = ACTIONS(998), + [anon_sym_SEMI] = ACTIONS(998), + [anon_sym_typedef] = ACTIONS(996), + [anon_sym_extern] = ACTIONS(996), + [anon_sym___attribute__] = ACTIONS(996), + [anon_sym_LBRACK_LBRACK] = ACTIONS(998), + [anon_sym___declspec] = ACTIONS(996), + [anon_sym___cdecl] = ACTIONS(996), + [anon_sym___clrcall] = ACTIONS(996), + [anon_sym___stdcall] = ACTIONS(996), + [anon_sym___fastcall] = ACTIONS(996), + [anon_sym___thiscall] = ACTIONS(996), + [anon_sym___vectorcall] = ACTIONS(996), + [anon_sym_LBRACE] = ACTIONS(998), + [anon_sym_RBRACE] = ACTIONS(998), + [anon_sym_static] = ACTIONS(996), + [anon_sym_auto] = ACTIONS(996), + [anon_sym_register] = ACTIONS(996), + [anon_sym_inline] = ACTIONS(996), + [anon_sym_const] = ACTIONS(996), + [anon_sym_volatile] = ACTIONS(996), + [anon_sym_restrict] = ACTIONS(996), + [anon_sym__Atomic] = ACTIONS(996), + [anon_sym_signed] = ACTIONS(996), + [anon_sym_unsigned] = ACTIONS(996), + [anon_sym_long] = ACTIONS(996), + [anon_sym_short] = ACTIONS(996), + [sym_primitive_type] = ACTIONS(996), + [anon_sym_enum] = ACTIONS(996), + [anon_sym_struct] = ACTIONS(996), + [anon_sym_union] = ACTIONS(996), + [anon_sym_if] = ACTIONS(996), + [anon_sym_else] = ACTIONS(996), + [anon_sym_switch] = ACTIONS(996), + [anon_sym_case] = ACTIONS(996), + [anon_sym_default] = ACTIONS(996), + [anon_sym_while] = ACTIONS(996), + [anon_sym_do] = ACTIONS(996), + [anon_sym_for] = ACTIONS(996), + [anon_sym_return] = ACTIONS(996), + [anon_sym_break] = ACTIONS(996), + [anon_sym_continue] = ACTIONS(996), + [anon_sym_goto] = ACTIONS(996), + [anon_sym_DASH_DASH] = ACTIONS(998), + [anon_sym_PLUS_PLUS] = ACTIONS(998), + [anon_sym_sizeof] = ACTIONS(996), + [sym_number_literal] = ACTIONS(998), + [anon_sym_L_SQUOTE] = ACTIONS(998), + [anon_sym_u_SQUOTE] = ACTIONS(998), + [anon_sym_U_SQUOTE] = ACTIONS(998), + [anon_sym_u8_SQUOTE] = ACTIONS(998), + [anon_sym_SQUOTE] = ACTIONS(998), + [anon_sym_L_DQUOTE] = ACTIONS(998), + [anon_sym_u_DQUOTE] = ACTIONS(998), + [anon_sym_U_DQUOTE] = ACTIONS(998), + [anon_sym_u8_DQUOTE] = ACTIONS(998), + [anon_sym_DQUOTE] = ACTIONS(998), + [sym_true] = ACTIONS(996), + [sym_false] = ACTIONS(996), + [sym_null] = ACTIONS(996), + [sym_comment] = ACTIONS(3), + }, + [254] = { + [sym_identifier] = ACTIONS(992), + [aux_sym_preproc_include_token1] = ACTIONS(992), + [aux_sym_preproc_def_token1] = ACTIONS(992), + [aux_sym_preproc_if_token1] = ACTIONS(992), + [aux_sym_preproc_ifdef_token1] = ACTIONS(992), + [aux_sym_preproc_ifdef_token2] = ACTIONS(992), + [sym_preproc_directive] = ACTIONS(992), + [anon_sym_LPAREN2] = ACTIONS(994), + [anon_sym_BANG] = ACTIONS(994), + [anon_sym_TILDE] = ACTIONS(994), + [anon_sym_DASH] = ACTIONS(992), + [anon_sym_PLUS] = ACTIONS(992), + [anon_sym_STAR] = ACTIONS(994), + [anon_sym_AMP] = ACTIONS(994), + [anon_sym_SEMI] = ACTIONS(994), + [anon_sym_typedef] = ACTIONS(992), + [anon_sym_extern] = ACTIONS(992), + [anon_sym___attribute__] = ACTIONS(992), + [anon_sym_LBRACK_LBRACK] = ACTIONS(994), + [anon_sym___declspec] = ACTIONS(992), + [anon_sym___cdecl] = ACTIONS(992), + [anon_sym___clrcall] = ACTIONS(992), + [anon_sym___stdcall] = ACTIONS(992), + [anon_sym___fastcall] = ACTIONS(992), + [anon_sym___thiscall] = ACTIONS(992), + [anon_sym___vectorcall] = ACTIONS(992), + [anon_sym_LBRACE] = ACTIONS(994), + [anon_sym_RBRACE] = ACTIONS(994), + [anon_sym_static] = ACTIONS(992), + [anon_sym_auto] = ACTIONS(992), + [anon_sym_register] = ACTIONS(992), + [anon_sym_inline] = ACTIONS(992), + [anon_sym_const] = ACTIONS(992), + [anon_sym_volatile] = ACTIONS(992), + [anon_sym_restrict] = ACTIONS(992), + [anon_sym__Atomic] = ACTIONS(992), + [anon_sym_signed] = ACTIONS(992), + [anon_sym_unsigned] = ACTIONS(992), + [anon_sym_long] = ACTIONS(992), + [anon_sym_short] = ACTIONS(992), + [sym_primitive_type] = ACTIONS(992), + [anon_sym_enum] = ACTIONS(992), + [anon_sym_struct] = ACTIONS(992), + [anon_sym_union] = ACTIONS(992), + [anon_sym_if] = ACTIONS(992), + [anon_sym_else] = ACTIONS(992), + [anon_sym_switch] = ACTIONS(992), + [anon_sym_case] = ACTIONS(992), + [anon_sym_default] = ACTIONS(992), + [anon_sym_while] = ACTIONS(992), + [anon_sym_do] = ACTIONS(992), + [anon_sym_for] = ACTIONS(992), + [anon_sym_return] = ACTIONS(992), + [anon_sym_break] = ACTIONS(992), + [anon_sym_continue] = ACTIONS(992), + [anon_sym_goto] = ACTIONS(992), + [anon_sym_DASH_DASH] = ACTIONS(994), + [anon_sym_PLUS_PLUS] = ACTIONS(994), + [anon_sym_sizeof] = ACTIONS(992), + [sym_number_literal] = ACTIONS(994), + [anon_sym_L_SQUOTE] = ACTIONS(994), + [anon_sym_u_SQUOTE] = ACTIONS(994), + [anon_sym_U_SQUOTE] = ACTIONS(994), + [anon_sym_u8_SQUOTE] = ACTIONS(994), + [anon_sym_SQUOTE] = ACTIONS(994), + [anon_sym_L_DQUOTE] = ACTIONS(994), + [anon_sym_u_DQUOTE] = ACTIONS(994), + [anon_sym_U_DQUOTE] = ACTIONS(994), + [anon_sym_u8_DQUOTE] = ACTIONS(994), + [anon_sym_DQUOTE] = ACTIONS(994), + [sym_true] = ACTIONS(992), + [sym_false] = ACTIONS(992), + [sym_null] = ACTIONS(992), + [sym_comment] = ACTIONS(3), + }, + [255] = { + [sym_identifier] = ACTIONS(988), + [aux_sym_preproc_include_token1] = ACTIONS(988), + [aux_sym_preproc_def_token1] = ACTIONS(988), + [aux_sym_preproc_if_token1] = ACTIONS(988), + [aux_sym_preproc_ifdef_token1] = ACTIONS(988), + [aux_sym_preproc_ifdef_token2] = ACTIONS(988), + [sym_preproc_directive] = ACTIONS(988), + [anon_sym_LPAREN2] = ACTIONS(990), + [anon_sym_BANG] = ACTIONS(990), + [anon_sym_TILDE] = ACTIONS(990), + [anon_sym_DASH] = ACTIONS(988), + [anon_sym_PLUS] = ACTIONS(988), + [anon_sym_STAR] = ACTIONS(990), + [anon_sym_AMP] = ACTIONS(990), + [anon_sym_SEMI] = ACTIONS(990), + [anon_sym_typedef] = ACTIONS(988), + [anon_sym_extern] = ACTIONS(988), + [anon_sym___attribute__] = ACTIONS(988), + [anon_sym_LBRACK_LBRACK] = ACTIONS(990), + [anon_sym___declspec] = ACTIONS(988), + [anon_sym___cdecl] = ACTIONS(988), + [anon_sym___clrcall] = ACTIONS(988), + [anon_sym___stdcall] = ACTIONS(988), + [anon_sym___fastcall] = ACTIONS(988), + [anon_sym___thiscall] = ACTIONS(988), + [anon_sym___vectorcall] = ACTIONS(988), + [anon_sym_LBRACE] = ACTIONS(990), + [anon_sym_RBRACE] = ACTIONS(990), + [anon_sym_static] = ACTIONS(988), + [anon_sym_auto] = ACTIONS(988), + [anon_sym_register] = ACTIONS(988), + [anon_sym_inline] = ACTIONS(988), + [anon_sym_const] = ACTIONS(988), + [anon_sym_volatile] = ACTIONS(988), + [anon_sym_restrict] = ACTIONS(988), + [anon_sym__Atomic] = ACTIONS(988), + [anon_sym_signed] = ACTIONS(988), + [anon_sym_unsigned] = ACTIONS(988), + [anon_sym_long] = ACTIONS(988), + [anon_sym_short] = ACTIONS(988), + [sym_primitive_type] = ACTIONS(988), + [anon_sym_enum] = ACTIONS(988), + [anon_sym_struct] = ACTIONS(988), + [anon_sym_union] = ACTIONS(988), + [anon_sym_if] = ACTIONS(988), + [anon_sym_else] = ACTIONS(988), + [anon_sym_switch] = ACTIONS(988), + [anon_sym_case] = ACTIONS(988), + [anon_sym_default] = ACTIONS(988), + [anon_sym_while] = ACTIONS(988), + [anon_sym_do] = ACTIONS(988), + [anon_sym_for] = ACTIONS(988), + [anon_sym_return] = ACTIONS(988), + [anon_sym_break] = ACTIONS(988), + [anon_sym_continue] = ACTIONS(988), + [anon_sym_goto] = ACTIONS(988), + [anon_sym_DASH_DASH] = ACTIONS(990), + [anon_sym_PLUS_PLUS] = ACTIONS(990), + [anon_sym_sizeof] = ACTIONS(988), + [sym_number_literal] = ACTIONS(990), + [anon_sym_L_SQUOTE] = ACTIONS(990), + [anon_sym_u_SQUOTE] = ACTIONS(990), + [anon_sym_U_SQUOTE] = ACTIONS(990), + [anon_sym_u8_SQUOTE] = ACTIONS(990), + [anon_sym_SQUOTE] = ACTIONS(990), + [anon_sym_L_DQUOTE] = ACTIONS(990), + [anon_sym_u_DQUOTE] = ACTIONS(990), + [anon_sym_U_DQUOTE] = ACTIONS(990), + [anon_sym_u8_DQUOTE] = ACTIONS(990), + [anon_sym_DQUOTE] = ACTIONS(990), + [sym_true] = ACTIONS(988), + [sym_false] = ACTIONS(988), + [sym_null] = ACTIONS(988), + [sym_comment] = ACTIONS(3), + }, + [256] = { + [sym_attribute_declaration] = STATE(242), + [sym_compound_statement] = STATE(252), + [sym_attributed_statement] = STATE(252), + [sym_labeled_statement] = STATE(252), + [sym_expression_statement] = STATE(252), + [sym_if_statement] = STATE(252), + [sym_switch_statement] = STATE(252), + [sym_case_statement] = STATE(252), + [sym_while_statement] = STATE(252), + [sym_do_statement] = STATE(252), + [sym_for_statement] = STATE(252), + [sym_return_statement] = STATE(252), + [sym_break_statement] = STATE(252), + [sym_continue_statement] = STATE(252), + [sym_goto_statement] = STATE(252), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [sym_identifier] = ACTIONS(1124), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [257] = { + [ts_builtin_sym_end] = ACTIONS(900), + [sym_identifier] = ACTIONS(898), + [aux_sym_preproc_include_token1] = ACTIONS(898), + [aux_sym_preproc_def_token1] = ACTIONS(898), + [aux_sym_preproc_if_token1] = ACTIONS(898), + [aux_sym_preproc_ifdef_token1] = ACTIONS(898), + [aux_sym_preproc_ifdef_token2] = ACTIONS(898), + [sym_preproc_directive] = ACTIONS(898), + [anon_sym_LPAREN2] = ACTIONS(900), + [anon_sym_BANG] = ACTIONS(900), + [anon_sym_TILDE] = ACTIONS(900), + [anon_sym_DASH] = ACTIONS(898), + [anon_sym_PLUS] = ACTIONS(898), + [anon_sym_STAR] = ACTIONS(900), + [anon_sym_AMP] = ACTIONS(900), + [anon_sym_SEMI] = ACTIONS(900), + [anon_sym_typedef] = ACTIONS(898), + [anon_sym_extern] = ACTIONS(898), + [anon_sym___attribute__] = ACTIONS(898), + [anon_sym_LBRACK_LBRACK] = ACTIONS(900), + [anon_sym___declspec] = ACTIONS(898), + [anon_sym___cdecl] = ACTIONS(898), + [anon_sym___clrcall] = ACTIONS(898), + [anon_sym___stdcall] = ACTIONS(898), + [anon_sym___fastcall] = ACTIONS(898), + [anon_sym___thiscall] = ACTIONS(898), + [anon_sym___vectorcall] = ACTIONS(898), + [anon_sym_LBRACE] = ACTIONS(900), + [anon_sym_static] = ACTIONS(898), + [anon_sym_auto] = ACTIONS(898), + [anon_sym_register] = ACTIONS(898), + [anon_sym_inline] = ACTIONS(898), + [anon_sym_const] = ACTIONS(898), + [anon_sym_volatile] = ACTIONS(898), + [anon_sym_restrict] = ACTIONS(898), + [anon_sym__Atomic] = ACTIONS(898), + [anon_sym_signed] = ACTIONS(898), + [anon_sym_unsigned] = ACTIONS(898), + [anon_sym_long] = ACTIONS(898), + [anon_sym_short] = ACTIONS(898), + [sym_primitive_type] = ACTIONS(898), + [anon_sym_enum] = ACTIONS(898), + [anon_sym_struct] = ACTIONS(898), + [anon_sym_union] = ACTIONS(898), + [anon_sym_if] = ACTIONS(898), + [anon_sym_else] = ACTIONS(898), + [anon_sym_switch] = ACTIONS(898), + [anon_sym_case] = ACTIONS(898), + [anon_sym_default] = ACTIONS(898), + [anon_sym_while] = ACTIONS(898), + [anon_sym_do] = ACTIONS(898), + [anon_sym_for] = ACTIONS(898), + [anon_sym_return] = ACTIONS(898), + [anon_sym_break] = ACTIONS(898), + [anon_sym_continue] = ACTIONS(898), + [anon_sym_goto] = ACTIONS(898), + [anon_sym_DASH_DASH] = ACTIONS(900), + [anon_sym_PLUS_PLUS] = ACTIONS(900), + [anon_sym_sizeof] = ACTIONS(898), + [sym_number_literal] = ACTIONS(900), + [anon_sym_L_SQUOTE] = ACTIONS(900), + [anon_sym_u_SQUOTE] = ACTIONS(900), + [anon_sym_U_SQUOTE] = ACTIONS(900), + [anon_sym_u8_SQUOTE] = ACTIONS(900), + [anon_sym_SQUOTE] = ACTIONS(900), + [anon_sym_L_DQUOTE] = ACTIONS(900), + [anon_sym_u_DQUOTE] = ACTIONS(900), + [anon_sym_U_DQUOTE] = ACTIONS(900), + [anon_sym_u8_DQUOTE] = ACTIONS(900), + [anon_sym_DQUOTE] = ACTIONS(900), + [sym_true] = ACTIONS(898), + [sym_false] = ACTIONS(898), + [sym_null] = ACTIONS(898), + [sym_comment] = ACTIONS(3), + }, + [258] = { + [sym_attribute_declaration] = STATE(242), + [sym_compound_statement] = STATE(297), + [sym_attributed_statement] = STATE(297), + [sym_labeled_statement] = STATE(297), + [sym_expression_statement] = STATE(297), + [sym_if_statement] = STATE(297), + [sym_switch_statement] = STATE(297), + [sym_case_statement] = STATE(297), + [sym_while_statement] = STATE(297), + [sym_do_statement] = STATE(297), + [sym_for_statement] = STATE(297), + [sym_return_statement] = STATE(297), + [sym_break_statement] = STATE(297), + [sym_continue_statement] = STATE(297), + [sym_goto_statement] = STATE(297), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [sym_identifier] = ACTIONS(1124), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [259] = { + [sym_attribute_declaration] = STATE(242), + [sym_compound_statement] = STATE(253), + [sym_attributed_statement] = STATE(253), + [sym_labeled_statement] = STATE(253), + [sym_expression_statement] = STATE(253), + [sym_if_statement] = STATE(253), + [sym_switch_statement] = STATE(253), + [sym_case_statement] = STATE(253), + [sym_while_statement] = STATE(253), + [sym_do_statement] = STATE(253), + [sym_for_statement] = STATE(253), + [sym_return_statement] = STATE(253), + [sym_break_statement] = STATE(253), + [sym_continue_statement] = STATE(253), + [sym_goto_statement] = STATE(253), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [sym_identifier] = ACTIONS(1124), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [260] = { + [sym_attribute_declaration] = STATE(242), + [sym_compound_statement] = STATE(304), + [sym_attributed_statement] = STATE(304), + [sym_labeled_statement] = STATE(304), + [sym_expression_statement] = STATE(304), + [sym_if_statement] = STATE(304), + [sym_switch_statement] = STATE(304), + [sym_case_statement] = STATE(304), + [sym_while_statement] = STATE(304), + [sym_do_statement] = STATE(304), + [sym_for_statement] = STATE(304), + [sym_return_statement] = STATE(304), + [sym_break_statement] = STATE(304), + [sym_continue_statement] = STATE(304), + [sym_goto_statement] = STATE(304), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [sym_identifier] = ACTIONS(1124), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [261] = { + [sym_identifier] = ACTIONS(980), + [aux_sym_preproc_include_token1] = ACTIONS(980), + [aux_sym_preproc_def_token1] = ACTIONS(980), + [aux_sym_preproc_if_token1] = ACTIONS(980), + [aux_sym_preproc_ifdef_token1] = ACTIONS(980), + [aux_sym_preproc_ifdef_token2] = ACTIONS(980), + [sym_preproc_directive] = ACTIONS(980), + [anon_sym_LPAREN2] = ACTIONS(982), + [anon_sym_BANG] = ACTIONS(982), + [anon_sym_TILDE] = ACTIONS(982), + [anon_sym_DASH] = ACTIONS(980), + [anon_sym_PLUS] = ACTIONS(980), + [anon_sym_STAR] = ACTIONS(982), + [anon_sym_AMP] = ACTIONS(982), + [anon_sym_SEMI] = ACTIONS(982), + [anon_sym_typedef] = ACTIONS(980), + [anon_sym_extern] = ACTIONS(980), + [anon_sym___attribute__] = ACTIONS(980), + [anon_sym_LBRACK_LBRACK] = ACTIONS(982), + [anon_sym___declspec] = ACTIONS(980), + [anon_sym___cdecl] = ACTIONS(980), + [anon_sym___clrcall] = ACTIONS(980), + [anon_sym___stdcall] = ACTIONS(980), + [anon_sym___fastcall] = ACTIONS(980), + [anon_sym___thiscall] = ACTIONS(980), + [anon_sym___vectorcall] = ACTIONS(980), + [anon_sym_LBRACE] = ACTIONS(982), + [anon_sym_RBRACE] = ACTIONS(982), + [anon_sym_static] = ACTIONS(980), + [anon_sym_auto] = ACTIONS(980), + [anon_sym_register] = ACTIONS(980), + [anon_sym_inline] = ACTIONS(980), + [anon_sym_const] = ACTIONS(980), + [anon_sym_volatile] = ACTIONS(980), + [anon_sym_restrict] = ACTIONS(980), + [anon_sym__Atomic] = ACTIONS(980), + [anon_sym_signed] = ACTIONS(980), + [anon_sym_unsigned] = ACTIONS(980), + [anon_sym_long] = ACTIONS(980), + [anon_sym_short] = ACTIONS(980), + [sym_primitive_type] = ACTIONS(980), + [anon_sym_enum] = ACTIONS(980), + [anon_sym_struct] = ACTIONS(980), + [anon_sym_union] = ACTIONS(980), + [anon_sym_if] = ACTIONS(980), + [anon_sym_else] = ACTIONS(980), + [anon_sym_switch] = ACTIONS(980), + [anon_sym_case] = ACTIONS(980), + [anon_sym_default] = ACTIONS(980), + [anon_sym_while] = ACTIONS(980), + [anon_sym_do] = ACTIONS(980), + [anon_sym_for] = ACTIONS(980), + [anon_sym_return] = ACTIONS(980), + [anon_sym_break] = ACTIONS(980), + [anon_sym_continue] = ACTIONS(980), + [anon_sym_goto] = ACTIONS(980), + [anon_sym_DASH_DASH] = ACTIONS(982), + [anon_sym_PLUS_PLUS] = ACTIONS(982), + [anon_sym_sizeof] = ACTIONS(980), + [sym_number_literal] = ACTIONS(982), + [anon_sym_L_SQUOTE] = ACTIONS(982), + [anon_sym_u_SQUOTE] = ACTIONS(982), + [anon_sym_U_SQUOTE] = ACTIONS(982), + [anon_sym_u8_SQUOTE] = ACTIONS(982), + [anon_sym_SQUOTE] = ACTIONS(982), + [anon_sym_L_DQUOTE] = ACTIONS(982), + [anon_sym_u_DQUOTE] = ACTIONS(982), + [anon_sym_U_DQUOTE] = ACTIONS(982), + [anon_sym_u8_DQUOTE] = ACTIONS(982), + [anon_sym_DQUOTE] = ACTIONS(982), + [sym_true] = ACTIONS(980), + [sym_false] = ACTIONS(980), + [sym_null] = ACTIONS(980), + [sym_comment] = ACTIONS(3), + }, + [262] = { + [sym_attribute_declaration] = STATE(242), + [sym_compound_statement] = STATE(254), + [sym_attributed_statement] = STATE(254), + [sym_labeled_statement] = STATE(254), + [sym_expression_statement] = STATE(254), + [sym_if_statement] = STATE(254), + [sym_switch_statement] = STATE(254), + [sym_case_statement] = STATE(254), + [sym_while_statement] = STATE(254), + [sym_do_statement] = STATE(254), + [sym_for_statement] = STATE(254), + [sym_return_statement] = STATE(254), + [sym_break_statement] = STATE(254), + [sym_continue_statement] = STATE(254), + [sym_goto_statement] = STATE(254), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [sym_identifier] = ACTIONS(1124), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [263] = { + [sym_identifier] = ACTIONS(976), + [aux_sym_preproc_include_token1] = ACTIONS(976), + [aux_sym_preproc_def_token1] = ACTIONS(976), + [aux_sym_preproc_if_token1] = ACTIONS(976), + [aux_sym_preproc_ifdef_token1] = ACTIONS(976), + [aux_sym_preproc_ifdef_token2] = ACTIONS(976), + [sym_preproc_directive] = ACTIONS(976), + [anon_sym_LPAREN2] = ACTIONS(978), + [anon_sym_BANG] = ACTIONS(978), + [anon_sym_TILDE] = ACTIONS(978), + [anon_sym_DASH] = ACTIONS(976), + [anon_sym_PLUS] = ACTIONS(976), + [anon_sym_STAR] = ACTIONS(978), + [anon_sym_AMP] = ACTIONS(978), + [anon_sym_SEMI] = ACTIONS(978), + [anon_sym_typedef] = ACTIONS(976), + [anon_sym_extern] = ACTIONS(976), + [anon_sym___attribute__] = ACTIONS(976), + [anon_sym_LBRACK_LBRACK] = ACTIONS(978), + [anon_sym___declspec] = ACTIONS(976), + [anon_sym___cdecl] = ACTIONS(976), + [anon_sym___clrcall] = ACTIONS(976), + [anon_sym___stdcall] = ACTIONS(976), + [anon_sym___fastcall] = ACTIONS(976), + [anon_sym___thiscall] = ACTIONS(976), + [anon_sym___vectorcall] = ACTIONS(976), + [anon_sym_LBRACE] = ACTIONS(978), + [anon_sym_RBRACE] = ACTIONS(978), + [anon_sym_static] = ACTIONS(976), + [anon_sym_auto] = ACTIONS(976), + [anon_sym_register] = ACTIONS(976), + [anon_sym_inline] = ACTIONS(976), + [anon_sym_const] = ACTIONS(976), + [anon_sym_volatile] = ACTIONS(976), + [anon_sym_restrict] = ACTIONS(976), + [anon_sym__Atomic] = ACTIONS(976), + [anon_sym_signed] = ACTIONS(976), + [anon_sym_unsigned] = ACTIONS(976), + [anon_sym_long] = ACTIONS(976), + [anon_sym_short] = ACTIONS(976), + [sym_primitive_type] = ACTIONS(976), + [anon_sym_enum] = ACTIONS(976), + [anon_sym_struct] = ACTIONS(976), + [anon_sym_union] = ACTIONS(976), + [anon_sym_if] = ACTIONS(976), + [anon_sym_else] = ACTIONS(976), + [anon_sym_switch] = ACTIONS(976), + [anon_sym_case] = ACTIONS(976), + [anon_sym_default] = ACTIONS(976), + [anon_sym_while] = ACTIONS(976), + [anon_sym_do] = ACTIONS(976), + [anon_sym_for] = ACTIONS(976), + [anon_sym_return] = ACTIONS(976), + [anon_sym_break] = ACTIONS(976), + [anon_sym_continue] = ACTIONS(976), + [anon_sym_goto] = ACTIONS(976), + [anon_sym_DASH_DASH] = ACTIONS(978), + [anon_sym_PLUS_PLUS] = ACTIONS(978), + [anon_sym_sizeof] = ACTIONS(976), + [sym_number_literal] = ACTIONS(978), + [anon_sym_L_SQUOTE] = ACTIONS(978), + [anon_sym_u_SQUOTE] = ACTIONS(978), + [anon_sym_U_SQUOTE] = ACTIONS(978), + [anon_sym_u8_SQUOTE] = ACTIONS(978), + [anon_sym_SQUOTE] = ACTIONS(978), + [anon_sym_L_DQUOTE] = ACTIONS(978), + [anon_sym_u_DQUOTE] = ACTIONS(978), + [anon_sym_U_DQUOTE] = ACTIONS(978), + [anon_sym_u8_DQUOTE] = ACTIONS(978), + [anon_sym_DQUOTE] = ACTIONS(978), + [sym_true] = ACTIONS(976), + [sym_false] = ACTIONS(976), + [sym_null] = ACTIONS(976), + [sym_comment] = ACTIONS(3), + }, + [264] = { + [ts_builtin_sym_end] = ACTIONS(900), + [sym_identifier] = ACTIONS(898), + [aux_sym_preproc_include_token1] = ACTIONS(898), + [aux_sym_preproc_def_token1] = ACTIONS(898), + [aux_sym_preproc_if_token1] = ACTIONS(898), + [aux_sym_preproc_ifdef_token1] = ACTIONS(898), + [aux_sym_preproc_ifdef_token2] = ACTIONS(898), + [sym_preproc_directive] = ACTIONS(898), + [anon_sym_LPAREN2] = ACTIONS(900), + [anon_sym_BANG] = ACTIONS(900), + [anon_sym_TILDE] = ACTIONS(900), + [anon_sym_DASH] = ACTIONS(898), + [anon_sym_PLUS] = ACTIONS(898), + [anon_sym_STAR] = ACTIONS(900), + [anon_sym_AMP] = ACTIONS(900), + [anon_sym_SEMI] = ACTIONS(900), + [anon_sym_typedef] = ACTIONS(898), + [anon_sym_extern] = ACTIONS(898), + [anon_sym___attribute__] = ACTIONS(898), + [anon_sym_LBRACK_LBRACK] = ACTIONS(900), + [anon_sym___declspec] = ACTIONS(898), + [anon_sym___cdecl] = ACTIONS(898), + [anon_sym___clrcall] = ACTIONS(898), + [anon_sym___stdcall] = ACTIONS(898), + [anon_sym___fastcall] = ACTIONS(898), + [anon_sym___thiscall] = ACTIONS(898), + [anon_sym___vectorcall] = ACTIONS(898), + [anon_sym_LBRACE] = ACTIONS(900), + [anon_sym_static] = ACTIONS(898), + [anon_sym_auto] = ACTIONS(898), + [anon_sym_register] = ACTIONS(898), + [anon_sym_inline] = ACTIONS(898), + [anon_sym_const] = ACTIONS(898), + [anon_sym_volatile] = ACTIONS(898), + [anon_sym_restrict] = ACTIONS(898), + [anon_sym__Atomic] = ACTIONS(898), + [anon_sym_signed] = ACTIONS(898), + [anon_sym_unsigned] = ACTIONS(898), + [anon_sym_long] = ACTIONS(898), + [anon_sym_short] = ACTIONS(898), + [sym_primitive_type] = ACTIONS(898), + [anon_sym_enum] = ACTIONS(898), + [anon_sym_struct] = ACTIONS(898), + [anon_sym_union] = ACTIONS(898), + [anon_sym_if] = ACTIONS(898), + [anon_sym_else] = ACTIONS(898), + [anon_sym_switch] = ACTIONS(898), + [anon_sym_case] = ACTIONS(898), + [anon_sym_default] = ACTIONS(898), + [anon_sym_while] = ACTIONS(898), + [anon_sym_do] = ACTIONS(898), + [anon_sym_for] = ACTIONS(898), + [anon_sym_return] = ACTIONS(898), + [anon_sym_break] = ACTIONS(898), + [anon_sym_continue] = ACTIONS(898), + [anon_sym_goto] = ACTIONS(898), + [anon_sym_DASH_DASH] = ACTIONS(900), + [anon_sym_PLUS_PLUS] = ACTIONS(900), + [anon_sym_sizeof] = ACTIONS(898), + [sym_number_literal] = ACTIONS(900), + [anon_sym_L_SQUOTE] = ACTIONS(900), + [anon_sym_u_SQUOTE] = ACTIONS(900), + [anon_sym_U_SQUOTE] = ACTIONS(900), + [anon_sym_u8_SQUOTE] = ACTIONS(900), + [anon_sym_SQUOTE] = ACTIONS(900), + [anon_sym_L_DQUOTE] = ACTIONS(900), + [anon_sym_u_DQUOTE] = ACTIONS(900), + [anon_sym_U_DQUOTE] = ACTIONS(900), + [anon_sym_u8_DQUOTE] = ACTIONS(900), + [anon_sym_DQUOTE] = ACTIONS(900), + [sym_true] = ACTIONS(898), + [sym_false] = ACTIONS(898), + [sym_null] = ACTIONS(898), + [sym_comment] = ACTIONS(3), + }, + [265] = { + [sym_identifier] = ACTIONS(972), + [aux_sym_preproc_include_token1] = ACTIONS(972), + [aux_sym_preproc_def_token1] = ACTIONS(972), + [aux_sym_preproc_if_token1] = ACTIONS(972), + [aux_sym_preproc_ifdef_token1] = ACTIONS(972), + [aux_sym_preproc_ifdef_token2] = ACTIONS(972), + [sym_preproc_directive] = ACTIONS(972), + [anon_sym_LPAREN2] = ACTIONS(974), + [anon_sym_BANG] = ACTIONS(974), + [anon_sym_TILDE] = ACTIONS(974), + [anon_sym_DASH] = ACTIONS(972), + [anon_sym_PLUS] = ACTIONS(972), + [anon_sym_STAR] = ACTIONS(974), + [anon_sym_AMP] = ACTIONS(974), + [anon_sym_SEMI] = ACTIONS(974), + [anon_sym_typedef] = ACTIONS(972), + [anon_sym_extern] = ACTIONS(972), + [anon_sym___attribute__] = ACTIONS(972), + [anon_sym_LBRACK_LBRACK] = ACTIONS(974), + [anon_sym___declspec] = ACTIONS(972), + [anon_sym___cdecl] = ACTIONS(972), + [anon_sym___clrcall] = ACTIONS(972), + [anon_sym___stdcall] = ACTIONS(972), + [anon_sym___fastcall] = ACTIONS(972), + [anon_sym___thiscall] = ACTIONS(972), + [anon_sym___vectorcall] = ACTIONS(972), + [anon_sym_LBRACE] = ACTIONS(974), + [anon_sym_RBRACE] = ACTIONS(974), + [anon_sym_static] = ACTIONS(972), + [anon_sym_auto] = ACTIONS(972), + [anon_sym_register] = ACTIONS(972), + [anon_sym_inline] = ACTIONS(972), + [anon_sym_const] = ACTIONS(972), + [anon_sym_volatile] = ACTIONS(972), + [anon_sym_restrict] = ACTIONS(972), + [anon_sym__Atomic] = ACTIONS(972), + [anon_sym_signed] = ACTIONS(972), + [anon_sym_unsigned] = ACTIONS(972), + [anon_sym_long] = ACTIONS(972), + [anon_sym_short] = ACTIONS(972), + [sym_primitive_type] = ACTIONS(972), + [anon_sym_enum] = ACTIONS(972), + [anon_sym_struct] = ACTIONS(972), + [anon_sym_union] = ACTIONS(972), + [anon_sym_if] = ACTIONS(972), + [anon_sym_else] = ACTIONS(972), + [anon_sym_switch] = ACTIONS(972), + [anon_sym_case] = ACTIONS(972), + [anon_sym_default] = ACTIONS(972), + [anon_sym_while] = ACTIONS(972), + [anon_sym_do] = ACTIONS(972), + [anon_sym_for] = ACTIONS(972), + [anon_sym_return] = ACTIONS(972), + [anon_sym_break] = ACTIONS(972), + [anon_sym_continue] = ACTIONS(972), + [anon_sym_goto] = ACTIONS(972), + [anon_sym_DASH_DASH] = ACTIONS(974), + [anon_sym_PLUS_PLUS] = ACTIONS(974), + [anon_sym_sizeof] = ACTIONS(972), + [sym_number_literal] = ACTIONS(974), + [anon_sym_L_SQUOTE] = ACTIONS(974), + [anon_sym_u_SQUOTE] = ACTIONS(974), + [anon_sym_U_SQUOTE] = ACTIONS(974), + [anon_sym_u8_SQUOTE] = ACTIONS(974), + [anon_sym_SQUOTE] = ACTIONS(974), + [anon_sym_L_DQUOTE] = ACTIONS(974), + [anon_sym_u_DQUOTE] = ACTIONS(974), + [anon_sym_U_DQUOTE] = ACTIONS(974), + [anon_sym_u8_DQUOTE] = ACTIONS(974), + [anon_sym_DQUOTE] = ACTIONS(974), + [sym_true] = ACTIONS(972), + [sym_false] = ACTIONS(972), + [sym_null] = ACTIONS(972), + [sym_comment] = ACTIONS(3), + }, + [266] = { + [sym_attribute_declaration] = STATE(242), + [sym_compound_statement] = STATE(255), + [sym_attributed_statement] = STATE(255), + [sym_labeled_statement] = STATE(255), + [sym_expression_statement] = STATE(255), + [sym_if_statement] = STATE(255), + [sym_switch_statement] = STATE(255), + [sym_case_statement] = STATE(255), + [sym_while_statement] = STATE(255), + [sym_do_statement] = STATE(255), + [sym_for_statement] = STATE(255), + [sym_return_statement] = STATE(255), + [sym_break_statement] = STATE(255), + [sym_continue_statement] = STATE(255), + [sym_goto_statement] = STATE(255), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [sym_identifier] = ACTIONS(1124), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [267] = { + [sym_identifier] = ACTIONS(968), + [aux_sym_preproc_include_token1] = ACTIONS(968), + [aux_sym_preproc_def_token1] = ACTIONS(968), + [aux_sym_preproc_if_token1] = ACTIONS(968), + [aux_sym_preproc_ifdef_token1] = ACTIONS(968), + [aux_sym_preproc_ifdef_token2] = ACTIONS(968), + [sym_preproc_directive] = ACTIONS(968), + [anon_sym_LPAREN2] = ACTIONS(970), + [anon_sym_BANG] = ACTIONS(970), + [anon_sym_TILDE] = ACTIONS(970), + [anon_sym_DASH] = ACTIONS(968), + [anon_sym_PLUS] = ACTIONS(968), + [anon_sym_STAR] = ACTIONS(970), + [anon_sym_AMP] = ACTIONS(970), + [anon_sym_SEMI] = ACTIONS(970), + [anon_sym_typedef] = ACTIONS(968), + [anon_sym_extern] = ACTIONS(968), + [anon_sym___attribute__] = ACTIONS(968), + [anon_sym_LBRACK_LBRACK] = ACTIONS(970), + [anon_sym___declspec] = ACTIONS(968), + [anon_sym___cdecl] = ACTIONS(968), + [anon_sym___clrcall] = ACTIONS(968), + [anon_sym___stdcall] = ACTIONS(968), + [anon_sym___fastcall] = ACTIONS(968), + [anon_sym___thiscall] = ACTIONS(968), + [anon_sym___vectorcall] = ACTIONS(968), + [anon_sym_LBRACE] = ACTIONS(970), + [anon_sym_RBRACE] = ACTIONS(970), + [anon_sym_static] = ACTIONS(968), + [anon_sym_auto] = ACTIONS(968), + [anon_sym_register] = ACTIONS(968), + [anon_sym_inline] = ACTIONS(968), + [anon_sym_const] = ACTIONS(968), + [anon_sym_volatile] = ACTIONS(968), + [anon_sym_restrict] = ACTIONS(968), + [anon_sym__Atomic] = ACTIONS(968), + [anon_sym_signed] = ACTIONS(968), + [anon_sym_unsigned] = ACTIONS(968), + [anon_sym_long] = ACTIONS(968), + [anon_sym_short] = ACTIONS(968), + [sym_primitive_type] = ACTIONS(968), + [anon_sym_enum] = ACTIONS(968), + [anon_sym_struct] = ACTIONS(968), + [anon_sym_union] = ACTIONS(968), + [anon_sym_if] = ACTIONS(968), + [anon_sym_else] = ACTIONS(968), + [anon_sym_switch] = ACTIONS(968), + [anon_sym_case] = ACTIONS(968), + [anon_sym_default] = ACTIONS(968), + [anon_sym_while] = ACTIONS(968), + [anon_sym_do] = ACTIONS(968), + [anon_sym_for] = ACTIONS(968), + [anon_sym_return] = ACTIONS(968), + [anon_sym_break] = ACTIONS(968), + [anon_sym_continue] = ACTIONS(968), + [anon_sym_goto] = ACTIONS(968), + [anon_sym_DASH_DASH] = ACTIONS(970), + [anon_sym_PLUS_PLUS] = ACTIONS(970), + [anon_sym_sizeof] = ACTIONS(968), + [sym_number_literal] = ACTIONS(970), + [anon_sym_L_SQUOTE] = ACTIONS(970), + [anon_sym_u_SQUOTE] = ACTIONS(970), + [anon_sym_U_SQUOTE] = ACTIONS(970), + [anon_sym_u8_SQUOTE] = ACTIONS(970), + [anon_sym_SQUOTE] = ACTIONS(970), + [anon_sym_L_DQUOTE] = ACTIONS(970), + [anon_sym_u_DQUOTE] = ACTIONS(970), + [anon_sym_U_DQUOTE] = ACTIONS(970), + [anon_sym_u8_DQUOTE] = ACTIONS(970), + [anon_sym_DQUOTE] = ACTIONS(970), + [sym_true] = ACTIONS(968), + [sym_false] = ACTIONS(968), + [sym_null] = ACTIONS(968), + [sym_comment] = ACTIONS(3), + }, + [268] = { + [sym_identifier] = ACTIONS(956), + [aux_sym_preproc_include_token1] = ACTIONS(956), + [aux_sym_preproc_def_token1] = ACTIONS(956), + [aux_sym_preproc_if_token1] = ACTIONS(956), + [aux_sym_preproc_ifdef_token1] = ACTIONS(956), + [aux_sym_preproc_ifdef_token2] = ACTIONS(956), + [sym_preproc_directive] = ACTIONS(956), + [anon_sym_LPAREN2] = ACTIONS(958), + [anon_sym_BANG] = ACTIONS(958), + [anon_sym_TILDE] = ACTIONS(958), + [anon_sym_DASH] = ACTIONS(956), + [anon_sym_PLUS] = ACTIONS(956), + [anon_sym_STAR] = ACTIONS(958), + [anon_sym_AMP] = ACTIONS(958), + [anon_sym_SEMI] = ACTIONS(958), + [anon_sym_typedef] = ACTIONS(956), + [anon_sym_extern] = ACTIONS(956), + [anon_sym___attribute__] = ACTIONS(956), + [anon_sym_LBRACK_LBRACK] = ACTIONS(958), + [anon_sym___declspec] = ACTIONS(956), + [anon_sym___cdecl] = ACTIONS(956), + [anon_sym___clrcall] = ACTIONS(956), + [anon_sym___stdcall] = ACTIONS(956), + [anon_sym___fastcall] = ACTIONS(956), + [anon_sym___thiscall] = ACTIONS(956), + [anon_sym___vectorcall] = ACTIONS(956), + [anon_sym_LBRACE] = ACTIONS(958), + [anon_sym_RBRACE] = ACTIONS(958), + [anon_sym_static] = ACTIONS(956), + [anon_sym_auto] = ACTIONS(956), + [anon_sym_register] = ACTIONS(956), + [anon_sym_inline] = ACTIONS(956), + [anon_sym_const] = ACTIONS(956), + [anon_sym_volatile] = ACTIONS(956), + [anon_sym_restrict] = ACTIONS(956), + [anon_sym__Atomic] = ACTIONS(956), + [anon_sym_signed] = ACTIONS(956), + [anon_sym_unsigned] = ACTIONS(956), + [anon_sym_long] = ACTIONS(956), + [anon_sym_short] = ACTIONS(956), + [sym_primitive_type] = ACTIONS(956), + [anon_sym_enum] = ACTIONS(956), + [anon_sym_struct] = ACTIONS(956), + [anon_sym_union] = ACTIONS(956), + [anon_sym_if] = ACTIONS(956), + [anon_sym_else] = ACTIONS(956), + [anon_sym_switch] = ACTIONS(956), + [anon_sym_case] = ACTIONS(956), + [anon_sym_default] = ACTIONS(956), + [anon_sym_while] = ACTIONS(956), + [anon_sym_do] = ACTIONS(956), + [anon_sym_for] = ACTIONS(956), + [anon_sym_return] = ACTIONS(956), + [anon_sym_break] = ACTIONS(956), + [anon_sym_continue] = ACTIONS(956), + [anon_sym_goto] = ACTIONS(956), + [anon_sym_DASH_DASH] = ACTIONS(958), + [anon_sym_PLUS_PLUS] = ACTIONS(958), + [anon_sym_sizeof] = ACTIONS(956), + [sym_number_literal] = ACTIONS(958), + [anon_sym_L_SQUOTE] = ACTIONS(958), + [anon_sym_u_SQUOTE] = ACTIONS(958), + [anon_sym_U_SQUOTE] = ACTIONS(958), + [anon_sym_u8_SQUOTE] = ACTIONS(958), + [anon_sym_SQUOTE] = ACTIONS(958), + [anon_sym_L_DQUOTE] = ACTIONS(958), + [anon_sym_u_DQUOTE] = ACTIONS(958), + [anon_sym_U_DQUOTE] = ACTIONS(958), + [anon_sym_u8_DQUOTE] = ACTIONS(958), + [anon_sym_DQUOTE] = ACTIONS(958), + [sym_true] = ACTIONS(956), + [sym_false] = ACTIONS(956), + [sym_null] = ACTIONS(956), + [sym_comment] = ACTIONS(3), + }, + [269] = { + [sym_attribute_declaration] = STATE(242), + [sym_compound_statement] = STATE(261), + [sym_attributed_statement] = STATE(261), + [sym_labeled_statement] = STATE(261), + [sym_expression_statement] = STATE(261), + [sym_if_statement] = STATE(261), + [sym_switch_statement] = STATE(261), + [sym_case_statement] = STATE(261), + [sym_while_statement] = STATE(261), + [sym_do_statement] = STATE(261), + [sym_for_statement] = STATE(261), + [sym_return_statement] = STATE(261), + [sym_break_statement] = STATE(261), + [sym_continue_statement] = STATE(261), + [sym_goto_statement] = STATE(261), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [sym_identifier] = ACTIONS(1124), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [270] = { + [sym_attribute_declaration] = STATE(242), + [sym_compound_statement] = STATE(263), + [sym_attributed_statement] = STATE(263), + [sym_labeled_statement] = STATE(263), + [sym_expression_statement] = STATE(263), + [sym_if_statement] = STATE(263), + [sym_switch_statement] = STATE(263), + [sym_case_statement] = STATE(263), + [sym_while_statement] = STATE(263), + [sym_do_statement] = STATE(263), + [sym_for_statement] = STATE(263), + [sym_return_statement] = STATE(263), + [sym_break_statement] = STATE(263), + [sym_continue_statement] = STATE(263), + [sym_goto_statement] = STATE(263), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [sym_identifier] = ACTIONS(1124), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [271] = { + [sym_attribute_declaration] = STATE(242), + [sym_compound_statement] = STATE(265), + [sym_attributed_statement] = STATE(265), + [sym_labeled_statement] = STATE(265), + [sym_expression_statement] = STATE(265), + [sym_if_statement] = STATE(265), + [sym_switch_statement] = STATE(265), + [sym_case_statement] = STATE(265), + [sym_while_statement] = STATE(265), + [sym_do_statement] = STATE(265), + [sym_for_statement] = STATE(265), + [sym_return_statement] = STATE(265), + [sym_break_statement] = STATE(265), + [sym_continue_statement] = STATE(265), + [sym_goto_statement] = STATE(265), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [sym_identifier] = ACTIONS(1124), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [272] = { + [sym_identifier] = ACTIONS(894), + [aux_sym_preproc_include_token1] = ACTIONS(894), + [aux_sym_preproc_def_token1] = ACTIONS(894), + [aux_sym_preproc_if_token1] = ACTIONS(894), + [aux_sym_preproc_ifdef_token1] = ACTIONS(894), + [aux_sym_preproc_ifdef_token2] = ACTIONS(894), + [sym_preproc_directive] = ACTIONS(894), + [anon_sym_LPAREN2] = ACTIONS(896), + [anon_sym_BANG] = ACTIONS(896), + [anon_sym_TILDE] = ACTIONS(896), + [anon_sym_DASH] = ACTIONS(894), + [anon_sym_PLUS] = ACTIONS(894), + [anon_sym_STAR] = ACTIONS(896), + [anon_sym_AMP] = ACTIONS(896), + [anon_sym_SEMI] = ACTIONS(896), + [anon_sym_typedef] = ACTIONS(894), + [anon_sym_extern] = ACTIONS(894), + [anon_sym___attribute__] = ACTIONS(894), + [anon_sym_LBRACK_LBRACK] = ACTIONS(896), + [anon_sym___declspec] = ACTIONS(894), + [anon_sym___cdecl] = ACTIONS(894), + [anon_sym___clrcall] = ACTIONS(894), + [anon_sym___stdcall] = ACTIONS(894), + [anon_sym___fastcall] = ACTIONS(894), + [anon_sym___thiscall] = ACTIONS(894), + [anon_sym___vectorcall] = ACTIONS(894), + [anon_sym_LBRACE] = ACTIONS(896), + [anon_sym_RBRACE] = ACTIONS(896), + [anon_sym_static] = ACTIONS(894), + [anon_sym_auto] = ACTIONS(894), + [anon_sym_register] = ACTIONS(894), + [anon_sym_inline] = ACTIONS(894), + [anon_sym_const] = ACTIONS(894), + [anon_sym_volatile] = ACTIONS(894), + [anon_sym_restrict] = ACTIONS(894), + [anon_sym__Atomic] = ACTIONS(894), + [anon_sym_signed] = ACTIONS(894), + [anon_sym_unsigned] = ACTIONS(894), + [anon_sym_long] = ACTIONS(894), + [anon_sym_short] = ACTIONS(894), + [sym_primitive_type] = ACTIONS(894), + [anon_sym_enum] = ACTIONS(894), + [anon_sym_struct] = ACTIONS(894), + [anon_sym_union] = ACTIONS(894), + [anon_sym_if] = ACTIONS(894), + [anon_sym_else] = ACTIONS(894), + [anon_sym_switch] = ACTIONS(894), + [anon_sym_case] = ACTIONS(894), + [anon_sym_default] = ACTIONS(894), + [anon_sym_while] = ACTIONS(894), + [anon_sym_do] = ACTIONS(894), + [anon_sym_for] = ACTIONS(894), + [anon_sym_return] = ACTIONS(894), + [anon_sym_break] = ACTIONS(894), + [anon_sym_continue] = ACTIONS(894), + [anon_sym_goto] = ACTIONS(894), + [anon_sym_DASH_DASH] = ACTIONS(896), + [anon_sym_PLUS_PLUS] = ACTIONS(896), + [anon_sym_sizeof] = ACTIONS(894), + [sym_number_literal] = ACTIONS(896), + [anon_sym_L_SQUOTE] = ACTIONS(896), + [anon_sym_u_SQUOTE] = ACTIONS(896), + [anon_sym_U_SQUOTE] = ACTIONS(896), + [anon_sym_u8_SQUOTE] = ACTIONS(896), + [anon_sym_SQUOTE] = ACTIONS(896), + [anon_sym_L_DQUOTE] = ACTIONS(896), + [anon_sym_u_DQUOTE] = ACTIONS(896), + [anon_sym_U_DQUOTE] = ACTIONS(896), + [anon_sym_u8_DQUOTE] = ACTIONS(896), + [anon_sym_DQUOTE] = ACTIONS(896), + [sym_true] = ACTIONS(894), + [sym_false] = ACTIONS(894), + [sym_null] = ACTIONS(894), + [sym_comment] = ACTIONS(3), + }, + [273] = { + [ts_builtin_sym_end] = ACTIONS(1022), + [sym_identifier] = ACTIONS(1020), + [aux_sym_preproc_include_token1] = ACTIONS(1020), + [aux_sym_preproc_def_token1] = ACTIONS(1020), + [aux_sym_preproc_if_token1] = ACTIONS(1020), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1020), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1020), + [sym_preproc_directive] = ACTIONS(1020), + [anon_sym_LPAREN2] = ACTIONS(1022), + [anon_sym_BANG] = ACTIONS(1022), + [anon_sym_TILDE] = ACTIONS(1022), + [anon_sym_DASH] = ACTIONS(1020), + [anon_sym_PLUS] = ACTIONS(1020), + [anon_sym_STAR] = ACTIONS(1022), + [anon_sym_AMP] = ACTIONS(1022), + [anon_sym_SEMI] = ACTIONS(1022), + [anon_sym_typedef] = ACTIONS(1020), + [anon_sym_extern] = ACTIONS(1020), + [anon_sym___attribute__] = ACTIONS(1020), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1022), + [anon_sym___declspec] = ACTIONS(1020), + [anon_sym___cdecl] = ACTIONS(1020), + [anon_sym___clrcall] = ACTIONS(1020), + [anon_sym___stdcall] = ACTIONS(1020), + [anon_sym___fastcall] = ACTIONS(1020), + [anon_sym___thiscall] = ACTIONS(1020), + [anon_sym___vectorcall] = ACTIONS(1020), + [anon_sym_LBRACE] = ACTIONS(1022), + [anon_sym_static] = ACTIONS(1020), + [anon_sym_auto] = ACTIONS(1020), + [anon_sym_register] = ACTIONS(1020), + [anon_sym_inline] = ACTIONS(1020), + [anon_sym_const] = ACTIONS(1020), + [anon_sym_volatile] = ACTIONS(1020), + [anon_sym_restrict] = ACTIONS(1020), + [anon_sym__Atomic] = ACTIONS(1020), + [anon_sym_signed] = ACTIONS(1020), + [anon_sym_unsigned] = ACTIONS(1020), + [anon_sym_long] = ACTIONS(1020), + [anon_sym_short] = ACTIONS(1020), + [sym_primitive_type] = ACTIONS(1020), + [anon_sym_enum] = ACTIONS(1020), + [anon_sym_struct] = ACTIONS(1020), + [anon_sym_union] = ACTIONS(1020), + [anon_sym_if] = ACTIONS(1020), + [anon_sym_else] = ACTIONS(1020), + [anon_sym_switch] = ACTIONS(1020), + [anon_sym_case] = ACTIONS(1020), + [anon_sym_default] = ACTIONS(1020), + [anon_sym_while] = ACTIONS(1020), + [anon_sym_do] = ACTIONS(1020), + [anon_sym_for] = ACTIONS(1020), + [anon_sym_return] = ACTIONS(1020), + [anon_sym_break] = ACTIONS(1020), + [anon_sym_continue] = ACTIONS(1020), + [anon_sym_goto] = ACTIONS(1020), + [anon_sym_DASH_DASH] = ACTIONS(1022), + [anon_sym_PLUS_PLUS] = ACTIONS(1022), + [anon_sym_sizeof] = ACTIONS(1020), + [sym_number_literal] = ACTIONS(1022), + [anon_sym_L_SQUOTE] = ACTIONS(1022), + [anon_sym_u_SQUOTE] = ACTIONS(1022), + [anon_sym_U_SQUOTE] = ACTIONS(1022), + [anon_sym_u8_SQUOTE] = ACTIONS(1022), + [anon_sym_SQUOTE] = ACTIONS(1022), + [anon_sym_L_DQUOTE] = ACTIONS(1022), + [anon_sym_u_DQUOTE] = ACTIONS(1022), + [anon_sym_U_DQUOTE] = ACTIONS(1022), + [anon_sym_u8_DQUOTE] = ACTIONS(1022), + [anon_sym_DQUOTE] = ACTIONS(1022), + [sym_true] = ACTIONS(1020), + [sym_false] = ACTIONS(1020), + [sym_null] = ACTIONS(1020), + [sym_comment] = ACTIONS(3), + }, + [274] = { + [sym_attribute_declaration] = STATE(242), + [sym_compound_statement] = STATE(268), + [sym_attributed_statement] = STATE(268), + [sym_labeled_statement] = STATE(268), + [sym_expression_statement] = STATE(268), + [sym_if_statement] = STATE(268), + [sym_switch_statement] = STATE(268), + [sym_case_statement] = STATE(268), + [sym_while_statement] = STATE(268), + [sym_do_statement] = STATE(268), + [sym_for_statement] = STATE(268), + [sym_return_statement] = STATE(268), + [sym_break_statement] = STATE(268), + [sym_continue_statement] = STATE(268), + [sym_goto_statement] = STATE(268), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [sym_identifier] = ACTIONS(1124), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [275] = { + [sym_identifier] = ACTIONS(952), + [aux_sym_preproc_include_token1] = ACTIONS(952), + [aux_sym_preproc_def_token1] = ACTIONS(952), + [aux_sym_preproc_if_token1] = ACTIONS(952), + [aux_sym_preproc_ifdef_token1] = ACTIONS(952), + [aux_sym_preproc_ifdef_token2] = ACTIONS(952), + [sym_preproc_directive] = ACTIONS(952), + [anon_sym_LPAREN2] = ACTIONS(954), + [anon_sym_BANG] = ACTIONS(954), + [anon_sym_TILDE] = ACTIONS(954), + [anon_sym_DASH] = ACTIONS(952), + [anon_sym_PLUS] = ACTIONS(952), + [anon_sym_STAR] = ACTIONS(954), + [anon_sym_AMP] = ACTIONS(954), + [anon_sym_SEMI] = ACTIONS(954), + [anon_sym_typedef] = ACTIONS(952), + [anon_sym_extern] = ACTIONS(952), + [anon_sym___attribute__] = ACTIONS(952), + [anon_sym_LBRACK_LBRACK] = ACTIONS(954), + [anon_sym___declspec] = ACTIONS(952), + [anon_sym___cdecl] = ACTIONS(952), + [anon_sym___clrcall] = ACTIONS(952), + [anon_sym___stdcall] = ACTIONS(952), + [anon_sym___fastcall] = ACTIONS(952), + [anon_sym___thiscall] = ACTIONS(952), + [anon_sym___vectorcall] = ACTIONS(952), + [anon_sym_LBRACE] = ACTIONS(954), + [anon_sym_RBRACE] = ACTIONS(954), + [anon_sym_static] = ACTIONS(952), + [anon_sym_auto] = ACTIONS(952), + [anon_sym_register] = ACTIONS(952), + [anon_sym_inline] = ACTIONS(952), + [anon_sym_const] = ACTIONS(952), + [anon_sym_volatile] = ACTIONS(952), + [anon_sym_restrict] = ACTIONS(952), + [anon_sym__Atomic] = ACTIONS(952), + [anon_sym_signed] = ACTIONS(952), + [anon_sym_unsigned] = ACTIONS(952), + [anon_sym_long] = ACTIONS(952), + [anon_sym_short] = ACTIONS(952), + [sym_primitive_type] = ACTIONS(952), + [anon_sym_enum] = ACTIONS(952), + [anon_sym_struct] = ACTIONS(952), + [anon_sym_union] = ACTIONS(952), + [anon_sym_if] = ACTIONS(952), + [anon_sym_else] = ACTIONS(952), + [anon_sym_switch] = ACTIONS(952), + [anon_sym_case] = ACTIONS(952), + [anon_sym_default] = ACTIONS(952), + [anon_sym_while] = ACTIONS(952), + [anon_sym_do] = ACTIONS(952), + [anon_sym_for] = ACTIONS(952), + [anon_sym_return] = ACTIONS(952), + [anon_sym_break] = ACTIONS(952), + [anon_sym_continue] = ACTIONS(952), + [anon_sym_goto] = ACTIONS(952), + [anon_sym_DASH_DASH] = ACTIONS(954), + [anon_sym_PLUS_PLUS] = ACTIONS(954), + [anon_sym_sizeof] = ACTIONS(952), + [sym_number_literal] = ACTIONS(954), + [anon_sym_L_SQUOTE] = ACTIONS(954), + [anon_sym_u_SQUOTE] = ACTIONS(954), + [anon_sym_U_SQUOTE] = ACTIONS(954), + [anon_sym_u8_SQUOTE] = ACTIONS(954), + [anon_sym_SQUOTE] = ACTIONS(954), + [anon_sym_L_DQUOTE] = ACTIONS(954), + [anon_sym_u_DQUOTE] = ACTIONS(954), + [anon_sym_U_DQUOTE] = ACTIONS(954), + [anon_sym_u8_DQUOTE] = ACTIONS(954), + [anon_sym_DQUOTE] = ACTIONS(954), + [sym_true] = ACTIONS(952), + [sym_false] = ACTIONS(952), + [sym_null] = ACTIONS(952), + [sym_comment] = ACTIONS(3), + }, + [276] = { + [sym_identifier] = ACTIONS(940), + [aux_sym_preproc_include_token1] = ACTIONS(940), + [aux_sym_preproc_def_token1] = ACTIONS(940), + [aux_sym_preproc_if_token1] = ACTIONS(940), + [aux_sym_preproc_ifdef_token1] = ACTIONS(940), + [aux_sym_preproc_ifdef_token2] = ACTIONS(940), + [sym_preproc_directive] = ACTIONS(940), + [anon_sym_LPAREN2] = ACTIONS(942), + [anon_sym_BANG] = ACTIONS(942), + [anon_sym_TILDE] = ACTIONS(942), + [anon_sym_DASH] = ACTIONS(940), + [anon_sym_PLUS] = ACTIONS(940), + [anon_sym_STAR] = ACTIONS(942), + [anon_sym_AMP] = ACTIONS(942), + [anon_sym_SEMI] = ACTIONS(942), + [anon_sym_typedef] = ACTIONS(940), + [anon_sym_extern] = ACTIONS(940), + [anon_sym___attribute__] = ACTIONS(940), + [anon_sym_LBRACK_LBRACK] = ACTIONS(942), + [anon_sym___declspec] = ACTIONS(940), + [anon_sym___cdecl] = ACTIONS(940), + [anon_sym___clrcall] = ACTIONS(940), + [anon_sym___stdcall] = ACTIONS(940), + [anon_sym___fastcall] = ACTIONS(940), + [anon_sym___thiscall] = ACTIONS(940), + [anon_sym___vectorcall] = ACTIONS(940), + [anon_sym_LBRACE] = ACTIONS(942), + [anon_sym_RBRACE] = ACTIONS(942), + [anon_sym_static] = ACTIONS(940), + [anon_sym_auto] = ACTIONS(940), + [anon_sym_register] = ACTIONS(940), + [anon_sym_inline] = ACTIONS(940), + [anon_sym_const] = ACTIONS(940), + [anon_sym_volatile] = ACTIONS(940), + [anon_sym_restrict] = ACTIONS(940), + [anon_sym__Atomic] = ACTIONS(940), + [anon_sym_signed] = ACTIONS(940), + [anon_sym_unsigned] = ACTIONS(940), + [anon_sym_long] = ACTIONS(940), + [anon_sym_short] = ACTIONS(940), + [sym_primitive_type] = ACTIONS(940), + [anon_sym_enum] = ACTIONS(940), + [anon_sym_struct] = ACTIONS(940), + [anon_sym_union] = ACTIONS(940), + [anon_sym_if] = ACTIONS(940), + [anon_sym_else] = ACTIONS(940), + [anon_sym_switch] = ACTIONS(940), + [anon_sym_case] = ACTIONS(940), + [anon_sym_default] = ACTIONS(940), + [anon_sym_while] = ACTIONS(940), + [anon_sym_do] = ACTIONS(940), + [anon_sym_for] = ACTIONS(940), + [anon_sym_return] = ACTIONS(940), + [anon_sym_break] = ACTIONS(940), + [anon_sym_continue] = ACTIONS(940), + [anon_sym_goto] = ACTIONS(940), + [anon_sym_DASH_DASH] = ACTIONS(942), + [anon_sym_PLUS_PLUS] = ACTIONS(942), + [anon_sym_sizeof] = ACTIONS(940), + [sym_number_literal] = ACTIONS(942), + [anon_sym_L_SQUOTE] = ACTIONS(942), + [anon_sym_u_SQUOTE] = ACTIONS(942), + [anon_sym_U_SQUOTE] = ACTIONS(942), + [anon_sym_u8_SQUOTE] = ACTIONS(942), + [anon_sym_SQUOTE] = ACTIONS(942), + [anon_sym_L_DQUOTE] = ACTIONS(942), + [anon_sym_u_DQUOTE] = ACTIONS(942), + [anon_sym_U_DQUOTE] = ACTIONS(942), + [anon_sym_u8_DQUOTE] = ACTIONS(942), + [anon_sym_DQUOTE] = ACTIONS(942), + [sym_true] = ACTIONS(940), + [sym_false] = ACTIONS(940), + [sym_null] = ACTIONS(940), + [sym_comment] = ACTIONS(3), + }, + [277] = { + [sym_identifier] = ACTIONS(1020), + [aux_sym_preproc_include_token1] = ACTIONS(1020), + [aux_sym_preproc_def_token1] = ACTIONS(1020), + [aux_sym_preproc_if_token1] = ACTIONS(1020), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1020), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1020), + [sym_preproc_directive] = ACTIONS(1020), + [anon_sym_LPAREN2] = ACTIONS(1022), + [anon_sym_BANG] = ACTIONS(1022), + [anon_sym_TILDE] = ACTIONS(1022), + [anon_sym_DASH] = ACTIONS(1020), + [anon_sym_PLUS] = ACTIONS(1020), + [anon_sym_STAR] = ACTIONS(1022), + [anon_sym_AMP] = ACTIONS(1022), + [anon_sym_SEMI] = ACTIONS(1022), + [anon_sym_typedef] = ACTIONS(1020), + [anon_sym_extern] = ACTIONS(1020), + [anon_sym___attribute__] = ACTIONS(1020), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1022), + [anon_sym___declspec] = ACTIONS(1020), + [anon_sym___cdecl] = ACTIONS(1020), + [anon_sym___clrcall] = ACTIONS(1020), + [anon_sym___stdcall] = ACTIONS(1020), + [anon_sym___fastcall] = ACTIONS(1020), + [anon_sym___thiscall] = ACTIONS(1020), + [anon_sym___vectorcall] = ACTIONS(1020), + [anon_sym_LBRACE] = ACTIONS(1022), + [anon_sym_RBRACE] = ACTIONS(1022), + [anon_sym_static] = ACTIONS(1020), + [anon_sym_auto] = ACTIONS(1020), + [anon_sym_register] = ACTIONS(1020), + [anon_sym_inline] = ACTIONS(1020), + [anon_sym_const] = ACTIONS(1020), + [anon_sym_volatile] = ACTIONS(1020), + [anon_sym_restrict] = ACTIONS(1020), + [anon_sym__Atomic] = ACTIONS(1020), + [anon_sym_signed] = ACTIONS(1020), + [anon_sym_unsigned] = ACTIONS(1020), + [anon_sym_long] = ACTIONS(1020), + [anon_sym_short] = ACTIONS(1020), + [sym_primitive_type] = ACTIONS(1020), + [anon_sym_enum] = ACTIONS(1020), + [anon_sym_struct] = ACTIONS(1020), + [anon_sym_union] = ACTIONS(1020), + [anon_sym_if] = ACTIONS(1020), + [anon_sym_else] = ACTIONS(1020), + [anon_sym_switch] = ACTIONS(1020), + [anon_sym_case] = ACTIONS(1020), + [anon_sym_default] = ACTIONS(1020), + [anon_sym_while] = ACTIONS(1020), + [anon_sym_do] = ACTIONS(1020), + [anon_sym_for] = ACTIONS(1020), + [anon_sym_return] = ACTIONS(1020), + [anon_sym_break] = ACTIONS(1020), + [anon_sym_continue] = ACTIONS(1020), + [anon_sym_goto] = ACTIONS(1020), + [anon_sym_DASH_DASH] = ACTIONS(1022), + [anon_sym_PLUS_PLUS] = ACTIONS(1022), + [anon_sym_sizeof] = ACTIONS(1020), + [sym_number_literal] = ACTIONS(1022), + [anon_sym_L_SQUOTE] = ACTIONS(1022), + [anon_sym_u_SQUOTE] = ACTIONS(1022), + [anon_sym_U_SQUOTE] = ACTIONS(1022), + [anon_sym_u8_SQUOTE] = ACTIONS(1022), + [anon_sym_SQUOTE] = ACTIONS(1022), + [anon_sym_L_DQUOTE] = ACTIONS(1022), + [anon_sym_u_DQUOTE] = ACTIONS(1022), + [anon_sym_U_DQUOTE] = ACTIONS(1022), + [anon_sym_u8_DQUOTE] = ACTIONS(1022), + [anon_sym_DQUOTE] = ACTIONS(1022), + [sym_true] = ACTIONS(1020), + [sym_false] = ACTIONS(1020), + [sym_null] = ACTIONS(1020), + [sym_comment] = ACTIONS(3), + }, + [278] = { + [sym_attribute_declaration] = STATE(242), + [sym_compound_statement] = STATE(272), + [sym_attributed_statement] = STATE(272), + [sym_labeled_statement] = STATE(272), + [sym_expression_statement] = STATE(272), + [sym_if_statement] = STATE(272), + [sym_switch_statement] = STATE(272), + [sym_case_statement] = STATE(272), + [sym_while_statement] = STATE(272), + [sym_do_statement] = STATE(272), + [sym_for_statement] = STATE(272), + [sym_return_statement] = STATE(272), + [sym_break_statement] = STATE(272), + [sym_continue_statement] = STATE(272), + [sym_goto_statement] = STATE(272), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [sym_identifier] = ACTIONS(1124), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [279] = { + [sym_attribute_declaration] = STATE(242), + [sym_compound_statement] = STATE(275), + [sym_attributed_statement] = STATE(275), + [sym_labeled_statement] = STATE(275), + [sym_expression_statement] = STATE(275), + [sym_if_statement] = STATE(275), + [sym_switch_statement] = STATE(275), + [sym_case_statement] = STATE(275), + [sym_while_statement] = STATE(275), + [sym_do_statement] = STATE(275), + [sym_for_statement] = STATE(275), + [sym_return_statement] = STATE(275), + [sym_break_statement] = STATE(275), + [sym_continue_statement] = STATE(275), + [sym_goto_statement] = STATE(275), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [sym_identifier] = ACTIONS(1124), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [280] = { + [sym_identifier] = ACTIONS(936), + [aux_sym_preproc_include_token1] = ACTIONS(936), + [aux_sym_preproc_def_token1] = ACTIONS(936), + [aux_sym_preproc_if_token1] = ACTIONS(936), + [aux_sym_preproc_ifdef_token1] = ACTIONS(936), + [aux_sym_preproc_ifdef_token2] = ACTIONS(936), + [sym_preproc_directive] = ACTIONS(936), + [anon_sym_LPAREN2] = ACTIONS(938), + [anon_sym_BANG] = ACTIONS(938), + [anon_sym_TILDE] = ACTIONS(938), + [anon_sym_DASH] = ACTIONS(936), + [anon_sym_PLUS] = ACTIONS(936), + [anon_sym_STAR] = ACTIONS(938), + [anon_sym_AMP] = ACTIONS(938), + [anon_sym_SEMI] = ACTIONS(938), + [anon_sym_typedef] = ACTIONS(936), + [anon_sym_extern] = ACTIONS(936), + [anon_sym___attribute__] = ACTIONS(936), + [anon_sym_LBRACK_LBRACK] = ACTIONS(938), + [anon_sym___declspec] = ACTIONS(936), + [anon_sym___cdecl] = ACTIONS(936), + [anon_sym___clrcall] = ACTIONS(936), + [anon_sym___stdcall] = ACTIONS(936), + [anon_sym___fastcall] = ACTIONS(936), + [anon_sym___thiscall] = ACTIONS(936), + [anon_sym___vectorcall] = ACTIONS(936), + [anon_sym_LBRACE] = ACTIONS(938), + [anon_sym_RBRACE] = ACTIONS(938), + [anon_sym_static] = ACTIONS(936), + [anon_sym_auto] = ACTIONS(936), + [anon_sym_register] = ACTIONS(936), + [anon_sym_inline] = ACTIONS(936), + [anon_sym_const] = ACTIONS(936), + [anon_sym_volatile] = ACTIONS(936), + [anon_sym_restrict] = ACTIONS(936), + [anon_sym__Atomic] = ACTIONS(936), + [anon_sym_signed] = ACTIONS(936), + [anon_sym_unsigned] = ACTIONS(936), + [anon_sym_long] = ACTIONS(936), + [anon_sym_short] = ACTIONS(936), + [sym_primitive_type] = ACTIONS(936), + [anon_sym_enum] = ACTIONS(936), + [anon_sym_struct] = ACTIONS(936), + [anon_sym_union] = ACTIONS(936), + [anon_sym_if] = ACTIONS(936), + [anon_sym_else] = ACTIONS(936), + [anon_sym_switch] = ACTIONS(936), + [anon_sym_case] = ACTIONS(936), + [anon_sym_default] = ACTIONS(936), + [anon_sym_while] = ACTIONS(936), + [anon_sym_do] = ACTIONS(936), + [anon_sym_for] = ACTIONS(936), + [anon_sym_return] = ACTIONS(936), + [anon_sym_break] = ACTIONS(936), + [anon_sym_continue] = ACTIONS(936), + [anon_sym_goto] = ACTIONS(936), + [anon_sym_DASH_DASH] = ACTIONS(938), + [anon_sym_PLUS_PLUS] = ACTIONS(938), + [anon_sym_sizeof] = ACTIONS(936), + [sym_number_literal] = ACTIONS(938), + [anon_sym_L_SQUOTE] = ACTIONS(938), + [anon_sym_u_SQUOTE] = ACTIONS(938), + [anon_sym_U_SQUOTE] = ACTIONS(938), + [anon_sym_u8_SQUOTE] = ACTIONS(938), + [anon_sym_SQUOTE] = ACTIONS(938), + [anon_sym_L_DQUOTE] = ACTIONS(938), + [anon_sym_u_DQUOTE] = ACTIONS(938), + [anon_sym_U_DQUOTE] = ACTIONS(938), + [anon_sym_u8_DQUOTE] = ACTIONS(938), + [anon_sym_DQUOTE] = ACTIONS(938), + [sym_true] = ACTIONS(936), + [sym_false] = ACTIONS(936), + [sym_null] = ACTIONS(936), + [sym_comment] = ACTIONS(3), + }, + [281] = { + [sym_identifier] = ACTIONS(932), + [aux_sym_preproc_include_token1] = ACTIONS(932), + [aux_sym_preproc_def_token1] = ACTIONS(932), + [aux_sym_preproc_if_token1] = ACTIONS(932), + [aux_sym_preproc_ifdef_token1] = ACTIONS(932), + [aux_sym_preproc_ifdef_token2] = ACTIONS(932), + [sym_preproc_directive] = ACTIONS(932), + [anon_sym_LPAREN2] = ACTIONS(934), + [anon_sym_BANG] = ACTIONS(934), + [anon_sym_TILDE] = ACTIONS(934), + [anon_sym_DASH] = ACTIONS(932), + [anon_sym_PLUS] = ACTIONS(932), + [anon_sym_STAR] = ACTIONS(934), + [anon_sym_AMP] = ACTIONS(934), + [anon_sym_SEMI] = ACTIONS(934), + [anon_sym_typedef] = ACTIONS(932), + [anon_sym_extern] = ACTIONS(932), + [anon_sym___attribute__] = ACTIONS(932), + [anon_sym_LBRACK_LBRACK] = ACTIONS(934), + [anon_sym___declspec] = ACTIONS(932), + [anon_sym___cdecl] = ACTIONS(932), + [anon_sym___clrcall] = ACTIONS(932), + [anon_sym___stdcall] = ACTIONS(932), + [anon_sym___fastcall] = ACTIONS(932), + [anon_sym___thiscall] = ACTIONS(932), + [anon_sym___vectorcall] = ACTIONS(932), + [anon_sym_LBRACE] = ACTIONS(934), + [anon_sym_RBRACE] = ACTIONS(934), + [anon_sym_static] = ACTIONS(932), + [anon_sym_auto] = ACTIONS(932), + [anon_sym_register] = ACTIONS(932), + [anon_sym_inline] = ACTIONS(932), + [anon_sym_const] = ACTIONS(932), + [anon_sym_volatile] = ACTIONS(932), + [anon_sym_restrict] = ACTIONS(932), + [anon_sym__Atomic] = ACTIONS(932), + [anon_sym_signed] = ACTIONS(932), + [anon_sym_unsigned] = ACTIONS(932), + [anon_sym_long] = ACTIONS(932), + [anon_sym_short] = ACTIONS(932), + [sym_primitive_type] = ACTIONS(932), + [anon_sym_enum] = ACTIONS(932), + [anon_sym_struct] = ACTIONS(932), + [anon_sym_union] = ACTIONS(932), + [anon_sym_if] = ACTIONS(932), + [anon_sym_else] = ACTIONS(932), + [anon_sym_switch] = ACTIONS(932), + [anon_sym_case] = ACTIONS(932), + [anon_sym_default] = ACTIONS(932), + [anon_sym_while] = ACTIONS(932), + [anon_sym_do] = ACTIONS(932), + [anon_sym_for] = ACTIONS(932), + [anon_sym_return] = ACTIONS(932), + [anon_sym_break] = ACTIONS(932), + [anon_sym_continue] = ACTIONS(932), + [anon_sym_goto] = ACTIONS(932), + [anon_sym_DASH_DASH] = ACTIONS(934), + [anon_sym_PLUS_PLUS] = ACTIONS(934), + [anon_sym_sizeof] = ACTIONS(932), + [sym_number_literal] = ACTIONS(934), + [anon_sym_L_SQUOTE] = ACTIONS(934), + [anon_sym_u_SQUOTE] = ACTIONS(934), + [anon_sym_U_SQUOTE] = ACTIONS(934), + [anon_sym_u8_SQUOTE] = ACTIONS(934), + [anon_sym_SQUOTE] = ACTIONS(934), + [anon_sym_L_DQUOTE] = ACTIONS(934), + [anon_sym_u_DQUOTE] = ACTIONS(934), + [anon_sym_U_DQUOTE] = ACTIONS(934), + [anon_sym_u8_DQUOTE] = ACTIONS(934), + [anon_sym_DQUOTE] = ACTIONS(934), + [sym_true] = ACTIONS(932), + [sym_false] = ACTIONS(932), + [sym_null] = ACTIONS(932), + [sym_comment] = ACTIONS(3), + }, + [282] = { + [sym_identifier] = ACTIONS(1012), + [aux_sym_preproc_include_token1] = ACTIONS(1012), + [aux_sym_preproc_def_token1] = ACTIONS(1012), + [aux_sym_preproc_if_token1] = ACTIONS(1012), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1012), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1012), + [sym_preproc_directive] = ACTIONS(1012), + [anon_sym_LPAREN2] = ACTIONS(1014), + [anon_sym_BANG] = ACTIONS(1014), + [anon_sym_TILDE] = ACTIONS(1014), + [anon_sym_DASH] = ACTIONS(1012), + [anon_sym_PLUS] = ACTIONS(1012), + [anon_sym_STAR] = ACTIONS(1014), + [anon_sym_AMP] = ACTIONS(1014), + [anon_sym_SEMI] = ACTIONS(1014), + [anon_sym_typedef] = ACTIONS(1012), + [anon_sym_extern] = ACTIONS(1012), + [anon_sym___attribute__] = ACTIONS(1012), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1014), + [anon_sym___declspec] = ACTIONS(1012), + [anon_sym___cdecl] = ACTIONS(1012), + [anon_sym___clrcall] = ACTIONS(1012), + [anon_sym___stdcall] = ACTIONS(1012), + [anon_sym___fastcall] = ACTIONS(1012), + [anon_sym___thiscall] = ACTIONS(1012), + [anon_sym___vectorcall] = ACTIONS(1012), + [anon_sym_LBRACE] = ACTIONS(1014), + [anon_sym_RBRACE] = ACTIONS(1014), + [anon_sym_static] = ACTIONS(1012), + [anon_sym_auto] = ACTIONS(1012), + [anon_sym_register] = ACTIONS(1012), + [anon_sym_inline] = ACTIONS(1012), + [anon_sym_const] = ACTIONS(1012), + [anon_sym_volatile] = ACTIONS(1012), + [anon_sym_restrict] = ACTIONS(1012), + [anon_sym__Atomic] = ACTIONS(1012), + [anon_sym_signed] = ACTIONS(1012), + [anon_sym_unsigned] = ACTIONS(1012), + [anon_sym_long] = ACTIONS(1012), + [anon_sym_short] = ACTIONS(1012), + [sym_primitive_type] = ACTIONS(1012), + [anon_sym_enum] = ACTIONS(1012), + [anon_sym_struct] = ACTIONS(1012), + [anon_sym_union] = ACTIONS(1012), + [anon_sym_if] = ACTIONS(1012), + [anon_sym_else] = ACTIONS(1012), + [anon_sym_switch] = ACTIONS(1012), + [anon_sym_case] = ACTIONS(1012), + [anon_sym_default] = ACTIONS(1012), + [anon_sym_while] = ACTIONS(1012), + [anon_sym_do] = ACTIONS(1012), + [anon_sym_for] = ACTIONS(1012), + [anon_sym_return] = ACTIONS(1012), + [anon_sym_break] = ACTIONS(1012), + [anon_sym_continue] = ACTIONS(1012), + [anon_sym_goto] = ACTIONS(1012), + [anon_sym_DASH_DASH] = ACTIONS(1014), + [anon_sym_PLUS_PLUS] = ACTIONS(1014), + [anon_sym_sizeof] = ACTIONS(1012), + [sym_number_literal] = ACTIONS(1014), + [anon_sym_L_SQUOTE] = ACTIONS(1014), + [anon_sym_u_SQUOTE] = ACTIONS(1014), + [anon_sym_U_SQUOTE] = ACTIONS(1014), + [anon_sym_u8_SQUOTE] = ACTIONS(1014), + [anon_sym_SQUOTE] = ACTIONS(1014), + [anon_sym_L_DQUOTE] = ACTIONS(1014), + [anon_sym_u_DQUOTE] = ACTIONS(1014), + [anon_sym_U_DQUOTE] = ACTIONS(1014), + [anon_sym_u8_DQUOTE] = ACTIONS(1014), + [anon_sym_DQUOTE] = ACTIONS(1014), + [sym_true] = ACTIONS(1012), + [sym_false] = ACTIONS(1012), + [sym_null] = ACTIONS(1012), + [sym_comment] = ACTIONS(3), + }, + [283] = { + [sym_identifier] = ACTIONS(956), + [aux_sym_preproc_include_token1] = ACTIONS(956), + [aux_sym_preproc_def_token1] = ACTIONS(956), + [aux_sym_preproc_if_token1] = ACTIONS(956), + [aux_sym_preproc_if_token2] = ACTIONS(956), + [aux_sym_preproc_ifdef_token1] = ACTIONS(956), + [aux_sym_preproc_ifdef_token2] = ACTIONS(956), + [sym_preproc_directive] = ACTIONS(956), + [anon_sym_LPAREN2] = ACTIONS(958), + [anon_sym_BANG] = ACTIONS(958), + [anon_sym_TILDE] = ACTIONS(958), + [anon_sym_DASH] = ACTIONS(956), + [anon_sym_PLUS] = ACTIONS(956), + [anon_sym_STAR] = ACTIONS(958), + [anon_sym_AMP] = ACTIONS(958), + [anon_sym_SEMI] = ACTIONS(958), + [anon_sym_typedef] = ACTIONS(956), + [anon_sym_extern] = ACTIONS(956), + [anon_sym___attribute__] = ACTIONS(956), + [anon_sym_LBRACK_LBRACK] = ACTIONS(958), + [anon_sym___declspec] = ACTIONS(956), + [anon_sym___cdecl] = ACTIONS(956), + [anon_sym___clrcall] = ACTIONS(956), + [anon_sym___stdcall] = ACTIONS(956), + [anon_sym___fastcall] = ACTIONS(956), + [anon_sym___thiscall] = ACTIONS(956), + [anon_sym___vectorcall] = ACTIONS(956), + [anon_sym_LBRACE] = ACTIONS(958), + [anon_sym_static] = ACTIONS(956), + [anon_sym_auto] = ACTIONS(956), + [anon_sym_register] = ACTIONS(956), + [anon_sym_inline] = ACTIONS(956), + [anon_sym_const] = ACTIONS(956), + [anon_sym_volatile] = ACTIONS(956), + [anon_sym_restrict] = ACTIONS(956), + [anon_sym__Atomic] = ACTIONS(956), + [anon_sym_signed] = ACTIONS(956), + [anon_sym_unsigned] = ACTIONS(956), + [anon_sym_long] = ACTIONS(956), + [anon_sym_short] = ACTIONS(956), + [sym_primitive_type] = ACTIONS(956), + [anon_sym_enum] = ACTIONS(956), + [anon_sym_struct] = ACTIONS(956), + [anon_sym_union] = ACTIONS(956), + [anon_sym_if] = ACTIONS(956), + [anon_sym_else] = ACTIONS(956), + [anon_sym_switch] = ACTIONS(956), + [anon_sym_case] = ACTIONS(956), + [anon_sym_default] = ACTIONS(956), + [anon_sym_while] = ACTIONS(956), + [anon_sym_do] = ACTIONS(956), + [anon_sym_for] = ACTIONS(956), + [anon_sym_return] = ACTIONS(956), + [anon_sym_break] = ACTIONS(956), + [anon_sym_continue] = ACTIONS(956), + [anon_sym_goto] = ACTIONS(956), + [anon_sym_DASH_DASH] = ACTIONS(958), + [anon_sym_PLUS_PLUS] = ACTIONS(958), + [anon_sym_sizeof] = ACTIONS(956), + [sym_number_literal] = ACTIONS(958), + [anon_sym_L_SQUOTE] = ACTIONS(958), + [anon_sym_u_SQUOTE] = ACTIONS(958), + [anon_sym_U_SQUOTE] = ACTIONS(958), + [anon_sym_u8_SQUOTE] = ACTIONS(958), + [anon_sym_SQUOTE] = ACTIONS(958), + [anon_sym_L_DQUOTE] = ACTIONS(958), + [anon_sym_u_DQUOTE] = ACTIONS(958), + [anon_sym_U_DQUOTE] = ACTIONS(958), + [anon_sym_u8_DQUOTE] = ACTIONS(958), + [anon_sym_DQUOTE] = ACTIONS(958), + [sym_true] = ACTIONS(956), + [sym_false] = ACTIONS(956), + [sym_null] = ACTIONS(956), + [sym_comment] = ACTIONS(3), + }, + [284] = { + [ts_builtin_sym_end] = ACTIONS(1014), + [sym_identifier] = ACTIONS(1012), + [aux_sym_preproc_include_token1] = ACTIONS(1012), + [aux_sym_preproc_def_token1] = ACTIONS(1012), + [aux_sym_preproc_if_token1] = ACTIONS(1012), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1012), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1012), + [sym_preproc_directive] = ACTIONS(1012), + [anon_sym_LPAREN2] = ACTIONS(1014), + [anon_sym_BANG] = ACTIONS(1014), + [anon_sym_TILDE] = ACTIONS(1014), + [anon_sym_DASH] = ACTIONS(1012), + [anon_sym_PLUS] = ACTIONS(1012), + [anon_sym_STAR] = ACTIONS(1014), + [anon_sym_AMP] = ACTIONS(1014), + [anon_sym_SEMI] = ACTIONS(1014), + [anon_sym_typedef] = ACTIONS(1012), + [anon_sym_extern] = ACTIONS(1012), + [anon_sym___attribute__] = ACTIONS(1012), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1014), + [anon_sym___declspec] = ACTIONS(1012), + [anon_sym___cdecl] = ACTIONS(1012), + [anon_sym___clrcall] = ACTIONS(1012), + [anon_sym___stdcall] = ACTIONS(1012), + [anon_sym___fastcall] = ACTIONS(1012), + [anon_sym___thiscall] = ACTIONS(1012), + [anon_sym___vectorcall] = ACTIONS(1012), + [anon_sym_LBRACE] = ACTIONS(1014), + [anon_sym_static] = ACTIONS(1012), + [anon_sym_auto] = ACTIONS(1012), + [anon_sym_register] = ACTIONS(1012), + [anon_sym_inline] = ACTIONS(1012), + [anon_sym_const] = ACTIONS(1012), + [anon_sym_volatile] = ACTIONS(1012), + [anon_sym_restrict] = ACTIONS(1012), + [anon_sym__Atomic] = ACTIONS(1012), + [anon_sym_signed] = ACTIONS(1012), + [anon_sym_unsigned] = ACTIONS(1012), + [anon_sym_long] = ACTIONS(1012), + [anon_sym_short] = ACTIONS(1012), + [sym_primitive_type] = ACTIONS(1012), + [anon_sym_enum] = ACTIONS(1012), + [anon_sym_struct] = ACTIONS(1012), + [anon_sym_union] = ACTIONS(1012), + [anon_sym_if] = ACTIONS(1012), + [anon_sym_else] = ACTIONS(1012), + [anon_sym_switch] = ACTIONS(1012), + [anon_sym_case] = ACTIONS(1012), + [anon_sym_default] = ACTIONS(1012), + [anon_sym_while] = ACTIONS(1012), + [anon_sym_do] = ACTIONS(1012), + [anon_sym_for] = ACTIONS(1012), + [anon_sym_return] = ACTIONS(1012), + [anon_sym_break] = ACTIONS(1012), + [anon_sym_continue] = ACTIONS(1012), + [anon_sym_goto] = ACTIONS(1012), + [anon_sym_DASH_DASH] = ACTIONS(1014), + [anon_sym_PLUS_PLUS] = ACTIONS(1014), + [anon_sym_sizeof] = ACTIONS(1012), + [sym_number_literal] = ACTIONS(1014), + [anon_sym_L_SQUOTE] = ACTIONS(1014), + [anon_sym_u_SQUOTE] = ACTIONS(1014), + [anon_sym_U_SQUOTE] = ACTIONS(1014), + [anon_sym_u8_SQUOTE] = ACTIONS(1014), + [anon_sym_SQUOTE] = ACTIONS(1014), + [anon_sym_L_DQUOTE] = ACTIONS(1014), + [anon_sym_u_DQUOTE] = ACTIONS(1014), + [anon_sym_U_DQUOTE] = ACTIONS(1014), + [anon_sym_u8_DQUOTE] = ACTIONS(1014), + [anon_sym_DQUOTE] = ACTIONS(1014), + [sym_true] = ACTIONS(1012), + [sym_false] = ACTIONS(1012), + [sym_null] = ACTIONS(1012), + [sym_comment] = ACTIONS(3), + }, + [285] = { + [sym_identifier] = ACTIONS(924), + [aux_sym_preproc_include_token1] = ACTIONS(924), + [aux_sym_preproc_def_token1] = ACTIONS(924), + [aux_sym_preproc_if_token1] = ACTIONS(924), + [aux_sym_preproc_ifdef_token1] = ACTIONS(924), + [aux_sym_preproc_ifdef_token2] = ACTIONS(924), + [sym_preproc_directive] = ACTIONS(924), + [anon_sym_LPAREN2] = ACTIONS(926), + [anon_sym_BANG] = ACTIONS(926), + [anon_sym_TILDE] = ACTIONS(926), + [anon_sym_DASH] = ACTIONS(924), + [anon_sym_PLUS] = ACTIONS(924), + [anon_sym_STAR] = ACTIONS(926), + [anon_sym_AMP] = ACTIONS(926), + [anon_sym_SEMI] = ACTIONS(926), + [anon_sym_typedef] = ACTIONS(924), + [anon_sym_extern] = ACTIONS(924), + [anon_sym___attribute__] = ACTIONS(924), + [anon_sym_LBRACK_LBRACK] = ACTIONS(926), + [anon_sym___declspec] = ACTIONS(924), + [anon_sym___cdecl] = ACTIONS(924), + [anon_sym___clrcall] = ACTIONS(924), + [anon_sym___stdcall] = ACTIONS(924), + [anon_sym___fastcall] = ACTIONS(924), + [anon_sym___thiscall] = ACTIONS(924), + [anon_sym___vectorcall] = ACTIONS(924), + [anon_sym_LBRACE] = ACTIONS(926), + [anon_sym_RBRACE] = ACTIONS(926), + [anon_sym_static] = ACTIONS(924), + [anon_sym_auto] = ACTIONS(924), + [anon_sym_register] = ACTIONS(924), + [anon_sym_inline] = ACTIONS(924), + [anon_sym_const] = ACTIONS(924), + [anon_sym_volatile] = ACTIONS(924), + [anon_sym_restrict] = ACTIONS(924), + [anon_sym__Atomic] = ACTIONS(924), + [anon_sym_signed] = ACTIONS(924), + [anon_sym_unsigned] = ACTIONS(924), + [anon_sym_long] = ACTIONS(924), + [anon_sym_short] = ACTIONS(924), + [sym_primitive_type] = ACTIONS(924), + [anon_sym_enum] = ACTIONS(924), + [anon_sym_struct] = ACTIONS(924), + [anon_sym_union] = ACTIONS(924), + [anon_sym_if] = ACTIONS(924), + [anon_sym_else] = ACTIONS(924), + [anon_sym_switch] = ACTIONS(924), + [anon_sym_case] = ACTIONS(924), + [anon_sym_default] = ACTIONS(924), + [anon_sym_while] = ACTIONS(924), + [anon_sym_do] = ACTIONS(924), + [anon_sym_for] = ACTIONS(924), + [anon_sym_return] = ACTIONS(924), + [anon_sym_break] = ACTIONS(924), + [anon_sym_continue] = ACTIONS(924), + [anon_sym_goto] = ACTIONS(924), + [anon_sym_DASH_DASH] = ACTIONS(926), + [anon_sym_PLUS_PLUS] = ACTIONS(926), + [anon_sym_sizeof] = ACTIONS(924), + [sym_number_literal] = ACTIONS(926), + [anon_sym_L_SQUOTE] = ACTIONS(926), + [anon_sym_u_SQUOTE] = ACTIONS(926), + [anon_sym_U_SQUOTE] = ACTIONS(926), + [anon_sym_u8_SQUOTE] = ACTIONS(926), + [anon_sym_SQUOTE] = ACTIONS(926), + [anon_sym_L_DQUOTE] = ACTIONS(926), + [anon_sym_u_DQUOTE] = ACTIONS(926), + [anon_sym_U_DQUOTE] = ACTIONS(926), + [anon_sym_u8_DQUOTE] = ACTIONS(926), + [anon_sym_DQUOTE] = ACTIONS(926), + [sym_true] = ACTIONS(924), + [sym_false] = ACTIONS(924), + [sym_null] = ACTIONS(924), + [sym_comment] = ACTIONS(3), + }, + [286] = { + [sym_identifier] = ACTIONS(1000), + [aux_sym_preproc_include_token1] = ACTIONS(1000), + [aux_sym_preproc_def_token1] = ACTIONS(1000), + [aux_sym_preproc_if_token1] = ACTIONS(1000), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1000), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1000), + [sym_preproc_directive] = ACTIONS(1000), + [anon_sym_LPAREN2] = ACTIONS(1002), + [anon_sym_BANG] = ACTIONS(1002), + [anon_sym_TILDE] = ACTIONS(1002), + [anon_sym_DASH] = ACTIONS(1000), + [anon_sym_PLUS] = ACTIONS(1000), + [anon_sym_STAR] = ACTIONS(1002), + [anon_sym_AMP] = ACTIONS(1002), + [anon_sym_SEMI] = ACTIONS(1002), + [anon_sym_typedef] = ACTIONS(1000), + [anon_sym_extern] = ACTIONS(1000), + [anon_sym___attribute__] = ACTIONS(1000), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1002), + [anon_sym___declspec] = ACTIONS(1000), + [anon_sym___cdecl] = ACTIONS(1000), + [anon_sym___clrcall] = ACTIONS(1000), + [anon_sym___stdcall] = ACTIONS(1000), + [anon_sym___fastcall] = ACTIONS(1000), + [anon_sym___thiscall] = ACTIONS(1000), + [anon_sym___vectorcall] = ACTIONS(1000), + [anon_sym_LBRACE] = ACTIONS(1002), + [anon_sym_RBRACE] = ACTIONS(1002), + [anon_sym_static] = ACTIONS(1000), + [anon_sym_auto] = ACTIONS(1000), + [anon_sym_register] = ACTIONS(1000), + [anon_sym_inline] = ACTIONS(1000), + [anon_sym_const] = ACTIONS(1000), + [anon_sym_volatile] = ACTIONS(1000), + [anon_sym_restrict] = ACTIONS(1000), + [anon_sym__Atomic] = ACTIONS(1000), + [anon_sym_signed] = ACTIONS(1000), + [anon_sym_unsigned] = ACTIONS(1000), + [anon_sym_long] = ACTIONS(1000), + [anon_sym_short] = ACTIONS(1000), + [sym_primitive_type] = ACTIONS(1000), + [anon_sym_enum] = ACTIONS(1000), + [anon_sym_struct] = ACTIONS(1000), + [anon_sym_union] = ACTIONS(1000), + [anon_sym_if] = ACTIONS(1000), + [anon_sym_else] = ACTIONS(1000), + [anon_sym_switch] = ACTIONS(1000), + [anon_sym_case] = ACTIONS(1000), + [anon_sym_default] = ACTIONS(1000), + [anon_sym_while] = ACTIONS(1000), + [anon_sym_do] = ACTIONS(1000), + [anon_sym_for] = ACTIONS(1000), + [anon_sym_return] = ACTIONS(1000), + [anon_sym_break] = ACTIONS(1000), + [anon_sym_continue] = ACTIONS(1000), + [anon_sym_goto] = ACTIONS(1000), + [anon_sym_DASH_DASH] = ACTIONS(1002), + [anon_sym_PLUS_PLUS] = ACTIONS(1002), + [anon_sym_sizeof] = ACTIONS(1000), + [sym_number_literal] = ACTIONS(1002), + [anon_sym_L_SQUOTE] = ACTIONS(1002), + [anon_sym_u_SQUOTE] = ACTIONS(1002), + [anon_sym_U_SQUOTE] = ACTIONS(1002), + [anon_sym_u8_SQUOTE] = ACTIONS(1002), + [anon_sym_SQUOTE] = ACTIONS(1002), + [anon_sym_L_DQUOTE] = ACTIONS(1002), + [anon_sym_u_DQUOTE] = ACTIONS(1002), + [anon_sym_U_DQUOTE] = ACTIONS(1002), + [anon_sym_u8_DQUOTE] = ACTIONS(1002), + [anon_sym_DQUOTE] = ACTIONS(1002), + [sym_true] = ACTIONS(1000), + [sym_false] = ACTIONS(1000), + [sym_null] = ACTIONS(1000), + [sym_comment] = ACTIONS(3), + }, + [287] = { + [ts_builtin_sym_end] = ACTIONS(904), + [sym_identifier] = ACTIONS(902), + [aux_sym_preproc_include_token1] = ACTIONS(902), + [aux_sym_preproc_def_token1] = ACTIONS(902), + [aux_sym_preproc_if_token1] = ACTIONS(902), + [aux_sym_preproc_ifdef_token1] = ACTIONS(902), + [aux_sym_preproc_ifdef_token2] = ACTIONS(902), + [sym_preproc_directive] = ACTIONS(902), + [anon_sym_LPAREN2] = ACTIONS(904), + [anon_sym_BANG] = ACTIONS(904), + [anon_sym_TILDE] = ACTIONS(904), + [anon_sym_DASH] = ACTIONS(902), + [anon_sym_PLUS] = ACTIONS(902), + [anon_sym_STAR] = ACTIONS(904), + [anon_sym_AMP] = ACTIONS(904), + [anon_sym_SEMI] = ACTIONS(904), + [anon_sym_typedef] = ACTIONS(902), + [anon_sym_extern] = ACTIONS(902), + [anon_sym___attribute__] = ACTIONS(902), + [anon_sym_LBRACK_LBRACK] = ACTIONS(904), + [anon_sym___declspec] = ACTIONS(902), + [anon_sym___cdecl] = ACTIONS(902), + [anon_sym___clrcall] = ACTIONS(902), + [anon_sym___stdcall] = ACTIONS(902), + [anon_sym___fastcall] = ACTIONS(902), + [anon_sym___thiscall] = ACTIONS(902), + [anon_sym___vectorcall] = ACTIONS(902), + [anon_sym_LBRACE] = ACTIONS(904), + [anon_sym_static] = ACTIONS(902), + [anon_sym_auto] = ACTIONS(902), + [anon_sym_register] = ACTIONS(902), + [anon_sym_inline] = ACTIONS(902), + [anon_sym_const] = ACTIONS(902), + [anon_sym_volatile] = ACTIONS(902), + [anon_sym_restrict] = ACTIONS(902), + [anon_sym__Atomic] = ACTIONS(902), + [anon_sym_signed] = ACTIONS(902), + [anon_sym_unsigned] = ACTIONS(902), + [anon_sym_long] = ACTIONS(902), + [anon_sym_short] = ACTIONS(902), + [sym_primitive_type] = ACTIONS(902), + [anon_sym_enum] = ACTIONS(902), + [anon_sym_struct] = ACTIONS(902), + [anon_sym_union] = ACTIONS(902), + [anon_sym_if] = ACTIONS(902), + [anon_sym_else] = ACTIONS(902), + [anon_sym_switch] = ACTIONS(902), + [anon_sym_case] = ACTIONS(902), + [anon_sym_default] = ACTIONS(902), + [anon_sym_while] = ACTIONS(902), + [anon_sym_do] = ACTIONS(902), + [anon_sym_for] = ACTIONS(902), + [anon_sym_return] = ACTIONS(902), + [anon_sym_break] = ACTIONS(902), + [anon_sym_continue] = ACTIONS(902), + [anon_sym_goto] = ACTIONS(902), + [anon_sym_DASH_DASH] = ACTIONS(904), + [anon_sym_PLUS_PLUS] = ACTIONS(904), + [anon_sym_sizeof] = ACTIONS(902), + [sym_number_literal] = ACTIONS(904), + [anon_sym_L_SQUOTE] = ACTIONS(904), + [anon_sym_u_SQUOTE] = ACTIONS(904), + [anon_sym_U_SQUOTE] = ACTIONS(904), + [anon_sym_u8_SQUOTE] = ACTIONS(904), + [anon_sym_SQUOTE] = ACTIONS(904), + [anon_sym_L_DQUOTE] = ACTIONS(904), + [anon_sym_u_DQUOTE] = ACTIONS(904), + [anon_sym_U_DQUOTE] = ACTIONS(904), + [anon_sym_u8_DQUOTE] = ACTIONS(904), + [anon_sym_DQUOTE] = ACTIONS(904), + [sym_true] = ACTIONS(902), + [sym_false] = ACTIONS(902), + [sym_null] = ACTIONS(902), + [sym_comment] = ACTIONS(3), + }, + [288] = { + [sym_attribute_declaration] = STATE(242), + [sym_compound_statement] = STATE(307), + [sym_attributed_statement] = STATE(307), + [sym_labeled_statement] = STATE(307), + [sym_expression_statement] = STATE(307), + [sym_if_statement] = STATE(307), + [sym_switch_statement] = STATE(307), + [sym_case_statement] = STATE(307), + [sym_while_statement] = STATE(307), + [sym_do_statement] = STATE(307), + [sym_for_statement] = STATE(307), + [sym_return_statement] = STATE(307), + [sym_break_statement] = STATE(307), + [sym_continue_statement] = STATE(307), + [sym_goto_statement] = STATE(307), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [sym_identifier] = ACTIONS(1124), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [289] = { + [sym_identifier] = ACTIONS(984), + [aux_sym_preproc_include_token1] = ACTIONS(984), + [aux_sym_preproc_def_token1] = ACTIONS(984), + [aux_sym_preproc_if_token1] = ACTIONS(984), + [aux_sym_preproc_ifdef_token1] = ACTIONS(984), + [aux_sym_preproc_ifdef_token2] = ACTIONS(984), + [sym_preproc_directive] = ACTIONS(984), + [anon_sym_LPAREN2] = ACTIONS(986), + [anon_sym_BANG] = ACTIONS(986), + [anon_sym_TILDE] = ACTIONS(986), + [anon_sym_DASH] = ACTIONS(984), + [anon_sym_PLUS] = ACTIONS(984), + [anon_sym_STAR] = ACTIONS(986), + [anon_sym_AMP] = ACTIONS(986), + [anon_sym_SEMI] = ACTIONS(986), + [anon_sym_typedef] = ACTIONS(984), + [anon_sym_extern] = ACTIONS(984), + [anon_sym___attribute__] = ACTIONS(984), + [anon_sym_LBRACK_LBRACK] = ACTIONS(986), + [anon_sym___declspec] = ACTIONS(984), + [anon_sym___cdecl] = ACTIONS(984), + [anon_sym___clrcall] = ACTIONS(984), + [anon_sym___stdcall] = ACTIONS(984), + [anon_sym___fastcall] = ACTIONS(984), + [anon_sym___thiscall] = ACTIONS(984), + [anon_sym___vectorcall] = ACTIONS(984), + [anon_sym_LBRACE] = ACTIONS(986), + [anon_sym_RBRACE] = ACTIONS(986), + [anon_sym_static] = ACTIONS(984), + [anon_sym_auto] = ACTIONS(984), + [anon_sym_register] = ACTIONS(984), + [anon_sym_inline] = ACTIONS(984), + [anon_sym_const] = ACTIONS(984), + [anon_sym_volatile] = ACTIONS(984), + [anon_sym_restrict] = ACTIONS(984), + [anon_sym__Atomic] = ACTIONS(984), + [anon_sym_signed] = ACTIONS(984), + [anon_sym_unsigned] = ACTIONS(984), + [anon_sym_long] = ACTIONS(984), + [anon_sym_short] = ACTIONS(984), + [sym_primitive_type] = ACTIONS(984), + [anon_sym_enum] = ACTIONS(984), + [anon_sym_struct] = ACTIONS(984), + [anon_sym_union] = ACTIONS(984), + [anon_sym_if] = ACTIONS(984), + [anon_sym_else] = ACTIONS(984), + [anon_sym_switch] = ACTIONS(984), + [anon_sym_case] = ACTIONS(984), + [anon_sym_default] = ACTIONS(984), + [anon_sym_while] = ACTIONS(984), + [anon_sym_do] = ACTIONS(984), + [anon_sym_for] = ACTIONS(984), + [anon_sym_return] = ACTIONS(984), + [anon_sym_break] = ACTIONS(984), + [anon_sym_continue] = ACTIONS(984), + [anon_sym_goto] = ACTIONS(984), + [anon_sym_DASH_DASH] = ACTIONS(986), + [anon_sym_PLUS_PLUS] = ACTIONS(986), + [anon_sym_sizeof] = ACTIONS(984), + [sym_number_literal] = ACTIONS(986), + [anon_sym_L_SQUOTE] = ACTIONS(986), + [anon_sym_u_SQUOTE] = ACTIONS(986), + [anon_sym_U_SQUOTE] = ACTIONS(986), + [anon_sym_u8_SQUOTE] = ACTIONS(986), + [anon_sym_SQUOTE] = ACTIONS(986), + [anon_sym_L_DQUOTE] = ACTIONS(986), + [anon_sym_u_DQUOTE] = ACTIONS(986), + [anon_sym_U_DQUOTE] = ACTIONS(986), + [anon_sym_u8_DQUOTE] = ACTIONS(986), + [anon_sym_DQUOTE] = ACTIONS(986), + [sym_true] = ACTIONS(984), + [sym_false] = ACTIONS(984), + [sym_null] = ACTIONS(984), + [sym_comment] = ACTIONS(3), + }, + [290] = { + [sym_identifier] = ACTIONS(1008), + [aux_sym_preproc_include_token1] = ACTIONS(1008), + [aux_sym_preproc_def_token1] = ACTIONS(1008), + [aux_sym_preproc_if_token1] = ACTIONS(1008), + [aux_sym_preproc_if_token2] = ACTIONS(1008), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1008), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1008), + [sym_preproc_directive] = ACTIONS(1008), + [anon_sym_LPAREN2] = ACTIONS(1010), + [anon_sym_BANG] = ACTIONS(1010), + [anon_sym_TILDE] = ACTIONS(1010), + [anon_sym_DASH] = ACTIONS(1008), + [anon_sym_PLUS] = ACTIONS(1008), + [anon_sym_STAR] = ACTIONS(1010), + [anon_sym_AMP] = ACTIONS(1010), + [anon_sym_SEMI] = ACTIONS(1010), + [anon_sym_typedef] = ACTIONS(1008), + [anon_sym_extern] = ACTIONS(1008), + [anon_sym___attribute__] = ACTIONS(1008), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1010), + [anon_sym___declspec] = ACTIONS(1008), + [anon_sym___cdecl] = ACTIONS(1008), + [anon_sym___clrcall] = ACTIONS(1008), + [anon_sym___stdcall] = ACTIONS(1008), + [anon_sym___fastcall] = ACTIONS(1008), + [anon_sym___thiscall] = ACTIONS(1008), + [anon_sym___vectorcall] = ACTIONS(1008), + [anon_sym_LBRACE] = ACTIONS(1010), + [anon_sym_static] = ACTIONS(1008), + [anon_sym_auto] = ACTIONS(1008), + [anon_sym_register] = ACTIONS(1008), + [anon_sym_inline] = ACTIONS(1008), + [anon_sym_const] = ACTIONS(1008), + [anon_sym_volatile] = ACTIONS(1008), + [anon_sym_restrict] = ACTIONS(1008), + [anon_sym__Atomic] = ACTIONS(1008), + [anon_sym_signed] = ACTIONS(1008), + [anon_sym_unsigned] = ACTIONS(1008), + [anon_sym_long] = ACTIONS(1008), + [anon_sym_short] = ACTIONS(1008), + [sym_primitive_type] = ACTIONS(1008), + [anon_sym_enum] = ACTIONS(1008), + [anon_sym_struct] = ACTIONS(1008), + [anon_sym_union] = ACTIONS(1008), + [anon_sym_if] = ACTIONS(1008), + [anon_sym_else] = ACTIONS(1008), + [anon_sym_switch] = ACTIONS(1008), + [anon_sym_case] = ACTIONS(1008), + [anon_sym_default] = ACTIONS(1008), + [anon_sym_while] = ACTIONS(1008), + [anon_sym_do] = ACTIONS(1008), + [anon_sym_for] = ACTIONS(1008), + [anon_sym_return] = ACTIONS(1008), + [anon_sym_break] = ACTIONS(1008), + [anon_sym_continue] = ACTIONS(1008), + [anon_sym_goto] = ACTIONS(1008), + [anon_sym_DASH_DASH] = ACTIONS(1010), + [anon_sym_PLUS_PLUS] = ACTIONS(1010), + [anon_sym_sizeof] = ACTIONS(1008), + [sym_number_literal] = ACTIONS(1010), + [anon_sym_L_SQUOTE] = ACTIONS(1010), + [anon_sym_u_SQUOTE] = ACTIONS(1010), + [anon_sym_U_SQUOTE] = ACTIONS(1010), + [anon_sym_u8_SQUOTE] = ACTIONS(1010), + [anon_sym_SQUOTE] = ACTIONS(1010), + [anon_sym_L_DQUOTE] = ACTIONS(1010), + [anon_sym_u_DQUOTE] = ACTIONS(1010), + [anon_sym_U_DQUOTE] = ACTIONS(1010), + [anon_sym_u8_DQUOTE] = ACTIONS(1010), + [anon_sym_DQUOTE] = ACTIONS(1010), + [sym_true] = ACTIONS(1008), + [sym_false] = ACTIONS(1008), + [sym_null] = ACTIONS(1008), + [sym_comment] = ACTIONS(3), + }, + [291] = { + [sym_identifier] = ACTIONS(944), + [aux_sym_preproc_include_token1] = ACTIONS(944), + [aux_sym_preproc_def_token1] = ACTIONS(944), + [aux_sym_preproc_if_token1] = ACTIONS(944), + [aux_sym_preproc_ifdef_token1] = ACTIONS(944), + [aux_sym_preproc_ifdef_token2] = ACTIONS(944), + [sym_preproc_directive] = ACTIONS(944), + [anon_sym_LPAREN2] = ACTIONS(946), + [anon_sym_BANG] = ACTIONS(946), + [anon_sym_TILDE] = ACTIONS(946), + [anon_sym_DASH] = ACTIONS(944), + [anon_sym_PLUS] = ACTIONS(944), + [anon_sym_STAR] = ACTIONS(946), + [anon_sym_AMP] = ACTIONS(946), + [anon_sym_SEMI] = ACTIONS(946), + [anon_sym_typedef] = ACTIONS(944), + [anon_sym_extern] = ACTIONS(944), + [anon_sym___attribute__] = ACTIONS(944), + [anon_sym_LBRACK_LBRACK] = ACTIONS(946), + [anon_sym___declspec] = ACTIONS(944), + [anon_sym___cdecl] = ACTIONS(944), + [anon_sym___clrcall] = ACTIONS(944), + [anon_sym___stdcall] = ACTIONS(944), + [anon_sym___fastcall] = ACTIONS(944), + [anon_sym___thiscall] = ACTIONS(944), + [anon_sym___vectorcall] = ACTIONS(944), + [anon_sym_LBRACE] = ACTIONS(946), + [anon_sym_RBRACE] = ACTIONS(946), + [anon_sym_static] = ACTIONS(944), + [anon_sym_auto] = ACTIONS(944), + [anon_sym_register] = ACTIONS(944), + [anon_sym_inline] = ACTIONS(944), + [anon_sym_const] = ACTIONS(944), + [anon_sym_volatile] = ACTIONS(944), + [anon_sym_restrict] = ACTIONS(944), + [anon_sym__Atomic] = ACTIONS(944), + [anon_sym_signed] = ACTIONS(944), + [anon_sym_unsigned] = ACTIONS(944), + [anon_sym_long] = ACTIONS(944), + [anon_sym_short] = ACTIONS(944), + [sym_primitive_type] = ACTIONS(944), + [anon_sym_enum] = ACTIONS(944), + [anon_sym_struct] = ACTIONS(944), + [anon_sym_union] = ACTIONS(944), + [anon_sym_if] = ACTIONS(944), + [anon_sym_else] = ACTIONS(944), + [anon_sym_switch] = ACTIONS(944), + [anon_sym_case] = ACTIONS(944), + [anon_sym_default] = ACTIONS(944), + [anon_sym_while] = ACTIONS(944), + [anon_sym_do] = ACTIONS(944), + [anon_sym_for] = ACTIONS(944), + [anon_sym_return] = ACTIONS(944), + [anon_sym_break] = ACTIONS(944), + [anon_sym_continue] = ACTIONS(944), + [anon_sym_goto] = ACTIONS(944), + [anon_sym_DASH_DASH] = ACTIONS(946), + [anon_sym_PLUS_PLUS] = ACTIONS(946), + [anon_sym_sizeof] = ACTIONS(944), + [sym_number_literal] = ACTIONS(946), + [anon_sym_L_SQUOTE] = ACTIONS(946), + [anon_sym_u_SQUOTE] = ACTIONS(946), + [anon_sym_U_SQUOTE] = ACTIONS(946), + [anon_sym_u8_SQUOTE] = ACTIONS(946), + [anon_sym_SQUOTE] = ACTIONS(946), + [anon_sym_L_DQUOTE] = ACTIONS(946), + [anon_sym_u_DQUOTE] = ACTIONS(946), + [anon_sym_U_DQUOTE] = ACTIONS(946), + [anon_sym_u8_DQUOTE] = ACTIONS(946), + [anon_sym_DQUOTE] = ACTIONS(946), + [sym_true] = ACTIONS(944), + [sym_false] = ACTIONS(944), + [sym_null] = ACTIONS(944), + [sym_comment] = ACTIONS(3), + }, + [292] = { + [sym_attribute_declaration] = STATE(292), + [sym_compound_statement] = STATE(291), + [sym_attributed_statement] = STATE(291), + [sym_labeled_statement] = STATE(291), + [sym_expression_statement] = STATE(291), + [sym_if_statement] = STATE(291), + [sym_switch_statement] = STATE(291), + [sym_case_statement] = STATE(291), + [sym_while_statement] = STATE(291), + [sym_do_statement] = STATE(291), + [sym_for_statement] = STATE(291), + [sym_return_statement] = STATE(291), + [sym_break_statement] = STATE(291), + [sym_continue_statement] = STATE(291), + [sym_goto_statement] = STATE(291), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(292), + [sym_identifier] = ACTIONS(1297), + [anon_sym_LPAREN2] = ACTIONS(1135), + [anon_sym_BANG] = ACTIONS(1138), + [anon_sym_TILDE] = ACTIONS(1138), + [anon_sym_DASH] = ACTIONS(1141), + [anon_sym_PLUS] = ACTIONS(1141), + [anon_sym_STAR] = ACTIONS(1144), + [anon_sym_AMP] = ACTIONS(1144), + [anon_sym_SEMI] = ACTIONS(1300), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1150), + [anon_sym_LBRACE] = ACTIONS(1303), + [anon_sym_if] = ACTIONS(1306), + [anon_sym_switch] = ACTIONS(1309), + [anon_sym_case] = ACTIONS(1312), + [anon_sym_default] = ACTIONS(1315), + [anon_sym_while] = ACTIONS(1318), + [anon_sym_do] = ACTIONS(1321), + [anon_sym_for] = ACTIONS(1324), + [anon_sym_return] = ACTIONS(1327), + [anon_sym_break] = ACTIONS(1330), + [anon_sym_continue] = ACTIONS(1333), + [anon_sym_goto] = ACTIONS(1336), + [anon_sym_DASH_DASH] = ACTIONS(1189), + [anon_sym_PLUS_PLUS] = ACTIONS(1189), + [anon_sym_sizeof] = ACTIONS(1192), + [sym_number_literal] = ACTIONS(1195), + [anon_sym_L_SQUOTE] = ACTIONS(1198), + [anon_sym_u_SQUOTE] = ACTIONS(1198), + [anon_sym_U_SQUOTE] = ACTIONS(1198), + [anon_sym_u8_SQUOTE] = ACTIONS(1198), + [anon_sym_SQUOTE] = ACTIONS(1198), + [anon_sym_L_DQUOTE] = ACTIONS(1201), + [anon_sym_u_DQUOTE] = ACTIONS(1201), + [anon_sym_U_DQUOTE] = ACTIONS(1201), + [anon_sym_u8_DQUOTE] = ACTIONS(1201), + [anon_sym_DQUOTE] = ACTIONS(1201), + [sym_true] = ACTIONS(1204), + [sym_false] = ACTIONS(1204), + [sym_null] = ACTIONS(1204), + [sym_comment] = ACTIONS(3), + }, + [293] = { + [sym_identifier] = ACTIONS(890), + [aux_sym_preproc_include_token1] = ACTIONS(890), + [aux_sym_preproc_def_token1] = ACTIONS(890), + [aux_sym_preproc_if_token1] = ACTIONS(890), + [aux_sym_preproc_ifdef_token1] = ACTIONS(890), + [aux_sym_preproc_ifdef_token2] = ACTIONS(890), + [sym_preproc_directive] = ACTIONS(890), + [anon_sym_LPAREN2] = ACTIONS(892), + [anon_sym_BANG] = ACTIONS(892), + [anon_sym_TILDE] = ACTIONS(892), + [anon_sym_DASH] = ACTIONS(890), + [anon_sym_PLUS] = ACTIONS(890), + [anon_sym_STAR] = ACTIONS(892), + [anon_sym_AMP] = ACTIONS(892), + [anon_sym_SEMI] = ACTIONS(892), + [anon_sym_typedef] = ACTIONS(890), + [anon_sym_extern] = ACTIONS(890), + [anon_sym___attribute__] = ACTIONS(890), + [anon_sym_LBRACK_LBRACK] = ACTIONS(892), + [anon_sym___declspec] = ACTIONS(890), + [anon_sym___cdecl] = ACTIONS(890), + [anon_sym___clrcall] = ACTIONS(890), + [anon_sym___stdcall] = ACTIONS(890), + [anon_sym___fastcall] = ACTIONS(890), + [anon_sym___thiscall] = ACTIONS(890), + [anon_sym___vectorcall] = ACTIONS(890), + [anon_sym_LBRACE] = ACTIONS(892), + [anon_sym_RBRACE] = ACTIONS(892), + [anon_sym_static] = ACTIONS(890), + [anon_sym_auto] = ACTIONS(890), + [anon_sym_register] = ACTIONS(890), + [anon_sym_inline] = ACTIONS(890), + [anon_sym_const] = ACTIONS(890), + [anon_sym_volatile] = ACTIONS(890), + [anon_sym_restrict] = ACTIONS(890), + [anon_sym__Atomic] = ACTIONS(890), + [anon_sym_signed] = ACTIONS(890), + [anon_sym_unsigned] = ACTIONS(890), + [anon_sym_long] = ACTIONS(890), + [anon_sym_short] = ACTIONS(890), + [sym_primitive_type] = ACTIONS(890), + [anon_sym_enum] = ACTIONS(890), + [anon_sym_struct] = ACTIONS(890), + [anon_sym_union] = ACTIONS(890), + [anon_sym_if] = ACTIONS(890), + [anon_sym_else] = ACTIONS(890), + [anon_sym_switch] = ACTIONS(890), + [anon_sym_case] = ACTIONS(890), + [anon_sym_default] = ACTIONS(890), + [anon_sym_while] = ACTIONS(890), + [anon_sym_do] = ACTIONS(890), + [anon_sym_for] = ACTIONS(890), + [anon_sym_return] = ACTIONS(890), + [anon_sym_break] = ACTIONS(890), + [anon_sym_continue] = ACTIONS(890), + [anon_sym_goto] = ACTIONS(890), + [anon_sym_DASH_DASH] = ACTIONS(892), + [anon_sym_PLUS_PLUS] = ACTIONS(892), + [anon_sym_sizeof] = ACTIONS(890), + [sym_number_literal] = ACTIONS(892), + [anon_sym_L_SQUOTE] = ACTIONS(892), + [anon_sym_u_SQUOTE] = ACTIONS(892), + [anon_sym_U_SQUOTE] = ACTIONS(892), + [anon_sym_u8_SQUOTE] = ACTIONS(892), + [anon_sym_SQUOTE] = ACTIONS(892), + [anon_sym_L_DQUOTE] = ACTIONS(892), + [anon_sym_u_DQUOTE] = ACTIONS(892), + [anon_sym_U_DQUOTE] = ACTIONS(892), + [anon_sym_u8_DQUOTE] = ACTIONS(892), + [anon_sym_DQUOTE] = ACTIONS(892), + [sym_true] = ACTIONS(890), + [sym_false] = ACTIONS(890), + [sym_null] = ACTIONS(890), + [sym_comment] = ACTIONS(3), + }, + [294] = { + [sym_identifier] = ACTIONS(890), + [aux_sym_preproc_include_token1] = ACTIONS(890), + [aux_sym_preproc_def_token1] = ACTIONS(890), + [aux_sym_preproc_if_token1] = ACTIONS(890), + [aux_sym_preproc_ifdef_token1] = ACTIONS(890), + [aux_sym_preproc_ifdef_token2] = ACTIONS(890), + [sym_preproc_directive] = ACTIONS(890), + [anon_sym_LPAREN2] = ACTIONS(892), + [anon_sym_BANG] = ACTIONS(892), + [anon_sym_TILDE] = ACTIONS(892), + [anon_sym_DASH] = ACTIONS(890), + [anon_sym_PLUS] = ACTIONS(890), + [anon_sym_STAR] = ACTIONS(892), + [anon_sym_AMP] = ACTIONS(892), + [anon_sym_SEMI] = ACTIONS(892), + [anon_sym_typedef] = ACTIONS(890), + [anon_sym_extern] = ACTIONS(890), + [anon_sym___attribute__] = ACTIONS(890), + [anon_sym_LBRACK_LBRACK] = ACTIONS(892), + [anon_sym___declspec] = ACTIONS(890), + [anon_sym___cdecl] = ACTIONS(890), + [anon_sym___clrcall] = ACTIONS(890), + [anon_sym___stdcall] = ACTIONS(890), + [anon_sym___fastcall] = ACTIONS(890), + [anon_sym___thiscall] = ACTIONS(890), + [anon_sym___vectorcall] = ACTIONS(890), + [anon_sym_LBRACE] = ACTIONS(892), + [anon_sym_RBRACE] = ACTIONS(892), + [anon_sym_static] = ACTIONS(890), + [anon_sym_auto] = ACTIONS(890), + [anon_sym_register] = ACTIONS(890), + [anon_sym_inline] = ACTIONS(890), + [anon_sym_const] = ACTIONS(890), + [anon_sym_volatile] = ACTIONS(890), + [anon_sym_restrict] = ACTIONS(890), + [anon_sym__Atomic] = ACTIONS(890), + [anon_sym_signed] = ACTIONS(890), + [anon_sym_unsigned] = ACTIONS(890), + [anon_sym_long] = ACTIONS(890), + [anon_sym_short] = ACTIONS(890), + [sym_primitive_type] = ACTIONS(890), + [anon_sym_enum] = ACTIONS(890), + [anon_sym_struct] = ACTIONS(890), + [anon_sym_union] = ACTIONS(890), + [anon_sym_if] = ACTIONS(890), + [anon_sym_else] = ACTIONS(890), + [anon_sym_switch] = ACTIONS(890), + [anon_sym_case] = ACTIONS(890), + [anon_sym_default] = ACTIONS(890), + [anon_sym_while] = ACTIONS(890), + [anon_sym_do] = ACTIONS(890), + [anon_sym_for] = ACTIONS(890), + [anon_sym_return] = ACTIONS(890), + [anon_sym_break] = ACTIONS(890), + [anon_sym_continue] = ACTIONS(890), + [anon_sym_goto] = ACTIONS(890), + [anon_sym_DASH_DASH] = ACTIONS(892), + [anon_sym_PLUS_PLUS] = ACTIONS(892), + [anon_sym_sizeof] = ACTIONS(890), + [sym_number_literal] = ACTIONS(892), + [anon_sym_L_SQUOTE] = ACTIONS(892), + [anon_sym_u_SQUOTE] = ACTIONS(892), + [anon_sym_U_SQUOTE] = ACTIONS(892), + [anon_sym_u8_SQUOTE] = ACTIONS(892), + [anon_sym_SQUOTE] = ACTIONS(892), + [anon_sym_L_DQUOTE] = ACTIONS(892), + [anon_sym_u_DQUOTE] = ACTIONS(892), + [anon_sym_U_DQUOTE] = ACTIONS(892), + [anon_sym_u8_DQUOTE] = ACTIONS(892), + [anon_sym_DQUOTE] = ACTIONS(892), + [sym_true] = ACTIONS(890), + [sym_false] = ACTIONS(890), + [sym_null] = ACTIONS(890), + [sym_comment] = ACTIONS(3), + }, + [295] = { + [sym_identifier] = ACTIONS(920), + [aux_sym_preproc_include_token1] = ACTIONS(920), + [aux_sym_preproc_def_token1] = ACTIONS(920), + [aux_sym_preproc_if_token1] = ACTIONS(920), + [aux_sym_preproc_ifdef_token1] = ACTIONS(920), + [aux_sym_preproc_ifdef_token2] = ACTIONS(920), + [sym_preproc_directive] = ACTIONS(920), + [anon_sym_LPAREN2] = ACTIONS(922), + [anon_sym_BANG] = ACTIONS(922), + [anon_sym_TILDE] = ACTIONS(922), + [anon_sym_DASH] = ACTIONS(920), + [anon_sym_PLUS] = ACTIONS(920), + [anon_sym_STAR] = ACTIONS(922), + [anon_sym_AMP] = ACTIONS(922), + [anon_sym_SEMI] = ACTIONS(922), + [anon_sym_typedef] = ACTIONS(920), + [anon_sym_extern] = ACTIONS(920), + [anon_sym___attribute__] = ACTIONS(920), + [anon_sym_LBRACK_LBRACK] = ACTIONS(922), + [anon_sym___declspec] = ACTIONS(920), + [anon_sym___cdecl] = ACTIONS(920), + [anon_sym___clrcall] = ACTIONS(920), + [anon_sym___stdcall] = ACTIONS(920), + [anon_sym___fastcall] = ACTIONS(920), + [anon_sym___thiscall] = ACTIONS(920), + [anon_sym___vectorcall] = ACTIONS(920), + [anon_sym_LBRACE] = ACTIONS(922), + [anon_sym_RBRACE] = ACTIONS(922), + [anon_sym_static] = ACTIONS(920), + [anon_sym_auto] = ACTIONS(920), + [anon_sym_register] = ACTIONS(920), + [anon_sym_inline] = ACTIONS(920), + [anon_sym_const] = ACTIONS(920), + [anon_sym_volatile] = ACTIONS(920), + [anon_sym_restrict] = ACTIONS(920), + [anon_sym__Atomic] = ACTIONS(920), + [anon_sym_signed] = ACTIONS(920), + [anon_sym_unsigned] = ACTIONS(920), + [anon_sym_long] = ACTIONS(920), + [anon_sym_short] = ACTIONS(920), + [sym_primitive_type] = ACTIONS(920), + [anon_sym_enum] = ACTIONS(920), + [anon_sym_struct] = ACTIONS(920), + [anon_sym_union] = ACTIONS(920), + [anon_sym_if] = ACTIONS(920), + [anon_sym_else] = ACTIONS(920), + [anon_sym_switch] = ACTIONS(920), + [anon_sym_case] = ACTIONS(920), + [anon_sym_default] = ACTIONS(920), + [anon_sym_while] = ACTIONS(920), + [anon_sym_do] = ACTIONS(920), + [anon_sym_for] = ACTIONS(920), + [anon_sym_return] = ACTIONS(920), + [anon_sym_break] = ACTIONS(920), + [anon_sym_continue] = ACTIONS(920), + [anon_sym_goto] = ACTIONS(920), + [anon_sym_DASH_DASH] = ACTIONS(922), + [anon_sym_PLUS_PLUS] = ACTIONS(922), + [anon_sym_sizeof] = ACTIONS(920), + [sym_number_literal] = ACTIONS(922), + [anon_sym_L_SQUOTE] = ACTIONS(922), + [anon_sym_u_SQUOTE] = ACTIONS(922), + [anon_sym_U_SQUOTE] = ACTIONS(922), + [anon_sym_u8_SQUOTE] = ACTIONS(922), + [anon_sym_SQUOTE] = ACTIONS(922), + [anon_sym_L_DQUOTE] = ACTIONS(922), + [anon_sym_u_DQUOTE] = ACTIONS(922), + [anon_sym_U_DQUOTE] = ACTIONS(922), + [anon_sym_u8_DQUOTE] = ACTIONS(922), + [anon_sym_DQUOTE] = ACTIONS(922), + [sym_true] = ACTIONS(920), + [sym_false] = ACTIONS(920), + [sym_null] = ACTIONS(920), + [sym_comment] = ACTIONS(3), + }, + [296] = { + [sym_identifier] = ACTIONS(988), + [aux_sym_preproc_include_token1] = ACTIONS(988), + [aux_sym_preproc_def_token1] = ACTIONS(988), + [aux_sym_preproc_if_token1] = ACTIONS(988), + [aux_sym_preproc_if_token2] = ACTIONS(988), + [aux_sym_preproc_ifdef_token1] = ACTIONS(988), + [aux_sym_preproc_ifdef_token2] = ACTIONS(988), + [sym_preproc_directive] = ACTIONS(988), + [anon_sym_LPAREN2] = ACTIONS(990), + [anon_sym_BANG] = ACTIONS(990), + [anon_sym_TILDE] = ACTIONS(990), + [anon_sym_DASH] = ACTIONS(988), + [anon_sym_PLUS] = ACTIONS(988), + [anon_sym_STAR] = ACTIONS(990), + [anon_sym_AMP] = ACTIONS(990), + [anon_sym_SEMI] = ACTIONS(990), + [anon_sym_typedef] = ACTIONS(988), + [anon_sym_extern] = ACTIONS(988), + [anon_sym___attribute__] = ACTIONS(988), + [anon_sym_LBRACK_LBRACK] = ACTIONS(990), + [anon_sym___declspec] = ACTIONS(988), + [anon_sym___cdecl] = ACTIONS(988), + [anon_sym___clrcall] = ACTIONS(988), + [anon_sym___stdcall] = ACTIONS(988), + [anon_sym___fastcall] = ACTIONS(988), + [anon_sym___thiscall] = ACTIONS(988), + [anon_sym___vectorcall] = ACTIONS(988), + [anon_sym_LBRACE] = ACTIONS(990), + [anon_sym_static] = ACTIONS(988), + [anon_sym_auto] = ACTIONS(988), + [anon_sym_register] = ACTIONS(988), + [anon_sym_inline] = ACTIONS(988), + [anon_sym_const] = ACTIONS(988), + [anon_sym_volatile] = ACTIONS(988), + [anon_sym_restrict] = ACTIONS(988), + [anon_sym__Atomic] = ACTIONS(988), + [anon_sym_signed] = ACTIONS(988), + [anon_sym_unsigned] = ACTIONS(988), + [anon_sym_long] = ACTIONS(988), + [anon_sym_short] = ACTIONS(988), + [sym_primitive_type] = ACTIONS(988), + [anon_sym_enum] = ACTIONS(988), + [anon_sym_struct] = ACTIONS(988), + [anon_sym_union] = ACTIONS(988), + [anon_sym_if] = ACTIONS(988), + [anon_sym_else] = ACTIONS(988), + [anon_sym_switch] = ACTIONS(988), + [anon_sym_case] = ACTIONS(988), + [anon_sym_default] = ACTIONS(988), + [anon_sym_while] = ACTIONS(988), + [anon_sym_do] = ACTIONS(988), + [anon_sym_for] = ACTIONS(988), + [anon_sym_return] = ACTIONS(988), + [anon_sym_break] = ACTIONS(988), + [anon_sym_continue] = ACTIONS(988), + [anon_sym_goto] = ACTIONS(988), + [anon_sym_DASH_DASH] = ACTIONS(990), + [anon_sym_PLUS_PLUS] = ACTIONS(990), + [anon_sym_sizeof] = ACTIONS(988), + [sym_number_literal] = ACTIONS(990), + [anon_sym_L_SQUOTE] = ACTIONS(990), + [anon_sym_u_SQUOTE] = ACTIONS(990), + [anon_sym_U_SQUOTE] = ACTIONS(990), + [anon_sym_u8_SQUOTE] = ACTIONS(990), + [anon_sym_SQUOTE] = ACTIONS(990), + [anon_sym_L_DQUOTE] = ACTIONS(990), + [anon_sym_u_DQUOTE] = ACTIONS(990), + [anon_sym_U_DQUOTE] = ACTIONS(990), + [anon_sym_u8_DQUOTE] = ACTIONS(990), + [anon_sym_DQUOTE] = ACTIONS(990), + [sym_true] = ACTIONS(988), + [sym_false] = ACTIONS(988), + [sym_null] = ACTIONS(988), + [sym_comment] = ACTIONS(3), + }, + [297] = { + [sym_identifier] = ACTIONS(914), + [aux_sym_preproc_include_token1] = ACTIONS(914), + [aux_sym_preproc_def_token1] = ACTIONS(914), + [aux_sym_preproc_if_token1] = ACTIONS(914), + [aux_sym_preproc_ifdef_token1] = ACTIONS(914), + [aux_sym_preproc_ifdef_token2] = ACTIONS(914), + [sym_preproc_directive] = ACTIONS(914), + [anon_sym_LPAREN2] = ACTIONS(916), + [anon_sym_BANG] = ACTIONS(916), + [anon_sym_TILDE] = ACTIONS(916), + [anon_sym_DASH] = ACTIONS(914), + [anon_sym_PLUS] = ACTIONS(914), + [anon_sym_STAR] = ACTIONS(916), + [anon_sym_AMP] = ACTIONS(916), + [anon_sym_SEMI] = ACTIONS(916), + [anon_sym_typedef] = ACTIONS(914), + [anon_sym_extern] = ACTIONS(914), + [anon_sym___attribute__] = ACTIONS(914), + [anon_sym_LBRACK_LBRACK] = ACTIONS(916), + [anon_sym___declspec] = ACTIONS(914), + [anon_sym___cdecl] = ACTIONS(914), + [anon_sym___clrcall] = ACTIONS(914), + [anon_sym___stdcall] = ACTIONS(914), + [anon_sym___fastcall] = ACTIONS(914), + [anon_sym___thiscall] = ACTIONS(914), + [anon_sym___vectorcall] = ACTIONS(914), + [anon_sym_LBRACE] = ACTIONS(916), + [anon_sym_RBRACE] = ACTIONS(916), + [anon_sym_static] = ACTIONS(914), + [anon_sym_auto] = ACTIONS(914), + [anon_sym_register] = ACTIONS(914), + [anon_sym_inline] = ACTIONS(914), + [anon_sym_const] = ACTIONS(914), + [anon_sym_volatile] = ACTIONS(914), + [anon_sym_restrict] = ACTIONS(914), + [anon_sym__Atomic] = ACTIONS(914), + [anon_sym_signed] = ACTIONS(914), + [anon_sym_unsigned] = ACTIONS(914), + [anon_sym_long] = ACTIONS(914), + [anon_sym_short] = ACTIONS(914), + [sym_primitive_type] = ACTIONS(914), + [anon_sym_enum] = ACTIONS(914), + [anon_sym_struct] = ACTIONS(914), + [anon_sym_union] = ACTIONS(914), + [anon_sym_if] = ACTIONS(914), + [anon_sym_else] = ACTIONS(1339), + [anon_sym_switch] = ACTIONS(914), + [anon_sym_case] = ACTIONS(914), + [anon_sym_default] = ACTIONS(914), + [anon_sym_while] = ACTIONS(914), + [anon_sym_do] = ACTIONS(914), + [anon_sym_for] = ACTIONS(914), + [anon_sym_return] = ACTIONS(914), + [anon_sym_break] = ACTIONS(914), + [anon_sym_continue] = ACTIONS(914), + [anon_sym_goto] = ACTIONS(914), + [anon_sym_DASH_DASH] = ACTIONS(916), + [anon_sym_PLUS_PLUS] = ACTIONS(916), + [anon_sym_sizeof] = ACTIONS(914), + [sym_number_literal] = ACTIONS(916), + [anon_sym_L_SQUOTE] = ACTIONS(916), + [anon_sym_u_SQUOTE] = ACTIONS(916), + [anon_sym_U_SQUOTE] = ACTIONS(916), + [anon_sym_u8_SQUOTE] = ACTIONS(916), + [anon_sym_SQUOTE] = ACTIONS(916), + [anon_sym_L_DQUOTE] = ACTIONS(916), + [anon_sym_u_DQUOTE] = ACTIONS(916), + [anon_sym_U_DQUOTE] = ACTIONS(916), + [anon_sym_u8_DQUOTE] = ACTIONS(916), + [anon_sym_DQUOTE] = ACTIONS(916), + [sym_true] = ACTIONS(914), + [sym_false] = ACTIONS(914), + [sym_null] = ACTIONS(914), + [sym_comment] = ACTIONS(3), + }, + [298] = { + [sym_identifier] = ACTIONS(992), + [aux_sym_preproc_include_token1] = ACTIONS(992), + [aux_sym_preproc_def_token1] = ACTIONS(992), + [aux_sym_preproc_if_token1] = ACTIONS(992), + [aux_sym_preproc_if_token2] = ACTIONS(992), + [aux_sym_preproc_ifdef_token1] = ACTIONS(992), + [aux_sym_preproc_ifdef_token2] = ACTIONS(992), + [sym_preproc_directive] = ACTIONS(992), + [anon_sym_LPAREN2] = ACTIONS(994), + [anon_sym_BANG] = ACTIONS(994), + [anon_sym_TILDE] = ACTIONS(994), + [anon_sym_DASH] = ACTIONS(992), + [anon_sym_PLUS] = ACTIONS(992), + [anon_sym_STAR] = ACTIONS(994), + [anon_sym_AMP] = ACTIONS(994), + [anon_sym_SEMI] = ACTIONS(994), + [anon_sym_typedef] = ACTIONS(992), + [anon_sym_extern] = ACTIONS(992), + [anon_sym___attribute__] = ACTIONS(992), + [anon_sym_LBRACK_LBRACK] = ACTIONS(994), + [anon_sym___declspec] = ACTIONS(992), + [anon_sym___cdecl] = ACTIONS(992), + [anon_sym___clrcall] = ACTIONS(992), + [anon_sym___stdcall] = ACTIONS(992), + [anon_sym___fastcall] = ACTIONS(992), + [anon_sym___thiscall] = ACTIONS(992), + [anon_sym___vectorcall] = ACTIONS(992), + [anon_sym_LBRACE] = ACTIONS(994), + [anon_sym_static] = ACTIONS(992), + [anon_sym_auto] = ACTIONS(992), + [anon_sym_register] = ACTIONS(992), + [anon_sym_inline] = ACTIONS(992), + [anon_sym_const] = ACTIONS(992), + [anon_sym_volatile] = ACTIONS(992), + [anon_sym_restrict] = ACTIONS(992), + [anon_sym__Atomic] = ACTIONS(992), + [anon_sym_signed] = ACTIONS(992), + [anon_sym_unsigned] = ACTIONS(992), + [anon_sym_long] = ACTIONS(992), + [anon_sym_short] = ACTIONS(992), + [sym_primitive_type] = ACTIONS(992), + [anon_sym_enum] = ACTIONS(992), + [anon_sym_struct] = ACTIONS(992), + [anon_sym_union] = ACTIONS(992), + [anon_sym_if] = ACTIONS(992), + [anon_sym_else] = ACTIONS(992), + [anon_sym_switch] = ACTIONS(992), + [anon_sym_case] = ACTIONS(992), + [anon_sym_default] = ACTIONS(992), + [anon_sym_while] = ACTIONS(992), + [anon_sym_do] = ACTIONS(992), + [anon_sym_for] = ACTIONS(992), + [anon_sym_return] = ACTIONS(992), + [anon_sym_break] = ACTIONS(992), + [anon_sym_continue] = ACTIONS(992), + [anon_sym_goto] = ACTIONS(992), + [anon_sym_DASH_DASH] = ACTIONS(994), + [anon_sym_PLUS_PLUS] = ACTIONS(994), + [anon_sym_sizeof] = ACTIONS(992), + [sym_number_literal] = ACTIONS(994), + [anon_sym_L_SQUOTE] = ACTIONS(994), + [anon_sym_u_SQUOTE] = ACTIONS(994), + [anon_sym_U_SQUOTE] = ACTIONS(994), + [anon_sym_u8_SQUOTE] = ACTIONS(994), + [anon_sym_SQUOTE] = ACTIONS(994), + [anon_sym_L_DQUOTE] = ACTIONS(994), + [anon_sym_u_DQUOTE] = ACTIONS(994), + [anon_sym_U_DQUOTE] = ACTIONS(994), + [anon_sym_u8_DQUOTE] = ACTIONS(994), + [anon_sym_DQUOTE] = ACTIONS(994), + [sym_true] = ACTIONS(992), + [sym_false] = ACTIONS(992), + [sym_null] = ACTIONS(992), + [sym_comment] = ACTIONS(3), + }, + [299] = { + [sym_identifier] = ACTIONS(996), + [aux_sym_preproc_include_token1] = ACTIONS(996), + [aux_sym_preproc_def_token1] = ACTIONS(996), + [aux_sym_preproc_if_token1] = ACTIONS(996), + [aux_sym_preproc_if_token2] = ACTIONS(996), + [aux_sym_preproc_ifdef_token1] = ACTIONS(996), + [aux_sym_preproc_ifdef_token2] = ACTIONS(996), + [sym_preproc_directive] = ACTIONS(996), + [anon_sym_LPAREN2] = ACTIONS(998), + [anon_sym_BANG] = ACTIONS(998), + [anon_sym_TILDE] = ACTIONS(998), + [anon_sym_DASH] = ACTIONS(996), + [anon_sym_PLUS] = ACTIONS(996), + [anon_sym_STAR] = ACTIONS(998), + [anon_sym_AMP] = ACTIONS(998), + [anon_sym_SEMI] = ACTIONS(998), + [anon_sym_typedef] = ACTIONS(996), + [anon_sym_extern] = ACTIONS(996), + [anon_sym___attribute__] = ACTIONS(996), + [anon_sym_LBRACK_LBRACK] = ACTIONS(998), + [anon_sym___declspec] = ACTIONS(996), + [anon_sym___cdecl] = ACTIONS(996), + [anon_sym___clrcall] = ACTIONS(996), + [anon_sym___stdcall] = ACTIONS(996), + [anon_sym___fastcall] = ACTIONS(996), + [anon_sym___thiscall] = ACTIONS(996), + [anon_sym___vectorcall] = ACTIONS(996), + [anon_sym_LBRACE] = ACTIONS(998), + [anon_sym_static] = ACTIONS(996), + [anon_sym_auto] = ACTIONS(996), + [anon_sym_register] = ACTIONS(996), + [anon_sym_inline] = ACTIONS(996), + [anon_sym_const] = ACTIONS(996), + [anon_sym_volatile] = ACTIONS(996), + [anon_sym_restrict] = ACTIONS(996), + [anon_sym__Atomic] = ACTIONS(996), + [anon_sym_signed] = ACTIONS(996), + [anon_sym_unsigned] = ACTIONS(996), + [anon_sym_long] = ACTIONS(996), + [anon_sym_short] = ACTIONS(996), + [sym_primitive_type] = ACTIONS(996), + [anon_sym_enum] = ACTIONS(996), + [anon_sym_struct] = ACTIONS(996), + [anon_sym_union] = ACTIONS(996), + [anon_sym_if] = ACTIONS(996), + [anon_sym_else] = ACTIONS(996), + [anon_sym_switch] = ACTIONS(996), + [anon_sym_case] = ACTIONS(996), + [anon_sym_default] = ACTIONS(996), + [anon_sym_while] = ACTIONS(996), + [anon_sym_do] = ACTIONS(996), + [anon_sym_for] = ACTIONS(996), + [anon_sym_return] = ACTIONS(996), + [anon_sym_break] = ACTIONS(996), + [anon_sym_continue] = ACTIONS(996), + [anon_sym_goto] = ACTIONS(996), + [anon_sym_DASH_DASH] = ACTIONS(998), + [anon_sym_PLUS_PLUS] = ACTIONS(998), + [anon_sym_sizeof] = ACTIONS(996), + [sym_number_literal] = ACTIONS(998), + [anon_sym_L_SQUOTE] = ACTIONS(998), + [anon_sym_u_SQUOTE] = ACTIONS(998), + [anon_sym_U_SQUOTE] = ACTIONS(998), + [anon_sym_u8_SQUOTE] = ACTIONS(998), + [anon_sym_SQUOTE] = ACTIONS(998), + [anon_sym_L_DQUOTE] = ACTIONS(998), + [anon_sym_u_DQUOTE] = ACTIONS(998), + [anon_sym_U_DQUOTE] = ACTIONS(998), + [anon_sym_u8_DQUOTE] = ACTIONS(998), + [anon_sym_DQUOTE] = ACTIONS(998), + [sym_true] = ACTIONS(996), + [sym_false] = ACTIONS(996), + [sym_null] = ACTIONS(996), + [sym_comment] = ACTIONS(3), + }, + [300] = { + [sym_attribute_declaration] = STATE(242), + [sym_compound_statement] = STATE(281), + [sym_attributed_statement] = STATE(281), + [sym_labeled_statement] = STATE(281), + [sym_expression_statement] = STATE(281), + [sym_if_statement] = STATE(281), + [sym_switch_statement] = STATE(281), + [sym_case_statement] = STATE(281), + [sym_while_statement] = STATE(281), + [sym_do_statement] = STATE(281), + [sym_for_statement] = STATE(281), + [sym_return_statement] = STATE(281), + [sym_break_statement] = STATE(281), + [sym_continue_statement] = STATE(281), + [sym_goto_statement] = STATE(281), + [sym__expression] = STATE(709), + [sym_comma_expression] = STATE(1337), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(242), + [sym_identifier] = ACTIONS(1124), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(313), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(319), + [anon_sym_if] = ACTIONS(323), + [anon_sym_switch] = ACTIONS(325), + [anon_sym_case] = ACTIONS(327), + [anon_sym_default] = ACTIONS(329), + [anon_sym_while] = ACTIONS(331), + [anon_sym_do] = ACTIONS(333), + [anon_sym_for] = ACTIONS(335), + [anon_sym_return] = ACTIONS(337), + [anon_sym_break] = ACTIONS(339), + [anon_sym_continue] = ACTIONS(341), + [anon_sym_goto] = ACTIONS(343), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [301] = { + [sym_identifier] = ACTIONS(906), + [aux_sym_preproc_include_token1] = ACTIONS(906), + [aux_sym_preproc_def_token1] = ACTIONS(906), + [aux_sym_preproc_if_token1] = ACTIONS(906), + [aux_sym_preproc_ifdef_token1] = ACTIONS(906), + [aux_sym_preproc_ifdef_token2] = ACTIONS(906), + [sym_preproc_directive] = ACTIONS(906), + [anon_sym_LPAREN2] = ACTIONS(908), + [anon_sym_BANG] = ACTIONS(908), + [anon_sym_TILDE] = ACTIONS(908), + [anon_sym_DASH] = ACTIONS(906), + [anon_sym_PLUS] = ACTIONS(906), + [anon_sym_STAR] = ACTIONS(908), + [anon_sym_AMP] = ACTIONS(908), + [anon_sym_SEMI] = ACTIONS(908), + [anon_sym_typedef] = ACTIONS(906), + [anon_sym_extern] = ACTIONS(906), + [anon_sym___attribute__] = ACTIONS(906), + [anon_sym_LBRACK_LBRACK] = ACTIONS(908), + [anon_sym___declspec] = ACTIONS(906), + [anon_sym___cdecl] = ACTIONS(906), + [anon_sym___clrcall] = ACTIONS(906), + [anon_sym___stdcall] = ACTIONS(906), + [anon_sym___fastcall] = ACTIONS(906), + [anon_sym___thiscall] = ACTIONS(906), + [anon_sym___vectorcall] = ACTIONS(906), + [anon_sym_LBRACE] = ACTIONS(908), + [anon_sym_RBRACE] = ACTIONS(908), + [anon_sym_static] = ACTIONS(906), + [anon_sym_auto] = ACTIONS(906), + [anon_sym_register] = ACTIONS(906), + [anon_sym_inline] = ACTIONS(906), + [anon_sym_const] = ACTIONS(906), + [anon_sym_volatile] = ACTIONS(906), + [anon_sym_restrict] = ACTIONS(906), + [anon_sym__Atomic] = ACTIONS(906), + [anon_sym_signed] = ACTIONS(906), + [anon_sym_unsigned] = ACTIONS(906), + [anon_sym_long] = ACTIONS(906), + [anon_sym_short] = ACTIONS(906), + [sym_primitive_type] = ACTIONS(906), + [anon_sym_enum] = ACTIONS(906), + [anon_sym_struct] = ACTIONS(906), + [anon_sym_union] = ACTIONS(906), + [anon_sym_if] = ACTIONS(906), + [anon_sym_else] = ACTIONS(906), + [anon_sym_switch] = ACTIONS(906), + [anon_sym_case] = ACTIONS(906), + [anon_sym_default] = ACTIONS(906), + [anon_sym_while] = ACTIONS(906), + [anon_sym_do] = ACTIONS(906), + [anon_sym_for] = ACTIONS(906), + [anon_sym_return] = ACTIONS(906), + [anon_sym_break] = ACTIONS(906), + [anon_sym_continue] = ACTIONS(906), + [anon_sym_goto] = ACTIONS(906), + [anon_sym_DASH_DASH] = ACTIONS(908), + [anon_sym_PLUS_PLUS] = ACTIONS(908), + [anon_sym_sizeof] = ACTIONS(906), + [sym_number_literal] = ACTIONS(908), + [anon_sym_L_SQUOTE] = ACTIONS(908), + [anon_sym_u_SQUOTE] = ACTIONS(908), + [anon_sym_U_SQUOTE] = ACTIONS(908), + [anon_sym_u8_SQUOTE] = ACTIONS(908), + [anon_sym_SQUOTE] = ACTIONS(908), + [anon_sym_L_DQUOTE] = ACTIONS(908), + [anon_sym_u_DQUOTE] = ACTIONS(908), + [anon_sym_U_DQUOTE] = ACTIONS(908), + [anon_sym_u8_DQUOTE] = ACTIONS(908), + [anon_sym_DQUOTE] = ACTIONS(908), + [sym_true] = ACTIONS(906), + [sym_false] = ACTIONS(906), + [sym_null] = ACTIONS(906), + [sym_comment] = ACTIONS(3), + }, + [302] = { + [sym_attribute_declaration] = STATE(153), + [sym_compound_statement] = STATE(290), + [sym_attributed_statement] = STATE(290), + [sym_labeled_statement] = STATE(290), + [sym_expression_statement] = STATE(290), + [sym_if_statement] = STATE(290), + [sym_switch_statement] = STATE(290), + [sym_case_statement] = STATE(290), + [sym_while_statement] = STATE(290), + [sym_do_statement] = STATE(290), + [sym_for_statement] = STATE(290), + [sym_return_statement] = STATE(290), + [sym_break_statement] = STATE(290), + [sym_continue_statement] = STATE(290), + [sym_goto_statement] = STATE(290), + [sym__expression] = STATE(748), + [sym_comma_expression] = STATE(1321), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [aux_sym_attributed_declarator_repeat1] = STATE(153), + [sym_identifier] = ACTIONS(1207), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(505), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), + [anon_sym_LBRACE] = ACTIONS(511), + [anon_sym_if] = ACTIONS(513), + [anon_sym_switch] = ACTIONS(515), + [anon_sym_case] = ACTIONS(517), + [anon_sym_default] = ACTIONS(519), + [anon_sym_while] = ACTIONS(521), + [anon_sym_do] = ACTIONS(523), + [anon_sym_for] = ACTIONS(525), + [anon_sym_return] = ACTIONS(527), + [anon_sym_break] = ACTIONS(529), + [anon_sym_continue] = ACTIONS(531), + [anon_sym_goto] = ACTIONS(533), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [303] = { + [sym_identifier] = ACTIONS(902), + [aux_sym_preproc_include_token1] = ACTIONS(902), + [aux_sym_preproc_def_token1] = ACTIONS(902), + [aux_sym_preproc_if_token1] = ACTIONS(902), + [aux_sym_preproc_ifdef_token1] = ACTIONS(902), + [aux_sym_preproc_ifdef_token2] = ACTIONS(902), + [sym_preproc_directive] = ACTIONS(902), + [anon_sym_LPAREN2] = ACTIONS(904), + [anon_sym_BANG] = ACTIONS(904), + [anon_sym_TILDE] = ACTIONS(904), + [anon_sym_DASH] = ACTIONS(902), + [anon_sym_PLUS] = ACTIONS(902), + [anon_sym_STAR] = ACTIONS(904), + [anon_sym_AMP] = ACTIONS(904), + [anon_sym_SEMI] = ACTIONS(904), + [anon_sym_typedef] = ACTIONS(902), + [anon_sym_extern] = ACTIONS(902), + [anon_sym___attribute__] = ACTIONS(902), + [anon_sym_LBRACK_LBRACK] = ACTIONS(904), + [anon_sym___declspec] = ACTIONS(902), + [anon_sym___cdecl] = ACTIONS(902), + [anon_sym___clrcall] = ACTIONS(902), + [anon_sym___stdcall] = ACTIONS(902), + [anon_sym___fastcall] = ACTIONS(902), + [anon_sym___thiscall] = ACTIONS(902), + [anon_sym___vectorcall] = ACTIONS(902), + [anon_sym_LBRACE] = ACTIONS(904), + [anon_sym_RBRACE] = ACTIONS(904), + [anon_sym_static] = ACTIONS(902), + [anon_sym_auto] = ACTIONS(902), + [anon_sym_register] = ACTIONS(902), + [anon_sym_inline] = ACTIONS(902), + [anon_sym_const] = ACTIONS(902), + [anon_sym_volatile] = ACTIONS(902), + [anon_sym_restrict] = ACTIONS(902), + [anon_sym__Atomic] = ACTIONS(902), + [anon_sym_signed] = ACTIONS(902), + [anon_sym_unsigned] = ACTIONS(902), + [anon_sym_long] = ACTIONS(902), + [anon_sym_short] = ACTIONS(902), + [sym_primitive_type] = ACTIONS(902), + [anon_sym_enum] = ACTIONS(902), + [anon_sym_struct] = ACTIONS(902), + [anon_sym_union] = ACTIONS(902), + [anon_sym_if] = ACTIONS(902), + [anon_sym_else] = ACTIONS(902), + [anon_sym_switch] = ACTIONS(902), + [anon_sym_case] = ACTIONS(902), + [anon_sym_default] = ACTIONS(902), + [anon_sym_while] = ACTIONS(902), + [anon_sym_do] = ACTIONS(902), + [anon_sym_for] = ACTIONS(902), + [anon_sym_return] = ACTIONS(902), + [anon_sym_break] = ACTIONS(902), + [anon_sym_continue] = ACTIONS(902), + [anon_sym_goto] = ACTIONS(902), + [anon_sym_DASH_DASH] = ACTIONS(904), + [anon_sym_PLUS_PLUS] = ACTIONS(904), + [anon_sym_sizeof] = ACTIONS(902), + [sym_number_literal] = ACTIONS(904), + [anon_sym_L_SQUOTE] = ACTIONS(904), + [anon_sym_u_SQUOTE] = ACTIONS(904), + [anon_sym_U_SQUOTE] = ACTIONS(904), + [anon_sym_u8_SQUOTE] = ACTIONS(904), + [anon_sym_SQUOTE] = ACTIONS(904), + [anon_sym_L_DQUOTE] = ACTIONS(904), + [anon_sym_u_DQUOTE] = ACTIONS(904), + [anon_sym_U_DQUOTE] = ACTIONS(904), + [anon_sym_u8_DQUOTE] = ACTIONS(904), + [anon_sym_DQUOTE] = ACTIONS(904), + [sym_true] = ACTIONS(902), + [sym_false] = ACTIONS(902), + [sym_null] = ACTIONS(902), + [sym_comment] = ACTIONS(3), + }, + [304] = { + [sym_identifier] = ACTIONS(910), + [aux_sym_preproc_include_token1] = ACTIONS(910), + [aux_sym_preproc_def_token1] = ACTIONS(910), + [aux_sym_preproc_if_token1] = ACTIONS(910), + [aux_sym_preproc_ifdef_token1] = ACTIONS(910), + [aux_sym_preproc_ifdef_token2] = ACTIONS(910), + [sym_preproc_directive] = ACTIONS(910), + [anon_sym_LPAREN2] = ACTIONS(912), + [anon_sym_BANG] = ACTIONS(912), + [anon_sym_TILDE] = ACTIONS(912), + [anon_sym_DASH] = ACTIONS(910), + [anon_sym_PLUS] = ACTIONS(910), + [anon_sym_STAR] = ACTIONS(912), + [anon_sym_AMP] = ACTIONS(912), + [anon_sym_SEMI] = ACTIONS(912), + [anon_sym_typedef] = ACTIONS(910), + [anon_sym_extern] = ACTIONS(910), + [anon_sym___attribute__] = ACTIONS(910), + [anon_sym_LBRACK_LBRACK] = ACTIONS(912), + [anon_sym___declspec] = ACTIONS(910), + [anon_sym___cdecl] = ACTIONS(910), + [anon_sym___clrcall] = ACTIONS(910), + [anon_sym___stdcall] = ACTIONS(910), + [anon_sym___fastcall] = ACTIONS(910), + [anon_sym___thiscall] = ACTIONS(910), + [anon_sym___vectorcall] = ACTIONS(910), + [anon_sym_LBRACE] = ACTIONS(912), + [anon_sym_RBRACE] = ACTIONS(912), + [anon_sym_static] = ACTIONS(910), + [anon_sym_auto] = ACTIONS(910), + [anon_sym_register] = ACTIONS(910), + [anon_sym_inline] = ACTIONS(910), + [anon_sym_const] = ACTIONS(910), + [anon_sym_volatile] = ACTIONS(910), + [anon_sym_restrict] = ACTIONS(910), + [anon_sym__Atomic] = ACTIONS(910), + [anon_sym_signed] = ACTIONS(910), + [anon_sym_unsigned] = ACTIONS(910), + [anon_sym_long] = ACTIONS(910), + [anon_sym_short] = ACTIONS(910), + [sym_primitive_type] = ACTIONS(910), + [anon_sym_enum] = ACTIONS(910), + [anon_sym_struct] = ACTIONS(910), + [anon_sym_union] = ACTIONS(910), + [anon_sym_if] = ACTIONS(910), + [anon_sym_else] = ACTIONS(910), + [anon_sym_switch] = ACTIONS(910), + [anon_sym_case] = ACTIONS(910), + [anon_sym_default] = ACTIONS(910), + [anon_sym_while] = ACTIONS(910), + [anon_sym_do] = ACTIONS(910), + [anon_sym_for] = ACTIONS(910), + [anon_sym_return] = ACTIONS(910), + [anon_sym_break] = ACTIONS(910), + [anon_sym_continue] = ACTIONS(910), + [anon_sym_goto] = ACTIONS(910), + [anon_sym_DASH_DASH] = ACTIONS(912), + [anon_sym_PLUS_PLUS] = ACTIONS(912), + [anon_sym_sizeof] = ACTIONS(910), + [sym_number_literal] = ACTIONS(912), + [anon_sym_L_SQUOTE] = ACTIONS(912), + [anon_sym_u_SQUOTE] = ACTIONS(912), + [anon_sym_U_SQUOTE] = ACTIONS(912), + [anon_sym_u8_SQUOTE] = ACTIONS(912), + [anon_sym_SQUOTE] = ACTIONS(912), + [anon_sym_L_DQUOTE] = ACTIONS(912), + [anon_sym_u_DQUOTE] = ACTIONS(912), + [anon_sym_U_DQUOTE] = ACTIONS(912), + [anon_sym_u8_DQUOTE] = ACTIONS(912), + [anon_sym_DQUOTE] = ACTIONS(912), + [sym_true] = ACTIONS(910), + [sym_false] = ACTIONS(910), + [sym_null] = ACTIONS(910), + [sym_comment] = ACTIONS(3), + }, + [305] = { + [sym_identifier] = ACTIONS(948), + [aux_sym_preproc_include_token1] = ACTIONS(948), + [aux_sym_preproc_def_token1] = ACTIONS(948), + [aux_sym_preproc_if_token1] = ACTIONS(948), + [aux_sym_preproc_ifdef_token1] = ACTIONS(948), + [aux_sym_preproc_ifdef_token2] = ACTIONS(948), + [sym_preproc_directive] = ACTIONS(948), + [anon_sym_LPAREN2] = ACTIONS(950), + [anon_sym_BANG] = ACTIONS(950), + [anon_sym_TILDE] = ACTIONS(950), + [anon_sym_DASH] = ACTIONS(948), + [anon_sym_PLUS] = ACTIONS(948), + [anon_sym_STAR] = ACTIONS(950), + [anon_sym_AMP] = ACTIONS(950), + [anon_sym_SEMI] = ACTIONS(950), + [anon_sym_typedef] = ACTIONS(948), + [anon_sym_extern] = ACTIONS(948), + [anon_sym___attribute__] = ACTIONS(948), + [anon_sym_LBRACK_LBRACK] = ACTIONS(950), + [anon_sym___declspec] = ACTIONS(948), + [anon_sym___cdecl] = ACTIONS(948), + [anon_sym___clrcall] = ACTIONS(948), + [anon_sym___stdcall] = ACTIONS(948), + [anon_sym___fastcall] = ACTIONS(948), + [anon_sym___thiscall] = ACTIONS(948), + [anon_sym___vectorcall] = ACTIONS(948), + [anon_sym_LBRACE] = ACTIONS(950), + [anon_sym_RBRACE] = ACTIONS(950), + [anon_sym_static] = ACTIONS(948), + [anon_sym_auto] = ACTIONS(948), + [anon_sym_register] = ACTIONS(948), + [anon_sym_inline] = ACTIONS(948), + [anon_sym_const] = ACTIONS(948), + [anon_sym_volatile] = ACTIONS(948), + [anon_sym_restrict] = ACTIONS(948), + [anon_sym__Atomic] = ACTIONS(948), + [anon_sym_signed] = ACTIONS(948), + [anon_sym_unsigned] = ACTIONS(948), + [anon_sym_long] = ACTIONS(948), + [anon_sym_short] = ACTIONS(948), + [sym_primitive_type] = ACTIONS(948), + [anon_sym_enum] = ACTIONS(948), + [anon_sym_struct] = ACTIONS(948), + [anon_sym_union] = ACTIONS(948), + [anon_sym_if] = ACTIONS(948), + [anon_sym_else] = ACTIONS(948), + [anon_sym_switch] = ACTIONS(948), + [anon_sym_case] = ACTIONS(948), + [anon_sym_default] = ACTIONS(948), + [anon_sym_while] = ACTIONS(948), + [anon_sym_do] = ACTIONS(948), + [anon_sym_for] = ACTIONS(948), + [anon_sym_return] = ACTIONS(948), + [anon_sym_break] = ACTIONS(948), + [anon_sym_continue] = ACTIONS(948), + [anon_sym_goto] = ACTIONS(948), + [anon_sym_DASH_DASH] = ACTIONS(950), + [anon_sym_PLUS_PLUS] = ACTIONS(950), + [anon_sym_sizeof] = ACTIONS(948), + [sym_number_literal] = ACTIONS(950), + [anon_sym_L_SQUOTE] = ACTIONS(950), + [anon_sym_u_SQUOTE] = ACTIONS(950), + [anon_sym_U_SQUOTE] = ACTIONS(950), + [anon_sym_u8_SQUOTE] = ACTIONS(950), + [anon_sym_SQUOTE] = ACTIONS(950), + [anon_sym_L_DQUOTE] = ACTIONS(950), + [anon_sym_u_DQUOTE] = ACTIONS(950), + [anon_sym_U_DQUOTE] = ACTIONS(950), + [anon_sym_u8_DQUOTE] = ACTIONS(950), + [anon_sym_DQUOTE] = ACTIONS(950), + [sym_true] = ACTIONS(948), + [sym_false] = ACTIONS(948), + [sym_null] = ACTIONS(948), + [sym_comment] = ACTIONS(3), + }, + [306] = { + [sym_identifier] = ACTIONS(1016), + [aux_sym_preproc_include_token1] = ACTIONS(1016), + [aux_sym_preproc_def_token1] = ACTIONS(1016), + [aux_sym_preproc_if_token1] = ACTIONS(1016), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1016), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1016), + [sym_preproc_directive] = ACTIONS(1016), + [anon_sym_LPAREN2] = ACTIONS(1018), + [anon_sym_BANG] = ACTIONS(1018), + [anon_sym_TILDE] = ACTIONS(1018), + [anon_sym_DASH] = ACTIONS(1016), + [anon_sym_PLUS] = ACTIONS(1016), + [anon_sym_STAR] = ACTIONS(1018), + [anon_sym_AMP] = ACTIONS(1018), + [anon_sym_SEMI] = ACTIONS(1018), + [anon_sym_typedef] = ACTIONS(1016), + [anon_sym_extern] = ACTIONS(1016), + [anon_sym___attribute__] = ACTIONS(1016), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1018), + [anon_sym___declspec] = ACTIONS(1016), + [anon_sym___cdecl] = ACTIONS(1016), + [anon_sym___clrcall] = ACTIONS(1016), + [anon_sym___stdcall] = ACTIONS(1016), + [anon_sym___fastcall] = ACTIONS(1016), + [anon_sym___thiscall] = ACTIONS(1016), + [anon_sym___vectorcall] = ACTIONS(1016), + [anon_sym_LBRACE] = ACTIONS(1018), + [anon_sym_RBRACE] = ACTIONS(1018), + [anon_sym_static] = ACTIONS(1016), + [anon_sym_auto] = ACTIONS(1016), + [anon_sym_register] = ACTIONS(1016), + [anon_sym_inline] = ACTIONS(1016), + [anon_sym_const] = ACTIONS(1016), + [anon_sym_volatile] = ACTIONS(1016), + [anon_sym_restrict] = ACTIONS(1016), + [anon_sym__Atomic] = ACTIONS(1016), + [anon_sym_signed] = ACTIONS(1016), + [anon_sym_unsigned] = ACTIONS(1016), + [anon_sym_long] = ACTIONS(1016), + [anon_sym_short] = ACTIONS(1016), + [sym_primitive_type] = ACTIONS(1016), + [anon_sym_enum] = ACTIONS(1016), + [anon_sym_struct] = ACTIONS(1016), + [anon_sym_union] = ACTIONS(1016), + [anon_sym_if] = ACTIONS(1016), + [anon_sym_else] = ACTIONS(1016), + [anon_sym_switch] = ACTIONS(1016), + [anon_sym_case] = ACTIONS(1016), + [anon_sym_default] = ACTIONS(1016), + [anon_sym_while] = ACTIONS(1016), + [anon_sym_do] = ACTIONS(1016), + [anon_sym_for] = ACTIONS(1016), + [anon_sym_return] = ACTIONS(1016), + [anon_sym_break] = ACTIONS(1016), + [anon_sym_continue] = ACTIONS(1016), + [anon_sym_goto] = ACTIONS(1016), + [anon_sym_DASH_DASH] = ACTIONS(1018), + [anon_sym_PLUS_PLUS] = ACTIONS(1018), + [anon_sym_sizeof] = ACTIONS(1016), + [sym_number_literal] = ACTIONS(1018), + [anon_sym_L_SQUOTE] = ACTIONS(1018), + [anon_sym_u_SQUOTE] = ACTIONS(1018), + [anon_sym_U_SQUOTE] = ACTIONS(1018), + [anon_sym_u8_SQUOTE] = ACTIONS(1018), + [anon_sym_SQUOTE] = ACTIONS(1018), + [anon_sym_L_DQUOTE] = ACTIONS(1018), + [anon_sym_u_DQUOTE] = ACTIONS(1018), + [anon_sym_U_DQUOTE] = ACTIONS(1018), + [anon_sym_u8_DQUOTE] = ACTIONS(1018), + [anon_sym_DQUOTE] = ACTIONS(1018), + [sym_true] = ACTIONS(1016), + [sym_false] = ACTIONS(1016), + [sym_null] = ACTIONS(1016), + [sym_comment] = ACTIONS(3), + }, + [307] = { + [sym_identifier] = ACTIONS(960), + [aux_sym_preproc_include_token1] = ACTIONS(960), + [aux_sym_preproc_def_token1] = ACTIONS(960), + [aux_sym_preproc_if_token1] = ACTIONS(960), + [aux_sym_preproc_ifdef_token1] = ACTIONS(960), + [aux_sym_preproc_ifdef_token2] = ACTIONS(960), + [sym_preproc_directive] = ACTIONS(960), + [anon_sym_LPAREN2] = ACTIONS(962), + [anon_sym_BANG] = ACTIONS(962), + [anon_sym_TILDE] = ACTIONS(962), + [anon_sym_DASH] = ACTIONS(960), + [anon_sym_PLUS] = ACTIONS(960), + [anon_sym_STAR] = ACTIONS(962), + [anon_sym_AMP] = ACTIONS(962), + [anon_sym_SEMI] = ACTIONS(962), + [anon_sym_typedef] = ACTIONS(960), + [anon_sym_extern] = ACTIONS(960), + [anon_sym___attribute__] = ACTIONS(960), + [anon_sym_LBRACK_LBRACK] = ACTIONS(962), + [anon_sym___declspec] = ACTIONS(960), + [anon_sym___cdecl] = ACTIONS(960), + [anon_sym___clrcall] = ACTIONS(960), + [anon_sym___stdcall] = ACTIONS(960), + [anon_sym___fastcall] = ACTIONS(960), + [anon_sym___thiscall] = ACTIONS(960), + [anon_sym___vectorcall] = ACTIONS(960), + [anon_sym_LBRACE] = ACTIONS(962), + [anon_sym_RBRACE] = ACTIONS(962), + [anon_sym_static] = ACTIONS(960), + [anon_sym_auto] = ACTIONS(960), + [anon_sym_register] = ACTIONS(960), + [anon_sym_inline] = ACTIONS(960), + [anon_sym_const] = ACTIONS(960), + [anon_sym_volatile] = ACTIONS(960), + [anon_sym_restrict] = ACTIONS(960), + [anon_sym__Atomic] = ACTIONS(960), + [anon_sym_signed] = ACTIONS(960), + [anon_sym_unsigned] = ACTIONS(960), + [anon_sym_long] = ACTIONS(960), + [anon_sym_short] = ACTIONS(960), + [sym_primitive_type] = ACTIONS(960), + [anon_sym_enum] = ACTIONS(960), + [anon_sym_struct] = ACTIONS(960), + [anon_sym_union] = ACTIONS(960), + [anon_sym_if] = ACTIONS(960), + [anon_sym_else] = ACTIONS(960), + [anon_sym_switch] = ACTIONS(960), + [anon_sym_case] = ACTIONS(960), + [anon_sym_default] = ACTIONS(960), + [anon_sym_while] = ACTIONS(960), + [anon_sym_do] = ACTIONS(960), + [anon_sym_for] = ACTIONS(960), + [anon_sym_return] = ACTIONS(960), + [anon_sym_break] = ACTIONS(960), + [anon_sym_continue] = ACTIONS(960), + [anon_sym_goto] = ACTIONS(960), + [anon_sym_DASH_DASH] = ACTIONS(962), + [anon_sym_PLUS_PLUS] = ACTIONS(962), + [anon_sym_sizeof] = ACTIONS(960), + [sym_number_literal] = ACTIONS(962), + [anon_sym_L_SQUOTE] = ACTIONS(962), + [anon_sym_u_SQUOTE] = ACTIONS(962), + [anon_sym_U_SQUOTE] = ACTIONS(962), + [anon_sym_u8_SQUOTE] = ACTIONS(962), + [anon_sym_SQUOTE] = ACTIONS(962), + [anon_sym_L_DQUOTE] = ACTIONS(962), + [anon_sym_u_DQUOTE] = ACTIONS(962), + [anon_sym_U_DQUOTE] = ACTIONS(962), + [anon_sym_u8_DQUOTE] = ACTIONS(962), + [anon_sym_DQUOTE] = ACTIONS(962), + [sym_true] = ACTIONS(960), + [sym_false] = ACTIONS(960), + [sym_null] = ACTIONS(960), + [sym_comment] = ACTIONS(3), + }, + [308] = { + [sym_identifier] = ACTIONS(898), + [aux_sym_preproc_include_token1] = ACTIONS(898), + [aux_sym_preproc_def_token1] = ACTIONS(898), + [aux_sym_preproc_if_token1] = ACTIONS(898), + [aux_sym_preproc_ifdef_token1] = ACTIONS(898), + [aux_sym_preproc_ifdef_token2] = ACTIONS(898), + [sym_preproc_directive] = ACTIONS(898), + [anon_sym_LPAREN2] = ACTIONS(900), + [anon_sym_BANG] = ACTIONS(900), + [anon_sym_TILDE] = ACTIONS(900), + [anon_sym_DASH] = ACTIONS(898), + [anon_sym_PLUS] = ACTIONS(898), + [anon_sym_STAR] = ACTIONS(900), + [anon_sym_AMP] = ACTIONS(900), + [anon_sym_SEMI] = ACTIONS(900), + [anon_sym_typedef] = ACTIONS(898), + [anon_sym_extern] = ACTIONS(898), + [anon_sym___attribute__] = ACTIONS(898), + [anon_sym_LBRACK_LBRACK] = ACTIONS(900), + [anon_sym___declspec] = ACTIONS(898), + [anon_sym___cdecl] = ACTIONS(898), + [anon_sym___clrcall] = ACTIONS(898), + [anon_sym___stdcall] = ACTIONS(898), + [anon_sym___fastcall] = ACTIONS(898), + [anon_sym___thiscall] = ACTIONS(898), + [anon_sym___vectorcall] = ACTIONS(898), + [anon_sym_LBRACE] = ACTIONS(900), + [anon_sym_RBRACE] = ACTIONS(900), + [anon_sym_static] = ACTIONS(898), + [anon_sym_auto] = ACTIONS(898), + [anon_sym_register] = ACTIONS(898), + [anon_sym_inline] = ACTIONS(898), + [anon_sym_const] = ACTIONS(898), + [anon_sym_volatile] = ACTIONS(898), + [anon_sym_restrict] = ACTIONS(898), + [anon_sym__Atomic] = ACTIONS(898), + [anon_sym_signed] = ACTIONS(898), + [anon_sym_unsigned] = ACTIONS(898), + [anon_sym_long] = ACTIONS(898), + [anon_sym_short] = ACTIONS(898), + [sym_primitive_type] = ACTIONS(898), + [anon_sym_enum] = ACTIONS(898), + [anon_sym_struct] = ACTIONS(898), + [anon_sym_union] = ACTIONS(898), + [anon_sym_if] = ACTIONS(898), + [anon_sym_else] = ACTIONS(898), + [anon_sym_switch] = ACTIONS(898), + [anon_sym_case] = ACTIONS(898), + [anon_sym_default] = ACTIONS(898), + [anon_sym_while] = ACTIONS(898), + [anon_sym_do] = ACTIONS(898), + [anon_sym_for] = ACTIONS(898), + [anon_sym_return] = ACTIONS(898), + [anon_sym_break] = ACTIONS(898), + [anon_sym_continue] = ACTIONS(898), + [anon_sym_goto] = ACTIONS(898), + [anon_sym_DASH_DASH] = ACTIONS(900), + [anon_sym_PLUS_PLUS] = ACTIONS(900), + [anon_sym_sizeof] = ACTIONS(898), + [sym_number_literal] = ACTIONS(900), + [anon_sym_L_SQUOTE] = ACTIONS(900), + [anon_sym_u_SQUOTE] = ACTIONS(900), + [anon_sym_U_SQUOTE] = ACTIONS(900), + [anon_sym_u8_SQUOTE] = ACTIONS(900), + [anon_sym_SQUOTE] = ACTIONS(900), + [anon_sym_L_DQUOTE] = ACTIONS(900), + [anon_sym_u_DQUOTE] = ACTIONS(900), + [anon_sym_U_DQUOTE] = ACTIONS(900), + [anon_sym_u8_DQUOTE] = ACTIONS(900), + [anon_sym_DQUOTE] = ACTIONS(900), + [sym_true] = ACTIONS(898), + [sym_false] = ACTIONS(898), + [sym_null] = ACTIONS(898), + [sym_comment] = ACTIONS(3), + }, + [309] = { + [sym_identifier] = ACTIONS(898), + [aux_sym_preproc_include_token1] = ACTIONS(898), + [aux_sym_preproc_def_token1] = ACTIONS(898), + [aux_sym_preproc_if_token1] = ACTIONS(898), + [aux_sym_preproc_ifdef_token1] = ACTIONS(898), + [aux_sym_preproc_ifdef_token2] = ACTIONS(898), + [sym_preproc_directive] = ACTIONS(898), + [anon_sym_LPAREN2] = ACTIONS(900), + [anon_sym_BANG] = ACTIONS(900), + [anon_sym_TILDE] = ACTIONS(900), + [anon_sym_DASH] = ACTIONS(898), + [anon_sym_PLUS] = ACTIONS(898), + [anon_sym_STAR] = ACTIONS(900), + [anon_sym_AMP] = ACTIONS(900), + [anon_sym_SEMI] = ACTIONS(900), + [anon_sym_typedef] = ACTIONS(898), + [anon_sym_extern] = ACTIONS(898), + [anon_sym___attribute__] = ACTIONS(898), + [anon_sym_LBRACK_LBRACK] = ACTIONS(900), + [anon_sym___declspec] = ACTIONS(898), + [anon_sym___cdecl] = ACTIONS(898), + [anon_sym___clrcall] = ACTIONS(898), + [anon_sym___stdcall] = ACTIONS(898), + [anon_sym___fastcall] = ACTIONS(898), + [anon_sym___thiscall] = ACTIONS(898), + [anon_sym___vectorcall] = ACTIONS(898), + [anon_sym_LBRACE] = ACTIONS(900), + [anon_sym_RBRACE] = ACTIONS(900), + [anon_sym_static] = ACTIONS(898), + [anon_sym_auto] = ACTIONS(898), + [anon_sym_register] = ACTIONS(898), + [anon_sym_inline] = ACTIONS(898), + [anon_sym_const] = ACTIONS(898), + [anon_sym_volatile] = ACTIONS(898), + [anon_sym_restrict] = ACTIONS(898), + [anon_sym__Atomic] = ACTIONS(898), + [anon_sym_signed] = ACTIONS(898), + [anon_sym_unsigned] = ACTIONS(898), + [anon_sym_long] = ACTIONS(898), + [anon_sym_short] = ACTIONS(898), + [sym_primitive_type] = ACTIONS(898), + [anon_sym_enum] = ACTIONS(898), + [anon_sym_struct] = ACTIONS(898), + [anon_sym_union] = ACTIONS(898), + [anon_sym_if] = ACTIONS(898), + [anon_sym_else] = ACTIONS(898), + [anon_sym_switch] = ACTIONS(898), + [anon_sym_case] = ACTIONS(898), + [anon_sym_default] = ACTIONS(898), + [anon_sym_while] = ACTIONS(898), + [anon_sym_do] = ACTIONS(898), + [anon_sym_for] = ACTIONS(898), + [anon_sym_return] = ACTIONS(898), + [anon_sym_break] = ACTIONS(898), + [anon_sym_continue] = ACTIONS(898), + [anon_sym_goto] = ACTIONS(898), + [anon_sym_DASH_DASH] = ACTIONS(900), + [anon_sym_PLUS_PLUS] = ACTIONS(900), + [anon_sym_sizeof] = ACTIONS(898), + [sym_number_literal] = ACTIONS(900), + [anon_sym_L_SQUOTE] = ACTIONS(900), + [anon_sym_u_SQUOTE] = ACTIONS(900), + [anon_sym_U_SQUOTE] = ACTIONS(900), + [anon_sym_u8_SQUOTE] = ACTIONS(900), + [anon_sym_SQUOTE] = ACTIONS(900), + [anon_sym_L_DQUOTE] = ACTIONS(900), + [anon_sym_u_DQUOTE] = ACTIONS(900), + [anon_sym_U_DQUOTE] = ACTIONS(900), + [anon_sym_u8_DQUOTE] = ACTIONS(900), + [anon_sym_DQUOTE] = ACTIONS(900), + [sym_true] = ACTIONS(898), + [sym_false] = ACTIONS(898), + [sym_null] = ACTIONS(898), + [sym_comment] = ACTIONS(3), + }, + [310] = { + [ts_builtin_sym_end] = ACTIONS(1078), + [sym_identifier] = ACTIONS(1076), + [aux_sym_preproc_include_token1] = ACTIONS(1076), + [aux_sym_preproc_def_token1] = ACTIONS(1076), + [aux_sym_preproc_if_token1] = ACTIONS(1076), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1076), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1076), + [sym_preproc_directive] = ACTIONS(1076), + [anon_sym_LPAREN2] = ACTIONS(1078), + [anon_sym_BANG] = ACTIONS(1078), + [anon_sym_TILDE] = ACTIONS(1078), + [anon_sym_DASH] = ACTIONS(1076), + [anon_sym_PLUS] = ACTIONS(1076), + [anon_sym_STAR] = ACTIONS(1078), + [anon_sym_AMP] = ACTIONS(1078), + [anon_sym_SEMI] = ACTIONS(1078), + [anon_sym_typedef] = ACTIONS(1076), + [anon_sym_extern] = ACTIONS(1076), + [anon_sym___attribute__] = ACTIONS(1076), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1078), + [anon_sym___declspec] = ACTIONS(1076), + [anon_sym___cdecl] = ACTIONS(1076), + [anon_sym___clrcall] = ACTIONS(1076), + [anon_sym___stdcall] = ACTIONS(1076), + [anon_sym___fastcall] = ACTIONS(1076), + [anon_sym___thiscall] = ACTIONS(1076), + [anon_sym___vectorcall] = ACTIONS(1076), + [anon_sym_LBRACE] = ACTIONS(1078), + [anon_sym_static] = ACTIONS(1076), + [anon_sym_auto] = ACTIONS(1076), + [anon_sym_register] = ACTIONS(1076), + [anon_sym_inline] = ACTIONS(1076), + [anon_sym_const] = ACTIONS(1076), + [anon_sym_volatile] = ACTIONS(1076), + [anon_sym_restrict] = ACTIONS(1076), + [anon_sym__Atomic] = ACTIONS(1076), + [anon_sym_signed] = ACTIONS(1076), + [anon_sym_unsigned] = ACTIONS(1076), + [anon_sym_long] = ACTIONS(1076), + [anon_sym_short] = ACTIONS(1076), + [sym_primitive_type] = ACTIONS(1076), + [anon_sym_enum] = ACTIONS(1076), + [anon_sym_struct] = ACTIONS(1076), + [anon_sym_union] = ACTIONS(1076), + [anon_sym_if] = ACTIONS(1076), + [anon_sym_switch] = ACTIONS(1076), + [anon_sym_case] = ACTIONS(1076), + [anon_sym_default] = ACTIONS(1076), + [anon_sym_while] = ACTIONS(1076), + [anon_sym_do] = ACTIONS(1076), + [anon_sym_for] = ACTIONS(1076), + [anon_sym_return] = ACTIONS(1076), + [anon_sym_break] = ACTIONS(1076), + [anon_sym_continue] = ACTIONS(1076), + [anon_sym_goto] = ACTIONS(1076), + [anon_sym_DASH_DASH] = ACTIONS(1078), + [anon_sym_PLUS_PLUS] = ACTIONS(1078), + [anon_sym_sizeof] = ACTIONS(1076), + [sym_number_literal] = ACTIONS(1078), + [anon_sym_L_SQUOTE] = ACTIONS(1078), + [anon_sym_u_SQUOTE] = ACTIONS(1078), + [anon_sym_U_SQUOTE] = ACTIONS(1078), + [anon_sym_u8_SQUOTE] = ACTIONS(1078), + [anon_sym_SQUOTE] = ACTIONS(1078), + [anon_sym_L_DQUOTE] = ACTIONS(1078), + [anon_sym_u_DQUOTE] = ACTIONS(1078), + [anon_sym_U_DQUOTE] = ACTIONS(1078), + [anon_sym_u8_DQUOTE] = ACTIONS(1078), + [anon_sym_DQUOTE] = ACTIONS(1078), + [sym_true] = ACTIONS(1076), + [sym_false] = ACTIONS(1076), + [sym_null] = ACTIONS(1076), + [sym_comment] = ACTIONS(3), + }, + [311] = { + [sym_identifier] = ACTIONS(1028), + [aux_sym_preproc_include_token1] = ACTIONS(1028), + [aux_sym_preproc_def_token1] = ACTIONS(1028), + [aux_sym_preproc_if_token1] = ACTIONS(1028), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1028), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1028), + [sym_preproc_directive] = ACTIONS(1028), + [anon_sym_LPAREN2] = ACTIONS(1030), + [anon_sym_BANG] = ACTIONS(1030), + [anon_sym_TILDE] = ACTIONS(1030), + [anon_sym_DASH] = ACTIONS(1028), + [anon_sym_PLUS] = ACTIONS(1028), + [anon_sym_STAR] = ACTIONS(1030), + [anon_sym_AMP] = ACTIONS(1030), + [anon_sym_SEMI] = ACTIONS(1030), + [anon_sym_typedef] = ACTIONS(1028), + [anon_sym_extern] = ACTIONS(1028), + [anon_sym___attribute__] = ACTIONS(1028), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1030), + [anon_sym___declspec] = ACTIONS(1028), + [anon_sym___cdecl] = ACTIONS(1028), + [anon_sym___clrcall] = ACTIONS(1028), + [anon_sym___stdcall] = ACTIONS(1028), + [anon_sym___fastcall] = ACTIONS(1028), + [anon_sym___thiscall] = ACTIONS(1028), + [anon_sym___vectorcall] = ACTIONS(1028), + [anon_sym_LBRACE] = ACTIONS(1030), + [anon_sym_RBRACE] = ACTIONS(1030), + [anon_sym_static] = ACTIONS(1028), + [anon_sym_auto] = ACTIONS(1028), + [anon_sym_register] = ACTIONS(1028), + [anon_sym_inline] = ACTIONS(1028), + [anon_sym_const] = ACTIONS(1028), + [anon_sym_volatile] = ACTIONS(1028), + [anon_sym_restrict] = ACTIONS(1028), + [anon_sym__Atomic] = ACTIONS(1028), + [anon_sym_signed] = ACTIONS(1028), + [anon_sym_unsigned] = ACTIONS(1028), + [anon_sym_long] = ACTIONS(1028), + [anon_sym_short] = ACTIONS(1028), + [sym_primitive_type] = ACTIONS(1028), + [anon_sym_enum] = ACTIONS(1028), + [anon_sym_struct] = ACTIONS(1028), + [anon_sym_union] = ACTIONS(1028), + [anon_sym_if] = ACTIONS(1028), + [anon_sym_switch] = ACTIONS(1028), + [anon_sym_case] = ACTIONS(1028), + [anon_sym_default] = ACTIONS(1028), + [anon_sym_while] = ACTIONS(1028), + [anon_sym_do] = ACTIONS(1028), + [anon_sym_for] = ACTIONS(1028), + [anon_sym_return] = ACTIONS(1028), + [anon_sym_break] = ACTIONS(1028), + [anon_sym_continue] = ACTIONS(1028), + [anon_sym_goto] = ACTIONS(1028), + [anon_sym_DASH_DASH] = ACTIONS(1030), + [anon_sym_PLUS_PLUS] = ACTIONS(1030), + [anon_sym_sizeof] = ACTIONS(1028), + [sym_number_literal] = ACTIONS(1030), + [anon_sym_L_SQUOTE] = ACTIONS(1030), + [anon_sym_u_SQUOTE] = ACTIONS(1030), + [anon_sym_U_SQUOTE] = ACTIONS(1030), + [anon_sym_u8_SQUOTE] = ACTIONS(1030), + [anon_sym_SQUOTE] = ACTIONS(1030), + [anon_sym_L_DQUOTE] = ACTIONS(1030), + [anon_sym_u_DQUOTE] = ACTIONS(1030), + [anon_sym_U_DQUOTE] = ACTIONS(1030), + [anon_sym_u8_DQUOTE] = ACTIONS(1030), + [anon_sym_DQUOTE] = ACTIONS(1030), + [sym_true] = ACTIONS(1028), + [sym_false] = ACTIONS(1028), + [sym_null] = ACTIONS(1028), + [sym_comment] = ACTIONS(3), + }, + [312] = { + [sym_identifier] = ACTIONS(1068), + [aux_sym_preproc_include_token1] = ACTIONS(1068), + [aux_sym_preproc_def_token1] = ACTIONS(1068), + [aux_sym_preproc_if_token1] = ACTIONS(1068), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1068), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1068), + [sym_preproc_directive] = ACTIONS(1068), + [anon_sym_LPAREN2] = ACTIONS(1070), + [anon_sym_BANG] = ACTIONS(1070), + [anon_sym_TILDE] = ACTIONS(1070), + [anon_sym_DASH] = ACTIONS(1068), + [anon_sym_PLUS] = ACTIONS(1068), + [anon_sym_STAR] = ACTIONS(1070), + [anon_sym_AMP] = ACTIONS(1070), + [anon_sym_SEMI] = ACTIONS(1070), + [anon_sym_typedef] = ACTIONS(1068), + [anon_sym_extern] = ACTIONS(1068), + [anon_sym___attribute__] = ACTIONS(1068), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1070), + [anon_sym___declspec] = ACTIONS(1068), + [anon_sym___cdecl] = ACTIONS(1068), + [anon_sym___clrcall] = ACTIONS(1068), + [anon_sym___stdcall] = ACTIONS(1068), + [anon_sym___fastcall] = ACTIONS(1068), + [anon_sym___thiscall] = ACTIONS(1068), + [anon_sym___vectorcall] = ACTIONS(1068), + [anon_sym_LBRACE] = ACTIONS(1070), + [anon_sym_RBRACE] = ACTIONS(1070), + [anon_sym_static] = ACTIONS(1068), + [anon_sym_auto] = ACTIONS(1068), + [anon_sym_register] = ACTIONS(1068), + [anon_sym_inline] = ACTIONS(1068), + [anon_sym_const] = ACTIONS(1068), + [anon_sym_volatile] = ACTIONS(1068), + [anon_sym_restrict] = ACTIONS(1068), + [anon_sym__Atomic] = ACTIONS(1068), + [anon_sym_signed] = ACTIONS(1068), + [anon_sym_unsigned] = ACTIONS(1068), + [anon_sym_long] = ACTIONS(1068), + [anon_sym_short] = ACTIONS(1068), + [sym_primitive_type] = ACTIONS(1068), + [anon_sym_enum] = ACTIONS(1068), + [anon_sym_struct] = ACTIONS(1068), + [anon_sym_union] = ACTIONS(1068), + [anon_sym_if] = ACTIONS(1068), + [anon_sym_switch] = ACTIONS(1068), + [anon_sym_case] = ACTIONS(1068), + [anon_sym_default] = ACTIONS(1068), + [anon_sym_while] = ACTIONS(1068), + [anon_sym_do] = ACTIONS(1068), + [anon_sym_for] = ACTIONS(1068), + [anon_sym_return] = ACTIONS(1068), + [anon_sym_break] = ACTIONS(1068), + [anon_sym_continue] = ACTIONS(1068), + [anon_sym_goto] = ACTIONS(1068), + [anon_sym_DASH_DASH] = ACTIONS(1070), + [anon_sym_PLUS_PLUS] = ACTIONS(1070), + [anon_sym_sizeof] = ACTIONS(1068), + [sym_number_literal] = ACTIONS(1070), + [anon_sym_L_SQUOTE] = ACTIONS(1070), + [anon_sym_u_SQUOTE] = ACTIONS(1070), + [anon_sym_U_SQUOTE] = ACTIONS(1070), + [anon_sym_u8_SQUOTE] = ACTIONS(1070), + [anon_sym_SQUOTE] = ACTIONS(1070), + [anon_sym_L_DQUOTE] = ACTIONS(1070), + [anon_sym_u_DQUOTE] = ACTIONS(1070), + [anon_sym_U_DQUOTE] = ACTIONS(1070), + [anon_sym_u8_DQUOTE] = ACTIONS(1070), + [anon_sym_DQUOTE] = ACTIONS(1070), + [sym_true] = ACTIONS(1068), + [sym_false] = ACTIONS(1068), + [sym_null] = ACTIONS(1068), + [sym_comment] = ACTIONS(3), + }, + [313] = { + [sym_identifier] = ACTIONS(1092), + [aux_sym_preproc_include_token1] = ACTIONS(1092), + [aux_sym_preproc_def_token1] = ACTIONS(1092), + [aux_sym_preproc_if_token1] = ACTIONS(1092), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1092), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1092), + [sym_preproc_directive] = ACTIONS(1092), + [anon_sym_LPAREN2] = ACTIONS(1094), + [anon_sym_BANG] = ACTIONS(1094), + [anon_sym_TILDE] = ACTIONS(1094), + [anon_sym_DASH] = ACTIONS(1092), + [anon_sym_PLUS] = ACTIONS(1092), + [anon_sym_STAR] = ACTIONS(1094), + [anon_sym_AMP] = ACTIONS(1094), + [anon_sym_SEMI] = ACTIONS(1094), + [anon_sym_typedef] = ACTIONS(1092), + [anon_sym_extern] = ACTIONS(1092), + [anon_sym___attribute__] = ACTIONS(1092), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1094), + [anon_sym___declspec] = ACTIONS(1092), + [anon_sym___cdecl] = ACTIONS(1092), + [anon_sym___clrcall] = ACTIONS(1092), + [anon_sym___stdcall] = ACTIONS(1092), + [anon_sym___fastcall] = ACTIONS(1092), + [anon_sym___thiscall] = ACTIONS(1092), + [anon_sym___vectorcall] = ACTIONS(1092), + [anon_sym_LBRACE] = ACTIONS(1094), + [anon_sym_RBRACE] = ACTIONS(1094), + [anon_sym_static] = ACTIONS(1092), + [anon_sym_auto] = ACTIONS(1092), + [anon_sym_register] = ACTIONS(1092), + [anon_sym_inline] = ACTIONS(1092), + [anon_sym_const] = ACTIONS(1092), + [anon_sym_volatile] = ACTIONS(1092), + [anon_sym_restrict] = ACTIONS(1092), + [anon_sym__Atomic] = ACTIONS(1092), + [anon_sym_signed] = ACTIONS(1092), + [anon_sym_unsigned] = ACTIONS(1092), + [anon_sym_long] = ACTIONS(1092), + [anon_sym_short] = ACTIONS(1092), + [sym_primitive_type] = ACTIONS(1092), + [anon_sym_enum] = ACTIONS(1092), + [anon_sym_struct] = ACTIONS(1092), + [anon_sym_union] = ACTIONS(1092), + [anon_sym_if] = ACTIONS(1092), + [anon_sym_switch] = ACTIONS(1092), + [anon_sym_case] = ACTIONS(1092), + [anon_sym_default] = ACTIONS(1092), + [anon_sym_while] = ACTIONS(1092), + [anon_sym_do] = ACTIONS(1092), + [anon_sym_for] = ACTIONS(1092), + [anon_sym_return] = ACTIONS(1092), + [anon_sym_break] = ACTIONS(1092), + [anon_sym_continue] = ACTIONS(1092), + [anon_sym_goto] = ACTIONS(1092), + [anon_sym_DASH_DASH] = ACTIONS(1094), + [anon_sym_PLUS_PLUS] = ACTIONS(1094), + [anon_sym_sizeof] = ACTIONS(1092), + [sym_number_literal] = ACTIONS(1094), + [anon_sym_L_SQUOTE] = ACTIONS(1094), + [anon_sym_u_SQUOTE] = ACTIONS(1094), + [anon_sym_U_SQUOTE] = ACTIONS(1094), + [anon_sym_u8_SQUOTE] = ACTIONS(1094), + [anon_sym_SQUOTE] = ACTIONS(1094), + [anon_sym_L_DQUOTE] = ACTIONS(1094), + [anon_sym_u_DQUOTE] = ACTIONS(1094), + [anon_sym_U_DQUOTE] = ACTIONS(1094), + [anon_sym_u8_DQUOTE] = ACTIONS(1094), + [anon_sym_DQUOTE] = ACTIONS(1094), + [sym_true] = ACTIONS(1092), + [sym_false] = ACTIONS(1092), + [sym_null] = ACTIONS(1092), + [sym_comment] = ACTIONS(3), + }, + [314] = { + [ts_builtin_sym_end] = ACTIONS(1086), + [sym_identifier] = ACTIONS(1084), + [aux_sym_preproc_include_token1] = ACTIONS(1084), + [aux_sym_preproc_def_token1] = ACTIONS(1084), + [aux_sym_preproc_if_token1] = ACTIONS(1084), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1084), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1084), + [sym_preproc_directive] = ACTIONS(1084), + [anon_sym_LPAREN2] = ACTIONS(1086), + [anon_sym_BANG] = ACTIONS(1086), + [anon_sym_TILDE] = ACTIONS(1086), + [anon_sym_DASH] = ACTIONS(1084), + [anon_sym_PLUS] = ACTIONS(1084), + [anon_sym_STAR] = ACTIONS(1086), + [anon_sym_AMP] = ACTIONS(1086), + [anon_sym_SEMI] = ACTIONS(1086), + [anon_sym_typedef] = ACTIONS(1084), + [anon_sym_extern] = ACTIONS(1084), + [anon_sym___attribute__] = ACTIONS(1084), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1086), + [anon_sym___declspec] = ACTIONS(1084), + [anon_sym___cdecl] = ACTIONS(1084), + [anon_sym___clrcall] = ACTIONS(1084), + [anon_sym___stdcall] = ACTIONS(1084), + [anon_sym___fastcall] = ACTIONS(1084), + [anon_sym___thiscall] = ACTIONS(1084), + [anon_sym___vectorcall] = ACTIONS(1084), + [anon_sym_LBRACE] = ACTIONS(1086), + [anon_sym_static] = ACTIONS(1084), + [anon_sym_auto] = ACTIONS(1084), + [anon_sym_register] = ACTIONS(1084), + [anon_sym_inline] = ACTIONS(1084), + [anon_sym_const] = ACTIONS(1084), + [anon_sym_volatile] = ACTIONS(1084), + [anon_sym_restrict] = ACTIONS(1084), + [anon_sym__Atomic] = ACTIONS(1084), + [anon_sym_signed] = ACTIONS(1084), + [anon_sym_unsigned] = ACTIONS(1084), + [anon_sym_long] = ACTIONS(1084), + [anon_sym_short] = ACTIONS(1084), + [sym_primitive_type] = ACTIONS(1084), + [anon_sym_enum] = ACTIONS(1084), + [anon_sym_struct] = ACTIONS(1084), + [anon_sym_union] = ACTIONS(1084), + [anon_sym_if] = ACTIONS(1084), + [anon_sym_switch] = ACTIONS(1084), + [anon_sym_case] = ACTIONS(1084), + [anon_sym_default] = ACTIONS(1084), + [anon_sym_while] = ACTIONS(1084), + [anon_sym_do] = ACTIONS(1084), + [anon_sym_for] = ACTIONS(1084), + [anon_sym_return] = ACTIONS(1084), + [anon_sym_break] = ACTIONS(1084), + [anon_sym_continue] = ACTIONS(1084), + [anon_sym_goto] = ACTIONS(1084), + [anon_sym_DASH_DASH] = ACTIONS(1086), + [anon_sym_PLUS_PLUS] = ACTIONS(1086), + [anon_sym_sizeof] = ACTIONS(1084), + [sym_number_literal] = ACTIONS(1086), + [anon_sym_L_SQUOTE] = ACTIONS(1086), + [anon_sym_u_SQUOTE] = ACTIONS(1086), + [anon_sym_U_SQUOTE] = ACTIONS(1086), + [anon_sym_u8_SQUOTE] = ACTIONS(1086), + [anon_sym_SQUOTE] = ACTIONS(1086), + [anon_sym_L_DQUOTE] = ACTIONS(1086), + [anon_sym_u_DQUOTE] = ACTIONS(1086), + [anon_sym_U_DQUOTE] = ACTIONS(1086), + [anon_sym_u8_DQUOTE] = ACTIONS(1086), + [anon_sym_DQUOTE] = ACTIONS(1086), + [sym_true] = ACTIONS(1084), + [sym_false] = ACTIONS(1084), + [sym_null] = ACTIONS(1084), + [sym_comment] = ACTIONS(3), + }, + [315] = { + [sym_identifier] = ACTIONS(1084), + [aux_sym_preproc_include_token1] = ACTIONS(1084), + [aux_sym_preproc_def_token1] = ACTIONS(1084), + [aux_sym_preproc_if_token1] = ACTIONS(1084), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1084), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1084), + [sym_preproc_directive] = ACTIONS(1084), + [anon_sym_LPAREN2] = ACTIONS(1086), + [anon_sym_BANG] = ACTIONS(1086), + [anon_sym_TILDE] = ACTIONS(1086), + [anon_sym_DASH] = ACTIONS(1084), + [anon_sym_PLUS] = ACTIONS(1084), + [anon_sym_STAR] = ACTIONS(1086), + [anon_sym_AMP] = ACTIONS(1086), + [anon_sym_SEMI] = ACTIONS(1086), + [anon_sym_typedef] = ACTIONS(1084), + [anon_sym_extern] = ACTIONS(1084), + [anon_sym___attribute__] = ACTIONS(1084), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1086), + [anon_sym___declspec] = ACTIONS(1084), + [anon_sym___cdecl] = ACTIONS(1084), + [anon_sym___clrcall] = ACTIONS(1084), + [anon_sym___stdcall] = ACTIONS(1084), + [anon_sym___fastcall] = ACTIONS(1084), + [anon_sym___thiscall] = ACTIONS(1084), + [anon_sym___vectorcall] = ACTIONS(1084), + [anon_sym_LBRACE] = ACTIONS(1086), + [anon_sym_RBRACE] = ACTIONS(1086), + [anon_sym_static] = ACTIONS(1084), + [anon_sym_auto] = ACTIONS(1084), + [anon_sym_register] = ACTIONS(1084), + [anon_sym_inline] = ACTIONS(1084), + [anon_sym_const] = ACTIONS(1084), + [anon_sym_volatile] = ACTIONS(1084), + [anon_sym_restrict] = ACTIONS(1084), + [anon_sym__Atomic] = ACTIONS(1084), + [anon_sym_signed] = ACTIONS(1084), + [anon_sym_unsigned] = ACTIONS(1084), + [anon_sym_long] = ACTIONS(1084), + [anon_sym_short] = ACTIONS(1084), + [sym_primitive_type] = ACTIONS(1084), + [anon_sym_enum] = ACTIONS(1084), + [anon_sym_struct] = ACTIONS(1084), + [anon_sym_union] = ACTIONS(1084), + [anon_sym_if] = ACTIONS(1084), + [anon_sym_switch] = ACTIONS(1084), + [anon_sym_case] = ACTIONS(1084), + [anon_sym_default] = ACTIONS(1084), + [anon_sym_while] = ACTIONS(1084), + [anon_sym_do] = ACTIONS(1084), + [anon_sym_for] = ACTIONS(1084), + [anon_sym_return] = ACTIONS(1084), + [anon_sym_break] = ACTIONS(1084), + [anon_sym_continue] = ACTIONS(1084), + [anon_sym_goto] = ACTIONS(1084), + [anon_sym_DASH_DASH] = ACTIONS(1086), + [anon_sym_PLUS_PLUS] = ACTIONS(1086), + [anon_sym_sizeof] = ACTIONS(1084), + [sym_number_literal] = ACTIONS(1086), + [anon_sym_L_SQUOTE] = ACTIONS(1086), + [anon_sym_u_SQUOTE] = ACTIONS(1086), + [anon_sym_U_SQUOTE] = ACTIONS(1086), + [anon_sym_u8_SQUOTE] = ACTIONS(1086), + [anon_sym_SQUOTE] = ACTIONS(1086), + [anon_sym_L_DQUOTE] = ACTIONS(1086), + [anon_sym_u_DQUOTE] = ACTIONS(1086), + [anon_sym_U_DQUOTE] = ACTIONS(1086), + [anon_sym_u8_DQUOTE] = ACTIONS(1086), + [anon_sym_DQUOTE] = ACTIONS(1086), + [sym_true] = ACTIONS(1084), + [sym_false] = ACTIONS(1084), + [sym_null] = ACTIONS(1084), + [sym_comment] = ACTIONS(3), + }, + [316] = { + [sym_identifier] = ACTIONS(1032), + [aux_sym_preproc_include_token1] = ACTIONS(1032), + [aux_sym_preproc_def_token1] = ACTIONS(1032), + [aux_sym_preproc_if_token1] = ACTIONS(1032), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1032), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1032), + [sym_preproc_directive] = ACTIONS(1032), + [anon_sym_LPAREN2] = ACTIONS(1034), + [anon_sym_BANG] = ACTIONS(1034), + [anon_sym_TILDE] = ACTIONS(1034), + [anon_sym_DASH] = ACTIONS(1032), + [anon_sym_PLUS] = ACTIONS(1032), + [anon_sym_STAR] = ACTIONS(1034), + [anon_sym_AMP] = ACTIONS(1034), + [anon_sym_SEMI] = ACTIONS(1034), + [anon_sym_typedef] = ACTIONS(1032), + [anon_sym_extern] = ACTIONS(1032), + [anon_sym___attribute__] = ACTIONS(1032), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1034), + [anon_sym___declspec] = ACTIONS(1032), + [anon_sym___cdecl] = ACTIONS(1032), + [anon_sym___clrcall] = ACTIONS(1032), + [anon_sym___stdcall] = ACTIONS(1032), + [anon_sym___fastcall] = ACTIONS(1032), + [anon_sym___thiscall] = ACTIONS(1032), + [anon_sym___vectorcall] = ACTIONS(1032), + [anon_sym_LBRACE] = ACTIONS(1034), + [anon_sym_RBRACE] = ACTIONS(1034), + [anon_sym_static] = ACTIONS(1032), + [anon_sym_auto] = ACTIONS(1032), + [anon_sym_register] = ACTIONS(1032), + [anon_sym_inline] = ACTIONS(1032), + [anon_sym_const] = ACTIONS(1032), + [anon_sym_volatile] = ACTIONS(1032), + [anon_sym_restrict] = ACTIONS(1032), + [anon_sym__Atomic] = ACTIONS(1032), + [anon_sym_signed] = ACTIONS(1032), + [anon_sym_unsigned] = ACTIONS(1032), + [anon_sym_long] = ACTIONS(1032), + [anon_sym_short] = ACTIONS(1032), + [sym_primitive_type] = ACTIONS(1032), + [anon_sym_enum] = ACTIONS(1032), + [anon_sym_struct] = ACTIONS(1032), + [anon_sym_union] = ACTIONS(1032), + [anon_sym_if] = ACTIONS(1032), + [anon_sym_switch] = ACTIONS(1032), + [anon_sym_case] = ACTIONS(1032), + [anon_sym_default] = ACTIONS(1032), + [anon_sym_while] = ACTIONS(1032), + [anon_sym_do] = ACTIONS(1032), + [anon_sym_for] = ACTIONS(1032), + [anon_sym_return] = ACTIONS(1032), + [anon_sym_break] = ACTIONS(1032), + [anon_sym_continue] = ACTIONS(1032), + [anon_sym_goto] = ACTIONS(1032), + [anon_sym_DASH_DASH] = ACTIONS(1034), + [anon_sym_PLUS_PLUS] = ACTIONS(1034), + [anon_sym_sizeof] = ACTIONS(1032), + [sym_number_literal] = ACTIONS(1034), + [anon_sym_L_SQUOTE] = ACTIONS(1034), + [anon_sym_u_SQUOTE] = ACTIONS(1034), + [anon_sym_U_SQUOTE] = ACTIONS(1034), + [anon_sym_u8_SQUOTE] = ACTIONS(1034), + [anon_sym_SQUOTE] = ACTIONS(1034), + [anon_sym_L_DQUOTE] = ACTIONS(1034), + [anon_sym_u_DQUOTE] = ACTIONS(1034), + [anon_sym_U_DQUOTE] = ACTIONS(1034), + [anon_sym_u8_DQUOTE] = ACTIONS(1034), + [anon_sym_DQUOTE] = ACTIONS(1034), + [sym_true] = ACTIONS(1032), + [sym_false] = ACTIONS(1032), + [sym_null] = ACTIONS(1032), + [sym_comment] = ACTIONS(3), + }, + [317] = { + [sym_identifier] = ACTIONS(1120), + [aux_sym_preproc_include_token1] = ACTIONS(1120), + [aux_sym_preproc_def_token1] = ACTIONS(1120), + [aux_sym_preproc_if_token1] = ACTIONS(1120), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1120), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1120), + [sym_preproc_directive] = ACTIONS(1120), + [anon_sym_LPAREN2] = ACTIONS(1122), + [anon_sym_BANG] = ACTIONS(1122), + [anon_sym_TILDE] = ACTIONS(1122), + [anon_sym_DASH] = ACTIONS(1120), + [anon_sym_PLUS] = ACTIONS(1120), + [anon_sym_STAR] = ACTIONS(1122), + [anon_sym_AMP] = ACTIONS(1122), + [anon_sym_SEMI] = ACTIONS(1122), + [anon_sym_typedef] = ACTIONS(1120), + [anon_sym_extern] = ACTIONS(1120), + [anon_sym___attribute__] = ACTIONS(1120), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1122), + [anon_sym___declspec] = ACTIONS(1120), + [anon_sym___cdecl] = ACTIONS(1120), + [anon_sym___clrcall] = ACTIONS(1120), + [anon_sym___stdcall] = ACTIONS(1120), + [anon_sym___fastcall] = ACTIONS(1120), + [anon_sym___thiscall] = ACTIONS(1120), + [anon_sym___vectorcall] = ACTIONS(1120), + [anon_sym_LBRACE] = ACTIONS(1122), + [anon_sym_RBRACE] = ACTIONS(1122), + [anon_sym_static] = ACTIONS(1120), + [anon_sym_auto] = ACTIONS(1120), + [anon_sym_register] = ACTIONS(1120), + [anon_sym_inline] = ACTIONS(1120), + [anon_sym_const] = ACTIONS(1120), + [anon_sym_volatile] = ACTIONS(1120), + [anon_sym_restrict] = ACTIONS(1120), + [anon_sym__Atomic] = ACTIONS(1120), + [anon_sym_signed] = ACTIONS(1120), + [anon_sym_unsigned] = ACTIONS(1120), + [anon_sym_long] = ACTIONS(1120), + [anon_sym_short] = ACTIONS(1120), + [sym_primitive_type] = ACTIONS(1120), + [anon_sym_enum] = ACTIONS(1120), + [anon_sym_struct] = ACTIONS(1120), + [anon_sym_union] = ACTIONS(1120), + [anon_sym_if] = ACTIONS(1120), + [anon_sym_switch] = ACTIONS(1120), + [anon_sym_case] = ACTIONS(1120), + [anon_sym_default] = ACTIONS(1120), + [anon_sym_while] = ACTIONS(1120), + [anon_sym_do] = ACTIONS(1120), + [anon_sym_for] = ACTIONS(1120), + [anon_sym_return] = ACTIONS(1120), + [anon_sym_break] = ACTIONS(1120), + [anon_sym_continue] = ACTIONS(1120), + [anon_sym_goto] = ACTIONS(1120), + [anon_sym_DASH_DASH] = ACTIONS(1122), + [anon_sym_PLUS_PLUS] = ACTIONS(1122), + [anon_sym_sizeof] = ACTIONS(1120), + [sym_number_literal] = ACTIONS(1122), + [anon_sym_L_SQUOTE] = ACTIONS(1122), + [anon_sym_u_SQUOTE] = ACTIONS(1122), + [anon_sym_U_SQUOTE] = ACTIONS(1122), + [anon_sym_u8_SQUOTE] = ACTIONS(1122), + [anon_sym_SQUOTE] = ACTIONS(1122), + [anon_sym_L_DQUOTE] = ACTIONS(1122), + [anon_sym_u_DQUOTE] = ACTIONS(1122), + [anon_sym_U_DQUOTE] = ACTIONS(1122), + [anon_sym_u8_DQUOTE] = ACTIONS(1122), + [anon_sym_DQUOTE] = ACTIONS(1122), + [sym_true] = ACTIONS(1120), + [sym_false] = ACTIONS(1120), + [sym_null] = ACTIONS(1120), + [sym_comment] = ACTIONS(3), + }, + [318] = { + [sym_identifier] = ACTIONS(1116), + [aux_sym_preproc_include_token1] = ACTIONS(1116), + [aux_sym_preproc_def_token1] = ACTIONS(1116), + [aux_sym_preproc_if_token1] = ACTIONS(1116), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1116), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1116), + [sym_preproc_directive] = ACTIONS(1116), + [anon_sym_LPAREN2] = ACTIONS(1118), + [anon_sym_BANG] = ACTIONS(1118), + [anon_sym_TILDE] = ACTIONS(1118), + [anon_sym_DASH] = ACTIONS(1116), + [anon_sym_PLUS] = ACTIONS(1116), + [anon_sym_STAR] = ACTIONS(1118), + [anon_sym_AMP] = ACTIONS(1118), + [anon_sym_SEMI] = ACTIONS(1118), + [anon_sym_typedef] = ACTIONS(1116), + [anon_sym_extern] = ACTIONS(1116), + [anon_sym___attribute__] = ACTIONS(1116), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1118), + [anon_sym___declspec] = ACTIONS(1116), + [anon_sym___cdecl] = ACTIONS(1116), + [anon_sym___clrcall] = ACTIONS(1116), + [anon_sym___stdcall] = ACTIONS(1116), + [anon_sym___fastcall] = ACTIONS(1116), + [anon_sym___thiscall] = ACTIONS(1116), + [anon_sym___vectorcall] = ACTIONS(1116), + [anon_sym_LBRACE] = ACTIONS(1118), + [anon_sym_RBRACE] = ACTIONS(1118), + [anon_sym_static] = ACTIONS(1116), + [anon_sym_auto] = ACTIONS(1116), + [anon_sym_register] = ACTIONS(1116), + [anon_sym_inline] = ACTIONS(1116), + [anon_sym_const] = ACTIONS(1116), + [anon_sym_volatile] = ACTIONS(1116), + [anon_sym_restrict] = ACTIONS(1116), + [anon_sym__Atomic] = ACTIONS(1116), + [anon_sym_signed] = ACTIONS(1116), + [anon_sym_unsigned] = ACTIONS(1116), + [anon_sym_long] = ACTIONS(1116), + [anon_sym_short] = ACTIONS(1116), + [sym_primitive_type] = ACTIONS(1116), + [anon_sym_enum] = ACTIONS(1116), + [anon_sym_struct] = ACTIONS(1116), + [anon_sym_union] = ACTIONS(1116), + [anon_sym_if] = ACTIONS(1116), + [anon_sym_switch] = ACTIONS(1116), + [anon_sym_case] = ACTIONS(1116), + [anon_sym_default] = ACTIONS(1116), + [anon_sym_while] = ACTIONS(1116), + [anon_sym_do] = ACTIONS(1116), + [anon_sym_for] = ACTIONS(1116), + [anon_sym_return] = ACTIONS(1116), + [anon_sym_break] = ACTIONS(1116), + [anon_sym_continue] = ACTIONS(1116), + [anon_sym_goto] = ACTIONS(1116), + [anon_sym_DASH_DASH] = ACTIONS(1118), + [anon_sym_PLUS_PLUS] = ACTIONS(1118), + [anon_sym_sizeof] = ACTIONS(1116), + [sym_number_literal] = ACTIONS(1118), + [anon_sym_L_SQUOTE] = ACTIONS(1118), + [anon_sym_u_SQUOTE] = ACTIONS(1118), + [anon_sym_U_SQUOTE] = ACTIONS(1118), + [anon_sym_u8_SQUOTE] = ACTIONS(1118), + [anon_sym_SQUOTE] = ACTIONS(1118), + [anon_sym_L_DQUOTE] = ACTIONS(1118), + [anon_sym_u_DQUOTE] = ACTIONS(1118), + [anon_sym_U_DQUOTE] = ACTIONS(1118), + [anon_sym_u8_DQUOTE] = ACTIONS(1118), + [anon_sym_DQUOTE] = ACTIONS(1118), + [sym_true] = ACTIONS(1116), + [sym_false] = ACTIONS(1116), + [sym_null] = ACTIONS(1116), + [sym_comment] = ACTIONS(3), + }, + [319] = { + [sym_identifier] = ACTIONS(1080), + [aux_sym_preproc_include_token1] = ACTIONS(1080), + [aux_sym_preproc_def_token1] = ACTIONS(1080), + [aux_sym_preproc_if_token1] = ACTIONS(1080), + [aux_sym_preproc_if_token2] = ACTIONS(1080), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1080), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1080), + [sym_preproc_directive] = ACTIONS(1080), + [anon_sym_LPAREN2] = ACTIONS(1082), + [anon_sym_BANG] = ACTIONS(1082), + [anon_sym_TILDE] = ACTIONS(1082), + [anon_sym_DASH] = ACTIONS(1080), + [anon_sym_PLUS] = ACTIONS(1080), + [anon_sym_STAR] = ACTIONS(1082), + [anon_sym_AMP] = ACTIONS(1082), + [anon_sym_SEMI] = ACTIONS(1082), + [anon_sym_typedef] = ACTIONS(1080), + [anon_sym_extern] = ACTIONS(1080), + [anon_sym___attribute__] = ACTIONS(1080), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1082), + [anon_sym___declspec] = ACTIONS(1080), + [anon_sym___cdecl] = ACTIONS(1080), + [anon_sym___clrcall] = ACTIONS(1080), + [anon_sym___stdcall] = ACTIONS(1080), + [anon_sym___fastcall] = ACTIONS(1080), + [anon_sym___thiscall] = ACTIONS(1080), + [anon_sym___vectorcall] = ACTIONS(1080), + [anon_sym_LBRACE] = ACTIONS(1082), + [anon_sym_static] = ACTIONS(1080), + [anon_sym_auto] = ACTIONS(1080), + [anon_sym_register] = ACTIONS(1080), + [anon_sym_inline] = ACTIONS(1080), + [anon_sym_const] = ACTIONS(1080), + [anon_sym_volatile] = ACTIONS(1080), + [anon_sym_restrict] = ACTIONS(1080), + [anon_sym__Atomic] = ACTIONS(1080), + [anon_sym_signed] = ACTIONS(1080), + [anon_sym_unsigned] = ACTIONS(1080), + [anon_sym_long] = ACTIONS(1080), + [anon_sym_short] = ACTIONS(1080), + [sym_primitive_type] = ACTIONS(1080), + [anon_sym_enum] = ACTIONS(1080), + [anon_sym_struct] = ACTIONS(1080), + [anon_sym_union] = ACTIONS(1080), + [anon_sym_if] = ACTIONS(1080), + [anon_sym_switch] = ACTIONS(1080), + [anon_sym_case] = ACTIONS(1080), + [anon_sym_default] = ACTIONS(1080), + [anon_sym_while] = ACTIONS(1080), + [anon_sym_do] = ACTIONS(1080), + [anon_sym_for] = ACTIONS(1080), + [anon_sym_return] = ACTIONS(1080), + [anon_sym_break] = ACTIONS(1080), + [anon_sym_continue] = ACTIONS(1080), + [anon_sym_goto] = ACTIONS(1080), + [anon_sym_DASH_DASH] = ACTIONS(1082), + [anon_sym_PLUS_PLUS] = ACTIONS(1082), + [anon_sym_sizeof] = ACTIONS(1080), + [sym_number_literal] = ACTIONS(1082), + [anon_sym_L_SQUOTE] = ACTIONS(1082), + [anon_sym_u_SQUOTE] = ACTIONS(1082), + [anon_sym_U_SQUOTE] = ACTIONS(1082), + [anon_sym_u8_SQUOTE] = ACTIONS(1082), + [anon_sym_SQUOTE] = ACTIONS(1082), + [anon_sym_L_DQUOTE] = ACTIONS(1082), + [anon_sym_u_DQUOTE] = ACTIONS(1082), + [anon_sym_U_DQUOTE] = ACTIONS(1082), + [anon_sym_u8_DQUOTE] = ACTIONS(1082), + [anon_sym_DQUOTE] = ACTIONS(1082), + [sym_true] = ACTIONS(1080), + [sym_false] = ACTIONS(1080), + [sym_null] = ACTIONS(1080), + [sym_comment] = ACTIONS(3), + }, + [320] = { + [sym_identifier] = ACTIONS(1100), + [aux_sym_preproc_include_token1] = ACTIONS(1100), + [aux_sym_preproc_def_token1] = ACTIONS(1100), + [aux_sym_preproc_if_token1] = ACTIONS(1100), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1100), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1100), + [sym_preproc_directive] = ACTIONS(1100), + [anon_sym_LPAREN2] = ACTIONS(1102), + [anon_sym_BANG] = ACTIONS(1102), + [anon_sym_TILDE] = ACTIONS(1102), + [anon_sym_DASH] = ACTIONS(1100), + [anon_sym_PLUS] = ACTIONS(1100), + [anon_sym_STAR] = ACTIONS(1102), + [anon_sym_AMP] = ACTIONS(1102), + [anon_sym_SEMI] = ACTIONS(1102), + [anon_sym_typedef] = ACTIONS(1100), + [anon_sym_extern] = ACTIONS(1100), + [anon_sym___attribute__] = ACTIONS(1100), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1102), + [anon_sym___declspec] = ACTIONS(1100), + [anon_sym___cdecl] = ACTIONS(1100), + [anon_sym___clrcall] = ACTIONS(1100), + [anon_sym___stdcall] = ACTIONS(1100), + [anon_sym___fastcall] = ACTIONS(1100), + [anon_sym___thiscall] = ACTIONS(1100), + [anon_sym___vectorcall] = ACTIONS(1100), + [anon_sym_LBRACE] = ACTIONS(1102), + [anon_sym_RBRACE] = ACTIONS(1102), + [anon_sym_static] = ACTIONS(1100), + [anon_sym_auto] = ACTIONS(1100), + [anon_sym_register] = ACTIONS(1100), + [anon_sym_inline] = ACTIONS(1100), + [anon_sym_const] = ACTIONS(1100), + [anon_sym_volatile] = ACTIONS(1100), + [anon_sym_restrict] = ACTIONS(1100), + [anon_sym__Atomic] = ACTIONS(1100), + [anon_sym_signed] = ACTIONS(1100), + [anon_sym_unsigned] = ACTIONS(1100), + [anon_sym_long] = ACTIONS(1100), + [anon_sym_short] = ACTIONS(1100), + [sym_primitive_type] = ACTIONS(1100), + [anon_sym_enum] = ACTIONS(1100), + [anon_sym_struct] = ACTIONS(1100), + [anon_sym_union] = ACTIONS(1100), + [anon_sym_if] = ACTIONS(1100), + [anon_sym_switch] = ACTIONS(1100), + [anon_sym_case] = ACTIONS(1100), + [anon_sym_default] = ACTIONS(1100), + [anon_sym_while] = ACTIONS(1100), + [anon_sym_do] = ACTIONS(1100), + [anon_sym_for] = ACTIONS(1100), + [anon_sym_return] = ACTIONS(1100), + [anon_sym_break] = ACTIONS(1100), + [anon_sym_continue] = ACTIONS(1100), + [anon_sym_goto] = ACTIONS(1100), + [anon_sym_DASH_DASH] = ACTIONS(1102), + [anon_sym_PLUS_PLUS] = ACTIONS(1102), + [anon_sym_sizeof] = ACTIONS(1100), + [sym_number_literal] = ACTIONS(1102), + [anon_sym_L_SQUOTE] = ACTIONS(1102), + [anon_sym_u_SQUOTE] = ACTIONS(1102), + [anon_sym_U_SQUOTE] = ACTIONS(1102), + [anon_sym_u8_SQUOTE] = ACTIONS(1102), + [anon_sym_SQUOTE] = ACTIONS(1102), + [anon_sym_L_DQUOTE] = ACTIONS(1102), + [anon_sym_u_DQUOTE] = ACTIONS(1102), + [anon_sym_U_DQUOTE] = ACTIONS(1102), + [anon_sym_u8_DQUOTE] = ACTIONS(1102), + [anon_sym_DQUOTE] = ACTIONS(1102), + [sym_true] = ACTIONS(1100), + [sym_false] = ACTIONS(1100), + [sym_null] = ACTIONS(1100), + [sym_comment] = ACTIONS(3), + }, + [321] = { + [sym_identifier] = ACTIONS(1028), + [aux_sym_preproc_include_token1] = ACTIONS(1028), + [aux_sym_preproc_def_token1] = ACTIONS(1028), + [aux_sym_preproc_if_token1] = ACTIONS(1028), + [aux_sym_preproc_if_token2] = ACTIONS(1028), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1028), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1028), + [sym_preproc_directive] = ACTIONS(1028), + [anon_sym_LPAREN2] = ACTIONS(1030), + [anon_sym_BANG] = ACTIONS(1030), + [anon_sym_TILDE] = ACTIONS(1030), + [anon_sym_DASH] = ACTIONS(1028), + [anon_sym_PLUS] = ACTIONS(1028), + [anon_sym_STAR] = ACTIONS(1030), + [anon_sym_AMP] = ACTIONS(1030), + [anon_sym_SEMI] = ACTIONS(1030), + [anon_sym_typedef] = ACTIONS(1028), + [anon_sym_extern] = ACTIONS(1028), + [anon_sym___attribute__] = ACTIONS(1028), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1030), + [anon_sym___declspec] = ACTIONS(1028), + [anon_sym___cdecl] = ACTIONS(1028), + [anon_sym___clrcall] = ACTIONS(1028), + [anon_sym___stdcall] = ACTIONS(1028), + [anon_sym___fastcall] = ACTIONS(1028), + [anon_sym___thiscall] = ACTIONS(1028), + [anon_sym___vectorcall] = ACTIONS(1028), + [anon_sym_LBRACE] = ACTIONS(1030), + [anon_sym_static] = ACTIONS(1028), + [anon_sym_auto] = ACTIONS(1028), + [anon_sym_register] = ACTIONS(1028), + [anon_sym_inline] = ACTIONS(1028), + [anon_sym_const] = ACTIONS(1028), + [anon_sym_volatile] = ACTIONS(1028), + [anon_sym_restrict] = ACTIONS(1028), + [anon_sym__Atomic] = ACTIONS(1028), + [anon_sym_signed] = ACTIONS(1028), + [anon_sym_unsigned] = ACTIONS(1028), + [anon_sym_long] = ACTIONS(1028), + [anon_sym_short] = ACTIONS(1028), + [sym_primitive_type] = ACTIONS(1028), + [anon_sym_enum] = ACTIONS(1028), + [anon_sym_struct] = ACTIONS(1028), + [anon_sym_union] = ACTIONS(1028), + [anon_sym_if] = ACTIONS(1028), + [anon_sym_switch] = ACTIONS(1028), + [anon_sym_case] = ACTIONS(1028), + [anon_sym_default] = ACTIONS(1028), + [anon_sym_while] = ACTIONS(1028), + [anon_sym_do] = ACTIONS(1028), + [anon_sym_for] = ACTIONS(1028), + [anon_sym_return] = ACTIONS(1028), + [anon_sym_break] = ACTIONS(1028), + [anon_sym_continue] = ACTIONS(1028), + [anon_sym_goto] = ACTIONS(1028), + [anon_sym_DASH_DASH] = ACTIONS(1030), + [anon_sym_PLUS_PLUS] = ACTIONS(1030), + [anon_sym_sizeof] = ACTIONS(1028), + [sym_number_literal] = ACTIONS(1030), + [anon_sym_L_SQUOTE] = ACTIONS(1030), + [anon_sym_u_SQUOTE] = ACTIONS(1030), + [anon_sym_U_SQUOTE] = ACTIONS(1030), + [anon_sym_u8_SQUOTE] = ACTIONS(1030), + [anon_sym_SQUOTE] = ACTIONS(1030), + [anon_sym_L_DQUOTE] = ACTIONS(1030), + [anon_sym_u_DQUOTE] = ACTIONS(1030), + [anon_sym_U_DQUOTE] = ACTIONS(1030), + [anon_sym_u8_DQUOTE] = ACTIONS(1030), + [anon_sym_DQUOTE] = ACTIONS(1030), + [sym_true] = ACTIONS(1028), + [sym_false] = ACTIONS(1028), + [sym_null] = ACTIONS(1028), + [sym_comment] = ACTIONS(3), + }, + [322] = { + [sym_identifier] = ACTIONS(1104), + [aux_sym_preproc_include_token1] = ACTIONS(1104), + [aux_sym_preproc_def_token1] = ACTIONS(1104), + [aux_sym_preproc_if_token1] = ACTIONS(1104), + [aux_sym_preproc_if_token2] = ACTIONS(1104), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1104), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1104), + [sym_preproc_directive] = ACTIONS(1104), + [anon_sym_LPAREN2] = ACTIONS(1106), + [anon_sym_BANG] = ACTIONS(1106), + [anon_sym_TILDE] = ACTIONS(1106), + [anon_sym_DASH] = ACTIONS(1104), + [anon_sym_PLUS] = ACTIONS(1104), + [anon_sym_STAR] = ACTIONS(1106), + [anon_sym_AMP] = ACTIONS(1106), + [anon_sym_SEMI] = ACTIONS(1106), + [anon_sym_typedef] = ACTIONS(1104), + [anon_sym_extern] = ACTIONS(1104), + [anon_sym___attribute__] = ACTIONS(1104), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1106), + [anon_sym___declspec] = ACTIONS(1104), + [anon_sym___cdecl] = ACTIONS(1104), + [anon_sym___clrcall] = ACTIONS(1104), + [anon_sym___stdcall] = ACTIONS(1104), + [anon_sym___fastcall] = ACTIONS(1104), + [anon_sym___thiscall] = ACTIONS(1104), + [anon_sym___vectorcall] = ACTIONS(1104), + [anon_sym_LBRACE] = ACTIONS(1106), + [anon_sym_static] = ACTIONS(1104), + [anon_sym_auto] = ACTIONS(1104), + [anon_sym_register] = ACTIONS(1104), + [anon_sym_inline] = ACTIONS(1104), + [anon_sym_const] = ACTIONS(1104), + [anon_sym_volatile] = ACTIONS(1104), + [anon_sym_restrict] = ACTIONS(1104), + [anon_sym__Atomic] = ACTIONS(1104), + [anon_sym_signed] = ACTIONS(1104), + [anon_sym_unsigned] = ACTIONS(1104), + [anon_sym_long] = ACTIONS(1104), + [anon_sym_short] = ACTIONS(1104), + [sym_primitive_type] = ACTIONS(1104), + [anon_sym_enum] = ACTIONS(1104), + [anon_sym_struct] = ACTIONS(1104), + [anon_sym_union] = ACTIONS(1104), + [anon_sym_if] = ACTIONS(1104), + [anon_sym_switch] = ACTIONS(1104), + [anon_sym_case] = ACTIONS(1104), + [anon_sym_default] = ACTIONS(1104), + [anon_sym_while] = ACTIONS(1104), + [anon_sym_do] = ACTIONS(1104), + [anon_sym_for] = ACTIONS(1104), + [anon_sym_return] = ACTIONS(1104), + [anon_sym_break] = ACTIONS(1104), + [anon_sym_continue] = ACTIONS(1104), + [anon_sym_goto] = ACTIONS(1104), + [anon_sym_DASH_DASH] = ACTIONS(1106), + [anon_sym_PLUS_PLUS] = ACTIONS(1106), + [anon_sym_sizeof] = ACTIONS(1104), + [sym_number_literal] = ACTIONS(1106), + [anon_sym_L_SQUOTE] = ACTIONS(1106), + [anon_sym_u_SQUOTE] = ACTIONS(1106), + [anon_sym_U_SQUOTE] = ACTIONS(1106), + [anon_sym_u8_SQUOTE] = ACTIONS(1106), + [anon_sym_SQUOTE] = ACTIONS(1106), + [anon_sym_L_DQUOTE] = ACTIONS(1106), + [anon_sym_u_DQUOTE] = ACTIONS(1106), + [anon_sym_U_DQUOTE] = ACTIONS(1106), + [anon_sym_u8_DQUOTE] = ACTIONS(1106), + [anon_sym_DQUOTE] = ACTIONS(1106), + [sym_true] = ACTIONS(1104), + [sym_false] = ACTIONS(1104), + [sym_null] = ACTIONS(1104), + [sym_comment] = ACTIONS(3), + }, + [323] = { + [sym_identifier] = ACTIONS(1072), + [aux_sym_preproc_include_token1] = ACTIONS(1072), + [aux_sym_preproc_def_token1] = ACTIONS(1072), + [aux_sym_preproc_if_token1] = ACTIONS(1072), + [aux_sym_preproc_if_token2] = ACTIONS(1072), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1072), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1072), + [sym_preproc_directive] = ACTIONS(1072), + [anon_sym_LPAREN2] = ACTIONS(1074), + [anon_sym_BANG] = ACTIONS(1074), + [anon_sym_TILDE] = ACTIONS(1074), + [anon_sym_DASH] = ACTIONS(1072), + [anon_sym_PLUS] = ACTIONS(1072), + [anon_sym_STAR] = ACTIONS(1074), + [anon_sym_AMP] = ACTIONS(1074), + [anon_sym_SEMI] = ACTIONS(1074), + [anon_sym_typedef] = ACTIONS(1072), + [anon_sym_extern] = ACTIONS(1072), + [anon_sym___attribute__] = ACTIONS(1072), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1074), + [anon_sym___declspec] = ACTIONS(1072), + [anon_sym___cdecl] = ACTIONS(1072), + [anon_sym___clrcall] = ACTIONS(1072), + [anon_sym___stdcall] = ACTIONS(1072), + [anon_sym___fastcall] = ACTIONS(1072), + [anon_sym___thiscall] = ACTIONS(1072), + [anon_sym___vectorcall] = ACTIONS(1072), + [anon_sym_LBRACE] = ACTIONS(1074), + [anon_sym_static] = ACTIONS(1072), + [anon_sym_auto] = ACTIONS(1072), + [anon_sym_register] = ACTIONS(1072), + [anon_sym_inline] = ACTIONS(1072), + [anon_sym_const] = ACTIONS(1072), + [anon_sym_volatile] = ACTIONS(1072), + [anon_sym_restrict] = ACTIONS(1072), + [anon_sym__Atomic] = ACTIONS(1072), + [anon_sym_signed] = ACTIONS(1072), + [anon_sym_unsigned] = ACTIONS(1072), + [anon_sym_long] = ACTIONS(1072), + [anon_sym_short] = ACTIONS(1072), + [sym_primitive_type] = ACTIONS(1072), + [anon_sym_enum] = ACTIONS(1072), + [anon_sym_struct] = ACTIONS(1072), + [anon_sym_union] = ACTIONS(1072), + [anon_sym_if] = ACTIONS(1072), + [anon_sym_switch] = ACTIONS(1072), + [anon_sym_case] = ACTIONS(1072), + [anon_sym_default] = ACTIONS(1072), + [anon_sym_while] = ACTIONS(1072), + [anon_sym_do] = ACTIONS(1072), + [anon_sym_for] = ACTIONS(1072), + [anon_sym_return] = ACTIONS(1072), + [anon_sym_break] = ACTIONS(1072), + [anon_sym_continue] = ACTIONS(1072), + [anon_sym_goto] = ACTIONS(1072), + [anon_sym_DASH_DASH] = ACTIONS(1074), + [anon_sym_PLUS_PLUS] = ACTIONS(1074), + [anon_sym_sizeof] = ACTIONS(1072), + [sym_number_literal] = ACTIONS(1074), + [anon_sym_L_SQUOTE] = ACTIONS(1074), + [anon_sym_u_SQUOTE] = ACTIONS(1074), + [anon_sym_U_SQUOTE] = ACTIONS(1074), + [anon_sym_u8_SQUOTE] = ACTIONS(1074), + [anon_sym_SQUOTE] = ACTIONS(1074), + [anon_sym_L_DQUOTE] = ACTIONS(1074), + [anon_sym_u_DQUOTE] = ACTIONS(1074), + [anon_sym_U_DQUOTE] = ACTIONS(1074), + [anon_sym_u8_DQUOTE] = ACTIONS(1074), + [anon_sym_DQUOTE] = ACTIONS(1074), + [sym_true] = ACTIONS(1072), + [sym_false] = ACTIONS(1072), + [sym_null] = ACTIONS(1072), + [sym_comment] = ACTIONS(3), + }, + [324] = { + [ts_builtin_sym_end] = ACTIONS(1074), + [sym_identifier] = ACTIONS(1072), + [aux_sym_preproc_include_token1] = ACTIONS(1072), + [aux_sym_preproc_def_token1] = ACTIONS(1072), + [aux_sym_preproc_if_token1] = ACTIONS(1072), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1072), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1072), + [sym_preproc_directive] = ACTIONS(1072), + [anon_sym_LPAREN2] = ACTIONS(1074), + [anon_sym_BANG] = ACTIONS(1074), + [anon_sym_TILDE] = ACTIONS(1074), + [anon_sym_DASH] = ACTIONS(1072), + [anon_sym_PLUS] = ACTIONS(1072), + [anon_sym_STAR] = ACTIONS(1074), + [anon_sym_AMP] = ACTIONS(1074), + [anon_sym_SEMI] = ACTIONS(1074), + [anon_sym_typedef] = ACTIONS(1072), + [anon_sym_extern] = ACTIONS(1072), + [anon_sym___attribute__] = ACTIONS(1072), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1074), + [anon_sym___declspec] = ACTIONS(1072), + [anon_sym___cdecl] = ACTIONS(1072), + [anon_sym___clrcall] = ACTIONS(1072), + [anon_sym___stdcall] = ACTIONS(1072), + [anon_sym___fastcall] = ACTIONS(1072), + [anon_sym___thiscall] = ACTIONS(1072), + [anon_sym___vectorcall] = ACTIONS(1072), + [anon_sym_LBRACE] = ACTIONS(1074), + [anon_sym_static] = ACTIONS(1072), + [anon_sym_auto] = ACTIONS(1072), + [anon_sym_register] = ACTIONS(1072), + [anon_sym_inline] = ACTIONS(1072), + [anon_sym_const] = ACTIONS(1072), + [anon_sym_volatile] = ACTIONS(1072), + [anon_sym_restrict] = ACTIONS(1072), + [anon_sym__Atomic] = ACTIONS(1072), + [anon_sym_signed] = ACTIONS(1072), + [anon_sym_unsigned] = ACTIONS(1072), + [anon_sym_long] = ACTIONS(1072), + [anon_sym_short] = ACTIONS(1072), + [sym_primitive_type] = ACTIONS(1072), + [anon_sym_enum] = ACTIONS(1072), + [anon_sym_struct] = ACTIONS(1072), + [anon_sym_union] = ACTIONS(1072), + [anon_sym_if] = ACTIONS(1072), + [anon_sym_switch] = ACTIONS(1072), + [anon_sym_case] = ACTIONS(1072), + [anon_sym_default] = ACTIONS(1072), + [anon_sym_while] = ACTIONS(1072), + [anon_sym_do] = ACTIONS(1072), + [anon_sym_for] = ACTIONS(1072), + [anon_sym_return] = ACTIONS(1072), + [anon_sym_break] = ACTIONS(1072), + [anon_sym_continue] = ACTIONS(1072), + [anon_sym_goto] = ACTIONS(1072), + [anon_sym_DASH_DASH] = ACTIONS(1074), + [anon_sym_PLUS_PLUS] = ACTIONS(1074), + [anon_sym_sizeof] = ACTIONS(1072), + [sym_number_literal] = ACTIONS(1074), + [anon_sym_L_SQUOTE] = ACTIONS(1074), + [anon_sym_u_SQUOTE] = ACTIONS(1074), + [anon_sym_U_SQUOTE] = ACTIONS(1074), + [anon_sym_u8_SQUOTE] = ACTIONS(1074), + [anon_sym_SQUOTE] = ACTIONS(1074), + [anon_sym_L_DQUOTE] = ACTIONS(1074), + [anon_sym_u_DQUOTE] = ACTIONS(1074), + [anon_sym_U_DQUOTE] = ACTIONS(1074), + [anon_sym_u8_DQUOTE] = ACTIONS(1074), + [anon_sym_DQUOTE] = ACTIONS(1074), + [sym_true] = ACTIONS(1072), + [sym_false] = ACTIONS(1072), + [sym_null] = ACTIONS(1072), + [sym_comment] = ACTIONS(3), + }, + [325] = { + [ts_builtin_sym_end] = ACTIONS(1034), + [sym_identifier] = ACTIONS(1032), + [aux_sym_preproc_include_token1] = ACTIONS(1032), + [aux_sym_preproc_def_token1] = ACTIONS(1032), + [aux_sym_preproc_if_token1] = ACTIONS(1032), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1032), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1032), + [sym_preproc_directive] = ACTIONS(1032), + [anon_sym_LPAREN2] = ACTIONS(1034), + [anon_sym_BANG] = ACTIONS(1034), + [anon_sym_TILDE] = ACTIONS(1034), + [anon_sym_DASH] = ACTIONS(1032), + [anon_sym_PLUS] = ACTIONS(1032), + [anon_sym_STAR] = ACTIONS(1034), + [anon_sym_AMP] = ACTIONS(1034), + [anon_sym_SEMI] = ACTIONS(1034), + [anon_sym_typedef] = ACTIONS(1032), + [anon_sym_extern] = ACTIONS(1032), + [anon_sym___attribute__] = ACTIONS(1032), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1034), + [anon_sym___declspec] = ACTIONS(1032), + [anon_sym___cdecl] = ACTIONS(1032), + [anon_sym___clrcall] = ACTIONS(1032), + [anon_sym___stdcall] = ACTIONS(1032), + [anon_sym___fastcall] = ACTIONS(1032), + [anon_sym___thiscall] = ACTIONS(1032), + [anon_sym___vectorcall] = ACTIONS(1032), + [anon_sym_LBRACE] = ACTIONS(1034), + [anon_sym_static] = ACTIONS(1032), + [anon_sym_auto] = ACTIONS(1032), + [anon_sym_register] = ACTIONS(1032), + [anon_sym_inline] = ACTIONS(1032), + [anon_sym_const] = ACTIONS(1032), + [anon_sym_volatile] = ACTIONS(1032), + [anon_sym_restrict] = ACTIONS(1032), + [anon_sym__Atomic] = ACTIONS(1032), + [anon_sym_signed] = ACTIONS(1032), + [anon_sym_unsigned] = ACTIONS(1032), + [anon_sym_long] = ACTIONS(1032), + [anon_sym_short] = ACTIONS(1032), + [sym_primitive_type] = ACTIONS(1032), + [anon_sym_enum] = ACTIONS(1032), + [anon_sym_struct] = ACTIONS(1032), + [anon_sym_union] = ACTIONS(1032), + [anon_sym_if] = ACTIONS(1032), + [anon_sym_switch] = ACTIONS(1032), + [anon_sym_case] = ACTIONS(1032), + [anon_sym_default] = ACTIONS(1032), + [anon_sym_while] = ACTIONS(1032), + [anon_sym_do] = ACTIONS(1032), + [anon_sym_for] = ACTIONS(1032), + [anon_sym_return] = ACTIONS(1032), + [anon_sym_break] = ACTIONS(1032), + [anon_sym_continue] = ACTIONS(1032), + [anon_sym_goto] = ACTIONS(1032), + [anon_sym_DASH_DASH] = ACTIONS(1034), + [anon_sym_PLUS_PLUS] = ACTIONS(1034), + [anon_sym_sizeof] = ACTIONS(1032), + [sym_number_literal] = ACTIONS(1034), + [anon_sym_L_SQUOTE] = ACTIONS(1034), + [anon_sym_u_SQUOTE] = ACTIONS(1034), + [anon_sym_U_SQUOTE] = ACTIONS(1034), + [anon_sym_u8_SQUOTE] = ACTIONS(1034), + [anon_sym_SQUOTE] = ACTIONS(1034), + [anon_sym_L_DQUOTE] = ACTIONS(1034), + [anon_sym_u_DQUOTE] = ACTIONS(1034), + [anon_sym_U_DQUOTE] = ACTIONS(1034), + [anon_sym_u8_DQUOTE] = ACTIONS(1034), + [anon_sym_DQUOTE] = ACTIONS(1034), + [sym_true] = ACTIONS(1032), + [sym_false] = ACTIONS(1032), + [sym_null] = ACTIONS(1032), + [sym_comment] = ACTIONS(3), + }, + [326] = { + [sym_identifier] = ACTIONS(1080), + [aux_sym_preproc_include_token1] = ACTIONS(1080), + [aux_sym_preproc_def_token1] = ACTIONS(1080), + [aux_sym_preproc_if_token1] = ACTIONS(1080), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1080), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1080), + [sym_preproc_directive] = ACTIONS(1080), + [anon_sym_LPAREN2] = ACTIONS(1082), + [anon_sym_BANG] = ACTIONS(1082), + [anon_sym_TILDE] = ACTIONS(1082), + [anon_sym_DASH] = ACTIONS(1080), + [anon_sym_PLUS] = ACTIONS(1080), + [anon_sym_STAR] = ACTIONS(1082), + [anon_sym_AMP] = ACTIONS(1082), + [anon_sym_SEMI] = ACTIONS(1082), + [anon_sym_typedef] = ACTIONS(1080), + [anon_sym_extern] = ACTIONS(1080), + [anon_sym___attribute__] = ACTIONS(1080), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1082), + [anon_sym___declspec] = ACTIONS(1080), + [anon_sym___cdecl] = ACTIONS(1080), + [anon_sym___clrcall] = ACTIONS(1080), + [anon_sym___stdcall] = ACTIONS(1080), + [anon_sym___fastcall] = ACTIONS(1080), + [anon_sym___thiscall] = ACTIONS(1080), + [anon_sym___vectorcall] = ACTIONS(1080), + [anon_sym_LBRACE] = ACTIONS(1082), + [anon_sym_RBRACE] = ACTIONS(1082), + [anon_sym_static] = ACTIONS(1080), + [anon_sym_auto] = ACTIONS(1080), + [anon_sym_register] = ACTIONS(1080), + [anon_sym_inline] = ACTIONS(1080), + [anon_sym_const] = ACTIONS(1080), + [anon_sym_volatile] = ACTIONS(1080), + [anon_sym_restrict] = ACTIONS(1080), + [anon_sym__Atomic] = ACTIONS(1080), + [anon_sym_signed] = ACTIONS(1080), + [anon_sym_unsigned] = ACTIONS(1080), + [anon_sym_long] = ACTIONS(1080), + [anon_sym_short] = ACTIONS(1080), + [sym_primitive_type] = ACTIONS(1080), + [anon_sym_enum] = ACTIONS(1080), + [anon_sym_struct] = ACTIONS(1080), + [anon_sym_union] = ACTIONS(1080), + [anon_sym_if] = ACTIONS(1080), + [anon_sym_switch] = ACTIONS(1080), + [anon_sym_case] = ACTIONS(1080), + [anon_sym_default] = ACTIONS(1080), + [anon_sym_while] = ACTIONS(1080), + [anon_sym_do] = ACTIONS(1080), + [anon_sym_for] = ACTIONS(1080), + [anon_sym_return] = ACTIONS(1080), + [anon_sym_break] = ACTIONS(1080), + [anon_sym_continue] = ACTIONS(1080), + [anon_sym_goto] = ACTIONS(1080), + [anon_sym_DASH_DASH] = ACTIONS(1082), + [anon_sym_PLUS_PLUS] = ACTIONS(1082), + [anon_sym_sizeof] = ACTIONS(1080), + [sym_number_literal] = ACTIONS(1082), + [anon_sym_L_SQUOTE] = ACTIONS(1082), + [anon_sym_u_SQUOTE] = ACTIONS(1082), + [anon_sym_U_SQUOTE] = ACTIONS(1082), + [anon_sym_u8_SQUOTE] = ACTIONS(1082), + [anon_sym_SQUOTE] = ACTIONS(1082), + [anon_sym_L_DQUOTE] = ACTIONS(1082), + [anon_sym_u_DQUOTE] = ACTIONS(1082), + [anon_sym_U_DQUOTE] = ACTIONS(1082), + [anon_sym_u8_DQUOTE] = ACTIONS(1082), + [anon_sym_DQUOTE] = ACTIONS(1082), + [sym_true] = ACTIONS(1080), + [sym_false] = ACTIONS(1080), + [sym_null] = ACTIONS(1080), + [sym_comment] = ACTIONS(3), + }, + [327] = { + [ts_builtin_sym_end] = ACTIONS(1098), + [sym_identifier] = ACTIONS(1096), + [aux_sym_preproc_include_token1] = ACTIONS(1096), + [aux_sym_preproc_def_token1] = ACTIONS(1096), + [aux_sym_preproc_if_token1] = ACTIONS(1096), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1096), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1096), + [sym_preproc_directive] = ACTIONS(1096), + [anon_sym_LPAREN2] = ACTIONS(1098), + [anon_sym_BANG] = ACTIONS(1098), + [anon_sym_TILDE] = ACTIONS(1098), + [anon_sym_DASH] = ACTIONS(1096), + [anon_sym_PLUS] = ACTIONS(1096), + [anon_sym_STAR] = ACTIONS(1098), + [anon_sym_AMP] = ACTIONS(1098), + [anon_sym_SEMI] = ACTIONS(1098), + [anon_sym_typedef] = ACTIONS(1096), + [anon_sym_extern] = ACTIONS(1096), + [anon_sym___attribute__] = ACTIONS(1096), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1098), + [anon_sym___declspec] = ACTIONS(1096), + [anon_sym___cdecl] = ACTIONS(1096), + [anon_sym___clrcall] = ACTIONS(1096), + [anon_sym___stdcall] = ACTIONS(1096), + [anon_sym___fastcall] = ACTIONS(1096), + [anon_sym___thiscall] = ACTIONS(1096), + [anon_sym___vectorcall] = ACTIONS(1096), + [anon_sym_LBRACE] = ACTIONS(1098), + [anon_sym_static] = ACTIONS(1096), + [anon_sym_auto] = ACTIONS(1096), + [anon_sym_register] = ACTIONS(1096), + [anon_sym_inline] = ACTIONS(1096), + [anon_sym_const] = ACTIONS(1096), + [anon_sym_volatile] = ACTIONS(1096), + [anon_sym_restrict] = ACTIONS(1096), + [anon_sym__Atomic] = ACTIONS(1096), + [anon_sym_signed] = ACTIONS(1096), + [anon_sym_unsigned] = ACTIONS(1096), + [anon_sym_long] = ACTIONS(1096), + [anon_sym_short] = ACTIONS(1096), + [sym_primitive_type] = ACTIONS(1096), + [anon_sym_enum] = ACTIONS(1096), + [anon_sym_struct] = ACTIONS(1096), + [anon_sym_union] = ACTIONS(1096), + [anon_sym_if] = ACTIONS(1096), + [anon_sym_switch] = ACTIONS(1096), + [anon_sym_case] = ACTIONS(1096), + [anon_sym_default] = ACTIONS(1096), + [anon_sym_while] = ACTIONS(1096), + [anon_sym_do] = ACTIONS(1096), + [anon_sym_for] = ACTIONS(1096), + [anon_sym_return] = ACTIONS(1096), + [anon_sym_break] = ACTIONS(1096), + [anon_sym_continue] = ACTIONS(1096), + [anon_sym_goto] = ACTIONS(1096), + [anon_sym_DASH_DASH] = ACTIONS(1098), + [anon_sym_PLUS_PLUS] = ACTIONS(1098), + [anon_sym_sizeof] = ACTIONS(1096), + [sym_number_literal] = ACTIONS(1098), + [anon_sym_L_SQUOTE] = ACTIONS(1098), + [anon_sym_u_SQUOTE] = ACTIONS(1098), + [anon_sym_U_SQUOTE] = ACTIONS(1098), + [anon_sym_u8_SQUOTE] = ACTIONS(1098), + [anon_sym_SQUOTE] = ACTIONS(1098), + [anon_sym_L_DQUOTE] = ACTIONS(1098), + [anon_sym_u_DQUOTE] = ACTIONS(1098), + [anon_sym_U_DQUOTE] = ACTIONS(1098), + [anon_sym_u8_DQUOTE] = ACTIONS(1098), + [anon_sym_DQUOTE] = ACTIONS(1098), + [sym_true] = ACTIONS(1096), + [sym_false] = ACTIONS(1096), + [sym_null] = ACTIONS(1096), + [sym_comment] = ACTIONS(3), + }, + [328] = { + [sym_identifier] = ACTIONS(1088), + [aux_sym_preproc_include_token1] = ACTIONS(1088), + [aux_sym_preproc_def_token1] = ACTIONS(1088), + [aux_sym_preproc_if_token1] = ACTIONS(1088), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1088), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1088), + [sym_preproc_directive] = ACTIONS(1088), + [anon_sym_LPAREN2] = ACTIONS(1090), + [anon_sym_BANG] = ACTIONS(1090), + [anon_sym_TILDE] = ACTIONS(1090), + [anon_sym_DASH] = ACTIONS(1088), + [anon_sym_PLUS] = ACTIONS(1088), + [anon_sym_STAR] = ACTIONS(1090), + [anon_sym_AMP] = ACTIONS(1090), + [anon_sym_SEMI] = ACTIONS(1090), + [anon_sym_typedef] = ACTIONS(1088), + [anon_sym_extern] = ACTIONS(1088), + [anon_sym___attribute__] = ACTIONS(1088), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1090), + [anon_sym___declspec] = ACTIONS(1088), + [anon_sym___cdecl] = ACTIONS(1088), + [anon_sym___clrcall] = ACTIONS(1088), + [anon_sym___stdcall] = ACTIONS(1088), + [anon_sym___fastcall] = ACTIONS(1088), + [anon_sym___thiscall] = ACTIONS(1088), + [anon_sym___vectorcall] = ACTIONS(1088), + [anon_sym_LBRACE] = ACTIONS(1090), + [anon_sym_RBRACE] = ACTIONS(1090), + [anon_sym_static] = ACTIONS(1088), + [anon_sym_auto] = ACTIONS(1088), + [anon_sym_register] = ACTIONS(1088), + [anon_sym_inline] = ACTIONS(1088), + [anon_sym_const] = ACTIONS(1088), + [anon_sym_volatile] = ACTIONS(1088), + [anon_sym_restrict] = ACTIONS(1088), + [anon_sym__Atomic] = ACTIONS(1088), + [anon_sym_signed] = ACTIONS(1088), + [anon_sym_unsigned] = ACTIONS(1088), + [anon_sym_long] = ACTIONS(1088), + [anon_sym_short] = ACTIONS(1088), + [sym_primitive_type] = ACTIONS(1088), + [anon_sym_enum] = ACTIONS(1088), + [anon_sym_struct] = ACTIONS(1088), + [anon_sym_union] = ACTIONS(1088), + [anon_sym_if] = ACTIONS(1088), + [anon_sym_switch] = ACTIONS(1088), + [anon_sym_case] = ACTIONS(1088), + [anon_sym_default] = ACTIONS(1088), + [anon_sym_while] = ACTIONS(1088), + [anon_sym_do] = ACTIONS(1088), + [anon_sym_for] = ACTIONS(1088), + [anon_sym_return] = ACTIONS(1088), + [anon_sym_break] = ACTIONS(1088), + [anon_sym_continue] = ACTIONS(1088), + [anon_sym_goto] = ACTIONS(1088), + [anon_sym_DASH_DASH] = ACTIONS(1090), + [anon_sym_PLUS_PLUS] = ACTIONS(1090), + [anon_sym_sizeof] = ACTIONS(1088), + [sym_number_literal] = ACTIONS(1090), + [anon_sym_L_SQUOTE] = ACTIONS(1090), + [anon_sym_u_SQUOTE] = ACTIONS(1090), + [anon_sym_U_SQUOTE] = ACTIONS(1090), + [anon_sym_u8_SQUOTE] = ACTIONS(1090), + [anon_sym_SQUOTE] = ACTIONS(1090), + [anon_sym_L_DQUOTE] = ACTIONS(1090), + [anon_sym_u_DQUOTE] = ACTIONS(1090), + [anon_sym_U_DQUOTE] = ACTIONS(1090), + [anon_sym_u8_DQUOTE] = ACTIONS(1090), + [anon_sym_DQUOTE] = ACTIONS(1090), + [sym_true] = ACTIONS(1088), + [sym_false] = ACTIONS(1088), + [sym_null] = ACTIONS(1088), + [sym_comment] = ACTIONS(3), + }, + [329] = { + [ts_builtin_sym_end] = ACTIONS(1122), + [sym_identifier] = ACTIONS(1120), + [aux_sym_preproc_include_token1] = ACTIONS(1120), + [aux_sym_preproc_def_token1] = ACTIONS(1120), + [aux_sym_preproc_if_token1] = ACTIONS(1120), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1120), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1120), + [sym_preproc_directive] = ACTIONS(1120), + [anon_sym_LPAREN2] = ACTIONS(1122), + [anon_sym_BANG] = ACTIONS(1122), + [anon_sym_TILDE] = ACTIONS(1122), + [anon_sym_DASH] = ACTIONS(1120), + [anon_sym_PLUS] = ACTIONS(1120), + [anon_sym_STAR] = ACTIONS(1122), + [anon_sym_AMP] = ACTIONS(1122), + [anon_sym_SEMI] = ACTIONS(1122), + [anon_sym_typedef] = ACTIONS(1120), + [anon_sym_extern] = ACTIONS(1120), + [anon_sym___attribute__] = ACTIONS(1120), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1122), + [anon_sym___declspec] = ACTIONS(1120), + [anon_sym___cdecl] = ACTIONS(1120), + [anon_sym___clrcall] = ACTIONS(1120), + [anon_sym___stdcall] = ACTIONS(1120), + [anon_sym___fastcall] = ACTIONS(1120), + [anon_sym___thiscall] = ACTIONS(1120), + [anon_sym___vectorcall] = ACTIONS(1120), + [anon_sym_LBRACE] = ACTIONS(1122), + [anon_sym_static] = ACTIONS(1120), + [anon_sym_auto] = ACTIONS(1120), + [anon_sym_register] = ACTIONS(1120), + [anon_sym_inline] = ACTIONS(1120), + [anon_sym_const] = ACTIONS(1120), + [anon_sym_volatile] = ACTIONS(1120), + [anon_sym_restrict] = ACTIONS(1120), + [anon_sym__Atomic] = ACTIONS(1120), + [anon_sym_signed] = ACTIONS(1120), + [anon_sym_unsigned] = ACTIONS(1120), + [anon_sym_long] = ACTIONS(1120), + [anon_sym_short] = ACTIONS(1120), + [sym_primitive_type] = ACTIONS(1120), + [anon_sym_enum] = ACTIONS(1120), + [anon_sym_struct] = ACTIONS(1120), + [anon_sym_union] = ACTIONS(1120), + [anon_sym_if] = ACTIONS(1120), + [anon_sym_switch] = ACTIONS(1120), + [anon_sym_case] = ACTIONS(1120), + [anon_sym_default] = ACTIONS(1120), + [anon_sym_while] = ACTIONS(1120), + [anon_sym_do] = ACTIONS(1120), + [anon_sym_for] = ACTIONS(1120), + [anon_sym_return] = ACTIONS(1120), + [anon_sym_break] = ACTIONS(1120), + [anon_sym_continue] = ACTIONS(1120), + [anon_sym_goto] = ACTIONS(1120), + [anon_sym_DASH_DASH] = ACTIONS(1122), + [anon_sym_PLUS_PLUS] = ACTIONS(1122), + [anon_sym_sizeof] = ACTIONS(1120), + [sym_number_literal] = ACTIONS(1122), + [anon_sym_L_SQUOTE] = ACTIONS(1122), + [anon_sym_u_SQUOTE] = ACTIONS(1122), + [anon_sym_U_SQUOTE] = ACTIONS(1122), + [anon_sym_u8_SQUOTE] = ACTIONS(1122), + [anon_sym_SQUOTE] = ACTIONS(1122), + [anon_sym_L_DQUOTE] = ACTIONS(1122), + [anon_sym_u_DQUOTE] = ACTIONS(1122), + [anon_sym_U_DQUOTE] = ACTIONS(1122), + [anon_sym_u8_DQUOTE] = ACTIONS(1122), + [anon_sym_DQUOTE] = ACTIONS(1122), + [sym_true] = ACTIONS(1120), + [sym_false] = ACTIONS(1120), + [sym_null] = ACTIONS(1120), + [sym_comment] = ACTIONS(3), + }, + [330] = { + [sym_identifier] = ACTIONS(1076), + [aux_sym_preproc_include_token1] = ACTIONS(1076), + [aux_sym_preproc_def_token1] = ACTIONS(1076), + [aux_sym_preproc_if_token1] = ACTIONS(1076), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1076), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1076), + [sym_preproc_directive] = ACTIONS(1076), + [anon_sym_LPAREN2] = ACTIONS(1078), + [anon_sym_BANG] = ACTIONS(1078), + [anon_sym_TILDE] = ACTIONS(1078), + [anon_sym_DASH] = ACTIONS(1076), + [anon_sym_PLUS] = ACTIONS(1076), + [anon_sym_STAR] = ACTIONS(1078), + [anon_sym_AMP] = ACTIONS(1078), + [anon_sym_SEMI] = ACTIONS(1078), + [anon_sym_typedef] = ACTIONS(1076), + [anon_sym_extern] = ACTIONS(1076), + [anon_sym___attribute__] = ACTIONS(1076), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1078), + [anon_sym___declspec] = ACTIONS(1076), + [anon_sym___cdecl] = ACTIONS(1076), + [anon_sym___clrcall] = ACTIONS(1076), + [anon_sym___stdcall] = ACTIONS(1076), + [anon_sym___fastcall] = ACTIONS(1076), + [anon_sym___thiscall] = ACTIONS(1076), + [anon_sym___vectorcall] = ACTIONS(1076), + [anon_sym_LBRACE] = ACTIONS(1078), + [anon_sym_RBRACE] = ACTIONS(1078), + [anon_sym_static] = ACTIONS(1076), + [anon_sym_auto] = ACTIONS(1076), + [anon_sym_register] = ACTIONS(1076), + [anon_sym_inline] = ACTIONS(1076), + [anon_sym_const] = ACTIONS(1076), + [anon_sym_volatile] = ACTIONS(1076), + [anon_sym_restrict] = ACTIONS(1076), + [anon_sym__Atomic] = ACTIONS(1076), + [anon_sym_signed] = ACTIONS(1076), + [anon_sym_unsigned] = ACTIONS(1076), + [anon_sym_long] = ACTIONS(1076), + [anon_sym_short] = ACTIONS(1076), + [sym_primitive_type] = ACTIONS(1076), + [anon_sym_enum] = ACTIONS(1076), + [anon_sym_struct] = ACTIONS(1076), + [anon_sym_union] = ACTIONS(1076), + [anon_sym_if] = ACTIONS(1076), + [anon_sym_switch] = ACTIONS(1076), + [anon_sym_case] = ACTIONS(1076), + [anon_sym_default] = ACTIONS(1076), + [anon_sym_while] = ACTIONS(1076), + [anon_sym_do] = ACTIONS(1076), + [anon_sym_for] = ACTIONS(1076), + [anon_sym_return] = ACTIONS(1076), + [anon_sym_break] = ACTIONS(1076), + [anon_sym_continue] = ACTIONS(1076), + [anon_sym_goto] = ACTIONS(1076), + [anon_sym_DASH_DASH] = ACTIONS(1078), + [anon_sym_PLUS_PLUS] = ACTIONS(1078), + [anon_sym_sizeof] = ACTIONS(1076), + [sym_number_literal] = ACTIONS(1078), + [anon_sym_L_SQUOTE] = ACTIONS(1078), + [anon_sym_u_SQUOTE] = ACTIONS(1078), + [anon_sym_U_SQUOTE] = ACTIONS(1078), + [anon_sym_u8_SQUOTE] = ACTIONS(1078), + [anon_sym_SQUOTE] = ACTIONS(1078), + [anon_sym_L_DQUOTE] = ACTIONS(1078), + [anon_sym_u_DQUOTE] = ACTIONS(1078), + [anon_sym_U_DQUOTE] = ACTIONS(1078), + [anon_sym_u8_DQUOTE] = ACTIONS(1078), + [anon_sym_DQUOTE] = ACTIONS(1078), + [sym_true] = ACTIONS(1076), + [sym_false] = ACTIONS(1076), + [sym_null] = ACTIONS(1076), + [sym_comment] = ACTIONS(3), + }, + [331] = { + [sym_identifier] = ACTIONS(1104), + [aux_sym_preproc_include_token1] = ACTIONS(1104), + [aux_sym_preproc_def_token1] = ACTIONS(1104), + [aux_sym_preproc_if_token1] = ACTIONS(1104), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1104), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1104), + [sym_preproc_directive] = ACTIONS(1104), + [anon_sym_LPAREN2] = ACTIONS(1106), + [anon_sym_BANG] = ACTIONS(1106), + [anon_sym_TILDE] = ACTIONS(1106), + [anon_sym_DASH] = ACTIONS(1104), + [anon_sym_PLUS] = ACTIONS(1104), + [anon_sym_STAR] = ACTIONS(1106), + [anon_sym_AMP] = ACTIONS(1106), + [anon_sym_SEMI] = ACTIONS(1106), + [anon_sym_typedef] = ACTIONS(1104), + [anon_sym_extern] = ACTIONS(1104), + [anon_sym___attribute__] = ACTIONS(1104), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1106), + [anon_sym___declspec] = ACTIONS(1104), + [anon_sym___cdecl] = ACTIONS(1104), + [anon_sym___clrcall] = ACTIONS(1104), + [anon_sym___stdcall] = ACTIONS(1104), + [anon_sym___fastcall] = ACTIONS(1104), + [anon_sym___thiscall] = ACTIONS(1104), + [anon_sym___vectorcall] = ACTIONS(1104), + [anon_sym_LBRACE] = ACTIONS(1106), + [anon_sym_RBRACE] = ACTIONS(1106), + [anon_sym_static] = ACTIONS(1104), + [anon_sym_auto] = ACTIONS(1104), + [anon_sym_register] = ACTIONS(1104), + [anon_sym_inline] = ACTIONS(1104), + [anon_sym_const] = ACTIONS(1104), + [anon_sym_volatile] = ACTIONS(1104), + [anon_sym_restrict] = ACTIONS(1104), + [anon_sym__Atomic] = ACTIONS(1104), + [anon_sym_signed] = ACTIONS(1104), + [anon_sym_unsigned] = ACTIONS(1104), + [anon_sym_long] = ACTIONS(1104), + [anon_sym_short] = ACTIONS(1104), + [sym_primitive_type] = ACTIONS(1104), + [anon_sym_enum] = ACTIONS(1104), + [anon_sym_struct] = ACTIONS(1104), + [anon_sym_union] = ACTIONS(1104), + [anon_sym_if] = ACTIONS(1104), + [anon_sym_switch] = ACTIONS(1104), + [anon_sym_case] = ACTIONS(1104), + [anon_sym_default] = ACTIONS(1104), + [anon_sym_while] = ACTIONS(1104), + [anon_sym_do] = ACTIONS(1104), + [anon_sym_for] = ACTIONS(1104), + [anon_sym_return] = ACTIONS(1104), + [anon_sym_break] = ACTIONS(1104), + [anon_sym_continue] = ACTIONS(1104), + [anon_sym_goto] = ACTIONS(1104), + [anon_sym_DASH_DASH] = ACTIONS(1106), + [anon_sym_PLUS_PLUS] = ACTIONS(1106), + [anon_sym_sizeof] = ACTIONS(1104), + [sym_number_literal] = ACTIONS(1106), + [anon_sym_L_SQUOTE] = ACTIONS(1106), + [anon_sym_u_SQUOTE] = ACTIONS(1106), + [anon_sym_U_SQUOTE] = ACTIONS(1106), + [anon_sym_u8_SQUOTE] = ACTIONS(1106), + [anon_sym_SQUOTE] = ACTIONS(1106), + [anon_sym_L_DQUOTE] = ACTIONS(1106), + [anon_sym_u_DQUOTE] = ACTIONS(1106), + [anon_sym_U_DQUOTE] = ACTIONS(1106), + [anon_sym_u8_DQUOTE] = ACTIONS(1106), + [anon_sym_DQUOTE] = ACTIONS(1106), + [sym_true] = ACTIONS(1104), + [sym_false] = ACTIONS(1104), + [sym_null] = ACTIONS(1104), + [sym_comment] = ACTIONS(3), + }, + [332] = { + [sym_identifier] = ACTIONS(1060), + [aux_sym_preproc_include_token1] = ACTIONS(1060), + [aux_sym_preproc_def_token1] = ACTIONS(1060), + [aux_sym_preproc_if_token1] = ACTIONS(1060), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1060), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1060), + [sym_preproc_directive] = ACTIONS(1060), + [anon_sym_LPAREN2] = ACTIONS(1062), + [anon_sym_BANG] = ACTIONS(1062), + [anon_sym_TILDE] = ACTIONS(1062), + [anon_sym_DASH] = ACTIONS(1060), + [anon_sym_PLUS] = ACTIONS(1060), + [anon_sym_STAR] = ACTIONS(1062), + [anon_sym_AMP] = ACTIONS(1062), + [anon_sym_SEMI] = ACTIONS(1062), + [anon_sym_typedef] = ACTIONS(1060), + [anon_sym_extern] = ACTIONS(1060), + [anon_sym___attribute__] = ACTIONS(1060), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1062), + [anon_sym___declspec] = ACTIONS(1060), + [anon_sym___cdecl] = ACTIONS(1060), + [anon_sym___clrcall] = ACTIONS(1060), + [anon_sym___stdcall] = ACTIONS(1060), + [anon_sym___fastcall] = ACTIONS(1060), + [anon_sym___thiscall] = ACTIONS(1060), + [anon_sym___vectorcall] = ACTIONS(1060), + [anon_sym_LBRACE] = ACTIONS(1062), + [anon_sym_RBRACE] = ACTIONS(1062), + [anon_sym_static] = ACTIONS(1060), + [anon_sym_auto] = ACTIONS(1060), + [anon_sym_register] = ACTIONS(1060), + [anon_sym_inline] = ACTIONS(1060), + [anon_sym_const] = ACTIONS(1060), + [anon_sym_volatile] = ACTIONS(1060), + [anon_sym_restrict] = ACTIONS(1060), + [anon_sym__Atomic] = ACTIONS(1060), + [anon_sym_signed] = ACTIONS(1060), + [anon_sym_unsigned] = ACTIONS(1060), + [anon_sym_long] = ACTIONS(1060), + [anon_sym_short] = ACTIONS(1060), + [sym_primitive_type] = ACTIONS(1060), + [anon_sym_enum] = ACTIONS(1060), + [anon_sym_struct] = ACTIONS(1060), + [anon_sym_union] = ACTIONS(1060), + [anon_sym_if] = ACTIONS(1060), + [anon_sym_switch] = ACTIONS(1060), + [anon_sym_case] = ACTIONS(1060), + [anon_sym_default] = ACTIONS(1060), + [anon_sym_while] = ACTIONS(1060), + [anon_sym_do] = ACTIONS(1060), + [anon_sym_for] = ACTIONS(1060), + [anon_sym_return] = ACTIONS(1060), + [anon_sym_break] = ACTIONS(1060), + [anon_sym_continue] = ACTIONS(1060), + [anon_sym_goto] = ACTIONS(1060), + [anon_sym_DASH_DASH] = ACTIONS(1062), + [anon_sym_PLUS_PLUS] = ACTIONS(1062), + [anon_sym_sizeof] = ACTIONS(1060), + [sym_number_literal] = ACTIONS(1062), + [anon_sym_L_SQUOTE] = ACTIONS(1062), + [anon_sym_u_SQUOTE] = ACTIONS(1062), + [anon_sym_U_SQUOTE] = ACTIONS(1062), + [anon_sym_u8_SQUOTE] = ACTIONS(1062), + [anon_sym_SQUOTE] = ACTIONS(1062), + [anon_sym_L_DQUOTE] = ACTIONS(1062), + [anon_sym_u_DQUOTE] = ACTIONS(1062), + [anon_sym_U_DQUOTE] = ACTIONS(1062), + [anon_sym_u8_DQUOTE] = ACTIONS(1062), + [anon_sym_DQUOTE] = ACTIONS(1062), + [sym_true] = ACTIONS(1060), + [sym_false] = ACTIONS(1060), + [sym_null] = ACTIONS(1060), + [sym_comment] = ACTIONS(3), + }, + [333] = { + [ts_builtin_sym_end] = ACTIONS(1058), + [sym_identifier] = ACTIONS(1056), + [aux_sym_preproc_include_token1] = ACTIONS(1056), + [aux_sym_preproc_def_token1] = ACTIONS(1056), + [aux_sym_preproc_if_token1] = ACTIONS(1056), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1056), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1056), + [sym_preproc_directive] = ACTIONS(1056), + [anon_sym_LPAREN2] = ACTIONS(1058), + [anon_sym_BANG] = ACTIONS(1058), + [anon_sym_TILDE] = ACTIONS(1058), + [anon_sym_DASH] = ACTIONS(1056), + [anon_sym_PLUS] = ACTIONS(1056), + [anon_sym_STAR] = ACTIONS(1058), + [anon_sym_AMP] = ACTIONS(1058), + [anon_sym_SEMI] = ACTIONS(1058), + [anon_sym_typedef] = ACTIONS(1056), + [anon_sym_extern] = ACTIONS(1056), + [anon_sym___attribute__] = ACTIONS(1056), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1058), + [anon_sym___declspec] = ACTIONS(1056), + [anon_sym___cdecl] = ACTIONS(1056), + [anon_sym___clrcall] = ACTIONS(1056), + [anon_sym___stdcall] = ACTIONS(1056), + [anon_sym___fastcall] = ACTIONS(1056), + [anon_sym___thiscall] = ACTIONS(1056), + [anon_sym___vectorcall] = ACTIONS(1056), + [anon_sym_LBRACE] = ACTIONS(1058), + [anon_sym_static] = ACTIONS(1056), + [anon_sym_auto] = ACTIONS(1056), + [anon_sym_register] = ACTIONS(1056), + [anon_sym_inline] = ACTIONS(1056), + [anon_sym_const] = ACTIONS(1056), + [anon_sym_volatile] = ACTIONS(1056), + [anon_sym_restrict] = ACTIONS(1056), + [anon_sym__Atomic] = ACTIONS(1056), + [anon_sym_signed] = ACTIONS(1056), + [anon_sym_unsigned] = ACTIONS(1056), + [anon_sym_long] = ACTIONS(1056), + [anon_sym_short] = ACTIONS(1056), + [sym_primitive_type] = ACTIONS(1056), + [anon_sym_enum] = ACTIONS(1056), + [anon_sym_struct] = ACTIONS(1056), + [anon_sym_union] = ACTIONS(1056), + [anon_sym_if] = ACTIONS(1056), + [anon_sym_switch] = ACTIONS(1056), + [anon_sym_case] = ACTIONS(1056), + [anon_sym_default] = ACTIONS(1056), + [anon_sym_while] = ACTIONS(1056), + [anon_sym_do] = ACTIONS(1056), + [anon_sym_for] = ACTIONS(1056), + [anon_sym_return] = ACTIONS(1056), + [anon_sym_break] = ACTIONS(1056), + [anon_sym_continue] = ACTIONS(1056), + [anon_sym_goto] = ACTIONS(1056), + [anon_sym_DASH_DASH] = ACTIONS(1058), + [anon_sym_PLUS_PLUS] = ACTIONS(1058), + [anon_sym_sizeof] = ACTIONS(1056), + [sym_number_literal] = ACTIONS(1058), + [anon_sym_L_SQUOTE] = ACTIONS(1058), + [anon_sym_u_SQUOTE] = ACTIONS(1058), + [anon_sym_U_SQUOTE] = ACTIONS(1058), + [anon_sym_u8_SQUOTE] = ACTIONS(1058), + [anon_sym_SQUOTE] = ACTIONS(1058), + [anon_sym_L_DQUOTE] = ACTIONS(1058), + [anon_sym_u_DQUOTE] = ACTIONS(1058), + [anon_sym_U_DQUOTE] = ACTIONS(1058), + [anon_sym_u8_DQUOTE] = ACTIONS(1058), + [anon_sym_DQUOTE] = ACTIONS(1058), + [sym_true] = ACTIONS(1056), + [sym_false] = ACTIONS(1056), + [sym_null] = ACTIONS(1056), + [sym_comment] = ACTIONS(3), + }, + [334] = { + [sym_identifier] = ACTIONS(1092), + [aux_sym_preproc_include_token1] = ACTIONS(1092), + [aux_sym_preproc_def_token1] = ACTIONS(1092), + [aux_sym_preproc_if_token1] = ACTIONS(1092), + [aux_sym_preproc_if_token2] = ACTIONS(1092), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1092), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1092), + [sym_preproc_directive] = ACTIONS(1092), + [anon_sym_LPAREN2] = ACTIONS(1094), + [anon_sym_BANG] = ACTIONS(1094), + [anon_sym_TILDE] = ACTIONS(1094), + [anon_sym_DASH] = ACTIONS(1092), + [anon_sym_PLUS] = ACTIONS(1092), + [anon_sym_STAR] = ACTIONS(1094), + [anon_sym_AMP] = ACTIONS(1094), + [anon_sym_SEMI] = ACTIONS(1094), + [anon_sym_typedef] = ACTIONS(1092), + [anon_sym_extern] = ACTIONS(1092), + [anon_sym___attribute__] = ACTIONS(1092), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1094), + [anon_sym___declspec] = ACTIONS(1092), + [anon_sym___cdecl] = ACTIONS(1092), + [anon_sym___clrcall] = ACTIONS(1092), + [anon_sym___stdcall] = ACTIONS(1092), + [anon_sym___fastcall] = ACTIONS(1092), + [anon_sym___thiscall] = ACTIONS(1092), + [anon_sym___vectorcall] = ACTIONS(1092), + [anon_sym_LBRACE] = ACTIONS(1094), + [anon_sym_static] = ACTIONS(1092), + [anon_sym_auto] = ACTIONS(1092), + [anon_sym_register] = ACTIONS(1092), + [anon_sym_inline] = ACTIONS(1092), + [anon_sym_const] = ACTIONS(1092), + [anon_sym_volatile] = ACTIONS(1092), + [anon_sym_restrict] = ACTIONS(1092), + [anon_sym__Atomic] = ACTIONS(1092), + [anon_sym_signed] = ACTIONS(1092), + [anon_sym_unsigned] = ACTIONS(1092), + [anon_sym_long] = ACTIONS(1092), + [anon_sym_short] = ACTIONS(1092), + [sym_primitive_type] = ACTIONS(1092), + [anon_sym_enum] = ACTIONS(1092), + [anon_sym_struct] = ACTIONS(1092), + [anon_sym_union] = ACTIONS(1092), + [anon_sym_if] = ACTIONS(1092), + [anon_sym_switch] = ACTIONS(1092), + [anon_sym_case] = ACTIONS(1092), + [anon_sym_default] = ACTIONS(1092), + [anon_sym_while] = ACTIONS(1092), + [anon_sym_do] = ACTIONS(1092), + [anon_sym_for] = ACTIONS(1092), + [anon_sym_return] = ACTIONS(1092), + [anon_sym_break] = ACTIONS(1092), + [anon_sym_continue] = ACTIONS(1092), + [anon_sym_goto] = ACTIONS(1092), + [anon_sym_DASH_DASH] = ACTIONS(1094), + [anon_sym_PLUS_PLUS] = ACTIONS(1094), + [anon_sym_sizeof] = ACTIONS(1092), + [sym_number_literal] = ACTIONS(1094), + [anon_sym_L_SQUOTE] = ACTIONS(1094), + [anon_sym_u_SQUOTE] = ACTIONS(1094), + [anon_sym_U_SQUOTE] = ACTIONS(1094), + [anon_sym_u8_SQUOTE] = ACTIONS(1094), + [anon_sym_SQUOTE] = ACTIONS(1094), + [anon_sym_L_DQUOTE] = ACTIONS(1094), + [anon_sym_u_DQUOTE] = ACTIONS(1094), + [anon_sym_U_DQUOTE] = ACTIONS(1094), + [anon_sym_u8_DQUOTE] = ACTIONS(1094), + [anon_sym_DQUOTE] = ACTIONS(1094), + [sym_true] = ACTIONS(1092), + [sym_false] = ACTIONS(1092), + [sym_null] = ACTIONS(1092), + [sym_comment] = ACTIONS(3), + }, + [335] = { + [ts_builtin_sym_end] = ACTIONS(1110), + [sym_identifier] = ACTIONS(1108), + [aux_sym_preproc_include_token1] = ACTIONS(1108), + [aux_sym_preproc_def_token1] = ACTIONS(1108), + [aux_sym_preproc_if_token1] = ACTIONS(1108), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1108), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1108), + [sym_preproc_directive] = ACTIONS(1108), + [anon_sym_LPAREN2] = ACTIONS(1110), + [anon_sym_BANG] = ACTIONS(1110), + [anon_sym_TILDE] = ACTIONS(1110), + [anon_sym_DASH] = ACTIONS(1108), + [anon_sym_PLUS] = ACTIONS(1108), + [anon_sym_STAR] = ACTIONS(1110), + [anon_sym_AMP] = ACTIONS(1110), + [anon_sym_SEMI] = ACTIONS(1110), + [anon_sym_typedef] = ACTIONS(1108), + [anon_sym_extern] = ACTIONS(1108), + [anon_sym___attribute__] = ACTIONS(1108), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1110), + [anon_sym___declspec] = ACTIONS(1108), + [anon_sym___cdecl] = ACTIONS(1108), + [anon_sym___clrcall] = ACTIONS(1108), + [anon_sym___stdcall] = ACTIONS(1108), + [anon_sym___fastcall] = ACTIONS(1108), + [anon_sym___thiscall] = ACTIONS(1108), + [anon_sym___vectorcall] = ACTIONS(1108), + [anon_sym_LBRACE] = ACTIONS(1110), + [anon_sym_static] = ACTIONS(1108), + [anon_sym_auto] = ACTIONS(1108), + [anon_sym_register] = ACTIONS(1108), + [anon_sym_inline] = ACTIONS(1108), + [anon_sym_const] = ACTIONS(1108), + [anon_sym_volatile] = ACTIONS(1108), + [anon_sym_restrict] = ACTIONS(1108), + [anon_sym__Atomic] = ACTIONS(1108), + [anon_sym_signed] = ACTIONS(1108), + [anon_sym_unsigned] = ACTIONS(1108), + [anon_sym_long] = ACTIONS(1108), + [anon_sym_short] = ACTIONS(1108), + [sym_primitive_type] = ACTIONS(1108), + [anon_sym_enum] = ACTIONS(1108), + [anon_sym_struct] = ACTIONS(1108), + [anon_sym_union] = ACTIONS(1108), + [anon_sym_if] = ACTIONS(1108), + [anon_sym_switch] = ACTIONS(1108), + [anon_sym_case] = ACTIONS(1108), + [anon_sym_default] = ACTIONS(1108), + [anon_sym_while] = ACTIONS(1108), + [anon_sym_do] = ACTIONS(1108), + [anon_sym_for] = ACTIONS(1108), + [anon_sym_return] = ACTIONS(1108), + [anon_sym_break] = ACTIONS(1108), + [anon_sym_continue] = ACTIONS(1108), + [anon_sym_goto] = ACTIONS(1108), + [anon_sym_DASH_DASH] = ACTIONS(1110), + [anon_sym_PLUS_PLUS] = ACTIONS(1110), + [anon_sym_sizeof] = ACTIONS(1108), + [sym_number_literal] = ACTIONS(1110), + [anon_sym_L_SQUOTE] = ACTIONS(1110), + [anon_sym_u_SQUOTE] = ACTIONS(1110), + [anon_sym_U_SQUOTE] = ACTIONS(1110), + [anon_sym_u8_SQUOTE] = ACTIONS(1110), + [anon_sym_SQUOTE] = ACTIONS(1110), + [anon_sym_L_DQUOTE] = ACTIONS(1110), + [anon_sym_u_DQUOTE] = ACTIONS(1110), + [anon_sym_U_DQUOTE] = ACTIONS(1110), + [anon_sym_u8_DQUOTE] = ACTIONS(1110), + [anon_sym_DQUOTE] = ACTIONS(1110), + [sym_true] = ACTIONS(1108), + [sym_false] = ACTIONS(1108), + [sym_null] = ACTIONS(1108), + [sym_comment] = ACTIONS(3), + }, + [336] = { + [sym_identifier] = ACTIONS(1072), + [aux_sym_preproc_include_token1] = ACTIONS(1072), + [aux_sym_preproc_def_token1] = ACTIONS(1072), + [aux_sym_preproc_if_token1] = ACTIONS(1072), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1072), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1072), + [sym_preproc_directive] = ACTIONS(1072), + [anon_sym_LPAREN2] = ACTIONS(1074), + [anon_sym_BANG] = ACTIONS(1074), + [anon_sym_TILDE] = ACTIONS(1074), + [anon_sym_DASH] = ACTIONS(1072), + [anon_sym_PLUS] = ACTIONS(1072), + [anon_sym_STAR] = ACTIONS(1074), + [anon_sym_AMP] = ACTIONS(1074), + [anon_sym_SEMI] = ACTIONS(1074), + [anon_sym_typedef] = ACTIONS(1072), + [anon_sym_extern] = ACTIONS(1072), + [anon_sym___attribute__] = ACTIONS(1072), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1074), + [anon_sym___declspec] = ACTIONS(1072), + [anon_sym___cdecl] = ACTIONS(1072), + [anon_sym___clrcall] = ACTIONS(1072), + [anon_sym___stdcall] = ACTIONS(1072), + [anon_sym___fastcall] = ACTIONS(1072), + [anon_sym___thiscall] = ACTIONS(1072), + [anon_sym___vectorcall] = ACTIONS(1072), + [anon_sym_LBRACE] = ACTIONS(1074), + [anon_sym_RBRACE] = ACTIONS(1074), + [anon_sym_static] = ACTIONS(1072), + [anon_sym_auto] = ACTIONS(1072), + [anon_sym_register] = ACTIONS(1072), + [anon_sym_inline] = ACTIONS(1072), + [anon_sym_const] = ACTIONS(1072), + [anon_sym_volatile] = ACTIONS(1072), + [anon_sym_restrict] = ACTIONS(1072), + [anon_sym__Atomic] = ACTIONS(1072), + [anon_sym_signed] = ACTIONS(1072), + [anon_sym_unsigned] = ACTIONS(1072), + [anon_sym_long] = ACTIONS(1072), + [anon_sym_short] = ACTIONS(1072), + [sym_primitive_type] = ACTIONS(1072), + [anon_sym_enum] = ACTIONS(1072), + [anon_sym_struct] = ACTIONS(1072), + [anon_sym_union] = ACTIONS(1072), + [anon_sym_if] = ACTIONS(1072), + [anon_sym_switch] = ACTIONS(1072), + [anon_sym_case] = ACTIONS(1072), + [anon_sym_default] = ACTIONS(1072), + [anon_sym_while] = ACTIONS(1072), + [anon_sym_do] = ACTIONS(1072), + [anon_sym_for] = ACTIONS(1072), + [anon_sym_return] = ACTIONS(1072), + [anon_sym_break] = ACTIONS(1072), + [anon_sym_continue] = ACTIONS(1072), + [anon_sym_goto] = ACTIONS(1072), + [anon_sym_DASH_DASH] = ACTIONS(1074), + [anon_sym_PLUS_PLUS] = ACTIONS(1074), + [anon_sym_sizeof] = ACTIONS(1072), + [sym_number_literal] = ACTIONS(1074), + [anon_sym_L_SQUOTE] = ACTIONS(1074), + [anon_sym_u_SQUOTE] = ACTIONS(1074), + [anon_sym_U_SQUOTE] = ACTIONS(1074), + [anon_sym_u8_SQUOTE] = ACTIONS(1074), + [anon_sym_SQUOTE] = ACTIONS(1074), + [anon_sym_L_DQUOTE] = ACTIONS(1074), + [anon_sym_u_DQUOTE] = ACTIONS(1074), + [anon_sym_U_DQUOTE] = ACTIONS(1074), + [anon_sym_u8_DQUOTE] = ACTIONS(1074), + [anon_sym_DQUOTE] = ACTIONS(1074), + [sym_true] = ACTIONS(1072), + [sym_false] = ACTIONS(1072), + [sym_null] = ACTIONS(1072), + [sym_comment] = ACTIONS(3), + }, + [337] = { + [sym_identifier] = ACTIONS(1112), + [aux_sym_preproc_include_token1] = ACTIONS(1112), + [aux_sym_preproc_def_token1] = ACTIONS(1112), + [aux_sym_preproc_if_token1] = ACTIONS(1112), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1112), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1112), + [sym_preproc_directive] = ACTIONS(1112), + [anon_sym_LPAREN2] = ACTIONS(1114), + [anon_sym_BANG] = ACTIONS(1114), + [anon_sym_TILDE] = ACTIONS(1114), + [anon_sym_DASH] = ACTIONS(1112), + [anon_sym_PLUS] = ACTIONS(1112), + [anon_sym_STAR] = ACTIONS(1114), + [anon_sym_AMP] = ACTIONS(1114), + [anon_sym_SEMI] = ACTIONS(1114), + [anon_sym_typedef] = ACTIONS(1112), + [anon_sym_extern] = ACTIONS(1112), + [anon_sym___attribute__] = ACTIONS(1112), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1114), + [anon_sym___declspec] = ACTIONS(1112), + [anon_sym___cdecl] = ACTIONS(1112), + [anon_sym___clrcall] = ACTIONS(1112), + [anon_sym___stdcall] = ACTIONS(1112), + [anon_sym___fastcall] = ACTIONS(1112), + [anon_sym___thiscall] = ACTIONS(1112), + [anon_sym___vectorcall] = ACTIONS(1112), + [anon_sym_LBRACE] = ACTIONS(1114), + [anon_sym_RBRACE] = ACTIONS(1114), + [anon_sym_static] = ACTIONS(1112), + [anon_sym_auto] = ACTIONS(1112), + [anon_sym_register] = ACTIONS(1112), + [anon_sym_inline] = ACTIONS(1112), + [anon_sym_const] = ACTIONS(1112), + [anon_sym_volatile] = ACTIONS(1112), + [anon_sym_restrict] = ACTIONS(1112), + [anon_sym__Atomic] = ACTIONS(1112), + [anon_sym_signed] = ACTIONS(1112), + [anon_sym_unsigned] = ACTIONS(1112), + [anon_sym_long] = ACTIONS(1112), + [anon_sym_short] = ACTIONS(1112), + [sym_primitive_type] = ACTIONS(1112), + [anon_sym_enum] = ACTIONS(1112), + [anon_sym_struct] = ACTIONS(1112), + [anon_sym_union] = ACTIONS(1112), + [anon_sym_if] = ACTIONS(1112), + [anon_sym_switch] = ACTIONS(1112), + [anon_sym_case] = ACTIONS(1112), + [anon_sym_default] = ACTIONS(1112), + [anon_sym_while] = ACTIONS(1112), + [anon_sym_do] = ACTIONS(1112), + [anon_sym_for] = ACTIONS(1112), + [anon_sym_return] = ACTIONS(1112), + [anon_sym_break] = ACTIONS(1112), + [anon_sym_continue] = ACTIONS(1112), + [anon_sym_goto] = ACTIONS(1112), + [anon_sym_DASH_DASH] = ACTIONS(1114), + [anon_sym_PLUS_PLUS] = ACTIONS(1114), + [anon_sym_sizeof] = ACTIONS(1112), + [sym_number_literal] = ACTIONS(1114), + [anon_sym_L_SQUOTE] = ACTIONS(1114), + [anon_sym_u_SQUOTE] = ACTIONS(1114), + [anon_sym_U_SQUOTE] = ACTIONS(1114), + [anon_sym_u8_SQUOTE] = ACTIONS(1114), + [anon_sym_SQUOTE] = ACTIONS(1114), + [anon_sym_L_DQUOTE] = ACTIONS(1114), + [anon_sym_u_DQUOTE] = ACTIONS(1114), + [anon_sym_U_DQUOTE] = ACTIONS(1114), + [anon_sym_u8_DQUOTE] = ACTIONS(1114), + [anon_sym_DQUOTE] = ACTIONS(1114), + [sym_true] = ACTIONS(1112), + [sym_false] = ACTIONS(1112), + [sym_null] = ACTIONS(1112), + [sym_comment] = ACTIONS(3), + }, + [338] = { + [sym_identifier] = ACTIONS(1108), + [aux_sym_preproc_include_token1] = ACTIONS(1108), + [aux_sym_preproc_def_token1] = ACTIONS(1108), + [aux_sym_preproc_if_token1] = ACTIONS(1108), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1108), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1108), + [sym_preproc_directive] = ACTIONS(1108), + [anon_sym_LPAREN2] = ACTIONS(1110), + [anon_sym_BANG] = ACTIONS(1110), + [anon_sym_TILDE] = ACTIONS(1110), + [anon_sym_DASH] = ACTIONS(1108), + [anon_sym_PLUS] = ACTIONS(1108), + [anon_sym_STAR] = ACTIONS(1110), + [anon_sym_AMP] = ACTIONS(1110), + [anon_sym_SEMI] = ACTIONS(1110), + [anon_sym_typedef] = ACTIONS(1108), + [anon_sym_extern] = ACTIONS(1108), + [anon_sym___attribute__] = ACTIONS(1108), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1110), + [anon_sym___declspec] = ACTIONS(1108), + [anon_sym___cdecl] = ACTIONS(1108), + [anon_sym___clrcall] = ACTIONS(1108), + [anon_sym___stdcall] = ACTIONS(1108), + [anon_sym___fastcall] = ACTIONS(1108), + [anon_sym___thiscall] = ACTIONS(1108), + [anon_sym___vectorcall] = ACTIONS(1108), + [anon_sym_LBRACE] = ACTIONS(1110), + [anon_sym_RBRACE] = ACTIONS(1110), + [anon_sym_static] = ACTIONS(1108), + [anon_sym_auto] = ACTIONS(1108), + [anon_sym_register] = ACTIONS(1108), + [anon_sym_inline] = ACTIONS(1108), + [anon_sym_const] = ACTIONS(1108), + [anon_sym_volatile] = ACTIONS(1108), + [anon_sym_restrict] = ACTIONS(1108), + [anon_sym__Atomic] = ACTIONS(1108), + [anon_sym_signed] = ACTIONS(1108), + [anon_sym_unsigned] = ACTIONS(1108), + [anon_sym_long] = ACTIONS(1108), + [anon_sym_short] = ACTIONS(1108), + [sym_primitive_type] = ACTIONS(1108), + [anon_sym_enum] = ACTIONS(1108), + [anon_sym_struct] = ACTIONS(1108), + [anon_sym_union] = ACTIONS(1108), + [anon_sym_if] = ACTIONS(1108), + [anon_sym_switch] = ACTIONS(1108), + [anon_sym_case] = ACTIONS(1108), + [anon_sym_default] = ACTIONS(1108), + [anon_sym_while] = ACTIONS(1108), + [anon_sym_do] = ACTIONS(1108), + [anon_sym_for] = ACTIONS(1108), + [anon_sym_return] = ACTIONS(1108), + [anon_sym_break] = ACTIONS(1108), + [anon_sym_continue] = ACTIONS(1108), + [anon_sym_goto] = ACTIONS(1108), + [anon_sym_DASH_DASH] = ACTIONS(1110), + [anon_sym_PLUS_PLUS] = ACTIONS(1110), + [anon_sym_sizeof] = ACTIONS(1108), + [sym_number_literal] = ACTIONS(1110), + [anon_sym_L_SQUOTE] = ACTIONS(1110), + [anon_sym_u_SQUOTE] = ACTIONS(1110), + [anon_sym_U_SQUOTE] = ACTIONS(1110), + [anon_sym_u8_SQUOTE] = ACTIONS(1110), + [anon_sym_SQUOTE] = ACTIONS(1110), + [anon_sym_L_DQUOTE] = ACTIONS(1110), + [anon_sym_u_DQUOTE] = ACTIONS(1110), + [anon_sym_U_DQUOTE] = ACTIONS(1110), + [anon_sym_u8_DQUOTE] = ACTIONS(1110), + [anon_sym_DQUOTE] = ACTIONS(1110), + [sym_true] = ACTIONS(1108), + [sym_false] = ACTIONS(1108), + [sym_null] = ACTIONS(1108), + [sym_comment] = ACTIONS(3), + }, + [339] = { + [ts_builtin_sym_end] = ACTIONS(1114), + [sym_identifier] = ACTIONS(1112), + [aux_sym_preproc_include_token1] = ACTIONS(1112), + [aux_sym_preproc_def_token1] = ACTIONS(1112), + [aux_sym_preproc_if_token1] = ACTIONS(1112), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1112), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1112), + [sym_preproc_directive] = ACTIONS(1112), + [anon_sym_LPAREN2] = ACTIONS(1114), + [anon_sym_BANG] = ACTIONS(1114), + [anon_sym_TILDE] = ACTIONS(1114), + [anon_sym_DASH] = ACTIONS(1112), + [anon_sym_PLUS] = ACTIONS(1112), + [anon_sym_STAR] = ACTIONS(1114), + [anon_sym_AMP] = ACTIONS(1114), + [anon_sym_SEMI] = ACTIONS(1114), + [anon_sym_typedef] = ACTIONS(1112), + [anon_sym_extern] = ACTIONS(1112), + [anon_sym___attribute__] = ACTIONS(1112), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1114), + [anon_sym___declspec] = ACTIONS(1112), + [anon_sym___cdecl] = ACTIONS(1112), + [anon_sym___clrcall] = ACTIONS(1112), + [anon_sym___stdcall] = ACTIONS(1112), + [anon_sym___fastcall] = ACTIONS(1112), + [anon_sym___thiscall] = ACTIONS(1112), + [anon_sym___vectorcall] = ACTIONS(1112), + [anon_sym_LBRACE] = ACTIONS(1114), + [anon_sym_static] = ACTIONS(1112), + [anon_sym_auto] = ACTIONS(1112), + [anon_sym_register] = ACTIONS(1112), + [anon_sym_inline] = ACTIONS(1112), + [anon_sym_const] = ACTIONS(1112), + [anon_sym_volatile] = ACTIONS(1112), + [anon_sym_restrict] = ACTIONS(1112), + [anon_sym__Atomic] = ACTIONS(1112), + [anon_sym_signed] = ACTIONS(1112), + [anon_sym_unsigned] = ACTIONS(1112), + [anon_sym_long] = ACTIONS(1112), + [anon_sym_short] = ACTIONS(1112), + [sym_primitive_type] = ACTIONS(1112), + [anon_sym_enum] = ACTIONS(1112), + [anon_sym_struct] = ACTIONS(1112), + [anon_sym_union] = ACTIONS(1112), + [anon_sym_if] = ACTIONS(1112), + [anon_sym_switch] = ACTIONS(1112), + [anon_sym_case] = ACTIONS(1112), + [anon_sym_default] = ACTIONS(1112), + [anon_sym_while] = ACTIONS(1112), + [anon_sym_do] = ACTIONS(1112), + [anon_sym_for] = ACTIONS(1112), + [anon_sym_return] = ACTIONS(1112), + [anon_sym_break] = ACTIONS(1112), + [anon_sym_continue] = ACTIONS(1112), + [anon_sym_goto] = ACTIONS(1112), + [anon_sym_DASH_DASH] = ACTIONS(1114), + [anon_sym_PLUS_PLUS] = ACTIONS(1114), + [anon_sym_sizeof] = ACTIONS(1112), + [sym_number_literal] = ACTIONS(1114), + [anon_sym_L_SQUOTE] = ACTIONS(1114), + [anon_sym_u_SQUOTE] = ACTIONS(1114), + [anon_sym_U_SQUOTE] = ACTIONS(1114), + [anon_sym_u8_SQUOTE] = ACTIONS(1114), + [anon_sym_SQUOTE] = ACTIONS(1114), + [anon_sym_L_DQUOTE] = ACTIONS(1114), + [anon_sym_u_DQUOTE] = ACTIONS(1114), + [anon_sym_U_DQUOTE] = ACTIONS(1114), + [anon_sym_u8_DQUOTE] = ACTIONS(1114), + [anon_sym_DQUOTE] = ACTIONS(1114), + [sym_true] = ACTIONS(1112), + [sym_false] = ACTIONS(1112), + [sym_null] = ACTIONS(1112), + [sym_comment] = ACTIONS(3), + }, + [340] = { + [ts_builtin_sym_end] = ACTIONS(1054), + [sym_identifier] = ACTIONS(1052), + [aux_sym_preproc_include_token1] = ACTIONS(1052), + [aux_sym_preproc_def_token1] = ACTIONS(1052), + [aux_sym_preproc_if_token1] = ACTIONS(1052), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1052), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1052), + [sym_preproc_directive] = ACTIONS(1052), + [anon_sym_LPAREN2] = ACTIONS(1054), + [anon_sym_BANG] = ACTIONS(1054), + [anon_sym_TILDE] = ACTIONS(1054), + [anon_sym_DASH] = ACTIONS(1052), + [anon_sym_PLUS] = ACTIONS(1052), + [anon_sym_STAR] = ACTIONS(1054), + [anon_sym_AMP] = ACTIONS(1054), + [anon_sym_SEMI] = ACTIONS(1054), + [anon_sym_typedef] = ACTIONS(1052), + [anon_sym_extern] = ACTIONS(1052), + [anon_sym___attribute__] = ACTIONS(1052), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1054), + [anon_sym___declspec] = ACTIONS(1052), + [anon_sym___cdecl] = ACTIONS(1052), + [anon_sym___clrcall] = ACTIONS(1052), + [anon_sym___stdcall] = ACTIONS(1052), + [anon_sym___fastcall] = ACTIONS(1052), + [anon_sym___thiscall] = ACTIONS(1052), + [anon_sym___vectorcall] = ACTIONS(1052), + [anon_sym_LBRACE] = ACTIONS(1054), + [anon_sym_static] = ACTIONS(1052), + [anon_sym_auto] = ACTIONS(1052), + [anon_sym_register] = ACTIONS(1052), + [anon_sym_inline] = ACTIONS(1052), + [anon_sym_const] = ACTIONS(1052), + [anon_sym_volatile] = ACTIONS(1052), + [anon_sym_restrict] = ACTIONS(1052), + [anon_sym__Atomic] = ACTIONS(1052), + [anon_sym_signed] = ACTIONS(1052), + [anon_sym_unsigned] = ACTIONS(1052), + [anon_sym_long] = ACTIONS(1052), + [anon_sym_short] = ACTIONS(1052), + [sym_primitive_type] = ACTIONS(1052), + [anon_sym_enum] = ACTIONS(1052), + [anon_sym_struct] = ACTIONS(1052), + [anon_sym_union] = ACTIONS(1052), + [anon_sym_if] = ACTIONS(1052), + [anon_sym_switch] = ACTIONS(1052), + [anon_sym_case] = ACTIONS(1052), + [anon_sym_default] = ACTIONS(1052), + [anon_sym_while] = ACTIONS(1052), + [anon_sym_do] = ACTIONS(1052), + [anon_sym_for] = ACTIONS(1052), + [anon_sym_return] = ACTIONS(1052), + [anon_sym_break] = ACTIONS(1052), + [anon_sym_continue] = ACTIONS(1052), + [anon_sym_goto] = ACTIONS(1052), + [anon_sym_DASH_DASH] = ACTIONS(1054), + [anon_sym_PLUS_PLUS] = ACTIONS(1054), + [anon_sym_sizeof] = ACTIONS(1052), + [sym_number_literal] = ACTIONS(1054), + [anon_sym_L_SQUOTE] = ACTIONS(1054), + [anon_sym_u_SQUOTE] = ACTIONS(1054), + [anon_sym_U_SQUOTE] = ACTIONS(1054), + [anon_sym_u8_SQUOTE] = ACTIONS(1054), + [anon_sym_SQUOTE] = ACTIONS(1054), + [anon_sym_L_DQUOTE] = ACTIONS(1054), + [anon_sym_u_DQUOTE] = ACTIONS(1054), + [anon_sym_U_DQUOTE] = ACTIONS(1054), + [anon_sym_u8_DQUOTE] = ACTIONS(1054), + [anon_sym_DQUOTE] = ACTIONS(1054), + [sym_true] = ACTIONS(1052), + [sym_false] = ACTIONS(1052), + [sym_null] = ACTIONS(1052), + [sym_comment] = ACTIONS(3), + }, + [341] = { + [sym_identifier] = ACTIONS(1096), + [aux_sym_preproc_include_token1] = ACTIONS(1096), + [aux_sym_preproc_def_token1] = ACTIONS(1096), + [aux_sym_preproc_if_token1] = ACTIONS(1096), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1096), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1096), + [sym_preproc_directive] = ACTIONS(1096), + [anon_sym_LPAREN2] = ACTIONS(1098), + [anon_sym_BANG] = ACTIONS(1098), + [anon_sym_TILDE] = ACTIONS(1098), + [anon_sym_DASH] = ACTIONS(1096), + [anon_sym_PLUS] = ACTIONS(1096), + [anon_sym_STAR] = ACTIONS(1098), + [anon_sym_AMP] = ACTIONS(1098), + [anon_sym_SEMI] = ACTIONS(1098), + [anon_sym_typedef] = ACTIONS(1096), + [anon_sym_extern] = ACTIONS(1096), + [anon_sym___attribute__] = ACTIONS(1096), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1098), + [anon_sym___declspec] = ACTIONS(1096), + [anon_sym___cdecl] = ACTIONS(1096), + [anon_sym___clrcall] = ACTIONS(1096), + [anon_sym___stdcall] = ACTIONS(1096), + [anon_sym___fastcall] = ACTIONS(1096), + [anon_sym___thiscall] = ACTIONS(1096), + [anon_sym___vectorcall] = ACTIONS(1096), + [anon_sym_LBRACE] = ACTIONS(1098), + [anon_sym_RBRACE] = ACTIONS(1098), + [anon_sym_static] = ACTIONS(1096), + [anon_sym_auto] = ACTIONS(1096), + [anon_sym_register] = ACTIONS(1096), + [anon_sym_inline] = ACTIONS(1096), + [anon_sym_const] = ACTIONS(1096), + [anon_sym_volatile] = ACTIONS(1096), + [anon_sym_restrict] = ACTIONS(1096), + [anon_sym__Atomic] = ACTIONS(1096), + [anon_sym_signed] = ACTIONS(1096), + [anon_sym_unsigned] = ACTIONS(1096), + [anon_sym_long] = ACTIONS(1096), + [anon_sym_short] = ACTIONS(1096), + [sym_primitive_type] = ACTIONS(1096), + [anon_sym_enum] = ACTIONS(1096), + [anon_sym_struct] = ACTIONS(1096), + [anon_sym_union] = ACTIONS(1096), + [anon_sym_if] = ACTIONS(1096), + [anon_sym_switch] = ACTIONS(1096), + [anon_sym_case] = ACTIONS(1096), + [anon_sym_default] = ACTIONS(1096), + [anon_sym_while] = ACTIONS(1096), + [anon_sym_do] = ACTIONS(1096), + [anon_sym_for] = ACTIONS(1096), + [anon_sym_return] = ACTIONS(1096), + [anon_sym_break] = ACTIONS(1096), + [anon_sym_continue] = ACTIONS(1096), + [anon_sym_goto] = ACTIONS(1096), + [anon_sym_DASH_DASH] = ACTIONS(1098), + [anon_sym_PLUS_PLUS] = ACTIONS(1098), + [anon_sym_sizeof] = ACTIONS(1096), + [sym_number_literal] = ACTIONS(1098), + [anon_sym_L_SQUOTE] = ACTIONS(1098), + [anon_sym_u_SQUOTE] = ACTIONS(1098), + [anon_sym_U_SQUOTE] = ACTIONS(1098), + [anon_sym_u8_SQUOTE] = ACTIONS(1098), + [anon_sym_SQUOTE] = ACTIONS(1098), + [anon_sym_L_DQUOTE] = ACTIONS(1098), + [anon_sym_u_DQUOTE] = ACTIONS(1098), + [anon_sym_U_DQUOTE] = ACTIONS(1098), + [anon_sym_u8_DQUOTE] = ACTIONS(1098), + [anon_sym_DQUOTE] = ACTIONS(1098), + [sym_true] = ACTIONS(1096), + [sym_false] = ACTIONS(1096), + [sym_null] = ACTIONS(1096), + [sym_comment] = ACTIONS(3), + }, + [342] = { + [sym_identifier] = ACTIONS(1056), + [aux_sym_preproc_include_token1] = ACTIONS(1056), + [aux_sym_preproc_def_token1] = ACTIONS(1056), + [aux_sym_preproc_if_token1] = ACTIONS(1056), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1056), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1056), + [sym_preproc_directive] = ACTIONS(1056), + [anon_sym_LPAREN2] = ACTIONS(1058), + [anon_sym_BANG] = ACTIONS(1058), + [anon_sym_TILDE] = ACTIONS(1058), + [anon_sym_DASH] = ACTIONS(1056), + [anon_sym_PLUS] = ACTIONS(1056), + [anon_sym_STAR] = ACTIONS(1058), + [anon_sym_AMP] = ACTIONS(1058), + [anon_sym_SEMI] = ACTIONS(1058), + [anon_sym_typedef] = ACTIONS(1056), + [anon_sym_extern] = ACTIONS(1056), + [anon_sym___attribute__] = ACTIONS(1056), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1058), + [anon_sym___declspec] = ACTIONS(1056), + [anon_sym___cdecl] = ACTIONS(1056), + [anon_sym___clrcall] = ACTIONS(1056), + [anon_sym___stdcall] = ACTIONS(1056), + [anon_sym___fastcall] = ACTIONS(1056), + [anon_sym___thiscall] = ACTIONS(1056), + [anon_sym___vectorcall] = ACTIONS(1056), + [anon_sym_LBRACE] = ACTIONS(1058), + [anon_sym_RBRACE] = ACTIONS(1058), + [anon_sym_static] = ACTIONS(1056), + [anon_sym_auto] = ACTIONS(1056), + [anon_sym_register] = ACTIONS(1056), + [anon_sym_inline] = ACTIONS(1056), + [anon_sym_const] = ACTIONS(1056), + [anon_sym_volatile] = ACTIONS(1056), + [anon_sym_restrict] = ACTIONS(1056), + [anon_sym__Atomic] = ACTIONS(1056), + [anon_sym_signed] = ACTIONS(1056), + [anon_sym_unsigned] = ACTIONS(1056), + [anon_sym_long] = ACTIONS(1056), + [anon_sym_short] = ACTIONS(1056), + [sym_primitive_type] = ACTIONS(1056), + [anon_sym_enum] = ACTIONS(1056), + [anon_sym_struct] = ACTIONS(1056), + [anon_sym_union] = ACTIONS(1056), + [anon_sym_if] = ACTIONS(1056), + [anon_sym_switch] = ACTIONS(1056), + [anon_sym_case] = ACTIONS(1056), + [anon_sym_default] = ACTIONS(1056), + [anon_sym_while] = ACTIONS(1056), + [anon_sym_do] = ACTIONS(1056), + [anon_sym_for] = ACTIONS(1056), + [anon_sym_return] = ACTIONS(1056), + [anon_sym_break] = ACTIONS(1056), + [anon_sym_continue] = ACTIONS(1056), + [anon_sym_goto] = ACTIONS(1056), + [anon_sym_DASH_DASH] = ACTIONS(1058), + [anon_sym_PLUS_PLUS] = ACTIONS(1058), + [anon_sym_sizeof] = ACTIONS(1056), + [sym_number_literal] = ACTIONS(1058), + [anon_sym_L_SQUOTE] = ACTIONS(1058), + [anon_sym_u_SQUOTE] = ACTIONS(1058), + [anon_sym_U_SQUOTE] = ACTIONS(1058), + [anon_sym_u8_SQUOTE] = ACTIONS(1058), + [anon_sym_SQUOTE] = ACTIONS(1058), + [anon_sym_L_DQUOTE] = ACTIONS(1058), + [anon_sym_u_DQUOTE] = ACTIONS(1058), + [anon_sym_U_DQUOTE] = ACTIONS(1058), + [anon_sym_u8_DQUOTE] = ACTIONS(1058), + [anon_sym_DQUOTE] = ACTIONS(1058), + [sym_true] = ACTIONS(1056), + [sym_false] = ACTIONS(1056), + [sym_null] = ACTIONS(1056), + [sym_comment] = ACTIONS(3), + }, + [343] = { + [sym_identifier] = ACTIONS(1064), + [aux_sym_preproc_include_token1] = ACTIONS(1064), + [aux_sym_preproc_def_token1] = ACTIONS(1064), + [aux_sym_preproc_if_token1] = ACTIONS(1064), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1064), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1064), + [sym_preproc_directive] = ACTIONS(1064), + [anon_sym_LPAREN2] = ACTIONS(1066), + [anon_sym_BANG] = ACTIONS(1066), + [anon_sym_TILDE] = ACTIONS(1066), + [anon_sym_DASH] = ACTIONS(1064), + [anon_sym_PLUS] = ACTIONS(1064), + [anon_sym_STAR] = ACTIONS(1066), + [anon_sym_AMP] = ACTIONS(1066), + [anon_sym_SEMI] = ACTIONS(1066), + [anon_sym_typedef] = ACTIONS(1064), + [anon_sym_extern] = ACTIONS(1064), + [anon_sym___attribute__] = ACTIONS(1064), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1066), + [anon_sym___declspec] = ACTIONS(1064), + [anon_sym___cdecl] = ACTIONS(1064), + [anon_sym___clrcall] = ACTIONS(1064), + [anon_sym___stdcall] = ACTIONS(1064), + [anon_sym___fastcall] = ACTIONS(1064), + [anon_sym___thiscall] = ACTIONS(1064), + [anon_sym___vectorcall] = ACTIONS(1064), + [anon_sym_LBRACE] = ACTIONS(1066), + [anon_sym_RBRACE] = ACTIONS(1066), + [anon_sym_static] = ACTIONS(1064), + [anon_sym_auto] = ACTIONS(1064), + [anon_sym_register] = ACTIONS(1064), + [anon_sym_inline] = ACTIONS(1064), + [anon_sym_const] = ACTIONS(1064), + [anon_sym_volatile] = ACTIONS(1064), + [anon_sym_restrict] = ACTIONS(1064), + [anon_sym__Atomic] = ACTIONS(1064), + [anon_sym_signed] = ACTIONS(1064), + [anon_sym_unsigned] = ACTIONS(1064), + [anon_sym_long] = ACTIONS(1064), + [anon_sym_short] = ACTIONS(1064), + [sym_primitive_type] = ACTIONS(1064), + [anon_sym_enum] = ACTIONS(1064), + [anon_sym_struct] = ACTIONS(1064), + [anon_sym_union] = ACTIONS(1064), + [anon_sym_if] = ACTIONS(1064), + [anon_sym_switch] = ACTIONS(1064), + [anon_sym_case] = ACTIONS(1064), + [anon_sym_default] = ACTIONS(1064), + [anon_sym_while] = ACTIONS(1064), + [anon_sym_do] = ACTIONS(1064), + [anon_sym_for] = ACTIONS(1064), + [anon_sym_return] = ACTIONS(1064), + [anon_sym_break] = ACTIONS(1064), + [anon_sym_continue] = ACTIONS(1064), + [anon_sym_goto] = ACTIONS(1064), + [anon_sym_DASH_DASH] = ACTIONS(1066), + [anon_sym_PLUS_PLUS] = ACTIONS(1066), + [anon_sym_sizeof] = ACTIONS(1064), + [sym_number_literal] = ACTIONS(1066), + [anon_sym_L_SQUOTE] = ACTIONS(1066), + [anon_sym_u_SQUOTE] = ACTIONS(1066), + [anon_sym_U_SQUOTE] = ACTIONS(1066), + [anon_sym_u8_SQUOTE] = ACTIONS(1066), + [anon_sym_SQUOTE] = ACTIONS(1066), + [anon_sym_L_DQUOTE] = ACTIONS(1066), + [anon_sym_u_DQUOTE] = ACTIONS(1066), + [anon_sym_U_DQUOTE] = ACTIONS(1066), + [anon_sym_u8_DQUOTE] = ACTIONS(1066), + [anon_sym_DQUOTE] = ACTIONS(1066), + [sym_true] = ACTIONS(1064), + [sym_false] = ACTIONS(1064), + [sym_null] = ACTIONS(1064), + [sym_comment] = ACTIONS(3), + }, + [344] = { + [ts_builtin_sym_end] = ACTIONS(1102), + [sym_identifier] = ACTIONS(1100), + [aux_sym_preproc_include_token1] = ACTIONS(1100), + [aux_sym_preproc_def_token1] = ACTIONS(1100), + [aux_sym_preproc_if_token1] = ACTIONS(1100), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1100), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1100), + [sym_preproc_directive] = ACTIONS(1100), + [anon_sym_LPAREN2] = ACTIONS(1102), + [anon_sym_BANG] = ACTIONS(1102), + [anon_sym_TILDE] = ACTIONS(1102), + [anon_sym_DASH] = ACTIONS(1100), + [anon_sym_PLUS] = ACTIONS(1100), + [anon_sym_STAR] = ACTIONS(1102), + [anon_sym_AMP] = ACTIONS(1102), + [anon_sym_SEMI] = ACTIONS(1102), + [anon_sym_typedef] = ACTIONS(1100), + [anon_sym_extern] = ACTIONS(1100), + [anon_sym___attribute__] = ACTIONS(1100), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1102), + [anon_sym___declspec] = ACTIONS(1100), + [anon_sym___cdecl] = ACTIONS(1100), + [anon_sym___clrcall] = ACTIONS(1100), + [anon_sym___stdcall] = ACTIONS(1100), + [anon_sym___fastcall] = ACTIONS(1100), + [anon_sym___thiscall] = ACTIONS(1100), + [anon_sym___vectorcall] = ACTIONS(1100), + [anon_sym_LBRACE] = ACTIONS(1102), + [anon_sym_static] = ACTIONS(1100), + [anon_sym_auto] = ACTIONS(1100), + [anon_sym_register] = ACTIONS(1100), + [anon_sym_inline] = ACTIONS(1100), + [anon_sym_const] = ACTIONS(1100), + [anon_sym_volatile] = ACTIONS(1100), + [anon_sym_restrict] = ACTIONS(1100), + [anon_sym__Atomic] = ACTIONS(1100), + [anon_sym_signed] = ACTIONS(1100), + [anon_sym_unsigned] = ACTIONS(1100), + [anon_sym_long] = ACTIONS(1100), + [anon_sym_short] = ACTIONS(1100), + [sym_primitive_type] = ACTIONS(1100), + [anon_sym_enum] = ACTIONS(1100), + [anon_sym_struct] = ACTIONS(1100), + [anon_sym_union] = ACTIONS(1100), + [anon_sym_if] = ACTIONS(1100), + [anon_sym_switch] = ACTIONS(1100), + [anon_sym_case] = ACTIONS(1100), + [anon_sym_default] = ACTIONS(1100), + [anon_sym_while] = ACTIONS(1100), + [anon_sym_do] = ACTIONS(1100), + [anon_sym_for] = ACTIONS(1100), + [anon_sym_return] = ACTIONS(1100), + [anon_sym_break] = ACTIONS(1100), + [anon_sym_continue] = ACTIONS(1100), + [anon_sym_goto] = ACTIONS(1100), + [anon_sym_DASH_DASH] = ACTIONS(1102), + [anon_sym_PLUS_PLUS] = ACTIONS(1102), + [anon_sym_sizeof] = ACTIONS(1100), + [sym_number_literal] = ACTIONS(1102), + [anon_sym_L_SQUOTE] = ACTIONS(1102), + [anon_sym_u_SQUOTE] = ACTIONS(1102), + [anon_sym_U_SQUOTE] = ACTIONS(1102), + [anon_sym_u8_SQUOTE] = ACTIONS(1102), + [anon_sym_SQUOTE] = ACTIONS(1102), + [anon_sym_L_DQUOTE] = ACTIONS(1102), + [anon_sym_u_DQUOTE] = ACTIONS(1102), + [anon_sym_U_DQUOTE] = ACTIONS(1102), + [anon_sym_u8_DQUOTE] = ACTIONS(1102), + [anon_sym_DQUOTE] = ACTIONS(1102), + [sym_true] = ACTIONS(1100), + [sym_false] = ACTIONS(1100), + [sym_null] = ACTIONS(1100), + [sym_comment] = ACTIONS(3), + }, + [345] = { + [sym_identifier] = ACTIONS(1048), + [aux_sym_preproc_include_token1] = ACTIONS(1048), + [aux_sym_preproc_def_token1] = ACTIONS(1048), + [aux_sym_preproc_if_token1] = ACTIONS(1048), + [aux_sym_preproc_if_token2] = ACTIONS(1048), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1048), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1048), + [sym_preproc_directive] = ACTIONS(1048), + [anon_sym_LPAREN2] = ACTIONS(1050), + [anon_sym_BANG] = ACTIONS(1050), + [anon_sym_TILDE] = ACTIONS(1050), + [anon_sym_DASH] = ACTIONS(1048), + [anon_sym_PLUS] = ACTIONS(1048), + [anon_sym_STAR] = ACTIONS(1050), + [anon_sym_AMP] = ACTIONS(1050), + [anon_sym_SEMI] = ACTIONS(1050), + [anon_sym_typedef] = ACTIONS(1048), + [anon_sym_extern] = ACTIONS(1048), + [anon_sym___attribute__] = ACTIONS(1048), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1050), + [anon_sym___declspec] = ACTIONS(1048), + [anon_sym___cdecl] = ACTIONS(1048), + [anon_sym___clrcall] = ACTIONS(1048), + [anon_sym___stdcall] = ACTIONS(1048), + [anon_sym___fastcall] = ACTIONS(1048), + [anon_sym___thiscall] = ACTIONS(1048), + [anon_sym___vectorcall] = ACTIONS(1048), + [anon_sym_LBRACE] = ACTIONS(1050), + [anon_sym_static] = ACTIONS(1048), + [anon_sym_auto] = ACTIONS(1048), + [anon_sym_register] = ACTIONS(1048), + [anon_sym_inline] = ACTIONS(1048), + [anon_sym_const] = ACTIONS(1048), + [anon_sym_volatile] = ACTIONS(1048), + [anon_sym_restrict] = ACTIONS(1048), + [anon_sym__Atomic] = ACTIONS(1048), + [anon_sym_signed] = ACTIONS(1048), + [anon_sym_unsigned] = ACTIONS(1048), + [anon_sym_long] = ACTIONS(1048), + [anon_sym_short] = ACTIONS(1048), + [sym_primitive_type] = ACTIONS(1048), + [anon_sym_enum] = ACTIONS(1048), + [anon_sym_struct] = ACTIONS(1048), + [anon_sym_union] = ACTIONS(1048), + [anon_sym_if] = ACTIONS(1048), + [anon_sym_switch] = ACTIONS(1048), + [anon_sym_case] = ACTIONS(1048), + [anon_sym_default] = ACTIONS(1048), + [anon_sym_while] = ACTIONS(1048), + [anon_sym_do] = ACTIONS(1048), + [anon_sym_for] = ACTIONS(1048), + [anon_sym_return] = ACTIONS(1048), + [anon_sym_break] = ACTIONS(1048), + [anon_sym_continue] = ACTIONS(1048), + [anon_sym_goto] = ACTIONS(1048), + [anon_sym_DASH_DASH] = ACTIONS(1050), + [anon_sym_PLUS_PLUS] = ACTIONS(1050), + [anon_sym_sizeof] = ACTIONS(1048), + [sym_number_literal] = ACTIONS(1050), + [anon_sym_L_SQUOTE] = ACTIONS(1050), + [anon_sym_u_SQUOTE] = ACTIONS(1050), + [anon_sym_U_SQUOTE] = ACTIONS(1050), + [anon_sym_u8_SQUOTE] = ACTIONS(1050), + [anon_sym_SQUOTE] = ACTIONS(1050), + [anon_sym_L_DQUOTE] = ACTIONS(1050), + [anon_sym_u_DQUOTE] = ACTIONS(1050), + [anon_sym_U_DQUOTE] = ACTIONS(1050), + [anon_sym_u8_DQUOTE] = ACTIONS(1050), + [anon_sym_DQUOTE] = ACTIONS(1050), + [sym_true] = ACTIONS(1048), + [sym_false] = ACTIONS(1048), + [sym_null] = ACTIONS(1048), + [sym_comment] = ACTIONS(3), + }, + [346] = { + [ts_builtin_sym_end] = ACTIONS(1094), + [sym_identifier] = ACTIONS(1092), + [aux_sym_preproc_include_token1] = ACTIONS(1092), + [aux_sym_preproc_def_token1] = ACTIONS(1092), + [aux_sym_preproc_if_token1] = ACTIONS(1092), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1092), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1092), + [sym_preproc_directive] = ACTIONS(1092), + [anon_sym_LPAREN2] = ACTIONS(1094), + [anon_sym_BANG] = ACTIONS(1094), + [anon_sym_TILDE] = ACTIONS(1094), + [anon_sym_DASH] = ACTIONS(1092), + [anon_sym_PLUS] = ACTIONS(1092), + [anon_sym_STAR] = ACTIONS(1094), + [anon_sym_AMP] = ACTIONS(1094), + [anon_sym_SEMI] = ACTIONS(1094), + [anon_sym_typedef] = ACTIONS(1092), + [anon_sym_extern] = ACTIONS(1092), + [anon_sym___attribute__] = ACTIONS(1092), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1094), + [anon_sym___declspec] = ACTIONS(1092), + [anon_sym___cdecl] = ACTIONS(1092), + [anon_sym___clrcall] = ACTIONS(1092), + [anon_sym___stdcall] = ACTIONS(1092), + [anon_sym___fastcall] = ACTIONS(1092), + [anon_sym___thiscall] = ACTIONS(1092), + [anon_sym___vectorcall] = ACTIONS(1092), + [anon_sym_LBRACE] = ACTIONS(1094), + [anon_sym_static] = ACTIONS(1092), + [anon_sym_auto] = ACTIONS(1092), + [anon_sym_register] = ACTIONS(1092), + [anon_sym_inline] = ACTIONS(1092), + [anon_sym_const] = ACTIONS(1092), + [anon_sym_volatile] = ACTIONS(1092), + [anon_sym_restrict] = ACTIONS(1092), + [anon_sym__Atomic] = ACTIONS(1092), + [anon_sym_signed] = ACTIONS(1092), + [anon_sym_unsigned] = ACTIONS(1092), + [anon_sym_long] = ACTIONS(1092), + [anon_sym_short] = ACTIONS(1092), + [sym_primitive_type] = ACTIONS(1092), + [anon_sym_enum] = ACTIONS(1092), + [anon_sym_struct] = ACTIONS(1092), + [anon_sym_union] = ACTIONS(1092), + [anon_sym_if] = ACTIONS(1092), + [anon_sym_switch] = ACTIONS(1092), + [anon_sym_case] = ACTIONS(1092), + [anon_sym_default] = ACTIONS(1092), + [anon_sym_while] = ACTIONS(1092), + [anon_sym_do] = ACTIONS(1092), + [anon_sym_for] = ACTIONS(1092), + [anon_sym_return] = ACTIONS(1092), + [anon_sym_break] = ACTIONS(1092), + [anon_sym_continue] = ACTIONS(1092), + [anon_sym_goto] = ACTIONS(1092), + [anon_sym_DASH_DASH] = ACTIONS(1094), + [anon_sym_PLUS_PLUS] = ACTIONS(1094), + [anon_sym_sizeof] = ACTIONS(1092), + [sym_number_literal] = ACTIONS(1094), + [anon_sym_L_SQUOTE] = ACTIONS(1094), + [anon_sym_u_SQUOTE] = ACTIONS(1094), + [anon_sym_U_SQUOTE] = ACTIONS(1094), + [anon_sym_u8_SQUOTE] = ACTIONS(1094), + [anon_sym_SQUOTE] = ACTIONS(1094), + [anon_sym_L_DQUOTE] = ACTIONS(1094), + [anon_sym_u_DQUOTE] = ACTIONS(1094), + [anon_sym_U_DQUOTE] = ACTIONS(1094), + [anon_sym_u8_DQUOTE] = ACTIONS(1094), + [anon_sym_DQUOTE] = ACTIONS(1094), + [sym_true] = ACTIONS(1092), + [sym_false] = ACTIONS(1092), + [sym_null] = ACTIONS(1092), + [sym_comment] = ACTIONS(3), + }, + [347] = { + [sym_identifier] = ACTIONS(1076), + [aux_sym_preproc_include_token1] = ACTIONS(1076), + [aux_sym_preproc_def_token1] = ACTIONS(1076), + [aux_sym_preproc_if_token1] = ACTIONS(1076), + [aux_sym_preproc_if_token2] = ACTIONS(1076), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1076), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1076), + [sym_preproc_directive] = ACTIONS(1076), + [anon_sym_LPAREN2] = ACTIONS(1078), + [anon_sym_BANG] = ACTIONS(1078), + [anon_sym_TILDE] = ACTIONS(1078), + [anon_sym_DASH] = ACTIONS(1076), + [anon_sym_PLUS] = ACTIONS(1076), + [anon_sym_STAR] = ACTIONS(1078), + [anon_sym_AMP] = ACTIONS(1078), + [anon_sym_SEMI] = ACTIONS(1078), + [anon_sym_typedef] = ACTIONS(1076), + [anon_sym_extern] = ACTIONS(1076), + [anon_sym___attribute__] = ACTIONS(1076), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1078), + [anon_sym___declspec] = ACTIONS(1076), + [anon_sym___cdecl] = ACTIONS(1076), + [anon_sym___clrcall] = ACTIONS(1076), + [anon_sym___stdcall] = ACTIONS(1076), + [anon_sym___fastcall] = ACTIONS(1076), + [anon_sym___thiscall] = ACTIONS(1076), + [anon_sym___vectorcall] = ACTIONS(1076), + [anon_sym_LBRACE] = ACTIONS(1078), + [anon_sym_static] = ACTIONS(1076), + [anon_sym_auto] = ACTIONS(1076), + [anon_sym_register] = ACTIONS(1076), + [anon_sym_inline] = ACTIONS(1076), + [anon_sym_const] = ACTIONS(1076), + [anon_sym_volatile] = ACTIONS(1076), + [anon_sym_restrict] = ACTIONS(1076), + [anon_sym__Atomic] = ACTIONS(1076), + [anon_sym_signed] = ACTIONS(1076), + [anon_sym_unsigned] = ACTIONS(1076), + [anon_sym_long] = ACTIONS(1076), + [anon_sym_short] = ACTIONS(1076), + [sym_primitive_type] = ACTIONS(1076), + [anon_sym_enum] = ACTIONS(1076), + [anon_sym_struct] = ACTIONS(1076), + [anon_sym_union] = ACTIONS(1076), + [anon_sym_if] = ACTIONS(1076), + [anon_sym_switch] = ACTIONS(1076), + [anon_sym_case] = ACTIONS(1076), + [anon_sym_default] = ACTIONS(1076), + [anon_sym_while] = ACTIONS(1076), + [anon_sym_do] = ACTIONS(1076), + [anon_sym_for] = ACTIONS(1076), + [anon_sym_return] = ACTIONS(1076), + [anon_sym_break] = ACTIONS(1076), + [anon_sym_continue] = ACTIONS(1076), + [anon_sym_goto] = ACTIONS(1076), + [anon_sym_DASH_DASH] = ACTIONS(1078), + [anon_sym_PLUS_PLUS] = ACTIONS(1078), + [anon_sym_sizeof] = ACTIONS(1076), + [sym_number_literal] = ACTIONS(1078), + [anon_sym_L_SQUOTE] = ACTIONS(1078), + [anon_sym_u_SQUOTE] = ACTIONS(1078), + [anon_sym_U_SQUOTE] = ACTIONS(1078), + [anon_sym_u8_SQUOTE] = ACTIONS(1078), + [anon_sym_SQUOTE] = ACTIONS(1078), + [anon_sym_L_DQUOTE] = ACTIONS(1078), + [anon_sym_u_DQUOTE] = ACTIONS(1078), + [anon_sym_U_DQUOTE] = ACTIONS(1078), + [anon_sym_u8_DQUOTE] = ACTIONS(1078), + [anon_sym_DQUOTE] = ACTIONS(1078), + [sym_true] = ACTIONS(1076), + [sym_false] = ACTIONS(1076), + [sym_null] = ACTIONS(1076), + [sym_comment] = ACTIONS(3), + }, + [348] = { + [sym_identifier] = ACTIONS(1032), + [aux_sym_preproc_include_token1] = ACTIONS(1032), + [aux_sym_preproc_def_token1] = ACTIONS(1032), + [aux_sym_preproc_if_token1] = ACTIONS(1032), + [aux_sym_preproc_if_token2] = ACTIONS(1032), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1032), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1032), + [sym_preproc_directive] = ACTIONS(1032), + [anon_sym_LPAREN2] = ACTIONS(1034), + [anon_sym_BANG] = ACTIONS(1034), + [anon_sym_TILDE] = ACTIONS(1034), + [anon_sym_DASH] = ACTIONS(1032), + [anon_sym_PLUS] = ACTIONS(1032), + [anon_sym_STAR] = ACTIONS(1034), + [anon_sym_AMP] = ACTIONS(1034), + [anon_sym_SEMI] = ACTIONS(1034), + [anon_sym_typedef] = ACTIONS(1032), + [anon_sym_extern] = ACTIONS(1032), + [anon_sym___attribute__] = ACTIONS(1032), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1034), + [anon_sym___declspec] = ACTIONS(1032), + [anon_sym___cdecl] = ACTIONS(1032), + [anon_sym___clrcall] = ACTIONS(1032), + [anon_sym___stdcall] = ACTIONS(1032), + [anon_sym___fastcall] = ACTIONS(1032), + [anon_sym___thiscall] = ACTIONS(1032), + [anon_sym___vectorcall] = ACTIONS(1032), + [anon_sym_LBRACE] = ACTIONS(1034), + [anon_sym_static] = ACTIONS(1032), + [anon_sym_auto] = ACTIONS(1032), + [anon_sym_register] = ACTIONS(1032), + [anon_sym_inline] = ACTIONS(1032), + [anon_sym_const] = ACTIONS(1032), + [anon_sym_volatile] = ACTIONS(1032), + [anon_sym_restrict] = ACTIONS(1032), + [anon_sym__Atomic] = ACTIONS(1032), + [anon_sym_signed] = ACTIONS(1032), + [anon_sym_unsigned] = ACTIONS(1032), + [anon_sym_long] = ACTIONS(1032), + [anon_sym_short] = ACTIONS(1032), + [sym_primitive_type] = ACTIONS(1032), + [anon_sym_enum] = ACTIONS(1032), + [anon_sym_struct] = ACTIONS(1032), + [anon_sym_union] = ACTIONS(1032), + [anon_sym_if] = ACTIONS(1032), + [anon_sym_switch] = ACTIONS(1032), + [anon_sym_case] = ACTIONS(1032), + [anon_sym_default] = ACTIONS(1032), + [anon_sym_while] = ACTIONS(1032), + [anon_sym_do] = ACTIONS(1032), + [anon_sym_for] = ACTIONS(1032), + [anon_sym_return] = ACTIONS(1032), + [anon_sym_break] = ACTIONS(1032), + [anon_sym_continue] = ACTIONS(1032), + [anon_sym_goto] = ACTIONS(1032), + [anon_sym_DASH_DASH] = ACTIONS(1034), + [anon_sym_PLUS_PLUS] = ACTIONS(1034), + [anon_sym_sizeof] = ACTIONS(1032), + [sym_number_literal] = ACTIONS(1034), + [anon_sym_L_SQUOTE] = ACTIONS(1034), + [anon_sym_u_SQUOTE] = ACTIONS(1034), + [anon_sym_U_SQUOTE] = ACTIONS(1034), + [anon_sym_u8_SQUOTE] = ACTIONS(1034), + [anon_sym_SQUOTE] = ACTIONS(1034), + [anon_sym_L_DQUOTE] = ACTIONS(1034), + [anon_sym_u_DQUOTE] = ACTIONS(1034), + [anon_sym_U_DQUOTE] = ACTIONS(1034), + [anon_sym_u8_DQUOTE] = ACTIONS(1034), + [anon_sym_DQUOTE] = ACTIONS(1034), + [sym_true] = ACTIONS(1032), + [sym_false] = ACTIONS(1032), + [sym_null] = ACTIONS(1032), + [sym_comment] = ACTIONS(3), + }, + [349] = { + [ts_builtin_sym_end] = ACTIONS(1066), + [sym_identifier] = ACTIONS(1064), + [aux_sym_preproc_include_token1] = ACTIONS(1064), + [aux_sym_preproc_def_token1] = ACTIONS(1064), + [aux_sym_preproc_if_token1] = ACTIONS(1064), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1064), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1064), + [sym_preproc_directive] = ACTIONS(1064), + [anon_sym_LPAREN2] = ACTIONS(1066), + [anon_sym_BANG] = ACTIONS(1066), + [anon_sym_TILDE] = ACTIONS(1066), + [anon_sym_DASH] = ACTIONS(1064), + [anon_sym_PLUS] = ACTIONS(1064), + [anon_sym_STAR] = ACTIONS(1066), + [anon_sym_AMP] = ACTIONS(1066), + [anon_sym_SEMI] = ACTIONS(1066), + [anon_sym_typedef] = ACTIONS(1064), + [anon_sym_extern] = ACTIONS(1064), + [anon_sym___attribute__] = ACTIONS(1064), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1066), + [anon_sym___declspec] = ACTIONS(1064), + [anon_sym___cdecl] = ACTIONS(1064), + [anon_sym___clrcall] = ACTIONS(1064), + [anon_sym___stdcall] = ACTIONS(1064), + [anon_sym___fastcall] = ACTIONS(1064), + [anon_sym___thiscall] = ACTIONS(1064), + [anon_sym___vectorcall] = ACTIONS(1064), + [anon_sym_LBRACE] = ACTIONS(1066), + [anon_sym_static] = ACTIONS(1064), + [anon_sym_auto] = ACTIONS(1064), + [anon_sym_register] = ACTIONS(1064), + [anon_sym_inline] = ACTIONS(1064), + [anon_sym_const] = ACTIONS(1064), + [anon_sym_volatile] = ACTIONS(1064), + [anon_sym_restrict] = ACTIONS(1064), + [anon_sym__Atomic] = ACTIONS(1064), + [anon_sym_signed] = ACTIONS(1064), + [anon_sym_unsigned] = ACTIONS(1064), + [anon_sym_long] = ACTIONS(1064), + [anon_sym_short] = ACTIONS(1064), + [sym_primitive_type] = ACTIONS(1064), + [anon_sym_enum] = ACTIONS(1064), + [anon_sym_struct] = ACTIONS(1064), + [anon_sym_union] = ACTIONS(1064), + [anon_sym_if] = ACTIONS(1064), + [anon_sym_switch] = ACTIONS(1064), + [anon_sym_case] = ACTIONS(1064), + [anon_sym_default] = ACTIONS(1064), + [anon_sym_while] = ACTIONS(1064), + [anon_sym_do] = ACTIONS(1064), + [anon_sym_for] = ACTIONS(1064), + [anon_sym_return] = ACTIONS(1064), + [anon_sym_break] = ACTIONS(1064), + [anon_sym_continue] = ACTIONS(1064), + [anon_sym_goto] = ACTIONS(1064), + [anon_sym_DASH_DASH] = ACTIONS(1066), + [anon_sym_PLUS_PLUS] = ACTIONS(1066), + [anon_sym_sizeof] = ACTIONS(1064), + [sym_number_literal] = ACTIONS(1066), + [anon_sym_L_SQUOTE] = ACTIONS(1066), + [anon_sym_u_SQUOTE] = ACTIONS(1066), + [anon_sym_U_SQUOTE] = ACTIONS(1066), + [anon_sym_u8_SQUOTE] = ACTIONS(1066), + [anon_sym_SQUOTE] = ACTIONS(1066), + [anon_sym_L_DQUOTE] = ACTIONS(1066), + [anon_sym_u_DQUOTE] = ACTIONS(1066), + [anon_sym_U_DQUOTE] = ACTIONS(1066), + [anon_sym_u8_DQUOTE] = ACTIONS(1066), + [anon_sym_DQUOTE] = ACTIONS(1066), + [sym_true] = ACTIONS(1064), + [sym_false] = ACTIONS(1064), + [sym_null] = ACTIONS(1064), + [sym_comment] = ACTIONS(3), + }, + [350] = { + [ts_builtin_sym_end] = ACTIONS(1062), + [sym_identifier] = ACTIONS(1060), + [aux_sym_preproc_include_token1] = ACTIONS(1060), + [aux_sym_preproc_def_token1] = ACTIONS(1060), + [aux_sym_preproc_if_token1] = ACTIONS(1060), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1060), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1060), + [sym_preproc_directive] = ACTIONS(1060), + [anon_sym_LPAREN2] = ACTIONS(1062), + [anon_sym_BANG] = ACTIONS(1062), + [anon_sym_TILDE] = ACTIONS(1062), + [anon_sym_DASH] = ACTIONS(1060), + [anon_sym_PLUS] = ACTIONS(1060), + [anon_sym_STAR] = ACTIONS(1062), + [anon_sym_AMP] = ACTIONS(1062), + [anon_sym_SEMI] = ACTIONS(1062), + [anon_sym_typedef] = ACTIONS(1060), + [anon_sym_extern] = ACTIONS(1060), + [anon_sym___attribute__] = ACTIONS(1060), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1062), + [anon_sym___declspec] = ACTIONS(1060), + [anon_sym___cdecl] = ACTIONS(1060), + [anon_sym___clrcall] = ACTIONS(1060), + [anon_sym___stdcall] = ACTIONS(1060), + [anon_sym___fastcall] = ACTIONS(1060), + [anon_sym___thiscall] = ACTIONS(1060), + [anon_sym___vectorcall] = ACTIONS(1060), + [anon_sym_LBRACE] = ACTIONS(1062), + [anon_sym_static] = ACTIONS(1060), + [anon_sym_auto] = ACTIONS(1060), + [anon_sym_register] = ACTIONS(1060), + [anon_sym_inline] = ACTIONS(1060), + [anon_sym_const] = ACTIONS(1060), + [anon_sym_volatile] = ACTIONS(1060), + [anon_sym_restrict] = ACTIONS(1060), + [anon_sym__Atomic] = ACTIONS(1060), + [anon_sym_signed] = ACTIONS(1060), + [anon_sym_unsigned] = ACTIONS(1060), + [anon_sym_long] = ACTIONS(1060), + [anon_sym_short] = ACTIONS(1060), + [sym_primitive_type] = ACTIONS(1060), + [anon_sym_enum] = ACTIONS(1060), + [anon_sym_struct] = ACTIONS(1060), + [anon_sym_union] = ACTIONS(1060), + [anon_sym_if] = ACTIONS(1060), + [anon_sym_switch] = ACTIONS(1060), + [anon_sym_case] = ACTIONS(1060), + [anon_sym_default] = ACTIONS(1060), + [anon_sym_while] = ACTIONS(1060), + [anon_sym_do] = ACTIONS(1060), + [anon_sym_for] = ACTIONS(1060), + [anon_sym_return] = ACTIONS(1060), + [anon_sym_break] = ACTIONS(1060), + [anon_sym_continue] = ACTIONS(1060), + [anon_sym_goto] = ACTIONS(1060), + [anon_sym_DASH_DASH] = ACTIONS(1062), + [anon_sym_PLUS_PLUS] = ACTIONS(1062), + [anon_sym_sizeof] = ACTIONS(1060), + [sym_number_literal] = ACTIONS(1062), + [anon_sym_L_SQUOTE] = ACTIONS(1062), + [anon_sym_u_SQUOTE] = ACTIONS(1062), + [anon_sym_U_SQUOTE] = ACTIONS(1062), + [anon_sym_u8_SQUOTE] = ACTIONS(1062), + [anon_sym_SQUOTE] = ACTIONS(1062), + [anon_sym_L_DQUOTE] = ACTIONS(1062), + [anon_sym_u_DQUOTE] = ACTIONS(1062), + [anon_sym_U_DQUOTE] = ACTIONS(1062), + [anon_sym_u8_DQUOTE] = ACTIONS(1062), + [anon_sym_DQUOTE] = ACTIONS(1062), + [sym_true] = ACTIONS(1060), + [sym_false] = ACTIONS(1060), + [sym_null] = ACTIONS(1060), + [sym_comment] = ACTIONS(3), + }, + [351] = { + [sym_identifier] = ACTIONS(1120), + [aux_sym_preproc_include_token1] = ACTIONS(1120), + [aux_sym_preproc_def_token1] = ACTIONS(1120), + [aux_sym_preproc_if_token1] = ACTIONS(1120), + [aux_sym_preproc_if_token2] = ACTIONS(1120), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1120), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1120), + [sym_preproc_directive] = ACTIONS(1120), + [anon_sym_LPAREN2] = ACTIONS(1122), + [anon_sym_BANG] = ACTIONS(1122), + [anon_sym_TILDE] = ACTIONS(1122), + [anon_sym_DASH] = ACTIONS(1120), + [anon_sym_PLUS] = ACTIONS(1120), + [anon_sym_STAR] = ACTIONS(1122), + [anon_sym_AMP] = ACTIONS(1122), + [anon_sym_SEMI] = ACTIONS(1122), + [anon_sym_typedef] = ACTIONS(1120), + [anon_sym_extern] = ACTIONS(1120), + [anon_sym___attribute__] = ACTIONS(1120), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1122), + [anon_sym___declspec] = ACTIONS(1120), + [anon_sym___cdecl] = ACTIONS(1120), + [anon_sym___clrcall] = ACTIONS(1120), + [anon_sym___stdcall] = ACTIONS(1120), + [anon_sym___fastcall] = ACTIONS(1120), + [anon_sym___thiscall] = ACTIONS(1120), + [anon_sym___vectorcall] = ACTIONS(1120), + [anon_sym_LBRACE] = ACTIONS(1122), + [anon_sym_static] = ACTIONS(1120), + [anon_sym_auto] = ACTIONS(1120), + [anon_sym_register] = ACTIONS(1120), + [anon_sym_inline] = ACTIONS(1120), + [anon_sym_const] = ACTIONS(1120), + [anon_sym_volatile] = ACTIONS(1120), + [anon_sym_restrict] = ACTIONS(1120), + [anon_sym__Atomic] = ACTIONS(1120), + [anon_sym_signed] = ACTIONS(1120), + [anon_sym_unsigned] = ACTIONS(1120), + [anon_sym_long] = ACTIONS(1120), + [anon_sym_short] = ACTIONS(1120), + [sym_primitive_type] = ACTIONS(1120), + [anon_sym_enum] = ACTIONS(1120), + [anon_sym_struct] = ACTIONS(1120), + [anon_sym_union] = ACTIONS(1120), + [anon_sym_if] = ACTIONS(1120), + [anon_sym_switch] = ACTIONS(1120), + [anon_sym_case] = ACTIONS(1120), + [anon_sym_default] = ACTIONS(1120), + [anon_sym_while] = ACTIONS(1120), + [anon_sym_do] = ACTIONS(1120), + [anon_sym_for] = ACTIONS(1120), + [anon_sym_return] = ACTIONS(1120), + [anon_sym_break] = ACTIONS(1120), + [anon_sym_continue] = ACTIONS(1120), + [anon_sym_goto] = ACTIONS(1120), + [anon_sym_DASH_DASH] = ACTIONS(1122), + [anon_sym_PLUS_PLUS] = ACTIONS(1122), + [anon_sym_sizeof] = ACTIONS(1120), + [sym_number_literal] = ACTIONS(1122), + [anon_sym_L_SQUOTE] = ACTIONS(1122), + [anon_sym_u_SQUOTE] = ACTIONS(1122), + [anon_sym_U_SQUOTE] = ACTIONS(1122), + [anon_sym_u8_SQUOTE] = ACTIONS(1122), + [anon_sym_SQUOTE] = ACTIONS(1122), + [anon_sym_L_DQUOTE] = ACTIONS(1122), + [anon_sym_u_DQUOTE] = ACTIONS(1122), + [anon_sym_U_DQUOTE] = ACTIONS(1122), + [anon_sym_u8_DQUOTE] = ACTIONS(1122), + [anon_sym_DQUOTE] = ACTIONS(1122), + [sym_true] = ACTIONS(1120), + [sym_false] = ACTIONS(1120), + [sym_null] = ACTIONS(1120), + [sym_comment] = ACTIONS(3), + }, + [352] = { + [sym_identifier] = ACTIONS(1048), + [aux_sym_preproc_include_token1] = ACTIONS(1048), + [aux_sym_preproc_def_token1] = ACTIONS(1048), + [aux_sym_preproc_if_token1] = ACTIONS(1048), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1048), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1048), + [sym_preproc_directive] = ACTIONS(1048), + [anon_sym_LPAREN2] = ACTIONS(1050), + [anon_sym_BANG] = ACTIONS(1050), + [anon_sym_TILDE] = ACTIONS(1050), + [anon_sym_DASH] = ACTIONS(1048), + [anon_sym_PLUS] = ACTIONS(1048), + [anon_sym_STAR] = ACTIONS(1050), + [anon_sym_AMP] = ACTIONS(1050), + [anon_sym_SEMI] = ACTIONS(1050), + [anon_sym_typedef] = ACTIONS(1048), + [anon_sym_extern] = ACTIONS(1048), + [anon_sym___attribute__] = ACTIONS(1048), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1050), + [anon_sym___declspec] = ACTIONS(1048), + [anon_sym___cdecl] = ACTIONS(1048), + [anon_sym___clrcall] = ACTIONS(1048), + [anon_sym___stdcall] = ACTIONS(1048), + [anon_sym___fastcall] = ACTIONS(1048), + [anon_sym___thiscall] = ACTIONS(1048), + [anon_sym___vectorcall] = ACTIONS(1048), + [anon_sym_LBRACE] = ACTIONS(1050), + [anon_sym_RBRACE] = ACTIONS(1050), + [anon_sym_static] = ACTIONS(1048), + [anon_sym_auto] = ACTIONS(1048), + [anon_sym_register] = ACTIONS(1048), + [anon_sym_inline] = ACTIONS(1048), + [anon_sym_const] = ACTIONS(1048), + [anon_sym_volatile] = ACTIONS(1048), + [anon_sym_restrict] = ACTIONS(1048), + [anon_sym__Atomic] = ACTIONS(1048), + [anon_sym_signed] = ACTIONS(1048), + [anon_sym_unsigned] = ACTIONS(1048), + [anon_sym_long] = ACTIONS(1048), + [anon_sym_short] = ACTIONS(1048), + [sym_primitive_type] = ACTIONS(1048), + [anon_sym_enum] = ACTIONS(1048), + [anon_sym_struct] = ACTIONS(1048), + [anon_sym_union] = ACTIONS(1048), + [anon_sym_if] = ACTIONS(1048), + [anon_sym_switch] = ACTIONS(1048), + [anon_sym_case] = ACTIONS(1048), + [anon_sym_default] = ACTIONS(1048), + [anon_sym_while] = ACTIONS(1048), + [anon_sym_do] = ACTIONS(1048), + [anon_sym_for] = ACTIONS(1048), + [anon_sym_return] = ACTIONS(1048), + [anon_sym_break] = ACTIONS(1048), + [anon_sym_continue] = ACTIONS(1048), + [anon_sym_goto] = ACTIONS(1048), + [anon_sym_DASH_DASH] = ACTIONS(1050), + [anon_sym_PLUS_PLUS] = ACTIONS(1050), + [anon_sym_sizeof] = ACTIONS(1048), + [sym_number_literal] = ACTIONS(1050), + [anon_sym_L_SQUOTE] = ACTIONS(1050), + [anon_sym_u_SQUOTE] = ACTIONS(1050), + [anon_sym_U_SQUOTE] = ACTIONS(1050), + [anon_sym_u8_SQUOTE] = ACTIONS(1050), + [anon_sym_SQUOTE] = ACTIONS(1050), + [anon_sym_L_DQUOTE] = ACTIONS(1050), + [anon_sym_u_DQUOTE] = ACTIONS(1050), + [anon_sym_U_DQUOTE] = ACTIONS(1050), + [anon_sym_u8_DQUOTE] = ACTIONS(1050), + [anon_sym_DQUOTE] = ACTIONS(1050), + [sym_true] = ACTIONS(1048), + [sym_false] = ACTIONS(1048), + [sym_null] = ACTIONS(1048), + [sym_comment] = ACTIONS(3), + }, + [353] = { + [sym_identifier] = ACTIONS(1116), + [aux_sym_preproc_include_token1] = ACTIONS(1116), + [aux_sym_preproc_def_token1] = ACTIONS(1116), + [aux_sym_preproc_if_token1] = ACTIONS(1116), + [aux_sym_preproc_if_token2] = ACTIONS(1116), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1116), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1116), + [sym_preproc_directive] = ACTIONS(1116), + [anon_sym_LPAREN2] = ACTIONS(1118), + [anon_sym_BANG] = ACTIONS(1118), + [anon_sym_TILDE] = ACTIONS(1118), + [anon_sym_DASH] = ACTIONS(1116), + [anon_sym_PLUS] = ACTIONS(1116), + [anon_sym_STAR] = ACTIONS(1118), + [anon_sym_AMP] = ACTIONS(1118), + [anon_sym_SEMI] = ACTIONS(1118), + [anon_sym_typedef] = ACTIONS(1116), + [anon_sym_extern] = ACTIONS(1116), + [anon_sym___attribute__] = ACTIONS(1116), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1118), + [anon_sym___declspec] = ACTIONS(1116), + [anon_sym___cdecl] = ACTIONS(1116), + [anon_sym___clrcall] = ACTIONS(1116), + [anon_sym___stdcall] = ACTIONS(1116), + [anon_sym___fastcall] = ACTIONS(1116), + [anon_sym___thiscall] = ACTIONS(1116), + [anon_sym___vectorcall] = ACTIONS(1116), + [anon_sym_LBRACE] = ACTIONS(1118), + [anon_sym_static] = ACTIONS(1116), + [anon_sym_auto] = ACTIONS(1116), + [anon_sym_register] = ACTIONS(1116), + [anon_sym_inline] = ACTIONS(1116), + [anon_sym_const] = ACTIONS(1116), + [anon_sym_volatile] = ACTIONS(1116), + [anon_sym_restrict] = ACTIONS(1116), + [anon_sym__Atomic] = ACTIONS(1116), + [anon_sym_signed] = ACTIONS(1116), + [anon_sym_unsigned] = ACTIONS(1116), + [anon_sym_long] = ACTIONS(1116), + [anon_sym_short] = ACTIONS(1116), + [sym_primitive_type] = ACTIONS(1116), + [anon_sym_enum] = ACTIONS(1116), + [anon_sym_struct] = ACTIONS(1116), + [anon_sym_union] = ACTIONS(1116), + [anon_sym_if] = ACTIONS(1116), + [anon_sym_switch] = ACTIONS(1116), + [anon_sym_case] = ACTIONS(1116), + [anon_sym_default] = ACTIONS(1116), + [anon_sym_while] = ACTIONS(1116), + [anon_sym_do] = ACTIONS(1116), + [anon_sym_for] = ACTIONS(1116), + [anon_sym_return] = ACTIONS(1116), + [anon_sym_break] = ACTIONS(1116), + [anon_sym_continue] = ACTIONS(1116), + [anon_sym_goto] = ACTIONS(1116), + [anon_sym_DASH_DASH] = ACTIONS(1118), + [anon_sym_PLUS_PLUS] = ACTIONS(1118), + [anon_sym_sizeof] = ACTIONS(1116), + [sym_number_literal] = ACTIONS(1118), + [anon_sym_L_SQUOTE] = ACTIONS(1118), + [anon_sym_u_SQUOTE] = ACTIONS(1118), + [anon_sym_U_SQUOTE] = ACTIONS(1118), + [anon_sym_u8_SQUOTE] = ACTIONS(1118), + [anon_sym_SQUOTE] = ACTIONS(1118), + [anon_sym_L_DQUOTE] = ACTIONS(1118), + [anon_sym_u_DQUOTE] = ACTIONS(1118), + [anon_sym_U_DQUOTE] = ACTIONS(1118), + [anon_sym_u8_DQUOTE] = ACTIONS(1118), + [anon_sym_DQUOTE] = ACTIONS(1118), + [sym_true] = ACTIONS(1116), + [sym_false] = ACTIONS(1116), + [sym_null] = ACTIONS(1116), + [sym_comment] = ACTIONS(3), + }, + [354] = { + [sym_identifier] = ACTIONS(1084), + [aux_sym_preproc_include_token1] = ACTIONS(1084), + [aux_sym_preproc_def_token1] = ACTIONS(1084), + [aux_sym_preproc_if_token1] = ACTIONS(1084), + [aux_sym_preproc_if_token2] = ACTIONS(1084), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1084), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1084), + [sym_preproc_directive] = ACTIONS(1084), + [anon_sym_LPAREN2] = ACTIONS(1086), + [anon_sym_BANG] = ACTIONS(1086), + [anon_sym_TILDE] = ACTIONS(1086), + [anon_sym_DASH] = ACTIONS(1084), + [anon_sym_PLUS] = ACTIONS(1084), + [anon_sym_STAR] = ACTIONS(1086), + [anon_sym_AMP] = ACTIONS(1086), + [anon_sym_SEMI] = ACTIONS(1086), + [anon_sym_typedef] = ACTIONS(1084), + [anon_sym_extern] = ACTIONS(1084), + [anon_sym___attribute__] = ACTIONS(1084), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1086), + [anon_sym___declspec] = ACTIONS(1084), + [anon_sym___cdecl] = ACTIONS(1084), + [anon_sym___clrcall] = ACTIONS(1084), + [anon_sym___stdcall] = ACTIONS(1084), + [anon_sym___fastcall] = ACTIONS(1084), + [anon_sym___thiscall] = ACTIONS(1084), + [anon_sym___vectorcall] = ACTIONS(1084), + [anon_sym_LBRACE] = ACTIONS(1086), + [anon_sym_static] = ACTIONS(1084), + [anon_sym_auto] = ACTIONS(1084), + [anon_sym_register] = ACTIONS(1084), + [anon_sym_inline] = ACTIONS(1084), + [anon_sym_const] = ACTIONS(1084), + [anon_sym_volatile] = ACTIONS(1084), + [anon_sym_restrict] = ACTIONS(1084), + [anon_sym__Atomic] = ACTIONS(1084), + [anon_sym_signed] = ACTIONS(1084), + [anon_sym_unsigned] = ACTIONS(1084), + [anon_sym_long] = ACTIONS(1084), + [anon_sym_short] = ACTIONS(1084), + [sym_primitive_type] = ACTIONS(1084), + [anon_sym_enum] = ACTIONS(1084), + [anon_sym_struct] = ACTIONS(1084), + [anon_sym_union] = ACTIONS(1084), + [anon_sym_if] = ACTIONS(1084), + [anon_sym_switch] = ACTIONS(1084), + [anon_sym_case] = ACTIONS(1084), + [anon_sym_default] = ACTIONS(1084), + [anon_sym_while] = ACTIONS(1084), + [anon_sym_do] = ACTIONS(1084), + [anon_sym_for] = ACTIONS(1084), + [anon_sym_return] = ACTIONS(1084), + [anon_sym_break] = ACTIONS(1084), + [anon_sym_continue] = ACTIONS(1084), + [anon_sym_goto] = ACTIONS(1084), + [anon_sym_DASH_DASH] = ACTIONS(1086), + [anon_sym_PLUS_PLUS] = ACTIONS(1086), + [anon_sym_sizeof] = ACTIONS(1084), + [sym_number_literal] = ACTIONS(1086), + [anon_sym_L_SQUOTE] = ACTIONS(1086), + [anon_sym_u_SQUOTE] = ACTIONS(1086), + [anon_sym_U_SQUOTE] = ACTIONS(1086), + [anon_sym_u8_SQUOTE] = ACTIONS(1086), + [anon_sym_SQUOTE] = ACTIONS(1086), + [anon_sym_L_DQUOTE] = ACTIONS(1086), + [anon_sym_u_DQUOTE] = ACTIONS(1086), + [anon_sym_U_DQUOTE] = ACTIONS(1086), + [anon_sym_u8_DQUOTE] = ACTIONS(1086), + [anon_sym_DQUOTE] = ACTIONS(1086), + [sym_true] = ACTIONS(1084), + [sym_false] = ACTIONS(1084), + [sym_null] = ACTIONS(1084), + [sym_comment] = ACTIONS(3), + }, + [355] = { + [ts_builtin_sym_end] = ACTIONS(1106), + [sym_identifier] = ACTIONS(1104), + [aux_sym_preproc_include_token1] = ACTIONS(1104), + [aux_sym_preproc_def_token1] = ACTIONS(1104), + [aux_sym_preproc_if_token1] = ACTIONS(1104), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1104), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1104), + [sym_preproc_directive] = ACTIONS(1104), + [anon_sym_LPAREN2] = ACTIONS(1106), + [anon_sym_BANG] = ACTIONS(1106), + [anon_sym_TILDE] = ACTIONS(1106), + [anon_sym_DASH] = ACTIONS(1104), + [anon_sym_PLUS] = ACTIONS(1104), + [anon_sym_STAR] = ACTIONS(1106), + [anon_sym_AMP] = ACTIONS(1106), + [anon_sym_SEMI] = ACTIONS(1106), + [anon_sym_typedef] = ACTIONS(1104), + [anon_sym_extern] = ACTIONS(1104), + [anon_sym___attribute__] = ACTIONS(1104), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1106), + [anon_sym___declspec] = ACTIONS(1104), + [anon_sym___cdecl] = ACTIONS(1104), + [anon_sym___clrcall] = ACTIONS(1104), + [anon_sym___stdcall] = ACTIONS(1104), + [anon_sym___fastcall] = ACTIONS(1104), + [anon_sym___thiscall] = ACTIONS(1104), + [anon_sym___vectorcall] = ACTIONS(1104), + [anon_sym_LBRACE] = ACTIONS(1106), + [anon_sym_static] = ACTIONS(1104), + [anon_sym_auto] = ACTIONS(1104), + [anon_sym_register] = ACTIONS(1104), + [anon_sym_inline] = ACTIONS(1104), + [anon_sym_const] = ACTIONS(1104), + [anon_sym_volatile] = ACTIONS(1104), + [anon_sym_restrict] = ACTIONS(1104), + [anon_sym__Atomic] = ACTIONS(1104), + [anon_sym_signed] = ACTIONS(1104), + [anon_sym_unsigned] = ACTIONS(1104), + [anon_sym_long] = ACTIONS(1104), + [anon_sym_short] = ACTIONS(1104), + [sym_primitive_type] = ACTIONS(1104), + [anon_sym_enum] = ACTIONS(1104), + [anon_sym_struct] = ACTIONS(1104), + [anon_sym_union] = ACTIONS(1104), + [anon_sym_if] = ACTIONS(1104), + [anon_sym_switch] = ACTIONS(1104), + [anon_sym_case] = ACTIONS(1104), + [anon_sym_default] = ACTIONS(1104), + [anon_sym_while] = ACTIONS(1104), + [anon_sym_do] = ACTIONS(1104), + [anon_sym_for] = ACTIONS(1104), + [anon_sym_return] = ACTIONS(1104), + [anon_sym_break] = ACTIONS(1104), + [anon_sym_continue] = ACTIONS(1104), + [anon_sym_goto] = ACTIONS(1104), + [anon_sym_DASH_DASH] = ACTIONS(1106), + [anon_sym_PLUS_PLUS] = ACTIONS(1106), + [anon_sym_sizeof] = ACTIONS(1104), + [sym_number_literal] = ACTIONS(1106), + [anon_sym_L_SQUOTE] = ACTIONS(1106), + [anon_sym_u_SQUOTE] = ACTIONS(1106), + [anon_sym_U_SQUOTE] = ACTIONS(1106), + [anon_sym_u8_SQUOTE] = ACTIONS(1106), + [anon_sym_SQUOTE] = ACTIONS(1106), + [anon_sym_L_DQUOTE] = ACTIONS(1106), + [anon_sym_u_DQUOTE] = ACTIONS(1106), + [anon_sym_U_DQUOTE] = ACTIONS(1106), + [anon_sym_u8_DQUOTE] = ACTIONS(1106), + [anon_sym_DQUOTE] = ACTIONS(1106), + [sym_true] = ACTIONS(1104), + [sym_false] = ACTIONS(1104), + [sym_null] = ACTIONS(1104), + [sym_comment] = ACTIONS(3), + }, + [356] = { + [sym_identifier] = ACTIONS(1100), + [aux_sym_preproc_include_token1] = ACTIONS(1100), + [aux_sym_preproc_def_token1] = ACTIONS(1100), + [aux_sym_preproc_if_token1] = ACTIONS(1100), + [aux_sym_preproc_if_token2] = ACTIONS(1100), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1100), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1100), + [sym_preproc_directive] = ACTIONS(1100), + [anon_sym_LPAREN2] = ACTIONS(1102), + [anon_sym_BANG] = ACTIONS(1102), + [anon_sym_TILDE] = ACTIONS(1102), + [anon_sym_DASH] = ACTIONS(1100), + [anon_sym_PLUS] = ACTIONS(1100), + [anon_sym_STAR] = ACTIONS(1102), + [anon_sym_AMP] = ACTIONS(1102), + [anon_sym_SEMI] = ACTIONS(1102), + [anon_sym_typedef] = ACTIONS(1100), + [anon_sym_extern] = ACTIONS(1100), + [anon_sym___attribute__] = ACTIONS(1100), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1102), + [anon_sym___declspec] = ACTIONS(1100), + [anon_sym___cdecl] = ACTIONS(1100), + [anon_sym___clrcall] = ACTIONS(1100), + [anon_sym___stdcall] = ACTIONS(1100), + [anon_sym___fastcall] = ACTIONS(1100), + [anon_sym___thiscall] = ACTIONS(1100), + [anon_sym___vectorcall] = ACTIONS(1100), + [anon_sym_LBRACE] = ACTIONS(1102), + [anon_sym_static] = ACTIONS(1100), + [anon_sym_auto] = ACTIONS(1100), + [anon_sym_register] = ACTIONS(1100), + [anon_sym_inline] = ACTIONS(1100), + [anon_sym_const] = ACTIONS(1100), + [anon_sym_volatile] = ACTIONS(1100), + [anon_sym_restrict] = ACTIONS(1100), + [anon_sym__Atomic] = ACTIONS(1100), + [anon_sym_signed] = ACTIONS(1100), + [anon_sym_unsigned] = ACTIONS(1100), + [anon_sym_long] = ACTIONS(1100), + [anon_sym_short] = ACTIONS(1100), + [sym_primitive_type] = ACTIONS(1100), + [anon_sym_enum] = ACTIONS(1100), + [anon_sym_struct] = ACTIONS(1100), + [anon_sym_union] = ACTIONS(1100), + [anon_sym_if] = ACTIONS(1100), + [anon_sym_switch] = ACTIONS(1100), + [anon_sym_case] = ACTIONS(1100), + [anon_sym_default] = ACTIONS(1100), + [anon_sym_while] = ACTIONS(1100), + [anon_sym_do] = ACTIONS(1100), + [anon_sym_for] = ACTIONS(1100), + [anon_sym_return] = ACTIONS(1100), + [anon_sym_break] = ACTIONS(1100), + [anon_sym_continue] = ACTIONS(1100), + [anon_sym_goto] = ACTIONS(1100), + [anon_sym_DASH_DASH] = ACTIONS(1102), + [anon_sym_PLUS_PLUS] = ACTIONS(1102), + [anon_sym_sizeof] = ACTIONS(1100), + [sym_number_literal] = ACTIONS(1102), + [anon_sym_L_SQUOTE] = ACTIONS(1102), + [anon_sym_u_SQUOTE] = ACTIONS(1102), + [anon_sym_U_SQUOTE] = ACTIONS(1102), + [anon_sym_u8_SQUOTE] = ACTIONS(1102), + [anon_sym_SQUOTE] = ACTIONS(1102), + [anon_sym_L_DQUOTE] = ACTIONS(1102), + [anon_sym_u_DQUOTE] = ACTIONS(1102), + [anon_sym_U_DQUOTE] = ACTIONS(1102), + [anon_sym_u8_DQUOTE] = ACTIONS(1102), + [anon_sym_DQUOTE] = ACTIONS(1102), + [sym_true] = ACTIONS(1100), + [sym_false] = ACTIONS(1100), + [sym_null] = ACTIONS(1100), + [sym_comment] = ACTIONS(3), + }, + [357] = { + [sym_identifier] = ACTIONS(1060), + [aux_sym_preproc_include_token1] = ACTIONS(1060), + [aux_sym_preproc_def_token1] = ACTIONS(1060), + [aux_sym_preproc_if_token1] = ACTIONS(1060), + [aux_sym_preproc_if_token2] = ACTIONS(1060), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1060), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1060), + [sym_preproc_directive] = ACTIONS(1060), + [anon_sym_LPAREN2] = ACTIONS(1062), + [anon_sym_BANG] = ACTIONS(1062), + [anon_sym_TILDE] = ACTIONS(1062), + [anon_sym_DASH] = ACTIONS(1060), + [anon_sym_PLUS] = ACTIONS(1060), + [anon_sym_STAR] = ACTIONS(1062), + [anon_sym_AMP] = ACTIONS(1062), + [anon_sym_SEMI] = ACTIONS(1062), + [anon_sym_typedef] = ACTIONS(1060), + [anon_sym_extern] = ACTIONS(1060), + [anon_sym___attribute__] = ACTIONS(1060), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1062), + [anon_sym___declspec] = ACTIONS(1060), + [anon_sym___cdecl] = ACTIONS(1060), + [anon_sym___clrcall] = ACTIONS(1060), + [anon_sym___stdcall] = ACTIONS(1060), + [anon_sym___fastcall] = ACTIONS(1060), + [anon_sym___thiscall] = ACTIONS(1060), + [anon_sym___vectorcall] = ACTIONS(1060), + [anon_sym_LBRACE] = ACTIONS(1062), + [anon_sym_static] = ACTIONS(1060), + [anon_sym_auto] = ACTIONS(1060), + [anon_sym_register] = ACTIONS(1060), + [anon_sym_inline] = ACTIONS(1060), + [anon_sym_const] = ACTIONS(1060), + [anon_sym_volatile] = ACTIONS(1060), + [anon_sym_restrict] = ACTIONS(1060), + [anon_sym__Atomic] = ACTIONS(1060), + [anon_sym_signed] = ACTIONS(1060), + [anon_sym_unsigned] = ACTIONS(1060), + [anon_sym_long] = ACTIONS(1060), + [anon_sym_short] = ACTIONS(1060), + [sym_primitive_type] = ACTIONS(1060), + [anon_sym_enum] = ACTIONS(1060), + [anon_sym_struct] = ACTIONS(1060), + [anon_sym_union] = ACTIONS(1060), + [anon_sym_if] = ACTIONS(1060), + [anon_sym_switch] = ACTIONS(1060), + [anon_sym_case] = ACTIONS(1060), + [anon_sym_default] = ACTIONS(1060), + [anon_sym_while] = ACTIONS(1060), + [anon_sym_do] = ACTIONS(1060), + [anon_sym_for] = ACTIONS(1060), + [anon_sym_return] = ACTIONS(1060), + [anon_sym_break] = ACTIONS(1060), + [anon_sym_continue] = ACTIONS(1060), + [anon_sym_goto] = ACTIONS(1060), + [anon_sym_DASH_DASH] = ACTIONS(1062), + [anon_sym_PLUS_PLUS] = ACTIONS(1062), + [anon_sym_sizeof] = ACTIONS(1060), + [sym_number_literal] = ACTIONS(1062), + [anon_sym_L_SQUOTE] = ACTIONS(1062), + [anon_sym_u_SQUOTE] = ACTIONS(1062), + [anon_sym_U_SQUOTE] = ACTIONS(1062), + [anon_sym_u8_SQUOTE] = ACTIONS(1062), + [anon_sym_SQUOTE] = ACTIONS(1062), + [anon_sym_L_DQUOTE] = ACTIONS(1062), + [anon_sym_u_DQUOTE] = ACTIONS(1062), + [anon_sym_U_DQUOTE] = ACTIONS(1062), + [anon_sym_u8_DQUOTE] = ACTIONS(1062), + [anon_sym_DQUOTE] = ACTIONS(1062), + [sym_true] = ACTIONS(1060), + [sym_false] = ACTIONS(1060), + [sym_null] = ACTIONS(1060), + [sym_comment] = ACTIONS(3), + }, + [358] = { + [sym_identifier] = ACTIONS(1112), + [aux_sym_preproc_include_token1] = ACTIONS(1112), + [aux_sym_preproc_def_token1] = ACTIONS(1112), + [aux_sym_preproc_if_token1] = ACTIONS(1112), + [aux_sym_preproc_if_token2] = ACTIONS(1112), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1112), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1112), + [sym_preproc_directive] = ACTIONS(1112), + [anon_sym_LPAREN2] = ACTIONS(1114), + [anon_sym_BANG] = ACTIONS(1114), + [anon_sym_TILDE] = ACTIONS(1114), + [anon_sym_DASH] = ACTIONS(1112), + [anon_sym_PLUS] = ACTIONS(1112), + [anon_sym_STAR] = ACTIONS(1114), + [anon_sym_AMP] = ACTIONS(1114), + [anon_sym_SEMI] = ACTIONS(1114), + [anon_sym_typedef] = ACTIONS(1112), + [anon_sym_extern] = ACTIONS(1112), + [anon_sym___attribute__] = ACTIONS(1112), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1114), + [anon_sym___declspec] = ACTIONS(1112), + [anon_sym___cdecl] = ACTIONS(1112), + [anon_sym___clrcall] = ACTIONS(1112), + [anon_sym___stdcall] = ACTIONS(1112), + [anon_sym___fastcall] = ACTIONS(1112), + [anon_sym___thiscall] = ACTIONS(1112), + [anon_sym___vectorcall] = ACTIONS(1112), + [anon_sym_LBRACE] = ACTIONS(1114), + [anon_sym_static] = ACTIONS(1112), + [anon_sym_auto] = ACTIONS(1112), + [anon_sym_register] = ACTIONS(1112), + [anon_sym_inline] = ACTIONS(1112), + [anon_sym_const] = ACTIONS(1112), + [anon_sym_volatile] = ACTIONS(1112), + [anon_sym_restrict] = ACTIONS(1112), + [anon_sym__Atomic] = ACTIONS(1112), + [anon_sym_signed] = ACTIONS(1112), + [anon_sym_unsigned] = ACTIONS(1112), + [anon_sym_long] = ACTIONS(1112), + [anon_sym_short] = ACTIONS(1112), + [sym_primitive_type] = ACTIONS(1112), + [anon_sym_enum] = ACTIONS(1112), + [anon_sym_struct] = ACTIONS(1112), + [anon_sym_union] = ACTIONS(1112), + [anon_sym_if] = ACTIONS(1112), + [anon_sym_switch] = ACTIONS(1112), + [anon_sym_case] = ACTIONS(1112), + [anon_sym_default] = ACTIONS(1112), + [anon_sym_while] = ACTIONS(1112), + [anon_sym_do] = ACTIONS(1112), + [anon_sym_for] = ACTIONS(1112), + [anon_sym_return] = ACTIONS(1112), + [anon_sym_break] = ACTIONS(1112), + [anon_sym_continue] = ACTIONS(1112), + [anon_sym_goto] = ACTIONS(1112), + [anon_sym_DASH_DASH] = ACTIONS(1114), + [anon_sym_PLUS_PLUS] = ACTIONS(1114), + [anon_sym_sizeof] = ACTIONS(1112), + [sym_number_literal] = ACTIONS(1114), + [anon_sym_L_SQUOTE] = ACTIONS(1114), + [anon_sym_u_SQUOTE] = ACTIONS(1114), + [anon_sym_U_SQUOTE] = ACTIONS(1114), + [anon_sym_u8_SQUOTE] = ACTIONS(1114), + [anon_sym_SQUOTE] = ACTIONS(1114), + [anon_sym_L_DQUOTE] = ACTIONS(1114), + [anon_sym_u_DQUOTE] = ACTIONS(1114), + [anon_sym_U_DQUOTE] = ACTIONS(1114), + [anon_sym_u8_DQUOTE] = ACTIONS(1114), + [anon_sym_DQUOTE] = ACTIONS(1114), + [sym_true] = ACTIONS(1112), + [sym_false] = ACTIONS(1112), + [sym_null] = ACTIONS(1112), + [sym_comment] = ACTIONS(3), + }, + [359] = { + [sym_identifier] = ACTIONS(1108), + [aux_sym_preproc_include_token1] = ACTIONS(1108), + [aux_sym_preproc_def_token1] = ACTIONS(1108), + [aux_sym_preproc_if_token1] = ACTIONS(1108), + [aux_sym_preproc_if_token2] = ACTIONS(1108), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1108), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1108), + [sym_preproc_directive] = ACTIONS(1108), + [anon_sym_LPAREN2] = ACTIONS(1110), + [anon_sym_BANG] = ACTIONS(1110), + [anon_sym_TILDE] = ACTIONS(1110), + [anon_sym_DASH] = ACTIONS(1108), + [anon_sym_PLUS] = ACTIONS(1108), + [anon_sym_STAR] = ACTIONS(1110), + [anon_sym_AMP] = ACTIONS(1110), + [anon_sym_SEMI] = ACTIONS(1110), + [anon_sym_typedef] = ACTIONS(1108), + [anon_sym_extern] = ACTIONS(1108), + [anon_sym___attribute__] = ACTIONS(1108), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1110), + [anon_sym___declspec] = ACTIONS(1108), + [anon_sym___cdecl] = ACTIONS(1108), + [anon_sym___clrcall] = ACTIONS(1108), + [anon_sym___stdcall] = ACTIONS(1108), + [anon_sym___fastcall] = ACTIONS(1108), + [anon_sym___thiscall] = ACTIONS(1108), + [anon_sym___vectorcall] = ACTIONS(1108), + [anon_sym_LBRACE] = ACTIONS(1110), + [anon_sym_static] = ACTIONS(1108), + [anon_sym_auto] = ACTIONS(1108), + [anon_sym_register] = ACTIONS(1108), + [anon_sym_inline] = ACTIONS(1108), + [anon_sym_const] = ACTIONS(1108), + [anon_sym_volatile] = ACTIONS(1108), + [anon_sym_restrict] = ACTIONS(1108), + [anon_sym__Atomic] = ACTIONS(1108), + [anon_sym_signed] = ACTIONS(1108), + [anon_sym_unsigned] = ACTIONS(1108), + [anon_sym_long] = ACTIONS(1108), + [anon_sym_short] = ACTIONS(1108), + [sym_primitive_type] = ACTIONS(1108), + [anon_sym_enum] = ACTIONS(1108), + [anon_sym_struct] = ACTIONS(1108), + [anon_sym_union] = ACTIONS(1108), + [anon_sym_if] = ACTIONS(1108), + [anon_sym_switch] = ACTIONS(1108), + [anon_sym_case] = ACTIONS(1108), + [anon_sym_default] = ACTIONS(1108), + [anon_sym_while] = ACTIONS(1108), + [anon_sym_do] = ACTIONS(1108), + [anon_sym_for] = ACTIONS(1108), + [anon_sym_return] = ACTIONS(1108), + [anon_sym_break] = ACTIONS(1108), + [anon_sym_continue] = ACTIONS(1108), + [anon_sym_goto] = ACTIONS(1108), + [anon_sym_DASH_DASH] = ACTIONS(1110), + [anon_sym_PLUS_PLUS] = ACTIONS(1110), + [anon_sym_sizeof] = ACTIONS(1108), + [sym_number_literal] = ACTIONS(1110), + [anon_sym_L_SQUOTE] = ACTIONS(1110), + [anon_sym_u_SQUOTE] = ACTIONS(1110), + [anon_sym_U_SQUOTE] = ACTIONS(1110), + [anon_sym_u8_SQUOTE] = ACTIONS(1110), + [anon_sym_SQUOTE] = ACTIONS(1110), + [anon_sym_L_DQUOTE] = ACTIONS(1110), + [anon_sym_u_DQUOTE] = ACTIONS(1110), + [anon_sym_U_DQUOTE] = ACTIONS(1110), + [anon_sym_u8_DQUOTE] = ACTIONS(1110), + [anon_sym_DQUOTE] = ACTIONS(1110), + [sym_true] = ACTIONS(1108), + [sym_false] = ACTIONS(1108), + [sym_null] = ACTIONS(1108), + [sym_comment] = ACTIONS(3), + }, + [360] = { + [sym_identifier] = ACTIONS(1052), + [aux_sym_preproc_include_token1] = ACTIONS(1052), + [aux_sym_preproc_def_token1] = ACTIONS(1052), + [aux_sym_preproc_if_token1] = ACTIONS(1052), + [aux_sym_preproc_if_token2] = ACTIONS(1052), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1052), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1052), + [sym_preproc_directive] = ACTIONS(1052), + [anon_sym_LPAREN2] = ACTIONS(1054), + [anon_sym_BANG] = ACTIONS(1054), + [anon_sym_TILDE] = ACTIONS(1054), + [anon_sym_DASH] = ACTIONS(1052), + [anon_sym_PLUS] = ACTIONS(1052), + [anon_sym_STAR] = ACTIONS(1054), + [anon_sym_AMP] = ACTIONS(1054), + [anon_sym_SEMI] = ACTIONS(1054), + [anon_sym_typedef] = ACTIONS(1052), + [anon_sym_extern] = ACTIONS(1052), + [anon_sym___attribute__] = ACTIONS(1052), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1054), + [anon_sym___declspec] = ACTIONS(1052), + [anon_sym___cdecl] = ACTIONS(1052), + [anon_sym___clrcall] = ACTIONS(1052), + [anon_sym___stdcall] = ACTIONS(1052), + [anon_sym___fastcall] = ACTIONS(1052), + [anon_sym___thiscall] = ACTIONS(1052), + [anon_sym___vectorcall] = ACTIONS(1052), + [anon_sym_LBRACE] = ACTIONS(1054), + [anon_sym_static] = ACTIONS(1052), + [anon_sym_auto] = ACTIONS(1052), + [anon_sym_register] = ACTIONS(1052), + [anon_sym_inline] = ACTIONS(1052), + [anon_sym_const] = ACTIONS(1052), + [anon_sym_volatile] = ACTIONS(1052), + [anon_sym_restrict] = ACTIONS(1052), + [anon_sym__Atomic] = ACTIONS(1052), + [anon_sym_signed] = ACTIONS(1052), + [anon_sym_unsigned] = ACTIONS(1052), + [anon_sym_long] = ACTIONS(1052), + [anon_sym_short] = ACTIONS(1052), + [sym_primitive_type] = ACTIONS(1052), + [anon_sym_enum] = ACTIONS(1052), + [anon_sym_struct] = ACTIONS(1052), + [anon_sym_union] = ACTIONS(1052), + [anon_sym_if] = ACTIONS(1052), + [anon_sym_switch] = ACTIONS(1052), + [anon_sym_case] = ACTIONS(1052), + [anon_sym_default] = ACTIONS(1052), + [anon_sym_while] = ACTIONS(1052), + [anon_sym_do] = ACTIONS(1052), + [anon_sym_for] = ACTIONS(1052), + [anon_sym_return] = ACTIONS(1052), + [anon_sym_break] = ACTIONS(1052), + [anon_sym_continue] = ACTIONS(1052), + [anon_sym_goto] = ACTIONS(1052), + [anon_sym_DASH_DASH] = ACTIONS(1054), + [anon_sym_PLUS_PLUS] = ACTIONS(1054), + [anon_sym_sizeof] = ACTIONS(1052), + [sym_number_literal] = ACTIONS(1054), + [anon_sym_L_SQUOTE] = ACTIONS(1054), + [anon_sym_u_SQUOTE] = ACTIONS(1054), + [anon_sym_U_SQUOTE] = ACTIONS(1054), + [anon_sym_u8_SQUOTE] = ACTIONS(1054), + [anon_sym_SQUOTE] = ACTIONS(1054), + [anon_sym_L_DQUOTE] = ACTIONS(1054), + [anon_sym_u_DQUOTE] = ACTIONS(1054), + [anon_sym_U_DQUOTE] = ACTIONS(1054), + [anon_sym_u8_DQUOTE] = ACTIONS(1054), + [anon_sym_DQUOTE] = ACTIONS(1054), + [sym_true] = ACTIONS(1052), + [sym_false] = ACTIONS(1052), + [sym_null] = ACTIONS(1052), + [sym_comment] = ACTIONS(3), + }, + [361] = { + [ts_builtin_sym_end] = ACTIONS(1050), + [sym_identifier] = ACTIONS(1048), + [aux_sym_preproc_include_token1] = ACTIONS(1048), + [aux_sym_preproc_def_token1] = ACTIONS(1048), + [aux_sym_preproc_if_token1] = ACTIONS(1048), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1048), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1048), + [sym_preproc_directive] = ACTIONS(1048), + [anon_sym_LPAREN2] = ACTIONS(1050), + [anon_sym_BANG] = ACTIONS(1050), + [anon_sym_TILDE] = ACTIONS(1050), + [anon_sym_DASH] = ACTIONS(1048), + [anon_sym_PLUS] = ACTIONS(1048), + [anon_sym_STAR] = ACTIONS(1050), + [anon_sym_AMP] = ACTIONS(1050), + [anon_sym_SEMI] = ACTIONS(1050), + [anon_sym_typedef] = ACTIONS(1048), + [anon_sym_extern] = ACTIONS(1048), + [anon_sym___attribute__] = ACTIONS(1048), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1050), + [anon_sym___declspec] = ACTIONS(1048), + [anon_sym___cdecl] = ACTIONS(1048), + [anon_sym___clrcall] = ACTIONS(1048), + [anon_sym___stdcall] = ACTIONS(1048), + [anon_sym___fastcall] = ACTIONS(1048), + [anon_sym___thiscall] = ACTIONS(1048), + [anon_sym___vectorcall] = ACTIONS(1048), + [anon_sym_LBRACE] = ACTIONS(1050), + [anon_sym_static] = ACTIONS(1048), + [anon_sym_auto] = ACTIONS(1048), + [anon_sym_register] = ACTIONS(1048), + [anon_sym_inline] = ACTIONS(1048), + [anon_sym_const] = ACTIONS(1048), + [anon_sym_volatile] = ACTIONS(1048), + [anon_sym_restrict] = ACTIONS(1048), + [anon_sym__Atomic] = ACTIONS(1048), + [anon_sym_signed] = ACTIONS(1048), + [anon_sym_unsigned] = ACTIONS(1048), + [anon_sym_long] = ACTIONS(1048), + [anon_sym_short] = ACTIONS(1048), + [sym_primitive_type] = ACTIONS(1048), + [anon_sym_enum] = ACTIONS(1048), + [anon_sym_struct] = ACTIONS(1048), + [anon_sym_union] = ACTIONS(1048), + [anon_sym_if] = ACTIONS(1048), + [anon_sym_switch] = ACTIONS(1048), + [anon_sym_case] = ACTIONS(1048), + [anon_sym_default] = ACTIONS(1048), + [anon_sym_while] = ACTIONS(1048), + [anon_sym_do] = ACTIONS(1048), + [anon_sym_for] = ACTIONS(1048), + [anon_sym_return] = ACTIONS(1048), + [anon_sym_break] = ACTIONS(1048), + [anon_sym_continue] = ACTIONS(1048), + [anon_sym_goto] = ACTIONS(1048), + [anon_sym_DASH_DASH] = ACTIONS(1050), + [anon_sym_PLUS_PLUS] = ACTIONS(1050), + [anon_sym_sizeof] = ACTIONS(1048), + [sym_number_literal] = ACTIONS(1050), + [anon_sym_L_SQUOTE] = ACTIONS(1050), + [anon_sym_u_SQUOTE] = ACTIONS(1050), + [anon_sym_U_SQUOTE] = ACTIONS(1050), + [anon_sym_u8_SQUOTE] = ACTIONS(1050), + [anon_sym_SQUOTE] = ACTIONS(1050), + [anon_sym_L_DQUOTE] = ACTIONS(1050), + [anon_sym_u_DQUOTE] = ACTIONS(1050), + [anon_sym_U_DQUOTE] = ACTIONS(1050), + [anon_sym_u8_DQUOTE] = ACTIONS(1050), + [anon_sym_DQUOTE] = ACTIONS(1050), + [sym_true] = ACTIONS(1048), + [sym_false] = ACTIONS(1048), + [sym_null] = ACTIONS(1048), + [sym_comment] = ACTIONS(3), + }, + [362] = { + [sym_identifier] = ACTIONS(1096), + [aux_sym_preproc_include_token1] = ACTIONS(1096), + [aux_sym_preproc_def_token1] = ACTIONS(1096), + [aux_sym_preproc_if_token1] = ACTIONS(1096), + [aux_sym_preproc_if_token2] = ACTIONS(1096), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1096), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1096), + [sym_preproc_directive] = ACTIONS(1096), + [anon_sym_LPAREN2] = ACTIONS(1098), + [anon_sym_BANG] = ACTIONS(1098), + [anon_sym_TILDE] = ACTIONS(1098), + [anon_sym_DASH] = ACTIONS(1096), + [anon_sym_PLUS] = ACTIONS(1096), + [anon_sym_STAR] = ACTIONS(1098), + [anon_sym_AMP] = ACTIONS(1098), + [anon_sym_SEMI] = ACTIONS(1098), + [anon_sym_typedef] = ACTIONS(1096), + [anon_sym_extern] = ACTIONS(1096), + [anon_sym___attribute__] = ACTIONS(1096), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1098), + [anon_sym___declspec] = ACTIONS(1096), + [anon_sym___cdecl] = ACTIONS(1096), + [anon_sym___clrcall] = ACTIONS(1096), + [anon_sym___stdcall] = ACTIONS(1096), + [anon_sym___fastcall] = ACTIONS(1096), + [anon_sym___thiscall] = ACTIONS(1096), + [anon_sym___vectorcall] = ACTIONS(1096), + [anon_sym_LBRACE] = ACTIONS(1098), + [anon_sym_static] = ACTIONS(1096), + [anon_sym_auto] = ACTIONS(1096), + [anon_sym_register] = ACTIONS(1096), + [anon_sym_inline] = ACTIONS(1096), + [anon_sym_const] = ACTIONS(1096), + [anon_sym_volatile] = ACTIONS(1096), + [anon_sym_restrict] = ACTIONS(1096), + [anon_sym__Atomic] = ACTIONS(1096), + [anon_sym_signed] = ACTIONS(1096), + [anon_sym_unsigned] = ACTIONS(1096), + [anon_sym_long] = ACTIONS(1096), + [anon_sym_short] = ACTIONS(1096), + [sym_primitive_type] = ACTIONS(1096), + [anon_sym_enum] = ACTIONS(1096), + [anon_sym_struct] = ACTIONS(1096), + [anon_sym_union] = ACTIONS(1096), + [anon_sym_if] = ACTIONS(1096), + [anon_sym_switch] = ACTIONS(1096), + [anon_sym_case] = ACTIONS(1096), + [anon_sym_default] = ACTIONS(1096), + [anon_sym_while] = ACTIONS(1096), + [anon_sym_do] = ACTIONS(1096), + [anon_sym_for] = ACTIONS(1096), + [anon_sym_return] = ACTIONS(1096), + [anon_sym_break] = ACTIONS(1096), + [anon_sym_continue] = ACTIONS(1096), + [anon_sym_goto] = ACTIONS(1096), + [anon_sym_DASH_DASH] = ACTIONS(1098), + [anon_sym_PLUS_PLUS] = ACTIONS(1098), + [anon_sym_sizeof] = ACTIONS(1096), + [sym_number_literal] = ACTIONS(1098), + [anon_sym_L_SQUOTE] = ACTIONS(1098), + [anon_sym_u_SQUOTE] = ACTIONS(1098), + [anon_sym_U_SQUOTE] = ACTIONS(1098), + [anon_sym_u8_SQUOTE] = ACTIONS(1098), + [anon_sym_SQUOTE] = ACTIONS(1098), + [anon_sym_L_DQUOTE] = ACTIONS(1098), + [anon_sym_u_DQUOTE] = ACTIONS(1098), + [anon_sym_U_DQUOTE] = ACTIONS(1098), + [anon_sym_u8_DQUOTE] = ACTIONS(1098), + [anon_sym_DQUOTE] = ACTIONS(1098), + [sym_true] = ACTIONS(1096), + [sym_false] = ACTIONS(1096), + [sym_null] = ACTIONS(1096), + [sym_comment] = ACTIONS(3), + }, + [363] = { + [ts_builtin_sym_end] = ACTIONS(1030), + [sym_identifier] = ACTIONS(1028), + [aux_sym_preproc_include_token1] = ACTIONS(1028), + [aux_sym_preproc_def_token1] = ACTIONS(1028), + [aux_sym_preproc_if_token1] = ACTIONS(1028), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1028), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1028), + [sym_preproc_directive] = ACTIONS(1028), + [anon_sym_LPAREN2] = ACTIONS(1030), + [anon_sym_BANG] = ACTIONS(1030), + [anon_sym_TILDE] = ACTIONS(1030), + [anon_sym_DASH] = ACTIONS(1028), + [anon_sym_PLUS] = ACTIONS(1028), + [anon_sym_STAR] = ACTIONS(1030), + [anon_sym_AMP] = ACTIONS(1030), + [anon_sym_SEMI] = ACTIONS(1030), + [anon_sym_typedef] = ACTIONS(1028), + [anon_sym_extern] = ACTIONS(1028), + [anon_sym___attribute__] = ACTIONS(1028), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1030), + [anon_sym___declspec] = ACTIONS(1028), + [anon_sym___cdecl] = ACTIONS(1028), + [anon_sym___clrcall] = ACTIONS(1028), + [anon_sym___stdcall] = ACTIONS(1028), + [anon_sym___fastcall] = ACTIONS(1028), + [anon_sym___thiscall] = ACTIONS(1028), + [anon_sym___vectorcall] = ACTIONS(1028), + [anon_sym_LBRACE] = ACTIONS(1030), + [anon_sym_static] = ACTIONS(1028), + [anon_sym_auto] = ACTIONS(1028), + [anon_sym_register] = ACTIONS(1028), + [anon_sym_inline] = ACTIONS(1028), + [anon_sym_const] = ACTIONS(1028), + [anon_sym_volatile] = ACTIONS(1028), + [anon_sym_restrict] = ACTIONS(1028), + [anon_sym__Atomic] = ACTIONS(1028), + [anon_sym_signed] = ACTIONS(1028), + [anon_sym_unsigned] = ACTIONS(1028), + [anon_sym_long] = ACTIONS(1028), + [anon_sym_short] = ACTIONS(1028), + [sym_primitive_type] = ACTIONS(1028), + [anon_sym_enum] = ACTIONS(1028), + [anon_sym_struct] = ACTIONS(1028), + [anon_sym_union] = ACTIONS(1028), + [anon_sym_if] = ACTIONS(1028), + [anon_sym_switch] = ACTIONS(1028), + [anon_sym_case] = ACTIONS(1028), + [anon_sym_default] = ACTIONS(1028), + [anon_sym_while] = ACTIONS(1028), + [anon_sym_do] = ACTIONS(1028), + [anon_sym_for] = ACTIONS(1028), + [anon_sym_return] = ACTIONS(1028), + [anon_sym_break] = ACTIONS(1028), + [anon_sym_continue] = ACTIONS(1028), + [anon_sym_goto] = ACTIONS(1028), + [anon_sym_DASH_DASH] = ACTIONS(1030), + [anon_sym_PLUS_PLUS] = ACTIONS(1030), + [anon_sym_sizeof] = ACTIONS(1028), + [sym_number_literal] = ACTIONS(1030), + [anon_sym_L_SQUOTE] = ACTIONS(1030), + [anon_sym_u_SQUOTE] = ACTIONS(1030), + [anon_sym_U_SQUOTE] = ACTIONS(1030), + [anon_sym_u8_SQUOTE] = ACTIONS(1030), + [anon_sym_SQUOTE] = ACTIONS(1030), + [anon_sym_L_DQUOTE] = ACTIONS(1030), + [anon_sym_u_DQUOTE] = ACTIONS(1030), + [anon_sym_U_DQUOTE] = ACTIONS(1030), + [anon_sym_u8_DQUOTE] = ACTIONS(1030), + [anon_sym_DQUOTE] = ACTIONS(1030), + [sym_true] = ACTIONS(1028), + [sym_false] = ACTIONS(1028), + [sym_null] = ACTIONS(1028), + [sym_comment] = ACTIONS(3), + }, + [364] = { + [sym_identifier] = ACTIONS(1088), + [aux_sym_preproc_include_token1] = ACTIONS(1088), + [aux_sym_preproc_def_token1] = ACTIONS(1088), + [aux_sym_preproc_if_token1] = ACTIONS(1088), + [aux_sym_preproc_if_token2] = ACTIONS(1088), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1088), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1088), + [sym_preproc_directive] = ACTIONS(1088), + [anon_sym_LPAREN2] = ACTIONS(1090), + [anon_sym_BANG] = ACTIONS(1090), + [anon_sym_TILDE] = ACTIONS(1090), + [anon_sym_DASH] = ACTIONS(1088), + [anon_sym_PLUS] = ACTIONS(1088), + [anon_sym_STAR] = ACTIONS(1090), + [anon_sym_AMP] = ACTIONS(1090), + [anon_sym_SEMI] = ACTIONS(1090), + [anon_sym_typedef] = ACTIONS(1088), + [anon_sym_extern] = ACTIONS(1088), + [anon_sym___attribute__] = ACTIONS(1088), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1090), + [anon_sym___declspec] = ACTIONS(1088), + [anon_sym___cdecl] = ACTIONS(1088), + [anon_sym___clrcall] = ACTIONS(1088), + [anon_sym___stdcall] = ACTIONS(1088), + [anon_sym___fastcall] = ACTIONS(1088), + [anon_sym___thiscall] = ACTIONS(1088), + [anon_sym___vectorcall] = ACTIONS(1088), + [anon_sym_LBRACE] = ACTIONS(1090), + [anon_sym_static] = ACTIONS(1088), + [anon_sym_auto] = ACTIONS(1088), + [anon_sym_register] = ACTIONS(1088), + [anon_sym_inline] = ACTIONS(1088), + [anon_sym_const] = ACTIONS(1088), + [anon_sym_volatile] = ACTIONS(1088), + [anon_sym_restrict] = ACTIONS(1088), + [anon_sym__Atomic] = ACTIONS(1088), + [anon_sym_signed] = ACTIONS(1088), + [anon_sym_unsigned] = ACTIONS(1088), + [anon_sym_long] = ACTIONS(1088), + [anon_sym_short] = ACTIONS(1088), + [sym_primitive_type] = ACTIONS(1088), + [anon_sym_enum] = ACTIONS(1088), + [anon_sym_struct] = ACTIONS(1088), + [anon_sym_union] = ACTIONS(1088), + [anon_sym_if] = ACTIONS(1088), + [anon_sym_switch] = ACTIONS(1088), + [anon_sym_case] = ACTIONS(1088), + [anon_sym_default] = ACTIONS(1088), + [anon_sym_while] = ACTIONS(1088), + [anon_sym_do] = ACTIONS(1088), + [anon_sym_for] = ACTIONS(1088), + [anon_sym_return] = ACTIONS(1088), + [anon_sym_break] = ACTIONS(1088), + [anon_sym_continue] = ACTIONS(1088), + [anon_sym_goto] = ACTIONS(1088), + [anon_sym_DASH_DASH] = ACTIONS(1090), + [anon_sym_PLUS_PLUS] = ACTIONS(1090), + [anon_sym_sizeof] = ACTIONS(1088), + [sym_number_literal] = ACTIONS(1090), + [anon_sym_L_SQUOTE] = ACTIONS(1090), + [anon_sym_u_SQUOTE] = ACTIONS(1090), + [anon_sym_U_SQUOTE] = ACTIONS(1090), + [anon_sym_u8_SQUOTE] = ACTIONS(1090), + [anon_sym_SQUOTE] = ACTIONS(1090), + [anon_sym_L_DQUOTE] = ACTIONS(1090), + [anon_sym_u_DQUOTE] = ACTIONS(1090), + [anon_sym_U_DQUOTE] = ACTIONS(1090), + [anon_sym_u8_DQUOTE] = ACTIONS(1090), + [anon_sym_DQUOTE] = ACTIONS(1090), + [sym_true] = ACTIONS(1088), + [sym_false] = ACTIONS(1088), + [sym_null] = ACTIONS(1088), + [sym_comment] = ACTIONS(3), + }, + [365] = { + [sym_identifier] = ACTIONS(1068), + [aux_sym_preproc_include_token1] = ACTIONS(1068), + [aux_sym_preproc_def_token1] = ACTIONS(1068), + [aux_sym_preproc_if_token1] = ACTIONS(1068), + [aux_sym_preproc_if_token2] = ACTIONS(1068), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1068), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1068), + [sym_preproc_directive] = ACTIONS(1068), + [anon_sym_LPAREN2] = ACTIONS(1070), + [anon_sym_BANG] = ACTIONS(1070), + [anon_sym_TILDE] = ACTIONS(1070), + [anon_sym_DASH] = ACTIONS(1068), + [anon_sym_PLUS] = ACTIONS(1068), + [anon_sym_STAR] = ACTIONS(1070), + [anon_sym_AMP] = ACTIONS(1070), + [anon_sym_SEMI] = ACTIONS(1070), + [anon_sym_typedef] = ACTIONS(1068), + [anon_sym_extern] = ACTIONS(1068), + [anon_sym___attribute__] = ACTIONS(1068), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1070), + [anon_sym___declspec] = ACTIONS(1068), + [anon_sym___cdecl] = ACTIONS(1068), + [anon_sym___clrcall] = ACTIONS(1068), + [anon_sym___stdcall] = ACTIONS(1068), + [anon_sym___fastcall] = ACTIONS(1068), + [anon_sym___thiscall] = ACTIONS(1068), + [anon_sym___vectorcall] = ACTIONS(1068), + [anon_sym_LBRACE] = ACTIONS(1070), + [anon_sym_static] = ACTIONS(1068), + [anon_sym_auto] = ACTIONS(1068), + [anon_sym_register] = ACTIONS(1068), + [anon_sym_inline] = ACTIONS(1068), + [anon_sym_const] = ACTIONS(1068), + [anon_sym_volatile] = ACTIONS(1068), + [anon_sym_restrict] = ACTIONS(1068), + [anon_sym__Atomic] = ACTIONS(1068), + [anon_sym_signed] = ACTIONS(1068), + [anon_sym_unsigned] = ACTIONS(1068), + [anon_sym_long] = ACTIONS(1068), + [anon_sym_short] = ACTIONS(1068), + [sym_primitive_type] = ACTIONS(1068), + [anon_sym_enum] = ACTIONS(1068), + [anon_sym_struct] = ACTIONS(1068), + [anon_sym_union] = ACTIONS(1068), + [anon_sym_if] = ACTIONS(1068), + [anon_sym_switch] = ACTIONS(1068), + [anon_sym_case] = ACTIONS(1068), + [anon_sym_default] = ACTIONS(1068), + [anon_sym_while] = ACTIONS(1068), + [anon_sym_do] = ACTIONS(1068), + [anon_sym_for] = ACTIONS(1068), + [anon_sym_return] = ACTIONS(1068), + [anon_sym_break] = ACTIONS(1068), + [anon_sym_continue] = ACTIONS(1068), + [anon_sym_goto] = ACTIONS(1068), + [anon_sym_DASH_DASH] = ACTIONS(1070), + [anon_sym_PLUS_PLUS] = ACTIONS(1070), + [anon_sym_sizeof] = ACTIONS(1068), + [sym_number_literal] = ACTIONS(1070), + [anon_sym_L_SQUOTE] = ACTIONS(1070), + [anon_sym_u_SQUOTE] = ACTIONS(1070), + [anon_sym_U_SQUOTE] = ACTIONS(1070), + [anon_sym_u8_SQUOTE] = ACTIONS(1070), + [anon_sym_SQUOTE] = ACTIONS(1070), + [anon_sym_L_DQUOTE] = ACTIONS(1070), + [anon_sym_u_DQUOTE] = ACTIONS(1070), + [anon_sym_U_DQUOTE] = ACTIONS(1070), + [anon_sym_u8_DQUOTE] = ACTIONS(1070), + [anon_sym_DQUOTE] = ACTIONS(1070), + [sym_true] = ACTIONS(1068), + [sym_false] = ACTIONS(1068), + [sym_null] = ACTIONS(1068), + [sym_comment] = ACTIONS(3), + }, + [366] = { + [ts_builtin_sym_end] = ACTIONS(1090), + [sym_identifier] = ACTIONS(1088), + [aux_sym_preproc_include_token1] = ACTIONS(1088), + [aux_sym_preproc_def_token1] = ACTIONS(1088), + [aux_sym_preproc_if_token1] = ACTIONS(1088), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1088), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1088), + [sym_preproc_directive] = ACTIONS(1088), + [anon_sym_LPAREN2] = ACTIONS(1090), + [anon_sym_BANG] = ACTIONS(1090), + [anon_sym_TILDE] = ACTIONS(1090), + [anon_sym_DASH] = ACTIONS(1088), + [anon_sym_PLUS] = ACTIONS(1088), + [anon_sym_STAR] = ACTIONS(1090), + [anon_sym_AMP] = ACTIONS(1090), + [anon_sym_SEMI] = ACTIONS(1090), + [anon_sym_typedef] = ACTIONS(1088), + [anon_sym_extern] = ACTIONS(1088), + [anon_sym___attribute__] = ACTIONS(1088), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1090), + [anon_sym___declspec] = ACTIONS(1088), + [anon_sym___cdecl] = ACTIONS(1088), + [anon_sym___clrcall] = ACTIONS(1088), + [anon_sym___stdcall] = ACTIONS(1088), + [anon_sym___fastcall] = ACTIONS(1088), + [anon_sym___thiscall] = ACTIONS(1088), + [anon_sym___vectorcall] = ACTIONS(1088), + [anon_sym_LBRACE] = ACTIONS(1090), + [anon_sym_static] = ACTIONS(1088), + [anon_sym_auto] = ACTIONS(1088), + [anon_sym_register] = ACTIONS(1088), + [anon_sym_inline] = ACTIONS(1088), + [anon_sym_const] = ACTIONS(1088), + [anon_sym_volatile] = ACTIONS(1088), + [anon_sym_restrict] = ACTIONS(1088), + [anon_sym__Atomic] = ACTIONS(1088), + [anon_sym_signed] = ACTIONS(1088), + [anon_sym_unsigned] = ACTIONS(1088), + [anon_sym_long] = ACTIONS(1088), + [anon_sym_short] = ACTIONS(1088), + [sym_primitive_type] = ACTIONS(1088), + [anon_sym_enum] = ACTIONS(1088), + [anon_sym_struct] = ACTIONS(1088), + [anon_sym_union] = ACTIONS(1088), + [anon_sym_if] = ACTIONS(1088), + [anon_sym_switch] = ACTIONS(1088), + [anon_sym_case] = ACTIONS(1088), + [anon_sym_default] = ACTIONS(1088), + [anon_sym_while] = ACTIONS(1088), + [anon_sym_do] = ACTIONS(1088), + [anon_sym_for] = ACTIONS(1088), + [anon_sym_return] = ACTIONS(1088), + [anon_sym_break] = ACTIONS(1088), + [anon_sym_continue] = ACTIONS(1088), + [anon_sym_goto] = ACTIONS(1088), + [anon_sym_DASH_DASH] = ACTIONS(1090), + [anon_sym_PLUS_PLUS] = ACTIONS(1090), + [anon_sym_sizeof] = ACTIONS(1088), + [sym_number_literal] = ACTIONS(1090), + [anon_sym_L_SQUOTE] = ACTIONS(1090), + [anon_sym_u_SQUOTE] = ACTIONS(1090), + [anon_sym_U_SQUOTE] = ACTIONS(1090), + [anon_sym_u8_SQUOTE] = ACTIONS(1090), + [anon_sym_SQUOTE] = ACTIONS(1090), + [anon_sym_L_DQUOTE] = ACTIONS(1090), + [anon_sym_u_DQUOTE] = ACTIONS(1090), + [anon_sym_U_DQUOTE] = ACTIONS(1090), + [anon_sym_u8_DQUOTE] = ACTIONS(1090), + [anon_sym_DQUOTE] = ACTIONS(1090), + [sym_true] = ACTIONS(1088), + [sym_false] = ACTIONS(1088), + [sym_null] = ACTIONS(1088), + [sym_comment] = ACTIONS(3), + }, + [367] = { + [ts_builtin_sym_end] = ACTIONS(1118), + [sym_identifier] = ACTIONS(1116), + [aux_sym_preproc_include_token1] = ACTIONS(1116), + [aux_sym_preproc_def_token1] = ACTIONS(1116), + [aux_sym_preproc_if_token1] = ACTIONS(1116), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1116), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1116), + [sym_preproc_directive] = ACTIONS(1116), + [anon_sym_LPAREN2] = ACTIONS(1118), + [anon_sym_BANG] = ACTIONS(1118), + [anon_sym_TILDE] = ACTIONS(1118), + [anon_sym_DASH] = ACTIONS(1116), + [anon_sym_PLUS] = ACTIONS(1116), + [anon_sym_STAR] = ACTIONS(1118), + [anon_sym_AMP] = ACTIONS(1118), + [anon_sym_SEMI] = ACTIONS(1118), + [anon_sym_typedef] = ACTIONS(1116), + [anon_sym_extern] = ACTIONS(1116), + [anon_sym___attribute__] = ACTIONS(1116), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1118), + [anon_sym___declspec] = ACTIONS(1116), + [anon_sym___cdecl] = ACTIONS(1116), + [anon_sym___clrcall] = ACTIONS(1116), + [anon_sym___stdcall] = ACTIONS(1116), + [anon_sym___fastcall] = ACTIONS(1116), + [anon_sym___thiscall] = ACTIONS(1116), + [anon_sym___vectorcall] = ACTIONS(1116), + [anon_sym_LBRACE] = ACTIONS(1118), + [anon_sym_static] = ACTIONS(1116), + [anon_sym_auto] = ACTIONS(1116), + [anon_sym_register] = ACTIONS(1116), + [anon_sym_inline] = ACTIONS(1116), + [anon_sym_const] = ACTIONS(1116), + [anon_sym_volatile] = ACTIONS(1116), + [anon_sym_restrict] = ACTIONS(1116), + [anon_sym__Atomic] = ACTIONS(1116), + [anon_sym_signed] = ACTIONS(1116), + [anon_sym_unsigned] = ACTIONS(1116), + [anon_sym_long] = ACTIONS(1116), + [anon_sym_short] = ACTIONS(1116), + [sym_primitive_type] = ACTIONS(1116), + [anon_sym_enum] = ACTIONS(1116), + [anon_sym_struct] = ACTIONS(1116), + [anon_sym_union] = ACTIONS(1116), + [anon_sym_if] = ACTIONS(1116), + [anon_sym_switch] = ACTIONS(1116), + [anon_sym_case] = ACTIONS(1116), + [anon_sym_default] = ACTIONS(1116), + [anon_sym_while] = ACTIONS(1116), + [anon_sym_do] = ACTIONS(1116), + [anon_sym_for] = ACTIONS(1116), + [anon_sym_return] = ACTIONS(1116), + [anon_sym_break] = ACTIONS(1116), + [anon_sym_continue] = ACTIONS(1116), + [anon_sym_goto] = ACTIONS(1116), + [anon_sym_DASH_DASH] = ACTIONS(1118), + [anon_sym_PLUS_PLUS] = ACTIONS(1118), + [anon_sym_sizeof] = ACTIONS(1116), + [sym_number_literal] = ACTIONS(1118), + [anon_sym_L_SQUOTE] = ACTIONS(1118), + [anon_sym_u_SQUOTE] = ACTIONS(1118), + [anon_sym_U_SQUOTE] = ACTIONS(1118), + [anon_sym_u8_SQUOTE] = ACTIONS(1118), + [anon_sym_SQUOTE] = ACTIONS(1118), + [anon_sym_L_DQUOTE] = ACTIONS(1118), + [anon_sym_u_DQUOTE] = ACTIONS(1118), + [anon_sym_U_DQUOTE] = ACTIONS(1118), + [anon_sym_u8_DQUOTE] = ACTIONS(1118), + [anon_sym_DQUOTE] = ACTIONS(1118), + [sym_true] = ACTIONS(1116), + [sym_false] = ACTIONS(1116), + [sym_null] = ACTIONS(1116), + [sym_comment] = ACTIONS(3), + }, + [368] = { + [sym_identifier] = ACTIONS(1052), + [aux_sym_preproc_include_token1] = ACTIONS(1052), + [aux_sym_preproc_def_token1] = ACTIONS(1052), + [aux_sym_preproc_if_token1] = ACTIONS(1052), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1052), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1052), + [sym_preproc_directive] = ACTIONS(1052), + [anon_sym_LPAREN2] = ACTIONS(1054), + [anon_sym_BANG] = ACTIONS(1054), + [anon_sym_TILDE] = ACTIONS(1054), + [anon_sym_DASH] = ACTIONS(1052), + [anon_sym_PLUS] = ACTIONS(1052), + [anon_sym_STAR] = ACTIONS(1054), + [anon_sym_AMP] = ACTIONS(1054), + [anon_sym_SEMI] = ACTIONS(1054), + [anon_sym_typedef] = ACTIONS(1052), + [anon_sym_extern] = ACTIONS(1052), + [anon_sym___attribute__] = ACTIONS(1052), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1054), + [anon_sym___declspec] = ACTIONS(1052), + [anon_sym___cdecl] = ACTIONS(1052), + [anon_sym___clrcall] = ACTIONS(1052), + [anon_sym___stdcall] = ACTIONS(1052), + [anon_sym___fastcall] = ACTIONS(1052), + [anon_sym___thiscall] = ACTIONS(1052), + [anon_sym___vectorcall] = ACTIONS(1052), + [anon_sym_LBRACE] = ACTIONS(1054), + [anon_sym_RBRACE] = ACTIONS(1054), + [anon_sym_static] = ACTIONS(1052), + [anon_sym_auto] = ACTIONS(1052), + [anon_sym_register] = ACTIONS(1052), + [anon_sym_inline] = ACTIONS(1052), + [anon_sym_const] = ACTIONS(1052), + [anon_sym_volatile] = ACTIONS(1052), + [anon_sym_restrict] = ACTIONS(1052), + [anon_sym__Atomic] = ACTIONS(1052), + [anon_sym_signed] = ACTIONS(1052), + [anon_sym_unsigned] = ACTIONS(1052), + [anon_sym_long] = ACTIONS(1052), + [anon_sym_short] = ACTIONS(1052), + [sym_primitive_type] = ACTIONS(1052), + [anon_sym_enum] = ACTIONS(1052), + [anon_sym_struct] = ACTIONS(1052), + [anon_sym_union] = ACTIONS(1052), + [anon_sym_if] = ACTIONS(1052), + [anon_sym_switch] = ACTIONS(1052), + [anon_sym_case] = ACTIONS(1052), + [anon_sym_default] = ACTIONS(1052), + [anon_sym_while] = ACTIONS(1052), + [anon_sym_do] = ACTIONS(1052), + [anon_sym_for] = ACTIONS(1052), + [anon_sym_return] = ACTIONS(1052), + [anon_sym_break] = ACTIONS(1052), + [anon_sym_continue] = ACTIONS(1052), + [anon_sym_goto] = ACTIONS(1052), + [anon_sym_DASH_DASH] = ACTIONS(1054), + [anon_sym_PLUS_PLUS] = ACTIONS(1054), + [anon_sym_sizeof] = ACTIONS(1052), + [sym_number_literal] = ACTIONS(1054), + [anon_sym_L_SQUOTE] = ACTIONS(1054), + [anon_sym_u_SQUOTE] = ACTIONS(1054), + [anon_sym_U_SQUOTE] = ACTIONS(1054), + [anon_sym_u8_SQUOTE] = ACTIONS(1054), + [anon_sym_SQUOTE] = ACTIONS(1054), + [anon_sym_L_DQUOTE] = ACTIONS(1054), + [anon_sym_u_DQUOTE] = ACTIONS(1054), + [anon_sym_U_DQUOTE] = ACTIONS(1054), + [anon_sym_u8_DQUOTE] = ACTIONS(1054), + [anon_sym_DQUOTE] = ACTIONS(1054), + [sym_true] = ACTIONS(1052), + [sym_false] = ACTIONS(1052), + [sym_null] = ACTIONS(1052), + [sym_comment] = ACTIONS(3), + }, + [369] = { + [ts_builtin_sym_end] = ACTIONS(1070), + [sym_identifier] = ACTIONS(1068), + [aux_sym_preproc_include_token1] = ACTIONS(1068), + [aux_sym_preproc_def_token1] = ACTIONS(1068), + [aux_sym_preproc_if_token1] = ACTIONS(1068), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1068), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1068), + [sym_preproc_directive] = ACTIONS(1068), + [anon_sym_LPAREN2] = ACTIONS(1070), + [anon_sym_BANG] = ACTIONS(1070), + [anon_sym_TILDE] = ACTIONS(1070), + [anon_sym_DASH] = ACTIONS(1068), + [anon_sym_PLUS] = ACTIONS(1068), + [anon_sym_STAR] = ACTIONS(1070), + [anon_sym_AMP] = ACTIONS(1070), + [anon_sym_SEMI] = ACTIONS(1070), + [anon_sym_typedef] = ACTIONS(1068), + [anon_sym_extern] = ACTIONS(1068), + [anon_sym___attribute__] = ACTIONS(1068), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1070), + [anon_sym___declspec] = ACTIONS(1068), + [anon_sym___cdecl] = ACTIONS(1068), + [anon_sym___clrcall] = ACTIONS(1068), + [anon_sym___stdcall] = ACTIONS(1068), + [anon_sym___fastcall] = ACTIONS(1068), + [anon_sym___thiscall] = ACTIONS(1068), + [anon_sym___vectorcall] = ACTIONS(1068), + [anon_sym_LBRACE] = ACTIONS(1070), + [anon_sym_static] = ACTIONS(1068), + [anon_sym_auto] = ACTIONS(1068), + [anon_sym_register] = ACTIONS(1068), + [anon_sym_inline] = ACTIONS(1068), + [anon_sym_const] = ACTIONS(1068), + [anon_sym_volatile] = ACTIONS(1068), + [anon_sym_restrict] = ACTIONS(1068), + [anon_sym__Atomic] = ACTIONS(1068), + [anon_sym_signed] = ACTIONS(1068), + [anon_sym_unsigned] = ACTIONS(1068), + [anon_sym_long] = ACTIONS(1068), + [anon_sym_short] = ACTIONS(1068), + [sym_primitive_type] = ACTIONS(1068), + [anon_sym_enum] = ACTIONS(1068), + [anon_sym_struct] = ACTIONS(1068), + [anon_sym_union] = ACTIONS(1068), + [anon_sym_if] = ACTIONS(1068), + [anon_sym_switch] = ACTIONS(1068), + [anon_sym_case] = ACTIONS(1068), + [anon_sym_default] = ACTIONS(1068), + [anon_sym_while] = ACTIONS(1068), + [anon_sym_do] = ACTIONS(1068), + [anon_sym_for] = ACTIONS(1068), + [anon_sym_return] = ACTIONS(1068), + [anon_sym_break] = ACTIONS(1068), + [anon_sym_continue] = ACTIONS(1068), + [anon_sym_goto] = ACTIONS(1068), + [anon_sym_DASH_DASH] = ACTIONS(1070), + [anon_sym_PLUS_PLUS] = ACTIONS(1070), + [anon_sym_sizeof] = ACTIONS(1068), + [sym_number_literal] = ACTIONS(1070), + [anon_sym_L_SQUOTE] = ACTIONS(1070), + [anon_sym_u_SQUOTE] = ACTIONS(1070), + [anon_sym_U_SQUOTE] = ACTIONS(1070), + [anon_sym_u8_SQUOTE] = ACTIONS(1070), + [anon_sym_SQUOTE] = ACTIONS(1070), + [anon_sym_L_DQUOTE] = ACTIONS(1070), + [anon_sym_u_DQUOTE] = ACTIONS(1070), + [anon_sym_U_DQUOTE] = ACTIONS(1070), + [anon_sym_u8_DQUOTE] = ACTIONS(1070), + [anon_sym_DQUOTE] = ACTIONS(1070), + [sym_true] = ACTIONS(1068), + [sym_false] = ACTIONS(1068), + [sym_null] = ACTIONS(1068), + [sym_comment] = ACTIONS(3), + }, + [370] = { + [ts_builtin_sym_end] = ACTIONS(1082), + [sym_identifier] = ACTIONS(1080), + [aux_sym_preproc_include_token1] = ACTIONS(1080), + [aux_sym_preproc_def_token1] = ACTIONS(1080), + [aux_sym_preproc_if_token1] = ACTIONS(1080), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1080), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1080), + [sym_preproc_directive] = ACTIONS(1080), + [anon_sym_LPAREN2] = ACTIONS(1082), + [anon_sym_BANG] = ACTIONS(1082), + [anon_sym_TILDE] = ACTIONS(1082), + [anon_sym_DASH] = ACTIONS(1080), + [anon_sym_PLUS] = ACTIONS(1080), + [anon_sym_STAR] = ACTIONS(1082), + [anon_sym_AMP] = ACTIONS(1082), + [anon_sym_SEMI] = ACTIONS(1082), + [anon_sym_typedef] = ACTIONS(1080), + [anon_sym_extern] = ACTIONS(1080), + [anon_sym___attribute__] = ACTIONS(1080), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1082), + [anon_sym___declspec] = ACTIONS(1080), + [anon_sym___cdecl] = ACTIONS(1080), + [anon_sym___clrcall] = ACTIONS(1080), + [anon_sym___stdcall] = ACTIONS(1080), + [anon_sym___fastcall] = ACTIONS(1080), + [anon_sym___thiscall] = ACTIONS(1080), + [anon_sym___vectorcall] = ACTIONS(1080), + [anon_sym_LBRACE] = ACTIONS(1082), + [anon_sym_static] = ACTIONS(1080), + [anon_sym_auto] = ACTIONS(1080), + [anon_sym_register] = ACTIONS(1080), + [anon_sym_inline] = ACTIONS(1080), + [anon_sym_const] = ACTIONS(1080), + [anon_sym_volatile] = ACTIONS(1080), + [anon_sym_restrict] = ACTIONS(1080), + [anon_sym__Atomic] = ACTIONS(1080), + [anon_sym_signed] = ACTIONS(1080), + [anon_sym_unsigned] = ACTIONS(1080), + [anon_sym_long] = ACTIONS(1080), + [anon_sym_short] = ACTIONS(1080), + [sym_primitive_type] = ACTIONS(1080), + [anon_sym_enum] = ACTIONS(1080), + [anon_sym_struct] = ACTIONS(1080), + [anon_sym_union] = ACTIONS(1080), + [anon_sym_if] = ACTIONS(1080), + [anon_sym_switch] = ACTIONS(1080), + [anon_sym_case] = ACTIONS(1080), + [anon_sym_default] = ACTIONS(1080), + [anon_sym_while] = ACTIONS(1080), + [anon_sym_do] = ACTIONS(1080), + [anon_sym_for] = ACTIONS(1080), + [anon_sym_return] = ACTIONS(1080), + [anon_sym_break] = ACTIONS(1080), + [anon_sym_continue] = ACTIONS(1080), + [anon_sym_goto] = ACTIONS(1080), + [anon_sym_DASH_DASH] = ACTIONS(1082), + [anon_sym_PLUS_PLUS] = ACTIONS(1082), + [anon_sym_sizeof] = ACTIONS(1080), + [sym_number_literal] = ACTIONS(1082), + [anon_sym_L_SQUOTE] = ACTIONS(1082), + [anon_sym_u_SQUOTE] = ACTIONS(1082), + [anon_sym_U_SQUOTE] = ACTIONS(1082), + [anon_sym_u8_SQUOTE] = ACTIONS(1082), + [anon_sym_SQUOTE] = ACTIONS(1082), + [anon_sym_L_DQUOTE] = ACTIONS(1082), + [anon_sym_u_DQUOTE] = ACTIONS(1082), + [anon_sym_U_DQUOTE] = ACTIONS(1082), + [anon_sym_u8_DQUOTE] = ACTIONS(1082), + [anon_sym_DQUOTE] = ACTIONS(1082), + [sym_true] = ACTIONS(1080), + [sym_false] = ACTIONS(1080), + [sym_null] = ACTIONS(1080), + [sym_comment] = ACTIONS(3), + }, + [371] = { + [sym_identifier] = ACTIONS(1064), + [aux_sym_preproc_include_token1] = ACTIONS(1064), + [aux_sym_preproc_def_token1] = ACTIONS(1064), + [aux_sym_preproc_if_token1] = ACTIONS(1064), + [aux_sym_preproc_if_token2] = ACTIONS(1064), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1064), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1064), + [sym_preproc_directive] = ACTIONS(1064), + [anon_sym_LPAREN2] = ACTIONS(1066), + [anon_sym_BANG] = ACTIONS(1066), + [anon_sym_TILDE] = ACTIONS(1066), + [anon_sym_DASH] = ACTIONS(1064), + [anon_sym_PLUS] = ACTIONS(1064), + [anon_sym_STAR] = ACTIONS(1066), + [anon_sym_AMP] = ACTIONS(1066), + [anon_sym_SEMI] = ACTIONS(1066), + [anon_sym_typedef] = ACTIONS(1064), + [anon_sym_extern] = ACTIONS(1064), + [anon_sym___attribute__] = ACTIONS(1064), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1066), + [anon_sym___declspec] = ACTIONS(1064), + [anon_sym___cdecl] = ACTIONS(1064), + [anon_sym___clrcall] = ACTIONS(1064), + [anon_sym___stdcall] = ACTIONS(1064), + [anon_sym___fastcall] = ACTIONS(1064), + [anon_sym___thiscall] = ACTIONS(1064), + [anon_sym___vectorcall] = ACTIONS(1064), + [anon_sym_LBRACE] = ACTIONS(1066), + [anon_sym_static] = ACTIONS(1064), + [anon_sym_auto] = ACTIONS(1064), + [anon_sym_register] = ACTIONS(1064), + [anon_sym_inline] = ACTIONS(1064), + [anon_sym_const] = ACTIONS(1064), + [anon_sym_volatile] = ACTIONS(1064), + [anon_sym_restrict] = ACTIONS(1064), + [anon_sym__Atomic] = ACTIONS(1064), + [anon_sym_signed] = ACTIONS(1064), + [anon_sym_unsigned] = ACTIONS(1064), + [anon_sym_long] = ACTIONS(1064), + [anon_sym_short] = ACTIONS(1064), + [sym_primitive_type] = ACTIONS(1064), + [anon_sym_enum] = ACTIONS(1064), + [anon_sym_struct] = ACTIONS(1064), + [anon_sym_union] = ACTIONS(1064), + [anon_sym_if] = ACTIONS(1064), + [anon_sym_switch] = ACTIONS(1064), + [anon_sym_case] = ACTIONS(1064), + [anon_sym_default] = ACTIONS(1064), + [anon_sym_while] = ACTIONS(1064), + [anon_sym_do] = ACTIONS(1064), + [anon_sym_for] = ACTIONS(1064), + [anon_sym_return] = ACTIONS(1064), + [anon_sym_break] = ACTIONS(1064), + [anon_sym_continue] = ACTIONS(1064), + [anon_sym_goto] = ACTIONS(1064), + [anon_sym_DASH_DASH] = ACTIONS(1066), + [anon_sym_PLUS_PLUS] = ACTIONS(1066), + [anon_sym_sizeof] = ACTIONS(1064), + [sym_number_literal] = ACTIONS(1066), + [anon_sym_L_SQUOTE] = ACTIONS(1066), + [anon_sym_u_SQUOTE] = ACTIONS(1066), + [anon_sym_U_SQUOTE] = ACTIONS(1066), + [anon_sym_u8_SQUOTE] = ACTIONS(1066), + [anon_sym_SQUOTE] = ACTIONS(1066), + [anon_sym_L_DQUOTE] = ACTIONS(1066), + [anon_sym_u_DQUOTE] = ACTIONS(1066), + [anon_sym_U_DQUOTE] = ACTIONS(1066), + [anon_sym_u8_DQUOTE] = ACTIONS(1066), + [anon_sym_DQUOTE] = ACTIONS(1066), + [sym_true] = ACTIONS(1064), + [sym_false] = ACTIONS(1064), + [sym_null] = ACTIONS(1064), + [sym_comment] = ACTIONS(3), + }, + [372] = { + [sym_identifier] = ACTIONS(1056), + [aux_sym_preproc_include_token1] = ACTIONS(1056), + [aux_sym_preproc_def_token1] = ACTIONS(1056), + [aux_sym_preproc_if_token1] = ACTIONS(1056), + [aux_sym_preproc_if_token2] = ACTIONS(1056), + [aux_sym_preproc_ifdef_token1] = ACTIONS(1056), + [aux_sym_preproc_ifdef_token2] = ACTIONS(1056), + [sym_preproc_directive] = ACTIONS(1056), + [anon_sym_LPAREN2] = ACTIONS(1058), + [anon_sym_BANG] = ACTIONS(1058), + [anon_sym_TILDE] = ACTIONS(1058), + [anon_sym_DASH] = ACTIONS(1056), + [anon_sym_PLUS] = ACTIONS(1056), + [anon_sym_STAR] = ACTIONS(1058), + [anon_sym_AMP] = ACTIONS(1058), + [anon_sym_SEMI] = ACTIONS(1058), + [anon_sym_typedef] = ACTIONS(1056), + [anon_sym_extern] = ACTIONS(1056), + [anon_sym___attribute__] = ACTIONS(1056), + [anon_sym_LBRACK_LBRACK] = ACTIONS(1058), + [anon_sym___declspec] = ACTIONS(1056), + [anon_sym___cdecl] = ACTIONS(1056), + [anon_sym___clrcall] = ACTIONS(1056), + [anon_sym___stdcall] = ACTIONS(1056), + [anon_sym___fastcall] = ACTIONS(1056), + [anon_sym___thiscall] = ACTIONS(1056), + [anon_sym___vectorcall] = ACTIONS(1056), + [anon_sym_LBRACE] = ACTIONS(1058), + [anon_sym_static] = ACTIONS(1056), + [anon_sym_auto] = ACTIONS(1056), + [anon_sym_register] = ACTIONS(1056), + [anon_sym_inline] = ACTIONS(1056), + [anon_sym_const] = ACTIONS(1056), + [anon_sym_volatile] = ACTIONS(1056), + [anon_sym_restrict] = ACTIONS(1056), + [anon_sym__Atomic] = ACTIONS(1056), + [anon_sym_signed] = ACTIONS(1056), + [anon_sym_unsigned] = ACTIONS(1056), + [anon_sym_long] = ACTIONS(1056), + [anon_sym_short] = ACTIONS(1056), + [sym_primitive_type] = ACTIONS(1056), + [anon_sym_enum] = ACTIONS(1056), + [anon_sym_struct] = ACTIONS(1056), + [anon_sym_union] = ACTIONS(1056), + [anon_sym_if] = ACTIONS(1056), + [anon_sym_switch] = ACTIONS(1056), + [anon_sym_case] = ACTIONS(1056), + [anon_sym_default] = ACTIONS(1056), + [anon_sym_while] = ACTIONS(1056), + [anon_sym_do] = ACTIONS(1056), + [anon_sym_for] = ACTIONS(1056), + [anon_sym_return] = ACTIONS(1056), + [anon_sym_break] = ACTIONS(1056), + [anon_sym_continue] = ACTIONS(1056), + [anon_sym_goto] = ACTIONS(1056), + [anon_sym_DASH_DASH] = ACTIONS(1058), + [anon_sym_PLUS_PLUS] = ACTIONS(1058), + [anon_sym_sizeof] = ACTIONS(1056), + [sym_number_literal] = ACTIONS(1058), + [anon_sym_L_SQUOTE] = ACTIONS(1058), + [anon_sym_u_SQUOTE] = ACTIONS(1058), + [anon_sym_U_SQUOTE] = ACTIONS(1058), + [anon_sym_u8_SQUOTE] = ACTIONS(1058), + [anon_sym_SQUOTE] = ACTIONS(1058), + [anon_sym_L_DQUOTE] = ACTIONS(1058), + [anon_sym_u_DQUOTE] = ACTIONS(1058), + [anon_sym_U_DQUOTE] = ACTIONS(1058), + [anon_sym_u8_DQUOTE] = ACTIONS(1058), + [anon_sym_DQUOTE] = ACTIONS(1058), + [sym_true] = ACTIONS(1056), + [sym_false] = ACTIONS(1056), + [sym_null] = ACTIONS(1056), + [sym_comment] = ACTIONS(3), + }, + [373] = { + [sym__expression] = STATE(506), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_initializer_list] = STATE(516), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_identifier] = ACTIONS(1341), + [anon_sym_COMMA] = ACTIONS(872), + [anon_sym_RPAREN] = ACTIONS(872), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(23), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_SLASH] = ACTIONS(882), + [anon_sym_PERCENT] = ACTIONS(872), + [anon_sym_PIPE_PIPE] = ACTIONS(872), + [anon_sym_AMP_AMP] = ACTIONS(872), + [anon_sym_PIPE] = ACTIONS(882), + [anon_sym_CARET] = ACTIONS(872), + [anon_sym_AMP] = ACTIONS(880), + [anon_sym_EQ_EQ] = ACTIONS(872), + [anon_sym_BANG_EQ] = ACTIONS(872), + [anon_sym_GT] = ACTIONS(882), + [anon_sym_GT_EQ] = ACTIONS(872), + [anon_sym_LT_EQ] = ACTIONS(872), + [anon_sym_LT] = ACTIONS(882), + [anon_sym_LT_LT] = ACTIONS(872), + [anon_sym_GT_GT] = ACTIONS(872), + [anon_sym_SEMI] = ACTIONS(872), + [anon_sym_LBRACE] = ACTIONS(884), + [anon_sym_RBRACE] = ACTIONS(872), + [anon_sym_LBRACK] = ACTIONS(872), + [anon_sym_COLON] = ACTIONS(872), + [anon_sym_QMARK] = ACTIONS(872), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [anon_sym_DOT] = ACTIONS(882), + [anon_sym_DASH_GT] = ACTIONS(872), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [374] = { + [sym_type_qualifier] = STATE(857), + [sym__type_specifier] = STATE(988), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym__expression] = STATE(744), + [sym_comma_expression] = STATE(1430), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_type_descriptor] = STATE(1429), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_type_definition_repeat1] = STATE(857), + [aux_sym_sized_type_specifier_repeat1] = STATE(994), + [sym_identifier] = ACTIONS(1343), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(1345), + [anon_sym_unsigned] = ACTIONS(1345), + [anon_sym_long] = ACTIONS(1345), + [anon_sym_short] = ACTIONS(1345), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [375] = { + [sym_type_qualifier] = STATE(857), + [sym__type_specifier] = STATE(988), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym__expression] = STATE(744), + [sym_comma_expression] = STATE(1430), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_type_descriptor] = STATE(1366), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_type_definition_repeat1] = STATE(857), + [aux_sym_sized_type_specifier_repeat1] = STATE(994), + [sym_identifier] = ACTIONS(1343), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(1345), + [anon_sym_unsigned] = ACTIONS(1345), + [anon_sym_long] = ACTIONS(1345), + [anon_sym_short] = ACTIONS(1345), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [376] = { + [sym_type_qualifier] = STATE(857), + [sym__type_specifier] = STATE(988), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym__expression] = STATE(744), + [sym_comma_expression] = STATE(1430), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_type_descriptor] = STATE(1432), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_type_definition_repeat1] = STATE(857), + [aux_sym_sized_type_specifier_repeat1] = STATE(994), + [sym_identifier] = ACTIONS(1343), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(1345), + [anon_sym_unsigned] = ACTIONS(1345), + [anon_sym_long] = ACTIONS(1345), + [anon_sym_short] = ACTIONS(1345), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [377] = { + [sym_type_qualifier] = STATE(857), + [sym__type_specifier] = STATE(988), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym__expression] = STATE(744), + [sym_comma_expression] = STATE(1430), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_type_descriptor] = STATE(1408), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_type_definition_repeat1] = STATE(857), + [aux_sym_sized_type_specifier_repeat1] = STATE(994), + [sym_identifier] = ACTIONS(1343), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(1345), + [anon_sym_unsigned] = ACTIONS(1345), + [anon_sym_long] = ACTIONS(1345), + [anon_sym_short] = ACTIONS(1345), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [378] = { + [sym_type_qualifier] = STATE(857), + [sym__type_specifier] = STATE(988), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym__expression] = STATE(744), + [sym_comma_expression] = STATE(1430), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_type_descriptor] = STATE(1344), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_type_definition_repeat1] = STATE(857), + [aux_sym_sized_type_specifier_repeat1] = STATE(994), + [sym_identifier] = ACTIONS(1343), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(1345), + [anon_sym_unsigned] = ACTIONS(1345), + [anon_sym_long] = ACTIONS(1345), + [anon_sym_short] = ACTIONS(1345), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [379] = { + [sym_type_qualifier] = STATE(857), + [sym__type_specifier] = STATE(988), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym__expression] = STATE(744), + [sym_comma_expression] = STATE(1430), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_type_descriptor] = STATE(1455), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_type_definition_repeat1] = STATE(857), + [aux_sym_sized_type_specifier_repeat1] = STATE(994), + [sym_identifier] = ACTIONS(1343), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(1345), + [anon_sym_unsigned] = ACTIONS(1345), + [anon_sym_long] = ACTIONS(1345), + [anon_sym_short] = ACTIONS(1345), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [380] = { + [sym_type_qualifier] = STATE(857), + [sym__type_specifier] = STATE(988), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym__expression] = STATE(744), + [sym_comma_expression] = STATE(1430), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_type_descriptor] = STATE(1436), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_type_definition_repeat1] = STATE(857), + [aux_sym_sized_type_specifier_repeat1] = STATE(994), + [sym_identifier] = ACTIONS(1343), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(1345), + [anon_sym_unsigned] = ACTIONS(1345), + [anon_sym_long] = ACTIONS(1345), + [anon_sym_short] = ACTIONS(1345), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, + [381] = { + [sym_type_qualifier] = STATE(857), + [sym__type_specifier] = STATE(988), + [sym_sized_type_specifier] = STATE(884), + [sym_enum_specifier] = STATE(884), + [sym_struct_specifier] = STATE(884), + [sym_union_specifier] = STATE(884), + [sym__expression] = STATE(744), + [sym_comma_expression] = STATE(1430), + [sym_conditional_expression] = STATE(513), + [sym_assignment_expression] = STATE(513), + [sym_pointer_expression] = STATE(609), + [sym_unary_expression] = STATE(513), + [sym_binary_expression] = STATE(513), + [sym_update_expression] = STATE(513), + [sym_cast_expression] = STATE(513), + [sym_type_descriptor] = STATE(1346), + [sym_sizeof_expression] = STATE(513), + [sym_subscript_expression] = STATE(609), + [sym_call_expression] = STATE(609), + [sym_field_expression] = STATE(609), + [sym_compound_literal_expression] = STATE(513), + [sym_parenthesized_expression] = STATE(609), + [sym_char_literal] = STATE(513), + [sym_concatenated_string] = STATE(513), + [sym_string_literal] = STATE(427), + [sym_macro_type_specifier] = STATE(884), + [aux_sym_type_definition_repeat1] = STATE(857), + [aux_sym_sized_type_specifier_repeat1] = STATE(994), + [sym_identifier] = ACTIONS(1343), + [anon_sym_LPAREN2] = ACTIONS(19), + [anon_sym_BANG] = ACTIONS(21), + [anon_sym_TILDE] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(23), + [anon_sym_STAR] = ACTIONS(25), + [anon_sym_AMP] = ACTIONS(25), + [anon_sym_const] = ACTIONS(45), + [anon_sym_volatile] = ACTIONS(45), + [anon_sym_restrict] = ACTIONS(45), + [anon_sym__Atomic] = ACTIONS(45), + [anon_sym_signed] = ACTIONS(1345), + [anon_sym_unsigned] = ACTIONS(1345), + [anon_sym_long] = ACTIONS(1345), + [anon_sym_short] = ACTIONS(1345), + [sym_primitive_type] = ACTIONS(49), + [anon_sym_enum] = ACTIONS(51), + [anon_sym_struct] = ACTIONS(53), + [anon_sym_union] = ACTIONS(55), + [anon_sym_DASH_DASH] = ACTIONS(79), + [anon_sym_PLUS_PLUS] = ACTIONS(79), + [anon_sym_sizeof] = ACTIONS(81), + [sym_number_literal] = ACTIONS(83), + [anon_sym_L_SQUOTE] = ACTIONS(85), + [anon_sym_u_SQUOTE] = ACTIONS(85), + [anon_sym_U_SQUOTE] = ACTIONS(85), + [anon_sym_u8_SQUOTE] = ACTIONS(85), + [anon_sym_SQUOTE] = ACTIONS(85), + [anon_sym_L_DQUOTE] = ACTIONS(87), + [anon_sym_u_DQUOTE] = ACTIONS(87), + [anon_sym_U_DQUOTE] = ACTIONS(87), + [anon_sym_u8_DQUOTE] = ACTIONS(87), + [anon_sym_DQUOTE] = ACTIONS(87), + [sym_true] = ACTIONS(89), + [sym_false] = ACTIONS(89), + [sym_null] = ACTIONS(89), + [sym_comment] = ACTIONS(3), + }, +}; + +static const uint16_t ts_small_parse_table[] = { + [0] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1349), 25, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_BANG, + anon_sym_TILDE, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_EQ, + anon_sym_COLON, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + sym_number_literal, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + ACTIONS(1347), 38, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + anon_sym_if, + anon_sym_switch, + anon_sym_case, + anon_sym_default, + anon_sym_while, + anon_sym_do, + anon_sym_for, + anon_sym_return, + anon_sym_break, + anon_sym_continue, + anon_sym_goto, + anon_sym_sizeof, + sym_true, + sym_false, + sym_null, + sym_identifier, + [71] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1353), 25, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_BANG, + anon_sym_TILDE, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_EQ, + anon_sym_COLON, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + sym_number_literal, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + ACTIONS(1351), 38, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + anon_sym_if, + anon_sym_switch, + anon_sym_case, + anon_sym_default, + anon_sym_while, + anon_sym_do, + anon_sym_for, + anon_sym_return, + anon_sym_break, + anon_sym_continue, + anon_sym_goto, + anon_sym_sizeof, + sym_true, + sym_false, + sym_null, + sym_identifier, + [142] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(884), 1, + anon_sym_LBRACE, + ACTIONS(1042), 1, + anon_sym_AMP, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1361), 1, + anon_sym_TILDE, + ACTIONS(1363), 1, + anon_sym_STAR, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(516), 1, + sym_initializer_list, + STATE(630), 1, + sym__expression, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(1359), 3, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + ACTIONS(882), 5, + anon_sym_SLASH, + anon_sym_PIPE, + anon_sym_GT, + anon_sym_LT, + anon_sym_DOT, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + ACTIONS(872), 14, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_DASH_GT, + [249] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1369), 1, + sym_identifier, + ACTIONS(1378), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1374), 17, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_if, + anon_sym_switch, + anon_sym_case, + anon_sym_default, + anon_sym_while, + anon_sym_do, + anon_sym_for, + anon_sym_return, + anon_sym_break, + anon_sym_continue, + anon_sym_goto, + anon_sym_sizeof, + sym_true, + sym_false, + sym_null, + ACTIONS(1376), 19, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + ACTIONS(1372), 20, + anon_sym_LPAREN2, + anon_sym_BANG, + anon_sym_TILDE, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_SEMI, + anon_sym_LBRACE, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + sym_number_literal, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + [321] = 30, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1381), 1, + sym_identifier, + ACTIONS(1383), 1, + anon_sym_DOT_DOT_DOT, + ACTIONS(1385), 1, + anon_sym_RPAREN, + ACTIONS(1387), 1, + anon_sym_LPAREN2, + ACTIONS(1389), 1, + anon_sym_STAR, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1393), 1, + anon_sym_LBRACK, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(946), 1, + sym__declaration_specifiers, + STATE(1095), 1, + sym__declarator, + STATE(1139), 1, + sym__abstract_declarator, + STATE(1141), 1, + sym_parameter_list, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(1150), 2, + sym_variadic_parameter, + sym_parameter_declaration, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + STATE(1142), 4, + sym_abstract_parenthesized_declarator, + sym_abstract_pointer_declarator, + sym_abstract_function_declarator, + sym_abstract_array_declarator, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [440] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1397), 1, + aux_sym_preproc_def_token1, + ACTIONS(1399), 1, + aux_sym_preproc_if_token1, + ACTIONS(1401), 1, + aux_sym_preproc_if_token2, + ACTIONS(1405), 1, + aux_sym_preproc_else_token1, + ACTIONS(1407), 1, + aux_sym_preproc_elif_token1, + ACTIONS(1409), 1, + sym_preproc_directive, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(997), 1, + sym__declaration_specifiers, + ACTIONS(1403), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + STATE(1363), 2, + sym_preproc_else_in_field_declaration_list, + sym_preproc_elif_in_field_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(396), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [548] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1397), 1, + aux_sym_preproc_def_token1, + ACTIONS(1399), 1, + aux_sym_preproc_if_token1, + ACTIONS(1405), 1, + aux_sym_preproc_else_token1, + ACTIONS(1407), 1, + aux_sym_preproc_elif_token1, + ACTIONS(1409), 1, + sym_preproc_directive, + ACTIONS(1411), 1, + aux_sym_preproc_if_token2, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(997), 1, + sym__declaration_specifiers, + ACTIONS(1403), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + STATE(1435), 2, + sym_preproc_else_in_field_declaration_list, + sym_preproc_elif_in_field_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(411), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [656] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1397), 1, + aux_sym_preproc_def_token1, + ACTIONS(1399), 1, + aux_sym_preproc_if_token1, + ACTIONS(1405), 1, + aux_sym_preproc_else_token1, + ACTIONS(1407), 1, + aux_sym_preproc_elif_token1, + ACTIONS(1409), 1, + sym_preproc_directive, + ACTIONS(1413), 1, + aux_sym_preproc_if_token2, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(997), 1, + sym__declaration_specifiers, + ACTIONS(1403), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + STATE(1392), 2, + sym_preproc_else_in_field_declaration_list, + sym_preproc_elif_in_field_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(400), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [764] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1397), 1, + aux_sym_preproc_def_token1, + ACTIONS(1399), 1, + aux_sym_preproc_if_token1, + ACTIONS(1405), 1, + aux_sym_preproc_else_token1, + ACTIONS(1407), 1, + aux_sym_preproc_elif_token1, + ACTIONS(1409), 1, + sym_preproc_directive, + ACTIONS(1415), 1, + aux_sym_preproc_if_token2, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(997), 1, + sym__declaration_specifiers, + ACTIONS(1403), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + STATE(1299), 2, + sym_preproc_else_in_field_declaration_list, + sym_preproc_elif_in_field_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(395), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [872] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1397), 1, + aux_sym_preproc_def_token1, + ACTIONS(1399), 1, + aux_sym_preproc_if_token1, + ACTIONS(1405), 1, + aux_sym_preproc_else_token1, + ACTIONS(1407), 1, + aux_sym_preproc_elif_token1, + ACTIONS(1409), 1, + sym_preproc_directive, + ACTIONS(1417), 1, + aux_sym_preproc_if_token2, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(997), 1, + sym__declaration_specifiers, + ACTIONS(1403), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + STATE(1357), 2, + sym_preproc_else_in_field_declaration_list, + sym_preproc_elif_in_field_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(411), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [980] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1397), 1, + aux_sym_preproc_def_token1, + ACTIONS(1399), 1, + aux_sym_preproc_if_token1, + ACTIONS(1405), 1, + aux_sym_preproc_else_token1, + ACTIONS(1407), 1, + aux_sym_preproc_elif_token1, + ACTIONS(1409), 1, + sym_preproc_directive, + ACTIONS(1419), 1, + aux_sym_preproc_if_token2, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(997), 1, + sym__declaration_specifiers, + ACTIONS(1403), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + STATE(1340), 2, + sym_preproc_else_in_field_declaration_list, + sym_preproc_elif_in_field_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(393), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [1088] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1397), 1, + aux_sym_preproc_def_token1, + ACTIONS(1399), 1, + aux_sym_preproc_if_token1, + ACTIONS(1405), 1, + aux_sym_preproc_else_token1, + ACTIONS(1407), 1, + aux_sym_preproc_elif_token1, + ACTIONS(1409), 1, + sym_preproc_directive, + ACTIONS(1421), 1, + aux_sym_preproc_if_token2, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(997), 1, + sym__declaration_specifiers, + ACTIONS(1403), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + STATE(1290), 2, + sym_preproc_else_in_field_declaration_list, + sym_preproc_elif_in_field_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(411), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [1196] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1397), 1, + aux_sym_preproc_def_token1, + ACTIONS(1399), 1, + aux_sym_preproc_if_token1, + ACTIONS(1405), 1, + aux_sym_preproc_else_token1, + ACTIONS(1407), 1, + aux_sym_preproc_elif_token1, + ACTIONS(1409), 1, + sym_preproc_directive, + ACTIONS(1423), 1, + aux_sym_preproc_if_token2, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(997), 1, + sym__declaration_specifiers, + ACTIONS(1403), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + STATE(1287), 2, + sym_preproc_else_in_field_declaration_list, + sym_preproc_elif_in_field_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(411), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [1304] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1397), 1, + aux_sym_preproc_def_token1, + ACTIONS(1399), 1, + aux_sym_preproc_if_token1, + ACTIONS(1405), 1, + aux_sym_preproc_else_token1, + ACTIONS(1407), 1, + aux_sym_preproc_elif_token1, + ACTIONS(1409), 1, + sym_preproc_directive, + ACTIONS(1425), 1, + aux_sym_preproc_if_token2, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(997), 1, + sym__declaration_specifiers, + ACTIONS(1403), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + STATE(1370), 2, + sym_preproc_else_in_field_declaration_list, + sym_preproc_elif_in_field_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(411), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [1412] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1397), 1, + aux_sym_preproc_def_token1, + ACTIONS(1399), 1, + aux_sym_preproc_if_token1, + ACTIONS(1405), 1, + aux_sym_preproc_else_token1, + ACTIONS(1407), 1, + aux_sym_preproc_elif_token1, + ACTIONS(1409), 1, + sym_preproc_directive, + ACTIONS(1427), 1, + aux_sym_preproc_if_token2, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(997), 1, + sym__declaration_specifiers, + ACTIONS(1403), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + STATE(1416), 2, + sym_preproc_else_in_field_declaration_list, + sym_preproc_elif_in_field_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(411), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [1520] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1397), 1, + aux_sym_preproc_def_token1, + ACTIONS(1399), 1, + aux_sym_preproc_if_token1, + ACTIONS(1405), 1, + aux_sym_preproc_else_token1, + ACTIONS(1407), 1, + aux_sym_preproc_elif_token1, + ACTIONS(1409), 1, + sym_preproc_directive, + ACTIONS(1429), 1, + aux_sym_preproc_if_token2, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(997), 1, + sym__declaration_specifiers, + ACTIONS(1403), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + STATE(1433), 2, + sym_preproc_else_in_field_declaration_list, + sym_preproc_elif_in_field_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(388), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [1628] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1397), 1, + aux_sym_preproc_def_token1, + ACTIONS(1399), 1, + aux_sym_preproc_if_token1, + ACTIONS(1405), 1, + aux_sym_preproc_else_token1, + ACTIONS(1407), 1, + aux_sym_preproc_elif_token1, + ACTIONS(1409), 1, + sym_preproc_directive, + ACTIONS(1431), 1, + aux_sym_preproc_if_token2, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(997), 1, + sym__declaration_specifiers, + ACTIONS(1403), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + STATE(1358), 2, + sym_preproc_else_in_field_declaration_list, + sym_preproc_elif_in_field_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(394), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [1736] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1397), 1, + aux_sym_preproc_def_token1, + ACTIONS(1399), 1, + aux_sym_preproc_if_token1, + ACTIONS(1405), 1, + aux_sym_preproc_else_token1, + ACTIONS(1407), 1, + aux_sym_preproc_elif_token1, + ACTIONS(1409), 1, + sym_preproc_directive, + ACTIONS(1433), 1, + aux_sym_preproc_if_token2, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(997), 1, + sym__declaration_specifiers, + ACTIONS(1403), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + STATE(1373), 2, + sym_preproc_else_in_field_declaration_list, + sym_preproc_elif_in_field_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(391), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [1844] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1397), 1, + aux_sym_preproc_def_token1, + ACTIONS(1399), 1, + aux_sym_preproc_if_token1, + ACTIONS(1405), 1, + aux_sym_preproc_else_token1, + ACTIONS(1407), 1, + aux_sym_preproc_elif_token1, + ACTIONS(1409), 1, + sym_preproc_directive, + ACTIONS(1435), 1, + aux_sym_preproc_if_token2, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(997), 1, + sym__declaration_specifiers, + ACTIONS(1403), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + STATE(1336), 2, + sym_preproc_else_in_field_declaration_list, + sym_preproc_elif_in_field_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(411), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [1952] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1441), 1, + anon_sym_LPAREN2, + ACTIONS(1447), 1, + anon_sym_STAR, + ACTIONS(1450), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1452), 1, + anon_sym_EQ, + ACTIONS(1454), 1, + anon_sym_COLON, + ACTIONS(1456), 10, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1445), 12, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_LBRACK, + ACTIONS(1437), 13, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + ACTIONS(1439), 13, + anon_sym_COMMA, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_QMARK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [2027] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1441), 1, + anon_sym_LPAREN2, + ACTIONS(1447), 1, + anon_sym_STAR, + ACTIONS(1450), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1452), 1, + anon_sym_EQ, + ACTIONS(1458), 1, + anon_sym_COLON, + ACTIONS(1456), 10, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1445), 12, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_LBRACK, + ACTIONS(1437), 13, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + ACTIONS(1439), 13, + anon_sym_COMMA, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_QMARK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [2102] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1441), 1, + anon_sym_LPAREN2, + ACTIONS(1447), 1, + anon_sym_STAR, + ACTIONS(1450), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1452), 1, + anon_sym_EQ, + ACTIONS(1460), 1, + anon_sym_COLON, + ACTIONS(1456), 10, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1445), 12, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_LBRACK, + ACTIONS(1437), 13, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + ACTIONS(1439), 13, + anon_sym_COMMA, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_QMARK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [2177] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1441), 1, + anon_sym_LPAREN2, + ACTIONS(1447), 1, + anon_sym_STAR, + ACTIONS(1450), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1452), 1, + anon_sym_EQ, + ACTIONS(1462), 1, + anon_sym_SEMI, + ACTIONS(1465), 1, + anon_sym_COLON, + ACTIONS(1456), 10, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1439), 12, + anon_sym_COMMA, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_QMARK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1445), 12, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_LBRACK, + ACTIONS(1437), 13, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [2254] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1441), 1, + anon_sym_LPAREN2, + ACTIONS(1447), 1, + anon_sym_STAR, + ACTIONS(1450), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1452), 1, + anon_sym_EQ, + ACTIONS(1454), 1, + anon_sym_COLON, + ACTIONS(1462), 1, + anon_sym_SEMI, + ACTIONS(1456), 10, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1439), 12, + anon_sym_COMMA, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_QMARK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1445), 12, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_LBRACK, + ACTIONS(1437), 13, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [2331] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1441), 1, + anon_sym_LPAREN2, + ACTIONS(1447), 1, + anon_sym_STAR, + ACTIONS(1450), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1452), 1, + anon_sym_EQ, + ACTIONS(1465), 1, + anon_sym_COLON, + ACTIONS(1456), 10, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1445), 12, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_LBRACK, + ACTIONS(1437), 13, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + ACTIONS(1439), 13, + anon_sym_COMMA, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_QMARK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [2406] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1441), 1, + anon_sym_LPAREN2, + ACTIONS(1447), 1, + anon_sym_STAR, + ACTIONS(1450), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1452), 1, + anon_sym_EQ, + ACTIONS(1460), 1, + anon_sym_COLON, + ACTIONS(1462), 1, + anon_sym_SEMI, + ACTIONS(1456), 10, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1439), 12, + anon_sym_COMMA, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_QMARK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1445), 12, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_LBRACK, + ACTIONS(1437), 13, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [2483] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1441), 1, + anon_sym_LPAREN2, + ACTIONS(1447), 1, + anon_sym_STAR, + ACTIONS(1450), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1452), 1, + anon_sym_EQ, + ACTIONS(1458), 1, + anon_sym_COLON, + ACTIONS(1462), 1, + anon_sym_SEMI, + ACTIONS(1456), 10, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1439), 12, + anon_sym_COMMA, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_QMARK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1445), 12, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_LBRACK, + ACTIONS(1437), 13, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [2560] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1441), 1, + anon_sym_LPAREN2, + ACTIONS(1447), 1, + anon_sym_STAR, + ACTIONS(1450), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1452), 1, + anon_sym_EQ, + ACTIONS(1456), 10, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1445), 12, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_LBRACK, + ACTIONS(1437), 13, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + ACTIONS(1439), 13, + anon_sym_COMMA, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_QMARK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [2632] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(884), 1, + anon_sym_LBRACE, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1467), 1, + anon_sym_COMMA, + ACTIONS(1469), 1, + anon_sym_RBRACE, + ACTIONS(1471), 1, + anon_sym_LBRACK, + ACTIONS(1473), 1, + anon_sym_DOT, + STATE(427), 1, + sym_string_literal, + STATE(690), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + STATE(1149), 2, + sym_initializer_list, + sym_initializer_pair, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + STATE(1105), 3, + sym_subscript_designator, + sym_field_designator, + aux_sym_initializer_pair_repeat1, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [2732] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + sym_identifier, + ACTIONS(1478), 1, + aux_sym_preproc_def_token1, + ACTIONS(1481), 1, + aux_sym_preproc_if_token1, + ACTIONS(1489), 1, + sym_preproc_directive, + ACTIONS(1495), 1, + anon_sym___attribute__, + ACTIONS(1498), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1501), 1, + anon_sym___declspec, + ACTIONS(1510), 1, + sym_primitive_type, + ACTIONS(1513), 1, + anon_sym_enum, + ACTIONS(1516), 1, + anon_sym_struct, + ACTIONS(1519), 1, + anon_sym_union, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(997), 1, + sym__declaration_specifiers, + ACTIONS(1486), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + ACTIONS(1484), 3, + aux_sym_preproc_if_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + ACTIONS(1504), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(1507), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(1492), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(411), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [2832] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(884), 1, + anon_sym_LBRACE, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1471), 1, + anon_sym_LBRACK, + ACTIONS(1473), 1, + anon_sym_DOT, + ACTIONS(1522), 1, + anon_sym_RBRACE, + STATE(427), 1, + sym_string_literal, + STATE(751), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + STATE(1235), 2, + sym_initializer_list, + sym_initializer_pair, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + STATE(1105), 3, + sym_subscript_designator, + sym_field_designator, + aux_sym_initializer_pair_repeat1, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [2929] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(884), 1, + anon_sym_LBRACE, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1471), 1, + anon_sym_LBRACK, + ACTIONS(1473), 1, + anon_sym_DOT, + ACTIONS(1524), 1, + anon_sym_RBRACE, + STATE(427), 1, + sym_string_literal, + STATE(751), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + STATE(1235), 2, + sym_initializer_list, + sym_initializer_pair, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + STATE(1105), 3, + sym_subscript_designator, + sym_field_designator, + aux_sym_initializer_pair_repeat1, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [3026] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + sym_identifier, + ACTIONS(1495), 1, + anon_sym___attribute__, + ACTIONS(1498), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1501), 1, + anon_sym___declspec, + ACTIONS(1510), 1, + sym_primitive_type, + ACTIONS(1513), 1, + anon_sym_enum, + ACTIONS(1516), 1, + anon_sym_struct, + ACTIONS(1519), 1, + anon_sym_union, + ACTIONS(1526), 1, + aux_sym_preproc_def_token1, + ACTIONS(1529), 1, + aux_sym_preproc_if_token1, + ACTIONS(1535), 1, + sym_preproc_directive, + ACTIONS(1538), 1, + anon_sym_RBRACE, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(995), 1, + sym__declaration_specifiers, + ACTIONS(1532), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + ACTIONS(1504), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(1507), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(1492), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(414), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [3124] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(884), 1, + anon_sym_LBRACE, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1471), 1, + anon_sym_LBRACK, + ACTIONS(1473), 1, + anon_sym_DOT, + STATE(427), 1, + sym_string_literal, + STATE(751), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + STATE(1235), 2, + sym_initializer_list, + sym_initializer_pair, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + STATE(1105), 3, + sym_subscript_designator, + sym_field_designator, + aux_sym_initializer_pair_repeat1, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [3218] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1540), 1, + aux_sym_preproc_def_token1, + ACTIONS(1542), 1, + aux_sym_preproc_if_token1, + ACTIONS(1546), 1, + sym_preproc_directive, + ACTIONS(1548), 1, + anon_sym_RBRACE, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(995), 1, + sym__declaration_specifiers, + ACTIONS(1544), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(414), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [3316] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1550), 1, + aux_sym_preproc_def_token1, + ACTIONS(1552), 1, + aux_sym_preproc_if_token1, + ACTIONS(1554), 1, + aux_sym_preproc_if_token2, + ACTIONS(1558), 1, + sym_preproc_directive, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(996), 1, + sym__declaration_specifiers, + ACTIONS(1556), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(420), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [3414] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1540), 1, + aux_sym_preproc_def_token1, + ACTIONS(1542), 1, + aux_sym_preproc_if_token1, + ACTIONS(1546), 1, + sym_preproc_directive, + ACTIONS(1560), 1, + anon_sym_RBRACE, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(995), 1, + sym__declaration_specifiers, + ACTIONS(1544), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(416), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [3512] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1550), 1, + aux_sym_preproc_def_token1, + ACTIONS(1552), 1, + aux_sym_preproc_if_token1, + ACTIONS(1558), 1, + sym_preproc_directive, + ACTIONS(1562), 1, + aux_sym_preproc_if_token2, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(996), 1, + sym__declaration_specifiers, + ACTIONS(1556), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(417), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [3610] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + sym_identifier, + ACTIONS(1484), 1, + aux_sym_preproc_if_token2, + ACTIONS(1495), 1, + anon_sym___attribute__, + ACTIONS(1498), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1501), 1, + anon_sym___declspec, + ACTIONS(1510), 1, + sym_primitive_type, + ACTIONS(1513), 1, + anon_sym_enum, + ACTIONS(1516), 1, + anon_sym_struct, + ACTIONS(1519), 1, + anon_sym_union, + ACTIONS(1564), 1, + aux_sym_preproc_def_token1, + ACTIONS(1567), 1, + aux_sym_preproc_if_token1, + ACTIONS(1573), 1, + sym_preproc_directive, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(996), 1, + sym__declaration_specifiers, + ACTIONS(1570), 2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + ACTIONS(1504), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(1507), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(1492), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + STATE(420), 8, + sym_preproc_def, + sym_preproc_function_def, + sym_preproc_call, + sym_preproc_if_in_field_declaration_list, + sym_preproc_ifdef_in_field_declaration_list, + sym__field_declaration_list_item, + sym_field_declaration, + aux_sym_preproc_if_in_field_declaration_list_repeat1, + [3708] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1363), 1, + anon_sym_AMP, + ACTIONS(1367), 1, + anon_sym_sizeof, + ACTIONS(1576), 1, + anon_sym_STAR, + ACTIONS(1578), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(753), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + STATE(647), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(1580), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [3799] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1363), 1, + anon_sym_AMP, + ACTIONS(1367), 1, + anon_sym_sizeof, + ACTIONS(1582), 1, + anon_sym_STAR, + ACTIONS(1584), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(755), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + STATE(647), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(1580), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [3890] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(423), 2, + sym_string_literal, + aux_sym_concatenated_string_repeat1, + ACTIONS(1590), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + ACTIONS(1588), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1586), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [3951] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1363), 1, + anon_sym_AMP, + ACTIONS(1367), 1, + anon_sym_sizeof, + ACTIONS(1593), 1, + anon_sym_STAR, + ACTIONS(1595), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(796), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + STATE(432), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(1580), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [4042] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1363), 1, + anon_sym_AMP, + ACTIONS(1367), 1, + anon_sym_sizeof, + ACTIONS(1597), 1, + anon_sym_STAR, + ACTIONS(1599), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(783), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + STATE(421), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(1580), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [4133] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1363), 1, + anon_sym_AMP, + ACTIONS(1367), 1, + anon_sym_sizeof, + ACTIONS(1601), 1, + anon_sym_STAR, + ACTIONS(1603), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(780), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + STATE(422), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(1580), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [4224] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(433), 2, + sym_string_literal, + aux_sym_concatenated_string_repeat1, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + ACTIONS(1445), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1439), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [4285] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1363), 1, + anon_sym_AMP, + ACTIONS(1367), 1, + anon_sym_sizeof, + ACTIONS(1605), 1, + anon_sym_STAR, + ACTIONS(1607), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(826), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + STATE(429), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(1580), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [4376] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1363), 1, + anon_sym_AMP, + ACTIONS(1367), 1, + anon_sym_sizeof, + ACTIONS(1609), 1, + anon_sym_STAR, + ACTIONS(1611), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(777), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + STATE(647), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(1580), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [4467] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1363), 1, + anon_sym_AMP, + ACTIONS(1367), 1, + anon_sym_sizeof, + ACTIONS(1613), 1, + anon_sym_STAR, + ACTIONS(1615), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(812), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + STATE(647), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(1580), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [4558] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1363), 1, + anon_sym_AMP, + ACTIONS(1367), 1, + anon_sym_sizeof, + ACTIONS(1617), 1, + anon_sym_STAR, + ACTIONS(1619), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(781), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + STATE(430), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(1580), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [4649] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1363), 1, + anon_sym_AMP, + ACTIONS(1367), 1, + anon_sym_sizeof, + ACTIONS(1621), 1, + anon_sym_STAR, + ACTIONS(1623), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(803), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + STATE(647), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(1580), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [4740] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(423), 2, + sym_string_literal, + aux_sym_concatenated_string_repeat1, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + ACTIONS(1627), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1625), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [4801] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1383), 1, + anon_sym_DOT_DOT_DOT, + ACTIONS(1385), 1, + anon_sym_RPAREN, + ACTIONS(1393), 1, + anon_sym_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1629), 1, + anon_sym_LPAREN2, + ACTIONS(1631), 1, + anon_sym_STAR, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(946), 1, + sym__declaration_specifiers, + STATE(1139), 1, + sym__abstract_declarator, + STATE(1141), 1, + sym_parameter_list, + STATE(1150), 2, + sym_variadic_parameter, + sym_parameter_declaration, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + STATE(1142), 4, + sym_abstract_parenthesized_declarator, + sym_abstract_pointer_declarator, + sym_abstract_function_declarator, + sym_abstract_array_declarator, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [4904] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1633), 1, + anon_sym_LBRACE, + STATE(642), 1, + sym_ms_call_modifier, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(1004), 1, + sym__declaration_specifiers, + STATE(326), 3, + sym_function_definition, + sym_declaration, + sym_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + ACTIONS(39), 6, + anon_sym___cdecl, + anon_sym___clrcall, + anon_sym___stdcall, + anon_sym___fastcall, + anon_sym___thiscall, + anon_sym___vectorcall, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [4995] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1637), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1635), 34, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + [5050] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1639), 1, + anon_sym_LBRACE, + STATE(643), 1, + sym_ms_call_modifier, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(1008), 1, + sym__declaration_specifiers, + STATE(115), 3, + sym_function_definition, + sym_declaration, + sym_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + ACTIONS(39), 6, + anon_sym___cdecl, + anon_sym___clrcall, + anon_sym___stdcall, + anon_sym___fastcall, + anon_sym___thiscall, + anon_sym___vectorcall, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [5141] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1641), 1, + anon_sym_LBRACE, + STATE(644), 1, + sym_ms_call_modifier, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(1012), 1, + sym__declaration_specifiers, + STATE(319), 3, + sym_function_definition, + sym_declaration, + sym_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + ACTIONS(39), 6, + anon_sym___cdecl, + anon_sym___clrcall, + anon_sym___stdcall, + anon_sym___fastcall, + anon_sym___thiscall, + anon_sym___vectorcall, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [5232] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + ACTIONS(1643), 1, + anon_sym_LBRACE, + STATE(641), 1, + sym_ms_call_modifier, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(1003), 1, + sym__declaration_specifiers, + STATE(370), 3, + sym_function_definition, + sym_declaration, + sym_declaration_list, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + ACTIONS(39), 6, + anon_sym___cdecl, + anon_sym___clrcall, + anon_sym___stdcall, + anon_sym___fastcall, + anon_sym___thiscall, + anon_sym___vectorcall, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [5323] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1647), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1645), 34, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + [5378] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1649), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(726), 1, + sym__expression, + STATE(1347), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [5460] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1651), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(719), 1, + sym__expression, + STATE(1281), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [5542] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(874), 1, + anon_sym_LPAREN2, + ACTIONS(884), 1, + anon_sym_LBRACE, + ACTIONS(888), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(506), 1, + sym__expression, + STATE(516), 1, + sym_initializer_list, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(876), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(878), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(886), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [5624] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1653), 1, + anon_sym_SEMI, + STATE(427), 1, + sym_string_literal, + STATE(718), 1, + sym__expression, + STATE(1313), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [5706] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1655), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(716), 1, + sym__expression, + STATE(1348), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [5788] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1657), 1, + anon_sym_SEMI, + STATE(427), 1, + sym_string_literal, + STATE(713), 1, + sym__expression, + STATE(1351), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [5870] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1659), 1, + anon_sym_SEMI, + STATE(427), 1, + sym_string_literal, + STATE(701), 1, + sym__expression, + STATE(1349), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [5952] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(884), 1, + anon_sym_LBRACE, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(516), 1, + sym_initializer_list, + STATE(630), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [6034] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1661), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(733), 1, + sym__expression, + STATE(1314), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [6116] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1663), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(736), 1, + sym__expression, + STATE(1288), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [6198] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1665), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(735), 1, + sym__expression, + STATE(1316), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [6280] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1667), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(700), 1, + sym__expression, + STATE(1323), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [6362] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1669), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(694), 1, + sym__expression, + STATE(1388), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [6444] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1671), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(722), 1, + sym__expression, + STATE(1307), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [6526] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1673), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(749), 1, + sym__expression, + STATE(1296), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [6608] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1675), 1, + anon_sym_SEMI, + STATE(427), 1, + sym_string_literal, + STATE(731), 1, + sym__expression, + STATE(1417), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [6690] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1677), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(734), 1, + sym__expression, + STATE(1285), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [6772] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1679), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(708), 1, + sym__expression, + STATE(1382), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [6854] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1681), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(725), 1, + sym__expression, + STATE(1283), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [6936] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1683), 1, + anon_sym_SEMI, + STATE(427), 1, + sym_string_literal, + STATE(738), 1, + sym__expression, + STATE(1317), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [7018] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(884), 1, + anon_sym_LBRACE, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(728), 1, + sym__expression, + STATE(1229), 1, + sym_initializer_list, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [7100] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1685), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(695), 1, + sym__expression, + STATE(1284), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [7182] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1687), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(727), 1, + sym__expression, + STATE(1381), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [7264] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1689), 1, + anon_sym_SEMI, + STATE(427), 1, + sym_string_literal, + STATE(699), 1, + sym__expression, + STATE(1413), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [7346] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1691), 1, + anon_sym_SEMI, + STATE(427), 1, + sym_string_literal, + STATE(745), 1, + sym__expression, + STATE(1355), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [7428] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1693), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(698), 1, + sym__expression, + STATE(1277), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [7510] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1695), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(693), 1, + sym__expression, + STATE(1275), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [7592] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1697), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(746), 1, + sym__expression, + STATE(1428), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [7674] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(884), 1, + anon_sym_LBRACE, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(516), 1, + sym_initializer_list, + STATE(630), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [7756] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1699), 1, + anon_sym_SEMI, + STATE(427), 1, + sym_string_literal, + STATE(721), 1, + sym__expression, + STATE(1420), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [7838] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1701), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(711), 1, + sym__expression, + STATE(1385), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [7920] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1703), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(702), 1, + sym__expression, + STATE(1333), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [8002] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1705), 1, + anon_sym_SEMI, + STATE(427), 1, + sym_string_literal, + STATE(739), 1, + sym__expression, + STATE(1324), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [8084] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1707), 1, + anon_sym_SEMI, + STATE(427), 1, + sym_string_literal, + STATE(710), 1, + sym__expression, + STATE(1325), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [8166] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1709), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(741), 1, + sym__expression, + STATE(1360), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [8248] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(884), 1, + anon_sym_LBRACE, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(506), 1, + sym__expression, + STATE(516), 1, + sym_initializer_list, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [8330] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1711), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(732), 1, + sym__expression, + STATE(1359), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [8412] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1713), 1, + anon_sym_SEMI, + STATE(427), 1, + sym_string_literal, + STATE(714), 1, + sym__expression, + STATE(1393), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [8494] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1715), 1, + anon_sym_SEMI, + STATE(427), 1, + sym_string_literal, + STATE(715), 1, + sym__expression, + STATE(1395), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [8576] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1717), 1, + anon_sym_SEMI, + STATE(427), 1, + sym_string_literal, + STATE(747), 1, + sym__expression, + STATE(1398), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [8658] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1719), 1, + anon_sym_SEMI, + STATE(427), 1, + sym_string_literal, + STATE(724), 1, + sym__expression, + STATE(1415), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [8740] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1721), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(720), 1, + sym__expression, + STATE(1341), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [8822] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1723), 1, + anon_sym_SEMI, + STATE(427), 1, + sym_string_literal, + STATE(696), 1, + sym__expression, + STATE(1280), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [8904] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(884), 1, + anon_sym_LBRACE, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(742), 1, + sym__expression, + STATE(1236), 1, + sym_initializer_list, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [8986] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1725), 1, + anon_sym_SEMI, + STATE(427), 1, + sym_string_literal, + STATE(704), 1, + sym__expression, + STATE(1426), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [9068] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1727), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(691), 1, + sym__expression, + STATE(1345), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [9150] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + ACTIONS(1729), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(621), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [9229] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1733), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1731), 30, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [9280] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + ACTIONS(1735), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(621), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [9359] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + ACTIONS(1737), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(621), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [9438] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(689), 1, + sym__expression, + STATE(1217), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [9517] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + ACTIONS(1739), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(621), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [9596] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1741), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(664), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [9675] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + ACTIONS(1743), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(621), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [9754] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + ACTIONS(1745), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(621), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [9833] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(744), 1, + sym__expression, + STATE(1430), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [9912] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(705), 1, + sym__expression, + STATE(1273), 1, + sym_comma_expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [9991] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + ACTIONS(1747), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(621), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [10070] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1749), 1, + anon_sym_RPAREN, + STATE(427), 1, + sym_string_literal, + STATE(678), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [10149] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + ACTIONS(1751), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(621), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [10228] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + ACTIONS(1753), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(621), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [10307] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + ACTIONS(1755), 1, + anon_sym_RBRACK, + STATE(427), 1, + sym_string_literal, + STATE(621), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [10386] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(756), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [10462] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(619), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [10538] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(874), 1, + anon_sym_LPAREN2, + ACTIONS(888), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(529), 1, + sym__expression, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(876), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(878), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(886), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [10614] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1761), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1757), 22, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [10674] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(762), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [10750] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(874), 1, + anon_sym_LPAREN2, + ACTIONS(888), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(522), 1, + sym__expression, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(876), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(878), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(886), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [10826] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(807), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [10902] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(806), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [10978] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(529), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [11054] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + ACTIONS(1769), 1, + anon_sym_LPAREN2, + STATE(427), 1, + sym_string_literal, + STATE(659), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [11130] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1445), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1439), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [11180] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(805), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [11256] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(706), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [11332] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1773), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1771), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [11382] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(825), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [11458] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(802), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [11534] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1441), 1, + anon_sym_LPAREN2, + ACTIONS(1447), 1, + anon_sym_STAR, + ACTIONS(1452), 1, + anon_sym_EQ, + ACTIONS(1462), 2, + anon_sym_RPAREN, + anon_sym_LBRACK, + ACTIONS(1450), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(1456), 10, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1445), 11, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1439), 12, + anon_sym_COMMA, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_QMARK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [11596] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1367), 1, + anon_sym_sizeof, + ACTIONS(1775), 1, + anon_sym_LPAREN2, + STATE(427), 1, + sym_string_literal, + STATE(754), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [11672] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(627), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [11748] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1779), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1777), 24, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + [11806] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1783), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1781), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACK_RBRACK, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [11856] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1787), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1785), 22, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [11916] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(621), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [11992] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(622), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [12068] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1445), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1439), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [12118] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(752), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [12194] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1791), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1789), 22, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [12254] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(649), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [12330] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(760), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [12406] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(582), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [12482] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(657), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [12558] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(656), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [12634] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1795), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1793), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [12684] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(655), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [12760] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(654), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [12836] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(653), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [12912] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(648), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [12988] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(652), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [13064] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(651), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [13140] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(757), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [13216] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(650), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [13292] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(808), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [13368] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1799), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1797), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [13418] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1803), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1801), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [13468] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1807), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1805), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [13518] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(635), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [13594] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1811), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1809), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACK_RBRACK, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [13644] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(759), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [13720] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1819), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1821), 1, + anon_sym_AMP_AMP, + ACTIONS(1823), 1, + anon_sym_PIPE, + ACTIONS(1825), 1, + anon_sym_CARET, + ACTIONS(1827), 1, + anon_sym_AMP, + ACTIONS(1837), 1, + anon_sym_EQ, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1815), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1829), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1831), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1833), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1835), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1817), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1813), 16, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [13802] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(820), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [13878] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(723), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [13954] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(522), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [14030] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(771), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [14106] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(801), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [14182] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(824), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [14258] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(827), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [14334] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(874), 1, + anon_sym_LPAREN2, + ACTIONS(888), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(524), 1, + sym__expression, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(876), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(878), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(886), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [14410] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(874), 1, + anon_sym_LPAREN2, + ACTIONS(888), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(594), 1, + sym__expression, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(876), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(878), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(886), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [14486] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(658), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [14562] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1046), 1, + anon_sym_sizeof, + ACTIONS(1839), 1, + anon_sym_LPAREN2, + STATE(427), 1, + sym_string_literal, + STATE(625), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [14638] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(627), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [14714] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(798), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [14790] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(874), 1, + anon_sym_LPAREN2, + ACTIONS(888), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(595), 1, + sym__expression, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(876), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(878), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(886), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [14866] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(874), 1, + anon_sym_LPAREN2, + ACTIONS(888), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(596), 1, + sym__expression, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(876), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(878), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(886), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [14942] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(622), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [15018] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(874), 1, + anon_sym_LPAREN2, + ACTIONS(888), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(597), 1, + sym__expression, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(876), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(878), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(886), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [15094] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(620), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [15170] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1843), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1841), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [15220] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(632), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [15296] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(631), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [15372] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(874), 1, + anon_sym_LPAREN2, + ACTIONS(888), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(598), 1, + sym__expression, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(876), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(878), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(886), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [15448] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(629), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [15524] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(628), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [15600] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(874), 1, + anon_sym_LPAREN2, + ACTIONS(888), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(599), 1, + sym__expression, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(876), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(878), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(886), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [15676] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(888), 1, + anon_sym_sizeof, + ACTIONS(1845), 1, + anon_sym_LPAREN2, + STATE(427), 1, + sym_string_literal, + STATE(606), 1, + sym__expression, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(876), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(878), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(886), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [15752] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(626), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [15828] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(624), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [15904] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1849), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1847), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [15954] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1853), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1851), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACK_RBRACK, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [16004] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1857), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1855), 22, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [16064] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1819), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1821), 1, + anon_sym_AMP_AMP, + ACTIONS(1823), 1, + anon_sym_PIPE, + ACTIONS(1825), 1, + anon_sym_CARET, + ACTIONS(1827), 1, + anon_sym_AMP, + ACTIONS(1861), 1, + anon_sym_EQ, + ACTIONS(1863), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1815), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1829), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1831), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1833), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1835), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1817), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1859), 15, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [16148] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(874), 1, + anon_sym_LPAREN2, + ACTIONS(888), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(600), 1, + sym__expression, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(876), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(878), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(886), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [16224] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1867), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1865), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [16274] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1871), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1869), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [16324] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(623), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [16400] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(633), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [16476] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(874), 1, + anon_sym_LPAREN2, + ACTIONS(888), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(583), 1, + sym__expression, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(876), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(878), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(886), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [16552] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(874), 1, + anon_sym_LPAREN2, + ACTIONS(888), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(601), 1, + sym__expression, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(876), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(878), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(886), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [16628] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(788), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [16704] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(874), 1, + anon_sym_LPAREN2, + ACTIONS(888), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(582), 1, + sym__expression, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(876), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(878), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(886), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [16780] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(874), 1, + anon_sym_LPAREN2, + ACTIONS(888), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(604), 1, + sym__expression, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(876), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(878), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(886), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [16856] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1815), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1817), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1857), 8, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1855), 22, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [16920] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1815), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1835), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1817), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1857), 6, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_EQ, + ACTIONS(1855), 22, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [16986] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1815), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1831), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1833), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1835), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1817), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1857), 4, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ, + ACTIONS(1855), 20, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [17056] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1815), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1829), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1831), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1833), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1835), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1817), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1857), 4, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ, + ACTIONS(1855), 18, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [17128] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1827), 1, + anon_sym_AMP, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1815), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1829), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1831), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1833), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1835), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1817), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1857), 3, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_EQ, + ACTIONS(1855), 18, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [17202] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1825), 1, + anon_sym_CARET, + ACTIONS(1827), 1, + anon_sym_AMP, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1815), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1829), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1831), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1833), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1835), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1857), 2, + anon_sym_PIPE, + anon_sym_EQ, + ACTIONS(1817), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1855), 18, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [17278] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1823), 1, + anon_sym_PIPE, + ACTIONS(1825), 1, + anon_sym_CARET, + ACTIONS(1827), 1, + anon_sym_AMP, + ACTIONS(1857), 1, + anon_sym_EQ, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1815), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1829), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1831), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1833), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1835), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1817), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1855), 18, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [17356] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1821), 1, + anon_sym_AMP_AMP, + ACTIONS(1823), 1, + anon_sym_PIPE, + ACTIONS(1825), 1, + anon_sym_CARET, + ACTIONS(1827), 1, + anon_sym_AMP, + ACTIONS(1857), 1, + anon_sym_EQ, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1815), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1829), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1831), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1833), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1835), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1817), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1855), 17, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [17436] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN2, + ACTIONS(81), 1, + anon_sym_sizeof, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1341), 1, + sym_identifier, + STATE(427), 1, + sym_string_literal, + STATE(828), 1, + sym__expression, + ACTIONS(21), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(23), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(25), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(79), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(609), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [17512] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(870), 1, + sym_identifier, + ACTIONS(1036), 1, + anon_sym_LPAREN2, + ACTIONS(1046), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(635), 1, + sym__expression, + ACTIONS(1038), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1040), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1044), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(527), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [17588] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1817), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1857), 10, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1855), 22, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [17650] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1875), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1873), 29, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [17700] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1815), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1835), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1817), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1879), 6, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_EQ, + ACTIONS(1877), 22, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [17766] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(804), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [17842] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, + sym_number_literal, + ACTIONS(1355), 1, + sym_identifier, + ACTIONS(1357), 1, + anon_sym_LPAREN2, + ACTIONS(1367), 1, + anon_sym_sizeof, + STATE(427), 1, + sym_string_literal, + STATE(810), 1, + sym__expression, + ACTIONS(1359), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1361), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(1363), 2, + anon_sym_STAR, + anon_sym_AMP, + ACTIONS(1365), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(89), 3, + sym_true, + sym_false, + sym_null, + ACTIONS(85), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + ACTIONS(87), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + STATE(637), 5, + sym_pointer_expression, + sym_subscript_expression, + sym_call_expression, + sym_field_expression, + sym_parenthesized_expression, + STATE(513), 10, + sym_conditional_expression, + sym_assignment_expression, + sym_unary_expression, + sym_binary_expression, + sym_update_expression, + sym_cast_expression, + sym_sizeof_expression, + sym_compound_literal_expression, + sym_char_literal, + sym_concatenated_string, + [17918] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1452), 1, + anon_sym_EQ, + ACTIONS(1456), 10, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1445), 12, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1439), 18, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_LBRACK, + anon_sym_COLON, + anon_sym_QMARK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [17971] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1383), 1, + anon_sym_DOT_DOT_DOT, + ACTIONS(1385), 1, + anon_sym_RPAREN, + ACTIONS(1395), 1, + sym_identifier, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(946), 1, + sym__declaration_specifiers, + STATE(1150), 2, + sym_variadic_parameter, + sym_parameter_declaration, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [18053] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1351), 18, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_if, + anon_sym_switch, + anon_sym_case, + anon_sym_default, + anon_sym_while, + anon_sym_do, + anon_sym_for, + anon_sym_return, + anon_sym_break, + anon_sym_continue, + anon_sym_goto, + anon_sym_sizeof, + sym_true, + sym_false, + sym_null, + sym_identifier, + ACTIONS(1353), 21, + anon_sym_LPAREN2, + anon_sym_BANG, + anon_sym_TILDE, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + sym_number_literal, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + [18100] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1452), 1, + anon_sym_EQ, + ACTIONS(1460), 1, + anon_sym_COLON, + ACTIONS(1456), 10, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1445), 12, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1439), 15, + anon_sym_COMMA, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_LBRACK, + anon_sym_QMARK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [18153] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1733), 18, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_if, + anon_sym_switch, + anon_sym_case, + anon_sym_default, + anon_sym_while, + anon_sym_do, + anon_sym_for, + anon_sym_return, + anon_sym_break, + anon_sym_continue, + anon_sym_goto, + anon_sym_sizeof, + sym_true, + sym_false, + sym_null, + sym_identifier, + ACTIONS(1731), 21, + anon_sym_LPAREN2, + anon_sym_BANG, + anon_sym_TILDE, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + sym_number_literal, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + [18200] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1347), 18, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_if, + anon_sym_switch, + anon_sym_case, + anon_sym_default, + anon_sym_while, + anon_sym_do, + anon_sym_for, + anon_sym_return, + anon_sym_break, + anon_sym_continue, + anon_sym_goto, + anon_sym_sizeof, + sym_true, + sym_false, + sym_null, + sym_identifier, + ACTIONS(1349), 21, + anon_sym_LPAREN2, + anon_sym_BANG, + anon_sym_TILDE, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + sym_number_literal, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + [18247] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1452), 1, + anon_sym_EQ, + ACTIONS(1458), 1, + anon_sym_COLON, + ACTIONS(1456), 10, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1445), 12, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1439), 15, + anon_sym_COMMA, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_LBRACK, + anon_sym_QMARK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [18300] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1452), 1, + anon_sym_EQ, + ACTIONS(1454), 1, + anon_sym_COLON, + ACTIONS(1456), 10, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1445), 12, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1439), 15, + anon_sym_COMMA, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_LBRACK, + anon_sym_QMARK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [18353] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1452), 1, + anon_sym_EQ, + ACTIONS(1465), 1, + anon_sym_COLON, + ACTIONS(1456), 10, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1445), 12, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1439), 15, + anon_sym_COMMA, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_LBRACK, + anon_sym_QMARK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [18406] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1383), 1, + anon_sym_DOT_DOT_DOT, + ACTIONS(1395), 1, + sym_identifier, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(946), 1, + sym__declaration_specifiers, + STATE(1224), 2, + sym_variadic_parameter, + sym_parameter_declaration, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [18485] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(1887), 1, + anon_sym_AMP, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1883), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1889), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1891), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1893), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1895), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1857), 3, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_EQ, + ACTIONS(1885), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1855), 14, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [18555] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1861), 1, + anon_sym_EQ, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(1887), 1, + anon_sym_AMP, + ACTIONS(1897), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1899), 1, + anon_sym_AMP_AMP, + ACTIONS(1901), 1, + anon_sym_PIPE, + ACTIONS(1903), 1, + anon_sym_CARET, + ACTIONS(1905), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1883), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1889), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1891), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1893), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1895), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1885), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1859), 11, + anon_sym_RBRACK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [18635] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1787), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1785), 18, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [18691] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + STATE(546), 1, + sym_argument_list, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1779), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1777), 20, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + [18745] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1857), 1, + anon_sym_EQ, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(1887), 1, + anon_sym_AMP, + ACTIONS(1899), 1, + anon_sym_AMP_AMP, + ACTIONS(1901), 1, + anon_sym_PIPE, + ACTIONS(1903), 1, + anon_sym_CARET, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1883), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1889), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1891), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1893), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1895), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1885), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1855), 13, + anon_sym_PIPE_PIPE, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [18821] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1857), 1, + anon_sym_EQ, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(1887), 1, + anon_sym_AMP, + ACTIONS(1901), 1, + anon_sym_PIPE, + ACTIONS(1903), 1, + anon_sym_CARET, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1883), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1889), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1891), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1893), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1895), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1885), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1855), 14, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [18895] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1883), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1895), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1885), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1879), 6, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_EQ, + ACTIONS(1877), 18, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [18957] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(1887), 1, + anon_sym_AMP, + ACTIONS(1903), 1, + anon_sym_CARET, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1857), 2, + anon_sym_PIPE, + anon_sym_EQ, + ACTIONS(1883), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1889), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1891), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1893), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1895), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1885), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1855), 14, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [19029] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1791), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1789), 18, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [19085] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1883), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1889), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1891), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1893), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1895), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1885), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1857), 4, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ, + ACTIONS(1855), 14, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [19153] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1883), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1891), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1893), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1895), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1885), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1857), 4, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ, + ACTIONS(1855), 16, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [19219] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1761), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1757), 18, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [19275] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1883), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1895), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1885), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1857), 6, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_EQ, + ACTIONS(1855), 18, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [19337] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1883), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1885), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1857), 8, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1855), 18, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [19397] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1885), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1857), 10, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1855), 18, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [19455] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1837), 1, + anon_sym_EQ, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(1887), 1, + anon_sym_AMP, + ACTIONS(1897), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1899), 1, + anon_sym_AMP_AMP, + ACTIONS(1901), 1, + anon_sym_PIPE, + ACTIONS(1903), 1, + anon_sym_CARET, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1883), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1889), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1891), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1893), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1895), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1885), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(1813), 12, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [19533] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1857), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1855), 18, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [19589] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1853), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1851), 24, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [19634] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1907), 1, + anon_sym_EQ, + ACTIONS(1909), 10, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1445), 12, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1439), 14, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [19683] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1783), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1781), 24, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [19728] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1811), 13, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_EQ, + ACTIONS(1809), 24, + anon_sym_LPAREN2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_QMARK, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + anon_sym_DOT, + anon_sym_DASH_GT, + [19773] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1918), 1, + anon_sym___attribute__, + ACTIONS(1921), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1924), 1, + anon_sym___declspec, + ACTIONS(1927), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(1915), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + ACTIONS(1913), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_COLON, + STATE(640), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + ACTIONS(1911), 11, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [19829] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(1018), 1, + sym__declaration_specifiers, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [19901] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(1031), 1, + sym__declaration_specifiers, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [19973] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(1014), 1, + sym__declaration_specifiers, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [20045] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + STATE(707), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(1029), 1, + sym__declaration_specifiers, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(645), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [20117] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1395), 1, + sym_identifier, + STATE(743), 1, + sym__type_specifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + STATE(640), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [20186] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1387), 1, + anon_sym_LPAREN2, + ACTIONS(1389), 1, + anon_sym_STAR, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(1938), 1, + anon_sym_LBRACK, + STATE(998), 1, + sym_ms_unaligned_ptr_modifier, + STATE(1017), 1, + sym__declarator, + STATE(1108), 1, + sym__abstract_declarator, + STATE(1141), 1, + sym_parameter_list, + STATE(1407), 1, + sym_ms_based_modifier, + ACTIONS(1932), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + ACTIONS(1936), 2, + anon_sym__unaligned, + anon_sym___unaligned, + STATE(831), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + STATE(837), 2, + sym_ms_pointer_modifier, + aux_sym_pointer_declarator_repeat1, + ACTIONS(1934), 3, + sym_ms_restrict_modifier, + sym_ms_unsigned_ptr_modifier, + sym_ms_signed_ptr_modifier, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1142), 4, + sym_abstract_parenthesized_declarator, + sym_abstract_pointer_declarator, + sym_abstract_function_declarator, + sym_abstract_array_declarator, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [20260] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(647), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(1944), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(1940), 7, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_sizeof, + sym_true, + sym_false, + sym_null, + sym_identifier, + ACTIONS(1942), 19, + anon_sym_LPAREN2, + anon_sym_BANG, + anon_sym_TILDE, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_RBRACK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + sym_number_literal, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + [20304] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1857), 2, + anon_sym_PIPE, + anon_sym_AMP, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1855), 11, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + [20365] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1813), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + [20436] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1859), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + [20509] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1857), 4, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1855), 15, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + [20564] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1857), 4, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1855), 13, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + [20621] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1857), 2, + anon_sym_PIPE, + anon_sym_AMP, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1855), 9, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + [20684] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1857), 1, + anon_sym_PIPE, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1967), 1, + anon_sym_AMP, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1855), 9, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + [20749] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1857), 1, + anon_sym_PIPE, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1855), 8, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + [20816] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1855), 8, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + [20883] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(1855), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + [20952] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1857), 6, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1855), 15, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + [21005] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1879), 4, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1877), 13, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_QMARK, + [21062] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1975), 9, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_EQ, + anon_sym_COLON, + ACTIONS(1973), 22, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21101] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1979), 8, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_COLON, + ACTIONS(1977), 22, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21139] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1981), 11, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_sizeof, + sym_true, + sym_false, + sym_null, + sym_identifier, + ACTIONS(1983), 19, + anon_sym_LPAREN2, + anon_sym_BANG, + anon_sym_TILDE, + anon_sym_STAR, + anon_sym_AMP, + anon_sym_RBRACK, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + sym_number_literal, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + [21177] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1054), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1052), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21214] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(1985), 1, + anon_sym_COMMA, + ACTIONS(1987), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + STATE(1184), 1, + aux_sym_argument_list_repeat1, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [21289] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1353), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(1351), 22, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21326] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1991), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1989), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21363] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1995), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1993), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21400] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1999), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1997), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21437] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1050), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1048), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21474] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1078), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1076), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21511] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1090), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1088), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21548] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1070), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1068), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21585] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1058), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1056), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21622] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2003), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2001), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21659] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2007), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2005), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21696] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2011), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2009), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21733] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2015), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2013), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21770] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(1985), 1, + anon_sym_COMMA, + ACTIONS(2017), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + STATE(1164), 1, + aux_sym_argument_list_repeat1, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [21845] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2021), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2019), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21882] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2025), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2023), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21919] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1349), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(1347), 22, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21956] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2029), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2027), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [21993] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2033), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2031), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [22030] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2037), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2035), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [22067] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2041), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2039), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [22104] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2045), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2043), 22, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [22141] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1983), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(1981), 22, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [22178] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2049), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2047), 28, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + aux_sym_preproc_else_token1, + aux_sym_preproc_elif_token1, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [22215] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2053), 2, + anon_sym_RPAREN, + anon_sym_SEMI, + [22288] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2055), 1, + anon_sym_COMMA, + ACTIONS(2057), 1, + anon_sym_RBRACE, + STATE(546), 1, + sym_argument_list, + STATE(1167), 1, + aux_sym_initializer_list_repeat1, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [22363] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2059), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [22435] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1635), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + ACTIONS(1637), 26, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___cdecl, + anon_sym___clrcall, + anon_sym___stdcall, + anon_sym___fastcall, + anon_sym___thiscall, + anon_sym___vectorcall, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [22471] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2061), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [22543] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2063), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [22615] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2065), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [22687] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2067), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [22759] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2069), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [22831] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2071), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [22903] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2073), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [22975] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2075), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [23047] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2077), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [23119] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2079), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [23191] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2081), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [23263] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2083), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [23335] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2085), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [23407] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2087), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + [23477] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2089), 3, + anon_sym___based, + anon_sym_LBRACK, + sym_identifier, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + ACTIONS(2091), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_COLON, + STATE(712), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [23525] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2093), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [23597] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2095), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [23669] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2097), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [23741] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2099), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [23813] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2101), 3, + anon_sym___based, + anon_sym_LBRACK, + sym_identifier, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + ACTIONS(2103), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_COLON, + STATE(640), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [23861] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2105), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [23933] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2107), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [24005] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2109), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [24077] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2111), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [24149] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2113), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [24221] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2115), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [24293] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2117), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [24365] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2119), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [24437] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2121), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [24509] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2123), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [24581] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2125), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [24651] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2127), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [24723] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2129), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [24795] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2131), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [24867] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2133), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [24939] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2135), 2, + anon_sym_COMMA, + anon_sym_SEMI, + [25009] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2137), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [25081] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1645), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + ACTIONS(1647), 26, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___cdecl, + anon_sym___clrcall, + anon_sym___stdcall, + anon_sym___fastcall, + anon_sym___thiscall, + anon_sym___vectorcall, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [25117] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2139), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [25189] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2141), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [25261] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2143), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [25333] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2145), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [25405] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2147), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [25477] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2149), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [25549] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2151), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [25621] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2153), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [25693] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2155), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [25765] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2157), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [25837] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2159), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [25909] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2161), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + [25979] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2163), 3, + anon_sym___based, + anon_sym_LBRACK, + sym_identifier, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + ACTIONS(2165), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_COLON, + STATE(750), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [26027] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2167), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [26099] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2169), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [26171] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2171), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [26243] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2173), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [26315] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2175), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [26387] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2051), 1, + anon_sym_COMMA, + ACTIONS(2177), 1, + anon_sym_RPAREN, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [26459] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2179), 3, + anon_sym___based, + anon_sym_LBRACK, + sym_identifier, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + ACTIONS(2181), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_COLON, + STATE(640), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [26507] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2183), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + [26577] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2185), 1, + anon_sym_COLON, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [26646] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1753), 1, + anon_sym_RBRACK, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2193), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2195), 1, + anon_sym_AMP_AMP, + ACTIONS(2197), 1, + anon_sym_PIPE, + ACTIONS(2199), 1, + anon_sym_CARET, + ACTIONS(2201), 1, + anon_sym_AMP, + ACTIONS(2211), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [26715] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1879), 4, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1877), 9, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_RBRACK, + anon_sym_QMARK, + [26768] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1735), 1, + anon_sym_RBRACK, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2193), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2195), 1, + anon_sym_AMP_AMP, + ACTIONS(2197), 1, + anon_sym_PIPE, + ACTIONS(2199), 1, + anon_sym_CARET, + ACTIONS(2201), 1, + anon_sym_AMP, + ACTIONS(2211), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [26837] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2213), 1, + anon_sym_COLON, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [26906] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2193), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2195), 1, + anon_sym_AMP_AMP, + ACTIONS(2197), 1, + anon_sym_PIPE, + ACTIONS(2199), 1, + anon_sym_CARET, + ACTIONS(2201), 1, + anon_sym_AMP, + ACTIONS(2211), 1, + anon_sym_QMARK, + ACTIONS(2215), 1, + anon_sym_RBRACK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [26975] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2217), 1, + sym_identifier, + ACTIONS(2226), 1, + sym_primitive_type, + STATE(818), 1, + aux_sym_sized_type_specifier_repeat1, + ACTIONS(2224), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(2220), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2222), 13, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + [27018] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2228), 1, + anon_sym_COLON, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [27087] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2230), 1, + anon_sym_COLON, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [27156] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1995), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(1993), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [27191] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2232), 1, + anon_sym_COLON, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [27260] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2045), 1, + anon_sym_LBRACK_LBRACK, + STATE(435), 1, + sym_string_literal, + ACTIONS(2234), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + ACTIONS(2043), 20, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [27299] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1050), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1048), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [27334] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1078), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1076), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [27369] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1090), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1088), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [27404] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1070), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1068), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [27439] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1058), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1056), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [27474] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1054), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1052), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [27509] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1991), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(1989), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [27544] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2236), 1, + anon_sym_SEMI, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [27613] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1058), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(1056), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [27648] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2029), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(2027), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [27683] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2037), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(2035), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [27718] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2003), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(2001), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [27753] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2041), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(2039), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [27788] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1747), 1, + anon_sym_RBRACK, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2193), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2195), 1, + anon_sym_AMP_AMP, + ACTIONS(2197), 1, + anon_sym_PIPE, + ACTIONS(2199), 1, + anon_sym_CARET, + ACTIONS(2201), 1, + anon_sym_AMP, + ACTIONS(2211), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [27857] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2049), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(2047), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [27892] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1070), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(1068), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [27927] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1745), 1, + anon_sym_RBRACK, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2193), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2195), 1, + anon_sym_AMP_AMP, + ACTIONS(2197), 1, + anon_sym_PIPE, + ACTIONS(2199), 1, + anon_sym_CARET, + ACTIONS(2201), 1, + anon_sym_AMP, + ACTIONS(2211), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [27996] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1743), 1, + anon_sym_RBRACK, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2193), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2195), 1, + anon_sym_AMP_AMP, + ACTIONS(2197), 1, + anon_sym_PIPE, + ACTIONS(2199), 1, + anon_sym_CARET, + ACTIONS(2201), 1, + anon_sym_AMP, + ACTIONS(2211), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [28065] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2029), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2027), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [28100] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1739), 1, + anon_sym_RBRACK, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2193), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2195), 1, + anon_sym_AMP_AMP, + ACTIONS(2197), 1, + anon_sym_PIPE, + ACTIONS(2199), 1, + anon_sym_CARET, + ACTIONS(2201), 1, + anon_sym_AMP, + ACTIONS(2211), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [28169] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2045), 1, + anon_sym_LBRACK_LBRACK, + STATE(439), 1, + sym_string_literal, + ACTIONS(2234), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + ACTIONS(2043), 20, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [28208] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2011), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(2009), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [28243] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2033), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(2031), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [28278] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2045), 1, + anon_sym_LBRACK_LBRACK, + STATE(437), 1, + sym_string_literal, + ACTIONS(2234), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + ACTIONS(2043), 20, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [28317] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1859), 1, + anon_sym_RBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2193), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2195), 1, + anon_sym_AMP_AMP, + ACTIONS(2197), 1, + anon_sym_PIPE, + ACTIONS(2199), 1, + anon_sym_CARET, + ACTIONS(2201), 1, + anon_sym_AMP, + ACTIONS(2211), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [28386] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2025), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2023), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [28421] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2021), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2019), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [28456] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2015), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2013), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [28491] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1090), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(1088), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [28526] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2011), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2009), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [28561] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1078), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(1076), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [28596] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2007), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2005), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [28631] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1729), 1, + anon_sym_RBRACK, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2193), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2195), 1, + anon_sym_AMP_AMP, + ACTIONS(2197), 1, + anon_sym_PIPE, + ACTIONS(2199), 1, + anon_sym_CARET, + ACTIONS(2201), 1, + anon_sym_AMP, + ACTIONS(2211), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [28700] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1054), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(1052), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [28735] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2193), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2195), 1, + anon_sym_AMP_AMP, + ACTIONS(2197), 1, + anon_sym_PIPE, + ACTIONS(2199), 1, + anon_sym_CARET, + ACTIONS(2201), 1, + anon_sym_AMP, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1813), 2, + anon_sym_RBRACK, + anon_sym_QMARK, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [28802] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1995), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1993), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [28837] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1991), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1989), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [28872] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1857), 6, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1855), 11, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_RBRACK, + anon_sym_QMARK, + [28921] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2195), 1, + anon_sym_AMP_AMP, + ACTIONS(2197), 1, + anon_sym_PIPE, + ACTIONS(2199), 1, + anon_sym_CARET, + ACTIONS(2201), 1, + anon_sym_AMP, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1855), 3, + anon_sym_PIPE_PIPE, + anon_sym_RBRACK, + anon_sym_QMARK, + [28986] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1751), 1, + anon_sym_RBRACK, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2193), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2195), 1, + anon_sym_AMP_AMP, + ACTIONS(2197), 1, + anon_sym_PIPE, + ACTIONS(2199), 1, + anon_sym_CARET, + ACTIONS(2201), 1, + anon_sym_AMP, + ACTIONS(2211), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [29055] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2193), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2195), 1, + anon_sym_AMP_AMP, + ACTIONS(2197), 1, + anon_sym_PIPE, + ACTIONS(2199), 1, + anon_sym_CARET, + ACTIONS(2201), 1, + anon_sym_AMP, + ACTIONS(2211), 1, + anon_sym_QMARK, + ACTIONS(2238), 1, + anon_sym_RBRACK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [29124] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2197), 1, + anon_sym_PIPE, + ACTIONS(2199), 1, + anon_sym_CARET, + ACTIONS(2201), 1, + anon_sym_AMP, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1855), 4, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_RBRACK, + anon_sym_QMARK, + [29187] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1857), 1, + anon_sym_PIPE, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2199), 1, + anon_sym_CARET, + ACTIONS(2201), 1, + anon_sym_AMP, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1855), 4, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_RBRACK, + anon_sym_QMARK, + [29250] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1857), 1, + anon_sym_PIPE, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2201), 1, + anon_sym_AMP, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1855), 5, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_RBRACK, + anon_sym_QMARK, + [29311] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1857), 2, + anon_sym_PIPE, + anon_sym_AMP, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1855), 5, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_RBRACK, + anon_sym_QMARK, + [29370] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1050), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(1048), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [29405] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1857), 2, + anon_sym_PIPE, + anon_sym_AMP, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1855), 7, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_RBRACK, + anon_sym_QMARK, + [29462] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2025), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(2023), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [29497] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1755), 1, + anon_sym_RBRACK, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2193), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2195), 1, + anon_sym_AMP_AMP, + ACTIONS(2197), 1, + anon_sym_PIPE, + ACTIONS(2199), 1, + anon_sym_CARET, + ACTIONS(2201), 1, + anon_sym_AMP, + ACTIONS(2211), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [29566] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2003), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2001), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [29601] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2007), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(2005), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [29636] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2045), 1, + anon_sym_LBRACK_LBRACK, + STATE(438), 1, + sym_string_literal, + ACTIONS(2234), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + ACTIONS(2043), 20, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [29675] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2033), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2031), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [29710] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1999), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(1997), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [29745] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(818), 1, + aux_sym_sized_type_specifier_repeat1, + ACTIONS(2244), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + ACTIONS(2242), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2240), 15, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_primitive_type, + sym_identifier, + [29784] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2049), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2047), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [29819] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1857), 4, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1855), 9, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_RBRACK, + anon_sym_QMARK, + [29872] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2041), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2039), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [29907] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2021), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(2019), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [29942] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2037), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2035), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [29977] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2247), 1, + anon_sym_COLON, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [30046] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1857), 4, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1855), 11, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_RBRACK, + anon_sym_QMARK, + [30097] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1737), 1, + anon_sym_RBRACK, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1881), 1, + anon_sym_LPAREN2, + ACTIONS(2191), 1, + anon_sym_SLASH, + ACTIONS(2193), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2195), 1, + anon_sym_AMP_AMP, + ACTIONS(2197), 1, + anon_sym_PIPE, + ACTIONS(2199), 1, + anon_sym_CARET, + ACTIONS(2201), 1, + anon_sym_AMP, + ACTIONS(2211), 1, + anon_sym_QMARK, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(2187), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2189), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2203), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2205), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2207), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2209), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [30166] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2249), 1, + anon_sym_COLON, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [30235] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(1763), 1, + anon_sym_LBRACK, + ACTIONS(1951), 1, + anon_sym_SLASH, + ACTIONS(1959), 1, + anon_sym_PIPE_PIPE, + ACTIONS(1961), 1, + anon_sym_AMP_AMP, + ACTIONS(1963), 1, + anon_sym_PIPE, + ACTIONS(1965), 1, + anon_sym_CARET, + ACTIONS(1967), 1, + anon_sym_AMP, + ACTIONS(1971), 1, + anon_sym_QMARK, + ACTIONS(2251), 1, + anon_sym_COLON, + STATE(546), 1, + sym_argument_list, + ACTIONS(1765), 2, + anon_sym_DASH_DASH, + anon_sym_PLUS_PLUS, + ACTIONS(1767), 2, + anon_sym_DOT, + anon_sym_DASH_GT, + ACTIONS(1947), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1949), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(1953), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1955), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(1957), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1969), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [30304] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1999), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(1997), 26, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_if_token2, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [30339] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2015), 2, + anon_sym_LBRACK_LBRACK, + anon_sym_RBRACE, + ACTIONS(2013), 25, + aux_sym_preproc_def_token1, + aux_sym_preproc_if_token1, + aux_sym_preproc_ifdef_token1, + aux_sym_preproc_ifdef_token2, + sym_preproc_directive, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [30374] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1387), 1, + anon_sym_LPAREN2, + ACTIONS(1389), 1, + anon_sym_STAR, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(1938), 1, + anon_sym_LBRACK, + STATE(1020), 1, + sym__declarator, + STATE(1107), 1, + sym__abstract_declarator, + STATE(1141), 1, + sym_parameter_list, + STATE(1407), 1, + sym_ms_based_modifier, + ACTIONS(2253), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1142), 4, + sym_abstract_parenthesized_declarator, + sym_abstract_pointer_declarator, + sym_abstract_function_declarator, + sym_abstract_array_declarator, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [30432] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2255), 1, + sym_identifier, + ACTIONS(2257), 1, + anon_sym_LPAREN2, + ACTIONS(2259), 1, + anon_sym_STAR, + STATE(998), 1, + sym_ms_unaligned_ptr_modifier, + STATE(1048), 1, + sym__field_declarator, + STATE(1328), 1, + sym_ms_based_modifier, + ACTIONS(1936), 2, + anon_sym__unaligned, + anon_sym___unaligned, + STATE(984), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + STATE(992), 2, + sym_ms_pointer_modifier, + aux_sym_pointer_declarator_repeat1, + ACTIONS(1934), 3, + sym_ms_restrict_modifier, + sym_ms_unsigned_ptr_modifier, + sym_ms_signed_ptr_modifier, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1085), 5, + sym_parenthesized_field_declarator, + sym_attributed_field_declarator, + sym_pointer_field_declarator, + sym_function_field_declarator, + sym_array_field_declarator, + [30487] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2261), 1, + sym_identifier, + ACTIONS(2263), 1, + anon_sym_LPAREN2, + ACTIONS(2265), 1, + anon_sym_STAR, + STATE(998), 1, + sym_ms_unaligned_ptr_modifier, + STATE(1061), 1, + sym__type_declarator, + STATE(1386), 1, + sym_ms_based_modifier, + ACTIONS(1936), 2, + anon_sym__unaligned, + anon_sym___unaligned, + STATE(836), 2, + sym_ms_pointer_modifier, + aux_sym_pointer_declarator_repeat1, + STATE(978), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(1934), 3, + sym_ms_restrict_modifier, + sym_ms_unsigned_ptr_modifier, + sym_ms_signed_ptr_modifier, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1098), 5, + sym_parenthesized_type_declarator, + sym_attributed_type_declarator, + sym_pointer_type_declarator, + sym_function_type_declarator, + sym_array_type_declarator, + [30542] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2255), 1, + sym_identifier, + ACTIONS(2257), 1, + anon_sym_LPAREN2, + ACTIONS(2259), 1, + anon_sym_STAR, + STATE(998), 1, + sym_ms_unaligned_ptr_modifier, + STATE(1044), 1, + sym__field_declarator, + STATE(1328), 1, + sym_ms_based_modifier, + ACTIONS(1936), 2, + anon_sym__unaligned, + anon_sym___unaligned, + STATE(842), 2, + sym_ms_pointer_modifier, + aux_sym_pointer_declarator_repeat1, + STATE(981), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(1934), 3, + sym_ms_restrict_modifier, + sym_ms_unsigned_ptr_modifier, + sym_ms_signed_ptr_modifier, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1085), 5, + sym_parenthesized_field_declarator, + sym_attributed_field_declarator, + sym_pointer_field_declarator, + sym_function_field_declarator, + sym_array_field_declarator, + [30597] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2261), 1, + sym_identifier, + ACTIONS(2263), 1, + anon_sym_LPAREN2, + ACTIONS(2265), 1, + anon_sym_STAR, + STATE(998), 1, + sym_ms_unaligned_ptr_modifier, + STATE(1070), 1, + sym__type_declarator, + STATE(1386), 1, + sym_ms_based_modifier, + ACTIONS(1936), 2, + anon_sym__unaligned, + anon_sym___unaligned, + STATE(840), 2, + sym_ms_pointer_modifier, + aux_sym_pointer_declarator_repeat1, + STATE(980), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(1934), 3, + sym_ms_restrict_modifier, + sym_ms_unsigned_ptr_modifier, + sym_ms_signed_ptr_modifier, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1098), 5, + sym_parenthesized_type_declarator, + sym_attributed_type_declarator, + sym_pointer_type_declarator, + sym_function_type_declarator, + sym_array_type_declarator, + [30652] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2261), 1, + sym_identifier, + ACTIONS(2263), 1, + anon_sym_LPAREN2, + ACTIONS(2265), 1, + anon_sym_STAR, + STATE(998), 1, + sym_ms_unaligned_ptr_modifier, + STATE(1070), 1, + sym__type_declarator, + STATE(1386), 1, + sym_ms_based_modifier, + ACTIONS(1936), 2, + anon_sym__unaligned, + anon_sym___unaligned, + STATE(980), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + STATE(992), 2, + sym_ms_pointer_modifier, + aux_sym_pointer_declarator_repeat1, + ACTIONS(1934), 3, + sym_ms_restrict_modifier, + sym_ms_unsigned_ptr_modifier, + sym_ms_signed_ptr_modifier, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1098), 5, + sym_parenthesized_type_declarator, + sym_attributed_type_declarator, + sym_pointer_type_declarator, + sym_function_type_declarator, + sym_array_type_declarator, + [30707] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(998), 1, + sym_ms_unaligned_ptr_modifier, + STATE(1020), 1, + sym__declarator, + STATE(1407), 1, + sym_ms_based_modifier, + ACTIONS(1936), 2, + anon_sym__unaligned, + anon_sym___unaligned, + STATE(983), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + STATE(992), 2, + sym_ms_pointer_modifier, + aux_sym_pointer_declarator_repeat1, + ACTIONS(1934), 3, + sym_ms_restrict_modifier, + sym_ms_unsigned_ptr_modifier, + sym_ms_signed_ptr_modifier, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [30762] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(998), 1, + sym_ms_unaligned_ptr_modifier, + STATE(1020), 1, + sym__declarator, + STATE(1407), 1, + sym_ms_based_modifier, + ACTIONS(1936), 2, + anon_sym__unaligned, + anon_sym___unaligned, + STATE(841), 2, + sym_ms_pointer_modifier, + aux_sym_pointer_declarator_repeat1, + STATE(983), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(1934), 3, + sym_ms_restrict_modifier, + sym_ms_unsigned_ptr_modifier, + sym_ms_signed_ptr_modifier, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [30817] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(998), 1, + sym_ms_unaligned_ptr_modifier, + STATE(1017), 1, + sym__declarator, + STATE(1407), 1, + sym_ms_based_modifier, + ACTIONS(1936), 2, + anon_sym__unaligned, + anon_sym___unaligned, + STATE(837), 2, + sym_ms_pointer_modifier, + aux_sym_pointer_declarator_repeat1, + STATE(979), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(1934), 3, + sym_ms_restrict_modifier, + sym_ms_unsigned_ptr_modifier, + sym_ms_signed_ptr_modifier, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [30872] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2261), 1, + sym_identifier, + ACTIONS(2263), 1, + anon_sym_LPAREN2, + ACTIONS(2265), 1, + anon_sym_STAR, + STATE(998), 1, + sym_ms_unaligned_ptr_modifier, + STATE(1059), 1, + sym__type_declarator, + STATE(1386), 1, + sym_ms_based_modifier, + ACTIONS(1936), 2, + anon_sym__unaligned, + anon_sym___unaligned, + STATE(986), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + STATE(992), 2, + sym_ms_pointer_modifier, + aux_sym_pointer_declarator_repeat1, + ACTIONS(1934), 3, + sym_ms_restrict_modifier, + sym_ms_unsigned_ptr_modifier, + sym_ms_signed_ptr_modifier, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1098), 5, + sym_parenthesized_type_declarator, + sym_attributed_type_declarator, + sym_pointer_type_declarator, + sym_function_type_declarator, + sym_array_type_declarator, + [30927] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(998), 1, + sym_ms_unaligned_ptr_modifier, + STATE(1015), 1, + sym__declarator, + STATE(1407), 1, + sym_ms_based_modifier, + ACTIONS(1936), 2, + anon_sym__unaligned, + anon_sym___unaligned, + STATE(985), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + STATE(992), 2, + sym_ms_pointer_modifier, + aux_sym_pointer_declarator_repeat1, + ACTIONS(1934), 3, + sym_ms_restrict_modifier, + sym_ms_unsigned_ptr_modifier, + sym_ms_signed_ptr_modifier, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [30982] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2255), 1, + sym_identifier, + ACTIONS(2257), 1, + anon_sym_LPAREN2, + ACTIONS(2259), 1, + anon_sym_STAR, + STATE(998), 1, + sym_ms_unaligned_ptr_modifier, + STATE(1052), 1, + sym__field_declarator, + STATE(1328), 1, + sym_ms_based_modifier, + ACTIONS(1936), 2, + anon_sym__unaligned, + anon_sym___unaligned, + STATE(982), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + STATE(992), 2, + sym_ms_pointer_modifier, + aux_sym_pointer_declarator_repeat1, + ACTIONS(1934), 3, + sym_ms_restrict_modifier, + sym_ms_unsigned_ptr_modifier, + sym_ms_signed_ptr_modifier, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1085), 5, + sym_parenthesized_field_declarator, + sym_attributed_field_declarator, + sym_pointer_field_declarator, + sym_function_field_declarator, + sym_array_field_declarator, + [31037] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2255), 1, + sym_identifier, + ACTIONS(2257), 1, + anon_sym_LPAREN2, + ACTIONS(2259), 1, + anon_sym_STAR, + STATE(998), 1, + sym_ms_unaligned_ptr_modifier, + STATE(1052), 1, + sym__field_declarator, + STATE(1328), 1, + sym_ms_based_modifier, + ACTIONS(1936), 2, + anon_sym__unaligned, + anon_sym___unaligned, + STATE(832), 2, + sym_ms_pointer_modifier, + aux_sym_pointer_declarator_repeat1, + STATE(982), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(1934), 3, + sym_ms_restrict_modifier, + sym_ms_unsigned_ptr_modifier, + sym_ms_signed_ptr_modifier, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1085), 5, + sym_parenthesized_field_declarator, + sym_attributed_field_declarator, + sym_pointer_field_declarator, + sym_function_field_declarator, + sym_array_field_declarator, + [31092] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2271), 1, + anon_sym_SEMI, + ACTIONS(2089), 2, + anon_sym___based, + sym_identifier, + ACTIONS(2091), 2, + anon_sym_LPAREN2, + anon_sym_STAR, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(712), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [31138] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2273), 1, + anon_sym_SEMI, + ACTIONS(2089), 2, + anon_sym___based, + sym_identifier, + ACTIONS(2091), 2, + anon_sym_LPAREN2, + anon_sym_STAR, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(712), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [31184] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2275), 1, + anon_sym_SEMI, + ACTIONS(2089), 2, + anon_sym___based, + sym_identifier, + ACTIONS(2091), 2, + anon_sym_LPAREN2, + anon_sym_STAR, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(712), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [31230] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(33), 1, + anon_sym___attribute__, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(862), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2277), 1, + anon_sym_SEMI, + ACTIONS(2089), 2, + anon_sym___based, + sym_identifier, + ACTIONS(2091), 2, + anon_sym_LPAREN2, + anon_sym_STAR, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(43), 5, + anon_sym_extern, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + STATE(712), 7, + sym__declaration_modifiers, + sym_attribute_specifier, + sym_attribute_declaration, + sym_ms_declspec_modifier, + sym_storage_class_specifier, + sym_type_qualifier, + aux_sym__declaration_specifiers_repeat1, + [31276] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2283), 1, + anon_sym_LBRACE, + STATE(871), 1, + sym_field_declaration_list, + ACTIONS(2281), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2279), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [31311] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2289), 1, + anon_sym_LBRACE, + STATE(887), 1, + sym_enumerator_list, + ACTIONS(2287), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2285), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [31346] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2283), 1, + anon_sym_LBRACE, + STATE(865), 1, + sym_field_declaration_list, + ACTIONS(2293), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2291), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [31381] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2283), 1, + anon_sym_LBRACE, + STATE(886), 1, + sym_field_declaration_list, + ACTIONS(2297), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2295), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [31416] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(1395), 1, + sym_identifier, + STATE(988), 1, + sym__type_specifier, + STATE(994), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(1364), 1, + sym_type_descriptor, + STATE(857), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(1345), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + [31467] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2283), 1, + anon_sym_LBRACE, + STATE(870), 1, + sym_field_declaration_list, + ACTIONS(2301), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2299), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [31502] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(1395), 1, + sym_identifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(1022), 1, + sym__type_specifier, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + [31550] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(1395), 1, + sym_identifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(1023), 1, + sym__type_specifier, + STATE(858), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + [31598] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(1395), 1, + sym_identifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(1026), 1, + sym__type_specifier, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + [31646] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(1395), 1, + sym_identifier, + STATE(987), 1, + sym__type_specifier, + STATE(994), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(1345), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + [31694] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(1395), 1, + sym_identifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(1037), 1, + sym__type_specifier, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + [31742] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(1395), 1, + sym_identifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(1021), 1, + sym__type_specifier, + STATE(860), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + [31790] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(1395), 1, + sym_identifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(1035), 1, + sym__type_specifier, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + [31838] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(1395), 1, + sym_identifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(1034), 1, + sym__type_specifier, + STATE(854), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + [31886] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(49), 1, + sym_primitive_type, + ACTIONS(51), 1, + anon_sym_enum, + ACTIONS(53), 1, + anon_sym_struct, + ACTIONS(55), 1, + anon_sym_union, + ACTIONS(1395), 1, + sym_identifier, + STATE(758), 1, + aux_sym_sized_type_specifier_repeat1, + STATE(1027), 1, + sym__type_specifier, + STATE(856), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(47), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + STATE(884), 5, + sym_sized_type_specifier, + sym_enum_specifier, + sym_struct_specifier, + sym_union_specifier, + sym_macro_type_specifier, + [31934] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2305), 1, + anon_sym_LPAREN2, + STATE(895), 1, + sym_preproc_argument_list, + ACTIONS(2307), 5, + anon_sym_SLASH, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2303), 15, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + [31968] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2311), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2309), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [31997] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2315), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2313), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32026] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2319), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2317), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32055] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2321), 1, + anon_sym_COMMA, + ACTIONS(2323), 1, + anon_sym_RPAREN, + ACTIONS(2329), 1, + anon_sym_SLASH, + ACTIONS(2331), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2333), 1, + anon_sym_AMP_AMP, + ACTIONS(2335), 1, + anon_sym_PIPE, + ACTIONS(2337), 1, + anon_sym_CARET, + ACTIONS(2339), 1, + anon_sym_AMP, + STATE(1181), 1, + aux_sym_preproc_argument_list_repeat1, + ACTIONS(2325), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2327), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2341), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2343), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2345), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2347), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [32110] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2351), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2349), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32139] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2355), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2353), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32168] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2359), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2357), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32197] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2363), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2361), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32226] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2321), 1, + anon_sym_COMMA, + ACTIONS(2329), 1, + anon_sym_SLASH, + ACTIONS(2331), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2333), 1, + anon_sym_AMP_AMP, + ACTIONS(2335), 1, + anon_sym_PIPE, + ACTIONS(2337), 1, + anon_sym_CARET, + ACTIONS(2339), 1, + anon_sym_AMP, + ACTIONS(2365), 1, + anon_sym_RPAREN, + STATE(1166), 1, + aux_sym_preproc_argument_list_repeat1, + ACTIONS(2325), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2327), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2341), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2343), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2345), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2347), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [32281] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2369), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2367), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32310] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2373), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2371), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32339] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2377), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2375), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32368] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2379), 1, + sym_identifier, + ACTIONS(2381), 1, + anon_sym_RPAREN, + ACTIONS(2383), 1, + anon_sym_LPAREN2, + ACTIONS(2385), 1, + anon_sym_defined, + ACTIONS(2391), 1, + sym_number_literal, + ACTIONS(2387), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2389), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2393), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(872), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [32411] = 5, + ACTIONS(2303), 1, + anon_sym_LF, + ACTIONS(2395), 1, + anon_sym_LPAREN2, + ACTIONS(2397), 1, + sym_comment, + STATE(962), 1, + sym_preproc_argument_list, + ACTIONS(2307), 18, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + [32444] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2401), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2399), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32473] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2405), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2403), 20, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [32502] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2407), 1, + anon_sym_LPAREN2, + ACTIONS(1450), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(1437), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32533] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2412), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2410), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32562] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(2414), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(1942), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_LBRACK, + ACTIONS(1940), 10, + anon_sym___based, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + sym_primitive_type, + anon_sym_enum, + anon_sym_struct, + anon_sym_union, + sym_identifier, + [32595] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2419), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2417), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32624] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2423), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2421), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32653] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2427), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2425), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32682] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2431), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2429), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32711] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2435), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2433), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32740] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2379), 1, + sym_identifier, + ACTIONS(2383), 1, + anon_sym_LPAREN2, + ACTIONS(2385), 1, + anon_sym_defined, + ACTIONS(2437), 1, + anon_sym_RPAREN, + ACTIONS(2439), 1, + sym_number_literal, + ACTIONS(2387), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2389), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2393), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(867), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [32783] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2443), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2441), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32812] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2447), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2445), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32841] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2451), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + ACTIONS(2449), 14, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_LBRACK, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [32870] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2329), 1, + anon_sym_SLASH, + ACTIONS(2325), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2327), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2455), 4, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2453), 11, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + [32904] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2455), 5, + anon_sym_SLASH, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2453), 15, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + [32932] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2467), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(954), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [32972] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2473), 5, + anon_sym_SLASH, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2471), 15, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + [33000] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2329), 1, + anon_sym_SLASH, + ACTIONS(2333), 1, + anon_sym_AMP_AMP, + ACTIONS(2335), 1, + anon_sym_PIPE, + ACTIONS(2337), 1, + anon_sym_CARET, + ACTIONS(2339), 1, + anon_sym_AMP, + ACTIONS(2325), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2327), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2341), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2343), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2345), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2347), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2453), 3, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + [33048] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2329), 1, + anon_sym_SLASH, + ACTIONS(2335), 1, + anon_sym_PIPE, + ACTIONS(2337), 1, + anon_sym_CARET, + ACTIONS(2339), 1, + anon_sym_AMP, + ACTIONS(2325), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2327), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2341), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2343), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2345), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2347), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2453), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + [33094] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2329), 1, + anon_sym_SLASH, + ACTIONS(2337), 1, + anon_sym_CARET, + ACTIONS(2339), 1, + anon_sym_AMP, + ACTIONS(2455), 1, + anon_sym_PIPE, + ACTIONS(2325), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2327), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2341), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2343), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2345), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2347), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2453), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + [33140] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2329), 1, + anon_sym_SLASH, + ACTIONS(2339), 1, + anon_sym_AMP, + ACTIONS(2455), 1, + anon_sym_PIPE, + ACTIONS(2325), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2327), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2341), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2343), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2345), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2347), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2453), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + [33184] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2329), 1, + anon_sym_SLASH, + ACTIONS(2325), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2327), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2341), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2343), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2345), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2347), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2455), 2, + anon_sym_PIPE, + anon_sym_AMP, + ACTIONS(2453), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + [33226] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2329), 1, + anon_sym_SLASH, + ACTIONS(2325), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2327), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2343), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2345), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2347), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2455), 2, + anon_sym_PIPE, + anon_sym_AMP, + ACTIONS(2453), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [33266] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2379), 1, + sym_identifier, + ACTIONS(2383), 1, + anon_sym_LPAREN2, + ACTIONS(2385), 1, + anon_sym_defined, + ACTIONS(2475), 1, + sym_number_literal, + ACTIONS(2387), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2389), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2393), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(914), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [33306] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2479), 5, + anon_sym_SLASH, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2477), 15, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + [33334] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2329), 1, + anon_sym_SLASH, + ACTIONS(2325), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2327), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2347), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2455), 4, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2453), 9, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + [33370] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2481), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(971), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [33410] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2485), 5, + anon_sym_SLASH, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2483), 15, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + [33438] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2487), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(970), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [33478] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1843), 5, + anon_sym_SLASH, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(1841), 15, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + [33506] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2489), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(969), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [33546] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2491), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(951), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [33586] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2493), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(955), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [33626] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2379), 1, + sym_identifier, + ACTIONS(2383), 1, + anon_sym_LPAREN2, + ACTIONS(2385), 1, + anon_sym_defined, + ACTIONS(2495), 1, + sym_number_literal, + ACTIONS(2387), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2389), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2393), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(926), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [33666] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2379), 1, + sym_identifier, + ACTIONS(2383), 1, + anon_sym_LPAREN2, + ACTIONS(2385), 1, + anon_sym_defined, + ACTIONS(2497), 1, + sym_number_literal, + ACTIONS(2387), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2389), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2393), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(893), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [33706] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2329), 1, + anon_sym_SLASH, + ACTIONS(2331), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2333), 1, + anon_sym_AMP_AMP, + ACTIONS(2335), 1, + anon_sym_PIPE, + ACTIONS(2337), 1, + anon_sym_CARET, + ACTIONS(2339), 1, + anon_sym_AMP, + ACTIONS(2325), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2327), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2341), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2343), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2345), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2347), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2499), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [33756] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2501), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(960), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [33796] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2379), 1, + sym_identifier, + ACTIONS(2383), 1, + anon_sym_LPAREN2, + ACTIONS(2385), 1, + anon_sym_defined, + ACTIONS(2503), 1, + sym_number_literal, + ACTIONS(2387), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2389), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2393), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(961), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [33836] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2379), 1, + sym_identifier, + ACTIONS(2383), 1, + anon_sym_LPAREN2, + ACTIONS(2385), 1, + anon_sym_defined, + ACTIONS(2505), 1, + sym_number_literal, + ACTIONS(2387), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2389), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2393), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(896), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [33876] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2507), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(958), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [33916] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2509), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(950), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [33956] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2379), 1, + sym_identifier, + ACTIONS(2383), 1, + anon_sym_LPAREN2, + ACTIONS(2385), 1, + anon_sym_defined, + ACTIONS(2511), 1, + sym_number_literal, + ACTIONS(2387), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2389), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2393), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(897), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [33996] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2515), 5, + anon_sym_SLASH, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2513), 15, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + [34024] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2519), 5, + anon_sym_SLASH, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2517), 15, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + [34052] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2379), 1, + sym_identifier, + ACTIONS(2383), 1, + anon_sym_LPAREN2, + ACTIONS(2385), 1, + anon_sym_defined, + ACTIONS(2521), 1, + sym_number_literal, + ACTIONS(2387), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2389), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2393), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(898), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34092] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2523), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(956), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34132] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2379), 1, + sym_identifier, + ACTIONS(2383), 1, + anon_sym_LPAREN2, + ACTIONS(2385), 1, + anon_sym_defined, + ACTIONS(2525), 1, + sym_number_literal, + ACTIONS(2387), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2389), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2393), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(899), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34172] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2329), 1, + anon_sym_SLASH, + ACTIONS(2327), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2455), 4, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2453), 13, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + [34204] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2379), 1, + sym_identifier, + ACTIONS(2383), 1, + anon_sym_LPAREN2, + ACTIONS(2385), 1, + anon_sym_defined, + ACTIONS(2527), 1, + sym_number_literal, + ACTIONS(2387), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2389), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2393), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(900), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34244] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2379), 1, + sym_identifier, + ACTIONS(2383), 1, + anon_sym_LPAREN2, + ACTIONS(2385), 1, + anon_sym_defined, + ACTIONS(2529), 1, + sym_number_literal, + ACTIONS(2387), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2389), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2393), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(901), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34284] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2533), 5, + anon_sym_SLASH, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2531), 15, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + [34312] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2535), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(963), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34352] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2379), 1, + sym_identifier, + ACTIONS(2383), 1, + anon_sym_LPAREN2, + ACTIONS(2385), 1, + anon_sym_defined, + ACTIONS(2537), 1, + sym_number_literal, + ACTIONS(2387), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2389), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2393), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(904), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34392] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2379), 1, + sym_identifier, + ACTIONS(2383), 1, + anon_sym_LPAREN2, + ACTIONS(2385), 1, + anon_sym_defined, + ACTIONS(2539), 1, + sym_number_literal, + ACTIONS(2387), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2389), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2393), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(964), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34432] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2379), 1, + sym_identifier, + ACTIONS(2383), 1, + anon_sym_LPAREN2, + ACTIONS(2385), 1, + anon_sym_defined, + ACTIONS(2541), 1, + sym_number_literal, + ACTIONS(2387), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2389), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2393), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(892), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34472] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2545), 5, + anon_sym_SLASH, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2543), 15, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + [34500] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2547), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(967), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34540] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2379), 1, + sym_identifier, + ACTIONS(2383), 1, + anon_sym_LPAREN2, + ACTIONS(2385), 1, + anon_sym_defined, + ACTIONS(2549), 1, + sym_number_literal, + ACTIONS(2387), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2389), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2393), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(906), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34580] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2551), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(974), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34620] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2555), 5, + anon_sym_SLASH, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2553), 15, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_CARET, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + [34648] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2557), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(975), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34688] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2559), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(977), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34728] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2561), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(948), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34768] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2563), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(966), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34808] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2565), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(976), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34848] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2567), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(973), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34888] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2457), 1, + sym_identifier, + ACTIONS(2459), 1, + anon_sym_LPAREN2, + ACTIONS(2461), 1, + anon_sym_defined, + ACTIONS(2569), 1, + sym_number_literal, + ACTIONS(2463), 2, + anon_sym_BANG, + anon_sym_TILDE, + ACTIONS(2465), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2469), 5, + anon_sym_L_SQUOTE, + anon_sym_u_SQUOTE, + anon_sym_U_SQUOTE, + anon_sym_u8_SQUOTE, + anon_sym_SQUOTE, + STATE(965), 7, + sym__preproc_expression, + sym_preproc_parenthesized_expression, + sym_preproc_defined, + sym_preproc_unary_expression, + sym_preproc_call_expression, + sym_preproc_binary_expression, + sym_char_literal, + [34928] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1387), 1, + anon_sym_LPAREN2, + ACTIONS(1389), 1, + anon_sym_STAR, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(1938), 1, + anon_sym_LBRACK, + STATE(1082), 1, + sym__declarator, + STATE(1113), 1, + sym__abstract_declarator, + STATE(1141), 1, + sym_parameter_list, + STATE(1407), 1, + sym_ms_based_modifier, + ACTIONS(2571), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + STATE(1142), 4, + sym_abstract_parenthesized_declarator, + sym_abstract_pointer_declarator, + sym_abstract_function_declarator, + sym_abstract_array_declarator, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [34976] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2576), 1, + anon_sym_LPAREN2, + ACTIONS(2580), 1, + anon_sym_LBRACK, + ACTIONS(1450), 2, + anon_sym_COMMA, + anon_sym_STAR, + ACTIONS(2573), 2, + anon_sym_RPAREN, + anon_sym_LBRACK_LBRACK, + ACTIONS(1437), 13, + anon_sym_extern, + anon_sym___attribute__, + anon_sym___declspec, + anon_sym___based, + anon_sym_static, + anon_sym_auto, + anon_sym_register, + anon_sym_inline, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [35009] = 11, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2453), 1, + anon_sym_LF, + ACTIONS(2587), 1, + anon_sym_PIPE, + ACTIONS(2589), 1, + anon_sym_CARET, + ACTIONS(2591), 1, + anon_sym_AMP, + ACTIONS(2455), 2, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + ACTIONS(2583), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2593), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2597), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2595), 4, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + [35052] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2531), 1, + anon_sym_LF, + ACTIONS(2533), 18, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + [35079] = 12, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2587), 1, + anon_sym_PIPE, + ACTIONS(2589), 1, + anon_sym_CARET, + ACTIONS(2591), 1, + anon_sym_AMP, + ACTIONS(2599), 1, + anon_sym_LF, + ACTIONS(2601), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2603), 1, + anon_sym_AMP_AMP, + ACTIONS(2583), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2593), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2597), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2595), 4, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + [35124] = 12, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2587), 1, + anon_sym_PIPE, + ACTIONS(2589), 1, + anon_sym_CARET, + ACTIONS(2591), 1, + anon_sym_AMP, + ACTIONS(2601), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2603), 1, + anon_sym_AMP_AMP, + ACTIONS(2605), 1, + anon_sym_LF, + ACTIONS(2583), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2593), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2597), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2595), 4, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + [35169] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2543), 1, + anon_sym_LF, + ACTIONS(2545), 18, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + [35196] = 3, + ACTIONS(1841), 1, + anon_sym_LF, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(1843), 18, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + [35223] = 12, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2587), 1, + anon_sym_PIPE, + ACTIONS(2589), 1, + anon_sym_CARET, + ACTIONS(2591), 1, + anon_sym_AMP, + ACTIONS(2601), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2603), 1, + anon_sym_AMP_AMP, + ACTIONS(2607), 1, + anon_sym_LF, + ACTIONS(2583), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2593), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2597), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2595), 4, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + [35268] = 12, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2587), 1, + anon_sym_PIPE, + ACTIONS(2589), 1, + anon_sym_CARET, + ACTIONS(2591), 1, + anon_sym_AMP, + ACTIONS(2601), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2603), 1, + anon_sym_AMP_AMP, + ACTIONS(2609), 1, + anon_sym_LF, + ACTIONS(2583), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2593), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2597), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2595), 4, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + [35313] = 12, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2587), 1, + anon_sym_PIPE, + ACTIONS(2589), 1, + anon_sym_CARET, + ACTIONS(2591), 1, + anon_sym_AMP, + ACTIONS(2601), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2603), 1, + anon_sym_AMP_AMP, + ACTIONS(2611), 1, + anon_sym_LF, + ACTIONS(2583), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2593), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2597), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2595), 4, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + [35358] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2517), 1, + anon_sym_LF, + ACTIONS(2519), 18, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + [35385] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2483), 1, + anon_sym_LF, + ACTIONS(2485), 18, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + [35412] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2477), 1, + anon_sym_LF, + ACTIONS(2479), 18, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + [35439] = 5, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2453), 1, + anon_sym_LF, + ACTIONS(2583), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2455), 13, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + [35470] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2329), 1, + anon_sym_SLASH, + ACTIONS(2331), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2333), 1, + anon_sym_AMP_AMP, + ACTIONS(2335), 1, + anon_sym_PIPE, + ACTIONS(2337), 1, + anon_sym_CARET, + ACTIONS(2339), 1, + anon_sym_AMP, + ACTIONS(2613), 1, + anon_sym_RPAREN, + ACTIONS(2325), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2327), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2341), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2343), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2345), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2347), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [35519] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2471), 1, + anon_sym_LF, + ACTIONS(2473), 18, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + [35546] = 12, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2587), 1, + anon_sym_PIPE, + ACTIONS(2589), 1, + anon_sym_CARET, + ACTIONS(2591), 1, + anon_sym_AMP, + ACTIONS(2601), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2603), 1, + anon_sym_AMP_AMP, + ACTIONS(2615), 1, + anon_sym_LF, + ACTIONS(2583), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2593), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2597), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2595), 4, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + [35591] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2329), 1, + anon_sym_SLASH, + ACTIONS(2331), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2333), 1, + anon_sym_AMP_AMP, + ACTIONS(2335), 1, + anon_sym_PIPE, + ACTIONS(2337), 1, + anon_sym_CARET, + ACTIONS(2339), 1, + anon_sym_AMP, + ACTIONS(2617), 1, + anon_sym_RPAREN, + ACTIONS(2325), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2327), 2, + anon_sym_STAR, + anon_sym_PERCENT, + ACTIONS(2341), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2343), 2, + anon_sym_GT, + anon_sym_LT, + ACTIONS(2345), 2, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + ACTIONS(2347), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + [35640] = 12, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2587), 1, + anon_sym_PIPE, + ACTIONS(2589), 1, + anon_sym_CARET, + ACTIONS(2591), 1, + anon_sym_AMP, + ACTIONS(2601), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2603), 1, + anon_sym_AMP_AMP, + ACTIONS(2619), 1, + anon_sym_LF, + ACTIONS(2583), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2593), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2597), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2595), 4, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + [35685] = 12, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2587), 1, + anon_sym_PIPE, + ACTIONS(2589), 1, + anon_sym_CARET, + ACTIONS(2591), 1, + anon_sym_AMP, + ACTIONS(2601), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2603), 1, + anon_sym_AMP_AMP, + ACTIONS(2621), 1, + anon_sym_LF, + ACTIONS(2583), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2593), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2597), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2595), 4, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + [35730] = 12, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2587), 1, + anon_sym_PIPE, + ACTIONS(2589), 1, + anon_sym_CARET, + ACTIONS(2591), 1, + anon_sym_AMP, + ACTIONS(2601), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2603), 1, + anon_sym_AMP_AMP, + ACTIONS(2623), 1, + anon_sym_LF, + ACTIONS(2583), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2593), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2597), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2595), 4, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + [35775] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2513), 1, + anon_sym_LF, + ACTIONS(2515), 18, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + [35802] = 6, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2453), 1, + anon_sym_LF, + ACTIONS(2583), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2597), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2455), 11, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + [35835] = 7, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2453), 1, + anon_sym_LF, + ACTIONS(2583), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2597), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2595), 4, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + ACTIONS(2455), 7, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + [35870] = 8, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2453), 1, + anon_sym_LF, + ACTIONS(2583), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2593), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2597), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2595), 4, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + ACTIONS(2455), 5, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + [35907] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2553), 1, + anon_sym_LF, + ACTIONS(2555), 18, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + [35934] = 9, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2453), 1, + anon_sym_LF, + ACTIONS(2591), 1, + anon_sym_AMP, + ACTIONS(2583), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2593), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2597), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2455), 4, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + anon_sym_CARET, + ACTIONS(2595), 4, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + [35973] = 4, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2453), 1, + anon_sym_LF, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2455), 15, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + [36002] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2453), 1, + anon_sym_LF, + ACTIONS(2455), 18, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_AMP, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + anon_sym_LT_LT, + anon_sym_GT_GT, + [36029] = 10, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2453), 1, + anon_sym_LF, + ACTIONS(2589), 1, + anon_sym_CARET, + ACTIONS(2591), 1, + anon_sym_AMP, + ACTIONS(2583), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2593), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2597), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2455), 3, + anon_sym_PIPE_PIPE, + anon_sym_AMP_AMP, + anon_sym_PIPE, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2595), 4, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + [36070] = 12, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2453), 1, + anon_sym_LF, + ACTIONS(2455), 1, + anon_sym_PIPE_PIPE, + ACTIONS(2587), 1, + anon_sym_PIPE, + ACTIONS(2589), 1, + anon_sym_CARET, + ACTIONS(2591), 1, + anon_sym_AMP, + ACTIONS(2603), 1, + anon_sym_AMP_AMP, + ACTIONS(2583), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(2593), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(2597), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(2585), 3, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + ACTIONS(2595), 4, + anon_sym_GT, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_LT, + [36115] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2261), 1, + sym_identifier, + ACTIONS(2263), 1, + anon_sym_LPAREN2, + ACTIONS(2265), 1, + anon_sym_STAR, + STATE(1070), 1, + sym__type_declarator, + STATE(1386), 1, + sym_ms_based_modifier, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1098), 5, + sym_parenthesized_type_declarator, + sym_attributed_type_declarator, + sym_pointer_type_declarator, + sym_function_type_declarator, + sym_array_type_declarator, + [36154] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(1020), 1, + sym__declarator, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [36193] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2261), 1, + sym_identifier, + ACTIONS(2263), 1, + anon_sym_LPAREN2, + ACTIONS(2265), 1, + anon_sym_STAR, + STATE(1059), 1, + sym__type_declarator, + STATE(1386), 1, + sym_ms_based_modifier, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1098), 5, + sym_parenthesized_type_declarator, + sym_attributed_type_declarator, + sym_pointer_type_declarator, + sym_function_type_declarator, + sym_array_type_declarator, + [36232] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2255), 1, + sym_identifier, + ACTIONS(2257), 1, + anon_sym_LPAREN2, + ACTIONS(2259), 1, + anon_sym_STAR, + STATE(1052), 1, + sym__field_declarator, + STATE(1328), 1, + sym_ms_based_modifier, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1085), 5, + sym_parenthesized_field_declarator, + sym_attributed_field_declarator, + sym_pointer_field_declarator, + sym_function_field_declarator, + sym_array_field_declarator, + [36271] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2255), 1, + sym_identifier, + ACTIONS(2257), 1, + anon_sym_LPAREN2, + ACTIONS(2259), 1, + anon_sym_STAR, + STATE(1048), 1, + sym__field_declarator, + STATE(1328), 1, + sym_ms_based_modifier, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1085), 5, + sym_parenthesized_field_declarator, + sym_attributed_field_declarator, + sym_pointer_field_declarator, + sym_function_field_declarator, + sym_array_field_declarator, + [36310] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(1015), 1, + sym__declarator, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [36349] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2255), 1, + sym_identifier, + ACTIONS(2257), 1, + anon_sym_LPAREN2, + ACTIONS(2259), 1, + anon_sym_STAR, + STATE(1047), 1, + sym__field_declarator, + STATE(1328), 1, + sym_ms_based_modifier, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1085), 5, + sym_parenthesized_field_declarator, + sym_attributed_field_declarator, + sym_pointer_field_declarator, + sym_function_field_declarator, + sym_array_field_declarator, + [36388] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(1039), 1, + sym__declarator, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [36427] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2261), 1, + sym_identifier, + ACTIONS(2263), 1, + anon_sym_LPAREN2, + ACTIONS(2265), 1, + anon_sym_STAR, + STATE(1067), 1, + sym__type_declarator, + STATE(1386), 1, + sym_ms_based_modifier, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(45), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1098), 5, + sym_parenthesized_type_declarator, + sym_attributed_type_declarator, + sym_pointer_type_declarator, + sym_function_type_declarator, + sym_array_type_declarator, + [36466] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1629), 1, + anon_sym_LPAREN2, + ACTIONS(1631), 1, + anon_sym_STAR, + ACTIONS(1938), 1, + anon_sym_LBRACK, + ACTIONS(2625), 1, + anon_sym_RPAREN, + STATE(1126), 1, + sym__abstract_declarator, + STATE(1141), 1, + sym_parameter_list, + STATE(991), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(2627), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1142), 4, + sym_abstract_parenthesized_declarator, + sym_abstract_pointer_declarator, + sym_abstract_function_declarator, + sym_abstract_array_declarator, + [36504] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1629), 1, + anon_sym_LPAREN2, + ACTIONS(1631), 1, + anon_sym_STAR, + ACTIONS(1938), 1, + anon_sym_LBRACK, + ACTIONS(2629), 1, + anon_sym_RPAREN, + STATE(1141), 1, + sym_parameter_list, + STATE(1144), 1, + sym__abstract_declarator, + STATE(989), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(2627), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1142), 4, + sym_abstract_parenthesized_declarator, + sym_abstract_pointer_declarator, + sym_abstract_function_declarator, + sym_abstract_array_declarator, + [36542] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1629), 1, + anon_sym_LPAREN2, + ACTIONS(1631), 1, + anon_sym_STAR, + ACTIONS(1938), 1, + anon_sym_LBRACK, + ACTIONS(2631), 1, + anon_sym_RPAREN, + STATE(1127), 1, + sym__abstract_declarator, + STATE(1141), 1, + sym_parameter_list, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(2627), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1142), 4, + sym_abstract_parenthesized_declarator, + sym_abstract_pointer_declarator, + sym_abstract_function_declarator, + sym_abstract_array_declarator, + [36580] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1629), 1, + anon_sym_LPAREN2, + ACTIONS(1631), 1, + anon_sym_STAR, + ACTIONS(1932), 1, + anon_sym_RPAREN, + ACTIONS(1938), 1, + anon_sym_LBRACK, + STATE(1108), 1, + sym__abstract_declarator, + STATE(1141), 1, + sym_parameter_list, + STATE(993), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(2627), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1142), 4, + sym_abstract_parenthesized_declarator, + sym_abstract_pointer_declarator, + sym_abstract_function_declarator, + sym_abstract_array_declarator, + [36618] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1629), 1, + anon_sym_LPAREN2, + ACTIONS(1631), 1, + anon_sym_STAR, + ACTIONS(1938), 1, + anon_sym_LBRACK, + ACTIONS(2633), 1, + anon_sym_RPAREN, + STATE(1123), 1, + sym__abstract_declarator, + STATE(1141), 1, + sym_parameter_list, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(2627), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1142), 4, + sym_abstract_parenthesized_declarator, + sym_abstract_pointer_declarator, + sym_abstract_function_declarator, + sym_abstract_array_declarator, + [36656] = 7, + ACTIONS(3), 1, + sym_comment, + STATE(998), 1, + sym_ms_unaligned_ptr_modifier, + ACTIONS(2637), 2, + anon_sym_LPAREN2, + anon_sym_STAR, + ACTIONS(2642), 2, + anon_sym__unaligned, + anon_sym___unaligned, + STATE(992), 2, + sym_ms_pointer_modifier, + aux_sym_pointer_declarator_repeat1, + ACTIONS(2639), 3, + sym_ms_restrict_modifier, + sym_ms_unsigned_ptr_modifier, + sym_ms_signed_ptr_modifier, + ACTIONS(2635), 6, + anon_sym___based, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [36688] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1629), 1, + anon_sym_LPAREN2, + ACTIONS(1631), 1, + anon_sym_STAR, + ACTIONS(1938), 1, + anon_sym_LBRACK, + ACTIONS(2253), 1, + anon_sym_RPAREN, + STATE(1107), 1, + sym__abstract_declarator, + STATE(1141), 1, + sym_parameter_list, + STATE(882), 2, + sym_type_qualifier, + aux_sym_type_definition_repeat1, + ACTIONS(2627), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + STATE(1142), 4, + sym_abstract_parenthesized_declarator, + sym_abstract_pointer_declarator, + sym_abstract_function_declarator, + sym_abstract_array_declarator, + [36726] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2226), 1, + sym_primitive_type, + ACTIONS(2645), 1, + sym_identifier, + STATE(818), 1, + aux_sym_sized_type_specifier_repeat1, + ACTIONS(2220), 4, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_STAR, + anon_sym_LBRACK, + ACTIONS(2222), 4, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + ACTIONS(2224), 4, + anon_sym_signed, + anon_sym_unsigned, + anon_sym_long, + anon_sym_short, + [36757] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2255), 1, + sym_identifier, + ACTIONS(2257), 1, + anon_sym_LPAREN2, + ACTIONS(2259), 1, + anon_sym_STAR, + ACTIONS(2647), 1, + anon_sym_SEMI, + ACTIONS(2649), 1, + anon_sym_COLON, + STATE(1028), 1, + sym__field_declarator, + STATE(1327), 1, + sym_bitfield_clause, + STATE(1328), 1, + sym_ms_based_modifier, + STATE(1085), 5, + sym_parenthesized_field_declarator, + sym_attributed_field_declarator, + sym_pointer_field_declarator, + sym_function_field_declarator, + sym_array_field_declarator, + [36795] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2255), 1, + sym_identifier, + ACTIONS(2257), 1, + anon_sym_LPAREN2, + ACTIONS(2259), 1, + anon_sym_STAR, + ACTIONS(2649), 1, + anon_sym_COLON, + ACTIONS(2651), 1, + anon_sym_SEMI, + STATE(1040), 1, + sym__field_declarator, + STATE(1328), 1, + sym_ms_based_modifier, + STATE(1380), 1, + sym_bitfield_clause, + STATE(1085), 5, + sym_parenthesized_field_declarator, + sym_attributed_field_declarator, + sym_pointer_field_declarator, + sym_function_field_declarator, + sym_array_field_declarator, + [36833] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2255), 1, + sym_identifier, + ACTIONS(2257), 1, + anon_sym_LPAREN2, + ACTIONS(2259), 1, + anon_sym_STAR, + ACTIONS(2649), 1, + anon_sym_COLON, + ACTIONS(2653), 1, + anon_sym_SEMI, + STATE(1016), 1, + sym__field_declarator, + STATE(1328), 1, + sym_ms_based_modifier, + STATE(1329), 1, + sym_bitfield_clause, + STATE(1085), 5, + sym_parenthesized_field_declarator, + sym_attributed_field_declarator, + sym_pointer_field_declarator, + sym_function_field_declarator, + sym_array_field_declarator, + [36871] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2657), 2, + anon_sym_LPAREN2, + anon_sym_STAR, + ACTIONS(2655), 11, + anon_sym___based, + sym_ms_restrict_modifier, + sym_ms_unsigned_ptr_modifier, + sym_ms_signed_ptr_modifier, + anon_sym__unaligned, + anon_sym___unaligned, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [36892] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2661), 2, + anon_sym_LPAREN2, + anon_sym_STAR, + ACTIONS(2659), 11, + anon_sym___based, + sym_ms_restrict_modifier, + sym_ms_unsigned_ptr_modifier, + sym_ms_signed_ptr_modifier, + anon_sym__unaligned, + anon_sym___unaligned, + anon_sym_const, + anon_sym_volatile, + anon_sym_restrict, + anon_sym__Atomic, + sym_identifier, + [36913] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(511), 1, + anon_sym_LBRACE, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2667), 1, + anon_sym_SEMI, + ACTIONS(2669), 1, + anon_sym_LBRACK, + ACTIONS(2671), 1, + anon_sym_EQ, + STATE(334), 1, + sym_compound_statement, + STATE(1032), 1, + sym_parameter_list, + STATE(1160), 1, + aux_sym_declaration_repeat1, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [36951] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(319), 1, + anon_sym_LBRACE, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2669), 1, + anon_sym_LBRACK, + ACTIONS(2671), 1, + anon_sym_EQ, + ACTIONS(2673), 1, + anon_sym_SEMI, + STATE(313), 1, + sym_compound_statement, + STATE(1032), 1, + sym_parameter_list, + STATE(1206), 1, + aux_sym_declaration_repeat1, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [36989] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2669), 1, + anon_sym_LBRACK, + ACTIONS(2671), 1, + anon_sym_EQ, + ACTIONS(2675), 1, + anon_sym_SEMI, + STATE(346), 1, + sym_compound_statement, + STATE(1032), 1, + sym_parameter_list, + STATE(1199), 1, + aux_sym_declaration_repeat1, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [37027] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(1002), 1, + sym__declarator, + STATE(1186), 1, + sym_init_declarator, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [37059] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(1001), 1, + sym__declarator, + STATE(1169), 1, + sym_init_declarator, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [37091] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(1041), 1, + sym__declarator, + STATE(1169), 1, + sym_init_declarator, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [37123] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(1046), 1, + sym__declarator, + STATE(1176), 1, + sym_init_declarator, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [37155] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(1053), 1, + sym__declarator, + STATE(1232), 1, + sym_init_declarator, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [37187] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(1009), 1, + sym__declarator, + STATE(1176), 1, + sym_init_declarator, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [37219] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(115), 1, + anon_sym_LBRACE, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2669), 1, + anon_sym_LBRACK, + ACTIONS(2671), 1, + anon_sym_EQ, + ACTIONS(2677), 1, + anon_sym_SEMI, + STATE(118), 1, + sym_compound_statement, + STATE(1032), 1, + sym_parameter_list, + STATE(1187), 1, + aux_sym_declaration_repeat1, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [37257] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(1042), 1, + sym__declarator, + STATE(1170), 1, + sym_init_declarator, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [37289] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(1045), 1, + sym__declarator, + STATE(1186), 1, + sym_init_declarator, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [37321] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(1000), 1, + sym__declarator, + STATE(1170), 1, + sym_init_declarator, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [37353] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2681), 1, + anon_sym___attribute__, + ACTIONS(2683), 1, + anon_sym_LBRACK, + STATE(1030), 2, + sym_attribute_specifier, + aux_sym_function_declarator_repeat1, + ACTIONS(2679), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_EQ, + [37376] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(1074), 1, + sym__declarator, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [37405] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2669), 1, + anon_sym_LBRACK, + STATE(1032), 1, + sym_parameter_list, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + ACTIONS(2685), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_LBRACE, + anon_sym_EQ, + [37432] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2649), 1, + anon_sym_COLON, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2687), 1, + anon_sym_COMMA, + ACTIONS(2689), 1, + anon_sym_SEMI, + ACTIONS(2691), 1, + anon_sym_LBRACK, + STATE(1091), 1, + sym_parameter_list, + STATE(1106), 1, + aux_sym_field_declaration_repeat1, + STATE(1390), 1, + sym_bitfield_clause, + STATE(1056), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [37467] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2669), 1, + anon_sym_LBRACK, + STATE(1032), 1, + sym_parameter_list, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + ACTIONS(2693), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_LBRACE, + anon_sym_EQ, + [37494] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(1080), 1, + sym__declarator, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [37523] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2255), 1, + sym_identifier, + ACTIONS(2257), 1, + anon_sym_LPAREN2, + ACTIONS(2259), 1, + anon_sym_STAR, + STATE(1069), 1, + sym__field_declarator, + STATE(1328), 1, + sym_ms_based_modifier, + STATE(1085), 5, + sym_parenthesized_field_declarator, + sym_attributed_field_declarator, + sym_pointer_field_declarator, + sym_function_field_declarator, + sym_array_field_declarator, + [37552] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2669), 1, + anon_sym_LBRACK, + STATE(1032), 1, + sym_parameter_list, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + ACTIONS(2695), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_LBRACE, + anon_sym_EQ, + [37579] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2261), 1, + sym_identifier, + ACTIONS(2263), 1, + anon_sym_LPAREN2, + ACTIONS(2265), 1, + anon_sym_STAR, + STATE(1066), 1, + sym__type_declarator, + STATE(1386), 1, + sym_ms_based_modifier, + STATE(1098), 5, + sym_parenthesized_type_declarator, + sym_attributed_type_declarator, + sym_pointer_type_declarator, + sym_function_type_declarator, + sym_array_type_declarator, + [37608] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2261), 1, + sym_identifier, + ACTIONS(2263), 1, + anon_sym_LPAREN2, + ACTIONS(2265), 1, + anon_sym_STAR, + STATE(1065), 1, + sym__type_declarator, + STATE(1386), 1, + sym_ms_based_modifier, + STATE(1098), 5, + sym_parenthesized_type_declarator, + sym_attributed_type_declarator, + sym_pointer_type_declarator, + sym_function_type_declarator, + sym_array_type_declarator, + [37637] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2261), 1, + sym_identifier, + ACTIONS(2263), 1, + anon_sym_LPAREN2, + ACTIONS(2265), 1, + anon_sym_STAR, + STATE(1055), 1, + sym__type_declarator, + STATE(1386), 1, + sym_ms_based_modifier, + STATE(1098), 5, + sym_parenthesized_type_declarator, + sym_attributed_type_declarator, + sym_pointer_type_declarator, + sym_function_type_declarator, + sym_array_type_declarator, + [37666] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(1095), 1, + sym__declarator, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [37695] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2699), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2702), 1, + anon_sym_LBRACK, + STATE(1025), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + ACTIONS(2697), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACE, + anon_sym_EQ, + anon_sym_COLON, + [37718] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2261), 1, + sym_identifier, + ACTIONS(2263), 1, + anon_sym_LPAREN2, + ACTIONS(2265), 1, + anon_sym_STAR, + STATE(1054), 1, + sym__type_declarator, + STATE(1386), 1, + sym_ms_based_modifier, + STATE(1098), 5, + sym_parenthesized_type_declarator, + sym_attributed_type_declarator, + sym_pointer_type_declarator, + sym_function_type_declarator, + sym_array_type_declarator, + [37747] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2261), 1, + sym_identifier, + ACTIONS(2263), 1, + anon_sym_LPAREN2, + ACTIONS(2265), 1, + anon_sym_STAR, + STATE(1058), 1, + sym__type_declarator, + STATE(1386), 1, + sym_ms_based_modifier, + STATE(1098), 5, + sym_parenthesized_type_declarator, + sym_attributed_type_declarator, + sym_pointer_type_declarator, + sym_function_type_declarator, + sym_array_type_declarator, + [37776] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2649), 1, + anon_sym_COLON, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2687), 1, + anon_sym_COMMA, + ACTIONS(2691), 1, + anon_sym_LBRACK, + ACTIONS(2704), 1, + anon_sym_SEMI, + STATE(1091), 1, + sym_parameter_list, + STATE(1109), 1, + aux_sym_field_declaration_repeat1, + STATE(1305), 1, + sym_bitfield_clause, + STATE(1056), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [37811] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(1076), 1, + sym__declarator, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [37840] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2708), 1, + anon_sym___attribute__, + ACTIONS(2711), 1, + anon_sym_LBRACK, + STATE(1030), 2, + sym_attribute_specifier, + aux_sym_function_declarator_repeat1, + ACTIONS(2706), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_EQ, + [37863] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(1930), 1, + sym_identifier, + ACTIONS(2267), 1, + anon_sym_LPAREN2, + ACTIONS(2269), 1, + anon_sym_STAR, + STATE(1081), 1, + sym__declarator, + STATE(1407), 1, + sym_ms_based_modifier, + STATE(1075), 5, + sym_parenthesized_declarator, + sym_attributed_declarator, + sym_pointer_declarator, + sym_function_declarator, + sym_array_declarator, + [37892] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2681), 1, + anon_sym___attribute__, + ACTIONS(2715), 1, + anon_sym_LBRACK, + STATE(1013), 2, + sym_attribute_specifier, + aux_sym_function_declarator_repeat1, + ACTIONS(2713), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_EQ, + [37915] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2255), 1, + sym_identifier, + ACTIONS(2257), 1, + anon_sym_LPAREN2, + ACTIONS(2259), 1, + anon_sym_STAR, + STATE(1090), 1, + sym__field_declarator, + STATE(1328), 1, + sym_ms_based_modifier, + STATE(1085), 5, + sym_parenthesized_field_declarator, + sym_attributed_field_declarator, + sym_pointer_field_declarator, + sym_function_field_declarator, + sym_array_field_declarator, + [37944] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2261), 1, + sym_identifier, + ACTIONS(2263), 1, + anon_sym_LPAREN2, + ACTIONS(2265), 1, + anon_sym_STAR, + STATE(1068), 1, + sym__type_declarator, + STATE(1386), 1, + sym_ms_based_modifier, + STATE(1098), 5, + sym_parenthesized_type_declarator, + sym_attributed_type_declarator, + sym_pointer_type_declarator, + sym_function_type_declarator, + sym_array_type_declarator, + [37973] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2261), 1, + sym_identifier, + ACTIONS(2263), 1, + anon_sym_LPAREN2, + ACTIONS(2265), 1, + anon_sym_STAR, + STATE(1057), 1, + sym__type_declarator, + STATE(1386), 1, + sym_ms_based_modifier, + STATE(1098), 5, + sym_parenthesized_type_declarator, + sym_attributed_type_declarator, + sym_pointer_type_declarator, + sym_function_type_declarator, + sym_array_type_declarator, + [38002] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2261), 1, + sym_identifier, + ACTIONS(2263), 1, + anon_sym_LPAREN2, + ACTIONS(2265), 1, + anon_sym_STAR, + STATE(1088), 1, + sym__type_declarator, + STATE(1386), 1, + sym_ms_based_modifier, + STATE(1098), 5, + sym_parenthesized_type_declarator, + sym_attributed_type_declarator, + sym_pointer_type_declarator, + sym_function_type_declarator, + sym_array_type_declarator, + [38031] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2261), 1, + sym_identifier, + ACTIONS(2263), 1, + anon_sym_LPAREN2, + ACTIONS(2265), 1, + anon_sym_STAR, + STATE(1060), 1, + sym__type_declarator, + STATE(1386), 1, + sym_ms_based_modifier, + STATE(1098), 5, + sym_parenthesized_type_declarator, + sym_attributed_type_declarator, + sym_pointer_type_declarator, + sym_function_type_declarator, + sym_array_type_declarator, + [38060] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1391), 1, + anon_sym___based, + ACTIONS(2261), 1, + sym_identifier, + ACTIONS(2263), 1, + anon_sym_LPAREN2, + ACTIONS(2265), 1, + anon_sym_STAR, + STATE(1072), 1, + sym__type_declarator, + STATE(1386), 1, + sym_ms_based_modifier, + STATE(1098), 5, + sym_parenthesized_type_declarator, + sym_attributed_type_declarator, + sym_pointer_type_declarator, + sym_function_type_declarator, + sym_array_type_declarator, + [38089] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2669), 1, + anon_sym_LBRACK, + STATE(1032), 1, + sym_parameter_list, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + ACTIONS(2717), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_LBRACE, + anon_sym_EQ, + [38116] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2649), 1, + anon_sym_COLON, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2687), 1, + anon_sym_COMMA, + ACTIONS(2691), 1, + anon_sym_LBRACK, + ACTIONS(2719), 1, + anon_sym_SEMI, + STATE(1091), 1, + sym_parameter_list, + STATE(1111), 1, + aux_sym_field_declaration_repeat1, + STATE(1272), 1, + sym_bitfield_clause, + STATE(1056), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [38151] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2669), 1, + anon_sym_LBRACK, + ACTIONS(2671), 1, + anon_sym_EQ, + ACTIONS(2673), 1, + anon_sym_SEMI, + STATE(1032), 1, + sym_parameter_list, + STATE(1206), 1, + aux_sym_declaration_repeat1, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [38183] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2667), 1, + anon_sym_SEMI, + ACTIONS(2669), 1, + anon_sym_LBRACK, + ACTIONS(2671), 1, + anon_sym_EQ, + STATE(1032), 1, + sym_parameter_list, + STATE(1160), 1, + aux_sym_declaration_repeat1, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [38215] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2723), 1, + anon_sym_LBRACK, + STATE(1025), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + ACTIONS(2721), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACE, + anon_sym_EQ, + [38237] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2691), 1, + anon_sym_LBRACK, + STATE(1091), 1, + sym_parameter_list, + STATE(1056), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + ACTIONS(2725), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_COLON, + [38263] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2669), 1, + anon_sym_LBRACK, + ACTIONS(2671), 1, + anon_sym_EQ, + ACTIONS(2675), 1, + anon_sym_SEMI, + STATE(1032), 1, + sym_parameter_list, + STATE(1199), 1, + aux_sym_declaration_repeat1, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [38295] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2669), 1, + anon_sym_LBRACK, + ACTIONS(2671), 1, + anon_sym_EQ, + ACTIONS(2677), 1, + anon_sym_SEMI, + STATE(1032), 1, + sym_parameter_list, + STATE(1187), 1, + aux_sym_declaration_repeat1, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [38327] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2691), 1, + anon_sym_LBRACK, + STATE(1091), 1, + sym_parameter_list, + STATE(1056), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + ACTIONS(2727), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_COLON, + [38353] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2691), 1, + anon_sym_LBRACK, + STATE(1091), 1, + sym_parameter_list, + STATE(1056), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + ACTIONS(2729), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_COLON, + [38379] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2733), 1, + anon_sym_LBRACK, + ACTIONS(2731), 9, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym___attribute__, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_EQ, + anon_sym_COLON, + [38397] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2737), 1, + anon_sym_LBRACK, + ACTIONS(2735), 9, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym___attribute__, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_EQ, + anon_sym_COLON, + [38415] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2741), 1, + anon_sym_LBRACK, + ACTIONS(2739), 9, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym___attribute__, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_EQ, + anon_sym_COLON, + [38433] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2691), 1, + anon_sym_LBRACK, + STATE(1091), 1, + sym_parameter_list, + STATE(1056), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + ACTIONS(2743), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_COLON, + [38459] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2669), 1, + anon_sym_LBRACK, + ACTIONS(2671), 1, + anon_sym_EQ, + STATE(1032), 1, + sym_parameter_list, + ACTIONS(2745), 2, + anon_sym_COMMA, + anon_sym_SEMI, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [38486] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2747), 1, + anon_sym_COMMA, + ACTIONS(2749), 1, + anon_sym_SEMI, + ACTIONS(2751), 1, + anon_sym_LBRACK, + STATE(1103), 1, + sym_parameter_list, + STATE(1152), 1, + aux_sym_type_definition_repeat2, + STATE(1079), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [38515] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2747), 1, + anon_sym_COMMA, + ACTIONS(2751), 1, + anon_sym_LBRACK, + ACTIONS(2753), 1, + anon_sym_SEMI, + STATE(1103), 1, + sym_parameter_list, + STATE(1157), 1, + aux_sym_type_definition_repeat2, + STATE(1079), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [38544] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2757), 1, + anon_sym_LBRACK, + STATE(1025), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + ACTIONS(2755), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_COLON, + [38565] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2747), 1, + anon_sym_COMMA, + ACTIONS(2751), 1, + anon_sym_LBRACK, + ACTIONS(2759), 1, + anon_sym_SEMI, + STATE(1103), 1, + sym_parameter_list, + STATE(1201), 1, + aux_sym_type_definition_repeat2, + STATE(1079), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [38594] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2747), 1, + anon_sym_COMMA, + ACTIONS(2751), 1, + anon_sym_LBRACK, + ACTIONS(2761), 1, + anon_sym_SEMI, + STATE(1103), 1, + sym_parameter_list, + STATE(1155), 1, + aux_sym_type_definition_repeat2, + STATE(1079), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [38623] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2751), 1, + anon_sym_LBRACK, + STATE(1103), 1, + sym_parameter_list, + STATE(1079), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + ACTIONS(2763), 3, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + [38648] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2747), 1, + anon_sym_COMMA, + ACTIONS(2751), 1, + anon_sym_LBRACK, + ACTIONS(2765), 1, + anon_sym_SEMI, + STATE(1103), 1, + sym_parameter_list, + STATE(1173), 1, + aux_sym_type_definition_repeat2, + STATE(1079), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [38677] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2751), 1, + anon_sym_LBRACK, + STATE(1103), 1, + sym_parameter_list, + STATE(1079), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + ACTIONS(2767), 3, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + [38702] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2769), 1, + sym_identifier, + ACTIONS(2773), 1, + sym_system_lib_string, + STATE(1320), 2, + sym_preproc_call_expression, + sym_string_literal, + ACTIONS(2771), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + [38723] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2775), 1, + sym_identifier, + ACTIONS(2777), 1, + sym_system_lib_string, + STATE(1319), 2, + sym_preproc_call_expression, + sym_string_literal, + ACTIONS(2771), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + [38744] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2779), 1, + sym_identifier, + ACTIONS(2781), 1, + sym_system_lib_string, + STATE(1448), 2, + sym_preproc_call_expression, + sym_string_literal, + ACTIONS(2771), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + [38765] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2747), 1, + anon_sym_COMMA, + ACTIONS(2751), 1, + anon_sym_LBRACK, + ACTIONS(2783), 1, + anon_sym_SEMI, + STATE(1103), 1, + sym_parameter_list, + STATE(1154), 1, + aux_sym_type_definition_repeat2, + STATE(1079), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [38794] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2747), 1, + anon_sym_COMMA, + ACTIONS(2751), 1, + anon_sym_LBRACK, + ACTIONS(2785), 1, + anon_sym_SEMI, + STATE(1103), 1, + sym_parameter_list, + STATE(1193), 1, + aux_sym_type_definition_repeat2, + STATE(1079), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [38823] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2751), 1, + anon_sym_LBRACK, + STATE(1103), 1, + sym_parameter_list, + STATE(1079), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + ACTIONS(2787), 3, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + [38848] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2747), 1, + anon_sym_COMMA, + ACTIONS(2751), 1, + anon_sym_LBRACK, + ACTIONS(2789), 1, + anon_sym_SEMI, + STATE(1103), 1, + sym_parameter_list, + STATE(1198), 1, + aux_sym_type_definition_repeat2, + STATE(1079), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [38877] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2691), 1, + anon_sym_LBRACK, + STATE(1091), 1, + sym_parameter_list, + STATE(1056), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + ACTIONS(2791), 3, + anon_sym_COMMA, + anon_sym_SEMI, + anon_sym_COLON, + [38902] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2751), 1, + anon_sym_LBRACK, + STATE(1103), 1, + sym_parameter_list, + STATE(1079), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + ACTIONS(2793), 3, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + [38927] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2795), 1, + sym_identifier, + ACTIONS(2797), 1, + sym_system_lib_string, + STATE(1437), 2, + sym_preproc_call_expression, + sym_string_literal, + ACTIONS(2771), 5, + anon_sym_L_DQUOTE, + anon_sym_u_DQUOTE, + anon_sym_U_DQUOTE, + anon_sym_u8_DQUOTE, + anon_sym_DQUOTE, + [38948] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2751), 1, + anon_sym_LBRACK, + STATE(1103), 1, + sym_parameter_list, + ACTIONS(2799), 2, + anon_sym_COMMA, + anon_sym_SEMI, + STATE(1079), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [38972] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2803), 1, + anon_sym_LBRACK, + ACTIONS(2801), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_EQ, + [38988] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(115), 1, + anon_sym_LBRACE, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2669), 1, + anon_sym_LBRACK, + STATE(110), 1, + sym_compound_statement, + STATE(1032), 1, + sym_parameter_list, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [39014] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2807), 1, + anon_sym_LBRACK, + ACTIONS(2805), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_EQ, + [39030] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(511), 1, + anon_sym_LBRACE, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2669), 1, + anon_sym_LBRACK, + STATE(357), 1, + sym_compound_statement, + STATE(1032), 1, + sym_parameter_list, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [39056] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2811), 1, + anon_sym_LBRACK, + ACTIONS(2809), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_EQ, + [39072] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2815), 1, + anon_sym_LBRACK, + ACTIONS(2813), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_EQ, + [39088] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2819), 1, + anon_sym_LBRACK, + STATE(1025), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + ACTIONS(2817), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + [39108] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2669), 1, + anon_sym_LBRACK, + STATE(350), 1, + sym_compound_statement, + STATE(1032), 1, + sym_parameter_list, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [39134] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(319), 1, + anon_sym_LBRACE, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2669), 1, + anon_sym_LBRACK, + STATE(332), 1, + sym_compound_statement, + STATE(1032), 1, + sym_parameter_list, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [39160] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2669), 1, + anon_sym_LBRACK, + STATE(1032), 1, + sym_parameter_list, + ACTIONS(2821), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [39184] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2825), 1, + anon_sym_LBRACK, + ACTIONS(2823), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_EQ, + [39200] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2829), 1, + anon_sym_LBRACK, + ACTIONS(2827), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_LBRACE, + anon_sym_EQ, + [39216] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2833), 1, + anon_sym_LBRACK, + ACTIONS(2831), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + [39231] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2837), 1, + anon_sym_LBRACK, + ACTIONS(2835), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + [39246] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2841), 1, + anon_sym_LBRACK, + ACTIONS(2839), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + [39261] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2751), 1, + anon_sym_LBRACK, + ACTIONS(2843), 1, + anon_sym_RPAREN, + STATE(1103), 1, + sym_parameter_list, + STATE(1079), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [39284] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2847), 1, + anon_sym_LBRACK, + ACTIONS(2845), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + [39299] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2691), 1, + anon_sym_LBRACK, + ACTIONS(2849), 1, + anon_sym_RPAREN, + STATE(1091), 1, + sym_parameter_list, + STATE(1056), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [39322] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2853), 1, + anon_sym_LBRACK, + ACTIONS(2851), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + [39337] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2857), 1, + anon_sym_LBRACK, + ACTIONS(2855), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + [39352] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2861), 1, + anon_sym_LBRACK, + ACTIONS(2859), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + [39367] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2865), 1, + anon_sym_LBRACK, + ACTIONS(2863), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + anon_sym_COLON, + [39382] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK_LBRACK, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2669), 1, + anon_sym_LBRACK, + ACTIONS(2867), 1, + anon_sym_RPAREN, + STATE(1032), 1, + sym_parameter_list, + STATE(1043), 2, + sym_attribute_declaration, + aux_sym_attributed_declarator_repeat1, + [39405] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2871), 1, + anon_sym_LBRACK, + ACTIONS(2869), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + [39419] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2875), 1, + anon_sym_LBRACK, + ACTIONS(2873), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + [39433] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2879), 1, + anon_sym_LBRACK, + ACTIONS(2877), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + [39447] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2881), 1, + anon_sym_LBRACK, + ACTIONS(2884), 1, + anon_sym_EQ, + ACTIONS(2886), 1, + anon_sym_DOT, + STATE(1099), 3, + sym_subscript_designator, + sym_field_designator, + aux_sym_initializer_pair_repeat1, + [39465] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2891), 1, + anon_sym_LBRACK, + ACTIONS(2889), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + [39479] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2895), 1, + anon_sym_LBRACK, + ACTIONS(2893), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + [39493] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2899), 1, + anon_sym_LBRACK, + ACTIONS(2897), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + [39507] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2903), 1, + anon_sym_LBRACK, + ACTIONS(2901), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + [39521] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2907), 1, + anon_sym_LBRACK, + ACTIONS(2905), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_SEMI, + anon_sym_LBRACK_LBRACK, + [39535] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1471), 1, + anon_sym_LBRACK, + ACTIONS(2909), 1, + anon_sym_EQ, + ACTIONS(2911), 1, + anon_sym_DOT, + STATE(1099), 3, + sym_subscript_designator, + sym_field_designator, + aux_sym_initializer_pair_repeat1, + [39553] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2649), 1, + anon_sym_COLON, + ACTIONS(2687), 1, + anon_sym_COMMA, + ACTIONS(2913), 1, + anon_sym_SEMI, + STATE(1136), 1, + aux_sym_field_declaration_repeat1, + STATE(1334), 1, + sym_bitfield_clause, + [39572] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2917), 1, + anon_sym_LBRACK, + STATE(1128), 1, + sym_parameter_list, + ACTIONS(2915), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [39589] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2917), 1, + anon_sym_LBRACK, + STATE(1128), 1, + sym_parameter_list, + ACTIONS(2919), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [39606] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2649), 1, + anon_sym_COLON, + ACTIONS(2687), 1, + anon_sym_COMMA, + ACTIONS(2921), 1, + anon_sym_SEMI, + STATE(1136), 1, + aux_sym_field_declaration_repeat1, + STATE(1376), 1, + sym_bitfield_clause, + [39625] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + ACTIONS(2925), 1, + anon_sym_COLON_COLON, + STATE(1228), 1, + sym_argument_list, + ACTIONS(2923), 2, + anon_sym_COMMA, + anon_sym_RBRACK_RBRACK, + [39642] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2649), 1, + anon_sym_COLON, + ACTIONS(2687), 1, + anon_sym_COMMA, + ACTIONS(2927), 1, + anon_sym_SEMI, + STATE(1136), 1, + aux_sym_field_declaration_repeat1, + STATE(1350), 1, + sym_bitfield_clause, + [39661] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(2283), 1, + anon_sym_LBRACE, + ACTIONS(2929), 1, + sym_identifier, + STATE(875), 1, + sym_field_declaration_list, + STATE(1175), 1, + sym_ms_declspec_modifier, + [39680] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2917), 1, + anon_sym_LBRACK, + STATE(1128), 1, + sym_parameter_list, + ACTIONS(2821), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [39697] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(37), 1, + anon_sym___declspec, + ACTIONS(2283), 1, + anon_sym_LBRACE, + ACTIONS(2931), 1, + sym_identifier, + STATE(873), 1, + sym_field_declaration_list, + STATE(1174), 1, + sym_ms_declspec_modifier, + [39716] = 5, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2933), 1, + anon_sym_LF, + ACTIONS(2935), 1, + anon_sym_LPAREN, + ACTIONS(2937), 1, + sym_preproc_arg, + STATE(1261), 1, + sym_preproc_params, + [39732] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2939), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_LBRACK, + [39742] = 5, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2935), 1, + anon_sym_LPAREN, + ACTIONS(2941), 1, + anon_sym_LF, + ACTIONS(2943), 1, + sym_preproc_arg, + STATE(1254), 1, + sym_preproc_params, + [39758] = 5, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2945), 1, + anon_sym_DQUOTE, + ACTIONS(2947), 1, + aux_sym_string_literal_token1, + ACTIONS(2949), 1, + sym_escape_sequence, + STATE(1140), 1, + aux_sym_string_literal_repeat1, + [39774] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2951), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_LBRACK, + [39784] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2953), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_LBRACK, + [39794] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2955), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_LBRACK, + [39804] = 5, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2957), 1, + anon_sym_DQUOTE, + ACTIONS(2959), 1, + aux_sym_string_literal_token1, + ACTIONS(2961), 1, + sym_escape_sequence, + STATE(1145), 1, + aux_sym_string_literal_repeat1, + [39820] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2917), 1, + anon_sym_LBRACK, + ACTIONS(2963), 1, + anon_sym_RPAREN, + STATE(1128), 1, + sym_parameter_list, + [39836] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2965), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_LBRACK, + [39846] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + STATE(1263), 1, + sym_argument_list, + ACTIONS(2967), 2, + anon_sym_COMMA, + anon_sym_RBRACK_RBRACK, + [39860] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2917), 1, + anon_sym_LBRACK, + ACTIONS(2969), 1, + anon_sym_RPAREN, + STATE(1128), 1, + sym_parameter_list, + [39876] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2917), 1, + anon_sym_LBRACK, + ACTIONS(2971), 1, + anon_sym_RPAREN, + STATE(1128), 1, + sym_parameter_list, + [39892] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2973), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_LBRACK, + [39902] = 5, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2935), 1, + anon_sym_LPAREN, + ACTIONS(2975), 1, + anon_sym_LF, + ACTIONS(2977), 1, + sym_preproc_arg, + STATE(1215), 1, + sym_preproc_params, + [39918] = 5, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2935), 1, + anon_sym_LPAREN, + ACTIONS(2979), 1, + anon_sym_LF, + ACTIONS(2981), 1, + sym_preproc_arg, + STATE(1251), 1, + sym_preproc_params, + [39934] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2983), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_LBRACK, + [39944] = 5, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2935), 1, + anon_sym_LPAREN, + ACTIONS(2985), 1, + anon_sym_LF, + ACTIONS(2987), 1, + sym_preproc_arg, + STATE(1250), 1, + sym_preproc_params, + [39960] = 5, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2989), 1, + anon_sym_DQUOTE, + ACTIONS(2991), 1, + aux_sym_string_literal_token1, + ACTIONS(2993), 1, + sym_escape_sequence, + STATE(1118), 1, + aux_sym_string_literal_repeat1, + [39976] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2995), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_LBRACK, + [39986] = 5, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2935), 1, + anon_sym_LPAREN, + ACTIONS(2997), 1, + anon_sym_LF, + ACTIONS(2999), 1, + sym_preproc_arg, + STATE(1243), 1, + sym_preproc_params, + [40002] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3001), 1, + anon_sym_COMMA, + STATE(1136), 1, + aux_sym_field_declaration_repeat1, + ACTIONS(3004), 2, + anon_sym_SEMI, + anon_sym_COLON, + [40016] = 5, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2947), 1, + aux_sym_string_literal_token1, + ACTIONS(2949), 1, + sym_escape_sequence, + ACTIONS(3006), 1, + anon_sym_DQUOTE, + STATE(1140), 1, + aux_sym_string_literal_repeat1, + [40032] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3008), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_LBRACK, + [40042] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2917), 1, + anon_sym_LBRACK, + ACTIONS(3010), 1, + anon_sym_RPAREN, + STATE(1128), 1, + sym_parameter_list, + [40058] = 5, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3012), 1, + anon_sym_DQUOTE, + ACTIONS(3014), 1, + aux_sym_string_literal_token1, + ACTIONS(3017), 1, + sym_escape_sequence, + STATE(1140), 1, + aux_sym_string_literal_repeat1, + [40074] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3020), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_LBRACK, + [40084] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3022), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_LBRACK, + [40094] = 5, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3024), 1, + anon_sym_DQUOTE, + ACTIONS(3026), 1, + aux_sym_string_literal_token1, + ACTIONS(3028), 1, + sym_escape_sequence, + STATE(1137), 1, + aux_sym_string_literal_repeat1, + [40110] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2665), 1, + anon_sym_LPAREN2, + ACTIONS(2917), 1, + anon_sym_LBRACK, + ACTIONS(3030), 1, + anon_sym_RPAREN, + STATE(1128), 1, + sym_parameter_list, + [40126] = 5, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2947), 1, + aux_sym_string_literal_token1, + ACTIONS(2949), 1, + sym_escape_sequence, + ACTIONS(3032), 1, + anon_sym_DQUOTE, + STATE(1140), 1, + aux_sym_string_literal_repeat1, + [40142] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3034), 1, + sym_identifier, + ACTIONS(3036), 1, + anon_sym_COMMA, + ACTIONS(3038), 1, + anon_sym_RBRACE, + STATE(1202), 1, + sym_enumerator, + [40158] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3040), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_LPAREN2, + anon_sym_LBRACK, + [40168] = 5, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(2935), 1, + anon_sym_LPAREN, + ACTIONS(3042), 1, + anon_sym_LF, + ACTIONS(3044), 1, + sym_preproc_arg, + STATE(1231), 1, + sym_preproc_params, + [40184] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2055), 1, + anon_sym_COMMA, + ACTIONS(2057), 1, + anon_sym_RBRACE, + STATE(1167), 1, + aux_sym_initializer_list_repeat1, + [40197] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3046), 1, + anon_sym_COMMA, + ACTIONS(3048), 1, + anon_sym_RPAREN, + STATE(1158), 1, + aux_sym_parameter_list_repeat1, + [40210] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3050), 1, + anon_sym_COMMA, + ACTIONS(3052), 1, + anon_sym_RBRACK_RBRACK, + STATE(1203), 1, + aux_sym_attribute_declaration_repeat1, + [40223] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2747), 1, + anon_sym_COMMA, + ACTIONS(3054), 1, + anon_sym_SEMI, + STATE(1153), 1, + aux_sym_type_definition_repeat2, + [40236] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3056), 1, + anon_sym_COMMA, + ACTIONS(3059), 1, + anon_sym_SEMI, + STATE(1153), 1, + aux_sym_type_definition_repeat2, + [40249] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2747), 1, + anon_sym_COMMA, + ACTIONS(3061), 1, + anon_sym_SEMI, + STATE(1153), 1, + aux_sym_type_definition_repeat2, + [40262] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2747), 1, + anon_sym_COMMA, + ACTIONS(3063), 1, + anon_sym_SEMI, + STATE(1153), 1, + aux_sym_type_definition_repeat2, + [40275] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2289), 1, + anon_sym_LBRACE, + ACTIONS(3065), 1, + sym_identifier, + STATE(869), 1, + sym_enumerator_list, + [40288] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2747), 1, + anon_sym_COMMA, + ACTIONS(3067), 1, + anon_sym_SEMI, + STATE(1153), 1, + aux_sym_type_definition_repeat2, + [40301] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3046), 1, + anon_sym_COMMA, + ACTIONS(3069), 1, + anon_sym_RPAREN, + STATE(1197), 1, + aux_sym_parameter_list_repeat1, + [40314] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(3071), 1, + anon_sym_SEMI, + STATE(1191), 1, + aux_sym_declaration_repeat1, + [40327] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(3073), 1, + anon_sym_SEMI, + STATE(1191), 1, + aux_sym_declaration_repeat1, + [40340] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3034), 1, + sym_identifier, + ACTIONS(3075), 1, + anon_sym_RBRACE, + STATE(1260), 1, + sym_enumerator, + [40353] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3077), 1, + anon_sym_COMMA, + ACTIONS(3080), 1, + anon_sym_RBRACE, + STATE(1162), 1, + aux_sym_enumerator_list_repeat1, + [40366] = 4, + ACTIONS(2395), 1, + anon_sym_LPAREN2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3082), 1, + anon_sym_LF, + STATE(962), 1, + sym_preproc_argument_list, + [40379] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1985), 1, + anon_sym_COMMA, + ACTIONS(3084), 1, + anon_sym_RPAREN, + STATE(1178), 1, + aux_sym_argument_list_repeat1, + [40392] = 4, + ACTIONS(2395), 1, + anon_sym_LPAREN2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3086), 1, + anon_sym_LF, + STATE(962), 1, + sym_preproc_argument_list, + [40405] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2321), 1, + anon_sym_COMMA, + ACTIONS(3088), 1, + anon_sym_RPAREN, + STATE(1179), 1, + aux_sym_preproc_argument_list_repeat1, + [40418] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1522), 1, + anon_sym_RBRACE, + ACTIONS(3090), 1, + anon_sym_COMMA, + STATE(1182), 1, + aux_sym_initializer_list_repeat1, + [40431] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3050), 1, + anon_sym_COMMA, + ACTIONS(3092), 1, + anon_sym_RBRACK_RBRACK, + STATE(1183), 1, + aux_sym_attribute_declaration_repeat1, + [40444] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(3094), 1, + anon_sym_SEMI, + STATE(1204), 1, + aux_sym_declaration_repeat1, + [40457] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(3096), 1, + anon_sym_SEMI, + STATE(1159), 1, + aux_sym_declaration_repeat1, + [40470] = 4, + ACTIONS(2395), 1, + anon_sym_LPAREN2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3098), 1, + anon_sym_LF, + STATE(962), 1, + sym_preproc_argument_list, + [40483] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3050), 1, + anon_sym_COMMA, + ACTIONS(3100), 1, + anon_sym_RBRACK_RBRACK, + STATE(1196), 1, + aux_sym_attribute_declaration_repeat1, + [40496] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2747), 1, + anon_sym_COMMA, + ACTIONS(3102), 1, + anon_sym_SEMI, + STATE(1153), 1, + aux_sym_type_definition_repeat2, + [40509] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2283), 1, + anon_sym_LBRACE, + ACTIONS(3104), 1, + sym_identifier, + STATE(864), 1, + sym_field_declaration_list, + [40522] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2283), 1, + anon_sym_LBRACE, + ACTIONS(3106), 1, + sym_identifier, + STATE(883), 1, + sym_field_declaration_list, + [40535] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(3108), 1, + anon_sym_SEMI, + STATE(1188), 1, + aux_sym_declaration_repeat1, + [40548] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3110), 1, + anon_sym_COMMA, + ACTIONS(3112), 1, + anon_sym_RPAREN, + STATE(1189), 1, + aux_sym_preproc_params_repeat1, + [40561] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2125), 1, + anon_sym_RPAREN, + ACTIONS(3114), 1, + anon_sym_COMMA, + STATE(1178), 1, + aux_sym_argument_list_repeat1, + [40574] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2499), 1, + anon_sym_RPAREN, + ACTIONS(3117), 1, + anon_sym_COMMA, + STATE(1179), 1, + aux_sym_preproc_argument_list_repeat1, + [40587] = 4, + ACTIONS(2395), 1, + anon_sym_LPAREN2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3120), 1, + anon_sym_LF, + STATE(962), 1, + sym_preproc_argument_list, + [40600] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2321), 1, + anon_sym_COMMA, + ACTIONS(3122), 1, + anon_sym_RPAREN, + STATE(1179), 1, + aux_sym_preproc_argument_list_repeat1, + [40613] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2183), 1, + anon_sym_RBRACE, + ACTIONS(3124), 1, + anon_sym_COMMA, + STATE(1182), 1, + aux_sym_initializer_list_repeat1, + [40626] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3050), 1, + anon_sym_COMMA, + ACTIONS(3127), 1, + anon_sym_RBRACK_RBRACK, + STATE(1195), 1, + aux_sym_attribute_declaration_repeat1, + [40639] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1985), 1, + anon_sym_COMMA, + ACTIONS(3129), 1, + anon_sym_RPAREN, + STATE(1178), 1, + aux_sym_argument_list_repeat1, + [40652] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3131), 3, + anon_sym_LBRACK, + anon_sym_EQ, + anon_sym_DOT, + [40661] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(3133), 1, + anon_sym_SEMI, + STATE(1205), 1, + aux_sym_declaration_repeat1, + [40674] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(3135), 1, + anon_sym_SEMI, + STATE(1191), 1, + aux_sym_declaration_repeat1, + [40687] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(3137), 1, + anon_sym_SEMI, + STATE(1191), 1, + aux_sym_declaration_repeat1, + [40700] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3139), 1, + anon_sym_COMMA, + ACTIONS(3142), 1, + anon_sym_RPAREN, + STATE(1189), 1, + aux_sym_preproc_params_repeat1, + [40713] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3146), 1, + anon_sym_RPAREN, + ACTIONS(3144), 2, + anon_sym_DOT_DOT_DOT, + sym_identifier, + [40724] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3148), 1, + anon_sym_COMMA, + ACTIONS(3151), 1, + anon_sym_SEMI, + STATE(1191), 1, + aux_sym_declaration_repeat1, + [40737] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3153), 1, + anon_sym_COMMA, + ACTIONS(3155), 1, + anon_sym_RBRACE, + STATE(1162), 1, + aux_sym_enumerator_list_repeat1, + [40750] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2747), 1, + anon_sym_COMMA, + ACTIONS(3157), 1, + anon_sym_SEMI, + STATE(1153), 1, + aux_sym_type_definition_repeat2, + [40763] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3034), 1, + sym_identifier, + ACTIONS(3155), 1, + anon_sym_RBRACE, + STATE(1260), 1, + sym_enumerator, + [40776] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3159), 1, + anon_sym_COMMA, + ACTIONS(3162), 1, + anon_sym_RBRACK_RBRACK, + STATE(1195), 1, + aux_sym_attribute_declaration_repeat1, + [40789] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3050), 1, + anon_sym_COMMA, + ACTIONS(3164), 1, + anon_sym_RBRACK_RBRACK, + STATE(1195), 1, + aux_sym_attribute_declaration_repeat1, + [40802] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3166), 1, + anon_sym_COMMA, + ACTIONS(3169), 1, + anon_sym_RPAREN, + STATE(1197), 1, + aux_sym_parameter_list_repeat1, + [40815] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2747), 1, + anon_sym_COMMA, + ACTIONS(3171), 1, + anon_sym_SEMI, + STATE(1153), 1, + aux_sym_type_definition_repeat2, + [40828] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(3173), 1, + anon_sym_SEMI, + STATE(1191), 1, + aux_sym_declaration_repeat1, + [40841] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3177), 1, + anon_sym_EQ, + ACTIONS(3175), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + [40852] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2747), 1, + anon_sym_COMMA, + ACTIONS(3179), 1, + anon_sym_SEMI, + STATE(1153), 1, + aux_sym_type_definition_repeat2, + [40865] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3181), 1, + anon_sym_COMMA, + ACTIONS(3183), 1, + anon_sym_RBRACE, + STATE(1192), 1, + aux_sym_enumerator_list_repeat1, + [40878] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3050), 1, + anon_sym_COMMA, + ACTIONS(3185), 1, + anon_sym_RBRACK_RBRACK, + STATE(1195), 1, + aux_sym_attribute_declaration_repeat1, + [40891] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(3187), 1, + anon_sym_SEMI, + STATE(1191), 1, + aux_sym_declaration_repeat1, + [40904] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(3189), 1, + anon_sym_SEMI, + STATE(1191), 1, + aux_sym_declaration_repeat1, + [40917] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2663), 1, + anon_sym_COMMA, + ACTIONS(3191), 1, + anon_sym_SEMI, + STATE(1191), 1, + aux_sym_declaration_repeat1, + [40930] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3193), 3, + anon_sym_LBRACK, + anon_sym_EQ, + anon_sym_DOT, + [40939] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3110), 1, + anon_sym_COMMA, + ACTIONS(3195), 1, + anon_sym_RPAREN, + STATE(1177), 1, + aux_sym_preproc_params_repeat1, + [40952] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3197), 2, + anon_sym_LF, + sym_preproc_arg, + [40960] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3199), 1, + anon_sym_LPAREN2, + STATE(1368), 1, + sym_parenthesized_expression, + [40970] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3201), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [40978] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3203), 1, + anon_sym_LF, + ACTIONS(3205), 1, + sym_preproc_arg, + [40988] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3207), 2, + anon_sym_LF, + sym_preproc_arg, + [40996] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3034), 1, + sym_identifier, + STATE(1260), 1, + sym_enumerator, + [41006] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3209), 1, + anon_sym_LF, + ACTIONS(3211), 1, + sym_preproc_arg, + [41016] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3199), 1, + anon_sym_LPAREN2, + STATE(1276), 1, + sym_parenthesized_expression, + [41026] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2053), 2, + anon_sym_RPAREN, + anon_sym_SEMI, + [41034] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3199), 1, + anon_sym_LPAREN2, + STATE(1326), 1, + sym_parenthesized_expression, + [41044] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3213), 1, + sym_identifier, + STATE(1168), 1, + sym_attribute, + [41054] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3162), 2, + anon_sym_COMMA, + anon_sym_RBRACK_RBRACK, + [41062] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3199), 1, + anon_sym_LPAREN2, + STATE(1252), 1, + sym_parenthesized_expression, + [41072] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3215), 2, + aux_sym_char_literal_token1, + sym_escape_sequence, + [41080] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3217), 1, + anon_sym_LF, + ACTIONS(3219), 1, + sym_preproc_arg, + [41090] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3169), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [41098] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3221), 1, + anon_sym_LPAREN2, + STATE(151), 1, + sym_parenthesized_expression, + [41108] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3213), 1, + sym_identifier, + STATE(1220), 1, + sym_attribute, + [41118] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3221), 1, + anon_sym_LPAREN2, + STATE(149), 1, + sym_parenthesized_expression, + [41128] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3223), 2, + anon_sym_COMMA, + anon_sym_RBRACK_RBRACK, + [41136] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2135), 2, + anon_sym_COMMA, + anon_sym_SEMI, + [41144] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3199), 1, + anon_sym_LPAREN2, + STATE(1379), 1, + sym_parenthesized_expression, + [41154] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3225), 1, + anon_sym_LF, + ACTIONS(3227), 1, + sym_preproc_arg, + [41164] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2745), 2, + anon_sym_COMMA, + anon_sym_SEMI, + [41172] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3142), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [41180] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3199), 1, + anon_sym_LPAREN2, + STATE(1242), 1, + sym_parenthesized_expression, + [41190] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2183), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + [41198] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2161), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + [41206] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3229), 2, + anon_sym_DOT_DOT_DOT, + sym_identifier, + [41214] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + STATE(1362), 1, + sym_argument_list, + [41224] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3231), 2, + anon_sym_LF, + sym_preproc_arg, + [41232] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(319), 1, + anon_sym_LBRACE, + STATE(301), 1, + sym_compound_statement, + [41242] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3233), 2, + aux_sym_char_literal_token1, + sym_escape_sequence, + [41250] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(511), 1, + anon_sym_LBRACE, + STATE(133), 1, + sym_compound_statement, + [41260] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3235), 1, + anon_sym_LF, + ACTIONS(3237), 1, + sym_preproc_arg, + [41270] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3199), 1, + anon_sym_LPAREN2, + STATE(1240), 1, + sym_parenthesized_expression, + [41280] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(41), 1, + anon_sym_LBRACE, + STATE(229), 1, + sym_compound_statement, + [41290] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3213), 1, + sym_identifier, + STATE(1151), 1, + sym_attribute, + [41300] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3239), 1, + anon_sym_LF, + ACTIONS(3241), 1, + sym_preproc_arg, + [41310] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3243), 1, + sym_identifier, + ACTIONS(3245), 1, + anon_sym_LPAREN2, + [41320] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1759), 1, + anon_sym_LPAREN2, + STATE(1384), 1, + sym_argument_list, + [41330] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3247), 1, + anon_sym_LF, + ACTIONS(3249), 1, + sym_preproc_arg, + [41340] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3251), 1, + anon_sym_LF, + ACTIONS(3253), 1, + sym_preproc_arg, + [41350] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(115), 1, + anon_sym_LBRACE, + STATE(72), 1, + sym_compound_statement, + [41360] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3255), 1, + anon_sym_LF, + ACTIONS(3257), 1, + sym_preproc_arg, + [41370] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3259), 1, + anon_sym_LF, + ACTIONS(3261), 1, + sym_preproc_arg, + [41380] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3263), 1, + anon_sym_LF, + ACTIONS(3265), 1, + sym_preproc_arg, + [41390] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3267), 1, + sym_identifier, + ACTIONS(3269), 1, + anon_sym_LPAREN2, + [41400] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3271), 2, + aux_sym_char_literal_token1, + sym_escape_sequence, + [41408] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3221), 1, + anon_sym_LPAREN2, + STATE(160), 1, + sym_parenthesized_expression, + [41418] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3199), 1, + anon_sym_LPAREN2, + STATE(1245), 1, + sym_parenthesized_expression, + [41428] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3080), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + [41436] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3273), 1, + anon_sym_LF, + ACTIONS(3275), 1, + sym_preproc_arg, + [41446] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3277), 1, + anon_sym_LF, + ACTIONS(3279), 1, + sym_preproc_arg, + [41456] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3281), 2, + anon_sym_COMMA, + anon_sym_RBRACK_RBRACK, + [41464] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3221), 1, + anon_sym_LPAREN2, + STATE(258), 1, + sym_parenthesized_expression, + [41474] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3221), 1, + anon_sym_LPAREN2, + STATE(166), 1, + sym_parenthesized_expression, + [41484] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3221), 1, + anon_sym_LPAREN2, + STATE(260), 1, + sym_parenthesized_expression, + [41494] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3221), 1, + anon_sym_LPAREN2, + STATE(240), 1, + sym_parenthesized_expression, + [41504] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3213), 1, + sym_identifier, + STATE(1172), 1, + sym_attribute, + [41514] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3221), 1, + anon_sym_LPAREN2, + STATE(243), 1, + sym_parenthesized_expression, + [41524] = 3, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3283), 1, + anon_sym_LF, + ACTIONS(3285), 1, + sym_preproc_arg, + [41534] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3287), 1, + sym_identifier, + [41541] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3289), 1, + anon_sym_SEMI, + [41548] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2085), 1, + anon_sym_RPAREN, + [41555] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3291), 1, + aux_sym_preproc_if_token2, + [41562] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2061), 1, + anon_sym_RPAREN, + [41569] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3293), 1, + anon_sym_SEMI, + [41576] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2071), 1, + anon_sym_RPAREN, + [41583] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3295), 1, + sym_identifier, + [41590] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2057), 1, + anon_sym_RBRACE, + [41597] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2067), 1, + anon_sym_SEMI, + [41604] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2117), 1, + anon_sym_RPAREN, + [41611] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3297), 1, + anon_sym_SEMI, + [41618] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2129), 1, + anon_sym_RPAREN, + [41625] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2065), 1, + anon_sym_RPAREN, + [41632] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2145), 1, + anon_sym_RPAREN, + [41639] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3299), 1, + anon_sym_SQUOTE, + [41646] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3301), 1, + aux_sym_preproc_if_token2, + [41653] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2149), 1, + anon_sym_RPAREN, + [41660] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3303), 1, + aux_sym_preproc_if_token2, + [41667] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3305), 1, + aux_sym_preproc_if_token2, + [41674] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3307), 1, + anon_sym_LF, + [41681] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3309), 1, + anon_sym_LF, + [41688] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3311), 1, + aux_sym_preproc_if_token2, + [41695] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3313), 1, + anon_sym_LF, + [41702] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3315), 1, + anon_sym_LF, + [41709] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2177), 1, + anon_sym_RPAREN, + [41716] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3317), 1, + anon_sym_LF, + [41723] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3319), 1, + anon_sym_LF, + [41730] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3321), 1, + aux_sym_preproc_if_token2, + [41737] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3323), 1, + anon_sym_LF, + [41744] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3325), 1, + anon_sym_LF, + [41751] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3327), 1, + aux_sym_preproc_if_token2, + [41758] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3329), 1, + anon_sym_LF, + [41765] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3331), 1, + anon_sym_LF, + [41772] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3333), 1, + anon_sym_SEMI, + [41779] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3335), 1, + anon_sym_LF, + [41786] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2123), 1, + anon_sym_RPAREN, + [41793] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3337), 1, + anon_sym_LF, + [41800] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3339), 1, + sym_identifier, + [41807] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3341), 1, + anon_sym_LF, + [41814] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3343), 1, + aux_sym_preproc_if_token2, + [41821] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3345), 1, + anon_sym_SEMI, + [41828] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2115), 1, + anon_sym_SEMI, + [41835] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2143), 1, + anon_sym_RPAREN, + [41842] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3347), 1, + sym_identifier, + [41849] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2147), 1, + anon_sym_RPAREN, + [41856] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2153), 1, + anon_sym_SEMI, + [41863] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3349), 1, + anon_sym_LF, + [41870] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3098), 1, + anon_sym_LF, + [41877] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3120), 1, + anon_sym_LF, + [41884] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2175), 1, + anon_sym_SEMI, + [41891] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3351), 1, + anon_sym_SEMI, + [41898] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2075), 1, + anon_sym_RPAREN, + [41905] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2155), 1, + anon_sym_SEMI, + [41912] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2097), 1, + anon_sym_SEMI, + [41919] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3353), 1, + anon_sym_SEMI, + [41926] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3355), 1, + anon_sym_SEMI, + [41933] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3357), 1, + anon_sym_STAR, + [41940] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3359), 1, + anon_sym_SEMI, + [41947] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3361), 1, + anon_sym_SEMI, + [41954] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3363), 1, + aux_sym_preproc_if_token2, + [41961] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3365), 1, + anon_sym_COLON, + [41968] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2079), 1, + anon_sym_RPAREN, + [41975] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3367), 1, + anon_sym_SEMI, + [41982] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3369), 1, + anon_sym_SEMI, + [41989] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3371), 1, + aux_sym_preproc_if_token2, + [41996] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2095), 1, + anon_sym_SEMI, + [42003] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3373), 1, + aux_sym_preproc_if_token2, + [42010] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3375), 1, + sym_identifier, + [42017] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3377), 1, + aux_sym_preproc_if_token2, + [42024] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2119), 1, + anon_sym_RPAREN, + [42031] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3379), 1, + sym_identifier, + [42038] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3381), 1, + anon_sym_SEMI, + [42045] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3383), 1, + anon_sym_RPAREN, + [42052] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2059), 1, + anon_sym_RPAREN, + [42059] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3385), 1, + anon_sym_RPAREN, + [42066] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2131), 1, + anon_sym_RPAREN, + [42073] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2111), 1, + anon_sym_RPAREN, + [42080] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2077), 1, + anon_sym_SEMI, + [42087] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3387), 1, + anon_sym_SEMI, + [42094] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2105), 1, + anon_sym_SEMI, + [42101] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3389), 1, + aux_sym_preproc_if_token2, + [42108] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3391), 1, + aux_sym_preproc_if_token2, + [42115] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3393), 1, + anon_sym_RPAREN, + [42122] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2169), 1, + anon_sym_SEMI, + [42129] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3395), 1, + anon_sym_LF, + [42136] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3397), 1, + aux_sym_preproc_if_token2, + [42143] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3399), 1, + aux_sym_preproc_if_token2, + [42150] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2141), 1, + anon_sym_RPAREN, + [42157] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2159), 1, + anon_sym_RPAREN, + [42164] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3401), 1, + sym_identifier, + [42171] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3403), 1, + anon_sym_STAR, + [42178] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3405), 1, + aux_sym_preproc_if_token2, + [42185] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3407), 1, + anon_sym_RPAREN, + [42192] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3409), 1, + anon_sym_LF, + [42199] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3411), 1, + anon_sym_RPAREN, + [42206] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2137), 1, + anon_sym_SEMI, + [42213] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3413), 1, + anon_sym_SEMI, + [42220] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3415), 1, + sym_identifier, + [42227] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3417), 1, + aux_sym_preproc_if_token2, + [42234] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3419), 1, + sym_identifier, + [42241] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3421), 1, + sym_identifier, + [42248] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3423), 1, + aux_sym_preproc_if_token2, + [42255] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3183), 1, + anon_sym_RBRACE, + [42262] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3425), 1, + aux_sym_preproc_if_token2, + [42269] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3427), 1, + anon_sym_SEMI, + [42276] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3429), 1, + anon_sym_RPAREN, + [42283] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3431), 1, + sym_identifier, + [42290] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3433), 1, + anon_sym_SEMI, + [42297] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3435), 1, + anon_sym_SEMI, + [42304] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2133), 1, + anon_sym_RPAREN, + [42311] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2093), 1, + anon_sym_RPAREN, + [42318] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3437), 1, + sym_identifier, + [42325] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3439), 1, + anon_sym_RPAREN, + [42332] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2099), 1, + anon_sym_RPAREN, + [42339] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3441), 1, + anon_sym_STAR, + [42346] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3443), 1, + sym_identifier, + [42353] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2063), 1, + anon_sym_RPAREN, + [42360] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3445), 1, + anon_sym_RPAREN, + [42367] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3447), 1, + anon_sym_SEMI, + [42374] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3449), 1, + aux_sym_preproc_if_token2, + [42381] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3451), 1, + aux_sym_preproc_if_token2, + [42388] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2107), 1, + anon_sym_SEMI, + [42395] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3453), 1, + aux_sym_preproc_if_token2, + [42402] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2109), 1, + anon_sym_SEMI, + [42409] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3455), 1, + sym_identifier, + [42416] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3457), 1, + aux_sym_preproc_if_token2, + [42423] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2173), 1, + anon_sym_SEMI, + [42430] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3459), 1, + anon_sym_LF, + [42437] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3461), 1, + sym_identifier, + [42444] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3463), 1, + sym_identifier, + [42451] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3465), 1, + aux_sym_preproc_if_token2, + [42458] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3467), 1, + aux_sym_preproc_if_token2, + [42465] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3469), 1, + sym_identifier, + [42472] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3471), 1, + sym_identifier, + [42479] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3473), 1, + anon_sym_LF, + [42486] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3475), 1, + anon_sym_STAR, + [42493] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3477), 1, + anon_sym_RPAREN, + [42500] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3479), 1, + aux_sym_preproc_if_token2, + [42507] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3481), 1, + anon_sym_SQUOTE, + [42514] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3483), 1, + aux_sym_preproc_if_token2, + [42521] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3485), 1, + anon_sym_SEMI, + [42528] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2073), 1, + anon_sym_SEMI, + [42535] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3487), 1, + anon_sym_while, + [42542] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2127), 1, + anon_sym_SEMI, + [42549] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3489), 1, + aux_sym_preproc_if_token2, + [42556] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2139), 1, + anon_sym_SEMI, + [42563] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3491), 1, + anon_sym_LF, + [42570] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3493), 1, + anon_sym_SQUOTE, + [42577] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2121), 1, + anon_sym_SEMI, + [42584] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3495), 1, + sym_identifier, + [42591] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3497), 1, + sym_identifier, + [42598] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3499), 1, + sym_identifier, + [42605] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3501), 1, + anon_sym_SEMI, + [42612] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3503), 1, + sym_identifier, + [42619] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2083), 1, + anon_sym_SEMI, + [42626] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3505), 1, + aux_sym_preproc_if_token2, + [42633] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2171), 1, + anon_sym_RPAREN, + [42640] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3507), 1, + anon_sym_RPAREN, + [42647] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2167), 1, + anon_sym_RPAREN, + [42654] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3509), 1, + anon_sym_LF, + [42661] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3511), 1, + anon_sym_RPAREN, + [42668] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3513), 1, + aux_sym_preproc_if_token2, + [42675] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3515), 1, + anon_sym_while, + [42682] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3517), 1, + aux_sym_preproc_if_token2, + [42689] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3519), 1, + anon_sym_RPAREN, + [42696] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3086), 1, + anon_sym_LF, + [42703] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2157), 1, + anon_sym_SEMI, + [42710] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2151), 1, + anon_sym_SEMI, + [42717] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3521), 1, + ts_builtin_sym_end, + [42724] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3523), 1, + anon_sym_LF, + [42731] = 2, + ACTIONS(1635), 1, + anon_sym_LF, + ACTIONS(2397), 1, + sym_comment, + [42738] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3525), 1, + sym_identifier, + [42745] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3527), 1, + anon_sym_SEMI, + [42752] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3529), 1, + anon_sym_while, + [42759] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3531), 1, + anon_sym_SEMI, + [42766] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3533), 1, + anon_sym_LPAREN2, + [42773] = 2, + ACTIONS(2397), 1, + sym_comment, + ACTIONS(3082), 1, + anon_sym_LF, + [42780] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2113), 1, + anon_sym_SEMI, + [42787] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3535), 1, + anon_sym_COLON, + [42794] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2069), 1, + anon_sym_SEMI, + [42801] = 2, + ACTIONS(1645), 1, + anon_sym_LF, + ACTIONS(2397), 1, + sym_comment, + [42808] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3537), 1, + anon_sym_COLON, + [42815] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3539), 1, + anon_sym_while, + [42822] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3541), 1, + anon_sym_RPAREN, + [42829] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3543), 1, + anon_sym_SEMI, + [42836] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2081), 1, + anon_sym_SEMI, + [42843] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3545), 1, + anon_sym_LPAREN2, + [42850] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3547), 1, + anon_sym_SEMI, + [42857] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3549), 1, + anon_sym_LPAREN2, + [42864] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3551), 1, + anon_sym_LPAREN2, + [42871] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3553), 1, + anon_sym_COLON, + [42878] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3555), 1, + anon_sym_LPAREN2, + [42885] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3557), 1, + sym_identifier, + [42892] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3559), 1, + anon_sym_LPAREN2, +}; + +static const uint32_t ts_small_parse_table_map[] = { + [SMALL_STATE(382)] = 0, + [SMALL_STATE(383)] = 71, + [SMALL_STATE(384)] = 142, + [SMALL_STATE(385)] = 249, + [SMALL_STATE(386)] = 321, + [SMALL_STATE(387)] = 440, + [SMALL_STATE(388)] = 548, + [SMALL_STATE(389)] = 656, + [SMALL_STATE(390)] = 764, + [SMALL_STATE(391)] = 872, + [SMALL_STATE(392)] = 980, + [SMALL_STATE(393)] = 1088, + [SMALL_STATE(394)] = 1196, + [SMALL_STATE(395)] = 1304, + [SMALL_STATE(396)] = 1412, + [SMALL_STATE(397)] = 1520, + [SMALL_STATE(398)] = 1628, + [SMALL_STATE(399)] = 1736, + [SMALL_STATE(400)] = 1844, + [SMALL_STATE(401)] = 1952, + [SMALL_STATE(402)] = 2027, + [SMALL_STATE(403)] = 2102, + [SMALL_STATE(404)] = 2177, + [SMALL_STATE(405)] = 2254, + [SMALL_STATE(406)] = 2331, + [SMALL_STATE(407)] = 2406, + [SMALL_STATE(408)] = 2483, + [SMALL_STATE(409)] = 2560, + [SMALL_STATE(410)] = 2632, + [SMALL_STATE(411)] = 2732, + [SMALL_STATE(412)] = 2832, + [SMALL_STATE(413)] = 2929, + [SMALL_STATE(414)] = 3026, + [SMALL_STATE(415)] = 3124, + [SMALL_STATE(416)] = 3218, + [SMALL_STATE(417)] = 3316, + [SMALL_STATE(418)] = 3414, + [SMALL_STATE(419)] = 3512, + [SMALL_STATE(420)] = 3610, + [SMALL_STATE(421)] = 3708, + [SMALL_STATE(422)] = 3799, + [SMALL_STATE(423)] = 3890, + [SMALL_STATE(424)] = 3951, + [SMALL_STATE(425)] = 4042, + [SMALL_STATE(426)] = 4133, + [SMALL_STATE(427)] = 4224, + [SMALL_STATE(428)] = 4285, + [SMALL_STATE(429)] = 4376, + [SMALL_STATE(430)] = 4467, + [SMALL_STATE(431)] = 4558, + [SMALL_STATE(432)] = 4649, + [SMALL_STATE(433)] = 4740, + [SMALL_STATE(434)] = 4801, + [SMALL_STATE(435)] = 4904, + [SMALL_STATE(436)] = 4995, + [SMALL_STATE(437)] = 5050, + [SMALL_STATE(438)] = 5141, + [SMALL_STATE(439)] = 5232, + [SMALL_STATE(440)] = 5323, + [SMALL_STATE(441)] = 5378, + [SMALL_STATE(442)] = 5460, + [SMALL_STATE(443)] = 5542, + [SMALL_STATE(444)] = 5624, + [SMALL_STATE(445)] = 5706, + [SMALL_STATE(446)] = 5788, + [SMALL_STATE(447)] = 5870, + [SMALL_STATE(448)] = 5952, + [SMALL_STATE(449)] = 6034, + [SMALL_STATE(450)] = 6116, + [SMALL_STATE(451)] = 6198, + [SMALL_STATE(452)] = 6280, + [SMALL_STATE(453)] = 6362, + [SMALL_STATE(454)] = 6444, + [SMALL_STATE(455)] = 6526, + [SMALL_STATE(456)] = 6608, + [SMALL_STATE(457)] = 6690, + [SMALL_STATE(458)] = 6772, + [SMALL_STATE(459)] = 6854, + [SMALL_STATE(460)] = 6936, + [SMALL_STATE(461)] = 7018, + [SMALL_STATE(462)] = 7100, + [SMALL_STATE(463)] = 7182, + [SMALL_STATE(464)] = 7264, + [SMALL_STATE(465)] = 7346, + [SMALL_STATE(466)] = 7428, + [SMALL_STATE(467)] = 7510, + [SMALL_STATE(468)] = 7592, + [SMALL_STATE(469)] = 7674, + [SMALL_STATE(470)] = 7756, + [SMALL_STATE(471)] = 7838, + [SMALL_STATE(472)] = 7920, + [SMALL_STATE(473)] = 8002, + [SMALL_STATE(474)] = 8084, + [SMALL_STATE(475)] = 8166, + [SMALL_STATE(476)] = 8248, + [SMALL_STATE(477)] = 8330, + [SMALL_STATE(478)] = 8412, + [SMALL_STATE(479)] = 8494, + [SMALL_STATE(480)] = 8576, + [SMALL_STATE(481)] = 8658, + [SMALL_STATE(482)] = 8740, + [SMALL_STATE(483)] = 8822, + [SMALL_STATE(484)] = 8904, + [SMALL_STATE(485)] = 8986, + [SMALL_STATE(486)] = 9068, + [SMALL_STATE(487)] = 9150, + [SMALL_STATE(488)] = 9229, + [SMALL_STATE(489)] = 9280, + [SMALL_STATE(490)] = 9359, + [SMALL_STATE(491)] = 9438, + [SMALL_STATE(492)] = 9517, + [SMALL_STATE(493)] = 9596, + [SMALL_STATE(494)] = 9675, + [SMALL_STATE(495)] = 9754, + [SMALL_STATE(496)] = 9833, + [SMALL_STATE(497)] = 9912, + [SMALL_STATE(498)] = 9991, + [SMALL_STATE(499)] = 10070, + [SMALL_STATE(500)] = 10149, + [SMALL_STATE(501)] = 10228, + [SMALL_STATE(502)] = 10307, + [SMALL_STATE(503)] = 10386, + [SMALL_STATE(504)] = 10462, + [SMALL_STATE(505)] = 10538, + [SMALL_STATE(506)] = 10614, + [SMALL_STATE(507)] = 10674, + [SMALL_STATE(508)] = 10750, + [SMALL_STATE(509)] = 10826, + [SMALL_STATE(510)] = 10902, + [SMALL_STATE(511)] = 10978, + [SMALL_STATE(512)] = 11054, + [SMALL_STATE(513)] = 11130, + [SMALL_STATE(514)] = 11180, + [SMALL_STATE(515)] = 11256, + [SMALL_STATE(516)] = 11332, + [SMALL_STATE(517)] = 11382, + [SMALL_STATE(518)] = 11458, + [SMALL_STATE(519)] = 11534, + [SMALL_STATE(520)] = 11596, + [SMALL_STATE(521)] = 11672, + [SMALL_STATE(522)] = 11748, + [SMALL_STATE(523)] = 11806, + [SMALL_STATE(524)] = 11856, + [SMALL_STATE(525)] = 11916, + [SMALL_STATE(526)] = 11992, + [SMALL_STATE(527)] = 12068, + [SMALL_STATE(528)] = 12118, + [SMALL_STATE(529)] = 12194, + [SMALL_STATE(530)] = 12254, + [SMALL_STATE(531)] = 12330, + [SMALL_STATE(532)] = 12406, + [SMALL_STATE(533)] = 12482, + [SMALL_STATE(534)] = 12558, + [SMALL_STATE(535)] = 12634, + [SMALL_STATE(536)] = 12684, + [SMALL_STATE(537)] = 12760, + [SMALL_STATE(538)] = 12836, + [SMALL_STATE(539)] = 12912, + [SMALL_STATE(540)] = 12988, + [SMALL_STATE(541)] = 13064, + [SMALL_STATE(542)] = 13140, + [SMALL_STATE(543)] = 13216, + [SMALL_STATE(544)] = 13292, + [SMALL_STATE(545)] = 13368, + [SMALL_STATE(546)] = 13418, + [SMALL_STATE(547)] = 13468, + [SMALL_STATE(548)] = 13518, + [SMALL_STATE(549)] = 13594, + [SMALL_STATE(550)] = 13644, + [SMALL_STATE(551)] = 13720, + [SMALL_STATE(552)] = 13802, + [SMALL_STATE(553)] = 13878, + [SMALL_STATE(554)] = 13954, + [SMALL_STATE(555)] = 14030, + [SMALL_STATE(556)] = 14106, + [SMALL_STATE(557)] = 14182, + [SMALL_STATE(558)] = 14258, + [SMALL_STATE(559)] = 14334, + [SMALL_STATE(560)] = 14410, + [SMALL_STATE(561)] = 14486, + [SMALL_STATE(562)] = 14562, + [SMALL_STATE(563)] = 14638, + [SMALL_STATE(564)] = 14714, + [SMALL_STATE(565)] = 14790, + [SMALL_STATE(566)] = 14866, + [SMALL_STATE(567)] = 14942, + [SMALL_STATE(568)] = 15018, + [SMALL_STATE(569)] = 15094, + [SMALL_STATE(570)] = 15170, + [SMALL_STATE(571)] = 15220, + [SMALL_STATE(572)] = 15296, + [SMALL_STATE(573)] = 15372, + [SMALL_STATE(574)] = 15448, + [SMALL_STATE(575)] = 15524, + [SMALL_STATE(576)] = 15600, + [SMALL_STATE(577)] = 15676, + [SMALL_STATE(578)] = 15752, + [SMALL_STATE(579)] = 15828, + [SMALL_STATE(580)] = 15904, + [SMALL_STATE(581)] = 15954, + [SMALL_STATE(582)] = 16004, + [SMALL_STATE(583)] = 16064, + [SMALL_STATE(584)] = 16148, + [SMALL_STATE(585)] = 16224, + [SMALL_STATE(586)] = 16274, + [SMALL_STATE(587)] = 16324, + [SMALL_STATE(588)] = 16400, + [SMALL_STATE(589)] = 16476, + [SMALL_STATE(590)] = 16552, + [SMALL_STATE(591)] = 16628, + [SMALL_STATE(592)] = 16704, + [SMALL_STATE(593)] = 16780, + [SMALL_STATE(594)] = 16856, + [SMALL_STATE(595)] = 16920, + [SMALL_STATE(596)] = 16986, + [SMALL_STATE(597)] = 17056, + [SMALL_STATE(598)] = 17128, + [SMALL_STATE(599)] = 17202, + [SMALL_STATE(600)] = 17278, + [SMALL_STATE(601)] = 17356, + [SMALL_STATE(602)] = 17436, + [SMALL_STATE(603)] = 17512, + [SMALL_STATE(604)] = 17588, + [SMALL_STATE(605)] = 17650, + [SMALL_STATE(606)] = 17700, + [SMALL_STATE(607)] = 17766, + [SMALL_STATE(608)] = 17842, + [SMALL_STATE(609)] = 17918, + [SMALL_STATE(610)] = 17971, + [SMALL_STATE(611)] = 18053, + [SMALL_STATE(612)] = 18100, + [SMALL_STATE(613)] = 18153, + [SMALL_STATE(614)] = 18200, + [SMALL_STATE(615)] = 18247, + [SMALL_STATE(616)] = 18300, + [SMALL_STATE(617)] = 18353, + [SMALL_STATE(618)] = 18406, + [SMALL_STATE(619)] = 18485, + [SMALL_STATE(620)] = 18555, + [SMALL_STATE(621)] = 18635, + [SMALL_STATE(622)] = 18691, + [SMALL_STATE(623)] = 18745, + [SMALL_STATE(624)] = 18821, + [SMALL_STATE(625)] = 18895, + [SMALL_STATE(626)] = 18957, + [SMALL_STATE(627)] = 19029, + [SMALL_STATE(628)] = 19085, + [SMALL_STATE(629)] = 19153, + [SMALL_STATE(630)] = 19219, + [SMALL_STATE(631)] = 19275, + [SMALL_STATE(632)] = 19337, + [SMALL_STATE(633)] = 19397, + [SMALL_STATE(634)] = 19455, + [SMALL_STATE(635)] = 19533, + [SMALL_STATE(636)] = 19589, + [SMALL_STATE(637)] = 19634, + [SMALL_STATE(638)] = 19683, + [SMALL_STATE(639)] = 19728, + [SMALL_STATE(640)] = 19773, + [SMALL_STATE(641)] = 19829, + [SMALL_STATE(642)] = 19901, + [SMALL_STATE(643)] = 19973, + [SMALL_STATE(644)] = 20045, + [SMALL_STATE(645)] = 20117, + [SMALL_STATE(646)] = 20186, + [SMALL_STATE(647)] = 20260, + [SMALL_STATE(648)] = 20304, + [SMALL_STATE(649)] = 20365, + [SMALL_STATE(650)] = 20436, + [SMALL_STATE(651)] = 20509, + [SMALL_STATE(652)] = 20564, + [SMALL_STATE(653)] = 20621, + [SMALL_STATE(654)] = 20684, + [SMALL_STATE(655)] = 20749, + [SMALL_STATE(656)] = 20816, + [SMALL_STATE(657)] = 20883, + [SMALL_STATE(658)] = 20952, + [SMALL_STATE(659)] = 21005, + [SMALL_STATE(660)] = 21062, + [SMALL_STATE(661)] = 21101, + [SMALL_STATE(662)] = 21139, + [SMALL_STATE(663)] = 21177, + [SMALL_STATE(664)] = 21214, + [SMALL_STATE(665)] = 21289, + [SMALL_STATE(666)] = 21326, + [SMALL_STATE(667)] = 21363, + [SMALL_STATE(668)] = 21400, + [SMALL_STATE(669)] = 21437, + [SMALL_STATE(670)] = 21474, + [SMALL_STATE(671)] = 21511, + [SMALL_STATE(672)] = 21548, + [SMALL_STATE(673)] = 21585, + [SMALL_STATE(674)] = 21622, + [SMALL_STATE(675)] = 21659, + [SMALL_STATE(676)] = 21696, + [SMALL_STATE(677)] = 21733, + [SMALL_STATE(678)] = 21770, + [SMALL_STATE(679)] = 21845, + [SMALL_STATE(680)] = 21882, + [SMALL_STATE(681)] = 21919, + [SMALL_STATE(682)] = 21956, + [SMALL_STATE(683)] = 21993, + [SMALL_STATE(684)] = 22030, + [SMALL_STATE(685)] = 22067, + [SMALL_STATE(686)] = 22104, + [SMALL_STATE(687)] = 22141, + [SMALL_STATE(688)] = 22178, + [SMALL_STATE(689)] = 22215, + [SMALL_STATE(690)] = 22288, + [SMALL_STATE(691)] = 22363, + [SMALL_STATE(692)] = 22435, + [SMALL_STATE(693)] = 22471, + [SMALL_STATE(694)] = 22543, + [SMALL_STATE(695)] = 22615, + [SMALL_STATE(696)] = 22687, + [SMALL_STATE(697)] = 22759, + [SMALL_STATE(698)] = 22831, + [SMALL_STATE(699)] = 22903, + [SMALL_STATE(700)] = 22975, + [SMALL_STATE(701)] = 23047, + [SMALL_STATE(702)] = 23119, + [SMALL_STATE(703)] = 23191, + [SMALL_STATE(704)] = 23263, + [SMALL_STATE(705)] = 23335, + [SMALL_STATE(706)] = 23407, + [SMALL_STATE(707)] = 23477, + [SMALL_STATE(708)] = 23525, + [SMALL_STATE(709)] = 23597, + [SMALL_STATE(710)] = 23669, + [SMALL_STATE(711)] = 23741, + [SMALL_STATE(712)] = 23813, + [SMALL_STATE(713)] = 23861, + [SMALL_STATE(714)] = 23933, + [SMALL_STATE(715)] = 24005, + [SMALL_STATE(716)] = 24077, + [SMALL_STATE(717)] = 24149, + [SMALL_STATE(718)] = 24221, + [SMALL_STATE(719)] = 24293, + [SMALL_STATE(720)] = 24365, + [SMALL_STATE(721)] = 24437, + [SMALL_STATE(722)] = 24509, + [SMALL_STATE(723)] = 24581, + [SMALL_STATE(724)] = 24651, + [SMALL_STATE(725)] = 24723, + [SMALL_STATE(726)] = 24795, + [SMALL_STATE(727)] = 24867, + [SMALL_STATE(728)] = 24939, + [SMALL_STATE(729)] = 25009, + [SMALL_STATE(730)] = 25081, + [SMALL_STATE(731)] = 25117, + [SMALL_STATE(732)] = 25189, + [SMALL_STATE(733)] = 25261, + [SMALL_STATE(734)] = 25333, + [SMALL_STATE(735)] = 25405, + [SMALL_STATE(736)] = 25477, + [SMALL_STATE(737)] = 25549, + [SMALL_STATE(738)] = 25621, + [SMALL_STATE(739)] = 25693, + [SMALL_STATE(740)] = 25765, + [SMALL_STATE(741)] = 25837, + [SMALL_STATE(742)] = 25909, + [SMALL_STATE(743)] = 25979, + [SMALL_STATE(744)] = 26027, + [SMALL_STATE(745)] = 26099, + [SMALL_STATE(746)] = 26171, + [SMALL_STATE(747)] = 26243, + [SMALL_STATE(748)] = 26315, + [SMALL_STATE(749)] = 26387, + [SMALL_STATE(750)] = 26459, + [SMALL_STATE(751)] = 26507, + [SMALL_STATE(752)] = 26577, + [SMALL_STATE(753)] = 26646, + [SMALL_STATE(754)] = 26715, + [SMALL_STATE(755)] = 26768, + [SMALL_STATE(756)] = 26837, + [SMALL_STATE(757)] = 26906, + [SMALL_STATE(758)] = 26975, + [SMALL_STATE(759)] = 27018, + [SMALL_STATE(760)] = 27087, + [SMALL_STATE(761)] = 27156, + [SMALL_STATE(762)] = 27191, + [SMALL_STATE(763)] = 27260, + [SMALL_STATE(764)] = 27299, + [SMALL_STATE(765)] = 27334, + [SMALL_STATE(766)] = 27369, + [SMALL_STATE(767)] = 27404, + [SMALL_STATE(768)] = 27439, + [SMALL_STATE(769)] = 27474, + [SMALL_STATE(770)] = 27509, + [SMALL_STATE(771)] = 27544, + [SMALL_STATE(772)] = 27613, + [SMALL_STATE(773)] = 27648, + [SMALL_STATE(774)] = 27683, + [SMALL_STATE(775)] = 27718, + [SMALL_STATE(776)] = 27753, + [SMALL_STATE(777)] = 27788, + [SMALL_STATE(778)] = 27857, + [SMALL_STATE(779)] = 27892, + [SMALL_STATE(780)] = 27927, + [SMALL_STATE(781)] = 27996, + [SMALL_STATE(782)] = 28065, + [SMALL_STATE(783)] = 28100, + [SMALL_STATE(784)] = 28169, + [SMALL_STATE(785)] = 28208, + [SMALL_STATE(786)] = 28243, + [SMALL_STATE(787)] = 28278, + [SMALL_STATE(788)] = 28317, + [SMALL_STATE(789)] = 28386, + [SMALL_STATE(790)] = 28421, + [SMALL_STATE(791)] = 28456, + [SMALL_STATE(792)] = 28491, + [SMALL_STATE(793)] = 28526, + [SMALL_STATE(794)] = 28561, + [SMALL_STATE(795)] = 28596, + [SMALL_STATE(796)] = 28631, + [SMALL_STATE(797)] = 28700, + [SMALL_STATE(798)] = 28735, + [SMALL_STATE(799)] = 28802, + [SMALL_STATE(800)] = 28837, + [SMALL_STATE(801)] = 28872, + [SMALL_STATE(802)] = 28921, + [SMALL_STATE(803)] = 28986, + [SMALL_STATE(804)] = 29055, + [SMALL_STATE(805)] = 29124, + [SMALL_STATE(806)] = 29187, + [SMALL_STATE(807)] = 29250, + [SMALL_STATE(808)] = 29311, + [SMALL_STATE(809)] = 29370, + [SMALL_STATE(810)] = 29405, + [SMALL_STATE(811)] = 29462, + [SMALL_STATE(812)] = 29497, + [SMALL_STATE(813)] = 29566, + [SMALL_STATE(814)] = 29601, + [SMALL_STATE(815)] = 29636, + [SMALL_STATE(816)] = 29675, + [SMALL_STATE(817)] = 29710, + [SMALL_STATE(818)] = 29745, + [SMALL_STATE(819)] = 29784, + [SMALL_STATE(820)] = 29819, + [SMALL_STATE(821)] = 29872, + [SMALL_STATE(822)] = 29907, + [SMALL_STATE(823)] = 29942, + [SMALL_STATE(824)] = 29977, + [SMALL_STATE(825)] = 30046, + [SMALL_STATE(826)] = 30097, + [SMALL_STATE(827)] = 30166, + [SMALL_STATE(828)] = 30235, + [SMALL_STATE(829)] = 30304, + [SMALL_STATE(830)] = 30339, + [SMALL_STATE(831)] = 30374, + [SMALL_STATE(832)] = 30432, + [SMALL_STATE(833)] = 30487, + [SMALL_STATE(834)] = 30542, + [SMALL_STATE(835)] = 30597, + [SMALL_STATE(836)] = 30652, + [SMALL_STATE(837)] = 30707, + [SMALL_STATE(838)] = 30762, + [SMALL_STATE(839)] = 30817, + [SMALL_STATE(840)] = 30872, + [SMALL_STATE(841)] = 30927, + [SMALL_STATE(842)] = 30982, + [SMALL_STATE(843)] = 31037, + [SMALL_STATE(844)] = 31092, + [SMALL_STATE(845)] = 31138, + [SMALL_STATE(846)] = 31184, + [SMALL_STATE(847)] = 31230, + [SMALL_STATE(848)] = 31276, + [SMALL_STATE(849)] = 31311, + [SMALL_STATE(850)] = 31346, + [SMALL_STATE(851)] = 31381, + [SMALL_STATE(852)] = 31416, + [SMALL_STATE(853)] = 31467, + [SMALL_STATE(854)] = 31502, + [SMALL_STATE(855)] = 31550, + [SMALL_STATE(856)] = 31598, + [SMALL_STATE(857)] = 31646, + [SMALL_STATE(858)] = 31694, + [SMALL_STATE(859)] = 31742, + [SMALL_STATE(860)] = 31790, + [SMALL_STATE(861)] = 31838, + [SMALL_STATE(862)] = 31886, + [SMALL_STATE(863)] = 31934, + [SMALL_STATE(864)] = 31968, + [SMALL_STATE(865)] = 31997, + [SMALL_STATE(866)] = 32026, + [SMALL_STATE(867)] = 32055, + [SMALL_STATE(868)] = 32110, + [SMALL_STATE(869)] = 32139, + [SMALL_STATE(870)] = 32168, + [SMALL_STATE(871)] = 32197, + [SMALL_STATE(872)] = 32226, + [SMALL_STATE(873)] = 32281, + [SMALL_STATE(874)] = 32310, + [SMALL_STATE(875)] = 32339, + [SMALL_STATE(876)] = 32368, + [SMALL_STATE(877)] = 32411, + [SMALL_STATE(878)] = 32444, + [SMALL_STATE(879)] = 32473, + [SMALL_STATE(880)] = 32502, + [SMALL_STATE(881)] = 32533, + [SMALL_STATE(882)] = 32562, + [SMALL_STATE(883)] = 32595, + [SMALL_STATE(884)] = 32624, + [SMALL_STATE(885)] = 32653, + [SMALL_STATE(886)] = 32682, + [SMALL_STATE(887)] = 32711, + [SMALL_STATE(888)] = 32740, + [SMALL_STATE(889)] = 32783, + [SMALL_STATE(890)] = 32812, + [SMALL_STATE(891)] = 32841, + [SMALL_STATE(892)] = 32870, + [SMALL_STATE(893)] = 32904, + [SMALL_STATE(894)] = 32932, + [SMALL_STATE(895)] = 32972, + [SMALL_STATE(896)] = 33000, + [SMALL_STATE(897)] = 33048, + [SMALL_STATE(898)] = 33094, + [SMALL_STATE(899)] = 33140, + [SMALL_STATE(900)] = 33184, + [SMALL_STATE(901)] = 33226, + [SMALL_STATE(902)] = 33266, + [SMALL_STATE(903)] = 33306, + [SMALL_STATE(904)] = 33334, + [SMALL_STATE(905)] = 33370, + [SMALL_STATE(906)] = 33410, + [SMALL_STATE(907)] = 33438, + [SMALL_STATE(908)] = 33478, + [SMALL_STATE(909)] = 33506, + [SMALL_STATE(910)] = 33546, + [SMALL_STATE(911)] = 33586, + [SMALL_STATE(912)] = 33626, + [SMALL_STATE(913)] = 33666, + [SMALL_STATE(914)] = 33706, + [SMALL_STATE(915)] = 33756, + [SMALL_STATE(916)] = 33796, + [SMALL_STATE(917)] = 33836, + [SMALL_STATE(918)] = 33876, + [SMALL_STATE(919)] = 33916, + [SMALL_STATE(920)] = 33956, + [SMALL_STATE(921)] = 33996, + [SMALL_STATE(922)] = 34024, + [SMALL_STATE(923)] = 34052, + [SMALL_STATE(924)] = 34092, + [SMALL_STATE(925)] = 34132, + [SMALL_STATE(926)] = 34172, + [SMALL_STATE(927)] = 34204, + [SMALL_STATE(928)] = 34244, + [SMALL_STATE(929)] = 34284, + [SMALL_STATE(930)] = 34312, + [SMALL_STATE(931)] = 34352, + [SMALL_STATE(932)] = 34392, + [SMALL_STATE(933)] = 34432, + [SMALL_STATE(934)] = 34472, + [SMALL_STATE(935)] = 34500, + [SMALL_STATE(936)] = 34540, + [SMALL_STATE(937)] = 34580, + [SMALL_STATE(938)] = 34620, + [SMALL_STATE(939)] = 34648, + [SMALL_STATE(940)] = 34688, + [SMALL_STATE(941)] = 34728, + [SMALL_STATE(942)] = 34768, + [SMALL_STATE(943)] = 34808, + [SMALL_STATE(944)] = 34848, + [SMALL_STATE(945)] = 34888, + [SMALL_STATE(946)] = 34928, + [SMALL_STATE(947)] = 34976, + [SMALL_STATE(948)] = 35009, + [SMALL_STATE(949)] = 35052, + [SMALL_STATE(950)] = 35079, + [SMALL_STATE(951)] = 35124, + [SMALL_STATE(952)] = 35169, + [SMALL_STATE(953)] = 35196, + [SMALL_STATE(954)] = 35223, + [SMALL_STATE(955)] = 35268, + [SMALL_STATE(956)] = 35313, + [SMALL_STATE(957)] = 35358, + [SMALL_STATE(958)] = 35385, + [SMALL_STATE(959)] = 35412, + [SMALL_STATE(960)] = 35439, + [SMALL_STATE(961)] = 35470, + [SMALL_STATE(962)] = 35519, + [SMALL_STATE(963)] = 35546, + [SMALL_STATE(964)] = 35591, + [SMALL_STATE(965)] = 35640, + [SMALL_STATE(966)] = 35685, + [SMALL_STATE(967)] = 35730, + [SMALL_STATE(968)] = 35775, + [SMALL_STATE(969)] = 35802, + [SMALL_STATE(970)] = 35835, + [SMALL_STATE(971)] = 35870, + [SMALL_STATE(972)] = 35907, + [SMALL_STATE(973)] = 35934, + [SMALL_STATE(974)] = 35973, + [SMALL_STATE(975)] = 36002, + [SMALL_STATE(976)] = 36029, + [SMALL_STATE(977)] = 36070, + [SMALL_STATE(978)] = 36115, + [SMALL_STATE(979)] = 36154, + [SMALL_STATE(980)] = 36193, + [SMALL_STATE(981)] = 36232, + [SMALL_STATE(982)] = 36271, + [SMALL_STATE(983)] = 36310, + [SMALL_STATE(984)] = 36349, + [SMALL_STATE(985)] = 36388, + [SMALL_STATE(986)] = 36427, + [SMALL_STATE(987)] = 36466, + [SMALL_STATE(988)] = 36504, + [SMALL_STATE(989)] = 36542, + [SMALL_STATE(990)] = 36580, + [SMALL_STATE(991)] = 36618, + [SMALL_STATE(992)] = 36656, + [SMALL_STATE(993)] = 36688, + [SMALL_STATE(994)] = 36726, + [SMALL_STATE(995)] = 36757, + [SMALL_STATE(996)] = 36795, + [SMALL_STATE(997)] = 36833, + [SMALL_STATE(998)] = 36871, + [SMALL_STATE(999)] = 36892, + [SMALL_STATE(1000)] = 36913, + [SMALL_STATE(1001)] = 36951, + [SMALL_STATE(1002)] = 36989, + [SMALL_STATE(1003)] = 37027, + [SMALL_STATE(1004)] = 37059, + [SMALL_STATE(1005)] = 37091, + [SMALL_STATE(1006)] = 37123, + [SMALL_STATE(1007)] = 37155, + [SMALL_STATE(1008)] = 37187, + [SMALL_STATE(1009)] = 37219, + [SMALL_STATE(1010)] = 37257, + [SMALL_STATE(1011)] = 37289, + [SMALL_STATE(1012)] = 37321, + [SMALL_STATE(1013)] = 37353, + [SMALL_STATE(1014)] = 37376, + [SMALL_STATE(1015)] = 37405, + [SMALL_STATE(1016)] = 37432, + [SMALL_STATE(1017)] = 37467, + [SMALL_STATE(1018)] = 37494, + [SMALL_STATE(1019)] = 37523, + [SMALL_STATE(1020)] = 37552, + [SMALL_STATE(1021)] = 37579, + [SMALL_STATE(1022)] = 37608, + [SMALL_STATE(1023)] = 37637, + [SMALL_STATE(1024)] = 37666, + [SMALL_STATE(1025)] = 37695, + [SMALL_STATE(1026)] = 37718, + [SMALL_STATE(1027)] = 37747, + [SMALL_STATE(1028)] = 37776, + [SMALL_STATE(1029)] = 37811, + [SMALL_STATE(1030)] = 37840, + [SMALL_STATE(1031)] = 37863, + [SMALL_STATE(1032)] = 37892, + [SMALL_STATE(1033)] = 37915, + [SMALL_STATE(1034)] = 37944, + [SMALL_STATE(1035)] = 37973, + [SMALL_STATE(1036)] = 38002, + [SMALL_STATE(1037)] = 38031, + [SMALL_STATE(1038)] = 38060, + [SMALL_STATE(1039)] = 38089, + [SMALL_STATE(1040)] = 38116, + [SMALL_STATE(1041)] = 38151, + [SMALL_STATE(1042)] = 38183, + [SMALL_STATE(1043)] = 38215, + [SMALL_STATE(1044)] = 38237, + [SMALL_STATE(1045)] = 38263, + [SMALL_STATE(1046)] = 38295, + [SMALL_STATE(1047)] = 38327, + [SMALL_STATE(1048)] = 38353, + [SMALL_STATE(1049)] = 38379, + [SMALL_STATE(1050)] = 38397, + [SMALL_STATE(1051)] = 38415, + [SMALL_STATE(1052)] = 38433, + [SMALL_STATE(1053)] = 38459, + [SMALL_STATE(1054)] = 38486, + [SMALL_STATE(1055)] = 38515, + [SMALL_STATE(1056)] = 38544, + [SMALL_STATE(1057)] = 38565, + [SMALL_STATE(1058)] = 38594, + [SMALL_STATE(1059)] = 38623, + [SMALL_STATE(1060)] = 38648, + [SMALL_STATE(1061)] = 38677, + [SMALL_STATE(1062)] = 38702, + [SMALL_STATE(1063)] = 38723, + [SMALL_STATE(1064)] = 38744, + [SMALL_STATE(1065)] = 38765, + [SMALL_STATE(1066)] = 38794, + [SMALL_STATE(1067)] = 38823, + [SMALL_STATE(1068)] = 38848, + [SMALL_STATE(1069)] = 38877, + [SMALL_STATE(1070)] = 38902, + [SMALL_STATE(1071)] = 38927, + [SMALL_STATE(1072)] = 38948, + [SMALL_STATE(1073)] = 38972, + [SMALL_STATE(1074)] = 38988, + [SMALL_STATE(1075)] = 39014, + [SMALL_STATE(1076)] = 39030, + [SMALL_STATE(1077)] = 39056, + [SMALL_STATE(1078)] = 39072, + [SMALL_STATE(1079)] = 39088, + [SMALL_STATE(1080)] = 39108, + [SMALL_STATE(1081)] = 39134, + [SMALL_STATE(1082)] = 39160, + [SMALL_STATE(1083)] = 39184, + [SMALL_STATE(1084)] = 39200, + [SMALL_STATE(1085)] = 39216, + [SMALL_STATE(1086)] = 39231, + [SMALL_STATE(1087)] = 39246, + [SMALL_STATE(1088)] = 39261, + [SMALL_STATE(1089)] = 39284, + [SMALL_STATE(1090)] = 39299, + [SMALL_STATE(1091)] = 39322, + [SMALL_STATE(1092)] = 39337, + [SMALL_STATE(1093)] = 39352, + [SMALL_STATE(1094)] = 39367, + [SMALL_STATE(1095)] = 39382, + [SMALL_STATE(1096)] = 39405, + [SMALL_STATE(1097)] = 39419, + [SMALL_STATE(1098)] = 39433, + [SMALL_STATE(1099)] = 39447, + [SMALL_STATE(1100)] = 39465, + [SMALL_STATE(1101)] = 39479, + [SMALL_STATE(1102)] = 39493, + [SMALL_STATE(1103)] = 39507, + [SMALL_STATE(1104)] = 39521, + [SMALL_STATE(1105)] = 39535, + [SMALL_STATE(1106)] = 39553, + [SMALL_STATE(1107)] = 39572, + [SMALL_STATE(1108)] = 39589, + [SMALL_STATE(1109)] = 39606, + [SMALL_STATE(1110)] = 39625, + [SMALL_STATE(1111)] = 39642, + [SMALL_STATE(1112)] = 39661, + [SMALL_STATE(1113)] = 39680, + [SMALL_STATE(1114)] = 39697, + [SMALL_STATE(1115)] = 39716, + [SMALL_STATE(1116)] = 39732, + [SMALL_STATE(1117)] = 39742, + [SMALL_STATE(1118)] = 39758, + [SMALL_STATE(1119)] = 39774, + [SMALL_STATE(1120)] = 39784, + [SMALL_STATE(1121)] = 39794, + [SMALL_STATE(1122)] = 39804, + [SMALL_STATE(1123)] = 39820, + [SMALL_STATE(1124)] = 39836, + [SMALL_STATE(1125)] = 39846, + [SMALL_STATE(1126)] = 39860, + [SMALL_STATE(1127)] = 39876, + [SMALL_STATE(1128)] = 39892, + [SMALL_STATE(1129)] = 39902, + [SMALL_STATE(1130)] = 39918, + [SMALL_STATE(1131)] = 39934, + [SMALL_STATE(1132)] = 39944, + [SMALL_STATE(1133)] = 39960, + [SMALL_STATE(1134)] = 39976, + [SMALL_STATE(1135)] = 39986, + [SMALL_STATE(1136)] = 40002, + [SMALL_STATE(1137)] = 40016, + [SMALL_STATE(1138)] = 40032, + [SMALL_STATE(1139)] = 40042, + [SMALL_STATE(1140)] = 40058, + [SMALL_STATE(1141)] = 40074, + [SMALL_STATE(1142)] = 40084, + [SMALL_STATE(1143)] = 40094, + [SMALL_STATE(1144)] = 40110, + [SMALL_STATE(1145)] = 40126, + [SMALL_STATE(1146)] = 40142, + [SMALL_STATE(1147)] = 40158, + [SMALL_STATE(1148)] = 40168, + [SMALL_STATE(1149)] = 40184, + [SMALL_STATE(1150)] = 40197, + [SMALL_STATE(1151)] = 40210, + [SMALL_STATE(1152)] = 40223, + [SMALL_STATE(1153)] = 40236, + [SMALL_STATE(1154)] = 40249, + [SMALL_STATE(1155)] = 40262, + [SMALL_STATE(1156)] = 40275, + [SMALL_STATE(1157)] = 40288, + [SMALL_STATE(1158)] = 40301, + [SMALL_STATE(1159)] = 40314, + [SMALL_STATE(1160)] = 40327, + [SMALL_STATE(1161)] = 40340, + [SMALL_STATE(1162)] = 40353, + [SMALL_STATE(1163)] = 40366, + [SMALL_STATE(1164)] = 40379, + [SMALL_STATE(1165)] = 40392, + [SMALL_STATE(1166)] = 40405, + [SMALL_STATE(1167)] = 40418, + [SMALL_STATE(1168)] = 40431, + [SMALL_STATE(1169)] = 40444, + [SMALL_STATE(1170)] = 40457, + [SMALL_STATE(1171)] = 40470, + [SMALL_STATE(1172)] = 40483, + [SMALL_STATE(1173)] = 40496, + [SMALL_STATE(1174)] = 40509, + [SMALL_STATE(1175)] = 40522, + [SMALL_STATE(1176)] = 40535, + [SMALL_STATE(1177)] = 40548, + [SMALL_STATE(1178)] = 40561, + [SMALL_STATE(1179)] = 40574, + [SMALL_STATE(1180)] = 40587, + [SMALL_STATE(1181)] = 40600, + [SMALL_STATE(1182)] = 40613, + [SMALL_STATE(1183)] = 40626, + [SMALL_STATE(1184)] = 40639, + [SMALL_STATE(1185)] = 40652, + [SMALL_STATE(1186)] = 40661, + [SMALL_STATE(1187)] = 40674, + [SMALL_STATE(1188)] = 40687, + [SMALL_STATE(1189)] = 40700, + [SMALL_STATE(1190)] = 40713, + [SMALL_STATE(1191)] = 40724, + [SMALL_STATE(1192)] = 40737, + [SMALL_STATE(1193)] = 40750, + [SMALL_STATE(1194)] = 40763, + [SMALL_STATE(1195)] = 40776, + [SMALL_STATE(1196)] = 40789, + [SMALL_STATE(1197)] = 40802, + [SMALL_STATE(1198)] = 40815, + [SMALL_STATE(1199)] = 40828, + [SMALL_STATE(1200)] = 40841, + [SMALL_STATE(1201)] = 40852, + [SMALL_STATE(1202)] = 40865, + [SMALL_STATE(1203)] = 40878, + [SMALL_STATE(1204)] = 40891, + [SMALL_STATE(1205)] = 40904, + [SMALL_STATE(1206)] = 40917, + [SMALL_STATE(1207)] = 40930, + [SMALL_STATE(1208)] = 40939, + [SMALL_STATE(1209)] = 40952, + [SMALL_STATE(1210)] = 40960, + [SMALL_STATE(1211)] = 40970, + [SMALL_STATE(1212)] = 40978, + [SMALL_STATE(1213)] = 40988, + [SMALL_STATE(1214)] = 40996, + [SMALL_STATE(1215)] = 41006, + [SMALL_STATE(1216)] = 41016, + [SMALL_STATE(1217)] = 41026, + [SMALL_STATE(1218)] = 41034, + [SMALL_STATE(1219)] = 41044, + [SMALL_STATE(1220)] = 41054, + [SMALL_STATE(1221)] = 41062, + [SMALL_STATE(1222)] = 41072, + [SMALL_STATE(1223)] = 41080, + [SMALL_STATE(1224)] = 41090, + [SMALL_STATE(1225)] = 41098, + [SMALL_STATE(1226)] = 41108, + [SMALL_STATE(1227)] = 41118, + [SMALL_STATE(1228)] = 41128, + [SMALL_STATE(1229)] = 41136, + [SMALL_STATE(1230)] = 41144, + [SMALL_STATE(1231)] = 41154, + [SMALL_STATE(1232)] = 41164, + [SMALL_STATE(1233)] = 41172, + [SMALL_STATE(1234)] = 41180, + [SMALL_STATE(1235)] = 41190, + [SMALL_STATE(1236)] = 41198, + [SMALL_STATE(1237)] = 41206, + [SMALL_STATE(1238)] = 41214, + [SMALL_STATE(1239)] = 41224, + [SMALL_STATE(1240)] = 41232, + [SMALL_STATE(1241)] = 41242, + [SMALL_STATE(1242)] = 41250, + [SMALL_STATE(1243)] = 41260, + [SMALL_STATE(1244)] = 41270, + [SMALL_STATE(1245)] = 41280, + [SMALL_STATE(1246)] = 41290, + [SMALL_STATE(1247)] = 41300, + [SMALL_STATE(1248)] = 41310, + [SMALL_STATE(1249)] = 41320, + [SMALL_STATE(1250)] = 41330, + [SMALL_STATE(1251)] = 41340, + [SMALL_STATE(1252)] = 41350, + [SMALL_STATE(1253)] = 41360, + [SMALL_STATE(1254)] = 41370, + [SMALL_STATE(1255)] = 41380, + [SMALL_STATE(1256)] = 41390, + [SMALL_STATE(1257)] = 41400, + [SMALL_STATE(1258)] = 41408, + [SMALL_STATE(1259)] = 41418, + [SMALL_STATE(1260)] = 41428, + [SMALL_STATE(1261)] = 41436, + [SMALL_STATE(1262)] = 41446, + [SMALL_STATE(1263)] = 41456, + [SMALL_STATE(1264)] = 41464, + [SMALL_STATE(1265)] = 41474, + [SMALL_STATE(1266)] = 41484, + [SMALL_STATE(1267)] = 41494, + [SMALL_STATE(1268)] = 41504, + [SMALL_STATE(1269)] = 41514, + [SMALL_STATE(1270)] = 41524, + [SMALL_STATE(1271)] = 41534, + [SMALL_STATE(1272)] = 41541, + [SMALL_STATE(1273)] = 41548, + [SMALL_STATE(1274)] = 41555, + [SMALL_STATE(1275)] = 41562, + [SMALL_STATE(1276)] = 41569, + [SMALL_STATE(1277)] = 41576, + [SMALL_STATE(1278)] = 41583, + [SMALL_STATE(1279)] = 41590, + [SMALL_STATE(1280)] = 41597, + [SMALL_STATE(1281)] = 41604, + [SMALL_STATE(1282)] = 41611, + [SMALL_STATE(1283)] = 41618, + [SMALL_STATE(1284)] = 41625, + [SMALL_STATE(1285)] = 41632, + [SMALL_STATE(1286)] = 41639, + [SMALL_STATE(1287)] = 41646, + [SMALL_STATE(1288)] = 41653, + [SMALL_STATE(1289)] = 41660, + [SMALL_STATE(1290)] = 41667, + [SMALL_STATE(1291)] = 41674, + [SMALL_STATE(1292)] = 41681, + [SMALL_STATE(1293)] = 41688, + [SMALL_STATE(1294)] = 41695, + [SMALL_STATE(1295)] = 41702, + [SMALL_STATE(1296)] = 41709, + [SMALL_STATE(1297)] = 41716, + [SMALL_STATE(1298)] = 41723, + [SMALL_STATE(1299)] = 41730, + [SMALL_STATE(1300)] = 41737, + [SMALL_STATE(1301)] = 41744, + [SMALL_STATE(1302)] = 41751, + [SMALL_STATE(1303)] = 41758, + [SMALL_STATE(1304)] = 41765, + [SMALL_STATE(1305)] = 41772, + [SMALL_STATE(1306)] = 41779, + [SMALL_STATE(1307)] = 41786, + [SMALL_STATE(1308)] = 41793, + [SMALL_STATE(1309)] = 41800, + [SMALL_STATE(1310)] = 41807, + [SMALL_STATE(1311)] = 41814, + [SMALL_STATE(1312)] = 41821, + [SMALL_STATE(1313)] = 41828, + [SMALL_STATE(1314)] = 41835, + [SMALL_STATE(1315)] = 41842, + [SMALL_STATE(1316)] = 41849, + [SMALL_STATE(1317)] = 41856, + [SMALL_STATE(1318)] = 41863, + [SMALL_STATE(1319)] = 41870, + [SMALL_STATE(1320)] = 41877, + [SMALL_STATE(1321)] = 41884, + [SMALL_STATE(1322)] = 41891, + [SMALL_STATE(1323)] = 41898, + [SMALL_STATE(1324)] = 41905, + [SMALL_STATE(1325)] = 41912, + [SMALL_STATE(1326)] = 41919, + [SMALL_STATE(1327)] = 41926, + [SMALL_STATE(1328)] = 41933, + [SMALL_STATE(1329)] = 41940, + [SMALL_STATE(1330)] = 41947, + [SMALL_STATE(1331)] = 41954, + [SMALL_STATE(1332)] = 41961, + [SMALL_STATE(1333)] = 41968, + [SMALL_STATE(1334)] = 41975, + [SMALL_STATE(1335)] = 41982, + [SMALL_STATE(1336)] = 41989, + [SMALL_STATE(1337)] = 41996, + [SMALL_STATE(1338)] = 42003, + [SMALL_STATE(1339)] = 42010, + [SMALL_STATE(1340)] = 42017, + [SMALL_STATE(1341)] = 42024, + [SMALL_STATE(1342)] = 42031, + [SMALL_STATE(1343)] = 42038, + [SMALL_STATE(1344)] = 42045, + [SMALL_STATE(1345)] = 42052, + [SMALL_STATE(1346)] = 42059, + [SMALL_STATE(1347)] = 42066, + [SMALL_STATE(1348)] = 42073, + [SMALL_STATE(1349)] = 42080, + [SMALL_STATE(1350)] = 42087, + [SMALL_STATE(1351)] = 42094, + [SMALL_STATE(1352)] = 42101, + [SMALL_STATE(1353)] = 42108, + [SMALL_STATE(1354)] = 42115, + [SMALL_STATE(1355)] = 42122, + [SMALL_STATE(1356)] = 42129, + [SMALL_STATE(1357)] = 42136, + [SMALL_STATE(1358)] = 42143, + [SMALL_STATE(1359)] = 42150, + [SMALL_STATE(1360)] = 42157, + [SMALL_STATE(1361)] = 42164, + [SMALL_STATE(1362)] = 42171, + [SMALL_STATE(1363)] = 42178, + [SMALL_STATE(1364)] = 42185, + [SMALL_STATE(1365)] = 42192, + [SMALL_STATE(1366)] = 42199, + [SMALL_STATE(1367)] = 42206, + [SMALL_STATE(1368)] = 42213, + [SMALL_STATE(1369)] = 42220, + [SMALL_STATE(1370)] = 42227, + [SMALL_STATE(1371)] = 42234, + [SMALL_STATE(1372)] = 42241, + [SMALL_STATE(1373)] = 42248, + [SMALL_STATE(1374)] = 42255, + [SMALL_STATE(1375)] = 42262, + [SMALL_STATE(1376)] = 42269, + [SMALL_STATE(1377)] = 42276, + [SMALL_STATE(1378)] = 42283, + [SMALL_STATE(1379)] = 42290, + [SMALL_STATE(1380)] = 42297, + [SMALL_STATE(1381)] = 42304, + [SMALL_STATE(1382)] = 42311, + [SMALL_STATE(1383)] = 42318, + [SMALL_STATE(1384)] = 42325, + [SMALL_STATE(1385)] = 42332, + [SMALL_STATE(1386)] = 42339, + [SMALL_STATE(1387)] = 42346, + [SMALL_STATE(1388)] = 42353, + [SMALL_STATE(1389)] = 42360, + [SMALL_STATE(1390)] = 42367, + [SMALL_STATE(1391)] = 42374, + [SMALL_STATE(1392)] = 42381, + [SMALL_STATE(1393)] = 42388, + [SMALL_STATE(1394)] = 42395, + [SMALL_STATE(1395)] = 42402, + [SMALL_STATE(1396)] = 42409, + [SMALL_STATE(1397)] = 42416, + [SMALL_STATE(1398)] = 42423, + [SMALL_STATE(1399)] = 42430, + [SMALL_STATE(1400)] = 42437, + [SMALL_STATE(1401)] = 42444, + [SMALL_STATE(1402)] = 42451, + [SMALL_STATE(1403)] = 42458, + [SMALL_STATE(1404)] = 42465, + [SMALL_STATE(1405)] = 42472, + [SMALL_STATE(1406)] = 42479, + [SMALL_STATE(1407)] = 42486, + [SMALL_STATE(1408)] = 42493, + [SMALL_STATE(1409)] = 42500, + [SMALL_STATE(1410)] = 42507, + [SMALL_STATE(1411)] = 42514, + [SMALL_STATE(1412)] = 42521, + [SMALL_STATE(1413)] = 42528, + [SMALL_STATE(1414)] = 42535, + [SMALL_STATE(1415)] = 42542, + [SMALL_STATE(1416)] = 42549, + [SMALL_STATE(1417)] = 42556, + [SMALL_STATE(1418)] = 42563, + [SMALL_STATE(1419)] = 42570, + [SMALL_STATE(1420)] = 42577, + [SMALL_STATE(1421)] = 42584, + [SMALL_STATE(1422)] = 42591, + [SMALL_STATE(1423)] = 42598, + [SMALL_STATE(1424)] = 42605, + [SMALL_STATE(1425)] = 42612, + [SMALL_STATE(1426)] = 42619, + [SMALL_STATE(1427)] = 42626, + [SMALL_STATE(1428)] = 42633, + [SMALL_STATE(1429)] = 42640, + [SMALL_STATE(1430)] = 42647, + [SMALL_STATE(1431)] = 42654, + [SMALL_STATE(1432)] = 42661, + [SMALL_STATE(1433)] = 42668, + [SMALL_STATE(1434)] = 42675, + [SMALL_STATE(1435)] = 42682, + [SMALL_STATE(1436)] = 42689, + [SMALL_STATE(1437)] = 42696, + [SMALL_STATE(1438)] = 42703, + [SMALL_STATE(1439)] = 42710, + [SMALL_STATE(1440)] = 42717, + [SMALL_STATE(1441)] = 42724, + [SMALL_STATE(1442)] = 42731, + [SMALL_STATE(1443)] = 42738, + [SMALL_STATE(1444)] = 42745, + [SMALL_STATE(1445)] = 42752, + [SMALL_STATE(1446)] = 42759, + [SMALL_STATE(1447)] = 42766, + [SMALL_STATE(1448)] = 42773, + [SMALL_STATE(1449)] = 42780, + [SMALL_STATE(1450)] = 42787, + [SMALL_STATE(1451)] = 42794, + [SMALL_STATE(1452)] = 42801, + [SMALL_STATE(1453)] = 42808, + [SMALL_STATE(1454)] = 42815, + [SMALL_STATE(1455)] = 42822, + [SMALL_STATE(1456)] = 42829, + [SMALL_STATE(1457)] = 42836, + [SMALL_STATE(1458)] = 42843, + [SMALL_STATE(1459)] = 42850, + [SMALL_STATE(1460)] = 42857, + [SMALL_STATE(1461)] = 42864, + [SMALL_STATE(1462)] = 42871, + [SMALL_STATE(1463)] = 42878, + [SMALL_STATE(1464)] = 42885, + [SMALL_STATE(1465)] = 42892, +}; + +static const TSParseActionEntry ts_parse_actions[] = { + [0] = {.entry = {.count = 0, .reusable = false}}, + [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), + [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), + [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_translation_unit, 0), + [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(405), + [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1071), + [11] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1404), + [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(945), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1464), + [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1212), + [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(374), + [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(554), + [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(554), + [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(559), + [27] = {.entry = {.count = 1, .reusable = true}}, SHIFT(158), + [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(861), + [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(784), + [33] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1461), + [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1268), + [37] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1458), + [39] = {.entry = {.count = 1, .reusable = false}}, SHIFT(879), + [41] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [43] = {.entry = {.count = 1, .reusable = false}}, SHIFT(686), + [45] = {.entry = {.count = 1, .reusable = false}}, SHIFT(687), + [47] = {.entry = {.count = 1, .reusable = false}}, SHIFT(758), + [49] = {.entry = {.count = 1, .reusable = false}}, SHIFT(884), + [51] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1156), + [53] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1114), + [55] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1112), + [57] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1265), + [59] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1259), + [61] = {.entry = {.count = 1, .reusable = false}}, SHIFT(507), + [63] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1450), + [65] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1258), + [67] = {.entry = {.count = 1, .reusable = false}}, SHIFT(200), + [69] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1447), + [71] = {.entry = {.count = 1, .reusable = false}}, SHIFT(464), + [73] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1446), + [75] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1444), + [77] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1443), + [79] = {.entry = {.count = 1, .reusable = true}}, SHIFT(511), + [81] = {.entry = {.count = 1, .reusable = false}}, SHIFT(512), + [83] = {.entry = {.count = 1, .reusable = true}}, SHIFT(513), + [85] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1257), + [87] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1122), + [89] = {.entry = {.count = 1, .reusable = false}}, SHIFT(513), + [91] = {.entry = {.count = 1, .reusable = false}}, SHIFT(404), + [93] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1064), + [95] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1371), + [97] = {.entry = {.count = 1, .reusable = false}}, SHIFT(910), + [99] = {.entry = {.count = 1, .reusable = false}}, SHIFT(321), + [101] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1372), + [103] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), + [105] = {.entry = {.count = 1, .reusable = false}}, SHIFT(924), + [107] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1247), + [109] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), + [111] = {.entry = {.count = 1, .reusable = false}}, SHIFT(859), + [113] = {.entry = {.count = 1, .reusable = false}}, SHIFT(787), + [115] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [117] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1269), + [119] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1221), + [121] = {.entry = {.count = 1, .reusable = false}}, SHIFT(558), + [123] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1462), + [125] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1267), + [127] = {.entry = {.count = 1, .reusable = false}}, SHIFT(139), + [129] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1463), + [131] = {.entry = {.count = 1, .reusable = false}}, SHIFT(485), + [133] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1459), + [135] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1456), + [137] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1378), + [139] = {.entry = {.count = 1, .reusable = false}}, SHIFT(348), + [141] = {.entry = {.count = 1, .reusable = false}}, SHIFT(363), + [143] = {.entry = {.count = 1, .reusable = false}}, SHIFT(353), + [145] = {.entry = {.count = 1, .reusable = false}}, SHIFT(335), + [147] = {.entry = {.count = 1, .reusable = false}}, SHIFT(338), + [149] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_elif, 3, .production_id = 35), + [151] = {.entry = {.count = 1, .reusable = false}}, SHIFT(124), + [153] = {.entry = {.count = 1, .reusable = false}}, SHIFT(367), + [155] = {.entry = {.count = 1, .reusable = false}}, SHIFT(104), + [157] = {.entry = {.count = 1, .reusable = false}}, SHIFT(359), + [159] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_elif, 4, .production_id = 35), + [161] = {.entry = {.count = 1, .reusable = false}}, SHIFT(318), + [163] = {.entry = {.count = 1, .reusable = false}}, SHIFT(316), + [165] = {.entry = {.count = 1, .reusable = false}}, SHIFT(325), + [167] = {.entry = {.count = 1, .reusable = false}}, SHIFT(105), + [169] = {.entry = {.count = 1, .reusable = false}}, SHIFT(311), + [171] = {.entry = {.count = 1, .reusable = false}}, SHIFT(122), + [173] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(404), + [176] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1064), + [179] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1371), + [182] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(910), + [185] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), + [187] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1372), + [190] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1247), + [193] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(374), + [196] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(554), + [199] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(554), + [202] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(559), + [205] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(88), + [208] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(859), + [211] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(787), + [214] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1461), + [217] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1268), + [220] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1458), + [223] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(879), + [226] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(25), + [229] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(686), + [232] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(687), + [235] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(758), + [238] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(884), + [241] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1156), + [244] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1114), + [247] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1112), + [250] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1269), + [253] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1221), + [256] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(558), + [259] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1462), + [262] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1267), + [265] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(139), + [268] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1463), + [271] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(485), + [274] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1459), + [277] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1456), + [280] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1378), + [283] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(511), + [286] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(512), + [289] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(513), + [292] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1257), + [295] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1122), + [298] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(513), + [301] = {.entry = {.count = 1, .reusable = false}}, SHIFT(408), + [303] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1063), + [305] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1271), + [307] = {.entry = {.count = 1, .reusable = false}}, SHIFT(942), + [309] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1309), + [311] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1270), + [313] = {.entry = {.count = 1, .reusable = true}}, SHIFT(236), + [315] = {.entry = {.count = 1, .reusable = false}}, SHIFT(855), + [317] = {.entry = {.count = 1, .reusable = false}}, SHIFT(763), + [319] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [321] = {.entry = {.count = 1, .reusable = true}}, SHIFT(320), + [323] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1264), + [325] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1244), + [327] = {.entry = {.count = 1, .reusable = false}}, SHIFT(528), + [329] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1453), + [331] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1266), + [333] = {.entry = {.count = 1, .reusable = false}}, SHIFT(162), + [335] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1460), + [337] = {.entry = {.count = 1, .reusable = false}}, SHIFT(483), + [339] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1335), + [341] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1343), + [343] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1315), + [345] = {.entry = {.count = 1, .reusable = true}}, SHIFT(314), + [347] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(407), + [350] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1062), + [353] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1421), + [356] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(935), + [359] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1401), + [362] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1262), + [365] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(155), + [368] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(862), + [371] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(815), + [374] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(35), + [377] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1225), + [380] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1234), + [383] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(531), + [386] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1332), + [389] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1227), + [392] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(131), + [395] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1465), + [398] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(444), + [401] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1330), + [404] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1322), + [407] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1405), + [410] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), + [412] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), + [414] = {.entry = {.count = 1, .reusable = true}}, SHIFT(315), + [416] = {.entry = {.count = 1, .reusable = true}}, SHIFT(248), + [418] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), + [420] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(405), + [423] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1071), + [426] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1404), + [429] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(945), + [432] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1464), + [435] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1212), + [438] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(158), + [441] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(861), + [444] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(784), + [447] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(31), + [450] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1265), + [453] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1259), + [456] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(507), + [459] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1450), + [462] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1258), + [465] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(200), + [468] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1447), + [471] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(464), + [474] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1446), + [477] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1444), + [480] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1443), + [483] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), + [485] = {.entry = {.count = 1, .reusable = true}}, SHIFT(215), + [487] = {.entry = {.count = 1, .reusable = true}}, SHIFT(189), + [489] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), + [491] = {.entry = {.count = 1, .reusable = false}}, SHIFT(407), + [493] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1062), + [495] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1421), + [497] = {.entry = {.count = 1, .reusable = false}}, SHIFT(935), + [499] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_else, 1), + [501] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1401), + [503] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1262), + [505] = {.entry = {.count = 1, .reusable = true}}, SHIFT(155), + [507] = {.entry = {.count = 1, .reusable = false}}, SHIFT(862), + [509] = {.entry = {.count = 1, .reusable = false}}, SHIFT(815), + [511] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [513] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1225), + [515] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1234), + [517] = {.entry = {.count = 1, .reusable = false}}, SHIFT(531), + [519] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1332), + [521] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1227), + [523] = {.entry = {.count = 1, .reusable = false}}, SHIFT(131), + [525] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1465), + [527] = {.entry = {.count = 1, .reusable = false}}, SHIFT(444), + [529] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1330), + [531] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1322), + [533] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1405), + [535] = {.entry = {.count = 1, .reusable = true}}, SHIFT(295), + [537] = {.entry = {.count = 1, .reusable = true}}, SHIFT(152), + [539] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(408), + [542] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1063), + [545] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1271), + [548] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(942), + [551] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1309), + [554] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1270), + [557] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(236), + [560] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(855), + [563] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(763), + [566] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(27), + [569] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1264), + [572] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1244), + [575] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(528), + [578] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1453), + [581] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1266), + [584] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(162), + [587] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1460), + [590] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(483), + [593] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1335), + [596] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1343), + [599] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1315), + [602] = {.entry = {.count = 1, .reusable = true}}, SHIFT(354), + [604] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_translation_unit, 1), + [606] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_else, 2), + [608] = {.entry = {.count = 1, .reusable = true}}, SHIFT(356), + [610] = {.entry = {.count = 1, .reusable = true}}, SHIFT(344), + [612] = {.entry = {.count = 1, .reusable = true}}, SHIFT(135), + [614] = {.entry = {.count = 1, .reusable = false}}, SHIFT(406), + [616] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_case_statement, 4, .production_id = 8), + [618] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_case_statement, 3, .production_id = 8), + [620] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(406), + [623] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), + [625] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(374), + [628] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(554), + [631] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(554), + [634] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(559), + [637] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(88), + [640] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(859), + [643] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(686), + [646] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1461), + [649] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1268), + [652] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1458), + [655] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(25), + [658] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(687), + [661] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(758), + [664] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(884), + [667] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1156), + [670] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1114), + [673] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1112), + [676] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1269), + [679] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1221), + [682] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1267), + [685] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(139), + [688] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1463), + [691] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(485), + [694] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1459), + [697] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1456), + [700] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1378), + [703] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(511), + [706] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(512), + [709] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(513), + [712] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1257), + [715] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1122), + [718] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(513), + [721] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_case_statement, 2), + [723] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_case_statement, 3), + [725] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_case_statement, 3, .production_id = 8), + [727] = {.entry = {.count = 1, .reusable = false}}, SHIFT(401), + [729] = {.entry = {.count = 1, .reusable = false}}, SHIFT(403), + [731] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), + [733] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(401), + [736] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(158), + [739] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(861), + [742] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(31), + [745] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1265), + [748] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1259), + [751] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1258), + [754] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(200), + [757] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1447), + [760] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(464), + [763] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1446), + [766] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1444), + [769] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1443), + [772] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_case_statement, 2), + [774] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_case_statement, 3), + [776] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_case_statement, 4, .production_id = 8), + [778] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(403), + [781] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(155), + [784] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(862), + [787] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(35), + [790] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1225), + [793] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1234), + [796] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1227), + [799] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(131), + [802] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1465), + [805] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(444), + [808] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1330), + [811] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1322), + [814] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1405), + [817] = {.entry = {.count = 1, .reusable = false}}, SHIFT(402), + [819] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(402), + [822] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(236), + [825] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(855), + [828] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(27), + [831] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1264), + [834] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1244), + [837] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1266), + [840] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(162), + [843] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1460), + [846] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(483), + [849] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1335), + [852] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1343), + [855] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1315), + [858] = {.entry = {.count = 1, .reusable = false}}, SHIFT(409), + [860] = {.entry = {.count = 1, .reusable = true}}, SHIFT(474), + [862] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1219), + [864] = {.entry = {.count = 1, .reusable = true}}, SHIFT(447), + [866] = {.entry = {.count = 1, .reusable = true}}, SHIFT(478), + [868] = {.entry = {.count = 1, .reusable = true}}, SHIFT(481), + [870] = {.entry = {.count = 1, .reusable = false}}, SHIFT(527), + [872] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sizeof_expression, 4, .production_id = 44), + [874] = {.entry = {.count = 1, .reusable = true}}, SHIFT(379), + [876] = {.entry = {.count = 1, .reusable = false}}, SHIFT(508), + [878] = {.entry = {.count = 1, .reusable = true}}, SHIFT(508), + [880] = {.entry = {.count = 1, .reusable = false}}, SHIFT(559), + [882] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sizeof_expression, 4, .production_id = 44), + [884] = {.entry = {.count = 1, .reusable = true}}, SHIFT(410), + [886] = {.entry = {.count = 1, .reusable = true}}, SHIFT(505), + [888] = {.entry = {.count = 1, .reusable = false}}, SHIFT(577), + [890] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_declaration, 4, .production_id = 49), + [892] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 4, .production_id = 49), + [894] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 6, .production_id = 71), + [896] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 6, .production_id = 71), + [898] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_declaration, 3, .production_id = 28), + [900] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 3, .production_id = 28), + [902] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_definition, 4, .production_id = 40), + [904] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_definition, 4, .production_id = 40), + [906] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_switch_statement, 3, .production_id = 23), + [908] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_switch_statement, 3, .production_id = 23), + [910] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_while_statement, 3, .production_id = 23), + [912] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_statement, 3, .production_id = 23), + [914] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 3, .production_id = 22), + [916] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 3, .production_id = 22), + [918] = {.entry = {.count = 1, .reusable = false}}, SHIFT(203), + [920] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_compound_statement, 3), + [922] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_compound_statement, 3), + [924] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_definition, 5, .production_id = 58), + [926] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_definition, 5, .production_id = 58), + [928] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_definition, 5, .production_id = 59), + [930] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_definition, 5, .production_id = 59), + [932] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 5, .production_id = 61), + [934] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 5, .production_id = 61), + [936] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_do_statement, 5, .production_id = 62), + [938] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_do_statement, 5, .production_id = 62), + [940] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_definition, 6, .production_id = 69), + [942] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_definition, 6, .production_id = 69), + [944] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attributed_statement, 2), + [946] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attributed_statement, 2), + [948] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return_statement, 3), + [950] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_statement, 3), + [952] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 6, .production_id = 70), + [954] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 6, .production_id = 70), + [956] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 7, .production_id = 75), + [958] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 7, .production_id = 75), + [960] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_labeled_statement, 3, .production_id = 26), + [962] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_labeled_statement, 3, .production_id = 26), + [964] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression_statement, 1), + [966] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression_statement, 1), + [968] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 7, .production_id = 76), + [970] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 7, .production_id = 76), + [972] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 7, .production_id = 77), + [974] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 7, .production_id = 77), + [976] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 7, .production_id = 78), + [978] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 7, .production_id = 78), + [980] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 7, .production_id = 79), + [982] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 7, .production_id = 79), + [984] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression_statement, 2), + [986] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression_statement, 2), + [988] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 8, .production_id = 80), + [990] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 8, .production_id = 80), + [992] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 8, .production_id = 81), + [994] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 8, .production_id = 81), + [996] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 8, .production_id = 82), + [998] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 8, .production_id = 82), + [1000] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_continue_statement, 2), + [1002] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_continue_statement, 2), + [1004] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 8, .production_id = 83), + [1006] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 8, .production_id = 83), + [1008] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 9, .production_id = 84), + [1010] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 9, .production_id = 84), + [1012] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_break_statement, 2), + [1014] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_break_statement, 2), + [1016] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_goto_statement, 3, .production_id = 24), + [1018] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_goto_statement, 3, .production_id = 24), + [1020] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return_statement, 2), + [1022] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_statement, 2), + [1024] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_compound_statement, 2), + [1026] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_compound_statement, 2), + [1028] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_ifdef, 3, .production_id = 14), + [1030] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_ifdef, 3, .production_id = 14), + [1032] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_if, 4, .production_id = 35), + [1034] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_if, 4, .production_id = 35), + [1036] = {.entry = {.count = 1, .reusable = true}}, SHIFT(380), + [1038] = {.entry = {.count = 1, .reusable = false}}, SHIFT(567), + [1040] = {.entry = {.count = 1, .reusable = true}}, SHIFT(567), + [1042] = {.entry = {.count = 1, .reusable = false}}, SHIFT(525), + [1044] = {.entry = {.count = 1, .reusable = true}}, SHIFT(563), + [1046] = {.entry = {.count = 1, .reusable = false}}, SHIFT(562), + [1048] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_call, 2, .production_id = 3), + [1050] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_call, 2, .production_id = 3), + [1052] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_function_def, 5, .production_id = 53), + [1054] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_function_def, 5, .production_id = 53), + [1056] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_function_def, 4, .production_id = 34), + [1058] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_function_def, 4, .production_id = 34), + [1060] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 4, .production_id = 51), + [1062] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 4, .production_id = 51), + [1064] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_if, 6, .production_id = 66), + [1066] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_if, 6, .production_id = 66), + [1068] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_def, 4, .production_id = 33), + [1070] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_def, 4, .production_id = 33), + [1072] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__empty_declaration, 2), + [1074] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__empty_declaration, 2), + [1076] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_def, 3, .production_id = 14), + [1078] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_def, 3, .production_id = 14), + [1080] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_linkage_specification, 3, .production_id = 18), + [1082] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_linkage_specification, 3, .production_id = 18), + [1084] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_declaration_list, 3), + [1086] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration_list, 3), + [1088] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_call, 3, .production_id = 15), + [1090] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_call, 3, .production_id = 15), + [1092] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 3, .production_id = 29), + [1094] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 3, .production_id = 29), + [1096] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_ifdef, 5, .production_id = 55), + [1098] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_ifdef, 5, .production_id = 55), + [1100] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_declaration_list, 2), + [1102] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration_list, 2), + [1104] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_include, 3, .production_id = 13), + [1106] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_include, 3, .production_id = 13), + [1108] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_if, 5, .production_id = 35), + [1110] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_if, 5, .production_id = 35), + [1112] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_if, 5, .production_id = 54), + [1114] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_if, 5, .production_id = 54), + [1116] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_ifdef, 4, .production_id = 14), + [1118] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_ifdef, 4, .production_id = 14), + [1120] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_ifdef, 4, .production_id = 36), + [1122] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_ifdef, 4, .production_id = 36), + [1124] = {.entry = {.count = 1, .reusable = false}}, SHIFT(615), + [1126] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1246), + [1128] = {.entry = {.count = 1, .reusable = false}}, SHIFT(616), + [1130] = {.entry = {.count = 1, .reusable = false}}, SHIFT(176), + [1132] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(612), + [1135] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(374), + [1138] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(554), + [1141] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(554), + [1144] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(559), + [1147] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(155), + [1150] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1246), + [1153] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(35), + [1156] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1225), + [1159] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1234), + [1162] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(531), + [1165] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1332), + [1168] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1227), + [1171] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(131), + [1174] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1465), + [1177] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(444), + [1180] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1330), + [1183] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1322), + [1186] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1405), + [1189] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(511), + [1192] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(512), + [1195] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(513), + [1198] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1257), + [1201] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1122), + [1204] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(513), + [1207] = {.entry = {.count = 1, .reusable = false}}, SHIFT(612), + [1209] = {.entry = {.count = 1, .reusable = false}}, SHIFT(617), + [1211] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(616), + [1214] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(158), + [1217] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(31), + [1220] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1265), + [1223] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1259), + [1226] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(507), + [1229] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1450), + [1232] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1258), + [1235] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(200), + [1238] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1447), + [1241] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(464), + [1244] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1446), + [1247] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1444), + [1250] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1443), + [1253] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(617), + [1256] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(88), + [1259] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(25), + [1262] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1269), + [1265] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1221), + [1268] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(558), + [1271] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1462), + [1274] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1267), + [1277] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(139), + [1280] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1463), + [1283] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(485), + [1286] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1459), + [1289] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1456), + [1292] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1378), + [1295] = {.entry = {.count = 1, .reusable = false}}, SHIFT(207), + [1297] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(615), + [1300] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(236), + [1303] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(27), + [1306] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1264), + [1309] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1244), + [1312] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(528), + [1315] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1453), + [1318] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1266), + [1321] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(162), + [1324] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1460), + [1327] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(483), + [1330] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1335), + [1333] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1343), + [1336] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1315), + [1339] = {.entry = {.count = 1, .reusable = false}}, SHIFT(300), + [1341] = {.entry = {.count = 1, .reusable = false}}, SHIFT(609), + [1343] = {.entry = {.count = 1, .reusable = false}}, SHIFT(519), + [1345] = {.entry = {.count = 1, .reusable = false}}, SHIFT(994), + [1347] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attribute_declaration, 4), + [1349] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute_declaration, 4), + [1351] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attribute_declaration, 3), + [1353] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute_declaration, 3), + [1355] = {.entry = {.count = 1, .reusable = false}}, SHIFT(637), + [1357] = {.entry = {.count = 1, .reusable = true}}, SHIFT(376), + [1359] = {.entry = {.count = 1, .reusable = false}}, SHIFT(526), + [1361] = {.entry = {.count = 1, .reusable = true}}, SHIFT(526), + [1363] = {.entry = {.count = 1, .reusable = true}}, SHIFT(525), + [1365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(521), + [1367] = {.entry = {.count = 1, .reusable = false}}, SHIFT(520), + [1369] = {.entry = {.count = 2, .reusable = false}}, REDUCE(sym__declaration_modifiers, 1), REDUCE(aux_sym_attributed_declarator_repeat1, 1), + [1372] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 1), + [1374] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 1), + [1376] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__declaration_modifiers, 1), + [1378] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__declaration_modifiers, 1), REDUCE(aux_sym_attributed_declarator_repeat1, 1), + [1381] = {.entry = {.count = 1, .reusable = false}}, SHIFT(947), + [1383] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1211), + [1385] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1049), + [1387] = {.entry = {.count = 1, .reusable = true}}, SHIFT(386), + [1389] = {.entry = {.count = 1, .reusable = true}}, SHIFT(646), + [1391] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1238), + [1393] = {.entry = {.count = 1, .reusable = false}}, SHIFT(425), + [1395] = {.entry = {.count = 1, .reusable = false}}, SHIFT(880), + [1397] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1422), + [1399] = {.entry = {.count = 1, .reusable = false}}, SHIFT(911), + [1401] = {.entry = {.count = 1, .reusable = false}}, SHIFT(814), + [1403] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1342), + [1405] = {.entry = {.count = 1, .reusable = false}}, SHIFT(419), + [1407] = {.entry = {.count = 1, .reusable = false}}, SHIFT(930), + [1409] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1255), + [1411] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_elif_in_field_declaration_list, 4, .production_id = 35), + [1413] = {.entry = {.count = 1, .reusable = false}}, SHIFT(674), + [1415] = {.entry = {.count = 1, .reusable = false}}, SHIFT(775), + [1417] = {.entry = {.count = 1, .reusable = false}}, SHIFT(791), + [1419] = {.entry = {.count = 1, .reusable = false}}, SHIFT(675), + [1421] = {.entry = {.count = 1, .reusable = false}}, SHIFT(684), + [1423] = {.entry = {.count = 1, .reusable = false}}, SHIFT(823), + [1425] = {.entry = {.count = 1, .reusable = false}}, SHIFT(830), + [1427] = {.entry = {.count = 1, .reusable = false}}, SHIFT(774), + [1429] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_elif_in_field_declaration_list, 3, .production_id = 35), + [1431] = {.entry = {.count = 1, .reusable = false}}, SHIFT(795), + [1433] = {.entry = {.count = 1, .reusable = false}}, SHIFT(813), + [1435] = {.entry = {.count = 1, .reusable = false}}, SHIFT(677), + [1437] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__type_specifier, 1, .production_id = 1), + [1439] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expression, 1), + [1441] = {.entry = {.count = 3, .reusable = true}}, REDUCE(sym__type_specifier, 1, .production_id = 1), REDUCE(sym__expression, 1), SHIFT(852), + [1445] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expression, 1), + [1447] = {.entry = {.count = 2, .reusable = false}}, REDUCE(sym__type_specifier, 1, .production_id = 1), REDUCE(sym__expression, 1), + [1450] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__type_specifier, 1, .production_id = 1), + [1452] = {.entry = {.count = 1, .reusable = false}}, SHIFT(530), + [1454] = {.entry = {.count = 1, .reusable = true}}, SHIFT(136), + [1456] = {.entry = {.count = 1, .reusable = true}}, SHIFT(530), + [1458] = {.entry = {.count = 1, .reusable = true}}, SHIFT(288), + [1460] = {.entry = {.count = 1, .reusable = true}}, SHIFT(144), + [1462] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__type_specifier, 1, .production_id = 1), REDUCE(sym__expression, 1), + [1465] = {.entry = {.count = 1, .reusable = true}}, SHIFT(234), + [1467] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1279), + [1469] = {.entry = {.count = 1, .reusable = true}}, SHIFT(605), + [1471] = {.entry = {.count = 1, .reusable = true}}, SHIFT(607), + [1473] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1278), + [1475] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(880), + [1478] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1422), + [1481] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(911), + [1484] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), + [1486] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1342), + [1489] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1255), + [1492] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(686), + [1495] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1461), + [1498] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1219), + [1501] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1458), + [1504] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(687), + [1507] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(758), + [1510] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(884), + [1513] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1156), + [1516] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1114), + [1519] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1112), + [1522] = {.entry = {.count = 1, .reusable = true}}, SHIFT(586), + [1524] = {.entry = {.count = 1, .reusable = true}}, SHIFT(580), + [1526] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1400), + [1529] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(894), + [1532] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1369), + [1535] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1223), + [1538] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), + [1540] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1400), + [1542] = {.entry = {.count = 1, .reusable = false}}, SHIFT(894), + [1544] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1369), + [1546] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1223), + [1548] = {.entry = {.count = 1, .reusable = true}}, SHIFT(881), + [1550] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1423), + [1552] = {.entry = {.count = 1, .reusable = false}}, SHIFT(919), + [1554] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_else_in_field_declaration_list, 2), + [1556] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1387), + [1558] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1253), + [1560] = {.entry = {.count = 1, .reusable = true}}, SHIFT(885), + [1562] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_else_in_field_declaration_list, 1), + [1564] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1423), + [1567] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(919), + [1570] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1387), + [1573] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1253), + [1576] = {.entry = {.count = 1, .reusable = true}}, SHIFT(501), + [1578] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1120), + [1580] = {.entry = {.count = 1, .reusable = false}}, SHIFT(662), + [1582] = {.entry = {.count = 1, .reusable = true}}, SHIFT(489), + [1584] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1083), + [1586] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_concatenated_string_repeat1, 2), + [1588] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_concatenated_string_repeat1, 2), + [1590] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_concatenated_string_repeat1, 2), SHIFT_REPEAT(1122), + [1593] = {.entry = {.count = 1, .reusable = true}}, SHIFT(487), + [1595] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1121), + [1597] = {.entry = {.count = 1, .reusable = true}}, SHIFT(492), + [1599] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1138), + [1601] = {.entry = {.count = 1, .reusable = true}}, SHIFT(495), + [1603] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1073), + [1605] = {.entry = {.count = 1, .reusable = true}}, SHIFT(490), + [1607] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1094), + [1609] = {.entry = {.count = 1, .reusable = true}}, SHIFT(498), + [1611] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1087), + [1613] = {.entry = {.count = 1, .reusable = true}}, SHIFT(502), + [1615] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1096), + [1617] = {.entry = {.count = 1, .reusable = true}}, SHIFT(494), + [1619] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1102), + [1621] = {.entry = {.count = 1, .reusable = true}}, SHIFT(500), + [1623] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1134), + [1625] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_concatenated_string, 2), + [1627] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_concatenated_string, 2), + [1629] = {.entry = {.count = 1, .reusable = true}}, SHIFT(434), + [1631] = {.entry = {.count = 1, .reusable = true}}, SHIFT(990), + [1633] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [1635] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 3), + [1637] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 3), + [1639] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [1641] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [1643] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [1645] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 2), + [1647] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 2), + [1649] = {.entry = {.count = 1, .reusable = true}}, SHIFT(182), + [1651] = {.entry = {.count = 1, .reusable = true}}, SHIFT(214), + [1653] = {.entry = {.count = 1, .reusable = true}}, SHIFT(148), + [1655] = {.entry = {.count = 1, .reusable = true}}, SHIFT(278), + [1657] = {.entry = {.count = 1, .reusable = true}}, SHIFT(445), + [1659] = {.entry = {.count = 1, .reusable = true}}, SHIFT(471), + [1661] = {.entry = {.count = 1, .reusable = true}}, SHIFT(137), + [1663] = {.entry = {.count = 1, .reusable = true}}, SHIFT(249), + [1665] = {.entry = {.count = 1, .reusable = true}}, SHIFT(154), + [1667] = {.entry = {.count = 1, .reusable = true}}, SHIFT(126), + [1669] = {.entry = {.count = 1, .reusable = true}}, SHIFT(190), + [1671] = {.entry = {.count = 1, .reusable = true}}, SHIFT(270), + [1673] = {.entry = {.count = 1, .reusable = true}}, SHIFT(269), + [1675] = {.entry = {.count = 1, .reusable = true}}, SHIFT(466), + [1677] = {.entry = {.count = 1, .reusable = true}}, SHIFT(221), + [1679] = {.entry = {.count = 1, .reusable = true}}, SHIFT(186), + [1681] = {.entry = {.count = 1, .reusable = true}}, SHIFT(220), + [1683] = {.entry = {.count = 1, .reusable = true}}, SHIFT(453), + [1685] = {.entry = {.count = 1, .reusable = true}}, SHIFT(256), + [1687] = {.entry = {.count = 1, .reusable = true}}, SHIFT(127), + [1689] = {.entry = {.count = 1, .reusable = true}}, SHIFT(273), + [1691] = {.entry = {.count = 1, .reusable = true}}, SHIFT(455), + [1693] = {.entry = {.count = 1, .reusable = true}}, SHIFT(206), + [1695] = {.entry = {.count = 1, .reusable = true}}, SHIFT(205), + [1697] = {.entry = {.count = 1, .reusable = true}}, SHIFT(209), + [1699] = {.entry = {.count = 1, .reusable = true}}, SHIFT(457), + [1701] = {.entry = {.count = 1, .reusable = true}}, SHIFT(279), + [1703] = {.entry = {.count = 1, .reusable = true}}, SHIFT(163), + [1705] = {.entry = {.count = 1, .reusable = true}}, SHIFT(451), + [1707] = {.entry = {.count = 1, .reusable = true}}, SHIFT(449), + [1709] = {.entry = {.count = 1, .reusable = true}}, SHIFT(188), + [1711] = {.entry = {.count = 1, .reusable = true}}, SHIFT(187), + [1713] = {.entry = {.count = 1, .reusable = true}}, SHIFT(475), + [1715] = {.entry = {.count = 1, .reusable = true}}, SHIFT(477), + [1717] = {.entry = {.count = 1, .reusable = true}}, SHIFT(482), + [1719] = {.entry = {.count = 1, .reusable = true}}, SHIFT(467), + [1721] = {.entry = {.count = 1, .reusable = true}}, SHIFT(178), + [1723] = {.entry = {.count = 1, .reusable = true}}, SHIFT(277), + [1725] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), + [1727] = {.entry = {.count = 1, .reusable = true}}, SHIFT(179), + [1729] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1116), + [1731] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_expression, 3), + [1733] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_expression, 3), + [1735] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1077), + [1737] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1092), + [1739] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1119), + [1741] = {.entry = {.count = 1, .reusable = true}}, SHIFT(581), + [1743] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1100), + [1745] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1084), + [1747] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1093), + [1749] = {.entry = {.count = 1, .reusable = true}}, SHIFT(636), + [1751] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1147), + [1753] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1131), + [1755] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1101), + [1757] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_cast_expression, 4, .production_id = 39), + [1759] = {.entry = {.count = 1, .reusable = true}}, SHIFT(493), + [1761] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_cast_expression, 4, .production_id = 39), + [1763] = {.entry = {.count = 1, .reusable = true}}, SHIFT(542), + [1765] = {.entry = {.count = 1, .reusable = true}}, SHIFT(545), + [1767] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1361), + [1769] = {.entry = {.count = 1, .reusable = true}}, SHIFT(375), + [1771] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_compound_literal_expression, 4, .production_id = 39), + [1773] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_compound_literal_expression, 4, .production_id = 39), + [1775] = {.entry = {.count = 1, .reusable = true}}, SHIFT(381), + [1777] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, .production_id = 4), + [1779] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unary_expression, 2, .production_id = 4), + [1781] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 4), + [1783] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_argument_list, 4), + [1785] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_expression, 2, .production_id = 4), + [1787] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_pointer_expression, 2, .production_id = 4), + [1789] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_update_expression, 2, .production_id = 4), + [1791] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_update_expression, 2, .production_id = 4), + [1793] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_initializer_list, 3), + [1795] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_initializer_list, 3), + [1797] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_update_expression, 2, .production_id = 9), + [1799] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_update_expression, 2, .production_id = 9), + [1801] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_call_expression, 2, .production_id = 10), + [1803] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_call_expression, 2, .production_id = 10), + [1805] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_subscript_expression, 4, .production_id = 52), + [1807] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_subscript_expression, 4, .production_id = 52), + [1809] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 3), + [1811] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_argument_list, 3), + [1813] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment_expression, 3, .production_id = 25), + [1815] = {.entry = {.count = 1, .reusable = false}}, SHIFT(593), + [1817] = {.entry = {.count = 1, .reusable = false}}, SHIFT(592), + [1819] = {.entry = {.count = 1, .reusable = true}}, SHIFT(590), + [1821] = {.entry = {.count = 1, .reusable = true}}, SHIFT(584), + [1823] = {.entry = {.count = 1, .reusable = false}}, SHIFT(576), + [1825] = {.entry = {.count = 1, .reusable = false}}, SHIFT(573), + [1827] = {.entry = {.count = 1, .reusable = false}}, SHIFT(568), + [1829] = {.entry = {.count = 1, .reusable = true}}, SHIFT(566), + [1831] = {.entry = {.count = 1, .reusable = false}}, SHIFT(565), + [1833] = {.entry = {.count = 1, .reusable = true}}, SHIFT(565), + [1835] = {.entry = {.count = 1, .reusable = false}}, SHIFT(560), + [1837] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment_expression, 3, .production_id = 25), + [1839] = {.entry = {.count = 1, .reusable = true}}, SHIFT(377), + [1841] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_char_literal, 3), + [1843] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_char_literal, 3), + [1845] = {.entry = {.count = 1, .reusable = true}}, SHIFT(378), + [1847] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_initializer_list, 5), + [1849] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_initializer_list, 5), + [1851] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 2), + [1853] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_argument_list, 2), + [1855] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 25), + [1857] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, .production_id = 25), + [1859] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_conditional_expression, 5, .production_id = 65), + [1861] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_conditional_expression, 5, .production_id = 65), + [1863] = {.entry = {.count = 1, .reusable = true}}, SHIFT(602), + [1865] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_expression, 3, .production_id = 32), + [1867] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_expression, 3, .production_id = 32), + [1869] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_initializer_list, 4), + [1871] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_initializer_list, 4), + [1873] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_initializer_list, 2), + [1875] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_initializer_list, 2), + [1877] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sizeof_expression, 2, .production_id = 8), + [1879] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sizeof_expression, 2, .production_id = 8), + [1881] = {.entry = {.count = 1, .reusable = true}}, SHIFT(499), + [1883] = {.entry = {.count = 1, .reusable = false}}, SHIFT(588), + [1885] = {.entry = {.count = 1, .reusable = false}}, SHIFT(603), + [1887] = {.entry = {.count = 1, .reusable = false}}, SHIFT(575), + [1889] = {.entry = {.count = 1, .reusable = true}}, SHIFT(574), + [1891] = {.entry = {.count = 1, .reusable = false}}, SHIFT(572), + [1893] = {.entry = {.count = 1, .reusable = true}}, SHIFT(572), + [1895] = {.entry = {.count = 1, .reusable = false}}, SHIFT(571), + [1897] = {.entry = {.count = 1, .reusable = true}}, SHIFT(587), + [1899] = {.entry = {.count = 1, .reusable = true}}, SHIFT(579), + [1901] = {.entry = {.count = 1, .reusable = false}}, SHIFT(578), + [1903] = {.entry = {.count = 1, .reusable = false}}, SHIFT(504), + [1905] = {.entry = {.count = 1, .reusable = true}}, SHIFT(557), + [1907] = {.entry = {.count = 1, .reusable = false}}, SHIFT(564), + [1909] = {.entry = {.count = 1, .reusable = true}}, SHIFT(564), + [1911] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__declaration_specifiers_repeat1, 2), + [1913] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__declaration_specifiers_repeat1, 2), + [1915] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__declaration_specifiers_repeat1, 2), SHIFT_REPEAT(686), + [1918] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__declaration_specifiers_repeat1, 2), SHIFT_REPEAT(1461), + [1921] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_specifiers_repeat1, 2), SHIFT_REPEAT(1219), + [1924] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__declaration_specifiers_repeat1, 2), SHIFT_REPEAT(1458), + [1927] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__declaration_specifiers_repeat1, 2), SHIFT_REPEAT(687), + [1930] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1075), + [1932] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_pointer_declarator, 1, .dynamic_precedence = 1), + [1934] = {.entry = {.count = 1, .reusable = false}}, SHIFT(998), + [1936] = {.entry = {.count = 1, .reusable = false}}, SHIFT(999), + [1938] = {.entry = {.count = 1, .reusable = true}}, SHIFT(425), + [1940] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_type_definition_repeat1, 2), + [1942] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_type_definition_repeat1, 2), + [1944] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_type_definition_repeat1, 2), SHIFT_REPEAT(662), + [1947] = {.entry = {.count = 1, .reusable = false}}, SHIFT(561), + [1949] = {.entry = {.count = 1, .reusable = true}}, SHIFT(532), + [1951] = {.entry = {.count = 1, .reusable = false}}, SHIFT(532), + [1953] = {.entry = {.count = 1, .reusable = false}}, SHIFT(540), + [1955] = {.entry = {.count = 1, .reusable = true}}, SHIFT(540), + [1957] = {.entry = {.count = 1, .reusable = true}}, SHIFT(541), + [1959] = {.entry = {.count = 1, .reusable = true}}, SHIFT(533), + [1961] = {.entry = {.count = 1, .reusable = true}}, SHIFT(534), + [1963] = {.entry = {.count = 1, .reusable = false}}, SHIFT(536), + [1965] = {.entry = {.count = 1, .reusable = true}}, SHIFT(537), + [1967] = {.entry = {.count = 1, .reusable = false}}, SHIFT(538), + [1969] = {.entry = {.count = 1, .reusable = true}}, SHIFT(539), + [1971] = {.entry = {.count = 1, .reusable = true}}, SHIFT(503), + [1973] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attribute_specifier, 4), + [1975] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute_specifier, 4), + [1977] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ms_declspec_modifier, 4), + [1979] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ms_declspec_modifier, 4), + [1981] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_qualifier, 1), + [1983] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_qualifier, 1), + [1985] = {.entry = {.count = 1, .reusable = true}}, SHIFT(553), + [1987] = {.entry = {.count = 1, .reusable = true}}, SHIFT(549), + [1989] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_declaration, 3, .production_id = 28), + [1991] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_declaration, 3, .production_id = 28), + [1993] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_declaration, 3, .production_id = 37), + [1995] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_declaration, 3, .production_id = 37), + [1997] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_declaration, 2, .production_id = 37), + [1999] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_declaration, 2, .production_id = 37), + [2001] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_ifdef_in_field_declaration_list, 3, .production_id = 14), + [2003] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_ifdef_in_field_declaration_list, 3, .production_id = 14), + [2005] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_if_in_field_declaration_list, 4, .production_id = 35), + [2007] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_if_in_field_declaration_list, 4, .production_id = 35), + [2009] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_ifdef_in_field_declaration_list, 4, .production_id = 36), + [2011] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_ifdef_in_field_declaration_list, 4, .production_id = 36), + [2013] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_ifdef_in_field_declaration_list, 4, .production_id = 14), + [2015] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_ifdef_in_field_declaration_list, 4, .production_id = 14), + [2017] = {.entry = {.count = 1, .reusable = true}}, SHIFT(639), + [2019] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_declaration, 4, .production_id = 28), + [2021] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_declaration, 4, .production_id = 28), + [2023] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_declaration, 4, .production_id = 49), + [2025] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_declaration, 4, .production_id = 49), + [2027] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_if_in_field_declaration_list, 5, .production_id = 54), + [2029] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_if_in_field_declaration_list, 5, .production_id = 54), + [2031] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_if_in_field_declaration_list, 6, .production_id = 66), + [2033] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_if_in_field_declaration_list, 6, .production_id = 66), + [2035] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_if_in_field_declaration_list, 5, .production_id = 35), + [2037] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_if_in_field_declaration_list, 5, .production_id = 35), + [2039] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_ifdef_in_field_declaration_list, 5, .production_id = 55), + [2041] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_ifdef_in_field_declaration_list, 5, .production_id = 55), + [2043] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_storage_class_specifier, 1), + [2045] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_storage_class_specifier, 1), + [2047] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_declaration, 5, .production_id = 49), + [2049] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_declaration, 5, .production_id = 49), + [2051] = {.entry = {.count = 1, .reusable = true}}, SHIFT(491), + [2053] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comma_expression, 3, .production_id = 31), + [2055] = {.entry = {.count = 1, .reusable = true}}, SHIFT(412), + [2057] = {.entry = {.count = 1, .reusable = true}}, SHIFT(535), + [2059] = {.entry = {.count = 1, .reusable = true}}, SHIFT(168), + [2061] = {.entry = {.count = 1, .reusable = true}}, SHIFT(213), + [2063] = {.entry = {.count = 1, .reusable = true}}, SHIFT(208), + [2065] = {.entry = {.count = 1, .reusable = true}}, SHIFT(251), + [2067] = {.entry = {.count = 1, .reusable = true}}, SHIFT(305), + [2069] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), + [2071] = {.entry = {.count = 1, .reusable = true}}, SHIFT(219), + [2073] = {.entry = {.count = 1, .reusable = true}}, SHIFT(238), + [2075] = {.entry = {.count = 1, .reusable = true}}, SHIFT(266), + [2077] = {.entry = {.count = 1, .reusable = true}}, SHIFT(452), + [2079] = {.entry = {.count = 1, .reusable = true}}, SHIFT(157), + [2081] = {.entry = {.count = 1, .reusable = true}}, SHIFT(470), + [2083] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), + [2085] = {.entry = {.count = 1, .reusable = true}}, SHIFT(613), + [2087] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enumerator, 3, .production_id = 60), + [2089] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__declaration_specifiers, 1, .production_id = 2), + [2091] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__declaration_specifiers, 1, .production_id = 2), + [2093] = {.entry = {.count = 1, .reusable = true}}, SHIFT(198), + [2095] = {.entry = {.count = 1, .reusable = true}}, SHIFT(289), + [2097] = {.entry = {.count = 1, .reusable = true}}, SHIFT(463), + [2099] = {.entry = {.count = 1, .reusable = true}}, SHIFT(274), + [2101] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__declaration_specifiers, 2, .production_id = 2), + [2103] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__declaration_specifiers, 2, .production_id = 2), + [2105] = {.entry = {.count = 1, .reusable = true}}, SHIFT(454), + [2107] = {.entry = {.count = 1, .reusable = true}}, SHIFT(441), + [2109] = {.entry = {.count = 1, .reusable = true}}, SHIFT(486), + [2111] = {.entry = {.count = 1, .reusable = true}}, SHIFT(271), + [2113] = {.entry = {.count = 1, .reusable = true}}, SHIFT(480), + [2115] = {.entry = {.count = 1, .reusable = true}}, SHIFT(129), + [2117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(227), + [2119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(164), + [2121] = {.entry = {.count = 1, .reusable = true}}, SHIFT(450), + [2123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(262), + [2125] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_argument_list_repeat1, 2), + [2127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(442), + [2129] = {.entry = {.count = 1, .reusable = true}}, SHIFT(237), + [2131] = {.entry = {.count = 1, .reusable = true}}, SHIFT(173), + [2133] = {.entry = {.count = 1, .reusable = true}}, SHIFT(195), + [2135] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_init_declarator, 3, .production_id = 48), + [2137] = {.entry = {.count = 1, .reusable = true}}, SHIFT(460), + [2139] = {.entry = {.count = 1, .reusable = true}}, SHIFT(459), + [2141] = {.entry = {.count = 1, .reusable = true}}, SHIFT(180), + [2143] = {.entry = {.count = 1, .reusable = true}}, SHIFT(175), + [2145] = {.entry = {.count = 1, .reusable = true}}, SHIFT(244), + [2147] = {.entry = {.count = 1, .reusable = true}}, SHIFT(181), + [2149] = {.entry = {.count = 1, .reusable = true}}, SHIFT(302), + [2151] = {.entry = {.count = 1, .reusable = true}}, SHIFT(465), + [2153] = {.entry = {.count = 1, .reusable = true}}, SHIFT(468), + [2155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(458), + [2157] = {.entry = {.count = 1, .reusable = true}}, SHIFT(159), + [2159] = {.entry = {.count = 1, .reusable = true}}, SHIFT(183), + [2161] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_initializer_pair, 3, .production_id = 74), + [2163] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__declaration_specifiers, 2, .production_id = 11), + [2165] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__declaration_specifiers, 2, .production_id = 11), + [2167] = {.entry = {.count = 1, .reusable = true}}, SHIFT(488), + [2169] = {.entry = {.count = 1, .reusable = true}}, SHIFT(462), + [2171] = {.entry = {.count = 1, .reusable = true}}, SHIFT(224), + [2173] = {.entry = {.count = 1, .reusable = true}}, SHIFT(472), + [2175] = {.entry = {.count = 1, .reusable = true}}, SHIFT(142), + [2177] = {.entry = {.count = 1, .reusable = true}}, SHIFT(259), + [2179] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__declaration_specifiers, 3, .production_id = 11), + [2181] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__declaration_specifiers, 3, .production_id = 11), + [2183] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_initializer_list_repeat1, 2), + [2185] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), + [2187] = {.entry = {.count = 1, .reusable = false}}, SHIFT(556), + [2189] = {.entry = {.count = 1, .reusable = true}}, SHIFT(548), + [2191] = {.entry = {.count = 1, .reusable = false}}, SHIFT(548), + [2193] = {.entry = {.count = 1, .reusable = true}}, SHIFT(518), + [2195] = {.entry = {.count = 1, .reusable = true}}, SHIFT(514), + [2197] = {.entry = {.count = 1, .reusable = false}}, SHIFT(510), + [2199] = {.entry = {.count = 1, .reusable = true}}, SHIFT(509), + [2201] = {.entry = {.count = 1, .reusable = false}}, SHIFT(544), + [2203] = {.entry = {.count = 1, .reusable = true}}, SHIFT(608), + [2205] = {.entry = {.count = 1, .reusable = false}}, SHIFT(552), + [2207] = {.entry = {.count = 1, .reusable = true}}, SHIFT(552), + [2209] = {.entry = {.count = 1, .reusable = true}}, SHIFT(517), + [2211] = {.entry = {.count = 1, .reusable = true}}, SHIFT(550), + [2213] = {.entry = {.count = 1, .reusable = true}}, SHIFT(543), + [2215] = {.entry = {.count = 1, .reusable = true}}, SHIFT(547), + [2217] = {.entry = {.count = 2, .reusable = false}}, REDUCE(sym_sized_type_specifier, 1), SHIFT(889), + [2220] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sized_type_specifier, 1), + [2222] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sized_type_specifier, 1), + [2224] = {.entry = {.count = 1, .reusable = false}}, SHIFT(818), + [2226] = {.entry = {.count = 1, .reusable = false}}, SHIFT(890), + [2228] = {.entry = {.count = 1, .reusable = true}}, SHIFT(591), + [2230] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [2232] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [2234] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1143), + [2236] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_bitfield_clause, 2), + [2238] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1185), + [2240] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_sized_type_specifier_repeat1, 2), + [2242] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_sized_type_specifier_repeat1, 2), + [2244] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_sized_type_specifier_repeat1, 2), SHIFT_REPEAT(818), + [2247] = {.entry = {.count = 1, .reusable = true}}, SHIFT(569), + [2249] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), + [2251] = {.entry = {.count = 1, .reusable = true}}, SHIFT(589), + [2253] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_pointer_declarator, 2, .dynamic_precedence = 1), + [2255] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1089), + [2257] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1033), + [2259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(834), + [2261] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1097), + [2263] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1036), + [2265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(833), + [2267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1024), + [2269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(839), + [2271] = {.entry = {.count = 1, .reusable = true}}, SHIFT(324), + [2273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(323), + [2275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(336), + [2277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), + [2279] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_specifier, 3, .production_id = 20), + [2281] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_specifier, 3, .production_id = 20), + [2283] = {.entry = {.count = 1, .reusable = true}}, SHIFT(418), + [2285] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_enum_specifier, 2, .production_id = 6), + [2287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enum_specifier, 2, .production_id = 6), + [2289] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1146), + [2291] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_specifier, 2, .production_id = 6), + [2293] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_specifier, 2, .production_id = 6), + [2295] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_union_specifier, 2, .production_id = 6), + [2297] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_union_specifier, 2, .production_id = 6), + [2299] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_union_specifier, 3, .production_id = 20), + [2301] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_union_specifier, 3, .production_id = 20), + [2303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__preproc_expression, 1), + [2305] = {.entry = {.count = 1, .reusable = true}}, SHIFT(876), + [2307] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__preproc_expression, 1), + [2309] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_specifier, 3, .production_id = 21), + [2311] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_specifier, 3, .production_id = 21), + [2313] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_specifier, 3, .production_id = 19), + [2315] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_specifier, 3, .production_id = 19), + [2317] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_macro_type_specifier, 4, .dynamic_precedence = -1, .production_id = 45), + [2319] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_macro_type_specifier, 4, .dynamic_precedence = -1, .production_id = 45), + [2321] = {.entry = {.count = 1, .reusable = true}}, SHIFT(902), + [2323] = {.entry = {.count = 1, .reusable = true}}, SHIFT(968), + [2325] = {.entry = {.count = 1, .reusable = true}}, SHIFT(912), + [2327] = {.entry = {.count = 1, .reusable = true}}, SHIFT(913), + [2329] = {.entry = {.count = 1, .reusable = false}}, SHIFT(913), + [2331] = {.entry = {.count = 1, .reusable = true}}, SHIFT(917), + [2333] = {.entry = {.count = 1, .reusable = true}}, SHIFT(920), + [2335] = {.entry = {.count = 1, .reusable = false}}, SHIFT(923), + [2337] = {.entry = {.count = 1, .reusable = true}}, SHIFT(925), + [2339] = {.entry = {.count = 1, .reusable = false}}, SHIFT(927), + [2341] = {.entry = {.count = 1, .reusable = true}}, SHIFT(928), + [2343] = {.entry = {.count = 1, .reusable = false}}, SHIFT(931), + [2345] = {.entry = {.count = 1, .reusable = true}}, SHIFT(931), + [2347] = {.entry = {.count = 1, .reusable = true}}, SHIFT(933), + [2349] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_enumerator_list, 4), + [2351] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enumerator_list, 4), + [2353] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_enum_specifier, 2, .production_id = 7), + [2355] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enum_specifier, 2, .production_id = 7), + [2357] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_union_specifier, 4, .production_id = 43), + [2359] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_union_specifier, 4, .production_id = 43), + [2361] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_specifier, 4, .production_id = 43), + [2363] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_specifier, 4, .production_id = 43), + [2365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(921), + [2367] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_specifier, 2, .production_id = 7), + [2369] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_specifier, 2, .production_id = 7), + [2371] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_enumerator_list, 2), + [2373] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enumerator_list, 2), + [2375] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_union_specifier, 2, .production_id = 7), + [2377] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_union_specifier, 2, .production_id = 7), + [2379] = {.entry = {.count = 1, .reusable = false}}, SHIFT(863), + [2381] = {.entry = {.count = 1, .reusable = true}}, SHIFT(929), + [2383] = {.entry = {.count = 1, .reusable = true}}, SHIFT(932), + [2385] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1248), + [2387] = {.entry = {.count = 1, .reusable = true}}, SHIFT(936), + [2389] = {.entry = {.count = 1, .reusable = false}}, SHIFT(936), + [2391] = {.entry = {.count = 1, .reusable = true}}, SHIFT(872), + [2393] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1222), + [2395] = {.entry = {.count = 1, .reusable = false}}, SHIFT(888), + [2397] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(), + [2399] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_enumerator_list, 3), + [2401] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enumerator_list, 3), + [2403] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ms_call_modifier, 1), + [2405] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ms_call_modifier, 1), + [2407] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__type_specifier, 1, .production_id = 1), SHIFT(852), + [2410] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_declaration_list, 3), + [2412] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_declaration_list, 3), + [2414] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_type_definition_repeat1, 2), SHIFT_REPEAT(687), + [2417] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_union_specifier, 3, .production_id = 21), + [2419] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_union_specifier, 3, .production_id = 21), + [2421] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__type_specifier, 1), + [2423] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__type_specifier, 1), + [2425] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_declaration_list, 2), + [2427] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_declaration_list, 2), + [2429] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_union_specifier, 3, .production_id = 19), + [2431] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_union_specifier, 3, .production_id = 19), + [2433] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_enum_specifier, 3, .production_id = 19), + [2435] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enum_specifier, 3, .production_id = 19), + [2437] = {.entry = {.count = 1, .reusable = true}}, SHIFT(949), + [2439] = {.entry = {.count = 1, .reusable = true}}, SHIFT(867), + [2441] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sized_type_specifier, 2, .dynamic_precedence = -1, .production_id = 12), + [2443] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sized_type_specifier, 2, .dynamic_precedence = -1, .production_id = 12), + [2445] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sized_type_specifier, 2, .production_id = 11), + [2447] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sized_type_specifier, 2, .production_id = 11), + [2449] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_enumerator_list, 5), + [2451] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enumerator_list, 5), + [2453] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_binary_expression, 3, .production_id = 25), + [2455] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_binary_expression, 3, .production_id = 25), + [2457] = {.entry = {.count = 1, .reusable = false}}, SHIFT(877), + [2459] = {.entry = {.count = 1, .reusable = true}}, SHIFT(916), + [2461] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1256), + [2463] = {.entry = {.count = 1, .reusable = true}}, SHIFT(918), + [2465] = {.entry = {.count = 1, .reusable = false}}, SHIFT(918), + [2467] = {.entry = {.count = 1, .reusable = true}}, SHIFT(954), + [2469] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1241), + [2471] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_call_expression, 2, .production_id = 10), + [2473] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_call_expression, 2, .production_id = 10), + [2475] = {.entry = {.count = 1, .reusable = true}}, SHIFT(914), + [2477] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_defined, 2), + [2479] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_defined, 2), + [2481] = {.entry = {.count = 1, .reusable = true}}, SHIFT(971), + [2483] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_unary_expression, 2, .production_id = 4), + [2485] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_unary_expression, 2, .production_id = 4), + [2487] = {.entry = {.count = 1, .reusable = true}}, SHIFT(970), + [2489] = {.entry = {.count = 1, .reusable = true}}, SHIFT(969), + [2491] = {.entry = {.count = 1, .reusable = true}}, SHIFT(951), + [2493] = {.entry = {.count = 1, .reusable = true}}, SHIFT(955), + [2495] = {.entry = {.count = 1, .reusable = true}}, SHIFT(926), + [2497] = {.entry = {.count = 1, .reusable = true}}, SHIFT(893), + [2499] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_preproc_argument_list_repeat1, 2), + [2501] = {.entry = {.count = 1, .reusable = true}}, SHIFT(960), + [2503] = {.entry = {.count = 1, .reusable = true}}, SHIFT(961), + [2505] = {.entry = {.count = 1, .reusable = true}}, SHIFT(896), + [2507] = {.entry = {.count = 1, .reusable = true}}, SHIFT(958), + [2509] = {.entry = {.count = 1, .reusable = true}}, SHIFT(950), + [2511] = {.entry = {.count = 1, .reusable = true}}, SHIFT(897), + [2513] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_argument_list, 3), + [2515] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_argument_list, 3), + [2517] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_defined, 4), + [2519] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_defined, 4), + [2521] = {.entry = {.count = 1, .reusable = true}}, SHIFT(898), + [2523] = {.entry = {.count = 1, .reusable = true}}, SHIFT(956), + [2525] = {.entry = {.count = 1, .reusable = true}}, SHIFT(899), + [2527] = {.entry = {.count = 1, .reusable = true}}, SHIFT(900), + [2529] = {.entry = {.count = 1, .reusable = true}}, SHIFT(901), + [2531] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_argument_list, 2), + [2533] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_argument_list, 2), + [2535] = {.entry = {.count = 1, .reusable = true}}, SHIFT(963), + [2537] = {.entry = {.count = 1, .reusable = true}}, SHIFT(904), + [2539] = {.entry = {.count = 1, .reusable = true}}, SHIFT(964), + [2541] = {.entry = {.count = 1, .reusable = true}}, SHIFT(892), + [2543] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_argument_list, 4), + [2545] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_argument_list, 4), + [2547] = {.entry = {.count = 1, .reusable = true}}, SHIFT(967), + [2549] = {.entry = {.count = 1, .reusable = true}}, SHIFT(906), + [2551] = {.entry = {.count = 1, .reusable = true}}, SHIFT(974), + [2553] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_parenthesized_expression, 3), + [2555] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_parenthesized_expression, 3), + [2557] = {.entry = {.count = 1, .reusable = true}}, SHIFT(975), + [2559] = {.entry = {.count = 1, .reusable = true}}, SHIFT(977), + [2561] = {.entry = {.count = 1, .reusable = true}}, SHIFT(948), + [2563] = {.entry = {.count = 1, .reusable = true}}, SHIFT(966), + [2565] = {.entry = {.count = 1, .reusable = true}}, SHIFT(976), + [2567] = {.entry = {.count = 1, .reusable = true}}, SHIFT(973), + [2569] = {.entry = {.count = 1, .reusable = true}}, SHIFT(965), + [2571] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_declaration, 1, .production_id = 37), + [2573] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__declarator, 1), REDUCE(sym__type_specifier, 1, .production_id = 1), + [2576] = {.entry = {.count = 3, .reusable = true}}, REDUCE(sym__declarator, 1), REDUCE(sym__type_specifier, 1, .production_id = 1), SHIFT(852), + [2580] = {.entry = {.count = 2, .reusable = false}}, REDUCE(sym__declarator, 1), REDUCE(sym__type_specifier, 1, .production_id = 1), + [2583] = {.entry = {.count = 1, .reusable = false}}, SHIFT(937), + [2585] = {.entry = {.count = 1, .reusable = false}}, SHIFT(939), + [2587] = {.entry = {.count = 1, .reusable = false}}, SHIFT(943), + [2589] = {.entry = {.count = 1, .reusable = false}}, SHIFT(944), + [2591] = {.entry = {.count = 1, .reusable = false}}, SHIFT(905), + [2593] = {.entry = {.count = 1, .reusable = false}}, SHIFT(907), + [2595] = {.entry = {.count = 1, .reusable = false}}, SHIFT(909), + [2597] = {.entry = {.count = 1, .reusable = false}}, SHIFT(915), + [2599] = {.entry = {.count = 1, .reusable = true}}, SHIFT(398), + [2601] = {.entry = {.count = 1, .reusable = false}}, SHIFT(940), + [2603] = {.entry = {.count = 1, .reusable = false}}, SHIFT(941), + [2605] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), + [2607] = {.entry = {.count = 1, .reusable = true}}, SHIFT(387), + [2609] = {.entry = {.count = 1, .reusable = true}}, SHIFT(392), + [2611] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [2613] = {.entry = {.count = 1, .reusable = true}}, SHIFT(972), + [2615] = {.entry = {.count = 1, .reusable = true}}, SHIFT(397), + [2617] = {.entry = {.count = 1, .reusable = true}}, SHIFT(938), + [2619] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), + [2621] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), + [2623] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [2625] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_descriptor, 2, .production_id = 11), + [2627] = {.entry = {.count = 1, .reusable = true}}, SHIFT(687), + [2629] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_descriptor, 1, .production_id = 2), + [2631] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_descriptor, 2, .production_id = 2), + [2633] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_descriptor, 3, .production_id = 11), + [2635] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_pointer_declarator_repeat1, 2), + [2637] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_pointer_declarator_repeat1, 2), + [2639] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_pointer_declarator_repeat1, 2), SHIFT_REPEAT(998), + [2642] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_pointer_declarator_repeat1, 2), SHIFT_REPEAT(999), + [2645] = {.entry = {.count = 1, .reusable = false}}, SHIFT(889), + [2647] = {.entry = {.count = 1, .reusable = true}}, SHIFT(817), + [2649] = {.entry = {.count = 1, .reusable = true}}, SHIFT(555), + [2651] = {.entry = {.count = 1, .reusable = true}}, SHIFT(829), + [2653] = {.entry = {.count = 1, .reusable = true}}, SHIFT(668), + [2655] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ms_pointer_modifier, 1), + [2657] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ms_pointer_modifier, 1), + [2659] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ms_unaligned_ptr_modifier, 1), + [2661] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ms_unaligned_ptr_modifier, 1), + [2663] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1007), + [2665] = {.entry = {.count = 1, .reusable = true}}, SHIFT(610), + [2667] = {.entry = {.count = 1, .reusable = true}}, SHIFT(156), + [2669] = {.entry = {.count = 1, .reusable = false}}, SHIFT(426), + [2671] = {.entry = {.count = 1, .reusable = true}}, SHIFT(461), + [2673] = {.entry = {.count = 1, .reusable = true}}, SHIFT(308), + [2675] = {.entry = {.count = 1, .reusable = true}}, SHIFT(257), + [2677] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), + [2679] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declarator, 3, .production_id = 30), + [2681] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1461), + [2683] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declarator, 3, .production_id = 30), + [2685] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_declarator, 4, .dynamic_precedence = 1, .production_id = 63), + [2687] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1019), + [2689] = {.entry = {.count = 1, .reusable = true}}, SHIFT(666), + [2691] = {.entry = {.count = 1, .reusable = false}}, SHIFT(428), + [2693] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_declarator, 2, .dynamic_precedence = 1, .production_id = 27), + [2695] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_declarator, 3, .dynamic_precedence = 1, .production_id = 46), + [2697] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), + [2699] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT_REPEAT(1268), + [2702] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), + [2704] = {.entry = {.count = 1, .reusable = true}}, SHIFT(770), + [2706] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_function_declarator_repeat1, 2), + [2708] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_declarator_repeat1, 2), SHIFT_REPEAT(1461), + [2711] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_function_declarator_repeat1, 2), + [2713] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declarator, 2, .production_id = 30), + [2715] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declarator, 2, .production_id = 30), + [2717] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_declarator, 5, .dynamic_precedence = 1, .production_id = 72), + [2719] = {.entry = {.count = 1, .reusable = true}}, SHIFT(800), + [2721] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attributed_declarator, 2), + [2723] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attributed_declarator, 2), + [2725] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_field_declarator, 2, .dynamic_precedence = 1, .production_id = 27), + [2727] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_field_declarator, 5, .dynamic_precedence = 1, .production_id = 72), + [2729] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_field_declarator, 4, .dynamic_precedence = 1, .production_id = 63), + [2731] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_list, 2), + [2733] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameter_list, 2), + [2735] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_list, 4), + [2737] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameter_list, 4), + [2739] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_list, 3), + [2741] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameter_list, 3), + [2743] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_field_declarator, 3, .dynamic_precedence = 1, .production_id = 46), + [2745] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_declaration_repeat1, 2, .production_id = 27), + [2747] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1038), + [2749] = {.entry = {.count = 1, .reusable = true}}, SHIFT(150), + [2751] = {.entry = {.count = 1, .reusable = false}}, SHIFT(431), + [2753] = {.entry = {.count = 1, .reusable = true}}, SHIFT(303), + [2755] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attributed_field_declarator, 2), + [2757] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attributed_field_declarator, 2), + [2759] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78), + [2761] = {.entry = {.count = 1, .reusable = true}}, SHIFT(172), + [2763] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_type_declarator, 4, .dynamic_precedence = 1, .production_id = 63), + [2765] = {.entry = {.count = 1, .reusable = true}}, SHIFT(222), + [2767] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_type_declarator, 2, .dynamic_precedence = 1, .production_id = 27), + [2769] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1180), + [2771] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1133), + [2773] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1320), + [2775] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1171), + [2777] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1319), + [2779] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1163), + [2781] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1448), + [2783] = {.entry = {.count = 1, .reusable = true}}, SHIFT(132), + [2785] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), + [2787] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_type_declarator, 5, .dynamic_precedence = 1, .production_id = 72), + [2789] = {.entry = {.count = 1, .reusable = true}}, SHIFT(287), + [2791] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_field_declaration_repeat1, 2, .production_id = 27), + [2793] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_type_declarator, 3, .dynamic_precedence = 1, .production_id = 46), + [2795] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1165), + [2797] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1437), + [2799] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_type_definition_repeat2, 2, .production_id = 27), + [2801] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_declarator, 3, .production_id = 47), + [2803] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_declarator, 3, .production_id = 47), + [2805] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__declarator, 1), + [2807] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__declarator, 1), + [2809] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_declarator, 5, .production_id = 73), + [2811] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_declarator, 5, .production_id = 73), + [2813] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_declarator, 3, .dynamic_precedence = -10), + [2815] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_declarator, 3, .dynamic_precedence = -10), + [2817] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attributed_type_declarator, 2), + [2819] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attributed_type_declarator, 2), + [2821] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_declaration, 2, .production_id = 28), + [2823] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_declarator, 4, .production_id = 47), + [2825] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_declarator, 4, .production_id = 47), + [2827] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_declarator, 4, .production_id = 64), + [2829] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_declarator, 4, .production_id = 64), + [2831] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__field_declarator, 1), + [2833] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__field_declarator, 1), + [2835] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_field_declarator, 3, .dynamic_precedence = -10), + [2837] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_field_declarator, 3, .dynamic_precedence = -10), + [2839] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_field_declarator, 4, .production_id = 47), + [2841] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_field_declarator, 4, .production_id = 47), + [2843] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1104), + [2845] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__field_declarator, 1, .production_id = 42), + [2847] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__field_declarator, 1, .production_id = 42), + [2849] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1086), + [2851] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_field_declarator, 2, .production_id = 30), + [2853] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_field_declarator, 2, .production_id = 30), + [2855] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_field_declarator, 4, .production_id = 64), + [2857] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_field_declarator, 4, .production_id = 64), + [2859] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_field_declarator, 5, .production_id = 73), + [2861] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_field_declarator, 5, .production_id = 73), + [2863] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_field_declarator, 3, .production_id = 47), + [2865] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_field_declarator, 3, .production_id = 47), + [2867] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1078), + [2869] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_type_declarator, 4, .production_id = 47), + [2871] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_type_declarator, 4, .production_id = 47), + [2873] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__type_declarator, 1, .production_id = 1), + [2875] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__type_declarator, 1, .production_id = 1), + [2877] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__type_declarator, 1), + [2879] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__type_declarator, 1), + [2881] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_initializer_pair_repeat1, 2), SHIFT_REPEAT(607), + [2884] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_initializer_pair_repeat1, 2), + [2886] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_initializer_pair_repeat1, 2), SHIFT_REPEAT(1278), + [2889] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_type_declarator, 4, .production_id = 64), + [2891] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_type_declarator, 4, .production_id = 64), + [2893] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_type_declarator, 5, .production_id = 73), + [2895] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_type_declarator, 5, .production_id = 73), + [2897] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_type_declarator, 3, .production_id = 47), + [2899] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_type_declarator, 3, .production_id = 47), + [2901] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_type_declarator, 2, .production_id = 30), + [2903] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_type_declarator, 2, .production_id = 30), + [2905] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_type_declarator, 3, .dynamic_precedence = -10), + [2907] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_type_declarator, 3, .dynamic_precedence = -10), + [2909] = {.entry = {.count = 1, .reusable = true}}, SHIFT(484), + [2911] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1278), + [2913] = {.entry = {.count = 1, .reusable = true}}, SHIFT(680), + [2915] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_pointer_declarator, 3, .dynamic_precedence = 1, .production_id = 46), + [2917] = {.entry = {.count = 1, .reusable = true}}, SHIFT(424), + [2919] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_pointer_declarator, 2, .dynamic_precedence = 1, .production_id = 27), + [2921] = {.entry = {.count = 1, .reusable = true}}, SHIFT(811), + [2923] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute, 1, .production_id = 5), + [2925] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1383), + [2927] = {.entry = {.count = 1, .reusable = true}}, SHIFT(789), + [2929] = {.entry = {.count = 1, .reusable = false}}, SHIFT(851), + [2931] = {.entry = {.count = 1, .reusable = false}}, SHIFT(850), + [2933] = {.entry = {.count = 1, .reusable = false}}, SHIFT(347), + [2935] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1190), + [2937] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1292), + [2939] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_array_declarator, 4, .production_id = 64), + [2941] = {.entry = {.count = 1, .reusable = false}}, SHIFT(670), + [2943] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1298), + [2945] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1442), + [2947] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1140), + [2949] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1140), + [2951] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_array_declarator, 3, .production_id = 56), + [2953] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_array_declarator, 3), + [2955] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_array_declarator, 3, .production_id = 47), + [2957] = {.entry = {.count = 1, .reusable = false}}, SHIFT(440), + [2959] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1145), + [2961] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1145), + [2963] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_descriptor, 4, .production_id = 57), + [2965] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_parenthesized_declarator, 3), + [2967] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute, 3, .production_id = 41), + [2969] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_descriptor, 3, .production_id = 40), + [2971] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_descriptor, 3, .production_id = 38), + [2973] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_function_declarator, 2, .production_id = 30), + [2975] = {.entry = {.count = 1, .reusable = false}}, SHIFT(330), + [2977] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1310), + [2979] = {.entry = {.count = 1, .reusable = false}}, SHIFT(794), + [2981] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1308), + [2983] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_array_declarator, 4, .production_id = 67), + [2985] = {.entry = {.count = 1, .reusable = false}}, SHIFT(765), + [2987] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1304), + [2989] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1452), + [2991] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1118), + [2993] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1118), + [2995] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_array_declarator, 4, .production_id = 47), + [2997] = {.entry = {.count = 1, .reusable = false}}, SHIFT(114), + [2999] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1418), + [3001] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_field_declaration_repeat1, 2, .production_id = 50), SHIFT_REPEAT(1019), + [3004] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_field_declaration_repeat1, 2, .production_id = 50), + [3006] = {.entry = {.count = 1, .reusable = false}}, SHIFT(692), + [3008] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_array_declarator, 2), + [3010] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1124), + [3012] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2), + [3014] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_literal_repeat1, 2), SHIFT_REPEAT(1140), + [3017] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2), SHIFT_REPEAT(1140), + [3020] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_function_declarator, 1, .production_id = 17), + [3022] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__abstract_declarator, 1), + [3024] = {.entry = {.count = 1, .reusable = false}}, SHIFT(730), + [3026] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1137), + [3028] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1137), + [3030] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_descriptor, 2, .production_id = 16), + [3032] = {.entry = {.count = 1, .reusable = false}}, SHIFT(436), + [3034] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1200), + [3036] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1374), + [3038] = {.entry = {.count = 1, .reusable = true}}, SHIFT(874), + [3040] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_array_declarator, 5, .production_id = 73), + [3042] = {.entry = {.count = 1, .reusable = false}}, SHIFT(310), + [3044] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1399), + [3046] = {.entry = {.count = 1, .reusable = true}}, SHIFT(618), + [3048] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1051), + [3050] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1226), + [3052] = {.entry = {.count = 1, .reusable = true}}, SHIFT(611), + [3054] = {.entry = {.count = 1, .reusable = true}}, SHIFT(210), + [3056] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_type_definition_repeat2, 2, .production_id = 50), SHIFT_REPEAT(1038), + [3059] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_type_definition_repeat2, 2, .production_id = 50), + [3061] = {.entry = {.count = 1, .reusable = true}}, SHIFT(165), + [3063] = {.entry = {.count = 1, .reusable = true}}, SHIFT(194), + [3065] = {.entry = {.count = 1, .reusable = true}}, SHIFT(849), + [3067] = {.entry = {.count = 1, .reusable = true}}, SHIFT(285), + [3069] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1050), + [3071] = {.entry = {.count = 1, .reusable = true}}, SHIFT(185), + [3073] = {.entry = {.count = 1, .reusable = true}}, SHIFT(184), + [3075] = {.entry = {.count = 1, .reusable = true}}, SHIFT(891), + [3077] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_enumerator_list_repeat1, 2), SHIFT_REPEAT(1214), + [3080] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_enumerator_list_repeat1, 2), + [3082] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), + [3084] = {.entry = {.count = 1, .reusable = true}}, SHIFT(638), + [3086] = {.entry = {.count = 1, .reusable = true}}, SHIFT(355), + [3088] = {.entry = {.count = 1, .reusable = true}}, SHIFT(934), + [3090] = {.entry = {.count = 1, .reusable = true}}, SHIFT(413), + [3092] = {.entry = {.count = 1, .reusable = true}}, SHIFT(665), + [3094] = {.entry = {.count = 1, .reusable = true}}, SHIFT(309), + [3096] = {.entry = {.count = 1, .reusable = true}}, SHIFT(161), + [3098] = {.entry = {.count = 1, .reusable = true}}, SHIFT(331), + [3100] = {.entry = {.count = 1, .reusable = true}}, SHIFT(383), + [3102] = {.entry = {.count = 1, .reusable = true}}, SHIFT(276), + [3104] = {.entry = {.count = 1, .reusable = true}}, SHIFT(848), + [3106] = {.entry = {.count = 1, .reusable = true}}, SHIFT(853), + [3108] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), + [3110] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1237), + [3112] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1209), + [3114] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_argument_list_repeat1, 2), SHIFT_REPEAT(553), + [3117] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_preproc_argument_list_repeat1, 2), SHIFT_REPEAT(902), + [3120] = {.entry = {.count = 1, .reusable = true}}, SHIFT(322), + [3122] = {.entry = {.count = 1, .reusable = true}}, SHIFT(952), + [3124] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_initializer_list_repeat1, 2), SHIFT_REPEAT(415), + [3127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(681), + [3129] = {.entry = {.count = 1, .reusable = true}}, SHIFT(523), + [3131] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_subscript_designator, 3), + [3133] = {.entry = {.count = 1, .reusable = true}}, SHIFT(264), + [3135] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), + [3137] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), + [3139] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_preproc_params_repeat1, 2), SHIFT_REPEAT(1237), + [3142] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_preproc_params_repeat1, 2), + [3144] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1208), + [3146] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1213), + [3148] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_declaration_repeat1, 2, .production_id = 50), SHIFT_REPEAT(1007), + [3151] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_declaration_repeat1, 2, .production_id = 50), + [3153] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1161), + [3155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(868), + [3157] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [3159] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attribute_declaration_repeat1, 2), SHIFT_REPEAT(1226), + [3162] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attribute_declaration_repeat1, 2), + [3164] = {.entry = {.count = 1, .reusable = true}}, SHIFT(382), + [3166] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_parameter_list_repeat1, 2), SHIFT_REPEAT(618), + [3169] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_parameter_list_repeat1, 2), + [3171] = {.entry = {.count = 1, .reusable = true}}, SHIFT(138), + [3173] = {.entry = {.count = 1, .reusable = true}}, SHIFT(171), + [3175] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enumerator, 1, .production_id = 5), + [3177] = {.entry = {.count = 1, .reusable = true}}, SHIFT(515), + [3179] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), + [3181] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1194), + [3183] = {.entry = {.count = 1, .reusable = true}}, SHIFT(878), + [3185] = {.entry = {.count = 1, .reusable = true}}, SHIFT(614), + [3187] = {.entry = {.count = 1, .reusable = true}}, SHIFT(293), + [3189] = {.entry = {.count = 1, .reusable = true}}, SHIFT(167), + [3191] = {.entry = {.count = 1, .reusable = true}}, SHIFT(294), + [3193] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_designator, 2, .production_id = 68), + [3195] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1239), + [3197] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_params, 4), + [3199] = {.entry = {.count = 1, .reusable = true}}, SHIFT(496), + [3201] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variadic_parameter, 1), + [3203] = {.entry = {.count = 1, .reusable = false}}, SHIFT(361), + [3205] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1431), + [3207] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_params, 2), + [3209] = {.entry = {.count = 1, .reusable = false}}, SHIFT(342), + [3211] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1365), + [3213] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1110), + [3215] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1419), + [3217] = {.entry = {.count = 1, .reusable = false}}, SHIFT(809), + [3219] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1318), + [3221] = {.entry = {.count = 1, .reusable = true}}, SHIFT(497), + [3223] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute, 2, .production_id = 5), + [3225] = {.entry = {.count = 1, .reusable = false}}, SHIFT(333), + [3227] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1356), + [3229] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1233), + [3231] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_params, 3), + [3233] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1286), + [3235] = {.entry = {.count = 1, .reusable = false}}, SHIFT(109), + [3237] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1406), + [3239] = {.entry = {.count = 1, .reusable = false}}, SHIFT(107), + [3241] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1441), + [3243] = {.entry = {.count = 1, .reusable = true}}, SHIFT(903), + [3245] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1339), + [3247] = {.entry = {.count = 1, .reusable = false}}, SHIFT(768), + [3249] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1306), + [3251] = {.entry = {.count = 1, .reusable = false}}, SHIFT(772), + [3253] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1295), + [3255] = {.entry = {.count = 1, .reusable = false}}, SHIFT(764), + [3257] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1303), + [3259] = {.entry = {.count = 1, .reusable = false}}, SHIFT(673), + [3261] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1300), + [3263] = {.entry = {.count = 1, .reusable = false}}, SHIFT(669), + [3265] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1297), + [3267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(959), + [3269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1396), + [3271] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1410), + [3273] = {.entry = {.count = 1, .reusable = false}}, SHIFT(372), + [3275] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1294), + [3277] = {.entry = {.count = 1, .reusable = false}}, SHIFT(345), + [3279] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1291), + [3281] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute, 4, .production_id = 41), + [3283] = {.entry = {.count = 1, .reusable = false}}, SHIFT(352), + [3285] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1301), + [3287] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1129), + [3289] = {.entry = {.count = 1, .reusable = true}}, SHIFT(790), + [3291] = {.entry = {.count = 1, .reusable = true}}, SHIFT(371), + [3293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(280), + [3295] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1207), + [3297] = {.entry = {.count = 1, .reusable = true}}, SHIFT(306), + [3299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(953), + [3301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(816), + [3303] = {.entry = {.count = 1, .reusable = true}}, SHIFT(362), + [3305] = {.entry = {.count = 1, .reusable = true}}, SHIFT(683), + [3307] = {.entry = {.count = 1, .reusable = true}}, SHIFT(364), + [3309] = {.entry = {.count = 1, .reusable = true}}, SHIFT(365), + [3311] = {.entry = {.count = 1, .reusable = true}}, SHIFT(358), + [3313] = {.entry = {.count = 1, .reusable = true}}, SHIFT(360), + [3315] = {.entry = {.count = 1, .reusable = true}}, SHIFT(797), + [3317] = {.entry = {.count = 1, .reusable = true}}, SHIFT(671), + [3319] = {.entry = {.count = 1, .reusable = true}}, SHIFT(672), + [3321] = {.entry = {.count = 1, .reusable = true}}, SHIFT(785), + [3323] = {.entry = {.count = 1, .reusable = true}}, SHIFT(663), + [3325] = {.entry = {.count = 1, .reusable = true}}, SHIFT(328), + [3327] = {.entry = {.count = 1, .reusable = true}}, SHIFT(351), + [3329] = {.entry = {.count = 1, .reusable = true}}, SHIFT(766), + [3331] = {.entry = {.count = 1, .reusable = true}}, SHIFT(767), + [3333] = {.entry = {.count = 1, .reusable = true}}, SHIFT(822), + [3335] = {.entry = {.count = 1, .reusable = true}}, SHIFT(769), + [3337] = {.entry = {.count = 1, .reusable = true}}, SHIFT(779), + [3339] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), + [3341] = {.entry = {.count = 1, .reusable = true}}, SHIFT(312), + [3343] = {.entry = {.count = 1, .reusable = true}}, SHIFT(349), + [3345] = {.entry = {.count = 1, .reusable = true}}, SHIFT(245), + [3347] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1282), + [3349] = {.entry = {.count = 1, .reusable = true}}, SHIFT(792), + [3351] = {.entry = {.count = 1, .reusable = true}}, SHIFT(146), + [3353] = {.entry = {.count = 1, .reusable = true}}, SHIFT(143), + [3355] = {.entry = {.count = 1, .reusable = true}}, SHIFT(761), + [3357] = {.entry = {.count = 1, .reusable = true}}, SHIFT(843), + [3359] = {.entry = {.count = 1, .reusable = true}}, SHIFT(667), + [3361] = {.entry = {.count = 1, .reusable = true}}, SHIFT(147), + [3363] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_elif, 4, .production_id = 54), + [3365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [3367] = {.entry = {.count = 1, .reusable = true}}, SHIFT(688), + [3369] = {.entry = {.count = 1, .reusable = true}}, SHIFT(282), + [3371] = {.entry = {.count = 1, .reusable = true}}, SHIFT(685), + [3373] = {.entry = {.count = 1, .reusable = true}}, SHIFT(317), + [3375] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1389), + [3377] = {.entry = {.count = 1, .reusable = true}}, SHIFT(682), + [3379] = {.entry = {.count = 1, .reusable = true}}, SHIFT(389), + [3381] = {.entry = {.count = 1, .reusable = true}}, SHIFT(286), + [3383] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), + [3385] = {.entry = {.count = 1, .reusable = true}}, SHIFT(384), + [3387] = {.entry = {.count = 1, .reusable = true}}, SHIFT(819), + [3389] = {.entry = {.count = 1, .reusable = true}}, SHIFT(327), + [3391] = {.entry = {.count = 1, .reusable = true}}, SHIFT(339), + [3393] = {.entry = {.count = 1, .reusable = true}}, SHIFT(957), + [3395] = {.entry = {.count = 1, .reusable = true}}, SHIFT(340), + [3397] = {.entry = {.count = 1, .reusable = true}}, SHIFT(821), + [3399] = {.entry = {.count = 1, .reusable = true}}, SHIFT(782), + [3401] = {.entry = {.count = 1, .reusable = true}}, SHIFT(585), + [3403] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ms_based_modifier, 2), + [3405] = {.entry = {.count = 1, .reusable = true}}, SHIFT(773), + [3407] = {.entry = {.count = 1, .reusable = true}}, SHIFT(866), + [3409] = {.entry = {.count = 1, .reusable = true}}, SHIFT(368), + [3411] = {.entry = {.count = 1, .reusable = true}}, SHIFT(373), + [3413] = {.entry = {.count = 1, .reusable = true}}, SHIFT(202), + [3415] = {.entry = {.count = 1, .reusable = true}}, SHIFT(390), + [3417] = {.entry = {.count = 1, .reusable = true}}, SHIFT(776), + [3419] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1135), + [3421] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [3423] = {.entry = {.count = 1, .reusable = true}}, SHIFT(793), + [3425] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), + [3427] = {.entry = {.count = 1, .reusable = true}}, SHIFT(778), + [3429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(661), + [3431] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1424), + [3433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), + [3435] = {.entry = {.count = 1, .reusable = true}}, SHIFT(799), + [3437] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1125), + [3439] = {.entry = {.count = 1, .reusable = true}}, SHIFT(660), + [3441] = {.entry = {.count = 1, .reusable = true}}, SHIFT(835), + [3443] = {.entry = {.count = 1, .reusable = true}}, SHIFT(399), + [3445] = {.entry = {.count = 1, .reusable = true}}, SHIFT(922), + [3447] = {.entry = {.count = 1, .reusable = true}}, SHIFT(679), + [3449] = {.entry = {.count = 1, .reusable = true}}, SHIFT(337), + [3451] = {.entry = {.count = 1, .reusable = true}}, SHIFT(676), + [3453] = {.entry = {.count = 1, .reusable = true}}, SHIFT(329), + [3455] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1354), + [3457] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), + [3459] = {.entry = {.count = 1, .reusable = true}}, SHIFT(369), + [3461] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1130), + [3463] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), + [3465] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_elif, 5, .production_id = 66), + [3467] = {.entry = {.count = 1, .reusable = true}}, SHIFT(123), + [3469] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1148), + [3471] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1312), + [3473] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), + [3475] = {.entry = {.count = 1, .reusable = true}}, SHIFT(838), + [3477] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), + [3479] = {.entry = {.count = 1, .reusable = true}}, SHIFT(341), + [3481] = {.entry = {.count = 1, .reusable = true}}, SHIFT(570), + [3483] = {.entry = {.count = 1, .reusable = true}}, SHIFT(125), + [3485] = {.entry = {.count = 1, .reusable = true}}, SHIFT(239), + [3487] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1218), + [3489] = {.entry = {.count = 1, .reusable = true}}, SHIFT(786), + [3491] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), + [3493] = {.entry = {.count = 1, .reusable = true}}, SHIFT(908), + [3495] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1115), + [3497] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1117), + [3499] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1132), + [3501] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), + [3503] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1377), + [3505] = {.entry = {.count = 1, .reusable = true}}, SHIFT(343), + [3507] = {.entry = {.count = 1, .reusable = true}}, SHIFT(476), + [3509] = {.entry = {.count = 1, .reusable = true}}, SHIFT(366), + [3511] = {.entry = {.count = 1, .reusable = true}}, SHIFT(448), + [3513] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_elif_in_field_declaration_list, 4, .production_id = 54), + [3515] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1216), + [3517] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_elif_in_field_declaration_list, 5, .production_id = 66), + [3519] = {.entry = {.count = 1, .reusable = true}}, SHIFT(469), + [3521] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [3523] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), + [3525] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1412), + [3527] = {.entry = {.count = 1, .reusable = true}}, SHIFT(128), + [3529] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1230), + [3531] = {.entry = {.count = 1, .reusable = true}}, SHIFT(284), + [3533] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), + [3535] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [3537] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), + [3539] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1210), + [3541] = {.entry = {.count = 1, .reusable = true}}, SHIFT(443), + [3543] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), + [3545] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1425), + [3547] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), + [3549] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), + [3551] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1249), + [3553] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [3555] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), + [3557] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [3559] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), +}; + +#ifdef __cplusplus +extern "C" { +#endif +#ifdef _WIN32 +#define extern __declspec(dllexport) +#endif + +extern const TSLanguage *tree_sitter_c(void) { + static const TSLanguage language = { + .version = LANGUAGE_VERSION, + .symbol_count = SYMBOL_COUNT, + .alias_count = ALIAS_COUNT, + .token_count = TOKEN_COUNT, + .external_token_count = EXTERNAL_TOKEN_COUNT, + .state_count = STATE_COUNT, + .large_state_count = LARGE_STATE_COUNT, + .production_id_count = PRODUCTION_ID_COUNT, + .field_count = FIELD_COUNT, + .max_alias_sequence_length = MAX_ALIAS_SEQUENCE_LENGTH, + .parse_table = &ts_parse_table[0][0], + .small_parse_table = ts_small_parse_table, + .small_parse_table_map = ts_small_parse_table_map, + .parse_actions = ts_parse_actions, + .symbol_names = ts_symbol_names, + .field_names = ts_field_names, + .field_map_slices = ts_field_map_slices, + .field_map_entries = ts_field_map_entries, + .symbol_metadata = ts_symbol_metadata, + .public_symbol_map = ts_symbol_map, + .alias_map = ts_non_terminal_alias_map, + .alias_sequences = &ts_alias_sequences[0][0], + .lex_modes = ts_lex_modes, + .lex_fn = ts_lex, + .keyword_lex_fn = ts_lex_keywords, + .keyword_capture_token = sym_identifier, + }; + return &language; +} +#ifdef __cplusplus +} +#endif diff --git a/tree-sitter-c/src/tree_sitter/parser.h b/tree-sitter-c/src/tree_sitter/parser.h new file mode 100644 index 0000000..2b14ac1 --- /dev/null +++ b/tree-sitter-c/src/tree_sitter/parser.h @@ -0,0 +1,224 @@ +#ifndef TREE_SITTER_PARSER_H_ +#define TREE_SITTER_PARSER_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +#define ts_builtin_sym_error ((TSSymbol)-1) +#define ts_builtin_sym_end 0 +#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024 + +typedef uint16_t TSStateId; + +#ifndef TREE_SITTER_API_H_ +typedef uint16_t TSSymbol; +typedef uint16_t TSFieldId; +typedef struct TSLanguage TSLanguage; +#endif + +typedef struct { + TSFieldId field_id; + uint8_t child_index; + bool inherited; +} TSFieldMapEntry; + +typedef struct { + uint16_t index; + uint16_t length; +} TSFieldMapSlice; + +typedef struct { + bool visible; + bool named; + bool supertype; +} TSSymbolMetadata; + +typedef struct TSLexer TSLexer; + +struct TSLexer { + int32_t lookahead; + TSSymbol result_symbol; + void (*advance)(TSLexer *, bool); + void (*mark_end)(TSLexer *); + uint32_t (*get_column)(TSLexer *); + bool (*is_at_included_range_start)(const TSLexer *); + bool (*eof)(const TSLexer *); +}; + +typedef enum { + TSParseActionTypeShift, + TSParseActionTypeReduce, + TSParseActionTypeAccept, + TSParseActionTypeRecover, +} TSParseActionType; + +typedef union { + struct { + uint8_t type; + TSStateId state; + bool extra; + bool repetition; + } shift; + struct { + uint8_t type; + uint8_t child_count; + TSSymbol symbol; + int16_t dynamic_precedence; + uint16_t production_id; + } reduce; + uint8_t type; +} TSParseAction; + +typedef struct { + uint16_t lex_state; + uint16_t external_lex_state; +} TSLexMode; + +typedef union { + TSParseAction action; + struct { + uint8_t count; + bool reusable; + } entry; +} TSParseActionEntry; + +struct TSLanguage { + uint32_t version; + uint32_t symbol_count; + uint32_t alias_count; + uint32_t token_count; + uint32_t external_token_count; + uint32_t state_count; + uint32_t large_state_count; + uint32_t production_id_count; + uint32_t field_count; + uint16_t max_alias_sequence_length; + const uint16_t *parse_table; + const uint16_t *small_parse_table; + const uint32_t *small_parse_table_map; + const TSParseActionEntry *parse_actions; + const char * const *symbol_names; + const char * const *field_names; + const TSFieldMapSlice *field_map_slices; + const TSFieldMapEntry *field_map_entries; + const TSSymbolMetadata *symbol_metadata; + const TSSymbol *public_symbol_map; + const uint16_t *alias_map; + const TSSymbol *alias_sequences; + const TSLexMode *lex_modes; + bool (*lex_fn)(TSLexer *, TSStateId); + bool (*keyword_lex_fn)(TSLexer *, TSStateId); + TSSymbol keyword_capture_token; + struct { + const bool *states; + const TSSymbol *symbol_map; + void *(*create)(void); + void (*destroy)(void *); + bool (*scan)(void *, TSLexer *, const bool *symbol_whitelist); + unsigned (*serialize)(void *, char *); + void (*deserialize)(void *, const char *, unsigned); + } external_scanner; + const TSStateId *primary_state_ids; +}; + +/* + * Lexer Macros + */ + +#define START_LEXER() \ + bool result = false; \ + bool skip = false; \ + bool eof = false; \ + int32_t lookahead; \ + goto start; \ + next_state: \ + lexer->advance(lexer, skip); \ + start: \ + skip = false; \ + lookahead = lexer->lookahead; + +#define ADVANCE(state_value) \ + { \ + state = state_value; \ + goto next_state; \ + } + +#define SKIP(state_value) \ + { \ + skip = true; \ + state = state_value; \ + goto next_state; \ + } + +#define ACCEPT_TOKEN(symbol_value) \ + result = true; \ + lexer->result_symbol = symbol_value; \ + lexer->mark_end(lexer); + +#define END_STATE() return result; + +/* + * Parse Table Macros + */ + +#define SMALL_STATE(id) id - LARGE_STATE_COUNT + +#define STATE(id) id + +#define ACTIONS(id) id + +#define SHIFT(state_value) \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = state_value \ + } \ + }} + +#define SHIFT_REPEAT(state_value) \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = state_value, \ + .repetition = true \ + } \ + }} + +#define SHIFT_EXTRA() \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .extra = true \ + } \ + }} + +#define REDUCE(symbol_val, child_count_val, ...) \ + {{ \ + .reduce = { \ + .type = TSParseActionTypeReduce, \ + .symbol = symbol_val, \ + .child_count = child_count_val, \ + __VA_ARGS__ \ + }, \ + }} + +#define RECOVER() \ + {{ \ + .type = TSParseActionTypeRecover \ + }} + +#define ACCEPT_INPUT() \ + {{ \ + .type = TSParseActionTypeAccept \ + }} + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_PARSER_H_ diff --git a/tree-sitter-c/test/corpus/ambiguities.txt b/tree-sitter-c/test/corpus/ambiguities.txt new file mode 100644 index 0000000..cebb6fb --- /dev/null +++ b/tree-sitter-c/test/corpus/ambiguities.txt @@ -0,0 +1,178 @@ +======================================================================== +pointer declarations vs multiplications +======================================================================== + +int main() { + // declare a function pointer + T1 * b(T2 a); + + // evaluate expressions + c * d(5); + e(f * g); +} + +--- + +(translation_unit (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (comment) + (declaration + (type_identifier) + (pointer_declarator (function_declarator + (identifier) + (parameter_list (parameter_declaration (type_identifier) (identifier)))))) + (comment) + (expression_statement (binary_expression + (identifier) + (call_expression (identifier) (argument_list (number_literal))))) + (expression_statement (call_expression + (identifier) + (argument_list (binary_expression (identifier) (identifier)))))))) + +======================================================================== +casts vs multiplications +======================================================================== + +/* + * ambiguities + */ + +int main() { + // cast + a((B *)c); + + // parenthesized product + d((e * f)); +} + +--- + +(translation_unit + (comment) + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (comment) + (expression_statement (call_expression + (identifier) + (argument_list (cast_expression (type_descriptor (type_identifier) (abstract_pointer_declarator)) (identifier))))) + (comment) + (expression_statement (call_expression + (identifier) + (argument_list (parenthesized_expression (binary_expression (identifier) (identifier))))))))) + +======================================================================== +function-like type macros vs function calls +======================================================================== + +// this is a macro +GIT_INLINE(int *) x = 5; + +--- + +(translation_unit + (comment) + (declaration + (macro_type_specifier (identifier) (type_descriptor (primitive_type) (abstract_pointer_declarator))) + (init_declarator (identifier) (number_literal)))) + +======================================================================== +function calls vs parenthesized declarators vs macro types +======================================================================== + +int main() { + /* + * Could be either: + * - function call + * - declaration w/ parenthesized declarator + * - declaration w/ macro type, no declarator + */ + ABC(d); + + /* + * Normal declaration + */ + efg hij; +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (comment) + (expression_statement (call_expression (identifier) (argument_list (identifier)))) + (comment) + (declaration (type_identifier) (identifier))))) + +======================================================================== +Call expressions vs empty declarations w/ macros as types +======================================================================== + +int main() { + int a = 1; + b(a); + A(A *); +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (declaration (primitive_type) (init_declarator (identifier) (number_literal))) + (expression_statement (call_expression (identifier) (argument_list (identifier)))) + (macro_type_specifier + (identifier) + (type_descriptor (type_identifier) (abstract_pointer_declarator)))))) + +======================================================================== +Comments after for loops with ambiguities +======================================================================== + +int main() { + for (a *b = c; d; e) { + aff; + } + + // a-comment + + g; +} + +--- + +(translation_unit (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (for_statement + (declaration (type_identifier) (init_declarator + (pointer_declarator (identifier)) + (identifier))) + (identifier) + (identifier) + (compound_statement + (expression_statement (identifier)))) + (comment) + (expression_statement (identifier))))) + +=============================================== +Top-level macro invocations +=============================================== + +DEFINE_SOMETHING(THING_A, "this is a thing a"); +DEFINE_SOMETHING(THING_B, "this is a thing b", "thanks"); + +--- + +(translation_unit + (expression_statement (call_expression (identifier) (argument_list (identifier) (string_literal)))) + (expression_statement (call_expression (identifier) (argument_list (identifier) (string_literal) (string_literal))))) diff --git a/tree-sitter-c/test/corpus/crlf.txt b/tree-sitter-c/test/corpus/crlf.txt new file mode 100644 index 0000000..9673cae --- /dev/null +++ b/tree-sitter-c/test/corpus/crlf.txt @@ -0,0 +1,13 @@ +============================================ +Line comments with escaped CRLF line endings +============================================ + +// hello \ + this is still a comment +this_is_not a_comment; + +--- + +(translation_unit + (comment) + (declaration (type_identifier) (identifier))) diff --git a/tree-sitter-c/test/corpus/declarations.txt b/tree-sitter-c/test/corpus/declarations.txt new file mode 100644 index 0000000..b2bceab --- /dev/null +++ b/tree-sitter-c/test/corpus/declarations.txt @@ -0,0 +1,530 @@ +============================================ +Struct declarations +============================================ + +struct s1; + +struct s2 { + int x; + float y : 5; +}; + +--- + +(translation_unit + (struct_specifier + name: (type_identifier)) + (struct_specifier + name: (type_identifier) + body: (field_declaration_list + (field_declaration + type: (primitive_type) + declarator: (field_identifier)) + (field_declaration + type: (primitive_type) + declarator: (field_identifier) + (bitfield_clause (number_literal)))))) + +============================================ +Union declarations +============================================ + +union u1; + +union s2 { + int x; + float y; +}; + +--- + +(translation_unit + (union_specifier + name: (type_identifier)) + (union_specifier + name: (type_identifier) + body: (field_declaration_list + (field_declaration + type: (primitive_type) + declarator: (field_identifier)) + (field_declaration + type: (primitive_type) + declarator: (field_identifier))))) + +============================================ +Enum declarations +============================================ + +enum e1; + +enum e2 { + val1, + val2 = 5, + val3 +}; + +enum e3 { + val1, +}; + +--- + +(translation_unit + (enum_specifier + name: (type_identifier)) + (enum_specifier + name: (type_identifier) + body: (enumerator_list + (enumerator name: (identifier)) + (enumerator name: (identifier) value: (number_literal)) + (enumerator name: (identifier)))) + (enum_specifier + name: (type_identifier) + body: (enumerator_list + (enumerator name: (identifier))))) + +====================================================== +Struct declarations containing preprocessor directives +====================================================== + +struct s { + #define A 5 + int b[a]; + #undef A +}; + +--- + +(translation_unit + (struct_specifier + (type_identifier) + (field_declaration_list + (preproc_def (identifier) (preproc_arg)) + (field_declaration (primitive_type) (array_declarator (field_identifier) (identifier))) + (preproc_call (preproc_directive) (preproc_arg))))) + +============================================ +Primitive-typed variable declarations +============================================ + +unsigned short int a; +long int b, c = 5, d; +float d, e; +unsigned f; +short g, h; + +--- + +(translation_unit + (declaration + type: (sized_type_specifier type: (primitive_type)) + declarator: (identifier)) + (declaration + type: (sized_type_specifier type: (primitive_type)) + declarator: (identifier) + declarator: (init_declarator + declarator: (identifier) + value: (number_literal)) + declarator: (identifier)) + (declaration + type: (primitive_type) + declarator: (identifier) + declarator: (identifier)) + (declaration + type: (sized_type_specifier) + declarator: (identifier)) + (declaration + type: (sized_type_specifier) + declarator: (identifier) + declarator: (identifier))) + +============================================ +Variable storage classes +============================================ + +int a; +extern int b, c; +auto int d; +register int e; +static int f; + +--- + +(translation_unit + (declaration (primitive_type) (identifier)) + (declaration (storage_class_specifier) (primitive_type) (identifier) (identifier)) + (declaration (storage_class_specifier) (primitive_type) (identifier)) + (declaration (storage_class_specifier) (primitive_type) (identifier)) + (declaration (storage_class_specifier) (primitive_type) (identifier))) + +============================================ +Composite-typed variable declarations +============================================ + +struct b c; +union { int e; } f; +enum { g, h } i; + +--- + +(translation_unit + (declaration + type: (struct_specifier name: (type_identifier)) + declarator: (identifier)) + (declaration + type: (union_specifier + body: (field_declaration_list + (field_declaration + type: (primitive_type) + declarator: (field_identifier)))) + declarator: (identifier)) + (declaration + type: (enum_specifier body: (enumerator_list + (enumerator name: (identifier)) + (enumerator name: (identifier)))) + declarator: (identifier))) + +============================================ +Pointer variable declarations +============================================ + +char *the_string; +const char **the_strings; +int const * const restrict x; + +--- + +(translation_unit + (declaration + type: (primitive_type) + declarator: (pointer_declarator + declarator: (identifier))) + (declaration + (type_qualifier) + type: (primitive_type) + declarator: (pointer_declarator + declarator: (pointer_declarator + declarator: (identifier)))) + (declaration + type: (primitive_type) + (type_qualifier) + declarator: (pointer_declarator + (type_qualifier) + (type_qualifier) + declarator: (identifier)))) + +============================================ +Typedefs +============================================ + +typedef int my_int; + +typedef struct { + int x; +} *a; + +typedef void my_callback(void *, size_t); + +typedef struct A { + int i; +} a, b; + +--- + +(translation_unit + (type_definition + type: (primitive_type) + declarator: (type_identifier)) + (type_definition + type: (struct_specifier + body: (field_declaration_list + (field_declaration + type: (primitive_type) + declarator: (field_identifier)))) + declarator: (pointer_declarator + declarator: (type_identifier))) + (type_definition + type: (primitive_type) + declarator: (function_declarator + declarator: (type_identifier) + parameters: (parameter_list + (parameter_declaration + type: (primitive_type) + declarator: (abstract_pointer_declarator)) + (parameter_declaration + type: (primitive_type))))) + (type_definition + type: (struct_specifier + name: (type_identifier) + body: (field_declaration_list + (field_declaration + type: (primitive_type) + declarator: (field_identifier)))) + declarator: (type_identifier) + declarator: (type_identifier))) + +============================================ +Function declarations +============================================ + +int main(int argc, const char **argv); +static foo bar(); +static baz quux(...); + +--- + +(translation_unit + (declaration + (primitive_type) + (function_declarator + (identifier) + (parameter_list + (parameter_declaration + (primitive_type) + (identifier)) + (parameter_declaration + (type_qualifier) + (primitive_type) + (pointer_declarator (pointer_declarator (identifier))))))) + + (declaration + (storage_class_specifier) + (type_identifier) + (function_declarator (identifier) (parameter_list))) + + (declaration + (storage_class_specifier) + (type_identifier) + (function_declarator (identifier) (parameter_list (variadic_parameter))))) + +============================================ +Function definitions +============================================ + +void * do_stuff(int arg1) { + return 5; +} + +--- + +(translation_unit + (function_definition + type: (primitive_type) + declarator: (pointer_declarator + declarator: (function_declarator + declarator: (identifier) + parameters: (parameter_list + (parameter_declaration + type: (primitive_type) + declarator: (identifier))))) + body: (compound_statement + (return_statement (number_literal))))) + +============================================ +Function specifiers after types +============================================ + +int static inline do_stuff(int arg1) { + return 5; +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (storage_class_specifier) + (storage_class_specifier) + (function_declarator + (identifier) + (parameter_list (parameter_declaration (primitive_type) (identifier)))) + (compound_statement (return_statement (number_literal))))) + +============================================ +Linkage specifications +============================================ + +extern "C" int foo(); + +extern "C" int foo() { return 0; } + +extern "C" { + int bar(); + int baz(); +} + +--- + +(translation_unit + (linkage_specification + (string_literal) + (declaration + (primitive_type) + (function_declarator (identifier) (parameter_list)))) + (linkage_specification + (string_literal) + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement (return_statement (number_literal))))) + (linkage_specification + (string_literal) + (declaration_list + (declaration + (primitive_type) + (function_declarator (identifier) (parameter_list))) + (declaration + (primitive_type) + (function_declarator (identifier) (parameter_list)))))) + +========================== +Type qualifiers +========================== + +const _Atomic unsigned long int x = 5; +restrict int y = 6; +volatile int z = 7; + +--- + +(translation_unit + (declaration + (type_qualifier) + (type_qualifier) + (sized_type_specifier (primitive_type)) + (init_declarator (identifier) (number_literal))) + (declaration + (type_qualifier) + (primitive_type) + (init_declarator (identifier) (number_literal))) + (declaration + (type_qualifier) + (primitive_type) + (init_declarator (identifier) (number_literal)))) + +================================ +Local array declarations +================================ + +int main() { + char the_buffer[the_size]; + char the_other_buffer[*]; +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (declaration (primitive_type) (array_declarator (identifier) (identifier))) + (declaration (primitive_type) (array_declarator (identifier)))))) + +================================ +Attributes +================================ + +extern __attribute__((visibility("hidden"))) int foo(); +extern int bar() __attribute__((const)); +void die(const char *format, ...) __attribute__((noreturn)) + __attribute__((format(printf,1,2))); +extern __attribute__((visibility("default"), weak)) int print_status(); + +int f([[a::b(c), d]] int x) {} + +[[gnu::always_inline]] [[gnu::hot]] [[gnu::const]] [[nodiscard]] +int g(void); + +[[gnu::always_inline, gnu::hot, gnu::const, nodiscard]] +int g(void); + +int i [[maybe_unused]]; +void f[[gnu::always_inline]](); + +[[nodiscard("reason")]] int foo; + +[[fallthrough]]; + +struct S { + int a [[deprecated]]; +}; + +typedef int MyInt [[deprecated]]; + +--- + +(translation_unit + (declaration + (storage_class_specifier) + (attribute_specifier + (argument_list + (call_expression + (identifier) (argument_list (string_literal))))) + (primitive_type) + (function_declarator (identifier) (parameter_list))) + (declaration + (storage_class_specifier) + (primitive_type) + (function_declarator (identifier) (parameter_list) (attribute_specifier (argument_list (identifier))))) + (declaration + (primitive_type) + (function_declarator (identifier) + (parameter_list (parameter_declaration (type_qualifier) (primitive_type) (pointer_declarator (identifier))) (variadic_parameter)) + (attribute_specifier (argument_list (identifier))) + (attribute_specifier + (argument_list (call_expression (identifier) (argument_list (identifier) (number_literal) (number_literal))))))) + (declaration + (storage_class_specifier) + (attribute_specifier + (argument_list (call_expression (identifier) (argument_list (string_literal))) (identifier))) + (primitive_type) (function_declarator (identifier) (parameter_list))) + (function_definition (primitive_type) + (function_declarator (identifier) (parameter_list (parameter_declaration + (attribute_declaration + (attribute (identifier) (identifier) (argument_list (identifier))) + (attribute (identifier))) + (primitive_type) (identifier)))) (compound_statement)) + (declaration + (attribute_declaration (attribute (identifier) (identifier))) + (attribute_declaration (attribute (identifier) (identifier))) + (attribute_declaration (attribute (identifier) (identifier))) + (attribute_declaration (attribute (identifier))) + (primitive_type) + (function_declarator (identifier) (parameter_list (parameter_declaration (primitive_type))))) + (declaration + (attribute_declaration + (attribute (identifier) (identifier)) + (attribute (identifier) (identifier)) + (attribute (identifier) (identifier)) + (attribute (identifier))) + (primitive_type) + (function_declarator (identifier) (parameter_list (parameter_declaration (primitive_type))))) + (declaration + (primitive_type) + (attributed_declarator + (identifier) + (attribute_declaration (attribute (identifier))))) + (declaration + (primitive_type) + (function_declarator + (attributed_declarator + (identifier) + (attribute_declaration (attribute (identifier) (identifier)))) + (parameter_list))) + (declaration + (attribute_declaration (attribute (identifier) (argument_list (string_literal)))) + (primitive_type) (identifier)) + (attributed_statement + (attribute_declaration (attribute (identifier))) + (expression_statement)) + (struct_specifier + (type_identifier) + (field_declaration_list (field_declaration (primitive_type) + (attributed_declarator + (field_identifier) + (attribute_declaration (attribute (identifier))))))) + (type_definition (primitive_type) + (attributed_declarator + (type_identifier) + (attribute_declaration (attribute (identifier)))))) diff --git a/tree-sitter-c/test/corpus/expressions.txt b/tree-sitter-c/test/corpus/expressions.txt new file mode 100644 index 0000000..2d871e2 --- /dev/null +++ b/tree-sitter-c/test/corpus/expressions.txt @@ -0,0 +1,518 @@ +============================================ +Number literals +============================================ + +double a = { + 0xAC00, + 0.123, + 0b1010001, + 0xabc00ull, + -0.1f, + 1'000'000.000'001, + 24e-5, + 0.1E, + 58., + 4e2, + 123.456e-67, + .1E4f, + 0x10.1p0, +}; + +--- + +(translation_unit + (declaration + (primitive_type) + (init_declarator + (identifier) + (initializer_list + (number_literal) + (number_literal) + (number_literal) + (number_literal) + (number_literal) + (number_literal) + (number_literal) + (number_literal) + (number_literal) + (number_literal) + (number_literal) + (number_literal) + (number_literal) + )))) + +============================================ +Identifiers +============================================ + +int main() { + _abc; + d_EG123; +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (expression_statement (identifier)) + (expression_statement (identifier))))) + +============================================ +Common constants +============================================ + +int main() { + true; + false; + NULL; + + // regression test - identifiers starting w/ these strings should tokenize correctly. + true_value; + false_value; + NULL_value; +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (expression_statement (true)) + (expression_statement (false)) + (expression_statement (null)) + (comment) + (expression_statement (identifier)) + (expression_statement (identifier)) + (expression_statement (identifier))))) + +============================================ +Function calls +============================================ + +int main() { + printf("hi! %d\n", x); +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (expression_statement (call_expression + (identifier) + (argument_list (string_literal (escape_sequence)) (identifier))))))) + +============================================ +String literals +============================================ + +int main() { + "a"; + "b" "c" "d"; + "\"hi\""; + L"bonjour"; + u"guten morgen"; + U"buenos dias"; + u8"buongiorno"; +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (expression_statement (string_literal)) + (expression_statement (concatenated_string (string_literal) (string_literal) (string_literal))) + (expression_statement (string_literal (escape_sequence) (escape_sequence))) + (expression_statement (string_literal)) + (expression_statement (string_literal)) + (expression_statement (string_literal)) + (expression_statement (string_literal))))) + +============================================ +Character literals +============================================ + +int main() { + 'a'; + '\0'; + '\t'; + '\''; + L'b'; + u'c'; + U'\xa1'; + u8'\x1A'; +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (expression_statement (char_literal)) + (expression_statement (char_literal (escape_sequence))) + (expression_statement (char_literal (escape_sequence))) + (expression_statement (char_literal (escape_sequence))) + (expression_statement (char_literal)) + (expression_statement (char_literal)) + (expression_statement (char_literal (escape_sequence))) + (expression_statement (char_literal (escape_sequence)))))) + +============================================ +Field access +============================================ + +int main() { + s.data1; + p->data2; + q[data3]; +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (expression_statement (field_expression (identifier) (field_identifier))) + (expression_statement (field_expression (identifier) (field_identifier))) + (expression_statement (subscript_expression (identifier) (identifier)))))) + +============================================ +Boolean operators +============================================ + +int main() { + !x || !y && !z; +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (expression_statement (binary_expression + (unary_expression (identifier)) + (binary_expression + (unary_expression (identifier)) + (unary_expression (identifier)))))))) + +============================================ +Math operators +============================================ + +int main() { + -a / b + c * -d; + a++ - ++b + c-- + --d; + ++L; + } + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (expression_statement (binary_expression + (binary_expression + (unary_expression (identifier)) + (identifier)) + (binary_expression + (identifier) + (unary_expression (identifier))))) + (expression_statement + (binary_expression + (binary_expression + (binary_expression + (update_expression (identifier)) + (update_expression (identifier))) + (update_expression (identifier))) + (update_expression (identifier)))) + (expression_statement (update_expression (identifier)))))) + +============================================ +The comma operator +============================================ + +int main() { + i--, j--; + (i--, j--); +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (expression_statement + (comma_expression + (update_expression (identifier)) + (update_expression (identifier)))) + (expression_statement + (parenthesized_expression + (comma_expression + (update_expression (identifier)) + (update_expression (identifier)))))))) + +============================================ +Assignments +============================================ + +int main() { + static int a = 1; + b = *c = 2; + d.e = 3; + f->g = 4; + h[i] = j; + k += l; + m -= o; + n *= p; + q /= r; + *s++ = 1; + (*t) = 1; +} + +--- + +(translation_unit + (function_definition + type: (primitive_type) + declarator: (function_declarator + declarator: (identifier) + parameters: (parameter_list)) + body: (compound_statement + (declaration + (storage_class_specifier) + type: (primitive_type) + declarator: (init_declarator + declarator: (identifier) + value: (number_literal))) + (expression_statement (assignment_expression + left: (identifier) + right: (assignment_expression + left: (pointer_expression + argument: (identifier)) + right: (number_literal)))) + (expression_statement (assignment_expression + left: (field_expression + argument: (identifier) + field: (field_identifier)) + right: (number_literal))) + (expression_statement (assignment_expression + left: (field_expression + argument: (identifier) + field: (field_identifier)) + right: (number_literal))) + (expression_statement (assignment_expression + left: (subscript_expression + argument: (identifier) + index: (identifier)) + right: (identifier))) + (expression_statement (assignment_expression + left: (identifier) + right: (identifier))) + (expression_statement (assignment_expression + left: (identifier) + right: (identifier))) + (expression_statement (assignment_expression + left: (identifier) + right: (identifier))) + (expression_statement (assignment_expression + left: (identifier) + right: (identifier))) + (expression_statement (assignment_expression + left: (pointer_expression + argument: (update_expression + argument: (identifier))) + right: (number_literal))) + (expression_statement (assignment_expression + left: (parenthesized_expression (pointer_expression + argument: (identifier))) + right: (number_literal)))))) + +============================================ +Pointer operations +============================================ + +int main() { + doSomething(&x, *x); +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (expression_statement (call_expression + (identifier) + (argument_list + (pointer_expression (identifier)) + (pointer_expression (identifier)))))))) + +============================================ +Type-casts +============================================ + +int main() { + x = (const SomeType *)thing; +} + +--- + +(translation_unit + (function_definition + type: (primitive_type) + declarator: (function_declarator + declarator: (identifier) + parameters: (parameter_list)) + body: (compound_statement + (expression_statement (assignment_expression + left: (identifier) + right: (cast_expression + type: (type_descriptor + (type_qualifier) + type: (type_identifier) + declarator: (abstract_pointer_declarator)) + value: (identifier))))))) + +============================================ +Sizeof expressions +============================================ + +int main() { + sizeof x.a; + sizeof(x.a); + sizeof(const char **); + sizeof(char * ()); +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (expression_statement (sizeof_expression (field_expression (identifier) (field_identifier)))) + (expression_statement (sizeof_expression (parenthesized_expression (field_expression (identifier) (field_identifier))))) + (expression_statement (sizeof_expression + (type_descriptor (type_qualifier) (primitive_type) (abstract_pointer_declarator (abstract_pointer_declarator))))) + (expression_statement (sizeof_expression + (type_descriptor (primitive_type) (abstract_pointer_declarator (abstract_function_declarator (parameter_list))))))))) + +============================================ +Compound literals +============================================ + +int main() { + x = (SomeType) { + .f1.f2[f3] = 5, + .f4 = {} + }; + y = (struct SomeStruct) { + 7, + 8 + }; + z = (char const []) {'a', 'b'}; +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (expression_statement (assignment_expression + (identifier) + (compound_literal_expression + (type_descriptor (type_identifier)) + (initializer_list + (initializer_pair + (field_designator (field_identifier)) + (field_designator (field_identifier)) + (subscript_designator (identifier)) + (number_literal)) + (initializer_pair + (field_designator (field_identifier)) + (initializer_list)))))) + (expression_statement (assignment_expression + (identifier) + (compound_literal_expression + (type_descriptor (struct_specifier (type_identifier))) + (initializer_list + (number_literal) + (number_literal))))) + (expression_statement + (assignment_expression + (identifier) + (compound_literal_expression + (type_descriptor (primitive_type) (type_qualifier) (abstract_array_declarator)) + (initializer_list (char_literal) (char_literal)))))))) + +============================================ +Compound literals with trailing commas +============================================ + +int main() { + y = (struct SomeStruct) { 7, 8, }; +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (expression_statement (assignment_expression + (identifier) + (compound_literal_expression + (type_descriptor (struct_specifier (type_identifier))) + (initializer_list + (number_literal) + (number_literal)))))))) + +==================================== +Comments with escaped newlines +==================================== + +// one \ + two + +--- + +(translation_unit + (comment)) + +============================================== +Comments with escaped chars and newlines +============================================== + +// one \a \b \ + two +// one \c \d +--- + +(translation_unit + (comment) + (comment)) diff --git a/tree-sitter-c/test/corpus/microsoft.txt b/tree-sitter-c/test/corpus/microsoft.txt new file mode 100644 index 0000000..c0dfc67 --- /dev/null +++ b/tree-sitter-c/test/corpus/microsoft.txt @@ -0,0 +1,187 @@ +================================ +declaration specs +================================ + +struct __declspec(dllexport) s2 +{ +}; + +union __declspec(noinline) u2 { +}; + +--- + +(translation_unit + (struct_specifier + (ms_declspec_modifier + (identifier)) + name: (type_identifier) + body: (field_declaration_list)) + (union_specifier + (ms_declspec_modifier + (identifier)) + name: (type_identifier) + body: (field_declaration_list))) + +================================ +pointers +================================ + +struct s2 +{ + int * __restrict x; + int * __sptr psp; + int * __uptr pup; + int * __unaligned pup; +}; + +void sum2(int n, int * __restrict a, int * __restrict b, + int * c, int * d) { + int i; + for (i = 0; i < n; i++) { + a[i] = b[i] + c[i]; + c[i] = b[i] + d[i]; + } +} + +void MyFunction(char * __uptr myValue); + +--- + +(translation_unit + (struct_specifier + name: (type_identifier) + body: (field_declaration_list + (field_declaration + type: (primitive_type) + declarator: (pointer_declarator + (ms_pointer_modifier + (ms_restrict_modifier)) + declarator: (field_identifier))) + (field_declaration + type: (primitive_type) + declarator: (pointer_declarator + (ms_pointer_modifier + (ms_signed_ptr_modifier)) + declarator: (field_identifier))) + (field_declaration + type: (primitive_type) + declarator: (pointer_declarator + (ms_pointer_modifier + (ms_unsigned_ptr_modifier)) + declarator: (field_identifier))) + (field_declaration + type: (primitive_type) + declarator: (pointer_declarator + (ms_pointer_modifier + (ms_unaligned_ptr_modifier)) + declarator: (field_identifier))))) + (function_definition + type: (primitive_type) + declarator: (function_declarator + declarator: (identifier) + parameters: (parameter_list + (parameter_declaration + type: (primitive_type) + declarator: (identifier)) + (parameter_declaration + type: (primitive_type) + declarator: (pointer_declarator + (ms_pointer_modifier + (ms_restrict_modifier)) + declarator: (identifier))) + (parameter_declaration + type: (primitive_type) + declarator: (pointer_declarator + (ms_pointer_modifier + (ms_restrict_modifier)) + declarator: (identifier))) + (parameter_declaration + type: (primitive_type) + declarator: (pointer_declarator + declarator: (identifier))) + (parameter_declaration + type: (primitive_type) + declarator: (pointer_declarator + declarator: (identifier))))) + body: (compound_statement + (declaration + type: (primitive_type) + declarator: (identifier)) + (for_statement + initializer: (assignment_expression + left: (identifier) + right: (number_literal)) + condition: (binary_expression + left: (identifier) + right: (identifier)) + update: (update_expression + argument: (identifier)) + body: (compound_statement + (expression_statement + (assignment_expression + left: (subscript_expression + argument: (identifier) + index: (identifier)) + right: (binary_expression + left: (subscript_expression + argument: (identifier) + index: (identifier)) + right: (subscript_expression + argument: (identifier) + index: (identifier))))) + (expression_statement + (assignment_expression + left: (subscript_expression + argument: (identifier) + index: (identifier)) + right: (binary_expression + left: (subscript_expression + argument: (identifier) + index: (identifier)) + right: (subscript_expression + argument: (identifier) + index: (identifier))))))))) + (declaration + type: (primitive_type) + declarator: (function_declarator + declarator: (identifier) + parameters: (parameter_list + (parameter_declaration + type: (primitive_type) + declarator: (pointer_declarator + (ms_pointer_modifier + (ms_unsigned_ptr_modifier)) + declarator: (identifier))))))) + +================================ +call modifiers +================================ + +__cdecl void mymethod(){ + return; +} + +__fastcall void mymethod(){ + return; +} + +--- + +(translation_unit + (function_definition + (ms_call_modifier) + type: (primitive_type) + declarator: (function_declarator + declarator: (identifier) + parameters: (parameter_list)) + body: (compound_statement + (return_statement))) + (function_definition + (ms_call_modifier) + type: (primitive_type) + declarator: (function_declarator + declarator: (identifier) + parameters: (parameter_list)) + body: (compound_statement + (return_statement)))) diff --git a/tree-sitter-c/test/corpus/preprocessor.txt b/tree-sitter-c/test/corpus/preprocessor.txt new file mode 100644 index 0000000..3c52d1d --- /dev/null +++ b/tree-sitter-c/test/corpus/preprocessor.txt @@ -0,0 +1,274 @@ +============================================ +Include directives +============================================ + +#include "some/path.h" +#include +#include MACRO +#include MACRO(arg1, arg2) + +--- + +(translation_unit + (preproc_include path: (string_literal)) + (preproc_include path: (system_lib_string)) + (preproc_include path: (identifier)) + (preproc_include path: + (call_expression + function: (identifier) + arguments: (argument_list (identifier) (identifier))))) + +============================================ +Object-like macro definitions +============================================ + +#define ONE +#define TWO int a = b; +#define THREE \ + c == d ? \ + e : \ + f +#define FOUR (mno * pq) +#define FIVE(a,b) x \ + + y +#define SIX(a, \ + b) x \ + + y + +--- + +(translation_unit + (preproc_def name: (identifier)) + (preproc_def name: (identifier) value: (preproc_arg)) + (preproc_def name: (identifier) value: (preproc_arg)) + (preproc_def name: (identifier) value: (preproc_arg)) + (preproc_function_def name: (identifier) parameters: (preproc_params (identifier) (identifier)) value: (preproc_arg)) + (preproc_function_def name: (identifier) parameters: (preproc_params (identifier) (identifier)) value: (preproc_arg))) + +============================================ +Function-like macro definitions +============================================ + +#define ONE() a +#define TWO(b) c +#define THREE(d, e) f +#define FOUR(...) g +#define FIVE(h, i, ...) j + +--- + +(translation_unit + (preproc_function_def + name: (identifier) + parameters: (preproc_params) + value: (preproc_arg)) + (preproc_function_def + name: (identifier) + parameters: (preproc_params (identifier)) + value: (preproc_arg)) + (preproc_function_def + name: (identifier) + parameters: (preproc_params (identifier) (identifier)) + value: (preproc_arg)) + (preproc_function_def + name: (identifier) + parameters: (preproc_params) + value: (preproc_arg)) + (preproc_function_def + name: (identifier) + parameters: (preproc_params (identifier) (identifier)) + value: (preproc_arg))) + +============================================ +Ifdefs +============================================ + +#ifndef DEFINE1 +int j; +#endif + +#ifdef DEFINE2 +ssize_t b; +#define c 32 +#elif defined DEFINE3 +#else +int b; +#define c 16 +#endif + +#ifdef DEFINE2 +#else +# ifdef DEFINE3 +# else +# endif +#endif + +--- + +(translation_unit + (preproc_ifdef + name: (identifier) + (declaration + type: (primitive_type) + declarator: (identifier))) + + (preproc_ifdef + name: (identifier) + (declaration + type: (primitive_type) + declarator: (identifier)) + (preproc_def + name: (identifier) + value: (preproc_arg)) + alternative: (preproc_elif + condition: (preproc_defined (identifier)) + alternative: (preproc_else + (declaration + type: (primitive_type) + declarator: (identifier)) + (preproc_def + name: (identifier) + value: (preproc_arg))))) + + (preproc_ifdef + name: (identifier) + alternative: (preproc_else + (preproc_ifdef + name: (identifier) + alternative: (preproc_else))))) + +=============================================================== +General if blocks +========================================== + +#if defined(__GNUC__) && defined(__PIC__) +#define inline inline __attribute__((always_inline)) +#elif defined(_WIN32) +#define something +#elif !defined(SOMETHING_ELSE) +#define SOMETHING_ELSE +#else +#include +#endif + +--- + +(translation_unit + (preproc_if + condition: (binary_expression + left: (preproc_defined (identifier)) + right: (preproc_defined (identifier))) + (preproc_def + name: (identifier) + value: (preproc_arg)) + alternative: (preproc_elif + condition: (preproc_defined (identifier)) + (preproc_def + name: (identifier)) + alternative: (preproc_elif + condition: (unary_expression + argument: (preproc_defined (identifier))) + (preproc_def + name: (identifier)) + alternative: (preproc_else + (preproc_include path: (system_lib_string))))))) + +============================================ +Preprocessor conditionals in functions +============================================ + +int main() { + #if d + puts("1"); + #else + puts("2"); + #endif + + #if a + return 0; + #elif b + return 1; + #elif c + return 2; + #else + return 3; + #endif +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (preproc_if + (identifier) + (expression_statement (call_expression (identifier) (argument_list (string_literal)))) + (preproc_else + (expression_statement (call_expression (identifier) (argument_list (string_literal)))))) + (preproc_if + (identifier) + (return_statement (number_literal)) + (preproc_elif + (identifier) + (return_statement (number_literal)) + (preproc_elif + (identifier) + (return_statement (number_literal)) + (preproc_else + (return_statement (number_literal))))))))) + +================================================= +Preprocessor conditionals in struct/union bodies +================================================= + +struct S { +#ifdef _WIN32 + LONG f2; +#else + uint32_t f2; +#endif +}; + +--- + +(translation_unit + (struct_specifier (type_identifier) (field_declaration_list + (preproc_ifdef (identifier) + (field_declaration (type_identifier) (field_identifier)) + (preproc_else + (field_declaration (primitive_type) (field_identifier))))))) + +==================================== +Unknown preprocessor directives +==================================== + +#pragma mark - UIViewController + +--- + +(translation_unit (preproc_call + directive: (preproc_directive) + argument: (preproc_arg))) + +====================================== +Preprocessor expressions +====================================== + +#if A(B || C) && \ + !D(F) + +uint32_t a; + +#endif + +--- + +(translation_unit + (preproc_if + (binary_expression + (call_expression (identifier) (argument_list (binary_expression (identifier) (identifier)))) + (unary_expression + (call_expression (identifier) (argument_list (identifier))))) + (declaration (primitive_type) (identifier)))) diff --git a/tree-sitter-c/test/corpus/statements.txt b/tree-sitter-c/test/corpus/statements.txt new file mode 100644 index 0000000..45a42f3 --- /dev/null +++ b/tree-sitter-c/test/corpus/statements.txt @@ -0,0 +1,326 @@ +============================================ +If statements +============================================ + +int main() { + if (a) + 1; + + if (!a) { + 2; + } else { + 3; + } +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (if_statement (parenthesized_expression (identifier)) + (expression_statement (number_literal))) + (if_statement (parenthesized_expression (unary_expression (identifier))) + (compound_statement + (expression_statement (number_literal))) + (compound_statement + (expression_statement (number_literal))))))) + +============================================ +For loops +============================================ + +int main() { + for (;;) + 1; + + for (int i = 0; i < 5; next(), i++) { + 2; + } + + for (start(); check(); step()) + 3; + + for (i = 0, j = 0, k = 0, l = 0; i < 1, j < 1; i++, j++, k++, l++) + 1; +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (for_statement + (expression_statement (number_literal))) + (for_statement + (declaration (primitive_type) (init_declarator (identifier) (number_literal))) + (binary_expression (identifier) (number_literal)) + (comma_expression + (call_expression (identifier) (argument_list)) + (update_expression (identifier))) + (compound_statement (expression_statement (number_literal)))) + (for_statement + (call_expression (identifier) (argument_list)) + (call_expression (identifier) (argument_list)) + (call_expression (identifier) (argument_list)) + (expression_statement (number_literal))) + (for_statement + (comma_expression + (assignment_expression (identifier) (number_literal)) + (comma_expression + (assignment_expression (identifier) (number_literal)) + (comma_expression + (assignment_expression (identifier) (number_literal)) + (assignment_expression (identifier) (number_literal))))) + (comma_expression + (binary_expression + (identifier) + (number_literal)) + (binary_expression + (identifier) + (number_literal))) + (comma_expression + (update_expression (identifier)) + (comma_expression + (update_expression (identifier)) + (comma_expression + (update_expression (identifier)) + (update_expression (identifier))))) + (expression_statement (number_literal)))))) + +============================================ +While loops +============================================ + +int main() { + while (x) + printf("hi"); +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (while_statement (parenthesized_expression (identifier)) + (expression_statement (call_expression + (identifier) + (argument_list (string_literal)))))))) + +============================================ +Labeled statements +============================================ + +void foo(T *t) { +recur: + t = t->next(); + if (t) goto recur; +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list + (parameter_declaration (type_identifier) (pointer_declarator (identifier))))) + (compound_statement + (labeled_statement (statement_identifier) + (expression_statement (assignment_expression + (identifier) + (call_expression (field_expression (identifier) (field_identifier)) (argument_list))))) + (if_statement (parenthesized_expression (identifier)) (goto_statement (statement_identifier)))))) + +============================================ +Switch statements +============================================ + +void foo(int a) { + switch (a) { + puts("entered switch!"); + + case 3: + case 5: + if (b) { + c(); + } + break; + + default: + c(); + break; + } +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list + (parameter_declaration (primitive_type) (identifier)))) + (compound_statement + (switch_statement + (parenthesized_expression (identifier)) + (compound_statement + (expression_statement (call_expression (identifier) (argument_list (string_literal)))) + (case_statement (number_literal)) + (case_statement (number_literal) + (if_statement + (parenthesized_expression (identifier)) + (compound_statement (expression_statement (call_expression (identifier) (argument_list))))) + (break_statement)) + (case_statement + (expression_statement (call_expression (identifier) (argument_list))) + (break_statement))))))) + +============================================ +Case statements separate from switch statements +============================================ + +int main() { + switch (count % 8) { + case 0: + do { + *to = *from++; + case 2: *to = *from++; + case 1: *to = *from++; + } while (--n > 0); + } +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (switch_statement + (parenthesized_expression (binary_expression (identifier) (number_literal))) + (compound_statement + (case_statement (number_literal) + (do_statement + (compound_statement + (expression_statement (assignment_expression + (pointer_expression (identifier)) + (pointer_expression (update_expression (identifier))))) + (case_statement (number_literal) + (expression_statement (assignment_expression + (pointer_expression (identifier)) + (pointer_expression (update_expression (identifier)))))) + (case_statement (number_literal) + (expression_statement (assignment_expression + (pointer_expression (identifier)) + (pointer_expression (update_expression (identifier))))))) + (parenthesized_expression (binary_expression (update_expression (identifier)) (number_literal)))))))))) + +============================================ +Return statements +============================================ + +void foo() { + return; + return a; + return a, b; +} + +--- + +(translation_unit + (function_definition + (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (return_statement) + (return_statement (identifier)) + (return_statement (comma_expression (identifier) (identifier)))))) + +============================================ +Comments with asterisks +============================================ + +/************************* + * odd number of asterisks + *************************/ +int a; + +/************************** + * even number of asterisks + **************************/ +int b; + +--- + +(translation_unit + (comment) + (declaration (primitive_type) (identifier)) + (comment) + (declaration (primitive_type) (identifier))) + +============================================ +Attributes +============================================ + +void f() { + [[a]] switch (b) { + [[c]] case 1: {} + case 2: + [[fallthrough]]; + default: + } + [[a]] while (true) {} + [[a]] if (true) {} + [[a]] for (;;) {} + [[a]] return; + [[a]] a; + [[a]]; + [[a]] label: {} + [[a]] goto label; + + // these are c++ specific, but their bind locations should be c-compatible + if (true) [[likely]] {} else [[unlikely]] {} + do [[likely]] {} while (true); +} + +--- + +(translation_unit + (function_definition (primitive_type) + (function_declarator (identifier) (parameter_list)) + (compound_statement + (attributed_statement + (attribute_declaration (attribute (identifier))) + (switch_statement + (parenthesized_expression (identifier)) + (compound_statement + (attributed_statement + (attribute_declaration (attribute (identifier))) + (case_statement (number_literal) (compound_statement))) + (case_statement (number_literal) + (attributed_statement + (attribute_declaration (attribute (identifier))) + (expression_statement))) + (case_statement)))) + (attributed_statement (attribute_declaration (attribute (identifier))) (while_statement (parenthesized_expression (true)) (compound_statement))) + (attributed_statement (attribute_declaration (attribute (identifier))) (if_statement (parenthesized_expression (true)) (compound_statement))) + (attributed_statement (attribute_declaration (attribute (identifier))) (for_statement (compound_statement))) + (attributed_statement (attribute_declaration (attribute (identifier))) (return_statement)) + (attributed_statement (attribute_declaration (attribute (identifier))) (expression_statement (identifier))) + (attributed_statement (attribute_declaration (attribute (identifier))) (expression_statement)) + (attributed_statement (attribute_declaration (attribute (identifier))) (labeled_statement (statement_identifier) (compound_statement))) + (attributed_statement (attribute_declaration (attribute (identifier))) (goto_statement (statement_identifier))) + (comment) + (if_statement + (parenthesized_expression (true)) + (attributed_statement (attribute_declaration (attribute (identifier))) (compound_statement)) + (attributed_statement (attribute_declaration (attribute (identifier))) (compound_statement))) + (do_statement + (attributed_statement (attribute_declaration (attribute (identifier))) (compound_statement)) + (parenthesized_expression (true)))))) diff --git a/tree-sitter-c/test/corpus/types.txt b/tree-sitter-c/test/corpus/types.txt new file mode 100644 index 0000000..6d2d19a --- /dev/null +++ b/tree-sitter-c/test/corpus/types.txt @@ -0,0 +1,80 @@ +======================================== +Primitive types +======================================== + +int a; +uint8_t a; +uint16_t a; +uint32_t a; +uint64_t a; +uintptr_t a; + +int8_t a; +int16_t a; +int32_t a; +int64_t a; +intptr_t a; + +char16_t a; +char32_t a; + +size_t a; +ssize_t a; + +--- + +(translation_unit + (declaration (primitive_type) (identifier)) + (declaration (primitive_type) (identifier)) + (declaration (primitive_type) (identifier)) + (declaration (primitive_type) (identifier)) + (declaration (primitive_type) (identifier)) + (declaration (primitive_type) (identifier)) + (declaration (primitive_type) (identifier)) + (declaration (primitive_type) (identifier)) + (declaration (primitive_type) (identifier)) + (declaration (primitive_type) (identifier)) + (declaration (primitive_type) (identifier)) + (declaration (primitive_type) (identifier)) + (declaration (primitive_type) (identifier)) + (declaration (primitive_type) (identifier)) + (declaration (primitive_type) (identifier))) + +======================================== +Type modifiers +======================================== + +void f(unsigned); +void f(unsigned int); +void f(signed long int); +void f(unsigned v1); +void f(unsigned long v2); + +--- + +(translation_unit + (declaration + (primitive_type) + (function_declarator + (identifier) + (parameter_list (parameter_declaration (sized_type_specifier))))) + (declaration + (primitive_type) + (function_declarator + (identifier) + (parameter_list (parameter_declaration (sized_type_specifier (primitive_type)))))) + (declaration + (primitive_type) + (function_declarator + (identifier) + (parameter_list (parameter_declaration (sized_type_specifier (primitive_type)))))) + (declaration + (primitive_type) + (function_declarator + (identifier) + (parameter_list (parameter_declaration (sized_type_specifier) (identifier))))) + (declaration + (primitive_type) + (function_declarator + (identifier) + (parameter_list (parameter_declaration (sized_type_specifier) (identifier)))))) diff --git a/tree-sitter-c/test/highlight/keywords.c b/tree-sitter-c/test/highlight/keywords.c new file mode 100644 index 0000000..50d790c --- /dev/null +++ b/tree-sitter-c/test/highlight/keywords.c @@ -0,0 +1,6 @@ +#include +// ^ keyword +// ^ string + +#include "something.h" +// ^ string diff --git a/tree-sitter-c/test/highlight/names.c b/tree-sitter-c/test/highlight/names.c new file mode 100644 index 0000000..efdd44c --- /dev/null +++ b/tree-sitter-c/test/highlight/names.c @@ -0,0 +1,33 @@ +typedef struct { + // ^ keyword + // ^ keyword + a_t b; + // <- type + // ^ property + + unsigned c_t (*d)[2]; + // ^ type + // ^ type + // ^ property +}, T, V; +// ^ type +// ^ type + +int main(const char string[SIZE]) { +// <- type +// ^ function +// ^ keyword +// ^ type +// ^ variable +// ^ constant + + return foo.bar + foo.baz(); + // ^ keyword + // ^ variable + // ^ property + // ^ function + +error: + // <- label + return 0; +} From 6cf0cf620634e10eaeabd572cad341bd67d79386 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Sun, 7 Aug 2022 12:26:35 +0700 Subject: [PATCH 1220/1541] fix: impatient loading order --- rplugin.vim | 15 - site/pack/packer/opt/Comment.nvim | 1 - site/pack/packer/opt/LuaSnip | 1 - site/pack/packer/opt/cmp-buffer | 1 - site/pack/packer/opt/cmp-nvim-lsp | 1 - site/pack/packer/opt/cmp-nvim-lua | 1 - site/pack/packer/opt/cmp-path | 1 - site/pack/packer/opt/cmp_luasnip | 1 - site/pack/packer/opt/extensions | 1 - site/pack/packer/opt/friendly-snippets | 1 - site/pack/packer/opt/gitsigns.nvim | 1 - site/pack/packer/opt/impatient.nvim | 1 - site/pack/packer/opt/indent-blankline.nvim | 1 - site/pack/packer/opt/mason.nvim | 1 - site/pack/packer/opt/nvim-autopairs | 1 - site/pack/packer/opt/nvim-cmp | 1 - site/pack/packer/opt/nvim-colorizer.lua | 1 - site/pack/packer/opt/nvim-lspconfig | 1 - site/pack/packer/opt/nvim-tree.lua | 1 - site/pack/packer/opt/nvim-treesitter | 1 - site/pack/packer/opt/nvim-web-devicons | 1 - site/pack/packer/opt/nvterm | 1 - site/pack/packer/opt/packer.nvim | 1 - site/pack/packer/opt/plenary.nvim | 1 - site/pack/packer/opt/telescope.nvim | 1 - site/pack/packer/opt/ui | 1 - site/pack/packer/opt/which-key.nvim | 1 - site/pack/packer/start/base46 | 1 - tree-sitter-c/.appveyor.yml | 22 - tree-sitter-c/.gitattributes | 2 - tree-sitter-c/.gitignore | 6 - tree-sitter-c/.npmignore | 6 - tree-sitter-c/.travis.yml | 5 - tree-sitter-c/Cargo.toml | 23 - tree-sitter-c/LICENSE | 21 - tree-sitter-c/Package.swift | 36 - tree-sitter-c/README.md | 7 - tree-sitter-c/binding.gyp | 18 - tree-sitter-c/bindings/node/binding.cc | 28 - tree-sitter-c/bindings/node/index.js | 19 - tree-sitter-c/bindings/rust/README.md | 37 - tree-sitter-c/bindings/rust/build.rs | 17 - tree-sitter-c/bindings/rust/lib.rs | 66 - tree-sitter-c/bindings/swift/TreeSitterC/c.h | 16 - tree-sitter-c/examples/cluster.c | 5446 -- tree-sitter-c/examples/malloc.c | 532 - tree-sitter-c/examples/parser.c | 1283 - tree-sitter-c/grammar.js | 1082 - tree-sitter-c/package.json | 36 - tree-sitter-c/parser.so | Bin 389904 -> 0 bytes tree-sitter-c/queries/highlights.scm | 81 - tree-sitter-c/src/grammar.json | 6629 -- tree-sitter-c/src/node-types.json | 3664 - tree-sitter-c/src/parser.c | 75781 ----------------- tree-sitter-c/src/tree_sitter/parser.h | 224 - tree-sitter-c/test/corpus/ambiguities.txt | 178 - tree-sitter-c/test/corpus/crlf.txt | 13 - tree-sitter-c/test/corpus/declarations.txt | 530 - tree-sitter-c/test/corpus/expressions.txt | 518 - tree-sitter-c/test/corpus/microsoft.txt | 187 - tree-sitter-c/test/corpus/preprocessor.txt | 274 - tree-sitter-c/test/corpus/statements.txt | 326 - tree-sitter-c/test/corpus/types.txt | 80 - tree-sitter-c/test/highlight/keywords.c | 6 - tree-sitter-c/test/highlight/names.c | 33 - 65 files changed, 97274 deletions(-) delete mode 100644 rplugin.vim delete mode 160000 site/pack/packer/opt/Comment.nvim delete mode 160000 site/pack/packer/opt/LuaSnip delete mode 160000 site/pack/packer/opt/cmp-buffer delete mode 160000 site/pack/packer/opt/cmp-nvim-lsp delete mode 160000 site/pack/packer/opt/cmp-nvim-lua delete mode 160000 site/pack/packer/opt/cmp-path delete mode 160000 site/pack/packer/opt/cmp_luasnip delete mode 160000 site/pack/packer/opt/extensions delete mode 160000 site/pack/packer/opt/friendly-snippets delete mode 160000 site/pack/packer/opt/gitsigns.nvim delete mode 160000 site/pack/packer/opt/impatient.nvim delete mode 160000 site/pack/packer/opt/indent-blankline.nvim delete mode 160000 site/pack/packer/opt/mason.nvim delete mode 160000 site/pack/packer/opt/nvim-autopairs delete mode 160000 site/pack/packer/opt/nvim-cmp delete mode 160000 site/pack/packer/opt/nvim-colorizer.lua delete mode 160000 site/pack/packer/opt/nvim-lspconfig delete mode 160000 site/pack/packer/opt/nvim-tree.lua delete mode 160000 site/pack/packer/opt/nvim-treesitter delete mode 160000 site/pack/packer/opt/nvim-web-devicons delete mode 160000 site/pack/packer/opt/nvterm delete mode 160000 site/pack/packer/opt/packer.nvim delete mode 160000 site/pack/packer/opt/plenary.nvim delete mode 160000 site/pack/packer/opt/telescope.nvim delete mode 160000 site/pack/packer/opt/ui delete mode 160000 site/pack/packer/opt/which-key.nvim delete mode 160000 site/pack/packer/start/base46 delete mode 100644 tree-sitter-c/.appveyor.yml delete mode 100644 tree-sitter-c/.gitattributes delete mode 100644 tree-sitter-c/.gitignore delete mode 100644 tree-sitter-c/.npmignore delete mode 100644 tree-sitter-c/.travis.yml delete mode 100644 tree-sitter-c/Cargo.toml delete mode 100644 tree-sitter-c/LICENSE delete mode 100644 tree-sitter-c/Package.swift delete mode 100644 tree-sitter-c/README.md delete mode 100644 tree-sitter-c/binding.gyp delete mode 100644 tree-sitter-c/bindings/node/binding.cc delete mode 100644 tree-sitter-c/bindings/node/index.js delete mode 100644 tree-sitter-c/bindings/rust/README.md delete mode 100644 tree-sitter-c/bindings/rust/build.rs delete mode 100644 tree-sitter-c/bindings/rust/lib.rs delete mode 100644 tree-sitter-c/bindings/swift/TreeSitterC/c.h delete mode 100644 tree-sitter-c/examples/cluster.c delete mode 100644 tree-sitter-c/examples/malloc.c delete mode 100644 tree-sitter-c/examples/parser.c delete mode 100644 tree-sitter-c/grammar.js delete mode 100644 tree-sitter-c/package.json delete mode 100755 tree-sitter-c/parser.so delete mode 100644 tree-sitter-c/queries/highlights.scm delete mode 100644 tree-sitter-c/src/grammar.json delete mode 100644 tree-sitter-c/src/node-types.json delete mode 100644 tree-sitter-c/src/parser.c delete mode 100644 tree-sitter-c/src/tree_sitter/parser.h delete mode 100644 tree-sitter-c/test/corpus/ambiguities.txt delete mode 100644 tree-sitter-c/test/corpus/crlf.txt delete mode 100644 tree-sitter-c/test/corpus/declarations.txt delete mode 100644 tree-sitter-c/test/corpus/expressions.txt delete mode 100644 tree-sitter-c/test/corpus/microsoft.txt delete mode 100644 tree-sitter-c/test/corpus/preprocessor.txt delete mode 100644 tree-sitter-c/test/corpus/statements.txt delete mode 100644 tree-sitter-c/test/corpus/types.txt delete mode 100644 tree-sitter-c/test/highlight/keywords.c delete mode 100644 tree-sitter-c/test/highlight/names.c diff --git a/rplugin.vim b/rplugin.vim deleted file mode 100644 index 3beadb1..0000000 --- a/rplugin.vim +++ /dev/null @@ -1,15 +0,0 @@ -" perl plugins - - -" node plugins - - -" python3 plugins - - -" ruby plugins - - -" python plugins - - diff --git a/site/pack/packer/opt/Comment.nvim b/site/pack/packer/opt/Comment.nvim deleted file mode 160000 index 9b76787..0000000 --- a/site/pack/packer/opt/Comment.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9b76787e273567c0e3027304bd16ffedc751c04c diff --git a/site/pack/packer/opt/LuaSnip b/site/pack/packer/opt/LuaSnip deleted file mode 160000 index ac27343..0000000 --- a/site/pack/packer/opt/LuaSnip +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ac27343b52796a0aa1bb3db824d16e66d1def182 diff --git a/site/pack/packer/opt/cmp-buffer b/site/pack/packer/opt/cmp-buffer deleted file mode 160000 index 62fc67a..0000000 --- a/site/pack/packer/opt/cmp-buffer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 62fc67a2b0205136bc3e312664624ba2ab4a9323 diff --git a/site/pack/packer/opt/cmp-nvim-lsp b/site/pack/packer/opt/cmp-nvim-lsp deleted file mode 160000 index affe808..0000000 --- a/site/pack/packer/opt/cmp-nvim-lsp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit affe808a5c56b71630f17aa7c38e15c59fd648a8 diff --git a/site/pack/packer/opt/cmp-nvim-lua b/site/pack/packer/opt/cmp-nvim-lua deleted file mode 160000 index d276254..0000000 --- a/site/pack/packer/opt/cmp-nvim-lua +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d276254e7198ab7d00f117e88e223b4bd8c02d21 diff --git a/site/pack/packer/opt/cmp-path b/site/pack/packer/opt/cmp-path deleted file mode 160000 index 447c87c..0000000 --- a/site/pack/packer/opt/cmp-path +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 447c87cdd6e6d6a1d2488b1d43108bfa217f56e1 diff --git a/site/pack/packer/opt/cmp_luasnip b/site/pack/packer/opt/cmp_luasnip deleted file mode 160000 index a9de941..0000000 --- a/site/pack/packer/opt/cmp_luasnip +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a9de941bcbda508d0a45d28ae366bb3f08db2e36 diff --git a/site/pack/packer/opt/extensions b/site/pack/packer/opt/extensions deleted file mode 160000 index e82d9f5..0000000 --- a/site/pack/packer/opt/extensions +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e82d9f5e612ade06202591ed76ecb095e946f7f8 diff --git a/site/pack/packer/opt/friendly-snippets b/site/pack/packer/opt/friendly-snippets deleted file mode 160000 index 7339def..0000000 --- a/site/pack/packer/opt/friendly-snippets +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7339def34e46237eb7c9a893cb7d42dcb90e05e6 diff --git a/site/pack/packer/opt/gitsigns.nvim b/site/pack/packer/opt/gitsigns.nvim deleted file mode 160000 index 9c3ca02..0000000 --- a/site/pack/packer/opt/gitsigns.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9c3ca027661136a618c82275427746e481c84a4e diff --git a/site/pack/packer/opt/impatient.nvim b/site/pack/packer/opt/impatient.nvim deleted file mode 160000 index 4ccbe74..0000000 --- a/site/pack/packer/opt/impatient.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4ccbe749ce439fa25d387d459e8c339131cc5d1f diff --git a/site/pack/packer/opt/indent-blankline.nvim b/site/pack/packer/opt/indent-blankline.nvim deleted file mode 160000 index c15bbe9..0000000 --- a/site/pack/packer/opt/indent-blankline.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c15bbe9f23d88b5c0b4ca45a446e01a0a3913707 diff --git a/site/pack/packer/opt/mason.nvim b/site/pack/packer/opt/mason.nvim deleted file mode 160000 index cd1af57..0000000 --- a/site/pack/packer/opt/mason.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cd1af57253b3ac3652765e4d0f83b56802ec2a5f diff --git a/site/pack/packer/opt/nvim-autopairs b/site/pack/packer/opt/nvim-autopairs deleted file mode 160000 index ca89ab9..0000000 --- a/site/pack/packer/opt/nvim-autopairs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ca89ab9e7e42aa9279f1cdad15398d6e18ccee86 diff --git a/site/pack/packer/opt/nvim-cmp b/site/pack/packer/opt/nvim-cmp deleted file mode 160000 index 706371f..0000000 --- a/site/pack/packer/opt/nvim-cmp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 706371f1300e7c0acb98b346f80dad2dd9b5f679 diff --git a/site/pack/packer/opt/nvim-colorizer.lua b/site/pack/packer/opt/nvim-colorizer.lua deleted file mode 160000 index 8fe6ec2..0000000 --- a/site/pack/packer/opt/nvim-colorizer.lua +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8fe6ec269c6bcd19a7c2d69cb0bdcf8bb86a85fe diff --git a/site/pack/packer/opt/nvim-lspconfig b/site/pack/packer/opt/nvim-lspconfig deleted file mode 160000 index 6e047f1..0000000 --- a/site/pack/packer/opt/nvim-lspconfig +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6e047f11861bfb6ec28a6ad0138a8f0a62bb8806 diff --git a/site/pack/packer/opt/nvim-tree.lua b/site/pack/packer/opt/nvim-tree.lua deleted file mode 160000 index ff6e796..0000000 --- a/site/pack/packer/opt/nvim-tree.lua +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ff6e7966f39a897ac4d1358f4d022cfecdc88ff1 diff --git a/site/pack/packer/opt/nvim-treesitter b/site/pack/packer/opt/nvim-treesitter deleted file mode 160000 index a9a6493..0000000 --- a/site/pack/packer/opt/nvim-treesitter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a9a6493b1eeba458757903352e0d3dc4b54fd4f2 diff --git a/site/pack/packer/opt/nvim-web-devicons b/site/pack/packer/opt/nvim-web-devicons deleted file mode 160000 index 2d02a56..0000000 --- a/site/pack/packer/opt/nvim-web-devicons +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2d02a56189e2bde11edd4712fea16f08a6656944 diff --git a/site/pack/packer/opt/nvterm b/site/pack/packer/opt/nvterm deleted file mode 160000 index 1317d62..0000000 --- a/site/pack/packer/opt/nvterm +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1317d6238f089e117e3ed98b3cecc37cc4364675 diff --git a/site/pack/packer/opt/packer.nvim b/site/pack/packer/opt/packer.nvim deleted file mode 160000 index afab895..0000000 --- a/site/pack/packer/opt/packer.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit afab89594f4f702dc3368769c95b782dbdaeaf0a diff --git a/site/pack/packer/opt/plenary.nvim b/site/pack/packer/opt/plenary.nvim deleted file mode 160000 index 31807ee..0000000 --- a/site/pack/packer/opt/plenary.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 31807eef4ed574854b8a53ae40ea3292033a78ea diff --git a/site/pack/packer/opt/telescope.nvim b/site/pack/packer/opt/telescope.nvim deleted file mode 160000 index 4725867..0000000 --- a/site/pack/packer/opt/telescope.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4725867ec66b9a0f5e5ad95a1fd94c2f97fa2d2c diff --git a/site/pack/packer/opt/ui b/site/pack/packer/opt/ui deleted file mode 160000 index bca1182..0000000 --- a/site/pack/packer/opt/ui +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bca1182e872db0ea52d86b2f4cf4ee7cb092de45 diff --git a/site/pack/packer/opt/which-key.nvim b/site/pack/packer/opt/which-key.nvim deleted file mode 160000 index bd4411a..0000000 --- a/site/pack/packer/opt/which-key.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bd4411a2ed4dd8bb69c125e339d837028a6eea71 diff --git a/site/pack/packer/start/base46 b/site/pack/packer/start/base46 deleted file mode 160000 index dfdcff9..0000000 --- a/site/pack/packer/start/base46 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dfdcff9c6b2bd1ad3c364973a2497bf62c6f0f20 diff --git a/tree-sitter-c/.appveyor.yml b/tree-sitter-c/.appveyor.yml deleted file mode 100644 index b21947b..0000000 --- a/tree-sitter-c/.appveyor.yml +++ /dev/null @@ -1,22 +0,0 @@ -image: Visual Studio 2015 - -environment: - nodejs_version: "8" - -platform: - - x64 - -install: - - ps: Install-Product node $env:nodejs_version - - node --version - - npm --version - - npm install - -test_script: - - npm run test-windows - -build: off - -branches: - only: - - master diff --git a/tree-sitter-c/.gitattributes b/tree-sitter-c/.gitattributes deleted file mode 100644 index f60d7b9..0000000 --- a/tree-sitter-c/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -/src/** linguist-vendored -/examples/* linguist-vendored diff --git a/tree-sitter-c/.gitignore b/tree-sitter-c/.gitignore deleted file mode 100644 index bd77f41..0000000 --- a/tree-sitter-c/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -Cargo.lock -node_modules -build -package-lock.json -/target/ -.build/ \ No newline at end of file diff --git a/tree-sitter-c/.npmignore b/tree-sitter-c/.npmignore deleted file mode 100644 index bed0e3d..0000000 --- a/tree-sitter-c/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -/test -/examples -/build -/script -/target - diff --git a/tree-sitter-c/.travis.yml b/tree-sitter-c/.travis.yml deleted file mode 100644 index 5dcacdc..0000000 --- a/tree-sitter-c/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -sudo: false - -node_js: 10 diff --git a/tree-sitter-c/Cargo.toml b/tree-sitter-c/Cargo.toml deleted file mode 100644 index 9e2e88c..0000000 --- a/tree-sitter-c/Cargo.toml +++ /dev/null @@ -1,23 +0,0 @@ -[package] -name = "tree-sitter-c" -description = "C grammar for the tree-sitter parsing library" -version = "0.20.2" -authors = ["Max Brunsfeld "] -license = "MIT" -readme = "bindings/rust/README.md" -keywords = ["incremental", "parsing", "c"] -categories = ["parsing", "text-editors"] -repository = "https://github.com/tree-sitter/tree-sitter-c" -edition = "2018" - -build = "bindings/rust/build.rs" -include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"] - -[lib] -path = "bindings/rust/lib.rs" - -[dependencies] -tree-sitter = "0.20" - -[build-dependencies] -cc = "1.0" diff --git a/tree-sitter-c/LICENSE b/tree-sitter-c/LICENSE deleted file mode 100644 index 4b52d19..0000000 --- a/tree-sitter-c/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Max Brunsfeld - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/tree-sitter-c/Package.swift b/tree-sitter-c/Package.swift deleted file mode 100644 index c6c5376..0000000 --- a/tree-sitter-c/Package.swift +++ /dev/null @@ -1,36 +0,0 @@ -// swift-tools-version:5.3 -import PackageDescription - -let package = Package( - name: "TreeSitterC", - platforms: [.macOS(.v10_13), .iOS(.v11)], - products: [ - .library(name: "TreeSitterC", targets: ["TreeSitterC"]), - ], - dependencies: [], - targets: [ - .target(name: "TreeSitterC", - path: ".", - exclude: [ - "binding.gyp", - "bindings", - "Cargo.toml", - "examples", - "grammar.js", - "LICENSE", - "Makefile", - "package.json", - "README.md", - "src/grammar.json", - "src/node-types.json", - ], - sources: [ - "src/parser.c", - ], - resources: [ - .copy("queries") - ], - publicHeadersPath: "bindings/swift", - cSettings: [.headerSearchPath("src")]) - ] -) \ No newline at end of file diff --git a/tree-sitter-c/README.md b/tree-sitter-c/README.md deleted file mode 100644 index d89830b..0000000 --- a/tree-sitter-c/README.md +++ /dev/null @@ -1,7 +0,0 @@ -tree-sitter-c -================== - -[![Build Status](https://travis-ci.org/tree-sitter/tree-sitter-c.svg?branch=master)](https://travis-ci.org/tree-sitter/tree-sitter-c) -[![Build status](https://ci.appveyor.com/api/projects/status/7u0sy6ajmxro4wfh/branch/master?svg=true)](https://ci.appveyor.com/project/maxbrunsfeld/tree-sitter-c/branch/master) - -C grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter). Adapted from [this C99 grammar](http://slps.github.io/zoo/c/iso-9899-tc3.html). diff --git a/tree-sitter-c/binding.gyp b/tree-sitter-c/binding.gyp deleted file mode 100644 index 3aa8cad..0000000 --- a/tree-sitter-c/binding.gyp +++ /dev/null @@ -1,18 +0,0 @@ -{ - "targets": [ - { - "target_name": "tree_sitter_c_binding", - "include_dirs": [ - " -#include "nan.h" - -using namespace v8; - -extern "C" TSLanguage * tree_sitter_c(); - -namespace { - -NAN_METHOD(New) {} - -void Init(Local exports, Local module) { - Local tpl = Nan::New(New); - tpl->SetClassName(Nan::New("Language").ToLocalChecked()); - tpl->InstanceTemplate()->SetInternalFieldCount(1); - - Local constructor = Nan::GetFunction(tpl).ToLocalChecked(); - Local instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); - Nan::SetInternalFieldPointer(instance, 0, tree_sitter_c()); - - Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("c").ToLocalChecked()); - Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); -} - -NODE_MODULE(tree_sitter_c_binding, Init) - -} // namespace diff --git a/tree-sitter-c/bindings/node/index.js b/tree-sitter-c/bindings/node/index.js deleted file mode 100644 index 51a5d6c..0000000 --- a/tree-sitter-c/bindings/node/index.js +++ /dev/null @@ -1,19 +0,0 @@ -try { - module.exports = require("../../build/Release/tree_sitter_c_binding"); -} catch (error1) { - if (error1.code !== 'MODULE_NOT_FOUND') { - throw error1; - } - try { - module.exports = require("../../build/Debug/tree_sitter_c_binding"); - } catch (error2) { - if (error2.code !== 'MODULE_NOT_FOUND') { - throw error2; - } - throw error1 - } -} - -try { - module.exports.nodeTypeInfo = require("../../src/node-types.json"); -} catch (_) {} diff --git a/tree-sitter-c/bindings/rust/README.md b/tree-sitter-c/bindings/rust/README.md deleted file mode 100644 index d5a2e90..0000000 --- a/tree-sitter-c/bindings/rust/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# tree-sitter-c - -This crate provides a C grammar for the [tree-sitter][] parsing library. To -use this crate, add it to the `[dependencies]` section of your `Cargo.toml` -file. (Note that you will probably also need to depend on the -[`tree-sitter`][tree-sitter crate] crate to use the parsed result in any useful -way.) - -``` toml -[dependencies] -tree-sitter = "0.17" -tree-sitter-c = "0.16" -``` - -Typically, you will use the [language][language func] function to add this -grammar to a tree-sitter [Parser][], and then use the parser to parse some code: - -``` rust -let code = r#" - int double(int x) { - return x * 2; - } -"#; -let mut parser = Parser::new(); -parser.set_language(tree_sitter_c::language()).expect("Error loading C grammar"); -let parsed = parser.parse(code, None); -``` - -If you have any questions, please reach out to us in the [tree-sitter -discussions] page. - -[Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html -[language func]: https://docs.rs/tree-sitter-c/*/tree_sitter_c/fn.language.html -[Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html -[tree-sitter]: https://tree-sitter.github.io/ -[tree-sitter crate]: https://crates.io/crates/tree-sitter -[tree-sitter discussions]: https://github.com/tree-sitter/tree-sitter/discussions diff --git a/tree-sitter-c/bindings/rust/build.rs b/tree-sitter-c/bindings/rust/build.rs deleted file mode 100644 index 3efc628..0000000 --- a/tree-sitter-c/bindings/rust/build.rs +++ /dev/null @@ -1,17 +0,0 @@ -use std::path::Path; -extern crate cc; - -fn main() { - let src_dir = Path::new("src"); - - let mut c_config = cc::Build::new(); - c_config.include(&src_dir); - c_config - .flag_if_supported("-Wno-unused-parameter") - .flag_if_supported("-Wno-unused-but-set-variable") - .flag_if_supported("-Wno-trigraphs"); - let parser_path = src_dir.join("parser.c"); - c_config.file(&parser_path); - println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); - c_config.compile("parser"); -} diff --git a/tree-sitter-c/bindings/rust/lib.rs b/tree-sitter-c/bindings/rust/lib.rs deleted file mode 100644 index 3402110..0000000 --- a/tree-sitter-c/bindings/rust/lib.rs +++ /dev/null @@ -1,66 +0,0 @@ -// -*- coding: utf-8 -*- -// ------------------------------------------------------------------------------------------------ -// Copyright © 2021, tree-sitter-c authors. -// See the LICENSE file in this repo for license details. -// ------------------------------------------------------------------------------------------------ - -//! This crate provides a C grammar for the [tree-sitter][] parsing library. -//! -//! Typically, you will use the [language][language func] function to add this grammar to a -//! tree-sitter [Parser][], and then use the parser to parse some code: -//! -//! ``` -//! use tree_sitter::Parser; -//! -//! let code = r#" -//! int double(int x) { -//! return x * 2; -//! } -//! "#; -//! let mut parser = Parser::new(); -//! parser.set_language(tree_sitter_c::language()).expect("Error loading C grammar"); -//! let parsed = parser.parse(code, None); -//! # let parsed = parsed.unwrap(); -//! # let root = parsed.root_node(); -//! # assert!(!root.has_error()); -//! ``` -//! -//! [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html -//! [language func]: fn.language.html -//! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html -//! [tree-sitter]: https://tree-sitter.github.io/ - -use tree_sitter::Language; - -extern "C" { - fn tree_sitter_c() -> Language; -} - -/// Returns the tree-sitter [Language][] for this grammar. -/// -/// [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html -pub fn language() -> Language { - unsafe { tree_sitter_c() } -} - -/// The source of the C tree-sitter grammar description. -pub const GRAMMAR: &str = include_str!("../../grammar.js"); - -/// The syntax highlighting query for this language. -pub const HIGHLIGHT_QUERY: &str = include_str!("../../queries/highlights.scm"); - -/// The content of the [`node-types.json`][] file for this grammar. -/// -/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types -pub const NODE_TYPES: &str = include_str!("../../src/node-types.json"); - -#[cfg(test)] -mod tests { - #[test] - fn can_load_grammar() { - let mut parser = tree_sitter::Parser::new(); - parser - .set_language(super::language()) - .expect("Error loading C grammar"); - } -} diff --git a/tree-sitter-c/bindings/swift/TreeSitterC/c.h b/tree-sitter-c/bindings/swift/TreeSitterC/c.h deleted file mode 100644 index ae1557a..0000000 --- a/tree-sitter-c/bindings/swift/TreeSitterC/c.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef TREE_SITTER_C_H_ -#define TREE_SITTER_C_H_ - -typedef struct TSLanguage TSLanguage; - -#ifdef __cplusplus -extern "C" { -#endif - -extern TSLanguage *tree_sitter_c(); - -#ifdef __cplusplus -} -#endif - -#endif // TREE_SITTER_C_H_ \ No newline at end of file diff --git a/tree-sitter-c/examples/cluster.c b/tree-sitter-c/examples/cluster.c deleted file mode 100644 index 77ec2f1..0000000 --- a/tree-sitter-c/examples/cluster.c +++ /dev/null @@ -1,5446 +0,0 @@ -/* Redis Cluster implementation. - * - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Redis nor the names of its contributors may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "server.h" -#include "cluster.h" -#include "endianconv.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -/* A global reference to myself is handy to make code more clear. - * Myself always points to server.cluster->myself, that is, the clusterNode - * that represents this node. */ -clusterNode *myself = NULL; - -clusterNode *createClusterNode(char *nodename, int flags); -int clusterAddNode(clusterNode *node); -void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask); -void clusterReadHandler(aeEventLoop *el, int fd, void *privdata, int mask); -void clusterSendPing(clusterLink *link, int type); -void clusterSendFail(char *nodename); -void clusterSendFailoverAuthIfNeeded(clusterNode *node, clusterMsg *request); -void clusterUpdateState(void); -int clusterNodeGetSlotBit(clusterNode *n, int slot); -sds clusterGenNodesDescription(int filter); -clusterNode *clusterLookupNode(char *name); -int clusterNodeAddSlave(clusterNode *master, clusterNode *slave); -int clusterAddSlot(clusterNode *n, int slot); -int clusterDelSlot(int slot); -int clusterDelNodeSlots(clusterNode *node); -int clusterNodeSetSlotBit(clusterNode *n, int slot); -void clusterSetMaster(clusterNode *n); -void clusterHandleSlaveFailover(void); -void clusterHandleSlaveMigration(int max_slaves); -int bitmapTestBit(unsigned char *bitmap, int pos); -void clusterDoBeforeSleep(int flags); -void clusterSendUpdate(clusterLink *link, clusterNode *node); -void resetManualFailover(void); -void clusterCloseAllSlots(void); -void clusterSetNodeAsMaster(clusterNode *n); -void clusterDelNode(clusterNode *delnode); -sds representClusterNodeFlags(sds ci, uint16_t flags); -uint64_t clusterGetMaxEpoch(void); -int clusterBumpConfigEpochWithoutConsensus(void); - -/* ----------------------------------------------------------------------------- - * Initialization - * -------------------------------------------------------------------------- */ - -/* Load the cluster config from 'filename'. - * - * If the file does not exist or is zero-length (this may happen because - * when we lock the nodes.conf file, we create a zero-length one for the - * sake of locking if it does not already exist), C_ERR is returned. - * If the configuration was loaded from the file, C_OK is returned. */ -int clusterLoadConfig(char *filename) { - FILE *fp = fopen(filename,"r"); - struct stat sb; - char *line; - int maxline, j; - - if (fp == NULL) { - if (errno == ENOENT) { - return C_ERR; - } else { - serverLog(LL_WARNING, - "Loading the cluster node config from %s: %s", - filename, strerror(errno)); - exit(1); - } - } - - /* Check if the file is zero-length: if so return C_ERR to signal - * we have to write the config. */ - if (fstat(fileno(fp),&sb) != -1 && sb.st_size == 0) { - fclose(fp); - return C_ERR; - } - - /* Parse the file. Note that single lines of the cluster config file can - * be really long as they include all the hash slots of the node. - * This means in the worst possible case, half of the Redis slots will be - * present in a single line, possibly in importing or migrating state, so - * together with the node ID of the sender/receiver. - * - * To simplify we allocate 1024+CLUSTER_SLOTS*128 bytes per line. */ - maxline = 1024+CLUSTER_SLOTS*128; - line = zmalloc(maxline); - while(fgets(line,maxline,fp) != NULL) { - int argc; - sds *argv; - clusterNode *n, *master; - char *p, *s; - - /* Skip blank lines, they can be created either by users manually - * editing nodes.conf or by the config writing process if stopped - * before the truncate() call. */ - if (line[0] == '\n' || line[0] == '\0') continue; - - /* Split the line into arguments for processing. */ - argv = sdssplitargs(line,&argc); - if (argv == NULL) goto fmterr; - - /* Handle the special "vars" line. Don't pretend it is the last - * line even if it actually is when generated by Redis. */ - if (strcasecmp(argv[0],"vars") == 0) { - for (j = 1; j < argc; j += 2) { - if (strcasecmp(argv[j],"currentEpoch") == 0) { - server.cluster->currentEpoch = - strtoull(argv[j+1],NULL,10); - } else if (strcasecmp(argv[j],"lastVoteEpoch") == 0) { - server.cluster->lastVoteEpoch = - strtoull(argv[j+1],NULL,10); - } else { - serverLog(LL_WARNING, - "Skipping unknown cluster config variable '%s'", - argv[j]); - } - } - sdsfreesplitres(argv,argc); - continue; - } - - /* Regular config lines have at least eight fields */ - if (argc < 8) goto fmterr; - - /* Create this node if it does not exist */ - n = clusterLookupNode(argv[0]); - if (!n) { - n = createClusterNode(argv[0],0); - clusterAddNode(n); - } - /* Address and port */ - if ((p = strrchr(argv[1],':')) == NULL) goto fmterr; - *p = '\0'; - memcpy(n->ip,argv[1],strlen(argv[1])+1); - char *port = p+1; - char *busp = strchr(port,'@'); - if (busp) { - *busp = '\0'; - busp++; - } - n->port = atoi(port); - /* In older versions of nodes.conf the "@busport" part is missing. - * In this case we set it to the default offset of 10000 from the - * base port. */ - n->cport = busp ? atoi(busp) : n->port + CLUSTER_PORT_INCR; - - /* Parse flags */ - p = s = argv[2]; - while(p) { - p = strchr(s,','); - if (p) *p = '\0'; - if (!strcasecmp(s,"myself")) { - serverAssert(server.cluster->myself == NULL); - myself = server.cluster->myself = n; - n->flags |= CLUSTER_NODE_MYSELF; - } else if (!strcasecmp(s,"master")) { - n->flags |= CLUSTER_NODE_MASTER; - } else if (!strcasecmp(s,"slave")) { - n->flags |= CLUSTER_NODE_SLAVE; - } else if (!strcasecmp(s,"fail?")) { - n->flags |= CLUSTER_NODE_PFAIL; - } else if (!strcasecmp(s,"fail")) { - n->flags |= CLUSTER_NODE_FAIL; - n->fail_time = mstime(); - } else if (!strcasecmp(s,"handshake")) { - n->flags |= CLUSTER_NODE_HANDSHAKE; - } else if (!strcasecmp(s,"noaddr")) { - n->flags |= CLUSTER_NODE_NOADDR; - } else if (!strcasecmp(s,"noflags")) { - /* nothing to do */ - } else { - serverPanic("Unknown flag in redis cluster config file"); - } - if (p) s = p+1; - } - - /* Get master if any. Set the master and populate master's - * slave list. */ - if (argv[3][0] != '-') { - master = clusterLookupNode(argv[3]); - if (!master) { - master = createClusterNode(argv[3],0); - clusterAddNode(master); - } - n->slaveof = master; - clusterNodeAddSlave(master,n); - } - - /* Set ping sent / pong received timestamps */ - if (atoi(argv[4])) n->ping_sent = mstime(); - if (atoi(argv[5])) n->pong_received = mstime(); - - /* Set configEpoch for this node. */ - n->configEpoch = strtoull(argv[6],NULL,10); - - /* Populate hash slots served by this instance. */ - for (j = 8; j < argc; j++) { - int start, stop; - - if (argv[j][0] == '[') { - /* Here we handle migrating / importing slots */ - int slot; - char direction; - clusterNode *cn; - - p = strchr(argv[j],'-'); - serverAssert(p != NULL); - *p = '\0'; - direction = p[1]; /* Either '>' or '<' */ - slot = atoi(argv[j]+1); - p += 3; - cn = clusterLookupNode(p); - if (!cn) { - cn = createClusterNode(p,0); - clusterAddNode(cn); - } - if (direction == '>') { - server.cluster->migrating_slots_to[slot] = cn; - } else { - server.cluster->importing_slots_from[slot] = cn; - } - continue; - } else if ((p = strchr(argv[j],'-')) != NULL) { - *p = '\0'; - start = atoi(argv[j]); - stop = atoi(p+1); - } else { - start = stop = atoi(argv[j]); - } - while(start <= stop) clusterAddSlot(n, start++); - } - - sdsfreesplitres(argv,argc); - } - /* Config sanity check */ - if (server.cluster->myself == NULL) goto fmterr; - - zfree(line); - fclose(fp); - - serverLog(LL_NOTICE,"Node configuration loaded, I'm %.40s", myself->name); - - /* Something that should never happen: currentEpoch smaller than - * the max epoch found in the nodes configuration. However we handle this - * as some form of protection against manual editing of critical files. */ - if (clusterGetMaxEpoch() > server.cluster->currentEpoch) { - server.cluster->currentEpoch = clusterGetMaxEpoch(); - } - return C_OK; - -fmterr: - serverLog(LL_WARNING, - "Unrecoverable error: corrupted cluster config file."); - zfree(line); - if (fp) fclose(fp); - exit(1); -} - -/* Cluster node configuration is exactly the same as CLUSTER NODES output. - * - * This function writes the node config and returns 0, on error -1 - * is returned. - * - * Note: we need to write the file in an atomic way from the point of view - * of the POSIX filesystem semantics, so that if the server is stopped - * or crashes during the write, we'll end with either the old file or the - * new one. Since we have the full payload to write available we can use - * a single write to write the whole file. If the pre-existing file was - * bigger we pad our payload with newlines that are anyway ignored and truncate - * the file afterward. */ -int clusterSaveConfig(int do_fsync) { - sds ci; - size_t content_size; - struct stat sb; - int fd; - - server.cluster->todo_before_sleep &= ~CLUSTER_TODO_SAVE_CONFIG; - - /* Get the nodes description and concatenate our "vars" directive to - * save currentEpoch and lastVoteEpoch. */ - ci = clusterGenNodesDescription(CLUSTER_NODE_HANDSHAKE); - ci = sdscatprintf(ci,"vars currentEpoch %llu lastVoteEpoch %llu\n", - (unsigned long long) server.cluster->currentEpoch, - (unsigned long long) server.cluster->lastVoteEpoch); - content_size = sdslen(ci); - - if ((fd = open(server.cluster_configfile,O_WRONLY|O_CREAT,0644)) - == -1) goto err; - - /* Pad the new payload if the existing file length is greater. */ - if (fstat(fd,&sb) != -1) { - if (sb.st_size > (off_t)content_size) { - ci = sdsgrowzero(ci,sb.st_size); - memset(ci+content_size,'\n',sb.st_size-content_size); - } - } - if (write(fd,ci,sdslen(ci)) != (ssize_t)sdslen(ci)) goto err; - if (do_fsync) { - server.cluster->todo_before_sleep &= ~CLUSTER_TODO_FSYNC_CONFIG; - fsync(fd); - } - - /* Truncate the file if needed to remove the final \n padding that - * is just garbage. */ - if (content_size != sdslen(ci) && ftruncate(fd,content_size) == -1) { - /* ftruncate() failing is not a critical error. */ - } - close(fd); - sdsfree(ci); - return 0; - -err: - if (fd != -1) close(fd); - sdsfree(ci); - return -1; -} - -void clusterSaveConfigOrDie(int do_fsync) { - if (clusterSaveConfig(do_fsync) == -1) { - serverLog(LL_WARNING,"Fatal: can't update cluster config file."); - exit(1); - } -} - -/* Lock the cluster config using flock(), and leaks the file descritor used to - * acquire the lock so that the file will be locked forever. - * - * This works because we always update nodes.conf with a new version - * in-place, reopening the file, and writing to it in place (later adjusting - * the length with ftruncate()). - * - * On success C_OK is returned, otherwise an error is logged and - * the function returns C_ERR to signal a lock was not acquired. */ -int clusterLockConfig(char *filename) { -/* flock() does not exist on Solaris - * and a fcntl-based solution won't help, as we constantly re-open that file, - * which will release _all_ locks anyway - */ -#if !defined(__sun) - /* To lock it, we need to open the file in a way it is created if - * it does not exist, otherwise there is a race condition with other - * processes. */ - int fd = open(filename,O_WRONLY|O_CREAT,0644); - if (fd == -1) { - serverLog(LL_WARNING, - "Can't open %s in order to acquire a lock: %s", - filename, strerror(errno)); - return C_ERR; - } - - if (flock(fd,LOCK_EX|LOCK_NB) == -1) { - if (errno == EWOULDBLOCK) { - serverLog(LL_WARNING, - "Sorry, the cluster configuration file %s is already used " - "by a different Redis Cluster node. Please make sure that " - "different nodes use different cluster configuration " - "files.", filename); - } else { - serverLog(LL_WARNING, - "Impossible to lock %s: %s", filename, strerror(errno)); - } - close(fd); - return C_ERR; - } - /* Lock acquired: leak the 'fd' by not closing it, so that we'll retain the - * lock to the file as long as the process exists. */ -#endif /* __sun */ - - return C_OK; -} - -void clusterInit(void) { - int saveconf = 0; - - server.cluster = zmalloc(sizeof(clusterState)); - server.cluster->myself = NULL; - server.cluster->currentEpoch = 0; - server.cluster->state = CLUSTER_FAIL; - server.cluster->size = 1; - server.cluster->todo_before_sleep = 0; - server.cluster->nodes = dictCreate(&clusterNodesDictType,NULL); - server.cluster->nodes_black_list = - dictCreate(&clusterNodesBlackListDictType,NULL); - server.cluster->failover_auth_time = 0; - server.cluster->failover_auth_count = 0; - server.cluster->failover_auth_rank = 0; - server.cluster->failover_auth_epoch = 0; - server.cluster->cant_failover_reason = CLUSTER_CANT_FAILOVER_NONE; - server.cluster->lastVoteEpoch = 0; - for (int i = 0; i < CLUSTERMSG_TYPE_COUNT; i++) { - server.cluster->stats_bus_messages_sent[i] = 0; - server.cluster->stats_bus_messages_received[i] = 0; - } - server.cluster->stats_pfail_nodes = 0; - memset(server.cluster->slots,0, sizeof(server.cluster->slots)); - clusterCloseAllSlots(); - - /* Lock the cluster config file to make sure every node uses - * its own nodes.conf. */ - if (clusterLockConfig(server.cluster_configfile) == C_ERR) - exit(1); - - /* Load or create a new nodes configuration. */ - if (clusterLoadConfig(server.cluster_configfile) == C_ERR) { - /* No configuration found. We will just use the random name provided - * by the createClusterNode() function. */ - myself = server.cluster->myself = - createClusterNode(NULL,CLUSTER_NODE_MYSELF|CLUSTER_NODE_MASTER); - serverLog(LL_NOTICE,"No cluster configuration found, I'm %.40s", - myself->name); - clusterAddNode(myself); - saveconf = 1; - } - if (saveconf) clusterSaveConfigOrDie(1); - - /* We need a listening TCP port for our cluster messaging needs. */ - server.cfd_count = 0; - - /* Port sanity check II - * The other handshake port check is triggered too late to stop - * us from trying to use a too-high cluster port number. */ - if (server.port > (65535-CLUSTER_PORT_INCR)) { - serverLog(LL_WARNING, "Redis port number too high. " - "Cluster communication port is 10,000 port " - "numbers higher than your Redis port. " - "Your Redis port number must be " - "lower than 55535."); - exit(1); - } - - if (listenToPort(server.port+CLUSTER_PORT_INCR, - server.cfd,&server.cfd_count) == C_ERR) - { - exit(1); - } else { - int j; - - for (j = 0; j < server.cfd_count; j++) { - if (aeCreateFileEvent(server.el, server.cfd[j], AE_READABLE, - clusterAcceptHandler, NULL) == AE_ERR) - serverPanic("Unrecoverable error creating Redis Cluster " - "file event."); - } - } - - /* The slots -> keys map is a radix tree. Initialize it here. */ - server.cluster->slots_to_keys = raxNew(); - memset(server.cluster->slots_keys_count,0, - sizeof(server.cluster->slots_keys_count)); - - /* Set myself->port / cport to my listening ports, we'll just need to - * discover the IP address via MEET messages. */ - myself->port = server.port; - myself->cport = server.port+CLUSTER_PORT_INCR; - if (server.cluster_announce_port) - myself->port = server.cluster_announce_port; - if (server.cluster_announce_bus_port) - myself->cport = server.cluster_announce_bus_port; - - server.cluster->mf_end = 0; - resetManualFailover(); -} - -/* Reset a node performing a soft or hard reset: - * - * 1) All other nodes are forget. - * 2) All the assigned / open slots are released. - * 3) If the node is a slave, it turns into a master. - * 5) Only for hard reset: a new Node ID is generated. - * 6) Only for hard reset: currentEpoch and configEpoch are set to 0. - * 7) The new configuration is saved and the cluster state updated. - * 8) If the node was a slave, the whole data set is flushed away. */ -void clusterReset(int hard) { - dictIterator *di; - dictEntry *de; - int j; - - /* Turn into master. */ - if (nodeIsSlave(myself)) { - clusterSetNodeAsMaster(myself); - replicationUnsetMaster(); - emptyDb(-1,EMPTYDB_NO_FLAGS,NULL); - } - - /* Close slots, reset manual failover state. */ - clusterCloseAllSlots(); - resetManualFailover(); - - /* Unassign all the slots. */ - for (j = 0; j < CLUSTER_SLOTS; j++) clusterDelSlot(j); - - /* Forget all the nodes, but myself. */ - di = dictGetSafeIterator(server.cluster->nodes); - while((de = dictNext(di)) != NULL) { - clusterNode *node = dictGetVal(de); - - if (node == myself) continue; - clusterDelNode(node); - } - dictReleaseIterator(di); - - /* Hard reset only: set epochs to 0, change node ID. */ - if (hard) { - sds oldname; - - server.cluster->currentEpoch = 0; - server.cluster->lastVoteEpoch = 0; - myself->configEpoch = 0; - serverLog(LL_WARNING, "configEpoch set to 0 via CLUSTER RESET HARD"); - - /* To change the Node ID we need to remove the old name from the - * nodes table, change the ID, and re-add back with new name. */ - oldname = sdsnewlen(myself->name, CLUSTER_NAMELEN); - dictDelete(server.cluster->nodes,oldname); - sdsfree(oldname); - getRandomHexChars(myself->name, CLUSTER_NAMELEN); - clusterAddNode(myself); - serverLog(LL_NOTICE,"Node hard reset, now I'm %.40s", myself->name); - } - - /* Make sure to persist the new config and update the state. */ - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| - CLUSTER_TODO_UPDATE_STATE| - CLUSTER_TODO_FSYNC_CONFIG); -} - -/* ----------------------------------------------------------------------------- - * CLUSTER communication link - * -------------------------------------------------------------------------- */ - -clusterLink *createClusterLink(clusterNode *node) { - clusterLink *link = zmalloc(sizeof(*link)); - link->ctime = mstime(); - link->sndbuf = sdsempty(); - link->rcvbuf = sdsempty(); - link->node = node; - link->fd = -1; - return link; -} - -/* Free a cluster link, but does not free the associated node of course. - * This function will just make sure that the original node associated - * with this link will have the 'link' field set to NULL. */ -void freeClusterLink(clusterLink *link) { - if (link->fd != -1) { - aeDeleteFileEvent(server.el, link->fd, AE_WRITABLE); - aeDeleteFileEvent(server.el, link->fd, AE_READABLE); - } - sdsfree(link->sndbuf); - sdsfree(link->rcvbuf); - if (link->node) - link->node->link = NULL; - close(link->fd); - zfree(link); -} - -#define MAX_CLUSTER_ACCEPTS_PER_CALL 1000 -void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) { - int cport, cfd; - int max = MAX_CLUSTER_ACCEPTS_PER_CALL; - char cip[NET_IP_STR_LEN]; - clusterLink *link; - UNUSED(el); - UNUSED(mask); - UNUSED(privdata); - - /* If the server is starting up, don't accept cluster connections: - * UPDATE messages may interact with the database content. */ - if (server.masterhost == NULL && server.loading) return; - - while(max--) { - cfd = anetTcpAccept(server.neterr, fd, cip, sizeof(cip), &cport); - if (cfd == ANET_ERR) { - if (errno != EWOULDBLOCK) - serverLog(LL_VERBOSE, - "Error accepting cluster node: %s", server.neterr); - return; - } - anetNonBlock(NULL,cfd); - anetEnableTcpNoDelay(NULL,cfd); - - /* Use non-blocking I/O for cluster messages. */ - serverLog(LL_VERBOSE,"Accepted cluster node %s:%d", cip, cport); - /* Create a link object we use to handle the connection. - * It gets passed to the readable handler when data is available. - * Initiallly the link->node pointer is set to NULL as we don't know - * which node is, but the right node is references once we know the - * node identity. */ - link = createClusterLink(NULL); - link->fd = cfd; - aeCreateFileEvent(server.el,cfd,AE_READABLE,clusterReadHandler,link); - } -} - -/* ----------------------------------------------------------------------------- - * Key space handling - * -------------------------------------------------------------------------- */ - -/* We have 16384 hash slots. The hash slot of a given key is obtained - * as the least significant 14 bits of the crc16 of the key. - * - * However if the key contains the {...} pattern, only the part between - * { and } is hashed. This may be useful in the future to force certain - * keys to be in the same node (assuming no resharding is in progress). */ -unsigned int keyHashSlot(char *key, int keylen) { - int s, e; /* start-end indexes of { and } */ - - for (s = 0; s < keylen; s++) - if (key[s] == '{') break; - - /* No '{' ? Hash the whole key. This is the base case. */ - if (s == keylen) return crc16(key,keylen) & 0x3FFF; - - /* '{' found? Check if we have the corresponding '}'. */ - for (e = s+1; e < keylen; e++) - if (key[e] == '}') break; - - /* No '}' or nothing betweeen {} ? Hash the whole key. */ - if (e == keylen || e == s+1) return crc16(key,keylen) & 0x3FFF; - - /* If we are here there is both a { and a } on its right. Hash - * what is in the middle between { and }. */ - return crc16(key+s+1,e-s-1) & 0x3FFF; -} - -/* ----------------------------------------------------------------------------- - * CLUSTER node API - * -------------------------------------------------------------------------- */ - -/* Create a new cluster node, with the specified flags. - * If "nodename" is NULL this is considered a first handshake and a random - * node name is assigned to this node (it will be fixed later when we'll - * receive the first pong). - * - * The node is created and returned to the user, but it is not automatically - * added to the nodes hash table. */ -clusterNode *createClusterNode(char *nodename, int flags) { - clusterNode *node = zmalloc(sizeof(*node)); - - if (nodename) - memcpy(node->name, nodename, CLUSTER_NAMELEN); - else - getRandomHexChars(node->name, CLUSTER_NAMELEN); - node->ctime = mstime(); - node->configEpoch = 0; - node->flags = flags; - memset(node->slots,0,sizeof(node->slots)); - node->numslots = 0; - node->numslaves = 0; - node->slaves = NULL; - node->slaveof = NULL; - node->ping_sent = node->pong_received = 0; - node->fail_time = 0; - node->link = NULL; - memset(node->ip,0,sizeof(node->ip)); - node->port = 0; - node->cport = 0; - node->fail_reports = listCreate(); - node->voted_time = 0; - node->orphaned_time = 0; - node->repl_offset_time = 0; - node->repl_offset = 0; - listSetFreeMethod(node->fail_reports,zfree); - return node; -} - -/* This function is called every time we get a failure report from a node. - * The side effect is to populate the fail_reports list (or to update - * the timestamp of an existing report). - * - * 'failing' is the node that is in failure state according to the - * 'sender' node. - * - * The function returns 0 if it just updates a timestamp of an existing - * failure report from the same sender. 1 is returned if a new failure - * report is created. */ -int clusterNodeAddFailureReport(clusterNode *failing, clusterNode *sender) { - list *l = failing->fail_reports; - listNode *ln; - listIter li; - clusterNodeFailReport *fr; - - /* If a failure report from the same sender already exists, just update - * the timestamp. */ - listRewind(l,&li); - while ((ln = listNext(&li)) != NULL) { - fr = ln->value; - if (fr->node == sender) { - fr->time = mstime(); - return 0; - } - } - - /* Otherwise create a new report. */ - fr = zmalloc(sizeof(*fr)); - fr->node = sender; - fr->time = mstime(); - listAddNodeTail(l,fr); - return 1; -} - -/* Remove failure reports that are too old, where too old means reasonably - * older than the global node timeout. Note that anyway for a node to be - * flagged as FAIL we need to have a local PFAIL state that is at least - * older than the global node timeout, so we don't just trust the number - * of failure reports from other nodes. */ -void clusterNodeCleanupFailureReports(clusterNode *node) { - list *l = node->fail_reports; - listNode *ln; - listIter li; - clusterNodeFailReport *fr; - mstime_t maxtime = server.cluster_node_timeout * - CLUSTER_FAIL_REPORT_VALIDITY_MULT; - mstime_t now = mstime(); - - listRewind(l,&li); - while ((ln = listNext(&li)) != NULL) { - fr = ln->value; - if (now - fr->time > maxtime) listDelNode(l,ln); - } -} - -/* Remove the failing report for 'node' if it was previously considered - * failing by 'sender'. This function is called when a node informs us via - * gossip that a node is OK from its point of view (no FAIL or PFAIL flags). - * - * Note that this function is called relatively often as it gets called even - * when there are no nodes failing, and is O(N), however when the cluster is - * fine the failure reports list is empty so the function runs in constant - * time. - * - * The function returns 1 if the failure report was found and removed. - * Otherwise 0 is returned. */ -int clusterNodeDelFailureReport(clusterNode *node, clusterNode *sender) { - list *l = node->fail_reports; - listNode *ln; - listIter li; - clusterNodeFailReport *fr; - - /* Search for a failure report from this sender. */ - listRewind(l,&li); - while ((ln = listNext(&li)) != NULL) { - fr = ln->value; - if (fr->node == sender) break; - } - if (!ln) return 0; /* No failure report from this sender. */ - - /* Remove the failure report. */ - listDelNode(l,ln); - clusterNodeCleanupFailureReports(node); - return 1; -} - -/* Return the number of external nodes that believe 'node' is failing, - * not including this node, that may have a PFAIL or FAIL state for this - * node as well. */ -int clusterNodeFailureReportsCount(clusterNode *node) { - clusterNodeCleanupFailureReports(node); - return listLength(node->fail_reports); -} - -int clusterNodeRemoveSlave(clusterNode *master, clusterNode *slave) { - int j; - - for (j = 0; j < master->numslaves; j++) { - if (master->slaves[j] == slave) { - if ((j+1) < master->numslaves) { - int remaining_slaves = (master->numslaves - j) - 1; - memmove(master->slaves+j,master->slaves+(j+1), - (sizeof(*master->slaves) * remaining_slaves)); - } - master->numslaves--; - if (master->numslaves == 0) - master->flags &= ~CLUSTER_NODE_MIGRATE_TO; - return C_OK; - } - } - return C_ERR; -} - -int clusterNodeAddSlave(clusterNode *master, clusterNode *slave) { - int j; - - /* If it's already a slave, don't add it again. */ - for (j = 0; j < master->numslaves; j++) - if (master->slaves[j] == slave) return C_ERR; - master->slaves = zrealloc(master->slaves, - sizeof(clusterNode*)*(master->numslaves+1)); - master->slaves[master->numslaves] = slave; - master->numslaves++; - master->flags |= CLUSTER_NODE_MIGRATE_TO; - return C_OK; -} - -int clusterCountNonFailingSlaves(clusterNode *n) { - int j, okslaves = 0; - - for (j = 0; j < n->numslaves; j++) - if (!nodeFailed(n->slaves[j])) okslaves++; - return okslaves; -} - -/* Low level cleanup of the node structure. Only called by clusterDelNode(). */ -void freeClusterNode(clusterNode *n) { - sds nodename; - int j; - - /* If the node has associated slaves, we have to set - * all the slaves->slaveof fields to NULL (unknown). */ - for (j = 0; j < n->numslaves; j++) - n->slaves[j]->slaveof = NULL; - - /* Remove this node from the list of slaves of its master. */ - if (nodeIsSlave(n) && n->slaveof) clusterNodeRemoveSlave(n->slaveof,n); - - /* Unlink from the set of nodes. */ - nodename = sdsnewlen(n->name, CLUSTER_NAMELEN); - serverAssert(dictDelete(server.cluster->nodes,nodename) == DICT_OK); - sdsfree(nodename); - - /* Release link and associated data structures. */ - if (n->link) freeClusterLink(n->link); - listRelease(n->fail_reports); - zfree(n->slaves); - zfree(n); -} - -/* Add a node to the nodes hash table */ -int clusterAddNode(clusterNode *node) { - int retval; - - retval = dictAdd(server.cluster->nodes, - sdsnewlen(node->name,CLUSTER_NAMELEN), node); - return (retval == DICT_OK) ? C_OK : C_ERR; -} - -/* Remove a node from the cluster. The functio performs the high level - * cleanup, calling freeClusterNode() for the low level cleanup. - * Here we do the following: - * - * 1) Mark all the slots handled by it as unassigned. - * 2) Remove all the failure reports sent by this node and referenced by - * other nodes. - * 3) Free the node with freeClusterNode() that will in turn remove it - * from the hash table and from the list of slaves of its master, if - * it is a slave node. - */ -void clusterDelNode(clusterNode *delnode) { - int j; - dictIterator *di; - dictEntry *de; - - /* 1) Mark slots as unassigned. */ - for (j = 0; j < CLUSTER_SLOTS; j++) { - if (server.cluster->importing_slots_from[j] == delnode) - server.cluster->importing_slots_from[j] = NULL; - if (server.cluster->migrating_slots_to[j] == delnode) - server.cluster->migrating_slots_to[j] = NULL; - if (server.cluster->slots[j] == delnode) - clusterDelSlot(j); - } - - /* 2) Remove failure reports. */ - di = dictGetSafeIterator(server.cluster->nodes); - while((de = dictNext(di)) != NULL) { - clusterNode *node = dictGetVal(de); - - if (node == delnode) continue; - clusterNodeDelFailureReport(node,delnode); - } - dictReleaseIterator(di); - - /* 3) Free the node, unlinking it from the cluster. */ - freeClusterNode(delnode); -} - -/* Node lookup by name */ -clusterNode *clusterLookupNode(char *name) { - sds s = sdsnewlen(name, CLUSTER_NAMELEN); - dictEntry *de; - - de = dictFind(server.cluster->nodes,s); - sdsfree(s); - if (de == NULL) return NULL; - return dictGetVal(de); -} - -/* This is only used after the handshake. When we connect a given IP/PORT - * as a result of CLUSTER MEET we don't have the node name yet, so we - * pick a random one, and will fix it when we receive the PONG request using - * this function. */ -void clusterRenameNode(clusterNode *node, char *newname) { - int retval; - sds s = sdsnewlen(node->name, CLUSTER_NAMELEN); - - serverLog(LL_DEBUG,"Renaming node %.40s into %.40s", - node->name, newname); - retval = dictDelete(server.cluster->nodes, s); - sdsfree(s); - serverAssert(retval == DICT_OK); - memcpy(node->name, newname, CLUSTER_NAMELEN); - clusterAddNode(node); -} - -/* ----------------------------------------------------------------------------- - * CLUSTER config epoch handling - * -------------------------------------------------------------------------- */ - -/* Return the greatest configEpoch found in the cluster, or the current - * epoch if greater than any node configEpoch. */ -uint64_t clusterGetMaxEpoch(void) { - uint64_t max = 0; - dictIterator *di; - dictEntry *de; - - di = dictGetSafeIterator(server.cluster->nodes); - while((de = dictNext(di)) != NULL) { - clusterNode *node = dictGetVal(de); - if (node->configEpoch > max) max = node->configEpoch; - } - dictReleaseIterator(di); - if (max < server.cluster->currentEpoch) max = server.cluster->currentEpoch; - return max; -} - -/* If this node epoch is zero or is not already the greatest across the - * cluster (from the POV of the local configuration), this function will: - * - * 1) Generate a new config epoch, incrementing the current epoch. - * 2) Assign the new epoch to this node, WITHOUT any consensus. - * 3) Persist the configuration on disk before sending packets with the - * new configuration. - * - * If the new config epoch is generated and assigend, C_OK is returned, - * otherwise C_ERR is returned (since the node has already the greatest - * configuration around) and no operation is performed. - * - * Important note: this function violates the principle that config epochs - * should be generated with consensus and should be unique across the cluster. - * However Redis Cluster uses this auto-generated new config epochs in two - * cases: - * - * 1) When slots are closed after importing. Otherwise resharding would be - * too expensive. - * 2) When CLUSTER FAILOVER is called with options that force a slave to - * failover its master even if there is not master majority able to - * create a new configuration epoch. - * - * Redis Cluster will not explode using this function, even in the case of - * a collision between this node and another node, generating the same - * configuration epoch unilaterally, because the config epoch conflict - * resolution algorithm will eventually move colliding nodes to different - * config epochs. However using this function may violate the "last failover - * wins" rule, so should only be used with care. */ -int clusterBumpConfigEpochWithoutConsensus(void) { - uint64_t maxEpoch = clusterGetMaxEpoch(); - - if (myself->configEpoch == 0 || - myself->configEpoch != maxEpoch) - { - server.cluster->currentEpoch++; - myself->configEpoch = server.cluster->currentEpoch; - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| - CLUSTER_TODO_FSYNC_CONFIG); - serverLog(LL_WARNING, - "New configEpoch set to %llu", - (unsigned long long) myself->configEpoch); - return C_OK; - } else { - return C_ERR; - } -} - -/* This function is called when this node is a master, and we receive from - * another master a configuration epoch that is equal to our configuration - * epoch. - * - * BACKGROUND - * - * It is not possible that different slaves get the same config - * epoch during a failover election, because the slaves need to get voted - * by a majority. However when we perform a manual resharding of the cluster - * the node will assign a configuration epoch to itself without to ask - * for agreement. Usually resharding happens when the cluster is working well - * and is supervised by the sysadmin, however it is possible for a failover - * to happen exactly while the node we are resharding a slot to assigns itself - * a new configuration epoch, but before it is able to propagate it. - * - * So technically it is possible in this condition that two nodes end with - * the same configuration epoch. - * - * Another possibility is that there are bugs in the implementation causing - * this to happen. - * - * Moreover when a new cluster is created, all the nodes start with the same - * configEpoch. This collision resolution code allows nodes to automatically - * end with a different configEpoch at startup automatically. - * - * In all the cases, we want a mechanism that resolves this issue automatically - * as a safeguard. The same configuration epoch for masters serving different - * set of slots is not harmful, but it is if the nodes end serving the same - * slots for some reason (manual errors or software bugs) without a proper - * failover procedure. - * - * In general we want a system that eventually always ends with different - * masters having different configuration epochs whatever happened, since - * nothign is worse than a split-brain condition in a distributed system. - * - * BEHAVIOR - * - * When this function gets called, what happens is that if this node - * has the lexicographically smaller Node ID compared to the other node - * with the conflicting epoch (the 'sender' node), it will assign itself - * the greatest configuration epoch currently detected among nodes plus 1. - * - * This means that even if there are multiple nodes colliding, the node - * with the greatest Node ID never moves forward, so eventually all the nodes - * end with a different configuration epoch. - */ -void clusterHandleConfigEpochCollision(clusterNode *sender) { - /* Prerequisites: nodes have the same configEpoch and are both masters. */ - if (sender->configEpoch != myself->configEpoch || - !nodeIsMaster(sender) || !nodeIsMaster(myself)) return; - /* Don't act if the colliding node has a smaller Node ID. */ - if (memcmp(sender->name,myself->name,CLUSTER_NAMELEN) <= 0) return; - /* Get the next ID available at the best of this node knowledge. */ - server.cluster->currentEpoch++; - myself->configEpoch = server.cluster->currentEpoch; - clusterSaveConfigOrDie(1); - serverLog(LL_VERBOSE, - "WARNING: configEpoch collision with node %.40s." - " configEpoch set to %llu", - sender->name, - (unsigned long long) myself->configEpoch); -} - -/* ----------------------------------------------------------------------------- - * CLUSTER nodes blacklist - * - * The nodes blacklist is just a way to ensure that a given node with a given - * Node ID is not readded before some time elapsed (this time is specified - * in seconds in CLUSTER_BLACKLIST_TTL). - * - * This is useful when we want to remove a node from the cluster completely: - * when CLUSTER FORGET is called, it also puts the node into the blacklist so - * that even if we receive gossip messages from other nodes that still remember - * about the node we want to remove, we don't re-add it before some time. - * - * Currently the CLUSTER_BLACKLIST_TTL is set to 1 minute, this means - * that redis-trib has 60 seconds to send CLUSTER FORGET messages to nodes - * in the cluster without dealing with the problem of other nodes re-adding - * back the node to nodes we already sent the FORGET command to. - * - * The data structure used is a hash table with an sds string representing - * the node ID as key, and the time when it is ok to re-add the node as - * value. - * -------------------------------------------------------------------------- */ - -#define CLUSTER_BLACKLIST_TTL 60 /* 1 minute. */ - - -/* Before of the addNode() or Exists() operations we always remove expired - * entries from the black list. This is an O(N) operation but it is not a - * problem since add / exists operations are called very infrequently and - * the hash table is supposed to contain very little elements at max. - * However without the cleanup during long uptimes and with some automated - * node add/removal procedures, entries could accumulate. */ -void clusterBlacklistCleanup(void) { - dictIterator *di; - dictEntry *de; - - di = dictGetSafeIterator(server.cluster->nodes_black_list); - while((de = dictNext(di)) != NULL) { - int64_t expire = dictGetUnsignedIntegerVal(de); - - if (expire < server.unixtime) - dictDelete(server.cluster->nodes_black_list,dictGetKey(de)); - } - dictReleaseIterator(di); -} - -/* Cleanup the blacklist and add a new node ID to the black list. */ -void clusterBlacklistAddNode(clusterNode *node) { - dictEntry *de; - sds id = sdsnewlen(node->name,CLUSTER_NAMELEN); - - clusterBlacklistCleanup(); - if (dictAdd(server.cluster->nodes_black_list,id,NULL) == DICT_OK) { - /* If the key was added, duplicate the sds string representation of - * the key for the next lookup. We'll free it at the end. */ - id = sdsdup(id); - } - de = dictFind(server.cluster->nodes_black_list,id); - dictSetUnsignedIntegerVal(de,time(NULL)+CLUSTER_BLACKLIST_TTL); - sdsfree(id); -} - -/* Return non-zero if the specified node ID exists in the blacklist. - * You don't need to pass an sds string here, any pointer to 40 bytes - * will work. */ -int clusterBlacklistExists(char *nodeid) { - sds id = sdsnewlen(nodeid,CLUSTER_NAMELEN); - int retval; - - clusterBlacklistCleanup(); - retval = dictFind(server.cluster->nodes_black_list,id) != NULL; - sdsfree(id); - return retval; -} - -/* ----------------------------------------------------------------------------- - * CLUSTER messages exchange - PING/PONG and gossip - * -------------------------------------------------------------------------- */ - -/* This function checks if a given node should be marked as FAIL. - * It happens if the following conditions are met: - * - * 1) We received enough failure reports from other master nodes via gossip. - * Enough means that the majority of the masters signaled the node is - * down recently. - * 2) We believe this node is in PFAIL state. - * - * If a failure is detected we also inform the whole cluster about this - * event trying to force every other node to set the FAIL flag for the node. - * - * Note that the form of agreement used here is weak, as we collect the majority - * of masters state during some time, and even if we force agreement by - * propagating the FAIL message, because of partitions we may not reach every - * node. However: - * - * 1) Either we reach the majority and eventually the FAIL state will propagate - * to all the cluster. - * 2) Or there is no majority so no slave promotion will be authorized and the - * FAIL flag will be cleared after some time. - */ -void markNodeAsFailingIfNeeded(clusterNode *node) { - int failures; - int needed_quorum = (server.cluster->size / 2) + 1; - - if (!nodeTimedOut(node)) return; /* We can reach it. */ - if (nodeFailed(node)) return; /* Already FAILing. */ - - failures = clusterNodeFailureReportsCount(node); - /* Also count myself as a voter if I'm a master. */ - if (nodeIsMaster(myself)) failures++; - if (failures < needed_quorum) return; /* No weak agreement from masters. */ - - serverLog(LL_NOTICE, - "Marking node %.40s as failing (quorum reached).", node->name); - - /* Mark the node as failing. */ - node->flags &= ~CLUSTER_NODE_PFAIL; - node->flags |= CLUSTER_NODE_FAIL; - node->fail_time = mstime(); - - /* Broadcast the failing node name to everybody, forcing all the other - * reachable nodes to flag the node as FAIL. */ - if (nodeIsMaster(myself)) clusterSendFail(node->name); - clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE|CLUSTER_TODO_SAVE_CONFIG); -} - -/* This function is called only if a node is marked as FAIL, but we are able - * to reach it again. It checks if there are the conditions to undo the FAIL - * state. */ -void clearNodeFailureIfNeeded(clusterNode *node) { - mstime_t now = mstime(); - - serverAssert(nodeFailed(node)); - - /* For slaves we always clear the FAIL flag if we can contact the - * node again. */ - if (nodeIsSlave(node) || node->numslots == 0) { - serverLog(LL_NOTICE, - "Clear FAIL state for node %.40s: %s is reachable again.", - node->name, - nodeIsSlave(node) ? "slave" : "master without slots"); - node->flags &= ~CLUSTER_NODE_FAIL; - clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE|CLUSTER_TODO_SAVE_CONFIG); - } - - /* If it is a master and... - * 1) The FAIL state is old enough. - * 2) It is yet serving slots from our point of view (not failed over). - * Apparently no one is going to fix these slots, clear the FAIL flag. */ - if (nodeIsMaster(node) && node->numslots > 0 && - (now - node->fail_time) > - (server.cluster_node_timeout * CLUSTER_FAIL_UNDO_TIME_MULT)) - { - serverLog(LL_NOTICE, - "Clear FAIL state for node %.40s: is reachable again and nobody is serving its slots after some time.", - node->name); - node->flags &= ~CLUSTER_NODE_FAIL; - clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE|CLUSTER_TODO_SAVE_CONFIG); - } -} - -/* Return true if we already have a node in HANDSHAKE state matching the - * specified ip address and port number. This function is used in order to - * avoid adding a new handshake node for the same address multiple times. */ -int clusterHandshakeInProgress(char *ip, int port, int cport) { - dictIterator *di; - dictEntry *de; - - di = dictGetSafeIterator(server.cluster->nodes); - while((de = dictNext(di)) != NULL) { - clusterNode *node = dictGetVal(de); - - if (!nodeInHandshake(node)) continue; - if (!strcasecmp(node->ip,ip) && - node->port == port && - node->cport == cport) break; - } - dictReleaseIterator(di); - return de != NULL; -} - -/* Start an handshake with the specified address if there is not one - * already in progress. Returns non-zero if the handshake was actually - * started. On error zero is returned and errno is set to one of the - * following values: - * - * EAGAIN - There is already an handshake in progress for this address. - * EINVAL - IP or port are not valid. */ -int clusterStartHandshake(char *ip, int port, int cport) { - clusterNode *n; - char norm_ip[NET_IP_STR_LEN]; - struct sockaddr_storage sa; - - /* IP sanity check */ - if (inet_pton(AF_INET,ip, - &(((struct sockaddr_in *)&sa)->sin_addr))) - { - sa.ss_family = AF_INET; - } else if (inet_pton(AF_INET6,ip, - &(((struct sockaddr_in6 *)&sa)->sin6_addr))) - { - sa.ss_family = AF_INET6; - } else { - errno = EINVAL; - return 0; - } - - /* Port sanity check */ - if (port <= 0 || port > 65535 || cport <= 0 || cport > 65535) { - errno = EINVAL; - return 0; - } - - /* Set norm_ip as the normalized string representation of the node - * IP address. */ - memset(norm_ip,0,NET_IP_STR_LEN); - if (sa.ss_family == AF_INET) - inet_ntop(AF_INET, - (void*)&(((struct sockaddr_in *)&sa)->sin_addr), - norm_ip,NET_IP_STR_LEN); - else - inet_ntop(AF_INET6, - (void*)&(((struct sockaddr_in6 *)&sa)->sin6_addr), - norm_ip,NET_IP_STR_LEN); - - if (clusterHandshakeInProgress(norm_ip,port,cport)) { - errno = EAGAIN; - return 0; - } - - /* Add the node with a random address (NULL as first argument to - * createClusterNode()). Everything will be fixed during the - * handshake. */ - n = createClusterNode(NULL,CLUSTER_NODE_HANDSHAKE|CLUSTER_NODE_MEET); - memcpy(n->ip,norm_ip,sizeof(n->ip)); - n->port = port; - n->cport = cport; - clusterAddNode(n); - return 1; -} - -/* Process the gossip section of PING or PONG packets. - * Note that this function assumes that the packet is already sanity-checked - * by the caller, not in the content of the gossip section, but in the - * length. */ -void clusterProcessGossipSection(clusterMsg *hdr, clusterLink *link) { - uint16_t count = ntohs(hdr->count); - clusterMsgDataGossip *g = (clusterMsgDataGossip*) hdr->data.ping.gossip; - clusterNode *sender = link->node ? link->node : clusterLookupNode(hdr->sender); - - while(count--) { - uint16_t flags = ntohs(g->flags); - clusterNode *node; - sds ci; - - ci = representClusterNodeFlags(sdsempty(), flags); - serverLog(LL_DEBUG,"GOSSIP %.40s %s:%d@%d %s", - g->nodename, - g->ip, - ntohs(g->port), - ntohs(g->cport), - ci); - sdsfree(ci); - - /* Update our state accordingly to the gossip sections */ - node = clusterLookupNode(g->nodename); - if (node) { - /* We already know this node. - Handle failure reports, only when the sender is a master. */ - if (sender && nodeIsMaster(sender) && node != myself) { - if (flags & (CLUSTER_NODE_FAIL|CLUSTER_NODE_PFAIL)) { - if (clusterNodeAddFailureReport(node,sender)) { - serverLog(LL_VERBOSE, - "Node %.40s reported node %.40s as not reachable.", - sender->name, node->name); - } - markNodeAsFailingIfNeeded(node); - } else { - if (clusterNodeDelFailureReport(node,sender)) { - serverLog(LL_VERBOSE, - "Node %.40s reported node %.40s is back online.", - sender->name, node->name); - } - } - } - - /* If from our POV the node is up (no failure flags are set), - * we have no pending ping for the node, nor we have failure - * reports for this node, update the last pong time with the - * one we see from the other nodes. */ - if (!(flags & (CLUSTER_NODE_FAIL|CLUSTER_NODE_PFAIL)) && - node->ping_sent == 0 && - clusterNodeFailureReportsCount(node) == 0) - { - mstime_t pongtime = ntohl(g->pong_received); - pongtime *= 1000; /* Convert back to milliseconds. */ - - /* Replace the pong time with the received one only if - * it's greater than our view but is not in the future - * (with 500 milliseconds tolerance) from the POV of our - * clock. */ - if (pongtime <= (server.mstime+500) && - pongtime > node->pong_received) - { - node->pong_received = pongtime; - } - } - - /* If we already know this node, but it is not reachable, and - * we see a different address in the gossip section of a node that - * can talk with this other node, update the address, disconnect - * the old link if any, so that we'll attempt to connect with the - * new address. */ - if (node->flags & (CLUSTER_NODE_FAIL|CLUSTER_NODE_PFAIL) && - !(flags & CLUSTER_NODE_NOADDR) && - !(flags & (CLUSTER_NODE_FAIL|CLUSTER_NODE_PFAIL)) && - (strcasecmp(node->ip,g->ip) || - node->port != ntohs(g->port) || - node->cport != ntohs(g->cport))) - { - if (node->link) freeClusterLink(node->link); - memcpy(node->ip,g->ip,NET_IP_STR_LEN); - node->port = ntohs(g->port); - node->cport = ntohs(g->cport); - node->flags &= ~CLUSTER_NODE_NOADDR; - } - } else { - /* If it's not in NOADDR state and we don't have it, we - * start a handshake process against this IP/PORT pairs. - * - * Note that we require that the sender of this gossip message - * is a well known node in our cluster, otherwise we risk - * joining another cluster. */ - if (sender && - !(flags & CLUSTER_NODE_NOADDR) && - !clusterBlacklistExists(g->nodename)) - { - clusterStartHandshake(g->ip,ntohs(g->port),ntohs(g->cport)); - } - } - - /* Next node */ - g++; - } -} - -/* IP -> string conversion. 'buf' is supposed to at least be 46 bytes. - * If 'announced_ip' length is non-zero, it is used instead of extracting - * the IP from the socket peer address. */ -void nodeIp2String(char *buf, clusterLink *link, char *announced_ip) { - if (announced_ip[0] != '\0') { - memcpy(buf,announced_ip,NET_IP_STR_LEN); - buf[NET_IP_STR_LEN-1] = '\0'; /* We are not sure the input is sane. */ - } else { - anetPeerToString(link->fd, buf, NET_IP_STR_LEN, NULL); - } -} - -/* Update the node address to the IP address that can be extracted - * from link->fd, or if hdr->myip is non empty, to the address the node - * is announcing us. The port is taken from the packet header as well. - * - * If the address or port changed, disconnect the node link so that we'll - * connect again to the new address. - * - * If the ip/port pair are already correct no operation is performed at - * all. - * - * The function returns 0 if the node address is still the same, - * otherwise 1 is returned. */ -int nodeUpdateAddressIfNeeded(clusterNode *node, clusterLink *link, - clusterMsg *hdr) -{ - char ip[NET_IP_STR_LEN] = {0}; - int port = ntohs(hdr->port); - int cport = ntohs(hdr->cport); - - /* We don't proceed if the link is the same as the sender link, as this - * function is designed to see if the node link is consistent with the - * symmetric link that is used to receive PINGs from the node. - * - * As a side effect this function never frees the passed 'link', so - * it is safe to call during packet processing. */ - if (link == node->link) return 0; - - nodeIp2String(ip,link,hdr->myip); - if (node->port == port && node->cport == cport && - strcmp(ip,node->ip) == 0) return 0; - - /* IP / port is different, update it. */ - memcpy(node->ip,ip,sizeof(ip)); - node->port = port; - node->cport = cport; - if (node->link) freeClusterLink(node->link); - node->flags &= ~CLUSTER_NODE_NOADDR; - serverLog(LL_WARNING,"Address updated for node %.40s, now %s:%d", - node->name, node->ip, node->port); - - /* Check if this is our master and we have to change the - * replication target as well. */ - if (nodeIsSlave(myself) && myself->slaveof == node) - replicationSetMaster(node->ip, node->port); - return 1; -} - -/* Reconfigure the specified node 'n' as a master. This function is called when - * a node that we believed to be a slave is now acting as master in order to - * update the state of the node. */ -void clusterSetNodeAsMaster(clusterNode *n) { - if (nodeIsMaster(n)) return; - - if (n->slaveof) { - clusterNodeRemoveSlave(n->slaveof,n); - if (n != myself) n->flags |= CLUSTER_NODE_MIGRATE_TO; - } - n->flags &= ~CLUSTER_NODE_SLAVE; - n->flags |= CLUSTER_NODE_MASTER; - n->slaveof = NULL; - - /* Update config and state. */ - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| - CLUSTER_TODO_UPDATE_STATE); -} - -/* This function is called when we receive a master configuration via a - * PING, PONG or UPDATE packet. What we receive is a node, a configEpoch of the - * node, and the set of slots claimed under this configEpoch. - * - * What we do is to rebind the slots with newer configuration compared to our - * local configuration, and if needed, we turn ourself into a replica of the - * node (see the function comments for more info). - * - * The 'sender' is the node for which we received a configuration update. - * Sometimes it is not actually the "Sender" of the information, like in the - * case we receive the info via an UPDATE packet. */ -void clusterUpdateSlotsConfigWith(clusterNode *sender, uint64_t senderConfigEpoch, unsigned char *slots) { - int j; - clusterNode *curmaster, *newmaster = NULL; - /* The dirty slots list is a list of slots for which we lose the ownership - * while having still keys inside. This usually happens after a failover - * or after a manual cluster reconfiguration operated by the admin. - * - * If the update message is not able to demote a master to slave (in this - * case we'll resync with the master updating the whole key space), we - * need to delete all the keys in the slots we lost ownership. */ - uint16_t dirty_slots[CLUSTER_SLOTS]; - int dirty_slots_count = 0; - - /* Here we set curmaster to this node or the node this node - * replicates to if it's a slave. In the for loop we are - * interested to check if slots are taken away from curmaster. */ - curmaster = nodeIsMaster(myself) ? myself : myself->slaveof; - - if (sender == myself) { - serverLog(LL_WARNING,"Discarding UPDATE message about myself."); - return; - } - - for (j = 0; j < CLUSTER_SLOTS; j++) { - if (bitmapTestBit(slots,j)) { - /* The slot is already bound to the sender of this message. */ - if (server.cluster->slots[j] == sender) continue; - - /* The slot is in importing state, it should be modified only - * manually via redis-trib (example: a resharding is in progress - * and the migrating side slot was already closed and is advertising - * a new config. We still want the slot to be closed manually). */ - if (server.cluster->importing_slots_from[j]) continue; - - /* We rebind the slot to the new node claiming it if: - * 1) The slot was unassigned or the new node claims it with a - * greater configEpoch. - * 2) We are not currently importing the slot. */ - if (server.cluster->slots[j] == NULL || - server.cluster->slots[j]->configEpoch < senderConfigEpoch) - { - /* Was this slot mine, and still contains keys? Mark it as - * a dirty slot. */ - if (server.cluster->slots[j] == myself && - countKeysInSlot(j) && - sender != myself) - { - dirty_slots[dirty_slots_count] = j; - dirty_slots_count++; - } - - if (server.cluster->slots[j] == curmaster) - newmaster = sender; - clusterDelSlot(j); - clusterAddSlot(sender,j); - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| - CLUSTER_TODO_UPDATE_STATE| - CLUSTER_TODO_FSYNC_CONFIG); - } - } - } - - /* If at least one slot was reassigned from a node to another node - * with a greater configEpoch, it is possible that: - * 1) We are a master left without slots. This means that we were - * failed over and we should turn into a replica of the new - * master. - * 2) We are a slave and our master is left without slots. We need - * to replicate to the new slots owner. */ - if (newmaster && curmaster->numslots == 0) { - serverLog(LL_WARNING, - "Configuration change detected. Reconfiguring myself " - "as a replica of %.40s", sender->name); - clusterSetMaster(sender); - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| - CLUSTER_TODO_UPDATE_STATE| - CLUSTER_TODO_FSYNC_CONFIG); - } else if (dirty_slots_count) { - /* If we are here, we received an update message which removed - * ownership for certain slots we still have keys about, but still - * we are serving some slots, so this master node was not demoted to - * a slave. - * - * In order to maintain a consistent state between keys and slots - * we need to remove all the keys from the slots we lost. */ - for (j = 0; j < dirty_slots_count; j++) - delKeysInSlot(dirty_slots[j]); - } -} - -/* When this function is called, there is a packet to process starting - * at node->rcvbuf. Releasing the buffer is up to the caller, so this - * function should just handle the higher level stuff of processing the - * packet, modifying the cluster state if needed. - * - * The function returns 1 if the link is still valid after the packet - * was processed, otherwise 0 if the link was freed since the packet - * processing lead to some inconsistency error (for instance a PONG - * received from the wrong sender ID). */ -int clusterProcessPacket(clusterLink *link) { - clusterMsg *hdr = (clusterMsg*) link->rcvbuf; - uint32_t totlen = ntohl(hdr->totlen); - uint16_t type = ntohs(hdr->type); - - if (type < CLUSTERMSG_TYPE_COUNT) - server.cluster->stats_bus_messages_received[type]++; - serverLog(LL_DEBUG,"--- Processing packet of type %d, %lu bytes", - type, (unsigned long) totlen); - - /* Perform sanity checks */ - if (totlen < 16) return 1; /* At least signature, version, totlen, count. */ - if (totlen > sdslen(link->rcvbuf)) return 1; - - if (ntohs(hdr->ver) != CLUSTER_PROTO_VER) { - /* Can't handle messages of different versions. */ - return 1; - } - - uint16_t flags = ntohs(hdr->flags); - uint64_t senderCurrentEpoch = 0, senderConfigEpoch = 0; - clusterNode *sender; - - if (type == CLUSTERMSG_TYPE_PING || type == CLUSTERMSG_TYPE_PONG || - type == CLUSTERMSG_TYPE_MEET) - { - uint16_t count = ntohs(hdr->count); - uint32_t explen; /* expected length of this packet */ - - explen = sizeof(clusterMsg)-sizeof(union clusterMsgData); - explen += (sizeof(clusterMsgDataGossip)*count); - if (totlen != explen) return 1; - } else if (type == CLUSTERMSG_TYPE_FAIL) { - uint32_t explen = sizeof(clusterMsg)-sizeof(union clusterMsgData); - - explen += sizeof(clusterMsgDataFail); - if (totlen != explen) return 1; - } else if (type == CLUSTERMSG_TYPE_PUBLISH) { - uint32_t explen = sizeof(clusterMsg)-sizeof(union clusterMsgData); - - explen += sizeof(clusterMsgDataPublish) - - 8 + - ntohl(hdr->data.publish.msg.channel_len) + - ntohl(hdr->data.publish.msg.message_len); - if (totlen != explen) return 1; - } else if (type == CLUSTERMSG_TYPE_FAILOVER_AUTH_REQUEST || - type == CLUSTERMSG_TYPE_FAILOVER_AUTH_ACK || - type == CLUSTERMSG_TYPE_MFSTART) - { - uint32_t explen = sizeof(clusterMsg)-sizeof(union clusterMsgData); - - if (totlen != explen) return 1; - } else if (type == CLUSTERMSG_TYPE_UPDATE) { - uint32_t explen = sizeof(clusterMsg)-sizeof(union clusterMsgData); - - explen += sizeof(clusterMsgDataUpdate); - if (totlen != explen) return 1; - } - - /* Check if the sender is a known node. */ - sender = clusterLookupNode(hdr->sender); - if (sender && !nodeInHandshake(sender)) { - /* Update our curretEpoch if we see a newer epoch in the cluster. */ - senderCurrentEpoch = ntohu64(hdr->currentEpoch); - senderConfigEpoch = ntohu64(hdr->configEpoch); - if (senderCurrentEpoch > server.cluster->currentEpoch) - server.cluster->currentEpoch = senderCurrentEpoch; - /* Update the sender configEpoch if it is publishing a newer one. */ - if (senderConfigEpoch > sender->configEpoch) { - sender->configEpoch = senderConfigEpoch; - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| - CLUSTER_TODO_FSYNC_CONFIG); - } - /* Update the replication offset info for this node. */ - sender->repl_offset = ntohu64(hdr->offset); - sender->repl_offset_time = mstime(); - /* If we are a slave performing a manual failover and our master - * sent its offset while already paused, populate the MF state. */ - if (server.cluster->mf_end && - nodeIsSlave(myself) && - myself->slaveof == sender && - hdr->mflags[0] & CLUSTERMSG_FLAG0_PAUSED && - server.cluster->mf_master_offset == 0) - { - server.cluster->mf_master_offset = sender->repl_offset; - serverLog(LL_WARNING, - "Received replication offset for paused " - "master manual failover: %lld", - server.cluster->mf_master_offset); - } - } - - /* Initial processing of PING and MEET requests replying with a PONG. */ - if (type == CLUSTERMSG_TYPE_PING || type == CLUSTERMSG_TYPE_MEET) { - serverLog(LL_DEBUG,"Ping packet received: %p", (void*)link->node); - - /* We use incoming MEET messages in order to set the address - * for 'myself', since only other cluster nodes will send us - * MEET messages on handshakes, when the cluster joins, or - * later if we changed address, and those nodes will use our - * official address to connect to us. So by obtaining this address - * from the socket is a simple way to discover / update our own - * address in the cluster without it being hardcoded in the config. - * - * However if we don't have an address at all, we update the address - * even with a normal PING packet. If it's wrong it will be fixed - * by MEET later. */ - if ((type == CLUSTERMSG_TYPE_MEET || myself->ip[0] == '\0') && - server.cluster_announce_ip == NULL) - { - char ip[NET_IP_STR_LEN]; - - if (anetSockName(link->fd,ip,sizeof(ip),NULL) != -1 && - strcmp(ip,myself->ip)) - { - memcpy(myself->ip,ip,NET_IP_STR_LEN); - serverLog(LL_WARNING,"IP address for this node updated to %s", - myself->ip); - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG); - } - } - - /* Add this node if it is new for us and the msg type is MEET. - * In this stage we don't try to add the node with the right - * flags, slaveof pointer, and so forth, as this details will be - * resolved when we'll receive PONGs from the node. */ - if (!sender && type == CLUSTERMSG_TYPE_MEET) { - clusterNode *node; - - node = createClusterNode(NULL,CLUSTER_NODE_HANDSHAKE); - nodeIp2String(node->ip,link,hdr->myip); - node->port = ntohs(hdr->port); - node->cport = ntohs(hdr->cport); - clusterAddNode(node); - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG); - } - - /* If this is a MEET packet from an unknown node, we still process - * the gossip section here since we have to trust the sender because - * of the message type. */ - if (!sender && type == CLUSTERMSG_TYPE_MEET) - clusterProcessGossipSection(hdr,link); - - /* Anyway reply with a PONG */ - clusterSendPing(link,CLUSTERMSG_TYPE_PONG); - } - - /* PING, PONG, MEET: process config information. */ - if (type == CLUSTERMSG_TYPE_PING || type == CLUSTERMSG_TYPE_PONG || - type == CLUSTERMSG_TYPE_MEET) - { - serverLog(LL_DEBUG,"%s packet received: %p", - type == CLUSTERMSG_TYPE_PING ? "ping" : "pong", - (void*)link->node); - if (link->node) { - if (nodeInHandshake(link->node)) { - /* If we already have this node, try to change the - * IP/port of the node with the new one. */ - if (sender) { - serverLog(LL_VERBOSE, - "Handshake: we already know node %.40s, " - "updating the address if needed.", sender->name); - if (nodeUpdateAddressIfNeeded(sender,link,hdr)) - { - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| - CLUSTER_TODO_UPDATE_STATE); - } - /* Free this node as we already have it. This will - * cause the link to be freed as well. */ - clusterDelNode(link->node); - return 0; - } - - /* First thing to do is replacing the random name with the - * right node name if this was a handshake stage. */ - clusterRenameNode(link->node, hdr->sender); - serverLog(LL_DEBUG,"Handshake with node %.40s completed.", - link->node->name); - link->node->flags &= ~CLUSTER_NODE_HANDSHAKE; - link->node->flags |= flags&(CLUSTER_NODE_MASTER|CLUSTER_NODE_SLAVE); - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG); - } else if (memcmp(link->node->name,hdr->sender, - CLUSTER_NAMELEN) != 0) - { - /* If the reply has a non matching node ID we - * disconnect this node and set it as not having an associated - * address. */ - serverLog(LL_DEBUG,"PONG contains mismatching sender ID. About node %.40s added %d ms ago, having flags %d", - link->node->name, - (int)(mstime()-(link->node->ctime)), - link->node->flags); - link->node->flags |= CLUSTER_NODE_NOADDR; - link->node->ip[0] = '\0'; - link->node->port = 0; - link->node->cport = 0; - freeClusterLink(link); - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG); - return 0; - } - } - - /* Update the node address if it changed. */ - if (sender && type == CLUSTERMSG_TYPE_PING && - !nodeInHandshake(sender) && - nodeUpdateAddressIfNeeded(sender,link,hdr)) - { - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| - CLUSTER_TODO_UPDATE_STATE); - } - - /* Update our info about the node */ - if (link->node && type == CLUSTERMSG_TYPE_PONG) { - link->node->pong_received = mstime(); - link->node->ping_sent = 0; - - /* The PFAIL condition can be reversed without external - * help if it is momentary (that is, if it does not - * turn into a FAIL state). - * - * The FAIL condition is also reversible under specific - * conditions detected by clearNodeFailureIfNeeded(). */ - if (nodeTimedOut(link->node)) { - link->node->flags &= ~CLUSTER_NODE_PFAIL; - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| - CLUSTER_TODO_UPDATE_STATE); - } else if (nodeFailed(link->node)) { - clearNodeFailureIfNeeded(link->node); - } - } - - /* Check for role switch: slave -> master or master -> slave. */ - if (sender) { - if (!memcmp(hdr->slaveof,CLUSTER_NODE_NULL_NAME, - sizeof(hdr->slaveof))) - { - /* Node is a master. */ - clusterSetNodeAsMaster(sender); - } else { - /* Node is a slave. */ - clusterNode *master = clusterLookupNode(hdr->slaveof); - - if (nodeIsMaster(sender)) { - /* Master turned into a slave! Reconfigure the node. */ - clusterDelNodeSlots(sender); - sender->flags &= ~(CLUSTER_NODE_MASTER| - CLUSTER_NODE_MIGRATE_TO); - sender->flags |= CLUSTER_NODE_SLAVE; - - /* Update config and state. */ - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| - CLUSTER_TODO_UPDATE_STATE); - } - - /* Master node changed for this slave? */ - if (master && sender->slaveof != master) { - if (sender->slaveof) - clusterNodeRemoveSlave(sender->slaveof,sender); - clusterNodeAddSlave(master,sender); - sender->slaveof = master; - - /* Update config. */ - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG); - } - } - } - - /* Update our info about served slots. - * - * Note: this MUST happen after we update the master/slave state - * so that CLUSTER_NODE_MASTER flag will be set. */ - - /* Many checks are only needed if the set of served slots this - * instance claims is different compared to the set of slots we have - * for it. Check this ASAP to avoid other computational expansive - * checks later. */ - clusterNode *sender_master = NULL; /* Sender or its master if slave. */ - int dirty_slots = 0; /* Sender claimed slots don't match my view? */ - - if (sender) { - sender_master = nodeIsMaster(sender) ? sender : sender->slaveof; - if (sender_master) { - dirty_slots = memcmp(sender_master->slots, - hdr->myslots,sizeof(hdr->myslots)) != 0; - } - } - - /* 1) If the sender of the message is a master, and we detected that - * the set of slots it claims changed, scan the slots to see if we - * need to update our configuration. */ - if (sender && nodeIsMaster(sender) && dirty_slots) - clusterUpdateSlotsConfigWith(sender,senderConfigEpoch,hdr->myslots); - - /* 2) We also check for the reverse condition, that is, the sender - * claims to serve slots we know are served by a master with a - * greater configEpoch. If this happens we inform the sender. - * - * This is useful because sometimes after a partition heals, a - * reappearing master may be the last one to claim a given set of - * hash slots, but with a configuration that other instances know to - * be deprecated. Example: - * - * A and B are master and slave for slots 1,2,3. - * A is partitioned away, B gets promoted. - * B is partitioned away, and A returns available. - * - * Usually B would PING A publishing its set of served slots and its - * configEpoch, but because of the partition B can't inform A of the - * new configuration, so other nodes that have an updated table must - * do it. In this way A will stop to act as a master (or can try to - * failover if there are the conditions to win the election). */ - if (sender && dirty_slots) { - int j; - - for (j = 0; j < CLUSTER_SLOTS; j++) { - if (bitmapTestBit(hdr->myslots,j)) { - if (server.cluster->slots[j] == sender || - server.cluster->slots[j] == NULL) continue; - if (server.cluster->slots[j]->configEpoch > - senderConfigEpoch) - { - serverLog(LL_VERBOSE, - "Node %.40s has old slots configuration, sending " - "an UPDATE message about %.40s", - sender->name, server.cluster->slots[j]->name); - clusterSendUpdate(sender->link, - server.cluster->slots[j]); - - /* TODO: instead of exiting the loop send every other - * UPDATE packet for other nodes that are the new owner - * of sender's slots. */ - break; - } - } - } - } - - /* If our config epoch collides with the sender's try to fix - * the problem. */ - if (sender && - nodeIsMaster(myself) && nodeIsMaster(sender) && - senderConfigEpoch == myself->configEpoch) - { - clusterHandleConfigEpochCollision(sender); - } - - /* Get info from the gossip section */ - if (sender) clusterProcessGossipSection(hdr,link); - } else if (type == CLUSTERMSG_TYPE_FAIL) { - clusterNode *failing; - - if (sender) { - failing = clusterLookupNode(hdr->data.fail.about.nodename); - if (failing && - !(failing->flags & (CLUSTER_NODE_FAIL|CLUSTER_NODE_MYSELF))) - { - serverLog(LL_NOTICE, - "FAIL message received from %.40s about %.40s", - hdr->sender, hdr->data.fail.about.nodename); - failing->flags |= CLUSTER_NODE_FAIL; - failing->fail_time = mstime(); - failing->flags &= ~CLUSTER_NODE_PFAIL; - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| - CLUSTER_TODO_UPDATE_STATE); - } - } else { - serverLog(LL_NOTICE, - "Ignoring FAIL message from unknown node %.40s about %.40s", - hdr->sender, hdr->data.fail.about.nodename); - } - } else if (type == CLUSTERMSG_TYPE_PUBLISH) { - robj *channel, *message; - uint32_t channel_len, message_len; - - /* Don't bother creating useless objects if there are no - * Pub/Sub subscribers. */ - if (dictSize(server.pubsub_channels) || - listLength(server.pubsub_patterns)) - { - channel_len = ntohl(hdr->data.publish.msg.channel_len); - message_len = ntohl(hdr->data.publish.msg.message_len); - channel = createStringObject( - (char*)hdr->data.publish.msg.bulk_data,channel_len); - message = createStringObject( - (char*)hdr->data.publish.msg.bulk_data+channel_len, - message_len); - pubsubPublishMessage(channel,message); - decrRefCount(channel); - decrRefCount(message); - } - } else if (type == CLUSTERMSG_TYPE_FAILOVER_AUTH_REQUEST) { - if (!sender) return 1; /* We don't know that node. */ - clusterSendFailoverAuthIfNeeded(sender,hdr); - } else if (type == CLUSTERMSG_TYPE_FAILOVER_AUTH_ACK) { - if (!sender) return 1; /* We don't know that node. */ - /* We consider this vote only if the sender is a master serving - * a non zero number of slots, and its currentEpoch is greater or - * equal to epoch where this node started the election. */ - if (nodeIsMaster(sender) && sender->numslots > 0 && - senderCurrentEpoch >= server.cluster->failover_auth_epoch) - { - server.cluster->failover_auth_count++; - /* Maybe we reached a quorum here, set a flag to make sure - * we check ASAP. */ - clusterDoBeforeSleep(CLUSTER_TODO_HANDLE_FAILOVER); - } - } else if (type == CLUSTERMSG_TYPE_MFSTART) { - /* This message is acceptable only if I'm a master and the sender - * is one of my slaves. */ - if (!sender || sender->slaveof != myself) return 1; - /* Manual failover requested from slaves. Initialize the state - * accordingly. */ - resetManualFailover(); - server.cluster->mf_end = mstime() + CLUSTER_MF_TIMEOUT; - server.cluster->mf_slave = sender; - pauseClients(mstime()+(CLUSTER_MF_TIMEOUT*2)); - serverLog(LL_WARNING,"Manual failover requested by slave %.40s.", - sender->name); - } else if (type == CLUSTERMSG_TYPE_UPDATE) { - clusterNode *n; /* The node the update is about. */ - uint64_t reportedConfigEpoch = - ntohu64(hdr->data.update.nodecfg.configEpoch); - - if (!sender) return 1; /* We don't know the sender. */ - n = clusterLookupNode(hdr->data.update.nodecfg.nodename); - if (!n) return 1; /* We don't know the reported node. */ - if (n->configEpoch >= reportedConfigEpoch) return 1; /* Nothing new. */ - - /* If in our current config the node is a slave, set it as a master. */ - if (nodeIsSlave(n)) clusterSetNodeAsMaster(n); - - /* Update the node's configEpoch. */ - n->configEpoch = reportedConfigEpoch; - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| - CLUSTER_TODO_FSYNC_CONFIG); - - /* Check the bitmap of served slots and update our - * config accordingly. */ - clusterUpdateSlotsConfigWith(n,reportedConfigEpoch, - hdr->data.update.nodecfg.slots); - } else { - serverLog(LL_WARNING,"Received unknown packet type: %d", type); - } - return 1; -} - -/* This function is called when we detect the link with this node is lost. - We set the node as no longer connected. The Cluster Cron will detect - this connection and will try to get it connected again. - - Instead if the node is a temporary node used to accept a query, we - completely free the node on error. */ -void handleLinkIOError(clusterLink *link) { - freeClusterLink(link); -} - -/* Send data. This is handled using a trivial send buffer that gets - * consumed by write(). We don't try to optimize this for speed too much - * as this is a very low traffic channel. */ -void clusterWriteHandler(aeEventLoop *el, int fd, void *privdata, int mask) { - clusterLink *link = (clusterLink*) privdata; - ssize_t nwritten; - UNUSED(el); - UNUSED(mask); - - nwritten = write(fd, link->sndbuf, sdslen(link->sndbuf)); - if (nwritten <= 0) { - serverLog(LL_DEBUG,"I/O error writing to node link: %s", - strerror(errno)); - handleLinkIOError(link); - return; - } - sdsrange(link->sndbuf,nwritten,-1); - if (sdslen(link->sndbuf) == 0) - aeDeleteFileEvent(server.el, link->fd, AE_WRITABLE); -} - -/* Read data. Try to read the first field of the header first to check the - * full length of the packet. When a whole packet is in memory this function - * will call the function to process the packet. And so forth. */ -void clusterReadHandler(aeEventLoop *el, int fd, void *privdata, int mask) { - char buf[sizeof(clusterMsg)]; - ssize_t nread; - clusterMsg *hdr; - clusterLink *link = (clusterLink*) privdata; - unsigned int readlen, rcvbuflen; - UNUSED(el); - UNUSED(mask); - - while(1) { /* Read as long as there is data to read. */ - rcvbuflen = sdslen(link->rcvbuf); - if (rcvbuflen < 8) { - /* First, obtain the first 8 bytes to get the full message - * length. */ - readlen = 8 - rcvbuflen; - } else { - /* Finally read the full message. */ - hdr = (clusterMsg*) link->rcvbuf; - if (rcvbuflen == 8) { - /* Perform some sanity check on the message signature - * and length. */ - if (memcmp(hdr->sig,"RCmb",4) != 0 || - ntohl(hdr->totlen) < CLUSTERMSG_MIN_LEN) - { - serverLog(LL_WARNING, - "Bad message length or signature received " - "from Cluster bus."); - handleLinkIOError(link); - return; - } - } - readlen = ntohl(hdr->totlen) - rcvbuflen; - if (readlen > sizeof(buf)) readlen = sizeof(buf); - } - - nread = read(fd,buf,readlen); - if (nread == -1 && errno == EAGAIN) return; /* No more data ready. */ - - if (nread <= 0) { - /* I/O error... */ - serverLog(LL_DEBUG,"I/O error reading from node link: %s", - (nread == 0) ? "connection closed" : strerror(errno)); - handleLinkIOError(link); - return; - } else { - /* Read data and recast the pointer to the new buffer. */ - link->rcvbuf = sdscatlen(link->rcvbuf,buf,nread); - hdr = (clusterMsg*) link->rcvbuf; - rcvbuflen += nread; - } - - /* Total length obtained? Process this packet. */ - if (rcvbuflen >= 8 && rcvbuflen == ntohl(hdr->totlen)) { - if (clusterProcessPacket(link)) { - sdsfree(link->rcvbuf); - link->rcvbuf = sdsempty(); - } else { - return; /* Link no longer valid. */ - } - } - } -} - -/* Put stuff into the send buffer. - * - * It is guaranteed that this function will never have as a side effect - * the link to be invalidated, so it is safe to call this function - * from event handlers that will do stuff with the same link later. */ -void clusterSendMessage(clusterLink *link, unsigned char *msg, size_t msglen) { - if (sdslen(link->sndbuf) == 0 && msglen != 0) - aeCreateFileEvent(server.el,link->fd,AE_WRITABLE, - clusterWriteHandler,link); - - link->sndbuf = sdscatlen(link->sndbuf, msg, msglen); - - /* Populate sent messages stats. */ - clusterMsg *hdr = (clusterMsg*) msg; - uint16_t type = ntohs(hdr->type); - if (type < CLUSTERMSG_TYPE_COUNT) - server.cluster->stats_bus_messages_sent[type]++; -} - -/* Send a message to all the nodes that are part of the cluster having - * a connected link. - * - * It is guaranteed that this function will never have as a side effect - * some node->link to be invalidated, so it is safe to call this function - * from event handlers that will do stuff with node links later. */ -void clusterBroadcastMessage(void *buf, size_t len) { - dictIterator *di; - dictEntry *de; - - di = dictGetSafeIterator(server.cluster->nodes); - while((de = dictNext(di)) != NULL) { - clusterNode *node = dictGetVal(de); - - if (!node->link) continue; - if (node->flags & (CLUSTER_NODE_MYSELF|CLUSTER_NODE_HANDSHAKE)) - continue; - clusterSendMessage(node->link,buf,len); - } - dictReleaseIterator(di); -} - -/* Build the message header. hdr must point to a buffer at least - * sizeof(clusterMsg) in bytes. */ -void clusterBuildMessageHdr(clusterMsg *hdr, int type) { - int totlen = 0; - uint64_t offset; - clusterNode *master; - - /* If this node is a master, we send its slots bitmap and configEpoch. - * If this node is a slave we send the master's information instead (the - * node is flagged as slave so the receiver knows that it is NOT really - * in charge for this slots. */ - master = (nodeIsSlave(myself) && myself->slaveof) ? - myself->slaveof : myself; - - memset(hdr,0,sizeof(*hdr)); - hdr->ver = htons(CLUSTER_PROTO_VER); - hdr->sig[0] = 'R'; - hdr->sig[1] = 'C'; - hdr->sig[2] = 'm'; - hdr->sig[3] = 'b'; - hdr->type = htons(type); - memcpy(hdr->sender,myself->name,CLUSTER_NAMELEN); - - /* If cluster-announce-ip option is enabled, force the receivers of our - * packets to use the specified address for this node. Otherwise if the - * first byte is zero, they'll do auto discovery. */ - memset(hdr->myip,0,NET_IP_STR_LEN); - if (server.cluster_announce_ip) { - strncpy(hdr->myip,server.cluster_announce_ip,NET_IP_STR_LEN); - hdr->myip[NET_IP_STR_LEN-1] = '\0'; - } - - /* Handle cluster-announce-port as well. */ - int announced_port = server.cluster_announce_port ? - server.cluster_announce_port : server.port; - int announced_cport = server.cluster_announce_bus_port ? - server.cluster_announce_bus_port : - (server.port + CLUSTER_PORT_INCR); - - memcpy(hdr->myslots,master->slots,sizeof(hdr->myslots)); - memset(hdr->slaveof,0,CLUSTER_NAMELEN); - if (myself->slaveof != NULL) - memcpy(hdr->slaveof,myself->slaveof->name, CLUSTER_NAMELEN); - hdr->port = htons(announced_port); - hdr->cport = htons(announced_cport); - hdr->flags = htons(myself->flags); - hdr->state = server.cluster->state; - - /* Set the currentEpoch and configEpochs. */ - hdr->currentEpoch = htonu64(server.cluster->currentEpoch); - hdr->configEpoch = htonu64(master->configEpoch); - - /* Set the replication offset. */ - if (nodeIsSlave(myself)) - offset = replicationGetSlaveOffset(); - else - offset = server.master_repl_offset; - hdr->offset = htonu64(offset); - - /* Set the message flags. */ - if (nodeIsMaster(myself) && server.cluster->mf_end) - hdr->mflags[0] |= CLUSTERMSG_FLAG0_PAUSED; - - /* Compute the message length for certain messages. For other messages - * this is up to the caller. */ - if (type == CLUSTERMSG_TYPE_FAIL) { - totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData); - totlen += sizeof(clusterMsgDataFail); - } else if (type == CLUSTERMSG_TYPE_UPDATE) { - totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData); - totlen += sizeof(clusterMsgDataUpdate); - } - hdr->totlen = htonl(totlen); - /* For PING, PONG, and MEET, fixing the totlen field is up to the caller. */ -} - -/* Return non zero if the node is already present in the gossip section of the - * message pointed by 'hdr' and having 'count' gossip entries. Otherwise - * zero is returned. Helper for clusterSendPing(). */ -int clusterNodeIsInGossipSection(clusterMsg *hdr, int count, clusterNode *n) { - int j; - for (j = 0; j < count; j++) { - if (memcmp(hdr->data.ping.gossip[j].nodename,n->name, - CLUSTER_NAMELEN) == 0) break; - } - return j != count; -} - -/* Set the i-th entry of the gossip section in the message pointed by 'hdr' - * to the info of the specified node 'n'. */ -void clusterSetGossipEntry(clusterMsg *hdr, int i, clusterNode *n) { - clusterMsgDataGossip *gossip; - gossip = &(hdr->data.ping.gossip[i]); - memcpy(gossip->nodename,n->name,CLUSTER_NAMELEN); - gossip->ping_sent = htonl(n->ping_sent/1000); - gossip->pong_received = htonl(n->pong_received/1000); - memcpy(gossip->ip,n->ip,sizeof(n->ip)); - gossip->port = htons(n->port); - gossip->cport = htons(n->cport); - gossip->flags = htons(n->flags); - gossip->notused1 = 0; -} - -/* Send a PING or PONG packet to the specified node, making sure to add enough - * gossip informations. */ -void clusterSendPing(clusterLink *link, int type) { - unsigned char *buf; - clusterMsg *hdr; - int gossipcount = 0; /* Number of gossip sections added so far. */ - int wanted; /* Number of gossip sections we want to append if possible. */ - int totlen; /* Total packet length. */ - /* freshnodes is the max number of nodes we can hope to append at all: - * nodes available minus two (ourself and the node we are sending the - * message to). However practically there may be less valid nodes since - * nodes in handshake state, disconnected, are not considered. */ - int freshnodes = dictSize(server.cluster->nodes)-2; - - /* How many gossip sections we want to add? 1/10 of the number of nodes - * and anyway at least 3. Why 1/10? - * - * If we have N masters, with N/10 entries, and we consider that in - * node_timeout we exchange with each other node at least 4 packets - * (we ping in the worst case in node_timeout/2 time, and we also - * receive two pings from the host), we have a total of 8 packets - * in the node_timeout*2 falure reports validity time. So we have - * that, for a single PFAIL node, we can expect to receive the following - * number of failure reports (in the specified window of time): - * - * PROB * GOSSIP_ENTRIES_PER_PACKET * TOTAL_PACKETS: - * - * PROB = probability of being featured in a single gossip entry, - * which is 1 / NUM_OF_NODES. - * ENTRIES = 10. - * TOTAL_PACKETS = 2 * 4 * NUM_OF_MASTERS. - * - * If we assume we have just masters (so num of nodes and num of masters - * is the same), with 1/10 we always get over the majority, and specifically - * 80% of the number of nodes, to account for many masters failing at the - * same time. - * - * Since we have non-voting slaves that lower the probability of an entry - * to feature our node, we set the number of entires per packet as - * 10% of the total nodes we have. */ - wanted = floor(dictSize(server.cluster->nodes)/10); - if (wanted < 3) wanted = 3; - if (wanted > freshnodes) wanted = freshnodes; - - /* Include all the nodes in PFAIL state, so that failure reports are - * faster to propagate to go from PFAIL to FAIL state. */ - int pfail_wanted = server.cluster->stats_pfail_nodes; - - /* Compute the maxium totlen to allocate our buffer. We'll fix the totlen - * later according to the number of gossip sections we really were able - * to put inside the packet. */ - totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData); - totlen += (sizeof(clusterMsgDataGossip)*(wanted+pfail_wanted)); - /* Note: clusterBuildMessageHdr() expects the buffer to be always at least - * sizeof(clusterMsg) or more. */ - if (totlen < (int)sizeof(clusterMsg)) totlen = sizeof(clusterMsg); - buf = zcalloc(totlen); - hdr = (clusterMsg*) buf; - - /* Populate the header. */ - if (link->node && type == CLUSTERMSG_TYPE_PING) - link->node->ping_sent = mstime(); - clusterBuildMessageHdr(hdr,type); - - /* Populate the gossip fields */ - int maxiterations = wanted*3; - while(freshnodes > 0 && gossipcount < wanted && maxiterations--) { - dictEntry *de = dictGetRandomKey(server.cluster->nodes); - clusterNode *this = dictGetVal(de); - - /* Don't include this node: the whole packet header is about us - * already, so we just gossip about other nodes. */ - if (this == myself) continue; - - /* PFAIL nodes will be added later. */ - if (this->flags & CLUSTER_NODE_PFAIL) continue; - - /* In the gossip section don't include: - * 1) Nodes in HANDSHAKE state. - * 3) Nodes with the NOADDR flag set. - * 4) Disconnected nodes if they don't have configured slots. - */ - if (this->flags & (CLUSTER_NODE_HANDSHAKE|CLUSTER_NODE_NOADDR) || - (this->link == NULL && this->numslots == 0)) - { - freshnodes--; /* Tecnically not correct, but saves CPU. */ - continue; - } - - /* Do not add a node we already have. */ - if (clusterNodeIsInGossipSection(hdr,gossipcount,this)) continue; - - /* Add it */ - clusterSetGossipEntry(hdr,gossipcount,this); - freshnodes--; - gossipcount++; - } - - /* If there are PFAIL nodes, add them at the end. */ - if (pfail_wanted) { - dictIterator *di; - dictEntry *de; - - di = dictGetSafeIterator(server.cluster->nodes); - while((de = dictNext(di)) != NULL && pfail_wanted > 0) { - clusterNode *node = dictGetVal(de); - if (node->flags & CLUSTER_NODE_HANDSHAKE) continue; - if (node->flags & CLUSTER_NODE_NOADDR) continue; - if (!(node->flags & CLUSTER_NODE_PFAIL)) continue; - clusterSetGossipEntry(hdr,gossipcount,node); - freshnodes--; - gossipcount++; - /* We take the count of the slots we allocated, since the - * PFAIL stats may not match perfectly with the current number - * of PFAIL nodes. */ - pfail_wanted--; - } - dictReleaseIterator(di); - } - - /* Ready to send... fix the totlen fiend and queue the message in the - * output buffer. */ - totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData); - totlen += (sizeof(clusterMsgDataGossip)*gossipcount); - hdr->count = htons(gossipcount); - hdr->totlen = htonl(totlen); - clusterSendMessage(link,buf,totlen); - zfree(buf); -} - -/* Send a PONG packet to every connected node that's not in handshake state - * and for which we have a valid link. - * - * In Redis Cluster pongs are not used just for failure detection, but also - * to carry important configuration information. So broadcasting a pong is - * useful when something changes in the configuration and we want to make - * the cluster aware ASAP (for instance after a slave promotion). - * - * The 'target' argument specifies the receiving instances using the - * defines below: - * - * CLUSTER_BROADCAST_ALL -> All known instances. - * CLUSTER_BROADCAST_LOCAL_SLAVES -> All slaves in my master-slaves ring. - */ -#define CLUSTER_BROADCAST_ALL 0 -#define CLUSTER_BROADCAST_LOCAL_SLAVES 1 -void clusterBroadcastPong(int target) { - dictIterator *di; - dictEntry *de; - - di = dictGetSafeIterator(server.cluster->nodes); - while((de = dictNext(di)) != NULL) { - clusterNode *node = dictGetVal(de); - - if (!node->link) continue; - if (node == myself || nodeInHandshake(node)) continue; - if (target == CLUSTER_BROADCAST_LOCAL_SLAVES) { - int local_slave = - nodeIsSlave(node) && node->slaveof && - (node->slaveof == myself || node->slaveof == myself->slaveof); - if (!local_slave) continue; - } - clusterSendPing(node->link,CLUSTERMSG_TYPE_PONG); - } - dictReleaseIterator(di); -} - -/* Send a PUBLISH message. - * - * If link is NULL, then the message is broadcasted to the whole cluster. */ -void clusterSendPublish(clusterLink *link, robj *channel, robj *message) { - unsigned char buf[sizeof(clusterMsg)], *payload; - clusterMsg *hdr = (clusterMsg*) buf; - uint32_t totlen; - uint32_t channel_len, message_len; - - channel = getDecodedObject(channel); - message = getDecodedObject(message); - channel_len = sdslen(channel->ptr); - message_len = sdslen(message->ptr); - - clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_PUBLISH); - totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData); - totlen += sizeof(clusterMsgDataPublish) - 8 + channel_len + message_len; - - hdr->data.publish.msg.channel_len = htonl(channel_len); - hdr->data.publish.msg.message_len = htonl(message_len); - hdr->totlen = htonl(totlen); - - /* Try to use the local buffer if possible */ - if (totlen < sizeof(buf)) { - payload = buf; - } else { - payload = zmalloc(totlen); - memcpy(payload,hdr,sizeof(*hdr)); - hdr = (clusterMsg*) payload; - } - memcpy(hdr->data.publish.msg.bulk_data,channel->ptr,sdslen(channel->ptr)); - memcpy(hdr->data.publish.msg.bulk_data+sdslen(channel->ptr), - message->ptr,sdslen(message->ptr)); - - if (link) - clusterSendMessage(link,payload,totlen); - else - clusterBroadcastMessage(payload,totlen); - - decrRefCount(channel); - decrRefCount(message); - if (payload != buf) zfree(payload); -} - -/* Send a FAIL message to all the nodes we are able to contact. - * The FAIL message is sent when we detect that a node is failing - * (CLUSTER_NODE_PFAIL) and we also receive a gossip confirmation of this: - * we switch the node state to CLUSTER_NODE_FAIL and ask all the other - * nodes to do the same ASAP. */ -void clusterSendFail(char *nodename) { - unsigned char buf[sizeof(clusterMsg)]; - clusterMsg *hdr = (clusterMsg*) buf; - - clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_FAIL); - memcpy(hdr->data.fail.about.nodename,nodename,CLUSTER_NAMELEN); - clusterBroadcastMessage(buf,ntohl(hdr->totlen)); -} - -/* Send an UPDATE message to the specified link carrying the specified 'node' - * slots configuration. The node name, slots bitmap, and configEpoch info - * are included. */ -void clusterSendUpdate(clusterLink *link, clusterNode *node) { - unsigned char buf[sizeof(clusterMsg)]; - clusterMsg *hdr = (clusterMsg*) buf; - - if (link == NULL) return; - clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_UPDATE); - memcpy(hdr->data.update.nodecfg.nodename,node->name,CLUSTER_NAMELEN); - hdr->data.update.nodecfg.configEpoch = htonu64(node->configEpoch); - memcpy(hdr->data.update.nodecfg.slots,node->slots,sizeof(node->slots)); - clusterSendMessage(link,buf,ntohl(hdr->totlen)); -} - -/* ----------------------------------------------------------------------------- - * CLUSTER Pub/Sub support - * - * For now we do very little, just propagating PUBLISH messages across the whole - * cluster. In the future we'll try to get smarter and avoiding propagating those - * messages to hosts without receives for a given channel. - * -------------------------------------------------------------------------- */ -void clusterPropagatePublish(robj *channel, robj *message) { - clusterSendPublish(NULL, channel, message); -} - -/* ----------------------------------------------------------------------------- - * SLAVE node specific functions - * -------------------------------------------------------------------------- */ - -/* This function sends a FAILOVE_AUTH_REQUEST message to every node in order to - * see if there is the quorum for this slave instance to failover its failing - * master. - * - * Note that we send the failover request to everybody, master and slave nodes, - * but only the masters are supposed to reply to our query. */ -void clusterRequestFailoverAuth(void) { - unsigned char buf[sizeof(clusterMsg)]; - clusterMsg *hdr = (clusterMsg*) buf; - uint32_t totlen; - - clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_FAILOVER_AUTH_REQUEST); - /* If this is a manual failover, set the CLUSTERMSG_FLAG0_FORCEACK bit - * in the header to communicate the nodes receiving the message that - * they should authorized the failover even if the master is working. */ - if (server.cluster->mf_end) hdr->mflags[0] |= CLUSTERMSG_FLAG0_FORCEACK; - totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData); - hdr->totlen = htonl(totlen); - clusterBroadcastMessage(buf,totlen); -} - -/* Send a FAILOVER_AUTH_ACK message to the specified node. */ -void clusterSendFailoverAuth(clusterNode *node) { - unsigned char buf[sizeof(clusterMsg)]; - clusterMsg *hdr = (clusterMsg*) buf; - uint32_t totlen; - - if (!node->link) return; - clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_FAILOVER_AUTH_ACK); - totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData); - hdr->totlen = htonl(totlen); - clusterSendMessage(node->link,buf,totlen); -} - -/* Send a MFSTART message to the specified node. */ -void clusterSendMFStart(clusterNode *node) { - unsigned char buf[sizeof(clusterMsg)]; - clusterMsg *hdr = (clusterMsg*) buf; - uint32_t totlen; - - if (!node->link) return; - clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_MFSTART); - totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData); - hdr->totlen = htonl(totlen); - clusterSendMessage(node->link,buf,totlen); -} - -/* Vote for the node asking for our vote if there are the conditions. */ -void clusterSendFailoverAuthIfNeeded(clusterNode *node, clusterMsg *request) { - clusterNode *master = node->slaveof; - uint64_t requestCurrentEpoch = ntohu64(request->currentEpoch); - uint64_t requestConfigEpoch = ntohu64(request->configEpoch); - unsigned char *claimed_slots = request->myslots; - int force_ack = request->mflags[0] & CLUSTERMSG_FLAG0_FORCEACK; - int j; - - /* IF we are not a master serving at least 1 slot, we don't have the - * right to vote, as the cluster size in Redis Cluster is the number - * of masters serving at least one slot, and quorum is the cluster - * size + 1 */ - if (nodeIsSlave(myself) || myself->numslots == 0) return; - - /* Request epoch must be >= our currentEpoch. - * Note that it is impossible for it to actually be greater since - * our currentEpoch was updated as a side effect of receiving this - * request, if the request epoch was greater. */ - if (requestCurrentEpoch < server.cluster->currentEpoch) { - serverLog(LL_WARNING, - "Failover auth denied to %.40s: reqEpoch (%llu) < curEpoch(%llu)", - node->name, - (unsigned long long) requestCurrentEpoch, - (unsigned long long) server.cluster->currentEpoch); - return; - } - - /* I already voted for this epoch? Return ASAP. */ - if (server.cluster->lastVoteEpoch == server.cluster->currentEpoch) { - serverLog(LL_WARNING, - "Failover auth denied to %.40s: already voted for epoch %llu", - node->name, - (unsigned long long) server.cluster->currentEpoch); - return; - } - - /* Node must be a slave and its master down. - * The master can be non failing if the request is flagged - * with CLUSTERMSG_FLAG0_FORCEACK (manual failover). */ - if (nodeIsMaster(node) || master == NULL || - (!nodeFailed(master) && !force_ack)) - { - if (nodeIsMaster(node)) { - serverLog(LL_WARNING, - "Failover auth denied to %.40s: it is a master node", - node->name); - } else if (master == NULL) { - serverLog(LL_WARNING, - "Failover auth denied to %.40s: I don't know its master", - node->name); - } else if (!nodeFailed(master)) { - serverLog(LL_WARNING, - "Failover auth denied to %.40s: its master is up", - node->name); - } - return; - } - - /* We did not voted for a slave about this master for two - * times the node timeout. This is not strictly needed for correctness - * of the algorithm but makes the base case more linear. */ - if (mstime() - node->slaveof->voted_time < server.cluster_node_timeout * 2) - { - serverLog(LL_WARNING, - "Failover auth denied to %.40s: " - "can't vote about this master before %lld milliseconds", - node->name, - (long long) ((server.cluster_node_timeout*2)- - (mstime() - node->slaveof->voted_time))); - return; - } - - /* The slave requesting the vote must have a configEpoch for the claimed - * slots that is >= the one of the masters currently serving the same - * slots in the current configuration. */ - for (j = 0; j < CLUSTER_SLOTS; j++) { - if (bitmapTestBit(claimed_slots, j) == 0) continue; - if (server.cluster->slots[j] == NULL || - server.cluster->slots[j]->configEpoch <= requestConfigEpoch) - { - continue; - } - /* If we reached this point we found a slot that in our current slots - * is served by a master with a greater configEpoch than the one claimed - * by the slave requesting our vote. Refuse to vote for this slave. */ - serverLog(LL_WARNING, - "Failover auth denied to %.40s: " - "slot %d epoch (%llu) > reqEpoch (%llu)", - node->name, j, - (unsigned long long) server.cluster->slots[j]->configEpoch, - (unsigned long long) requestConfigEpoch); - return; - } - - /* We can vote for this slave. */ - clusterSendFailoverAuth(node); - server.cluster->lastVoteEpoch = server.cluster->currentEpoch; - node->slaveof->voted_time = mstime(); - serverLog(LL_WARNING, "Failover auth granted to %.40s for epoch %llu", - node->name, (unsigned long long) server.cluster->currentEpoch); -} - -/* This function returns the "rank" of this instance, a slave, in the context - * of its master-slaves ring. The rank of the slave is given by the number of - * other slaves for the same master that have a better replication offset - * compared to the local one (better means, greater, so they claim more data). - * - * A slave with rank 0 is the one with the greatest (most up to date) - * replication offset, and so forth. Note that because how the rank is computed - * multiple slaves may have the same rank, in case they have the same offset. - * - * The slave rank is used to add a delay to start an election in order to - * get voted and replace a failing master. Slaves with better replication - * offsets are more likely to win. */ -int clusterGetSlaveRank(void) { - long long myoffset; - int j, rank = 0; - clusterNode *master; - - serverAssert(nodeIsSlave(myself)); - master = myself->slaveof; - if (master == NULL) return 0; /* Never called by slaves without master. */ - - myoffset = replicationGetSlaveOffset(); - for (j = 0; j < master->numslaves; j++) - if (master->slaves[j] != myself && - master->slaves[j]->repl_offset > myoffset) rank++; - return rank; -} - -/* This function is called by clusterHandleSlaveFailover() in order to - * let the slave log why it is not able to failover. Sometimes there are - * not the conditions, but since the failover function is called again and - * again, we can't log the same things continuously. - * - * This function works by logging only if a given set of conditions are - * true: - * - * 1) The reason for which the failover can't be initiated changed. - * The reasons also include a NONE reason we reset the state to - * when the slave finds that its master is fine (no FAIL flag). - * 2) Also, the log is emitted again if the master is still down and - * the reason for not failing over is still the same, but more than - * CLUSTER_CANT_FAILOVER_RELOG_PERIOD seconds elapsed. - * 3) Finally, the function only logs if the slave is down for more than - * five seconds + NODE_TIMEOUT. This way nothing is logged when a - * failover starts in a reasonable time. - * - * The function is called with the reason why the slave can't failover - * which is one of the integer macros CLUSTER_CANT_FAILOVER_*. - * - * The function is guaranteed to be called only if 'myself' is a slave. */ -void clusterLogCantFailover(int reason) { - char *msg; - static time_t lastlog_time = 0; - mstime_t nolog_fail_time = server.cluster_node_timeout + 5000; - - /* Don't log if we have the same reason for some time. */ - if (reason == server.cluster->cant_failover_reason && - time(NULL)-lastlog_time < CLUSTER_CANT_FAILOVER_RELOG_PERIOD) - return; - - server.cluster->cant_failover_reason = reason; - - /* We also don't emit any log if the master failed no long ago, the - * goal of this function is to log slaves in a stalled condition for - * a long time. */ - if (myself->slaveof && - nodeFailed(myself->slaveof) && - (mstime() - myself->slaveof->fail_time) < nolog_fail_time) return; - - switch(reason) { - case CLUSTER_CANT_FAILOVER_DATA_AGE: - msg = "Disconnected from master for longer than allowed. " - "Please check the 'cluster-slave-validity-factor' configuration " - "option."; - break; - case CLUSTER_CANT_FAILOVER_WAITING_DELAY: - msg = "Waiting the delay before I can start a new failover."; - break; - case CLUSTER_CANT_FAILOVER_EXPIRED: - msg = "Failover attempt expired."; - break; - case CLUSTER_CANT_FAILOVER_WAITING_VOTES: - msg = "Waiting for votes, but majority still not reached."; - break; - default: - msg = "Unknown reason code."; - break; - } - lastlog_time = time(NULL); - serverLog(LL_WARNING,"Currently unable to failover: %s", msg); -} - -/* This function implements the final part of automatic and manual failovers, - * where the slave grabs its master's hash slots, and propagates the new - * configuration. - * - * Note that it's up to the caller to be sure that the node got a new - * configuration epoch already. */ -void clusterFailoverReplaceYourMaster(void) { - int j; - clusterNode *oldmaster = myself->slaveof; - - if (nodeIsMaster(myself) || oldmaster == NULL) return; - - /* 1) Turn this node into a master. */ - clusterSetNodeAsMaster(myself); - replicationUnsetMaster(); - - /* 2) Claim all the slots assigned to our master. */ - for (j = 0; j < CLUSTER_SLOTS; j++) { - if (clusterNodeGetSlotBit(oldmaster,j)) { - clusterDelSlot(j); - clusterAddSlot(myself,j); - } - } - - /* 3) Update state and save config. */ - clusterUpdateState(); - clusterSaveConfigOrDie(1); - - /* 4) Pong all the other nodes so that they can update the state - * accordingly and detect that we switched to master role. */ - clusterBroadcastPong(CLUSTER_BROADCAST_ALL); - - /* 5) If there was a manual failover in progress, clear the state. */ - resetManualFailover(); -} - -/* This function is called if we are a slave node and our master serving - * a non-zero amount of hash slots is in FAIL state. - * - * The gaol of this function is: - * 1) To check if we are able to perform a failover, is our data updated? - * 2) Try to get elected by masters. - * 3) Perform the failover informing all the other nodes. - */ -void clusterHandleSlaveFailover(void) { - mstime_t data_age; - mstime_t auth_age = mstime() - server.cluster->failover_auth_time; - int needed_quorum = (server.cluster->size / 2) + 1; - int manual_failover = server.cluster->mf_end != 0 && - server.cluster->mf_can_start; - mstime_t auth_timeout, auth_retry_time; - - server.cluster->todo_before_sleep &= ~CLUSTER_TODO_HANDLE_FAILOVER; - - /* Compute the failover timeout (the max time we have to send votes - * and wait for replies), and the failover retry time (the time to wait - * before trying to get voted again). - * - * Timeout is MAX(NODE_TIMEOUT*2,2000) milliseconds. - * Retry is two times the Timeout. - */ - auth_timeout = server.cluster_node_timeout*2; - if (auth_timeout < 2000) auth_timeout = 2000; - auth_retry_time = auth_timeout*2; - - /* Pre conditions to run the function, that must be met both in case - * of an automatic or manual failover: - * 1) We are a slave. - * 2) Our master is flagged as FAIL, or this is a manual failover. - * 3) It is serving slots. */ - if (nodeIsMaster(myself) || - myself->slaveof == NULL || - (!nodeFailed(myself->slaveof) && !manual_failover) || - myself->slaveof->numslots == 0) - { - /* There are no reasons to failover, so we set the reason why we - * are returning without failing over to NONE. */ - server.cluster->cant_failover_reason = CLUSTER_CANT_FAILOVER_NONE; - return; - } - - /* Set data_age to the number of seconds we are disconnected from - * the master. */ - if (server.repl_state == REPL_STATE_CONNECTED) { - data_age = (mstime_t)(server.unixtime - server.master->lastinteraction) - * 1000; - } else { - data_age = (mstime_t)(server.unixtime - server.repl_down_since) * 1000; - } - - /* Remove the node timeout from the data age as it is fine that we are - * disconnected from our master at least for the time it was down to be - * flagged as FAIL, that's the baseline. */ - if (data_age > server.cluster_node_timeout) - data_age -= server.cluster_node_timeout; - - /* Check if our data is recent enough according to the slave validity - * factor configured by the user. - * - * Check bypassed for manual failovers. */ - if (server.cluster_slave_validity_factor && - data_age > - (((mstime_t)server.repl_ping_slave_period * 1000) + - (server.cluster_node_timeout * server.cluster_slave_validity_factor))) - { - if (!manual_failover) { - clusterLogCantFailover(CLUSTER_CANT_FAILOVER_DATA_AGE); - return; - } - } - - /* If the previous failover attempt timedout and the retry time has - * elapsed, we can setup a new one. */ - if (auth_age > auth_retry_time) { - server.cluster->failover_auth_time = mstime() + - 500 + /* Fixed delay of 500 milliseconds, let FAIL msg propagate. */ - random() % 500; /* Random delay between 0 and 500 milliseconds. */ - server.cluster->failover_auth_count = 0; - server.cluster->failover_auth_sent = 0; - server.cluster->failover_auth_rank = clusterGetSlaveRank(); - /* We add another delay that is proportional to the slave rank. - * Specifically 1 second * rank. This way slaves that have a probably - * less updated replication offset, are penalized. */ - server.cluster->failover_auth_time += - server.cluster->failover_auth_rank * 1000; - /* However if this is a manual failover, no delay is needed. */ - if (server.cluster->mf_end) { - server.cluster->failover_auth_time = mstime(); - server.cluster->failover_auth_rank = 0; - } - serverLog(LL_WARNING, - "Start of election delayed for %lld milliseconds " - "(rank #%d, offset %lld).", - server.cluster->failover_auth_time - mstime(), - server.cluster->failover_auth_rank, - replicationGetSlaveOffset()); - /* Now that we have a scheduled election, broadcast our offset - * to all the other slaves so that they'll updated their offsets - * if our offset is better. */ - clusterBroadcastPong(CLUSTER_BROADCAST_LOCAL_SLAVES); - return; - } - - /* It is possible that we received more updated offsets from other - * slaves for the same master since we computed our election delay. - * Update the delay if our rank changed. - * - * Not performed if this is a manual failover. */ - if (server.cluster->failover_auth_sent == 0 && - server.cluster->mf_end == 0) - { - int newrank = clusterGetSlaveRank(); - if (newrank > server.cluster->failover_auth_rank) { - long long added_delay = - (newrank - server.cluster->failover_auth_rank) * 1000; - server.cluster->failover_auth_time += added_delay; - server.cluster->failover_auth_rank = newrank; - serverLog(LL_WARNING, - "Slave rank updated to #%d, added %lld milliseconds of delay.", - newrank, added_delay); - } - } - - /* Return ASAP if we can't still start the election. */ - if (mstime() < server.cluster->failover_auth_time) { - clusterLogCantFailover(CLUSTER_CANT_FAILOVER_WAITING_DELAY); - return; - } - - /* Return ASAP if the election is too old to be valid. */ - if (auth_age > auth_timeout) { - clusterLogCantFailover(CLUSTER_CANT_FAILOVER_EXPIRED); - return; - } - - /* Ask for votes if needed. */ - if (server.cluster->failover_auth_sent == 0) { - server.cluster->currentEpoch++; - server.cluster->failover_auth_epoch = server.cluster->currentEpoch; - serverLog(LL_WARNING,"Starting a failover election for epoch %llu.", - (unsigned long long) server.cluster->currentEpoch); - clusterRequestFailoverAuth(); - server.cluster->failover_auth_sent = 1; - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| - CLUSTER_TODO_UPDATE_STATE| - CLUSTER_TODO_FSYNC_CONFIG); - return; /* Wait for replies. */ - } - - /* Check if we reached the quorum. */ - if (server.cluster->failover_auth_count >= needed_quorum) { - /* We have the quorum, we can finally failover the master. */ - - serverLog(LL_WARNING, - "Failover election won: I'm the new master."); - - /* Update my configEpoch to the epoch of the election. */ - if (myself->configEpoch < server.cluster->failover_auth_epoch) { - myself->configEpoch = server.cluster->failover_auth_epoch; - serverLog(LL_WARNING, - "configEpoch set to %llu after successful failover", - (unsigned long long) myself->configEpoch); - } - - /* Take responsability for the cluster slots. */ - clusterFailoverReplaceYourMaster(); - } else { - clusterLogCantFailover(CLUSTER_CANT_FAILOVER_WAITING_VOTES); - } -} - -/* ----------------------------------------------------------------------------- - * CLUSTER slave migration - * - * Slave migration is the process that allows a slave of a master that is - * already covered by at least another slave, to "migrate" to a master that - * is orpaned, that is, left with no working slaves. - * ------------------------------------------------------------------------- */ - -/* This function is responsible to decide if this replica should be migrated - * to a different (orphaned) master. It is called by the clusterCron() function - * only if: - * - * 1) We are a slave node. - * 2) It was detected that there is at least one orphaned master in - * the cluster. - * 3) We are a slave of one of the masters with the greatest number of - * slaves. - * - * This checks are performed by the caller since it requires to iterate - * the nodes anyway, so we spend time into clusterHandleSlaveMigration() - * if definitely needed. - * - * The fuction is called with a pre-computed max_slaves, that is the max - * number of working (not in FAIL state) slaves for a single master. - * - * Additional conditions for migration are examined inside the function. - */ -void clusterHandleSlaveMigration(int max_slaves) { - int j, okslaves = 0; - clusterNode *mymaster = myself->slaveof, *target = NULL, *candidate = NULL; - dictIterator *di; - dictEntry *de; - - /* Step 1: Don't migrate if the cluster state is not ok. */ - if (server.cluster->state != CLUSTER_OK) return; - - /* Step 2: Don't migrate if my master will not be left with at least - * 'migration-barrier' slaves after my migration. */ - if (mymaster == NULL) return; - for (j = 0; j < mymaster->numslaves; j++) - if (!nodeFailed(mymaster->slaves[j]) && - !nodeTimedOut(mymaster->slaves[j])) okslaves++; - if (okslaves <= server.cluster_migration_barrier) return; - - /* Step 3: Idenitfy a candidate for migration, and check if among the - * masters with the greatest number of ok slaves, I'm the one with the - * smallest node ID (the "candidate slave"). - * - * Note: this means that eventually a replica migration will occurr - * since slaves that are reachable again always have their FAIL flag - * cleared, so eventually there must be a candidate. At the same time - * this does not mean that there are no race conditions possible (two - * slaves migrating at the same time), but this is unlikely to - * happen, and harmless when happens. */ - candidate = myself; - di = dictGetSafeIterator(server.cluster->nodes); - while((de = dictNext(di)) != NULL) { - clusterNode *node = dictGetVal(de); - int okslaves = 0, is_orphaned = 1; - - /* We want to migrate only if this master is working, orphaned, and - * used to have slaves or if failed over a master that had slaves - * (MIGRATE_TO flag). This way we only migrate to instances that were - * supposed to have replicas. */ - if (nodeIsSlave(node) || nodeFailed(node)) is_orphaned = 0; - if (!(node->flags & CLUSTER_NODE_MIGRATE_TO)) is_orphaned = 0; - - /* Check number of working slaves. */ - if (nodeIsMaster(node)) okslaves = clusterCountNonFailingSlaves(node); - if (okslaves > 0) is_orphaned = 0; - - if (is_orphaned) { - if (!target && node->numslots > 0) target = node; - - /* Track the starting time of the orphaned condition for this - * master. */ - if (!node->orphaned_time) node->orphaned_time = mstime(); - } else { - node->orphaned_time = 0; - } - - /* Check if I'm the slave candidate for the migration: attached - * to a master with the maximum number of slaves and with the smallest - * node ID. */ - if (okslaves == max_slaves) { - for (j = 0; j < node->numslaves; j++) { - if (memcmp(node->slaves[j]->name, - candidate->name, - CLUSTER_NAMELEN) < 0) - { - candidate = node->slaves[j]; - } - } - } - } - dictReleaseIterator(di); - - /* Step 4: perform the migration if there is a target, and if I'm the - * candidate, but only if the master is continuously orphaned for a - * couple of seconds, so that during failovers, we give some time to - * the natural slaves of this instance to advertise their switch from - * the old master to the new one. */ - if (target && candidate == myself && - (mstime()-target->orphaned_time) > CLUSTER_SLAVE_MIGRATION_DELAY) - { - serverLog(LL_WARNING,"Migrating to orphaned master %.40s", - target->name); - clusterSetMaster(target); - } -} - -/* ----------------------------------------------------------------------------- - * CLUSTER manual failover - * - * This are the important steps performed by slaves during a manual failover: - * 1) User send CLUSTER FAILOVER command. The failover state is initialized - * setting mf_end to the millisecond unix time at which we'll abort the - * attempt. - * 2) Slave sends a MFSTART message to the master requesting to pause clients - * for two times the manual failover timeout CLUSTER_MF_TIMEOUT. - * When master is paused for manual failover, it also starts to flag - * packets with CLUSTERMSG_FLAG0_PAUSED. - * 3) Slave waits for master to send its replication offset flagged as PAUSED. - * 4) If slave received the offset from the master, and its offset matches, - * mf_can_start is set to 1, and clusterHandleSlaveFailover() will perform - * the failover as usually, with the difference that the vote request - * will be modified to force masters to vote for a slave that has a - * working master. - * - * From the point of view of the master things are simpler: when a - * PAUSE_CLIENTS packet is received the master sets mf_end as well and - * the sender in mf_slave. During the time limit for the manual failover - * the master will just send PINGs more often to this slave, flagged with - * the PAUSED flag, so that the slave will set mf_master_offset when receiving - * a packet from the master with this flag set. - * - * The gaol of the manual failover is to perform a fast failover without - * data loss due to the asynchronous master-slave replication. - * -------------------------------------------------------------------------- */ - -/* Reset the manual failover state. This works for both masters and slavesa - * as all the state about manual failover is cleared. - * - * The function can be used both to initialize the manual failover state at - * startup or to abort a manual failover in progress. */ -void resetManualFailover(void) { - if (server.cluster->mf_end && clientsArePaused()) { - server.clients_pause_end_time = 0; - clientsArePaused(); /* Just use the side effect of the function. */ - } - server.cluster->mf_end = 0; /* No manual failover in progress. */ - server.cluster->mf_can_start = 0; - server.cluster->mf_slave = NULL; - server.cluster->mf_master_offset = 0; -} - -/* If a manual failover timed out, abort it. */ -void manualFailoverCheckTimeout(void) { - if (server.cluster->mf_end && server.cluster->mf_end < mstime()) { - serverLog(LL_WARNING,"Manual failover timed out."); - resetManualFailover(); - } -} - -/* This function is called from the cluster cron function in order to go - * forward with a manual failover state machine. */ -void clusterHandleManualFailover(void) { - /* Return ASAP if no manual failover is in progress. */ - if (server.cluster->mf_end == 0) return; - - /* If mf_can_start is non-zero, the failover was already triggered so the - * next steps are performed by clusterHandleSlaveFailover(). */ - if (server.cluster->mf_can_start) return; - - if (server.cluster->mf_master_offset == 0) return; /* Wait for offset... */ - - if (server.cluster->mf_master_offset == replicationGetSlaveOffset()) { - /* Our replication offset matches the master replication offset - * announced after clients were paused. We can start the failover. */ - server.cluster->mf_can_start = 1; - serverLog(LL_WARNING, - "All master replication stream processed, " - "manual failover can start."); - } -} - -/* ----------------------------------------------------------------------------- - * CLUSTER cron job - * -------------------------------------------------------------------------- */ - -/* This is executed 10 times every second */ -void clusterCron(void) { - dictIterator *di; - dictEntry *de; - int update_state = 0; - int orphaned_masters; /* How many masters there are without ok slaves. */ - int max_slaves; /* Max number of ok slaves for a single master. */ - int this_slaves; /* Number of ok slaves for our master (if we are slave). */ - mstime_t min_pong = 0, now = mstime(); - clusterNode *min_pong_node = NULL; - static unsigned long long iteration = 0; - mstime_t handshake_timeout; - - iteration++; /* Number of times this function was called so far. */ - - /* We want to take myself->ip in sync with the cluster-announce-ip option. - * The option can be set at runtime via CONFIG SET, so we periodically check - * if the option changed to reflect this into myself->ip. */ - { - static char *prev_ip = NULL; - char *curr_ip = server.cluster_announce_ip; - int changed = 0; - - if (prev_ip == NULL && curr_ip != NULL) changed = 1; - if (prev_ip != NULL && curr_ip == NULL) changed = 1; - if (prev_ip && curr_ip && strcmp(prev_ip,curr_ip)) changed = 1; - - if (changed) { - prev_ip = curr_ip; - if (prev_ip) prev_ip = zstrdup(prev_ip); - - if (curr_ip) { - strncpy(myself->ip,server.cluster_announce_ip,NET_IP_STR_LEN); - myself->ip[NET_IP_STR_LEN-1] = '\0'; - } else { - myself->ip[0] = '\0'; /* Force autodetection. */ - } - } - } - - /* The handshake timeout is the time after which a handshake node that was - * not turned into a normal node is removed from the nodes. Usually it is - * just the NODE_TIMEOUT value, but when NODE_TIMEOUT is too small we use - * the value of 1 second. */ - handshake_timeout = server.cluster_node_timeout; - if (handshake_timeout < 1000) handshake_timeout = 1000; - - /* Check if we have disconnected nodes and re-establish the connection. - * Also update a few stats while we are here, that can be used to make - * better decisions in other part of the code. */ - di = dictGetSafeIterator(server.cluster->nodes); - server.cluster->stats_pfail_nodes = 0; - while((de = dictNext(di)) != NULL) { - clusterNode *node = dictGetVal(de); - - /* Not interested in reconnecting the link with myself or nodes - * for which we have no address. */ - if (node->flags & (CLUSTER_NODE_MYSELF|CLUSTER_NODE_NOADDR)) continue; - - if (node->flags & CLUSTER_NODE_PFAIL) - server.cluster->stats_pfail_nodes++; - - /* A Node in HANDSHAKE state has a limited lifespan equal to the - * configured node timeout. */ - if (nodeInHandshake(node) && now - node->ctime > handshake_timeout) { - clusterDelNode(node); - continue; - } - - if (node->link == NULL) { - int fd; - mstime_t old_ping_sent; - clusterLink *link; - - fd = anetTcpNonBlockBindConnect(server.neterr, node->ip, - node->cport, NET_FIRST_BIND_ADDR); - if (fd == -1) { - /* We got a synchronous error from connect before - * clusterSendPing() had a chance to be called. - * If node->ping_sent is zero, failure detection can't work, - * so we claim we actually sent a ping now (that will - * be really sent as soon as the link is obtained). */ - if (node->ping_sent == 0) node->ping_sent = mstime(); - serverLog(LL_DEBUG, "Unable to connect to " - "Cluster Node [%s]:%d -> %s", node->ip, - node->cport, server.neterr); - continue; - } - link = createClusterLink(node); - link->fd = fd; - node->link = link; - aeCreateFileEvent(server.el,link->fd,AE_READABLE, - clusterReadHandler,link); - /* Queue a PING in the new connection ASAP: this is crucial - * to avoid false positives in failure detection. - * - * If the node is flagged as MEET, we send a MEET message instead - * of a PING one, to force the receiver to add us in its node - * table. */ - old_ping_sent = node->ping_sent; - clusterSendPing(link, node->flags & CLUSTER_NODE_MEET ? - CLUSTERMSG_TYPE_MEET : CLUSTERMSG_TYPE_PING); - if (old_ping_sent) { - /* If there was an active ping before the link was - * disconnected, we want to restore the ping time, otherwise - * replaced by the clusterSendPing() call. */ - node->ping_sent = old_ping_sent; - } - /* We can clear the flag after the first packet is sent. - * If we'll never receive a PONG, we'll never send new packets - * to this node. Instead after the PONG is received and we - * are no longer in meet/handshake status, we want to send - * normal PING packets. */ - node->flags &= ~CLUSTER_NODE_MEET; - - serverLog(LL_DEBUG,"Connecting with Node %.40s at %s:%d", - node->name, node->ip, node->cport); - } - } - dictReleaseIterator(di); - - /* Ping some random node 1 time every 10 iterations, so that we usually ping - * one random node every second. */ - if (!(iteration % 10)) { - int j; - - /* Check a few random nodes and ping the one with the oldest - * pong_received time. */ - for (j = 0; j < 5; j++) { - de = dictGetRandomKey(server.cluster->nodes); - clusterNode *this = dictGetVal(de); - - /* Don't ping nodes disconnected or with a ping currently active. */ - if (this->link == NULL || this->ping_sent != 0) continue; - if (this->flags & (CLUSTER_NODE_MYSELF|CLUSTER_NODE_HANDSHAKE)) - continue; - if (min_pong_node == NULL || min_pong > this->pong_received) { - min_pong_node = this; - min_pong = this->pong_received; - } - } - if (min_pong_node) { - serverLog(LL_DEBUG,"Pinging node %.40s", min_pong_node->name); - clusterSendPing(min_pong_node->link, CLUSTERMSG_TYPE_PING); - } - } - - /* Iterate nodes to check if we need to flag something as failing. - * This loop is also responsible to: - * 1) Check if there are orphaned masters (masters without non failing - * slaves). - * 2) Count the max number of non failing slaves for a single master. - * 3) Count the number of slaves for our master, if we are a slave. */ - orphaned_masters = 0; - max_slaves = 0; - this_slaves = 0; - di = dictGetSafeIterator(server.cluster->nodes); - while((de = dictNext(di)) != NULL) { - clusterNode *node = dictGetVal(de); - now = mstime(); /* Use an updated time at every iteration. */ - mstime_t delay; - - if (node->flags & - (CLUSTER_NODE_MYSELF|CLUSTER_NODE_NOADDR|CLUSTER_NODE_HANDSHAKE)) - continue; - - /* Orphaned master check, useful only if the current instance - * is a slave that may migrate to another master. */ - if (nodeIsSlave(myself) && nodeIsMaster(node) && !nodeFailed(node)) { - int okslaves = clusterCountNonFailingSlaves(node); - - /* A master is orphaned if it is serving a non-zero number of - * slots, have no working slaves, but used to have at least one - * slave, or failed over a master that used to have slaves. */ - if (okslaves == 0 && node->numslots > 0 && - node->flags & CLUSTER_NODE_MIGRATE_TO) - { - orphaned_masters++; - } - if (okslaves > max_slaves) max_slaves = okslaves; - if (nodeIsSlave(myself) && myself->slaveof == node) - this_slaves = okslaves; - } - - /* If we are waiting for the PONG more than half the cluster - * timeout, reconnect the link: maybe there is a connection - * issue even if the node is alive. */ - if (node->link && /* is connected */ - now - node->link->ctime > - server.cluster_node_timeout && /* was not already reconnected */ - node->ping_sent && /* we already sent a ping */ - node->pong_received < node->ping_sent && /* still waiting pong */ - /* and we are waiting for the pong more than timeout/2 */ - now - node->ping_sent > server.cluster_node_timeout/2) - { - /* Disconnect the link, it will be reconnected automatically. */ - freeClusterLink(node->link); - } - - /* If we have currently no active ping in this instance, and the - * received PONG is older than half the cluster timeout, send - * a new ping now, to ensure all the nodes are pinged without - * a too big delay. */ - if (node->link && - node->ping_sent == 0 && - (now - node->pong_received) > server.cluster_node_timeout/2) - { - clusterSendPing(node->link, CLUSTERMSG_TYPE_PING); - continue; - } - - /* If we are a master and one of the slaves requested a manual - * failover, ping it continuously. */ - if (server.cluster->mf_end && - nodeIsMaster(myself) && - server.cluster->mf_slave == node && - node->link) - { - clusterSendPing(node->link, CLUSTERMSG_TYPE_PING); - continue; - } - - /* Check only if we have an active ping for this instance. */ - if (node->ping_sent == 0) continue; - - /* Compute the delay of the PONG. Note that if we already received - * the PONG, then node->ping_sent is zero, so can't reach this - * code at all. */ - delay = now - node->ping_sent; - - if (delay > server.cluster_node_timeout) { - /* Timeout reached. Set the node as possibly failing if it is - * not already in this state. */ - if (!(node->flags & (CLUSTER_NODE_PFAIL|CLUSTER_NODE_FAIL))) { - serverLog(LL_DEBUG,"*** NODE %.40s possibly failing", - node->name); - node->flags |= CLUSTER_NODE_PFAIL; - update_state = 1; - } - } - } - dictReleaseIterator(di); - - /* If we are a slave node but the replication is still turned off, - * enable it if we know the address of our master and it appears to - * be up. */ - if (nodeIsSlave(myself) && - server.masterhost == NULL && - myself->slaveof && - nodeHasAddr(myself->slaveof)) - { - replicationSetMaster(myself->slaveof->ip, myself->slaveof->port); - } - - /* Abourt a manual failover if the timeout is reached. */ - manualFailoverCheckTimeout(); - - if (nodeIsSlave(myself)) { - clusterHandleManualFailover(); - clusterHandleSlaveFailover(); - /* If there are orphaned slaves, and we are a slave among the masters - * with the max number of non-failing slaves, consider migrating to - * the orphaned masters. Note that it does not make sense to try - * a migration if there is no master with at least *two* working - * slaves. */ - if (orphaned_masters && max_slaves >= 2 && this_slaves == max_slaves) - clusterHandleSlaveMigration(max_slaves); - } - - if (update_state || server.cluster->state == CLUSTER_FAIL) - clusterUpdateState(); -} - -/* This function is called before the event handler returns to sleep for - * events. It is useful to perform operations that must be done ASAP in - * reaction to events fired but that are not safe to perform inside event - * handlers, or to perform potentially expansive tasks that we need to do - * a single time before replying to clients. */ -void clusterBeforeSleep(void) { - /* Handle failover, this is needed when it is likely that there is already - * the quorum from masters in order to react fast. */ - if (server.cluster->todo_before_sleep & CLUSTER_TODO_HANDLE_FAILOVER) - clusterHandleSlaveFailover(); - - /* Update the cluster state. */ - if (server.cluster->todo_before_sleep & CLUSTER_TODO_UPDATE_STATE) - clusterUpdateState(); - - /* Save the config, possibly using fsync. */ - if (server.cluster->todo_before_sleep & CLUSTER_TODO_SAVE_CONFIG) { - int fsync = server.cluster->todo_before_sleep & - CLUSTER_TODO_FSYNC_CONFIG; - clusterSaveConfigOrDie(fsync); - } - - /* Reset our flags (not strictly needed since every single function - * called for flags set should be able to clear its flag). */ - server.cluster->todo_before_sleep = 0; -} - -void clusterDoBeforeSleep(int flags) { - server.cluster->todo_before_sleep |= flags; -} - -/* ----------------------------------------------------------------------------- - * Slots management - * -------------------------------------------------------------------------- */ - -/* Test bit 'pos' in a generic bitmap. Return 1 if the bit is set, - * otherwise 0. */ -int bitmapTestBit(unsigned char *bitmap, int pos) { - off_t byte = pos/8; - int bit = pos&7; - return (bitmap[byte] & (1<nodes); - dictEntry *de; - int slaves = 0; - while((de = dictNext(di)) != NULL) { - clusterNode *node = dictGetVal(de); - - if (nodeIsSlave(node)) continue; - slaves += node->numslaves; - } - dictReleaseIterator(di); - return slaves != 0; -} - -/* Set the slot bit and return the old value. */ -int clusterNodeSetSlotBit(clusterNode *n, int slot) { - int old = bitmapTestBit(n->slots,slot); - bitmapSetBit(n->slots,slot); - if (!old) { - n->numslots++; - /* When a master gets its first slot, even if it has no slaves, - * it gets flagged with MIGRATE_TO, that is, the master is a valid - * target for replicas migration, if and only if at least one of - * the other masters has slaves right now. - * - * Normally masters are valid targerts of replica migration if: - * 1. The used to have slaves (but no longer have). - * 2. They are slaves failing over a master that used to have slaves. - * - * However new masters with slots assigned are considered valid - * migration tagets if the rest of the cluster is not a slave-less. - * - * See https://github.com/antirez/redis/issues/3043 for more info. */ - if (n->numslots == 1 && clusterMastersHaveSlaves()) - n->flags |= CLUSTER_NODE_MIGRATE_TO; - } - return old; -} - -/* Clear the slot bit and return the old value. */ -int clusterNodeClearSlotBit(clusterNode *n, int slot) { - int old = bitmapTestBit(n->slots,slot); - bitmapClearBit(n->slots,slot); - if (old) n->numslots--; - return old; -} - -/* Return the slot bit from the cluster node structure. */ -int clusterNodeGetSlotBit(clusterNode *n, int slot) { - return bitmapTestBit(n->slots,slot); -} - -/* Add the specified slot to the list of slots that node 'n' will - * serve. Return C_OK if the operation ended with success. - * If the slot is already assigned to another instance this is considered - * an error and C_ERR is returned. */ -int clusterAddSlot(clusterNode *n, int slot) { - if (server.cluster->slots[slot]) return C_ERR; - clusterNodeSetSlotBit(n,slot); - server.cluster->slots[slot] = n; - return C_OK; -} - -/* Delete the specified slot marking it as unassigned. - * Returns C_OK if the slot was assigned, otherwise if the slot was - * already unassigned C_ERR is returned. */ -int clusterDelSlot(int slot) { - clusterNode *n = server.cluster->slots[slot]; - - if (!n) return C_ERR; - serverAssert(clusterNodeClearSlotBit(n,slot) == 1); - server.cluster->slots[slot] = NULL; - return C_OK; -} - -/* Delete all the slots associated with the specified node. - * The number of deleted slots is returned. */ -int clusterDelNodeSlots(clusterNode *node) { - int deleted = 0, j; - - for (j = 0; j < CLUSTER_SLOTS; j++) { - if (clusterNodeGetSlotBit(node,j)) clusterDelSlot(j); - deleted++; - } - return deleted; -} - -/* Clear the migrating / importing state for all the slots. - * This is useful at initialization and when turning a master into slave. */ -void clusterCloseAllSlots(void) { - memset(server.cluster->migrating_slots_to,0, - sizeof(server.cluster->migrating_slots_to)); - memset(server.cluster->importing_slots_from,0, - sizeof(server.cluster->importing_slots_from)); -} - -/* ----------------------------------------------------------------------------- - * Cluster state evaluation function - * -------------------------------------------------------------------------- */ - -/* The following are defines that are only used in the evaluation function - * and are based on heuristics. Actaully the main point about the rejoin and - * writable delay is that they should be a few orders of magnitude larger - * than the network latency. */ -#define CLUSTER_MAX_REJOIN_DELAY 5000 -#define CLUSTER_MIN_REJOIN_DELAY 500 -#define CLUSTER_WRITABLE_DELAY 2000 - -void clusterUpdateState(void) { - int j, new_state; - int reachable_masters = 0; - static mstime_t among_minority_time; - static mstime_t first_call_time = 0; - - server.cluster->todo_before_sleep &= ~CLUSTER_TODO_UPDATE_STATE; - - /* If this is a master node, wait some time before turning the state - * into OK, since it is not a good idea to rejoin the cluster as a writable - * master, after a reboot, without giving the cluster a chance to - * reconfigure this node. Note that the delay is calculated starting from - * the first call to this function and not since the server start, in order - * to don't count the DB loading time. */ - if (first_call_time == 0) first_call_time = mstime(); - if (nodeIsMaster(myself) && - server.cluster->state == CLUSTER_FAIL && - mstime() - first_call_time < CLUSTER_WRITABLE_DELAY) return; - - /* Start assuming the state is OK. We'll turn it into FAIL if there - * are the right conditions. */ - new_state = CLUSTER_OK; - - /* Check if all the slots are covered. */ - if (server.cluster_require_full_coverage) { - for (j = 0; j < CLUSTER_SLOTS; j++) { - if (server.cluster->slots[j] == NULL || - server.cluster->slots[j]->flags & (CLUSTER_NODE_FAIL)) - { - new_state = CLUSTER_FAIL; - break; - } - } - } - - /* Compute the cluster size, that is the number of master nodes - * serving at least a single slot. - * - * At the same time count the number of reachable masters having - * at least one slot. */ - { - dictIterator *di; - dictEntry *de; - - server.cluster->size = 0; - di = dictGetSafeIterator(server.cluster->nodes); - while((de = dictNext(di)) != NULL) { - clusterNode *node = dictGetVal(de); - - if (nodeIsMaster(node) && node->numslots) { - server.cluster->size++; - if ((node->flags & (CLUSTER_NODE_FAIL|CLUSTER_NODE_PFAIL)) == 0) - reachable_masters++; - } - } - dictReleaseIterator(di); - } - - /* If we are in a minority partition, change the cluster state - * to FAIL. */ - { - int needed_quorum = (server.cluster->size / 2) + 1; - - if (reachable_masters < needed_quorum) { - new_state = CLUSTER_FAIL; - among_minority_time = mstime(); - } - } - - /* Log a state change */ - if (new_state != server.cluster->state) { - mstime_t rejoin_delay = server.cluster_node_timeout; - - /* If the instance is a master and was partitioned away with the - * minority, don't let it accept queries for some time after the - * partition heals, to make sure there is enough time to receive - * a configuration update. */ - if (rejoin_delay > CLUSTER_MAX_REJOIN_DELAY) - rejoin_delay = CLUSTER_MAX_REJOIN_DELAY; - if (rejoin_delay < CLUSTER_MIN_REJOIN_DELAY) - rejoin_delay = CLUSTER_MIN_REJOIN_DELAY; - - if (new_state == CLUSTER_OK && - nodeIsMaster(myself) && - mstime() - among_minority_time < rejoin_delay) - { - return; - } - - /* Change the state and log the event. */ - serverLog(LL_WARNING,"Cluster state changed: %s", - new_state == CLUSTER_OK ? "ok" : "fail"); - server.cluster->state = new_state; - } -} - -/* This function is called after the node startup in order to verify that data - * loaded from disk is in agreement with the cluster configuration: - * - * 1) If we find keys about hash slots we have no responsibility for, the - * following happens: - * A) If no other node is in charge according to the current cluster - * configuration, we add these slots to our node. - * B) If according to our config other nodes are already in charge for - * this lots, we set the slots as IMPORTING from our point of view - * in order to justify we have those slots, and in order to make - * redis-trib aware of the issue, so that it can try to fix it. - * 2) If we find data in a DB different than DB0 we return C_ERR to - * signal the caller it should quit the server with an error message - * or take other actions. - * - * The function always returns C_OK even if it will try to correct - * the error described in "1". However if data is found in DB different - * from DB0, C_ERR is returned. - * - * The function also uses the logging facility in order to warn the user - * about desynchronizations between the data we have in memory and the - * cluster configuration. */ -int verifyClusterConfigWithData(void) { - int j; - int update_config = 0; - - /* If this node is a slave, don't perform the check at all as we - * completely depend on the replication stream. */ - if (nodeIsSlave(myself)) return C_OK; - - /* Make sure we only have keys in DB0. */ - for (j = 1; j < server.dbnum; j++) { - if (dictSize(server.db[j].dict)) return C_ERR; - } - - /* Check that all the slots we see populated memory have a corresponding - * entry in the cluster table. Otherwise fix the table. */ - for (j = 0; j < CLUSTER_SLOTS; j++) { - if (!countKeysInSlot(j)) continue; /* No keys in this slot. */ - /* Check if we are assigned to this slot or if we are importing it. - * In both cases check the next slot as the configuration makes - * sense. */ - if (server.cluster->slots[j] == myself || - server.cluster->importing_slots_from[j] != NULL) continue; - - /* If we are here data and cluster config don't agree, and we have - * slot 'j' populated even if we are not importing it, nor we are - * assigned to this slot. Fix this condition. */ - - update_config++; - /* Case A: slot is unassigned. Take responsibility for it. */ - if (server.cluster->slots[j] == NULL) { - serverLog(LL_WARNING, "I have keys for unassigned slot %d. " - "Taking responsibility for it.",j); - clusterAddSlot(myself,j); - } else { - serverLog(LL_WARNING, "I have keys for slot %d, but the slot is " - "assigned to another node. " - "Setting it to importing state.",j); - server.cluster->importing_slots_from[j] = server.cluster->slots[j]; - } - } - if (update_config) clusterSaveConfigOrDie(1); - return C_OK; -} - -/* ----------------------------------------------------------------------------- - * SLAVE nodes handling - * -------------------------------------------------------------------------- */ - -/* Set the specified node 'n' as master for this node. - * If this node is currently a master, it is turned into a slave. */ -void clusterSetMaster(clusterNode *n) { - serverAssert(n != myself); - serverAssert(myself->numslots == 0); - - if (nodeIsMaster(myself)) { - myself->flags &= ~(CLUSTER_NODE_MASTER|CLUSTER_NODE_MIGRATE_TO); - myself->flags |= CLUSTER_NODE_SLAVE; - clusterCloseAllSlots(); - } else { - if (myself->slaveof) - clusterNodeRemoveSlave(myself->slaveof,myself); - } - myself->slaveof = n; - clusterNodeAddSlave(n,myself); - replicationSetMaster(n->ip, n->port); - resetManualFailover(); -} - -/* ----------------------------------------------------------------------------- - * Nodes to string representation functions. - * -------------------------------------------------------------------------- */ - -struct redisNodeFlags { - uint16_t flag; - char *name; -}; - -static struct redisNodeFlags redisNodeFlagsTable[] = { - {CLUSTER_NODE_MYSELF, "myself,"}, - {CLUSTER_NODE_MASTER, "master,"}, - {CLUSTER_NODE_SLAVE, "slave,"}, - {CLUSTER_NODE_PFAIL, "fail?,"}, - {CLUSTER_NODE_FAIL, "fail,"}, - {CLUSTER_NODE_HANDSHAKE, "handshake,"}, - {CLUSTER_NODE_NOADDR, "noaddr,"} -}; - -/* Concatenate the comma separated list of node flags to the given SDS - * string 'ci'. */ -sds representClusterNodeFlags(sds ci, uint16_t flags) { - if (flags == 0) { - ci = sdscat(ci,"noflags,"); - } else { - int i, size = sizeof(redisNodeFlagsTable)/sizeof(struct redisNodeFlags); - for (i = 0; i < size; i++) { - struct redisNodeFlags *nodeflag = redisNodeFlagsTable + i; - if (flags & nodeflag->flag) ci = sdscat(ci, nodeflag->name); - } - } - sdsIncrLen(ci,-1); /* Remove trailing comma. */ - return ci; -} - -/* Generate a csv-alike representation of the specified cluster node. - * See clusterGenNodesDescription() top comment for more information. - * - * The function returns the string representation as an SDS string. */ -sds clusterGenNodeDescription(clusterNode *node) { - int j, start; - sds ci; - - /* Node coordinates */ - ci = sdscatprintf(sdsempty(),"%.40s %s:%d@%d ", - node->name, - node->ip, - node->port, - node->cport); - - /* Flags */ - ci = representClusterNodeFlags(ci, node->flags); - - /* Slave of... or just "-" */ - if (node->slaveof) - ci = sdscatprintf(ci," %.40s ",node->slaveof->name); - else - ci = sdscatlen(ci," - ",3); - - /* Latency from the POV of this node, config epoch, link status */ - ci = sdscatprintf(ci,"%lld %lld %llu %s", - (long long) node->ping_sent, - (long long) node->pong_received, - (unsigned long long) node->configEpoch, - (node->link || node->flags & CLUSTER_NODE_MYSELF) ? - "connected" : "disconnected"); - - /* Slots served by this instance */ - start = -1; - for (j = 0; j < CLUSTER_SLOTS; j++) { - int bit; - - if ((bit = clusterNodeGetSlotBit(node,j)) != 0) { - if (start == -1) start = j; - } - if (start != -1 && (!bit || j == CLUSTER_SLOTS-1)) { - if (bit && j == CLUSTER_SLOTS-1) j++; - - if (start == j-1) { - ci = sdscatprintf(ci," %d",start); - } else { - ci = sdscatprintf(ci," %d-%d",start,j-1); - } - start = -1; - } - } - - /* Just for MYSELF node we also dump info about slots that - * we are migrating to other instances or importing from other - * instances. */ - if (node->flags & CLUSTER_NODE_MYSELF) { - for (j = 0; j < CLUSTER_SLOTS; j++) { - if (server.cluster->migrating_slots_to[j]) { - ci = sdscatprintf(ci," [%d->-%.40s]",j, - server.cluster->migrating_slots_to[j]->name); - } else if (server.cluster->importing_slots_from[j]) { - ci = sdscatprintf(ci," [%d-<-%.40s]",j, - server.cluster->importing_slots_from[j]->name); - } - } - } - return ci; -} - -/* Generate a csv-alike representation of the nodes we are aware of, - * including the "myself" node, and return an SDS string containing the - * representation (it is up to the caller to free it). - * - * All the nodes matching at least one of the node flags specified in - * "filter" are excluded from the output, so using zero as a filter will - * include all the known nodes in the representation, including nodes in - * the HANDSHAKE state. - * - * The representation obtained using this function is used for the output - * of the CLUSTER NODES function, and as format for the cluster - * configuration file (nodes.conf) for a given node. */ -sds clusterGenNodesDescription(int filter) { - sds ci = sdsempty(), ni; - dictIterator *di; - dictEntry *de; - - di = dictGetSafeIterator(server.cluster->nodes); - while((de = dictNext(di)) != NULL) { - clusterNode *node = dictGetVal(de); - - if (node->flags & filter) continue; - ni = clusterGenNodeDescription(node); - ci = sdscatsds(ci,ni); - sdsfree(ni); - ci = sdscatlen(ci,"\n",1); - } - dictReleaseIterator(di); - return ci; -} - -/* ----------------------------------------------------------------------------- - * CLUSTER command - * -------------------------------------------------------------------------- */ - -const char *clusterGetMessageTypeString(int type) { - switch(type) { - case CLUSTERMSG_TYPE_PING: return "ping"; - case CLUSTERMSG_TYPE_PONG: return "pong"; - case CLUSTERMSG_TYPE_MEET: return "meet"; - case CLUSTERMSG_TYPE_FAIL: return "fail"; - case CLUSTERMSG_TYPE_PUBLISH: return "publish"; - case CLUSTERMSG_TYPE_FAILOVER_AUTH_REQUEST: return "auth-req"; - case CLUSTERMSG_TYPE_FAILOVER_AUTH_ACK: return "auth-ack"; - case CLUSTERMSG_TYPE_UPDATE: return "update"; - case CLUSTERMSG_TYPE_MFSTART: return "mfstart"; - } - return "unknown"; -} - -int getSlotOrReply(client *c, robj *o) { - long long slot; - - if (getLongLongFromObject(o,&slot) != C_OK || - slot < 0 || slot >= CLUSTER_SLOTS) - { - addReplyError(c,"Invalid or out of range slot"); - return -1; - } - return (int) slot; -} - -void clusterReplyMultiBulkSlots(client *c) { - /* Format: 1) 1) start slot - * 2) end slot - * 3) 1) master IP - * 2) master port - * 3) node ID - * 4) 1) replica IP - * 2) replica port - * 3) node ID - * ... continued until done - */ - - int num_masters = 0; - void *slot_replylen = addDeferredMultiBulkLength(c); - - dictEntry *de; - dictIterator *di = dictGetSafeIterator(server.cluster->nodes); - while((de = dictNext(di)) != NULL) { - clusterNode *node = dictGetVal(de); - int j = 0, start = -1; - - /* Skip slaves (that are iterated when producing the output of their - * master) and masters not serving any slot. */ - if (!nodeIsMaster(node) || node->numslots == 0) continue; - - for (j = 0; j < CLUSTER_SLOTS; j++) { - int bit, i; - - if ((bit = clusterNodeGetSlotBit(node,j)) != 0) { - if (start == -1) start = j; - } - if (start != -1 && (!bit || j == CLUSTER_SLOTS-1)) { - int nested_elements = 3; /* slots (2) + master addr (1). */ - void *nested_replylen = addDeferredMultiBulkLength(c); - - if (bit && j == CLUSTER_SLOTS-1) j++; - - /* If slot exists in output map, add to it's list. - * else, create a new output map for this slot */ - if (start == j-1) { - addReplyLongLong(c, start); /* only one slot; low==high */ - addReplyLongLong(c, start); - } else { - addReplyLongLong(c, start); /* low */ - addReplyLongLong(c, j-1); /* high */ - } - start = -1; - - /* First node reply position is always the master */ - addReplyMultiBulkLen(c, 3); - addReplyBulkCString(c, node->ip); - addReplyLongLong(c, node->port); - addReplyBulkCBuffer(c, node->name, CLUSTER_NAMELEN); - - /* Remaining nodes in reply are replicas for slot range */ - for (i = 0; i < node->numslaves; i++) { - /* This loop is copy/pasted from clusterGenNodeDescription() - * with modifications for per-slot node aggregation */ - if (nodeFailed(node->slaves[i])) continue; - addReplyMultiBulkLen(c, 3); - addReplyBulkCString(c, node->slaves[i]->ip); - addReplyLongLong(c, node->slaves[i]->port); - addReplyBulkCBuffer(c, node->slaves[i]->name, CLUSTER_NAMELEN); - nested_elements++; - } - setDeferredMultiBulkLength(c, nested_replylen, nested_elements); - num_masters++; - } - } - } - dictReleaseIterator(di); - setDeferredMultiBulkLength(c, slot_replylen, num_masters); -} - -void clusterCommand(client *c) { - if (server.cluster_enabled == 0) { - addReplyError(c,"This instance has cluster support disabled"); - return; - } - - if (!strcasecmp(c->argv[1]->ptr,"meet") && (c->argc == 4 || c->argc == 5)) { - /* CLUSTER MEET [cport] */ - long long port, cport; - - if (getLongLongFromObject(c->argv[3], &port) != C_OK) { - addReplyErrorFormat(c,"Invalid TCP base port specified: %s", - (char*)c->argv[3]->ptr); - return; - } - - if (c->argc == 5) { - if (getLongLongFromObject(c->argv[4], &cport) != C_OK) { - addReplyErrorFormat(c,"Invalid TCP bus port specified: %s", - (char*)c->argv[4]->ptr); - return; - } - } else { - cport = port + CLUSTER_PORT_INCR; - } - - if (clusterStartHandshake(c->argv[2]->ptr,port,cport) == 0 && - errno == EINVAL) - { - addReplyErrorFormat(c,"Invalid node address specified: %s:%s", - (char*)c->argv[2]->ptr, (char*)c->argv[3]->ptr); - } else { - addReply(c,shared.ok); - } - } else if (!strcasecmp(c->argv[1]->ptr,"nodes") && c->argc == 2) { - /* CLUSTER NODES */ - robj *o; - sds ci = clusterGenNodesDescription(0); - - o = createObject(OBJ_STRING,ci); - addReplyBulk(c,o); - decrRefCount(o); - } else if (!strcasecmp(c->argv[1]->ptr,"myid") && c->argc == 2) { - /* CLUSTER MYID */ - addReplyBulkCBuffer(c,myself->name, CLUSTER_NAMELEN); - } else if (!strcasecmp(c->argv[1]->ptr,"slots") && c->argc == 2) { - /* CLUSTER SLOTS */ - clusterReplyMultiBulkSlots(c); - } else if (!strcasecmp(c->argv[1]->ptr,"flushslots") && c->argc == 2) { - /* CLUSTER FLUSHSLOTS */ - if (dictSize(server.db[0].dict) != 0) { - addReplyError(c,"DB must be empty to perform CLUSTER FLUSHSLOTS."); - return; - } - clusterDelNodeSlots(myself); - clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE|CLUSTER_TODO_SAVE_CONFIG); - addReply(c,shared.ok); - } else if ((!strcasecmp(c->argv[1]->ptr,"addslots") || - !strcasecmp(c->argv[1]->ptr,"delslots")) && c->argc >= 3) - { - /* CLUSTER ADDSLOTS [slot] ... */ - /* CLUSTER DELSLOTS [slot] ... */ - int j, slot; - unsigned char *slots = zmalloc(CLUSTER_SLOTS); - int del = !strcasecmp(c->argv[1]->ptr,"delslots"); - - memset(slots,0,CLUSTER_SLOTS); - /* Check that all the arguments are parseable and that all the - * slots are not already busy. */ - for (j = 2; j < c->argc; j++) { - if ((slot = getSlotOrReply(c,c->argv[j])) == -1) { - zfree(slots); - return; - } - if (del && server.cluster->slots[slot] == NULL) { - addReplyErrorFormat(c,"Slot %d is already unassigned", slot); - zfree(slots); - return; - } else if (!del && server.cluster->slots[slot]) { - addReplyErrorFormat(c,"Slot %d is already busy", slot); - zfree(slots); - return; - } - if (slots[slot]++ == 1) { - addReplyErrorFormat(c,"Slot %d specified multiple times", - (int)slot); - zfree(slots); - return; - } - } - for (j = 0; j < CLUSTER_SLOTS; j++) { - if (slots[j]) { - int retval; - - /* If this slot was set as importing we can clear this - * state as now we are the real owner of the slot. */ - if (server.cluster->importing_slots_from[j]) - server.cluster->importing_slots_from[j] = NULL; - - retval = del ? clusterDelSlot(j) : - clusterAddSlot(myself,j); - serverAssertWithInfo(c,NULL,retval == C_OK); - } - } - zfree(slots); - clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE|CLUSTER_TODO_SAVE_CONFIG); - addReply(c,shared.ok); - } else if (!strcasecmp(c->argv[1]->ptr,"setslot") && c->argc >= 4) { - /* SETSLOT 10 MIGRATING */ - /* SETSLOT 10 IMPORTING */ - /* SETSLOT 10 STABLE */ - /* SETSLOT 10 NODE */ - int slot; - clusterNode *n; - - if (nodeIsSlave(myself)) { - addReplyError(c,"Please use SETSLOT only with masters."); - return; - } - - if ((slot = getSlotOrReply(c,c->argv[2])) == -1) return; - - if (!strcasecmp(c->argv[3]->ptr,"migrating") && c->argc == 5) { - if (server.cluster->slots[slot] != myself) { - addReplyErrorFormat(c,"I'm not the owner of hash slot %u",slot); - return; - } - if ((n = clusterLookupNode(c->argv[4]->ptr)) == NULL) { - addReplyErrorFormat(c,"I don't know about node %s", - (char*)c->argv[4]->ptr); - return; - } - server.cluster->migrating_slots_to[slot] = n; - } else if (!strcasecmp(c->argv[3]->ptr,"importing") && c->argc == 5) { - if (server.cluster->slots[slot] == myself) { - addReplyErrorFormat(c, - "I'm already the owner of hash slot %u",slot); - return; - } - if ((n = clusterLookupNode(c->argv[4]->ptr)) == NULL) { - addReplyErrorFormat(c,"I don't know about node %s", - (char*)c->argv[3]->ptr); - return; - } - server.cluster->importing_slots_from[slot] = n; - } else if (!strcasecmp(c->argv[3]->ptr,"stable") && c->argc == 4) { - /* CLUSTER SETSLOT STABLE */ - server.cluster->importing_slots_from[slot] = NULL; - server.cluster->migrating_slots_to[slot] = NULL; - } else if (!strcasecmp(c->argv[3]->ptr,"node") && c->argc == 5) { - /* CLUSTER SETSLOT NODE */ - clusterNode *n = clusterLookupNode(c->argv[4]->ptr); - - if (!n) { - addReplyErrorFormat(c,"Unknown node %s", - (char*)c->argv[4]->ptr); - return; - } - /* If this hash slot was served by 'myself' before to switch - * make sure there are no longer local keys for this hash slot. */ - if (server.cluster->slots[slot] == myself && n != myself) { - if (countKeysInSlot(slot) != 0) { - addReplyErrorFormat(c, - "Can't assign hashslot %d to a different node " - "while I still hold keys for this hash slot.", slot); - return; - } - } - /* If this slot is in migrating status but we have no keys - * for it assigning the slot to another node will clear - * the migratig status. */ - if (countKeysInSlot(slot) == 0 && - server.cluster->migrating_slots_to[slot]) - server.cluster->migrating_slots_to[slot] = NULL; - - /* If this node was importing this slot, assigning the slot to - * itself also clears the importing status. */ - if (n == myself && - server.cluster->importing_slots_from[slot]) - { - /* This slot was manually migrated, set this node configEpoch - * to a new epoch so that the new version can be propagated - * by the cluster. - * - * Note that if this ever results in a collision with another - * node getting the same configEpoch, for example because a - * failover happens at the same time we close the slot, the - * configEpoch collision resolution will fix it assigning - * a different epoch to each node. */ - if (clusterBumpConfigEpochWithoutConsensus() == C_OK) { - serverLog(LL_WARNING, - "configEpoch updated after importing slot %d", slot); - } - server.cluster->importing_slots_from[slot] = NULL; - } - clusterDelSlot(slot); - clusterAddSlot(n,slot); - } else { - addReplyError(c, - "Invalid CLUSTER SETSLOT action or number of arguments"); - return; - } - clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG|CLUSTER_TODO_UPDATE_STATE); - addReply(c,shared.ok); - } else if (!strcasecmp(c->argv[1]->ptr,"bumpepoch") && c->argc == 2) { - /* CLUSTER BUMPEPOCH */ - int retval = clusterBumpConfigEpochWithoutConsensus(); - sds reply = sdscatprintf(sdsempty(),"+%s %llu\r\n", - (retval == C_OK) ? "BUMPED" : "STILL", - (unsigned long long) myself->configEpoch); - addReplySds(c,reply); - } else if (!strcasecmp(c->argv[1]->ptr,"info") && c->argc == 2) { - /* CLUSTER INFO */ - char *statestr[] = {"ok","fail","needhelp"}; - int slots_assigned = 0, slots_ok = 0, slots_pfail = 0, slots_fail = 0; - uint64_t myepoch; - int j; - - for (j = 0; j < CLUSTER_SLOTS; j++) { - clusterNode *n = server.cluster->slots[j]; - - if (n == NULL) continue; - slots_assigned++; - if (nodeFailed(n)) { - slots_fail++; - } else if (nodeTimedOut(n)) { - slots_pfail++; - } else { - slots_ok++; - } - } - - myepoch = (nodeIsSlave(myself) && myself->slaveof) ? - myself->slaveof->configEpoch : myself->configEpoch; - - sds info = sdscatprintf(sdsempty(), - "cluster_state:%s\r\n" - "cluster_slots_assigned:%d\r\n" - "cluster_slots_ok:%d\r\n" - "cluster_slots_pfail:%d\r\n" - "cluster_slots_fail:%d\r\n" - "cluster_known_nodes:%lu\r\n" - "cluster_size:%d\r\n" - "cluster_current_epoch:%llu\r\n" - "cluster_my_epoch:%llu\r\n" - , statestr[server.cluster->state], - slots_assigned, - slots_ok, - slots_pfail, - slots_fail, - dictSize(server.cluster->nodes), - server.cluster->size, - (unsigned long long) server.cluster->currentEpoch, - (unsigned long long) myepoch - ); - - /* Show stats about messages sent and received. */ - long long tot_msg_sent = 0; - long long tot_msg_received = 0; - - for (int i = 0; i < CLUSTERMSG_TYPE_COUNT; i++) { - if (server.cluster->stats_bus_messages_sent[i] == 0) continue; - tot_msg_sent += server.cluster->stats_bus_messages_sent[i]; - info = sdscatprintf(info, - "cluster_stats_messages_%s_sent:%lld\r\n", - clusterGetMessageTypeString(i), - server.cluster->stats_bus_messages_sent[i]); - } - info = sdscatprintf(info, - "cluster_stats_messages_sent:%lld\r\n", tot_msg_sent); - - for (int i = 0; i < CLUSTERMSG_TYPE_COUNT; i++) { - if (server.cluster->stats_bus_messages_received[i] == 0) continue; - tot_msg_received += server.cluster->stats_bus_messages_received[i]; - info = sdscatprintf(info, - "cluster_stats_messages_%s_received:%lld\r\n", - clusterGetMessageTypeString(i), - server.cluster->stats_bus_messages_received[i]); - } - info = sdscatprintf(info, - "cluster_stats_messages_received:%lld\r\n", tot_msg_received); - - /* Produce the reply protocol. */ - addReplySds(c,sdscatprintf(sdsempty(),"$%lu\r\n", - (unsigned long)sdslen(info))); - addReplySds(c,info); - addReply(c,shared.crlf); - } else if (!strcasecmp(c->argv[1]->ptr,"saveconfig") && c->argc == 2) { - int retval = clusterSaveConfig(1); - - if (retval == 0) - addReply(c,shared.ok); - else - addReplyErrorFormat(c,"error saving the cluster node config: %s", - strerror(errno)); - } else if (!strcasecmp(c->argv[1]->ptr,"keyslot") && c->argc == 3) { - /* CLUSTER KEYSLOT */ - sds key = c->argv[2]->ptr; - - addReplyLongLong(c,keyHashSlot(key,sdslen(key))); - } else if (!strcasecmp(c->argv[1]->ptr,"countkeysinslot") && c->argc == 3) { - /* CLUSTER COUNTKEYSINSLOT */ - long long slot; - - if (getLongLongFromObjectOrReply(c,c->argv[2],&slot,NULL) != C_OK) - return; - if (slot < 0 || slot >= CLUSTER_SLOTS) { - addReplyError(c,"Invalid slot"); - return; - } - addReplyLongLong(c,countKeysInSlot(slot)); - } else if (!strcasecmp(c->argv[1]->ptr,"getkeysinslot") && c->argc == 4) { - /* CLUSTER GETKEYSINSLOT */ - long long maxkeys, slot; - unsigned int numkeys, j; - robj **keys; - - if (getLongLongFromObjectOrReply(c,c->argv[2],&slot,NULL) != C_OK) - return; - if (getLongLongFromObjectOrReply(c,c->argv[3],&maxkeys,NULL) - != C_OK) - return; - if (slot < 0 || slot >= CLUSTER_SLOTS || maxkeys < 0) { - addReplyError(c,"Invalid slot or number of keys"); - return; - } - - keys = zmalloc(sizeof(robj*)*maxkeys); - numkeys = getKeysInSlot(slot, keys, maxkeys); - addReplyMultiBulkLen(c,numkeys); - for (j = 0; j < numkeys; j++) { - addReplyBulk(c,keys[j]); - decrRefCount(keys[j]); - } - zfree(keys); - } else if (!strcasecmp(c->argv[1]->ptr,"forget") && c->argc == 3) { - /* CLUSTER FORGET */ - clusterNode *n = clusterLookupNode(c->argv[2]->ptr); - - if (!n) { - addReplyErrorFormat(c,"Unknown node %s", (char*)c->argv[2]->ptr); - return; - } else if (n == myself) { - addReplyError(c,"I tried hard but I can't forget myself..."); - return; - } else if (nodeIsSlave(myself) && myself->slaveof == n) { - addReplyError(c,"Can't forget my master!"); - return; - } - clusterBlacklistAddNode(n); - clusterDelNode(n); - clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE| - CLUSTER_TODO_SAVE_CONFIG); - addReply(c,shared.ok); - } else if (!strcasecmp(c->argv[1]->ptr,"replicate") && c->argc == 3) { - /* CLUSTER REPLICATE */ - clusterNode *n = clusterLookupNode(c->argv[2]->ptr); - - /* Lookup the specified node in our table. */ - if (!n) { - addReplyErrorFormat(c,"Unknown node %s", (char*)c->argv[2]->ptr); - return; - } - - /* I can't replicate myself. */ - if (n == myself) { - addReplyError(c,"Can't replicate myself"); - return; - } - - /* Can't replicate a slave. */ - if (nodeIsSlave(n)) { - addReplyError(c,"I can only replicate a master, not a slave."); - return; - } - - /* If the instance is currently a master, it should have no assigned - * slots nor keys to accept to replicate some other node. - * Slaves can switch to another master without issues. */ - if (nodeIsMaster(myself) && - (myself->numslots != 0 || dictSize(server.db[0].dict) != 0)) { - addReplyError(c, - "To set a master the node must be empty and " - "without assigned slots."); - return; - } - - /* Set the master. */ - clusterSetMaster(n); - clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE|CLUSTER_TODO_SAVE_CONFIG); - addReply(c,shared.ok); - } else if (!strcasecmp(c->argv[1]->ptr,"slaves") && c->argc == 3) { - /* CLUSTER SLAVES */ - clusterNode *n = clusterLookupNode(c->argv[2]->ptr); - int j; - - /* Lookup the specified node in our table. */ - if (!n) { - addReplyErrorFormat(c,"Unknown node %s", (char*)c->argv[2]->ptr); - return; - } - - if (nodeIsSlave(n)) { - addReplyError(c,"The specified node is not a master"); - return; - } - - addReplyMultiBulkLen(c,n->numslaves); - for (j = 0; j < n->numslaves; j++) { - sds ni = clusterGenNodeDescription(n->slaves[j]); - addReplyBulkCString(c,ni); - sdsfree(ni); - } - } else if (!strcasecmp(c->argv[1]->ptr,"count-failure-reports") && - c->argc == 3) - { - /* CLUSTER COUNT-FAILURE-REPORTS */ - clusterNode *n = clusterLookupNode(c->argv[2]->ptr); - - if (!n) { - addReplyErrorFormat(c,"Unknown node %s", (char*)c->argv[2]->ptr); - return; - } else { - addReplyLongLong(c,clusterNodeFailureReportsCount(n)); - } - } else if (!strcasecmp(c->argv[1]->ptr,"failover") && - (c->argc == 2 || c->argc == 3)) - { - /* CLUSTER FAILOVER [FORCE|TAKEOVER] */ - int force = 0, takeover = 0; - - if (c->argc == 3) { - if (!strcasecmp(c->argv[2]->ptr,"force")) { - force = 1; - } else if (!strcasecmp(c->argv[2]->ptr,"takeover")) { - takeover = 1; - force = 1; /* Takeover also implies force. */ - } else { - addReply(c,shared.syntaxerr); - return; - } - } - - /* Check preconditions. */ - if (nodeIsMaster(myself)) { - addReplyError(c,"You should send CLUSTER FAILOVER to a slave"); - return; - } else if (myself->slaveof == NULL) { - addReplyError(c,"I'm a slave but my master is unknown to me"); - return; - } else if (!force && - (nodeFailed(myself->slaveof) || - myself->slaveof->link == NULL)) - { - addReplyError(c,"Master is down or failed, " - "please use CLUSTER FAILOVER FORCE"); - return; - } - resetManualFailover(); - server.cluster->mf_end = mstime() + CLUSTER_MF_TIMEOUT; - - if (takeover) { - /* A takeover does not perform any initial check. It just - * generates a new configuration epoch for this node without - * consensus, claims the master's slots, and broadcast the new - * configuration. */ - serverLog(LL_WARNING,"Taking over the master (user request)."); - clusterBumpConfigEpochWithoutConsensus(); - clusterFailoverReplaceYourMaster(); - } else if (force) { - /* If this is a forced failover, we don't need to talk with our - * master to agree about the offset. We just failover taking over - * it without coordination. */ - serverLog(LL_WARNING,"Forced failover user request accepted."); - server.cluster->mf_can_start = 1; - } else { - serverLog(LL_WARNING,"Manual failover user request accepted."); - clusterSendMFStart(myself->slaveof); - } - addReply(c,shared.ok); - } else if (!strcasecmp(c->argv[1]->ptr,"set-config-epoch") && c->argc == 3) - { - /* CLUSTER SET-CONFIG-EPOCH - * - * The user is allowed to set the config epoch only when a node is - * totally fresh: no config epoch, no other known node, and so forth. - * This happens at cluster creation time to start with a cluster where - * every node has a different node ID, without to rely on the conflicts - * resolution system which is too slow when a big cluster is created. */ - long long epoch; - - if (getLongLongFromObjectOrReply(c,c->argv[2],&epoch,NULL) != C_OK) - return; - - if (epoch < 0) { - addReplyErrorFormat(c,"Invalid config epoch specified: %lld",epoch); - } else if (dictSize(server.cluster->nodes) > 1) { - addReplyError(c,"The user can assign a config epoch only when the " - "node does not know any other node."); - } else if (myself->configEpoch != 0) { - addReplyError(c,"Node config epoch is already non-zero"); - } else { - myself->configEpoch = epoch; - serverLog(LL_WARNING, - "configEpoch set to %llu via CLUSTER SET-CONFIG-EPOCH", - (unsigned long long) myself->configEpoch); - - if (server.cluster->currentEpoch < (uint64_t)epoch) - server.cluster->currentEpoch = epoch; - /* No need to fsync the config here since in the unlucky event - * of a failure to persist the config, the conflict resolution code - * will assign an unique config to this node. */ - clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE| - CLUSTER_TODO_SAVE_CONFIG); - addReply(c,shared.ok); - } - } else if (!strcasecmp(c->argv[1]->ptr,"reset") && - (c->argc == 2 || c->argc == 3)) - { - /* CLUSTER RESET [SOFT|HARD] */ - int hard = 0; - - /* Parse soft/hard argument. Default is soft. */ - if (c->argc == 3) { - if (!strcasecmp(c->argv[2]->ptr,"hard")) { - hard = 1; - } else if (!strcasecmp(c->argv[2]->ptr,"soft")) { - hard = 0; - } else { - addReply(c,shared.syntaxerr); - return; - } - } - - /* Slaves can be reset while containing data, but not master nodes - * that must be empty. */ - if (nodeIsMaster(myself) && dictSize(c->db->dict) != 0) { - addReplyError(c,"CLUSTER RESET can't be called with " - "master nodes containing keys"); - return; - } - clusterReset(hard); - addReply(c,shared.ok); - } else { - addReplyError(c,"Wrong CLUSTER subcommand or number of arguments"); - } -} - -/* ----------------------------------------------------------------------------- - * DUMP, RESTORE and MIGRATE commands - * -------------------------------------------------------------------------- */ - -/* Generates a DUMP-format representation of the object 'o', adding it to the - * io stream pointed by 'rio'. This function can't fail. */ -void createDumpPayload(rio *payload, robj *o) { - unsigned char buf[2]; - uint64_t crc; - - /* Serialize the object in a RDB-like format. It consist of an object type - * byte followed by the serialized object. This is understood by RESTORE. */ - rioInitWithBuffer(payload,sdsempty()); - serverAssert(rdbSaveObjectType(payload,o)); - serverAssert(rdbSaveObject(payload,o)); - - /* Write the footer, this is how it looks like: - * ----------------+---------------------+---------------+ - * ... RDB payload | 2 bytes RDB version | 8 bytes CRC64 | - * ----------------+---------------------+---------------+ - * RDB version and CRC are both in little endian. - */ - - /* RDB version */ - buf[0] = RDB_VERSION & 0xff; - buf[1] = (RDB_VERSION >> 8) & 0xff; - payload->io.buffer.ptr = sdscatlen(payload->io.buffer.ptr,buf,2); - - /* CRC64 */ - crc = crc64(0,(unsigned char*)payload->io.buffer.ptr, - sdslen(payload->io.buffer.ptr)); - memrev64ifbe(&crc); - payload->io.buffer.ptr = sdscatlen(payload->io.buffer.ptr,&crc,8); -} - -/* Verify that the RDB version of the dump payload matches the one of this Redis - * instance and that the checksum is ok. - * If the DUMP payload looks valid C_OK is returned, otherwise C_ERR - * is returned. */ -int verifyDumpPayload(unsigned char *p, size_t len) { - unsigned char *footer; - uint16_t rdbver; - uint64_t crc; - - /* At least 2 bytes of RDB version and 8 of CRC64 should be present. */ - if (len < 10) return C_ERR; - footer = p+(len-10); - - /* Verify RDB version */ - rdbver = (footer[1] << 8) | footer[0]; - if (rdbver > RDB_VERSION) return C_ERR; - - /* Verify CRC64 */ - crc = crc64(0,p,len-8); - memrev64ifbe(&crc); - return (memcmp(&crc,footer+2,8) == 0) ? C_OK : C_ERR; -} - -/* DUMP keyname - * DUMP is actually not used by Redis Cluster but it is the obvious - * complement of RESTORE and can be useful for different applications. */ -void dumpCommand(client *c) { - robj *o, *dumpobj; - rio payload; - - /* Check if the key is here. */ - if ((o = lookupKeyRead(c->db,c->argv[1])) == NULL) { - addReply(c,shared.nullbulk); - return; - } - - /* Create the DUMP encoded representation. */ - createDumpPayload(&payload,o); - - /* Transfer to the client */ - dumpobj = createObject(OBJ_STRING,payload.io.buffer.ptr); - addReplyBulk(c,dumpobj); - decrRefCount(dumpobj); - return; -} - -/* RESTORE key ttl serialized-value [REPLACE] */ -void restoreCommand(client *c) { - long long ttl; - rio payload; - int j, type, replace = 0; - robj *obj; - - /* Parse additional options */ - for (j = 4; j < c->argc; j++) { - if (!strcasecmp(c->argv[j]->ptr,"replace")) { - replace = 1; - } else { - addReply(c,shared.syntaxerr); - return; - } - } - - /* Make sure this key does not already exist here... */ - if (!replace && lookupKeyWrite(c->db,c->argv[1]) != NULL) { - addReply(c,shared.busykeyerr); - return; - } - - /* Check if the TTL value makes sense */ - if (getLongLongFromObjectOrReply(c,c->argv[2],&ttl,NULL) != C_OK) { - return; - } else if (ttl < 0) { - addReplyError(c,"Invalid TTL value, must be >= 0"); - return; - } - - /* Verify RDB version and data checksum. */ - if (verifyDumpPayload(c->argv[3]->ptr,sdslen(c->argv[3]->ptr)) == C_ERR) - { - addReplyError(c,"DUMP payload version or checksum are wrong"); - return; - } - - rioInitWithBuffer(&payload,c->argv[3]->ptr); - if (((type = rdbLoadObjectType(&payload)) == -1) || - ((obj = rdbLoadObject(type,&payload)) == NULL)) - { - addReplyError(c,"Bad data format"); - return; - } - - /* Remove the old key if needed. */ - if (replace) dbDelete(c->db,c->argv[1]); - - /* Create the key and set the TTL if any */ - dbAdd(c->db,c->argv[1],obj); - if (ttl) setExpire(c,c->db,c->argv[1],mstime()+ttl); - signalModifiedKey(c->db,c->argv[1]); - addReply(c,shared.ok); - server.dirty++; -} - -/* MIGRATE socket cache implementation. - * - * We take a map between host:ip and a TCP socket that we used to connect - * to this instance in recent time. - * This sockets are closed when the max number we cache is reached, and also - * in serverCron() when they are around for more than a few seconds. */ -#define MIGRATE_SOCKET_CACHE_ITEMS 64 /* max num of items in the cache. */ -#define MIGRATE_SOCKET_CACHE_TTL 10 /* close cached sockets after 10 sec. */ - -typedef struct migrateCachedSocket { - int fd; - long last_dbid; - time_t last_use_time; -} migrateCachedSocket; - -/* Return a migrateCachedSocket containing a TCP socket connected with the - * target instance, possibly returning a cached one. - * - * This function is responsible of sending errors to the client if a - * connection can't be established. In this case -1 is returned. - * Otherwise on success the socket is returned, and the caller should not - * attempt to free it after usage. - * - * If the caller detects an error while using the socket, migrateCloseSocket() - * should be called so that the connection will be created from scratch - * the next time. */ -migrateCachedSocket* migrateGetSocket(client *c, robj *host, robj *port, long timeout) { - int fd; - sds name = sdsempty(); - migrateCachedSocket *cs; - - /* Check if we have an already cached socket for this ip:port pair. */ - name = sdscatlen(name,host->ptr,sdslen(host->ptr)); - name = sdscatlen(name,":",1); - name = sdscatlen(name,port->ptr,sdslen(port->ptr)); - cs = dictFetchValue(server.migrate_cached_sockets,name); - if (cs) { - sdsfree(name); - cs->last_use_time = server.unixtime; - return cs; - } - - /* No cached socket, create one. */ - if (dictSize(server.migrate_cached_sockets) == MIGRATE_SOCKET_CACHE_ITEMS) { - /* Too many items, drop one at random. */ - dictEntry *de = dictGetRandomKey(server.migrate_cached_sockets); - cs = dictGetVal(de); - close(cs->fd); - zfree(cs); - dictDelete(server.migrate_cached_sockets,dictGetKey(de)); - } - - /* Create the socket */ - fd = anetTcpNonBlockConnect(server.neterr,c->argv[1]->ptr, - atoi(c->argv[2]->ptr)); - if (fd == -1) { - sdsfree(name); - addReplyErrorFormat(c,"Can't connect to target node: %s", - server.neterr); - return NULL; - } - anetEnableTcpNoDelay(server.neterr,fd); - - /* Check if it connects within the specified timeout. */ - if ((aeWait(fd,AE_WRITABLE,timeout) & AE_WRITABLE) == 0) { - sdsfree(name); - addReplySds(c, - sdsnew("-IOERR error or timeout connecting to the client\r\n")); - close(fd); - return NULL; - } - - /* Add to the cache and return it to the caller. */ - cs = zmalloc(sizeof(*cs)); - cs->fd = fd; - cs->last_dbid = -1; - cs->last_use_time = server.unixtime; - dictAdd(server.migrate_cached_sockets,name,cs); - return cs; -} - -/* Free a migrate cached connection. */ -void migrateCloseSocket(robj *host, robj *port) { - sds name = sdsempty(); - migrateCachedSocket *cs; - - name = sdscatlen(name,host->ptr,sdslen(host->ptr)); - name = sdscatlen(name,":",1); - name = sdscatlen(name,port->ptr,sdslen(port->ptr)); - cs = dictFetchValue(server.migrate_cached_sockets,name); - if (!cs) { - sdsfree(name); - return; - } - - close(cs->fd); - zfree(cs); - dictDelete(server.migrate_cached_sockets,name); - sdsfree(name); -} - -void migrateCloseTimedoutSockets(void) { - dictIterator *di = dictGetSafeIterator(server.migrate_cached_sockets); - dictEntry *de; - - while((de = dictNext(di)) != NULL) { - migrateCachedSocket *cs = dictGetVal(de); - - if ((server.unixtime - cs->last_use_time) > MIGRATE_SOCKET_CACHE_TTL) { - close(cs->fd); - zfree(cs); - dictDelete(server.migrate_cached_sockets,dictGetKey(de)); - } - } - dictReleaseIterator(di); -} - -/* MIGRATE host port key dbid timeout [COPY | REPLACE] - * - * On in the multiple keys form: - * - * MIGRATE host port "" dbid timeout [COPY | REPLACE] KEYS key1 key2 ... keyN */ -void migrateCommand(client *c) { - migrateCachedSocket *cs; - int copy, replace, j; - long timeout; - long dbid; - robj **ov = NULL; /* Objects to migrate. */ - robj **kv = NULL; /* Key names. */ - robj **newargv = NULL; /* Used to rewrite the command as DEL ... keys ... */ - rio cmd, payload; - int may_retry = 1; - int write_error = 0; - int argv_rewritten = 0; - - /* To support the KEYS option we need the following additional state. */ - int first_key = 3; /* Argument index of the first key. */ - int num_keys = 1; /* By default only migrate the 'key' argument. */ - - /* Initialization */ - copy = 0; - replace = 0; - - /* Parse additional options */ - for (j = 6; j < c->argc; j++) { - if (!strcasecmp(c->argv[j]->ptr,"copy")) { - copy = 1; - } else if (!strcasecmp(c->argv[j]->ptr,"replace")) { - replace = 1; - } else if (!strcasecmp(c->argv[j]->ptr,"keys")) { - if (sdslen(c->argv[3]->ptr) != 0) { - addReplyError(c, - "When using MIGRATE KEYS option, the key argument" - " must be set to the empty string"); - return; - } - first_key = j+1; - num_keys = c->argc - j - 1; - break; /* All the remaining args are keys. */ - } else { - addReply(c,shared.syntaxerr); - return; - } - } - - /* Sanity check */ - if (getLongFromObjectOrReply(c,c->argv[5],&timeout,NULL) != C_OK || - getLongFromObjectOrReply(c,c->argv[4],&dbid,NULL) != C_OK) - { - return; - } - if (timeout <= 0) timeout = 1000; - - /* Check if the keys are here. If at least one key is to migrate, do it - * otherwise if all the keys are missing reply with "NOKEY" to signal - * the caller there was nothing to migrate. We don't return an error in - * this case, since often this is due to a normal condition like the key - * expiring in the meantime. */ - ov = zrealloc(ov,sizeof(robj*)*num_keys); - kv = zrealloc(kv,sizeof(robj*)*num_keys); - int oi = 0; - - for (j = 0; j < num_keys; j++) { - if ((ov[oi] = lookupKeyRead(c->db,c->argv[first_key+j])) != NULL) { - kv[oi] = c->argv[first_key+j]; - oi++; - } - } - num_keys = oi; - if (num_keys == 0) { - zfree(ov); zfree(kv); - addReplySds(c,sdsnew("+NOKEY\r\n")); - return; - } - -try_again: - write_error = 0; - - /* Connect */ - cs = migrateGetSocket(c,c->argv[1],c->argv[2],timeout); - if (cs == NULL) { - zfree(ov); zfree(kv); - return; /* error sent to the client by migrateGetSocket() */ - } - - rioInitWithBuffer(&cmd,sdsempty()); - - /* Send the SELECT command if the current DB is not already selected. */ - int select = cs->last_dbid != dbid; /* Should we emit SELECT? */ - if (select) { - serverAssertWithInfo(c,NULL,rioWriteBulkCount(&cmd,'*',2)); - serverAssertWithInfo(c,NULL,rioWriteBulkString(&cmd,"SELECT",6)); - serverAssertWithInfo(c,NULL,rioWriteBulkLongLong(&cmd,dbid)); - } - - /* Create RESTORE payload and generate the protocol to call the command. */ - for (j = 0; j < num_keys; j++) { - long long ttl = 0; - long long expireat = getExpire(c->db,kv[j]); - - if (expireat != -1) { - ttl = expireat-mstime(); - if (ttl < 1) ttl = 1; - } - serverAssertWithInfo(c,NULL,rioWriteBulkCount(&cmd,'*',replace ? 5 : 4)); - if (server.cluster_enabled) - serverAssertWithInfo(c,NULL, - rioWriteBulkString(&cmd,"RESTORE-ASKING",14)); - else - serverAssertWithInfo(c,NULL,rioWriteBulkString(&cmd,"RESTORE",7)); - serverAssertWithInfo(c,NULL,sdsEncodedObject(kv[j])); - serverAssertWithInfo(c,NULL,rioWriteBulkString(&cmd,kv[j]->ptr, - sdslen(kv[j]->ptr))); - serverAssertWithInfo(c,NULL,rioWriteBulkLongLong(&cmd,ttl)); - - /* Emit the payload argument, that is the serialized object using - * the DUMP format. */ - createDumpPayload(&payload,ov[j]); - serverAssertWithInfo(c,NULL, - rioWriteBulkString(&cmd,payload.io.buffer.ptr, - sdslen(payload.io.buffer.ptr))); - sdsfree(payload.io.buffer.ptr); - - /* Add the REPLACE option to the RESTORE command if it was specified - * as a MIGRATE option. */ - if (replace) - serverAssertWithInfo(c,NULL,rioWriteBulkString(&cmd,"REPLACE",7)); - } - - /* Transfer the query to the other node in 64K chunks. */ - errno = 0; - { - sds buf = cmd.io.buffer.ptr; - size_t pos = 0, towrite; - int nwritten = 0; - - while ((towrite = sdslen(buf)-pos) > 0) { - towrite = (towrite > (64*1024) ? (64*1024) : towrite); - nwritten = syncWrite(cs->fd,buf+pos,towrite,timeout); - if (nwritten != (signed)towrite) { - write_error = 1; - goto socket_err; - } - pos += nwritten; - } - } - - char buf1[1024]; /* Select reply. */ - char buf2[1024]; /* Restore reply. */ - - /* Read the SELECT reply if needed. */ - if (select && syncReadLine(cs->fd, buf1, sizeof(buf1), timeout) <= 0) - goto socket_err; - - /* Read the RESTORE replies. */ - int error_from_target = 0; - int socket_error = 0; - int del_idx = 1; /* Index of the key argument for the replicated DEL op. */ - - if (!copy) newargv = zmalloc(sizeof(robj*)*(num_keys+1)); - - for (j = 0; j < num_keys; j++) { - if (syncReadLine(cs->fd, buf2, sizeof(buf2), timeout) <= 0) { - socket_error = 1; - break; - } - if ((select && buf1[0] == '-') || buf2[0] == '-') { - /* On error assume that last_dbid is no longer valid. */ - if (!error_from_target) { - cs->last_dbid = -1; - addReplyErrorFormat(c,"Target instance replied with error: %s", - (select && buf1[0] == '-') ? buf1+1 : buf2+1); - error_from_target = 1; - } - } else { - if (!copy) { - /* No COPY option: remove the local key, signal the change. */ - dbDelete(c->db,kv[j]); - signalModifiedKey(c->db,kv[j]); - server.dirty++; - - /* Populate the argument vector to replace the old one. */ - newargv[del_idx++] = kv[j]; - incrRefCount(kv[j]); - } - } - } - - /* On socket error, if we want to retry, do it now before rewriting the - * command vector. We only retry if we are sure nothing was processed - * and we failed to read the first reply (j == 0 test). */ - if (!error_from_target && socket_error && j == 0 && may_retry && - errno != ETIMEDOUT) - { - goto socket_err; /* A retry is guaranteed because of tested conditions.*/ - } - - /* On socket errors, close the migration socket now that we still have - * the original host/port in the ARGV. Later the original command may be - * rewritten to DEL and will be too later. */ - if (socket_error) migrateCloseSocket(c->argv[1],c->argv[2]); - - if (!copy) { - /* Translate MIGRATE as DEL for replication/AOF. Note that we do - * this only for the keys for which we received an acknowledgement - * from the receiving Redis server, by using the del_idx index. */ - if (del_idx > 1) { - newargv[0] = createStringObject("DEL",3); - /* Note that the following call takes ownership of newargv. */ - replaceClientCommandVector(c,del_idx,newargv); - argv_rewritten = 1; - } else { - /* No key transfer acknowledged, no need to rewrite as DEL. */ - zfree(newargv); - } - newargv = NULL; /* Make it safe to call zfree() on it in the future. */ - } - - /* If we are here and a socket error happened, we don't want to retry. - * Just signal the problem to the client, but only do it if we did not - * already queue a different error reported by the destination server. */ - if (!error_from_target && socket_error) { - may_retry = 0; - goto socket_err; - } - - if (!error_from_target) { - /* Success! Update the last_dbid in migrateCachedSocket, so that we can - * avoid SELECT the next time if the target DB is the same. Reply +OK. - * - * Note: If we reached this point, even if socket_error is true - * still the SELECT command succeeded (otherwise the code jumps to - * socket_err label. */ - cs->last_dbid = dbid; - addReply(c,shared.ok); - } else { - /* On error we already sent it in the for loop above, and set - * the curretly selected socket to -1 to force SELECT the next time. */ - } - - sdsfree(cmd.io.buffer.ptr); - zfree(ov); zfree(kv); zfree(newargv); - return; - -/* On socket errors we try to close the cached socket and try again. - * It is very common for the cached socket to get closed, if just reopening - * it works it's a shame to notify the error to the caller. */ -socket_err: - /* Cleanup we want to perform in both the retry and no retry case. - * Note: Closing the migrate socket will also force SELECT next time. */ - sdsfree(cmd.io.buffer.ptr); - - /* If the command was rewritten as DEL and there was a socket error, - * we already closed the socket earlier. While migrateCloseSocket() - * is idempotent, the host/port arguments are now gone, so don't do it - * again. */ - if (!argv_rewritten) migrateCloseSocket(c->argv[1],c->argv[2]); - zfree(newargv); - newargv = NULL; /* This will get reallocated on retry. */ - - /* Retry only if it's not a timeout and we never attempted a retry - * (or the code jumping here did not set may_retry to zero). */ - if (errno != ETIMEDOUT && may_retry) { - may_retry = 0; - goto try_again; - } - - /* Cleanup we want to do if no retry is attempted. */ - zfree(ov); zfree(kv); - addReplySds(c, - sdscatprintf(sdsempty(), - "-IOERR error or timeout %s to target instance\r\n", - write_error ? "writing" : "reading")); - return; -} - -/* ----------------------------------------------------------------------------- - * Cluster functions related to serving / redirecting clients - * -------------------------------------------------------------------------- */ - -/* The ASKING command is required after a -ASK redirection. - * The client should issue ASKING before to actually send the command to - * the target instance. See the Redis Cluster specification for more - * information. */ -void askingCommand(client *c) { - if (server.cluster_enabled == 0) { - addReplyError(c,"This instance has cluster support disabled"); - return; - } - c->flags |= CLIENT_ASKING; - addReply(c,shared.ok); -} - -/* The READONLY command is used by clients to enter the read-only mode. - * In this mode slaves will not redirect clients as long as clients access - * with read-only commands to keys that are served by the slave's master. */ -void readonlyCommand(client *c) { - if (server.cluster_enabled == 0) { - addReplyError(c,"This instance has cluster support disabled"); - return; - } - c->flags |= CLIENT_READONLY; - addReply(c,shared.ok); -} - -/* The READWRITE command just clears the READONLY command state. */ -void readwriteCommand(client *c) { - c->flags &= ~CLIENT_READONLY; - addReply(c,shared.ok); -} - -/* Return the pointer to the cluster node that is able to serve the command. - * For the function to succeed the command should only target either: - * - * 1) A single key (even multiple times like LPOPRPUSH mylist mylist). - * 2) Multiple keys in the same hash slot, while the slot is stable (no - * resharding in progress). - * - * On success the function returns the node that is able to serve the request. - * If the node is not 'myself' a redirection must be perfomed. The kind of - * redirection is specified setting the integer passed by reference - * 'error_code', which will be set to CLUSTER_REDIR_ASK or - * CLUSTER_REDIR_MOVED. - * - * When the node is 'myself' 'error_code' is set to CLUSTER_REDIR_NONE. - * - * If the command fails NULL is returned, and the reason of the failure is - * provided via 'error_code', which will be set to: - * - * CLUSTER_REDIR_CROSS_SLOT if the request contains multiple keys that - * don't belong to the same hash slot. - * - * CLUSTER_REDIR_UNSTABLE if the request contains multiple keys - * belonging to the same slot, but the slot is not stable (in migration or - * importing state, likely because a resharding is in progress). - * - * CLUSTER_REDIR_DOWN_UNBOUND if the request addresses a slot which is - * not bound to any node. In this case the cluster global state should be - * already "down" but it is fragile to rely on the update of the global state, - * so we also handle it here. - * - * CLUSTER_REDIR_DOWN_STATE if the cluster is down but the user attempts to - * execute a command that addresses one or more keys. */ -clusterNode *getNodeByQuery(client *c, struct redisCommand *cmd, robj **argv, int argc, int *hashslot, int *error_code) { - clusterNode *n = NULL; - robj *firstkey = NULL; - int multiple_keys = 0; - multiState *ms, _ms; - multiCmd mc; - int i, slot = 0, migrating_slot = 0, importing_slot = 0, missing_keys = 0; - - /* Set error code optimistically for the base case. */ - if (error_code) *error_code = CLUSTER_REDIR_NONE; - - /* We handle all the cases as if they were EXEC commands, so we have - * a common code path for everything */ - if (cmd->proc == execCommand) { - /* If CLIENT_MULTI flag is not set EXEC is just going to return an - * error. */ - if (!(c->flags & CLIENT_MULTI)) return myself; - ms = &c->mstate; - } else { - /* In order to have a single codepath create a fake Multi State - * structure if the client is not in MULTI/EXEC state, this way - * we have a single codepath below. */ - ms = &_ms; - _ms.commands = &mc; - _ms.count = 1; - mc.argv = argv; - mc.argc = argc; - mc.cmd = cmd; - } - - /* Check that all the keys are in the same hash slot, and obtain this - * slot and the node associated. */ - for (i = 0; i < ms->count; i++) { - struct redisCommand *mcmd; - robj **margv; - int margc, *keyindex, numkeys, j; - - mcmd = ms->commands[i].cmd; - margc = ms->commands[i].argc; - margv = ms->commands[i].argv; - - keyindex = getKeysFromCommand(mcmd,margv,margc,&numkeys); - for (j = 0; j < numkeys; j++) { - robj *thiskey = margv[keyindex[j]]; - int thisslot = keyHashSlot((char*)thiskey->ptr, - sdslen(thiskey->ptr)); - - if (firstkey == NULL) { - /* This is the first key we see. Check what is the slot - * and node. */ - firstkey = thiskey; - slot = thisslot; - n = server.cluster->slots[slot]; - - /* Error: If a slot is not served, we are in "cluster down" - * state. However the state is yet to be updated, so this was - * not trapped earlier in processCommand(). Report the same - * error to the client. */ - if (n == NULL) { - getKeysFreeResult(keyindex); - if (error_code) - *error_code = CLUSTER_REDIR_DOWN_UNBOUND; - return NULL; - } - - /* If we are migrating or importing this slot, we need to check - * if we have all the keys in the request (the only way we - * can safely serve the request, otherwise we return a TRYAGAIN - * error). To do so we set the importing/migrating state and - * increment a counter for every missing key. */ - if (n == myself && - server.cluster->migrating_slots_to[slot] != NULL) - { - migrating_slot = 1; - } else if (server.cluster->importing_slots_from[slot] != NULL) { - importing_slot = 1; - } - } else { - /* If it is not the first key, make sure it is exactly - * the same key as the first we saw. */ - if (!equalStringObjects(firstkey,thiskey)) { - if (slot != thisslot) { - /* Error: multiple keys from different slots. */ - getKeysFreeResult(keyindex); - if (error_code) - *error_code = CLUSTER_REDIR_CROSS_SLOT; - return NULL; - } else { - /* Flag this request as one with multiple different - * keys. */ - multiple_keys = 1; - } - } - } - - /* Migarting / Improrting slot? Count keys we don't have. */ - if ((migrating_slot || importing_slot) && - lookupKeyRead(&server.db[0],thiskey) == NULL) - { - missing_keys++; - } - } - getKeysFreeResult(keyindex); - } - - /* No key at all in command? then we can serve the request - * without redirections or errors in all the cases. */ - if (n == NULL) return myself; - - /* Cluster is globally down but we got keys? We can't serve the request. */ - if (server.cluster->state != CLUSTER_OK) { - if (error_code) *error_code = CLUSTER_REDIR_DOWN_STATE; - return NULL; - } - - /* Return the hashslot by reference. */ - if (hashslot) *hashslot = slot; - - /* MIGRATE always works in the context of the local node if the slot - * is open (migrating or importing state). We need to be able to freely - * move keys among instances in this case. */ - if ((migrating_slot || importing_slot) && cmd->proc == migrateCommand) - return myself; - - /* If we don't have all the keys and we are migrating the slot, send - * an ASK redirection. */ - if (migrating_slot && missing_keys) { - if (error_code) *error_code = CLUSTER_REDIR_ASK; - return server.cluster->migrating_slots_to[slot]; - } - - /* If we are receiving the slot, and the client correctly flagged the - * request as "ASKING", we can serve the request. However if the request - * involves multiple keys and we don't have them all, the only option is - * to send a TRYAGAIN error. */ - if (importing_slot && - (c->flags & CLIENT_ASKING || cmd->flags & CMD_ASKING)) - { - if (multiple_keys && missing_keys) { - if (error_code) *error_code = CLUSTER_REDIR_UNSTABLE; - return NULL; - } else { - return myself; - } - } - - /* Handle the read-only client case reading from a slave: if this - * node is a slave and the request is about an hash slot our master - * is serving, we can reply without redirection. */ - if (c->flags & CLIENT_READONLY && - cmd->flags & CMD_READONLY && - nodeIsSlave(myself) && - myself->slaveof == n) - { - return myself; - } - - /* Base case: just return the right node. However if this node is not - * myself, set error_code to MOVED since we need to issue a rediretion. */ - if (n != myself && error_code) *error_code = CLUSTER_REDIR_MOVED; - return n; -} - -/* Send the client the right redirection code, according to error_code - * that should be set to one of CLUSTER_REDIR_* macros. - * - * If CLUSTER_REDIR_ASK or CLUSTER_REDIR_MOVED error codes - * are used, then the node 'n' should not be NULL, but should be the - * node we want to mention in the redirection. Moreover hashslot should - * be set to the hash slot that caused the redirection. */ -void clusterRedirectClient(client *c, clusterNode *n, int hashslot, int error_code) { - if (error_code == CLUSTER_REDIR_CROSS_SLOT) { - addReplySds(c,sdsnew("-CROSSSLOT Keys in request don't hash to the same slot\r\n")); - } else if (error_code == CLUSTER_REDIR_UNSTABLE) { - /* The request spawns mutliple keys in the same slot, - * but the slot is not "stable" currently as there is - * a migration or import in progress. */ - addReplySds(c,sdsnew("-TRYAGAIN Multiple keys request during rehashing of slot\r\n")); - } else if (error_code == CLUSTER_REDIR_DOWN_STATE) { - addReplySds(c,sdsnew("-CLUSTERDOWN The cluster is down\r\n")); - } else if (error_code == CLUSTER_REDIR_DOWN_UNBOUND) { - addReplySds(c,sdsnew("-CLUSTERDOWN Hash slot not served\r\n")); - } else if (error_code == CLUSTER_REDIR_MOVED || - error_code == CLUSTER_REDIR_ASK) - { - addReplySds(c,sdscatprintf(sdsempty(), - "-%s %d %s:%d\r\n", - (error_code == CLUSTER_REDIR_ASK) ? "ASK" : "MOVED", - hashslot,n->ip,n->port)); - } else { - serverPanic("getNodeByQuery() unknown error."); - } -} - -/* This function is called by the function processing clients incrementally - * to detect timeouts, in order to handle the following case: - * - * 1) A client blocks with BLPOP or similar blocking operation. - * 2) The master migrates the hash slot elsewhere or turns into a slave. - * 3) The client may remain blocked forever (or up to the max timeout time) - * waiting for a key change that will never happen. - * - * If the client is found to be blocked into an hash slot this node no - * longer handles, the client is sent a redirection error, and the function - * returns 1. Otherwise 0 is returned and no operation is performed. */ -int clusterRedirectBlockedClientIfNeeded(client *c) { - if (c->flags & CLIENT_BLOCKED && c->btype == BLOCKED_LIST) { - dictEntry *de; - dictIterator *di; - - /* If the cluster is down, unblock the client with the right error. */ - if (server.cluster->state == CLUSTER_FAIL) { - clusterRedirectClient(c,NULL,0,CLUSTER_REDIR_DOWN_STATE); - return 1; - } - - di = dictGetIterator(c->bpop.keys); - while((de = dictNext(di)) != NULL) { - robj *key = dictGetKey(de); - int slot = keyHashSlot((char*)key->ptr, sdslen(key->ptr)); - clusterNode *node = server.cluster->slots[slot]; - - /* We send an error and unblock the client if: - * 1) The slot is unassigned, emitting a cluster down error. - * 2) The slot is not handled by this node, nor being imported. */ - if (node != myself && - server.cluster->importing_slots_from[slot] == NULL) - { - if (node == NULL) { - clusterRedirectClient(c,NULL,0, - CLUSTER_REDIR_DOWN_UNBOUND); - } else { - clusterRedirectClient(c,node,slot, - CLUSTER_REDIR_MOVED); - } - return 1; - } - } - dictReleaseIterator(di); - } - return 0; -} diff --git a/tree-sitter-c/examples/malloc.c b/tree-sitter-c/examples/malloc.c deleted file mode 100644 index d5ee428..0000000 --- a/tree-sitter-c/examples/malloc.c +++ /dev/null @@ -1,532 +0,0 @@ -#define _GNU_SOURCE -#include -#include -#include -#include -#include -#include -#include "libc.h" -#include "atomic.h" -#include "pthread_impl.h" - -#if defined(__GNUC__) && defined(__PIC__) -#define inline inline __attribute__((always_inline)) -#endif - -void *__mmap(void *, size_t, int, int, int, off_t); -int __munmap(void *, size_t); -void *__mremap(void *, size_t, size_t, int, ...); -int __madvise(void *, size_t, int); - -struct chunk { - size_t psize, csize; - struct chunk *next, *prev; -}; - -struct bin { - volatile int lock[2]; - struct chunk *head; - struct chunk *tail; -}; - -static struct { - volatile uint64_t binmap; - struct bin bins[64]; - volatile int free_lock[2]; -} mal; - - -#define SIZE_ALIGN (4*sizeof(size_t)) -#define SIZE_MASK (-SIZE_ALIGN) -#define OVERHEAD (2*sizeof(size_t)) -#define MMAP_THRESHOLD (0x1c00*SIZE_ALIGN) -#define DONTCARE 16 -#define RECLAIM 163840 - -#define CHUNK_SIZE(c) ((c)->csize & -2) -#define CHUNK_PSIZE(c) ((c)->psize & -2) -#define PREV_CHUNK(c) ((struct chunk *)((char *)(c) - CHUNK_PSIZE(c))) -#define NEXT_CHUNK(c) ((struct chunk *)((char *)(c) + CHUNK_SIZE(c))) -#define MEM_TO_CHUNK(p) (struct chunk *)((char *)(p) - OVERHEAD) -#define CHUNK_TO_MEM(c) (void *)((char *)(c) + OVERHEAD) -#define BIN_TO_CHUNK(i) (MEM_TO_CHUNK(&mal.bins[i].head)) - -#define C_INUSE ((size_t)1) - -#define IS_MMAPPED(c) !((c)->csize & (C_INUSE)) - - -/* Synchronization tools */ - -static inline void lock(volatile int *lk) -{ - if (libc.threads_minus_1) - while(a_swap(lk, 1)) __wait(lk, lk+1, 1, 1); -} - -static inline void unlock(volatile int *lk) -{ - if (lk[0]) { - a_store(lk, 0); - if (lk[1]) __wake(lk, 1, 1); - } -} - -static inline void lock_bin(int i) -{ - lock(mal.bins[i].lock); - if (!mal.bins[i].head) - mal.bins[i].head = mal.bins[i].tail = BIN_TO_CHUNK(i); -} - -static inline void unlock_bin(int i) -{ - unlock(mal.bins[i].lock); -} - -static int first_set(uint64_t x) -{ -#if 1 - return a_ctz_64(x); -#else - static const char debruijn64[64] = { - 0, 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28, - 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11, - 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10, - 51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12 - }; - static const char debruijn32[32] = { - 0, 1, 23, 2, 29, 24, 19, 3, 30, 27, 25, 11, 20, 8, 4, 13, - 31, 22, 28, 18, 26, 10, 7, 12, 21, 17, 9, 6, 16, 5, 15, 14 - }; - if (sizeof(long) < 8) { - uint32_t y = x; - if (!y) { - y = x>>32; - return 32 + debruijn32[(y&-y)*0x076be629 >> 27]; - } - return debruijn32[(y&-y)*0x076be629 >> 27]; - } - return debruijn64[(x&-x)*0x022fdd63cc95386dull >> 58]; -#endif -} - -static const unsigned char bin_tab[60] = { - 32,33,34,35,36,36,37,37,38,38,39,39, - 40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43, - 44,44,44,44,44,44,44,44,45,45,45,45,45,45,45,45, - 46,46,46,46,46,46,46,46,47,47,47,47,47,47,47,47, -}; - -static int bin_index(size_t x) -{ - x = x / SIZE_ALIGN - 1; - if (x <= 32) return x; - if (x < 512) return bin_tab[x/8-4]; - if (x > 0x1c00) return 63; - return bin_tab[x/128-4] + 16; -} - -static int bin_index_up(size_t x) -{ - x = x / SIZE_ALIGN - 1; - if (x <= 32) return x; - x--; - if (x < 512) return bin_tab[x/8-4] + 1; - return bin_tab[x/128-4] + 17; -} - -#if 0 -void __dump_heap(int x) -{ - struct chunk *c; - int i; - for (c = (void *)mal.heap; CHUNK_SIZE(c); c = NEXT_CHUNK(c)) - fprintf(stderr, "base %p size %zu (%d) flags %d/%d\n", - c, CHUNK_SIZE(c), bin_index(CHUNK_SIZE(c)), - c->csize & 15, - NEXT_CHUNK(c)->psize & 15); - for (i=0; i<64; i++) { - if (mal.bins[i].head != BIN_TO_CHUNK(i) && mal.bins[i].head) { - fprintf(stderr, "bin %d: %p\n", i, mal.bins[i].head); - if (!(mal.binmap & 1ULL<psize = 0 | C_INUSE; - } - - /* Record new heap end and fill in footer. */ - end = (char *)p + n; - w = MEM_TO_CHUNK(end); - w->psize = n | C_INUSE; - w->csize = 0 | C_INUSE; - - /* Fill in header, which may be new or may be replacing a - * zero-size sentinel header at the old end-of-heap. */ - w = MEM_TO_CHUNK(p); - w->csize = n | C_INUSE; - - unlock(heap_lock); - - return w; -} - -static int adjust_size(size_t *n) -{ - /* Result of pointer difference must fit in ptrdiff_t. */ - if (*n-1 > PTRDIFF_MAX - SIZE_ALIGN - PAGE_SIZE) { - if (*n) { - errno = ENOMEM; - return -1; - } else { - *n = SIZE_ALIGN; - return 0; - } - } - *n = (*n + OVERHEAD + SIZE_ALIGN - 1) & SIZE_MASK; - return 0; -} - -static void unbin(struct chunk *c, int i) -{ - if (c->prev == c->next) - a_and_64(&mal.binmap, ~(1ULL<prev->next = c->next; - c->next->prev = c->prev; - c->csize |= C_INUSE; - NEXT_CHUNK(c)->psize |= C_INUSE; -} - -static int alloc_fwd(struct chunk *c) -{ - int i; - size_t k; - while (!((k=c->csize) & C_INUSE)) { - i = bin_index(k); - lock_bin(i); - if (c->csize == k) { - unbin(c, i); - unlock_bin(i); - return 1; - } - unlock_bin(i); - } - return 0; -} - -static int alloc_rev(struct chunk *c) -{ - int i; - size_t k; - while (!((k=c->psize) & C_INUSE)) { - i = bin_index(k); - lock_bin(i); - if (c->psize == k) { - unbin(PREV_CHUNK(c), i); - unlock_bin(i); - return 1; - } - unlock_bin(i); - } - return 0; -} - - -/* pretrim - trims a chunk _prior_ to removing it from its bin. - * Must be called with i as the ideal bin for size n, j the bin - * for the _free_ chunk self, and bin j locked. */ -static int pretrim(struct chunk *self, size_t n, int i, int j) -{ - size_t n1; - struct chunk *next, *split; - - /* We cannot pretrim if it would require re-binning. */ - if (j < 40) return 0; - if (j < i+3) { - if (j != 63) return 0; - n1 = CHUNK_SIZE(self); - if (n1-n <= MMAP_THRESHOLD) return 0; - } else { - n1 = CHUNK_SIZE(self); - } - if (bin_index(n1-n) != j) return 0; - - next = NEXT_CHUNK(self); - split = (void *)((char *)self + n); - - split->prev = self->prev; - split->next = self->next; - split->prev->next = split; - split->next->prev = split; - split->psize = n | C_INUSE; - split->csize = n1-n; - next->psize = n1-n; - self->csize = n | C_INUSE; - return 1; -} - -static void trim(struct chunk *self, size_t n) -{ - size_t n1 = CHUNK_SIZE(self); - struct chunk *next, *split; - - if (n >= n1 - DONTCARE) return; - - next = NEXT_CHUNK(self); - split = (void *)((char *)self + n); - - split->psize = n | C_INUSE; - split->csize = n1-n | C_INUSE; - next->psize = n1-n | C_INUSE; - self->csize = n | C_INUSE; - - free(CHUNK_TO_MEM(split)); -} - -void *malloc(size_t n) -{ - struct chunk *c; - int i, j; - - if (adjust_size(&n) < 0) return 0; - - if (n > MMAP_THRESHOLD) { - size_t len = n + OVERHEAD + PAGE_SIZE - 1 & -PAGE_SIZE; - char *base = __mmap(0, len, PROT_READ|PROT_WRITE, - MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); - if (base == (void *)-1) return 0; - c = (void *)(base + SIZE_ALIGN - OVERHEAD); - c->csize = len - (SIZE_ALIGN - OVERHEAD); - c->psize = SIZE_ALIGN - OVERHEAD; - return CHUNK_TO_MEM(c); - } - - i = bin_index_up(n); - for (;;) { - uint64_t mask = mal.binmap & -(1ULL<psize = c->csize = - x->csize + CHUNK_SIZE(c); - } - break; - } - j = first_set(mask); - lock_bin(j); - c = mal.bins[j].head; - if (c != BIN_TO_CHUNK(j)) { - if (!pretrim(c, n, i, j)) unbin(c, j); - unlock_bin(j); - break; - } - unlock_bin(j); - } - - /* Now patch up in case we over-allocated */ - trim(c, n); - - return CHUNK_TO_MEM(c); -} - -void *__malloc0(size_t n) -{ - void *p = malloc(n); - if (p && !IS_MMAPPED(MEM_TO_CHUNK(p))) { - size_t *z; - n = (n + sizeof *z - 1)/sizeof *z; - for (z=p; n; n--, z++) if (*z) *z=0; - } - return p; -} - -void *realloc(void *p, size_t n) -{ - struct chunk *self, *next; - size_t n0, n1; - void *new; - - if (!p) return malloc(n); - - if (adjust_size(&n) < 0) return 0; - - self = MEM_TO_CHUNK(p); - n1 = n0 = CHUNK_SIZE(self); - - if (IS_MMAPPED(self)) { - size_t extra = self->psize; - char *base = (char *)self - extra; - size_t oldlen = n0 + extra; - size_t newlen = n + extra; - /* Crash on realloc of freed chunk */ - if (extra & 1) a_crash(); - if (newlen < PAGE_SIZE && (new = malloc(n))) { - memcpy(new, p, n-OVERHEAD); - free(p); - return new; - } - newlen = (newlen + PAGE_SIZE-1) & -PAGE_SIZE; - if (oldlen == newlen) return p; - base = __mremap(base, oldlen, newlen, MREMAP_MAYMOVE); - if (base == (void *)-1) - goto copy_realloc; - self = (void *)(base + extra); - self->csize = newlen - extra; - return CHUNK_TO_MEM(self); - } - - next = NEXT_CHUNK(self); - - /* Crash on corrupted footer (likely from buffer overflow) */ - if (next->psize != self->csize) a_crash(); - - /* Merge adjacent chunks if we need more space. This is not - * a waste of time even if we fail to get enough space, because our - * subsequent call to free would otherwise have to do the merge. */ - if (n > n1 && alloc_fwd(next)) { - n1 += CHUNK_SIZE(next); - next = NEXT_CHUNK(next); - } - /* FIXME: find what's wrong here and reenable it..? */ - if (0 && n > n1 && alloc_rev(self)) { - self = PREV_CHUNK(self); - n1 += CHUNK_SIZE(self); - } - self->csize = n1 | C_INUSE; - next->psize = n1 | C_INUSE; - - /* If we got enough space, split off the excess and return */ - if (n <= n1) { - //memmove(CHUNK_TO_MEM(self), p, n0-OVERHEAD); - trim(self, n); - return CHUNK_TO_MEM(self); - } - -copy_realloc: - /* As a last resort, allocate a new chunk and copy to it. */ - new = malloc(n-OVERHEAD); - if (!new) return 0; - memcpy(new, p, n0-OVERHEAD); - free(CHUNK_TO_MEM(self)); - return new; -} - -void free(void *p) -{ - struct chunk *self = MEM_TO_CHUNK(p); - struct chunk *next; - size_t final_size, new_size, size; - int reclaim=0; - int i; - - if (!p) return; - - if (IS_MMAPPED(self)) { - size_t extra = self->psize; - char *base = (char *)self - extra; - size_t len = CHUNK_SIZE(self) + extra; - /* Crash on double free */ - if (extra & 1) a_crash(); - __munmap(base, len); - return; - } - - final_size = new_size = CHUNK_SIZE(self); - next = NEXT_CHUNK(self); - - /* Crash on corrupted footer (likely from buffer overflow) */ - if (next->psize != self->csize) a_crash(); - - for (;;) { - if (self->psize & next->csize & C_INUSE) { - self->csize = final_size | C_INUSE; - next->psize = final_size | C_INUSE; - i = bin_index(final_size); - lock_bin(i); - lock(mal.free_lock); - if (self->psize & next->csize & C_INUSE) - break; - unlock(mal.free_lock); - unlock_bin(i); - } - - if (alloc_rev(self)) { - self = PREV_CHUNK(self); - size = CHUNK_SIZE(self); - final_size += size; - if (new_size+size > RECLAIM && (new_size+size^size) > size) - reclaim = 1; - } - - if (alloc_fwd(next)) { - size = CHUNK_SIZE(next); - final_size += size; - if (new_size+size > RECLAIM && (new_size+size^size) > size) - reclaim = 1; - next = NEXT_CHUNK(next); - } - } - - if (!(mal.binmap & 1ULL<csize = final_size; - next->psize = final_size; - unlock(mal.free_lock); - - self->next = BIN_TO_CHUNK(i); - self->prev = mal.bins[i].tail; - self->next->prev = self; - self->prev->next = self; - - /* Replace middle of large chunks with fresh zero pages */ - if (reclaim) { - uintptr_t a = (uintptr_t)self + SIZE_ALIGN+PAGE_SIZE-1 & -PAGE_SIZE; - uintptr_t b = (uintptr_t)next - SIZE_ALIGN & -PAGE_SIZE; -#if 1 - __madvise((void *)a, b-a, MADV_DONTNEED); -#else - __mmap((void *)a, b-a, PROT_READ|PROT_WRITE, - MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED, -1, 0); -#endif - } - - unlock_bin(i); -} diff --git a/tree-sitter-c/examples/parser.c b/tree-sitter-c/examples/parser.c deleted file mode 100644 index 2bb8638..0000000 --- a/tree-sitter-c/examples/parser.c +++ /dev/null @@ -1,1283 +0,0 @@ -#include "runtime/parser.h" -#include -#include -#include -#include -#include "tree_sitter/runtime.h" -#include "runtime/tree.h" -#include "runtime/lexer.h" -#include "runtime/length.h" -#include "runtime/array.h" -#include "runtime/language.h" -#include "runtime/alloc.h" -#include "runtime/reduce_action.h" -#include "runtime/error_costs.h" - -#define LOG(...) \ - if (self->lexer.logger.log) { \ - snprintf(self->lexer.debug_buffer, TS_DEBUG_BUFFER_SIZE, __VA_ARGS__); \ - self->lexer.logger.log(self->lexer.logger.payload, TSLogTypeParse, \ - self->lexer.debug_buffer); \ - } \ - if (self->print_debugging_graphs) { \ - fprintf(stderr, "graph {\nlabel=\""); \ - fprintf(stderr, __VA_ARGS__); \ - fprintf(stderr, "\"\n}\n\n"); \ - } - -#define LOG_STACK() \ - if (self->print_debugging_graphs) { \ - ts_stack_print_dot_graph(self->stack, self->language->symbol_names, \ - stderr); \ - fputs("\n\n", stderr); \ - } - -#define LOG_TREE() \ - if (self->print_debugging_graphs) { \ - ts_tree_print_dot_graph(self->finished_tree, self->language, stderr); \ - fputs("\n", stderr); \ - } - -#define SYM_NAME(symbol) ts_language_symbol_name(self->language, symbol) - -typedef struct { - Parser *parser; - TSSymbol lookahead_symbol; - TreeArray *trees_above_error; - uint32_t tree_count_above_error; - bool found_repair; - ReduceAction best_repair; - TSStateId best_repair_next_state; - uint32_t best_repair_skip_count; -} ErrorRepairSession; - -typedef struct { - Parser *parser; - TSSymbol lookahead_symbol; -} SkipPrecedingTreesSession; - -static void parser__push(Parser *self, StackVersion version, Tree *tree, - TSStateId state) { - ts_stack_push(self->stack, version, tree, false, state); - ts_tree_release(tree); -} - -static bool parser__breakdown_top_of_stack(Parser *self, StackVersion version) { - bool did_break_down = false; - bool pending = false; - - do { - StackPopResult pop = ts_stack_pop_pending(self->stack, version); - if (!pop.slices.size) - break; - - did_break_down = true; - pending = false; - for (uint32_t i = 0; i < pop.slices.size; i++) { - StackSlice slice = pop.slices.contents[i]; - TSStateId state = ts_stack_top_state(self->stack, slice.version); - Tree *parent = *array_front(&slice.trees); - - for (uint32_t j = 0; j < parent->child_count; j++) { - Tree *child = parent->children[j]; - pending = child->child_count > 0; - - if (child->symbol == ts_builtin_sym_error) { - state = ERROR_STATE; - } else if (!child->extra) { - state = ts_language_next_state(self->language, state, child->symbol); - } - - ts_stack_push(self->stack, slice.version, child, pending, state); - } - - for (uint32_t j = 1; j < slice.trees.size; j++) { - Tree *tree = slice.trees.contents[j]; - parser__push(self, slice.version, tree, state); - } - - LOG("breakdown_top_of_stack tree:%s", SYM_NAME(parent->symbol)); - LOG_STACK(); - - ts_stack_decrease_push_count(self->stack, slice.version, - parent->child_count + 1); - ts_tree_release(parent); - array_delete(&slice.trees); - } - } while (pending); - - return did_break_down; -} - -static bool parser__breakdown_lookahead(Parser *self, Tree **lookahead, - TSStateId state, - ReusableNode *reusable_node) { - bool result = false; - while (reusable_node->tree->child_count > 0 && - (self->is_split || reusable_node->tree->parse_state != state || - reusable_node->tree->fragile_left || - reusable_node->tree->fragile_right)) { - LOG("state_mismatch sym:%s", SYM_NAME(reusable_node->tree->symbol)); - reusable_node_breakdown(reusable_node); - result = true; - } - - if (result) { - ts_tree_release(*lookahead); - ts_tree_retain(*lookahead = reusable_node->tree); - } - - return result; -} - -static inline bool ts_lex_mode_eq(TSLexMode self, TSLexMode other) { - return self.lex_state == other.lex_state && - self.external_lex_state == other.external_lex_state; -} - -static bool parser__can_reuse(Parser *self, TSStateId state, Tree *tree, - TableEntry *table_entry) { - TSLexMode current_lex_mode = self->language->lex_modes[state]; - if (ts_lex_mode_eq(tree->first_leaf.lex_mode, current_lex_mode)) - return true; - if (current_lex_mode.external_lex_state != 0) - return false; - if (tree->size.bytes == 0) - return false; - if (!table_entry->is_reusable) - return false; - if (!table_entry->depends_on_lookahead) - return true; - return tree->child_count > 1 && tree->error_cost == 0; -} - -typedef int CondenseResult; -static int CondenseResultMadeChange = 1; -static int CondenseResultAllVersionsHadError = 2; - -static CondenseResult parser__condense_stack(Parser *self) { - CondenseResult result = 0; - bool has_version_without_errors = false; - - for (StackVersion i = 0; i < ts_stack_version_count(self->stack); i++) { - if (ts_stack_is_halted(self->stack, i)) { - ts_stack_remove_version(self->stack, i); - result |= CondenseResultMadeChange; - i--; - continue; - } - - ErrorStatus error_status = ts_stack_error_status(self->stack, i); - if (error_status.count == 0) has_version_without_errors = true; - - for (StackVersion j = 0; j < i; j++) { - if (ts_stack_merge(self->stack, j, i)) { - result |= CondenseResultMadeChange; - i--; - break; - } - - switch (error_status_compare(error_status, - ts_stack_error_status(self->stack, j))) { - case -1: - ts_stack_remove_version(self->stack, j); - result |= CondenseResultMadeChange; - i--; - j--; - break; - case 1: - ts_stack_remove_version(self->stack, i); - result |= CondenseResultMadeChange; - i--; - break; - } - } - } - - if (!has_version_without_errors && ts_stack_version_count(self->stack) > 0) { - result |= CondenseResultAllVersionsHadError; - } - - return result; -} - -static void parser__restore_external_scanner(Parser *self, StackVersion version) { - const TSExternalTokenState *state = ts_stack_external_token_state(self->stack, version); - if (self->lexer.last_external_token_state != state) { - LOG("restore_external_scanner"); - self->lexer.last_external_token_state = state; - if (state) { - self->language->external_scanner.deserialize( - self->external_scanner_payload, - *state - ); - } else { - self->language->external_scanner.reset(self->external_scanner_payload); - } - } -} - -static Tree *parser__lex(Parser *self, StackVersion version) { - TSStateId parse_state = ts_stack_top_state(self->stack, version); - Length start_position = ts_stack_top_position(self->stack, version); - TSLexMode lex_mode = self->language->lex_modes[parse_state]; - const bool *valid_external_tokens = ts_language_enabled_external_tokens( - self->language, - lex_mode.external_lex_state - ); - - bool found_external_token = false; - bool found_error = false; - bool skipped_error = false; - int32_t first_error_character = 0; - Length error_start_position, error_end_position; - ts_lexer_reset(&self->lexer, start_position); - - for (;;) { - Length current_position = self->lexer.current_position; - - if (valid_external_tokens) { - LOG("lex_external state:%d, row:%u, column:%u", lex_mode.external_lex_state, - current_position.extent.row, current_position.extent.column); - parser__restore_external_scanner(self, version); - ts_lexer_start(&self->lexer); - if (self->language->external_scanner.scan(self->external_scanner_payload, - &self->lexer.data, valid_external_tokens)) { - if (length_has_unknown_chars(self->lexer.token_end_position)) { - self->lexer.token_end_position = self->lexer.current_position; - } - if (lex_mode.lex_state != 0 || - self->lexer.token_end_position.bytes > current_position.bytes) { - found_external_token = true; - break; - } - } - ts_lexer_reset(&self->lexer, current_position); - } - - LOG("lex_internal state:%d, row:%u, column:%u", lex_mode.lex_state, - current_position.extent.row, current_position.extent.column); - ts_lexer_start(&self->lexer); - if (self->language->lex_fn(&self->lexer.data, lex_mode.lex_state)) { - if (length_has_unknown_chars(self->lexer.token_end_position)) { - self->lexer.token_end_position = self->lexer.current_position; - } - break; - } - - if (!found_error) { - LOG("retry_in_error_mode"); - found_error = true; - lex_mode = self->language->lex_modes[ERROR_STATE]; - valid_external_tokens = ts_language_enabled_external_tokens( - self->language, - lex_mode.external_lex_state - ); - ts_lexer_reset(&self->lexer, start_position); - continue; - } - - if (!skipped_error) { - LOG("skip_unrecognized_character"); - skipped_error = true; - error_start_position = self->lexer.token_start_position; - error_end_position = self->lexer.token_start_position; - first_error_character = self->lexer.data.lookahead; - } - - if (self->lexer.current_position.bytes == error_end_position.bytes) { - if (self->lexer.data.lookahead == 0) { - self->lexer.data.result_symbol = ts_builtin_sym_error; - break; - } - self->lexer.data.advance(&self->lexer, false); - } - - error_end_position = self->lexer.current_position; - } - - Tree *result; - if (skipped_error) { - Length padding = length_sub(error_start_position, start_position); - Length size = length_sub(error_end_position, error_start_position); - result = ts_tree_make_error(size, padding, first_error_character); - } else { - TSSymbol symbol = self->lexer.data.result_symbol; - if (found_external_token) { - symbol = self->language->external_scanner.symbol_map[symbol]; - } - - Length padding = length_sub(self->lexer.token_start_position, start_position); - Length size = length_sub(self->lexer.token_end_position, self->lexer.token_start_position); - TSSymbolMetadata metadata = ts_language_symbol_metadata(self->language, symbol); - result = ts_tree_make_leaf(symbol, padding, size, metadata); - - if (found_external_token) { - result->has_external_tokens = true; - result->has_external_token_state = true; - memset(result->external_token_state, 0, sizeof(TSExternalTokenState)); - self->language->external_scanner.serialize(self->external_scanner_payload, result->external_token_state); - self->lexer.last_external_token_state = &result->external_token_state; - } - } - - result->bytes_scanned = self->lexer.current_position.bytes - start_position.bytes + 1; - result->parse_state = parse_state; - result->first_leaf.lex_mode = lex_mode; - - LOG("lexed_lookahead sym:%s, size:%u", SYM_NAME(result->symbol), result->size.bytes); - return result; -} - -static void parser__clear_cached_token(Parser *self) { - ts_tree_release(self->cached_token); - self->cached_token = NULL; -} - -static Tree *parser__get_lookahead(Parser *self, StackVersion version, - ReusableNode *reusable_node, - bool *is_fresh) { - Length position = ts_stack_top_position(self->stack, version); - - while (reusable_node->tree) { - if (reusable_node->byte_index > position.bytes) { - LOG("before_reusable_node sym:%s", SYM_NAME(reusable_node->tree->symbol)); - break; - } - - if (reusable_node->byte_index < position.bytes) { - LOG("past_reusable sym:%s", SYM_NAME(reusable_node->tree->symbol)); - reusable_node_pop(reusable_node); - continue; - } - - if (reusable_node->tree->has_changes) { - LOG("cant_reuse_changed tree:%s, size:%u", - SYM_NAME(reusable_node->tree->symbol), - reusable_node->tree->size.bytes); - if (!reusable_node_breakdown(reusable_node)) { - reusable_node_pop(reusable_node); - parser__breakdown_top_of_stack(self, version); - } - continue; - } - - if (reusable_node->tree->symbol == ts_builtin_sym_error) { - LOG("cant_reuse_error tree:%s, size:%u", - SYM_NAME(reusable_node->tree->symbol), - reusable_node->tree->size.bytes); - if (!reusable_node_breakdown(reusable_node)) { - reusable_node_pop(reusable_node); - parser__breakdown_top_of_stack(self, version); - } - continue; - } - - if (!ts_external_token_state_eq( - reusable_node->preceding_external_token_state, - ts_stack_external_token_state(self->stack, version))) { - LOG("cant_reuse_external_tokens tree:%s, size:%u", - SYM_NAME(reusable_node->tree->symbol), - reusable_node->tree->size.bytes); - if (!reusable_node_breakdown(reusable_node)) { - reusable_node_pop(reusable_node); - parser__breakdown_top_of_stack(self, version); - } - continue; - } - - Tree *result = reusable_node->tree; - ts_tree_retain(result); - return result; - } - - if (self->cached_token && position.bytes == self->cached_token_byte_index) { - ts_tree_retain(self->cached_token); - return self->cached_token; - } - - *is_fresh = true; - return parser__lex(self, version); -} - -static bool parser__select_tree(Parser *self, Tree *left, Tree *right) { - if (!left) - return true; - if (!right) - return false; - if (right->error_cost < left->error_cost) { - LOG("select_smaller_error symbol:%s, over_symbol:%s", - SYM_NAME(right->symbol), SYM_NAME(left->symbol)); - return true; - } - if (left->error_cost < right->error_cost) { - LOG("select_smaller_error symbol:%s, over_symbol:%s", - SYM_NAME(left->symbol), SYM_NAME(right->symbol)); - return false; - } - - int comparison = ts_tree_compare(left, right); - switch (comparison) { - case -1: - LOG("select_earlier symbol:%s, over_symbol:%s", SYM_NAME(left->symbol), - SYM_NAME(right->symbol)); - return false; - break; - case 1: - LOG("select_earlier symbol:%s, over_symbol:%s", SYM_NAME(right->symbol), - SYM_NAME(left->symbol)); - return true; - default: - LOG("select_existing symbol:%s, over_symbol:%s", SYM_NAME(left->symbol), - SYM_NAME(right->symbol)); - return false; - } -} - -static bool parser__better_version_exists(Parser *self, StackVersion version, - ErrorStatus my_error_status) { - if (self->finished_tree && - self->finished_tree->error_cost <= my_error_status.cost) - return true; - - for (StackVersion i = 0, n = ts_stack_version_count(self->stack); i < n; i++) { - if (i == version || ts_stack_is_halted(self->stack, i)) - continue; - - switch (error_status_compare(my_error_status, - ts_stack_error_status(self->stack, i))) { - case -1: - LOG("halt_other version:%u", i); - ts_stack_halt(self->stack, i); - break; - case 1: - return true; - } - } - - return false; -} - -static void parser__shift(Parser *self, StackVersion version, TSStateId state, - Tree *lookahead, bool extra) { - if (extra != lookahead->extra) { - TSSymbolMetadata metadata = - ts_language_symbol_metadata(self->language, lookahead->symbol); - if (metadata.structural && ts_stack_version_count(self->stack) > 1) { - lookahead = ts_tree_make_copy(lookahead); - } else { - ts_tree_retain(lookahead); - } - lookahead->extra = extra; - } else { - ts_tree_retain(lookahead); - } - - bool is_pending = lookahead->child_count > 0; - ts_stack_push(self->stack, version, lookahead, is_pending, state); - if (lookahead->has_external_token_state) { - ts_stack_set_external_token_state( - self->stack, version, ts_tree_last_external_token_state(lookahead)); - } - ts_tree_release(lookahead); -} - -static bool parser__switch_children(Parser *self, Tree *tree, - Tree **children, uint32_t count) { - self->scratch_tree.symbol = tree->symbol; - self->scratch_tree.child_count = 0; - ts_tree_set_children(&self->scratch_tree, count, children); - if (parser__select_tree(self, tree, &self->scratch_tree)) { - tree->size = self->scratch_tree.size; - tree->padding = self->scratch_tree.padding; - tree->error_cost = self->scratch_tree.error_cost; - tree->children = self->scratch_tree.children; - tree->child_count = self->scratch_tree.child_count; - tree->named_child_count = self->scratch_tree.named_child_count; - tree->visible_child_count = self->scratch_tree.visible_child_count; - return true; - } else { - return false; - } -} - -static StackPopResult parser__reduce(Parser *self, StackVersion version, - TSSymbol symbol, unsigned count, - bool fragile, bool allow_skipping) { - uint32_t initial_version_count = ts_stack_version_count(self->stack); - - StackPopResult pop = ts_stack_pop_count(self->stack, version, count); - if (pop.stopped_at_error) - return pop; - - const TSLanguage *language = self->language; - TSSymbolMetadata metadata = ts_language_symbol_metadata(language, symbol); - - for (uint32_t i = 0; i < pop.slices.size; i++) { - StackSlice slice = pop.slices.contents[i]; - - // Extra tokens on top of the stack should not be included in this new parent - // node. They will be re-pushed onto the stack after the parent node is - // created and pushed. - uint32_t child_count = slice.trees.size; - while (child_count > 0 && slice.trees.contents[child_count - 1]->extra) - child_count--; - - Tree *parent = ts_tree_make_node(symbol, child_count, slice.trees.contents, metadata); - - // This pop operation may have caused multiple stack versions to collapse - // into one, because they all diverged from a common state. In that case, - // choose one of the arrays of trees to be the parent node's children, and - // delete the rest of the tree arrays. - while (i + 1 < pop.slices.size) { - StackSlice next_slice = pop.slices.contents[i + 1]; - if (next_slice.version != slice.version) - break; - i++; - - uint32_t child_count = next_slice.trees.size; - while (child_count > 0 && next_slice.trees.contents[child_count - 1]->extra) - child_count--; - - if (parser__switch_children(self, parent, next_slice.trees.contents, child_count)) { - ts_tree_array_delete(&slice.trees); - slice = next_slice; - } else { - ts_tree_array_delete(&next_slice.trees); - } - } - - TSStateId state = ts_stack_top_state(self->stack, slice.version); - TSStateId next_state = ts_language_next_state(language, state, symbol); - if (fragile || self->is_split || pop.slices.size > 1 || initial_version_count > 1) { - parent->fragile_left = true; - parent->fragile_right = true; - parent->parse_state = TS_TREE_STATE_NONE; - } else { - parent->parse_state = state; - } - - // If this pop operation terminated at the end of an error region, then - // create two stack versions: one in which the parent node is interpreted - // normally, and one in which the parent node is skipped. - if (state == ERROR_STATE && allow_skipping && child_count > 1) { - StackVersion other_version = ts_stack_copy_version(self->stack, slice.version); - - ts_stack_push(self->stack, other_version, parent, false, ERROR_STATE); - for (uint32_t j = parent->child_count; j < slice.trees.size; j++) { - Tree *tree = slice.trees.contents[j]; - ts_stack_push(self->stack, other_version, tree, false, ERROR_STATE); - } - - ErrorStatus error_status = ts_stack_error_status(self->stack, other_version); - if (parser__better_version_exists(self, version, error_status)) - ts_stack_remove_version(self->stack, other_version); - } - - // Push the parent node onto the stack, along with any extra tokens that - // were previously on top of the stack. - parser__push(self, slice.version, parent, next_state); - for (uint32_t j = parent->child_count; j < slice.trees.size; j++) { - Tree *tree = slice.trees.contents[j]; - parser__push(self, slice.version, tree, next_state); - } - } - - for (StackVersion i = initial_version_count; i < ts_stack_version_count(self->stack); i++) { - for (StackVersion j = initial_version_count; j < i; j++) { - if (ts_stack_merge(self->stack, j, i)) { - i--; - break; - } - } - } - - return pop; -} - -static inline const TSParseAction *parser__reductions_after_sequence( - Parser *self, TSStateId start_state, const TreeArray *trees_below, - uint32_t tree_count_below, const TreeArray *trees_above, - TSSymbol lookahead_symbol, uint32_t *count) { - TSStateId state = start_state; - uint32_t child_count = 0; - *count = 0; - - for (uint32_t i = 0; i < trees_below->size; i++) { - if (child_count == tree_count_below) - break; - Tree *tree = trees_below->contents[trees_below->size - 1 - i]; - if (tree->extra) continue; - TSStateId next_state = ts_language_next_state(self->language, state, tree->symbol); - if (next_state == ERROR_STATE) - return NULL; - if (next_state != state) { - child_count++; - state = next_state; - } - } - - for (uint32_t i = 0; i < trees_above->size; i++) { - Tree *tree = trees_above->contents[i]; - if (tree->extra) continue; - TSStateId next_state = ts_language_next_state(self->language, state, tree->symbol); - if (next_state == ERROR_STATE) - return NULL; - if (next_state != state) { - child_count++; - state = next_state; - } - } - - const TSParseAction *actions = - ts_language_actions(self->language, state, lookahead_symbol, count); - - if (*count > 0 && actions[*count - 1].type != TSParseActionTypeReduce) { - (*count)--; - } - - while (*count > 0 && actions[0].params.child_count < child_count) { - actions++; - (*count)--; - } - - while (*count > 0 && actions[*count - 1].params.child_count > child_count) { - (*count)--; - } - - return actions; -} - -static StackIterateAction parser__repair_error_callback( - void *payload, TSStateId state, TreeArray *trees, uint32_t tree_count, - bool is_done, bool is_pending) { - - ErrorRepairSession *session = (ErrorRepairSession *)payload; - Parser *self = session->parser; - TSSymbol lookahead_symbol = session->lookahead_symbol; - ReduceActionSet *repairs = &self->reduce_actions; - TreeArray *trees_above_error = session->trees_above_error; - uint32_t tree_count_above_error = session->tree_count_above_error; - - StackIterateAction result = StackIterateNone; - - uint32_t last_repair_count = -1; - uint32_t repair_reduction_count = -1; - const TSParseAction *repair_reductions = NULL; - - for (uint32_t i = 0; i < repairs->size; i++) { - ReduceAction *repair = &repairs->contents[i]; - uint32_t count_needed_below_error = repair->count - tree_count_above_error; - if (count_needed_below_error > tree_count) - break; - - uint32_t skip_count = tree_count - count_needed_below_error; - if (session->found_repair && skip_count >= session->best_repair_skip_count) { - array_erase(repairs, i--); - continue; - } - - TSStateId state_after_repair = ts_language_next_state(self->language, state, repair->symbol); - if (state == ERROR_STATE || state_after_repair == ERROR_STATE) - continue; - - uint32_t action_count; - ts_language_actions(self->language, state_after_repair, lookahead_symbol, &action_count); - if (action_count == 0) - continue; - - if (count_needed_below_error != last_repair_count) { - last_repair_count = count_needed_below_error; - repair_reductions = parser__reductions_after_sequence( - self, state, trees, count_needed_below_error, trees_above_error, - lookahead_symbol, &repair_reduction_count); - } - - for (uint32_t j = 0; j < repair_reduction_count; j++) { - if (repair_reductions[j].params.symbol == repair->symbol) { - result |= StackIteratePop; - session->found_repair = true; - session->best_repair = *repair; - session->best_repair_skip_count = skip_count; - session->best_repair_next_state = state_after_repair; - array_erase(repairs, i--); - break; - } - } - } - - if (repairs->size == 0) - result |= StackIterateStop; - - return result; -} - -static bool parser__repair_error(Parser *self, StackSlice slice, - TSSymbol lookahead_symbol, TableEntry entry) { - LOG("repair_error"); - ErrorRepairSession session = { - .parser = self, - .lookahead_symbol = lookahead_symbol, - .found_repair = false, - .trees_above_error = &slice.trees, - .tree_count_above_error = ts_tree_array_essential_count(&slice.trees), - }; - - array_clear(&self->reduce_actions); - for (uint32_t i = 0; i < entry.action_count; i++) { - if (entry.actions[i].type == TSParseActionTypeReduce) { - TSSymbol symbol = entry.actions[i].params.symbol; - uint32_t child_count = entry.actions[i].params.child_count; - if ((child_count > session.tree_count_above_error) || - (child_count == session.tree_count_above_error && - !ts_language_symbol_metadata(self->language, symbol).visible)) - array_push(&self->reduce_actions, ((ReduceAction){ - .symbol = symbol, - .count = child_count - })); - } - } - - StackPopResult pop = ts_stack_iterate( - self->stack, slice.version, parser__repair_error_callback, &session); - - if (!session.found_repair) { - LOG("no_repair_found"); - ts_stack_remove_version(self->stack, slice.version); - ts_tree_array_delete(&slice.trees); - return false; - } - - ReduceAction repair = session.best_repair; - TSStateId next_state = session.best_repair_next_state; - uint32_t skip_count = session.best_repair_skip_count; - TSSymbol symbol = repair.symbol; - - StackSlice new_slice = array_pop(&pop.slices); - TreeArray children = new_slice.trees; - ts_stack_renumber_version(self->stack, new_slice.version, slice.version); - - for (uint32_t i = pop.slices.size - 1; i + 1 > 0; i--) { - StackSlice other_slice = pop.slices.contents[i]; - ts_tree_array_delete(&other_slice.trees); - if (other_slice.version != pop.slices.contents[i + 1].version) - ts_stack_remove_version(self->stack, other_slice.version); - } - - TreeArray skipped_children = ts_tree_array_remove_last_n(&children, skip_count); - TreeArray trailing_extras = ts_tree_array_remove_trailing_extras(&skipped_children); - Tree *error = ts_tree_make_error_node(&skipped_children); - array_push(&children, error); - array_push_all(&children, &trailing_extras); - trailing_extras.size = 0; - array_delete(&trailing_extras); - - for (uint32_t i = 0; i < slice.trees.size; i++) - array_push(&children, slice.trees.contents[i]); - array_delete(&slice.trees); - - Tree *parent = - ts_tree_make_node(symbol, children.size, children.contents, - ts_language_symbol_metadata(self->language, symbol)); - parser__push(self, slice.version, parent, next_state); - ts_stack_decrease_push_count(self->stack, slice.version, error->child_count); - - ErrorStatus error_status = ts_stack_error_status(self->stack, slice.version); - if (parser__better_version_exists(self, slice.version, error_status)) { - LOG("no_better_repair_found"); - ts_stack_halt(self->stack, slice.version); - return false; - } else { - LOG("repair_found sym:%s, child_count:%u, cost:%u", SYM_NAME(symbol), - repair.count, parent->error_cost); - return true; - } -} - -static void parser__start(Parser *self, TSInput input, Tree *previous_tree) { - if (previous_tree) { - LOG("parse_after_edit"); - } else { - LOG("new_parse"); - } - - if (self->language->external_scanner.reset) { - self->language->external_scanner.reset(self->external_scanner_payload); - } - - ts_lexer_set_input(&self->lexer, input); - ts_stack_clear(self->stack); - self->reusable_node = reusable_node_new(previous_tree); - self->cached_token = NULL; - self->finished_tree = NULL; -} - -static void parser__accept(Parser *self, StackVersion version, - Tree *lookahead) { - lookahead->extra = true; - assert(lookahead->symbol == ts_builtin_sym_end); - ts_stack_push(self->stack, version, lookahead, false, 1); - StackPopResult pop = ts_stack_pop_all(self->stack, version); - - for (uint32_t i = 0; i < pop.slices.size; i++) { - StackSlice slice = pop.slices.contents[i]; - TreeArray trees = slice.trees; - - Tree *root = NULL; - if (trees.size == 1) { - root = trees.contents[0]; - array_delete(&trees); - } else { - for (uint32_t j = trees.size - 1; j + 1 > 0; j--) { - Tree *child = trees.contents[j]; - if (!child->extra) { - root = ts_tree_make_copy(child); - root->child_count = 0; - for (uint32_t k = 0; k < child->child_count; k++) - ts_tree_retain(child->children[k]); - array_splice(&trees, j, 1, child->child_count, child->children); - ts_tree_set_children(root, trees.size, trees.contents); - ts_tree_release(child); - break; - } - } - } - - if (parser__select_tree(self, self->finished_tree, root)) { - ts_tree_release(self->finished_tree); - assert(root->ref_count > 0); - self->finished_tree = root; - } else { - ts_tree_release(root); - } - } - - ts_stack_remove_version(self->stack, pop.slices.contents[0].version); - ts_stack_halt(self->stack, version); -} - -static bool parser__do_potential_reductions(Parser *self, StackVersion version) { - bool has_shift_action = false; - TSStateId state = ts_stack_top_state(self->stack, version); - uint32_t previous_version_count = ts_stack_version_count(self->stack); - - array_clear(&self->reduce_actions); - for (TSSymbol symbol = 0; symbol < self->language->token_count; symbol++) { - TableEntry entry; - ts_language_table_entry(self->language, state, symbol, &entry); - for (uint32_t i = 0; i < entry.action_count; i++) { - TSParseAction action = entry.actions[i]; - if (action.extra) - continue; - switch (action.type) { - case TSParseActionTypeShift: - case TSParseActionTypeRecover: - has_shift_action = true; - break; - case TSParseActionTypeReduce: - if (action.params.child_count > 0) - ts_reduce_action_set_add(&self->reduce_actions, (ReduceAction){ - .symbol = action.params.symbol, - .count = action.params.child_count, - }); - default: - break; - } - } - } - - bool did_reduce = false; - for (uint32_t i = 0; i < self->reduce_actions.size; i++) { - ReduceAction action = self->reduce_actions.contents[i]; - StackPopResult reduction = - parser__reduce(self, version, action.symbol, action.count, true, false); - if (reduction.stopped_at_error) { - ts_tree_array_delete(&reduction.slices.contents[0].trees); - ts_stack_remove_version(self->stack, reduction.slices.contents[0].version); - continue; - } else { - did_reduce = true; - } - } - - if (did_reduce) { - if (has_shift_action) { - return true; - } else { - ts_stack_renumber_version(self->stack, previous_version_count, version); - return false; - } - } else { - return true; - } -} - -static StackIterateAction parser__skip_preceding_trees_callback( - void *payload, TSStateId state, TreeArray *trees, uint32_t tree_count, - bool is_done, bool is_pending) { - if (tree_count > 0 && state != ERROR_STATE) { - uint32_t bytes_skipped = 0; - for (uint32_t i = 0; i < trees->size; i++) { - bytes_skipped += ts_tree_total_bytes(trees->contents[i]); - } - if (bytes_skipped == 0) return StackIterateNone; - SkipPrecedingTreesSession *session = payload; - Parser *self = session->parser; - TSSymbol lookahead_symbol = session->lookahead_symbol; - uint32_t action_count; - const TSParseAction *actions = - ts_language_actions(self->language, state, lookahead_symbol, &action_count); - if (action_count > 0 && actions[0].type == TSParseActionTypeReduce) { - return StackIteratePop | StackIterateStop; - } - } - return StackIterateNone; -} - -static bool parser__skip_preceding_trees(Parser *self, StackVersion version, - TSSymbol lookahead_symbol) { - SkipPrecedingTreesSession session = { self, lookahead_symbol }; - StackPopResult pop = ts_stack_iterate( - self->stack, version, parser__skip_preceding_trees_callback, &session); - - StackVersion previous_version = STACK_VERSION_NONE; - for (uint32_t i = 0; i < pop.slices.size; i++) { - StackSlice slice = pop.slices.contents[i]; - if (slice.version == previous_version) { - ts_tree_array_delete(&slice.trees); - continue; - } - - previous_version = slice.version; - Tree *error = ts_tree_make_error_node(&slice.trees); - error->extra = true; - TSStateId state = ts_stack_top_state(self->stack, slice.version); - parser__push(self, slice.version, error, state); - } - - return pop.slices.size > 0; -} - -static void parser__handle_error(Parser *self, StackVersion version, - TSSymbol lookahead_symbol) { - // If there are other stack versions that are clearly better than this one, - // just halt this version. - ErrorStatus error_status = ts_stack_error_status(self->stack, version); - error_status.count++; - if (parser__better_version_exists(self, version, error_status)) { - ts_stack_halt(self->stack, version); - LOG("bail_on_error"); - return; - } - - LOG("handle_error"); - - // If the current lookahead symbol would have been valid in some previous - // state on the stack, create one stack version that repairs the error - // immediately by simply skipping all of the trees that came after that state. - if (parser__skip_preceding_trees(self, version, lookahead_symbol)) { - LOG("skip_preceding_trees"); - LOG_STACK(); - } - - // Perform any reductions that could have happened in this state, regardless - // of the lookahead. - uint32_t previous_version_count = ts_stack_version_count(self->stack); - for (StackVersion v = version; v < ts_stack_version_count(self->stack);) { - if (parser__do_potential_reductions(self, v)) { - if (v == version) { - v = previous_version_count; - } else { - v++; - } - } - } - - // Push a discontinuity onto the stack. Merge all of the stack versions that - // were created in the previous step. - ts_stack_push(self->stack, version, NULL, false, ERROR_STATE); - while (ts_stack_version_count(self->stack) > previous_version_count) { - ts_stack_push(self->stack, previous_version_count, NULL, false, ERROR_STATE); - assert(ts_stack_merge(self->stack, version, previous_version_count)); - } -} - -static void parser__halt_parse(Parser *self) { - LOG("halting_parse"); - LOG_STACK(); - - ts_lexer_advance_to_end(&self->lexer); - Length remaining_length = length_sub( - self->lexer.current_position, - ts_stack_top_position(self->stack, 0) - ); - - Tree *filler_node = ts_tree_make_error(remaining_length, length_zero(), 0); - filler_node->visible = false; - parser__push(self, 0, filler_node, 0); - - TreeArray children = array_new(); - Tree *root_error = ts_tree_make_error_node(&children); - parser__push(self, 0, root_error, 0); - - TSSymbolMetadata metadata = ts_language_symbol_metadata(self->language, ts_builtin_sym_end); - Tree *eof = ts_tree_make_leaf(ts_builtin_sym_end, length_zero(), length_zero(), metadata); - parser__accept(self, 0, eof); - ts_tree_release(eof); -} - -static void parser__recover(Parser *self, StackVersion version, TSStateId state, - Tree *lookahead) { - if (lookahead->symbol == ts_builtin_sym_end) { - LOG("recover_eof"); - TreeArray children = array_new(); - Tree *parent = ts_tree_make_error_node(&children); - parser__push(self, version, parent, 1); - parser__accept(self, version, lookahead); - } - - LOG("recover state:%u", state); - - StackVersion new_version = ts_stack_copy_version(self->stack, version); - - parser__shift( - self, new_version, ERROR_STATE, lookahead, - ts_language_symbol_metadata(self->language, lookahead->symbol).extra); - ErrorStatus error_status = ts_stack_error_status(self->stack, new_version); - if (parser__better_version_exists(self, version, error_status)) { - ts_stack_remove_version(self->stack, new_version); - LOG("bail_on_recovery"); - } - - parser__shift(self, version, state, lookahead, false); -} - -static void parser__advance(Parser *self, StackVersion version, - ReusableNode *reusable_node) { - bool validated_lookahead = false; - Tree *lookahead = parser__get_lookahead(self, version, reusable_node, &validated_lookahead); - - for (;;) { - TSStateId state = ts_stack_top_state(self->stack, version); - - TableEntry table_entry; - ts_language_table_entry(self->language, state, lookahead->first_leaf.symbol, &table_entry); - - if (!validated_lookahead) { - if (!parser__can_reuse(self, state, lookahead, &table_entry)) { - if (lookahead == reusable_node->tree) { - reusable_node_pop_leaf(reusable_node); - } else { - parser__clear_cached_token(self); - } - - ts_tree_release(lookahead); - lookahead = parser__get_lookahead(self, version, reusable_node, &validated_lookahead); - continue; - } - - validated_lookahead = true; - LOG("reused_lookahead sym:%s, size:%u", SYM_NAME(lookahead->symbol), lookahead->size.bytes); - } - - bool reduction_stopped_at_error = false; - StackVersion last_reduction_version = STACK_VERSION_NONE; - - for (uint32_t i = 0; i < table_entry.action_count; i++) { - TSParseAction action = table_entry.actions[i]; - - switch (action.type) { - case TSParseActionTypeShift: { - bool extra = action.extra; - TSStateId next_state; - - if (action.extra) { - next_state = state; - LOG("shift_extra"); - } else { - next_state = action.params.to_state; - LOG("shift state:%u", next_state); - } - - if (lookahead->child_count > 0) { - if (parser__breakdown_lookahead(self, &lookahead, state, reusable_node)) { - if (!parser__can_reuse(self, state, lookahead, &table_entry)) { - reusable_node_pop(reusable_node); - ts_tree_release(lookahead); - lookahead = parser__get_lookahead(self, version, reusable_node, &validated_lookahead); - } - } - - next_state = ts_language_next_state(self->language, state, lookahead->symbol); - } - - parser__shift(self, version, next_state, lookahead, extra); - - if (lookahead == reusable_node->tree) - reusable_node_pop(reusable_node); - - ts_tree_release(lookahead); - return; - } - - case TSParseActionTypeReduce: { - if (reduction_stopped_at_error) - continue; - - unsigned child_count = action.params.child_count; - TSSymbol symbol = action.params.symbol; - bool fragile = action.fragile; - - LOG("reduce sym:%s, child_count:%u", SYM_NAME(symbol), child_count); - - StackPopResult reduction = - parser__reduce(self, version, symbol, child_count, fragile, true); - StackSlice slice = *array_front(&reduction.slices); - if (reduction.stopped_at_error) { - reduction_stopped_at_error = true; - if (!parser__repair_error(self, slice, lookahead->first_leaf.symbol, - table_entry)) - break; - } - - last_reduction_version = slice.version; - break; - } - - case TSParseActionTypeAccept: { - if (ts_stack_error_status(self->stack, version).count > 0) - continue; - - LOG("accept"); - parser__accept(self, version, lookahead); - ts_tree_release(lookahead); - return; - } - - case TSParseActionTypeRecover: { - while (lookahead->child_count > 0) { - reusable_node_breakdown(reusable_node); - ts_tree_release(lookahead); - lookahead = reusable_node->tree; - ts_tree_retain(lookahead); - } - - parser__recover(self, version, action.params.to_state, lookahead); - if (lookahead == reusable_node->tree) - reusable_node_pop(reusable_node); - ts_tree_release(lookahead); - return; - } - } - } - - if (last_reduction_version != STACK_VERSION_NONE) { - ts_stack_renumber_version(self->stack, last_reduction_version, version); - LOG_STACK(); - continue; - } - - if (parser__breakdown_top_of_stack(self, version)) { - continue; - } - - if (state == ERROR_STATE) { - parser__push(self, version, lookahead, ERROR_STATE); - return; - } - - parser__handle_error(self, version, lookahead->first_leaf.symbol); - - if (ts_stack_is_halted(self->stack, version)) { - ts_tree_release(lookahead); - return; - } - } -} - -bool parser_init(Parser *self) { - ts_lexer_init(&self->lexer); - array_init(&self->reduce_actions); - array_init(&self->tree_path1); - array_init(&self->tree_path2); - array_grow(&self->reduce_actions, 4); - self->stack = ts_stack_new(); - self->finished_tree = NULL; - return true; -} - -void parser_set_language(Parser *self, const TSLanguage *language) { - if (self->external_scanner_payload && self->language->external_scanner.destroy) - self->language->external_scanner.destroy(self->external_scanner_payload); - - if (language && language->external_scanner.create) - self->external_scanner_payload = language->external_scanner.create(); - else - self->external_scanner_payload = NULL; - - self->language = language; -} - -void parser_destroy(Parser *self) { - if (self->stack) - ts_stack_delete(self->stack); - if (self->reduce_actions.contents) - array_delete(&self->reduce_actions); - if (self->tree_path1.contents) - array_delete(&self->tree_path1); - if (self->tree_path2.contents) - array_delete(&self->tree_path2); - parser_set_language(self, NULL); -} - -Tree *parser_parse(Parser *self, TSInput input, Tree *old_tree, bool halt_on_error) { - parser__start(self, input, old_tree); - - StackVersion version = STACK_VERSION_NONE; - uint32_t position = 0, last_position = 0; - ReusableNode reusable_node; - - do { - for (version = 0; version < ts_stack_version_count(self->stack); version++) { - reusable_node = self->reusable_node; - last_position = position; - - while (!ts_stack_is_halted(self->stack, version)) { - position = ts_stack_top_position(self->stack, version).chars; - if (position > last_position || (version > 0 && position == last_position)) - break; - - LOG("process version:%d, version_count:%u, state:%d, row:%u, col:%u", - version, ts_stack_version_count(self->stack), - ts_stack_top_state(self->stack, version), - ts_stack_top_position(self->stack, version).extent.row, - ts_stack_top_position(self->stack, version).extent.column); - - parser__advance(self, version, &reusable_node); - LOG_STACK(); - } - } - - self->reusable_node = reusable_node; - - CondenseResult condense_result = parser__condense_stack(self); - if (halt_on_error && (condense_result & CondenseResultAllVersionsHadError)) { - parser__halt_parse(self); - break; - } - - if (condense_result & CondenseResultMadeChange) { - LOG("condense"); - LOG_STACK(); - } - - self->is_split = (version > 1); - } while (version != 0); - - LOG("done"); - LOG_TREE(); - ts_stack_clear(self->stack); - parser__clear_cached_token(self); - ts_tree_assign_parents(self->finished_tree, &self->tree_path1); - return self->finished_tree; -} diff --git a/tree-sitter-c/grammar.js b/tree-sitter-c/grammar.js deleted file mode 100644 index 73619fc..0000000 --- a/tree-sitter-c/grammar.js +++ /dev/null @@ -1,1082 +0,0 @@ -const PREC = { - PAREN_DECLARATOR: -10, - ASSIGNMENT: -1, - CONDITIONAL: -2, - DEFAULT: 0, - LOGICAL_OR: 1, - LOGICAL_AND: 2, - INCLUSIVE_OR: 3, - EXCLUSIVE_OR: 4, - BITWISE_AND: 5, - EQUAL: 6, - RELATIONAL: 7, - SIZEOF: 8, - SHIFT: 9, - ADD: 10, - MULTIPLY: 11, - CAST: 12, - UNARY: 13, - CALL: 14, - FIELD: 15, - SUBSCRIPT: 16 -}; - -module.exports = grammar({ - name: 'c', - - extras: $ => [ - /\s|\\\r?\n/, - $.comment, - ], - - inline: $ => [ - $._statement, - $._top_level_item, - $._type_identifier, - $._field_identifier, - $._statement_identifier, - $._non_case_statement, - $._assignment_left_expression, - ], - - conflicts: $ => [ - [$._type_specifier, $._declarator], - [$._type_specifier, $._declarator, $.macro_type_specifier], - [$._type_specifier, $._expression], - [$._type_specifier, $._expression, $.macro_type_specifier], - [$._type_specifier, $.macro_type_specifier], - [$.sized_type_specifier], - [$.attributed_statement], - [$._declaration_modifiers, $.attributed_statement], - ], - - word: $ => $.identifier, - - rules: { - translation_unit: $ => repeat($._top_level_item), - - _top_level_item: $ => choice( - $.function_definition, - $.linkage_specification, - $.declaration, - $._statement, - $.attributed_statement, - $.type_definition, - $._empty_declaration, - $.preproc_if, - $.preproc_ifdef, - $.preproc_include, - $.preproc_def, - $.preproc_function_def, - $.preproc_call - ), - - // Preprocesser - - preproc_include: $ => seq( - preprocessor('include'), - field('path', choice( - $.string_literal, - $.system_lib_string, - $.identifier, - alias($.preproc_call_expression, $.call_expression), - )), - '\n' - ), - - preproc_def: $ => seq( - preprocessor('define'), - field('name', $.identifier), - field('value', optional($.preproc_arg)), - '\n' - ), - - preproc_function_def: $ => seq( - preprocessor('define'), - field('name', $.identifier), - field('parameters', $.preproc_params), - field('value', optional($.preproc_arg)), - '\n' - ), - - preproc_params: $ => seq( - token.immediate('('), commaSep(choice($.identifier, '...')), ')' - ), - - preproc_call: $ => seq( - field('directive', $.preproc_directive), - field('argument', optional($.preproc_arg)), - '\n' - ), - - ...preprocIf('', $ => $._top_level_item), - ...preprocIf('_in_field_declaration_list', $ => $._field_declaration_list_item), - - preproc_directive: $ => /#[ \t]*[a-zA-Z]\w*/, - preproc_arg: $ => token(prec(-1, repeat1(/.|\\\r?\n/))), - - _preproc_expression: $ => choice( - $.identifier, - alias($.preproc_call_expression, $.call_expression), - $.number_literal, - $.char_literal, - $.preproc_defined, - alias($.preproc_unary_expression, $.unary_expression), - alias($.preproc_binary_expression, $.binary_expression), - alias($.preproc_parenthesized_expression, $.parenthesized_expression) - ), - - preproc_parenthesized_expression: $ => seq( - '(', - $._preproc_expression, - ')' - ), - - preproc_defined: $ => choice( - prec(PREC.CALL, seq('defined', '(', $.identifier, ')')), - seq('defined', $.identifier), - ), - - preproc_unary_expression: $ => prec.left(PREC.UNARY, seq( - field('operator', choice('!', '~', '-', '+')), - field('argument', $._preproc_expression) - )), - - preproc_call_expression: $ => prec(PREC.CALL, seq( - field('function', $.identifier), - field('arguments', alias($.preproc_argument_list, $.argument_list)) - )), - - preproc_argument_list: $ => seq( - '(', - commaSep($._preproc_expression), - ')' - ), - - preproc_binary_expression: $ => { - const table = [ - ['+', PREC.ADD], - ['-', PREC.ADD], - ['*', PREC.MULTIPLY], - ['/', PREC.MULTIPLY], - ['%', PREC.MULTIPLY], - ['||', PREC.LOGICAL_OR], - ['&&', PREC.LOGICAL_AND], - ['|', PREC.INCLUSIVE_OR], - ['^', PREC.EXCLUSIVE_OR], - ['&', PREC.BITWISE_AND], - ['==', PREC.EQUAL], - ['!=', PREC.EQUAL], - ['>', PREC.RELATIONAL], - ['>=', PREC.RELATIONAL], - ['<=', PREC.RELATIONAL], - ['<', PREC.RELATIONAL], - ['<<', PREC.SHIFT], - ['>>', PREC.SHIFT], - ]; - - return choice(...table.map(([operator, precedence]) => { - return prec.left(precedence, seq( - field('left', $._preproc_expression), - field('operator', operator), - field('right', $._preproc_expression) - )) - })); - }, - - // Main Grammar - - function_definition: $ => seq( - optional($.ms_call_modifier), - $._declaration_specifiers, - field('declarator', $._declarator), - field('body', $.compound_statement) - ), - - declaration: $ => seq( - $._declaration_specifiers, - commaSep1(field('declarator', choice( - $._declarator, - $.init_declarator - ))), - ';' - ), - - type_definition: $ => seq( - 'typedef', - repeat($.type_qualifier), - field('type', $._type_specifier), - commaSep1(field('declarator', $._type_declarator)), - ';' - ), - - _declaration_modifiers: $ => choice( - $.storage_class_specifier, - $.type_qualifier, - $.attribute_specifier, - $.attribute_declaration, - $.ms_declspec_modifier - ), - - _declaration_specifiers: $ => seq( - repeat($._declaration_modifiers), - field('type', $._type_specifier), - repeat($._declaration_modifiers), - ), - - linkage_specification: $ => seq( - 'extern', - field('value', $.string_literal), - field('body', choice( - $.function_definition, - $.declaration, - $.declaration_list - )) - ), - - attribute_specifier: $ => seq( - '__attribute__', - '(', - $.argument_list, - ')' - ), - - attribute: $ => seq( - optional(seq(field('prefix', $.identifier), '::')), - field('name', $.identifier), - optional($.argument_list) - ), - - attribute_declaration: $ => seq( - '[[', - commaSep1($.attribute), - ']]' - ), - - ms_declspec_modifier: $ => seq( - '__declspec', - '(', - $.identifier, - ')', - ), - - ms_based_modifier: $ => seq( - '__based', - $.argument_list, - ), - - ms_call_modifier: $ => choice( - '__cdecl', - '__clrcall', - '__stdcall', - '__fastcall', - '__thiscall', - '__vectorcall' - ), - - ms_restrict_modifier: $ => '__restrict', - - ms_unsigned_ptr_modifier: $ => '__uptr', - - ms_signed_ptr_modifier: $ => '__sptr', - - ms_unaligned_ptr_modifier: $ => choice('_unaligned', '__unaligned'), - - ms_pointer_modifier: $ => choice( - $.ms_unaligned_ptr_modifier, - $.ms_restrict_modifier, - $.ms_unsigned_ptr_modifier, - $.ms_signed_ptr_modifier, - ), - - declaration_list: $ => seq( - '{', - repeat($._top_level_item), - '}' - ), - - _declarator: $ => choice( - $.attributed_declarator, - $.pointer_declarator, - $.function_declarator, - $.array_declarator, - $.parenthesized_declarator, - $.identifier - ), - - _field_declarator: $ => choice( - alias($.attributed_field_declarator, $.attributed_declarator), - alias($.pointer_field_declarator, $.pointer_declarator), - alias($.function_field_declarator, $.function_declarator), - alias($.array_field_declarator, $.array_declarator), - alias($.parenthesized_field_declarator, $.parenthesized_declarator), - $._field_identifier - ), - - _type_declarator: $ => choice( - alias($.attributed_type_declarator, $.attributed_declarator), - alias($.pointer_type_declarator, $.pointer_declarator), - alias($.function_type_declarator, $.function_declarator), - alias($.array_type_declarator, $.array_declarator), - alias($.parenthesized_type_declarator, $.parenthesized_declarator), - $._type_identifier - ), - - _abstract_declarator: $ => choice( - $.abstract_pointer_declarator, - $.abstract_function_declarator, - $.abstract_array_declarator, - $.abstract_parenthesized_declarator, - ), - - parenthesized_declarator: $ => prec.dynamic(PREC.PAREN_DECLARATOR, seq( - '(', - $._declarator, - ')' - )), - parenthesized_field_declarator: $ => prec.dynamic(PREC.PAREN_DECLARATOR, seq( - '(', - $._field_declarator, - ')' - )), - parenthesized_type_declarator: $ => prec.dynamic(PREC.PAREN_DECLARATOR, seq( - '(', - $._type_declarator, - ')' - )), - abstract_parenthesized_declarator: $ => prec(1, seq( - '(', - $._abstract_declarator, - ')' - )), - - - attributed_declarator: $ => prec.right(seq( - $._declarator, - repeat1($.attribute_declaration), - )), - attributed_field_declarator: $ => prec.right(seq( - $._field_declarator, - repeat1($.attribute_declaration), - )), - attributed_type_declarator: $ => prec.right(seq( - $._type_declarator, - repeat1($.attribute_declaration), - )), - - pointer_declarator: $ => prec.dynamic(1, prec.right(seq( - optional($.ms_based_modifier), - '*', - repeat($.ms_pointer_modifier), - repeat($.type_qualifier), - field('declarator', $._declarator) - ))), - pointer_field_declarator: $ => prec.dynamic(1, prec.right(seq( - optional($.ms_based_modifier), - '*', - repeat($.ms_pointer_modifier), - repeat($.type_qualifier), - field('declarator', $._field_declarator) - ))), - pointer_type_declarator: $ => prec.dynamic(1, prec.right(seq( - optional($.ms_based_modifier), - '*', - repeat($.ms_pointer_modifier), - repeat($.type_qualifier), - field('declarator', $._type_declarator) - ))), - abstract_pointer_declarator: $ => prec.dynamic(1, prec.right(seq('*', - repeat($.type_qualifier), - field('declarator', optional($._abstract_declarator)) - ))), - - function_declarator: $ => prec(1, - seq( - field('declarator', $._declarator), - field('parameters', $.parameter_list), - repeat($.attribute_specifier), - )), - function_field_declarator: $ => prec(1, seq( - field('declarator', $._field_declarator), - field('parameters', $.parameter_list) - )), - function_type_declarator: $ => prec(1, seq( - field('declarator', $._type_declarator), - field('parameters', $.parameter_list) - )), - abstract_function_declarator: $ => prec(1, seq( - field('declarator', optional($._abstract_declarator)), - field('parameters', $.parameter_list) - )), - - array_declarator: $ => prec(1, seq( - field('declarator', $._declarator), - '[', - repeat($.type_qualifier), - field('size', optional(choice($._expression, '*'))), - ']' - )), - array_field_declarator: $ => prec(1, seq( - field('declarator', $._field_declarator), - '[', - repeat($.type_qualifier), - field('size', optional(choice($._expression, '*'))), - ']' - )), - array_type_declarator: $ => prec(1, seq( - field('declarator', $._type_declarator), - '[', - repeat($.type_qualifier), - field('size', optional(choice($._expression, '*'))), - ']' - )), - abstract_array_declarator: $ => prec(1, seq( - field('declarator', optional($._abstract_declarator)), - '[', - repeat($.type_qualifier), - field('size', optional(choice($._expression, '*'))), - ']' - )), - - init_declarator: $ => seq( - field('declarator', $._declarator), - '=', - field('value', choice($.initializer_list, $._expression)) - ), - - compound_statement: $ => seq( - '{', - repeat($._top_level_item), - '}' - ), - - storage_class_specifier: $ => choice( - 'extern', - 'static' , - 'auto', - 'register', - 'inline' - ), - - type_qualifier: $ => choice( - 'const', - 'volatile', - 'restrict', - '_Atomic' - ), - - _type_specifier: $ => choice( - $.struct_specifier, - $.union_specifier, - $.enum_specifier, - $.macro_type_specifier, - $.sized_type_specifier, - $.primitive_type, - $._type_identifier - ), - - sized_type_specifier: $ => seq( - repeat1(choice( - 'signed', - 'unsigned', - 'long', - 'short' - )), - field('type', optional(choice( - prec.dynamic(-1, $._type_identifier), - $.primitive_type - ))) - ), - - primitive_type: $ => token(choice( - 'bool', - 'char', - 'int', - 'float', - 'double', - 'void', - 'size_t', - 'ssize_t', - 'intptr_t', - 'uintptr_t', - 'charptr_t', - ...[8, 16, 32, 64].map(n => `int${n}_t`), - ...[8, 16, 32, 64].map(n => `uint${n}_t`), - ...[8, 16, 32, 64].map(n => `char${n}_t`) - )), - - enum_specifier: $ => seq( - 'enum', - choice( - seq( - field('name', $._type_identifier), - field('body', optional($.enumerator_list)) - ), - field('body', $.enumerator_list) - ) - ), - - enumerator_list: $ => seq( - '{', - commaSep($.enumerator), - optional(','), - '}' - ), - - struct_specifier: $ => seq( - 'struct', - optional($.ms_declspec_modifier), - choice( - seq( - field('name', $._type_identifier), - field('body', optional($.field_declaration_list)) - ), - field('body', $.field_declaration_list) - ) - ), - - union_specifier: $ => seq( - 'union', - optional($.ms_declspec_modifier), - choice( - seq( - field('name', $._type_identifier), - field('body', optional($.field_declaration_list)) - ), - field('body', $.field_declaration_list) - ) - ), - - field_declaration_list: $ => seq( - '{', - repeat($._field_declaration_list_item), - '}' - ), - - _field_declaration_list_item: $ => choice( - $.field_declaration, - $.preproc_def, - $.preproc_function_def, - $.preproc_call, - alias($.preproc_if_in_field_declaration_list, $.preproc_if), - alias($.preproc_ifdef_in_field_declaration_list, $.preproc_ifdef), - ), - - field_declaration: $ => seq( - $._declaration_specifiers, - commaSep(field('declarator', $._field_declarator)), - optional($.bitfield_clause), - ';' - ), - - bitfield_clause: $ => seq(':', $._expression), - - enumerator: $ => seq( - field('name', $.identifier), - optional(seq('=', field('value', $._expression))) - ), - - variadic_parameter: $ => seq( - '...', - ), - - parameter_list: $ => seq( - '(', - commaSep(choice($.parameter_declaration, $.variadic_parameter)), - ')' - ), - - parameter_declaration: $ => seq( - $._declaration_specifiers, - optional(field('declarator', choice( - $._declarator, - $._abstract_declarator - ))) - ), - - // Statements - - attributed_statement: $ => seq( - repeat1($.attribute_declaration), - $._statement - ), - - _statement: $ => choice( - $.case_statement, - $._non_case_statement - ), - - _non_case_statement: $ => choice( - $.attributed_statement, - $.labeled_statement, - $.compound_statement, - $.expression_statement, - $.if_statement, - $.switch_statement, - $.do_statement, - $.while_statement, - $.for_statement, - $.return_statement, - $.break_statement, - $.continue_statement, - $.goto_statement - ), - - labeled_statement: $ => seq( - field('label', $._statement_identifier), - ':', - $._statement - ), - - expression_statement: $ => seq( - optional(choice( - $._expression, - $.comma_expression - )), - ';' - ), - - if_statement: $ => prec.right(seq( - 'if', - field('condition', $.parenthesized_expression), - field('consequence', $._statement), - optional(seq( - 'else', - field('alternative', $._statement) - )) - )), - - switch_statement: $ => seq( - 'switch', - field('condition', $.parenthesized_expression), - field('body', $.compound_statement) - ), - - case_statement: $ => prec.right(seq( - choice( - seq('case', field('value', $._expression)), - 'default' - ), - ':', - repeat(choice( - $._non_case_statement, - $.declaration, - $.type_definition - )) - )), - - while_statement: $ => seq( - 'while', - field('condition', $.parenthesized_expression), - field('body', $._statement) - ), - - do_statement: $ => seq( - 'do', - field('body', $._statement), - 'while', - field('condition', $.parenthesized_expression), - ';' - ), - - for_statement: $ => seq( - 'for', - '(', - choice( - field('initializer', $.declaration), - seq(field('initializer', optional(choice($._expression, $.comma_expression))), ';') - ), - field('condition', optional(choice($._expression, $.comma_expression))), ';', - field('update', optional(choice($._expression, $.comma_expression))), - ')', - field('body', $._statement) - ), - - return_statement: $ => seq( - 'return', - optional(choice($._expression, $.comma_expression)), - ';' - ), - - break_statement: $ => seq( - 'break', ';' - ), - - continue_statement: $ => seq( - 'continue', ';' - ), - - goto_statement: $ => seq( - 'goto', - field('label', $._statement_identifier), - ';' - ), - - // Expressions - - _expression: $ => choice( - $.conditional_expression, - $.assignment_expression, - $.binary_expression, - $.unary_expression, - $.update_expression, - $.cast_expression, - $.pointer_expression, - $.sizeof_expression, - $.subscript_expression, - $.call_expression, - $.field_expression, - $.compound_literal_expression, - $.identifier, - $.number_literal, - $.string_literal, - $.true, - $.false, - $.null, - $.concatenated_string, - $.char_literal, - $.parenthesized_expression - ), - - comma_expression: $ => seq( - field('left', $._expression), - ',', - field('right', choice($._expression, $.comma_expression)) - ), - - conditional_expression: $ => prec.right(PREC.CONDITIONAL, seq( - field('condition', $._expression), - '?', - field('consequence', $._expression), - ':', - field('alternative', $._expression) - )), - - _assignment_left_expression: $ => choice( - $.identifier, - $.call_expression, - $.field_expression, - $.pointer_expression, - $.subscript_expression, - $.parenthesized_expression - ), - - assignment_expression: $ => prec.right(PREC.ASSIGNMENT, seq( - field('left', $._assignment_left_expression), - field('operator', choice( - '=', - '*=', - '/=', - '%=', - '+=', - '-=', - '<<=', - '>>=', - '&=', - '^=', - '|=' - )), - field('right', $._expression) - )), - - pointer_expression: $ => prec.left(PREC.CAST, seq( - field('operator', choice('*', '&')), - field('argument', $._expression) - )), - - unary_expression: $ => prec.left(PREC.UNARY, seq( - field('operator', choice('!', '~', '-', '+')), - field('argument', $._expression) - )), - - binary_expression: $ => { - const table = [ - ['+', PREC.ADD], - ['-', PREC.ADD], - ['*', PREC.MULTIPLY], - ['/', PREC.MULTIPLY], - ['%', PREC.MULTIPLY], - ['||', PREC.LOGICAL_OR], - ['&&', PREC.LOGICAL_AND], - ['|', PREC.INCLUSIVE_OR], - ['^', PREC.EXCLUSIVE_OR], - ['&', PREC.BITWISE_AND], - ['==', PREC.EQUAL], - ['!=', PREC.EQUAL], - ['>', PREC.RELATIONAL], - ['>=', PREC.RELATIONAL], - ['<=', PREC.RELATIONAL], - ['<', PREC.RELATIONAL], - ['<<', PREC.SHIFT], - ['>>', PREC.SHIFT], - ]; - - return choice(...table.map(([operator, precedence]) => { - return prec.left(precedence, seq( - field('left', $._expression), - field('operator', operator), - field('right', $._expression) - )) - })); - }, - - update_expression: $ => { - const argument = field('argument', $._expression); - const operator = field('operator', choice('--', '++')); - return prec.right(PREC.UNARY, choice( - seq(operator, argument), - seq(argument, operator), - )); - }, - - cast_expression: $ => prec(PREC.CAST, seq( - '(', - field('type', $.type_descriptor), - ')', - field('value', $._expression) - )), - - type_descriptor: $ => seq( - repeat($.type_qualifier), - field('type', $._type_specifier), - repeat($.type_qualifier), - field('declarator', optional($._abstract_declarator)) - ), - - sizeof_expression: $ => prec(PREC.SIZEOF, seq( - 'sizeof', - choice( - field('value', $._expression), - seq('(', field('type', $.type_descriptor), ')') - ) - )), - - subscript_expression: $ => prec(PREC.SUBSCRIPT, seq( - field('argument', $._expression), - '[', - field('index', $._expression), - ']' - )), - - call_expression: $ => prec(PREC.CALL, seq( - field('function', $._expression), - field('arguments', $.argument_list) - )), - - argument_list: $ => seq('(', commaSep($._expression), ')'), - - field_expression: $ => seq( - prec(PREC.FIELD, seq( - field('argument', $._expression), - field('operator', choice('.', '->')) - )), - field('field', $._field_identifier) - ), - - compound_literal_expression: $ => seq( - '(', - field('type', $.type_descriptor), - ')', - field('value', $.initializer_list) - ), - - parenthesized_expression: $ => seq( - '(', - choice($._expression, $.comma_expression), - ')' - ), - - initializer_list: $ => seq( - '{', - commaSep(choice( - $.initializer_pair, - $._expression, - $.initializer_list - )), - optional(','), - '}' - ), - - initializer_pair: $ => seq( - field('designator', repeat1(choice($.subscript_designator, $.field_designator))), - '=', - field('value', choice($._expression, $.initializer_list)) - ), - - subscript_designator: $ => seq('[', $._expression, ']'), - - field_designator: $ => seq('.', $._field_identifier), - - number_literal: $ => { - const separator = "'"; - const hex = /[0-9a-fA-F]/; - const decimal = /[0-9]/; - const hexDigits = seq(repeat1(hex), repeat(seq(separator, repeat1(hex)))); - const decimalDigits = seq(repeat1(decimal), repeat(seq(separator, repeat1(decimal)))); - return token(seq( - optional(/[-\+]/), - optional(choice('0x', '0b')), - choice( - seq( - choice( - decimalDigits, - seq('0b', decimalDigits), - seq('0x', hexDigits) - ), - optional(seq('.', optional(hexDigits))) - ), - seq('.', decimalDigits) - ), - optional(seq( - /[eEpP]/, - optional(seq( - optional(/[-\+]/), - hexDigits - )) - )), - repeat(choice('u', 'l', 'U', 'L', 'f', 'F')) - )) - }, - - char_literal: $ => seq( - choice('L\'', 'u\'', 'U\'', 'u8\'', '\''), - choice( - $.escape_sequence, - token.immediate(/[^\n']/) - ), - '\'' - ), - - concatenated_string: $ => seq( - $.string_literal, - repeat1($.string_literal) - ), - - string_literal: $ => seq( - choice('L"', 'u"', 'U"', 'u8"', '"'), - repeat(choice( - token.immediate(prec(1, /[^\\"\n]+/)), - $.escape_sequence - )), - '"', - ), - - escape_sequence: $ => token(prec(1, seq( - '\\', - choice( - /[^xuU]/, - /\d{2,3}/, - /x[0-9a-fA-F]{2,}/, - /u[0-9a-fA-F]{4}/, - /U[0-9a-fA-F]{8}/ - ) - ))), - - system_lib_string: $ => token(seq( - '<', - repeat(choice(/[^>\n]/, '\\>')), - '>' - )), - - true: $ => token(choice('TRUE', 'true')), - false: $ => token(choice('FALSE', 'false')), - null: $ => 'NULL', - - identifier: $ => /[a-zA-Z_]\w*/, - - _type_identifier: $ => alias($.identifier, $.type_identifier), - _field_identifier: $ => alias($.identifier, $.field_identifier), - _statement_identifier: $ => alias($.identifier, $.statement_identifier), - - _empty_declaration: $ => seq( - $._type_specifier, - ';' - ), - - macro_type_specifier: $ => prec.dynamic(-1, seq( - field('name', $.identifier), - '(', - field('type', $.type_descriptor), - ')' - )), - - // http://stackoverflow.com/questions/13014947/regex-to-match-a-c-style-multiline-comment/36328890#36328890 - comment: $ => token(choice( - seq('//', /(\\(.|\r?\n)|[^\\\n])*/), - seq( - '/*', - /[^*]*\*+([^/*][^*]*\*+)*/, - '/' - ) - )), - }, - - supertypes: $ => [ - $._expression, - $._statement, - $._type_specifier, - $._declarator, - $._field_declarator, - $._type_declarator, - $._abstract_declarator, - ] -}); - -module.exports.PREC = PREC - -function preprocIf (suffix, content) { - function elseBlock ($) { - return choice( - suffix ? alias($['preproc_else' + suffix], $.preproc_else) : $.preproc_else, - suffix ? alias($['preproc_elif' + suffix], $.preproc_elif) : $.preproc_elif, - ); - } - - return { - ['preproc_if' + suffix]: $ => seq( - preprocessor('if'), - field('condition', $._preproc_expression), - '\n', - repeat(content($)), - field('alternative', optional(elseBlock($))), - preprocessor('endif') - ), - - ['preproc_ifdef' + suffix]: $ => seq( - choice(preprocessor('ifdef'), preprocessor('ifndef')), - field('name', $.identifier), - repeat(content($)), - field('alternative', optional(elseBlock($))), - preprocessor('endif') - ), - - ['preproc_else' + suffix]: $ => seq( - preprocessor('else'), - repeat(content($)) - ), - - ['preproc_elif' + suffix]: $ => seq( - preprocessor('elif'), - field('condition', $._preproc_expression), - '\n', - repeat(content($)), - field('alternative', optional(elseBlock($))), - ) - } -} - -function preprocessor (command) { - return alias(new RegExp('#[ \t]*' + command), '#' + command) -} - -function commaSep (rule) { - return optional(commaSep1(rule)) -} - -function commaSep1 (rule) { - return seq(rule, repeat(seq(',', rule))) -} - -function commaSepTrailing (recurSymbol, rule) { - return choice(rule, seq(recurSymbol, ',', rule)) -} diff --git a/tree-sitter-c/package.json b/tree-sitter-c/package.json deleted file mode 100644 index 707facf..0000000 --- a/tree-sitter-c/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "tree-sitter-c", - "version": "0.20.2", - "description": "C grammar for node-tree-sitter", - "main": "bindings/node", - "keywords": [ - "parser", - "lexer" - ], - "repository": { - "type": "git", - "url": "https://github.com/tree-sitter/tree-sitter-c.git" - }, - "author": "Max Brunsfeld", - "license": "MIT", - "dependencies": { - "nan": "^2.14.0" - }, - "devDependencies": { - "tree-sitter-cli": "^0.20.0" - }, - "scripts": { - "build": "tree-sitter generate && node-gyp build", - "test": "tree-sitter test && tree-sitter parse examples/* --quiet --time", - "test-windows": "tree-sitter test" - }, - "tree-sitter": [ - { - "scope": "source.c", - "file-types": [ - "c", - "h" - ] - } - ] -} diff --git a/tree-sitter-c/parser.so b/tree-sitter-c/parser.so deleted file mode 100755 index 18ed4f3df74981bdd32d5eeaea4b85a050e9f5a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 389904 zcmeFad7RDl`~UwsGh>e`Ft(cIrFLC=k~pQ|M=d_`~B!Vulw_QUeEQlzs@naU6=Mr zp^#($lATtLXE{!5lQHY(0@ekrnNtk^t>RQ>-xN0|K2frYF#GA06r1Yci1kew^?Ba_ z;r7#Cj_aFe%Bjy&4Wym+(_gM2iX7i9`NzKxe%3!v;x#j$wp$h z+0Vif#-TQn7E^!(pQ^i#F1N>&)1TEOoMS(!4*KiyL;4;6oBFz$a&ol zOLePyP2DkHef?VIbDys*d(8x7IW)`^lj2Z+l9(WYKjPiH&AN+?eE!oOyh?&R>Tjh4 zoa#x$>*T|GftPZMI(IyV1pe$gar*Tea`(s){l=uEo?ZLhF=+IlA;ZR` z4;tOGYn$OCM-1wD`+(ttBrkDJzk%a!?>BhZh}(w`8$ZZNA3bPLzcIto5uo2dXZWxI zW76*!Si5%JF(d0XC3B#pI&|rHZJT}#>o%<01TDhIoBvV!C_NgVcD^&p4=X}G6Dbpa zcDu9vIAAt}Q)YX#e3s!g56il=+{u;=qrT$no6yKQPBYD`32&`<|99ElNmKm54^m$@ z#T~tkDBf(0 zj6-45KReFlH%Xk5ieF}US;gxaUP40nE% za(3NrH@vXopBr9M@h=T8tN1sDS5o|2!)q$O&+z(+A2Pg|;!(p}D}LPYG{sLD-c9j; z4DYRY%4Qjt{)%5@_)x{|_>59Kb(_Q)r+5_;CsXlihEG*|zga)C6hCD69K|m)apoyr z)9}TL*D`#m;&lvPp?E#R*DHR7;ae4NX!uUW>l?mD@y3Q9Q2a{6k0}0&8HeMF?=t+9 z;yVm?ehRMt7AAgS#ji5Fq~a|NFROTK!z(F%t>HBl?__v=#k(8cO!0n(w^n?B;c1Ew zGQ6AOLk;h(_!z_cD?Y*Sp^8TgAEkJX;o}s4%J59Z=Nmp%@z)KXrT9w2=P3TE;qw$f zV)$akoh`BsmMR`I{wowOX8hMHUfl4liVrk#b}ByD@I8t*GyH(!;Vsh6BZ^;S_;JNA zHvE+0)eLuz1lNCU!wW0k!0?iaUuAe%#oHKON%5|R*HpZ-;q?{oX?QcmZ#KNO;{6Oy zQ+$Ns-4q{VcyGnW8{S{>{$^f=D!$(wM@A`r+VF9TXPWq#icc|os^X6rK1=Z@44qT}{D9&g8h%9aEruUg z{3F9pDgKG!PBggwKQp|r;$IkEQt>^8msNbP;guBMXLwD;4;o%y@xz8UQ+$tESFIJ# zHU4ReA2Yn0;%5!-t+=yQ#-+dF$%YSAyrAKu6fbP}IK_(^o~d{R!>1}<+3;D4S2KK$ z;x!DPr}*WDFIK#^;Y$@yHGGBQ-3?!__&~$ADn8Wkor;eze2?N|3_qaw1jCOg{)pkn z6@S+7Q;IJ(+%fkh?fL&2!wW0E-SCo%e{FbK#Sa@^N%0eg*Hk=aczwlf{AP;V_^lPU z@zWHy@w+L0-Zok1y%n!ycz?y48$ML=j)sp?{1(H#o8-_1de3Riz75~og6^j3E_On+VBI4UuXCc z#rqk4T=Dx1Kc)DeA4@x(T=}%?|2N}bSn(XgODg_?;bj$HYIr5ZcNktXA6`En-c0dL zCQfU`e=3w;?oV^qxcJkA5eU*;YSpI)9~YpuQmLX z;yVm?ehIGs{e~A-{8z(EDqhg+f66Le)$mG+H!-}X;_VEtuXs1Zn<+lf@YaftHat!7 zsfKq`{5ivWEB>b8{T2Vv@S%!-X80(@4;emA@!t&3R6O*F%*Ry4OBg;&@kMDe92&T+*z z7=B9eU4}bHgX{m0;e{3d!|;-d+v9s##qIIElHx_o{q~xQmp8n=;`ThGnc_{2e{01% z*!%g4_cpwn;&&U~Tk%PT_g8$n;X@UF!SGRvzhU?|#Xm4SQ}HhipQ`w;hR;&G;HNTw za};l6_&mk0H}}aGE8gAsFI9Y);VTq>!0`2ozi9YY#n&0WQ}OQ%-=p{`!w)E4+O+?O z;tlNmf5kf*eoFCyhC9cC>wmoAg%xjM+EY^TM~#13#g`afN%4(_*HnDJ;q?_iX?Qcm z3z_Hbtrfq-@Uq8){j&C+Uxm}NYI(9L&+iWSxOsJeGmiK;Jqx#g$9>#B)3W7goZ5j|_~(@NP>VBty4t99%bCF^k)~aj=&TS8VN2yyy`4rry{kr%8#C zj+5G}U4x^kJv&bOyVtZod!$akq*|A0Kc&WcR;xMqfwRRz;VGrAb)4|>FFFn^{bZNW ziP)j6_30NkSihzx;^!7vvko8O_l}z~g>%>D^w=LcbKBTDX*tFB*P&}O7SiBI%i8c_gaCSw3mlC|hSCm09Tl92mZV}x{h@M1S zxz@u1FD7_UAlJ%ZCj->FR=nu;MRb)d`ij8H1Q+^>GMH_PM#QTSd1cz7BLr3=c$cpz zgIjFTH1Wba=uWhqE!s#Ry|*8&?<>lnqAglnyo!-mQCsxXH9P@@-_5M1di%HS1S^eOQQlh+fr=z{_;AUN4ql)(sFw2ye5PhK}$FRa`f z38XP-HMvJ5uj1qjBH!ml@`{ABFXtlB+LW1FDUw$qJmn&ww44j4-$QFTWo}w%XY2ri z)T1ED@LL*+{{43>22_{OaZX3_`eqbeGoQeIfHf~770H_z&iV{iB(G06dtECYxKiY@ znjzNf5`k3-E)vKqhryE!Fq&E7MPKKLK4862|4jr&F{qhw9>C26`Tn-jws& z-4Bpc5kQF_%ZtUb_lC2MwR9YWpuo{wFy7W|tG;1Sk6T57quUttVZZ@b08HBxIgl4Q zRV4hxdh8LxPi!c>GoAX8NhO|w1J&~o>XBNqIfiV})yO5CK@|>ql)ylM$u&&hud{tW zfh^Pa$br!1n;NW-UIj-~bPPG%=UN=8&zf=oE6G3H?&s)*fNMBzF{G$1XRhWxlSA~c zGhUznAn+rD;@q0w34Fnz7lSSYK4g%=AdSG=48}2_Z_-5P1LU;Xi7^>V196hr3^1zv zeyN;8kLQ9i6!g`Z=r9H{;6D-Q%|HhHM*3NiX zL(y&OP z>9;9eOVZC!x`L!4lWNz;KWdgc`O>uE|KlXM?SACmOLl>SoEhbjG$q!&_p zt)!o$^fF1ep!7mX^MaczX*zaBXCS?Xy|XCAF~(DhBaaeKuJI0{+>To)#jWc`DQCU7O7VD~{0pf(V!t4TqijJ+A0WDl zQeRSvXKy>D&Jx=|DW2&Sl$uBE4NCE89q*NcvXdt0X;#(r-$d zC-5an^Ta+S>Bi(U9qCBkZM^+8A}}6ca-&Gzt&AEH8p1x<;4u@}BAw`s40>hUjj`it zYR6y#7vVW*%wQ4&9`>pXGBU105uUG70Bg7jg^>c~Cjb2>4Koffq41OIBYDMT&s{%y zI1vwLe*zrIYd*PRB(MIYqB4)~GpiKNUUVhT+$&VH^Sa3C=HV$%0Hv+ODOVdPIc@jP znTK%5nglB6e)n@(-y{xa&>}pOzSPE(ILJ<7x$u;GWD;*29-Ks;tcECwUhyPeCTX6m z@{+Dj<5)t{ttp)(=~_-~g^71=_%is&@Rc(~SC_F~# zijw9YULfh##0yFKDN5&^V1M4#{wisn?(Zed)BP3Fc3MkPq0Io3t3>j;@b*UEIgh^0 zKD{#9qw*vI^BKq)LNb9z8BEHk1`pmuGXWB9dqWfPaCUbtAKdm@GQ*(P#+Hq}<`q=b z40>6h_(4wsl|jb^A$lc)F6Y0$5$GG9c_Et1+g^7hcn5lQcuG5@G3a*=3l2IT72ZQh z^oqB=C6eaj#`8#HA6A0K>@ndhDgBV7|EBbKNuQzg2uZJ}^Z-foG3!Q2^O3BRq+chW zR+5(OU(#!dUnc2iC|zFCw^F)` z%p>pt03YlkdH092-X`lG@JL=pIO}Ctxpb+`&3TIQxZ^oU(ZR5?KD4D%hCQ_P#Ze%^ zk+B0X=C~ur@XcE@2AH?XJa1LPGw$Mf`z~^-MR-a-nYV>Q6U^H`zjD8EBz2-EB+c{o zBhr|+qQt)u&duK;>Gi}nNSf#8JxTNYERi(N&-0Sz`FTvzJRlEAn&)S{q(7mUBP9JO zr3Xlw=j}#GKS{ikq{ZFOxLSVR=dO9G2j;Zw}8M^UvY0WGzP}k-Q1v ztb?#}FUK5mwYy;<%}v`PX>Rf=q!Z5Qe9Evh`Ut+WoM1*XfH9+EIfidW2Qz3Dp7{ee z1~dAMozaWKQ)bGHemEpJqf2OX>YyZ=i9M?mtt4rlmC}-agLq*{^Q`=Rl>K>Dj!Swj z`5cyXElTf^^bAUGmo(4HdPzS{{2fX2QFF1Rc~+j4G|$Q`Nxw|~S(1L1(&LcEhc*lGxN+K-Ix18wt zl5Rxl0!U*6KabLRn@TjEM6F(?v-oU?*G%uxXlI9J3jih-gy(MX0N-s;AH}Iz= z&09;3q|=mNp-4Gu!zTSaFpv!0cy@=6t{4q~uq`7f8u) z_G1FkKqorW!uti@LU24o-=Gg;;2ZSb3^3^JQ7pl-tOtxiZ@_L>;r_Qoe}|%9!mwpH zyQsj$1PfXC=jGhjMFda$M15_=WAzt-gAAk{4G8Q6peb30QgpXG>pd%wT_C756icD#la9;S7AexRpU%6>SN7Rn&2-sLlSqD#|nPRZ)b2uNS9&ppM5? zageZA#Wrk$GEiID-&e(Q2EIlwOdN4$FydG@;=MZJAYVit>7I!rwhTtB?nbO85yRP~ zfUr5Yq`?g{l%Z%v;Ge_X^9))SCpcXx{g3E=>{}vvgTvWhB7w4f$#pkp4-031An3eNrc6 z(aqoekt3;*Qw8|$*w+-NfiM0gD3JT3cH{CzeQtl^Xch0ai=uu1z1NE!3Eh4tx79wk zMG4*7k=tyaTV_JH_T)Cg=XP^Kw+`gi!ROX6p<5ccRr0wNOX${-+)f|zdV088q5WrrOM5PG$g>PDsBSEXKoEl-leQ~L6`Y4Q8|(7CC7nw&$WBJkqp%F+8MwSw44 zO3kCxAWAK#)UA{{OR4UZ;nYuU=t@e}pi~~EE~V6IN?kyy^^__? zsaGf!JAl+0O8rSGKBLX0)Z4@kQi|^>eMPBfhHb(B)QD7B7KosqIVz6NPJ znJs0Wzt@x-vNeGdoF){m!lwyEksEvfe`-H%0OkSwp~{ZqUxRxoGw-(WOuC1K%EB|~ zMi9?0ZVJ&2BD^hdeqerAQ9EBkIkdAorJq9D-2b3d9G7P?akn=!V3N_|SHmXw-BsYaCIS-6~1vx!xt)Er7(NGYC$VwB=p2vLe>;jev2 zEg-+6lxjw)?Lf_>42^pCU5qIVc#( zn-tD^3|8(P*tEIfS+L^o{WXaWC*I?)$Qj&^-@y0dKPdcBdZB4MqcXWQjxIFA=BGnaiq6OeK!<+p<=><8Q(WpPubJHqmH0>lCO9;I~f)` ztjTmR)&t=swWm1Iy=b8r1>C0OJ|U!_M;;VX$R*LcV>U`*5B7Fp5f{>lUs$RiPSqd& zmKup8`%qLZd?D2m=mqy8s}jVx<+x_gmH}$xCxzX`xkbj zM)C%Rvwud0)P5h;ew|yp-|voa_6FB)EcsoQpWj^9?=JHDXRqyziZ|NzyPN#JOz1Z# zoZZRw8%2I^zrD$?Z+?EeT)$rA*EB!BC9dBX@+*;_--E7S zI{E$hO`>rbY*)x_xtDy(B=o_?O?!3m8$^D; z?n%`D;Tc23XCnE0oX}@PMjP?DlYAB>^vSSo8caTs1U_;Vzz<^k$%9z4OS+#*bVmt$ zO@Is6$Ijq*azK_-N#9d3SvSCYLV%%b{W^IhmrZOkC2|coX?N2_JenCp*P08zDXkTtYoS=16v{l+iEx z`{{(u31@wS3>+3SYD%#OsaUhbEeL15&dz;oQywDcVsOsho7*OS;A(}ls$)k^H^458 zRzYXuUHYWIOCwN*<>@Jlwo9-qDpu77yVC@lMznasV5xXJj4x2ur&ijO-W=gF zs^bKs5XK<7_X}J7WZxpgCBW&6?6y;c{N9EiU(THQ%eJE!@n_uf-onb>n_h;8WC&iu z;~{wsiRf=;T(XxVM6@$df_`U*d5&=UPy_DKN8l=6=ex~|j&X@6X>J&=F#OWL<>?&n*7+ehU!1@> zx)Do9YAWN7Q8d-9-h&*mrW^4Cinwi;EnL`UERpC`YyuHU6@tmx_AZD9{`lMf(6mee*X{D51yf>(I8TiAp2{zvvp zZs8ZGaN7ih;b+zWy-y-FZ6)V2u5(4NrW@RvDtWM_3oE;j2FGkOuTr#aJ82@Zx=XsX zEF=CFxJ*@`Z2E`nEbo)hrtlUyXSvQ*+=`;>PS^-lJ-Eb$)m#|KyV^EsDMf3_O~StH zemG0VUn5?@ttD7?xA?qCK4(6)l~#A-N1M2ndXVSv61RfQRCtYB_%g5Xso!iw4|3uC z$dH=1P~l9sa1F2UDz|WL4=!|J9S=V0!Ye#D(S+By#4&EfZeHOx+`=A=(q0@8h%VzhIg@%J&Dm7kx}c~#_e{qREzaM>G;0!a;@Q4J5fH3X0PSx0aKB&YMr z$mx1xC#9`yo#{BF6*!4<(smz6%ifvMJ8dOdOtN>T_m1vC5!vMgVx^CX#auYEY{MvzH^B6;1yS%;bR3TJJQKC#^Kx99r-s@_HL97&#cKgb<-d79^fR8HHRRsqCHh@9x*-4 zuXWJ)eNGW-C$2qXn6&U3@+m~c^V)`I(EUxURW*XgaON!|n7x)y$p>Kn=hkvLMcA|r z5ikMS=efKl@z;sx4Vc`F!_P<fv z5~exffEVF;&Ir#O3^%lBa%o@>&{+m$p)s*w7}xd2)4Z1?j^lpP$p_i^zeqxCA7Zzj!^gPalsL zNuzWSz-mgr8{cTk>xHF>x+8gm(yxp@&N-vPSq%`0-!ANmyxe;dc6mH^d5~?&9;&A- znlc&J30=Zj7ogg|DbTz9P)pi-O#C@7-LV6 z%!%RnIuOpzqdA<9Iokp}xf+@i&f@Q2Vc(9unS<=yG~SUGXU{IVjk&@Yxnpgi!exAx zj|yv$^Tj-b_u1NJb0%tg1PR}^9e$`1#WNf9`$y1}Fo2%mY2QQ+;R~ARFMa(_jxl3X z-4*+OCe|-0Eqg1z4u>kz-p8N<(AouxV*RAO&;RZYFK3{A)FP?(q2si?eol>?Ne)kG zLT%U&5Z4BN@_eejU0}NqJi2@n%}NGs^_?dd&FS$)jj(-zebVGO=+VYJUtcw;%R z+=s$x7!}%_(evH>e%&2_(F@%>H6y&^cPHdX@R1&D;=)lLtmMLbJXp+yqdj;MuUJUT zF&;da0MgS{vt$2*2IKAzX(WqV_B*kgnf0=)3$b?0GAv6Y)_~bK%i0sW6wJI^V5&Ju zxF9gy$hrd8OR4{5bpVgk^EJ>*pVA9p$L}bk{H4 z8=B4Vk@3p#;9D-d*MrZxaI6QXxNw{YN4xMo7y3GLoEr1b2Gg0%uw)>3XY?buv?pQN zU#aW{DVtFycXI;Q^e^y+;Jw&y_Q{wT{pm2R$bYaK!2j)cqH}+YFILYE^)afUKi5!c zY@Lp4=pW{y)jaL%j=PVhX8sUL$JeN$*CcFam3vF@J+(ThD>^)3)rX|&@$SGx+rm#n zj#3*LGBP}U+dtr~HQu#I_@QOkUqti1&(~qfe&k84KdFD2h$Vq0cnw(v9}VfXG_!pF zqJkZ$5g1v+8W3v)mc3W*WERB>7r2ud&Z758a3ixmIh1m13%Rvnj>6duF|g9ADEa-o z-Znt_ErVa~m(n(sRmKgGOCc8J7h+_7A#7KErs6|UoWHe6?TO?y3uj;H#*dLhhs5#I zSFtm_N+SKCB@->5*csnqM=0_8g@T?~mruXxzG0$%<3{BRZioXE;?0C1YGh21Y7UXl z^n85GTplE!A@D(0>@$@V>PC-z%2kxu-&47I34G$7sbqwG4^g@vv@4R|ygs(pj=^Mi zjYKbpkIcFUY4vrKnx|0B?3tHWi|Nq& zE-YOq?waE~1bftnP%d{NlIbr-A4%*edw|<0)QvF;jQizXk%;zzKYldg*0$4*+?LuW z^|sW$8&hv=*WhGoua48sruOWTQ~muGj?=5hwBJ*w)5-0xsj*)8HHp0L_%(^+6>w^{ zd}GIfDOp`Y2Vw^zXWM5KX>f8CrpLkA;@Pp`nLFVUIoow|&B)o}870IUO`{v}- z$k8H^vk0^VUYwVED01|=$l1%oQ=S6CRbf_Zd<;xkBHuhdxe6CTPVO4ifpZ8a_npXD zyy-C9Exmw)tir{mlRF1a1t>8SiGq}P2#G>SM8~7!NaLIbZ>mbV*8=ko5VKPLgyfO4Bb)ApQlE{#nwcDZLNr z$l26z_LG-lYdpE?LW0{E;@bQHfq2q_Z&)zA0sR+PhTsbf@#S$Ii3WS4GZ^6UOnZ3A z@RTLTdzq)=?bws6ct<{nK|coN$)hKO3|!Jl{EG=*W8q(yaP#nAe8ZaING=LrCt8ld z=y3LD;)MxvqA3h-XRnF`ey8)xvqKqFB5;Vo$Z+;tDOQ=_Ck*Kw&6BHe(8C*s)+=4S zsuEnpa5#HaBk&}H5e%vm$YwAuoZV82T}E&eLunJA&GhrdsYxE!F+iINN-@6LZEoRj z7!FAA(n@No^Pr%B*O1Sc>Y&0dWO+{xg+aCQ~(YC^CV zL#eGPfwm0Loxia>(1a@q)?hRM&MNhkJFXVS-`~t zTM*pK5Uc%hfmajU%n&=tNq}~7zr`>;oIOlDTaxFq3}sGR5tvTk=zz%C(%~ts;fUSJ z7l`TKt+XaT`h^Mf>l#YmBr*v4-9VpG$ zmS-`5w85bwK1n}@eRt$6y0B1SNAmodAx8C4ft?8QFHD@pBAF<#Gr>366K_il5y%$< za~a+q&b~n)A8oQ3qV|>oucP9l7~+;yO@Y@FycH0~nszBSnSFK1$XVPrx*+x?KW`gt!6A_x6 z3IcB-*qz}JE_y40)(m8e>qDTPjr9|DzZiwv2$pAvZtN1+mtX;3tbPRkz;pP>+3|Q+ zT)g@d+|Lki&O9aXc7h);#4qxP}2{{VyDY(BEMMYx%tHBv6h4CigS(x{F|n zc;Q`Pfx`*@ibv*=vpw)z0RrzP_zgqs6&@2fg5V~G?eIuT;7Ec?8DgY|3LHi78HQLJ zJp|rE@F9lSCRzy`P4FIu^u>jftHu!M&j1ZCD_-dYJ2S+Fmn<-YU{f3K7>>{=elNkw z*7IwDV+o$ea1>WEjzAusr1K{Kws_q~@JEK&XFe}*Ji*Tx%0X-bf%Ob9bK}HoBEeS~ zqJ0Ae-cRsJhUo8g0w)oCfFXvfxxmQ;hciTDK1?vjdbSfdo!~fzSjP1QK0nv{?8zXE4UQe{DZ)m1k2h|UF@DHa<&1k>3H`!i#+HTCL(7WS@tNgL(H05 z_874p%$iyDI5GN#3EqA$<)aJjlAj8LO8DS`tT zVqbBwz&Ql3V~FW3DDY{5%^6}}@mnb#h`9u-F~pR7EASbDVTRbrZ4vk^!83SH&Ktlo zfzJ{Afgx&tPT=zdcUsS>0$(7wiXkc*Bart53oYy`a2|O+YKwOi_#(lH46zY37C4{a z5QZ3~iUMCENN)s0&f;y_q5?As(i;I-wBhVO&*#1`AXt+jwxI(8UnWSuFcCT14(ERY z7ZUtO9;CNRnS_lDhXh_*6S0%w!vogt^WwaSoIisz57ab)iwUk~h_#z8@D+lK7-CHN z30y+(F@~7CP6A&gNN)s0&f-<#CIVk0IMl|hB=B{DJuECH@C|~k7-Hp|EXmz}li=kH zF;E8uE+tr+A%=9jz_$p-@JO6TZ@Iu_1b=3TnDYg`P4EkbXlIVVcL=U$h;be#@Lhth z0`f4X%0Y(HU7YAC-tpcQ&h9ME?~(H)>)g|cegy~PEElCX(Q&uZ<>cLs>vOl#6~wM) z=5D3$6RXM0-AY#yE6oi1YI^%jw)|DZ|HjjCp44~3Jc6qU{=^W2^@6}P1nG?cKJ|K7 z;97!f7-HMY5V(%uVul!({sPw%d>oLwcLN?{WB<$PuJ{=zyT@)M&L5ETV2*$VR6!sw z*6s{3F+~JslIPVnY#)4$i$kF?M@n#CHju-`T&ig}d$+)i1Pd~3h?^V&KP31YJt{xj zIGp{8z)b|dW!NvA{e-~H1h+6mOC}54LU0)%cd8RkGPxz#D*B4UR&schOJM`(C~zCW zi54~%_z}S&Hhx8c9}~QRA;zSr!0iNEGL-A&PYBdufc?qg;yeaB2$r!$KNa{X!6b&5 zR^`_gFYf;4Xq28DcA&AaFOqHyAeHvy0COJjb9BgD(g?!k{UG zF9}Rw(2T)X1ny*jm0Cpt?;+TWA*Qytz^@6mW{4xqsq?t6-w>?L5Oedrz`X=7Vu-QZ zA@Ey*AwZt6`|%np9~m$huZzQXI+FVcI_XG!6SYF^^f?XM+Nd*M{K(HA@)PB4ekHe1yt1`qA z+$-=Wf+ZND_RRv15Il{C3z_zj ze_`S*x|}I6M(}O+#3H;)Am818-p0I9ApaKCG={jiNEOJxN0rVHvrtDMeV;Gdk0F** z8G(GOy%R$$rzC-VYrF|VET^M|c^vp#1CusqUagoWT(EZ`!z;BnoU`yR3@I30&!wfO_*9t67 zFoPjB%qs+zAlRQFPVUMI3={0k5ZiUKKzfZT+LR$`KURple?Gy=46%y77Fdeld4RkO zn&Bdwj{u0jLL4q2hg{s1=Oe&N0!tJ8k|DZ3Lm>SGSM&ow4s|7NGT6h;-QsW&In3iy z*gy9cNYA07(-~q?+6XL5@Lmh+3M@zPb_>f1EKjftLrhl%Udf?jkqLkvPKfi(!;#t_@Zg#zjI zyl5IAcf11*vb;;j_4pqt+}X>?p@wy+hsU_~NKqd@<7*EJTg15*IiJCkc)osJCa^Za z9~ffOcurs)f;$;vE0`*fe%dIyiXmD!Mqpin{0kFwS=Lt|{k&)NQTD{<&{1H0f)g2H zC>jfFKyU~{?1Cx^q-Vg<8yI3FiwfkC}2?`g1V;p!mfrhpFE@sY(fzhF@$G7flUcMX2aIR zPR8zpTlqrWV@qA`gMBP4?SmZ{qA#%|?lnDtjy7b7{p!yGn-RQ}Av*YlK>B5>Xkmuf zGprYQ6~W)>%>cRu{Hj3uvS4%{Lll2fAid=o-DW)>5ZIF7I}B<6FR&HC7p&(^0&J58c{#NG6Rc#11WrzVk1`GFscx_Y$%ku%i=Awa)EulifN`73a28^(yP!02i6;fI%1{ z4)k68=v+APz}_IRJ;7{-sFwy04emg2lnvDogUmZ>Ob6|@;gCiS*K;ZKosQ&y9SQO; zOwhJQr+9#!2v%oLECxD}2kcC+q%FQxU>AaU^8CDAN?kl;M5R1pjj)rk>89BK+jL{> z|G8m^9FZVhDad;WLU;8?qpIr&ylkU3$416G@_re;ka<02PPLg=nV&I2$!5sxMwxeU zsD2qW0O$dJaPaXc$OZl9IoACH*by@0dP{kJCEe_aA?J@2I>io zhh{?WLLWiLp#qP`Vzr^x&|qi+^dj^g^euGX6S3F~=pCrjZ2X!X)auDtY!y`NsaWjy zr|}iVXJWB+&&6VmUx>winHP(#oga&RvLF__dtofrWD)9w-i3aI3NDVtZh{_#7DB6_ zlvmJBs4mn7x*u8&ZHEp*ZI{Gii=d*fA||vBI{&p;>@uh;Gyob4JpwI&RztZ^sn=t% z=1_lV3iJl_1@t#m^$qj~x(AvAZH988%5TPE?V*WKr?=4lw_~vmP!7}++6C>0euI+V ziN(r7S3tv{Nzim?4)ij#3|a^M1cl#?#jb?orEeZ zM_Zr~(38+E=nT|;1@fRfp&8IJ=uas1eas)U6FLjkT^WmYhbBUMp_;2=vANK0=rmMf zHO2wz4E2XHpzomD*PtEHQm7cT2|5auUmJ_ngW5vFp@*Rlp|7FPx>)QYs5W#xG!}XU zdI#DD{RUN7AB#1D(x5EpEod{e7b^2XEY~IY0X2fspixjZ zG#8>TB7FtLpwb&-vCE-WP!DJ*bU*YMvYZ$r(bDoLMKG06+G*l}G{dpAI@snsD(qo^9#U6mBLx0c0z5t)ELd}r( zEm*C4$OpAGOyW&TYLe0IbCJLo6qHz*JKw{kka!0dl76VAtH#Iv#3%GWT@$gh`= zkFM{3V>izyb{p`n&`r?o(8DvZ4}`Kl@s#;I))YkS(#Pd98@_W4TVOtynoob(e@m}M znMtT`D?aaf4ErHyEb8ci&kj%vs2)@mDgzaRVze%x2QY3w;d3k)mH9V~n2T*1{+~h{ zq2zTC*-*o>BlC$p5d0>nGt>xLh_Ne(_PlR2 z9P@ex>=;Ds5I)C&eTmO3e9nTNh3GhK%luEDYvH%-Kl=Vpapoe%I<)6XY@el3KdCm- z6`>0ZD}>KH_)y-j`1~IF3i{YETke1Qd>g(CQGPBo1FDSu&x7W(FFx;u?u2fDUPa#L zPl+P<9Ba~d;jU^QcK5#OD{#HfRm>7W6XoG?W98|9{Z~@XdgR zLAOEepyMbTdIochebrWo(yQ^g6j}hyfgXV}p>${{L_YsTec;;-Y6~@k>OhsC|5En< zluv2YR~Y&m{X7iKeF^8~3vfOL?Sqy;^Pnf8N1z9xanK0p4(JxB8`K`U8lp1)rmgU4 z2-SotK&7Fg(7%<_`ObeRa}xd0<;ea8`~dVNv^^i6MCJbfvJLsfUIG3Fv;dj~ZAY6n zKr5i;FN@wldI2;Sngu-sO@u~6L!rJM?y_}2N4WfH}!@*m2U&Bvz% zcoK99eWvTG5c)a}pF948$k!?l{ujK7ecF52zpW7cwjAf4khT4vV|;$ZuY=#+AHpB! z>~!9~ANm8j6zA$ap<&QWXfyN+R2Ap+w?HGI+0YVb9YjAD(+au+x(}KG(XZL8fIfi^ zL4QHBaQ^=?v=aIhIt-nLO5mEHD%1?>3yp!MLeD|Vpe@k1&~H#7TsK?+T?^d@&4Av4 zwn4u_DY$kh2i1kzK*Jz=P4Pa`JD~5OQ&4f7J63_xpxdC)&=lx(XajTvIt!KBf$L7_ zYN$Ij7@7dR2yKDBg?@ty;(Fs^s6NyV>JANtCP2SI1?jp2st>h;Zh=NZ^wWM%LvKJE zp*_%1DCsjCyP!HyDs&@s7nBLjhF*kThc-Z8LBBwuUAVS{YD2A|UeKM;WatU#6=*HA z8#)600Xe&4u?wNf&{NQB&YgpNW< zU!eU^9VivL5t;}+3N3_IK|7%zpjKbv_zew(?uQFswnE=QC!j)K#bTF04WRbW zt%Yv1(9r=sM^YXe5*cJq^79ZG`qfN1>#z(Qc>?lnUJl z-34Vrk3cU%??E3!2cSQpqTk@W4{8i`g!)2bpsCPv&@0edXg9PU`U5Jm7yEvw5tIhq z291WMK#xO-(k$422gwG z2Bj*LG(`&JPo}8ZG`qf^zR`g z?Z@~*b)Zz}M(8dm6PgVzf!>2QKwm+>K=^rpSaGNdbS2aUx*fU~nhwo_=r;~Ng7!my zK=ki&RDc>mY0z!ZXlN4jF!Ut!DzqHh2OpOxo1qa<1eyaafR;k5 zp{>w&&@t!?RP1~752^_@huT3i*2!4Wc=?r`54S#xeEDyi^lE%=fUbP)Dd2bUV~~Bi1O?1-b+C+uM9n`acQ&qo9etg&zuN>PyN?MzKjEere?Ae_3Z2G4X{P`2{3ZmbBi>vVbSE&5eQr>mASK_;N zExgs`k7sN*zn9&|f}F)qjh!dn@}lW#=k8k6Y?C*IA77D<|NAKa%3O=v9Oqe8 ze!psOZ{>fh^1ncAH()vC|EFsICS})E>*+n!-rtq~bQOQO^8Z2g|814ORM`WR-A9$b zOWC(8o8I;Fk2k&l=-Hv6eJ6(gurA@rlLgD;Sf2?w)@eeH^$L#v^Pi0q9~bL3 zVR@`i;wFGC?>N}+Cgj-PCX8cvTpa9=6UM=IkT4FmhlCv4MM94Kb;9`AZzuG}{yQPZ zemr3uY<~&;v0qQfv42mkvENC^vHu|s(Vw@Tahyr$k4-S4KaL{_IgURGIgUdK z<4YW5nZG%l^z0gHfBcuS-%!VgOV$4Mr1-l5>C1yW^rpU>RC)TrV&uF27qg#dw^r>t zuG;ghvP-Jt&FiXtCzStusgM6l|9MCGf3NDlQsvW^U;O>6Dz@7n`dUJw{pwTs%>QNi z%v(-A>uXUy+v|P#_#ew>y*$I6h~H25%_n}neD+UO^NF)9pMLGihhLD-cHcOketn!z zoJcsq7>3gM~ZTB1T_27CZ zVg0!7Nyu^ilaS*&C?Uu7P(qIDBH|FY(>;&C^-V&5T<0X@xZX(^2iGkL{c$~!kmI@{ zA;dbNyu?Ml91!NBq7K33Ane8(q+8C@6V@S zdGOm^#OD9ff3V-dpIh9){w82!KNGOAfAQI&&{Q&g<*}a$*x0|2?N)&O3fcT$`VaOe z`15S+N62@NZ~_7edc`-gyy{X)Qwkm-w${XoFR_8+jZ-3M&?UZcM} zwsW%G_ScZ|u04mc6YL*w+=Wm4_Kf3iLXP8bLXP8cLXP8dLXP7zaftrxe#LQcoKEPE z<8?xg<95P0IDRMe$8kF$$MHKM$8kI%$MHNN$8kL&pPx^AaGX!*kK=tpj^lnpj^lqq zj`IL;Z(R(4<=LT7CYj{If1xC^U0LAV5%71M-pZaLkPhWpouCKooH-T+j$I;hc)?Z(LS+1|YEZ5gNmh0;;%k}k_ z<>vY;uATZi%lhl+2)S_4SeE`ufOneSKtk@cJl}MB9yT`{3=!w;h}9 z%5Fc7^C%}h`*E=iu-ifWc8GHDiQn$@`IK#^IiFH-9Y>!xS$}=rWVt?XvRt1BS+386 zEZ65jmh1B%%k_DX<@!9x^5A)pJ1@5XdS1-_FMgac9|^}vPoqpx!;*ViqU<2;4h85dt)w^)CD-D0`EZn0cnw^(kjTTH!<^BDI$z8&BR z$5Ee0*tq6AB5oY@`GWP==L?qW^99TG@!#_K`HZ7J{#$>2{I^^m|1HW}7b-}IY@Kbib5@$#*0^HZKes-~B3ZJVD= zzkyc9%eS_hPrrQT&o{Q4Pd}`7k*~b5O}^uN%qe%glIbV-&~5`l)@BM`fZBVNmv8Mr zehZZk+s&u?Tl(^i?dH=Dx3%)+8{6g=r25-=`PR1iNuO}aZNIf`e)5;Wd~4f$p1=0K z_%y$;ZGIuLJA3)ow)x5QlXvC4d~4hM5dHd{Z+xw7^EqA@ue`Mb`CU~$>_Gl?Dj#+r z|9X`V+vX>!_F3EJ7pDGq^U7O0kl$V9!w%%%pz>kc{G>gc^5)OjHlOS3p~}Oy`9-LG zJ-vKu+x(>9eTR^>ZGQ6CNR{=NOo8vSL*rB9sl*Fa8slc^u`wGx~h$ddXwQYV1 zC$^Z*7~Or0Tb}%};&+ zsp4LFYuo$+YJFKdkl)lR&-t)zeu`SZ)(+%X^U8BRY?JReLu9?VV4u3rHB|Cl|D~K_ zh*T(vel3vx?qK9ycUX?=ef-69dA}t-j^U;~UVJ%^h>s)p1>?E&Bc4~K=J?KsZ9C=u zV0?SzK4CnU`-Smb?i z8M1hPT<21I;^qt2%L%!>*AgFJ;+QZfDeK9zheZXT;A`A=klIUJeT)<;<>!{6VGw~iP}&9!JoH&zz+HL3?l=oRG_N@A&w*4o>JV&%xvUaUG05Z+}3)!RWVd=OSKyA!Q#*_WOrYo+HzD zTr@UQ@MM*5ZIkaf_e*@Y!f~oSB~-q)^?6_s)!xEv^MAOVbGYVENRC(T`Hr=1yW?yr z=dP=eisSa@Z5bc8Km0G1x#QzF<>b7;&3{n(>)H>g_J1kI;R|p(nVNW;zrKeZxIVc5Rz49M@!lc-EhTQY1H?_FsNAlKZu$`XY&+O;fF|{6VQ|;&%7$3*^hyC6DC7m=qz&b>W;yKo1 zLXLF_&YeJnkckst9_uqY;fw zP^T|Ke*SwKVkXp{?a~z{P!eR>G?;Me~UnWLP_)s>t6q@?QZ`j-*M!*niuyc75DZ) zT)cOn@<*%uUsZksmH)HKZ?E!CsQhbG{z;Xert;~xc>Uveoyz}1<&OyDhmwv{ahe+b zb8QQpWvcu>SvPL}g;LJgp=A1Z5q$Bi?fRDu_|rXc_IL9y57?n370=qP|9b&{$N5s( zPbm8$F6qtx8fAZ_YbJR|ADfD_gNihl`6ki`G2SE zL(1N*>}4w6g(`or%70tgeS+IlvN@k%FN}+|IV!;>0e{D7tL%QtZm0HxT~z+n%5JCZ ziK_erm4BDAy9Vq~$|1D5hHt-pRK~~lFD}1=s;{!L@ypTp^VZ|oz<7sJqEeq5-`MW> z-5>N%+7C}Yv~Y=#wT*u$PKRGuT-`X}miTsQB_OHfv z^M6EsQD45XZGOrR$ZzcBTifO*tNvNr&8PiGIk&vybeH)6mA`Ikey&q?n(}Y0?3T)I zrph-}`At;5v2Aml`T_q?vT48RkK^3ODZ73`$@H)HU_F`gu5E!cKImUS&6l-}e<(?f zr?qW<@&VN3jc3T(HopMvk5j$&Sli?~&Mkrdhmw!Lzmn%~Z5uB|wb$A(rKRsPi~-`Hq{{IyW|ot522#iM_}z?)yk zIVJ6N8%+O{fj_^oif3$c!e1yUPd-g~YjYuAzT@cYCMoAQ`nt(-ecfcazHYKyuAAI$ zIE_-ceYRbpWxOW5{2v47>yGo2Iu8rp2MHww&r_`J^;7ckekH%h>ebUgjbCZ8dDQ4X z+P*~jYx`1_f1$E3Qt|0up};)34JxPd%d7m0mHii&w8cXy&rmowo@+A&PkCPD8{6iG z)&}#H?KqdK`l|=p8%o}S^8WWijBVp{es!;X*0%Xc>Ie_z=@ zDm$#~1Im6twfB2vFHrUdRlZ=r4kZ-`*p9PO*+*5p*Ok37V26@d!LIL)x8rPA@jh1e zJAv}J->2+9l>M%<>#BI4Df@F}f28aeRJ`Q@JCsb%w>o+2iRZhR+dr9a&vu+6D*g^- z9|**EoINUkhRT;a;p~K*P%^DIuf8}tDLB85(?a6$f9XGU0^1Ar&4K-^YugH)g33Qh z`TwKZe^zX_zDlZme^tJw%GY)Qm4BJCD=NDx+x#E2Arx9~T5@0De8zIyO>N_SCh>Rs zF+Nb8SG0Q+BEvH(X5P&uec7mETsar#8y&rtEv9fBav> zP2Px9X*a&M9cR9jxBf{VAXU)wSGMDfm-f2;6yNV}Y&ZWym2YgDpG>yDeaa5$?SHt8 zk1cQWt*z zl>aj-|2dWag36z#@?TQ<+I~6UA4=K4BVpI0YuoYR^-#zgA8XtE6q>)?D*k+fyy_w zoe*cGiuZM(d?@KLMDyS8G`3s*u|WAyl03(^*{*GYL;ujI*S=8FqpW}w8zz!upPT9Wg)7YlJ zp%gWK)^^9^!9YC6S*`4dva^((9k4@5sy)_r>)ROccbuup{!rNy19m7y#kaN_e@npM zaUNFoj({CXo~g#q*lxT}1O9m4rR;Z zy9si;KXvz)s+`*$=M|}sqtbs~RrZ_8UaD;RXL-H#<~Y-poull>#daGogHx{Qyr%qL zSN`Wyb-wK>BIVrx^smJF^9z&d^WU!G+MVh&y28#b|E%QO_J!sL+h=Vz|3#G_v>oSH6@P%L|5+(-;yKO|?uysGPn6wQ+2ZN>_X@Tr z`EA%0-1+1C`5+vGK2?4w>u4kL?Ik@LX z?)M(#_W;~>8SeEfDbS8kQjGiQ#Sz;+ukhjsw{b#AW<0nwt-s*-gbGl5)7{zFO)*IH@=~yk5xQl+juD|-`X}mS>;>X&8PbO<9`bEdGmvN z>4EbVobLqMgYBCm+3~~gMFi|nlDYrJrD#0${kZESo@o!(OTZ4LycHM^$JrOmPojLZ z*Tl#DWYylgm0eSwx4Zt2tNa=&f4a(FEctGQS%LP@cVg+!jz_2fwa=Sh-1}DJLo3u9 z?@%)NV?Hqx-QfU0Sw#_d<{vEyY*0%Y{ zi=C6$WNiCF*0%XcZ%ADJFU_~H-F!Np`=0-#sPfYwg9iwvAta+Up+=W83^>)jw<7{3N;`@1GB2+x+AuYP}fSmL%>{&B4@{xTi- zZx3bPpzK=%^*hc&Ss!ls^8)chDfE7wHy@7kygI&@5`VY+{6KlfNmucWZTb^Rrufa= z{)z2dH=OUSSI1eQ+JB#lZ)_Vs<$J_$?u-8_x73bjD4E9ha$i3A*Hrdpo}EPRS99E{2vKg-?v zLp1K^d+iA=qUwC(_D!HYj&o0-e%Ce~kn5C^zVh#Ij;+semP&c!k8xJxey7ZI&JP;8w&T3a*vZRv;UCw}8WwTt$*UVYd;l|6yudF`|{uT||7ZgcTon~F0@^?#sh*Fx3q z=T!dFs(cfb|Dvj|v&x^W?9$5art0sd?Di`D7kV7o_Qpw`bMyN&sLA7haU6cm0q%|0 zwW>WU)VRxYR>ygP5AI&MSJb!^3)rD#{XE@#uYhZ#rnFW4>cqC!-apyKdmC!Lg?sH- zp~hp48jn+mL+cyY%f5bxl7xG4rl~l0sCnqB+V{6_e&zaiRrPmK@`cSJn1A zT;<=b?7_+&s_aWueJ`l^^OSwQ@_$O@r>Xe;l>LwLk14yUiXT#TF=dyM?SpHfWHVLY zZOYcil_WLaWmWvgRDAusjR{R{dL|{IivR1!cEU?a5U6jZ}X-sQezvUZebbs{AG@zl5?o2HGD=dO@|Xfbt)p z>`|(|3}u_+6H^NPkjgKt;*C_>cQMtTa@t?z7ghPQ1O3DIveo=`Q{^kF@`F@+o>1}H zDF2zNe{)s-B2~V-@?W6xJF5Ins{LbC`|nZycdGVtcz1gU6_|$d*SfajOi=MAs`8ao z{lk@id)41NRemqkzN=J!?^pi6Dtm)!PbpR3DCPf%%D+{WzfIZ0l|4wsyIuAFCe@#B zl|4e)>jSp@UW0#swLVaPs6YGxM5vULMiUaW-JR6}u zZ~xgu*;grhrHZ#o#k*bkKdRbyhstlQ?1L(PU6r4zY z+YnwuanhjIppw|l-2?4{8lQ(>m4*I*ZY+-aq4Fj0i+s>mP(wTt9tnK}RmbDvOlS>M z7LTgOKs%tzaTw2nK7eXo;5ZRzC3InF#~B5E3?*HNr}of7=oHlHB0SB3jzO){Z{)hUNx5`cC>Rm$V85wsa9d$Hr(39W`oT;e$Wp=D6YrRW2+7&-%Wsen70 z&~fP6iuhNxpdX=Tm2hVa`WC8N8GV9wLDj0@U$%m_LglME&TwcgRJ3Ub@9{!dIZ`7RjY?Oq5050s8)THg*HGX8sHmv&?C?us9HnJ z2ecY0+z9gl&4Ye{n&H&tPUu-^2UNZZ>V@V&KSNEMI?jX84ygQEY+yG@k>!H%v zE%b*TgFb{xw#M3r7DInPty9rQXb)8OTJ#y32OWVLw!s>LwnLY+#r6cf1D$}XwL?Fk zWzauRqxO!I4ZQJyfzQemNG(fYv|-u7eLW8~O&Sc0J}B%7H$IF71YSgL0tl zQ1R}_haQLiKlZKzUWy{=*Y51&J(7rsC?aP(P6Tt}5IK%RnV$R{i zoH2_z2Mm}ahvCeM`AnytIeq`?+S=}ZGqbbty_MbWU-fi#_;+=8O;68EPtU(WT{pze zuAqsaGeCEN-UKZ@mS{cDUZAr<_kresnm59E2HF6$59mD51EBXooyMU)paVb`fo6g} z2Fi|2pvypyfx2x%G#+#j=tIzQo8n0+Xa=ZxGpt$%O$EIL z>bE(@8PIK@_dx@12t`lb_X2{dIZ#UE64@90Q5d+;MPbBx)0Q}4cZ)Z2Iw`= z5)+7a1>FSt0kp`rMB9U|2Ymw?vK{&Z^bDxyKZv#jO#^)fT4j6mHRxK<*Py{WU~B_D z1?sUQ>IymmGz+xAPT)bOf?fpm-WjV~LC1rh1I@n+zQh6@1iB3LDClEQmtD~=pbbHj zL1%;B0MS1oJ7_J?&Y%-Pvq1j?^_mF%2VDZ13F^2TR``R)g7yJj0Gb18nuPHfG#a!U z=rqu+pqD{?cE{BgbOdM`=yA{wpg-?{uiQX0LBXClXF-R8?gqU9T3|2eJm?V6C7_w0 zPeAkRjny`wO+W{NZUoH+eG6J>GR6VWX`q)t3-5#T8FVD*3eel2Ui(5nK~q5Yg1!dz z-;Zbl=xoq)pbq<^zd(C~E(JXg`V}^ebrD zgCGy+WYGPfw?V&vdLN8F0__Gm0dy7U5zrjaLWf`s1dRpl4muBXFX$D}x1gSfVypp; z1?>(x33LtUG0=OUZihim&?wLjpkqOogPsO`1X}QL^fhR2(8Zu9L0^G-AAxc~n}Lo1 zT?l#iMXzUwgOE7T?)Dn z^Z}^HNzh-=1kkad8$d6CegQ3cGR_0go}jZq_k-R8bvgxg2CWa;2Xq$b9?(0W=2LN= zfK~vF2OSK$4D>MQT~Kfu&QZ{C&~~8XKv#pF0DTOi(=pzFRtIek+6Qz7=tj^}ppQUJ zXJBpv8VcGNv=``9&@G_nK_7xLXX2aztqvLo+7omN=sM67p!Yz{XJHHljRb88+7~nx zbO&e_=o8Q{pl<(1v>0eGXk*Y`pi@E9Ko5c50(}qaIThy#XgFvS&_vMjpesQSfZhOo z3+i?@+7`41XdTcFpnX86f-VN#2$~6c6ZAc3-gBTYpyfeBLF<9G1nmtv5_B%;YS5ja z$3QQEJ_G#(>Ub{33DDA@)j%UaV?h%@lR$@q&IC;Z-41#J^eX5x5S@oNjG!e!D}&Yq ztq0l)v=eAg&_SRRLFa?60No0j33>taCg^j}ub`ImalV571X>aFSJ3*PZ9uz#4gehw zIumpuXgcVA(6gX7K_7v>2Q^)QITGj(paGykptV3_LEC^Pf(`&313D9Q31~X#9?;{U z7eRACUx0oFb-WPcGiV9W@}ME0zk|ku{sGzpbO`7K(Al7ApqoK6Ku?2S1kC|`0s0x# z@gkh}pv6GTf(C=u28{!43z`Hv2y`6iOwc8u>7aW+kAq$W%>jJ^`W{3V<9q|n2kHY_ z60|I6bu z`Y-5vQ2J6_%Rvi(76tVOtqfWdGy=2^Xe?+m&;-y7d&{_ktbq{%1WI3qegn-5>ILcxS_(7(v=Zpgpkbi3L1RE0 zgSG_y1GFn>Ptg9L!$8M?P6nL?Iv;cy=o-*XpgTb`K#zi+0lffv4KxSzG3dXb??AtT znl4A%fO>#>gBAn*3A7w&RnQR7-$0{58-g|kZ3Eg7v>RwL=pfLMpyNTOfzAe91iAur zJ?K`@J)nm`Pk^2Wy$pI2^gifQ(AS_JLAL9X1sx4K33MjtJkX_}t3fw{?f~5ndIa<|Xg26o&^w@yKwp5q1^oib zT!EF;|h_1vn1vC$+C#Vl-2~dB~3ZT_NLqThS)&*?@ z+8nekXlKywpnXAyfTn;>1hqB+@$240X++aP)Qo*wy5n1;`KcFH;Pk`aQU>E`(E9j8 z_s%qtcB4tOJMBSx(%v+g_Mv@gKN{ZjM|=yl0M_^P#~Q35^cNb2XII1Vescu=Z7~w- zGDqQC>Cv0wKaGXki^jvck^A=6>dzv&jj}GHF%#)hOVWX>2|ssUw1a4 z9kdPhMjt&u57NUllfK5TI!$yH)>z*_x6mClCEZMCW7=~8T}b!Q{n$IBchR-o3-YCC zGTaQ-IHj<+*Zy!j(ZO)L8tLbu!{P7d)%JZ;+XJC@ov917GfgMbNwKxdSEFzpPE57X z5p*O?q2uWU?3eKveOr-wg==)Asj1tGe!b4CXuZyBvwBTQsMqclt=Fk-ReZv7 z^*W)=>UCT~z1FR0z1mI>Pe`cO8WpYAac$OLCneOYQ$_35cKvlqLcN-Qr}a85pLcNato!0BDgnFG*(Rv-#X5+@xgnF%4(Rv-SFG@7Q`J}AKb6?HFtV)w{}5O*X-Taa=CjAy|2a{3u2qiU7p_K^~2pA->L74d%Ps6 zZmvnGZfzH-Iw$nt?U1S;-IZ6ii_njLZ`i&ly^oV56WtQ|;xw!}k|pU^{?;nJMe=KX zQhSMhwMTm;NharGdq~zXLHpzMs#<;6D=QE0c!XzbaCgBoL;L(~2+qS4-2=Co?t{Aq z&44?E9)!DV_Q~7L=9ybhN@t&Crp*|;5O{vBIR-}_ClAIGpHJvhJcZO}avNYN|7Y|$ zHK+1DlbcY`Q#h^1!;mXQkHXE+6L34yEV$k1Ww`z6Rk#D_4Y_ zzJNO>;;GKFxT^6}ou}~(u@jyF%|mZD*{4?T!mm%QUTBJcQWbu#6Lo!CprHP6``{}` zy+*btz9^_CW>>W*im$={YODsnE)}jh-=ZEF`T=f7`VDS3;>|$U@HFaO^PKSKtVUHv zk1mXu|LL>z{O7f+NAeWC7BooPzwjs2^2|1a*3M7|xE-kz+-}q*ru|zw$Qd2?^trg_ zvr+9|Y8~b=b(q)GVLrH>XaTtXv*!1V4$WWDI$R#1L#5Us+z$()4pHYpW&7dc3f95x z2kC*{rZ?PYmTF;xDNswJJX0wC^}q?$Fh=WiPzxY<(9z zlveDpNcO!nztOb!x@(yCnd{@8H|oAx?}H0#uR*5020QK52P4|66xYi)q8{zv%R`LR zLmjER<&}C`O-Mb=NIl$(6=H>-s9US7B$=C?oY~N9vAwrLK)}b6q3#7)R;>zXPc^Fj9|or0$wm>ghG1A>)kH z;~lA&$SZZVHAKe&y+--tz~*_cQJa=^jVgXch`aJd*15?2#+GQ!?zFXOS$AG2D_`6- zFO^#D5`KoD_j$$MD@}mZgXsv&Q!e)IPd|lLoI`8jBlfefGvZ|>tzhYgbwbNyP0@;2 zQM5AF6NRPLb!Xe>?dR<}EMCT3#Ljq1ZKEAc8yy*HqyL&V+6%L+YPM0SQtxb}J}M;j z|BTc_tK74tO1-O*`tXp{pBSn4tg_UqkCXE1?G26g<6#+daE>bU*lYb?A>+ zBl>D~ji^4E{wKC3;@ReIIPzWPJ~;B7OkwTVt)S=9N$ofp?bt8d*Uy@ET&&&NG5oAh z^l@LOub(zD{;lR@+}~-(Cyb0EYfi=k9U1R4GLC3B8ReXjHP-IanDLNE&lz_`b?bX` zUg64bcl1e2VdqR?PhFDEnS&jDe8aTk;_cRsap%mTj*M>`8Cz;j#={*M-!d{TS#vTT z>BxAmk#U)tlW~e8GV)sG z+M1i4RE>%M^%KSoRk@9}| z-$uq~@FmbEHFZC8mebdF7#TA))Q-}EQym#!HZpEsb26Ue=;J*`#wj%?<9UvZ9~&8Y z23%WX_yta1-)&_41?Nm{$#{_?<84O9pK4CVOB@;hV`MzD-TK;nP9Y;>7qnM*S^#d; zJ=Z)~r^U}F=EaepPt1=aKcCQhufp!RD)XG;GUuF`W!mw?c5BDDd#-6tUq5DK+_~mt zywZ{Jek0>5H7DcMPG7%kWE@a)GG6P*_^6R_V9m*Rz0=q48yVNHAsNGSGxr&3Ej??# z!D+|WO*@XMp>~wH*-efh9#pSR2^1g$9xI^E_H4%fc zzM6NONm`+q)CP~WYa1j<_e4!d7kB?5Pq=O}n)6_r-w7wR-BUH)cF#aMy&e(A}MaJtL>40%>S__ z^e5a;o!Y#gw7o>H<5q+9!)nU#H(L5Gq8jVK3X|)P?Iu@#{gU&oEoZUXUhXaqa`*kQ zIRj;UI-||?UhizH`E{4pJ--ewRinD{P`mZXXL(27Ps;kzrm#L4)NXx}Uso1ybGf4S zhPe)ROhf5*thQ~z)$-;wy8Vmh0*#^JAf^X*L()mO3>_zP$3_{!*MTdoC;l1ui1 zc2_Fz)#h?F$IfkZPV;r%GwaI^3l=q};n|Xoqu=F4{wC&}9cZ2q#?6@+pJ!r)&)I&; zE5#2b&e`Og3_qKdYggMpl`TyFc58F}Q(b6_Yij;^&VSqd+EuuY{+3rqe<@K%^S8%w zZQdTLqxt3fzDDI*t48HItw!ZKwaw+yu_kEFw>v|sxt!e@3e(|J+Pv$iRf^hC zKk7Oa9!EB5^Yc}8V|3nL85N@&h0Ptbj4^r3ShuV)qS`lneot!i^Sdy)_OA)K!umL} z&Gj*=y~1*B+Rk#t-Sf_0qxZbBCZqPAL2c3I{iuIlbgviD-!SOA1^ez`SaVCOzl;v0 zVy{>FC&R+a55L10*4)97qj(v*M!bW`-v-I=RfaWZvNEwe^LuL{^Sx`Cr)XIUf7j#7 zG+$1peDZXQkVoD_0^R4n^EM7L3wP9r>zl6U59`AksP(!2c` zty5N4hBbFGE9d<`Ll-|@>il(V-udeWWzAnJaa|bS>bfwl$a^W(NqJ5kH^*7Bo#!}l za`kU>x%8hm@=Ztl_Z#w$@~D4cUDPC3fbOmSM9%kBygETw@#|e~;eUm3|8XOKw+a8z zCh0FW#r-u?&yta-lliwF{yV%8jiZfeJZ*x1Flw4#A%tMm6=syEWbi zk@ubNhyVBvHuarIyU`@to%WzToxj|5$X=JFtqc3pd31~OoqFr`9^$mM*5i>5h1KKX z4#m_%(T5krNaJFUs@~q{ULu+FYOFS>JPu9!v2h2TAg%lQn6=Q-1+r5_V;{} zo-XO1OW}Vk>C9BVyWZ41<=q-?-Hn=P@JFnlb-})bU7Uktb@dL_0&S-n1*+g=r$(J~RpLBD4qGxTkJ~ z%4?+@-rN~GBt<=K)2EScTSdMH&l{QJ+C#q{3zt{u*JJY+R1RMcbY?4M$=ua# z`*5pA*Sz@l9*X%-Z?t&yKST9yAWkk<4=N{7em&J$Rk&YT?^vL%p=X8Fvhb{`FrCoZ zlv}o(uW~L#w}IY`sXR$%uaz_DoGtvENczgEu=?wry<7k2Iu~D8|IR+Y4(QX4!sUn? zDQ#Q(<+4_X7@b-4wHR=glVdd%_Vsg1|d2x4$ zg_Wr@1}RfkD!XHG+;y;0=RwcrF0tcr;X0S}My{~7(3x%0TgC-j&Axe;!{{rD-u>u( z)?S!B45i7qtB<&TX1df-| zuXHl*rBuot%Ak z@_)@eAh|v}Su@Xb6P<;*&rL5v{T7V5Yn1tCUpf!<;=9KSaO_13(Iq(Y-Q#6A^4;S! z9Qp2XD8>tJ2j0tT5%~ru`(=%`a=7FxQGRc_8t%e$E!;kIJ={g;2Dou|vxUlY6XfE% z-JaQzPM^W+9c!`D+ya^6?pTYJX*kAWZYz;V=V)PxqGt!KOOrWhU(+i?v+GZ6FK{1m z|7iWYM7-C^rw6S|)Bg5L?b@pExl}DtpH~!GzhX5{dwOVdM@I@RT}KRPk}dVPwMpz=CD6z`|?T-0`ml0sUbT4!FA6#C4r(1CJb}?3meJNd<8-chNA`@6Ssp)EABwr&ZFn2B zG-is+n)#j12z8#QS5iCQQ?z@sT4mAJr@KnTx(`Llfcj+m zU>?wsI#FlpLS1Pd>Xxl#at#-V9TW3kq2!wIAV!mBdKhj?_F8%|Bx*{vezMehB#pb0 z>UgI08`UJbtL?r%jch8d2Ooos1L%?F(pySpddeU@Q30gq4AL_dK zVqAF#Qs}sHB6_ZJ5~e`^rb=iq5??Y z7^JT&fb@ew`mO>rb?Ub=YS*)@D|&$Pn`7>ai@l0B zweSv~{V>-F@I>KI3ePtSnPW5?i8{hvBP-V_7z;X-J;$g-J9UOsIzm-y&a)l%59j&n z_8od>XK~BZ3bZ1vL@U!Oxu=*qdkoK6D^ahm6|7e!lV@lJ^|KQCGpxqiXLyatGor@&Yh;bdGpfe= zYjg$MrxxZ)>zcVz3*NDn^VCV6gN>=NzS^LIeN~C}8CzrWjH{qLwV=!6jV|}Ah%Rqh zL0#6j9}~0BDkrt$v&zjYSg%T)6I)hL2P+}Z)-@*2gc_4)yBd>c`x=vHN61r4&z5(t zF?n{aF?lA|m^_mpPo>_G)xtG-kHlwjdlm4kV{)r!9iLa_S=_!AZ2L-Fi}tTE-8`_y z+UMXJYo9}FOrFCl*kAF_DvvDS{GHP3{0%>=tc9`anCw_po-D_q)z`1k+hvvH75ss9 z&Fufv+Bh+YNV8eehzwaFcwuRypo{;p5!{8+o!StTiL zCC)Uoex>yw-1>!Rz?G0>%@~br-A_q+p!*hF4a^kX40jz`5%1I}bz_VDy6U=?)+>>x zw{*?3mb|={zO@Q1U0R>tUO`FpslikDK4}2nWFQFI-5c__MuyF3(Kzg-@R zuH7yVMZcIR59P6}20zjc8hkG_xKj7ysx6CSmmWSN7tNG%Mk>l@*;e_aq*hUsZ?Y&~ zmxVGri!!S$lpnGv-<5=-Bh~D7zwT?>rZD&6e*Ueb`Y6h>S#23mlD258%xd>mQAwU_ zcS*Emb>)6(qm$O>sdlfAe`UO*LRZGuvS;HfWohr1S(GnILh);MTbVV}9+O${aLgmt zr1rTRQVrDaSxVDDMbYnT%0tnwkjg{(Yj(8yOG%@Z)=0mtDo>VGv$CvQmMr?kSZT7T z&OO-fqlC6?-)yV&DXCR-kA-6IB%|;0dt!9pd-h`QBDF61b!cgQqbT~dYH29?eRsG; zqU)?rOv2xHcW(7GgP)sl>*%-a;S%DW+(egLY%34Njv})Ao@(*S?XJZtNw_Tvd6IEI zX7iPLlA-$?ge3_-Nvl+UWQ>NePWYwEJ`?V>%zchm`OJ$4BwH@0O|~Mepp`xnN0Sr|yhXuIzEoSb6UWyB`a;mdgEcb{6(wNwY9L z=U!{~vtR3@--DMnVk^qa*;aY6q*n3grni?lH&vPR8{qP4_FT4R&y-a&c`iHCc`o}< z=(+3zE&8;K_i$_d+-)5^q)_wh<4DXrz7s9?*NC&^P4 zltgt}_hTtdrxoR`?D_RZN#~c&Ci3sg_p{lNZ!Erp_jlxb2G93+Z=^l5JMp=D1;+2Y zr?UXr|L-}pY>H;V?M}1d_R8)8xFAZKM$4O>|8&Q{e`m{iJMWHvL$J%=)pR}GNVn3R z*qun$WlL!mwiHUcf_Cvr`&+h@e`QOJ-e2(VDD4`WPB+nQbXTj=;_5bk zMBVtdm(RW`RW$el2N5;Df#;?Uum*SDW%Cin10=Kuglqa`z>E-as9SLgqFNoP)nB5 zZ{L{_#jo2d1(lYsZgJ;ZpNRAArGiS!cfJ)<+Fwu_?@_9yMr(;*nm$(ve|`HF&VYXS z1~-jwa8tAlj=ZOgJNo)x;)cJxjmLhcirDW~5&QkJvGsoD6Ce$y9igF*(8rs-4@jdw7z{t}Y)rvzE`E-AmPva|88M&hWsi@VRUFJ&?KzZv|^B3hv`_-Tx4Ga~0+ z<>J3)B$vL7YM=OCET(?o^5 zd*R5fu@sKHO0*x2yh?Ow9JyVV!O?A-3k>T8;0 zM;ZQ;#sI7hzM!eF@#3E$iFZkmSjRcN`t8=y{srOxvU|$&oO=kJiGQOkm-{P1crWL@ zLS^rfP`0+#zM-6x3(R?7DChnK<~%f%^WXw=9vRAcctTEJ&s`0lg5GYSW8fy~`F0^a z*Va2BB+qdP@@UReLOD+=Fy|SeoTnw^)ITlC2-x~+F%?>;*VVH+w*Kow>+9)M?>c-| z$E549evxtx+Brq%nKSGHxbx9vrsXfnjxd*GN0@2e2y=IA%U|uuab=<$dVe8p5O+Oo z-8M;A(z7}SW**Wz_vMA)hp*JdBWJS63%9~{um4lghJA{@{-1>&*WKpzU4h6gvx-tt zY1i!#puc3UNYJJXu^!~YaQvv7NQ?d2A&8yEXiS>z> zM80@~ogBJiFl z0PnC^yzn{yQ~~w9zX-f%3c$NP7BAd>&lOPL!$WvFf12%$NwX5iB+d7-m+!^IeDVGN zN&)g85t3i=!u|DH0quKlEMB;M-zY%7BSUz4Pa@~2K2h+mJ@T&_9(TjfU9^5-dEP2O zo})tY#N)kF0N#`kp6bE-o*ukgupWf_?ZX24?ctCd@%8$+fO;KU1l}hF;LR)o@3R8% z4hrFEyMO7m`xj-j`_~1u`(q(F;@kb30_t^qEM8bIzAHe!XG3_}PCt3=^g|i#^h*J9 zJQtEf+bLYH-wME+RRmtD6W@X7zYn~%2)v*Gyhn?`YbpTm`6BR|3&4A(2)vF3;5`z; z)BEB4YjXaKC!v?qrf~f=Ih{MnY%6~KjXraj7t(d7`QZ+sYnnJ$FY1ciEqJzeL6iO3 zy!D#K6#o0QB{c0&+yn9x#f5=@Cx&qGe>Av#iSO(9`qK+&d@WiGN4^tU3P*m*y-=qB zWi5#3;Y)PNiZoFdn(x_n=33uKgbf$(r|mzGH{EPCmz|w9B4`@t)^d? zntoYeO#@m1Uu ziZT_?<9)Q2NR+~^PyBq{qG>z)VA|oQ0^6aZSH4^=^&F3vg75LPWVe1956vATx|!>) z=ILv$zW%#B_X<9>KzeT>w0t!U%ht`zuw{*E6k0yn!hO07&~z1c6k2qj zZiz2Ay3^Khd(r8b{SBdEI6GQs2WQ^@R(1u?aLlFkKW*;pU$rfaHNs#`2G&!wpFw=1 zWUP?}Yez>etz|KCorpTNWNW&SgY{0ya*Z-_ZRcPm$))dnKEUdTOK4r(v+$e#4RIVq zeNL7j2dn_lmQUfo$nwQOxV@jj3XB$VzoRHr7TG6k9O{zF?iO|( zzDjE`k`1Bh@N4<*E@JuyG45O*54?V~DctobgBF@b%VFi_ZEe+Q9=mkBeSBSvUr!o_={j_zb&gc#48SXD_7rt|ne%U^oa=X}+x{7fL zv^Kuj!!@+RI>V=3w36Vd+yO(T(uv_aC(T<#Z|X+(R-3`r}&@_ilKD{o&;HhsAd(x{GI2Dz+` zCH2L8rY@(KT$i3Ef9bmLk!g$g^7YNe{-|evIuPy<>VWg-Jo=6H?WC(jdCk{goNF!F z^Egg(S2WT_>8y_IaxTibEa!}zxq8kX+)36p^fTq@$S1jEoRhqVLegeB-1N?oM(W`x z`zhKGZaTG_8Lbx0jsu03J;f_KsjjQX*457$o+}MRP90bM(Ya7bkI5rxc>dEL<>~y# zpX>ONhI1}ma?U>#m@_>3jYQ7NBgZ|})f3R)1L$Pa>#1xXALr;QYwG%~bTwQz-XE~E zR^j~#qjM(dt7z(}Mr%c1#{nyyTFBE^zgNO7v~pq#orx0q(^S(!dN!Z#v`}GZ^Pt3X zWYjp%l=BVdi9BkYlTc3heE2KMi9R3vmI(LZ0OXABiKLv1m7Mc0CFfkSkfTZ6?hvk!cE*?+!;k zJ(t6C2e|`~wz~`W7R``ZXA(Lyb93DT$(rdtxcz8`k#Y<)`YAdL?vJ!uR7lvr4vq~!Kxm;P=cC&z)q8H&FNPoh+(bKWl@@%x--ZYu^p?zt;-1mwvo0PAZ zl>PFie9feM!=$__GG$Ut-$LGgBz=B_SJR}N?>ITH_Hq{5AMfVcD5zsR1;s*yTEeGSYZ^kwV}L(V3-qjT>u zc609EbbL_E?+oTQ37GOE!o}R)xxa6X`IEu?A%v-A{$}ET3B_v*N z#N&rQBFfVUSGKJpWb^aL(-1e$IuUuI`bn;RGUhgQmK6`J>)+8x-rTwM{iD{utBLO% z8{gf;ck67g;rz{!=I&`?d&I;pWMX@@ijAs?jC~6ueM|PtZmn;BFj$KefFw(Ns%eq+FI{CxAVW3bn@*q(^8fFfYtqdBgS6ksu0ZFN3qQ!TG-|j=Te% zjF^D-h1*2?!=0BtL;O*cMkudxIxsip4M7UYBdHHIIS(~?J}`MS{&0ltM@PclpQgY) zfc8dw$CP3o<6vsoaS>rBIAMx?lEFU3V4r5N_cz#4y?F-WTS$6c%Q?%z)bA^$=e_{W zhcq?YXHj_PICxR<=Q;6O-UUv1S_f&ri;y~?OW@8+Grabb_{&WEG!y@>iC4@kV==Eb zd9F2i=6IObBWypq0q*{E6Wjx6E5zGAxg{3!Hlz;d4!HBuYX(!>?Jk5hXV1EO(QZ6v z(K@=le?QXg*GdN-@X8Zib9MS5?w~nLJk_=KCC)#H6}#ef${divTfe(5J}rL@rMg!f=meVva{l3hlNz)?jqcj&hw4 z6J);<*LHglZ)lsT3u0R6T;yqLm1mxaJhFGfye7|i$n#xJg0C>{uR-%6rkO58jO|nD zx%m+@kS;=u?K!FG0*L8Hw<4x>8!TvIj>*Qj_34e6*7cEc`j~RA^U9I_>1)t@4UsF; zqKHY+Hs*?=ts^muo0z@47?FBOgLb(m^&b(|On-vgLemiQO|Es;HSdf2n|N(&(cXvA zOD#0e#Au7UHC-Mtt!pa1u%anP^9b58=A2sDphfkksg)4)O^R8d?%QEetADbCR<(;_Fm)Xw0@dp zjZ7ML5>QffD)OD5lXEj8=fGC^-pgW(oTnhoUbw=mOs5%{&M-1*`%TEzSNiQN#CE5t zDDOWxY$<=HDPLuhbZ41#iZwMWlk)mEc+Dg2y_R^ckq)tkp_J!Fknd zNBwi8=Fz|2Dt`em_?%W*WWKr~Wce`HuNNVWs~_@oVW4@UpnZP{(ny<1d&v`(DL}qA z*Up!jI!!Zm((**+e;b)KOrChWpUo?H($zzMmno&(oS!9ecOV3JRWJCo-pM-l`T)|^o$96&V*^7&ocS!IU?ny(VwHh1blfF7L+gDO=$@_ISoya!Z$o8Tq+soi^r=9J&SHShlaZ8!2w#L1N zxK6pau3p?5UcO#l+*@7=GV4{$9!P1+8{y@9$HUyfi|g)j6Flx++ zUdmKgSI!{IiJVQ~xOD}y*^3*UZ3&6%=*4vg$2uW#UA?$&;B0$#2WR_lI4~`@wb#}? zvX~;-c3#}h*?dx7&un?Z$xK&ek=dYXkNjm>xn7}H zXf<#xIXOFf`38A$W4*Yc9=8ZMi#gaUVUQO$1aY>NhI-sEue|-U`9uqbBaY8T>4y;PZ&Pr# z?wfmYTYB8qUP_tOYTYMzaod5j_9s_6FCFT+7+`*q3|*6E&8`D1b?I{X`;hZ#)YpG!x&T2>jZnl5{c{Mh&)m5d+7_CQt4EB0!S=$9^3@T!eM+A z!?D+<{s?@op*1Y|M~3}2m)6D-ZH_;v5pA6dnn2sp_OLtB&Um_8oK8%nNwfzg>%?BU z(vo#zGScpgH(>|T!FW%5I2}n-=omUKhv0jP)d|9zJhpmVplJbSB8;S)lKwAtw6{8O zWMrF0WN#J37*o>8H;I}=c-PMlCzI?)ARbag@d$gyiv zSHJmkO)2rL6J08x6O55xC#1Y6w^*I%0-fL*T2s7EoK#mj(Ft?#PG~MU?%A|wj7~^A z>qMst=mcZr*9j>v$}LtWIzcD6hSn6X6Q|UbPRx(J+2==d$+2S-Hjjuj63;p@e+6`c zG4kt#lo#a|s}u7>C%A^z6t5Gf)v-?eq3I6|orsuYo>9j-aYoY_4V{S4iL>fTC%O__ zGHzE|scEGcose{V?dV#8YX@WGzjjD@QEsu+%!2x zC+d4XaZVlU#M(`3H*_N6+Hqc8=|o37$K@xvay+u>$QYfFc)oUYtiZK{G4fwKq`WA% z*lR~eTsydi))as3xS+0d!oPO>nE5ed+s^gX_qF4qI@XB;nhuB=C+b@#E~#UkIK1ib zhE7DxCoZcio#3yhn{knl3IASn>!z(^bfTW_JFcf2p+L9f zl<0Q43%l;#1NSbvAE6I|X2L!O`(!Q^dwh;Vo}uSyHoXMjE1=gwZ#foh*33~4y`Qxo zVJ#TjPqOxN?0NM+vli$_r2Pep%YsygRL4}8RJYW8sh+6?c@b%ZSva+Ds;`M#EVX3L zVhvzQtz_z-V$16>eVvGa%m&qyP7F*fhc;Xx*TyTsw@PXi!>2>pr6H;E3`)PXVqQ;3{&smoJWqJOT*_7Tzb@ZFfY(eSsxeGrXQ=p6I*)Lp523z%chFzDR+$#cwykoJ+( zg^nY--pG|G5g?ugna;_M<35}63^cT_HlIL@U%@)jE^z$ ze;X*}MY+X(8`uXr!8Npobt2!lf$cL+yqoRQ_Mc-mt{qla)Ym>b@qR-m60RLlPbMU+ z*lS1e&nMbPCqAqho#;z!$+&!sGm?(y6Mda)N2&LsjFEpnA>~E6#p*;~Ts!=l<)2Rw zwU17GTr)b+xORlkf=^PPp?|)}_7TySsjpMtz;ep(;1=_~Bwsb5lyA!q*g9lzyD zOP)`pFdquiP3h)z$8_g(*L1gZ_jHeR&zQMg@$WlihYZ~*Biue3BI)=!WF(U&`-^>!*$?AHKdpv2@;Fg@&oO&t`!rc6s{I_ZF-~~uVwm>1b}UpgI?*5h zL+g*0&||oTBt+tQKGEM9CrX`9Fh>6Qgp?QM7CWElk8y%)Xid_5V&QaO^v`11KEm@n z`1+;$8NNT<2LV;+^NE4!<Pn^`D`uKSN!vd#yFvEXOHbOPHdL#)5f(UZa*v0)hM^vaiZ9J(Jj*Ty~mk-e%W}A zX~&81eaBYmdb;n>brX8DE#vznzOjCydTZ~tshMlXQrNR`DRjRceNC{O#Pb|;sS3<7 z86*E3Q_72Si@kO%g*hhI(3+$lS|QeKo> ztWGQdo$zZ`n>z82n$d~IeMk5#*de_W`iDu(PT;LA?l~s!nYxU(XR1ZAB@q5-qbB*j zV=`ph7qnBlI(w$7B*{nK=XXl_b9?~6=b7xIo17~;1tU#KKb+n>b{}2cS$H4-te<_w ze)Gfo^!ie;{QjP)T#7Y2q<29ICNaB!x3*lJut>IqVs&B{=mg`mw@$GBR!S!rDZftW z*|H3}#roM-4V~aptodhp67+#d%p~yE677MQz0-TA_k}$mmx|N+9ETj7J}iA?`e>v& z4s;^OBH0p%PRZdMiS%qw&)T!nV$V*Wm%cE43DR8-X|6O9U6Z~(ePjBT^zG@p()Z>N zxLj*yq-UfbGI5WjAJ18$r_yRA?XzjNtxg{c6X~m`abgzQkV(v}v}?;9Cwwd|qqu9w zEQ}M3)86C6a@ZffQsV?8iu+f?F6qHWqH6rBLC=Ij zj;qmXIJ>{D$Q+ZA@{bc-npn#DgfDhIX7n7>Uyr$(*8s1?+;?yyzE>zlCwTpYuM^St z9mTDm*eM;DJE7{VpYR$ZFEa@L5}A_zsvnEah!e2iz$f@~j z={GQc^XHf{Gvq`ZQ_LLm?ex0^%`ra!u9)OG=EsolQ!~f>BK=kRoAmeTpVGgk%_rds z;vB0v$6S$Ctk^igNcnYwOA|{upYYWfCsuUY5W50|t{pPobE0Ce9pP~z`r1+4II#=H z3C3yfabg8pp2Pfi~@~$1x_Z`LQ#4P9p`OZ}C9N8^qoCxbg^u1_tIx!nM z!8q-$6MQwVlup$0e4+(9(fWM{-*3p;#=)oQ6)c-5j&^I3edY z4<^Nq6X7{#^f*!6d}21{6O7Z|^9jBmtcQD1{2MK3eJ?u6-1)Ii6nih)HJCRj3_fd(j0T-$I~C={~_9g2jWSfik@Q* zO=Yrus&D-CZLmDiUk>+P`p?~UuGDap46t$}gkvx+>kVx;_YOfF3< z)~$QC*fllL&#e4C&erfMze2!IA>>&$M+hf8yT!~g!#WZDd}3(oMRQ+c-vZ~;iCv%* zjMLsaF@%OxOeYvAzfN#zVkzenz8X3)q?Jyzo==p1-x1b{==sFZREHwQiP_Kz#%XVz zSd-SQm`*TKex2ab#8S>Dd^L1p%~m>5x%-Z=PDI~#3{ABZp%XhnCm5%p6K$mvD~0Bm zrN8f3H5gRT9CMA}wd}Pcd5$?0^8MA!F-HVz2cv`af(?R=g7I0M^3)qlHRqVzBbAy@ z)b=>BSxoC{YZo)0*aBEG$J`1&fBm@P`N!lrrk_5EEB?FkBt#qk3chEw&#ZXtw{gY$ zlCB-`h_9r_7qvfT^c++0qxZ+Gq)u!zSL?+6HKG&mq%Zm%>BP2kwNAWMBRcU+`s&}2 zPW)r8)``b!L?>pXZ>q9R?0|k$vs18>!%65a2>EBQTkucV-Ge=0ITasw&-#?-7)8o| z+}q?N+A}eIJR+AGw)+J81p65o$I`f*B^sZzBH5KAEBG6bP7B6u*;VD zZm>ig)-9dM&U85LTBI)491t9UrePApytUZ>95Dw42bnPTTjO&aE~yxc;{?~m(!4gO zjg9s(O0-oh|0t4j82i+^oTL{_uR1<8VpE zSR5y~E|%uCIc;pTk5QtnV);jrl*8Dk*5xF^lPjt^AV+|j|&Xc{Il z%v(!zEMkrgjx}NIx5no#|f^BrFm^m8yoFolxVA1{!t|5F!rf+IY}>=UUht+ zy5^1#jz`lliDBMaeBptbnMo72Wd`xqtKDwcl~NjZ#t zYF$p!3#L~cAE>UmlY^7dG)!Wcx0dKs#GD$OYQorWjn8qoq+%?N6I>Td^V*y?HrmH1 z(N?kiqe#kO>{IJi9r)&G8JpaoA~sH2_`YjTT65%V$KZCG-2$w z#^*R(QZW|C39gH!d2LP`8|`D1|8wNAsT9jUiliLIKD90<=>^BDjt^AV+}Xj|Xc{Il z%v(!zE@I9N&NX4|x5no#|f^BrFm^m8yoFolxVA1{!t|5F!rf+IY}>=UUht+ zy5`Og&PUTQiDBMaq6-moVQ`@dW4|>%$KjHSu{cg}T`bLObK2NwAEQKD#qy6LDTlF7 zt;wUYpa#M*A2g z+A5ZR6iGRZeQI4!(hH_n9UrK!xyysg(KJkAn75Yb3dCFyTw%i4Z;j7!xTIn%juTuL zOY_>CHa6PFDA882{G&+9VeC`ua*|#!z3TWtbtbnMo72Wd`xqtKDwcl~ zNjZ#tYF$p!3#L~cAE>UmJA*sXG)!Wcx0dK`#M~X+ZNk`Zjn8qoq+%?N6I>Td^V*y? zHrmH1(N?kiqe#kO>{IJi9r)&GB2~#=G*mR)J9E?+xySPB4jK-ddvj5p#cV zzX@Z%H9p7Tl8Ui7PHpXg4wqDn#c_h`VrgER)5b>o7$w>&mVXpUIgEX3T~5*qrdJ&w zsIIx0!Avv_lNjc$C3+Mwj|PvLF!o#Ha~v+I7>nZs*TvGjHm8k^_AyGdRV@D~l5!aP z)ViFc7fi1@K2TkAj|Y#VX_&+?Z!OW2hF!Lufe{nq##hf6BP;yA%| zu{5vEX=9^(j1p}X%Rh>w9L7GiE+^>))2ogTRM*_|!SiSuCNa!gOY|?q{44mE31h!C zKF8sbim^COa9u3TYjfJzXdk0QTgCE^A}NQlPp!*IdcpLn;{(+-_d@UjnubXX^VSl* zgqW9tmrNM@t?@YymsE_!af0h&X%$KjHSu{cg}T`bLObK2NwAEQKD#qy6LDTlF7t;wUYpa#M*A2g+A5ZR z6iGRZeQI4!(hH_n9UrK!xwnJ2(KJkAn75W_4r1m6b4(cft?@YymsE_!af0h&XvED_Fum&dKy}T16nuoHVG_fYDp+@Lx0ylNjc$CHe|6Uj<*8F!o#Ha~v+I7>nZs*TvGjHm8k^_AyGdRV@D~l5!aP z)ViFc7fi1@K2TkA{|o+yrePApytPE%BIeuRTNB29YkZEwB^6_FoZz}xn%CyEvC%$8 ziMER6A4O6QW1m`=lk|e=RmTUaYwr8tdo&G`80M`d`Vlcd20xlG_FLm~94@ICi{k{> z#nQYsr;UyFF-o*mEdMByav1y6x}2mJOs_gVP+fCB2S1}}n8Yw|Ezz%t`8D{}gt6Zm zpW|>z#aJ9CxGt9FwK;8Uw2x7utz!8{k(9&Or`F{pypXg4wqDnW#TxsMRM{wIo)^isc_gQVwIET9=db zg3{0lzx9-B$+V#Vn8Yw|E&lI;m`<5aCXD^o_#B5zD#qeC!F91Tugz&=qkUl%O{ZA? zQ6%Ls_NjF_NiQf3o$y;vxg8Q3rVDy^p3JiA4CqBKQn)30Z6%1F!%0-xR2TUu$p@zE|^&mz0M?td25M!Bc^wzw+UmvH9p7T zl8Ui7PHnZs*TvGjHm8k^_JvV2onrY%k(9&Or`F{py`VI7!f!q07R@Y* z{$mouytPD&BWCf;;wFs!*7zKUODe|VIKg$XG_TERW21dx6iugC{!t|5F!rf+IY}=l z4V~~?Pq`&COQQdn#4v9y(H{}>$IKs182hd9IS!XpjKy(+>tbnMo72Wd`@$%iPO zNXlXCQ|oe)UQil3;kTZ0f6Dv`{l_GRd25OKBc^|*zX@Z%H9p7Tl8Ui7PH#nQYsr;UyFg;6w}V);jrl*8Dk*5xFwL~i-X2r~k zCXD^o_#B5zD#qeC!F91Tugz&=qkUl%O{ZA?Q6%Ls_NjF_NiQf3o$y;vxs@|3qyL!1 zFmEmXpN^PSGpm{~_FLm~94@ICi{k{>#nQYsr;UyFg;6w}V);jrl*8Dk*5xFwM2hL%%3xVHeu|y#^*R(QZW|C39gH!d2LP`8|@3DXgbC6k0L3D zu}`hbNqRwP=!D;T%B_)E1O3M&hIwo8Z%f3inOW0>vELe><8VpESR5y~E|%uCIc;pT zFN~t;6w5z~q#VXRwJs;=1*M@Ae(Ndsm&{+#e@tSSx0dLyi1};guO^KB*7zKUODe|V zIKg$XG_TERW21dx6iugC{!t|5F!rf+IY}=l4V~~?Pr1Kk{)YZz62rW;L~9{tt;|{` zjQ!U59EVFP#^N}^b+I(B&1qw!ePI+$r&#_`B;_#nsdYI?FDMP2@LNy0wKHp@|Cq!u zZ!OW^5%c%V-%S|%t?@YymsE_!af0h&XTL#(ryjj>9DtV{x3|x>%am=CrZVzA%cWQ!M`|l5!aP z)ViFc7nFuh_^qeh`kD37e@tSSx0Yx_#B7+^(1fwy8lU5ENyS(kC%7(_=CwI(Y_uLr#y+(!C+P*Hp%Z@VDYsE(BlI7W80M`d+88k#XErur?6=0}I9yUO7RL#$ zi=}yOP8%ET3!`W{#qy6LDTlF7t;wUYpa#M*G4jnohC&qe#kO>{IJsm`VcuGz ztq`+SW-AlMertS=!zC4Cah%|~Sen=7w6W2?Fp8#AEdMByav1y6x}2mJl!i|Dt*6{J znQhR2Ok$X~mS|hVY@6BEgt6ZmpW|>z#aJ9CxGt9FwK;8Uv@eXJ=@iR9iliLIKD90< z=>?^s6MpL{_Ybe1HPjw^z}pkH7wked7(Sols6n~^An%YDb!aY~2N=l=N7@mok*QIs z(W!M)V^SNW#-_%l#>XIxp)s_9!KwCo%&#J)Ei|xmjQlo#=Tw}1Bt59e|CL)*>&qwq zPI-Hes2H7CI9FtTome`TF4;2(Ne0sp8cM@xIE|o@G>S&kx-l8sPA5K!k)W{P2NRP$ zNOAVP^o14BiFo;CcL0B{0r|e4h1OjI{?piNAh8eUrUbWQ-}|V2`MHi9bGxC&zWj4j zpC{FY|Gpaa&somLF{c`8{Bt&`9p|R_#(bi*-i*H<7lJpvDJj+TrZ`*e`GoxGkLY5I z24dKEG5*!Z9J`kql6361#^*R(QfV$lVl+jR+%~7i#T`YKs8}n9>$@~y890P}YF$oJ z3!+yY7pBhr{5SWgf7o-gaLkE@8vn4bCpF=}G)MiLn%jV5&NS4X|EAt0WB*8PebIf? z_&0TQyA&77e`${TH#MVh%(;dd|E4akRe#^98*|Lk`mek>=C_H3eoJw-+H*{N^WS)m znb<#33Ch!n=~0kg*mR1s)z%65>%9LDd--oX3wS=R8y6aC{KMYsu(_ORj1#4GaCzgz zw8ZBV)0*OJwZ{pfeDP~R054qJt`PbC^mP@Cl#2-`G>BX5gKLMZcWWOQN{IJi9r)&3%M_rugfuIE2F* z>#XWkG5D_qQU7Y-_TU))uY&vm;eYt|f!j(x$1#n6HMs5b`}O~feea|8<>wmd4*S10 z_T~Tmc5n%jH|CfnG#awR&(R9OJ0daB5fo>uJ;&5FRkAjT1=Tf8;%}_8O6KVcBnu&vCe<(p&~p(fF7%PEI#I z%Fi-H+Z>wf;s3TsN%995aU1`1aoZ@_-xw#7+bAkUzIRAb>HV)qht$Gnk2cQ6@3WOPGW{ikL@(M@<;}t?@YymsE_!ae}LOwgib492*<$ zW0YuX<#2r>DTlC6t;F-o+xa=1Q`ltb93*5xF%V0zVYVd~s}moxW^YKmgsflbT-;niEH`KZHlwiA15039i{0+{JgyoyloQ` zZA)>s+V>qq4V_5rp2!5{>BKgXm~P-U6lbfg6Vrq1V2PN-2q!$d(+x>F_FLm~94@Ie zmm+ZqQi|raIW;cs$dW}{#qy8S1D1iq*r(RzB)wpI)$xJqnrqA_O6&ge<`eHF7Wy8= z+A8mbcu;TvED@6!;e==RAVZRl{nq##hf6BWrAS{IJi9r)%{Ar|rFDOK^NFn!3*DOHY_;bT@*SxEy(n}1rD)@O(Zr6MOB39a z@D8k)@5=AbVdej>{J~thQs$M+>zTJQb7BzM?z{49l10yx z;_5tc5_L7j*~&bhh?l=HpGfSSI!thMa5SzHOk$XqFbO>tF~AF^LgQcy?Nj zwJs;=1=FjJ4^-D&V~$x`_m?-v+#<2iEhx@bdyd(7SDx58F$v1kiOpkBZSdw4XB#>( zcdq5%%yxc^Z!?Os)z^u}eMd~EBn0Q1w8Ur8rytaiXCUZch~MFHa{nPAq6+inG<%30_^|uc?vsCM-0^G}hE4cHdl=prI3U zU6+Jpp^s3UZOk#}&U?`ji8?U?|7MT2)t^r^=9r1y6PcjAIp#)@ zm~P-k6lbfg6WLwK{5{TOUojRCE8KWLvh2=bjXloXPMeGUjrl}rom<{~;_1XfpQbol z{rSWL!2`JCWD>)?gh}W_hv9ZxUMv1mo4%a7= zatQm>x}2mIOs_gFOkMl$5AKB}ViF^q@a*1iNYb(28lU5ENu{|IiA#`DG_TF6adAhM zEZQoTf4o0n890o6YF$p!3#L~cAE=JGCxgdfiI~I)Cp^1P8j^JEx5no0DX_L&vCe<(p-wf zB}gfn*XGo?xFbszZ57Ku{wrV^IE;O2T~5*qrdJ&wsIIxjwWGA|FYns%@5Dm?O>wr` z*AAjjgHLg~Fo|Ja!X)%_#C#rnZo=4ajn8qoq+%?N6I{i!B}lB`*w|>F$QKo7<#2r> zDTlC6t;`x&yYgaNOwyP4u6#^l zq5Ow|Xj|=f5$BQMkXnd(qPp3p$PBZ1wL&8#nF0CG$ucMWbn5xA`1@+x-u$Je_#UkvZD?7RA}>>jdvc?(e}a`;)Vz95dZe zV-NP|o|`*EdABcrk2Bf-i)*X9mGNF-9BTI_<5-`Q5Y5YRjXln|O@4po&ER!dA|^4y z3D54Eh9n*Pt?@YymsFZdk+=jYMf2L68W(qD$)c@d`NuZ{mVv|Ar`F{pyDs|yhoUQ)7XhSEGdM7%*Je`;m4eEr>p*UM@oj5l*89FD=29dsK}ylQHmAnL9a*wyt62W=+<;}^F!rf+IY}>=UUht+I_BmC zZ^IHXi4jhCcIOz9bnLgr=QvzaX)Zs@Vwu(Q`p~n80^`j&o1nQ9B?NjwJs;=1=FjJ4^-D&V~$x`_m?-v{4lZ54=K)8 zdyd(7FPhjnF$v1kiBDosZSW@)XB#?^N)rX?rgU?N65b2@lHzRjb>iaSVq8|4#0V!myO$ce6sax_*l&%`ak!+?T#Cdwr4-G3X%0!_ z;*Km?v{fws$jBl)`_!^zY9+m3de!lP>X?%+GW_p5%0pD3;G%6nJ-L1LjFP@Jv)yYlyA{>rFA7xOR4k8)V~|0VfJE}fPV zfBYP2zs&qE^Ihi0%r6;g3Yt1Jb!_Sq^UX}#{Y&zlc##W;*)TE9h7@Njvu-<|{JcAd zzbA?8*TF(_4DTNzJAFKkJwDv3_#DSH_9SuJ=lAPxJfA47@5;OH_*3G0(Lbf)Y_;z@ z&J0e6C1MgIobc?PX-Lws-x{Cea7m@P6p2faQZ%p4sc~^fmaJP-RIFn8$1?+#fy3CR z*5xFE|3vS_PV z{_(_sW#BOOsdYI?FPL6+e4sk!z6$;eOT;8bIN{m-%8;aEzcoI`;gU*oDH4|;rD$H8 zQ{&=}ELpTwEdTgbz%pzju-B>%)!0G0z%m>|In(O44{f zQCe?bQ(CrcuB#JsUrlkgGS4UC9FD=29dsK}ylQ zHmAnL9a*wyt62W=)PQB+F!rf+IY}>=UUht+y5<^t4V2dX9FD=29fi zDWz!MM{`IT7k6aIqOD^2M@AOe*{7BzQ!D8O)2ogTRM%YNIc90yU*2=f{)x{q`={b; zwVz|&9^48`#3V*I;n}_2kfdY3H9p7Tl1g(a5|<#QXkMFBj)VR1KOBQVv z%Rl}YunZi=KD90<=>^lPjt^AVT;sl@wC>M0Z%;-Xm6&7{_Edkq6Gg)Sl`kEb?ph;3w9x|-af}sgK{&c9rB_M&871IBbnhyJ0dkQ zH7YeawQg!mYJ=3+)VS367=*T4qq}5`1d){p1ul`8dx=z>eIz}oDV0v8CxFBfF*gD0 zmN|@%VmS8Nn3D3z-?(;Y3l?`Q@7ggsv9QtDjVIbx|Ju>G7ftM*$OPrxi!Kv$_S&MB zNyXV}-;2t;-oNjVIXO$GcMvk0{~q&rE3@2@xP0Tj!*7k>D<^+{Bzhp%+w9{%Epm<6 zeaKMbUy{Gq9xg@h#(bibRwH_+v~1a2wY_eeGO%s_Z|bz(mvHI%to$cCDn(?Ur1}5Z z2Ah3q#(%+kQQ!uE>mDYiUCp z>oF6RrwR!g&#X#o)UQg*md*8JV(uR)&Q|7`RX+LoZ)t7+4e{sMOL^4a-`p_yp4kmi ze{`eD*UlWL|A*tF%Sk>#$qEq-RmY*ci%;9{U8K7gMej>wLmPV+wTEiHZT5+KJ9o;k zPr_t3ygA_KnBC;whU-e`a~xCnzIU3JOUh>(``)=N-d29zWw`D4R@U8>qxVg=p^d$j z+e#1IavF0?w>1j)=bNJ?qx_th6&wLe#3V*I;n_XPkfdY3H9p7Tl1g(a z5|<#QXkMFBp%cF(7Wxat*@jNk>N>0P#);(<$BE@raklz85nhie|9NFauHJe~Ugaqz z$m-8HS7eEbmHe&U#y@9Uw@4{`&3$T~&7PvNCr-R8vP8v4RtCH3@Qykh$3C?#C;0@iF-}CcVq-oL-7ZO?<;^F4 zOM<80Vr}*36X88md9PI7Ew!3^raqZHMP+~1cvobJijQto+1-`n*r(RzB%dHQ#);@w zyf?TPO~WKcIN{m7-_ZR?b#K6aYkZEwC6(q^lPjt^AVT;tkNTKAWC?PyATX4RC6v(>+LG<2dpbfP&?Cz?}nwxJVq=dMHhe@QYb8~JZ#yc?fF^0#&m3s_PPWuID?lN?fF zR*2Rhba^mmsBRUYk?n;*Km?v{fws_-nv2 za2Wg4x}2mJOs_gVP+fD4`9x{mU)~(EOX9VoODfJ*|Jre9a3@X|CNaVZ&+grZ?nbIR z1NK|va~v+IG?yZAPANt6-kn3zxVR%r7Ht*FKQgk&&OWs)nOaFNm|k^!pt|O+3$8=c zFo_XPcy^~7nvPW01?;!R=QvzaX)ZlS5@YDDpj2X2$7c%9%2(>cqJVYAVwe|4*~%LL=qStN>SZiNtbk2w^h}U zAj9JNfK_A}7H1d+@v-1$bypdO(fv6iFLivQGLD;J5RgFzbyiT3#ms2-``_>T-+RvO zTX~Tbuzko$ve3ch5cdRNZ?|-QK^@F7N&^v9Y*OK08n}DW^QPpN`6>MQdXb zbdo|2a@C?0J;732q3x$*PpoT)h%7tPSBUVev4dhpWX!6sK7-u}9gS=5uHs$NH7J^t zQy$w-MdeeXbypE|l0pu0)uI(W!BShH?WbZ-tZRpeEIZRzi14hjgJMQx%&MD4LX09@`hA@}g+HPz0T%kb_*cXhl!3)K+NwV(f`^?GTY=XZi{eo;7w* z%!rIx_0?yvJE5a-&EctW_^e!?BcoGLb6-?;^|NwzdG>SgM4CS_7s+6ry&j6Jcg9U`*q zOkW|wv&IgJ8IduozWNMyCv-Hfxo3;dO4p!hQcihne;$>ei`KJ6&`An8$W@D0^aM+7 zg|>P?F<&?+vhN!3>=p=<4 z1T_q^<>RJltKnyR`~Uo0UA$Vl21S!{%42&?RIU-NtBatM6mpQO7Om(Bmf8w!uZcaet{oz> z>`Y%F!n4K>iW!kHtG@aSb|-W+t~vBhJ|@QX5E!%bw-s-bF@d5xCn@A0S1norleeFOV@fRj`Yby1;A_xVh>uH*+7c*cM8>T8>d6Z! zbTiJmTZ*?x*Pv)pPI+u^jmoW}bxRR+l0pu0)uI(W!BShH?X9sV*0n=Kc1l-PEq#Ru z&l)=@W<Z{LScS1+wn!C4nuXGKHCgqgJ_6t$@f@s}a1f8UigIu*}MNhEQR%rW$*c0p8AtKAp z^c5mJYwVzy5gD`UtIuF}LPz78!+)#~|A#&Qul?@)ANHH=aG>?AWsN0EBm1CjE^dzY z$2m~UKBso-F&`7zy{P}M{(-oAK<)njVgHb|hnBXMHI^)m?7exY_>lNR9Vlj>Q#nyR*(6Z@cS;I zXO(8j(L&LrobuTAM5RZxW|crEDdZqmEn3kNEVUKd_Qal8*A6wZtXldC5uP=6P|S#o zS@qRpJ|@E6BX@e~bUD%}nv_!>+cTnahG?B$0-dCggIu*}MNhEQR%m-h?1^>lP$SE# zrLPd-Sz`yqjL4W(Up?kyBJ4fo7L`tw>>P?F<&?*EQB+h9bdo|2a@C?0J)s3{g|>+$ z>)N44mQ_n%AucK*2FO4$`<&{l$9znLy+;nc)A=#MQIU1DeOW#xc$_+klS`9jOrU5| zPI+wijLM#(HMs;jNg)ThYSD_GV5zOpcF))o>)N44mQ_n%A;Po94vHC(F{{3M%;$-) z_sCsdx?GMliYDch$F?^ry`pt_33QS|4sz9^6+OXHTcK@l?1^>lP$SE#rLPd-Sz`yq zjL4W(Up?kyBJ4eKZ!f)Fjx>rU<&?+vvZ!1pT5m6bPEyE0u3EIBCs=ALw7o3$#JYB< zk!97=SBUVev4dhpWX!6s9`i8~_8z$fr3G@NQ8a;9nMzNVnv+W>M>5b!3OUGC3%*dN ze(5i1L2K1dQkzYU^+LTQ4xiFUApyngbE>Ug@-gA}T|%!ct(4=3qDeXBu{}2`=Ze!yUcwKBnH| zLp^G6#}W4ckw7OYm0SJv`UT^iYD+XQ|b9qbAIXk zNCrAdAqTl?!58Y(Fa0GgXs!B5YO|@aUZ|JE;ZqtZB%qjmPPNrbK2P|4m(a(Tj+f(y zq6xgpR60*;=9T6}GSEp1ImlHDzEG!r=`U$PYt>Iun@x@NLcJsopVCMn0mbZds;yq~ zG2!(hAAWp=eT0d2G*)it2$*QpiEB zTC}1kw4klfHnC(~JJiUsYUwM)vrC8pGEmGur~2wK|2`4+9=XM(#nOi;nv_!>+oe%i zDq4$6ppz7GkgFE0=n0nE3T>Cho>ThF)nh&;!roI(pHOuE zc?V<3dXnMG^5-4wsZJtRCU$;3CRb!;t+e!I`FhMwjs>=byEoxID{zph^n9W8PS7g3 z2Sh7i$f-o{1!8EUT8jLY!Vg43L3h_Bqv8kNKDgdygDetA=ZI zb^R*pQFBIAu<~_RuF>^d*Y>iv`5ImJROj%*(i+Lmp=eT0d2BC?it2$*QpiEBTC}1k zw4klfHnC(~JJiUsYUwM)3rmOrGEmGur~2wKpC`iJBd5)torIPpC`iJBZpbE^Pe63^vL>D@MZaD2ai+dP|xhn&lB9ktQo+U1Y`fD4LX09@}H1a;#__T>_n?kb_*cXhl!3)K+MFZ0w13?NB4js->?G;aOt`#f-?9 zRbM^kpB-WEDW|{4==|?H7)#bKH+)(C`wsS0CvjS7nw0nKJNgBCms3o z4))S`!?9~>bWIET;Y1l3^P`f#<7_;Q3#^bqDt_>x#mc<<}kTsm`IUjOzS4EAC;|3MyZgud`xLbrP{kI$XD{>!uL{ zYI>uxtKU<@J@nUTXVLk(ZT3_r5m#m5wJ12fa>RD`T#NELmRFYTFuxY<f7Ovl^WS%{r#gvvx)46^(B}<^fp4b5yPzNq-(VGT(BJ;|SwS1gf3}fD z=g&K|pE|q6m0x%*s@H;u0yVqmH$U7*|GG1a&aXw;Q=LStbPLzs>Do8MfSOC9va8qV zau5A=c3E`3_KrQ(NgTUISJ%iQ2CUx2YFho(#2Wd%gdbVRp(g)*hu=T1T^cJB!}XZD zRuOxI8myhvRgQ0hdQ886UaPdOcr#gxFZ)xHGh|~X{h8R%O z6O~>4KjOHDS^xdbm*xK>jy=^m)bl@_C%|Eb$mfa99fwy_OZvPsd@c$OPek+QqOYbS z)yY`K-k-pI3EY|3o%bhrZ$s~ewBKqBS@qd{q<2zK$KQ$qeNOGvW4@L@s~7cqLil|G z9KK29-zTzq?Ein6{0kzu}V5zx2@}@5d&)Qt5E#b64LM& zq9F(U?f<{Z7E%wGLt;^N|C#g=5}bi2Jf z`|N~2?ZVN<@z?wj;r%f|PpHM1KpRXKd$e;;1srwqF~OebH14`FabZ3twsP>s=R9#+ zJ|^-pk^1boE*}&5m`II@#rc@X$3$vOd@dgo`ItzJi97N!k&lVgm{_`t$3)V>tA#vl z7Z&(Kd4nPOcGylYEzgS4ZwLBmn=DzoI1Uy2tTtW^vRxgU-v{YFBA@O{+OVEHkTTk& z(bw_qC{N4U@$}oSJ}qZlX*qb`mrqldvaR{>b*WDov7Matz$~4#EX~tCEl=~*d!=z} zakZwzHw_s~x*#A9h8ITl3@BZH?w}Vm#C(Qci3q zXFU;mERb;wKt`RHi`(l9dfZRi07l;k>6gVAMOwA&>xhiG3}T2uz9VO!zJeZcOY))XYFGsAn6X z53zcI`1nE2HbBFk2|N@0`1SCGwkvY;OJ@W(b-hgc{l`u;#O;X2Pxew{D( zY1#l$_P65G(9e=*=};GK!v;Ej@?)Y;;Pxi?Tb)v78$kFc@3)mQ30UaU1{I9km(dqx z>6qCrkTiTzA2fY{W=hM_JnZR%==(<;;3>Z(-x3N+-< zVZHAQ_25zHhq&700`YN$9^}+P9TH?nK)*nbb*SHVno`)d&dzG=PT%R6I@wmbZRfID z&ytO`+?HgoZ62R(Yiz5H9jo7Sn-T4pzum2!9q+C=I=ege+<&_s$Uds=v~#)k0KQA@ zA!ULqxP1lpiAuqhgg;oy1mX7;EK1o+=z|3JkK~2OZj#XOv7eNZXu}4$kKjInpu2>g z=+RS!f1UY#y~w8u4L|0q02|ViBHyYHUBt7eY!MUMI9O=leu8KR5rdbQ3X_D^?~2eX zicjzw*8$?EBr?Q!P-KIBL%S%5$3?z1t_cP82cHFrFZNYHJX0cjjREbTw=@>`FUYkE z_N^GTt^SMRk21uoZK3CqzA6Zfc2IErgCm4`dDBZw!#CoEPDy;Czq_KccO);FZP87( zHcDbWO*DY;4}`8S15Y_TKyO;)S83HpJCn>-X>8SYa-^+#6Q$+tNjP>mdT1N_jxnQS zVzS6^%%=#CvbPk}PZb%C-+n^xFNpDhew`)-$ZxH%$iT?<}=~9jq*_(tvTJTsY zvxJ@_I9JLEQh%c0e8D#hzD3F@QWi=lvup*^T=(U0aQdbkaLioDii10}7622w$sK~AoTrYUFlxw71E9E+= zf3K7e2z`U#hor~;v*0aKJ|c9Gq*Kwa+xNFa%G>F4n`+wV_6IrE;mffd>n&3y*TaRfSGtWGkc}|pHCC!&vXMxN*C(EpJs?0iz zWX4%6GtN@COy-;AGS{3bbIn=qY?*CV%4~D4{7!9^{8H_Fxx!l`GtPxF<6I;&&L!?r znQz|VE|VGOa+z^@Wya}uRhe_v$(&Pj@01y5&<)9)Gc0q?yIjLHWxg48SITU&-ffV% z=G`*a{ISe6|3T)O_qhKkv(5Y5`(?hlUgn$s6yr_q=k8|rgnP#Qi+fULoh5xPyHC0Q<~Bz8Gwy#x`Ew5W^X{*r`~~;LD1XWQ zjr&{oWp|&u-#y?SbPu_&xUagexxaH?ci(W|bl-B{cHeQ|bq~Amx$nClxJTUIyC1rL za6fYY+ii0H=pJ?d;XpdrtYRxw(#l9n!24Wfv^DG+)pfO|?2{b2L3Aq) zam!sfJSZxIRjJm-U3p1scu0)cup1n%uXD|T;YLe3vNj~g{mN+AHEOc*L=#E?HX5)~^q_SwCo4L?kw$NQ8vf1vql>)VHRaau71jD&w{p50o$fA>?SkouyH;OEW2#i;(2P{e@!)T6 zkUkp{tzJ2pFmSTFa!yn*-s+=rl>3HmkyFO(qp?E98{c{cup&AE5=QjOF}Gf*W)sIpT+4YsP{qmDU#@x;JZYkHu3rvk zrLnZ^3h2ob41i<9P~{Wh;fcZCqvW8u)U(P zP7aQW`XW1*oS(63B18)rg(-9X5ljDR5#4`b_A00ZXbZYSw zqDjW%!w$xo7mdbL$5URGd16RE&fh%QCB<%5= zjy(}3W{<^OSMg^7G0|@fm2h&9*=AiG!^2nR36ku!eg6AOvVVb*%^A(UMr{Nq2gcFx zTHm5M+N-s`P!FirQap0))52HwzRc)B^#vo9nzS0X(Jyo7I{6+Yp>XuY0{=4yA8s;3 zRYf&A}|;BwVS(RyZFTLPnWT^{=62~a{MIIT3nSetHpI$Gf!NZoa@n% zkL5hJI!9s#iTjIRYD0tYyo|N|k%YM^vjRgbuE-cSaa}lmVzCBW>zDJ*CR@(VWltC# zN{=rbT0Es&t|am5gD;miZ#h+P$|pB(SueQY!OdIl6~uiV(HX>C~f7pW3~2 z>NL?=I(2endy$yj_=(M1W?@lSWV<}JT>;xAk?oW>rfhNV@m49pjv3PLc{q56n=!{I4U{J^536 z9gN}S_bLD6-zYwCztw+5@f&|_^~5`s|Cze>`!fya7{0}Dk>Lu% zUw=#Wn-42a`8&lmR)2|MpJB~#)bQPg*BQRw@Fv4QH@wsEZo|(Q*1oRo-DCV04by$} zWt0E=_f`KvboA!^aFCH+;(QXNJ!kzGV0Z!;^}E!-a;64VN08ZTL3B zvSF`b)o{SDY4~o#_ZoiK@XriCY4|@4zhwA5!)Fbh#k)W_XU_TMgG3UTj!4tQ$5BuQt5g;&{Tw#qSKSv-;}|Z#2Bs@OHzG z8h*lXqv2-_zi9ZkhW8mhX!upbuN!{L@VkaTF#HF@O@{wu__*Ou44*dKWc%?8<9})R zdqejP9p^>EiH4I6_cT1*@Cd^hhDRA5V|bk562rF{_8ATs)(xA6?>4;A@D9U`hF>=P zj^RHVK5h7G!!6rcKgG`PZo{`2o@IE6;X4i28-CF6nD1!6-D&)14ZmjiW5eGVPO^D; zU&EsePc=N(uxz-&@VDRAc7A32hYdewc#q-3ZSZR*|Ccs6(fp_J_ohGH>eG0z$xmy8 z^G&|W@N&bZ;fD-AW_Y{d=M3*NeAw^_!{-bqTK^wuc#`3A!&QcTh7H3T3_oi4Im53S z{=o1l!(SN|zN^P!s^MXVvkey-t}^U5EE|p(UT^qOLyk9&uX{}Xkl`bSPZ_>om>!>d z*ysBph8)-PjX%@yBEuoWYYjhS_%XxJ8a`~s5V#@7trWB3Wf z`wf3=_>$oPW$;%O<4Pagtg>ISd)P?VvpO|&d2d1R7ufyVnOQvVT-oE%JjDw&whB`_{CQLJL4Bn zA@bV!&5B>Lr^2?UJ+JaJmn}QF`{*;zz2KPcx$}DF_SoTzm2nNMR|eKYroeUhJihF| z*w6^IKTNZUR~< zL>srq1bGe|rQ&IYl`BUV&Y2*qeF`FH_Y@y-g||+Sg)xQ8L~lo$iS{wth&%RP@hI^Y ztvA?X0(-D{oXL86=Ey^u{_03`&iV!O%kxj1)7NO#dRDtRy`#0k{yFR9*-hV^W~0xj zzUHWt0noi5IxSL&*xO44> zN8}J29H)}|l|1kb6NU>`A9be&HrA{`zA7a@!sNVurnff>fz?{wcHW>pq-9dDB8~G_ zB$UlNrNBS0$0@&32&{(VJV^ORgvg5jPLab8ubZQLOCr15YM+B07F9m*hUtopK%5JKdp(w4mY{`smAmD$cvn#kzD-PeS|gItXpDo-dE_?$;Vx2a^7b+O2cMY-Llc-AI35oaEkzl`*!x)<#8(RM3>tmAk;9LbuKSts%M%S+Gk+m*WKAJDLhU78YaJ?$e zK+EzZXWig%uRK`kmxm3_a%FTqo;8mQ%7Ti1`QXabkemJWT3H|C$=%?_2DcVVFv|U- zLqi+H#N*`AfIQptRplu{v)Yh|TFvsHtnpANUs2s~)o`Oqg~KpENF2k#@ON z=^dZBqoODdjgYq>7B^5rS*kUX#+EX%{mN|P}u!zcey6w(WLoEsgFGtOUf&hql| zb5ECbAmy@rf|Qr9D64SA>F48cG>6Lrm3qJQM|2om)WfcP`o-riIp?fpqOsgwV%SDv+WS$SU1yq=R})j?Gr`_)=_ zz$|M{&RTPhJV4>N5x*EUYocROF0UJseUyicjTSZ3ifl15hZv^Kb&SQLG%&aU;lNMWGT9B@7T8|varvDMI;D`nje9%)5t#+0S5Q5~$n z!1Z7Rx}KISwQ)TdxKcM99krh7fDP4wez72@7CL6tf;6n)SR6z_RIq}jN1k3ro1PI_ zhSH;+dz($ygXfqsXhc@+9bG3*WMs=hHnvt@3olyLD^E$UBo{55u^Q1ej>o-gN!ok4v6!gqI>MxwOQ2x4klw67edEP!u!zWpY%C(cMzBg($c$I>N2y(r)9 z*?x3m9kup(M0?tCo}`1f3V~}8+Vgsac(WJT$eu57_ zT`CN&U1-ni6(YZ0Gk)q32gDxNLgaZpMC`W4((#*ERw&~0G>MR*_y0X& zi+$qtUi>*|2cFlJq7o(gA%DFPzCFJe5?A(8Q*ob=bstXI^YfXwcS=9q{(muh_MiK> z85qu*YhOrA+-*qs3n36c?fHFzID?9Y>GuD7%6^r7A0ci`*|YyC{wpEy-PwkF{5|&h zzt_0a`s9iCi!FXTLVJF1erY@Hzb&@df7(0yp6h<7?XTd4zvv)!N84nxNl1(x+VlI; zipSL+&vKD?6c{(h!B3>lZ-3Kss=4V2#cmjTiT1>2q|UdGzkfZc_8jMQK|A7eDSLiz zoM!gaOWTwGtq{=R{_}fbcN=@_4w}o_T8-aMw^&YlT!j0H_QawPqAExjH|DG59AC))q%^CxXTt4;gIn*BFZuG99o9|T#t|9)fk7q_ve zpJi?AS3afjpRx`6)n=bkbJv^w(o_Z8r5HTt9?F2Gts(w=DZvKU4d@ltGGh{|~LCc546t diff --git a/tree-sitter-c/queries/highlights.scm b/tree-sitter-c/queries/highlights.scm deleted file mode 100644 index 04d9a04..0000000 --- a/tree-sitter-c/queries/highlights.scm +++ /dev/null @@ -1,81 +0,0 @@ -"break" @keyword -"case" @keyword -"const" @keyword -"continue" @keyword -"default" @keyword -"do" @keyword -"else" @keyword -"enum" @keyword -"extern" @keyword -"for" @keyword -"if" @keyword -"inline" @keyword -"return" @keyword -"sizeof" @keyword -"static" @keyword -"struct" @keyword -"switch" @keyword -"typedef" @keyword -"union" @keyword -"volatile" @keyword -"while" @keyword - -"#define" @keyword -"#elif" @keyword -"#else" @keyword -"#endif" @keyword -"#if" @keyword -"#ifdef" @keyword -"#ifndef" @keyword -"#include" @keyword -(preproc_directive) @keyword - -"--" @operator -"-" @operator -"-=" @operator -"->" @operator -"=" @operator -"!=" @operator -"*" @operator -"&" @operator -"&&" @operator -"+" @operator -"++" @operator -"+=" @operator -"<" @operator -"==" @operator -">" @operator -"||" @operator - -"." @delimiter -";" @delimiter - -(string_literal) @string -(system_lib_string) @string - -(null) @constant -(number_literal) @number -(char_literal) @number - -(call_expression - function: (identifier) @function) -(call_expression - function: (field_expression - field: (field_identifier) @function)) -(function_declarator - declarator: (identifier) @function) -(preproc_function_def - name: (identifier) @function.special) - -(field_identifier) @property -(statement_identifier) @label -(type_identifier) @type -(primitive_type) @type -(sized_type_specifier) @type - -((identifier) @constant - (#match? @constant "^[A-Z][A-Z\\d_]*$")) - -(identifier) @variable - -(comment) @comment diff --git a/tree-sitter-c/src/grammar.json b/tree-sitter-c/src/grammar.json deleted file mode 100644 index 3b3ba31..0000000 --- a/tree-sitter-c/src/grammar.json +++ /dev/null @@ -1,6629 +0,0 @@ -{ - "name": "c", - "word": "identifier", - "rules": { - "translation_unit": { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "_top_level_item" - } - }, - "_top_level_item": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "function_definition" - }, - { - "type": "SYMBOL", - "name": "linkage_specification" - }, - { - "type": "SYMBOL", - "name": "declaration" - }, - { - "type": "SYMBOL", - "name": "_statement" - }, - { - "type": "SYMBOL", - "name": "attributed_statement" - }, - { - "type": "SYMBOL", - "name": "type_definition" - }, - { - "type": "SYMBOL", - "name": "_empty_declaration" - }, - { - "type": "SYMBOL", - "name": "preproc_if" - }, - { - "type": "SYMBOL", - "name": "preproc_ifdef" - }, - { - "type": "SYMBOL", - "name": "preproc_include" - }, - { - "type": "SYMBOL", - "name": "preproc_def" - }, - { - "type": "SYMBOL", - "name": "preproc_function_def" - }, - { - "type": "SYMBOL", - "name": "preproc_call" - } - ] - }, - "preproc_include": { - "type": "SEQ", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "#[ \t]*include" - }, - "named": false, - "value": "#include" - }, - { - "type": "FIELD", - "name": "path", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "string_literal" - }, - { - "type": "SYMBOL", - "name": "system_lib_string" - }, - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "preproc_call_expression" - }, - "named": true, - "value": "call_expression" - } - ] - } - }, - { - "type": "STRING", - "value": "\n" - } - ] - }, - "preproc_def": { - "type": "SEQ", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "#[ \t]*define" - }, - "named": false, - "value": "#define" - }, - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - }, - { - "type": "FIELD", - "name": "value", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "preproc_arg" - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "STRING", - "value": "\n" - } - ] - }, - "preproc_function_def": { - "type": "SEQ", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "#[ \t]*define" - }, - "named": false, - "value": "#define" - }, - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - }, - { - "type": "FIELD", - "name": "parameters", - "content": { - "type": "SYMBOL", - "name": "preproc_params" - } - }, - { - "type": "FIELD", - "name": "value", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "preproc_arg" - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "STRING", - "value": "\n" - } - ] - }, - "preproc_params": { - "type": "SEQ", - "members": [ - { - "type": "IMMEDIATE_TOKEN", - "content": { - "type": "STRING", - "value": "(" - } - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "STRING", - "value": "..." - } - ] - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "STRING", - "value": "..." - } - ] - } - ] - } - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - "preproc_call": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "directive", - "content": { - "type": "SYMBOL", - "name": "preproc_directive" - } - }, - { - "type": "FIELD", - "name": "argument", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "preproc_arg" - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "STRING", - "value": "\n" - } - ] - }, - "preproc_if": { - "type": "SEQ", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "#[ \t]*if" - }, - "named": false, - "value": "#if" - }, - { - "type": "FIELD", - "name": "condition", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "STRING", - "value": "\n" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "_top_level_item" - } - }, - { - "type": "FIELD", - "name": "alternative", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "preproc_else" - }, - { - "type": "SYMBOL", - "name": "preproc_elif" - } - ] - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "#[ \t]*endif" - }, - "named": false, - "value": "#endif" - } - ] - }, - "preproc_ifdef": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "#[ \t]*ifdef" - }, - "named": false, - "value": "#ifdef" - }, - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "#[ \t]*ifndef" - }, - "named": false, - "value": "#ifndef" - } - ] - }, - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "_top_level_item" - } - }, - { - "type": "FIELD", - "name": "alternative", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "preproc_else" - }, - { - "type": "SYMBOL", - "name": "preproc_elif" - } - ] - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "#[ \t]*endif" - }, - "named": false, - "value": "#endif" - } - ] - }, - "preproc_else": { - "type": "SEQ", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "#[ \t]*else" - }, - "named": false, - "value": "#else" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "_top_level_item" - } - } - ] - }, - "preproc_elif": { - "type": "SEQ", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "#[ \t]*elif" - }, - "named": false, - "value": "#elif" - }, - { - "type": "FIELD", - "name": "condition", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "STRING", - "value": "\n" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "_top_level_item" - } - }, - { - "type": "FIELD", - "name": "alternative", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "preproc_else" - }, - { - "type": "SYMBOL", - "name": "preproc_elif" - } - ] - }, - { - "type": "BLANK" - } - ] - } - } - ] - }, - "preproc_if_in_field_declaration_list": { - "type": "SEQ", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "#[ \t]*if" - }, - "named": false, - "value": "#if" - }, - { - "type": "FIELD", - "name": "condition", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "STRING", - "value": "\n" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "_field_declaration_list_item" - } - }, - { - "type": "FIELD", - "name": "alternative", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "preproc_else_in_field_declaration_list" - }, - "named": true, - "value": "preproc_else" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "preproc_elif_in_field_declaration_list" - }, - "named": true, - "value": "preproc_elif" - } - ] - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "#[ \t]*endif" - }, - "named": false, - "value": "#endif" - } - ] - }, - "preproc_ifdef_in_field_declaration_list": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "#[ \t]*ifdef" - }, - "named": false, - "value": "#ifdef" - }, - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "#[ \t]*ifndef" - }, - "named": false, - "value": "#ifndef" - } - ] - }, - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "_field_declaration_list_item" - } - }, - { - "type": "FIELD", - "name": "alternative", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "preproc_else_in_field_declaration_list" - }, - "named": true, - "value": "preproc_else" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "preproc_elif_in_field_declaration_list" - }, - "named": true, - "value": "preproc_elif" - } - ] - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "#[ \t]*endif" - }, - "named": false, - "value": "#endif" - } - ] - }, - "preproc_else_in_field_declaration_list": { - "type": "SEQ", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "#[ \t]*else" - }, - "named": false, - "value": "#else" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "_field_declaration_list_item" - } - } - ] - }, - "preproc_elif_in_field_declaration_list": { - "type": "SEQ", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "#[ \t]*elif" - }, - "named": false, - "value": "#elif" - }, - { - "type": "FIELD", - "name": "condition", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "STRING", - "value": "\n" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "_field_declaration_list_item" - } - }, - { - "type": "FIELD", - "name": "alternative", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "preproc_else_in_field_declaration_list" - }, - "named": true, - "value": "preproc_else" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "preproc_elif_in_field_declaration_list" - }, - "named": true, - "value": "preproc_elif" - } - ] - }, - { - "type": "BLANK" - } - ] - } - } - ] - }, - "preproc_directive": { - "type": "PATTERN", - "value": "#[ \\t]*[a-zA-Z]\\w*" - }, - "preproc_arg": { - "type": "TOKEN", - "content": { - "type": "PREC", - "value": -1, - "content": { - "type": "REPEAT1", - "content": { - "type": "PATTERN", - "value": ".|\\\\\\r?\\n" - } - } - } - }, - "_preproc_expression": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "preproc_call_expression" - }, - "named": true, - "value": "call_expression" - }, - { - "type": "SYMBOL", - "name": "number_literal" - }, - { - "type": "SYMBOL", - "name": "char_literal" - }, - { - "type": "SYMBOL", - "name": "preproc_defined" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "preproc_unary_expression" - }, - "named": true, - "value": "unary_expression" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "preproc_binary_expression" - }, - "named": true, - "value": "binary_expression" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "preproc_parenthesized_expression" - }, - "named": true, - "value": "parenthesized_expression" - } - ] - }, - "preproc_parenthesized_expression": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "SYMBOL", - "name": "_preproc_expression" - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - "preproc_defined": { - "type": "CHOICE", - "members": [ - { - "type": "PREC", - "value": 14, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "defined" - }, - { - "type": "STRING", - "value": "(" - }, - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "STRING", - "value": ")" - } - ] - } - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "defined" - }, - { - "type": "SYMBOL", - "name": "identifier" - } - ] - } - ] - }, - "preproc_unary_expression": { - "type": "PREC_LEFT", - "value": 13, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "!" - }, - { - "type": "STRING", - "value": "~" - }, - { - "type": "STRING", - "value": "-" - }, - { - "type": "STRING", - "value": "+" - } - ] - } - }, - { - "type": "FIELD", - "name": "argument", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - "preproc_call_expression": { - "type": "PREC", - "value": 14, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "function", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - }, - { - "type": "FIELD", - "name": "arguments", - "content": { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "preproc_argument_list" - }, - "named": true, - "value": "argument_list" - } - } - ] - } - }, - "preproc_argument_list": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_preproc_expression" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "_preproc_expression" - } - ] - } - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - "preproc_binary_expression": { - "type": "CHOICE", - "members": [ - { - "type": "PREC_LEFT", - "value": 10, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "+" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 10, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "-" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 11, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "*" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 11, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "/" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 11, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "%" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "||" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 2, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "&&" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "|" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 4, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "^" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 5, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "&" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 6, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "==" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 6, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "!=" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 7, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": ">" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 7, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": ">=" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 7, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "<=" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 7, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "<" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 9, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "<<" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 9, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": ">>" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_preproc_expression" - } - } - ] - } - } - ] - }, - "function_definition": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "ms_call_modifier" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "SYMBOL", - "name": "_declaration_specifiers" - }, - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "SYMBOL", - "name": "_declarator" - } - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "SYMBOL", - "name": "compound_statement" - } - } - ] - }, - "declaration": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_declaration_specifiers" - }, - { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_declarator" - }, - { - "type": "SYMBOL", - "name": "init_declarator" - } - ] - } - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_declarator" - }, - { - "type": "SYMBOL", - "name": "init_declarator" - } - ] - } - } - ] - } - } - ] - }, - { - "type": "STRING", - "value": ";" - } - ] - }, - "type_definition": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "typedef" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "type_qualifier" - } - }, - { - "type": "FIELD", - "name": "type", - "content": { - "type": "SYMBOL", - "name": "_type_specifier" - } - }, - { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "SYMBOL", - "name": "_type_declarator" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "SYMBOL", - "name": "_type_declarator" - } - } - ] - } - } - ] - }, - { - "type": "STRING", - "value": ";" - } - ] - }, - "_declaration_modifiers": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "storage_class_specifier" - }, - { - "type": "SYMBOL", - "name": "type_qualifier" - }, - { - "type": "SYMBOL", - "name": "attribute_specifier" - }, - { - "type": "SYMBOL", - "name": "attribute_declaration" - }, - { - "type": "SYMBOL", - "name": "ms_declspec_modifier" - } - ] - }, - "_declaration_specifiers": { - "type": "SEQ", - "members": [ - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "_declaration_modifiers" - } - }, - { - "type": "FIELD", - "name": "type", - "content": { - "type": "SYMBOL", - "name": "_type_specifier" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "_declaration_modifiers" - } - } - ] - }, - "linkage_specification": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "extern" - }, - { - "type": "FIELD", - "name": "value", - "content": { - "type": "SYMBOL", - "name": "string_literal" - } - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "function_definition" - }, - { - "type": "SYMBOL", - "name": "declaration" - }, - { - "type": "SYMBOL", - "name": "declaration_list" - } - ] - } - } - ] - }, - "attribute_specifier": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "__attribute__" - }, - { - "type": "STRING", - "value": "(" - }, - { - "type": "SYMBOL", - "name": "argument_list" - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - "attribute": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "prefix", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - }, - { - "type": "STRING", - "value": "::" - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "argument_list" - }, - { - "type": "BLANK" - } - ] - } - ] - }, - "attribute_declaration": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "[[" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "attribute" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "attribute" - } - ] - } - } - ] - }, - { - "type": "STRING", - "value": "]]" - } - ] - }, - "ms_declspec_modifier": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "__declspec" - }, - { - "type": "STRING", - "value": "(" - }, - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - "ms_based_modifier": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "__based" - }, - { - "type": "SYMBOL", - "name": "argument_list" - } - ] - }, - "ms_call_modifier": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "__cdecl" - }, - { - "type": "STRING", - "value": "__clrcall" - }, - { - "type": "STRING", - "value": "__stdcall" - }, - { - "type": "STRING", - "value": "__fastcall" - }, - { - "type": "STRING", - "value": "__thiscall" - }, - { - "type": "STRING", - "value": "__vectorcall" - } - ] - }, - "ms_restrict_modifier": { - "type": "STRING", - "value": "__restrict" - }, - "ms_unsigned_ptr_modifier": { - "type": "STRING", - "value": "__uptr" - }, - "ms_signed_ptr_modifier": { - "type": "STRING", - "value": "__sptr" - }, - "ms_unaligned_ptr_modifier": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "_unaligned" - }, - { - "type": "STRING", - "value": "__unaligned" - } - ] - }, - "ms_pointer_modifier": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "ms_unaligned_ptr_modifier" - }, - { - "type": "SYMBOL", - "name": "ms_restrict_modifier" - }, - { - "type": "SYMBOL", - "name": "ms_unsigned_ptr_modifier" - }, - { - "type": "SYMBOL", - "name": "ms_signed_ptr_modifier" - } - ] - }, - "declaration_list": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "{" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "_top_level_item" - } - }, - { - "type": "STRING", - "value": "}" - } - ] - }, - "_declarator": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "attributed_declarator" - }, - { - "type": "SYMBOL", - "name": "pointer_declarator" - }, - { - "type": "SYMBOL", - "name": "function_declarator" - }, - { - "type": "SYMBOL", - "name": "array_declarator" - }, - { - "type": "SYMBOL", - "name": "parenthesized_declarator" - }, - { - "type": "SYMBOL", - "name": "identifier" - } - ] - }, - "_field_declarator": { - "type": "CHOICE", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "attributed_field_declarator" - }, - "named": true, - "value": "attributed_declarator" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "pointer_field_declarator" - }, - "named": true, - "value": "pointer_declarator" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "function_field_declarator" - }, - "named": true, - "value": "function_declarator" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "array_field_declarator" - }, - "named": true, - "value": "array_declarator" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "parenthesized_field_declarator" - }, - "named": true, - "value": "parenthesized_declarator" - }, - { - "type": "SYMBOL", - "name": "_field_identifier" - } - ] - }, - "_type_declarator": { - "type": "CHOICE", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "attributed_type_declarator" - }, - "named": true, - "value": "attributed_declarator" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "pointer_type_declarator" - }, - "named": true, - "value": "pointer_declarator" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "function_type_declarator" - }, - "named": true, - "value": "function_declarator" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "array_type_declarator" - }, - "named": true, - "value": "array_declarator" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "parenthesized_type_declarator" - }, - "named": true, - "value": "parenthesized_declarator" - }, - { - "type": "SYMBOL", - "name": "_type_identifier" - } - ] - }, - "_abstract_declarator": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "abstract_pointer_declarator" - }, - { - "type": "SYMBOL", - "name": "abstract_function_declarator" - }, - { - "type": "SYMBOL", - "name": "abstract_array_declarator" - }, - { - "type": "SYMBOL", - "name": "abstract_parenthesized_declarator" - } - ] - }, - "parenthesized_declarator": { - "type": "PREC_DYNAMIC", - "value": -10, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "SYMBOL", - "name": "_declarator" - }, - { - "type": "STRING", - "value": ")" - } - ] - } - }, - "parenthesized_field_declarator": { - "type": "PREC_DYNAMIC", - "value": -10, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "SYMBOL", - "name": "_field_declarator" - }, - { - "type": "STRING", - "value": ")" - } - ] - } - }, - "parenthesized_type_declarator": { - "type": "PREC_DYNAMIC", - "value": -10, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "SYMBOL", - "name": "_type_declarator" - }, - { - "type": "STRING", - "value": ")" - } - ] - } - }, - "abstract_parenthesized_declarator": { - "type": "PREC", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "SYMBOL", - "name": "_abstract_declarator" - }, - { - "type": "STRING", - "value": ")" - } - ] - } - }, - "attributed_declarator": { - "type": "PREC_RIGHT", - "value": 0, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_declarator" - }, - { - "type": "REPEAT1", - "content": { - "type": "SYMBOL", - "name": "attribute_declaration" - } - } - ] - } - }, - "attributed_field_declarator": { - "type": "PREC_RIGHT", - "value": 0, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_field_declarator" - }, - { - "type": "REPEAT1", - "content": { - "type": "SYMBOL", - "name": "attribute_declaration" - } - } - ] - } - }, - "attributed_type_declarator": { - "type": "PREC_RIGHT", - "value": 0, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_type_declarator" - }, - { - "type": "REPEAT1", - "content": { - "type": "SYMBOL", - "name": "attribute_declaration" - } - } - ] - } - }, - "pointer_declarator": { - "type": "PREC_DYNAMIC", - "value": 1, - "content": { - "type": "PREC_RIGHT", - "value": 0, - "content": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "ms_based_modifier" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": "*" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "ms_pointer_modifier" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "type_qualifier" - } - }, - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "SYMBOL", - "name": "_declarator" - } - } - ] - } - } - }, - "pointer_field_declarator": { - "type": "PREC_DYNAMIC", - "value": 1, - "content": { - "type": "PREC_RIGHT", - "value": 0, - "content": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "ms_based_modifier" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": "*" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "ms_pointer_modifier" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "type_qualifier" - } - }, - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "SYMBOL", - "name": "_field_declarator" - } - } - ] - } - } - }, - "pointer_type_declarator": { - "type": "PREC_DYNAMIC", - "value": 1, - "content": { - "type": "PREC_RIGHT", - "value": 0, - "content": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "ms_based_modifier" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": "*" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "ms_pointer_modifier" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "type_qualifier" - } - }, - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "SYMBOL", - "name": "_type_declarator" - } - } - ] - } - } - }, - "abstract_pointer_declarator": { - "type": "PREC_DYNAMIC", - "value": 1, - "content": { - "type": "PREC_RIGHT", - "value": 0, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "*" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "type_qualifier" - } - }, - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_abstract_declarator" - }, - { - "type": "BLANK" - } - ] - } - } - ] - } - } - }, - "function_declarator": { - "type": "PREC", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "SYMBOL", - "name": "_declarator" - } - }, - { - "type": "FIELD", - "name": "parameters", - "content": { - "type": "SYMBOL", - "name": "parameter_list" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "attribute_specifier" - } - } - ] - } - }, - "function_field_declarator": { - "type": "PREC", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "SYMBOL", - "name": "_field_declarator" - } - }, - { - "type": "FIELD", - "name": "parameters", - "content": { - "type": "SYMBOL", - "name": "parameter_list" - } - } - ] - } - }, - "function_type_declarator": { - "type": "PREC", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "SYMBOL", - "name": "_type_declarator" - } - }, - { - "type": "FIELD", - "name": "parameters", - "content": { - "type": "SYMBOL", - "name": "parameter_list" - } - } - ] - } - }, - "abstract_function_declarator": { - "type": "PREC", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_abstract_declarator" - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "FIELD", - "name": "parameters", - "content": { - "type": "SYMBOL", - "name": "parameter_list" - } - } - ] - } - }, - "array_declarator": { - "type": "PREC", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "SYMBOL", - "name": "_declarator" - } - }, - { - "type": "STRING", - "value": "[" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "type_qualifier" - } - }, - { - "type": "FIELD", - "name": "size", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "*" - } - ] - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "STRING", - "value": "]" - } - ] - } - }, - "array_field_declarator": { - "type": "PREC", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "SYMBOL", - "name": "_field_declarator" - } - }, - { - "type": "STRING", - "value": "[" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "type_qualifier" - } - }, - { - "type": "FIELD", - "name": "size", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "*" - } - ] - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "STRING", - "value": "]" - } - ] - } - }, - "array_type_declarator": { - "type": "PREC", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "SYMBOL", - "name": "_type_declarator" - } - }, - { - "type": "STRING", - "value": "[" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "type_qualifier" - } - }, - { - "type": "FIELD", - "name": "size", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "*" - } - ] - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "STRING", - "value": "]" - } - ] - } - }, - "abstract_array_declarator": { - "type": "PREC", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_abstract_declarator" - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "STRING", - "value": "[" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "type_qualifier" - } - }, - { - "type": "FIELD", - "name": "size", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "*" - } - ] - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "STRING", - "value": "]" - } - ] - } - }, - "init_declarator": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "SYMBOL", - "name": "_declarator" - } - }, - { - "type": "STRING", - "value": "=" - }, - { - "type": "FIELD", - "name": "value", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "initializer_list" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - } - ] - }, - "compound_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "{" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "_top_level_item" - } - }, - { - "type": "STRING", - "value": "}" - } - ] - }, - "storage_class_specifier": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "extern" - }, - { - "type": "STRING", - "value": "static" - }, - { - "type": "STRING", - "value": "auto" - }, - { - "type": "STRING", - "value": "register" - }, - { - "type": "STRING", - "value": "inline" - } - ] - }, - "type_qualifier": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "const" - }, - { - "type": "STRING", - "value": "volatile" - }, - { - "type": "STRING", - "value": "restrict" - }, - { - "type": "STRING", - "value": "_Atomic" - } - ] - }, - "_type_specifier": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "struct_specifier" - }, - { - "type": "SYMBOL", - "name": "union_specifier" - }, - { - "type": "SYMBOL", - "name": "enum_specifier" - }, - { - "type": "SYMBOL", - "name": "macro_type_specifier" - }, - { - "type": "SYMBOL", - "name": "sized_type_specifier" - }, - { - "type": "SYMBOL", - "name": "primitive_type" - }, - { - "type": "SYMBOL", - "name": "_type_identifier" - } - ] - }, - "sized_type_specifier": { - "type": "SEQ", - "members": [ - { - "type": "REPEAT1", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "signed" - }, - { - "type": "STRING", - "value": "unsigned" - }, - { - "type": "STRING", - "value": "long" - }, - { - "type": "STRING", - "value": "short" - } - ] - } - }, - { - "type": "FIELD", - "name": "type", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "PREC_DYNAMIC", - "value": -1, - "content": { - "type": "SYMBOL", - "name": "_type_identifier" - } - }, - { - "type": "SYMBOL", - "name": "primitive_type" - } - ] - }, - { - "type": "BLANK" - } - ] - } - } - ] - }, - "primitive_type": { - "type": "TOKEN", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "bool" - }, - { - "type": "STRING", - "value": "char" - }, - { - "type": "STRING", - "value": "int" - }, - { - "type": "STRING", - "value": "float" - }, - { - "type": "STRING", - "value": "double" - }, - { - "type": "STRING", - "value": "void" - }, - { - "type": "STRING", - "value": "size_t" - }, - { - "type": "STRING", - "value": "ssize_t" - }, - { - "type": "STRING", - "value": "intptr_t" - }, - { - "type": "STRING", - "value": "uintptr_t" - }, - { - "type": "STRING", - "value": "charptr_t" - }, - { - "type": "STRING", - "value": "int8_t" - }, - { - "type": "STRING", - "value": "int16_t" - }, - { - "type": "STRING", - "value": "int32_t" - }, - { - "type": "STRING", - "value": "int64_t" - }, - { - "type": "STRING", - "value": "uint8_t" - }, - { - "type": "STRING", - "value": "uint16_t" - }, - { - "type": "STRING", - "value": "uint32_t" - }, - { - "type": "STRING", - "value": "uint64_t" - }, - { - "type": "STRING", - "value": "char8_t" - }, - { - "type": "STRING", - "value": "char16_t" - }, - { - "type": "STRING", - "value": "char32_t" - }, - { - "type": "STRING", - "value": "char64_t" - } - ] - } - }, - "enum_specifier": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "enum" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "_type_identifier" - } - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "enumerator_list" - }, - { - "type": "BLANK" - } - ] - } - } - ] - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "SYMBOL", - "name": "enumerator_list" - } - } - ] - } - ] - }, - "enumerator_list": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "{" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "enumerator" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "enumerator" - } - ] - } - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": "}" - } - ] - }, - "struct_specifier": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "struct" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "ms_declspec_modifier" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "_type_identifier" - } - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "field_declaration_list" - }, - { - "type": "BLANK" - } - ] - } - } - ] - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "SYMBOL", - "name": "field_declaration_list" - } - } - ] - } - ] - }, - "union_specifier": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "union" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "ms_declspec_modifier" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "_type_identifier" - } - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "field_declaration_list" - }, - { - "type": "BLANK" - } - ] - } - } - ] - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "SYMBOL", - "name": "field_declaration_list" - } - } - ] - } - ] - }, - "field_declaration_list": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "{" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "_field_declaration_list_item" - } - }, - { - "type": "STRING", - "value": "}" - } - ] - }, - "_field_declaration_list_item": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "field_declaration" - }, - { - "type": "SYMBOL", - "name": "preproc_def" - }, - { - "type": "SYMBOL", - "name": "preproc_function_def" - }, - { - "type": "SYMBOL", - "name": "preproc_call" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "preproc_if_in_field_declaration_list" - }, - "named": true, - "value": "preproc_if" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "preproc_ifdef_in_field_declaration_list" - }, - "named": true, - "value": "preproc_ifdef" - } - ] - }, - "field_declaration": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_declaration_specifiers" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "SYMBOL", - "name": "_field_declarator" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "SYMBOL", - "name": "_field_declarator" - } - } - ] - } - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "bitfield_clause" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": ";" - } - ] - }, - "bitfield_clause": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": ":" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - }, - "enumerator": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "=" - }, - { - "type": "FIELD", - "name": "value", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - }, - { - "type": "BLANK" - } - ] - } - ] - }, - "variadic_parameter": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "..." - } - ] - }, - "parameter_list": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "parameter_declaration" - }, - { - "type": "SYMBOL", - "name": "variadic_parameter" - } - ] - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "parameter_declaration" - }, - { - "type": "SYMBOL", - "name": "variadic_parameter" - } - ] - } - ] - } - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - "parameter_declaration": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_declaration_specifiers" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_declarator" - }, - { - "type": "SYMBOL", - "name": "_abstract_declarator" - } - ] - } - }, - { - "type": "BLANK" - } - ] - } - ] - }, - "attributed_statement": { - "type": "SEQ", - "members": [ - { - "type": "REPEAT1", - "content": { - "type": "SYMBOL", - "name": "attribute_declaration" - } - }, - { - "type": "SYMBOL", - "name": "_statement" - } - ] - }, - "_statement": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "case_statement" - }, - { - "type": "SYMBOL", - "name": "_non_case_statement" - } - ] - }, - "_non_case_statement": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "attributed_statement" - }, - { - "type": "SYMBOL", - "name": "labeled_statement" - }, - { - "type": "SYMBOL", - "name": "compound_statement" - }, - { - "type": "SYMBOL", - "name": "expression_statement" - }, - { - "type": "SYMBOL", - "name": "if_statement" - }, - { - "type": "SYMBOL", - "name": "switch_statement" - }, - { - "type": "SYMBOL", - "name": "do_statement" - }, - { - "type": "SYMBOL", - "name": "while_statement" - }, - { - "type": "SYMBOL", - "name": "for_statement" - }, - { - "type": "SYMBOL", - "name": "return_statement" - }, - { - "type": "SYMBOL", - "name": "break_statement" - }, - { - "type": "SYMBOL", - "name": "continue_statement" - }, - { - "type": "SYMBOL", - "name": "goto_statement" - } - ] - }, - "labeled_statement": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "label", - "content": { - "type": "SYMBOL", - "name": "_statement_identifier" - } - }, - { - "type": "STRING", - "value": ":" - }, - { - "type": "SYMBOL", - "name": "_statement" - } - ] - }, - "expression_statement": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "SYMBOL", - "name": "comma_expression" - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": ";" - } - ] - }, - "if_statement": { - "type": "PREC_RIGHT", - "value": 0, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "if" - }, - { - "type": "FIELD", - "name": "condition", - "content": { - "type": "SYMBOL", - "name": "parenthesized_expression" - } - }, - { - "type": "FIELD", - "name": "consequence", - "content": { - "type": "SYMBOL", - "name": "_statement" - } - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "else" - }, - { - "type": "FIELD", - "name": "alternative", - "content": { - "type": "SYMBOL", - "name": "_statement" - } - } - ] - }, - { - "type": "BLANK" - } - ] - } - ] - } - }, - "switch_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "switch" - }, - { - "type": "FIELD", - "name": "condition", - "content": { - "type": "SYMBOL", - "name": "parenthesized_expression" - } - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "SYMBOL", - "name": "compound_statement" - } - } - ] - }, - "case_statement": { - "type": "PREC_RIGHT", - "value": 0, - "content": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "case" - }, - { - "type": "FIELD", - "name": "value", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - }, - { - "type": "STRING", - "value": "default" - } - ] - }, - { - "type": "STRING", - "value": ":" - }, - { - "type": "REPEAT", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_non_case_statement" - }, - { - "type": "SYMBOL", - "name": "declaration" - }, - { - "type": "SYMBOL", - "name": "type_definition" - } - ] - } - } - ] - } - }, - "while_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "while" - }, - { - "type": "FIELD", - "name": "condition", - "content": { - "type": "SYMBOL", - "name": "parenthesized_expression" - } - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "SYMBOL", - "name": "_statement" - } - } - ] - }, - "do_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "do" - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "SYMBOL", - "name": "_statement" - } - }, - { - "type": "STRING", - "value": "while" - }, - { - "type": "FIELD", - "name": "condition", - "content": { - "type": "SYMBOL", - "name": "parenthesized_expression" - } - }, - { - "type": "STRING", - "value": ";" - } - ] - }, - "for_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "for" - }, - { - "type": "STRING", - "value": "(" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "FIELD", - "name": "initializer", - "content": { - "type": "SYMBOL", - "name": "declaration" - } - }, - { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "initializer", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "SYMBOL", - "name": "comma_expression" - } - ] - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "STRING", - "value": ";" - } - ] - } - ] - }, - { - "type": "FIELD", - "name": "condition", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "SYMBOL", - "name": "comma_expression" - } - ] - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "STRING", - "value": ";" - }, - { - "type": "FIELD", - "name": "update", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "SYMBOL", - "name": "comma_expression" - } - ] - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "STRING", - "value": ")" - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "SYMBOL", - "name": "_statement" - } - } - ] - }, - "return_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "return" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "SYMBOL", - "name": "comma_expression" - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": ";" - } - ] - }, - "break_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "break" - }, - { - "type": "STRING", - "value": ";" - } - ] - }, - "continue_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "continue" - }, - { - "type": "STRING", - "value": ";" - } - ] - }, - "goto_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "goto" - }, - { - "type": "FIELD", - "name": "label", - "content": { - "type": "SYMBOL", - "name": "_statement_identifier" - } - }, - { - "type": "STRING", - "value": ";" - } - ] - }, - "_expression": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "conditional_expression" - }, - { - "type": "SYMBOL", - "name": "assignment_expression" - }, - { - "type": "SYMBOL", - "name": "binary_expression" - }, - { - "type": "SYMBOL", - "name": "unary_expression" - }, - { - "type": "SYMBOL", - "name": "update_expression" - }, - { - "type": "SYMBOL", - "name": "cast_expression" - }, - { - "type": "SYMBOL", - "name": "pointer_expression" - }, - { - "type": "SYMBOL", - "name": "sizeof_expression" - }, - { - "type": "SYMBOL", - "name": "subscript_expression" - }, - { - "type": "SYMBOL", - "name": "call_expression" - }, - { - "type": "SYMBOL", - "name": "field_expression" - }, - { - "type": "SYMBOL", - "name": "compound_literal_expression" - }, - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "SYMBOL", - "name": "number_literal" - }, - { - "type": "SYMBOL", - "name": "string_literal" - }, - { - "type": "SYMBOL", - "name": "true" - }, - { - "type": "SYMBOL", - "name": "false" - }, - { - "type": "SYMBOL", - "name": "null" - }, - { - "type": "SYMBOL", - "name": "concatenated_string" - }, - { - "type": "SYMBOL", - "name": "char_literal" - }, - { - "type": "SYMBOL", - "name": "parenthesized_expression" - } - ] - }, - "comma_expression": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "STRING", - "value": "," - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "SYMBOL", - "name": "comma_expression" - } - ] - } - } - ] - }, - "conditional_expression": { - "type": "PREC_RIGHT", - "value": -2, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "condition", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "STRING", - "value": "?" - }, - { - "type": "FIELD", - "name": "consequence", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "STRING", - "value": ":" - }, - { - "type": "FIELD", - "name": "alternative", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - "_assignment_left_expression": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "SYMBOL", - "name": "call_expression" - }, - { - "type": "SYMBOL", - "name": "field_expression" - }, - { - "type": "SYMBOL", - "name": "pointer_expression" - }, - { - "type": "SYMBOL", - "name": "subscript_expression" - }, - { - "type": "SYMBOL", - "name": "parenthesized_expression" - } - ] - }, - "assignment_expression": { - "type": "PREC_RIGHT", - "value": -1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_assignment_left_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "=" - }, - { - "type": "STRING", - "value": "*=" - }, - { - "type": "STRING", - "value": "/=" - }, - { - "type": "STRING", - "value": "%=" - }, - { - "type": "STRING", - "value": "+=" - }, - { - "type": "STRING", - "value": "-=" - }, - { - "type": "STRING", - "value": "<<=" - }, - { - "type": "STRING", - "value": ">>=" - }, - { - "type": "STRING", - "value": "&=" - }, - { - "type": "STRING", - "value": "^=" - }, - { - "type": "STRING", - "value": "|=" - } - ] - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - "pointer_expression": { - "type": "PREC_LEFT", - "value": 12, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "*" - }, - { - "type": "STRING", - "value": "&" - } - ] - } - }, - { - "type": "FIELD", - "name": "argument", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - "unary_expression": { - "type": "PREC_LEFT", - "value": 13, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "!" - }, - { - "type": "STRING", - "value": "~" - }, - { - "type": "STRING", - "value": "-" - }, - { - "type": "STRING", - "value": "+" - } - ] - } - }, - { - "type": "FIELD", - "name": "argument", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - "binary_expression": { - "type": "CHOICE", - "members": [ - { - "type": "PREC_LEFT", - "value": 10, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "+" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 10, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "-" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 11, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "*" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 11, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "/" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 11, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "%" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "||" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 2, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "&&" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "|" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 4, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "^" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 5, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "&" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 6, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "==" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 6, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "!=" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 7, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": ">" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 7, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": ">=" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 7, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "<=" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 7, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "<" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 9, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": "<<" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 9, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "STRING", - "value": ">>" - } - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - } - ] - }, - "update_expression": { - "type": "PREC_RIGHT", - "value": 13, - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "--" - }, - { - "type": "STRING", - "value": "++" - } - ] - } - }, - { - "type": "FIELD", - "name": "argument", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "argument", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "--" - }, - { - "type": "STRING", - "value": "++" - } - ] - } - } - ] - } - ] - } - }, - "cast_expression": { - "type": "PREC", - "value": 12, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "FIELD", - "name": "type", - "content": { - "type": "SYMBOL", - "name": "type_descriptor" - } - }, - { - "type": "STRING", - "value": ")" - }, - { - "type": "FIELD", - "name": "value", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - } - ] - } - }, - "type_descriptor": { - "type": "SEQ", - "members": [ - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "type_qualifier" - } - }, - { - "type": "FIELD", - "name": "type", - "content": { - "type": "SYMBOL", - "name": "_type_specifier" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "type_qualifier" - } - }, - { - "type": "FIELD", - "name": "declarator", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_abstract_declarator" - }, - { - "type": "BLANK" - } - ] - } - } - ] - }, - "sizeof_expression": { - "type": "PREC", - "value": 8, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "sizeof" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "FIELD", - "name": "value", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "FIELD", - "name": "type", - "content": { - "type": "SYMBOL", - "name": "type_descriptor" - } - }, - { - "type": "STRING", - "value": ")" - } - ] - } - ] - } - ] - } - }, - "subscript_expression": { - "type": "PREC", - "value": 16, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "argument", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "STRING", - "value": "[" - }, - { - "type": "FIELD", - "name": "index", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "STRING", - "value": "]" - } - ] - } - }, - "call_expression": { - "type": "PREC", - "value": 14, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "function", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "arguments", - "content": { - "type": "SYMBOL", - "name": "argument_list" - } - } - ] - } - }, - "argument_list": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - "field_expression": { - "type": "SEQ", - "members": [ - { - "type": "PREC", - "value": 15, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "argument", - "content": { - "type": "SYMBOL", - "name": "_expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "." - }, - { - "type": "STRING", - "value": "->" - } - ] - } - } - ] - } - }, - { - "type": "FIELD", - "name": "field", - "content": { - "type": "SYMBOL", - "name": "_field_identifier" - } - } - ] - }, - "compound_literal_expression": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "FIELD", - "name": "type", - "content": { - "type": "SYMBOL", - "name": "type_descriptor" - } - }, - { - "type": "STRING", - "value": ")" - }, - { - "type": "FIELD", - "name": "value", - "content": { - "type": "SYMBOL", - "name": "initializer_list" - } - } - ] - }, - "parenthesized_expression": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "SYMBOL", - "name": "comma_expression" - } - ] - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - "initializer_list": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "{" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "initializer_pair" - }, - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "SYMBOL", - "name": "initializer_list" - } - ] - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "initializer_pair" - }, - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "SYMBOL", - "name": "initializer_list" - } - ] - } - ] - } - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": "}" - } - ] - }, - "initializer_pair": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "designator", - "content": { - "type": "REPEAT1", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "subscript_designator" - }, - { - "type": "SYMBOL", - "name": "field_designator" - } - ] - } - } - }, - { - "type": "STRING", - "value": "=" - }, - { - "type": "FIELD", - "name": "value", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "SYMBOL", - "name": "initializer_list" - } - ] - } - } - ] - }, - "subscript_designator": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "[" - }, - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "]" - } - ] - }, - "field_designator": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "." - }, - { - "type": "SYMBOL", - "name": "_field_identifier" - } - ] - }, - "number_literal": { - "type": "TOKEN", - "content": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "PATTERN", - "value": "[-\\+]" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "0x" - }, - { - "type": "STRING", - "value": "0b" - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "REPEAT1", - "content": { - "type": "PATTERN", - "value": "[0-9]" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "'" - }, - { - "type": "REPEAT1", - "content": { - "type": "PATTERN", - "value": "[0-9]" - } - } - ] - } - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "0b" - }, - { - "type": "SEQ", - "members": [ - { - "type": "REPEAT1", - "content": { - "type": "PATTERN", - "value": "[0-9]" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "'" - }, - { - "type": "REPEAT1", - "content": { - "type": "PATTERN", - "value": "[0-9]" - } - } - ] - } - } - ] - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "0x" - }, - { - "type": "SEQ", - "members": [ - { - "type": "REPEAT1", - "content": { - "type": "PATTERN", - "value": "[0-9a-fA-F]" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "'" - }, - { - "type": "REPEAT1", - "content": { - "type": "PATTERN", - "value": "[0-9a-fA-F]" - } - } - ] - } - } - ] - } - ] - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "." - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "REPEAT1", - "content": { - "type": "PATTERN", - "value": "[0-9a-fA-F]" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "'" - }, - { - "type": "REPEAT1", - "content": { - "type": "PATTERN", - "value": "[0-9a-fA-F]" - } - } - ] - } - } - ] - }, - { - "type": "BLANK" - } - ] - } - ] - }, - { - "type": "BLANK" - } - ] - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "." - }, - { - "type": "SEQ", - "members": [ - { - "type": "REPEAT1", - "content": { - "type": "PATTERN", - "value": "[0-9]" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "'" - }, - { - "type": "REPEAT1", - "content": { - "type": "PATTERN", - "value": "[0-9]" - } - } - ] - } - } - ] - } - ] - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "PATTERN", - "value": "[eEpP]" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "PATTERN", - "value": "[-\\+]" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "REPEAT1", - "content": { - "type": "PATTERN", - "value": "[0-9a-fA-F]" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "'" - }, - { - "type": "REPEAT1", - "content": { - "type": "PATTERN", - "value": "[0-9a-fA-F]" - } - } - ] - } - } - ] - } - ] - }, - { - "type": "BLANK" - } - ] - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "REPEAT", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "u" - }, - { - "type": "STRING", - "value": "l" - }, - { - "type": "STRING", - "value": "U" - }, - { - "type": "STRING", - "value": "L" - }, - { - "type": "STRING", - "value": "f" - }, - { - "type": "STRING", - "value": "F" - } - ] - } - } - ] - } - }, - "char_literal": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "L'" - }, - { - "type": "STRING", - "value": "u'" - }, - { - "type": "STRING", - "value": "U'" - }, - { - "type": "STRING", - "value": "u8'" - }, - { - "type": "STRING", - "value": "'" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "escape_sequence" - }, - { - "type": "IMMEDIATE_TOKEN", - "content": { - "type": "PATTERN", - "value": "[^\\n']" - } - } - ] - }, - { - "type": "STRING", - "value": "'" - } - ] - }, - "concatenated_string": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "string_literal" - }, - { - "type": "REPEAT1", - "content": { - "type": "SYMBOL", - "name": "string_literal" - } - } - ] - }, - "string_literal": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "L\"" - }, - { - "type": "STRING", - "value": "u\"" - }, - { - "type": "STRING", - "value": "U\"" - }, - { - "type": "STRING", - "value": "u8\"" - }, - { - "type": "STRING", - "value": "\"" - } - ] - }, - { - "type": "REPEAT", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "IMMEDIATE_TOKEN", - "content": { - "type": "PREC", - "value": 1, - "content": { - "type": "PATTERN", - "value": "[^\\\\\"\\n]+" - } - } - }, - { - "type": "SYMBOL", - "name": "escape_sequence" - } - ] - } - }, - { - "type": "STRING", - "value": "\"" - } - ] - }, - "escape_sequence": { - "type": "TOKEN", - "content": { - "type": "PREC", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "\\" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "PATTERN", - "value": "[^xuU]" - }, - { - "type": "PATTERN", - "value": "\\d{2,3}" - }, - { - "type": "PATTERN", - "value": "x[0-9a-fA-F]{2,}" - }, - { - "type": "PATTERN", - "value": "u[0-9a-fA-F]{4}" - }, - { - "type": "PATTERN", - "value": "U[0-9a-fA-F]{8}" - } - ] - } - ] - } - } - }, - "system_lib_string": { - "type": "TOKEN", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "<" - }, - { - "type": "REPEAT", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "PATTERN", - "value": "[^>\\n]" - }, - { - "type": "STRING", - "value": "\\>" - } - ] - } - }, - { - "type": "STRING", - "value": ">" - } - ] - } - }, - "true": { - "type": "TOKEN", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "TRUE" - }, - { - "type": "STRING", - "value": "true" - } - ] - } - }, - "false": { - "type": "TOKEN", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "FALSE" - }, - { - "type": "STRING", - "value": "false" - } - ] - } - }, - "null": { - "type": "STRING", - "value": "NULL" - }, - "identifier": { - "type": "PATTERN", - "value": "[a-zA-Z_]\\w*" - }, - "_type_identifier": { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "identifier" - }, - "named": true, - "value": "type_identifier" - }, - "_field_identifier": { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "identifier" - }, - "named": true, - "value": "field_identifier" - }, - "_statement_identifier": { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "identifier" - }, - "named": true, - "value": "statement_identifier" - }, - "_empty_declaration": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_type_specifier" - }, - { - "type": "STRING", - "value": ";" - } - ] - }, - "macro_type_specifier": { - "type": "PREC_DYNAMIC", - "value": -1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - }, - { - "type": "STRING", - "value": "(" - }, - { - "type": "FIELD", - "name": "type", - "content": { - "type": "SYMBOL", - "name": "type_descriptor" - } - }, - { - "type": "STRING", - "value": ")" - } - ] - } - }, - "comment": { - "type": "TOKEN", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "//" - }, - { - "type": "PATTERN", - "value": "(\\\\(.|\\r?\\n)|[^\\\\\\n])*" - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "/*" - }, - { - "type": "PATTERN", - "value": "[^*]*\\*+([^/*][^*]*\\*+)*" - }, - { - "type": "STRING", - "value": "/" - } - ] - } - ] - } - } - }, - "extras": [ - { - "type": "PATTERN", - "value": "\\s|\\\\\\r?\\n" - }, - { - "type": "SYMBOL", - "name": "comment" - } - ], - "conflicts": [ - [ - "_type_specifier", - "_declarator" - ], - [ - "_type_specifier", - "_declarator", - "macro_type_specifier" - ], - [ - "_type_specifier", - "_expression" - ], - [ - "_type_specifier", - "_expression", - "macro_type_specifier" - ], - [ - "_type_specifier", - "macro_type_specifier" - ], - [ - "sized_type_specifier" - ], - [ - "attributed_statement" - ], - [ - "_declaration_modifiers", - "attributed_statement" - ] - ], - "precedences": [], - "externals": [], - "inline": [ - "_statement", - "_top_level_item", - "_type_identifier", - "_field_identifier", - "_statement_identifier", - "_non_case_statement", - "_assignment_left_expression" - ], - "supertypes": [ - "_expression", - "_statement", - "_type_specifier", - "_declarator", - "_field_declarator", - "_type_declarator", - "_abstract_declarator" - ], - "PREC": { - "PAREN_DECLARATOR": -10, - "ASSIGNMENT": -1, - "CONDITIONAL": -2, - "DEFAULT": 0, - "LOGICAL_OR": 1, - "LOGICAL_AND": 2, - "INCLUSIVE_OR": 3, - "EXCLUSIVE_OR": 4, - "BITWISE_AND": 5, - "EQUAL": 6, - "RELATIONAL": 7, - "SIZEOF": 8, - "SHIFT": 9, - "ADD": 10, - "MULTIPLY": 11, - "CAST": 12, - "UNARY": 13, - "CALL": 14, - "FIELD": 15, - "SUBSCRIPT": 16 - } -} - diff --git a/tree-sitter-c/src/node-types.json b/tree-sitter-c/src/node-types.json deleted file mode 100644 index ce327ec..0000000 --- a/tree-sitter-c/src/node-types.json +++ /dev/null @@ -1,3664 +0,0 @@ -[ - { - "type": "_abstract_declarator", - "named": true, - "subtypes": [ - { - "type": "abstract_array_declarator", - "named": true - }, - { - "type": "abstract_function_declarator", - "named": true - }, - { - "type": "abstract_parenthesized_declarator", - "named": true - }, - { - "type": "abstract_pointer_declarator", - "named": true - } - ] - }, - { - "type": "_declarator", - "named": true, - "subtypes": [ - { - "type": "array_declarator", - "named": true - }, - { - "type": "attributed_declarator", - "named": true - }, - { - "type": "function_declarator", - "named": true - }, - { - "type": "identifier", - "named": true - }, - { - "type": "parenthesized_declarator", - "named": true - }, - { - "type": "pointer_declarator", - "named": true - } - ] - }, - { - "type": "_expression", - "named": true, - "subtypes": [ - { - "type": "assignment_expression", - "named": true - }, - { - "type": "binary_expression", - "named": true - }, - { - "type": "call_expression", - "named": true - }, - { - "type": "cast_expression", - "named": true - }, - { - "type": "char_literal", - "named": true - }, - { - "type": "compound_literal_expression", - "named": true - }, - { - "type": "concatenated_string", - "named": true - }, - { - "type": "conditional_expression", - "named": true - }, - { - "type": "false", - "named": true - }, - { - "type": "field_expression", - "named": true - }, - { - "type": "identifier", - "named": true - }, - { - "type": "null", - "named": true - }, - { - "type": "number_literal", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "pointer_expression", - "named": true - }, - { - "type": "sizeof_expression", - "named": true - }, - { - "type": "string_literal", - "named": true - }, - { - "type": "subscript_expression", - "named": true - }, - { - "type": "true", - "named": true - }, - { - "type": "unary_expression", - "named": true - }, - { - "type": "update_expression", - "named": true - } - ] - }, - { - "type": "_field_declarator", - "named": true, - "subtypes": [ - { - "type": "array_declarator", - "named": true - }, - { - "type": "attributed_declarator", - "named": true - }, - { - "type": "field_identifier", - "named": true - }, - { - "type": "function_declarator", - "named": true - }, - { - "type": "parenthesized_declarator", - "named": true - }, - { - "type": "pointer_declarator", - "named": true - } - ] - }, - { - "type": "_statement", - "named": true, - "subtypes": [ - { - "type": "attributed_statement", - "named": true - }, - { - "type": "break_statement", - "named": true - }, - { - "type": "case_statement", - "named": true - }, - { - "type": "compound_statement", - "named": true - }, - { - "type": "continue_statement", - "named": true - }, - { - "type": "do_statement", - "named": true - }, - { - "type": "expression_statement", - "named": true - }, - { - "type": "for_statement", - "named": true - }, - { - "type": "goto_statement", - "named": true - }, - { - "type": "if_statement", - "named": true - }, - { - "type": "labeled_statement", - "named": true - }, - { - "type": "return_statement", - "named": true - }, - { - "type": "switch_statement", - "named": true - }, - { - "type": "while_statement", - "named": true - } - ] - }, - { - "type": "_type_declarator", - "named": true, - "subtypes": [ - { - "type": "array_declarator", - "named": true - }, - { - "type": "attributed_declarator", - "named": true - }, - { - "type": "function_declarator", - "named": true - }, - { - "type": "parenthesized_declarator", - "named": true - }, - { - "type": "pointer_declarator", - "named": true - }, - { - "type": "type_identifier", - "named": true - } - ] - }, - { - "type": "_type_specifier", - "named": true, - "subtypes": [ - { - "type": "enum_specifier", - "named": true - }, - { - "type": "macro_type_specifier", - "named": true - }, - { - "type": "primitive_type", - "named": true - }, - { - "type": "sized_type_specifier", - "named": true - }, - { - "type": "struct_specifier", - "named": true - }, - { - "type": "type_identifier", - "named": true - }, - { - "type": "union_specifier", - "named": true - } - ] - }, - { - "type": "abstract_array_declarator", - "named": true, - "fields": { - "declarator": { - "multiple": false, - "required": false, - "types": [ - { - "type": "_abstract_declarator", - "named": true - } - ] - }, - "size": { - "multiple": false, - "required": false, - "types": [ - { - "type": "*", - "named": false - }, - { - "type": "_expression", - "named": true - } - ] - } - }, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "type_qualifier", - "named": true - } - ] - } - }, - { - "type": "abstract_function_declarator", - "named": true, - "fields": { - "declarator": { - "multiple": false, - "required": false, - "types": [ - { - "type": "_abstract_declarator", - "named": true - } - ] - }, - "parameters": { - "multiple": false, - "required": true, - "types": [ - { - "type": "parameter_list", - "named": true - } - ] - } - } - }, - { - "type": "abstract_parenthesized_declarator", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_abstract_declarator", - "named": true - } - ] - } - }, - { - "type": "abstract_pointer_declarator", - "named": true, - "fields": { - "declarator": { - "multiple": false, - "required": false, - "types": [ - { - "type": "_abstract_declarator", - "named": true - } - ] - } - }, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "type_qualifier", - "named": true - } - ] - } - }, - { - "type": "argument_list", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "_expression", - "named": true - }, - { - "type": "preproc_defined", - "named": true - } - ] - } - }, - { - "type": "array_declarator", - "named": true, - "fields": { - "declarator": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_declarator", - "named": true - }, - { - "type": "_field_declarator", - "named": true - }, - { - "type": "_type_declarator", - "named": true - } - ] - }, - "size": { - "multiple": false, - "required": false, - "types": [ - { - "type": "*", - "named": false - }, - { - "type": "_expression", - "named": true - } - ] - } - }, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "type_qualifier", - "named": true - } - ] - } - }, - { - "type": "assignment_expression", - "named": true, - "fields": { - "left": { - "multiple": false, - "required": true, - "types": [ - { - "type": "call_expression", - "named": true - }, - { - "type": "field_expression", - "named": true - }, - { - "type": "identifier", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "pointer_expression", - "named": true - }, - { - "type": "subscript_expression", - "named": true - } - ] - }, - "operator": { - "multiple": false, - "required": true, - "types": [ - { - "type": "%=", - "named": false - }, - { - "type": "&=", - "named": false - }, - { - "type": "*=", - "named": false - }, - { - "type": "+=", - "named": false - }, - { - "type": "-=", - "named": false - }, - { - "type": "/=", - "named": false - }, - { - "type": "<<=", - "named": false - }, - { - "type": "=", - "named": false - }, - { - "type": ">>=", - "named": false - }, - { - "type": "^=", - "named": false - }, - { - "type": "|=", - "named": false - } - ] - }, - "right": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - } - ] - } - } - }, - { - "type": "attribute", - "named": true, - "fields": { - "name": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - }, - "prefix": { - "multiple": false, - "required": false, - "types": [ - { - "type": "identifier", - "named": true - } - ] - } - }, - "children": { - "multiple": false, - "required": false, - "types": [ - { - "type": "argument_list", - "named": true - } - ] - } - }, - { - "type": "attribute_declaration", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "attribute", - "named": true - } - ] - } - }, - { - "type": "attribute_specifier", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "argument_list", - "named": true - } - ] - } - }, - { - "type": "attributed_declarator", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "_declarator", - "named": true - }, - { - "type": "_field_declarator", - "named": true - }, - { - "type": "_type_declarator", - "named": true - }, - { - "type": "attribute_declaration", - "named": true - } - ] - } - }, - { - "type": "attributed_statement", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "_statement", - "named": true - }, - { - "type": "attribute_declaration", - "named": true - } - ] - } - }, - { - "type": "binary_expression", - "named": true, - "fields": { - "left": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - }, - { - "type": "preproc_defined", - "named": true - } - ] - }, - "operator": { - "multiple": false, - "required": true, - "types": [ - { - "type": "!=", - "named": false - }, - { - "type": "%", - "named": false - }, - { - "type": "&", - "named": false - }, - { - "type": "&&", - "named": false - }, - { - "type": "*", - "named": false - }, - { - "type": "+", - "named": false - }, - { - "type": "-", - "named": false - }, - { - "type": "/", - "named": false - }, - { - "type": "<", - "named": false - }, - { - "type": "<<", - "named": false - }, - { - "type": "<=", - "named": false - }, - { - "type": "==", - "named": false - }, - { - "type": ">", - "named": false - }, - { - "type": ">=", - "named": false - }, - { - "type": ">>", - "named": false - }, - { - "type": "^", - "named": false - }, - { - "type": "|", - "named": false - }, - { - "type": "||", - "named": false - } - ] - }, - "right": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - }, - { - "type": "preproc_defined", - "named": true - } - ] - } - } - }, - { - "type": "bitfield_clause", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - } - ] - } - }, - { - "type": "break_statement", - "named": true, - "fields": {} - }, - { - "type": "call_expression", - "named": true, - "fields": { - "arguments": { - "multiple": false, - "required": true, - "types": [ - { - "type": "argument_list", - "named": true - } - ] - }, - "function": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - } - ] - } - } - }, - { - "type": "case_statement", - "named": true, - "fields": { - "value": { - "multiple": false, - "required": false, - "types": [ - { - "type": "_expression", - "named": true - } - ] - } - }, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "attributed_statement", - "named": true - }, - { - "type": "break_statement", - "named": true - }, - { - "type": "compound_statement", - "named": true - }, - { - "type": "continue_statement", - "named": true - }, - { - "type": "declaration", - "named": true - }, - { - "type": "do_statement", - "named": true - }, - { - "type": "expression_statement", - "named": true - }, - { - "type": "for_statement", - "named": true - }, - { - "type": "goto_statement", - "named": true - }, - { - "type": "if_statement", - "named": true - }, - { - "type": "labeled_statement", - "named": true - }, - { - "type": "return_statement", - "named": true - }, - { - "type": "switch_statement", - "named": true - }, - { - "type": "type_definition", - "named": true - }, - { - "type": "while_statement", - "named": true - } - ] - } - }, - { - "type": "cast_expression", - "named": true, - "fields": { - "type": { - "multiple": false, - "required": true, - "types": [ - { - "type": "type_descriptor", - "named": true - } - ] - }, - "value": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - } - ] - } - } - }, - { - "type": "char_literal", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": false, - "types": [ - { - "type": "escape_sequence", - "named": true - } - ] - } - }, - { - "type": "comma_expression", - "named": true, - "fields": { - "left": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - } - ] - }, - "right": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - }, - { - "type": "comma_expression", - "named": true - } - ] - } - } - }, - { - "type": "compound_literal_expression", - "named": true, - "fields": { - "type": { - "multiple": false, - "required": true, - "types": [ - { - "type": "type_descriptor", - "named": true - } - ] - }, - "value": { - "multiple": false, - "required": true, - "types": [ - { - "type": "initializer_list", - "named": true - } - ] - } - } - }, - { - "type": "compound_statement", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "_statement", - "named": true - }, - { - "type": "_type_specifier", - "named": true - }, - { - "type": "declaration", - "named": true - }, - { - "type": "function_definition", - "named": true - }, - { - "type": "linkage_specification", - "named": true - }, - { - "type": "preproc_call", - "named": true - }, - { - "type": "preproc_def", - "named": true - }, - { - "type": "preproc_function_def", - "named": true - }, - { - "type": "preproc_if", - "named": true - }, - { - "type": "preproc_ifdef", - "named": true - }, - { - "type": "preproc_include", - "named": true - }, - { - "type": "type_definition", - "named": true - } - ] - } - }, - { - "type": "concatenated_string", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "string_literal", - "named": true - } - ] - } - }, - { - "type": "conditional_expression", - "named": true, - "fields": { - "alternative": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - } - ] - }, - "condition": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - } - ] - }, - "consequence": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - } - ] - } - } - }, - { - "type": "continue_statement", - "named": true, - "fields": {} - }, - { - "type": "declaration", - "named": true, - "fields": { - "declarator": { - "multiple": true, - "required": true, - "types": [ - { - "type": "_declarator", - "named": true - }, - { - "type": "init_declarator", - "named": true - } - ] - }, - "type": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_type_specifier", - "named": true - } - ] - } - }, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "attribute_declaration", - "named": true - }, - { - "type": "attribute_specifier", - "named": true - }, - { - "type": "ms_declspec_modifier", - "named": true - }, - { - "type": "storage_class_specifier", - "named": true - }, - { - "type": "type_qualifier", - "named": true - } - ] - } - }, - { - "type": "declaration_list", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "_statement", - "named": true - }, - { - "type": "_type_specifier", - "named": true - }, - { - "type": "declaration", - "named": true - }, - { - "type": "function_definition", - "named": true - }, - { - "type": "linkage_specification", - "named": true - }, - { - "type": "preproc_call", - "named": true - }, - { - "type": "preproc_def", - "named": true - }, - { - "type": "preproc_function_def", - "named": true - }, - { - "type": "preproc_if", - "named": true - }, - { - "type": "preproc_ifdef", - "named": true - }, - { - "type": "preproc_include", - "named": true - }, - { - "type": "type_definition", - "named": true - } - ] - } - }, - { - "type": "do_statement", - "named": true, - "fields": { - "body": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_statement", - "named": true - } - ] - }, - "condition": { - "multiple": false, - "required": true, - "types": [ - { - "type": "parenthesized_expression", - "named": true - } - ] - } - } - }, - { - "type": "enum_specifier", - "named": true, - "fields": { - "body": { - "multiple": false, - "required": false, - "types": [ - { - "type": "enumerator_list", - "named": true - } - ] - }, - "name": { - "multiple": false, - "required": false, - "types": [ - { - "type": "type_identifier", - "named": true - } - ] - } - } - }, - { - "type": "enumerator", - "named": true, - "fields": { - "name": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - }, - "value": { - "multiple": false, - "required": false, - "types": [ - { - "type": "_expression", - "named": true - } - ] - } - } - }, - { - "type": "enumerator_list", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "enumerator", - "named": true - } - ] - } - }, - { - "type": "expression_statement", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": false, - "types": [ - { - "type": "_expression", - "named": true - }, - { - "type": "comma_expression", - "named": true - } - ] - } - }, - { - "type": "field_declaration", - "named": true, - "fields": { - "declarator": { - "multiple": true, - "required": false, - "types": [ - { - "type": "_field_declarator", - "named": true - } - ] - }, - "type": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_type_specifier", - "named": true - } - ] - } - }, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "attribute_declaration", - "named": true - }, - { - "type": "attribute_specifier", - "named": true - }, - { - "type": "bitfield_clause", - "named": true - }, - { - "type": "ms_declspec_modifier", - "named": true - }, - { - "type": "storage_class_specifier", - "named": true - }, - { - "type": "type_qualifier", - "named": true - } - ] - } - }, - { - "type": "field_declaration_list", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "field_declaration", - "named": true - }, - { - "type": "preproc_call", - "named": true - }, - { - "type": "preproc_def", - "named": true - }, - { - "type": "preproc_function_def", - "named": true - }, - { - "type": "preproc_if", - "named": true - }, - { - "type": "preproc_ifdef", - "named": true - } - ] - } - }, - { - "type": "field_designator", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "field_identifier", - "named": true - } - ] - } - }, - { - "type": "field_expression", - "named": true, - "fields": { - "argument": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - } - ] - }, - "field": { - "multiple": false, - "required": true, - "types": [ - { - "type": "field_identifier", - "named": true - } - ] - }, - "operator": { - "multiple": false, - "required": true, - "types": [ - { - "type": "->", - "named": false - }, - { - "type": ".", - "named": false - } - ] - } - } - }, - { - "type": "for_statement", - "named": true, - "fields": { - "body": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_statement", - "named": true - } - ] - }, - "condition": { - "multiple": false, - "required": false, - "types": [ - { - "type": "_expression", - "named": true - }, - { - "type": "comma_expression", - "named": true - } - ] - }, - "initializer": { - "multiple": false, - "required": false, - "types": [ - { - "type": "_expression", - "named": true - }, - { - "type": "comma_expression", - "named": true - }, - { - "type": "declaration", - "named": true - } - ] - }, - "update": { - "multiple": false, - "required": false, - "types": [ - { - "type": "_expression", - "named": true - }, - { - "type": "comma_expression", - "named": true - } - ] - } - } - }, - { - "type": "function_declarator", - "named": true, - "fields": { - "declarator": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_declarator", - "named": true - }, - { - "type": "_field_declarator", - "named": true - }, - { - "type": "_type_declarator", - "named": true - } - ] - }, - "parameters": { - "multiple": false, - "required": true, - "types": [ - { - "type": "parameter_list", - "named": true - } - ] - } - }, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "attribute_specifier", - "named": true - } - ] - } - }, - { - "type": "function_definition", - "named": true, - "fields": { - "body": { - "multiple": false, - "required": true, - "types": [ - { - "type": "compound_statement", - "named": true - } - ] - }, - "declarator": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_declarator", - "named": true - } - ] - }, - "type": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_type_specifier", - "named": true - } - ] - } - }, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "attribute_declaration", - "named": true - }, - { - "type": "attribute_specifier", - "named": true - }, - { - "type": "ms_call_modifier", - "named": true - }, - { - "type": "ms_declspec_modifier", - "named": true - }, - { - "type": "storage_class_specifier", - "named": true - }, - { - "type": "type_qualifier", - "named": true - } - ] - } - }, - { - "type": "goto_statement", - "named": true, - "fields": { - "label": { - "multiple": false, - "required": true, - "types": [ - { - "type": "statement_identifier", - "named": true - } - ] - } - } - }, - { - "type": "if_statement", - "named": true, - "fields": { - "alternative": { - "multiple": false, - "required": false, - "types": [ - { - "type": "_statement", - "named": true - } - ] - }, - "condition": { - "multiple": false, - "required": true, - "types": [ - { - "type": "parenthesized_expression", - "named": true - } - ] - }, - "consequence": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_statement", - "named": true - } - ] - } - } - }, - { - "type": "init_declarator", - "named": true, - "fields": { - "declarator": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_declarator", - "named": true - } - ] - }, - "value": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - }, - { - "type": "initializer_list", - "named": true - } - ] - } - } - }, - { - "type": "initializer_list", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "_expression", - "named": true - }, - { - "type": "initializer_list", - "named": true - }, - { - "type": "initializer_pair", - "named": true - } - ] - } - }, - { - "type": "initializer_pair", - "named": true, - "fields": { - "designator": { - "multiple": true, - "required": true, - "types": [ - { - "type": "field_designator", - "named": true - }, - { - "type": "subscript_designator", - "named": true - } - ] - }, - "value": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - }, - { - "type": "initializer_list", - "named": true - } - ] - } - } - }, - { - "type": "labeled_statement", - "named": true, - "fields": { - "label": { - "multiple": false, - "required": true, - "types": [ - { - "type": "statement_identifier", - "named": true - } - ] - } - }, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_statement", - "named": true - } - ] - } - }, - { - "type": "linkage_specification", - "named": true, - "fields": { - "body": { - "multiple": false, - "required": true, - "types": [ - { - "type": "declaration", - "named": true - }, - { - "type": "declaration_list", - "named": true - }, - { - "type": "function_definition", - "named": true - } - ] - }, - "value": { - "multiple": false, - "required": true, - "types": [ - { - "type": "string_literal", - "named": true - } - ] - } - } - }, - { - "type": "macro_type_specifier", - "named": true, - "fields": { - "name": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - }, - "type": { - "multiple": false, - "required": true, - "types": [ - { - "type": "type_descriptor", - "named": true - } - ] - } - } - }, - { - "type": "ms_based_modifier", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "argument_list", - "named": true - } - ] - } - }, - { - "type": "ms_call_modifier", - "named": true, - "fields": {} - }, - { - "type": "ms_declspec_modifier", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - } - }, - { - "type": "ms_pointer_modifier", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "ms_restrict_modifier", - "named": true - }, - { - "type": "ms_signed_ptr_modifier", - "named": true - }, - { - "type": "ms_unaligned_ptr_modifier", - "named": true - }, - { - "type": "ms_unsigned_ptr_modifier", - "named": true - } - ] - } - }, - { - "type": "ms_unaligned_ptr_modifier", - "named": true, - "fields": {} - }, - { - "type": "parameter_declaration", - "named": true, - "fields": { - "declarator": { - "multiple": false, - "required": false, - "types": [ - { - "type": "_abstract_declarator", - "named": true - }, - { - "type": "_declarator", - "named": true - } - ] - }, - "type": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_type_specifier", - "named": true - } - ] - } - }, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "attribute_declaration", - "named": true - }, - { - "type": "attribute_specifier", - "named": true - }, - { - "type": "ms_declspec_modifier", - "named": true - }, - { - "type": "storage_class_specifier", - "named": true - }, - { - "type": "type_qualifier", - "named": true - } - ] - } - }, - { - "type": "parameter_list", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "parameter_declaration", - "named": true - }, - { - "type": "variadic_parameter", - "named": true - } - ] - } - }, - { - "type": "parenthesized_declarator", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_declarator", - "named": true - }, - { - "type": "_field_declarator", - "named": true - }, - { - "type": "_type_declarator", - "named": true - } - ] - } - }, - { - "type": "parenthesized_expression", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - }, - { - "type": "comma_expression", - "named": true - }, - { - "type": "preproc_defined", - "named": true - } - ] - } - }, - { - "type": "pointer_declarator", - "named": true, - "fields": { - "declarator": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_declarator", - "named": true - }, - { - "type": "_field_declarator", - "named": true - }, - { - "type": "_type_declarator", - "named": true - } - ] - } - }, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "ms_based_modifier", - "named": true - }, - { - "type": "ms_pointer_modifier", - "named": true - }, - { - "type": "type_qualifier", - "named": true - } - ] - } - }, - { - "type": "pointer_expression", - "named": true, - "fields": { - "argument": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - } - ] - }, - "operator": { - "multiple": false, - "required": true, - "types": [ - { - "type": "&", - "named": false - }, - { - "type": "*", - "named": false - } - ] - } - } - }, - { - "type": "preproc_call", - "named": true, - "fields": { - "argument": { - "multiple": false, - "required": false, - "types": [ - { - "type": "preproc_arg", - "named": true - } - ] - }, - "directive": { - "multiple": false, - "required": true, - "types": [ - { - "type": "preproc_directive", - "named": true - } - ] - } - } - }, - { - "type": "preproc_def", - "named": true, - "fields": { - "name": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - }, - "value": { - "multiple": false, - "required": false, - "types": [ - { - "type": "preproc_arg", - "named": true - } - ] - } - } - }, - { - "type": "preproc_defined", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - } - }, - { - "type": "preproc_elif", - "named": true, - "fields": { - "alternative": { - "multiple": false, - "required": false, - "types": [ - { - "type": "preproc_elif", - "named": true - }, - { - "type": "preproc_else", - "named": true - } - ] - }, - "condition": { - "multiple": false, - "required": true, - "types": [ - { - "type": "binary_expression", - "named": true - }, - { - "type": "call_expression", - "named": true - }, - { - "type": "char_literal", - "named": true - }, - { - "type": "identifier", - "named": true - }, - { - "type": "number_literal", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "preproc_defined", - "named": true - }, - { - "type": "unary_expression", - "named": true - } - ] - } - }, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "_statement", - "named": true - }, - { - "type": "_type_specifier", - "named": true - }, - { - "type": "declaration", - "named": true - }, - { - "type": "field_declaration", - "named": true - }, - { - "type": "function_definition", - "named": true - }, - { - "type": "linkage_specification", - "named": true - }, - { - "type": "preproc_call", - "named": true - }, - { - "type": "preproc_def", - "named": true - }, - { - "type": "preproc_function_def", - "named": true - }, - { - "type": "preproc_if", - "named": true - }, - { - "type": "preproc_ifdef", - "named": true - }, - { - "type": "preproc_include", - "named": true - }, - { - "type": "type_definition", - "named": true - } - ] - } - }, - { - "type": "preproc_else", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "_statement", - "named": true - }, - { - "type": "_type_specifier", - "named": true - }, - { - "type": "declaration", - "named": true - }, - { - "type": "field_declaration", - "named": true - }, - { - "type": "function_definition", - "named": true - }, - { - "type": "linkage_specification", - "named": true - }, - { - "type": "preproc_call", - "named": true - }, - { - "type": "preproc_def", - "named": true - }, - { - "type": "preproc_function_def", - "named": true - }, - { - "type": "preproc_if", - "named": true - }, - { - "type": "preproc_ifdef", - "named": true - }, - { - "type": "preproc_include", - "named": true - }, - { - "type": "type_definition", - "named": true - } - ] - } - }, - { - "type": "preproc_function_def", - "named": true, - "fields": { - "name": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - }, - "parameters": { - "multiple": false, - "required": true, - "types": [ - { - "type": "preproc_params", - "named": true - } - ] - }, - "value": { - "multiple": false, - "required": false, - "types": [ - { - "type": "preproc_arg", - "named": true - } - ] - } - } - }, - { - "type": "preproc_if", - "named": true, - "fields": { - "alternative": { - "multiple": false, - "required": false, - "types": [ - { - "type": "preproc_elif", - "named": true - }, - { - "type": "preproc_else", - "named": true - } - ] - }, - "condition": { - "multiple": false, - "required": true, - "types": [ - { - "type": "binary_expression", - "named": true - }, - { - "type": "call_expression", - "named": true - }, - { - "type": "char_literal", - "named": true - }, - { - "type": "identifier", - "named": true - }, - { - "type": "number_literal", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "preproc_defined", - "named": true - }, - { - "type": "unary_expression", - "named": true - } - ] - } - }, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "_statement", - "named": true - }, - { - "type": "_type_specifier", - "named": true - }, - { - "type": "declaration", - "named": true - }, - { - "type": "field_declaration", - "named": true - }, - { - "type": "function_definition", - "named": true - }, - { - "type": "linkage_specification", - "named": true - }, - { - "type": "preproc_call", - "named": true - }, - { - "type": "preproc_def", - "named": true - }, - { - "type": "preproc_function_def", - "named": true - }, - { - "type": "preproc_if", - "named": true - }, - { - "type": "preproc_ifdef", - "named": true - }, - { - "type": "preproc_include", - "named": true - }, - { - "type": "type_definition", - "named": true - } - ] - } - }, - { - "type": "preproc_ifdef", - "named": true, - "fields": { - "alternative": { - "multiple": false, - "required": false, - "types": [ - { - "type": "preproc_elif", - "named": true - }, - { - "type": "preproc_else", - "named": true - } - ] - }, - "name": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - } - }, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "_statement", - "named": true - }, - { - "type": "_type_specifier", - "named": true - }, - { - "type": "declaration", - "named": true - }, - { - "type": "field_declaration", - "named": true - }, - { - "type": "function_definition", - "named": true - }, - { - "type": "linkage_specification", - "named": true - }, - { - "type": "preproc_call", - "named": true - }, - { - "type": "preproc_def", - "named": true - }, - { - "type": "preproc_function_def", - "named": true - }, - { - "type": "preproc_if", - "named": true - }, - { - "type": "preproc_ifdef", - "named": true - }, - { - "type": "preproc_include", - "named": true - }, - { - "type": "type_definition", - "named": true - } - ] - } - }, - { - "type": "preproc_include", - "named": true, - "fields": { - "path": { - "multiple": false, - "required": true, - "types": [ - { - "type": "call_expression", - "named": true - }, - { - "type": "identifier", - "named": true - }, - { - "type": "string_literal", - "named": true - }, - { - "type": "system_lib_string", - "named": true - } - ] - } - } - }, - { - "type": "preproc_params", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "identifier", - "named": true - } - ] - } - }, - { - "type": "return_statement", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": false, - "types": [ - { - "type": "_expression", - "named": true - }, - { - "type": "comma_expression", - "named": true - } - ] - } - }, - { - "type": "sized_type_specifier", - "named": true, - "fields": { - "type": { - "multiple": false, - "required": false, - "types": [ - { - "type": "primitive_type", - "named": true - }, - { - "type": "type_identifier", - "named": true - } - ] - } - } - }, - { - "type": "sizeof_expression", - "named": true, - "fields": { - "type": { - "multiple": false, - "required": false, - "types": [ - { - "type": "type_descriptor", - "named": true - } - ] - }, - "value": { - "multiple": false, - "required": false, - "types": [ - { - "type": "_expression", - "named": true - } - ] - } - } - }, - { - "type": "storage_class_specifier", - "named": true, - "fields": {} - }, - { - "type": "string_literal", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "escape_sequence", - "named": true - } - ] - } - }, - { - "type": "struct_specifier", - "named": true, - "fields": { - "body": { - "multiple": false, - "required": false, - "types": [ - { - "type": "field_declaration_list", - "named": true - } - ] - }, - "name": { - "multiple": false, - "required": false, - "types": [ - { - "type": "type_identifier", - "named": true - } - ] - } - }, - "children": { - "multiple": false, - "required": false, - "types": [ - { - "type": "ms_declspec_modifier", - "named": true - } - ] - } - }, - { - "type": "subscript_designator", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - } - ] - } - }, - { - "type": "subscript_expression", - "named": true, - "fields": { - "argument": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - } - ] - }, - "index": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - } - ] - } - } - }, - { - "type": "switch_statement", - "named": true, - "fields": { - "body": { - "multiple": false, - "required": true, - "types": [ - { - "type": "compound_statement", - "named": true - } - ] - }, - "condition": { - "multiple": false, - "required": true, - "types": [ - { - "type": "parenthesized_expression", - "named": true - } - ] - } - } - }, - { - "type": "translation_unit", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "_statement", - "named": true - }, - { - "type": "_type_specifier", - "named": true - }, - { - "type": "declaration", - "named": true - }, - { - "type": "function_definition", - "named": true - }, - { - "type": "linkage_specification", - "named": true - }, - { - "type": "preproc_call", - "named": true - }, - { - "type": "preproc_def", - "named": true - }, - { - "type": "preproc_function_def", - "named": true - }, - { - "type": "preproc_if", - "named": true - }, - { - "type": "preproc_ifdef", - "named": true - }, - { - "type": "preproc_include", - "named": true - }, - { - "type": "type_definition", - "named": true - } - ] - } - }, - { - "type": "type_definition", - "named": true, - "fields": { - "declarator": { - "multiple": true, - "required": true, - "types": [ - { - "type": "_type_declarator", - "named": true - } - ] - }, - "type": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_type_specifier", - "named": true - } - ] - } - }, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "type_qualifier", - "named": true - } - ] - } - }, - { - "type": "type_descriptor", - "named": true, - "fields": { - "declarator": { - "multiple": false, - "required": false, - "types": [ - { - "type": "_abstract_declarator", - "named": true - } - ] - }, - "type": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_type_specifier", - "named": true - } - ] - } - }, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "type_qualifier", - "named": true - } - ] - } - }, - { - "type": "type_qualifier", - "named": true, - "fields": {} - }, - { - "type": "unary_expression", - "named": true, - "fields": { - "argument": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - }, - { - "type": "preproc_defined", - "named": true - } - ] - }, - "operator": { - "multiple": false, - "required": true, - "types": [ - { - "type": "!", - "named": false - }, - { - "type": "+", - "named": false - }, - { - "type": "-", - "named": false - }, - { - "type": "~", - "named": false - } - ] - } - } - }, - { - "type": "union_specifier", - "named": true, - "fields": { - "body": { - "multiple": false, - "required": false, - "types": [ - { - "type": "field_declaration_list", - "named": true - } - ] - }, - "name": { - "multiple": false, - "required": false, - "types": [ - { - "type": "type_identifier", - "named": true - } - ] - } - }, - "children": { - "multiple": false, - "required": false, - "types": [ - { - "type": "ms_declspec_modifier", - "named": true - } - ] - } - }, - { - "type": "update_expression", - "named": true, - "fields": { - "argument": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_expression", - "named": true - } - ] - }, - "operator": { - "multiple": false, - "required": true, - "types": [ - { - "type": "++", - "named": false - }, - { - "type": "--", - "named": false - } - ] - } - } - }, - { - "type": "variadic_parameter", - "named": true, - "fields": {} - }, - { - "type": "while_statement", - "named": true, - "fields": { - "body": { - "multiple": false, - "required": true, - "types": [ - { - "type": "_statement", - "named": true - } - ] - }, - "condition": { - "multiple": false, - "required": true, - "types": [ - { - "type": "parenthesized_expression", - "named": true - } - ] - } - } - }, - { - "type": "\n", - "named": false - }, - { - "type": "!", - "named": false - }, - { - "type": "!=", - "named": false - }, - { - "type": "\"", - "named": false - }, - { - "type": "#define", - "named": false - }, - { - "type": "#elif", - "named": false - }, - { - "type": "#else", - "named": false - }, - { - "type": "#endif", - "named": false - }, - { - "type": "#if", - "named": false - }, - { - "type": "#ifdef", - "named": false - }, - { - "type": "#ifndef", - "named": false - }, - { - "type": "#include", - "named": false - }, - { - "type": "%", - "named": false - }, - { - "type": "%=", - "named": false - }, - { - "type": "&", - "named": false - }, - { - "type": "&&", - "named": false - }, - { - "type": "&=", - "named": false - }, - { - "type": "'", - "named": false - }, - { - "type": "(", - "named": false - }, - { - "type": ")", - "named": false - }, - { - "type": "*", - "named": false - }, - { - "type": "*=", - "named": false - }, - { - "type": "+", - "named": false - }, - { - "type": "++", - "named": false - }, - { - "type": "+=", - "named": false - }, - { - "type": ",", - "named": false - }, - { - "type": "-", - "named": false - }, - { - "type": "--", - "named": false - }, - { - "type": "-=", - "named": false - }, - { - "type": "->", - "named": false - }, - { - "type": ".", - "named": false - }, - { - "type": "...", - "named": false - }, - { - "type": "/", - "named": false - }, - { - "type": "/=", - "named": false - }, - { - "type": ":", - "named": false - }, - { - "type": "::", - "named": false - }, - { - "type": ";", - "named": false - }, - { - "type": "<", - "named": false - }, - { - "type": "<<", - "named": false - }, - { - "type": "<<=", - "named": false - }, - { - "type": "<=", - "named": false - }, - { - "type": "=", - "named": false - }, - { - "type": "==", - "named": false - }, - { - "type": ">", - "named": false - }, - { - "type": ">=", - "named": false - }, - { - "type": ">>", - "named": false - }, - { - "type": ">>=", - "named": false - }, - { - "type": "?", - "named": false - }, - { - "type": "L\"", - "named": false - }, - { - "type": "L'", - "named": false - }, - { - "type": "U\"", - "named": false - }, - { - "type": "U'", - "named": false - }, - { - "type": "[", - "named": false - }, - { - "type": "[[", - "named": false - }, - { - "type": "]", - "named": false - }, - { - "type": "]]", - "named": false - }, - { - "type": "^", - "named": false - }, - { - "type": "^=", - "named": false - }, - { - "type": "_Atomic", - "named": false - }, - { - "type": "__attribute__", - "named": false - }, - { - "type": "__based", - "named": false - }, - { - "type": "__cdecl", - "named": false - }, - { - "type": "__clrcall", - "named": false - }, - { - "type": "__declspec", - "named": false - }, - { - "type": "__fastcall", - "named": false - }, - { - "type": "__stdcall", - "named": false - }, - { - "type": "__thiscall", - "named": false - }, - { - "type": "__unaligned", - "named": false - }, - { - "type": "__vectorcall", - "named": false - }, - { - "type": "_unaligned", - "named": false - }, - { - "type": "auto", - "named": false - }, - { - "type": "break", - "named": false - }, - { - "type": "case", - "named": false - }, - { - "type": "comment", - "named": true - }, - { - "type": "const", - "named": false - }, - { - "type": "continue", - "named": false - }, - { - "type": "default", - "named": false - }, - { - "type": "defined", - "named": false - }, - { - "type": "do", - "named": false - }, - { - "type": "else", - "named": false - }, - { - "type": "enum", - "named": false - }, - { - "type": "escape_sequence", - "named": true - }, - { - "type": "extern", - "named": false - }, - { - "type": "false", - "named": true - }, - { - "type": "field_identifier", - "named": true - }, - { - "type": "for", - "named": false - }, - { - "type": "goto", - "named": false - }, - { - "type": "identifier", - "named": true - }, - { - "type": "if", - "named": false - }, - { - "type": "inline", - "named": false - }, - { - "type": "long", - "named": false - }, - { - "type": "ms_restrict_modifier", - "named": true - }, - { - "type": "ms_signed_ptr_modifier", - "named": true - }, - { - "type": "ms_unsigned_ptr_modifier", - "named": true - }, - { - "type": "null", - "named": true - }, - { - "type": "number_literal", - "named": true - }, - { - "type": "preproc_arg", - "named": true - }, - { - "type": "preproc_directive", - "named": true - }, - { - "type": "primitive_type", - "named": true - }, - { - "type": "register", - "named": false - }, - { - "type": "restrict", - "named": false - }, - { - "type": "return", - "named": false - }, - { - "type": "short", - "named": false - }, - { - "type": "signed", - "named": false - }, - { - "type": "sizeof", - "named": false - }, - { - "type": "statement_identifier", - "named": true - }, - { - "type": "static", - "named": false - }, - { - "type": "struct", - "named": false - }, - { - "type": "switch", - "named": false - }, - { - "type": "system_lib_string", - "named": true - }, - { - "type": "true", - "named": true - }, - { - "type": "type_identifier", - "named": true - }, - { - "type": "typedef", - "named": false - }, - { - "type": "u\"", - "named": false - }, - { - "type": "u'", - "named": false - }, - { - "type": "u8\"", - "named": false - }, - { - "type": "u8'", - "named": false - }, - { - "type": "union", - "named": false - }, - { - "type": "unsigned", - "named": false - }, - { - "type": "volatile", - "named": false - }, - { - "type": "while", - "named": false - }, - { - "type": "{", - "named": false - }, - { - "type": "|", - "named": false - }, - { - "type": "|=", - "named": false - }, - { - "type": "||", - "named": false - }, - { - "type": "}", - "named": false - }, - { - "type": "~", - "named": false - } -] \ No newline at end of file diff --git a/tree-sitter-c/src/parser.c b/tree-sitter-c/src/parser.c deleted file mode 100644 index cf7f8c8..0000000 --- a/tree-sitter-c/src/parser.c +++ /dev/null @@ -1,75781 +0,0 @@ -#include - -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wmissing-field-initializers" -#endif - -#define LANGUAGE_VERSION 13 -#define STATE_COUNT 1466 -#define LARGE_STATE_COUNT 382 -#define SYMBOL_COUNT 266 -#define ALIAS_COUNT 3 -#define TOKEN_COUNT 128 -#define EXTERNAL_TOKEN_COUNT 0 -#define FIELD_COUNT 25 -#define MAX_ALIAS_SEQUENCE_LENGTH 9 -#define PRODUCTION_ID_COUNT 85 - -enum { - sym_identifier = 1, - aux_sym_preproc_include_token1 = 2, - anon_sym_LF = 3, - aux_sym_preproc_def_token1 = 4, - anon_sym_LPAREN = 5, - anon_sym_DOT_DOT_DOT = 6, - anon_sym_COMMA = 7, - anon_sym_RPAREN = 8, - aux_sym_preproc_if_token1 = 9, - aux_sym_preproc_if_token2 = 10, - aux_sym_preproc_ifdef_token1 = 11, - aux_sym_preproc_ifdef_token2 = 12, - aux_sym_preproc_else_token1 = 13, - aux_sym_preproc_elif_token1 = 14, - sym_preproc_directive = 15, - sym_preproc_arg = 16, - anon_sym_LPAREN2 = 17, - anon_sym_defined = 18, - anon_sym_BANG = 19, - anon_sym_TILDE = 20, - anon_sym_DASH = 21, - anon_sym_PLUS = 22, - anon_sym_STAR = 23, - anon_sym_SLASH = 24, - anon_sym_PERCENT = 25, - anon_sym_PIPE_PIPE = 26, - anon_sym_AMP_AMP = 27, - anon_sym_PIPE = 28, - anon_sym_CARET = 29, - anon_sym_AMP = 30, - anon_sym_EQ_EQ = 31, - anon_sym_BANG_EQ = 32, - anon_sym_GT = 33, - anon_sym_GT_EQ = 34, - anon_sym_LT_EQ = 35, - anon_sym_LT = 36, - anon_sym_LT_LT = 37, - anon_sym_GT_GT = 38, - anon_sym_SEMI = 39, - anon_sym_typedef = 40, - anon_sym_extern = 41, - anon_sym___attribute__ = 42, - anon_sym_COLON_COLON = 43, - anon_sym_LBRACK_LBRACK = 44, - anon_sym_RBRACK_RBRACK = 45, - anon_sym___declspec = 46, - anon_sym___based = 47, - anon_sym___cdecl = 48, - anon_sym___clrcall = 49, - anon_sym___stdcall = 50, - anon_sym___fastcall = 51, - anon_sym___thiscall = 52, - anon_sym___vectorcall = 53, - sym_ms_restrict_modifier = 54, - sym_ms_unsigned_ptr_modifier = 55, - sym_ms_signed_ptr_modifier = 56, - anon_sym__unaligned = 57, - anon_sym___unaligned = 58, - anon_sym_LBRACE = 59, - anon_sym_RBRACE = 60, - anon_sym_LBRACK = 61, - anon_sym_RBRACK = 62, - anon_sym_EQ = 63, - anon_sym_static = 64, - anon_sym_auto = 65, - anon_sym_register = 66, - anon_sym_inline = 67, - anon_sym_const = 68, - anon_sym_volatile = 69, - anon_sym_restrict = 70, - anon_sym__Atomic = 71, - anon_sym_signed = 72, - anon_sym_unsigned = 73, - anon_sym_long = 74, - anon_sym_short = 75, - sym_primitive_type = 76, - anon_sym_enum = 77, - anon_sym_struct = 78, - anon_sym_union = 79, - anon_sym_COLON = 80, - anon_sym_if = 81, - anon_sym_else = 82, - anon_sym_switch = 83, - anon_sym_case = 84, - anon_sym_default = 85, - anon_sym_while = 86, - anon_sym_do = 87, - anon_sym_for = 88, - anon_sym_return = 89, - anon_sym_break = 90, - anon_sym_continue = 91, - anon_sym_goto = 92, - anon_sym_QMARK = 93, - anon_sym_STAR_EQ = 94, - anon_sym_SLASH_EQ = 95, - anon_sym_PERCENT_EQ = 96, - anon_sym_PLUS_EQ = 97, - anon_sym_DASH_EQ = 98, - anon_sym_LT_LT_EQ = 99, - anon_sym_GT_GT_EQ = 100, - anon_sym_AMP_EQ = 101, - anon_sym_CARET_EQ = 102, - anon_sym_PIPE_EQ = 103, - anon_sym_DASH_DASH = 104, - anon_sym_PLUS_PLUS = 105, - anon_sym_sizeof = 106, - anon_sym_DOT = 107, - anon_sym_DASH_GT = 108, - sym_number_literal = 109, - anon_sym_L_SQUOTE = 110, - anon_sym_u_SQUOTE = 111, - anon_sym_U_SQUOTE = 112, - anon_sym_u8_SQUOTE = 113, - anon_sym_SQUOTE = 114, - aux_sym_char_literal_token1 = 115, - anon_sym_L_DQUOTE = 116, - anon_sym_u_DQUOTE = 117, - anon_sym_U_DQUOTE = 118, - anon_sym_u8_DQUOTE = 119, - anon_sym_DQUOTE = 120, - aux_sym_string_literal_token1 = 121, - sym_escape_sequence = 122, - sym_system_lib_string = 123, - sym_true = 124, - sym_false = 125, - sym_null = 126, - sym_comment = 127, - sym_translation_unit = 128, - sym_preproc_include = 129, - sym_preproc_def = 130, - sym_preproc_function_def = 131, - sym_preproc_params = 132, - sym_preproc_call = 133, - sym_preproc_if = 134, - sym_preproc_ifdef = 135, - sym_preproc_else = 136, - sym_preproc_elif = 137, - sym_preproc_if_in_field_declaration_list = 138, - sym_preproc_ifdef_in_field_declaration_list = 139, - sym_preproc_else_in_field_declaration_list = 140, - sym_preproc_elif_in_field_declaration_list = 141, - sym__preproc_expression = 142, - sym_preproc_parenthesized_expression = 143, - sym_preproc_defined = 144, - sym_preproc_unary_expression = 145, - sym_preproc_call_expression = 146, - sym_preproc_argument_list = 147, - sym_preproc_binary_expression = 148, - sym_function_definition = 149, - sym_declaration = 150, - sym_type_definition = 151, - sym__declaration_modifiers = 152, - sym__declaration_specifiers = 153, - sym_linkage_specification = 154, - sym_attribute_specifier = 155, - sym_attribute = 156, - sym_attribute_declaration = 157, - sym_ms_declspec_modifier = 158, - sym_ms_based_modifier = 159, - sym_ms_call_modifier = 160, - sym_ms_unaligned_ptr_modifier = 161, - sym_ms_pointer_modifier = 162, - sym_declaration_list = 163, - sym__declarator = 164, - sym__field_declarator = 165, - sym__type_declarator = 166, - sym__abstract_declarator = 167, - sym_parenthesized_declarator = 168, - sym_parenthesized_field_declarator = 169, - sym_parenthesized_type_declarator = 170, - sym_abstract_parenthesized_declarator = 171, - sym_attributed_declarator = 172, - sym_attributed_field_declarator = 173, - sym_attributed_type_declarator = 174, - sym_pointer_declarator = 175, - sym_pointer_field_declarator = 176, - sym_pointer_type_declarator = 177, - sym_abstract_pointer_declarator = 178, - sym_function_declarator = 179, - sym_function_field_declarator = 180, - sym_function_type_declarator = 181, - sym_abstract_function_declarator = 182, - sym_array_declarator = 183, - sym_array_field_declarator = 184, - sym_array_type_declarator = 185, - sym_abstract_array_declarator = 186, - sym_init_declarator = 187, - sym_compound_statement = 188, - sym_storage_class_specifier = 189, - sym_type_qualifier = 190, - sym__type_specifier = 191, - sym_sized_type_specifier = 192, - sym_enum_specifier = 193, - sym_enumerator_list = 194, - sym_struct_specifier = 195, - sym_union_specifier = 196, - sym_field_declaration_list = 197, - sym__field_declaration_list_item = 198, - sym_field_declaration = 199, - sym_bitfield_clause = 200, - sym_enumerator = 201, - sym_variadic_parameter = 202, - sym_parameter_list = 203, - sym_parameter_declaration = 204, - sym_attributed_statement = 205, - sym_labeled_statement = 206, - sym_expression_statement = 207, - sym_if_statement = 208, - sym_switch_statement = 209, - sym_case_statement = 210, - sym_while_statement = 211, - sym_do_statement = 212, - sym_for_statement = 213, - sym_return_statement = 214, - sym_break_statement = 215, - sym_continue_statement = 216, - sym_goto_statement = 217, - sym__expression = 218, - sym_comma_expression = 219, - sym_conditional_expression = 220, - sym_assignment_expression = 221, - sym_pointer_expression = 222, - sym_unary_expression = 223, - sym_binary_expression = 224, - sym_update_expression = 225, - sym_cast_expression = 226, - sym_type_descriptor = 227, - sym_sizeof_expression = 228, - sym_subscript_expression = 229, - sym_call_expression = 230, - sym_argument_list = 231, - sym_field_expression = 232, - sym_compound_literal_expression = 233, - sym_parenthesized_expression = 234, - sym_initializer_list = 235, - sym_initializer_pair = 236, - sym_subscript_designator = 237, - sym_field_designator = 238, - sym_char_literal = 239, - sym_concatenated_string = 240, - sym_string_literal = 241, - sym__empty_declaration = 242, - sym_macro_type_specifier = 243, - aux_sym_translation_unit_repeat1 = 244, - aux_sym_preproc_params_repeat1 = 245, - aux_sym_preproc_if_in_field_declaration_list_repeat1 = 246, - aux_sym_preproc_argument_list_repeat1 = 247, - aux_sym_declaration_repeat1 = 248, - aux_sym_type_definition_repeat1 = 249, - aux_sym_type_definition_repeat2 = 250, - aux_sym__declaration_specifiers_repeat1 = 251, - aux_sym_attribute_declaration_repeat1 = 252, - aux_sym_attributed_declarator_repeat1 = 253, - aux_sym_pointer_declarator_repeat1 = 254, - aux_sym_function_declarator_repeat1 = 255, - aux_sym_sized_type_specifier_repeat1 = 256, - aux_sym_enumerator_list_repeat1 = 257, - aux_sym_field_declaration_repeat1 = 258, - aux_sym_parameter_list_repeat1 = 259, - aux_sym_case_statement_repeat1 = 260, - aux_sym_argument_list_repeat1 = 261, - aux_sym_initializer_list_repeat1 = 262, - aux_sym_initializer_pair_repeat1 = 263, - aux_sym_concatenated_string_repeat1 = 264, - aux_sym_string_literal_repeat1 = 265, - alias_sym_field_identifier = 266, - alias_sym_statement_identifier = 267, - alias_sym_type_identifier = 268, -}; - -static const char * const ts_symbol_names[] = { - [ts_builtin_sym_end] = "end", - [sym_identifier] = "identifier", - [aux_sym_preproc_include_token1] = "#include", - [anon_sym_LF] = "\n", - [aux_sym_preproc_def_token1] = "#define", - [anon_sym_LPAREN] = "(", - [anon_sym_DOT_DOT_DOT] = "...", - [anon_sym_COMMA] = ",", - [anon_sym_RPAREN] = ")", - [aux_sym_preproc_if_token1] = "#if", - [aux_sym_preproc_if_token2] = "#endif", - [aux_sym_preproc_ifdef_token1] = "#ifdef", - [aux_sym_preproc_ifdef_token2] = "#ifndef", - [aux_sym_preproc_else_token1] = "#else", - [aux_sym_preproc_elif_token1] = "#elif", - [sym_preproc_directive] = "preproc_directive", - [sym_preproc_arg] = "preproc_arg", - [anon_sym_LPAREN2] = "(", - [anon_sym_defined] = "defined", - [anon_sym_BANG] = "!", - [anon_sym_TILDE] = "~", - [anon_sym_DASH] = "-", - [anon_sym_PLUS] = "+", - [anon_sym_STAR] = "*", - [anon_sym_SLASH] = "/", - [anon_sym_PERCENT] = "%", - [anon_sym_PIPE_PIPE] = "||", - [anon_sym_AMP_AMP] = "&&", - [anon_sym_PIPE] = "|", - [anon_sym_CARET] = "^", - [anon_sym_AMP] = "&", - [anon_sym_EQ_EQ] = "==", - [anon_sym_BANG_EQ] = "!=", - [anon_sym_GT] = ">", - [anon_sym_GT_EQ] = ">=", - [anon_sym_LT_EQ] = "<=", - [anon_sym_LT] = "<", - [anon_sym_LT_LT] = "<<", - [anon_sym_GT_GT] = ">>", - [anon_sym_SEMI] = ";", - [anon_sym_typedef] = "typedef", - [anon_sym_extern] = "extern", - [anon_sym___attribute__] = "__attribute__", - [anon_sym_COLON_COLON] = "::", - [anon_sym_LBRACK_LBRACK] = "[[", - [anon_sym_RBRACK_RBRACK] = "]]", - [anon_sym___declspec] = "__declspec", - [anon_sym___based] = "__based", - [anon_sym___cdecl] = "__cdecl", - [anon_sym___clrcall] = "__clrcall", - [anon_sym___stdcall] = "__stdcall", - [anon_sym___fastcall] = "__fastcall", - [anon_sym___thiscall] = "__thiscall", - [anon_sym___vectorcall] = "__vectorcall", - [sym_ms_restrict_modifier] = "ms_restrict_modifier", - [sym_ms_unsigned_ptr_modifier] = "ms_unsigned_ptr_modifier", - [sym_ms_signed_ptr_modifier] = "ms_signed_ptr_modifier", - [anon_sym__unaligned] = "_unaligned", - [anon_sym___unaligned] = "__unaligned", - [anon_sym_LBRACE] = "{", - [anon_sym_RBRACE] = "}", - [anon_sym_LBRACK] = "[", - [anon_sym_RBRACK] = "]", - [anon_sym_EQ] = "=", - [anon_sym_static] = "static", - [anon_sym_auto] = "auto", - [anon_sym_register] = "register", - [anon_sym_inline] = "inline", - [anon_sym_const] = "const", - [anon_sym_volatile] = "volatile", - [anon_sym_restrict] = "restrict", - [anon_sym__Atomic] = "_Atomic", - [anon_sym_signed] = "signed", - [anon_sym_unsigned] = "unsigned", - [anon_sym_long] = "long", - [anon_sym_short] = "short", - [sym_primitive_type] = "primitive_type", - [anon_sym_enum] = "enum", - [anon_sym_struct] = "struct", - [anon_sym_union] = "union", - [anon_sym_COLON] = ":", - [anon_sym_if] = "if", - [anon_sym_else] = "else", - [anon_sym_switch] = "switch", - [anon_sym_case] = "case", - [anon_sym_default] = "default", - [anon_sym_while] = "while", - [anon_sym_do] = "do", - [anon_sym_for] = "for", - [anon_sym_return] = "return", - [anon_sym_break] = "break", - [anon_sym_continue] = "continue", - [anon_sym_goto] = "goto", - [anon_sym_QMARK] = "\?", - [anon_sym_STAR_EQ] = "*=", - [anon_sym_SLASH_EQ] = "/=", - [anon_sym_PERCENT_EQ] = "%=", - [anon_sym_PLUS_EQ] = "+=", - [anon_sym_DASH_EQ] = "-=", - [anon_sym_LT_LT_EQ] = "<<=", - [anon_sym_GT_GT_EQ] = ">>=", - [anon_sym_AMP_EQ] = "&=", - [anon_sym_CARET_EQ] = "^=", - [anon_sym_PIPE_EQ] = "|=", - [anon_sym_DASH_DASH] = "--", - [anon_sym_PLUS_PLUS] = "++", - [anon_sym_sizeof] = "sizeof", - [anon_sym_DOT] = ".", - [anon_sym_DASH_GT] = "->", - [sym_number_literal] = "number_literal", - [anon_sym_L_SQUOTE] = "L'", - [anon_sym_u_SQUOTE] = "u'", - [anon_sym_U_SQUOTE] = "U'", - [anon_sym_u8_SQUOTE] = "u8'", - [anon_sym_SQUOTE] = "'", - [aux_sym_char_literal_token1] = "char_literal_token1", - [anon_sym_L_DQUOTE] = "L\"", - [anon_sym_u_DQUOTE] = "u\"", - [anon_sym_U_DQUOTE] = "U\"", - [anon_sym_u8_DQUOTE] = "u8\"", - [anon_sym_DQUOTE] = "\"", - [aux_sym_string_literal_token1] = "string_literal_token1", - [sym_escape_sequence] = "escape_sequence", - [sym_system_lib_string] = "system_lib_string", - [sym_true] = "true", - [sym_false] = "false", - [sym_null] = "null", - [sym_comment] = "comment", - [sym_translation_unit] = "translation_unit", - [sym_preproc_include] = "preproc_include", - [sym_preproc_def] = "preproc_def", - [sym_preproc_function_def] = "preproc_function_def", - [sym_preproc_params] = "preproc_params", - [sym_preproc_call] = "preproc_call", - [sym_preproc_if] = "preproc_if", - [sym_preproc_ifdef] = "preproc_ifdef", - [sym_preproc_else] = "preproc_else", - [sym_preproc_elif] = "preproc_elif", - [sym_preproc_if_in_field_declaration_list] = "preproc_if", - [sym_preproc_ifdef_in_field_declaration_list] = "preproc_ifdef", - [sym_preproc_else_in_field_declaration_list] = "preproc_else", - [sym_preproc_elif_in_field_declaration_list] = "preproc_elif", - [sym__preproc_expression] = "_preproc_expression", - [sym_preproc_parenthesized_expression] = "parenthesized_expression", - [sym_preproc_defined] = "preproc_defined", - [sym_preproc_unary_expression] = "unary_expression", - [sym_preproc_call_expression] = "call_expression", - [sym_preproc_argument_list] = "argument_list", - [sym_preproc_binary_expression] = "binary_expression", - [sym_function_definition] = "function_definition", - [sym_declaration] = "declaration", - [sym_type_definition] = "type_definition", - [sym__declaration_modifiers] = "_declaration_modifiers", - [sym__declaration_specifiers] = "_declaration_specifiers", - [sym_linkage_specification] = "linkage_specification", - [sym_attribute_specifier] = "attribute_specifier", - [sym_attribute] = "attribute", - [sym_attribute_declaration] = "attribute_declaration", - [sym_ms_declspec_modifier] = "ms_declspec_modifier", - [sym_ms_based_modifier] = "ms_based_modifier", - [sym_ms_call_modifier] = "ms_call_modifier", - [sym_ms_unaligned_ptr_modifier] = "ms_unaligned_ptr_modifier", - [sym_ms_pointer_modifier] = "ms_pointer_modifier", - [sym_declaration_list] = "declaration_list", - [sym__declarator] = "_declarator", - [sym__field_declarator] = "_field_declarator", - [sym__type_declarator] = "_type_declarator", - [sym__abstract_declarator] = "_abstract_declarator", - [sym_parenthesized_declarator] = "parenthesized_declarator", - [sym_parenthesized_field_declarator] = "parenthesized_declarator", - [sym_parenthesized_type_declarator] = "parenthesized_declarator", - [sym_abstract_parenthesized_declarator] = "abstract_parenthesized_declarator", - [sym_attributed_declarator] = "attributed_declarator", - [sym_attributed_field_declarator] = "attributed_declarator", - [sym_attributed_type_declarator] = "attributed_declarator", - [sym_pointer_declarator] = "pointer_declarator", - [sym_pointer_field_declarator] = "pointer_declarator", - [sym_pointer_type_declarator] = "pointer_declarator", - [sym_abstract_pointer_declarator] = "abstract_pointer_declarator", - [sym_function_declarator] = "function_declarator", - [sym_function_field_declarator] = "function_declarator", - [sym_function_type_declarator] = "function_declarator", - [sym_abstract_function_declarator] = "abstract_function_declarator", - [sym_array_declarator] = "array_declarator", - [sym_array_field_declarator] = "array_declarator", - [sym_array_type_declarator] = "array_declarator", - [sym_abstract_array_declarator] = "abstract_array_declarator", - [sym_init_declarator] = "init_declarator", - [sym_compound_statement] = "compound_statement", - [sym_storage_class_specifier] = "storage_class_specifier", - [sym_type_qualifier] = "type_qualifier", - [sym__type_specifier] = "_type_specifier", - [sym_sized_type_specifier] = "sized_type_specifier", - [sym_enum_specifier] = "enum_specifier", - [sym_enumerator_list] = "enumerator_list", - [sym_struct_specifier] = "struct_specifier", - [sym_union_specifier] = "union_specifier", - [sym_field_declaration_list] = "field_declaration_list", - [sym__field_declaration_list_item] = "_field_declaration_list_item", - [sym_field_declaration] = "field_declaration", - [sym_bitfield_clause] = "bitfield_clause", - [sym_enumerator] = "enumerator", - [sym_variadic_parameter] = "variadic_parameter", - [sym_parameter_list] = "parameter_list", - [sym_parameter_declaration] = "parameter_declaration", - [sym_attributed_statement] = "attributed_statement", - [sym_labeled_statement] = "labeled_statement", - [sym_expression_statement] = "expression_statement", - [sym_if_statement] = "if_statement", - [sym_switch_statement] = "switch_statement", - [sym_case_statement] = "case_statement", - [sym_while_statement] = "while_statement", - [sym_do_statement] = "do_statement", - [sym_for_statement] = "for_statement", - [sym_return_statement] = "return_statement", - [sym_break_statement] = "break_statement", - [sym_continue_statement] = "continue_statement", - [sym_goto_statement] = "goto_statement", - [sym__expression] = "_expression", - [sym_comma_expression] = "comma_expression", - [sym_conditional_expression] = "conditional_expression", - [sym_assignment_expression] = "assignment_expression", - [sym_pointer_expression] = "pointer_expression", - [sym_unary_expression] = "unary_expression", - [sym_binary_expression] = "binary_expression", - [sym_update_expression] = "update_expression", - [sym_cast_expression] = "cast_expression", - [sym_type_descriptor] = "type_descriptor", - [sym_sizeof_expression] = "sizeof_expression", - [sym_subscript_expression] = "subscript_expression", - [sym_call_expression] = "call_expression", - [sym_argument_list] = "argument_list", - [sym_field_expression] = "field_expression", - [sym_compound_literal_expression] = "compound_literal_expression", - [sym_parenthesized_expression] = "parenthesized_expression", - [sym_initializer_list] = "initializer_list", - [sym_initializer_pair] = "initializer_pair", - [sym_subscript_designator] = "subscript_designator", - [sym_field_designator] = "field_designator", - [sym_char_literal] = "char_literal", - [sym_concatenated_string] = "concatenated_string", - [sym_string_literal] = "string_literal", - [sym__empty_declaration] = "_empty_declaration", - [sym_macro_type_specifier] = "macro_type_specifier", - [aux_sym_translation_unit_repeat1] = "translation_unit_repeat1", - [aux_sym_preproc_params_repeat1] = "preproc_params_repeat1", - [aux_sym_preproc_if_in_field_declaration_list_repeat1] = "preproc_if_in_field_declaration_list_repeat1", - [aux_sym_preproc_argument_list_repeat1] = "preproc_argument_list_repeat1", - [aux_sym_declaration_repeat1] = "declaration_repeat1", - [aux_sym_type_definition_repeat1] = "type_definition_repeat1", - [aux_sym_type_definition_repeat2] = "type_definition_repeat2", - [aux_sym__declaration_specifiers_repeat1] = "_declaration_specifiers_repeat1", - [aux_sym_attribute_declaration_repeat1] = "attribute_declaration_repeat1", - [aux_sym_attributed_declarator_repeat1] = "attributed_declarator_repeat1", - [aux_sym_pointer_declarator_repeat1] = "pointer_declarator_repeat1", - [aux_sym_function_declarator_repeat1] = "function_declarator_repeat1", - [aux_sym_sized_type_specifier_repeat1] = "sized_type_specifier_repeat1", - [aux_sym_enumerator_list_repeat1] = "enumerator_list_repeat1", - [aux_sym_field_declaration_repeat1] = "field_declaration_repeat1", - [aux_sym_parameter_list_repeat1] = "parameter_list_repeat1", - [aux_sym_case_statement_repeat1] = "case_statement_repeat1", - [aux_sym_argument_list_repeat1] = "argument_list_repeat1", - [aux_sym_initializer_list_repeat1] = "initializer_list_repeat1", - [aux_sym_initializer_pair_repeat1] = "initializer_pair_repeat1", - [aux_sym_concatenated_string_repeat1] = "concatenated_string_repeat1", - [aux_sym_string_literal_repeat1] = "string_literal_repeat1", - [alias_sym_field_identifier] = "field_identifier", - [alias_sym_statement_identifier] = "statement_identifier", - [alias_sym_type_identifier] = "type_identifier", -}; - -static const TSSymbol ts_symbol_map[] = { - [ts_builtin_sym_end] = ts_builtin_sym_end, - [sym_identifier] = sym_identifier, - [aux_sym_preproc_include_token1] = aux_sym_preproc_include_token1, - [anon_sym_LF] = anon_sym_LF, - [aux_sym_preproc_def_token1] = aux_sym_preproc_def_token1, - [anon_sym_LPAREN] = anon_sym_LPAREN, - [anon_sym_DOT_DOT_DOT] = anon_sym_DOT_DOT_DOT, - [anon_sym_COMMA] = anon_sym_COMMA, - [anon_sym_RPAREN] = anon_sym_RPAREN, - [aux_sym_preproc_if_token1] = aux_sym_preproc_if_token1, - [aux_sym_preproc_if_token2] = aux_sym_preproc_if_token2, - [aux_sym_preproc_ifdef_token1] = aux_sym_preproc_ifdef_token1, - [aux_sym_preproc_ifdef_token2] = aux_sym_preproc_ifdef_token2, - [aux_sym_preproc_else_token1] = aux_sym_preproc_else_token1, - [aux_sym_preproc_elif_token1] = aux_sym_preproc_elif_token1, - [sym_preproc_directive] = sym_preproc_directive, - [sym_preproc_arg] = sym_preproc_arg, - [anon_sym_LPAREN2] = anon_sym_LPAREN, - [anon_sym_defined] = anon_sym_defined, - [anon_sym_BANG] = anon_sym_BANG, - [anon_sym_TILDE] = anon_sym_TILDE, - [anon_sym_DASH] = anon_sym_DASH, - [anon_sym_PLUS] = anon_sym_PLUS, - [anon_sym_STAR] = anon_sym_STAR, - [anon_sym_SLASH] = anon_sym_SLASH, - [anon_sym_PERCENT] = anon_sym_PERCENT, - [anon_sym_PIPE_PIPE] = anon_sym_PIPE_PIPE, - [anon_sym_AMP_AMP] = anon_sym_AMP_AMP, - [anon_sym_PIPE] = anon_sym_PIPE, - [anon_sym_CARET] = anon_sym_CARET, - [anon_sym_AMP] = anon_sym_AMP, - [anon_sym_EQ_EQ] = anon_sym_EQ_EQ, - [anon_sym_BANG_EQ] = anon_sym_BANG_EQ, - [anon_sym_GT] = anon_sym_GT, - [anon_sym_GT_EQ] = anon_sym_GT_EQ, - [anon_sym_LT_EQ] = anon_sym_LT_EQ, - [anon_sym_LT] = anon_sym_LT, - [anon_sym_LT_LT] = anon_sym_LT_LT, - [anon_sym_GT_GT] = anon_sym_GT_GT, - [anon_sym_SEMI] = anon_sym_SEMI, - [anon_sym_typedef] = anon_sym_typedef, - [anon_sym_extern] = anon_sym_extern, - [anon_sym___attribute__] = anon_sym___attribute__, - [anon_sym_COLON_COLON] = anon_sym_COLON_COLON, - [anon_sym_LBRACK_LBRACK] = anon_sym_LBRACK_LBRACK, - [anon_sym_RBRACK_RBRACK] = anon_sym_RBRACK_RBRACK, - [anon_sym___declspec] = anon_sym___declspec, - [anon_sym___based] = anon_sym___based, - [anon_sym___cdecl] = anon_sym___cdecl, - [anon_sym___clrcall] = anon_sym___clrcall, - [anon_sym___stdcall] = anon_sym___stdcall, - [anon_sym___fastcall] = anon_sym___fastcall, - [anon_sym___thiscall] = anon_sym___thiscall, - [anon_sym___vectorcall] = anon_sym___vectorcall, - [sym_ms_restrict_modifier] = sym_ms_restrict_modifier, - [sym_ms_unsigned_ptr_modifier] = sym_ms_unsigned_ptr_modifier, - [sym_ms_signed_ptr_modifier] = sym_ms_signed_ptr_modifier, - [anon_sym__unaligned] = anon_sym__unaligned, - [anon_sym___unaligned] = anon_sym___unaligned, - [anon_sym_LBRACE] = anon_sym_LBRACE, - [anon_sym_RBRACE] = anon_sym_RBRACE, - [anon_sym_LBRACK] = anon_sym_LBRACK, - [anon_sym_RBRACK] = anon_sym_RBRACK, - [anon_sym_EQ] = anon_sym_EQ, - [anon_sym_static] = anon_sym_static, - [anon_sym_auto] = anon_sym_auto, - [anon_sym_register] = anon_sym_register, - [anon_sym_inline] = anon_sym_inline, - [anon_sym_const] = anon_sym_const, - [anon_sym_volatile] = anon_sym_volatile, - [anon_sym_restrict] = anon_sym_restrict, - [anon_sym__Atomic] = anon_sym__Atomic, - [anon_sym_signed] = anon_sym_signed, - [anon_sym_unsigned] = anon_sym_unsigned, - [anon_sym_long] = anon_sym_long, - [anon_sym_short] = anon_sym_short, - [sym_primitive_type] = sym_primitive_type, - [anon_sym_enum] = anon_sym_enum, - [anon_sym_struct] = anon_sym_struct, - [anon_sym_union] = anon_sym_union, - [anon_sym_COLON] = anon_sym_COLON, - [anon_sym_if] = anon_sym_if, - [anon_sym_else] = anon_sym_else, - [anon_sym_switch] = anon_sym_switch, - [anon_sym_case] = anon_sym_case, - [anon_sym_default] = anon_sym_default, - [anon_sym_while] = anon_sym_while, - [anon_sym_do] = anon_sym_do, - [anon_sym_for] = anon_sym_for, - [anon_sym_return] = anon_sym_return, - [anon_sym_break] = anon_sym_break, - [anon_sym_continue] = anon_sym_continue, - [anon_sym_goto] = anon_sym_goto, - [anon_sym_QMARK] = anon_sym_QMARK, - [anon_sym_STAR_EQ] = anon_sym_STAR_EQ, - [anon_sym_SLASH_EQ] = anon_sym_SLASH_EQ, - [anon_sym_PERCENT_EQ] = anon_sym_PERCENT_EQ, - [anon_sym_PLUS_EQ] = anon_sym_PLUS_EQ, - [anon_sym_DASH_EQ] = anon_sym_DASH_EQ, - [anon_sym_LT_LT_EQ] = anon_sym_LT_LT_EQ, - [anon_sym_GT_GT_EQ] = anon_sym_GT_GT_EQ, - [anon_sym_AMP_EQ] = anon_sym_AMP_EQ, - [anon_sym_CARET_EQ] = anon_sym_CARET_EQ, - [anon_sym_PIPE_EQ] = anon_sym_PIPE_EQ, - [anon_sym_DASH_DASH] = anon_sym_DASH_DASH, - [anon_sym_PLUS_PLUS] = anon_sym_PLUS_PLUS, - [anon_sym_sizeof] = anon_sym_sizeof, - [anon_sym_DOT] = anon_sym_DOT, - [anon_sym_DASH_GT] = anon_sym_DASH_GT, - [sym_number_literal] = sym_number_literal, - [anon_sym_L_SQUOTE] = anon_sym_L_SQUOTE, - [anon_sym_u_SQUOTE] = anon_sym_u_SQUOTE, - [anon_sym_U_SQUOTE] = anon_sym_U_SQUOTE, - [anon_sym_u8_SQUOTE] = anon_sym_u8_SQUOTE, - [anon_sym_SQUOTE] = anon_sym_SQUOTE, - [aux_sym_char_literal_token1] = aux_sym_char_literal_token1, - [anon_sym_L_DQUOTE] = anon_sym_L_DQUOTE, - [anon_sym_u_DQUOTE] = anon_sym_u_DQUOTE, - [anon_sym_U_DQUOTE] = anon_sym_U_DQUOTE, - [anon_sym_u8_DQUOTE] = anon_sym_u8_DQUOTE, - [anon_sym_DQUOTE] = anon_sym_DQUOTE, - [aux_sym_string_literal_token1] = aux_sym_string_literal_token1, - [sym_escape_sequence] = sym_escape_sequence, - [sym_system_lib_string] = sym_system_lib_string, - [sym_true] = sym_true, - [sym_false] = sym_false, - [sym_null] = sym_null, - [sym_comment] = sym_comment, - [sym_translation_unit] = sym_translation_unit, - [sym_preproc_include] = sym_preproc_include, - [sym_preproc_def] = sym_preproc_def, - [sym_preproc_function_def] = sym_preproc_function_def, - [sym_preproc_params] = sym_preproc_params, - [sym_preproc_call] = sym_preproc_call, - [sym_preproc_if] = sym_preproc_if, - [sym_preproc_ifdef] = sym_preproc_ifdef, - [sym_preproc_else] = sym_preproc_else, - [sym_preproc_elif] = sym_preproc_elif, - [sym_preproc_if_in_field_declaration_list] = sym_preproc_if, - [sym_preproc_ifdef_in_field_declaration_list] = sym_preproc_ifdef, - [sym_preproc_else_in_field_declaration_list] = sym_preproc_else, - [sym_preproc_elif_in_field_declaration_list] = sym_preproc_elif, - [sym__preproc_expression] = sym__preproc_expression, - [sym_preproc_parenthesized_expression] = sym_parenthesized_expression, - [sym_preproc_defined] = sym_preproc_defined, - [sym_preproc_unary_expression] = sym_unary_expression, - [sym_preproc_call_expression] = sym_call_expression, - [sym_preproc_argument_list] = sym_argument_list, - [sym_preproc_binary_expression] = sym_binary_expression, - [sym_function_definition] = sym_function_definition, - [sym_declaration] = sym_declaration, - [sym_type_definition] = sym_type_definition, - [sym__declaration_modifiers] = sym__declaration_modifiers, - [sym__declaration_specifiers] = sym__declaration_specifiers, - [sym_linkage_specification] = sym_linkage_specification, - [sym_attribute_specifier] = sym_attribute_specifier, - [sym_attribute] = sym_attribute, - [sym_attribute_declaration] = sym_attribute_declaration, - [sym_ms_declspec_modifier] = sym_ms_declspec_modifier, - [sym_ms_based_modifier] = sym_ms_based_modifier, - [sym_ms_call_modifier] = sym_ms_call_modifier, - [sym_ms_unaligned_ptr_modifier] = sym_ms_unaligned_ptr_modifier, - [sym_ms_pointer_modifier] = sym_ms_pointer_modifier, - [sym_declaration_list] = sym_declaration_list, - [sym__declarator] = sym__declarator, - [sym__field_declarator] = sym__field_declarator, - [sym__type_declarator] = sym__type_declarator, - [sym__abstract_declarator] = sym__abstract_declarator, - [sym_parenthesized_declarator] = sym_parenthesized_declarator, - [sym_parenthesized_field_declarator] = sym_parenthesized_declarator, - [sym_parenthesized_type_declarator] = sym_parenthesized_declarator, - [sym_abstract_parenthesized_declarator] = sym_abstract_parenthesized_declarator, - [sym_attributed_declarator] = sym_attributed_declarator, - [sym_attributed_field_declarator] = sym_attributed_declarator, - [sym_attributed_type_declarator] = sym_attributed_declarator, - [sym_pointer_declarator] = sym_pointer_declarator, - [sym_pointer_field_declarator] = sym_pointer_declarator, - [sym_pointer_type_declarator] = sym_pointer_declarator, - [sym_abstract_pointer_declarator] = sym_abstract_pointer_declarator, - [sym_function_declarator] = sym_function_declarator, - [sym_function_field_declarator] = sym_function_declarator, - [sym_function_type_declarator] = sym_function_declarator, - [sym_abstract_function_declarator] = sym_abstract_function_declarator, - [sym_array_declarator] = sym_array_declarator, - [sym_array_field_declarator] = sym_array_declarator, - [sym_array_type_declarator] = sym_array_declarator, - [sym_abstract_array_declarator] = sym_abstract_array_declarator, - [sym_init_declarator] = sym_init_declarator, - [sym_compound_statement] = sym_compound_statement, - [sym_storage_class_specifier] = sym_storage_class_specifier, - [sym_type_qualifier] = sym_type_qualifier, - [sym__type_specifier] = sym__type_specifier, - [sym_sized_type_specifier] = sym_sized_type_specifier, - [sym_enum_specifier] = sym_enum_specifier, - [sym_enumerator_list] = sym_enumerator_list, - [sym_struct_specifier] = sym_struct_specifier, - [sym_union_specifier] = sym_union_specifier, - [sym_field_declaration_list] = sym_field_declaration_list, - [sym__field_declaration_list_item] = sym__field_declaration_list_item, - [sym_field_declaration] = sym_field_declaration, - [sym_bitfield_clause] = sym_bitfield_clause, - [sym_enumerator] = sym_enumerator, - [sym_variadic_parameter] = sym_variadic_parameter, - [sym_parameter_list] = sym_parameter_list, - [sym_parameter_declaration] = sym_parameter_declaration, - [sym_attributed_statement] = sym_attributed_statement, - [sym_labeled_statement] = sym_labeled_statement, - [sym_expression_statement] = sym_expression_statement, - [sym_if_statement] = sym_if_statement, - [sym_switch_statement] = sym_switch_statement, - [sym_case_statement] = sym_case_statement, - [sym_while_statement] = sym_while_statement, - [sym_do_statement] = sym_do_statement, - [sym_for_statement] = sym_for_statement, - [sym_return_statement] = sym_return_statement, - [sym_break_statement] = sym_break_statement, - [sym_continue_statement] = sym_continue_statement, - [sym_goto_statement] = sym_goto_statement, - [sym__expression] = sym__expression, - [sym_comma_expression] = sym_comma_expression, - [sym_conditional_expression] = sym_conditional_expression, - [sym_assignment_expression] = sym_assignment_expression, - [sym_pointer_expression] = sym_pointer_expression, - [sym_unary_expression] = sym_unary_expression, - [sym_binary_expression] = sym_binary_expression, - [sym_update_expression] = sym_update_expression, - [sym_cast_expression] = sym_cast_expression, - [sym_type_descriptor] = sym_type_descriptor, - [sym_sizeof_expression] = sym_sizeof_expression, - [sym_subscript_expression] = sym_subscript_expression, - [sym_call_expression] = sym_call_expression, - [sym_argument_list] = sym_argument_list, - [sym_field_expression] = sym_field_expression, - [sym_compound_literal_expression] = sym_compound_literal_expression, - [sym_parenthesized_expression] = sym_parenthesized_expression, - [sym_initializer_list] = sym_initializer_list, - [sym_initializer_pair] = sym_initializer_pair, - [sym_subscript_designator] = sym_subscript_designator, - [sym_field_designator] = sym_field_designator, - [sym_char_literal] = sym_char_literal, - [sym_concatenated_string] = sym_concatenated_string, - [sym_string_literal] = sym_string_literal, - [sym__empty_declaration] = sym__empty_declaration, - [sym_macro_type_specifier] = sym_macro_type_specifier, - [aux_sym_translation_unit_repeat1] = aux_sym_translation_unit_repeat1, - [aux_sym_preproc_params_repeat1] = aux_sym_preproc_params_repeat1, - [aux_sym_preproc_if_in_field_declaration_list_repeat1] = aux_sym_preproc_if_in_field_declaration_list_repeat1, - [aux_sym_preproc_argument_list_repeat1] = aux_sym_preproc_argument_list_repeat1, - [aux_sym_declaration_repeat1] = aux_sym_declaration_repeat1, - [aux_sym_type_definition_repeat1] = aux_sym_type_definition_repeat1, - [aux_sym_type_definition_repeat2] = aux_sym_type_definition_repeat2, - [aux_sym__declaration_specifiers_repeat1] = aux_sym__declaration_specifiers_repeat1, - [aux_sym_attribute_declaration_repeat1] = aux_sym_attribute_declaration_repeat1, - [aux_sym_attributed_declarator_repeat1] = aux_sym_attributed_declarator_repeat1, - [aux_sym_pointer_declarator_repeat1] = aux_sym_pointer_declarator_repeat1, - [aux_sym_function_declarator_repeat1] = aux_sym_function_declarator_repeat1, - [aux_sym_sized_type_specifier_repeat1] = aux_sym_sized_type_specifier_repeat1, - [aux_sym_enumerator_list_repeat1] = aux_sym_enumerator_list_repeat1, - [aux_sym_field_declaration_repeat1] = aux_sym_field_declaration_repeat1, - [aux_sym_parameter_list_repeat1] = aux_sym_parameter_list_repeat1, - [aux_sym_case_statement_repeat1] = aux_sym_case_statement_repeat1, - [aux_sym_argument_list_repeat1] = aux_sym_argument_list_repeat1, - [aux_sym_initializer_list_repeat1] = aux_sym_initializer_list_repeat1, - [aux_sym_initializer_pair_repeat1] = aux_sym_initializer_pair_repeat1, - [aux_sym_concatenated_string_repeat1] = aux_sym_concatenated_string_repeat1, - [aux_sym_string_literal_repeat1] = aux_sym_string_literal_repeat1, - [alias_sym_field_identifier] = alias_sym_field_identifier, - [alias_sym_statement_identifier] = alias_sym_statement_identifier, - [alias_sym_type_identifier] = alias_sym_type_identifier, -}; - -static const TSSymbolMetadata ts_symbol_metadata[] = { - [ts_builtin_sym_end] = { - .visible = false, - .named = true, - }, - [sym_identifier] = { - .visible = true, - .named = true, - }, - [aux_sym_preproc_include_token1] = { - .visible = true, - .named = false, - }, - [anon_sym_LF] = { - .visible = true, - .named = false, - }, - [aux_sym_preproc_def_token1] = { - .visible = true, - .named = false, - }, - [anon_sym_LPAREN] = { - .visible = true, - .named = false, - }, - [anon_sym_DOT_DOT_DOT] = { - .visible = true, - .named = false, - }, - [anon_sym_COMMA] = { - .visible = true, - .named = false, - }, - [anon_sym_RPAREN] = { - .visible = true, - .named = false, - }, - [aux_sym_preproc_if_token1] = { - .visible = true, - .named = false, - }, - [aux_sym_preproc_if_token2] = { - .visible = true, - .named = false, - }, - [aux_sym_preproc_ifdef_token1] = { - .visible = true, - .named = false, - }, - [aux_sym_preproc_ifdef_token2] = { - .visible = true, - .named = false, - }, - [aux_sym_preproc_else_token1] = { - .visible = true, - .named = false, - }, - [aux_sym_preproc_elif_token1] = { - .visible = true, - .named = false, - }, - [sym_preproc_directive] = { - .visible = true, - .named = true, - }, - [sym_preproc_arg] = { - .visible = true, - .named = true, - }, - [anon_sym_LPAREN2] = { - .visible = true, - .named = false, - }, - [anon_sym_defined] = { - .visible = true, - .named = false, - }, - [anon_sym_BANG] = { - .visible = true, - .named = false, - }, - [anon_sym_TILDE] = { - .visible = true, - .named = false, - }, - [anon_sym_DASH] = { - .visible = true, - .named = false, - }, - [anon_sym_PLUS] = { - .visible = true, - .named = false, - }, - [anon_sym_STAR] = { - .visible = true, - .named = false, - }, - [anon_sym_SLASH] = { - .visible = true, - .named = false, - }, - [anon_sym_PERCENT] = { - .visible = true, - .named = false, - }, - [anon_sym_PIPE_PIPE] = { - .visible = true, - .named = false, - }, - [anon_sym_AMP_AMP] = { - .visible = true, - .named = false, - }, - [anon_sym_PIPE] = { - .visible = true, - .named = false, - }, - [anon_sym_CARET] = { - .visible = true, - .named = false, - }, - [anon_sym_AMP] = { - .visible = true, - .named = false, - }, - [anon_sym_EQ_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_BANG_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_GT] = { - .visible = true, - .named = false, - }, - [anon_sym_GT_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_LT_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_LT] = { - .visible = true, - .named = false, - }, - [anon_sym_LT_LT] = { - .visible = true, - .named = false, - }, - [anon_sym_GT_GT] = { - .visible = true, - .named = false, - }, - [anon_sym_SEMI] = { - .visible = true, - .named = false, - }, - [anon_sym_typedef] = { - .visible = true, - .named = false, - }, - [anon_sym_extern] = { - .visible = true, - .named = false, - }, - [anon_sym___attribute__] = { - .visible = true, - .named = false, - }, - [anon_sym_COLON_COLON] = { - .visible = true, - .named = false, - }, - [anon_sym_LBRACK_LBRACK] = { - .visible = true, - .named = false, - }, - [anon_sym_RBRACK_RBRACK] = { - .visible = true, - .named = false, - }, - [anon_sym___declspec] = { - .visible = true, - .named = false, - }, - [anon_sym___based] = { - .visible = true, - .named = false, - }, - [anon_sym___cdecl] = { - .visible = true, - .named = false, - }, - [anon_sym___clrcall] = { - .visible = true, - .named = false, - }, - [anon_sym___stdcall] = { - .visible = true, - .named = false, - }, - [anon_sym___fastcall] = { - .visible = true, - .named = false, - }, - [anon_sym___thiscall] = { - .visible = true, - .named = false, - }, - [anon_sym___vectorcall] = { - .visible = true, - .named = false, - }, - [sym_ms_restrict_modifier] = { - .visible = true, - .named = true, - }, - [sym_ms_unsigned_ptr_modifier] = { - .visible = true, - .named = true, - }, - [sym_ms_signed_ptr_modifier] = { - .visible = true, - .named = true, - }, - [anon_sym__unaligned] = { - .visible = true, - .named = false, - }, - [anon_sym___unaligned] = { - .visible = true, - .named = false, - }, - [anon_sym_LBRACE] = { - .visible = true, - .named = false, - }, - [anon_sym_RBRACE] = { - .visible = true, - .named = false, - }, - [anon_sym_LBRACK] = { - .visible = true, - .named = false, - }, - [anon_sym_RBRACK] = { - .visible = true, - .named = false, - }, - [anon_sym_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_static] = { - .visible = true, - .named = false, - }, - [anon_sym_auto] = { - .visible = true, - .named = false, - }, - [anon_sym_register] = { - .visible = true, - .named = false, - }, - [anon_sym_inline] = { - .visible = true, - .named = false, - }, - [anon_sym_const] = { - .visible = true, - .named = false, - }, - [anon_sym_volatile] = { - .visible = true, - .named = false, - }, - [anon_sym_restrict] = { - .visible = true, - .named = false, - }, - [anon_sym__Atomic] = { - .visible = true, - .named = false, - }, - [anon_sym_signed] = { - .visible = true, - .named = false, - }, - [anon_sym_unsigned] = { - .visible = true, - .named = false, - }, - [anon_sym_long] = { - .visible = true, - .named = false, - }, - [anon_sym_short] = { - .visible = true, - .named = false, - }, - [sym_primitive_type] = { - .visible = true, - .named = true, - }, - [anon_sym_enum] = { - .visible = true, - .named = false, - }, - [anon_sym_struct] = { - .visible = true, - .named = false, - }, - [anon_sym_union] = { - .visible = true, - .named = false, - }, - [anon_sym_COLON] = { - .visible = true, - .named = false, - }, - [anon_sym_if] = { - .visible = true, - .named = false, - }, - [anon_sym_else] = { - .visible = true, - .named = false, - }, - [anon_sym_switch] = { - .visible = true, - .named = false, - }, - [anon_sym_case] = { - .visible = true, - .named = false, - }, - [anon_sym_default] = { - .visible = true, - .named = false, - }, - [anon_sym_while] = { - .visible = true, - .named = false, - }, - [anon_sym_do] = { - .visible = true, - .named = false, - }, - [anon_sym_for] = { - .visible = true, - .named = false, - }, - [anon_sym_return] = { - .visible = true, - .named = false, - }, - [anon_sym_break] = { - .visible = true, - .named = false, - }, - [anon_sym_continue] = { - .visible = true, - .named = false, - }, - [anon_sym_goto] = { - .visible = true, - .named = false, - }, - [anon_sym_QMARK] = { - .visible = true, - .named = false, - }, - [anon_sym_STAR_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_SLASH_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_PERCENT_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_PLUS_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_DASH_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_LT_LT_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_GT_GT_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_AMP_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_CARET_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_PIPE_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_DASH_DASH] = { - .visible = true, - .named = false, - }, - [anon_sym_PLUS_PLUS] = { - .visible = true, - .named = false, - }, - [anon_sym_sizeof] = { - .visible = true, - .named = false, - }, - [anon_sym_DOT] = { - .visible = true, - .named = false, - }, - [anon_sym_DASH_GT] = { - .visible = true, - .named = false, - }, - [sym_number_literal] = { - .visible = true, - .named = true, - }, - [anon_sym_L_SQUOTE] = { - .visible = true, - .named = false, - }, - [anon_sym_u_SQUOTE] = { - .visible = true, - .named = false, - }, - [anon_sym_U_SQUOTE] = { - .visible = true, - .named = false, - }, - [anon_sym_u8_SQUOTE] = { - .visible = true, - .named = false, - }, - [anon_sym_SQUOTE] = { - .visible = true, - .named = false, - }, - [aux_sym_char_literal_token1] = { - .visible = false, - .named = false, - }, - [anon_sym_L_DQUOTE] = { - .visible = true, - .named = false, - }, - [anon_sym_u_DQUOTE] = { - .visible = true, - .named = false, - }, - [anon_sym_U_DQUOTE] = { - .visible = true, - .named = false, - }, - [anon_sym_u8_DQUOTE] = { - .visible = true, - .named = false, - }, - [anon_sym_DQUOTE] = { - .visible = true, - .named = false, - }, - [aux_sym_string_literal_token1] = { - .visible = false, - .named = false, - }, - [sym_escape_sequence] = { - .visible = true, - .named = true, - }, - [sym_system_lib_string] = { - .visible = true, - .named = true, - }, - [sym_true] = { - .visible = true, - .named = true, - }, - [sym_false] = { - .visible = true, - .named = true, - }, - [sym_null] = { - .visible = true, - .named = true, - }, - [sym_comment] = { - .visible = true, - .named = true, - }, - [sym_translation_unit] = { - .visible = true, - .named = true, - }, - [sym_preproc_include] = { - .visible = true, - .named = true, - }, - [sym_preproc_def] = { - .visible = true, - .named = true, - }, - [sym_preproc_function_def] = { - .visible = true, - .named = true, - }, - [sym_preproc_params] = { - .visible = true, - .named = true, - }, - [sym_preproc_call] = { - .visible = true, - .named = true, - }, - [sym_preproc_if] = { - .visible = true, - .named = true, - }, - [sym_preproc_ifdef] = { - .visible = true, - .named = true, - }, - [sym_preproc_else] = { - .visible = true, - .named = true, - }, - [sym_preproc_elif] = { - .visible = true, - .named = true, - }, - [sym_preproc_if_in_field_declaration_list] = { - .visible = true, - .named = true, - }, - [sym_preproc_ifdef_in_field_declaration_list] = { - .visible = true, - .named = true, - }, - [sym_preproc_else_in_field_declaration_list] = { - .visible = true, - .named = true, - }, - [sym_preproc_elif_in_field_declaration_list] = { - .visible = true, - .named = true, - }, - [sym__preproc_expression] = { - .visible = false, - .named = true, - }, - [sym_preproc_parenthesized_expression] = { - .visible = true, - .named = true, - }, - [sym_preproc_defined] = { - .visible = true, - .named = true, - }, - [sym_preproc_unary_expression] = { - .visible = true, - .named = true, - }, - [sym_preproc_call_expression] = { - .visible = true, - .named = true, - }, - [sym_preproc_argument_list] = { - .visible = true, - .named = true, - }, - [sym_preproc_binary_expression] = { - .visible = true, - .named = true, - }, - [sym_function_definition] = { - .visible = true, - .named = true, - }, - [sym_declaration] = { - .visible = true, - .named = true, - }, - [sym_type_definition] = { - .visible = true, - .named = true, - }, - [sym__declaration_modifiers] = { - .visible = false, - .named = true, - }, - [sym__declaration_specifiers] = { - .visible = false, - .named = true, - }, - [sym_linkage_specification] = { - .visible = true, - .named = true, - }, - [sym_attribute_specifier] = { - .visible = true, - .named = true, - }, - [sym_attribute] = { - .visible = true, - .named = true, - }, - [sym_attribute_declaration] = { - .visible = true, - .named = true, - }, - [sym_ms_declspec_modifier] = { - .visible = true, - .named = true, - }, - [sym_ms_based_modifier] = { - .visible = true, - .named = true, - }, - [sym_ms_call_modifier] = { - .visible = true, - .named = true, - }, - [sym_ms_unaligned_ptr_modifier] = { - .visible = true, - .named = true, - }, - [sym_ms_pointer_modifier] = { - .visible = true, - .named = true, - }, - [sym_declaration_list] = { - .visible = true, - .named = true, - }, - [sym__declarator] = { - .visible = false, - .named = true, - .supertype = true, - }, - [sym__field_declarator] = { - .visible = false, - .named = true, - .supertype = true, - }, - [sym__type_declarator] = { - .visible = false, - .named = true, - .supertype = true, - }, - [sym__abstract_declarator] = { - .visible = false, - .named = true, - .supertype = true, - }, - [sym_parenthesized_declarator] = { - .visible = true, - .named = true, - }, - [sym_parenthesized_field_declarator] = { - .visible = true, - .named = true, - }, - [sym_parenthesized_type_declarator] = { - .visible = true, - .named = true, - }, - [sym_abstract_parenthesized_declarator] = { - .visible = true, - .named = true, - }, - [sym_attributed_declarator] = { - .visible = true, - .named = true, - }, - [sym_attributed_field_declarator] = { - .visible = true, - .named = true, - }, - [sym_attributed_type_declarator] = { - .visible = true, - .named = true, - }, - [sym_pointer_declarator] = { - .visible = true, - .named = true, - }, - [sym_pointer_field_declarator] = { - .visible = true, - .named = true, - }, - [sym_pointer_type_declarator] = { - .visible = true, - .named = true, - }, - [sym_abstract_pointer_declarator] = { - .visible = true, - .named = true, - }, - [sym_function_declarator] = { - .visible = true, - .named = true, - }, - [sym_function_field_declarator] = { - .visible = true, - .named = true, - }, - [sym_function_type_declarator] = { - .visible = true, - .named = true, - }, - [sym_abstract_function_declarator] = { - .visible = true, - .named = true, - }, - [sym_array_declarator] = { - .visible = true, - .named = true, - }, - [sym_array_field_declarator] = { - .visible = true, - .named = true, - }, - [sym_array_type_declarator] = { - .visible = true, - .named = true, - }, - [sym_abstract_array_declarator] = { - .visible = true, - .named = true, - }, - [sym_init_declarator] = { - .visible = true, - .named = true, - }, - [sym_compound_statement] = { - .visible = true, - .named = true, - }, - [sym_storage_class_specifier] = { - .visible = true, - .named = true, - }, - [sym_type_qualifier] = { - .visible = true, - .named = true, - }, - [sym__type_specifier] = { - .visible = false, - .named = true, - .supertype = true, - }, - [sym_sized_type_specifier] = { - .visible = true, - .named = true, - }, - [sym_enum_specifier] = { - .visible = true, - .named = true, - }, - [sym_enumerator_list] = { - .visible = true, - .named = true, - }, - [sym_struct_specifier] = { - .visible = true, - .named = true, - }, - [sym_union_specifier] = { - .visible = true, - .named = true, - }, - [sym_field_declaration_list] = { - .visible = true, - .named = true, - }, - [sym__field_declaration_list_item] = { - .visible = false, - .named = true, - }, - [sym_field_declaration] = { - .visible = true, - .named = true, - }, - [sym_bitfield_clause] = { - .visible = true, - .named = true, - }, - [sym_enumerator] = { - .visible = true, - .named = true, - }, - [sym_variadic_parameter] = { - .visible = true, - .named = true, - }, - [sym_parameter_list] = { - .visible = true, - .named = true, - }, - [sym_parameter_declaration] = { - .visible = true, - .named = true, - }, - [sym_attributed_statement] = { - .visible = true, - .named = true, - }, - [sym_labeled_statement] = { - .visible = true, - .named = true, - }, - [sym_expression_statement] = { - .visible = true, - .named = true, - }, - [sym_if_statement] = { - .visible = true, - .named = true, - }, - [sym_switch_statement] = { - .visible = true, - .named = true, - }, - [sym_case_statement] = { - .visible = true, - .named = true, - }, - [sym_while_statement] = { - .visible = true, - .named = true, - }, - [sym_do_statement] = { - .visible = true, - .named = true, - }, - [sym_for_statement] = { - .visible = true, - .named = true, - }, - [sym_return_statement] = { - .visible = true, - .named = true, - }, - [sym_break_statement] = { - .visible = true, - .named = true, - }, - [sym_continue_statement] = { - .visible = true, - .named = true, - }, - [sym_goto_statement] = { - .visible = true, - .named = true, - }, - [sym__expression] = { - .visible = false, - .named = true, - .supertype = true, - }, - [sym_comma_expression] = { - .visible = true, - .named = true, - }, - [sym_conditional_expression] = { - .visible = true, - .named = true, - }, - [sym_assignment_expression] = { - .visible = true, - .named = true, - }, - [sym_pointer_expression] = { - .visible = true, - .named = true, - }, - [sym_unary_expression] = { - .visible = true, - .named = true, - }, - [sym_binary_expression] = { - .visible = true, - .named = true, - }, - [sym_update_expression] = { - .visible = true, - .named = true, - }, - [sym_cast_expression] = { - .visible = true, - .named = true, - }, - [sym_type_descriptor] = { - .visible = true, - .named = true, - }, - [sym_sizeof_expression] = { - .visible = true, - .named = true, - }, - [sym_subscript_expression] = { - .visible = true, - .named = true, - }, - [sym_call_expression] = { - .visible = true, - .named = true, - }, - [sym_argument_list] = { - .visible = true, - .named = true, - }, - [sym_field_expression] = { - .visible = true, - .named = true, - }, - [sym_compound_literal_expression] = { - .visible = true, - .named = true, - }, - [sym_parenthesized_expression] = { - .visible = true, - .named = true, - }, - [sym_initializer_list] = { - .visible = true, - .named = true, - }, - [sym_initializer_pair] = { - .visible = true, - .named = true, - }, - [sym_subscript_designator] = { - .visible = true, - .named = true, - }, - [sym_field_designator] = { - .visible = true, - .named = true, - }, - [sym_char_literal] = { - .visible = true, - .named = true, - }, - [sym_concatenated_string] = { - .visible = true, - .named = true, - }, - [sym_string_literal] = { - .visible = true, - .named = true, - }, - [sym__empty_declaration] = { - .visible = false, - .named = true, - }, - [sym_macro_type_specifier] = { - .visible = true, - .named = true, - }, - [aux_sym_translation_unit_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_preproc_params_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_preproc_if_in_field_declaration_list_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_preproc_argument_list_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_declaration_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_type_definition_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_type_definition_repeat2] = { - .visible = false, - .named = false, - }, - [aux_sym__declaration_specifiers_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_attribute_declaration_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_attributed_declarator_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_pointer_declarator_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_function_declarator_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_sized_type_specifier_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_enumerator_list_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_field_declaration_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_parameter_list_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_case_statement_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_argument_list_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_initializer_list_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_initializer_pair_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_concatenated_string_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_string_literal_repeat1] = { - .visible = false, - .named = false, - }, - [alias_sym_field_identifier] = { - .visible = true, - .named = true, - }, - [alias_sym_statement_identifier] = { - .visible = true, - .named = true, - }, - [alias_sym_type_identifier] = { - .visible = true, - .named = true, - }, -}; - -enum { - field_alternative = 1, - field_argument = 2, - field_arguments = 3, - field_body = 4, - field_condition = 5, - field_consequence = 6, - field_declarator = 7, - field_designator = 8, - field_directive = 9, - field_field = 10, - field_function = 11, - field_index = 12, - field_initializer = 13, - field_label = 14, - field_left = 15, - field_name = 16, - field_operator = 17, - field_parameters = 18, - field_path = 19, - field_prefix = 20, - field_right = 21, - field_size = 22, - field_type = 23, - field_update = 24, - field_value = 25, -}; - -static const char * const ts_field_names[] = { - [0] = NULL, - [field_alternative] = "alternative", - [field_argument] = "argument", - [field_arguments] = "arguments", - [field_body] = "body", - [field_condition] = "condition", - [field_consequence] = "consequence", - [field_declarator] = "declarator", - [field_designator] = "designator", - [field_directive] = "directive", - [field_field] = "field", - [field_function] = "function", - [field_index] = "index", - [field_initializer] = "initializer", - [field_label] = "label", - [field_left] = "left", - [field_name] = "name", - [field_operator] = "operator", - [field_parameters] = "parameters", - [field_path] = "path", - [field_prefix] = "prefix", - [field_right] = "right", - [field_size] = "size", - [field_type] = "type", - [field_update] = "update", - [field_value] = "value", -}; - -static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { - [2] = {.index = 0, .length = 1}, - [3] = {.index = 1, .length = 1}, - [4] = {.index = 2, .length = 2}, - [5] = {.index = 4, .length = 1}, - [6] = {.index = 5, .length = 1}, - [7] = {.index = 6, .length = 1}, - [8] = {.index = 7, .length = 1}, - [9] = {.index = 8, .length = 2}, - [10] = {.index = 10, .length = 2}, - [11] = {.index = 12, .length = 1}, - [12] = {.index = 12, .length = 1}, - [13] = {.index = 13, .length = 1}, - [14] = {.index = 5, .length = 1}, - [15] = {.index = 14, .length = 2}, - [16] = {.index = 16, .length = 2}, - [17] = {.index = 18, .length = 1}, - [18] = {.index = 19, .length = 2}, - [19] = {.index = 21, .length = 2}, - [20] = {.index = 23, .length = 1}, - [21] = {.index = 24, .length = 1}, - [22] = {.index = 25, .length = 2}, - [23] = {.index = 27, .length = 2}, - [24] = {.index = 29, .length = 1}, - [25] = {.index = 30, .length = 3}, - [26] = {.index = 33, .length = 1}, - [27] = {.index = 34, .length = 1}, - [28] = {.index = 35, .length = 2}, - [29] = {.index = 37, .length = 3}, - [30] = {.index = 40, .length = 2}, - [31] = {.index = 42, .length = 2}, - [32] = {.index = 44, .length = 3}, - [33] = {.index = 47, .length = 2}, - [34] = {.index = 49, .length = 2}, - [35] = {.index = 51, .length = 1}, - [36] = {.index = 52, .length = 2}, - [37] = {.index = 54, .length = 1}, - [38] = {.index = 55, .length = 2}, - [39] = {.index = 57, .length = 2}, - [40] = {.index = 59, .length = 2}, - [41] = {.index = 61, .length = 2}, - [43] = {.index = 63, .length = 2}, - [44] = {.index = 65, .length = 1}, - [45] = {.index = 66, .length = 2}, - [46] = {.index = 68, .length = 1}, - [47] = {.index = 69, .length = 1}, - [48] = {.index = 70, .length = 2}, - [49] = {.index = 72, .length = 3}, - [50] = {.index = 75, .length = 2}, - [51] = {.index = 77, .length = 3}, - [52] = {.index = 80, .length = 2}, - [53] = {.index = 82, .length = 3}, - [54] = {.index = 85, .length = 2}, - [55] = {.index = 87, .length = 2}, - [56] = {.index = 89, .length = 1}, - [57] = {.index = 90, .length = 2}, - [58] = {.index = 92, .length = 3}, - [59] = {.index = 95, .length = 2}, - [60] = {.index = 97, .length = 2}, - [61] = {.index = 99, .length = 3}, - [62] = {.index = 102, .length = 2}, - [63] = {.index = 104, .length = 1}, - [64] = {.index = 105, .length = 2}, - [65] = {.index = 107, .length = 3}, - [66] = {.index = 110, .length = 2}, - [67] = {.index = 112, .length = 1}, - [69] = {.index = 113, .length = 3}, - [70] = {.index = 116, .length = 1}, - [71] = {.index = 117, .length = 2}, - [72] = {.index = 119, .length = 1}, - [73] = {.index = 120, .length = 2}, - [74] = {.index = 122, .length = 2}, - [75] = {.index = 124, .length = 2}, - [76] = {.index = 126, .length = 2}, - [77] = {.index = 128, .length = 3}, - [78] = {.index = 131, .length = 3}, - [79] = {.index = 134, .length = 2}, - [80] = {.index = 136, .length = 3}, - [81] = {.index = 139, .length = 4}, - [82] = {.index = 143, .length = 3}, - [83] = {.index = 146, .length = 3}, - [84] = {.index = 149, .length = 4}, -}; - -static const TSFieldMapEntry ts_field_map_entries[] = { - [0] = - {field_type, 0}, - [1] = - {field_directive, 0}, - [2] = - {field_argument, 1}, - {field_operator, 0}, - [4] = - {field_name, 0}, - [5] = - {field_name, 1}, - [6] = - {field_body, 1}, - [7] = - {field_value, 1}, - [8] = - {field_argument, 0}, - {field_operator, 1}, - [10] = - {field_arguments, 1}, - {field_function, 0}, - [12] = - {field_type, 1}, - [13] = - {field_path, 1}, - [14] = - {field_argument, 1}, - {field_directive, 0}, - [16] = - {field_declarator, 1}, - {field_type, 0}, - [18] = - {field_parameters, 0}, - [19] = - {field_body, 2}, - {field_value, 1}, - [21] = - {field_body, 2}, - {field_name, 1}, - [23] = - {field_name, 2}, - [24] = - {field_body, 2}, - [25] = - {field_condition, 1}, - {field_consequence, 2}, - [27] = - {field_body, 2}, - {field_condition, 1}, - [29] = - {field_label, 1}, - [30] = - {field_left, 0}, - {field_operator, 1}, - {field_right, 2}, - [33] = - {field_label, 0}, - [34] = - {field_declarator, 1}, - [35] = - {field_declarator, 1}, - {field_type, 0, .inherited = true}, - [37] = - {field_body, 2}, - {field_declarator, 1}, - {field_type, 0, .inherited = true}, - [40] = - {field_declarator, 0}, - {field_parameters, 1}, - [42] = - {field_left, 0}, - {field_right, 2}, - [44] = - {field_argument, 0}, - {field_field, 2}, - {field_operator, 1}, - [47] = - {field_name, 1}, - {field_value, 2}, - [49] = - {field_name, 1}, - {field_parameters, 2}, - [51] = - {field_condition, 1}, - [52] = - {field_alternative, 2}, - {field_name, 1}, - [54] = - {field_type, 0, .inherited = true}, - [55] = - {field_declarator, 2}, - {field_type, 0}, - [57] = - {field_type, 1}, - {field_value, 3}, - [59] = - {field_declarator, 2}, - {field_type, 1}, - [61] = - {field_name, 2}, - {field_prefix, 0}, - [63] = - {field_body, 3}, - {field_name, 2}, - [65] = - {field_type, 2}, - [66] = - {field_name, 0}, - {field_type, 2}, - [68] = - {field_declarator, 2}, - [69] = - {field_declarator, 0}, - [70] = - {field_declarator, 0}, - {field_value, 2}, - [72] = - {field_declarator, 1}, - {field_declarator, 2, .inherited = true}, - {field_type, 0, .inherited = true}, - [75] = - {field_declarator, 0, .inherited = true}, - {field_declarator, 1, .inherited = true}, - [77] = - {field_body, 3}, - {field_declarator, 2}, - {field_type, 1, .inherited = true}, - [80] = - {field_argument, 0}, - {field_index, 2}, - [82] = - {field_name, 1}, - {field_parameters, 2}, - {field_value, 3}, - [85] = - {field_alternative, 3}, - {field_condition, 1}, - [87] = - {field_alternative, 3}, - {field_name, 1}, - [89] = - {field_size, 1}, - [90] = - {field_declarator, 3}, - {field_type, 1}, - [92] = - {field_declarator, 2}, - {field_declarator, 3, .inherited = true}, - {field_type, 1}, - [95] = - {field_declarator, 3}, - {field_type, 2}, - [97] = - {field_name, 0}, - {field_value, 2}, - [99] = - {field_alternative, 4}, - {field_condition, 1}, - {field_consequence, 2}, - [102] = - {field_body, 1}, - {field_condition, 3}, - [104] = - {field_declarator, 3}, - [105] = - {field_declarator, 0}, - {field_size, 2}, - [107] = - {field_alternative, 4}, - {field_condition, 0}, - {field_consequence, 2}, - [110] = - {field_alternative, 4}, - {field_condition, 1}, - [112] = - {field_size, 2}, - [113] = - {field_declarator, 3}, - {field_declarator, 4, .inherited = true}, - {field_type, 2}, - [116] = - {field_body, 5}, - [117] = - {field_body, 5}, - {field_initializer, 2}, - [119] = - {field_declarator, 4}, - [120] = - {field_declarator, 0}, - {field_size, 3}, - [122] = - {field_designator, 0}, - {field_value, 2}, - [124] = - {field_body, 6}, - {field_update, 4}, - [126] = - {field_body, 6}, - {field_condition, 3}, - [128] = - {field_body, 6}, - {field_initializer, 2}, - {field_update, 4}, - [131] = - {field_body, 6}, - {field_condition, 3}, - {field_initializer, 2}, - [134] = - {field_body, 6}, - {field_initializer, 2}, - [136] = - {field_body, 7}, - {field_condition, 3}, - {field_update, 5}, - [139] = - {field_body, 7}, - {field_condition, 3}, - {field_initializer, 2}, - {field_update, 5}, - [143] = - {field_body, 7}, - {field_initializer, 2}, - {field_update, 5}, - [146] = - {field_body, 7}, - {field_condition, 4}, - {field_initializer, 2}, - [149] = - {field_body, 8}, - {field_condition, 4}, - {field_initializer, 2}, - {field_update, 6}, -}; - -static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { - [0] = {0}, - [1] = { - [0] = alias_sym_type_identifier, - }, - [6] = { - [1] = alias_sym_type_identifier, - }, - [12] = { - [1] = alias_sym_type_identifier, - }, - [19] = { - [1] = alias_sym_type_identifier, - }, - [20] = { - [2] = alias_sym_type_identifier, - }, - [24] = { - [1] = alias_sym_statement_identifier, - }, - [26] = { - [0] = alias_sym_statement_identifier, - }, - [32] = { - [2] = alias_sym_field_identifier, - }, - [42] = { - [0] = alias_sym_field_identifier, - }, - [43] = { - [2] = alias_sym_type_identifier, - }, - [68] = { - [1] = alias_sym_field_identifier, - }, -}; - -static const uint16_t ts_non_terminal_alias_map[] = { - 0, -}; - -static bool ts_lex(TSLexer *lexer, TSStateId state) { - START_LEXER(); - eof = lexer->eof(lexer); - switch (state) { - case 0: - if (eof) ADVANCE(84); - if (lookahead == '!') ADVANCE(140); - if (lookahead == '"') ADVANCE(237); - if (lookahead == '#') ADVANCE(52); - if (lookahead == '%') ADVANCE(157); - if (lookahead == '&') ADVANCE(166); - if (lookahead == '\'') ADVANCE(228); - if (lookahead == '(') ADVANCE(89); - if (lookahead == ')') ADVANCE(92); - if (lookahead == '*') ADVANCE(153); - if (lookahead == '+') ADVANCE(148); - if (lookahead == ',') ADVANCE(91); - if (lookahead == '-') ADVANCE(143); - if (lookahead == '.') ADVANCE(206); - if (lookahead == '/') ADVANCE(155); - if (lookahead == '0') ADVANCE(213); - if (lookahead == ':') ADVANCE(191); - if (lookahead == ';') ADVANCE(179); - if (lookahead == '<') ADVANCE(173); - if (lookahead == '=') ADVANCE(189); - if (lookahead == '>') ADVANCE(169); - if (lookahead == '?') ADVANCE(192); - if (lookahead == 'L') ADVANCE(249); - if (lookahead == 'U') ADVANCE(251); - if (lookahead == '[') ADVANCE(186); - if (lookahead == '\\') SKIP(79) - if (lookahead == ']') ADVANCE(187); - if (lookahead == '^') ADVANCE(163); - if (lookahead == 'u') ADVANCE(253); - if (lookahead == '{') ADVANCE(183); - if (lookahead == '|') ADVANCE(160); - if (lookahead == '}') ADVANCE(184); - if (lookahead == '~') ADVANCE(141); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(82) - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); - if (('A' <= lookahead && lookahead <= '_') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 1: - if (lookahead == '\n') SKIP(28) - END_STATE(); - case 2: - if (lookahead == '\n') SKIP(28) - if (lookahead == '\r') SKIP(1) - END_STATE(); - case 3: - if (lookahead == '\n') SKIP(29) - END_STATE(); - case 4: - if (lookahead == '\n') SKIP(29) - if (lookahead == '\r') SKIP(3) - END_STATE(); - case 5: - if (lookahead == '\n') SKIP(27) - END_STATE(); - case 6: - if (lookahead == '\n') SKIP(27) - if (lookahead == '\r') SKIP(5) - END_STATE(); - case 7: - if (lookahead == '\n') SKIP(33) - END_STATE(); - case 8: - if (lookahead == '\n') SKIP(33) - if (lookahead == '\r') SKIP(7) - END_STATE(); - case 9: - if (lookahead == '\n') SKIP(32) - END_STATE(); - case 10: - if (lookahead == '\n') SKIP(32) - if (lookahead == '\r') SKIP(9) - END_STATE(); - case 11: - if (lookahead == '\n') SKIP(34) - END_STATE(); - case 12: - if (lookahead == '\n') SKIP(34) - if (lookahead == '\r') SKIP(11) - END_STATE(); - case 13: - if (lookahead == '\n') SKIP(31) - END_STATE(); - case 14: - if (lookahead == '\n') SKIP(31) - if (lookahead == '\r') SKIP(13) - END_STATE(); - case 15: - if (lookahead == '\n') SKIP(30) - END_STATE(); - case 16: - if (lookahead == '\n') SKIP(30) - if (lookahead == '\r') SKIP(15) - END_STATE(); - case 17: - if (lookahead == '\n') SKIP(19) - END_STATE(); - case 18: - if (lookahead == '\n') SKIP(19) - if (lookahead == '\r') SKIP(17) - END_STATE(); - case 19: - if (lookahead == '\n') ADVANCE(86); - if (lookahead == '!') ADVANCE(46); - if (lookahead == '%') ADVANCE(156); - if (lookahead == '&') ADVANCE(165); - if (lookahead == '(') ADVANCE(138); - if (lookahead == '*') ADVANCE(152); - if (lookahead == '+') ADVANCE(147); - if (lookahead == '-') ADVANCE(142); - if (lookahead == '/') ADVANCE(154); - if (lookahead == '<') ADVANCE(174); - if (lookahead == '=') ADVANCE(47); - if (lookahead == '>') ADVANCE(170); - if (lookahead == '\\') SKIP(18) - if (lookahead == '^') ADVANCE(162); - if (lookahead == '|') ADVANCE(161); - if (lookahead == '\t' || - lookahead == '\r' || - lookahead == ' ') SKIP(19) - END_STATE(); - case 20: - if (lookahead == '\n') SKIP(35) - END_STATE(); - case 21: - if (lookahead == '\n') SKIP(35) - if (lookahead == '\r') SKIP(20) - END_STATE(); - case 22: - if (lookahead == '\n') ADVANCE(87); - if (lookahead == '(') ADVANCE(89); - if (lookahead == '/') ADVANCE(131); - if (lookahead == '\\') ADVANCE(129); - if (lookahead == '\t' || - lookahead == '\r' || - lookahead == ' ') ADVANCE(128); - if (lookahead != 0) ADVANCE(132); - END_STATE(); - case 23: - if (lookahead == '\n') ADVANCE(87); - if (lookahead == '/') ADVANCE(131); - if (lookahead == '\\') ADVANCE(129); - if (lookahead == '\t' || - lookahead == '\r' || - lookahead == ' ') ADVANCE(128); - if (lookahead != 0) ADVANCE(132); - END_STATE(); - case 24: - if (lookahead == '\n') SKIP(36) - if (lookahead == '"') ADVANCE(237); - if (lookahead == '/') ADVANCE(238); - if (lookahead == '\\') ADVANCE(25); - if (lookahead == '\t' || - lookahead == '\r' || - lookahead == ' ') ADVANCE(241); - if (lookahead != 0) ADVANCE(242); - END_STATE(); - case 25: - if (lookahead == '\n') ADVANCE(244); - if (lookahead == '\r') ADVANCE(243); - if (lookahead == 'U') ADVANCE(76); - if (lookahead == 'u') ADVANCE(72); - if (lookahead == 'x') ADVANCE(70); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(246); - if (lookahead != 0) ADVANCE(243); - END_STATE(); - case 26: - if (lookahead == '\n') SKIP(44) - if (lookahead == '/') ADVANCE(231); - if (lookahead == '\\') ADVANCE(230); - if (lookahead == '\t' || - lookahead == '\r' || - lookahead == ' ') ADVANCE(232); - if (lookahead != 0 && - lookahead != '\'') ADVANCE(229); - END_STATE(); - case 27: - if (lookahead == '!') ADVANCE(140); - if (lookahead == '"') ADVANCE(237); - if (lookahead == '#') ADVANCE(59); - if (lookahead == '%') ADVANCE(157); - if (lookahead == '&') ADVANCE(166); - if (lookahead == '\'') ADVANCE(228); - if (lookahead == '(') ADVANCE(138); - if (lookahead == ')') ADVANCE(92); - if (lookahead == '*') ADVANCE(153); - if (lookahead == '+') ADVANCE(148); - if (lookahead == ',') ADVANCE(91); - if (lookahead == '-') ADVANCE(143); - if (lookahead == '.') ADVANCE(207); - if (lookahead == '/') ADVANCE(155); - if (lookahead == '0') ADVANCE(213); - if (lookahead == ':') ADVANCE(190); - if (lookahead == ';') ADVANCE(179); - if (lookahead == '<') ADVANCE(173); - if (lookahead == '=') ADVANCE(189); - if (lookahead == '>') ADVANCE(169); - if (lookahead == '?') ADVANCE(192); - if (lookahead == 'L') ADVANCE(249); - if (lookahead == 'U') ADVANCE(251); - if (lookahead == '[') ADVANCE(185); - if (lookahead == '\\') SKIP(6) - if (lookahead == ']') ADVANCE(187); - if (lookahead == '^') ADVANCE(163); - if (lookahead == 'u') ADVANCE(253); - if (lookahead == '{') ADVANCE(183); - if (lookahead == '|') ADVANCE(160); - if (lookahead == '}') ADVANCE(184); - if (lookahead == '~') ADVANCE(141); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(27) - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); - if (('A' <= lookahead && lookahead <= '_') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 28: - if (lookahead == '!') ADVANCE(139); - if (lookahead == '"') ADVANCE(237); - if (lookahead == '#') ADVANCE(52); - if (lookahead == '&') ADVANCE(164); - if (lookahead == '\'') ADVANCE(228); - if (lookahead == '(') ADVANCE(138); - if (lookahead == '*') ADVANCE(152); - if (lookahead == '+') ADVANCE(149); - if (lookahead == ',') ADVANCE(91); - if (lookahead == '-') ADVANCE(144); - if (lookahead == '.') ADVANCE(64); - if (lookahead == '/') ADVANCE(37); - if (lookahead == '0') ADVANCE(213); - if (lookahead == ':') ADVANCE(45); - if (lookahead == ';') ADVANCE(179); - if (lookahead == 'L') ADVANCE(249); - if (lookahead == 'U') ADVANCE(251); - if (lookahead == '[') ADVANCE(50); - if (lookahead == '\\') SKIP(2) - if (lookahead == ']') ADVANCE(51); - if (lookahead == 'u') ADVANCE(253); - if (lookahead == '{') ADVANCE(183); - if (lookahead == '~') ADVANCE(141); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(28) - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); - if (('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 29: - if (lookahead == '!') ADVANCE(139); - if (lookahead == '"') ADVANCE(237); - if (lookahead == '#') ADVANCE(54); - if (lookahead == '&') ADVANCE(164); - if (lookahead == '\'') ADVANCE(228); - if (lookahead == '(') ADVANCE(138); - if (lookahead == '*') ADVANCE(152); - if (lookahead == '+') ADVANCE(149); - if (lookahead == '-') ADVANCE(144); - if (lookahead == '.') ADVANCE(64); - if (lookahead == '/') ADVANCE(37); - if (lookahead == '0') ADVANCE(213); - if (lookahead == ';') ADVANCE(179); - if (lookahead == 'L') ADVANCE(249); - if (lookahead == 'U') ADVANCE(251); - if (lookahead == '[') ADVANCE(50); - if (lookahead == '\\') SKIP(4) - if (lookahead == 'u') ADVANCE(253); - if (lookahead == '{') ADVANCE(183); - if (lookahead == '~') ADVANCE(141); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(29) - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); - if (('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 30: - if (lookahead == '!') ADVANCE(139); - if (lookahead == '\'') ADVANCE(228); - if (lookahead == '(') ADVANCE(138); - if (lookahead == ')') ADVANCE(92); - if (lookahead == '+') ADVANCE(151); - if (lookahead == '-') ADVANCE(146); - if (lookahead == '.') ADVANCE(64); - if (lookahead == '/') ADVANCE(37); - if (lookahead == '0') ADVANCE(213); - if (lookahead == 'L') ADVANCE(257); - if (lookahead == 'U') ADVANCE(258); - if (lookahead == '\\') SKIP(16) - if (lookahead == 'u') ADVANCE(259); - if (lookahead == '~') ADVANCE(141); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(30) - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); - if (('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 31: - if (lookahead == '!') ADVANCE(46); - if (lookahead == '"') ADVANCE(237); - if (lookahead == '%') ADVANCE(157); - if (lookahead == '&') ADVANCE(166); - if (lookahead == '(') ADVANCE(138); - if (lookahead == ')') ADVANCE(92); - if (lookahead == '*') ADVANCE(153); - if (lookahead == '+') ADVANCE(150); - if (lookahead == ',') ADVANCE(91); - if (lookahead == '-') ADVANCE(145); - if (lookahead == '.') ADVANCE(205); - if (lookahead == '/') ADVANCE(155); - if (lookahead == ':') ADVANCE(190); - if (lookahead == ';') ADVANCE(179); - if (lookahead == '<') ADVANCE(173); - if (lookahead == '=') ADVANCE(189); - if (lookahead == '>') ADVANCE(169); - if (lookahead == '?') ADVANCE(192); - if (lookahead == 'L') ADVANCE(250); - if (lookahead == 'U') ADVANCE(252); - if (lookahead == '[') ADVANCE(186); - if (lookahead == '\\') SKIP(14) - if (lookahead == ']') ADVANCE(187); - if (lookahead == '^') ADVANCE(163); - if (lookahead == 'u') ADVANCE(254); - if (lookahead == '|') ADVANCE(160); - if (lookahead == '}') ADVANCE(184); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(31) - if (('A' <= lookahead && lookahead <= '_') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 32: - if (lookahead == '!') ADVANCE(46); - if (lookahead == '#') ADVANCE(57); - if (lookahead == '%') ADVANCE(157); - if (lookahead == '&') ADVANCE(166); - if (lookahead == '(') ADVANCE(138); - if (lookahead == ')') ADVANCE(92); - if (lookahead == '*') ADVANCE(153); - if (lookahead == '+') ADVANCE(150); - if (lookahead == ',') ADVANCE(91); - if (lookahead == '-') ADVANCE(145); - if (lookahead == '.') ADVANCE(205); - if (lookahead == '/') ADVANCE(155); - if (lookahead == ':') ADVANCE(190); - if (lookahead == ';') ADVANCE(179); - if (lookahead == '<') ADVANCE(173); - if (lookahead == '=') ADVANCE(189); - if (lookahead == '>') ADVANCE(169); - if (lookahead == '?') ADVANCE(192); - if (lookahead == '[') ADVANCE(186); - if (lookahead == '\\') SKIP(10) - if (lookahead == ']') ADVANCE(187); - if (lookahead == '^') ADVANCE(163); - if (lookahead == '{') ADVANCE(183); - if (lookahead == '|') ADVANCE(160); - if (lookahead == '}') ADVANCE(184); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(32) - if (('A' <= lookahead && lookahead <= '_') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 33: - if (lookahead == '!') ADVANCE(46); - if (lookahead == '#') ADVANCE(53); - if (lookahead == '%') ADVANCE(156); - if (lookahead == '&') ADVANCE(165); - if (lookahead == '(') ADVANCE(138); - if (lookahead == ')') ADVANCE(92); - if (lookahead == '*') ADVANCE(152); - if (lookahead == '+') ADVANCE(147); - if (lookahead == ',') ADVANCE(91); - if (lookahead == '-') ADVANCE(142); - if (lookahead == '.') ADVANCE(42); - if (lookahead == '/') ADVANCE(154); - if (lookahead == ':') ADVANCE(190); - if (lookahead == ';') ADVANCE(179); - if (lookahead == '<') ADVANCE(174); - if (lookahead == '=') ADVANCE(189); - if (lookahead == '>') ADVANCE(170); - if (lookahead == '[') ADVANCE(186); - if (lookahead == '\\') SKIP(8) - if (lookahead == '^') ADVANCE(162); - if (lookahead == '{') ADVANCE(183); - if (lookahead == '|') ADVANCE(161); - if (lookahead == '}') ADVANCE(184); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(33) - if (('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 34: - if (lookahead == '!') ADVANCE(46); - if (lookahead == '#') ADVANCE(55); - if (lookahead == '%') ADVANCE(157); - if (lookahead == '&') ADVANCE(166); - if (lookahead == '(') ADVANCE(138); - if (lookahead == ')') ADVANCE(92); - if (lookahead == '*') ADVANCE(153); - if (lookahead == '+') ADVANCE(150); - if (lookahead == ',') ADVANCE(91); - if (lookahead == '-') ADVANCE(145); - if (lookahead == '.') ADVANCE(205); - if (lookahead == '/') ADVANCE(155); - if (lookahead == ':') ADVANCE(190); - if (lookahead == ';') ADVANCE(179); - if (lookahead == '<') ADVANCE(173); - if (lookahead == '=') ADVANCE(189); - if (lookahead == '>') ADVANCE(169); - if (lookahead == '?') ADVANCE(192); - if (lookahead == '[') ADVANCE(186); - if (lookahead == '\\') SKIP(12) - if (lookahead == ']') ADVANCE(51); - if (lookahead == '^') ADVANCE(163); - if (lookahead == '|') ADVANCE(160); - if (lookahead == '}') ADVANCE(184); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(34) - if (('A' <= lookahead && lookahead <= '_') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 35: - if (lookahead == '"') ADVANCE(237); - if (lookahead == '/') ADVANCE(37); - if (lookahead == '<') ADVANCE(48); - if (lookahead == 'L') ADVANCE(250); - if (lookahead == 'U') ADVANCE(252); - if (lookahead == '\\') SKIP(21) - if (lookahead == 'u') ADVANCE(254); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(35) - if (('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 36: - if (lookahead == '"') ADVANCE(237); - if (lookahead == '/') ADVANCE(37); - if (lookahead == '\\') ADVANCE(25); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(36) - END_STATE(); - case 37: - if (lookahead == '*') ADVANCE(39); - if (lookahead == '/') ADVANCE(264); - END_STATE(); - case 38: - if (lookahead == '*') ADVANCE(38); - if (lookahead == '/') ADVANCE(262); - if (lookahead != 0) ADVANCE(39); - END_STATE(); - case 39: - if (lookahead == '*') ADVANCE(38); - if (lookahead != 0) ADVANCE(39); - END_STATE(); - case 40: - if (lookahead == '.') ADVANCE(64); - if (lookahead == '0') ADVANCE(211); - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(212); - if (('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(220); - END_STATE(); - case 41: - if (lookahead == '.') ADVANCE(64); - if (lookahead == '0') ADVANCE(214); - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); - END_STATE(); - case 42: - if (lookahead == '.') ADVANCE(43); - END_STATE(); - case 43: - if (lookahead == '.') ADVANCE(90); - END_STATE(); - case 44: - if (lookahead == '/') ADVANCE(37); - if (lookahead == '\\') ADVANCE(25); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(44) - END_STATE(); - case 45: - if (lookahead == ':') ADVANCE(180); - END_STATE(); - case 46: - if (lookahead == '=') ADVANCE(168); - END_STATE(); - case 47: - if (lookahead == '=') ADVANCE(167); - END_STATE(); - case 48: - if (lookahead == '>') ADVANCE(247); - if (lookahead == '\\') ADVANCE(49); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(48); - END_STATE(); - case 49: - if (lookahead == '>') ADVANCE(248); - if (lookahead == '\\') ADVANCE(49); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(48); - END_STATE(); - case 50: - if (lookahead == '[') ADVANCE(181); - END_STATE(); - case 51: - if (lookahead == ']') ADVANCE(182); - END_STATE(); - case 52: - if (lookahead == 'd') ADVANCE(104); - if (lookahead == 'e') ADVANCE(120); - if (lookahead == 'i') ADVANCE(110); - if (lookahead == '\t' || - lookahead == ' ') ADVANCE(52); - if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 53: - if (lookahead == 'd') ADVANCE(104); - if (lookahead == 'e') ADVANCE(120); - if (lookahead == 'i') ADVANCE(111); - if (lookahead == '\t' || - lookahead == ' ') ADVANCE(53); - if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 54: - if (lookahead == 'd') ADVANCE(104); - if (lookahead == 'e') ADVANCE(122); - if (lookahead == 'i') ADVANCE(110); - if (lookahead == '\t' || - lookahead == ' ') ADVANCE(54); - if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 55: - if (lookahead == 'd') ADVANCE(104); - if (lookahead == 'e') ADVANCE(122); - if (lookahead == 'i') ADVANCE(111); - if (lookahead == '\t' || - lookahead == ' ') ADVANCE(55); - if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 56: - if (lookahead == 'd') ADVANCE(104); - if (lookahead == 'i') ADVANCE(110); - if (lookahead == '\t' || - lookahead == ' ') ADVANCE(56); - if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 57: - if (lookahead == 'd') ADVANCE(104); - if (lookahead == 'i') ADVANCE(111); - if (lookahead == '\t' || - lookahead == ' ') ADVANCE(57); - if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 58: - if (lookahead == 'd') ADVANCE(61); - END_STATE(); - case 59: - if (lookahead == 'e') ADVANCE(62); - if (lookahead == '\t' || - lookahead == ' ') ADVANCE(59); - END_STATE(); - case 60: - if (lookahead == 'f') ADVANCE(94); - END_STATE(); - case 61: - if (lookahead == 'i') ADVANCE(60); - END_STATE(); - case 62: - if (lookahead == 'n') ADVANCE(58); - END_STATE(); - case 63: - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(215); - END_STATE(); - case 64: - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(209); - END_STATE(); - case 65: - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(212); - if (('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(220); - END_STATE(); - case 66: - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(217); - END_STATE(); - case 67: - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(220); - END_STATE(); - case 68: - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(210); - END_STATE(); - case 69: - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(243); - END_STATE(); - case 70: - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(69); - END_STATE(); - case 71: - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(70); - END_STATE(); - case 72: - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(71); - END_STATE(); - case 73: - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(72); - END_STATE(); - case 74: - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(73); - END_STATE(); - case 75: - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(74); - END_STATE(); - case 76: - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(75); - END_STATE(); - case 77: - if (lookahead != 0 && - lookahead != '\r') ADVANCE(264); - if (lookahead == '\r') ADVANCE(266); - END_STATE(); - case 78: - if (eof) ADVANCE(84); - if (lookahead == '\n') SKIP(82) - END_STATE(); - case 79: - if (eof) ADVANCE(84); - if (lookahead == '\n') SKIP(82) - if (lookahead == '\r') SKIP(78) - END_STATE(); - case 80: - if (eof) ADVANCE(84); - if (lookahead == '\n') SKIP(83) - END_STATE(); - case 81: - if (eof) ADVANCE(84); - if (lookahead == '\n') SKIP(83) - if (lookahead == '\r') SKIP(80) - END_STATE(); - case 82: - if (eof) ADVANCE(84); - if (lookahead == '!') ADVANCE(140); - if (lookahead == '"') ADVANCE(237); - if (lookahead == '#') ADVANCE(52); - if (lookahead == '%') ADVANCE(157); - if (lookahead == '&') ADVANCE(166); - if (lookahead == '\'') ADVANCE(228); - if (lookahead == '(') ADVANCE(138); - if (lookahead == ')') ADVANCE(92); - if (lookahead == '*') ADVANCE(153); - if (lookahead == '+') ADVANCE(148); - if (lookahead == ',') ADVANCE(91); - if (lookahead == '-') ADVANCE(143); - if (lookahead == '.') ADVANCE(206); - if (lookahead == '/') ADVANCE(155); - if (lookahead == '0') ADVANCE(213); - if (lookahead == ':') ADVANCE(191); - if (lookahead == ';') ADVANCE(179); - if (lookahead == '<') ADVANCE(173); - if (lookahead == '=') ADVANCE(189); - if (lookahead == '>') ADVANCE(169); - if (lookahead == '?') ADVANCE(192); - if (lookahead == 'L') ADVANCE(249); - if (lookahead == 'U') ADVANCE(251); - if (lookahead == '[') ADVANCE(186); - if (lookahead == '\\') SKIP(79) - if (lookahead == ']') ADVANCE(187); - if (lookahead == '^') ADVANCE(163); - if (lookahead == 'u') ADVANCE(253); - if (lookahead == '{') ADVANCE(183); - if (lookahead == '|') ADVANCE(160); - if (lookahead == '}') ADVANCE(184); - if (lookahead == '~') ADVANCE(141); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(82) - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); - if (('A' <= lookahead && lookahead <= '_') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 83: - if (eof) ADVANCE(84); - if (lookahead == '!') ADVANCE(139); - if (lookahead == '"') ADVANCE(237); - if (lookahead == '#') ADVANCE(56); - if (lookahead == '&') ADVANCE(164); - if (lookahead == '\'') ADVANCE(228); - if (lookahead == '(') ADVANCE(138); - if (lookahead == ')') ADVANCE(92); - if (lookahead == '*') ADVANCE(152); - if (lookahead == '+') ADVANCE(149); - if (lookahead == ',') ADVANCE(91); - if (lookahead == '-') ADVANCE(144); - if (lookahead == '.') ADVANCE(207); - if (lookahead == '/') ADVANCE(37); - if (lookahead == '0') ADVANCE(213); - if (lookahead == ':') ADVANCE(190); - if (lookahead == ';') ADVANCE(179); - if (lookahead == '=') ADVANCE(188); - if (lookahead == 'L') ADVANCE(249); - if (lookahead == 'U') ADVANCE(251); - if (lookahead == '[') ADVANCE(186); - if (lookahead == '\\') SKIP(81) - if (lookahead == ']') ADVANCE(187); - if (lookahead == 'u') ADVANCE(253); - if (lookahead == '{') ADVANCE(183); - if (lookahead == '}') ADVANCE(184); - if (lookahead == '~') ADVANCE(141); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(83) - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); - if (('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 84: - ACCEPT_TOKEN(ts_builtin_sym_end); - END_STATE(); - case 85: - ACCEPT_TOKEN(aux_sym_preproc_include_token1); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 86: - ACCEPT_TOKEN(anon_sym_LF); - if (lookahead == '\n') ADVANCE(86); - END_STATE(); - case 87: - ACCEPT_TOKEN(anon_sym_LF); - if (lookahead == '\n') ADVANCE(87); - if (lookahead == '\\') ADVANCE(129); - if (lookahead == '\t' || - lookahead == '\r' || - lookahead == ' ') ADVANCE(128); - END_STATE(); - case 88: - ACCEPT_TOKEN(aux_sym_preproc_def_token1); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 89: - ACCEPT_TOKEN(anon_sym_LPAREN); - END_STATE(); - case 90: - ACCEPT_TOKEN(anon_sym_DOT_DOT_DOT); - END_STATE(); - case 91: - ACCEPT_TOKEN(anon_sym_COMMA); - END_STATE(); - case 92: - ACCEPT_TOKEN(anon_sym_RPAREN); - END_STATE(); - case 93: - ACCEPT_TOKEN(aux_sym_preproc_if_token1); - if (lookahead == 'd') ADVANCE(108); - if (lookahead == 'n') ADVANCE(103); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 94: - ACCEPT_TOKEN(aux_sym_preproc_if_token2); - END_STATE(); - case 95: - ACCEPT_TOKEN(aux_sym_preproc_if_token2); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 96: - ACCEPT_TOKEN(aux_sym_preproc_ifdef_token1); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 97: - ACCEPT_TOKEN(aux_sym_preproc_ifdef_token2); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 98: - ACCEPT_TOKEN(aux_sym_preproc_else_token1); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 99: - ACCEPT_TOKEN(aux_sym_preproc_elif_token1); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 100: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'c') ADVANCE(121); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 101: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'd') ADVANCE(119); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 102: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'd') ADVANCE(107); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 103: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'd') ADVANCE(109); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 104: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'e') ADVANCE(112); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 105: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'e') ADVANCE(98); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 106: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'e') ADVANCE(88); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 107: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'e') ADVANCE(85); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 108: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'e') ADVANCE(115); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 109: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'e') ADVANCE(116); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 110: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'f') ADVANCE(93); - if (lookahead == 'n') ADVANCE(100); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 111: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'f') ADVANCE(93); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 112: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'f') ADVANCE(117); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 113: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'f') ADVANCE(99); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 114: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'f') ADVANCE(95); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 115: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'f') ADVANCE(96); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 116: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'f') ADVANCE(97); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 117: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'i') ADVANCE(123); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 118: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'i') ADVANCE(113); - if (lookahead == 's') ADVANCE(105); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 119: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'i') ADVANCE(114); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 120: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'l') ADVANCE(118); - if (lookahead == 'n') ADVANCE(101); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 121: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'l') ADVANCE(124); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 122: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'n') ADVANCE(101); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 123: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'n') ADVANCE(106); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 124: - ACCEPT_TOKEN(sym_preproc_directive); - if (lookahead == 'u') ADVANCE(102); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 125: - ACCEPT_TOKEN(sym_preproc_directive); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(125); - END_STATE(); - case 126: - ACCEPT_TOKEN(sym_preproc_arg); - if (lookahead == '\n') ADVANCE(39); - if (lookahead == '*') ADVANCE(126); - if (lookahead == '/') ADVANCE(262); - if (lookahead == '\\') ADVANCE(133); - if (lookahead != 0) ADVANCE(127); - END_STATE(); - case 127: - ACCEPT_TOKEN(sym_preproc_arg); - if (lookahead == '\n') ADVANCE(39); - if (lookahead == '*') ADVANCE(126); - if (lookahead == '\\') ADVANCE(133); - if (lookahead != 0) ADVANCE(127); - END_STATE(); - case 128: - ACCEPT_TOKEN(sym_preproc_arg); - if (lookahead == '\n') ADVANCE(87); - if (lookahead == '/') ADVANCE(131); - if (lookahead == '\\') ADVANCE(129); - if (lookahead == '\t' || - lookahead == '\r' || - lookahead == ' ') ADVANCE(128); - if (lookahead != 0) ADVANCE(132); - END_STATE(); - case 129: - ACCEPT_TOKEN(sym_preproc_arg); - if (lookahead == '\n') ADVANCE(128); - if (lookahead == '\r') ADVANCE(130); - if (lookahead == '\\') ADVANCE(134); - if (lookahead != 0) ADVANCE(132); - END_STATE(); - case 130: - ACCEPT_TOKEN(sym_preproc_arg); - if (lookahead == '\n') ADVANCE(128); - if (lookahead == '\\') ADVANCE(134); - if (lookahead != 0) ADVANCE(132); - END_STATE(); - case 131: - ACCEPT_TOKEN(sym_preproc_arg); - if (lookahead == '*') ADVANCE(127); - if (lookahead == '/') ADVANCE(265); - if (lookahead == '\\') ADVANCE(134); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(132); - END_STATE(); - case 132: - ACCEPT_TOKEN(sym_preproc_arg); - if (lookahead == '\\') ADVANCE(134); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(132); - END_STATE(); - case 133: - ACCEPT_TOKEN(sym_preproc_arg); - if (lookahead != 0 && - lookahead != '\r' && - lookahead != '*' && - lookahead != '\\') ADVANCE(127); - if (lookahead == '\r') ADVANCE(136); - if (lookahead == '*') ADVANCE(126); - if (lookahead == '\\') ADVANCE(133); - END_STATE(); - case 134: - ACCEPT_TOKEN(sym_preproc_arg); - if (lookahead != 0 && - lookahead != '\r' && - lookahead != '\\') ADVANCE(132); - if (lookahead == '\r') ADVANCE(137); - if (lookahead == '\\') ADVANCE(134); - END_STATE(); - case 135: - ACCEPT_TOKEN(sym_preproc_arg); - if (lookahead != 0 && - lookahead != '\r' && - lookahead != '\\') ADVANCE(265); - if (lookahead == '\r') ADVANCE(267); - if (lookahead == '\\') ADVANCE(263); - END_STATE(); - case 136: - ACCEPT_TOKEN(sym_preproc_arg); - if (lookahead != 0 && - lookahead != '*' && - lookahead != '\\') ADVANCE(127); - if (lookahead == '*') ADVANCE(126); - if (lookahead == '\\') ADVANCE(133); - END_STATE(); - case 137: - ACCEPT_TOKEN(sym_preproc_arg); - if (lookahead != 0 && - lookahead != '\\') ADVANCE(132); - if (lookahead == '\\') ADVANCE(134); - END_STATE(); - case 138: - ACCEPT_TOKEN(anon_sym_LPAREN2); - END_STATE(); - case 139: - ACCEPT_TOKEN(anon_sym_BANG); - END_STATE(); - case 140: - ACCEPT_TOKEN(anon_sym_BANG); - if (lookahead == '=') ADVANCE(168); - END_STATE(); - case 141: - ACCEPT_TOKEN(anon_sym_TILDE); - END_STATE(); - case 142: - ACCEPT_TOKEN(anon_sym_DASH); - END_STATE(); - case 143: - ACCEPT_TOKEN(anon_sym_DASH); - if (lookahead == '-') ADVANCE(203); - if (lookahead == '.') ADVANCE(64); - if (lookahead == '0') ADVANCE(213); - if (lookahead == '=') ADVANCE(197); - if (lookahead == '>') ADVANCE(208); - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); - END_STATE(); - case 144: - ACCEPT_TOKEN(anon_sym_DASH); - if (lookahead == '-') ADVANCE(203); - if (lookahead == '.') ADVANCE(64); - if (lookahead == '0') ADVANCE(213); - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); - END_STATE(); - case 145: - ACCEPT_TOKEN(anon_sym_DASH); - if (lookahead == '-') ADVANCE(203); - if (lookahead == '=') ADVANCE(197); - if (lookahead == '>') ADVANCE(208); - END_STATE(); - case 146: - ACCEPT_TOKEN(anon_sym_DASH); - if (lookahead == '.') ADVANCE(64); - if (lookahead == '0') ADVANCE(213); - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); - END_STATE(); - case 147: - ACCEPT_TOKEN(anon_sym_PLUS); - END_STATE(); - case 148: - ACCEPT_TOKEN(anon_sym_PLUS); - if (lookahead == '+') ADVANCE(204); - if (lookahead == '.') ADVANCE(64); - if (lookahead == '0') ADVANCE(213); - if (lookahead == '=') ADVANCE(196); - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); - END_STATE(); - case 149: - ACCEPT_TOKEN(anon_sym_PLUS); - if (lookahead == '+') ADVANCE(204); - if (lookahead == '.') ADVANCE(64); - if (lookahead == '0') ADVANCE(213); - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); - END_STATE(); - case 150: - ACCEPT_TOKEN(anon_sym_PLUS); - if (lookahead == '+') ADVANCE(204); - if (lookahead == '=') ADVANCE(196); - END_STATE(); - case 151: - ACCEPT_TOKEN(anon_sym_PLUS); - if (lookahead == '.') ADVANCE(64); - if (lookahead == '0') ADVANCE(213); - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(215); - END_STATE(); - case 152: - ACCEPT_TOKEN(anon_sym_STAR); - END_STATE(); - case 153: - ACCEPT_TOKEN(anon_sym_STAR); - if (lookahead == '=') ADVANCE(193); - END_STATE(); - case 154: - ACCEPT_TOKEN(anon_sym_SLASH); - if (lookahead == '*') ADVANCE(39); - if (lookahead == '/') ADVANCE(264); - END_STATE(); - case 155: - ACCEPT_TOKEN(anon_sym_SLASH); - if (lookahead == '*') ADVANCE(39); - if (lookahead == '/') ADVANCE(264); - if (lookahead == '=') ADVANCE(194); - END_STATE(); - case 156: - ACCEPT_TOKEN(anon_sym_PERCENT); - END_STATE(); - case 157: - ACCEPT_TOKEN(anon_sym_PERCENT); - if (lookahead == '=') ADVANCE(195); - END_STATE(); - case 158: - ACCEPT_TOKEN(anon_sym_PIPE_PIPE); - END_STATE(); - case 159: - ACCEPT_TOKEN(anon_sym_AMP_AMP); - END_STATE(); - case 160: - ACCEPT_TOKEN(anon_sym_PIPE); - if (lookahead == '=') ADVANCE(202); - if (lookahead == '|') ADVANCE(158); - END_STATE(); - case 161: - ACCEPT_TOKEN(anon_sym_PIPE); - if (lookahead == '|') ADVANCE(158); - END_STATE(); - case 162: - ACCEPT_TOKEN(anon_sym_CARET); - END_STATE(); - case 163: - ACCEPT_TOKEN(anon_sym_CARET); - if (lookahead == '=') ADVANCE(201); - END_STATE(); - case 164: - ACCEPT_TOKEN(anon_sym_AMP); - END_STATE(); - case 165: - ACCEPT_TOKEN(anon_sym_AMP); - if (lookahead == '&') ADVANCE(159); - END_STATE(); - case 166: - ACCEPT_TOKEN(anon_sym_AMP); - if (lookahead == '&') ADVANCE(159); - if (lookahead == '=') ADVANCE(200); - END_STATE(); - case 167: - ACCEPT_TOKEN(anon_sym_EQ_EQ); - END_STATE(); - case 168: - ACCEPT_TOKEN(anon_sym_BANG_EQ); - END_STATE(); - case 169: - ACCEPT_TOKEN(anon_sym_GT); - if (lookahead == '=') ADVANCE(171); - if (lookahead == '>') ADVANCE(178); - END_STATE(); - case 170: - ACCEPT_TOKEN(anon_sym_GT); - if (lookahead == '=') ADVANCE(171); - if (lookahead == '>') ADVANCE(177); - END_STATE(); - case 171: - ACCEPT_TOKEN(anon_sym_GT_EQ); - END_STATE(); - case 172: - ACCEPT_TOKEN(anon_sym_LT_EQ); - END_STATE(); - case 173: - ACCEPT_TOKEN(anon_sym_LT); - if (lookahead == '<') ADVANCE(176); - if (lookahead == '=') ADVANCE(172); - END_STATE(); - case 174: - ACCEPT_TOKEN(anon_sym_LT); - if (lookahead == '<') ADVANCE(175); - if (lookahead == '=') ADVANCE(172); - END_STATE(); - case 175: - ACCEPT_TOKEN(anon_sym_LT_LT); - END_STATE(); - case 176: - ACCEPT_TOKEN(anon_sym_LT_LT); - if (lookahead == '=') ADVANCE(198); - END_STATE(); - case 177: - ACCEPT_TOKEN(anon_sym_GT_GT); - END_STATE(); - case 178: - ACCEPT_TOKEN(anon_sym_GT_GT); - if (lookahead == '=') ADVANCE(199); - END_STATE(); - case 179: - ACCEPT_TOKEN(anon_sym_SEMI); - END_STATE(); - case 180: - ACCEPT_TOKEN(anon_sym_COLON_COLON); - END_STATE(); - case 181: - ACCEPT_TOKEN(anon_sym_LBRACK_LBRACK); - END_STATE(); - case 182: - ACCEPT_TOKEN(anon_sym_RBRACK_RBRACK); - END_STATE(); - case 183: - ACCEPT_TOKEN(anon_sym_LBRACE); - END_STATE(); - case 184: - ACCEPT_TOKEN(anon_sym_RBRACE); - END_STATE(); - case 185: - ACCEPT_TOKEN(anon_sym_LBRACK); - END_STATE(); - case 186: - ACCEPT_TOKEN(anon_sym_LBRACK); - if (lookahead == '[') ADVANCE(181); - END_STATE(); - case 187: - ACCEPT_TOKEN(anon_sym_RBRACK); - END_STATE(); - case 188: - ACCEPT_TOKEN(anon_sym_EQ); - END_STATE(); - case 189: - ACCEPT_TOKEN(anon_sym_EQ); - if (lookahead == '=') ADVANCE(167); - END_STATE(); - case 190: - ACCEPT_TOKEN(anon_sym_COLON); - END_STATE(); - case 191: - ACCEPT_TOKEN(anon_sym_COLON); - if (lookahead == ':') ADVANCE(180); - END_STATE(); - case 192: - ACCEPT_TOKEN(anon_sym_QMARK); - END_STATE(); - case 193: - ACCEPT_TOKEN(anon_sym_STAR_EQ); - END_STATE(); - case 194: - ACCEPT_TOKEN(anon_sym_SLASH_EQ); - END_STATE(); - case 195: - ACCEPT_TOKEN(anon_sym_PERCENT_EQ); - END_STATE(); - case 196: - ACCEPT_TOKEN(anon_sym_PLUS_EQ); - END_STATE(); - case 197: - ACCEPT_TOKEN(anon_sym_DASH_EQ); - END_STATE(); - case 198: - ACCEPT_TOKEN(anon_sym_LT_LT_EQ); - END_STATE(); - case 199: - ACCEPT_TOKEN(anon_sym_GT_GT_EQ); - END_STATE(); - case 200: - ACCEPT_TOKEN(anon_sym_AMP_EQ); - END_STATE(); - case 201: - ACCEPT_TOKEN(anon_sym_CARET_EQ); - END_STATE(); - case 202: - ACCEPT_TOKEN(anon_sym_PIPE_EQ); - END_STATE(); - case 203: - ACCEPT_TOKEN(anon_sym_DASH_DASH); - END_STATE(); - case 204: - ACCEPT_TOKEN(anon_sym_PLUS_PLUS); - END_STATE(); - case 205: - ACCEPT_TOKEN(anon_sym_DOT); - END_STATE(); - case 206: - ACCEPT_TOKEN(anon_sym_DOT); - if (lookahead == '.') ADVANCE(43); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(209); - END_STATE(); - case 207: - ACCEPT_TOKEN(anon_sym_DOT); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(209); - END_STATE(); - case 208: - ACCEPT_TOKEN(anon_sym_DASH_GT); - END_STATE(); - case 209: - ACCEPT_TOKEN(sym_number_literal); - if (lookahead == '\'') ADVANCE(64); - if (lookahead == 'F' || - lookahead == 'L' || - lookahead == 'U' || - lookahead == 'f' || - lookahead == 'l' || - lookahead == 'u') ADVANCE(223); - if (lookahead == 'E' || - lookahead == 'P' || - lookahead == 'e' || - lookahead == 'p') ADVANCE(222); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(209); - END_STATE(); - case 210: - ACCEPT_TOKEN(sym_number_literal); - if (lookahead == '\'') ADVANCE(68); - if (lookahead == 'F' || - lookahead == 'f') ADVANCE(210); - if (lookahead == 'L' || - lookahead == 'U' || - lookahead == 'l' || - lookahead == 'u') ADVANCE(223); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'E') || - ('a' <= lookahead && lookahead <= 'e')) ADVANCE(210); - END_STATE(); - case 211: - ACCEPT_TOKEN(sym_number_literal); - if (lookahead == '\'') ADVANCE(65); - if (lookahead == '.') ADVANCE(221); - if (lookahead == 'F' || - lookahead == 'f') ADVANCE(220); - if (lookahead == 'L' || - lookahead == 'U' || - lookahead == 'l' || - lookahead == 'u') ADVANCE(223); - if (lookahead == 'b') ADVANCE(219); - if (lookahead == 'x') ADVANCE(67); - if (lookahead == 'E' || - lookahead == 'e') ADVANCE(218); - if (lookahead == 'P' || - lookahead == 'p') ADVANCE(222); - if (('A' <= lookahead && lookahead <= 'D') || - ('a' <= lookahead && lookahead <= 'd')) ADVANCE(220); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(212); - END_STATE(); - case 212: - ACCEPT_TOKEN(sym_number_literal); - if (lookahead == '\'') ADVANCE(65); - if (lookahead == '.') ADVANCE(221); - if (lookahead == 'F' || - lookahead == 'f') ADVANCE(220); - if (lookahead == 'L' || - lookahead == 'U' || - lookahead == 'l' || - lookahead == 'u') ADVANCE(223); - if (lookahead == 'E' || - lookahead == 'e') ADVANCE(218); - if (lookahead == 'P' || - lookahead == 'p') ADVANCE(222); - if (('A' <= lookahead && lookahead <= 'D') || - ('a' <= lookahead && lookahead <= 'd')) ADVANCE(220); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(212); - END_STATE(); - case 213: - ACCEPT_TOKEN(sym_number_literal); - if (lookahead == '\'') ADVANCE(63); - if (lookahead == '.') ADVANCE(221); - if (lookahead == 'F' || - lookahead == 'L' || - lookahead == 'U' || - lookahead == 'f' || - lookahead == 'l' || - lookahead == 'u') ADVANCE(223); - if (lookahead == 'b') ADVANCE(41); - if (lookahead == 'x') ADVANCE(40); - if (lookahead == 'E' || - lookahead == 'P' || - lookahead == 'e' || - lookahead == 'p') ADVANCE(222); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(215); - END_STATE(); - case 214: - ACCEPT_TOKEN(sym_number_literal); - if (lookahead == '\'') ADVANCE(63); - if (lookahead == '.') ADVANCE(221); - if (lookahead == 'F' || - lookahead == 'L' || - lookahead == 'U' || - lookahead == 'f' || - lookahead == 'l' || - lookahead == 'u') ADVANCE(223); - if (lookahead == 'b') ADVANCE(63); - if (lookahead == 'x') ADVANCE(67); - if (lookahead == 'E' || - lookahead == 'P' || - lookahead == 'e' || - lookahead == 'p') ADVANCE(222); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(215); - END_STATE(); - case 215: - ACCEPT_TOKEN(sym_number_literal); - if (lookahead == '\'') ADVANCE(63); - if (lookahead == '.') ADVANCE(221); - if (lookahead == 'F' || - lookahead == 'L' || - lookahead == 'U' || - lookahead == 'f' || - lookahead == 'l' || - lookahead == 'u') ADVANCE(223); - if (lookahead == 'E' || - lookahead == 'P' || - lookahead == 'e' || - lookahead == 'p') ADVANCE(222); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(215); - END_STATE(); - case 216: - ACCEPT_TOKEN(sym_number_literal); - if (lookahead == '\'') ADVANCE(66); - if (lookahead == 'F' || - lookahead == 'f') ADVANCE(217); - if (lookahead == 'L' || - lookahead == 'U' || - lookahead == 'l' || - lookahead == 'u') ADVANCE(223); - if (lookahead == '+' || - lookahead == '-') ADVANCE(68); - if (lookahead == 'E' || - lookahead == 'e') ADVANCE(216); - if (lookahead == 'P' || - lookahead == 'p') ADVANCE(222); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'D') || - ('a' <= lookahead && lookahead <= 'd')) ADVANCE(217); - END_STATE(); - case 217: - ACCEPT_TOKEN(sym_number_literal); - if (lookahead == '\'') ADVANCE(66); - if (lookahead == 'F' || - lookahead == 'f') ADVANCE(217); - if (lookahead == 'L' || - lookahead == 'U' || - lookahead == 'l' || - lookahead == 'u') ADVANCE(223); - if (lookahead == 'E' || - lookahead == 'e') ADVANCE(216); - if (lookahead == 'P' || - lookahead == 'p') ADVANCE(222); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'D') || - ('a' <= lookahead && lookahead <= 'd')) ADVANCE(217); - END_STATE(); - case 218: - ACCEPT_TOKEN(sym_number_literal); - if (lookahead == '\'') ADVANCE(67); - if (lookahead == '.') ADVANCE(221); - if (lookahead == 'F' || - lookahead == 'f') ADVANCE(220); - if (lookahead == 'L' || - lookahead == 'U' || - lookahead == 'l' || - lookahead == 'u') ADVANCE(223); - if (lookahead == '+' || - lookahead == '-') ADVANCE(68); - if (lookahead == 'E' || - lookahead == 'e') ADVANCE(218); - if (lookahead == 'P' || - lookahead == 'p') ADVANCE(222); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'D') || - ('a' <= lookahead && lookahead <= 'd')) ADVANCE(220); - END_STATE(); - case 219: - ACCEPT_TOKEN(sym_number_literal); - if (lookahead == '\'') ADVANCE(67); - if (lookahead == '.') ADVANCE(221); - if (lookahead == 'F' || - lookahead == 'f') ADVANCE(220); - if (lookahead == 'L' || - lookahead == 'U' || - lookahead == 'l' || - lookahead == 'u') ADVANCE(223); - if (lookahead == 'E' || - lookahead == 'e') ADVANCE(218); - if (lookahead == 'P' || - lookahead == 'p') ADVANCE(222); - if (('A' <= lookahead && lookahead <= 'D') || - ('a' <= lookahead && lookahead <= 'd')) ADVANCE(220); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(212); - END_STATE(); - case 220: - ACCEPT_TOKEN(sym_number_literal); - if (lookahead == '\'') ADVANCE(67); - if (lookahead == '.') ADVANCE(221); - if (lookahead == 'F' || - lookahead == 'f') ADVANCE(220); - if (lookahead == 'L' || - lookahead == 'U' || - lookahead == 'l' || - lookahead == 'u') ADVANCE(223); - if (lookahead == 'E' || - lookahead == 'e') ADVANCE(218); - if (lookahead == 'P' || - lookahead == 'p') ADVANCE(222); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'D') || - ('a' <= lookahead && lookahead <= 'd')) ADVANCE(220); - END_STATE(); - case 221: - ACCEPT_TOKEN(sym_number_literal); - if (lookahead == 'F' || - lookahead == 'f') ADVANCE(217); - if (lookahead == 'L' || - lookahead == 'U' || - lookahead == 'l' || - lookahead == 'u') ADVANCE(223); - if (lookahead == 'E' || - lookahead == 'e') ADVANCE(216); - if (lookahead == 'P' || - lookahead == 'p') ADVANCE(222); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'D') || - ('a' <= lookahead && lookahead <= 'd')) ADVANCE(217); - END_STATE(); - case 222: - ACCEPT_TOKEN(sym_number_literal); - if (lookahead == 'F' || - lookahead == 'f') ADVANCE(210); - if (lookahead == 'L' || - lookahead == 'U' || - lookahead == 'l' || - lookahead == 'u') ADVANCE(223); - if (lookahead == '+' || - lookahead == '-') ADVANCE(68); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'E') || - ('a' <= lookahead && lookahead <= 'e')) ADVANCE(210); - END_STATE(); - case 223: - ACCEPT_TOKEN(sym_number_literal); - if (lookahead == 'F' || - lookahead == 'L' || - lookahead == 'U' || - lookahead == 'f' || - lookahead == 'l' || - lookahead == 'u') ADVANCE(223); - END_STATE(); - case 224: - ACCEPT_TOKEN(anon_sym_L_SQUOTE); - END_STATE(); - case 225: - ACCEPT_TOKEN(anon_sym_u_SQUOTE); - END_STATE(); - case 226: - ACCEPT_TOKEN(anon_sym_U_SQUOTE); - END_STATE(); - case 227: - ACCEPT_TOKEN(anon_sym_u8_SQUOTE); - END_STATE(); - case 228: - ACCEPT_TOKEN(anon_sym_SQUOTE); - END_STATE(); - case 229: - ACCEPT_TOKEN(aux_sym_char_literal_token1); - END_STATE(); - case 230: - ACCEPT_TOKEN(aux_sym_char_literal_token1); - if (lookahead == '\n') ADVANCE(244); - if (lookahead == '\r') ADVANCE(243); - if (lookahead == 'U') ADVANCE(76); - if (lookahead == 'u') ADVANCE(72); - if (lookahead == 'x') ADVANCE(70); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(246); - if (lookahead != 0) ADVANCE(243); - END_STATE(); - case 231: - ACCEPT_TOKEN(aux_sym_char_literal_token1); - if (lookahead == '*') ADVANCE(39); - if (lookahead == '/') ADVANCE(264); - END_STATE(); - case 232: - ACCEPT_TOKEN(aux_sym_char_literal_token1); - if (lookahead == '\\') ADVANCE(25); - END_STATE(); - case 233: - ACCEPT_TOKEN(anon_sym_L_DQUOTE); - END_STATE(); - case 234: - ACCEPT_TOKEN(anon_sym_u_DQUOTE); - END_STATE(); - case 235: - ACCEPT_TOKEN(anon_sym_U_DQUOTE); - END_STATE(); - case 236: - ACCEPT_TOKEN(anon_sym_u8_DQUOTE); - END_STATE(); - case 237: - ACCEPT_TOKEN(anon_sym_DQUOTE); - END_STATE(); - case 238: - ACCEPT_TOKEN(aux_sym_string_literal_token1); - if (lookahead == '*') ADVANCE(240); - if (lookahead == '/') ADVANCE(242); - if (lookahead != 0 && - lookahead != '\n' && - lookahead != '"' && - lookahead != '\\') ADVANCE(242); - END_STATE(); - case 239: - ACCEPT_TOKEN(aux_sym_string_literal_token1); - if (lookahead == '*') ADVANCE(239); - if (lookahead == '/') ADVANCE(242); - if (lookahead != 0 && - lookahead != '\n' && - lookahead != '"' && - lookahead != '\\') ADVANCE(240); - END_STATE(); - case 240: - ACCEPT_TOKEN(aux_sym_string_literal_token1); - if (lookahead == '*') ADVANCE(239); - if (lookahead != 0 && - lookahead != '\n' && - lookahead != '"' && - lookahead != '\\') ADVANCE(240); - END_STATE(); - case 241: - ACCEPT_TOKEN(aux_sym_string_literal_token1); - if (lookahead == '/') ADVANCE(238); - if (lookahead == '\t' || - lookahead == '\r' || - lookahead == ' ') ADVANCE(241); - if (lookahead != 0 && - lookahead != '\n' && - lookahead != '"' && - lookahead != '\\') ADVANCE(242); - END_STATE(); - case 242: - ACCEPT_TOKEN(aux_sym_string_literal_token1); - if (lookahead != 0 && - lookahead != '\n' && - lookahead != '"' && - lookahead != '\\') ADVANCE(242); - END_STATE(); - case 243: - ACCEPT_TOKEN(sym_escape_sequence); - END_STATE(); - case 244: - ACCEPT_TOKEN(sym_escape_sequence); - if (lookahead == '\\') ADVANCE(25); - END_STATE(); - case 245: - ACCEPT_TOKEN(sym_escape_sequence); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(243); - END_STATE(); - case 246: - ACCEPT_TOKEN(sym_escape_sequence); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(245); - END_STATE(); - case 247: - ACCEPT_TOKEN(sym_system_lib_string); - END_STATE(); - case 248: - ACCEPT_TOKEN(sym_system_lib_string); - if (lookahead == '>') ADVANCE(247); - if (lookahead == '\\') ADVANCE(49); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(48); - END_STATE(); - case 249: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '"') ADVANCE(233); - if (lookahead == '\'') ADVANCE(224); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 250: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '"') ADVANCE(233); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 251: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '"') ADVANCE(235); - if (lookahead == '\'') ADVANCE(226); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 252: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '"') ADVANCE(235); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 253: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '"') ADVANCE(234); - if (lookahead == '\'') ADVANCE(225); - if (lookahead == '8') ADVANCE(255); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 254: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '"') ADVANCE(234); - if (lookahead == '8') ADVANCE(256); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 255: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '"') ADVANCE(236); - if (lookahead == '\'') ADVANCE(227); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 256: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '"') ADVANCE(236); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 257: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '\'') ADVANCE(224); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 258: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '\'') ADVANCE(226); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 259: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '\'') ADVANCE(225); - if (lookahead == '8') ADVANCE(260); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 260: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '\'') ADVANCE(227); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 261: - ACCEPT_TOKEN(sym_identifier); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(261); - END_STATE(); - case 262: - ACCEPT_TOKEN(sym_comment); - END_STATE(); - case 263: - ACCEPT_TOKEN(sym_comment); - if (lookahead == '\r') ADVANCE(265); - if (lookahead == '\\') ADVANCE(135); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(265); - END_STATE(); - case 264: - ACCEPT_TOKEN(sym_comment); - if (lookahead == '\\') ADVANCE(77); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(264); - END_STATE(); - case 265: - ACCEPT_TOKEN(sym_comment); - if (lookahead == '\\') ADVANCE(135); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(265); - END_STATE(); - case 266: - ACCEPT_TOKEN(sym_comment); - if (lookahead != 0 && - lookahead != '\\') ADVANCE(264); - if (lookahead == '\\') ADVANCE(77); - END_STATE(); - case 267: - ACCEPT_TOKEN(sym_comment); - if (lookahead != 0 && - lookahead != '\\') ADVANCE(265); - if (lookahead == '\\') ADVANCE(135); - END_STATE(); - default: - return false; - } -} - -static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { - START_LEXER(); - eof = lexer->eof(lexer); - switch (state) { - case 0: - if (lookahead == 'F') ADVANCE(1); - if (lookahead == 'N') ADVANCE(2); - if (lookahead == 'T') ADVANCE(3); - if (lookahead == '\\') SKIP(4) - if (lookahead == '_') ADVANCE(5); - if (lookahead == 'a') ADVANCE(6); - if (lookahead == 'b') ADVANCE(7); - if (lookahead == 'c') ADVANCE(8); - if (lookahead == 'd') ADVANCE(9); - if (lookahead == 'e') ADVANCE(10); - if (lookahead == 'f') ADVANCE(11); - if (lookahead == 'g') ADVANCE(12); - if (lookahead == 'i') ADVANCE(13); - if (lookahead == 'l') ADVANCE(14); - if (lookahead == 'r') ADVANCE(15); - if (lookahead == 's') ADVANCE(16); - if (lookahead == 't') ADVANCE(17); - if (lookahead == 'u') ADVANCE(18); - if (lookahead == 'v') ADVANCE(19); - if (lookahead == 'w') ADVANCE(20); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(0) - END_STATE(); - case 1: - if (lookahead == 'A') ADVANCE(21); - END_STATE(); - case 2: - if (lookahead == 'U') ADVANCE(22); - END_STATE(); - case 3: - if (lookahead == 'R') ADVANCE(23); - END_STATE(); - case 4: - if (lookahead == '\n') SKIP(0) - if (lookahead == '\r') SKIP(24) - END_STATE(); - case 5: - if (lookahead == 'A') ADVANCE(25); - if (lookahead == '_') ADVANCE(26); - if (lookahead == 'u') ADVANCE(27); - END_STATE(); - case 6: - if (lookahead == 'u') ADVANCE(28); - END_STATE(); - case 7: - if (lookahead == 'o') ADVANCE(29); - if (lookahead == 'r') ADVANCE(30); - END_STATE(); - case 8: - if (lookahead == 'a') ADVANCE(31); - if (lookahead == 'h') ADVANCE(32); - if (lookahead == 'o') ADVANCE(33); - END_STATE(); - case 9: - if (lookahead == 'e') ADVANCE(34); - if (lookahead == 'o') ADVANCE(35); - END_STATE(); - case 10: - if (lookahead == 'l') ADVANCE(36); - if (lookahead == 'n') ADVANCE(37); - if (lookahead == 'x') ADVANCE(38); - END_STATE(); - case 11: - if (lookahead == 'a') ADVANCE(39); - if (lookahead == 'l') ADVANCE(40); - if (lookahead == 'o') ADVANCE(41); - END_STATE(); - case 12: - if (lookahead == 'o') ADVANCE(42); - END_STATE(); - case 13: - if (lookahead == 'f') ADVANCE(43); - if (lookahead == 'n') ADVANCE(44); - END_STATE(); - case 14: - if (lookahead == 'o') ADVANCE(45); - END_STATE(); - case 15: - if (lookahead == 'e') ADVANCE(46); - END_STATE(); - case 16: - if (lookahead == 'h') ADVANCE(47); - if (lookahead == 'i') ADVANCE(48); - if (lookahead == 's') ADVANCE(49); - if (lookahead == 't') ADVANCE(50); - if (lookahead == 'w') ADVANCE(51); - END_STATE(); - case 17: - if (lookahead == 'r') ADVANCE(52); - if (lookahead == 'y') ADVANCE(53); - END_STATE(); - case 18: - if (lookahead == 'i') ADVANCE(54); - if (lookahead == 'n') ADVANCE(55); - END_STATE(); - case 19: - if (lookahead == 'o') ADVANCE(56); - END_STATE(); - case 20: - if (lookahead == 'h') ADVANCE(57); - END_STATE(); - case 21: - if (lookahead == 'L') ADVANCE(58); - END_STATE(); - case 22: - if (lookahead == 'L') ADVANCE(59); - END_STATE(); - case 23: - if (lookahead == 'U') ADVANCE(60); - END_STATE(); - case 24: - if (lookahead == '\n') SKIP(0) - END_STATE(); - case 25: - if (lookahead == 't') ADVANCE(61); - END_STATE(); - case 26: - if (lookahead == 'a') ADVANCE(62); - if (lookahead == 'b') ADVANCE(63); - if (lookahead == 'c') ADVANCE(64); - if (lookahead == 'd') ADVANCE(65); - if (lookahead == 'f') ADVANCE(66); - if (lookahead == 'r') ADVANCE(67); - if (lookahead == 's') ADVANCE(68); - if (lookahead == 't') ADVANCE(69); - if (lookahead == 'u') ADVANCE(70); - if (lookahead == 'v') ADVANCE(71); - END_STATE(); - case 27: - if (lookahead == 'n') ADVANCE(72); - END_STATE(); - case 28: - if (lookahead == 't') ADVANCE(73); - END_STATE(); - case 29: - if (lookahead == 'o') ADVANCE(74); - END_STATE(); - case 30: - if (lookahead == 'e') ADVANCE(75); - END_STATE(); - case 31: - if (lookahead == 's') ADVANCE(76); - END_STATE(); - case 32: - if (lookahead == 'a') ADVANCE(77); - END_STATE(); - case 33: - if (lookahead == 'n') ADVANCE(78); - END_STATE(); - case 34: - if (lookahead == 'f') ADVANCE(79); - END_STATE(); - case 35: - ACCEPT_TOKEN(anon_sym_do); - if (lookahead == 'u') ADVANCE(80); - END_STATE(); - case 36: - if (lookahead == 's') ADVANCE(81); - END_STATE(); - case 37: - if (lookahead == 'u') ADVANCE(82); - END_STATE(); - case 38: - if (lookahead == 't') ADVANCE(83); - END_STATE(); - case 39: - if (lookahead == 'l') ADVANCE(84); - END_STATE(); - case 40: - if (lookahead == 'o') ADVANCE(85); - END_STATE(); - case 41: - if (lookahead == 'r') ADVANCE(86); - END_STATE(); - case 42: - if (lookahead == 't') ADVANCE(87); - END_STATE(); - case 43: - ACCEPT_TOKEN(anon_sym_if); - END_STATE(); - case 44: - if (lookahead == 'l') ADVANCE(88); - if (lookahead == 't') ADVANCE(89); - END_STATE(); - case 45: - if (lookahead == 'n') ADVANCE(90); - END_STATE(); - case 46: - if (lookahead == 'g') ADVANCE(91); - if (lookahead == 's') ADVANCE(92); - if (lookahead == 't') ADVANCE(93); - END_STATE(); - case 47: - if (lookahead == 'o') ADVANCE(94); - END_STATE(); - case 48: - if (lookahead == 'g') ADVANCE(95); - if (lookahead == 'z') ADVANCE(96); - END_STATE(); - case 49: - if (lookahead == 'i') ADVANCE(97); - END_STATE(); - case 50: - if (lookahead == 'a') ADVANCE(98); - if (lookahead == 'r') ADVANCE(99); - END_STATE(); - case 51: - if (lookahead == 'i') ADVANCE(100); - END_STATE(); - case 52: - if (lookahead == 'u') ADVANCE(101); - END_STATE(); - case 53: - if (lookahead == 'p') ADVANCE(102); - END_STATE(); - case 54: - if (lookahead == 'n') ADVANCE(103); - END_STATE(); - case 55: - if (lookahead == 'i') ADVANCE(104); - if (lookahead == 's') ADVANCE(105); - END_STATE(); - case 56: - if (lookahead == 'i') ADVANCE(106); - if (lookahead == 'l') ADVANCE(107); - END_STATE(); - case 57: - if (lookahead == 'i') ADVANCE(108); - END_STATE(); - case 58: - if (lookahead == 'S') ADVANCE(109); - END_STATE(); - case 59: - if (lookahead == 'L') ADVANCE(110); - END_STATE(); - case 60: - if (lookahead == 'E') ADVANCE(111); - END_STATE(); - case 61: - if (lookahead == 'o') ADVANCE(112); - END_STATE(); - case 62: - if (lookahead == 't') ADVANCE(113); - END_STATE(); - case 63: - if (lookahead == 'a') ADVANCE(114); - END_STATE(); - case 64: - if (lookahead == 'd') ADVANCE(115); - if (lookahead == 'l') ADVANCE(116); - END_STATE(); - case 65: - if (lookahead == 'e') ADVANCE(117); - END_STATE(); - case 66: - if (lookahead == 'a') ADVANCE(118); - END_STATE(); - case 67: - if (lookahead == 'e') ADVANCE(119); - END_STATE(); - case 68: - if (lookahead == 'p') ADVANCE(120); - if (lookahead == 't') ADVANCE(121); - END_STATE(); - case 69: - if (lookahead == 'h') ADVANCE(122); - END_STATE(); - case 70: - if (lookahead == 'n') ADVANCE(123); - if (lookahead == 'p') ADVANCE(124); - END_STATE(); - case 71: - if (lookahead == 'e') ADVANCE(125); - END_STATE(); - case 72: - if (lookahead == 'a') ADVANCE(126); - END_STATE(); - case 73: - if (lookahead == 'o') ADVANCE(127); - END_STATE(); - case 74: - if (lookahead == 'l') ADVANCE(128); - END_STATE(); - case 75: - if (lookahead == 'a') ADVANCE(129); - END_STATE(); - case 76: - if (lookahead == 'e') ADVANCE(130); - END_STATE(); - case 77: - if (lookahead == 'r') ADVANCE(131); - END_STATE(); - case 78: - if (lookahead == 's') ADVANCE(132); - if (lookahead == 't') ADVANCE(133); - END_STATE(); - case 79: - if (lookahead == 'a') ADVANCE(134); - if (lookahead == 'i') ADVANCE(135); - END_STATE(); - case 80: - if (lookahead == 'b') ADVANCE(136); - END_STATE(); - case 81: - if (lookahead == 'e') ADVANCE(137); - END_STATE(); - case 82: - if (lookahead == 'm') ADVANCE(138); - END_STATE(); - case 83: - if (lookahead == 'e') ADVANCE(139); - END_STATE(); - case 84: - if (lookahead == 's') ADVANCE(140); - END_STATE(); - case 85: - if (lookahead == 'a') ADVANCE(141); - END_STATE(); - case 86: - ACCEPT_TOKEN(anon_sym_for); - END_STATE(); - case 87: - if (lookahead == 'o') ADVANCE(142); - END_STATE(); - case 88: - if (lookahead == 'i') ADVANCE(143); - END_STATE(); - case 89: - ACCEPT_TOKEN(sym_primitive_type); - if (lookahead == '1') ADVANCE(144); - if (lookahead == '3') ADVANCE(145); - if (lookahead == '6') ADVANCE(146); - if (lookahead == '8') ADVANCE(147); - if (lookahead == 'p') ADVANCE(148); - END_STATE(); - case 90: - if (lookahead == 'g') ADVANCE(149); - END_STATE(); - case 91: - if (lookahead == 'i') ADVANCE(150); - END_STATE(); - case 92: - if (lookahead == 't') ADVANCE(151); - END_STATE(); - case 93: - if (lookahead == 'u') ADVANCE(152); - END_STATE(); - case 94: - if (lookahead == 'r') ADVANCE(153); - END_STATE(); - case 95: - if (lookahead == 'n') ADVANCE(154); - END_STATE(); - case 96: - if (lookahead == 'e') ADVANCE(155); - END_STATE(); - case 97: - if (lookahead == 'z') ADVANCE(156); - END_STATE(); - case 98: - if (lookahead == 't') ADVANCE(157); - END_STATE(); - case 99: - if (lookahead == 'u') ADVANCE(158); - END_STATE(); - case 100: - if (lookahead == 't') ADVANCE(159); - END_STATE(); - case 101: - if (lookahead == 'e') ADVANCE(111); - END_STATE(); - case 102: - if (lookahead == 'e') ADVANCE(160); - END_STATE(); - case 103: - if (lookahead == 't') ADVANCE(161); - END_STATE(); - case 104: - if (lookahead == 'o') ADVANCE(162); - END_STATE(); - case 105: - if (lookahead == 'i') ADVANCE(163); - END_STATE(); - case 106: - if (lookahead == 'd') ADVANCE(128); - END_STATE(); - case 107: - if (lookahead == 'a') ADVANCE(164); - END_STATE(); - case 108: - if (lookahead == 'l') ADVANCE(165); - END_STATE(); - case 109: - if (lookahead == 'E') ADVANCE(166); - END_STATE(); - case 110: - ACCEPT_TOKEN(sym_null); - END_STATE(); - case 111: - ACCEPT_TOKEN(sym_true); - END_STATE(); - case 112: - if (lookahead == 'm') ADVANCE(167); - END_STATE(); - case 113: - if (lookahead == 't') ADVANCE(168); - END_STATE(); - case 114: - if (lookahead == 's') ADVANCE(169); - END_STATE(); - case 115: - if (lookahead == 'e') ADVANCE(170); - END_STATE(); - case 116: - if (lookahead == 'r') ADVANCE(171); - END_STATE(); - case 117: - if (lookahead == 'c') ADVANCE(172); - END_STATE(); - case 118: - if (lookahead == 's') ADVANCE(173); - END_STATE(); - case 119: - if (lookahead == 's') ADVANCE(174); - END_STATE(); - case 120: - if (lookahead == 't') ADVANCE(175); - END_STATE(); - case 121: - if (lookahead == 'd') ADVANCE(176); - END_STATE(); - case 122: - if (lookahead == 'i') ADVANCE(177); - END_STATE(); - case 123: - if (lookahead == 'a') ADVANCE(178); - END_STATE(); - case 124: - if (lookahead == 't') ADVANCE(179); - END_STATE(); - case 125: - if (lookahead == 'c') ADVANCE(180); - END_STATE(); - case 126: - if (lookahead == 'l') ADVANCE(181); - END_STATE(); - case 127: - ACCEPT_TOKEN(anon_sym_auto); - END_STATE(); - case 128: - ACCEPT_TOKEN(sym_primitive_type); - END_STATE(); - case 129: - if (lookahead == 'k') ADVANCE(182); - END_STATE(); - case 130: - ACCEPT_TOKEN(anon_sym_case); - END_STATE(); - case 131: - ACCEPT_TOKEN(sym_primitive_type); - if (lookahead == '1') ADVANCE(183); - if (lookahead == '3') ADVANCE(184); - if (lookahead == '6') ADVANCE(185); - if (lookahead == '8') ADVANCE(186); - if (lookahead == 'p') ADVANCE(187); - END_STATE(); - case 132: - if (lookahead == 't') ADVANCE(188); - END_STATE(); - case 133: - if (lookahead == 'i') ADVANCE(189); - END_STATE(); - case 134: - if (lookahead == 'u') ADVANCE(190); - END_STATE(); - case 135: - if (lookahead == 'n') ADVANCE(191); - END_STATE(); - case 136: - if (lookahead == 'l') ADVANCE(192); - END_STATE(); - case 137: - ACCEPT_TOKEN(anon_sym_else); - END_STATE(); - case 138: - ACCEPT_TOKEN(anon_sym_enum); - END_STATE(); - case 139: - if (lookahead == 'r') ADVANCE(193); - END_STATE(); - case 140: - if (lookahead == 'e') ADVANCE(166); - END_STATE(); - case 141: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 142: - ACCEPT_TOKEN(anon_sym_goto); - END_STATE(); - case 143: - if (lookahead == 'n') ADVANCE(194); - END_STATE(); - case 144: - if (lookahead == '6') ADVANCE(195); - END_STATE(); - case 145: - if (lookahead == '2') ADVANCE(196); - END_STATE(); - case 146: - if (lookahead == '4') ADVANCE(197); - END_STATE(); - case 147: - if (lookahead == '_') ADVANCE(198); - END_STATE(); - case 148: - if (lookahead == 't') ADVANCE(199); - END_STATE(); - case 149: - ACCEPT_TOKEN(anon_sym_long); - END_STATE(); - case 150: - if (lookahead == 's') ADVANCE(200); - END_STATE(); - case 151: - if (lookahead == 'r') ADVANCE(201); - END_STATE(); - case 152: - if (lookahead == 'r') ADVANCE(202); - END_STATE(); - case 153: - if (lookahead == 't') ADVANCE(203); - END_STATE(); - case 154: - if (lookahead == 'e') ADVANCE(204); - END_STATE(); - case 155: - if (lookahead == '_') ADVANCE(205); - if (lookahead == 'o') ADVANCE(206); - END_STATE(); - case 156: - if (lookahead == 'e') ADVANCE(207); - END_STATE(); - case 157: - if (lookahead == 'i') ADVANCE(208); - END_STATE(); - case 158: - if (lookahead == 'c') ADVANCE(209); - END_STATE(); - case 159: - if (lookahead == 'c') ADVANCE(210); - END_STATE(); - case 160: - if (lookahead == 'd') ADVANCE(211); - END_STATE(); - case 161: - if (lookahead == '1') ADVANCE(212); - if (lookahead == '3') ADVANCE(213); - if (lookahead == '6') ADVANCE(214); - if (lookahead == '8') ADVANCE(215); - if (lookahead == 'p') ADVANCE(216); - END_STATE(); - case 162: - if (lookahead == 'n') ADVANCE(217); - END_STATE(); - case 163: - if (lookahead == 'g') ADVANCE(218); - END_STATE(); - case 164: - if (lookahead == 't') ADVANCE(219); - END_STATE(); - case 165: - if (lookahead == 'e') ADVANCE(220); - END_STATE(); - case 166: - ACCEPT_TOKEN(sym_false); - END_STATE(); - case 167: - if (lookahead == 'i') ADVANCE(221); - END_STATE(); - case 168: - if (lookahead == 'r') ADVANCE(222); - END_STATE(); - case 169: - if (lookahead == 'e') ADVANCE(223); - END_STATE(); - case 170: - if (lookahead == 'c') ADVANCE(224); - END_STATE(); - case 171: - if (lookahead == 'c') ADVANCE(225); - END_STATE(); - case 172: - if (lookahead == 'l') ADVANCE(226); - END_STATE(); - case 173: - if (lookahead == 't') ADVANCE(227); - END_STATE(); - case 174: - if (lookahead == 't') ADVANCE(228); - END_STATE(); - case 175: - if (lookahead == 'r') ADVANCE(229); - END_STATE(); - case 176: - if (lookahead == 'c') ADVANCE(230); - END_STATE(); - case 177: - if (lookahead == 's') ADVANCE(231); - END_STATE(); - case 178: - if (lookahead == 'l') ADVANCE(232); - END_STATE(); - case 179: - if (lookahead == 'r') ADVANCE(233); - END_STATE(); - case 180: - if (lookahead == 't') ADVANCE(234); - END_STATE(); - case 181: - if (lookahead == 'i') ADVANCE(235); - END_STATE(); - case 182: - ACCEPT_TOKEN(anon_sym_break); - END_STATE(); - case 183: - if (lookahead == '6') ADVANCE(236); - END_STATE(); - case 184: - if (lookahead == '2') ADVANCE(237); - END_STATE(); - case 185: - if (lookahead == '4') ADVANCE(238); - END_STATE(); - case 186: - if (lookahead == '_') ADVANCE(239); - END_STATE(); - case 187: - if (lookahead == 't') ADVANCE(240); - END_STATE(); - case 188: - ACCEPT_TOKEN(anon_sym_const); - END_STATE(); - case 189: - if (lookahead == 'n') ADVANCE(241); - END_STATE(); - case 190: - if (lookahead == 'l') ADVANCE(242); - END_STATE(); - case 191: - if (lookahead == 'e') ADVANCE(243); - END_STATE(); - case 192: - if (lookahead == 'e') ADVANCE(128); - END_STATE(); - case 193: - if (lookahead == 'n') ADVANCE(244); - END_STATE(); - case 194: - if (lookahead == 'e') ADVANCE(245); - END_STATE(); - case 195: - if (lookahead == '_') ADVANCE(246); - END_STATE(); - case 196: - if (lookahead == '_') ADVANCE(247); - END_STATE(); - case 197: - if (lookahead == '_') ADVANCE(248); - END_STATE(); - case 198: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 199: - if (lookahead == 'r') ADVANCE(249); - END_STATE(); - case 200: - if (lookahead == 't') ADVANCE(250); - END_STATE(); - case 201: - if (lookahead == 'i') ADVANCE(251); - END_STATE(); - case 202: - if (lookahead == 'n') ADVANCE(252); - END_STATE(); - case 203: - ACCEPT_TOKEN(anon_sym_short); - END_STATE(); - case 204: - if (lookahead == 'd') ADVANCE(253); - END_STATE(); - case 205: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 206: - if (lookahead == 'f') ADVANCE(254); - END_STATE(); - case 207: - if (lookahead == '_') ADVANCE(255); - END_STATE(); - case 208: - if (lookahead == 'c') ADVANCE(256); - END_STATE(); - case 209: - if (lookahead == 't') ADVANCE(257); - END_STATE(); - case 210: - if (lookahead == 'h') ADVANCE(258); - END_STATE(); - case 211: - if (lookahead == 'e') ADVANCE(259); - END_STATE(); - case 212: - if (lookahead == '6') ADVANCE(260); - END_STATE(); - case 213: - if (lookahead == '2') ADVANCE(261); - END_STATE(); - case 214: - if (lookahead == '4') ADVANCE(262); - END_STATE(); - case 215: - if (lookahead == '_') ADVANCE(263); - END_STATE(); - case 216: - if (lookahead == 't') ADVANCE(264); - END_STATE(); - case 217: - ACCEPT_TOKEN(anon_sym_union); - END_STATE(); - case 218: - if (lookahead == 'n') ADVANCE(265); - END_STATE(); - case 219: - if (lookahead == 'i') ADVANCE(266); - END_STATE(); - case 220: - ACCEPT_TOKEN(anon_sym_while); - END_STATE(); - case 221: - if (lookahead == 'c') ADVANCE(267); - END_STATE(); - case 222: - if (lookahead == 'i') ADVANCE(268); - END_STATE(); - case 223: - if (lookahead == 'd') ADVANCE(269); - END_STATE(); - case 224: - if (lookahead == 'l') ADVANCE(270); - END_STATE(); - case 225: - if (lookahead == 'a') ADVANCE(271); - END_STATE(); - case 226: - if (lookahead == 's') ADVANCE(272); - END_STATE(); - case 227: - if (lookahead == 'c') ADVANCE(273); - END_STATE(); - case 228: - if (lookahead == 'r') ADVANCE(274); - END_STATE(); - case 229: - ACCEPT_TOKEN(sym_ms_signed_ptr_modifier); - END_STATE(); - case 230: - if (lookahead == 'a') ADVANCE(275); - END_STATE(); - case 231: - if (lookahead == 'c') ADVANCE(276); - END_STATE(); - case 232: - if (lookahead == 'i') ADVANCE(277); - END_STATE(); - case 233: - ACCEPT_TOKEN(sym_ms_unsigned_ptr_modifier); - END_STATE(); - case 234: - if (lookahead == 'o') ADVANCE(278); - END_STATE(); - case 235: - if (lookahead == 'g') ADVANCE(279); - END_STATE(); - case 236: - if (lookahead == '_') ADVANCE(280); - END_STATE(); - case 237: - if (lookahead == '_') ADVANCE(281); - END_STATE(); - case 238: - if (lookahead == '_') ADVANCE(282); - END_STATE(); - case 239: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 240: - if (lookahead == 'r') ADVANCE(283); - END_STATE(); - case 241: - if (lookahead == 'u') ADVANCE(284); - END_STATE(); - case 242: - if (lookahead == 't') ADVANCE(285); - END_STATE(); - case 243: - if (lookahead == 'd') ADVANCE(286); - END_STATE(); - case 244: - ACCEPT_TOKEN(anon_sym_extern); - END_STATE(); - case 245: - ACCEPT_TOKEN(anon_sym_inline); - END_STATE(); - case 246: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 247: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 248: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 249: - if (lookahead == '_') ADVANCE(287); - END_STATE(); - case 250: - if (lookahead == 'e') ADVANCE(288); - END_STATE(); - case 251: - if (lookahead == 'c') ADVANCE(289); - END_STATE(); - case 252: - ACCEPT_TOKEN(anon_sym_return); - END_STATE(); - case 253: - ACCEPT_TOKEN(anon_sym_signed); - END_STATE(); - case 254: - ACCEPT_TOKEN(anon_sym_sizeof); - END_STATE(); - case 255: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 256: - ACCEPT_TOKEN(anon_sym_static); - END_STATE(); - case 257: - ACCEPT_TOKEN(anon_sym_struct); - END_STATE(); - case 258: - ACCEPT_TOKEN(anon_sym_switch); - END_STATE(); - case 259: - if (lookahead == 'f') ADVANCE(290); - END_STATE(); - case 260: - if (lookahead == '_') ADVANCE(291); - END_STATE(); - case 261: - if (lookahead == '_') ADVANCE(292); - END_STATE(); - case 262: - if (lookahead == '_') ADVANCE(293); - END_STATE(); - case 263: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 264: - if (lookahead == 'r') ADVANCE(294); - END_STATE(); - case 265: - if (lookahead == 'e') ADVANCE(295); - END_STATE(); - case 266: - if (lookahead == 'l') ADVANCE(296); - END_STATE(); - case 267: - ACCEPT_TOKEN(anon_sym__Atomic); - END_STATE(); - case 268: - if (lookahead == 'b') ADVANCE(297); - END_STATE(); - case 269: - ACCEPT_TOKEN(anon_sym___based); - END_STATE(); - case 270: - ACCEPT_TOKEN(anon_sym___cdecl); - END_STATE(); - case 271: - if (lookahead == 'l') ADVANCE(298); - END_STATE(); - case 272: - if (lookahead == 'p') ADVANCE(299); - END_STATE(); - case 273: - if (lookahead == 'a') ADVANCE(300); - END_STATE(); - case 274: - if (lookahead == 'i') ADVANCE(301); - END_STATE(); - case 275: - if (lookahead == 'l') ADVANCE(302); - END_STATE(); - case 276: - if (lookahead == 'a') ADVANCE(303); - END_STATE(); - case 277: - if (lookahead == 'g') ADVANCE(304); - END_STATE(); - case 278: - if (lookahead == 'r') ADVANCE(305); - END_STATE(); - case 279: - if (lookahead == 'n') ADVANCE(306); - END_STATE(); - case 280: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 281: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 282: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 283: - if (lookahead == '_') ADVANCE(307); - END_STATE(); - case 284: - if (lookahead == 'e') ADVANCE(308); - END_STATE(); - case 285: - ACCEPT_TOKEN(anon_sym_default); - END_STATE(); - case 286: - ACCEPT_TOKEN(anon_sym_defined); - END_STATE(); - case 287: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 288: - if (lookahead == 'r') ADVANCE(309); - END_STATE(); - case 289: - if (lookahead == 't') ADVANCE(310); - END_STATE(); - case 290: - ACCEPT_TOKEN(anon_sym_typedef); - END_STATE(); - case 291: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 292: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 293: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 294: - if (lookahead == '_') ADVANCE(311); - END_STATE(); - case 295: - if (lookahead == 'd') ADVANCE(312); - END_STATE(); - case 296: - if (lookahead == 'e') ADVANCE(313); - END_STATE(); - case 297: - if (lookahead == 'u') ADVANCE(314); - END_STATE(); - case 298: - if (lookahead == 'l') ADVANCE(315); - END_STATE(); - case 299: - if (lookahead == 'e') ADVANCE(316); - END_STATE(); - case 300: - if (lookahead == 'l') ADVANCE(317); - END_STATE(); - case 301: - if (lookahead == 'c') ADVANCE(318); - END_STATE(); - case 302: - if (lookahead == 'l') ADVANCE(319); - END_STATE(); - case 303: - if (lookahead == 'l') ADVANCE(320); - END_STATE(); - case 304: - if (lookahead == 'n') ADVANCE(321); - END_STATE(); - case 305: - if (lookahead == 'c') ADVANCE(322); - END_STATE(); - case 306: - if (lookahead == 'e') ADVANCE(323); - END_STATE(); - case 307: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 308: - ACCEPT_TOKEN(anon_sym_continue); - END_STATE(); - case 309: - ACCEPT_TOKEN(anon_sym_register); - END_STATE(); - case 310: - ACCEPT_TOKEN(anon_sym_restrict); - END_STATE(); - case 311: - if (lookahead == 't') ADVANCE(128); - END_STATE(); - case 312: - ACCEPT_TOKEN(anon_sym_unsigned); - END_STATE(); - case 313: - ACCEPT_TOKEN(anon_sym_volatile); - END_STATE(); - case 314: - if (lookahead == 't') ADVANCE(324); - END_STATE(); - case 315: - ACCEPT_TOKEN(anon_sym___clrcall); - END_STATE(); - case 316: - if (lookahead == 'c') ADVANCE(325); - END_STATE(); - case 317: - if (lookahead == 'l') ADVANCE(326); - END_STATE(); - case 318: - if (lookahead == 't') ADVANCE(327); - END_STATE(); - case 319: - ACCEPT_TOKEN(anon_sym___stdcall); - END_STATE(); - case 320: - if (lookahead == 'l') ADVANCE(328); - END_STATE(); - case 321: - if (lookahead == 'e') ADVANCE(329); - END_STATE(); - case 322: - if (lookahead == 'a') ADVANCE(330); - END_STATE(); - case 323: - if (lookahead == 'd') ADVANCE(331); - END_STATE(); - case 324: - if (lookahead == 'e') ADVANCE(332); - END_STATE(); - case 325: - ACCEPT_TOKEN(anon_sym___declspec); - END_STATE(); - case 326: - ACCEPT_TOKEN(anon_sym___fastcall); - END_STATE(); - case 327: - ACCEPT_TOKEN(sym_ms_restrict_modifier); - END_STATE(); - case 328: - ACCEPT_TOKEN(anon_sym___thiscall); - END_STATE(); - case 329: - if (lookahead == 'd') ADVANCE(333); - END_STATE(); - case 330: - if (lookahead == 'l') ADVANCE(334); - END_STATE(); - case 331: - ACCEPT_TOKEN(anon_sym__unaligned); - END_STATE(); - case 332: - if (lookahead == '_') ADVANCE(335); - END_STATE(); - case 333: - ACCEPT_TOKEN(anon_sym___unaligned); - END_STATE(); - case 334: - if (lookahead == 'l') ADVANCE(336); - END_STATE(); - case 335: - if (lookahead == '_') ADVANCE(337); - END_STATE(); - case 336: - ACCEPT_TOKEN(anon_sym___vectorcall); - END_STATE(); - case 337: - ACCEPT_TOKEN(anon_sym___attribute__); - END_STATE(); - default: - return false; - } -} - -static const TSLexMode ts_lex_modes[STATE_COUNT] = { - [0] = {.lex_state = 0}, - [1] = {.lex_state = 83}, - [2] = {.lex_state = 28}, - [3] = {.lex_state = 28}, - [4] = {.lex_state = 28}, - [5] = {.lex_state = 28}, - [6] = {.lex_state = 28}, - [7] = {.lex_state = 28}, - [8] = {.lex_state = 28}, - [9] = {.lex_state = 28}, - [10] = {.lex_state = 28}, - [11] = {.lex_state = 28}, - [12] = {.lex_state = 28}, - [13] = {.lex_state = 28}, - [14] = {.lex_state = 28}, - [15] = {.lex_state = 28}, - [16] = {.lex_state = 28}, - [17] = {.lex_state = 28}, - [18] = {.lex_state = 28}, - [19] = {.lex_state = 28}, - [20] = {.lex_state = 28}, - [21] = {.lex_state = 83}, - [22] = {.lex_state = 83}, - [23] = {.lex_state = 29}, - [24] = {.lex_state = 83}, - [25] = {.lex_state = 83}, - [26] = {.lex_state = 83}, - [27] = {.lex_state = 83}, - [28] = {.lex_state = 83}, - [29] = {.lex_state = 83}, - [30] = {.lex_state = 83}, - [31] = {.lex_state = 83}, - [32] = {.lex_state = 83}, - [33] = {.lex_state = 29}, - [34] = {.lex_state = 83}, - [35] = {.lex_state = 83}, - [36] = {.lex_state = 83}, - [37] = {.lex_state = 83}, - [38] = {.lex_state = 83}, - [39] = {.lex_state = 29}, - [40] = {.lex_state = 83}, - [41] = {.lex_state = 83}, - [42] = {.lex_state = 83}, - [43] = {.lex_state = 28}, - [44] = {.lex_state = 28}, - [45] = {.lex_state = 28}, - [46] = {.lex_state = 28}, - [47] = {.lex_state = 28}, - [48] = {.lex_state = 83}, - [49] = {.lex_state = 29}, - [50] = {.lex_state = 83}, - [51] = {.lex_state = 29}, - [52] = {.lex_state = 29}, - [53] = {.lex_state = 83}, - [54] = {.lex_state = 83}, - [55] = {.lex_state = 83}, - [56] = {.lex_state = 29}, - [57] = {.lex_state = 29}, - [58] = {.lex_state = 83}, - [59] = {.lex_state = 83}, - [60] = {.lex_state = 83}, - [61] = {.lex_state = 83}, - [62] = {.lex_state = 83}, - [63] = {.lex_state = 83}, - [64] = {.lex_state = 83}, - [65] = {.lex_state = 83}, - [66] = {.lex_state = 83}, - [67] = {.lex_state = 27}, - [68] = {.lex_state = 28}, - [69] = {.lex_state = 28}, - [70] = {.lex_state = 28}, - [71] = {.lex_state = 28}, - [72] = {.lex_state = 28}, - [73] = {.lex_state = 28}, - [74] = {.lex_state = 28}, - [75] = {.lex_state = 28}, - [76] = {.lex_state = 28}, - [77] = {.lex_state = 28}, - [78] = {.lex_state = 28}, - [79] = {.lex_state = 28}, - [80] = {.lex_state = 28}, - [81] = {.lex_state = 28}, - [82] = {.lex_state = 28}, - [83] = {.lex_state = 28}, - [84] = {.lex_state = 28}, - [85] = {.lex_state = 28}, - [86] = {.lex_state = 28}, - [87] = {.lex_state = 28}, - [88] = {.lex_state = 28}, - [89] = {.lex_state = 28}, - [90] = {.lex_state = 28}, - [91] = {.lex_state = 28}, - [92] = {.lex_state = 28}, - [93] = {.lex_state = 28}, - [94] = {.lex_state = 28}, - [95] = {.lex_state = 28}, - [96] = {.lex_state = 28}, - [97] = {.lex_state = 28}, - [98] = {.lex_state = 28}, - [99] = {.lex_state = 28}, - [100] = {.lex_state = 28}, - [101] = {.lex_state = 28}, - [102] = {.lex_state = 28}, - [103] = {.lex_state = 28}, - [104] = {.lex_state = 28}, - [105] = {.lex_state = 28}, - [106] = {.lex_state = 27}, - [107] = {.lex_state = 28}, - [108] = {.lex_state = 28}, - [109] = {.lex_state = 28}, - [110] = {.lex_state = 28}, - [111] = {.lex_state = 28}, - [112] = {.lex_state = 28}, - [113] = {.lex_state = 28}, - [114] = {.lex_state = 28}, - [115] = {.lex_state = 28}, - [116] = {.lex_state = 28}, - [117] = {.lex_state = 28}, - [118] = {.lex_state = 28}, - [119] = {.lex_state = 28}, - [120] = {.lex_state = 28}, - [121] = {.lex_state = 28}, - [122] = {.lex_state = 28}, - [123] = {.lex_state = 28}, - [124] = {.lex_state = 28}, - [125] = {.lex_state = 28}, - [126] = {.lex_state = 83}, - [127] = {.lex_state = 83}, - [128] = {.lex_state = 83}, - [129] = {.lex_state = 29}, - [130] = {.lex_state = 29}, - [131] = {.lex_state = 83}, - [132] = {.lex_state = 83}, - [133] = {.lex_state = 29}, - [134] = {.lex_state = 29}, - [135] = {.lex_state = 29}, - [136] = {.lex_state = 83}, - [137] = {.lex_state = 83}, - [138] = {.lex_state = 83}, - [139] = {.lex_state = 83}, - [140] = {.lex_state = 83}, - [141] = {.lex_state = 29}, - [142] = {.lex_state = 29}, - [143] = {.lex_state = 83}, - [144] = {.lex_state = 83}, - [145] = {.lex_state = 83}, - [146] = {.lex_state = 29}, - [147] = {.lex_state = 29}, - [148] = {.lex_state = 29}, - [149] = {.lex_state = 83}, - [150] = {.lex_state = 29}, - [151] = {.lex_state = 83}, - [152] = {.lex_state = 29}, - [153] = {.lex_state = 83}, - [154] = {.lex_state = 83}, - [155] = {.lex_state = 29}, - [156] = {.lex_state = 29}, - [157] = {.lex_state = 83}, - [158] = {.lex_state = 83}, - [159] = {.lex_state = 83}, - [160] = {.lex_state = 83}, - [161] = {.lex_state = 29}, - [162] = {.lex_state = 83}, - [163] = {.lex_state = 83}, - [164] = {.lex_state = 83}, - [165] = {.lex_state = 83}, - [166] = {.lex_state = 83}, - [167] = {.lex_state = 83}, - [168] = {.lex_state = 83}, - [169] = {.lex_state = 83}, - [170] = {.lex_state = 83}, - [171] = {.lex_state = 83}, - [172] = {.lex_state = 29}, - [173] = {.lex_state = 83}, - [174] = {.lex_state = 83}, - [175] = {.lex_state = 83}, - [176] = {.lex_state = 83}, - [177] = {.lex_state = 83}, - [178] = {.lex_state = 83}, - [179] = {.lex_state = 83}, - [180] = {.lex_state = 83}, - [181] = {.lex_state = 83}, - [182] = {.lex_state = 83}, - [183] = {.lex_state = 83}, - [184] = {.lex_state = 29}, - [185] = {.lex_state = 29}, - [186] = {.lex_state = 83}, - [187] = {.lex_state = 83}, - [188] = {.lex_state = 83}, - [189] = {.lex_state = 83}, - [190] = {.lex_state = 83}, - [191] = {.lex_state = 29}, - [192] = {.lex_state = 83}, - [193] = {.lex_state = 83}, - [194] = {.lex_state = 29}, - [195] = {.lex_state = 83}, - [196] = {.lex_state = 83}, - [197] = {.lex_state = 83}, - [198] = {.lex_state = 83}, - [199] = {.lex_state = 29}, - [200] = {.lex_state = 83}, - [201] = {.lex_state = 29}, - [202] = {.lex_state = 29}, - [203] = {.lex_state = 83}, - [204] = {.lex_state = 83}, - [205] = {.lex_state = 83}, - [206] = {.lex_state = 83}, - [207] = {.lex_state = 83}, - [208] = {.lex_state = 83}, - [209] = {.lex_state = 83}, - [210] = {.lex_state = 29}, - [211] = {.lex_state = 29}, - [212] = {.lex_state = 83}, - [213] = {.lex_state = 83}, - [214] = {.lex_state = 83}, - [215] = {.lex_state = 83}, - [216] = {.lex_state = 83}, - [217] = {.lex_state = 29}, - [218] = {.lex_state = 83}, - [219] = {.lex_state = 83}, - [220] = {.lex_state = 83}, - [221] = {.lex_state = 83}, - [222] = {.lex_state = 83}, - [223] = {.lex_state = 83}, - [224] = {.lex_state = 83}, - [225] = {.lex_state = 83}, - [226] = {.lex_state = 29}, - [227] = {.lex_state = 83}, - [228] = {.lex_state = 83}, - [229] = {.lex_state = 83}, - [230] = {.lex_state = 83}, - [231] = {.lex_state = 29}, - [232] = {.lex_state = 83}, - [233] = {.lex_state = 83}, - [234] = {.lex_state = 83}, - [235] = {.lex_state = 29}, - [236] = {.lex_state = 83}, - [237] = {.lex_state = 83}, - [238] = {.lex_state = 83}, - [239] = {.lex_state = 83}, - [240] = {.lex_state = 83}, - [241] = {.lex_state = 29}, - [242] = {.lex_state = 83}, - [243] = {.lex_state = 83}, - [244] = {.lex_state = 83}, - [245] = {.lex_state = 29}, - [246] = {.lex_state = 83}, - [247] = {.lex_state = 83}, - [248] = {.lex_state = 83}, - [249] = {.lex_state = 83}, - [250] = {.lex_state = 83}, - [251] = {.lex_state = 83}, - [252] = {.lex_state = 83}, - [253] = {.lex_state = 83}, - [254] = {.lex_state = 83}, - [255] = {.lex_state = 83}, - [256] = {.lex_state = 83}, - [257] = {.lex_state = 83}, - [258] = {.lex_state = 83}, - [259] = {.lex_state = 83}, - [260] = {.lex_state = 83}, - [261] = {.lex_state = 83}, - [262] = {.lex_state = 83}, - [263] = {.lex_state = 83}, - [264] = {.lex_state = 83}, - [265] = {.lex_state = 83}, - [266] = {.lex_state = 83}, - [267] = {.lex_state = 83}, - [268] = {.lex_state = 83}, - [269] = {.lex_state = 83}, - [270] = {.lex_state = 83}, - [271] = {.lex_state = 83}, - [272] = {.lex_state = 83}, - [273] = {.lex_state = 83}, - [274] = {.lex_state = 83}, - [275] = {.lex_state = 83}, - [276] = {.lex_state = 83}, - [277] = {.lex_state = 83}, - [278] = {.lex_state = 83}, - [279] = {.lex_state = 83}, - [280] = {.lex_state = 83}, - [281] = {.lex_state = 83}, - [282] = {.lex_state = 83}, - [283] = {.lex_state = 29}, - [284] = {.lex_state = 83}, - [285] = {.lex_state = 83}, - [286] = {.lex_state = 83}, - [287] = {.lex_state = 83}, - [288] = {.lex_state = 83}, - [289] = {.lex_state = 83}, - [290] = {.lex_state = 29}, - [291] = {.lex_state = 83}, - [292] = {.lex_state = 83}, - [293] = {.lex_state = 83}, - [294] = {.lex_state = 83}, - [295] = {.lex_state = 83}, - [296] = {.lex_state = 29}, - [297] = {.lex_state = 83}, - [298] = {.lex_state = 29}, - [299] = {.lex_state = 29}, - [300] = {.lex_state = 83}, - [301] = {.lex_state = 83}, - [302] = {.lex_state = 83}, - [303] = {.lex_state = 83}, - [304] = {.lex_state = 83}, - [305] = {.lex_state = 83}, - [306] = {.lex_state = 83}, - [307] = {.lex_state = 83}, - [308] = {.lex_state = 83}, - [309] = {.lex_state = 83}, - [310] = {.lex_state = 83}, - [311] = {.lex_state = 83}, - [312] = {.lex_state = 83}, - [313] = {.lex_state = 83}, - [314] = {.lex_state = 83}, - [315] = {.lex_state = 83}, - [316] = {.lex_state = 83}, - [317] = {.lex_state = 83}, - [318] = {.lex_state = 83}, - [319] = {.lex_state = 29}, - [320] = {.lex_state = 83}, - [321] = {.lex_state = 29}, - [322] = {.lex_state = 29}, - [323] = {.lex_state = 29}, - [324] = {.lex_state = 83}, - [325] = {.lex_state = 83}, - [326] = {.lex_state = 83}, - [327] = {.lex_state = 83}, - [328] = {.lex_state = 83}, - [329] = {.lex_state = 83}, - [330] = {.lex_state = 83}, - [331] = {.lex_state = 83}, - [332] = {.lex_state = 83}, - [333] = {.lex_state = 83}, - [334] = {.lex_state = 29}, - [335] = {.lex_state = 83}, - [336] = {.lex_state = 83}, - [337] = {.lex_state = 83}, - [338] = {.lex_state = 83}, - [339] = {.lex_state = 83}, - [340] = {.lex_state = 83}, - [341] = {.lex_state = 83}, - [342] = {.lex_state = 83}, - [343] = {.lex_state = 83}, - [344] = {.lex_state = 83}, - [345] = {.lex_state = 29}, - [346] = {.lex_state = 83}, - [347] = {.lex_state = 29}, - [348] = {.lex_state = 29}, - [349] = {.lex_state = 83}, - [350] = {.lex_state = 83}, - [351] = {.lex_state = 29}, - [352] = {.lex_state = 83}, - [353] = {.lex_state = 29}, - [354] = {.lex_state = 29}, - [355] = {.lex_state = 83}, - [356] = {.lex_state = 29}, - [357] = {.lex_state = 29}, - [358] = {.lex_state = 29}, - [359] = {.lex_state = 29}, - [360] = {.lex_state = 29}, - [361] = {.lex_state = 83}, - [362] = {.lex_state = 29}, - [363] = {.lex_state = 83}, - [364] = {.lex_state = 29}, - [365] = {.lex_state = 29}, - [366] = {.lex_state = 83}, - [367] = {.lex_state = 83}, - [368] = {.lex_state = 83}, - [369] = {.lex_state = 83}, - [370] = {.lex_state = 83}, - [371] = {.lex_state = 29}, - [372] = {.lex_state = 29}, - [373] = {.lex_state = 27}, - [374] = {.lex_state = 83}, - [375] = {.lex_state = 83}, - [376] = {.lex_state = 83}, - [377] = {.lex_state = 83}, - [378] = {.lex_state = 83}, - [379] = {.lex_state = 83}, - [380] = {.lex_state = 83}, - [381] = {.lex_state = 83}, - [382] = {.lex_state = 83}, - [383] = {.lex_state = 83}, - [384] = {.lex_state = 27}, - [385] = {.lex_state = 83}, - [386] = {.lex_state = 33}, - [387] = {.lex_state = 33}, - [388] = {.lex_state = 33}, - [389] = {.lex_state = 33}, - [390] = {.lex_state = 33}, - [391] = {.lex_state = 33}, - [392] = {.lex_state = 33}, - [393] = {.lex_state = 33}, - [394] = {.lex_state = 33}, - [395] = {.lex_state = 33}, - [396] = {.lex_state = 33}, - [397] = {.lex_state = 33}, - [398] = {.lex_state = 33}, - [399] = {.lex_state = 33}, - [400] = {.lex_state = 33}, - [401] = {.lex_state = 32}, - [402] = {.lex_state = 32}, - [403] = {.lex_state = 32}, - [404] = {.lex_state = 32}, - [405] = {.lex_state = 32}, - [406] = {.lex_state = 32}, - [407] = {.lex_state = 32}, - [408] = {.lex_state = 32}, - [409] = {.lex_state = 32}, - [410] = {.lex_state = 83}, - [411] = {.lex_state = 33}, - [412] = {.lex_state = 83}, - [413] = {.lex_state = 83}, - [414] = {.lex_state = 32}, - [415] = {.lex_state = 83}, - [416] = {.lex_state = 32}, - [417] = {.lex_state = 34}, - [418] = {.lex_state = 32}, - [419] = {.lex_state = 34}, - [420] = {.lex_state = 34}, - [421] = {.lex_state = 83}, - [422] = {.lex_state = 83}, - [423] = {.lex_state = 31}, - [424] = {.lex_state = 83}, - [425] = {.lex_state = 83}, - [426] = {.lex_state = 83}, - [427] = {.lex_state = 31}, - [428] = {.lex_state = 83}, - [429] = {.lex_state = 83}, - [430] = {.lex_state = 83}, - [431] = {.lex_state = 83}, - [432] = {.lex_state = 83}, - [433] = {.lex_state = 31}, - [434] = {.lex_state = 33}, - [435] = {.lex_state = 33}, - [436] = {.lex_state = 31}, - [437] = {.lex_state = 33}, - [438] = {.lex_state = 33}, - [439] = {.lex_state = 33}, - [440] = {.lex_state = 31}, - [441] = {.lex_state = 83}, - [442] = {.lex_state = 83}, - [443] = {.lex_state = 83}, - [444] = {.lex_state = 83}, - [445] = {.lex_state = 83}, - [446] = {.lex_state = 83}, - [447] = {.lex_state = 83}, - [448] = {.lex_state = 83}, - [449] = {.lex_state = 83}, - [450] = {.lex_state = 83}, - [451] = {.lex_state = 83}, - [452] = {.lex_state = 83}, - [453] = {.lex_state = 83}, - [454] = {.lex_state = 83}, - [455] = {.lex_state = 83}, - [456] = {.lex_state = 83}, - [457] = {.lex_state = 83}, - [458] = {.lex_state = 83}, - [459] = {.lex_state = 83}, - [460] = {.lex_state = 83}, - [461] = {.lex_state = 83}, - [462] = {.lex_state = 83}, - [463] = {.lex_state = 83}, - [464] = {.lex_state = 83}, - [465] = {.lex_state = 83}, - [466] = {.lex_state = 83}, - [467] = {.lex_state = 83}, - [468] = {.lex_state = 83}, - [469] = {.lex_state = 83}, - [470] = {.lex_state = 83}, - [471] = {.lex_state = 83}, - [472] = {.lex_state = 83}, - [473] = {.lex_state = 83}, - [474] = {.lex_state = 83}, - [475] = {.lex_state = 83}, - [476] = {.lex_state = 83}, - [477] = {.lex_state = 83}, - [478] = {.lex_state = 83}, - [479] = {.lex_state = 83}, - [480] = {.lex_state = 83}, - [481] = {.lex_state = 83}, - [482] = {.lex_state = 83}, - [483] = {.lex_state = 83}, - [484] = {.lex_state = 83}, - [485] = {.lex_state = 83}, - [486] = {.lex_state = 83}, - [487] = {.lex_state = 83}, - [488] = {.lex_state = 32}, - [489] = {.lex_state = 83}, - [490] = {.lex_state = 83}, - [491] = {.lex_state = 83}, - [492] = {.lex_state = 83}, - [493] = {.lex_state = 83}, - [494] = {.lex_state = 83}, - [495] = {.lex_state = 83}, - [496] = {.lex_state = 83}, - [497] = {.lex_state = 83}, - [498] = {.lex_state = 83}, - [499] = {.lex_state = 83}, - [500] = {.lex_state = 83}, - [501] = {.lex_state = 83}, - [502] = {.lex_state = 83}, - [503] = {.lex_state = 83}, - [504] = {.lex_state = 83}, - [505] = {.lex_state = 83}, - [506] = {.lex_state = 32}, - [507] = {.lex_state = 83}, - [508] = {.lex_state = 83}, - [509] = {.lex_state = 83}, - [510] = {.lex_state = 83}, - [511] = {.lex_state = 83}, - [512] = {.lex_state = 83}, - [513] = {.lex_state = 32}, - [514] = {.lex_state = 83}, - [515] = {.lex_state = 83}, - [516] = {.lex_state = 32}, - [517] = {.lex_state = 83}, - [518] = {.lex_state = 83}, - [519] = {.lex_state = 32}, - [520] = {.lex_state = 83}, - [521] = {.lex_state = 83}, - [522] = {.lex_state = 32}, - [523] = {.lex_state = 34}, - [524] = {.lex_state = 32}, - [525] = {.lex_state = 83}, - [526] = {.lex_state = 83}, - [527] = {.lex_state = 32}, - [528] = {.lex_state = 83}, - [529] = {.lex_state = 32}, - [530] = {.lex_state = 83}, - [531] = {.lex_state = 83}, - [532] = {.lex_state = 83}, - [533] = {.lex_state = 83}, - [534] = {.lex_state = 83}, - [535] = {.lex_state = 32}, - [536] = {.lex_state = 83}, - [537] = {.lex_state = 83}, - [538] = {.lex_state = 83}, - [539] = {.lex_state = 83}, - [540] = {.lex_state = 83}, - [541] = {.lex_state = 83}, - [542] = {.lex_state = 83}, - [543] = {.lex_state = 83}, - [544] = {.lex_state = 83}, - [545] = {.lex_state = 32}, - [546] = {.lex_state = 32}, - [547] = {.lex_state = 32}, - [548] = {.lex_state = 83}, - [549] = {.lex_state = 34}, - [550] = {.lex_state = 83}, - [551] = {.lex_state = 32}, - [552] = {.lex_state = 83}, - [553] = {.lex_state = 83}, - [554] = {.lex_state = 83}, - [555] = {.lex_state = 83}, - [556] = {.lex_state = 83}, - [557] = {.lex_state = 83}, - [558] = {.lex_state = 83}, - [559] = {.lex_state = 83}, - [560] = {.lex_state = 83}, - [561] = {.lex_state = 83}, - [562] = {.lex_state = 83}, - [563] = {.lex_state = 83}, - [564] = {.lex_state = 83}, - [565] = {.lex_state = 83}, - [566] = {.lex_state = 83}, - [567] = {.lex_state = 83}, - [568] = {.lex_state = 83}, - [569] = {.lex_state = 83}, - [570] = {.lex_state = 32}, - [571] = {.lex_state = 83}, - [572] = {.lex_state = 83}, - [573] = {.lex_state = 83}, - [574] = {.lex_state = 83}, - [575] = {.lex_state = 83}, - [576] = {.lex_state = 83}, - [577] = {.lex_state = 83}, - [578] = {.lex_state = 83}, - [579] = {.lex_state = 83}, - [580] = {.lex_state = 32}, - [581] = {.lex_state = 34}, - [582] = {.lex_state = 32}, - [583] = {.lex_state = 32}, - [584] = {.lex_state = 83}, - [585] = {.lex_state = 32}, - [586] = {.lex_state = 32}, - [587] = {.lex_state = 83}, - [588] = {.lex_state = 83}, - [589] = {.lex_state = 83}, - [590] = {.lex_state = 83}, - [591] = {.lex_state = 83}, - [592] = {.lex_state = 83}, - [593] = {.lex_state = 83}, - [594] = {.lex_state = 32}, - [595] = {.lex_state = 32}, - [596] = {.lex_state = 32}, - [597] = {.lex_state = 32}, - [598] = {.lex_state = 32}, - [599] = {.lex_state = 32}, - [600] = {.lex_state = 32}, - [601] = {.lex_state = 32}, - [602] = {.lex_state = 83}, - [603] = {.lex_state = 83}, - [604] = {.lex_state = 32}, - [605] = {.lex_state = 32}, - [606] = {.lex_state = 32}, - [607] = {.lex_state = 83}, - [608] = {.lex_state = 83}, - [609] = {.lex_state = 32}, - [610] = {.lex_state = 33}, - [611] = {.lex_state = 83}, - [612] = {.lex_state = 32}, - [613] = {.lex_state = 83}, - [614] = {.lex_state = 83}, - [615] = {.lex_state = 32}, - [616] = {.lex_state = 32}, - [617] = {.lex_state = 32}, - [618] = {.lex_state = 33}, - [619] = {.lex_state = 32}, - [620] = {.lex_state = 32}, - [621] = {.lex_state = 32}, - [622] = {.lex_state = 32}, - [623] = {.lex_state = 32}, - [624] = {.lex_state = 32}, - [625] = {.lex_state = 32}, - [626] = {.lex_state = 32}, - [627] = {.lex_state = 32}, - [628] = {.lex_state = 32}, - [629] = {.lex_state = 32}, - [630] = {.lex_state = 32}, - [631] = {.lex_state = 32}, - [632] = {.lex_state = 32}, - [633] = {.lex_state = 32}, - [634] = {.lex_state = 32}, - [635] = {.lex_state = 32}, - [636] = {.lex_state = 32}, - [637] = {.lex_state = 32}, - [638] = {.lex_state = 32}, - [639] = {.lex_state = 32}, - [640] = {.lex_state = 33}, - [641] = {.lex_state = 33}, - [642] = {.lex_state = 33}, - [643] = {.lex_state = 33}, - [644] = {.lex_state = 33}, - [645] = {.lex_state = 33}, - [646] = {.lex_state = 33}, - [647] = {.lex_state = 83}, - [648] = {.lex_state = 32}, - [649] = {.lex_state = 32}, - [650] = {.lex_state = 32}, - [651] = {.lex_state = 32}, - [652] = {.lex_state = 32}, - [653] = {.lex_state = 32}, - [654] = {.lex_state = 32}, - [655] = {.lex_state = 32}, - [656] = {.lex_state = 32}, - [657] = {.lex_state = 32}, - [658] = {.lex_state = 32}, - [659] = {.lex_state = 32}, - [660] = {.lex_state = 33}, - [661] = {.lex_state = 33}, - [662] = {.lex_state = 83}, - [663] = {.lex_state = 33}, - [664] = {.lex_state = 32}, - [665] = {.lex_state = 33}, - [666] = {.lex_state = 33}, - [667] = {.lex_state = 33}, - [668] = {.lex_state = 33}, - [669] = {.lex_state = 33}, - [670] = {.lex_state = 33}, - [671] = {.lex_state = 33}, - [672] = {.lex_state = 33}, - [673] = {.lex_state = 33}, - [674] = {.lex_state = 33}, - [675] = {.lex_state = 33}, - [676] = {.lex_state = 33}, - [677] = {.lex_state = 33}, - [678] = {.lex_state = 32}, - [679] = {.lex_state = 33}, - [680] = {.lex_state = 33}, - [681] = {.lex_state = 33}, - [682] = {.lex_state = 33}, - [683] = {.lex_state = 33}, - [684] = {.lex_state = 33}, - [685] = {.lex_state = 33}, - [686] = {.lex_state = 33}, - [687] = {.lex_state = 33}, - [688] = {.lex_state = 33}, - [689] = {.lex_state = 32}, - [690] = {.lex_state = 32}, - [691] = {.lex_state = 32}, - [692] = {.lex_state = 33}, - [693] = {.lex_state = 32}, - [694] = {.lex_state = 32}, - [695] = {.lex_state = 32}, - [696] = {.lex_state = 32}, - [697] = {.lex_state = 32}, - [698] = {.lex_state = 32}, - [699] = {.lex_state = 32}, - [700] = {.lex_state = 32}, - [701] = {.lex_state = 32}, - [702] = {.lex_state = 32}, - [703] = {.lex_state = 32}, - [704] = {.lex_state = 32}, - [705] = {.lex_state = 32}, - [706] = {.lex_state = 32}, - [707] = {.lex_state = 33}, - [708] = {.lex_state = 32}, - [709] = {.lex_state = 32}, - [710] = {.lex_state = 32}, - [711] = {.lex_state = 32}, - [712] = {.lex_state = 33}, - [713] = {.lex_state = 32}, - [714] = {.lex_state = 32}, - [715] = {.lex_state = 32}, - [716] = {.lex_state = 32}, - [717] = {.lex_state = 32}, - [718] = {.lex_state = 32}, - [719] = {.lex_state = 32}, - [720] = {.lex_state = 32}, - [721] = {.lex_state = 32}, - [722] = {.lex_state = 32}, - [723] = {.lex_state = 32}, - [724] = {.lex_state = 32}, - [725] = {.lex_state = 32}, - [726] = {.lex_state = 32}, - [727] = {.lex_state = 32}, - [728] = {.lex_state = 32}, - [729] = {.lex_state = 32}, - [730] = {.lex_state = 33}, - [731] = {.lex_state = 32}, - [732] = {.lex_state = 32}, - [733] = {.lex_state = 32}, - [734] = {.lex_state = 32}, - [735] = {.lex_state = 32}, - [736] = {.lex_state = 32}, - [737] = {.lex_state = 32}, - [738] = {.lex_state = 32}, - [739] = {.lex_state = 32}, - [740] = {.lex_state = 32}, - [741] = {.lex_state = 32}, - [742] = {.lex_state = 32}, - [743] = {.lex_state = 33}, - [744] = {.lex_state = 32}, - [745] = {.lex_state = 32}, - [746] = {.lex_state = 32}, - [747] = {.lex_state = 32}, - [748] = {.lex_state = 32}, - [749] = {.lex_state = 32}, - [750] = {.lex_state = 33}, - [751] = {.lex_state = 32}, - [752] = {.lex_state = 32}, - [753] = {.lex_state = 32}, - [754] = {.lex_state = 32}, - [755] = {.lex_state = 32}, - [756] = {.lex_state = 32}, - [757] = {.lex_state = 32}, - [758] = {.lex_state = 33}, - [759] = {.lex_state = 32}, - [760] = {.lex_state = 32}, - [761] = {.lex_state = 32}, - [762] = {.lex_state = 32}, - [763] = {.lex_state = 31}, - [764] = {.lex_state = 34}, - [765] = {.lex_state = 34}, - [766] = {.lex_state = 34}, - [767] = {.lex_state = 34}, - [768] = {.lex_state = 34}, - [769] = {.lex_state = 34}, - [770] = {.lex_state = 32}, - [771] = {.lex_state = 32}, - [772] = {.lex_state = 32}, - [773] = {.lex_state = 32}, - [774] = {.lex_state = 32}, - [775] = {.lex_state = 32}, - [776] = {.lex_state = 32}, - [777] = {.lex_state = 32}, - [778] = {.lex_state = 32}, - [779] = {.lex_state = 32}, - [780] = {.lex_state = 32}, - [781] = {.lex_state = 32}, - [782] = {.lex_state = 34}, - [783] = {.lex_state = 32}, - [784] = {.lex_state = 31}, - [785] = {.lex_state = 32}, - [786] = {.lex_state = 32}, - [787] = {.lex_state = 31}, - [788] = {.lex_state = 32}, - [789] = {.lex_state = 34}, - [790] = {.lex_state = 34}, - [791] = {.lex_state = 34}, - [792] = {.lex_state = 32}, - [793] = {.lex_state = 34}, - [794] = {.lex_state = 32}, - [795] = {.lex_state = 34}, - [796] = {.lex_state = 32}, - [797] = {.lex_state = 32}, - [798] = {.lex_state = 32}, - [799] = {.lex_state = 34}, - [800] = {.lex_state = 34}, - [801] = {.lex_state = 32}, - [802] = {.lex_state = 32}, - [803] = {.lex_state = 32}, - [804] = {.lex_state = 32}, - [805] = {.lex_state = 32}, - [806] = {.lex_state = 32}, - [807] = {.lex_state = 32}, - [808] = {.lex_state = 32}, - [809] = {.lex_state = 32}, - [810] = {.lex_state = 32}, - [811] = {.lex_state = 32}, - [812] = {.lex_state = 32}, - [813] = {.lex_state = 34}, - [814] = {.lex_state = 32}, - [815] = {.lex_state = 31}, - [816] = {.lex_state = 34}, - [817] = {.lex_state = 32}, - [818] = {.lex_state = 33}, - [819] = {.lex_state = 34}, - [820] = {.lex_state = 32}, - [821] = {.lex_state = 34}, - [822] = {.lex_state = 32}, - [823] = {.lex_state = 34}, - [824] = {.lex_state = 32}, - [825] = {.lex_state = 32}, - [826] = {.lex_state = 32}, - [827] = {.lex_state = 32}, - [828] = {.lex_state = 32}, - [829] = {.lex_state = 34}, - [830] = {.lex_state = 32}, - [831] = {.lex_state = 33}, - [832] = {.lex_state = 33}, - [833] = {.lex_state = 33}, - [834] = {.lex_state = 33}, - [835] = {.lex_state = 33}, - [836] = {.lex_state = 33}, - [837] = {.lex_state = 33}, - [838] = {.lex_state = 33}, - [839] = {.lex_state = 33}, - [840] = {.lex_state = 33}, - [841] = {.lex_state = 33}, - [842] = {.lex_state = 33}, - [843] = {.lex_state = 33}, - [844] = {.lex_state = 33}, - [845] = {.lex_state = 33}, - [846] = {.lex_state = 33}, - [847] = {.lex_state = 33}, - [848] = {.lex_state = 33}, - [849] = {.lex_state = 33}, - [850] = {.lex_state = 33}, - [851] = {.lex_state = 33}, - [852] = {.lex_state = 33}, - [853] = {.lex_state = 33}, - [854] = {.lex_state = 33}, - [855] = {.lex_state = 33}, - [856] = {.lex_state = 33}, - [857] = {.lex_state = 33}, - [858] = {.lex_state = 33}, - [859] = {.lex_state = 33}, - [860] = {.lex_state = 33}, - [861] = {.lex_state = 33}, - [862] = {.lex_state = 33}, - [863] = {.lex_state = 33}, - [864] = {.lex_state = 33}, - [865] = {.lex_state = 33}, - [866] = {.lex_state = 33}, - [867] = {.lex_state = 33}, - [868] = {.lex_state = 33}, - [869] = {.lex_state = 33}, - [870] = {.lex_state = 33}, - [871] = {.lex_state = 33}, - [872] = {.lex_state = 33}, - [873] = {.lex_state = 33}, - [874] = {.lex_state = 33}, - [875] = {.lex_state = 33}, - [876] = {.lex_state = 30}, - [877] = {.lex_state = 19}, - [878] = {.lex_state = 33}, - [879] = {.lex_state = 33}, - [880] = {.lex_state = 33}, - [881] = {.lex_state = 33}, - [882] = {.lex_state = 33}, - [883] = {.lex_state = 33}, - [884] = {.lex_state = 33}, - [885] = {.lex_state = 33}, - [886] = {.lex_state = 33}, - [887] = {.lex_state = 33}, - [888] = {.lex_state = 30}, - [889] = {.lex_state = 33}, - [890] = {.lex_state = 33}, - [891] = {.lex_state = 33}, - [892] = {.lex_state = 33}, - [893] = {.lex_state = 33}, - [894] = {.lex_state = 30}, - [895] = {.lex_state = 33}, - [896] = {.lex_state = 33}, - [897] = {.lex_state = 33}, - [898] = {.lex_state = 33}, - [899] = {.lex_state = 33}, - [900] = {.lex_state = 33}, - [901] = {.lex_state = 33}, - [902] = {.lex_state = 30}, - [903] = {.lex_state = 33}, - [904] = {.lex_state = 33}, - [905] = {.lex_state = 30}, - [906] = {.lex_state = 33}, - [907] = {.lex_state = 30}, - [908] = {.lex_state = 33}, - [909] = {.lex_state = 30}, - [910] = {.lex_state = 30}, - [911] = {.lex_state = 30}, - [912] = {.lex_state = 30}, - [913] = {.lex_state = 30}, - [914] = {.lex_state = 33}, - [915] = {.lex_state = 30}, - [916] = {.lex_state = 30}, - [917] = {.lex_state = 30}, - [918] = {.lex_state = 30}, - [919] = {.lex_state = 30}, - [920] = {.lex_state = 30}, - [921] = {.lex_state = 33}, - [922] = {.lex_state = 33}, - [923] = {.lex_state = 30}, - [924] = {.lex_state = 30}, - [925] = {.lex_state = 30}, - [926] = {.lex_state = 33}, - [927] = {.lex_state = 30}, - [928] = {.lex_state = 30}, - [929] = {.lex_state = 33}, - [930] = {.lex_state = 30}, - [931] = {.lex_state = 30}, - [932] = {.lex_state = 30}, - [933] = {.lex_state = 30}, - [934] = {.lex_state = 33}, - [935] = {.lex_state = 30}, - [936] = {.lex_state = 30}, - [937] = {.lex_state = 30}, - [938] = {.lex_state = 33}, - [939] = {.lex_state = 30}, - [940] = {.lex_state = 30}, - [941] = {.lex_state = 30}, - [942] = {.lex_state = 30}, - [943] = {.lex_state = 30}, - [944] = {.lex_state = 30}, - [945] = {.lex_state = 30}, - [946] = {.lex_state = 33}, - [947] = {.lex_state = 33}, - [948] = {.lex_state = 19}, - [949] = {.lex_state = 19}, - [950] = {.lex_state = 19}, - [951] = {.lex_state = 19}, - [952] = {.lex_state = 19}, - [953] = {.lex_state = 19}, - [954] = {.lex_state = 19}, - [955] = {.lex_state = 19}, - [956] = {.lex_state = 19}, - [957] = {.lex_state = 19}, - [958] = {.lex_state = 19}, - [959] = {.lex_state = 19}, - [960] = {.lex_state = 19}, - [961] = {.lex_state = 33}, - [962] = {.lex_state = 19}, - [963] = {.lex_state = 19}, - [964] = {.lex_state = 33}, - [965] = {.lex_state = 19}, - [966] = {.lex_state = 19}, - [967] = {.lex_state = 19}, - [968] = {.lex_state = 19}, - [969] = {.lex_state = 19}, - [970] = {.lex_state = 19}, - [971] = {.lex_state = 19}, - [972] = {.lex_state = 19}, - [973] = {.lex_state = 19}, - [974] = {.lex_state = 19}, - [975] = {.lex_state = 19}, - [976] = {.lex_state = 19}, - [977] = {.lex_state = 19}, - [978] = {.lex_state = 33}, - [979] = {.lex_state = 33}, - [980] = {.lex_state = 33}, - [981] = {.lex_state = 33}, - [982] = {.lex_state = 33}, - [983] = {.lex_state = 33}, - [984] = {.lex_state = 33}, - [985] = {.lex_state = 33}, - [986] = {.lex_state = 33}, - [987] = {.lex_state = 33}, - [988] = {.lex_state = 33}, - [989] = {.lex_state = 33}, - [990] = {.lex_state = 33}, - [991] = {.lex_state = 33}, - [992] = {.lex_state = 33}, - [993] = {.lex_state = 33}, - [994] = {.lex_state = 33}, - [995] = {.lex_state = 33}, - [996] = {.lex_state = 33}, - [997] = {.lex_state = 33}, - [998] = {.lex_state = 33}, - [999] = {.lex_state = 33}, - [1000] = {.lex_state = 83}, - [1001] = {.lex_state = 83}, - [1002] = {.lex_state = 83}, - [1003] = {.lex_state = 33}, - [1004] = {.lex_state = 33}, - [1005] = {.lex_state = 33}, - [1006] = {.lex_state = 33}, - [1007] = {.lex_state = 33}, - [1008] = {.lex_state = 33}, - [1009] = {.lex_state = 83}, - [1010] = {.lex_state = 33}, - [1011] = {.lex_state = 33}, - [1012] = {.lex_state = 33}, - [1013] = {.lex_state = 33}, - [1014] = {.lex_state = 33}, - [1015] = {.lex_state = 83}, - [1016] = {.lex_state = 83}, - [1017] = {.lex_state = 83}, - [1018] = {.lex_state = 33}, - [1019] = {.lex_state = 33}, - [1020] = {.lex_state = 83}, - [1021] = {.lex_state = 33}, - [1022] = {.lex_state = 33}, - [1023] = {.lex_state = 33}, - [1024] = {.lex_state = 33}, - [1025] = {.lex_state = 83}, - [1026] = {.lex_state = 33}, - [1027] = {.lex_state = 33}, - [1028] = {.lex_state = 83}, - [1029] = {.lex_state = 33}, - [1030] = {.lex_state = 33}, - [1031] = {.lex_state = 33}, - [1032] = {.lex_state = 33}, - [1033] = {.lex_state = 33}, - [1034] = {.lex_state = 33}, - [1035] = {.lex_state = 33}, - [1036] = {.lex_state = 33}, - [1037] = {.lex_state = 33}, - [1038] = {.lex_state = 33}, - [1039] = {.lex_state = 83}, - [1040] = {.lex_state = 83}, - [1041] = {.lex_state = 83}, - [1042] = {.lex_state = 83}, - [1043] = {.lex_state = 83}, - [1044] = {.lex_state = 83}, - [1045] = {.lex_state = 83}, - [1046] = {.lex_state = 83}, - [1047] = {.lex_state = 83}, - [1048] = {.lex_state = 83}, - [1049] = {.lex_state = 33}, - [1050] = {.lex_state = 33}, - [1051] = {.lex_state = 33}, - [1052] = {.lex_state = 83}, - [1053] = {.lex_state = 83}, - [1054] = {.lex_state = 83}, - [1055] = {.lex_state = 83}, - [1056] = {.lex_state = 83}, - [1057] = {.lex_state = 83}, - [1058] = {.lex_state = 83}, - [1059] = {.lex_state = 83}, - [1060] = {.lex_state = 83}, - [1061] = {.lex_state = 83}, - [1062] = {.lex_state = 35}, - [1063] = {.lex_state = 35}, - [1064] = {.lex_state = 35}, - [1065] = {.lex_state = 83}, - [1066] = {.lex_state = 83}, - [1067] = {.lex_state = 83}, - [1068] = {.lex_state = 83}, - [1069] = {.lex_state = 83}, - [1070] = {.lex_state = 83}, - [1071] = {.lex_state = 35}, - [1072] = {.lex_state = 83}, - [1073] = {.lex_state = 83}, - [1074] = {.lex_state = 83}, - [1075] = {.lex_state = 83}, - [1076] = {.lex_state = 83}, - [1077] = {.lex_state = 83}, - [1078] = {.lex_state = 83}, - [1079] = {.lex_state = 83}, - [1080] = {.lex_state = 83}, - [1081] = {.lex_state = 83}, - [1082] = {.lex_state = 83}, - [1083] = {.lex_state = 83}, - [1084] = {.lex_state = 83}, - [1085] = {.lex_state = 83}, - [1086] = {.lex_state = 83}, - [1087] = {.lex_state = 83}, - [1088] = {.lex_state = 83}, - [1089] = {.lex_state = 83}, - [1090] = {.lex_state = 83}, - [1091] = {.lex_state = 83}, - [1092] = {.lex_state = 83}, - [1093] = {.lex_state = 83}, - [1094] = {.lex_state = 83}, - [1095] = {.lex_state = 83}, - [1096] = {.lex_state = 83}, - [1097] = {.lex_state = 83}, - [1098] = {.lex_state = 83}, - [1099] = {.lex_state = 83}, - [1100] = {.lex_state = 83}, - [1101] = {.lex_state = 83}, - [1102] = {.lex_state = 83}, - [1103] = {.lex_state = 83}, - [1104] = {.lex_state = 83}, - [1105] = {.lex_state = 83}, - [1106] = {.lex_state = 83}, - [1107] = {.lex_state = 83}, - [1108] = {.lex_state = 83}, - [1109] = {.lex_state = 83}, - [1110] = {.lex_state = 28}, - [1111] = {.lex_state = 83}, - [1112] = {.lex_state = 33}, - [1113] = {.lex_state = 83}, - [1114] = {.lex_state = 33}, - [1115] = {.lex_state = 22}, - [1116] = {.lex_state = 83}, - [1117] = {.lex_state = 22}, - [1118] = {.lex_state = 24}, - [1119] = {.lex_state = 83}, - [1120] = {.lex_state = 83}, - [1121] = {.lex_state = 83}, - [1122] = {.lex_state = 24}, - [1123] = {.lex_state = 83}, - [1124] = {.lex_state = 83}, - [1125] = {.lex_state = 28}, - [1126] = {.lex_state = 83}, - [1127] = {.lex_state = 83}, - [1128] = {.lex_state = 83}, - [1129] = {.lex_state = 22}, - [1130] = {.lex_state = 22}, - [1131] = {.lex_state = 83}, - [1132] = {.lex_state = 22}, - [1133] = {.lex_state = 24}, - [1134] = {.lex_state = 83}, - [1135] = {.lex_state = 22}, - [1136] = {.lex_state = 83}, - [1137] = {.lex_state = 24}, - [1138] = {.lex_state = 83}, - [1139] = {.lex_state = 83}, - [1140] = {.lex_state = 24}, - [1141] = {.lex_state = 83}, - [1142] = {.lex_state = 83}, - [1143] = {.lex_state = 24}, - [1144] = {.lex_state = 83}, - [1145] = {.lex_state = 24}, - [1146] = {.lex_state = 33}, - [1147] = {.lex_state = 83}, - [1148] = {.lex_state = 22}, - [1149] = {.lex_state = 0}, - [1150] = {.lex_state = 0}, - [1151] = {.lex_state = 28}, - [1152] = {.lex_state = 0}, - [1153] = {.lex_state = 0}, - [1154] = {.lex_state = 0}, - [1155] = {.lex_state = 0}, - [1156] = {.lex_state = 33}, - [1157] = {.lex_state = 0}, - [1158] = {.lex_state = 0}, - [1159] = {.lex_state = 0}, - [1160] = {.lex_state = 0}, - [1161] = {.lex_state = 33}, - [1162] = {.lex_state = 0}, - [1163] = {.lex_state = 19}, - [1164] = {.lex_state = 0}, - [1165] = {.lex_state = 19}, - [1166] = {.lex_state = 0}, - [1167] = {.lex_state = 0}, - [1168] = {.lex_state = 28}, - [1169] = {.lex_state = 0}, - [1170] = {.lex_state = 0}, - [1171] = {.lex_state = 19}, - [1172] = {.lex_state = 28}, - [1173] = {.lex_state = 0}, - [1174] = {.lex_state = 33}, - [1175] = {.lex_state = 33}, - [1176] = {.lex_state = 0}, - [1177] = {.lex_state = 0}, - [1178] = {.lex_state = 0}, - [1179] = {.lex_state = 0}, - [1180] = {.lex_state = 19}, - [1181] = {.lex_state = 0}, - [1182] = {.lex_state = 0}, - [1183] = {.lex_state = 28}, - [1184] = {.lex_state = 0}, - [1185] = {.lex_state = 83}, - [1186] = {.lex_state = 0}, - [1187] = {.lex_state = 0}, - [1188] = {.lex_state = 0}, - [1189] = {.lex_state = 0}, - [1190] = {.lex_state = 33}, - [1191] = {.lex_state = 0}, - [1192] = {.lex_state = 0}, - [1193] = {.lex_state = 0}, - [1194] = {.lex_state = 33}, - [1195] = {.lex_state = 28}, - [1196] = {.lex_state = 28}, - [1197] = {.lex_state = 0}, - [1198] = {.lex_state = 0}, - [1199] = {.lex_state = 0}, - [1200] = {.lex_state = 0}, - [1201] = {.lex_state = 0}, - [1202] = {.lex_state = 0}, - [1203] = {.lex_state = 28}, - [1204] = {.lex_state = 0}, - [1205] = {.lex_state = 0}, - [1206] = {.lex_state = 0}, - [1207] = {.lex_state = 83}, - [1208] = {.lex_state = 0}, - [1209] = {.lex_state = 23}, - [1210] = {.lex_state = 83}, - [1211] = {.lex_state = 0}, - [1212] = {.lex_state = 23}, - [1213] = {.lex_state = 23}, - [1214] = {.lex_state = 33}, - [1215] = {.lex_state = 23}, - [1216] = {.lex_state = 83}, - [1217] = {.lex_state = 0}, - [1218] = {.lex_state = 83}, - [1219] = {.lex_state = 33}, - [1220] = {.lex_state = 28}, - [1221] = {.lex_state = 83}, - [1222] = {.lex_state = 26}, - [1223] = {.lex_state = 23}, - [1224] = {.lex_state = 0}, - [1225] = {.lex_state = 83}, - [1226] = {.lex_state = 33}, - [1227] = {.lex_state = 83}, - [1228] = {.lex_state = 28}, - [1229] = {.lex_state = 0}, - [1230] = {.lex_state = 83}, - [1231] = {.lex_state = 23}, - [1232] = {.lex_state = 0}, - [1233] = {.lex_state = 0}, - [1234] = {.lex_state = 83}, - [1235] = {.lex_state = 0}, - [1236] = {.lex_state = 0}, - [1237] = {.lex_state = 33}, - [1238] = {.lex_state = 83}, - [1239] = {.lex_state = 23}, - [1240] = {.lex_state = 0}, - [1241] = {.lex_state = 26}, - [1242] = {.lex_state = 0}, - [1243] = {.lex_state = 23}, - [1244] = {.lex_state = 83}, - [1245] = {.lex_state = 0}, - [1246] = {.lex_state = 33}, - [1247] = {.lex_state = 23}, - [1248] = {.lex_state = 33}, - [1249] = {.lex_state = 83}, - [1250] = {.lex_state = 23}, - [1251] = {.lex_state = 23}, - [1252] = {.lex_state = 0}, - [1253] = {.lex_state = 23}, - [1254] = {.lex_state = 23}, - [1255] = {.lex_state = 23}, - [1256] = {.lex_state = 33}, - [1257] = {.lex_state = 26}, - [1258] = {.lex_state = 83}, - [1259] = {.lex_state = 83}, - [1260] = {.lex_state = 0}, - [1261] = {.lex_state = 23}, - [1262] = {.lex_state = 23}, - [1263] = {.lex_state = 28}, - [1264] = {.lex_state = 83}, - [1265] = {.lex_state = 83}, - [1266] = {.lex_state = 83}, - [1267] = {.lex_state = 83}, - [1268] = {.lex_state = 33}, - [1269] = {.lex_state = 83}, - [1270] = {.lex_state = 23}, - [1271] = {.lex_state = 33}, - [1272] = {.lex_state = 0}, - [1273] = {.lex_state = 0}, - [1274] = {.lex_state = 27}, - [1275] = {.lex_state = 0}, - [1276] = {.lex_state = 0}, - [1277] = {.lex_state = 0}, - [1278] = {.lex_state = 33}, - [1279] = {.lex_state = 0}, - [1280] = {.lex_state = 0}, - [1281] = {.lex_state = 0}, - [1282] = {.lex_state = 0}, - [1283] = {.lex_state = 0}, - [1284] = {.lex_state = 0}, - [1285] = {.lex_state = 0}, - [1286] = {.lex_state = 0}, - [1287] = {.lex_state = 27}, - [1288] = {.lex_state = 0}, - [1289] = {.lex_state = 27}, - [1290] = {.lex_state = 27}, - [1291] = {.lex_state = 19}, - [1292] = {.lex_state = 19}, - [1293] = {.lex_state = 27}, - [1294] = {.lex_state = 19}, - [1295] = {.lex_state = 19}, - [1296] = {.lex_state = 0}, - [1297] = {.lex_state = 19}, - [1298] = {.lex_state = 19}, - [1299] = {.lex_state = 27}, - [1300] = {.lex_state = 19}, - [1301] = {.lex_state = 19}, - [1302] = {.lex_state = 27}, - [1303] = {.lex_state = 19}, - [1304] = {.lex_state = 19}, - [1305] = {.lex_state = 0}, - [1306] = {.lex_state = 19}, - [1307] = {.lex_state = 0}, - [1308] = {.lex_state = 19}, - [1309] = {.lex_state = 33}, - [1310] = {.lex_state = 19}, - [1311] = {.lex_state = 27}, - [1312] = {.lex_state = 0}, - [1313] = {.lex_state = 0}, - [1314] = {.lex_state = 0}, - [1315] = {.lex_state = 33}, - [1316] = {.lex_state = 0}, - [1317] = {.lex_state = 0}, - [1318] = {.lex_state = 19}, - [1319] = {.lex_state = 19}, - [1320] = {.lex_state = 19}, - [1321] = {.lex_state = 0}, - [1322] = {.lex_state = 0}, - [1323] = {.lex_state = 0}, - [1324] = {.lex_state = 0}, - [1325] = {.lex_state = 0}, - [1326] = {.lex_state = 0}, - [1327] = {.lex_state = 0}, - [1328] = {.lex_state = 0}, - [1329] = {.lex_state = 0}, - [1330] = {.lex_state = 0}, - [1331] = {.lex_state = 27}, - [1332] = {.lex_state = 83}, - [1333] = {.lex_state = 0}, - [1334] = {.lex_state = 0}, - [1335] = {.lex_state = 0}, - [1336] = {.lex_state = 27}, - [1337] = {.lex_state = 0}, - [1338] = {.lex_state = 27}, - [1339] = {.lex_state = 33}, - [1340] = {.lex_state = 27}, - [1341] = {.lex_state = 0}, - [1342] = {.lex_state = 33}, - [1343] = {.lex_state = 0}, - [1344] = {.lex_state = 0}, - [1345] = {.lex_state = 0}, - [1346] = {.lex_state = 0}, - [1347] = {.lex_state = 0}, - [1348] = {.lex_state = 0}, - [1349] = {.lex_state = 0}, - [1350] = {.lex_state = 0}, - [1351] = {.lex_state = 0}, - [1352] = {.lex_state = 27}, - [1353] = {.lex_state = 27}, - [1354] = {.lex_state = 0}, - [1355] = {.lex_state = 0}, - [1356] = {.lex_state = 19}, - [1357] = {.lex_state = 27}, - [1358] = {.lex_state = 27}, - [1359] = {.lex_state = 0}, - [1360] = {.lex_state = 0}, - [1361] = {.lex_state = 33}, - [1362] = {.lex_state = 0}, - [1363] = {.lex_state = 27}, - [1364] = {.lex_state = 0}, - [1365] = {.lex_state = 19}, - [1366] = {.lex_state = 0}, - [1367] = {.lex_state = 0}, - [1368] = {.lex_state = 0}, - [1369] = {.lex_state = 33}, - [1370] = {.lex_state = 27}, - [1371] = {.lex_state = 33}, - [1372] = {.lex_state = 33}, - [1373] = {.lex_state = 27}, - [1374] = {.lex_state = 0}, - [1375] = {.lex_state = 27}, - [1376] = {.lex_state = 0}, - [1377] = {.lex_state = 0}, - [1378] = {.lex_state = 33}, - [1379] = {.lex_state = 0}, - [1380] = {.lex_state = 0}, - [1381] = {.lex_state = 0}, - [1382] = {.lex_state = 0}, - [1383] = {.lex_state = 33}, - [1384] = {.lex_state = 0}, - [1385] = {.lex_state = 0}, - [1386] = {.lex_state = 0}, - [1387] = {.lex_state = 33}, - [1388] = {.lex_state = 0}, - [1389] = {.lex_state = 0}, - [1390] = {.lex_state = 0}, - [1391] = {.lex_state = 27}, - [1392] = {.lex_state = 27}, - [1393] = {.lex_state = 0}, - [1394] = {.lex_state = 27}, - [1395] = {.lex_state = 0}, - [1396] = {.lex_state = 33}, - [1397] = {.lex_state = 27}, - [1398] = {.lex_state = 0}, - [1399] = {.lex_state = 19}, - [1400] = {.lex_state = 33}, - [1401] = {.lex_state = 33}, - [1402] = {.lex_state = 27}, - [1403] = {.lex_state = 27}, - [1404] = {.lex_state = 33}, - [1405] = {.lex_state = 33}, - [1406] = {.lex_state = 19}, - [1407] = {.lex_state = 0}, - [1408] = {.lex_state = 0}, - [1409] = {.lex_state = 27}, - [1410] = {.lex_state = 0}, - [1411] = {.lex_state = 27}, - [1412] = {.lex_state = 0}, - [1413] = {.lex_state = 0}, - [1414] = {.lex_state = 33}, - [1415] = {.lex_state = 0}, - [1416] = {.lex_state = 27}, - [1417] = {.lex_state = 0}, - [1418] = {.lex_state = 19}, - [1419] = {.lex_state = 0}, - [1420] = {.lex_state = 0}, - [1421] = {.lex_state = 33}, - [1422] = {.lex_state = 33}, - [1423] = {.lex_state = 33}, - [1424] = {.lex_state = 0}, - [1425] = {.lex_state = 33}, - [1426] = {.lex_state = 0}, - [1427] = {.lex_state = 27}, - [1428] = {.lex_state = 0}, - [1429] = {.lex_state = 0}, - [1430] = {.lex_state = 0}, - [1431] = {.lex_state = 19}, - [1432] = {.lex_state = 0}, - [1433] = {.lex_state = 27}, - [1434] = {.lex_state = 33}, - [1435] = {.lex_state = 27}, - [1436] = {.lex_state = 0}, - [1437] = {.lex_state = 19}, - [1438] = {.lex_state = 0}, - [1439] = {.lex_state = 0}, - [1440] = {.lex_state = 0}, - [1441] = {.lex_state = 19}, - [1442] = {.lex_state = 19}, - [1443] = {.lex_state = 33}, - [1444] = {.lex_state = 0}, - [1445] = {.lex_state = 33}, - [1446] = {.lex_state = 0}, - [1447] = {.lex_state = 83}, - [1448] = {.lex_state = 19}, - [1449] = {.lex_state = 0}, - [1450] = {.lex_state = 83}, - [1451] = {.lex_state = 0}, - [1452] = {.lex_state = 19}, - [1453] = {.lex_state = 83}, - [1454] = {.lex_state = 33}, - [1455] = {.lex_state = 0}, - [1456] = {.lex_state = 0}, - [1457] = {.lex_state = 0}, - [1458] = {.lex_state = 83}, - [1459] = {.lex_state = 0}, - [1460] = {.lex_state = 83}, - [1461] = {.lex_state = 83}, - [1462] = {.lex_state = 83}, - [1463] = {.lex_state = 83}, - [1464] = {.lex_state = 33}, - [1465] = {.lex_state = 83}, -}; - -static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { - [0] = { - [ts_builtin_sym_end] = ACTIONS(1), - [sym_identifier] = ACTIONS(1), - [aux_sym_preproc_include_token1] = ACTIONS(1), - [aux_sym_preproc_def_token1] = ACTIONS(1), - [anon_sym_LPAREN] = ACTIONS(1), - [anon_sym_DOT_DOT_DOT] = ACTIONS(1), - [anon_sym_COMMA] = ACTIONS(1), - [anon_sym_RPAREN] = ACTIONS(1), - [aux_sym_preproc_if_token1] = ACTIONS(1), - [aux_sym_preproc_if_token2] = ACTIONS(1), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1), - [aux_sym_preproc_else_token1] = ACTIONS(1), - [aux_sym_preproc_elif_token1] = ACTIONS(1), - [sym_preproc_directive] = ACTIONS(1), - [anon_sym_LPAREN2] = ACTIONS(1), - [anon_sym_defined] = ACTIONS(1), - [anon_sym_BANG] = ACTIONS(1), - [anon_sym_TILDE] = ACTIONS(1), - [anon_sym_DASH] = ACTIONS(1), - [anon_sym_PLUS] = ACTIONS(1), - [anon_sym_STAR] = ACTIONS(1), - [anon_sym_SLASH] = ACTIONS(1), - [anon_sym_PERCENT] = ACTIONS(1), - [anon_sym_PIPE_PIPE] = ACTIONS(1), - [anon_sym_AMP_AMP] = ACTIONS(1), - [anon_sym_PIPE] = ACTIONS(1), - [anon_sym_CARET] = ACTIONS(1), - [anon_sym_AMP] = ACTIONS(1), - [anon_sym_EQ_EQ] = ACTIONS(1), - [anon_sym_BANG_EQ] = ACTIONS(1), - [anon_sym_GT] = ACTIONS(1), - [anon_sym_GT_EQ] = ACTIONS(1), - [anon_sym_LT_EQ] = ACTIONS(1), - [anon_sym_LT] = ACTIONS(1), - [anon_sym_LT_LT] = ACTIONS(1), - [anon_sym_GT_GT] = ACTIONS(1), - [anon_sym_SEMI] = ACTIONS(1), - [anon_sym_typedef] = ACTIONS(1), - [anon_sym_extern] = ACTIONS(1), - [anon_sym___attribute__] = ACTIONS(1), - [anon_sym_COLON_COLON] = ACTIONS(1), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1), - [anon_sym___declspec] = ACTIONS(1), - [anon_sym___based] = ACTIONS(1), - [anon_sym___cdecl] = ACTIONS(1), - [anon_sym___clrcall] = ACTIONS(1), - [anon_sym___stdcall] = ACTIONS(1), - [anon_sym___fastcall] = ACTIONS(1), - [anon_sym___thiscall] = ACTIONS(1), - [anon_sym___vectorcall] = ACTIONS(1), - [sym_ms_restrict_modifier] = ACTIONS(1), - [sym_ms_unsigned_ptr_modifier] = ACTIONS(1), - [sym_ms_signed_ptr_modifier] = ACTIONS(1), - [anon_sym__unaligned] = ACTIONS(1), - [anon_sym___unaligned] = ACTIONS(1), - [anon_sym_LBRACE] = ACTIONS(1), - [anon_sym_RBRACE] = ACTIONS(1), - [anon_sym_LBRACK] = ACTIONS(1), - [anon_sym_RBRACK] = ACTIONS(1), - [anon_sym_EQ] = ACTIONS(1), - [anon_sym_static] = ACTIONS(1), - [anon_sym_auto] = ACTIONS(1), - [anon_sym_register] = ACTIONS(1), - [anon_sym_inline] = ACTIONS(1), - [anon_sym_const] = ACTIONS(1), - [anon_sym_volatile] = ACTIONS(1), - [anon_sym_restrict] = ACTIONS(1), - [anon_sym__Atomic] = ACTIONS(1), - [anon_sym_signed] = ACTIONS(1), - [anon_sym_unsigned] = ACTIONS(1), - [anon_sym_long] = ACTIONS(1), - [anon_sym_short] = ACTIONS(1), - [sym_primitive_type] = ACTIONS(1), - [anon_sym_enum] = ACTIONS(1), - [anon_sym_struct] = ACTIONS(1), - [anon_sym_union] = ACTIONS(1), - [anon_sym_COLON] = ACTIONS(1), - [anon_sym_if] = ACTIONS(1), - [anon_sym_else] = ACTIONS(1), - [anon_sym_switch] = ACTIONS(1), - [anon_sym_case] = ACTIONS(1), - [anon_sym_default] = ACTIONS(1), - [anon_sym_while] = ACTIONS(1), - [anon_sym_do] = ACTIONS(1), - [anon_sym_for] = ACTIONS(1), - [anon_sym_return] = ACTIONS(1), - [anon_sym_break] = ACTIONS(1), - [anon_sym_continue] = ACTIONS(1), - [anon_sym_goto] = ACTIONS(1), - [anon_sym_QMARK] = ACTIONS(1), - [anon_sym_STAR_EQ] = ACTIONS(1), - [anon_sym_SLASH_EQ] = ACTIONS(1), - [anon_sym_PERCENT_EQ] = ACTIONS(1), - [anon_sym_PLUS_EQ] = ACTIONS(1), - [anon_sym_DASH_EQ] = ACTIONS(1), - [anon_sym_LT_LT_EQ] = ACTIONS(1), - [anon_sym_GT_GT_EQ] = ACTIONS(1), - [anon_sym_AMP_EQ] = ACTIONS(1), - [anon_sym_CARET_EQ] = ACTIONS(1), - [anon_sym_PIPE_EQ] = ACTIONS(1), - [anon_sym_DASH_DASH] = ACTIONS(1), - [anon_sym_PLUS_PLUS] = ACTIONS(1), - [anon_sym_sizeof] = ACTIONS(1), - [anon_sym_DOT] = ACTIONS(1), - [anon_sym_DASH_GT] = ACTIONS(1), - [sym_number_literal] = ACTIONS(1), - [anon_sym_L_SQUOTE] = ACTIONS(1), - [anon_sym_u_SQUOTE] = ACTIONS(1), - [anon_sym_U_SQUOTE] = ACTIONS(1), - [anon_sym_u8_SQUOTE] = ACTIONS(1), - [anon_sym_SQUOTE] = ACTIONS(1), - [anon_sym_L_DQUOTE] = ACTIONS(1), - [anon_sym_u_DQUOTE] = ACTIONS(1), - [anon_sym_U_DQUOTE] = ACTIONS(1), - [anon_sym_u8_DQUOTE] = ACTIONS(1), - [anon_sym_DQUOTE] = ACTIONS(1), - [sym_true] = ACTIONS(1), - [sym_false] = ACTIONS(1), - [sym_null] = ACTIONS(1), - [sym_comment] = ACTIONS(3), - }, - [1] = { - [sym_translation_unit] = STATE(1440), - [sym_preproc_include] = STATE(38), - [sym_preproc_def] = STATE(38), - [sym_preproc_function_def] = STATE(38), - [sym_preproc_call] = STATE(38), - [sym_preproc_if] = STATE(38), - [sym_preproc_ifdef] = STATE(38), - [sym_function_definition] = STATE(38), - [sym_declaration] = STATE(38), - [sym_type_definition] = STATE(38), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1003), - [sym_linkage_specification] = STATE(38), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(641), - [sym_compound_statement] = STATE(38), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(844), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(38), - [sym_labeled_statement] = STATE(38), - [sym_expression_statement] = STATE(38), - [sym_if_statement] = STATE(38), - [sym_switch_statement] = STATE(38), - [sym_case_statement] = STATE(38), - [sym_while_statement] = STATE(38), - [sym_do_statement] = STATE(38), - [sym_for_statement] = STATE(38), - [sym_return_statement] = STATE(38), - [sym_break_statement] = STATE(38), - [sym_continue_statement] = STATE(38), - [sym_goto_statement] = STATE(38), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(38), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(38), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [ts_builtin_sym_end] = ACTIONS(5), - [sym_identifier] = ACTIONS(7), - [aux_sym_preproc_include_token1] = ACTIONS(9), - [aux_sym_preproc_def_token1] = ACTIONS(11), - [aux_sym_preproc_if_token1] = ACTIONS(13), - [aux_sym_preproc_ifdef_token1] = ACTIONS(15), - [aux_sym_preproc_ifdef_token2] = ACTIONS(15), - [sym_preproc_directive] = ACTIONS(17), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_typedef] = ACTIONS(29), - [anon_sym_extern] = ACTIONS(31), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [2] = { - [sym_preproc_include] = STATE(5), - [sym_preproc_def] = STATE(5), - [sym_preproc_function_def] = STATE(5), - [sym_preproc_call] = STATE(5), - [sym_preproc_if] = STATE(5), - [sym_preproc_ifdef] = STATE(5), - [sym_preproc_else] = STATE(1302), - [sym_preproc_elif] = STATE(1302), - [sym_function_definition] = STATE(5), - [sym_declaration] = STATE(5), - [sym_type_definition] = STATE(5), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(5), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(5), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(5), - [sym_labeled_statement] = STATE(5), - [sym_expression_statement] = STATE(5), - [sym_if_statement] = STATE(5), - [sym_switch_statement] = STATE(5), - [sym_case_statement] = STATE(5), - [sym_while_statement] = STATE(5), - [sym_do_statement] = STATE(5), - [sym_for_statement] = STATE(5), - [sym_return_statement] = STATE(5), - [sym_break_statement] = STATE(5), - [sym_continue_statement] = STATE(5), - [sym_goto_statement] = STATE(5), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(5), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(5), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(99), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [3] = { - [sym_preproc_include] = STATE(12), - [sym_preproc_def] = STATE(12), - [sym_preproc_function_def] = STATE(12), - [sym_preproc_call] = STATE(12), - [sym_preproc_if] = STATE(12), - [sym_preproc_ifdef] = STATE(12), - [sym_preproc_else] = STATE(1293), - [sym_preproc_elif] = STATE(1293), - [sym_function_definition] = STATE(12), - [sym_declaration] = STATE(12), - [sym_type_definition] = STATE(12), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(12), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(12), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(12), - [sym_labeled_statement] = STATE(12), - [sym_expression_statement] = STATE(12), - [sym_if_statement] = STATE(12), - [sym_switch_statement] = STATE(12), - [sym_case_statement] = STATE(12), - [sym_while_statement] = STATE(12), - [sym_do_statement] = STATE(12), - [sym_for_statement] = STATE(12), - [sym_return_statement] = STATE(12), - [sym_break_statement] = STATE(12), - [sym_continue_statement] = STATE(12), - [sym_goto_statement] = STATE(12), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(12), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(12), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(139), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [4] = { - [sym_preproc_include] = STATE(10), - [sym_preproc_def] = STATE(10), - [sym_preproc_function_def] = STATE(10), - [sym_preproc_call] = STATE(10), - [sym_preproc_if] = STATE(10), - [sym_preproc_ifdef] = STATE(10), - [sym_preproc_else] = STATE(1394), - [sym_preproc_elif] = STATE(1394), - [sym_function_definition] = STATE(10), - [sym_declaration] = STATE(10), - [sym_type_definition] = STATE(10), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(10), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(10), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(10), - [sym_labeled_statement] = STATE(10), - [sym_expression_statement] = STATE(10), - [sym_if_statement] = STATE(10), - [sym_switch_statement] = STATE(10), - [sym_case_statement] = STATE(10), - [sym_while_statement] = STATE(10), - [sym_do_statement] = STATE(10), - [sym_for_statement] = STATE(10), - [sym_return_statement] = STATE(10), - [sym_break_statement] = STATE(10), - [sym_continue_statement] = STATE(10), - [sym_goto_statement] = STATE(10), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(10), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(10), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(141), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [5] = { - [sym_preproc_include] = STATE(20), - [sym_preproc_def] = STATE(20), - [sym_preproc_function_def] = STATE(20), - [sym_preproc_call] = STATE(20), - [sym_preproc_if] = STATE(20), - [sym_preproc_ifdef] = STATE(20), - [sym_preproc_else] = STATE(1289), - [sym_preproc_elif] = STATE(1289), - [sym_function_definition] = STATE(20), - [sym_declaration] = STATE(20), - [sym_type_definition] = STATE(20), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(20), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(20), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(20), - [sym_labeled_statement] = STATE(20), - [sym_expression_statement] = STATE(20), - [sym_if_statement] = STATE(20), - [sym_switch_statement] = STATE(20), - [sym_case_statement] = STATE(20), - [sym_while_statement] = STATE(20), - [sym_do_statement] = STATE(20), - [sym_for_statement] = STATE(20), - [sym_return_statement] = STATE(20), - [sym_break_statement] = STATE(20), - [sym_continue_statement] = STATE(20), - [sym_goto_statement] = STATE(20), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(20), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(20), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(143), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [6] = { - [sym_preproc_include] = STATE(20), - [sym_preproc_def] = STATE(20), - [sym_preproc_function_def] = STATE(20), - [sym_preproc_call] = STATE(20), - [sym_preproc_if] = STATE(20), - [sym_preproc_ifdef] = STATE(20), - [sym_preproc_else] = STATE(1311), - [sym_preproc_elif] = STATE(1311), - [sym_function_definition] = STATE(20), - [sym_declaration] = STATE(20), - [sym_type_definition] = STATE(20), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(20), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(20), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(20), - [sym_labeled_statement] = STATE(20), - [sym_expression_statement] = STATE(20), - [sym_if_statement] = STATE(20), - [sym_switch_statement] = STATE(20), - [sym_case_statement] = STATE(20), - [sym_while_statement] = STATE(20), - [sym_do_statement] = STATE(20), - [sym_for_statement] = STATE(20), - [sym_return_statement] = STATE(20), - [sym_break_statement] = STATE(20), - [sym_continue_statement] = STATE(20), - [sym_goto_statement] = STATE(20), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(20), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(20), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(145), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [7] = { - [sym_preproc_include] = STATE(20), - [sym_preproc_def] = STATE(20), - [sym_preproc_function_def] = STATE(20), - [sym_preproc_call] = STATE(20), - [sym_preproc_if] = STATE(20), - [sym_preproc_ifdef] = STATE(20), - [sym_preproc_else] = STATE(1427), - [sym_preproc_elif] = STATE(1427), - [sym_function_definition] = STATE(20), - [sym_declaration] = STATE(20), - [sym_type_definition] = STATE(20), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(20), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(20), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(20), - [sym_labeled_statement] = STATE(20), - [sym_expression_statement] = STATE(20), - [sym_if_statement] = STATE(20), - [sym_switch_statement] = STATE(20), - [sym_case_statement] = STATE(20), - [sym_while_statement] = STATE(20), - [sym_do_statement] = STATE(20), - [sym_for_statement] = STATE(20), - [sym_return_statement] = STATE(20), - [sym_break_statement] = STATE(20), - [sym_continue_statement] = STATE(20), - [sym_goto_statement] = STATE(20), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(20), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(20), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(147), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [8] = { - [sym_preproc_include] = STATE(13), - [sym_preproc_def] = STATE(13), - [sym_preproc_function_def] = STATE(13), - [sym_preproc_call] = STATE(13), - [sym_preproc_if] = STATE(13), - [sym_preproc_ifdef] = STATE(13), - [sym_preproc_else] = STATE(1331), - [sym_preproc_elif] = STATE(1331), - [sym_function_definition] = STATE(13), - [sym_declaration] = STATE(13), - [sym_type_definition] = STATE(13), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(13), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(13), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(13), - [sym_labeled_statement] = STATE(13), - [sym_expression_statement] = STATE(13), - [sym_if_statement] = STATE(13), - [sym_switch_statement] = STATE(13), - [sym_case_statement] = STATE(13), - [sym_while_statement] = STATE(13), - [sym_do_statement] = STATE(13), - [sym_for_statement] = STATE(13), - [sym_return_statement] = STATE(13), - [sym_break_statement] = STATE(13), - [sym_continue_statement] = STATE(13), - [sym_goto_statement] = STATE(13), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(13), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(13), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(149), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [9] = { - [sym_preproc_include] = STATE(20), - [sym_preproc_def] = STATE(20), - [sym_preproc_function_def] = STATE(20), - [sym_preproc_call] = STATE(20), - [sym_preproc_if] = STATE(20), - [sym_preproc_ifdef] = STATE(20), - [sym_preproc_else] = STATE(1397), - [sym_preproc_elif] = STATE(1397), - [sym_function_definition] = STATE(20), - [sym_declaration] = STATE(20), - [sym_type_definition] = STATE(20), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(20), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(20), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(20), - [sym_labeled_statement] = STATE(20), - [sym_expression_statement] = STATE(20), - [sym_if_statement] = STATE(20), - [sym_switch_statement] = STATE(20), - [sym_case_statement] = STATE(20), - [sym_while_statement] = STATE(20), - [sym_do_statement] = STATE(20), - [sym_for_statement] = STATE(20), - [sym_return_statement] = STATE(20), - [sym_break_statement] = STATE(20), - [sym_continue_statement] = STATE(20), - [sym_goto_statement] = STATE(20), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(20), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(20), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(151), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [10] = { - [sym_preproc_include] = STATE(20), - [sym_preproc_def] = STATE(20), - [sym_preproc_function_def] = STATE(20), - [sym_preproc_call] = STATE(20), - [sym_preproc_if] = STATE(20), - [sym_preproc_ifdef] = STATE(20), - [sym_preproc_else] = STATE(1352), - [sym_preproc_elif] = STATE(1352), - [sym_function_definition] = STATE(20), - [sym_declaration] = STATE(20), - [sym_type_definition] = STATE(20), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(20), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(20), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(20), - [sym_labeled_statement] = STATE(20), - [sym_expression_statement] = STATE(20), - [sym_if_statement] = STATE(20), - [sym_switch_statement] = STATE(20), - [sym_case_statement] = STATE(20), - [sym_while_statement] = STATE(20), - [sym_do_statement] = STATE(20), - [sym_for_statement] = STATE(20), - [sym_return_statement] = STATE(20), - [sym_break_statement] = STATE(20), - [sym_continue_statement] = STATE(20), - [sym_goto_statement] = STATE(20), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(20), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(20), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(153), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [11] = { - [sym_preproc_include] = STATE(9), - [sym_preproc_def] = STATE(9), - [sym_preproc_function_def] = STATE(9), - [sym_preproc_call] = STATE(9), - [sym_preproc_if] = STATE(9), - [sym_preproc_ifdef] = STATE(9), - [sym_preproc_else] = STATE(1411), - [sym_preproc_elif] = STATE(1411), - [sym_function_definition] = STATE(9), - [sym_declaration] = STATE(9), - [sym_type_definition] = STATE(9), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(9), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(9), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(9), - [sym_labeled_statement] = STATE(9), - [sym_expression_statement] = STATE(9), - [sym_if_statement] = STATE(9), - [sym_switch_statement] = STATE(9), - [sym_case_statement] = STATE(9), - [sym_while_statement] = STATE(9), - [sym_do_statement] = STATE(9), - [sym_for_statement] = STATE(9), - [sym_return_statement] = STATE(9), - [sym_break_statement] = STATE(9), - [sym_continue_statement] = STATE(9), - [sym_goto_statement] = STATE(9), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(9), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(9), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(155), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [12] = { - [sym_preproc_include] = STATE(20), - [sym_preproc_def] = STATE(20), - [sym_preproc_function_def] = STATE(20), - [sym_preproc_call] = STATE(20), - [sym_preproc_if] = STATE(20), - [sym_preproc_ifdef] = STATE(20), - [sym_preproc_else] = STATE(1274), - [sym_preproc_elif] = STATE(1274), - [sym_function_definition] = STATE(20), - [sym_declaration] = STATE(20), - [sym_type_definition] = STATE(20), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(20), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(20), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(20), - [sym_labeled_statement] = STATE(20), - [sym_expression_statement] = STATE(20), - [sym_if_statement] = STATE(20), - [sym_switch_statement] = STATE(20), - [sym_case_statement] = STATE(20), - [sym_while_statement] = STATE(20), - [sym_do_statement] = STATE(20), - [sym_for_statement] = STATE(20), - [sym_return_statement] = STATE(20), - [sym_break_statement] = STATE(20), - [sym_continue_statement] = STATE(20), - [sym_goto_statement] = STATE(20), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(20), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(20), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(157), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [13] = { - [sym_preproc_include] = STATE(20), - [sym_preproc_def] = STATE(20), - [sym_preproc_function_def] = STATE(20), - [sym_preproc_call] = STATE(20), - [sym_preproc_if] = STATE(20), - [sym_preproc_ifdef] = STATE(20), - [sym_preproc_else] = STATE(1402), - [sym_preproc_elif] = STATE(1402), - [sym_function_definition] = STATE(20), - [sym_declaration] = STATE(20), - [sym_type_definition] = STATE(20), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(20), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(20), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(20), - [sym_labeled_statement] = STATE(20), - [sym_expression_statement] = STATE(20), - [sym_if_statement] = STATE(20), - [sym_switch_statement] = STATE(20), - [sym_case_statement] = STATE(20), - [sym_while_statement] = STATE(20), - [sym_do_statement] = STATE(20), - [sym_for_statement] = STATE(20), - [sym_return_statement] = STATE(20), - [sym_break_statement] = STATE(20), - [sym_continue_statement] = STATE(20), - [sym_goto_statement] = STATE(20), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(20), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(20), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(159), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [14] = { - [sym_preproc_include] = STATE(20), - [sym_preproc_def] = STATE(20), - [sym_preproc_function_def] = STATE(20), - [sym_preproc_call] = STATE(20), - [sym_preproc_if] = STATE(20), - [sym_preproc_ifdef] = STATE(20), - [sym_preproc_else] = STATE(1409), - [sym_preproc_elif] = STATE(1409), - [sym_function_definition] = STATE(20), - [sym_declaration] = STATE(20), - [sym_type_definition] = STATE(20), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(20), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(20), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(20), - [sym_labeled_statement] = STATE(20), - [sym_expression_statement] = STATE(20), - [sym_if_statement] = STATE(20), - [sym_switch_statement] = STATE(20), - [sym_case_statement] = STATE(20), - [sym_while_statement] = STATE(20), - [sym_do_statement] = STATE(20), - [sym_for_statement] = STATE(20), - [sym_return_statement] = STATE(20), - [sym_break_statement] = STATE(20), - [sym_continue_statement] = STATE(20), - [sym_goto_statement] = STATE(20), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(20), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(20), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(161), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [15] = { - [sym_preproc_include] = STATE(7), - [sym_preproc_def] = STATE(7), - [sym_preproc_function_def] = STATE(7), - [sym_preproc_call] = STATE(7), - [sym_preproc_if] = STATE(7), - [sym_preproc_ifdef] = STATE(7), - [sym_preproc_else] = STATE(1391), - [sym_preproc_elif] = STATE(1391), - [sym_function_definition] = STATE(7), - [sym_declaration] = STATE(7), - [sym_type_definition] = STATE(7), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(7), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(7), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(7), - [sym_labeled_statement] = STATE(7), - [sym_expression_statement] = STATE(7), - [sym_if_statement] = STATE(7), - [sym_switch_statement] = STATE(7), - [sym_case_statement] = STATE(7), - [sym_while_statement] = STATE(7), - [sym_do_statement] = STATE(7), - [sym_for_statement] = STATE(7), - [sym_return_statement] = STATE(7), - [sym_break_statement] = STATE(7), - [sym_continue_statement] = STATE(7), - [sym_goto_statement] = STATE(7), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(7), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(7), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(163), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [16] = { - [sym_preproc_include] = STATE(6), - [sym_preproc_def] = STATE(6), - [sym_preproc_function_def] = STATE(6), - [sym_preproc_call] = STATE(6), - [sym_preproc_if] = STATE(6), - [sym_preproc_ifdef] = STATE(6), - [sym_preproc_else] = STATE(1353), - [sym_preproc_elif] = STATE(1353), - [sym_function_definition] = STATE(6), - [sym_declaration] = STATE(6), - [sym_type_definition] = STATE(6), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(6), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(6), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(6), - [sym_labeled_statement] = STATE(6), - [sym_expression_statement] = STATE(6), - [sym_if_statement] = STATE(6), - [sym_switch_statement] = STATE(6), - [sym_case_statement] = STATE(6), - [sym_while_statement] = STATE(6), - [sym_do_statement] = STATE(6), - [sym_for_statement] = STATE(6), - [sym_return_statement] = STATE(6), - [sym_break_statement] = STATE(6), - [sym_continue_statement] = STATE(6), - [sym_goto_statement] = STATE(6), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(6), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(6), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(165), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [17] = { - [sym_preproc_include] = STATE(19), - [sym_preproc_def] = STATE(19), - [sym_preproc_function_def] = STATE(19), - [sym_preproc_call] = STATE(19), - [sym_preproc_if] = STATE(19), - [sym_preproc_ifdef] = STATE(19), - [sym_preproc_else] = STATE(1403), - [sym_preproc_elif] = STATE(1403), - [sym_function_definition] = STATE(19), - [sym_declaration] = STATE(19), - [sym_type_definition] = STATE(19), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(19), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(19), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(19), - [sym_labeled_statement] = STATE(19), - [sym_expression_statement] = STATE(19), - [sym_if_statement] = STATE(19), - [sym_switch_statement] = STATE(19), - [sym_case_statement] = STATE(19), - [sym_while_statement] = STATE(19), - [sym_do_statement] = STATE(19), - [sym_for_statement] = STATE(19), - [sym_return_statement] = STATE(19), - [sym_break_statement] = STATE(19), - [sym_continue_statement] = STATE(19), - [sym_goto_statement] = STATE(19), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(19), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(19), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(167), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [18] = { - [sym_preproc_include] = STATE(14), - [sym_preproc_def] = STATE(14), - [sym_preproc_function_def] = STATE(14), - [sym_preproc_call] = STATE(14), - [sym_preproc_if] = STATE(14), - [sym_preproc_ifdef] = STATE(14), - [sym_preproc_else] = STATE(1338), - [sym_preproc_elif] = STATE(1338), - [sym_function_definition] = STATE(14), - [sym_declaration] = STATE(14), - [sym_type_definition] = STATE(14), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(14), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(14), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(14), - [sym_labeled_statement] = STATE(14), - [sym_expression_statement] = STATE(14), - [sym_if_statement] = STATE(14), - [sym_switch_statement] = STATE(14), - [sym_case_statement] = STATE(14), - [sym_while_statement] = STATE(14), - [sym_do_statement] = STATE(14), - [sym_for_statement] = STATE(14), - [sym_return_statement] = STATE(14), - [sym_break_statement] = STATE(14), - [sym_continue_statement] = STATE(14), - [sym_goto_statement] = STATE(14), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(14), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(14), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(169), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [19] = { - [sym_preproc_include] = STATE(20), - [sym_preproc_def] = STATE(20), - [sym_preproc_function_def] = STATE(20), - [sym_preproc_call] = STATE(20), - [sym_preproc_if] = STATE(20), - [sym_preproc_ifdef] = STATE(20), - [sym_preproc_else] = STATE(1375), - [sym_preproc_elif] = STATE(1375), - [sym_function_definition] = STATE(20), - [sym_declaration] = STATE(20), - [sym_type_definition] = STATE(20), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(20), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(20), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(20), - [sym_labeled_statement] = STATE(20), - [sym_expression_statement] = STATE(20), - [sym_if_statement] = STATE(20), - [sym_switch_statement] = STATE(20), - [sym_case_statement] = STATE(20), - [sym_while_statement] = STATE(20), - [sym_do_statement] = STATE(20), - [sym_for_statement] = STATE(20), - [sym_return_statement] = STATE(20), - [sym_break_statement] = STATE(20), - [sym_continue_statement] = STATE(20), - [sym_goto_statement] = STATE(20), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(20), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(20), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(91), - [aux_sym_preproc_include_token1] = ACTIONS(93), - [aux_sym_preproc_def_token1] = ACTIONS(95), - [aux_sym_preproc_if_token1] = ACTIONS(97), - [aux_sym_preproc_if_token2] = ACTIONS(171), - [aux_sym_preproc_ifdef_token1] = ACTIONS(101), - [aux_sym_preproc_ifdef_token2] = ACTIONS(101), - [aux_sym_preproc_else_token1] = ACTIONS(103), - [aux_sym_preproc_elif_token1] = ACTIONS(105), - [sym_preproc_directive] = ACTIONS(107), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(113), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [20] = { - [sym_preproc_include] = STATE(20), - [sym_preproc_def] = STATE(20), - [sym_preproc_function_def] = STATE(20), - [sym_preproc_call] = STATE(20), - [sym_preproc_if] = STATE(20), - [sym_preproc_ifdef] = STATE(20), - [sym_function_definition] = STATE(20), - [sym_declaration] = STATE(20), - [sym_type_definition] = STATE(20), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1008), - [sym_linkage_specification] = STATE(20), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(643), - [sym_compound_statement] = STATE(20), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(847), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(20), - [sym_labeled_statement] = STATE(20), - [sym_expression_statement] = STATE(20), - [sym_if_statement] = STATE(20), - [sym_switch_statement] = STATE(20), - [sym_case_statement] = STATE(20), - [sym_while_statement] = STATE(20), - [sym_do_statement] = STATE(20), - [sym_for_statement] = STATE(20), - [sym_return_statement] = STATE(20), - [sym_break_statement] = STATE(20), - [sym_continue_statement] = STATE(20), - [sym_goto_statement] = STATE(20), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(20), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(20), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(173), - [aux_sym_preproc_include_token1] = ACTIONS(176), - [aux_sym_preproc_def_token1] = ACTIONS(179), - [aux_sym_preproc_if_token1] = ACTIONS(182), - [aux_sym_preproc_if_token2] = ACTIONS(185), - [aux_sym_preproc_ifdef_token1] = ACTIONS(187), - [aux_sym_preproc_ifdef_token2] = ACTIONS(187), - [aux_sym_preproc_else_token1] = ACTIONS(185), - [aux_sym_preproc_elif_token1] = ACTIONS(185), - [sym_preproc_directive] = ACTIONS(190), - [anon_sym_LPAREN2] = ACTIONS(193), - [anon_sym_BANG] = ACTIONS(196), - [anon_sym_TILDE] = ACTIONS(196), - [anon_sym_DASH] = ACTIONS(199), - [anon_sym_PLUS] = ACTIONS(199), - [anon_sym_STAR] = ACTIONS(202), - [anon_sym_AMP] = ACTIONS(202), - [anon_sym_SEMI] = ACTIONS(205), - [anon_sym_typedef] = ACTIONS(208), - [anon_sym_extern] = ACTIONS(211), - [anon_sym___attribute__] = ACTIONS(214), - [anon_sym_LBRACK_LBRACK] = ACTIONS(217), - [anon_sym___declspec] = ACTIONS(220), - [anon_sym___cdecl] = ACTIONS(223), - [anon_sym___clrcall] = ACTIONS(223), - [anon_sym___stdcall] = ACTIONS(223), - [anon_sym___fastcall] = ACTIONS(223), - [anon_sym___thiscall] = ACTIONS(223), - [anon_sym___vectorcall] = ACTIONS(223), - [anon_sym_LBRACE] = ACTIONS(226), - [anon_sym_static] = ACTIONS(229), - [anon_sym_auto] = ACTIONS(229), - [anon_sym_register] = ACTIONS(229), - [anon_sym_inline] = ACTIONS(229), - [anon_sym_const] = ACTIONS(232), - [anon_sym_volatile] = ACTIONS(232), - [anon_sym_restrict] = ACTIONS(232), - [anon_sym__Atomic] = ACTIONS(232), - [anon_sym_signed] = ACTIONS(235), - [anon_sym_unsigned] = ACTIONS(235), - [anon_sym_long] = ACTIONS(235), - [anon_sym_short] = ACTIONS(235), - [sym_primitive_type] = ACTIONS(238), - [anon_sym_enum] = ACTIONS(241), - [anon_sym_struct] = ACTIONS(244), - [anon_sym_union] = ACTIONS(247), - [anon_sym_if] = ACTIONS(250), - [anon_sym_switch] = ACTIONS(253), - [anon_sym_case] = ACTIONS(256), - [anon_sym_default] = ACTIONS(259), - [anon_sym_while] = ACTIONS(262), - [anon_sym_do] = ACTIONS(265), - [anon_sym_for] = ACTIONS(268), - [anon_sym_return] = ACTIONS(271), - [anon_sym_break] = ACTIONS(274), - [anon_sym_continue] = ACTIONS(277), - [anon_sym_goto] = ACTIONS(280), - [anon_sym_DASH_DASH] = ACTIONS(283), - [anon_sym_PLUS_PLUS] = ACTIONS(283), - [anon_sym_sizeof] = ACTIONS(286), - [sym_number_literal] = ACTIONS(289), - [anon_sym_L_SQUOTE] = ACTIONS(292), - [anon_sym_u_SQUOTE] = ACTIONS(292), - [anon_sym_U_SQUOTE] = ACTIONS(292), - [anon_sym_u8_SQUOTE] = ACTIONS(292), - [anon_sym_SQUOTE] = ACTIONS(292), - [anon_sym_L_DQUOTE] = ACTIONS(295), - [anon_sym_u_DQUOTE] = ACTIONS(295), - [anon_sym_U_DQUOTE] = ACTIONS(295), - [anon_sym_u8_DQUOTE] = ACTIONS(295), - [anon_sym_DQUOTE] = ACTIONS(295), - [sym_true] = ACTIONS(298), - [sym_false] = ACTIONS(298), - [sym_null] = ACTIONS(298), - [sym_comment] = ACTIONS(3), - }, - [21] = { - [sym_preproc_include] = STATE(26), - [sym_preproc_def] = STATE(26), - [sym_preproc_function_def] = STATE(26), - [sym_preproc_call] = STATE(26), - [sym_preproc_if] = STATE(26), - [sym_preproc_ifdef] = STATE(26), - [sym_function_definition] = STATE(26), - [sym_declaration] = STATE(26), - [sym_type_definition] = STATE(26), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1004), - [sym_linkage_specification] = STATE(26), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(642), - [sym_compound_statement] = STATE(26), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(846), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(26), - [sym_labeled_statement] = STATE(26), - [sym_expression_statement] = STATE(26), - [sym_if_statement] = STATE(26), - [sym_switch_statement] = STATE(26), - [sym_case_statement] = STATE(26), - [sym_while_statement] = STATE(26), - [sym_do_statement] = STATE(26), - [sym_for_statement] = STATE(26), - [sym_return_statement] = STATE(26), - [sym_break_statement] = STATE(26), - [sym_continue_statement] = STATE(26), - [sym_goto_statement] = STATE(26), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(26), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(26), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(301), - [aux_sym_preproc_include_token1] = ACTIONS(303), - [aux_sym_preproc_def_token1] = ACTIONS(305), - [aux_sym_preproc_if_token1] = ACTIONS(307), - [aux_sym_preproc_ifdef_token1] = ACTIONS(309), - [aux_sym_preproc_ifdef_token2] = ACTIONS(309), - [sym_preproc_directive] = ACTIONS(311), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(317), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(321), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [22] = { - [sym_preproc_include] = STATE(36), - [sym_preproc_def] = STATE(36), - [sym_preproc_function_def] = STATE(36), - [sym_preproc_call] = STATE(36), - [sym_preproc_if] = STATE(36), - [sym_preproc_ifdef] = STATE(36), - [sym_function_definition] = STATE(36), - [sym_declaration] = STATE(36), - [sym_type_definition] = STATE(36), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1004), - [sym_linkage_specification] = STATE(36), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(642), - [sym_compound_statement] = STATE(36), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(846), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(36), - [sym_labeled_statement] = STATE(36), - [sym_expression_statement] = STATE(36), - [sym_if_statement] = STATE(36), - [sym_switch_statement] = STATE(36), - [sym_case_statement] = STATE(36), - [sym_while_statement] = STATE(36), - [sym_do_statement] = STATE(36), - [sym_for_statement] = STATE(36), - [sym_return_statement] = STATE(36), - [sym_break_statement] = STATE(36), - [sym_continue_statement] = STATE(36), - [sym_goto_statement] = STATE(36), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(36), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(36), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(301), - [aux_sym_preproc_include_token1] = ACTIONS(303), - [aux_sym_preproc_def_token1] = ACTIONS(305), - [aux_sym_preproc_if_token1] = ACTIONS(307), - [aux_sym_preproc_ifdef_token1] = ACTIONS(309), - [aux_sym_preproc_ifdef_token2] = ACTIONS(309), - [sym_preproc_directive] = ACTIONS(311), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(317), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(345), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [23] = { - [sym_preproc_include] = STATE(23), - [sym_preproc_def] = STATE(23), - [sym_preproc_function_def] = STATE(23), - [sym_preproc_call] = STATE(23), - [sym_preproc_if] = STATE(23), - [sym_preproc_ifdef] = STATE(23), - [sym_function_definition] = STATE(23), - [sym_declaration] = STATE(23), - [sym_type_definition] = STATE(23), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1012), - [sym_linkage_specification] = STATE(23), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(644), - [sym_compound_statement] = STATE(23), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(845), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(23), - [sym_labeled_statement] = STATE(23), - [sym_expression_statement] = STATE(23), - [sym_if_statement] = STATE(23), - [sym_switch_statement] = STATE(23), - [sym_case_statement] = STATE(23), - [sym_while_statement] = STATE(23), - [sym_do_statement] = STATE(23), - [sym_for_statement] = STATE(23), - [sym_return_statement] = STATE(23), - [sym_break_statement] = STATE(23), - [sym_continue_statement] = STATE(23), - [sym_goto_statement] = STATE(23), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(23), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(23), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(347), - [aux_sym_preproc_include_token1] = ACTIONS(350), - [aux_sym_preproc_def_token1] = ACTIONS(353), - [aux_sym_preproc_if_token1] = ACTIONS(356), - [aux_sym_preproc_if_token2] = ACTIONS(185), - [aux_sym_preproc_ifdef_token1] = ACTIONS(359), - [aux_sym_preproc_ifdef_token2] = ACTIONS(359), - [sym_preproc_directive] = ACTIONS(362), - [anon_sym_LPAREN2] = ACTIONS(193), - [anon_sym_BANG] = ACTIONS(196), - [anon_sym_TILDE] = ACTIONS(196), - [anon_sym_DASH] = ACTIONS(199), - [anon_sym_PLUS] = ACTIONS(199), - [anon_sym_STAR] = ACTIONS(202), - [anon_sym_AMP] = ACTIONS(202), - [anon_sym_SEMI] = ACTIONS(365), - [anon_sym_typedef] = ACTIONS(368), - [anon_sym_extern] = ACTIONS(371), - [anon_sym___attribute__] = ACTIONS(214), - [anon_sym_LBRACK_LBRACK] = ACTIONS(217), - [anon_sym___declspec] = ACTIONS(220), - [anon_sym___cdecl] = ACTIONS(223), - [anon_sym___clrcall] = ACTIONS(223), - [anon_sym___stdcall] = ACTIONS(223), - [anon_sym___fastcall] = ACTIONS(223), - [anon_sym___thiscall] = ACTIONS(223), - [anon_sym___vectorcall] = ACTIONS(223), - [anon_sym_LBRACE] = ACTIONS(374), - [anon_sym_static] = ACTIONS(229), - [anon_sym_auto] = ACTIONS(229), - [anon_sym_register] = ACTIONS(229), - [anon_sym_inline] = ACTIONS(229), - [anon_sym_const] = ACTIONS(232), - [anon_sym_volatile] = ACTIONS(232), - [anon_sym_restrict] = ACTIONS(232), - [anon_sym__Atomic] = ACTIONS(232), - [anon_sym_signed] = ACTIONS(235), - [anon_sym_unsigned] = ACTIONS(235), - [anon_sym_long] = ACTIONS(235), - [anon_sym_short] = ACTIONS(235), - [sym_primitive_type] = ACTIONS(238), - [anon_sym_enum] = ACTIONS(241), - [anon_sym_struct] = ACTIONS(244), - [anon_sym_union] = ACTIONS(247), - [anon_sym_if] = ACTIONS(377), - [anon_sym_switch] = ACTIONS(380), - [anon_sym_case] = ACTIONS(383), - [anon_sym_default] = ACTIONS(386), - [anon_sym_while] = ACTIONS(389), - [anon_sym_do] = ACTIONS(392), - [anon_sym_for] = ACTIONS(395), - [anon_sym_return] = ACTIONS(398), - [anon_sym_break] = ACTIONS(401), - [anon_sym_continue] = ACTIONS(404), - [anon_sym_goto] = ACTIONS(407), - [anon_sym_DASH_DASH] = ACTIONS(283), - [anon_sym_PLUS_PLUS] = ACTIONS(283), - [anon_sym_sizeof] = ACTIONS(286), - [sym_number_literal] = ACTIONS(289), - [anon_sym_L_SQUOTE] = ACTIONS(292), - [anon_sym_u_SQUOTE] = ACTIONS(292), - [anon_sym_U_SQUOTE] = ACTIONS(292), - [anon_sym_u8_SQUOTE] = ACTIONS(292), - [anon_sym_SQUOTE] = ACTIONS(292), - [anon_sym_L_DQUOTE] = ACTIONS(295), - [anon_sym_u_DQUOTE] = ACTIONS(295), - [anon_sym_U_DQUOTE] = ACTIONS(295), - [anon_sym_u8_DQUOTE] = ACTIONS(295), - [anon_sym_DQUOTE] = ACTIONS(295), - [sym_true] = ACTIONS(298), - [sym_false] = ACTIONS(298), - [sym_null] = ACTIONS(298), - [sym_comment] = ACTIONS(3), - }, - [24] = { - [sym_preproc_include] = STATE(29), - [sym_preproc_def] = STATE(29), - [sym_preproc_function_def] = STATE(29), - [sym_preproc_call] = STATE(29), - [sym_preproc_if] = STATE(29), - [sym_preproc_ifdef] = STATE(29), - [sym_function_definition] = STATE(29), - [sym_declaration] = STATE(29), - [sym_type_definition] = STATE(29), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1004), - [sym_linkage_specification] = STATE(29), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(642), - [sym_compound_statement] = STATE(29), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(846), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(29), - [sym_labeled_statement] = STATE(29), - [sym_expression_statement] = STATE(29), - [sym_if_statement] = STATE(29), - [sym_switch_statement] = STATE(29), - [sym_case_statement] = STATE(29), - [sym_while_statement] = STATE(29), - [sym_do_statement] = STATE(29), - [sym_for_statement] = STATE(29), - [sym_return_statement] = STATE(29), - [sym_break_statement] = STATE(29), - [sym_continue_statement] = STATE(29), - [sym_goto_statement] = STATE(29), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(29), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(29), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(301), - [aux_sym_preproc_include_token1] = ACTIONS(303), - [aux_sym_preproc_def_token1] = ACTIONS(305), - [aux_sym_preproc_if_token1] = ACTIONS(307), - [aux_sym_preproc_ifdef_token1] = ACTIONS(309), - [aux_sym_preproc_ifdef_token2] = ACTIONS(309), - [sym_preproc_directive] = ACTIONS(311), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(317), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(410), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [25] = { - [sym_preproc_include] = STATE(32), - [sym_preproc_def] = STATE(32), - [sym_preproc_function_def] = STATE(32), - [sym_preproc_call] = STATE(32), - [sym_preproc_if] = STATE(32), - [sym_preproc_ifdef] = STATE(32), - [sym_function_definition] = STATE(32), - [sym_declaration] = STATE(32), - [sym_type_definition] = STATE(32), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1004), - [sym_linkage_specification] = STATE(32), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(642), - [sym_compound_statement] = STATE(32), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(846), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(32), - [sym_labeled_statement] = STATE(32), - [sym_expression_statement] = STATE(32), - [sym_if_statement] = STATE(32), - [sym_switch_statement] = STATE(32), - [sym_case_statement] = STATE(32), - [sym_while_statement] = STATE(32), - [sym_do_statement] = STATE(32), - [sym_for_statement] = STATE(32), - [sym_return_statement] = STATE(32), - [sym_break_statement] = STATE(32), - [sym_continue_statement] = STATE(32), - [sym_goto_statement] = STATE(32), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(32), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(32), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(301), - [aux_sym_preproc_include_token1] = ACTIONS(303), - [aux_sym_preproc_def_token1] = ACTIONS(305), - [aux_sym_preproc_if_token1] = ACTIONS(307), - [aux_sym_preproc_ifdef_token1] = ACTIONS(309), - [aux_sym_preproc_ifdef_token2] = ACTIONS(309), - [sym_preproc_directive] = ACTIONS(311), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(317), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(412), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [26] = { - [sym_preproc_include] = STATE(36), - [sym_preproc_def] = STATE(36), - [sym_preproc_function_def] = STATE(36), - [sym_preproc_call] = STATE(36), - [sym_preproc_if] = STATE(36), - [sym_preproc_ifdef] = STATE(36), - [sym_function_definition] = STATE(36), - [sym_declaration] = STATE(36), - [sym_type_definition] = STATE(36), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1004), - [sym_linkage_specification] = STATE(36), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(642), - [sym_compound_statement] = STATE(36), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(846), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(36), - [sym_labeled_statement] = STATE(36), - [sym_expression_statement] = STATE(36), - [sym_if_statement] = STATE(36), - [sym_switch_statement] = STATE(36), - [sym_case_statement] = STATE(36), - [sym_while_statement] = STATE(36), - [sym_do_statement] = STATE(36), - [sym_for_statement] = STATE(36), - [sym_return_statement] = STATE(36), - [sym_break_statement] = STATE(36), - [sym_continue_statement] = STATE(36), - [sym_goto_statement] = STATE(36), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(36), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(36), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(301), - [aux_sym_preproc_include_token1] = ACTIONS(303), - [aux_sym_preproc_def_token1] = ACTIONS(305), - [aux_sym_preproc_if_token1] = ACTIONS(307), - [aux_sym_preproc_ifdef_token1] = ACTIONS(309), - [aux_sym_preproc_ifdef_token2] = ACTIONS(309), - [sym_preproc_directive] = ACTIONS(311), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(317), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(414), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [27] = { - [sym_preproc_include] = STATE(34), - [sym_preproc_def] = STATE(34), - [sym_preproc_function_def] = STATE(34), - [sym_preproc_call] = STATE(34), - [sym_preproc_if] = STATE(34), - [sym_preproc_ifdef] = STATE(34), - [sym_function_definition] = STATE(34), - [sym_declaration] = STATE(34), - [sym_type_definition] = STATE(34), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1004), - [sym_linkage_specification] = STATE(34), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(642), - [sym_compound_statement] = STATE(34), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(846), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(34), - [sym_labeled_statement] = STATE(34), - [sym_expression_statement] = STATE(34), - [sym_if_statement] = STATE(34), - [sym_switch_statement] = STATE(34), - [sym_case_statement] = STATE(34), - [sym_while_statement] = STATE(34), - [sym_do_statement] = STATE(34), - [sym_for_statement] = STATE(34), - [sym_return_statement] = STATE(34), - [sym_break_statement] = STATE(34), - [sym_continue_statement] = STATE(34), - [sym_goto_statement] = STATE(34), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(34), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(34), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(301), - [aux_sym_preproc_include_token1] = ACTIONS(303), - [aux_sym_preproc_def_token1] = ACTIONS(305), - [aux_sym_preproc_if_token1] = ACTIONS(307), - [aux_sym_preproc_ifdef_token1] = ACTIONS(309), - [aux_sym_preproc_ifdef_token2] = ACTIONS(309), - [sym_preproc_directive] = ACTIONS(311), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(317), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(416), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [28] = { - [sym_preproc_include] = STATE(28), - [sym_preproc_def] = STATE(28), - [sym_preproc_function_def] = STATE(28), - [sym_preproc_call] = STATE(28), - [sym_preproc_if] = STATE(28), - [sym_preproc_ifdef] = STATE(28), - [sym_function_definition] = STATE(28), - [sym_declaration] = STATE(28), - [sym_type_definition] = STATE(28), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1003), - [sym_linkage_specification] = STATE(28), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(641), - [sym_compound_statement] = STATE(28), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(844), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(28), - [sym_labeled_statement] = STATE(28), - [sym_expression_statement] = STATE(28), - [sym_if_statement] = STATE(28), - [sym_switch_statement] = STATE(28), - [sym_case_statement] = STATE(28), - [sym_while_statement] = STATE(28), - [sym_do_statement] = STATE(28), - [sym_for_statement] = STATE(28), - [sym_return_statement] = STATE(28), - [sym_break_statement] = STATE(28), - [sym_continue_statement] = STATE(28), - [sym_goto_statement] = STATE(28), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(28), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(28), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [ts_builtin_sym_end] = ACTIONS(418), - [sym_identifier] = ACTIONS(420), - [aux_sym_preproc_include_token1] = ACTIONS(423), - [aux_sym_preproc_def_token1] = ACTIONS(426), - [aux_sym_preproc_if_token1] = ACTIONS(429), - [aux_sym_preproc_ifdef_token1] = ACTIONS(432), - [aux_sym_preproc_ifdef_token2] = ACTIONS(432), - [sym_preproc_directive] = ACTIONS(435), - [anon_sym_LPAREN2] = ACTIONS(193), - [anon_sym_BANG] = ACTIONS(196), - [anon_sym_TILDE] = ACTIONS(196), - [anon_sym_DASH] = ACTIONS(199), - [anon_sym_PLUS] = ACTIONS(199), - [anon_sym_STAR] = ACTIONS(202), - [anon_sym_AMP] = ACTIONS(202), - [anon_sym_SEMI] = ACTIONS(438), - [anon_sym_typedef] = ACTIONS(441), - [anon_sym_extern] = ACTIONS(444), - [anon_sym___attribute__] = ACTIONS(214), - [anon_sym_LBRACK_LBRACK] = ACTIONS(217), - [anon_sym___declspec] = ACTIONS(220), - [anon_sym___cdecl] = ACTIONS(223), - [anon_sym___clrcall] = ACTIONS(223), - [anon_sym___stdcall] = ACTIONS(223), - [anon_sym___fastcall] = ACTIONS(223), - [anon_sym___thiscall] = ACTIONS(223), - [anon_sym___vectorcall] = ACTIONS(223), - [anon_sym_LBRACE] = ACTIONS(447), - [anon_sym_static] = ACTIONS(229), - [anon_sym_auto] = ACTIONS(229), - [anon_sym_register] = ACTIONS(229), - [anon_sym_inline] = ACTIONS(229), - [anon_sym_const] = ACTIONS(232), - [anon_sym_volatile] = ACTIONS(232), - [anon_sym_restrict] = ACTIONS(232), - [anon_sym__Atomic] = ACTIONS(232), - [anon_sym_signed] = ACTIONS(235), - [anon_sym_unsigned] = ACTIONS(235), - [anon_sym_long] = ACTIONS(235), - [anon_sym_short] = ACTIONS(235), - [sym_primitive_type] = ACTIONS(238), - [anon_sym_enum] = ACTIONS(241), - [anon_sym_struct] = ACTIONS(244), - [anon_sym_union] = ACTIONS(247), - [anon_sym_if] = ACTIONS(450), - [anon_sym_switch] = ACTIONS(453), - [anon_sym_case] = ACTIONS(456), - [anon_sym_default] = ACTIONS(459), - [anon_sym_while] = ACTIONS(462), - [anon_sym_do] = ACTIONS(465), - [anon_sym_for] = ACTIONS(468), - [anon_sym_return] = ACTIONS(471), - [anon_sym_break] = ACTIONS(474), - [anon_sym_continue] = ACTIONS(477), - [anon_sym_goto] = ACTIONS(480), - [anon_sym_DASH_DASH] = ACTIONS(283), - [anon_sym_PLUS_PLUS] = ACTIONS(283), - [anon_sym_sizeof] = ACTIONS(286), - [sym_number_literal] = ACTIONS(289), - [anon_sym_L_SQUOTE] = ACTIONS(292), - [anon_sym_u_SQUOTE] = ACTIONS(292), - [anon_sym_U_SQUOTE] = ACTIONS(292), - [anon_sym_u8_SQUOTE] = ACTIONS(292), - [anon_sym_SQUOTE] = ACTIONS(292), - [anon_sym_L_DQUOTE] = ACTIONS(295), - [anon_sym_u_DQUOTE] = ACTIONS(295), - [anon_sym_U_DQUOTE] = ACTIONS(295), - [anon_sym_u8_DQUOTE] = ACTIONS(295), - [anon_sym_DQUOTE] = ACTIONS(295), - [sym_true] = ACTIONS(298), - [sym_false] = ACTIONS(298), - [sym_null] = ACTIONS(298), - [sym_comment] = ACTIONS(3), - }, - [29] = { - [sym_preproc_include] = STATE(36), - [sym_preproc_def] = STATE(36), - [sym_preproc_function_def] = STATE(36), - [sym_preproc_call] = STATE(36), - [sym_preproc_if] = STATE(36), - [sym_preproc_ifdef] = STATE(36), - [sym_function_definition] = STATE(36), - [sym_declaration] = STATE(36), - [sym_type_definition] = STATE(36), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1004), - [sym_linkage_specification] = STATE(36), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(642), - [sym_compound_statement] = STATE(36), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(846), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(36), - [sym_labeled_statement] = STATE(36), - [sym_expression_statement] = STATE(36), - [sym_if_statement] = STATE(36), - [sym_switch_statement] = STATE(36), - [sym_case_statement] = STATE(36), - [sym_while_statement] = STATE(36), - [sym_do_statement] = STATE(36), - [sym_for_statement] = STATE(36), - [sym_return_statement] = STATE(36), - [sym_break_statement] = STATE(36), - [sym_continue_statement] = STATE(36), - [sym_goto_statement] = STATE(36), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(36), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(36), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(301), - [aux_sym_preproc_include_token1] = ACTIONS(303), - [aux_sym_preproc_def_token1] = ACTIONS(305), - [aux_sym_preproc_if_token1] = ACTIONS(307), - [aux_sym_preproc_ifdef_token1] = ACTIONS(309), - [aux_sym_preproc_ifdef_token2] = ACTIONS(309), - [sym_preproc_directive] = ACTIONS(311), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(317), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(483), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [30] = { - [sym_preproc_include] = STATE(36), - [sym_preproc_def] = STATE(36), - [sym_preproc_function_def] = STATE(36), - [sym_preproc_call] = STATE(36), - [sym_preproc_if] = STATE(36), - [sym_preproc_ifdef] = STATE(36), - [sym_function_definition] = STATE(36), - [sym_declaration] = STATE(36), - [sym_type_definition] = STATE(36), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1004), - [sym_linkage_specification] = STATE(36), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(642), - [sym_compound_statement] = STATE(36), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(846), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(36), - [sym_labeled_statement] = STATE(36), - [sym_expression_statement] = STATE(36), - [sym_if_statement] = STATE(36), - [sym_switch_statement] = STATE(36), - [sym_case_statement] = STATE(36), - [sym_while_statement] = STATE(36), - [sym_do_statement] = STATE(36), - [sym_for_statement] = STATE(36), - [sym_return_statement] = STATE(36), - [sym_break_statement] = STATE(36), - [sym_continue_statement] = STATE(36), - [sym_goto_statement] = STATE(36), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(36), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(36), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(301), - [aux_sym_preproc_include_token1] = ACTIONS(303), - [aux_sym_preproc_def_token1] = ACTIONS(305), - [aux_sym_preproc_if_token1] = ACTIONS(307), - [aux_sym_preproc_ifdef_token1] = ACTIONS(309), - [aux_sym_preproc_ifdef_token2] = ACTIONS(309), - [sym_preproc_directive] = ACTIONS(311), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(317), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(485), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [31] = { - [sym_preproc_include] = STATE(30), - [sym_preproc_def] = STATE(30), - [sym_preproc_function_def] = STATE(30), - [sym_preproc_call] = STATE(30), - [sym_preproc_if] = STATE(30), - [sym_preproc_ifdef] = STATE(30), - [sym_function_definition] = STATE(30), - [sym_declaration] = STATE(30), - [sym_type_definition] = STATE(30), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1004), - [sym_linkage_specification] = STATE(30), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(642), - [sym_compound_statement] = STATE(30), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(846), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(30), - [sym_labeled_statement] = STATE(30), - [sym_expression_statement] = STATE(30), - [sym_if_statement] = STATE(30), - [sym_switch_statement] = STATE(30), - [sym_case_statement] = STATE(30), - [sym_while_statement] = STATE(30), - [sym_do_statement] = STATE(30), - [sym_for_statement] = STATE(30), - [sym_return_statement] = STATE(30), - [sym_break_statement] = STATE(30), - [sym_continue_statement] = STATE(30), - [sym_goto_statement] = STATE(30), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(30), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(30), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(301), - [aux_sym_preproc_include_token1] = ACTIONS(303), - [aux_sym_preproc_def_token1] = ACTIONS(305), - [aux_sym_preproc_if_token1] = ACTIONS(307), - [aux_sym_preproc_ifdef_token1] = ACTIONS(309), - [aux_sym_preproc_ifdef_token2] = ACTIONS(309), - [sym_preproc_directive] = ACTIONS(311), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(317), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(487), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [32] = { - [sym_preproc_include] = STATE(36), - [sym_preproc_def] = STATE(36), - [sym_preproc_function_def] = STATE(36), - [sym_preproc_call] = STATE(36), - [sym_preproc_if] = STATE(36), - [sym_preproc_ifdef] = STATE(36), - [sym_function_definition] = STATE(36), - [sym_declaration] = STATE(36), - [sym_type_definition] = STATE(36), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1004), - [sym_linkage_specification] = STATE(36), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(642), - [sym_compound_statement] = STATE(36), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(846), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(36), - [sym_labeled_statement] = STATE(36), - [sym_expression_statement] = STATE(36), - [sym_if_statement] = STATE(36), - [sym_switch_statement] = STATE(36), - [sym_case_statement] = STATE(36), - [sym_while_statement] = STATE(36), - [sym_do_statement] = STATE(36), - [sym_for_statement] = STATE(36), - [sym_return_statement] = STATE(36), - [sym_break_statement] = STATE(36), - [sym_continue_statement] = STATE(36), - [sym_goto_statement] = STATE(36), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(36), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(36), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(301), - [aux_sym_preproc_include_token1] = ACTIONS(303), - [aux_sym_preproc_def_token1] = ACTIONS(305), - [aux_sym_preproc_if_token1] = ACTIONS(307), - [aux_sym_preproc_ifdef_token1] = ACTIONS(309), - [aux_sym_preproc_ifdef_token2] = ACTIONS(309), - [sym_preproc_directive] = ACTIONS(311), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(317), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(489), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [33] = { - [sym_preproc_include] = STATE(39), - [sym_preproc_def] = STATE(39), - [sym_preproc_function_def] = STATE(39), - [sym_preproc_call] = STATE(39), - [sym_preproc_if] = STATE(39), - [sym_preproc_ifdef] = STATE(39), - [sym_function_definition] = STATE(39), - [sym_declaration] = STATE(39), - [sym_type_definition] = STATE(39), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1012), - [sym_linkage_specification] = STATE(39), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(644), - [sym_compound_statement] = STATE(39), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(845), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(39), - [sym_labeled_statement] = STATE(39), - [sym_expression_statement] = STATE(39), - [sym_if_statement] = STATE(39), - [sym_switch_statement] = STATE(39), - [sym_case_statement] = STATE(39), - [sym_while_statement] = STATE(39), - [sym_do_statement] = STATE(39), - [sym_for_statement] = STATE(39), - [sym_return_statement] = STATE(39), - [sym_break_statement] = STATE(39), - [sym_continue_statement] = STATE(39), - [sym_goto_statement] = STATE(39), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(39), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(39), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(491), - [aux_sym_preproc_include_token1] = ACTIONS(493), - [aux_sym_preproc_def_token1] = ACTIONS(495), - [aux_sym_preproc_if_token1] = ACTIONS(497), - [aux_sym_preproc_if_token2] = ACTIONS(499), - [aux_sym_preproc_ifdef_token1] = ACTIONS(501), - [aux_sym_preproc_ifdef_token2] = ACTIONS(501), - [sym_preproc_directive] = ACTIONS(503), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_typedef] = ACTIONS(507), - [anon_sym_extern] = ACTIONS(509), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [34] = { - [sym_preproc_include] = STATE(36), - [sym_preproc_def] = STATE(36), - [sym_preproc_function_def] = STATE(36), - [sym_preproc_call] = STATE(36), - [sym_preproc_if] = STATE(36), - [sym_preproc_ifdef] = STATE(36), - [sym_function_definition] = STATE(36), - [sym_declaration] = STATE(36), - [sym_type_definition] = STATE(36), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1004), - [sym_linkage_specification] = STATE(36), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(642), - [sym_compound_statement] = STATE(36), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(846), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(36), - [sym_labeled_statement] = STATE(36), - [sym_expression_statement] = STATE(36), - [sym_if_statement] = STATE(36), - [sym_switch_statement] = STATE(36), - [sym_case_statement] = STATE(36), - [sym_while_statement] = STATE(36), - [sym_do_statement] = STATE(36), - [sym_for_statement] = STATE(36), - [sym_return_statement] = STATE(36), - [sym_break_statement] = STATE(36), - [sym_continue_statement] = STATE(36), - [sym_goto_statement] = STATE(36), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(36), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(36), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(301), - [aux_sym_preproc_include_token1] = ACTIONS(303), - [aux_sym_preproc_def_token1] = ACTIONS(305), - [aux_sym_preproc_if_token1] = ACTIONS(307), - [aux_sym_preproc_ifdef_token1] = ACTIONS(309), - [aux_sym_preproc_ifdef_token2] = ACTIONS(309), - [sym_preproc_directive] = ACTIONS(311), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(317), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(535), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [35] = { - [sym_preproc_include] = STATE(42), - [sym_preproc_def] = STATE(42), - [sym_preproc_function_def] = STATE(42), - [sym_preproc_call] = STATE(42), - [sym_preproc_if] = STATE(42), - [sym_preproc_ifdef] = STATE(42), - [sym_function_definition] = STATE(42), - [sym_declaration] = STATE(42), - [sym_type_definition] = STATE(42), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1004), - [sym_linkage_specification] = STATE(42), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(642), - [sym_compound_statement] = STATE(42), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(846), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(42), - [sym_labeled_statement] = STATE(42), - [sym_expression_statement] = STATE(42), - [sym_if_statement] = STATE(42), - [sym_switch_statement] = STATE(42), - [sym_case_statement] = STATE(42), - [sym_while_statement] = STATE(42), - [sym_do_statement] = STATE(42), - [sym_for_statement] = STATE(42), - [sym_return_statement] = STATE(42), - [sym_break_statement] = STATE(42), - [sym_continue_statement] = STATE(42), - [sym_goto_statement] = STATE(42), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(42), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(42), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(301), - [aux_sym_preproc_include_token1] = ACTIONS(303), - [aux_sym_preproc_def_token1] = ACTIONS(305), - [aux_sym_preproc_if_token1] = ACTIONS(307), - [aux_sym_preproc_ifdef_token1] = ACTIONS(309), - [aux_sym_preproc_ifdef_token2] = ACTIONS(309), - [sym_preproc_directive] = ACTIONS(311), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(317), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(537), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [36] = { - [sym_preproc_include] = STATE(36), - [sym_preproc_def] = STATE(36), - [sym_preproc_function_def] = STATE(36), - [sym_preproc_call] = STATE(36), - [sym_preproc_if] = STATE(36), - [sym_preproc_ifdef] = STATE(36), - [sym_function_definition] = STATE(36), - [sym_declaration] = STATE(36), - [sym_type_definition] = STATE(36), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1004), - [sym_linkage_specification] = STATE(36), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(642), - [sym_compound_statement] = STATE(36), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(846), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(36), - [sym_labeled_statement] = STATE(36), - [sym_expression_statement] = STATE(36), - [sym_if_statement] = STATE(36), - [sym_switch_statement] = STATE(36), - [sym_case_statement] = STATE(36), - [sym_while_statement] = STATE(36), - [sym_do_statement] = STATE(36), - [sym_for_statement] = STATE(36), - [sym_return_statement] = STATE(36), - [sym_break_statement] = STATE(36), - [sym_continue_statement] = STATE(36), - [sym_goto_statement] = STATE(36), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(36), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(36), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(539), - [aux_sym_preproc_include_token1] = ACTIONS(542), - [aux_sym_preproc_def_token1] = ACTIONS(545), - [aux_sym_preproc_if_token1] = ACTIONS(548), - [aux_sym_preproc_ifdef_token1] = ACTIONS(551), - [aux_sym_preproc_ifdef_token2] = ACTIONS(551), - [sym_preproc_directive] = ACTIONS(554), - [anon_sym_LPAREN2] = ACTIONS(193), - [anon_sym_BANG] = ACTIONS(196), - [anon_sym_TILDE] = ACTIONS(196), - [anon_sym_DASH] = ACTIONS(199), - [anon_sym_PLUS] = ACTIONS(199), - [anon_sym_STAR] = ACTIONS(202), - [anon_sym_AMP] = ACTIONS(202), - [anon_sym_SEMI] = ACTIONS(557), - [anon_sym_typedef] = ACTIONS(560), - [anon_sym_extern] = ACTIONS(563), - [anon_sym___attribute__] = ACTIONS(214), - [anon_sym_LBRACK_LBRACK] = ACTIONS(217), - [anon_sym___declspec] = ACTIONS(220), - [anon_sym___cdecl] = ACTIONS(223), - [anon_sym___clrcall] = ACTIONS(223), - [anon_sym___stdcall] = ACTIONS(223), - [anon_sym___fastcall] = ACTIONS(223), - [anon_sym___thiscall] = ACTIONS(223), - [anon_sym___vectorcall] = ACTIONS(223), - [anon_sym_LBRACE] = ACTIONS(566), - [anon_sym_RBRACE] = ACTIONS(418), - [anon_sym_static] = ACTIONS(229), - [anon_sym_auto] = ACTIONS(229), - [anon_sym_register] = ACTIONS(229), - [anon_sym_inline] = ACTIONS(229), - [anon_sym_const] = ACTIONS(232), - [anon_sym_volatile] = ACTIONS(232), - [anon_sym_restrict] = ACTIONS(232), - [anon_sym__Atomic] = ACTIONS(232), - [anon_sym_signed] = ACTIONS(235), - [anon_sym_unsigned] = ACTIONS(235), - [anon_sym_long] = ACTIONS(235), - [anon_sym_short] = ACTIONS(235), - [sym_primitive_type] = ACTIONS(238), - [anon_sym_enum] = ACTIONS(241), - [anon_sym_struct] = ACTIONS(244), - [anon_sym_union] = ACTIONS(247), - [anon_sym_if] = ACTIONS(569), - [anon_sym_switch] = ACTIONS(572), - [anon_sym_case] = ACTIONS(575), - [anon_sym_default] = ACTIONS(578), - [anon_sym_while] = ACTIONS(581), - [anon_sym_do] = ACTIONS(584), - [anon_sym_for] = ACTIONS(587), - [anon_sym_return] = ACTIONS(590), - [anon_sym_break] = ACTIONS(593), - [anon_sym_continue] = ACTIONS(596), - [anon_sym_goto] = ACTIONS(599), - [anon_sym_DASH_DASH] = ACTIONS(283), - [anon_sym_PLUS_PLUS] = ACTIONS(283), - [anon_sym_sizeof] = ACTIONS(286), - [sym_number_literal] = ACTIONS(289), - [anon_sym_L_SQUOTE] = ACTIONS(292), - [anon_sym_u_SQUOTE] = ACTIONS(292), - [anon_sym_U_SQUOTE] = ACTIONS(292), - [anon_sym_u8_SQUOTE] = ACTIONS(292), - [anon_sym_SQUOTE] = ACTIONS(292), - [anon_sym_L_DQUOTE] = ACTIONS(295), - [anon_sym_u_DQUOTE] = ACTIONS(295), - [anon_sym_U_DQUOTE] = ACTIONS(295), - [anon_sym_u8_DQUOTE] = ACTIONS(295), - [anon_sym_DQUOTE] = ACTIONS(295), - [sym_true] = ACTIONS(298), - [sym_false] = ACTIONS(298), - [sym_null] = ACTIONS(298), - [sym_comment] = ACTIONS(3), - }, - [37] = { - [sym_preproc_include] = STATE(36), - [sym_preproc_def] = STATE(36), - [sym_preproc_function_def] = STATE(36), - [sym_preproc_call] = STATE(36), - [sym_preproc_if] = STATE(36), - [sym_preproc_ifdef] = STATE(36), - [sym_function_definition] = STATE(36), - [sym_declaration] = STATE(36), - [sym_type_definition] = STATE(36), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1004), - [sym_linkage_specification] = STATE(36), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(642), - [sym_compound_statement] = STATE(36), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(846), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(36), - [sym_labeled_statement] = STATE(36), - [sym_expression_statement] = STATE(36), - [sym_if_statement] = STATE(36), - [sym_switch_statement] = STATE(36), - [sym_case_statement] = STATE(36), - [sym_while_statement] = STATE(36), - [sym_do_statement] = STATE(36), - [sym_for_statement] = STATE(36), - [sym_return_statement] = STATE(36), - [sym_break_statement] = STATE(36), - [sym_continue_statement] = STATE(36), - [sym_goto_statement] = STATE(36), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(36), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(36), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(301), - [aux_sym_preproc_include_token1] = ACTIONS(303), - [aux_sym_preproc_def_token1] = ACTIONS(305), - [aux_sym_preproc_if_token1] = ACTIONS(307), - [aux_sym_preproc_ifdef_token1] = ACTIONS(309), - [aux_sym_preproc_ifdef_token2] = ACTIONS(309), - [sym_preproc_directive] = ACTIONS(311), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(317), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(602), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [38] = { - [sym_preproc_include] = STATE(28), - [sym_preproc_def] = STATE(28), - [sym_preproc_function_def] = STATE(28), - [sym_preproc_call] = STATE(28), - [sym_preproc_if] = STATE(28), - [sym_preproc_ifdef] = STATE(28), - [sym_function_definition] = STATE(28), - [sym_declaration] = STATE(28), - [sym_type_definition] = STATE(28), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1003), - [sym_linkage_specification] = STATE(28), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(641), - [sym_compound_statement] = STATE(28), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(844), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(28), - [sym_labeled_statement] = STATE(28), - [sym_expression_statement] = STATE(28), - [sym_if_statement] = STATE(28), - [sym_switch_statement] = STATE(28), - [sym_case_statement] = STATE(28), - [sym_while_statement] = STATE(28), - [sym_do_statement] = STATE(28), - [sym_for_statement] = STATE(28), - [sym_return_statement] = STATE(28), - [sym_break_statement] = STATE(28), - [sym_continue_statement] = STATE(28), - [sym_goto_statement] = STATE(28), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(28), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(28), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [ts_builtin_sym_end] = ACTIONS(604), - [sym_identifier] = ACTIONS(7), - [aux_sym_preproc_include_token1] = ACTIONS(9), - [aux_sym_preproc_def_token1] = ACTIONS(11), - [aux_sym_preproc_if_token1] = ACTIONS(13), - [aux_sym_preproc_ifdef_token1] = ACTIONS(15), - [aux_sym_preproc_ifdef_token2] = ACTIONS(15), - [sym_preproc_directive] = ACTIONS(17), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_typedef] = ACTIONS(29), - [anon_sym_extern] = ACTIONS(31), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [39] = { - [sym_preproc_include] = STATE(23), - [sym_preproc_def] = STATE(23), - [sym_preproc_function_def] = STATE(23), - [sym_preproc_call] = STATE(23), - [sym_preproc_if] = STATE(23), - [sym_preproc_ifdef] = STATE(23), - [sym_function_definition] = STATE(23), - [sym_declaration] = STATE(23), - [sym_type_definition] = STATE(23), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1012), - [sym_linkage_specification] = STATE(23), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(644), - [sym_compound_statement] = STATE(23), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(845), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(23), - [sym_labeled_statement] = STATE(23), - [sym_expression_statement] = STATE(23), - [sym_if_statement] = STATE(23), - [sym_switch_statement] = STATE(23), - [sym_case_statement] = STATE(23), - [sym_while_statement] = STATE(23), - [sym_do_statement] = STATE(23), - [sym_for_statement] = STATE(23), - [sym_return_statement] = STATE(23), - [sym_break_statement] = STATE(23), - [sym_continue_statement] = STATE(23), - [sym_goto_statement] = STATE(23), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(23), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(23), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(491), - [aux_sym_preproc_include_token1] = ACTIONS(493), - [aux_sym_preproc_def_token1] = ACTIONS(495), - [aux_sym_preproc_if_token1] = ACTIONS(497), - [aux_sym_preproc_if_token2] = ACTIONS(606), - [aux_sym_preproc_ifdef_token1] = ACTIONS(501), - [aux_sym_preproc_ifdef_token2] = ACTIONS(501), - [sym_preproc_directive] = ACTIONS(503), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_typedef] = ACTIONS(507), - [anon_sym_extern] = ACTIONS(509), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [40] = { - [sym_preproc_include] = STATE(37), - [sym_preproc_def] = STATE(37), - [sym_preproc_function_def] = STATE(37), - [sym_preproc_call] = STATE(37), - [sym_preproc_if] = STATE(37), - [sym_preproc_ifdef] = STATE(37), - [sym_function_definition] = STATE(37), - [sym_declaration] = STATE(37), - [sym_type_definition] = STATE(37), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1004), - [sym_linkage_specification] = STATE(37), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(642), - [sym_compound_statement] = STATE(37), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(846), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(37), - [sym_labeled_statement] = STATE(37), - [sym_expression_statement] = STATE(37), - [sym_if_statement] = STATE(37), - [sym_switch_statement] = STATE(37), - [sym_case_statement] = STATE(37), - [sym_while_statement] = STATE(37), - [sym_do_statement] = STATE(37), - [sym_for_statement] = STATE(37), - [sym_return_statement] = STATE(37), - [sym_break_statement] = STATE(37), - [sym_continue_statement] = STATE(37), - [sym_goto_statement] = STATE(37), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(37), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(37), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(301), - [aux_sym_preproc_include_token1] = ACTIONS(303), - [aux_sym_preproc_def_token1] = ACTIONS(305), - [aux_sym_preproc_if_token1] = ACTIONS(307), - [aux_sym_preproc_ifdef_token1] = ACTIONS(309), - [aux_sym_preproc_ifdef_token2] = ACTIONS(309), - [sym_preproc_directive] = ACTIONS(311), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(317), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(608), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [41] = { - [sym_preproc_include] = STATE(22), - [sym_preproc_def] = STATE(22), - [sym_preproc_function_def] = STATE(22), - [sym_preproc_call] = STATE(22), - [sym_preproc_if] = STATE(22), - [sym_preproc_ifdef] = STATE(22), - [sym_function_definition] = STATE(22), - [sym_declaration] = STATE(22), - [sym_type_definition] = STATE(22), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1004), - [sym_linkage_specification] = STATE(22), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(642), - [sym_compound_statement] = STATE(22), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(846), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(22), - [sym_labeled_statement] = STATE(22), - [sym_expression_statement] = STATE(22), - [sym_if_statement] = STATE(22), - [sym_switch_statement] = STATE(22), - [sym_case_statement] = STATE(22), - [sym_while_statement] = STATE(22), - [sym_do_statement] = STATE(22), - [sym_for_statement] = STATE(22), - [sym_return_statement] = STATE(22), - [sym_break_statement] = STATE(22), - [sym_continue_statement] = STATE(22), - [sym_goto_statement] = STATE(22), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(22), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(22), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(301), - [aux_sym_preproc_include_token1] = ACTIONS(303), - [aux_sym_preproc_def_token1] = ACTIONS(305), - [aux_sym_preproc_if_token1] = ACTIONS(307), - [aux_sym_preproc_ifdef_token1] = ACTIONS(309), - [aux_sym_preproc_ifdef_token2] = ACTIONS(309), - [sym_preproc_directive] = ACTIONS(311), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(317), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(610), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [42] = { - [sym_preproc_include] = STATE(36), - [sym_preproc_def] = STATE(36), - [sym_preproc_function_def] = STATE(36), - [sym_preproc_call] = STATE(36), - [sym_preproc_if] = STATE(36), - [sym_preproc_ifdef] = STATE(36), - [sym_function_definition] = STATE(36), - [sym_declaration] = STATE(36), - [sym_type_definition] = STATE(36), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1004), - [sym_linkage_specification] = STATE(36), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_ms_call_modifier] = STATE(642), - [sym_compound_statement] = STATE(36), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(846), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(36), - [sym_labeled_statement] = STATE(36), - [sym_expression_statement] = STATE(36), - [sym_if_statement] = STATE(36), - [sym_switch_statement] = STATE(36), - [sym_case_statement] = STATE(36), - [sym_while_statement] = STATE(36), - [sym_do_statement] = STATE(36), - [sym_for_statement] = STATE(36), - [sym_return_statement] = STATE(36), - [sym_break_statement] = STATE(36), - [sym_continue_statement] = STATE(36), - [sym_goto_statement] = STATE(36), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym__empty_declaration] = STATE(36), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_translation_unit_repeat1] = STATE(36), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(301), - [aux_sym_preproc_include_token1] = ACTIONS(303), - [aux_sym_preproc_def_token1] = ACTIONS(305), - [aux_sym_preproc_if_token1] = ACTIONS(307), - [aux_sym_preproc_ifdef_token1] = ACTIONS(309), - [aux_sym_preproc_ifdef_token2] = ACTIONS(309), - [sym_preproc_directive] = ACTIONS(311), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(317), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(39), - [anon_sym___clrcall] = ACTIONS(39), - [anon_sym___stdcall] = ACTIONS(39), - [anon_sym___fastcall] = ACTIONS(39), - [anon_sym___thiscall] = ACTIONS(39), - [anon_sym___vectorcall] = ACTIONS(39), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(612), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [43] = { - [sym_declaration] = STATE(45), - [sym_type_definition] = STATE(45), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1006), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(45), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(45), - [sym_labeled_statement] = STATE(45), - [sym_expression_statement] = STATE(45), - [sym_if_statement] = STATE(45), - [sym_switch_statement] = STATE(45), - [sym_while_statement] = STATE(45), - [sym_do_statement] = STATE(45), - [sym_for_statement] = STATE(45), - [sym_return_statement] = STATE(45), - [sym_break_statement] = STATE(45), - [sym_continue_statement] = STATE(45), - [sym_goto_statement] = STATE(45), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(45), - [sym_identifier] = ACTIONS(614), - [aux_sym_preproc_include_token1] = ACTIONS(616), - [aux_sym_preproc_def_token1] = ACTIONS(616), - [aux_sym_preproc_if_token1] = ACTIONS(616), - [aux_sym_preproc_if_token2] = ACTIONS(616), - [aux_sym_preproc_ifdef_token1] = ACTIONS(616), - [aux_sym_preproc_ifdef_token2] = ACTIONS(616), - [aux_sym_preproc_else_token1] = ACTIONS(616), - [aux_sym_preproc_elif_token1] = ACTIONS(616), - [sym_preproc_directive] = ACTIONS(616), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(616), - [anon_sym___clrcall] = ACTIONS(616), - [anon_sym___stdcall] = ACTIONS(616), - [anon_sym___fastcall] = ACTIONS(616), - [anon_sym___thiscall] = ACTIONS(616), - [anon_sym___vectorcall] = ACTIONS(616), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_else] = ACTIONS(616), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(616), - [anon_sym_default] = ACTIONS(616), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [44] = { - [sym_declaration] = STATE(43), - [sym_type_definition] = STATE(43), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1006), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(43), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(43), - [sym_labeled_statement] = STATE(43), - [sym_expression_statement] = STATE(43), - [sym_if_statement] = STATE(43), - [sym_switch_statement] = STATE(43), - [sym_while_statement] = STATE(43), - [sym_do_statement] = STATE(43), - [sym_for_statement] = STATE(43), - [sym_return_statement] = STATE(43), - [sym_break_statement] = STATE(43), - [sym_continue_statement] = STATE(43), - [sym_goto_statement] = STATE(43), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(43), - [sym_identifier] = ACTIONS(614), - [aux_sym_preproc_include_token1] = ACTIONS(618), - [aux_sym_preproc_def_token1] = ACTIONS(618), - [aux_sym_preproc_if_token1] = ACTIONS(618), - [aux_sym_preproc_if_token2] = ACTIONS(618), - [aux_sym_preproc_ifdef_token1] = ACTIONS(618), - [aux_sym_preproc_ifdef_token2] = ACTIONS(618), - [aux_sym_preproc_else_token1] = ACTIONS(618), - [aux_sym_preproc_elif_token1] = ACTIONS(618), - [sym_preproc_directive] = ACTIONS(618), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(618), - [anon_sym___clrcall] = ACTIONS(618), - [anon_sym___stdcall] = ACTIONS(618), - [anon_sym___fastcall] = ACTIONS(618), - [anon_sym___thiscall] = ACTIONS(618), - [anon_sym___vectorcall] = ACTIONS(618), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_else] = ACTIONS(618), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(618), - [anon_sym_default] = ACTIONS(618), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [45] = { - [sym_declaration] = STATE(45), - [sym_type_definition] = STATE(45), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1006), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(45), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(45), - [sym_labeled_statement] = STATE(45), - [sym_expression_statement] = STATE(45), - [sym_if_statement] = STATE(45), - [sym_switch_statement] = STATE(45), - [sym_while_statement] = STATE(45), - [sym_do_statement] = STATE(45), - [sym_for_statement] = STATE(45), - [sym_return_statement] = STATE(45), - [sym_break_statement] = STATE(45), - [sym_continue_statement] = STATE(45), - [sym_goto_statement] = STATE(45), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(45), - [sym_identifier] = ACTIONS(620), - [aux_sym_preproc_include_token1] = ACTIONS(623), - [aux_sym_preproc_def_token1] = ACTIONS(623), - [aux_sym_preproc_if_token1] = ACTIONS(623), - [aux_sym_preproc_if_token2] = ACTIONS(623), - [aux_sym_preproc_ifdef_token1] = ACTIONS(623), - [aux_sym_preproc_ifdef_token2] = ACTIONS(623), - [aux_sym_preproc_else_token1] = ACTIONS(623), - [aux_sym_preproc_elif_token1] = ACTIONS(623), - [sym_preproc_directive] = ACTIONS(623), - [anon_sym_LPAREN2] = ACTIONS(625), - [anon_sym_BANG] = ACTIONS(628), - [anon_sym_TILDE] = ACTIONS(628), - [anon_sym_DASH] = ACTIONS(631), - [anon_sym_PLUS] = ACTIONS(631), - [anon_sym_STAR] = ACTIONS(634), - [anon_sym_AMP] = ACTIONS(634), - [anon_sym_SEMI] = ACTIONS(637), - [anon_sym_typedef] = ACTIONS(640), - [anon_sym_extern] = ACTIONS(643), - [anon_sym___attribute__] = ACTIONS(646), - [anon_sym_LBRACK_LBRACK] = ACTIONS(649), - [anon_sym___declspec] = ACTIONS(652), - [anon_sym___cdecl] = ACTIONS(623), - [anon_sym___clrcall] = ACTIONS(623), - [anon_sym___stdcall] = ACTIONS(623), - [anon_sym___fastcall] = ACTIONS(623), - [anon_sym___thiscall] = ACTIONS(623), - [anon_sym___vectorcall] = ACTIONS(623), - [anon_sym_LBRACE] = ACTIONS(655), - [anon_sym_static] = ACTIONS(643), - [anon_sym_auto] = ACTIONS(643), - [anon_sym_register] = ACTIONS(643), - [anon_sym_inline] = ACTIONS(643), - [anon_sym_const] = ACTIONS(658), - [anon_sym_volatile] = ACTIONS(658), - [anon_sym_restrict] = ACTIONS(658), - [anon_sym__Atomic] = ACTIONS(658), - [anon_sym_signed] = ACTIONS(661), - [anon_sym_unsigned] = ACTIONS(661), - [anon_sym_long] = ACTIONS(661), - [anon_sym_short] = ACTIONS(661), - [sym_primitive_type] = ACTIONS(664), - [anon_sym_enum] = ACTIONS(667), - [anon_sym_struct] = ACTIONS(670), - [anon_sym_union] = ACTIONS(673), - [anon_sym_if] = ACTIONS(676), - [anon_sym_else] = ACTIONS(623), - [anon_sym_switch] = ACTIONS(679), - [anon_sym_case] = ACTIONS(623), - [anon_sym_default] = ACTIONS(623), - [anon_sym_while] = ACTIONS(682), - [anon_sym_do] = ACTIONS(685), - [anon_sym_for] = ACTIONS(688), - [anon_sym_return] = ACTIONS(691), - [anon_sym_break] = ACTIONS(694), - [anon_sym_continue] = ACTIONS(697), - [anon_sym_goto] = ACTIONS(700), - [anon_sym_DASH_DASH] = ACTIONS(703), - [anon_sym_PLUS_PLUS] = ACTIONS(703), - [anon_sym_sizeof] = ACTIONS(706), - [sym_number_literal] = ACTIONS(709), - [anon_sym_L_SQUOTE] = ACTIONS(712), - [anon_sym_u_SQUOTE] = ACTIONS(712), - [anon_sym_U_SQUOTE] = ACTIONS(712), - [anon_sym_u8_SQUOTE] = ACTIONS(712), - [anon_sym_SQUOTE] = ACTIONS(712), - [anon_sym_L_DQUOTE] = ACTIONS(715), - [anon_sym_u_DQUOTE] = ACTIONS(715), - [anon_sym_U_DQUOTE] = ACTIONS(715), - [anon_sym_u8_DQUOTE] = ACTIONS(715), - [anon_sym_DQUOTE] = ACTIONS(715), - [sym_true] = ACTIONS(718), - [sym_false] = ACTIONS(718), - [sym_null] = ACTIONS(718), - [sym_comment] = ACTIONS(3), - }, - [46] = { - [sym_declaration] = STATE(47), - [sym_type_definition] = STATE(47), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1006), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(47), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(47), - [sym_labeled_statement] = STATE(47), - [sym_expression_statement] = STATE(47), - [sym_if_statement] = STATE(47), - [sym_switch_statement] = STATE(47), - [sym_while_statement] = STATE(47), - [sym_do_statement] = STATE(47), - [sym_for_statement] = STATE(47), - [sym_return_statement] = STATE(47), - [sym_break_statement] = STATE(47), - [sym_continue_statement] = STATE(47), - [sym_goto_statement] = STATE(47), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(47), - [sym_identifier] = ACTIONS(614), - [aux_sym_preproc_include_token1] = ACTIONS(721), - [aux_sym_preproc_def_token1] = ACTIONS(721), - [aux_sym_preproc_if_token1] = ACTIONS(721), - [aux_sym_preproc_if_token2] = ACTIONS(721), - [aux_sym_preproc_ifdef_token1] = ACTIONS(721), - [aux_sym_preproc_ifdef_token2] = ACTIONS(721), - [aux_sym_preproc_else_token1] = ACTIONS(721), - [aux_sym_preproc_elif_token1] = ACTIONS(721), - [sym_preproc_directive] = ACTIONS(721), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(721), - [anon_sym___clrcall] = ACTIONS(721), - [anon_sym___stdcall] = ACTIONS(721), - [anon_sym___fastcall] = ACTIONS(721), - [anon_sym___thiscall] = ACTIONS(721), - [anon_sym___vectorcall] = ACTIONS(721), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_else] = ACTIONS(721), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(721), - [anon_sym_default] = ACTIONS(721), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [47] = { - [sym_declaration] = STATE(45), - [sym_type_definition] = STATE(45), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1006), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(45), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(45), - [sym_labeled_statement] = STATE(45), - [sym_expression_statement] = STATE(45), - [sym_if_statement] = STATE(45), - [sym_switch_statement] = STATE(45), - [sym_while_statement] = STATE(45), - [sym_do_statement] = STATE(45), - [sym_for_statement] = STATE(45), - [sym_return_statement] = STATE(45), - [sym_break_statement] = STATE(45), - [sym_continue_statement] = STATE(45), - [sym_goto_statement] = STATE(45), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(45), - [sym_identifier] = ACTIONS(614), - [aux_sym_preproc_include_token1] = ACTIONS(723), - [aux_sym_preproc_def_token1] = ACTIONS(723), - [aux_sym_preproc_if_token1] = ACTIONS(723), - [aux_sym_preproc_if_token2] = ACTIONS(723), - [aux_sym_preproc_ifdef_token1] = ACTIONS(723), - [aux_sym_preproc_ifdef_token2] = ACTIONS(723), - [aux_sym_preproc_else_token1] = ACTIONS(723), - [aux_sym_preproc_elif_token1] = ACTIONS(723), - [sym_preproc_directive] = ACTIONS(723), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_typedef] = ACTIONS(111), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(723), - [anon_sym___clrcall] = ACTIONS(723), - [anon_sym___stdcall] = ACTIONS(723), - [anon_sym___fastcall] = ACTIONS(723), - [anon_sym___thiscall] = ACTIONS(723), - [anon_sym___vectorcall] = ACTIONS(723), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(117), - [anon_sym_else] = ACTIONS(723), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(723), - [anon_sym_default] = ACTIONS(723), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [48] = { - [sym_declaration] = STATE(55), - [sym_type_definition] = STATE(55), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1011), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(55), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(55), - [sym_labeled_statement] = STATE(55), - [sym_expression_statement] = STATE(55), - [sym_if_statement] = STATE(55), - [sym_switch_statement] = STATE(55), - [sym_while_statement] = STATE(55), - [sym_do_statement] = STATE(55), - [sym_for_statement] = STATE(55), - [sym_return_statement] = STATE(55), - [sym_break_statement] = STATE(55), - [sym_continue_statement] = STATE(55), - [sym_goto_statement] = STATE(55), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(55), - [ts_builtin_sym_end] = ACTIONS(725), - [sym_identifier] = ACTIONS(727), - [aux_sym_preproc_include_token1] = ACTIONS(618), - [aux_sym_preproc_def_token1] = ACTIONS(618), - [aux_sym_preproc_if_token1] = ACTIONS(618), - [aux_sym_preproc_ifdef_token1] = ACTIONS(618), - [aux_sym_preproc_ifdef_token2] = ACTIONS(618), - [sym_preproc_directive] = ACTIONS(618), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_typedef] = ACTIONS(29), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(618), - [anon_sym___clrcall] = ACTIONS(618), - [anon_sym___stdcall] = ACTIONS(618), - [anon_sym___fastcall] = ACTIONS(618), - [anon_sym___thiscall] = ACTIONS(618), - [anon_sym___vectorcall] = ACTIONS(618), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(57), - [anon_sym_else] = ACTIONS(618), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(618), - [anon_sym_default] = ACTIONS(618), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [49] = { - [sym_declaration] = STATE(57), - [sym_type_definition] = STATE(57), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1010), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(57), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(57), - [sym_labeled_statement] = STATE(57), - [sym_expression_statement] = STATE(57), - [sym_if_statement] = STATE(57), - [sym_switch_statement] = STATE(57), - [sym_while_statement] = STATE(57), - [sym_do_statement] = STATE(57), - [sym_for_statement] = STATE(57), - [sym_return_statement] = STATE(57), - [sym_break_statement] = STATE(57), - [sym_continue_statement] = STATE(57), - [sym_goto_statement] = STATE(57), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(57), - [sym_identifier] = ACTIONS(729), - [aux_sym_preproc_include_token1] = ACTIONS(616), - [aux_sym_preproc_def_token1] = ACTIONS(616), - [aux_sym_preproc_if_token1] = ACTIONS(616), - [aux_sym_preproc_if_token2] = ACTIONS(616), - [aux_sym_preproc_ifdef_token1] = ACTIONS(616), - [aux_sym_preproc_ifdef_token2] = ACTIONS(616), - [sym_preproc_directive] = ACTIONS(616), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_typedef] = ACTIONS(507), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(616), - [anon_sym___clrcall] = ACTIONS(616), - [anon_sym___stdcall] = ACTIONS(616), - [anon_sym___fastcall] = ACTIONS(616), - [anon_sym___thiscall] = ACTIONS(616), - [anon_sym___vectorcall] = ACTIONS(616), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(513), - [anon_sym_else] = ACTIONS(616), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(616), - [anon_sym_default] = ACTIONS(616), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [50] = { - [sym_declaration] = STATE(50), - [sym_type_definition] = STATE(50), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1011), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(50), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(50), - [sym_labeled_statement] = STATE(50), - [sym_expression_statement] = STATE(50), - [sym_if_statement] = STATE(50), - [sym_switch_statement] = STATE(50), - [sym_while_statement] = STATE(50), - [sym_do_statement] = STATE(50), - [sym_for_statement] = STATE(50), - [sym_return_statement] = STATE(50), - [sym_break_statement] = STATE(50), - [sym_continue_statement] = STATE(50), - [sym_goto_statement] = STATE(50), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(50), - [ts_builtin_sym_end] = ACTIONS(731), - [sym_identifier] = ACTIONS(733), - [aux_sym_preproc_include_token1] = ACTIONS(623), - [aux_sym_preproc_def_token1] = ACTIONS(623), - [aux_sym_preproc_if_token1] = ACTIONS(623), - [aux_sym_preproc_ifdef_token1] = ACTIONS(623), - [aux_sym_preproc_ifdef_token2] = ACTIONS(623), - [sym_preproc_directive] = ACTIONS(623), - [anon_sym_LPAREN2] = ACTIONS(625), - [anon_sym_BANG] = ACTIONS(628), - [anon_sym_TILDE] = ACTIONS(628), - [anon_sym_DASH] = ACTIONS(631), - [anon_sym_PLUS] = ACTIONS(631), - [anon_sym_STAR] = ACTIONS(634), - [anon_sym_AMP] = ACTIONS(634), - [anon_sym_SEMI] = ACTIONS(736), - [anon_sym_typedef] = ACTIONS(739), - [anon_sym_extern] = ACTIONS(643), - [anon_sym___attribute__] = ACTIONS(646), - [anon_sym_LBRACK_LBRACK] = ACTIONS(649), - [anon_sym___declspec] = ACTIONS(652), - [anon_sym___cdecl] = ACTIONS(623), - [anon_sym___clrcall] = ACTIONS(623), - [anon_sym___stdcall] = ACTIONS(623), - [anon_sym___fastcall] = ACTIONS(623), - [anon_sym___thiscall] = ACTIONS(623), - [anon_sym___vectorcall] = ACTIONS(623), - [anon_sym_LBRACE] = ACTIONS(742), - [anon_sym_static] = ACTIONS(643), - [anon_sym_auto] = ACTIONS(643), - [anon_sym_register] = ACTIONS(643), - [anon_sym_inline] = ACTIONS(643), - [anon_sym_const] = ACTIONS(658), - [anon_sym_volatile] = ACTIONS(658), - [anon_sym_restrict] = ACTIONS(658), - [anon_sym__Atomic] = ACTIONS(658), - [anon_sym_signed] = ACTIONS(661), - [anon_sym_unsigned] = ACTIONS(661), - [anon_sym_long] = ACTIONS(661), - [anon_sym_short] = ACTIONS(661), - [sym_primitive_type] = ACTIONS(664), - [anon_sym_enum] = ACTIONS(667), - [anon_sym_struct] = ACTIONS(670), - [anon_sym_union] = ACTIONS(673), - [anon_sym_if] = ACTIONS(745), - [anon_sym_else] = ACTIONS(623), - [anon_sym_switch] = ACTIONS(748), - [anon_sym_case] = ACTIONS(623), - [anon_sym_default] = ACTIONS(623), - [anon_sym_while] = ACTIONS(751), - [anon_sym_do] = ACTIONS(754), - [anon_sym_for] = ACTIONS(757), - [anon_sym_return] = ACTIONS(760), - [anon_sym_break] = ACTIONS(763), - [anon_sym_continue] = ACTIONS(766), - [anon_sym_goto] = ACTIONS(769), - [anon_sym_DASH_DASH] = ACTIONS(703), - [anon_sym_PLUS_PLUS] = ACTIONS(703), - [anon_sym_sizeof] = ACTIONS(706), - [sym_number_literal] = ACTIONS(709), - [anon_sym_L_SQUOTE] = ACTIONS(712), - [anon_sym_u_SQUOTE] = ACTIONS(712), - [anon_sym_U_SQUOTE] = ACTIONS(712), - [anon_sym_u8_SQUOTE] = ACTIONS(712), - [anon_sym_SQUOTE] = ACTIONS(712), - [anon_sym_L_DQUOTE] = ACTIONS(715), - [anon_sym_u_DQUOTE] = ACTIONS(715), - [anon_sym_U_DQUOTE] = ACTIONS(715), - [anon_sym_u8_DQUOTE] = ACTIONS(715), - [anon_sym_DQUOTE] = ACTIONS(715), - [sym_true] = ACTIONS(718), - [sym_false] = ACTIONS(718), - [sym_null] = ACTIONS(718), - [sym_comment] = ACTIONS(3), - }, - [51] = { - [sym_declaration] = STATE(49), - [sym_type_definition] = STATE(49), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1010), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(49), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(49), - [sym_labeled_statement] = STATE(49), - [sym_expression_statement] = STATE(49), - [sym_if_statement] = STATE(49), - [sym_switch_statement] = STATE(49), - [sym_while_statement] = STATE(49), - [sym_do_statement] = STATE(49), - [sym_for_statement] = STATE(49), - [sym_return_statement] = STATE(49), - [sym_break_statement] = STATE(49), - [sym_continue_statement] = STATE(49), - [sym_goto_statement] = STATE(49), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(49), - [sym_identifier] = ACTIONS(729), - [aux_sym_preproc_include_token1] = ACTIONS(618), - [aux_sym_preproc_def_token1] = ACTIONS(618), - [aux_sym_preproc_if_token1] = ACTIONS(618), - [aux_sym_preproc_if_token2] = ACTIONS(618), - [aux_sym_preproc_ifdef_token1] = ACTIONS(618), - [aux_sym_preproc_ifdef_token2] = ACTIONS(618), - [sym_preproc_directive] = ACTIONS(618), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_typedef] = ACTIONS(507), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(618), - [anon_sym___clrcall] = ACTIONS(618), - [anon_sym___stdcall] = ACTIONS(618), - [anon_sym___fastcall] = ACTIONS(618), - [anon_sym___thiscall] = ACTIONS(618), - [anon_sym___vectorcall] = ACTIONS(618), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(513), - [anon_sym_else] = ACTIONS(618), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(618), - [anon_sym_default] = ACTIONS(618), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [52] = { - [sym_declaration] = STATE(56), - [sym_type_definition] = STATE(56), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1010), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(56), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(56), - [sym_labeled_statement] = STATE(56), - [sym_expression_statement] = STATE(56), - [sym_if_statement] = STATE(56), - [sym_switch_statement] = STATE(56), - [sym_while_statement] = STATE(56), - [sym_do_statement] = STATE(56), - [sym_for_statement] = STATE(56), - [sym_return_statement] = STATE(56), - [sym_break_statement] = STATE(56), - [sym_continue_statement] = STATE(56), - [sym_goto_statement] = STATE(56), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(56), - [sym_identifier] = ACTIONS(729), - [aux_sym_preproc_include_token1] = ACTIONS(721), - [aux_sym_preproc_def_token1] = ACTIONS(721), - [aux_sym_preproc_if_token1] = ACTIONS(721), - [aux_sym_preproc_if_token2] = ACTIONS(721), - [aux_sym_preproc_ifdef_token1] = ACTIONS(721), - [aux_sym_preproc_ifdef_token2] = ACTIONS(721), - [sym_preproc_directive] = ACTIONS(721), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_typedef] = ACTIONS(507), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(721), - [anon_sym___clrcall] = ACTIONS(721), - [anon_sym___stdcall] = ACTIONS(721), - [anon_sym___fastcall] = ACTIONS(721), - [anon_sym___thiscall] = ACTIONS(721), - [anon_sym___vectorcall] = ACTIONS(721), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(513), - [anon_sym_else] = ACTIONS(721), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(721), - [anon_sym_default] = ACTIONS(721), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [53] = { - [sym_declaration] = STATE(54), - [sym_type_definition] = STATE(54), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1011), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(54), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(54), - [sym_labeled_statement] = STATE(54), - [sym_expression_statement] = STATE(54), - [sym_if_statement] = STATE(54), - [sym_switch_statement] = STATE(54), - [sym_while_statement] = STATE(54), - [sym_do_statement] = STATE(54), - [sym_for_statement] = STATE(54), - [sym_return_statement] = STATE(54), - [sym_break_statement] = STATE(54), - [sym_continue_statement] = STATE(54), - [sym_goto_statement] = STATE(54), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(54), - [ts_builtin_sym_end] = ACTIONS(772), - [sym_identifier] = ACTIONS(727), - [aux_sym_preproc_include_token1] = ACTIONS(721), - [aux_sym_preproc_def_token1] = ACTIONS(721), - [aux_sym_preproc_if_token1] = ACTIONS(721), - [aux_sym_preproc_ifdef_token1] = ACTIONS(721), - [aux_sym_preproc_ifdef_token2] = ACTIONS(721), - [sym_preproc_directive] = ACTIONS(721), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_typedef] = ACTIONS(29), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(721), - [anon_sym___clrcall] = ACTIONS(721), - [anon_sym___stdcall] = ACTIONS(721), - [anon_sym___fastcall] = ACTIONS(721), - [anon_sym___thiscall] = ACTIONS(721), - [anon_sym___vectorcall] = ACTIONS(721), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(57), - [anon_sym_else] = ACTIONS(721), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(721), - [anon_sym_default] = ACTIONS(721), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [54] = { - [sym_declaration] = STATE(50), - [sym_type_definition] = STATE(50), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1011), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(50), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(50), - [sym_labeled_statement] = STATE(50), - [sym_expression_statement] = STATE(50), - [sym_if_statement] = STATE(50), - [sym_switch_statement] = STATE(50), - [sym_while_statement] = STATE(50), - [sym_do_statement] = STATE(50), - [sym_for_statement] = STATE(50), - [sym_return_statement] = STATE(50), - [sym_break_statement] = STATE(50), - [sym_continue_statement] = STATE(50), - [sym_goto_statement] = STATE(50), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(50), - [ts_builtin_sym_end] = ACTIONS(774), - [sym_identifier] = ACTIONS(727), - [aux_sym_preproc_include_token1] = ACTIONS(723), - [aux_sym_preproc_def_token1] = ACTIONS(723), - [aux_sym_preproc_if_token1] = ACTIONS(723), - [aux_sym_preproc_ifdef_token1] = ACTIONS(723), - [aux_sym_preproc_ifdef_token2] = ACTIONS(723), - [sym_preproc_directive] = ACTIONS(723), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_typedef] = ACTIONS(29), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(723), - [anon_sym___clrcall] = ACTIONS(723), - [anon_sym___stdcall] = ACTIONS(723), - [anon_sym___fastcall] = ACTIONS(723), - [anon_sym___thiscall] = ACTIONS(723), - [anon_sym___vectorcall] = ACTIONS(723), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(57), - [anon_sym_else] = ACTIONS(723), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(723), - [anon_sym_default] = ACTIONS(723), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [55] = { - [sym_declaration] = STATE(50), - [sym_type_definition] = STATE(50), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1011), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(50), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(50), - [sym_labeled_statement] = STATE(50), - [sym_expression_statement] = STATE(50), - [sym_if_statement] = STATE(50), - [sym_switch_statement] = STATE(50), - [sym_while_statement] = STATE(50), - [sym_do_statement] = STATE(50), - [sym_for_statement] = STATE(50), - [sym_return_statement] = STATE(50), - [sym_break_statement] = STATE(50), - [sym_continue_statement] = STATE(50), - [sym_goto_statement] = STATE(50), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(50), - [ts_builtin_sym_end] = ACTIONS(776), - [sym_identifier] = ACTIONS(727), - [aux_sym_preproc_include_token1] = ACTIONS(616), - [aux_sym_preproc_def_token1] = ACTIONS(616), - [aux_sym_preproc_if_token1] = ACTIONS(616), - [aux_sym_preproc_ifdef_token1] = ACTIONS(616), - [aux_sym_preproc_ifdef_token2] = ACTIONS(616), - [sym_preproc_directive] = ACTIONS(616), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_typedef] = ACTIONS(29), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(616), - [anon_sym___clrcall] = ACTIONS(616), - [anon_sym___stdcall] = ACTIONS(616), - [anon_sym___fastcall] = ACTIONS(616), - [anon_sym___thiscall] = ACTIONS(616), - [anon_sym___vectorcall] = ACTIONS(616), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(57), - [anon_sym_else] = ACTIONS(616), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(616), - [anon_sym_default] = ACTIONS(616), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [56] = { - [sym_declaration] = STATE(57), - [sym_type_definition] = STATE(57), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1010), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(57), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(57), - [sym_labeled_statement] = STATE(57), - [sym_expression_statement] = STATE(57), - [sym_if_statement] = STATE(57), - [sym_switch_statement] = STATE(57), - [sym_while_statement] = STATE(57), - [sym_do_statement] = STATE(57), - [sym_for_statement] = STATE(57), - [sym_return_statement] = STATE(57), - [sym_break_statement] = STATE(57), - [sym_continue_statement] = STATE(57), - [sym_goto_statement] = STATE(57), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(57), - [sym_identifier] = ACTIONS(729), - [aux_sym_preproc_include_token1] = ACTIONS(723), - [aux_sym_preproc_def_token1] = ACTIONS(723), - [aux_sym_preproc_if_token1] = ACTIONS(723), - [aux_sym_preproc_if_token2] = ACTIONS(723), - [aux_sym_preproc_ifdef_token1] = ACTIONS(723), - [aux_sym_preproc_ifdef_token2] = ACTIONS(723), - [sym_preproc_directive] = ACTIONS(723), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_typedef] = ACTIONS(507), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(723), - [anon_sym___clrcall] = ACTIONS(723), - [anon_sym___stdcall] = ACTIONS(723), - [anon_sym___fastcall] = ACTIONS(723), - [anon_sym___thiscall] = ACTIONS(723), - [anon_sym___vectorcall] = ACTIONS(723), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(513), - [anon_sym_else] = ACTIONS(723), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(723), - [anon_sym_default] = ACTIONS(723), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [57] = { - [sym_declaration] = STATE(57), - [sym_type_definition] = STATE(57), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1010), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(57), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(57), - [sym_labeled_statement] = STATE(57), - [sym_expression_statement] = STATE(57), - [sym_if_statement] = STATE(57), - [sym_switch_statement] = STATE(57), - [sym_while_statement] = STATE(57), - [sym_do_statement] = STATE(57), - [sym_for_statement] = STATE(57), - [sym_return_statement] = STATE(57), - [sym_break_statement] = STATE(57), - [sym_continue_statement] = STATE(57), - [sym_goto_statement] = STATE(57), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(57), - [sym_identifier] = ACTIONS(778), - [aux_sym_preproc_include_token1] = ACTIONS(623), - [aux_sym_preproc_def_token1] = ACTIONS(623), - [aux_sym_preproc_if_token1] = ACTIONS(623), - [aux_sym_preproc_if_token2] = ACTIONS(623), - [aux_sym_preproc_ifdef_token1] = ACTIONS(623), - [aux_sym_preproc_ifdef_token2] = ACTIONS(623), - [sym_preproc_directive] = ACTIONS(623), - [anon_sym_LPAREN2] = ACTIONS(625), - [anon_sym_BANG] = ACTIONS(628), - [anon_sym_TILDE] = ACTIONS(628), - [anon_sym_DASH] = ACTIONS(631), - [anon_sym_PLUS] = ACTIONS(631), - [anon_sym_STAR] = ACTIONS(634), - [anon_sym_AMP] = ACTIONS(634), - [anon_sym_SEMI] = ACTIONS(781), - [anon_sym_typedef] = ACTIONS(784), - [anon_sym_extern] = ACTIONS(643), - [anon_sym___attribute__] = ACTIONS(646), - [anon_sym_LBRACK_LBRACK] = ACTIONS(649), - [anon_sym___declspec] = ACTIONS(652), - [anon_sym___cdecl] = ACTIONS(623), - [anon_sym___clrcall] = ACTIONS(623), - [anon_sym___stdcall] = ACTIONS(623), - [anon_sym___fastcall] = ACTIONS(623), - [anon_sym___thiscall] = ACTIONS(623), - [anon_sym___vectorcall] = ACTIONS(623), - [anon_sym_LBRACE] = ACTIONS(787), - [anon_sym_static] = ACTIONS(643), - [anon_sym_auto] = ACTIONS(643), - [anon_sym_register] = ACTIONS(643), - [anon_sym_inline] = ACTIONS(643), - [anon_sym_const] = ACTIONS(658), - [anon_sym_volatile] = ACTIONS(658), - [anon_sym_restrict] = ACTIONS(658), - [anon_sym__Atomic] = ACTIONS(658), - [anon_sym_signed] = ACTIONS(661), - [anon_sym_unsigned] = ACTIONS(661), - [anon_sym_long] = ACTIONS(661), - [anon_sym_short] = ACTIONS(661), - [sym_primitive_type] = ACTIONS(664), - [anon_sym_enum] = ACTIONS(667), - [anon_sym_struct] = ACTIONS(670), - [anon_sym_union] = ACTIONS(673), - [anon_sym_if] = ACTIONS(790), - [anon_sym_else] = ACTIONS(623), - [anon_sym_switch] = ACTIONS(793), - [anon_sym_case] = ACTIONS(623), - [anon_sym_default] = ACTIONS(623), - [anon_sym_while] = ACTIONS(796), - [anon_sym_do] = ACTIONS(799), - [anon_sym_for] = ACTIONS(802), - [anon_sym_return] = ACTIONS(805), - [anon_sym_break] = ACTIONS(808), - [anon_sym_continue] = ACTIONS(811), - [anon_sym_goto] = ACTIONS(814), - [anon_sym_DASH_DASH] = ACTIONS(703), - [anon_sym_PLUS_PLUS] = ACTIONS(703), - [anon_sym_sizeof] = ACTIONS(706), - [sym_number_literal] = ACTIONS(709), - [anon_sym_L_SQUOTE] = ACTIONS(712), - [anon_sym_u_SQUOTE] = ACTIONS(712), - [anon_sym_U_SQUOTE] = ACTIONS(712), - [anon_sym_u8_SQUOTE] = ACTIONS(712), - [anon_sym_SQUOTE] = ACTIONS(712), - [anon_sym_L_DQUOTE] = ACTIONS(715), - [anon_sym_u_DQUOTE] = ACTIONS(715), - [anon_sym_U_DQUOTE] = ACTIONS(715), - [anon_sym_u8_DQUOTE] = ACTIONS(715), - [anon_sym_DQUOTE] = ACTIONS(715), - [sym_true] = ACTIONS(718), - [sym_false] = ACTIONS(718), - [sym_null] = ACTIONS(718), - [sym_comment] = ACTIONS(3), - }, - [58] = { - [sym_declaration] = STATE(60), - [sym_type_definition] = STATE(60), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1005), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(60), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(60), - [sym_labeled_statement] = STATE(60), - [sym_expression_statement] = STATE(60), - [sym_if_statement] = STATE(60), - [sym_switch_statement] = STATE(60), - [sym_while_statement] = STATE(60), - [sym_do_statement] = STATE(60), - [sym_for_statement] = STATE(60), - [sym_return_statement] = STATE(60), - [sym_break_statement] = STATE(60), - [sym_continue_statement] = STATE(60), - [sym_goto_statement] = STATE(60), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(60), - [sym_identifier] = ACTIONS(817), - [aux_sym_preproc_include_token1] = ACTIONS(721), - [aux_sym_preproc_def_token1] = ACTIONS(721), - [aux_sym_preproc_if_token1] = ACTIONS(721), - [aux_sym_preproc_ifdef_token1] = ACTIONS(721), - [aux_sym_preproc_ifdef_token2] = ACTIONS(721), - [sym_preproc_directive] = ACTIONS(721), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(721), - [anon_sym___clrcall] = ACTIONS(721), - [anon_sym___stdcall] = ACTIONS(721), - [anon_sym___fastcall] = ACTIONS(721), - [anon_sym___thiscall] = ACTIONS(721), - [anon_sym___vectorcall] = ACTIONS(721), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(772), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_else] = ACTIONS(721), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(721), - [anon_sym_default] = ACTIONS(721), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [59] = { - [sym_declaration] = STATE(61), - [sym_type_definition] = STATE(61), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1005), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(61), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(61), - [sym_labeled_statement] = STATE(61), - [sym_expression_statement] = STATE(61), - [sym_if_statement] = STATE(61), - [sym_switch_statement] = STATE(61), - [sym_while_statement] = STATE(61), - [sym_do_statement] = STATE(61), - [sym_for_statement] = STATE(61), - [sym_return_statement] = STATE(61), - [sym_break_statement] = STATE(61), - [sym_continue_statement] = STATE(61), - [sym_goto_statement] = STATE(61), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(61), - [sym_identifier] = ACTIONS(817), - [aux_sym_preproc_include_token1] = ACTIONS(618), - [aux_sym_preproc_def_token1] = ACTIONS(618), - [aux_sym_preproc_if_token1] = ACTIONS(618), - [aux_sym_preproc_ifdef_token1] = ACTIONS(618), - [aux_sym_preproc_ifdef_token2] = ACTIONS(618), - [sym_preproc_directive] = ACTIONS(618), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(618), - [anon_sym___clrcall] = ACTIONS(618), - [anon_sym___stdcall] = ACTIONS(618), - [anon_sym___fastcall] = ACTIONS(618), - [anon_sym___thiscall] = ACTIONS(618), - [anon_sym___vectorcall] = ACTIONS(618), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(725), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_else] = ACTIONS(618), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(618), - [anon_sym_default] = ACTIONS(618), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [60] = { - [sym_declaration] = STATE(62), - [sym_type_definition] = STATE(62), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1005), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(62), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(62), - [sym_labeled_statement] = STATE(62), - [sym_expression_statement] = STATE(62), - [sym_if_statement] = STATE(62), - [sym_switch_statement] = STATE(62), - [sym_while_statement] = STATE(62), - [sym_do_statement] = STATE(62), - [sym_for_statement] = STATE(62), - [sym_return_statement] = STATE(62), - [sym_break_statement] = STATE(62), - [sym_continue_statement] = STATE(62), - [sym_goto_statement] = STATE(62), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(62), - [sym_identifier] = ACTIONS(817), - [aux_sym_preproc_include_token1] = ACTIONS(723), - [aux_sym_preproc_def_token1] = ACTIONS(723), - [aux_sym_preproc_if_token1] = ACTIONS(723), - [aux_sym_preproc_ifdef_token1] = ACTIONS(723), - [aux_sym_preproc_ifdef_token2] = ACTIONS(723), - [sym_preproc_directive] = ACTIONS(723), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(723), - [anon_sym___clrcall] = ACTIONS(723), - [anon_sym___stdcall] = ACTIONS(723), - [anon_sym___fastcall] = ACTIONS(723), - [anon_sym___thiscall] = ACTIONS(723), - [anon_sym___vectorcall] = ACTIONS(723), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(774), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_else] = ACTIONS(723), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(723), - [anon_sym_default] = ACTIONS(723), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [61] = { - [sym_declaration] = STATE(62), - [sym_type_definition] = STATE(62), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1005), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(62), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(62), - [sym_labeled_statement] = STATE(62), - [sym_expression_statement] = STATE(62), - [sym_if_statement] = STATE(62), - [sym_switch_statement] = STATE(62), - [sym_while_statement] = STATE(62), - [sym_do_statement] = STATE(62), - [sym_for_statement] = STATE(62), - [sym_return_statement] = STATE(62), - [sym_break_statement] = STATE(62), - [sym_continue_statement] = STATE(62), - [sym_goto_statement] = STATE(62), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(62), - [sym_identifier] = ACTIONS(817), - [aux_sym_preproc_include_token1] = ACTIONS(616), - [aux_sym_preproc_def_token1] = ACTIONS(616), - [aux_sym_preproc_if_token1] = ACTIONS(616), - [aux_sym_preproc_ifdef_token1] = ACTIONS(616), - [aux_sym_preproc_ifdef_token2] = ACTIONS(616), - [sym_preproc_directive] = ACTIONS(616), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_typedef] = ACTIONS(315), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(35), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym___cdecl] = ACTIONS(616), - [anon_sym___clrcall] = ACTIONS(616), - [anon_sym___stdcall] = ACTIONS(616), - [anon_sym___fastcall] = ACTIONS(616), - [anon_sym___thiscall] = ACTIONS(616), - [anon_sym___vectorcall] = ACTIONS(616), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_RBRACE] = ACTIONS(776), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_if] = ACTIONS(323), - [anon_sym_else] = ACTIONS(616), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(616), - [anon_sym_default] = ACTIONS(616), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [62] = { - [sym_declaration] = STATE(62), - [sym_type_definition] = STATE(62), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1005), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(385), - [sym_ms_declspec_modifier] = STATE(645), - [sym_compound_statement] = STATE(62), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym_attributed_statement] = STATE(62), - [sym_labeled_statement] = STATE(62), - [sym_expression_statement] = STATE(62), - [sym_if_statement] = STATE(62), - [sym_switch_statement] = STATE(62), - [sym_while_statement] = STATE(62), - [sym_do_statement] = STATE(62), - [sym_for_statement] = STATE(62), - [sym_return_statement] = STATE(62), - [sym_break_statement] = STATE(62), - [sym_continue_statement] = STATE(62), - [sym_goto_statement] = STATE(62), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [aux_sym_case_statement_repeat1] = STATE(62), - [sym_identifier] = ACTIONS(819), - [aux_sym_preproc_include_token1] = ACTIONS(623), - [aux_sym_preproc_def_token1] = ACTIONS(623), - [aux_sym_preproc_if_token1] = ACTIONS(623), - [aux_sym_preproc_ifdef_token1] = ACTIONS(623), - [aux_sym_preproc_ifdef_token2] = ACTIONS(623), - [sym_preproc_directive] = ACTIONS(623), - [anon_sym_LPAREN2] = ACTIONS(625), - [anon_sym_BANG] = ACTIONS(628), - [anon_sym_TILDE] = ACTIONS(628), - [anon_sym_DASH] = ACTIONS(631), - [anon_sym_PLUS] = ACTIONS(631), - [anon_sym_STAR] = ACTIONS(634), - [anon_sym_AMP] = ACTIONS(634), - [anon_sym_SEMI] = ACTIONS(822), - [anon_sym_typedef] = ACTIONS(825), - [anon_sym_extern] = ACTIONS(643), - [anon_sym___attribute__] = ACTIONS(646), - [anon_sym_LBRACK_LBRACK] = ACTIONS(649), - [anon_sym___declspec] = ACTIONS(652), - [anon_sym___cdecl] = ACTIONS(623), - [anon_sym___clrcall] = ACTIONS(623), - [anon_sym___stdcall] = ACTIONS(623), - [anon_sym___fastcall] = ACTIONS(623), - [anon_sym___thiscall] = ACTIONS(623), - [anon_sym___vectorcall] = ACTIONS(623), - [anon_sym_LBRACE] = ACTIONS(828), - [anon_sym_RBRACE] = ACTIONS(731), - [anon_sym_static] = ACTIONS(643), - [anon_sym_auto] = ACTIONS(643), - [anon_sym_register] = ACTIONS(643), - [anon_sym_inline] = ACTIONS(643), - [anon_sym_const] = ACTIONS(658), - [anon_sym_volatile] = ACTIONS(658), - [anon_sym_restrict] = ACTIONS(658), - [anon_sym__Atomic] = ACTIONS(658), - [anon_sym_signed] = ACTIONS(661), - [anon_sym_unsigned] = ACTIONS(661), - [anon_sym_long] = ACTIONS(661), - [anon_sym_short] = ACTIONS(661), - [sym_primitive_type] = ACTIONS(664), - [anon_sym_enum] = ACTIONS(667), - [anon_sym_struct] = ACTIONS(670), - [anon_sym_union] = ACTIONS(673), - [anon_sym_if] = ACTIONS(831), - [anon_sym_else] = ACTIONS(623), - [anon_sym_switch] = ACTIONS(834), - [anon_sym_case] = ACTIONS(623), - [anon_sym_default] = ACTIONS(623), - [anon_sym_while] = ACTIONS(837), - [anon_sym_do] = ACTIONS(840), - [anon_sym_for] = ACTIONS(843), - [anon_sym_return] = ACTIONS(846), - [anon_sym_break] = ACTIONS(849), - [anon_sym_continue] = ACTIONS(852), - [anon_sym_goto] = ACTIONS(855), - [anon_sym_DASH_DASH] = ACTIONS(703), - [anon_sym_PLUS_PLUS] = ACTIONS(703), - [anon_sym_sizeof] = ACTIONS(706), - [sym_number_literal] = ACTIONS(709), - [anon_sym_L_SQUOTE] = ACTIONS(712), - [anon_sym_u_SQUOTE] = ACTIONS(712), - [anon_sym_U_SQUOTE] = ACTIONS(712), - [anon_sym_u8_SQUOTE] = ACTIONS(712), - [anon_sym_SQUOTE] = ACTIONS(712), - [anon_sym_L_DQUOTE] = ACTIONS(715), - [anon_sym_u_DQUOTE] = ACTIONS(715), - [anon_sym_U_DQUOTE] = ACTIONS(715), - [anon_sym_u8_DQUOTE] = ACTIONS(715), - [anon_sym_DQUOTE] = ACTIONS(715), - [sym_true] = ACTIONS(718), - [sym_false] = ACTIONS(718), - [sym_null] = ACTIONS(718), - [sym_comment] = ACTIONS(3), - }, - [63] = { - [sym_declaration] = STATE(473), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1011), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(645), - [sym_ms_declspec_modifier] = STATE(645), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym__expression] = STATE(729), - [sym_comma_expression] = STATE(1367), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(858), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(860), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(862), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [64] = { - [sym_declaration] = STATE(446), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1011), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(645), - [sym_ms_declspec_modifier] = STATE(645), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym__expression] = STATE(737), - [sym_comma_expression] = STATE(1439), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(858), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(864), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(862), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [65] = { - [sym_declaration] = STATE(479), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1011), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(645), - [sym_ms_declspec_modifier] = STATE(645), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym__expression] = STATE(717), - [sym_comma_expression] = STATE(1449), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(858), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(866), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(862), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [66] = { - [sym_declaration] = STATE(456), - [sym__declaration_modifiers] = STATE(645), - [sym__declaration_specifiers] = STATE(1011), - [sym_attribute_specifier] = STATE(645), - [sym_attribute_declaration] = STATE(645), - [sym_ms_declspec_modifier] = STATE(645), - [sym_storage_class_specifier] = STATE(645), - [sym_type_qualifier] = STATE(645), - [sym__type_specifier] = STATE(707), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym__expression] = STATE(703), - [sym_comma_expression] = STATE(1457), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym__declaration_specifiers_repeat1] = STATE(645), - [aux_sym_sized_type_specifier_repeat1] = STATE(758), - [sym_identifier] = ACTIONS(858), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(868), - [anon_sym_extern] = ACTIONS(43), - [anon_sym___attribute__] = ACTIONS(33), - [anon_sym_LBRACK_LBRACK] = ACTIONS(862), - [anon_sym___declspec] = ACTIONS(37), - [anon_sym_static] = ACTIONS(43), - [anon_sym_auto] = ACTIONS(43), - [anon_sym_register] = ACTIONS(43), - [anon_sym_inline] = ACTIONS(43), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(47), - [anon_sym_unsigned] = ACTIONS(47), - [anon_sym_long] = ACTIONS(47), - [anon_sym_short] = ACTIONS(47), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [67] = { - [sym__expression] = STATE(506), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(527), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(527), - [sym_call_expression] = STATE(527), - [sym_field_expression] = STATE(527), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(527), - [sym_initializer_list] = STATE(516), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_identifier] = ACTIONS(870), - [anon_sym_COMMA] = ACTIONS(872), - [anon_sym_RPAREN] = ACTIONS(872), - [anon_sym_LPAREN2] = ACTIONS(874), - [anon_sym_BANG] = ACTIONS(876), - [anon_sym_TILDE] = ACTIONS(878), - [anon_sym_DASH] = ACTIONS(876), - [anon_sym_PLUS] = ACTIONS(876), - [anon_sym_STAR] = ACTIONS(880), - [anon_sym_SLASH] = ACTIONS(882), - [anon_sym_PERCENT] = ACTIONS(882), - [anon_sym_PIPE_PIPE] = ACTIONS(872), - [anon_sym_AMP_AMP] = ACTIONS(872), - [anon_sym_PIPE] = ACTIONS(882), - [anon_sym_CARET] = ACTIONS(882), - [anon_sym_AMP] = ACTIONS(880), - [anon_sym_EQ_EQ] = ACTIONS(872), - [anon_sym_BANG_EQ] = ACTIONS(872), - [anon_sym_GT] = ACTIONS(882), - [anon_sym_GT_EQ] = ACTIONS(872), - [anon_sym_LT_EQ] = ACTIONS(872), - [anon_sym_LT] = ACTIONS(882), - [anon_sym_LT_LT] = ACTIONS(882), - [anon_sym_GT_GT] = ACTIONS(882), - [anon_sym_SEMI] = ACTIONS(872), - [anon_sym_LBRACE] = ACTIONS(884), - [anon_sym_RBRACE] = ACTIONS(872), - [anon_sym_LBRACK] = ACTIONS(872), - [anon_sym_EQ] = ACTIONS(882), - [anon_sym_COLON] = ACTIONS(872), - [anon_sym_QMARK] = ACTIONS(872), - [anon_sym_STAR_EQ] = ACTIONS(872), - [anon_sym_SLASH_EQ] = ACTIONS(872), - [anon_sym_PERCENT_EQ] = ACTIONS(872), - [anon_sym_PLUS_EQ] = ACTIONS(872), - [anon_sym_DASH_EQ] = ACTIONS(872), - [anon_sym_LT_LT_EQ] = ACTIONS(872), - [anon_sym_GT_GT_EQ] = ACTIONS(872), - [anon_sym_AMP_EQ] = ACTIONS(872), - [anon_sym_CARET_EQ] = ACTIONS(872), - [anon_sym_PIPE_EQ] = ACTIONS(872), - [anon_sym_DASH_DASH] = ACTIONS(886), - [anon_sym_PLUS_PLUS] = ACTIONS(886), - [anon_sym_sizeof] = ACTIONS(888), - [anon_sym_DOT] = ACTIONS(882), - [anon_sym_DASH_GT] = ACTIONS(872), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [68] = { - [sym_identifier] = ACTIONS(890), - [aux_sym_preproc_include_token1] = ACTIONS(890), - [aux_sym_preproc_def_token1] = ACTIONS(890), - [aux_sym_preproc_if_token1] = ACTIONS(890), - [aux_sym_preproc_if_token2] = ACTIONS(890), - [aux_sym_preproc_ifdef_token1] = ACTIONS(890), - [aux_sym_preproc_ifdef_token2] = ACTIONS(890), - [aux_sym_preproc_else_token1] = ACTIONS(890), - [aux_sym_preproc_elif_token1] = ACTIONS(890), - [sym_preproc_directive] = ACTIONS(890), - [anon_sym_LPAREN2] = ACTIONS(892), - [anon_sym_BANG] = ACTIONS(892), - [anon_sym_TILDE] = ACTIONS(892), - [anon_sym_DASH] = ACTIONS(890), - [anon_sym_PLUS] = ACTIONS(890), - [anon_sym_STAR] = ACTIONS(892), - [anon_sym_AMP] = ACTIONS(892), - [anon_sym_SEMI] = ACTIONS(892), - [anon_sym_typedef] = ACTIONS(890), - [anon_sym_extern] = ACTIONS(890), - [anon_sym___attribute__] = ACTIONS(890), - [anon_sym_LBRACK_LBRACK] = ACTIONS(892), - [anon_sym___declspec] = ACTIONS(890), - [anon_sym___cdecl] = ACTIONS(890), - [anon_sym___clrcall] = ACTIONS(890), - [anon_sym___stdcall] = ACTIONS(890), - [anon_sym___fastcall] = ACTIONS(890), - [anon_sym___thiscall] = ACTIONS(890), - [anon_sym___vectorcall] = ACTIONS(890), - [anon_sym_LBRACE] = ACTIONS(892), - [anon_sym_static] = ACTIONS(890), - [anon_sym_auto] = ACTIONS(890), - [anon_sym_register] = ACTIONS(890), - [anon_sym_inline] = ACTIONS(890), - [anon_sym_const] = ACTIONS(890), - [anon_sym_volatile] = ACTIONS(890), - [anon_sym_restrict] = ACTIONS(890), - [anon_sym__Atomic] = ACTIONS(890), - [anon_sym_signed] = ACTIONS(890), - [anon_sym_unsigned] = ACTIONS(890), - [anon_sym_long] = ACTIONS(890), - [anon_sym_short] = ACTIONS(890), - [sym_primitive_type] = ACTIONS(890), - [anon_sym_enum] = ACTIONS(890), - [anon_sym_struct] = ACTIONS(890), - [anon_sym_union] = ACTIONS(890), - [anon_sym_if] = ACTIONS(890), - [anon_sym_else] = ACTIONS(890), - [anon_sym_switch] = ACTIONS(890), - [anon_sym_case] = ACTIONS(890), - [anon_sym_default] = ACTIONS(890), - [anon_sym_while] = ACTIONS(890), - [anon_sym_do] = ACTIONS(890), - [anon_sym_for] = ACTIONS(890), - [anon_sym_return] = ACTIONS(890), - [anon_sym_break] = ACTIONS(890), - [anon_sym_continue] = ACTIONS(890), - [anon_sym_goto] = ACTIONS(890), - [anon_sym_DASH_DASH] = ACTIONS(892), - [anon_sym_PLUS_PLUS] = ACTIONS(892), - [anon_sym_sizeof] = ACTIONS(890), - [sym_number_literal] = ACTIONS(892), - [anon_sym_L_SQUOTE] = ACTIONS(892), - [anon_sym_u_SQUOTE] = ACTIONS(892), - [anon_sym_U_SQUOTE] = ACTIONS(892), - [anon_sym_u8_SQUOTE] = ACTIONS(892), - [anon_sym_SQUOTE] = ACTIONS(892), - [anon_sym_L_DQUOTE] = ACTIONS(892), - [anon_sym_u_DQUOTE] = ACTIONS(892), - [anon_sym_U_DQUOTE] = ACTIONS(892), - [anon_sym_u8_DQUOTE] = ACTIONS(892), - [anon_sym_DQUOTE] = ACTIONS(892), - [sym_true] = ACTIONS(890), - [sym_false] = ACTIONS(890), - [sym_null] = ACTIONS(890), - [sym_comment] = ACTIONS(3), - }, - [69] = { - [sym_identifier] = ACTIONS(894), - [aux_sym_preproc_include_token1] = ACTIONS(894), - [aux_sym_preproc_def_token1] = ACTIONS(894), - [aux_sym_preproc_if_token1] = ACTIONS(894), - [aux_sym_preproc_if_token2] = ACTIONS(894), - [aux_sym_preproc_ifdef_token1] = ACTIONS(894), - [aux_sym_preproc_ifdef_token2] = ACTIONS(894), - [aux_sym_preproc_else_token1] = ACTIONS(894), - [aux_sym_preproc_elif_token1] = ACTIONS(894), - [sym_preproc_directive] = ACTIONS(894), - [anon_sym_LPAREN2] = ACTIONS(896), - [anon_sym_BANG] = ACTIONS(896), - [anon_sym_TILDE] = ACTIONS(896), - [anon_sym_DASH] = ACTIONS(894), - [anon_sym_PLUS] = ACTIONS(894), - [anon_sym_STAR] = ACTIONS(896), - [anon_sym_AMP] = ACTIONS(896), - [anon_sym_SEMI] = ACTIONS(896), - [anon_sym_typedef] = ACTIONS(894), - [anon_sym_extern] = ACTIONS(894), - [anon_sym___attribute__] = ACTIONS(894), - [anon_sym_LBRACK_LBRACK] = ACTIONS(896), - [anon_sym___declspec] = ACTIONS(894), - [anon_sym___cdecl] = ACTIONS(894), - [anon_sym___clrcall] = ACTIONS(894), - [anon_sym___stdcall] = ACTIONS(894), - [anon_sym___fastcall] = ACTIONS(894), - [anon_sym___thiscall] = ACTIONS(894), - [anon_sym___vectorcall] = ACTIONS(894), - [anon_sym_LBRACE] = ACTIONS(896), - [anon_sym_static] = ACTIONS(894), - [anon_sym_auto] = ACTIONS(894), - [anon_sym_register] = ACTIONS(894), - [anon_sym_inline] = ACTIONS(894), - [anon_sym_const] = ACTIONS(894), - [anon_sym_volatile] = ACTIONS(894), - [anon_sym_restrict] = ACTIONS(894), - [anon_sym__Atomic] = ACTIONS(894), - [anon_sym_signed] = ACTIONS(894), - [anon_sym_unsigned] = ACTIONS(894), - [anon_sym_long] = ACTIONS(894), - [anon_sym_short] = ACTIONS(894), - [sym_primitive_type] = ACTIONS(894), - [anon_sym_enum] = ACTIONS(894), - [anon_sym_struct] = ACTIONS(894), - [anon_sym_union] = ACTIONS(894), - [anon_sym_if] = ACTIONS(894), - [anon_sym_else] = ACTIONS(894), - [anon_sym_switch] = ACTIONS(894), - [anon_sym_case] = ACTIONS(894), - [anon_sym_default] = ACTIONS(894), - [anon_sym_while] = ACTIONS(894), - [anon_sym_do] = ACTIONS(894), - [anon_sym_for] = ACTIONS(894), - [anon_sym_return] = ACTIONS(894), - [anon_sym_break] = ACTIONS(894), - [anon_sym_continue] = ACTIONS(894), - [anon_sym_goto] = ACTIONS(894), - [anon_sym_DASH_DASH] = ACTIONS(896), - [anon_sym_PLUS_PLUS] = ACTIONS(896), - [anon_sym_sizeof] = ACTIONS(894), - [sym_number_literal] = ACTIONS(896), - [anon_sym_L_SQUOTE] = ACTIONS(896), - [anon_sym_u_SQUOTE] = ACTIONS(896), - [anon_sym_U_SQUOTE] = ACTIONS(896), - [anon_sym_u8_SQUOTE] = ACTIONS(896), - [anon_sym_SQUOTE] = ACTIONS(896), - [anon_sym_L_DQUOTE] = ACTIONS(896), - [anon_sym_u_DQUOTE] = ACTIONS(896), - [anon_sym_U_DQUOTE] = ACTIONS(896), - [anon_sym_u8_DQUOTE] = ACTIONS(896), - [anon_sym_DQUOTE] = ACTIONS(896), - [sym_true] = ACTIONS(894), - [sym_false] = ACTIONS(894), - [sym_null] = ACTIONS(894), - [sym_comment] = ACTIONS(3), - }, - [70] = { - [sym_identifier] = ACTIONS(898), - [aux_sym_preproc_include_token1] = ACTIONS(898), - [aux_sym_preproc_def_token1] = ACTIONS(898), - [aux_sym_preproc_if_token1] = ACTIONS(898), - [aux_sym_preproc_if_token2] = ACTIONS(898), - [aux_sym_preproc_ifdef_token1] = ACTIONS(898), - [aux_sym_preproc_ifdef_token2] = ACTIONS(898), - [aux_sym_preproc_else_token1] = ACTIONS(898), - [aux_sym_preproc_elif_token1] = ACTIONS(898), - [sym_preproc_directive] = ACTIONS(898), - [anon_sym_LPAREN2] = ACTIONS(900), - [anon_sym_BANG] = ACTIONS(900), - [anon_sym_TILDE] = ACTIONS(900), - [anon_sym_DASH] = ACTIONS(898), - [anon_sym_PLUS] = ACTIONS(898), - [anon_sym_STAR] = ACTIONS(900), - [anon_sym_AMP] = ACTIONS(900), - [anon_sym_SEMI] = ACTIONS(900), - [anon_sym_typedef] = ACTIONS(898), - [anon_sym_extern] = ACTIONS(898), - [anon_sym___attribute__] = ACTIONS(898), - [anon_sym_LBRACK_LBRACK] = ACTIONS(900), - [anon_sym___declspec] = ACTIONS(898), - [anon_sym___cdecl] = ACTIONS(898), - [anon_sym___clrcall] = ACTIONS(898), - [anon_sym___stdcall] = ACTIONS(898), - [anon_sym___fastcall] = ACTIONS(898), - [anon_sym___thiscall] = ACTIONS(898), - [anon_sym___vectorcall] = ACTIONS(898), - [anon_sym_LBRACE] = ACTIONS(900), - [anon_sym_static] = ACTIONS(898), - [anon_sym_auto] = ACTIONS(898), - [anon_sym_register] = ACTIONS(898), - [anon_sym_inline] = ACTIONS(898), - [anon_sym_const] = ACTIONS(898), - [anon_sym_volatile] = ACTIONS(898), - [anon_sym_restrict] = ACTIONS(898), - [anon_sym__Atomic] = ACTIONS(898), - [anon_sym_signed] = ACTIONS(898), - [anon_sym_unsigned] = ACTIONS(898), - [anon_sym_long] = ACTIONS(898), - [anon_sym_short] = ACTIONS(898), - [sym_primitive_type] = ACTIONS(898), - [anon_sym_enum] = ACTIONS(898), - [anon_sym_struct] = ACTIONS(898), - [anon_sym_union] = ACTIONS(898), - [anon_sym_if] = ACTIONS(898), - [anon_sym_else] = ACTIONS(898), - [anon_sym_switch] = ACTIONS(898), - [anon_sym_case] = ACTIONS(898), - [anon_sym_default] = ACTIONS(898), - [anon_sym_while] = ACTIONS(898), - [anon_sym_do] = ACTIONS(898), - [anon_sym_for] = ACTIONS(898), - [anon_sym_return] = ACTIONS(898), - [anon_sym_break] = ACTIONS(898), - [anon_sym_continue] = ACTIONS(898), - [anon_sym_goto] = ACTIONS(898), - [anon_sym_DASH_DASH] = ACTIONS(900), - [anon_sym_PLUS_PLUS] = ACTIONS(900), - [anon_sym_sizeof] = ACTIONS(898), - [sym_number_literal] = ACTIONS(900), - [anon_sym_L_SQUOTE] = ACTIONS(900), - [anon_sym_u_SQUOTE] = ACTIONS(900), - [anon_sym_U_SQUOTE] = ACTIONS(900), - [anon_sym_u8_SQUOTE] = ACTIONS(900), - [anon_sym_SQUOTE] = ACTIONS(900), - [anon_sym_L_DQUOTE] = ACTIONS(900), - [anon_sym_u_DQUOTE] = ACTIONS(900), - [anon_sym_U_DQUOTE] = ACTIONS(900), - [anon_sym_u8_DQUOTE] = ACTIONS(900), - [anon_sym_DQUOTE] = ACTIONS(900), - [sym_true] = ACTIONS(898), - [sym_false] = ACTIONS(898), - [sym_null] = ACTIONS(898), - [sym_comment] = ACTIONS(3), - }, - [71] = { - [sym_identifier] = ACTIONS(902), - [aux_sym_preproc_include_token1] = ACTIONS(902), - [aux_sym_preproc_def_token1] = ACTIONS(902), - [aux_sym_preproc_if_token1] = ACTIONS(902), - [aux_sym_preproc_if_token2] = ACTIONS(902), - [aux_sym_preproc_ifdef_token1] = ACTIONS(902), - [aux_sym_preproc_ifdef_token2] = ACTIONS(902), - [aux_sym_preproc_else_token1] = ACTIONS(902), - [aux_sym_preproc_elif_token1] = ACTIONS(902), - [sym_preproc_directive] = ACTIONS(902), - [anon_sym_LPAREN2] = ACTIONS(904), - [anon_sym_BANG] = ACTIONS(904), - [anon_sym_TILDE] = ACTIONS(904), - [anon_sym_DASH] = ACTIONS(902), - [anon_sym_PLUS] = ACTIONS(902), - [anon_sym_STAR] = ACTIONS(904), - [anon_sym_AMP] = ACTIONS(904), - [anon_sym_SEMI] = ACTIONS(904), - [anon_sym_typedef] = ACTIONS(902), - [anon_sym_extern] = ACTIONS(902), - [anon_sym___attribute__] = ACTIONS(902), - [anon_sym_LBRACK_LBRACK] = ACTIONS(904), - [anon_sym___declspec] = ACTIONS(902), - [anon_sym___cdecl] = ACTIONS(902), - [anon_sym___clrcall] = ACTIONS(902), - [anon_sym___stdcall] = ACTIONS(902), - [anon_sym___fastcall] = ACTIONS(902), - [anon_sym___thiscall] = ACTIONS(902), - [anon_sym___vectorcall] = ACTIONS(902), - [anon_sym_LBRACE] = ACTIONS(904), - [anon_sym_static] = ACTIONS(902), - [anon_sym_auto] = ACTIONS(902), - [anon_sym_register] = ACTIONS(902), - [anon_sym_inline] = ACTIONS(902), - [anon_sym_const] = ACTIONS(902), - [anon_sym_volatile] = ACTIONS(902), - [anon_sym_restrict] = ACTIONS(902), - [anon_sym__Atomic] = ACTIONS(902), - [anon_sym_signed] = ACTIONS(902), - [anon_sym_unsigned] = ACTIONS(902), - [anon_sym_long] = ACTIONS(902), - [anon_sym_short] = ACTIONS(902), - [sym_primitive_type] = ACTIONS(902), - [anon_sym_enum] = ACTIONS(902), - [anon_sym_struct] = ACTIONS(902), - [anon_sym_union] = ACTIONS(902), - [anon_sym_if] = ACTIONS(902), - [anon_sym_else] = ACTIONS(902), - [anon_sym_switch] = ACTIONS(902), - [anon_sym_case] = ACTIONS(902), - [anon_sym_default] = ACTIONS(902), - [anon_sym_while] = ACTIONS(902), - [anon_sym_do] = ACTIONS(902), - [anon_sym_for] = ACTIONS(902), - [anon_sym_return] = ACTIONS(902), - [anon_sym_break] = ACTIONS(902), - [anon_sym_continue] = ACTIONS(902), - [anon_sym_goto] = ACTIONS(902), - [anon_sym_DASH_DASH] = ACTIONS(904), - [anon_sym_PLUS_PLUS] = ACTIONS(904), - [anon_sym_sizeof] = ACTIONS(902), - [sym_number_literal] = ACTIONS(904), - [anon_sym_L_SQUOTE] = ACTIONS(904), - [anon_sym_u_SQUOTE] = ACTIONS(904), - [anon_sym_U_SQUOTE] = ACTIONS(904), - [anon_sym_u8_SQUOTE] = ACTIONS(904), - [anon_sym_SQUOTE] = ACTIONS(904), - [anon_sym_L_DQUOTE] = ACTIONS(904), - [anon_sym_u_DQUOTE] = ACTIONS(904), - [anon_sym_U_DQUOTE] = ACTIONS(904), - [anon_sym_u8_DQUOTE] = ACTIONS(904), - [anon_sym_DQUOTE] = ACTIONS(904), - [sym_true] = ACTIONS(902), - [sym_false] = ACTIONS(902), - [sym_null] = ACTIONS(902), - [sym_comment] = ACTIONS(3), - }, - [72] = { - [sym_identifier] = ACTIONS(906), - [aux_sym_preproc_include_token1] = ACTIONS(906), - [aux_sym_preproc_def_token1] = ACTIONS(906), - [aux_sym_preproc_if_token1] = ACTIONS(906), - [aux_sym_preproc_if_token2] = ACTIONS(906), - [aux_sym_preproc_ifdef_token1] = ACTIONS(906), - [aux_sym_preproc_ifdef_token2] = ACTIONS(906), - [aux_sym_preproc_else_token1] = ACTIONS(906), - [aux_sym_preproc_elif_token1] = ACTIONS(906), - [sym_preproc_directive] = ACTIONS(906), - [anon_sym_LPAREN2] = ACTIONS(908), - [anon_sym_BANG] = ACTIONS(908), - [anon_sym_TILDE] = ACTIONS(908), - [anon_sym_DASH] = ACTIONS(906), - [anon_sym_PLUS] = ACTIONS(906), - [anon_sym_STAR] = ACTIONS(908), - [anon_sym_AMP] = ACTIONS(908), - [anon_sym_SEMI] = ACTIONS(908), - [anon_sym_typedef] = ACTIONS(906), - [anon_sym_extern] = ACTIONS(906), - [anon_sym___attribute__] = ACTIONS(906), - [anon_sym_LBRACK_LBRACK] = ACTIONS(908), - [anon_sym___declspec] = ACTIONS(906), - [anon_sym___cdecl] = ACTIONS(906), - [anon_sym___clrcall] = ACTIONS(906), - [anon_sym___stdcall] = ACTIONS(906), - [anon_sym___fastcall] = ACTIONS(906), - [anon_sym___thiscall] = ACTIONS(906), - [anon_sym___vectorcall] = ACTIONS(906), - [anon_sym_LBRACE] = ACTIONS(908), - [anon_sym_static] = ACTIONS(906), - [anon_sym_auto] = ACTIONS(906), - [anon_sym_register] = ACTIONS(906), - [anon_sym_inline] = ACTIONS(906), - [anon_sym_const] = ACTIONS(906), - [anon_sym_volatile] = ACTIONS(906), - [anon_sym_restrict] = ACTIONS(906), - [anon_sym__Atomic] = ACTIONS(906), - [anon_sym_signed] = ACTIONS(906), - [anon_sym_unsigned] = ACTIONS(906), - [anon_sym_long] = ACTIONS(906), - [anon_sym_short] = ACTIONS(906), - [sym_primitive_type] = ACTIONS(906), - [anon_sym_enum] = ACTIONS(906), - [anon_sym_struct] = ACTIONS(906), - [anon_sym_union] = ACTIONS(906), - [anon_sym_if] = ACTIONS(906), - [anon_sym_else] = ACTIONS(906), - [anon_sym_switch] = ACTIONS(906), - [anon_sym_case] = ACTIONS(906), - [anon_sym_default] = ACTIONS(906), - [anon_sym_while] = ACTIONS(906), - [anon_sym_do] = ACTIONS(906), - [anon_sym_for] = ACTIONS(906), - [anon_sym_return] = ACTIONS(906), - [anon_sym_break] = ACTIONS(906), - [anon_sym_continue] = ACTIONS(906), - [anon_sym_goto] = ACTIONS(906), - [anon_sym_DASH_DASH] = ACTIONS(908), - [anon_sym_PLUS_PLUS] = ACTIONS(908), - [anon_sym_sizeof] = ACTIONS(906), - [sym_number_literal] = ACTIONS(908), - [anon_sym_L_SQUOTE] = ACTIONS(908), - [anon_sym_u_SQUOTE] = ACTIONS(908), - [anon_sym_U_SQUOTE] = ACTIONS(908), - [anon_sym_u8_SQUOTE] = ACTIONS(908), - [anon_sym_SQUOTE] = ACTIONS(908), - [anon_sym_L_DQUOTE] = ACTIONS(908), - [anon_sym_u_DQUOTE] = ACTIONS(908), - [anon_sym_U_DQUOTE] = ACTIONS(908), - [anon_sym_u8_DQUOTE] = ACTIONS(908), - [anon_sym_DQUOTE] = ACTIONS(908), - [sym_true] = ACTIONS(906), - [sym_false] = ACTIONS(906), - [sym_null] = ACTIONS(906), - [sym_comment] = ACTIONS(3), - }, - [73] = { - [sym_identifier] = ACTIONS(910), - [aux_sym_preproc_include_token1] = ACTIONS(910), - [aux_sym_preproc_def_token1] = ACTIONS(910), - [aux_sym_preproc_if_token1] = ACTIONS(910), - [aux_sym_preproc_if_token2] = ACTIONS(910), - [aux_sym_preproc_ifdef_token1] = ACTIONS(910), - [aux_sym_preproc_ifdef_token2] = ACTIONS(910), - [aux_sym_preproc_else_token1] = ACTIONS(910), - [aux_sym_preproc_elif_token1] = ACTIONS(910), - [sym_preproc_directive] = ACTIONS(910), - [anon_sym_LPAREN2] = ACTIONS(912), - [anon_sym_BANG] = ACTIONS(912), - [anon_sym_TILDE] = ACTIONS(912), - [anon_sym_DASH] = ACTIONS(910), - [anon_sym_PLUS] = ACTIONS(910), - [anon_sym_STAR] = ACTIONS(912), - [anon_sym_AMP] = ACTIONS(912), - [anon_sym_SEMI] = ACTIONS(912), - [anon_sym_typedef] = ACTIONS(910), - [anon_sym_extern] = ACTIONS(910), - [anon_sym___attribute__] = ACTIONS(910), - [anon_sym_LBRACK_LBRACK] = ACTIONS(912), - [anon_sym___declspec] = ACTIONS(910), - [anon_sym___cdecl] = ACTIONS(910), - [anon_sym___clrcall] = ACTIONS(910), - [anon_sym___stdcall] = ACTIONS(910), - [anon_sym___fastcall] = ACTIONS(910), - [anon_sym___thiscall] = ACTIONS(910), - [anon_sym___vectorcall] = ACTIONS(910), - [anon_sym_LBRACE] = ACTIONS(912), - [anon_sym_static] = ACTIONS(910), - [anon_sym_auto] = ACTIONS(910), - [anon_sym_register] = ACTIONS(910), - [anon_sym_inline] = ACTIONS(910), - [anon_sym_const] = ACTIONS(910), - [anon_sym_volatile] = ACTIONS(910), - [anon_sym_restrict] = ACTIONS(910), - [anon_sym__Atomic] = ACTIONS(910), - [anon_sym_signed] = ACTIONS(910), - [anon_sym_unsigned] = ACTIONS(910), - [anon_sym_long] = ACTIONS(910), - [anon_sym_short] = ACTIONS(910), - [sym_primitive_type] = ACTIONS(910), - [anon_sym_enum] = ACTIONS(910), - [anon_sym_struct] = ACTIONS(910), - [anon_sym_union] = ACTIONS(910), - [anon_sym_if] = ACTIONS(910), - [anon_sym_else] = ACTIONS(910), - [anon_sym_switch] = ACTIONS(910), - [anon_sym_case] = ACTIONS(910), - [anon_sym_default] = ACTIONS(910), - [anon_sym_while] = ACTIONS(910), - [anon_sym_do] = ACTIONS(910), - [anon_sym_for] = ACTIONS(910), - [anon_sym_return] = ACTIONS(910), - [anon_sym_break] = ACTIONS(910), - [anon_sym_continue] = ACTIONS(910), - [anon_sym_goto] = ACTIONS(910), - [anon_sym_DASH_DASH] = ACTIONS(912), - [anon_sym_PLUS_PLUS] = ACTIONS(912), - [anon_sym_sizeof] = ACTIONS(910), - [sym_number_literal] = ACTIONS(912), - [anon_sym_L_SQUOTE] = ACTIONS(912), - [anon_sym_u_SQUOTE] = ACTIONS(912), - [anon_sym_U_SQUOTE] = ACTIONS(912), - [anon_sym_u8_SQUOTE] = ACTIONS(912), - [anon_sym_SQUOTE] = ACTIONS(912), - [anon_sym_L_DQUOTE] = ACTIONS(912), - [anon_sym_u_DQUOTE] = ACTIONS(912), - [anon_sym_U_DQUOTE] = ACTIONS(912), - [anon_sym_u8_DQUOTE] = ACTIONS(912), - [anon_sym_DQUOTE] = ACTIONS(912), - [sym_true] = ACTIONS(910), - [sym_false] = ACTIONS(910), - [sym_null] = ACTIONS(910), - [sym_comment] = ACTIONS(3), - }, - [74] = { - [sym_identifier] = ACTIONS(890), - [aux_sym_preproc_include_token1] = ACTIONS(890), - [aux_sym_preproc_def_token1] = ACTIONS(890), - [aux_sym_preproc_if_token1] = ACTIONS(890), - [aux_sym_preproc_if_token2] = ACTIONS(890), - [aux_sym_preproc_ifdef_token1] = ACTIONS(890), - [aux_sym_preproc_ifdef_token2] = ACTIONS(890), - [aux_sym_preproc_else_token1] = ACTIONS(890), - [aux_sym_preproc_elif_token1] = ACTIONS(890), - [sym_preproc_directive] = ACTIONS(890), - [anon_sym_LPAREN2] = ACTIONS(892), - [anon_sym_BANG] = ACTIONS(892), - [anon_sym_TILDE] = ACTIONS(892), - [anon_sym_DASH] = ACTIONS(890), - [anon_sym_PLUS] = ACTIONS(890), - [anon_sym_STAR] = ACTIONS(892), - [anon_sym_AMP] = ACTIONS(892), - [anon_sym_SEMI] = ACTIONS(892), - [anon_sym_typedef] = ACTIONS(890), - [anon_sym_extern] = ACTIONS(890), - [anon_sym___attribute__] = ACTIONS(890), - [anon_sym_LBRACK_LBRACK] = ACTIONS(892), - [anon_sym___declspec] = ACTIONS(890), - [anon_sym___cdecl] = ACTIONS(890), - [anon_sym___clrcall] = ACTIONS(890), - [anon_sym___stdcall] = ACTIONS(890), - [anon_sym___fastcall] = ACTIONS(890), - [anon_sym___thiscall] = ACTIONS(890), - [anon_sym___vectorcall] = ACTIONS(890), - [anon_sym_LBRACE] = ACTIONS(892), - [anon_sym_static] = ACTIONS(890), - [anon_sym_auto] = ACTIONS(890), - [anon_sym_register] = ACTIONS(890), - [anon_sym_inline] = ACTIONS(890), - [anon_sym_const] = ACTIONS(890), - [anon_sym_volatile] = ACTIONS(890), - [anon_sym_restrict] = ACTIONS(890), - [anon_sym__Atomic] = ACTIONS(890), - [anon_sym_signed] = ACTIONS(890), - [anon_sym_unsigned] = ACTIONS(890), - [anon_sym_long] = ACTIONS(890), - [anon_sym_short] = ACTIONS(890), - [sym_primitive_type] = ACTIONS(890), - [anon_sym_enum] = ACTIONS(890), - [anon_sym_struct] = ACTIONS(890), - [anon_sym_union] = ACTIONS(890), - [anon_sym_if] = ACTIONS(890), - [anon_sym_else] = ACTIONS(890), - [anon_sym_switch] = ACTIONS(890), - [anon_sym_case] = ACTIONS(890), - [anon_sym_default] = ACTIONS(890), - [anon_sym_while] = ACTIONS(890), - [anon_sym_do] = ACTIONS(890), - [anon_sym_for] = ACTIONS(890), - [anon_sym_return] = ACTIONS(890), - [anon_sym_break] = ACTIONS(890), - [anon_sym_continue] = ACTIONS(890), - [anon_sym_goto] = ACTIONS(890), - [anon_sym_DASH_DASH] = ACTIONS(892), - [anon_sym_PLUS_PLUS] = ACTIONS(892), - [anon_sym_sizeof] = ACTIONS(890), - [sym_number_literal] = ACTIONS(892), - [anon_sym_L_SQUOTE] = ACTIONS(892), - [anon_sym_u_SQUOTE] = ACTIONS(892), - [anon_sym_U_SQUOTE] = ACTIONS(892), - [anon_sym_u8_SQUOTE] = ACTIONS(892), - [anon_sym_SQUOTE] = ACTIONS(892), - [anon_sym_L_DQUOTE] = ACTIONS(892), - [anon_sym_u_DQUOTE] = ACTIONS(892), - [anon_sym_U_DQUOTE] = ACTIONS(892), - [anon_sym_u8_DQUOTE] = ACTIONS(892), - [anon_sym_DQUOTE] = ACTIONS(892), - [sym_true] = ACTIONS(890), - [sym_false] = ACTIONS(890), - [sym_null] = ACTIONS(890), - [sym_comment] = ACTIONS(3), - }, - [75] = { - [sym_identifier] = ACTIONS(914), - [aux_sym_preproc_include_token1] = ACTIONS(914), - [aux_sym_preproc_def_token1] = ACTIONS(914), - [aux_sym_preproc_if_token1] = ACTIONS(914), - [aux_sym_preproc_if_token2] = ACTIONS(914), - [aux_sym_preproc_ifdef_token1] = ACTIONS(914), - [aux_sym_preproc_ifdef_token2] = ACTIONS(914), - [aux_sym_preproc_else_token1] = ACTIONS(914), - [aux_sym_preproc_elif_token1] = ACTIONS(914), - [sym_preproc_directive] = ACTIONS(914), - [anon_sym_LPAREN2] = ACTIONS(916), - [anon_sym_BANG] = ACTIONS(916), - [anon_sym_TILDE] = ACTIONS(916), - [anon_sym_DASH] = ACTIONS(914), - [anon_sym_PLUS] = ACTIONS(914), - [anon_sym_STAR] = ACTIONS(916), - [anon_sym_AMP] = ACTIONS(916), - [anon_sym_SEMI] = ACTIONS(916), - [anon_sym_typedef] = ACTIONS(914), - [anon_sym_extern] = ACTIONS(914), - [anon_sym___attribute__] = ACTIONS(914), - [anon_sym_LBRACK_LBRACK] = ACTIONS(916), - [anon_sym___declspec] = ACTIONS(914), - [anon_sym___cdecl] = ACTIONS(914), - [anon_sym___clrcall] = ACTIONS(914), - [anon_sym___stdcall] = ACTIONS(914), - [anon_sym___fastcall] = ACTIONS(914), - [anon_sym___thiscall] = ACTIONS(914), - [anon_sym___vectorcall] = ACTIONS(914), - [anon_sym_LBRACE] = ACTIONS(916), - [anon_sym_static] = ACTIONS(914), - [anon_sym_auto] = ACTIONS(914), - [anon_sym_register] = ACTIONS(914), - [anon_sym_inline] = ACTIONS(914), - [anon_sym_const] = ACTIONS(914), - [anon_sym_volatile] = ACTIONS(914), - [anon_sym_restrict] = ACTIONS(914), - [anon_sym__Atomic] = ACTIONS(914), - [anon_sym_signed] = ACTIONS(914), - [anon_sym_unsigned] = ACTIONS(914), - [anon_sym_long] = ACTIONS(914), - [anon_sym_short] = ACTIONS(914), - [sym_primitive_type] = ACTIONS(914), - [anon_sym_enum] = ACTIONS(914), - [anon_sym_struct] = ACTIONS(914), - [anon_sym_union] = ACTIONS(914), - [anon_sym_if] = ACTIONS(914), - [anon_sym_else] = ACTIONS(918), - [anon_sym_switch] = ACTIONS(914), - [anon_sym_case] = ACTIONS(914), - [anon_sym_default] = ACTIONS(914), - [anon_sym_while] = ACTIONS(914), - [anon_sym_do] = ACTIONS(914), - [anon_sym_for] = ACTIONS(914), - [anon_sym_return] = ACTIONS(914), - [anon_sym_break] = ACTIONS(914), - [anon_sym_continue] = ACTIONS(914), - [anon_sym_goto] = ACTIONS(914), - [anon_sym_DASH_DASH] = ACTIONS(916), - [anon_sym_PLUS_PLUS] = ACTIONS(916), - [anon_sym_sizeof] = ACTIONS(914), - [sym_number_literal] = ACTIONS(916), - [anon_sym_L_SQUOTE] = ACTIONS(916), - [anon_sym_u_SQUOTE] = ACTIONS(916), - [anon_sym_U_SQUOTE] = ACTIONS(916), - [anon_sym_u8_SQUOTE] = ACTIONS(916), - [anon_sym_SQUOTE] = ACTIONS(916), - [anon_sym_L_DQUOTE] = ACTIONS(916), - [anon_sym_u_DQUOTE] = ACTIONS(916), - [anon_sym_U_DQUOTE] = ACTIONS(916), - [anon_sym_u8_DQUOTE] = ACTIONS(916), - [anon_sym_DQUOTE] = ACTIONS(916), - [sym_true] = ACTIONS(914), - [sym_false] = ACTIONS(914), - [sym_null] = ACTIONS(914), - [sym_comment] = ACTIONS(3), - }, - [76] = { - [sym_identifier] = ACTIONS(920), - [aux_sym_preproc_include_token1] = ACTIONS(920), - [aux_sym_preproc_def_token1] = ACTIONS(920), - [aux_sym_preproc_if_token1] = ACTIONS(920), - [aux_sym_preproc_if_token2] = ACTIONS(920), - [aux_sym_preproc_ifdef_token1] = ACTIONS(920), - [aux_sym_preproc_ifdef_token2] = ACTIONS(920), - [aux_sym_preproc_else_token1] = ACTIONS(920), - [aux_sym_preproc_elif_token1] = ACTIONS(920), - [sym_preproc_directive] = ACTIONS(920), - [anon_sym_LPAREN2] = ACTIONS(922), - [anon_sym_BANG] = ACTIONS(922), - [anon_sym_TILDE] = ACTIONS(922), - [anon_sym_DASH] = ACTIONS(920), - [anon_sym_PLUS] = ACTIONS(920), - [anon_sym_STAR] = ACTIONS(922), - [anon_sym_AMP] = ACTIONS(922), - [anon_sym_SEMI] = ACTIONS(922), - [anon_sym_typedef] = ACTIONS(920), - [anon_sym_extern] = ACTIONS(920), - [anon_sym___attribute__] = ACTIONS(920), - [anon_sym_LBRACK_LBRACK] = ACTIONS(922), - [anon_sym___declspec] = ACTIONS(920), - [anon_sym___cdecl] = ACTIONS(920), - [anon_sym___clrcall] = ACTIONS(920), - [anon_sym___stdcall] = ACTIONS(920), - [anon_sym___fastcall] = ACTIONS(920), - [anon_sym___thiscall] = ACTIONS(920), - [anon_sym___vectorcall] = ACTIONS(920), - [anon_sym_LBRACE] = ACTIONS(922), - [anon_sym_static] = ACTIONS(920), - [anon_sym_auto] = ACTIONS(920), - [anon_sym_register] = ACTIONS(920), - [anon_sym_inline] = ACTIONS(920), - [anon_sym_const] = ACTIONS(920), - [anon_sym_volatile] = ACTIONS(920), - [anon_sym_restrict] = ACTIONS(920), - [anon_sym__Atomic] = ACTIONS(920), - [anon_sym_signed] = ACTIONS(920), - [anon_sym_unsigned] = ACTIONS(920), - [anon_sym_long] = ACTIONS(920), - [anon_sym_short] = ACTIONS(920), - [sym_primitive_type] = ACTIONS(920), - [anon_sym_enum] = ACTIONS(920), - [anon_sym_struct] = ACTIONS(920), - [anon_sym_union] = ACTIONS(920), - [anon_sym_if] = ACTIONS(920), - [anon_sym_else] = ACTIONS(920), - [anon_sym_switch] = ACTIONS(920), - [anon_sym_case] = ACTIONS(920), - [anon_sym_default] = ACTIONS(920), - [anon_sym_while] = ACTIONS(920), - [anon_sym_do] = ACTIONS(920), - [anon_sym_for] = ACTIONS(920), - [anon_sym_return] = ACTIONS(920), - [anon_sym_break] = ACTIONS(920), - [anon_sym_continue] = ACTIONS(920), - [anon_sym_goto] = ACTIONS(920), - [anon_sym_DASH_DASH] = ACTIONS(922), - [anon_sym_PLUS_PLUS] = ACTIONS(922), - [anon_sym_sizeof] = ACTIONS(920), - [sym_number_literal] = ACTIONS(922), - [anon_sym_L_SQUOTE] = ACTIONS(922), - [anon_sym_u_SQUOTE] = ACTIONS(922), - [anon_sym_U_SQUOTE] = ACTIONS(922), - [anon_sym_u8_SQUOTE] = ACTIONS(922), - [anon_sym_SQUOTE] = ACTIONS(922), - [anon_sym_L_DQUOTE] = ACTIONS(922), - [anon_sym_u_DQUOTE] = ACTIONS(922), - [anon_sym_U_DQUOTE] = ACTIONS(922), - [anon_sym_u8_DQUOTE] = ACTIONS(922), - [anon_sym_DQUOTE] = ACTIONS(922), - [sym_true] = ACTIONS(920), - [sym_false] = ACTIONS(920), - [sym_null] = ACTIONS(920), - [sym_comment] = ACTIONS(3), - }, - [77] = { - [sym_identifier] = ACTIONS(924), - [aux_sym_preproc_include_token1] = ACTIONS(924), - [aux_sym_preproc_def_token1] = ACTIONS(924), - [aux_sym_preproc_if_token1] = ACTIONS(924), - [aux_sym_preproc_if_token2] = ACTIONS(924), - [aux_sym_preproc_ifdef_token1] = ACTIONS(924), - [aux_sym_preproc_ifdef_token2] = ACTIONS(924), - [aux_sym_preproc_else_token1] = ACTIONS(924), - [aux_sym_preproc_elif_token1] = ACTIONS(924), - [sym_preproc_directive] = ACTIONS(924), - [anon_sym_LPAREN2] = ACTIONS(926), - [anon_sym_BANG] = ACTIONS(926), - [anon_sym_TILDE] = ACTIONS(926), - [anon_sym_DASH] = ACTIONS(924), - [anon_sym_PLUS] = ACTIONS(924), - [anon_sym_STAR] = ACTIONS(926), - [anon_sym_AMP] = ACTIONS(926), - [anon_sym_SEMI] = ACTIONS(926), - [anon_sym_typedef] = ACTIONS(924), - [anon_sym_extern] = ACTIONS(924), - [anon_sym___attribute__] = ACTIONS(924), - [anon_sym_LBRACK_LBRACK] = ACTIONS(926), - [anon_sym___declspec] = ACTIONS(924), - [anon_sym___cdecl] = ACTIONS(924), - [anon_sym___clrcall] = ACTIONS(924), - [anon_sym___stdcall] = ACTIONS(924), - [anon_sym___fastcall] = ACTIONS(924), - [anon_sym___thiscall] = ACTIONS(924), - [anon_sym___vectorcall] = ACTIONS(924), - [anon_sym_LBRACE] = ACTIONS(926), - [anon_sym_static] = ACTIONS(924), - [anon_sym_auto] = ACTIONS(924), - [anon_sym_register] = ACTIONS(924), - [anon_sym_inline] = ACTIONS(924), - [anon_sym_const] = ACTIONS(924), - [anon_sym_volatile] = ACTIONS(924), - [anon_sym_restrict] = ACTIONS(924), - [anon_sym__Atomic] = ACTIONS(924), - [anon_sym_signed] = ACTIONS(924), - [anon_sym_unsigned] = ACTIONS(924), - [anon_sym_long] = ACTIONS(924), - [anon_sym_short] = ACTIONS(924), - [sym_primitive_type] = ACTIONS(924), - [anon_sym_enum] = ACTIONS(924), - [anon_sym_struct] = ACTIONS(924), - [anon_sym_union] = ACTIONS(924), - [anon_sym_if] = ACTIONS(924), - [anon_sym_else] = ACTIONS(924), - [anon_sym_switch] = ACTIONS(924), - [anon_sym_case] = ACTIONS(924), - [anon_sym_default] = ACTIONS(924), - [anon_sym_while] = ACTIONS(924), - [anon_sym_do] = ACTIONS(924), - [anon_sym_for] = ACTIONS(924), - [anon_sym_return] = ACTIONS(924), - [anon_sym_break] = ACTIONS(924), - [anon_sym_continue] = ACTIONS(924), - [anon_sym_goto] = ACTIONS(924), - [anon_sym_DASH_DASH] = ACTIONS(926), - [anon_sym_PLUS_PLUS] = ACTIONS(926), - [anon_sym_sizeof] = ACTIONS(924), - [sym_number_literal] = ACTIONS(926), - [anon_sym_L_SQUOTE] = ACTIONS(926), - [anon_sym_u_SQUOTE] = ACTIONS(926), - [anon_sym_U_SQUOTE] = ACTIONS(926), - [anon_sym_u8_SQUOTE] = ACTIONS(926), - [anon_sym_SQUOTE] = ACTIONS(926), - [anon_sym_L_DQUOTE] = ACTIONS(926), - [anon_sym_u_DQUOTE] = ACTIONS(926), - [anon_sym_U_DQUOTE] = ACTIONS(926), - [anon_sym_u8_DQUOTE] = ACTIONS(926), - [anon_sym_DQUOTE] = ACTIONS(926), - [sym_true] = ACTIONS(924), - [sym_false] = ACTIONS(924), - [sym_null] = ACTIONS(924), - [sym_comment] = ACTIONS(3), - }, - [78] = { - [sym_identifier] = ACTIONS(928), - [aux_sym_preproc_include_token1] = ACTIONS(928), - [aux_sym_preproc_def_token1] = ACTIONS(928), - [aux_sym_preproc_if_token1] = ACTIONS(928), - [aux_sym_preproc_if_token2] = ACTIONS(928), - [aux_sym_preproc_ifdef_token1] = ACTIONS(928), - [aux_sym_preproc_ifdef_token2] = ACTIONS(928), - [aux_sym_preproc_else_token1] = ACTIONS(928), - [aux_sym_preproc_elif_token1] = ACTIONS(928), - [sym_preproc_directive] = ACTIONS(928), - [anon_sym_LPAREN2] = ACTIONS(930), - [anon_sym_BANG] = ACTIONS(930), - [anon_sym_TILDE] = ACTIONS(930), - [anon_sym_DASH] = ACTIONS(928), - [anon_sym_PLUS] = ACTIONS(928), - [anon_sym_STAR] = ACTIONS(930), - [anon_sym_AMP] = ACTIONS(930), - [anon_sym_SEMI] = ACTIONS(930), - [anon_sym_typedef] = ACTIONS(928), - [anon_sym_extern] = ACTIONS(928), - [anon_sym___attribute__] = ACTIONS(928), - [anon_sym_LBRACK_LBRACK] = ACTIONS(930), - [anon_sym___declspec] = ACTIONS(928), - [anon_sym___cdecl] = ACTIONS(928), - [anon_sym___clrcall] = ACTIONS(928), - [anon_sym___stdcall] = ACTIONS(928), - [anon_sym___fastcall] = ACTIONS(928), - [anon_sym___thiscall] = ACTIONS(928), - [anon_sym___vectorcall] = ACTIONS(928), - [anon_sym_LBRACE] = ACTIONS(930), - [anon_sym_static] = ACTIONS(928), - [anon_sym_auto] = ACTIONS(928), - [anon_sym_register] = ACTIONS(928), - [anon_sym_inline] = ACTIONS(928), - [anon_sym_const] = ACTIONS(928), - [anon_sym_volatile] = ACTIONS(928), - [anon_sym_restrict] = ACTIONS(928), - [anon_sym__Atomic] = ACTIONS(928), - [anon_sym_signed] = ACTIONS(928), - [anon_sym_unsigned] = ACTIONS(928), - [anon_sym_long] = ACTIONS(928), - [anon_sym_short] = ACTIONS(928), - [sym_primitive_type] = ACTIONS(928), - [anon_sym_enum] = ACTIONS(928), - [anon_sym_struct] = ACTIONS(928), - [anon_sym_union] = ACTIONS(928), - [anon_sym_if] = ACTIONS(928), - [anon_sym_else] = ACTIONS(928), - [anon_sym_switch] = ACTIONS(928), - [anon_sym_case] = ACTIONS(928), - [anon_sym_default] = ACTIONS(928), - [anon_sym_while] = ACTIONS(928), - [anon_sym_do] = ACTIONS(928), - [anon_sym_for] = ACTIONS(928), - [anon_sym_return] = ACTIONS(928), - [anon_sym_break] = ACTIONS(928), - [anon_sym_continue] = ACTIONS(928), - [anon_sym_goto] = ACTIONS(928), - [anon_sym_DASH_DASH] = ACTIONS(930), - [anon_sym_PLUS_PLUS] = ACTIONS(930), - [anon_sym_sizeof] = ACTIONS(928), - [sym_number_literal] = ACTIONS(930), - [anon_sym_L_SQUOTE] = ACTIONS(930), - [anon_sym_u_SQUOTE] = ACTIONS(930), - [anon_sym_U_SQUOTE] = ACTIONS(930), - [anon_sym_u8_SQUOTE] = ACTIONS(930), - [anon_sym_SQUOTE] = ACTIONS(930), - [anon_sym_L_DQUOTE] = ACTIONS(930), - [anon_sym_u_DQUOTE] = ACTIONS(930), - [anon_sym_U_DQUOTE] = ACTIONS(930), - [anon_sym_u8_DQUOTE] = ACTIONS(930), - [anon_sym_DQUOTE] = ACTIONS(930), - [sym_true] = ACTIONS(928), - [sym_false] = ACTIONS(928), - [sym_null] = ACTIONS(928), - [sym_comment] = ACTIONS(3), - }, - [79] = { - [sym_identifier] = ACTIONS(932), - [aux_sym_preproc_include_token1] = ACTIONS(932), - [aux_sym_preproc_def_token1] = ACTIONS(932), - [aux_sym_preproc_if_token1] = ACTIONS(932), - [aux_sym_preproc_if_token2] = ACTIONS(932), - [aux_sym_preproc_ifdef_token1] = ACTIONS(932), - [aux_sym_preproc_ifdef_token2] = ACTIONS(932), - [aux_sym_preproc_else_token1] = ACTIONS(932), - [aux_sym_preproc_elif_token1] = ACTIONS(932), - [sym_preproc_directive] = ACTIONS(932), - [anon_sym_LPAREN2] = ACTIONS(934), - [anon_sym_BANG] = ACTIONS(934), - [anon_sym_TILDE] = ACTIONS(934), - [anon_sym_DASH] = ACTIONS(932), - [anon_sym_PLUS] = ACTIONS(932), - [anon_sym_STAR] = ACTIONS(934), - [anon_sym_AMP] = ACTIONS(934), - [anon_sym_SEMI] = ACTIONS(934), - [anon_sym_typedef] = ACTIONS(932), - [anon_sym_extern] = ACTIONS(932), - [anon_sym___attribute__] = ACTIONS(932), - [anon_sym_LBRACK_LBRACK] = ACTIONS(934), - [anon_sym___declspec] = ACTIONS(932), - [anon_sym___cdecl] = ACTIONS(932), - [anon_sym___clrcall] = ACTIONS(932), - [anon_sym___stdcall] = ACTIONS(932), - [anon_sym___fastcall] = ACTIONS(932), - [anon_sym___thiscall] = ACTIONS(932), - [anon_sym___vectorcall] = ACTIONS(932), - [anon_sym_LBRACE] = ACTIONS(934), - [anon_sym_static] = ACTIONS(932), - [anon_sym_auto] = ACTIONS(932), - [anon_sym_register] = ACTIONS(932), - [anon_sym_inline] = ACTIONS(932), - [anon_sym_const] = ACTIONS(932), - [anon_sym_volatile] = ACTIONS(932), - [anon_sym_restrict] = ACTIONS(932), - [anon_sym__Atomic] = ACTIONS(932), - [anon_sym_signed] = ACTIONS(932), - [anon_sym_unsigned] = ACTIONS(932), - [anon_sym_long] = ACTIONS(932), - [anon_sym_short] = ACTIONS(932), - [sym_primitive_type] = ACTIONS(932), - [anon_sym_enum] = ACTIONS(932), - [anon_sym_struct] = ACTIONS(932), - [anon_sym_union] = ACTIONS(932), - [anon_sym_if] = ACTIONS(932), - [anon_sym_else] = ACTIONS(932), - [anon_sym_switch] = ACTIONS(932), - [anon_sym_case] = ACTIONS(932), - [anon_sym_default] = ACTIONS(932), - [anon_sym_while] = ACTIONS(932), - [anon_sym_do] = ACTIONS(932), - [anon_sym_for] = ACTIONS(932), - [anon_sym_return] = ACTIONS(932), - [anon_sym_break] = ACTIONS(932), - [anon_sym_continue] = ACTIONS(932), - [anon_sym_goto] = ACTIONS(932), - [anon_sym_DASH_DASH] = ACTIONS(934), - [anon_sym_PLUS_PLUS] = ACTIONS(934), - [anon_sym_sizeof] = ACTIONS(932), - [sym_number_literal] = ACTIONS(934), - [anon_sym_L_SQUOTE] = ACTIONS(934), - [anon_sym_u_SQUOTE] = ACTIONS(934), - [anon_sym_U_SQUOTE] = ACTIONS(934), - [anon_sym_u8_SQUOTE] = ACTIONS(934), - [anon_sym_SQUOTE] = ACTIONS(934), - [anon_sym_L_DQUOTE] = ACTIONS(934), - [anon_sym_u_DQUOTE] = ACTIONS(934), - [anon_sym_U_DQUOTE] = ACTIONS(934), - [anon_sym_u8_DQUOTE] = ACTIONS(934), - [anon_sym_DQUOTE] = ACTIONS(934), - [sym_true] = ACTIONS(932), - [sym_false] = ACTIONS(932), - [sym_null] = ACTIONS(932), - [sym_comment] = ACTIONS(3), - }, - [80] = { - [sym_identifier] = ACTIONS(936), - [aux_sym_preproc_include_token1] = ACTIONS(936), - [aux_sym_preproc_def_token1] = ACTIONS(936), - [aux_sym_preproc_if_token1] = ACTIONS(936), - [aux_sym_preproc_if_token2] = ACTIONS(936), - [aux_sym_preproc_ifdef_token1] = ACTIONS(936), - [aux_sym_preproc_ifdef_token2] = ACTIONS(936), - [aux_sym_preproc_else_token1] = ACTIONS(936), - [aux_sym_preproc_elif_token1] = ACTIONS(936), - [sym_preproc_directive] = ACTIONS(936), - [anon_sym_LPAREN2] = ACTIONS(938), - [anon_sym_BANG] = ACTIONS(938), - [anon_sym_TILDE] = ACTIONS(938), - [anon_sym_DASH] = ACTIONS(936), - [anon_sym_PLUS] = ACTIONS(936), - [anon_sym_STAR] = ACTIONS(938), - [anon_sym_AMP] = ACTIONS(938), - [anon_sym_SEMI] = ACTIONS(938), - [anon_sym_typedef] = ACTIONS(936), - [anon_sym_extern] = ACTIONS(936), - [anon_sym___attribute__] = ACTIONS(936), - [anon_sym_LBRACK_LBRACK] = ACTIONS(938), - [anon_sym___declspec] = ACTIONS(936), - [anon_sym___cdecl] = ACTIONS(936), - [anon_sym___clrcall] = ACTIONS(936), - [anon_sym___stdcall] = ACTIONS(936), - [anon_sym___fastcall] = ACTIONS(936), - [anon_sym___thiscall] = ACTIONS(936), - [anon_sym___vectorcall] = ACTIONS(936), - [anon_sym_LBRACE] = ACTIONS(938), - [anon_sym_static] = ACTIONS(936), - [anon_sym_auto] = ACTIONS(936), - [anon_sym_register] = ACTIONS(936), - [anon_sym_inline] = ACTIONS(936), - [anon_sym_const] = ACTIONS(936), - [anon_sym_volatile] = ACTIONS(936), - [anon_sym_restrict] = ACTIONS(936), - [anon_sym__Atomic] = ACTIONS(936), - [anon_sym_signed] = ACTIONS(936), - [anon_sym_unsigned] = ACTIONS(936), - [anon_sym_long] = ACTIONS(936), - [anon_sym_short] = ACTIONS(936), - [sym_primitive_type] = ACTIONS(936), - [anon_sym_enum] = ACTIONS(936), - [anon_sym_struct] = ACTIONS(936), - [anon_sym_union] = ACTIONS(936), - [anon_sym_if] = ACTIONS(936), - [anon_sym_else] = ACTIONS(936), - [anon_sym_switch] = ACTIONS(936), - [anon_sym_case] = ACTIONS(936), - [anon_sym_default] = ACTIONS(936), - [anon_sym_while] = ACTIONS(936), - [anon_sym_do] = ACTIONS(936), - [anon_sym_for] = ACTIONS(936), - [anon_sym_return] = ACTIONS(936), - [anon_sym_break] = ACTIONS(936), - [anon_sym_continue] = ACTIONS(936), - [anon_sym_goto] = ACTIONS(936), - [anon_sym_DASH_DASH] = ACTIONS(938), - [anon_sym_PLUS_PLUS] = ACTIONS(938), - [anon_sym_sizeof] = ACTIONS(936), - [sym_number_literal] = ACTIONS(938), - [anon_sym_L_SQUOTE] = ACTIONS(938), - [anon_sym_u_SQUOTE] = ACTIONS(938), - [anon_sym_U_SQUOTE] = ACTIONS(938), - [anon_sym_u8_SQUOTE] = ACTIONS(938), - [anon_sym_SQUOTE] = ACTIONS(938), - [anon_sym_L_DQUOTE] = ACTIONS(938), - [anon_sym_u_DQUOTE] = ACTIONS(938), - [anon_sym_U_DQUOTE] = ACTIONS(938), - [anon_sym_u8_DQUOTE] = ACTIONS(938), - [anon_sym_DQUOTE] = ACTIONS(938), - [sym_true] = ACTIONS(936), - [sym_false] = ACTIONS(936), - [sym_null] = ACTIONS(936), - [sym_comment] = ACTIONS(3), - }, - [81] = { - [sym_identifier] = ACTIONS(940), - [aux_sym_preproc_include_token1] = ACTIONS(940), - [aux_sym_preproc_def_token1] = ACTIONS(940), - [aux_sym_preproc_if_token1] = ACTIONS(940), - [aux_sym_preproc_if_token2] = ACTIONS(940), - [aux_sym_preproc_ifdef_token1] = ACTIONS(940), - [aux_sym_preproc_ifdef_token2] = ACTIONS(940), - [aux_sym_preproc_else_token1] = ACTIONS(940), - [aux_sym_preproc_elif_token1] = ACTIONS(940), - [sym_preproc_directive] = ACTIONS(940), - [anon_sym_LPAREN2] = ACTIONS(942), - [anon_sym_BANG] = ACTIONS(942), - [anon_sym_TILDE] = ACTIONS(942), - [anon_sym_DASH] = ACTIONS(940), - [anon_sym_PLUS] = ACTIONS(940), - [anon_sym_STAR] = ACTIONS(942), - [anon_sym_AMP] = ACTIONS(942), - [anon_sym_SEMI] = ACTIONS(942), - [anon_sym_typedef] = ACTIONS(940), - [anon_sym_extern] = ACTIONS(940), - [anon_sym___attribute__] = ACTIONS(940), - [anon_sym_LBRACK_LBRACK] = ACTIONS(942), - [anon_sym___declspec] = ACTIONS(940), - [anon_sym___cdecl] = ACTIONS(940), - [anon_sym___clrcall] = ACTIONS(940), - [anon_sym___stdcall] = ACTIONS(940), - [anon_sym___fastcall] = ACTIONS(940), - [anon_sym___thiscall] = ACTIONS(940), - [anon_sym___vectorcall] = ACTIONS(940), - [anon_sym_LBRACE] = ACTIONS(942), - [anon_sym_static] = ACTIONS(940), - [anon_sym_auto] = ACTIONS(940), - [anon_sym_register] = ACTIONS(940), - [anon_sym_inline] = ACTIONS(940), - [anon_sym_const] = ACTIONS(940), - [anon_sym_volatile] = ACTIONS(940), - [anon_sym_restrict] = ACTIONS(940), - [anon_sym__Atomic] = ACTIONS(940), - [anon_sym_signed] = ACTIONS(940), - [anon_sym_unsigned] = ACTIONS(940), - [anon_sym_long] = ACTIONS(940), - [anon_sym_short] = ACTIONS(940), - [sym_primitive_type] = ACTIONS(940), - [anon_sym_enum] = ACTIONS(940), - [anon_sym_struct] = ACTIONS(940), - [anon_sym_union] = ACTIONS(940), - [anon_sym_if] = ACTIONS(940), - [anon_sym_else] = ACTIONS(940), - [anon_sym_switch] = ACTIONS(940), - [anon_sym_case] = ACTIONS(940), - [anon_sym_default] = ACTIONS(940), - [anon_sym_while] = ACTIONS(940), - [anon_sym_do] = ACTIONS(940), - [anon_sym_for] = ACTIONS(940), - [anon_sym_return] = ACTIONS(940), - [anon_sym_break] = ACTIONS(940), - [anon_sym_continue] = ACTIONS(940), - [anon_sym_goto] = ACTIONS(940), - [anon_sym_DASH_DASH] = ACTIONS(942), - [anon_sym_PLUS_PLUS] = ACTIONS(942), - [anon_sym_sizeof] = ACTIONS(940), - [sym_number_literal] = ACTIONS(942), - [anon_sym_L_SQUOTE] = ACTIONS(942), - [anon_sym_u_SQUOTE] = ACTIONS(942), - [anon_sym_U_SQUOTE] = ACTIONS(942), - [anon_sym_u8_SQUOTE] = ACTIONS(942), - [anon_sym_SQUOTE] = ACTIONS(942), - [anon_sym_L_DQUOTE] = ACTIONS(942), - [anon_sym_u_DQUOTE] = ACTIONS(942), - [anon_sym_U_DQUOTE] = ACTIONS(942), - [anon_sym_u8_DQUOTE] = ACTIONS(942), - [anon_sym_DQUOTE] = ACTIONS(942), - [sym_true] = ACTIONS(940), - [sym_false] = ACTIONS(940), - [sym_null] = ACTIONS(940), - [sym_comment] = ACTIONS(3), - }, - [82] = { - [sym_identifier] = ACTIONS(944), - [aux_sym_preproc_include_token1] = ACTIONS(944), - [aux_sym_preproc_def_token1] = ACTIONS(944), - [aux_sym_preproc_if_token1] = ACTIONS(944), - [aux_sym_preproc_if_token2] = ACTIONS(944), - [aux_sym_preproc_ifdef_token1] = ACTIONS(944), - [aux_sym_preproc_ifdef_token2] = ACTIONS(944), - [aux_sym_preproc_else_token1] = ACTIONS(944), - [aux_sym_preproc_elif_token1] = ACTIONS(944), - [sym_preproc_directive] = ACTIONS(944), - [anon_sym_LPAREN2] = ACTIONS(946), - [anon_sym_BANG] = ACTIONS(946), - [anon_sym_TILDE] = ACTIONS(946), - [anon_sym_DASH] = ACTIONS(944), - [anon_sym_PLUS] = ACTIONS(944), - [anon_sym_STAR] = ACTIONS(946), - [anon_sym_AMP] = ACTIONS(946), - [anon_sym_SEMI] = ACTIONS(946), - [anon_sym_typedef] = ACTIONS(944), - [anon_sym_extern] = ACTIONS(944), - [anon_sym___attribute__] = ACTIONS(944), - [anon_sym_LBRACK_LBRACK] = ACTIONS(946), - [anon_sym___declspec] = ACTIONS(944), - [anon_sym___cdecl] = ACTIONS(944), - [anon_sym___clrcall] = ACTIONS(944), - [anon_sym___stdcall] = ACTIONS(944), - [anon_sym___fastcall] = ACTIONS(944), - [anon_sym___thiscall] = ACTIONS(944), - [anon_sym___vectorcall] = ACTIONS(944), - [anon_sym_LBRACE] = ACTIONS(946), - [anon_sym_static] = ACTIONS(944), - [anon_sym_auto] = ACTIONS(944), - [anon_sym_register] = ACTIONS(944), - [anon_sym_inline] = ACTIONS(944), - [anon_sym_const] = ACTIONS(944), - [anon_sym_volatile] = ACTIONS(944), - [anon_sym_restrict] = ACTIONS(944), - [anon_sym__Atomic] = ACTIONS(944), - [anon_sym_signed] = ACTIONS(944), - [anon_sym_unsigned] = ACTIONS(944), - [anon_sym_long] = ACTIONS(944), - [anon_sym_short] = ACTIONS(944), - [sym_primitive_type] = ACTIONS(944), - [anon_sym_enum] = ACTIONS(944), - [anon_sym_struct] = ACTIONS(944), - [anon_sym_union] = ACTIONS(944), - [anon_sym_if] = ACTIONS(944), - [anon_sym_else] = ACTIONS(944), - [anon_sym_switch] = ACTIONS(944), - [anon_sym_case] = ACTIONS(944), - [anon_sym_default] = ACTIONS(944), - [anon_sym_while] = ACTIONS(944), - [anon_sym_do] = ACTIONS(944), - [anon_sym_for] = ACTIONS(944), - [anon_sym_return] = ACTIONS(944), - [anon_sym_break] = ACTIONS(944), - [anon_sym_continue] = ACTIONS(944), - [anon_sym_goto] = ACTIONS(944), - [anon_sym_DASH_DASH] = ACTIONS(946), - [anon_sym_PLUS_PLUS] = ACTIONS(946), - [anon_sym_sizeof] = ACTIONS(944), - [sym_number_literal] = ACTIONS(946), - [anon_sym_L_SQUOTE] = ACTIONS(946), - [anon_sym_u_SQUOTE] = ACTIONS(946), - [anon_sym_U_SQUOTE] = ACTIONS(946), - [anon_sym_u8_SQUOTE] = ACTIONS(946), - [anon_sym_SQUOTE] = ACTIONS(946), - [anon_sym_L_DQUOTE] = ACTIONS(946), - [anon_sym_u_DQUOTE] = ACTIONS(946), - [anon_sym_U_DQUOTE] = ACTIONS(946), - [anon_sym_u8_DQUOTE] = ACTIONS(946), - [anon_sym_DQUOTE] = ACTIONS(946), - [sym_true] = ACTIONS(944), - [sym_false] = ACTIONS(944), - [sym_null] = ACTIONS(944), - [sym_comment] = ACTIONS(3), - }, - [83] = { - [sym_identifier] = ACTIONS(948), - [aux_sym_preproc_include_token1] = ACTIONS(948), - [aux_sym_preproc_def_token1] = ACTIONS(948), - [aux_sym_preproc_if_token1] = ACTIONS(948), - [aux_sym_preproc_if_token2] = ACTIONS(948), - [aux_sym_preproc_ifdef_token1] = ACTIONS(948), - [aux_sym_preproc_ifdef_token2] = ACTIONS(948), - [aux_sym_preproc_else_token1] = ACTIONS(948), - [aux_sym_preproc_elif_token1] = ACTIONS(948), - [sym_preproc_directive] = ACTIONS(948), - [anon_sym_LPAREN2] = ACTIONS(950), - [anon_sym_BANG] = ACTIONS(950), - [anon_sym_TILDE] = ACTIONS(950), - [anon_sym_DASH] = ACTIONS(948), - [anon_sym_PLUS] = ACTIONS(948), - [anon_sym_STAR] = ACTIONS(950), - [anon_sym_AMP] = ACTIONS(950), - [anon_sym_SEMI] = ACTIONS(950), - [anon_sym_typedef] = ACTIONS(948), - [anon_sym_extern] = ACTIONS(948), - [anon_sym___attribute__] = ACTIONS(948), - [anon_sym_LBRACK_LBRACK] = ACTIONS(950), - [anon_sym___declspec] = ACTIONS(948), - [anon_sym___cdecl] = ACTIONS(948), - [anon_sym___clrcall] = ACTIONS(948), - [anon_sym___stdcall] = ACTIONS(948), - [anon_sym___fastcall] = ACTIONS(948), - [anon_sym___thiscall] = ACTIONS(948), - [anon_sym___vectorcall] = ACTIONS(948), - [anon_sym_LBRACE] = ACTIONS(950), - [anon_sym_static] = ACTIONS(948), - [anon_sym_auto] = ACTIONS(948), - [anon_sym_register] = ACTIONS(948), - [anon_sym_inline] = ACTIONS(948), - [anon_sym_const] = ACTIONS(948), - [anon_sym_volatile] = ACTIONS(948), - [anon_sym_restrict] = ACTIONS(948), - [anon_sym__Atomic] = ACTIONS(948), - [anon_sym_signed] = ACTIONS(948), - [anon_sym_unsigned] = ACTIONS(948), - [anon_sym_long] = ACTIONS(948), - [anon_sym_short] = ACTIONS(948), - [sym_primitive_type] = ACTIONS(948), - [anon_sym_enum] = ACTIONS(948), - [anon_sym_struct] = ACTIONS(948), - [anon_sym_union] = ACTIONS(948), - [anon_sym_if] = ACTIONS(948), - [anon_sym_else] = ACTIONS(948), - [anon_sym_switch] = ACTIONS(948), - [anon_sym_case] = ACTIONS(948), - [anon_sym_default] = ACTIONS(948), - [anon_sym_while] = ACTIONS(948), - [anon_sym_do] = ACTIONS(948), - [anon_sym_for] = ACTIONS(948), - [anon_sym_return] = ACTIONS(948), - [anon_sym_break] = ACTIONS(948), - [anon_sym_continue] = ACTIONS(948), - [anon_sym_goto] = ACTIONS(948), - [anon_sym_DASH_DASH] = ACTIONS(950), - [anon_sym_PLUS_PLUS] = ACTIONS(950), - [anon_sym_sizeof] = ACTIONS(948), - [sym_number_literal] = ACTIONS(950), - [anon_sym_L_SQUOTE] = ACTIONS(950), - [anon_sym_u_SQUOTE] = ACTIONS(950), - [anon_sym_U_SQUOTE] = ACTIONS(950), - [anon_sym_u8_SQUOTE] = ACTIONS(950), - [anon_sym_SQUOTE] = ACTIONS(950), - [anon_sym_L_DQUOTE] = ACTIONS(950), - [anon_sym_u_DQUOTE] = ACTIONS(950), - [anon_sym_U_DQUOTE] = ACTIONS(950), - [anon_sym_u8_DQUOTE] = ACTIONS(950), - [anon_sym_DQUOTE] = ACTIONS(950), - [sym_true] = ACTIONS(948), - [sym_false] = ACTIONS(948), - [sym_null] = ACTIONS(948), - [sym_comment] = ACTIONS(3), - }, - [84] = { - [sym_identifier] = ACTIONS(952), - [aux_sym_preproc_include_token1] = ACTIONS(952), - [aux_sym_preproc_def_token1] = ACTIONS(952), - [aux_sym_preproc_if_token1] = ACTIONS(952), - [aux_sym_preproc_if_token2] = ACTIONS(952), - [aux_sym_preproc_ifdef_token1] = ACTIONS(952), - [aux_sym_preproc_ifdef_token2] = ACTIONS(952), - [aux_sym_preproc_else_token1] = ACTIONS(952), - [aux_sym_preproc_elif_token1] = ACTIONS(952), - [sym_preproc_directive] = ACTIONS(952), - [anon_sym_LPAREN2] = ACTIONS(954), - [anon_sym_BANG] = ACTIONS(954), - [anon_sym_TILDE] = ACTIONS(954), - [anon_sym_DASH] = ACTIONS(952), - [anon_sym_PLUS] = ACTIONS(952), - [anon_sym_STAR] = ACTIONS(954), - [anon_sym_AMP] = ACTIONS(954), - [anon_sym_SEMI] = ACTIONS(954), - [anon_sym_typedef] = ACTIONS(952), - [anon_sym_extern] = ACTIONS(952), - [anon_sym___attribute__] = ACTIONS(952), - [anon_sym_LBRACK_LBRACK] = ACTIONS(954), - [anon_sym___declspec] = ACTIONS(952), - [anon_sym___cdecl] = ACTIONS(952), - [anon_sym___clrcall] = ACTIONS(952), - [anon_sym___stdcall] = ACTIONS(952), - [anon_sym___fastcall] = ACTIONS(952), - [anon_sym___thiscall] = ACTIONS(952), - [anon_sym___vectorcall] = ACTIONS(952), - [anon_sym_LBRACE] = ACTIONS(954), - [anon_sym_static] = ACTIONS(952), - [anon_sym_auto] = ACTIONS(952), - [anon_sym_register] = ACTIONS(952), - [anon_sym_inline] = ACTIONS(952), - [anon_sym_const] = ACTIONS(952), - [anon_sym_volatile] = ACTIONS(952), - [anon_sym_restrict] = ACTIONS(952), - [anon_sym__Atomic] = ACTIONS(952), - [anon_sym_signed] = ACTIONS(952), - [anon_sym_unsigned] = ACTIONS(952), - [anon_sym_long] = ACTIONS(952), - [anon_sym_short] = ACTIONS(952), - [sym_primitive_type] = ACTIONS(952), - [anon_sym_enum] = ACTIONS(952), - [anon_sym_struct] = ACTIONS(952), - [anon_sym_union] = ACTIONS(952), - [anon_sym_if] = ACTIONS(952), - [anon_sym_else] = ACTIONS(952), - [anon_sym_switch] = ACTIONS(952), - [anon_sym_case] = ACTIONS(952), - [anon_sym_default] = ACTIONS(952), - [anon_sym_while] = ACTIONS(952), - [anon_sym_do] = ACTIONS(952), - [anon_sym_for] = ACTIONS(952), - [anon_sym_return] = ACTIONS(952), - [anon_sym_break] = ACTIONS(952), - [anon_sym_continue] = ACTIONS(952), - [anon_sym_goto] = ACTIONS(952), - [anon_sym_DASH_DASH] = ACTIONS(954), - [anon_sym_PLUS_PLUS] = ACTIONS(954), - [anon_sym_sizeof] = ACTIONS(952), - [sym_number_literal] = ACTIONS(954), - [anon_sym_L_SQUOTE] = ACTIONS(954), - [anon_sym_u_SQUOTE] = ACTIONS(954), - [anon_sym_U_SQUOTE] = ACTIONS(954), - [anon_sym_u8_SQUOTE] = ACTIONS(954), - [anon_sym_SQUOTE] = ACTIONS(954), - [anon_sym_L_DQUOTE] = ACTIONS(954), - [anon_sym_u_DQUOTE] = ACTIONS(954), - [anon_sym_U_DQUOTE] = ACTIONS(954), - [anon_sym_u8_DQUOTE] = ACTIONS(954), - [anon_sym_DQUOTE] = ACTIONS(954), - [sym_true] = ACTIONS(952), - [sym_false] = ACTIONS(952), - [sym_null] = ACTIONS(952), - [sym_comment] = ACTIONS(3), - }, - [85] = { - [sym_identifier] = ACTIONS(898), - [aux_sym_preproc_include_token1] = ACTIONS(898), - [aux_sym_preproc_def_token1] = ACTIONS(898), - [aux_sym_preproc_if_token1] = ACTIONS(898), - [aux_sym_preproc_if_token2] = ACTIONS(898), - [aux_sym_preproc_ifdef_token1] = ACTIONS(898), - [aux_sym_preproc_ifdef_token2] = ACTIONS(898), - [aux_sym_preproc_else_token1] = ACTIONS(898), - [aux_sym_preproc_elif_token1] = ACTIONS(898), - [sym_preproc_directive] = ACTIONS(898), - [anon_sym_LPAREN2] = ACTIONS(900), - [anon_sym_BANG] = ACTIONS(900), - [anon_sym_TILDE] = ACTIONS(900), - [anon_sym_DASH] = ACTIONS(898), - [anon_sym_PLUS] = ACTIONS(898), - [anon_sym_STAR] = ACTIONS(900), - [anon_sym_AMP] = ACTIONS(900), - [anon_sym_SEMI] = ACTIONS(900), - [anon_sym_typedef] = ACTIONS(898), - [anon_sym_extern] = ACTIONS(898), - [anon_sym___attribute__] = ACTIONS(898), - [anon_sym_LBRACK_LBRACK] = ACTIONS(900), - [anon_sym___declspec] = ACTIONS(898), - [anon_sym___cdecl] = ACTIONS(898), - [anon_sym___clrcall] = ACTIONS(898), - [anon_sym___stdcall] = ACTIONS(898), - [anon_sym___fastcall] = ACTIONS(898), - [anon_sym___thiscall] = ACTIONS(898), - [anon_sym___vectorcall] = ACTIONS(898), - [anon_sym_LBRACE] = ACTIONS(900), - [anon_sym_static] = ACTIONS(898), - [anon_sym_auto] = ACTIONS(898), - [anon_sym_register] = ACTIONS(898), - [anon_sym_inline] = ACTIONS(898), - [anon_sym_const] = ACTIONS(898), - [anon_sym_volatile] = ACTIONS(898), - [anon_sym_restrict] = ACTIONS(898), - [anon_sym__Atomic] = ACTIONS(898), - [anon_sym_signed] = ACTIONS(898), - [anon_sym_unsigned] = ACTIONS(898), - [anon_sym_long] = ACTIONS(898), - [anon_sym_short] = ACTIONS(898), - [sym_primitive_type] = ACTIONS(898), - [anon_sym_enum] = ACTIONS(898), - [anon_sym_struct] = ACTIONS(898), - [anon_sym_union] = ACTIONS(898), - [anon_sym_if] = ACTIONS(898), - [anon_sym_else] = ACTIONS(898), - [anon_sym_switch] = ACTIONS(898), - [anon_sym_case] = ACTIONS(898), - [anon_sym_default] = ACTIONS(898), - [anon_sym_while] = ACTIONS(898), - [anon_sym_do] = ACTIONS(898), - [anon_sym_for] = ACTIONS(898), - [anon_sym_return] = ACTIONS(898), - [anon_sym_break] = ACTIONS(898), - [anon_sym_continue] = ACTIONS(898), - [anon_sym_goto] = ACTIONS(898), - [anon_sym_DASH_DASH] = ACTIONS(900), - [anon_sym_PLUS_PLUS] = ACTIONS(900), - [anon_sym_sizeof] = ACTIONS(898), - [sym_number_literal] = ACTIONS(900), - [anon_sym_L_SQUOTE] = ACTIONS(900), - [anon_sym_u_SQUOTE] = ACTIONS(900), - [anon_sym_U_SQUOTE] = ACTIONS(900), - [anon_sym_u8_SQUOTE] = ACTIONS(900), - [anon_sym_SQUOTE] = ACTIONS(900), - [anon_sym_L_DQUOTE] = ACTIONS(900), - [anon_sym_u_DQUOTE] = ACTIONS(900), - [anon_sym_U_DQUOTE] = ACTIONS(900), - [anon_sym_u8_DQUOTE] = ACTIONS(900), - [anon_sym_DQUOTE] = ACTIONS(900), - [sym_true] = ACTIONS(898), - [sym_false] = ACTIONS(898), - [sym_null] = ACTIONS(898), - [sym_comment] = ACTIONS(3), - }, - [86] = { - [sym_identifier] = ACTIONS(956), - [aux_sym_preproc_include_token1] = ACTIONS(956), - [aux_sym_preproc_def_token1] = ACTIONS(956), - [aux_sym_preproc_if_token1] = ACTIONS(956), - [aux_sym_preproc_if_token2] = ACTIONS(956), - [aux_sym_preproc_ifdef_token1] = ACTIONS(956), - [aux_sym_preproc_ifdef_token2] = ACTIONS(956), - [aux_sym_preproc_else_token1] = ACTIONS(956), - [aux_sym_preproc_elif_token1] = ACTIONS(956), - [sym_preproc_directive] = ACTIONS(956), - [anon_sym_LPAREN2] = ACTIONS(958), - [anon_sym_BANG] = ACTIONS(958), - [anon_sym_TILDE] = ACTIONS(958), - [anon_sym_DASH] = ACTIONS(956), - [anon_sym_PLUS] = ACTIONS(956), - [anon_sym_STAR] = ACTIONS(958), - [anon_sym_AMP] = ACTIONS(958), - [anon_sym_SEMI] = ACTIONS(958), - [anon_sym_typedef] = ACTIONS(956), - [anon_sym_extern] = ACTIONS(956), - [anon_sym___attribute__] = ACTIONS(956), - [anon_sym_LBRACK_LBRACK] = ACTIONS(958), - [anon_sym___declspec] = ACTIONS(956), - [anon_sym___cdecl] = ACTIONS(956), - [anon_sym___clrcall] = ACTIONS(956), - [anon_sym___stdcall] = ACTIONS(956), - [anon_sym___fastcall] = ACTIONS(956), - [anon_sym___thiscall] = ACTIONS(956), - [anon_sym___vectorcall] = ACTIONS(956), - [anon_sym_LBRACE] = ACTIONS(958), - [anon_sym_static] = ACTIONS(956), - [anon_sym_auto] = ACTIONS(956), - [anon_sym_register] = ACTIONS(956), - [anon_sym_inline] = ACTIONS(956), - [anon_sym_const] = ACTIONS(956), - [anon_sym_volatile] = ACTIONS(956), - [anon_sym_restrict] = ACTIONS(956), - [anon_sym__Atomic] = ACTIONS(956), - [anon_sym_signed] = ACTIONS(956), - [anon_sym_unsigned] = ACTIONS(956), - [anon_sym_long] = ACTIONS(956), - [anon_sym_short] = ACTIONS(956), - [sym_primitive_type] = ACTIONS(956), - [anon_sym_enum] = ACTIONS(956), - [anon_sym_struct] = ACTIONS(956), - [anon_sym_union] = ACTIONS(956), - [anon_sym_if] = ACTIONS(956), - [anon_sym_else] = ACTIONS(956), - [anon_sym_switch] = ACTIONS(956), - [anon_sym_case] = ACTIONS(956), - [anon_sym_default] = ACTIONS(956), - [anon_sym_while] = ACTIONS(956), - [anon_sym_do] = ACTIONS(956), - [anon_sym_for] = ACTIONS(956), - [anon_sym_return] = ACTIONS(956), - [anon_sym_break] = ACTIONS(956), - [anon_sym_continue] = ACTIONS(956), - [anon_sym_goto] = ACTIONS(956), - [anon_sym_DASH_DASH] = ACTIONS(958), - [anon_sym_PLUS_PLUS] = ACTIONS(958), - [anon_sym_sizeof] = ACTIONS(956), - [sym_number_literal] = ACTIONS(958), - [anon_sym_L_SQUOTE] = ACTIONS(958), - [anon_sym_u_SQUOTE] = ACTIONS(958), - [anon_sym_U_SQUOTE] = ACTIONS(958), - [anon_sym_u8_SQUOTE] = ACTIONS(958), - [anon_sym_SQUOTE] = ACTIONS(958), - [anon_sym_L_DQUOTE] = ACTIONS(958), - [anon_sym_u_DQUOTE] = ACTIONS(958), - [anon_sym_U_DQUOTE] = ACTIONS(958), - [anon_sym_u8_DQUOTE] = ACTIONS(958), - [anon_sym_DQUOTE] = ACTIONS(958), - [sym_true] = ACTIONS(956), - [sym_false] = ACTIONS(956), - [sym_null] = ACTIONS(956), - [sym_comment] = ACTIONS(3), - }, - [87] = { - [sym_identifier] = ACTIONS(960), - [aux_sym_preproc_include_token1] = ACTIONS(960), - [aux_sym_preproc_def_token1] = ACTIONS(960), - [aux_sym_preproc_if_token1] = ACTIONS(960), - [aux_sym_preproc_if_token2] = ACTIONS(960), - [aux_sym_preproc_ifdef_token1] = ACTIONS(960), - [aux_sym_preproc_ifdef_token2] = ACTIONS(960), - [aux_sym_preproc_else_token1] = ACTIONS(960), - [aux_sym_preproc_elif_token1] = ACTIONS(960), - [sym_preproc_directive] = ACTIONS(960), - [anon_sym_LPAREN2] = ACTIONS(962), - [anon_sym_BANG] = ACTIONS(962), - [anon_sym_TILDE] = ACTIONS(962), - [anon_sym_DASH] = ACTIONS(960), - [anon_sym_PLUS] = ACTIONS(960), - [anon_sym_STAR] = ACTIONS(962), - [anon_sym_AMP] = ACTIONS(962), - [anon_sym_SEMI] = ACTIONS(962), - [anon_sym_typedef] = ACTIONS(960), - [anon_sym_extern] = ACTIONS(960), - [anon_sym___attribute__] = ACTIONS(960), - [anon_sym_LBRACK_LBRACK] = ACTIONS(962), - [anon_sym___declspec] = ACTIONS(960), - [anon_sym___cdecl] = ACTIONS(960), - [anon_sym___clrcall] = ACTIONS(960), - [anon_sym___stdcall] = ACTIONS(960), - [anon_sym___fastcall] = ACTIONS(960), - [anon_sym___thiscall] = ACTIONS(960), - [anon_sym___vectorcall] = ACTIONS(960), - [anon_sym_LBRACE] = ACTIONS(962), - [anon_sym_static] = ACTIONS(960), - [anon_sym_auto] = ACTIONS(960), - [anon_sym_register] = ACTIONS(960), - [anon_sym_inline] = ACTIONS(960), - [anon_sym_const] = ACTIONS(960), - [anon_sym_volatile] = ACTIONS(960), - [anon_sym_restrict] = ACTIONS(960), - [anon_sym__Atomic] = ACTIONS(960), - [anon_sym_signed] = ACTIONS(960), - [anon_sym_unsigned] = ACTIONS(960), - [anon_sym_long] = ACTIONS(960), - [anon_sym_short] = ACTIONS(960), - [sym_primitive_type] = ACTIONS(960), - [anon_sym_enum] = ACTIONS(960), - [anon_sym_struct] = ACTIONS(960), - [anon_sym_union] = ACTIONS(960), - [anon_sym_if] = ACTIONS(960), - [anon_sym_else] = ACTIONS(960), - [anon_sym_switch] = ACTIONS(960), - [anon_sym_case] = ACTIONS(960), - [anon_sym_default] = ACTIONS(960), - [anon_sym_while] = ACTIONS(960), - [anon_sym_do] = ACTIONS(960), - [anon_sym_for] = ACTIONS(960), - [anon_sym_return] = ACTIONS(960), - [anon_sym_break] = ACTIONS(960), - [anon_sym_continue] = ACTIONS(960), - [anon_sym_goto] = ACTIONS(960), - [anon_sym_DASH_DASH] = ACTIONS(962), - [anon_sym_PLUS_PLUS] = ACTIONS(962), - [anon_sym_sizeof] = ACTIONS(960), - [sym_number_literal] = ACTIONS(962), - [anon_sym_L_SQUOTE] = ACTIONS(962), - [anon_sym_u_SQUOTE] = ACTIONS(962), - [anon_sym_U_SQUOTE] = ACTIONS(962), - [anon_sym_u8_SQUOTE] = ACTIONS(962), - [anon_sym_SQUOTE] = ACTIONS(962), - [anon_sym_L_DQUOTE] = ACTIONS(962), - [anon_sym_u_DQUOTE] = ACTIONS(962), - [anon_sym_U_DQUOTE] = ACTIONS(962), - [anon_sym_u8_DQUOTE] = ACTIONS(962), - [anon_sym_DQUOTE] = ACTIONS(962), - [sym_true] = ACTIONS(960), - [sym_false] = ACTIONS(960), - [sym_null] = ACTIONS(960), - [sym_comment] = ACTIONS(3), - }, - [88] = { - [sym_identifier] = ACTIONS(964), - [aux_sym_preproc_include_token1] = ACTIONS(964), - [aux_sym_preproc_def_token1] = ACTIONS(964), - [aux_sym_preproc_if_token1] = ACTIONS(964), - [aux_sym_preproc_if_token2] = ACTIONS(964), - [aux_sym_preproc_ifdef_token1] = ACTIONS(964), - [aux_sym_preproc_ifdef_token2] = ACTIONS(964), - [aux_sym_preproc_else_token1] = ACTIONS(964), - [aux_sym_preproc_elif_token1] = ACTIONS(964), - [sym_preproc_directive] = ACTIONS(964), - [anon_sym_LPAREN2] = ACTIONS(966), - [anon_sym_BANG] = ACTIONS(966), - [anon_sym_TILDE] = ACTIONS(966), - [anon_sym_DASH] = ACTIONS(964), - [anon_sym_PLUS] = ACTIONS(964), - [anon_sym_STAR] = ACTIONS(966), - [anon_sym_AMP] = ACTIONS(966), - [anon_sym_SEMI] = ACTIONS(966), - [anon_sym_typedef] = ACTIONS(964), - [anon_sym_extern] = ACTIONS(964), - [anon_sym___attribute__] = ACTIONS(964), - [anon_sym_LBRACK_LBRACK] = ACTIONS(966), - [anon_sym___declspec] = ACTIONS(964), - [anon_sym___cdecl] = ACTIONS(964), - [anon_sym___clrcall] = ACTIONS(964), - [anon_sym___stdcall] = ACTIONS(964), - [anon_sym___fastcall] = ACTIONS(964), - [anon_sym___thiscall] = ACTIONS(964), - [anon_sym___vectorcall] = ACTIONS(964), - [anon_sym_LBRACE] = ACTIONS(966), - [anon_sym_static] = ACTIONS(964), - [anon_sym_auto] = ACTIONS(964), - [anon_sym_register] = ACTIONS(964), - [anon_sym_inline] = ACTIONS(964), - [anon_sym_const] = ACTIONS(964), - [anon_sym_volatile] = ACTIONS(964), - [anon_sym_restrict] = ACTIONS(964), - [anon_sym__Atomic] = ACTIONS(964), - [anon_sym_signed] = ACTIONS(964), - [anon_sym_unsigned] = ACTIONS(964), - [anon_sym_long] = ACTIONS(964), - [anon_sym_short] = ACTIONS(964), - [sym_primitive_type] = ACTIONS(964), - [anon_sym_enum] = ACTIONS(964), - [anon_sym_struct] = ACTIONS(964), - [anon_sym_union] = ACTIONS(964), - [anon_sym_if] = ACTIONS(964), - [anon_sym_else] = ACTIONS(964), - [anon_sym_switch] = ACTIONS(964), - [anon_sym_case] = ACTIONS(964), - [anon_sym_default] = ACTIONS(964), - [anon_sym_while] = ACTIONS(964), - [anon_sym_do] = ACTIONS(964), - [anon_sym_for] = ACTIONS(964), - [anon_sym_return] = ACTIONS(964), - [anon_sym_break] = ACTIONS(964), - [anon_sym_continue] = ACTIONS(964), - [anon_sym_goto] = ACTIONS(964), - [anon_sym_DASH_DASH] = ACTIONS(966), - [anon_sym_PLUS_PLUS] = ACTIONS(966), - [anon_sym_sizeof] = ACTIONS(964), - [sym_number_literal] = ACTIONS(966), - [anon_sym_L_SQUOTE] = ACTIONS(966), - [anon_sym_u_SQUOTE] = ACTIONS(966), - [anon_sym_U_SQUOTE] = ACTIONS(966), - [anon_sym_u8_SQUOTE] = ACTIONS(966), - [anon_sym_SQUOTE] = ACTIONS(966), - [anon_sym_L_DQUOTE] = ACTIONS(966), - [anon_sym_u_DQUOTE] = ACTIONS(966), - [anon_sym_U_DQUOTE] = ACTIONS(966), - [anon_sym_u8_DQUOTE] = ACTIONS(966), - [anon_sym_DQUOTE] = ACTIONS(966), - [sym_true] = ACTIONS(964), - [sym_false] = ACTIONS(964), - [sym_null] = ACTIONS(964), - [sym_comment] = ACTIONS(3), - }, - [89] = { - [sym_identifier] = ACTIONS(968), - [aux_sym_preproc_include_token1] = ACTIONS(968), - [aux_sym_preproc_def_token1] = ACTIONS(968), - [aux_sym_preproc_if_token1] = ACTIONS(968), - [aux_sym_preproc_if_token2] = ACTIONS(968), - [aux_sym_preproc_ifdef_token1] = ACTIONS(968), - [aux_sym_preproc_ifdef_token2] = ACTIONS(968), - [aux_sym_preproc_else_token1] = ACTIONS(968), - [aux_sym_preproc_elif_token1] = ACTIONS(968), - [sym_preproc_directive] = ACTIONS(968), - [anon_sym_LPAREN2] = ACTIONS(970), - [anon_sym_BANG] = ACTIONS(970), - [anon_sym_TILDE] = ACTIONS(970), - [anon_sym_DASH] = ACTIONS(968), - [anon_sym_PLUS] = ACTIONS(968), - [anon_sym_STAR] = ACTIONS(970), - [anon_sym_AMP] = ACTIONS(970), - [anon_sym_SEMI] = ACTIONS(970), - [anon_sym_typedef] = ACTIONS(968), - [anon_sym_extern] = ACTIONS(968), - [anon_sym___attribute__] = ACTIONS(968), - [anon_sym_LBRACK_LBRACK] = ACTIONS(970), - [anon_sym___declspec] = ACTIONS(968), - [anon_sym___cdecl] = ACTIONS(968), - [anon_sym___clrcall] = ACTIONS(968), - [anon_sym___stdcall] = ACTIONS(968), - [anon_sym___fastcall] = ACTIONS(968), - [anon_sym___thiscall] = ACTIONS(968), - [anon_sym___vectorcall] = ACTIONS(968), - [anon_sym_LBRACE] = ACTIONS(970), - [anon_sym_static] = ACTIONS(968), - [anon_sym_auto] = ACTIONS(968), - [anon_sym_register] = ACTIONS(968), - [anon_sym_inline] = ACTIONS(968), - [anon_sym_const] = ACTIONS(968), - [anon_sym_volatile] = ACTIONS(968), - [anon_sym_restrict] = ACTIONS(968), - [anon_sym__Atomic] = ACTIONS(968), - [anon_sym_signed] = ACTIONS(968), - [anon_sym_unsigned] = ACTIONS(968), - [anon_sym_long] = ACTIONS(968), - [anon_sym_short] = ACTIONS(968), - [sym_primitive_type] = ACTIONS(968), - [anon_sym_enum] = ACTIONS(968), - [anon_sym_struct] = ACTIONS(968), - [anon_sym_union] = ACTIONS(968), - [anon_sym_if] = ACTIONS(968), - [anon_sym_else] = ACTIONS(968), - [anon_sym_switch] = ACTIONS(968), - [anon_sym_case] = ACTIONS(968), - [anon_sym_default] = ACTIONS(968), - [anon_sym_while] = ACTIONS(968), - [anon_sym_do] = ACTIONS(968), - [anon_sym_for] = ACTIONS(968), - [anon_sym_return] = ACTIONS(968), - [anon_sym_break] = ACTIONS(968), - [anon_sym_continue] = ACTIONS(968), - [anon_sym_goto] = ACTIONS(968), - [anon_sym_DASH_DASH] = ACTIONS(970), - [anon_sym_PLUS_PLUS] = ACTIONS(970), - [anon_sym_sizeof] = ACTIONS(968), - [sym_number_literal] = ACTIONS(970), - [anon_sym_L_SQUOTE] = ACTIONS(970), - [anon_sym_u_SQUOTE] = ACTIONS(970), - [anon_sym_U_SQUOTE] = ACTIONS(970), - [anon_sym_u8_SQUOTE] = ACTIONS(970), - [anon_sym_SQUOTE] = ACTIONS(970), - [anon_sym_L_DQUOTE] = ACTIONS(970), - [anon_sym_u_DQUOTE] = ACTIONS(970), - [anon_sym_U_DQUOTE] = ACTIONS(970), - [anon_sym_u8_DQUOTE] = ACTIONS(970), - [anon_sym_DQUOTE] = ACTIONS(970), - [sym_true] = ACTIONS(968), - [sym_false] = ACTIONS(968), - [sym_null] = ACTIONS(968), - [sym_comment] = ACTIONS(3), - }, - [90] = { - [sym_identifier] = ACTIONS(972), - [aux_sym_preproc_include_token1] = ACTIONS(972), - [aux_sym_preproc_def_token1] = ACTIONS(972), - [aux_sym_preproc_if_token1] = ACTIONS(972), - [aux_sym_preproc_if_token2] = ACTIONS(972), - [aux_sym_preproc_ifdef_token1] = ACTIONS(972), - [aux_sym_preproc_ifdef_token2] = ACTIONS(972), - [aux_sym_preproc_else_token1] = ACTIONS(972), - [aux_sym_preproc_elif_token1] = ACTIONS(972), - [sym_preproc_directive] = ACTIONS(972), - [anon_sym_LPAREN2] = ACTIONS(974), - [anon_sym_BANG] = ACTIONS(974), - [anon_sym_TILDE] = ACTIONS(974), - [anon_sym_DASH] = ACTIONS(972), - [anon_sym_PLUS] = ACTIONS(972), - [anon_sym_STAR] = ACTIONS(974), - [anon_sym_AMP] = ACTIONS(974), - [anon_sym_SEMI] = ACTIONS(974), - [anon_sym_typedef] = ACTIONS(972), - [anon_sym_extern] = ACTIONS(972), - [anon_sym___attribute__] = ACTIONS(972), - [anon_sym_LBRACK_LBRACK] = ACTIONS(974), - [anon_sym___declspec] = ACTIONS(972), - [anon_sym___cdecl] = ACTIONS(972), - [anon_sym___clrcall] = ACTIONS(972), - [anon_sym___stdcall] = ACTIONS(972), - [anon_sym___fastcall] = ACTIONS(972), - [anon_sym___thiscall] = ACTIONS(972), - [anon_sym___vectorcall] = ACTIONS(972), - [anon_sym_LBRACE] = ACTIONS(974), - [anon_sym_static] = ACTIONS(972), - [anon_sym_auto] = ACTIONS(972), - [anon_sym_register] = ACTIONS(972), - [anon_sym_inline] = ACTIONS(972), - [anon_sym_const] = ACTIONS(972), - [anon_sym_volatile] = ACTIONS(972), - [anon_sym_restrict] = ACTIONS(972), - [anon_sym__Atomic] = ACTIONS(972), - [anon_sym_signed] = ACTIONS(972), - [anon_sym_unsigned] = ACTIONS(972), - [anon_sym_long] = ACTIONS(972), - [anon_sym_short] = ACTIONS(972), - [sym_primitive_type] = ACTIONS(972), - [anon_sym_enum] = ACTIONS(972), - [anon_sym_struct] = ACTIONS(972), - [anon_sym_union] = ACTIONS(972), - [anon_sym_if] = ACTIONS(972), - [anon_sym_else] = ACTIONS(972), - [anon_sym_switch] = ACTIONS(972), - [anon_sym_case] = ACTIONS(972), - [anon_sym_default] = ACTIONS(972), - [anon_sym_while] = ACTIONS(972), - [anon_sym_do] = ACTIONS(972), - [anon_sym_for] = ACTIONS(972), - [anon_sym_return] = ACTIONS(972), - [anon_sym_break] = ACTIONS(972), - [anon_sym_continue] = ACTIONS(972), - [anon_sym_goto] = ACTIONS(972), - [anon_sym_DASH_DASH] = ACTIONS(974), - [anon_sym_PLUS_PLUS] = ACTIONS(974), - [anon_sym_sizeof] = ACTIONS(972), - [sym_number_literal] = ACTIONS(974), - [anon_sym_L_SQUOTE] = ACTIONS(974), - [anon_sym_u_SQUOTE] = ACTIONS(974), - [anon_sym_U_SQUOTE] = ACTIONS(974), - [anon_sym_u8_SQUOTE] = ACTIONS(974), - [anon_sym_SQUOTE] = ACTIONS(974), - [anon_sym_L_DQUOTE] = ACTIONS(974), - [anon_sym_u_DQUOTE] = ACTIONS(974), - [anon_sym_U_DQUOTE] = ACTIONS(974), - [anon_sym_u8_DQUOTE] = ACTIONS(974), - [anon_sym_DQUOTE] = ACTIONS(974), - [sym_true] = ACTIONS(972), - [sym_false] = ACTIONS(972), - [sym_null] = ACTIONS(972), - [sym_comment] = ACTIONS(3), - }, - [91] = { - [sym_identifier] = ACTIONS(976), - [aux_sym_preproc_include_token1] = ACTIONS(976), - [aux_sym_preproc_def_token1] = ACTIONS(976), - [aux_sym_preproc_if_token1] = ACTIONS(976), - [aux_sym_preproc_if_token2] = ACTIONS(976), - [aux_sym_preproc_ifdef_token1] = ACTIONS(976), - [aux_sym_preproc_ifdef_token2] = ACTIONS(976), - [aux_sym_preproc_else_token1] = ACTIONS(976), - [aux_sym_preproc_elif_token1] = ACTIONS(976), - [sym_preproc_directive] = ACTIONS(976), - [anon_sym_LPAREN2] = ACTIONS(978), - [anon_sym_BANG] = ACTIONS(978), - [anon_sym_TILDE] = ACTIONS(978), - [anon_sym_DASH] = ACTIONS(976), - [anon_sym_PLUS] = ACTIONS(976), - [anon_sym_STAR] = ACTIONS(978), - [anon_sym_AMP] = ACTIONS(978), - [anon_sym_SEMI] = ACTIONS(978), - [anon_sym_typedef] = ACTIONS(976), - [anon_sym_extern] = ACTIONS(976), - [anon_sym___attribute__] = ACTIONS(976), - [anon_sym_LBRACK_LBRACK] = ACTIONS(978), - [anon_sym___declspec] = ACTIONS(976), - [anon_sym___cdecl] = ACTIONS(976), - [anon_sym___clrcall] = ACTIONS(976), - [anon_sym___stdcall] = ACTIONS(976), - [anon_sym___fastcall] = ACTIONS(976), - [anon_sym___thiscall] = ACTIONS(976), - [anon_sym___vectorcall] = ACTIONS(976), - [anon_sym_LBRACE] = ACTIONS(978), - [anon_sym_static] = ACTIONS(976), - [anon_sym_auto] = ACTIONS(976), - [anon_sym_register] = ACTIONS(976), - [anon_sym_inline] = ACTIONS(976), - [anon_sym_const] = ACTIONS(976), - [anon_sym_volatile] = ACTIONS(976), - [anon_sym_restrict] = ACTIONS(976), - [anon_sym__Atomic] = ACTIONS(976), - [anon_sym_signed] = ACTIONS(976), - [anon_sym_unsigned] = ACTIONS(976), - [anon_sym_long] = ACTIONS(976), - [anon_sym_short] = ACTIONS(976), - [sym_primitive_type] = ACTIONS(976), - [anon_sym_enum] = ACTIONS(976), - [anon_sym_struct] = ACTIONS(976), - [anon_sym_union] = ACTIONS(976), - [anon_sym_if] = ACTIONS(976), - [anon_sym_else] = ACTIONS(976), - [anon_sym_switch] = ACTIONS(976), - [anon_sym_case] = ACTIONS(976), - [anon_sym_default] = ACTIONS(976), - [anon_sym_while] = ACTIONS(976), - [anon_sym_do] = ACTIONS(976), - [anon_sym_for] = ACTIONS(976), - [anon_sym_return] = ACTIONS(976), - [anon_sym_break] = ACTIONS(976), - [anon_sym_continue] = ACTIONS(976), - [anon_sym_goto] = ACTIONS(976), - [anon_sym_DASH_DASH] = ACTIONS(978), - [anon_sym_PLUS_PLUS] = ACTIONS(978), - [anon_sym_sizeof] = ACTIONS(976), - [sym_number_literal] = ACTIONS(978), - [anon_sym_L_SQUOTE] = ACTIONS(978), - [anon_sym_u_SQUOTE] = ACTIONS(978), - [anon_sym_U_SQUOTE] = ACTIONS(978), - [anon_sym_u8_SQUOTE] = ACTIONS(978), - [anon_sym_SQUOTE] = ACTIONS(978), - [anon_sym_L_DQUOTE] = ACTIONS(978), - [anon_sym_u_DQUOTE] = ACTIONS(978), - [anon_sym_U_DQUOTE] = ACTIONS(978), - [anon_sym_u8_DQUOTE] = ACTIONS(978), - [anon_sym_DQUOTE] = ACTIONS(978), - [sym_true] = ACTIONS(976), - [sym_false] = ACTIONS(976), - [sym_null] = ACTIONS(976), - [sym_comment] = ACTIONS(3), - }, - [92] = { - [sym_identifier] = ACTIONS(980), - [aux_sym_preproc_include_token1] = ACTIONS(980), - [aux_sym_preproc_def_token1] = ACTIONS(980), - [aux_sym_preproc_if_token1] = ACTIONS(980), - [aux_sym_preproc_if_token2] = ACTIONS(980), - [aux_sym_preproc_ifdef_token1] = ACTIONS(980), - [aux_sym_preproc_ifdef_token2] = ACTIONS(980), - [aux_sym_preproc_else_token1] = ACTIONS(980), - [aux_sym_preproc_elif_token1] = ACTIONS(980), - [sym_preproc_directive] = ACTIONS(980), - [anon_sym_LPAREN2] = ACTIONS(982), - [anon_sym_BANG] = ACTIONS(982), - [anon_sym_TILDE] = ACTIONS(982), - [anon_sym_DASH] = ACTIONS(980), - [anon_sym_PLUS] = ACTIONS(980), - [anon_sym_STAR] = ACTIONS(982), - [anon_sym_AMP] = ACTIONS(982), - [anon_sym_SEMI] = ACTIONS(982), - [anon_sym_typedef] = ACTIONS(980), - [anon_sym_extern] = ACTIONS(980), - [anon_sym___attribute__] = ACTIONS(980), - [anon_sym_LBRACK_LBRACK] = ACTIONS(982), - [anon_sym___declspec] = ACTIONS(980), - [anon_sym___cdecl] = ACTIONS(980), - [anon_sym___clrcall] = ACTIONS(980), - [anon_sym___stdcall] = ACTIONS(980), - [anon_sym___fastcall] = ACTIONS(980), - [anon_sym___thiscall] = ACTIONS(980), - [anon_sym___vectorcall] = ACTIONS(980), - [anon_sym_LBRACE] = ACTIONS(982), - [anon_sym_static] = ACTIONS(980), - [anon_sym_auto] = ACTIONS(980), - [anon_sym_register] = ACTIONS(980), - [anon_sym_inline] = ACTIONS(980), - [anon_sym_const] = ACTIONS(980), - [anon_sym_volatile] = ACTIONS(980), - [anon_sym_restrict] = ACTIONS(980), - [anon_sym__Atomic] = ACTIONS(980), - [anon_sym_signed] = ACTIONS(980), - [anon_sym_unsigned] = ACTIONS(980), - [anon_sym_long] = ACTIONS(980), - [anon_sym_short] = ACTIONS(980), - [sym_primitive_type] = ACTIONS(980), - [anon_sym_enum] = ACTIONS(980), - [anon_sym_struct] = ACTIONS(980), - [anon_sym_union] = ACTIONS(980), - [anon_sym_if] = ACTIONS(980), - [anon_sym_else] = ACTIONS(980), - [anon_sym_switch] = ACTIONS(980), - [anon_sym_case] = ACTIONS(980), - [anon_sym_default] = ACTIONS(980), - [anon_sym_while] = ACTIONS(980), - [anon_sym_do] = ACTIONS(980), - [anon_sym_for] = ACTIONS(980), - [anon_sym_return] = ACTIONS(980), - [anon_sym_break] = ACTIONS(980), - [anon_sym_continue] = ACTIONS(980), - [anon_sym_goto] = ACTIONS(980), - [anon_sym_DASH_DASH] = ACTIONS(982), - [anon_sym_PLUS_PLUS] = ACTIONS(982), - [anon_sym_sizeof] = ACTIONS(980), - [sym_number_literal] = ACTIONS(982), - [anon_sym_L_SQUOTE] = ACTIONS(982), - [anon_sym_u_SQUOTE] = ACTIONS(982), - [anon_sym_U_SQUOTE] = ACTIONS(982), - [anon_sym_u8_SQUOTE] = ACTIONS(982), - [anon_sym_SQUOTE] = ACTIONS(982), - [anon_sym_L_DQUOTE] = ACTIONS(982), - [anon_sym_u_DQUOTE] = ACTIONS(982), - [anon_sym_U_DQUOTE] = ACTIONS(982), - [anon_sym_u8_DQUOTE] = ACTIONS(982), - [anon_sym_DQUOTE] = ACTIONS(982), - [sym_true] = ACTIONS(980), - [sym_false] = ACTIONS(980), - [sym_null] = ACTIONS(980), - [sym_comment] = ACTIONS(3), - }, - [93] = { - [sym_identifier] = ACTIONS(984), - [aux_sym_preproc_include_token1] = ACTIONS(984), - [aux_sym_preproc_def_token1] = ACTIONS(984), - [aux_sym_preproc_if_token1] = ACTIONS(984), - [aux_sym_preproc_if_token2] = ACTIONS(984), - [aux_sym_preproc_ifdef_token1] = ACTIONS(984), - [aux_sym_preproc_ifdef_token2] = ACTIONS(984), - [aux_sym_preproc_else_token1] = ACTIONS(984), - [aux_sym_preproc_elif_token1] = ACTIONS(984), - [sym_preproc_directive] = ACTIONS(984), - [anon_sym_LPAREN2] = ACTIONS(986), - [anon_sym_BANG] = ACTIONS(986), - [anon_sym_TILDE] = ACTIONS(986), - [anon_sym_DASH] = ACTIONS(984), - [anon_sym_PLUS] = ACTIONS(984), - [anon_sym_STAR] = ACTIONS(986), - [anon_sym_AMP] = ACTIONS(986), - [anon_sym_SEMI] = ACTIONS(986), - [anon_sym_typedef] = ACTIONS(984), - [anon_sym_extern] = ACTIONS(984), - [anon_sym___attribute__] = ACTIONS(984), - [anon_sym_LBRACK_LBRACK] = ACTIONS(986), - [anon_sym___declspec] = ACTIONS(984), - [anon_sym___cdecl] = ACTIONS(984), - [anon_sym___clrcall] = ACTIONS(984), - [anon_sym___stdcall] = ACTIONS(984), - [anon_sym___fastcall] = ACTIONS(984), - [anon_sym___thiscall] = ACTIONS(984), - [anon_sym___vectorcall] = ACTIONS(984), - [anon_sym_LBRACE] = ACTIONS(986), - [anon_sym_static] = ACTIONS(984), - [anon_sym_auto] = ACTIONS(984), - [anon_sym_register] = ACTIONS(984), - [anon_sym_inline] = ACTIONS(984), - [anon_sym_const] = ACTIONS(984), - [anon_sym_volatile] = ACTIONS(984), - [anon_sym_restrict] = ACTIONS(984), - [anon_sym__Atomic] = ACTIONS(984), - [anon_sym_signed] = ACTIONS(984), - [anon_sym_unsigned] = ACTIONS(984), - [anon_sym_long] = ACTIONS(984), - [anon_sym_short] = ACTIONS(984), - [sym_primitive_type] = ACTIONS(984), - [anon_sym_enum] = ACTIONS(984), - [anon_sym_struct] = ACTIONS(984), - [anon_sym_union] = ACTIONS(984), - [anon_sym_if] = ACTIONS(984), - [anon_sym_else] = ACTIONS(984), - [anon_sym_switch] = ACTIONS(984), - [anon_sym_case] = ACTIONS(984), - [anon_sym_default] = ACTIONS(984), - [anon_sym_while] = ACTIONS(984), - [anon_sym_do] = ACTIONS(984), - [anon_sym_for] = ACTIONS(984), - [anon_sym_return] = ACTIONS(984), - [anon_sym_break] = ACTIONS(984), - [anon_sym_continue] = ACTIONS(984), - [anon_sym_goto] = ACTIONS(984), - [anon_sym_DASH_DASH] = ACTIONS(986), - [anon_sym_PLUS_PLUS] = ACTIONS(986), - [anon_sym_sizeof] = ACTIONS(984), - [sym_number_literal] = ACTIONS(986), - [anon_sym_L_SQUOTE] = ACTIONS(986), - [anon_sym_u_SQUOTE] = ACTIONS(986), - [anon_sym_U_SQUOTE] = ACTIONS(986), - [anon_sym_u8_SQUOTE] = ACTIONS(986), - [anon_sym_SQUOTE] = ACTIONS(986), - [anon_sym_L_DQUOTE] = ACTIONS(986), - [anon_sym_u_DQUOTE] = ACTIONS(986), - [anon_sym_U_DQUOTE] = ACTIONS(986), - [anon_sym_u8_DQUOTE] = ACTIONS(986), - [anon_sym_DQUOTE] = ACTIONS(986), - [sym_true] = ACTIONS(984), - [sym_false] = ACTIONS(984), - [sym_null] = ACTIONS(984), - [sym_comment] = ACTIONS(3), - }, - [94] = { - [sym_identifier] = ACTIONS(988), - [aux_sym_preproc_include_token1] = ACTIONS(988), - [aux_sym_preproc_def_token1] = ACTIONS(988), - [aux_sym_preproc_if_token1] = ACTIONS(988), - [aux_sym_preproc_if_token2] = ACTIONS(988), - [aux_sym_preproc_ifdef_token1] = ACTIONS(988), - [aux_sym_preproc_ifdef_token2] = ACTIONS(988), - [aux_sym_preproc_else_token1] = ACTIONS(988), - [aux_sym_preproc_elif_token1] = ACTIONS(988), - [sym_preproc_directive] = ACTIONS(988), - [anon_sym_LPAREN2] = ACTIONS(990), - [anon_sym_BANG] = ACTIONS(990), - [anon_sym_TILDE] = ACTIONS(990), - [anon_sym_DASH] = ACTIONS(988), - [anon_sym_PLUS] = ACTIONS(988), - [anon_sym_STAR] = ACTIONS(990), - [anon_sym_AMP] = ACTIONS(990), - [anon_sym_SEMI] = ACTIONS(990), - [anon_sym_typedef] = ACTIONS(988), - [anon_sym_extern] = ACTIONS(988), - [anon_sym___attribute__] = ACTIONS(988), - [anon_sym_LBRACK_LBRACK] = ACTIONS(990), - [anon_sym___declspec] = ACTIONS(988), - [anon_sym___cdecl] = ACTIONS(988), - [anon_sym___clrcall] = ACTIONS(988), - [anon_sym___stdcall] = ACTIONS(988), - [anon_sym___fastcall] = ACTIONS(988), - [anon_sym___thiscall] = ACTIONS(988), - [anon_sym___vectorcall] = ACTIONS(988), - [anon_sym_LBRACE] = ACTIONS(990), - [anon_sym_static] = ACTIONS(988), - [anon_sym_auto] = ACTIONS(988), - [anon_sym_register] = ACTIONS(988), - [anon_sym_inline] = ACTIONS(988), - [anon_sym_const] = ACTIONS(988), - [anon_sym_volatile] = ACTIONS(988), - [anon_sym_restrict] = ACTIONS(988), - [anon_sym__Atomic] = ACTIONS(988), - [anon_sym_signed] = ACTIONS(988), - [anon_sym_unsigned] = ACTIONS(988), - [anon_sym_long] = ACTIONS(988), - [anon_sym_short] = ACTIONS(988), - [sym_primitive_type] = ACTIONS(988), - [anon_sym_enum] = ACTIONS(988), - [anon_sym_struct] = ACTIONS(988), - [anon_sym_union] = ACTIONS(988), - [anon_sym_if] = ACTIONS(988), - [anon_sym_else] = ACTIONS(988), - [anon_sym_switch] = ACTIONS(988), - [anon_sym_case] = ACTIONS(988), - [anon_sym_default] = ACTIONS(988), - [anon_sym_while] = ACTIONS(988), - [anon_sym_do] = ACTIONS(988), - [anon_sym_for] = ACTIONS(988), - [anon_sym_return] = ACTIONS(988), - [anon_sym_break] = ACTIONS(988), - [anon_sym_continue] = ACTIONS(988), - [anon_sym_goto] = ACTIONS(988), - [anon_sym_DASH_DASH] = ACTIONS(990), - [anon_sym_PLUS_PLUS] = ACTIONS(990), - [anon_sym_sizeof] = ACTIONS(988), - [sym_number_literal] = ACTIONS(990), - [anon_sym_L_SQUOTE] = ACTIONS(990), - [anon_sym_u_SQUOTE] = ACTIONS(990), - [anon_sym_U_SQUOTE] = ACTIONS(990), - [anon_sym_u8_SQUOTE] = ACTIONS(990), - [anon_sym_SQUOTE] = ACTIONS(990), - [anon_sym_L_DQUOTE] = ACTIONS(990), - [anon_sym_u_DQUOTE] = ACTIONS(990), - [anon_sym_U_DQUOTE] = ACTIONS(990), - [anon_sym_u8_DQUOTE] = ACTIONS(990), - [anon_sym_DQUOTE] = ACTIONS(990), - [sym_true] = ACTIONS(988), - [sym_false] = ACTIONS(988), - [sym_null] = ACTIONS(988), - [sym_comment] = ACTIONS(3), - }, - [95] = { - [sym_identifier] = ACTIONS(992), - [aux_sym_preproc_include_token1] = ACTIONS(992), - [aux_sym_preproc_def_token1] = ACTIONS(992), - [aux_sym_preproc_if_token1] = ACTIONS(992), - [aux_sym_preproc_if_token2] = ACTIONS(992), - [aux_sym_preproc_ifdef_token1] = ACTIONS(992), - [aux_sym_preproc_ifdef_token2] = ACTIONS(992), - [aux_sym_preproc_else_token1] = ACTIONS(992), - [aux_sym_preproc_elif_token1] = ACTIONS(992), - [sym_preproc_directive] = ACTIONS(992), - [anon_sym_LPAREN2] = ACTIONS(994), - [anon_sym_BANG] = ACTIONS(994), - [anon_sym_TILDE] = ACTIONS(994), - [anon_sym_DASH] = ACTIONS(992), - [anon_sym_PLUS] = ACTIONS(992), - [anon_sym_STAR] = ACTIONS(994), - [anon_sym_AMP] = ACTIONS(994), - [anon_sym_SEMI] = ACTIONS(994), - [anon_sym_typedef] = ACTIONS(992), - [anon_sym_extern] = ACTIONS(992), - [anon_sym___attribute__] = ACTIONS(992), - [anon_sym_LBRACK_LBRACK] = ACTIONS(994), - [anon_sym___declspec] = ACTIONS(992), - [anon_sym___cdecl] = ACTIONS(992), - [anon_sym___clrcall] = ACTIONS(992), - [anon_sym___stdcall] = ACTIONS(992), - [anon_sym___fastcall] = ACTIONS(992), - [anon_sym___thiscall] = ACTIONS(992), - [anon_sym___vectorcall] = ACTIONS(992), - [anon_sym_LBRACE] = ACTIONS(994), - [anon_sym_static] = ACTIONS(992), - [anon_sym_auto] = ACTIONS(992), - [anon_sym_register] = ACTIONS(992), - [anon_sym_inline] = ACTIONS(992), - [anon_sym_const] = ACTIONS(992), - [anon_sym_volatile] = ACTIONS(992), - [anon_sym_restrict] = ACTIONS(992), - [anon_sym__Atomic] = ACTIONS(992), - [anon_sym_signed] = ACTIONS(992), - [anon_sym_unsigned] = ACTIONS(992), - [anon_sym_long] = ACTIONS(992), - [anon_sym_short] = ACTIONS(992), - [sym_primitive_type] = ACTIONS(992), - [anon_sym_enum] = ACTIONS(992), - [anon_sym_struct] = ACTIONS(992), - [anon_sym_union] = ACTIONS(992), - [anon_sym_if] = ACTIONS(992), - [anon_sym_else] = ACTIONS(992), - [anon_sym_switch] = ACTIONS(992), - [anon_sym_case] = ACTIONS(992), - [anon_sym_default] = ACTIONS(992), - [anon_sym_while] = ACTIONS(992), - [anon_sym_do] = ACTIONS(992), - [anon_sym_for] = ACTIONS(992), - [anon_sym_return] = ACTIONS(992), - [anon_sym_break] = ACTIONS(992), - [anon_sym_continue] = ACTIONS(992), - [anon_sym_goto] = ACTIONS(992), - [anon_sym_DASH_DASH] = ACTIONS(994), - [anon_sym_PLUS_PLUS] = ACTIONS(994), - [anon_sym_sizeof] = ACTIONS(992), - [sym_number_literal] = ACTIONS(994), - [anon_sym_L_SQUOTE] = ACTIONS(994), - [anon_sym_u_SQUOTE] = ACTIONS(994), - [anon_sym_U_SQUOTE] = ACTIONS(994), - [anon_sym_u8_SQUOTE] = ACTIONS(994), - [anon_sym_SQUOTE] = ACTIONS(994), - [anon_sym_L_DQUOTE] = ACTIONS(994), - [anon_sym_u_DQUOTE] = ACTIONS(994), - [anon_sym_U_DQUOTE] = ACTIONS(994), - [anon_sym_u8_DQUOTE] = ACTIONS(994), - [anon_sym_DQUOTE] = ACTIONS(994), - [sym_true] = ACTIONS(992), - [sym_false] = ACTIONS(992), - [sym_null] = ACTIONS(992), - [sym_comment] = ACTIONS(3), - }, - [96] = { - [sym_identifier] = ACTIONS(996), - [aux_sym_preproc_include_token1] = ACTIONS(996), - [aux_sym_preproc_def_token1] = ACTIONS(996), - [aux_sym_preproc_if_token1] = ACTIONS(996), - [aux_sym_preproc_if_token2] = ACTIONS(996), - [aux_sym_preproc_ifdef_token1] = ACTIONS(996), - [aux_sym_preproc_ifdef_token2] = ACTIONS(996), - [aux_sym_preproc_else_token1] = ACTIONS(996), - [aux_sym_preproc_elif_token1] = ACTIONS(996), - [sym_preproc_directive] = ACTIONS(996), - [anon_sym_LPAREN2] = ACTIONS(998), - [anon_sym_BANG] = ACTIONS(998), - [anon_sym_TILDE] = ACTIONS(998), - [anon_sym_DASH] = ACTIONS(996), - [anon_sym_PLUS] = ACTIONS(996), - [anon_sym_STAR] = ACTIONS(998), - [anon_sym_AMP] = ACTIONS(998), - [anon_sym_SEMI] = ACTIONS(998), - [anon_sym_typedef] = ACTIONS(996), - [anon_sym_extern] = ACTIONS(996), - [anon_sym___attribute__] = ACTIONS(996), - [anon_sym_LBRACK_LBRACK] = ACTIONS(998), - [anon_sym___declspec] = ACTIONS(996), - [anon_sym___cdecl] = ACTIONS(996), - [anon_sym___clrcall] = ACTIONS(996), - [anon_sym___stdcall] = ACTIONS(996), - [anon_sym___fastcall] = ACTIONS(996), - [anon_sym___thiscall] = ACTIONS(996), - [anon_sym___vectorcall] = ACTIONS(996), - [anon_sym_LBRACE] = ACTIONS(998), - [anon_sym_static] = ACTIONS(996), - [anon_sym_auto] = ACTIONS(996), - [anon_sym_register] = ACTIONS(996), - [anon_sym_inline] = ACTIONS(996), - [anon_sym_const] = ACTIONS(996), - [anon_sym_volatile] = ACTIONS(996), - [anon_sym_restrict] = ACTIONS(996), - [anon_sym__Atomic] = ACTIONS(996), - [anon_sym_signed] = ACTIONS(996), - [anon_sym_unsigned] = ACTIONS(996), - [anon_sym_long] = ACTIONS(996), - [anon_sym_short] = ACTIONS(996), - [sym_primitive_type] = ACTIONS(996), - [anon_sym_enum] = ACTIONS(996), - [anon_sym_struct] = ACTIONS(996), - [anon_sym_union] = ACTIONS(996), - [anon_sym_if] = ACTIONS(996), - [anon_sym_else] = ACTIONS(996), - [anon_sym_switch] = ACTIONS(996), - [anon_sym_case] = ACTIONS(996), - [anon_sym_default] = ACTIONS(996), - [anon_sym_while] = ACTIONS(996), - [anon_sym_do] = ACTIONS(996), - [anon_sym_for] = ACTIONS(996), - [anon_sym_return] = ACTIONS(996), - [anon_sym_break] = ACTIONS(996), - [anon_sym_continue] = ACTIONS(996), - [anon_sym_goto] = ACTIONS(996), - [anon_sym_DASH_DASH] = ACTIONS(998), - [anon_sym_PLUS_PLUS] = ACTIONS(998), - [anon_sym_sizeof] = ACTIONS(996), - [sym_number_literal] = ACTIONS(998), - [anon_sym_L_SQUOTE] = ACTIONS(998), - [anon_sym_u_SQUOTE] = ACTIONS(998), - [anon_sym_U_SQUOTE] = ACTIONS(998), - [anon_sym_u8_SQUOTE] = ACTIONS(998), - [anon_sym_SQUOTE] = ACTIONS(998), - [anon_sym_L_DQUOTE] = ACTIONS(998), - [anon_sym_u_DQUOTE] = ACTIONS(998), - [anon_sym_U_DQUOTE] = ACTIONS(998), - [anon_sym_u8_DQUOTE] = ACTIONS(998), - [anon_sym_DQUOTE] = ACTIONS(998), - [sym_true] = ACTIONS(996), - [sym_false] = ACTIONS(996), - [sym_null] = ACTIONS(996), - [sym_comment] = ACTIONS(3), - }, - [97] = { - [sym_identifier] = ACTIONS(1000), - [aux_sym_preproc_include_token1] = ACTIONS(1000), - [aux_sym_preproc_def_token1] = ACTIONS(1000), - [aux_sym_preproc_if_token1] = ACTIONS(1000), - [aux_sym_preproc_if_token2] = ACTIONS(1000), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1000), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1000), - [aux_sym_preproc_else_token1] = ACTIONS(1000), - [aux_sym_preproc_elif_token1] = ACTIONS(1000), - [sym_preproc_directive] = ACTIONS(1000), - [anon_sym_LPAREN2] = ACTIONS(1002), - [anon_sym_BANG] = ACTIONS(1002), - [anon_sym_TILDE] = ACTIONS(1002), - [anon_sym_DASH] = ACTIONS(1000), - [anon_sym_PLUS] = ACTIONS(1000), - [anon_sym_STAR] = ACTIONS(1002), - [anon_sym_AMP] = ACTIONS(1002), - [anon_sym_SEMI] = ACTIONS(1002), - [anon_sym_typedef] = ACTIONS(1000), - [anon_sym_extern] = ACTIONS(1000), - [anon_sym___attribute__] = ACTIONS(1000), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1002), - [anon_sym___declspec] = ACTIONS(1000), - [anon_sym___cdecl] = ACTIONS(1000), - [anon_sym___clrcall] = ACTIONS(1000), - [anon_sym___stdcall] = ACTIONS(1000), - [anon_sym___fastcall] = ACTIONS(1000), - [anon_sym___thiscall] = ACTIONS(1000), - [anon_sym___vectorcall] = ACTIONS(1000), - [anon_sym_LBRACE] = ACTIONS(1002), - [anon_sym_static] = ACTIONS(1000), - [anon_sym_auto] = ACTIONS(1000), - [anon_sym_register] = ACTIONS(1000), - [anon_sym_inline] = ACTIONS(1000), - [anon_sym_const] = ACTIONS(1000), - [anon_sym_volatile] = ACTIONS(1000), - [anon_sym_restrict] = ACTIONS(1000), - [anon_sym__Atomic] = ACTIONS(1000), - [anon_sym_signed] = ACTIONS(1000), - [anon_sym_unsigned] = ACTIONS(1000), - [anon_sym_long] = ACTIONS(1000), - [anon_sym_short] = ACTIONS(1000), - [sym_primitive_type] = ACTIONS(1000), - [anon_sym_enum] = ACTIONS(1000), - [anon_sym_struct] = ACTIONS(1000), - [anon_sym_union] = ACTIONS(1000), - [anon_sym_if] = ACTIONS(1000), - [anon_sym_else] = ACTIONS(1000), - [anon_sym_switch] = ACTIONS(1000), - [anon_sym_case] = ACTIONS(1000), - [anon_sym_default] = ACTIONS(1000), - [anon_sym_while] = ACTIONS(1000), - [anon_sym_do] = ACTIONS(1000), - [anon_sym_for] = ACTIONS(1000), - [anon_sym_return] = ACTIONS(1000), - [anon_sym_break] = ACTIONS(1000), - [anon_sym_continue] = ACTIONS(1000), - [anon_sym_goto] = ACTIONS(1000), - [anon_sym_DASH_DASH] = ACTIONS(1002), - [anon_sym_PLUS_PLUS] = ACTIONS(1002), - [anon_sym_sizeof] = ACTIONS(1000), - [sym_number_literal] = ACTIONS(1002), - [anon_sym_L_SQUOTE] = ACTIONS(1002), - [anon_sym_u_SQUOTE] = ACTIONS(1002), - [anon_sym_U_SQUOTE] = ACTIONS(1002), - [anon_sym_u8_SQUOTE] = ACTIONS(1002), - [anon_sym_SQUOTE] = ACTIONS(1002), - [anon_sym_L_DQUOTE] = ACTIONS(1002), - [anon_sym_u_DQUOTE] = ACTIONS(1002), - [anon_sym_U_DQUOTE] = ACTIONS(1002), - [anon_sym_u8_DQUOTE] = ACTIONS(1002), - [anon_sym_DQUOTE] = ACTIONS(1002), - [sym_true] = ACTIONS(1000), - [sym_false] = ACTIONS(1000), - [sym_null] = ACTIONS(1000), - [sym_comment] = ACTIONS(3), - }, - [98] = { - [sym_identifier] = ACTIONS(1004), - [aux_sym_preproc_include_token1] = ACTIONS(1004), - [aux_sym_preproc_def_token1] = ACTIONS(1004), - [aux_sym_preproc_if_token1] = ACTIONS(1004), - [aux_sym_preproc_if_token2] = ACTIONS(1004), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1004), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1004), - [aux_sym_preproc_else_token1] = ACTIONS(1004), - [aux_sym_preproc_elif_token1] = ACTIONS(1004), - [sym_preproc_directive] = ACTIONS(1004), - [anon_sym_LPAREN2] = ACTIONS(1006), - [anon_sym_BANG] = ACTIONS(1006), - [anon_sym_TILDE] = ACTIONS(1006), - [anon_sym_DASH] = ACTIONS(1004), - [anon_sym_PLUS] = ACTIONS(1004), - [anon_sym_STAR] = ACTIONS(1006), - [anon_sym_AMP] = ACTIONS(1006), - [anon_sym_SEMI] = ACTIONS(1006), - [anon_sym_typedef] = ACTIONS(1004), - [anon_sym_extern] = ACTIONS(1004), - [anon_sym___attribute__] = ACTIONS(1004), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1006), - [anon_sym___declspec] = ACTIONS(1004), - [anon_sym___cdecl] = ACTIONS(1004), - [anon_sym___clrcall] = ACTIONS(1004), - [anon_sym___stdcall] = ACTIONS(1004), - [anon_sym___fastcall] = ACTIONS(1004), - [anon_sym___thiscall] = ACTIONS(1004), - [anon_sym___vectorcall] = ACTIONS(1004), - [anon_sym_LBRACE] = ACTIONS(1006), - [anon_sym_static] = ACTIONS(1004), - [anon_sym_auto] = ACTIONS(1004), - [anon_sym_register] = ACTIONS(1004), - [anon_sym_inline] = ACTIONS(1004), - [anon_sym_const] = ACTIONS(1004), - [anon_sym_volatile] = ACTIONS(1004), - [anon_sym_restrict] = ACTIONS(1004), - [anon_sym__Atomic] = ACTIONS(1004), - [anon_sym_signed] = ACTIONS(1004), - [anon_sym_unsigned] = ACTIONS(1004), - [anon_sym_long] = ACTIONS(1004), - [anon_sym_short] = ACTIONS(1004), - [sym_primitive_type] = ACTIONS(1004), - [anon_sym_enum] = ACTIONS(1004), - [anon_sym_struct] = ACTIONS(1004), - [anon_sym_union] = ACTIONS(1004), - [anon_sym_if] = ACTIONS(1004), - [anon_sym_else] = ACTIONS(1004), - [anon_sym_switch] = ACTIONS(1004), - [anon_sym_case] = ACTIONS(1004), - [anon_sym_default] = ACTIONS(1004), - [anon_sym_while] = ACTIONS(1004), - [anon_sym_do] = ACTIONS(1004), - [anon_sym_for] = ACTIONS(1004), - [anon_sym_return] = ACTIONS(1004), - [anon_sym_break] = ACTIONS(1004), - [anon_sym_continue] = ACTIONS(1004), - [anon_sym_goto] = ACTIONS(1004), - [anon_sym_DASH_DASH] = ACTIONS(1006), - [anon_sym_PLUS_PLUS] = ACTIONS(1006), - [anon_sym_sizeof] = ACTIONS(1004), - [sym_number_literal] = ACTIONS(1006), - [anon_sym_L_SQUOTE] = ACTIONS(1006), - [anon_sym_u_SQUOTE] = ACTIONS(1006), - [anon_sym_U_SQUOTE] = ACTIONS(1006), - [anon_sym_u8_SQUOTE] = ACTIONS(1006), - [anon_sym_SQUOTE] = ACTIONS(1006), - [anon_sym_L_DQUOTE] = ACTIONS(1006), - [anon_sym_u_DQUOTE] = ACTIONS(1006), - [anon_sym_U_DQUOTE] = ACTIONS(1006), - [anon_sym_u8_DQUOTE] = ACTIONS(1006), - [anon_sym_DQUOTE] = ACTIONS(1006), - [sym_true] = ACTIONS(1004), - [sym_false] = ACTIONS(1004), - [sym_null] = ACTIONS(1004), - [sym_comment] = ACTIONS(3), - }, - [99] = { - [sym_identifier] = ACTIONS(1008), - [aux_sym_preproc_include_token1] = ACTIONS(1008), - [aux_sym_preproc_def_token1] = ACTIONS(1008), - [aux_sym_preproc_if_token1] = ACTIONS(1008), - [aux_sym_preproc_if_token2] = ACTIONS(1008), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1008), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1008), - [aux_sym_preproc_else_token1] = ACTIONS(1008), - [aux_sym_preproc_elif_token1] = ACTIONS(1008), - [sym_preproc_directive] = ACTIONS(1008), - [anon_sym_LPAREN2] = ACTIONS(1010), - [anon_sym_BANG] = ACTIONS(1010), - [anon_sym_TILDE] = ACTIONS(1010), - [anon_sym_DASH] = ACTIONS(1008), - [anon_sym_PLUS] = ACTIONS(1008), - [anon_sym_STAR] = ACTIONS(1010), - [anon_sym_AMP] = ACTIONS(1010), - [anon_sym_SEMI] = ACTIONS(1010), - [anon_sym_typedef] = ACTIONS(1008), - [anon_sym_extern] = ACTIONS(1008), - [anon_sym___attribute__] = ACTIONS(1008), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1010), - [anon_sym___declspec] = ACTIONS(1008), - [anon_sym___cdecl] = ACTIONS(1008), - [anon_sym___clrcall] = ACTIONS(1008), - [anon_sym___stdcall] = ACTIONS(1008), - [anon_sym___fastcall] = ACTIONS(1008), - [anon_sym___thiscall] = ACTIONS(1008), - [anon_sym___vectorcall] = ACTIONS(1008), - [anon_sym_LBRACE] = ACTIONS(1010), - [anon_sym_static] = ACTIONS(1008), - [anon_sym_auto] = ACTIONS(1008), - [anon_sym_register] = ACTIONS(1008), - [anon_sym_inline] = ACTIONS(1008), - [anon_sym_const] = ACTIONS(1008), - [anon_sym_volatile] = ACTIONS(1008), - [anon_sym_restrict] = ACTIONS(1008), - [anon_sym__Atomic] = ACTIONS(1008), - [anon_sym_signed] = ACTIONS(1008), - [anon_sym_unsigned] = ACTIONS(1008), - [anon_sym_long] = ACTIONS(1008), - [anon_sym_short] = ACTIONS(1008), - [sym_primitive_type] = ACTIONS(1008), - [anon_sym_enum] = ACTIONS(1008), - [anon_sym_struct] = ACTIONS(1008), - [anon_sym_union] = ACTIONS(1008), - [anon_sym_if] = ACTIONS(1008), - [anon_sym_else] = ACTIONS(1008), - [anon_sym_switch] = ACTIONS(1008), - [anon_sym_case] = ACTIONS(1008), - [anon_sym_default] = ACTIONS(1008), - [anon_sym_while] = ACTIONS(1008), - [anon_sym_do] = ACTIONS(1008), - [anon_sym_for] = ACTIONS(1008), - [anon_sym_return] = ACTIONS(1008), - [anon_sym_break] = ACTIONS(1008), - [anon_sym_continue] = ACTIONS(1008), - [anon_sym_goto] = ACTIONS(1008), - [anon_sym_DASH_DASH] = ACTIONS(1010), - [anon_sym_PLUS_PLUS] = ACTIONS(1010), - [anon_sym_sizeof] = ACTIONS(1008), - [sym_number_literal] = ACTIONS(1010), - [anon_sym_L_SQUOTE] = ACTIONS(1010), - [anon_sym_u_SQUOTE] = ACTIONS(1010), - [anon_sym_U_SQUOTE] = ACTIONS(1010), - [anon_sym_u8_SQUOTE] = ACTIONS(1010), - [anon_sym_SQUOTE] = ACTIONS(1010), - [anon_sym_L_DQUOTE] = ACTIONS(1010), - [anon_sym_u_DQUOTE] = ACTIONS(1010), - [anon_sym_U_DQUOTE] = ACTIONS(1010), - [anon_sym_u8_DQUOTE] = ACTIONS(1010), - [anon_sym_DQUOTE] = ACTIONS(1010), - [sym_true] = ACTIONS(1008), - [sym_false] = ACTIONS(1008), - [sym_null] = ACTIONS(1008), - [sym_comment] = ACTIONS(3), - }, - [100] = { - [sym_identifier] = ACTIONS(1012), - [aux_sym_preproc_include_token1] = ACTIONS(1012), - [aux_sym_preproc_def_token1] = ACTIONS(1012), - [aux_sym_preproc_if_token1] = ACTIONS(1012), - [aux_sym_preproc_if_token2] = ACTIONS(1012), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1012), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1012), - [aux_sym_preproc_else_token1] = ACTIONS(1012), - [aux_sym_preproc_elif_token1] = ACTIONS(1012), - [sym_preproc_directive] = ACTIONS(1012), - [anon_sym_LPAREN2] = ACTIONS(1014), - [anon_sym_BANG] = ACTIONS(1014), - [anon_sym_TILDE] = ACTIONS(1014), - [anon_sym_DASH] = ACTIONS(1012), - [anon_sym_PLUS] = ACTIONS(1012), - [anon_sym_STAR] = ACTIONS(1014), - [anon_sym_AMP] = ACTIONS(1014), - [anon_sym_SEMI] = ACTIONS(1014), - [anon_sym_typedef] = ACTIONS(1012), - [anon_sym_extern] = ACTIONS(1012), - [anon_sym___attribute__] = ACTIONS(1012), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1014), - [anon_sym___declspec] = ACTIONS(1012), - [anon_sym___cdecl] = ACTIONS(1012), - [anon_sym___clrcall] = ACTIONS(1012), - [anon_sym___stdcall] = ACTIONS(1012), - [anon_sym___fastcall] = ACTIONS(1012), - [anon_sym___thiscall] = ACTIONS(1012), - [anon_sym___vectorcall] = ACTIONS(1012), - [anon_sym_LBRACE] = ACTIONS(1014), - [anon_sym_static] = ACTIONS(1012), - [anon_sym_auto] = ACTIONS(1012), - [anon_sym_register] = ACTIONS(1012), - [anon_sym_inline] = ACTIONS(1012), - [anon_sym_const] = ACTIONS(1012), - [anon_sym_volatile] = ACTIONS(1012), - [anon_sym_restrict] = ACTIONS(1012), - [anon_sym__Atomic] = ACTIONS(1012), - [anon_sym_signed] = ACTIONS(1012), - [anon_sym_unsigned] = ACTIONS(1012), - [anon_sym_long] = ACTIONS(1012), - [anon_sym_short] = ACTIONS(1012), - [sym_primitive_type] = ACTIONS(1012), - [anon_sym_enum] = ACTIONS(1012), - [anon_sym_struct] = ACTIONS(1012), - [anon_sym_union] = ACTIONS(1012), - [anon_sym_if] = ACTIONS(1012), - [anon_sym_else] = ACTIONS(1012), - [anon_sym_switch] = ACTIONS(1012), - [anon_sym_case] = ACTIONS(1012), - [anon_sym_default] = ACTIONS(1012), - [anon_sym_while] = ACTIONS(1012), - [anon_sym_do] = ACTIONS(1012), - [anon_sym_for] = ACTIONS(1012), - [anon_sym_return] = ACTIONS(1012), - [anon_sym_break] = ACTIONS(1012), - [anon_sym_continue] = ACTIONS(1012), - [anon_sym_goto] = ACTIONS(1012), - [anon_sym_DASH_DASH] = ACTIONS(1014), - [anon_sym_PLUS_PLUS] = ACTIONS(1014), - [anon_sym_sizeof] = ACTIONS(1012), - [sym_number_literal] = ACTIONS(1014), - [anon_sym_L_SQUOTE] = ACTIONS(1014), - [anon_sym_u_SQUOTE] = ACTIONS(1014), - [anon_sym_U_SQUOTE] = ACTIONS(1014), - [anon_sym_u8_SQUOTE] = ACTIONS(1014), - [anon_sym_SQUOTE] = ACTIONS(1014), - [anon_sym_L_DQUOTE] = ACTIONS(1014), - [anon_sym_u_DQUOTE] = ACTIONS(1014), - [anon_sym_U_DQUOTE] = ACTIONS(1014), - [anon_sym_u8_DQUOTE] = ACTIONS(1014), - [anon_sym_DQUOTE] = ACTIONS(1014), - [sym_true] = ACTIONS(1012), - [sym_false] = ACTIONS(1012), - [sym_null] = ACTIONS(1012), - [sym_comment] = ACTIONS(3), - }, - [101] = { - [sym_identifier] = ACTIONS(1016), - [aux_sym_preproc_include_token1] = ACTIONS(1016), - [aux_sym_preproc_def_token1] = ACTIONS(1016), - [aux_sym_preproc_if_token1] = ACTIONS(1016), - [aux_sym_preproc_if_token2] = ACTIONS(1016), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1016), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1016), - [aux_sym_preproc_else_token1] = ACTIONS(1016), - [aux_sym_preproc_elif_token1] = ACTIONS(1016), - [sym_preproc_directive] = ACTIONS(1016), - [anon_sym_LPAREN2] = ACTIONS(1018), - [anon_sym_BANG] = ACTIONS(1018), - [anon_sym_TILDE] = ACTIONS(1018), - [anon_sym_DASH] = ACTIONS(1016), - [anon_sym_PLUS] = ACTIONS(1016), - [anon_sym_STAR] = ACTIONS(1018), - [anon_sym_AMP] = ACTIONS(1018), - [anon_sym_SEMI] = ACTIONS(1018), - [anon_sym_typedef] = ACTIONS(1016), - [anon_sym_extern] = ACTIONS(1016), - [anon_sym___attribute__] = ACTIONS(1016), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1018), - [anon_sym___declspec] = ACTIONS(1016), - [anon_sym___cdecl] = ACTIONS(1016), - [anon_sym___clrcall] = ACTIONS(1016), - [anon_sym___stdcall] = ACTIONS(1016), - [anon_sym___fastcall] = ACTIONS(1016), - [anon_sym___thiscall] = ACTIONS(1016), - [anon_sym___vectorcall] = ACTIONS(1016), - [anon_sym_LBRACE] = ACTIONS(1018), - [anon_sym_static] = ACTIONS(1016), - [anon_sym_auto] = ACTIONS(1016), - [anon_sym_register] = ACTIONS(1016), - [anon_sym_inline] = ACTIONS(1016), - [anon_sym_const] = ACTIONS(1016), - [anon_sym_volatile] = ACTIONS(1016), - [anon_sym_restrict] = ACTIONS(1016), - [anon_sym__Atomic] = ACTIONS(1016), - [anon_sym_signed] = ACTIONS(1016), - [anon_sym_unsigned] = ACTIONS(1016), - [anon_sym_long] = ACTIONS(1016), - [anon_sym_short] = ACTIONS(1016), - [sym_primitive_type] = ACTIONS(1016), - [anon_sym_enum] = ACTIONS(1016), - [anon_sym_struct] = ACTIONS(1016), - [anon_sym_union] = ACTIONS(1016), - [anon_sym_if] = ACTIONS(1016), - [anon_sym_else] = ACTIONS(1016), - [anon_sym_switch] = ACTIONS(1016), - [anon_sym_case] = ACTIONS(1016), - [anon_sym_default] = ACTIONS(1016), - [anon_sym_while] = ACTIONS(1016), - [anon_sym_do] = ACTIONS(1016), - [anon_sym_for] = ACTIONS(1016), - [anon_sym_return] = ACTIONS(1016), - [anon_sym_break] = ACTIONS(1016), - [anon_sym_continue] = ACTIONS(1016), - [anon_sym_goto] = ACTIONS(1016), - [anon_sym_DASH_DASH] = ACTIONS(1018), - [anon_sym_PLUS_PLUS] = ACTIONS(1018), - [anon_sym_sizeof] = ACTIONS(1016), - [sym_number_literal] = ACTIONS(1018), - [anon_sym_L_SQUOTE] = ACTIONS(1018), - [anon_sym_u_SQUOTE] = ACTIONS(1018), - [anon_sym_U_SQUOTE] = ACTIONS(1018), - [anon_sym_u8_SQUOTE] = ACTIONS(1018), - [anon_sym_SQUOTE] = ACTIONS(1018), - [anon_sym_L_DQUOTE] = ACTIONS(1018), - [anon_sym_u_DQUOTE] = ACTIONS(1018), - [anon_sym_U_DQUOTE] = ACTIONS(1018), - [anon_sym_u8_DQUOTE] = ACTIONS(1018), - [anon_sym_DQUOTE] = ACTIONS(1018), - [sym_true] = ACTIONS(1016), - [sym_false] = ACTIONS(1016), - [sym_null] = ACTIONS(1016), - [sym_comment] = ACTIONS(3), - }, - [102] = { - [sym_identifier] = ACTIONS(1020), - [aux_sym_preproc_include_token1] = ACTIONS(1020), - [aux_sym_preproc_def_token1] = ACTIONS(1020), - [aux_sym_preproc_if_token1] = ACTIONS(1020), - [aux_sym_preproc_if_token2] = ACTIONS(1020), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1020), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1020), - [aux_sym_preproc_else_token1] = ACTIONS(1020), - [aux_sym_preproc_elif_token1] = ACTIONS(1020), - [sym_preproc_directive] = ACTIONS(1020), - [anon_sym_LPAREN2] = ACTIONS(1022), - [anon_sym_BANG] = ACTIONS(1022), - [anon_sym_TILDE] = ACTIONS(1022), - [anon_sym_DASH] = ACTIONS(1020), - [anon_sym_PLUS] = ACTIONS(1020), - [anon_sym_STAR] = ACTIONS(1022), - [anon_sym_AMP] = ACTIONS(1022), - [anon_sym_SEMI] = ACTIONS(1022), - [anon_sym_typedef] = ACTIONS(1020), - [anon_sym_extern] = ACTIONS(1020), - [anon_sym___attribute__] = ACTIONS(1020), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1022), - [anon_sym___declspec] = ACTIONS(1020), - [anon_sym___cdecl] = ACTIONS(1020), - [anon_sym___clrcall] = ACTIONS(1020), - [anon_sym___stdcall] = ACTIONS(1020), - [anon_sym___fastcall] = ACTIONS(1020), - [anon_sym___thiscall] = ACTIONS(1020), - [anon_sym___vectorcall] = ACTIONS(1020), - [anon_sym_LBRACE] = ACTIONS(1022), - [anon_sym_static] = ACTIONS(1020), - [anon_sym_auto] = ACTIONS(1020), - [anon_sym_register] = ACTIONS(1020), - [anon_sym_inline] = ACTIONS(1020), - [anon_sym_const] = ACTIONS(1020), - [anon_sym_volatile] = ACTIONS(1020), - [anon_sym_restrict] = ACTIONS(1020), - [anon_sym__Atomic] = ACTIONS(1020), - [anon_sym_signed] = ACTIONS(1020), - [anon_sym_unsigned] = ACTIONS(1020), - [anon_sym_long] = ACTIONS(1020), - [anon_sym_short] = ACTIONS(1020), - [sym_primitive_type] = ACTIONS(1020), - [anon_sym_enum] = ACTIONS(1020), - [anon_sym_struct] = ACTIONS(1020), - [anon_sym_union] = ACTIONS(1020), - [anon_sym_if] = ACTIONS(1020), - [anon_sym_else] = ACTIONS(1020), - [anon_sym_switch] = ACTIONS(1020), - [anon_sym_case] = ACTIONS(1020), - [anon_sym_default] = ACTIONS(1020), - [anon_sym_while] = ACTIONS(1020), - [anon_sym_do] = ACTIONS(1020), - [anon_sym_for] = ACTIONS(1020), - [anon_sym_return] = ACTIONS(1020), - [anon_sym_break] = ACTIONS(1020), - [anon_sym_continue] = ACTIONS(1020), - [anon_sym_goto] = ACTIONS(1020), - [anon_sym_DASH_DASH] = ACTIONS(1022), - [anon_sym_PLUS_PLUS] = ACTIONS(1022), - [anon_sym_sizeof] = ACTIONS(1020), - [sym_number_literal] = ACTIONS(1022), - [anon_sym_L_SQUOTE] = ACTIONS(1022), - [anon_sym_u_SQUOTE] = ACTIONS(1022), - [anon_sym_U_SQUOTE] = ACTIONS(1022), - [anon_sym_u8_SQUOTE] = ACTIONS(1022), - [anon_sym_SQUOTE] = ACTIONS(1022), - [anon_sym_L_DQUOTE] = ACTIONS(1022), - [anon_sym_u_DQUOTE] = ACTIONS(1022), - [anon_sym_U_DQUOTE] = ACTIONS(1022), - [anon_sym_u8_DQUOTE] = ACTIONS(1022), - [anon_sym_DQUOTE] = ACTIONS(1022), - [sym_true] = ACTIONS(1020), - [sym_false] = ACTIONS(1020), - [sym_null] = ACTIONS(1020), - [sym_comment] = ACTIONS(3), - }, - [103] = { - [sym_identifier] = ACTIONS(1024), - [aux_sym_preproc_include_token1] = ACTIONS(1024), - [aux_sym_preproc_def_token1] = ACTIONS(1024), - [aux_sym_preproc_if_token1] = ACTIONS(1024), - [aux_sym_preproc_if_token2] = ACTIONS(1024), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1024), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1024), - [aux_sym_preproc_else_token1] = ACTIONS(1024), - [aux_sym_preproc_elif_token1] = ACTIONS(1024), - [sym_preproc_directive] = ACTIONS(1024), - [anon_sym_LPAREN2] = ACTIONS(1026), - [anon_sym_BANG] = ACTIONS(1026), - [anon_sym_TILDE] = ACTIONS(1026), - [anon_sym_DASH] = ACTIONS(1024), - [anon_sym_PLUS] = ACTIONS(1024), - [anon_sym_STAR] = ACTIONS(1026), - [anon_sym_AMP] = ACTIONS(1026), - [anon_sym_SEMI] = ACTIONS(1026), - [anon_sym_typedef] = ACTIONS(1024), - [anon_sym_extern] = ACTIONS(1024), - [anon_sym___attribute__] = ACTIONS(1024), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1026), - [anon_sym___declspec] = ACTIONS(1024), - [anon_sym___cdecl] = ACTIONS(1024), - [anon_sym___clrcall] = ACTIONS(1024), - [anon_sym___stdcall] = ACTIONS(1024), - [anon_sym___fastcall] = ACTIONS(1024), - [anon_sym___thiscall] = ACTIONS(1024), - [anon_sym___vectorcall] = ACTIONS(1024), - [anon_sym_LBRACE] = ACTIONS(1026), - [anon_sym_static] = ACTIONS(1024), - [anon_sym_auto] = ACTIONS(1024), - [anon_sym_register] = ACTIONS(1024), - [anon_sym_inline] = ACTIONS(1024), - [anon_sym_const] = ACTIONS(1024), - [anon_sym_volatile] = ACTIONS(1024), - [anon_sym_restrict] = ACTIONS(1024), - [anon_sym__Atomic] = ACTIONS(1024), - [anon_sym_signed] = ACTIONS(1024), - [anon_sym_unsigned] = ACTIONS(1024), - [anon_sym_long] = ACTIONS(1024), - [anon_sym_short] = ACTIONS(1024), - [sym_primitive_type] = ACTIONS(1024), - [anon_sym_enum] = ACTIONS(1024), - [anon_sym_struct] = ACTIONS(1024), - [anon_sym_union] = ACTIONS(1024), - [anon_sym_if] = ACTIONS(1024), - [anon_sym_else] = ACTIONS(1024), - [anon_sym_switch] = ACTIONS(1024), - [anon_sym_case] = ACTIONS(1024), - [anon_sym_default] = ACTIONS(1024), - [anon_sym_while] = ACTIONS(1024), - [anon_sym_do] = ACTIONS(1024), - [anon_sym_for] = ACTIONS(1024), - [anon_sym_return] = ACTIONS(1024), - [anon_sym_break] = ACTIONS(1024), - [anon_sym_continue] = ACTIONS(1024), - [anon_sym_goto] = ACTIONS(1024), - [anon_sym_DASH_DASH] = ACTIONS(1026), - [anon_sym_PLUS_PLUS] = ACTIONS(1026), - [anon_sym_sizeof] = ACTIONS(1024), - [sym_number_literal] = ACTIONS(1026), - [anon_sym_L_SQUOTE] = ACTIONS(1026), - [anon_sym_u_SQUOTE] = ACTIONS(1026), - [anon_sym_U_SQUOTE] = ACTIONS(1026), - [anon_sym_u8_SQUOTE] = ACTIONS(1026), - [anon_sym_SQUOTE] = ACTIONS(1026), - [anon_sym_L_DQUOTE] = ACTIONS(1026), - [anon_sym_u_DQUOTE] = ACTIONS(1026), - [anon_sym_U_DQUOTE] = ACTIONS(1026), - [anon_sym_u8_DQUOTE] = ACTIONS(1026), - [anon_sym_DQUOTE] = ACTIONS(1026), - [sym_true] = ACTIONS(1024), - [sym_false] = ACTIONS(1024), - [sym_null] = ACTIONS(1024), - [sym_comment] = ACTIONS(3), - }, - [104] = { - [sym_identifier] = ACTIONS(1028), - [aux_sym_preproc_include_token1] = ACTIONS(1028), - [aux_sym_preproc_def_token1] = ACTIONS(1028), - [aux_sym_preproc_if_token1] = ACTIONS(1028), - [aux_sym_preproc_if_token2] = ACTIONS(1028), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1028), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1028), - [aux_sym_preproc_else_token1] = ACTIONS(1028), - [aux_sym_preproc_elif_token1] = ACTIONS(1028), - [sym_preproc_directive] = ACTIONS(1028), - [anon_sym_LPAREN2] = ACTIONS(1030), - [anon_sym_BANG] = ACTIONS(1030), - [anon_sym_TILDE] = ACTIONS(1030), - [anon_sym_DASH] = ACTIONS(1028), - [anon_sym_PLUS] = ACTIONS(1028), - [anon_sym_STAR] = ACTIONS(1030), - [anon_sym_AMP] = ACTIONS(1030), - [anon_sym_SEMI] = ACTIONS(1030), - [anon_sym_typedef] = ACTIONS(1028), - [anon_sym_extern] = ACTIONS(1028), - [anon_sym___attribute__] = ACTIONS(1028), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1030), - [anon_sym___declspec] = ACTIONS(1028), - [anon_sym___cdecl] = ACTIONS(1028), - [anon_sym___clrcall] = ACTIONS(1028), - [anon_sym___stdcall] = ACTIONS(1028), - [anon_sym___fastcall] = ACTIONS(1028), - [anon_sym___thiscall] = ACTIONS(1028), - [anon_sym___vectorcall] = ACTIONS(1028), - [anon_sym_LBRACE] = ACTIONS(1030), - [anon_sym_static] = ACTIONS(1028), - [anon_sym_auto] = ACTIONS(1028), - [anon_sym_register] = ACTIONS(1028), - [anon_sym_inline] = ACTIONS(1028), - [anon_sym_const] = ACTIONS(1028), - [anon_sym_volatile] = ACTIONS(1028), - [anon_sym_restrict] = ACTIONS(1028), - [anon_sym__Atomic] = ACTIONS(1028), - [anon_sym_signed] = ACTIONS(1028), - [anon_sym_unsigned] = ACTIONS(1028), - [anon_sym_long] = ACTIONS(1028), - [anon_sym_short] = ACTIONS(1028), - [sym_primitive_type] = ACTIONS(1028), - [anon_sym_enum] = ACTIONS(1028), - [anon_sym_struct] = ACTIONS(1028), - [anon_sym_union] = ACTIONS(1028), - [anon_sym_if] = ACTIONS(1028), - [anon_sym_switch] = ACTIONS(1028), - [anon_sym_case] = ACTIONS(1028), - [anon_sym_default] = ACTIONS(1028), - [anon_sym_while] = ACTIONS(1028), - [anon_sym_do] = ACTIONS(1028), - [anon_sym_for] = ACTIONS(1028), - [anon_sym_return] = ACTIONS(1028), - [anon_sym_break] = ACTIONS(1028), - [anon_sym_continue] = ACTIONS(1028), - [anon_sym_goto] = ACTIONS(1028), - [anon_sym_DASH_DASH] = ACTIONS(1030), - [anon_sym_PLUS_PLUS] = ACTIONS(1030), - [anon_sym_sizeof] = ACTIONS(1028), - [sym_number_literal] = ACTIONS(1030), - [anon_sym_L_SQUOTE] = ACTIONS(1030), - [anon_sym_u_SQUOTE] = ACTIONS(1030), - [anon_sym_U_SQUOTE] = ACTIONS(1030), - [anon_sym_u8_SQUOTE] = ACTIONS(1030), - [anon_sym_SQUOTE] = ACTIONS(1030), - [anon_sym_L_DQUOTE] = ACTIONS(1030), - [anon_sym_u_DQUOTE] = ACTIONS(1030), - [anon_sym_U_DQUOTE] = ACTIONS(1030), - [anon_sym_u8_DQUOTE] = ACTIONS(1030), - [anon_sym_DQUOTE] = ACTIONS(1030), - [sym_true] = ACTIONS(1028), - [sym_false] = ACTIONS(1028), - [sym_null] = ACTIONS(1028), - [sym_comment] = ACTIONS(3), - }, - [105] = { - [sym_identifier] = ACTIONS(1032), - [aux_sym_preproc_include_token1] = ACTIONS(1032), - [aux_sym_preproc_def_token1] = ACTIONS(1032), - [aux_sym_preproc_if_token1] = ACTIONS(1032), - [aux_sym_preproc_if_token2] = ACTIONS(1032), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1032), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1032), - [aux_sym_preproc_else_token1] = ACTIONS(1032), - [aux_sym_preproc_elif_token1] = ACTIONS(1032), - [sym_preproc_directive] = ACTIONS(1032), - [anon_sym_LPAREN2] = ACTIONS(1034), - [anon_sym_BANG] = ACTIONS(1034), - [anon_sym_TILDE] = ACTIONS(1034), - [anon_sym_DASH] = ACTIONS(1032), - [anon_sym_PLUS] = ACTIONS(1032), - [anon_sym_STAR] = ACTIONS(1034), - [anon_sym_AMP] = ACTIONS(1034), - [anon_sym_SEMI] = ACTIONS(1034), - [anon_sym_typedef] = ACTIONS(1032), - [anon_sym_extern] = ACTIONS(1032), - [anon_sym___attribute__] = ACTIONS(1032), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1034), - [anon_sym___declspec] = ACTIONS(1032), - [anon_sym___cdecl] = ACTIONS(1032), - [anon_sym___clrcall] = ACTIONS(1032), - [anon_sym___stdcall] = ACTIONS(1032), - [anon_sym___fastcall] = ACTIONS(1032), - [anon_sym___thiscall] = ACTIONS(1032), - [anon_sym___vectorcall] = ACTIONS(1032), - [anon_sym_LBRACE] = ACTIONS(1034), - [anon_sym_static] = ACTIONS(1032), - [anon_sym_auto] = ACTIONS(1032), - [anon_sym_register] = ACTIONS(1032), - [anon_sym_inline] = ACTIONS(1032), - [anon_sym_const] = ACTIONS(1032), - [anon_sym_volatile] = ACTIONS(1032), - [anon_sym_restrict] = ACTIONS(1032), - [anon_sym__Atomic] = ACTIONS(1032), - [anon_sym_signed] = ACTIONS(1032), - [anon_sym_unsigned] = ACTIONS(1032), - [anon_sym_long] = ACTIONS(1032), - [anon_sym_short] = ACTIONS(1032), - [sym_primitive_type] = ACTIONS(1032), - [anon_sym_enum] = ACTIONS(1032), - [anon_sym_struct] = ACTIONS(1032), - [anon_sym_union] = ACTIONS(1032), - [anon_sym_if] = ACTIONS(1032), - [anon_sym_switch] = ACTIONS(1032), - [anon_sym_case] = ACTIONS(1032), - [anon_sym_default] = ACTIONS(1032), - [anon_sym_while] = ACTIONS(1032), - [anon_sym_do] = ACTIONS(1032), - [anon_sym_for] = ACTIONS(1032), - [anon_sym_return] = ACTIONS(1032), - [anon_sym_break] = ACTIONS(1032), - [anon_sym_continue] = ACTIONS(1032), - [anon_sym_goto] = ACTIONS(1032), - [anon_sym_DASH_DASH] = ACTIONS(1034), - [anon_sym_PLUS_PLUS] = ACTIONS(1034), - [anon_sym_sizeof] = ACTIONS(1032), - [sym_number_literal] = ACTIONS(1034), - [anon_sym_L_SQUOTE] = ACTIONS(1034), - [anon_sym_u_SQUOTE] = ACTIONS(1034), - [anon_sym_U_SQUOTE] = ACTIONS(1034), - [anon_sym_u8_SQUOTE] = ACTIONS(1034), - [anon_sym_SQUOTE] = ACTIONS(1034), - [anon_sym_L_DQUOTE] = ACTIONS(1034), - [anon_sym_u_DQUOTE] = ACTIONS(1034), - [anon_sym_U_DQUOTE] = ACTIONS(1034), - [anon_sym_u8_DQUOTE] = ACTIONS(1034), - [anon_sym_DQUOTE] = ACTIONS(1034), - [sym_true] = ACTIONS(1032), - [sym_false] = ACTIONS(1032), - [sym_null] = ACTIONS(1032), - [sym_comment] = ACTIONS(3), - }, - [106] = { - [sym__expression] = STATE(630), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(527), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(527), - [sym_call_expression] = STATE(527), - [sym_field_expression] = STATE(527), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(527), - [sym_initializer_list] = STATE(516), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_identifier] = ACTIONS(870), - [anon_sym_LPAREN2] = ACTIONS(1036), - [anon_sym_BANG] = ACTIONS(1038), - [anon_sym_TILDE] = ACTIONS(1040), - [anon_sym_DASH] = ACTIONS(1038), - [anon_sym_PLUS] = ACTIONS(1038), - [anon_sym_STAR] = ACTIONS(1042), - [anon_sym_SLASH] = ACTIONS(882), - [anon_sym_PERCENT] = ACTIONS(882), - [anon_sym_PIPE_PIPE] = ACTIONS(872), - [anon_sym_AMP_AMP] = ACTIONS(872), - [anon_sym_PIPE] = ACTIONS(882), - [anon_sym_CARET] = ACTIONS(882), - [anon_sym_AMP] = ACTIONS(1042), - [anon_sym_EQ_EQ] = ACTIONS(872), - [anon_sym_BANG_EQ] = ACTIONS(872), - [anon_sym_GT] = ACTIONS(882), - [anon_sym_GT_EQ] = ACTIONS(872), - [anon_sym_LT_EQ] = ACTIONS(872), - [anon_sym_LT] = ACTIONS(882), - [anon_sym_LT_LT] = ACTIONS(882), - [anon_sym_GT_GT] = ACTIONS(882), - [anon_sym_LBRACE] = ACTIONS(884), - [anon_sym_LBRACK] = ACTIONS(872), - [anon_sym_RBRACK] = ACTIONS(872), - [anon_sym_EQ] = ACTIONS(882), - [anon_sym_QMARK] = ACTIONS(872), - [anon_sym_STAR_EQ] = ACTIONS(872), - [anon_sym_SLASH_EQ] = ACTIONS(872), - [anon_sym_PERCENT_EQ] = ACTIONS(872), - [anon_sym_PLUS_EQ] = ACTIONS(872), - [anon_sym_DASH_EQ] = ACTIONS(872), - [anon_sym_LT_LT_EQ] = ACTIONS(872), - [anon_sym_GT_GT_EQ] = ACTIONS(872), - [anon_sym_AMP_EQ] = ACTIONS(872), - [anon_sym_CARET_EQ] = ACTIONS(872), - [anon_sym_PIPE_EQ] = ACTIONS(872), - [anon_sym_DASH_DASH] = ACTIONS(1044), - [anon_sym_PLUS_PLUS] = ACTIONS(1044), - [anon_sym_sizeof] = ACTIONS(1046), - [anon_sym_DOT] = ACTIONS(882), - [anon_sym_DASH_GT] = ACTIONS(872), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [107] = { - [sym_identifier] = ACTIONS(1048), - [aux_sym_preproc_include_token1] = ACTIONS(1048), - [aux_sym_preproc_def_token1] = ACTIONS(1048), - [aux_sym_preproc_if_token1] = ACTIONS(1048), - [aux_sym_preproc_if_token2] = ACTIONS(1048), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1048), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1048), - [aux_sym_preproc_else_token1] = ACTIONS(1048), - [aux_sym_preproc_elif_token1] = ACTIONS(1048), - [sym_preproc_directive] = ACTIONS(1048), - [anon_sym_LPAREN2] = ACTIONS(1050), - [anon_sym_BANG] = ACTIONS(1050), - [anon_sym_TILDE] = ACTIONS(1050), - [anon_sym_DASH] = ACTIONS(1048), - [anon_sym_PLUS] = ACTIONS(1048), - [anon_sym_STAR] = ACTIONS(1050), - [anon_sym_AMP] = ACTIONS(1050), - [anon_sym_SEMI] = ACTIONS(1050), - [anon_sym_typedef] = ACTIONS(1048), - [anon_sym_extern] = ACTIONS(1048), - [anon_sym___attribute__] = ACTIONS(1048), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1050), - [anon_sym___declspec] = ACTIONS(1048), - [anon_sym___cdecl] = ACTIONS(1048), - [anon_sym___clrcall] = ACTIONS(1048), - [anon_sym___stdcall] = ACTIONS(1048), - [anon_sym___fastcall] = ACTIONS(1048), - [anon_sym___thiscall] = ACTIONS(1048), - [anon_sym___vectorcall] = ACTIONS(1048), - [anon_sym_LBRACE] = ACTIONS(1050), - [anon_sym_static] = ACTIONS(1048), - [anon_sym_auto] = ACTIONS(1048), - [anon_sym_register] = ACTIONS(1048), - [anon_sym_inline] = ACTIONS(1048), - [anon_sym_const] = ACTIONS(1048), - [anon_sym_volatile] = ACTIONS(1048), - [anon_sym_restrict] = ACTIONS(1048), - [anon_sym__Atomic] = ACTIONS(1048), - [anon_sym_signed] = ACTIONS(1048), - [anon_sym_unsigned] = ACTIONS(1048), - [anon_sym_long] = ACTIONS(1048), - [anon_sym_short] = ACTIONS(1048), - [sym_primitive_type] = ACTIONS(1048), - [anon_sym_enum] = ACTIONS(1048), - [anon_sym_struct] = ACTIONS(1048), - [anon_sym_union] = ACTIONS(1048), - [anon_sym_if] = ACTIONS(1048), - [anon_sym_switch] = ACTIONS(1048), - [anon_sym_case] = ACTIONS(1048), - [anon_sym_default] = ACTIONS(1048), - [anon_sym_while] = ACTIONS(1048), - [anon_sym_do] = ACTIONS(1048), - [anon_sym_for] = ACTIONS(1048), - [anon_sym_return] = ACTIONS(1048), - [anon_sym_break] = ACTIONS(1048), - [anon_sym_continue] = ACTIONS(1048), - [anon_sym_goto] = ACTIONS(1048), - [anon_sym_DASH_DASH] = ACTIONS(1050), - [anon_sym_PLUS_PLUS] = ACTIONS(1050), - [anon_sym_sizeof] = ACTIONS(1048), - [sym_number_literal] = ACTIONS(1050), - [anon_sym_L_SQUOTE] = ACTIONS(1050), - [anon_sym_u_SQUOTE] = ACTIONS(1050), - [anon_sym_U_SQUOTE] = ACTIONS(1050), - [anon_sym_u8_SQUOTE] = ACTIONS(1050), - [anon_sym_SQUOTE] = ACTIONS(1050), - [anon_sym_L_DQUOTE] = ACTIONS(1050), - [anon_sym_u_DQUOTE] = ACTIONS(1050), - [anon_sym_U_DQUOTE] = ACTIONS(1050), - [anon_sym_u8_DQUOTE] = ACTIONS(1050), - [anon_sym_DQUOTE] = ACTIONS(1050), - [sym_true] = ACTIONS(1048), - [sym_false] = ACTIONS(1048), - [sym_null] = ACTIONS(1048), - [sym_comment] = ACTIONS(3), - }, - [108] = { - [sym_identifier] = ACTIONS(1052), - [aux_sym_preproc_include_token1] = ACTIONS(1052), - [aux_sym_preproc_def_token1] = ACTIONS(1052), - [aux_sym_preproc_if_token1] = ACTIONS(1052), - [aux_sym_preproc_if_token2] = ACTIONS(1052), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1052), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1052), - [aux_sym_preproc_else_token1] = ACTIONS(1052), - [aux_sym_preproc_elif_token1] = ACTIONS(1052), - [sym_preproc_directive] = ACTIONS(1052), - [anon_sym_LPAREN2] = ACTIONS(1054), - [anon_sym_BANG] = ACTIONS(1054), - [anon_sym_TILDE] = ACTIONS(1054), - [anon_sym_DASH] = ACTIONS(1052), - [anon_sym_PLUS] = ACTIONS(1052), - [anon_sym_STAR] = ACTIONS(1054), - [anon_sym_AMP] = ACTIONS(1054), - [anon_sym_SEMI] = ACTIONS(1054), - [anon_sym_typedef] = ACTIONS(1052), - [anon_sym_extern] = ACTIONS(1052), - [anon_sym___attribute__] = ACTIONS(1052), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1054), - [anon_sym___declspec] = ACTIONS(1052), - [anon_sym___cdecl] = ACTIONS(1052), - [anon_sym___clrcall] = ACTIONS(1052), - [anon_sym___stdcall] = ACTIONS(1052), - [anon_sym___fastcall] = ACTIONS(1052), - [anon_sym___thiscall] = ACTIONS(1052), - [anon_sym___vectorcall] = ACTIONS(1052), - [anon_sym_LBRACE] = ACTIONS(1054), - [anon_sym_static] = ACTIONS(1052), - [anon_sym_auto] = ACTIONS(1052), - [anon_sym_register] = ACTIONS(1052), - [anon_sym_inline] = ACTIONS(1052), - [anon_sym_const] = ACTIONS(1052), - [anon_sym_volatile] = ACTIONS(1052), - [anon_sym_restrict] = ACTIONS(1052), - [anon_sym__Atomic] = ACTIONS(1052), - [anon_sym_signed] = ACTIONS(1052), - [anon_sym_unsigned] = ACTIONS(1052), - [anon_sym_long] = ACTIONS(1052), - [anon_sym_short] = ACTIONS(1052), - [sym_primitive_type] = ACTIONS(1052), - [anon_sym_enum] = ACTIONS(1052), - [anon_sym_struct] = ACTIONS(1052), - [anon_sym_union] = ACTIONS(1052), - [anon_sym_if] = ACTIONS(1052), - [anon_sym_switch] = ACTIONS(1052), - [anon_sym_case] = ACTIONS(1052), - [anon_sym_default] = ACTIONS(1052), - [anon_sym_while] = ACTIONS(1052), - [anon_sym_do] = ACTIONS(1052), - [anon_sym_for] = ACTIONS(1052), - [anon_sym_return] = ACTIONS(1052), - [anon_sym_break] = ACTIONS(1052), - [anon_sym_continue] = ACTIONS(1052), - [anon_sym_goto] = ACTIONS(1052), - [anon_sym_DASH_DASH] = ACTIONS(1054), - [anon_sym_PLUS_PLUS] = ACTIONS(1054), - [anon_sym_sizeof] = ACTIONS(1052), - [sym_number_literal] = ACTIONS(1054), - [anon_sym_L_SQUOTE] = ACTIONS(1054), - [anon_sym_u_SQUOTE] = ACTIONS(1054), - [anon_sym_U_SQUOTE] = ACTIONS(1054), - [anon_sym_u8_SQUOTE] = ACTIONS(1054), - [anon_sym_SQUOTE] = ACTIONS(1054), - [anon_sym_L_DQUOTE] = ACTIONS(1054), - [anon_sym_u_DQUOTE] = ACTIONS(1054), - [anon_sym_U_DQUOTE] = ACTIONS(1054), - [anon_sym_u8_DQUOTE] = ACTIONS(1054), - [anon_sym_DQUOTE] = ACTIONS(1054), - [sym_true] = ACTIONS(1052), - [sym_false] = ACTIONS(1052), - [sym_null] = ACTIONS(1052), - [sym_comment] = ACTIONS(3), - }, - [109] = { - [sym_identifier] = ACTIONS(1056), - [aux_sym_preproc_include_token1] = ACTIONS(1056), - [aux_sym_preproc_def_token1] = ACTIONS(1056), - [aux_sym_preproc_if_token1] = ACTIONS(1056), - [aux_sym_preproc_if_token2] = ACTIONS(1056), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1056), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1056), - [aux_sym_preproc_else_token1] = ACTIONS(1056), - [aux_sym_preproc_elif_token1] = ACTIONS(1056), - [sym_preproc_directive] = ACTIONS(1056), - [anon_sym_LPAREN2] = ACTIONS(1058), - [anon_sym_BANG] = ACTIONS(1058), - [anon_sym_TILDE] = ACTIONS(1058), - [anon_sym_DASH] = ACTIONS(1056), - [anon_sym_PLUS] = ACTIONS(1056), - [anon_sym_STAR] = ACTIONS(1058), - [anon_sym_AMP] = ACTIONS(1058), - [anon_sym_SEMI] = ACTIONS(1058), - [anon_sym_typedef] = ACTIONS(1056), - [anon_sym_extern] = ACTIONS(1056), - [anon_sym___attribute__] = ACTIONS(1056), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1058), - [anon_sym___declspec] = ACTIONS(1056), - [anon_sym___cdecl] = ACTIONS(1056), - [anon_sym___clrcall] = ACTIONS(1056), - [anon_sym___stdcall] = ACTIONS(1056), - [anon_sym___fastcall] = ACTIONS(1056), - [anon_sym___thiscall] = ACTIONS(1056), - [anon_sym___vectorcall] = ACTIONS(1056), - [anon_sym_LBRACE] = ACTIONS(1058), - [anon_sym_static] = ACTIONS(1056), - [anon_sym_auto] = ACTIONS(1056), - [anon_sym_register] = ACTIONS(1056), - [anon_sym_inline] = ACTIONS(1056), - [anon_sym_const] = ACTIONS(1056), - [anon_sym_volatile] = ACTIONS(1056), - [anon_sym_restrict] = ACTIONS(1056), - [anon_sym__Atomic] = ACTIONS(1056), - [anon_sym_signed] = ACTIONS(1056), - [anon_sym_unsigned] = ACTIONS(1056), - [anon_sym_long] = ACTIONS(1056), - [anon_sym_short] = ACTIONS(1056), - [sym_primitive_type] = ACTIONS(1056), - [anon_sym_enum] = ACTIONS(1056), - [anon_sym_struct] = ACTIONS(1056), - [anon_sym_union] = ACTIONS(1056), - [anon_sym_if] = ACTIONS(1056), - [anon_sym_switch] = ACTIONS(1056), - [anon_sym_case] = ACTIONS(1056), - [anon_sym_default] = ACTIONS(1056), - [anon_sym_while] = ACTIONS(1056), - [anon_sym_do] = ACTIONS(1056), - [anon_sym_for] = ACTIONS(1056), - [anon_sym_return] = ACTIONS(1056), - [anon_sym_break] = ACTIONS(1056), - [anon_sym_continue] = ACTIONS(1056), - [anon_sym_goto] = ACTIONS(1056), - [anon_sym_DASH_DASH] = ACTIONS(1058), - [anon_sym_PLUS_PLUS] = ACTIONS(1058), - [anon_sym_sizeof] = ACTIONS(1056), - [sym_number_literal] = ACTIONS(1058), - [anon_sym_L_SQUOTE] = ACTIONS(1058), - [anon_sym_u_SQUOTE] = ACTIONS(1058), - [anon_sym_U_SQUOTE] = ACTIONS(1058), - [anon_sym_u8_SQUOTE] = ACTIONS(1058), - [anon_sym_SQUOTE] = ACTIONS(1058), - [anon_sym_L_DQUOTE] = ACTIONS(1058), - [anon_sym_u_DQUOTE] = ACTIONS(1058), - [anon_sym_U_DQUOTE] = ACTIONS(1058), - [anon_sym_u8_DQUOTE] = ACTIONS(1058), - [anon_sym_DQUOTE] = ACTIONS(1058), - [sym_true] = ACTIONS(1056), - [sym_false] = ACTIONS(1056), - [sym_null] = ACTIONS(1056), - [sym_comment] = ACTIONS(3), - }, - [110] = { - [sym_identifier] = ACTIONS(1060), - [aux_sym_preproc_include_token1] = ACTIONS(1060), - [aux_sym_preproc_def_token1] = ACTIONS(1060), - [aux_sym_preproc_if_token1] = ACTIONS(1060), - [aux_sym_preproc_if_token2] = ACTIONS(1060), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1060), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1060), - [aux_sym_preproc_else_token1] = ACTIONS(1060), - [aux_sym_preproc_elif_token1] = ACTIONS(1060), - [sym_preproc_directive] = ACTIONS(1060), - [anon_sym_LPAREN2] = ACTIONS(1062), - [anon_sym_BANG] = ACTIONS(1062), - [anon_sym_TILDE] = ACTIONS(1062), - [anon_sym_DASH] = ACTIONS(1060), - [anon_sym_PLUS] = ACTIONS(1060), - [anon_sym_STAR] = ACTIONS(1062), - [anon_sym_AMP] = ACTIONS(1062), - [anon_sym_SEMI] = ACTIONS(1062), - [anon_sym_typedef] = ACTIONS(1060), - [anon_sym_extern] = ACTIONS(1060), - [anon_sym___attribute__] = ACTIONS(1060), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1062), - [anon_sym___declspec] = ACTIONS(1060), - [anon_sym___cdecl] = ACTIONS(1060), - [anon_sym___clrcall] = ACTIONS(1060), - [anon_sym___stdcall] = ACTIONS(1060), - [anon_sym___fastcall] = ACTIONS(1060), - [anon_sym___thiscall] = ACTIONS(1060), - [anon_sym___vectorcall] = ACTIONS(1060), - [anon_sym_LBRACE] = ACTIONS(1062), - [anon_sym_static] = ACTIONS(1060), - [anon_sym_auto] = ACTIONS(1060), - [anon_sym_register] = ACTIONS(1060), - [anon_sym_inline] = ACTIONS(1060), - [anon_sym_const] = ACTIONS(1060), - [anon_sym_volatile] = ACTIONS(1060), - [anon_sym_restrict] = ACTIONS(1060), - [anon_sym__Atomic] = ACTIONS(1060), - [anon_sym_signed] = ACTIONS(1060), - [anon_sym_unsigned] = ACTIONS(1060), - [anon_sym_long] = ACTIONS(1060), - [anon_sym_short] = ACTIONS(1060), - [sym_primitive_type] = ACTIONS(1060), - [anon_sym_enum] = ACTIONS(1060), - [anon_sym_struct] = ACTIONS(1060), - [anon_sym_union] = ACTIONS(1060), - [anon_sym_if] = ACTIONS(1060), - [anon_sym_switch] = ACTIONS(1060), - [anon_sym_case] = ACTIONS(1060), - [anon_sym_default] = ACTIONS(1060), - [anon_sym_while] = ACTIONS(1060), - [anon_sym_do] = ACTIONS(1060), - [anon_sym_for] = ACTIONS(1060), - [anon_sym_return] = ACTIONS(1060), - [anon_sym_break] = ACTIONS(1060), - [anon_sym_continue] = ACTIONS(1060), - [anon_sym_goto] = ACTIONS(1060), - [anon_sym_DASH_DASH] = ACTIONS(1062), - [anon_sym_PLUS_PLUS] = ACTIONS(1062), - [anon_sym_sizeof] = ACTIONS(1060), - [sym_number_literal] = ACTIONS(1062), - [anon_sym_L_SQUOTE] = ACTIONS(1062), - [anon_sym_u_SQUOTE] = ACTIONS(1062), - [anon_sym_U_SQUOTE] = ACTIONS(1062), - [anon_sym_u8_SQUOTE] = ACTIONS(1062), - [anon_sym_SQUOTE] = ACTIONS(1062), - [anon_sym_L_DQUOTE] = ACTIONS(1062), - [anon_sym_u_DQUOTE] = ACTIONS(1062), - [anon_sym_U_DQUOTE] = ACTIONS(1062), - [anon_sym_u8_DQUOTE] = ACTIONS(1062), - [anon_sym_DQUOTE] = ACTIONS(1062), - [sym_true] = ACTIONS(1060), - [sym_false] = ACTIONS(1060), - [sym_null] = ACTIONS(1060), - [sym_comment] = ACTIONS(3), - }, - [111] = { - [sym_identifier] = ACTIONS(1064), - [aux_sym_preproc_include_token1] = ACTIONS(1064), - [aux_sym_preproc_def_token1] = ACTIONS(1064), - [aux_sym_preproc_if_token1] = ACTIONS(1064), - [aux_sym_preproc_if_token2] = ACTIONS(1064), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1064), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1064), - [aux_sym_preproc_else_token1] = ACTIONS(1064), - [aux_sym_preproc_elif_token1] = ACTIONS(1064), - [sym_preproc_directive] = ACTIONS(1064), - [anon_sym_LPAREN2] = ACTIONS(1066), - [anon_sym_BANG] = ACTIONS(1066), - [anon_sym_TILDE] = ACTIONS(1066), - [anon_sym_DASH] = ACTIONS(1064), - [anon_sym_PLUS] = ACTIONS(1064), - [anon_sym_STAR] = ACTIONS(1066), - [anon_sym_AMP] = ACTIONS(1066), - [anon_sym_SEMI] = ACTIONS(1066), - [anon_sym_typedef] = ACTIONS(1064), - [anon_sym_extern] = ACTIONS(1064), - [anon_sym___attribute__] = ACTIONS(1064), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1066), - [anon_sym___declspec] = ACTIONS(1064), - [anon_sym___cdecl] = ACTIONS(1064), - [anon_sym___clrcall] = ACTIONS(1064), - [anon_sym___stdcall] = ACTIONS(1064), - [anon_sym___fastcall] = ACTIONS(1064), - [anon_sym___thiscall] = ACTIONS(1064), - [anon_sym___vectorcall] = ACTIONS(1064), - [anon_sym_LBRACE] = ACTIONS(1066), - [anon_sym_static] = ACTIONS(1064), - [anon_sym_auto] = ACTIONS(1064), - [anon_sym_register] = ACTIONS(1064), - [anon_sym_inline] = ACTIONS(1064), - [anon_sym_const] = ACTIONS(1064), - [anon_sym_volatile] = ACTIONS(1064), - [anon_sym_restrict] = ACTIONS(1064), - [anon_sym__Atomic] = ACTIONS(1064), - [anon_sym_signed] = ACTIONS(1064), - [anon_sym_unsigned] = ACTIONS(1064), - [anon_sym_long] = ACTIONS(1064), - [anon_sym_short] = ACTIONS(1064), - [sym_primitive_type] = ACTIONS(1064), - [anon_sym_enum] = ACTIONS(1064), - [anon_sym_struct] = ACTIONS(1064), - [anon_sym_union] = ACTIONS(1064), - [anon_sym_if] = ACTIONS(1064), - [anon_sym_switch] = ACTIONS(1064), - [anon_sym_case] = ACTIONS(1064), - [anon_sym_default] = ACTIONS(1064), - [anon_sym_while] = ACTIONS(1064), - [anon_sym_do] = ACTIONS(1064), - [anon_sym_for] = ACTIONS(1064), - [anon_sym_return] = ACTIONS(1064), - [anon_sym_break] = ACTIONS(1064), - [anon_sym_continue] = ACTIONS(1064), - [anon_sym_goto] = ACTIONS(1064), - [anon_sym_DASH_DASH] = ACTIONS(1066), - [anon_sym_PLUS_PLUS] = ACTIONS(1066), - [anon_sym_sizeof] = ACTIONS(1064), - [sym_number_literal] = ACTIONS(1066), - [anon_sym_L_SQUOTE] = ACTIONS(1066), - [anon_sym_u_SQUOTE] = ACTIONS(1066), - [anon_sym_U_SQUOTE] = ACTIONS(1066), - [anon_sym_u8_SQUOTE] = ACTIONS(1066), - [anon_sym_SQUOTE] = ACTIONS(1066), - [anon_sym_L_DQUOTE] = ACTIONS(1066), - [anon_sym_u_DQUOTE] = ACTIONS(1066), - [anon_sym_U_DQUOTE] = ACTIONS(1066), - [anon_sym_u8_DQUOTE] = ACTIONS(1066), - [anon_sym_DQUOTE] = ACTIONS(1066), - [sym_true] = ACTIONS(1064), - [sym_false] = ACTIONS(1064), - [sym_null] = ACTIONS(1064), - [sym_comment] = ACTIONS(3), - }, - [112] = { - [sym_identifier] = ACTIONS(1068), - [aux_sym_preproc_include_token1] = ACTIONS(1068), - [aux_sym_preproc_def_token1] = ACTIONS(1068), - [aux_sym_preproc_if_token1] = ACTIONS(1068), - [aux_sym_preproc_if_token2] = ACTIONS(1068), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1068), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1068), - [aux_sym_preproc_else_token1] = ACTIONS(1068), - [aux_sym_preproc_elif_token1] = ACTIONS(1068), - [sym_preproc_directive] = ACTIONS(1068), - [anon_sym_LPAREN2] = ACTIONS(1070), - [anon_sym_BANG] = ACTIONS(1070), - [anon_sym_TILDE] = ACTIONS(1070), - [anon_sym_DASH] = ACTIONS(1068), - [anon_sym_PLUS] = ACTIONS(1068), - [anon_sym_STAR] = ACTIONS(1070), - [anon_sym_AMP] = ACTIONS(1070), - [anon_sym_SEMI] = ACTIONS(1070), - [anon_sym_typedef] = ACTIONS(1068), - [anon_sym_extern] = ACTIONS(1068), - [anon_sym___attribute__] = ACTIONS(1068), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1070), - [anon_sym___declspec] = ACTIONS(1068), - [anon_sym___cdecl] = ACTIONS(1068), - [anon_sym___clrcall] = ACTIONS(1068), - [anon_sym___stdcall] = ACTIONS(1068), - [anon_sym___fastcall] = ACTIONS(1068), - [anon_sym___thiscall] = ACTIONS(1068), - [anon_sym___vectorcall] = ACTIONS(1068), - [anon_sym_LBRACE] = ACTIONS(1070), - [anon_sym_static] = ACTIONS(1068), - [anon_sym_auto] = ACTIONS(1068), - [anon_sym_register] = ACTIONS(1068), - [anon_sym_inline] = ACTIONS(1068), - [anon_sym_const] = ACTIONS(1068), - [anon_sym_volatile] = ACTIONS(1068), - [anon_sym_restrict] = ACTIONS(1068), - [anon_sym__Atomic] = ACTIONS(1068), - [anon_sym_signed] = ACTIONS(1068), - [anon_sym_unsigned] = ACTIONS(1068), - [anon_sym_long] = ACTIONS(1068), - [anon_sym_short] = ACTIONS(1068), - [sym_primitive_type] = ACTIONS(1068), - [anon_sym_enum] = ACTIONS(1068), - [anon_sym_struct] = ACTIONS(1068), - [anon_sym_union] = ACTIONS(1068), - [anon_sym_if] = ACTIONS(1068), - [anon_sym_switch] = ACTIONS(1068), - [anon_sym_case] = ACTIONS(1068), - [anon_sym_default] = ACTIONS(1068), - [anon_sym_while] = ACTIONS(1068), - [anon_sym_do] = ACTIONS(1068), - [anon_sym_for] = ACTIONS(1068), - [anon_sym_return] = ACTIONS(1068), - [anon_sym_break] = ACTIONS(1068), - [anon_sym_continue] = ACTIONS(1068), - [anon_sym_goto] = ACTIONS(1068), - [anon_sym_DASH_DASH] = ACTIONS(1070), - [anon_sym_PLUS_PLUS] = ACTIONS(1070), - [anon_sym_sizeof] = ACTIONS(1068), - [sym_number_literal] = ACTIONS(1070), - [anon_sym_L_SQUOTE] = ACTIONS(1070), - [anon_sym_u_SQUOTE] = ACTIONS(1070), - [anon_sym_U_SQUOTE] = ACTIONS(1070), - [anon_sym_u8_SQUOTE] = ACTIONS(1070), - [anon_sym_SQUOTE] = ACTIONS(1070), - [anon_sym_L_DQUOTE] = ACTIONS(1070), - [anon_sym_u_DQUOTE] = ACTIONS(1070), - [anon_sym_U_DQUOTE] = ACTIONS(1070), - [anon_sym_u8_DQUOTE] = ACTIONS(1070), - [anon_sym_DQUOTE] = ACTIONS(1070), - [sym_true] = ACTIONS(1068), - [sym_false] = ACTIONS(1068), - [sym_null] = ACTIONS(1068), - [sym_comment] = ACTIONS(3), - }, - [113] = { - [sym_identifier] = ACTIONS(1072), - [aux_sym_preproc_include_token1] = ACTIONS(1072), - [aux_sym_preproc_def_token1] = ACTIONS(1072), - [aux_sym_preproc_if_token1] = ACTIONS(1072), - [aux_sym_preproc_if_token2] = ACTIONS(1072), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1072), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1072), - [aux_sym_preproc_else_token1] = ACTIONS(1072), - [aux_sym_preproc_elif_token1] = ACTIONS(1072), - [sym_preproc_directive] = ACTIONS(1072), - [anon_sym_LPAREN2] = ACTIONS(1074), - [anon_sym_BANG] = ACTIONS(1074), - [anon_sym_TILDE] = ACTIONS(1074), - [anon_sym_DASH] = ACTIONS(1072), - [anon_sym_PLUS] = ACTIONS(1072), - [anon_sym_STAR] = ACTIONS(1074), - [anon_sym_AMP] = ACTIONS(1074), - [anon_sym_SEMI] = ACTIONS(1074), - [anon_sym_typedef] = ACTIONS(1072), - [anon_sym_extern] = ACTIONS(1072), - [anon_sym___attribute__] = ACTIONS(1072), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1074), - [anon_sym___declspec] = ACTIONS(1072), - [anon_sym___cdecl] = ACTIONS(1072), - [anon_sym___clrcall] = ACTIONS(1072), - [anon_sym___stdcall] = ACTIONS(1072), - [anon_sym___fastcall] = ACTIONS(1072), - [anon_sym___thiscall] = ACTIONS(1072), - [anon_sym___vectorcall] = ACTIONS(1072), - [anon_sym_LBRACE] = ACTIONS(1074), - [anon_sym_static] = ACTIONS(1072), - [anon_sym_auto] = ACTIONS(1072), - [anon_sym_register] = ACTIONS(1072), - [anon_sym_inline] = ACTIONS(1072), - [anon_sym_const] = ACTIONS(1072), - [anon_sym_volatile] = ACTIONS(1072), - [anon_sym_restrict] = ACTIONS(1072), - [anon_sym__Atomic] = ACTIONS(1072), - [anon_sym_signed] = ACTIONS(1072), - [anon_sym_unsigned] = ACTIONS(1072), - [anon_sym_long] = ACTIONS(1072), - [anon_sym_short] = ACTIONS(1072), - [sym_primitive_type] = ACTIONS(1072), - [anon_sym_enum] = ACTIONS(1072), - [anon_sym_struct] = ACTIONS(1072), - [anon_sym_union] = ACTIONS(1072), - [anon_sym_if] = ACTIONS(1072), - [anon_sym_switch] = ACTIONS(1072), - [anon_sym_case] = ACTIONS(1072), - [anon_sym_default] = ACTIONS(1072), - [anon_sym_while] = ACTIONS(1072), - [anon_sym_do] = ACTIONS(1072), - [anon_sym_for] = ACTIONS(1072), - [anon_sym_return] = ACTIONS(1072), - [anon_sym_break] = ACTIONS(1072), - [anon_sym_continue] = ACTIONS(1072), - [anon_sym_goto] = ACTIONS(1072), - [anon_sym_DASH_DASH] = ACTIONS(1074), - [anon_sym_PLUS_PLUS] = ACTIONS(1074), - [anon_sym_sizeof] = ACTIONS(1072), - [sym_number_literal] = ACTIONS(1074), - [anon_sym_L_SQUOTE] = ACTIONS(1074), - [anon_sym_u_SQUOTE] = ACTIONS(1074), - [anon_sym_U_SQUOTE] = ACTIONS(1074), - [anon_sym_u8_SQUOTE] = ACTIONS(1074), - [anon_sym_SQUOTE] = ACTIONS(1074), - [anon_sym_L_DQUOTE] = ACTIONS(1074), - [anon_sym_u_DQUOTE] = ACTIONS(1074), - [anon_sym_U_DQUOTE] = ACTIONS(1074), - [anon_sym_u8_DQUOTE] = ACTIONS(1074), - [anon_sym_DQUOTE] = ACTIONS(1074), - [sym_true] = ACTIONS(1072), - [sym_false] = ACTIONS(1072), - [sym_null] = ACTIONS(1072), - [sym_comment] = ACTIONS(3), - }, - [114] = { - [sym_identifier] = ACTIONS(1076), - [aux_sym_preproc_include_token1] = ACTIONS(1076), - [aux_sym_preproc_def_token1] = ACTIONS(1076), - [aux_sym_preproc_if_token1] = ACTIONS(1076), - [aux_sym_preproc_if_token2] = ACTIONS(1076), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1076), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1076), - [aux_sym_preproc_else_token1] = ACTIONS(1076), - [aux_sym_preproc_elif_token1] = ACTIONS(1076), - [sym_preproc_directive] = ACTIONS(1076), - [anon_sym_LPAREN2] = ACTIONS(1078), - [anon_sym_BANG] = ACTIONS(1078), - [anon_sym_TILDE] = ACTIONS(1078), - [anon_sym_DASH] = ACTIONS(1076), - [anon_sym_PLUS] = ACTIONS(1076), - [anon_sym_STAR] = ACTIONS(1078), - [anon_sym_AMP] = ACTIONS(1078), - [anon_sym_SEMI] = ACTIONS(1078), - [anon_sym_typedef] = ACTIONS(1076), - [anon_sym_extern] = ACTIONS(1076), - [anon_sym___attribute__] = ACTIONS(1076), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1078), - [anon_sym___declspec] = ACTIONS(1076), - [anon_sym___cdecl] = ACTIONS(1076), - [anon_sym___clrcall] = ACTIONS(1076), - [anon_sym___stdcall] = ACTIONS(1076), - [anon_sym___fastcall] = ACTIONS(1076), - [anon_sym___thiscall] = ACTIONS(1076), - [anon_sym___vectorcall] = ACTIONS(1076), - [anon_sym_LBRACE] = ACTIONS(1078), - [anon_sym_static] = ACTIONS(1076), - [anon_sym_auto] = ACTIONS(1076), - [anon_sym_register] = ACTIONS(1076), - [anon_sym_inline] = ACTIONS(1076), - [anon_sym_const] = ACTIONS(1076), - [anon_sym_volatile] = ACTIONS(1076), - [anon_sym_restrict] = ACTIONS(1076), - [anon_sym__Atomic] = ACTIONS(1076), - [anon_sym_signed] = ACTIONS(1076), - [anon_sym_unsigned] = ACTIONS(1076), - [anon_sym_long] = ACTIONS(1076), - [anon_sym_short] = ACTIONS(1076), - [sym_primitive_type] = ACTIONS(1076), - [anon_sym_enum] = ACTIONS(1076), - [anon_sym_struct] = ACTIONS(1076), - [anon_sym_union] = ACTIONS(1076), - [anon_sym_if] = ACTIONS(1076), - [anon_sym_switch] = ACTIONS(1076), - [anon_sym_case] = ACTIONS(1076), - [anon_sym_default] = ACTIONS(1076), - [anon_sym_while] = ACTIONS(1076), - [anon_sym_do] = ACTIONS(1076), - [anon_sym_for] = ACTIONS(1076), - [anon_sym_return] = ACTIONS(1076), - [anon_sym_break] = ACTIONS(1076), - [anon_sym_continue] = ACTIONS(1076), - [anon_sym_goto] = ACTIONS(1076), - [anon_sym_DASH_DASH] = ACTIONS(1078), - [anon_sym_PLUS_PLUS] = ACTIONS(1078), - [anon_sym_sizeof] = ACTIONS(1076), - [sym_number_literal] = ACTIONS(1078), - [anon_sym_L_SQUOTE] = ACTIONS(1078), - [anon_sym_u_SQUOTE] = ACTIONS(1078), - [anon_sym_U_SQUOTE] = ACTIONS(1078), - [anon_sym_u8_SQUOTE] = ACTIONS(1078), - [anon_sym_SQUOTE] = ACTIONS(1078), - [anon_sym_L_DQUOTE] = ACTIONS(1078), - [anon_sym_u_DQUOTE] = ACTIONS(1078), - [anon_sym_U_DQUOTE] = ACTIONS(1078), - [anon_sym_u8_DQUOTE] = ACTIONS(1078), - [anon_sym_DQUOTE] = ACTIONS(1078), - [sym_true] = ACTIONS(1076), - [sym_false] = ACTIONS(1076), - [sym_null] = ACTIONS(1076), - [sym_comment] = ACTIONS(3), - }, - [115] = { - [sym_identifier] = ACTIONS(1080), - [aux_sym_preproc_include_token1] = ACTIONS(1080), - [aux_sym_preproc_def_token1] = ACTIONS(1080), - [aux_sym_preproc_if_token1] = ACTIONS(1080), - [aux_sym_preproc_if_token2] = ACTIONS(1080), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1080), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1080), - [aux_sym_preproc_else_token1] = ACTIONS(1080), - [aux_sym_preproc_elif_token1] = ACTIONS(1080), - [sym_preproc_directive] = ACTIONS(1080), - [anon_sym_LPAREN2] = ACTIONS(1082), - [anon_sym_BANG] = ACTIONS(1082), - [anon_sym_TILDE] = ACTIONS(1082), - [anon_sym_DASH] = ACTIONS(1080), - [anon_sym_PLUS] = ACTIONS(1080), - [anon_sym_STAR] = ACTIONS(1082), - [anon_sym_AMP] = ACTIONS(1082), - [anon_sym_SEMI] = ACTIONS(1082), - [anon_sym_typedef] = ACTIONS(1080), - [anon_sym_extern] = ACTIONS(1080), - [anon_sym___attribute__] = ACTIONS(1080), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1082), - [anon_sym___declspec] = ACTIONS(1080), - [anon_sym___cdecl] = ACTIONS(1080), - [anon_sym___clrcall] = ACTIONS(1080), - [anon_sym___stdcall] = ACTIONS(1080), - [anon_sym___fastcall] = ACTIONS(1080), - [anon_sym___thiscall] = ACTIONS(1080), - [anon_sym___vectorcall] = ACTIONS(1080), - [anon_sym_LBRACE] = ACTIONS(1082), - [anon_sym_static] = ACTIONS(1080), - [anon_sym_auto] = ACTIONS(1080), - [anon_sym_register] = ACTIONS(1080), - [anon_sym_inline] = ACTIONS(1080), - [anon_sym_const] = ACTIONS(1080), - [anon_sym_volatile] = ACTIONS(1080), - [anon_sym_restrict] = ACTIONS(1080), - [anon_sym__Atomic] = ACTIONS(1080), - [anon_sym_signed] = ACTIONS(1080), - [anon_sym_unsigned] = ACTIONS(1080), - [anon_sym_long] = ACTIONS(1080), - [anon_sym_short] = ACTIONS(1080), - [sym_primitive_type] = ACTIONS(1080), - [anon_sym_enum] = ACTIONS(1080), - [anon_sym_struct] = ACTIONS(1080), - [anon_sym_union] = ACTIONS(1080), - [anon_sym_if] = ACTIONS(1080), - [anon_sym_switch] = ACTIONS(1080), - [anon_sym_case] = ACTIONS(1080), - [anon_sym_default] = ACTIONS(1080), - [anon_sym_while] = ACTIONS(1080), - [anon_sym_do] = ACTIONS(1080), - [anon_sym_for] = ACTIONS(1080), - [anon_sym_return] = ACTIONS(1080), - [anon_sym_break] = ACTIONS(1080), - [anon_sym_continue] = ACTIONS(1080), - [anon_sym_goto] = ACTIONS(1080), - [anon_sym_DASH_DASH] = ACTIONS(1082), - [anon_sym_PLUS_PLUS] = ACTIONS(1082), - [anon_sym_sizeof] = ACTIONS(1080), - [sym_number_literal] = ACTIONS(1082), - [anon_sym_L_SQUOTE] = ACTIONS(1082), - [anon_sym_u_SQUOTE] = ACTIONS(1082), - [anon_sym_U_SQUOTE] = ACTIONS(1082), - [anon_sym_u8_SQUOTE] = ACTIONS(1082), - [anon_sym_SQUOTE] = ACTIONS(1082), - [anon_sym_L_DQUOTE] = ACTIONS(1082), - [anon_sym_u_DQUOTE] = ACTIONS(1082), - [anon_sym_U_DQUOTE] = ACTIONS(1082), - [anon_sym_u8_DQUOTE] = ACTIONS(1082), - [anon_sym_DQUOTE] = ACTIONS(1082), - [sym_true] = ACTIONS(1080), - [sym_false] = ACTIONS(1080), - [sym_null] = ACTIONS(1080), - [sym_comment] = ACTIONS(3), - }, - [116] = { - [sym_identifier] = ACTIONS(1084), - [aux_sym_preproc_include_token1] = ACTIONS(1084), - [aux_sym_preproc_def_token1] = ACTIONS(1084), - [aux_sym_preproc_if_token1] = ACTIONS(1084), - [aux_sym_preproc_if_token2] = ACTIONS(1084), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1084), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1084), - [aux_sym_preproc_else_token1] = ACTIONS(1084), - [aux_sym_preproc_elif_token1] = ACTIONS(1084), - [sym_preproc_directive] = ACTIONS(1084), - [anon_sym_LPAREN2] = ACTIONS(1086), - [anon_sym_BANG] = ACTIONS(1086), - [anon_sym_TILDE] = ACTIONS(1086), - [anon_sym_DASH] = ACTIONS(1084), - [anon_sym_PLUS] = ACTIONS(1084), - [anon_sym_STAR] = ACTIONS(1086), - [anon_sym_AMP] = ACTIONS(1086), - [anon_sym_SEMI] = ACTIONS(1086), - [anon_sym_typedef] = ACTIONS(1084), - [anon_sym_extern] = ACTIONS(1084), - [anon_sym___attribute__] = ACTIONS(1084), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1086), - [anon_sym___declspec] = ACTIONS(1084), - [anon_sym___cdecl] = ACTIONS(1084), - [anon_sym___clrcall] = ACTIONS(1084), - [anon_sym___stdcall] = ACTIONS(1084), - [anon_sym___fastcall] = ACTIONS(1084), - [anon_sym___thiscall] = ACTIONS(1084), - [anon_sym___vectorcall] = ACTIONS(1084), - [anon_sym_LBRACE] = ACTIONS(1086), - [anon_sym_static] = ACTIONS(1084), - [anon_sym_auto] = ACTIONS(1084), - [anon_sym_register] = ACTIONS(1084), - [anon_sym_inline] = ACTIONS(1084), - [anon_sym_const] = ACTIONS(1084), - [anon_sym_volatile] = ACTIONS(1084), - [anon_sym_restrict] = ACTIONS(1084), - [anon_sym__Atomic] = ACTIONS(1084), - [anon_sym_signed] = ACTIONS(1084), - [anon_sym_unsigned] = ACTIONS(1084), - [anon_sym_long] = ACTIONS(1084), - [anon_sym_short] = ACTIONS(1084), - [sym_primitive_type] = ACTIONS(1084), - [anon_sym_enum] = ACTIONS(1084), - [anon_sym_struct] = ACTIONS(1084), - [anon_sym_union] = ACTIONS(1084), - [anon_sym_if] = ACTIONS(1084), - [anon_sym_switch] = ACTIONS(1084), - [anon_sym_case] = ACTIONS(1084), - [anon_sym_default] = ACTIONS(1084), - [anon_sym_while] = ACTIONS(1084), - [anon_sym_do] = ACTIONS(1084), - [anon_sym_for] = ACTIONS(1084), - [anon_sym_return] = ACTIONS(1084), - [anon_sym_break] = ACTIONS(1084), - [anon_sym_continue] = ACTIONS(1084), - [anon_sym_goto] = ACTIONS(1084), - [anon_sym_DASH_DASH] = ACTIONS(1086), - [anon_sym_PLUS_PLUS] = ACTIONS(1086), - [anon_sym_sizeof] = ACTIONS(1084), - [sym_number_literal] = ACTIONS(1086), - [anon_sym_L_SQUOTE] = ACTIONS(1086), - [anon_sym_u_SQUOTE] = ACTIONS(1086), - [anon_sym_U_SQUOTE] = ACTIONS(1086), - [anon_sym_u8_SQUOTE] = ACTIONS(1086), - [anon_sym_SQUOTE] = ACTIONS(1086), - [anon_sym_L_DQUOTE] = ACTIONS(1086), - [anon_sym_u_DQUOTE] = ACTIONS(1086), - [anon_sym_U_DQUOTE] = ACTIONS(1086), - [anon_sym_u8_DQUOTE] = ACTIONS(1086), - [anon_sym_DQUOTE] = ACTIONS(1086), - [sym_true] = ACTIONS(1084), - [sym_false] = ACTIONS(1084), - [sym_null] = ACTIONS(1084), - [sym_comment] = ACTIONS(3), - }, - [117] = { - [sym_identifier] = ACTIONS(1088), - [aux_sym_preproc_include_token1] = ACTIONS(1088), - [aux_sym_preproc_def_token1] = ACTIONS(1088), - [aux_sym_preproc_if_token1] = ACTIONS(1088), - [aux_sym_preproc_if_token2] = ACTIONS(1088), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1088), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1088), - [aux_sym_preproc_else_token1] = ACTIONS(1088), - [aux_sym_preproc_elif_token1] = ACTIONS(1088), - [sym_preproc_directive] = ACTIONS(1088), - [anon_sym_LPAREN2] = ACTIONS(1090), - [anon_sym_BANG] = ACTIONS(1090), - [anon_sym_TILDE] = ACTIONS(1090), - [anon_sym_DASH] = ACTIONS(1088), - [anon_sym_PLUS] = ACTIONS(1088), - [anon_sym_STAR] = ACTIONS(1090), - [anon_sym_AMP] = ACTIONS(1090), - [anon_sym_SEMI] = ACTIONS(1090), - [anon_sym_typedef] = ACTIONS(1088), - [anon_sym_extern] = ACTIONS(1088), - [anon_sym___attribute__] = ACTIONS(1088), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1090), - [anon_sym___declspec] = ACTIONS(1088), - [anon_sym___cdecl] = ACTIONS(1088), - [anon_sym___clrcall] = ACTIONS(1088), - [anon_sym___stdcall] = ACTIONS(1088), - [anon_sym___fastcall] = ACTIONS(1088), - [anon_sym___thiscall] = ACTIONS(1088), - [anon_sym___vectorcall] = ACTIONS(1088), - [anon_sym_LBRACE] = ACTIONS(1090), - [anon_sym_static] = ACTIONS(1088), - [anon_sym_auto] = ACTIONS(1088), - [anon_sym_register] = ACTIONS(1088), - [anon_sym_inline] = ACTIONS(1088), - [anon_sym_const] = ACTIONS(1088), - [anon_sym_volatile] = ACTIONS(1088), - [anon_sym_restrict] = ACTIONS(1088), - [anon_sym__Atomic] = ACTIONS(1088), - [anon_sym_signed] = ACTIONS(1088), - [anon_sym_unsigned] = ACTIONS(1088), - [anon_sym_long] = ACTIONS(1088), - [anon_sym_short] = ACTIONS(1088), - [sym_primitive_type] = ACTIONS(1088), - [anon_sym_enum] = ACTIONS(1088), - [anon_sym_struct] = ACTIONS(1088), - [anon_sym_union] = ACTIONS(1088), - [anon_sym_if] = ACTIONS(1088), - [anon_sym_switch] = ACTIONS(1088), - [anon_sym_case] = ACTIONS(1088), - [anon_sym_default] = ACTIONS(1088), - [anon_sym_while] = ACTIONS(1088), - [anon_sym_do] = ACTIONS(1088), - [anon_sym_for] = ACTIONS(1088), - [anon_sym_return] = ACTIONS(1088), - [anon_sym_break] = ACTIONS(1088), - [anon_sym_continue] = ACTIONS(1088), - [anon_sym_goto] = ACTIONS(1088), - [anon_sym_DASH_DASH] = ACTIONS(1090), - [anon_sym_PLUS_PLUS] = ACTIONS(1090), - [anon_sym_sizeof] = ACTIONS(1088), - [sym_number_literal] = ACTIONS(1090), - [anon_sym_L_SQUOTE] = ACTIONS(1090), - [anon_sym_u_SQUOTE] = ACTIONS(1090), - [anon_sym_U_SQUOTE] = ACTIONS(1090), - [anon_sym_u8_SQUOTE] = ACTIONS(1090), - [anon_sym_SQUOTE] = ACTIONS(1090), - [anon_sym_L_DQUOTE] = ACTIONS(1090), - [anon_sym_u_DQUOTE] = ACTIONS(1090), - [anon_sym_U_DQUOTE] = ACTIONS(1090), - [anon_sym_u8_DQUOTE] = ACTIONS(1090), - [anon_sym_DQUOTE] = ACTIONS(1090), - [sym_true] = ACTIONS(1088), - [sym_false] = ACTIONS(1088), - [sym_null] = ACTIONS(1088), - [sym_comment] = ACTIONS(3), - }, - [118] = { - [sym_identifier] = ACTIONS(1092), - [aux_sym_preproc_include_token1] = ACTIONS(1092), - [aux_sym_preproc_def_token1] = ACTIONS(1092), - [aux_sym_preproc_if_token1] = ACTIONS(1092), - [aux_sym_preproc_if_token2] = ACTIONS(1092), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1092), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1092), - [aux_sym_preproc_else_token1] = ACTIONS(1092), - [aux_sym_preproc_elif_token1] = ACTIONS(1092), - [sym_preproc_directive] = ACTIONS(1092), - [anon_sym_LPAREN2] = ACTIONS(1094), - [anon_sym_BANG] = ACTIONS(1094), - [anon_sym_TILDE] = ACTIONS(1094), - [anon_sym_DASH] = ACTIONS(1092), - [anon_sym_PLUS] = ACTIONS(1092), - [anon_sym_STAR] = ACTIONS(1094), - [anon_sym_AMP] = ACTIONS(1094), - [anon_sym_SEMI] = ACTIONS(1094), - [anon_sym_typedef] = ACTIONS(1092), - [anon_sym_extern] = ACTIONS(1092), - [anon_sym___attribute__] = ACTIONS(1092), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1094), - [anon_sym___declspec] = ACTIONS(1092), - [anon_sym___cdecl] = ACTIONS(1092), - [anon_sym___clrcall] = ACTIONS(1092), - [anon_sym___stdcall] = ACTIONS(1092), - [anon_sym___fastcall] = ACTIONS(1092), - [anon_sym___thiscall] = ACTIONS(1092), - [anon_sym___vectorcall] = ACTIONS(1092), - [anon_sym_LBRACE] = ACTIONS(1094), - [anon_sym_static] = ACTIONS(1092), - [anon_sym_auto] = ACTIONS(1092), - [anon_sym_register] = ACTIONS(1092), - [anon_sym_inline] = ACTIONS(1092), - [anon_sym_const] = ACTIONS(1092), - [anon_sym_volatile] = ACTIONS(1092), - [anon_sym_restrict] = ACTIONS(1092), - [anon_sym__Atomic] = ACTIONS(1092), - [anon_sym_signed] = ACTIONS(1092), - [anon_sym_unsigned] = ACTIONS(1092), - [anon_sym_long] = ACTIONS(1092), - [anon_sym_short] = ACTIONS(1092), - [sym_primitive_type] = ACTIONS(1092), - [anon_sym_enum] = ACTIONS(1092), - [anon_sym_struct] = ACTIONS(1092), - [anon_sym_union] = ACTIONS(1092), - [anon_sym_if] = ACTIONS(1092), - [anon_sym_switch] = ACTIONS(1092), - [anon_sym_case] = ACTIONS(1092), - [anon_sym_default] = ACTIONS(1092), - [anon_sym_while] = ACTIONS(1092), - [anon_sym_do] = ACTIONS(1092), - [anon_sym_for] = ACTIONS(1092), - [anon_sym_return] = ACTIONS(1092), - [anon_sym_break] = ACTIONS(1092), - [anon_sym_continue] = ACTIONS(1092), - [anon_sym_goto] = ACTIONS(1092), - [anon_sym_DASH_DASH] = ACTIONS(1094), - [anon_sym_PLUS_PLUS] = ACTIONS(1094), - [anon_sym_sizeof] = ACTIONS(1092), - [sym_number_literal] = ACTIONS(1094), - [anon_sym_L_SQUOTE] = ACTIONS(1094), - [anon_sym_u_SQUOTE] = ACTIONS(1094), - [anon_sym_U_SQUOTE] = ACTIONS(1094), - [anon_sym_u8_SQUOTE] = ACTIONS(1094), - [anon_sym_SQUOTE] = ACTIONS(1094), - [anon_sym_L_DQUOTE] = ACTIONS(1094), - [anon_sym_u_DQUOTE] = ACTIONS(1094), - [anon_sym_U_DQUOTE] = ACTIONS(1094), - [anon_sym_u8_DQUOTE] = ACTIONS(1094), - [anon_sym_DQUOTE] = ACTIONS(1094), - [sym_true] = ACTIONS(1092), - [sym_false] = ACTIONS(1092), - [sym_null] = ACTIONS(1092), - [sym_comment] = ACTIONS(3), - }, - [119] = { - [sym_identifier] = ACTIONS(1096), - [aux_sym_preproc_include_token1] = ACTIONS(1096), - [aux_sym_preproc_def_token1] = ACTIONS(1096), - [aux_sym_preproc_if_token1] = ACTIONS(1096), - [aux_sym_preproc_if_token2] = ACTIONS(1096), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1096), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1096), - [aux_sym_preproc_else_token1] = ACTIONS(1096), - [aux_sym_preproc_elif_token1] = ACTIONS(1096), - [sym_preproc_directive] = ACTIONS(1096), - [anon_sym_LPAREN2] = ACTIONS(1098), - [anon_sym_BANG] = ACTIONS(1098), - [anon_sym_TILDE] = ACTIONS(1098), - [anon_sym_DASH] = ACTIONS(1096), - [anon_sym_PLUS] = ACTIONS(1096), - [anon_sym_STAR] = ACTIONS(1098), - [anon_sym_AMP] = ACTIONS(1098), - [anon_sym_SEMI] = ACTIONS(1098), - [anon_sym_typedef] = ACTIONS(1096), - [anon_sym_extern] = ACTIONS(1096), - [anon_sym___attribute__] = ACTIONS(1096), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1098), - [anon_sym___declspec] = ACTIONS(1096), - [anon_sym___cdecl] = ACTIONS(1096), - [anon_sym___clrcall] = ACTIONS(1096), - [anon_sym___stdcall] = ACTIONS(1096), - [anon_sym___fastcall] = ACTIONS(1096), - [anon_sym___thiscall] = ACTIONS(1096), - [anon_sym___vectorcall] = ACTIONS(1096), - [anon_sym_LBRACE] = ACTIONS(1098), - [anon_sym_static] = ACTIONS(1096), - [anon_sym_auto] = ACTIONS(1096), - [anon_sym_register] = ACTIONS(1096), - [anon_sym_inline] = ACTIONS(1096), - [anon_sym_const] = ACTIONS(1096), - [anon_sym_volatile] = ACTIONS(1096), - [anon_sym_restrict] = ACTIONS(1096), - [anon_sym__Atomic] = ACTIONS(1096), - [anon_sym_signed] = ACTIONS(1096), - [anon_sym_unsigned] = ACTIONS(1096), - [anon_sym_long] = ACTIONS(1096), - [anon_sym_short] = ACTIONS(1096), - [sym_primitive_type] = ACTIONS(1096), - [anon_sym_enum] = ACTIONS(1096), - [anon_sym_struct] = ACTIONS(1096), - [anon_sym_union] = ACTIONS(1096), - [anon_sym_if] = ACTIONS(1096), - [anon_sym_switch] = ACTIONS(1096), - [anon_sym_case] = ACTIONS(1096), - [anon_sym_default] = ACTIONS(1096), - [anon_sym_while] = ACTIONS(1096), - [anon_sym_do] = ACTIONS(1096), - [anon_sym_for] = ACTIONS(1096), - [anon_sym_return] = ACTIONS(1096), - [anon_sym_break] = ACTIONS(1096), - [anon_sym_continue] = ACTIONS(1096), - [anon_sym_goto] = ACTIONS(1096), - [anon_sym_DASH_DASH] = ACTIONS(1098), - [anon_sym_PLUS_PLUS] = ACTIONS(1098), - [anon_sym_sizeof] = ACTIONS(1096), - [sym_number_literal] = ACTIONS(1098), - [anon_sym_L_SQUOTE] = ACTIONS(1098), - [anon_sym_u_SQUOTE] = ACTIONS(1098), - [anon_sym_U_SQUOTE] = ACTIONS(1098), - [anon_sym_u8_SQUOTE] = ACTIONS(1098), - [anon_sym_SQUOTE] = ACTIONS(1098), - [anon_sym_L_DQUOTE] = ACTIONS(1098), - [anon_sym_u_DQUOTE] = ACTIONS(1098), - [anon_sym_U_DQUOTE] = ACTIONS(1098), - [anon_sym_u8_DQUOTE] = ACTIONS(1098), - [anon_sym_DQUOTE] = ACTIONS(1098), - [sym_true] = ACTIONS(1096), - [sym_false] = ACTIONS(1096), - [sym_null] = ACTIONS(1096), - [sym_comment] = ACTIONS(3), - }, - [120] = { - [sym_identifier] = ACTIONS(1100), - [aux_sym_preproc_include_token1] = ACTIONS(1100), - [aux_sym_preproc_def_token1] = ACTIONS(1100), - [aux_sym_preproc_if_token1] = ACTIONS(1100), - [aux_sym_preproc_if_token2] = ACTIONS(1100), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1100), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1100), - [aux_sym_preproc_else_token1] = ACTIONS(1100), - [aux_sym_preproc_elif_token1] = ACTIONS(1100), - [sym_preproc_directive] = ACTIONS(1100), - [anon_sym_LPAREN2] = ACTIONS(1102), - [anon_sym_BANG] = ACTIONS(1102), - [anon_sym_TILDE] = ACTIONS(1102), - [anon_sym_DASH] = ACTIONS(1100), - [anon_sym_PLUS] = ACTIONS(1100), - [anon_sym_STAR] = ACTIONS(1102), - [anon_sym_AMP] = ACTIONS(1102), - [anon_sym_SEMI] = ACTIONS(1102), - [anon_sym_typedef] = ACTIONS(1100), - [anon_sym_extern] = ACTIONS(1100), - [anon_sym___attribute__] = ACTIONS(1100), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1102), - [anon_sym___declspec] = ACTIONS(1100), - [anon_sym___cdecl] = ACTIONS(1100), - [anon_sym___clrcall] = ACTIONS(1100), - [anon_sym___stdcall] = ACTIONS(1100), - [anon_sym___fastcall] = ACTIONS(1100), - [anon_sym___thiscall] = ACTIONS(1100), - [anon_sym___vectorcall] = ACTIONS(1100), - [anon_sym_LBRACE] = ACTIONS(1102), - [anon_sym_static] = ACTIONS(1100), - [anon_sym_auto] = ACTIONS(1100), - [anon_sym_register] = ACTIONS(1100), - [anon_sym_inline] = ACTIONS(1100), - [anon_sym_const] = ACTIONS(1100), - [anon_sym_volatile] = ACTIONS(1100), - [anon_sym_restrict] = ACTIONS(1100), - [anon_sym__Atomic] = ACTIONS(1100), - [anon_sym_signed] = ACTIONS(1100), - [anon_sym_unsigned] = ACTIONS(1100), - [anon_sym_long] = ACTIONS(1100), - [anon_sym_short] = ACTIONS(1100), - [sym_primitive_type] = ACTIONS(1100), - [anon_sym_enum] = ACTIONS(1100), - [anon_sym_struct] = ACTIONS(1100), - [anon_sym_union] = ACTIONS(1100), - [anon_sym_if] = ACTIONS(1100), - [anon_sym_switch] = ACTIONS(1100), - [anon_sym_case] = ACTIONS(1100), - [anon_sym_default] = ACTIONS(1100), - [anon_sym_while] = ACTIONS(1100), - [anon_sym_do] = ACTIONS(1100), - [anon_sym_for] = ACTIONS(1100), - [anon_sym_return] = ACTIONS(1100), - [anon_sym_break] = ACTIONS(1100), - [anon_sym_continue] = ACTIONS(1100), - [anon_sym_goto] = ACTIONS(1100), - [anon_sym_DASH_DASH] = ACTIONS(1102), - [anon_sym_PLUS_PLUS] = ACTIONS(1102), - [anon_sym_sizeof] = ACTIONS(1100), - [sym_number_literal] = ACTIONS(1102), - [anon_sym_L_SQUOTE] = ACTIONS(1102), - [anon_sym_u_SQUOTE] = ACTIONS(1102), - [anon_sym_U_SQUOTE] = ACTIONS(1102), - [anon_sym_u8_SQUOTE] = ACTIONS(1102), - [anon_sym_SQUOTE] = ACTIONS(1102), - [anon_sym_L_DQUOTE] = ACTIONS(1102), - [anon_sym_u_DQUOTE] = ACTIONS(1102), - [anon_sym_U_DQUOTE] = ACTIONS(1102), - [anon_sym_u8_DQUOTE] = ACTIONS(1102), - [anon_sym_DQUOTE] = ACTIONS(1102), - [sym_true] = ACTIONS(1100), - [sym_false] = ACTIONS(1100), - [sym_null] = ACTIONS(1100), - [sym_comment] = ACTIONS(3), - }, - [121] = { - [sym_identifier] = ACTIONS(1104), - [aux_sym_preproc_include_token1] = ACTIONS(1104), - [aux_sym_preproc_def_token1] = ACTIONS(1104), - [aux_sym_preproc_if_token1] = ACTIONS(1104), - [aux_sym_preproc_if_token2] = ACTIONS(1104), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1104), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1104), - [aux_sym_preproc_else_token1] = ACTIONS(1104), - [aux_sym_preproc_elif_token1] = ACTIONS(1104), - [sym_preproc_directive] = ACTIONS(1104), - [anon_sym_LPAREN2] = ACTIONS(1106), - [anon_sym_BANG] = ACTIONS(1106), - [anon_sym_TILDE] = ACTIONS(1106), - [anon_sym_DASH] = ACTIONS(1104), - [anon_sym_PLUS] = ACTIONS(1104), - [anon_sym_STAR] = ACTIONS(1106), - [anon_sym_AMP] = ACTIONS(1106), - [anon_sym_SEMI] = ACTIONS(1106), - [anon_sym_typedef] = ACTIONS(1104), - [anon_sym_extern] = ACTIONS(1104), - [anon_sym___attribute__] = ACTIONS(1104), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1106), - [anon_sym___declspec] = ACTIONS(1104), - [anon_sym___cdecl] = ACTIONS(1104), - [anon_sym___clrcall] = ACTIONS(1104), - [anon_sym___stdcall] = ACTIONS(1104), - [anon_sym___fastcall] = ACTIONS(1104), - [anon_sym___thiscall] = ACTIONS(1104), - [anon_sym___vectorcall] = ACTIONS(1104), - [anon_sym_LBRACE] = ACTIONS(1106), - [anon_sym_static] = ACTIONS(1104), - [anon_sym_auto] = ACTIONS(1104), - [anon_sym_register] = ACTIONS(1104), - [anon_sym_inline] = ACTIONS(1104), - [anon_sym_const] = ACTIONS(1104), - [anon_sym_volatile] = ACTIONS(1104), - [anon_sym_restrict] = ACTIONS(1104), - [anon_sym__Atomic] = ACTIONS(1104), - [anon_sym_signed] = ACTIONS(1104), - [anon_sym_unsigned] = ACTIONS(1104), - [anon_sym_long] = ACTIONS(1104), - [anon_sym_short] = ACTIONS(1104), - [sym_primitive_type] = ACTIONS(1104), - [anon_sym_enum] = ACTIONS(1104), - [anon_sym_struct] = ACTIONS(1104), - [anon_sym_union] = ACTIONS(1104), - [anon_sym_if] = ACTIONS(1104), - [anon_sym_switch] = ACTIONS(1104), - [anon_sym_case] = ACTIONS(1104), - [anon_sym_default] = ACTIONS(1104), - [anon_sym_while] = ACTIONS(1104), - [anon_sym_do] = ACTIONS(1104), - [anon_sym_for] = ACTIONS(1104), - [anon_sym_return] = ACTIONS(1104), - [anon_sym_break] = ACTIONS(1104), - [anon_sym_continue] = ACTIONS(1104), - [anon_sym_goto] = ACTIONS(1104), - [anon_sym_DASH_DASH] = ACTIONS(1106), - [anon_sym_PLUS_PLUS] = ACTIONS(1106), - [anon_sym_sizeof] = ACTIONS(1104), - [sym_number_literal] = ACTIONS(1106), - [anon_sym_L_SQUOTE] = ACTIONS(1106), - [anon_sym_u_SQUOTE] = ACTIONS(1106), - [anon_sym_U_SQUOTE] = ACTIONS(1106), - [anon_sym_u8_SQUOTE] = ACTIONS(1106), - [anon_sym_SQUOTE] = ACTIONS(1106), - [anon_sym_L_DQUOTE] = ACTIONS(1106), - [anon_sym_u_DQUOTE] = ACTIONS(1106), - [anon_sym_U_DQUOTE] = ACTIONS(1106), - [anon_sym_u8_DQUOTE] = ACTIONS(1106), - [anon_sym_DQUOTE] = ACTIONS(1106), - [sym_true] = ACTIONS(1104), - [sym_false] = ACTIONS(1104), - [sym_null] = ACTIONS(1104), - [sym_comment] = ACTIONS(3), - }, - [122] = { - [sym_identifier] = ACTIONS(1108), - [aux_sym_preproc_include_token1] = ACTIONS(1108), - [aux_sym_preproc_def_token1] = ACTIONS(1108), - [aux_sym_preproc_if_token1] = ACTIONS(1108), - [aux_sym_preproc_if_token2] = ACTIONS(1108), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1108), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1108), - [aux_sym_preproc_else_token1] = ACTIONS(1108), - [aux_sym_preproc_elif_token1] = ACTIONS(1108), - [sym_preproc_directive] = ACTIONS(1108), - [anon_sym_LPAREN2] = ACTIONS(1110), - [anon_sym_BANG] = ACTIONS(1110), - [anon_sym_TILDE] = ACTIONS(1110), - [anon_sym_DASH] = ACTIONS(1108), - [anon_sym_PLUS] = ACTIONS(1108), - [anon_sym_STAR] = ACTIONS(1110), - [anon_sym_AMP] = ACTIONS(1110), - [anon_sym_SEMI] = ACTIONS(1110), - [anon_sym_typedef] = ACTIONS(1108), - [anon_sym_extern] = ACTIONS(1108), - [anon_sym___attribute__] = ACTIONS(1108), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1110), - [anon_sym___declspec] = ACTIONS(1108), - [anon_sym___cdecl] = ACTIONS(1108), - [anon_sym___clrcall] = ACTIONS(1108), - [anon_sym___stdcall] = ACTIONS(1108), - [anon_sym___fastcall] = ACTIONS(1108), - [anon_sym___thiscall] = ACTIONS(1108), - [anon_sym___vectorcall] = ACTIONS(1108), - [anon_sym_LBRACE] = ACTIONS(1110), - [anon_sym_static] = ACTIONS(1108), - [anon_sym_auto] = ACTIONS(1108), - [anon_sym_register] = ACTIONS(1108), - [anon_sym_inline] = ACTIONS(1108), - [anon_sym_const] = ACTIONS(1108), - [anon_sym_volatile] = ACTIONS(1108), - [anon_sym_restrict] = ACTIONS(1108), - [anon_sym__Atomic] = ACTIONS(1108), - [anon_sym_signed] = ACTIONS(1108), - [anon_sym_unsigned] = ACTIONS(1108), - [anon_sym_long] = ACTIONS(1108), - [anon_sym_short] = ACTIONS(1108), - [sym_primitive_type] = ACTIONS(1108), - [anon_sym_enum] = ACTIONS(1108), - [anon_sym_struct] = ACTIONS(1108), - [anon_sym_union] = ACTIONS(1108), - [anon_sym_if] = ACTIONS(1108), - [anon_sym_switch] = ACTIONS(1108), - [anon_sym_case] = ACTIONS(1108), - [anon_sym_default] = ACTIONS(1108), - [anon_sym_while] = ACTIONS(1108), - [anon_sym_do] = ACTIONS(1108), - [anon_sym_for] = ACTIONS(1108), - [anon_sym_return] = ACTIONS(1108), - [anon_sym_break] = ACTIONS(1108), - [anon_sym_continue] = ACTIONS(1108), - [anon_sym_goto] = ACTIONS(1108), - [anon_sym_DASH_DASH] = ACTIONS(1110), - [anon_sym_PLUS_PLUS] = ACTIONS(1110), - [anon_sym_sizeof] = ACTIONS(1108), - [sym_number_literal] = ACTIONS(1110), - [anon_sym_L_SQUOTE] = ACTIONS(1110), - [anon_sym_u_SQUOTE] = ACTIONS(1110), - [anon_sym_U_SQUOTE] = ACTIONS(1110), - [anon_sym_u8_SQUOTE] = ACTIONS(1110), - [anon_sym_SQUOTE] = ACTIONS(1110), - [anon_sym_L_DQUOTE] = ACTIONS(1110), - [anon_sym_u_DQUOTE] = ACTIONS(1110), - [anon_sym_U_DQUOTE] = ACTIONS(1110), - [anon_sym_u8_DQUOTE] = ACTIONS(1110), - [anon_sym_DQUOTE] = ACTIONS(1110), - [sym_true] = ACTIONS(1108), - [sym_false] = ACTIONS(1108), - [sym_null] = ACTIONS(1108), - [sym_comment] = ACTIONS(3), - }, - [123] = { - [sym_identifier] = ACTIONS(1112), - [aux_sym_preproc_include_token1] = ACTIONS(1112), - [aux_sym_preproc_def_token1] = ACTIONS(1112), - [aux_sym_preproc_if_token1] = ACTIONS(1112), - [aux_sym_preproc_if_token2] = ACTIONS(1112), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1112), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1112), - [aux_sym_preproc_else_token1] = ACTIONS(1112), - [aux_sym_preproc_elif_token1] = ACTIONS(1112), - [sym_preproc_directive] = ACTIONS(1112), - [anon_sym_LPAREN2] = ACTIONS(1114), - [anon_sym_BANG] = ACTIONS(1114), - [anon_sym_TILDE] = ACTIONS(1114), - [anon_sym_DASH] = ACTIONS(1112), - [anon_sym_PLUS] = ACTIONS(1112), - [anon_sym_STAR] = ACTIONS(1114), - [anon_sym_AMP] = ACTIONS(1114), - [anon_sym_SEMI] = ACTIONS(1114), - [anon_sym_typedef] = ACTIONS(1112), - [anon_sym_extern] = ACTIONS(1112), - [anon_sym___attribute__] = ACTIONS(1112), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1114), - [anon_sym___declspec] = ACTIONS(1112), - [anon_sym___cdecl] = ACTIONS(1112), - [anon_sym___clrcall] = ACTIONS(1112), - [anon_sym___stdcall] = ACTIONS(1112), - [anon_sym___fastcall] = ACTIONS(1112), - [anon_sym___thiscall] = ACTIONS(1112), - [anon_sym___vectorcall] = ACTIONS(1112), - [anon_sym_LBRACE] = ACTIONS(1114), - [anon_sym_static] = ACTIONS(1112), - [anon_sym_auto] = ACTIONS(1112), - [anon_sym_register] = ACTIONS(1112), - [anon_sym_inline] = ACTIONS(1112), - [anon_sym_const] = ACTIONS(1112), - [anon_sym_volatile] = ACTIONS(1112), - [anon_sym_restrict] = ACTIONS(1112), - [anon_sym__Atomic] = ACTIONS(1112), - [anon_sym_signed] = ACTIONS(1112), - [anon_sym_unsigned] = ACTIONS(1112), - [anon_sym_long] = ACTIONS(1112), - [anon_sym_short] = ACTIONS(1112), - [sym_primitive_type] = ACTIONS(1112), - [anon_sym_enum] = ACTIONS(1112), - [anon_sym_struct] = ACTIONS(1112), - [anon_sym_union] = ACTIONS(1112), - [anon_sym_if] = ACTIONS(1112), - [anon_sym_switch] = ACTIONS(1112), - [anon_sym_case] = ACTIONS(1112), - [anon_sym_default] = ACTIONS(1112), - [anon_sym_while] = ACTIONS(1112), - [anon_sym_do] = ACTIONS(1112), - [anon_sym_for] = ACTIONS(1112), - [anon_sym_return] = ACTIONS(1112), - [anon_sym_break] = ACTIONS(1112), - [anon_sym_continue] = ACTIONS(1112), - [anon_sym_goto] = ACTIONS(1112), - [anon_sym_DASH_DASH] = ACTIONS(1114), - [anon_sym_PLUS_PLUS] = ACTIONS(1114), - [anon_sym_sizeof] = ACTIONS(1112), - [sym_number_literal] = ACTIONS(1114), - [anon_sym_L_SQUOTE] = ACTIONS(1114), - [anon_sym_u_SQUOTE] = ACTIONS(1114), - [anon_sym_U_SQUOTE] = ACTIONS(1114), - [anon_sym_u8_SQUOTE] = ACTIONS(1114), - [anon_sym_SQUOTE] = ACTIONS(1114), - [anon_sym_L_DQUOTE] = ACTIONS(1114), - [anon_sym_u_DQUOTE] = ACTIONS(1114), - [anon_sym_U_DQUOTE] = ACTIONS(1114), - [anon_sym_u8_DQUOTE] = ACTIONS(1114), - [anon_sym_DQUOTE] = ACTIONS(1114), - [sym_true] = ACTIONS(1112), - [sym_false] = ACTIONS(1112), - [sym_null] = ACTIONS(1112), - [sym_comment] = ACTIONS(3), - }, - [124] = { - [sym_identifier] = ACTIONS(1116), - [aux_sym_preproc_include_token1] = ACTIONS(1116), - [aux_sym_preproc_def_token1] = ACTIONS(1116), - [aux_sym_preproc_if_token1] = ACTIONS(1116), - [aux_sym_preproc_if_token2] = ACTIONS(1116), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1116), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1116), - [aux_sym_preproc_else_token1] = ACTIONS(1116), - [aux_sym_preproc_elif_token1] = ACTIONS(1116), - [sym_preproc_directive] = ACTIONS(1116), - [anon_sym_LPAREN2] = ACTIONS(1118), - [anon_sym_BANG] = ACTIONS(1118), - [anon_sym_TILDE] = ACTIONS(1118), - [anon_sym_DASH] = ACTIONS(1116), - [anon_sym_PLUS] = ACTIONS(1116), - [anon_sym_STAR] = ACTIONS(1118), - [anon_sym_AMP] = ACTIONS(1118), - [anon_sym_SEMI] = ACTIONS(1118), - [anon_sym_typedef] = ACTIONS(1116), - [anon_sym_extern] = ACTIONS(1116), - [anon_sym___attribute__] = ACTIONS(1116), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1118), - [anon_sym___declspec] = ACTIONS(1116), - [anon_sym___cdecl] = ACTIONS(1116), - [anon_sym___clrcall] = ACTIONS(1116), - [anon_sym___stdcall] = ACTIONS(1116), - [anon_sym___fastcall] = ACTIONS(1116), - [anon_sym___thiscall] = ACTIONS(1116), - [anon_sym___vectorcall] = ACTIONS(1116), - [anon_sym_LBRACE] = ACTIONS(1118), - [anon_sym_static] = ACTIONS(1116), - [anon_sym_auto] = ACTIONS(1116), - [anon_sym_register] = ACTIONS(1116), - [anon_sym_inline] = ACTIONS(1116), - [anon_sym_const] = ACTIONS(1116), - [anon_sym_volatile] = ACTIONS(1116), - [anon_sym_restrict] = ACTIONS(1116), - [anon_sym__Atomic] = ACTIONS(1116), - [anon_sym_signed] = ACTIONS(1116), - [anon_sym_unsigned] = ACTIONS(1116), - [anon_sym_long] = ACTIONS(1116), - [anon_sym_short] = ACTIONS(1116), - [sym_primitive_type] = ACTIONS(1116), - [anon_sym_enum] = ACTIONS(1116), - [anon_sym_struct] = ACTIONS(1116), - [anon_sym_union] = ACTIONS(1116), - [anon_sym_if] = ACTIONS(1116), - [anon_sym_switch] = ACTIONS(1116), - [anon_sym_case] = ACTIONS(1116), - [anon_sym_default] = ACTIONS(1116), - [anon_sym_while] = ACTIONS(1116), - [anon_sym_do] = ACTIONS(1116), - [anon_sym_for] = ACTIONS(1116), - [anon_sym_return] = ACTIONS(1116), - [anon_sym_break] = ACTIONS(1116), - [anon_sym_continue] = ACTIONS(1116), - [anon_sym_goto] = ACTIONS(1116), - [anon_sym_DASH_DASH] = ACTIONS(1118), - [anon_sym_PLUS_PLUS] = ACTIONS(1118), - [anon_sym_sizeof] = ACTIONS(1116), - [sym_number_literal] = ACTIONS(1118), - [anon_sym_L_SQUOTE] = ACTIONS(1118), - [anon_sym_u_SQUOTE] = ACTIONS(1118), - [anon_sym_U_SQUOTE] = ACTIONS(1118), - [anon_sym_u8_SQUOTE] = ACTIONS(1118), - [anon_sym_SQUOTE] = ACTIONS(1118), - [anon_sym_L_DQUOTE] = ACTIONS(1118), - [anon_sym_u_DQUOTE] = ACTIONS(1118), - [anon_sym_U_DQUOTE] = ACTIONS(1118), - [anon_sym_u8_DQUOTE] = ACTIONS(1118), - [anon_sym_DQUOTE] = ACTIONS(1118), - [sym_true] = ACTIONS(1116), - [sym_false] = ACTIONS(1116), - [sym_null] = ACTIONS(1116), - [sym_comment] = ACTIONS(3), - }, - [125] = { - [sym_identifier] = ACTIONS(1120), - [aux_sym_preproc_include_token1] = ACTIONS(1120), - [aux_sym_preproc_def_token1] = ACTIONS(1120), - [aux_sym_preproc_if_token1] = ACTIONS(1120), - [aux_sym_preproc_if_token2] = ACTIONS(1120), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1120), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1120), - [aux_sym_preproc_else_token1] = ACTIONS(1120), - [aux_sym_preproc_elif_token1] = ACTIONS(1120), - [sym_preproc_directive] = ACTIONS(1120), - [anon_sym_LPAREN2] = ACTIONS(1122), - [anon_sym_BANG] = ACTIONS(1122), - [anon_sym_TILDE] = ACTIONS(1122), - [anon_sym_DASH] = ACTIONS(1120), - [anon_sym_PLUS] = ACTIONS(1120), - [anon_sym_STAR] = ACTIONS(1122), - [anon_sym_AMP] = ACTIONS(1122), - [anon_sym_SEMI] = ACTIONS(1122), - [anon_sym_typedef] = ACTIONS(1120), - [anon_sym_extern] = ACTIONS(1120), - [anon_sym___attribute__] = ACTIONS(1120), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1122), - [anon_sym___declspec] = ACTIONS(1120), - [anon_sym___cdecl] = ACTIONS(1120), - [anon_sym___clrcall] = ACTIONS(1120), - [anon_sym___stdcall] = ACTIONS(1120), - [anon_sym___fastcall] = ACTIONS(1120), - [anon_sym___thiscall] = ACTIONS(1120), - [anon_sym___vectorcall] = ACTIONS(1120), - [anon_sym_LBRACE] = ACTIONS(1122), - [anon_sym_static] = ACTIONS(1120), - [anon_sym_auto] = ACTIONS(1120), - [anon_sym_register] = ACTIONS(1120), - [anon_sym_inline] = ACTIONS(1120), - [anon_sym_const] = ACTIONS(1120), - [anon_sym_volatile] = ACTIONS(1120), - [anon_sym_restrict] = ACTIONS(1120), - [anon_sym__Atomic] = ACTIONS(1120), - [anon_sym_signed] = ACTIONS(1120), - [anon_sym_unsigned] = ACTIONS(1120), - [anon_sym_long] = ACTIONS(1120), - [anon_sym_short] = ACTIONS(1120), - [sym_primitive_type] = ACTIONS(1120), - [anon_sym_enum] = ACTIONS(1120), - [anon_sym_struct] = ACTIONS(1120), - [anon_sym_union] = ACTIONS(1120), - [anon_sym_if] = ACTIONS(1120), - [anon_sym_switch] = ACTIONS(1120), - [anon_sym_case] = ACTIONS(1120), - [anon_sym_default] = ACTIONS(1120), - [anon_sym_while] = ACTIONS(1120), - [anon_sym_do] = ACTIONS(1120), - [anon_sym_for] = ACTIONS(1120), - [anon_sym_return] = ACTIONS(1120), - [anon_sym_break] = ACTIONS(1120), - [anon_sym_continue] = ACTIONS(1120), - [anon_sym_goto] = ACTIONS(1120), - [anon_sym_DASH_DASH] = ACTIONS(1122), - [anon_sym_PLUS_PLUS] = ACTIONS(1122), - [anon_sym_sizeof] = ACTIONS(1120), - [sym_number_literal] = ACTIONS(1122), - [anon_sym_L_SQUOTE] = ACTIONS(1122), - [anon_sym_u_SQUOTE] = ACTIONS(1122), - [anon_sym_U_SQUOTE] = ACTIONS(1122), - [anon_sym_u8_SQUOTE] = ACTIONS(1122), - [anon_sym_SQUOTE] = ACTIONS(1122), - [anon_sym_L_DQUOTE] = ACTIONS(1122), - [anon_sym_u_DQUOTE] = ACTIONS(1122), - [anon_sym_U_DQUOTE] = ACTIONS(1122), - [anon_sym_u8_DQUOTE] = ACTIONS(1122), - [anon_sym_DQUOTE] = ACTIONS(1122), - [sym_true] = ACTIONS(1120), - [sym_false] = ACTIONS(1120), - [sym_null] = ACTIONS(1120), - [sym_comment] = ACTIONS(3), - }, - [126] = { - [sym_attribute_declaration] = STATE(242), - [sym_compound_statement] = STATE(267), - [sym_attributed_statement] = STATE(267), - [sym_labeled_statement] = STATE(267), - [sym_expression_statement] = STATE(267), - [sym_if_statement] = STATE(267), - [sym_switch_statement] = STATE(267), - [sym_case_statement] = STATE(267), - [sym_while_statement] = STATE(267), - [sym_do_statement] = STATE(267), - [sym_for_statement] = STATE(267), - [sym_return_statement] = STATE(267), - [sym_break_statement] = STATE(267), - [sym_continue_statement] = STATE(267), - [sym_goto_statement] = STATE(267), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [sym_identifier] = ACTIONS(1124), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [127] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(193), - [sym_attributed_statement] = STATE(193), - [sym_labeled_statement] = STATE(193), - [sym_expression_statement] = STATE(193), - [sym_if_statement] = STATE(193), - [sym_switch_statement] = STATE(193), - [sym_case_statement] = STATE(193), - [sym_while_statement] = STATE(193), - [sym_do_statement] = STATE(193), - [sym_for_statement] = STATE(193), - [sym_return_statement] = STATE(193), - [sym_break_statement] = STATE(193), - [sym_continue_statement] = STATE(193), - [sym_goto_statement] = STATE(193), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [128] = { - [ts_builtin_sym_end] = ACTIONS(1002), - [sym_identifier] = ACTIONS(1000), - [aux_sym_preproc_include_token1] = ACTIONS(1000), - [aux_sym_preproc_def_token1] = ACTIONS(1000), - [aux_sym_preproc_if_token1] = ACTIONS(1000), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1000), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1000), - [sym_preproc_directive] = ACTIONS(1000), - [anon_sym_LPAREN2] = ACTIONS(1002), - [anon_sym_BANG] = ACTIONS(1002), - [anon_sym_TILDE] = ACTIONS(1002), - [anon_sym_DASH] = ACTIONS(1000), - [anon_sym_PLUS] = ACTIONS(1000), - [anon_sym_STAR] = ACTIONS(1002), - [anon_sym_AMP] = ACTIONS(1002), - [anon_sym_SEMI] = ACTIONS(1002), - [anon_sym_typedef] = ACTIONS(1000), - [anon_sym_extern] = ACTIONS(1000), - [anon_sym___attribute__] = ACTIONS(1000), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1002), - [anon_sym___declspec] = ACTIONS(1000), - [anon_sym___cdecl] = ACTIONS(1000), - [anon_sym___clrcall] = ACTIONS(1000), - [anon_sym___stdcall] = ACTIONS(1000), - [anon_sym___fastcall] = ACTIONS(1000), - [anon_sym___thiscall] = ACTIONS(1000), - [anon_sym___vectorcall] = ACTIONS(1000), - [anon_sym_LBRACE] = ACTIONS(1002), - [anon_sym_static] = ACTIONS(1000), - [anon_sym_auto] = ACTIONS(1000), - [anon_sym_register] = ACTIONS(1000), - [anon_sym_inline] = ACTIONS(1000), - [anon_sym_const] = ACTIONS(1000), - [anon_sym_volatile] = ACTIONS(1000), - [anon_sym_restrict] = ACTIONS(1000), - [anon_sym__Atomic] = ACTIONS(1000), - [anon_sym_signed] = ACTIONS(1000), - [anon_sym_unsigned] = ACTIONS(1000), - [anon_sym_long] = ACTIONS(1000), - [anon_sym_short] = ACTIONS(1000), - [sym_primitive_type] = ACTIONS(1000), - [anon_sym_enum] = ACTIONS(1000), - [anon_sym_struct] = ACTIONS(1000), - [anon_sym_union] = ACTIONS(1000), - [anon_sym_if] = ACTIONS(1000), - [anon_sym_else] = ACTIONS(1000), - [anon_sym_switch] = ACTIONS(1000), - [anon_sym_case] = ACTIONS(1000), - [anon_sym_default] = ACTIONS(1000), - [anon_sym_while] = ACTIONS(1000), - [anon_sym_do] = ACTIONS(1000), - [anon_sym_for] = ACTIONS(1000), - [anon_sym_return] = ACTIONS(1000), - [anon_sym_break] = ACTIONS(1000), - [anon_sym_continue] = ACTIONS(1000), - [anon_sym_goto] = ACTIONS(1000), - [anon_sym_DASH_DASH] = ACTIONS(1002), - [anon_sym_PLUS_PLUS] = ACTIONS(1002), - [anon_sym_sizeof] = ACTIONS(1000), - [sym_number_literal] = ACTIONS(1002), - [anon_sym_L_SQUOTE] = ACTIONS(1002), - [anon_sym_u_SQUOTE] = ACTIONS(1002), - [anon_sym_U_SQUOTE] = ACTIONS(1002), - [anon_sym_u8_SQUOTE] = ACTIONS(1002), - [anon_sym_SQUOTE] = ACTIONS(1002), - [anon_sym_L_DQUOTE] = ACTIONS(1002), - [anon_sym_u_DQUOTE] = ACTIONS(1002), - [anon_sym_U_DQUOTE] = ACTIONS(1002), - [anon_sym_u8_DQUOTE] = ACTIONS(1002), - [anon_sym_DQUOTE] = ACTIONS(1002), - [sym_true] = ACTIONS(1000), - [sym_false] = ACTIONS(1000), - [sym_null] = ACTIONS(1000), - [sym_comment] = ACTIONS(3), - }, - [129] = { - [sym_identifier] = ACTIONS(948), - [aux_sym_preproc_include_token1] = ACTIONS(948), - [aux_sym_preproc_def_token1] = ACTIONS(948), - [aux_sym_preproc_if_token1] = ACTIONS(948), - [aux_sym_preproc_if_token2] = ACTIONS(948), - [aux_sym_preproc_ifdef_token1] = ACTIONS(948), - [aux_sym_preproc_ifdef_token2] = ACTIONS(948), - [sym_preproc_directive] = ACTIONS(948), - [anon_sym_LPAREN2] = ACTIONS(950), - [anon_sym_BANG] = ACTIONS(950), - [anon_sym_TILDE] = ACTIONS(950), - [anon_sym_DASH] = ACTIONS(948), - [anon_sym_PLUS] = ACTIONS(948), - [anon_sym_STAR] = ACTIONS(950), - [anon_sym_AMP] = ACTIONS(950), - [anon_sym_SEMI] = ACTIONS(950), - [anon_sym_typedef] = ACTIONS(948), - [anon_sym_extern] = ACTIONS(948), - [anon_sym___attribute__] = ACTIONS(948), - [anon_sym_LBRACK_LBRACK] = ACTIONS(950), - [anon_sym___declspec] = ACTIONS(948), - [anon_sym___cdecl] = ACTIONS(948), - [anon_sym___clrcall] = ACTIONS(948), - [anon_sym___stdcall] = ACTIONS(948), - [anon_sym___fastcall] = ACTIONS(948), - [anon_sym___thiscall] = ACTIONS(948), - [anon_sym___vectorcall] = ACTIONS(948), - [anon_sym_LBRACE] = ACTIONS(950), - [anon_sym_static] = ACTIONS(948), - [anon_sym_auto] = ACTIONS(948), - [anon_sym_register] = ACTIONS(948), - [anon_sym_inline] = ACTIONS(948), - [anon_sym_const] = ACTIONS(948), - [anon_sym_volatile] = ACTIONS(948), - [anon_sym_restrict] = ACTIONS(948), - [anon_sym__Atomic] = ACTIONS(948), - [anon_sym_signed] = ACTIONS(948), - [anon_sym_unsigned] = ACTIONS(948), - [anon_sym_long] = ACTIONS(948), - [anon_sym_short] = ACTIONS(948), - [sym_primitive_type] = ACTIONS(948), - [anon_sym_enum] = ACTIONS(948), - [anon_sym_struct] = ACTIONS(948), - [anon_sym_union] = ACTIONS(948), - [anon_sym_if] = ACTIONS(948), - [anon_sym_else] = ACTIONS(948), - [anon_sym_switch] = ACTIONS(948), - [anon_sym_case] = ACTIONS(948), - [anon_sym_default] = ACTIONS(948), - [anon_sym_while] = ACTIONS(948), - [anon_sym_do] = ACTIONS(948), - [anon_sym_for] = ACTIONS(948), - [anon_sym_return] = ACTIONS(948), - [anon_sym_break] = ACTIONS(948), - [anon_sym_continue] = ACTIONS(948), - [anon_sym_goto] = ACTIONS(948), - [anon_sym_DASH_DASH] = ACTIONS(950), - [anon_sym_PLUS_PLUS] = ACTIONS(950), - [anon_sym_sizeof] = ACTIONS(948), - [sym_number_literal] = ACTIONS(950), - [anon_sym_L_SQUOTE] = ACTIONS(950), - [anon_sym_u_SQUOTE] = ACTIONS(950), - [anon_sym_U_SQUOTE] = ACTIONS(950), - [anon_sym_u8_SQUOTE] = ACTIONS(950), - [anon_sym_SQUOTE] = ACTIONS(950), - [anon_sym_L_DQUOTE] = ACTIONS(950), - [anon_sym_u_DQUOTE] = ACTIONS(950), - [anon_sym_U_DQUOTE] = ACTIONS(950), - [anon_sym_u8_DQUOTE] = ACTIONS(950), - [anon_sym_DQUOTE] = ACTIONS(950), - [sym_true] = ACTIONS(948), - [sym_false] = ACTIONS(948), - [sym_null] = ACTIONS(948), - [sym_comment] = ACTIONS(3), - }, - [130] = { - [sym_identifier] = ACTIONS(910), - [aux_sym_preproc_include_token1] = ACTIONS(910), - [aux_sym_preproc_def_token1] = ACTIONS(910), - [aux_sym_preproc_if_token1] = ACTIONS(910), - [aux_sym_preproc_if_token2] = ACTIONS(910), - [aux_sym_preproc_ifdef_token1] = ACTIONS(910), - [aux_sym_preproc_ifdef_token2] = ACTIONS(910), - [sym_preproc_directive] = ACTIONS(910), - [anon_sym_LPAREN2] = ACTIONS(912), - [anon_sym_BANG] = ACTIONS(912), - [anon_sym_TILDE] = ACTIONS(912), - [anon_sym_DASH] = ACTIONS(910), - [anon_sym_PLUS] = ACTIONS(910), - [anon_sym_STAR] = ACTIONS(912), - [anon_sym_AMP] = ACTIONS(912), - [anon_sym_SEMI] = ACTIONS(912), - [anon_sym_typedef] = ACTIONS(910), - [anon_sym_extern] = ACTIONS(910), - [anon_sym___attribute__] = ACTIONS(910), - [anon_sym_LBRACK_LBRACK] = ACTIONS(912), - [anon_sym___declspec] = ACTIONS(910), - [anon_sym___cdecl] = ACTIONS(910), - [anon_sym___clrcall] = ACTIONS(910), - [anon_sym___stdcall] = ACTIONS(910), - [anon_sym___fastcall] = ACTIONS(910), - [anon_sym___thiscall] = ACTIONS(910), - [anon_sym___vectorcall] = ACTIONS(910), - [anon_sym_LBRACE] = ACTIONS(912), - [anon_sym_static] = ACTIONS(910), - [anon_sym_auto] = ACTIONS(910), - [anon_sym_register] = ACTIONS(910), - [anon_sym_inline] = ACTIONS(910), - [anon_sym_const] = ACTIONS(910), - [anon_sym_volatile] = ACTIONS(910), - [anon_sym_restrict] = ACTIONS(910), - [anon_sym__Atomic] = ACTIONS(910), - [anon_sym_signed] = ACTIONS(910), - [anon_sym_unsigned] = ACTIONS(910), - [anon_sym_long] = ACTIONS(910), - [anon_sym_short] = ACTIONS(910), - [sym_primitive_type] = ACTIONS(910), - [anon_sym_enum] = ACTIONS(910), - [anon_sym_struct] = ACTIONS(910), - [anon_sym_union] = ACTIONS(910), - [anon_sym_if] = ACTIONS(910), - [anon_sym_else] = ACTIONS(910), - [anon_sym_switch] = ACTIONS(910), - [anon_sym_case] = ACTIONS(910), - [anon_sym_default] = ACTIONS(910), - [anon_sym_while] = ACTIONS(910), - [anon_sym_do] = ACTIONS(910), - [anon_sym_for] = ACTIONS(910), - [anon_sym_return] = ACTIONS(910), - [anon_sym_break] = ACTIONS(910), - [anon_sym_continue] = ACTIONS(910), - [anon_sym_goto] = ACTIONS(910), - [anon_sym_DASH_DASH] = ACTIONS(912), - [anon_sym_PLUS_PLUS] = ACTIONS(912), - [anon_sym_sizeof] = ACTIONS(910), - [sym_number_literal] = ACTIONS(912), - [anon_sym_L_SQUOTE] = ACTIONS(912), - [anon_sym_u_SQUOTE] = ACTIONS(912), - [anon_sym_U_SQUOTE] = ACTIONS(912), - [anon_sym_u8_SQUOTE] = ACTIONS(912), - [anon_sym_SQUOTE] = ACTIONS(912), - [anon_sym_L_DQUOTE] = ACTIONS(912), - [anon_sym_u_DQUOTE] = ACTIONS(912), - [anon_sym_U_DQUOTE] = ACTIONS(912), - [anon_sym_u8_DQUOTE] = ACTIONS(912), - [anon_sym_DQUOTE] = ACTIONS(912), - [sym_true] = ACTIONS(910), - [sym_false] = ACTIONS(910), - [sym_null] = ACTIONS(910), - [sym_comment] = ACTIONS(3), - }, - [131] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(1454), - [sym_attributed_statement] = STATE(1454), - [sym_labeled_statement] = STATE(1454), - [sym_expression_statement] = STATE(1454), - [sym_if_statement] = STATE(1454), - [sym_switch_statement] = STATE(1454), - [sym_case_statement] = STATE(1454), - [sym_while_statement] = STATE(1454), - [sym_do_statement] = STATE(1454), - [sym_for_statement] = STATE(1454), - [sym_return_statement] = STATE(1454), - [sym_break_statement] = STATE(1454), - [sym_continue_statement] = STATE(1454), - [sym_goto_statement] = STATE(1454), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [132] = { - [ts_builtin_sym_end] = ACTIONS(930), - [sym_identifier] = ACTIONS(928), - [aux_sym_preproc_include_token1] = ACTIONS(928), - [aux_sym_preproc_def_token1] = ACTIONS(928), - [aux_sym_preproc_if_token1] = ACTIONS(928), - [aux_sym_preproc_ifdef_token1] = ACTIONS(928), - [aux_sym_preproc_ifdef_token2] = ACTIONS(928), - [sym_preproc_directive] = ACTIONS(928), - [anon_sym_LPAREN2] = ACTIONS(930), - [anon_sym_BANG] = ACTIONS(930), - [anon_sym_TILDE] = ACTIONS(930), - [anon_sym_DASH] = ACTIONS(928), - [anon_sym_PLUS] = ACTIONS(928), - [anon_sym_STAR] = ACTIONS(930), - [anon_sym_AMP] = ACTIONS(930), - [anon_sym_SEMI] = ACTIONS(930), - [anon_sym_typedef] = ACTIONS(928), - [anon_sym_extern] = ACTIONS(928), - [anon_sym___attribute__] = ACTIONS(928), - [anon_sym_LBRACK_LBRACK] = ACTIONS(930), - [anon_sym___declspec] = ACTIONS(928), - [anon_sym___cdecl] = ACTIONS(928), - [anon_sym___clrcall] = ACTIONS(928), - [anon_sym___stdcall] = ACTIONS(928), - [anon_sym___fastcall] = ACTIONS(928), - [anon_sym___thiscall] = ACTIONS(928), - [anon_sym___vectorcall] = ACTIONS(928), - [anon_sym_LBRACE] = ACTIONS(930), - [anon_sym_static] = ACTIONS(928), - [anon_sym_auto] = ACTIONS(928), - [anon_sym_register] = ACTIONS(928), - [anon_sym_inline] = ACTIONS(928), - [anon_sym_const] = ACTIONS(928), - [anon_sym_volatile] = ACTIONS(928), - [anon_sym_restrict] = ACTIONS(928), - [anon_sym__Atomic] = ACTIONS(928), - [anon_sym_signed] = ACTIONS(928), - [anon_sym_unsigned] = ACTIONS(928), - [anon_sym_long] = ACTIONS(928), - [anon_sym_short] = ACTIONS(928), - [sym_primitive_type] = ACTIONS(928), - [anon_sym_enum] = ACTIONS(928), - [anon_sym_struct] = ACTIONS(928), - [anon_sym_union] = ACTIONS(928), - [anon_sym_if] = ACTIONS(928), - [anon_sym_else] = ACTIONS(928), - [anon_sym_switch] = ACTIONS(928), - [anon_sym_case] = ACTIONS(928), - [anon_sym_default] = ACTIONS(928), - [anon_sym_while] = ACTIONS(928), - [anon_sym_do] = ACTIONS(928), - [anon_sym_for] = ACTIONS(928), - [anon_sym_return] = ACTIONS(928), - [anon_sym_break] = ACTIONS(928), - [anon_sym_continue] = ACTIONS(928), - [anon_sym_goto] = ACTIONS(928), - [anon_sym_DASH_DASH] = ACTIONS(930), - [anon_sym_PLUS_PLUS] = ACTIONS(930), - [anon_sym_sizeof] = ACTIONS(928), - [sym_number_literal] = ACTIONS(930), - [anon_sym_L_SQUOTE] = ACTIONS(930), - [anon_sym_u_SQUOTE] = ACTIONS(930), - [anon_sym_U_SQUOTE] = ACTIONS(930), - [anon_sym_u8_SQUOTE] = ACTIONS(930), - [anon_sym_SQUOTE] = ACTIONS(930), - [anon_sym_L_DQUOTE] = ACTIONS(930), - [anon_sym_u_DQUOTE] = ACTIONS(930), - [anon_sym_U_DQUOTE] = ACTIONS(930), - [anon_sym_u8_DQUOTE] = ACTIONS(930), - [anon_sym_DQUOTE] = ACTIONS(930), - [sym_true] = ACTIONS(928), - [sym_false] = ACTIONS(928), - [sym_null] = ACTIONS(928), - [sym_comment] = ACTIONS(3), - }, - [133] = { - [sym_identifier] = ACTIONS(906), - [aux_sym_preproc_include_token1] = ACTIONS(906), - [aux_sym_preproc_def_token1] = ACTIONS(906), - [aux_sym_preproc_if_token1] = ACTIONS(906), - [aux_sym_preproc_if_token2] = ACTIONS(906), - [aux_sym_preproc_ifdef_token1] = ACTIONS(906), - [aux_sym_preproc_ifdef_token2] = ACTIONS(906), - [sym_preproc_directive] = ACTIONS(906), - [anon_sym_LPAREN2] = ACTIONS(908), - [anon_sym_BANG] = ACTIONS(908), - [anon_sym_TILDE] = ACTIONS(908), - [anon_sym_DASH] = ACTIONS(906), - [anon_sym_PLUS] = ACTIONS(906), - [anon_sym_STAR] = ACTIONS(908), - [anon_sym_AMP] = ACTIONS(908), - [anon_sym_SEMI] = ACTIONS(908), - [anon_sym_typedef] = ACTIONS(906), - [anon_sym_extern] = ACTIONS(906), - [anon_sym___attribute__] = ACTIONS(906), - [anon_sym_LBRACK_LBRACK] = ACTIONS(908), - [anon_sym___declspec] = ACTIONS(906), - [anon_sym___cdecl] = ACTIONS(906), - [anon_sym___clrcall] = ACTIONS(906), - [anon_sym___stdcall] = ACTIONS(906), - [anon_sym___fastcall] = ACTIONS(906), - [anon_sym___thiscall] = ACTIONS(906), - [anon_sym___vectorcall] = ACTIONS(906), - [anon_sym_LBRACE] = ACTIONS(908), - [anon_sym_static] = ACTIONS(906), - [anon_sym_auto] = ACTIONS(906), - [anon_sym_register] = ACTIONS(906), - [anon_sym_inline] = ACTIONS(906), - [anon_sym_const] = ACTIONS(906), - [anon_sym_volatile] = ACTIONS(906), - [anon_sym_restrict] = ACTIONS(906), - [anon_sym__Atomic] = ACTIONS(906), - [anon_sym_signed] = ACTIONS(906), - [anon_sym_unsigned] = ACTIONS(906), - [anon_sym_long] = ACTIONS(906), - [anon_sym_short] = ACTIONS(906), - [sym_primitive_type] = ACTIONS(906), - [anon_sym_enum] = ACTIONS(906), - [anon_sym_struct] = ACTIONS(906), - [anon_sym_union] = ACTIONS(906), - [anon_sym_if] = ACTIONS(906), - [anon_sym_else] = ACTIONS(906), - [anon_sym_switch] = ACTIONS(906), - [anon_sym_case] = ACTIONS(906), - [anon_sym_default] = ACTIONS(906), - [anon_sym_while] = ACTIONS(906), - [anon_sym_do] = ACTIONS(906), - [anon_sym_for] = ACTIONS(906), - [anon_sym_return] = ACTIONS(906), - [anon_sym_break] = ACTIONS(906), - [anon_sym_continue] = ACTIONS(906), - [anon_sym_goto] = ACTIONS(906), - [anon_sym_DASH_DASH] = ACTIONS(908), - [anon_sym_PLUS_PLUS] = ACTIONS(908), - [anon_sym_sizeof] = ACTIONS(906), - [sym_number_literal] = ACTIONS(908), - [anon_sym_L_SQUOTE] = ACTIONS(908), - [anon_sym_u_SQUOTE] = ACTIONS(908), - [anon_sym_U_SQUOTE] = ACTIONS(908), - [anon_sym_u8_SQUOTE] = ACTIONS(908), - [anon_sym_SQUOTE] = ACTIONS(908), - [anon_sym_L_DQUOTE] = ACTIONS(908), - [anon_sym_u_DQUOTE] = ACTIONS(908), - [anon_sym_U_DQUOTE] = ACTIONS(908), - [anon_sym_u8_DQUOTE] = ACTIONS(908), - [anon_sym_DQUOTE] = ACTIONS(908), - [sym_true] = ACTIONS(906), - [sym_false] = ACTIONS(906), - [sym_null] = ACTIONS(906), - [sym_comment] = ACTIONS(3), - }, - [134] = { - [sym_identifier] = ACTIONS(914), - [aux_sym_preproc_include_token1] = ACTIONS(914), - [aux_sym_preproc_def_token1] = ACTIONS(914), - [aux_sym_preproc_if_token1] = ACTIONS(914), - [aux_sym_preproc_if_token2] = ACTIONS(914), - [aux_sym_preproc_ifdef_token1] = ACTIONS(914), - [aux_sym_preproc_ifdef_token2] = ACTIONS(914), - [sym_preproc_directive] = ACTIONS(914), - [anon_sym_LPAREN2] = ACTIONS(916), - [anon_sym_BANG] = ACTIONS(916), - [anon_sym_TILDE] = ACTIONS(916), - [anon_sym_DASH] = ACTIONS(914), - [anon_sym_PLUS] = ACTIONS(914), - [anon_sym_STAR] = ACTIONS(916), - [anon_sym_AMP] = ACTIONS(916), - [anon_sym_SEMI] = ACTIONS(916), - [anon_sym_typedef] = ACTIONS(914), - [anon_sym_extern] = ACTIONS(914), - [anon_sym___attribute__] = ACTIONS(914), - [anon_sym_LBRACK_LBRACK] = ACTIONS(916), - [anon_sym___declspec] = ACTIONS(914), - [anon_sym___cdecl] = ACTIONS(914), - [anon_sym___clrcall] = ACTIONS(914), - [anon_sym___stdcall] = ACTIONS(914), - [anon_sym___fastcall] = ACTIONS(914), - [anon_sym___thiscall] = ACTIONS(914), - [anon_sym___vectorcall] = ACTIONS(914), - [anon_sym_LBRACE] = ACTIONS(916), - [anon_sym_static] = ACTIONS(914), - [anon_sym_auto] = ACTIONS(914), - [anon_sym_register] = ACTIONS(914), - [anon_sym_inline] = ACTIONS(914), - [anon_sym_const] = ACTIONS(914), - [anon_sym_volatile] = ACTIONS(914), - [anon_sym_restrict] = ACTIONS(914), - [anon_sym__Atomic] = ACTIONS(914), - [anon_sym_signed] = ACTIONS(914), - [anon_sym_unsigned] = ACTIONS(914), - [anon_sym_long] = ACTIONS(914), - [anon_sym_short] = ACTIONS(914), - [sym_primitive_type] = ACTIONS(914), - [anon_sym_enum] = ACTIONS(914), - [anon_sym_struct] = ACTIONS(914), - [anon_sym_union] = ACTIONS(914), - [anon_sym_if] = ACTIONS(914), - [anon_sym_else] = ACTIONS(1130), - [anon_sym_switch] = ACTIONS(914), - [anon_sym_case] = ACTIONS(914), - [anon_sym_default] = ACTIONS(914), - [anon_sym_while] = ACTIONS(914), - [anon_sym_do] = ACTIONS(914), - [anon_sym_for] = ACTIONS(914), - [anon_sym_return] = ACTIONS(914), - [anon_sym_break] = ACTIONS(914), - [anon_sym_continue] = ACTIONS(914), - [anon_sym_goto] = ACTIONS(914), - [anon_sym_DASH_DASH] = ACTIONS(916), - [anon_sym_PLUS_PLUS] = ACTIONS(916), - [anon_sym_sizeof] = ACTIONS(914), - [sym_number_literal] = ACTIONS(916), - [anon_sym_L_SQUOTE] = ACTIONS(916), - [anon_sym_u_SQUOTE] = ACTIONS(916), - [anon_sym_U_SQUOTE] = ACTIONS(916), - [anon_sym_u8_SQUOTE] = ACTIONS(916), - [anon_sym_SQUOTE] = ACTIONS(916), - [anon_sym_L_DQUOTE] = ACTIONS(916), - [anon_sym_u_DQUOTE] = ACTIONS(916), - [anon_sym_U_DQUOTE] = ACTIONS(916), - [anon_sym_u8_DQUOTE] = ACTIONS(916), - [anon_sym_DQUOTE] = ACTIONS(916), - [sym_true] = ACTIONS(914), - [sym_false] = ACTIONS(914), - [sym_null] = ACTIONS(914), - [sym_comment] = ACTIONS(3), - }, - [135] = { - [sym_identifier] = ACTIONS(920), - [aux_sym_preproc_include_token1] = ACTIONS(920), - [aux_sym_preproc_def_token1] = ACTIONS(920), - [aux_sym_preproc_if_token1] = ACTIONS(920), - [aux_sym_preproc_if_token2] = ACTIONS(920), - [aux_sym_preproc_ifdef_token1] = ACTIONS(920), - [aux_sym_preproc_ifdef_token2] = ACTIONS(920), - [sym_preproc_directive] = ACTIONS(920), - [anon_sym_LPAREN2] = ACTIONS(922), - [anon_sym_BANG] = ACTIONS(922), - [anon_sym_TILDE] = ACTIONS(922), - [anon_sym_DASH] = ACTIONS(920), - [anon_sym_PLUS] = ACTIONS(920), - [anon_sym_STAR] = ACTIONS(922), - [anon_sym_AMP] = ACTIONS(922), - [anon_sym_SEMI] = ACTIONS(922), - [anon_sym_typedef] = ACTIONS(920), - [anon_sym_extern] = ACTIONS(920), - [anon_sym___attribute__] = ACTIONS(920), - [anon_sym_LBRACK_LBRACK] = ACTIONS(922), - [anon_sym___declspec] = ACTIONS(920), - [anon_sym___cdecl] = ACTIONS(920), - [anon_sym___clrcall] = ACTIONS(920), - [anon_sym___stdcall] = ACTIONS(920), - [anon_sym___fastcall] = ACTIONS(920), - [anon_sym___thiscall] = ACTIONS(920), - [anon_sym___vectorcall] = ACTIONS(920), - [anon_sym_LBRACE] = ACTIONS(922), - [anon_sym_static] = ACTIONS(920), - [anon_sym_auto] = ACTIONS(920), - [anon_sym_register] = ACTIONS(920), - [anon_sym_inline] = ACTIONS(920), - [anon_sym_const] = ACTIONS(920), - [anon_sym_volatile] = ACTIONS(920), - [anon_sym_restrict] = ACTIONS(920), - [anon_sym__Atomic] = ACTIONS(920), - [anon_sym_signed] = ACTIONS(920), - [anon_sym_unsigned] = ACTIONS(920), - [anon_sym_long] = ACTIONS(920), - [anon_sym_short] = ACTIONS(920), - [sym_primitive_type] = ACTIONS(920), - [anon_sym_enum] = ACTIONS(920), - [anon_sym_struct] = ACTIONS(920), - [anon_sym_union] = ACTIONS(920), - [anon_sym_if] = ACTIONS(920), - [anon_sym_else] = ACTIONS(920), - [anon_sym_switch] = ACTIONS(920), - [anon_sym_case] = ACTIONS(920), - [anon_sym_default] = ACTIONS(920), - [anon_sym_while] = ACTIONS(920), - [anon_sym_do] = ACTIONS(920), - [anon_sym_for] = ACTIONS(920), - [anon_sym_return] = ACTIONS(920), - [anon_sym_break] = ACTIONS(920), - [anon_sym_continue] = ACTIONS(920), - [anon_sym_goto] = ACTIONS(920), - [anon_sym_DASH_DASH] = ACTIONS(922), - [anon_sym_PLUS_PLUS] = ACTIONS(922), - [anon_sym_sizeof] = ACTIONS(920), - [sym_number_literal] = ACTIONS(922), - [anon_sym_L_SQUOTE] = ACTIONS(922), - [anon_sym_u_SQUOTE] = ACTIONS(922), - [anon_sym_U_SQUOTE] = ACTIONS(922), - [anon_sym_u8_SQUOTE] = ACTIONS(922), - [anon_sym_SQUOTE] = ACTIONS(922), - [anon_sym_L_DQUOTE] = ACTIONS(922), - [anon_sym_u_DQUOTE] = ACTIONS(922), - [anon_sym_U_DQUOTE] = ACTIONS(922), - [anon_sym_u8_DQUOTE] = ACTIONS(922), - [anon_sym_DQUOTE] = ACTIONS(922), - [sym_true] = ACTIONS(920), - [sym_false] = ACTIONS(920), - [sym_null] = ACTIONS(920), - [sym_comment] = ACTIONS(3), - }, - [136] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(246), - [sym_attributed_statement] = STATE(246), - [sym_labeled_statement] = STATE(246), - [sym_expression_statement] = STATE(246), - [sym_if_statement] = STATE(246), - [sym_switch_statement] = STATE(246), - [sym_case_statement] = STATE(246), - [sym_while_statement] = STATE(246), - [sym_do_statement] = STATE(246), - [sym_for_statement] = STATE(246), - [sym_return_statement] = STATE(246), - [sym_break_statement] = STATE(246), - [sym_continue_statement] = STATE(246), - [sym_goto_statement] = STATE(246), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [137] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(174), - [sym_attributed_statement] = STATE(174), - [sym_labeled_statement] = STATE(174), - [sym_expression_statement] = STATE(174), - [sym_if_statement] = STATE(174), - [sym_switch_statement] = STATE(174), - [sym_case_statement] = STATE(174), - [sym_while_statement] = STATE(174), - [sym_do_statement] = STATE(174), - [sym_for_statement] = STATE(174), - [sym_return_statement] = STATE(174), - [sym_break_statement] = STATE(174), - [sym_continue_statement] = STATE(174), - [sym_goto_statement] = STATE(174), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [138] = { - [ts_builtin_sym_end] = ACTIONS(926), - [sym_identifier] = ACTIONS(924), - [aux_sym_preproc_include_token1] = ACTIONS(924), - [aux_sym_preproc_def_token1] = ACTIONS(924), - [aux_sym_preproc_if_token1] = ACTIONS(924), - [aux_sym_preproc_ifdef_token1] = ACTIONS(924), - [aux_sym_preproc_ifdef_token2] = ACTIONS(924), - [sym_preproc_directive] = ACTIONS(924), - [anon_sym_LPAREN2] = ACTIONS(926), - [anon_sym_BANG] = ACTIONS(926), - [anon_sym_TILDE] = ACTIONS(926), - [anon_sym_DASH] = ACTIONS(924), - [anon_sym_PLUS] = ACTIONS(924), - [anon_sym_STAR] = ACTIONS(926), - [anon_sym_AMP] = ACTIONS(926), - [anon_sym_SEMI] = ACTIONS(926), - [anon_sym_typedef] = ACTIONS(924), - [anon_sym_extern] = ACTIONS(924), - [anon_sym___attribute__] = ACTIONS(924), - [anon_sym_LBRACK_LBRACK] = ACTIONS(926), - [anon_sym___declspec] = ACTIONS(924), - [anon_sym___cdecl] = ACTIONS(924), - [anon_sym___clrcall] = ACTIONS(924), - [anon_sym___stdcall] = ACTIONS(924), - [anon_sym___fastcall] = ACTIONS(924), - [anon_sym___thiscall] = ACTIONS(924), - [anon_sym___vectorcall] = ACTIONS(924), - [anon_sym_LBRACE] = ACTIONS(926), - [anon_sym_static] = ACTIONS(924), - [anon_sym_auto] = ACTIONS(924), - [anon_sym_register] = ACTIONS(924), - [anon_sym_inline] = ACTIONS(924), - [anon_sym_const] = ACTIONS(924), - [anon_sym_volatile] = ACTIONS(924), - [anon_sym_restrict] = ACTIONS(924), - [anon_sym__Atomic] = ACTIONS(924), - [anon_sym_signed] = ACTIONS(924), - [anon_sym_unsigned] = ACTIONS(924), - [anon_sym_long] = ACTIONS(924), - [anon_sym_short] = ACTIONS(924), - [sym_primitive_type] = ACTIONS(924), - [anon_sym_enum] = ACTIONS(924), - [anon_sym_struct] = ACTIONS(924), - [anon_sym_union] = ACTIONS(924), - [anon_sym_if] = ACTIONS(924), - [anon_sym_else] = ACTIONS(924), - [anon_sym_switch] = ACTIONS(924), - [anon_sym_case] = ACTIONS(924), - [anon_sym_default] = ACTIONS(924), - [anon_sym_while] = ACTIONS(924), - [anon_sym_do] = ACTIONS(924), - [anon_sym_for] = ACTIONS(924), - [anon_sym_return] = ACTIONS(924), - [anon_sym_break] = ACTIONS(924), - [anon_sym_continue] = ACTIONS(924), - [anon_sym_goto] = ACTIONS(924), - [anon_sym_DASH_DASH] = ACTIONS(926), - [anon_sym_PLUS_PLUS] = ACTIONS(926), - [anon_sym_sizeof] = ACTIONS(924), - [sym_number_literal] = ACTIONS(926), - [anon_sym_L_SQUOTE] = ACTIONS(926), - [anon_sym_u_SQUOTE] = ACTIONS(926), - [anon_sym_U_SQUOTE] = ACTIONS(926), - [anon_sym_u8_SQUOTE] = ACTIONS(926), - [anon_sym_SQUOTE] = ACTIONS(926), - [anon_sym_L_DQUOTE] = ACTIONS(926), - [anon_sym_u_DQUOTE] = ACTIONS(926), - [anon_sym_U_DQUOTE] = ACTIONS(926), - [anon_sym_u8_DQUOTE] = ACTIONS(926), - [anon_sym_DQUOTE] = ACTIONS(926), - [sym_true] = ACTIONS(924), - [sym_false] = ACTIONS(924), - [sym_null] = ACTIONS(924), - [sym_comment] = ACTIONS(3), - }, - [139] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(1445), - [sym_attributed_statement] = STATE(1445), - [sym_labeled_statement] = STATE(1445), - [sym_expression_statement] = STATE(1445), - [sym_if_statement] = STATE(1445), - [sym_switch_statement] = STATE(1445), - [sym_case_statement] = STATE(1445), - [sym_while_statement] = STATE(1445), - [sym_do_statement] = STATE(1445), - [sym_for_statement] = STATE(1445), - [sym_return_statement] = STATE(1445), - [sym_break_statement] = STATE(1445), - [sym_continue_statement] = STATE(1445), - [sym_goto_statement] = STATE(1445), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [140] = { - [sym_attribute_declaration] = STATE(140), - [sym_compound_statement] = STATE(141), - [sym_attributed_statement] = STATE(141), - [sym_labeled_statement] = STATE(141), - [sym_expression_statement] = STATE(141), - [sym_if_statement] = STATE(141), - [sym_switch_statement] = STATE(141), - [sym_case_statement] = STATE(141), - [sym_while_statement] = STATE(141), - [sym_do_statement] = STATE(141), - [sym_for_statement] = STATE(141), - [sym_return_statement] = STATE(141), - [sym_break_statement] = STATE(141), - [sym_continue_statement] = STATE(141), - [sym_goto_statement] = STATE(141), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(140), - [sym_identifier] = ACTIONS(1132), - [anon_sym_LPAREN2] = ACTIONS(1135), - [anon_sym_BANG] = ACTIONS(1138), - [anon_sym_TILDE] = ACTIONS(1138), - [anon_sym_DASH] = ACTIONS(1141), - [anon_sym_PLUS] = ACTIONS(1141), - [anon_sym_STAR] = ACTIONS(1144), - [anon_sym_AMP] = ACTIONS(1144), - [anon_sym_SEMI] = ACTIONS(1147), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1150), - [anon_sym_LBRACE] = ACTIONS(1153), - [anon_sym_if] = ACTIONS(1156), - [anon_sym_switch] = ACTIONS(1159), - [anon_sym_case] = ACTIONS(1162), - [anon_sym_default] = ACTIONS(1165), - [anon_sym_while] = ACTIONS(1168), - [anon_sym_do] = ACTIONS(1171), - [anon_sym_for] = ACTIONS(1174), - [anon_sym_return] = ACTIONS(1177), - [anon_sym_break] = ACTIONS(1180), - [anon_sym_continue] = ACTIONS(1183), - [anon_sym_goto] = ACTIONS(1186), - [anon_sym_DASH_DASH] = ACTIONS(1189), - [anon_sym_PLUS_PLUS] = ACTIONS(1189), - [anon_sym_sizeof] = ACTIONS(1192), - [sym_number_literal] = ACTIONS(1195), - [anon_sym_L_SQUOTE] = ACTIONS(1198), - [anon_sym_u_SQUOTE] = ACTIONS(1198), - [anon_sym_U_SQUOTE] = ACTIONS(1198), - [anon_sym_u8_SQUOTE] = ACTIONS(1198), - [anon_sym_SQUOTE] = ACTIONS(1198), - [anon_sym_L_DQUOTE] = ACTIONS(1201), - [anon_sym_u_DQUOTE] = ACTIONS(1201), - [anon_sym_U_DQUOTE] = ACTIONS(1201), - [anon_sym_u8_DQUOTE] = ACTIONS(1201), - [anon_sym_DQUOTE] = ACTIONS(1201), - [sym_true] = ACTIONS(1204), - [sym_false] = ACTIONS(1204), - [sym_null] = ACTIONS(1204), - [sym_comment] = ACTIONS(3), - }, - [141] = { - [sym_identifier] = ACTIONS(944), - [aux_sym_preproc_include_token1] = ACTIONS(944), - [aux_sym_preproc_def_token1] = ACTIONS(944), - [aux_sym_preproc_if_token1] = ACTIONS(944), - [aux_sym_preproc_if_token2] = ACTIONS(944), - [aux_sym_preproc_ifdef_token1] = ACTIONS(944), - [aux_sym_preproc_ifdef_token2] = ACTIONS(944), - [sym_preproc_directive] = ACTIONS(944), - [anon_sym_LPAREN2] = ACTIONS(946), - [anon_sym_BANG] = ACTIONS(946), - [anon_sym_TILDE] = ACTIONS(946), - [anon_sym_DASH] = ACTIONS(944), - [anon_sym_PLUS] = ACTIONS(944), - [anon_sym_STAR] = ACTIONS(946), - [anon_sym_AMP] = ACTIONS(946), - [anon_sym_SEMI] = ACTIONS(946), - [anon_sym_typedef] = ACTIONS(944), - [anon_sym_extern] = ACTIONS(944), - [anon_sym___attribute__] = ACTIONS(944), - [anon_sym_LBRACK_LBRACK] = ACTIONS(946), - [anon_sym___declspec] = ACTIONS(944), - [anon_sym___cdecl] = ACTIONS(944), - [anon_sym___clrcall] = ACTIONS(944), - [anon_sym___stdcall] = ACTIONS(944), - [anon_sym___fastcall] = ACTIONS(944), - [anon_sym___thiscall] = ACTIONS(944), - [anon_sym___vectorcall] = ACTIONS(944), - [anon_sym_LBRACE] = ACTIONS(946), - [anon_sym_static] = ACTIONS(944), - [anon_sym_auto] = ACTIONS(944), - [anon_sym_register] = ACTIONS(944), - [anon_sym_inline] = ACTIONS(944), - [anon_sym_const] = ACTIONS(944), - [anon_sym_volatile] = ACTIONS(944), - [anon_sym_restrict] = ACTIONS(944), - [anon_sym__Atomic] = ACTIONS(944), - [anon_sym_signed] = ACTIONS(944), - [anon_sym_unsigned] = ACTIONS(944), - [anon_sym_long] = ACTIONS(944), - [anon_sym_short] = ACTIONS(944), - [sym_primitive_type] = ACTIONS(944), - [anon_sym_enum] = ACTIONS(944), - [anon_sym_struct] = ACTIONS(944), - [anon_sym_union] = ACTIONS(944), - [anon_sym_if] = ACTIONS(944), - [anon_sym_else] = ACTIONS(944), - [anon_sym_switch] = ACTIONS(944), - [anon_sym_case] = ACTIONS(944), - [anon_sym_default] = ACTIONS(944), - [anon_sym_while] = ACTIONS(944), - [anon_sym_do] = ACTIONS(944), - [anon_sym_for] = ACTIONS(944), - [anon_sym_return] = ACTIONS(944), - [anon_sym_break] = ACTIONS(944), - [anon_sym_continue] = ACTIONS(944), - [anon_sym_goto] = ACTIONS(944), - [anon_sym_DASH_DASH] = ACTIONS(946), - [anon_sym_PLUS_PLUS] = ACTIONS(946), - [anon_sym_sizeof] = ACTIONS(944), - [sym_number_literal] = ACTIONS(946), - [anon_sym_L_SQUOTE] = ACTIONS(946), - [anon_sym_u_SQUOTE] = ACTIONS(946), - [anon_sym_U_SQUOTE] = ACTIONS(946), - [anon_sym_u8_SQUOTE] = ACTIONS(946), - [anon_sym_SQUOTE] = ACTIONS(946), - [anon_sym_L_DQUOTE] = ACTIONS(946), - [anon_sym_u_DQUOTE] = ACTIONS(946), - [anon_sym_U_DQUOTE] = ACTIONS(946), - [anon_sym_u8_DQUOTE] = ACTIONS(946), - [anon_sym_DQUOTE] = ACTIONS(946), - [sym_true] = ACTIONS(944), - [sym_false] = ACTIONS(944), - [sym_null] = ACTIONS(944), - [sym_comment] = ACTIONS(3), - }, - [142] = { - [sym_identifier] = ACTIONS(984), - [aux_sym_preproc_include_token1] = ACTIONS(984), - [aux_sym_preproc_def_token1] = ACTIONS(984), - [aux_sym_preproc_if_token1] = ACTIONS(984), - [aux_sym_preproc_if_token2] = ACTIONS(984), - [aux_sym_preproc_ifdef_token1] = ACTIONS(984), - [aux_sym_preproc_ifdef_token2] = ACTIONS(984), - [sym_preproc_directive] = ACTIONS(984), - [anon_sym_LPAREN2] = ACTIONS(986), - [anon_sym_BANG] = ACTIONS(986), - [anon_sym_TILDE] = ACTIONS(986), - [anon_sym_DASH] = ACTIONS(984), - [anon_sym_PLUS] = ACTIONS(984), - [anon_sym_STAR] = ACTIONS(986), - [anon_sym_AMP] = ACTIONS(986), - [anon_sym_SEMI] = ACTIONS(986), - [anon_sym_typedef] = ACTIONS(984), - [anon_sym_extern] = ACTIONS(984), - [anon_sym___attribute__] = ACTIONS(984), - [anon_sym_LBRACK_LBRACK] = ACTIONS(986), - [anon_sym___declspec] = ACTIONS(984), - [anon_sym___cdecl] = ACTIONS(984), - [anon_sym___clrcall] = ACTIONS(984), - [anon_sym___stdcall] = ACTIONS(984), - [anon_sym___fastcall] = ACTIONS(984), - [anon_sym___thiscall] = ACTIONS(984), - [anon_sym___vectorcall] = ACTIONS(984), - [anon_sym_LBRACE] = ACTIONS(986), - [anon_sym_static] = ACTIONS(984), - [anon_sym_auto] = ACTIONS(984), - [anon_sym_register] = ACTIONS(984), - [anon_sym_inline] = ACTIONS(984), - [anon_sym_const] = ACTIONS(984), - [anon_sym_volatile] = ACTIONS(984), - [anon_sym_restrict] = ACTIONS(984), - [anon_sym__Atomic] = ACTIONS(984), - [anon_sym_signed] = ACTIONS(984), - [anon_sym_unsigned] = ACTIONS(984), - [anon_sym_long] = ACTIONS(984), - [anon_sym_short] = ACTIONS(984), - [sym_primitive_type] = ACTIONS(984), - [anon_sym_enum] = ACTIONS(984), - [anon_sym_struct] = ACTIONS(984), - [anon_sym_union] = ACTIONS(984), - [anon_sym_if] = ACTIONS(984), - [anon_sym_else] = ACTIONS(984), - [anon_sym_switch] = ACTIONS(984), - [anon_sym_case] = ACTIONS(984), - [anon_sym_default] = ACTIONS(984), - [anon_sym_while] = ACTIONS(984), - [anon_sym_do] = ACTIONS(984), - [anon_sym_for] = ACTIONS(984), - [anon_sym_return] = ACTIONS(984), - [anon_sym_break] = ACTIONS(984), - [anon_sym_continue] = ACTIONS(984), - [anon_sym_goto] = ACTIONS(984), - [anon_sym_DASH_DASH] = ACTIONS(986), - [anon_sym_PLUS_PLUS] = ACTIONS(986), - [anon_sym_sizeof] = ACTIONS(984), - [sym_number_literal] = ACTIONS(986), - [anon_sym_L_SQUOTE] = ACTIONS(986), - [anon_sym_u_SQUOTE] = ACTIONS(986), - [anon_sym_U_SQUOTE] = ACTIONS(986), - [anon_sym_u8_SQUOTE] = ACTIONS(986), - [anon_sym_SQUOTE] = ACTIONS(986), - [anon_sym_L_DQUOTE] = ACTIONS(986), - [anon_sym_u_DQUOTE] = ACTIONS(986), - [anon_sym_U_DQUOTE] = ACTIONS(986), - [anon_sym_u8_DQUOTE] = ACTIONS(986), - [anon_sym_DQUOTE] = ACTIONS(986), - [sym_true] = ACTIONS(984), - [sym_false] = ACTIONS(984), - [sym_null] = ACTIONS(984), - [sym_comment] = ACTIONS(3), - }, - [143] = { - [ts_builtin_sym_end] = ACTIONS(938), - [sym_identifier] = ACTIONS(936), - [aux_sym_preproc_include_token1] = ACTIONS(936), - [aux_sym_preproc_def_token1] = ACTIONS(936), - [aux_sym_preproc_if_token1] = ACTIONS(936), - [aux_sym_preproc_ifdef_token1] = ACTIONS(936), - [aux_sym_preproc_ifdef_token2] = ACTIONS(936), - [sym_preproc_directive] = ACTIONS(936), - [anon_sym_LPAREN2] = ACTIONS(938), - [anon_sym_BANG] = ACTIONS(938), - [anon_sym_TILDE] = ACTIONS(938), - [anon_sym_DASH] = ACTIONS(936), - [anon_sym_PLUS] = ACTIONS(936), - [anon_sym_STAR] = ACTIONS(938), - [anon_sym_AMP] = ACTIONS(938), - [anon_sym_SEMI] = ACTIONS(938), - [anon_sym_typedef] = ACTIONS(936), - [anon_sym_extern] = ACTIONS(936), - [anon_sym___attribute__] = ACTIONS(936), - [anon_sym_LBRACK_LBRACK] = ACTIONS(938), - [anon_sym___declspec] = ACTIONS(936), - [anon_sym___cdecl] = ACTIONS(936), - [anon_sym___clrcall] = ACTIONS(936), - [anon_sym___stdcall] = ACTIONS(936), - [anon_sym___fastcall] = ACTIONS(936), - [anon_sym___thiscall] = ACTIONS(936), - [anon_sym___vectorcall] = ACTIONS(936), - [anon_sym_LBRACE] = ACTIONS(938), - [anon_sym_static] = ACTIONS(936), - [anon_sym_auto] = ACTIONS(936), - [anon_sym_register] = ACTIONS(936), - [anon_sym_inline] = ACTIONS(936), - [anon_sym_const] = ACTIONS(936), - [anon_sym_volatile] = ACTIONS(936), - [anon_sym_restrict] = ACTIONS(936), - [anon_sym__Atomic] = ACTIONS(936), - [anon_sym_signed] = ACTIONS(936), - [anon_sym_unsigned] = ACTIONS(936), - [anon_sym_long] = ACTIONS(936), - [anon_sym_short] = ACTIONS(936), - [sym_primitive_type] = ACTIONS(936), - [anon_sym_enum] = ACTIONS(936), - [anon_sym_struct] = ACTIONS(936), - [anon_sym_union] = ACTIONS(936), - [anon_sym_if] = ACTIONS(936), - [anon_sym_else] = ACTIONS(936), - [anon_sym_switch] = ACTIONS(936), - [anon_sym_case] = ACTIONS(936), - [anon_sym_default] = ACTIONS(936), - [anon_sym_while] = ACTIONS(936), - [anon_sym_do] = ACTIONS(936), - [anon_sym_for] = ACTIONS(936), - [anon_sym_return] = ACTIONS(936), - [anon_sym_break] = ACTIONS(936), - [anon_sym_continue] = ACTIONS(936), - [anon_sym_goto] = ACTIONS(936), - [anon_sym_DASH_DASH] = ACTIONS(938), - [anon_sym_PLUS_PLUS] = ACTIONS(938), - [anon_sym_sizeof] = ACTIONS(936), - [sym_number_literal] = ACTIONS(938), - [anon_sym_L_SQUOTE] = ACTIONS(938), - [anon_sym_u_SQUOTE] = ACTIONS(938), - [anon_sym_U_SQUOTE] = ACTIONS(938), - [anon_sym_u8_SQUOTE] = ACTIONS(938), - [anon_sym_SQUOTE] = ACTIONS(938), - [anon_sym_L_DQUOTE] = ACTIONS(938), - [anon_sym_u_DQUOTE] = ACTIONS(938), - [anon_sym_U_DQUOTE] = ACTIONS(938), - [anon_sym_u8_DQUOTE] = ACTIONS(938), - [anon_sym_DQUOTE] = ACTIONS(938), - [sym_true] = ACTIONS(936), - [sym_false] = ACTIONS(936), - [sym_null] = ACTIONS(936), - [sym_comment] = ACTIONS(3), - }, - [144] = { - [sym_attribute_declaration] = STATE(153), - [sym_compound_statement] = STATE(191), - [sym_attributed_statement] = STATE(191), - [sym_labeled_statement] = STATE(191), - [sym_expression_statement] = STATE(191), - [sym_if_statement] = STATE(191), - [sym_switch_statement] = STATE(191), - [sym_case_statement] = STATE(191), - [sym_while_statement] = STATE(191), - [sym_do_statement] = STATE(191), - [sym_for_statement] = STATE(191), - [sym_return_statement] = STATE(191), - [sym_break_statement] = STATE(191), - [sym_continue_statement] = STATE(191), - [sym_goto_statement] = STATE(191), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [sym_identifier] = ACTIONS(1207), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [145] = { - [ts_builtin_sym_end] = ACTIONS(934), - [sym_identifier] = ACTIONS(932), - [aux_sym_preproc_include_token1] = ACTIONS(932), - [aux_sym_preproc_def_token1] = ACTIONS(932), - [aux_sym_preproc_if_token1] = ACTIONS(932), - [aux_sym_preproc_ifdef_token1] = ACTIONS(932), - [aux_sym_preproc_ifdef_token2] = ACTIONS(932), - [sym_preproc_directive] = ACTIONS(932), - [anon_sym_LPAREN2] = ACTIONS(934), - [anon_sym_BANG] = ACTIONS(934), - [anon_sym_TILDE] = ACTIONS(934), - [anon_sym_DASH] = ACTIONS(932), - [anon_sym_PLUS] = ACTIONS(932), - [anon_sym_STAR] = ACTIONS(934), - [anon_sym_AMP] = ACTIONS(934), - [anon_sym_SEMI] = ACTIONS(934), - [anon_sym_typedef] = ACTIONS(932), - [anon_sym_extern] = ACTIONS(932), - [anon_sym___attribute__] = ACTIONS(932), - [anon_sym_LBRACK_LBRACK] = ACTIONS(934), - [anon_sym___declspec] = ACTIONS(932), - [anon_sym___cdecl] = ACTIONS(932), - [anon_sym___clrcall] = ACTIONS(932), - [anon_sym___stdcall] = ACTIONS(932), - [anon_sym___fastcall] = ACTIONS(932), - [anon_sym___thiscall] = ACTIONS(932), - [anon_sym___vectorcall] = ACTIONS(932), - [anon_sym_LBRACE] = ACTIONS(934), - [anon_sym_static] = ACTIONS(932), - [anon_sym_auto] = ACTIONS(932), - [anon_sym_register] = ACTIONS(932), - [anon_sym_inline] = ACTIONS(932), - [anon_sym_const] = ACTIONS(932), - [anon_sym_volatile] = ACTIONS(932), - [anon_sym_restrict] = ACTIONS(932), - [anon_sym__Atomic] = ACTIONS(932), - [anon_sym_signed] = ACTIONS(932), - [anon_sym_unsigned] = ACTIONS(932), - [anon_sym_long] = ACTIONS(932), - [anon_sym_short] = ACTIONS(932), - [sym_primitive_type] = ACTIONS(932), - [anon_sym_enum] = ACTIONS(932), - [anon_sym_struct] = ACTIONS(932), - [anon_sym_union] = ACTIONS(932), - [anon_sym_if] = ACTIONS(932), - [anon_sym_else] = ACTIONS(932), - [anon_sym_switch] = ACTIONS(932), - [anon_sym_case] = ACTIONS(932), - [anon_sym_default] = ACTIONS(932), - [anon_sym_while] = ACTIONS(932), - [anon_sym_do] = ACTIONS(932), - [anon_sym_for] = ACTIONS(932), - [anon_sym_return] = ACTIONS(932), - [anon_sym_break] = ACTIONS(932), - [anon_sym_continue] = ACTIONS(932), - [anon_sym_goto] = ACTIONS(932), - [anon_sym_DASH_DASH] = ACTIONS(934), - [anon_sym_PLUS_PLUS] = ACTIONS(934), - [anon_sym_sizeof] = ACTIONS(932), - [sym_number_literal] = ACTIONS(934), - [anon_sym_L_SQUOTE] = ACTIONS(934), - [anon_sym_u_SQUOTE] = ACTIONS(934), - [anon_sym_U_SQUOTE] = ACTIONS(934), - [anon_sym_u8_SQUOTE] = ACTIONS(934), - [anon_sym_SQUOTE] = ACTIONS(934), - [anon_sym_L_DQUOTE] = ACTIONS(934), - [anon_sym_u_DQUOTE] = ACTIONS(934), - [anon_sym_U_DQUOTE] = ACTIONS(934), - [anon_sym_u8_DQUOTE] = ACTIONS(934), - [anon_sym_DQUOTE] = ACTIONS(934), - [sym_true] = ACTIONS(932), - [sym_false] = ACTIONS(932), - [sym_null] = ACTIONS(932), - [sym_comment] = ACTIONS(3), - }, - [146] = { - [sym_identifier] = ACTIONS(1000), - [aux_sym_preproc_include_token1] = ACTIONS(1000), - [aux_sym_preproc_def_token1] = ACTIONS(1000), - [aux_sym_preproc_if_token1] = ACTIONS(1000), - [aux_sym_preproc_if_token2] = ACTIONS(1000), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1000), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1000), - [sym_preproc_directive] = ACTIONS(1000), - [anon_sym_LPAREN2] = ACTIONS(1002), - [anon_sym_BANG] = ACTIONS(1002), - [anon_sym_TILDE] = ACTIONS(1002), - [anon_sym_DASH] = ACTIONS(1000), - [anon_sym_PLUS] = ACTIONS(1000), - [anon_sym_STAR] = ACTIONS(1002), - [anon_sym_AMP] = ACTIONS(1002), - [anon_sym_SEMI] = ACTIONS(1002), - [anon_sym_typedef] = ACTIONS(1000), - [anon_sym_extern] = ACTIONS(1000), - [anon_sym___attribute__] = ACTIONS(1000), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1002), - [anon_sym___declspec] = ACTIONS(1000), - [anon_sym___cdecl] = ACTIONS(1000), - [anon_sym___clrcall] = ACTIONS(1000), - [anon_sym___stdcall] = ACTIONS(1000), - [anon_sym___fastcall] = ACTIONS(1000), - [anon_sym___thiscall] = ACTIONS(1000), - [anon_sym___vectorcall] = ACTIONS(1000), - [anon_sym_LBRACE] = ACTIONS(1002), - [anon_sym_static] = ACTIONS(1000), - [anon_sym_auto] = ACTIONS(1000), - [anon_sym_register] = ACTIONS(1000), - [anon_sym_inline] = ACTIONS(1000), - [anon_sym_const] = ACTIONS(1000), - [anon_sym_volatile] = ACTIONS(1000), - [anon_sym_restrict] = ACTIONS(1000), - [anon_sym__Atomic] = ACTIONS(1000), - [anon_sym_signed] = ACTIONS(1000), - [anon_sym_unsigned] = ACTIONS(1000), - [anon_sym_long] = ACTIONS(1000), - [anon_sym_short] = ACTIONS(1000), - [sym_primitive_type] = ACTIONS(1000), - [anon_sym_enum] = ACTIONS(1000), - [anon_sym_struct] = ACTIONS(1000), - [anon_sym_union] = ACTIONS(1000), - [anon_sym_if] = ACTIONS(1000), - [anon_sym_else] = ACTIONS(1000), - [anon_sym_switch] = ACTIONS(1000), - [anon_sym_case] = ACTIONS(1000), - [anon_sym_default] = ACTIONS(1000), - [anon_sym_while] = ACTIONS(1000), - [anon_sym_do] = ACTIONS(1000), - [anon_sym_for] = ACTIONS(1000), - [anon_sym_return] = ACTIONS(1000), - [anon_sym_break] = ACTIONS(1000), - [anon_sym_continue] = ACTIONS(1000), - [anon_sym_goto] = ACTIONS(1000), - [anon_sym_DASH_DASH] = ACTIONS(1002), - [anon_sym_PLUS_PLUS] = ACTIONS(1002), - [anon_sym_sizeof] = ACTIONS(1000), - [sym_number_literal] = ACTIONS(1002), - [anon_sym_L_SQUOTE] = ACTIONS(1002), - [anon_sym_u_SQUOTE] = ACTIONS(1002), - [anon_sym_U_SQUOTE] = ACTIONS(1002), - [anon_sym_u8_SQUOTE] = ACTIONS(1002), - [anon_sym_SQUOTE] = ACTIONS(1002), - [anon_sym_L_DQUOTE] = ACTIONS(1002), - [anon_sym_u_DQUOTE] = ACTIONS(1002), - [anon_sym_U_DQUOTE] = ACTIONS(1002), - [anon_sym_u8_DQUOTE] = ACTIONS(1002), - [anon_sym_DQUOTE] = ACTIONS(1002), - [sym_true] = ACTIONS(1000), - [sym_false] = ACTIONS(1000), - [sym_null] = ACTIONS(1000), - [sym_comment] = ACTIONS(3), - }, - [147] = { - [sym_identifier] = ACTIONS(1012), - [aux_sym_preproc_include_token1] = ACTIONS(1012), - [aux_sym_preproc_def_token1] = ACTIONS(1012), - [aux_sym_preproc_if_token1] = ACTIONS(1012), - [aux_sym_preproc_if_token2] = ACTIONS(1012), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1012), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1012), - [sym_preproc_directive] = ACTIONS(1012), - [anon_sym_LPAREN2] = ACTIONS(1014), - [anon_sym_BANG] = ACTIONS(1014), - [anon_sym_TILDE] = ACTIONS(1014), - [anon_sym_DASH] = ACTIONS(1012), - [anon_sym_PLUS] = ACTIONS(1012), - [anon_sym_STAR] = ACTIONS(1014), - [anon_sym_AMP] = ACTIONS(1014), - [anon_sym_SEMI] = ACTIONS(1014), - [anon_sym_typedef] = ACTIONS(1012), - [anon_sym_extern] = ACTIONS(1012), - [anon_sym___attribute__] = ACTIONS(1012), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1014), - [anon_sym___declspec] = ACTIONS(1012), - [anon_sym___cdecl] = ACTIONS(1012), - [anon_sym___clrcall] = ACTIONS(1012), - [anon_sym___stdcall] = ACTIONS(1012), - [anon_sym___fastcall] = ACTIONS(1012), - [anon_sym___thiscall] = ACTIONS(1012), - [anon_sym___vectorcall] = ACTIONS(1012), - [anon_sym_LBRACE] = ACTIONS(1014), - [anon_sym_static] = ACTIONS(1012), - [anon_sym_auto] = ACTIONS(1012), - [anon_sym_register] = ACTIONS(1012), - [anon_sym_inline] = ACTIONS(1012), - [anon_sym_const] = ACTIONS(1012), - [anon_sym_volatile] = ACTIONS(1012), - [anon_sym_restrict] = ACTIONS(1012), - [anon_sym__Atomic] = ACTIONS(1012), - [anon_sym_signed] = ACTIONS(1012), - [anon_sym_unsigned] = ACTIONS(1012), - [anon_sym_long] = ACTIONS(1012), - [anon_sym_short] = ACTIONS(1012), - [sym_primitive_type] = ACTIONS(1012), - [anon_sym_enum] = ACTIONS(1012), - [anon_sym_struct] = ACTIONS(1012), - [anon_sym_union] = ACTIONS(1012), - [anon_sym_if] = ACTIONS(1012), - [anon_sym_else] = ACTIONS(1012), - [anon_sym_switch] = ACTIONS(1012), - [anon_sym_case] = ACTIONS(1012), - [anon_sym_default] = ACTIONS(1012), - [anon_sym_while] = ACTIONS(1012), - [anon_sym_do] = ACTIONS(1012), - [anon_sym_for] = ACTIONS(1012), - [anon_sym_return] = ACTIONS(1012), - [anon_sym_break] = ACTIONS(1012), - [anon_sym_continue] = ACTIONS(1012), - [anon_sym_goto] = ACTIONS(1012), - [anon_sym_DASH_DASH] = ACTIONS(1014), - [anon_sym_PLUS_PLUS] = ACTIONS(1014), - [anon_sym_sizeof] = ACTIONS(1012), - [sym_number_literal] = ACTIONS(1014), - [anon_sym_L_SQUOTE] = ACTIONS(1014), - [anon_sym_u_SQUOTE] = ACTIONS(1014), - [anon_sym_U_SQUOTE] = ACTIONS(1014), - [anon_sym_u8_SQUOTE] = ACTIONS(1014), - [anon_sym_SQUOTE] = ACTIONS(1014), - [anon_sym_L_DQUOTE] = ACTIONS(1014), - [anon_sym_u_DQUOTE] = ACTIONS(1014), - [anon_sym_U_DQUOTE] = ACTIONS(1014), - [anon_sym_u8_DQUOTE] = ACTIONS(1014), - [anon_sym_DQUOTE] = ACTIONS(1014), - [sym_true] = ACTIONS(1012), - [sym_false] = ACTIONS(1012), - [sym_null] = ACTIONS(1012), - [sym_comment] = ACTIONS(3), - }, - [148] = { - [sym_identifier] = ACTIONS(1020), - [aux_sym_preproc_include_token1] = ACTIONS(1020), - [aux_sym_preproc_def_token1] = ACTIONS(1020), - [aux_sym_preproc_if_token1] = ACTIONS(1020), - [aux_sym_preproc_if_token2] = ACTIONS(1020), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1020), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1020), - [sym_preproc_directive] = ACTIONS(1020), - [anon_sym_LPAREN2] = ACTIONS(1022), - [anon_sym_BANG] = ACTIONS(1022), - [anon_sym_TILDE] = ACTIONS(1022), - [anon_sym_DASH] = ACTIONS(1020), - [anon_sym_PLUS] = ACTIONS(1020), - [anon_sym_STAR] = ACTIONS(1022), - [anon_sym_AMP] = ACTIONS(1022), - [anon_sym_SEMI] = ACTIONS(1022), - [anon_sym_typedef] = ACTIONS(1020), - [anon_sym_extern] = ACTIONS(1020), - [anon_sym___attribute__] = ACTIONS(1020), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1022), - [anon_sym___declspec] = ACTIONS(1020), - [anon_sym___cdecl] = ACTIONS(1020), - [anon_sym___clrcall] = ACTIONS(1020), - [anon_sym___stdcall] = ACTIONS(1020), - [anon_sym___fastcall] = ACTIONS(1020), - [anon_sym___thiscall] = ACTIONS(1020), - [anon_sym___vectorcall] = ACTIONS(1020), - [anon_sym_LBRACE] = ACTIONS(1022), - [anon_sym_static] = ACTIONS(1020), - [anon_sym_auto] = ACTIONS(1020), - [anon_sym_register] = ACTIONS(1020), - [anon_sym_inline] = ACTIONS(1020), - [anon_sym_const] = ACTIONS(1020), - [anon_sym_volatile] = ACTIONS(1020), - [anon_sym_restrict] = ACTIONS(1020), - [anon_sym__Atomic] = ACTIONS(1020), - [anon_sym_signed] = ACTIONS(1020), - [anon_sym_unsigned] = ACTIONS(1020), - [anon_sym_long] = ACTIONS(1020), - [anon_sym_short] = ACTIONS(1020), - [sym_primitive_type] = ACTIONS(1020), - [anon_sym_enum] = ACTIONS(1020), - [anon_sym_struct] = ACTIONS(1020), - [anon_sym_union] = ACTIONS(1020), - [anon_sym_if] = ACTIONS(1020), - [anon_sym_else] = ACTIONS(1020), - [anon_sym_switch] = ACTIONS(1020), - [anon_sym_case] = ACTIONS(1020), - [anon_sym_default] = ACTIONS(1020), - [anon_sym_while] = ACTIONS(1020), - [anon_sym_do] = ACTIONS(1020), - [anon_sym_for] = ACTIONS(1020), - [anon_sym_return] = ACTIONS(1020), - [anon_sym_break] = ACTIONS(1020), - [anon_sym_continue] = ACTIONS(1020), - [anon_sym_goto] = ACTIONS(1020), - [anon_sym_DASH_DASH] = ACTIONS(1022), - [anon_sym_PLUS_PLUS] = ACTIONS(1022), - [anon_sym_sizeof] = ACTIONS(1020), - [sym_number_literal] = ACTIONS(1022), - [anon_sym_L_SQUOTE] = ACTIONS(1022), - [anon_sym_u_SQUOTE] = ACTIONS(1022), - [anon_sym_U_SQUOTE] = ACTIONS(1022), - [anon_sym_u8_SQUOTE] = ACTIONS(1022), - [anon_sym_SQUOTE] = ACTIONS(1022), - [anon_sym_L_DQUOTE] = ACTIONS(1022), - [anon_sym_u_DQUOTE] = ACTIONS(1022), - [anon_sym_U_DQUOTE] = ACTIONS(1022), - [anon_sym_u8_DQUOTE] = ACTIONS(1022), - [anon_sym_DQUOTE] = ACTIONS(1022), - [sym_true] = ACTIONS(1020), - [sym_false] = ACTIONS(1020), - [sym_null] = ACTIONS(1020), - [sym_comment] = ACTIONS(3), - }, - [149] = { - [sym_attribute_declaration] = STATE(153), - [sym_compound_statement] = STATE(130), - [sym_attributed_statement] = STATE(130), - [sym_labeled_statement] = STATE(130), - [sym_expression_statement] = STATE(130), - [sym_if_statement] = STATE(130), - [sym_switch_statement] = STATE(130), - [sym_case_statement] = STATE(130), - [sym_while_statement] = STATE(130), - [sym_do_statement] = STATE(130), - [sym_for_statement] = STATE(130), - [sym_return_statement] = STATE(130), - [sym_break_statement] = STATE(130), - [sym_continue_statement] = STATE(130), - [sym_goto_statement] = STATE(130), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [sym_identifier] = ACTIONS(1207), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [150] = { - [sym_identifier] = ACTIONS(928), - [aux_sym_preproc_include_token1] = ACTIONS(928), - [aux_sym_preproc_def_token1] = ACTIONS(928), - [aux_sym_preproc_if_token1] = ACTIONS(928), - [aux_sym_preproc_if_token2] = ACTIONS(928), - [aux_sym_preproc_ifdef_token1] = ACTIONS(928), - [aux_sym_preproc_ifdef_token2] = ACTIONS(928), - [sym_preproc_directive] = ACTIONS(928), - [anon_sym_LPAREN2] = ACTIONS(930), - [anon_sym_BANG] = ACTIONS(930), - [anon_sym_TILDE] = ACTIONS(930), - [anon_sym_DASH] = ACTIONS(928), - [anon_sym_PLUS] = ACTIONS(928), - [anon_sym_STAR] = ACTIONS(930), - [anon_sym_AMP] = ACTIONS(930), - [anon_sym_SEMI] = ACTIONS(930), - [anon_sym_typedef] = ACTIONS(928), - [anon_sym_extern] = ACTIONS(928), - [anon_sym___attribute__] = ACTIONS(928), - [anon_sym_LBRACK_LBRACK] = ACTIONS(930), - [anon_sym___declspec] = ACTIONS(928), - [anon_sym___cdecl] = ACTIONS(928), - [anon_sym___clrcall] = ACTIONS(928), - [anon_sym___stdcall] = ACTIONS(928), - [anon_sym___fastcall] = ACTIONS(928), - [anon_sym___thiscall] = ACTIONS(928), - [anon_sym___vectorcall] = ACTIONS(928), - [anon_sym_LBRACE] = ACTIONS(930), - [anon_sym_static] = ACTIONS(928), - [anon_sym_auto] = ACTIONS(928), - [anon_sym_register] = ACTIONS(928), - [anon_sym_inline] = ACTIONS(928), - [anon_sym_const] = ACTIONS(928), - [anon_sym_volatile] = ACTIONS(928), - [anon_sym_restrict] = ACTIONS(928), - [anon_sym__Atomic] = ACTIONS(928), - [anon_sym_signed] = ACTIONS(928), - [anon_sym_unsigned] = ACTIONS(928), - [anon_sym_long] = ACTIONS(928), - [anon_sym_short] = ACTIONS(928), - [sym_primitive_type] = ACTIONS(928), - [anon_sym_enum] = ACTIONS(928), - [anon_sym_struct] = ACTIONS(928), - [anon_sym_union] = ACTIONS(928), - [anon_sym_if] = ACTIONS(928), - [anon_sym_else] = ACTIONS(928), - [anon_sym_switch] = ACTIONS(928), - [anon_sym_case] = ACTIONS(928), - [anon_sym_default] = ACTIONS(928), - [anon_sym_while] = ACTIONS(928), - [anon_sym_do] = ACTIONS(928), - [anon_sym_for] = ACTIONS(928), - [anon_sym_return] = ACTIONS(928), - [anon_sym_break] = ACTIONS(928), - [anon_sym_continue] = ACTIONS(928), - [anon_sym_goto] = ACTIONS(928), - [anon_sym_DASH_DASH] = ACTIONS(930), - [anon_sym_PLUS_PLUS] = ACTIONS(930), - [anon_sym_sizeof] = ACTIONS(928), - [sym_number_literal] = ACTIONS(930), - [anon_sym_L_SQUOTE] = ACTIONS(930), - [anon_sym_u_SQUOTE] = ACTIONS(930), - [anon_sym_U_SQUOTE] = ACTIONS(930), - [anon_sym_u8_SQUOTE] = ACTIONS(930), - [anon_sym_SQUOTE] = ACTIONS(930), - [anon_sym_L_DQUOTE] = ACTIONS(930), - [anon_sym_u_DQUOTE] = ACTIONS(930), - [anon_sym_U_DQUOTE] = ACTIONS(930), - [anon_sym_u8_DQUOTE] = ACTIONS(930), - [anon_sym_DQUOTE] = ACTIONS(930), - [sym_true] = ACTIONS(928), - [sym_false] = ACTIONS(928), - [sym_null] = ACTIONS(928), - [sym_comment] = ACTIONS(3), - }, - [151] = { - [sym_attribute_declaration] = STATE(153), - [sym_compound_statement] = STATE(134), - [sym_attributed_statement] = STATE(134), - [sym_labeled_statement] = STATE(134), - [sym_expression_statement] = STATE(134), - [sym_if_statement] = STATE(134), - [sym_switch_statement] = STATE(134), - [sym_case_statement] = STATE(134), - [sym_while_statement] = STATE(134), - [sym_do_statement] = STATE(134), - [sym_for_statement] = STATE(134), - [sym_return_statement] = STATE(134), - [sym_break_statement] = STATE(134), - [sym_continue_statement] = STATE(134), - [sym_goto_statement] = STATE(134), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [sym_identifier] = ACTIONS(1207), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [152] = { - [sym_identifier] = ACTIONS(1024), - [aux_sym_preproc_include_token1] = ACTIONS(1024), - [aux_sym_preproc_def_token1] = ACTIONS(1024), - [aux_sym_preproc_if_token1] = ACTIONS(1024), - [aux_sym_preproc_if_token2] = ACTIONS(1024), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1024), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1024), - [sym_preproc_directive] = ACTIONS(1024), - [anon_sym_LPAREN2] = ACTIONS(1026), - [anon_sym_BANG] = ACTIONS(1026), - [anon_sym_TILDE] = ACTIONS(1026), - [anon_sym_DASH] = ACTIONS(1024), - [anon_sym_PLUS] = ACTIONS(1024), - [anon_sym_STAR] = ACTIONS(1026), - [anon_sym_AMP] = ACTIONS(1026), - [anon_sym_SEMI] = ACTIONS(1026), - [anon_sym_typedef] = ACTIONS(1024), - [anon_sym_extern] = ACTIONS(1024), - [anon_sym___attribute__] = ACTIONS(1024), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1026), - [anon_sym___declspec] = ACTIONS(1024), - [anon_sym___cdecl] = ACTIONS(1024), - [anon_sym___clrcall] = ACTIONS(1024), - [anon_sym___stdcall] = ACTIONS(1024), - [anon_sym___fastcall] = ACTIONS(1024), - [anon_sym___thiscall] = ACTIONS(1024), - [anon_sym___vectorcall] = ACTIONS(1024), - [anon_sym_LBRACE] = ACTIONS(1026), - [anon_sym_static] = ACTIONS(1024), - [anon_sym_auto] = ACTIONS(1024), - [anon_sym_register] = ACTIONS(1024), - [anon_sym_inline] = ACTIONS(1024), - [anon_sym_const] = ACTIONS(1024), - [anon_sym_volatile] = ACTIONS(1024), - [anon_sym_restrict] = ACTIONS(1024), - [anon_sym__Atomic] = ACTIONS(1024), - [anon_sym_signed] = ACTIONS(1024), - [anon_sym_unsigned] = ACTIONS(1024), - [anon_sym_long] = ACTIONS(1024), - [anon_sym_short] = ACTIONS(1024), - [sym_primitive_type] = ACTIONS(1024), - [anon_sym_enum] = ACTIONS(1024), - [anon_sym_struct] = ACTIONS(1024), - [anon_sym_union] = ACTIONS(1024), - [anon_sym_if] = ACTIONS(1024), - [anon_sym_else] = ACTIONS(1024), - [anon_sym_switch] = ACTIONS(1024), - [anon_sym_case] = ACTIONS(1024), - [anon_sym_default] = ACTIONS(1024), - [anon_sym_while] = ACTIONS(1024), - [anon_sym_do] = ACTIONS(1024), - [anon_sym_for] = ACTIONS(1024), - [anon_sym_return] = ACTIONS(1024), - [anon_sym_break] = ACTIONS(1024), - [anon_sym_continue] = ACTIONS(1024), - [anon_sym_goto] = ACTIONS(1024), - [anon_sym_DASH_DASH] = ACTIONS(1026), - [anon_sym_PLUS_PLUS] = ACTIONS(1026), - [anon_sym_sizeof] = ACTIONS(1024), - [sym_number_literal] = ACTIONS(1026), - [anon_sym_L_SQUOTE] = ACTIONS(1026), - [anon_sym_u_SQUOTE] = ACTIONS(1026), - [anon_sym_U_SQUOTE] = ACTIONS(1026), - [anon_sym_u8_SQUOTE] = ACTIONS(1026), - [anon_sym_SQUOTE] = ACTIONS(1026), - [anon_sym_L_DQUOTE] = ACTIONS(1026), - [anon_sym_u_DQUOTE] = ACTIONS(1026), - [anon_sym_U_DQUOTE] = ACTIONS(1026), - [anon_sym_u8_DQUOTE] = ACTIONS(1026), - [anon_sym_DQUOTE] = ACTIONS(1026), - [sym_true] = ACTIONS(1024), - [sym_false] = ACTIONS(1024), - [sym_null] = ACTIONS(1024), - [sym_comment] = ACTIONS(3), - }, - [153] = { - [sym_attribute_declaration] = STATE(140), - [sym_compound_statement] = STATE(141), - [sym_attributed_statement] = STATE(141), - [sym_labeled_statement] = STATE(141), - [sym_expression_statement] = STATE(141), - [sym_if_statement] = STATE(141), - [sym_switch_statement] = STATE(141), - [sym_case_statement] = STATE(141), - [sym_while_statement] = STATE(141), - [sym_do_statement] = STATE(141), - [sym_for_statement] = STATE(141), - [sym_return_statement] = STATE(141), - [sym_break_statement] = STATE(141), - [sym_continue_statement] = STATE(141), - [sym_goto_statement] = STATE(141), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(140), - [sym_identifier] = ACTIONS(1207), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [154] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(177), - [sym_attributed_statement] = STATE(177), - [sym_labeled_statement] = STATE(177), - [sym_expression_statement] = STATE(177), - [sym_if_statement] = STATE(177), - [sym_switch_statement] = STATE(177), - [sym_case_statement] = STATE(177), - [sym_while_statement] = STATE(177), - [sym_do_statement] = STATE(177), - [sym_for_statement] = STATE(177), - [sym_return_statement] = STATE(177), - [sym_break_statement] = STATE(177), - [sym_continue_statement] = STATE(177), - [sym_goto_statement] = STATE(177), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [155] = { - [sym_identifier] = ACTIONS(964), - [aux_sym_preproc_include_token1] = ACTIONS(964), - [aux_sym_preproc_def_token1] = ACTIONS(964), - [aux_sym_preproc_if_token1] = ACTIONS(964), - [aux_sym_preproc_if_token2] = ACTIONS(964), - [aux_sym_preproc_ifdef_token1] = ACTIONS(964), - [aux_sym_preproc_ifdef_token2] = ACTIONS(964), - [sym_preproc_directive] = ACTIONS(964), - [anon_sym_LPAREN2] = ACTIONS(966), - [anon_sym_BANG] = ACTIONS(966), - [anon_sym_TILDE] = ACTIONS(966), - [anon_sym_DASH] = ACTIONS(964), - [anon_sym_PLUS] = ACTIONS(964), - [anon_sym_STAR] = ACTIONS(966), - [anon_sym_AMP] = ACTIONS(966), - [anon_sym_SEMI] = ACTIONS(966), - [anon_sym_typedef] = ACTIONS(964), - [anon_sym_extern] = ACTIONS(964), - [anon_sym___attribute__] = ACTIONS(964), - [anon_sym_LBRACK_LBRACK] = ACTIONS(966), - [anon_sym___declspec] = ACTIONS(964), - [anon_sym___cdecl] = ACTIONS(964), - [anon_sym___clrcall] = ACTIONS(964), - [anon_sym___stdcall] = ACTIONS(964), - [anon_sym___fastcall] = ACTIONS(964), - [anon_sym___thiscall] = ACTIONS(964), - [anon_sym___vectorcall] = ACTIONS(964), - [anon_sym_LBRACE] = ACTIONS(966), - [anon_sym_static] = ACTIONS(964), - [anon_sym_auto] = ACTIONS(964), - [anon_sym_register] = ACTIONS(964), - [anon_sym_inline] = ACTIONS(964), - [anon_sym_const] = ACTIONS(964), - [anon_sym_volatile] = ACTIONS(964), - [anon_sym_restrict] = ACTIONS(964), - [anon_sym__Atomic] = ACTIONS(964), - [anon_sym_signed] = ACTIONS(964), - [anon_sym_unsigned] = ACTIONS(964), - [anon_sym_long] = ACTIONS(964), - [anon_sym_short] = ACTIONS(964), - [sym_primitive_type] = ACTIONS(964), - [anon_sym_enum] = ACTIONS(964), - [anon_sym_struct] = ACTIONS(964), - [anon_sym_union] = ACTIONS(964), - [anon_sym_if] = ACTIONS(964), - [anon_sym_else] = ACTIONS(964), - [anon_sym_switch] = ACTIONS(964), - [anon_sym_case] = ACTIONS(964), - [anon_sym_default] = ACTIONS(964), - [anon_sym_while] = ACTIONS(964), - [anon_sym_do] = ACTIONS(964), - [anon_sym_for] = ACTIONS(964), - [anon_sym_return] = ACTIONS(964), - [anon_sym_break] = ACTIONS(964), - [anon_sym_continue] = ACTIONS(964), - [anon_sym_goto] = ACTIONS(964), - [anon_sym_DASH_DASH] = ACTIONS(966), - [anon_sym_PLUS_PLUS] = ACTIONS(966), - [anon_sym_sizeof] = ACTIONS(964), - [sym_number_literal] = ACTIONS(966), - [anon_sym_L_SQUOTE] = ACTIONS(966), - [anon_sym_u_SQUOTE] = ACTIONS(966), - [anon_sym_U_SQUOTE] = ACTIONS(966), - [anon_sym_u8_SQUOTE] = ACTIONS(966), - [anon_sym_SQUOTE] = ACTIONS(966), - [anon_sym_L_DQUOTE] = ACTIONS(966), - [anon_sym_u_DQUOTE] = ACTIONS(966), - [anon_sym_U_DQUOTE] = ACTIONS(966), - [anon_sym_u8_DQUOTE] = ACTIONS(966), - [anon_sym_DQUOTE] = ACTIONS(966), - [sym_true] = ACTIONS(964), - [sym_false] = ACTIONS(964), - [sym_null] = ACTIONS(964), - [sym_comment] = ACTIONS(3), - }, - [156] = { - [sym_identifier] = ACTIONS(898), - [aux_sym_preproc_include_token1] = ACTIONS(898), - [aux_sym_preproc_def_token1] = ACTIONS(898), - [aux_sym_preproc_if_token1] = ACTIONS(898), - [aux_sym_preproc_if_token2] = ACTIONS(898), - [aux_sym_preproc_ifdef_token1] = ACTIONS(898), - [aux_sym_preproc_ifdef_token2] = ACTIONS(898), - [sym_preproc_directive] = ACTIONS(898), - [anon_sym_LPAREN2] = ACTIONS(900), - [anon_sym_BANG] = ACTIONS(900), - [anon_sym_TILDE] = ACTIONS(900), - [anon_sym_DASH] = ACTIONS(898), - [anon_sym_PLUS] = ACTIONS(898), - [anon_sym_STAR] = ACTIONS(900), - [anon_sym_AMP] = ACTIONS(900), - [anon_sym_SEMI] = ACTIONS(900), - [anon_sym_typedef] = ACTIONS(898), - [anon_sym_extern] = ACTIONS(898), - [anon_sym___attribute__] = ACTIONS(898), - [anon_sym_LBRACK_LBRACK] = ACTIONS(900), - [anon_sym___declspec] = ACTIONS(898), - [anon_sym___cdecl] = ACTIONS(898), - [anon_sym___clrcall] = ACTIONS(898), - [anon_sym___stdcall] = ACTIONS(898), - [anon_sym___fastcall] = ACTIONS(898), - [anon_sym___thiscall] = ACTIONS(898), - [anon_sym___vectorcall] = ACTIONS(898), - [anon_sym_LBRACE] = ACTIONS(900), - [anon_sym_static] = ACTIONS(898), - [anon_sym_auto] = ACTIONS(898), - [anon_sym_register] = ACTIONS(898), - [anon_sym_inline] = ACTIONS(898), - [anon_sym_const] = ACTIONS(898), - [anon_sym_volatile] = ACTIONS(898), - [anon_sym_restrict] = ACTIONS(898), - [anon_sym__Atomic] = ACTIONS(898), - [anon_sym_signed] = ACTIONS(898), - [anon_sym_unsigned] = ACTIONS(898), - [anon_sym_long] = ACTIONS(898), - [anon_sym_short] = ACTIONS(898), - [sym_primitive_type] = ACTIONS(898), - [anon_sym_enum] = ACTIONS(898), - [anon_sym_struct] = ACTIONS(898), - [anon_sym_union] = ACTIONS(898), - [anon_sym_if] = ACTIONS(898), - [anon_sym_else] = ACTIONS(898), - [anon_sym_switch] = ACTIONS(898), - [anon_sym_case] = ACTIONS(898), - [anon_sym_default] = ACTIONS(898), - [anon_sym_while] = ACTIONS(898), - [anon_sym_do] = ACTIONS(898), - [anon_sym_for] = ACTIONS(898), - [anon_sym_return] = ACTIONS(898), - [anon_sym_break] = ACTIONS(898), - [anon_sym_continue] = ACTIONS(898), - [anon_sym_goto] = ACTIONS(898), - [anon_sym_DASH_DASH] = ACTIONS(900), - [anon_sym_PLUS_PLUS] = ACTIONS(900), - [anon_sym_sizeof] = ACTIONS(898), - [sym_number_literal] = ACTIONS(900), - [anon_sym_L_SQUOTE] = ACTIONS(900), - [anon_sym_u_SQUOTE] = ACTIONS(900), - [anon_sym_U_SQUOTE] = ACTIONS(900), - [anon_sym_u8_SQUOTE] = ACTIONS(900), - [anon_sym_SQUOTE] = ACTIONS(900), - [anon_sym_L_DQUOTE] = ACTIONS(900), - [anon_sym_u_DQUOTE] = ACTIONS(900), - [anon_sym_U_DQUOTE] = ACTIONS(900), - [anon_sym_u8_DQUOTE] = ACTIONS(900), - [anon_sym_DQUOTE] = ACTIONS(900), - [sym_true] = ACTIONS(898), - [sym_false] = ACTIONS(898), - [sym_null] = ACTIONS(898), - [sym_comment] = ACTIONS(3), - }, - [157] = { - [sym_attribute_declaration] = STATE(247), - [sym_compound_statement] = STATE(99), - [sym_attributed_statement] = STATE(99), - [sym_labeled_statement] = STATE(99), - [sym_expression_statement] = STATE(99), - [sym_if_statement] = STATE(99), - [sym_switch_statement] = STATE(99), - [sym_case_statement] = STATE(99), - [sym_while_statement] = STATE(99), - [sym_do_statement] = STATE(99), - [sym_for_statement] = STATE(99), - [sym_return_statement] = STATE(99), - [sym_break_statement] = STATE(99), - [sym_continue_statement] = STATE(99), - [sym_goto_statement] = STATE(99), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [sym_identifier] = ACTIONS(1209), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [158] = { - [ts_builtin_sym_end] = ACTIONS(966), - [sym_identifier] = ACTIONS(964), - [aux_sym_preproc_include_token1] = ACTIONS(964), - [aux_sym_preproc_def_token1] = ACTIONS(964), - [aux_sym_preproc_if_token1] = ACTIONS(964), - [aux_sym_preproc_ifdef_token1] = ACTIONS(964), - [aux_sym_preproc_ifdef_token2] = ACTIONS(964), - [sym_preproc_directive] = ACTIONS(964), - [anon_sym_LPAREN2] = ACTIONS(966), - [anon_sym_BANG] = ACTIONS(966), - [anon_sym_TILDE] = ACTIONS(966), - [anon_sym_DASH] = ACTIONS(964), - [anon_sym_PLUS] = ACTIONS(964), - [anon_sym_STAR] = ACTIONS(966), - [anon_sym_AMP] = ACTIONS(966), - [anon_sym_SEMI] = ACTIONS(966), - [anon_sym_typedef] = ACTIONS(964), - [anon_sym_extern] = ACTIONS(964), - [anon_sym___attribute__] = ACTIONS(964), - [anon_sym_LBRACK_LBRACK] = ACTIONS(966), - [anon_sym___declspec] = ACTIONS(964), - [anon_sym___cdecl] = ACTIONS(964), - [anon_sym___clrcall] = ACTIONS(964), - [anon_sym___stdcall] = ACTIONS(964), - [anon_sym___fastcall] = ACTIONS(964), - [anon_sym___thiscall] = ACTIONS(964), - [anon_sym___vectorcall] = ACTIONS(964), - [anon_sym_LBRACE] = ACTIONS(966), - [anon_sym_static] = ACTIONS(964), - [anon_sym_auto] = ACTIONS(964), - [anon_sym_register] = ACTIONS(964), - [anon_sym_inline] = ACTIONS(964), - [anon_sym_const] = ACTIONS(964), - [anon_sym_volatile] = ACTIONS(964), - [anon_sym_restrict] = ACTIONS(964), - [anon_sym__Atomic] = ACTIONS(964), - [anon_sym_signed] = ACTIONS(964), - [anon_sym_unsigned] = ACTIONS(964), - [anon_sym_long] = ACTIONS(964), - [anon_sym_short] = ACTIONS(964), - [sym_primitive_type] = ACTIONS(964), - [anon_sym_enum] = ACTIONS(964), - [anon_sym_struct] = ACTIONS(964), - [anon_sym_union] = ACTIONS(964), - [anon_sym_if] = ACTIONS(964), - [anon_sym_else] = ACTIONS(964), - [anon_sym_switch] = ACTIONS(964), - [anon_sym_case] = ACTIONS(964), - [anon_sym_default] = ACTIONS(964), - [anon_sym_while] = ACTIONS(964), - [anon_sym_do] = ACTIONS(964), - [anon_sym_for] = ACTIONS(964), - [anon_sym_return] = ACTIONS(964), - [anon_sym_break] = ACTIONS(964), - [anon_sym_continue] = ACTIONS(964), - [anon_sym_goto] = ACTIONS(964), - [anon_sym_DASH_DASH] = ACTIONS(966), - [anon_sym_PLUS_PLUS] = ACTIONS(966), - [anon_sym_sizeof] = ACTIONS(964), - [sym_number_literal] = ACTIONS(966), - [anon_sym_L_SQUOTE] = ACTIONS(966), - [anon_sym_u_SQUOTE] = ACTIONS(966), - [anon_sym_U_SQUOTE] = ACTIONS(966), - [anon_sym_u8_SQUOTE] = ACTIONS(966), - [anon_sym_SQUOTE] = ACTIONS(966), - [anon_sym_L_DQUOTE] = ACTIONS(966), - [anon_sym_u_DQUOTE] = ACTIONS(966), - [anon_sym_U_DQUOTE] = ACTIONS(966), - [anon_sym_u8_DQUOTE] = ACTIONS(966), - [anon_sym_DQUOTE] = ACTIONS(966), - [sym_true] = ACTIONS(964), - [sym_false] = ACTIONS(964), - [sym_null] = ACTIONS(964), - [sym_comment] = ACTIONS(3), - }, - [159] = { - [ts_builtin_sym_end] = ACTIONS(986), - [sym_identifier] = ACTIONS(984), - [aux_sym_preproc_include_token1] = ACTIONS(984), - [aux_sym_preproc_def_token1] = ACTIONS(984), - [aux_sym_preproc_if_token1] = ACTIONS(984), - [aux_sym_preproc_ifdef_token1] = ACTIONS(984), - [aux_sym_preproc_ifdef_token2] = ACTIONS(984), - [sym_preproc_directive] = ACTIONS(984), - [anon_sym_LPAREN2] = ACTIONS(986), - [anon_sym_BANG] = ACTIONS(986), - [anon_sym_TILDE] = ACTIONS(986), - [anon_sym_DASH] = ACTIONS(984), - [anon_sym_PLUS] = ACTIONS(984), - [anon_sym_STAR] = ACTIONS(986), - [anon_sym_AMP] = ACTIONS(986), - [anon_sym_SEMI] = ACTIONS(986), - [anon_sym_typedef] = ACTIONS(984), - [anon_sym_extern] = ACTIONS(984), - [anon_sym___attribute__] = ACTIONS(984), - [anon_sym_LBRACK_LBRACK] = ACTIONS(986), - [anon_sym___declspec] = ACTIONS(984), - [anon_sym___cdecl] = ACTIONS(984), - [anon_sym___clrcall] = ACTIONS(984), - [anon_sym___stdcall] = ACTIONS(984), - [anon_sym___fastcall] = ACTIONS(984), - [anon_sym___thiscall] = ACTIONS(984), - [anon_sym___vectorcall] = ACTIONS(984), - [anon_sym_LBRACE] = ACTIONS(986), - [anon_sym_static] = ACTIONS(984), - [anon_sym_auto] = ACTIONS(984), - [anon_sym_register] = ACTIONS(984), - [anon_sym_inline] = ACTIONS(984), - [anon_sym_const] = ACTIONS(984), - [anon_sym_volatile] = ACTIONS(984), - [anon_sym_restrict] = ACTIONS(984), - [anon_sym__Atomic] = ACTIONS(984), - [anon_sym_signed] = ACTIONS(984), - [anon_sym_unsigned] = ACTIONS(984), - [anon_sym_long] = ACTIONS(984), - [anon_sym_short] = ACTIONS(984), - [sym_primitive_type] = ACTIONS(984), - [anon_sym_enum] = ACTIONS(984), - [anon_sym_struct] = ACTIONS(984), - [anon_sym_union] = ACTIONS(984), - [anon_sym_if] = ACTIONS(984), - [anon_sym_else] = ACTIONS(984), - [anon_sym_switch] = ACTIONS(984), - [anon_sym_case] = ACTIONS(984), - [anon_sym_default] = ACTIONS(984), - [anon_sym_while] = ACTIONS(984), - [anon_sym_do] = ACTIONS(984), - [anon_sym_for] = ACTIONS(984), - [anon_sym_return] = ACTIONS(984), - [anon_sym_break] = ACTIONS(984), - [anon_sym_continue] = ACTIONS(984), - [anon_sym_goto] = ACTIONS(984), - [anon_sym_DASH_DASH] = ACTIONS(986), - [anon_sym_PLUS_PLUS] = ACTIONS(986), - [anon_sym_sizeof] = ACTIONS(984), - [sym_number_literal] = ACTIONS(986), - [anon_sym_L_SQUOTE] = ACTIONS(986), - [anon_sym_u_SQUOTE] = ACTIONS(986), - [anon_sym_U_SQUOTE] = ACTIONS(986), - [anon_sym_u8_SQUOTE] = ACTIONS(986), - [anon_sym_SQUOTE] = ACTIONS(986), - [anon_sym_L_DQUOTE] = ACTIONS(986), - [anon_sym_u_DQUOTE] = ACTIONS(986), - [anon_sym_U_DQUOTE] = ACTIONS(986), - [anon_sym_u8_DQUOTE] = ACTIONS(986), - [anon_sym_DQUOTE] = ACTIONS(986), - [sym_true] = ACTIONS(984), - [sym_false] = ACTIONS(984), - [sym_null] = ACTIONS(984), - [sym_comment] = ACTIONS(3), - }, - [160] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(233), - [sym_attributed_statement] = STATE(233), - [sym_labeled_statement] = STATE(233), - [sym_expression_statement] = STATE(233), - [sym_if_statement] = STATE(233), - [sym_switch_statement] = STATE(233), - [sym_case_statement] = STATE(233), - [sym_while_statement] = STATE(233), - [sym_do_statement] = STATE(233), - [sym_for_statement] = STATE(233), - [sym_return_statement] = STATE(233), - [sym_break_statement] = STATE(233), - [sym_continue_statement] = STATE(233), - [sym_goto_statement] = STATE(233), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [161] = { - [sym_identifier] = ACTIONS(898), - [aux_sym_preproc_include_token1] = ACTIONS(898), - [aux_sym_preproc_def_token1] = ACTIONS(898), - [aux_sym_preproc_if_token1] = ACTIONS(898), - [aux_sym_preproc_if_token2] = ACTIONS(898), - [aux_sym_preproc_ifdef_token1] = ACTIONS(898), - [aux_sym_preproc_ifdef_token2] = ACTIONS(898), - [sym_preproc_directive] = ACTIONS(898), - [anon_sym_LPAREN2] = ACTIONS(900), - [anon_sym_BANG] = ACTIONS(900), - [anon_sym_TILDE] = ACTIONS(900), - [anon_sym_DASH] = ACTIONS(898), - [anon_sym_PLUS] = ACTIONS(898), - [anon_sym_STAR] = ACTIONS(900), - [anon_sym_AMP] = ACTIONS(900), - [anon_sym_SEMI] = ACTIONS(900), - [anon_sym_typedef] = ACTIONS(898), - [anon_sym_extern] = ACTIONS(898), - [anon_sym___attribute__] = ACTIONS(898), - [anon_sym_LBRACK_LBRACK] = ACTIONS(900), - [anon_sym___declspec] = ACTIONS(898), - [anon_sym___cdecl] = ACTIONS(898), - [anon_sym___clrcall] = ACTIONS(898), - [anon_sym___stdcall] = ACTIONS(898), - [anon_sym___fastcall] = ACTIONS(898), - [anon_sym___thiscall] = ACTIONS(898), - [anon_sym___vectorcall] = ACTIONS(898), - [anon_sym_LBRACE] = ACTIONS(900), - [anon_sym_static] = ACTIONS(898), - [anon_sym_auto] = ACTIONS(898), - [anon_sym_register] = ACTIONS(898), - [anon_sym_inline] = ACTIONS(898), - [anon_sym_const] = ACTIONS(898), - [anon_sym_volatile] = ACTIONS(898), - [anon_sym_restrict] = ACTIONS(898), - [anon_sym__Atomic] = ACTIONS(898), - [anon_sym_signed] = ACTIONS(898), - [anon_sym_unsigned] = ACTIONS(898), - [anon_sym_long] = ACTIONS(898), - [anon_sym_short] = ACTIONS(898), - [sym_primitive_type] = ACTIONS(898), - [anon_sym_enum] = ACTIONS(898), - [anon_sym_struct] = ACTIONS(898), - [anon_sym_union] = ACTIONS(898), - [anon_sym_if] = ACTIONS(898), - [anon_sym_else] = ACTIONS(898), - [anon_sym_switch] = ACTIONS(898), - [anon_sym_case] = ACTIONS(898), - [anon_sym_default] = ACTIONS(898), - [anon_sym_while] = ACTIONS(898), - [anon_sym_do] = ACTIONS(898), - [anon_sym_for] = ACTIONS(898), - [anon_sym_return] = ACTIONS(898), - [anon_sym_break] = ACTIONS(898), - [anon_sym_continue] = ACTIONS(898), - [anon_sym_goto] = ACTIONS(898), - [anon_sym_DASH_DASH] = ACTIONS(900), - [anon_sym_PLUS_PLUS] = ACTIONS(900), - [anon_sym_sizeof] = ACTIONS(898), - [sym_number_literal] = ACTIONS(900), - [anon_sym_L_SQUOTE] = ACTIONS(900), - [anon_sym_u_SQUOTE] = ACTIONS(900), - [anon_sym_U_SQUOTE] = ACTIONS(900), - [anon_sym_u8_SQUOTE] = ACTIONS(900), - [anon_sym_SQUOTE] = ACTIONS(900), - [anon_sym_L_DQUOTE] = ACTIONS(900), - [anon_sym_u_DQUOTE] = ACTIONS(900), - [anon_sym_U_DQUOTE] = ACTIONS(900), - [anon_sym_u8_DQUOTE] = ACTIONS(900), - [anon_sym_DQUOTE] = ACTIONS(900), - [sym_true] = ACTIONS(898), - [sym_false] = ACTIONS(898), - [sym_null] = ACTIONS(898), - [sym_comment] = ACTIONS(3), - }, - [162] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(1434), - [sym_attributed_statement] = STATE(1434), - [sym_labeled_statement] = STATE(1434), - [sym_expression_statement] = STATE(1434), - [sym_if_statement] = STATE(1434), - [sym_switch_statement] = STATE(1434), - [sym_case_statement] = STATE(1434), - [sym_while_statement] = STATE(1434), - [sym_do_statement] = STATE(1434), - [sym_for_statement] = STATE(1434), - [sym_return_statement] = STATE(1434), - [sym_break_statement] = STATE(1434), - [sym_continue_statement] = STATE(1434), - [sym_goto_statement] = STATE(1434), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [163] = { - [sym_attribute_declaration] = STATE(247), - [sym_compound_statement] = STATE(98), - [sym_attributed_statement] = STATE(98), - [sym_labeled_statement] = STATE(98), - [sym_expression_statement] = STATE(98), - [sym_if_statement] = STATE(98), - [sym_switch_statement] = STATE(98), - [sym_case_statement] = STATE(98), - [sym_while_statement] = STATE(98), - [sym_do_statement] = STATE(98), - [sym_for_statement] = STATE(98), - [sym_return_statement] = STATE(98), - [sym_break_statement] = STATE(98), - [sym_continue_statement] = STATE(98), - [sym_goto_statement] = STATE(98), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [sym_identifier] = ACTIONS(1209), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [164] = { - [sym_attribute_declaration] = STATE(247), - [sym_compound_statement] = STATE(96), - [sym_attributed_statement] = STATE(96), - [sym_labeled_statement] = STATE(96), - [sym_expression_statement] = STATE(96), - [sym_if_statement] = STATE(96), - [sym_switch_statement] = STATE(96), - [sym_case_statement] = STATE(96), - [sym_while_statement] = STATE(96), - [sym_do_statement] = STATE(96), - [sym_for_statement] = STATE(96), - [sym_return_statement] = STATE(96), - [sym_break_statement] = STATE(96), - [sym_continue_statement] = STATE(96), - [sym_goto_statement] = STATE(96), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [sym_identifier] = ACTIONS(1209), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [165] = { - [ts_builtin_sym_end] = ACTIONS(942), - [sym_identifier] = ACTIONS(940), - [aux_sym_preproc_include_token1] = ACTIONS(940), - [aux_sym_preproc_def_token1] = ACTIONS(940), - [aux_sym_preproc_if_token1] = ACTIONS(940), - [aux_sym_preproc_ifdef_token1] = ACTIONS(940), - [aux_sym_preproc_ifdef_token2] = ACTIONS(940), - [sym_preproc_directive] = ACTIONS(940), - [anon_sym_LPAREN2] = ACTIONS(942), - [anon_sym_BANG] = ACTIONS(942), - [anon_sym_TILDE] = ACTIONS(942), - [anon_sym_DASH] = ACTIONS(940), - [anon_sym_PLUS] = ACTIONS(940), - [anon_sym_STAR] = ACTIONS(942), - [anon_sym_AMP] = ACTIONS(942), - [anon_sym_SEMI] = ACTIONS(942), - [anon_sym_typedef] = ACTIONS(940), - [anon_sym_extern] = ACTIONS(940), - [anon_sym___attribute__] = ACTIONS(940), - [anon_sym_LBRACK_LBRACK] = ACTIONS(942), - [anon_sym___declspec] = ACTIONS(940), - [anon_sym___cdecl] = ACTIONS(940), - [anon_sym___clrcall] = ACTIONS(940), - [anon_sym___stdcall] = ACTIONS(940), - [anon_sym___fastcall] = ACTIONS(940), - [anon_sym___thiscall] = ACTIONS(940), - [anon_sym___vectorcall] = ACTIONS(940), - [anon_sym_LBRACE] = ACTIONS(942), - [anon_sym_static] = ACTIONS(940), - [anon_sym_auto] = ACTIONS(940), - [anon_sym_register] = ACTIONS(940), - [anon_sym_inline] = ACTIONS(940), - [anon_sym_const] = ACTIONS(940), - [anon_sym_volatile] = ACTIONS(940), - [anon_sym_restrict] = ACTIONS(940), - [anon_sym__Atomic] = ACTIONS(940), - [anon_sym_signed] = ACTIONS(940), - [anon_sym_unsigned] = ACTIONS(940), - [anon_sym_long] = ACTIONS(940), - [anon_sym_short] = ACTIONS(940), - [sym_primitive_type] = ACTIONS(940), - [anon_sym_enum] = ACTIONS(940), - [anon_sym_struct] = ACTIONS(940), - [anon_sym_union] = ACTIONS(940), - [anon_sym_if] = ACTIONS(940), - [anon_sym_else] = ACTIONS(940), - [anon_sym_switch] = ACTIONS(940), - [anon_sym_case] = ACTIONS(940), - [anon_sym_default] = ACTIONS(940), - [anon_sym_while] = ACTIONS(940), - [anon_sym_do] = ACTIONS(940), - [anon_sym_for] = ACTIONS(940), - [anon_sym_return] = ACTIONS(940), - [anon_sym_break] = ACTIONS(940), - [anon_sym_continue] = ACTIONS(940), - [anon_sym_goto] = ACTIONS(940), - [anon_sym_DASH_DASH] = ACTIONS(942), - [anon_sym_PLUS_PLUS] = ACTIONS(942), - [anon_sym_sizeof] = ACTIONS(940), - [sym_number_literal] = ACTIONS(942), - [anon_sym_L_SQUOTE] = ACTIONS(942), - [anon_sym_u_SQUOTE] = ACTIONS(942), - [anon_sym_U_SQUOTE] = ACTIONS(942), - [anon_sym_u8_SQUOTE] = ACTIONS(942), - [anon_sym_SQUOTE] = ACTIONS(942), - [anon_sym_L_DQUOTE] = ACTIONS(942), - [anon_sym_u_DQUOTE] = ACTIONS(942), - [anon_sym_U_DQUOTE] = ACTIONS(942), - [anon_sym_u8_DQUOTE] = ACTIONS(942), - [anon_sym_DQUOTE] = ACTIONS(942), - [sym_true] = ACTIONS(940), - [sym_false] = ACTIONS(940), - [sym_null] = ACTIONS(940), - [sym_comment] = ACTIONS(3), - }, - [166] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(228), - [sym_attributed_statement] = STATE(228), - [sym_labeled_statement] = STATE(228), - [sym_expression_statement] = STATE(228), - [sym_if_statement] = STATE(228), - [sym_switch_statement] = STATE(228), - [sym_case_statement] = STATE(228), - [sym_while_statement] = STATE(228), - [sym_do_statement] = STATE(228), - [sym_for_statement] = STATE(228), - [sym_return_statement] = STATE(228), - [sym_break_statement] = STATE(228), - [sym_continue_statement] = STATE(228), - [sym_goto_statement] = STATE(228), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [167] = { - [ts_builtin_sym_end] = ACTIONS(892), - [sym_identifier] = ACTIONS(890), - [aux_sym_preproc_include_token1] = ACTIONS(890), - [aux_sym_preproc_def_token1] = ACTIONS(890), - [aux_sym_preproc_if_token1] = ACTIONS(890), - [aux_sym_preproc_ifdef_token1] = ACTIONS(890), - [aux_sym_preproc_ifdef_token2] = ACTIONS(890), - [sym_preproc_directive] = ACTIONS(890), - [anon_sym_LPAREN2] = ACTIONS(892), - [anon_sym_BANG] = ACTIONS(892), - [anon_sym_TILDE] = ACTIONS(892), - [anon_sym_DASH] = ACTIONS(890), - [anon_sym_PLUS] = ACTIONS(890), - [anon_sym_STAR] = ACTIONS(892), - [anon_sym_AMP] = ACTIONS(892), - [anon_sym_SEMI] = ACTIONS(892), - [anon_sym_typedef] = ACTIONS(890), - [anon_sym_extern] = ACTIONS(890), - [anon_sym___attribute__] = ACTIONS(890), - [anon_sym_LBRACK_LBRACK] = ACTIONS(892), - [anon_sym___declspec] = ACTIONS(890), - [anon_sym___cdecl] = ACTIONS(890), - [anon_sym___clrcall] = ACTIONS(890), - [anon_sym___stdcall] = ACTIONS(890), - [anon_sym___fastcall] = ACTIONS(890), - [anon_sym___thiscall] = ACTIONS(890), - [anon_sym___vectorcall] = ACTIONS(890), - [anon_sym_LBRACE] = ACTIONS(892), - [anon_sym_static] = ACTIONS(890), - [anon_sym_auto] = ACTIONS(890), - [anon_sym_register] = ACTIONS(890), - [anon_sym_inline] = ACTIONS(890), - [anon_sym_const] = ACTIONS(890), - [anon_sym_volatile] = ACTIONS(890), - [anon_sym_restrict] = ACTIONS(890), - [anon_sym__Atomic] = ACTIONS(890), - [anon_sym_signed] = ACTIONS(890), - [anon_sym_unsigned] = ACTIONS(890), - [anon_sym_long] = ACTIONS(890), - [anon_sym_short] = ACTIONS(890), - [sym_primitive_type] = ACTIONS(890), - [anon_sym_enum] = ACTIONS(890), - [anon_sym_struct] = ACTIONS(890), - [anon_sym_union] = ACTIONS(890), - [anon_sym_if] = ACTIONS(890), - [anon_sym_else] = ACTIONS(890), - [anon_sym_switch] = ACTIONS(890), - [anon_sym_case] = ACTIONS(890), - [anon_sym_default] = ACTIONS(890), - [anon_sym_while] = ACTIONS(890), - [anon_sym_do] = ACTIONS(890), - [anon_sym_for] = ACTIONS(890), - [anon_sym_return] = ACTIONS(890), - [anon_sym_break] = ACTIONS(890), - [anon_sym_continue] = ACTIONS(890), - [anon_sym_goto] = ACTIONS(890), - [anon_sym_DASH_DASH] = ACTIONS(892), - [anon_sym_PLUS_PLUS] = ACTIONS(892), - [anon_sym_sizeof] = ACTIONS(890), - [sym_number_literal] = ACTIONS(892), - [anon_sym_L_SQUOTE] = ACTIONS(892), - [anon_sym_u_SQUOTE] = ACTIONS(892), - [anon_sym_U_SQUOTE] = ACTIONS(892), - [anon_sym_u8_SQUOTE] = ACTIONS(892), - [anon_sym_SQUOTE] = ACTIONS(892), - [anon_sym_L_DQUOTE] = ACTIONS(892), - [anon_sym_u_DQUOTE] = ACTIONS(892), - [anon_sym_U_DQUOTE] = ACTIONS(892), - [anon_sym_u8_DQUOTE] = ACTIONS(892), - [anon_sym_DQUOTE] = ACTIONS(892), - [sym_true] = ACTIONS(890), - [sym_false] = ACTIONS(890), - [sym_null] = ACTIONS(890), - [sym_comment] = ACTIONS(3), - }, - [168] = { - [sym_attribute_declaration] = STATE(247), - [sym_compound_statement] = STATE(95), - [sym_attributed_statement] = STATE(95), - [sym_labeled_statement] = STATE(95), - [sym_expression_statement] = STATE(95), - [sym_if_statement] = STATE(95), - [sym_switch_statement] = STATE(95), - [sym_case_statement] = STATE(95), - [sym_while_statement] = STATE(95), - [sym_do_statement] = STATE(95), - [sym_for_statement] = STATE(95), - [sym_return_statement] = STATE(95), - [sym_break_statement] = STATE(95), - [sym_continue_statement] = STATE(95), - [sym_goto_statement] = STATE(95), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [sym_identifier] = ACTIONS(1209), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [169] = { - [ts_builtin_sym_end] = ACTIONS(946), - [sym_identifier] = ACTIONS(944), - [aux_sym_preproc_include_token1] = ACTIONS(944), - [aux_sym_preproc_def_token1] = ACTIONS(944), - [aux_sym_preproc_if_token1] = ACTIONS(944), - [aux_sym_preproc_ifdef_token1] = ACTIONS(944), - [aux_sym_preproc_ifdef_token2] = ACTIONS(944), - [sym_preproc_directive] = ACTIONS(944), - [anon_sym_LPAREN2] = ACTIONS(946), - [anon_sym_BANG] = ACTIONS(946), - [anon_sym_TILDE] = ACTIONS(946), - [anon_sym_DASH] = ACTIONS(944), - [anon_sym_PLUS] = ACTIONS(944), - [anon_sym_STAR] = ACTIONS(946), - [anon_sym_AMP] = ACTIONS(946), - [anon_sym_SEMI] = ACTIONS(946), - [anon_sym_typedef] = ACTIONS(944), - [anon_sym_extern] = ACTIONS(944), - [anon_sym___attribute__] = ACTIONS(944), - [anon_sym_LBRACK_LBRACK] = ACTIONS(946), - [anon_sym___declspec] = ACTIONS(944), - [anon_sym___cdecl] = ACTIONS(944), - [anon_sym___clrcall] = ACTIONS(944), - [anon_sym___stdcall] = ACTIONS(944), - [anon_sym___fastcall] = ACTIONS(944), - [anon_sym___thiscall] = ACTIONS(944), - [anon_sym___vectorcall] = ACTIONS(944), - [anon_sym_LBRACE] = ACTIONS(946), - [anon_sym_static] = ACTIONS(944), - [anon_sym_auto] = ACTIONS(944), - [anon_sym_register] = ACTIONS(944), - [anon_sym_inline] = ACTIONS(944), - [anon_sym_const] = ACTIONS(944), - [anon_sym_volatile] = ACTIONS(944), - [anon_sym_restrict] = ACTIONS(944), - [anon_sym__Atomic] = ACTIONS(944), - [anon_sym_signed] = ACTIONS(944), - [anon_sym_unsigned] = ACTIONS(944), - [anon_sym_long] = ACTIONS(944), - [anon_sym_short] = ACTIONS(944), - [sym_primitive_type] = ACTIONS(944), - [anon_sym_enum] = ACTIONS(944), - [anon_sym_struct] = ACTIONS(944), - [anon_sym_union] = ACTIONS(944), - [anon_sym_if] = ACTIONS(944), - [anon_sym_else] = ACTIONS(944), - [anon_sym_switch] = ACTIONS(944), - [anon_sym_case] = ACTIONS(944), - [anon_sym_default] = ACTIONS(944), - [anon_sym_while] = ACTIONS(944), - [anon_sym_do] = ACTIONS(944), - [anon_sym_for] = ACTIONS(944), - [anon_sym_return] = ACTIONS(944), - [anon_sym_break] = ACTIONS(944), - [anon_sym_continue] = ACTIONS(944), - [anon_sym_goto] = ACTIONS(944), - [anon_sym_DASH_DASH] = ACTIONS(946), - [anon_sym_PLUS_PLUS] = ACTIONS(946), - [anon_sym_sizeof] = ACTIONS(944), - [sym_number_literal] = ACTIONS(946), - [anon_sym_L_SQUOTE] = ACTIONS(946), - [anon_sym_u_SQUOTE] = ACTIONS(946), - [anon_sym_U_SQUOTE] = ACTIONS(946), - [anon_sym_u8_SQUOTE] = ACTIONS(946), - [anon_sym_SQUOTE] = ACTIONS(946), - [anon_sym_L_DQUOTE] = ACTIONS(946), - [anon_sym_u_DQUOTE] = ACTIONS(946), - [anon_sym_U_DQUOTE] = ACTIONS(946), - [anon_sym_u8_DQUOTE] = ACTIONS(946), - [anon_sym_DQUOTE] = ACTIONS(946), - [sym_true] = ACTIONS(944), - [sym_false] = ACTIONS(944), - [sym_null] = ACTIONS(944), - [sym_comment] = ACTIONS(3), - }, - [170] = { - [sym_attribute_declaration] = STATE(170), - [sym_compound_statement] = STATE(169), - [sym_attributed_statement] = STATE(169), - [sym_labeled_statement] = STATE(169), - [sym_expression_statement] = STATE(169), - [sym_if_statement] = STATE(169), - [sym_switch_statement] = STATE(169), - [sym_case_statement] = STATE(169), - [sym_while_statement] = STATE(169), - [sym_do_statement] = STATE(169), - [sym_for_statement] = STATE(169), - [sym_return_statement] = STATE(169), - [sym_break_statement] = STATE(169), - [sym_continue_statement] = STATE(169), - [sym_goto_statement] = STATE(169), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(170), - [sym_identifier] = ACTIONS(1211), - [anon_sym_LPAREN2] = ACTIONS(1135), - [anon_sym_BANG] = ACTIONS(1138), - [anon_sym_TILDE] = ACTIONS(1138), - [anon_sym_DASH] = ACTIONS(1141), - [anon_sym_PLUS] = ACTIONS(1141), - [anon_sym_STAR] = ACTIONS(1144), - [anon_sym_AMP] = ACTIONS(1144), - [anon_sym_SEMI] = ACTIONS(1214), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1150), - [anon_sym_LBRACE] = ACTIONS(1217), - [anon_sym_if] = ACTIONS(1220), - [anon_sym_switch] = ACTIONS(1223), - [anon_sym_case] = ACTIONS(1226), - [anon_sym_default] = ACTIONS(1229), - [anon_sym_while] = ACTIONS(1232), - [anon_sym_do] = ACTIONS(1235), - [anon_sym_for] = ACTIONS(1238), - [anon_sym_return] = ACTIONS(1241), - [anon_sym_break] = ACTIONS(1244), - [anon_sym_continue] = ACTIONS(1247), - [anon_sym_goto] = ACTIONS(1250), - [anon_sym_DASH_DASH] = ACTIONS(1189), - [anon_sym_PLUS_PLUS] = ACTIONS(1189), - [anon_sym_sizeof] = ACTIONS(1192), - [sym_number_literal] = ACTIONS(1195), - [anon_sym_L_SQUOTE] = ACTIONS(1198), - [anon_sym_u_SQUOTE] = ACTIONS(1198), - [anon_sym_U_SQUOTE] = ACTIONS(1198), - [anon_sym_u8_SQUOTE] = ACTIONS(1198), - [anon_sym_SQUOTE] = ACTIONS(1198), - [anon_sym_L_DQUOTE] = ACTIONS(1201), - [anon_sym_u_DQUOTE] = ACTIONS(1201), - [anon_sym_U_DQUOTE] = ACTIONS(1201), - [anon_sym_u8_DQUOTE] = ACTIONS(1201), - [anon_sym_DQUOTE] = ACTIONS(1201), - [sym_true] = ACTIONS(1204), - [sym_false] = ACTIONS(1204), - [sym_null] = ACTIONS(1204), - [sym_comment] = ACTIONS(3), - }, - [171] = { - [ts_builtin_sym_end] = ACTIONS(892), - [sym_identifier] = ACTIONS(890), - [aux_sym_preproc_include_token1] = ACTIONS(890), - [aux_sym_preproc_def_token1] = ACTIONS(890), - [aux_sym_preproc_if_token1] = ACTIONS(890), - [aux_sym_preproc_ifdef_token1] = ACTIONS(890), - [aux_sym_preproc_ifdef_token2] = ACTIONS(890), - [sym_preproc_directive] = ACTIONS(890), - [anon_sym_LPAREN2] = ACTIONS(892), - [anon_sym_BANG] = ACTIONS(892), - [anon_sym_TILDE] = ACTIONS(892), - [anon_sym_DASH] = ACTIONS(890), - [anon_sym_PLUS] = ACTIONS(890), - [anon_sym_STAR] = ACTIONS(892), - [anon_sym_AMP] = ACTIONS(892), - [anon_sym_SEMI] = ACTIONS(892), - [anon_sym_typedef] = ACTIONS(890), - [anon_sym_extern] = ACTIONS(890), - [anon_sym___attribute__] = ACTIONS(890), - [anon_sym_LBRACK_LBRACK] = ACTIONS(892), - [anon_sym___declspec] = ACTIONS(890), - [anon_sym___cdecl] = ACTIONS(890), - [anon_sym___clrcall] = ACTIONS(890), - [anon_sym___stdcall] = ACTIONS(890), - [anon_sym___fastcall] = ACTIONS(890), - [anon_sym___thiscall] = ACTIONS(890), - [anon_sym___vectorcall] = ACTIONS(890), - [anon_sym_LBRACE] = ACTIONS(892), - [anon_sym_static] = ACTIONS(890), - [anon_sym_auto] = ACTIONS(890), - [anon_sym_register] = ACTIONS(890), - [anon_sym_inline] = ACTIONS(890), - [anon_sym_const] = ACTIONS(890), - [anon_sym_volatile] = ACTIONS(890), - [anon_sym_restrict] = ACTIONS(890), - [anon_sym__Atomic] = ACTIONS(890), - [anon_sym_signed] = ACTIONS(890), - [anon_sym_unsigned] = ACTIONS(890), - [anon_sym_long] = ACTIONS(890), - [anon_sym_short] = ACTIONS(890), - [sym_primitive_type] = ACTIONS(890), - [anon_sym_enum] = ACTIONS(890), - [anon_sym_struct] = ACTIONS(890), - [anon_sym_union] = ACTIONS(890), - [anon_sym_if] = ACTIONS(890), - [anon_sym_else] = ACTIONS(890), - [anon_sym_switch] = ACTIONS(890), - [anon_sym_case] = ACTIONS(890), - [anon_sym_default] = ACTIONS(890), - [anon_sym_while] = ACTIONS(890), - [anon_sym_do] = ACTIONS(890), - [anon_sym_for] = ACTIONS(890), - [anon_sym_return] = ACTIONS(890), - [anon_sym_break] = ACTIONS(890), - [anon_sym_continue] = ACTIONS(890), - [anon_sym_goto] = ACTIONS(890), - [anon_sym_DASH_DASH] = ACTIONS(892), - [anon_sym_PLUS_PLUS] = ACTIONS(892), - [anon_sym_sizeof] = ACTIONS(890), - [sym_number_literal] = ACTIONS(892), - [anon_sym_L_SQUOTE] = ACTIONS(892), - [anon_sym_u_SQUOTE] = ACTIONS(892), - [anon_sym_U_SQUOTE] = ACTIONS(892), - [anon_sym_u8_SQUOTE] = ACTIONS(892), - [anon_sym_SQUOTE] = ACTIONS(892), - [anon_sym_L_DQUOTE] = ACTIONS(892), - [anon_sym_u_DQUOTE] = ACTIONS(892), - [anon_sym_U_DQUOTE] = ACTIONS(892), - [anon_sym_u8_DQUOTE] = ACTIONS(892), - [anon_sym_DQUOTE] = ACTIONS(892), - [sym_true] = ACTIONS(890), - [sym_false] = ACTIONS(890), - [sym_null] = ACTIONS(890), - [sym_comment] = ACTIONS(3), - }, - [172] = { - [sym_identifier] = ACTIONS(902), - [aux_sym_preproc_include_token1] = ACTIONS(902), - [aux_sym_preproc_def_token1] = ACTIONS(902), - [aux_sym_preproc_if_token1] = ACTIONS(902), - [aux_sym_preproc_if_token2] = ACTIONS(902), - [aux_sym_preproc_ifdef_token1] = ACTIONS(902), - [aux_sym_preproc_ifdef_token2] = ACTIONS(902), - [sym_preproc_directive] = ACTIONS(902), - [anon_sym_LPAREN2] = ACTIONS(904), - [anon_sym_BANG] = ACTIONS(904), - [anon_sym_TILDE] = ACTIONS(904), - [anon_sym_DASH] = ACTIONS(902), - [anon_sym_PLUS] = ACTIONS(902), - [anon_sym_STAR] = ACTIONS(904), - [anon_sym_AMP] = ACTIONS(904), - [anon_sym_SEMI] = ACTIONS(904), - [anon_sym_typedef] = ACTIONS(902), - [anon_sym_extern] = ACTIONS(902), - [anon_sym___attribute__] = ACTIONS(902), - [anon_sym_LBRACK_LBRACK] = ACTIONS(904), - [anon_sym___declspec] = ACTIONS(902), - [anon_sym___cdecl] = ACTIONS(902), - [anon_sym___clrcall] = ACTIONS(902), - [anon_sym___stdcall] = ACTIONS(902), - [anon_sym___fastcall] = ACTIONS(902), - [anon_sym___thiscall] = ACTIONS(902), - [anon_sym___vectorcall] = ACTIONS(902), - [anon_sym_LBRACE] = ACTIONS(904), - [anon_sym_static] = ACTIONS(902), - [anon_sym_auto] = ACTIONS(902), - [anon_sym_register] = ACTIONS(902), - [anon_sym_inline] = ACTIONS(902), - [anon_sym_const] = ACTIONS(902), - [anon_sym_volatile] = ACTIONS(902), - [anon_sym_restrict] = ACTIONS(902), - [anon_sym__Atomic] = ACTIONS(902), - [anon_sym_signed] = ACTIONS(902), - [anon_sym_unsigned] = ACTIONS(902), - [anon_sym_long] = ACTIONS(902), - [anon_sym_short] = ACTIONS(902), - [sym_primitive_type] = ACTIONS(902), - [anon_sym_enum] = ACTIONS(902), - [anon_sym_struct] = ACTIONS(902), - [anon_sym_union] = ACTIONS(902), - [anon_sym_if] = ACTIONS(902), - [anon_sym_else] = ACTIONS(902), - [anon_sym_switch] = ACTIONS(902), - [anon_sym_case] = ACTIONS(902), - [anon_sym_default] = ACTIONS(902), - [anon_sym_while] = ACTIONS(902), - [anon_sym_do] = ACTIONS(902), - [anon_sym_for] = ACTIONS(902), - [anon_sym_return] = ACTIONS(902), - [anon_sym_break] = ACTIONS(902), - [anon_sym_continue] = ACTIONS(902), - [anon_sym_goto] = ACTIONS(902), - [anon_sym_DASH_DASH] = ACTIONS(904), - [anon_sym_PLUS_PLUS] = ACTIONS(904), - [anon_sym_sizeof] = ACTIONS(902), - [sym_number_literal] = ACTIONS(904), - [anon_sym_L_SQUOTE] = ACTIONS(904), - [anon_sym_u_SQUOTE] = ACTIONS(904), - [anon_sym_U_SQUOTE] = ACTIONS(904), - [anon_sym_u8_SQUOTE] = ACTIONS(904), - [anon_sym_SQUOTE] = ACTIONS(904), - [anon_sym_L_DQUOTE] = ACTIONS(904), - [anon_sym_u_DQUOTE] = ACTIONS(904), - [anon_sym_U_DQUOTE] = ACTIONS(904), - [anon_sym_u8_DQUOTE] = ACTIONS(904), - [anon_sym_DQUOTE] = ACTIONS(904), - [sym_true] = ACTIONS(902), - [sym_false] = ACTIONS(902), - [sym_null] = ACTIONS(902), - [sym_comment] = ACTIONS(3), - }, - [173] = { - [sym_attribute_declaration] = STATE(247), - [sym_compound_statement] = STATE(94), - [sym_attributed_statement] = STATE(94), - [sym_labeled_statement] = STATE(94), - [sym_expression_statement] = STATE(94), - [sym_if_statement] = STATE(94), - [sym_switch_statement] = STATE(94), - [sym_case_statement] = STATE(94), - [sym_while_statement] = STATE(94), - [sym_do_statement] = STATE(94), - [sym_for_statement] = STATE(94), - [sym_return_statement] = STATE(94), - [sym_break_statement] = STATE(94), - [sym_continue_statement] = STATE(94), - [sym_goto_statement] = STATE(94), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [sym_identifier] = ACTIONS(1209), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [174] = { - [ts_builtin_sym_end] = ACTIONS(954), - [sym_identifier] = ACTIONS(952), - [aux_sym_preproc_include_token1] = ACTIONS(952), - [aux_sym_preproc_def_token1] = ACTIONS(952), - [aux_sym_preproc_if_token1] = ACTIONS(952), - [aux_sym_preproc_ifdef_token1] = ACTIONS(952), - [aux_sym_preproc_ifdef_token2] = ACTIONS(952), - [sym_preproc_directive] = ACTIONS(952), - [anon_sym_LPAREN2] = ACTIONS(954), - [anon_sym_BANG] = ACTIONS(954), - [anon_sym_TILDE] = ACTIONS(954), - [anon_sym_DASH] = ACTIONS(952), - [anon_sym_PLUS] = ACTIONS(952), - [anon_sym_STAR] = ACTIONS(954), - [anon_sym_AMP] = ACTIONS(954), - [anon_sym_SEMI] = ACTIONS(954), - [anon_sym_typedef] = ACTIONS(952), - [anon_sym_extern] = ACTIONS(952), - [anon_sym___attribute__] = ACTIONS(952), - [anon_sym_LBRACK_LBRACK] = ACTIONS(954), - [anon_sym___declspec] = ACTIONS(952), - [anon_sym___cdecl] = ACTIONS(952), - [anon_sym___clrcall] = ACTIONS(952), - [anon_sym___stdcall] = ACTIONS(952), - [anon_sym___fastcall] = ACTIONS(952), - [anon_sym___thiscall] = ACTIONS(952), - [anon_sym___vectorcall] = ACTIONS(952), - [anon_sym_LBRACE] = ACTIONS(954), - [anon_sym_static] = ACTIONS(952), - [anon_sym_auto] = ACTIONS(952), - [anon_sym_register] = ACTIONS(952), - [anon_sym_inline] = ACTIONS(952), - [anon_sym_const] = ACTIONS(952), - [anon_sym_volatile] = ACTIONS(952), - [anon_sym_restrict] = ACTIONS(952), - [anon_sym__Atomic] = ACTIONS(952), - [anon_sym_signed] = ACTIONS(952), - [anon_sym_unsigned] = ACTIONS(952), - [anon_sym_long] = ACTIONS(952), - [anon_sym_short] = ACTIONS(952), - [sym_primitive_type] = ACTIONS(952), - [anon_sym_enum] = ACTIONS(952), - [anon_sym_struct] = ACTIONS(952), - [anon_sym_union] = ACTIONS(952), - [anon_sym_if] = ACTIONS(952), - [anon_sym_else] = ACTIONS(952), - [anon_sym_switch] = ACTIONS(952), - [anon_sym_case] = ACTIONS(952), - [anon_sym_default] = ACTIONS(952), - [anon_sym_while] = ACTIONS(952), - [anon_sym_do] = ACTIONS(952), - [anon_sym_for] = ACTIONS(952), - [anon_sym_return] = ACTIONS(952), - [anon_sym_break] = ACTIONS(952), - [anon_sym_continue] = ACTIONS(952), - [anon_sym_goto] = ACTIONS(952), - [anon_sym_DASH_DASH] = ACTIONS(954), - [anon_sym_PLUS_PLUS] = ACTIONS(954), - [anon_sym_sizeof] = ACTIONS(952), - [sym_number_literal] = ACTIONS(954), - [anon_sym_L_SQUOTE] = ACTIONS(954), - [anon_sym_u_SQUOTE] = ACTIONS(954), - [anon_sym_U_SQUOTE] = ACTIONS(954), - [anon_sym_u8_SQUOTE] = ACTIONS(954), - [anon_sym_SQUOTE] = ACTIONS(954), - [anon_sym_L_DQUOTE] = ACTIONS(954), - [anon_sym_u_DQUOTE] = ACTIONS(954), - [anon_sym_U_DQUOTE] = ACTIONS(954), - [anon_sym_u8_DQUOTE] = ACTIONS(954), - [anon_sym_DQUOTE] = ACTIONS(954), - [sym_true] = ACTIONS(952), - [sym_false] = ACTIONS(952), - [sym_null] = ACTIONS(952), - [sym_comment] = ACTIONS(3), - }, - [175] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(192), - [sym_attributed_statement] = STATE(192), - [sym_labeled_statement] = STATE(192), - [sym_expression_statement] = STATE(192), - [sym_if_statement] = STATE(192), - [sym_switch_statement] = STATE(192), - [sym_case_statement] = STATE(192), - [sym_while_statement] = STATE(192), - [sym_do_statement] = STATE(192), - [sym_for_statement] = STATE(192), - [sym_return_statement] = STATE(192), - [sym_break_statement] = STATE(192), - [sym_continue_statement] = STATE(192), - [sym_goto_statement] = STATE(192), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [176] = { - [sym_attribute_declaration] = STATE(153), - [sym_compound_statement] = STATE(201), - [sym_attributed_statement] = STATE(201), - [sym_labeled_statement] = STATE(201), - [sym_expression_statement] = STATE(201), - [sym_if_statement] = STATE(201), - [sym_switch_statement] = STATE(201), - [sym_case_statement] = STATE(201), - [sym_while_statement] = STATE(201), - [sym_do_statement] = STATE(201), - [sym_for_statement] = STATE(201), - [sym_return_statement] = STATE(201), - [sym_break_statement] = STATE(201), - [sym_continue_statement] = STATE(201), - [sym_goto_statement] = STATE(201), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [sym_identifier] = ACTIONS(1207), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [177] = { - [ts_builtin_sym_end] = ACTIONS(896), - [sym_identifier] = ACTIONS(894), - [aux_sym_preproc_include_token1] = ACTIONS(894), - [aux_sym_preproc_def_token1] = ACTIONS(894), - [aux_sym_preproc_if_token1] = ACTIONS(894), - [aux_sym_preproc_ifdef_token1] = ACTIONS(894), - [aux_sym_preproc_ifdef_token2] = ACTIONS(894), - [sym_preproc_directive] = ACTIONS(894), - [anon_sym_LPAREN2] = ACTIONS(896), - [anon_sym_BANG] = ACTIONS(896), - [anon_sym_TILDE] = ACTIONS(896), - [anon_sym_DASH] = ACTIONS(894), - [anon_sym_PLUS] = ACTIONS(894), - [anon_sym_STAR] = ACTIONS(896), - [anon_sym_AMP] = ACTIONS(896), - [anon_sym_SEMI] = ACTIONS(896), - [anon_sym_typedef] = ACTIONS(894), - [anon_sym_extern] = ACTIONS(894), - [anon_sym___attribute__] = ACTIONS(894), - [anon_sym_LBRACK_LBRACK] = ACTIONS(896), - [anon_sym___declspec] = ACTIONS(894), - [anon_sym___cdecl] = ACTIONS(894), - [anon_sym___clrcall] = ACTIONS(894), - [anon_sym___stdcall] = ACTIONS(894), - [anon_sym___fastcall] = ACTIONS(894), - [anon_sym___thiscall] = ACTIONS(894), - [anon_sym___vectorcall] = ACTIONS(894), - [anon_sym_LBRACE] = ACTIONS(896), - [anon_sym_static] = ACTIONS(894), - [anon_sym_auto] = ACTIONS(894), - [anon_sym_register] = ACTIONS(894), - [anon_sym_inline] = ACTIONS(894), - [anon_sym_const] = ACTIONS(894), - [anon_sym_volatile] = ACTIONS(894), - [anon_sym_restrict] = ACTIONS(894), - [anon_sym__Atomic] = ACTIONS(894), - [anon_sym_signed] = ACTIONS(894), - [anon_sym_unsigned] = ACTIONS(894), - [anon_sym_long] = ACTIONS(894), - [anon_sym_short] = ACTIONS(894), - [sym_primitive_type] = ACTIONS(894), - [anon_sym_enum] = ACTIONS(894), - [anon_sym_struct] = ACTIONS(894), - [anon_sym_union] = ACTIONS(894), - [anon_sym_if] = ACTIONS(894), - [anon_sym_else] = ACTIONS(894), - [anon_sym_switch] = ACTIONS(894), - [anon_sym_case] = ACTIONS(894), - [anon_sym_default] = ACTIONS(894), - [anon_sym_while] = ACTIONS(894), - [anon_sym_do] = ACTIONS(894), - [anon_sym_for] = ACTIONS(894), - [anon_sym_return] = ACTIONS(894), - [anon_sym_break] = ACTIONS(894), - [anon_sym_continue] = ACTIONS(894), - [anon_sym_goto] = ACTIONS(894), - [anon_sym_DASH_DASH] = ACTIONS(896), - [anon_sym_PLUS_PLUS] = ACTIONS(896), - [anon_sym_sizeof] = ACTIONS(894), - [sym_number_literal] = ACTIONS(896), - [anon_sym_L_SQUOTE] = ACTIONS(896), - [anon_sym_u_SQUOTE] = ACTIONS(896), - [anon_sym_U_SQUOTE] = ACTIONS(896), - [anon_sym_u8_SQUOTE] = ACTIONS(896), - [anon_sym_SQUOTE] = ACTIONS(896), - [anon_sym_L_DQUOTE] = ACTIONS(896), - [anon_sym_u_DQUOTE] = ACTIONS(896), - [anon_sym_U_DQUOTE] = ACTIONS(896), - [anon_sym_u8_DQUOTE] = ACTIONS(896), - [anon_sym_DQUOTE] = ACTIONS(896), - [sym_true] = ACTIONS(894), - [sym_false] = ACTIONS(894), - [sym_null] = ACTIONS(894), - [sym_comment] = ACTIONS(3), - }, - [178] = { - [sym_attribute_declaration] = STATE(247), - [sym_compound_statement] = STATE(92), - [sym_attributed_statement] = STATE(92), - [sym_labeled_statement] = STATE(92), - [sym_expression_statement] = STATE(92), - [sym_if_statement] = STATE(92), - [sym_switch_statement] = STATE(92), - [sym_case_statement] = STATE(92), - [sym_while_statement] = STATE(92), - [sym_do_statement] = STATE(92), - [sym_for_statement] = STATE(92), - [sym_return_statement] = STATE(92), - [sym_break_statement] = STATE(92), - [sym_continue_statement] = STATE(92), - [sym_goto_statement] = STATE(92), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [sym_identifier] = ACTIONS(1209), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [179] = { - [sym_attribute_declaration] = STATE(247), - [sym_compound_statement] = STATE(91), - [sym_attributed_statement] = STATE(91), - [sym_labeled_statement] = STATE(91), - [sym_expression_statement] = STATE(91), - [sym_if_statement] = STATE(91), - [sym_switch_statement] = STATE(91), - [sym_case_statement] = STATE(91), - [sym_while_statement] = STATE(91), - [sym_do_statement] = STATE(91), - [sym_for_statement] = STATE(91), - [sym_return_statement] = STATE(91), - [sym_break_statement] = STATE(91), - [sym_continue_statement] = STATE(91), - [sym_goto_statement] = STATE(91), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [sym_identifier] = ACTIONS(1209), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [180] = { - [sym_attribute_declaration] = STATE(247), - [sym_compound_statement] = STATE(90), - [sym_attributed_statement] = STATE(90), - [sym_labeled_statement] = STATE(90), - [sym_expression_statement] = STATE(90), - [sym_if_statement] = STATE(90), - [sym_switch_statement] = STATE(90), - [sym_case_statement] = STATE(90), - [sym_while_statement] = STATE(90), - [sym_do_statement] = STATE(90), - [sym_for_statement] = STATE(90), - [sym_return_statement] = STATE(90), - [sym_break_statement] = STATE(90), - [sym_continue_statement] = STATE(90), - [sym_goto_statement] = STATE(90), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [sym_identifier] = ACTIONS(1209), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [181] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(196), - [sym_attributed_statement] = STATE(196), - [sym_labeled_statement] = STATE(196), - [sym_expression_statement] = STATE(196), - [sym_if_statement] = STATE(196), - [sym_switch_statement] = STATE(196), - [sym_case_statement] = STATE(196), - [sym_while_statement] = STATE(196), - [sym_do_statement] = STATE(196), - [sym_for_statement] = STATE(196), - [sym_return_statement] = STATE(196), - [sym_break_statement] = STATE(196), - [sym_continue_statement] = STATE(196), - [sym_goto_statement] = STATE(196), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [182] = { - [sym_attribute_declaration] = STATE(247), - [sym_compound_statement] = STATE(89), - [sym_attributed_statement] = STATE(89), - [sym_labeled_statement] = STATE(89), - [sym_expression_statement] = STATE(89), - [sym_if_statement] = STATE(89), - [sym_switch_statement] = STATE(89), - [sym_case_statement] = STATE(89), - [sym_while_statement] = STATE(89), - [sym_do_statement] = STATE(89), - [sym_for_statement] = STATE(89), - [sym_return_statement] = STATE(89), - [sym_break_statement] = STATE(89), - [sym_continue_statement] = STATE(89), - [sym_goto_statement] = STATE(89), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [sym_identifier] = ACTIONS(1209), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [183] = { - [sym_attribute_declaration] = STATE(247), - [sym_compound_statement] = STATE(86), - [sym_attributed_statement] = STATE(86), - [sym_labeled_statement] = STATE(86), - [sym_expression_statement] = STATE(86), - [sym_if_statement] = STATE(86), - [sym_switch_statement] = STATE(86), - [sym_case_statement] = STATE(86), - [sym_while_statement] = STATE(86), - [sym_do_statement] = STATE(86), - [sym_for_statement] = STATE(86), - [sym_return_statement] = STATE(86), - [sym_break_statement] = STATE(86), - [sym_continue_statement] = STATE(86), - [sym_goto_statement] = STATE(86), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [sym_identifier] = ACTIONS(1209), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [184] = { - [sym_identifier] = ACTIONS(890), - [aux_sym_preproc_include_token1] = ACTIONS(890), - [aux_sym_preproc_def_token1] = ACTIONS(890), - [aux_sym_preproc_if_token1] = ACTIONS(890), - [aux_sym_preproc_if_token2] = ACTIONS(890), - [aux_sym_preproc_ifdef_token1] = ACTIONS(890), - [aux_sym_preproc_ifdef_token2] = ACTIONS(890), - [sym_preproc_directive] = ACTIONS(890), - [anon_sym_LPAREN2] = ACTIONS(892), - [anon_sym_BANG] = ACTIONS(892), - [anon_sym_TILDE] = ACTIONS(892), - [anon_sym_DASH] = ACTIONS(890), - [anon_sym_PLUS] = ACTIONS(890), - [anon_sym_STAR] = ACTIONS(892), - [anon_sym_AMP] = ACTIONS(892), - [anon_sym_SEMI] = ACTIONS(892), - [anon_sym_typedef] = ACTIONS(890), - [anon_sym_extern] = ACTIONS(890), - [anon_sym___attribute__] = ACTIONS(890), - [anon_sym_LBRACK_LBRACK] = ACTIONS(892), - [anon_sym___declspec] = ACTIONS(890), - [anon_sym___cdecl] = ACTIONS(890), - [anon_sym___clrcall] = ACTIONS(890), - [anon_sym___stdcall] = ACTIONS(890), - [anon_sym___fastcall] = ACTIONS(890), - [anon_sym___thiscall] = ACTIONS(890), - [anon_sym___vectorcall] = ACTIONS(890), - [anon_sym_LBRACE] = ACTIONS(892), - [anon_sym_static] = ACTIONS(890), - [anon_sym_auto] = ACTIONS(890), - [anon_sym_register] = ACTIONS(890), - [anon_sym_inline] = ACTIONS(890), - [anon_sym_const] = ACTIONS(890), - [anon_sym_volatile] = ACTIONS(890), - [anon_sym_restrict] = ACTIONS(890), - [anon_sym__Atomic] = ACTIONS(890), - [anon_sym_signed] = ACTIONS(890), - [anon_sym_unsigned] = ACTIONS(890), - [anon_sym_long] = ACTIONS(890), - [anon_sym_short] = ACTIONS(890), - [sym_primitive_type] = ACTIONS(890), - [anon_sym_enum] = ACTIONS(890), - [anon_sym_struct] = ACTIONS(890), - [anon_sym_union] = ACTIONS(890), - [anon_sym_if] = ACTIONS(890), - [anon_sym_else] = ACTIONS(890), - [anon_sym_switch] = ACTIONS(890), - [anon_sym_case] = ACTIONS(890), - [anon_sym_default] = ACTIONS(890), - [anon_sym_while] = ACTIONS(890), - [anon_sym_do] = ACTIONS(890), - [anon_sym_for] = ACTIONS(890), - [anon_sym_return] = ACTIONS(890), - [anon_sym_break] = ACTIONS(890), - [anon_sym_continue] = ACTIONS(890), - [anon_sym_goto] = ACTIONS(890), - [anon_sym_DASH_DASH] = ACTIONS(892), - [anon_sym_PLUS_PLUS] = ACTIONS(892), - [anon_sym_sizeof] = ACTIONS(890), - [sym_number_literal] = ACTIONS(892), - [anon_sym_L_SQUOTE] = ACTIONS(892), - [anon_sym_u_SQUOTE] = ACTIONS(892), - [anon_sym_U_SQUOTE] = ACTIONS(892), - [anon_sym_u8_SQUOTE] = ACTIONS(892), - [anon_sym_SQUOTE] = ACTIONS(892), - [anon_sym_L_DQUOTE] = ACTIONS(892), - [anon_sym_u_DQUOTE] = ACTIONS(892), - [anon_sym_U_DQUOTE] = ACTIONS(892), - [anon_sym_u8_DQUOTE] = ACTIONS(892), - [anon_sym_DQUOTE] = ACTIONS(892), - [sym_true] = ACTIONS(890), - [sym_false] = ACTIONS(890), - [sym_null] = ACTIONS(890), - [sym_comment] = ACTIONS(3), - }, - [185] = { - [sym_identifier] = ACTIONS(890), - [aux_sym_preproc_include_token1] = ACTIONS(890), - [aux_sym_preproc_def_token1] = ACTIONS(890), - [aux_sym_preproc_if_token1] = ACTIONS(890), - [aux_sym_preproc_if_token2] = ACTIONS(890), - [aux_sym_preproc_ifdef_token1] = ACTIONS(890), - [aux_sym_preproc_ifdef_token2] = ACTIONS(890), - [sym_preproc_directive] = ACTIONS(890), - [anon_sym_LPAREN2] = ACTIONS(892), - [anon_sym_BANG] = ACTIONS(892), - [anon_sym_TILDE] = ACTIONS(892), - [anon_sym_DASH] = ACTIONS(890), - [anon_sym_PLUS] = ACTIONS(890), - [anon_sym_STAR] = ACTIONS(892), - [anon_sym_AMP] = ACTIONS(892), - [anon_sym_SEMI] = ACTIONS(892), - [anon_sym_typedef] = ACTIONS(890), - [anon_sym_extern] = ACTIONS(890), - [anon_sym___attribute__] = ACTIONS(890), - [anon_sym_LBRACK_LBRACK] = ACTIONS(892), - [anon_sym___declspec] = ACTIONS(890), - [anon_sym___cdecl] = ACTIONS(890), - [anon_sym___clrcall] = ACTIONS(890), - [anon_sym___stdcall] = ACTIONS(890), - [anon_sym___fastcall] = ACTIONS(890), - [anon_sym___thiscall] = ACTIONS(890), - [anon_sym___vectorcall] = ACTIONS(890), - [anon_sym_LBRACE] = ACTIONS(892), - [anon_sym_static] = ACTIONS(890), - [anon_sym_auto] = ACTIONS(890), - [anon_sym_register] = ACTIONS(890), - [anon_sym_inline] = ACTIONS(890), - [anon_sym_const] = ACTIONS(890), - [anon_sym_volatile] = ACTIONS(890), - [anon_sym_restrict] = ACTIONS(890), - [anon_sym__Atomic] = ACTIONS(890), - [anon_sym_signed] = ACTIONS(890), - [anon_sym_unsigned] = ACTIONS(890), - [anon_sym_long] = ACTIONS(890), - [anon_sym_short] = ACTIONS(890), - [sym_primitive_type] = ACTIONS(890), - [anon_sym_enum] = ACTIONS(890), - [anon_sym_struct] = ACTIONS(890), - [anon_sym_union] = ACTIONS(890), - [anon_sym_if] = ACTIONS(890), - [anon_sym_else] = ACTIONS(890), - [anon_sym_switch] = ACTIONS(890), - [anon_sym_case] = ACTIONS(890), - [anon_sym_default] = ACTIONS(890), - [anon_sym_while] = ACTIONS(890), - [anon_sym_do] = ACTIONS(890), - [anon_sym_for] = ACTIONS(890), - [anon_sym_return] = ACTIONS(890), - [anon_sym_break] = ACTIONS(890), - [anon_sym_continue] = ACTIONS(890), - [anon_sym_goto] = ACTIONS(890), - [anon_sym_DASH_DASH] = ACTIONS(892), - [anon_sym_PLUS_PLUS] = ACTIONS(892), - [anon_sym_sizeof] = ACTIONS(890), - [sym_number_literal] = ACTIONS(892), - [anon_sym_L_SQUOTE] = ACTIONS(892), - [anon_sym_u_SQUOTE] = ACTIONS(892), - [anon_sym_U_SQUOTE] = ACTIONS(892), - [anon_sym_u8_SQUOTE] = ACTIONS(892), - [anon_sym_SQUOTE] = ACTIONS(892), - [anon_sym_L_DQUOTE] = ACTIONS(892), - [anon_sym_u_DQUOTE] = ACTIONS(892), - [anon_sym_U_DQUOTE] = ACTIONS(892), - [anon_sym_u8_DQUOTE] = ACTIONS(892), - [anon_sym_DQUOTE] = ACTIONS(892), - [sym_true] = ACTIONS(890), - [sym_false] = ACTIONS(890), - [sym_null] = ACTIONS(890), - [sym_comment] = ACTIONS(3), - }, - [186] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(197), - [sym_attributed_statement] = STATE(197), - [sym_labeled_statement] = STATE(197), - [sym_expression_statement] = STATE(197), - [sym_if_statement] = STATE(197), - [sym_switch_statement] = STATE(197), - [sym_case_statement] = STATE(197), - [sym_while_statement] = STATE(197), - [sym_do_statement] = STATE(197), - [sym_for_statement] = STATE(197), - [sym_return_statement] = STATE(197), - [sym_break_statement] = STATE(197), - [sym_continue_statement] = STATE(197), - [sym_goto_statement] = STATE(197), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [187] = { - [sym_attribute_declaration] = STATE(247), - [sym_compound_statement] = STATE(69), - [sym_attributed_statement] = STATE(69), - [sym_labeled_statement] = STATE(69), - [sym_expression_statement] = STATE(69), - [sym_if_statement] = STATE(69), - [sym_switch_statement] = STATE(69), - [sym_case_statement] = STATE(69), - [sym_while_statement] = STATE(69), - [sym_do_statement] = STATE(69), - [sym_for_statement] = STATE(69), - [sym_return_statement] = STATE(69), - [sym_break_statement] = STATE(69), - [sym_continue_statement] = STATE(69), - [sym_goto_statement] = STATE(69), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [sym_identifier] = ACTIONS(1209), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [188] = { - [sym_attribute_declaration] = STATE(247), - [sym_compound_statement] = STATE(84), - [sym_attributed_statement] = STATE(84), - [sym_labeled_statement] = STATE(84), - [sym_expression_statement] = STATE(84), - [sym_if_statement] = STATE(84), - [sym_switch_statement] = STATE(84), - [sym_case_statement] = STATE(84), - [sym_while_statement] = STATE(84), - [sym_do_statement] = STATE(84), - [sym_for_statement] = STATE(84), - [sym_return_statement] = STATE(84), - [sym_break_statement] = STATE(84), - [sym_continue_statement] = STATE(84), - [sym_goto_statement] = STATE(84), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [sym_identifier] = ACTIONS(1209), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [189] = { - [ts_builtin_sym_end] = ACTIONS(1026), - [sym_identifier] = ACTIONS(1024), - [aux_sym_preproc_include_token1] = ACTIONS(1024), - [aux_sym_preproc_def_token1] = ACTIONS(1024), - [aux_sym_preproc_if_token1] = ACTIONS(1024), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1024), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1024), - [sym_preproc_directive] = ACTIONS(1024), - [anon_sym_LPAREN2] = ACTIONS(1026), - [anon_sym_BANG] = ACTIONS(1026), - [anon_sym_TILDE] = ACTIONS(1026), - [anon_sym_DASH] = ACTIONS(1024), - [anon_sym_PLUS] = ACTIONS(1024), - [anon_sym_STAR] = ACTIONS(1026), - [anon_sym_AMP] = ACTIONS(1026), - [anon_sym_SEMI] = ACTIONS(1026), - [anon_sym_typedef] = ACTIONS(1024), - [anon_sym_extern] = ACTIONS(1024), - [anon_sym___attribute__] = ACTIONS(1024), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1026), - [anon_sym___declspec] = ACTIONS(1024), - [anon_sym___cdecl] = ACTIONS(1024), - [anon_sym___clrcall] = ACTIONS(1024), - [anon_sym___stdcall] = ACTIONS(1024), - [anon_sym___fastcall] = ACTIONS(1024), - [anon_sym___thiscall] = ACTIONS(1024), - [anon_sym___vectorcall] = ACTIONS(1024), - [anon_sym_LBRACE] = ACTIONS(1026), - [anon_sym_static] = ACTIONS(1024), - [anon_sym_auto] = ACTIONS(1024), - [anon_sym_register] = ACTIONS(1024), - [anon_sym_inline] = ACTIONS(1024), - [anon_sym_const] = ACTIONS(1024), - [anon_sym_volatile] = ACTIONS(1024), - [anon_sym_restrict] = ACTIONS(1024), - [anon_sym__Atomic] = ACTIONS(1024), - [anon_sym_signed] = ACTIONS(1024), - [anon_sym_unsigned] = ACTIONS(1024), - [anon_sym_long] = ACTIONS(1024), - [anon_sym_short] = ACTIONS(1024), - [sym_primitive_type] = ACTIONS(1024), - [anon_sym_enum] = ACTIONS(1024), - [anon_sym_struct] = ACTIONS(1024), - [anon_sym_union] = ACTIONS(1024), - [anon_sym_if] = ACTIONS(1024), - [anon_sym_else] = ACTIONS(1024), - [anon_sym_switch] = ACTIONS(1024), - [anon_sym_case] = ACTIONS(1024), - [anon_sym_default] = ACTIONS(1024), - [anon_sym_while] = ACTIONS(1024), - [anon_sym_do] = ACTIONS(1024), - [anon_sym_for] = ACTIONS(1024), - [anon_sym_return] = ACTIONS(1024), - [anon_sym_break] = ACTIONS(1024), - [anon_sym_continue] = ACTIONS(1024), - [anon_sym_goto] = ACTIONS(1024), - [anon_sym_DASH_DASH] = ACTIONS(1026), - [anon_sym_PLUS_PLUS] = ACTIONS(1026), - [anon_sym_sizeof] = ACTIONS(1024), - [sym_number_literal] = ACTIONS(1026), - [anon_sym_L_SQUOTE] = ACTIONS(1026), - [anon_sym_u_SQUOTE] = ACTIONS(1026), - [anon_sym_U_SQUOTE] = ACTIONS(1026), - [anon_sym_u8_SQUOTE] = ACTIONS(1026), - [anon_sym_SQUOTE] = ACTIONS(1026), - [anon_sym_L_DQUOTE] = ACTIONS(1026), - [anon_sym_u_DQUOTE] = ACTIONS(1026), - [anon_sym_U_DQUOTE] = ACTIONS(1026), - [anon_sym_u8_DQUOTE] = ACTIONS(1026), - [anon_sym_DQUOTE] = ACTIONS(1026), - [sym_true] = ACTIONS(1024), - [sym_false] = ACTIONS(1024), - [sym_null] = ACTIONS(1024), - [sym_comment] = ACTIONS(3), - }, - [190] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(204), - [sym_attributed_statement] = STATE(204), - [sym_labeled_statement] = STATE(204), - [sym_expression_statement] = STATE(204), - [sym_if_statement] = STATE(204), - [sym_switch_statement] = STATE(204), - [sym_case_statement] = STATE(204), - [sym_while_statement] = STATE(204), - [sym_do_statement] = STATE(204), - [sym_for_statement] = STATE(204), - [sym_return_statement] = STATE(204), - [sym_break_statement] = STATE(204), - [sym_continue_statement] = STATE(204), - [sym_goto_statement] = STATE(204), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [191] = { - [sym_identifier] = ACTIONS(960), - [aux_sym_preproc_include_token1] = ACTIONS(960), - [aux_sym_preproc_def_token1] = ACTIONS(960), - [aux_sym_preproc_if_token1] = ACTIONS(960), - [aux_sym_preproc_if_token2] = ACTIONS(960), - [aux_sym_preproc_ifdef_token1] = ACTIONS(960), - [aux_sym_preproc_ifdef_token2] = ACTIONS(960), - [sym_preproc_directive] = ACTIONS(960), - [anon_sym_LPAREN2] = ACTIONS(962), - [anon_sym_BANG] = ACTIONS(962), - [anon_sym_TILDE] = ACTIONS(962), - [anon_sym_DASH] = ACTIONS(960), - [anon_sym_PLUS] = ACTIONS(960), - [anon_sym_STAR] = ACTIONS(962), - [anon_sym_AMP] = ACTIONS(962), - [anon_sym_SEMI] = ACTIONS(962), - [anon_sym_typedef] = ACTIONS(960), - [anon_sym_extern] = ACTIONS(960), - [anon_sym___attribute__] = ACTIONS(960), - [anon_sym_LBRACK_LBRACK] = ACTIONS(962), - [anon_sym___declspec] = ACTIONS(960), - [anon_sym___cdecl] = ACTIONS(960), - [anon_sym___clrcall] = ACTIONS(960), - [anon_sym___stdcall] = ACTIONS(960), - [anon_sym___fastcall] = ACTIONS(960), - [anon_sym___thiscall] = ACTIONS(960), - [anon_sym___vectorcall] = ACTIONS(960), - [anon_sym_LBRACE] = ACTIONS(962), - [anon_sym_static] = ACTIONS(960), - [anon_sym_auto] = ACTIONS(960), - [anon_sym_register] = ACTIONS(960), - [anon_sym_inline] = ACTIONS(960), - [anon_sym_const] = ACTIONS(960), - [anon_sym_volatile] = ACTIONS(960), - [anon_sym_restrict] = ACTIONS(960), - [anon_sym__Atomic] = ACTIONS(960), - [anon_sym_signed] = ACTIONS(960), - [anon_sym_unsigned] = ACTIONS(960), - [anon_sym_long] = ACTIONS(960), - [anon_sym_short] = ACTIONS(960), - [sym_primitive_type] = ACTIONS(960), - [anon_sym_enum] = ACTIONS(960), - [anon_sym_struct] = ACTIONS(960), - [anon_sym_union] = ACTIONS(960), - [anon_sym_if] = ACTIONS(960), - [anon_sym_else] = ACTIONS(960), - [anon_sym_switch] = ACTIONS(960), - [anon_sym_case] = ACTIONS(960), - [anon_sym_default] = ACTIONS(960), - [anon_sym_while] = ACTIONS(960), - [anon_sym_do] = ACTIONS(960), - [anon_sym_for] = ACTIONS(960), - [anon_sym_return] = ACTIONS(960), - [anon_sym_break] = ACTIONS(960), - [anon_sym_continue] = ACTIONS(960), - [anon_sym_goto] = ACTIONS(960), - [anon_sym_DASH_DASH] = ACTIONS(962), - [anon_sym_PLUS_PLUS] = ACTIONS(962), - [anon_sym_sizeof] = ACTIONS(960), - [sym_number_literal] = ACTIONS(962), - [anon_sym_L_SQUOTE] = ACTIONS(962), - [anon_sym_u_SQUOTE] = ACTIONS(962), - [anon_sym_U_SQUOTE] = ACTIONS(962), - [anon_sym_u8_SQUOTE] = ACTIONS(962), - [anon_sym_SQUOTE] = ACTIONS(962), - [anon_sym_L_DQUOTE] = ACTIONS(962), - [anon_sym_u_DQUOTE] = ACTIONS(962), - [anon_sym_U_DQUOTE] = ACTIONS(962), - [anon_sym_u8_DQUOTE] = ACTIONS(962), - [anon_sym_DQUOTE] = ACTIONS(962), - [sym_true] = ACTIONS(960), - [sym_false] = ACTIONS(960), - [sym_null] = ACTIONS(960), - [sym_comment] = ACTIONS(3), - }, - [192] = { - [ts_builtin_sym_end] = ACTIONS(958), - [sym_identifier] = ACTIONS(956), - [aux_sym_preproc_include_token1] = ACTIONS(956), - [aux_sym_preproc_def_token1] = ACTIONS(956), - [aux_sym_preproc_if_token1] = ACTIONS(956), - [aux_sym_preproc_ifdef_token1] = ACTIONS(956), - [aux_sym_preproc_ifdef_token2] = ACTIONS(956), - [sym_preproc_directive] = ACTIONS(956), - [anon_sym_LPAREN2] = ACTIONS(958), - [anon_sym_BANG] = ACTIONS(958), - [anon_sym_TILDE] = ACTIONS(958), - [anon_sym_DASH] = ACTIONS(956), - [anon_sym_PLUS] = ACTIONS(956), - [anon_sym_STAR] = ACTIONS(958), - [anon_sym_AMP] = ACTIONS(958), - [anon_sym_SEMI] = ACTIONS(958), - [anon_sym_typedef] = ACTIONS(956), - [anon_sym_extern] = ACTIONS(956), - [anon_sym___attribute__] = ACTIONS(956), - [anon_sym_LBRACK_LBRACK] = ACTIONS(958), - [anon_sym___declspec] = ACTIONS(956), - [anon_sym___cdecl] = ACTIONS(956), - [anon_sym___clrcall] = ACTIONS(956), - [anon_sym___stdcall] = ACTIONS(956), - [anon_sym___fastcall] = ACTIONS(956), - [anon_sym___thiscall] = ACTIONS(956), - [anon_sym___vectorcall] = ACTIONS(956), - [anon_sym_LBRACE] = ACTIONS(958), - [anon_sym_static] = ACTIONS(956), - [anon_sym_auto] = ACTIONS(956), - [anon_sym_register] = ACTIONS(956), - [anon_sym_inline] = ACTIONS(956), - [anon_sym_const] = ACTIONS(956), - [anon_sym_volatile] = ACTIONS(956), - [anon_sym_restrict] = ACTIONS(956), - [anon_sym__Atomic] = ACTIONS(956), - [anon_sym_signed] = ACTIONS(956), - [anon_sym_unsigned] = ACTIONS(956), - [anon_sym_long] = ACTIONS(956), - [anon_sym_short] = ACTIONS(956), - [sym_primitive_type] = ACTIONS(956), - [anon_sym_enum] = ACTIONS(956), - [anon_sym_struct] = ACTIONS(956), - [anon_sym_union] = ACTIONS(956), - [anon_sym_if] = ACTIONS(956), - [anon_sym_else] = ACTIONS(956), - [anon_sym_switch] = ACTIONS(956), - [anon_sym_case] = ACTIONS(956), - [anon_sym_default] = ACTIONS(956), - [anon_sym_while] = ACTIONS(956), - [anon_sym_do] = ACTIONS(956), - [anon_sym_for] = ACTIONS(956), - [anon_sym_return] = ACTIONS(956), - [anon_sym_break] = ACTIONS(956), - [anon_sym_continue] = ACTIONS(956), - [anon_sym_goto] = ACTIONS(956), - [anon_sym_DASH_DASH] = ACTIONS(958), - [anon_sym_PLUS_PLUS] = ACTIONS(958), - [anon_sym_sizeof] = ACTIONS(956), - [sym_number_literal] = ACTIONS(958), - [anon_sym_L_SQUOTE] = ACTIONS(958), - [anon_sym_u_SQUOTE] = ACTIONS(958), - [anon_sym_U_SQUOTE] = ACTIONS(958), - [anon_sym_u8_SQUOTE] = ACTIONS(958), - [anon_sym_SQUOTE] = ACTIONS(958), - [anon_sym_L_DQUOTE] = ACTIONS(958), - [anon_sym_u_DQUOTE] = ACTIONS(958), - [anon_sym_U_DQUOTE] = ACTIONS(958), - [anon_sym_u8_DQUOTE] = ACTIONS(958), - [anon_sym_DQUOTE] = ACTIONS(958), - [sym_true] = ACTIONS(956), - [sym_false] = ACTIONS(956), - [sym_null] = ACTIONS(956), - [sym_comment] = ACTIONS(3), - }, - [193] = { - [ts_builtin_sym_end] = ACTIONS(970), - [sym_identifier] = ACTIONS(968), - [aux_sym_preproc_include_token1] = ACTIONS(968), - [aux_sym_preproc_def_token1] = ACTIONS(968), - [aux_sym_preproc_if_token1] = ACTIONS(968), - [aux_sym_preproc_ifdef_token1] = ACTIONS(968), - [aux_sym_preproc_ifdef_token2] = ACTIONS(968), - [sym_preproc_directive] = ACTIONS(968), - [anon_sym_LPAREN2] = ACTIONS(970), - [anon_sym_BANG] = ACTIONS(970), - [anon_sym_TILDE] = ACTIONS(970), - [anon_sym_DASH] = ACTIONS(968), - [anon_sym_PLUS] = ACTIONS(968), - [anon_sym_STAR] = ACTIONS(970), - [anon_sym_AMP] = ACTIONS(970), - [anon_sym_SEMI] = ACTIONS(970), - [anon_sym_typedef] = ACTIONS(968), - [anon_sym_extern] = ACTIONS(968), - [anon_sym___attribute__] = ACTIONS(968), - [anon_sym_LBRACK_LBRACK] = ACTIONS(970), - [anon_sym___declspec] = ACTIONS(968), - [anon_sym___cdecl] = ACTIONS(968), - [anon_sym___clrcall] = ACTIONS(968), - [anon_sym___stdcall] = ACTIONS(968), - [anon_sym___fastcall] = ACTIONS(968), - [anon_sym___thiscall] = ACTIONS(968), - [anon_sym___vectorcall] = ACTIONS(968), - [anon_sym_LBRACE] = ACTIONS(970), - [anon_sym_static] = ACTIONS(968), - [anon_sym_auto] = ACTIONS(968), - [anon_sym_register] = ACTIONS(968), - [anon_sym_inline] = ACTIONS(968), - [anon_sym_const] = ACTIONS(968), - [anon_sym_volatile] = ACTIONS(968), - [anon_sym_restrict] = ACTIONS(968), - [anon_sym__Atomic] = ACTIONS(968), - [anon_sym_signed] = ACTIONS(968), - [anon_sym_unsigned] = ACTIONS(968), - [anon_sym_long] = ACTIONS(968), - [anon_sym_short] = ACTIONS(968), - [sym_primitive_type] = ACTIONS(968), - [anon_sym_enum] = ACTIONS(968), - [anon_sym_struct] = ACTIONS(968), - [anon_sym_union] = ACTIONS(968), - [anon_sym_if] = ACTIONS(968), - [anon_sym_else] = ACTIONS(968), - [anon_sym_switch] = ACTIONS(968), - [anon_sym_case] = ACTIONS(968), - [anon_sym_default] = ACTIONS(968), - [anon_sym_while] = ACTIONS(968), - [anon_sym_do] = ACTIONS(968), - [anon_sym_for] = ACTIONS(968), - [anon_sym_return] = ACTIONS(968), - [anon_sym_break] = ACTIONS(968), - [anon_sym_continue] = ACTIONS(968), - [anon_sym_goto] = ACTIONS(968), - [anon_sym_DASH_DASH] = ACTIONS(970), - [anon_sym_PLUS_PLUS] = ACTIONS(970), - [anon_sym_sizeof] = ACTIONS(968), - [sym_number_literal] = ACTIONS(970), - [anon_sym_L_SQUOTE] = ACTIONS(970), - [anon_sym_u_SQUOTE] = ACTIONS(970), - [anon_sym_U_SQUOTE] = ACTIONS(970), - [anon_sym_u8_SQUOTE] = ACTIONS(970), - [anon_sym_SQUOTE] = ACTIONS(970), - [anon_sym_L_DQUOTE] = ACTIONS(970), - [anon_sym_u_DQUOTE] = ACTIONS(970), - [anon_sym_U_DQUOTE] = ACTIONS(970), - [anon_sym_u8_DQUOTE] = ACTIONS(970), - [anon_sym_DQUOTE] = ACTIONS(970), - [sym_true] = ACTIONS(968), - [sym_false] = ACTIONS(968), - [sym_null] = ACTIONS(968), - [sym_comment] = ACTIONS(3), - }, - [194] = { - [sym_identifier] = ACTIONS(924), - [aux_sym_preproc_include_token1] = ACTIONS(924), - [aux_sym_preproc_def_token1] = ACTIONS(924), - [aux_sym_preproc_if_token1] = ACTIONS(924), - [aux_sym_preproc_if_token2] = ACTIONS(924), - [aux_sym_preproc_ifdef_token1] = ACTIONS(924), - [aux_sym_preproc_ifdef_token2] = ACTIONS(924), - [sym_preproc_directive] = ACTIONS(924), - [anon_sym_LPAREN2] = ACTIONS(926), - [anon_sym_BANG] = ACTIONS(926), - [anon_sym_TILDE] = ACTIONS(926), - [anon_sym_DASH] = ACTIONS(924), - [anon_sym_PLUS] = ACTIONS(924), - [anon_sym_STAR] = ACTIONS(926), - [anon_sym_AMP] = ACTIONS(926), - [anon_sym_SEMI] = ACTIONS(926), - [anon_sym_typedef] = ACTIONS(924), - [anon_sym_extern] = ACTIONS(924), - [anon_sym___attribute__] = ACTIONS(924), - [anon_sym_LBRACK_LBRACK] = ACTIONS(926), - [anon_sym___declspec] = ACTIONS(924), - [anon_sym___cdecl] = ACTIONS(924), - [anon_sym___clrcall] = ACTIONS(924), - [anon_sym___stdcall] = ACTIONS(924), - [anon_sym___fastcall] = ACTIONS(924), - [anon_sym___thiscall] = ACTIONS(924), - [anon_sym___vectorcall] = ACTIONS(924), - [anon_sym_LBRACE] = ACTIONS(926), - [anon_sym_static] = ACTIONS(924), - [anon_sym_auto] = ACTIONS(924), - [anon_sym_register] = ACTIONS(924), - [anon_sym_inline] = ACTIONS(924), - [anon_sym_const] = ACTIONS(924), - [anon_sym_volatile] = ACTIONS(924), - [anon_sym_restrict] = ACTIONS(924), - [anon_sym__Atomic] = ACTIONS(924), - [anon_sym_signed] = ACTIONS(924), - [anon_sym_unsigned] = ACTIONS(924), - [anon_sym_long] = ACTIONS(924), - [anon_sym_short] = ACTIONS(924), - [sym_primitive_type] = ACTIONS(924), - [anon_sym_enum] = ACTIONS(924), - [anon_sym_struct] = ACTIONS(924), - [anon_sym_union] = ACTIONS(924), - [anon_sym_if] = ACTIONS(924), - [anon_sym_else] = ACTIONS(924), - [anon_sym_switch] = ACTIONS(924), - [anon_sym_case] = ACTIONS(924), - [anon_sym_default] = ACTIONS(924), - [anon_sym_while] = ACTIONS(924), - [anon_sym_do] = ACTIONS(924), - [anon_sym_for] = ACTIONS(924), - [anon_sym_return] = ACTIONS(924), - [anon_sym_break] = ACTIONS(924), - [anon_sym_continue] = ACTIONS(924), - [anon_sym_goto] = ACTIONS(924), - [anon_sym_DASH_DASH] = ACTIONS(926), - [anon_sym_PLUS_PLUS] = ACTIONS(926), - [anon_sym_sizeof] = ACTIONS(924), - [sym_number_literal] = ACTIONS(926), - [anon_sym_L_SQUOTE] = ACTIONS(926), - [anon_sym_u_SQUOTE] = ACTIONS(926), - [anon_sym_U_SQUOTE] = ACTIONS(926), - [anon_sym_u8_SQUOTE] = ACTIONS(926), - [anon_sym_SQUOTE] = ACTIONS(926), - [anon_sym_L_DQUOTE] = ACTIONS(926), - [anon_sym_u_DQUOTE] = ACTIONS(926), - [anon_sym_U_DQUOTE] = ACTIONS(926), - [anon_sym_u8_DQUOTE] = ACTIONS(926), - [anon_sym_DQUOTE] = ACTIONS(926), - [sym_true] = ACTIONS(924), - [sym_false] = ACTIONS(924), - [sym_null] = ACTIONS(924), - [sym_comment] = ACTIONS(3), - }, - [195] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(212), - [sym_attributed_statement] = STATE(212), - [sym_labeled_statement] = STATE(212), - [sym_expression_statement] = STATE(212), - [sym_if_statement] = STATE(212), - [sym_switch_statement] = STATE(212), - [sym_case_statement] = STATE(212), - [sym_while_statement] = STATE(212), - [sym_do_statement] = STATE(212), - [sym_for_statement] = STATE(212), - [sym_return_statement] = STATE(212), - [sym_break_statement] = STATE(212), - [sym_continue_statement] = STATE(212), - [sym_goto_statement] = STATE(212), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [196] = { - [ts_builtin_sym_end] = ACTIONS(974), - [sym_identifier] = ACTIONS(972), - [aux_sym_preproc_include_token1] = ACTIONS(972), - [aux_sym_preproc_def_token1] = ACTIONS(972), - [aux_sym_preproc_if_token1] = ACTIONS(972), - [aux_sym_preproc_ifdef_token1] = ACTIONS(972), - [aux_sym_preproc_ifdef_token2] = ACTIONS(972), - [sym_preproc_directive] = ACTIONS(972), - [anon_sym_LPAREN2] = ACTIONS(974), - [anon_sym_BANG] = ACTIONS(974), - [anon_sym_TILDE] = ACTIONS(974), - [anon_sym_DASH] = ACTIONS(972), - [anon_sym_PLUS] = ACTIONS(972), - [anon_sym_STAR] = ACTIONS(974), - [anon_sym_AMP] = ACTIONS(974), - [anon_sym_SEMI] = ACTIONS(974), - [anon_sym_typedef] = ACTIONS(972), - [anon_sym_extern] = ACTIONS(972), - [anon_sym___attribute__] = ACTIONS(972), - [anon_sym_LBRACK_LBRACK] = ACTIONS(974), - [anon_sym___declspec] = ACTIONS(972), - [anon_sym___cdecl] = ACTIONS(972), - [anon_sym___clrcall] = ACTIONS(972), - [anon_sym___stdcall] = ACTIONS(972), - [anon_sym___fastcall] = ACTIONS(972), - [anon_sym___thiscall] = ACTIONS(972), - [anon_sym___vectorcall] = ACTIONS(972), - [anon_sym_LBRACE] = ACTIONS(974), - [anon_sym_static] = ACTIONS(972), - [anon_sym_auto] = ACTIONS(972), - [anon_sym_register] = ACTIONS(972), - [anon_sym_inline] = ACTIONS(972), - [anon_sym_const] = ACTIONS(972), - [anon_sym_volatile] = ACTIONS(972), - [anon_sym_restrict] = ACTIONS(972), - [anon_sym__Atomic] = ACTIONS(972), - [anon_sym_signed] = ACTIONS(972), - [anon_sym_unsigned] = ACTIONS(972), - [anon_sym_long] = ACTIONS(972), - [anon_sym_short] = ACTIONS(972), - [sym_primitive_type] = ACTIONS(972), - [anon_sym_enum] = ACTIONS(972), - [anon_sym_struct] = ACTIONS(972), - [anon_sym_union] = ACTIONS(972), - [anon_sym_if] = ACTIONS(972), - [anon_sym_else] = ACTIONS(972), - [anon_sym_switch] = ACTIONS(972), - [anon_sym_case] = ACTIONS(972), - [anon_sym_default] = ACTIONS(972), - [anon_sym_while] = ACTIONS(972), - [anon_sym_do] = ACTIONS(972), - [anon_sym_for] = ACTIONS(972), - [anon_sym_return] = ACTIONS(972), - [anon_sym_break] = ACTIONS(972), - [anon_sym_continue] = ACTIONS(972), - [anon_sym_goto] = ACTIONS(972), - [anon_sym_DASH_DASH] = ACTIONS(974), - [anon_sym_PLUS_PLUS] = ACTIONS(974), - [anon_sym_sizeof] = ACTIONS(972), - [sym_number_literal] = ACTIONS(974), - [anon_sym_L_SQUOTE] = ACTIONS(974), - [anon_sym_u_SQUOTE] = ACTIONS(974), - [anon_sym_U_SQUOTE] = ACTIONS(974), - [anon_sym_u8_SQUOTE] = ACTIONS(974), - [anon_sym_SQUOTE] = ACTIONS(974), - [anon_sym_L_DQUOTE] = ACTIONS(974), - [anon_sym_u_DQUOTE] = ACTIONS(974), - [anon_sym_U_DQUOTE] = ACTIONS(974), - [anon_sym_u8_DQUOTE] = ACTIONS(974), - [anon_sym_DQUOTE] = ACTIONS(974), - [sym_true] = ACTIONS(972), - [sym_false] = ACTIONS(972), - [sym_null] = ACTIONS(972), - [sym_comment] = ACTIONS(3), - }, - [197] = { - [ts_builtin_sym_end] = ACTIONS(978), - [sym_identifier] = ACTIONS(976), - [aux_sym_preproc_include_token1] = ACTIONS(976), - [aux_sym_preproc_def_token1] = ACTIONS(976), - [aux_sym_preproc_if_token1] = ACTIONS(976), - [aux_sym_preproc_ifdef_token1] = ACTIONS(976), - [aux_sym_preproc_ifdef_token2] = ACTIONS(976), - [sym_preproc_directive] = ACTIONS(976), - [anon_sym_LPAREN2] = ACTIONS(978), - [anon_sym_BANG] = ACTIONS(978), - [anon_sym_TILDE] = ACTIONS(978), - [anon_sym_DASH] = ACTIONS(976), - [anon_sym_PLUS] = ACTIONS(976), - [anon_sym_STAR] = ACTIONS(978), - [anon_sym_AMP] = ACTIONS(978), - [anon_sym_SEMI] = ACTIONS(978), - [anon_sym_typedef] = ACTIONS(976), - [anon_sym_extern] = ACTIONS(976), - [anon_sym___attribute__] = ACTIONS(976), - [anon_sym_LBRACK_LBRACK] = ACTIONS(978), - [anon_sym___declspec] = ACTIONS(976), - [anon_sym___cdecl] = ACTIONS(976), - [anon_sym___clrcall] = ACTIONS(976), - [anon_sym___stdcall] = ACTIONS(976), - [anon_sym___fastcall] = ACTIONS(976), - [anon_sym___thiscall] = ACTIONS(976), - [anon_sym___vectorcall] = ACTIONS(976), - [anon_sym_LBRACE] = ACTIONS(978), - [anon_sym_static] = ACTIONS(976), - [anon_sym_auto] = ACTIONS(976), - [anon_sym_register] = ACTIONS(976), - [anon_sym_inline] = ACTIONS(976), - [anon_sym_const] = ACTIONS(976), - [anon_sym_volatile] = ACTIONS(976), - [anon_sym_restrict] = ACTIONS(976), - [anon_sym__Atomic] = ACTIONS(976), - [anon_sym_signed] = ACTIONS(976), - [anon_sym_unsigned] = ACTIONS(976), - [anon_sym_long] = ACTIONS(976), - [anon_sym_short] = ACTIONS(976), - [sym_primitive_type] = ACTIONS(976), - [anon_sym_enum] = ACTIONS(976), - [anon_sym_struct] = ACTIONS(976), - [anon_sym_union] = ACTIONS(976), - [anon_sym_if] = ACTIONS(976), - [anon_sym_else] = ACTIONS(976), - [anon_sym_switch] = ACTIONS(976), - [anon_sym_case] = ACTIONS(976), - [anon_sym_default] = ACTIONS(976), - [anon_sym_while] = ACTIONS(976), - [anon_sym_do] = ACTIONS(976), - [anon_sym_for] = ACTIONS(976), - [anon_sym_return] = ACTIONS(976), - [anon_sym_break] = ACTIONS(976), - [anon_sym_continue] = ACTIONS(976), - [anon_sym_goto] = ACTIONS(976), - [anon_sym_DASH_DASH] = ACTIONS(978), - [anon_sym_PLUS_PLUS] = ACTIONS(978), - [anon_sym_sizeof] = ACTIONS(976), - [sym_number_literal] = ACTIONS(978), - [anon_sym_L_SQUOTE] = ACTIONS(978), - [anon_sym_u_SQUOTE] = ACTIONS(978), - [anon_sym_U_SQUOTE] = ACTIONS(978), - [anon_sym_u8_SQUOTE] = ACTIONS(978), - [anon_sym_SQUOTE] = ACTIONS(978), - [anon_sym_L_DQUOTE] = ACTIONS(978), - [anon_sym_u_DQUOTE] = ACTIONS(978), - [anon_sym_U_DQUOTE] = ACTIONS(978), - [anon_sym_u8_DQUOTE] = ACTIONS(978), - [anon_sym_DQUOTE] = ACTIONS(978), - [sym_true] = ACTIONS(976), - [sym_false] = ACTIONS(976), - [sym_null] = ACTIONS(976), - [sym_comment] = ACTIONS(3), - }, - [198] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(216), - [sym_attributed_statement] = STATE(216), - [sym_labeled_statement] = STATE(216), - [sym_expression_statement] = STATE(216), - [sym_if_statement] = STATE(216), - [sym_switch_statement] = STATE(216), - [sym_case_statement] = STATE(216), - [sym_while_statement] = STATE(216), - [sym_do_statement] = STATE(216), - [sym_for_statement] = STATE(216), - [sym_return_statement] = STATE(216), - [sym_break_statement] = STATE(216), - [sym_continue_statement] = STATE(216), - [sym_goto_statement] = STATE(216), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [199] = { - [sym_identifier] = ACTIONS(1004), - [aux_sym_preproc_include_token1] = ACTIONS(1004), - [aux_sym_preproc_def_token1] = ACTIONS(1004), - [aux_sym_preproc_if_token1] = ACTIONS(1004), - [aux_sym_preproc_if_token2] = ACTIONS(1004), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1004), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1004), - [sym_preproc_directive] = ACTIONS(1004), - [anon_sym_LPAREN2] = ACTIONS(1006), - [anon_sym_BANG] = ACTIONS(1006), - [anon_sym_TILDE] = ACTIONS(1006), - [anon_sym_DASH] = ACTIONS(1004), - [anon_sym_PLUS] = ACTIONS(1004), - [anon_sym_STAR] = ACTIONS(1006), - [anon_sym_AMP] = ACTIONS(1006), - [anon_sym_SEMI] = ACTIONS(1006), - [anon_sym_typedef] = ACTIONS(1004), - [anon_sym_extern] = ACTIONS(1004), - [anon_sym___attribute__] = ACTIONS(1004), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1006), - [anon_sym___declspec] = ACTIONS(1004), - [anon_sym___cdecl] = ACTIONS(1004), - [anon_sym___clrcall] = ACTIONS(1004), - [anon_sym___stdcall] = ACTIONS(1004), - [anon_sym___fastcall] = ACTIONS(1004), - [anon_sym___thiscall] = ACTIONS(1004), - [anon_sym___vectorcall] = ACTIONS(1004), - [anon_sym_LBRACE] = ACTIONS(1006), - [anon_sym_static] = ACTIONS(1004), - [anon_sym_auto] = ACTIONS(1004), - [anon_sym_register] = ACTIONS(1004), - [anon_sym_inline] = ACTIONS(1004), - [anon_sym_const] = ACTIONS(1004), - [anon_sym_volatile] = ACTIONS(1004), - [anon_sym_restrict] = ACTIONS(1004), - [anon_sym__Atomic] = ACTIONS(1004), - [anon_sym_signed] = ACTIONS(1004), - [anon_sym_unsigned] = ACTIONS(1004), - [anon_sym_long] = ACTIONS(1004), - [anon_sym_short] = ACTIONS(1004), - [sym_primitive_type] = ACTIONS(1004), - [anon_sym_enum] = ACTIONS(1004), - [anon_sym_struct] = ACTIONS(1004), - [anon_sym_union] = ACTIONS(1004), - [anon_sym_if] = ACTIONS(1004), - [anon_sym_else] = ACTIONS(1004), - [anon_sym_switch] = ACTIONS(1004), - [anon_sym_case] = ACTIONS(1004), - [anon_sym_default] = ACTIONS(1004), - [anon_sym_while] = ACTIONS(1004), - [anon_sym_do] = ACTIONS(1004), - [anon_sym_for] = ACTIONS(1004), - [anon_sym_return] = ACTIONS(1004), - [anon_sym_break] = ACTIONS(1004), - [anon_sym_continue] = ACTIONS(1004), - [anon_sym_goto] = ACTIONS(1004), - [anon_sym_DASH_DASH] = ACTIONS(1006), - [anon_sym_PLUS_PLUS] = ACTIONS(1006), - [anon_sym_sizeof] = ACTIONS(1004), - [sym_number_literal] = ACTIONS(1006), - [anon_sym_L_SQUOTE] = ACTIONS(1006), - [anon_sym_u_SQUOTE] = ACTIONS(1006), - [anon_sym_U_SQUOTE] = ACTIONS(1006), - [anon_sym_u8_SQUOTE] = ACTIONS(1006), - [anon_sym_SQUOTE] = ACTIONS(1006), - [anon_sym_L_DQUOTE] = ACTIONS(1006), - [anon_sym_u_DQUOTE] = ACTIONS(1006), - [anon_sym_U_DQUOTE] = ACTIONS(1006), - [anon_sym_u8_DQUOTE] = ACTIONS(1006), - [anon_sym_DQUOTE] = ACTIONS(1006), - [sym_true] = ACTIONS(1004), - [sym_false] = ACTIONS(1004), - [sym_null] = ACTIONS(1004), - [sym_comment] = ACTIONS(3), - }, - [200] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(1414), - [sym_attributed_statement] = STATE(1414), - [sym_labeled_statement] = STATE(1414), - [sym_expression_statement] = STATE(1414), - [sym_if_statement] = STATE(1414), - [sym_switch_statement] = STATE(1414), - [sym_case_statement] = STATE(1414), - [sym_while_statement] = STATE(1414), - [sym_do_statement] = STATE(1414), - [sym_for_statement] = STATE(1414), - [sym_return_statement] = STATE(1414), - [sym_break_statement] = STATE(1414), - [sym_continue_statement] = STATE(1414), - [sym_goto_statement] = STATE(1414), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [201] = { - [sym_identifier] = ACTIONS(932), - [aux_sym_preproc_include_token1] = ACTIONS(932), - [aux_sym_preproc_def_token1] = ACTIONS(932), - [aux_sym_preproc_if_token1] = ACTIONS(932), - [aux_sym_preproc_if_token2] = ACTIONS(932), - [aux_sym_preproc_ifdef_token1] = ACTIONS(932), - [aux_sym_preproc_ifdef_token2] = ACTIONS(932), - [sym_preproc_directive] = ACTIONS(932), - [anon_sym_LPAREN2] = ACTIONS(934), - [anon_sym_BANG] = ACTIONS(934), - [anon_sym_TILDE] = ACTIONS(934), - [anon_sym_DASH] = ACTIONS(932), - [anon_sym_PLUS] = ACTIONS(932), - [anon_sym_STAR] = ACTIONS(934), - [anon_sym_AMP] = ACTIONS(934), - [anon_sym_SEMI] = ACTIONS(934), - [anon_sym_typedef] = ACTIONS(932), - [anon_sym_extern] = ACTIONS(932), - [anon_sym___attribute__] = ACTIONS(932), - [anon_sym_LBRACK_LBRACK] = ACTIONS(934), - [anon_sym___declspec] = ACTIONS(932), - [anon_sym___cdecl] = ACTIONS(932), - [anon_sym___clrcall] = ACTIONS(932), - [anon_sym___stdcall] = ACTIONS(932), - [anon_sym___fastcall] = ACTIONS(932), - [anon_sym___thiscall] = ACTIONS(932), - [anon_sym___vectorcall] = ACTIONS(932), - [anon_sym_LBRACE] = ACTIONS(934), - [anon_sym_static] = ACTIONS(932), - [anon_sym_auto] = ACTIONS(932), - [anon_sym_register] = ACTIONS(932), - [anon_sym_inline] = ACTIONS(932), - [anon_sym_const] = ACTIONS(932), - [anon_sym_volatile] = ACTIONS(932), - [anon_sym_restrict] = ACTIONS(932), - [anon_sym__Atomic] = ACTIONS(932), - [anon_sym_signed] = ACTIONS(932), - [anon_sym_unsigned] = ACTIONS(932), - [anon_sym_long] = ACTIONS(932), - [anon_sym_short] = ACTIONS(932), - [sym_primitive_type] = ACTIONS(932), - [anon_sym_enum] = ACTIONS(932), - [anon_sym_struct] = ACTIONS(932), - [anon_sym_union] = ACTIONS(932), - [anon_sym_if] = ACTIONS(932), - [anon_sym_else] = ACTIONS(932), - [anon_sym_switch] = ACTIONS(932), - [anon_sym_case] = ACTIONS(932), - [anon_sym_default] = ACTIONS(932), - [anon_sym_while] = ACTIONS(932), - [anon_sym_do] = ACTIONS(932), - [anon_sym_for] = ACTIONS(932), - [anon_sym_return] = ACTIONS(932), - [anon_sym_break] = ACTIONS(932), - [anon_sym_continue] = ACTIONS(932), - [anon_sym_goto] = ACTIONS(932), - [anon_sym_DASH_DASH] = ACTIONS(934), - [anon_sym_PLUS_PLUS] = ACTIONS(934), - [anon_sym_sizeof] = ACTIONS(932), - [sym_number_literal] = ACTIONS(934), - [anon_sym_L_SQUOTE] = ACTIONS(934), - [anon_sym_u_SQUOTE] = ACTIONS(934), - [anon_sym_U_SQUOTE] = ACTIONS(934), - [anon_sym_u8_SQUOTE] = ACTIONS(934), - [anon_sym_SQUOTE] = ACTIONS(934), - [anon_sym_L_DQUOTE] = ACTIONS(934), - [anon_sym_u_DQUOTE] = ACTIONS(934), - [anon_sym_U_DQUOTE] = ACTIONS(934), - [anon_sym_u8_DQUOTE] = ACTIONS(934), - [anon_sym_DQUOTE] = ACTIONS(934), - [sym_true] = ACTIONS(932), - [sym_false] = ACTIONS(932), - [sym_null] = ACTIONS(932), - [sym_comment] = ACTIONS(3), - }, - [202] = { - [sym_identifier] = ACTIONS(936), - [aux_sym_preproc_include_token1] = ACTIONS(936), - [aux_sym_preproc_def_token1] = ACTIONS(936), - [aux_sym_preproc_if_token1] = ACTIONS(936), - [aux_sym_preproc_if_token2] = ACTIONS(936), - [aux_sym_preproc_ifdef_token1] = ACTIONS(936), - [aux_sym_preproc_ifdef_token2] = ACTIONS(936), - [sym_preproc_directive] = ACTIONS(936), - [anon_sym_LPAREN2] = ACTIONS(938), - [anon_sym_BANG] = ACTIONS(938), - [anon_sym_TILDE] = ACTIONS(938), - [anon_sym_DASH] = ACTIONS(936), - [anon_sym_PLUS] = ACTIONS(936), - [anon_sym_STAR] = ACTIONS(938), - [anon_sym_AMP] = ACTIONS(938), - [anon_sym_SEMI] = ACTIONS(938), - [anon_sym_typedef] = ACTIONS(936), - [anon_sym_extern] = ACTIONS(936), - [anon_sym___attribute__] = ACTIONS(936), - [anon_sym_LBRACK_LBRACK] = ACTIONS(938), - [anon_sym___declspec] = ACTIONS(936), - [anon_sym___cdecl] = ACTIONS(936), - [anon_sym___clrcall] = ACTIONS(936), - [anon_sym___stdcall] = ACTIONS(936), - [anon_sym___fastcall] = ACTIONS(936), - [anon_sym___thiscall] = ACTIONS(936), - [anon_sym___vectorcall] = ACTIONS(936), - [anon_sym_LBRACE] = ACTIONS(938), - [anon_sym_static] = ACTIONS(936), - [anon_sym_auto] = ACTIONS(936), - [anon_sym_register] = ACTIONS(936), - [anon_sym_inline] = ACTIONS(936), - [anon_sym_const] = ACTIONS(936), - [anon_sym_volatile] = ACTIONS(936), - [anon_sym_restrict] = ACTIONS(936), - [anon_sym__Atomic] = ACTIONS(936), - [anon_sym_signed] = ACTIONS(936), - [anon_sym_unsigned] = ACTIONS(936), - [anon_sym_long] = ACTIONS(936), - [anon_sym_short] = ACTIONS(936), - [sym_primitive_type] = ACTIONS(936), - [anon_sym_enum] = ACTIONS(936), - [anon_sym_struct] = ACTIONS(936), - [anon_sym_union] = ACTIONS(936), - [anon_sym_if] = ACTIONS(936), - [anon_sym_else] = ACTIONS(936), - [anon_sym_switch] = ACTIONS(936), - [anon_sym_case] = ACTIONS(936), - [anon_sym_default] = ACTIONS(936), - [anon_sym_while] = ACTIONS(936), - [anon_sym_do] = ACTIONS(936), - [anon_sym_for] = ACTIONS(936), - [anon_sym_return] = ACTIONS(936), - [anon_sym_break] = ACTIONS(936), - [anon_sym_continue] = ACTIONS(936), - [anon_sym_goto] = ACTIONS(936), - [anon_sym_DASH_DASH] = ACTIONS(938), - [anon_sym_PLUS_PLUS] = ACTIONS(938), - [anon_sym_sizeof] = ACTIONS(936), - [sym_number_literal] = ACTIONS(938), - [anon_sym_L_SQUOTE] = ACTIONS(938), - [anon_sym_u_SQUOTE] = ACTIONS(938), - [anon_sym_U_SQUOTE] = ACTIONS(938), - [anon_sym_u8_SQUOTE] = ACTIONS(938), - [anon_sym_SQUOTE] = ACTIONS(938), - [anon_sym_L_DQUOTE] = ACTIONS(938), - [anon_sym_u_DQUOTE] = ACTIONS(938), - [anon_sym_U_DQUOTE] = ACTIONS(938), - [anon_sym_u8_DQUOTE] = ACTIONS(938), - [anon_sym_DQUOTE] = ACTIONS(938), - [sym_true] = ACTIONS(936), - [sym_false] = ACTIONS(936), - [sym_null] = ACTIONS(936), - [sym_comment] = ACTIONS(3), - }, - [203] = { - [sym_attribute_declaration] = STATE(247), - [sym_compound_statement] = STATE(79), - [sym_attributed_statement] = STATE(79), - [sym_labeled_statement] = STATE(79), - [sym_expression_statement] = STATE(79), - [sym_if_statement] = STATE(79), - [sym_switch_statement] = STATE(79), - [sym_case_statement] = STATE(79), - [sym_while_statement] = STATE(79), - [sym_do_statement] = STATE(79), - [sym_for_statement] = STATE(79), - [sym_return_statement] = STATE(79), - [sym_break_statement] = STATE(79), - [sym_continue_statement] = STATE(79), - [sym_goto_statement] = STATE(79), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [sym_identifier] = ACTIONS(1209), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [204] = { - [ts_builtin_sym_end] = ACTIONS(982), - [sym_identifier] = ACTIONS(980), - [aux_sym_preproc_include_token1] = ACTIONS(980), - [aux_sym_preproc_def_token1] = ACTIONS(980), - [aux_sym_preproc_if_token1] = ACTIONS(980), - [aux_sym_preproc_ifdef_token1] = ACTIONS(980), - [aux_sym_preproc_ifdef_token2] = ACTIONS(980), - [sym_preproc_directive] = ACTIONS(980), - [anon_sym_LPAREN2] = ACTIONS(982), - [anon_sym_BANG] = ACTIONS(982), - [anon_sym_TILDE] = ACTIONS(982), - [anon_sym_DASH] = ACTIONS(980), - [anon_sym_PLUS] = ACTIONS(980), - [anon_sym_STAR] = ACTIONS(982), - [anon_sym_AMP] = ACTIONS(982), - [anon_sym_SEMI] = ACTIONS(982), - [anon_sym_typedef] = ACTIONS(980), - [anon_sym_extern] = ACTIONS(980), - [anon_sym___attribute__] = ACTIONS(980), - [anon_sym_LBRACK_LBRACK] = ACTIONS(982), - [anon_sym___declspec] = ACTIONS(980), - [anon_sym___cdecl] = ACTIONS(980), - [anon_sym___clrcall] = ACTIONS(980), - [anon_sym___stdcall] = ACTIONS(980), - [anon_sym___fastcall] = ACTIONS(980), - [anon_sym___thiscall] = ACTIONS(980), - [anon_sym___vectorcall] = ACTIONS(980), - [anon_sym_LBRACE] = ACTIONS(982), - [anon_sym_static] = ACTIONS(980), - [anon_sym_auto] = ACTIONS(980), - [anon_sym_register] = ACTIONS(980), - [anon_sym_inline] = ACTIONS(980), - [anon_sym_const] = ACTIONS(980), - [anon_sym_volatile] = ACTIONS(980), - [anon_sym_restrict] = ACTIONS(980), - [anon_sym__Atomic] = ACTIONS(980), - [anon_sym_signed] = ACTIONS(980), - [anon_sym_unsigned] = ACTIONS(980), - [anon_sym_long] = ACTIONS(980), - [anon_sym_short] = ACTIONS(980), - [sym_primitive_type] = ACTIONS(980), - [anon_sym_enum] = ACTIONS(980), - [anon_sym_struct] = ACTIONS(980), - [anon_sym_union] = ACTIONS(980), - [anon_sym_if] = ACTIONS(980), - [anon_sym_else] = ACTIONS(980), - [anon_sym_switch] = ACTIONS(980), - [anon_sym_case] = ACTIONS(980), - [anon_sym_default] = ACTIONS(980), - [anon_sym_while] = ACTIONS(980), - [anon_sym_do] = ACTIONS(980), - [anon_sym_for] = ACTIONS(980), - [anon_sym_return] = ACTIONS(980), - [anon_sym_break] = ACTIONS(980), - [anon_sym_continue] = ACTIONS(980), - [anon_sym_goto] = ACTIONS(980), - [anon_sym_DASH_DASH] = ACTIONS(982), - [anon_sym_PLUS_PLUS] = ACTIONS(982), - [anon_sym_sizeof] = ACTIONS(980), - [sym_number_literal] = ACTIONS(982), - [anon_sym_L_SQUOTE] = ACTIONS(982), - [anon_sym_u_SQUOTE] = ACTIONS(982), - [anon_sym_U_SQUOTE] = ACTIONS(982), - [anon_sym_u8_SQUOTE] = ACTIONS(982), - [anon_sym_SQUOTE] = ACTIONS(982), - [anon_sym_L_DQUOTE] = ACTIONS(982), - [anon_sym_u_DQUOTE] = ACTIONS(982), - [anon_sym_U_DQUOTE] = ACTIONS(982), - [anon_sym_u8_DQUOTE] = ACTIONS(982), - [anon_sym_DQUOTE] = ACTIONS(982), - [sym_true] = ACTIONS(980), - [sym_false] = ACTIONS(980), - [sym_null] = ACTIONS(980), - [sym_comment] = ACTIONS(3), - }, - [205] = { - [sym_attribute_declaration] = STATE(153), - [sym_compound_statement] = STATE(211), - [sym_attributed_statement] = STATE(211), - [sym_labeled_statement] = STATE(211), - [sym_expression_statement] = STATE(211), - [sym_if_statement] = STATE(211), - [sym_switch_statement] = STATE(211), - [sym_case_statement] = STATE(211), - [sym_while_statement] = STATE(211), - [sym_do_statement] = STATE(211), - [sym_for_statement] = STATE(211), - [sym_return_statement] = STATE(211), - [sym_break_statement] = STATE(211), - [sym_continue_statement] = STATE(211), - [sym_goto_statement] = STATE(211), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [sym_identifier] = ACTIONS(1207), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [206] = { - [sym_attribute_declaration] = STATE(153), - [sym_compound_statement] = STATE(217), - [sym_attributed_statement] = STATE(217), - [sym_labeled_statement] = STATE(217), - [sym_expression_statement] = STATE(217), - [sym_if_statement] = STATE(217), - [sym_switch_statement] = STATE(217), - [sym_case_statement] = STATE(217), - [sym_while_statement] = STATE(217), - [sym_do_statement] = STATE(217), - [sym_for_statement] = STATE(217), - [sym_return_statement] = STATE(217), - [sym_break_statement] = STATE(217), - [sym_continue_statement] = STATE(217), - [sym_goto_statement] = STATE(217), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [sym_identifier] = ACTIONS(1207), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [207] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(145), - [sym_attributed_statement] = STATE(145), - [sym_labeled_statement] = STATE(145), - [sym_expression_statement] = STATE(145), - [sym_if_statement] = STATE(145), - [sym_switch_statement] = STATE(145), - [sym_case_statement] = STATE(145), - [sym_while_statement] = STATE(145), - [sym_do_statement] = STATE(145), - [sym_for_statement] = STATE(145), - [sym_return_statement] = STATE(145), - [sym_break_statement] = STATE(145), - [sym_continue_statement] = STATE(145), - [sym_goto_statement] = STATE(145), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [208] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(218), - [sym_attributed_statement] = STATE(218), - [sym_labeled_statement] = STATE(218), - [sym_expression_statement] = STATE(218), - [sym_if_statement] = STATE(218), - [sym_switch_statement] = STATE(218), - [sym_case_statement] = STATE(218), - [sym_while_statement] = STATE(218), - [sym_do_statement] = STATE(218), - [sym_for_statement] = STATE(218), - [sym_return_statement] = STATE(218), - [sym_break_statement] = STATE(218), - [sym_continue_statement] = STATE(218), - [sym_goto_statement] = STATE(218), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [209] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(223), - [sym_attributed_statement] = STATE(223), - [sym_labeled_statement] = STATE(223), - [sym_expression_statement] = STATE(223), - [sym_if_statement] = STATE(223), - [sym_switch_statement] = STATE(223), - [sym_case_statement] = STATE(223), - [sym_while_statement] = STATE(223), - [sym_do_statement] = STATE(223), - [sym_for_statement] = STATE(223), - [sym_return_statement] = STATE(223), - [sym_break_statement] = STATE(223), - [sym_continue_statement] = STATE(223), - [sym_goto_statement] = STATE(223), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [210] = { - [sym_identifier] = ACTIONS(940), - [aux_sym_preproc_include_token1] = ACTIONS(940), - [aux_sym_preproc_def_token1] = ACTIONS(940), - [aux_sym_preproc_if_token1] = ACTIONS(940), - [aux_sym_preproc_if_token2] = ACTIONS(940), - [aux_sym_preproc_ifdef_token1] = ACTIONS(940), - [aux_sym_preproc_ifdef_token2] = ACTIONS(940), - [sym_preproc_directive] = ACTIONS(940), - [anon_sym_LPAREN2] = ACTIONS(942), - [anon_sym_BANG] = ACTIONS(942), - [anon_sym_TILDE] = ACTIONS(942), - [anon_sym_DASH] = ACTIONS(940), - [anon_sym_PLUS] = ACTIONS(940), - [anon_sym_STAR] = ACTIONS(942), - [anon_sym_AMP] = ACTIONS(942), - [anon_sym_SEMI] = ACTIONS(942), - [anon_sym_typedef] = ACTIONS(940), - [anon_sym_extern] = ACTIONS(940), - [anon_sym___attribute__] = ACTIONS(940), - [anon_sym_LBRACK_LBRACK] = ACTIONS(942), - [anon_sym___declspec] = ACTIONS(940), - [anon_sym___cdecl] = ACTIONS(940), - [anon_sym___clrcall] = ACTIONS(940), - [anon_sym___stdcall] = ACTIONS(940), - [anon_sym___fastcall] = ACTIONS(940), - [anon_sym___thiscall] = ACTIONS(940), - [anon_sym___vectorcall] = ACTIONS(940), - [anon_sym_LBRACE] = ACTIONS(942), - [anon_sym_static] = ACTIONS(940), - [anon_sym_auto] = ACTIONS(940), - [anon_sym_register] = ACTIONS(940), - [anon_sym_inline] = ACTIONS(940), - [anon_sym_const] = ACTIONS(940), - [anon_sym_volatile] = ACTIONS(940), - [anon_sym_restrict] = ACTIONS(940), - [anon_sym__Atomic] = ACTIONS(940), - [anon_sym_signed] = ACTIONS(940), - [anon_sym_unsigned] = ACTIONS(940), - [anon_sym_long] = ACTIONS(940), - [anon_sym_short] = ACTIONS(940), - [sym_primitive_type] = ACTIONS(940), - [anon_sym_enum] = ACTIONS(940), - [anon_sym_struct] = ACTIONS(940), - [anon_sym_union] = ACTIONS(940), - [anon_sym_if] = ACTIONS(940), - [anon_sym_else] = ACTIONS(940), - [anon_sym_switch] = ACTIONS(940), - [anon_sym_case] = ACTIONS(940), - [anon_sym_default] = ACTIONS(940), - [anon_sym_while] = ACTIONS(940), - [anon_sym_do] = ACTIONS(940), - [anon_sym_for] = ACTIONS(940), - [anon_sym_return] = ACTIONS(940), - [anon_sym_break] = ACTIONS(940), - [anon_sym_continue] = ACTIONS(940), - [anon_sym_goto] = ACTIONS(940), - [anon_sym_DASH_DASH] = ACTIONS(942), - [anon_sym_PLUS_PLUS] = ACTIONS(942), - [anon_sym_sizeof] = ACTIONS(940), - [sym_number_literal] = ACTIONS(942), - [anon_sym_L_SQUOTE] = ACTIONS(942), - [anon_sym_u_SQUOTE] = ACTIONS(942), - [anon_sym_U_SQUOTE] = ACTIONS(942), - [anon_sym_u8_SQUOTE] = ACTIONS(942), - [anon_sym_SQUOTE] = ACTIONS(942), - [anon_sym_L_DQUOTE] = ACTIONS(942), - [anon_sym_u_DQUOTE] = ACTIONS(942), - [anon_sym_U_DQUOTE] = ACTIONS(942), - [anon_sym_u8_DQUOTE] = ACTIONS(942), - [anon_sym_DQUOTE] = ACTIONS(942), - [sym_true] = ACTIONS(940), - [sym_false] = ACTIONS(940), - [sym_null] = ACTIONS(940), - [sym_comment] = ACTIONS(3), - }, - [211] = { - [sym_identifier] = ACTIONS(952), - [aux_sym_preproc_include_token1] = ACTIONS(952), - [aux_sym_preproc_def_token1] = ACTIONS(952), - [aux_sym_preproc_if_token1] = ACTIONS(952), - [aux_sym_preproc_if_token2] = ACTIONS(952), - [aux_sym_preproc_ifdef_token1] = ACTIONS(952), - [aux_sym_preproc_ifdef_token2] = ACTIONS(952), - [sym_preproc_directive] = ACTIONS(952), - [anon_sym_LPAREN2] = ACTIONS(954), - [anon_sym_BANG] = ACTIONS(954), - [anon_sym_TILDE] = ACTIONS(954), - [anon_sym_DASH] = ACTIONS(952), - [anon_sym_PLUS] = ACTIONS(952), - [anon_sym_STAR] = ACTIONS(954), - [anon_sym_AMP] = ACTIONS(954), - [anon_sym_SEMI] = ACTIONS(954), - [anon_sym_typedef] = ACTIONS(952), - [anon_sym_extern] = ACTIONS(952), - [anon_sym___attribute__] = ACTIONS(952), - [anon_sym_LBRACK_LBRACK] = ACTIONS(954), - [anon_sym___declspec] = ACTIONS(952), - [anon_sym___cdecl] = ACTIONS(952), - [anon_sym___clrcall] = ACTIONS(952), - [anon_sym___stdcall] = ACTIONS(952), - [anon_sym___fastcall] = ACTIONS(952), - [anon_sym___thiscall] = ACTIONS(952), - [anon_sym___vectorcall] = ACTIONS(952), - [anon_sym_LBRACE] = ACTIONS(954), - [anon_sym_static] = ACTIONS(952), - [anon_sym_auto] = ACTIONS(952), - [anon_sym_register] = ACTIONS(952), - [anon_sym_inline] = ACTIONS(952), - [anon_sym_const] = ACTIONS(952), - [anon_sym_volatile] = ACTIONS(952), - [anon_sym_restrict] = ACTIONS(952), - [anon_sym__Atomic] = ACTIONS(952), - [anon_sym_signed] = ACTIONS(952), - [anon_sym_unsigned] = ACTIONS(952), - [anon_sym_long] = ACTIONS(952), - [anon_sym_short] = ACTIONS(952), - [sym_primitive_type] = ACTIONS(952), - [anon_sym_enum] = ACTIONS(952), - [anon_sym_struct] = ACTIONS(952), - [anon_sym_union] = ACTIONS(952), - [anon_sym_if] = ACTIONS(952), - [anon_sym_else] = ACTIONS(952), - [anon_sym_switch] = ACTIONS(952), - [anon_sym_case] = ACTIONS(952), - [anon_sym_default] = ACTIONS(952), - [anon_sym_while] = ACTIONS(952), - [anon_sym_do] = ACTIONS(952), - [anon_sym_for] = ACTIONS(952), - [anon_sym_return] = ACTIONS(952), - [anon_sym_break] = ACTIONS(952), - [anon_sym_continue] = ACTIONS(952), - [anon_sym_goto] = ACTIONS(952), - [anon_sym_DASH_DASH] = ACTIONS(954), - [anon_sym_PLUS_PLUS] = ACTIONS(954), - [anon_sym_sizeof] = ACTIONS(952), - [sym_number_literal] = ACTIONS(954), - [anon_sym_L_SQUOTE] = ACTIONS(954), - [anon_sym_u_SQUOTE] = ACTIONS(954), - [anon_sym_U_SQUOTE] = ACTIONS(954), - [anon_sym_u8_SQUOTE] = ACTIONS(954), - [anon_sym_SQUOTE] = ACTIONS(954), - [anon_sym_L_DQUOTE] = ACTIONS(954), - [anon_sym_u_DQUOTE] = ACTIONS(954), - [anon_sym_U_DQUOTE] = ACTIONS(954), - [anon_sym_u8_DQUOTE] = ACTIONS(954), - [anon_sym_DQUOTE] = ACTIONS(954), - [sym_true] = ACTIONS(952), - [sym_false] = ACTIONS(952), - [sym_null] = ACTIONS(952), - [sym_comment] = ACTIONS(3), - }, - [212] = { - [ts_builtin_sym_end] = ACTIONS(990), - [sym_identifier] = ACTIONS(988), - [aux_sym_preproc_include_token1] = ACTIONS(988), - [aux_sym_preproc_def_token1] = ACTIONS(988), - [aux_sym_preproc_if_token1] = ACTIONS(988), - [aux_sym_preproc_ifdef_token1] = ACTIONS(988), - [aux_sym_preproc_ifdef_token2] = ACTIONS(988), - [sym_preproc_directive] = ACTIONS(988), - [anon_sym_LPAREN2] = ACTIONS(990), - [anon_sym_BANG] = ACTIONS(990), - [anon_sym_TILDE] = ACTIONS(990), - [anon_sym_DASH] = ACTIONS(988), - [anon_sym_PLUS] = ACTIONS(988), - [anon_sym_STAR] = ACTIONS(990), - [anon_sym_AMP] = ACTIONS(990), - [anon_sym_SEMI] = ACTIONS(990), - [anon_sym_typedef] = ACTIONS(988), - [anon_sym_extern] = ACTIONS(988), - [anon_sym___attribute__] = ACTIONS(988), - [anon_sym_LBRACK_LBRACK] = ACTIONS(990), - [anon_sym___declspec] = ACTIONS(988), - [anon_sym___cdecl] = ACTIONS(988), - [anon_sym___clrcall] = ACTIONS(988), - [anon_sym___stdcall] = ACTIONS(988), - [anon_sym___fastcall] = ACTIONS(988), - [anon_sym___thiscall] = ACTIONS(988), - [anon_sym___vectorcall] = ACTIONS(988), - [anon_sym_LBRACE] = ACTIONS(990), - [anon_sym_static] = ACTIONS(988), - [anon_sym_auto] = ACTIONS(988), - [anon_sym_register] = ACTIONS(988), - [anon_sym_inline] = ACTIONS(988), - [anon_sym_const] = ACTIONS(988), - [anon_sym_volatile] = ACTIONS(988), - [anon_sym_restrict] = ACTIONS(988), - [anon_sym__Atomic] = ACTIONS(988), - [anon_sym_signed] = ACTIONS(988), - [anon_sym_unsigned] = ACTIONS(988), - [anon_sym_long] = ACTIONS(988), - [anon_sym_short] = ACTIONS(988), - [sym_primitive_type] = ACTIONS(988), - [anon_sym_enum] = ACTIONS(988), - [anon_sym_struct] = ACTIONS(988), - [anon_sym_union] = ACTIONS(988), - [anon_sym_if] = ACTIONS(988), - [anon_sym_else] = ACTIONS(988), - [anon_sym_switch] = ACTIONS(988), - [anon_sym_case] = ACTIONS(988), - [anon_sym_default] = ACTIONS(988), - [anon_sym_while] = ACTIONS(988), - [anon_sym_do] = ACTIONS(988), - [anon_sym_for] = ACTIONS(988), - [anon_sym_return] = ACTIONS(988), - [anon_sym_break] = ACTIONS(988), - [anon_sym_continue] = ACTIONS(988), - [anon_sym_goto] = ACTIONS(988), - [anon_sym_DASH_DASH] = ACTIONS(990), - [anon_sym_PLUS_PLUS] = ACTIONS(990), - [anon_sym_sizeof] = ACTIONS(988), - [sym_number_literal] = ACTIONS(990), - [anon_sym_L_SQUOTE] = ACTIONS(990), - [anon_sym_u_SQUOTE] = ACTIONS(990), - [anon_sym_U_SQUOTE] = ACTIONS(990), - [anon_sym_u8_SQUOTE] = ACTIONS(990), - [anon_sym_SQUOTE] = ACTIONS(990), - [anon_sym_L_DQUOTE] = ACTIONS(990), - [anon_sym_u_DQUOTE] = ACTIONS(990), - [anon_sym_U_DQUOTE] = ACTIONS(990), - [anon_sym_u8_DQUOTE] = ACTIONS(990), - [anon_sym_DQUOTE] = ACTIONS(990), - [sym_true] = ACTIONS(988), - [sym_false] = ACTIONS(988), - [sym_null] = ACTIONS(988), - [sym_comment] = ACTIONS(3), - }, - [213] = { - [sym_attribute_declaration] = STATE(153), - [sym_compound_statement] = STATE(283), - [sym_attributed_statement] = STATE(283), - [sym_labeled_statement] = STATE(283), - [sym_expression_statement] = STATE(283), - [sym_if_statement] = STATE(283), - [sym_switch_statement] = STATE(283), - [sym_case_statement] = STATE(283), - [sym_while_statement] = STATE(283), - [sym_do_statement] = STATE(283), - [sym_for_statement] = STATE(283), - [sym_return_statement] = STATE(283), - [sym_break_statement] = STATE(283), - [sym_continue_statement] = STATE(283), - [sym_goto_statement] = STATE(283), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [sym_identifier] = ACTIONS(1207), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [214] = { - [sym_attribute_declaration] = STATE(153), - [sym_compound_statement] = STATE(226), - [sym_attributed_statement] = STATE(226), - [sym_labeled_statement] = STATE(226), - [sym_expression_statement] = STATE(226), - [sym_if_statement] = STATE(226), - [sym_switch_statement] = STATE(226), - [sym_case_statement] = STATE(226), - [sym_while_statement] = STATE(226), - [sym_do_statement] = STATE(226), - [sym_for_statement] = STATE(226), - [sym_return_statement] = STATE(226), - [sym_break_statement] = STATE(226), - [sym_continue_statement] = STATE(226), - [sym_goto_statement] = STATE(226), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [sym_identifier] = ACTIONS(1207), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [215] = { - [ts_builtin_sym_end] = ACTIONS(922), - [sym_identifier] = ACTIONS(920), - [aux_sym_preproc_include_token1] = ACTIONS(920), - [aux_sym_preproc_def_token1] = ACTIONS(920), - [aux_sym_preproc_if_token1] = ACTIONS(920), - [aux_sym_preproc_ifdef_token1] = ACTIONS(920), - [aux_sym_preproc_ifdef_token2] = ACTIONS(920), - [sym_preproc_directive] = ACTIONS(920), - [anon_sym_LPAREN2] = ACTIONS(922), - [anon_sym_BANG] = ACTIONS(922), - [anon_sym_TILDE] = ACTIONS(922), - [anon_sym_DASH] = ACTIONS(920), - [anon_sym_PLUS] = ACTIONS(920), - [anon_sym_STAR] = ACTIONS(922), - [anon_sym_AMP] = ACTIONS(922), - [anon_sym_SEMI] = ACTIONS(922), - [anon_sym_typedef] = ACTIONS(920), - [anon_sym_extern] = ACTIONS(920), - [anon_sym___attribute__] = ACTIONS(920), - [anon_sym_LBRACK_LBRACK] = ACTIONS(922), - [anon_sym___declspec] = ACTIONS(920), - [anon_sym___cdecl] = ACTIONS(920), - [anon_sym___clrcall] = ACTIONS(920), - [anon_sym___stdcall] = ACTIONS(920), - [anon_sym___fastcall] = ACTIONS(920), - [anon_sym___thiscall] = ACTIONS(920), - [anon_sym___vectorcall] = ACTIONS(920), - [anon_sym_LBRACE] = ACTIONS(922), - [anon_sym_static] = ACTIONS(920), - [anon_sym_auto] = ACTIONS(920), - [anon_sym_register] = ACTIONS(920), - [anon_sym_inline] = ACTIONS(920), - [anon_sym_const] = ACTIONS(920), - [anon_sym_volatile] = ACTIONS(920), - [anon_sym_restrict] = ACTIONS(920), - [anon_sym__Atomic] = ACTIONS(920), - [anon_sym_signed] = ACTIONS(920), - [anon_sym_unsigned] = ACTIONS(920), - [anon_sym_long] = ACTIONS(920), - [anon_sym_short] = ACTIONS(920), - [sym_primitive_type] = ACTIONS(920), - [anon_sym_enum] = ACTIONS(920), - [anon_sym_struct] = ACTIONS(920), - [anon_sym_union] = ACTIONS(920), - [anon_sym_if] = ACTIONS(920), - [anon_sym_else] = ACTIONS(920), - [anon_sym_switch] = ACTIONS(920), - [anon_sym_case] = ACTIONS(920), - [anon_sym_default] = ACTIONS(920), - [anon_sym_while] = ACTIONS(920), - [anon_sym_do] = ACTIONS(920), - [anon_sym_for] = ACTIONS(920), - [anon_sym_return] = ACTIONS(920), - [anon_sym_break] = ACTIONS(920), - [anon_sym_continue] = ACTIONS(920), - [anon_sym_goto] = ACTIONS(920), - [anon_sym_DASH_DASH] = ACTIONS(922), - [anon_sym_PLUS_PLUS] = ACTIONS(922), - [anon_sym_sizeof] = ACTIONS(920), - [sym_number_literal] = ACTIONS(922), - [anon_sym_L_SQUOTE] = ACTIONS(922), - [anon_sym_u_SQUOTE] = ACTIONS(922), - [anon_sym_U_SQUOTE] = ACTIONS(922), - [anon_sym_u8_SQUOTE] = ACTIONS(922), - [anon_sym_SQUOTE] = ACTIONS(922), - [anon_sym_L_DQUOTE] = ACTIONS(922), - [anon_sym_u_DQUOTE] = ACTIONS(922), - [anon_sym_U_DQUOTE] = ACTIONS(922), - [anon_sym_u8_DQUOTE] = ACTIONS(922), - [anon_sym_DQUOTE] = ACTIONS(922), - [sym_true] = ACTIONS(920), - [sym_false] = ACTIONS(920), - [sym_null] = ACTIONS(920), - [sym_comment] = ACTIONS(3), - }, - [216] = { - [ts_builtin_sym_end] = ACTIONS(994), - [sym_identifier] = ACTIONS(992), - [aux_sym_preproc_include_token1] = ACTIONS(992), - [aux_sym_preproc_def_token1] = ACTIONS(992), - [aux_sym_preproc_if_token1] = ACTIONS(992), - [aux_sym_preproc_ifdef_token1] = ACTIONS(992), - [aux_sym_preproc_ifdef_token2] = ACTIONS(992), - [sym_preproc_directive] = ACTIONS(992), - [anon_sym_LPAREN2] = ACTIONS(994), - [anon_sym_BANG] = ACTIONS(994), - [anon_sym_TILDE] = ACTIONS(994), - [anon_sym_DASH] = ACTIONS(992), - [anon_sym_PLUS] = ACTIONS(992), - [anon_sym_STAR] = ACTIONS(994), - [anon_sym_AMP] = ACTIONS(994), - [anon_sym_SEMI] = ACTIONS(994), - [anon_sym_typedef] = ACTIONS(992), - [anon_sym_extern] = ACTIONS(992), - [anon_sym___attribute__] = ACTIONS(992), - [anon_sym_LBRACK_LBRACK] = ACTIONS(994), - [anon_sym___declspec] = ACTIONS(992), - [anon_sym___cdecl] = ACTIONS(992), - [anon_sym___clrcall] = ACTIONS(992), - [anon_sym___stdcall] = ACTIONS(992), - [anon_sym___fastcall] = ACTIONS(992), - [anon_sym___thiscall] = ACTIONS(992), - [anon_sym___vectorcall] = ACTIONS(992), - [anon_sym_LBRACE] = ACTIONS(994), - [anon_sym_static] = ACTIONS(992), - [anon_sym_auto] = ACTIONS(992), - [anon_sym_register] = ACTIONS(992), - [anon_sym_inline] = ACTIONS(992), - [anon_sym_const] = ACTIONS(992), - [anon_sym_volatile] = ACTIONS(992), - [anon_sym_restrict] = ACTIONS(992), - [anon_sym__Atomic] = ACTIONS(992), - [anon_sym_signed] = ACTIONS(992), - [anon_sym_unsigned] = ACTIONS(992), - [anon_sym_long] = ACTIONS(992), - [anon_sym_short] = ACTIONS(992), - [sym_primitive_type] = ACTIONS(992), - [anon_sym_enum] = ACTIONS(992), - [anon_sym_struct] = ACTIONS(992), - [anon_sym_union] = ACTIONS(992), - [anon_sym_if] = ACTIONS(992), - [anon_sym_else] = ACTIONS(992), - [anon_sym_switch] = ACTIONS(992), - [anon_sym_case] = ACTIONS(992), - [anon_sym_default] = ACTIONS(992), - [anon_sym_while] = ACTIONS(992), - [anon_sym_do] = ACTIONS(992), - [anon_sym_for] = ACTIONS(992), - [anon_sym_return] = ACTIONS(992), - [anon_sym_break] = ACTIONS(992), - [anon_sym_continue] = ACTIONS(992), - [anon_sym_goto] = ACTIONS(992), - [anon_sym_DASH_DASH] = ACTIONS(994), - [anon_sym_PLUS_PLUS] = ACTIONS(994), - [anon_sym_sizeof] = ACTIONS(992), - [sym_number_literal] = ACTIONS(994), - [anon_sym_L_SQUOTE] = ACTIONS(994), - [anon_sym_u_SQUOTE] = ACTIONS(994), - [anon_sym_U_SQUOTE] = ACTIONS(994), - [anon_sym_u8_SQUOTE] = ACTIONS(994), - [anon_sym_SQUOTE] = ACTIONS(994), - [anon_sym_L_DQUOTE] = ACTIONS(994), - [anon_sym_u_DQUOTE] = ACTIONS(994), - [anon_sym_U_DQUOTE] = ACTIONS(994), - [anon_sym_u8_DQUOTE] = ACTIONS(994), - [anon_sym_DQUOTE] = ACTIONS(994), - [sym_true] = ACTIONS(992), - [sym_false] = ACTIONS(992), - [sym_null] = ACTIONS(992), - [sym_comment] = ACTIONS(3), - }, - [217] = { - [sym_identifier] = ACTIONS(894), - [aux_sym_preproc_include_token1] = ACTIONS(894), - [aux_sym_preproc_def_token1] = ACTIONS(894), - [aux_sym_preproc_if_token1] = ACTIONS(894), - [aux_sym_preproc_if_token2] = ACTIONS(894), - [aux_sym_preproc_ifdef_token1] = ACTIONS(894), - [aux_sym_preproc_ifdef_token2] = ACTIONS(894), - [sym_preproc_directive] = ACTIONS(894), - [anon_sym_LPAREN2] = ACTIONS(896), - [anon_sym_BANG] = ACTIONS(896), - [anon_sym_TILDE] = ACTIONS(896), - [anon_sym_DASH] = ACTIONS(894), - [anon_sym_PLUS] = ACTIONS(894), - [anon_sym_STAR] = ACTIONS(896), - [anon_sym_AMP] = ACTIONS(896), - [anon_sym_SEMI] = ACTIONS(896), - [anon_sym_typedef] = ACTIONS(894), - [anon_sym_extern] = ACTIONS(894), - [anon_sym___attribute__] = ACTIONS(894), - [anon_sym_LBRACK_LBRACK] = ACTIONS(896), - [anon_sym___declspec] = ACTIONS(894), - [anon_sym___cdecl] = ACTIONS(894), - [anon_sym___clrcall] = ACTIONS(894), - [anon_sym___stdcall] = ACTIONS(894), - [anon_sym___fastcall] = ACTIONS(894), - [anon_sym___thiscall] = ACTIONS(894), - [anon_sym___vectorcall] = ACTIONS(894), - [anon_sym_LBRACE] = ACTIONS(896), - [anon_sym_static] = ACTIONS(894), - [anon_sym_auto] = ACTIONS(894), - [anon_sym_register] = ACTIONS(894), - [anon_sym_inline] = ACTIONS(894), - [anon_sym_const] = ACTIONS(894), - [anon_sym_volatile] = ACTIONS(894), - [anon_sym_restrict] = ACTIONS(894), - [anon_sym__Atomic] = ACTIONS(894), - [anon_sym_signed] = ACTIONS(894), - [anon_sym_unsigned] = ACTIONS(894), - [anon_sym_long] = ACTIONS(894), - [anon_sym_short] = ACTIONS(894), - [sym_primitive_type] = ACTIONS(894), - [anon_sym_enum] = ACTIONS(894), - [anon_sym_struct] = ACTIONS(894), - [anon_sym_union] = ACTIONS(894), - [anon_sym_if] = ACTIONS(894), - [anon_sym_else] = ACTIONS(894), - [anon_sym_switch] = ACTIONS(894), - [anon_sym_case] = ACTIONS(894), - [anon_sym_default] = ACTIONS(894), - [anon_sym_while] = ACTIONS(894), - [anon_sym_do] = ACTIONS(894), - [anon_sym_for] = ACTIONS(894), - [anon_sym_return] = ACTIONS(894), - [anon_sym_break] = ACTIONS(894), - [anon_sym_continue] = ACTIONS(894), - [anon_sym_goto] = ACTIONS(894), - [anon_sym_DASH_DASH] = ACTIONS(896), - [anon_sym_PLUS_PLUS] = ACTIONS(896), - [anon_sym_sizeof] = ACTIONS(894), - [sym_number_literal] = ACTIONS(896), - [anon_sym_L_SQUOTE] = ACTIONS(896), - [anon_sym_u_SQUOTE] = ACTIONS(896), - [anon_sym_U_SQUOTE] = ACTIONS(896), - [anon_sym_u8_SQUOTE] = ACTIONS(896), - [anon_sym_SQUOTE] = ACTIONS(896), - [anon_sym_L_DQUOTE] = ACTIONS(896), - [anon_sym_u_DQUOTE] = ACTIONS(896), - [anon_sym_U_DQUOTE] = ACTIONS(896), - [anon_sym_u8_DQUOTE] = ACTIONS(896), - [anon_sym_DQUOTE] = ACTIONS(896), - [sym_true] = ACTIONS(894), - [sym_false] = ACTIONS(894), - [sym_null] = ACTIONS(894), - [sym_comment] = ACTIONS(3), - }, - [218] = { - [ts_builtin_sym_end] = ACTIONS(998), - [sym_identifier] = ACTIONS(996), - [aux_sym_preproc_include_token1] = ACTIONS(996), - [aux_sym_preproc_def_token1] = ACTIONS(996), - [aux_sym_preproc_if_token1] = ACTIONS(996), - [aux_sym_preproc_ifdef_token1] = ACTIONS(996), - [aux_sym_preproc_ifdef_token2] = ACTIONS(996), - [sym_preproc_directive] = ACTIONS(996), - [anon_sym_LPAREN2] = ACTIONS(998), - [anon_sym_BANG] = ACTIONS(998), - [anon_sym_TILDE] = ACTIONS(998), - [anon_sym_DASH] = ACTIONS(996), - [anon_sym_PLUS] = ACTIONS(996), - [anon_sym_STAR] = ACTIONS(998), - [anon_sym_AMP] = ACTIONS(998), - [anon_sym_SEMI] = ACTIONS(998), - [anon_sym_typedef] = ACTIONS(996), - [anon_sym_extern] = ACTIONS(996), - [anon_sym___attribute__] = ACTIONS(996), - [anon_sym_LBRACK_LBRACK] = ACTIONS(998), - [anon_sym___declspec] = ACTIONS(996), - [anon_sym___cdecl] = ACTIONS(996), - [anon_sym___clrcall] = ACTIONS(996), - [anon_sym___stdcall] = ACTIONS(996), - [anon_sym___fastcall] = ACTIONS(996), - [anon_sym___thiscall] = ACTIONS(996), - [anon_sym___vectorcall] = ACTIONS(996), - [anon_sym_LBRACE] = ACTIONS(998), - [anon_sym_static] = ACTIONS(996), - [anon_sym_auto] = ACTIONS(996), - [anon_sym_register] = ACTIONS(996), - [anon_sym_inline] = ACTIONS(996), - [anon_sym_const] = ACTIONS(996), - [anon_sym_volatile] = ACTIONS(996), - [anon_sym_restrict] = ACTIONS(996), - [anon_sym__Atomic] = ACTIONS(996), - [anon_sym_signed] = ACTIONS(996), - [anon_sym_unsigned] = ACTIONS(996), - [anon_sym_long] = ACTIONS(996), - [anon_sym_short] = ACTIONS(996), - [sym_primitive_type] = ACTIONS(996), - [anon_sym_enum] = ACTIONS(996), - [anon_sym_struct] = ACTIONS(996), - [anon_sym_union] = ACTIONS(996), - [anon_sym_if] = ACTIONS(996), - [anon_sym_else] = ACTIONS(996), - [anon_sym_switch] = ACTIONS(996), - [anon_sym_case] = ACTIONS(996), - [anon_sym_default] = ACTIONS(996), - [anon_sym_while] = ACTIONS(996), - [anon_sym_do] = ACTIONS(996), - [anon_sym_for] = ACTIONS(996), - [anon_sym_return] = ACTIONS(996), - [anon_sym_break] = ACTIONS(996), - [anon_sym_continue] = ACTIONS(996), - [anon_sym_goto] = ACTIONS(996), - [anon_sym_DASH_DASH] = ACTIONS(998), - [anon_sym_PLUS_PLUS] = ACTIONS(998), - [anon_sym_sizeof] = ACTIONS(996), - [sym_number_literal] = ACTIONS(998), - [anon_sym_L_SQUOTE] = ACTIONS(998), - [anon_sym_u_SQUOTE] = ACTIONS(998), - [anon_sym_U_SQUOTE] = ACTIONS(998), - [anon_sym_u8_SQUOTE] = ACTIONS(998), - [anon_sym_SQUOTE] = ACTIONS(998), - [anon_sym_L_DQUOTE] = ACTIONS(998), - [anon_sym_u_DQUOTE] = ACTIONS(998), - [anon_sym_U_DQUOTE] = ACTIONS(998), - [anon_sym_u8_DQUOTE] = ACTIONS(998), - [anon_sym_DQUOTE] = ACTIONS(998), - [sym_true] = ACTIONS(996), - [sym_false] = ACTIONS(996), - [sym_null] = ACTIONS(996), - [sym_comment] = ACTIONS(3), - }, - [219] = { - [sym_attribute_declaration] = STATE(153), - [sym_compound_statement] = STATE(231), - [sym_attributed_statement] = STATE(231), - [sym_labeled_statement] = STATE(231), - [sym_expression_statement] = STATE(231), - [sym_if_statement] = STATE(231), - [sym_switch_statement] = STATE(231), - [sym_case_statement] = STATE(231), - [sym_while_statement] = STATE(231), - [sym_do_statement] = STATE(231), - [sym_for_statement] = STATE(231), - [sym_return_statement] = STATE(231), - [sym_break_statement] = STATE(231), - [sym_continue_statement] = STATE(231), - [sym_goto_statement] = STATE(231), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [sym_identifier] = ACTIONS(1207), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [220] = { - [sym_attribute_declaration] = STATE(153), - [sym_compound_statement] = STATE(235), - [sym_attributed_statement] = STATE(235), - [sym_labeled_statement] = STATE(235), - [sym_expression_statement] = STATE(235), - [sym_if_statement] = STATE(235), - [sym_switch_statement] = STATE(235), - [sym_case_statement] = STATE(235), - [sym_while_statement] = STATE(235), - [sym_do_statement] = STATE(235), - [sym_for_statement] = STATE(235), - [sym_return_statement] = STATE(235), - [sym_break_statement] = STATE(235), - [sym_continue_statement] = STATE(235), - [sym_goto_statement] = STATE(235), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [sym_identifier] = ACTIONS(1207), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [221] = { - [sym_attribute_declaration] = STATE(153), - [sym_compound_statement] = STATE(241), - [sym_attributed_statement] = STATE(241), - [sym_labeled_statement] = STATE(241), - [sym_expression_statement] = STATE(241), - [sym_if_statement] = STATE(241), - [sym_switch_statement] = STATE(241), - [sym_case_statement] = STATE(241), - [sym_while_statement] = STATE(241), - [sym_do_statement] = STATE(241), - [sym_for_statement] = STATE(241), - [sym_return_statement] = STATE(241), - [sym_break_statement] = STATE(241), - [sym_continue_statement] = STATE(241), - [sym_goto_statement] = STATE(241), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [sym_identifier] = ACTIONS(1207), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [222] = { - [sym_identifier] = ACTIONS(928), - [aux_sym_preproc_include_token1] = ACTIONS(928), - [aux_sym_preproc_def_token1] = ACTIONS(928), - [aux_sym_preproc_if_token1] = ACTIONS(928), - [aux_sym_preproc_ifdef_token1] = ACTIONS(928), - [aux_sym_preproc_ifdef_token2] = ACTIONS(928), - [sym_preproc_directive] = ACTIONS(928), - [anon_sym_LPAREN2] = ACTIONS(930), - [anon_sym_BANG] = ACTIONS(930), - [anon_sym_TILDE] = ACTIONS(930), - [anon_sym_DASH] = ACTIONS(928), - [anon_sym_PLUS] = ACTIONS(928), - [anon_sym_STAR] = ACTIONS(930), - [anon_sym_AMP] = ACTIONS(930), - [anon_sym_SEMI] = ACTIONS(930), - [anon_sym_typedef] = ACTIONS(928), - [anon_sym_extern] = ACTIONS(928), - [anon_sym___attribute__] = ACTIONS(928), - [anon_sym_LBRACK_LBRACK] = ACTIONS(930), - [anon_sym___declspec] = ACTIONS(928), - [anon_sym___cdecl] = ACTIONS(928), - [anon_sym___clrcall] = ACTIONS(928), - [anon_sym___stdcall] = ACTIONS(928), - [anon_sym___fastcall] = ACTIONS(928), - [anon_sym___thiscall] = ACTIONS(928), - [anon_sym___vectorcall] = ACTIONS(928), - [anon_sym_LBRACE] = ACTIONS(930), - [anon_sym_RBRACE] = ACTIONS(930), - [anon_sym_static] = ACTIONS(928), - [anon_sym_auto] = ACTIONS(928), - [anon_sym_register] = ACTIONS(928), - [anon_sym_inline] = ACTIONS(928), - [anon_sym_const] = ACTIONS(928), - [anon_sym_volatile] = ACTIONS(928), - [anon_sym_restrict] = ACTIONS(928), - [anon_sym__Atomic] = ACTIONS(928), - [anon_sym_signed] = ACTIONS(928), - [anon_sym_unsigned] = ACTIONS(928), - [anon_sym_long] = ACTIONS(928), - [anon_sym_short] = ACTIONS(928), - [sym_primitive_type] = ACTIONS(928), - [anon_sym_enum] = ACTIONS(928), - [anon_sym_struct] = ACTIONS(928), - [anon_sym_union] = ACTIONS(928), - [anon_sym_if] = ACTIONS(928), - [anon_sym_else] = ACTIONS(928), - [anon_sym_switch] = ACTIONS(928), - [anon_sym_case] = ACTIONS(928), - [anon_sym_default] = ACTIONS(928), - [anon_sym_while] = ACTIONS(928), - [anon_sym_do] = ACTIONS(928), - [anon_sym_for] = ACTIONS(928), - [anon_sym_return] = ACTIONS(928), - [anon_sym_break] = ACTIONS(928), - [anon_sym_continue] = ACTIONS(928), - [anon_sym_goto] = ACTIONS(928), - [anon_sym_DASH_DASH] = ACTIONS(930), - [anon_sym_PLUS_PLUS] = ACTIONS(930), - [anon_sym_sizeof] = ACTIONS(928), - [sym_number_literal] = ACTIONS(930), - [anon_sym_L_SQUOTE] = ACTIONS(930), - [anon_sym_u_SQUOTE] = ACTIONS(930), - [anon_sym_U_SQUOTE] = ACTIONS(930), - [anon_sym_u8_SQUOTE] = ACTIONS(930), - [anon_sym_SQUOTE] = ACTIONS(930), - [anon_sym_L_DQUOTE] = ACTIONS(930), - [anon_sym_u_DQUOTE] = ACTIONS(930), - [anon_sym_U_DQUOTE] = ACTIONS(930), - [anon_sym_u8_DQUOTE] = ACTIONS(930), - [anon_sym_DQUOTE] = ACTIONS(930), - [sym_true] = ACTIONS(928), - [sym_false] = ACTIONS(928), - [sym_null] = ACTIONS(928), - [sym_comment] = ACTIONS(3), - }, - [223] = { - [ts_builtin_sym_end] = ACTIONS(1006), - [sym_identifier] = ACTIONS(1004), - [aux_sym_preproc_include_token1] = ACTIONS(1004), - [aux_sym_preproc_def_token1] = ACTIONS(1004), - [aux_sym_preproc_if_token1] = ACTIONS(1004), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1004), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1004), - [sym_preproc_directive] = ACTIONS(1004), - [anon_sym_LPAREN2] = ACTIONS(1006), - [anon_sym_BANG] = ACTIONS(1006), - [anon_sym_TILDE] = ACTIONS(1006), - [anon_sym_DASH] = ACTIONS(1004), - [anon_sym_PLUS] = ACTIONS(1004), - [anon_sym_STAR] = ACTIONS(1006), - [anon_sym_AMP] = ACTIONS(1006), - [anon_sym_SEMI] = ACTIONS(1006), - [anon_sym_typedef] = ACTIONS(1004), - [anon_sym_extern] = ACTIONS(1004), - [anon_sym___attribute__] = ACTIONS(1004), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1006), - [anon_sym___declspec] = ACTIONS(1004), - [anon_sym___cdecl] = ACTIONS(1004), - [anon_sym___clrcall] = ACTIONS(1004), - [anon_sym___stdcall] = ACTIONS(1004), - [anon_sym___fastcall] = ACTIONS(1004), - [anon_sym___thiscall] = ACTIONS(1004), - [anon_sym___vectorcall] = ACTIONS(1004), - [anon_sym_LBRACE] = ACTIONS(1006), - [anon_sym_static] = ACTIONS(1004), - [anon_sym_auto] = ACTIONS(1004), - [anon_sym_register] = ACTIONS(1004), - [anon_sym_inline] = ACTIONS(1004), - [anon_sym_const] = ACTIONS(1004), - [anon_sym_volatile] = ACTIONS(1004), - [anon_sym_restrict] = ACTIONS(1004), - [anon_sym__Atomic] = ACTIONS(1004), - [anon_sym_signed] = ACTIONS(1004), - [anon_sym_unsigned] = ACTIONS(1004), - [anon_sym_long] = ACTIONS(1004), - [anon_sym_short] = ACTIONS(1004), - [sym_primitive_type] = ACTIONS(1004), - [anon_sym_enum] = ACTIONS(1004), - [anon_sym_struct] = ACTIONS(1004), - [anon_sym_union] = ACTIONS(1004), - [anon_sym_if] = ACTIONS(1004), - [anon_sym_else] = ACTIONS(1004), - [anon_sym_switch] = ACTIONS(1004), - [anon_sym_case] = ACTIONS(1004), - [anon_sym_default] = ACTIONS(1004), - [anon_sym_while] = ACTIONS(1004), - [anon_sym_do] = ACTIONS(1004), - [anon_sym_for] = ACTIONS(1004), - [anon_sym_return] = ACTIONS(1004), - [anon_sym_break] = ACTIONS(1004), - [anon_sym_continue] = ACTIONS(1004), - [anon_sym_goto] = ACTIONS(1004), - [anon_sym_DASH_DASH] = ACTIONS(1006), - [anon_sym_PLUS_PLUS] = ACTIONS(1006), - [anon_sym_sizeof] = ACTIONS(1004), - [sym_number_literal] = ACTIONS(1006), - [anon_sym_L_SQUOTE] = ACTIONS(1006), - [anon_sym_u_SQUOTE] = ACTIONS(1006), - [anon_sym_U_SQUOTE] = ACTIONS(1006), - [anon_sym_u8_SQUOTE] = ACTIONS(1006), - [anon_sym_SQUOTE] = ACTIONS(1006), - [anon_sym_L_DQUOTE] = ACTIONS(1006), - [anon_sym_u_DQUOTE] = ACTIONS(1006), - [anon_sym_U_DQUOTE] = ACTIONS(1006), - [anon_sym_u8_DQUOTE] = ACTIONS(1006), - [anon_sym_DQUOTE] = ACTIONS(1006), - [sym_true] = ACTIONS(1004), - [sym_false] = ACTIONS(1004), - [sym_null] = ACTIONS(1004), - [sym_comment] = ACTIONS(3), - }, - [224] = { - [sym_attribute_declaration] = STATE(232), - [sym_compound_statement] = STATE(230), - [sym_attributed_statement] = STATE(230), - [sym_labeled_statement] = STATE(230), - [sym_expression_statement] = STATE(230), - [sym_if_statement] = STATE(230), - [sym_switch_statement] = STATE(230), - [sym_case_statement] = STATE(230), - [sym_while_statement] = STATE(230), - [sym_do_statement] = STATE(230), - [sym_for_statement] = STATE(230), - [sym_return_statement] = STATE(230), - [sym_break_statement] = STATE(230), - [sym_continue_statement] = STATE(230), - [sym_goto_statement] = STATE(230), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(232), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [225] = { - [sym_attribute_declaration] = STATE(225), - [sym_compound_statement] = STATE(82), - [sym_attributed_statement] = STATE(82), - [sym_labeled_statement] = STATE(82), - [sym_expression_statement] = STATE(82), - [sym_if_statement] = STATE(82), - [sym_switch_statement] = STATE(82), - [sym_case_statement] = STATE(82), - [sym_while_statement] = STATE(82), - [sym_do_statement] = STATE(82), - [sym_for_statement] = STATE(82), - [sym_return_statement] = STATE(82), - [sym_break_statement] = STATE(82), - [sym_continue_statement] = STATE(82), - [sym_goto_statement] = STATE(82), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(225), - [sym_identifier] = ACTIONS(1253), - [anon_sym_LPAREN2] = ACTIONS(1135), - [anon_sym_BANG] = ACTIONS(1138), - [anon_sym_TILDE] = ACTIONS(1138), - [anon_sym_DASH] = ACTIONS(1141), - [anon_sym_PLUS] = ACTIONS(1141), - [anon_sym_STAR] = ACTIONS(1144), - [anon_sym_AMP] = ACTIONS(1144), - [anon_sym_SEMI] = ACTIONS(1256), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1150), - [anon_sym_LBRACE] = ACTIONS(1259), - [anon_sym_if] = ACTIONS(1262), - [anon_sym_switch] = ACTIONS(1265), - [anon_sym_case] = ACTIONS(1268), - [anon_sym_default] = ACTIONS(1271), - [anon_sym_while] = ACTIONS(1274), - [anon_sym_do] = ACTIONS(1277), - [anon_sym_for] = ACTIONS(1280), - [anon_sym_return] = ACTIONS(1283), - [anon_sym_break] = ACTIONS(1286), - [anon_sym_continue] = ACTIONS(1289), - [anon_sym_goto] = ACTIONS(1292), - [anon_sym_DASH_DASH] = ACTIONS(1189), - [anon_sym_PLUS_PLUS] = ACTIONS(1189), - [anon_sym_sizeof] = ACTIONS(1192), - [sym_number_literal] = ACTIONS(1195), - [anon_sym_L_SQUOTE] = ACTIONS(1198), - [anon_sym_u_SQUOTE] = ACTIONS(1198), - [anon_sym_U_SQUOTE] = ACTIONS(1198), - [anon_sym_u8_SQUOTE] = ACTIONS(1198), - [anon_sym_SQUOTE] = ACTIONS(1198), - [anon_sym_L_DQUOTE] = ACTIONS(1201), - [anon_sym_u_DQUOTE] = ACTIONS(1201), - [anon_sym_U_DQUOTE] = ACTIONS(1201), - [anon_sym_u8_DQUOTE] = ACTIONS(1201), - [anon_sym_DQUOTE] = ACTIONS(1201), - [sym_true] = ACTIONS(1204), - [sym_false] = ACTIONS(1204), - [sym_null] = ACTIONS(1204), - [sym_comment] = ACTIONS(3), - }, - [226] = { - [sym_identifier] = ACTIONS(968), - [aux_sym_preproc_include_token1] = ACTIONS(968), - [aux_sym_preproc_def_token1] = ACTIONS(968), - [aux_sym_preproc_if_token1] = ACTIONS(968), - [aux_sym_preproc_if_token2] = ACTIONS(968), - [aux_sym_preproc_ifdef_token1] = ACTIONS(968), - [aux_sym_preproc_ifdef_token2] = ACTIONS(968), - [sym_preproc_directive] = ACTIONS(968), - [anon_sym_LPAREN2] = ACTIONS(970), - [anon_sym_BANG] = ACTIONS(970), - [anon_sym_TILDE] = ACTIONS(970), - [anon_sym_DASH] = ACTIONS(968), - [anon_sym_PLUS] = ACTIONS(968), - [anon_sym_STAR] = ACTIONS(970), - [anon_sym_AMP] = ACTIONS(970), - [anon_sym_SEMI] = ACTIONS(970), - [anon_sym_typedef] = ACTIONS(968), - [anon_sym_extern] = ACTIONS(968), - [anon_sym___attribute__] = ACTIONS(968), - [anon_sym_LBRACK_LBRACK] = ACTIONS(970), - [anon_sym___declspec] = ACTIONS(968), - [anon_sym___cdecl] = ACTIONS(968), - [anon_sym___clrcall] = ACTIONS(968), - [anon_sym___stdcall] = ACTIONS(968), - [anon_sym___fastcall] = ACTIONS(968), - [anon_sym___thiscall] = ACTIONS(968), - [anon_sym___vectorcall] = ACTIONS(968), - [anon_sym_LBRACE] = ACTIONS(970), - [anon_sym_static] = ACTIONS(968), - [anon_sym_auto] = ACTIONS(968), - [anon_sym_register] = ACTIONS(968), - [anon_sym_inline] = ACTIONS(968), - [anon_sym_const] = ACTIONS(968), - [anon_sym_volatile] = ACTIONS(968), - [anon_sym_restrict] = ACTIONS(968), - [anon_sym__Atomic] = ACTIONS(968), - [anon_sym_signed] = ACTIONS(968), - [anon_sym_unsigned] = ACTIONS(968), - [anon_sym_long] = ACTIONS(968), - [anon_sym_short] = ACTIONS(968), - [sym_primitive_type] = ACTIONS(968), - [anon_sym_enum] = ACTIONS(968), - [anon_sym_struct] = ACTIONS(968), - [anon_sym_union] = ACTIONS(968), - [anon_sym_if] = ACTIONS(968), - [anon_sym_else] = ACTIONS(968), - [anon_sym_switch] = ACTIONS(968), - [anon_sym_case] = ACTIONS(968), - [anon_sym_default] = ACTIONS(968), - [anon_sym_while] = ACTIONS(968), - [anon_sym_do] = ACTIONS(968), - [anon_sym_for] = ACTIONS(968), - [anon_sym_return] = ACTIONS(968), - [anon_sym_break] = ACTIONS(968), - [anon_sym_continue] = ACTIONS(968), - [anon_sym_goto] = ACTIONS(968), - [anon_sym_DASH_DASH] = ACTIONS(970), - [anon_sym_PLUS_PLUS] = ACTIONS(970), - [anon_sym_sizeof] = ACTIONS(968), - [sym_number_literal] = ACTIONS(970), - [anon_sym_L_SQUOTE] = ACTIONS(970), - [anon_sym_u_SQUOTE] = ACTIONS(970), - [anon_sym_U_SQUOTE] = ACTIONS(970), - [anon_sym_u8_SQUOTE] = ACTIONS(970), - [anon_sym_SQUOTE] = ACTIONS(970), - [anon_sym_L_DQUOTE] = ACTIONS(970), - [anon_sym_u_DQUOTE] = ACTIONS(970), - [anon_sym_U_DQUOTE] = ACTIONS(970), - [anon_sym_u8_DQUOTE] = ACTIONS(970), - [anon_sym_DQUOTE] = ACTIONS(970), - [sym_true] = ACTIONS(968), - [sym_false] = ACTIONS(968), - [sym_null] = ACTIONS(968), - [sym_comment] = ACTIONS(3), - }, - [227] = { - [sym_attribute_declaration] = STATE(153), - [sym_compound_statement] = STATE(296), - [sym_attributed_statement] = STATE(296), - [sym_labeled_statement] = STATE(296), - [sym_expression_statement] = STATE(296), - [sym_if_statement] = STATE(296), - [sym_switch_statement] = STATE(296), - [sym_case_statement] = STATE(296), - [sym_while_statement] = STATE(296), - [sym_do_statement] = STATE(296), - [sym_for_statement] = STATE(296), - [sym_return_statement] = STATE(296), - [sym_break_statement] = STATE(296), - [sym_continue_statement] = STATE(296), - [sym_goto_statement] = STATE(296), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [sym_identifier] = ACTIONS(1207), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [228] = { - [ts_builtin_sym_end] = ACTIONS(916), - [sym_identifier] = ACTIONS(914), - [aux_sym_preproc_include_token1] = ACTIONS(914), - [aux_sym_preproc_def_token1] = ACTIONS(914), - [aux_sym_preproc_if_token1] = ACTIONS(914), - [aux_sym_preproc_ifdef_token1] = ACTIONS(914), - [aux_sym_preproc_ifdef_token2] = ACTIONS(914), - [sym_preproc_directive] = ACTIONS(914), - [anon_sym_LPAREN2] = ACTIONS(916), - [anon_sym_BANG] = ACTIONS(916), - [anon_sym_TILDE] = ACTIONS(916), - [anon_sym_DASH] = ACTIONS(914), - [anon_sym_PLUS] = ACTIONS(914), - [anon_sym_STAR] = ACTIONS(916), - [anon_sym_AMP] = ACTIONS(916), - [anon_sym_SEMI] = ACTIONS(916), - [anon_sym_typedef] = ACTIONS(914), - [anon_sym_extern] = ACTIONS(914), - [anon_sym___attribute__] = ACTIONS(914), - [anon_sym_LBRACK_LBRACK] = ACTIONS(916), - [anon_sym___declspec] = ACTIONS(914), - [anon_sym___cdecl] = ACTIONS(914), - [anon_sym___clrcall] = ACTIONS(914), - [anon_sym___stdcall] = ACTIONS(914), - [anon_sym___fastcall] = ACTIONS(914), - [anon_sym___thiscall] = ACTIONS(914), - [anon_sym___vectorcall] = ACTIONS(914), - [anon_sym_LBRACE] = ACTIONS(916), - [anon_sym_static] = ACTIONS(914), - [anon_sym_auto] = ACTIONS(914), - [anon_sym_register] = ACTIONS(914), - [anon_sym_inline] = ACTIONS(914), - [anon_sym_const] = ACTIONS(914), - [anon_sym_volatile] = ACTIONS(914), - [anon_sym_restrict] = ACTIONS(914), - [anon_sym__Atomic] = ACTIONS(914), - [anon_sym_signed] = ACTIONS(914), - [anon_sym_unsigned] = ACTIONS(914), - [anon_sym_long] = ACTIONS(914), - [anon_sym_short] = ACTIONS(914), - [sym_primitive_type] = ACTIONS(914), - [anon_sym_enum] = ACTIONS(914), - [anon_sym_struct] = ACTIONS(914), - [anon_sym_union] = ACTIONS(914), - [anon_sym_if] = ACTIONS(914), - [anon_sym_else] = ACTIONS(1295), - [anon_sym_switch] = ACTIONS(914), - [anon_sym_case] = ACTIONS(914), - [anon_sym_default] = ACTIONS(914), - [anon_sym_while] = ACTIONS(914), - [anon_sym_do] = ACTIONS(914), - [anon_sym_for] = ACTIONS(914), - [anon_sym_return] = ACTIONS(914), - [anon_sym_break] = ACTIONS(914), - [anon_sym_continue] = ACTIONS(914), - [anon_sym_goto] = ACTIONS(914), - [anon_sym_DASH_DASH] = ACTIONS(916), - [anon_sym_PLUS_PLUS] = ACTIONS(916), - [anon_sym_sizeof] = ACTIONS(914), - [sym_number_literal] = ACTIONS(916), - [anon_sym_L_SQUOTE] = ACTIONS(916), - [anon_sym_u_SQUOTE] = ACTIONS(916), - [anon_sym_U_SQUOTE] = ACTIONS(916), - [anon_sym_u8_SQUOTE] = ACTIONS(916), - [anon_sym_SQUOTE] = ACTIONS(916), - [anon_sym_L_DQUOTE] = ACTIONS(916), - [anon_sym_u_DQUOTE] = ACTIONS(916), - [anon_sym_U_DQUOTE] = ACTIONS(916), - [anon_sym_u8_DQUOTE] = ACTIONS(916), - [anon_sym_DQUOTE] = ACTIONS(916), - [sym_true] = ACTIONS(914), - [sym_false] = ACTIONS(914), - [sym_null] = ACTIONS(914), - [sym_comment] = ACTIONS(3), - }, - [229] = { - [ts_builtin_sym_end] = ACTIONS(908), - [sym_identifier] = ACTIONS(906), - [aux_sym_preproc_include_token1] = ACTIONS(906), - [aux_sym_preproc_def_token1] = ACTIONS(906), - [aux_sym_preproc_if_token1] = ACTIONS(906), - [aux_sym_preproc_ifdef_token1] = ACTIONS(906), - [aux_sym_preproc_ifdef_token2] = ACTIONS(906), - [sym_preproc_directive] = ACTIONS(906), - [anon_sym_LPAREN2] = ACTIONS(908), - [anon_sym_BANG] = ACTIONS(908), - [anon_sym_TILDE] = ACTIONS(908), - [anon_sym_DASH] = ACTIONS(906), - [anon_sym_PLUS] = ACTIONS(906), - [anon_sym_STAR] = ACTIONS(908), - [anon_sym_AMP] = ACTIONS(908), - [anon_sym_SEMI] = ACTIONS(908), - [anon_sym_typedef] = ACTIONS(906), - [anon_sym_extern] = ACTIONS(906), - [anon_sym___attribute__] = ACTIONS(906), - [anon_sym_LBRACK_LBRACK] = ACTIONS(908), - [anon_sym___declspec] = ACTIONS(906), - [anon_sym___cdecl] = ACTIONS(906), - [anon_sym___clrcall] = ACTIONS(906), - [anon_sym___stdcall] = ACTIONS(906), - [anon_sym___fastcall] = ACTIONS(906), - [anon_sym___thiscall] = ACTIONS(906), - [anon_sym___vectorcall] = ACTIONS(906), - [anon_sym_LBRACE] = ACTIONS(908), - [anon_sym_static] = ACTIONS(906), - [anon_sym_auto] = ACTIONS(906), - [anon_sym_register] = ACTIONS(906), - [anon_sym_inline] = ACTIONS(906), - [anon_sym_const] = ACTIONS(906), - [anon_sym_volatile] = ACTIONS(906), - [anon_sym_restrict] = ACTIONS(906), - [anon_sym__Atomic] = ACTIONS(906), - [anon_sym_signed] = ACTIONS(906), - [anon_sym_unsigned] = ACTIONS(906), - [anon_sym_long] = ACTIONS(906), - [anon_sym_short] = ACTIONS(906), - [sym_primitive_type] = ACTIONS(906), - [anon_sym_enum] = ACTIONS(906), - [anon_sym_struct] = ACTIONS(906), - [anon_sym_union] = ACTIONS(906), - [anon_sym_if] = ACTIONS(906), - [anon_sym_else] = ACTIONS(906), - [anon_sym_switch] = ACTIONS(906), - [anon_sym_case] = ACTIONS(906), - [anon_sym_default] = ACTIONS(906), - [anon_sym_while] = ACTIONS(906), - [anon_sym_do] = ACTIONS(906), - [anon_sym_for] = ACTIONS(906), - [anon_sym_return] = ACTIONS(906), - [anon_sym_break] = ACTIONS(906), - [anon_sym_continue] = ACTIONS(906), - [anon_sym_goto] = ACTIONS(906), - [anon_sym_DASH_DASH] = ACTIONS(908), - [anon_sym_PLUS_PLUS] = ACTIONS(908), - [anon_sym_sizeof] = ACTIONS(906), - [sym_number_literal] = ACTIONS(908), - [anon_sym_L_SQUOTE] = ACTIONS(908), - [anon_sym_u_SQUOTE] = ACTIONS(908), - [anon_sym_U_SQUOTE] = ACTIONS(908), - [anon_sym_u8_SQUOTE] = ACTIONS(908), - [anon_sym_SQUOTE] = ACTIONS(908), - [anon_sym_L_DQUOTE] = ACTIONS(908), - [anon_sym_u_DQUOTE] = ACTIONS(908), - [anon_sym_U_DQUOTE] = ACTIONS(908), - [anon_sym_u8_DQUOTE] = ACTIONS(908), - [anon_sym_DQUOTE] = ACTIONS(908), - [sym_true] = ACTIONS(906), - [sym_false] = ACTIONS(906), - [sym_null] = ACTIONS(906), - [sym_comment] = ACTIONS(3), - }, - [230] = { - [ts_builtin_sym_end] = ACTIONS(1010), - [sym_identifier] = ACTIONS(1008), - [aux_sym_preproc_include_token1] = ACTIONS(1008), - [aux_sym_preproc_def_token1] = ACTIONS(1008), - [aux_sym_preproc_if_token1] = ACTIONS(1008), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1008), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1008), - [sym_preproc_directive] = ACTIONS(1008), - [anon_sym_LPAREN2] = ACTIONS(1010), - [anon_sym_BANG] = ACTIONS(1010), - [anon_sym_TILDE] = ACTIONS(1010), - [anon_sym_DASH] = ACTIONS(1008), - [anon_sym_PLUS] = ACTIONS(1008), - [anon_sym_STAR] = ACTIONS(1010), - [anon_sym_AMP] = ACTIONS(1010), - [anon_sym_SEMI] = ACTIONS(1010), - [anon_sym_typedef] = ACTIONS(1008), - [anon_sym_extern] = ACTIONS(1008), - [anon_sym___attribute__] = ACTIONS(1008), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1010), - [anon_sym___declspec] = ACTIONS(1008), - [anon_sym___cdecl] = ACTIONS(1008), - [anon_sym___clrcall] = ACTIONS(1008), - [anon_sym___stdcall] = ACTIONS(1008), - [anon_sym___fastcall] = ACTIONS(1008), - [anon_sym___thiscall] = ACTIONS(1008), - [anon_sym___vectorcall] = ACTIONS(1008), - [anon_sym_LBRACE] = ACTIONS(1010), - [anon_sym_static] = ACTIONS(1008), - [anon_sym_auto] = ACTIONS(1008), - [anon_sym_register] = ACTIONS(1008), - [anon_sym_inline] = ACTIONS(1008), - [anon_sym_const] = ACTIONS(1008), - [anon_sym_volatile] = ACTIONS(1008), - [anon_sym_restrict] = ACTIONS(1008), - [anon_sym__Atomic] = ACTIONS(1008), - [anon_sym_signed] = ACTIONS(1008), - [anon_sym_unsigned] = ACTIONS(1008), - [anon_sym_long] = ACTIONS(1008), - [anon_sym_short] = ACTIONS(1008), - [sym_primitive_type] = ACTIONS(1008), - [anon_sym_enum] = ACTIONS(1008), - [anon_sym_struct] = ACTIONS(1008), - [anon_sym_union] = ACTIONS(1008), - [anon_sym_if] = ACTIONS(1008), - [anon_sym_else] = ACTIONS(1008), - [anon_sym_switch] = ACTIONS(1008), - [anon_sym_case] = ACTIONS(1008), - [anon_sym_default] = ACTIONS(1008), - [anon_sym_while] = ACTIONS(1008), - [anon_sym_do] = ACTIONS(1008), - [anon_sym_for] = ACTIONS(1008), - [anon_sym_return] = ACTIONS(1008), - [anon_sym_break] = ACTIONS(1008), - [anon_sym_continue] = ACTIONS(1008), - [anon_sym_goto] = ACTIONS(1008), - [anon_sym_DASH_DASH] = ACTIONS(1010), - [anon_sym_PLUS_PLUS] = ACTIONS(1010), - [anon_sym_sizeof] = ACTIONS(1008), - [sym_number_literal] = ACTIONS(1010), - [anon_sym_L_SQUOTE] = ACTIONS(1010), - [anon_sym_u_SQUOTE] = ACTIONS(1010), - [anon_sym_U_SQUOTE] = ACTIONS(1010), - [anon_sym_u8_SQUOTE] = ACTIONS(1010), - [anon_sym_SQUOTE] = ACTIONS(1010), - [anon_sym_L_DQUOTE] = ACTIONS(1010), - [anon_sym_u_DQUOTE] = ACTIONS(1010), - [anon_sym_U_DQUOTE] = ACTIONS(1010), - [anon_sym_u8_DQUOTE] = ACTIONS(1010), - [anon_sym_DQUOTE] = ACTIONS(1010), - [sym_true] = ACTIONS(1008), - [sym_false] = ACTIONS(1008), - [sym_null] = ACTIONS(1008), - [sym_comment] = ACTIONS(3), - }, - [231] = { - [sym_identifier] = ACTIONS(972), - [aux_sym_preproc_include_token1] = ACTIONS(972), - [aux_sym_preproc_def_token1] = ACTIONS(972), - [aux_sym_preproc_if_token1] = ACTIONS(972), - [aux_sym_preproc_if_token2] = ACTIONS(972), - [aux_sym_preproc_ifdef_token1] = ACTIONS(972), - [aux_sym_preproc_ifdef_token2] = ACTIONS(972), - [sym_preproc_directive] = ACTIONS(972), - [anon_sym_LPAREN2] = ACTIONS(974), - [anon_sym_BANG] = ACTIONS(974), - [anon_sym_TILDE] = ACTIONS(974), - [anon_sym_DASH] = ACTIONS(972), - [anon_sym_PLUS] = ACTIONS(972), - [anon_sym_STAR] = ACTIONS(974), - [anon_sym_AMP] = ACTIONS(974), - [anon_sym_SEMI] = ACTIONS(974), - [anon_sym_typedef] = ACTIONS(972), - [anon_sym_extern] = ACTIONS(972), - [anon_sym___attribute__] = ACTIONS(972), - [anon_sym_LBRACK_LBRACK] = ACTIONS(974), - [anon_sym___declspec] = ACTIONS(972), - [anon_sym___cdecl] = ACTIONS(972), - [anon_sym___clrcall] = ACTIONS(972), - [anon_sym___stdcall] = ACTIONS(972), - [anon_sym___fastcall] = ACTIONS(972), - [anon_sym___thiscall] = ACTIONS(972), - [anon_sym___vectorcall] = ACTIONS(972), - [anon_sym_LBRACE] = ACTIONS(974), - [anon_sym_static] = ACTIONS(972), - [anon_sym_auto] = ACTIONS(972), - [anon_sym_register] = ACTIONS(972), - [anon_sym_inline] = ACTIONS(972), - [anon_sym_const] = ACTIONS(972), - [anon_sym_volatile] = ACTIONS(972), - [anon_sym_restrict] = ACTIONS(972), - [anon_sym__Atomic] = ACTIONS(972), - [anon_sym_signed] = ACTIONS(972), - [anon_sym_unsigned] = ACTIONS(972), - [anon_sym_long] = ACTIONS(972), - [anon_sym_short] = ACTIONS(972), - [sym_primitive_type] = ACTIONS(972), - [anon_sym_enum] = ACTIONS(972), - [anon_sym_struct] = ACTIONS(972), - [anon_sym_union] = ACTIONS(972), - [anon_sym_if] = ACTIONS(972), - [anon_sym_else] = ACTIONS(972), - [anon_sym_switch] = ACTIONS(972), - [anon_sym_case] = ACTIONS(972), - [anon_sym_default] = ACTIONS(972), - [anon_sym_while] = ACTIONS(972), - [anon_sym_do] = ACTIONS(972), - [anon_sym_for] = ACTIONS(972), - [anon_sym_return] = ACTIONS(972), - [anon_sym_break] = ACTIONS(972), - [anon_sym_continue] = ACTIONS(972), - [anon_sym_goto] = ACTIONS(972), - [anon_sym_DASH_DASH] = ACTIONS(974), - [anon_sym_PLUS_PLUS] = ACTIONS(974), - [anon_sym_sizeof] = ACTIONS(972), - [sym_number_literal] = ACTIONS(974), - [anon_sym_L_SQUOTE] = ACTIONS(974), - [anon_sym_u_SQUOTE] = ACTIONS(974), - [anon_sym_U_SQUOTE] = ACTIONS(974), - [anon_sym_u8_SQUOTE] = ACTIONS(974), - [anon_sym_SQUOTE] = ACTIONS(974), - [anon_sym_L_DQUOTE] = ACTIONS(974), - [anon_sym_u_DQUOTE] = ACTIONS(974), - [anon_sym_U_DQUOTE] = ACTIONS(974), - [anon_sym_u8_DQUOTE] = ACTIONS(974), - [anon_sym_DQUOTE] = ACTIONS(974), - [sym_true] = ACTIONS(972), - [sym_false] = ACTIONS(972), - [sym_null] = ACTIONS(972), - [sym_comment] = ACTIONS(3), - }, - [232] = { - [sym_attribute_declaration] = STATE(170), - [sym_compound_statement] = STATE(169), - [sym_attributed_statement] = STATE(169), - [sym_labeled_statement] = STATE(169), - [sym_expression_statement] = STATE(169), - [sym_if_statement] = STATE(169), - [sym_switch_statement] = STATE(169), - [sym_case_statement] = STATE(169), - [sym_while_statement] = STATE(169), - [sym_do_statement] = STATE(169), - [sym_for_statement] = STATE(169), - [sym_return_statement] = STATE(169), - [sym_break_statement] = STATE(169), - [sym_continue_statement] = STATE(169), - [sym_goto_statement] = STATE(169), - [sym__expression] = STATE(740), - [sym_comma_expression] = STATE(1438), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(170), - [sym_identifier] = ACTIONS(1128), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(27), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(41), - [anon_sym_if] = ACTIONS(57), - [anon_sym_switch] = ACTIONS(59), - [anon_sym_case] = ACTIONS(61), - [anon_sym_default] = ACTIONS(63), - [anon_sym_while] = ACTIONS(65), - [anon_sym_do] = ACTIONS(67), - [anon_sym_for] = ACTIONS(69), - [anon_sym_return] = ACTIONS(71), - [anon_sym_break] = ACTIONS(73), - [anon_sym_continue] = ACTIONS(75), - [anon_sym_goto] = ACTIONS(77), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [233] = { - [ts_builtin_sym_end] = ACTIONS(912), - [sym_identifier] = ACTIONS(910), - [aux_sym_preproc_include_token1] = ACTIONS(910), - [aux_sym_preproc_def_token1] = ACTIONS(910), - [aux_sym_preproc_if_token1] = ACTIONS(910), - [aux_sym_preproc_ifdef_token1] = ACTIONS(910), - [aux_sym_preproc_ifdef_token2] = ACTIONS(910), - [sym_preproc_directive] = ACTIONS(910), - [anon_sym_LPAREN2] = ACTIONS(912), - [anon_sym_BANG] = ACTIONS(912), - [anon_sym_TILDE] = ACTIONS(912), - [anon_sym_DASH] = ACTIONS(910), - [anon_sym_PLUS] = ACTIONS(910), - [anon_sym_STAR] = ACTIONS(912), - [anon_sym_AMP] = ACTIONS(912), - [anon_sym_SEMI] = ACTIONS(912), - [anon_sym_typedef] = ACTIONS(910), - [anon_sym_extern] = ACTIONS(910), - [anon_sym___attribute__] = ACTIONS(910), - [anon_sym_LBRACK_LBRACK] = ACTIONS(912), - [anon_sym___declspec] = ACTIONS(910), - [anon_sym___cdecl] = ACTIONS(910), - [anon_sym___clrcall] = ACTIONS(910), - [anon_sym___stdcall] = ACTIONS(910), - [anon_sym___fastcall] = ACTIONS(910), - [anon_sym___thiscall] = ACTIONS(910), - [anon_sym___vectorcall] = ACTIONS(910), - [anon_sym_LBRACE] = ACTIONS(912), - [anon_sym_static] = ACTIONS(910), - [anon_sym_auto] = ACTIONS(910), - [anon_sym_register] = ACTIONS(910), - [anon_sym_inline] = ACTIONS(910), - [anon_sym_const] = ACTIONS(910), - [anon_sym_volatile] = ACTIONS(910), - [anon_sym_restrict] = ACTIONS(910), - [anon_sym__Atomic] = ACTIONS(910), - [anon_sym_signed] = ACTIONS(910), - [anon_sym_unsigned] = ACTIONS(910), - [anon_sym_long] = ACTIONS(910), - [anon_sym_short] = ACTIONS(910), - [sym_primitive_type] = ACTIONS(910), - [anon_sym_enum] = ACTIONS(910), - [anon_sym_struct] = ACTIONS(910), - [anon_sym_union] = ACTIONS(910), - [anon_sym_if] = ACTIONS(910), - [anon_sym_else] = ACTIONS(910), - [anon_sym_switch] = ACTIONS(910), - [anon_sym_case] = ACTIONS(910), - [anon_sym_default] = ACTIONS(910), - [anon_sym_while] = ACTIONS(910), - [anon_sym_do] = ACTIONS(910), - [anon_sym_for] = ACTIONS(910), - [anon_sym_return] = ACTIONS(910), - [anon_sym_break] = ACTIONS(910), - [anon_sym_continue] = ACTIONS(910), - [anon_sym_goto] = ACTIONS(910), - [anon_sym_DASH_DASH] = ACTIONS(912), - [anon_sym_PLUS_PLUS] = ACTIONS(912), - [anon_sym_sizeof] = ACTIONS(910), - [sym_number_literal] = ACTIONS(912), - [anon_sym_L_SQUOTE] = ACTIONS(912), - [anon_sym_u_SQUOTE] = ACTIONS(912), - [anon_sym_U_SQUOTE] = ACTIONS(912), - [anon_sym_u8_SQUOTE] = ACTIONS(912), - [anon_sym_SQUOTE] = ACTIONS(912), - [anon_sym_L_DQUOTE] = ACTIONS(912), - [anon_sym_u_DQUOTE] = ACTIONS(912), - [anon_sym_U_DQUOTE] = ACTIONS(912), - [anon_sym_u8_DQUOTE] = ACTIONS(912), - [anon_sym_DQUOTE] = ACTIONS(912), - [sym_true] = ACTIONS(910), - [sym_false] = ACTIONS(910), - [sym_null] = ACTIONS(910), - [sym_comment] = ACTIONS(3), - }, - [234] = { - [sym_attribute_declaration] = STATE(247), - [sym_compound_statement] = STATE(87), - [sym_attributed_statement] = STATE(87), - [sym_labeled_statement] = STATE(87), - [sym_expression_statement] = STATE(87), - [sym_if_statement] = STATE(87), - [sym_switch_statement] = STATE(87), - [sym_case_statement] = STATE(87), - [sym_while_statement] = STATE(87), - [sym_do_statement] = STATE(87), - [sym_for_statement] = STATE(87), - [sym_return_statement] = STATE(87), - [sym_break_statement] = STATE(87), - [sym_continue_statement] = STATE(87), - [sym_goto_statement] = STATE(87), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [sym_identifier] = ACTIONS(1209), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [235] = { - [sym_identifier] = ACTIONS(976), - [aux_sym_preproc_include_token1] = ACTIONS(976), - [aux_sym_preproc_def_token1] = ACTIONS(976), - [aux_sym_preproc_if_token1] = ACTIONS(976), - [aux_sym_preproc_if_token2] = ACTIONS(976), - [aux_sym_preproc_ifdef_token1] = ACTIONS(976), - [aux_sym_preproc_ifdef_token2] = ACTIONS(976), - [sym_preproc_directive] = ACTIONS(976), - [anon_sym_LPAREN2] = ACTIONS(978), - [anon_sym_BANG] = ACTIONS(978), - [anon_sym_TILDE] = ACTIONS(978), - [anon_sym_DASH] = ACTIONS(976), - [anon_sym_PLUS] = ACTIONS(976), - [anon_sym_STAR] = ACTIONS(978), - [anon_sym_AMP] = ACTIONS(978), - [anon_sym_SEMI] = ACTIONS(978), - [anon_sym_typedef] = ACTIONS(976), - [anon_sym_extern] = ACTIONS(976), - [anon_sym___attribute__] = ACTIONS(976), - [anon_sym_LBRACK_LBRACK] = ACTIONS(978), - [anon_sym___declspec] = ACTIONS(976), - [anon_sym___cdecl] = ACTIONS(976), - [anon_sym___clrcall] = ACTIONS(976), - [anon_sym___stdcall] = ACTIONS(976), - [anon_sym___fastcall] = ACTIONS(976), - [anon_sym___thiscall] = ACTIONS(976), - [anon_sym___vectorcall] = ACTIONS(976), - [anon_sym_LBRACE] = ACTIONS(978), - [anon_sym_static] = ACTIONS(976), - [anon_sym_auto] = ACTIONS(976), - [anon_sym_register] = ACTIONS(976), - [anon_sym_inline] = ACTIONS(976), - [anon_sym_const] = ACTIONS(976), - [anon_sym_volatile] = ACTIONS(976), - [anon_sym_restrict] = ACTIONS(976), - [anon_sym__Atomic] = ACTIONS(976), - [anon_sym_signed] = ACTIONS(976), - [anon_sym_unsigned] = ACTIONS(976), - [anon_sym_long] = ACTIONS(976), - [anon_sym_short] = ACTIONS(976), - [sym_primitive_type] = ACTIONS(976), - [anon_sym_enum] = ACTIONS(976), - [anon_sym_struct] = ACTIONS(976), - [anon_sym_union] = ACTIONS(976), - [anon_sym_if] = ACTIONS(976), - [anon_sym_else] = ACTIONS(976), - [anon_sym_switch] = ACTIONS(976), - [anon_sym_case] = ACTIONS(976), - [anon_sym_default] = ACTIONS(976), - [anon_sym_while] = ACTIONS(976), - [anon_sym_do] = ACTIONS(976), - [anon_sym_for] = ACTIONS(976), - [anon_sym_return] = ACTIONS(976), - [anon_sym_break] = ACTIONS(976), - [anon_sym_continue] = ACTIONS(976), - [anon_sym_goto] = ACTIONS(976), - [anon_sym_DASH_DASH] = ACTIONS(978), - [anon_sym_PLUS_PLUS] = ACTIONS(978), - [anon_sym_sizeof] = ACTIONS(976), - [sym_number_literal] = ACTIONS(978), - [anon_sym_L_SQUOTE] = ACTIONS(978), - [anon_sym_u_SQUOTE] = ACTIONS(978), - [anon_sym_U_SQUOTE] = ACTIONS(978), - [anon_sym_u8_SQUOTE] = ACTIONS(978), - [anon_sym_SQUOTE] = ACTIONS(978), - [anon_sym_L_DQUOTE] = ACTIONS(978), - [anon_sym_u_DQUOTE] = ACTIONS(978), - [anon_sym_U_DQUOTE] = ACTIONS(978), - [anon_sym_u8_DQUOTE] = ACTIONS(978), - [anon_sym_DQUOTE] = ACTIONS(978), - [sym_true] = ACTIONS(976), - [sym_false] = ACTIONS(976), - [sym_null] = ACTIONS(976), - [sym_comment] = ACTIONS(3), - }, - [236] = { - [sym_identifier] = ACTIONS(964), - [aux_sym_preproc_include_token1] = ACTIONS(964), - [aux_sym_preproc_def_token1] = ACTIONS(964), - [aux_sym_preproc_if_token1] = ACTIONS(964), - [aux_sym_preproc_ifdef_token1] = ACTIONS(964), - [aux_sym_preproc_ifdef_token2] = ACTIONS(964), - [sym_preproc_directive] = ACTIONS(964), - [anon_sym_LPAREN2] = ACTIONS(966), - [anon_sym_BANG] = ACTIONS(966), - [anon_sym_TILDE] = ACTIONS(966), - [anon_sym_DASH] = ACTIONS(964), - [anon_sym_PLUS] = ACTIONS(964), - [anon_sym_STAR] = ACTIONS(966), - [anon_sym_AMP] = ACTIONS(966), - [anon_sym_SEMI] = ACTIONS(966), - [anon_sym_typedef] = ACTIONS(964), - [anon_sym_extern] = ACTIONS(964), - [anon_sym___attribute__] = ACTIONS(964), - [anon_sym_LBRACK_LBRACK] = ACTIONS(966), - [anon_sym___declspec] = ACTIONS(964), - [anon_sym___cdecl] = ACTIONS(964), - [anon_sym___clrcall] = ACTIONS(964), - [anon_sym___stdcall] = ACTIONS(964), - [anon_sym___fastcall] = ACTIONS(964), - [anon_sym___thiscall] = ACTIONS(964), - [anon_sym___vectorcall] = ACTIONS(964), - [anon_sym_LBRACE] = ACTIONS(966), - [anon_sym_RBRACE] = ACTIONS(966), - [anon_sym_static] = ACTIONS(964), - [anon_sym_auto] = ACTIONS(964), - [anon_sym_register] = ACTIONS(964), - [anon_sym_inline] = ACTIONS(964), - [anon_sym_const] = ACTIONS(964), - [anon_sym_volatile] = ACTIONS(964), - [anon_sym_restrict] = ACTIONS(964), - [anon_sym__Atomic] = ACTIONS(964), - [anon_sym_signed] = ACTIONS(964), - [anon_sym_unsigned] = ACTIONS(964), - [anon_sym_long] = ACTIONS(964), - [anon_sym_short] = ACTIONS(964), - [sym_primitive_type] = ACTIONS(964), - [anon_sym_enum] = ACTIONS(964), - [anon_sym_struct] = ACTIONS(964), - [anon_sym_union] = ACTIONS(964), - [anon_sym_if] = ACTIONS(964), - [anon_sym_else] = ACTIONS(964), - [anon_sym_switch] = ACTIONS(964), - [anon_sym_case] = ACTIONS(964), - [anon_sym_default] = ACTIONS(964), - [anon_sym_while] = ACTIONS(964), - [anon_sym_do] = ACTIONS(964), - [anon_sym_for] = ACTIONS(964), - [anon_sym_return] = ACTIONS(964), - [anon_sym_break] = ACTIONS(964), - [anon_sym_continue] = ACTIONS(964), - [anon_sym_goto] = ACTIONS(964), - [anon_sym_DASH_DASH] = ACTIONS(966), - [anon_sym_PLUS_PLUS] = ACTIONS(966), - [anon_sym_sizeof] = ACTIONS(964), - [sym_number_literal] = ACTIONS(966), - [anon_sym_L_SQUOTE] = ACTIONS(966), - [anon_sym_u_SQUOTE] = ACTIONS(966), - [anon_sym_U_SQUOTE] = ACTIONS(966), - [anon_sym_u8_SQUOTE] = ACTIONS(966), - [anon_sym_SQUOTE] = ACTIONS(966), - [anon_sym_L_DQUOTE] = ACTIONS(966), - [anon_sym_u_DQUOTE] = ACTIONS(966), - [anon_sym_U_DQUOTE] = ACTIONS(966), - [anon_sym_u8_DQUOTE] = ACTIONS(966), - [anon_sym_DQUOTE] = ACTIONS(966), - [sym_true] = ACTIONS(964), - [sym_false] = ACTIONS(964), - [sym_null] = ACTIONS(964), - [sym_comment] = ACTIONS(3), - }, - [237] = { - [sym_attribute_declaration] = STATE(153), - [sym_compound_statement] = STATE(298), - [sym_attributed_statement] = STATE(298), - [sym_labeled_statement] = STATE(298), - [sym_expression_statement] = STATE(298), - [sym_if_statement] = STATE(298), - [sym_switch_statement] = STATE(298), - [sym_case_statement] = STATE(298), - [sym_while_statement] = STATE(298), - [sym_do_statement] = STATE(298), - [sym_for_statement] = STATE(298), - [sym_return_statement] = STATE(298), - [sym_break_statement] = STATE(298), - [sym_continue_statement] = STATE(298), - [sym_goto_statement] = STATE(298), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [sym_identifier] = ACTIONS(1207), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [238] = { - [ts_builtin_sym_end] = ACTIONS(950), - [sym_identifier] = ACTIONS(948), - [aux_sym_preproc_include_token1] = ACTIONS(948), - [aux_sym_preproc_def_token1] = ACTIONS(948), - [aux_sym_preproc_if_token1] = ACTIONS(948), - [aux_sym_preproc_ifdef_token1] = ACTIONS(948), - [aux_sym_preproc_ifdef_token2] = ACTIONS(948), - [sym_preproc_directive] = ACTIONS(948), - [anon_sym_LPAREN2] = ACTIONS(950), - [anon_sym_BANG] = ACTIONS(950), - [anon_sym_TILDE] = ACTIONS(950), - [anon_sym_DASH] = ACTIONS(948), - [anon_sym_PLUS] = ACTIONS(948), - [anon_sym_STAR] = ACTIONS(950), - [anon_sym_AMP] = ACTIONS(950), - [anon_sym_SEMI] = ACTIONS(950), - [anon_sym_typedef] = ACTIONS(948), - [anon_sym_extern] = ACTIONS(948), - [anon_sym___attribute__] = ACTIONS(948), - [anon_sym_LBRACK_LBRACK] = ACTIONS(950), - [anon_sym___declspec] = ACTIONS(948), - [anon_sym___cdecl] = ACTIONS(948), - [anon_sym___clrcall] = ACTIONS(948), - [anon_sym___stdcall] = ACTIONS(948), - [anon_sym___fastcall] = ACTIONS(948), - [anon_sym___thiscall] = ACTIONS(948), - [anon_sym___vectorcall] = ACTIONS(948), - [anon_sym_LBRACE] = ACTIONS(950), - [anon_sym_static] = ACTIONS(948), - [anon_sym_auto] = ACTIONS(948), - [anon_sym_register] = ACTIONS(948), - [anon_sym_inline] = ACTIONS(948), - [anon_sym_const] = ACTIONS(948), - [anon_sym_volatile] = ACTIONS(948), - [anon_sym_restrict] = ACTIONS(948), - [anon_sym__Atomic] = ACTIONS(948), - [anon_sym_signed] = ACTIONS(948), - [anon_sym_unsigned] = ACTIONS(948), - [anon_sym_long] = ACTIONS(948), - [anon_sym_short] = ACTIONS(948), - [sym_primitive_type] = ACTIONS(948), - [anon_sym_enum] = ACTIONS(948), - [anon_sym_struct] = ACTIONS(948), - [anon_sym_union] = ACTIONS(948), - [anon_sym_if] = ACTIONS(948), - [anon_sym_else] = ACTIONS(948), - [anon_sym_switch] = ACTIONS(948), - [anon_sym_case] = ACTIONS(948), - [anon_sym_default] = ACTIONS(948), - [anon_sym_while] = ACTIONS(948), - [anon_sym_do] = ACTIONS(948), - [anon_sym_for] = ACTIONS(948), - [anon_sym_return] = ACTIONS(948), - [anon_sym_break] = ACTIONS(948), - [anon_sym_continue] = ACTIONS(948), - [anon_sym_goto] = ACTIONS(948), - [anon_sym_DASH_DASH] = ACTIONS(950), - [anon_sym_PLUS_PLUS] = ACTIONS(950), - [anon_sym_sizeof] = ACTIONS(948), - [sym_number_literal] = ACTIONS(950), - [anon_sym_L_SQUOTE] = ACTIONS(950), - [anon_sym_u_SQUOTE] = ACTIONS(950), - [anon_sym_U_SQUOTE] = ACTIONS(950), - [anon_sym_u8_SQUOTE] = ACTIONS(950), - [anon_sym_SQUOTE] = ACTIONS(950), - [anon_sym_L_DQUOTE] = ACTIONS(950), - [anon_sym_u_DQUOTE] = ACTIONS(950), - [anon_sym_U_DQUOTE] = ACTIONS(950), - [anon_sym_u8_DQUOTE] = ACTIONS(950), - [anon_sym_DQUOTE] = ACTIONS(950), - [sym_true] = ACTIONS(948), - [sym_false] = ACTIONS(948), - [sym_null] = ACTIONS(948), - [sym_comment] = ACTIONS(3), - }, - [239] = { - [ts_builtin_sym_end] = ACTIONS(1018), - [sym_identifier] = ACTIONS(1016), - [aux_sym_preproc_include_token1] = ACTIONS(1016), - [aux_sym_preproc_def_token1] = ACTIONS(1016), - [aux_sym_preproc_if_token1] = ACTIONS(1016), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1016), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1016), - [sym_preproc_directive] = ACTIONS(1016), - [anon_sym_LPAREN2] = ACTIONS(1018), - [anon_sym_BANG] = ACTIONS(1018), - [anon_sym_TILDE] = ACTIONS(1018), - [anon_sym_DASH] = ACTIONS(1016), - [anon_sym_PLUS] = ACTIONS(1016), - [anon_sym_STAR] = ACTIONS(1018), - [anon_sym_AMP] = ACTIONS(1018), - [anon_sym_SEMI] = ACTIONS(1018), - [anon_sym_typedef] = ACTIONS(1016), - [anon_sym_extern] = ACTIONS(1016), - [anon_sym___attribute__] = ACTIONS(1016), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1018), - [anon_sym___declspec] = ACTIONS(1016), - [anon_sym___cdecl] = ACTIONS(1016), - [anon_sym___clrcall] = ACTIONS(1016), - [anon_sym___stdcall] = ACTIONS(1016), - [anon_sym___fastcall] = ACTIONS(1016), - [anon_sym___thiscall] = ACTIONS(1016), - [anon_sym___vectorcall] = ACTIONS(1016), - [anon_sym_LBRACE] = ACTIONS(1018), - [anon_sym_static] = ACTIONS(1016), - [anon_sym_auto] = ACTIONS(1016), - [anon_sym_register] = ACTIONS(1016), - [anon_sym_inline] = ACTIONS(1016), - [anon_sym_const] = ACTIONS(1016), - [anon_sym_volatile] = ACTIONS(1016), - [anon_sym_restrict] = ACTIONS(1016), - [anon_sym__Atomic] = ACTIONS(1016), - [anon_sym_signed] = ACTIONS(1016), - [anon_sym_unsigned] = ACTIONS(1016), - [anon_sym_long] = ACTIONS(1016), - [anon_sym_short] = ACTIONS(1016), - [sym_primitive_type] = ACTIONS(1016), - [anon_sym_enum] = ACTIONS(1016), - [anon_sym_struct] = ACTIONS(1016), - [anon_sym_union] = ACTIONS(1016), - [anon_sym_if] = ACTIONS(1016), - [anon_sym_else] = ACTIONS(1016), - [anon_sym_switch] = ACTIONS(1016), - [anon_sym_case] = ACTIONS(1016), - [anon_sym_default] = ACTIONS(1016), - [anon_sym_while] = ACTIONS(1016), - [anon_sym_do] = ACTIONS(1016), - [anon_sym_for] = ACTIONS(1016), - [anon_sym_return] = ACTIONS(1016), - [anon_sym_break] = ACTIONS(1016), - [anon_sym_continue] = ACTIONS(1016), - [anon_sym_goto] = ACTIONS(1016), - [anon_sym_DASH_DASH] = ACTIONS(1018), - [anon_sym_PLUS_PLUS] = ACTIONS(1018), - [anon_sym_sizeof] = ACTIONS(1016), - [sym_number_literal] = ACTIONS(1018), - [anon_sym_L_SQUOTE] = ACTIONS(1018), - [anon_sym_u_SQUOTE] = ACTIONS(1018), - [anon_sym_U_SQUOTE] = ACTIONS(1018), - [anon_sym_u8_SQUOTE] = ACTIONS(1018), - [anon_sym_SQUOTE] = ACTIONS(1018), - [anon_sym_L_DQUOTE] = ACTIONS(1018), - [anon_sym_u_DQUOTE] = ACTIONS(1018), - [anon_sym_U_DQUOTE] = ACTIONS(1018), - [anon_sym_u8_DQUOTE] = ACTIONS(1018), - [anon_sym_DQUOTE] = ACTIONS(1018), - [sym_true] = ACTIONS(1016), - [sym_false] = ACTIONS(1016), - [sym_null] = ACTIONS(1016), - [sym_comment] = ACTIONS(3), - }, - [240] = { - [sym_attribute_declaration] = STATE(247), - [sym_compound_statement] = STATE(73), - [sym_attributed_statement] = STATE(73), - [sym_labeled_statement] = STATE(73), - [sym_expression_statement] = STATE(73), - [sym_if_statement] = STATE(73), - [sym_switch_statement] = STATE(73), - [sym_case_statement] = STATE(73), - [sym_while_statement] = STATE(73), - [sym_do_statement] = STATE(73), - [sym_for_statement] = STATE(73), - [sym_return_statement] = STATE(73), - [sym_break_statement] = STATE(73), - [sym_continue_statement] = STATE(73), - [sym_goto_statement] = STATE(73), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [sym_identifier] = ACTIONS(1209), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [241] = { - [sym_identifier] = ACTIONS(980), - [aux_sym_preproc_include_token1] = ACTIONS(980), - [aux_sym_preproc_def_token1] = ACTIONS(980), - [aux_sym_preproc_if_token1] = ACTIONS(980), - [aux_sym_preproc_if_token2] = ACTIONS(980), - [aux_sym_preproc_ifdef_token1] = ACTIONS(980), - [aux_sym_preproc_ifdef_token2] = ACTIONS(980), - [sym_preproc_directive] = ACTIONS(980), - [anon_sym_LPAREN2] = ACTIONS(982), - [anon_sym_BANG] = ACTIONS(982), - [anon_sym_TILDE] = ACTIONS(982), - [anon_sym_DASH] = ACTIONS(980), - [anon_sym_PLUS] = ACTIONS(980), - [anon_sym_STAR] = ACTIONS(982), - [anon_sym_AMP] = ACTIONS(982), - [anon_sym_SEMI] = ACTIONS(982), - [anon_sym_typedef] = ACTIONS(980), - [anon_sym_extern] = ACTIONS(980), - [anon_sym___attribute__] = ACTIONS(980), - [anon_sym_LBRACK_LBRACK] = ACTIONS(982), - [anon_sym___declspec] = ACTIONS(980), - [anon_sym___cdecl] = ACTIONS(980), - [anon_sym___clrcall] = ACTIONS(980), - [anon_sym___stdcall] = ACTIONS(980), - [anon_sym___fastcall] = ACTIONS(980), - [anon_sym___thiscall] = ACTIONS(980), - [anon_sym___vectorcall] = ACTIONS(980), - [anon_sym_LBRACE] = ACTIONS(982), - [anon_sym_static] = ACTIONS(980), - [anon_sym_auto] = ACTIONS(980), - [anon_sym_register] = ACTIONS(980), - [anon_sym_inline] = ACTIONS(980), - [anon_sym_const] = ACTIONS(980), - [anon_sym_volatile] = ACTIONS(980), - [anon_sym_restrict] = ACTIONS(980), - [anon_sym__Atomic] = ACTIONS(980), - [anon_sym_signed] = ACTIONS(980), - [anon_sym_unsigned] = ACTIONS(980), - [anon_sym_long] = ACTIONS(980), - [anon_sym_short] = ACTIONS(980), - [sym_primitive_type] = ACTIONS(980), - [anon_sym_enum] = ACTIONS(980), - [anon_sym_struct] = ACTIONS(980), - [anon_sym_union] = ACTIONS(980), - [anon_sym_if] = ACTIONS(980), - [anon_sym_else] = ACTIONS(980), - [anon_sym_switch] = ACTIONS(980), - [anon_sym_case] = ACTIONS(980), - [anon_sym_default] = ACTIONS(980), - [anon_sym_while] = ACTIONS(980), - [anon_sym_do] = ACTIONS(980), - [anon_sym_for] = ACTIONS(980), - [anon_sym_return] = ACTIONS(980), - [anon_sym_break] = ACTIONS(980), - [anon_sym_continue] = ACTIONS(980), - [anon_sym_goto] = ACTIONS(980), - [anon_sym_DASH_DASH] = ACTIONS(982), - [anon_sym_PLUS_PLUS] = ACTIONS(982), - [anon_sym_sizeof] = ACTIONS(980), - [sym_number_literal] = ACTIONS(982), - [anon_sym_L_SQUOTE] = ACTIONS(982), - [anon_sym_u_SQUOTE] = ACTIONS(982), - [anon_sym_U_SQUOTE] = ACTIONS(982), - [anon_sym_u8_SQUOTE] = ACTIONS(982), - [anon_sym_SQUOTE] = ACTIONS(982), - [anon_sym_L_DQUOTE] = ACTIONS(982), - [anon_sym_u_DQUOTE] = ACTIONS(982), - [anon_sym_U_DQUOTE] = ACTIONS(982), - [anon_sym_u8_DQUOTE] = ACTIONS(982), - [anon_sym_DQUOTE] = ACTIONS(982), - [sym_true] = ACTIONS(980), - [sym_false] = ACTIONS(980), - [sym_null] = ACTIONS(980), - [sym_comment] = ACTIONS(3), - }, - [242] = { - [sym_attribute_declaration] = STATE(292), - [sym_compound_statement] = STATE(291), - [sym_attributed_statement] = STATE(291), - [sym_labeled_statement] = STATE(291), - [sym_expression_statement] = STATE(291), - [sym_if_statement] = STATE(291), - [sym_switch_statement] = STATE(291), - [sym_case_statement] = STATE(291), - [sym_while_statement] = STATE(291), - [sym_do_statement] = STATE(291), - [sym_for_statement] = STATE(291), - [sym_return_statement] = STATE(291), - [sym_break_statement] = STATE(291), - [sym_continue_statement] = STATE(291), - [sym_goto_statement] = STATE(291), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(292), - [sym_identifier] = ACTIONS(1124), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [243] = { - [sym_attribute_declaration] = STATE(247), - [sym_compound_statement] = STATE(75), - [sym_attributed_statement] = STATE(75), - [sym_labeled_statement] = STATE(75), - [sym_expression_statement] = STATE(75), - [sym_if_statement] = STATE(75), - [sym_switch_statement] = STATE(75), - [sym_case_statement] = STATE(75), - [sym_while_statement] = STATE(75), - [sym_do_statement] = STATE(75), - [sym_for_statement] = STATE(75), - [sym_return_statement] = STATE(75), - [sym_break_statement] = STATE(75), - [sym_continue_statement] = STATE(75), - [sym_goto_statement] = STATE(75), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(247), - [sym_identifier] = ACTIONS(1209), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [244] = { - [sym_attribute_declaration] = STATE(153), - [sym_compound_statement] = STATE(299), - [sym_attributed_statement] = STATE(299), - [sym_labeled_statement] = STATE(299), - [sym_expression_statement] = STATE(299), - [sym_if_statement] = STATE(299), - [sym_switch_statement] = STATE(299), - [sym_case_statement] = STATE(299), - [sym_while_statement] = STATE(299), - [sym_do_statement] = STATE(299), - [sym_for_statement] = STATE(299), - [sym_return_statement] = STATE(299), - [sym_break_statement] = STATE(299), - [sym_continue_statement] = STATE(299), - [sym_goto_statement] = STATE(299), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [sym_identifier] = ACTIONS(1207), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [245] = { - [sym_identifier] = ACTIONS(1016), - [aux_sym_preproc_include_token1] = ACTIONS(1016), - [aux_sym_preproc_def_token1] = ACTIONS(1016), - [aux_sym_preproc_if_token1] = ACTIONS(1016), - [aux_sym_preproc_if_token2] = ACTIONS(1016), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1016), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1016), - [sym_preproc_directive] = ACTIONS(1016), - [anon_sym_LPAREN2] = ACTIONS(1018), - [anon_sym_BANG] = ACTIONS(1018), - [anon_sym_TILDE] = ACTIONS(1018), - [anon_sym_DASH] = ACTIONS(1016), - [anon_sym_PLUS] = ACTIONS(1016), - [anon_sym_STAR] = ACTIONS(1018), - [anon_sym_AMP] = ACTIONS(1018), - [anon_sym_SEMI] = ACTIONS(1018), - [anon_sym_typedef] = ACTIONS(1016), - [anon_sym_extern] = ACTIONS(1016), - [anon_sym___attribute__] = ACTIONS(1016), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1018), - [anon_sym___declspec] = ACTIONS(1016), - [anon_sym___cdecl] = ACTIONS(1016), - [anon_sym___clrcall] = ACTIONS(1016), - [anon_sym___stdcall] = ACTIONS(1016), - [anon_sym___fastcall] = ACTIONS(1016), - [anon_sym___thiscall] = ACTIONS(1016), - [anon_sym___vectorcall] = ACTIONS(1016), - [anon_sym_LBRACE] = ACTIONS(1018), - [anon_sym_static] = ACTIONS(1016), - [anon_sym_auto] = ACTIONS(1016), - [anon_sym_register] = ACTIONS(1016), - [anon_sym_inline] = ACTIONS(1016), - [anon_sym_const] = ACTIONS(1016), - [anon_sym_volatile] = ACTIONS(1016), - [anon_sym_restrict] = ACTIONS(1016), - [anon_sym__Atomic] = ACTIONS(1016), - [anon_sym_signed] = ACTIONS(1016), - [anon_sym_unsigned] = ACTIONS(1016), - [anon_sym_long] = ACTIONS(1016), - [anon_sym_short] = ACTIONS(1016), - [sym_primitive_type] = ACTIONS(1016), - [anon_sym_enum] = ACTIONS(1016), - [anon_sym_struct] = ACTIONS(1016), - [anon_sym_union] = ACTIONS(1016), - [anon_sym_if] = ACTIONS(1016), - [anon_sym_else] = ACTIONS(1016), - [anon_sym_switch] = ACTIONS(1016), - [anon_sym_case] = ACTIONS(1016), - [anon_sym_default] = ACTIONS(1016), - [anon_sym_while] = ACTIONS(1016), - [anon_sym_do] = ACTIONS(1016), - [anon_sym_for] = ACTIONS(1016), - [anon_sym_return] = ACTIONS(1016), - [anon_sym_break] = ACTIONS(1016), - [anon_sym_continue] = ACTIONS(1016), - [anon_sym_goto] = ACTIONS(1016), - [anon_sym_DASH_DASH] = ACTIONS(1018), - [anon_sym_PLUS_PLUS] = ACTIONS(1018), - [anon_sym_sizeof] = ACTIONS(1016), - [sym_number_literal] = ACTIONS(1018), - [anon_sym_L_SQUOTE] = ACTIONS(1018), - [anon_sym_u_SQUOTE] = ACTIONS(1018), - [anon_sym_U_SQUOTE] = ACTIONS(1018), - [anon_sym_u8_SQUOTE] = ACTIONS(1018), - [anon_sym_SQUOTE] = ACTIONS(1018), - [anon_sym_L_DQUOTE] = ACTIONS(1018), - [anon_sym_u_DQUOTE] = ACTIONS(1018), - [anon_sym_U_DQUOTE] = ACTIONS(1018), - [anon_sym_u8_DQUOTE] = ACTIONS(1018), - [anon_sym_DQUOTE] = ACTIONS(1018), - [sym_true] = ACTIONS(1016), - [sym_false] = ACTIONS(1016), - [sym_null] = ACTIONS(1016), - [sym_comment] = ACTIONS(3), - }, - [246] = { - [ts_builtin_sym_end] = ACTIONS(962), - [sym_identifier] = ACTIONS(960), - [aux_sym_preproc_include_token1] = ACTIONS(960), - [aux_sym_preproc_def_token1] = ACTIONS(960), - [aux_sym_preproc_if_token1] = ACTIONS(960), - [aux_sym_preproc_ifdef_token1] = ACTIONS(960), - [aux_sym_preproc_ifdef_token2] = ACTIONS(960), - [sym_preproc_directive] = ACTIONS(960), - [anon_sym_LPAREN2] = ACTIONS(962), - [anon_sym_BANG] = ACTIONS(962), - [anon_sym_TILDE] = ACTIONS(962), - [anon_sym_DASH] = ACTIONS(960), - [anon_sym_PLUS] = ACTIONS(960), - [anon_sym_STAR] = ACTIONS(962), - [anon_sym_AMP] = ACTIONS(962), - [anon_sym_SEMI] = ACTIONS(962), - [anon_sym_typedef] = ACTIONS(960), - [anon_sym_extern] = ACTIONS(960), - [anon_sym___attribute__] = ACTIONS(960), - [anon_sym_LBRACK_LBRACK] = ACTIONS(962), - [anon_sym___declspec] = ACTIONS(960), - [anon_sym___cdecl] = ACTIONS(960), - [anon_sym___clrcall] = ACTIONS(960), - [anon_sym___stdcall] = ACTIONS(960), - [anon_sym___fastcall] = ACTIONS(960), - [anon_sym___thiscall] = ACTIONS(960), - [anon_sym___vectorcall] = ACTIONS(960), - [anon_sym_LBRACE] = ACTIONS(962), - [anon_sym_static] = ACTIONS(960), - [anon_sym_auto] = ACTIONS(960), - [anon_sym_register] = ACTIONS(960), - [anon_sym_inline] = ACTIONS(960), - [anon_sym_const] = ACTIONS(960), - [anon_sym_volatile] = ACTIONS(960), - [anon_sym_restrict] = ACTIONS(960), - [anon_sym__Atomic] = ACTIONS(960), - [anon_sym_signed] = ACTIONS(960), - [anon_sym_unsigned] = ACTIONS(960), - [anon_sym_long] = ACTIONS(960), - [anon_sym_short] = ACTIONS(960), - [sym_primitive_type] = ACTIONS(960), - [anon_sym_enum] = ACTIONS(960), - [anon_sym_struct] = ACTIONS(960), - [anon_sym_union] = ACTIONS(960), - [anon_sym_if] = ACTIONS(960), - [anon_sym_else] = ACTIONS(960), - [anon_sym_switch] = ACTIONS(960), - [anon_sym_case] = ACTIONS(960), - [anon_sym_default] = ACTIONS(960), - [anon_sym_while] = ACTIONS(960), - [anon_sym_do] = ACTIONS(960), - [anon_sym_for] = ACTIONS(960), - [anon_sym_return] = ACTIONS(960), - [anon_sym_break] = ACTIONS(960), - [anon_sym_continue] = ACTIONS(960), - [anon_sym_goto] = ACTIONS(960), - [anon_sym_DASH_DASH] = ACTIONS(962), - [anon_sym_PLUS_PLUS] = ACTIONS(962), - [anon_sym_sizeof] = ACTIONS(960), - [sym_number_literal] = ACTIONS(962), - [anon_sym_L_SQUOTE] = ACTIONS(962), - [anon_sym_u_SQUOTE] = ACTIONS(962), - [anon_sym_U_SQUOTE] = ACTIONS(962), - [anon_sym_u8_SQUOTE] = ACTIONS(962), - [anon_sym_SQUOTE] = ACTIONS(962), - [anon_sym_L_DQUOTE] = ACTIONS(962), - [anon_sym_u_DQUOTE] = ACTIONS(962), - [anon_sym_U_DQUOTE] = ACTIONS(962), - [anon_sym_u8_DQUOTE] = ACTIONS(962), - [anon_sym_DQUOTE] = ACTIONS(962), - [sym_true] = ACTIONS(960), - [sym_false] = ACTIONS(960), - [sym_null] = ACTIONS(960), - [sym_comment] = ACTIONS(3), - }, - [247] = { - [sym_attribute_declaration] = STATE(225), - [sym_compound_statement] = STATE(82), - [sym_attributed_statement] = STATE(82), - [sym_labeled_statement] = STATE(82), - [sym_expression_statement] = STATE(82), - [sym_if_statement] = STATE(82), - [sym_switch_statement] = STATE(82), - [sym_case_statement] = STATE(82), - [sym_while_statement] = STATE(82), - [sym_do_statement] = STATE(82), - [sym_for_statement] = STATE(82), - [sym_return_statement] = STATE(82), - [sym_break_statement] = STATE(82), - [sym_continue_statement] = STATE(82), - [sym_goto_statement] = STATE(82), - [sym__expression] = STATE(697), - [sym_comma_expression] = STATE(1451), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(225), - [sym_identifier] = ACTIONS(1209), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(109), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(115), - [anon_sym_if] = ACTIONS(117), - [anon_sym_switch] = ACTIONS(119), - [anon_sym_case] = ACTIONS(121), - [anon_sym_default] = ACTIONS(123), - [anon_sym_while] = ACTIONS(125), - [anon_sym_do] = ACTIONS(127), - [anon_sym_for] = ACTIONS(129), - [anon_sym_return] = ACTIONS(131), - [anon_sym_break] = ACTIONS(133), - [anon_sym_continue] = ACTIONS(135), - [anon_sym_goto] = ACTIONS(137), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [248] = { - [sym_identifier] = ACTIONS(1024), - [aux_sym_preproc_include_token1] = ACTIONS(1024), - [aux_sym_preproc_def_token1] = ACTIONS(1024), - [aux_sym_preproc_if_token1] = ACTIONS(1024), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1024), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1024), - [sym_preproc_directive] = ACTIONS(1024), - [anon_sym_LPAREN2] = ACTIONS(1026), - [anon_sym_BANG] = ACTIONS(1026), - [anon_sym_TILDE] = ACTIONS(1026), - [anon_sym_DASH] = ACTIONS(1024), - [anon_sym_PLUS] = ACTIONS(1024), - [anon_sym_STAR] = ACTIONS(1026), - [anon_sym_AMP] = ACTIONS(1026), - [anon_sym_SEMI] = ACTIONS(1026), - [anon_sym_typedef] = ACTIONS(1024), - [anon_sym_extern] = ACTIONS(1024), - [anon_sym___attribute__] = ACTIONS(1024), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1026), - [anon_sym___declspec] = ACTIONS(1024), - [anon_sym___cdecl] = ACTIONS(1024), - [anon_sym___clrcall] = ACTIONS(1024), - [anon_sym___stdcall] = ACTIONS(1024), - [anon_sym___fastcall] = ACTIONS(1024), - [anon_sym___thiscall] = ACTIONS(1024), - [anon_sym___vectorcall] = ACTIONS(1024), - [anon_sym_LBRACE] = ACTIONS(1026), - [anon_sym_RBRACE] = ACTIONS(1026), - [anon_sym_static] = ACTIONS(1024), - [anon_sym_auto] = ACTIONS(1024), - [anon_sym_register] = ACTIONS(1024), - [anon_sym_inline] = ACTIONS(1024), - [anon_sym_const] = ACTIONS(1024), - [anon_sym_volatile] = ACTIONS(1024), - [anon_sym_restrict] = ACTIONS(1024), - [anon_sym__Atomic] = ACTIONS(1024), - [anon_sym_signed] = ACTIONS(1024), - [anon_sym_unsigned] = ACTIONS(1024), - [anon_sym_long] = ACTIONS(1024), - [anon_sym_short] = ACTIONS(1024), - [sym_primitive_type] = ACTIONS(1024), - [anon_sym_enum] = ACTIONS(1024), - [anon_sym_struct] = ACTIONS(1024), - [anon_sym_union] = ACTIONS(1024), - [anon_sym_if] = ACTIONS(1024), - [anon_sym_else] = ACTIONS(1024), - [anon_sym_switch] = ACTIONS(1024), - [anon_sym_case] = ACTIONS(1024), - [anon_sym_default] = ACTIONS(1024), - [anon_sym_while] = ACTIONS(1024), - [anon_sym_do] = ACTIONS(1024), - [anon_sym_for] = ACTIONS(1024), - [anon_sym_return] = ACTIONS(1024), - [anon_sym_break] = ACTIONS(1024), - [anon_sym_continue] = ACTIONS(1024), - [anon_sym_goto] = ACTIONS(1024), - [anon_sym_DASH_DASH] = ACTIONS(1026), - [anon_sym_PLUS_PLUS] = ACTIONS(1026), - [anon_sym_sizeof] = ACTIONS(1024), - [sym_number_literal] = ACTIONS(1026), - [anon_sym_L_SQUOTE] = ACTIONS(1026), - [anon_sym_u_SQUOTE] = ACTIONS(1026), - [anon_sym_U_SQUOTE] = ACTIONS(1026), - [anon_sym_u8_SQUOTE] = ACTIONS(1026), - [anon_sym_SQUOTE] = ACTIONS(1026), - [anon_sym_L_DQUOTE] = ACTIONS(1026), - [anon_sym_u_DQUOTE] = ACTIONS(1026), - [anon_sym_U_DQUOTE] = ACTIONS(1026), - [anon_sym_u8_DQUOTE] = ACTIONS(1026), - [anon_sym_DQUOTE] = ACTIONS(1026), - [sym_true] = ACTIONS(1024), - [sym_false] = ACTIONS(1024), - [sym_null] = ACTIONS(1024), - [sym_comment] = ACTIONS(3), - }, - [249] = { - [sym_attribute_declaration] = STATE(153), - [sym_compound_statement] = STATE(199), - [sym_attributed_statement] = STATE(199), - [sym_labeled_statement] = STATE(199), - [sym_expression_statement] = STATE(199), - [sym_if_statement] = STATE(199), - [sym_switch_statement] = STATE(199), - [sym_case_statement] = STATE(199), - [sym_while_statement] = STATE(199), - [sym_do_statement] = STATE(199), - [sym_for_statement] = STATE(199), - [sym_return_statement] = STATE(199), - [sym_break_statement] = STATE(199), - [sym_continue_statement] = STATE(199), - [sym_goto_statement] = STATE(199), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [sym_identifier] = ACTIONS(1207), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [250] = { - [sym_identifier] = ACTIONS(1008), - [aux_sym_preproc_include_token1] = ACTIONS(1008), - [aux_sym_preproc_def_token1] = ACTIONS(1008), - [aux_sym_preproc_if_token1] = ACTIONS(1008), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1008), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1008), - [sym_preproc_directive] = ACTIONS(1008), - [anon_sym_LPAREN2] = ACTIONS(1010), - [anon_sym_BANG] = ACTIONS(1010), - [anon_sym_TILDE] = ACTIONS(1010), - [anon_sym_DASH] = ACTIONS(1008), - [anon_sym_PLUS] = ACTIONS(1008), - [anon_sym_STAR] = ACTIONS(1010), - [anon_sym_AMP] = ACTIONS(1010), - [anon_sym_SEMI] = ACTIONS(1010), - [anon_sym_typedef] = ACTIONS(1008), - [anon_sym_extern] = ACTIONS(1008), - [anon_sym___attribute__] = ACTIONS(1008), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1010), - [anon_sym___declspec] = ACTIONS(1008), - [anon_sym___cdecl] = ACTIONS(1008), - [anon_sym___clrcall] = ACTIONS(1008), - [anon_sym___stdcall] = ACTIONS(1008), - [anon_sym___fastcall] = ACTIONS(1008), - [anon_sym___thiscall] = ACTIONS(1008), - [anon_sym___vectorcall] = ACTIONS(1008), - [anon_sym_LBRACE] = ACTIONS(1010), - [anon_sym_RBRACE] = ACTIONS(1010), - [anon_sym_static] = ACTIONS(1008), - [anon_sym_auto] = ACTIONS(1008), - [anon_sym_register] = ACTIONS(1008), - [anon_sym_inline] = ACTIONS(1008), - [anon_sym_const] = ACTIONS(1008), - [anon_sym_volatile] = ACTIONS(1008), - [anon_sym_restrict] = ACTIONS(1008), - [anon_sym__Atomic] = ACTIONS(1008), - [anon_sym_signed] = ACTIONS(1008), - [anon_sym_unsigned] = ACTIONS(1008), - [anon_sym_long] = ACTIONS(1008), - [anon_sym_short] = ACTIONS(1008), - [sym_primitive_type] = ACTIONS(1008), - [anon_sym_enum] = ACTIONS(1008), - [anon_sym_struct] = ACTIONS(1008), - [anon_sym_union] = ACTIONS(1008), - [anon_sym_if] = ACTIONS(1008), - [anon_sym_else] = ACTIONS(1008), - [anon_sym_switch] = ACTIONS(1008), - [anon_sym_case] = ACTIONS(1008), - [anon_sym_default] = ACTIONS(1008), - [anon_sym_while] = ACTIONS(1008), - [anon_sym_do] = ACTIONS(1008), - [anon_sym_for] = ACTIONS(1008), - [anon_sym_return] = ACTIONS(1008), - [anon_sym_break] = ACTIONS(1008), - [anon_sym_continue] = ACTIONS(1008), - [anon_sym_goto] = ACTIONS(1008), - [anon_sym_DASH_DASH] = ACTIONS(1010), - [anon_sym_PLUS_PLUS] = ACTIONS(1010), - [anon_sym_sizeof] = ACTIONS(1008), - [sym_number_literal] = ACTIONS(1010), - [anon_sym_L_SQUOTE] = ACTIONS(1010), - [anon_sym_u_SQUOTE] = ACTIONS(1010), - [anon_sym_U_SQUOTE] = ACTIONS(1010), - [anon_sym_u8_SQUOTE] = ACTIONS(1010), - [anon_sym_SQUOTE] = ACTIONS(1010), - [anon_sym_L_DQUOTE] = ACTIONS(1010), - [anon_sym_u_DQUOTE] = ACTIONS(1010), - [anon_sym_U_DQUOTE] = ACTIONS(1010), - [anon_sym_u8_DQUOTE] = ACTIONS(1010), - [anon_sym_DQUOTE] = ACTIONS(1010), - [sym_true] = ACTIONS(1008), - [sym_false] = ACTIONS(1008), - [sym_null] = ACTIONS(1008), - [sym_comment] = ACTIONS(3), - }, - [251] = { - [sym_attribute_declaration] = STATE(242), - [sym_compound_statement] = STATE(250), - [sym_attributed_statement] = STATE(250), - [sym_labeled_statement] = STATE(250), - [sym_expression_statement] = STATE(250), - [sym_if_statement] = STATE(250), - [sym_switch_statement] = STATE(250), - [sym_case_statement] = STATE(250), - [sym_while_statement] = STATE(250), - [sym_do_statement] = STATE(250), - [sym_for_statement] = STATE(250), - [sym_return_statement] = STATE(250), - [sym_break_statement] = STATE(250), - [sym_continue_statement] = STATE(250), - [sym_goto_statement] = STATE(250), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [sym_identifier] = ACTIONS(1124), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [252] = { - [sym_identifier] = ACTIONS(1004), - [aux_sym_preproc_include_token1] = ACTIONS(1004), - [aux_sym_preproc_def_token1] = ACTIONS(1004), - [aux_sym_preproc_if_token1] = ACTIONS(1004), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1004), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1004), - [sym_preproc_directive] = ACTIONS(1004), - [anon_sym_LPAREN2] = ACTIONS(1006), - [anon_sym_BANG] = ACTIONS(1006), - [anon_sym_TILDE] = ACTIONS(1006), - [anon_sym_DASH] = ACTIONS(1004), - [anon_sym_PLUS] = ACTIONS(1004), - [anon_sym_STAR] = ACTIONS(1006), - [anon_sym_AMP] = ACTIONS(1006), - [anon_sym_SEMI] = ACTIONS(1006), - [anon_sym_typedef] = ACTIONS(1004), - [anon_sym_extern] = ACTIONS(1004), - [anon_sym___attribute__] = ACTIONS(1004), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1006), - [anon_sym___declspec] = ACTIONS(1004), - [anon_sym___cdecl] = ACTIONS(1004), - [anon_sym___clrcall] = ACTIONS(1004), - [anon_sym___stdcall] = ACTIONS(1004), - [anon_sym___fastcall] = ACTIONS(1004), - [anon_sym___thiscall] = ACTIONS(1004), - [anon_sym___vectorcall] = ACTIONS(1004), - [anon_sym_LBRACE] = ACTIONS(1006), - [anon_sym_RBRACE] = ACTIONS(1006), - [anon_sym_static] = ACTIONS(1004), - [anon_sym_auto] = ACTIONS(1004), - [anon_sym_register] = ACTIONS(1004), - [anon_sym_inline] = ACTIONS(1004), - [anon_sym_const] = ACTIONS(1004), - [anon_sym_volatile] = ACTIONS(1004), - [anon_sym_restrict] = ACTIONS(1004), - [anon_sym__Atomic] = ACTIONS(1004), - [anon_sym_signed] = ACTIONS(1004), - [anon_sym_unsigned] = ACTIONS(1004), - [anon_sym_long] = ACTIONS(1004), - [anon_sym_short] = ACTIONS(1004), - [sym_primitive_type] = ACTIONS(1004), - [anon_sym_enum] = ACTIONS(1004), - [anon_sym_struct] = ACTIONS(1004), - [anon_sym_union] = ACTIONS(1004), - [anon_sym_if] = ACTIONS(1004), - [anon_sym_else] = ACTIONS(1004), - [anon_sym_switch] = ACTIONS(1004), - [anon_sym_case] = ACTIONS(1004), - [anon_sym_default] = ACTIONS(1004), - [anon_sym_while] = ACTIONS(1004), - [anon_sym_do] = ACTIONS(1004), - [anon_sym_for] = ACTIONS(1004), - [anon_sym_return] = ACTIONS(1004), - [anon_sym_break] = ACTIONS(1004), - [anon_sym_continue] = ACTIONS(1004), - [anon_sym_goto] = ACTIONS(1004), - [anon_sym_DASH_DASH] = ACTIONS(1006), - [anon_sym_PLUS_PLUS] = ACTIONS(1006), - [anon_sym_sizeof] = ACTIONS(1004), - [sym_number_literal] = ACTIONS(1006), - [anon_sym_L_SQUOTE] = ACTIONS(1006), - [anon_sym_u_SQUOTE] = ACTIONS(1006), - [anon_sym_U_SQUOTE] = ACTIONS(1006), - [anon_sym_u8_SQUOTE] = ACTIONS(1006), - [anon_sym_SQUOTE] = ACTIONS(1006), - [anon_sym_L_DQUOTE] = ACTIONS(1006), - [anon_sym_u_DQUOTE] = ACTIONS(1006), - [anon_sym_U_DQUOTE] = ACTIONS(1006), - [anon_sym_u8_DQUOTE] = ACTIONS(1006), - [anon_sym_DQUOTE] = ACTIONS(1006), - [sym_true] = ACTIONS(1004), - [sym_false] = ACTIONS(1004), - [sym_null] = ACTIONS(1004), - [sym_comment] = ACTIONS(3), - }, - [253] = { - [sym_identifier] = ACTIONS(996), - [aux_sym_preproc_include_token1] = ACTIONS(996), - [aux_sym_preproc_def_token1] = ACTIONS(996), - [aux_sym_preproc_if_token1] = ACTIONS(996), - [aux_sym_preproc_ifdef_token1] = ACTIONS(996), - [aux_sym_preproc_ifdef_token2] = ACTIONS(996), - [sym_preproc_directive] = ACTIONS(996), - [anon_sym_LPAREN2] = ACTIONS(998), - [anon_sym_BANG] = ACTIONS(998), - [anon_sym_TILDE] = ACTIONS(998), - [anon_sym_DASH] = ACTIONS(996), - [anon_sym_PLUS] = ACTIONS(996), - [anon_sym_STAR] = ACTIONS(998), - [anon_sym_AMP] = ACTIONS(998), - [anon_sym_SEMI] = ACTIONS(998), - [anon_sym_typedef] = ACTIONS(996), - [anon_sym_extern] = ACTIONS(996), - [anon_sym___attribute__] = ACTIONS(996), - [anon_sym_LBRACK_LBRACK] = ACTIONS(998), - [anon_sym___declspec] = ACTIONS(996), - [anon_sym___cdecl] = ACTIONS(996), - [anon_sym___clrcall] = ACTIONS(996), - [anon_sym___stdcall] = ACTIONS(996), - [anon_sym___fastcall] = ACTIONS(996), - [anon_sym___thiscall] = ACTIONS(996), - [anon_sym___vectorcall] = ACTIONS(996), - [anon_sym_LBRACE] = ACTIONS(998), - [anon_sym_RBRACE] = ACTIONS(998), - [anon_sym_static] = ACTIONS(996), - [anon_sym_auto] = ACTIONS(996), - [anon_sym_register] = ACTIONS(996), - [anon_sym_inline] = ACTIONS(996), - [anon_sym_const] = ACTIONS(996), - [anon_sym_volatile] = ACTIONS(996), - [anon_sym_restrict] = ACTIONS(996), - [anon_sym__Atomic] = ACTIONS(996), - [anon_sym_signed] = ACTIONS(996), - [anon_sym_unsigned] = ACTIONS(996), - [anon_sym_long] = ACTIONS(996), - [anon_sym_short] = ACTIONS(996), - [sym_primitive_type] = ACTIONS(996), - [anon_sym_enum] = ACTIONS(996), - [anon_sym_struct] = ACTIONS(996), - [anon_sym_union] = ACTIONS(996), - [anon_sym_if] = ACTIONS(996), - [anon_sym_else] = ACTIONS(996), - [anon_sym_switch] = ACTIONS(996), - [anon_sym_case] = ACTIONS(996), - [anon_sym_default] = ACTIONS(996), - [anon_sym_while] = ACTIONS(996), - [anon_sym_do] = ACTIONS(996), - [anon_sym_for] = ACTIONS(996), - [anon_sym_return] = ACTIONS(996), - [anon_sym_break] = ACTIONS(996), - [anon_sym_continue] = ACTIONS(996), - [anon_sym_goto] = ACTIONS(996), - [anon_sym_DASH_DASH] = ACTIONS(998), - [anon_sym_PLUS_PLUS] = ACTIONS(998), - [anon_sym_sizeof] = ACTIONS(996), - [sym_number_literal] = ACTIONS(998), - [anon_sym_L_SQUOTE] = ACTIONS(998), - [anon_sym_u_SQUOTE] = ACTIONS(998), - [anon_sym_U_SQUOTE] = ACTIONS(998), - [anon_sym_u8_SQUOTE] = ACTIONS(998), - [anon_sym_SQUOTE] = ACTIONS(998), - [anon_sym_L_DQUOTE] = ACTIONS(998), - [anon_sym_u_DQUOTE] = ACTIONS(998), - [anon_sym_U_DQUOTE] = ACTIONS(998), - [anon_sym_u8_DQUOTE] = ACTIONS(998), - [anon_sym_DQUOTE] = ACTIONS(998), - [sym_true] = ACTIONS(996), - [sym_false] = ACTIONS(996), - [sym_null] = ACTIONS(996), - [sym_comment] = ACTIONS(3), - }, - [254] = { - [sym_identifier] = ACTIONS(992), - [aux_sym_preproc_include_token1] = ACTIONS(992), - [aux_sym_preproc_def_token1] = ACTIONS(992), - [aux_sym_preproc_if_token1] = ACTIONS(992), - [aux_sym_preproc_ifdef_token1] = ACTIONS(992), - [aux_sym_preproc_ifdef_token2] = ACTIONS(992), - [sym_preproc_directive] = ACTIONS(992), - [anon_sym_LPAREN2] = ACTIONS(994), - [anon_sym_BANG] = ACTIONS(994), - [anon_sym_TILDE] = ACTIONS(994), - [anon_sym_DASH] = ACTIONS(992), - [anon_sym_PLUS] = ACTIONS(992), - [anon_sym_STAR] = ACTIONS(994), - [anon_sym_AMP] = ACTIONS(994), - [anon_sym_SEMI] = ACTIONS(994), - [anon_sym_typedef] = ACTIONS(992), - [anon_sym_extern] = ACTIONS(992), - [anon_sym___attribute__] = ACTIONS(992), - [anon_sym_LBRACK_LBRACK] = ACTIONS(994), - [anon_sym___declspec] = ACTIONS(992), - [anon_sym___cdecl] = ACTIONS(992), - [anon_sym___clrcall] = ACTIONS(992), - [anon_sym___stdcall] = ACTIONS(992), - [anon_sym___fastcall] = ACTIONS(992), - [anon_sym___thiscall] = ACTIONS(992), - [anon_sym___vectorcall] = ACTIONS(992), - [anon_sym_LBRACE] = ACTIONS(994), - [anon_sym_RBRACE] = ACTIONS(994), - [anon_sym_static] = ACTIONS(992), - [anon_sym_auto] = ACTIONS(992), - [anon_sym_register] = ACTIONS(992), - [anon_sym_inline] = ACTIONS(992), - [anon_sym_const] = ACTIONS(992), - [anon_sym_volatile] = ACTIONS(992), - [anon_sym_restrict] = ACTIONS(992), - [anon_sym__Atomic] = ACTIONS(992), - [anon_sym_signed] = ACTIONS(992), - [anon_sym_unsigned] = ACTIONS(992), - [anon_sym_long] = ACTIONS(992), - [anon_sym_short] = ACTIONS(992), - [sym_primitive_type] = ACTIONS(992), - [anon_sym_enum] = ACTIONS(992), - [anon_sym_struct] = ACTIONS(992), - [anon_sym_union] = ACTIONS(992), - [anon_sym_if] = ACTIONS(992), - [anon_sym_else] = ACTIONS(992), - [anon_sym_switch] = ACTIONS(992), - [anon_sym_case] = ACTIONS(992), - [anon_sym_default] = ACTIONS(992), - [anon_sym_while] = ACTIONS(992), - [anon_sym_do] = ACTIONS(992), - [anon_sym_for] = ACTIONS(992), - [anon_sym_return] = ACTIONS(992), - [anon_sym_break] = ACTIONS(992), - [anon_sym_continue] = ACTIONS(992), - [anon_sym_goto] = ACTIONS(992), - [anon_sym_DASH_DASH] = ACTIONS(994), - [anon_sym_PLUS_PLUS] = ACTIONS(994), - [anon_sym_sizeof] = ACTIONS(992), - [sym_number_literal] = ACTIONS(994), - [anon_sym_L_SQUOTE] = ACTIONS(994), - [anon_sym_u_SQUOTE] = ACTIONS(994), - [anon_sym_U_SQUOTE] = ACTIONS(994), - [anon_sym_u8_SQUOTE] = ACTIONS(994), - [anon_sym_SQUOTE] = ACTIONS(994), - [anon_sym_L_DQUOTE] = ACTIONS(994), - [anon_sym_u_DQUOTE] = ACTIONS(994), - [anon_sym_U_DQUOTE] = ACTIONS(994), - [anon_sym_u8_DQUOTE] = ACTIONS(994), - [anon_sym_DQUOTE] = ACTIONS(994), - [sym_true] = ACTIONS(992), - [sym_false] = ACTIONS(992), - [sym_null] = ACTIONS(992), - [sym_comment] = ACTIONS(3), - }, - [255] = { - [sym_identifier] = ACTIONS(988), - [aux_sym_preproc_include_token1] = ACTIONS(988), - [aux_sym_preproc_def_token1] = ACTIONS(988), - [aux_sym_preproc_if_token1] = ACTIONS(988), - [aux_sym_preproc_ifdef_token1] = ACTIONS(988), - [aux_sym_preproc_ifdef_token2] = ACTIONS(988), - [sym_preproc_directive] = ACTIONS(988), - [anon_sym_LPAREN2] = ACTIONS(990), - [anon_sym_BANG] = ACTIONS(990), - [anon_sym_TILDE] = ACTIONS(990), - [anon_sym_DASH] = ACTIONS(988), - [anon_sym_PLUS] = ACTIONS(988), - [anon_sym_STAR] = ACTIONS(990), - [anon_sym_AMP] = ACTIONS(990), - [anon_sym_SEMI] = ACTIONS(990), - [anon_sym_typedef] = ACTIONS(988), - [anon_sym_extern] = ACTIONS(988), - [anon_sym___attribute__] = ACTIONS(988), - [anon_sym_LBRACK_LBRACK] = ACTIONS(990), - [anon_sym___declspec] = ACTIONS(988), - [anon_sym___cdecl] = ACTIONS(988), - [anon_sym___clrcall] = ACTIONS(988), - [anon_sym___stdcall] = ACTIONS(988), - [anon_sym___fastcall] = ACTIONS(988), - [anon_sym___thiscall] = ACTIONS(988), - [anon_sym___vectorcall] = ACTIONS(988), - [anon_sym_LBRACE] = ACTIONS(990), - [anon_sym_RBRACE] = ACTIONS(990), - [anon_sym_static] = ACTIONS(988), - [anon_sym_auto] = ACTIONS(988), - [anon_sym_register] = ACTIONS(988), - [anon_sym_inline] = ACTIONS(988), - [anon_sym_const] = ACTIONS(988), - [anon_sym_volatile] = ACTIONS(988), - [anon_sym_restrict] = ACTIONS(988), - [anon_sym__Atomic] = ACTIONS(988), - [anon_sym_signed] = ACTIONS(988), - [anon_sym_unsigned] = ACTIONS(988), - [anon_sym_long] = ACTIONS(988), - [anon_sym_short] = ACTIONS(988), - [sym_primitive_type] = ACTIONS(988), - [anon_sym_enum] = ACTIONS(988), - [anon_sym_struct] = ACTIONS(988), - [anon_sym_union] = ACTIONS(988), - [anon_sym_if] = ACTIONS(988), - [anon_sym_else] = ACTIONS(988), - [anon_sym_switch] = ACTIONS(988), - [anon_sym_case] = ACTIONS(988), - [anon_sym_default] = ACTIONS(988), - [anon_sym_while] = ACTIONS(988), - [anon_sym_do] = ACTIONS(988), - [anon_sym_for] = ACTIONS(988), - [anon_sym_return] = ACTIONS(988), - [anon_sym_break] = ACTIONS(988), - [anon_sym_continue] = ACTIONS(988), - [anon_sym_goto] = ACTIONS(988), - [anon_sym_DASH_DASH] = ACTIONS(990), - [anon_sym_PLUS_PLUS] = ACTIONS(990), - [anon_sym_sizeof] = ACTIONS(988), - [sym_number_literal] = ACTIONS(990), - [anon_sym_L_SQUOTE] = ACTIONS(990), - [anon_sym_u_SQUOTE] = ACTIONS(990), - [anon_sym_U_SQUOTE] = ACTIONS(990), - [anon_sym_u8_SQUOTE] = ACTIONS(990), - [anon_sym_SQUOTE] = ACTIONS(990), - [anon_sym_L_DQUOTE] = ACTIONS(990), - [anon_sym_u_DQUOTE] = ACTIONS(990), - [anon_sym_U_DQUOTE] = ACTIONS(990), - [anon_sym_u8_DQUOTE] = ACTIONS(990), - [anon_sym_DQUOTE] = ACTIONS(990), - [sym_true] = ACTIONS(988), - [sym_false] = ACTIONS(988), - [sym_null] = ACTIONS(988), - [sym_comment] = ACTIONS(3), - }, - [256] = { - [sym_attribute_declaration] = STATE(242), - [sym_compound_statement] = STATE(252), - [sym_attributed_statement] = STATE(252), - [sym_labeled_statement] = STATE(252), - [sym_expression_statement] = STATE(252), - [sym_if_statement] = STATE(252), - [sym_switch_statement] = STATE(252), - [sym_case_statement] = STATE(252), - [sym_while_statement] = STATE(252), - [sym_do_statement] = STATE(252), - [sym_for_statement] = STATE(252), - [sym_return_statement] = STATE(252), - [sym_break_statement] = STATE(252), - [sym_continue_statement] = STATE(252), - [sym_goto_statement] = STATE(252), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [sym_identifier] = ACTIONS(1124), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [257] = { - [ts_builtin_sym_end] = ACTIONS(900), - [sym_identifier] = ACTIONS(898), - [aux_sym_preproc_include_token1] = ACTIONS(898), - [aux_sym_preproc_def_token1] = ACTIONS(898), - [aux_sym_preproc_if_token1] = ACTIONS(898), - [aux_sym_preproc_ifdef_token1] = ACTIONS(898), - [aux_sym_preproc_ifdef_token2] = ACTIONS(898), - [sym_preproc_directive] = ACTIONS(898), - [anon_sym_LPAREN2] = ACTIONS(900), - [anon_sym_BANG] = ACTIONS(900), - [anon_sym_TILDE] = ACTIONS(900), - [anon_sym_DASH] = ACTIONS(898), - [anon_sym_PLUS] = ACTIONS(898), - [anon_sym_STAR] = ACTIONS(900), - [anon_sym_AMP] = ACTIONS(900), - [anon_sym_SEMI] = ACTIONS(900), - [anon_sym_typedef] = ACTIONS(898), - [anon_sym_extern] = ACTIONS(898), - [anon_sym___attribute__] = ACTIONS(898), - [anon_sym_LBRACK_LBRACK] = ACTIONS(900), - [anon_sym___declspec] = ACTIONS(898), - [anon_sym___cdecl] = ACTIONS(898), - [anon_sym___clrcall] = ACTIONS(898), - [anon_sym___stdcall] = ACTIONS(898), - [anon_sym___fastcall] = ACTIONS(898), - [anon_sym___thiscall] = ACTIONS(898), - [anon_sym___vectorcall] = ACTIONS(898), - [anon_sym_LBRACE] = ACTIONS(900), - [anon_sym_static] = ACTIONS(898), - [anon_sym_auto] = ACTIONS(898), - [anon_sym_register] = ACTIONS(898), - [anon_sym_inline] = ACTIONS(898), - [anon_sym_const] = ACTIONS(898), - [anon_sym_volatile] = ACTIONS(898), - [anon_sym_restrict] = ACTIONS(898), - [anon_sym__Atomic] = ACTIONS(898), - [anon_sym_signed] = ACTIONS(898), - [anon_sym_unsigned] = ACTIONS(898), - [anon_sym_long] = ACTIONS(898), - [anon_sym_short] = ACTIONS(898), - [sym_primitive_type] = ACTIONS(898), - [anon_sym_enum] = ACTIONS(898), - [anon_sym_struct] = ACTIONS(898), - [anon_sym_union] = ACTIONS(898), - [anon_sym_if] = ACTIONS(898), - [anon_sym_else] = ACTIONS(898), - [anon_sym_switch] = ACTIONS(898), - [anon_sym_case] = ACTIONS(898), - [anon_sym_default] = ACTIONS(898), - [anon_sym_while] = ACTIONS(898), - [anon_sym_do] = ACTIONS(898), - [anon_sym_for] = ACTIONS(898), - [anon_sym_return] = ACTIONS(898), - [anon_sym_break] = ACTIONS(898), - [anon_sym_continue] = ACTIONS(898), - [anon_sym_goto] = ACTIONS(898), - [anon_sym_DASH_DASH] = ACTIONS(900), - [anon_sym_PLUS_PLUS] = ACTIONS(900), - [anon_sym_sizeof] = ACTIONS(898), - [sym_number_literal] = ACTIONS(900), - [anon_sym_L_SQUOTE] = ACTIONS(900), - [anon_sym_u_SQUOTE] = ACTIONS(900), - [anon_sym_U_SQUOTE] = ACTIONS(900), - [anon_sym_u8_SQUOTE] = ACTIONS(900), - [anon_sym_SQUOTE] = ACTIONS(900), - [anon_sym_L_DQUOTE] = ACTIONS(900), - [anon_sym_u_DQUOTE] = ACTIONS(900), - [anon_sym_U_DQUOTE] = ACTIONS(900), - [anon_sym_u8_DQUOTE] = ACTIONS(900), - [anon_sym_DQUOTE] = ACTIONS(900), - [sym_true] = ACTIONS(898), - [sym_false] = ACTIONS(898), - [sym_null] = ACTIONS(898), - [sym_comment] = ACTIONS(3), - }, - [258] = { - [sym_attribute_declaration] = STATE(242), - [sym_compound_statement] = STATE(297), - [sym_attributed_statement] = STATE(297), - [sym_labeled_statement] = STATE(297), - [sym_expression_statement] = STATE(297), - [sym_if_statement] = STATE(297), - [sym_switch_statement] = STATE(297), - [sym_case_statement] = STATE(297), - [sym_while_statement] = STATE(297), - [sym_do_statement] = STATE(297), - [sym_for_statement] = STATE(297), - [sym_return_statement] = STATE(297), - [sym_break_statement] = STATE(297), - [sym_continue_statement] = STATE(297), - [sym_goto_statement] = STATE(297), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [sym_identifier] = ACTIONS(1124), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [259] = { - [sym_attribute_declaration] = STATE(242), - [sym_compound_statement] = STATE(253), - [sym_attributed_statement] = STATE(253), - [sym_labeled_statement] = STATE(253), - [sym_expression_statement] = STATE(253), - [sym_if_statement] = STATE(253), - [sym_switch_statement] = STATE(253), - [sym_case_statement] = STATE(253), - [sym_while_statement] = STATE(253), - [sym_do_statement] = STATE(253), - [sym_for_statement] = STATE(253), - [sym_return_statement] = STATE(253), - [sym_break_statement] = STATE(253), - [sym_continue_statement] = STATE(253), - [sym_goto_statement] = STATE(253), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [sym_identifier] = ACTIONS(1124), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [260] = { - [sym_attribute_declaration] = STATE(242), - [sym_compound_statement] = STATE(304), - [sym_attributed_statement] = STATE(304), - [sym_labeled_statement] = STATE(304), - [sym_expression_statement] = STATE(304), - [sym_if_statement] = STATE(304), - [sym_switch_statement] = STATE(304), - [sym_case_statement] = STATE(304), - [sym_while_statement] = STATE(304), - [sym_do_statement] = STATE(304), - [sym_for_statement] = STATE(304), - [sym_return_statement] = STATE(304), - [sym_break_statement] = STATE(304), - [sym_continue_statement] = STATE(304), - [sym_goto_statement] = STATE(304), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [sym_identifier] = ACTIONS(1124), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [261] = { - [sym_identifier] = ACTIONS(980), - [aux_sym_preproc_include_token1] = ACTIONS(980), - [aux_sym_preproc_def_token1] = ACTIONS(980), - [aux_sym_preproc_if_token1] = ACTIONS(980), - [aux_sym_preproc_ifdef_token1] = ACTIONS(980), - [aux_sym_preproc_ifdef_token2] = ACTIONS(980), - [sym_preproc_directive] = ACTIONS(980), - [anon_sym_LPAREN2] = ACTIONS(982), - [anon_sym_BANG] = ACTIONS(982), - [anon_sym_TILDE] = ACTIONS(982), - [anon_sym_DASH] = ACTIONS(980), - [anon_sym_PLUS] = ACTIONS(980), - [anon_sym_STAR] = ACTIONS(982), - [anon_sym_AMP] = ACTIONS(982), - [anon_sym_SEMI] = ACTIONS(982), - [anon_sym_typedef] = ACTIONS(980), - [anon_sym_extern] = ACTIONS(980), - [anon_sym___attribute__] = ACTIONS(980), - [anon_sym_LBRACK_LBRACK] = ACTIONS(982), - [anon_sym___declspec] = ACTIONS(980), - [anon_sym___cdecl] = ACTIONS(980), - [anon_sym___clrcall] = ACTIONS(980), - [anon_sym___stdcall] = ACTIONS(980), - [anon_sym___fastcall] = ACTIONS(980), - [anon_sym___thiscall] = ACTIONS(980), - [anon_sym___vectorcall] = ACTIONS(980), - [anon_sym_LBRACE] = ACTIONS(982), - [anon_sym_RBRACE] = ACTIONS(982), - [anon_sym_static] = ACTIONS(980), - [anon_sym_auto] = ACTIONS(980), - [anon_sym_register] = ACTIONS(980), - [anon_sym_inline] = ACTIONS(980), - [anon_sym_const] = ACTIONS(980), - [anon_sym_volatile] = ACTIONS(980), - [anon_sym_restrict] = ACTIONS(980), - [anon_sym__Atomic] = ACTIONS(980), - [anon_sym_signed] = ACTIONS(980), - [anon_sym_unsigned] = ACTIONS(980), - [anon_sym_long] = ACTIONS(980), - [anon_sym_short] = ACTIONS(980), - [sym_primitive_type] = ACTIONS(980), - [anon_sym_enum] = ACTIONS(980), - [anon_sym_struct] = ACTIONS(980), - [anon_sym_union] = ACTIONS(980), - [anon_sym_if] = ACTIONS(980), - [anon_sym_else] = ACTIONS(980), - [anon_sym_switch] = ACTIONS(980), - [anon_sym_case] = ACTIONS(980), - [anon_sym_default] = ACTIONS(980), - [anon_sym_while] = ACTIONS(980), - [anon_sym_do] = ACTIONS(980), - [anon_sym_for] = ACTIONS(980), - [anon_sym_return] = ACTIONS(980), - [anon_sym_break] = ACTIONS(980), - [anon_sym_continue] = ACTIONS(980), - [anon_sym_goto] = ACTIONS(980), - [anon_sym_DASH_DASH] = ACTIONS(982), - [anon_sym_PLUS_PLUS] = ACTIONS(982), - [anon_sym_sizeof] = ACTIONS(980), - [sym_number_literal] = ACTIONS(982), - [anon_sym_L_SQUOTE] = ACTIONS(982), - [anon_sym_u_SQUOTE] = ACTIONS(982), - [anon_sym_U_SQUOTE] = ACTIONS(982), - [anon_sym_u8_SQUOTE] = ACTIONS(982), - [anon_sym_SQUOTE] = ACTIONS(982), - [anon_sym_L_DQUOTE] = ACTIONS(982), - [anon_sym_u_DQUOTE] = ACTIONS(982), - [anon_sym_U_DQUOTE] = ACTIONS(982), - [anon_sym_u8_DQUOTE] = ACTIONS(982), - [anon_sym_DQUOTE] = ACTIONS(982), - [sym_true] = ACTIONS(980), - [sym_false] = ACTIONS(980), - [sym_null] = ACTIONS(980), - [sym_comment] = ACTIONS(3), - }, - [262] = { - [sym_attribute_declaration] = STATE(242), - [sym_compound_statement] = STATE(254), - [sym_attributed_statement] = STATE(254), - [sym_labeled_statement] = STATE(254), - [sym_expression_statement] = STATE(254), - [sym_if_statement] = STATE(254), - [sym_switch_statement] = STATE(254), - [sym_case_statement] = STATE(254), - [sym_while_statement] = STATE(254), - [sym_do_statement] = STATE(254), - [sym_for_statement] = STATE(254), - [sym_return_statement] = STATE(254), - [sym_break_statement] = STATE(254), - [sym_continue_statement] = STATE(254), - [sym_goto_statement] = STATE(254), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [sym_identifier] = ACTIONS(1124), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [263] = { - [sym_identifier] = ACTIONS(976), - [aux_sym_preproc_include_token1] = ACTIONS(976), - [aux_sym_preproc_def_token1] = ACTIONS(976), - [aux_sym_preproc_if_token1] = ACTIONS(976), - [aux_sym_preproc_ifdef_token1] = ACTIONS(976), - [aux_sym_preproc_ifdef_token2] = ACTIONS(976), - [sym_preproc_directive] = ACTIONS(976), - [anon_sym_LPAREN2] = ACTIONS(978), - [anon_sym_BANG] = ACTIONS(978), - [anon_sym_TILDE] = ACTIONS(978), - [anon_sym_DASH] = ACTIONS(976), - [anon_sym_PLUS] = ACTIONS(976), - [anon_sym_STAR] = ACTIONS(978), - [anon_sym_AMP] = ACTIONS(978), - [anon_sym_SEMI] = ACTIONS(978), - [anon_sym_typedef] = ACTIONS(976), - [anon_sym_extern] = ACTIONS(976), - [anon_sym___attribute__] = ACTIONS(976), - [anon_sym_LBRACK_LBRACK] = ACTIONS(978), - [anon_sym___declspec] = ACTIONS(976), - [anon_sym___cdecl] = ACTIONS(976), - [anon_sym___clrcall] = ACTIONS(976), - [anon_sym___stdcall] = ACTIONS(976), - [anon_sym___fastcall] = ACTIONS(976), - [anon_sym___thiscall] = ACTIONS(976), - [anon_sym___vectorcall] = ACTIONS(976), - [anon_sym_LBRACE] = ACTIONS(978), - [anon_sym_RBRACE] = ACTIONS(978), - [anon_sym_static] = ACTIONS(976), - [anon_sym_auto] = ACTIONS(976), - [anon_sym_register] = ACTIONS(976), - [anon_sym_inline] = ACTIONS(976), - [anon_sym_const] = ACTIONS(976), - [anon_sym_volatile] = ACTIONS(976), - [anon_sym_restrict] = ACTIONS(976), - [anon_sym__Atomic] = ACTIONS(976), - [anon_sym_signed] = ACTIONS(976), - [anon_sym_unsigned] = ACTIONS(976), - [anon_sym_long] = ACTIONS(976), - [anon_sym_short] = ACTIONS(976), - [sym_primitive_type] = ACTIONS(976), - [anon_sym_enum] = ACTIONS(976), - [anon_sym_struct] = ACTIONS(976), - [anon_sym_union] = ACTIONS(976), - [anon_sym_if] = ACTIONS(976), - [anon_sym_else] = ACTIONS(976), - [anon_sym_switch] = ACTIONS(976), - [anon_sym_case] = ACTIONS(976), - [anon_sym_default] = ACTIONS(976), - [anon_sym_while] = ACTIONS(976), - [anon_sym_do] = ACTIONS(976), - [anon_sym_for] = ACTIONS(976), - [anon_sym_return] = ACTIONS(976), - [anon_sym_break] = ACTIONS(976), - [anon_sym_continue] = ACTIONS(976), - [anon_sym_goto] = ACTIONS(976), - [anon_sym_DASH_DASH] = ACTIONS(978), - [anon_sym_PLUS_PLUS] = ACTIONS(978), - [anon_sym_sizeof] = ACTIONS(976), - [sym_number_literal] = ACTIONS(978), - [anon_sym_L_SQUOTE] = ACTIONS(978), - [anon_sym_u_SQUOTE] = ACTIONS(978), - [anon_sym_U_SQUOTE] = ACTIONS(978), - [anon_sym_u8_SQUOTE] = ACTIONS(978), - [anon_sym_SQUOTE] = ACTIONS(978), - [anon_sym_L_DQUOTE] = ACTIONS(978), - [anon_sym_u_DQUOTE] = ACTIONS(978), - [anon_sym_U_DQUOTE] = ACTIONS(978), - [anon_sym_u8_DQUOTE] = ACTIONS(978), - [anon_sym_DQUOTE] = ACTIONS(978), - [sym_true] = ACTIONS(976), - [sym_false] = ACTIONS(976), - [sym_null] = ACTIONS(976), - [sym_comment] = ACTIONS(3), - }, - [264] = { - [ts_builtin_sym_end] = ACTIONS(900), - [sym_identifier] = ACTIONS(898), - [aux_sym_preproc_include_token1] = ACTIONS(898), - [aux_sym_preproc_def_token1] = ACTIONS(898), - [aux_sym_preproc_if_token1] = ACTIONS(898), - [aux_sym_preproc_ifdef_token1] = ACTIONS(898), - [aux_sym_preproc_ifdef_token2] = ACTIONS(898), - [sym_preproc_directive] = ACTIONS(898), - [anon_sym_LPAREN2] = ACTIONS(900), - [anon_sym_BANG] = ACTIONS(900), - [anon_sym_TILDE] = ACTIONS(900), - [anon_sym_DASH] = ACTIONS(898), - [anon_sym_PLUS] = ACTIONS(898), - [anon_sym_STAR] = ACTIONS(900), - [anon_sym_AMP] = ACTIONS(900), - [anon_sym_SEMI] = ACTIONS(900), - [anon_sym_typedef] = ACTIONS(898), - [anon_sym_extern] = ACTIONS(898), - [anon_sym___attribute__] = ACTIONS(898), - [anon_sym_LBRACK_LBRACK] = ACTIONS(900), - [anon_sym___declspec] = ACTIONS(898), - [anon_sym___cdecl] = ACTIONS(898), - [anon_sym___clrcall] = ACTIONS(898), - [anon_sym___stdcall] = ACTIONS(898), - [anon_sym___fastcall] = ACTIONS(898), - [anon_sym___thiscall] = ACTIONS(898), - [anon_sym___vectorcall] = ACTIONS(898), - [anon_sym_LBRACE] = ACTIONS(900), - [anon_sym_static] = ACTIONS(898), - [anon_sym_auto] = ACTIONS(898), - [anon_sym_register] = ACTIONS(898), - [anon_sym_inline] = ACTIONS(898), - [anon_sym_const] = ACTIONS(898), - [anon_sym_volatile] = ACTIONS(898), - [anon_sym_restrict] = ACTIONS(898), - [anon_sym__Atomic] = ACTIONS(898), - [anon_sym_signed] = ACTIONS(898), - [anon_sym_unsigned] = ACTIONS(898), - [anon_sym_long] = ACTIONS(898), - [anon_sym_short] = ACTIONS(898), - [sym_primitive_type] = ACTIONS(898), - [anon_sym_enum] = ACTIONS(898), - [anon_sym_struct] = ACTIONS(898), - [anon_sym_union] = ACTIONS(898), - [anon_sym_if] = ACTIONS(898), - [anon_sym_else] = ACTIONS(898), - [anon_sym_switch] = ACTIONS(898), - [anon_sym_case] = ACTIONS(898), - [anon_sym_default] = ACTIONS(898), - [anon_sym_while] = ACTIONS(898), - [anon_sym_do] = ACTIONS(898), - [anon_sym_for] = ACTIONS(898), - [anon_sym_return] = ACTIONS(898), - [anon_sym_break] = ACTIONS(898), - [anon_sym_continue] = ACTIONS(898), - [anon_sym_goto] = ACTIONS(898), - [anon_sym_DASH_DASH] = ACTIONS(900), - [anon_sym_PLUS_PLUS] = ACTIONS(900), - [anon_sym_sizeof] = ACTIONS(898), - [sym_number_literal] = ACTIONS(900), - [anon_sym_L_SQUOTE] = ACTIONS(900), - [anon_sym_u_SQUOTE] = ACTIONS(900), - [anon_sym_U_SQUOTE] = ACTIONS(900), - [anon_sym_u8_SQUOTE] = ACTIONS(900), - [anon_sym_SQUOTE] = ACTIONS(900), - [anon_sym_L_DQUOTE] = ACTIONS(900), - [anon_sym_u_DQUOTE] = ACTIONS(900), - [anon_sym_U_DQUOTE] = ACTIONS(900), - [anon_sym_u8_DQUOTE] = ACTIONS(900), - [anon_sym_DQUOTE] = ACTIONS(900), - [sym_true] = ACTIONS(898), - [sym_false] = ACTIONS(898), - [sym_null] = ACTIONS(898), - [sym_comment] = ACTIONS(3), - }, - [265] = { - [sym_identifier] = ACTIONS(972), - [aux_sym_preproc_include_token1] = ACTIONS(972), - [aux_sym_preproc_def_token1] = ACTIONS(972), - [aux_sym_preproc_if_token1] = ACTIONS(972), - [aux_sym_preproc_ifdef_token1] = ACTIONS(972), - [aux_sym_preproc_ifdef_token2] = ACTIONS(972), - [sym_preproc_directive] = ACTIONS(972), - [anon_sym_LPAREN2] = ACTIONS(974), - [anon_sym_BANG] = ACTIONS(974), - [anon_sym_TILDE] = ACTIONS(974), - [anon_sym_DASH] = ACTIONS(972), - [anon_sym_PLUS] = ACTIONS(972), - [anon_sym_STAR] = ACTIONS(974), - [anon_sym_AMP] = ACTIONS(974), - [anon_sym_SEMI] = ACTIONS(974), - [anon_sym_typedef] = ACTIONS(972), - [anon_sym_extern] = ACTIONS(972), - [anon_sym___attribute__] = ACTIONS(972), - [anon_sym_LBRACK_LBRACK] = ACTIONS(974), - [anon_sym___declspec] = ACTIONS(972), - [anon_sym___cdecl] = ACTIONS(972), - [anon_sym___clrcall] = ACTIONS(972), - [anon_sym___stdcall] = ACTIONS(972), - [anon_sym___fastcall] = ACTIONS(972), - [anon_sym___thiscall] = ACTIONS(972), - [anon_sym___vectorcall] = ACTIONS(972), - [anon_sym_LBRACE] = ACTIONS(974), - [anon_sym_RBRACE] = ACTIONS(974), - [anon_sym_static] = ACTIONS(972), - [anon_sym_auto] = ACTIONS(972), - [anon_sym_register] = ACTIONS(972), - [anon_sym_inline] = ACTIONS(972), - [anon_sym_const] = ACTIONS(972), - [anon_sym_volatile] = ACTIONS(972), - [anon_sym_restrict] = ACTIONS(972), - [anon_sym__Atomic] = ACTIONS(972), - [anon_sym_signed] = ACTIONS(972), - [anon_sym_unsigned] = ACTIONS(972), - [anon_sym_long] = ACTIONS(972), - [anon_sym_short] = ACTIONS(972), - [sym_primitive_type] = ACTIONS(972), - [anon_sym_enum] = ACTIONS(972), - [anon_sym_struct] = ACTIONS(972), - [anon_sym_union] = ACTIONS(972), - [anon_sym_if] = ACTIONS(972), - [anon_sym_else] = ACTIONS(972), - [anon_sym_switch] = ACTIONS(972), - [anon_sym_case] = ACTIONS(972), - [anon_sym_default] = ACTIONS(972), - [anon_sym_while] = ACTIONS(972), - [anon_sym_do] = ACTIONS(972), - [anon_sym_for] = ACTIONS(972), - [anon_sym_return] = ACTIONS(972), - [anon_sym_break] = ACTIONS(972), - [anon_sym_continue] = ACTIONS(972), - [anon_sym_goto] = ACTIONS(972), - [anon_sym_DASH_DASH] = ACTIONS(974), - [anon_sym_PLUS_PLUS] = ACTIONS(974), - [anon_sym_sizeof] = ACTIONS(972), - [sym_number_literal] = ACTIONS(974), - [anon_sym_L_SQUOTE] = ACTIONS(974), - [anon_sym_u_SQUOTE] = ACTIONS(974), - [anon_sym_U_SQUOTE] = ACTIONS(974), - [anon_sym_u8_SQUOTE] = ACTIONS(974), - [anon_sym_SQUOTE] = ACTIONS(974), - [anon_sym_L_DQUOTE] = ACTIONS(974), - [anon_sym_u_DQUOTE] = ACTIONS(974), - [anon_sym_U_DQUOTE] = ACTIONS(974), - [anon_sym_u8_DQUOTE] = ACTIONS(974), - [anon_sym_DQUOTE] = ACTIONS(974), - [sym_true] = ACTIONS(972), - [sym_false] = ACTIONS(972), - [sym_null] = ACTIONS(972), - [sym_comment] = ACTIONS(3), - }, - [266] = { - [sym_attribute_declaration] = STATE(242), - [sym_compound_statement] = STATE(255), - [sym_attributed_statement] = STATE(255), - [sym_labeled_statement] = STATE(255), - [sym_expression_statement] = STATE(255), - [sym_if_statement] = STATE(255), - [sym_switch_statement] = STATE(255), - [sym_case_statement] = STATE(255), - [sym_while_statement] = STATE(255), - [sym_do_statement] = STATE(255), - [sym_for_statement] = STATE(255), - [sym_return_statement] = STATE(255), - [sym_break_statement] = STATE(255), - [sym_continue_statement] = STATE(255), - [sym_goto_statement] = STATE(255), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [sym_identifier] = ACTIONS(1124), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [267] = { - [sym_identifier] = ACTIONS(968), - [aux_sym_preproc_include_token1] = ACTIONS(968), - [aux_sym_preproc_def_token1] = ACTIONS(968), - [aux_sym_preproc_if_token1] = ACTIONS(968), - [aux_sym_preproc_ifdef_token1] = ACTIONS(968), - [aux_sym_preproc_ifdef_token2] = ACTIONS(968), - [sym_preproc_directive] = ACTIONS(968), - [anon_sym_LPAREN2] = ACTIONS(970), - [anon_sym_BANG] = ACTIONS(970), - [anon_sym_TILDE] = ACTIONS(970), - [anon_sym_DASH] = ACTIONS(968), - [anon_sym_PLUS] = ACTIONS(968), - [anon_sym_STAR] = ACTIONS(970), - [anon_sym_AMP] = ACTIONS(970), - [anon_sym_SEMI] = ACTIONS(970), - [anon_sym_typedef] = ACTIONS(968), - [anon_sym_extern] = ACTIONS(968), - [anon_sym___attribute__] = ACTIONS(968), - [anon_sym_LBRACK_LBRACK] = ACTIONS(970), - [anon_sym___declspec] = ACTIONS(968), - [anon_sym___cdecl] = ACTIONS(968), - [anon_sym___clrcall] = ACTIONS(968), - [anon_sym___stdcall] = ACTIONS(968), - [anon_sym___fastcall] = ACTIONS(968), - [anon_sym___thiscall] = ACTIONS(968), - [anon_sym___vectorcall] = ACTIONS(968), - [anon_sym_LBRACE] = ACTIONS(970), - [anon_sym_RBRACE] = ACTIONS(970), - [anon_sym_static] = ACTIONS(968), - [anon_sym_auto] = ACTIONS(968), - [anon_sym_register] = ACTIONS(968), - [anon_sym_inline] = ACTIONS(968), - [anon_sym_const] = ACTIONS(968), - [anon_sym_volatile] = ACTIONS(968), - [anon_sym_restrict] = ACTIONS(968), - [anon_sym__Atomic] = ACTIONS(968), - [anon_sym_signed] = ACTIONS(968), - [anon_sym_unsigned] = ACTIONS(968), - [anon_sym_long] = ACTIONS(968), - [anon_sym_short] = ACTIONS(968), - [sym_primitive_type] = ACTIONS(968), - [anon_sym_enum] = ACTIONS(968), - [anon_sym_struct] = ACTIONS(968), - [anon_sym_union] = ACTIONS(968), - [anon_sym_if] = ACTIONS(968), - [anon_sym_else] = ACTIONS(968), - [anon_sym_switch] = ACTIONS(968), - [anon_sym_case] = ACTIONS(968), - [anon_sym_default] = ACTIONS(968), - [anon_sym_while] = ACTIONS(968), - [anon_sym_do] = ACTIONS(968), - [anon_sym_for] = ACTIONS(968), - [anon_sym_return] = ACTIONS(968), - [anon_sym_break] = ACTIONS(968), - [anon_sym_continue] = ACTIONS(968), - [anon_sym_goto] = ACTIONS(968), - [anon_sym_DASH_DASH] = ACTIONS(970), - [anon_sym_PLUS_PLUS] = ACTIONS(970), - [anon_sym_sizeof] = ACTIONS(968), - [sym_number_literal] = ACTIONS(970), - [anon_sym_L_SQUOTE] = ACTIONS(970), - [anon_sym_u_SQUOTE] = ACTIONS(970), - [anon_sym_U_SQUOTE] = ACTIONS(970), - [anon_sym_u8_SQUOTE] = ACTIONS(970), - [anon_sym_SQUOTE] = ACTIONS(970), - [anon_sym_L_DQUOTE] = ACTIONS(970), - [anon_sym_u_DQUOTE] = ACTIONS(970), - [anon_sym_U_DQUOTE] = ACTIONS(970), - [anon_sym_u8_DQUOTE] = ACTIONS(970), - [anon_sym_DQUOTE] = ACTIONS(970), - [sym_true] = ACTIONS(968), - [sym_false] = ACTIONS(968), - [sym_null] = ACTIONS(968), - [sym_comment] = ACTIONS(3), - }, - [268] = { - [sym_identifier] = ACTIONS(956), - [aux_sym_preproc_include_token1] = ACTIONS(956), - [aux_sym_preproc_def_token1] = ACTIONS(956), - [aux_sym_preproc_if_token1] = ACTIONS(956), - [aux_sym_preproc_ifdef_token1] = ACTIONS(956), - [aux_sym_preproc_ifdef_token2] = ACTIONS(956), - [sym_preproc_directive] = ACTIONS(956), - [anon_sym_LPAREN2] = ACTIONS(958), - [anon_sym_BANG] = ACTIONS(958), - [anon_sym_TILDE] = ACTIONS(958), - [anon_sym_DASH] = ACTIONS(956), - [anon_sym_PLUS] = ACTIONS(956), - [anon_sym_STAR] = ACTIONS(958), - [anon_sym_AMP] = ACTIONS(958), - [anon_sym_SEMI] = ACTIONS(958), - [anon_sym_typedef] = ACTIONS(956), - [anon_sym_extern] = ACTIONS(956), - [anon_sym___attribute__] = ACTIONS(956), - [anon_sym_LBRACK_LBRACK] = ACTIONS(958), - [anon_sym___declspec] = ACTIONS(956), - [anon_sym___cdecl] = ACTIONS(956), - [anon_sym___clrcall] = ACTIONS(956), - [anon_sym___stdcall] = ACTIONS(956), - [anon_sym___fastcall] = ACTIONS(956), - [anon_sym___thiscall] = ACTIONS(956), - [anon_sym___vectorcall] = ACTIONS(956), - [anon_sym_LBRACE] = ACTIONS(958), - [anon_sym_RBRACE] = ACTIONS(958), - [anon_sym_static] = ACTIONS(956), - [anon_sym_auto] = ACTIONS(956), - [anon_sym_register] = ACTIONS(956), - [anon_sym_inline] = ACTIONS(956), - [anon_sym_const] = ACTIONS(956), - [anon_sym_volatile] = ACTIONS(956), - [anon_sym_restrict] = ACTIONS(956), - [anon_sym__Atomic] = ACTIONS(956), - [anon_sym_signed] = ACTIONS(956), - [anon_sym_unsigned] = ACTIONS(956), - [anon_sym_long] = ACTIONS(956), - [anon_sym_short] = ACTIONS(956), - [sym_primitive_type] = ACTIONS(956), - [anon_sym_enum] = ACTIONS(956), - [anon_sym_struct] = ACTIONS(956), - [anon_sym_union] = ACTIONS(956), - [anon_sym_if] = ACTIONS(956), - [anon_sym_else] = ACTIONS(956), - [anon_sym_switch] = ACTIONS(956), - [anon_sym_case] = ACTIONS(956), - [anon_sym_default] = ACTIONS(956), - [anon_sym_while] = ACTIONS(956), - [anon_sym_do] = ACTIONS(956), - [anon_sym_for] = ACTIONS(956), - [anon_sym_return] = ACTIONS(956), - [anon_sym_break] = ACTIONS(956), - [anon_sym_continue] = ACTIONS(956), - [anon_sym_goto] = ACTIONS(956), - [anon_sym_DASH_DASH] = ACTIONS(958), - [anon_sym_PLUS_PLUS] = ACTIONS(958), - [anon_sym_sizeof] = ACTIONS(956), - [sym_number_literal] = ACTIONS(958), - [anon_sym_L_SQUOTE] = ACTIONS(958), - [anon_sym_u_SQUOTE] = ACTIONS(958), - [anon_sym_U_SQUOTE] = ACTIONS(958), - [anon_sym_u8_SQUOTE] = ACTIONS(958), - [anon_sym_SQUOTE] = ACTIONS(958), - [anon_sym_L_DQUOTE] = ACTIONS(958), - [anon_sym_u_DQUOTE] = ACTIONS(958), - [anon_sym_U_DQUOTE] = ACTIONS(958), - [anon_sym_u8_DQUOTE] = ACTIONS(958), - [anon_sym_DQUOTE] = ACTIONS(958), - [sym_true] = ACTIONS(956), - [sym_false] = ACTIONS(956), - [sym_null] = ACTIONS(956), - [sym_comment] = ACTIONS(3), - }, - [269] = { - [sym_attribute_declaration] = STATE(242), - [sym_compound_statement] = STATE(261), - [sym_attributed_statement] = STATE(261), - [sym_labeled_statement] = STATE(261), - [sym_expression_statement] = STATE(261), - [sym_if_statement] = STATE(261), - [sym_switch_statement] = STATE(261), - [sym_case_statement] = STATE(261), - [sym_while_statement] = STATE(261), - [sym_do_statement] = STATE(261), - [sym_for_statement] = STATE(261), - [sym_return_statement] = STATE(261), - [sym_break_statement] = STATE(261), - [sym_continue_statement] = STATE(261), - [sym_goto_statement] = STATE(261), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [sym_identifier] = ACTIONS(1124), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [270] = { - [sym_attribute_declaration] = STATE(242), - [sym_compound_statement] = STATE(263), - [sym_attributed_statement] = STATE(263), - [sym_labeled_statement] = STATE(263), - [sym_expression_statement] = STATE(263), - [sym_if_statement] = STATE(263), - [sym_switch_statement] = STATE(263), - [sym_case_statement] = STATE(263), - [sym_while_statement] = STATE(263), - [sym_do_statement] = STATE(263), - [sym_for_statement] = STATE(263), - [sym_return_statement] = STATE(263), - [sym_break_statement] = STATE(263), - [sym_continue_statement] = STATE(263), - [sym_goto_statement] = STATE(263), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [sym_identifier] = ACTIONS(1124), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [271] = { - [sym_attribute_declaration] = STATE(242), - [sym_compound_statement] = STATE(265), - [sym_attributed_statement] = STATE(265), - [sym_labeled_statement] = STATE(265), - [sym_expression_statement] = STATE(265), - [sym_if_statement] = STATE(265), - [sym_switch_statement] = STATE(265), - [sym_case_statement] = STATE(265), - [sym_while_statement] = STATE(265), - [sym_do_statement] = STATE(265), - [sym_for_statement] = STATE(265), - [sym_return_statement] = STATE(265), - [sym_break_statement] = STATE(265), - [sym_continue_statement] = STATE(265), - [sym_goto_statement] = STATE(265), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [sym_identifier] = ACTIONS(1124), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [272] = { - [sym_identifier] = ACTIONS(894), - [aux_sym_preproc_include_token1] = ACTIONS(894), - [aux_sym_preproc_def_token1] = ACTIONS(894), - [aux_sym_preproc_if_token1] = ACTIONS(894), - [aux_sym_preproc_ifdef_token1] = ACTIONS(894), - [aux_sym_preproc_ifdef_token2] = ACTIONS(894), - [sym_preproc_directive] = ACTIONS(894), - [anon_sym_LPAREN2] = ACTIONS(896), - [anon_sym_BANG] = ACTIONS(896), - [anon_sym_TILDE] = ACTIONS(896), - [anon_sym_DASH] = ACTIONS(894), - [anon_sym_PLUS] = ACTIONS(894), - [anon_sym_STAR] = ACTIONS(896), - [anon_sym_AMP] = ACTIONS(896), - [anon_sym_SEMI] = ACTIONS(896), - [anon_sym_typedef] = ACTIONS(894), - [anon_sym_extern] = ACTIONS(894), - [anon_sym___attribute__] = ACTIONS(894), - [anon_sym_LBRACK_LBRACK] = ACTIONS(896), - [anon_sym___declspec] = ACTIONS(894), - [anon_sym___cdecl] = ACTIONS(894), - [anon_sym___clrcall] = ACTIONS(894), - [anon_sym___stdcall] = ACTIONS(894), - [anon_sym___fastcall] = ACTIONS(894), - [anon_sym___thiscall] = ACTIONS(894), - [anon_sym___vectorcall] = ACTIONS(894), - [anon_sym_LBRACE] = ACTIONS(896), - [anon_sym_RBRACE] = ACTIONS(896), - [anon_sym_static] = ACTIONS(894), - [anon_sym_auto] = ACTIONS(894), - [anon_sym_register] = ACTIONS(894), - [anon_sym_inline] = ACTIONS(894), - [anon_sym_const] = ACTIONS(894), - [anon_sym_volatile] = ACTIONS(894), - [anon_sym_restrict] = ACTIONS(894), - [anon_sym__Atomic] = ACTIONS(894), - [anon_sym_signed] = ACTIONS(894), - [anon_sym_unsigned] = ACTIONS(894), - [anon_sym_long] = ACTIONS(894), - [anon_sym_short] = ACTIONS(894), - [sym_primitive_type] = ACTIONS(894), - [anon_sym_enum] = ACTIONS(894), - [anon_sym_struct] = ACTIONS(894), - [anon_sym_union] = ACTIONS(894), - [anon_sym_if] = ACTIONS(894), - [anon_sym_else] = ACTIONS(894), - [anon_sym_switch] = ACTIONS(894), - [anon_sym_case] = ACTIONS(894), - [anon_sym_default] = ACTIONS(894), - [anon_sym_while] = ACTIONS(894), - [anon_sym_do] = ACTIONS(894), - [anon_sym_for] = ACTIONS(894), - [anon_sym_return] = ACTIONS(894), - [anon_sym_break] = ACTIONS(894), - [anon_sym_continue] = ACTIONS(894), - [anon_sym_goto] = ACTIONS(894), - [anon_sym_DASH_DASH] = ACTIONS(896), - [anon_sym_PLUS_PLUS] = ACTIONS(896), - [anon_sym_sizeof] = ACTIONS(894), - [sym_number_literal] = ACTIONS(896), - [anon_sym_L_SQUOTE] = ACTIONS(896), - [anon_sym_u_SQUOTE] = ACTIONS(896), - [anon_sym_U_SQUOTE] = ACTIONS(896), - [anon_sym_u8_SQUOTE] = ACTIONS(896), - [anon_sym_SQUOTE] = ACTIONS(896), - [anon_sym_L_DQUOTE] = ACTIONS(896), - [anon_sym_u_DQUOTE] = ACTIONS(896), - [anon_sym_U_DQUOTE] = ACTIONS(896), - [anon_sym_u8_DQUOTE] = ACTIONS(896), - [anon_sym_DQUOTE] = ACTIONS(896), - [sym_true] = ACTIONS(894), - [sym_false] = ACTIONS(894), - [sym_null] = ACTIONS(894), - [sym_comment] = ACTIONS(3), - }, - [273] = { - [ts_builtin_sym_end] = ACTIONS(1022), - [sym_identifier] = ACTIONS(1020), - [aux_sym_preproc_include_token1] = ACTIONS(1020), - [aux_sym_preproc_def_token1] = ACTIONS(1020), - [aux_sym_preproc_if_token1] = ACTIONS(1020), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1020), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1020), - [sym_preproc_directive] = ACTIONS(1020), - [anon_sym_LPAREN2] = ACTIONS(1022), - [anon_sym_BANG] = ACTIONS(1022), - [anon_sym_TILDE] = ACTIONS(1022), - [anon_sym_DASH] = ACTIONS(1020), - [anon_sym_PLUS] = ACTIONS(1020), - [anon_sym_STAR] = ACTIONS(1022), - [anon_sym_AMP] = ACTIONS(1022), - [anon_sym_SEMI] = ACTIONS(1022), - [anon_sym_typedef] = ACTIONS(1020), - [anon_sym_extern] = ACTIONS(1020), - [anon_sym___attribute__] = ACTIONS(1020), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1022), - [anon_sym___declspec] = ACTIONS(1020), - [anon_sym___cdecl] = ACTIONS(1020), - [anon_sym___clrcall] = ACTIONS(1020), - [anon_sym___stdcall] = ACTIONS(1020), - [anon_sym___fastcall] = ACTIONS(1020), - [anon_sym___thiscall] = ACTIONS(1020), - [anon_sym___vectorcall] = ACTIONS(1020), - [anon_sym_LBRACE] = ACTIONS(1022), - [anon_sym_static] = ACTIONS(1020), - [anon_sym_auto] = ACTIONS(1020), - [anon_sym_register] = ACTIONS(1020), - [anon_sym_inline] = ACTIONS(1020), - [anon_sym_const] = ACTIONS(1020), - [anon_sym_volatile] = ACTIONS(1020), - [anon_sym_restrict] = ACTIONS(1020), - [anon_sym__Atomic] = ACTIONS(1020), - [anon_sym_signed] = ACTIONS(1020), - [anon_sym_unsigned] = ACTIONS(1020), - [anon_sym_long] = ACTIONS(1020), - [anon_sym_short] = ACTIONS(1020), - [sym_primitive_type] = ACTIONS(1020), - [anon_sym_enum] = ACTIONS(1020), - [anon_sym_struct] = ACTIONS(1020), - [anon_sym_union] = ACTIONS(1020), - [anon_sym_if] = ACTIONS(1020), - [anon_sym_else] = ACTIONS(1020), - [anon_sym_switch] = ACTIONS(1020), - [anon_sym_case] = ACTIONS(1020), - [anon_sym_default] = ACTIONS(1020), - [anon_sym_while] = ACTIONS(1020), - [anon_sym_do] = ACTIONS(1020), - [anon_sym_for] = ACTIONS(1020), - [anon_sym_return] = ACTIONS(1020), - [anon_sym_break] = ACTIONS(1020), - [anon_sym_continue] = ACTIONS(1020), - [anon_sym_goto] = ACTIONS(1020), - [anon_sym_DASH_DASH] = ACTIONS(1022), - [anon_sym_PLUS_PLUS] = ACTIONS(1022), - [anon_sym_sizeof] = ACTIONS(1020), - [sym_number_literal] = ACTIONS(1022), - [anon_sym_L_SQUOTE] = ACTIONS(1022), - [anon_sym_u_SQUOTE] = ACTIONS(1022), - [anon_sym_U_SQUOTE] = ACTIONS(1022), - [anon_sym_u8_SQUOTE] = ACTIONS(1022), - [anon_sym_SQUOTE] = ACTIONS(1022), - [anon_sym_L_DQUOTE] = ACTIONS(1022), - [anon_sym_u_DQUOTE] = ACTIONS(1022), - [anon_sym_U_DQUOTE] = ACTIONS(1022), - [anon_sym_u8_DQUOTE] = ACTIONS(1022), - [anon_sym_DQUOTE] = ACTIONS(1022), - [sym_true] = ACTIONS(1020), - [sym_false] = ACTIONS(1020), - [sym_null] = ACTIONS(1020), - [sym_comment] = ACTIONS(3), - }, - [274] = { - [sym_attribute_declaration] = STATE(242), - [sym_compound_statement] = STATE(268), - [sym_attributed_statement] = STATE(268), - [sym_labeled_statement] = STATE(268), - [sym_expression_statement] = STATE(268), - [sym_if_statement] = STATE(268), - [sym_switch_statement] = STATE(268), - [sym_case_statement] = STATE(268), - [sym_while_statement] = STATE(268), - [sym_do_statement] = STATE(268), - [sym_for_statement] = STATE(268), - [sym_return_statement] = STATE(268), - [sym_break_statement] = STATE(268), - [sym_continue_statement] = STATE(268), - [sym_goto_statement] = STATE(268), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [sym_identifier] = ACTIONS(1124), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [275] = { - [sym_identifier] = ACTIONS(952), - [aux_sym_preproc_include_token1] = ACTIONS(952), - [aux_sym_preproc_def_token1] = ACTIONS(952), - [aux_sym_preproc_if_token1] = ACTIONS(952), - [aux_sym_preproc_ifdef_token1] = ACTIONS(952), - [aux_sym_preproc_ifdef_token2] = ACTIONS(952), - [sym_preproc_directive] = ACTIONS(952), - [anon_sym_LPAREN2] = ACTIONS(954), - [anon_sym_BANG] = ACTIONS(954), - [anon_sym_TILDE] = ACTIONS(954), - [anon_sym_DASH] = ACTIONS(952), - [anon_sym_PLUS] = ACTIONS(952), - [anon_sym_STAR] = ACTIONS(954), - [anon_sym_AMP] = ACTIONS(954), - [anon_sym_SEMI] = ACTIONS(954), - [anon_sym_typedef] = ACTIONS(952), - [anon_sym_extern] = ACTIONS(952), - [anon_sym___attribute__] = ACTIONS(952), - [anon_sym_LBRACK_LBRACK] = ACTIONS(954), - [anon_sym___declspec] = ACTIONS(952), - [anon_sym___cdecl] = ACTIONS(952), - [anon_sym___clrcall] = ACTIONS(952), - [anon_sym___stdcall] = ACTIONS(952), - [anon_sym___fastcall] = ACTIONS(952), - [anon_sym___thiscall] = ACTIONS(952), - [anon_sym___vectorcall] = ACTIONS(952), - [anon_sym_LBRACE] = ACTIONS(954), - [anon_sym_RBRACE] = ACTIONS(954), - [anon_sym_static] = ACTIONS(952), - [anon_sym_auto] = ACTIONS(952), - [anon_sym_register] = ACTIONS(952), - [anon_sym_inline] = ACTIONS(952), - [anon_sym_const] = ACTIONS(952), - [anon_sym_volatile] = ACTIONS(952), - [anon_sym_restrict] = ACTIONS(952), - [anon_sym__Atomic] = ACTIONS(952), - [anon_sym_signed] = ACTIONS(952), - [anon_sym_unsigned] = ACTIONS(952), - [anon_sym_long] = ACTIONS(952), - [anon_sym_short] = ACTIONS(952), - [sym_primitive_type] = ACTIONS(952), - [anon_sym_enum] = ACTIONS(952), - [anon_sym_struct] = ACTIONS(952), - [anon_sym_union] = ACTIONS(952), - [anon_sym_if] = ACTIONS(952), - [anon_sym_else] = ACTIONS(952), - [anon_sym_switch] = ACTIONS(952), - [anon_sym_case] = ACTIONS(952), - [anon_sym_default] = ACTIONS(952), - [anon_sym_while] = ACTIONS(952), - [anon_sym_do] = ACTIONS(952), - [anon_sym_for] = ACTIONS(952), - [anon_sym_return] = ACTIONS(952), - [anon_sym_break] = ACTIONS(952), - [anon_sym_continue] = ACTIONS(952), - [anon_sym_goto] = ACTIONS(952), - [anon_sym_DASH_DASH] = ACTIONS(954), - [anon_sym_PLUS_PLUS] = ACTIONS(954), - [anon_sym_sizeof] = ACTIONS(952), - [sym_number_literal] = ACTIONS(954), - [anon_sym_L_SQUOTE] = ACTIONS(954), - [anon_sym_u_SQUOTE] = ACTIONS(954), - [anon_sym_U_SQUOTE] = ACTIONS(954), - [anon_sym_u8_SQUOTE] = ACTIONS(954), - [anon_sym_SQUOTE] = ACTIONS(954), - [anon_sym_L_DQUOTE] = ACTIONS(954), - [anon_sym_u_DQUOTE] = ACTIONS(954), - [anon_sym_U_DQUOTE] = ACTIONS(954), - [anon_sym_u8_DQUOTE] = ACTIONS(954), - [anon_sym_DQUOTE] = ACTIONS(954), - [sym_true] = ACTIONS(952), - [sym_false] = ACTIONS(952), - [sym_null] = ACTIONS(952), - [sym_comment] = ACTIONS(3), - }, - [276] = { - [sym_identifier] = ACTIONS(940), - [aux_sym_preproc_include_token1] = ACTIONS(940), - [aux_sym_preproc_def_token1] = ACTIONS(940), - [aux_sym_preproc_if_token1] = ACTIONS(940), - [aux_sym_preproc_ifdef_token1] = ACTIONS(940), - [aux_sym_preproc_ifdef_token2] = ACTIONS(940), - [sym_preproc_directive] = ACTIONS(940), - [anon_sym_LPAREN2] = ACTIONS(942), - [anon_sym_BANG] = ACTIONS(942), - [anon_sym_TILDE] = ACTIONS(942), - [anon_sym_DASH] = ACTIONS(940), - [anon_sym_PLUS] = ACTIONS(940), - [anon_sym_STAR] = ACTIONS(942), - [anon_sym_AMP] = ACTIONS(942), - [anon_sym_SEMI] = ACTIONS(942), - [anon_sym_typedef] = ACTIONS(940), - [anon_sym_extern] = ACTIONS(940), - [anon_sym___attribute__] = ACTIONS(940), - [anon_sym_LBRACK_LBRACK] = ACTIONS(942), - [anon_sym___declspec] = ACTIONS(940), - [anon_sym___cdecl] = ACTIONS(940), - [anon_sym___clrcall] = ACTIONS(940), - [anon_sym___stdcall] = ACTIONS(940), - [anon_sym___fastcall] = ACTIONS(940), - [anon_sym___thiscall] = ACTIONS(940), - [anon_sym___vectorcall] = ACTIONS(940), - [anon_sym_LBRACE] = ACTIONS(942), - [anon_sym_RBRACE] = ACTIONS(942), - [anon_sym_static] = ACTIONS(940), - [anon_sym_auto] = ACTIONS(940), - [anon_sym_register] = ACTIONS(940), - [anon_sym_inline] = ACTIONS(940), - [anon_sym_const] = ACTIONS(940), - [anon_sym_volatile] = ACTIONS(940), - [anon_sym_restrict] = ACTIONS(940), - [anon_sym__Atomic] = ACTIONS(940), - [anon_sym_signed] = ACTIONS(940), - [anon_sym_unsigned] = ACTIONS(940), - [anon_sym_long] = ACTIONS(940), - [anon_sym_short] = ACTIONS(940), - [sym_primitive_type] = ACTIONS(940), - [anon_sym_enum] = ACTIONS(940), - [anon_sym_struct] = ACTIONS(940), - [anon_sym_union] = ACTIONS(940), - [anon_sym_if] = ACTIONS(940), - [anon_sym_else] = ACTIONS(940), - [anon_sym_switch] = ACTIONS(940), - [anon_sym_case] = ACTIONS(940), - [anon_sym_default] = ACTIONS(940), - [anon_sym_while] = ACTIONS(940), - [anon_sym_do] = ACTIONS(940), - [anon_sym_for] = ACTIONS(940), - [anon_sym_return] = ACTIONS(940), - [anon_sym_break] = ACTIONS(940), - [anon_sym_continue] = ACTIONS(940), - [anon_sym_goto] = ACTIONS(940), - [anon_sym_DASH_DASH] = ACTIONS(942), - [anon_sym_PLUS_PLUS] = ACTIONS(942), - [anon_sym_sizeof] = ACTIONS(940), - [sym_number_literal] = ACTIONS(942), - [anon_sym_L_SQUOTE] = ACTIONS(942), - [anon_sym_u_SQUOTE] = ACTIONS(942), - [anon_sym_U_SQUOTE] = ACTIONS(942), - [anon_sym_u8_SQUOTE] = ACTIONS(942), - [anon_sym_SQUOTE] = ACTIONS(942), - [anon_sym_L_DQUOTE] = ACTIONS(942), - [anon_sym_u_DQUOTE] = ACTIONS(942), - [anon_sym_U_DQUOTE] = ACTIONS(942), - [anon_sym_u8_DQUOTE] = ACTIONS(942), - [anon_sym_DQUOTE] = ACTIONS(942), - [sym_true] = ACTIONS(940), - [sym_false] = ACTIONS(940), - [sym_null] = ACTIONS(940), - [sym_comment] = ACTIONS(3), - }, - [277] = { - [sym_identifier] = ACTIONS(1020), - [aux_sym_preproc_include_token1] = ACTIONS(1020), - [aux_sym_preproc_def_token1] = ACTIONS(1020), - [aux_sym_preproc_if_token1] = ACTIONS(1020), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1020), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1020), - [sym_preproc_directive] = ACTIONS(1020), - [anon_sym_LPAREN2] = ACTIONS(1022), - [anon_sym_BANG] = ACTIONS(1022), - [anon_sym_TILDE] = ACTIONS(1022), - [anon_sym_DASH] = ACTIONS(1020), - [anon_sym_PLUS] = ACTIONS(1020), - [anon_sym_STAR] = ACTIONS(1022), - [anon_sym_AMP] = ACTIONS(1022), - [anon_sym_SEMI] = ACTIONS(1022), - [anon_sym_typedef] = ACTIONS(1020), - [anon_sym_extern] = ACTIONS(1020), - [anon_sym___attribute__] = ACTIONS(1020), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1022), - [anon_sym___declspec] = ACTIONS(1020), - [anon_sym___cdecl] = ACTIONS(1020), - [anon_sym___clrcall] = ACTIONS(1020), - [anon_sym___stdcall] = ACTIONS(1020), - [anon_sym___fastcall] = ACTIONS(1020), - [anon_sym___thiscall] = ACTIONS(1020), - [anon_sym___vectorcall] = ACTIONS(1020), - [anon_sym_LBRACE] = ACTIONS(1022), - [anon_sym_RBRACE] = ACTIONS(1022), - [anon_sym_static] = ACTIONS(1020), - [anon_sym_auto] = ACTIONS(1020), - [anon_sym_register] = ACTIONS(1020), - [anon_sym_inline] = ACTIONS(1020), - [anon_sym_const] = ACTIONS(1020), - [anon_sym_volatile] = ACTIONS(1020), - [anon_sym_restrict] = ACTIONS(1020), - [anon_sym__Atomic] = ACTIONS(1020), - [anon_sym_signed] = ACTIONS(1020), - [anon_sym_unsigned] = ACTIONS(1020), - [anon_sym_long] = ACTIONS(1020), - [anon_sym_short] = ACTIONS(1020), - [sym_primitive_type] = ACTIONS(1020), - [anon_sym_enum] = ACTIONS(1020), - [anon_sym_struct] = ACTIONS(1020), - [anon_sym_union] = ACTIONS(1020), - [anon_sym_if] = ACTIONS(1020), - [anon_sym_else] = ACTIONS(1020), - [anon_sym_switch] = ACTIONS(1020), - [anon_sym_case] = ACTIONS(1020), - [anon_sym_default] = ACTIONS(1020), - [anon_sym_while] = ACTIONS(1020), - [anon_sym_do] = ACTIONS(1020), - [anon_sym_for] = ACTIONS(1020), - [anon_sym_return] = ACTIONS(1020), - [anon_sym_break] = ACTIONS(1020), - [anon_sym_continue] = ACTIONS(1020), - [anon_sym_goto] = ACTIONS(1020), - [anon_sym_DASH_DASH] = ACTIONS(1022), - [anon_sym_PLUS_PLUS] = ACTIONS(1022), - [anon_sym_sizeof] = ACTIONS(1020), - [sym_number_literal] = ACTIONS(1022), - [anon_sym_L_SQUOTE] = ACTIONS(1022), - [anon_sym_u_SQUOTE] = ACTIONS(1022), - [anon_sym_U_SQUOTE] = ACTIONS(1022), - [anon_sym_u8_SQUOTE] = ACTIONS(1022), - [anon_sym_SQUOTE] = ACTIONS(1022), - [anon_sym_L_DQUOTE] = ACTIONS(1022), - [anon_sym_u_DQUOTE] = ACTIONS(1022), - [anon_sym_U_DQUOTE] = ACTIONS(1022), - [anon_sym_u8_DQUOTE] = ACTIONS(1022), - [anon_sym_DQUOTE] = ACTIONS(1022), - [sym_true] = ACTIONS(1020), - [sym_false] = ACTIONS(1020), - [sym_null] = ACTIONS(1020), - [sym_comment] = ACTIONS(3), - }, - [278] = { - [sym_attribute_declaration] = STATE(242), - [sym_compound_statement] = STATE(272), - [sym_attributed_statement] = STATE(272), - [sym_labeled_statement] = STATE(272), - [sym_expression_statement] = STATE(272), - [sym_if_statement] = STATE(272), - [sym_switch_statement] = STATE(272), - [sym_case_statement] = STATE(272), - [sym_while_statement] = STATE(272), - [sym_do_statement] = STATE(272), - [sym_for_statement] = STATE(272), - [sym_return_statement] = STATE(272), - [sym_break_statement] = STATE(272), - [sym_continue_statement] = STATE(272), - [sym_goto_statement] = STATE(272), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [sym_identifier] = ACTIONS(1124), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [279] = { - [sym_attribute_declaration] = STATE(242), - [sym_compound_statement] = STATE(275), - [sym_attributed_statement] = STATE(275), - [sym_labeled_statement] = STATE(275), - [sym_expression_statement] = STATE(275), - [sym_if_statement] = STATE(275), - [sym_switch_statement] = STATE(275), - [sym_case_statement] = STATE(275), - [sym_while_statement] = STATE(275), - [sym_do_statement] = STATE(275), - [sym_for_statement] = STATE(275), - [sym_return_statement] = STATE(275), - [sym_break_statement] = STATE(275), - [sym_continue_statement] = STATE(275), - [sym_goto_statement] = STATE(275), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [sym_identifier] = ACTIONS(1124), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [280] = { - [sym_identifier] = ACTIONS(936), - [aux_sym_preproc_include_token1] = ACTIONS(936), - [aux_sym_preproc_def_token1] = ACTIONS(936), - [aux_sym_preproc_if_token1] = ACTIONS(936), - [aux_sym_preproc_ifdef_token1] = ACTIONS(936), - [aux_sym_preproc_ifdef_token2] = ACTIONS(936), - [sym_preproc_directive] = ACTIONS(936), - [anon_sym_LPAREN2] = ACTIONS(938), - [anon_sym_BANG] = ACTIONS(938), - [anon_sym_TILDE] = ACTIONS(938), - [anon_sym_DASH] = ACTIONS(936), - [anon_sym_PLUS] = ACTIONS(936), - [anon_sym_STAR] = ACTIONS(938), - [anon_sym_AMP] = ACTIONS(938), - [anon_sym_SEMI] = ACTIONS(938), - [anon_sym_typedef] = ACTIONS(936), - [anon_sym_extern] = ACTIONS(936), - [anon_sym___attribute__] = ACTIONS(936), - [anon_sym_LBRACK_LBRACK] = ACTIONS(938), - [anon_sym___declspec] = ACTIONS(936), - [anon_sym___cdecl] = ACTIONS(936), - [anon_sym___clrcall] = ACTIONS(936), - [anon_sym___stdcall] = ACTIONS(936), - [anon_sym___fastcall] = ACTIONS(936), - [anon_sym___thiscall] = ACTIONS(936), - [anon_sym___vectorcall] = ACTIONS(936), - [anon_sym_LBRACE] = ACTIONS(938), - [anon_sym_RBRACE] = ACTIONS(938), - [anon_sym_static] = ACTIONS(936), - [anon_sym_auto] = ACTIONS(936), - [anon_sym_register] = ACTIONS(936), - [anon_sym_inline] = ACTIONS(936), - [anon_sym_const] = ACTIONS(936), - [anon_sym_volatile] = ACTIONS(936), - [anon_sym_restrict] = ACTIONS(936), - [anon_sym__Atomic] = ACTIONS(936), - [anon_sym_signed] = ACTIONS(936), - [anon_sym_unsigned] = ACTIONS(936), - [anon_sym_long] = ACTIONS(936), - [anon_sym_short] = ACTIONS(936), - [sym_primitive_type] = ACTIONS(936), - [anon_sym_enum] = ACTIONS(936), - [anon_sym_struct] = ACTIONS(936), - [anon_sym_union] = ACTIONS(936), - [anon_sym_if] = ACTIONS(936), - [anon_sym_else] = ACTIONS(936), - [anon_sym_switch] = ACTIONS(936), - [anon_sym_case] = ACTIONS(936), - [anon_sym_default] = ACTIONS(936), - [anon_sym_while] = ACTIONS(936), - [anon_sym_do] = ACTIONS(936), - [anon_sym_for] = ACTIONS(936), - [anon_sym_return] = ACTIONS(936), - [anon_sym_break] = ACTIONS(936), - [anon_sym_continue] = ACTIONS(936), - [anon_sym_goto] = ACTIONS(936), - [anon_sym_DASH_DASH] = ACTIONS(938), - [anon_sym_PLUS_PLUS] = ACTIONS(938), - [anon_sym_sizeof] = ACTIONS(936), - [sym_number_literal] = ACTIONS(938), - [anon_sym_L_SQUOTE] = ACTIONS(938), - [anon_sym_u_SQUOTE] = ACTIONS(938), - [anon_sym_U_SQUOTE] = ACTIONS(938), - [anon_sym_u8_SQUOTE] = ACTIONS(938), - [anon_sym_SQUOTE] = ACTIONS(938), - [anon_sym_L_DQUOTE] = ACTIONS(938), - [anon_sym_u_DQUOTE] = ACTIONS(938), - [anon_sym_U_DQUOTE] = ACTIONS(938), - [anon_sym_u8_DQUOTE] = ACTIONS(938), - [anon_sym_DQUOTE] = ACTIONS(938), - [sym_true] = ACTIONS(936), - [sym_false] = ACTIONS(936), - [sym_null] = ACTIONS(936), - [sym_comment] = ACTIONS(3), - }, - [281] = { - [sym_identifier] = ACTIONS(932), - [aux_sym_preproc_include_token1] = ACTIONS(932), - [aux_sym_preproc_def_token1] = ACTIONS(932), - [aux_sym_preproc_if_token1] = ACTIONS(932), - [aux_sym_preproc_ifdef_token1] = ACTIONS(932), - [aux_sym_preproc_ifdef_token2] = ACTIONS(932), - [sym_preproc_directive] = ACTIONS(932), - [anon_sym_LPAREN2] = ACTIONS(934), - [anon_sym_BANG] = ACTIONS(934), - [anon_sym_TILDE] = ACTIONS(934), - [anon_sym_DASH] = ACTIONS(932), - [anon_sym_PLUS] = ACTIONS(932), - [anon_sym_STAR] = ACTIONS(934), - [anon_sym_AMP] = ACTIONS(934), - [anon_sym_SEMI] = ACTIONS(934), - [anon_sym_typedef] = ACTIONS(932), - [anon_sym_extern] = ACTIONS(932), - [anon_sym___attribute__] = ACTIONS(932), - [anon_sym_LBRACK_LBRACK] = ACTIONS(934), - [anon_sym___declspec] = ACTIONS(932), - [anon_sym___cdecl] = ACTIONS(932), - [anon_sym___clrcall] = ACTIONS(932), - [anon_sym___stdcall] = ACTIONS(932), - [anon_sym___fastcall] = ACTIONS(932), - [anon_sym___thiscall] = ACTIONS(932), - [anon_sym___vectorcall] = ACTIONS(932), - [anon_sym_LBRACE] = ACTIONS(934), - [anon_sym_RBRACE] = ACTIONS(934), - [anon_sym_static] = ACTIONS(932), - [anon_sym_auto] = ACTIONS(932), - [anon_sym_register] = ACTIONS(932), - [anon_sym_inline] = ACTIONS(932), - [anon_sym_const] = ACTIONS(932), - [anon_sym_volatile] = ACTIONS(932), - [anon_sym_restrict] = ACTIONS(932), - [anon_sym__Atomic] = ACTIONS(932), - [anon_sym_signed] = ACTIONS(932), - [anon_sym_unsigned] = ACTIONS(932), - [anon_sym_long] = ACTIONS(932), - [anon_sym_short] = ACTIONS(932), - [sym_primitive_type] = ACTIONS(932), - [anon_sym_enum] = ACTIONS(932), - [anon_sym_struct] = ACTIONS(932), - [anon_sym_union] = ACTIONS(932), - [anon_sym_if] = ACTIONS(932), - [anon_sym_else] = ACTIONS(932), - [anon_sym_switch] = ACTIONS(932), - [anon_sym_case] = ACTIONS(932), - [anon_sym_default] = ACTIONS(932), - [anon_sym_while] = ACTIONS(932), - [anon_sym_do] = ACTIONS(932), - [anon_sym_for] = ACTIONS(932), - [anon_sym_return] = ACTIONS(932), - [anon_sym_break] = ACTIONS(932), - [anon_sym_continue] = ACTIONS(932), - [anon_sym_goto] = ACTIONS(932), - [anon_sym_DASH_DASH] = ACTIONS(934), - [anon_sym_PLUS_PLUS] = ACTIONS(934), - [anon_sym_sizeof] = ACTIONS(932), - [sym_number_literal] = ACTIONS(934), - [anon_sym_L_SQUOTE] = ACTIONS(934), - [anon_sym_u_SQUOTE] = ACTIONS(934), - [anon_sym_U_SQUOTE] = ACTIONS(934), - [anon_sym_u8_SQUOTE] = ACTIONS(934), - [anon_sym_SQUOTE] = ACTIONS(934), - [anon_sym_L_DQUOTE] = ACTIONS(934), - [anon_sym_u_DQUOTE] = ACTIONS(934), - [anon_sym_U_DQUOTE] = ACTIONS(934), - [anon_sym_u8_DQUOTE] = ACTIONS(934), - [anon_sym_DQUOTE] = ACTIONS(934), - [sym_true] = ACTIONS(932), - [sym_false] = ACTIONS(932), - [sym_null] = ACTIONS(932), - [sym_comment] = ACTIONS(3), - }, - [282] = { - [sym_identifier] = ACTIONS(1012), - [aux_sym_preproc_include_token1] = ACTIONS(1012), - [aux_sym_preproc_def_token1] = ACTIONS(1012), - [aux_sym_preproc_if_token1] = ACTIONS(1012), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1012), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1012), - [sym_preproc_directive] = ACTIONS(1012), - [anon_sym_LPAREN2] = ACTIONS(1014), - [anon_sym_BANG] = ACTIONS(1014), - [anon_sym_TILDE] = ACTIONS(1014), - [anon_sym_DASH] = ACTIONS(1012), - [anon_sym_PLUS] = ACTIONS(1012), - [anon_sym_STAR] = ACTIONS(1014), - [anon_sym_AMP] = ACTIONS(1014), - [anon_sym_SEMI] = ACTIONS(1014), - [anon_sym_typedef] = ACTIONS(1012), - [anon_sym_extern] = ACTIONS(1012), - [anon_sym___attribute__] = ACTIONS(1012), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1014), - [anon_sym___declspec] = ACTIONS(1012), - [anon_sym___cdecl] = ACTIONS(1012), - [anon_sym___clrcall] = ACTIONS(1012), - [anon_sym___stdcall] = ACTIONS(1012), - [anon_sym___fastcall] = ACTIONS(1012), - [anon_sym___thiscall] = ACTIONS(1012), - [anon_sym___vectorcall] = ACTIONS(1012), - [anon_sym_LBRACE] = ACTIONS(1014), - [anon_sym_RBRACE] = ACTIONS(1014), - [anon_sym_static] = ACTIONS(1012), - [anon_sym_auto] = ACTIONS(1012), - [anon_sym_register] = ACTIONS(1012), - [anon_sym_inline] = ACTIONS(1012), - [anon_sym_const] = ACTIONS(1012), - [anon_sym_volatile] = ACTIONS(1012), - [anon_sym_restrict] = ACTIONS(1012), - [anon_sym__Atomic] = ACTIONS(1012), - [anon_sym_signed] = ACTIONS(1012), - [anon_sym_unsigned] = ACTIONS(1012), - [anon_sym_long] = ACTIONS(1012), - [anon_sym_short] = ACTIONS(1012), - [sym_primitive_type] = ACTIONS(1012), - [anon_sym_enum] = ACTIONS(1012), - [anon_sym_struct] = ACTIONS(1012), - [anon_sym_union] = ACTIONS(1012), - [anon_sym_if] = ACTIONS(1012), - [anon_sym_else] = ACTIONS(1012), - [anon_sym_switch] = ACTIONS(1012), - [anon_sym_case] = ACTIONS(1012), - [anon_sym_default] = ACTIONS(1012), - [anon_sym_while] = ACTIONS(1012), - [anon_sym_do] = ACTIONS(1012), - [anon_sym_for] = ACTIONS(1012), - [anon_sym_return] = ACTIONS(1012), - [anon_sym_break] = ACTIONS(1012), - [anon_sym_continue] = ACTIONS(1012), - [anon_sym_goto] = ACTIONS(1012), - [anon_sym_DASH_DASH] = ACTIONS(1014), - [anon_sym_PLUS_PLUS] = ACTIONS(1014), - [anon_sym_sizeof] = ACTIONS(1012), - [sym_number_literal] = ACTIONS(1014), - [anon_sym_L_SQUOTE] = ACTIONS(1014), - [anon_sym_u_SQUOTE] = ACTIONS(1014), - [anon_sym_U_SQUOTE] = ACTIONS(1014), - [anon_sym_u8_SQUOTE] = ACTIONS(1014), - [anon_sym_SQUOTE] = ACTIONS(1014), - [anon_sym_L_DQUOTE] = ACTIONS(1014), - [anon_sym_u_DQUOTE] = ACTIONS(1014), - [anon_sym_U_DQUOTE] = ACTIONS(1014), - [anon_sym_u8_DQUOTE] = ACTIONS(1014), - [anon_sym_DQUOTE] = ACTIONS(1014), - [sym_true] = ACTIONS(1012), - [sym_false] = ACTIONS(1012), - [sym_null] = ACTIONS(1012), - [sym_comment] = ACTIONS(3), - }, - [283] = { - [sym_identifier] = ACTIONS(956), - [aux_sym_preproc_include_token1] = ACTIONS(956), - [aux_sym_preproc_def_token1] = ACTIONS(956), - [aux_sym_preproc_if_token1] = ACTIONS(956), - [aux_sym_preproc_if_token2] = ACTIONS(956), - [aux_sym_preproc_ifdef_token1] = ACTIONS(956), - [aux_sym_preproc_ifdef_token2] = ACTIONS(956), - [sym_preproc_directive] = ACTIONS(956), - [anon_sym_LPAREN2] = ACTIONS(958), - [anon_sym_BANG] = ACTIONS(958), - [anon_sym_TILDE] = ACTIONS(958), - [anon_sym_DASH] = ACTIONS(956), - [anon_sym_PLUS] = ACTIONS(956), - [anon_sym_STAR] = ACTIONS(958), - [anon_sym_AMP] = ACTIONS(958), - [anon_sym_SEMI] = ACTIONS(958), - [anon_sym_typedef] = ACTIONS(956), - [anon_sym_extern] = ACTIONS(956), - [anon_sym___attribute__] = ACTIONS(956), - [anon_sym_LBRACK_LBRACK] = ACTIONS(958), - [anon_sym___declspec] = ACTIONS(956), - [anon_sym___cdecl] = ACTIONS(956), - [anon_sym___clrcall] = ACTIONS(956), - [anon_sym___stdcall] = ACTIONS(956), - [anon_sym___fastcall] = ACTIONS(956), - [anon_sym___thiscall] = ACTIONS(956), - [anon_sym___vectorcall] = ACTIONS(956), - [anon_sym_LBRACE] = ACTIONS(958), - [anon_sym_static] = ACTIONS(956), - [anon_sym_auto] = ACTIONS(956), - [anon_sym_register] = ACTIONS(956), - [anon_sym_inline] = ACTIONS(956), - [anon_sym_const] = ACTIONS(956), - [anon_sym_volatile] = ACTIONS(956), - [anon_sym_restrict] = ACTIONS(956), - [anon_sym__Atomic] = ACTIONS(956), - [anon_sym_signed] = ACTIONS(956), - [anon_sym_unsigned] = ACTIONS(956), - [anon_sym_long] = ACTIONS(956), - [anon_sym_short] = ACTIONS(956), - [sym_primitive_type] = ACTIONS(956), - [anon_sym_enum] = ACTIONS(956), - [anon_sym_struct] = ACTIONS(956), - [anon_sym_union] = ACTIONS(956), - [anon_sym_if] = ACTIONS(956), - [anon_sym_else] = ACTIONS(956), - [anon_sym_switch] = ACTIONS(956), - [anon_sym_case] = ACTIONS(956), - [anon_sym_default] = ACTIONS(956), - [anon_sym_while] = ACTIONS(956), - [anon_sym_do] = ACTIONS(956), - [anon_sym_for] = ACTIONS(956), - [anon_sym_return] = ACTIONS(956), - [anon_sym_break] = ACTIONS(956), - [anon_sym_continue] = ACTIONS(956), - [anon_sym_goto] = ACTIONS(956), - [anon_sym_DASH_DASH] = ACTIONS(958), - [anon_sym_PLUS_PLUS] = ACTIONS(958), - [anon_sym_sizeof] = ACTIONS(956), - [sym_number_literal] = ACTIONS(958), - [anon_sym_L_SQUOTE] = ACTIONS(958), - [anon_sym_u_SQUOTE] = ACTIONS(958), - [anon_sym_U_SQUOTE] = ACTIONS(958), - [anon_sym_u8_SQUOTE] = ACTIONS(958), - [anon_sym_SQUOTE] = ACTIONS(958), - [anon_sym_L_DQUOTE] = ACTIONS(958), - [anon_sym_u_DQUOTE] = ACTIONS(958), - [anon_sym_U_DQUOTE] = ACTIONS(958), - [anon_sym_u8_DQUOTE] = ACTIONS(958), - [anon_sym_DQUOTE] = ACTIONS(958), - [sym_true] = ACTIONS(956), - [sym_false] = ACTIONS(956), - [sym_null] = ACTIONS(956), - [sym_comment] = ACTIONS(3), - }, - [284] = { - [ts_builtin_sym_end] = ACTIONS(1014), - [sym_identifier] = ACTIONS(1012), - [aux_sym_preproc_include_token1] = ACTIONS(1012), - [aux_sym_preproc_def_token1] = ACTIONS(1012), - [aux_sym_preproc_if_token1] = ACTIONS(1012), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1012), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1012), - [sym_preproc_directive] = ACTIONS(1012), - [anon_sym_LPAREN2] = ACTIONS(1014), - [anon_sym_BANG] = ACTIONS(1014), - [anon_sym_TILDE] = ACTIONS(1014), - [anon_sym_DASH] = ACTIONS(1012), - [anon_sym_PLUS] = ACTIONS(1012), - [anon_sym_STAR] = ACTIONS(1014), - [anon_sym_AMP] = ACTIONS(1014), - [anon_sym_SEMI] = ACTIONS(1014), - [anon_sym_typedef] = ACTIONS(1012), - [anon_sym_extern] = ACTIONS(1012), - [anon_sym___attribute__] = ACTIONS(1012), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1014), - [anon_sym___declspec] = ACTIONS(1012), - [anon_sym___cdecl] = ACTIONS(1012), - [anon_sym___clrcall] = ACTIONS(1012), - [anon_sym___stdcall] = ACTIONS(1012), - [anon_sym___fastcall] = ACTIONS(1012), - [anon_sym___thiscall] = ACTIONS(1012), - [anon_sym___vectorcall] = ACTIONS(1012), - [anon_sym_LBRACE] = ACTIONS(1014), - [anon_sym_static] = ACTIONS(1012), - [anon_sym_auto] = ACTIONS(1012), - [anon_sym_register] = ACTIONS(1012), - [anon_sym_inline] = ACTIONS(1012), - [anon_sym_const] = ACTIONS(1012), - [anon_sym_volatile] = ACTIONS(1012), - [anon_sym_restrict] = ACTIONS(1012), - [anon_sym__Atomic] = ACTIONS(1012), - [anon_sym_signed] = ACTIONS(1012), - [anon_sym_unsigned] = ACTIONS(1012), - [anon_sym_long] = ACTIONS(1012), - [anon_sym_short] = ACTIONS(1012), - [sym_primitive_type] = ACTIONS(1012), - [anon_sym_enum] = ACTIONS(1012), - [anon_sym_struct] = ACTIONS(1012), - [anon_sym_union] = ACTIONS(1012), - [anon_sym_if] = ACTIONS(1012), - [anon_sym_else] = ACTIONS(1012), - [anon_sym_switch] = ACTIONS(1012), - [anon_sym_case] = ACTIONS(1012), - [anon_sym_default] = ACTIONS(1012), - [anon_sym_while] = ACTIONS(1012), - [anon_sym_do] = ACTIONS(1012), - [anon_sym_for] = ACTIONS(1012), - [anon_sym_return] = ACTIONS(1012), - [anon_sym_break] = ACTIONS(1012), - [anon_sym_continue] = ACTIONS(1012), - [anon_sym_goto] = ACTIONS(1012), - [anon_sym_DASH_DASH] = ACTIONS(1014), - [anon_sym_PLUS_PLUS] = ACTIONS(1014), - [anon_sym_sizeof] = ACTIONS(1012), - [sym_number_literal] = ACTIONS(1014), - [anon_sym_L_SQUOTE] = ACTIONS(1014), - [anon_sym_u_SQUOTE] = ACTIONS(1014), - [anon_sym_U_SQUOTE] = ACTIONS(1014), - [anon_sym_u8_SQUOTE] = ACTIONS(1014), - [anon_sym_SQUOTE] = ACTIONS(1014), - [anon_sym_L_DQUOTE] = ACTIONS(1014), - [anon_sym_u_DQUOTE] = ACTIONS(1014), - [anon_sym_U_DQUOTE] = ACTIONS(1014), - [anon_sym_u8_DQUOTE] = ACTIONS(1014), - [anon_sym_DQUOTE] = ACTIONS(1014), - [sym_true] = ACTIONS(1012), - [sym_false] = ACTIONS(1012), - [sym_null] = ACTIONS(1012), - [sym_comment] = ACTIONS(3), - }, - [285] = { - [sym_identifier] = ACTIONS(924), - [aux_sym_preproc_include_token1] = ACTIONS(924), - [aux_sym_preproc_def_token1] = ACTIONS(924), - [aux_sym_preproc_if_token1] = ACTIONS(924), - [aux_sym_preproc_ifdef_token1] = ACTIONS(924), - [aux_sym_preproc_ifdef_token2] = ACTIONS(924), - [sym_preproc_directive] = ACTIONS(924), - [anon_sym_LPAREN2] = ACTIONS(926), - [anon_sym_BANG] = ACTIONS(926), - [anon_sym_TILDE] = ACTIONS(926), - [anon_sym_DASH] = ACTIONS(924), - [anon_sym_PLUS] = ACTIONS(924), - [anon_sym_STAR] = ACTIONS(926), - [anon_sym_AMP] = ACTIONS(926), - [anon_sym_SEMI] = ACTIONS(926), - [anon_sym_typedef] = ACTIONS(924), - [anon_sym_extern] = ACTIONS(924), - [anon_sym___attribute__] = ACTIONS(924), - [anon_sym_LBRACK_LBRACK] = ACTIONS(926), - [anon_sym___declspec] = ACTIONS(924), - [anon_sym___cdecl] = ACTIONS(924), - [anon_sym___clrcall] = ACTIONS(924), - [anon_sym___stdcall] = ACTIONS(924), - [anon_sym___fastcall] = ACTIONS(924), - [anon_sym___thiscall] = ACTIONS(924), - [anon_sym___vectorcall] = ACTIONS(924), - [anon_sym_LBRACE] = ACTIONS(926), - [anon_sym_RBRACE] = ACTIONS(926), - [anon_sym_static] = ACTIONS(924), - [anon_sym_auto] = ACTIONS(924), - [anon_sym_register] = ACTIONS(924), - [anon_sym_inline] = ACTIONS(924), - [anon_sym_const] = ACTIONS(924), - [anon_sym_volatile] = ACTIONS(924), - [anon_sym_restrict] = ACTIONS(924), - [anon_sym__Atomic] = ACTIONS(924), - [anon_sym_signed] = ACTIONS(924), - [anon_sym_unsigned] = ACTIONS(924), - [anon_sym_long] = ACTIONS(924), - [anon_sym_short] = ACTIONS(924), - [sym_primitive_type] = ACTIONS(924), - [anon_sym_enum] = ACTIONS(924), - [anon_sym_struct] = ACTIONS(924), - [anon_sym_union] = ACTIONS(924), - [anon_sym_if] = ACTIONS(924), - [anon_sym_else] = ACTIONS(924), - [anon_sym_switch] = ACTIONS(924), - [anon_sym_case] = ACTIONS(924), - [anon_sym_default] = ACTIONS(924), - [anon_sym_while] = ACTIONS(924), - [anon_sym_do] = ACTIONS(924), - [anon_sym_for] = ACTIONS(924), - [anon_sym_return] = ACTIONS(924), - [anon_sym_break] = ACTIONS(924), - [anon_sym_continue] = ACTIONS(924), - [anon_sym_goto] = ACTIONS(924), - [anon_sym_DASH_DASH] = ACTIONS(926), - [anon_sym_PLUS_PLUS] = ACTIONS(926), - [anon_sym_sizeof] = ACTIONS(924), - [sym_number_literal] = ACTIONS(926), - [anon_sym_L_SQUOTE] = ACTIONS(926), - [anon_sym_u_SQUOTE] = ACTIONS(926), - [anon_sym_U_SQUOTE] = ACTIONS(926), - [anon_sym_u8_SQUOTE] = ACTIONS(926), - [anon_sym_SQUOTE] = ACTIONS(926), - [anon_sym_L_DQUOTE] = ACTIONS(926), - [anon_sym_u_DQUOTE] = ACTIONS(926), - [anon_sym_U_DQUOTE] = ACTIONS(926), - [anon_sym_u8_DQUOTE] = ACTIONS(926), - [anon_sym_DQUOTE] = ACTIONS(926), - [sym_true] = ACTIONS(924), - [sym_false] = ACTIONS(924), - [sym_null] = ACTIONS(924), - [sym_comment] = ACTIONS(3), - }, - [286] = { - [sym_identifier] = ACTIONS(1000), - [aux_sym_preproc_include_token1] = ACTIONS(1000), - [aux_sym_preproc_def_token1] = ACTIONS(1000), - [aux_sym_preproc_if_token1] = ACTIONS(1000), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1000), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1000), - [sym_preproc_directive] = ACTIONS(1000), - [anon_sym_LPAREN2] = ACTIONS(1002), - [anon_sym_BANG] = ACTIONS(1002), - [anon_sym_TILDE] = ACTIONS(1002), - [anon_sym_DASH] = ACTIONS(1000), - [anon_sym_PLUS] = ACTIONS(1000), - [anon_sym_STAR] = ACTIONS(1002), - [anon_sym_AMP] = ACTIONS(1002), - [anon_sym_SEMI] = ACTIONS(1002), - [anon_sym_typedef] = ACTIONS(1000), - [anon_sym_extern] = ACTIONS(1000), - [anon_sym___attribute__] = ACTIONS(1000), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1002), - [anon_sym___declspec] = ACTIONS(1000), - [anon_sym___cdecl] = ACTIONS(1000), - [anon_sym___clrcall] = ACTIONS(1000), - [anon_sym___stdcall] = ACTIONS(1000), - [anon_sym___fastcall] = ACTIONS(1000), - [anon_sym___thiscall] = ACTIONS(1000), - [anon_sym___vectorcall] = ACTIONS(1000), - [anon_sym_LBRACE] = ACTIONS(1002), - [anon_sym_RBRACE] = ACTIONS(1002), - [anon_sym_static] = ACTIONS(1000), - [anon_sym_auto] = ACTIONS(1000), - [anon_sym_register] = ACTIONS(1000), - [anon_sym_inline] = ACTIONS(1000), - [anon_sym_const] = ACTIONS(1000), - [anon_sym_volatile] = ACTIONS(1000), - [anon_sym_restrict] = ACTIONS(1000), - [anon_sym__Atomic] = ACTIONS(1000), - [anon_sym_signed] = ACTIONS(1000), - [anon_sym_unsigned] = ACTIONS(1000), - [anon_sym_long] = ACTIONS(1000), - [anon_sym_short] = ACTIONS(1000), - [sym_primitive_type] = ACTIONS(1000), - [anon_sym_enum] = ACTIONS(1000), - [anon_sym_struct] = ACTIONS(1000), - [anon_sym_union] = ACTIONS(1000), - [anon_sym_if] = ACTIONS(1000), - [anon_sym_else] = ACTIONS(1000), - [anon_sym_switch] = ACTIONS(1000), - [anon_sym_case] = ACTIONS(1000), - [anon_sym_default] = ACTIONS(1000), - [anon_sym_while] = ACTIONS(1000), - [anon_sym_do] = ACTIONS(1000), - [anon_sym_for] = ACTIONS(1000), - [anon_sym_return] = ACTIONS(1000), - [anon_sym_break] = ACTIONS(1000), - [anon_sym_continue] = ACTIONS(1000), - [anon_sym_goto] = ACTIONS(1000), - [anon_sym_DASH_DASH] = ACTIONS(1002), - [anon_sym_PLUS_PLUS] = ACTIONS(1002), - [anon_sym_sizeof] = ACTIONS(1000), - [sym_number_literal] = ACTIONS(1002), - [anon_sym_L_SQUOTE] = ACTIONS(1002), - [anon_sym_u_SQUOTE] = ACTIONS(1002), - [anon_sym_U_SQUOTE] = ACTIONS(1002), - [anon_sym_u8_SQUOTE] = ACTIONS(1002), - [anon_sym_SQUOTE] = ACTIONS(1002), - [anon_sym_L_DQUOTE] = ACTIONS(1002), - [anon_sym_u_DQUOTE] = ACTIONS(1002), - [anon_sym_U_DQUOTE] = ACTIONS(1002), - [anon_sym_u8_DQUOTE] = ACTIONS(1002), - [anon_sym_DQUOTE] = ACTIONS(1002), - [sym_true] = ACTIONS(1000), - [sym_false] = ACTIONS(1000), - [sym_null] = ACTIONS(1000), - [sym_comment] = ACTIONS(3), - }, - [287] = { - [ts_builtin_sym_end] = ACTIONS(904), - [sym_identifier] = ACTIONS(902), - [aux_sym_preproc_include_token1] = ACTIONS(902), - [aux_sym_preproc_def_token1] = ACTIONS(902), - [aux_sym_preproc_if_token1] = ACTIONS(902), - [aux_sym_preproc_ifdef_token1] = ACTIONS(902), - [aux_sym_preproc_ifdef_token2] = ACTIONS(902), - [sym_preproc_directive] = ACTIONS(902), - [anon_sym_LPAREN2] = ACTIONS(904), - [anon_sym_BANG] = ACTIONS(904), - [anon_sym_TILDE] = ACTIONS(904), - [anon_sym_DASH] = ACTIONS(902), - [anon_sym_PLUS] = ACTIONS(902), - [anon_sym_STAR] = ACTIONS(904), - [anon_sym_AMP] = ACTIONS(904), - [anon_sym_SEMI] = ACTIONS(904), - [anon_sym_typedef] = ACTIONS(902), - [anon_sym_extern] = ACTIONS(902), - [anon_sym___attribute__] = ACTIONS(902), - [anon_sym_LBRACK_LBRACK] = ACTIONS(904), - [anon_sym___declspec] = ACTIONS(902), - [anon_sym___cdecl] = ACTIONS(902), - [anon_sym___clrcall] = ACTIONS(902), - [anon_sym___stdcall] = ACTIONS(902), - [anon_sym___fastcall] = ACTIONS(902), - [anon_sym___thiscall] = ACTIONS(902), - [anon_sym___vectorcall] = ACTIONS(902), - [anon_sym_LBRACE] = ACTIONS(904), - [anon_sym_static] = ACTIONS(902), - [anon_sym_auto] = ACTIONS(902), - [anon_sym_register] = ACTIONS(902), - [anon_sym_inline] = ACTIONS(902), - [anon_sym_const] = ACTIONS(902), - [anon_sym_volatile] = ACTIONS(902), - [anon_sym_restrict] = ACTIONS(902), - [anon_sym__Atomic] = ACTIONS(902), - [anon_sym_signed] = ACTIONS(902), - [anon_sym_unsigned] = ACTIONS(902), - [anon_sym_long] = ACTIONS(902), - [anon_sym_short] = ACTIONS(902), - [sym_primitive_type] = ACTIONS(902), - [anon_sym_enum] = ACTIONS(902), - [anon_sym_struct] = ACTIONS(902), - [anon_sym_union] = ACTIONS(902), - [anon_sym_if] = ACTIONS(902), - [anon_sym_else] = ACTIONS(902), - [anon_sym_switch] = ACTIONS(902), - [anon_sym_case] = ACTIONS(902), - [anon_sym_default] = ACTIONS(902), - [anon_sym_while] = ACTIONS(902), - [anon_sym_do] = ACTIONS(902), - [anon_sym_for] = ACTIONS(902), - [anon_sym_return] = ACTIONS(902), - [anon_sym_break] = ACTIONS(902), - [anon_sym_continue] = ACTIONS(902), - [anon_sym_goto] = ACTIONS(902), - [anon_sym_DASH_DASH] = ACTIONS(904), - [anon_sym_PLUS_PLUS] = ACTIONS(904), - [anon_sym_sizeof] = ACTIONS(902), - [sym_number_literal] = ACTIONS(904), - [anon_sym_L_SQUOTE] = ACTIONS(904), - [anon_sym_u_SQUOTE] = ACTIONS(904), - [anon_sym_U_SQUOTE] = ACTIONS(904), - [anon_sym_u8_SQUOTE] = ACTIONS(904), - [anon_sym_SQUOTE] = ACTIONS(904), - [anon_sym_L_DQUOTE] = ACTIONS(904), - [anon_sym_u_DQUOTE] = ACTIONS(904), - [anon_sym_U_DQUOTE] = ACTIONS(904), - [anon_sym_u8_DQUOTE] = ACTIONS(904), - [anon_sym_DQUOTE] = ACTIONS(904), - [sym_true] = ACTIONS(902), - [sym_false] = ACTIONS(902), - [sym_null] = ACTIONS(902), - [sym_comment] = ACTIONS(3), - }, - [288] = { - [sym_attribute_declaration] = STATE(242), - [sym_compound_statement] = STATE(307), - [sym_attributed_statement] = STATE(307), - [sym_labeled_statement] = STATE(307), - [sym_expression_statement] = STATE(307), - [sym_if_statement] = STATE(307), - [sym_switch_statement] = STATE(307), - [sym_case_statement] = STATE(307), - [sym_while_statement] = STATE(307), - [sym_do_statement] = STATE(307), - [sym_for_statement] = STATE(307), - [sym_return_statement] = STATE(307), - [sym_break_statement] = STATE(307), - [sym_continue_statement] = STATE(307), - [sym_goto_statement] = STATE(307), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [sym_identifier] = ACTIONS(1124), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [289] = { - [sym_identifier] = ACTIONS(984), - [aux_sym_preproc_include_token1] = ACTIONS(984), - [aux_sym_preproc_def_token1] = ACTIONS(984), - [aux_sym_preproc_if_token1] = ACTIONS(984), - [aux_sym_preproc_ifdef_token1] = ACTIONS(984), - [aux_sym_preproc_ifdef_token2] = ACTIONS(984), - [sym_preproc_directive] = ACTIONS(984), - [anon_sym_LPAREN2] = ACTIONS(986), - [anon_sym_BANG] = ACTIONS(986), - [anon_sym_TILDE] = ACTIONS(986), - [anon_sym_DASH] = ACTIONS(984), - [anon_sym_PLUS] = ACTIONS(984), - [anon_sym_STAR] = ACTIONS(986), - [anon_sym_AMP] = ACTIONS(986), - [anon_sym_SEMI] = ACTIONS(986), - [anon_sym_typedef] = ACTIONS(984), - [anon_sym_extern] = ACTIONS(984), - [anon_sym___attribute__] = ACTIONS(984), - [anon_sym_LBRACK_LBRACK] = ACTIONS(986), - [anon_sym___declspec] = ACTIONS(984), - [anon_sym___cdecl] = ACTIONS(984), - [anon_sym___clrcall] = ACTIONS(984), - [anon_sym___stdcall] = ACTIONS(984), - [anon_sym___fastcall] = ACTIONS(984), - [anon_sym___thiscall] = ACTIONS(984), - [anon_sym___vectorcall] = ACTIONS(984), - [anon_sym_LBRACE] = ACTIONS(986), - [anon_sym_RBRACE] = ACTIONS(986), - [anon_sym_static] = ACTIONS(984), - [anon_sym_auto] = ACTIONS(984), - [anon_sym_register] = ACTIONS(984), - [anon_sym_inline] = ACTIONS(984), - [anon_sym_const] = ACTIONS(984), - [anon_sym_volatile] = ACTIONS(984), - [anon_sym_restrict] = ACTIONS(984), - [anon_sym__Atomic] = ACTIONS(984), - [anon_sym_signed] = ACTIONS(984), - [anon_sym_unsigned] = ACTIONS(984), - [anon_sym_long] = ACTIONS(984), - [anon_sym_short] = ACTIONS(984), - [sym_primitive_type] = ACTIONS(984), - [anon_sym_enum] = ACTIONS(984), - [anon_sym_struct] = ACTIONS(984), - [anon_sym_union] = ACTIONS(984), - [anon_sym_if] = ACTIONS(984), - [anon_sym_else] = ACTIONS(984), - [anon_sym_switch] = ACTIONS(984), - [anon_sym_case] = ACTIONS(984), - [anon_sym_default] = ACTIONS(984), - [anon_sym_while] = ACTIONS(984), - [anon_sym_do] = ACTIONS(984), - [anon_sym_for] = ACTIONS(984), - [anon_sym_return] = ACTIONS(984), - [anon_sym_break] = ACTIONS(984), - [anon_sym_continue] = ACTIONS(984), - [anon_sym_goto] = ACTIONS(984), - [anon_sym_DASH_DASH] = ACTIONS(986), - [anon_sym_PLUS_PLUS] = ACTIONS(986), - [anon_sym_sizeof] = ACTIONS(984), - [sym_number_literal] = ACTIONS(986), - [anon_sym_L_SQUOTE] = ACTIONS(986), - [anon_sym_u_SQUOTE] = ACTIONS(986), - [anon_sym_U_SQUOTE] = ACTIONS(986), - [anon_sym_u8_SQUOTE] = ACTIONS(986), - [anon_sym_SQUOTE] = ACTIONS(986), - [anon_sym_L_DQUOTE] = ACTIONS(986), - [anon_sym_u_DQUOTE] = ACTIONS(986), - [anon_sym_U_DQUOTE] = ACTIONS(986), - [anon_sym_u8_DQUOTE] = ACTIONS(986), - [anon_sym_DQUOTE] = ACTIONS(986), - [sym_true] = ACTIONS(984), - [sym_false] = ACTIONS(984), - [sym_null] = ACTIONS(984), - [sym_comment] = ACTIONS(3), - }, - [290] = { - [sym_identifier] = ACTIONS(1008), - [aux_sym_preproc_include_token1] = ACTIONS(1008), - [aux_sym_preproc_def_token1] = ACTIONS(1008), - [aux_sym_preproc_if_token1] = ACTIONS(1008), - [aux_sym_preproc_if_token2] = ACTIONS(1008), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1008), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1008), - [sym_preproc_directive] = ACTIONS(1008), - [anon_sym_LPAREN2] = ACTIONS(1010), - [anon_sym_BANG] = ACTIONS(1010), - [anon_sym_TILDE] = ACTIONS(1010), - [anon_sym_DASH] = ACTIONS(1008), - [anon_sym_PLUS] = ACTIONS(1008), - [anon_sym_STAR] = ACTIONS(1010), - [anon_sym_AMP] = ACTIONS(1010), - [anon_sym_SEMI] = ACTIONS(1010), - [anon_sym_typedef] = ACTIONS(1008), - [anon_sym_extern] = ACTIONS(1008), - [anon_sym___attribute__] = ACTIONS(1008), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1010), - [anon_sym___declspec] = ACTIONS(1008), - [anon_sym___cdecl] = ACTIONS(1008), - [anon_sym___clrcall] = ACTIONS(1008), - [anon_sym___stdcall] = ACTIONS(1008), - [anon_sym___fastcall] = ACTIONS(1008), - [anon_sym___thiscall] = ACTIONS(1008), - [anon_sym___vectorcall] = ACTIONS(1008), - [anon_sym_LBRACE] = ACTIONS(1010), - [anon_sym_static] = ACTIONS(1008), - [anon_sym_auto] = ACTIONS(1008), - [anon_sym_register] = ACTIONS(1008), - [anon_sym_inline] = ACTIONS(1008), - [anon_sym_const] = ACTIONS(1008), - [anon_sym_volatile] = ACTIONS(1008), - [anon_sym_restrict] = ACTIONS(1008), - [anon_sym__Atomic] = ACTIONS(1008), - [anon_sym_signed] = ACTIONS(1008), - [anon_sym_unsigned] = ACTIONS(1008), - [anon_sym_long] = ACTIONS(1008), - [anon_sym_short] = ACTIONS(1008), - [sym_primitive_type] = ACTIONS(1008), - [anon_sym_enum] = ACTIONS(1008), - [anon_sym_struct] = ACTIONS(1008), - [anon_sym_union] = ACTIONS(1008), - [anon_sym_if] = ACTIONS(1008), - [anon_sym_else] = ACTIONS(1008), - [anon_sym_switch] = ACTIONS(1008), - [anon_sym_case] = ACTIONS(1008), - [anon_sym_default] = ACTIONS(1008), - [anon_sym_while] = ACTIONS(1008), - [anon_sym_do] = ACTIONS(1008), - [anon_sym_for] = ACTIONS(1008), - [anon_sym_return] = ACTIONS(1008), - [anon_sym_break] = ACTIONS(1008), - [anon_sym_continue] = ACTIONS(1008), - [anon_sym_goto] = ACTIONS(1008), - [anon_sym_DASH_DASH] = ACTIONS(1010), - [anon_sym_PLUS_PLUS] = ACTIONS(1010), - [anon_sym_sizeof] = ACTIONS(1008), - [sym_number_literal] = ACTIONS(1010), - [anon_sym_L_SQUOTE] = ACTIONS(1010), - [anon_sym_u_SQUOTE] = ACTIONS(1010), - [anon_sym_U_SQUOTE] = ACTIONS(1010), - [anon_sym_u8_SQUOTE] = ACTIONS(1010), - [anon_sym_SQUOTE] = ACTIONS(1010), - [anon_sym_L_DQUOTE] = ACTIONS(1010), - [anon_sym_u_DQUOTE] = ACTIONS(1010), - [anon_sym_U_DQUOTE] = ACTIONS(1010), - [anon_sym_u8_DQUOTE] = ACTIONS(1010), - [anon_sym_DQUOTE] = ACTIONS(1010), - [sym_true] = ACTIONS(1008), - [sym_false] = ACTIONS(1008), - [sym_null] = ACTIONS(1008), - [sym_comment] = ACTIONS(3), - }, - [291] = { - [sym_identifier] = ACTIONS(944), - [aux_sym_preproc_include_token1] = ACTIONS(944), - [aux_sym_preproc_def_token1] = ACTIONS(944), - [aux_sym_preproc_if_token1] = ACTIONS(944), - [aux_sym_preproc_ifdef_token1] = ACTIONS(944), - [aux_sym_preproc_ifdef_token2] = ACTIONS(944), - [sym_preproc_directive] = ACTIONS(944), - [anon_sym_LPAREN2] = ACTIONS(946), - [anon_sym_BANG] = ACTIONS(946), - [anon_sym_TILDE] = ACTIONS(946), - [anon_sym_DASH] = ACTIONS(944), - [anon_sym_PLUS] = ACTIONS(944), - [anon_sym_STAR] = ACTIONS(946), - [anon_sym_AMP] = ACTIONS(946), - [anon_sym_SEMI] = ACTIONS(946), - [anon_sym_typedef] = ACTIONS(944), - [anon_sym_extern] = ACTIONS(944), - [anon_sym___attribute__] = ACTIONS(944), - [anon_sym_LBRACK_LBRACK] = ACTIONS(946), - [anon_sym___declspec] = ACTIONS(944), - [anon_sym___cdecl] = ACTIONS(944), - [anon_sym___clrcall] = ACTIONS(944), - [anon_sym___stdcall] = ACTIONS(944), - [anon_sym___fastcall] = ACTIONS(944), - [anon_sym___thiscall] = ACTIONS(944), - [anon_sym___vectorcall] = ACTIONS(944), - [anon_sym_LBRACE] = ACTIONS(946), - [anon_sym_RBRACE] = ACTIONS(946), - [anon_sym_static] = ACTIONS(944), - [anon_sym_auto] = ACTIONS(944), - [anon_sym_register] = ACTIONS(944), - [anon_sym_inline] = ACTIONS(944), - [anon_sym_const] = ACTIONS(944), - [anon_sym_volatile] = ACTIONS(944), - [anon_sym_restrict] = ACTIONS(944), - [anon_sym__Atomic] = ACTIONS(944), - [anon_sym_signed] = ACTIONS(944), - [anon_sym_unsigned] = ACTIONS(944), - [anon_sym_long] = ACTIONS(944), - [anon_sym_short] = ACTIONS(944), - [sym_primitive_type] = ACTIONS(944), - [anon_sym_enum] = ACTIONS(944), - [anon_sym_struct] = ACTIONS(944), - [anon_sym_union] = ACTIONS(944), - [anon_sym_if] = ACTIONS(944), - [anon_sym_else] = ACTIONS(944), - [anon_sym_switch] = ACTIONS(944), - [anon_sym_case] = ACTIONS(944), - [anon_sym_default] = ACTIONS(944), - [anon_sym_while] = ACTIONS(944), - [anon_sym_do] = ACTIONS(944), - [anon_sym_for] = ACTIONS(944), - [anon_sym_return] = ACTIONS(944), - [anon_sym_break] = ACTIONS(944), - [anon_sym_continue] = ACTIONS(944), - [anon_sym_goto] = ACTIONS(944), - [anon_sym_DASH_DASH] = ACTIONS(946), - [anon_sym_PLUS_PLUS] = ACTIONS(946), - [anon_sym_sizeof] = ACTIONS(944), - [sym_number_literal] = ACTIONS(946), - [anon_sym_L_SQUOTE] = ACTIONS(946), - [anon_sym_u_SQUOTE] = ACTIONS(946), - [anon_sym_U_SQUOTE] = ACTIONS(946), - [anon_sym_u8_SQUOTE] = ACTIONS(946), - [anon_sym_SQUOTE] = ACTIONS(946), - [anon_sym_L_DQUOTE] = ACTIONS(946), - [anon_sym_u_DQUOTE] = ACTIONS(946), - [anon_sym_U_DQUOTE] = ACTIONS(946), - [anon_sym_u8_DQUOTE] = ACTIONS(946), - [anon_sym_DQUOTE] = ACTIONS(946), - [sym_true] = ACTIONS(944), - [sym_false] = ACTIONS(944), - [sym_null] = ACTIONS(944), - [sym_comment] = ACTIONS(3), - }, - [292] = { - [sym_attribute_declaration] = STATE(292), - [sym_compound_statement] = STATE(291), - [sym_attributed_statement] = STATE(291), - [sym_labeled_statement] = STATE(291), - [sym_expression_statement] = STATE(291), - [sym_if_statement] = STATE(291), - [sym_switch_statement] = STATE(291), - [sym_case_statement] = STATE(291), - [sym_while_statement] = STATE(291), - [sym_do_statement] = STATE(291), - [sym_for_statement] = STATE(291), - [sym_return_statement] = STATE(291), - [sym_break_statement] = STATE(291), - [sym_continue_statement] = STATE(291), - [sym_goto_statement] = STATE(291), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(292), - [sym_identifier] = ACTIONS(1297), - [anon_sym_LPAREN2] = ACTIONS(1135), - [anon_sym_BANG] = ACTIONS(1138), - [anon_sym_TILDE] = ACTIONS(1138), - [anon_sym_DASH] = ACTIONS(1141), - [anon_sym_PLUS] = ACTIONS(1141), - [anon_sym_STAR] = ACTIONS(1144), - [anon_sym_AMP] = ACTIONS(1144), - [anon_sym_SEMI] = ACTIONS(1300), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1150), - [anon_sym_LBRACE] = ACTIONS(1303), - [anon_sym_if] = ACTIONS(1306), - [anon_sym_switch] = ACTIONS(1309), - [anon_sym_case] = ACTIONS(1312), - [anon_sym_default] = ACTIONS(1315), - [anon_sym_while] = ACTIONS(1318), - [anon_sym_do] = ACTIONS(1321), - [anon_sym_for] = ACTIONS(1324), - [anon_sym_return] = ACTIONS(1327), - [anon_sym_break] = ACTIONS(1330), - [anon_sym_continue] = ACTIONS(1333), - [anon_sym_goto] = ACTIONS(1336), - [anon_sym_DASH_DASH] = ACTIONS(1189), - [anon_sym_PLUS_PLUS] = ACTIONS(1189), - [anon_sym_sizeof] = ACTIONS(1192), - [sym_number_literal] = ACTIONS(1195), - [anon_sym_L_SQUOTE] = ACTIONS(1198), - [anon_sym_u_SQUOTE] = ACTIONS(1198), - [anon_sym_U_SQUOTE] = ACTIONS(1198), - [anon_sym_u8_SQUOTE] = ACTIONS(1198), - [anon_sym_SQUOTE] = ACTIONS(1198), - [anon_sym_L_DQUOTE] = ACTIONS(1201), - [anon_sym_u_DQUOTE] = ACTIONS(1201), - [anon_sym_U_DQUOTE] = ACTIONS(1201), - [anon_sym_u8_DQUOTE] = ACTIONS(1201), - [anon_sym_DQUOTE] = ACTIONS(1201), - [sym_true] = ACTIONS(1204), - [sym_false] = ACTIONS(1204), - [sym_null] = ACTIONS(1204), - [sym_comment] = ACTIONS(3), - }, - [293] = { - [sym_identifier] = ACTIONS(890), - [aux_sym_preproc_include_token1] = ACTIONS(890), - [aux_sym_preproc_def_token1] = ACTIONS(890), - [aux_sym_preproc_if_token1] = ACTIONS(890), - [aux_sym_preproc_ifdef_token1] = ACTIONS(890), - [aux_sym_preproc_ifdef_token2] = ACTIONS(890), - [sym_preproc_directive] = ACTIONS(890), - [anon_sym_LPAREN2] = ACTIONS(892), - [anon_sym_BANG] = ACTIONS(892), - [anon_sym_TILDE] = ACTIONS(892), - [anon_sym_DASH] = ACTIONS(890), - [anon_sym_PLUS] = ACTIONS(890), - [anon_sym_STAR] = ACTIONS(892), - [anon_sym_AMP] = ACTIONS(892), - [anon_sym_SEMI] = ACTIONS(892), - [anon_sym_typedef] = ACTIONS(890), - [anon_sym_extern] = ACTIONS(890), - [anon_sym___attribute__] = ACTIONS(890), - [anon_sym_LBRACK_LBRACK] = ACTIONS(892), - [anon_sym___declspec] = ACTIONS(890), - [anon_sym___cdecl] = ACTIONS(890), - [anon_sym___clrcall] = ACTIONS(890), - [anon_sym___stdcall] = ACTIONS(890), - [anon_sym___fastcall] = ACTIONS(890), - [anon_sym___thiscall] = ACTIONS(890), - [anon_sym___vectorcall] = ACTIONS(890), - [anon_sym_LBRACE] = ACTIONS(892), - [anon_sym_RBRACE] = ACTIONS(892), - [anon_sym_static] = ACTIONS(890), - [anon_sym_auto] = ACTIONS(890), - [anon_sym_register] = ACTIONS(890), - [anon_sym_inline] = ACTIONS(890), - [anon_sym_const] = ACTIONS(890), - [anon_sym_volatile] = ACTIONS(890), - [anon_sym_restrict] = ACTIONS(890), - [anon_sym__Atomic] = ACTIONS(890), - [anon_sym_signed] = ACTIONS(890), - [anon_sym_unsigned] = ACTIONS(890), - [anon_sym_long] = ACTIONS(890), - [anon_sym_short] = ACTIONS(890), - [sym_primitive_type] = ACTIONS(890), - [anon_sym_enum] = ACTIONS(890), - [anon_sym_struct] = ACTIONS(890), - [anon_sym_union] = ACTIONS(890), - [anon_sym_if] = ACTIONS(890), - [anon_sym_else] = ACTIONS(890), - [anon_sym_switch] = ACTIONS(890), - [anon_sym_case] = ACTIONS(890), - [anon_sym_default] = ACTIONS(890), - [anon_sym_while] = ACTIONS(890), - [anon_sym_do] = ACTIONS(890), - [anon_sym_for] = ACTIONS(890), - [anon_sym_return] = ACTIONS(890), - [anon_sym_break] = ACTIONS(890), - [anon_sym_continue] = ACTIONS(890), - [anon_sym_goto] = ACTIONS(890), - [anon_sym_DASH_DASH] = ACTIONS(892), - [anon_sym_PLUS_PLUS] = ACTIONS(892), - [anon_sym_sizeof] = ACTIONS(890), - [sym_number_literal] = ACTIONS(892), - [anon_sym_L_SQUOTE] = ACTIONS(892), - [anon_sym_u_SQUOTE] = ACTIONS(892), - [anon_sym_U_SQUOTE] = ACTIONS(892), - [anon_sym_u8_SQUOTE] = ACTIONS(892), - [anon_sym_SQUOTE] = ACTIONS(892), - [anon_sym_L_DQUOTE] = ACTIONS(892), - [anon_sym_u_DQUOTE] = ACTIONS(892), - [anon_sym_U_DQUOTE] = ACTIONS(892), - [anon_sym_u8_DQUOTE] = ACTIONS(892), - [anon_sym_DQUOTE] = ACTIONS(892), - [sym_true] = ACTIONS(890), - [sym_false] = ACTIONS(890), - [sym_null] = ACTIONS(890), - [sym_comment] = ACTIONS(3), - }, - [294] = { - [sym_identifier] = ACTIONS(890), - [aux_sym_preproc_include_token1] = ACTIONS(890), - [aux_sym_preproc_def_token1] = ACTIONS(890), - [aux_sym_preproc_if_token1] = ACTIONS(890), - [aux_sym_preproc_ifdef_token1] = ACTIONS(890), - [aux_sym_preproc_ifdef_token2] = ACTIONS(890), - [sym_preproc_directive] = ACTIONS(890), - [anon_sym_LPAREN2] = ACTIONS(892), - [anon_sym_BANG] = ACTIONS(892), - [anon_sym_TILDE] = ACTIONS(892), - [anon_sym_DASH] = ACTIONS(890), - [anon_sym_PLUS] = ACTIONS(890), - [anon_sym_STAR] = ACTIONS(892), - [anon_sym_AMP] = ACTIONS(892), - [anon_sym_SEMI] = ACTIONS(892), - [anon_sym_typedef] = ACTIONS(890), - [anon_sym_extern] = ACTIONS(890), - [anon_sym___attribute__] = ACTIONS(890), - [anon_sym_LBRACK_LBRACK] = ACTIONS(892), - [anon_sym___declspec] = ACTIONS(890), - [anon_sym___cdecl] = ACTIONS(890), - [anon_sym___clrcall] = ACTIONS(890), - [anon_sym___stdcall] = ACTIONS(890), - [anon_sym___fastcall] = ACTIONS(890), - [anon_sym___thiscall] = ACTIONS(890), - [anon_sym___vectorcall] = ACTIONS(890), - [anon_sym_LBRACE] = ACTIONS(892), - [anon_sym_RBRACE] = ACTIONS(892), - [anon_sym_static] = ACTIONS(890), - [anon_sym_auto] = ACTIONS(890), - [anon_sym_register] = ACTIONS(890), - [anon_sym_inline] = ACTIONS(890), - [anon_sym_const] = ACTIONS(890), - [anon_sym_volatile] = ACTIONS(890), - [anon_sym_restrict] = ACTIONS(890), - [anon_sym__Atomic] = ACTIONS(890), - [anon_sym_signed] = ACTIONS(890), - [anon_sym_unsigned] = ACTIONS(890), - [anon_sym_long] = ACTIONS(890), - [anon_sym_short] = ACTIONS(890), - [sym_primitive_type] = ACTIONS(890), - [anon_sym_enum] = ACTIONS(890), - [anon_sym_struct] = ACTIONS(890), - [anon_sym_union] = ACTIONS(890), - [anon_sym_if] = ACTIONS(890), - [anon_sym_else] = ACTIONS(890), - [anon_sym_switch] = ACTIONS(890), - [anon_sym_case] = ACTIONS(890), - [anon_sym_default] = ACTIONS(890), - [anon_sym_while] = ACTIONS(890), - [anon_sym_do] = ACTIONS(890), - [anon_sym_for] = ACTIONS(890), - [anon_sym_return] = ACTIONS(890), - [anon_sym_break] = ACTIONS(890), - [anon_sym_continue] = ACTIONS(890), - [anon_sym_goto] = ACTIONS(890), - [anon_sym_DASH_DASH] = ACTIONS(892), - [anon_sym_PLUS_PLUS] = ACTIONS(892), - [anon_sym_sizeof] = ACTIONS(890), - [sym_number_literal] = ACTIONS(892), - [anon_sym_L_SQUOTE] = ACTIONS(892), - [anon_sym_u_SQUOTE] = ACTIONS(892), - [anon_sym_U_SQUOTE] = ACTIONS(892), - [anon_sym_u8_SQUOTE] = ACTIONS(892), - [anon_sym_SQUOTE] = ACTIONS(892), - [anon_sym_L_DQUOTE] = ACTIONS(892), - [anon_sym_u_DQUOTE] = ACTIONS(892), - [anon_sym_U_DQUOTE] = ACTIONS(892), - [anon_sym_u8_DQUOTE] = ACTIONS(892), - [anon_sym_DQUOTE] = ACTIONS(892), - [sym_true] = ACTIONS(890), - [sym_false] = ACTIONS(890), - [sym_null] = ACTIONS(890), - [sym_comment] = ACTIONS(3), - }, - [295] = { - [sym_identifier] = ACTIONS(920), - [aux_sym_preproc_include_token1] = ACTIONS(920), - [aux_sym_preproc_def_token1] = ACTIONS(920), - [aux_sym_preproc_if_token1] = ACTIONS(920), - [aux_sym_preproc_ifdef_token1] = ACTIONS(920), - [aux_sym_preproc_ifdef_token2] = ACTIONS(920), - [sym_preproc_directive] = ACTIONS(920), - [anon_sym_LPAREN2] = ACTIONS(922), - [anon_sym_BANG] = ACTIONS(922), - [anon_sym_TILDE] = ACTIONS(922), - [anon_sym_DASH] = ACTIONS(920), - [anon_sym_PLUS] = ACTIONS(920), - [anon_sym_STAR] = ACTIONS(922), - [anon_sym_AMP] = ACTIONS(922), - [anon_sym_SEMI] = ACTIONS(922), - [anon_sym_typedef] = ACTIONS(920), - [anon_sym_extern] = ACTIONS(920), - [anon_sym___attribute__] = ACTIONS(920), - [anon_sym_LBRACK_LBRACK] = ACTIONS(922), - [anon_sym___declspec] = ACTIONS(920), - [anon_sym___cdecl] = ACTIONS(920), - [anon_sym___clrcall] = ACTIONS(920), - [anon_sym___stdcall] = ACTIONS(920), - [anon_sym___fastcall] = ACTIONS(920), - [anon_sym___thiscall] = ACTIONS(920), - [anon_sym___vectorcall] = ACTIONS(920), - [anon_sym_LBRACE] = ACTIONS(922), - [anon_sym_RBRACE] = ACTIONS(922), - [anon_sym_static] = ACTIONS(920), - [anon_sym_auto] = ACTIONS(920), - [anon_sym_register] = ACTIONS(920), - [anon_sym_inline] = ACTIONS(920), - [anon_sym_const] = ACTIONS(920), - [anon_sym_volatile] = ACTIONS(920), - [anon_sym_restrict] = ACTIONS(920), - [anon_sym__Atomic] = ACTIONS(920), - [anon_sym_signed] = ACTIONS(920), - [anon_sym_unsigned] = ACTIONS(920), - [anon_sym_long] = ACTIONS(920), - [anon_sym_short] = ACTIONS(920), - [sym_primitive_type] = ACTIONS(920), - [anon_sym_enum] = ACTIONS(920), - [anon_sym_struct] = ACTIONS(920), - [anon_sym_union] = ACTIONS(920), - [anon_sym_if] = ACTIONS(920), - [anon_sym_else] = ACTIONS(920), - [anon_sym_switch] = ACTIONS(920), - [anon_sym_case] = ACTIONS(920), - [anon_sym_default] = ACTIONS(920), - [anon_sym_while] = ACTIONS(920), - [anon_sym_do] = ACTIONS(920), - [anon_sym_for] = ACTIONS(920), - [anon_sym_return] = ACTIONS(920), - [anon_sym_break] = ACTIONS(920), - [anon_sym_continue] = ACTIONS(920), - [anon_sym_goto] = ACTIONS(920), - [anon_sym_DASH_DASH] = ACTIONS(922), - [anon_sym_PLUS_PLUS] = ACTIONS(922), - [anon_sym_sizeof] = ACTIONS(920), - [sym_number_literal] = ACTIONS(922), - [anon_sym_L_SQUOTE] = ACTIONS(922), - [anon_sym_u_SQUOTE] = ACTIONS(922), - [anon_sym_U_SQUOTE] = ACTIONS(922), - [anon_sym_u8_SQUOTE] = ACTIONS(922), - [anon_sym_SQUOTE] = ACTIONS(922), - [anon_sym_L_DQUOTE] = ACTIONS(922), - [anon_sym_u_DQUOTE] = ACTIONS(922), - [anon_sym_U_DQUOTE] = ACTIONS(922), - [anon_sym_u8_DQUOTE] = ACTIONS(922), - [anon_sym_DQUOTE] = ACTIONS(922), - [sym_true] = ACTIONS(920), - [sym_false] = ACTIONS(920), - [sym_null] = ACTIONS(920), - [sym_comment] = ACTIONS(3), - }, - [296] = { - [sym_identifier] = ACTIONS(988), - [aux_sym_preproc_include_token1] = ACTIONS(988), - [aux_sym_preproc_def_token1] = ACTIONS(988), - [aux_sym_preproc_if_token1] = ACTIONS(988), - [aux_sym_preproc_if_token2] = ACTIONS(988), - [aux_sym_preproc_ifdef_token1] = ACTIONS(988), - [aux_sym_preproc_ifdef_token2] = ACTIONS(988), - [sym_preproc_directive] = ACTIONS(988), - [anon_sym_LPAREN2] = ACTIONS(990), - [anon_sym_BANG] = ACTIONS(990), - [anon_sym_TILDE] = ACTIONS(990), - [anon_sym_DASH] = ACTIONS(988), - [anon_sym_PLUS] = ACTIONS(988), - [anon_sym_STAR] = ACTIONS(990), - [anon_sym_AMP] = ACTIONS(990), - [anon_sym_SEMI] = ACTIONS(990), - [anon_sym_typedef] = ACTIONS(988), - [anon_sym_extern] = ACTIONS(988), - [anon_sym___attribute__] = ACTIONS(988), - [anon_sym_LBRACK_LBRACK] = ACTIONS(990), - [anon_sym___declspec] = ACTIONS(988), - [anon_sym___cdecl] = ACTIONS(988), - [anon_sym___clrcall] = ACTIONS(988), - [anon_sym___stdcall] = ACTIONS(988), - [anon_sym___fastcall] = ACTIONS(988), - [anon_sym___thiscall] = ACTIONS(988), - [anon_sym___vectorcall] = ACTIONS(988), - [anon_sym_LBRACE] = ACTIONS(990), - [anon_sym_static] = ACTIONS(988), - [anon_sym_auto] = ACTIONS(988), - [anon_sym_register] = ACTIONS(988), - [anon_sym_inline] = ACTIONS(988), - [anon_sym_const] = ACTIONS(988), - [anon_sym_volatile] = ACTIONS(988), - [anon_sym_restrict] = ACTIONS(988), - [anon_sym__Atomic] = ACTIONS(988), - [anon_sym_signed] = ACTIONS(988), - [anon_sym_unsigned] = ACTIONS(988), - [anon_sym_long] = ACTIONS(988), - [anon_sym_short] = ACTIONS(988), - [sym_primitive_type] = ACTIONS(988), - [anon_sym_enum] = ACTIONS(988), - [anon_sym_struct] = ACTIONS(988), - [anon_sym_union] = ACTIONS(988), - [anon_sym_if] = ACTIONS(988), - [anon_sym_else] = ACTIONS(988), - [anon_sym_switch] = ACTIONS(988), - [anon_sym_case] = ACTIONS(988), - [anon_sym_default] = ACTIONS(988), - [anon_sym_while] = ACTIONS(988), - [anon_sym_do] = ACTIONS(988), - [anon_sym_for] = ACTIONS(988), - [anon_sym_return] = ACTIONS(988), - [anon_sym_break] = ACTIONS(988), - [anon_sym_continue] = ACTIONS(988), - [anon_sym_goto] = ACTIONS(988), - [anon_sym_DASH_DASH] = ACTIONS(990), - [anon_sym_PLUS_PLUS] = ACTIONS(990), - [anon_sym_sizeof] = ACTIONS(988), - [sym_number_literal] = ACTIONS(990), - [anon_sym_L_SQUOTE] = ACTIONS(990), - [anon_sym_u_SQUOTE] = ACTIONS(990), - [anon_sym_U_SQUOTE] = ACTIONS(990), - [anon_sym_u8_SQUOTE] = ACTIONS(990), - [anon_sym_SQUOTE] = ACTIONS(990), - [anon_sym_L_DQUOTE] = ACTIONS(990), - [anon_sym_u_DQUOTE] = ACTIONS(990), - [anon_sym_U_DQUOTE] = ACTIONS(990), - [anon_sym_u8_DQUOTE] = ACTIONS(990), - [anon_sym_DQUOTE] = ACTIONS(990), - [sym_true] = ACTIONS(988), - [sym_false] = ACTIONS(988), - [sym_null] = ACTIONS(988), - [sym_comment] = ACTIONS(3), - }, - [297] = { - [sym_identifier] = ACTIONS(914), - [aux_sym_preproc_include_token1] = ACTIONS(914), - [aux_sym_preproc_def_token1] = ACTIONS(914), - [aux_sym_preproc_if_token1] = ACTIONS(914), - [aux_sym_preproc_ifdef_token1] = ACTIONS(914), - [aux_sym_preproc_ifdef_token2] = ACTIONS(914), - [sym_preproc_directive] = ACTIONS(914), - [anon_sym_LPAREN2] = ACTIONS(916), - [anon_sym_BANG] = ACTIONS(916), - [anon_sym_TILDE] = ACTIONS(916), - [anon_sym_DASH] = ACTIONS(914), - [anon_sym_PLUS] = ACTIONS(914), - [anon_sym_STAR] = ACTIONS(916), - [anon_sym_AMP] = ACTIONS(916), - [anon_sym_SEMI] = ACTIONS(916), - [anon_sym_typedef] = ACTIONS(914), - [anon_sym_extern] = ACTIONS(914), - [anon_sym___attribute__] = ACTIONS(914), - [anon_sym_LBRACK_LBRACK] = ACTIONS(916), - [anon_sym___declspec] = ACTIONS(914), - [anon_sym___cdecl] = ACTIONS(914), - [anon_sym___clrcall] = ACTIONS(914), - [anon_sym___stdcall] = ACTIONS(914), - [anon_sym___fastcall] = ACTIONS(914), - [anon_sym___thiscall] = ACTIONS(914), - [anon_sym___vectorcall] = ACTIONS(914), - [anon_sym_LBRACE] = ACTIONS(916), - [anon_sym_RBRACE] = ACTIONS(916), - [anon_sym_static] = ACTIONS(914), - [anon_sym_auto] = ACTIONS(914), - [anon_sym_register] = ACTIONS(914), - [anon_sym_inline] = ACTIONS(914), - [anon_sym_const] = ACTIONS(914), - [anon_sym_volatile] = ACTIONS(914), - [anon_sym_restrict] = ACTIONS(914), - [anon_sym__Atomic] = ACTIONS(914), - [anon_sym_signed] = ACTIONS(914), - [anon_sym_unsigned] = ACTIONS(914), - [anon_sym_long] = ACTIONS(914), - [anon_sym_short] = ACTIONS(914), - [sym_primitive_type] = ACTIONS(914), - [anon_sym_enum] = ACTIONS(914), - [anon_sym_struct] = ACTIONS(914), - [anon_sym_union] = ACTIONS(914), - [anon_sym_if] = ACTIONS(914), - [anon_sym_else] = ACTIONS(1339), - [anon_sym_switch] = ACTIONS(914), - [anon_sym_case] = ACTIONS(914), - [anon_sym_default] = ACTIONS(914), - [anon_sym_while] = ACTIONS(914), - [anon_sym_do] = ACTIONS(914), - [anon_sym_for] = ACTIONS(914), - [anon_sym_return] = ACTIONS(914), - [anon_sym_break] = ACTIONS(914), - [anon_sym_continue] = ACTIONS(914), - [anon_sym_goto] = ACTIONS(914), - [anon_sym_DASH_DASH] = ACTIONS(916), - [anon_sym_PLUS_PLUS] = ACTIONS(916), - [anon_sym_sizeof] = ACTIONS(914), - [sym_number_literal] = ACTIONS(916), - [anon_sym_L_SQUOTE] = ACTIONS(916), - [anon_sym_u_SQUOTE] = ACTIONS(916), - [anon_sym_U_SQUOTE] = ACTIONS(916), - [anon_sym_u8_SQUOTE] = ACTIONS(916), - [anon_sym_SQUOTE] = ACTIONS(916), - [anon_sym_L_DQUOTE] = ACTIONS(916), - [anon_sym_u_DQUOTE] = ACTIONS(916), - [anon_sym_U_DQUOTE] = ACTIONS(916), - [anon_sym_u8_DQUOTE] = ACTIONS(916), - [anon_sym_DQUOTE] = ACTIONS(916), - [sym_true] = ACTIONS(914), - [sym_false] = ACTIONS(914), - [sym_null] = ACTIONS(914), - [sym_comment] = ACTIONS(3), - }, - [298] = { - [sym_identifier] = ACTIONS(992), - [aux_sym_preproc_include_token1] = ACTIONS(992), - [aux_sym_preproc_def_token1] = ACTIONS(992), - [aux_sym_preproc_if_token1] = ACTIONS(992), - [aux_sym_preproc_if_token2] = ACTIONS(992), - [aux_sym_preproc_ifdef_token1] = ACTIONS(992), - [aux_sym_preproc_ifdef_token2] = ACTIONS(992), - [sym_preproc_directive] = ACTIONS(992), - [anon_sym_LPAREN2] = ACTIONS(994), - [anon_sym_BANG] = ACTIONS(994), - [anon_sym_TILDE] = ACTIONS(994), - [anon_sym_DASH] = ACTIONS(992), - [anon_sym_PLUS] = ACTIONS(992), - [anon_sym_STAR] = ACTIONS(994), - [anon_sym_AMP] = ACTIONS(994), - [anon_sym_SEMI] = ACTIONS(994), - [anon_sym_typedef] = ACTIONS(992), - [anon_sym_extern] = ACTIONS(992), - [anon_sym___attribute__] = ACTIONS(992), - [anon_sym_LBRACK_LBRACK] = ACTIONS(994), - [anon_sym___declspec] = ACTIONS(992), - [anon_sym___cdecl] = ACTIONS(992), - [anon_sym___clrcall] = ACTIONS(992), - [anon_sym___stdcall] = ACTIONS(992), - [anon_sym___fastcall] = ACTIONS(992), - [anon_sym___thiscall] = ACTIONS(992), - [anon_sym___vectorcall] = ACTIONS(992), - [anon_sym_LBRACE] = ACTIONS(994), - [anon_sym_static] = ACTIONS(992), - [anon_sym_auto] = ACTIONS(992), - [anon_sym_register] = ACTIONS(992), - [anon_sym_inline] = ACTIONS(992), - [anon_sym_const] = ACTIONS(992), - [anon_sym_volatile] = ACTIONS(992), - [anon_sym_restrict] = ACTIONS(992), - [anon_sym__Atomic] = ACTIONS(992), - [anon_sym_signed] = ACTIONS(992), - [anon_sym_unsigned] = ACTIONS(992), - [anon_sym_long] = ACTIONS(992), - [anon_sym_short] = ACTIONS(992), - [sym_primitive_type] = ACTIONS(992), - [anon_sym_enum] = ACTIONS(992), - [anon_sym_struct] = ACTIONS(992), - [anon_sym_union] = ACTIONS(992), - [anon_sym_if] = ACTIONS(992), - [anon_sym_else] = ACTIONS(992), - [anon_sym_switch] = ACTIONS(992), - [anon_sym_case] = ACTIONS(992), - [anon_sym_default] = ACTIONS(992), - [anon_sym_while] = ACTIONS(992), - [anon_sym_do] = ACTIONS(992), - [anon_sym_for] = ACTIONS(992), - [anon_sym_return] = ACTIONS(992), - [anon_sym_break] = ACTIONS(992), - [anon_sym_continue] = ACTIONS(992), - [anon_sym_goto] = ACTIONS(992), - [anon_sym_DASH_DASH] = ACTIONS(994), - [anon_sym_PLUS_PLUS] = ACTIONS(994), - [anon_sym_sizeof] = ACTIONS(992), - [sym_number_literal] = ACTIONS(994), - [anon_sym_L_SQUOTE] = ACTIONS(994), - [anon_sym_u_SQUOTE] = ACTIONS(994), - [anon_sym_U_SQUOTE] = ACTIONS(994), - [anon_sym_u8_SQUOTE] = ACTIONS(994), - [anon_sym_SQUOTE] = ACTIONS(994), - [anon_sym_L_DQUOTE] = ACTIONS(994), - [anon_sym_u_DQUOTE] = ACTIONS(994), - [anon_sym_U_DQUOTE] = ACTIONS(994), - [anon_sym_u8_DQUOTE] = ACTIONS(994), - [anon_sym_DQUOTE] = ACTIONS(994), - [sym_true] = ACTIONS(992), - [sym_false] = ACTIONS(992), - [sym_null] = ACTIONS(992), - [sym_comment] = ACTIONS(3), - }, - [299] = { - [sym_identifier] = ACTIONS(996), - [aux_sym_preproc_include_token1] = ACTIONS(996), - [aux_sym_preproc_def_token1] = ACTIONS(996), - [aux_sym_preproc_if_token1] = ACTIONS(996), - [aux_sym_preproc_if_token2] = ACTIONS(996), - [aux_sym_preproc_ifdef_token1] = ACTIONS(996), - [aux_sym_preproc_ifdef_token2] = ACTIONS(996), - [sym_preproc_directive] = ACTIONS(996), - [anon_sym_LPAREN2] = ACTIONS(998), - [anon_sym_BANG] = ACTIONS(998), - [anon_sym_TILDE] = ACTIONS(998), - [anon_sym_DASH] = ACTIONS(996), - [anon_sym_PLUS] = ACTIONS(996), - [anon_sym_STAR] = ACTIONS(998), - [anon_sym_AMP] = ACTIONS(998), - [anon_sym_SEMI] = ACTIONS(998), - [anon_sym_typedef] = ACTIONS(996), - [anon_sym_extern] = ACTIONS(996), - [anon_sym___attribute__] = ACTIONS(996), - [anon_sym_LBRACK_LBRACK] = ACTIONS(998), - [anon_sym___declspec] = ACTIONS(996), - [anon_sym___cdecl] = ACTIONS(996), - [anon_sym___clrcall] = ACTIONS(996), - [anon_sym___stdcall] = ACTIONS(996), - [anon_sym___fastcall] = ACTIONS(996), - [anon_sym___thiscall] = ACTIONS(996), - [anon_sym___vectorcall] = ACTIONS(996), - [anon_sym_LBRACE] = ACTIONS(998), - [anon_sym_static] = ACTIONS(996), - [anon_sym_auto] = ACTIONS(996), - [anon_sym_register] = ACTIONS(996), - [anon_sym_inline] = ACTIONS(996), - [anon_sym_const] = ACTIONS(996), - [anon_sym_volatile] = ACTIONS(996), - [anon_sym_restrict] = ACTIONS(996), - [anon_sym__Atomic] = ACTIONS(996), - [anon_sym_signed] = ACTIONS(996), - [anon_sym_unsigned] = ACTIONS(996), - [anon_sym_long] = ACTIONS(996), - [anon_sym_short] = ACTIONS(996), - [sym_primitive_type] = ACTIONS(996), - [anon_sym_enum] = ACTIONS(996), - [anon_sym_struct] = ACTIONS(996), - [anon_sym_union] = ACTIONS(996), - [anon_sym_if] = ACTIONS(996), - [anon_sym_else] = ACTIONS(996), - [anon_sym_switch] = ACTIONS(996), - [anon_sym_case] = ACTIONS(996), - [anon_sym_default] = ACTIONS(996), - [anon_sym_while] = ACTIONS(996), - [anon_sym_do] = ACTIONS(996), - [anon_sym_for] = ACTIONS(996), - [anon_sym_return] = ACTIONS(996), - [anon_sym_break] = ACTIONS(996), - [anon_sym_continue] = ACTIONS(996), - [anon_sym_goto] = ACTIONS(996), - [anon_sym_DASH_DASH] = ACTIONS(998), - [anon_sym_PLUS_PLUS] = ACTIONS(998), - [anon_sym_sizeof] = ACTIONS(996), - [sym_number_literal] = ACTIONS(998), - [anon_sym_L_SQUOTE] = ACTIONS(998), - [anon_sym_u_SQUOTE] = ACTIONS(998), - [anon_sym_U_SQUOTE] = ACTIONS(998), - [anon_sym_u8_SQUOTE] = ACTIONS(998), - [anon_sym_SQUOTE] = ACTIONS(998), - [anon_sym_L_DQUOTE] = ACTIONS(998), - [anon_sym_u_DQUOTE] = ACTIONS(998), - [anon_sym_U_DQUOTE] = ACTIONS(998), - [anon_sym_u8_DQUOTE] = ACTIONS(998), - [anon_sym_DQUOTE] = ACTIONS(998), - [sym_true] = ACTIONS(996), - [sym_false] = ACTIONS(996), - [sym_null] = ACTIONS(996), - [sym_comment] = ACTIONS(3), - }, - [300] = { - [sym_attribute_declaration] = STATE(242), - [sym_compound_statement] = STATE(281), - [sym_attributed_statement] = STATE(281), - [sym_labeled_statement] = STATE(281), - [sym_expression_statement] = STATE(281), - [sym_if_statement] = STATE(281), - [sym_switch_statement] = STATE(281), - [sym_case_statement] = STATE(281), - [sym_while_statement] = STATE(281), - [sym_do_statement] = STATE(281), - [sym_for_statement] = STATE(281), - [sym_return_statement] = STATE(281), - [sym_break_statement] = STATE(281), - [sym_continue_statement] = STATE(281), - [sym_goto_statement] = STATE(281), - [sym__expression] = STATE(709), - [sym_comma_expression] = STATE(1337), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(242), - [sym_identifier] = ACTIONS(1124), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(313), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(319), - [anon_sym_if] = ACTIONS(323), - [anon_sym_switch] = ACTIONS(325), - [anon_sym_case] = ACTIONS(327), - [anon_sym_default] = ACTIONS(329), - [anon_sym_while] = ACTIONS(331), - [anon_sym_do] = ACTIONS(333), - [anon_sym_for] = ACTIONS(335), - [anon_sym_return] = ACTIONS(337), - [anon_sym_break] = ACTIONS(339), - [anon_sym_continue] = ACTIONS(341), - [anon_sym_goto] = ACTIONS(343), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [301] = { - [sym_identifier] = ACTIONS(906), - [aux_sym_preproc_include_token1] = ACTIONS(906), - [aux_sym_preproc_def_token1] = ACTIONS(906), - [aux_sym_preproc_if_token1] = ACTIONS(906), - [aux_sym_preproc_ifdef_token1] = ACTIONS(906), - [aux_sym_preproc_ifdef_token2] = ACTIONS(906), - [sym_preproc_directive] = ACTIONS(906), - [anon_sym_LPAREN2] = ACTIONS(908), - [anon_sym_BANG] = ACTIONS(908), - [anon_sym_TILDE] = ACTIONS(908), - [anon_sym_DASH] = ACTIONS(906), - [anon_sym_PLUS] = ACTIONS(906), - [anon_sym_STAR] = ACTIONS(908), - [anon_sym_AMP] = ACTIONS(908), - [anon_sym_SEMI] = ACTIONS(908), - [anon_sym_typedef] = ACTIONS(906), - [anon_sym_extern] = ACTIONS(906), - [anon_sym___attribute__] = ACTIONS(906), - [anon_sym_LBRACK_LBRACK] = ACTIONS(908), - [anon_sym___declspec] = ACTIONS(906), - [anon_sym___cdecl] = ACTIONS(906), - [anon_sym___clrcall] = ACTIONS(906), - [anon_sym___stdcall] = ACTIONS(906), - [anon_sym___fastcall] = ACTIONS(906), - [anon_sym___thiscall] = ACTIONS(906), - [anon_sym___vectorcall] = ACTIONS(906), - [anon_sym_LBRACE] = ACTIONS(908), - [anon_sym_RBRACE] = ACTIONS(908), - [anon_sym_static] = ACTIONS(906), - [anon_sym_auto] = ACTIONS(906), - [anon_sym_register] = ACTIONS(906), - [anon_sym_inline] = ACTIONS(906), - [anon_sym_const] = ACTIONS(906), - [anon_sym_volatile] = ACTIONS(906), - [anon_sym_restrict] = ACTIONS(906), - [anon_sym__Atomic] = ACTIONS(906), - [anon_sym_signed] = ACTIONS(906), - [anon_sym_unsigned] = ACTIONS(906), - [anon_sym_long] = ACTIONS(906), - [anon_sym_short] = ACTIONS(906), - [sym_primitive_type] = ACTIONS(906), - [anon_sym_enum] = ACTIONS(906), - [anon_sym_struct] = ACTIONS(906), - [anon_sym_union] = ACTIONS(906), - [anon_sym_if] = ACTIONS(906), - [anon_sym_else] = ACTIONS(906), - [anon_sym_switch] = ACTIONS(906), - [anon_sym_case] = ACTIONS(906), - [anon_sym_default] = ACTIONS(906), - [anon_sym_while] = ACTIONS(906), - [anon_sym_do] = ACTIONS(906), - [anon_sym_for] = ACTIONS(906), - [anon_sym_return] = ACTIONS(906), - [anon_sym_break] = ACTIONS(906), - [anon_sym_continue] = ACTIONS(906), - [anon_sym_goto] = ACTIONS(906), - [anon_sym_DASH_DASH] = ACTIONS(908), - [anon_sym_PLUS_PLUS] = ACTIONS(908), - [anon_sym_sizeof] = ACTIONS(906), - [sym_number_literal] = ACTIONS(908), - [anon_sym_L_SQUOTE] = ACTIONS(908), - [anon_sym_u_SQUOTE] = ACTIONS(908), - [anon_sym_U_SQUOTE] = ACTIONS(908), - [anon_sym_u8_SQUOTE] = ACTIONS(908), - [anon_sym_SQUOTE] = ACTIONS(908), - [anon_sym_L_DQUOTE] = ACTIONS(908), - [anon_sym_u_DQUOTE] = ACTIONS(908), - [anon_sym_U_DQUOTE] = ACTIONS(908), - [anon_sym_u8_DQUOTE] = ACTIONS(908), - [anon_sym_DQUOTE] = ACTIONS(908), - [sym_true] = ACTIONS(906), - [sym_false] = ACTIONS(906), - [sym_null] = ACTIONS(906), - [sym_comment] = ACTIONS(3), - }, - [302] = { - [sym_attribute_declaration] = STATE(153), - [sym_compound_statement] = STATE(290), - [sym_attributed_statement] = STATE(290), - [sym_labeled_statement] = STATE(290), - [sym_expression_statement] = STATE(290), - [sym_if_statement] = STATE(290), - [sym_switch_statement] = STATE(290), - [sym_case_statement] = STATE(290), - [sym_while_statement] = STATE(290), - [sym_do_statement] = STATE(290), - [sym_for_statement] = STATE(290), - [sym_return_statement] = STATE(290), - [sym_break_statement] = STATE(290), - [sym_continue_statement] = STATE(290), - [sym_goto_statement] = STATE(290), - [sym__expression] = STATE(748), - [sym_comma_expression] = STATE(1321), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [aux_sym_attributed_declarator_repeat1] = STATE(153), - [sym_identifier] = ACTIONS(1207), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_SEMI] = ACTIONS(505), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1126), - [anon_sym_LBRACE] = ACTIONS(511), - [anon_sym_if] = ACTIONS(513), - [anon_sym_switch] = ACTIONS(515), - [anon_sym_case] = ACTIONS(517), - [anon_sym_default] = ACTIONS(519), - [anon_sym_while] = ACTIONS(521), - [anon_sym_do] = ACTIONS(523), - [anon_sym_for] = ACTIONS(525), - [anon_sym_return] = ACTIONS(527), - [anon_sym_break] = ACTIONS(529), - [anon_sym_continue] = ACTIONS(531), - [anon_sym_goto] = ACTIONS(533), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [303] = { - [sym_identifier] = ACTIONS(902), - [aux_sym_preproc_include_token1] = ACTIONS(902), - [aux_sym_preproc_def_token1] = ACTIONS(902), - [aux_sym_preproc_if_token1] = ACTIONS(902), - [aux_sym_preproc_ifdef_token1] = ACTIONS(902), - [aux_sym_preproc_ifdef_token2] = ACTIONS(902), - [sym_preproc_directive] = ACTIONS(902), - [anon_sym_LPAREN2] = ACTIONS(904), - [anon_sym_BANG] = ACTIONS(904), - [anon_sym_TILDE] = ACTIONS(904), - [anon_sym_DASH] = ACTIONS(902), - [anon_sym_PLUS] = ACTIONS(902), - [anon_sym_STAR] = ACTIONS(904), - [anon_sym_AMP] = ACTIONS(904), - [anon_sym_SEMI] = ACTIONS(904), - [anon_sym_typedef] = ACTIONS(902), - [anon_sym_extern] = ACTIONS(902), - [anon_sym___attribute__] = ACTIONS(902), - [anon_sym_LBRACK_LBRACK] = ACTIONS(904), - [anon_sym___declspec] = ACTIONS(902), - [anon_sym___cdecl] = ACTIONS(902), - [anon_sym___clrcall] = ACTIONS(902), - [anon_sym___stdcall] = ACTIONS(902), - [anon_sym___fastcall] = ACTIONS(902), - [anon_sym___thiscall] = ACTIONS(902), - [anon_sym___vectorcall] = ACTIONS(902), - [anon_sym_LBRACE] = ACTIONS(904), - [anon_sym_RBRACE] = ACTIONS(904), - [anon_sym_static] = ACTIONS(902), - [anon_sym_auto] = ACTIONS(902), - [anon_sym_register] = ACTIONS(902), - [anon_sym_inline] = ACTIONS(902), - [anon_sym_const] = ACTIONS(902), - [anon_sym_volatile] = ACTIONS(902), - [anon_sym_restrict] = ACTIONS(902), - [anon_sym__Atomic] = ACTIONS(902), - [anon_sym_signed] = ACTIONS(902), - [anon_sym_unsigned] = ACTIONS(902), - [anon_sym_long] = ACTIONS(902), - [anon_sym_short] = ACTIONS(902), - [sym_primitive_type] = ACTIONS(902), - [anon_sym_enum] = ACTIONS(902), - [anon_sym_struct] = ACTIONS(902), - [anon_sym_union] = ACTIONS(902), - [anon_sym_if] = ACTIONS(902), - [anon_sym_else] = ACTIONS(902), - [anon_sym_switch] = ACTIONS(902), - [anon_sym_case] = ACTIONS(902), - [anon_sym_default] = ACTIONS(902), - [anon_sym_while] = ACTIONS(902), - [anon_sym_do] = ACTIONS(902), - [anon_sym_for] = ACTIONS(902), - [anon_sym_return] = ACTIONS(902), - [anon_sym_break] = ACTIONS(902), - [anon_sym_continue] = ACTIONS(902), - [anon_sym_goto] = ACTIONS(902), - [anon_sym_DASH_DASH] = ACTIONS(904), - [anon_sym_PLUS_PLUS] = ACTIONS(904), - [anon_sym_sizeof] = ACTIONS(902), - [sym_number_literal] = ACTIONS(904), - [anon_sym_L_SQUOTE] = ACTIONS(904), - [anon_sym_u_SQUOTE] = ACTIONS(904), - [anon_sym_U_SQUOTE] = ACTIONS(904), - [anon_sym_u8_SQUOTE] = ACTIONS(904), - [anon_sym_SQUOTE] = ACTIONS(904), - [anon_sym_L_DQUOTE] = ACTIONS(904), - [anon_sym_u_DQUOTE] = ACTIONS(904), - [anon_sym_U_DQUOTE] = ACTIONS(904), - [anon_sym_u8_DQUOTE] = ACTIONS(904), - [anon_sym_DQUOTE] = ACTIONS(904), - [sym_true] = ACTIONS(902), - [sym_false] = ACTIONS(902), - [sym_null] = ACTIONS(902), - [sym_comment] = ACTIONS(3), - }, - [304] = { - [sym_identifier] = ACTIONS(910), - [aux_sym_preproc_include_token1] = ACTIONS(910), - [aux_sym_preproc_def_token1] = ACTIONS(910), - [aux_sym_preproc_if_token1] = ACTIONS(910), - [aux_sym_preproc_ifdef_token1] = ACTIONS(910), - [aux_sym_preproc_ifdef_token2] = ACTIONS(910), - [sym_preproc_directive] = ACTIONS(910), - [anon_sym_LPAREN2] = ACTIONS(912), - [anon_sym_BANG] = ACTIONS(912), - [anon_sym_TILDE] = ACTIONS(912), - [anon_sym_DASH] = ACTIONS(910), - [anon_sym_PLUS] = ACTIONS(910), - [anon_sym_STAR] = ACTIONS(912), - [anon_sym_AMP] = ACTIONS(912), - [anon_sym_SEMI] = ACTIONS(912), - [anon_sym_typedef] = ACTIONS(910), - [anon_sym_extern] = ACTIONS(910), - [anon_sym___attribute__] = ACTIONS(910), - [anon_sym_LBRACK_LBRACK] = ACTIONS(912), - [anon_sym___declspec] = ACTIONS(910), - [anon_sym___cdecl] = ACTIONS(910), - [anon_sym___clrcall] = ACTIONS(910), - [anon_sym___stdcall] = ACTIONS(910), - [anon_sym___fastcall] = ACTIONS(910), - [anon_sym___thiscall] = ACTIONS(910), - [anon_sym___vectorcall] = ACTIONS(910), - [anon_sym_LBRACE] = ACTIONS(912), - [anon_sym_RBRACE] = ACTIONS(912), - [anon_sym_static] = ACTIONS(910), - [anon_sym_auto] = ACTIONS(910), - [anon_sym_register] = ACTIONS(910), - [anon_sym_inline] = ACTIONS(910), - [anon_sym_const] = ACTIONS(910), - [anon_sym_volatile] = ACTIONS(910), - [anon_sym_restrict] = ACTIONS(910), - [anon_sym__Atomic] = ACTIONS(910), - [anon_sym_signed] = ACTIONS(910), - [anon_sym_unsigned] = ACTIONS(910), - [anon_sym_long] = ACTIONS(910), - [anon_sym_short] = ACTIONS(910), - [sym_primitive_type] = ACTIONS(910), - [anon_sym_enum] = ACTIONS(910), - [anon_sym_struct] = ACTIONS(910), - [anon_sym_union] = ACTIONS(910), - [anon_sym_if] = ACTIONS(910), - [anon_sym_else] = ACTIONS(910), - [anon_sym_switch] = ACTIONS(910), - [anon_sym_case] = ACTIONS(910), - [anon_sym_default] = ACTIONS(910), - [anon_sym_while] = ACTIONS(910), - [anon_sym_do] = ACTIONS(910), - [anon_sym_for] = ACTIONS(910), - [anon_sym_return] = ACTIONS(910), - [anon_sym_break] = ACTIONS(910), - [anon_sym_continue] = ACTIONS(910), - [anon_sym_goto] = ACTIONS(910), - [anon_sym_DASH_DASH] = ACTIONS(912), - [anon_sym_PLUS_PLUS] = ACTIONS(912), - [anon_sym_sizeof] = ACTIONS(910), - [sym_number_literal] = ACTIONS(912), - [anon_sym_L_SQUOTE] = ACTIONS(912), - [anon_sym_u_SQUOTE] = ACTIONS(912), - [anon_sym_U_SQUOTE] = ACTIONS(912), - [anon_sym_u8_SQUOTE] = ACTIONS(912), - [anon_sym_SQUOTE] = ACTIONS(912), - [anon_sym_L_DQUOTE] = ACTIONS(912), - [anon_sym_u_DQUOTE] = ACTIONS(912), - [anon_sym_U_DQUOTE] = ACTIONS(912), - [anon_sym_u8_DQUOTE] = ACTIONS(912), - [anon_sym_DQUOTE] = ACTIONS(912), - [sym_true] = ACTIONS(910), - [sym_false] = ACTIONS(910), - [sym_null] = ACTIONS(910), - [sym_comment] = ACTIONS(3), - }, - [305] = { - [sym_identifier] = ACTIONS(948), - [aux_sym_preproc_include_token1] = ACTIONS(948), - [aux_sym_preproc_def_token1] = ACTIONS(948), - [aux_sym_preproc_if_token1] = ACTIONS(948), - [aux_sym_preproc_ifdef_token1] = ACTIONS(948), - [aux_sym_preproc_ifdef_token2] = ACTIONS(948), - [sym_preproc_directive] = ACTIONS(948), - [anon_sym_LPAREN2] = ACTIONS(950), - [anon_sym_BANG] = ACTIONS(950), - [anon_sym_TILDE] = ACTIONS(950), - [anon_sym_DASH] = ACTIONS(948), - [anon_sym_PLUS] = ACTIONS(948), - [anon_sym_STAR] = ACTIONS(950), - [anon_sym_AMP] = ACTIONS(950), - [anon_sym_SEMI] = ACTIONS(950), - [anon_sym_typedef] = ACTIONS(948), - [anon_sym_extern] = ACTIONS(948), - [anon_sym___attribute__] = ACTIONS(948), - [anon_sym_LBRACK_LBRACK] = ACTIONS(950), - [anon_sym___declspec] = ACTIONS(948), - [anon_sym___cdecl] = ACTIONS(948), - [anon_sym___clrcall] = ACTIONS(948), - [anon_sym___stdcall] = ACTIONS(948), - [anon_sym___fastcall] = ACTIONS(948), - [anon_sym___thiscall] = ACTIONS(948), - [anon_sym___vectorcall] = ACTIONS(948), - [anon_sym_LBRACE] = ACTIONS(950), - [anon_sym_RBRACE] = ACTIONS(950), - [anon_sym_static] = ACTIONS(948), - [anon_sym_auto] = ACTIONS(948), - [anon_sym_register] = ACTIONS(948), - [anon_sym_inline] = ACTIONS(948), - [anon_sym_const] = ACTIONS(948), - [anon_sym_volatile] = ACTIONS(948), - [anon_sym_restrict] = ACTIONS(948), - [anon_sym__Atomic] = ACTIONS(948), - [anon_sym_signed] = ACTIONS(948), - [anon_sym_unsigned] = ACTIONS(948), - [anon_sym_long] = ACTIONS(948), - [anon_sym_short] = ACTIONS(948), - [sym_primitive_type] = ACTIONS(948), - [anon_sym_enum] = ACTIONS(948), - [anon_sym_struct] = ACTIONS(948), - [anon_sym_union] = ACTIONS(948), - [anon_sym_if] = ACTIONS(948), - [anon_sym_else] = ACTIONS(948), - [anon_sym_switch] = ACTIONS(948), - [anon_sym_case] = ACTIONS(948), - [anon_sym_default] = ACTIONS(948), - [anon_sym_while] = ACTIONS(948), - [anon_sym_do] = ACTIONS(948), - [anon_sym_for] = ACTIONS(948), - [anon_sym_return] = ACTIONS(948), - [anon_sym_break] = ACTIONS(948), - [anon_sym_continue] = ACTIONS(948), - [anon_sym_goto] = ACTIONS(948), - [anon_sym_DASH_DASH] = ACTIONS(950), - [anon_sym_PLUS_PLUS] = ACTIONS(950), - [anon_sym_sizeof] = ACTIONS(948), - [sym_number_literal] = ACTIONS(950), - [anon_sym_L_SQUOTE] = ACTIONS(950), - [anon_sym_u_SQUOTE] = ACTIONS(950), - [anon_sym_U_SQUOTE] = ACTIONS(950), - [anon_sym_u8_SQUOTE] = ACTIONS(950), - [anon_sym_SQUOTE] = ACTIONS(950), - [anon_sym_L_DQUOTE] = ACTIONS(950), - [anon_sym_u_DQUOTE] = ACTIONS(950), - [anon_sym_U_DQUOTE] = ACTIONS(950), - [anon_sym_u8_DQUOTE] = ACTIONS(950), - [anon_sym_DQUOTE] = ACTIONS(950), - [sym_true] = ACTIONS(948), - [sym_false] = ACTIONS(948), - [sym_null] = ACTIONS(948), - [sym_comment] = ACTIONS(3), - }, - [306] = { - [sym_identifier] = ACTIONS(1016), - [aux_sym_preproc_include_token1] = ACTIONS(1016), - [aux_sym_preproc_def_token1] = ACTIONS(1016), - [aux_sym_preproc_if_token1] = ACTIONS(1016), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1016), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1016), - [sym_preproc_directive] = ACTIONS(1016), - [anon_sym_LPAREN2] = ACTIONS(1018), - [anon_sym_BANG] = ACTIONS(1018), - [anon_sym_TILDE] = ACTIONS(1018), - [anon_sym_DASH] = ACTIONS(1016), - [anon_sym_PLUS] = ACTIONS(1016), - [anon_sym_STAR] = ACTIONS(1018), - [anon_sym_AMP] = ACTIONS(1018), - [anon_sym_SEMI] = ACTIONS(1018), - [anon_sym_typedef] = ACTIONS(1016), - [anon_sym_extern] = ACTIONS(1016), - [anon_sym___attribute__] = ACTIONS(1016), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1018), - [anon_sym___declspec] = ACTIONS(1016), - [anon_sym___cdecl] = ACTIONS(1016), - [anon_sym___clrcall] = ACTIONS(1016), - [anon_sym___stdcall] = ACTIONS(1016), - [anon_sym___fastcall] = ACTIONS(1016), - [anon_sym___thiscall] = ACTIONS(1016), - [anon_sym___vectorcall] = ACTIONS(1016), - [anon_sym_LBRACE] = ACTIONS(1018), - [anon_sym_RBRACE] = ACTIONS(1018), - [anon_sym_static] = ACTIONS(1016), - [anon_sym_auto] = ACTIONS(1016), - [anon_sym_register] = ACTIONS(1016), - [anon_sym_inline] = ACTIONS(1016), - [anon_sym_const] = ACTIONS(1016), - [anon_sym_volatile] = ACTIONS(1016), - [anon_sym_restrict] = ACTIONS(1016), - [anon_sym__Atomic] = ACTIONS(1016), - [anon_sym_signed] = ACTIONS(1016), - [anon_sym_unsigned] = ACTIONS(1016), - [anon_sym_long] = ACTIONS(1016), - [anon_sym_short] = ACTIONS(1016), - [sym_primitive_type] = ACTIONS(1016), - [anon_sym_enum] = ACTIONS(1016), - [anon_sym_struct] = ACTIONS(1016), - [anon_sym_union] = ACTIONS(1016), - [anon_sym_if] = ACTIONS(1016), - [anon_sym_else] = ACTIONS(1016), - [anon_sym_switch] = ACTIONS(1016), - [anon_sym_case] = ACTIONS(1016), - [anon_sym_default] = ACTIONS(1016), - [anon_sym_while] = ACTIONS(1016), - [anon_sym_do] = ACTIONS(1016), - [anon_sym_for] = ACTIONS(1016), - [anon_sym_return] = ACTIONS(1016), - [anon_sym_break] = ACTIONS(1016), - [anon_sym_continue] = ACTIONS(1016), - [anon_sym_goto] = ACTIONS(1016), - [anon_sym_DASH_DASH] = ACTIONS(1018), - [anon_sym_PLUS_PLUS] = ACTIONS(1018), - [anon_sym_sizeof] = ACTIONS(1016), - [sym_number_literal] = ACTIONS(1018), - [anon_sym_L_SQUOTE] = ACTIONS(1018), - [anon_sym_u_SQUOTE] = ACTIONS(1018), - [anon_sym_U_SQUOTE] = ACTIONS(1018), - [anon_sym_u8_SQUOTE] = ACTIONS(1018), - [anon_sym_SQUOTE] = ACTIONS(1018), - [anon_sym_L_DQUOTE] = ACTIONS(1018), - [anon_sym_u_DQUOTE] = ACTIONS(1018), - [anon_sym_U_DQUOTE] = ACTIONS(1018), - [anon_sym_u8_DQUOTE] = ACTIONS(1018), - [anon_sym_DQUOTE] = ACTIONS(1018), - [sym_true] = ACTIONS(1016), - [sym_false] = ACTIONS(1016), - [sym_null] = ACTIONS(1016), - [sym_comment] = ACTIONS(3), - }, - [307] = { - [sym_identifier] = ACTIONS(960), - [aux_sym_preproc_include_token1] = ACTIONS(960), - [aux_sym_preproc_def_token1] = ACTIONS(960), - [aux_sym_preproc_if_token1] = ACTIONS(960), - [aux_sym_preproc_ifdef_token1] = ACTIONS(960), - [aux_sym_preproc_ifdef_token2] = ACTIONS(960), - [sym_preproc_directive] = ACTIONS(960), - [anon_sym_LPAREN2] = ACTIONS(962), - [anon_sym_BANG] = ACTIONS(962), - [anon_sym_TILDE] = ACTIONS(962), - [anon_sym_DASH] = ACTIONS(960), - [anon_sym_PLUS] = ACTIONS(960), - [anon_sym_STAR] = ACTIONS(962), - [anon_sym_AMP] = ACTIONS(962), - [anon_sym_SEMI] = ACTIONS(962), - [anon_sym_typedef] = ACTIONS(960), - [anon_sym_extern] = ACTIONS(960), - [anon_sym___attribute__] = ACTIONS(960), - [anon_sym_LBRACK_LBRACK] = ACTIONS(962), - [anon_sym___declspec] = ACTIONS(960), - [anon_sym___cdecl] = ACTIONS(960), - [anon_sym___clrcall] = ACTIONS(960), - [anon_sym___stdcall] = ACTIONS(960), - [anon_sym___fastcall] = ACTIONS(960), - [anon_sym___thiscall] = ACTIONS(960), - [anon_sym___vectorcall] = ACTIONS(960), - [anon_sym_LBRACE] = ACTIONS(962), - [anon_sym_RBRACE] = ACTIONS(962), - [anon_sym_static] = ACTIONS(960), - [anon_sym_auto] = ACTIONS(960), - [anon_sym_register] = ACTIONS(960), - [anon_sym_inline] = ACTIONS(960), - [anon_sym_const] = ACTIONS(960), - [anon_sym_volatile] = ACTIONS(960), - [anon_sym_restrict] = ACTIONS(960), - [anon_sym__Atomic] = ACTIONS(960), - [anon_sym_signed] = ACTIONS(960), - [anon_sym_unsigned] = ACTIONS(960), - [anon_sym_long] = ACTIONS(960), - [anon_sym_short] = ACTIONS(960), - [sym_primitive_type] = ACTIONS(960), - [anon_sym_enum] = ACTIONS(960), - [anon_sym_struct] = ACTIONS(960), - [anon_sym_union] = ACTIONS(960), - [anon_sym_if] = ACTIONS(960), - [anon_sym_else] = ACTIONS(960), - [anon_sym_switch] = ACTIONS(960), - [anon_sym_case] = ACTIONS(960), - [anon_sym_default] = ACTIONS(960), - [anon_sym_while] = ACTIONS(960), - [anon_sym_do] = ACTIONS(960), - [anon_sym_for] = ACTIONS(960), - [anon_sym_return] = ACTIONS(960), - [anon_sym_break] = ACTIONS(960), - [anon_sym_continue] = ACTIONS(960), - [anon_sym_goto] = ACTIONS(960), - [anon_sym_DASH_DASH] = ACTIONS(962), - [anon_sym_PLUS_PLUS] = ACTIONS(962), - [anon_sym_sizeof] = ACTIONS(960), - [sym_number_literal] = ACTIONS(962), - [anon_sym_L_SQUOTE] = ACTIONS(962), - [anon_sym_u_SQUOTE] = ACTIONS(962), - [anon_sym_U_SQUOTE] = ACTIONS(962), - [anon_sym_u8_SQUOTE] = ACTIONS(962), - [anon_sym_SQUOTE] = ACTIONS(962), - [anon_sym_L_DQUOTE] = ACTIONS(962), - [anon_sym_u_DQUOTE] = ACTIONS(962), - [anon_sym_U_DQUOTE] = ACTIONS(962), - [anon_sym_u8_DQUOTE] = ACTIONS(962), - [anon_sym_DQUOTE] = ACTIONS(962), - [sym_true] = ACTIONS(960), - [sym_false] = ACTIONS(960), - [sym_null] = ACTIONS(960), - [sym_comment] = ACTIONS(3), - }, - [308] = { - [sym_identifier] = ACTIONS(898), - [aux_sym_preproc_include_token1] = ACTIONS(898), - [aux_sym_preproc_def_token1] = ACTIONS(898), - [aux_sym_preproc_if_token1] = ACTIONS(898), - [aux_sym_preproc_ifdef_token1] = ACTIONS(898), - [aux_sym_preproc_ifdef_token2] = ACTIONS(898), - [sym_preproc_directive] = ACTIONS(898), - [anon_sym_LPAREN2] = ACTIONS(900), - [anon_sym_BANG] = ACTIONS(900), - [anon_sym_TILDE] = ACTIONS(900), - [anon_sym_DASH] = ACTIONS(898), - [anon_sym_PLUS] = ACTIONS(898), - [anon_sym_STAR] = ACTIONS(900), - [anon_sym_AMP] = ACTIONS(900), - [anon_sym_SEMI] = ACTIONS(900), - [anon_sym_typedef] = ACTIONS(898), - [anon_sym_extern] = ACTIONS(898), - [anon_sym___attribute__] = ACTIONS(898), - [anon_sym_LBRACK_LBRACK] = ACTIONS(900), - [anon_sym___declspec] = ACTIONS(898), - [anon_sym___cdecl] = ACTIONS(898), - [anon_sym___clrcall] = ACTIONS(898), - [anon_sym___stdcall] = ACTIONS(898), - [anon_sym___fastcall] = ACTIONS(898), - [anon_sym___thiscall] = ACTIONS(898), - [anon_sym___vectorcall] = ACTIONS(898), - [anon_sym_LBRACE] = ACTIONS(900), - [anon_sym_RBRACE] = ACTIONS(900), - [anon_sym_static] = ACTIONS(898), - [anon_sym_auto] = ACTIONS(898), - [anon_sym_register] = ACTIONS(898), - [anon_sym_inline] = ACTIONS(898), - [anon_sym_const] = ACTIONS(898), - [anon_sym_volatile] = ACTIONS(898), - [anon_sym_restrict] = ACTIONS(898), - [anon_sym__Atomic] = ACTIONS(898), - [anon_sym_signed] = ACTIONS(898), - [anon_sym_unsigned] = ACTIONS(898), - [anon_sym_long] = ACTIONS(898), - [anon_sym_short] = ACTIONS(898), - [sym_primitive_type] = ACTIONS(898), - [anon_sym_enum] = ACTIONS(898), - [anon_sym_struct] = ACTIONS(898), - [anon_sym_union] = ACTIONS(898), - [anon_sym_if] = ACTIONS(898), - [anon_sym_else] = ACTIONS(898), - [anon_sym_switch] = ACTIONS(898), - [anon_sym_case] = ACTIONS(898), - [anon_sym_default] = ACTIONS(898), - [anon_sym_while] = ACTIONS(898), - [anon_sym_do] = ACTIONS(898), - [anon_sym_for] = ACTIONS(898), - [anon_sym_return] = ACTIONS(898), - [anon_sym_break] = ACTIONS(898), - [anon_sym_continue] = ACTIONS(898), - [anon_sym_goto] = ACTIONS(898), - [anon_sym_DASH_DASH] = ACTIONS(900), - [anon_sym_PLUS_PLUS] = ACTIONS(900), - [anon_sym_sizeof] = ACTIONS(898), - [sym_number_literal] = ACTIONS(900), - [anon_sym_L_SQUOTE] = ACTIONS(900), - [anon_sym_u_SQUOTE] = ACTIONS(900), - [anon_sym_U_SQUOTE] = ACTIONS(900), - [anon_sym_u8_SQUOTE] = ACTIONS(900), - [anon_sym_SQUOTE] = ACTIONS(900), - [anon_sym_L_DQUOTE] = ACTIONS(900), - [anon_sym_u_DQUOTE] = ACTIONS(900), - [anon_sym_U_DQUOTE] = ACTIONS(900), - [anon_sym_u8_DQUOTE] = ACTIONS(900), - [anon_sym_DQUOTE] = ACTIONS(900), - [sym_true] = ACTIONS(898), - [sym_false] = ACTIONS(898), - [sym_null] = ACTIONS(898), - [sym_comment] = ACTIONS(3), - }, - [309] = { - [sym_identifier] = ACTIONS(898), - [aux_sym_preproc_include_token1] = ACTIONS(898), - [aux_sym_preproc_def_token1] = ACTIONS(898), - [aux_sym_preproc_if_token1] = ACTIONS(898), - [aux_sym_preproc_ifdef_token1] = ACTIONS(898), - [aux_sym_preproc_ifdef_token2] = ACTIONS(898), - [sym_preproc_directive] = ACTIONS(898), - [anon_sym_LPAREN2] = ACTIONS(900), - [anon_sym_BANG] = ACTIONS(900), - [anon_sym_TILDE] = ACTIONS(900), - [anon_sym_DASH] = ACTIONS(898), - [anon_sym_PLUS] = ACTIONS(898), - [anon_sym_STAR] = ACTIONS(900), - [anon_sym_AMP] = ACTIONS(900), - [anon_sym_SEMI] = ACTIONS(900), - [anon_sym_typedef] = ACTIONS(898), - [anon_sym_extern] = ACTIONS(898), - [anon_sym___attribute__] = ACTIONS(898), - [anon_sym_LBRACK_LBRACK] = ACTIONS(900), - [anon_sym___declspec] = ACTIONS(898), - [anon_sym___cdecl] = ACTIONS(898), - [anon_sym___clrcall] = ACTIONS(898), - [anon_sym___stdcall] = ACTIONS(898), - [anon_sym___fastcall] = ACTIONS(898), - [anon_sym___thiscall] = ACTIONS(898), - [anon_sym___vectorcall] = ACTIONS(898), - [anon_sym_LBRACE] = ACTIONS(900), - [anon_sym_RBRACE] = ACTIONS(900), - [anon_sym_static] = ACTIONS(898), - [anon_sym_auto] = ACTIONS(898), - [anon_sym_register] = ACTIONS(898), - [anon_sym_inline] = ACTIONS(898), - [anon_sym_const] = ACTIONS(898), - [anon_sym_volatile] = ACTIONS(898), - [anon_sym_restrict] = ACTIONS(898), - [anon_sym__Atomic] = ACTIONS(898), - [anon_sym_signed] = ACTIONS(898), - [anon_sym_unsigned] = ACTIONS(898), - [anon_sym_long] = ACTIONS(898), - [anon_sym_short] = ACTIONS(898), - [sym_primitive_type] = ACTIONS(898), - [anon_sym_enum] = ACTIONS(898), - [anon_sym_struct] = ACTIONS(898), - [anon_sym_union] = ACTIONS(898), - [anon_sym_if] = ACTIONS(898), - [anon_sym_else] = ACTIONS(898), - [anon_sym_switch] = ACTIONS(898), - [anon_sym_case] = ACTIONS(898), - [anon_sym_default] = ACTIONS(898), - [anon_sym_while] = ACTIONS(898), - [anon_sym_do] = ACTIONS(898), - [anon_sym_for] = ACTIONS(898), - [anon_sym_return] = ACTIONS(898), - [anon_sym_break] = ACTIONS(898), - [anon_sym_continue] = ACTIONS(898), - [anon_sym_goto] = ACTIONS(898), - [anon_sym_DASH_DASH] = ACTIONS(900), - [anon_sym_PLUS_PLUS] = ACTIONS(900), - [anon_sym_sizeof] = ACTIONS(898), - [sym_number_literal] = ACTIONS(900), - [anon_sym_L_SQUOTE] = ACTIONS(900), - [anon_sym_u_SQUOTE] = ACTIONS(900), - [anon_sym_U_SQUOTE] = ACTIONS(900), - [anon_sym_u8_SQUOTE] = ACTIONS(900), - [anon_sym_SQUOTE] = ACTIONS(900), - [anon_sym_L_DQUOTE] = ACTIONS(900), - [anon_sym_u_DQUOTE] = ACTIONS(900), - [anon_sym_U_DQUOTE] = ACTIONS(900), - [anon_sym_u8_DQUOTE] = ACTIONS(900), - [anon_sym_DQUOTE] = ACTIONS(900), - [sym_true] = ACTIONS(898), - [sym_false] = ACTIONS(898), - [sym_null] = ACTIONS(898), - [sym_comment] = ACTIONS(3), - }, - [310] = { - [ts_builtin_sym_end] = ACTIONS(1078), - [sym_identifier] = ACTIONS(1076), - [aux_sym_preproc_include_token1] = ACTIONS(1076), - [aux_sym_preproc_def_token1] = ACTIONS(1076), - [aux_sym_preproc_if_token1] = ACTIONS(1076), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1076), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1076), - [sym_preproc_directive] = ACTIONS(1076), - [anon_sym_LPAREN2] = ACTIONS(1078), - [anon_sym_BANG] = ACTIONS(1078), - [anon_sym_TILDE] = ACTIONS(1078), - [anon_sym_DASH] = ACTIONS(1076), - [anon_sym_PLUS] = ACTIONS(1076), - [anon_sym_STAR] = ACTIONS(1078), - [anon_sym_AMP] = ACTIONS(1078), - [anon_sym_SEMI] = ACTIONS(1078), - [anon_sym_typedef] = ACTIONS(1076), - [anon_sym_extern] = ACTIONS(1076), - [anon_sym___attribute__] = ACTIONS(1076), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1078), - [anon_sym___declspec] = ACTIONS(1076), - [anon_sym___cdecl] = ACTIONS(1076), - [anon_sym___clrcall] = ACTIONS(1076), - [anon_sym___stdcall] = ACTIONS(1076), - [anon_sym___fastcall] = ACTIONS(1076), - [anon_sym___thiscall] = ACTIONS(1076), - [anon_sym___vectorcall] = ACTIONS(1076), - [anon_sym_LBRACE] = ACTIONS(1078), - [anon_sym_static] = ACTIONS(1076), - [anon_sym_auto] = ACTIONS(1076), - [anon_sym_register] = ACTIONS(1076), - [anon_sym_inline] = ACTIONS(1076), - [anon_sym_const] = ACTIONS(1076), - [anon_sym_volatile] = ACTIONS(1076), - [anon_sym_restrict] = ACTIONS(1076), - [anon_sym__Atomic] = ACTIONS(1076), - [anon_sym_signed] = ACTIONS(1076), - [anon_sym_unsigned] = ACTIONS(1076), - [anon_sym_long] = ACTIONS(1076), - [anon_sym_short] = ACTIONS(1076), - [sym_primitive_type] = ACTIONS(1076), - [anon_sym_enum] = ACTIONS(1076), - [anon_sym_struct] = ACTIONS(1076), - [anon_sym_union] = ACTIONS(1076), - [anon_sym_if] = ACTIONS(1076), - [anon_sym_switch] = ACTIONS(1076), - [anon_sym_case] = ACTIONS(1076), - [anon_sym_default] = ACTIONS(1076), - [anon_sym_while] = ACTIONS(1076), - [anon_sym_do] = ACTIONS(1076), - [anon_sym_for] = ACTIONS(1076), - [anon_sym_return] = ACTIONS(1076), - [anon_sym_break] = ACTIONS(1076), - [anon_sym_continue] = ACTIONS(1076), - [anon_sym_goto] = ACTIONS(1076), - [anon_sym_DASH_DASH] = ACTIONS(1078), - [anon_sym_PLUS_PLUS] = ACTIONS(1078), - [anon_sym_sizeof] = ACTIONS(1076), - [sym_number_literal] = ACTIONS(1078), - [anon_sym_L_SQUOTE] = ACTIONS(1078), - [anon_sym_u_SQUOTE] = ACTIONS(1078), - [anon_sym_U_SQUOTE] = ACTIONS(1078), - [anon_sym_u8_SQUOTE] = ACTIONS(1078), - [anon_sym_SQUOTE] = ACTIONS(1078), - [anon_sym_L_DQUOTE] = ACTIONS(1078), - [anon_sym_u_DQUOTE] = ACTIONS(1078), - [anon_sym_U_DQUOTE] = ACTIONS(1078), - [anon_sym_u8_DQUOTE] = ACTIONS(1078), - [anon_sym_DQUOTE] = ACTIONS(1078), - [sym_true] = ACTIONS(1076), - [sym_false] = ACTIONS(1076), - [sym_null] = ACTIONS(1076), - [sym_comment] = ACTIONS(3), - }, - [311] = { - [sym_identifier] = ACTIONS(1028), - [aux_sym_preproc_include_token1] = ACTIONS(1028), - [aux_sym_preproc_def_token1] = ACTIONS(1028), - [aux_sym_preproc_if_token1] = ACTIONS(1028), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1028), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1028), - [sym_preproc_directive] = ACTIONS(1028), - [anon_sym_LPAREN2] = ACTIONS(1030), - [anon_sym_BANG] = ACTIONS(1030), - [anon_sym_TILDE] = ACTIONS(1030), - [anon_sym_DASH] = ACTIONS(1028), - [anon_sym_PLUS] = ACTIONS(1028), - [anon_sym_STAR] = ACTIONS(1030), - [anon_sym_AMP] = ACTIONS(1030), - [anon_sym_SEMI] = ACTIONS(1030), - [anon_sym_typedef] = ACTIONS(1028), - [anon_sym_extern] = ACTIONS(1028), - [anon_sym___attribute__] = ACTIONS(1028), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1030), - [anon_sym___declspec] = ACTIONS(1028), - [anon_sym___cdecl] = ACTIONS(1028), - [anon_sym___clrcall] = ACTIONS(1028), - [anon_sym___stdcall] = ACTIONS(1028), - [anon_sym___fastcall] = ACTIONS(1028), - [anon_sym___thiscall] = ACTIONS(1028), - [anon_sym___vectorcall] = ACTIONS(1028), - [anon_sym_LBRACE] = ACTIONS(1030), - [anon_sym_RBRACE] = ACTIONS(1030), - [anon_sym_static] = ACTIONS(1028), - [anon_sym_auto] = ACTIONS(1028), - [anon_sym_register] = ACTIONS(1028), - [anon_sym_inline] = ACTIONS(1028), - [anon_sym_const] = ACTIONS(1028), - [anon_sym_volatile] = ACTIONS(1028), - [anon_sym_restrict] = ACTIONS(1028), - [anon_sym__Atomic] = ACTIONS(1028), - [anon_sym_signed] = ACTIONS(1028), - [anon_sym_unsigned] = ACTIONS(1028), - [anon_sym_long] = ACTIONS(1028), - [anon_sym_short] = ACTIONS(1028), - [sym_primitive_type] = ACTIONS(1028), - [anon_sym_enum] = ACTIONS(1028), - [anon_sym_struct] = ACTIONS(1028), - [anon_sym_union] = ACTIONS(1028), - [anon_sym_if] = ACTIONS(1028), - [anon_sym_switch] = ACTIONS(1028), - [anon_sym_case] = ACTIONS(1028), - [anon_sym_default] = ACTIONS(1028), - [anon_sym_while] = ACTIONS(1028), - [anon_sym_do] = ACTIONS(1028), - [anon_sym_for] = ACTIONS(1028), - [anon_sym_return] = ACTIONS(1028), - [anon_sym_break] = ACTIONS(1028), - [anon_sym_continue] = ACTIONS(1028), - [anon_sym_goto] = ACTIONS(1028), - [anon_sym_DASH_DASH] = ACTIONS(1030), - [anon_sym_PLUS_PLUS] = ACTIONS(1030), - [anon_sym_sizeof] = ACTIONS(1028), - [sym_number_literal] = ACTIONS(1030), - [anon_sym_L_SQUOTE] = ACTIONS(1030), - [anon_sym_u_SQUOTE] = ACTIONS(1030), - [anon_sym_U_SQUOTE] = ACTIONS(1030), - [anon_sym_u8_SQUOTE] = ACTIONS(1030), - [anon_sym_SQUOTE] = ACTIONS(1030), - [anon_sym_L_DQUOTE] = ACTIONS(1030), - [anon_sym_u_DQUOTE] = ACTIONS(1030), - [anon_sym_U_DQUOTE] = ACTIONS(1030), - [anon_sym_u8_DQUOTE] = ACTIONS(1030), - [anon_sym_DQUOTE] = ACTIONS(1030), - [sym_true] = ACTIONS(1028), - [sym_false] = ACTIONS(1028), - [sym_null] = ACTIONS(1028), - [sym_comment] = ACTIONS(3), - }, - [312] = { - [sym_identifier] = ACTIONS(1068), - [aux_sym_preproc_include_token1] = ACTIONS(1068), - [aux_sym_preproc_def_token1] = ACTIONS(1068), - [aux_sym_preproc_if_token1] = ACTIONS(1068), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1068), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1068), - [sym_preproc_directive] = ACTIONS(1068), - [anon_sym_LPAREN2] = ACTIONS(1070), - [anon_sym_BANG] = ACTIONS(1070), - [anon_sym_TILDE] = ACTIONS(1070), - [anon_sym_DASH] = ACTIONS(1068), - [anon_sym_PLUS] = ACTIONS(1068), - [anon_sym_STAR] = ACTIONS(1070), - [anon_sym_AMP] = ACTIONS(1070), - [anon_sym_SEMI] = ACTIONS(1070), - [anon_sym_typedef] = ACTIONS(1068), - [anon_sym_extern] = ACTIONS(1068), - [anon_sym___attribute__] = ACTIONS(1068), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1070), - [anon_sym___declspec] = ACTIONS(1068), - [anon_sym___cdecl] = ACTIONS(1068), - [anon_sym___clrcall] = ACTIONS(1068), - [anon_sym___stdcall] = ACTIONS(1068), - [anon_sym___fastcall] = ACTIONS(1068), - [anon_sym___thiscall] = ACTIONS(1068), - [anon_sym___vectorcall] = ACTIONS(1068), - [anon_sym_LBRACE] = ACTIONS(1070), - [anon_sym_RBRACE] = ACTIONS(1070), - [anon_sym_static] = ACTIONS(1068), - [anon_sym_auto] = ACTIONS(1068), - [anon_sym_register] = ACTIONS(1068), - [anon_sym_inline] = ACTIONS(1068), - [anon_sym_const] = ACTIONS(1068), - [anon_sym_volatile] = ACTIONS(1068), - [anon_sym_restrict] = ACTIONS(1068), - [anon_sym__Atomic] = ACTIONS(1068), - [anon_sym_signed] = ACTIONS(1068), - [anon_sym_unsigned] = ACTIONS(1068), - [anon_sym_long] = ACTIONS(1068), - [anon_sym_short] = ACTIONS(1068), - [sym_primitive_type] = ACTIONS(1068), - [anon_sym_enum] = ACTIONS(1068), - [anon_sym_struct] = ACTIONS(1068), - [anon_sym_union] = ACTIONS(1068), - [anon_sym_if] = ACTIONS(1068), - [anon_sym_switch] = ACTIONS(1068), - [anon_sym_case] = ACTIONS(1068), - [anon_sym_default] = ACTIONS(1068), - [anon_sym_while] = ACTIONS(1068), - [anon_sym_do] = ACTIONS(1068), - [anon_sym_for] = ACTIONS(1068), - [anon_sym_return] = ACTIONS(1068), - [anon_sym_break] = ACTIONS(1068), - [anon_sym_continue] = ACTIONS(1068), - [anon_sym_goto] = ACTIONS(1068), - [anon_sym_DASH_DASH] = ACTIONS(1070), - [anon_sym_PLUS_PLUS] = ACTIONS(1070), - [anon_sym_sizeof] = ACTIONS(1068), - [sym_number_literal] = ACTIONS(1070), - [anon_sym_L_SQUOTE] = ACTIONS(1070), - [anon_sym_u_SQUOTE] = ACTIONS(1070), - [anon_sym_U_SQUOTE] = ACTIONS(1070), - [anon_sym_u8_SQUOTE] = ACTIONS(1070), - [anon_sym_SQUOTE] = ACTIONS(1070), - [anon_sym_L_DQUOTE] = ACTIONS(1070), - [anon_sym_u_DQUOTE] = ACTIONS(1070), - [anon_sym_U_DQUOTE] = ACTIONS(1070), - [anon_sym_u8_DQUOTE] = ACTIONS(1070), - [anon_sym_DQUOTE] = ACTIONS(1070), - [sym_true] = ACTIONS(1068), - [sym_false] = ACTIONS(1068), - [sym_null] = ACTIONS(1068), - [sym_comment] = ACTIONS(3), - }, - [313] = { - [sym_identifier] = ACTIONS(1092), - [aux_sym_preproc_include_token1] = ACTIONS(1092), - [aux_sym_preproc_def_token1] = ACTIONS(1092), - [aux_sym_preproc_if_token1] = ACTIONS(1092), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1092), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1092), - [sym_preproc_directive] = ACTIONS(1092), - [anon_sym_LPAREN2] = ACTIONS(1094), - [anon_sym_BANG] = ACTIONS(1094), - [anon_sym_TILDE] = ACTIONS(1094), - [anon_sym_DASH] = ACTIONS(1092), - [anon_sym_PLUS] = ACTIONS(1092), - [anon_sym_STAR] = ACTIONS(1094), - [anon_sym_AMP] = ACTIONS(1094), - [anon_sym_SEMI] = ACTIONS(1094), - [anon_sym_typedef] = ACTIONS(1092), - [anon_sym_extern] = ACTIONS(1092), - [anon_sym___attribute__] = ACTIONS(1092), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1094), - [anon_sym___declspec] = ACTIONS(1092), - [anon_sym___cdecl] = ACTIONS(1092), - [anon_sym___clrcall] = ACTIONS(1092), - [anon_sym___stdcall] = ACTIONS(1092), - [anon_sym___fastcall] = ACTIONS(1092), - [anon_sym___thiscall] = ACTIONS(1092), - [anon_sym___vectorcall] = ACTIONS(1092), - [anon_sym_LBRACE] = ACTIONS(1094), - [anon_sym_RBRACE] = ACTIONS(1094), - [anon_sym_static] = ACTIONS(1092), - [anon_sym_auto] = ACTIONS(1092), - [anon_sym_register] = ACTIONS(1092), - [anon_sym_inline] = ACTIONS(1092), - [anon_sym_const] = ACTIONS(1092), - [anon_sym_volatile] = ACTIONS(1092), - [anon_sym_restrict] = ACTIONS(1092), - [anon_sym__Atomic] = ACTIONS(1092), - [anon_sym_signed] = ACTIONS(1092), - [anon_sym_unsigned] = ACTIONS(1092), - [anon_sym_long] = ACTIONS(1092), - [anon_sym_short] = ACTIONS(1092), - [sym_primitive_type] = ACTIONS(1092), - [anon_sym_enum] = ACTIONS(1092), - [anon_sym_struct] = ACTIONS(1092), - [anon_sym_union] = ACTIONS(1092), - [anon_sym_if] = ACTIONS(1092), - [anon_sym_switch] = ACTIONS(1092), - [anon_sym_case] = ACTIONS(1092), - [anon_sym_default] = ACTIONS(1092), - [anon_sym_while] = ACTIONS(1092), - [anon_sym_do] = ACTIONS(1092), - [anon_sym_for] = ACTIONS(1092), - [anon_sym_return] = ACTIONS(1092), - [anon_sym_break] = ACTIONS(1092), - [anon_sym_continue] = ACTIONS(1092), - [anon_sym_goto] = ACTIONS(1092), - [anon_sym_DASH_DASH] = ACTIONS(1094), - [anon_sym_PLUS_PLUS] = ACTIONS(1094), - [anon_sym_sizeof] = ACTIONS(1092), - [sym_number_literal] = ACTIONS(1094), - [anon_sym_L_SQUOTE] = ACTIONS(1094), - [anon_sym_u_SQUOTE] = ACTIONS(1094), - [anon_sym_U_SQUOTE] = ACTIONS(1094), - [anon_sym_u8_SQUOTE] = ACTIONS(1094), - [anon_sym_SQUOTE] = ACTIONS(1094), - [anon_sym_L_DQUOTE] = ACTIONS(1094), - [anon_sym_u_DQUOTE] = ACTIONS(1094), - [anon_sym_U_DQUOTE] = ACTIONS(1094), - [anon_sym_u8_DQUOTE] = ACTIONS(1094), - [anon_sym_DQUOTE] = ACTIONS(1094), - [sym_true] = ACTIONS(1092), - [sym_false] = ACTIONS(1092), - [sym_null] = ACTIONS(1092), - [sym_comment] = ACTIONS(3), - }, - [314] = { - [ts_builtin_sym_end] = ACTIONS(1086), - [sym_identifier] = ACTIONS(1084), - [aux_sym_preproc_include_token1] = ACTIONS(1084), - [aux_sym_preproc_def_token1] = ACTIONS(1084), - [aux_sym_preproc_if_token1] = ACTIONS(1084), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1084), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1084), - [sym_preproc_directive] = ACTIONS(1084), - [anon_sym_LPAREN2] = ACTIONS(1086), - [anon_sym_BANG] = ACTIONS(1086), - [anon_sym_TILDE] = ACTIONS(1086), - [anon_sym_DASH] = ACTIONS(1084), - [anon_sym_PLUS] = ACTIONS(1084), - [anon_sym_STAR] = ACTIONS(1086), - [anon_sym_AMP] = ACTIONS(1086), - [anon_sym_SEMI] = ACTIONS(1086), - [anon_sym_typedef] = ACTIONS(1084), - [anon_sym_extern] = ACTIONS(1084), - [anon_sym___attribute__] = ACTIONS(1084), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1086), - [anon_sym___declspec] = ACTIONS(1084), - [anon_sym___cdecl] = ACTIONS(1084), - [anon_sym___clrcall] = ACTIONS(1084), - [anon_sym___stdcall] = ACTIONS(1084), - [anon_sym___fastcall] = ACTIONS(1084), - [anon_sym___thiscall] = ACTIONS(1084), - [anon_sym___vectorcall] = ACTIONS(1084), - [anon_sym_LBRACE] = ACTIONS(1086), - [anon_sym_static] = ACTIONS(1084), - [anon_sym_auto] = ACTIONS(1084), - [anon_sym_register] = ACTIONS(1084), - [anon_sym_inline] = ACTIONS(1084), - [anon_sym_const] = ACTIONS(1084), - [anon_sym_volatile] = ACTIONS(1084), - [anon_sym_restrict] = ACTIONS(1084), - [anon_sym__Atomic] = ACTIONS(1084), - [anon_sym_signed] = ACTIONS(1084), - [anon_sym_unsigned] = ACTIONS(1084), - [anon_sym_long] = ACTIONS(1084), - [anon_sym_short] = ACTIONS(1084), - [sym_primitive_type] = ACTIONS(1084), - [anon_sym_enum] = ACTIONS(1084), - [anon_sym_struct] = ACTIONS(1084), - [anon_sym_union] = ACTIONS(1084), - [anon_sym_if] = ACTIONS(1084), - [anon_sym_switch] = ACTIONS(1084), - [anon_sym_case] = ACTIONS(1084), - [anon_sym_default] = ACTIONS(1084), - [anon_sym_while] = ACTIONS(1084), - [anon_sym_do] = ACTIONS(1084), - [anon_sym_for] = ACTIONS(1084), - [anon_sym_return] = ACTIONS(1084), - [anon_sym_break] = ACTIONS(1084), - [anon_sym_continue] = ACTIONS(1084), - [anon_sym_goto] = ACTIONS(1084), - [anon_sym_DASH_DASH] = ACTIONS(1086), - [anon_sym_PLUS_PLUS] = ACTIONS(1086), - [anon_sym_sizeof] = ACTIONS(1084), - [sym_number_literal] = ACTIONS(1086), - [anon_sym_L_SQUOTE] = ACTIONS(1086), - [anon_sym_u_SQUOTE] = ACTIONS(1086), - [anon_sym_U_SQUOTE] = ACTIONS(1086), - [anon_sym_u8_SQUOTE] = ACTIONS(1086), - [anon_sym_SQUOTE] = ACTIONS(1086), - [anon_sym_L_DQUOTE] = ACTIONS(1086), - [anon_sym_u_DQUOTE] = ACTIONS(1086), - [anon_sym_U_DQUOTE] = ACTIONS(1086), - [anon_sym_u8_DQUOTE] = ACTIONS(1086), - [anon_sym_DQUOTE] = ACTIONS(1086), - [sym_true] = ACTIONS(1084), - [sym_false] = ACTIONS(1084), - [sym_null] = ACTIONS(1084), - [sym_comment] = ACTIONS(3), - }, - [315] = { - [sym_identifier] = ACTIONS(1084), - [aux_sym_preproc_include_token1] = ACTIONS(1084), - [aux_sym_preproc_def_token1] = ACTIONS(1084), - [aux_sym_preproc_if_token1] = ACTIONS(1084), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1084), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1084), - [sym_preproc_directive] = ACTIONS(1084), - [anon_sym_LPAREN2] = ACTIONS(1086), - [anon_sym_BANG] = ACTIONS(1086), - [anon_sym_TILDE] = ACTIONS(1086), - [anon_sym_DASH] = ACTIONS(1084), - [anon_sym_PLUS] = ACTIONS(1084), - [anon_sym_STAR] = ACTIONS(1086), - [anon_sym_AMP] = ACTIONS(1086), - [anon_sym_SEMI] = ACTIONS(1086), - [anon_sym_typedef] = ACTIONS(1084), - [anon_sym_extern] = ACTIONS(1084), - [anon_sym___attribute__] = ACTIONS(1084), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1086), - [anon_sym___declspec] = ACTIONS(1084), - [anon_sym___cdecl] = ACTIONS(1084), - [anon_sym___clrcall] = ACTIONS(1084), - [anon_sym___stdcall] = ACTIONS(1084), - [anon_sym___fastcall] = ACTIONS(1084), - [anon_sym___thiscall] = ACTIONS(1084), - [anon_sym___vectorcall] = ACTIONS(1084), - [anon_sym_LBRACE] = ACTIONS(1086), - [anon_sym_RBRACE] = ACTIONS(1086), - [anon_sym_static] = ACTIONS(1084), - [anon_sym_auto] = ACTIONS(1084), - [anon_sym_register] = ACTIONS(1084), - [anon_sym_inline] = ACTIONS(1084), - [anon_sym_const] = ACTIONS(1084), - [anon_sym_volatile] = ACTIONS(1084), - [anon_sym_restrict] = ACTIONS(1084), - [anon_sym__Atomic] = ACTIONS(1084), - [anon_sym_signed] = ACTIONS(1084), - [anon_sym_unsigned] = ACTIONS(1084), - [anon_sym_long] = ACTIONS(1084), - [anon_sym_short] = ACTIONS(1084), - [sym_primitive_type] = ACTIONS(1084), - [anon_sym_enum] = ACTIONS(1084), - [anon_sym_struct] = ACTIONS(1084), - [anon_sym_union] = ACTIONS(1084), - [anon_sym_if] = ACTIONS(1084), - [anon_sym_switch] = ACTIONS(1084), - [anon_sym_case] = ACTIONS(1084), - [anon_sym_default] = ACTIONS(1084), - [anon_sym_while] = ACTIONS(1084), - [anon_sym_do] = ACTIONS(1084), - [anon_sym_for] = ACTIONS(1084), - [anon_sym_return] = ACTIONS(1084), - [anon_sym_break] = ACTIONS(1084), - [anon_sym_continue] = ACTIONS(1084), - [anon_sym_goto] = ACTIONS(1084), - [anon_sym_DASH_DASH] = ACTIONS(1086), - [anon_sym_PLUS_PLUS] = ACTIONS(1086), - [anon_sym_sizeof] = ACTIONS(1084), - [sym_number_literal] = ACTIONS(1086), - [anon_sym_L_SQUOTE] = ACTIONS(1086), - [anon_sym_u_SQUOTE] = ACTIONS(1086), - [anon_sym_U_SQUOTE] = ACTIONS(1086), - [anon_sym_u8_SQUOTE] = ACTIONS(1086), - [anon_sym_SQUOTE] = ACTIONS(1086), - [anon_sym_L_DQUOTE] = ACTIONS(1086), - [anon_sym_u_DQUOTE] = ACTIONS(1086), - [anon_sym_U_DQUOTE] = ACTIONS(1086), - [anon_sym_u8_DQUOTE] = ACTIONS(1086), - [anon_sym_DQUOTE] = ACTIONS(1086), - [sym_true] = ACTIONS(1084), - [sym_false] = ACTIONS(1084), - [sym_null] = ACTIONS(1084), - [sym_comment] = ACTIONS(3), - }, - [316] = { - [sym_identifier] = ACTIONS(1032), - [aux_sym_preproc_include_token1] = ACTIONS(1032), - [aux_sym_preproc_def_token1] = ACTIONS(1032), - [aux_sym_preproc_if_token1] = ACTIONS(1032), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1032), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1032), - [sym_preproc_directive] = ACTIONS(1032), - [anon_sym_LPAREN2] = ACTIONS(1034), - [anon_sym_BANG] = ACTIONS(1034), - [anon_sym_TILDE] = ACTIONS(1034), - [anon_sym_DASH] = ACTIONS(1032), - [anon_sym_PLUS] = ACTIONS(1032), - [anon_sym_STAR] = ACTIONS(1034), - [anon_sym_AMP] = ACTIONS(1034), - [anon_sym_SEMI] = ACTIONS(1034), - [anon_sym_typedef] = ACTIONS(1032), - [anon_sym_extern] = ACTIONS(1032), - [anon_sym___attribute__] = ACTIONS(1032), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1034), - [anon_sym___declspec] = ACTIONS(1032), - [anon_sym___cdecl] = ACTIONS(1032), - [anon_sym___clrcall] = ACTIONS(1032), - [anon_sym___stdcall] = ACTIONS(1032), - [anon_sym___fastcall] = ACTIONS(1032), - [anon_sym___thiscall] = ACTIONS(1032), - [anon_sym___vectorcall] = ACTIONS(1032), - [anon_sym_LBRACE] = ACTIONS(1034), - [anon_sym_RBRACE] = ACTIONS(1034), - [anon_sym_static] = ACTIONS(1032), - [anon_sym_auto] = ACTIONS(1032), - [anon_sym_register] = ACTIONS(1032), - [anon_sym_inline] = ACTIONS(1032), - [anon_sym_const] = ACTIONS(1032), - [anon_sym_volatile] = ACTIONS(1032), - [anon_sym_restrict] = ACTIONS(1032), - [anon_sym__Atomic] = ACTIONS(1032), - [anon_sym_signed] = ACTIONS(1032), - [anon_sym_unsigned] = ACTIONS(1032), - [anon_sym_long] = ACTIONS(1032), - [anon_sym_short] = ACTIONS(1032), - [sym_primitive_type] = ACTIONS(1032), - [anon_sym_enum] = ACTIONS(1032), - [anon_sym_struct] = ACTIONS(1032), - [anon_sym_union] = ACTIONS(1032), - [anon_sym_if] = ACTIONS(1032), - [anon_sym_switch] = ACTIONS(1032), - [anon_sym_case] = ACTIONS(1032), - [anon_sym_default] = ACTIONS(1032), - [anon_sym_while] = ACTIONS(1032), - [anon_sym_do] = ACTIONS(1032), - [anon_sym_for] = ACTIONS(1032), - [anon_sym_return] = ACTIONS(1032), - [anon_sym_break] = ACTIONS(1032), - [anon_sym_continue] = ACTIONS(1032), - [anon_sym_goto] = ACTIONS(1032), - [anon_sym_DASH_DASH] = ACTIONS(1034), - [anon_sym_PLUS_PLUS] = ACTIONS(1034), - [anon_sym_sizeof] = ACTIONS(1032), - [sym_number_literal] = ACTIONS(1034), - [anon_sym_L_SQUOTE] = ACTIONS(1034), - [anon_sym_u_SQUOTE] = ACTIONS(1034), - [anon_sym_U_SQUOTE] = ACTIONS(1034), - [anon_sym_u8_SQUOTE] = ACTIONS(1034), - [anon_sym_SQUOTE] = ACTIONS(1034), - [anon_sym_L_DQUOTE] = ACTIONS(1034), - [anon_sym_u_DQUOTE] = ACTIONS(1034), - [anon_sym_U_DQUOTE] = ACTIONS(1034), - [anon_sym_u8_DQUOTE] = ACTIONS(1034), - [anon_sym_DQUOTE] = ACTIONS(1034), - [sym_true] = ACTIONS(1032), - [sym_false] = ACTIONS(1032), - [sym_null] = ACTIONS(1032), - [sym_comment] = ACTIONS(3), - }, - [317] = { - [sym_identifier] = ACTIONS(1120), - [aux_sym_preproc_include_token1] = ACTIONS(1120), - [aux_sym_preproc_def_token1] = ACTIONS(1120), - [aux_sym_preproc_if_token1] = ACTIONS(1120), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1120), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1120), - [sym_preproc_directive] = ACTIONS(1120), - [anon_sym_LPAREN2] = ACTIONS(1122), - [anon_sym_BANG] = ACTIONS(1122), - [anon_sym_TILDE] = ACTIONS(1122), - [anon_sym_DASH] = ACTIONS(1120), - [anon_sym_PLUS] = ACTIONS(1120), - [anon_sym_STAR] = ACTIONS(1122), - [anon_sym_AMP] = ACTIONS(1122), - [anon_sym_SEMI] = ACTIONS(1122), - [anon_sym_typedef] = ACTIONS(1120), - [anon_sym_extern] = ACTIONS(1120), - [anon_sym___attribute__] = ACTIONS(1120), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1122), - [anon_sym___declspec] = ACTIONS(1120), - [anon_sym___cdecl] = ACTIONS(1120), - [anon_sym___clrcall] = ACTIONS(1120), - [anon_sym___stdcall] = ACTIONS(1120), - [anon_sym___fastcall] = ACTIONS(1120), - [anon_sym___thiscall] = ACTIONS(1120), - [anon_sym___vectorcall] = ACTIONS(1120), - [anon_sym_LBRACE] = ACTIONS(1122), - [anon_sym_RBRACE] = ACTIONS(1122), - [anon_sym_static] = ACTIONS(1120), - [anon_sym_auto] = ACTIONS(1120), - [anon_sym_register] = ACTIONS(1120), - [anon_sym_inline] = ACTIONS(1120), - [anon_sym_const] = ACTIONS(1120), - [anon_sym_volatile] = ACTIONS(1120), - [anon_sym_restrict] = ACTIONS(1120), - [anon_sym__Atomic] = ACTIONS(1120), - [anon_sym_signed] = ACTIONS(1120), - [anon_sym_unsigned] = ACTIONS(1120), - [anon_sym_long] = ACTIONS(1120), - [anon_sym_short] = ACTIONS(1120), - [sym_primitive_type] = ACTIONS(1120), - [anon_sym_enum] = ACTIONS(1120), - [anon_sym_struct] = ACTIONS(1120), - [anon_sym_union] = ACTIONS(1120), - [anon_sym_if] = ACTIONS(1120), - [anon_sym_switch] = ACTIONS(1120), - [anon_sym_case] = ACTIONS(1120), - [anon_sym_default] = ACTIONS(1120), - [anon_sym_while] = ACTIONS(1120), - [anon_sym_do] = ACTIONS(1120), - [anon_sym_for] = ACTIONS(1120), - [anon_sym_return] = ACTIONS(1120), - [anon_sym_break] = ACTIONS(1120), - [anon_sym_continue] = ACTIONS(1120), - [anon_sym_goto] = ACTIONS(1120), - [anon_sym_DASH_DASH] = ACTIONS(1122), - [anon_sym_PLUS_PLUS] = ACTIONS(1122), - [anon_sym_sizeof] = ACTIONS(1120), - [sym_number_literal] = ACTIONS(1122), - [anon_sym_L_SQUOTE] = ACTIONS(1122), - [anon_sym_u_SQUOTE] = ACTIONS(1122), - [anon_sym_U_SQUOTE] = ACTIONS(1122), - [anon_sym_u8_SQUOTE] = ACTIONS(1122), - [anon_sym_SQUOTE] = ACTIONS(1122), - [anon_sym_L_DQUOTE] = ACTIONS(1122), - [anon_sym_u_DQUOTE] = ACTIONS(1122), - [anon_sym_U_DQUOTE] = ACTIONS(1122), - [anon_sym_u8_DQUOTE] = ACTIONS(1122), - [anon_sym_DQUOTE] = ACTIONS(1122), - [sym_true] = ACTIONS(1120), - [sym_false] = ACTIONS(1120), - [sym_null] = ACTIONS(1120), - [sym_comment] = ACTIONS(3), - }, - [318] = { - [sym_identifier] = ACTIONS(1116), - [aux_sym_preproc_include_token1] = ACTIONS(1116), - [aux_sym_preproc_def_token1] = ACTIONS(1116), - [aux_sym_preproc_if_token1] = ACTIONS(1116), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1116), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1116), - [sym_preproc_directive] = ACTIONS(1116), - [anon_sym_LPAREN2] = ACTIONS(1118), - [anon_sym_BANG] = ACTIONS(1118), - [anon_sym_TILDE] = ACTIONS(1118), - [anon_sym_DASH] = ACTIONS(1116), - [anon_sym_PLUS] = ACTIONS(1116), - [anon_sym_STAR] = ACTIONS(1118), - [anon_sym_AMP] = ACTIONS(1118), - [anon_sym_SEMI] = ACTIONS(1118), - [anon_sym_typedef] = ACTIONS(1116), - [anon_sym_extern] = ACTIONS(1116), - [anon_sym___attribute__] = ACTIONS(1116), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1118), - [anon_sym___declspec] = ACTIONS(1116), - [anon_sym___cdecl] = ACTIONS(1116), - [anon_sym___clrcall] = ACTIONS(1116), - [anon_sym___stdcall] = ACTIONS(1116), - [anon_sym___fastcall] = ACTIONS(1116), - [anon_sym___thiscall] = ACTIONS(1116), - [anon_sym___vectorcall] = ACTIONS(1116), - [anon_sym_LBRACE] = ACTIONS(1118), - [anon_sym_RBRACE] = ACTIONS(1118), - [anon_sym_static] = ACTIONS(1116), - [anon_sym_auto] = ACTIONS(1116), - [anon_sym_register] = ACTIONS(1116), - [anon_sym_inline] = ACTIONS(1116), - [anon_sym_const] = ACTIONS(1116), - [anon_sym_volatile] = ACTIONS(1116), - [anon_sym_restrict] = ACTIONS(1116), - [anon_sym__Atomic] = ACTIONS(1116), - [anon_sym_signed] = ACTIONS(1116), - [anon_sym_unsigned] = ACTIONS(1116), - [anon_sym_long] = ACTIONS(1116), - [anon_sym_short] = ACTIONS(1116), - [sym_primitive_type] = ACTIONS(1116), - [anon_sym_enum] = ACTIONS(1116), - [anon_sym_struct] = ACTIONS(1116), - [anon_sym_union] = ACTIONS(1116), - [anon_sym_if] = ACTIONS(1116), - [anon_sym_switch] = ACTIONS(1116), - [anon_sym_case] = ACTIONS(1116), - [anon_sym_default] = ACTIONS(1116), - [anon_sym_while] = ACTIONS(1116), - [anon_sym_do] = ACTIONS(1116), - [anon_sym_for] = ACTIONS(1116), - [anon_sym_return] = ACTIONS(1116), - [anon_sym_break] = ACTIONS(1116), - [anon_sym_continue] = ACTIONS(1116), - [anon_sym_goto] = ACTIONS(1116), - [anon_sym_DASH_DASH] = ACTIONS(1118), - [anon_sym_PLUS_PLUS] = ACTIONS(1118), - [anon_sym_sizeof] = ACTIONS(1116), - [sym_number_literal] = ACTIONS(1118), - [anon_sym_L_SQUOTE] = ACTIONS(1118), - [anon_sym_u_SQUOTE] = ACTIONS(1118), - [anon_sym_U_SQUOTE] = ACTIONS(1118), - [anon_sym_u8_SQUOTE] = ACTIONS(1118), - [anon_sym_SQUOTE] = ACTIONS(1118), - [anon_sym_L_DQUOTE] = ACTIONS(1118), - [anon_sym_u_DQUOTE] = ACTIONS(1118), - [anon_sym_U_DQUOTE] = ACTIONS(1118), - [anon_sym_u8_DQUOTE] = ACTIONS(1118), - [anon_sym_DQUOTE] = ACTIONS(1118), - [sym_true] = ACTIONS(1116), - [sym_false] = ACTIONS(1116), - [sym_null] = ACTIONS(1116), - [sym_comment] = ACTIONS(3), - }, - [319] = { - [sym_identifier] = ACTIONS(1080), - [aux_sym_preproc_include_token1] = ACTIONS(1080), - [aux_sym_preproc_def_token1] = ACTIONS(1080), - [aux_sym_preproc_if_token1] = ACTIONS(1080), - [aux_sym_preproc_if_token2] = ACTIONS(1080), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1080), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1080), - [sym_preproc_directive] = ACTIONS(1080), - [anon_sym_LPAREN2] = ACTIONS(1082), - [anon_sym_BANG] = ACTIONS(1082), - [anon_sym_TILDE] = ACTIONS(1082), - [anon_sym_DASH] = ACTIONS(1080), - [anon_sym_PLUS] = ACTIONS(1080), - [anon_sym_STAR] = ACTIONS(1082), - [anon_sym_AMP] = ACTIONS(1082), - [anon_sym_SEMI] = ACTIONS(1082), - [anon_sym_typedef] = ACTIONS(1080), - [anon_sym_extern] = ACTIONS(1080), - [anon_sym___attribute__] = ACTIONS(1080), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1082), - [anon_sym___declspec] = ACTIONS(1080), - [anon_sym___cdecl] = ACTIONS(1080), - [anon_sym___clrcall] = ACTIONS(1080), - [anon_sym___stdcall] = ACTIONS(1080), - [anon_sym___fastcall] = ACTIONS(1080), - [anon_sym___thiscall] = ACTIONS(1080), - [anon_sym___vectorcall] = ACTIONS(1080), - [anon_sym_LBRACE] = ACTIONS(1082), - [anon_sym_static] = ACTIONS(1080), - [anon_sym_auto] = ACTIONS(1080), - [anon_sym_register] = ACTIONS(1080), - [anon_sym_inline] = ACTIONS(1080), - [anon_sym_const] = ACTIONS(1080), - [anon_sym_volatile] = ACTIONS(1080), - [anon_sym_restrict] = ACTIONS(1080), - [anon_sym__Atomic] = ACTIONS(1080), - [anon_sym_signed] = ACTIONS(1080), - [anon_sym_unsigned] = ACTIONS(1080), - [anon_sym_long] = ACTIONS(1080), - [anon_sym_short] = ACTIONS(1080), - [sym_primitive_type] = ACTIONS(1080), - [anon_sym_enum] = ACTIONS(1080), - [anon_sym_struct] = ACTIONS(1080), - [anon_sym_union] = ACTIONS(1080), - [anon_sym_if] = ACTIONS(1080), - [anon_sym_switch] = ACTIONS(1080), - [anon_sym_case] = ACTIONS(1080), - [anon_sym_default] = ACTIONS(1080), - [anon_sym_while] = ACTIONS(1080), - [anon_sym_do] = ACTIONS(1080), - [anon_sym_for] = ACTIONS(1080), - [anon_sym_return] = ACTIONS(1080), - [anon_sym_break] = ACTIONS(1080), - [anon_sym_continue] = ACTIONS(1080), - [anon_sym_goto] = ACTIONS(1080), - [anon_sym_DASH_DASH] = ACTIONS(1082), - [anon_sym_PLUS_PLUS] = ACTIONS(1082), - [anon_sym_sizeof] = ACTIONS(1080), - [sym_number_literal] = ACTIONS(1082), - [anon_sym_L_SQUOTE] = ACTIONS(1082), - [anon_sym_u_SQUOTE] = ACTIONS(1082), - [anon_sym_U_SQUOTE] = ACTIONS(1082), - [anon_sym_u8_SQUOTE] = ACTIONS(1082), - [anon_sym_SQUOTE] = ACTIONS(1082), - [anon_sym_L_DQUOTE] = ACTIONS(1082), - [anon_sym_u_DQUOTE] = ACTIONS(1082), - [anon_sym_U_DQUOTE] = ACTIONS(1082), - [anon_sym_u8_DQUOTE] = ACTIONS(1082), - [anon_sym_DQUOTE] = ACTIONS(1082), - [sym_true] = ACTIONS(1080), - [sym_false] = ACTIONS(1080), - [sym_null] = ACTIONS(1080), - [sym_comment] = ACTIONS(3), - }, - [320] = { - [sym_identifier] = ACTIONS(1100), - [aux_sym_preproc_include_token1] = ACTIONS(1100), - [aux_sym_preproc_def_token1] = ACTIONS(1100), - [aux_sym_preproc_if_token1] = ACTIONS(1100), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1100), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1100), - [sym_preproc_directive] = ACTIONS(1100), - [anon_sym_LPAREN2] = ACTIONS(1102), - [anon_sym_BANG] = ACTIONS(1102), - [anon_sym_TILDE] = ACTIONS(1102), - [anon_sym_DASH] = ACTIONS(1100), - [anon_sym_PLUS] = ACTIONS(1100), - [anon_sym_STAR] = ACTIONS(1102), - [anon_sym_AMP] = ACTIONS(1102), - [anon_sym_SEMI] = ACTIONS(1102), - [anon_sym_typedef] = ACTIONS(1100), - [anon_sym_extern] = ACTIONS(1100), - [anon_sym___attribute__] = ACTIONS(1100), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1102), - [anon_sym___declspec] = ACTIONS(1100), - [anon_sym___cdecl] = ACTIONS(1100), - [anon_sym___clrcall] = ACTIONS(1100), - [anon_sym___stdcall] = ACTIONS(1100), - [anon_sym___fastcall] = ACTIONS(1100), - [anon_sym___thiscall] = ACTIONS(1100), - [anon_sym___vectorcall] = ACTIONS(1100), - [anon_sym_LBRACE] = ACTIONS(1102), - [anon_sym_RBRACE] = ACTIONS(1102), - [anon_sym_static] = ACTIONS(1100), - [anon_sym_auto] = ACTIONS(1100), - [anon_sym_register] = ACTIONS(1100), - [anon_sym_inline] = ACTIONS(1100), - [anon_sym_const] = ACTIONS(1100), - [anon_sym_volatile] = ACTIONS(1100), - [anon_sym_restrict] = ACTIONS(1100), - [anon_sym__Atomic] = ACTIONS(1100), - [anon_sym_signed] = ACTIONS(1100), - [anon_sym_unsigned] = ACTIONS(1100), - [anon_sym_long] = ACTIONS(1100), - [anon_sym_short] = ACTIONS(1100), - [sym_primitive_type] = ACTIONS(1100), - [anon_sym_enum] = ACTIONS(1100), - [anon_sym_struct] = ACTIONS(1100), - [anon_sym_union] = ACTIONS(1100), - [anon_sym_if] = ACTIONS(1100), - [anon_sym_switch] = ACTIONS(1100), - [anon_sym_case] = ACTIONS(1100), - [anon_sym_default] = ACTIONS(1100), - [anon_sym_while] = ACTIONS(1100), - [anon_sym_do] = ACTIONS(1100), - [anon_sym_for] = ACTIONS(1100), - [anon_sym_return] = ACTIONS(1100), - [anon_sym_break] = ACTIONS(1100), - [anon_sym_continue] = ACTIONS(1100), - [anon_sym_goto] = ACTIONS(1100), - [anon_sym_DASH_DASH] = ACTIONS(1102), - [anon_sym_PLUS_PLUS] = ACTIONS(1102), - [anon_sym_sizeof] = ACTIONS(1100), - [sym_number_literal] = ACTIONS(1102), - [anon_sym_L_SQUOTE] = ACTIONS(1102), - [anon_sym_u_SQUOTE] = ACTIONS(1102), - [anon_sym_U_SQUOTE] = ACTIONS(1102), - [anon_sym_u8_SQUOTE] = ACTIONS(1102), - [anon_sym_SQUOTE] = ACTIONS(1102), - [anon_sym_L_DQUOTE] = ACTIONS(1102), - [anon_sym_u_DQUOTE] = ACTIONS(1102), - [anon_sym_U_DQUOTE] = ACTIONS(1102), - [anon_sym_u8_DQUOTE] = ACTIONS(1102), - [anon_sym_DQUOTE] = ACTIONS(1102), - [sym_true] = ACTIONS(1100), - [sym_false] = ACTIONS(1100), - [sym_null] = ACTIONS(1100), - [sym_comment] = ACTIONS(3), - }, - [321] = { - [sym_identifier] = ACTIONS(1028), - [aux_sym_preproc_include_token1] = ACTIONS(1028), - [aux_sym_preproc_def_token1] = ACTIONS(1028), - [aux_sym_preproc_if_token1] = ACTIONS(1028), - [aux_sym_preproc_if_token2] = ACTIONS(1028), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1028), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1028), - [sym_preproc_directive] = ACTIONS(1028), - [anon_sym_LPAREN2] = ACTIONS(1030), - [anon_sym_BANG] = ACTIONS(1030), - [anon_sym_TILDE] = ACTIONS(1030), - [anon_sym_DASH] = ACTIONS(1028), - [anon_sym_PLUS] = ACTIONS(1028), - [anon_sym_STAR] = ACTIONS(1030), - [anon_sym_AMP] = ACTIONS(1030), - [anon_sym_SEMI] = ACTIONS(1030), - [anon_sym_typedef] = ACTIONS(1028), - [anon_sym_extern] = ACTIONS(1028), - [anon_sym___attribute__] = ACTIONS(1028), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1030), - [anon_sym___declspec] = ACTIONS(1028), - [anon_sym___cdecl] = ACTIONS(1028), - [anon_sym___clrcall] = ACTIONS(1028), - [anon_sym___stdcall] = ACTIONS(1028), - [anon_sym___fastcall] = ACTIONS(1028), - [anon_sym___thiscall] = ACTIONS(1028), - [anon_sym___vectorcall] = ACTIONS(1028), - [anon_sym_LBRACE] = ACTIONS(1030), - [anon_sym_static] = ACTIONS(1028), - [anon_sym_auto] = ACTIONS(1028), - [anon_sym_register] = ACTIONS(1028), - [anon_sym_inline] = ACTIONS(1028), - [anon_sym_const] = ACTIONS(1028), - [anon_sym_volatile] = ACTIONS(1028), - [anon_sym_restrict] = ACTIONS(1028), - [anon_sym__Atomic] = ACTIONS(1028), - [anon_sym_signed] = ACTIONS(1028), - [anon_sym_unsigned] = ACTIONS(1028), - [anon_sym_long] = ACTIONS(1028), - [anon_sym_short] = ACTIONS(1028), - [sym_primitive_type] = ACTIONS(1028), - [anon_sym_enum] = ACTIONS(1028), - [anon_sym_struct] = ACTIONS(1028), - [anon_sym_union] = ACTIONS(1028), - [anon_sym_if] = ACTIONS(1028), - [anon_sym_switch] = ACTIONS(1028), - [anon_sym_case] = ACTIONS(1028), - [anon_sym_default] = ACTIONS(1028), - [anon_sym_while] = ACTIONS(1028), - [anon_sym_do] = ACTIONS(1028), - [anon_sym_for] = ACTIONS(1028), - [anon_sym_return] = ACTIONS(1028), - [anon_sym_break] = ACTIONS(1028), - [anon_sym_continue] = ACTIONS(1028), - [anon_sym_goto] = ACTIONS(1028), - [anon_sym_DASH_DASH] = ACTIONS(1030), - [anon_sym_PLUS_PLUS] = ACTIONS(1030), - [anon_sym_sizeof] = ACTIONS(1028), - [sym_number_literal] = ACTIONS(1030), - [anon_sym_L_SQUOTE] = ACTIONS(1030), - [anon_sym_u_SQUOTE] = ACTIONS(1030), - [anon_sym_U_SQUOTE] = ACTIONS(1030), - [anon_sym_u8_SQUOTE] = ACTIONS(1030), - [anon_sym_SQUOTE] = ACTIONS(1030), - [anon_sym_L_DQUOTE] = ACTIONS(1030), - [anon_sym_u_DQUOTE] = ACTIONS(1030), - [anon_sym_U_DQUOTE] = ACTIONS(1030), - [anon_sym_u8_DQUOTE] = ACTIONS(1030), - [anon_sym_DQUOTE] = ACTIONS(1030), - [sym_true] = ACTIONS(1028), - [sym_false] = ACTIONS(1028), - [sym_null] = ACTIONS(1028), - [sym_comment] = ACTIONS(3), - }, - [322] = { - [sym_identifier] = ACTIONS(1104), - [aux_sym_preproc_include_token1] = ACTIONS(1104), - [aux_sym_preproc_def_token1] = ACTIONS(1104), - [aux_sym_preproc_if_token1] = ACTIONS(1104), - [aux_sym_preproc_if_token2] = ACTIONS(1104), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1104), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1104), - [sym_preproc_directive] = ACTIONS(1104), - [anon_sym_LPAREN2] = ACTIONS(1106), - [anon_sym_BANG] = ACTIONS(1106), - [anon_sym_TILDE] = ACTIONS(1106), - [anon_sym_DASH] = ACTIONS(1104), - [anon_sym_PLUS] = ACTIONS(1104), - [anon_sym_STAR] = ACTIONS(1106), - [anon_sym_AMP] = ACTIONS(1106), - [anon_sym_SEMI] = ACTIONS(1106), - [anon_sym_typedef] = ACTIONS(1104), - [anon_sym_extern] = ACTIONS(1104), - [anon_sym___attribute__] = ACTIONS(1104), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1106), - [anon_sym___declspec] = ACTIONS(1104), - [anon_sym___cdecl] = ACTIONS(1104), - [anon_sym___clrcall] = ACTIONS(1104), - [anon_sym___stdcall] = ACTIONS(1104), - [anon_sym___fastcall] = ACTIONS(1104), - [anon_sym___thiscall] = ACTIONS(1104), - [anon_sym___vectorcall] = ACTIONS(1104), - [anon_sym_LBRACE] = ACTIONS(1106), - [anon_sym_static] = ACTIONS(1104), - [anon_sym_auto] = ACTIONS(1104), - [anon_sym_register] = ACTIONS(1104), - [anon_sym_inline] = ACTIONS(1104), - [anon_sym_const] = ACTIONS(1104), - [anon_sym_volatile] = ACTIONS(1104), - [anon_sym_restrict] = ACTIONS(1104), - [anon_sym__Atomic] = ACTIONS(1104), - [anon_sym_signed] = ACTIONS(1104), - [anon_sym_unsigned] = ACTIONS(1104), - [anon_sym_long] = ACTIONS(1104), - [anon_sym_short] = ACTIONS(1104), - [sym_primitive_type] = ACTIONS(1104), - [anon_sym_enum] = ACTIONS(1104), - [anon_sym_struct] = ACTIONS(1104), - [anon_sym_union] = ACTIONS(1104), - [anon_sym_if] = ACTIONS(1104), - [anon_sym_switch] = ACTIONS(1104), - [anon_sym_case] = ACTIONS(1104), - [anon_sym_default] = ACTIONS(1104), - [anon_sym_while] = ACTIONS(1104), - [anon_sym_do] = ACTIONS(1104), - [anon_sym_for] = ACTIONS(1104), - [anon_sym_return] = ACTIONS(1104), - [anon_sym_break] = ACTIONS(1104), - [anon_sym_continue] = ACTIONS(1104), - [anon_sym_goto] = ACTIONS(1104), - [anon_sym_DASH_DASH] = ACTIONS(1106), - [anon_sym_PLUS_PLUS] = ACTIONS(1106), - [anon_sym_sizeof] = ACTIONS(1104), - [sym_number_literal] = ACTIONS(1106), - [anon_sym_L_SQUOTE] = ACTIONS(1106), - [anon_sym_u_SQUOTE] = ACTIONS(1106), - [anon_sym_U_SQUOTE] = ACTIONS(1106), - [anon_sym_u8_SQUOTE] = ACTIONS(1106), - [anon_sym_SQUOTE] = ACTIONS(1106), - [anon_sym_L_DQUOTE] = ACTIONS(1106), - [anon_sym_u_DQUOTE] = ACTIONS(1106), - [anon_sym_U_DQUOTE] = ACTIONS(1106), - [anon_sym_u8_DQUOTE] = ACTIONS(1106), - [anon_sym_DQUOTE] = ACTIONS(1106), - [sym_true] = ACTIONS(1104), - [sym_false] = ACTIONS(1104), - [sym_null] = ACTIONS(1104), - [sym_comment] = ACTIONS(3), - }, - [323] = { - [sym_identifier] = ACTIONS(1072), - [aux_sym_preproc_include_token1] = ACTIONS(1072), - [aux_sym_preproc_def_token1] = ACTIONS(1072), - [aux_sym_preproc_if_token1] = ACTIONS(1072), - [aux_sym_preproc_if_token2] = ACTIONS(1072), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1072), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1072), - [sym_preproc_directive] = ACTIONS(1072), - [anon_sym_LPAREN2] = ACTIONS(1074), - [anon_sym_BANG] = ACTIONS(1074), - [anon_sym_TILDE] = ACTIONS(1074), - [anon_sym_DASH] = ACTIONS(1072), - [anon_sym_PLUS] = ACTIONS(1072), - [anon_sym_STAR] = ACTIONS(1074), - [anon_sym_AMP] = ACTIONS(1074), - [anon_sym_SEMI] = ACTIONS(1074), - [anon_sym_typedef] = ACTIONS(1072), - [anon_sym_extern] = ACTIONS(1072), - [anon_sym___attribute__] = ACTIONS(1072), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1074), - [anon_sym___declspec] = ACTIONS(1072), - [anon_sym___cdecl] = ACTIONS(1072), - [anon_sym___clrcall] = ACTIONS(1072), - [anon_sym___stdcall] = ACTIONS(1072), - [anon_sym___fastcall] = ACTIONS(1072), - [anon_sym___thiscall] = ACTIONS(1072), - [anon_sym___vectorcall] = ACTIONS(1072), - [anon_sym_LBRACE] = ACTIONS(1074), - [anon_sym_static] = ACTIONS(1072), - [anon_sym_auto] = ACTIONS(1072), - [anon_sym_register] = ACTIONS(1072), - [anon_sym_inline] = ACTIONS(1072), - [anon_sym_const] = ACTIONS(1072), - [anon_sym_volatile] = ACTIONS(1072), - [anon_sym_restrict] = ACTIONS(1072), - [anon_sym__Atomic] = ACTIONS(1072), - [anon_sym_signed] = ACTIONS(1072), - [anon_sym_unsigned] = ACTIONS(1072), - [anon_sym_long] = ACTIONS(1072), - [anon_sym_short] = ACTIONS(1072), - [sym_primitive_type] = ACTIONS(1072), - [anon_sym_enum] = ACTIONS(1072), - [anon_sym_struct] = ACTIONS(1072), - [anon_sym_union] = ACTIONS(1072), - [anon_sym_if] = ACTIONS(1072), - [anon_sym_switch] = ACTIONS(1072), - [anon_sym_case] = ACTIONS(1072), - [anon_sym_default] = ACTIONS(1072), - [anon_sym_while] = ACTIONS(1072), - [anon_sym_do] = ACTIONS(1072), - [anon_sym_for] = ACTIONS(1072), - [anon_sym_return] = ACTIONS(1072), - [anon_sym_break] = ACTIONS(1072), - [anon_sym_continue] = ACTIONS(1072), - [anon_sym_goto] = ACTIONS(1072), - [anon_sym_DASH_DASH] = ACTIONS(1074), - [anon_sym_PLUS_PLUS] = ACTIONS(1074), - [anon_sym_sizeof] = ACTIONS(1072), - [sym_number_literal] = ACTIONS(1074), - [anon_sym_L_SQUOTE] = ACTIONS(1074), - [anon_sym_u_SQUOTE] = ACTIONS(1074), - [anon_sym_U_SQUOTE] = ACTIONS(1074), - [anon_sym_u8_SQUOTE] = ACTIONS(1074), - [anon_sym_SQUOTE] = ACTIONS(1074), - [anon_sym_L_DQUOTE] = ACTIONS(1074), - [anon_sym_u_DQUOTE] = ACTIONS(1074), - [anon_sym_U_DQUOTE] = ACTIONS(1074), - [anon_sym_u8_DQUOTE] = ACTIONS(1074), - [anon_sym_DQUOTE] = ACTIONS(1074), - [sym_true] = ACTIONS(1072), - [sym_false] = ACTIONS(1072), - [sym_null] = ACTIONS(1072), - [sym_comment] = ACTIONS(3), - }, - [324] = { - [ts_builtin_sym_end] = ACTIONS(1074), - [sym_identifier] = ACTIONS(1072), - [aux_sym_preproc_include_token1] = ACTIONS(1072), - [aux_sym_preproc_def_token1] = ACTIONS(1072), - [aux_sym_preproc_if_token1] = ACTIONS(1072), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1072), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1072), - [sym_preproc_directive] = ACTIONS(1072), - [anon_sym_LPAREN2] = ACTIONS(1074), - [anon_sym_BANG] = ACTIONS(1074), - [anon_sym_TILDE] = ACTIONS(1074), - [anon_sym_DASH] = ACTIONS(1072), - [anon_sym_PLUS] = ACTIONS(1072), - [anon_sym_STAR] = ACTIONS(1074), - [anon_sym_AMP] = ACTIONS(1074), - [anon_sym_SEMI] = ACTIONS(1074), - [anon_sym_typedef] = ACTIONS(1072), - [anon_sym_extern] = ACTIONS(1072), - [anon_sym___attribute__] = ACTIONS(1072), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1074), - [anon_sym___declspec] = ACTIONS(1072), - [anon_sym___cdecl] = ACTIONS(1072), - [anon_sym___clrcall] = ACTIONS(1072), - [anon_sym___stdcall] = ACTIONS(1072), - [anon_sym___fastcall] = ACTIONS(1072), - [anon_sym___thiscall] = ACTIONS(1072), - [anon_sym___vectorcall] = ACTIONS(1072), - [anon_sym_LBRACE] = ACTIONS(1074), - [anon_sym_static] = ACTIONS(1072), - [anon_sym_auto] = ACTIONS(1072), - [anon_sym_register] = ACTIONS(1072), - [anon_sym_inline] = ACTIONS(1072), - [anon_sym_const] = ACTIONS(1072), - [anon_sym_volatile] = ACTIONS(1072), - [anon_sym_restrict] = ACTIONS(1072), - [anon_sym__Atomic] = ACTIONS(1072), - [anon_sym_signed] = ACTIONS(1072), - [anon_sym_unsigned] = ACTIONS(1072), - [anon_sym_long] = ACTIONS(1072), - [anon_sym_short] = ACTIONS(1072), - [sym_primitive_type] = ACTIONS(1072), - [anon_sym_enum] = ACTIONS(1072), - [anon_sym_struct] = ACTIONS(1072), - [anon_sym_union] = ACTIONS(1072), - [anon_sym_if] = ACTIONS(1072), - [anon_sym_switch] = ACTIONS(1072), - [anon_sym_case] = ACTIONS(1072), - [anon_sym_default] = ACTIONS(1072), - [anon_sym_while] = ACTIONS(1072), - [anon_sym_do] = ACTIONS(1072), - [anon_sym_for] = ACTIONS(1072), - [anon_sym_return] = ACTIONS(1072), - [anon_sym_break] = ACTIONS(1072), - [anon_sym_continue] = ACTIONS(1072), - [anon_sym_goto] = ACTIONS(1072), - [anon_sym_DASH_DASH] = ACTIONS(1074), - [anon_sym_PLUS_PLUS] = ACTIONS(1074), - [anon_sym_sizeof] = ACTIONS(1072), - [sym_number_literal] = ACTIONS(1074), - [anon_sym_L_SQUOTE] = ACTIONS(1074), - [anon_sym_u_SQUOTE] = ACTIONS(1074), - [anon_sym_U_SQUOTE] = ACTIONS(1074), - [anon_sym_u8_SQUOTE] = ACTIONS(1074), - [anon_sym_SQUOTE] = ACTIONS(1074), - [anon_sym_L_DQUOTE] = ACTIONS(1074), - [anon_sym_u_DQUOTE] = ACTIONS(1074), - [anon_sym_U_DQUOTE] = ACTIONS(1074), - [anon_sym_u8_DQUOTE] = ACTIONS(1074), - [anon_sym_DQUOTE] = ACTIONS(1074), - [sym_true] = ACTIONS(1072), - [sym_false] = ACTIONS(1072), - [sym_null] = ACTIONS(1072), - [sym_comment] = ACTIONS(3), - }, - [325] = { - [ts_builtin_sym_end] = ACTIONS(1034), - [sym_identifier] = ACTIONS(1032), - [aux_sym_preproc_include_token1] = ACTIONS(1032), - [aux_sym_preproc_def_token1] = ACTIONS(1032), - [aux_sym_preproc_if_token1] = ACTIONS(1032), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1032), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1032), - [sym_preproc_directive] = ACTIONS(1032), - [anon_sym_LPAREN2] = ACTIONS(1034), - [anon_sym_BANG] = ACTIONS(1034), - [anon_sym_TILDE] = ACTIONS(1034), - [anon_sym_DASH] = ACTIONS(1032), - [anon_sym_PLUS] = ACTIONS(1032), - [anon_sym_STAR] = ACTIONS(1034), - [anon_sym_AMP] = ACTIONS(1034), - [anon_sym_SEMI] = ACTIONS(1034), - [anon_sym_typedef] = ACTIONS(1032), - [anon_sym_extern] = ACTIONS(1032), - [anon_sym___attribute__] = ACTIONS(1032), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1034), - [anon_sym___declspec] = ACTIONS(1032), - [anon_sym___cdecl] = ACTIONS(1032), - [anon_sym___clrcall] = ACTIONS(1032), - [anon_sym___stdcall] = ACTIONS(1032), - [anon_sym___fastcall] = ACTIONS(1032), - [anon_sym___thiscall] = ACTIONS(1032), - [anon_sym___vectorcall] = ACTIONS(1032), - [anon_sym_LBRACE] = ACTIONS(1034), - [anon_sym_static] = ACTIONS(1032), - [anon_sym_auto] = ACTIONS(1032), - [anon_sym_register] = ACTIONS(1032), - [anon_sym_inline] = ACTIONS(1032), - [anon_sym_const] = ACTIONS(1032), - [anon_sym_volatile] = ACTIONS(1032), - [anon_sym_restrict] = ACTIONS(1032), - [anon_sym__Atomic] = ACTIONS(1032), - [anon_sym_signed] = ACTIONS(1032), - [anon_sym_unsigned] = ACTIONS(1032), - [anon_sym_long] = ACTIONS(1032), - [anon_sym_short] = ACTIONS(1032), - [sym_primitive_type] = ACTIONS(1032), - [anon_sym_enum] = ACTIONS(1032), - [anon_sym_struct] = ACTIONS(1032), - [anon_sym_union] = ACTIONS(1032), - [anon_sym_if] = ACTIONS(1032), - [anon_sym_switch] = ACTIONS(1032), - [anon_sym_case] = ACTIONS(1032), - [anon_sym_default] = ACTIONS(1032), - [anon_sym_while] = ACTIONS(1032), - [anon_sym_do] = ACTIONS(1032), - [anon_sym_for] = ACTIONS(1032), - [anon_sym_return] = ACTIONS(1032), - [anon_sym_break] = ACTIONS(1032), - [anon_sym_continue] = ACTIONS(1032), - [anon_sym_goto] = ACTIONS(1032), - [anon_sym_DASH_DASH] = ACTIONS(1034), - [anon_sym_PLUS_PLUS] = ACTIONS(1034), - [anon_sym_sizeof] = ACTIONS(1032), - [sym_number_literal] = ACTIONS(1034), - [anon_sym_L_SQUOTE] = ACTIONS(1034), - [anon_sym_u_SQUOTE] = ACTIONS(1034), - [anon_sym_U_SQUOTE] = ACTIONS(1034), - [anon_sym_u8_SQUOTE] = ACTIONS(1034), - [anon_sym_SQUOTE] = ACTIONS(1034), - [anon_sym_L_DQUOTE] = ACTIONS(1034), - [anon_sym_u_DQUOTE] = ACTIONS(1034), - [anon_sym_U_DQUOTE] = ACTIONS(1034), - [anon_sym_u8_DQUOTE] = ACTIONS(1034), - [anon_sym_DQUOTE] = ACTIONS(1034), - [sym_true] = ACTIONS(1032), - [sym_false] = ACTIONS(1032), - [sym_null] = ACTIONS(1032), - [sym_comment] = ACTIONS(3), - }, - [326] = { - [sym_identifier] = ACTIONS(1080), - [aux_sym_preproc_include_token1] = ACTIONS(1080), - [aux_sym_preproc_def_token1] = ACTIONS(1080), - [aux_sym_preproc_if_token1] = ACTIONS(1080), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1080), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1080), - [sym_preproc_directive] = ACTIONS(1080), - [anon_sym_LPAREN2] = ACTIONS(1082), - [anon_sym_BANG] = ACTIONS(1082), - [anon_sym_TILDE] = ACTIONS(1082), - [anon_sym_DASH] = ACTIONS(1080), - [anon_sym_PLUS] = ACTIONS(1080), - [anon_sym_STAR] = ACTIONS(1082), - [anon_sym_AMP] = ACTIONS(1082), - [anon_sym_SEMI] = ACTIONS(1082), - [anon_sym_typedef] = ACTIONS(1080), - [anon_sym_extern] = ACTIONS(1080), - [anon_sym___attribute__] = ACTIONS(1080), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1082), - [anon_sym___declspec] = ACTIONS(1080), - [anon_sym___cdecl] = ACTIONS(1080), - [anon_sym___clrcall] = ACTIONS(1080), - [anon_sym___stdcall] = ACTIONS(1080), - [anon_sym___fastcall] = ACTIONS(1080), - [anon_sym___thiscall] = ACTIONS(1080), - [anon_sym___vectorcall] = ACTIONS(1080), - [anon_sym_LBRACE] = ACTIONS(1082), - [anon_sym_RBRACE] = ACTIONS(1082), - [anon_sym_static] = ACTIONS(1080), - [anon_sym_auto] = ACTIONS(1080), - [anon_sym_register] = ACTIONS(1080), - [anon_sym_inline] = ACTIONS(1080), - [anon_sym_const] = ACTIONS(1080), - [anon_sym_volatile] = ACTIONS(1080), - [anon_sym_restrict] = ACTIONS(1080), - [anon_sym__Atomic] = ACTIONS(1080), - [anon_sym_signed] = ACTIONS(1080), - [anon_sym_unsigned] = ACTIONS(1080), - [anon_sym_long] = ACTIONS(1080), - [anon_sym_short] = ACTIONS(1080), - [sym_primitive_type] = ACTIONS(1080), - [anon_sym_enum] = ACTIONS(1080), - [anon_sym_struct] = ACTIONS(1080), - [anon_sym_union] = ACTIONS(1080), - [anon_sym_if] = ACTIONS(1080), - [anon_sym_switch] = ACTIONS(1080), - [anon_sym_case] = ACTIONS(1080), - [anon_sym_default] = ACTIONS(1080), - [anon_sym_while] = ACTIONS(1080), - [anon_sym_do] = ACTIONS(1080), - [anon_sym_for] = ACTIONS(1080), - [anon_sym_return] = ACTIONS(1080), - [anon_sym_break] = ACTIONS(1080), - [anon_sym_continue] = ACTIONS(1080), - [anon_sym_goto] = ACTIONS(1080), - [anon_sym_DASH_DASH] = ACTIONS(1082), - [anon_sym_PLUS_PLUS] = ACTIONS(1082), - [anon_sym_sizeof] = ACTIONS(1080), - [sym_number_literal] = ACTIONS(1082), - [anon_sym_L_SQUOTE] = ACTIONS(1082), - [anon_sym_u_SQUOTE] = ACTIONS(1082), - [anon_sym_U_SQUOTE] = ACTIONS(1082), - [anon_sym_u8_SQUOTE] = ACTIONS(1082), - [anon_sym_SQUOTE] = ACTIONS(1082), - [anon_sym_L_DQUOTE] = ACTIONS(1082), - [anon_sym_u_DQUOTE] = ACTIONS(1082), - [anon_sym_U_DQUOTE] = ACTIONS(1082), - [anon_sym_u8_DQUOTE] = ACTIONS(1082), - [anon_sym_DQUOTE] = ACTIONS(1082), - [sym_true] = ACTIONS(1080), - [sym_false] = ACTIONS(1080), - [sym_null] = ACTIONS(1080), - [sym_comment] = ACTIONS(3), - }, - [327] = { - [ts_builtin_sym_end] = ACTIONS(1098), - [sym_identifier] = ACTIONS(1096), - [aux_sym_preproc_include_token1] = ACTIONS(1096), - [aux_sym_preproc_def_token1] = ACTIONS(1096), - [aux_sym_preproc_if_token1] = ACTIONS(1096), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1096), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1096), - [sym_preproc_directive] = ACTIONS(1096), - [anon_sym_LPAREN2] = ACTIONS(1098), - [anon_sym_BANG] = ACTIONS(1098), - [anon_sym_TILDE] = ACTIONS(1098), - [anon_sym_DASH] = ACTIONS(1096), - [anon_sym_PLUS] = ACTIONS(1096), - [anon_sym_STAR] = ACTIONS(1098), - [anon_sym_AMP] = ACTIONS(1098), - [anon_sym_SEMI] = ACTIONS(1098), - [anon_sym_typedef] = ACTIONS(1096), - [anon_sym_extern] = ACTIONS(1096), - [anon_sym___attribute__] = ACTIONS(1096), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1098), - [anon_sym___declspec] = ACTIONS(1096), - [anon_sym___cdecl] = ACTIONS(1096), - [anon_sym___clrcall] = ACTIONS(1096), - [anon_sym___stdcall] = ACTIONS(1096), - [anon_sym___fastcall] = ACTIONS(1096), - [anon_sym___thiscall] = ACTIONS(1096), - [anon_sym___vectorcall] = ACTIONS(1096), - [anon_sym_LBRACE] = ACTIONS(1098), - [anon_sym_static] = ACTIONS(1096), - [anon_sym_auto] = ACTIONS(1096), - [anon_sym_register] = ACTIONS(1096), - [anon_sym_inline] = ACTIONS(1096), - [anon_sym_const] = ACTIONS(1096), - [anon_sym_volatile] = ACTIONS(1096), - [anon_sym_restrict] = ACTIONS(1096), - [anon_sym__Atomic] = ACTIONS(1096), - [anon_sym_signed] = ACTIONS(1096), - [anon_sym_unsigned] = ACTIONS(1096), - [anon_sym_long] = ACTIONS(1096), - [anon_sym_short] = ACTIONS(1096), - [sym_primitive_type] = ACTIONS(1096), - [anon_sym_enum] = ACTIONS(1096), - [anon_sym_struct] = ACTIONS(1096), - [anon_sym_union] = ACTIONS(1096), - [anon_sym_if] = ACTIONS(1096), - [anon_sym_switch] = ACTIONS(1096), - [anon_sym_case] = ACTIONS(1096), - [anon_sym_default] = ACTIONS(1096), - [anon_sym_while] = ACTIONS(1096), - [anon_sym_do] = ACTIONS(1096), - [anon_sym_for] = ACTIONS(1096), - [anon_sym_return] = ACTIONS(1096), - [anon_sym_break] = ACTIONS(1096), - [anon_sym_continue] = ACTIONS(1096), - [anon_sym_goto] = ACTIONS(1096), - [anon_sym_DASH_DASH] = ACTIONS(1098), - [anon_sym_PLUS_PLUS] = ACTIONS(1098), - [anon_sym_sizeof] = ACTIONS(1096), - [sym_number_literal] = ACTIONS(1098), - [anon_sym_L_SQUOTE] = ACTIONS(1098), - [anon_sym_u_SQUOTE] = ACTIONS(1098), - [anon_sym_U_SQUOTE] = ACTIONS(1098), - [anon_sym_u8_SQUOTE] = ACTIONS(1098), - [anon_sym_SQUOTE] = ACTIONS(1098), - [anon_sym_L_DQUOTE] = ACTIONS(1098), - [anon_sym_u_DQUOTE] = ACTIONS(1098), - [anon_sym_U_DQUOTE] = ACTIONS(1098), - [anon_sym_u8_DQUOTE] = ACTIONS(1098), - [anon_sym_DQUOTE] = ACTIONS(1098), - [sym_true] = ACTIONS(1096), - [sym_false] = ACTIONS(1096), - [sym_null] = ACTIONS(1096), - [sym_comment] = ACTIONS(3), - }, - [328] = { - [sym_identifier] = ACTIONS(1088), - [aux_sym_preproc_include_token1] = ACTIONS(1088), - [aux_sym_preproc_def_token1] = ACTIONS(1088), - [aux_sym_preproc_if_token1] = ACTIONS(1088), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1088), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1088), - [sym_preproc_directive] = ACTIONS(1088), - [anon_sym_LPAREN2] = ACTIONS(1090), - [anon_sym_BANG] = ACTIONS(1090), - [anon_sym_TILDE] = ACTIONS(1090), - [anon_sym_DASH] = ACTIONS(1088), - [anon_sym_PLUS] = ACTIONS(1088), - [anon_sym_STAR] = ACTIONS(1090), - [anon_sym_AMP] = ACTIONS(1090), - [anon_sym_SEMI] = ACTIONS(1090), - [anon_sym_typedef] = ACTIONS(1088), - [anon_sym_extern] = ACTIONS(1088), - [anon_sym___attribute__] = ACTIONS(1088), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1090), - [anon_sym___declspec] = ACTIONS(1088), - [anon_sym___cdecl] = ACTIONS(1088), - [anon_sym___clrcall] = ACTIONS(1088), - [anon_sym___stdcall] = ACTIONS(1088), - [anon_sym___fastcall] = ACTIONS(1088), - [anon_sym___thiscall] = ACTIONS(1088), - [anon_sym___vectorcall] = ACTIONS(1088), - [anon_sym_LBRACE] = ACTIONS(1090), - [anon_sym_RBRACE] = ACTIONS(1090), - [anon_sym_static] = ACTIONS(1088), - [anon_sym_auto] = ACTIONS(1088), - [anon_sym_register] = ACTIONS(1088), - [anon_sym_inline] = ACTIONS(1088), - [anon_sym_const] = ACTIONS(1088), - [anon_sym_volatile] = ACTIONS(1088), - [anon_sym_restrict] = ACTIONS(1088), - [anon_sym__Atomic] = ACTIONS(1088), - [anon_sym_signed] = ACTIONS(1088), - [anon_sym_unsigned] = ACTIONS(1088), - [anon_sym_long] = ACTIONS(1088), - [anon_sym_short] = ACTIONS(1088), - [sym_primitive_type] = ACTIONS(1088), - [anon_sym_enum] = ACTIONS(1088), - [anon_sym_struct] = ACTIONS(1088), - [anon_sym_union] = ACTIONS(1088), - [anon_sym_if] = ACTIONS(1088), - [anon_sym_switch] = ACTIONS(1088), - [anon_sym_case] = ACTIONS(1088), - [anon_sym_default] = ACTIONS(1088), - [anon_sym_while] = ACTIONS(1088), - [anon_sym_do] = ACTIONS(1088), - [anon_sym_for] = ACTIONS(1088), - [anon_sym_return] = ACTIONS(1088), - [anon_sym_break] = ACTIONS(1088), - [anon_sym_continue] = ACTIONS(1088), - [anon_sym_goto] = ACTIONS(1088), - [anon_sym_DASH_DASH] = ACTIONS(1090), - [anon_sym_PLUS_PLUS] = ACTIONS(1090), - [anon_sym_sizeof] = ACTIONS(1088), - [sym_number_literal] = ACTIONS(1090), - [anon_sym_L_SQUOTE] = ACTIONS(1090), - [anon_sym_u_SQUOTE] = ACTIONS(1090), - [anon_sym_U_SQUOTE] = ACTIONS(1090), - [anon_sym_u8_SQUOTE] = ACTIONS(1090), - [anon_sym_SQUOTE] = ACTIONS(1090), - [anon_sym_L_DQUOTE] = ACTIONS(1090), - [anon_sym_u_DQUOTE] = ACTIONS(1090), - [anon_sym_U_DQUOTE] = ACTIONS(1090), - [anon_sym_u8_DQUOTE] = ACTIONS(1090), - [anon_sym_DQUOTE] = ACTIONS(1090), - [sym_true] = ACTIONS(1088), - [sym_false] = ACTIONS(1088), - [sym_null] = ACTIONS(1088), - [sym_comment] = ACTIONS(3), - }, - [329] = { - [ts_builtin_sym_end] = ACTIONS(1122), - [sym_identifier] = ACTIONS(1120), - [aux_sym_preproc_include_token1] = ACTIONS(1120), - [aux_sym_preproc_def_token1] = ACTIONS(1120), - [aux_sym_preproc_if_token1] = ACTIONS(1120), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1120), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1120), - [sym_preproc_directive] = ACTIONS(1120), - [anon_sym_LPAREN2] = ACTIONS(1122), - [anon_sym_BANG] = ACTIONS(1122), - [anon_sym_TILDE] = ACTIONS(1122), - [anon_sym_DASH] = ACTIONS(1120), - [anon_sym_PLUS] = ACTIONS(1120), - [anon_sym_STAR] = ACTIONS(1122), - [anon_sym_AMP] = ACTIONS(1122), - [anon_sym_SEMI] = ACTIONS(1122), - [anon_sym_typedef] = ACTIONS(1120), - [anon_sym_extern] = ACTIONS(1120), - [anon_sym___attribute__] = ACTIONS(1120), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1122), - [anon_sym___declspec] = ACTIONS(1120), - [anon_sym___cdecl] = ACTIONS(1120), - [anon_sym___clrcall] = ACTIONS(1120), - [anon_sym___stdcall] = ACTIONS(1120), - [anon_sym___fastcall] = ACTIONS(1120), - [anon_sym___thiscall] = ACTIONS(1120), - [anon_sym___vectorcall] = ACTIONS(1120), - [anon_sym_LBRACE] = ACTIONS(1122), - [anon_sym_static] = ACTIONS(1120), - [anon_sym_auto] = ACTIONS(1120), - [anon_sym_register] = ACTIONS(1120), - [anon_sym_inline] = ACTIONS(1120), - [anon_sym_const] = ACTIONS(1120), - [anon_sym_volatile] = ACTIONS(1120), - [anon_sym_restrict] = ACTIONS(1120), - [anon_sym__Atomic] = ACTIONS(1120), - [anon_sym_signed] = ACTIONS(1120), - [anon_sym_unsigned] = ACTIONS(1120), - [anon_sym_long] = ACTIONS(1120), - [anon_sym_short] = ACTIONS(1120), - [sym_primitive_type] = ACTIONS(1120), - [anon_sym_enum] = ACTIONS(1120), - [anon_sym_struct] = ACTIONS(1120), - [anon_sym_union] = ACTIONS(1120), - [anon_sym_if] = ACTIONS(1120), - [anon_sym_switch] = ACTIONS(1120), - [anon_sym_case] = ACTIONS(1120), - [anon_sym_default] = ACTIONS(1120), - [anon_sym_while] = ACTIONS(1120), - [anon_sym_do] = ACTIONS(1120), - [anon_sym_for] = ACTIONS(1120), - [anon_sym_return] = ACTIONS(1120), - [anon_sym_break] = ACTIONS(1120), - [anon_sym_continue] = ACTIONS(1120), - [anon_sym_goto] = ACTIONS(1120), - [anon_sym_DASH_DASH] = ACTIONS(1122), - [anon_sym_PLUS_PLUS] = ACTIONS(1122), - [anon_sym_sizeof] = ACTIONS(1120), - [sym_number_literal] = ACTIONS(1122), - [anon_sym_L_SQUOTE] = ACTIONS(1122), - [anon_sym_u_SQUOTE] = ACTIONS(1122), - [anon_sym_U_SQUOTE] = ACTIONS(1122), - [anon_sym_u8_SQUOTE] = ACTIONS(1122), - [anon_sym_SQUOTE] = ACTIONS(1122), - [anon_sym_L_DQUOTE] = ACTIONS(1122), - [anon_sym_u_DQUOTE] = ACTIONS(1122), - [anon_sym_U_DQUOTE] = ACTIONS(1122), - [anon_sym_u8_DQUOTE] = ACTIONS(1122), - [anon_sym_DQUOTE] = ACTIONS(1122), - [sym_true] = ACTIONS(1120), - [sym_false] = ACTIONS(1120), - [sym_null] = ACTIONS(1120), - [sym_comment] = ACTIONS(3), - }, - [330] = { - [sym_identifier] = ACTIONS(1076), - [aux_sym_preproc_include_token1] = ACTIONS(1076), - [aux_sym_preproc_def_token1] = ACTIONS(1076), - [aux_sym_preproc_if_token1] = ACTIONS(1076), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1076), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1076), - [sym_preproc_directive] = ACTIONS(1076), - [anon_sym_LPAREN2] = ACTIONS(1078), - [anon_sym_BANG] = ACTIONS(1078), - [anon_sym_TILDE] = ACTIONS(1078), - [anon_sym_DASH] = ACTIONS(1076), - [anon_sym_PLUS] = ACTIONS(1076), - [anon_sym_STAR] = ACTIONS(1078), - [anon_sym_AMP] = ACTIONS(1078), - [anon_sym_SEMI] = ACTIONS(1078), - [anon_sym_typedef] = ACTIONS(1076), - [anon_sym_extern] = ACTIONS(1076), - [anon_sym___attribute__] = ACTIONS(1076), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1078), - [anon_sym___declspec] = ACTIONS(1076), - [anon_sym___cdecl] = ACTIONS(1076), - [anon_sym___clrcall] = ACTIONS(1076), - [anon_sym___stdcall] = ACTIONS(1076), - [anon_sym___fastcall] = ACTIONS(1076), - [anon_sym___thiscall] = ACTIONS(1076), - [anon_sym___vectorcall] = ACTIONS(1076), - [anon_sym_LBRACE] = ACTIONS(1078), - [anon_sym_RBRACE] = ACTIONS(1078), - [anon_sym_static] = ACTIONS(1076), - [anon_sym_auto] = ACTIONS(1076), - [anon_sym_register] = ACTIONS(1076), - [anon_sym_inline] = ACTIONS(1076), - [anon_sym_const] = ACTIONS(1076), - [anon_sym_volatile] = ACTIONS(1076), - [anon_sym_restrict] = ACTIONS(1076), - [anon_sym__Atomic] = ACTIONS(1076), - [anon_sym_signed] = ACTIONS(1076), - [anon_sym_unsigned] = ACTIONS(1076), - [anon_sym_long] = ACTIONS(1076), - [anon_sym_short] = ACTIONS(1076), - [sym_primitive_type] = ACTIONS(1076), - [anon_sym_enum] = ACTIONS(1076), - [anon_sym_struct] = ACTIONS(1076), - [anon_sym_union] = ACTIONS(1076), - [anon_sym_if] = ACTIONS(1076), - [anon_sym_switch] = ACTIONS(1076), - [anon_sym_case] = ACTIONS(1076), - [anon_sym_default] = ACTIONS(1076), - [anon_sym_while] = ACTIONS(1076), - [anon_sym_do] = ACTIONS(1076), - [anon_sym_for] = ACTIONS(1076), - [anon_sym_return] = ACTIONS(1076), - [anon_sym_break] = ACTIONS(1076), - [anon_sym_continue] = ACTIONS(1076), - [anon_sym_goto] = ACTIONS(1076), - [anon_sym_DASH_DASH] = ACTIONS(1078), - [anon_sym_PLUS_PLUS] = ACTIONS(1078), - [anon_sym_sizeof] = ACTIONS(1076), - [sym_number_literal] = ACTIONS(1078), - [anon_sym_L_SQUOTE] = ACTIONS(1078), - [anon_sym_u_SQUOTE] = ACTIONS(1078), - [anon_sym_U_SQUOTE] = ACTIONS(1078), - [anon_sym_u8_SQUOTE] = ACTIONS(1078), - [anon_sym_SQUOTE] = ACTIONS(1078), - [anon_sym_L_DQUOTE] = ACTIONS(1078), - [anon_sym_u_DQUOTE] = ACTIONS(1078), - [anon_sym_U_DQUOTE] = ACTIONS(1078), - [anon_sym_u8_DQUOTE] = ACTIONS(1078), - [anon_sym_DQUOTE] = ACTIONS(1078), - [sym_true] = ACTIONS(1076), - [sym_false] = ACTIONS(1076), - [sym_null] = ACTIONS(1076), - [sym_comment] = ACTIONS(3), - }, - [331] = { - [sym_identifier] = ACTIONS(1104), - [aux_sym_preproc_include_token1] = ACTIONS(1104), - [aux_sym_preproc_def_token1] = ACTIONS(1104), - [aux_sym_preproc_if_token1] = ACTIONS(1104), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1104), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1104), - [sym_preproc_directive] = ACTIONS(1104), - [anon_sym_LPAREN2] = ACTIONS(1106), - [anon_sym_BANG] = ACTIONS(1106), - [anon_sym_TILDE] = ACTIONS(1106), - [anon_sym_DASH] = ACTIONS(1104), - [anon_sym_PLUS] = ACTIONS(1104), - [anon_sym_STAR] = ACTIONS(1106), - [anon_sym_AMP] = ACTIONS(1106), - [anon_sym_SEMI] = ACTIONS(1106), - [anon_sym_typedef] = ACTIONS(1104), - [anon_sym_extern] = ACTIONS(1104), - [anon_sym___attribute__] = ACTIONS(1104), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1106), - [anon_sym___declspec] = ACTIONS(1104), - [anon_sym___cdecl] = ACTIONS(1104), - [anon_sym___clrcall] = ACTIONS(1104), - [anon_sym___stdcall] = ACTIONS(1104), - [anon_sym___fastcall] = ACTIONS(1104), - [anon_sym___thiscall] = ACTIONS(1104), - [anon_sym___vectorcall] = ACTIONS(1104), - [anon_sym_LBRACE] = ACTIONS(1106), - [anon_sym_RBRACE] = ACTIONS(1106), - [anon_sym_static] = ACTIONS(1104), - [anon_sym_auto] = ACTIONS(1104), - [anon_sym_register] = ACTIONS(1104), - [anon_sym_inline] = ACTIONS(1104), - [anon_sym_const] = ACTIONS(1104), - [anon_sym_volatile] = ACTIONS(1104), - [anon_sym_restrict] = ACTIONS(1104), - [anon_sym__Atomic] = ACTIONS(1104), - [anon_sym_signed] = ACTIONS(1104), - [anon_sym_unsigned] = ACTIONS(1104), - [anon_sym_long] = ACTIONS(1104), - [anon_sym_short] = ACTIONS(1104), - [sym_primitive_type] = ACTIONS(1104), - [anon_sym_enum] = ACTIONS(1104), - [anon_sym_struct] = ACTIONS(1104), - [anon_sym_union] = ACTIONS(1104), - [anon_sym_if] = ACTIONS(1104), - [anon_sym_switch] = ACTIONS(1104), - [anon_sym_case] = ACTIONS(1104), - [anon_sym_default] = ACTIONS(1104), - [anon_sym_while] = ACTIONS(1104), - [anon_sym_do] = ACTIONS(1104), - [anon_sym_for] = ACTIONS(1104), - [anon_sym_return] = ACTIONS(1104), - [anon_sym_break] = ACTIONS(1104), - [anon_sym_continue] = ACTIONS(1104), - [anon_sym_goto] = ACTIONS(1104), - [anon_sym_DASH_DASH] = ACTIONS(1106), - [anon_sym_PLUS_PLUS] = ACTIONS(1106), - [anon_sym_sizeof] = ACTIONS(1104), - [sym_number_literal] = ACTIONS(1106), - [anon_sym_L_SQUOTE] = ACTIONS(1106), - [anon_sym_u_SQUOTE] = ACTIONS(1106), - [anon_sym_U_SQUOTE] = ACTIONS(1106), - [anon_sym_u8_SQUOTE] = ACTIONS(1106), - [anon_sym_SQUOTE] = ACTIONS(1106), - [anon_sym_L_DQUOTE] = ACTIONS(1106), - [anon_sym_u_DQUOTE] = ACTIONS(1106), - [anon_sym_U_DQUOTE] = ACTIONS(1106), - [anon_sym_u8_DQUOTE] = ACTIONS(1106), - [anon_sym_DQUOTE] = ACTIONS(1106), - [sym_true] = ACTIONS(1104), - [sym_false] = ACTIONS(1104), - [sym_null] = ACTIONS(1104), - [sym_comment] = ACTIONS(3), - }, - [332] = { - [sym_identifier] = ACTIONS(1060), - [aux_sym_preproc_include_token1] = ACTIONS(1060), - [aux_sym_preproc_def_token1] = ACTIONS(1060), - [aux_sym_preproc_if_token1] = ACTIONS(1060), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1060), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1060), - [sym_preproc_directive] = ACTIONS(1060), - [anon_sym_LPAREN2] = ACTIONS(1062), - [anon_sym_BANG] = ACTIONS(1062), - [anon_sym_TILDE] = ACTIONS(1062), - [anon_sym_DASH] = ACTIONS(1060), - [anon_sym_PLUS] = ACTIONS(1060), - [anon_sym_STAR] = ACTIONS(1062), - [anon_sym_AMP] = ACTIONS(1062), - [anon_sym_SEMI] = ACTIONS(1062), - [anon_sym_typedef] = ACTIONS(1060), - [anon_sym_extern] = ACTIONS(1060), - [anon_sym___attribute__] = ACTIONS(1060), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1062), - [anon_sym___declspec] = ACTIONS(1060), - [anon_sym___cdecl] = ACTIONS(1060), - [anon_sym___clrcall] = ACTIONS(1060), - [anon_sym___stdcall] = ACTIONS(1060), - [anon_sym___fastcall] = ACTIONS(1060), - [anon_sym___thiscall] = ACTIONS(1060), - [anon_sym___vectorcall] = ACTIONS(1060), - [anon_sym_LBRACE] = ACTIONS(1062), - [anon_sym_RBRACE] = ACTIONS(1062), - [anon_sym_static] = ACTIONS(1060), - [anon_sym_auto] = ACTIONS(1060), - [anon_sym_register] = ACTIONS(1060), - [anon_sym_inline] = ACTIONS(1060), - [anon_sym_const] = ACTIONS(1060), - [anon_sym_volatile] = ACTIONS(1060), - [anon_sym_restrict] = ACTIONS(1060), - [anon_sym__Atomic] = ACTIONS(1060), - [anon_sym_signed] = ACTIONS(1060), - [anon_sym_unsigned] = ACTIONS(1060), - [anon_sym_long] = ACTIONS(1060), - [anon_sym_short] = ACTIONS(1060), - [sym_primitive_type] = ACTIONS(1060), - [anon_sym_enum] = ACTIONS(1060), - [anon_sym_struct] = ACTIONS(1060), - [anon_sym_union] = ACTIONS(1060), - [anon_sym_if] = ACTIONS(1060), - [anon_sym_switch] = ACTIONS(1060), - [anon_sym_case] = ACTIONS(1060), - [anon_sym_default] = ACTIONS(1060), - [anon_sym_while] = ACTIONS(1060), - [anon_sym_do] = ACTIONS(1060), - [anon_sym_for] = ACTIONS(1060), - [anon_sym_return] = ACTIONS(1060), - [anon_sym_break] = ACTIONS(1060), - [anon_sym_continue] = ACTIONS(1060), - [anon_sym_goto] = ACTIONS(1060), - [anon_sym_DASH_DASH] = ACTIONS(1062), - [anon_sym_PLUS_PLUS] = ACTIONS(1062), - [anon_sym_sizeof] = ACTIONS(1060), - [sym_number_literal] = ACTIONS(1062), - [anon_sym_L_SQUOTE] = ACTIONS(1062), - [anon_sym_u_SQUOTE] = ACTIONS(1062), - [anon_sym_U_SQUOTE] = ACTIONS(1062), - [anon_sym_u8_SQUOTE] = ACTIONS(1062), - [anon_sym_SQUOTE] = ACTIONS(1062), - [anon_sym_L_DQUOTE] = ACTIONS(1062), - [anon_sym_u_DQUOTE] = ACTIONS(1062), - [anon_sym_U_DQUOTE] = ACTIONS(1062), - [anon_sym_u8_DQUOTE] = ACTIONS(1062), - [anon_sym_DQUOTE] = ACTIONS(1062), - [sym_true] = ACTIONS(1060), - [sym_false] = ACTIONS(1060), - [sym_null] = ACTIONS(1060), - [sym_comment] = ACTIONS(3), - }, - [333] = { - [ts_builtin_sym_end] = ACTIONS(1058), - [sym_identifier] = ACTIONS(1056), - [aux_sym_preproc_include_token1] = ACTIONS(1056), - [aux_sym_preproc_def_token1] = ACTIONS(1056), - [aux_sym_preproc_if_token1] = ACTIONS(1056), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1056), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1056), - [sym_preproc_directive] = ACTIONS(1056), - [anon_sym_LPAREN2] = ACTIONS(1058), - [anon_sym_BANG] = ACTIONS(1058), - [anon_sym_TILDE] = ACTIONS(1058), - [anon_sym_DASH] = ACTIONS(1056), - [anon_sym_PLUS] = ACTIONS(1056), - [anon_sym_STAR] = ACTIONS(1058), - [anon_sym_AMP] = ACTIONS(1058), - [anon_sym_SEMI] = ACTIONS(1058), - [anon_sym_typedef] = ACTIONS(1056), - [anon_sym_extern] = ACTIONS(1056), - [anon_sym___attribute__] = ACTIONS(1056), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1058), - [anon_sym___declspec] = ACTIONS(1056), - [anon_sym___cdecl] = ACTIONS(1056), - [anon_sym___clrcall] = ACTIONS(1056), - [anon_sym___stdcall] = ACTIONS(1056), - [anon_sym___fastcall] = ACTIONS(1056), - [anon_sym___thiscall] = ACTIONS(1056), - [anon_sym___vectorcall] = ACTIONS(1056), - [anon_sym_LBRACE] = ACTIONS(1058), - [anon_sym_static] = ACTIONS(1056), - [anon_sym_auto] = ACTIONS(1056), - [anon_sym_register] = ACTIONS(1056), - [anon_sym_inline] = ACTIONS(1056), - [anon_sym_const] = ACTIONS(1056), - [anon_sym_volatile] = ACTIONS(1056), - [anon_sym_restrict] = ACTIONS(1056), - [anon_sym__Atomic] = ACTIONS(1056), - [anon_sym_signed] = ACTIONS(1056), - [anon_sym_unsigned] = ACTIONS(1056), - [anon_sym_long] = ACTIONS(1056), - [anon_sym_short] = ACTIONS(1056), - [sym_primitive_type] = ACTIONS(1056), - [anon_sym_enum] = ACTIONS(1056), - [anon_sym_struct] = ACTIONS(1056), - [anon_sym_union] = ACTIONS(1056), - [anon_sym_if] = ACTIONS(1056), - [anon_sym_switch] = ACTIONS(1056), - [anon_sym_case] = ACTIONS(1056), - [anon_sym_default] = ACTIONS(1056), - [anon_sym_while] = ACTIONS(1056), - [anon_sym_do] = ACTIONS(1056), - [anon_sym_for] = ACTIONS(1056), - [anon_sym_return] = ACTIONS(1056), - [anon_sym_break] = ACTIONS(1056), - [anon_sym_continue] = ACTIONS(1056), - [anon_sym_goto] = ACTIONS(1056), - [anon_sym_DASH_DASH] = ACTIONS(1058), - [anon_sym_PLUS_PLUS] = ACTIONS(1058), - [anon_sym_sizeof] = ACTIONS(1056), - [sym_number_literal] = ACTIONS(1058), - [anon_sym_L_SQUOTE] = ACTIONS(1058), - [anon_sym_u_SQUOTE] = ACTIONS(1058), - [anon_sym_U_SQUOTE] = ACTIONS(1058), - [anon_sym_u8_SQUOTE] = ACTIONS(1058), - [anon_sym_SQUOTE] = ACTIONS(1058), - [anon_sym_L_DQUOTE] = ACTIONS(1058), - [anon_sym_u_DQUOTE] = ACTIONS(1058), - [anon_sym_U_DQUOTE] = ACTIONS(1058), - [anon_sym_u8_DQUOTE] = ACTIONS(1058), - [anon_sym_DQUOTE] = ACTIONS(1058), - [sym_true] = ACTIONS(1056), - [sym_false] = ACTIONS(1056), - [sym_null] = ACTIONS(1056), - [sym_comment] = ACTIONS(3), - }, - [334] = { - [sym_identifier] = ACTIONS(1092), - [aux_sym_preproc_include_token1] = ACTIONS(1092), - [aux_sym_preproc_def_token1] = ACTIONS(1092), - [aux_sym_preproc_if_token1] = ACTIONS(1092), - [aux_sym_preproc_if_token2] = ACTIONS(1092), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1092), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1092), - [sym_preproc_directive] = ACTIONS(1092), - [anon_sym_LPAREN2] = ACTIONS(1094), - [anon_sym_BANG] = ACTIONS(1094), - [anon_sym_TILDE] = ACTIONS(1094), - [anon_sym_DASH] = ACTIONS(1092), - [anon_sym_PLUS] = ACTIONS(1092), - [anon_sym_STAR] = ACTIONS(1094), - [anon_sym_AMP] = ACTIONS(1094), - [anon_sym_SEMI] = ACTIONS(1094), - [anon_sym_typedef] = ACTIONS(1092), - [anon_sym_extern] = ACTIONS(1092), - [anon_sym___attribute__] = ACTIONS(1092), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1094), - [anon_sym___declspec] = ACTIONS(1092), - [anon_sym___cdecl] = ACTIONS(1092), - [anon_sym___clrcall] = ACTIONS(1092), - [anon_sym___stdcall] = ACTIONS(1092), - [anon_sym___fastcall] = ACTIONS(1092), - [anon_sym___thiscall] = ACTIONS(1092), - [anon_sym___vectorcall] = ACTIONS(1092), - [anon_sym_LBRACE] = ACTIONS(1094), - [anon_sym_static] = ACTIONS(1092), - [anon_sym_auto] = ACTIONS(1092), - [anon_sym_register] = ACTIONS(1092), - [anon_sym_inline] = ACTIONS(1092), - [anon_sym_const] = ACTIONS(1092), - [anon_sym_volatile] = ACTIONS(1092), - [anon_sym_restrict] = ACTIONS(1092), - [anon_sym__Atomic] = ACTIONS(1092), - [anon_sym_signed] = ACTIONS(1092), - [anon_sym_unsigned] = ACTIONS(1092), - [anon_sym_long] = ACTIONS(1092), - [anon_sym_short] = ACTIONS(1092), - [sym_primitive_type] = ACTIONS(1092), - [anon_sym_enum] = ACTIONS(1092), - [anon_sym_struct] = ACTIONS(1092), - [anon_sym_union] = ACTIONS(1092), - [anon_sym_if] = ACTIONS(1092), - [anon_sym_switch] = ACTIONS(1092), - [anon_sym_case] = ACTIONS(1092), - [anon_sym_default] = ACTIONS(1092), - [anon_sym_while] = ACTIONS(1092), - [anon_sym_do] = ACTIONS(1092), - [anon_sym_for] = ACTIONS(1092), - [anon_sym_return] = ACTIONS(1092), - [anon_sym_break] = ACTIONS(1092), - [anon_sym_continue] = ACTIONS(1092), - [anon_sym_goto] = ACTIONS(1092), - [anon_sym_DASH_DASH] = ACTIONS(1094), - [anon_sym_PLUS_PLUS] = ACTIONS(1094), - [anon_sym_sizeof] = ACTIONS(1092), - [sym_number_literal] = ACTIONS(1094), - [anon_sym_L_SQUOTE] = ACTIONS(1094), - [anon_sym_u_SQUOTE] = ACTIONS(1094), - [anon_sym_U_SQUOTE] = ACTIONS(1094), - [anon_sym_u8_SQUOTE] = ACTIONS(1094), - [anon_sym_SQUOTE] = ACTIONS(1094), - [anon_sym_L_DQUOTE] = ACTIONS(1094), - [anon_sym_u_DQUOTE] = ACTIONS(1094), - [anon_sym_U_DQUOTE] = ACTIONS(1094), - [anon_sym_u8_DQUOTE] = ACTIONS(1094), - [anon_sym_DQUOTE] = ACTIONS(1094), - [sym_true] = ACTIONS(1092), - [sym_false] = ACTIONS(1092), - [sym_null] = ACTIONS(1092), - [sym_comment] = ACTIONS(3), - }, - [335] = { - [ts_builtin_sym_end] = ACTIONS(1110), - [sym_identifier] = ACTIONS(1108), - [aux_sym_preproc_include_token1] = ACTIONS(1108), - [aux_sym_preproc_def_token1] = ACTIONS(1108), - [aux_sym_preproc_if_token1] = ACTIONS(1108), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1108), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1108), - [sym_preproc_directive] = ACTIONS(1108), - [anon_sym_LPAREN2] = ACTIONS(1110), - [anon_sym_BANG] = ACTIONS(1110), - [anon_sym_TILDE] = ACTIONS(1110), - [anon_sym_DASH] = ACTIONS(1108), - [anon_sym_PLUS] = ACTIONS(1108), - [anon_sym_STAR] = ACTIONS(1110), - [anon_sym_AMP] = ACTIONS(1110), - [anon_sym_SEMI] = ACTIONS(1110), - [anon_sym_typedef] = ACTIONS(1108), - [anon_sym_extern] = ACTIONS(1108), - [anon_sym___attribute__] = ACTIONS(1108), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1110), - [anon_sym___declspec] = ACTIONS(1108), - [anon_sym___cdecl] = ACTIONS(1108), - [anon_sym___clrcall] = ACTIONS(1108), - [anon_sym___stdcall] = ACTIONS(1108), - [anon_sym___fastcall] = ACTIONS(1108), - [anon_sym___thiscall] = ACTIONS(1108), - [anon_sym___vectorcall] = ACTIONS(1108), - [anon_sym_LBRACE] = ACTIONS(1110), - [anon_sym_static] = ACTIONS(1108), - [anon_sym_auto] = ACTIONS(1108), - [anon_sym_register] = ACTIONS(1108), - [anon_sym_inline] = ACTIONS(1108), - [anon_sym_const] = ACTIONS(1108), - [anon_sym_volatile] = ACTIONS(1108), - [anon_sym_restrict] = ACTIONS(1108), - [anon_sym__Atomic] = ACTIONS(1108), - [anon_sym_signed] = ACTIONS(1108), - [anon_sym_unsigned] = ACTIONS(1108), - [anon_sym_long] = ACTIONS(1108), - [anon_sym_short] = ACTIONS(1108), - [sym_primitive_type] = ACTIONS(1108), - [anon_sym_enum] = ACTIONS(1108), - [anon_sym_struct] = ACTIONS(1108), - [anon_sym_union] = ACTIONS(1108), - [anon_sym_if] = ACTIONS(1108), - [anon_sym_switch] = ACTIONS(1108), - [anon_sym_case] = ACTIONS(1108), - [anon_sym_default] = ACTIONS(1108), - [anon_sym_while] = ACTIONS(1108), - [anon_sym_do] = ACTIONS(1108), - [anon_sym_for] = ACTIONS(1108), - [anon_sym_return] = ACTIONS(1108), - [anon_sym_break] = ACTIONS(1108), - [anon_sym_continue] = ACTIONS(1108), - [anon_sym_goto] = ACTIONS(1108), - [anon_sym_DASH_DASH] = ACTIONS(1110), - [anon_sym_PLUS_PLUS] = ACTIONS(1110), - [anon_sym_sizeof] = ACTIONS(1108), - [sym_number_literal] = ACTIONS(1110), - [anon_sym_L_SQUOTE] = ACTIONS(1110), - [anon_sym_u_SQUOTE] = ACTIONS(1110), - [anon_sym_U_SQUOTE] = ACTIONS(1110), - [anon_sym_u8_SQUOTE] = ACTIONS(1110), - [anon_sym_SQUOTE] = ACTIONS(1110), - [anon_sym_L_DQUOTE] = ACTIONS(1110), - [anon_sym_u_DQUOTE] = ACTIONS(1110), - [anon_sym_U_DQUOTE] = ACTIONS(1110), - [anon_sym_u8_DQUOTE] = ACTIONS(1110), - [anon_sym_DQUOTE] = ACTIONS(1110), - [sym_true] = ACTIONS(1108), - [sym_false] = ACTIONS(1108), - [sym_null] = ACTIONS(1108), - [sym_comment] = ACTIONS(3), - }, - [336] = { - [sym_identifier] = ACTIONS(1072), - [aux_sym_preproc_include_token1] = ACTIONS(1072), - [aux_sym_preproc_def_token1] = ACTIONS(1072), - [aux_sym_preproc_if_token1] = ACTIONS(1072), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1072), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1072), - [sym_preproc_directive] = ACTIONS(1072), - [anon_sym_LPAREN2] = ACTIONS(1074), - [anon_sym_BANG] = ACTIONS(1074), - [anon_sym_TILDE] = ACTIONS(1074), - [anon_sym_DASH] = ACTIONS(1072), - [anon_sym_PLUS] = ACTIONS(1072), - [anon_sym_STAR] = ACTIONS(1074), - [anon_sym_AMP] = ACTIONS(1074), - [anon_sym_SEMI] = ACTIONS(1074), - [anon_sym_typedef] = ACTIONS(1072), - [anon_sym_extern] = ACTIONS(1072), - [anon_sym___attribute__] = ACTIONS(1072), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1074), - [anon_sym___declspec] = ACTIONS(1072), - [anon_sym___cdecl] = ACTIONS(1072), - [anon_sym___clrcall] = ACTIONS(1072), - [anon_sym___stdcall] = ACTIONS(1072), - [anon_sym___fastcall] = ACTIONS(1072), - [anon_sym___thiscall] = ACTIONS(1072), - [anon_sym___vectorcall] = ACTIONS(1072), - [anon_sym_LBRACE] = ACTIONS(1074), - [anon_sym_RBRACE] = ACTIONS(1074), - [anon_sym_static] = ACTIONS(1072), - [anon_sym_auto] = ACTIONS(1072), - [anon_sym_register] = ACTIONS(1072), - [anon_sym_inline] = ACTIONS(1072), - [anon_sym_const] = ACTIONS(1072), - [anon_sym_volatile] = ACTIONS(1072), - [anon_sym_restrict] = ACTIONS(1072), - [anon_sym__Atomic] = ACTIONS(1072), - [anon_sym_signed] = ACTIONS(1072), - [anon_sym_unsigned] = ACTIONS(1072), - [anon_sym_long] = ACTIONS(1072), - [anon_sym_short] = ACTIONS(1072), - [sym_primitive_type] = ACTIONS(1072), - [anon_sym_enum] = ACTIONS(1072), - [anon_sym_struct] = ACTIONS(1072), - [anon_sym_union] = ACTIONS(1072), - [anon_sym_if] = ACTIONS(1072), - [anon_sym_switch] = ACTIONS(1072), - [anon_sym_case] = ACTIONS(1072), - [anon_sym_default] = ACTIONS(1072), - [anon_sym_while] = ACTIONS(1072), - [anon_sym_do] = ACTIONS(1072), - [anon_sym_for] = ACTIONS(1072), - [anon_sym_return] = ACTIONS(1072), - [anon_sym_break] = ACTIONS(1072), - [anon_sym_continue] = ACTIONS(1072), - [anon_sym_goto] = ACTIONS(1072), - [anon_sym_DASH_DASH] = ACTIONS(1074), - [anon_sym_PLUS_PLUS] = ACTIONS(1074), - [anon_sym_sizeof] = ACTIONS(1072), - [sym_number_literal] = ACTIONS(1074), - [anon_sym_L_SQUOTE] = ACTIONS(1074), - [anon_sym_u_SQUOTE] = ACTIONS(1074), - [anon_sym_U_SQUOTE] = ACTIONS(1074), - [anon_sym_u8_SQUOTE] = ACTIONS(1074), - [anon_sym_SQUOTE] = ACTIONS(1074), - [anon_sym_L_DQUOTE] = ACTIONS(1074), - [anon_sym_u_DQUOTE] = ACTIONS(1074), - [anon_sym_U_DQUOTE] = ACTIONS(1074), - [anon_sym_u8_DQUOTE] = ACTIONS(1074), - [anon_sym_DQUOTE] = ACTIONS(1074), - [sym_true] = ACTIONS(1072), - [sym_false] = ACTIONS(1072), - [sym_null] = ACTIONS(1072), - [sym_comment] = ACTIONS(3), - }, - [337] = { - [sym_identifier] = ACTIONS(1112), - [aux_sym_preproc_include_token1] = ACTIONS(1112), - [aux_sym_preproc_def_token1] = ACTIONS(1112), - [aux_sym_preproc_if_token1] = ACTIONS(1112), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1112), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1112), - [sym_preproc_directive] = ACTIONS(1112), - [anon_sym_LPAREN2] = ACTIONS(1114), - [anon_sym_BANG] = ACTIONS(1114), - [anon_sym_TILDE] = ACTIONS(1114), - [anon_sym_DASH] = ACTIONS(1112), - [anon_sym_PLUS] = ACTIONS(1112), - [anon_sym_STAR] = ACTIONS(1114), - [anon_sym_AMP] = ACTIONS(1114), - [anon_sym_SEMI] = ACTIONS(1114), - [anon_sym_typedef] = ACTIONS(1112), - [anon_sym_extern] = ACTIONS(1112), - [anon_sym___attribute__] = ACTIONS(1112), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1114), - [anon_sym___declspec] = ACTIONS(1112), - [anon_sym___cdecl] = ACTIONS(1112), - [anon_sym___clrcall] = ACTIONS(1112), - [anon_sym___stdcall] = ACTIONS(1112), - [anon_sym___fastcall] = ACTIONS(1112), - [anon_sym___thiscall] = ACTIONS(1112), - [anon_sym___vectorcall] = ACTIONS(1112), - [anon_sym_LBRACE] = ACTIONS(1114), - [anon_sym_RBRACE] = ACTIONS(1114), - [anon_sym_static] = ACTIONS(1112), - [anon_sym_auto] = ACTIONS(1112), - [anon_sym_register] = ACTIONS(1112), - [anon_sym_inline] = ACTIONS(1112), - [anon_sym_const] = ACTIONS(1112), - [anon_sym_volatile] = ACTIONS(1112), - [anon_sym_restrict] = ACTIONS(1112), - [anon_sym__Atomic] = ACTIONS(1112), - [anon_sym_signed] = ACTIONS(1112), - [anon_sym_unsigned] = ACTIONS(1112), - [anon_sym_long] = ACTIONS(1112), - [anon_sym_short] = ACTIONS(1112), - [sym_primitive_type] = ACTIONS(1112), - [anon_sym_enum] = ACTIONS(1112), - [anon_sym_struct] = ACTIONS(1112), - [anon_sym_union] = ACTIONS(1112), - [anon_sym_if] = ACTIONS(1112), - [anon_sym_switch] = ACTIONS(1112), - [anon_sym_case] = ACTIONS(1112), - [anon_sym_default] = ACTIONS(1112), - [anon_sym_while] = ACTIONS(1112), - [anon_sym_do] = ACTIONS(1112), - [anon_sym_for] = ACTIONS(1112), - [anon_sym_return] = ACTIONS(1112), - [anon_sym_break] = ACTIONS(1112), - [anon_sym_continue] = ACTIONS(1112), - [anon_sym_goto] = ACTIONS(1112), - [anon_sym_DASH_DASH] = ACTIONS(1114), - [anon_sym_PLUS_PLUS] = ACTIONS(1114), - [anon_sym_sizeof] = ACTIONS(1112), - [sym_number_literal] = ACTIONS(1114), - [anon_sym_L_SQUOTE] = ACTIONS(1114), - [anon_sym_u_SQUOTE] = ACTIONS(1114), - [anon_sym_U_SQUOTE] = ACTIONS(1114), - [anon_sym_u8_SQUOTE] = ACTIONS(1114), - [anon_sym_SQUOTE] = ACTIONS(1114), - [anon_sym_L_DQUOTE] = ACTIONS(1114), - [anon_sym_u_DQUOTE] = ACTIONS(1114), - [anon_sym_U_DQUOTE] = ACTIONS(1114), - [anon_sym_u8_DQUOTE] = ACTIONS(1114), - [anon_sym_DQUOTE] = ACTIONS(1114), - [sym_true] = ACTIONS(1112), - [sym_false] = ACTIONS(1112), - [sym_null] = ACTIONS(1112), - [sym_comment] = ACTIONS(3), - }, - [338] = { - [sym_identifier] = ACTIONS(1108), - [aux_sym_preproc_include_token1] = ACTIONS(1108), - [aux_sym_preproc_def_token1] = ACTIONS(1108), - [aux_sym_preproc_if_token1] = ACTIONS(1108), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1108), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1108), - [sym_preproc_directive] = ACTIONS(1108), - [anon_sym_LPAREN2] = ACTIONS(1110), - [anon_sym_BANG] = ACTIONS(1110), - [anon_sym_TILDE] = ACTIONS(1110), - [anon_sym_DASH] = ACTIONS(1108), - [anon_sym_PLUS] = ACTIONS(1108), - [anon_sym_STAR] = ACTIONS(1110), - [anon_sym_AMP] = ACTIONS(1110), - [anon_sym_SEMI] = ACTIONS(1110), - [anon_sym_typedef] = ACTIONS(1108), - [anon_sym_extern] = ACTIONS(1108), - [anon_sym___attribute__] = ACTIONS(1108), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1110), - [anon_sym___declspec] = ACTIONS(1108), - [anon_sym___cdecl] = ACTIONS(1108), - [anon_sym___clrcall] = ACTIONS(1108), - [anon_sym___stdcall] = ACTIONS(1108), - [anon_sym___fastcall] = ACTIONS(1108), - [anon_sym___thiscall] = ACTIONS(1108), - [anon_sym___vectorcall] = ACTIONS(1108), - [anon_sym_LBRACE] = ACTIONS(1110), - [anon_sym_RBRACE] = ACTIONS(1110), - [anon_sym_static] = ACTIONS(1108), - [anon_sym_auto] = ACTIONS(1108), - [anon_sym_register] = ACTIONS(1108), - [anon_sym_inline] = ACTIONS(1108), - [anon_sym_const] = ACTIONS(1108), - [anon_sym_volatile] = ACTIONS(1108), - [anon_sym_restrict] = ACTIONS(1108), - [anon_sym__Atomic] = ACTIONS(1108), - [anon_sym_signed] = ACTIONS(1108), - [anon_sym_unsigned] = ACTIONS(1108), - [anon_sym_long] = ACTIONS(1108), - [anon_sym_short] = ACTIONS(1108), - [sym_primitive_type] = ACTIONS(1108), - [anon_sym_enum] = ACTIONS(1108), - [anon_sym_struct] = ACTIONS(1108), - [anon_sym_union] = ACTIONS(1108), - [anon_sym_if] = ACTIONS(1108), - [anon_sym_switch] = ACTIONS(1108), - [anon_sym_case] = ACTIONS(1108), - [anon_sym_default] = ACTIONS(1108), - [anon_sym_while] = ACTIONS(1108), - [anon_sym_do] = ACTIONS(1108), - [anon_sym_for] = ACTIONS(1108), - [anon_sym_return] = ACTIONS(1108), - [anon_sym_break] = ACTIONS(1108), - [anon_sym_continue] = ACTIONS(1108), - [anon_sym_goto] = ACTIONS(1108), - [anon_sym_DASH_DASH] = ACTIONS(1110), - [anon_sym_PLUS_PLUS] = ACTIONS(1110), - [anon_sym_sizeof] = ACTIONS(1108), - [sym_number_literal] = ACTIONS(1110), - [anon_sym_L_SQUOTE] = ACTIONS(1110), - [anon_sym_u_SQUOTE] = ACTIONS(1110), - [anon_sym_U_SQUOTE] = ACTIONS(1110), - [anon_sym_u8_SQUOTE] = ACTIONS(1110), - [anon_sym_SQUOTE] = ACTIONS(1110), - [anon_sym_L_DQUOTE] = ACTIONS(1110), - [anon_sym_u_DQUOTE] = ACTIONS(1110), - [anon_sym_U_DQUOTE] = ACTIONS(1110), - [anon_sym_u8_DQUOTE] = ACTIONS(1110), - [anon_sym_DQUOTE] = ACTIONS(1110), - [sym_true] = ACTIONS(1108), - [sym_false] = ACTIONS(1108), - [sym_null] = ACTIONS(1108), - [sym_comment] = ACTIONS(3), - }, - [339] = { - [ts_builtin_sym_end] = ACTIONS(1114), - [sym_identifier] = ACTIONS(1112), - [aux_sym_preproc_include_token1] = ACTIONS(1112), - [aux_sym_preproc_def_token1] = ACTIONS(1112), - [aux_sym_preproc_if_token1] = ACTIONS(1112), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1112), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1112), - [sym_preproc_directive] = ACTIONS(1112), - [anon_sym_LPAREN2] = ACTIONS(1114), - [anon_sym_BANG] = ACTIONS(1114), - [anon_sym_TILDE] = ACTIONS(1114), - [anon_sym_DASH] = ACTIONS(1112), - [anon_sym_PLUS] = ACTIONS(1112), - [anon_sym_STAR] = ACTIONS(1114), - [anon_sym_AMP] = ACTIONS(1114), - [anon_sym_SEMI] = ACTIONS(1114), - [anon_sym_typedef] = ACTIONS(1112), - [anon_sym_extern] = ACTIONS(1112), - [anon_sym___attribute__] = ACTIONS(1112), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1114), - [anon_sym___declspec] = ACTIONS(1112), - [anon_sym___cdecl] = ACTIONS(1112), - [anon_sym___clrcall] = ACTIONS(1112), - [anon_sym___stdcall] = ACTIONS(1112), - [anon_sym___fastcall] = ACTIONS(1112), - [anon_sym___thiscall] = ACTIONS(1112), - [anon_sym___vectorcall] = ACTIONS(1112), - [anon_sym_LBRACE] = ACTIONS(1114), - [anon_sym_static] = ACTIONS(1112), - [anon_sym_auto] = ACTIONS(1112), - [anon_sym_register] = ACTIONS(1112), - [anon_sym_inline] = ACTIONS(1112), - [anon_sym_const] = ACTIONS(1112), - [anon_sym_volatile] = ACTIONS(1112), - [anon_sym_restrict] = ACTIONS(1112), - [anon_sym__Atomic] = ACTIONS(1112), - [anon_sym_signed] = ACTIONS(1112), - [anon_sym_unsigned] = ACTIONS(1112), - [anon_sym_long] = ACTIONS(1112), - [anon_sym_short] = ACTIONS(1112), - [sym_primitive_type] = ACTIONS(1112), - [anon_sym_enum] = ACTIONS(1112), - [anon_sym_struct] = ACTIONS(1112), - [anon_sym_union] = ACTIONS(1112), - [anon_sym_if] = ACTIONS(1112), - [anon_sym_switch] = ACTIONS(1112), - [anon_sym_case] = ACTIONS(1112), - [anon_sym_default] = ACTIONS(1112), - [anon_sym_while] = ACTIONS(1112), - [anon_sym_do] = ACTIONS(1112), - [anon_sym_for] = ACTIONS(1112), - [anon_sym_return] = ACTIONS(1112), - [anon_sym_break] = ACTIONS(1112), - [anon_sym_continue] = ACTIONS(1112), - [anon_sym_goto] = ACTIONS(1112), - [anon_sym_DASH_DASH] = ACTIONS(1114), - [anon_sym_PLUS_PLUS] = ACTIONS(1114), - [anon_sym_sizeof] = ACTIONS(1112), - [sym_number_literal] = ACTIONS(1114), - [anon_sym_L_SQUOTE] = ACTIONS(1114), - [anon_sym_u_SQUOTE] = ACTIONS(1114), - [anon_sym_U_SQUOTE] = ACTIONS(1114), - [anon_sym_u8_SQUOTE] = ACTIONS(1114), - [anon_sym_SQUOTE] = ACTIONS(1114), - [anon_sym_L_DQUOTE] = ACTIONS(1114), - [anon_sym_u_DQUOTE] = ACTIONS(1114), - [anon_sym_U_DQUOTE] = ACTIONS(1114), - [anon_sym_u8_DQUOTE] = ACTIONS(1114), - [anon_sym_DQUOTE] = ACTIONS(1114), - [sym_true] = ACTIONS(1112), - [sym_false] = ACTIONS(1112), - [sym_null] = ACTIONS(1112), - [sym_comment] = ACTIONS(3), - }, - [340] = { - [ts_builtin_sym_end] = ACTIONS(1054), - [sym_identifier] = ACTIONS(1052), - [aux_sym_preproc_include_token1] = ACTIONS(1052), - [aux_sym_preproc_def_token1] = ACTIONS(1052), - [aux_sym_preproc_if_token1] = ACTIONS(1052), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1052), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1052), - [sym_preproc_directive] = ACTIONS(1052), - [anon_sym_LPAREN2] = ACTIONS(1054), - [anon_sym_BANG] = ACTIONS(1054), - [anon_sym_TILDE] = ACTIONS(1054), - [anon_sym_DASH] = ACTIONS(1052), - [anon_sym_PLUS] = ACTIONS(1052), - [anon_sym_STAR] = ACTIONS(1054), - [anon_sym_AMP] = ACTIONS(1054), - [anon_sym_SEMI] = ACTIONS(1054), - [anon_sym_typedef] = ACTIONS(1052), - [anon_sym_extern] = ACTIONS(1052), - [anon_sym___attribute__] = ACTIONS(1052), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1054), - [anon_sym___declspec] = ACTIONS(1052), - [anon_sym___cdecl] = ACTIONS(1052), - [anon_sym___clrcall] = ACTIONS(1052), - [anon_sym___stdcall] = ACTIONS(1052), - [anon_sym___fastcall] = ACTIONS(1052), - [anon_sym___thiscall] = ACTIONS(1052), - [anon_sym___vectorcall] = ACTIONS(1052), - [anon_sym_LBRACE] = ACTIONS(1054), - [anon_sym_static] = ACTIONS(1052), - [anon_sym_auto] = ACTIONS(1052), - [anon_sym_register] = ACTIONS(1052), - [anon_sym_inline] = ACTIONS(1052), - [anon_sym_const] = ACTIONS(1052), - [anon_sym_volatile] = ACTIONS(1052), - [anon_sym_restrict] = ACTIONS(1052), - [anon_sym__Atomic] = ACTIONS(1052), - [anon_sym_signed] = ACTIONS(1052), - [anon_sym_unsigned] = ACTIONS(1052), - [anon_sym_long] = ACTIONS(1052), - [anon_sym_short] = ACTIONS(1052), - [sym_primitive_type] = ACTIONS(1052), - [anon_sym_enum] = ACTIONS(1052), - [anon_sym_struct] = ACTIONS(1052), - [anon_sym_union] = ACTIONS(1052), - [anon_sym_if] = ACTIONS(1052), - [anon_sym_switch] = ACTIONS(1052), - [anon_sym_case] = ACTIONS(1052), - [anon_sym_default] = ACTIONS(1052), - [anon_sym_while] = ACTIONS(1052), - [anon_sym_do] = ACTIONS(1052), - [anon_sym_for] = ACTIONS(1052), - [anon_sym_return] = ACTIONS(1052), - [anon_sym_break] = ACTIONS(1052), - [anon_sym_continue] = ACTIONS(1052), - [anon_sym_goto] = ACTIONS(1052), - [anon_sym_DASH_DASH] = ACTIONS(1054), - [anon_sym_PLUS_PLUS] = ACTIONS(1054), - [anon_sym_sizeof] = ACTIONS(1052), - [sym_number_literal] = ACTIONS(1054), - [anon_sym_L_SQUOTE] = ACTIONS(1054), - [anon_sym_u_SQUOTE] = ACTIONS(1054), - [anon_sym_U_SQUOTE] = ACTIONS(1054), - [anon_sym_u8_SQUOTE] = ACTIONS(1054), - [anon_sym_SQUOTE] = ACTIONS(1054), - [anon_sym_L_DQUOTE] = ACTIONS(1054), - [anon_sym_u_DQUOTE] = ACTIONS(1054), - [anon_sym_U_DQUOTE] = ACTIONS(1054), - [anon_sym_u8_DQUOTE] = ACTIONS(1054), - [anon_sym_DQUOTE] = ACTIONS(1054), - [sym_true] = ACTIONS(1052), - [sym_false] = ACTIONS(1052), - [sym_null] = ACTIONS(1052), - [sym_comment] = ACTIONS(3), - }, - [341] = { - [sym_identifier] = ACTIONS(1096), - [aux_sym_preproc_include_token1] = ACTIONS(1096), - [aux_sym_preproc_def_token1] = ACTIONS(1096), - [aux_sym_preproc_if_token1] = ACTIONS(1096), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1096), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1096), - [sym_preproc_directive] = ACTIONS(1096), - [anon_sym_LPAREN2] = ACTIONS(1098), - [anon_sym_BANG] = ACTIONS(1098), - [anon_sym_TILDE] = ACTIONS(1098), - [anon_sym_DASH] = ACTIONS(1096), - [anon_sym_PLUS] = ACTIONS(1096), - [anon_sym_STAR] = ACTIONS(1098), - [anon_sym_AMP] = ACTIONS(1098), - [anon_sym_SEMI] = ACTIONS(1098), - [anon_sym_typedef] = ACTIONS(1096), - [anon_sym_extern] = ACTIONS(1096), - [anon_sym___attribute__] = ACTIONS(1096), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1098), - [anon_sym___declspec] = ACTIONS(1096), - [anon_sym___cdecl] = ACTIONS(1096), - [anon_sym___clrcall] = ACTIONS(1096), - [anon_sym___stdcall] = ACTIONS(1096), - [anon_sym___fastcall] = ACTIONS(1096), - [anon_sym___thiscall] = ACTIONS(1096), - [anon_sym___vectorcall] = ACTIONS(1096), - [anon_sym_LBRACE] = ACTIONS(1098), - [anon_sym_RBRACE] = ACTIONS(1098), - [anon_sym_static] = ACTIONS(1096), - [anon_sym_auto] = ACTIONS(1096), - [anon_sym_register] = ACTIONS(1096), - [anon_sym_inline] = ACTIONS(1096), - [anon_sym_const] = ACTIONS(1096), - [anon_sym_volatile] = ACTIONS(1096), - [anon_sym_restrict] = ACTIONS(1096), - [anon_sym__Atomic] = ACTIONS(1096), - [anon_sym_signed] = ACTIONS(1096), - [anon_sym_unsigned] = ACTIONS(1096), - [anon_sym_long] = ACTIONS(1096), - [anon_sym_short] = ACTIONS(1096), - [sym_primitive_type] = ACTIONS(1096), - [anon_sym_enum] = ACTIONS(1096), - [anon_sym_struct] = ACTIONS(1096), - [anon_sym_union] = ACTIONS(1096), - [anon_sym_if] = ACTIONS(1096), - [anon_sym_switch] = ACTIONS(1096), - [anon_sym_case] = ACTIONS(1096), - [anon_sym_default] = ACTIONS(1096), - [anon_sym_while] = ACTIONS(1096), - [anon_sym_do] = ACTIONS(1096), - [anon_sym_for] = ACTIONS(1096), - [anon_sym_return] = ACTIONS(1096), - [anon_sym_break] = ACTIONS(1096), - [anon_sym_continue] = ACTIONS(1096), - [anon_sym_goto] = ACTIONS(1096), - [anon_sym_DASH_DASH] = ACTIONS(1098), - [anon_sym_PLUS_PLUS] = ACTIONS(1098), - [anon_sym_sizeof] = ACTIONS(1096), - [sym_number_literal] = ACTIONS(1098), - [anon_sym_L_SQUOTE] = ACTIONS(1098), - [anon_sym_u_SQUOTE] = ACTIONS(1098), - [anon_sym_U_SQUOTE] = ACTIONS(1098), - [anon_sym_u8_SQUOTE] = ACTIONS(1098), - [anon_sym_SQUOTE] = ACTIONS(1098), - [anon_sym_L_DQUOTE] = ACTIONS(1098), - [anon_sym_u_DQUOTE] = ACTIONS(1098), - [anon_sym_U_DQUOTE] = ACTIONS(1098), - [anon_sym_u8_DQUOTE] = ACTIONS(1098), - [anon_sym_DQUOTE] = ACTIONS(1098), - [sym_true] = ACTIONS(1096), - [sym_false] = ACTIONS(1096), - [sym_null] = ACTIONS(1096), - [sym_comment] = ACTIONS(3), - }, - [342] = { - [sym_identifier] = ACTIONS(1056), - [aux_sym_preproc_include_token1] = ACTIONS(1056), - [aux_sym_preproc_def_token1] = ACTIONS(1056), - [aux_sym_preproc_if_token1] = ACTIONS(1056), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1056), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1056), - [sym_preproc_directive] = ACTIONS(1056), - [anon_sym_LPAREN2] = ACTIONS(1058), - [anon_sym_BANG] = ACTIONS(1058), - [anon_sym_TILDE] = ACTIONS(1058), - [anon_sym_DASH] = ACTIONS(1056), - [anon_sym_PLUS] = ACTIONS(1056), - [anon_sym_STAR] = ACTIONS(1058), - [anon_sym_AMP] = ACTIONS(1058), - [anon_sym_SEMI] = ACTIONS(1058), - [anon_sym_typedef] = ACTIONS(1056), - [anon_sym_extern] = ACTIONS(1056), - [anon_sym___attribute__] = ACTIONS(1056), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1058), - [anon_sym___declspec] = ACTIONS(1056), - [anon_sym___cdecl] = ACTIONS(1056), - [anon_sym___clrcall] = ACTIONS(1056), - [anon_sym___stdcall] = ACTIONS(1056), - [anon_sym___fastcall] = ACTIONS(1056), - [anon_sym___thiscall] = ACTIONS(1056), - [anon_sym___vectorcall] = ACTIONS(1056), - [anon_sym_LBRACE] = ACTIONS(1058), - [anon_sym_RBRACE] = ACTIONS(1058), - [anon_sym_static] = ACTIONS(1056), - [anon_sym_auto] = ACTIONS(1056), - [anon_sym_register] = ACTIONS(1056), - [anon_sym_inline] = ACTIONS(1056), - [anon_sym_const] = ACTIONS(1056), - [anon_sym_volatile] = ACTIONS(1056), - [anon_sym_restrict] = ACTIONS(1056), - [anon_sym__Atomic] = ACTIONS(1056), - [anon_sym_signed] = ACTIONS(1056), - [anon_sym_unsigned] = ACTIONS(1056), - [anon_sym_long] = ACTIONS(1056), - [anon_sym_short] = ACTIONS(1056), - [sym_primitive_type] = ACTIONS(1056), - [anon_sym_enum] = ACTIONS(1056), - [anon_sym_struct] = ACTIONS(1056), - [anon_sym_union] = ACTIONS(1056), - [anon_sym_if] = ACTIONS(1056), - [anon_sym_switch] = ACTIONS(1056), - [anon_sym_case] = ACTIONS(1056), - [anon_sym_default] = ACTIONS(1056), - [anon_sym_while] = ACTIONS(1056), - [anon_sym_do] = ACTIONS(1056), - [anon_sym_for] = ACTIONS(1056), - [anon_sym_return] = ACTIONS(1056), - [anon_sym_break] = ACTIONS(1056), - [anon_sym_continue] = ACTIONS(1056), - [anon_sym_goto] = ACTIONS(1056), - [anon_sym_DASH_DASH] = ACTIONS(1058), - [anon_sym_PLUS_PLUS] = ACTIONS(1058), - [anon_sym_sizeof] = ACTIONS(1056), - [sym_number_literal] = ACTIONS(1058), - [anon_sym_L_SQUOTE] = ACTIONS(1058), - [anon_sym_u_SQUOTE] = ACTIONS(1058), - [anon_sym_U_SQUOTE] = ACTIONS(1058), - [anon_sym_u8_SQUOTE] = ACTIONS(1058), - [anon_sym_SQUOTE] = ACTIONS(1058), - [anon_sym_L_DQUOTE] = ACTIONS(1058), - [anon_sym_u_DQUOTE] = ACTIONS(1058), - [anon_sym_U_DQUOTE] = ACTIONS(1058), - [anon_sym_u8_DQUOTE] = ACTIONS(1058), - [anon_sym_DQUOTE] = ACTIONS(1058), - [sym_true] = ACTIONS(1056), - [sym_false] = ACTIONS(1056), - [sym_null] = ACTIONS(1056), - [sym_comment] = ACTIONS(3), - }, - [343] = { - [sym_identifier] = ACTIONS(1064), - [aux_sym_preproc_include_token1] = ACTIONS(1064), - [aux_sym_preproc_def_token1] = ACTIONS(1064), - [aux_sym_preproc_if_token1] = ACTIONS(1064), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1064), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1064), - [sym_preproc_directive] = ACTIONS(1064), - [anon_sym_LPAREN2] = ACTIONS(1066), - [anon_sym_BANG] = ACTIONS(1066), - [anon_sym_TILDE] = ACTIONS(1066), - [anon_sym_DASH] = ACTIONS(1064), - [anon_sym_PLUS] = ACTIONS(1064), - [anon_sym_STAR] = ACTIONS(1066), - [anon_sym_AMP] = ACTIONS(1066), - [anon_sym_SEMI] = ACTIONS(1066), - [anon_sym_typedef] = ACTIONS(1064), - [anon_sym_extern] = ACTIONS(1064), - [anon_sym___attribute__] = ACTIONS(1064), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1066), - [anon_sym___declspec] = ACTIONS(1064), - [anon_sym___cdecl] = ACTIONS(1064), - [anon_sym___clrcall] = ACTIONS(1064), - [anon_sym___stdcall] = ACTIONS(1064), - [anon_sym___fastcall] = ACTIONS(1064), - [anon_sym___thiscall] = ACTIONS(1064), - [anon_sym___vectorcall] = ACTIONS(1064), - [anon_sym_LBRACE] = ACTIONS(1066), - [anon_sym_RBRACE] = ACTIONS(1066), - [anon_sym_static] = ACTIONS(1064), - [anon_sym_auto] = ACTIONS(1064), - [anon_sym_register] = ACTIONS(1064), - [anon_sym_inline] = ACTIONS(1064), - [anon_sym_const] = ACTIONS(1064), - [anon_sym_volatile] = ACTIONS(1064), - [anon_sym_restrict] = ACTIONS(1064), - [anon_sym__Atomic] = ACTIONS(1064), - [anon_sym_signed] = ACTIONS(1064), - [anon_sym_unsigned] = ACTIONS(1064), - [anon_sym_long] = ACTIONS(1064), - [anon_sym_short] = ACTIONS(1064), - [sym_primitive_type] = ACTIONS(1064), - [anon_sym_enum] = ACTIONS(1064), - [anon_sym_struct] = ACTIONS(1064), - [anon_sym_union] = ACTIONS(1064), - [anon_sym_if] = ACTIONS(1064), - [anon_sym_switch] = ACTIONS(1064), - [anon_sym_case] = ACTIONS(1064), - [anon_sym_default] = ACTIONS(1064), - [anon_sym_while] = ACTIONS(1064), - [anon_sym_do] = ACTIONS(1064), - [anon_sym_for] = ACTIONS(1064), - [anon_sym_return] = ACTIONS(1064), - [anon_sym_break] = ACTIONS(1064), - [anon_sym_continue] = ACTIONS(1064), - [anon_sym_goto] = ACTIONS(1064), - [anon_sym_DASH_DASH] = ACTIONS(1066), - [anon_sym_PLUS_PLUS] = ACTIONS(1066), - [anon_sym_sizeof] = ACTIONS(1064), - [sym_number_literal] = ACTIONS(1066), - [anon_sym_L_SQUOTE] = ACTIONS(1066), - [anon_sym_u_SQUOTE] = ACTIONS(1066), - [anon_sym_U_SQUOTE] = ACTIONS(1066), - [anon_sym_u8_SQUOTE] = ACTIONS(1066), - [anon_sym_SQUOTE] = ACTIONS(1066), - [anon_sym_L_DQUOTE] = ACTIONS(1066), - [anon_sym_u_DQUOTE] = ACTIONS(1066), - [anon_sym_U_DQUOTE] = ACTIONS(1066), - [anon_sym_u8_DQUOTE] = ACTIONS(1066), - [anon_sym_DQUOTE] = ACTIONS(1066), - [sym_true] = ACTIONS(1064), - [sym_false] = ACTIONS(1064), - [sym_null] = ACTIONS(1064), - [sym_comment] = ACTIONS(3), - }, - [344] = { - [ts_builtin_sym_end] = ACTIONS(1102), - [sym_identifier] = ACTIONS(1100), - [aux_sym_preproc_include_token1] = ACTIONS(1100), - [aux_sym_preproc_def_token1] = ACTIONS(1100), - [aux_sym_preproc_if_token1] = ACTIONS(1100), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1100), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1100), - [sym_preproc_directive] = ACTIONS(1100), - [anon_sym_LPAREN2] = ACTIONS(1102), - [anon_sym_BANG] = ACTIONS(1102), - [anon_sym_TILDE] = ACTIONS(1102), - [anon_sym_DASH] = ACTIONS(1100), - [anon_sym_PLUS] = ACTIONS(1100), - [anon_sym_STAR] = ACTIONS(1102), - [anon_sym_AMP] = ACTIONS(1102), - [anon_sym_SEMI] = ACTIONS(1102), - [anon_sym_typedef] = ACTIONS(1100), - [anon_sym_extern] = ACTIONS(1100), - [anon_sym___attribute__] = ACTIONS(1100), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1102), - [anon_sym___declspec] = ACTIONS(1100), - [anon_sym___cdecl] = ACTIONS(1100), - [anon_sym___clrcall] = ACTIONS(1100), - [anon_sym___stdcall] = ACTIONS(1100), - [anon_sym___fastcall] = ACTIONS(1100), - [anon_sym___thiscall] = ACTIONS(1100), - [anon_sym___vectorcall] = ACTIONS(1100), - [anon_sym_LBRACE] = ACTIONS(1102), - [anon_sym_static] = ACTIONS(1100), - [anon_sym_auto] = ACTIONS(1100), - [anon_sym_register] = ACTIONS(1100), - [anon_sym_inline] = ACTIONS(1100), - [anon_sym_const] = ACTIONS(1100), - [anon_sym_volatile] = ACTIONS(1100), - [anon_sym_restrict] = ACTIONS(1100), - [anon_sym__Atomic] = ACTIONS(1100), - [anon_sym_signed] = ACTIONS(1100), - [anon_sym_unsigned] = ACTIONS(1100), - [anon_sym_long] = ACTIONS(1100), - [anon_sym_short] = ACTIONS(1100), - [sym_primitive_type] = ACTIONS(1100), - [anon_sym_enum] = ACTIONS(1100), - [anon_sym_struct] = ACTIONS(1100), - [anon_sym_union] = ACTIONS(1100), - [anon_sym_if] = ACTIONS(1100), - [anon_sym_switch] = ACTIONS(1100), - [anon_sym_case] = ACTIONS(1100), - [anon_sym_default] = ACTIONS(1100), - [anon_sym_while] = ACTIONS(1100), - [anon_sym_do] = ACTIONS(1100), - [anon_sym_for] = ACTIONS(1100), - [anon_sym_return] = ACTIONS(1100), - [anon_sym_break] = ACTIONS(1100), - [anon_sym_continue] = ACTIONS(1100), - [anon_sym_goto] = ACTIONS(1100), - [anon_sym_DASH_DASH] = ACTIONS(1102), - [anon_sym_PLUS_PLUS] = ACTIONS(1102), - [anon_sym_sizeof] = ACTIONS(1100), - [sym_number_literal] = ACTIONS(1102), - [anon_sym_L_SQUOTE] = ACTIONS(1102), - [anon_sym_u_SQUOTE] = ACTIONS(1102), - [anon_sym_U_SQUOTE] = ACTIONS(1102), - [anon_sym_u8_SQUOTE] = ACTIONS(1102), - [anon_sym_SQUOTE] = ACTIONS(1102), - [anon_sym_L_DQUOTE] = ACTIONS(1102), - [anon_sym_u_DQUOTE] = ACTIONS(1102), - [anon_sym_U_DQUOTE] = ACTIONS(1102), - [anon_sym_u8_DQUOTE] = ACTIONS(1102), - [anon_sym_DQUOTE] = ACTIONS(1102), - [sym_true] = ACTIONS(1100), - [sym_false] = ACTIONS(1100), - [sym_null] = ACTIONS(1100), - [sym_comment] = ACTIONS(3), - }, - [345] = { - [sym_identifier] = ACTIONS(1048), - [aux_sym_preproc_include_token1] = ACTIONS(1048), - [aux_sym_preproc_def_token1] = ACTIONS(1048), - [aux_sym_preproc_if_token1] = ACTIONS(1048), - [aux_sym_preproc_if_token2] = ACTIONS(1048), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1048), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1048), - [sym_preproc_directive] = ACTIONS(1048), - [anon_sym_LPAREN2] = ACTIONS(1050), - [anon_sym_BANG] = ACTIONS(1050), - [anon_sym_TILDE] = ACTIONS(1050), - [anon_sym_DASH] = ACTIONS(1048), - [anon_sym_PLUS] = ACTIONS(1048), - [anon_sym_STAR] = ACTIONS(1050), - [anon_sym_AMP] = ACTIONS(1050), - [anon_sym_SEMI] = ACTIONS(1050), - [anon_sym_typedef] = ACTIONS(1048), - [anon_sym_extern] = ACTIONS(1048), - [anon_sym___attribute__] = ACTIONS(1048), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1050), - [anon_sym___declspec] = ACTIONS(1048), - [anon_sym___cdecl] = ACTIONS(1048), - [anon_sym___clrcall] = ACTIONS(1048), - [anon_sym___stdcall] = ACTIONS(1048), - [anon_sym___fastcall] = ACTIONS(1048), - [anon_sym___thiscall] = ACTIONS(1048), - [anon_sym___vectorcall] = ACTIONS(1048), - [anon_sym_LBRACE] = ACTIONS(1050), - [anon_sym_static] = ACTIONS(1048), - [anon_sym_auto] = ACTIONS(1048), - [anon_sym_register] = ACTIONS(1048), - [anon_sym_inline] = ACTIONS(1048), - [anon_sym_const] = ACTIONS(1048), - [anon_sym_volatile] = ACTIONS(1048), - [anon_sym_restrict] = ACTIONS(1048), - [anon_sym__Atomic] = ACTIONS(1048), - [anon_sym_signed] = ACTIONS(1048), - [anon_sym_unsigned] = ACTIONS(1048), - [anon_sym_long] = ACTIONS(1048), - [anon_sym_short] = ACTIONS(1048), - [sym_primitive_type] = ACTIONS(1048), - [anon_sym_enum] = ACTIONS(1048), - [anon_sym_struct] = ACTIONS(1048), - [anon_sym_union] = ACTIONS(1048), - [anon_sym_if] = ACTIONS(1048), - [anon_sym_switch] = ACTIONS(1048), - [anon_sym_case] = ACTIONS(1048), - [anon_sym_default] = ACTIONS(1048), - [anon_sym_while] = ACTIONS(1048), - [anon_sym_do] = ACTIONS(1048), - [anon_sym_for] = ACTIONS(1048), - [anon_sym_return] = ACTIONS(1048), - [anon_sym_break] = ACTIONS(1048), - [anon_sym_continue] = ACTIONS(1048), - [anon_sym_goto] = ACTIONS(1048), - [anon_sym_DASH_DASH] = ACTIONS(1050), - [anon_sym_PLUS_PLUS] = ACTIONS(1050), - [anon_sym_sizeof] = ACTIONS(1048), - [sym_number_literal] = ACTIONS(1050), - [anon_sym_L_SQUOTE] = ACTIONS(1050), - [anon_sym_u_SQUOTE] = ACTIONS(1050), - [anon_sym_U_SQUOTE] = ACTIONS(1050), - [anon_sym_u8_SQUOTE] = ACTIONS(1050), - [anon_sym_SQUOTE] = ACTIONS(1050), - [anon_sym_L_DQUOTE] = ACTIONS(1050), - [anon_sym_u_DQUOTE] = ACTIONS(1050), - [anon_sym_U_DQUOTE] = ACTIONS(1050), - [anon_sym_u8_DQUOTE] = ACTIONS(1050), - [anon_sym_DQUOTE] = ACTIONS(1050), - [sym_true] = ACTIONS(1048), - [sym_false] = ACTIONS(1048), - [sym_null] = ACTIONS(1048), - [sym_comment] = ACTIONS(3), - }, - [346] = { - [ts_builtin_sym_end] = ACTIONS(1094), - [sym_identifier] = ACTIONS(1092), - [aux_sym_preproc_include_token1] = ACTIONS(1092), - [aux_sym_preproc_def_token1] = ACTIONS(1092), - [aux_sym_preproc_if_token1] = ACTIONS(1092), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1092), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1092), - [sym_preproc_directive] = ACTIONS(1092), - [anon_sym_LPAREN2] = ACTIONS(1094), - [anon_sym_BANG] = ACTIONS(1094), - [anon_sym_TILDE] = ACTIONS(1094), - [anon_sym_DASH] = ACTIONS(1092), - [anon_sym_PLUS] = ACTIONS(1092), - [anon_sym_STAR] = ACTIONS(1094), - [anon_sym_AMP] = ACTIONS(1094), - [anon_sym_SEMI] = ACTIONS(1094), - [anon_sym_typedef] = ACTIONS(1092), - [anon_sym_extern] = ACTIONS(1092), - [anon_sym___attribute__] = ACTIONS(1092), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1094), - [anon_sym___declspec] = ACTIONS(1092), - [anon_sym___cdecl] = ACTIONS(1092), - [anon_sym___clrcall] = ACTIONS(1092), - [anon_sym___stdcall] = ACTIONS(1092), - [anon_sym___fastcall] = ACTIONS(1092), - [anon_sym___thiscall] = ACTIONS(1092), - [anon_sym___vectorcall] = ACTIONS(1092), - [anon_sym_LBRACE] = ACTIONS(1094), - [anon_sym_static] = ACTIONS(1092), - [anon_sym_auto] = ACTIONS(1092), - [anon_sym_register] = ACTIONS(1092), - [anon_sym_inline] = ACTIONS(1092), - [anon_sym_const] = ACTIONS(1092), - [anon_sym_volatile] = ACTIONS(1092), - [anon_sym_restrict] = ACTIONS(1092), - [anon_sym__Atomic] = ACTIONS(1092), - [anon_sym_signed] = ACTIONS(1092), - [anon_sym_unsigned] = ACTIONS(1092), - [anon_sym_long] = ACTIONS(1092), - [anon_sym_short] = ACTIONS(1092), - [sym_primitive_type] = ACTIONS(1092), - [anon_sym_enum] = ACTIONS(1092), - [anon_sym_struct] = ACTIONS(1092), - [anon_sym_union] = ACTIONS(1092), - [anon_sym_if] = ACTIONS(1092), - [anon_sym_switch] = ACTIONS(1092), - [anon_sym_case] = ACTIONS(1092), - [anon_sym_default] = ACTIONS(1092), - [anon_sym_while] = ACTIONS(1092), - [anon_sym_do] = ACTIONS(1092), - [anon_sym_for] = ACTIONS(1092), - [anon_sym_return] = ACTIONS(1092), - [anon_sym_break] = ACTIONS(1092), - [anon_sym_continue] = ACTIONS(1092), - [anon_sym_goto] = ACTIONS(1092), - [anon_sym_DASH_DASH] = ACTIONS(1094), - [anon_sym_PLUS_PLUS] = ACTIONS(1094), - [anon_sym_sizeof] = ACTIONS(1092), - [sym_number_literal] = ACTIONS(1094), - [anon_sym_L_SQUOTE] = ACTIONS(1094), - [anon_sym_u_SQUOTE] = ACTIONS(1094), - [anon_sym_U_SQUOTE] = ACTIONS(1094), - [anon_sym_u8_SQUOTE] = ACTIONS(1094), - [anon_sym_SQUOTE] = ACTIONS(1094), - [anon_sym_L_DQUOTE] = ACTIONS(1094), - [anon_sym_u_DQUOTE] = ACTIONS(1094), - [anon_sym_U_DQUOTE] = ACTIONS(1094), - [anon_sym_u8_DQUOTE] = ACTIONS(1094), - [anon_sym_DQUOTE] = ACTIONS(1094), - [sym_true] = ACTIONS(1092), - [sym_false] = ACTIONS(1092), - [sym_null] = ACTIONS(1092), - [sym_comment] = ACTIONS(3), - }, - [347] = { - [sym_identifier] = ACTIONS(1076), - [aux_sym_preproc_include_token1] = ACTIONS(1076), - [aux_sym_preproc_def_token1] = ACTIONS(1076), - [aux_sym_preproc_if_token1] = ACTIONS(1076), - [aux_sym_preproc_if_token2] = ACTIONS(1076), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1076), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1076), - [sym_preproc_directive] = ACTIONS(1076), - [anon_sym_LPAREN2] = ACTIONS(1078), - [anon_sym_BANG] = ACTIONS(1078), - [anon_sym_TILDE] = ACTIONS(1078), - [anon_sym_DASH] = ACTIONS(1076), - [anon_sym_PLUS] = ACTIONS(1076), - [anon_sym_STAR] = ACTIONS(1078), - [anon_sym_AMP] = ACTIONS(1078), - [anon_sym_SEMI] = ACTIONS(1078), - [anon_sym_typedef] = ACTIONS(1076), - [anon_sym_extern] = ACTIONS(1076), - [anon_sym___attribute__] = ACTIONS(1076), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1078), - [anon_sym___declspec] = ACTIONS(1076), - [anon_sym___cdecl] = ACTIONS(1076), - [anon_sym___clrcall] = ACTIONS(1076), - [anon_sym___stdcall] = ACTIONS(1076), - [anon_sym___fastcall] = ACTIONS(1076), - [anon_sym___thiscall] = ACTIONS(1076), - [anon_sym___vectorcall] = ACTIONS(1076), - [anon_sym_LBRACE] = ACTIONS(1078), - [anon_sym_static] = ACTIONS(1076), - [anon_sym_auto] = ACTIONS(1076), - [anon_sym_register] = ACTIONS(1076), - [anon_sym_inline] = ACTIONS(1076), - [anon_sym_const] = ACTIONS(1076), - [anon_sym_volatile] = ACTIONS(1076), - [anon_sym_restrict] = ACTIONS(1076), - [anon_sym__Atomic] = ACTIONS(1076), - [anon_sym_signed] = ACTIONS(1076), - [anon_sym_unsigned] = ACTIONS(1076), - [anon_sym_long] = ACTIONS(1076), - [anon_sym_short] = ACTIONS(1076), - [sym_primitive_type] = ACTIONS(1076), - [anon_sym_enum] = ACTIONS(1076), - [anon_sym_struct] = ACTIONS(1076), - [anon_sym_union] = ACTIONS(1076), - [anon_sym_if] = ACTIONS(1076), - [anon_sym_switch] = ACTIONS(1076), - [anon_sym_case] = ACTIONS(1076), - [anon_sym_default] = ACTIONS(1076), - [anon_sym_while] = ACTIONS(1076), - [anon_sym_do] = ACTIONS(1076), - [anon_sym_for] = ACTIONS(1076), - [anon_sym_return] = ACTIONS(1076), - [anon_sym_break] = ACTIONS(1076), - [anon_sym_continue] = ACTIONS(1076), - [anon_sym_goto] = ACTIONS(1076), - [anon_sym_DASH_DASH] = ACTIONS(1078), - [anon_sym_PLUS_PLUS] = ACTIONS(1078), - [anon_sym_sizeof] = ACTIONS(1076), - [sym_number_literal] = ACTIONS(1078), - [anon_sym_L_SQUOTE] = ACTIONS(1078), - [anon_sym_u_SQUOTE] = ACTIONS(1078), - [anon_sym_U_SQUOTE] = ACTIONS(1078), - [anon_sym_u8_SQUOTE] = ACTIONS(1078), - [anon_sym_SQUOTE] = ACTIONS(1078), - [anon_sym_L_DQUOTE] = ACTIONS(1078), - [anon_sym_u_DQUOTE] = ACTIONS(1078), - [anon_sym_U_DQUOTE] = ACTIONS(1078), - [anon_sym_u8_DQUOTE] = ACTIONS(1078), - [anon_sym_DQUOTE] = ACTIONS(1078), - [sym_true] = ACTIONS(1076), - [sym_false] = ACTIONS(1076), - [sym_null] = ACTIONS(1076), - [sym_comment] = ACTIONS(3), - }, - [348] = { - [sym_identifier] = ACTIONS(1032), - [aux_sym_preproc_include_token1] = ACTIONS(1032), - [aux_sym_preproc_def_token1] = ACTIONS(1032), - [aux_sym_preproc_if_token1] = ACTIONS(1032), - [aux_sym_preproc_if_token2] = ACTIONS(1032), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1032), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1032), - [sym_preproc_directive] = ACTIONS(1032), - [anon_sym_LPAREN2] = ACTIONS(1034), - [anon_sym_BANG] = ACTIONS(1034), - [anon_sym_TILDE] = ACTIONS(1034), - [anon_sym_DASH] = ACTIONS(1032), - [anon_sym_PLUS] = ACTIONS(1032), - [anon_sym_STAR] = ACTIONS(1034), - [anon_sym_AMP] = ACTIONS(1034), - [anon_sym_SEMI] = ACTIONS(1034), - [anon_sym_typedef] = ACTIONS(1032), - [anon_sym_extern] = ACTIONS(1032), - [anon_sym___attribute__] = ACTIONS(1032), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1034), - [anon_sym___declspec] = ACTIONS(1032), - [anon_sym___cdecl] = ACTIONS(1032), - [anon_sym___clrcall] = ACTIONS(1032), - [anon_sym___stdcall] = ACTIONS(1032), - [anon_sym___fastcall] = ACTIONS(1032), - [anon_sym___thiscall] = ACTIONS(1032), - [anon_sym___vectorcall] = ACTIONS(1032), - [anon_sym_LBRACE] = ACTIONS(1034), - [anon_sym_static] = ACTIONS(1032), - [anon_sym_auto] = ACTIONS(1032), - [anon_sym_register] = ACTIONS(1032), - [anon_sym_inline] = ACTIONS(1032), - [anon_sym_const] = ACTIONS(1032), - [anon_sym_volatile] = ACTIONS(1032), - [anon_sym_restrict] = ACTIONS(1032), - [anon_sym__Atomic] = ACTIONS(1032), - [anon_sym_signed] = ACTIONS(1032), - [anon_sym_unsigned] = ACTIONS(1032), - [anon_sym_long] = ACTIONS(1032), - [anon_sym_short] = ACTIONS(1032), - [sym_primitive_type] = ACTIONS(1032), - [anon_sym_enum] = ACTIONS(1032), - [anon_sym_struct] = ACTIONS(1032), - [anon_sym_union] = ACTIONS(1032), - [anon_sym_if] = ACTIONS(1032), - [anon_sym_switch] = ACTIONS(1032), - [anon_sym_case] = ACTIONS(1032), - [anon_sym_default] = ACTIONS(1032), - [anon_sym_while] = ACTIONS(1032), - [anon_sym_do] = ACTIONS(1032), - [anon_sym_for] = ACTIONS(1032), - [anon_sym_return] = ACTIONS(1032), - [anon_sym_break] = ACTIONS(1032), - [anon_sym_continue] = ACTIONS(1032), - [anon_sym_goto] = ACTIONS(1032), - [anon_sym_DASH_DASH] = ACTIONS(1034), - [anon_sym_PLUS_PLUS] = ACTIONS(1034), - [anon_sym_sizeof] = ACTIONS(1032), - [sym_number_literal] = ACTIONS(1034), - [anon_sym_L_SQUOTE] = ACTIONS(1034), - [anon_sym_u_SQUOTE] = ACTIONS(1034), - [anon_sym_U_SQUOTE] = ACTIONS(1034), - [anon_sym_u8_SQUOTE] = ACTIONS(1034), - [anon_sym_SQUOTE] = ACTIONS(1034), - [anon_sym_L_DQUOTE] = ACTIONS(1034), - [anon_sym_u_DQUOTE] = ACTIONS(1034), - [anon_sym_U_DQUOTE] = ACTIONS(1034), - [anon_sym_u8_DQUOTE] = ACTIONS(1034), - [anon_sym_DQUOTE] = ACTIONS(1034), - [sym_true] = ACTIONS(1032), - [sym_false] = ACTIONS(1032), - [sym_null] = ACTIONS(1032), - [sym_comment] = ACTIONS(3), - }, - [349] = { - [ts_builtin_sym_end] = ACTIONS(1066), - [sym_identifier] = ACTIONS(1064), - [aux_sym_preproc_include_token1] = ACTIONS(1064), - [aux_sym_preproc_def_token1] = ACTIONS(1064), - [aux_sym_preproc_if_token1] = ACTIONS(1064), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1064), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1064), - [sym_preproc_directive] = ACTIONS(1064), - [anon_sym_LPAREN2] = ACTIONS(1066), - [anon_sym_BANG] = ACTIONS(1066), - [anon_sym_TILDE] = ACTIONS(1066), - [anon_sym_DASH] = ACTIONS(1064), - [anon_sym_PLUS] = ACTIONS(1064), - [anon_sym_STAR] = ACTIONS(1066), - [anon_sym_AMP] = ACTIONS(1066), - [anon_sym_SEMI] = ACTIONS(1066), - [anon_sym_typedef] = ACTIONS(1064), - [anon_sym_extern] = ACTIONS(1064), - [anon_sym___attribute__] = ACTIONS(1064), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1066), - [anon_sym___declspec] = ACTIONS(1064), - [anon_sym___cdecl] = ACTIONS(1064), - [anon_sym___clrcall] = ACTIONS(1064), - [anon_sym___stdcall] = ACTIONS(1064), - [anon_sym___fastcall] = ACTIONS(1064), - [anon_sym___thiscall] = ACTIONS(1064), - [anon_sym___vectorcall] = ACTIONS(1064), - [anon_sym_LBRACE] = ACTIONS(1066), - [anon_sym_static] = ACTIONS(1064), - [anon_sym_auto] = ACTIONS(1064), - [anon_sym_register] = ACTIONS(1064), - [anon_sym_inline] = ACTIONS(1064), - [anon_sym_const] = ACTIONS(1064), - [anon_sym_volatile] = ACTIONS(1064), - [anon_sym_restrict] = ACTIONS(1064), - [anon_sym__Atomic] = ACTIONS(1064), - [anon_sym_signed] = ACTIONS(1064), - [anon_sym_unsigned] = ACTIONS(1064), - [anon_sym_long] = ACTIONS(1064), - [anon_sym_short] = ACTIONS(1064), - [sym_primitive_type] = ACTIONS(1064), - [anon_sym_enum] = ACTIONS(1064), - [anon_sym_struct] = ACTIONS(1064), - [anon_sym_union] = ACTIONS(1064), - [anon_sym_if] = ACTIONS(1064), - [anon_sym_switch] = ACTIONS(1064), - [anon_sym_case] = ACTIONS(1064), - [anon_sym_default] = ACTIONS(1064), - [anon_sym_while] = ACTIONS(1064), - [anon_sym_do] = ACTIONS(1064), - [anon_sym_for] = ACTIONS(1064), - [anon_sym_return] = ACTIONS(1064), - [anon_sym_break] = ACTIONS(1064), - [anon_sym_continue] = ACTIONS(1064), - [anon_sym_goto] = ACTIONS(1064), - [anon_sym_DASH_DASH] = ACTIONS(1066), - [anon_sym_PLUS_PLUS] = ACTIONS(1066), - [anon_sym_sizeof] = ACTIONS(1064), - [sym_number_literal] = ACTIONS(1066), - [anon_sym_L_SQUOTE] = ACTIONS(1066), - [anon_sym_u_SQUOTE] = ACTIONS(1066), - [anon_sym_U_SQUOTE] = ACTIONS(1066), - [anon_sym_u8_SQUOTE] = ACTIONS(1066), - [anon_sym_SQUOTE] = ACTIONS(1066), - [anon_sym_L_DQUOTE] = ACTIONS(1066), - [anon_sym_u_DQUOTE] = ACTIONS(1066), - [anon_sym_U_DQUOTE] = ACTIONS(1066), - [anon_sym_u8_DQUOTE] = ACTIONS(1066), - [anon_sym_DQUOTE] = ACTIONS(1066), - [sym_true] = ACTIONS(1064), - [sym_false] = ACTIONS(1064), - [sym_null] = ACTIONS(1064), - [sym_comment] = ACTIONS(3), - }, - [350] = { - [ts_builtin_sym_end] = ACTIONS(1062), - [sym_identifier] = ACTIONS(1060), - [aux_sym_preproc_include_token1] = ACTIONS(1060), - [aux_sym_preproc_def_token1] = ACTIONS(1060), - [aux_sym_preproc_if_token1] = ACTIONS(1060), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1060), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1060), - [sym_preproc_directive] = ACTIONS(1060), - [anon_sym_LPAREN2] = ACTIONS(1062), - [anon_sym_BANG] = ACTIONS(1062), - [anon_sym_TILDE] = ACTIONS(1062), - [anon_sym_DASH] = ACTIONS(1060), - [anon_sym_PLUS] = ACTIONS(1060), - [anon_sym_STAR] = ACTIONS(1062), - [anon_sym_AMP] = ACTIONS(1062), - [anon_sym_SEMI] = ACTIONS(1062), - [anon_sym_typedef] = ACTIONS(1060), - [anon_sym_extern] = ACTIONS(1060), - [anon_sym___attribute__] = ACTIONS(1060), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1062), - [anon_sym___declspec] = ACTIONS(1060), - [anon_sym___cdecl] = ACTIONS(1060), - [anon_sym___clrcall] = ACTIONS(1060), - [anon_sym___stdcall] = ACTIONS(1060), - [anon_sym___fastcall] = ACTIONS(1060), - [anon_sym___thiscall] = ACTIONS(1060), - [anon_sym___vectorcall] = ACTIONS(1060), - [anon_sym_LBRACE] = ACTIONS(1062), - [anon_sym_static] = ACTIONS(1060), - [anon_sym_auto] = ACTIONS(1060), - [anon_sym_register] = ACTIONS(1060), - [anon_sym_inline] = ACTIONS(1060), - [anon_sym_const] = ACTIONS(1060), - [anon_sym_volatile] = ACTIONS(1060), - [anon_sym_restrict] = ACTIONS(1060), - [anon_sym__Atomic] = ACTIONS(1060), - [anon_sym_signed] = ACTIONS(1060), - [anon_sym_unsigned] = ACTIONS(1060), - [anon_sym_long] = ACTIONS(1060), - [anon_sym_short] = ACTIONS(1060), - [sym_primitive_type] = ACTIONS(1060), - [anon_sym_enum] = ACTIONS(1060), - [anon_sym_struct] = ACTIONS(1060), - [anon_sym_union] = ACTIONS(1060), - [anon_sym_if] = ACTIONS(1060), - [anon_sym_switch] = ACTIONS(1060), - [anon_sym_case] = ACTIONS(1060), - [anon_sym_default] = ACTIONS(1060), - [anon_sym_while] = ACTIONS(1060), - [anon_sym_do] = ACTIONS(1060), - [anon_sym_for] = ACTIONS(1060), - [anon_sym_return] = ACTIONS(1060), - [anon_sym_break] = ACTIONS(1060), - [anon_sym_continue] = ACTIONS(1060), - [anon_sym_goto] = ACTIONS(1060), - [anon_sym_DASH_DASH] = ACTIONS(1062), - [anon_sym_PLUS_PLUS] = ACTIONS(1062), - [anon_sym_sizeof] = ACTIONS(1060), - [sym_number_literal] = ACTIONS(1062), - [anon_sym_L_SQUOTE] = ACTIONS(1062), - [anon_sym_u_SQUOTE] = ACTIONS(1062), - [anon_sym_U_SQUOTE] = ACTIONS(1062), - [anon_sym_u8_SQUOTE] = ACTIONS(1062), - [anon_sym_SQUOTE] = ACTIONS(1062), - [anon_sym_L_DQUOTE] = ACTIONS(1062), - [anon_sym_u_DQUOTE] = ACTIONS(1062), - [anon_sym_U_DQUOTE] = ACTIONS(1062), - [anon_sym_u8_DQUOTE] = ACTIONS(1062), - [anon_sym_DQUOTE] = ACTIONS(1062), - [sym_true] = ACTIONS(1060), - [sym_false] = ACTIONS(1060), - [sym_null] = ACTIONS(1060), - [sym_comment] = ACTIONS(3), - }, - [351] = { - [sym_identifier] = ACTIONS(1120), - [aux_sym_preproc_include_token1] = ACTIONS(1120), - [aux_sym_preproc_def_token1] = ACTIONS(1120), - [aux_sym_preproc_if_token1] = ACTIONS(1120), - [aux_sym_preproc_if_token2] = ACTIONS(1120), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1120), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1120), - [sym_preproc_directive] = ACTIONS(1120), - [anon_sym_LPAREN2] = ACTIONS(1122), - [anon_sym_BANG] = ACTIONS(1122), - [anon_sym_TILDE] = ACTIONS(1122), - [anon_sym_DASH] = ACTIONS(1120), - [anon_sym_PLUS] = ACTIONS(1120), - [anon_sym_STAR] = ACTIONS(1122), - [anon_sym_AMP] = ACTIONS(1122), - [anon_sym_SEMI] = ACTIONS(1122), - [anon_sym_typedef] = ACTIONS(1120), - [anon_sym_extern] = ACTIONS(1120), - [anon_sym___attribute__] = ACTIONS(1120), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1122), - [anon_sym___declspec] = ACTIONS(1120), - [anon_sym___cdecl] = ACTIONS(1120), - [anon_sym___clrcall] = ACTIONS(1120), - [anon_sym___stdcall] = ACTIONS(1120), - [anon_sym___fastcall] = ACTIONS(1120), - [anon_sym___thiscall] = ACTIONS(1120), - [anon_sym___vectorcall] = ACTIONS(1120), - [anon_sym_LBRACE] = ACTIONS(1122), - [anon_sym_static] = ACTIONS(1120), - [anon_sym_auto] = ACTIONS(1120), - [anon_sym_register] = ACTIONS(1120), - [anon_sym_inline] = ACTIONS(1120), - [anon_sym_const] = ACTIONS(1120), - [anon_sym_volatile] = ACTIONS(1120), - [anon_sym_restrict] = ACTIONS(1120), - [anon_sym__Atomic] = ACTIONS(1120), - [anon_sym_signed] = ACTIONS(1120), - [anon_sym_unsigned] = ACTIONS(1120), - [anon_sym_long] = ACTIONS(1120), - [anon_sym_short] = ACTIONS(1120), - [sym_primitive_type] = ACTIONS(1120), - [anon_sym_enum] = ACTIONS(1120), - [anon_sym_struct] = ACTIONS(1120), - [anon_sym_union] = ACTIONS(1120), - [anon_sym_if] = ACTIONS(1120), - [anon_sym_switch] = ACTIONS(1120), - [anon_sym_case] = ACTIONS(1120), - [anon_sym_default] = ACTIONS(1120), - [anon_sym_while] = ACTIONS(1120), - [anon_sym_do] = ACTIONS(1120), - [anon_sym_for] = ACTIONS(1120), - [anon_sym_return] = ACTIONS(1120), - [anon_sym_break] = ACTIONS(1120), - [anon_sym_continue] = ACTIONS(1120), - [anon_sym_goto] = ACTIONS(1120), - [anon_sym_DASH_DASH] = ACTIONS(1122), - [anon_sym_PLUS_PLUS] = ACTIONS(1122), - [anon_sym_sizeof] = ACTIONS(1120), - [sym_number_literal] = ACTIONS(1122), - [anon_sym_L_SQUOTE] = ACTIONS(1122), - [anon_sym_u_SQUOTE] = ACTIONS(1122), - [anon_sym_U_SQUOTE] = ACTIONS(1122), - [anon_sym_u8_SQUOTE] = ACTIONS(1122), - [anon_sym_SQUOTE] = ACTIONS(1122), - [anon_sym_L_DQUOTE] = ACTIONS(1122), - [anon_sym_u_DQUOTE] = ACTIONS(1122), - [anon_sym_U_DQUOTE] = ACTIONS(1122), - [anon_sym_u8_DQUOTE] = ACTIONS(1122), - [anon_sym_DQUOTE] = ACTIONS(1122), - [sym_true] = ACTIONS(1120), - [sym_false] = ACTIONS(1120), - [sym_null] = ACTIONS(1120), - [sym_comment] = ACTIONS(3), - }, - [352] = { - [sym_identifier] = ACTIONS(1048), - [aux_sym_preproc_include_token1] = ACTIONS(1048), - [aux_sym_preproc_def_token1] = ACTIONS(1048), - [aux_sym_preproc_if_token1] = ACTIONS(1048), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1048), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1048), - [sym_preproc_directive] = ACTIONS(1048), - [anon_sym_LPAREN2] = ACTIONS(1050), - [anon_sym_BANG] = ACTIONS(1050), - [anon_sym_TILDE] = ACTIONS(1050), - [anon_sym_DASH] = ACTIONS(1048), - [anon_sym_PLUS] = ACTIONS(1048), - [anon_sym_STAR] = ACTIONS(1050), - [anon_sym_AMP] = ACTIONS(1050), - [anon_sym_SEMI] = ACTIONS(1050), - [anon_sym_typedef] = ACTIONS(1048), - [anon_sym_extern] = ACTIONS(1048), - [anon_sym___attribute__] = ACTIONS(1048), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1050), - [anon_sym___declspec] = ACTIONS(1048), - [anon_sym___cdecl] = ACTIONS(1048), - [anon_sym___clrcall] = ACTIONS(1048), - [anon_sym___stdcall] = ACTIONS(1048), - [anon_sym___fastcall] = ACTIONS(1048), - [anon_sym___thiscall] = ACTIONS(1048), - [anon_sym___vectorcall] = ACTIONS(1048), - [anon_sym_LBRACE] = ACTIONS(1050), - [anon_sym_RBRACE] = ACTIONS(1050), - [anon_sym_static] = ACTIONS(1048), - [anon_sym_auto] = ACTIONS(1048), - [anon_sym_register] = ACTIONS(1048), - [anon_sym_inline] = ACTIONS(1048), - [anon_sym_const] = ACTIONS(1048), - [anon_sym_volatile] = ACTIONS(1048), - [anon_sym_restrict] = ACTIONS(1048), - [anon_sym__Atomic] = ACTIONS(1048), - [anon_sym_signed] = ACTIONS(1048), - [anon_sym_unsigned] = ACTIONS(1048), - [anon_sym_long] = ACTIONS(1048), - [anon_sym_short] = ACTIONS(1048), - [sym_primitive_type] = ACTIONS(1048), - [anon_sym_enum] = ACTIONS(1048), - [anon_sym_struct] = ACTIONS(1048), - [anon_sym_union] = ACTIONS(1048), - [anon_sym_if] = ACTIONS(1048), - [anon_sym_switch] = ACTIONS(1048), - [anon_sym_case] = ACTIONS(1048), - [anon_sym_default] = ACTIONS(1048), - [anon_sym_while] = ACTIONS(1048), - [anon_sym_do] = ACTIONS(1048), - [anon_sym_for] = ACTIONS(1048), - [anon_sym_return] = ACTIONS(1048), - [anon_sym_break] = ACTIONS(1048), - [anon_sym_continue] = ACTIONS(1048), - [anon_sym_goto] = ACTIONS(1048), - [anon_sym_DASH_DASH] = ACTIONS(1050), - [anon_sym_PLUS_PLUS] = ACTIONS(1050), - [anon_sym_sizeof] = ACTIONS(1048), - [sym_number_literal] = ACTIONS(1050), - [anon_sym_L_SQUOTE] = ACTIONS(1050), - [anon_sym_u_SQUOTE] = ACTIONS(1050), - [anon_sym_U_SQUOTE] = ACTIONS(1050), - [anon_sym_u8_SQUOTE] = ACTIONS(1050), - [anon_sym_SQUOTE] = ACTIONS(1050), - [anon_sym_L_DQUOTE] = ACTIONS(1050), - [anon_sym_u_DQUOTE] = ACTIONS(1050), - [anon_sym_U_DQUOTE] = ACTIONS(1050), - [anon_sym_u8_DQUOTE] = ACTIONS(1050), - [anon_sym_DQUOTE] = ACTIONS(1050), - [sym_true] = ACTIONS(1048), - [sym_false] = ACTIONS(1048), - [sym_null] = ACTIONS(1048), - [sym_comment] = ACTIONS(3), - }, - [353] = { - [sym_identifier] = ACTIONS(1116), - [aux_sym_preproc_include_token1] = ACTIONS(1116), - [aux_sym_preproc_def_token1] = ACTIONS(1116), - [aux_sym_preproc_if_token1] = ACTIONS(1116), - [aux_sym_preproc_if_token2] = ACTIONS(1116), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1116), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1116), - [sym_preproc_directive] = ACTIONS(1116), - [anon_sym_LPAREN2] = ACTIONS(1118), - [anon_sym_BANG] = ACTIONS(1118), - [anon_sym_TILDE] = ACTIONS(1118), - [anon_sym_DASH] = ACTIONS(1116), - [anon_sym_PLUS] = ACTIONS(1116), - [anon_sym_STAR] = ACTIONS(1118), - [anon_sym_AMP] = ACTIONS(1118), - [anon_sym_SEMI] = ACTIONS(1118), - [anon_sym_typedef] = ACTIONS(1116), - [anon_sym_extern] = ACTIONS(1116), - [anon_sym___attribute__] = ACTIONS(1116), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1118), - [anon_sym___declspec] = ACTIONS(1116), - [anon_sym___cdecl] = ACTIONS(1116), - [anon_sym___clrcall] = ACTIONS(1116), - [anon_sym___stdcall] = ACTIONS(1116), - [anon_sym___fastcall] = ACTIONS(1116), - [anon_sym___thiscall] = ACTIONS(1116), - [anon_sym___vectorcall] = ACTIONS(1116), - [anon_sym_LBRACE] = ACTIONS(1118), - [anon_sym_static] = ACTIONS(1116), - [anon_sym_auto] = ACTIONS(1116), - [anon_sym_register] = ACTIONS(1116), - [anon_sym_inline] = ACTIONS(1116), - [anon_sym_const] = ACTIONS(1116), - [anon_sym_volatile] = ACTIONS(1116), - [anon_sym_restrict] = ACTIONS(1116), - [anon_sym__Atomic] = ACTIONS(1116), - [anon_sym_signed] = ACTIONS(1116), - [anon_sym_unsigned] = ACTIONS(1116), - [anon_sym_long] = ACTIONS(1116), - [anon_sym_short] = ACTIONS(1116), - [sym_primitive_type] = ACTIONS(1116), - [anon_sym_enum] = ACTIONS(1116), - [anon_sym_struct] = ACTIONS(1116), - [anon_sym_union] = ACTIONS(1116), - [anon_sym_if] = ACTIONS(1116), - [anon_sym_switch] = ACTIONS(1116), - [anon_sym_case] = ACTIONS(1116), - [anon_sym_default] = ACTIONS(1116), - [anon_sym_while] = ACTIONS(1116), - [anon_sym_do] = ACTIONS(1116), - [anon_sym_for] = ACTIONS(1116), - [anon_sym_return] = ACTIONS(1116), - [anon_sym_break] = ACTIONS(1116), - [anon_sym_continue] = ACTIONS(1116), - [anon_sym_goto] = ACTIONS(1116), - [anon_sym_DASH_DASH] = ACTIONS(1118), - [anon_sym_PLUS_PLUS] = ACTIONS(1118), - [anon_sym_sizeof] = ACTIONS(1116), - [sym_number_literal] = ACTIONS(1118), - [anon_sym_L_SQUOTE] = ACTIONS(1118), - [anon_sym_u_SQUOTE] = ACTIONS(1118), - [anon_sym_U_SQUOTE] = ACTIONS(1118), - [anon_sym_u8_SQUOTE] = ACTIONS(1118), - [anon_sym_SQUOTE] = ACTIONS(1118), - [anon_sym_L_DQUOTE] = ACTIONS(1118), - [anon_sym_u_DQUOTE] = ACTIONS(1118), - [anon_sym_U_DQUOTE] = ACTIONS(1118), - [anon_sym_u8_DQUOTE] = ACTIONS(1118), - [anon_sym_DQUOTE] = ACTIONS(1118), - [sym_true] = ACTIONS(1116), - [sym_false] = ACTIONS(1116), - [sym_null] = ACTIONS(1116), - [sym_comment] = ACTIONS(3), - }, - [354] = { - [sym_identifier] = ACTIONS(1084), - [aux_sym_preproc_include_token1] = ACTIONS(1084), - [aux_sym_preproc_def_token1] = ACTIONS(1084), - [aux_sym_preproc_if_token1] = ACTIONS(1084), - [aux_sym_preproc_if_token2] = ACTIONS(1084), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1084), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1084), - [sym_preproc_directive] = ACTIONS(1084), - [anon_sym_LPAREN2] = ACTIONS(1086), - [anon_sym_BANG] = ACTIONS(1086), - [anon_sym_TILDE] = ACTIONS(1086), - [anon_sym_DASH] = ACTIONS(1084), - [anon_sym_PLUS] = ACTIONS(1084), - [anon_sym_STAR] = ACTIONS(1086), - [anon_sym_AMP] = ACTIONS(1086), - [anon_sym_SEMI] = ACTIONS(1086), - [anon_sym_typedef] = ACTIONS(1084), - [anon_sym_extern] = ACTIONS(1084), - [anon_sym___attribute__] = ACTIONS(1084), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1086), - [anon_sym___declspec] = ACTIONS(1084), - [anon_sym___cdecl] = ACTIONS(1084), - [anon_sym___clrcall] = ACTIONS(1084), - [anon_sym___stdcall] = ACTIONS(1084), - [anon_sym___fastcall] = ACTIONS(1084), - [anon_sym___thiscall] = ACTIONS(1084), - [anon_sym___vectorcall] = ACTIONS(1084), - [anon_sym_LBRACE] = ACTIONS(1086), - [anon_sym_static] = ACTIONS(1084), - [anon_sym_auto] = ACTIONS(1084), - [anon_sym_register] = ACTIONS(1084), - [anon_sym_inline] = ACTIONS(1084), - [anon_sym_const] = ACTIONS(1084), - [anon_sym_volatile] = ACTIONS(1084), - [anon_sym_restrict] = ACTIONS(1084), - [anon_sym__Atomic] = ACTIONS(1084), - [anon_sym_signed] = ACTIONS(1084), - [anon_sym_unsigned] = ACTIONS(1084), - [anon_sym_long] = ACTIONS(1084), - [anon_sym_short] = ACTIONS(1084), - [sym_primitive_type] = ACTIONS(1084), - [anon_sym_enum] = ACTIONS(1084), - [anon_sym_struct] = ACTIONS(1084), - [anon_sym_union] = ACTIONS(1084), - [anon_sym_if] = ACTIONS(1084), - [anon_sym_switch] = ACTIONS(1084), - [anon_sym_case] = ACTIONS(1084), - [anon_sym_default] = ACTIONS(1084), - [anon_sym_while] = ACTIONS(1084), - [anon_sym_do] = ACTIONS(1084), - [anon_sym_for] = ACTIONS(1084), - [anon_sym_return] = ACTIONS(1084), - [anon_sym_break] = ACTIONS(1084), - [anon_sym_continue] = ACTIONS(1084), - [anon_sym_goto] = ACTIONS(1084), - [anon_sym_DASH_DASH] = ACTIONS(1086), - [anon_sym_PLUS_PLUS] = ACTIONS(1086), - [anon_sym_sizeof] = ACTIONS(1084), - [sym_number_literal] = ACTIONS(1086), - [anon_sym_L_SQUOTE] = ACTIONS(1086), - [anon_sym_u_SQUOTE] = ACTIONS(1086), - [anon_sym_U_SQUOTE] = ACTIONS(1086), - [anon_sym_u8_SQUOTE] = ACTIONS(1086), - [anon_sym_SQUOTE] = ACTIONS(1086), - [anon_sym_L_DQUOTE] = ACTIONS(1086), - [anon_sym_u_DQUOTE] = ACTIONS(1086), - [anon_sym_U_DQUOTE] = ACTIONS(1086), - [anon_sym_u8_DQUOTE] = ACTIONS(1086), - [anon_sym_DQUOTE] = ACTIONS(1086), - [sym_true] = ACTIONS(1084), - [sym_false] = ACTIONS(1084), - [sym_null] = ACTIONS(1084), - [sym_comment] = ACTIONS(3), - }, - [355] = { - [ts_builtin_sym_end] = ACTIONS(1106), - [sym_identifier] = ACTIONS(1104), - [aux_sym_preproc_include_token1] = ACTIONS(1104), - [aux_sym_preproc_def_token1] = ACTIONS(1104), - [aux_sym_preproc_if_token1] = ACTIONS(1104), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1104), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1104), - [sym_preproc_directive] = ACTIONS(1104), - [anon_sym_LPAREN2] = ACTIONS(1106), - [anon_sym_BANG] = ACTIONS(1106), - [anon_sym_TILDE] = ACTIONS(1106), - [anon_sym_DASH] = ACTIONS(1104), - [anon_sym_PLUS] = ACTIONS(1104), - [anon_sym_STAR] = ACTIONS(1106), - [anon_sym_AMP] = ACTIONS(1106), - [anon_sym_SEMI] = ACTIONS(1106), - [anon_sym_typedef] = ACTIONS(1104), - [anon_sym_extern] = ACTIONS(1104), - [anon_sym___attribute__] = ACTIONS(1104), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1106), - [anon_sym___declspec] = ACTIONS(1104), - [anon_sym___cdecl] = ACTIONS(1104), - [anon_sym___clrcall] = ACTIONS(1104), - [anon_sym___stdcall] = ACTIONS(1104), - [anon_sym___fastcall] = ACTIONS(1104), - [anon_sym___thiscall] = ACTIONS(1104), - [anon_sym___vectorcall] = ACTIONS(1104), - [anon_sym_LBRACE] = ACTIONS(1106), - [anon_sym_static] = ACTIONS(1104), - [anon_sym_auto] = ACTIONS(1104), - [anon_sym_register] = ACTIONS(1104), - [anon_sym_inline] = ACTIONS(1104), - [anon_sym_const] = ACTIONS(1104), - [anon_sym_volatile] = ACTIONS(1104), - [anon_sym_restrict] = ACTIONS(1104), - [anon_sym__Atomic] = ACTIONS(1104), - [anon_sym_signed] = ACTIONS(1104), - [anon_sym_unsigned] = ACTIONS(1104), - [anon_sym_long] = ACTIONS(1104), - [anon_sym_short] = ACTIONS(1104), - [sym_primitive_type] = ACTIONS(1104), - [anon_sym_enum] = ACTIONS(1104), - [anon_sym_struct] = ACTIONS(1104), - [anon_sym_union] = ACTIONS(1104), - [anon_sym_if] = ACTIONS(1104), - [anon_sym_switch] = ACTIONS(1104), - [anon_sym_case] = ACTIONS(1104), - [anon_sym_default] = ACTIONS(1104), - [anon_sym_while] = ACTIONS(1104), - [anon_sym_do] = ACTIONS(1104), - [anon_sym_for] = ACTIONS(1104), - [anon_sym_return] = ACTIONS(1104), - [anon_sym_break] = ACTIONS(1104), - [anon_sym_continue] = ACTIONS(1104), - [anon_sym_goto] = ACTIONS(1104), - [anon_sym_DASH_DASH] = ACTIONS(1106), - [anon_sym_PLUS_PLUS] = ACTIONS(1106), - [anon_sym_sizeof] = ACTIONS(1104), - [sym_number_literal] = ACTIONS(1106), - [anon_sym_L_SQUOTE] = ACTIONS(1106), - [anon_sym_u_SQUOTE] = ACTIONS(1106), - [anon_sym_U_SQUOTE] = ACTIONS(1106), - [anon_sym_u8_SQUOTE] = ACTIONS(1106), - [anon_sym_SQUOTE] = ACTIONS(1106), - [anon_sym_L_DQUOTE] = ACTIONS(1106), - [anon_sym_u_DQUOTE] = ACTIONS(1106), - [anon_sym_U_DQUOTE] = ACTIONS(1106), - [anon_sym_u8_DQUOTE] = ACTIONS(1106), - [anon_sym_DQUOTE] = ACTIONS(1106), - [sym_true] = ACTIONS(1104), - [sym_false] = ACTIONS(1104), - [sym_null] = ACTIONS(1104), - [sym_comment] = ACTIONS(3), - }, - [356] = { - [sym_identifier] = ACTIONS(1100), - [aux_sym_preproc_include_token1] = ACTIONS(1100), - [aux_sym_preproc_def_token1] = ACTIONS(1100), - [aux_sym_preproc_if_token1] = ACTIONS(1100), - [aux_sym_preproc_if_token2] = ACTIONS(1100), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1100), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1100), - [sym_preproc_directive] = ACTIONS(1100), - [anon_sym_LPAREN2] = ACTIONS(1102), - [anon_sym_BANG] = ACTIONS(1102), - [anon_sym_TILDE] = ACTIONS(1102), - [anon_sym_DASH] = ACTIONS(1100), - [anon_sym_PLUS] = ACTIONS(1100), - [anon_sym_STAR] = ACTIONS(1102), - [anon_sym_AMP] = ACTIONS(1102), - [anon_sym_SEMI] = ACTIONS(1102), - [anon_sym_typedef] = ACTIONS(1100), - [anon_sym_extern] = ACTIONS(1100), - [anon_sym___attribute__] = ACTIONS(1100), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1102), - [anon_sym___declspec] = ACTIONS(1100), - [anon_sym___cdecl] = ACTIONS(1100), - [anon_sym___clrcall] = ACTIONS(1100), - [anon_sym___stdcall] = ACTIONS(1100), - [anon_sym___fastcall] = ACTIONS(1100), - [anon_sym___thiscall] = ACTIONS(1100), - [anon_sym___vectorcall] = ACTIONS(1100), - [anon_sym_LBRACE] = ACTIONS(1102), - [anon_sym_static] = ACTIONS(1100), - [anon_sym_auto] = ACTIONS(1100), - [anon_sym_register] = ACTIONS(1100), - [anon_sym_inline] = ACTIONS(1100), - [anon_sym_const] = ACTIONS(1100), - [anon_sym_volatile] = ACTIONS(1100), - [anon_sym_restrict] = ACTIONS(1100), - [anon_sym__Atomic] = ACTIONS(1100), - [anon_sym_signed] = ACTIONS(1100), - [anon_sym_unsigned] = ACTIONS(1100), - [anon_sym_long] = ACTIONS(1100), - [anon_sym_short] = ACTIONS(1100), - [sym_primitive_type] = ACTIONS(1100), - [anon_sym_enum] = ACTIONS(1100), - [anon_sym_struct] = ACTIONS(1100), - [anon_sym_union] = ACTIONS(1100), - [anon_sym_if] = ACTIONS(1100), - [anon_sym_switch] = ACTIONS(1100), - [anon_sym_case] = ACTIONS(1100), - [anon_sym_default] = ACTIONS(1100), - [anon_sym_while] = ACTIONS(1100), - [anon_sym_do] = ACTIONS(1100), - [anon_sym_for] = ACTIONS(1100), - [anon_sym_return] = ACTIONS(1100), - [anon_sym_break] = ACTIONS(1100), - [anon_sym_continue] = ACTIONS(1100), - [anon_sym_goto] = ACTIONS(1100), - [anon_sym_DASH_DASH] = ACTIONS(1102), - [anon_sym_PLUS_PLUS] = ACTIONS(1102), - [anon_sym_sizeof] = ACTIONS(1100), - [sym_number_literal] = ACTIONS(1102), - [anon_sym_L_SQUOTE] = ACTIONS(1102), - [anon_sym_u_SQUOTE] = ACTIONS(1102), - [anon_sym_U_SQUOTE] = ACTIONS(1102), - [anon_sym_u8_SQUOTE] = ACTIONS(1102), - [anon_sym_SQUOTE] = ACTIONS(1102), - [anon_sym_L_DQUOTE] = ACTIONS(1102), - [anon_sym_u_DQUOTE] = ACTIONS(1102), - [anon_sym_U_DQUOTE] = ACTIONS(1102), - [anon_sym_u8_DQUOTE] = ACTIONS(1102), - [anon_sym_DQUOTE] = ACTIONS(1102), - [sym_true] = ACTIONS(1100), - [sym_false] = ACTIONS(1100), - [sym_null] = ACTIONS(1100), - [sym_comment] = ACTIONS(3), - }, - [357] = { - [sym_identifier] = ACTIONS(1060), - [aux_sym_preproc_include_token1] = ACTIONS(1060), - [aux_sym_preproc_def_token1] = ACTIONS(1060), - [aux_sym_preproc_if_token1] = ACTIONS(1060), - [aux_sym_preproc_if_token2] = ACTIONS(1060), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1060), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1060), - [sym_preproc_directive] = ACTIONS(1060), - [anon_sym_LPAREN2] = ACTIONS(1062), - [anon_sym_BANG] = ACTIONS(1062), - [anon_sym_TILDE] = ACTIONS(1062), - [anon_sym_DASH] = ACTIONS(1060), - [anon_sym_PLUS] = ACTIONS(1060), - [anon_sym_STAR] = ACTIONS(1062), - [anon_sym_AMP] = ACTIONS(1062), - [anon_sym_SEMI] = ACTIONS(1062), - [anon_sym_typedef] = ACTIONS(1060), - [anon_sym_extern] = ACTIONS(1060), - [anon_sym___attribute__] = ACTIONS(1060), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1062), - [anon_sym___declspec] = ACTIONS(1060), - [anon_sym___cdecl] = ACTIONS(1060), - [anon_sym___clrcall] = ACTIONS(1060), - [anon_sym___stdcall] = ACTIONS(1060), - [anon_sym___fastcall] = ACTIONS(1060), - [anon_sym___thiscall] = ACTIONS(1060), - [anon_sym___vectorcall] = ACTIONS(1060), - [anon_sym_LBRACE] = ACTIONS(1062), - [anon_sym_static] = ACTIONS(1060), - [anon_sym_auto] = ACTIONS(1060), - [anon_sym_register] = ACTIONS(1060), - [anon_sym_inline] = ACTIONS(1060), - [anon_sym_const] = ACTIONS(1060), - [anon_sym_volatile] = ACTIONS(1060), - [anon_sym_restrict] = ACTIONS(1060), - [anon_sym__Atomic] = ACTIONS(1060), - [anon_sym_signed] = ACTIONS(1060), - [anon_sym_unsigned] = ACTIONS(1060), - [anon_sym_long] = ACTIONS(1060), - [anon_sym_short] = ACTIONS(1060), - [sym_primitive_type] = ACTIONS(1060), - [anon_sym_enum] = ACTIONS(1060), - [anon_sym_struct] = ACTIONS(1060), - [anon_sym_union] = ACTIONS(1060), - [anon_sym_if] = ACTIONS(1060), - [anon_sym_switch] = ACTIONS(1060), - [anon_sym_case] = ACTIONS(1060), - [anon_sym_default] = ACTIONS(1060), - [anon_sym_while] = ACTIONS(1060), - [anon_sym_do] = ACTIONS(1060), - [anon_sym_for] = ACTIONS(1060), - [anon_sym_return] = ACTIONS(1060), - [anon_sym_break] = ACTIONS(1060), - [anon_sym_continue] = ACTIONS(1060), - [anon_sym_goto] = ACTIONS(1060), - [anon_sym_DASH_DASH] = ACTIONS(1062), - [anon_sym_PLUS_PLUS] = ACTIONS(1062), - [anon_sym_sizeof] = ACTIONS(1060), - [sym_number_literal] = ACTIONS(1062), - [anon_sym_L_SQUOTE] = ACTIONS(1062), - [anon_sym_u_SQUOTE] = ACTIONS(1062), - [anon_sym_U_SQUOTE] = ACTIONS(1062), - [anon_sym_u8_SQUOTE] = ACTIONS(1062), - [anon_sym_SQUOTE] = ACTIONS(1062), - [anon_sym_L_DQUOTE] = ACTIONS(1062), - [anon_sym_u_DQUOTE] = ACTIONS(1062), - [anon_sym_U_DQUOTE] = ACTIONS(1062), - [anon_sym_u8_DQUOTE] = ACTIONS(1062), - [anon_sym_DQUOTE] = ACTIONS(1062), - [sym_true] = ACTIONS(1060), - [sym_false] = ACTIONS(1060), - [sym_null] = ACTIONS(1060), - [sym_comment] = ACTIONS(3), - }, - [358] = { - [sym_identifier] = ACTIONS(1112), - [aux_sym_preproc_include_token1] = ACTIONS(1112), - [aux_sym_preproc_def_token1] = ACTIONS(1112), - [aux_sym_preproc_if_token1] = ACTIONS(1112), - [aux_sym_preproc_if_token2] = ACTIONS(1112), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1112), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1112), - [sym_preproc_directive] = ACTIONS(1112), - [anon_sym_LPAREN2] = ACTIONS(1114), - [anon_sym_BANG] = ACTIONS(1114), - [anon_sym_TILDE] = ACTIONS(1114), - [anon_sym_DASH] = ACTIONS(1112), - [anon_sym_PLUS] = ACTIONS(1112), - [anon_sym_STAR] = ACTIONS(1114), - [anon_sym_AMP] = ACTIONS(1114), - [anon_sym_SEMI] = ACTIONS(1114), - [anon_sym_typedef] = ACTIONS(1112), - [anon_sym_extern] = ACTIONS(1112), - [anon_sym___attribute__] = ACTIONS(1112), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1114), - [anon_sym___declspec] = ACTIONS(1112), - [anon_sym___cdecl] = ACTIONS(1112), - [anon_sym___clrcall] = ACTIONS(1112), - [anon_sym___stdcall] = ACTIONS(1112), - [anon_sym___fastcall] = ACTIONS(1112), - [anon_sym___thiscall] = ACTIONS(1112), - [anon_sym___vectorcall] = ACTIONS(1112), - [anon_sym_LBRACE] = ACTIONS(1114), - [anon_sym_static] = ACTIONS(1112), - [anon_sym_auto] = ACTIONS(1112), - [anon_sym_register] = ACTIONS(1112), - [anon_sym_inline] = ACTIONS(1112), - [anon_sym_const] = ACTIONS(1112), - [anon_sym_volatile] = ACTIONS(1112), - [anon_sym_restrict] = ACTIONS(1112), - [anon_sym__Atomic] = ACTIONS(1112), - [anon_sym_signed] = ACTIONS(1112), - [anon_sym_unsigned] = ACTIONS(1112), - [anon_sym_long] = ACTIONS(1112), - [anon_sym_short] = ACTIONS(1112), - [sym_primitive_type] = ACTIONS(1112), - [anon_sym_enum] = ACTIONS(1112), - [anon_sym_struct] = ACTIONS(1112), - [anon_sym_union] = ACTIONS(1112), - [anon_sym_if] = ACTIONS(1112), - [anon_sym_switch] = ACTIONS(1112), - [anon_sym_case] = ACTIONS(1112), - [anon_sym_default] = ACTIONS(1112), - [anon_sym_while] = ACTIONS(1112), - [anon_sym_do] = ACTIONS(1112), - [anon_sym_for] = ACTIONS(1112), - [anon_sym_return] = ACTIONS(1112), - [anon_sym_break] = ACTIONS(1112), - [anon_sym_continue] = ACTIONS(1112), - [anon_sym_goto] = ACTIONS(1112), - [anon_sym_DASH_DASH] = ACTIONS(1114), - [anon_sym_PLUS_PLUS] = ACTIONS(1114), - [anon_sym_sizeof] = ACTIONS(1112), - [sym_number_literal] = ACTIONS(1114), - [anon_sym_L_SQUOTE] = ACTIONS(1114), - [anon_sym_u_SQUOTE] = ACTIONS(1114), - [anon_sym_U_SQUOTE] = ACTIONS(1114), - [anon_sym_u8_SQUOTE] = ACTIONS(1114), - [anon_sym_SQUOTE] = ACTIONS(1114), - [anon_sym_L_DQUOTE] = ACTIONS(1114), - [anon_sym_u_DQUOTE] = ACTIONS(1114), - [anon_sym_U_DQUOTE] = ACTIONS(1114), - [anon_sym_u8_DQUOTE] = ACTIONS(1114), - [anon_sym_DQUOTE] = ACTIONS(1114), - [sym_true] = ACTIONS(1112), - [sym_false] = ACTIONS(1112), - [sym_null] = ACTIONS(1112), - [sym_comment] = ACTIONS(3), - }, - [359] = { - [sym_identifier] = ACTIONS(1108), - [aux_sym_preproc_include_token1] = ACTIONS(1108), - [aux_sym_preproc_def_token1] = ACTIONS(1108), - [aux_sym_preproc_if_token1] = ACTIONS(1108), - [aux_sym_preproc_if_token2] = ACTIONS(1108), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1108), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1108), - [sym_preproc_directive] = ACTIONS(1108), - [anon_sym_LPAREN2] = ACTIONS(1110), - [anon_sym_BANG] = ACTIONS(1110), - [anon_sym_TILDE] = ACTIONS(1110), - [anon_sym_DASH] = ACTIONS(1108), - [anon_sym_PLUS] = ACTIONS(1108), - [anon_sym_STAR] = ACTIONS(1110), - [anon_sym_AMP] = ACTIONS(1110), - [anon_sym_SEMI] = ACTIONS(1110), - [anon_sym_typedef] = ACTIONS(1108), - [anon_sym_extern] = ACTIONS(1108), - [anon_sym___attribute__] = ACTIONS(1108), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1110), - [anon_sym___declspec] = ACTIONS(1108), - [anon_sym___cdecl] = ACTIONS(1108), - [anon_sym___clrcall] = ACTIONS(1108), - [anon_sym___stdcall] = ACTIONS(1108), - [anon_sym___fastcall] = ACTIONS(1108), - [anon_sym___thiscall] = ACTIONS(1108), - [anon_sym___vectorcall] = ACTIONS(1108), - [anon_sym_LBRACE] = ACTIONS(1110), - [anon_sym_static] = ACTIONS(1108), - [anon_sym_auto] = ACTIONS(1108), - [anon_sym_register] = ACTIONS(1108), - [anon_sym_inline] = ACTIONS(1108), - [anon_sym_const] = ACTIONS(1108), - [anon_sym_volatile] = ACTIONS(1108), - [anon_sym_restrict] = ACTIONS(1108), - [anon_sym__Atomic] = ACTIONS(1108), - [anon_sym_signed] = ACTIONS(1108), - [anon_sym_unsigned] = ACTIONS(1108), - [anon_sym_long] = ACTIONS(1108), - [anon_sym_short] = ACTIONS(1108), - [sym_primitive_type] = ACTIONS(1108), - [anon_sym_enum] = ACTIONS(1108), - [anon_sym_struct] = ACTIONS(1108), - [anon_sym_union] = ACTIONS(1108), - [anon_sym_if] = ACTIONS(1108), - [anon_sym_switch] = ACTIONS(1108), - [anon_sym_case] = ACTIONS(1108), - [anon_sym_default] = ACTIONS(1108), - [anon_sym_while] = ACTIONS(1108), - [anon_sym_do] = ACTIONS(1108), - [anon_sym_for] = ACTIONS(1108), - [anon_sym_return] = ACTIONS(1108), - [anon_sym_break] = ACTIONS(1108), - [anon_sym_continue] = ACTIONS(1108), - [anon_sym_goto] = ACTIONS(1108), - [anon_sym_DASH_DASH] = ACTIONS(1110), - [anon_sym_PLUS_PLUS] = ACTIONS(1110), - [anon_sym_sizeof] = ACTIONS(1108), - [sym_number_literal] = ACTIONS(1110), - [anon_sym_L_SQUOTE] = ACTIONS(1110), - [anon_sym_u_SQUOTE] = ACTIONS(1110), - [anon_sym_U_SQUOTE] = ACTIONS(1110), - [anon_sym_u8_SQUOTE] = ACTIONS(1110), - [anon_sym_SQUOTE] = ACTIONS(1110), - [anon_sym_L_DQUOTE] = ACTIONS(1110), - [anon_sym_u_DQUOTE] = ACTIONS(1110), - [anon_sym_U_DQUOTE] = ACTIONS(1110), - [anon_sym_u8_DQUOTE] = ACTIONS(1110), - [anon_sym_DQUOTE] = ACTIONS(1110), - [sym_true] = ACTIONS(1108), - [sym_false] = ACTIONS(1108), - [sym_null] = ACTIONS(1108), - [sym_comment] = ACTIONS(3), - }, - [360] = { - [sym_identifier] = ACTIONS(1052), - [aux_sym_preproc_include_token1] = ACTIONS(1052), - [aux_sym_preproc_def_token1] = ACTIONS(1052), - [aux_sym_preproc_if_token1] = ACTIONS(1052), - [aux_sym_preproc_if_token2] = ACTIONS(1052), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1052), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1052), - [sym_preproc_directive] = ACTIONS(1052), - [anon_sym_LPAREN2] = ACTIONS(1054), - [anon_sym_BANG] = ACTIONS(1054), - [anon_sym_TILDE] = ACTIONS(1054), - [anon_sym_DASH] = ACTIONS(1052), - [anon_sym_PLUS] = ACTIONS(1052), - [anon_sym_STAR] = ACTIONS(1054), - [anon_sym_AMP] = ACTIONS(1054), - [anon_sym_SEMI] = ACTIONS(1054), - [anon_sym_typedef] = ACTIONS(1052), - [anon_sym_extern] = ACTIONS(1052), - [anon_sym___attribute__] = ACTIONS(1052), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1054), - [anon_sym___declspec] = ACTIONS(1052), - [anon_sym___cdecl] = ACTIONS(1052), - [anon_sym___clrcall] = ACTIONS(1052), - [anon_sym___stdcall] = ACTIONS(1052), - [anon_sym___fastcall] = ACTIONS(1052), - [anon_sym___thiscall] = ACTIONS(1052), - [anon_sym___vectorcall] = ACTIONS(1052), - [anon_sym_LBRACE] = ACTIONS(1054), - [anon_sym_static] = ACTIONS(1052), - [anon_sym_auto] = ACTIONS(1052), - [anon_sym_register] = ACTIONS(1052), - [anon_sym_inline] = ACTIONS(1052), - [anon_sym_const] = ACTIONS(1052), - [anon_sym_volatile] = ACTIONS(1052), - [anon_sym_restrict] = ACTIONS(1052), - [anon_sym__Atomic] = ACTIONS(1052), - [anon_sym_signed] = ACTIONS(1052), - [anon_sym_unsigned] = ACTIONS(1052), - [anon_sym_long] = ACTIONS(1052), - [anon_sym_short] = ACTIONS(1052), - [sym_primitive_type] = ACTIONS(1052), - [anon_sym_enum] = ACTIONS(1052), - [anon_sym_struct] = ACTIONS(1052), - [anon_sym_union] = ACTIONS(1052), - [anon_sym_if] = ACTIONS(1052), - [anon_sym_switch] = ACTIONS(1052), - [anon_sym_case] = ACTIONS(1052), - [anon_sym_default] = ACTIONS(1052), - [anon_sym_while] = ACTIONS(1052), - [anon_sym_do] = ACTIONS(1052), - [anon_sym_for] = ACTIONS(1052), - [anon_sym_return] = ACTIONS(1052), - [anon_sym_break] = ACTIONS(1052), - [anon_sym_continue] = ACTIONS(1052), - [anon_sym_goto] = ACTIONS(1052), - [anon_sym_DASH_DASH] = ACTIONS(1054), - [anon_sym_PLUS_PLUS] = ACTIONS(1054), - [anon_sym_sizeof] = ACTIONS(1052), - [sym_number_literal] = ACTIONS(1054), - [anon_sym_L_SQUOTE] = ACTIONS(1054), - [anon_sym_u_SQUOTE] = ACTIONS(1054), - [anon_sym_U_SQUOTE] = ACTIONS(1054), - [anon_sym_u8_SQUOTE] = ACTIONS(1054), - [anon_sym_SQUOTE] = ACTIONS(1054), - [anon_sym_L_DQUOTE] = ACTIONS(1054), - [anon_sym_u_DQUOTE] = ACTIONS(1054), - [anon_sym_U_DQUOTE] = ACTIONS(1054), - [anon_sym_u8_DQUOTE] = ACTIONS(1054), - [anon_sym_DQUOTE] = ACTIONS(1054), - [sym_true] = ACTIONS(1052), - [sym_false] = ACTIONS(1052), - [sym_null] = ACTIONS(1052), - [sym_comment] = ACTIONS(3), - }, - [361] = { - [ts_builtin_sym_end] = ACTIONS(1050), - [sym_identifier] = ACTIONS(1048), - [aux_sym_preproc_include_token1] = ACTIONS(1048), - [aux_sym_preproc_def_token1] = ACTIONS(1048), - [aux_sym_preproc_if_token1] = ACTIONS(1048), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1048), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1048), - [sym_preproc_directive] = ACTIONS(1048), - [anon_sym_LPAREN2] = ACTIONS(1050), - [anon_sym_BANG] = ACTIONS(1050), - [anon_sym_TILDE] = ACTIONS(1050), - [anon_sym_DASH] = ACTIONS(1048), - [anon_sym_PLUS] = ACTIONS(1048), - [anon_sym_STAR] = ACTIONS(1050), - [anon_sym_AMP] = ACTIONS(1050), - [anon_sym_SEMI] = ACTIONS(1050), - [anon_sym_typedef] = ACTIONS(1048), - [anon_sym_extern] = ACTIONS(1048), - [anon_sym___attribute__] = ACTIONS(1048), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1050), - [anon_sym___declspec] = ACTIONS(1048), - [anon_sym___cdecl] = ACTIONS(1048), - [anon_sym___clrcall] = ACTIONS(1048), - [anon_sym___stdcall] = ACTIONS(1048), - [anon_sym___fastcall] = ACTIONS(1048), - [anon_sym___thiscall] = ACTIONS(1048), - [anon_sym___vectorcall] = ACTIONS(1048), - [anon_sym_LBRACE] = ACTIONS(1050), - [anon_sym_static] = ACTIONS(1048), - [anon_sym_auto] = ACTIONS(1048), - [anon_sym_register] = ACTIONS(1048), - [anon_sym_inline] = ACTIONS(1048), - [anon_sym_const] = ACTIONS(1048), - [anon_sym_volatile] = ACTIONS(1048), - [anon_sym_restrict] = ACTIONS(1048), - [anon_sym__Atomic] = ACTIONS(1048), - [anon_sym_signed] = ACTIONS(1048), - [anon_sym_unsigned] = ACTIONS(1048), - [anon_sym_long] = ACTIONS(1048), - [anon_sym_short] = ACTIONS(1048), - [sym_primitive_type] = ACTIONS(1048), - [anon_sym_enum] = ACTIONS(1048), - [anon_sym_struct] = ACTIONS(1048), - [anon_sym_union] = ACTIONS(1048), - [anon_sym_if] = ACTIONS(1048), - [anon_sym_switch] = ACTIONS(1048), - [anon_sym_case] = ACTIONS(1048), - [anon_sym_default] = ACTIONS(1048), - [anon_sym_while] = ACTIONS(1048), - [anon_sym_do] = ACTIONS(1048), - [anon_sym_for] = ACTIONS(1048), - [anon_sym_return] = ACTIONS(1048), - [anon_sym_break] = ACTIONS(1048), - [anon_sym_continue] = ACTIONS(1048), - [anon_sym_goto] = ACTIONS(1048), - [anon_sym_DASH_DASH] = ACTIONS(1050), - [anon_sym_PLUS_PLUS] = ACTIONS(1050), - [anon_sym_sizeof] = ACTIONS(1048), - [sym_number_literal] = ACTIONS(1050), - [anon_sym_L_SQUOTE] = ACTIONS(1050), - [anon_sym_u_SQUOTE] = ACTIONS(1050), - [anon_sym_U_SQUOTE] = ACTIONS(1050), - [anon_sym_u8_SQUOTE] = ACTIONS(1050), - [anon_sym_SQUOTE] = ACTIONS(1050), - [anon_sym_L_DQUOTE] = ACTIONS(1050), - [anon_sym_u_DQUOTE] = ACTIONS(1050), - [anon_sym_U_DQUOTE] = ACTIONS(1050), - [anon_sym_u8_DQUOTE] = ACTIONS(1050), - [anon_sym_DQUOTE] = ACTIONS(1050), - [sym_true] = ACTIONS(1048), - [sym_false] = ACTIONS(1048), - [sym_null] = ACTIONS(1048), - [sym_comment] = ACTIONS(3), - }, - [362] = { - [sym_identifier] = ACTIONS(1096), - [aux_sym_preproc_include_token1] = ACTIONS(1096), - [aux_sym_preproc_def_token1] = ACTIONS(1096), - [aux_sym_preproc_if_token1] = ACTIONS(1096), - [aux_sym_preproc_if_token2] = ACTIONS(1096), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1096), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1096), - [sym_preproc_directive] = ACTIONS(1096), - [anon_sym_LPAREN2] = ACTIONS(1098), - [anon_sym_BANG] = ACTIONS(1098), - [anon_sym_TILDE] = ACTIONS(1098), - [anon_sym_DASH] = ACTIONS(1096), - [anon_sym_PLUS] = ACTIONS(1096), - [anon_sym_STAR] = ACTIONS(1098), - [anon_sym_AMP] = ACTIONS(1098), - [anon_sym_SEMI] = ACTIONS(1098), - [anon_sym_typedef] = ACTIONS(1096), - [anon_sym_extern] = ACTIONS(1096), - [anon_sym___attribute__] = ACTIONS(1096), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1098), - [anon_sym___declspec] = ACTIONS(1096), - [anon_sym___cdecl] = ACTIONS(1096), - [anon_sym___clrcall] = ACTIONS(1096), - [anon_sym___stdcall] = ACTIONS(1096), - [anon_sym___fastcall] = ACTIONS(1096), - [anon_sym___thiscall] = ACTIONS(1096), - [anon_sym___vectorcall] = ACTIONS(1096), - [anon_sym_LBRACE] = ACTIONS(1098), - [anon_sym_static] = ACTIONS(1096), - [anon_sym_auto] = ACTIONS(1096), - [anon_sym_register] = ACTIONS(1096), - [anon_sym_inline] = ACTIONS(1096), - [anon_sym_const] = ACTIONS(1096), - [anon_sym_volatile] = ACTIONS(1096), - [anon_sym_restrict] = ACTIONS(1096), - [anon_sym__Atomic] = ACTIONS(1096), - [anon_sym_signed] = ACTIONS(1096), - [anon_sym_unsigned] = ACTIONS(1096), - [anon_sym_long] = ACTIONS(1096), - [anon_sym_short] = ACTIONS(1096), - [sym_primitive_type] = ACTIONS(1096), - [anon_sym_enum] = ACTIONS(1096), - [anon_sym_struct] = ACTIONS(1096), - [anon_sym_union] = ACTIONS(1096), - [anon_sym_if] = ACTIONS(1096), - [anon_sym_switch] = ACTIONS(1096), - [anon_sym_case] = ACTIONS(1096), - [anon_sym_default] = ACTIONS(1096), - [anon_sym_while] = ACTIONS(1096), - [anon_sym_do] = ACTIONS(1096), - [anon_sym_for] = ACTIONS(1096), - [anon_sym_return] = ACTIONS(1096), - [anon_sym_break] = ACTIONS(1096), - [anon_sym_continue] = ACTIONS(1096), - [anon_sym_goto] = ACTIONS(1096), - [anon_sym_DASH_DASH] = ACTIONS(1098), - [anon_sym_PLUS_PLUS] = ACTIONS(1098), - [anon_sym_sizeof] = ACTIONS(1096), - [sym_number_literal] = ACTIONS(1098), - [anon_sym_L_SQUOTE] = ACTIONS(1098), - [anon_sym_u_SQUOTE] = ACTIONS(1098), - [anon_sym_U_SQUOTE] = ACTIONS(1098), - [anon_sym_u8_SQUOTE] = ACTIONS(1098), - [anon_sym_SQUOTE] = ACTIONS(1098), - [anon_sym_L_DQUOTE] = ACTIONS(1098), - [anon_sym_u_DQUOTE] = ACTIONS(1098), - [anon_sym_U_DQUOTE] = ACTIONS(1098), - [anon_sym_u8_DQUOTE] = ACTIONS(1098), - [anon_sym_DQUOTE] = ACTIONS(1098), - [sym_true] = ACTIONS(1096), - [sym_false] = ACTIONS(1096), - [sym_null] = ACTIONS(1096), - [sym_comment] = ACTIONS(3), - }, - [363] = { - [ts_builtin_sym_end] = ACTIONS(1030), - [sym_identifier] = ACTIONS(1028), - [aux_sym_preproc_include_token1] = ACTIONS(1028), - [aux_sym_preproc_def_token1] = ACTIONS(1028), - [aux_sym_preproc_if_token1] = ACTIONS(1028), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1028), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1028), - [sym_preproc_directive] = ACTIONS(1028), - [anon_sym_LPAREN2] = ACTIONS(1030), - [anon_sym_BANG] = ACTIONS(1030), - [anon_sym_TILDE] = ACTIONS(1030), - [anon_sym_DASH] = ACTIONS(1028), - [anon_sym_PLUS] = ACTIONS(1028), - [anon_sym_STAR] = ACTIONS(1030), - [anon_sym_AMP] = ACTIONS(1030), - [anon_sym_SEMI] = ACTIONS(1030), - [anon_sym_typedef] = ACTIONS(1028), - [anon_sym_extern] = ACTIONS(1028), - [anon_sym___attribute__] = ACTIONS(1028), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1030), - [anon_sym___declspec] = ACTIONS(1028), - [anon_sym___cdecl] = ACTIONS(1028), - [anon_sym___clrcall] = ACTIONS(1028), - [anon_sym___stdcall] = ACTIONS(1028), - [anon_sym___fastcall] = ACTIONS(1028), - [anon_sym___thiscall] = ACTIONS(1028), - [anon_sym___vectorcall] = ACTIONS(1028), - [anon_sym_LBRACE] = ACTIONS(1030), - [anon_sym_static] = ACTIONS(1028), - [anon_sym_auto] = ACTIONS(1028), - [anon_sym_register] = ACTIONS(1028), - [anon_sym_inline] = ACTIONS(1028), - [anon_sym_const] = ACTIONS(1028), - [anon_sym_volatile] = ACTIONS(1028), - [anon_sym_restrict] = ACTIONS(1028), - [anon_sym__Atomic] = ACTIONS(1028), - [anon_sym_signed] = ACTIONS(1028), - [anon_sym_unsigned] = ACTIONS(1028), - [anon_sym_long] = ACTIONS(1028), - [anon_sym_short] = ACTIONS(1028), - [sym_primitive_type] = ACTIONS(1028), - [anon_sym_enum] = ACTIONS(1028), - [anon_sym_struct] = ACTIONS(1028), - [anon_sym_union] = ACTIONS(1028), - [anon_sym_if] = ACTIONS(1028), - [anon_sym_switch] = ACTIONS(1028), - [anon_sym_case] = ACTIONS(1028), - [anon_sym_default] = ACTIONS(1028), - [anon_sym_while] = ACTIONS(1028), - [anon_sym_do] = ACTIONS(1028), - [anon_sym_for] = ACTIONS(1028), - [anon_sym_return] = ACTIONS(1028), - [anon_sym_break] = ACTIONS(1028), - [anon_sym_continue] = ACTIONS(1028), - [anon_sym_goto] = ACTIONS(1028), - [anon_sym_DASH_DASH] = ACTIONS(1030), - [anon_sym_PLUS_PLUS] = ACTIONS(1030), - [anon_sym_sizeof] = ACTIONS(1028), - [sym_number_literal] = ACTIONS(1030), - [anon_sym_L_SQUOTE] = ACTIONS(1030), - [anon_sym_u_SQUOTE] = ACTIONS(1030), - [anon_sym_U_SQUOTE] = ACTIONS(1030), - [anon_sym_u8_SQUOTE] = ACTIONS(1030), - [anon_sym_SQUOTE] = ACTIONS(1030), - [anon_sym_L_DQUOTE] = ACTIONS(1030), - [anon_sym_u_DQUOTE] = ACTIONS(1030), - [anon_sym_U_DQUOTE] = ACTIONS(1030), - [anon_sym_u8_DQUOTE] = ACTIONS(1030), - [anon_sym_DQUOTE] = ACTIONS(1030), - [sym_true] = ACTIONS(1028), - [sym_false] = ACTIONS(1028), - [sym_null] = ACTIONS(1028), - [sym_comment] = ACTIONS(3), - }, - [364] = { - [sym_identifier] = ACTIONS(1088), - [aux_sym_preproc_include_token1] = ACTIONS(1088), - [aux_sym_preproc_def_token1] = ACTIONS(1088), - [aux_sym_preproc_if_token1] = ACTIONS(1088), - [aux_sym_preproc_if_token2] = ACTIONS(1088), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1088), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1088), - [sym_preproc_directive] = ACTIONS(1088), - [anon_sym_LPAREN2] = ACTIONS(1090), - [anon_sym_BANG] = ACTIONS(1090), - [anon_sym_TILDE] = ACTIONS(1090), - [anon_sym_DASH] = ACTIONS(1088), - [anon_sym_PLUS] = ACTIONS(1088), - [anon_sym_STAR] = ACTIONS(1090), - [anon_sym_AMP] = ACTIONS(1090), - [anon_sym_SEMI] = ACTIONS(1090), - [anon_sym_typedef] = ACTIONS(1088), - [anon_sym_extern] = ACTIONS(1088), - [anon_sym___attribute__] = ACTIONS(1088), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1090), - [anon_sym___declspec] = ACTIONS(1088), - [anon_sym___cdecl] = ACTIONS(1088), - [anon_sym___clrcall] = ACTIONS(1088), - [anon_sym___stdcall] = ACTIONS(1088), - [anon_sym___fastcall] = ACTIONS(1088), - [anon_sym___thiscall] = ACTIONS(1088), - [anon_sym___vectorcall] = ACTIONS(1088), - [anon_sym_LBRACE] = ACTIONS(1090), - [anon_sym_static] = ACTIONS(1088), - [anon_sym_auto] = ACTIONS(1088), - [anon_sym_register] = ACTIONS(1088), - [anon_sym_inline] = ACTIONS(1088), - [anon_sym_const] = ACTIONS(1088), - [anon_sym_volatile] = ACTIONS(1088), - [anon_sym_restrict] = ACTIONS(1088), - [anon_sym__Atomic] = ACTIONS(1088), - [anon_sym_signed] = ACTIONS(1088), - [anon_sym_unsigned] = ACTIONS(1088), - [anon_sym_long] = ACTIONS(1088), - [anon_sym_short] = ACTIONS(1088), - [sym_primitive_type] = ACTIONS(1088), - [anon_sym_enum] = ACTIONS(1088), - [anon_sym_struct] = ACTIONS(1088), - [anon_sym_union] = ACTIONS(1088), - [anon_sym_if] = ACTIONS(1088), - [anon_sym_switch] = ACTIONS(1088), - [anon_sym_case] = ACTIONS(1088), - [anon_sym_default] = ACTIONS(1088), - [anon_sym_while] = ACTIONS(1088), - [anon_sym_do] = ACTIONS(1088), - [anon_sym_for] = ACTIONS(1088), - [anon_sym_return] = ACTIONS(1088), - [anon_sym_break] = ACTIONS(1088), - [anon_sym_continue] = ACTIONS(1088), - [anon_sym_goto] = ACTIONS(1088), - [anon_sym_DASH_DASH] = ACTIONS(1090), - [anon_sym_PLUS_PLUS] = ACTIONS(1090), - [anon_sym_sizeof] = ACTIONS(1088), - [sym_number_literal] = ACTIONS(1090), - [anon_sym_L_SQUOTE] = ACTIONS(1090), - [anon_sym_u_SQUOTE] = ACTIONS(1090), - [anon_sym_U_SQUOTE] = ACTIONS(1090), - [anon_sym_u8_SQUOTE] = ACTIONS(1090), - [anon_sym_SQUOTE] = ACTIONS(1090), - [anon_sym_L_DQUOTE] = ACTIONS(1090), - [anon_sym_u_DQUOTE] = ACTIONS(1090), - [anon_sym_U_DQUOTE] = ACTIONS(1090), - [anon_sym_u8_DQUOTE] = ACTIONS(1090), - [anon_sym_DQUOTE] = ACTIONS(1090), - [sym_true] = ACTIONS(1088), - [sym_false] = ACTIONS(1088), - [sym_null] = ACTIONS(1088), - [sym_comment] = ACTIONS(3), - }, - [365] = { - [sym_identifier] = ACTIONS(1068), - [aux_sym_preproc_include_token1] = ACTIONS(1068), - [aux_sym_preproc_def_token1] = ACTIONS(1068), - [aux_sym_preproc_if_token1] = ACTIONS(1068), - [aux_sym_preproc_if_token2] = ACTIONS(1068), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1068), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1068), - [sym_preproc_directive] = ACTIONS(1068), - [anon_sym_LPAREN2] = ACTIONS(1070), - [anon_sym_BANG] = ACTIONS(1070), - [anon_sym_TILDE] = ACTIONS(1070), - [anon_sym_DASH] = ACTIONS(1068), - [anon_sym_PLUS] = ACTIONS(1068), - [anon_sym_STAR] = ACTIONS(1070), - [anon_sym_AMP] = ACTIONS(1070), - [anon_sym_SEMI] = ACTIONS(1070), - [anon_sym_typedef] = ACTIONS(1068), - [anon_sym_extern] = ACTIONS(1068), - [anon_sym___attribute__] = ACTIONS(1068), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1070), - [anon_sym___declspec] = ACTIONS(1068), - [anon_sym___cdecl] = ACTIONS(1068), - [anon_sym___clrcall] = ACTIONS(1068), - [anon_sym___stdcall] = ACTIONS(1068), - [anon_sym___fastcall] = ACTIONS(1068), - [anon_sym___thiscall] = ACTIONS(1068), - [anon_sym___vectorcall] = ACTIONS(1068), - [anon_sym_LBRACE] = ACTIONS(1070), - [anon_sym_static] = ACTIONS(1068), - [anon_sym_auto] = ACTIONS(1068), - [anon_sym_register] = ACTIONS(1068), - [anon_sym_inline] = ACTIONS(1068), - [anon_sym_const] = ACTIONS(1068), - [anon_sym_volatile] = ACTIONS(1068), - [anon_sym_restrict] = ACTIONS(1068), - [anon_sym__Atomic] = ACTIONS(1068), - [anon_sym_signed] = ACTIONS(1068), - [anon_sym_unsigned] = ACTIONS(1068), - [anon_sym_long] = ACTIONS(1068), - [anon_sym_short] = ACTIONS(1068), - [sym_primitive_type] = ACTIONS(1068), - [anon_sym_enum] = ACTIONS(1068), - [anon_sym_struct] = ACTIONS(1068), - [anon_sym_union] = ACTIONS(1068), - [anon_sym_if] = ACTIONS(1068), - [anon_sym_switch] = ACTIONS(1068), - [anon_sym_case] = ACTIONS(1068), - [anon_sym_default] = ACTIONS(1068), - [anon_sym_while] = ACTIONS(1068), - [anon_sym_do] = ACTIONS(1068), - [anon_sym_for] = ACTIONS(1068), - [anon_sym_return] = ACTIONS(1068), - [anon_sym_break] = ACTIONS(1068), - [anon_sym_continue] = ACTIONS(1068), - [anon_sym_goto] = ACTIONS(1068), - [anon_sym_DASH_DASH] = ACTIONS(1070), - [anon_sym_PLUS_PLUS] = ACTIONS(1070), - [anon_sym_sizeof] = ACTIONS(1068), - [sym_number_literal] = ACTIONS(1070), - [anon_sym_L_SQUOTE] = ACTIONS(1070), - [anon_sym_u_SQUOTE] = ACTIONS(1070), - [anon_sym_U_SQUOTE] = ACTIONS(1070), - [anon_sym_u8_SQUOTE] = ACTIONS(1070), - [anon_sym_SQUOTE] = ACTIONS(1070), - [anon_sym_L_DQUOTE] = ACTIONS(1070), - [anon_sym_u_DQUOTE] = ACTIONS(1070), - [anon_sym_U_DQUOTE] = ACTIONS(1070), - [anon_sym_u8_DQUOTE] = ACTIONS(1070), - [anon_sym_DQUOTE] = ACTIONS(1070), - [sym_true] = ACTIONS(1068), - [sym_false] = ACTIONS(1068), - [sym_null] = ACTIONS(1068), - [sym_comment] = ACTIONS(3), - }, - [366] = { - [ts_builtin_sym_end] = ACTIONS(1090), - [sym_identifier] = ACTIONS(1088), - [aux_sym_preproc_include_token1] = ACTIONS(1088), - [aux_sym_preproc_def_token1] = ACTIONS(1088), - [aux_sym_preproc_if_token1] = ACTIONS(1088), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1088), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1088), - [sym_preproc_directive] = ACTIONS(1088), - [anon_sym_LPAREN2] = ACTIONS(1090), - [anon_sym_BANG] = ACTIONS(1090), - [anon_sym_TILDE] = ACTIONS(1090), - [anon_sym_DASH] = ACTIONS(1088), - [anon_sym_PLUS] = ACTIONS(1088), - [anon_sym_STAR] = ACTIONS(1090), - [anon_sym_AMP] = ACTIONS(1090), - [anon_sym_SEMI] = ACTIONS(1090), - [anon_sym_typedef] = ACTIONS(1088), - [anon_sym_extern] = ACTIONS(1088), - [anon_sym___attribute__] = ACTIONS(1088), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1090), - [anon_sym___declspec] = ACTIONS(1088), - [anon_sym___cdecl] = ACTIONS(1088), - [anon_sym___clrcall] = ACTIONS(1088), - [anon_sym___stdcall] = ACTIONS(1088), - [anon_sym___fastcall] = ACTIONS(1088), - [anon_sym___thiscall] = ACTIONS(1088), - [anon_sym___vectorcall] = ACTIONS(1088), - [anon_sym_LBRACE] = ACTIONS(1090), - [anon_sym_static] = ACTIONS(1088), - [anon_sym_auto] = ACTIONS(1088), - [anon_sym_register] = ACTIONS(1088), - [anon_sym_inline] = ACTIONS(1088), - [anon_sym_const] = ACTIONS(1088), - [anon_sym_volatile] = ACTIONS(1088), - [anon_sym_restrict] = ACTIONS(1088), - [anon_sym__Atomic] = ACTIONS(1088), - [anon_sym_signed] = ACTIONS(1088), - [anon_sym_unsigned] = ACTIONS(1088), - [anon_sym_long] = ACTIONS(1088), - [anon_sym_short] = ACTIONS(1088), - [sym_primitive_type] = ACTIONS(1088), - [anon_sym_enum] = ACTIONS(1088), - [anon_sym_struct] = ACTIONS(1088), - [anon_sym_union] = ACTIONS(1088), - [anon_sym_if] = ACTIONS(1088), - [anon_sym_switch] = ACTIONS(1088), - [anon_sym_case] = ACTIONS(1088), - [anon_sym_default] = ACTIONS(1088), - [anon_sym_while] = ACTIONS(1088), - [anon_sym_do] = ACTIONS(1088), - [anon_sym_for] = ACTIONS(1088), - [anon_sym_return] = ACTIONS(1088), - [anon_sym_break] = ACTIONS(1088), - [anon_sym_continue] = ACTIONS(1088), - [anon_sym_goto] = ACTIONS(1088), - [anon_sym_DASH_DASH] = ACTIONS(1090), - [anon_sym_PLUS_PLUS] = ACTIONS(1090), - [anon_sym_sizeof] = ACTIONS(1088), - [sym_number_literal] = ACTIONS(1090), - [anon_sym_L_SQUOTE] = ACTIONS(1090), - [anon_sym_u_SQUOTE] = ACTIONS(1090), - [anon_sym_U_SQUOTE] = ACTIONS(1090), - [anon_sym_u8_SQUOTE] = ACTIONS(1090), - [anon_sym_SQUOTE] = ACTIONS(1090), - [anon_sym_L_DQUOTE] = ACTIONS(1090), - [anon_sym_u_DQUOTE] = ACTIONS(1090), - [anon_sym_U_DQUOTE] = ACTIONS(1090), - [anon_sym_u8_DQUOTE] = ACTIONS(1090), - [anon_sym_DQUOTE] = ACTIONS(1090), - [sym_true] = ACTIONS(1088), - [sym_false] = ACTIONS(1088), - [sym_null] = ACTIONS(1088), - [sym_comment] = ACTIONS(3), - }, - [367] = { - [ts_builtin_sym_end] = ACTIONS(1118), - [sym_identifier] = ACTIONS(1116), - [aux_sym_preproc_include_token1] = ACTIONS(1116), - [aux_sym_preproc_def_token1] = ACTIONS(1116), - [aux_sym_preproc_if_token1] = ACTIONS(1116), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1116), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1116), - [sym_preproc_directive] = ACTIONS(1116), - [anon_sym_LPAREN2] = ACTIONS(1118), - [anon_sym_BANG] = ACTIONS(1118), - [anon_sym_TILDE] = ACTIONS(1118), - [anon_sym_DASH] = ACTIONS(1116), - [anon_sym_PLUS] = ACTIONS(1116), - [anon_sym_STAR] = ACTIONS(1118), - [anon_sym_AMP] = ACTIONS(1118), - [anon_sym_SEMI] = ACTIONS(1118), - [anon_sym_typedef] = ACTIONS(1116), - [anon_sym_extern] = ACTIONS(1116), - [anon_sym___attribute__] = ACTIONS(1116), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1118), - [anon_sym___declspec] = ACTIONS(1116), - [anon_sym___cdecl] = ACTIONS(1116), - [anon_sym___clrcall] = ACTIONS(1116), - [anon_sym___stdcall] = ACTIONS(1116), - [anon_sym___fastcall] = ACTIONS(1116), - [anon_sym___thiscall] = ACTIONS(1116), - [anon_sym___vectorcall] = ACTIONS(1116), - [anon_sym_LBRACE] = ACTIONS(1118), - [anon_sym_static] = ACTIONS(1116), - [anon_sym_auto] = ACTIONS(1116), - [anon_sym_register] = ACTIONS(1116), - [anon_sym_inline] = ACTIONS(1116), - [anon_sym_const] = ACTIONS(1116), - [anon_sym_volatile] = ACTIONS(1116), - [anon_sym_restrict] = ACTIONS(1116), - [anon_sym__Atomic] = ACTIONS(1116), - [anon_sym_signed] = ACTIONS(1116), - [anon_sym_unsigned] = ACTIONS(1116), - [anon_sym_long] = ACTIONS(1116), - [anon_sym_short] = ACTIONS(1116), - [sym_primitive_type] = ACTIONS(1116), - [anon_sym_enum] = ACTIONS(1116), - [anon_sym_struct] = ACTIONS(1116), - [anon_sym_union] = ACTIONS(1116), - [anon_sym_if] = ACTIONS(1116), - [anon_sym_switch] = ACTIONS(1116), - [anon_sym_case] = ACTIONS(1116), - [anon_sym_default] = ACTIONS(1116), - [anon_sym_while] = ACTIONS(1116), - [anon_sym_do] = ACTIONS(1116), - [anon_sym_for] = ACTIONS(1116), - [anon_sym_return] = ACTIONS(1116), - [anon_sym_break] = ACTIONS(1116), - [anon_sym_continue] = ACTIONS(1116), - [anon_sym_goto] = ACTIONS(1116), - [anon_sym_DASH_DASH] = ACTIONS(1118), - [anon_sym_PLUS_PLUS] = ACTIONS(1118), - [anon_sym_sizeof] = ACTIONS(1116), - [sym_number_literal] = ACTIONS(1118), - [anon_sym_L_SQUOTE] = ACTIONS(1118), - [anon_sym_u_SQUOTE] = ACTIONS(1118), - [anon_sym_U_SQUOTE] = ACTIONS(1118), - [anon_sym_u8_SQUOTE] = ACTIONS(1118), - [anon_sym_SQUOTE] = ACTIONS(1118), - [anon_sym_L_DQUOTE] = ACTIONS(1118), - [anon_sym_u_DQUOTE] = ACTIONS(1118), - [anon_sym_U_DQUOTE] = ACTIONS(1118), - [anon_sym_u8_DQUOTE] = ACTIONS(1118), - [anon_sym_DQUOTE] = ACTIONS(1118), - [sym_true] = ACTIONS(1116), - [sym_false] = ACTIONS(1116), - [sym_null] = ACTIONS(1116), - [sym_comment] = ACTIONS(3), - }, - [368] = { - [sym_identifier] = ACTIONS(1052), - [aux_sym_preproc_include_token1] = ACTIONS(1052), - [aux_sym_preproc_def_token1] = ACTIONS(1052), - [aux_sym_preproc_if_token1] = ACTIONS(1052), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1052), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1052), - [sym_preproc_directive] = ACTIONS(1052), - [anon_sym_LPAREN2] = ACTIONS(1054), - [anon_sym_BANG] = ACTIONS(1054), - [anon_sym_TILDE] = ACTIONS(1054), - [anon_sym_DASH] = ACTIONS(1052), - [anon_sym_PLUS] = ACTIONS(1052), - [anon_sym_STAR] = ACTIONS(1054), - [anon_sym_AMP] = ACTIONS(1054), - [anon_sym_SEMI] = ACTIONS(1054), - [anon_sym_typedef] = ACTIONS(1052), - [anon_sym_extern] = ACTIONS(1052), - [anon_sym___attribute__] = ACTIONS(1052), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1054), - [anon_sym___declspec] = ACTIONS(1052), - [anon_sym___cdecl] = ACTIONS(1052), - [anon_sym___clrcall] = ACTIONS(1052), - [anon_sym___stdcall] = ACTIONS(1052), - [anon_sym___fastcall] = ACTIONS(1052), - [anon_sym___thiscall] = ACTIONS(1052), - [anon_sym___vectorcall] = ACTIONS(1052), - [anon_sym_LBRACE] = ACTIONS(1054), - [anon_sym_RBRACE] = ACTIONS(1054), - [anon_sym_static] = ACTIONS(1052), - [anon_sym_auto] = ACTIONS(1052), - [anon_sym_register] = ACTIONS(1052), - [anon_sym_inline] = ACTIONS(1052), - [anon_sym_const] = ACTIONS(1052), - [anon_sym_volatile] = ACTIONS(1052), - [anon_sym_restrict] = ACTIONS(1052), - [anon_sym__Atomic] = ACTIONS(1052), - [anon_sym_signed] = ACTIONS(1052), - [anon_sym_unsigned] = ACTIONS(1052), - [anon_sym_long] = ACTIONS(1052), - [anon_sym_short] = ACTIONS(1052), - [sym_primitive_type] = ACTIONS(1052), - [anon_sym_enum] = ACTIONS(1052), - [anon_sym_struct] = ACTIONS(1052), - [anon_sym_union] = ACTIONS(1052), - [anon_sym_if] = ACTIONS(1052), - [anon_sym_switch] = ACTIONS(1052), - [anon_sym_case] = ACTIONS(1052), - [anon_sym_default] = ACTIONS(1052), - [anon_sym_while] = ACTIONS(1052), - [anon_sym_do] = ACTIONS(1052), - [anon_sym_for] = ACTIONS(1052), - [anon_sym_return] = ACTIONS(1052), - [anon_sym_break] = ACTIONS(1052), - [anon_sym_continue] = ACTIONS(1052), - [anon_sym_goto] = ACTIONS(1052), - [anon_sym_DASH_DASH] = ACTIONS(1054), - [anon_sym_PLUS_PLUS] = ACTIONS(1054), - [anon_sym_sizeof] = ACTIONS(1052), - [sym_number_literal] = ACTIONS(1054), - [anon_sym_L_SQUOTE] = ACTIONS(1054), - [anon_sym_u_SQUOTE] = ACTIONS(1054), - [anon_sym_U_SQUOTE] = ACTIONS(1054), - [anon_sym_u8_SQUOTE] = ACTIONS(1054), - [anon_sym_SQUOTE] = ACTIONS(1054), - [anon_sym_L_DQUOTE] = ACTIONS(1054), - [anon_sym_u_DQUOTE] = ACTIONS(1054), - [anon_sym_U_DQUOTE] = ACTIONS(1054), - [anon_sym_u8_DQUOTE] = ACTIONS(1054), - [anon_sym_DQUOTE] = ACTIONS(1054), - [sym_true] = ACTIONS(1052), - [sym_false] = ACTIONS(1052), - [sym_null] = ACTIONS(1052), - [sym_comment] = ACTIONS(3), - }, - [369] = { - [ts_builtin_sym_end] = ACTIONS(1070), - [sym_identifier] = ACTIONS(1068), - [aux_sym_preproc_include_token1] = ACTIONS(1068), - [aux_sym_preproc_def_token1] = ACTIONS(1068), - [aux_sym_preproc_if_token1] = ACTIONS(1068), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1068), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1068), - [sym_preproc_directive] = ACTIONS(1068), - [anon_sym_LPAREN2] = ACTIONS(1070), - [anon_sym_BANG] = ACTIONS(1070), - [anon_sym_TILDE] = ACTIONS(1070), - [anon_sym_DASH] = ACTIONS(1068), - [anon_sym_PLUS] = ACTIONS(1068), - [anon_sym_STAR] = ACTIONS(1070), - [anon_sym_AMP] = ACTIONS(1070), - [anon_sym_SEMI] = ACTIONS(1070), - [anon_sym_typedef] = ACTIONS(1068), - [anon_sym_extern] = ACTIONS(1068), - [anon_sym___attribute__] = ACTIONS(1068), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1070), - [anon_sym___declspec] = ACTIONS(1068), - [anon_sym___cdecl] = ACTIONS(1068), - [anon_sym___clrcall] = ACTIONS(1068), - [anon_sym___stdcall] = ACTIONS(1068), - [anon_sym___fastcall] = ACTIONS(1068), - [anon_sym___thiscall] = ACTIONS(1068), - [anon_sym___vectorcall] = ACTIONS(1068), - [anon_sym_LBRACE] = ACTIONS(1070), - [anon_sym_static] = ACTIONS(1068), - [anon_sym_auto] = ACTIONS(1068), - [anon_sym_register] = ACTIONS(1068), - [anon_sym_inline] = ACTIONS(1068), - [anon_sym_const] = ACTIONS(1068), - [anon_sym_volatile] = ACTIONS(1068), - [anon_sym_restrict] = ACTIONS(1068), - [anon_sym__Atomic] = ACTIONS(1068), - [anon_sym_signed] = ACTIONS(1068), - [anon_sym_unsigned] = ACTIONS(1068), - [anon_sym_long] = ACTIONS(1068), - [anon_sym_short] = ACTIONS(1068), - [sym_primitive_type] = ACTIONS(1068), - [anon_sym_enum] = ACTIONS(1068), - [anon_sym_struct] = ACTIONS(1068), - [anon_sym_union] = ACTIONS(1068), - [anon_sym_if] = ACTIONS(1068), - [anon_sym_switch] = ACTIONS(1068), - [anon_sym_case] = ACTIONS(1068), - [anon_sym_default] = ACTIONS(1068), - [anon_sym_while] = ACTIONS(1068), - [anon_sym_do] = ACTIONS(1068), - [anon_sym_for] = ACTIONS(1068), - [anon_sym_return] = ACTIONS(1068), - [anon_sym_break] = ACTIONS(1068), - [anon_sym_continue] = ACTIONS(1068), - [anon_sym_goto] = ACTIONS(1068), - [anon_sym_DASH_DASH] = ACTIONS(1070), - [anon_sym_PLUS_PLUS] = ACTIONS(1070), - [anon_sym_sizeof] = ACTIONS(1068), - [sym_number_literal] = ACTIONS(1070), - [anon_sym_L_SQUOTE] = ACTIONS(1070), - [anon_sym_u_SQUOTE] = ACTIONS(1070), - [anon_sym_U_SQUOTE] = ACTIONS(1070), - [anon_sym_u8_SQUOTE] = ACTIONS(1070), - [anon_sym_SQUOTE] = ACTIONS(1070), - [anon_sym_L_DQUOTE] = ACTIONS(1070), - [anon_sym_u_DQUOTE] = ACTIONS(1070), - [anon_sym_U_DQUOTE] = ACTIONS(1070), - [anon_sym_u8_DQUOTE] = ACTIONS(1070), - [anon_sym_DQUOTE] = ACTIONS(1070), - [sym_true] = ACTIONS(1068), - [sym_false] = ACTIONS(1068), - [sym_null] = ACTIONS(1068), - [sym_comment] = ACTIONS(3), - }, - [370] = { - [ts_builtin_sym_end] = ACTIONS(1082), - [sym_identifier] = ACTIONS(1080), - [aux_sym_preproc_include_token1] = ACTIONS(1080), - [aux_sym_preproc_def_token1] = ACTIONS(1080), - [aux_sym_preproc_if_token1] = ACTIONS(1080), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1080), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1080), - [sym_preproc_directive] = ACTIONS(1080), - [anon_sym_LPAREN2] = ACTIONS(1082), - [anon_sym_BANG] = ACTIONS(1082), - [anon_sym_TILDE] = ACTIONS(1082), - [anon_sym_DASH] = ACTIONS(1080), - [anon_sym_PLUS] = ACTIONS(1080), - [anon_sym_STAR] = ACTIONS(1082), - [anon_sym_AMP] = ACTIONS(1082), - [anon_sym_SEMI] = ACTIONS(1082), - [anon_sym_typedef] = ACTIONS(1080), - [anon_sym_extern] = ACTIONS(1080), - [anon_sym___attribute__] = ACTIONS(1080), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1082), - [anon_sym___declspec] = ACTIONS(1080), - [anon_sym___cdecl] = ACTIONS(1080), - [anon_sym___clrcall] = ACTIONS(1080), - [anon_sym___stdcall] = ACTIONS(1080), - [anon_sym___fastcall] = ACTIONS(1080), - [anon_sym___thiscall] = ACTIONS(1080), - [anon_sym___vectorcall] = ACTIONS(1080), - [anon_sym_LBRACE] = ACTIONS(1082), - [anon_sym_static] = ACTIONS(1080), - [anon_sym_auto] = ACTIONS(1080), - [anon_sym_register] = ACTIONS(1080), - [anon_sym_inline] = ACTIONS(1080), - [anon_sym_const] = ACTIONS(1080), - [anon_sym_volatile] = ACTIONS(1080), - [anon_sym_restrict] = ACTIONS(1080), - [anon_sym__Atomic] = ACTIONS(1080), - [anon_sym_signed] = ACTIONS(1080), - [anon_sym_unsigned] = ACTIONS(1080), - [anon_sym_long] = ACTIONS(1080), - [anon_sym_short] = ACTIONS(1080), - [sym_primitive_type] = ACTIONS(1080), - [anon_sym_enum] = ACTIONS(1080), - [anon_sym_struct] = ACTIONS(1080), - [anon_sym_union] = ACTIONS(1080), - [anon_sym_if] = ACTIONS(1080), - [anon_sym_switch] = ACTIONS(1080), - [anon_sym_case] = ACTIONS(1080), - [anon_sym_default] = ACTIONS(1080), - [anon_sym_while] = ACTIONS(1080), - [anon_sym_do] = ACTIONS(1080), - [anon_sym_for] = ACTIONS(1080), - [anon_sym_return] = ACTIONS(1080), - [anon_sym_break] = ACTIONS(1080), - [anon_sym_continue] = ACTIONS(1080), - [anon_sym_goto] = ACTIONS(1080), - [anon_sym_DASH_DASH] = ACTIONS(1082), - [anon_sym_PLUS_PLUS] = ACTIONS(1082), - [anon_sym_sizeof] = ACTIONS(1080), - [sym_number_literal] = ACTIONS(1082), - [anon_sym_L_SQUOTE] = ACTIONS(1082), - [anon_sym_u_SQUOTE] = ACTIONS(1082), - [anon_sym_U_SQUOTE] = ACTIONS(1082), - [anon_sym_u8_SQUOTE] = ACTIONS(1082), - [anon_sym_SQUOTE] = ACTIONS(1082), - [anon_sym_L_DQUOTE] = ACTIONS(1082), - [anon_sym_u_DQUOTE] = ACTIONS(1082), - [anon_sym_U_DQUOTE] = ACTIONS(1082), - [anon_sym_u8_DQUOTE] = ACTIONS(1082), - [anon_sym_DQUOTE] = ACTIONS(1082), - [sym_true] = ACTIONS(1080), - [sym_false] = ACTIONS(1080), - [sym_null] = ACTIONS(1080), - [sym_comment] = ACTIONS(3), - }, - [371] = { - [sym_identifier] = ACTIONS(1064), - [aux_sym_preproc_include_token1] = ACTIONS(1064), - [aux_sym_preproc_def_token1] = ACTIONS(1064), - [aux_sym_preproc_if_token1] = ACTIONS(1064), - [aux_sym_preproc_if_token2] = ACTIONS(1064), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1064), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1064), - [sym_preproc_directive] = ACTIONS(1064), - [anon_sym_LPAREN2] = ACTIONS(1066), - [anon_sym_BANG] = ACTIONS(1066), - [anon_sym_TILDE] = ACTIONS(1066), - [anon_sym_DASH] = ACTIONS(1064), - [anon_sym_PLUS] = ACTIONS(1064), - [anon_sym_STAR] = ACTIONS(1066), - [anon_sym_AMP] = ACTIONS(1066), - [anon_sym_SEMI] = ACTIONS(1066), - [anon_sym_typedef] = ACTIONS(1064), - [anon_sym_extern] = ACTIONS(1064), - [anon_sym___attribute__] = ACTIONS(1064), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1066), - [anon_sym___declspec] = ACTIONS(1064), - [anon_sym___cdecl] = ACTIONS(1064), - [anon_sym___clrcall] = ACTIONS(1064), - [anon_sym___stdcall] = ACTIONS(1064), - [anon_sym___fastcall] = ACTIONS(1064), - [anon_sym___thiscall] = ACTIONS(1064), - [anon_sym___vectorcall] = ACTIONS(1064), - [anon_sym_LBRACE] = ACTIONS(1066), - [anon_sym_static] = ACTIONS(1064), - [anon_sym_auto] = ACTIONS(1064), - [anon_sym_register] = ACTIONS(1064), - [anon_sym_inline] = ACTIONS(1064), - [anon_sym_const] = ACTIONS(1064), - [anon_sym_volatile] = ACTIONS(1064), - [anon_sym_restrict] = ACTIONS(1064), - [anon_sym__Atomic] = ACTIONS(1064), - [anon_sym_signed] = ACTIONS(1064), - [anon_sym_unsigned] = ACTIONS(1064), - [anon_sym_long] = ACTIONS(1064), - [anon_sym_short] = ACTIONS(1064), - [sym_primitive_type] = ACTIONS(1064), - [anon_sym_enum] = ACTIONS(1064), - [anon_sym_struct] = ACTIONS(1064), - [anon_sym_union] = ACTIONS(1064), - [anon_sym_if] = ACTIONS(1064), - [anon_sym_switch] = ACTIONS(1064), - [anon_sym_case] = ACTIONS(1064), - [anon_sym_default] = ACTIONS(1064), - [anon_sym_while] = ACTIONS(1064), - [anon_sym_do] = ACTIONS(1064), - [anon_sym_for] = ACTIONS(1064), - [anon_sym_return] = ACTIONS(1064), - [anon_sym_break] = ACTIONS(1064), - [anon_sym_continue] = ACTIONS(1064), - [anon_sym_goto] = ACTIONS(1064), - [anon_sym_DASH_DASH] = ACTIONS(1066), - [anon_sym_PLUS_PLUS] = ACTIONS(1066), - [anon_sym_sizeof] = ACTIONS(1064), - [sym_number_literal] = ACTIONS(1066), - [anon_sym_L_SQUOTE] = ACTIONS(1066), - [anon_sym_u_SQUOTE] = ACTIONS(1066), - [anon_sym_U_SQUOTE] = ACTIONS(1066), - [anon_sym_u8_SQUOTE] = ACTIONS(1066), - [anon_sym_SQUOTE] = ACTIONS(1066), - [anon_sym_L_DQUOTE] = ACTIONS(1066), - [anon_sym_u_DQUOTE] = ACTIONS(1066), - [anon_sym_U_DQUOTE] = ACTIONS(1066), - [anon_sym_u8_DQUOTE] = ACTIONS(1066), - [anon_sym_DQUOTE] = ACTIONS(1066), - [sym_true] = ACTIONS(1064), - [sym_false] = ACTIONS(1064), - [sym_null] = ACTIONS(1064), - [sym_comment] = ACTIONS(3), - }, - [372] = { - [sym_identifier] = ACTIONS(1056), - [aux_sym_preproc_include_token1] = ACTIONS(1056), - [aux_sym_preproc_def_token1] = ACTIONS(1056), - [aux_sym_preproc_if_token1] = ACTIONS(1056), - [aux_sym_preproc_if_token2] = ACTIONS(1056), - [aux_sym_preproc_ifdef_token1] = ACTIONS(1056), - [aux_sym_preproc_ifdef_token2] = ACTIONS(1056), - [sym_preproc_directive] = ACTIONS(1056), - [anon_sym_LPAREN2] = ACTIONS(1058), - [anon_sym_BANG] = ACTIONS(1058), - [anon_sym_TILDE] = ACTIONS(1058), - [anon_sym_DASH] = ACTIONS(1056), - [anon_sym_PLUS] = ACTIONS(1056), - [anon_sym_STAR] = ACTIONS(1058), - [anon_sym_AMP] = ACTIONS(1058), - [anon_sym_SEMI] = ACTIONS(1058), - [anon_sym_typedef] = ACTIONS(1056), - [anon_sym_extern] = ACTIONS(1056), - [anon_sym___attribute__] = ACTIONS(1056), - [anon_sym_LBRACK_LBRACK] = ACTIONS(1058), - [anon_sym___declspec] = ACTIONS(1056), - [anon_sym___cdecl] = ACTIONS(1056), - [anon_sym___clrcall] = ACTIONS(1056), - [anon_sym___stdcall] = ACTIONS(1056), - [anon_sym___fastcall] = ACTIONS(1056), - [anon_sym___thiscall] = ACTIONS(1056), - [anon_sym___vectorcall] = ACTIONS(1056), - [anon_sym_LBRACE] = ACTIONS(1058), - [anon_sym_static] = ACTIONS(1056), - [anon_sym_auto] = ACTIONS(1056), - [anon_sym_register] = ACTIONS(1056), - [anon_sym_inline] = ACTIONS(1056), - [anon_sym_const] = ACTIONS(1056), - [anon_sym_volatile] = ACTIONS(1056), - [anon_sym_restrict] = ACTIONS(1056), - [anon_sym__Atomic] = ACTIONS(1056), - [anon_sym_signed] = ACTIONS(1056), - [anon_sym_unsigned] = ACTIONS(1056), - [anon_sym_long] = ACTIONS(1056), - [anon_sym_short] = ACTIONS(1056), - [sym_primitive_type] = ACTIONS(1056), - [anon_sym_enum] = ACTIONS(1056), - [anon_sym_struct] = ACTIONS(1056), - [anon_sym_union] = ACTIONS(1056), - [anon_sym_if] = ACTIONS(1056), - [anon_sym_switch] = ACTIONS(1056), - [anon_sym_case] = ACTIONS(1056), - [anon_sym_default] = ACTIONS(1056), - [anon_sym_while] = ACTIONS(1056), - [anon_sym_do] = ACTIONS(1056), - [anon_sym_for] = ACTIONS(1056), - [anon_sym_return] = ACTIONS(1056), - [anon_sym_break] = ACTIONS(1056), - [anon_sym_continue] = ACTIONS(1056), - [anon_sym_goto] = ACTIONS(1056), - [anon_sym_DASH_DASH] = ACTIONS(1058), - [anon_sym_PLUS_PLUS] = ACTIONS(1058), - [anon_sym_sizeof] = ACTIONS(1056), - [sym_number_literal] = ACTIONS(1058), - [anon_sym_L_SQUOTE] = ACTIONS(1058), - [anon_sym_u_SQUOTE] = ACTIONS(1058), - [anon_sym_U_SQUOTE] = ACTIONS(1058), - [anon_sym_u8_SQUOTE] = ACTIONS(1058), - [anon_sym_SQUOTE] = ACTIONS(1058), - [anon_sym_L_DQUOTE] = ACTIONS(1058), - [anon_sym_u_DQUOTE] = ACTIONS(1058), - [anon_sym_U_DQUOTE] = ACTIONS(1058), - [anon_sym_u8_DQUOTE] = ACTIONS(1058), - [anon_sym_DQUOTE] = ACTIONS(1058), - [sym_true] = ACTIONS(1056), - [sym_false] = ACTIONS(1056), - [sym_null] = ACTIONS(1056), - [sym_comment] = ACTIONS(3), - }, - [373] = { - [sym__expression] = STATE(506), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_initializer_list] = STATE(516), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_identifier] = ACTIONS(1341), - [anon_sym_COMMA] = ACTIONS(872), - [anon_sym_RPAREN] = ACTIONS(872), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(23), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_SLASH] = ACTIONS(882), - [anon_sym_PERCENT] = ACTIONS(872), - [anon_sym_PIPE_PIPE] = ACTIONS(872), - [anon_sym_AMP_AMP] = ACTIONS(872), - [anon_sym_PIPE] = ACTIONS(882), - [anon_sym_CARET] = ACTIONS(872), - [anon_sym_AMP] = ACTIONS(880), - [anon_sym_EQ_EQ] = ACTIONS(872), - [anon_sym_BANG_EQ] = ACTIONS(872), - [anon_sym_GT] = ACTIONS(882), - [anon_sym_GT_EQ] = ACTIONS(872), - [anon_sym_LT_EQ] = ACTIONS(872), - [anon_sym_LT] = ACTIONS(882), - [anon_sym_LT_LT] = ACTIONS(872), - [anon_sym_GT_GT] = ACTIONS(872), - [anon_sym_SEMI] = ACTIONS(872), - [anon_sym_LBRACE] = ACTIONS(884), - [anon_sym_RBRACE] = ACTIONS(872), - [anon_sym_LBRACK] = ACTIONS(872), - [anon_sym_COLON] = ACTIONS(872), - [anon_sym_QMARK] = ACTIONS(872), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [anon_sym_DOT] = ACTIONS(882), - [anon_sym_DASH_GT] = ACTIONS(872), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [374] = { - [sym_type_qualifier] = STATE(857), - [sym__type_specifier] = STATE(988), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym__expression] = STATE(744), - [sym_comma_expression] = STATE(1430), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_type_descriptor] = STATE(1429), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_type_definition_repeat1] = STATE(857), - [aux_sym_sized_type_specifier_repeat1] = STATE(994), - [sym_identifier] = ACTIONS(1343), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(1345), - [anon_sym_unsigned] = ACTIONS(1345), - [anon_sym_long] = ACTIONS(1345), - [anon_sym_short] = ACTIONS(1345), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [375] = { - [sym_type_qualifier] = STATE(857), - [sym__type_specifier] = STATE(988), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym__expression] = STATE(744), - [sym_comma_expression] = STATE(1430), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_type_descriptor] = STATE(1366), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_type_definition_repeat1] = STATE(857), - [aux_sym_sized_type_specifier_repeat1] = STATE(994), - [sym_identifier] = ACTIONS(1343), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(1345), - [anon_sym_unsigned] = ACTIONS(1345), - [anon_sym_long] = ACTIONS(1345), - [anon_sym_short] = ACTIONS(1345), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [376] = { - [sym_type_qualifier] = STATE(857), - [sym__type_specifier] = STATE(988), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym__expression] = STATE(744), - [sym_comma_expression] = STATE(1430), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_type_descriptor] = STATE(1432), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_type_definition_repeat1] = STATE(857), - [aux_sym_sized_type_specifier_repeat1] = STATE(994), - [sym_identifier] = ACTIONS(1343), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(1345), - [anon_sym_unsigned] = ACTIONS(1345), - [anon_sym_long] = ACTIONS(1345), - [anon_sym_short] = ACTIONS(1345), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [377] = { - [sym_type_qualifier] = STATE(857), - [sym__type_specifier] = STATE(988), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym__expression] = STATE(744), - [sym_comma_expression] = STATE(1430), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_type_descriptor] = STATE(1408), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_type_definition_repeat1] = STATE(857), - [aux_sym_sized_type_specifier_repeat1] = STATE(994), - [sym_identifier] = ACTIONS(1343), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(1345), - [anon_sym_unsigned] = ACTIONS(1345), - [anon_sym_long] = ACTIONS(1345), - [anon_sym_short] = ACTIONS(1345), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [378] = { - [sym_type_qualifier] = STATE(857), - [sym__type_specifier] = STATE(988), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym__expression] = STATE(744), - [sym_comma_expression] = STATE(1430), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_type_descriptor] = STATE(1344), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_type_definition_repeat1] = STATE(857), - [aux_sym_sized_type_specifier_repeat1] = STATE(994), - [sym_identifier] = ACTIONS(1343), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(1345), - [anon_sym_unsigned] = ACTIONS(1345), - [anon_sym_long] = ACTIONS(1345), - [anon_sym_short] = ACTIONS(1345), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [379] = { - [sym_type_qualifier] = STATE(857), - [sym__type_specifier] = STATE(988), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym__expression] = STATE(744), - [sym_comma_expression] = STATE(1430), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_type_descriptor] = STATE(1455), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_type_definition_repeat1] = STATE(857), - [aux_sym_sized_type_specifier_repeat1] = STATE(994), - [sym_identifier] = ACTIONS(1343), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(1345), - [anon_sym_unsigned] = ACTIONS(1345), - [anon_sym_long] = ACTIONS(1345), - [anon_sym_short] = ACTIONS(1345), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [380] = { - [sym_type_qualifier] = STATE(857), - [sym__type_specifier] = STATE(988), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym__expression] = STATE(744), - [sym_comma_expression] = STATE(1430), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_type_descriptor] = STATE(1436), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_type_definition_repeat1] = STATE(857), - [aux_sym_sized_type_specifier_repeat1] = STATE(994), - [sym_identifier] = ACTIONS(1343), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(1345), - [anon_sym_unsigned] = ACTIONS(1345), - [anon_sym_long] = ACTIONS(1345), - [anon_sym_short] = ACTIONS(1345), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, - [381] = { - [sym_type_qualifier] = STATE(857), - [sym__type_specifier] = STATE(988), - [sym_sized_type_specifier] = STATE(884), - [sym_enum_specifier] = STATE(884), - [sym_struct_specifier] = STATE(884), - [sym_union_specifier] = STATE(884), - [sym__expression] = STATE(744), - [sym_comma_expression] = STATE(1430), - [sym_conditional_expression] = STATE(513), - [sym_assignment_expression] = STATE(513), - [sym_pointer_expression] = STATE(609), - [sym_unary_expression] = STATE(513), - [sym_binary_expression] = STATE(513), - [sym_update_expression] = STATE(513), - [sym_cast_expression] = STATE(513), - [sym_type_descriptor] = STATE(1346), - [sym_sizeof_expression] = STATE(513), - [sym_subscript_expression] = STATE(609), - [sym_call_expression] = STATE(609), - [sym_field_expression] = STATE(609), - [sym_compound_literal_expression] = STATE(513), - [sym_parenthesized_expression] = STATE(609), - [sym_char_literal] = STATE(513), - [sym_concatenated_string] = STATE(513), - [sym_string_literal] = STATE(427), - [sym_macro_type_specifier] = STATE(884), - [aux_sym_type_definition_repeat1] = STATE(857), - [aux_sym_sized_type_specifier_repeat1] = STATE(994), - [sym_identifier] = ACTIONS(1343), - [anon_sym_LPAREN2] = ACTIONS(19), - [anon_sym_BANG] = ACTIONS(21), - [anon_sym_TILDE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_PLUS] = ACTIONS(23), - [anon_sym_STAR] = ACTIONS(25), - [anon_sym_AMP] = ACTIONS(25), - [anon_sym_const] = ACTIONS(45), - [anon_sym_volatile] = ACTIONS(45), - [anon_sym_restrict] = ACTIONS(45), - [anon_sym__Atomic] = ACTIONS(45), - [anon_sym_signed] = ACTIONS(1345), - [anon_sym_unsigned] = ACTIONS(1345), - [anon_sym_long] = ACTIONS(1345), - [anon_sym_short] = ACTIONS(1345), - [sym_primitive_type] = ACTIONS(49), - [anon_sym_enum] = ACTIONS(51), - [anon_sym_struct] = ACTIONS(53), - [anon_sym_union] = ACTIONS(55), - [anon_sym_DASH_DASH] = ACTIONS(79), - [anon_sym_PLUS_PLUS] = ACTIONS(79), - [anon_sym_sizeof] = ACTIONS(81), - [sym_number_literal] = ACTIONS(83), - [anon_sym_L_SQUOTE] = ACTIONS(85), - [anon_sym_u_SQUOTE] = ACTIONS(85), - [anon_sym_U_SQUOTE] = ACTIONS(85), - [anon_sym_u8_SQUOTE] = ACTIONS(85), - [anon_sym_SQUOTE] = ACTIONS(85), - [anon_sym_L_DQUOTE] = ACTIONS(87), - [anon_sym_u_DQUOTE] = ACTIONS(87), - [anon_sym_U_DQUOTE] = ACTIONS(87), - [anon_sym_u8_DQUOTE] = ACTIONS(87), - [anon_sym_DQUOTE] = ACTIONS(87), - [sym_true] = ACTIONS(89), - [sym_false] = ACTIONS(89), - [sym_null] = ACTIONS(89), - [sym_comment] = ACTIONS(3), - }, -}; - -static const uint16_t ts_small_parse_table[] = { - [0] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1349), 25, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_BANG, - anon_sym_TILDE, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_EQ, - anon_sym_COLON, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - sym_number_literal, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - ACTIONS(1347), 38, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - anon_sym_if, - anon_sym_switch, - anon_sym_case, - anon_sym_default, - anon_sym_while, - anon_sym_do, - anon_sym_for, - anon_sym_return, - anon_sym_break, - anon_sym_continue, - anon_sym_goto, - anon_sym_sizeof, - sym_true, - sym_false, - sym_null, - sym_identifier, - [71] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1353), 25, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_BANG, - anon_sym_TILDE, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_EQ, - anon_sym_COLON, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - sym_number_literal, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - ACTIONS(1351), 38, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - anon_sym_if, - anon_sym_switch, - anon_sym_case, - anon_sym_default, - anon_sym_while, - anon_sym_do, - anon_sym_for, - anon_sym_return, - anon_sym_break, - anon_sym_continue, - anon_sym_goto, - anon_sym_sizeof, - sym_true, - sym_false, - sym_null, - sym_identifier, - [142] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(884), 1, - anon_sym_LBRACE, - ACTIONS(1042), 1, - anon_sym_AMP, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1361), 1, - anon_sym_TILDE, - ACTIONS(1363), 1, - anon_sym_STAR, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(516), 1, - sym_initializer_list, - STATE(630), 1, - sym__expression, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(1359), 3, - anon_sym_BANG, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - ACTIONS(882), 5, - anon_sym_SLASH, - anon_sym_PIPE, - anon_sym_GT, - anon_sym_LT, - anon_sym_DOT, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - ACTIONS(872), 14, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_DASH_GT, - [249] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1369), 1, - sym_identifier, - ACTIONS(1378), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1374), 17, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_if, - anon_sym_switch, - anon_sym_case, - anon_sym_default, - anon_sym_while, - anon_sym_do, - anon_sym_for, - anon_sym_return, - anon_sym_break, - anon_sym_continue, - anon_sym_goto, - anon_sym_sizeof, - sym_true, - sym_false, - sym_null, - ACTIONS(1376), 19, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - ACTIONS(1372), 20, - anon_sym_LPAREN2, - anon_sym_BANG, - anon_sym_TILDE, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_SEMI, - anon_sym_LBRACE, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - sym_number_literal, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - [321] = 30, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1381), 1, - sym_identifier, - ACTIONS(1383), 1, - anon_sym_DOT_DOT_DOT, - ACTIONS(1385), 1, - anon_sym_RPAREN, - ACTIONS(1387), 1, - anon_sym_LPAREN2, - ACTIONS(1389), 1, - anon_sym_STAR, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1393), 1, - anon_sym_LBRACK, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(946), 1, - sym__declaration_specifiers, - STATE(1095), 1, - sym__declarator, - STATE(1139), 1, - sym__abstract_declarator, - STATE(1141), 1, - sym_parameter_list, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(1150), 2, - sym_variadic_parameter, - sym_parameter_declaration, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - STATE(1142), 4, - sym_abstract_parenthesized_declarator, - sym_abstract_pointer_declarator, - sym_abstract_function_declarator, - sym_abstract_array_declarator, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [440] = 26, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1397), 1, - aux_sym_preproc_def_token1, - ACTIONS(1399), 1, - aux_sym_preproc_if_token1, - ACTIONS(1401), 1, - aux_sym_preproc_if_token2, - ACTIONS(1405), 1, - aux_sym_preproc_else_token1, - ACTIONS(1407), 1, - aux_sym_preproc_elif_token1, - ACTIONS(1409), 1, - sym_preproc_directive, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(997), 1, - sym__declaration_specifiers, - ACTIONS(1403), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - STATE(1363), 2, - sym_preproc_else_in_field_declaration_list, - sym_preproc_elif_in_field_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(396), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [548] = 26, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1397), 1, - aux_sym_preproc_def_token1, - ACTIONS(1399), 1, - aux_sym_preproc_if_token1, - ACTIONS(1405), 1, - aux_sym_preproc_else_token1, - ACTIONS(1407), 1, - aux_sym_preproc_elif_token1, - ACTIONS(1409), 1, - sym_preproc_directive, - ACTIONS(1411), 1, - aux_sym_preproc_if_token2, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(997), 1, - sym__declaration_specifiers, - ACTIONS(1403), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - STATE(1435), 2, - sym_preproc_else_in_field_declaration_list, - sym_preproc_elif_in_field_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(411), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [656] = 26, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1397), 1, - aux_sym_preproc_def_token1, - ACTIONS(1399), 1, - aux_sym_preproc_if_token1, - ACTIONS(1405), 1, - aux_sym_preproc_else_token1, - ACTIONS(1407), 1, - aux_sym_preproc_elif_token1, - ACTIONS(1409), 1, - sym_preproc_directive, - ACTIONS(1413), 1, - aux_sym_preproc_if_token2, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(997), 1, - sym__declaration_specifiers, - ACTIONS(1403), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - STATE(1392), 2, - sym_preproc_else_in_field_declaration_list, - sym_preproc_elif_in_field_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(400), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [764] = 26, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1397), 1, - aux_sym_preproc_def_token1, - ACTIONS(1399), 1, - aux_sym_preproc_if_token1, - ACTIONS(1405), 1, - aux_sym_preproc_else_token1, - ACTIONS(1407), 1, - aux_sym_preproc_elif_token1, - ACTIONS(1409), 1, - sym_preproc_directive, - ACTIONS(1415), 1, - aux_sym_preproc_if_token2, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(997), 1, - sym__declaration_specifiers, - ACTIONS(1403), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - STATE(1299), 2, - sym_preproc_else_in_field_declaration_list, - sym_preproc_elif_in_field_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(395), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [872] = 26, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1397), 1, - aux_sym_preproc_def_token1, - ACTIONS(1399), 1, - aux_sym_preproc_if_token1, - ACTIONS(1405), 1, - aux_sym_preproc_else_token1, - ACTIONS(1407), 1, - aux_sym_preproc_elif_token1, - ACTIONS(1409), 1, - sym_preproc_directive, - ACTIONS(1417), 1, - aux_sym_preproc_if_token2, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(997), 1, - sym__declaration_specifiers, - ACTIONS(1403), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - STATE(1357), 2, - sym_preproc_else_in_field_declaration_list, - sym_preproc_elif_in_field_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(411), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [980] = 26, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1397), 1, - aux_sym_preproc_def_token1, - ACTIONS(1399), 1, - aux_sym_preproc_if_token1, - ACTIONS(1405), 1, - aux_sym_preproc_else_token1, - ACTIONS(1407), 1, - aux_sym_preproc_elif_token1, - ACTIONS(1409), 1, - sym_preproc_directive, - ACTIONS(1419), 1, - aux_sym_preproc_if_token2, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(997), 1, - sym__declaration_specifiers, - ACTIONS(1403), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - STATE(1340), 2, - sym_preproc_else_in_field_declaration_list, - sym_preproc_elif_in_field_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(393), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [1088] = 26, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1397), 1, - aux_sym_preproc_def_token1, - ACTIONS(1399), 1, - aux_sym_preproc_if_token1, - ACTIONS(1405), 1, - aux_sym_preproc_else_token1, - ACTIONS(1407), 1, - aux_sym_preproc_elif_token1, - ACTIONS(1409), 1, - sym_preproc_directive, - ACTIONS(1421), 1, - aux_sym_preproc_if_token2, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(997), 1, - sym__declaration_specifiers, - ACTIONS(1403), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - STATE(1290), 2, - sym_preproc_else_in_field_declaration_list, - sym_preproc_elif_in_field_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(411), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [1196] = 26, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1397), 1, - aux_sym_preproc_def_token1, - ACTIONS(1399), 1, - aux_sym_preproc_if_token1, - ACTIONS(1405), 1, - aux_sym_preproc_else_token1, - ACTIONS(1407), 1, - aux_sym_preproc_elif_token1, - ACTIONS(1409), 1, - sym_preproc_directive, - ACTIONS(1423), 1, - aux_sym_preproc_if_token2, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(997), 1, - sym__declaration_specifiers, - ACTIONS(1403), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - STATE(1287), 2, - sym_preproc_else_in_field_declaration_list, - sym_preproc_elif_in_field_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(411), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [1304] = 26, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1397), 1, - aux_sym_preproc_def_token1, - ACTIONS(1399), 1, - aux_sym_preproc_if_token1, - ACTIONS(1405), 1, - aux_sym_preproc_else_token1, - ACTIONS(1407), 1, - aux_sym_preproc_elif_token1, - ACTIONS(1409), 1, - sym_preproc_directive, - ACTIONS(1425), 1, - aux_sym_preproc_if_token2, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(997), 1, - sym__declaration_specifiers, - ACTIONS(1403), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - STATE(1370), 2, - sym_preproc_else_in_field_declaration_list, - sym_preproc_elif_in_field_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(411), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [1412] = 26, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1397), 1, - aux_sym_preproc_def_token1, - ACTIONS(1399), 1, - aux_sym_preproc_if_token1, - ACTIONS(1405), 1, - aux_sym_preproc_else_token1, - ACTIONS(1407), 1, - aux_sym_preproc_elif_token1, - ACTIONS(1409), 1, - sym_preproc_directive, - ACTIONS(1427), 1, - aux_sym_preproc_if_token2, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(997), 1, - sym__declaration_specifiers, - ACTIONS(1403), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - STATE(1416), 2, - sym_preproc_else_in_field_declaration_list, - sym_preproc_elif_in_field_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(411), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [1520] = 26, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1397), 1, - aux_sym_preproc_def_token1, - ACTIONS(1399), 1, - aux_sym_preproc_if_token1, - ACTIONS(1405), 1, - aux_sym_preproc_else_token1, - ACTIONS(1407), 1, - aux_sym_preproc_elif_token1, - ACTIONS(1409), 1, - sym_preproc_directive, - ACTIONS(1429), 1, - aux_sym_preproc_if_token2, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(997), 1, - sym__declaration_specifiers, - ACTIONS(1403), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - STATE(1433), 2, - sym_preproc_else_in_field_declaration_list, - sym_preproc_elif_in_field_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(388), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [1628] = 26, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1397), 1, - aux_sym_preproc_def_token1, - ACTIONS(1399), 1, - aux_sym_preproc_if_token1, - ACTIONS(1405), 1, - aux_sym_preproc_else_token1, - ACTIONS(1407), 1, - aux_sym_preproc_elif_token1, - ACTIONS(1409), 1, - sym_preproc_directive, - ACTIONS(1431), 1, - aux_sym_preproc_if_token2, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(997), 1, - sym__declaration_specifiers, - ACTIONS(1403), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - STATE(1358), 2, - sym_preproc_else_in_field_declaration_list, - sym_preproc_elif_in_field_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(394), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [1736] = 26, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1397), 1, - aux_sym_preproc_def_token1, - ACTIONS(1399), 1, - aux_sym_preproc_if_token1, - ACTIONS(1405), 1, - aux_sym_preproc_else_token1, - ACTIONS(1407), 1, - aux_sym_preproc_elif_token1, - ACTIONS(1409), 1, - sym_preproc_directive, - ACTIONS(1433), 1, - aux_sym_preproc_if_token2, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(997), 1, - sym__declaration_specifiers, - ACTIONS(1403), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - STATE(1373), 2, - sym_preproc_else_in_field_declaration_list, - sym_preproc_elif_in_field_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(391), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [1844] = 26, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1397), 1, - aux_sym_preproc_def_token1, - ACTIONS(1399), 1, - aux_sym_preproc_if_token1, - ACTIONS(1405), 1, - aux_sym_preproc_else_token1, - ACTIONS(1407), 1, - aux_sym_preproc_elif_token1, - ACTIONS(1409), 1, - sym_preproc_directive, - ACTIONS(1435), 1, - aux_sym_preproc_if_token2, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(997), 1, - sym__declaration_specifiers, - ACTIONS(1403), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - STATE(1336), 2, - sym_preproc_else_in_field_declaration_list, - sym_preproc_elif_in_field_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(411), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [1952] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1441), 1, - anon_sym_LPAREN2, - ACTIONS(1447), 1, - anon_sym_STAR, - ACTIONS(1450), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1452), 1, - anon_sym_EQ, - ACTIONS(1454), 1, - anon_sym_COLON, - ACTIONS(1456), 10, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - ACTIONS(1445), 12, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_LBRACK, - ACTIONS(1437), 13, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - ACTIONS(1439), 13, - anon_sym_COMMA, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_QMARK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [2027] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1441), 1, - anon_sym_LPAREN2, - ACTIONS(1447), 1, - anon_sym_STAR, - ACTIONS(1450), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1452), 1, - anon_sym_EQ, - ACTIONS(1458), 1, - anon_sym_COLON, - ACTIONS(1456), 10, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - ACTIONS(1445), 12, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_LBRACK, - ACTIONS(1437), 13, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - ACTIONS(1439), 13, - anon_sym_COMMA, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_QMARK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [2102] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1441), 1, - anon_sym_LPAREN2, - ACTIONS(1447), 1, - anon_sym_STAR, - ACTIONS(1450), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1452), 1, - anon_sym_EQ, - ACTIONS(1460), 1, - anon_sym_COLON, - ACTIONS(1456), 10, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - ACTIONS(1445), 12, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_LBRACK, - ACTIONS(1437), 13, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - ACTIONS(1439), 13, - anon_sym_COMMA, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_QMARK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [2177] = 11, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1441), 1, - anon_sym_LPAREN2, - ACTIONS(1447), 1, - anon_sym_STAR, - ACTIONS(1450), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1452), 1, - anon_sym_EQ, - ACTIONS(1462), 1, - anon_sym_SEMI, - ACTIONS(1465), 1, - anon_sym_COLON, - ACTIONS(1456), 10, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - ACTIONS(1439), 12, - anon_sym_COMMA, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_QMARK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1445), 12, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_LBRACK, - ACTIONS(1437), 13, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [2254] = 11, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1441), 1, - anon_sym_LPAREN2, - ACTIONS(1447), 1, - anon_sym_STAR, - ACTIONS(1450), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1452), 1, - anon_sym_EQ, - ACTIONS(1454), 1, - anon_sym_COLON, - ACTIONS(1462), 1, - anon_sym_SEMI, - ACTIONS(1456), 10, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - ACTIONS(1439), 12, - anon_sym_COMMA, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_QMARK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1445), 12, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_LBRACK, - ACTIONS(1437), 13, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [2331] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1441), 1, - anon_sym_LPAREN2, - ACTIONS(1447), 1, - anon_sym_STAR, - ACTIONS(1450), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1452), 1, - anon_sym_EQ, - ACTIONS(1465), 1, - anon_sym_COLON, - ACTIONS(1456), 10, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - ACTIONS(1445), 12, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_LBRACK, - ACTIONS(1437), 13, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - ACTIONS(1439), 13, - anon_sym_COMMA, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_QMARK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [2406] = 11, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1441), 1, - anon_sym_LPAREN2, - ACTIONS(1447), 1, - anon_sym_STAR, - ACTIONS(1450), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1452), 1, - anon_sym_EQ, - ACTIONS(1460), 1, - anon_sym_COLON, - ACTIONS(1462), 1, - anon_sym_SEMI, - ACTIONS(1456), 10, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - ACTIONS(1439), 12, - anon_sym_COMMA, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_QMARK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1445), 12, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_LBRACK, - ACTIONS(1437), 13, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [2483] = 11, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1441), 1, - anon_sym_LPAREN2, - ACTIONS(1447), 1, - anon_sym_STAR, - ACTIONS(1450), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1452), 1, - anon_sym_EQ, - ACTIONS(1458), 1, - anon_sym_COLON, - ACTIONS(1462), 1, - anon_sym_SEMI, - ACTIONS(1456), 10, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - ACTIONS(1439), 12, - anon_sym_COMMA, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_QMARK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1445), 12, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_LBRACK, - ACTIONS(1437), 13, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [2560] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1441), 1, - anon_sym_LPAREN2, - ACTIONS(1447), 1, - anon_sym_STAR, - ACTIONS(1450), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1452), 1, - anon_sym_EQ, - ACTIONS(1456), 10, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - ACTIONS(1445), 12, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_LBRACK, - ACTIONS(1437), 13, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - ACTIONS(1439), 13, - anon_sym_COMMA, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_QMARK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [2632] = 23, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(884), 1, - anon_sym_LBRACE, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1467), 1, - anon_sym_COMMA, - ACTIONS(1469), 1, - anon_sym_RBRACE, - ACTIONS(1471), 1, - anon_sym_LBRACK, - ACTIONS(1473), 1, - anon_sym_DOT, - STATE(427), 1, - sym_string_literal, - STATE(690), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - STATE(1149), 2, - sym_initializer_list, - sym_initializer_pair, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - STATE(1105), 3, - sym_subscript_designator, - sym_field_designator, - aux_sym_initializer_pair_repeat1, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [2732] = 23, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1475), 1, - sym_identifier, - ACTIONS(1478), 1, - aux_sym_preproc_def_token1, - ACTIONS(1481), 1, - aux_sym_preproc_if_token1, - ACTIONS(1489), 1, - sym_preproc_directive, - ACTIONS(1495), 1, - anon_sym___attribute__, - ACTIONS(1498), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1501), 1, - anon_sym___declspec, - ACTIONS(1510), 1, - sym_primitive_type, - ACTIONS(1513), 1, - anon_sym_enum, - ACTIONS(1516), 1, - anon_sym_struct, - ACTIONS(1519), 1, - anon_sym_union, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(997), 1, - sym__declaration_specifiers, - ACTIONS(1486), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - ACTIONS(1484), 3, - aux_sym_preproc_if_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - ACTIONS(1504), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(1507), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(1492), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(411), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [2832] = 22, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(884), 1, - anon_sym_LBRACE, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1471), 1, - anon_sym_LBRACK, - ACTIONS(1473), 1, - anon_sym_DOT, - ACTIONS(1522), 1, - anon_sym_RBRACE, - STATE(427), 1, - sym_string_literal, - STATE(751), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - STATE(1235), 2, - sym_initializer_list, - sym_initializer_pair, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - STATE(1105), 3, - sym_subscript_designator, - sym_field_designator, - aux_sym_initializer_pair_repeat1, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [2929] = 22, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(884), 1, - anon_sym_LBRACE, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1471), 1, - anon_sym_LBRACK, - ACTIONS(1473), 1, - anon_sym_DOT, - ACTIONS(1524), 1, - anon_sym_RBRACE, - STATE(427), 1, - sym_string_literal, - STATE(751), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - STATE(1235), 2, - sym_initializer_list, - sym_initializer_pair, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - STATE(1105), 3, - sym_subscript_designator, - sym_field_designator, - aux_sym_initializer_pair_repeat1, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [3026] = 23, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1475), 1, - sym_identifier, - ACTIONS(1495), 1, - anon_sym___attribute__, - ACTIONS(1498), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1501), 1, - anon_sym___declspec, - ACTIONS(1510), 1, - sym_primitive_type, - ACTIONS(1513), 1, - anon_sym_enum, - ACTIONS(1516), 1, - anon_sym_struct, - ACTIONS(1519), 1, - anon_sym_union, - ACTIONS(1526), 1, - aux_sym_preproc_def_token1, - ACTIONS(1529), 1, - aux_sym_preproc_if_token1, - ACTIONS(1535), 1, - sym_preproc_directive, - ACTIONS(1538), 1, - anon_sym_RBRACE, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(995), 1, - sym__declaration_specifiers, - ACTIONS(1532), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - ACTIONS(1504), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(1507), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(1492), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(414), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [3124] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(884), 1, - anon_sym_LBRACE, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1471), 1, - anon_sym_LBRACK, - ACTIONS(1473), 1, - anon_sym_DOT, - STATE(427), 1, - sym_string_literal, - STATE(751), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - STATE(1235), 2, - sym_initializer_list, - sym_initializer_pair, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - STATE(1105), 3, - sym_subscript_designator, - sym_field_designator, - aux_sym_initializer_pair_repeat1, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [3218] = 23, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1540), 1, - aux_sym_preproc_def_token1, - ACTIONS(1542), 1, - aux_sym_preproc_if_token1, - ACTIONS(1546), 1, - sym_preproc_directive, - ACTIONS(1548), 1, - anon_sym_RBRACE, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(995), 1, - sym__declaration_specifiers, - ACTIONS(1544), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(414), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [3316] = 23, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1550), 1, - aux_sym_preproc_def_token1, - ACTIONS(1552), 1, - aux_sym_preproc_if_token1, - ACTIONS(1554), 1, - aux_sym_preproc_if_token2, - ACTIONS(1558), 1, - sym_preproc_directive, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(996), 1, - sym__declaration_specifiers, - ACTIONS(1556), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(420), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [3414] = 23, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1540), 1, - aux_sym_preproc_def_token1, - ACTIONS(1542), 1, - aux_sym_preproc_if_token1, - ACTIONS(1546), 1, - sym_preproc_directive, - ACTIONS(1560), 1, - anon_sym_RBRACE, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(995), 1, - sym__declaration_specifiers, - ACTIONS(1544), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(416), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [3512] = 23, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1550), 1, - aux_sym_preproc_def_token1, - ACTIONS(1552), 1, - aux_sym_preproc_if_token1, - ACTIONS(1558), 1, - sym_preproc_directive, - ACTIONS(1562), 1, - aux_sym_preproc_if_token2, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(996), 1, - sym__declaration_specifiers, - ACTIONS(1556), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(417), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [3610] = 23, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1475), 1, - sym_identifier, - ACTIONS(1484), 1, - aux_sym_preproc_if_token2, - ACTIONS(1495), 1, - anon_sym___attribute__, - ACTIONS(1498), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1501), 1, - anon_sym___declspec, - ACTIONS(1510), 1, - sym_primitive_type, - ACTIONS(1513), 1, - anon_sym_enum, - ACTIONS(1516), 1, - anon_sym_struct, - ACTIONS(1519), 1, - anon_sym_union, - ACTIONS(1564), 1, - aux_sym_preproc_def_token1, - ACTIONS(1567), 1, - aux_sym_preproc_if_token1, - ACTIONS(1573), 1, - sym_preproc_directive, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(996), 1, - sym__declaration_specifiers, - ACTIONS(1570), 2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - ACTIONS(1504), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(1507), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(1492), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - STATE(420), 8, - sym_preproc_def, - sym_preproc_function_def, - sym_preproc_call, - sym_preproc_if_in_field_declaration_list, - sym_preproc_ifdef_in_field_declaration_list, - sym__field_declaration_list_item, - sym_field_declaration, - aux_sym_preproc_if_in_field_declaration_list_repeat1, - [3708] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1363), 1, - anon_sym_AMP, - ACTIONS(1367), 1, - anon_sym_sizeof, - ACTIONS(1576), 1, - anon_sym_STAR, - ACTIONS(1578), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(753), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - STATE(647), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(1580), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [3799] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1363), 1, - anon_sym_AMP, - ACTIONS(1367), 1, - anon_sym_sizeof, - ACTIONS(1582), 1, - anon_sym_STAR, - ACTIONS(1584), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(755), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - STATE(647), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(1580), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [3890] = 5, - ACTIONS(3), 1, - sym_comment, - STATE(423), 2, - sym_string_literal, - aux_sym_concatenated_string_repeat1, - ACTIONS(1590), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - ACTIONS(1588), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1586), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [3951] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1363), 1, - anon_sym_AMP, - ACTIONS(1367), 1, - anon_sym_sizeof, - ACTIONS(1593), 1, - anon_sym_STAR, - ACTIONS(1595), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(796), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - STATE(432), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(1580), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [4042] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1363), 1, - anon_sym_AMP, - ACTIONS(1367), 1, - anon_sym_sizeof, - ACTIONS(1597), 1, - anon_sym_STAR, - ACTIONS(1599), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(783), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - STATE(421), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(1580), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [4133] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1363), 1, - anon_sym_AMP, - ACTIONS(1367), 1, - anon_sym_sizeof, - ACTIONS(1601), 1, - anon_sym_STAR, - ACTIONS(1603), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(780), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - STATE(422), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(1580), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [4224] = 5, - ACTIONS(3), 1, - sym_comment, - STATE(433), 2, - sym_string_literal, - aux_sym_concatenated_string_repeat1, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - ACTIONS(1445), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1439), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [4285] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1363), 1, - anon_sym_AMP, - ACTIONS(1367), 1, - anon_sym_sizeof, - ACTIONS(1605), 1, - anon_sym_STAR, - ACTIONS(1607), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(826), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - STATE(429), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(1580), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [4376] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1363), 1, - anon_sym_AMP, - ACTIONS(1367), 1, - anon_sym_sizeof, - ACTIONS(1609), 1, - anon_sym_STAR, - ACTIONS(1611), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(777), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - STATE(647), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(1580), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [4467] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1363), 1, - anon_sym_AMP, - ACTIONS(1367), 1, - anon_sym_sizeof, - ACTIONS(1613), 1, - anon_sym_STAR, - ACTIONS(1615), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(812), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - STATE(647), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(1580), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [4558] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1363), 1, - anon_sym_AMP, - ACTIONS(1367), 1, - anon_sym_sizeof, - ACTIONS(1617), 1, - anon_sym_STAR, - ACTIONS(1619), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(781), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - STATE(430), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(1580), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [4649] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1363), 1, - anon_sym_AMP, - ACTIONS(1367), 1, - anon_sym_sizeof, - ACTIONS(1621), 1, - anon_sym_STAR, - ACTIONS(1623), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(803), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - STATE(647), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(1580), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [4740] = 5, - ACTIONS(3), 1, - sym_comment, - STATE(423), 2, - sym_string_literal, - aux_sym_concatenated_string_repeat1, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - ACTIONS(1627), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1625), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [4801] = 26, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1383), 1, - anon_sym_DOT_DOT_DOT, - ACTIONS(1385), 1, - anon_sym_RPAREN, - ACTIONS(1393), 1, - anon_sym_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1629), 1, - anon_sym_LPAREN2, - ACTIONS(1631), 1, - anon_sym_STAR, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(946), 1, - sym__declaration_specifiers, - STATE(1139), 1, - sym__abstract_declarator, - STATE(1141), 1, - sym_parameter_list, - STATE(1150), 2, - sym_variadic_parameter, - sym_parameter_declaration, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - STATE(1142), 4, - sym_abstract_parenthesized_declarator, - sym_abstract_pointer_declarator, - sym_abstract_function_declarator, - sym_abstract_array_declarator, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [4904] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1633), 1, - anon_sym_LBRACE, - STATE(642), 1, - sym_ms_call_modifier, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(1004), 1, - sym__declaration_specifiers, - STATE(326), 3, - sym_function_definition, - sym_declaration, - sym_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - ACTIONS(39), 6, - anon_sym___cdecl, - anon_sym___clrcall, - anon_sym___stdcall, - anon_sym___fastcall, - anon_sym___thiscall, - anon_sym___vectorcall, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [4995] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1637), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1635), 34, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - [5050] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1639), 1, - anon_sym_LBRACE, - STATE(643), 1, - sym_ms_call_modifier, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(1008), 1, - sym__declaration_specifiers, - STATE(115), 3, - sym_function_definition, - sym_declaration, - sym_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - ACTIONS(39), 6, - anon_sym___cdecl, - anon_sym___clrcall, - anon_sym___stdcall, - anon_sym___fastcall, - anon_sym___thiscall, - anon_sym___vectorcall, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [5141] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1641), 1, - anon_sym_LBRACE, - STATE(644), 1, - sym_ms_call_modifier, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(1012), 1, - sym__declaration_specifiers, - STATE(319), 3, - sym_function_definition, - sym_declaration, - sym_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - ACTIONS(39), 6, - anon_sym___cdecl, - anon_sym___clrcall, - anon_sym___stdcall, - anon_sym___fastcall, - anon_sym___thiscall, - anon_sym___vectorcall, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [5232] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - ACTIONS(1643), 1, - anon_sym_LBRACE, - STATE(641), 1, - sym_ms_call_modifier, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(1003), 1, - sym__declaration_specifiers, - STATE(370), 3, - sym_function_definition, - sym_declaration, - sym_declaration_list, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - ACTIONS(39), 6, - anon_sym___cdecl, - anon_sym___clrcall, - anon_sym___stdcall, - anon_sym___fastcall, - anon_sym___thiscall, - anon_sym___vectorcall, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [5323] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1647), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1645), 34, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - [5378] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1649), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(726), 1, - sym__expression, - STATE(1347), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [5460] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1651), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(719), 1, - sym__expression, - STATE(1281), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [5542] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(874), 1, - anon_sym_LPAREN2, - ACTIONS(884), 1, - anon_sym_LBRACE, - ACTIONS(888), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(506), 1, - sym__expression, - STATE(516), 1, - sym_initializer_list, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(876), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(878), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(886), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [5624] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1653), 1, - anon_sym_SEMI, - STATE(427), 1, - sym_string_literal, - STATE(718), 1, - sym__expression, - STATE(1313), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [5706] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1655), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(716), 1, - sym__expression, - STATE(1348), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [5788] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1657), 1, - anon_sym_SEMI, - STATE(427), 1, - sym_string_literal, - STATE(713), 1, - sym__expression, - STATE(1351), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [5870] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1659), 1, - anon_sym_SEMI, - STATE(427), 1, - sym_string_literal, - STATE(701), 1, - sym__expression, - STATE(1349), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [5952] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(884), 1, - anon_sym_LBRACE, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(516), 1, - sym_initializer_list, - STATE(630), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [6034] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1661), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(733), 1, - sym__expression, - STATE(1314), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [6116] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1663), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(736), 1, - sym__expression, - STATE(1288), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [6198] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1665), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(735), 1, - sym__expression, - STATE(1316), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [6280] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1667), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(700), 1, - sym__expression, - STATE(1323), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [6362] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1669), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(694), 1, - sym__expression, - STATE(1388), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [6444] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1671), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(722), 1, - sym__expression, - STATE(1307), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [6526] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1673), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(749), 1, - sym__expression, - STATE(1296), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [6608] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1675), 1, - anon_sym_SEMI, - STATE(427), 1, - sym_string_literal, - STATE(731), 1, - sym__expression, - STATE(1417), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [6690] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1677), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(734), 1, - sym__expression, - STATE(1285), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [6772] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1679), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(708), 1, - sym__expression, - STATE(1382), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [6854] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1681), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(725), 1, - sym__expression, - STATE(1283), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [6936] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1683), 1, - anon_sym_SEMI, - STATE(427), 1, - sym_string_literal, - STATE(738), 1, - sym__expression, - STATE(1317), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [7018] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(884), 1, - anon_sym_LBRACE, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(728), 1, - sym__expression, - STATE(1229), 1, - sym_initializer_list, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [7100] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1685), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(695), 1, - sym__expression, - STATE(1284), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [7182] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1687), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(727), 1, - sym__expression, - STATE(1381), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [7264] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1689), 1, - anon_sym_SEMI, - STATE(427), 1, - sym_string_literal, - STATE(699), 1, - sym__expression, - STATE(1413), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [7346] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1691), 1, - anon_sym_SEMI, - STATE(427), 1, - sym_string_literal, - STATE(745), 1, - sym__expression, - STATE(1355), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [7428] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1693), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(698), 1, - sym__expression, - STATE(1277), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [7510] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1695), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(693), 1, - sym__expression, - STATE(1275), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [7592] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1697), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(746), 1, - sym__expression, - STATE(1428), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [7674] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(884), 1, - anon_sym_LBRACE, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(516), 1, - sym_initializer_list, - STATE(630), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [7756] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1699), 1, - anon_sym_SEMI, - STATE(427), 1, - sym_string_literal, - STATE(721), 1, - sym__expression, - STATE(1420), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [7838] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1701), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(711), 1, - sym__expression, - STATE(1385), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [7920] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1703), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(702), 1, - sym__expression, - STATE(1333), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [8002] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1705), 1, - anon_sym_SEMI, - STATE(427), 1, - sym_string_literal, - STATE(739), 1, - sym__expression, - STATE(1324), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [8084] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1707), 1, - anon_sym_SEMI, - STATE(427), 1, - sym_string_literal, - STATE(710), 1, - sym__expression, - STATE(1325), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [8166] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1709), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(741), 1, - sym__expression, - STATE(1360), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [8248] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(884), 1, - anon_sym_LBRACE, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(506), 1, - sym__expression, - STATE(516), 1, - sym_initializer_list, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [8330] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1711), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(732), 1, - sym__expression, - STATE(1359), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [8412] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1713), 1, - anon_sym_SEMI, - STATE(427), 1, - sym_string_literal, - STATE(714), 1, - sym__expression, - STATE(1393), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [8494] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1715), 1, - anon_sym_SEMI, - STATE(427), 1, - sym_string_literal, - STATE(715), 1, - sym__expression, - STATE(1395), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [8576] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1717), 1, - anon_sym_SEMI, - STATE(427), 1, - sym_string_literal, - STATE(747), 1, - sym__expression, - STATE(1398), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [8658] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1719), 1, - anon_sym_SEMI, - STATE(427), 1, - sym_string_literal, - STATE(724), 1, - sym__expression, - STATE(1415), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [8740] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1721), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(720), 1, - sym__expression, - STATE(1341), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [8822] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1723), 1, - anon_sym_SEMI, - STATE(427), 1, - sym_string_literal, - STATE(696), 1, - sym__expression, - STATE(1280), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [8904] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(884), 1, - anon_sym_LBRACE, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(742), 1, - sym__expression, - STATE(1236), 1, - sym_initializer_list, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [8986] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1725), 1, - anon_sym_SEMI, - STATE(427), 1, - sym_string_literal, - STATE(704), 1, - sym__expression, - STATE(1426), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [9068] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1727), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(691), 1, - sym__expression, - STATE(1345), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [9150] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - ACTIONS(1729), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(621), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [9229] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1733), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1731), 30, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [9280] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - ACTIONS(1735), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(621), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [9359] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - ACTIONS(1737), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(621), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [9438] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(689), 1, - sym__expression, - STATE(1217), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [9517] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - ACTIONS(1739), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(621), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [9596] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1741), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(664), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [9675] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - ACTIONS(1743), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(621), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [9754] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - ACTIONS(1745), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(621), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [9833] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(744), 1, - sym__expression, - STATE(1430), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [9912] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(705), 1, - sym__expression, - STATE(1273), 1, - sym_comma_expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [9991] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - ACTIONS(1747), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(621), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [10070] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1749), 1, - anon_sym_RPAREN, - STATE(427), 1, - sym_string_literal, - STATE(678), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [10149] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - ACTIONS(1751), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(621), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [10228] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - ACTIONS(1753), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(621), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [10307] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - ACTIONS(1755), 1, - anon_sym_RBRACK, - STATE(427), 1, - sym_string_literal, - STATE(621), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [10386] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(756), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [10462] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(619), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [10538] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(874), 1, - anon_sym_LPAREN2, - ACTIONS(888), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(529), 1, - sym__expression, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(876), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(878), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(886), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [10614] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1761), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1757), 22, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [10674] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(762), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [10750] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(874), 1, - anon_sym_LPAREN2, - ACTIONS(888), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(522), 1, - sym__expression, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(876), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(878), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(886), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [10826] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(807), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [10902] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(806), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [10978] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(529), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [11054] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - ACTIONS(1769), 1, - anon_sym_LPAREN2, - STATE(427), 1, - sym_string_literal, - STATE(659), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [11130] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1445), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1439), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [11180] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(805), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [11256] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(706), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [11332] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1773), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1771), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [11382] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(825), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [11458] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(802), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [11534] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1441), 1, - anon_sym_LPAREN2, - ACTIONS(1447), 1, - anon_sym_STAR, - ACTIONS(1452), 1, - anon_sym_EQ, - ACTIONS(1462), 2, - anon_sym_RPAREN, - anon_sym_LBRACK, - ACTIONS(1450), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(1456), 10, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - ACTIONS(1445), 11, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1439), 12, - anon_sym_COMMA, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_QMARK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [11596] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1367), 1, - anon_sym_sizeof, - ACTIONS(1775), 1, - anon_sym_LPAREN2, - STATE(427), 1, - sym_string_literal, - STATE(754), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [11672] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(627), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [11748] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1779), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1777), 24, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - [11806] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1783), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1781), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACK_RBRACK, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [11856] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1787), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1785), 22, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [11916] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(621), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [11992] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(622), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [12068] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1445), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1439), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [12118] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(752), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [12194] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1791), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1789), 22, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [12254] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(649), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [12330] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(760), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [12406] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(582), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [12482] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(657), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [12558] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(656), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [12634] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1795), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1793), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [12684] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(655), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [12760] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(654), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [12836] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(653), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [12912] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(648), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [12988] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(652), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [13064] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(651), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [13140] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(757), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [13216] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(650), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [13292] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(808), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [13368] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1799), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1797), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [13418] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1803), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1801), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [13468] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1807), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1805), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [13518] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(635), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [13594] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1811), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1809), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACK_RBRACK, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [13644] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(759), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [13720] = 19, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1819), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1821), 1, - anon_sym_AMP_AMP, - ACTIONS(1823), 1, - anon_sym_PIPE, - ACTIONS(1825), 1, - anon_sym_CARET, - ACTIONS(1827), 1, - anon_sym_AMP, - ACTIONS(1837), 1, - anon_sym_EQ, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1815), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1829), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1831), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1833), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1835), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1817), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1813), 16, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [13802] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(820), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [13878] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(723), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [13954] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(522), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [14030] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(771), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [14106] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(801), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [14182] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(824), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [14258] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(827), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [14334] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(874), 1, - anon_sym_LPAREN2, - ACTIONS(888), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(524), 1, - sym__expression, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(876), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(878), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(886), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [14410] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(874), 1, - anon_sym_LPAREN2, - ACTIONS(888), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(594), 1, - sym__expression, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(876), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(878), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(886), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [14486] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(658), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [14562] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1046), 1, - anon_sym_sizeof, - ACTIONS(1839), 1, - anon_sym_LPAREN2, - STATE(427), 1, - sym_string_literal, - STATE(625), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [14638] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(627), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [14714] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(798), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [14790] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(874), 1, - anon_sym_LPAREN2, - ACTIONS(888), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(595), 1, - sym__expression, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(876), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(878), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(886), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [14866] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(874), 1, - anon_sym_LPAREN2, - ACTIONS(888), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(596), 1, - sym__expression, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(876), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(878), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(886), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [14942] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(622), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [15018] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(874), 1, - anon_sym_LPAREN2, - ACTIONS(888), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(597), 1, - sym__expression, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(876), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(878), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(886), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [15094] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(620), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [15170] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1843), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1841), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [15220] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(632), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [15296] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(631), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [15372] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(874), 1, - anon_sym_LPAREN2, - ACTIONS(888), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(598), 1, - sym__expression, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(876), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(878), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(886), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [15448] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(629), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [15524] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(628), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [15600] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(874), 1, - anon_sym_LPAREN2, - ACTIONS(888), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(599), 1, - sym__expression, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(876), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(878), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(886), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [15676] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(888), 1, - anon_sym_sizeof, - ACTIONS(1845), 1, - anon_sym_LPAREN2, - STATE(427), 1, - sym_string_literal, - STATE(606), 1, - sym__expression, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(876), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(878), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(886), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [15752] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(626), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [15828] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(624), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [15904] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1849), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1847), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [15954] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1853), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1851), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACK_RBRACK, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [16004] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1857), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1855), 22, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [16064] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1819), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1821), 1, - anon_sym_AMP_AMP, - ACTIONS(1823), 1, - anon_sym_PIPE, - ACTIONS(1825), 1, - anon_sym_CARET, - ACTIONS(1827), 1, - anon_sym_AMP, - ACTIONS(1861), 1, - anon_sym_EQ, - ACTIONS(1863), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1815), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1829), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1831), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1833), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1835), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1817), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1859), 15, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [16148] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(874), 1, - anon_sym_LPAREN2, - ACTIONS(888), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(600), 1, - sym__expression, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(876), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(878), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(886), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [16224] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1867), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1865), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [16274] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1871), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1869), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [16324] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(623), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [16400] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(633), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [16476] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(874), 1, - anon_sym_LPAREN2, - ACTIONS(888), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(583), 1, - sym__expression, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(876), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(878), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(886), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [16552] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(874), 1, - anon_sym_LPAREN2, - ACTIONS(888), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(601), 1, - sym__expression, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(876), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(878), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(886), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [16628] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(788), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [16704] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(874), 1, - anon_sym_LPAREN2, - ACTIONS(888), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(582), 1, - sym__expression, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(876), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(878), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(886), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [16780] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(874), 1, - anon_sym_LPAREN2, - ACTIONS(888), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(604), 1, - sym__expression, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(876), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(878), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(886), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [16856] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1815), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1817), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1857), 8, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1855), 22, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [16920] = 11, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1815), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1835), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1817), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1857), 6, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - ACTIONS(1855), 22, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [16986] = 13, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1815), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1831), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1833), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1835), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1817), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1857), 4, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ, - ACTIONS(1855), 20, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [17056] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1815), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1829), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1831), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1833), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1835), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1817), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1857), 4, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ, - ACTIONS(1855), 18, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [17128] = 15, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1827), 1, - anon_sym_AMP, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1815), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1829), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1831), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1833), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1835), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1817), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1857), 3, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_EQ, - ACTIONS(1855), 18, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [17202] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1825), 1, - anon_sym_CARET, - ACTIONS(1827), 1, - anon_sym_AMP, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1815), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1829), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1831), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1833), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1835), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1857), 2, - anon_sym_PIPE, - anon_sym_EQ, - ACTIONS(1817), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1855), 18, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [17278] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1823), 1, - anon_sym_PIPE, - ACTIONS(1825), 1, - anon_sym_CARET, - ACTIONS(1827), 1, - anon_sym_AMP, - ACTIONS(1857), 1, - anon_sym_EQ, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1815), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1829), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1831), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1833), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1835), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1817), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1855), 18, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [17356] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1821), 1, - anon_sym_AMP_AMP, - ACTIONS(1823), 1, - anon_sym_PIPE, - ACTIONS(1825), 1, - anon_sym_CARET, - ACTIONS(1827), 1, - anon_sym_AMP, - ACTIONS(1857), 1, - anon_sym_EQ, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1815), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1829), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1831), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1833), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1835), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1817), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1855), 17, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [17436] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(19), 1, - anon_sym_LPAREN2, - ACTIONS(81), 1, - anon_sym_sizeof, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1341), 1, - sym_identifier, - STATE(427), 1, - sym_string_literal, - STATE(828), 1, - sym__expression, - ACTIONS(21), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(23), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(25), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(79), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(609), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [17512] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(870), 1, - sym_identifier, - ACTIONS(1036), 1, - anon_sym_LPAREN2, - ACTIONS(1046), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(635), 1, - sym__expression, - ACTIONS(1038), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1040), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1044), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(527), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [17588] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1817), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1857), 10, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1855), 22, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [17650] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1875), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1873), 29, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [17700] = 11, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1815), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1835), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1817), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1879), 6, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - ACTIONS(1877), 22, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [17766] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(804), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [17842] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(83), 1, - sym_number_literal, - ACTIONS(1355), 1, - sym_identifier, - ACTIONS(1357), 1, - anon_sym_LPAREN2, - ACTIONS(1367), 1, - anon_sym_sizeof, - STATE(427), 1, - sym_string_literal, - STATE(810), 1, - sym__expression, - ACTIONS(1359), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1361), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(1363), 2, - anon_sym_STAR, - anon_sym_AMP, - ACTIONS(1365), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(89), 3, - sym_true, - sym_false, - sym_null, - ACTIONS(85), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - ACTIONS(87), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - STATE(637), 5, - sym_pointer_expression, - sym_subscript_expression, - sym_call_expression, - sym_field_expression, - sym_parenthesized_expression, - STATE(513), 10, - sym_conditional_expression, - sym_assignment_expression, - sym_unary_expression, - sym_binary_expression, - sym_update_expression, - sym_cast_expression, - sym_sizeof_expression, - sym_compound_literal_expression, - sym_char_literal, - sym_concatenated_string, - [17918] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1452), 1, - anon_sym_EQ, - ACTIONS(1456), 10, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - ACTIONS(1445), 12, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1439), 18, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_LBRACK, - anon_sym_COLON, - anon_sym_QMARK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [17971] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1383), 1, - anon_sym_DOT_DOT_DOT, - ACTIONS(1385), 1, - anon_sym_RPAREN, - ACTIONS(1395), 1, - sym_identifier, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(946), 1, - sym__declaration_specifiers, - STATE(1150), 2, - sym_variadic_parameter, - sym_parameter_declaration, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [18053] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1351), 18, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_if, - anon_sym_switch, - anon_sym_case, - anon_sym_default, - anon_sym_while, - anon_sym_do, - anon_sym_for, - anon_sym_return, - anon_sym_break, - anon_sym_continue, - anon_sym_goto, - anon_sym_sizeof, - sym_true, - sym_false, - sym_null, - sym_identifier, - ACTIONS(1353), 21, - anon_sym_LPAREN2, - anon_sym_BANG, - anon_sym_TILDE, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - sym_number_literal, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - [18100] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1452), 1, - anon_sym_EQ, - ACTIONS(1460), 1, - anon_sym_COLON, - ACTIONS(1456), 10, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - ACTIONS(1445), 12, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1439), 15, - anon_sym_COMMA, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_LBRACK, - anon_sym_QMARK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [18153] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1733), 18, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_if, - anon_sym_switch, - anon_sym_case, - anon_sym_default, - anon_sym_while, - anon_sym_do, - anon_sym_for, - anon_sym_return, - anon_sym_break, - anon_sym_continue, - anon_sym_goto, - anon_sym_sizeof, - sym_true, - sym_false, - sym_null, - sym_identifier, - ACTIONS(1731), 21, - anon_sym_LPAREN2, - anon_sym_BANG, - anon_sym_TILDE, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - sym_number_literal, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - [18200] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1347), 18, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_if, - anon_sym_switch, - anon_sym_case, - anon_sym_default, - anon_sym_while, - anon_sym_do, - anon_sym_for, - anon_sym_return, - anon_sym_break, - anon_sym_continue, - anon_sym_goto, - anon_sym_sizeof, - sym_true, - sym_false, - sym_null, - sym_identifier, - ACTIONS(1349), 21, - anon_sym_LPAREN2, - anon_sym_BANG, - anon_sym_TILDE, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - sym_number_literal, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - [18247] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1452), 1, - anon_sym_EQ, - ACTIONS(1458), 1, - anon_sym_COLON, - ACTIONS(1456), 10, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - ACTIONS(1445), 12, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1439), 15, - anon_sym_COMMA, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_LBRACK, - anon_sym_QMARK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [18300] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1452), 1, - anon_sym_EQ, - ACTIONS(1454), 1, - anon_sym_COLON, - ACTIONS(1456), 10, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - ACTIONS(1445), 12, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1439), 15, - anon_sym_COMMA, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_LBRACK, - anon_sym_QMARK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [18353] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1452), 1, - anon_sym_EQ, - ACTIONS(1465), 1, - anon_sym_COLON, - ACTIONS(1456), 10, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - ACTIONS(1445), 12, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1439), 15, - anon_sym_COMMA, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_LBRACK, - anon_sym_QMARK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [18406] = 19, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1383), 1, - anon_sym_DOT_DOT_DOT, - ACTIONS(1395), 1, - sym_identifier, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(946), 1, - sym__declaration_specifiers, - STATE(1224), 2, - sym_variadic_parameter, - sym_parameter_declaration, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [18485] = 15, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(1887), 1, - anon_sym_AMP, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1883), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1889), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1891), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1893), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1895), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1857), 3, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_EQ, - ACTIONS(1885), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1855), 14, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [18555] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1861), 1, - anon_sym_EQ, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(1887), 1, - anon_sym_AMP, - ACTIONS(1897), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1899), 1, - anon_sym_AMP_AMP, - ACTIONS(1901), 1, - anon_sym_PIPE, - ACTIONS(1903), 1, - anon_sym_CARET, - ACTIONS(1905), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1883), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1889), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1891), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1893), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1895), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1885), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1859), 11, - anon_sym_RBRACK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [18635] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1787), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1785), 18, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [18691] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - STATE(546), 1, - sym_argument_list, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1779), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1777), 20, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - [18745] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1857), 1, - anon_sym_EQ, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(1887), 1, - anon_sym_AMP, - ACTIONS(1899), 1, - anon_sym_AMP_AMP, - ACTIONS(1901), 1, - anon_sym_PIPE, - ACTIONS(1903), 1, - anon_sym_CARET, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1883), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1889), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1891), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1893), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1895), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1885), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1855), 13, - anon_sym_PIPE_PIPE, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [18821] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1857), 1, - anon_sym_EQ, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(1887), 1, - anon_sym_AMP, - ACTIONS(1901), 1, - anon_sym_PIPE, - ACTIONS(1903), 1, - anon_sym_CARET, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1883), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1889), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1891), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1893), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1895), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1885), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1855), 14, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [18895] = 11, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1883), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1895), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1885), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1879), 6, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - ACTIONS(1877), 18, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [18957] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(1887), 1, - anon_sym_AMP, - ACTIONS(1903), 1, - anon_sym_CARET, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1857), 2, - anon_sym_PIPE, - anon_sym_EQ, - ACTIONS(1883), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1889), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1891), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1893), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1895), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1885), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1855), 14, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [19029] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1791), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1789), 18, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [19085] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1883), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1889), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1891), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1893), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1895), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1885), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1857), 4, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ, - ACTIONS(1855), 14, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [19153] = 13, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1883), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1891), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1893), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1895), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1885), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1857), 4, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ, - ACTIONS(1855), 16, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [19219] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1761), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1757), 18, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [19275] = 11, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1883), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1895), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1885), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1857), 6, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_EQ, - ACTIONS(1855), 18, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [19337] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1883), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1885), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1857), 8, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1855), 18, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [19397] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1885), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1857), 10, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1855), 18, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [19455] = 19, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1837), 1, - anon_sym_EQ, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(1887), 1, - anon_sym_AMP, - ACTIONS(1897), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1899), 1, - anon_sym_AMP_AMP, - ACTIONS(1901), 1, - anon_sym_PIPE, - ACTIONS(1903), 1, - anon_sym_CARET, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1883), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1889), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1891), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1893), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1895), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1885), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(1813), 12, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [19533] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1857), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1855), 18, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - [19589] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1853), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1851), 24, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [19634] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1907), 1, - anon_sym_EQ, - ACTIONS(1909), 10, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - ACTIONS(1445), 12, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1439), 14, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [19683] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1783), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1781), 24, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [19728] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1811), 13, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_EQ, - ACTIONS(1809), 24, - anon_sym_LPAREN2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_QMARK, - anon_sym_STAR_EQ, - anon_sym_SLASH_EQ, - anon_sym_PERCENT_EQ, - anon_sym_PLUS_EQ, - anon_sym_DASH_EQ, - anon_sym_LT_LT_EQ, - anon_sym_GT_GT_EQ, - anon_sym_AMP_EQ, - anon_sym_CARET_EQ, - anon_sym_PIPE_EQ, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - anon_sym_DOT, - anon_sym_DASH_GT, - [19773] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1918), 1, - anon_sym___attribute__, - ACTIONS(1921), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1924), 1, - anon_sym___declspec, - ACTIONS(1927), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(1915), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - ACTIONS(1913), 6, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_COLON, - STATE(640), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - ACTIONS(1911), 11, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [19829] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(1018), 1, - sym__declaration_specifiers, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [19901] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(1031), 1, - sym__declaration_specifiers, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [19973] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(1014), 1, - sym__declaration_specifiers, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [20045] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - STATE(707), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(1029), 1, - sym__declaration_specifiers, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(645), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [20117] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1395), 1, - sym_identifier, - STATE(743), 1, - sym__type_specifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - STATE(640), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [20186] = 19, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1387), 1, - anon_sym_LPAREN2, - ACTIONS(1389), 1, - anon_sym_STAR, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(1938), 1, - anon_sym_LBRACK, - STATE(998), 1, - sym_ms_unaligned_ptr_modifier, - STATE(1017), 1, - sym__declarator, - STATE(1108), 1, - sym__abstract_declarator, - STATE(1141), 1, - sym_parameter_list, - STATE(1407), 1, - sym_ms_based_modifier, - ACTIONS(1932), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - ACTIONS(1936), 2, - anon_sym__unaligned, - anon_sym___unaligned, - STATE(831), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - STATE(837), 2, - sym_ms_pointer_modifier, - aux_sym_pointer_declarator_repeat1, - ACTIONS(1934), 3, - sym_ms_restrict_modifier, - sym_ms_unsigned_ptr_modifier, - sym_ms_signed_ptr_modifier, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1142), 4, - sym_abstract_parenthesized_declarator, - sym_abstract_pointer_declarator, - sym_abstract_function_declarator, - sym_abstract_array_declarator, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [20260] = 5, - ACTIONS(3), 1, - sym_comment, - STATE(647), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(1944), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(1940), 7, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_sizeof, - sym_true, - sym_false, - sym_null, - sym_identifier, - ACTIONS(1942), 19, - anon_sym_LPAREN2, - anon_sym_BANG, - anon_sym_TILDE, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_RBRACK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - sym_number_literal, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - [20304] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1857), 2, - anon_sym_PIPE, - anon_sym_AMP, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1855), 11, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - [20365] = 19, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1813), 6, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - [20436] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1859), 5, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - [20509] = 11, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1857), 4, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1855), 15, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - [20564] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1857), 4, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1855), 13, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - [20621] = 15, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1857), 2, - anon_sym_PIPE, - anon_sym_AMP, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1855), 9, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - [20684] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1857), 1, - anon_sym_PIPE, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1967), 1, - anon_sym_AMP, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1855), 9, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - [20749] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1857), 1, - anon_sym_PIPE, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1855), 8, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - [20816] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1855), 8, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - [20883] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(1855), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - [20952] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1857), 6, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1855), 15, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - [21005] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1879), 4, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1877), 13, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON, - anon_sym_QMARK, - [21062] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1975), 9, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_EQ, - anon_sym_COLON, - ACTIONS(1973), 22, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21101] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1979), 8, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_COLON, - ACTIONS(1977), 22, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21139] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1981), 11, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_sizeof, - sym_true, - sym_false, - sym_null, - sym_identifier, - ACTIONS(1983), 19, - anon_sym_LPAREN2, - anon_sym_BANG, - anon_sym_TILDE, - anon_sym_STAR, - anon_sym_AMP, - anon_sym_RBRACK, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - sym_number_literal, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - [21177] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1054), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1052), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21214] = 22, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(1985), 1, - anon_sym_COMMA, - ACTIONS(1987), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - STATE(1184), 1, - aux_sym_argument_list_repeat1, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [21289] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1353), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(1351), 22, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21326] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1991), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1989), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21363] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1995), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1993), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21400] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1999), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1997), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21437] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1050), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1048), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21474] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1078), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1076), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21511] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1090), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1088), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21548] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1070), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1068), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21585] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1058), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1056), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21622] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2003), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2001), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21659] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2007), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2005), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21696] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2011), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2009), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21733] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2015), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2013), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21770] = 22, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(1985), 1, - anon_sym_COMMA, - ACTIONS(2017), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - STATE(1164), 1, - aux_sym_argument_list_repeat1, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [21845] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2021), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2019), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21882] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2025), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2023), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21919] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1349), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(1347), 22, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21956] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2029), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2027), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [21993] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2033), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2031), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [22030] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2037), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2035), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [22067] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2041), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2039), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [22104] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2045), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2043), 22, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [22141] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1983), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(1981), 22, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [22178] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2049), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2047), 28, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - aux_sym_preproc_else_token1, - aux_sym_preproc_elif_token1, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [22215] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2053), 2, - anon_sym_RPAREN, - anon_sym_SEMI, - [22288] = 22, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2055), 1, - anon_sym_COMMA, - ACTIONS(2057), 1, - anon_sym_RBRACE, - STATE(546), 1, - sym_argument_list, - STATE(1167), 1, - aux_sym_initializer_list_repeat1, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [22363] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2059), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [22435] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1635), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - ACTIONS(1637), 26, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___cdecl, - anon_sym___clrcall, - anon_sym___stdcall, - anon_sym___fastcall, - anon_sym___thiscall, - anon_sym___vectorcall, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [22471] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2061), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [22543] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2063), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [22615] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2065), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [22687] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2067), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [22759] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2069), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [22831] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2071), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [22903] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2073), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [22975] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2075), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [23047] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2077), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [23119] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2079), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [23191] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2081), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [23263] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2083), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [23335] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2085), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [23407] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2087), 2, - anon_sym_COMMA, - anon_sym_RBRACE, - [23477] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2089), 3, - anon_sym___based, - anon_sym_LBRACK, - sym_identifier, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - ACTIONS(2091), 6, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_COLON, - STATE(712), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [23525] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2093), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [23597] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2095), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [23669] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2097), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [23741] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2099), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [23813] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2101), 3, - anon_sym___based, - anon_sym_LBRACK, - sym_identifier, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - ACTIONS(2103), 6, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_COLON, - STATE(640), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [23861] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2105), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [23933] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2107), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [24005] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2109), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [24077] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2111), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [24149] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2113), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [24221] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2115), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [24293] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2117), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [24365] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2119), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [24437] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2121), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [24509] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2123), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [24581] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2125), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [24651] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2127), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [24723] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2129), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [24795] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2131), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [24867] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2133), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [24939] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2135), 2, - anon_sym_COMMA, - anon_sym_SEMI, - [25009] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2137), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [25081] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1645), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - ACTIONS(1647), 26, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___cdecl, - anon_sym___clrcall, - anon_sym___stdcall, - anon_sym___fastcall, - anon_sym___thiscall, - anon_sym___vectorcall, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [25117] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2139), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [25189] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2141), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [25261] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2143), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [25333] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2145), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [25405] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2147), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [25477] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2149), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [25549] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2151), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [25621] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2153), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [25693] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2155), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [25765] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2157), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [25837] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2159), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [25909] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2161), 2, - anon_sym_COMMA, - anon_sym_RBRACE, - [25979] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2163), 3, - anon_sym___based, - anon_sym_LBRACK, - sym_identifier, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - ACTIONS(2165), 6, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_COLON, - STATE(750), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [26027] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2167), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [26099] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2169), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [26171] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2171), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [26243] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2173), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [26315] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2175), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [26387] = 21, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2051), 1, - anon_sym_COMMA, - ACTIONS(2177), 1, - anon_sym_RPAREN, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [26459] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2179), 3, - anon_sym___based, - anon_sym_LBRACK, - sym_identifier, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - ACTIONS(2181), 6, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_COLON, - STATE(640), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [26507] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2183), 2, - anon_sym_COMMA, - anon_sym_RBRACE, - [26577] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2185), 1, - anon_sym_COLON, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [26646] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1753), 1, - anon_sym_RBRACK, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2193), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2195), 1, - anon_sym_AMP_AMP, - ACTIONS(2197), 1, - anon_sym_PIPE, - ACTIONS(2199), 1, - anon_sym_CARET, - ACTIONS(2201), 1, - anon_sym_AMP, - ACTIONS(2211), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [26715] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1879), 4, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1877), 9, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_RBRACK, - anon_sym_QMARK, - [26768] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1735), 1, - anon_sym_RBRACK, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2193), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2195), 1, - anon_sym_AMP_AMP, - ACTIONS(2197), 1, - anon_sym_PIPE, - ACTIONS(2199), 1, - anon_sym_CARET, - ACTIONS(2201), 1, - anon_sym_AMP, - ACTIONS(2211), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [26837] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2213), 1, - anon_sym_COLON, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [26906] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2193), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2195), 1, - anon_sym_AMP_AMP, - ACTIONS(2197), 1, - anon_sym_PIPE, - ACTIONS(2199), 1, - anon_sym_CARET, - ACTIONS(2201), 1, - anon_sym_AMP, - ACTIONS(2211), 1, - anon_sym_QMARK, - ACTIONS(2215), 1, - anon_sym_RBRACK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [26975] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2217), 1, - sym_identifier, - ACTIONS(2226), 1, - sym_primitive_type, - STATE(818), 1, - aux_sym_sized_type_specifier_repeat1, - ACTIONS(2224), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(2220), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2222), 13, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - [27018] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2228), 1, - anon_sym_COLON, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [27087] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2230), 1, - anon_sym_COLON, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [27156] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1995), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(1993), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [27191] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2232), 1, - anon_sym_COLON, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [27260] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2045), 1, - anon_sym_LBRACK_LBRACK, - STATE(435), 1, - sym_string_literal, - ACTIONS(2234), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - ACTIONS(2043), 20, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [27299] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1050), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1048), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [27334] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1078), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1076), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [27369] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1090), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1088), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [27404] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1070), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1068), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [27439] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1058), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1056), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [27474] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1054), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1052), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [27509] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1991), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(1989), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [27544] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2236), 1, - anon_sym_SEMI, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [27613] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1058), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(1056), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [27648] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2029), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(2027), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [27683] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2037), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(2035), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [27718] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2003), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(2001), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [27753] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2041), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(2039), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [27788] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1747), 1, - anon_sym_RBRACK, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2193), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2195), 1, - anon_sym_AMP_AMP, - ACTIONS(2197), 1, - anon_sym_PIPE, - ACTIONS(2199), 1, - anon_sym_CARET, - ACTIONS(2201), 1, - anon_sym_AMP, - ACTIONS(2211), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [27857] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2049), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(2047), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [27892] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1070), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(1068), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [27927] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1745), 1, - anon_sym_RBRACK, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2193), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2195), 1, - anon_sym_AMP_AMP, - ACTIONS(2197), 1, - anon_sym_PIPE, - ACTIONS(2199), 1, - anon_sym_CARET, - ACTIONS(2201), 1, - anon_sym_AMP, - ACTIONS(2211), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [27996] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1743), 1, - anon_sym_RBRACK, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2193), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2195), 1, - anon_sym_AMP_AMP, - ACTIONS(2197), 1, - anon_sym_PIPE, - ACTIONS(2199), 1, - anon_sym_CARET, - ACTIONS(2201), 1, - anon_sym_AMP, - ACTIONS(2211), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [28065] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2029), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2027), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [28100] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1739), 1, - anon_sym_RBRACK, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2193), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2195), 1, - anon_sym_AMP_AMP, - ACTIONS(2197), 1, - anon_sym_PIPE, - ACTIONS(2199), 1, - anon_sym_CARET, - ACTIONS(2201), 1, - anon_sym_AMP, - ACTIONS(2211), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [28169] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2045), 1, - anon_sym_LBRACK_LBRACK, - STATE(439), 1, - sym_string_literal, - ACTIONS(2234), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - ACTIONS(2043), 20, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [28208] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2011), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(2009), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [28243] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2033), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(2031), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [28278] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2045), 1, - anon_sym_LBRACK_LBRACK, - STATE(437), 1, - sym_string_literal, - ACTIONS(2234), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - ACTIONS(2043), 20, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [28317] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1859), 1, - anon_sym_RBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2193), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2195), 1, - anon_sym_AMP_AMP, - ACTIONS(2197), 1, - anon_sym_PIPE, - ACTIONS(2199), 1, - anon_sym_CARET, - ACTIONS(2201), 1, - anon_sym_AMP, - ACTIONS(2211), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [28386] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2025), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2023), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [28421] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2021), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2019), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [28456] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2015), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2013), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [28491] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1090), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(1088), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [28526] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2011), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2009), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [28561] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1078), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(1076), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [28596] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2007), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2005), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [28631] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1729), 1, - anon_sym_RBRACK, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2193), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2195), 1, - anon_sym_AMP_AMP, - ACTIONS(2197), 1, - anon_sym_PIPE, - ACTIONS(2199), 1, - anon_sym_CARET, - ACTIONS(2201), 1, - anon_sym_AMP, - ACTIONS(2211), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [28700] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1054), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(1052), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [28735] = 19, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2193), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2195), 1, - anon_sym_AMP_AMP, - ACTIONS(2197), 1, - anon_sym_PIPE, - ACTIONS(2199), 1, - anon_sym_CARET, - ACTIONS(2201), 1, - anon_sym_AMP, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1813), 2, - anon_sym_RBRACK, - anon_sym_QMARK, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [28802] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1995), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1993), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [28837] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1991), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1989), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [28872] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1857), 6, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1855), 11, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_RBRACK, - anon_sym_QMARK, - [28921] = 18, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2195), 1, - anon_sym_AMP_AMP, - ACTIONS(2197), 1, - anon_sym_PIPE, - ACTIONS(2199), 1, - anon_sym_CARET, - ACTIONS(2201), 1, - anon_sym_AMP, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1855), 3, - anon_sym_PIPE_PIPE, - anon_sym_RBRACK, - anon_sym_QMARK, - [28986] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1751), 1, - anon_sym_RBRACK, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2193), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2195), 1, - anon_sym_AMP_AMP, - ACTIONS(2197), 1, - anon_sym_PIPE, - ACTIONS(2199), 1, - anon_sym_CARET, - ACTIONS(2201), 1, - anon_sym_AMP, - ACTIONS(2211), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [29055] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2193), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2195), 1, - anon_sym_AMP_AMP, - ACTIONS(2197), 1, - anon_sym_PIPE, - ACTIONS(2199), 1, - anon_sym_CARET, - ACTIONS(2201), 1, - anon_sym_AMP, - ACTIONS(2211), 1, - anon_sym_QMARK, - ACTIONS(2238), 1, - anon_sym_RBRACK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [29124] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2197), 1, - anon_sym_PIPE, - ACTIONS(2199), 1, - anon_sym_CARET, - ACTIONS(2201), 1, - anon_sym_AMP, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1855), 4, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_RBRACK, - anon_sym_QMARK, - [29187] = 17, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1857), 1, - anon_sym_PIPE, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2199), 1, - anon_sym_CARET, - ACTIONS(2201), 1, - anon_sym_AMP, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1855), 4, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_RBRACK, - anon_sym_QMARK, - [29250] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1857), 1, - anon_sym_PIPE, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2201), 1, - anon_sym_AMP, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1855), 5, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_RBRACK, - anon_sym_QMARK, - [29311] = 15, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1857), 2, - anon_sym_PIPE, - anon_sym_AMP, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1855), 5, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_RBRACK, - anon_sym_QMARK, - [29370] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1050), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(1048), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [29405] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1857), 2, - anon_sym_PIPE, - anon_sym_AMP, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1855), 7, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_RBRACK, - anon_sym_QMARK, - [29462] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2025), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(2023), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [29497] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1755), 1, - anon_sym_RBRACK, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2193), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2195), 1, - anon_sym_AMP_AMP, - ACTIONS(2197), 1, - anon_sym_PIPE, - ACTIONS(2199), 1, - anon_sym_CARET, - ACTIONS(2201), 1, - anon_sym_AMP, - ACTIONS(2211), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [29566] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2003), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2001), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [29601] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2007), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(2005), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [29636] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2045), 1, - anon_sym_LBRACK_LBRACK, - STATE(438), 1, - sym_string_literal, - ACTIONS(2234), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - ACTIONS(2043), 20, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [29675] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2033), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2031), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [29710] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1999), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(1997), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [29745] = 5, - ACTIONS(3), 1, - sym_comment, - STATE(818), 1, - aux_sym_sized_type_specifier_repeat1, - ACTIONS(2244), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - ACTIONS(2242), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2240), 15, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_primitive_type, - sym_identifier, - [29784] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2049), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2047), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [29819] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1857), 4, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1855), 9, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_RBRACK, - anon_sym_QMARK, - [29872] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2041), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2039), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [29907] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2021), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(2019), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [29942] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2037), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2035), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [29977] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2247), 1, - anon_sym_COLON, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [30046] = 11, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1857), 4, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1855), 11, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_RBRACK, - anon_sym_QMARK, - [30097] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1737), 1, - anon_sym_RBRACK, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1881), 1, - anon_sym_LPAREN2, - ACTIONS(2191), 1, - anon_sym_SLASH, - ACTIONS(2193), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2195), 1, - anon_sym_AMP_AMP, - ACTIONS(2197), 1, - anon_sym_PIPE, - ACTIONS(2199), 1, - anon_sym_CARET, - ACTIONS(2201), 1, - anon_sym_AMP, - ACTIONS(2211), 1, - anon_sym_QMARK, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(2187), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2189), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2203), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2205), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2207), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2209), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [30166] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2249), 1, - anon_sym_COLON, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [30235] = 20, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(1763), 1, - anon_sym_LBRACK, - ACTIONS(1951), 1, - anon_sym_SLASH, - ACTIONS(1959), 1, - anon_sym_PIPE_PIPE, - ACTIONS(1961), 1, - anon_sym_AMP_AMP, - ACTIONS(1963), 1, - anon_sym_PIPE, - ACTIONS(1965), 1, - anon_sym_CARET, - ACTIONS(1967), 1, - anon_sym_AMP, - ACTIONS(1971), 1, - anon_sym_QMARK, - ACTIONS(2251), 1, - anon_sym_COLON, - STATE(546), 1, - sym_argument_list, - ACTIONS(1765), 2, - anon_sym_DASH_DASH, - anon_sym_PLUS_PLUS, - ACTIONS(1767), 2, - anon_sym_DOT, - anon_sym_DASH_GT, - ACTIONS(1947), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(1949), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(1953), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1955), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(1957), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(1969), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [30304] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1999), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(1997), 26, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_if_token2, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [30339] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2015), 2, - anon_sym_LBRACK_LBRACK, - anon_sym_RBRACE, - ACTIONS(2013), 25, - aux_sym_preproc_def_token1, - aux_sym_preproc_if_token1, - aux_sym_preproc_ifdef_token1, - aux_sym_preproc_ifdef_token2, - sym_preproc_directive, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [30374] = 15, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1387), 1, - anon_sym_LPAREN2, - ACTIONS(1389), 1, - anon_sym_STAR, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(1938), 1, - anon_sym_LBRACK, - STATE(1020), 1, - sym__declarator, - STATE(1107), 1, - sym__abstract_declarator, - STATE(1141), 1, - sym_parameter_list, - STATE(1407), 1, - sym_ms_based_modifier, - ACTIONS(2253), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1142), 4, - sym_abstract_parenthesized_declarator, - sym_abstract_pointer_declarator, - sym_abstract_function_declarator, - sym_abstract_array_declarator, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [30432] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2255), 1, - sym_identifier, - ACTIONS(2257), 1, - anon_sym_LPAREN2, - ACTIONS(2259), 1, - anon_sym_STAR, - STATE(998), 1, - sym_ms_unaligned_ptr_modifier, - STATE(1048), 1, - sym__field_declarator, - STATE(1328), 1, - sym_ms_based_modifier, - ACTIONS(1936), 2, - anon_sym__unaligned, - anon_sym___unaligned, - STATE(984), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - STATE(992), 2, - sym_ms_pointer_modifier, - aux_sym_pointer_declarator_repeat1, - ACTIONS(1934), 3, - sym_ms_restrict_modifier, - sym_ms_unsigned_ptr_modifier, - sym_ms_signed_ptr_modifier, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1085), 5, - sym_parenthesized_field_declarator, - sym_attributed_field_declarator, - sym_pointer_field_declarator, - sym_function_field_declarator, - sym_array_field_declarator, - [30487] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2261), 1, - sym_identifier, - ACTIONS(2263), 1, - anon_sym_LPAREN2, - ACTIONS(2265), 1, - anon_sym_STAR, - STATE(998), 1, - sym_ms_unaligned_ptr_modifier, - STATE(1061), 1, - sym__type_declarator, - STATE(1386), 1, - sym_ms_based_modifier, - ACTIONS(1936), 2, - anon_sym__unaligned, - anon_sym___unaligned, - STATE(836), 2, - sym_ms_pointer_modifier, - aux_sym_pointer_declarator_repeat1, - STATE(978), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(1934), 3, - sym_ms_restrict_modifier, - sym_ms_unsigned_ptr_modifier, - sym_ms_signed_ptr_modifier, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1098), 5, - sym_parenthesized_type_declarator, - sym_attributed_type_declarator, - sym_pointer_type_declarator, - sym_function_type_declarator, - sym_array_type_declarator, - [30542] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2255), 1, - sym_identifier, - ACTIONS(2257), 1, - anon_sym_LPAREN2, - ACTIONS(2259), 1, - anon_sym_STAR, - STATE(998), 1, - sym_ms_unaligned_ptr_modifier, - STATE(1044), 1, - sym__field_declarator, - STATE(1328), 1, - sym_ms_based_modifier, - ACTIONS(1936), 2, - anon_sym__unaligned, - anon_sym___unaligned, - STATE(842), 2, - sym_ms_pointer_modifier, - aux_sym_pointer_declarator_repeat1, - STATE(981), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(1934), 3, - sym_ms_restrict_modifier, - sym_ms_unsigned_ptr_modifier, - sym_ms_signed_ptr_modifier, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1085), 5, - sym_parenthesized_field_declarator, - sym_attributed_field_declarator, - sym_pointer_field_declarator, - sym_function_field_declarator, - sym_array_field_declarator, - [30597] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2261), 1, - sym_identifier, - ACTIONS(2263), 1, - anon_sym_LPAREN2, - ACTIONS(2265), 1, - anon_sym_STAR, - STATE(998), 1, - sym_ms_unaligned_ptr_modifier, - STATE(1070), 1, - sym__type_declarator, - STATE(1386), 1, - sym_ms_based_modifier, - ACTIONS(1936), 2, - anon_sym__unaligned, - anon_sym___unaligned, - STATE(840), 2, - sym_ms_pointer_modifier, - aux_sym_pointer_declarator_repeat1, - STATE(980), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(1934), 3, - sym_ms_restrict_modifier, - sym_ms_unsigned_ptr_modifier, - sym_ms_signed_ptr_modifier, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1098), 5, - sym_parenthesized_type_declarator, - sym_attributed_type_declarator, - sym_pointer_type_declarator, - sym_function_type_declarator, - sym_array_type_declarator, - [30652] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2261), 1, - sym_identifier, - ACTIONS(2263), 1, - anon_sym_LPAREN2, - ACTIONS(2265), 1, - anon_sym_STAR, - STATE(998), 1, - sym_ms_unaligned_ptr_modifier, - STATE(1070), 1, - sym__type_declarator, - STATE(1386), 1, - sym_ms_based_modifier, - ACTIONS(1936), 2, - anon_sym__unaligned, - anon_sym___unaligned, - STATE(980), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - STATE(992), 2, - sym_ms_pointer_modifier, - aux_sym_pointer_declarator_repeat1, - ACTIONS(1934), 3, - sym_ms_restrict_modifier, - sym_ms_unsigned_ptr_modifier, - sym_ms_signed_ptr_modifier, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1098), 5, - sym_parenthesized_type_declarator, - sym_attributed_type_declarator, - sym_pointer_type_declarator, - sym_function_type_declarator, - sym_array_type_declarator, - [30707] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(998), 1, - sym_ms_unaligned_ptr_modifier, - STATE(1020), 1, - sym__declarator, - STATE(1407), 1, - sym_ms_based_modifier, - ACTIONS(1936), 2, - anon_sym__unaligned, - anon_sym___unaligned, - STATE(983), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - STATE(992), 2, - sym_ms_pointer_modifier, - aux_sym_pointer_declarator_repeat1, - ACTIONS(1934), 3, - sym_ms_restrict_modifier, - sym_ms_unsigned_ptr_modifier, - sym_ms_signed_ptr_modifier, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [30762] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(998), 1, - sym_ms_unaligned_ptr_modifier, - STATE(1020), 1, - sym__declarator, - STATE(1407), 1, - sym_ms_based_modifier, - ACTIONS(1936), 2, - anon_sym__unaligned, - anon_sym___unaligned, - STATE(841), 2, - sym_ms_pointer_modifier, - aux_sym_pointer_declarator_repeat1, - STATE(983), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(1934), 3, - sym_ms_restrict_modifier, - sym_ms_unsigned_ptr_modifier, - sym_ms_signed_ptr_modifier, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [30817] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(998), 1, - sym_ms_unaligned_ptr_modifier, - STATE(1017), 1, - sym__declarator, - STATE(1407), 1, - sym_ms_based_modifier, - ACTIONS(1936), 2, - anon_sym__unaligned, - anon_sym___unaligned, - STATE(837), 2, - sym_ms_pointer_modifier, - aux_sym_pointer_declarator_repeat1, - STATE(979), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(1934), 3, - sym_ms_restrict_modifier, - sym_ms_unsigned_ptr_modifier, - sym_ms_signed_ptr_modifier, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [30872] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2261), 1, - sym_identifier, - ACTIONS(2263), 1, - anon_sym_LPAREN2, - ACTIONS(2265), 1, - anon_sym_STAR, - STATE(998), 1, - sym_ms_unaligned_ptr_modifier, - STATE(1059), 1, - sym__type_declarator, - STATE(1386), 1, - sym_ms_based_modifier, - ACTIONS(1936), 2, - anon_sym__unaligned, - anon_sym___unaligned, - STATE(986), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - STATE(992), 2, - sym_ms_pointer_modifier, - aux_sym_pointer_declarator_repeat1, - ACTIONS(1934), 3, - sym_ms_restrict_modifier, - sym_ms_unsigned_ptr_modifier, - sym_ms_signed_ptr_modifier, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1098), 5, - sym_parenthesized_type_declarator, - sym_attributed_type_declarator, - sym_pointer_type_declarator, - sym_function_type_declarator, - sym_array_type_declarator, - [30927] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(998), 1, - sym_ms_unaligned_ptr_modifier, - STATE(1015), 1, - sym__declarator, - STATE(1407), 1, - sym_ms_based_modifier, - ACTIONS(1936), 2, - anon_sym__unaligned, - anon_sym___unaligned, - STATE(985), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - STATE(992), 2, - sym_ms_pointer_modifier, - aux_sym_pointer_declarator_repeat1, - ACTIONS(1934), 3, - sym_ms_restrict_modifier, - sym_ms_unsigned_ptr_modifier, - sym_ms_signed_ptr_modifier, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [30982] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2255), 1, - sym_identifier, - ACTIONS(2257), 1, - anon_sym_LPAREN2, - ACTIONS(2259), 1, - anon_sym_STAR, - STATE(998), 1, - sym_ms_unaligned_ptr_modifier, - STATE(1052), 1, - sym__field_declarator, - STATE(1328), 1, - sym_ms_based_modifier, - ACTIONS(1936), 2, - anon_sym__unaligned, - anon_sym___unaligned, - STATE(982), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - STATE(992), 2, - sym_ms_pointer_modifier, - aux_sym_pointer_declarator_repeat1, - ACTIONS(1934), 3, - sym_ms_restrict_modifier, - sym_ms_unsigned_ptr_modifier, - sym_ms_signed_ptr_modifier, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1085), 5, - sym_parenthesized_field_declarator, - sym_attributed_field_declarator, - sym_pointer_field_declarator, - sym_function_field_declarator, - sym_array_field_declarator, - [31037] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2255), 1, - sym_identifier, - ACTIONS(2257), 1, - anon_sym_LPAREN2, - ACTIONS(2259), 1, - anon_sym_STAR, - STATE(998), 1, - sym_ms_unaligned_ptr_modifier, - STATE(1052), 1, - sym__field_declarator, - STATE(1328), 1, - sym_ms_based_modifier, - ACTIONS(1936), 2, - anon_sym__unaligned, - anon_sym___unaligned, - STATE(832), 2, - sym_ms_pointer_modifier, - aux_sym_pointer_declarator_repeat1, - STATE(982), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(1934), 3, - sym_ms_restrict_modifier, - sym_ms_unsigned_ptr_modifier, - sym_ms_signed_ptr_modifier, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1085), 5, - sym_parenthesized_field_declarator, - sym_attributed_field_declarator, - sym_pointer_field_declarator, - sym_function_field_declarator, - sym_array_field_declarator, - [31092] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2271), 1, - anon_sym_SEMI, - ACTIONS(2089), 2, - anon_sym___based, - sym_identifier, - ACTIONS(2091), 2, - anon_sym_LPAREN2, - anon_sym_STAR, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(712), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [31138] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2273), 1, - anon_sym_SEMI, - ACTIONS(2089), 2, - anon_sym___based, - sym_identifier, - ACTIONS(2091), 2, - anon_sym_LPAREN2, - anon_sym_STAR, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(712), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [31184] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2275), 1, - anon_sym_SEMI, - ACTIONS(2089), 2, - anon_sym___based, - sym_identifier, - ACTIONS(2091), 2, - anon_sym_LPAREN2, - anon_sym_STAR, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(712), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [31230] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(33), 1, - anon_sym___attribute__, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(862), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2277), 1, - anon_sym_SEMI, - ACTIONS(2089), 2, - anon_sym___based, - sym_identifier, - ACTIONS(2091), 2, - anon_sym_LPAREN2, - anon_sym_STAR, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(43), 5, - anon_sym_extern, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - STATE(712), 7, - sym__declaration_modifiers, - sym_attribute_specifier, - sym_attribute_declaration, - sym_ms_declspec_modifier, - sym_storage_class_specifier, - sym_type_qualifier, - aux_sym__declaration_specifiers_repeat1, - [31276] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2283), 1, - anon_sym_LBRACE, - STATE(871), 1, - sym_field_declaration_list, - ACTIONS(2281), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2279), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [31311] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2289), 1, - anon_sym_LBRACE, - STATE(887), 1, - sym_enumerator_list, - ACTIONS(2287), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2285), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [31346] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2283), 1, - anon_sym_LBRACE, - STATE(865), 1, - sym_field_declaration_list, - ACTIONS(2293), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2291), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [31381] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2283), 1, - anon_sym_LBRACE, - STATE(886), 1, - sym_field_declaration_list, - ACTIONS(2297), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2295), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [31416] = 13, - ACTIONS(3), 1, - sym_comment, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(1395), 1, - sym_identifier, - STATE(988), 1, - sym__type_specifier, - STATE(994), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(1364), 1, - sym_type_descriptor, - STATE(857), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(1345), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - [31467] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2283), 1, - anon_sym_LBRACE, - STATE(870), 1, - sym_field_declaration_list, - ACTIONS(2301), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2299), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [31502] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(1395), 1, - sym_identifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(1022), 1, - sym__type_specifier, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - [31550] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(1395), 1, - sym_identifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(1023), 1, - sym__type_specifier, - STATE(858), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - [31598] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(1395), 1, - sym_identifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(1026), 1, - sym__type_specifier, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - [31646] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(1395), 1, - sym_identifier, - STATE(987), 1, - sym__type_specifier, - STATE(994), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(1345), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - [31694] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(1395), 1, - sym_identifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(1037), 1, - sym__type_specifier, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - [31742] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(1395), 1, - sym_identifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(1021), 1, - sym__type_specifier, - STATE(860), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - [31790] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(1395), 1, - sym_identifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(1035), 1, - sym__type_specifier, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - [31838] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(1395), 1, - sym_identifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(1034), 1, - sym__type_specifier, - STATE(854), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - [31886] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(49), 1, - sym_primitive_type, - ACTIONS(51), 1, - anon_sym_enum, - ACTIONS(53), 1, - anon_sym_struct, - ACTIONS(55), 1, - anon_sym_union, - ACTIONS(1395), 1, - sym_identifier, - STATE(758), 1, - aux_sym_sized_type_specifier_repeat1, - STATE(1027), 1, - sym__type_specifier, - STATE(856), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(47), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - STATE(884), 5, - sym_sized_type_specifier, - sym_enum_specifier, - sym_struct_specifier, - sym_union_specifier, - sym_macro_type_specifier, - [31934] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2305), 1, - anon_sym_LPAREN2, - STATE(895), 1, - sym_preproc_argument_list, - ACTIONS(2307), 5, - anon_sym_SLASH, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2303), 15, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - [31968] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2311), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2309), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [31997] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2315), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2313), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32026] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2319), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2317), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32055] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2321), 1, - anon_sym_COMMA, - ACTIONS(2323), 1, - anon_sym_RPAREN, - ACTIONS(2329), 1, - anon_sym_SLASH, - ACTIONS(2331), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2333), 1, - anon_sym_AMP_AMP, - ACTIONS(2335), 1, - anon_sym_PIPE, - ACTIONS(2337), 1, - anon_sym_CARET, - ACTIONS(2339), 1, - anon_sym_AMP, - STATE(1181), 1, - aux_sym_preproc_argument_list_repeat1, - ACTIONS(2325), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2327), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2341), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2343), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2345), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2347), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [32110] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2351), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2349), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32139] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2355), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2353), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32168] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2359), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2357), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32197] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2363), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2361), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32226] = 16, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2321), 1, - anon_sym_COMMA, - ACTIONS(2329), 1, - anon_sym_SLASH, - ACTIONS(2331), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2333), 1, - anon_sym_AMP_AMP, - ACTIONS(2335), 1, - anon_sym_PIPE, - ACTIONS(2337), 1, - anon_sym_CARET, - ACTIONS(2339), 1, - anon_sym_AMP, - ACTIONS(2365), 1, - anon_sym_RPAREN, - STATE(1166), 1, - aux_sym_preproc_argument_list_repeat1, - ACTIONS(2325), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2327), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2341), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2343), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2345), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2347), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [32281] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2369), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2367), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32310] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2373), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2371), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32339] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2377), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2375), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32368] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2379), 1, - sym_identifier, - ACTIONS(2381), 1, - anon_sym_RPAREN, - ACTIONS(2383), 1, - anon_sym_LPAREN2, - ACTIONS(2385), 1, - anon_sym_defined, - ACTIONS(2391), 1, - sym_number_literal, - ACTIONS(2387), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2389), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2393), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(872), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [32411] = 5, - ACTIONS(2303), 1, - anon_sym_LF, - ACTIONS(2395), 1, - anon_sym_LPAREN2, - ACTIONS(2397), 1, - sym_comment, - STATE(962), 1, - sym_preproc_argument_list, - ACTIONS(2307), 18, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - [32444] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2401), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2399), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32473] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2405), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2403), 20, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [32502] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2407), 1, - anon_sym_LPAREN2, - ACTIONS(1450), 6, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(1437), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32533] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2412), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2410), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32562] = 5, - ACTIONS(3), 1, - sym_comment, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(2414), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(1942), 5, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_LBRACK, - ACTIONS(1940), 10, - anon_sym___based, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - sym_primitive_type, - anon_sym_enum, - anon_sym_struct, - anon_sym_union, - sym_identifier, - [32595] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2419), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2417), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32624] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2423), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2421), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32653] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2427), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2425), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32682] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2431), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2429), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32711] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2435), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2433), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32740] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2379), 1, - sym_identifier, - ACTIONS(2383), 1, - anon_sym_LPAREN2, - ACTIONS(2385), 1, - anon_sym_defined, - ACTIONS(2437), 1, - anon_sym_RPAREN, - ACTIONS(2439), 1, - sym_number_literal, - ACTIONS(2387), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2389), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2393), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(867), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [32783] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2443), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2441), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32812] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2447), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2445), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32841] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2451), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - ACTIONS(2449), 14, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_LBRACK, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [32870] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2329), 1, - anon_sym_SLASH, - ACTIONS(2325), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2327), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2455), 4, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2453), 11, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - [32904] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2455), 5, - anon_sym_SLASH, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2453), 15, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - [32932] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2467), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(954), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [32972] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2473), 5, - anon_sym_SLASH, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2471), 15, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - [33000] = 13, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2329), 1, - anon_sym_SLASH, - ACTIONS(2333), 1, - anon_sym_AMP_AMP, - ACTIONS(2335), 1, - anon_sym_PIPE, - ACTIONS(2337), 1, - anon_sym_CARET, - ACTIONS(2339), 1, - anon_sym_AMP, - ACTIONS(2325), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2327), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2341), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2343), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2345), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2347), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2453), 3, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - [33048] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2329), 1, - anon_sym_SLASH, - ACTIONS(2335), 1, - anon_sym_PIPE, - ACTIONS(2337), 1, - anon_sym_CARET, - ACTIONS(2339), 1, - anon_sym_AMP, - ACTIONS(2325), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2327), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2341), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2343), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2345), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2347), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2453), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - [33094] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2329), 1, - anon_sym_SLASH, - ACTIONS(2337), 1, - anon_sym_CARET, - ACTIONS(2339), 1, - anon_sym_AMP, - ACTIONS(2455), 1, - anon_sym_PIPE, - ACTIONS(2325), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2327), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2341), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2343), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2345), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2347), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2453), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - [33140] = 11, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2329), 1, - anon_sym_SLASH, - ACTIONS(2339), 1, - anon_sym_AMP, - ACTIONS(2455), 1, - anon_sym_PIPE, - ACTIONS(2325), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2327), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2341), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2343), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2345), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2347), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2453), 5, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - [33184] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2329), 1, - anon_sym_SLASH, - ACTIONS(2325), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2327), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2341), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2343), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2345), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2347), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2455), 2, - anon_sym_PIPE, - anon_sym_AMP, - ACTIONS(2453), 5, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - [33226] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2329), 1, - anon_sym_SLASH, - ACTIONS(2325), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2327), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2343), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2345), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2347), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2455), 2, - anon_sym_PIPE, - anon_sym_AMP, - ACTIONS(2453), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [33266] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2379), 1, - sym_identifier, - ACTIONS(2383), 1, - anon_sym_LPAREN2, - ACTIONS(2385), 1, - anon_sym_defined, - ACTIONS(2475), 1, - sym_number_literal, - ACTIONS(2387), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2389), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2393), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(914), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [33306] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2479), 5, - anon_sym_SLASH, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2477), 15, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - [33334] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2329), 1, - anon_sym_SLASH, - ACTIONS(2325), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2327), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2347), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2455), 4, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2453), 9, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - [33370] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2481), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(971), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [33410] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2485), 5, - anon_sym_SLASH, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2483), 15, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - [33438] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2487), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(970), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [33478] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1843), 5, - anon_sym_SLASH, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(1841), 15, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - [33506] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2489), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(969), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [33546] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2491), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(951), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [33586] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2493), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(955), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [33626] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2379), 1, - sym_identifier, - ACTIONS(2383), 1, - anon_sym_LPAREN2, - ACTIONS(2385), 1, - anon_sym_defined, - ACTIONS(2495), 1, - sym_number_literal, - ACTIONS(2387), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2389), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2393), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(926), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [33666] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2379), 1, - sym_identifier, - ACTIONS(2383), 1, - anon_sym_LPAREN2, - ACTIONS(2385), 1, - anon_sym_defined, - ACTIONS(2497), 1, - sym_number_literal, - ACTIONS(2387), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2389), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2393), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(893), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [33706] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2329), 1, - anon_sym_SLASH, - ACTIONS(2331), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2333), 1, - anon_sym_AMP_AMP, - ACTIONS(2335), 1, - anon_sym_PIPE, - ACTIONS(2337), 1, - anon_sym_CARET, - ACTIONS(2339), 1, - anon_sym_AMP, - ACTIONS(2325), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2327), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2341), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2343), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2345), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2347), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2499), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [33756] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2501), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(960), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [33796] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2379), 1, - sym_identifier, - ACTIONS(2383), 1, - anon_sym_LPAREN2, - ACTIONS(2385), 1, - anon_sym_defined, - ACTIONS(2503), 1, - sym_number_literal, - ACTIONS(2387), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2389), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2393), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(961), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [33836] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2379), 1, - sym_identifier, - ACTIONS(2383), 1, - anon_sym_LPAREN2, - ACTIONS(2385), 1, - anon_sym_defined, - ACTIONS(2505), 1, - sym_number_literal, - ACTIONS(2387), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2389), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2393), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(896), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [33876] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2507), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(958), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [33916] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2509), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(950), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [33956] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2379), 1, - sym_identifier, - ACTIONS(2383), 1, - anon_sym_LPAREN2, - ACTIONS(2385), 1, - anon_sym_defined, - ACTIONS(2511), 1, - sym_number_literal, - ACTIONS(2387), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2389), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2393), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(897), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [33996] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2515), 5, - anon_sym_SLASH, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2513), 15, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - [34024] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2519), 5, - anon_sym_SLASH, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2517), 15, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - [34052] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2379), 1, - sym_identifier, - ACTIONS(2383), 1, - anon_sym_LPAREN2, - ACTIONS(2385), 1, - anon_sym_defined, - ACTIONS(2521), 1, - sym_number_literal, - ACTIONS(2387), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2389), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2393), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(898), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34092] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2523), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(956), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34132] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2379), 1, - sym_identifier, - ACTIONS(2383), 1, - anon_sym_LPAREN2, - ACTIONS(2385), 1, - anon_sym_defined, - ACTIONS(2525), 1, - sym_number_literal, - ACTIONS(2387), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2389), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2393), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(899), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34172] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2329), 1, - anon_sym_SLASH, - ACTIONS(2327), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2455), 4, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2453), 13, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - [34204] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2379), 1, - sym_identifier, - ACTIONS(2383), 1, - anon_sym_LPAREN2, - ACTIONS(2385), 1, - anon_sym_defined, - ACTIONS(2527), 1, - sym_number_literal, - ACTIONS(2387), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2389), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2393), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(900), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34244] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2379), 1, - sym_identifier, - ACTIONS(2383), 1, - anon_sym_LPAREN2, - ACTIONS(2385), 1, - anon_sym_defined, - ACTIONS(2529), 1, - sym_number_literal, - ACTIONS(2387), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2389), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2393), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(901), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34284] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2533), 5, - anon_sym_SLASH, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2531), 15, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - [34312] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2535), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(963), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34352] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2379), 1, - sym_identifier, - ACTIONS(2383), 1, - anon_sym_LPAREN2, - ACTIONS(2385), 1, - anon_sym_defined, - ACTIONS(2537), 1, - sym_number_literal, - ACTIONS(2387), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2389), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2393), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(904), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34392] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2379), 1, - sym_identifier, - ACTIONS(2383), 1, - anon_sym_LPAREN2, - ACTIONS(2385), 1, - anon_sym_defined, - ACTIONS(2539), 1, - sym_number_literal, - ACTIONS(2387), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2389), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2393), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(964), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34432] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2379), 1, - sym_identifier, - ACTIONS(2383), 1, - anon_sym_LPAREN2, - ACTIONS(2385), 1, - anon_sym_defined, - ACTIONS(2541), 1, - sym_number_literal, - ACTIONS(2387), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2389), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2393), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(892), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34472] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2545), 5, - anon_sym_SLASH, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2543), 15, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - [34500] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2547), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(967), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34540] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2379), 1, - sym_identifier, - ACTIONS(2383), 1, - anon_sym_LPAREN2, - ACTIONS(2385), 1, - anon_sym_defined, - ACTIONS(2549), 1, - sym_number_literal, - ACTIONS(2387), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2389), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2393), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(906), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34580] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2551), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(974), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34620] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2555), 5, - anon_sym_SLASH, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2553), 15, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_CARET, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT_LT, - anon_sym_GT_GT, - [34648] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2557), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(975), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34688] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2559), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(977), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34728] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2561), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(948), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34768] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2563), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(966), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34808] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2565), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(976), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34848] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2567), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(973), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34888] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2457), 1, - sym_identifier, - ACTIONS(2459), 1, - anon_sym_LPAREN2, - ACTIONS(2461), 1, - anon_sym_defined, - ACTIONS(2569), 1, - sym_number_literal, - ACTIONS(2463), 2, - anon_sym_BANG, - anon_sym_TILDE, - ACTIONS(2465), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2469), 5, - anon_sym_L_SQUOTE, - anon_sym_u_SQUOTE, - anon_sym_U_SQUOTE, - anon_sym_u8_SQUOTE, - anon_sym_SQUOTE, - STATE(965), 7, - sym__preproc_expression, - sym_preproc_parenthesized_expression, - sym_preproc_defined, - sym_preproc_unary_expression, - sym_preproc_call_expression, - sym_preproc_binary_expression, - sym_char_literal, - [34928] = 13, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1387), 1, - anon_sym_LPAREN2, - ACTIONS(1389), 1, - anon_sym_STAR, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(1938), 1, - anon_sym_LBRACK, - STATE(1082), 1, - sym__declarator, - STATE(1113), 1, - sym__abstract_declarator, - STATE(1141), 1, - sym_parameter_list, - STATE(1407), 1, - sym_ms_based_modifier, - ACTIONS(2571), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - STATE(1142), 4, - sym_abstract_parenthesized_declarator, - sym_abstract_pointer_declarator, - sym_abstract_function_declarator, - sym_abstract_array_declarator, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [34976] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2576), 1, - anon_sym_LPAREN2, - ACTIONS(2580), 1, - anon_sym_LBRACK, - ACTIONS(1450), 2, - anon_sym_COMMA, - anon_sym_STAR, - ACTIONS(2573), 2, - anon_sym_RPAREN, - anon_sym_LBRACK_LBRACK, - ACTIONS(1437), 13, - anon_sym_extern, - anon_sym___attribute__, - anon_sym___declspec, - anon_sym___based, - anon_sym_static, - anon_sym_auto, - anon_sym_register, - anon_sym_inline, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [35009] = 11, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2453), 1, - anon_sym_LF, - ACTIONS(2587), 1, - anon_sym_PIPE, - ACTIONS(2589), 1, - anon_sym_CARET, - ACTIONS(2591), 1, - anon_sym_AMP, - ACTIONS(2455), 2, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - ACTIONS(2583), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2593), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2597), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2595), 4, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - [35052] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2531), 1, - anon_sym_LF, - ACTIONS(2533), 18, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - [35079] = 12, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2587), 1, - anon_sym_PIPE, - ACTIONS(2589), 1, - anon_sym_CARET, - ACTIONS(2591), 1, - anon_sym_AMP, - ACTIONS(2599), 1, - anon_sym_LF, - ACTIONS(2601), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2603), 1, - anon_sym_AMP_AMP, - ACTIONS(2583), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2593), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2597), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2595), 4, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - [35124] = 12, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2587), 1, - anon_sym_PIPE, - ACTIONS(2589), 1, - anon_sym_CARET, - ACTIONS(2591), 1, - anon_sym_AMP, - ACTIONS(2601), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2603), 1, - anon_sym_AMP_AMP, - ACTIONS(2605), 1, - anon_sym_LF, - ACTIONS(2583), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2593), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2597), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2595), 4, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - [35169] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2543), 1, - anon_sym_LF, - ACTIONS(2545), 18, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - [35196] = 3, - ACTIONS(1841), 1, - anon_sym_LF, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(1843), 18, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - [35223] = 12, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2587), 1, - anon_sym_PIPE, - ACTIONS(2589), 1, - anon_sym_CARET, - ACTIONS(2591), 1, - anon_sym_AMP, - ACTIONS(2601), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2603), 1, - anon_sym_AMP_AMP, - ACTIONS(2607), 1, - anon_sym_LF, - ACTIONS(2583), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2593), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2597), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2595), 4, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - [35268] = 12, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2587), 1, - anon_sym_PIPE, - ACTIONS(2589), 1, - anon_sym_CARET, - ACTIONS(2591), 1, - anon_sym_AMP, - ACTIONS(2601), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2603), 1, - anon_sym_AMP_AMP, - ACTIONS(2609), 1, - anon_sym_LF, - ACTIONS(2583), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2593), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2597), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2595), 4, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - [35313] = 12, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2587), 1, - anon_sym_PIPE, - ACTIONS(2589), 1, - anon_sym_CARET, - ACTIONS(2591), 1, - anon_sym_AMP, - ACTIONS(2601), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2603), 1, - anon_sym_AMP_AMP, - ACTIONS(2611), 1, - anon_sym_LF, - ACTIONS(2583), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2593), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2597), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2595), 4, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - [35358] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2517), 1, - anon_sym_LF, - ACTIONS(2519), 18, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - [35385] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2483), 1, - anon_sym_LF, - ACTIONS(2485), 18, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - [35412] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2477), 1, - anon_sym_LF, - ACTIONS(2479), 18, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - [35439] = 5, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2453), 1, - anon_sym_LF, - ACTIONS(2583), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2455), 13, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - [35470] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2329), 1, - anon_sym_SLASH, - ACTIONS(2331), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2333), 1, - anon_sym_AMP_AMP, - ACTIONS(2335), 1, - anon_sym_PIPE, - ACTIONS(2337), 1, - anon_sym_CARET, - ACTIONS(2339), 1, - anon_sym_AMP, - ACTIONS(2613), 1, - anon_sym_RPAREN, - ACTIONS(2325), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2327), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2341), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2343), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2345), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2347), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [35519] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2471), 1, - anon_sym_LF, - ACTIONS(2473), 18, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - [35546] = 12, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2587), 1, - anon_sym_PIPE, - ACTIONS(2589), 1, - anon_sym_CARET, - ACTIONS(2591), 1, - anon_sym_AMP, - ACTIONS(2601), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2603), 1, - anon_sym_AMP_AMP, - ACTIONS(2615), 1, - anon_sym_LF, - ACTIONS(2583), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2593), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2597), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2595), 4, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - [35591] = 14, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2329), 1, - anon_sym_SLASH, - ACTIONS(2331), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2333), 1, - anon_sym_AMP_AMP, - ACTIONS(2335), 1, - anon_sym_PIPE, - ACTIONS(2337), 1, - anon_sym_CARET, - ACTIONS(2339), 1, - anon_sym_AMP, - ACTIONS(2617), 1, - anon_sym_RPAREN, - ACTIONS(2325), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2327), 2, - anon_sym_STAR, - anon_sym_PERCENT, - ACTIONS(2341), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2343), 2, - anon_sym_GT, - anon_sym_LT, - ACTIONS(2345), 2, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - ACTIONS(2347), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - [35640] = 12, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2587), 1, - anon_sym_PIPE, - ACTIONS(2589), 1, - anon_sym_CARET, - ACTIONS(2591), 1, - anon_sym_AMP, - ACTIONS(2601), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2603), 1, - anon_sym_AMP_AMP, - ACTIONS(2619), 1, - anon_sym_LF, - ACTIONS(2583), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2593), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2597), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2595), 4, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - [35685] = 12, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2587), 1, - anon_sym_PIPE, - ACTIONS(2589), 1, - anon_sym_CARET, - ACTIONS(2591), 1, - anon_sym_AMP, - ACTIONS(2601), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2603), 1, - anon_sym_AMP_AMP, - ACTIONS(2621), 1, - anon_sym_LF, - ACTIONS(2583), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2593), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2597), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2595), 4, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - [35730] = 12, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2587), 1, - anon_sym_PIPE, - ACTIONS(2589), 1, - anon_sym_CARET, - ACTIONS(2591), 1, - anon_sym_AMP, - ACTIONS(2601), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2603), 1, - anon_sym_AMP_AMP, - ACTIONS(2623), 1, - anon_sym_LF, - ACTIONS(2583), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2593), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2597), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2595), 4, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - [35775] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2513), 1, - anon_sym_LF, - ACTIONS(2515), 18, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - [35802] = 6, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2453), 1, - anon_sym_LF, - ACTIONS(2583), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2597), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2455), 11, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - [35835] = 7, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2453), 1, - anon_sym_LF, - ACTIONS(2583), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2597), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2595), 4, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - ACTIONS(2455), 7, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - [35870] = 8, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2453), 1, - anon_sym_LF, - ACTIONS(2583), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2593), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2597), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2595), 4, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - ACTIONS(2455), 5, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - [35907] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2553), 1, - anon_sym_LF, - ACTIONS(2555), 18, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - [35934] = 9, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2453), 1, - anon_sym_LF, - ACTIONS(2591), 1, - anon_sym_AMP, - ACTIONS(2583), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2593), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2597), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2455), 4, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - anon_sym_CARET, - ACTIONS(2595), 4, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - [35973] = 4, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2453), 1, - anon_sym_LF, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2455), 15, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - [36002] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2453), 1, - anon_sym_LF, - ACTIONS(2455), 18, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - anon_sym_CARET, - anon_sym_AMP, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - anon_sym_LT_LT, - anon_sym_GT_GT, - [36029] = 10, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2453), 1, - anon_sym_LF, - ACTIONS(2589), 1, - anon_sym_CARET, - ACTIONS(2591), 1, - anon_sym_AMP, - ACTIONS(2583), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2593), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2597), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2455), 3, - anon_sym_PIPE_PIPE, - anon_sym_AMP_AMP, - anon_sym_PIPE, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2595), 4, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - [36070] = 12, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2453), 1, - anon_sym_LF, - ACTIONS(2455), 1, - anon_sym_PIPE_PIPE, - ACTIONS(2587), 1, - anon_sym_PIPE, - ACTIONS(2589), 1, - anon_sym_CARET, - ACTIONS(2591), 1, - anon_sym_AMP, - ACTIONS(2603), 1, - anon_sym_AMP_AMP, - ACTIONS(2583), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(2593), 2, - anon_sym_EQ_EQ, - anon_sym_BANG_EQ, - ACTIONS(2597), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(2585), 3, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PERCENT, - ACTIONS(2595), 4, - anon_sym_GT, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_LT, - [36115] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2261), 1, - sym_identifier, - ACTIONS(2263), 1, - anon_sym_LPAREN2, - ACTIONS(2265), 1, - anon_sym_STAR, - STATE(1070), 1, - sym__type_declarator, - STATE(1386), 1, - sym_ms_based_modifier, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1098), 5, - sym_parenthesized_type_declarator, - sym_attributed_type_declarator, - sym_pointer_type_declarator, - sym_function_type_declarator, - sym_array_type_declarator, - [36154] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(1020), 1, - sym__declarator, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [36193] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2261), 1, - sym_identifier, - ACTIONS(2263), 1, - anon_sym_LPAREN2, - ACTIONS(2265), 1, - anon_sym_STAR, - STATE(1059), 1, - sym__type_declarator, - STATE(1386), 1, - sym_ms_based_modifier, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1098), 5, - sym_parenthesized_type_declarator, - sym_attributed_type_declarator, - sym_pointer_type_declarator, - sym_function_type_declarator, - sym_array_type_declarator, - [36232] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2255), 1, - sym_identifier, - ACTIONS(2257), 1, - anon_sym_LPAREN2, - ACTIONS(2259), 1, - anon_sym_STAR, - STATE(1052), 1, - sym__field_declarator, - STATE(1328), 1, - sym_ms_based_modifier, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1085), 5, - sym_parenthesized_field_declarator, - sym_attributed_field_declarator, - sym_pointer_field_declarator, - sym_function_field_declarator, - sym_array_field_declarator, - [36271] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2255), 1, - sym_identifier, - ACTIONS(2257), 1, - anon_sym_LPAREN2, - ACTIONS(2259), 1, - anon_sym_STAR, - STATE(1048), 1, - sym__field_declarator, - STATE(1328), 1, - sym_ms_based_modifier, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1085), 5, - sym_parenthesized_field_declarator, - sym_attributed_field_declarator, - sym_pointer_field_declarator, - sym_function_field_declarator, - sym_array_field_declarator, - [36310] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(1015), 1, - sym__declarator, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [36349] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2255), 1, - sym_identifier, - ACTIONS(2257), 1, - anon_sym_LPAREN2, - ACTIONS(2259), 1, - anon_sym_STAR, - STATE(1047), 1, - sym__field_declarator, - STATE(1328), 1, - sym_ms_based_modifier, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1085), 5, - sym_parenthesized_field_declarator, - sym_attributed_field_declarator, - sym_pointer_field_declarator, - sym_function_field_declarator, - sym_array_field_declarator, - [36388] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(1039), 1, - sym__declarator, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [36427] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2261), 1, - sym_identifier, - ACTIONS(2263), 1, - anon_sym_LPAREN2, - ACTIONS(2265), 1, - anon_sym_STAR, - STATE(1067), 1, - sym__type_declarator, - STATE(1386), 1, - sym_ms_based_modifier, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(45), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1098), 5, - sym_parenthesized_type_declarator, - sym_attributed_type_declarator, - sym_pointer_type_declarator, - sym_function_type_declarator, - sym_array_type_declarator, - [36466] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1629), 1, - anon_sym_LPAREN2, - ACTIONS(1631), 1, - anon_sym_STAR, - ACTIONS(1938), 1, - anon_sym_LBRACK, - ACTIONS(2625), 1, - anon_sym_RPAREN, - STATE(1126), 1, - sym__abstract_declarator, - STATE(1141), 1, - sym_parameter_list, - STATE(991), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(2627), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1142), 4, - sym_abstract_parenthesized_declarator, - sym_abstract_pointer_declarator, - sym_abstract_function_declarator, - sym_abstract_array_declarator, - [36504] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1629), 1, - anon_sym_LPAREN2, - ACTIONS(1631), 1, - anon_sym_STAR, - ACTIONS(1938), 1, - anon_sym_LBRACK, - ACTIONS(2629), 1, - anon_sym_RPAREN, - STATE(1141), 1, - sym_parameter_list, - STATE(1144), 1, - sym__abstract_declarator, - STATE(989), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(2627), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1142), 4, - sym_abstract_parenthesized_declarator, - sym_abstract_pointer_declarator, - sym_abstract_function_declarator, - sym_abstract_array_declarator, - [36542] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1629), 1, - anon_sym_LPAREN2, - ACTIONS(1631), 1, - anon_sym_STAR, - ACTIONS(1938), 1, - anon_sym_LBRACK, - ACTIONS(2631), 1, - anon_sym_RPAREN, - STATE(1127), 1, - sym__abstract_declarator, - STATE(1141), 1, - sym_parameter_list, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(2627), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1142), 4, - sym_abstract_parenthesized_declarator, - sym_abstract_pointer_declarator, - sym_abstract_function_declarator, - sym_abstract_array_declarator, - [36580] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1629), 1, - anon_sym_LPAREN2, - ACTIONS(1631), 1, - anon_sym_STAR, - ACTIONS(1932), 1, - anon_sym_RPAREN, - ACTIONS(1938), 1, - anon_sym_LBRACK, - STATE(1108), 1, - sym__abstract_declarator, - STATE(1141), 1, - sym_parameter_list, - STATE(993), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(2627), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1142), 4, - sym_abstract_parenthesized_declarator, - sym_abstract_pointer_declarator, - sym_abstract_function_declarator, - sym_abstract_array_declarator, - [36618] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1629), 1, - anon_sym_LPAREN2, - ACTIONS(1631), 1, - anon_sym_STAR, - ACTIONS(1938), 1, - anon_sym_LBRACK, - ACTIONS(2633), 1, - anon_sym_RPAREN, - STATE(1123), 1, - sym__abstract_declarator, - STATE(1141), 1, - sym_parameter_list, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(2627), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1142), 4, - sym_abstract_parenthesized_declarator, - sym_abstract_pointer_declarator, - sym_abstract_function_declarator, - sym_abstract_array_declarator, - [36656] = 7, - ACTIONS(3), 1, - sym_comment, - STATE(998), 1, - sym_ms_unaligned_ptr_modifier, - ACTIONS(2637), 2, - anon_sym_LPAREN2, - anon_sym_STAR, - ACTIONS(2642), 2, - anon_sym__unaligned, - anon_sym___unaligned, - STATE(992), 2, - sym_ms_pointer_modifier, - aux_sym_pointer_declarator_repeat1, - ACTIONS(2639), 3, - sym_ms_restrict_modifier, - sym_ms_unsigned_ptr_modifier, - sym_ms_signed_ptr_modifier, - ACTIONS(2635), 6, - anon_sym___based, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [36688] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1629), 1, - anon_sym_LPAREN2, - ACTIONS(1631), 1, - anon_sym_STAR, - ACTIONS(1938), 1, - anon_sym_LBRACK, - ACTIONS(2253), 1, - anon_sym_RPAREN, - STATE(1107), 1, - sym__abstract_declarator, - STATE(1141), 1, - sym_parameter_list, - STATE(882), 2, - sym_type_qualifier, - aux_sym_type_definition_repeat1, - ACTIONS(2627), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - STATE(1142), 4, - sym_abstract_parenthesized_declarator, - sym_abstract_pointer_declarator, - sym_abstract_function_declarator, - sym_abstract_array_declarator, - [36726] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2226), 1, - sym_primitive_type, - ACTIONS(2645), 1, - sym_identifier, - STATE(818), 1, - aux_sym_sized_type_specifier_repeat1, - ACTIONS(2220), 4, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_STAR, - anon_sym_LBRACK, - ACTIONS(2222), 4, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - ACTIONS(2224), 4, - anon_sym_signed, - anon_sym_unsigned, - anon_sym_long, - anon_sym_short, - [36757] = 11, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2255), 1, - sym_identifier, - ACTIONS(2257), 1, - anon_sym_LPAREN2, - ACTIONS(2259), 1, - anon_sym_STAR, - ACTIONS(2647), 1, - anon_sym_SEMI, - ACTIONS(2649), 1, - anon_sym_COLON, - STATE(1028), 1, - sym__field_declarator, - STATE(1327), 1, - sym_bitfield_clause, - STATE(1328), 1, - sym_ms_based_modifier, - STATE(1085), 5, - sym_parenthesized_field_declarator, - sym_attributed_field_declarator, - sym_pointer_field_declarator, - sym_function_field_declarator, - sym_array_field_declarator, - [36795] = 11, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2255), 1, - sym_identifier, - ACTIONS(2257), 1, - anon_sym_LPAREN2, - ACTIONS(2259), 1, - anon_sym_STAR, - ACTIONS(2649), 1, - anon_sym_COLON, - ACTIONS(2651), 1, - anon_sym_SEMI, - STATE(1040), 1, - sym__field_declarator, - STATE(1328), 1, - sym_ms_based_modifier, - STATE(1380), 1, - sym_bitfield_clause, - STATE(1085), 5, - sym_parenthesized_field_declarator, - sym_attributed_field_declarator, - sym_pointer_field_declarator, - sym_function_field_declarator, - sym_array_field_declarator, - [36833] = 11, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2255), 1, - sym_identifier, - ACTIONS(2257), 1, - anon_sym_LPAREN2, - ACTIONS(2259), 1, - anon_sym_STAR, - ACTIONS(2649), 1, - anon_sym_COLON, - ACTIONS(2653), 1, - anon_sym_SEMI, - STATE(1016), 1, - sym__field_declarator, - STATE(1328), 1, - sym_ms_based_modifier, - STATE(1329), 1, - sym_bitfield_clause, - STATE(1085), 5, - sym_parenthesized_field_declarator, - sym_attributed_field_declarator, - sym_pointer_field_declarator, - sym_function_field_declarator, - sym_array_field_declarator, - [36871] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2657), 2, - anon_sym_LPAREN2, - anon_sym_STAR, - ACTIONS(2655), 11, - anon_sym___based, - sym_ms_restrict_modifier, - sym_ms_unsigned_ptr_modifier, - sym_ms_signed_ptr_modifier, - anon_sym__unaligned, - anon_sym___unaligned, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [36892] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2661), 2, - anon_sym_LPAREN2, - anon_sym_STAR, - ACTIONS(2659), 11, - anon_sym___based, - sym_ms_restrict_modifier, - sym_ms_unsigned_ptr_modifier, - sym_ms_signed_ptr_modifier, - anon_sym__unaligned, - anon_sym___unaligned, - anon_sym_const, - anon_sym_volatile, - anon_sym_restrict, - anon_sym__Atomic, - sym_identifier, - [36913] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(511), 1, - anon_sym_LBRACE, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2667), 1, - anon_sym_SEMI, - ACTIONS(2669), 1, - anon_sym_LBRACK, - ACTIONS(2671), 1, - anon_sym_EQ, - STATE(334), 1, - sym_compound_statement, - STATE(1032), 1, - sym_parameter_list, - STATE(1160), 1, - aux_sym_declaration_repeat1, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [36951] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(319), 1, - anon_sym_LBRACE, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2669), 1, - anon_sym_LBRACK, - ACTIONS(2671), 1, - anon_sym_EQ, - ACTIONS(2673), 1, - anon_sym_SEMI, - STATE(313), 1, - sym_compound_statement, - STATE(1032), 1, - sym_parameter_list, - STATE(1206), 1, - aux_sym_declaration_repeat1, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [36989] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(41), 1, - anon_sym_LBRACE, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2669), 1, - anon_sym_LBRACK, - ACTIONS(2671), 1, - anon_sym_EQ, - ACTIONS(2675), 1, - anon_sym_SEMI, - STATE(346), 1, - sym_compound_statement, - STATE(1032), 1, - sym_parameter_list, - STATE(1199), 1, - aux_sym_declaration_repeat1, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [37027] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(1002), 1, - sym__declarator, - STATE(1186), 1, - sym_init_declarator, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [37059] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(1001), 1, - sym__declarator, - STATE(1169), 1, - sym_init_declarator, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [37091] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(1041), 1, - sym__declarator, - STATE(1169), 1, - sym_init_declarator, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [37123] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(1046), 1, - sym__declarator, - STATE(1176), 1, - sym_init_declarator, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [37155] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(1053), 1, - sym__declarator, - STATE(1232), 1, - sym_init_declarator, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [37187] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(1009), 1, - sym__declarator, - STATE(1176), 1, - sym_init_declarator, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [37219] = 12, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(115), 1, - anon_sym_LBRACE, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2669), 1, - anon_sym_LBRACK, - ACTIONS(2671), 1, - anon_sym_EQ, - ACTIONS(2677), 1, - anon_sym_SEMI, - STATE(118), 1, - sym_compound_statement, - STATE(1032), 1, - sym_parameter_list, - STATE(1187), 1, - aux_sym_declaration_repeat1, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [37257] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(1042), 1, - sym__declarator, - STATE(1170), 1, - sym_init_declarator, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [37289] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(1045), 1, - sym__declarator, - STATE(1186), 1, - sym_init_declarator, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [37321] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(1000), 1, - sym__declarator, - STATE(1170), 1, - sym_init_declarator, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [37353] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2681), 1, - anon_sym___attribute__, - ACTIONS(2683), 1, - anon_sym_LBRACK, - STATE(1030), 2, - sym_attribute_specifier, - aux_sym_function_declarator_repeat1, - ACTIONS(2679), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_EQ, - [37376] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(1074), 1, - sym__declarator, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [37405] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2669), 1, - anon_sym_LBRACK, - STATE(1032), 1, - sym_parameter_list, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - ACTIONS(2685), 5, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_LBRACE, - anon_sym_EQ, - [37432] = 11, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2649), 1, - anon_sym_COLON, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2687), 1, - anon_sym_COMMA, - ACTIONS(2689), 1, - anon_sym_SEMI, - ACTIONS(2691), 1, - anon_sym_LBRACK, - STATE(1091), 1, - sym_parameter_list, - STATE(1106), 1, - aux_sym_field_declaration_repeat1, - STATE(1390), 1, - sym_bitfield_clause, - STATE(1056), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [37467] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2669), 1, - anon_sym_LBRACK, - STATE(1032), 1, - sym_parameter_list, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - ACTIONS(2693), 5, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_LBRACE, - anon_sym_EQ, - [37494] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(1080), 1, - sym__declarator, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [37523] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2255), 1, - sym_identifier, - ACTIONS(2257), 1, - anon_sym_LPAREN2, - ACTIONS(2259), 1, - anon_sym_STAR, - STATE(1069), 1, - sym__field_declarator, - STATE(1328), 1, - sym_ms_based_modifier, - STATE(1085), 5, - sym_parenthesized_field_declarator, - sym_attributed_field_declarator, - sym_pointer_field_declarator, - sym_function_field_declarator, - sym_array_field_declarator, - [37552] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2669), 1, - anon_sym_LBRACK, - STATE(1032), 1, - sym_parameter_list, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - ACTIONS(2695), 5, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_LBRACE, - anon_sym_EQ, - [37579] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2261), 1, - sym_identifier, - ACTIONS(2263), 1, - anon_sym_LPAREN2, - ACTIONS(2265), 1, - anon_sym_STAR, - STATE(1066), 1, - sym__type_declarator, - STATE(1386), 1, - sym_ms_based_modifier, - STATE(1098), 5, - sym_parenthesized_type_declarator, - sym_attributed_type_declarator, - sym_pointer_type_declarator, - sym_function_type_declarator, - sym_array_type_declarator, - [37608] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2261), 1, - sym_identifier, - ACTIONS(2263), 1, - anon_sym_LPAREN2, - ACTIONS(2265), 1, - anon_sym_STAR, - STATE(1065), 1, - sym__type_declarator, - STATE(1386), 1, - sym_ms_based_modifier, - STATE(1098), 5, - sym_parenthesized_type_declarator, - sym_attributed_type_declarator, - sym_pointer_type_declarator, - sym_function_type_declarator, - sym_array_type_declarator, - [37637] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2261), 1, - sym_identifier, - ACTIONS(2263), 1, - anon_sym_LPAREN2, - ACTIONS(2265), 1, - anon_sym_STAR, - STATE(1055), 1, - sym__type_declarator, - STATE(1386), 1, - sym_ms_based_modifier, - STATE(1098), 5, - sym_parenthesized_type_declarator, - sym_attributed_type_declarator, - sym_pointer_type_declarator, - sym_function_type_declarator, - sym_array_type_declarator, - [37666] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(1095), 1, - sym__declarator, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [37695] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2699), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2702), 1, - anon_sym_LBRACK, - STATE(1025), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - ACTIONS(2697), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACE, - anon_sym_EQ, - anon_sym_COLON, - [37718] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2261), 1, - sym_identifier, - ACTIONS(2263), 1, - anon_sym_LPAREN2, - ACTIONS(2265), 1, - anon_sym_STAR, - STATE(1054), 1, - sym__type_declarator, - STATE(1386), 1, - sym_ms_based_modifier, - STATE(1098), 5, - sym_parenthesized_type_declarator, - sym_attributed_type_declarator, - sym_pointer_type_declarator, - sym_function_type_declarator, - sym_array_type_declarator, - [37747] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2261), 1, - sym_identifier, - ACTIONS(2263), 1, - anon_sym_LPAREN2, - ACTIONS(2265), 1, - anon_sym_STAR, - STATE(1058), 1, - sym__type_declarator, - STATE(1386), 1, - sym_ms_based_modifier, - STATE(1098), 5, - sym_parenthesized_type_declarator, - sym_attributed_type_declarator, - sym_pointer_type_declarator, - sym_function_type_declarator, - sym_array_type_declarator, - [37776] = 11, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2649), 1, - anon_sym_COLON, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2687), 1, - anon_sym_COMMA, - ACTIONS(2691), 1, - anon_sym_LBRACK, - ACTIONS(2704), 1, - anon_sym_SEMI, - STATE(1091), 1, - sym_parameter_list, - STATE(1109), 1, - aux_sym_field_declaration_repeat1, - STATE(1305), 1, - sym_bitfield_clause, - STATE(1056), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [37811] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(1076), 1, - sym__declarator, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [37840] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2708), 1, - anon_sym___attribute__, - ACTIONS(2711), 1, - anon_sym_LBRACK, - STATE(1030), 2, - sym_attribute_specifier, - aux_sym_function_declarator_repeat1, - ACTIONS(2706), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_EQ, - [37863] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(1930), 1, - sym_identifier, - ACTIONS(2267), 1, - anon_sym_LPAREN2, - ACTIONS(2269), 1, - anon_sym_STAR, - STATE(1081), 1, - sym__declarator, - STATE(1407), 1, - sym_ms_based_modifier, - STATE(1075), 5, - sym_parenthesized_declarator, - sym_attributed_declarator, - sym_pointer_declarator, - sym_function_declarator, - sym_array_declarator, - [37892] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2681), 1, - anon_sym___attribute__, - ACTIONS(2715), 1, - anon_sym_LBRACK, - STATE(1013), 2, - sym_attribute_specifier, - aux_sym_function_declarator_repeat1, - ACTIONS(2713), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_EQ, - [37915] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2255), 1, - sym_identifier, - ACTIONS(2257), 1, - anon_sym_LPAREN2, - ACTIONS(2259), 1, - anon_sym_STAR, - STATE(1090), 1, - sym__field_declarator, - STATE(1328), 1, - sym_ms_based_modifier, - STATE(1085), 5, - sym_parenthesized_field_declarator, - sym_attributed_field_declarator, - sym_pointer_field_declarator, - sym_function_field_declarator, - sym_array_field_declarator, - [37944] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2261), 1, - sym_identifier, - ACTIONS(2263), 1, - anon_sym_LPAREN2, - ACTIONS(2265), 1, - anon_sym_STAR, - STATE(1068), 1, - sym__type_declarator, - STATE(1386), 1, - sym_ms_based_modifier, - STATE(1098), 5, - sym_parenthesized_type_declarator, - sym_attributed_type_declarator, - sym_pointer_type_declarator, - sym_function_type_declarator, - sym_array_type_declarator, - [37973] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2261), 1, - sym_identifier, - ACTIONS(2263), 1, - anon_sym_LPAREN2, - ACTIONS(2265), 1, - anon_sym_STAR, - STATE(1057), 1, - sym__type_declarator, - STATE(1386), 1, - sym_ms_based_modifier, - STATE(1098), 5, - sym_parenthesized_type_declarator, - sym_attributed_type_declarator, - sym_pointer_type_declarator, - sym_function_type_declarator, - sym_array_type_declarator, - [38002] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2261), 1, - sym_identifier, - ACTIONS(2263), 1, - anon_sym_LPAREN2, - ACTIONS(2265), 1, - anon_sym_STAR, - STATE(1088), 1, - sym__type_declarator, - STATE(1386), 1, - sym_ms_based_modifier, - STATE(1098), 5, - sym_parenthesized_type_declarator, - sym_attributed_type_declarator, - sym_pointer_type_declarator, - sym_function_type_declarator, - sym_array_type_declarator, - [38031] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2261), 1, - sym_identifier, - ACTIONS(2263), 1, - anon_sym_LPAREN2, - ACTIONS(2265), 1, - anon_sym_STAR, - STATE(1060), 1, - sym__type_declarator, - STATE(1386), 1, - sym_ms_based_modifier, - STATE(1098), 5, - sym_parenthesized_type_declarator, - sym_attributed_type_declarator, - sym_pointer_type_declarator, - sym_function_type_declarator, - sym_array_type_declarator, - [38060] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1391), 1, - anon_sym___based, - ACTIONS(2261), 1, - sym_identifier, - ACTIONS(2263), 1, - anon_sym_LPAREN2, - ACTIONS(2265), 1, - anon_sym_STAR, - STATE(1072), 1, - sym__type_declarator, - STATE(1386), 1, - sym_ms_based_modifier, - STATE(1098), 5, - sym_parenthesized_type_declarator, - sym_attributed_type_declarator, - sym_pointer_type_declarator, - sym_function_type_declarator, - sym_array_type_declarator, - [38089] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2669), 1, - anon_sym_LBRACK, - STATE(1032), 1, - sym_parameter_list, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - ACTIONS(2717), 5, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_LBRACE, - anon_sym_EQ, - [38116] = 11, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2649), 1, - anon_sym_COLON, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2687), 1, - anon_sym_COMMA, - ACTIONS(2691), 1, - anon_sym_LBRACK, - ACTIONS(2719), 1, - anon_sym_SEMI, - STATE(1091), 1, - sym_parameter_list, - STATE(1111), 1, - aux_sym_field_declaration_repeat1, - STATE(1272), 1, - sym_bitfield_clause, - STATE(1056), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [38151] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2669), 1, - anon_sym_LBRACK, - ACTIONS(2671), 1, - anon_sym_EQ, - ACTIONS(2673), 1, - anon_sym_SEMI, - STATE(1032), 1, - sym_parameter_list, - STATE(1206), 1, - aux_sym_declaration_repeat1, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [38183] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2667), 1, - anon_sym_SEMI, - ACTIONS(2669), 1, - anon_sym_LBRACK, - ACTIONS(2671), 1, - anon_sym_EQ, - STATE(1032), 1, - sym_parameter_list, - STATE(1160), 1, - aux_sym_declaration_repeat1, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [38215] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2723), 1, - anon_sym_LBRACK, - STATE(1025), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - ACTIONS(2721), 6, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACE, - anon_sym_EQ, - [38237] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2691), 1, - anon_sym_LBRACK, - STATE(1091), 1, - sym_parameter_list, - STATE(1056), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - ACTIONS(2725), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_COLON, - [38263] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2669), 1, - anon_sym_LBRACK, - ACTIONS(2671), 1, - anon_sym_EQ, - ACTIONS(2675), 1, - anon_sym_SEMI, - STATE(1032), 1, - sym_parameter_list, - STATE(1199), 1, - aux_sym_declaration_repeat1, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [38295] = 10, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2669), 1, - anon_sym_LBRACK, - ACTIONS(2671), 1, - anon_sym_EQ, - ACTIONS(2677), 1, - anon_sym_SEMI, - STATE(1032), 1, - sym_parameter_list, - STATE(1187), 1, - aux_sym_declaration_repeat1, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [38327] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2691), 1, - anon_sym_LBRACK, - STATE(1091), 1, - sym_parameter_list, - STATE(1056), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - ACTIONS(2727), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_COLON, - [38353] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2691), 1, - anon_sym_LBRACK, - STATE(1091), 1, - sym_parameter_list, - STATE(1056), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - ACTIONS(2729), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_COLON, - [38379] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2733), 1, - anon_sym_LBRACK, - ACTIONS(2731), 9, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym___attribute__, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_EQ, - anon_sym_COLON, - [38397] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2737), 1, - anon_sym_LBRACK, - ACTIONS(2735), 9, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym___attribute__, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_EQ, - anon_sym_COLON, - [38415] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2741), 1, - anon_sym_LBRACK, - ACTIONS(2739), 9, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym___attribute__, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_EQ, - anon_sym_COLON, - [38433] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2691), 1, - anon_sym_LBRACK, - STATE(1091), 1, - sym_parameter_list, - STATE(1056), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - ACTIONS(2743), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_COLON, - [38459] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2669), 1, - anon_sym_LBRACK, - ACTIONS(2671), 1, - anon_sym_EQ, - STATE(1032), 1, - sym_parameter_list, - ACTIONS(2745), 2, - anon_sym_COMMA, - anon_sym_SEMI, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [38486] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2747), 1, - anon_sym_COMMA, - ACTIONS(2749), 1, - anon_sym_SEMI, - ACTIONS(2751), 1, - anon_sym_LBRACK, - STATE(1103), 1, - sym_parameter_list, - STATE(1152), 1, - aux_sym_type_definition_repeat2, - STATE(1079), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [38515] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2747), 1, - anon_sym_COMMA, - ACTIONS(2751), 1, - anon_sym_LBRACK, - ACTIONS(2753), 1, - anon_sym_SEMI, - STATE(1103), 1, - sym_parameter_list, - STATE(1157), 1, - aux_sym_type_definition_repeat2, - STATE(1079), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [38544] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2757), 1, - anon_sym_LBRACK, - STATE(1025), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - ACTIONS(2755), 5, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_COLON, - [38565] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2747), 1, - anon_sym_COMMA, - ACTIONS(2751), 1, - anon_sym_LBRACK, - ACTIONS(2759), 1, - anon_sym_SEMI, - STATE(1103), 1, - sym_parameter_list, - STATE(1201), 1, - aux_sym_type_definition_repeat2, - STATE(1079), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [38594] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2747), 1, - anon_sym_COMMA, - ACTIONS(2751), 1, - anon_sym_LBRACK, - ACTIONS(2761), 1, - anon_sym_SEMI, - STATE(1103), 1, - sym_parameter_list, - STATE(1155), 1, - aux_sym_type_definition_repeat2, - STATE(1079), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [38623] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2751), 1, - anon_sym_LBRACK, - STATE(1103), 1, - sym_parameter_list, - STATE(1079), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - ACTIONS(2763), 3, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - [38648] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2747), 1, - anon_sym_COMMA, - ACTIONS(2751), 1, - anon_sym_LBRACK, - ACTIONS(2765), 1, - anon_sym_SEMI, - STATE(1103), 1, - sym_parameter_list, - STATE(1173), 1, - aux_sym_type_definition_repeat2, - STATE(1079), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [38677] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2751), 1, - anon_sym_LBRACK, - STATE(1103), 1, - sym_parameter_list, - STATE(1079), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - ACTIONS(2767), 3, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - [38702] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2769), 1, - sym_identifier, - ACTIONS(2773), 1, - sym_system_lib_string, - STATE(1320), 2, - sym_preproc_call_expression, - sym_string_literal, - ACTIONS(2771), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - [38723] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2775), 1, - sym_identifier, - ACTIONS(2777), 1, - sym_system_lib_string, - STATE(1319), 2, - sym_preproc_call_expression, - sym_string_literal, - ACTIONS(2771), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - [38744] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2779), 1, - sym_identifier, - ACTIONS(2781), 1, - sym_system_lib_string, - STATE(1448), 2, - sym_preproc_call_expression, - sym_string_literal, - ACTIONS(2771), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - [38765] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2747), 1, - anon_sym_COMMA, - ACTIONS(2751), 1, - anon_sym_LBRACK, - ACTIONS(2783), 1, - anon_sym_SEMI, - STATE(1103), 1, - sym_parameter_list, - STATE(1154), 1, - aux_sym_type_definition_repeat2, - STATE(1079), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [38794] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2747), 1, - anon_sym_COMMA, - ACTIONS(2751), 1, - anon_sym_LBRACK, - ACTIONS(2785), 1, - anon_sym_SEMI, - STATE(1103), 1, - sym_parameter_list, - STATE(1193), 1, - aux_sym_type_definition_repeat2, - STATE(1079), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [38823] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2751), 1, - anon_sym_LBRACK, - STATE(1103), 1, - sym_parameter_list, - STATE(1079), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - ACTIONS(2787), 3, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - [38848] = 9, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2747), 1, - anon_sym_COMMA, - ACTIONS(2751), 1, - anon_sym_LBRACK, - ACTIONS(2789), 1, - anon_sym_SEMI, - STATE(1103), 1, - sym_parameter_list, - STATE(1198), 1, - aux_sym_type_definition_repeat2, - STATE(1079), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [38877] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2691), 1, - anon_sym_LBRACK, - STATE(1091), 1, - sym_parameter_list, - STATE(1056), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - ACTIONS(2791), 3, - anon_sym_COMMA, - anon_sym_SEMI, - anon_sym_COLON, - [38902] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2751), 1, - anon_sym_LBRACK, - STATE(1103), 1, - sym_parameter_list, - STATE(1079), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - ACTIONS(2793), 3, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - [38927] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2795), 1, - sym_identifier, - ACTIONS(2797), 1, - sym_system_lib_string, - STATE(1437), 2, - sym_preproc_call_expression, - sym_string_literal, - ACTIONS(2771), 5, - anon_sym_L_DQUOTE, - anon_sym_u_DQUOTE, - anon_sym_U_DQUOTE, - anon_sym_u8_DQUOTE, - anon_sym_DQUOTE, - [38948] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2751), 1, - anon_sym_LBRACK, - STATE(1103), 1, - sym_parameter_list, - ACTIONS(2799), 2, - anon_sym_COMMA, - anon_sym_SEMI, - STATE(1079), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [38972] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2803), 1, - anon_sym_LBRACK, - ACTIONS(2801), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_EQ, - [38988] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(115), 1, - anon_sym_LBRACE, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2669), 1, - anon_sym_LBRACK, - STATE(110), 1, - sym_compound_statement, - STATE(1032), 1, - sym_parameter_list, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [39014] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2807), 1, - anon_sym_LBRACK, - ACTIONS(2805), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_EQ, - [39030] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(511), 1, - anon_sym_LBRACE, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2669), 1, - anon_sym_LBRACK, - STATE(357), 1, - sym_compound_statement, - STATE(1032), 1, - sym_parameter_list, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [39056] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2811), 1, - anon_sym_LBRACK, - ACTIONS(2809), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_EQ, - [39072] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2815), 1, - anon_sym_LBRACK, - ACTIONS(2813), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_EQ, - [39088] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2819), 1, - anon_sym_LBRACK, - STATE(1025), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - ACTIONS(2817), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - [39108] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(41), 1, - anon_sym_LBRACE, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2669), 1, - anon_sym_LBRACK, - STATE(350), 1, - sym_compound_statement, - STATE(1032), 1, - sym_parameter_list, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [39134] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(319), 1, - anon_sym_LBRACE, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2669), 1, - anon_sym_LBRACK, - STATE(332), 1, - sym_compound_statement, - STATE(1032), 1, - sym_parameter_list, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [39160] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2669), 1, - anon_sym_LBRACK, - STATE(1032), 1, - sym_parameter_list, - ACTIONS(2821), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [39184] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2825), 1, - anon_sym_LBRACK, - ACTIONS(2823), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_EQ, - [39200] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2829), 1, - anon_sym_LBRACK, - ACTIONS(2827), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_LBRACE, - anon_sym_EQ, - [39216] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2833), 1, - anon_sym_LBRACK, - ACTIONS(2831), 6, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - [39231] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2837), 1, - anon_sym_LBRACK, - ACTIONS(2835), 6, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - [39246] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2841), 1, - anon_sym_LBRACK, - ACTIONS(2839), 6, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - [39261] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2751), 1, - anon_sym_LBRACK, - ACTIONS(2843), 1, - anon_sym_RPAREN, - STATE(1103), 1, - sym_parameter_list, - STATE(1079), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [39284] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2847), 1, - anon_sym_LBRACK, - ACTIONS(2845), 6, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - [39299] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2691), 1, - anon_sym_LBRACK, - ACTIONS(2849), 1, - anon_sym_RPAREN, - STATE(1091), 1, - sym_parameter_list, - STATE(1056), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [39322] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2853), 1, - anon_sym_LBRACK, - ACTIONS(2851), 6, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - [39337] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2857), 1, - anon_sym_LBRACK, - ACTIONS(2855), 6, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - [39352] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2861), 1, - anon_sym_LBRACK, - ACTIONS(2859), 6, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - [39367] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2865), 1, - anon_sym_LBRACK, - ACTIONS(2863), 6, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - anon_sym_COLON, - [39382] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK_LBRACK, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2669), 1, - anon_sym_LBRACK, - ACTIONS(2867), 1, - anon_sym_RPAREN, - STATE(1032), 1, - sym_parameter_list, - STATE(1043), 2, - sym_attribute_declaration, - aux_sym_attributed_declarator_repeat1, - [39405] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2871), 1, - anon_sym_LBRACK, - ACTIONS(2869), 5, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - [39419] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2875), 1, - anon_sym_LBRACK, - ACTIONS(2873), 5, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - [39433] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2879), 1, - anon_sym_LBRACK, - ACTIONS(2877), 5, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - [39447] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2881), 1, - anon_sym_LBRACK, - ACTIONS(2884), 1, - anon_sym_EQ, - ACTIONS(2886), 1, - anon_sym_DOT, - STATE(1099), 3, - sym_subscript_designator, - sym_field_designator, - aux_sym_initializer_pair_repeat1, - [39465] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2891), 1, - anon_sym_LBRACK, - ACTIONS(2889), 5, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - [39479] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2895), 1, - anon_sym_LBRACK, - ACTIONS(2893), 5, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - [39493] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2899), 1, - anon_sym_LBRACK, - ACTIONS(2897), 5, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - [39507] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2903), 1, - anon_sym_LBRACK, - ACTIONS(2901), 5, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - [39521] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2907), 1, - anon_sym_LBRACK, - ACTIONS(2905), 5, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_SEMI, - anon_sym_LBRACK_LBRACK, - [39535] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1471), 1, - anon_sym_LBRACK, - ACTIONS(2909), 1, - anon_sym_EQ, - ACTIONS(2911), 1, - anon_sym_DOT, - STATE(1099), 3, - sym_subscript_designator, - sym_field_designator, - aux_sym_initializer_pair_repeat1, - [39553] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2649), 1, - anon_sym_COLON, - ACTIONS(2687), 1, - anon_sym_COMMA, - ACTIONS(2913), 1, - anon_sym_SEMI, - STATE(1136), 1, - aux_sym_field_declaration_repeat1, - STATE(1334), 1, - sym_bitfield_clause, - [39572] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2917), 1, - anon_sym_LBRACK, - STATE(1128), 1, - sym_parameter_list, - ACTIONS(2915), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [39589] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2917), 1, - anon_sym_LBRACK, - STATE(1128), 1, - sym_parameter_list, - ACTIONS(2919), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [39606] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2649), 1, - anon_sym_COLON, - ACTIONS(2687), 1, - anon_sym_COMMA, - ACTIONS(2921), 1, - anon_sym_SEMI, - STATE(1136), 1, - aux_sym_field_declaration_repeat1, - STATE(1376), 1, - sym_bitfield_clause, - [39625] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - ACTIONS(2925), 1, - anon_sym_COLON_COLON, - STATE(1228), 1, - sym_argument_list, - ACTIONS(2923), 2, - anon_sym_COMMA, - anon_sym_RBRACK_RBRACK, - [39642] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2649), 1, - anon_sym_COLON, - ACTIONS(2687), 1, - anon_sym_COMMA, - ACTIONS(2927), 1, - anon_sym_SEMI, - STATE(1136), 1, - aux_sym_field_declaration_repeat1, - STATE(1350), 1, - sym_bitfield_clause, - [39661] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(2283), 1, - anon_sym_LBRACE, - ACTIONS(2929), 1, - sym_identifier, - STATE(875), 1, - sym_field_declaration_list, - STATE(1175), 1, - sym_ms_declspec_modifier, - [39680] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2917), 1, - anon_sym_LBRACK, - STATE(1128), 1, - sym_parameter_list, - ACTIONS(2821), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [39697] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(37), 1, - anon_sym___declspec, - ACTIONS(2283), 1, - anon_sym_LBRACE, - ACTIONS(2931), 1, - sym_identifier, - STATE(873), 1, - sym_field_declaration_list, - STATE(1174), 1, - sym_ms_declspec_modifier, - [39716] = 5, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2933), 1, - anon_sym_LF, - ACTIONS(2935), 1, - anon_sym_LPAREN, - ACTIONS(2937), 1, - sym_preproc_arg, - STATE(1261), 1, - sym_preproc_params, - [39732] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2939), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_LBRACK, - [39742] = 5, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2935), 1, - anon_sym_LPAREN, - ACTIONS(2941), 1, - anon_sym_LF, - ACTIONS(2943), 1, - sym_preproc_arg, - STATE(1254), 1, - sym_preproc_params, - [39758] = 5, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2945), 1, - anon_sym_DQUOTE, - ACTIONS(2947), 1, - aux_sym_string_literal_token1, - ACTIONS(2949), 1, - sym_escape_sequence, - STATE(1140), 1, - aux_sym_string_literal_repeat1, - [39774] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2951), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_LBRACK, - [39784] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2953), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_LBRACK, - [39794] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2955), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_LBRACK, - [39804] = 5, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2957), 1, - anon_sym_DQUOTE, - ACTIONS(2959), 1, - aux_sym_string_literal_token1, - ACTIONS(2961), 1, - sym_escape_sequence, - STATE(1145), 1, - aux_sym_string_literal_repeat1, - [39820] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2917), 1, - anon_sym_LBRACK, - ACTIONS(2963), 1, - anon_sym_RPAREN, - STATE(1128), 1, - sym_parameter_list, - [39836] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2965), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_LBRACK, - [39846] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - STATE(1263), 1, - sym_argument_list, - ACTIONS(2967), 2, - anon_sym_COMMA, - anon_sym_RBRACK_RBRACK, - [39860] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2917), 1, - anon_sym_LBRACK, - ACTIONS(2969), 1, - anon_sym_RPAREN, - STATE(1128), 1, - sym_parameter_list, - [39876] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2917), 1, - anon_sym_LBRACK, - ACTIONS(2971), 1, - anon_sym_RPAREN, - STATE(1128), 1, - sym_parameter_list, - [39892] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2973), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_LBRACK, - [39902] = 5, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2935), 1, - anon_sym_LPAREN, - ACTIONS(2975), 1, - anon_sym_LF, - ACTIONS(2977), 1, - sym_preproc_arg, - STATE(1215), 1, - sym_preproc_params, - [39918] = 5, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2935), 1, - anon_sym_LPAREN, - ACTIONS(2979), 1, - anon_sym_LF, - ACTIONS(2981), 1, - sym_preproc_arg, - STATE(1251), 1, - sym_preproc_params, - [39934] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2983), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_LBRACK, - [39944] = 5, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2935), 1, - anon_sym_LPAREN, - ACTIONS(2985), 1, - anon_sym_LF, - ACTIONS(2987), 1, - sym_preproc_arg, - STATE(1250), 1, - sym_preproc_params, - [39960] = 5, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2989), 1, - anon_sym_DQUOTE, - ACTIONS(2991), 1, - aux_sym_string_literal_token1, - ACTIONS(2993), 1, - sym_escape_sequence, - STATE(1118), 1, - aux_sym_string_literal_repeat1, - [39976] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2995), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_LBRACK, - [39986] = 5, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2935), 1, - anon_sym_LPAREN, - ACTIONS(2997), 1, - anon_sym_LF, - ACTIONS(2999), 1, - sym_preproc_arg, - STATE(1243), 1, - sym_preproc_params, - [40002] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3001), 1, - anon_sym_COMMA, - STATE(1136), 1, - aux_sym_field_declaration_repeat1, - ACTIONS(3004), 2, - anon_sym_SEMI, - anon_sym_COLON, - [40016] = 5, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2947), 1, - aux_sym_string_literal_token1, - ACTIONS(2949), 1, - sym_escape_sequence, - ACTIONS(3006), 1, - anon_sym_DQUOTE, - STATE(1140), 1, - aux_sym_string_literal_repeat1, - [40032] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3008), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_LBRACK, - [40042] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2917), 1, - anon_sym_LBRACK, - ACTIONS(3010), 1, - anon_sym_RPAREN, - STATE(1128), 1, - sym_parameter_list, - [40058] = 5, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3012), 1, - anon_sym_DQUOTE, - ACTIONS(3014), 1, - aux_sym_string_literal_token1, - ACTIONS(3017), 1, - sym_escape_sequence, - STATE(1140), 1, - aux_sym_string_literal_repeat1, - [40074] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3020), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_LBRACK, - [40084] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3022), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_LBRACK, - [40094] = 5, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3024), 1, - anon_sym_DQUOTE, - ACTIONS(3026), 1, - aux_sym_string_literal_token1, - ACTIONS(3028), 1, - sym_escape_sequence, - STATE(1137), 1, - aux_sym_string_literal_repeat1, - [40110] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2665), 1, - anon_sym_LPAREN2, - ACTIONS(2917), 1, - anon_sym_LBRACK, - ACTIONS(3030), 1, - anon_sym_RPAREN, - STATE(1128), 1, - sym_parameter_list, - [40126] = 5, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2947), 1, - aux_sym_string_literal_token1, - ACTIONS(2949), 1, - sym_escape_sequence, - ACTIONS(3032), 1, - anon_sym_DQUOTE, - STATE(1140), 1, - aux_sym_string_literal_repeat1, - [40142] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3034), 1, - sym_identifier, - ACTIONS(3036), 1, - anon_sym_COMMA, - ACTIONS(3038), 1, - anon_sym_RBRACE, - STATE(1202), 1, - sym_enumerator, - [40158] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3040), 4, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_LPAREN2, - anon_sym_LBRACK, - [40168] = 5, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(2935), 1, - anon_sym_LPAREN, - ACTIONS(3042), 1, - anon_sym_LF, - ACTIONS(3044), 1, - sym_preproc_arg, - STATE(1231), 1, - sym_preproc_params, - [40184] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2055), 1, - anon_sym_COMMA, - ACTIONS(2057), 1, - anon_sym_RBRACE, - STATE(1167), 1, - aux_sym_initializer_list_repeat1, - [40197] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3046), 1, - anon_sym_COMMA, - ACTIONS(3048), 1, - anon_sym_RPAREN, - STATE(1158), 1, - aux_sym_parameter_list_repeat1, - [40210] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3050), 1, - anon_sym_COMMA, - ACTIONS(3052), 1, - anon_sym_RBRACK_RBRACK, - STATE(1203), 1, - aux_sym_attribute_declaration_repeat1, - [40223] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2747), 1, - anon_sym_COMMA, - ACTIONS(3054), 1, - anon_sym_SEMI, - STATE(1153), 1, - aux_sym_type_definition_repeat2, - [40236] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3056), 1, - anon_sym_COMMA, - ACTIONS(3059), 1, - anon_sym_SEMI, - STATE(1153), 1, - aux_sym_type_definition_repeat2, - [40249] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2747), 1, - anon_sym_COMMA, - ACTIONS(3061), 1, - anon_sym_SEMI, - STATE(1153), 1, - aux_sym_type_definition_repeat2, - [40262] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2747), 1, - anon_sym_COMMA, - ACTIONS(3063), 1, - anon_sym_SEMI, - STATE(1153), 1, - aux_sym_type_definition_repeat2, - [40275] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2289), 1, - anon_sym_LBRACE, - ACTIONS(3065), 1, - sym_identifier, - STATE(869), 1, - sym_enumerator_list, - [40288] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2747), 1, - anon_sym_COMMA, - ACTIONS(3067), 1, - anon_sym_SEMI, - STATE(1153), 1, - aux_sym_type_definition_repeat2, - [40301] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3046), 1, - anon_sym_COMMA, - ACTIONS(3069), 1, - anon_sym_RPAREN, - STATE(1197), 1, - aux_sym_parameter_list_repeat1, - [40314] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(3071), 1, - anon_sym_SEMI, - STATE(1191), 1, - aux_sym_declaration_repeat1, - [40327] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(3073), 1, - anon_sym_SEMI, - STATE(1191), 1, - aux_sym_declaration_repeat1, - [40340] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3034), 1, - sym_identifier, - ACTIONS(3075), 1, - anon_sym_RBRACE, - STATE(1260), 1, - sym_enumerator, - [40353] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3077), 1, - anon_sym_COMMA, - ACTIONS(3080), 1, - anon_sym_RBRACE, - STATE(1162), 1, - aux_sym_enumerator_list_repeat1, - [40366] = 4, - ACTIONS(2395), 1, - anon_sym_LPAREN2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3082), 1, - anon_sym_LF, - STATE(962), 1, - sym_preproc_argument_list, - [40379] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1985), 1, - anon_sym_COMMA, - ACTIONS(3084), 1, - anon_sym_RPAREN, - STATE(1178), 1, - aux_sym_argument_list_repeat1, - [40392] = 4, - ACTIONS(2395), 1, - anon_sym_LPAREN2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3086), 1, - anon_sym_LF, - STATE(962), 1, - sym_preproc_argument_list, - [40405] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2321), 1, - anon_sym_COMMA, - ACTIONS(3088), 1, - anon_sym_RPAREN, - STATE(1179), 1, - aux_sym_preproc_argument_list_repeat1, - [40418] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1522), 1, - anon_sym_RBRACE, - ACTIONS(3090), 1, - anon_sym_COMMA, - STATE(1182), 1, - aux_sym_initializer_list_repeat1, - [40431] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3050), 1, - anon_sym_COMMA, - ACTIONS(3092), 1, - anon_sym_RBRACK_RBRACK, - STATE(1183), 1, - aux_sym_attribute_declaration_repeat1, - [40444] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(3094), 1, - anon_sym_SEMI, - STATE(1204), 1, - aux_sym_declaration_repeat1, - [40457] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(3096), 1, - anon_sym_SEMI, - STATE(1159), 1, - aux_sym_declaration_repeat1, - [40470] = 4, - ACTIONS(2395), 1, - anon_sym_LPAREN2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3098), 1, - anon_sym_LF, - STATE(962), 1, - sym_preproc_argument_list, - [40483] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3050), 1, - anon_sym_COMMA, - ACTIONS(3100), 1, - anon_sym_RBRACK_RBRACK, - STATE(1196), 1, - aux_sym_attribute_declaration_repeat1, - [40496] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2747), 1, - anon_sym_COMMA, - ACTIONS(3102), 1, - anon_sym_SEMI, - STATE(1153), 1, - aux_sym_type_definition_repeat2, - [40509] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2283), 1, - anon_sym_LBRACE, - ACTIONS(3104), 1, - sym_identifier, - STATE(864), 1, - sym_field_declaration_list, - [40522] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2283), 1, - anon_sym_LBRACE, - ACTIONS(3106), 1, - sym_identifier, - STATE(883), 1, - sym_field_declaration_list, - [40535] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(3108), 1, - anon_sym_SEMI, - STATE(1188), 1, - aux_sym_declaration_repeat1, - [40548] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3110), 1, - anon_sym_COMMA, - ACTIONS(3112), 1, - anon_sym_RPAREN, - STATE(1189), 1, - aux_sym_preproc_params_repeat1, - [40561] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2125), 1, - anon_sym_RPAREN, - ACTIONS(3114), 1, - anon_sym_COMMA, - STATE(1178), 1, - aux_sym_argument_list_repeat1, - [40574] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2499), 1, - anon_sym_RPAREN, - ACTIONS(3117), 1, - anon_sym_COMMA, - STATE(1179), 1, - aux_sym_preproc_argument_list_repeat1, - [40587] = 4, - ACTIONS(2395), 1, - anon_sym_LPAREN2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3120), 1, - anon_sym_LF, - STATE(962), 1, - sym_preproc_argument_list, - [40600] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2321), 1, - anon_sym_COMMA, - ACTIONS(3122), 1, - anon_sym_RPAREN, - STATE(1179), 1, - aux_sym_preproc_argument_list_repeat1, - [40613] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2183), 1, - anon_sym_RBRACE, - ACTIONS(3124), 1, - anon_sym_COMMA, - STATE(1182), 1, - aux_sym_initializer_list_repeat1, - [40626] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3050), 1, - anon_sym_COMMA, - ACTIONS(3127), 1, - anon_sym_RBRACK_RBRACK, - STATE(1195), 1, - aux_sym_attribute_declaration_repeat1, - [40639] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1985), 1, - anon_sym_COMMA, - ACTIONS(3129), 1, - anon_sym_RPAREN, - STATE(1178), 1, - aux_sym_argument_list_repeat1, - [40652] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3131), 3, - anon_sym_LBRACK, - anon_sym_EQ, - anon_sym_DOT, - [40661] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(3133), 1, - anon_sym_SEMI, - STATE(1205), 1, - aux_sym_declaration_repeat1, - [40674] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(3135), 1, - anon_sym_SEMI, - STATE(1191), 1, - aux_sym_declaration_repeat1, - [40687] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(3137), 1, - anon_sym_SEMI, - STATE(1191), 1, - aux_sym_declaration_repeat1, - [40700] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3139), 1, - anon_sym_COMMA, - ACTIONS(3142), 1, - anon_sym_RPAREN, - STATE(1189), 1, - aux_sym_preproc_params_repeat1, - [40713] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3146), 1, - anon_sym_RPAREN, - ACTIONS(3144), 2, - anon_sym_DOT_DOT_DOT, - sym_identifier, - [40724] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3148), 1, - anon_sym_COMMA, - ACTIONS(3151), 1, - anon_sym_SEMI, - STATE(1191), 1, - aux_sym_declaration_repeat1, - [40737] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3153), 1, - anon_sym_COMMA, - ACTIONS(3155), 1, - anon_sym_RBRACE, - STATE(1162), 1, - aux_sym_enumerator_list_repeat1, - [40750] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2747), 1, - anon_sym_COMMA, - ACTIONS(3157), 1, - anon_sym_SEMI, - STATE(1153), 1, - aux_sym_type_definition_repeat2, - [40763] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3034), 1, - sym_identifier, - ACTIONS(3155), 1, - anon_sym_RBRACE, - STATE(1260), 1, - sym_enumerator, - [40776] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3159), 1, - anon_sym_COMMA, - ACTIONS(3162), 1, - anon_sym_RBRACK_RBRACK, - STATE(1195), 1, - aux_sym_attribute_declaration_repeat1, - [40789] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3050), 1, - anon_sym_COMMA, - ACTIONS(3164), 1, - anon_sym_RBRACK_RBRACK, - STATE(1195), 1, - aux_sym_attribute_declaration_repeat1, - [40802] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3166), 1, - anon_sym_COMMA, - ACTIONS(3169), 1, - anon_sym_RPAREN, - STATE(1197), 1, - aux_sym_parameter_list_repeat1, - [40815] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2747), 1, - anon_sym_COMMA, - ACTIONS(3171), 1, - anon_sym_SEMI, - STATE(1153), 1, - aux_sym_type_definition_repeat2, - [40828] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(3173), 1, - anon_sym_SEMI, - STATE(1191), 1, - aux_sym_declaration_repeat1, - [40841] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3177), 1, - anon_sym_EQ, - ACTIONS(3175), 2, - anon_sym_COMMA, - anon_sym_RBRACE, - [40852] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2747), 1, - anon_sym_COMMA, - ACTIONS(3179), 1, - anon_sym_SEMI, - STATE(1153), 1, - aux_sym_type_definition_repeat2, - [40865] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3181), 1, - anon_sym_COMMA, - ACTIONS(3183), 1, - anon_sym_RBRACE, - STATE(1192), 1, - aux_sym_enumerator_list_repeat1, - [40878] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3050), 1, - anon_sym_COMMA, - ACTIONS(3185), 1, - anon_sym_RBRACK_RBRACK, - STATE(1195), 1, - aux_sym_attribute_declaration_repeat1, - [40891] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(3187), 1, - anon_sym_SEMI, - STATE(1191), 1, - aux_sym_declaration_repeat1, - [40904] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(3189), 1, - anon_sym_SEMI, - STATE(1191), 1, - aux_sym_declaration_repeat1, - [40917] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2663), 1, - anon_sym_COMMA, - ACTIONS(3191), 1, - anon_sym_SEMI, - STATE(1191), 1, - aux_sym_declaration_repeat1, - [40930] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3193), 3, - anon_sym_LBRACK, - anon_sym_EQ, - anon_sym_DOT, - [40939] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3110), 1, - anon_sym_COMMA, - ACTIONS(3195), 1, - anon_sym_RPAREN, - STATE(1177), 1, - aux_sym_preproc_params_repeat1, - [40952] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3197), 2, - anon_sym_LF, - sym_preproc_arg, - [40960] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3199), 1, - anon_sym_LPAREN2, - STATE(1368), 1, - sym_parenthesized_expression, - [40970] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3201), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [40978] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3203), 1, - anon_sym_LF, - ACTIONS(3205), 1, - sym_preproc_arg, - [40988] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3207), 2, - anon_sym_LF, - sym_preproc_arg, - [40996] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3034), 1, - sym_identifier, - STATE(1260), 1, - sym_enumerator, - [41006] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3209), 1, - anon_sym_LF, - ACTIONS(3211), 1, - sym_preproc_arg, - [41016] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3199), 1, - anon_sym_LPAREN2, - STATE(1276), 1, - sym_parenthesized_expression, - [41026] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2053), 2, - anon_sym_RPAREN, - anon_sym_SEMI, - [41034] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3199), 1, - anon_sym_LPAREN2, - STATE(1326), 1, - sym_parenthesized_expression, - [41044] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3213), 1, - sym_identifier, - STATE(1168), 1, - sym_attribute, - [41054] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3162), 2, - anon_sym_COMMA, - anon_sym_RBRACK_RBRACK, - [41062] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3199), 1, - anon_sym_LPAREN2, - STATE(1252), 1, - sym_parenthesized_expression, - [41072] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3215), 2, - aux_sym_char_literal_token1, - sym_escape_sequence, - [41080] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3217), 1, - anon_sym_LF, - ACTIONS(3219), 1, - sym_preproc_arg, - [41090] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3169), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [41098] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3221), 1, - anon_sym_LPAREN2, - STATE(151), 1, - sym_parenthesized_expression, - [41108] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3213), 1, - sym_identifier, - STATE(1220), 1, - sym_attribute, - [41118] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3221), 1, - anon_sym_LPAREN2, - STATE(149), 1, - sym_parenthesized_expression, - [41128] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3223), 2, - anon_sym_COMMA, - anon_sym_RBRACK_RBRACK, - [41136] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2135), 2, - anon_sym_COMMA, - anon_sym_SEMI, - [41144] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3199), 1, - anon_sym_LPAREN2, - STATE(1379), 1, - sym_parenthesized_expression, - [41154] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3225), 1, - anon_sym_LF, - ACTIONS(3227), 1, - sym_preproc_arg, - [41164] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2745), 2, - anon_sym_COMMA, - anon_sym_SEMI, - [41172] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3142), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [41180] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3199), 1, - anon_sym_LPAREN2, - STATE(1242), 1, - sym_parenthesized_expression, - [41190] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2183), 2, - anon_sym_COMMA, - anon_sym_RBRACE, - [41198] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2161), 2, - anon_sym_COMMA, - anon_sym_RBRACE, - [41206] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3229), 2, - anon_sym_DOT_DOT_DOT, - sym_identifier, - [41214] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - STATE(1362), 1, - sym_argument_list, - [41224] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3231), 2, - anon_sym_LF, - sym_preproc_arg, - [41232] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(319), 1, - anon_sym_LBRACE, - STATE(301), 1, - sym_compound_statement, - [41242] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3233), 2, - aux_sym_char_literal_token1, - sym_escape_sequence, - [41250] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(511), 1, - anon_sym_LBRACE, - STATE(133), 1, - sym_compound_statement, - [41260] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3235), 1, - anon_sym_LF, - ACTIONS(3237), 1, - sym_preproc_arg, - [41270] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3199), 1, - anon_sym_LPAREN2, - STATE(1240), 1, - sym_parenthesized_expression, - [41280] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(41), 1, - anon_sym_LBRACE, - STATE(229), 1, - sym_compound_statement, - [41290] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3213), 1, - sym_identifier, - STATE(1151), 1, - sym_attribute, - [41300] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3239), 1, - anon_sym_LF, - ACTIONS(3241), 1, - sym_preproc_arg, - [41310] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3243), 1, - sym_identifier, - ACTIONS(3245), 1, - anon_sym_LPAREN2, - [41320] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(1759), 1, - anon_sym_LPAREN2, - STATE(1384), 1, - sym_argument_list, - [41330] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3247), 1, - anon_sym_LF, - ACTIONS(3249), 1, - sym_preproc_arg, - [41340] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3251), 1, - anon_sym_LF, - ACTIONS(3253), 1, - sym_preproc_arg, - [41350] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(115), 1, - anon_sym_LBRACE, - STATE(72), 1, - sym_compound_statement, - [41360] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3255), 1, - anon_sym_LF, - ACTIONS(3257), 1, - sym_preproc_arg, - [41370] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3259), 1, - anon_sym_LF, - ACTIONS(3261), 1, - sym_preproc_arg, - [41380] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3263), 1, - anon_sym_LF, - ACTIONS(3265), 1, - sym_preproc_arg, - [41390] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3267), 1, - sym_identifier, - ACTIONS(3269), 1, - anon_sym_LPAREN2, - [41400] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3271), 2, - aux_sym_char_literal_token1, - sym_escape_sequence, - [41408] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3221), 1, - anon_sym_LPAREN2, - STATE(160), 1, - sym_parenthesized_expression, - [41418] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3199), 1, - anon_sym_LPAREN2, - STATE(1245), 1, - sym_parenthesized_expression, - [41428] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3080), 2, - anon_sym_COMMA, - anon_sym_RBRACE, - [41436] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3273), 1, - anon_sym_LF, - ACTIONS(3275), 1, - sym_preproc_arg, - [41446] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3277), 1, - anon_sym_LF, - ACTIONS(3279), 1, - sym_preproc_arg, - [41456] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3281), 2, - anon_sym_COMMA, - anon_sym_RBRACK_RBRACK, - [41464] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3221), 1, - anon_sym_LPAREN2, - STATE(258), 1, - sym_parenthesized_expression, - [41474] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3221), 1, - anon_sym_LPAREN2, - STATE(166), 1, - sym_parenthesized_expression, - [41484] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3221), 1, - anon_sym_LPAREN2, - STATE(260), 1, - sym_parenthesized_expression, - [41494] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3221), 1, - anon_sym_LPAREN2, - STATE(240), 1, - sym_parenthesized_expression, - [41504] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3213), 1, - sym_identifier, - STATE(1172), 1, - sym_attribute, - [41514] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3221), 1, - anon_sym_LPAREN2, - STATE(243), 1, - sym_parenthesized_expression, - [41524] = 3, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3283), 1, - anon_sym_LF, - ACTIONS(3285), 1, - sym_preproc_arg, - [41534] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3287), 1, - sym_identifier, - [41541] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3289), 1, - anon_sym_SEMI, - [41548] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2085), 1, - anon_sym_RPAREN, - [41555] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3291), 1, - aux_sym_preproc_if_token2, - [41562] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2061), 1, - anon_sym_RPAREN, - [41569] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3293), 1, - anon_sym_SEMI, - [41576] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2071), 1, - anon_sym_RPAREN, - [41583] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3295), 1, - sym_identifier, - [41590] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2057), 1, - anon_sym_RBRACE, - [41597] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2067), 1, - anon_sym_SEMI, - [41604] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2117), 1, - anon_sym_RPAREN, - [41611] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3297), 1, - anon_sym_SEMI, - [41618] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2129), 1, - anon_sym_RPAREN, - [41625] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2065), 1, - anon_sym_RPAREN, - [41632] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2145), 1, - anon_sym_RPAREN, - [41639] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3299), 1, - anon_sym_SQUOTE, - [41646] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3301), 1, - aux_sym_preproc_if_token2, - [41653] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2149), 1, - anon_sym_RPAREN, - [41660] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3303), 1, - aux_sym_preproc_if_token2, - [41667] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3305), 1, - aux_sym_preproc_if_token2, - [41674] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3307), 1, - anon_sym_LF, - [41681] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3309), 1, - anon_sym_LF, - [41688] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3311), 1, - aux_sym_preproc_if_token2, - [41695] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3313), 1, - anon_sym_LF, - [41702] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3315), 1, - anon_sym_LF, - [41709] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2177), 1, - anon_sym_RPAREN, - [41716] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3317), 1, - anon_sym_LF, - [41723] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3319), 1, - anon_sym_LF, - [41730] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3321), 1, - aux_sym_preproc_if_token2, - [41737] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3323), 1, - anon_sym_LF, - [41744] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3325), 1, - anon_sym_LF, - [41751] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3327), 1, - aux_sym_preproc_if_token2, - [41758] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3329), 1, - anon_sym_LF, - [41765] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3331), 1, - anon_sym_LF, - [41772] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3333), 1, - anon_sym_SEMI, - [41779] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3335), 1, - anon_sym_LF, - [41786] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2123), 1, - anon_sym_RPAREN, - [41793] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3337), 1, - anon_sym_LF, - [41800] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3339), 1, - sym_identifier, - [41807] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3341), 1, - anon_sym_LF, - [41814] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3343), 1, - aux_sym_preproc_if_token2, - [41821] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3345), 1, - anon_sym_SEMI, - [41828] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2115), 1, - anon_sym_SEMI, - [41835] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2143), 1, - anon_sym_RPAREN, - [41842] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3347), 1, - sym_identifier, - [41849] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2147), 1, - anon_sym_RPAREN, - [41856] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2153), 1, - anon_sym_SEMI, - [41863] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3349), 1, - anon_sym_LF, - [41870] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3098), 1, - anon_sym_LF, - [41877] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3120), 1, - anon_sym_LF, - [41884] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2175), 1, - anon_sym_SEMI, - [41891] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3351), 1, - anon_sym_SEMI, - [41898] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2075), 1, - anon_sym_RPAREN, - [41905] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2155), 1, - anon_sym_SEMI, - [41912] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2097), 1, - anon_sym_SEMI, - [41919] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3353), 1, - anon_sym_SEMI, - [41926] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3355), 1, - anon_sym_SEMI, - [41933] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3357), 1, - anon_sym_STAR, - [41940] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3359), 1, - anon_sym_SEMI, - [41947] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3361), 1, - anon_sym_SEMI, - [41954] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3363), 1, - aux_sym_preproc_if_token2, - [41961] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3365), 1, - anon_sym_COLON, - [41968] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2079), 1, - anon_sym_RPAREN, - [41975] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3367), 1, - anon_sym_SEMI, - [41982] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3369), 1, - anon_sym_SEMI, - [41989] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3371), 1, - aux_sym_preproc_if_token2, - [41996] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2095), 1, - anon_sym_SEMI, - [42003] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3373), 1, - aux_sym_preproc_if_token2, - [42010] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3375), 1, - sym_identifier, - [42017] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3377), 1, - aux_sym_preproc_if_token2, - [42024] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2119), 1, - anon_sym_RPAREN, - [42031] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3379), 1, - sym_identifier, - [42038] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3381), 1, - anon_sym_SEMI, - [42045] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3383), 1, - anon_sym_RPAREN, - [42052] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2059), 1, - anon_sym_RPAREN, - [42059] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3385), 1, - anon_sym_RPAREN, - [42066] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2131), 1, - anon_sym_RPAREN, - [42073] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2111), 1, - anon_sym_RPAREN, - [42080] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2077), 1, - anon_sym_SEMI, - [42087] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3387), 1, - anon_sym_SEMI, - [42094] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2105), 1, - anon_sym_SEMI, - [42101] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3389), 1, - aux_sym_preproc_if_token2, - [42108] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3391), 1, - aux_sym_preproc_if_token2, - [42115] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3393), 1, - anon_sym_RPAREN, - [42122] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2169), 1, - anon_sym_SEMI, - [42129] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3395), 1, - anon_sym_LF, - [42136] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3397), 1, - aux_sym_preproc_if_token2, - [42143] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3399), 1, - aux_sym_preproc_if_token2, - [42150] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2141), 1, - anon_sym_RPAREN, - [42157] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2159), 1, - anon_sym_RPAREN, - [42164] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3401), 1, - sym_identifier, - [42171] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3403), 1, - anon_sym_STAR, - [42178] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3405), 1, - aux_sym_preproc_if_token2, - [42185] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3407), 1, - anon_sym_RPAREN, - [42192] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3409), 1, - anon_sym_LF, - [42199] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3411), 1, - anon_sym_RPAREN, - [42206] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2137), 1, - anon_sym_SEMI, - [42213] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3413), 1, - anon_sym_SEMI, - [42220] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3415), 1, - sym_identifier, - [42227] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3417), 1, - aux_sym_preproc_if_token2, - [42234] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3419), 1, - sym_identifier, - [42241] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3421), 1, - sym_identifier, - [42248] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3423), 1, - aux_sym_preproc_if_token2, - [42255] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3183), 1, - anon_sym_RBRACE, - [42262] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3425), 1, - aux_sym_preproc_if_token2, - [42269] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3427), 1, - anon_sym_SEMI, - [42276] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3429), 1, - anon_sym_RPAREN, - [42283] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3431), 1, - sym_identifier, - [42290] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3433), 1, - anon_sym_SEMI, - [42297] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3435), 1, - anon_sym_SEMI, - [42304] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2133), 1, - anon_sym_RPAREN, - [42311] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2093), 1, - anon_sym_RPAREN, - [42318] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3437), 1, - sym_identifier, - [42325] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3439), 1, - anon_sym_RPAREN, - [42332] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2099), 1, - anon_sym_RPAREN, - [42339] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3441), 1, - anon_sym_STAR, - [42346] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3443), 1, - sym_identifier, - [42353] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2063), 1, - anon_sym_RPAREN, - [42360] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3445), 1, - anon_sym_RPAREN, - [42367] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3447), 1, - anon_sym_SEMI, - [42374] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3449), 1, - aux_sym_preproc_if_token2, - [42381] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3451), 1, - aux_sym_preproc_if_token2, - [42388] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2107), 1, - anon_sym_SEMI, - [42395] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3453), 1, - aux_sym_preproc_if_token2, - [42402] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2109), 1, - anon_sym_SEMI, - [42409] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3455), 1, - sym_identifier, - [42416] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3457), 1, - aux_sym_preproc_if_token2, - [42423] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2173), 1, - anon_sym_SEMI, - [42430] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3459), 1, - anon_sym_LF, - [42437] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3461), 1, - sym_identifier, - [42444] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3463), 1, - sym_identifier, - [42451] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3465), 1, - aux_sym_preproc_if_token2, - [42458] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3467), 1, - aux_sym_preproc_if_token2, - [42465] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3469), 1, - sym_identifier, - [42472] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3471), 1, - sym_identifier, - [42479] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3473), 1, - anon_sym_LF, - [42486] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3475), 1, - anon_sym_STAR, - [42493] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3477), 1, - anon_sym_RPAREN, - [42500] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3479), 1, - aux_sym_preproc_if_token2, - [42507] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3481), 1, - anon_sym_SQUOTE, - [42514] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3483), 1, - aux_sym_preproc_if_token2, - [42521] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3485), 1, - anon_sym_SEMI, - [42528] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2073), 1, - anon_sym_SEMI, - [42535] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3487), 1, - anon_sym_while, - [42542] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2127), 1, - anon_sym_SEMI, - [42549] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3489), 1, - aux_sym_preproc_if_token2, - [42556] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2139), 1, - anon_sym_SEMI, - [42563] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3491), 1, - anon_sym_LF, - [42570] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3493), 1, - anon_sym_SQUOTE, - [42577] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2121), 1, - anon_sym_SEMI, - [42584] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3495), 1, - sym_identifier, - [42591] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3497), 1, - sym_identifier, - [42598] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3499), 1, - sym_identifier, - [42605] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3501), 1, - anon_sym_SEMI, - [42612] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3503), 1, - sym_identifier, - [42619] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2083), 1, - anon_sym_SEMI, - [42626] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3505), 1, - aux_sym_preproc_if_token2, - [42633] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2171), 1, - anon_sym_RPAREN, - [42640] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3507), 1, - anon_sym_RPAREN, - [42647] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2167), 1, - anon_sym_RPAREN, - [42654] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3509), 1, - anon_sym_LF, - [42661] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3511), 1, - anon_sym_RPAREN, - [42668] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3513), 1, - aux_sym_preproc_if_token2, - [42675] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3515), 1, - anon_sym_while, - [42682] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3517), 1, - aux_sym_preproc_if_token2, - [42689] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3519), 1, - anon_sym_RPAREN, - [42696] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3086), 1, - anon_sym_LF, - [42703] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2157), 1, - anon_sym_SEMI, - [42710] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2151), 1, - anon_sym_SEMI, - [42717] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3521), 1, - ts_builtin_sym_end, - [42724] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3523), 1, - anon_sym_LF, - [42731] = 2, - ACTIONS(1635), 1, - anon_sym_LF, - ACTIONS(2397), 1, - sym_comment, - [42738] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3525), 1, - sym_identifier, - [42745] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3527), 1, - anon_sym_SEMI, - [42752] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3529), 1, - anon_sym_while, - [42759] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3531), 1, - anon_sym_SEMI, - [42766] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3533), 1, - anon_sym_LPAREN2, - [42773] = 2, - ACTIONS(2397), 1, - sym_comment, - ACTIONS(3082), 1, - anon_sym_LF, - [42780] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2113), 1, - anon_sym_SEMI, - [42787] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3535), 1, - anon_sym_COLON, - [42794] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2069), 1, - anon_sym_SEMI, - [42801] = 2, - ACTIONS(1645), 1, - anon_sym_LF, - ACTIONS(2397), 1, - sym_comment, - [42808] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3537), 1, - anon_sym_COLON, - [42815] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3539), 1, - anon_sym_while, - [42822] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3541), 1, - anon_sym_RPAREN, - [42829] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3543), 1, - anon_sym_SEMI, - [42836] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(2081), 1, - anon_sym_SEMI, - [42843] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3545), 1, - anon_sym_LPAREN2, - [42850] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3547), 1, - anon_sym_SEMI, - [42857] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3549), 1, - anon_sym_LPAREN2, - [42864] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3551), 1, - anon_sym_LPAREN2, - [42871] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3553), 1, - anon_sym_COLON, - [42878] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3555), 1, - anon_sym_LPAREN2, - [42885] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3557), 1, - sym_identifier, - [42892] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(3559), 1, - anon_sym_LPAREN2, -}; - -static const uint32_t ts_small_parse_table_map[] = { - [SMALL_STATE(382)] = 0, - [SMALL_STATE(383)] = 71, - [SMALL_STATE(384)] = 142, - [SMALL_STATE(385)] = 249, - [SMALL_STATE(386)] = 321, - [SMALL_STATE(387)] = 440, - [SMALL_STATE(388)] = 548, - [SMALL_STATE(389)] = 656, - [SMALL_STATE(390)] = 764, - [SMALL_STATE(391)] = 872, - [SMALL_STATE(392)] = 980, - [SMALL_STATE(393)] = 1088, - [SMALL_STATE(394)] = 1196, - [SMALL_STATE(395)] = 1304, - [SMALL_STATE(396)] = 1412, - [SMALL_STATE(397)] = 1520, - [SMALL_STATE(398)] = 1628, - [SMALL_STATE(399)] = 1736, - [SMALL_STATE(400)] = 1844, - [SMALL_STATE(401)] = 1952, - [SMALL_STATE(402)] = 2027, - [SMALL_STATE(403)] = 2102, - [SMALL_STATE(404)] = 2177, - [SMALL_STATE(405)] = 2254, - [SMALL_STATE(406)] = 2331, - [SMALL_STATE(407)] = 2406, - [SMALL_STATE(408)] = 2483, - [SMALL_STATE(409)] = 2560, - [SMALL_STATE(410)] = 2632, - [SMALL_STATE(411)] = 2732, - [SMALL_STATE(412)] = 2832, - [SMALL_STATE(413)] = 2929, - [SMALL_STATE(414)] = 3026, - [SMALL_STATE(415)] = 3124, - [SMALL_STATE(416)] = 3218, - [SMALL_STATE(417)] = 3316, - [SMALL_STATE(418)] = 3414, - [SMALL_STATE(419)] = 3512, - [SMALL_STATE(420)] = 3610, - [SMALL_STATE(421)] = 3708, - [SMALL_STATE(422)] = 3799, - [SMALL_STATE(423)] = 3890, - [SMALL_STATE(424)] = 3951, - [SMALL_STATE(425)] = 4042, - [SMALL_STATE(426)] = 4133, - [SMALL_STATE(427)] = 4224, - [SMALL_STATE(428)] = 4285, - [SMALL_STATE(429)] = 4376, - [SMALL_STATE(430)] = 4467, - [SMALL_STATE(431)] = 4558, - [SMALL_STATE(432)] = 4649, - [SMALL_STATE(433)] = 4740, - [SMALL_STATE(434)] = 4801, - [SMALL_STATE(435)] = 4904, - [SMALL_STATE(436)] = 4995, - [SMALL_STATE(437)] = 5050, - [SMALL_STATE(438)] = 5141, - [SMALL_STATE(439)] = 5232, - [SMALL_STATE(440)] = 5323, - [SMALL_STATE(441)] = 5378, - [SMALL_STATE(442)] = 5460, - [SMALL_STATE(443)] = 5542, - [SMALL_STATE(444)] = 5624, - [SMALL_STATE(445)] = 5706, - [SMALL_STATE(446)] = 5788, - [SMALL_STATE(447)] = 5870, - [SMALL_STATE(448)] = 5952, - [SMALL_STATE(449)] = 6034, - [SMALL_STATE(450)] = 6116, - [SMALL_STATE(451)] = 6198, - [SMALL_STATE(452)] = 6280, - [SMALL_STATE(453)] = 6362, - [SMALL_STATE(454)] = 6444, - [SMALL_STATE(455)] = 6526, - [SMALL_STATE(456)] = 6608, - [SMALL_STATE(457)] = 6690, - [SMALL_STATE(458)] = 6772, - [SMALL_STATE(459)] = 6854, - [SMALL_STATE(460)] = 6936, - [SMALL_STATE(461)] = 7018, - [SMALL_STATE(462)] = 7100, - [SMALL_STATE(463)] = 7182, - [SMALL_STATE(464)] = 7264, - [SMALL_STATE(465)] = 7346, - [SMALL_STATE(466)] = 7428, - [SMALL_STATE(467)] = 7510, - [SMALL_STATE(468)] = 7592, - [SMALL_STATE(469)] = 7674, - [SMALL_STATE(470)] = 7756, - [SMALL_STATE(471)] = 7838, - [SMALL_STATE(472)] = 7920, - [SMALL_STATE(473)] = 8002, - [SMALL_STATE(474)] = 8084, - [SMALL_STATE(475)] = 8166, - [SMALL_STATE(476)] = 8248, - [SMALL_STATE(477)] = 8330, - [SMALL_STATE(478)] = 8412, - [SMALL_STATE(479)] = 8494, - [SMALL_STATE(480)] = 8576, - [SMALL_STATE(481)] = 8658, - [SMALL_STATE(482)] = 8740, - [SMALL_STATE(483)] = 8822, - [SMALL_STATE(484)] = 8904, - [SMALL_STATE(485)] = 8986, - [SMALL_STATE(486)] = 9068, - [SMALL_STATE(487)] = 9150, - [SMALL_STATE(488)] = 9229, - [SMALL_STATE(489)] = 9280, - [SMALL_STATE(490)] = 9359, - [SMALL_STATE(491)] = 9438, - [SMALL_STATE(492)] = 9517, - [SMALL_STATE(493)] = 9596, - [SMALL_STATE(494)] = 9675, - [SMALL_STATE(495)] = 9754, - [SMALL_STATE(496)] = 9833, - [SMALL_STATE(497)] = 9912, - [SMALL_STATE(498)] = 9991, - [SMALL_STATE(499)] = 10070, - [SMALL_STATE(500)] = 10149, - [SMALL_STATE(501)] = 10228, - [SMALL_STATE(502)] = 10307, - [SMALL_STATE(503)] = 10386, - [SMALL_STATE(504)] = 10462, - [SMALL_STATE(505)] = 10538, - [SMALL_STATE(506)] = 10614, - [SMALL_STATE(507)] = 10674, - [SMALL_STATE(508)] = 10750, - [SMALL_STATE(509)] = 10826, - [SMALL_STATE(510)] = 10902, - [SMALL_STATE(511)] = 10978, - [SMALL_STATE(512)] = 11054, - [SMALL_STATE(513)] = 11130, - [SMALL_STATE(514)] = 11180, - [SMALL_STATE(515)] = 11256, - [SMALL_STATE(516)] = 11332, - [SMALL_STATE(517)] = 11382, - [SMALL_STATE(518)] = 11458, - [SMALL_STATE(519)] = 11534, - [SMALL_STATE(520)] = 11596, - [SMALL_STATE(521)] = 11672, - [SMALL_STATE(522)] = 11748, - [SMALL_STATE(523)] = 11806, - [SMALL_STATE(524)] = 11856, - [SMALL_STATE(525)] = 11916, - [SMALL_STATE(526)] = 11992, - [SMALL_STATE(527)] = 12068, - [SMALL_STATE(528)] = 12118, - [SMALL_STATE(529)] = 12194, - [SMALL_STATE(530)] = 12254, - [SMALL_STATE(531)] = 12330, - [SMALL_STATE(532)] = 12406, - [SMALL_STATE(533)] = 12482, - [SMALL_STATE(534)] = 12558, - [SMALL_STATE(535)] = 12634, - [SMALL_STATE(536)] = 12684, - [SMALL_STATE(537)] = 12760, - [SMALL_STATE(538)] = 12836, - [SMALL_STATE(539)] = 12912, - [SMALL_STATE(540)] = 12988, - [SMALL_STATE(541)] = 13064, - [SMALL_STATE(542)] = 13140, - [SMALL_STATE(543)] = 13216, - [SMALL_STATE(544)] = 13292, - [SMALL_STATE(545)] = 13368, - [SMALL_STATE(546)] = 13418, - [SMALL_STATE(547)] = 13468, - [SMALL_STATE(548)] = 13518, - [SMALL_STATE(549)] = 13594, - [SMALL_STATE(550)] = 13644, - [SMALL_STATE(551)] = 13720, - [SMALL_STATE(552)] = 13802, - [SMALL_STATE(553)] = 13878, - [SMALL_STATE(554)] = 13954, - [SMALL_STATE(555)] = 14030, - [SMALL_STATE(556)] = 14106, - [SMALL_STATE(557)] = 14182, - [SMALL_STATE(558)] = 14258, - [SMALL_STATE(559)] = 14334, - [SMALL_STATE(560)] = 14410, - [SMALL_STATE(561)] = 14486, - [SMALL_STATE(562)] = 14562, - [SMALL_STATE(563)] = 14638, - [SMALL_STATE(564)] = 14714, - [SMALL_STATE(565)] = 14790, - [SMALL_STATE(566)] = 14866, - [SMALL_STATE(567)] = 14942, - [SMALL_STATE(568)] = 15018, - [SMALL_STATE(569)] = 15094, - [SMALL_STATE(570)] = 15170, - [SMALL_STATE(571)] = 15220, - [SMALL_STATE(572)] = 15296, - [SMALL_STATE(573)] = 15372, - [SMALL_STATE(574)] = 15448, - [SMALL_STATE(575)] = 15524, - [SMALL_STATE(576)] = 15600, - [SMALL_STATE(577)] = 15676, - [SMALL_STATE(578)] = 15752, - [SMALL_STATE(579)] = 15828, - [SMALL_STATE(580)] = 15904, - [SMALL_STATE(581)] = 15954, - [SMALL_STATE(582)] = 16004, - [SMALL_STATE(583)] = 16064, - [SMALL_STATE(584)] = 16148, - [SMALL_STATE(585)] = 16224, - [SMALL_STATE(586)] = 16274, - [SMALL_STATE(587)] = 16324, - [SMALL_STATE(588)] = 16400, - [SMALL_STATE(589)] = 16476, - [SMALL_STATE(590)] = 16552, - [SMALL_STATE(591)] = 16628, - [SMALL_STATE(592)] = 16704, - [SMALL_STATE(593)] = 16780, - [SMALL_STATE(594)] = 16856, - [SMALL_STATE(595)] = 16920, - [SMALL_STATE(596)] = 16986, - [SMALL_STATE(597)] = 17056, - [SMALL_STATE(598)] = 17128, - [SMALL_STATE(599)] = 17202, - [SMALL_STATE(600)] = 17278, - [SMALL_STATE(601)] = 17356, - [SMALL_STATE(602)] = 17436, - [SMALL_STATE(603)] = 17512, - [SMALL_STATE(604)] = 17588, - [SMALL_STATE(605)] = 17650, - [SMALL_STATE(606)] = 17700, - [SMALL_STATE(607)] = 17766, - [SMALL_STATE(608)] = 17842, - [SMALL_STATE(609)] = 17918, - [SMALL_STATE(610)] = 17971, - [SMALL_STATE(611)] = 18053, - [SMALL_STATE(612)] = 18100, - [SMALL_STATE(613)] = 18153, - [SMALL_STATE(614)] = 18200, - [SMALL_STATE(615)] = 18247, - [SMALL_STATE(616)] = 18300, - [SMALL_STATE(617)] = 18353, - [SMALL_STATE(618)] = 18406, - [SMALL_STATE(619)] = 18485, - [SMALL_STATE(620)] = 18555, - [SMALL_STATE(621)] = 18635, - [SMALL_STATE(622)] = 18691, - [SMALL_STATE(623)] = 18745, - [SMALL_STATE(624)] = 18821, - [SMALL_STATE(625)] = 18895, - [SMALL_STATE(626)] = 18957, - [SMALL_STATE(627)] = 19029, - [SMALL_STATE(628)] = 19085, - [SMALL_STATE(629)] = 19153, - [SMALL_STATE(630)] = 19219, - [SMALL_STATE(631)] = 19275, - [SMALL_STATE(632)] = 19337, - [SMALL_STATE(633)] = 19397, - [SMALL_STATE(634)] = 19455, - [SMALL_STATE(635)] = 19533, - [SMALL_STATE(636)] = 19589, - [SMALL_STATE(637)] = 19634, - [SMALL_STATE(638)] = 19683, - [SMALL_STATE(639)] = 19728, - [SMALL_STATE(640)] = 19773, - [SMALL_STATE(641)] = 19829, - [SMALL_STATE(642)] = 19901, - [SMALL_STATE(643)] = 19973, - [SMALL_STATE(644)] = 20045, - [SMALL_STATE(645)] = 20117, - [SMALL_STATE(646)] = 20186, - [SMALL_STATE(647)] = 20260, - [SMALL_STATE(648)] = 20304, - [SMALL_STATE(649)] = 20365, - [SMALL_STATE(650)] = 20436, - [SMALL_STATE(651)] = 20509, - [SMALL_STATE(652)] = 20564, - [SMALL_STATE(653)] = 20621, - [SMALL_STATE(654)] = 20684, - [SMALL_STATE(655)] = 20749, - [SMALL_STATE(656)] = 20816, - [SMALL_STATE(657)] = 20883, - [SMALL_STATE(658)] = 20952, - [SMALL_STATE(659)] = 21005, - [SMALL_STATE(660)] = 21062, - [SMALL_STATE(661)] = 21101, - [SMALL_STATE(662)] = 21139, - [SMALL_STATE(663)] = 21177, - [SMALL_STATE(664)] = 21214, - [SMALL_STATE(665)] = 21289, - [SMALL_STATE(666)] = 21326, - [SMALL_STATE(667)] = 21363, - [SMALL_STATE(668)] = 21400, - [SMALL_STATE(669)] = 21437, - [SMALL_STATE(670)] = 21474, - [SMALL_STATE(671)] = 21511, - [SMALL_STATE(672)] = 21548, - [SMALL_STATE(673)] = 21585, - [SMALL_STATE(674)] = 21622, - [SMALL_STATE(675)] = 21659, - [SMALL_STATE(676)] = 21696, - [SMALL_STATE(677)] = 21733, - [SMALL_STATE(678)] = 21770, - [SMALL_STATE(679)] = 21845, - [SMALL_STATE(680)] = 21882, - [SMALL_STATE(681)] = 21919, - [SMALL_STATE(682)] = 21956, - [SMALL_STATE(683)] = 21993, - [SMALL_STATE(684)] = 22030, - [SMALL_STATE(685)] = 22067, - [SMALL_STATE(686)] = 22104, - [SMALL_STATE(687)] = 22141, - [SMALL_STATE(688)] = 22178, - [SMALL_STATE(689)] = 22215, - [SMALL_STATE(690)] = 22288, - [SMALL_STATE(691)] = 22363, - [SMALL_STATE(692)] = 22435, - [SMALL_STATE(693)] = 22471, - [SMALL_STATE(694)] = 22543, - [SMALL_STATE(695)] = 22615, - [SMALL_STATE(696)] = 22687, - [SMALL_STATE(697)] = 22759, - [SMALL_STATE(698)] = 22831, - [SMALL_STATE(699)] = 22903, - [SMALL_STATE(700)] = 22975, - [SMALL_STATE(701)] = 23047, - [SMALL_STATE(702)] = 23119, - [SMALL_STATE(703)] = 23191, - [SMALL_STATE(704)] = 23263, - [SMALL_STATE(705)] = 23335, - [SMALL_STATE(706)] = 23407, - [SMALL_STATE(707)] = 23477, - [SMALL_STATE(708)] = 23525, - [SMALL_STATE(709)] = 23597, - [SMALL_STATE(710)] = 23669, - [SMALL_STATE(711)] = 23741, - [SMALL_STATE(712)] = 23813, - [SMALL_STATE(713)] = 23861, - [SMALL_STATE(714)] = 23933, - [SMALL_STATE(715)] = 24005, - [SMALL_STATE(716)] = 24077, - [SMALL_STATE(717)] = 24149, - [SMALL_STATE(718)] = 24221, - [SMALL_STATE(719)] = 24293, - [SMALL_STATE(720)] = 24365, - [SMALL_STATE(721)] = 24437, - [SMALL_STATE(722)] = 24509, - [SMALL_STATE(723)] = 24581, - [SMALL_STATE(724)] = 24651, - [SMALL_STATE(725)] = 24723, - [SMALL_STATE(726)] = 24795, - [SMALL_STATE(727)] = 24867, - [SMALL_STATE(728)] = 24939, - [SMALL_STATE(729)] = 25009, - [SMALL_STATE(730)] = 25081, - [SMALL_STATE(731)] = 25117, - [SMALL_STATE(732)] = 25189, - [SMALL_STATE(733)] = 25261, - [SMALL_STATE(734)] = 25333, - [SMALL_STATE(735)] = 25405, - [SMALL_STATE(736)] = 25477, - [SMALL_STATE(737)] = 25549, - [SMALL_STATE(738)] = 25621, - [SMALL_STATE(739)] = 25693, - [SMALL_STATE(740)] = 25765, - [SMALL_STATE(741)] = 25837, - [SMALL_STATE(742)] = 25909, - [SMALL_STATE(743)] = 25979, - [SMALL_STATE(744)] = 26027, - [SMALL_STATE(745)] = 26099, - [SMALL_STATE(746)] = 26171, - [SMALL_STATE(747)] = 26243, - [SMALL_STATE(748)] = 26315, - [SMALL_STATE(749)] = 26387, - [SMALL_STATE(750)] = 26459, - [SMALL_STATE(751)] = 26507, - [SMALL_STATE(752)] = 26577, - [SMALL_STATE(753)] = 26646, - [SMALL_STATE(754)] = 26715, - [SMALL_STATE(755)] = 26768, - [SMALL_STATE(756)] = 26837, - [SMALL_STATE(757)] = 26906, - [SMALL_STATE(758)] = 26975, - [SMALL_STATE(759)] = 27018, - [SMALL_STATE(760)] = 27087, - [SMALL_STATE(761)] = 27156, - [SMALL_STATE(762)] = 27191, - [SMALL_STATE(763)] = 27260, - [SMALL_STATE(764)] = 27299, - [SMALL_STATE(765)] = 27334, - [SMALL_STATE(766)] = 27369, - [SMALL_STATE(767)] = 27404, - [SMALL_STATE(768)] = 27439, - [SMALL_STATE(769)] = 27474, - [SMALL_STATE(770)] = 27509, - [SMALL_STATE(771)] = 27544, - [SMALL_STATE(772)] = 27613, - [SMALL_STATE(773)] = 27648, - [SMALL_STATE(774)] = 27683, - [SMALL_STATE(775)] = 27718, - [SMALL_STATE(776)] = 27753, - [SMALL_STATE(777)] = 27788, - [SMALL_STATE(778)] = 27857, - [SMALL_STATE(779)] = 27892, - [SMALL_STATE(780)] = 27927, - [SMALL_STATE(781)] = 27996, - [SMALL_STATE(782)] = 28065, - [SMALL_STATE(783)] = 28100, - [SMALL_STATE(784)] = 28169, - [SMALL_STATE(785)] = 28208, - [SMALL_STATE(786)] = 28243, - [SMALL_STATE(787)] = 28278, - [SMALL_STATE(788)] = 28317, - [SMALL_STATE(789)] = 28386, - [SMALL_STATE(790)] = 28421, - [SMALL_STATE(791)] = 28456, - [SMALL_STATE(792)] = 28491, - [SMALL_STATE(793)] = 28526, - [SMALL_STATE(794)] = 28561, - [SMALL_STATE(795)] = 28596, - [SMALL_STATE(796)] = 28631, - [SMALL_STATE(797)] = 28700, - [SMALL_STATE(798)] = 28735, - [SMALL_STATE(799)] = 28802, - [SMALL_STATE(800)] = 28837, - [SMALL_STATE(801)] = 28872, - [SMALL_STATE(802)] = 28921, - [SMALL_STATE(803)] = 28986, - [SMALL_STATE(804)] = 29055, - [SMALL_STATE(805)] = 29124, - [SMALL_STATE(806)] = 29187, - [SMALL_STATE(807)] = 29250, - [SMALL_STATE(808)] = 29311, - [SMALL_STATE(809)] = 29370, - [SMALL_STATE(810)] = 29405, - [SMALL_STATE(811)] = 29462, - [SMALL_STATE(812)] = 29497, - [SMALL_STATE(813)] = 29566, - [SMALL_STATE(814)] = 29601, - [SMALL_STATE(815)] = 29636, - [SMALL_STATE(816)] = 29675, - [SMALL_STATE(817)] = 29710, - [SMALL_STATE(818)] = 29745, - [SMALL_STATE(819)] = 29784, - [SMALL_STATE(820)] = 29819, - [SMALL_STATE(821)] = 29872, - [SMALL_STATE(822)] = 29907, - [SMALL_STATE(823)] = 29942, - [SMALL_STATE(824)] = 29977, - [SMALL_STATE(825)] = 30046, - [SMALL_STATE(826)] = 30097, - [SMALL_STATE(827)] = 30166, - [SMALL_STATE(828)] = 30235, - [SMALL_STATE(829)] = 30304, - [SMALL_STATE(830)] = 30339, - [SMALL_STATE(831)] = 30374, - [SMALL_STATE(832)] = 30432, - [SMALL_STATE(833)] = 30487, - [SMALL_STATE(834)] = 30542, - [SMALL_STATE(835)] = 30597, - [SMALL_STATE(836)] = 30652, - [SMALL_STATE(837)] = 30707, - [SMALL_STATE(838)] = 30762, - [SMALL_STATE(839)] = 30817, - [SMALL_STATE(840)] = 30872, - [SMALL_STATE(841)] = 30927, - [SMALL_STATE(842)] = 30982, - [SMALL_STATE(843)] = 31037, - [SMALL_STATE(844)] = 31092, - [SMALL_STATE(845)] = 31138, - [SMALL_STATE(846)] = 31184, - [SMALL_STATE(847)] = 31230, - [SMALL_STATE(848)] = 31276, - [SMALL_STATE(849)] = 31311, - [SMALL_STATE(850)] = 31346, - [SMALL_STATE(851)] = 31381, - [SMALL_STATE(852)] = 31416, - [SMALL_STATE(853)] = 31467, - [SMALL_STATE(854)] = 31502, - [SMALL_STATE(855)] = 31550, - [SMALL_STATE(856)] = 31598, - [SMALL_STATE(857)] = 31646, - [SMALL_STATE(858)] = 31694, - [SMALL_STATE(859)] = 31742, - [SMALL_STATE(860)] = 31790, - [SMALL_STATE(861)] = 31838, - [SMALL_STATE(862)] = 31886, - [SMALL_STATE(863)] = 31934, - [SMALL_STATE(864)] = 31968, - [SMALL_STATE(865)] = 31997, - [SMALL_STATE(866)] = 32026, - [SMALL_STATE(867)] = 32055, - [SMALL_STATE(868)] = 32110, - [SMALL_STATE(869)] = 32139, - [SMALL_STATE(870)] = 32168, - [SMALL_STATE(871)] = 32197, - [SMALL_STATE(872)] = 32226, - [SMALL_STATE(873)] = 32281, - [SMALL_STATE(874)] = 32310, - [SMALL_STATE(875)] = 32339, - [SMALL_STATE(876)] = 32368, - [SMALL_STATE(877)] = 32411, - [SMALL_STATE(878)] = 32444, - [SMALL_STATE(879)] = 32473, - [SMALL_STATE(880)] = 32502, - [SMALL_STATE(881)] = 32533, - [SMALL_STATE(882)] = 32562, - [SMALL_STATE(883)] = 32595, - [SMALL_STATE(884)] = 32624, - [SMALL_STATE(885)] = 32653, - [SMALL_STATE(886)] = 32682, - [SMALL_STATE(887)] = 32711, - [SMALL_STATE(888)] = 32740, - [SMALL_STATE(889)] = 32783, - [SMALL_STATE(890)] = 32812, - [SMALL_STATE(891)] = 32841, - [SMALL_STATE(892)] = 32870, - [SMALL_STATE(893)] = 32904, - [SMALL_STATE(894)] = 32932, - [SMALL_STATE(895)] = 32972, - [SMALL_STATE(896)] = 33000, - [SMALL_STATE(897)] = 33048, - [SMALL_STATE(898)] = 33094, - [SMALL_STATE(899)] = 33140, - [SMALL_STATE(900)] = 33184, - [SMALL_STATE(901)] = 33226, - [SMALL_STATE(902)] = 33266, - [SMALL_STATE(903)] = 33306, - [SMALL_STATE(904)] = 33334, - [SMALL_STATE(905)] = 33370, - [SMALL_STATE(906)] = 33410, - [SMALL_STATE(907)] = 33438, - [SMALL_STATE(908)] = 33478, - [SMALL_STATE(909)] = 33506, - [SMALL_STATE(910)] = 33546, - [SMALL_STATE(911)] = 33586, - [SMALL_STATE(912)] = 33626, - [SMALL_STATE(913)] = 33666, - [SMALL_STATE(914)] = 33706, - [SMALL_STATE(915)] = 33756, - [SMALL_STATE(916)] = 33796, - [SMALL_STATE(917)] = 33836, - [SMALL_STATE(918)] = 33876, - [SMALL_STATE(919)] = 33916, - [SMALL_STATE(920)] = 33956, - [SMALL_STATE(921)] = 33996, - [SMALL_STATE(922)] = 34024, - [SMALL_STATE(923)] = 34052, - [SMALL_STATE(924)] = 34092, - [SMALL_STATE(925)] = 34132, - [SMALL_STATE(926)] = 34172, - [SMALL_STATE(927)] = 34204, - [SMALL_STATE(928)] = 34244, - [SMALL_STATE(929)] = 34284, - [SMALL_STATE(930)] = 34312, - [SMALL_STATE(931)] = 34352, - [SMALL_STATE(932)] = 34392, - [SMALL_STATE(933)] = 34432, - [SMALL_STATE(934)] = 34472, - [SMALL_STATE(935)] = 34500, - [SMALL_STATE(936)] = 34540, - [SMALL_STATE(937)] = 34580, - [SMALL_STATE(938)] = 34620, - [SMALL_STATE(939)] = 34648, - [SMALL_STATE(940)] = 34688, - [SMALL_STATE(941)] = 34728, - [SMALL_STATE(942)] = 34768, - [SMALL_STATE(943)] = 34808, - [SMALL_STATE(944)] = 34848, - [SMALL_STATE(945)] = 34888, - [SMALL_STATE(946)] = 34928, - [SMALL_STATE(947)] = 34976, - [SMALL_STATE(948)] = 35009, - [SMALL_STATE(949)] = 35052, - [SMALL_STATE(950)] = 35079, - [SMALL_STATE(951)] = 35124, - [SMALL_STATE(952)] = 35169, - [SMALL_STATE(953)] = 35196, - [SMALL_STATE(954)] = 35223, - [SMALL_STATE(955)] = 35268, - [SMALL_STATE(956)] = 35313, - [SMALL_STATE(957)] = 35358, - [SMALL_STATE(958)] = 35385, - [SMALL_STATE(959)] = 35412, - [SMALL_STATE(960)] = 35439, - [SMALL_STATE(961)] = 35470, - [SMALL_STATE(962)] = 35519, - [SMALL_STATE(963)] = 35546, - [SMALL_STATE(964)] = 35591, - [SMALL_STATE(965)] = 35640, - [SMALL_STATE(966)] = 35685, - [SMALL_STATE(967)] = 35730, - [SMALL_STATE(968)] = 35775, - [SMALL_STATE(969)] = 35802, - [SMALL_STATE(970)] = 35835, - [SMALL_STATE(971)] = 35870, - [SMALL_STATE(972)] = 35907, - [SMALL_STATE(973)] = 35934, - [SMALL_STATE(974)] = 35973, - [SMALL_STATE(975)] = 36002, - [SMALL_STATE(976)] = 36029, - [SMALL_STATE(977)] = 36070, - [SMALL_STATE(978)] = 36115, - [SMALL_STATE(979)] = 36154, - [SMALL_STATE(980)] = 36193, - [SMALL_STATE(981)] = 36232, - [SMALL_STATE(982)] = 36271, - [SMALL_STATE(983)] = 36310, - [SMALL_STATE(984)] = 36349, - [SMALL_STATE(985)] = 36388, - [SMALL_STATE(986)] = 36427, - [SMALL_STATE(987)] = 36466, - [SMALL_STATE(988)] = 36504, - [SMALL_STATE(989)] = 36542, - [SMALL_STATE(990)] = 36580, - [SMALL_STATE(991)] = 36618, - [SMALL_STATE(992)] = 36656, - [SMALL_STATE(993)] = 36688, - [SMALL_STATE(994)] = 36726, - [SMALL_STATE(995)] = 36757, - [SMALL_STATE(996)] = 36795, - [SMALL_STATE(997)] = 36833, - [SMALL_STATE(998)] = 36871, - [SMALL_STATE(999)] = 36892, - [SMALL_STATE(1000)] = 36913, - [SMALL_STATE(1001)] = 36951, - [SMALL_STATE(1002)] = 36989, - [SMALL_STATE(1003)] = 37027, - [SMALL_STATE(1004)] = 37059, - [SMALL_STATE(1005)] = 37091, - [SMALL_STATE(1006)] = 37123, - [SMALL_STATE(1007)] = 37155, - [SMALL_STATE(1008)] = 37187, - [SMALL_STATE(1009)] = 37219, - [SMALL_STATE(1010)] = 37257, - [SMALL_STATE(1011)] = 37289, - [SMALL_STATE(1012)] = 37321, - [SMALL_STATE(1013)] = 37353, - [SMALL_STATE(1014)] = 37376, - [SMALL_STATE(1015)] = 37405, - [SMALL_STATE(1016)] = 37432, - [SMALL_STATE(1017)] = 37467, - [SMALL_STATE(1018)] = 37494, - [SMALL_STATE(1019)] = 37523, - [SMALL_STATE(1020)] = 37552, - [SMALL_STATE(1021)] = 37579, - [SMALL_STATE(1022)] = 37608, - [SMALL_STATE(1023)] = 37637, - [SMALL_STATE(1024)] = 37666, - [SMALL_STATE(1025)] = 37695, - [SMALL_STATE(1026)] = 37718, - [SMALL_STATE(1027)] = 37747, - [SMALL_STATE(1028)] = 37776, - [SMALL_STATE(1029)] = 37811, - [SMALL_STATE(1030)] = 37840, - [SMALL_STATE(1031)] = 37863, - [SMALL_STATE(1032)] = 37892, - [SMALL_STATE(1033)] = 37915, - [SMALL_STATE(1034)] = 37944, - [SMALL_STATE(1035)] = 37973, - [SMALL_STATE(1036)] = 38002, - [SMALL_STATE(1037)] = 38031, - [SMALL_STATE(1038)] = 38060, - [SMALL_STATE(1039)] = 38089, - [SMALL_STATE(1040)] = 38116, - [SMALL_STATE(1041)] = 38151, - [SMALL_STATE(1042)] = 38183, - [SMALL_STATE(1043)] = 38215, - [SMALL_STATE(1044)] = 38237, - [SMALL_STATE(1045)] = 38263, - [SMALL_STATE(1046)] = 38295, - [SMALL_STATE(1047)] = 38327, - [SMALL_STATE(1048)] = 38353, - [SMALL_STATE(1049)] = 38379, - [SMALL_STATE(1050)] = 38397, - [SMALL_STATE(1051)] = 38415, - [SMALL_STATE(1052)] = 38433, - [SMALL_STATE(1053)] = 38459, - [SMALL_STATE(1054)] = 38486, - [SMALL_STATE(1055)] = 38515, - [SMALL_STATE(1056)] = 38544, - [SMALL_STATE(1057)] = 38565, - [SMALL_STATE(1058)] = 38594, - [SMALL_STATE(1059)] = 38623, - [SMALL_STATE(1060)] = 38648, - [SMALL_STATE(1061)] = 38677, - [SMALL_STATE(1062)] = 38702, - [SMALL_STATE(1063)] = 38723, - [SMALL_STATE(1064)] = 38744, - [SMALL_STATE(1065)] = 38765, - [SMALL_STATE(1066)] = 38794, - [SMALL_STATE(1067)] = 38823, - [SMALL_STATE(1068)] = 38848, - [SMALL_STATE(1069)] = 38877, - [SMALL_STATE(1070)] = 38902, - [SMALL_STATE(1071)] = 38927, - [SMALL_STATE(1072)] = 38948, - [SMALL_STATE(1073)] = 38972, - [SMALL_STATE(1074)] = 38988, - [SMALL_STATE(1075)] = 39014, - [SMALL_STATE(1076)] = 39030, - [SMALL_STATE(1077)] = 39056, - [SMALL_STATE(1078)] = 39072, - [SMALL_STATE(1079)] = 39088, - [SMALL_STATE(1080)] = 39108, - [SMALL_STATE(1081)] = 39134, - [SMALL_STATE(1082)] = 39160, - [SMALL_STATE(1083)] = 39184, - [SMALL_STATE(1084)] = 39200, - [SMALL_STATE(1085)] = 39216, - [SMALL_STATE(1086)] = 39231, - [SMALL_STATE(1087)] = 39246, - [SMALL_STATE(1088)] = 39261, - [SMALL_STATE(1089)] = 39284, - [SMALL_STATE(1090)] = 39299, - [SMALL_STATE(1091)] = 39322, - [SMALL_STATE(1092)] = 39337, - [SMALL_STATE(1093)] = 39352, - [SMALL_STATE(1094)] = 39367, - [SMALL_STATE(1095)] = 39382, - [SMALL_STATE(1096)] = 39405, - [SMALL_STATE(1097)] = 39419, - [SMALL_STATE(1098)] = 39433, - [SMALL_STATE(1099)] = 39447, - [SMALL_STATE(1100)] = 39465, - [SMALL_STATE(1101)] = 39479, - [SMALL_STATE(1102)] = 39493, - [SMALL_STATE(1103)] = 39507, - [SMALL_STATE(1104)] = 39521, - [SMALL_STATE(1105)] = 39535, - [SMALL_STATE(1106)] = 39553, - [SMALL_STATE(1107)] = 39572, - [SMALL_STATE(1108)] = 39589, - [SMALL_STATE(1109)] = 39606, - [SMALL_STATE(1110)] = 39625, - [SMALL_STATE(1111)] = 39642, - [SMALL_STATE(1112)] = 39661, - [SMALL_STATE(1113)] = 39680, - [SMALL_STATE(1114)] = 39697, - [SMALL_STATE(1115)] = 39716, - [SMALL_STATE(1116)] = 39732, - [SMALL_STATE(1117)] = 39742, - [SMALL_STATE(1118)] = 39758, - [SMALL_STATE(1119)] = 39774, - [SMALL_STATE(1120)] = 39784, - [SMALL_STATE(1121)] = 39794, - [SMALL_STATE(1122)] = 39804, - [SMALL_STATE(1123)] = 39820, - [SMALL_STATE(1124)] = 39836, - [SMALL_STATE(1125)] = 39846, - [SMALL_STATE(1126)] = 39860, - [SMALL_STATE(1127)] = 39876, - [SMALL_STATE(1128)] = 39892, - [SMALL_STATE(1129)] = 39902, - [SMALL_STATE(1130)] = 39918, - [SMALL_STATE(1131)] = 39934, - [SMALL_STATE(1132)] = 39944, - [SMALL_STATE(1133)] = 39960, - [SMALL_STATE(1134)] = 39976, - [SMALL_STATE(1135)] = 39986, - [SMALL_STATE(1136)] = 40002, - [SMALL_STATE(1137)] = 40016, - [SMALL_STATE(1138)] = 40032, - [SMALL_STATE(1139)] = 40042, - [SMALL_STATE(1140)] = 40058, - [SMALL_STATE(1141)] = 40074, - [SMALL_STATE(1142)] = 40084, - [SMALL_STATE(1143)] = 40094, - [SMALL_STATE(1144)] = 40110, - [SMALL_STATE(1145)] = 40126, - [SMALL_STATE(1146)] = 40142, - [SMALL_STATE(1147)] = 40158, - [SMALL_STATE(1148)] = 40168, - [SMALL_STATE(1149)] = 40184, - [SMALL_STATE(1150)] = 40197, - [SMALL_STATE(1151)] = 40210, - [SMALL_STATE(1152)] = 40223, - [SMALL_STATE(1153)] = 40236, - [SMALL_STATE(1154)] = 40249, - [SMALL_STATE(1155)] = 40262, - [SMALL_STATE(1156)] = 40275, - [SMALL_STATE(1157)] = 40288, - [SMALL_STATE(1158)] = 40301, - [SMALL_STATE(1159)] = 40314, - [SMALL_STATE(1160)] = 40327, - [SMALL_STATE(1161)] = 40340, - [SMALL_STATE(1162)] = 40353, - [SMALL_STATE(1163)] = 40366, - [SMALL_STATE(1164)] = 40379, - [SMALL_STATE(1165)] = 40392, - [SMALL_STATE(1166)] = 40405, - [SMALL_STATE(1167)] = 40418, - [SMALL_STATE(1168)] = 40431, - [SMALL_STATE(1169)] = 40444, - [SMALL_STATE(1170)] = 40457, - [SMALL_STATE(1171)] = 40470, - [SMALL_STATE(1172)] = 40483, - [SMALL_STATE(1173)] = 40496, - [SMALL_STATE(1174)] = 40509, - [SMALL_STATE(1175)] = 40522, - [SMALL_STATE(1176)] = 40535, - [SMALL_STATE(1177)] = 40548, - [SMALL_STATE(1178)] = 40561, - [SMALL_STATE(1179)] = 40574, - [SMALL_STATE(1180)] = 40587, - [SMALL_STATE(1181)] = 40600, - [SMALL_STATE(1182)] = 40613, - [SMALL_STATE(1183)] = 40626, - [SMALL_STATE(1184)] = 40639, - [SMALL_STATE(1185)] = 40652, - [SMALL_STATE(1186)] = 40661, - [SMALL_STATE(1187)] = 40674, - [SMALL_STATE(1188)] = 40687, - [SMALL_STATE(1189)] = 40700, - [SMALL_STATE(1190)] = 40713, - [SMALL_STATE(1191)] = 40724, - [SMALL_STATE(1192)] = 40737, - [SMALL_STATE(1193)] = 40750, - [SMALL_STATE(1194)] = 40763, - [SMALL_STATE(1195)] = 40776, - [SMALL_STATE(1196)] = 40789, - [SMALL_STATE(1197)] = 40802, - [SMALL_STATE(1198)] = 40815, - [SMALL_STATE(1199)] = 40828, - [SMALL_STATE(1200)] = 40841, - [SMALL_STATE(1201)] = 40852, - [SMALL_STATE(1202)] = 40865, - [SMALL_STATE(1203)] = 40878, - [SMALL_STATE(1204)] = 40891, - [SMALL_STATE(1205)] = 40904, - [SMALL_STATE(1206)] = 40917, - [SMALL_STATE(1207)] = 40930, - [SMALL_STATE(1208)] = 40939, - [SMALL_STATE(1209)] = 40952, - [SMALL_STATE(1210)] = 40960, - [SMALL_STATE(1211)] = 40970, - [SMALL_STATE(1212)] = 40978, - [SMALL_STATE(1213)] = 40988, - [SMALL_STATE(1214)] = 40996, - [SMALL_STATE(1215)] = 41006, - [SMALL_STATE(1216)] = 41016, - [SMALL_STATE(1217)] = 41026, - [SMALL_STATE(1218)] = 41034, - [SMALL_STATE(1219)] = 41044, - [SMALL_STATE(1220)] = 41054, - [SMALL_STATE(1221)] = 41062, - [SMALL_STATE(1222)] = 41072, - [SMALL_STATE(1223)] = 41080, - [SMALL_STATE(1224)] = 41090, - [SMALL_STATE(1225)] = 41098, - [SMALL_STATE(1226)] = 41108, - [SMALL_STATE(1227)] = 41118, - [SMALL_STATE(1228)] = 41128, - [SMALL_STATE(1229)] = 41136, - [SMALL_STATE(1230)] = 41144, - [SMALL_STATE(1231)] = 41154, - [SMALL_STATE(1232)] = 41164, - [SMALL_STATE(1233)] = 41172, - [SMALL_STATE(1234)] = 41180, - [SMALL_STATE(1235)] = 41190, - [SMALL_STATE(1236)] = 41198, - [SMALL_STATE(1237)] = 41206, - [SMALL_STATE(1238)] = 41214, - [SMALL_STATE(1239)] = 41224, - [SMALL_STATE(1240)] = 41232, - [SMALL_STATE(1241)] = 41242, - [SMALL_STATE(1242)] = 41250, - [SMALL_STATE(1243)] = 41260, - [SMALL_STATE(1244)] = 41270, - [SMALL_STATE(1245)] = 41280, - [SMALL_STATE(1246)] = 41290, - [SMALL_STATE(1247)] = 41300, - [SMALL_STATE(1248)] = 41310, - [SMALL_STATE(1249)] = 41320, - [SMALL_STATE(1250)] = 41330, - [SMALL_STATE(1251)] = 41340, - [SMALL_STATE(1252)] = 41350, - [SMALL_STATE(1253)] = 41360, - [SMALL_STATE(1254)] = 41370, - [SMALL_STATE(1255)] = 41380, - [SMALL_STATE(1256)] = 41390, - [SMALL_STATE(1257)] = 41400, - [SMALL_STATE(1258)] = 41408, - [SMALL_STATE(1259)] = 41418, - [SMALL_STATE(1260)] = 41428, - [SMALL_STATE(1261)] = 41436, - [SMALL_STATE(1262)] = 41446, - [SMALL_STATE(1263)] = 41456, - [SMALL_STATE(1264)] = 41464, - [SMALL_STATE(1265)] = 41474, - [SMALL_STATE(1266)] = 41484, - [SMALL_STATE(1267)] = 41494, - [SMALL_STATE(1268)] = 41504, - [SMALL_STATE(1269)] = 41514, - [SMALL_STATE(1270)] = 41524, - [SMALL_STATE(1271)] = 41534, - [SMALL_STATE(1272)] = 41541, - [SMALL_STATE(1273)] = 41548, - [SMALL_STATE(1274)] = 41555, - [SMALL_STATE(1275)] = 41562, - [SMALL_STATE(1276)] = 41569, - [SMALL_STATE(1277)] = 41576, - [SMALL_STATE(1278)] = 41583, - [SMALL_STATE(1279)] = 41590, - [SMALL_STATE(1280)] = 41597, - [SMALL_STATE(1281)] = 41604, - [SMALL_STATE(1282)] = 41611, - [SMALL_STATE(1283)] = 41618, - [SMALL_STATE(1284)] = 41625, - [SMALL_STATE(1285)] = 41632, - [SMALL_STATE(1286)] = 41639, - [SMALL_STATE(1287)] = 41646, - [SMALL_STATE(1288)] = 41653, - [SMALL_STATE(1289)] = 41660, - [SMALL_STATE(1290)] = 41667, - [SMALL_STATE(1291)] = 41674, - [SMALL_STATE(1292)] = 41681, - [SMALL_STATE(1293)] = 41688, - [SMALL_STATE(1294)] = 41695, - [SMALL_STATE(1295)] = 41702, - [SMALL_STATE(1296)] = 41709, - [SMALL_STATE(1297)] = 41716, - [SMALL_STATE(1298)] = 41723, - [SMALL_STATE(1299)] = 41730, - [SMALL_STATE(1300)] = 41737, - [SMALL_STATE(1301)] = 41744, - [SMALL_STATE(1302)] = 41751, - [SMALL_STATE(1303)] = 41758, - [SMALL_STATE(1304)] = 41765, - [SMALL_STATE(1305)] = 41772, - [SMALL_STATE(1306)] = 41779, - [SMALL_STATE(1307)] = 41786, - [SMALL_STATE(1308)] = 41793, - [SMALL_STATE(1309)] = 41800, - [SMALL_STATE(1310)] = 41807, - [SMALL_STATE(1311)] = 41814, - [SMALL_STATE(1312)] = 41821, - [SMALL_STATE(1313)] = 41828, - [SMALL_STATE(1314)] = 41835, - [SMALL_STATE(1315)] = 41842, - [SMALL_STATE(1316)] = 41849, - [SMALL_STATE(1317)] = 41856, - [SMALL_STATE(1318)] = 41863, - [SMALL_STATE(1319)] = 41870, - [SMALL_STATE(1320)] = 41877, - [SMALL_STATE(1321)] = 41884, - [SMALL_STATE(1322)] = 41891, - [SMALL_STATE(1323)] = 41898, - [SMALL_STATE(1324)] = 41905, - [SMALL_STATE(1325)] = 41912, - [SMALL_STATE(1326)] = 41919, - [SMALL_STATE(1327)] = 41926, - [SMALL_STATE(1328)] = 41933, - [SMALL_STATE(1329)] = 41940, - [SMALL_STATE(1330)] = 41947, - [SMALL_STATE(1331)] = 41954, - [SMALL_STATE(1332)] = 41961, - [SMALL_STATE(1333)] = 41968, - [SMALL_STATE(1334)] = 41975, - [SMALL_STATE(1335)] = 41982, - [SMALL_STATE(1336)] = 41989, - [SMALL_STATE(1337)] = 41996, - [SMALL_STATE(1338)] = 42003, - [SMALL_STATE(1339)] = 42010, - [SMALL_STATE(1340)] = 42017, - [SMALL_STATE(1341)] = 42024, - [SMALL_STATE(1342)] = 42031, - [SMALL_STATE(1343)] = 42038, - [SMALL_STATE(1344)] = 42045, - [SMALL_STATE(1345)] = 42052, - [SMALL_STATE(1346)] = 42059, - [SMALL_STATE(1347)] = 42066, - [SMALL_STATE(1348)] = 42073, - [SMALL_STATE(1349)] = 42080, - [SMALL_STATE(1350)] = 42087, - [SMALL_STATE(1351)] = 42094, - [SMALL_STATE(1352)] = 42101, - [SMALL_STATE(1353)] = 42108, - [SMALL_STATE(1354)] = 42115, - [SMALL_STATE(1355)] = 42122, - [SMALL_STATE(1356)] = 42129, - [SMALL_STATE(1357)] = 42136, - [SMALL_STATE(1358)] = 42143, - [SMALL_STATE(1359)] = 42150, - [SMALL_STATE(1360)] = 42157, - [SMALL_STATE(1361)] = 42164, - [SMALL_STATE(1362)] = 42171, - [SMALL_STATE(1363)] = 42178, - [SMALL_STATE(1364)] = 42185, - [SMALL_STATE(1365)] = 42192, - [SMALL_STATE(1366)] = 42199, - [SMALL_STATE(1367)] = 42206, - [SMALL_STATE(1368)] = 42213, - [SMALL_STATE(1369)] = 42220, - [SMALL_STATE(1370)] = 42227, - [SMALL_STATE(1371)] = 42234, - [SMALL_STATE(1372)] = 42241, - [SMALL_STATE(1373)] = 42248, - [SMALL_STATE(1374)] = 42255, - [SMALL_STATE(1375)] = 42262, - [SMALL_STATE(1376)] = 42269, - [SMALL_STATE(1377)] = 42276, - [SMALL_STATE(1378)] = 42283, - [SMALL_STATE(1379)] = 42290, - [SMALL_STATE(1380)] = 42297, - [SMALL_STATE(1381)] = 42304, - [SMALL_STATE(1382)] = 42311, - [SMALL_STATE(1383)] = 42318, - [SMALL_STATE(1384)] = 42325, - [SMALL_STATE(1385)] = 42332, - [SMALL_STATE(1386)] = 42339, - [SMALL_STATE(1387)] = 42346, - [SMALL_STATE(1388)] = 42353, - [SMALL_STATE(1389)] = 42360, - [SMALL_STATE(1390)] = 42367, - [SMALL_STATE(1391)] = 42374, - [SMALL_STATE(1392)] = 42381, - [SMALL_STATE(1393)] = 42388, - [SMALL_STATE(1394)] = 42395, - [SMALL_STATE(1395)] = 42402, - [SMALL_STATE(1396)] = 42409, - [SMALL_STATE(1397)] = 42416, - [SMALL_STATE(1398)] = 42423, - [SMALL_STATE(1399)] = 42430, - [SMALL_STATE(1400)] = 42437, - [SMALL_STATE(1401)] = 42444, - [SMALL_STATE(1402)] = 42451, - [SMALL_STATE(1403)] = 42458, - [SMALL_STATE(1404)] = 42465, - [SMALL_STATE(1405)] = 42472, - [SMALL_STATE(1406)] = 42479, - [SMALL_STATE(1407)] = 42486, - [SMALL_STATE(1408)] = 42493, - [SMALL_STATE(1409)] = 42500, - [SMALL_STATE(1410)] = 42507, - [SMALL_STATE(1411)] = 42514, - [SMALL_STATE(1412)] = 42521, - [SMALL_STATE(1413)] = 42528, - [SMALL_STATE(1414)] = 42535, - [SMALL_STATE(1415)] = 42542, - [SMALL_STATE(1416)] = 42549, - [SMALL_STATE(1417)] = 42556, - [SMALL_STATE(1418)] = 42563, - [SMALL_STATE(1419)] = 42570, - [SMALL_STATE(1420)] = 42577, - [SMALL_STATE(1421)] = 42584, - [SMALL_STATE(1422)] = 42591, - [SMALL_STATE(1423)] = 42598, - [SMALL_STATE(1424)] = 42605, - [SMALL_STATE(1425)] = 42612, - [SMALL_STATE(1426)] = 42619, - [SMALL_STATE(1427)] = 42626, - [SMALL_STATE(1428)] = 42633, - [SMALL_STATE(1429)] = 42640, - [SMALL_STATE(1430)] = 42647, - [SMALL_STATE(1431)] = 42654, - [SMALL_STATE(1432)] = 42661, - [SMALL_STATE(1433)] = 42668, - [SMALL_STATE(1434)] = 42675, - [SMALL_STATE(1435)] = 42682, - [SMALL_STATE(1436)] = 42689, - [SMALL_STATE(1437)] = 42696, - [SMALL_STATE(1438)] = 42703, - [SMALL_STATE(1439)] = 42710, - [SMALL_STATE(1440)] = 42717, - [SMALL_STATE(1441)] = 42724, - [SMALL_STATE(1442)] = 42731, - [SMALL_STATE(1443)] = 42738, - [SMALL_STATE(1444)] = 42745, - [SMALL_STATE(1445)] = 42752, - [SMALL_STATE(1446)] = 42759, - [SMALL_STATE(1447)] = 42766, - [SMALL_STATE(1448)] = 42773, - [SMALL_STATE(1449)] = 42780, - [SMALL_STATE(1450)] = 42787, - [SMALL_STATE(1451)] = 42794, - [SMALL_STATE(1452)] = 42801, - [SMALL_STATE(1453)] = 42808, - [SMALL_STATE(1454)] = 42815, - [SMALL_STATE(1455)] = 42822, - [SMALL_STATE(1456)] = 42829, - [SMALL_STATE(1457)] = 42836, - [SMALL_STATE(1458)] = 42843, - [SMALL_STATE(1459)] = 42850, - [SMALL_STATE(1460)] = 42857, - [SMALL_STATE(1461)] = 42864, - [SMALL_STATE(1462)] = 42871, - [SMALL_STATE(1463)] = 42878, - [SMALL_STATE(1464)] = 42885, - [SMALL_STATE(1465)] = 42892, -}; - -static const TSParseActionEntry ts_parse_actions[] = { - [0] = {.entry = {.count = 0, .reusable = false}}, - [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), - [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), - [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_translation_unit, 0), - [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(405), - [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1071), - [11] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1404), - [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(945), - [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1464), - [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1212), - [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(374), - [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(554), - [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(554), - [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(559), - [27] = {.entry = {.count = 1, .reusable = true}}, SHIFT(158), - [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(861), - [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(784), - [33] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1461), - [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1268), - [37] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1458), - [39] = {.entry = {.count = 1, .reusable = false}}, SHIFT(879), - [41] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), - [43] = {.entry = {.count = 1, .reusable = false}}, SHIFT(686), - [45] = {.entry = {.count = 1, .reusable = false}}, SHIFT(687), - [47] = {.entry = {.count = 1, .reusable = false}}, SHIFT(758), - [49] = {.entry = {.count = 1, .reusable = false}}, SHIFT(884), - [51] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1156), - [53] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1114), - [55] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1112), - [57] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1265), - [59] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1259), - [61] = {.entry = {.count = 1, .reusable = false}}, SHIFT(507), - [63] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1450), - [65] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1258), - [67] = {.entry = {.count = 1, .reusable = false}}, SHIFT(200), - [69] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1447), - [71] = {.entry = {.count = 1, .reusable = false}}, SHIFT(464), - [73] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1446), - [75] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1444), - [77] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1443), - [79] = {.entry = {.count = 1, .reusable = true}}, SHIFT(511), - [81] = {.entry = {.count = 1, .reusable = false}}, SHIFT(512), - [83] = {.entry = {.count = 1, .reusable = true}}, SHIFT(513), - [85] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1257), - [87] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1122), - [89] = {.entry = {.count = 1, .reusable = false}}, SHIFT(513), - [91] = {.entry = {.count = 1, .reusable = false}}, SHIFT(404), - [93] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1064), - [95] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1371), - [97] = {.entry = {.count = 1, .reusable = false}}, SHIFT(910), - [99] = {.entry = {.count = 1, .reusable = false}}, SHIFT(321), - [101] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1372), - [103] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), - [105] = {.entry = {.count = 1, .reusable = false}}, SHIFT(924), - [107] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1247), - [109] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), - [111] = {.entry = {.count = 1, .reusable = false}}, SHIFT(859), - [113] = {.entry = {.count = 1, .reusable = false}}, SHIFT(787), - [115] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [117] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1269), - [119] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1221), - [121] = {.entry = {.count = 1, .reusable = false}}, SHIFT(558), - [123] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1462), - [125] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1267), - [127] = {.entry = {.count = 1, .reusable = false}}, SHIFT(139), - [129] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1463), - [131] = {.entry = {.count = 1, .reusable = false}}, SHIFT(485), - [133] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1459), - [135] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1456), - [137] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1378), - [139] = {.entry = {.count = 1, .reusable = false}}, SHIFT(348), - [141] = {.entry = {.count = 1, .reusable = false}}, SHIFT(363), - [143] = {.entry = {.count = 1, .reusable = false}}, SHIFT(353), - [145] = {.entry = {.count = 1, .reusable = false}}, SHIFT(335), - [147] = {.entry = {.count = 1, .reusable = false}}, SHIFT(338), - [149] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_elif, 3, .production_id = 35), - [151] = {.entry = {.count = 1, .reusable = false}}, SHIFT(124), - [153] = {.entry = {.count = 1, .reusable = false}}, SHIFT(367), - [155] = {.entry = {.count = 1, .reusable = false}}, SHIFT(104), - [157] = {.entry = {.count = 1, .reusable = false}}, SHIFT(359), - [159] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_elif, 4, .production_id = 35), - [161] = {.entry = {.count = 1, .reusable = false}}, SHIFT(318), - [163] = {.entry = {.count = 1, .reusable = false}}, SHIFT(316), - [165] = {.entry = {.count = 1, .reusable = false}}, SHIFT(325), - [167] = {.entry = {.count = 1, .reusable = false}}, SHIFT(105), - [169] = {.entry = {.count = 1, .reusable = false}}, SHIFT(311), - [171] = {.entry = {.count = 1, .reusable = false}}, SHIFT(122), - [173] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(404), - [176] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1064), - [179] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1371), - [182] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(910), - [185] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), - [187] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1372), - [190] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1247), - [193] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(374), - [196] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(554), - [199] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(554), - [202] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(559), - [205] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(88), - [208] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(859), - [211] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(787), - [214] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1461), - [217] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1268), - [220] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1458), - [223] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(879), - [226] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(25), - [229] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(686), - [232] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(687), - [235] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(758), - [238] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(884), - [241] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1156), - [244] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1114), - [247] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1112), - [250] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1269), - [253] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1221), - [256] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(558), - [259] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1462), - [262] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1267), - [265] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(139), - [268] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1463), - [271] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(485), - [274] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1459), - [277] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1456), - [280] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1378), - [283] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(511), - [286] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(512), - [289] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(513), - [292] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1257), - [295] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1122), - [298] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(513), - [301] = {.entry = {.count = 1, .reusable = false}}, SHIFT(408), - [303] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1063), - [305] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1271), - [307] = {.entry = {.count = 1, .reusable = false}}, SHIFT(942), - [309] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1309), - [311] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1270), - [313] = {.entry = {.count = 1, .reusable = true}}, SHIFT(236), - [315] = {.entry = {.count = 1, .reusable = false}}, SHIFT(855), - [317] = {.entry = {.count = 1, .reusable = false}}, SHIFT(763), - [319] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), - [321] = {.entry = {.count = 1, .reusable = true}}, SHIFT(320), - [323] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1264), - [325] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1244), - [327] = {.entry = {.count = 1, .reusable = false}}, SHIFT(528), - [329] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1453), - [331] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1266), - [333] = {.entry = {.count = 1, .reusable = false}}, SHIFT(162), - [335] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1460), - [337] = {.entry = {.count = 1, .reusable = false}}, SHIFT(483), - [339] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1335), - [341] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1343), - [343] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1315), - [345] = {.entry = {.count = 1, .reusable = true}}, SHIFT(314), - [347] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(407), - [350] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1062), - [353] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1421), - [356] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(935), - [359] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1401), - [362] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1262), - [365] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(155), - [368] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(862), - [371] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(815), - [374] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(35), - [377] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1225), - [380] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1234), - [383] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(531), - [386] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1332), - [389] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1227), - [392] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(131), - [395] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1465), - [398] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(444), - [401] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1330), - [404] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1322), - [407] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1405), - [410] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), - [412] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), - [414] = {.entry = {.count = 1, .reusable = true}}, SHIFT(315), - [416] = {.entry = {.count = 1, .reusable = true}}, SHIFT(248), - [418] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), - [420] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(405), - [423] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1071), - [426] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1404), - [429] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(945), - [432] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1464), - [435] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1212), - [438] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(158), - [441] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(861), - [444] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(784), - [447] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(31), - [450] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1265), - [453] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1259), - [456] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(507), - [459] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1450), - [462] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1258), - [465] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(200), - [468] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1447), - [471] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(464), - [474] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1446), - [477] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1444), - [480] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1443), - [483] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), - [485] = {.entry = {.count = 1, .reusable = true}}, SHIFT(215), - [487] = {.entry = {.count = 1, .reusable = true}}, SHIFT(189), - [489] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), - [491] = {.entry = {.count = 1, .reusable = false}}, SHIFT(407), - [493] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1062), - [495] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1421), - [497] = {.entry = {.count = 1, .reusable = false}}, SHIFT(935), - [499] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_else, 1), - [501] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1401), - [503] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1262), - [505] = {.entry = {.count = 1, .reusable = true}}, SHIFT(155), - [507] = {.entry = {.count = 1, .reusable = false}}, SHIFT(862), - [509] = {.entry = {.count = 1, .reusable = false}}, SHIFT(815), - [511] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), - [513] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1225), - [515] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1234), - [517] = {.entry = {.count = 1, .reusable = false}}, SHIFT(531), - [519] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1332), - [521] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1227), - [523] = {.entry = {.count = 1, .reusable = false}}, SHIFT(131), - [525] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1465), - [527] = {.entry = {.count = 1, .reusable = false}}, SHIFT(444), - [529] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1330), - [531] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1322), - [533] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1405), - [535] = {.entry = {.count = 1, .reusable = true}}, SHIFT(295), - [537] = {.entry = {.count = 1, .reusable = true}}, SHIFT(152), - [539] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(408), - [542] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1063), - [545] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1271), - [548] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(942), - [551] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1309), - [554] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1270), - [557] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(236), - [560] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(855), - [563] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(763), - [566] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(27), - [569] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1264), - [572] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1244), - [575] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(528), - [578] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1453), - [581] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1266), - [584] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(162), - [587] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1460), - [590] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(483), - [593] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1335), - [596] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1343), - [599] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_translation_unit_repeat1, 2), SHIFT_REPEAT(1315), - [602] = {.entry = {.count = 1, .reusable = true}}, SHIFT(354), - [604] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_translation_unit, 1), - [606] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_else, 2), - [608] = {.entry = {.count = 1, .reusable = true}}, SHIFT(356), - [610] = {.entry = {.count = 1, .reusable = true}}, SHIFT(344), - [612] = {.entry = {.count = 1, .reusable = true}}, SHIFT(135), - [614] = {.entry = {.count = 1, .reusable = false}}, SHIFT(406), - [616] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_case_statement, 4, .production_id = 8), - [618] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_case_statement, 3, .production_id = 8), - [620] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(406), - [623] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), - [625] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(374), - [628] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(554), - [631] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(554), - [634] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(559), - [637] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(88), - [640] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(859), - [643] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(686), - [646] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1461), - [649] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1268), - [652] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1458), - [655] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(25), - [658] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(687), - [661] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(758), - [664] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(884), - [667] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1156), - [670] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1114), - [673] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1112), - [676] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1269), - [679] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1221), - [682] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1267), - [685] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(139), - [688] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1463), - [691] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(485), - [694] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1459), - [697] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1456), - [700] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1378), - [703] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(511), - [706] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(512), - [709] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(513), - [712] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1257), - [715] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1122), - [718] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(513), - [721] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_case_statement, 2), - [723] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_case_statement, 3), - [725] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_case_statement, 3, .production_id = 8), - [727] = {.entry = {.count = 1, .reusable = false}}, SHIFT(401), - [729] = {.entry = {.count = 1, .reusable = false}}, SHIFT(403), - [731] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), - [733] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(401), - [736] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(158), - [739] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(861), - [742] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(31), - [745] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1265), - [748] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1259), - [751] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1258), - [754] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(200), - [757] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1447), - [760] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(464), - [763] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1446), - [766] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1444), - [769] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1443), - [772] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_case_statement, 2), - [774] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_case_statement, 3), - [776] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_case_statement, 4, .production_id = 8), - [778] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(403), - [781] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(155), - [784] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(862), - [787] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(35), - [790] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1225), - [793] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1234), - [796] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1227), - [799] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(131), - [802] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1465), - [805] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(444), - [808] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1330), - [811] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1322), - [814] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1405), - [817] = {.entry = {.count = 1, .reusable = false}}, SHIFT(402), - [819] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(402), - [822] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(236), - [825] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(855), - [828] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(27), - [831] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1264), - [834] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1244), - [837] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1266), - [840] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(162), - [843] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1460), - [846] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(483), - [849] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1335), - [852] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1343), - [855] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_case_statement_repeat1, 2), SHIFT_REPEAT(1315), - [858] = {.entry = {.count = 1, .reusable = false}}, SHIFT(409), - [860] = {.entry = {.count = 1, .reusable = true}}, SHIFT(474), - [862] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1219), - [864] = {.entry = {.count = 1, .reusable = true}}, SHIFT(447), - [866] = {.entry = {.count = 1, .reusable = true}}, SHIFT(478), - [868] = {.entry = {.count = 1, .reusable = true}}, SHIFT(481), - [870] = {.entry = {.count = 1, .reusable = false}}, SHIFT(527), - [872] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sizeof_expression, 4, .production_id = 44), - [874] = {.entry = {.count = 1, .reusable = true}}, SHIFT(379), - [876] = {.entry = {.count = 1, .reusable = false}}, SHIFT(508), - [878] = {.entry = {.count = 1, .reusable = true}}, SHIFT(508), - [880] = {.entry = {.count = 1, .reusable = false}}, SHIFT(559), - [882] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sizeof_expression, 4, .production_id = 44), - [884] = {.entry = {.count = 1, .reusable = true}}, SHIFT(410), - [886] = {.entry = {.count = 1, .reusable = true}}, SHIFT(505), - [888] = {.entry = {.count = 1, .reusable = false}}, SHIFT(577), - [890] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_declaration, 4, .production_id = 49), - [892] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 4, .production_id = 49), - [894] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 6, .production_id = 71), - [896] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 6, .production_id = 71), - [898] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_declaration, 3, .production_id = 28), - [900] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 3, .production_id = 28), - [902] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_definition, 4, .production_id = 40), - [904] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_definition, 4, .production_id = 40), - [906] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_switch_statement, 3, .production_id = 23), - [908] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_switch_statement, 3, .production_id = 23), - [910] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_while_statement, 3, .production_id = 23), - [912] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_statement, 3, .production_id = 23), - [914] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 3, .production_id = 22), - [916] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 3, .production_id = 22), - [918] = {.entry = {.count = 1, .reusable = false}}, SHIFT(203), - [920] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_compound_statement, 3), - [922] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_compound_statement, 3), - [924] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_definition, 5, .production_id = 58), - [926] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_definition, 5, .production_id = 58), - [928] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_definition, 5, .production_id = 59), - [930] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_definition, 5, .production_id = 59), - [932] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 5, .production_id = 61), - [934] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 5, .production_id = 61), - [936] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_do_statement, 5, .production_id = 62), - [938] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_do_statement, 5, .production_id = 62), - [940] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_definition, 6, .production_id = 69), - [942] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_definition, 6, .production_id = 69), - [944] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attributed_statement, 2), - [946] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attributed_statement, 2), - [948] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return_statement, 3), - [950] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_statement, 3), - [952] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 6, .production_id = 70), - [954] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 6, .production_id = 70), - [956] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 7, .production_id = 75), - [958] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 7, .production_id = 75), - [960] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_labeled_statement, 3, .production_id = 26), - [962] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_labeled_statement, 3, .production_id = 26), - [964] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression_statement, 1), - [966] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression_statement, 1), - [968] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 7, .production_id = 76), - [970] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 7, .production_id = 76), - [972] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 7, .production_id = 77), - [974] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 7, .production_id = 77), - [976] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 7, .production_id = 78), - [978] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 7, .production_id = 78), - [980] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 7, .production_id = 79), - [982] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 7, .production_id = 79), - [984] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression_statement, 2), - [986] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression_statement, 2), - [988] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 8, .production_id = 80), - [990] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 8, .production_id = 80), - [992] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 8, .production_id = 81), - [994] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 8, .production_id = 81), - [996] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 8, .production_id = 82), - [998] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 8, .production_id = 82), - [1000] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_continue_statement, 2), - [1002] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_continue_statement, 2), - [1004] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 8, .production_id = 83), - [1006] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 8, .production_id = 83), - [1008] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 9, .production_id = 84), - [1010] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 9, .production_id = 84), - [1012] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_break_statement, 2), - [1014] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_break_statement, 2), - [1016] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_goto_statement, 3, .production_id = 24), - [1018] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_goto_statement, 3, .production_id = 24), - [1020] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return_statement, 2), - [1022] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_statement, 2), - [1024] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_compound_statement, 2), - [1026] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_compound_statement, 2), - [1028] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_ifdef, 3, .production_id = 14), - [1030] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_ifdef, 3, .production_id = 14), - [1032] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_if, 4, .production_id = 35), - [1034] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_if, 4, .production_id = 35), - [1036] = {.entry = {.count = 1, .reusable = true}}, SHIFT(380), - [1038] = {.entry = {.count = 1, .reusable = false}}, SHIFT(567), - [1040] = {.entry = {.count = 1, .reusable = true}}, SHIFT(567), - [1042] = {.entry = {.count = 1, .reusable = false}}, SHIFT(525), - [1044] = {.entry = {.count = 1, .reusable = true}}, SHIFT(563), - [1046] = {.entry = {.count = 1, .reusable = false}}, SHIFT(562), - [1048] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_call, 2, .production_id = 3), - [1050] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_call, 2, .production_id = 3), - [1052] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_function_def, 5, .production_id = 53), - [1054] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_function_def, 5, .production_id = 53), - [1056] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_function_def, 4, .production_id = 34), - [1058] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_function_def, 4, .production_id = 34), - [1060] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 4, .production_id = 51), - [1062] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 4, .production_id = 51), - [1064] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_if, 6, .production_id = 66), - [1066] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_if, 6, .production_id = 66), - [1068] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_def, 4, .production_id = 33), - [1070] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_def, 4, .production_id = 33), - [1072] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__empty_declaration, 2), - [1074] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__empty_declaration, 2), - [1076] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_def, 3, .production_id = 14), - [1078] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_def, 3, .production_id = 14), - [1080] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_linkage_specification, 3, .production_id = 18), - [1082] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_linkage_specification, 3, .production_id = 18), - [1084] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_declaration_list, 3), - [1086] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration_list, 3), - [1088] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_call, 3, .production_id = 15), - [1090] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_call, 3, .production_id = 15), - [1092] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 3, .production_id = 29), - [1094] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 3, .production_id = 29), - [1096] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_ifdef, 5, .production_id = 55), - [1098] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_ifdef, 5, .production_id = 55), - [1100] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_declaration_list, 2), - [1102] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration_list, 2), - [1104] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_include, 3, .production_id = 13), - [1106] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_include, 3, .production_id = 13), - [1108] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_if, 5, .production_id = 35), - [1110] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_if, 5, .production_id = 35), - [1112] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_if, 5, .production_id = 54), - [1114] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_if, 5, .production_id = 54), - [1116] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_ifdef, 4, .production_id = 14), - [1118] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_ifdef, 4, .production_id = 14), - [1120] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_ifdef, 4, .production_id = 36), - [1122] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_ifdef, 4, .production_id = 36), - [1124] = {.entry = {.count = 1, .reusable = false}}, SHIFT(615), - [1126] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1246), - [1128] = {.entry = {.count = 1, .reusable = false}}, SHIFT(616), - [1130] = {.entry = {.count = 1, .reusable = false}}, SHIFT(176), - [1132] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(612), - [1135] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(374), - [1138] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(554), - [1141] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(554), - [1144] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(559), - [1147] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(155), - [1150] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1246), - [1153] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(35), - [1156] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1225), - [1159] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1234), - [1162] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(531), - [1165] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1332), - [1168] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1227), - [1171] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(131), - [1174] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1465), - [1177] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(444), - [1180] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1330), - [1183] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1322), - [1186] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1405), - [1189] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(511), - [1192] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(512), - [1195] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(513), - [1198] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1257), - [1201] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1122), - [1204] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(513), - [1207] = {.entry = {.count = 1, .reusable = false}}, SHIFT(612), - [1209] = {.entry = {.count = 1, .reusable = false}}, SHIFT(617), - [1211] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(616), - [1214] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(158), - [1217] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(31), - [1220] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1265), - [1223] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1259), - [1226] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(507), - [1229] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1450), - [1232] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1258), - [1235] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(200), - [1238] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1447), - [1241] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(464), - [1244] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1446), - [1247] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1444), - [1250] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1443), - [1253] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(617), - [1256] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(88), - [1259] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(25), - [1262] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1269), - [1265] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1221), - [1268] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(558), - [1271] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1462), - [1274] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1267), - [1277] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(139), - [1280] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1463), - [1283] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(485), - [1286] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1459), - [1289] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1456), - [1292] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1378), - [1295] = {.entry = {.count = 1, .reusable = false}}, SHIFT(207), - [1297] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(615), - [1300] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(236), - [1303] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(27), - [1306] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1264), - [1309] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1244), - [1312] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(528), - [1315] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1453), - [1318] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1266), - [1321] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(162), - [1324] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1460), - [1327] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(483), - [1330] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1335), - [1333] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1343), - [1336] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT(1315), - [1339] = {.entry = {.count = 1, .reusable = false}}, SHIFT(300), - [1341] = {.entry = {.count = 1, .reusable = false}}, SHIFT(609), - [1343] = {.entry = {.count = 1, .reusable = false}}, SHIFT(519), - [1345] = {.entry = {.count = 1, .reusable = false}}, SHIFT(994), - [1347] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attribute_declaration, 4), - [1349] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute_declaration, 4), - [1351] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attribute_declaration, 3), - [1353] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute_declaration, 3), - [1355] = {.entry = {.count = 1, .reusable = false}}, SHIFT(637), - [1357] = {.entry = {.count = 1, .reusable = true}}, SHIFT(376), - [1359] = {.entry = {.count = 1, .reusable = false}}, SHIFT(526), - [1361] = {.entry = {.count = 1, .reusable = true}}, SHIFT(526), - [1363] = {.entry = {.count = 1, .reusable = true}}, SHIFT(525), - [1365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(521), - [1367] = {.entry = {.count = 1, .reusable = false}}, SHIFT(520), - [1369] = {.entry = {.count = 2, .reusable = false}}, REDUCE(sym__declaration_modifiers, 1), REDUCE(aux_sym_attributed_declarator_repeat1, 1), - [1372] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 1), - [1374] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 1), - [1376] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__declaration_modifiers, 1), - [1378] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__declaration_modifiers, 1), REDUCE(aux_sym_attributed_declarator_repeat1, 1), - [1381] = {.entry = {.count = 1, .reusable = false}}, SHIFT(947), - [1383] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1211), - [1385] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1049), - [1387] = {.entry = {.count = 1, .reusable = true}}, SHIFT(386), - [1389] = {.entry = {.count = 1, .reusable = true}}, SHIFT(646), - [1391] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1238), - [1393] = {.entry = {.count = 1, .reusable = false}}, SHIFT(425), - [1395] = {.entry = {.count = 1, .reusable = false}}, SHIFT(880), - [1397] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1422), - [1399] = {.entry = {.count = 1, .reusable = false}}, SHIFT(911), - [1401] = {.entry = {.count = 1, .reusable = false}}, SHIFT(814), - [1403] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1342), - [1405] = {.entry = {.count = 1, .reusable = false}}, SHIFT(419), - [1407] = {.entry = {.count = 1, .reusable = false}}, SHIFT(930), - [1409] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1255), - [1411] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_elif_in_field_declaration_list, 4, .production_id = 35), - [1413] = {.entry = {.count = 1, .reusable = false}}, SHIFT(674), - [1415] = {.entry = {.count = 1, .reusable = false}}, SHIFT(775), - [1417] = {.entry = {.count = 1, .reusable = false}}, SHIFT(791), - [1419] = {.entry = {.count = 1, .reusable = false}}, SHIFT(675), - [1421] = {.entry = {.count = 1, .reusable = false}}, SHIFT(684), - [1423] = {.entry = {.count = 1, .reusable = false}}, SHIFT(823), - [1425] = {.entry = {.count = 1, .reusable = false}}, SHIFT(830), - [1427] = {.entry = {.count = 1, .reusable = false}}, SHIFT(774), - [1429] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_elif_in_field_declaration_list, 3, .production_id = 35), - [1431] = {.entry = {.count = 1, .reusable = false}}, SHIFT(795), - [1433] = {.entry = {.count = 1, .reusable = false}}, SHIFT(813), - [1435] = {.entry = {.count = 1, .reusable = false}}, SHIFT(677), - [1437] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__type_specifier, 1, .production_id = 1), - [1439] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expression, 1), - [1441] = {.entry = {.count = 3, .reusable = true}}, REDUCE(sym__type_specifier, 1, .production_id = 1), REDUCE(sym__expression, 1), SHIFT(852), - [1445] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expression, 1), - [1447] = {.entry = {.count = 2, .reusable = false}}, REDUCE(sym__type_specifier, 1, .production_id = 1), REDUCE(sym__expression, 1), - [1450] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__type_specifier, 1, .production_id = 1), - [1452] = {.entry = {.count = 1, .reusable = false}}, SHIFT(530), - [1454] = {.entry = {.count = 1, .reusable = true}}, SHIFT(136), - [1456] = {.entry = {.count = 1, .reusable = true}}, SHIFT(530), - [1458] = {.entry = {.count = 1, .reusable = true}}, SHIFT(288), - [1460] = {.entry = {.count = 1, .reusable = true}}, SHIFT(144), - [1462] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__type_specifier, 1, .production_id = 1), REDUCE(sym__expression, 1), - [1465] = {.entry = {.count = 1, .reusable = true}}, SHIFT(234), - [1467] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1279), - [1469] = {.entry = {.count = 1, .reusable = true}}, SHIFT(605), - [1471] = {.entry = {.count = 1, .reusable = true}}, SHIFT(607), - [1473] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1278), - [1475] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(880), - [1478] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1422), - [1481] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(911), - [1484] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), - [1486] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1342), - [1489] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1255), - [1492] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(686), - [1495] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1461), - [1498] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1219), - [1501] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1458), - [1504] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(687), - [1507] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(758), - [1510] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(884), - [1513] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1156), - [1516] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1114), - [1519] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1112), - [1522] = {.entry = {.count = 1, .reusable = true}}, SHIFT(586), - [1524] = {.entry = {.count = 1, .reusable = true}}, SHIFT(580), - [1526] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1400), - [1529] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(894), - [1532] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1369), - [1535] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1223), - [1538] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), - [1540] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1400), - [1542] = {.entry = {.count = 1, .reusable = false}}, SHIFT(894), - [1544] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1369), - [1546] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1223), - [1548] = {.entry = {.count = 1, .reusable = true}}, SHIFT(881), - [1550] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1423), - [1552] = {.entry = {.count = 1, .reusable = false}}, SHIFT(919), - [1554] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_else_in_field_declaration_list, 2), - [1556] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1387), - [1558] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1253), - [1560] = {.entry = {.count = 1, .reusable = true}}, SHIFT(885), - [1562] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_else_in_field_declaration_list, 1), - [1564] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1423), - [1567] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(919), - [1570] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1387), - [1573] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_preproc_if_in_field_declaration_list_repeat1, 2), SHIFT_REPEAT(1253), - [1576] = {.entry = {.count = 1, .reusable = true}}, SHIFT(501), - [1578] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1120), - [1580] = {.entry = {.count = 1, .reusable = false}}, SHIFT(662), - [1582] = {.entry = {.count = 1, .reusable = true}}, SHIFT(489), - [1584] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1083), - [1586] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_concatenated_string_repeat1, 2), - [1588] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_concatenated_string_repeat1, 2), - [1590] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_concatenated_string_repeat1, 2), SHIFT_REPEAT(1122), - [1593] = {.entry = {.count = 1, .reusable = true}}, SHIFT(487), - [1595] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1121), - [1597] = {.entry = {.count = 1, .reusable = true}}, SHIFT(492), - [1599] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1138), - [1601] = {.entry = {.count = 1, .reusable = true}}, SHIFT(495), - [1603] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1073), - [1605] = {.entry = {.count = 1, .reusable = true}}, SHIFT(490), - [1607] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1094), - [1609] = {.entry = {.count = 1, .reusable = true}}, SHIFT(498), - [1611] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1087), - [1613] = {.entry = {.count = 1, .reusable = true}}, SHIFT(502), - [1615] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1096), - [1617] = {.entry = {.count = 1, .reusable = true}}, SHIFT(494), - [1619] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1102), - [1621] = {.entry = {.count = 1, .reusable = true}}, SHIFT(500), - [1623] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1134), - [1625] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_concatenated_string, 2), - [1627] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_concatenated_string, 2), - [1629] = {.entry = {.count = 1, .reusable = true}}, SHIFT(434), - [1631] = {.entry = {.count = 1, .reusable = true}}, SHIFT(990), - [1633] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), - [1635] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 3), - [1637] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 3), - [1639] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [1641] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), - [1643] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), - [1645] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 2), - [1647] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 2), - [1649] = {.entry = {.count = 1, .reusable = true}}, SHIFT(182), - [1651] = {.entry = {.count = 1, .reusable = true}}, SHIFT(214), - [1653] = {.entry = {.count = 1, .reusable = true}}, SHIFT(148), - [1655] = {.entry = {.count = 1, .reusable = true}}, SHIFT(278), - [1657] = {.entry = {.count = 1, .reusable = true}}, SHIFT(445), - [1659] = {.entry = {.count = 1, .reusable = true}}, SHIFT(471), - [1661] = {.entry = {.count = 1, .reusable = true}}, SHIFT(137), - [1663] = {.entry = {.count = 1, .reusable = true}}, SHIFT(249), - [1665] = {.entry = {.count = 1, .reusable = true}}, SHIFT(154), - [1667] = {.entry = {.count = 1, .reusable = true}}, SHIFT(126), - [1669] = {.entry = {.count = 1, .reusable = true}}, SHIFT(190), - [1671] = {.entry = {.count = 1, .reusable = true}}, SHIFT(270), - [1673] = {.entry = {.count = 1, .reusable = true}}, SHIFT(269), - [1675] = {.entry = {.count = 1, .reusable = true}}, SHIFT(466), - [1677] = {.entry = {.count = 1, .reusable = true}}, SHIFT(221), - [1679] = {.entry = {.count = 1, .reusable = true}}, SHIFT(186), - [1681] = {.entry = {.count = 1, .reusable = true}}, SHIFT(220), - [1683] = {.entry = {.count = 1, .reusable = true}}, SHIFT(453), - [1685] = {.entry = {.count = 1, .reusable = true}}, SHIFT(256), - [1687] = {.entry = {.count = 1, .reusable = true}}, SHIFT(127), - [1689] = {.entry = {.count = 1, .reusable = true}}, SHIFT(273), - [1691] = {.entry = {.count = 1, .reusable = true}}, SHIFT(455), - [1693] = {.entry = {.count = 1, .reusable = true}}, SHIFT(206), - [1695] = {.entry = {.count = 1, .reusable = true}}, SHIFT(205), - [1697] = {.entry = {.count = 1, .reusable = true}}, SHIFT(209), - [1699] = {.entry = {.count = 1, .reusable = true}}, SHIFT(457), - [1701] = {.entry = {.count = 1, .reusable = true}}, SHIFT(279), - [1703] = {.entry = {.count = 1, .reusable = true}}, SHIFT(163), - [1705] = {.entry = {.count = 1, .reusable = true}}, SHIFT(451), - [1707] = {.entry = {.count = 1, .reusable = true}}, SHIFT(449), - [1709] = {.entry = {.count = 1, .reusable = true}}, SHIFT(188), - [1711] = {.entry = {.count = 1, .reusable = true}}, SHIFT(187), - [1713] = {.entry = {.count = 1, .reusable = true}}, SHIFT(475), - [1715] = {.entry = {.count = 1, .reusable = true}}, SHIFT(477), - [1717] = {.entry = {.count = 1, .reusable = true}}, SHIFT(482), - [1719] = {.entry = {.count = 1, .reusable = true}}, SHIFT(467), - [1721] = {.entry = {.count = 1, .reusable = true}}, SHIFT(178), - [1723] = {.entry = {.count = 1, .reusable = true}}, SHIFT(277), - [1725] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), - [1727] = {.entry = {.count = 1, .reusable = true}}, SHIFT(179), - [1729] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1116), - [1731] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_expression, 3), - [1733] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_expression, 3), - [1735] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1077), - [1737] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1092), - [1739] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1119), - [1741] = {.entry = {.count = 1, .reusable = true}}, SHIFT(581), - [1743] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1100), - [1745] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1084), - [1747] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1093), - [1749] = {.entry = {.count = 1, .reusable = true}}, SHIFT(636), - [1751] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1147), - [1753] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1131), - [1755] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1101), - [1757] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_cast_expression, 4, .production_id = 39), - [1759] = {.entry = {.count = 1, .reusable = true}}, SHIFT(493), - [1761] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_cast_expression, 4, .production_id = 39), - [1763] = {.entry = {.count = 1, .reusable = true}}, SHIFT(542), - [1765] = {.entry = {.count = 1, .reusable = true}}, SHIFT(545), - [1767] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1361), - [1769] = {.entry = {.count = 1, .reusable = true}}, SHIFT(375), - [1771] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_compound_literal_expression, 4, .production_id = 39), - [1773] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_compound_literal_expression, 4, .production_id = 39), - [1775] = {.entry = {.count = 1, .reusable = true}}, SHIFT(381), - [1777] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, .production_id = 4), - [1779] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unary_expression, 2, .production_id = 4), - [1781] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 4), - [1783] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_argument_list, 4), - [1785] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_expression, 2, .production_id = 4), - [1787] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_pointer_expression, 2, .production_id = 4), - [1789] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_update_expression, 2, .production_id = 4), - [1791] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_update_expression, 2, .production_id = 4), - [1793] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_initializer_list, 3), - [1795] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_initializer_list, 3), - [1797] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_update_expression, 2, .production_id = 9), - [1799] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_update_expression, 2, .production_id = 9), - [1801] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_call_expression, 2, .production_id = 10), - [1803] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_call_expression, 2, .production_id = 10), - [1805] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_subscript_expression, 4, .production_id = 52), - [1807] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_subscript_expression, 4, .production_id = 52), - [1809] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 3), - [1811] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_argument_list, 3), - [1813] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment_expression, 3, .production_id = 25), - [1815] = {.entry = {.count = 1, .reusable = false}}, SHIFT(593), - [1817] = {.entry = {.count = 1, .reusable = false}}, SHIFT(592), - [1819] = {.entry = {.count = 1, .reusable = true}}, SHIFT(590), - [1821] = {.entry = {.count = 1, .reusable = true}}, SHIFT(584), - [1823] = {.entry = {.count = 1, .reusable = false}}, SHIFT(576), - [1825] = {.entry = {.count = 1, .reusable = false}}, SHIFT(573), - [1827] = {.entry = {.count = 1, .reusable = false}}, SHIFT(568), - [1829] = {.entry = {.count = 1, .reusable = true}}, SHIFT(566), - [1831] = {.entry = {.count = 1, .reusable = false}}, SHIFT(565), - [1833] = {.entry = {.count = 1, .reusable = true}}, SHIFT(565), - [1835] = {.entry = {.count = 1, .reusable = false}}, SHIFT(560), - [1837] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment_expression, 3, .production_id = 25), - [1839] = {.entry = {.count = 1, .reusable = true}}, SHIFT(377), - [1841] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_char_literal, 3), - [1843] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_char_literal, 3), - [1845] = {.entry = {.count = 1, .reusable = true}}, SHIFT(378), - [1847] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_initializer_list, 5), - [1849] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_initializer_list, 5), - [1851] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 2), - [1853] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_argument_list, 2), - [1855] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 25), - [1857] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, .production_id = 25), - [1859] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_conditional_expression, 5, .production_id = 65), - [1861] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_conditional_expression, 5, .production_id = 65), - [1863] = {.entry = {.count = 1, .reusable = true}}, SHIFT(602), - [1865] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_expression, 3, .production_id = 32), - [1867] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_expression, 3, .production_id = 32), - [1869] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_initializer_list, 4), - [1871] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_initializer_list, 4), - [1873] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_initializer_list, 2), - [1875] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_initializer_list, 2), - [1877] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sizeof_expression, 2, .production_id = 8), - [1879] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sizeof_expression, 2, .production_id = 8), - [1881] = {.entry = {.count = 1, .reusable = true}}, SHIFT(499), - [1883] = {.entry = {.count = 1, .reusable = false}}, SHIFT(588), - [1885] = {.entry = {.count = 1, .reusable = false}}, SHIFT(603), - [1887] = {.entry = {.count = 1, .reusable = false}}, SHIFT(575), - [1889] = {.entry = {.count = 1, .reusable = true}}, SHIFT(574), - [1891] = {.entry = {.count = 1, .reusable = false}}, SHIFT(572), - [1893] = {.entry = {.count = 1, .reusable = true}}, SHIFT(572), - [1895] = {.entry = {.count = 1, .reusable = false}}, SHIFT(571), - [1897] = {.entry = {.count = 1, .reusable = true}}, SHIFT(587), - [1899] = {.entry = {.count = 1, .reusable = true}}, SHIFT(579), - [1901] = {.entry = {.count = 1, .reusable = false}}, SHIFT(578), - [1903] = {.entry = {.count = 1, .reusable = false}}, SHIFT(504), - [1905] = {.entry = {.count = 1, .reusable = true}}, SHIFT(557), - [1907] = {.entry = {.count = 1, .reusable = false}}, SHIFT(564), - [1909] = {.entry = {.count = 1, .reusable = true}}, SHIFT(564), - [1911] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__declaration_specifiers_repeat1, 2), - [1913] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__declaration_specifiers_repeat1, 2), - [1915] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__declaration_specifiers_repeat1, 2), SHIFT_REPEAT(686), - [1918] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__declaration_specifiers_repeat1, 2), SHIFT_REPEAT(1461), - [1921] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_specifiers_repeat1, 2), SHIFT_REPEAT(1219), - [1924] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__declaration_specifiers_repeat1, 2), SHIFT_REPEAT(1458), - [1927] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__declaration_specifiers_repeat1, 2), SHIFT_REPEAT(687), - [1930] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1075), - [1932] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_pointer_declarator, 1, .dynamic_precedence = 1), - [1934] = {.entry = {.count = 1, .reusable = false}}, SHIFT(998), - [1936] = {.entry = {.count = 1, .reusable = false}}, SHIFT(999), - [1938] = {.entry = {.count = 1, .reusable = true}}, SHIFT(425), - [1940] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_type_definition_repeat1, 2), - [1942] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_type_definition_repeat1, 2), - [1944] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_type_definition_repeat1, 2), SHIFT_REPEAT(662), - [1947] = {.entry = {.count = 1, .reusable = false}}, SHIFT(561), - [1949] = {.entry = {.count = 1, .reusable = true}}, SHIFT(532), - [1951] = {.entry = {.count = 1, .reusable = false}}, SHIFT(532), - [1953] = {.entry = {.count = 1, .reusable = false}}, SHIFT(540), - [1955] = {.entry = {.count = 1, .reusable = true}}, SHIFT(540), - [1957] = {.entry = {.count = 1, .reusable = true}}, SHIFT(541), - [1959] = {.entry = {.count = 1, .reusable = true}}, SHIFT(533), - [1961] = {.entry = {.count = 1, .reusable = true}}, SHIFT(534), - [1963] = {.entry = {.count = 1, .reusable = false}}, SHIFT(536), - [1965] = {.entry = {.count = 1, .reusable = true}}, SHIFT(537), - [1967] = {.entry = {.count = 1, .reusable = false}}, SHIFT(538), - [1969] = {.entry = {.count = 1, .reusable = true}}, SHIFT(539), - [1971] = {.entry = {.count = 1, .reusable = true}}, SHIFT(503), - [1973] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attribute_specifier, 4), - [1975] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute_specifier, 4), - [1977] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ms_declspec_modifier, 4), - [1979] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ms_declspec_modifier, 4), - [1981] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_qualifier, 1), - [1983] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_qualifier, 1), - [1985] = {.entry = {.count = 1, .reusable = true}}, SHIFT(553), - [1987] = {.entry = {.count = 1, .reusable = true}}, SHIFT(549), - [1989] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_declaration, 3, .production_id = 28), - [1991] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_declaration, 3, .production_id = 28), - [1993] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_declaration, 3, .production_id = 37), - [1995] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_declaration, 3, .production_id = 37), - [1997] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_declaration, 2, .production_id = 37), - [1999] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_declaration, 2, .production_id = 37), - [2001] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_ifdef_in_field_declaration_list, 3, .production_id = 14), - [2003] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_ifdef_in_field_declaration_list, 3, .production_id = 14), - [2005] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_if_in_field_declaration_list, 4, .production_id = 35), - [2007] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_if_in_field_declaration_list, 4, .production_id = 35), - [2009] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_ifdef_in_field_declaration_list, 4, .production_id = 36), - [2011] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_ifdef_in_field_declaration_list, 4, .production_id = 36), - [2013] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_ifdef_in_field_declaration_list, 4, .production_id = 14), - [2015] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_ifdef_in_field_declaration_list, 4, .production_id = 14), - [2017] = {.entry = {.count = 1, .reusable = true}}, SHIFT(639), - [2019] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_declaration, 4, .production_id = 28), - [2021] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_declaration, 4, .production_id = 28), - [2023] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_declaration, 4, .production_id = 49), - [2025] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_declaration, 4, .production_id = 49), - [2027] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_if_in_field_declaration_list, 5, .production_id = 54), - [2029] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_if_in_field_declaration_list, 5, .production_id = 54), - [2031] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_if_in_field_declaration_list, 6, .production_id = 66), - [2033] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_if_in_field_declaration_list, 6, .production_id = 66), - [2035] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_if_in_field_declaration_list, 5, .production_id = 35), - [2037] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_if_in_field_declaration_list, 5, .production_id = 35), - [2039] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_ifdef_in_field_declaration_list, 5, .production_id = 55), - [2041] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_ifdef_in_field_declaration_list, 5, .production_id = 55), - [2043] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_storage_class_specifier, 1), - [2045] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_storage_class_specifier, 1), - [2047] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_declaration, 5, .production_id = 49), - [2049] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_declaration, 5, .production_id = 49), - [2051] = {.entry = {.count = 1, .reusable = true}}, SHIFT(491), - [2053] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comma_expression, 3, .production_id = 31), - [2055] = {.entry = {.count = 1, .reusable = true}}, SHIFT(412), - [2057] = {.entry = {.count = 1, .reusable = true}}, SHIFT(535), - [2059] = {.entry = {.count = 1, .reusable = true}}, SHIFT(168), - [2061] = {.entry = {.count = 1, .reusable = true}}, SHIFT(213), - [2063] = {.entry = {.count = 1, .reusable = true}}, SHIFT(208), - [2065] = {.entry = {.count = 1, .reusable = true}}, SHIFT(251), - [2067] = {.entry = {.count = 1, .reusable = true}}, SHIFT(305), - [2069] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), - [2071] = {.entry = {.count = 1, .reusable = true}}, SHIFT(219), - [2073] = {.entry = {.count = 1, .reusable = true}}, SHIFT(238), - [2075] = {.entry = {.count = 1, .reusable = true}}, SHIFT(266), - [2077] = {.entry = {.count = 1, .reusable = true}}, SHIFT(452), - [2079] = {.entry = {.count = 1, .reusable = true}}, SHIFT(157), - [2081] = {.entry = {.count = 1, .reusable = true}}, SHIFT(470), - [2083] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), - [2085] = {.entry = {.count = 1, .reusable = true}}, SHIFT(613), - [2087] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enumerator, 3, .production_id = 60), - [2089] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__declaration_specifiers, 1, .production_id = 2), - [2091] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__declaration_specifiers, 1, .production_id = 2), - [2093] = {.entry = {.count = 1, .reusable = true}}, SHIFT(198), - [2095] = {.entry = {.count = 1, .reusable = true}}, SHIFT(289), - [2097] = {.entry = {.count = 1, .reusable = true}}, SHIFT(463), - [2099] = {.entry = {.count = 1, .reusable = true}}, SHIFT(274), - [2101] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__declaration_specifiers, 2, .production_id = 2), - [2103] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__declaration_specifiers, 2, .production_id = 2), - [2105] = {.entry = {.count = 1, .reusable = true}}, SHIFT(454), - [2107] = {.entry = {.count = 1, .reusable = true}}, SHIFT(441), - [2109] = {.entry = {.count = 1, .reusable = true}}, SHIFT(486), - [2111] = {.entry = {.count = 1, .reusable = true}}, SHIFT(271), - [2113] = {.entry = {.count = 1, .reusable = true}}, SHIFT(480), - [2115] = {.entry = {.count = 1, .reusable = true}}, SHIFT(129), - [2117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(227), - [2119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(164), - [2121] = {.entry = {.count = 1, .reusable = true}}, SHIFT(450), - [2123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(262), - [2125] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_argument_list_repeat1, 2), - [2127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(442), - [2129] = {.entry = {.count = 1, .reusable = true}}, SHIFT(237), - [2131] = {.entry = {.count = 1, .reusable = true}}, SHIFT(173), - [2133] = {.entry = {.count = 1, .reusable = true}}, SHIFT(195), - [2135] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_init_declarator, 3, .production_id = 48), - [2137] = {.entry = {.count = 1, .reusable = true}}, SHIFT(460), - [2139] = {.entry = {.count = 1, .reusable = true}}, SHIFT(459), - [2141] = {.entry = {.count = 1, .reusable = true}}, SHIFT(180), - [2143] = {.entry = {.count = 1, .reusable = true}}, SHIFT(175), - [2145] = {.entry = {.count = 1, .reusable = true}}, SHIFT(244), - [2147] = {.entry = {.count = 1, .reusable = true}}, SHIFT(181), - [2149] = {.entry = {.count = 1, .reusable = true}}, SHIFT(302), - [2151] = {.entry = {.count = 1, .reusable = true}}, SHIFT(465), - [2153] = {.entry = {.count = 1, .reusable = true}}, SHIFT(468), - [2155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(458), - [2157] = {.entry = {.count = 1, .reusable = true}}, SHIFT(159), - [2159] = {.entry = {.count = 1, .reusable = true}}, SHIFT(183), - [2161] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_initializer_pair, 3, .production_id = 74), - [2163] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__declaration_specifiers, 2, .production_id = 11), - [2165] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__declaration_specifiers, 2, .production_id = 11), - [2167] = {.entry = {.count = 1, .reusable = true}}, SHIFT(488), - [2169] = {.entry = {.count = 1, .reusable = true}}, SHIFT(462), - [2171] = {.entry = {.count = 1, .reusable = true}}, SHIFT(224), - [2173] = {.entry = {.count = 1, .reusable = true}}, SHIFT(472), - [2175] = {.entry = {.count = 1, .reusable = true}}, SHIFT(142), - [2177] = {.entry = {.count = 1, .reusable = true}}, SHIFT(259), - [2179] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__declaration_specifiers, 3, .production_id = 11), - [2181] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__declaration_specifiers, 3, .production_id = 11), - [2183] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_initializer_list_repeat1, 2), - [2185] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), - [2187] = {.entry = {.count = 1, .reusable = false}}, SHIFT(556), - [2189] = {.entry = {.count = 1, .reusable = true}}, SHIFT(548), - [2191] = {.entry = {.count = 1, .reusable = false}}, SHIFT(548), - [2193] = {.entry = {.count = 1, .reusable = true}}, SHIFT(518), - [2195] = {.entry = {.count = 1, .reusable = true}}, SHIFT(514), - [2197] = {.entry = {.count = 1, .reusable = false}}, SHIFT(510), - [2199] = {.entry = {.count = 1, .reusable = true}}, SHIFT(509), - [2201] = {.entry = {.count = 1, .reusable = false}}, SHIFT(544), - [2203] = {.entry = {.count = 1, .reusable = true}}, SHIFT(608), - [2205] = {.entry = {.count = 1, .reusable = false}}, SHIFT(552), - [2207] = {.entry = {.count = 1, .reusable = true}}, SHIFT(552), - [2209] = {.entry = {.count = 1, .reusable = true}}, SHIFT(517), - [2211] = {.entry = {.count = 1, .reusable = true}}, SHIFT(550), - [2213] = {.entry = {.count = 1, .reusable = true}}, SHIFT(543), - [2215] = {.entry = {.count = 1, .reusable = true}}, SHIFT(547), - [2217] = {.entry = {.count = 2, .reusable = false}}, REDUCE(sym_sized_type_specifier, 1), SHIFT(889), - [2220] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sized_type_specifier, 1), - [2222] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sized_type_specifier, 1), - [2224] = {.entry = {.count = 1, .reusable = false}}, SHIFT(818), - [2226] = {.entry = {.count = 1, .reusable = false}}, SHIFT(890), - [2228] = {.entry = {.count = 1, .reusable = true}}, SHIFT(591), - [2230] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), - [2232] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), - [2234] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1143), - [2236] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_bitfield_clause, 2), - [2238] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1185), - [2240] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_sized_type_specifier_repeat1, 2), - [2242] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_sized_type_specifier_repeat1, 2), - [2244] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_sized_type_specifier_repeat1, 2), SHIFT_REPEAT(818), - [2247] = {.entry = {.count = 1, .reusable = true}}, SHIFT(569), - [2249] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), - [2251] = {.entry = {.count = 1, .reusable = true}}, SHIFT(589), - [2253] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_pointer_declarator, 2, .dynamic_precedence = 1), - [2255] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1089), - [2257] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1033), - [2259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(834), - [2261] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1097), - [2263] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1036), - [2265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(833), - [2267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1024), - [2269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(839), - [2271] = {.entry = {.count = 1, .reusable = true}}, SHIFT(324), - [2273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(323), - [2275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(336), - [2277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), - [2279] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_specifier, 3, .production_id = 20), - [2281] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_specifier, 3, .production_id = 20), - [2283] = {.entry = {.count = 1, .reusable = true}}, SHIFT(418), - [2285] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_enum_specifier, 2, .production_id = 6), - [2287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enum_specifier, 2, .production_id = 6), - [2289] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1146), - [2291] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_specifier, 2, .production_id = 6), - [2293] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_specifier, 2, .production_id = 6), - [2295] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_union_specifier, 2, .production_id = 6), - [2297] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_union_specifier, 2, .production_id = 6), - [2299] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_union_specifier, 3, .production_id = 20), - [2301] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_union_specifier, 3, .production_id = 20), - [2303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__preproc_expression, 1), - [2305] = {.entry = {.count = 1, .reusable = true}}, SHIFT(876), - [2307] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__preproc_expression, 1), - [2309] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_specifier, 3, .production_id = 21), - [2311] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_specifier, 3, .production_id = 21), - [2313] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_specifier, 3, .production_id = 19), - [2315] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_specifier, 3, .production_id = 19), - [2317] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_macro_type_specifier, 4, .dynamic_precedence = -1, .production_id = 45), - [2319] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_macro_type_specifier, 4, .dynamic_precedence = -1, .production_id = 45), - [2321] = {.entry = {.count = 1, .reusable = true}}, SHIFT(902), - [2323] = {.entry = {.count = 1, .reusable = true}}, SHIFT(968), - [2325] = {.entry = {.count = 1, .reusable = true}}, SHIFT(912), - [2327] = {.entry = {.count = 1, .reusable = true}}, SHIFT(913), - [2329] = {.entry = {.count = 1, .reusable = false}}, SHIFT(913), - [2331] = {.entry = {.count = 1, .reusable = true}}, SHIFT(917), - [2333] = {.entry = {.count = 1, .reusable = true}}, SHIFT(920), - [2335] = {.entry = {.count = 1, .reusable = false}}, SHIFT(923), - [2337] = {.entry = {.count = 1, .reusable = true}}, SHIFT(925), - [2339] = {.entry = {.count = 1, .reusable = false}}, SHIFT(927), - [2341] = {.entry = {.count = 1, .reusable = true}}, SHIFT(928), - [2343] = {.entry = {.count = 1, .reusable = false}}, SHIFT(931), - [2345] = {.entry = {.count = 1, .reusable = true}}, SHIFT(931), - [2347] = {.entry = {.count = 1, .reusable = true}}, SHIFT(933), - [2349] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_enumerator_list, 4), - [2351] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enumerator_list, 4), - [2353] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_enum_specifier, 2, .production_id = 7), - [2355] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enum_specifier, 2, .production_id = 7), - [2357] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_union_specifier, 4, .production_id = 43), - [2359] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_union_specifier, 4, .production_id = 43), - [2361] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_specifier, 4, .production_id = 43), - [2363] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_specifier, 4, .production_id = 43), - [2365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(921), - [2367] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_specifier, 2, .production_id = 7), - [2369] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_specifier, 2, .production_id = 7), - [2371] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_enumerator_list, 2), - [2373] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enumerator_list, 2), - [2375] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_union_specifier, 2, .production_id = 7), - [2377] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_union_specifier, 2, .production_id = 7), - [2379] = {.entry = {.count = 1, .reusable = false}}, SHIFT(863), - [2381] = {.entry = {.count = 1, .reusable = true}}, SHIFT(929), - [2383] = {.entry = {.count = 1, .reusable = true}}, SHIFT(932), - [2385] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1248), - [2387] = {.entry = {.count = 1, .reusable = true}}, SHIFT(936), - [2389] = {.entry = {.count = 1, .reusable = false}}, SHIFT(936), - [2391] = {.entry = {.count = 1, .reusable = true}}, SHIFT(872), - [2393] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1222), - [2395] = {.entry = {.count = 1, .reusable = false}}, SHIFT(888), - [2397] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(), - [2399] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_enumerator_list, 3), - [2401] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enumerator_list, 3), - [2403] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ms_call_modifier, 1), - [2405] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ms_call_modifier, 1), - [2407] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__type_specifier, 1, .production_id = 1), SHIFT(852), - [2410] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_declaration_list, 3), - [2412] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_declaration_list, 3), - [2414] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_type_definition_repeat1, 2), SHIFT_REPEAT(687), - [2417] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_union_specifier, 3, .production_id = 21), - [2419] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_union_specifier, 3, .production_id = 21), - [2421] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__type_specifier, 1), - [2423] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__type_specifier, 1), - [2425] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_declaration_list, 2), - [2427] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_declaration_list, 2), - [2429] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_union_specifier, 3, .production_id = 19), - [2431] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_union_specifier, 3, .production_id = 19), - [2433] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_enum_specifier, 3, .production_id = 19), - [2435] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enum_specifier, 3, .production_id = 19), - [2437] = {.entry = {.count = 1, .reusable = true}}, SHIFT(949), - [2439] = {.entry = {.count = 1, .reusable = true}}, SHIFT(867), - [2441] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sized_type_specifier, 2, .dynamic_precedence = -1, .production_id = 12), - [2443] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sized_type_specifier, 2, .dynamic_precedence = -1, .production_id = 12), - [2445] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sized_type_specifier, 2, .production_id = 11), - [2447] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sized_type_specifier, 2, .production_id = 11), - [2449] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_enumerator_list, 5), - [2451] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enumerator_list, 5), - [2453] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_binary_expression, 3, .production_id = 25), - [2455] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_binary_expression, 3, .production_id = 25), - [2457] = {.entry = {.count = 1, .reusable = false}}, SHIFT(877), - [2459] = {.entry = {.count = 1, .reusable = true}}, SHIFT(916), - [2461] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1256), - [2463] = {.entry = {.count = 1, .reusable = true}}, SHIFT(918), - [2465] = {.entry = {.count = 1, .reusable = false}}, SHIFT(918), - [2467] = {.entry = {.count = 1, .reusable = true}}, SHIFT(954), - [2469] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1241), - [2471] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_call_expression, 2, .production_id = 10), - [2473] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_call_expression, 2, .production_id = 10), - [2475] = {.entry = {.count = 1, .reusable = true}}, SHIFT(914), - [2477] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_defined, 2), - [2479] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_defined, 2), - [2481] = {.entry = {.count = 1, .reusable = true}}, SHIFT(971), - [2483] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_unary_expression, 2, .production_id = 4), - [2485] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_unary_expression, 2, .production_id = 4), - [2487] = {.entry = {.count = 1, .reusable = true}}, SHIFT(970), - [2489] = {.entry = {.count = 1, .reusable = true}}, SHIFT(969), - [2491] = {.entry = {.count = 1, .reusable = true}}, SHIFT(951), - [2493] = {.entry = {.count = 1, .reusable = true}}, SHIFT(955), - [2495] = {.entry = {.count = 1, .reusable = true}}, SHIFT(926), - [2497] = {.entry = {.count = 1, .reusable = true}}, SHIFT(893), - [2499] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_preproc_argument_list_repeat1, 2), - [2501] = {.entry = {.count = 1, .reusable = true}}, SHIFT(960), - [2503] = {.entry = {.count = 1, .reusable = true}}, SHIFT(961), - [2505] = {.entry = {.count = 1, .reusable = true}}, SHIFT(896), - [2507] = {.entry = {.count = 1, .reusable = true}}, SHIFT(958), - [2509] = {.entry = {.count = 1, .reusable = true}}, SHIFT(950), - [2511] = {.entry = {.count = 1, .reusable = true}}, SHIFT(897), - [2513] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_argument_list, 3), - [2515] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_argument_list, 3), - [2517] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_defined, 4), - [2519] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_defined, 4), - [2521] = {.entry = {.count = 1, .reusable = true}}, SHIFT(898), - [2523] = {.entry = {.count = 1, .reusable = true}}, SHIFT(956), - [2525] = {.entry = {.count = 1, .reusable = true}}, SHIFT(899), - [2527] = {.entry = {.count = 1, .reusable = true}}, SHIFT(900), - [2529] = {.entry = {.count = 1, .reusable = true}}, SHIFT(901), - [2531] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_argument_list, 2), - [2533] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_argument_list, 2), - [2535] = {.entry = {.count = 1, .reusable = true}}, SHIFT(963), - [2537] = {.entry = {.count = 1, .reusable = true}}, SHIFT(904), - [2539] = {.entry = {.count = 1, .reusable = true}}, SHIFT(964), - [2541] = {.entry = {.count = 1, .reusable = true}}, SHIFT(892), - [2543] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_argument_list, 4), - [2545] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_argument_list, 4), - [2547] = {.entry = {.count = 1, .reusable = true}}, SHIFT(967), - [2549] = {.entry = {.count = 1, .reusable = true}}, SHIFT(906), - [2551] = {.entry = {.count = 1, .reusable = true}}, SHIFT(974), - [2553] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_parenthesized_expression, 3), - [2555] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_parenthesized_expression, 3), - [2557] = {.entry = {.count = 1, .reusable = true}}, SHIFT(975), - [2559] = {.entry = {.count = 1, .reusable = true}}, SHIFT(977), - [2561] = {.entry = {.count = 1, .reusable = true}}, SHIFT(948), - [2563] = {.entry = {.count = 1, .reusable = true}}, SHIFT(966), - [2565] = {.entry = {.count = 1, .reusable = true}}, SHIFT(976), - [2567] = {.entry = {.count = 1, .reusable = true}}, SHIFT(973), - [2569] = {.entry = {.count = 1, .reusable = true}}, SHIFT(965), - [2571] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_declaration, 1, .production_id = 37), - [2573] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__declarator, 1), REDUCE(sym__type_specifier, 1, .production_id = 1), - [2576] = {.entry = {.count = 3, .reusable = true}}, REDUCE(sym__declarator, 1), REDUCE(sym__type_specifier, 1, .production_id = 1), SHIFT(852), - [2580] = {.entry = {.count = 2, .reusable = false}}, REDUCE(sym__declarator, 1), REDUCE(sym__type_specifier, 1, .production_id = 1), - [2583] = {.entry = {.count = 1, .reusable = false}}, SHIFT(937), - [2585] = {.entry = {.count = 1, .reusable = false}}, SHIFT(939), - [2587] = {.entry = {.count = 1, .reusable = false}}, SHIFT(943), - [2589] = {.entry = {.count = 1, .reusable = false}}, SHIFT(944), - [2591] = {.entry = {.count = 1, .reusable = false}}, SHIFT(905), - [2593] = {.entry = {.count = 1, .reusable = false}}, SHIFT(907), - [2595] = {.entry = {.count = 1, .reusable = false}}, SHIFT(909), - [2597] = {.entry = {.count = 1, .reusable = false}}, SHIFT(915), - [2599] = {.entry = {.count = 1, .reusable = true}}, SHIFT(398), - [2601] = {.entry = {.count = 1, .reusable = false}}, SHIFT(940), - [2603] = {.entry = {.count = 1, .reusable = false}}, SHIFT(941), - [2605] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), - [2607] = {.entry = {.count = 1, .reusable = true}}, SHIFT(387), - [2609] = {.entry = {.count = 1, .reusable = true}}, SHIFT(392), - [2611] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), - [2613] = {.entry = {.count = 1, .reusable = true}}, SHIFT(972), - [2615] = {.entry = {.count = 1, .reusable = true}}, SHIFT(397), - [2617] = {.entry = {.count = 1, .reusable = true}}, SHIFT(938), - [2619] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [2621] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), - [2623] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [2625] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_descriptor, 2, .production_id = 11), - [2627] = {.entry = {.count = 1, .reusable = true}}, SHIFT(687), - [2629] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_descriptor, 1, .production_id = 2), - [2631] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_descriptor, 2, .production_id = 2), - [2633] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_descriptor, 3, .production_id = 11), - [2635] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_pointer_declarator_repeat1, 2), - [2637] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_pointer_declarator_repeat1, 2), - [2639] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_pointer_declarator_repeat1, 2), SHIFT_REPEAT(998), - [2642] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_pointer_declarator_repeat1, 2), SHIFT_REPEAT(999), - [2645] = {.entry = {.count = 1, .reusable = false}}, SHIFT(889), - [2647] = {.entry = {.count = 1, .reusable = true}}, SHIFT(817), - [2649] = {.entry = {.count = 1, .reusable = true}}, SHIFT(555), - [2651] = {.entry = {.count = 1, .reusable = true}}, SHIFT(829), - [2653] = {.entry = {.count = 1, .reusable = true}}, SHIFT(668), - [2655] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ms_pointer_modifier, 1), - [2657] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ms_pointer_modifier, 1), - [2659] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ms_unaligned_ptr_modifier, 1), - [2661] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ms_unaligned_ptr_modifier, 1), - [2663] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1007), - [2665] = {.entry = {.count = 1, .reusable = true}}, SHIFT(610), - [2667] = {.entry = {.count = 1, .reusable = true}}, SHIFT(156), - [2669] = {.entry = {.count = 1, .reusable = false}}, SHIFT(426), - [2671] = {.entry = {.count = 1, .reusable = true}}, SHIFT(461), - [2673] = {.entry = {.count = 1, .reusable = true}}, SHIFT(308), - [2675] = {.entry = {.count = 1, .reusable = true}}, SHIFT(257), - [2677] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), - [2679] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declarator, 3, .production_id = 30), - [2681] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1461), - [2683] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declarator, 3, .production_id = 30), - [2685] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_declarator, 4, .dynamic_precedence = 1, .production_id = 63), - [2687] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1019), - [2689] = {.entry = {.count = 1, .reusable = true}}, SHIFT(666), - [2691] = {.entry = {.count = 1, .reusable = false}}, SHIFT(428), - [2693] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_declarator, 2, .dynamic_precedence = 1, .production_id = 27), - [2695] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_declarator, 3, .dynamic_precedence = 1, .production_id = 46), - [2697] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), - [2699] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), SHIFT_REPEAT(1268), - [2702] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_attributed_declarator_repeat1, 2), - [2704] = {.entry = {.count = 1, .reusable = true}}, SHIFT(770), - [2706] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_function_declarator_repeat1, 2), - [2708] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_declarator_repeat1, 2), SHIFT_REPEAT(1461), - [2711] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_function_declarator_repeat1, 2), - [2713] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declarator, 2, .production_id = 30), - [2715] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declarator, 2, .production_id = 30), - [2717] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_declarator, 5, .dynamic_precedence = 1, .production_id = 72), - [2719] = {.entry = {.count = 1, .reusable = true}}, SHIFT(800), - [2721] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attributed_declarator, 2), - [2723] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attributed_declarator, 2), - [2725] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_field_declarator, 2, .dynamic_precedence = 1, .production_id = 27), - [2727] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_field_declarator, 5, .dynamic_precedence = 1, .production_id = 72), - [2729] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_field_declarator, 4, .dynamic_precedence = 1, .production_id = 63), - [2731] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_list, 2), - [2733] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameter_list, 2), - [2735] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_list, 4), - [2737] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameter_list, 4), - [2739] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_list, 3), - [2741] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameter_list, 3), - [2743] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_field_declarator, 3, .dynamic_precedence = 1, .production_id = 46), - [2745] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_declaration_repeat1, 2, .production_id = 27), - [2747] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1038), - [2749] = {.entry = {.count = 1, .reusable = true}}, SHIFT(150), - [2751] = {.entry = {.count = 1, .reusable = false}}, SHIFT(431), - [2753] = {.entry = {.count = 1, .reusable = true}}, SHIFT(303), - [2755] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attributed_field_declarator, 2), - [2757] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attributed_field_declarator, 2), - [2759] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78), - [2761] = {.entry = {.count = 1, .reusable = true}}, SHIFT(172), - [2763] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_type_declarator, 4, .dynamic_precedence = 1, .production_id = 63), - [2765] = {.entry = {.count = 1, .reusable = true}}, SHIFT(222), - [2767] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_type_declarator, 2, .dynamic_precedence = 1, .production_id = 27), - [2769] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1180), - [2771] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1133), - [2773] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1320), - [2775] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1171), - [2777] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1319), - [2779] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1163), - [2781] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1448), - [2783] = {.entry = {.count = 1, .reusable = true}}, SHIFT(132), - [2785] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), - [2787] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_type_declarator, 5, .dynamic_precedence = 1, .production_id = 72), - [2789] = {.entry = {.count = 1, .reusable = true}}, SHIFT(287), - [2791] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_field_declaration_repeat1, 2, .production_id = 27), - [2793] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pointer_type_declarator, 3, .dynamic_precedence = 1, .production_id = 46), - [2795] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1165), - [2797] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1437), - [2799] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_type_definition_repeat2, 2, .production_id = 27), - [2801] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_declarator, 3, .production_id = 47), - [2803] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_declarator, 3, .production_id = 47), - [2805] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__declarator, 1), - [2807] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__declarator, 1), - [2809] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_declarator, 5, .production_id = 73), - [2811] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_declarator, 5, .production_id = 73), - [2813] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_declarator, 3, .dynamic_precedence = -10), - [2815] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_declarator, 3, .dynamic_precedence = -10), - [2817] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attributed_type_declarator, 2), - [2819] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attributed_type_declarator, 2), - [2821] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_declaration, 2, .production_id = 28), - [2823] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_declarator, 4, .production_id = 47), - [2825] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_declarator, 4, .production_id = 47), - [2827] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_declarator, 4, .production_id = 64), - [2829] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_declarator, 4, .production_id = 64), - [2831] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__field_declarator, 1), - [2833] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__field_declarator, 1), - [2835] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_field_declarator, 3, .dynamic_precedence = -10), - [2837] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_field_declarator, 3, .dynamic_precedence = -10), - [2839] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_field_declarator, 4, .production_id = 47), - [2841] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_field_declarator, 4, .production_id = 47), - [2843] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1104), - [2845] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__field_declarator, 1, .production_id = 42), - [2847] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__field_declarator, 1, .production_id = 42), - [2849] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1086), - [2851] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_field_declarator, 2, .production_id = 30), - [2853] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_field_declarator, 2, .production_id = 30), - [2855] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_field_declarator, 4, .production_id = 64), - [2857] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_field_declarator, 4, .production_id = 64), - [2859] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_field_declarator, 5, .production_id = 73), - [2861] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_field_declarator, 5, .production_id = 73), - [2863] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_field_declarator, 3, .production_id = 47), - [2865] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_field_declarator, 3, .production_id = 47), - [2867] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1078), - [2869] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_type_declarator, 4, .production_id = 47), - [2871] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_type_declarator, 4, .production_id = 47), - [2873] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__type_declarator, 1, .production_id = 1), - [2875] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__type_declarator, 1, .production_id = 1), - [2877] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__type_declarator, 1), - [2879] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__type_declarator, 1), - [2881] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_initializer_pair_repeat1, 2), SHIFT_REPEAT(607), - [2884] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_initializer_pair_repeat1, 2), - [2886] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_initializer_pair_repeat1, 2), SHIFT_REPEAT(1278), - [2889] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_type_declarator, 4, .production_id = 64), - [2891] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_type_declarator, 4, .production_id = 64), - [2893] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_type_declarator, 5, .production_id = 73), - [2895] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_type_declarator, 5, .production_id = 73), - [2897] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_type_declarator, 3, .production_id = 47), - [2899] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_type_declarator, 3, .production_id = 47), - [2901] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_type_declarator, 2, .production_id = 30), - [2903] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_type_declarator, 2, .production_id = 30), - [2905] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_type_declarator, 3, .dynamic_precedence = -10), - [2907] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_type_declarator, 3, .dynamic_precedence = -10), - [2909] = {.entry = {.count = 1, .reusable = true}}, SHIFT(484), - [2911] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1278), - [2913] = {.entry = {.count = 1, .reusable = true}}, SHIFT(680), - [2915] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_pointer_declarator, 3, .dynamic_precedence = 1, .production_id = 46), - [2917] = {.entry = {.count = 1, .reusable = true}}, SHIFT(424), - [2919] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_pointer_declarator, 2, .dynamic_precedence = 1, .production_id = 27), - [2921] = {.entry = {.count = 1, .reusable = true}}, SHIFT(811), - [2923] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute, 1, .production_id = 5), - [2925] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1383), - [2927] = {.entry = {.count = 1, .reusable = true}}, SHIFT(789), - [2929] = {.entry = {.count = 1, .reusable = false}}, SHIFT(851), - [2931] = {.entry = {.count = 1, .reusable = false}}, SHIFT(850), - [2933] = {.entry = {.count = 1, .reusable = false}}, SHIFT(347), - [2935] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1190), - [2937] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1292), - [2939] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_array_declarator, 4, .production_id = 64), - [2941] = {.entry = {.count = 1, .reusable = false}}, SHIFT(670), - [2943] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1298), - [2945] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1442), - [2947] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1140), - [2949] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1140), - [2951] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_array_declarator, 3, .production_id = 56), - [2953] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_array_declarator, 3), - [2955] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_array_declarator, 3, .production_id = 47), - [2957] = {.entry = {.count = 1, .reusable = false}}, SHIFT(440), - [2959] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1145), - [2961] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1145), - [2963] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_descriptor, 4, .production_id = 57), - [2965] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_parenthesized_declarator, 3), - [2967] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute, 3, .production_id = 41), - [2969] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_descriptor, 3, .production_id = 40), - [2971] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_descriptor, 3, .production_id = 38), - [2973] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_function_declarator, 2, .production_id = 30), - [2975] = {.entry = {.count = 1, .reusable = false}}, SHIFT(330), - [2977] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1310), - [2979] = {.entry = {.count = 1, .reusable = false}}, SHIFT(794), - [2981] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1308), - [2983] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_array_declarator, 4, .production_id = 67), - [2985] = {.entry = {.count = 1, .reusable = false}}, SHIFT(765), - [2987] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1304), - [2989] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1452), - [2991] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1118), - [2993] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1118), - [2995] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_array_declarator, 4, .production_id = 47), - [2997] = {.entry = {.count = 1, .reusable = false}}, SHIFT(114), - [2999] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1418), - [3001] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_field_declaration_repeat1, 2, .production_id = 50), SHIFT_REPEAT(1019), - [3004] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_field_declaration_repeat1, 2, .production_id = 50), - [3006] = {.entry = {.count = 1, .reusable = false}}, SHIFT(692), - [3008] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_array_declarator, 2), - [3010] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1124), - [3012] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2), - [3014] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_literal_repeat1, 2), SHIFT_REPEAT(1140), - [3017] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2), SHIFT_REPEAT(1140), - [3020] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_function_declarator, 1, .production_id = 17), - [3022] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__abstract_declarator, 1), - [3024] = {.entry = {.count = 1, .reusable = false}}, SHIFT(730), - [3026] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1137), - [3028] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1137), - [3030] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_descriptor, 2, .production_id = 16), - [3032] = {.entry = {.count = 1, .reusable = false}}, SHIFT(436), - [3034] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1200), - [3036] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1374), - [3038] = {.entry = {.count = 1, .reusable = true}}, SHIFT(874), - [3040] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_abstract_array_declarator, 5, .production_id = 73), - [3042] = {.entry = {.count = 1, .reusable = false}}, SHIFT(310), - [3044] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1399), - [3046] = {.entry = {.count = 1, .reusable = true}}, SHIFT(618), - [3048] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1051), - [3050] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1226), - [3052] = {.entry = {.count = 1, .reusable = true}}, SHIFT(611), - [3054] = {.entry = {.count = 1, .reusable = true}}, SHIFT(210), - [3056] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_type_definition_repeat2, 2, .production_id = 50), SHIFT_REPEAT(1038), - [3059] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_type_definition_repeat2, 2, .production_id = 50), - [3061] = {.entry = {.count = 1, .reusable = true}}, SHIFT(165), - [3063] = {.entry = {.count = 1, .reusable = true}}, SHIFT(194), - [3065] = {.entry = {.count = 1, .reusable = true}}, SHIFT(849), - [3067] = {.entry = {.count = 1, .reusable = true}}, SHIFT(285), - [3069] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1050), - [3071] = {.entry = {.count = 1, .reusable = true}}, SHIFT(185), - [3073] = {.entry = {.count = 1, .reusable = true}}, SHIFT(184), - [3075] = {.entry = {.count = 1, .reusable = true}}, SHIFT(891), - [3077] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_enumerator_list_repeat1, 2), SHIFT_REPEAT(1214), - [3080] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_enumerator_list_repeat1, 2), - [3082] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), - [3084] = {.entry = {.count = 1, .reusable = true}}, SHIFT(638), - [3086] = {.entry = {.count = 1, .reusable = true}}, SHIFT(355), - [3088] = {.entry = {.count = 1, .reusable = true}}, SHIFT(934), - [3090] = {.entry = {.count = 1, .reusable = true}}, SHIFT(413), - [3092] = {.entry = {.count = 1, .reusable = true}}, SHIFT(665), - [3094] = {.entry = {.count = 1, .reusable = true}}, SHIFT(309), - [3096] = {.entry = {.count = 1, .reusable = true}}, SHIFT(161), - [3098] = {.entry = {.count = 1, .reusable = true}}, SHIFT(331), - [3100] = {.entry = {.count = 1, .reusable = true}}, SHIFT(383), - [3102] = {.entry = {.count = 1, .reusable = true}}, SHIFT(276), - [3104] = {.entry = {.count = 1, .reusable = true}}, SHIFT(848), - [3106] = {.entry = {.count = 1, .reusable = true}}, SHIFT(853), - [3108] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), - [3110] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1237), - [3112] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1209), - [3114] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_argument_list_repeat1, 2), SHIFT_REPEAT(553), - [3117] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_preproc_argument_list_repeat1, 2), SHIFT_REPEAT(902), - [3120] = {.entry = {.count = 1, .reusable = true}}, SHIFT(322), - [3122] = {.entry = {.count = 1, .reusable = true}}, SHIFT(952), - [3124] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_initializer_list_repeat1, 2), SHIFT_REPEAT(415), - [3127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(681), - [3129] = {.entry = {.count = 1, .reusable = true}}, SHIFT(523), - [3131] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_subscript_designator, 3), - [3133] = {.entry = {.count = 1, .reusable = true}}, SHIFT(264), - [3135] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), - [3137] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), - [3139] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_preproc_params_repeat1, 2), SHIFT_REPEAT(1237), - [3142] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_preproc_params_repeat1, 2), - [3144] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1208), - [3146] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1213), - [3148] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_declaration_repeat1, 2, .production_id = 50), SHIFT_REPEAT(1007), - [3151] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_declaration_repeat1, 2, .production_id = 50), - [3153] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1161), - [3155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(868), - [3157] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), - [3159] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attribute_declaration_repeat1, 2), SHIFT_REPEAT(1226), - [3162] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attribute_declaration_repeat1, 2), - [3164] = {.entry = {.count = 1, .reusable = true}}, SHIFT(382), - [3166] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_parameter_list_repeat1, 2), SHIFT_REPEAT(618), - [3169] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_parameter_list_repeat1, 2), - [3171] = {.entry = {.count = 1, .reusable = true}}, SHIFT(138), - [3173] = {.entry = {.count = 1, .reusable = true}}, SHIFT(171), - [3175] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_enumerator, 1, .production_id = 5), - [3177] = {.entry = {.count = 1, .reusable = true}}, SHIFT(515), - [3179] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), - [3181] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1194), - [3183] = {.entry = {.count = 1, .reusable = true}}, SHIFT(878), - [3185] = {.entry = {.count = 1, .reusable = true}}, SHIFT(614), - [3187] = {.entry = {.count = 1, .reusable = true}}, SHIFT(293), - [3189] = {.entry = {.count = 1, .reusable = true}}, SHIFT(167), - [3191] = {.entry = {.count = 1, .reusable = true}}, SHIFT(294), - [3193] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_designator, 2, .production_id = 68), - [3195] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1239), - [3197] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_params, 4), - [3199] = {.entry = {.count = 1, .reusable = true}}, SHIFT(496), - [3201] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variadic_parameter, 1), - [3203] = {.entry = {.count = 1, .reusable = false}}, SHIFT(361), - [3205] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1431), - [3207] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_params, 2), - [3209] = {.entry = {.count = 1, .reusable = false}}, SHIFT(342), - [3211] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1365), - [3213] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1110), - [3215] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1419), - [3217] = {.entry = {.count = 1, .reusable = false}}, SHIFT(809), - [3219] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1318), - [3221] = {.entry = {.count = 1, .reusable = true}}, SHIFT(497), - [3223] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute, 2, .production_id = 5), - [3225] = {.entry = {.count = 1, .reusable = false}}, SHIFT(333), - [3227] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1356), - [3229] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1233), - [3231] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_preproc_params, 3), - [3233] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1286), - [3235] = {.entry = {.count = 1, .reusable = false}}, SHIFT(109), - [3237] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1406), - [3239] = {.entry = {.count = 1, .reusable = false}}, SHIFT(107), - [3241] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1441), - [3243] = {.entry = {.count = 1, .reusable = true}}, SHIFT(903), - [3245] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1339), - [3247] = {.entry = {.count = 1, .reusable = false}}, SHIFT(768), - [3249] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1306), - [3251] = {.entry = {.count = 1, .reusable = false}}, SHIFT(772), - [3253] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1295), - [3255] = {.entry = {.count = 1, .reusable = false}}, SHIFT(764), - [3257] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1303), - [3259] = {.entry = {.count = 1, .reusable = false}}, SHIFT(673), - [3261] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1300), - [3263] = {.entry = {.count = 1, .reusable = false}}, SHIFT(669), - [3265] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1297), - [3267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(959), - [3269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1396), - [3271] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1410), - [3273] = {.entry = {.count = 1, .reusable = false}}, SHIFT(372), - [3275] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1294), - [3277] = {.entry = {.count = 1, .reusable = false}}, SHIFT(345), - [3279] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1291), - [3281] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute, 4, .production_id = 41), - [3283] = {.entry = {.count = 1, .reusable = false}}, SHIFT(352), - [3285] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1301), - [3287] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1129), - [3289] = {.entry = {.count = 1, .reusable = true}}, SHIFT(790), - [3291] = {.entry = {.count = 1, .reusable = true}}, SHIFT(371), - [3293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(280), - [3295] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1207), - [3297] = {.entry = {.count = 1, .reusable = true}}, SHIFT(306), - [3299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(953), - [3301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(816), - [3303] = {.entry = {.count = 1, .reusable = true}}, SHIFT(362), - [3305] = {.entry = {.count = 1, .reusable = true}}, SHIFT(683), - [3307] = {.entry = {.count = 1, .reusable = true}}, SHIFT(364), - [3309] = {.entry = {.count = 1, .reusable = true}}, SHIFT(365), - [3311] = {.entry = {.count = 1, .reusable = true}}, SHIFT(358), - [3313] = {.entry = {.count = 1, .reusable = true}}, SHIFT(360), - [3315] = {.entry = {.count = 1, .reusable = true}}, SHIFT(797), - [3317] = {.entry = {.count = 1, .reusable = true}}, SHIFT(671), - [3319] = {.entry = {.count = 1, .reusable = true}}, SHIFT(672), - [3321] = {.entry = {.count = 1, .reusable = true}}, SHIFT(785), - [3323] = {.entry = {.count = 1, .reusable = true}}, SHIFT(663), - [3325] = {.entry = {.count = 1, .reusable = true}}, SHIFT(328), - [3327] = {.entry = {.count = 1, .reusable = true}}, SHIFT(351), - [3329] = {.entry = {.count = 1, .reusable = true}}, SHIFT(766), - [3331] = {.entry = {.count = 1, .reusable = true}}, SHIFT(767), - [3333] = {.entry = {.count = 1, .reusable = true}}, SHIFT(822), - [3335] = {.entry = {.count = 1, .reusable = true}}, SHIFT(769), - [3337] = {.entry = {.count = 1, .reusable = true}}, SHIFT(779), - [3339] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), - [3341] = {.entry = {.count = 1, .reusable = true}}, SHIFT(312), - [3343] = {.entry = {.count = 1, .reusable = true}}, SHIFT(349), - [3345] = {.entry = {.count = 1, .reusable = true}}, SHIFT(245), - [3347] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1282), - [3349] = {.entry = {.count = 1, .reusable = true}}, SHIFT(792), - [3351] = {.entry = {.count = 1, .reusable = true}}, SHIFT(146), - [3353] = {.entry = {.count = 1, .reusable = true}}, SHIFT(143), - [3355] = {.entry = {.count = 1, .reusable = true}}, SHIFT(761), - [3357] = {.entry = {.count = 1, .reusable = true}}, SHIFT(843), - [3359] = {.entry = {.count = 1, .reusable = true}}, SHIFT(667), - [3361] = {.entry = {.count = 1, .reusable = true}}, SHIFT(147), - [3363] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_elif, 4, .production_id = 54), - [3365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), - [3367] = {.entry = {.count = 1, .reusable = true}}, SHIFT(688), - [3369] = {.entry = {.count = 1, .reusable = true}}, SHIFT(282), - [3371] = {.entry = {.count = 1, .reusable = true}}, SHIFT(685), - [3373] = {.entry = {.count = 1, .reusable = true}}, SHIFT(317), - [3375] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1389), - [3377] = {.entry = {.count = 1, .reusable = true}}, SHIFT(682), - [3379] = {.entry = {.count = 1, .reusable = true}}, SHIFT(389), - [3381] = {.entry = {.count = 1, .reusable = true}}, SHIFT(286), - [3383] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), - [3385] = {.entry = {.count = 1, .reusable = true}}, SHIFT(384), - [3387] = {.entry = {.count = 1, .reusable = true}}, SHIFT(819), - [3389] = {.entry = {.count = 1, .reusable = true}}, SHIFT(327), - [3391] = {.entry = {.count = 1, .reusable = true}}, SHIFT(339), - [3393] = {.entry = {.count = 1, .reusable = true}}, SHIFT(957), - [3395] = {.entry = {.count = 1, .reusable = true}}, SHIFT(340), - [3397] = {.entry = {.count = 1, .reusable = true}}, SHIFT(821), - [3399] = {.entry = {.count = 1, .reusable = true}}, SHIFT(782), - [3401] = {.entry = {.count = 1, .reusable = true}}, SHIFT(585), - [3403] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ms_based_modifier, 2), - [3405] = {.entry = {.count = 1, .reusable = true}}, SHIFT(773), - [3407] = {.entry = {.count = 1, .reusable = true}}, SHIFT(866), - [3409] = {.entry = {.count = 1, .reusable = true}}, SHIFT(368), - [3411] = {.entry = {.count = 1, .reusable = true}}, SHIFT(373), - [3413] = {.entry = {.count = 1, .reusable = true}}, SHIFT(202), - [3415] = {.entry = {.count = 1, .reusable = true}}, SHIFT(390), - [3417] = {.entry = {.count = 1, .reusable = true}}, SHIFT(776), - [3419] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1135), - [3421] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [3423] = {.entry = {.count = 1, .reusable = true}}, SHIFT(793), - [3425] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), - [3427] = {.entry = {.count = 1, .reusable = true}}, SHIFT(778), - [3429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(661), - [3431] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1424), - [3433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), - [3435] = {.entry = {.count = 1, .reusable = true}}, SHIFT(799), - [3437] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1125), - [3439] = {.entry = {.count = 1, .reusable = true}}, SHIFT(660), - [3441] = {.entry = {.count = 1, .reusable = true}}, SHIFT(835), - [3443] = {.entry = {.count = 1, .reusable = true}}, SHIFT(399), - [3445] = {.entry = {.count = 1, .reusable = true}}, SHIFT(922), - [3447] = {.entry = {.count = 1, .reusable = true}}, SHIFT(679), - [3449] = {.entry = {.count = 1, .reusable = true}}, SHIFT(337), - [3451] = {.entry = {.count = 1, .reusable = true}}, SHIFT(676), - [3453] = {.entry = {.count = 1, .reusable = true}}, SHIFT(329), - [3455] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1354), - [3457] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), - [3459] = {.entry = {.count = 1, .reusable = true}}, SHIFT(369), - [3461] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1130), - [3463] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), - [3465] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_elif, 5, .production_id = 66), - [3467] = {.entry = {.count = 1, .reusable = true}}, SHIFT(123), - [3469] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1148), - [3471] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1312), - [3473] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), - [3475] = {.entry = {.count = 1, .reusable = true}}, SHIFT(838), - [3477] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), - [3479] = {.entry = {.count = 1, .reusable = true}}, SHIFT(341), - [3481] = {.entry = {.count = 1, .reusable = true}}, SHIFT(570), - [3483] = {.entry = {.count = 1, .reusable = true}}, SHIFT(125), - [3485] = {.entry = {.count = 1, .reusable = true}}, SHIFT(239), - [3487] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1218), - [3489] = {.entry = {.count = 1, .reusable = true}}, SHIFT(786), - [3491] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), - [3493] = {.entry = {.count = 1, .reusable = true}}, SHIFT(908), - [3495] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1115), - [3497] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1117), - [3499] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1132), - [3501] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), - [3503] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1377), - [3505] = {.entry = {.count = 1, .reusable = true}}, SHIFT(343), - [3507] = {.entry = {.count = 1, .reusable = true}}, SHIFT(476), - [3509] = {.entry = {.count = 1, .reusable = true}}, SHIFT(366), - [3511] = {.entry = {.count = 1, .reusable = true}}, SHIFT(448), - [3513] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_elif_in_field_declaration_list, 4, .production_id = 54), - [3515] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1216), - [3517] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preproc_elif_in_field_declaration_list, 5, .production_id = 66), - [3519] = {.entry = {.count = 1, .reusable = true}}, SHIFT(469), - [3521] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [3523] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), - [3525] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1412), - [3527] = {.entry = {.count = 1, .reusable = true}}, SHIFT(128), - [3529] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1230), - [3531] = {.entry = {.count = 1, .reusable = true}}, SHIFT(284), - [3533] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), - [3535] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), - [3537] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), - [3539] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1210), - [3541] = {.entry = {.count = 1, .reusable = true}}, SHIFT(443), - [3543] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), - [3545] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1425), - [3547] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), - [3549] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), - [3551] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1249), - [3553] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), - [3555] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), - [3557] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), - [3559] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), -}; - -#ifdef __cplusplus -extern "C" { -#endif -#ifdef _WIN32 -#define extern __declspec(dllexport) -#endif - -extern const TSLanguage *tree_sitter_c(void) { - static const TSLanguage language = { - .version = LANGUAGE_VERSION, - .symbol_count = SYMBOL_COUNT, - .alias_count = ALIAS_COUNT, - .token_count = TOKEN_COUNT, - .external_token_count = EXTERNAL_TOKEN_COUNT, - .state_count = STATE_COUNT, - .large_state_count = LARGE_STATE_COUNT, - .production_id_count = PRODUCTION_ID_COUNT, - .field_count = FIELD_COUNT, - .max_alias_sequence_length = MAX_ALIAS_SEQUENCE_LENGTH, - .parse_table = &ts_parse_table[0][0], - .small_parse_table = ts_small_parse_table, - .small_parse_table_map = ts_small_parse_table_map, - .parse_actions = ts_parse_actions, - .symbol_names = ts_symbol_names, - .field_names = ts_field_names, - .field_map_slices = ts_field_map_slices, - .field_map_entries = ts_field_map_entries, - .symbol_metadata = ts_symbol_metadata, - .public_symbol_map = ts_symbol_map, - .alias_map = ts_non_terminal_alias_map, - .alias_sequences = &ts_alias_sequences[0][0], - .lex_modes = ts_lex_modes, - .lex_fn = ts_lex, - .keyword_lex_fn = ts_lex_keywords, - .keyword_capture_token = sym_identifier, - }; - return &language; -} -#ifdef __cplusplus -} -#endif diff --git a/tree-sitter-c/src/tree_sitter/parser.h b/tree-sitter-c/src/tree_sitter/parser.h deleted file mode 100644 index 2b14ac1..0000000 --- a/tree-sitter-c/src/tree_sitter/parser.h +++ /dev/null @@ -1,224 +0,0 @@ -#ifndef TREE_SITTER_PARSER_H_ -#define TREE_SITTER_PARSER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#define ts_builtin_sym_error ((TSSymbol)-1) -#define ts_builtin_sym_end 0 -#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024 - -typedef uint16_t TSStateId; - -#ifndef TREE_SITTER_API_H_ -typedef uint16_t TSSymbol; -typedef uint16_t TSFieldId; -typedef struct TSLanguage TSLanguage; -#endif - -typedef struct { - TSFieldId field_id; - uint8_t child_index; - bool inherited; -} TSFieldMapEntry; - -typedef struct { - uint16_t index; - uint16_t length; -} TSFieldMapSlice; - -typedef struct { - bool visible; - bool named; - bool supertype; -} TSSymbolMetadata; - -typedef struct TSLexer TSLexer; - -struct TSLexer { - int32_t lookahead; - TSSymbol result_symbol; - void (*advance)(TSLexer *, bool); - void (*mark_end)(TSLexer *); - uint32_t (*get_column)(TSLexer *); - bool (*is_at_included_range_start)(const TSLexer *); - bool (*eof)(const TSLexer *); -}; - -typedef enum { - TSParseActionTypeShift, - TSParseActionTypeReduce, - TSParseActionTypeAccept, - TSParseActionTypeRecover, -} TSParseActionType; - -typedef union { - struct { - uint8_t type; - TSStateId state; - bool extra; - bool repetition; - } shift; - struct { - uint8_t type; - uint8_t child_count; - TSSymbol symbol; - int16_t dynamic_precedence; - uint16_t production_id; - } reduce; - uint8_t type; -} TSParseAction; - -typedef struct { - uint16_t lex_state; - uint16_t external_lex_state; -} TSLexMode; - -typedef union { - TSParseAction action; - struct { - uint8_t count; - bool reusable; - } entry; -} TSParseActionEntry; - -struct TSLanguage { - uint32_t version; - uint32_t symbol_count; - uint32_t alias_count; - uint32_t token_count; - uint32_t external_token_count; - uint32_t state_count; - uint32_t large_state_count; - uint32_t production_id_count; - uint32_t field_count; - uint16_t max_alias_sequence_length; - const uint16_t *parse_table; - const uint16_t *small_parse_table; - const uint32_t *small_parse_table_map; - const TSParseActionEntry *parse_actions; - const char * const *symbol_names; - const char * const *field_names; - const TSFieldMapSlice *field_map_slices; - const TSFieldMapEntry *field_map_entries; - const TSSymbolMetadata *symbol_metadata; - const TSSymbol *public_symbol_map; - const uint16_t *alias_map; - const TSSymbol *alias_sequences; - const TSLexMode *lex_modes; - bool (*lex_fn)(TSLexer *, TSStateId); - bool (*keyword_lex_fn)(TSLexer *, TSStateId); - TSSymbol keyword_capture_token; - struct { - const bool *states; - const TSSymbol *symbol_map; - void *(*create)(void); - void (*destroy)(void *); - bool (*scan)(void *, TSLexer *, const bool *symbol_whitelist); - unsigned (*serialize)(void *, char *); - void (*deserialize)(void *, const char *, unsigned); - } external_scanner; - const TSStateId *primary_state_ids; -}; - -/* - * Lexer Macros - */ - -#define START_LEXER() \ - bool result = false; \ - bool skip = false; \ - bool eof = false; \ - int32_t lookahead; \ - goto start; \ - next_state: \ - lexer->advance(lexer, skip); \ - start: \ - skip = false; \ - lookahead = lexer->lookahead; - -#define ADVANCE(state_value) \ - { \ - state = state_value; \ - goto next_state; \ - } - -#define SKIP(state_value) \ - { \ - skip = true; \ - state = state_value; \ - goto next_state; \ - } - -#define ACCEPT_TOKEN(symbol_value) \ - result = true; \ - lexer->result_symbol = symbol_value; \ - lexer->mark_end(lexer); - -#define END_STATE() return result; - -/* - * Parse Table Macros - */ - -#define SMALL_STATE(id) id - LARGE_STATE_COUNT - -#define STATE(id) id - -#define ACTIONS(id) id - -#define SHIFT(state_value) \ - {{ \ - .shift = { \ - .type = TSParseActionTypeShift, \ - .state = state_value \ - } \ - }} - -#define SHIFT_REPEAT(state_value) \ - {{ \ - .shift = { \ - .type = TSParseActionTypeShift, \ - .state = state_value, \ - .repetition = true \ - } \ - }} - -#define SHIFT_EXTRA() \ - {{ \ - .shift = { \ - .type = TSParseActionTypeShift, \ - .extra = true \ - } \ - }} - -#define REDUCE(symbol_val, child_count_val, ...) \ - {{ \ - .reduce = { \ - .type = TSParseActionTypeReduce, \ - .symbol = symbol_val, \ - .child_count = child_count_val, \ - __VA_ARGS__ \ - }, \ - }} - -#define RECOVER() \ - {{ \ - .type = TSParseActionTypeRecover \ - }} - -#define ACCEPT_INPUT() \ - {{ \ - .type = TSParseActionTypeAccept \ - }} - -#ifdef __cplusplus -} -#endif - -#endif // TREE_SITTER_PARSER_H_ diff --git a/tree-sitter-c/test/corpus/ambiguities.txt b/tree-sitter-c/test/corpus/ambiguities.txt deleted file mode 100644 index cebb6fb..0000000 --- a/tree-sitter-c/test/corpus/ambiguities.txt +++ /dev/null @@ -1,178 +0,0 @@ -======================================================================== -pointer declarations vs multiplications -======================================================================== - -int main() { - // declare a function pointer - T1 * b(T2 a); - - // evaluate expressions - c * d(5); - e(f * g); -} - ---- - -(translation_unit (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (comment) - (declaration - (type_identifier) - (pointer_declarator (function_declarator - (identifier) - (parameter_list (parameter_declaration (type_identifier) (identifier)))))) - (comment) - (expression_statement (binary_expression - (identifier) - (call_expression (identifier) (argument_list (number_literal))))) - (expression_statement (call_expression - (identifier) - (argument_list (binary_expression (identifier) (identifier)))))))) - -======================================================================== -casts vs multiplications -======================================================================== - -/* - * ambiguities - */ - -int main() { - // cast - a((B *)c); - - // parenthesized product - d((e * f)); -} - ---- - -(translation_unit - (comment) - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (comment) - (expression_statement (call_expression - (identifier) - (argument_list (cast_expression (type_descriptor (type_identifier) (abstract_pointer_declarator)) (identifier))))) - (comment) - (expression_statement (call_expression - (identifier) - (argument_list (parenthesized_expression (binary_expression (identifier) (identifier))))))))) - -======================================================================== -function-like type macros vs function calls -======================================================================== - -// this is a macro -GIT_INLINE(int *) x = 5; - ---- - -(translation_unit - (comment) - (declaration - (macro_type_specifier (identifier) (type_descriptor (primitive_type) (abstract_pointer_declarator))) - (init_declarator (identifier) (number_literal)))) - -======================================================================== -function calls vs parenthesized declarators vs macro types -======================================================================== - -int main() { - /* - * Could be either: - * - function call - * - declaration w/ parenthesized declarator - * - declaration w/ macro type, no declarator - */ - ABC(d); - - /* - * Normal declaration - */ - efg hij; -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (comment) - (expression_statement (call_expression (identifier) (argument_list (identifier)))) - (comment) - (declaration (type_identifier) (identifier))))) - -======================================================================== -Call expressions vs empty declarations w/ macros as types -======================================================================== - -int main() { - int a = 1; - b(a); - A(A *); -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (declaration (primitive_type) (init_declarator (identifier) (number_literal))) - (expression_statement (call_expression (identifier) (argument_list (identifier)))) - (macro_type_specifier - (identifier) - (type_descriptor (type_identifier) (abstract_pointer_declarator)))))) - -======================================================================== -Comments after for loops with ambiguities -======================================================================== - -int main() { - for (a *b = c; d; e) { - aff; - } - - // a-comment - - g; -} - ---- - -(translation_unit (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (for_statement - (declaration (type_identifier) (init_declarator - (pointer_declarator (identifier)) - (identifier))) - (identifier) - (identifier) - (compound_statement - (expression_statement (identifier)))) - (comment) - (expression_statement (identifier))))) - -=============================================== -Top-level macro invocations -=============================================== - -DEFINE_SOMETHING(THING_A, "this is a thing a"); -DEFINE_SOMETHING(THING_B, "this is a thing b", "thanks"); - ---- - -(translation_unit - (expression_statement (call_expression (identifier) (argument_list (identifier) (string_literal)))) - (expression_statement (call_expression (identifier) (argument_list (identifier) (string_literal) (string_literal))))) diff --git a/tree-sitter-c/test/corpus/crlf.txt b/tree-sitter-c/test/corpus/crlf.txt deleted file mode 100644 index 9673cae..0000000 --- a/tree-sitter-c/test/corpus/crlf.txt +++ /dev/null @@ -1,13 +0,0 @@ -============================================ -Line comments with escaped CRLF line endings -============================================ - -// hello \ - this is still a comment -this_is_not a_comment; - ---- - -(translation_unit - (comment) - (declaration (type_identifier) (identifier))) diff --git a/tree-sitter-c/test/corpus/declarations.txt b/tree-sitter-c/test/corpus/declarations.txt deleted file mode 100644 index b2bceab..0000000 --- a/tree-sitter-c/test/corpus/declarations.txt +++ /dev/null @@ -1,530 +0,0 @@ -============================================ -Struct declarations -============================================ - -struct s1; - -struct s2 { - int x; - float y : 5; -}; - ---- - -(translation_unit - (struct_specifier - name: (type_identifier)) - (struct_specifier - name: (type_identifier) - body: (field_declaration_list - (field_declaration - type: (primitive_type) - declarator: (field_identifier)) - (field_declaration - type: (primitive_type) - declarator: (field_identifier) - (bitfield_clause (number_literal)))))) - -============================================ -Union declarations -============================================ - -union u1; - -union s2 { - int x; - float y; -}; - ---- - -(translation_unit - (union_specifier - name: (type_identifier)) - (union_specifier - name: (type_identifier) - body: (field_declaration_list - (field_declaration - type: (primitive_type) - declarator: (field_identifier)) - (field_declaration - type: (primitive_type) - declarator: (field_identifier))))) - -============================================ -Enum declarations -============================================ - -enum e1; - -enum e2 { - val1, - val2 = 5, - val3 -}; - -enum e3 { - val1, -}; - ---- - -(translation_unit - (enum_specifier - name: (type_identifier)) - (enum_specifier - name: (type_identifier) - body: (enumerator_list - (enumerator name: (identifier)) - (enumerator name: (identifier) value: (number_literal)) - (enumerator name: (identifier)))) - (enum_specifier - name: (type_identifier) - body: (enumerator_list - (enumerator name: (identifier))))) - -====================================================== -Struct declarations containing preprocessor directives -====================================================== - -struct s { - #define A 5 - int b[a]; - #undef A -}; - ---- - -(translation_unit - (struct_specifier - (type_identifier) - (field_declaration_list - (preproc_def (identifier) (preproc_arg)) - (field_declaration (primitive_type) (array_declarator (field_identifier) (identifier))) - (preproc_call (preproc_directive) (preproc_arg))))) - -============================================ -Primitive-typed variable declarations -============================================ - -unsigned short int a; -long int b, c = 5, d; -float d, e; -unsigned f; -short g, h; - ---- - -(translation_unit - (declaration - type: (sized_type_specifier type: (primitive_type)) - declarator: (identifier)) - (declaration - type: (sized_type_specifier type: (primitive_type)) - declarator: (identifier) - declarator: (init_declarator - declarator: (identifier) - value: (number_literal)) - declarator: (identifier)) - (declaration - type: (primitive_type) - declarator: (identifier) - declarator: (identifier)) - (declaration - type: (sized_type_specifier) - declarator: (identifier)) - (declaration - type: (sized_type_specifier) - declarator: (identifier) - declarator: (identifier))) - -============================================ -Variable storage classes -============================================ - -int a; -extern int b, c; -auto int d; -register int e; -static int f; - ---- - -(translation_unit - (declaration (primitive_type) (identifier)) - (declaration (storage_class_specifier) (primitive_type) (identifier) (identifier)) - (declaration (storage_class_specifier) (primitive_type) (identifier)) - (declaration (storage_class_specifier) (primitive_type) (identifier)) - (declaration (storage_class_specifier) (primitive_type) (identifier))) - -============================================ -Composite-typed variable declarations -============================================ - -struct b c; -union { int e; } f; -enum { g, h } i; - ---- - -(translation_unit - (declaration - type: (struct_specifier name: (type_identifier)) - declarator: (identifier)) - (declaration - type: (union_specifier - body: (field_declaration_list - (field_declaration - type: (primitive_type) - declarator: (field_identifier)))) - declarator: (identifier)) - (declaration - type: (enum_specifier body: (enumerator_list - (enumerator name: (identifier)) - (enumerator name: (identifier)))) - declarator: (identifier))) - -============================================ -Pointer variable declarations -============================================ - -char *the_string; -const char **the_strings; -int const * const restrict x; - ---- - -(translation_unit - (declaration - type: (primitive_type) - declarator: (pointer_declarator - declarator: (identifier))) - (declaration - (type_qualifier) - type: (primitive_type) - declarator: (pointer_declarator - declarator: (pointer_declarator - declarator: (identifier)))) - (declaration - type: (primitive_type) - (type_qualifier) - declarator: (pointer_declarator - (type_qualifier) - (type_qualifier) - declarator: (identifier)))) - -============================================ -Typedefs -============================================ - -typedef int my_int; - -typedef struct { - int x; -} *a; - -typedef void my_callback(void *, size_t); - -typedef struct A { - int i; -} a, b; - ---- - -(translation_unit - (type_definition - type: (primitive_type) - declarator: (type_identifier)) - (type_definition - type: (struct_specifier - body: (field_declaration_list - (field_declaration - type: (primitive_type) - declarator: (field_identifier)))) - declarator: (pointer_declarator - declarator: (type_identifier))) - (type_definition - type: (primitive_type) - declarator: (function_declarator - declarator: (type_identifier) - parameters: (parameter_list - (parameter_declaration - type: (primitive_type) - declarator: (abstract_pointer_declarator)) - (parameter_declaration - type: (primitive_type))))) - (type_definition - type: (struct_specifier - name: (type_identifier) - body: (field_declaration_list - (field_declaration - type: (primitive_type) - declarator: (field_identifier)))) - declarator: (type_identifier) - declarator: (type_identifier))) - -============================================ -Function declarations -============================================ - -int main(int argc, const char **argv); -static foo bar(); -static baz quux(...); - ---- - -(translation_unit - (declaration - (primitive_type) - (function_declarator - (identifier) - (parameter_list - (parameter_declaration - (primitive_type) - (identifier)) - (parameter_declaration - (type_qualifier) - (primitive_type) - (pointer_declarator (pointer_declarator (identifier))))))) - - (declaration - (storage_class_specifier) - (type_identifier) - (function_declarator (identifier) (parameter_list))) - - (declaration - (storage_class_specifier) - (type_identifier) - (function_declarator (identifier) (parameter_list (variadic_parameter))))) - -============================================ -Function definitions -============================================ - -void * do_stuff(int arg1) { - return 5; -} - ---- - -(translation_unit - (function_definition - type: (primitive_type) - declarator: (pointer_declarator - declarator: (function_declarator - declarator: (identifier) - parameters: (parameter_list - (parameter_declaration - type: (primitive_type) - declarator: (identifier))))) - body: (compound_statement - (return_statement (number_literal))))) - -============================================ -Function specifiers after types -============================================ - -int static inline do_stuff(int arg1) { - return 5; -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (storage_class_specifier) - (storage_class_specifier) - (function_declarator - (identifier) - (parameter_list (parameter_declaration (primitive_type) (identifier)))) - (compound_statement (return_statement (number_literal))))) - -============================================ -Linkage specifications -============================================ - -extern "C" int foo(); - -extern "C" int foo() { return 0; } - -extern "C" { - int bar(); - int baz(); -} - ---- - -(translation_unit - (linkage_specification - (string_literal) - (declaration - (primitive_type) - (function_declarator (identifier) (parameter_list)))) - (linkage_specification - (string_literal) - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement (return_statement (number_literal))))) - (linkage_specification - (string_literal) - (declaration_list - (declaration - (primitive_type) - (function_declarator (identifier) (parameter_list))) - (declaration - (primitive_type) - (function_declarator (identifier) (parameter_list)))))) - -========================== -Type qualifiers -========================== - -const _Atomic unsigned long int x = 5; -restrict int y = 6; -volatile int z = 7; - ---- - -(translation_unit - (declaration - (type_qualifier) - (type_qualifier) - (sized_type_specifier (primitive_type)) - (init_declarator (identifier) (number_literal))) - (declaration - (type_qualifier) - (primitive_type) - (init_declarator (identifier) (number_literal))) - (declaration - (type_qualifier) - (primitive_type) - (init_declarator (identifier) (number_literal)))) - -================================ -Local array declarations -================================ - -int main() { - char the_buffer[the_size]; - char the_other_buffer[*]; -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (declaration (primitive_type) (array_declarator (identifier) (identifier))) - (declaration (primitive_type) (array_declarator (identifier)))))) - -================================ -Attributes -================================ - -extern __attribute__((visibility("hidden"))) int foo(); -extern int bar() __attribute__((const)); -void die(const char *format, ...) __attribute__((noreturn)) - __attribute__((format(printf,1,2))); -extern __attribute__((visibility("default"), weak)) int print_status(); - -int f([[a::b(c), d]] int x) {} - -[[gnu::always_inline]] [[gnu::hot]] [[gnu::const]] [[nodiscard]] -int g(void); - -[[gnu::always_inline, gnu::hot, gnu::const, nodiscard]] -int g(void); - -int i [[maybe_unused]]; -void f[[gnu::always_inline]](); - -[[nodiscard("reason")]] int foo; - -[[fallthrough]]; - -struct S { - int a [[deprecated]]; -}; - -typedef int MyInt [[deprecated]]; - ---- - -(translation_unit - (declaration - (storage_class_specifier) - (attribute_specifier - (argument_list - (call_expression - (identifier) (argument_list (string_literal))))) - (primitive_type) - (function_declarator (identifier) (parameter_list))) - (declaration - (storage_class_specifier) - (primitive_type) - (function_declarator (identifier) (parameter_list) (attribute_specifier (argument_list (identifier))))) - (declaration - (primitive_type) - (function_declarator (identifier) - (parameter_list (parameter_declaration (type_qualifier) (primitive_type) (pointer_declarator (identifier))) (variadic_parameter)) - (attribute_specifier (argument_list (identifier))) - (attribute_specifier - (argument_list (call_expression (identifier) (argument_list (identifier) (number_literal) (number_literal))))))) - (declaration - (storage_class_specifier) - (attribute_specifier - (argument_list (call_expression (identifier) (argument_list (string_literal))) (identifier))) - (primitive_type) (function_declarator (identifier) (parameter_list))) - (function_definition (primitive_type) - (function_declarator (identifier) (parameter_list (parameter_declaration - (attribute_declaration - (attribute (identifier) (identifier) (argument_list (identifier))) - (attribute (identifier))) - (primitive_type) (identifier)))) (compound_statement)) - (declaration - (attribute_declaration (attribute (identifier) (identifier))) - (attribute_declaration (attribute (identifier) (identifier))) - (attribute_declaration (attribute (identifier) (identifier))) - (attribute_declaration (attribute (identifier))) - (primitive_type) - (function_declarator (identifier) (parameter_list (parameter_declaration (primitive_type))))) - (declaration - (attribute_declaration - (attribute (identifier) (identifier)) - (attribute (identifier) (identifier)) - (attribute (identifier) (identifier)) - (attribute (identifier))) - (primitive_type) - (function_declarator (identifier) (parameter_list (parameter_declaration (primitive_type))))) - (declaration - (primitive_type) - (attributed_declarator - (identifier) - (attribute_declaration (attribute (identifier))))) - (declaration - (primitive_type) - (function_declarator - (attributed_declarator - (identifier) - (attribute_declaration (attribute (identifier) (identifier)))) - (parameter_list))) - (declaration - (attribute_declaration (attribute (identifier) (argument_list (string_literal)))) - (primitive_type) (identifier)) - (attributed_statement - (attribute_declaration (attribute (identifier))) - (expression_statement)) - (struct_specifier - (type_identifier) - (field_declaration_list (field_declaration (primitive_type) - (attributed_declarator - (field_identifier) - (attribute_declaration (attribute (identifier))))))) - (type_definition (primitive_type) - (attributed_declarator - (type_identifier) - (attribute_declaration (attribute (identifier)))))) diff --git a/tree-sitter-c/test/corpus/expressions.txt b/tree-sitter-c/test/corpus/expressions.txt deleted file mode 100644 index 2d871e2..0000000 --- a/tree-sitter-c/test/corpus/expressions.txt +++ /dev/null @@ -1,518 +0,0 @@ -============================================ -Number literals -============================================ - -double a = { - 0xAC00, - 0.123, - 0b1010001, - 0xabc00ull, - -0.1f, - 1'000'000.000'001, - 24e-5, - 0.1E, - 58., - 4e2, - 123.456e-67, - .1E4f, - 0x10.1p0, -}; - ---- - -(translation_unit - (declaration - (primitive_type) - (init_declarator - (identifier) - (initializer_list - (number_literal) - (number_literal) - (number_literal) - (number_literal) - (number_literal) - (number_literal) - (number_literal) - (number_literal) - (number_literal) - (number_literal) - (number_literal) - (number_literal) - (number_literal) - )))) - -============================================ -Identifiers -============================================ - -int main() { - _abc; - d_EG123; -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (expression_statement (identifier)) - (expression_statement (identifier))))) - -============================================ -Common constants -============================================ - -int main() { - true; - false; - NULL; - - // regression test - identifiers starting w/ these strings should tokenize correctly. - true_value; - false_value; - NULL_value; -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (expression_statement (true)) - (expression_statement (false)) - (expression_statement (null)) - (comment) - (expression_statement (identifier)) - (expression_statement (identifier)) - (expression_statement (identifier))))) - -============================================ -Function calls -============================================ - -int main() { - printf("hi! %d\n", x); -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (expression_statement (call_expression - (identifier) - (argument_list (string_literal (escape_sequence)) (identifier))))))) - -============================================ -String literals -============================================ - -int main() { - "a"; - "b" "c" "d"; - "\"hi\""; - L"bonjour"; - u"guten morgen"; - U"buenos dias"; - u8"buongiorno"; -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (expression_statement (string_literal)) - (expression_statement (concatenated_string (string_literal) (string_literal) (string_literal))) - (expression_statement (string_literal (escape_sequence) (escape_sequence))) - (expression_statement (string_literal)) - (expression_statement (string_literal)) - (expression_statement (string_literal)) - (expression_statement (string_literal))))) - -============================================ -Character literals -============================================ - -int main() { - 'a'; - '\0'; - '\t'; - '\''; - L'b'; - u'c'; - U'\xa1'; - u8'\x1A'; -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (expression_statement (char_literal)) - (expression_statement (char_literal (escape_sequence))) - (expression_statement (char_literal (escape_sequence))) - (expression_statement (char_literal (escape_sequence))) - (expression_statement (char_literal)) - (expression_statement (char_literal)) - (expression_statement (char_literal (escape_sequence))) - (expression_statement (char_literal (escape_sequence)))))) - -============================================ -Field access -============================================ - -int main() { - s.data1; - p->data2; - q[data3]; -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (expression_statement (field_expression (identifier) (field_identifier))) - (expression_statement (field_expression (identifier) (field_identifier))) - (expression_statement (subscript_expression (identifier) (identifier)))))) - -============================================ -Boolean operators -============================================ - -int main() { - !x || !y && !z; -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (expression_statement (binary_expression - (unary_expression (identifier)) - (binary_expression - (unary_expression (identifier)) - (unary_expression (identifier)))))))) - -============================================ -Math operators -============================================ - -int main() { - -a / b + c * -d; - a++ - ++b + c-- + --d; - ++L; - } - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (expression_statement (binary_expression - (binary_expression - (unary_expression (identifier)) - (identifier)) - (binary_expression - (identifier) - (unary_expression (identifier))))) - (expression_statement - (binary_expression - (binary_expression - (binary_expression - (update_expression (identifier)) - (update_expression (identifier))) - (update_expression (identifier))) - (update_expression (identifier)))) - (expression_statement (update_expression (identifier)))))) - -============================================ -The comma operator -============================================ - -int main() { - i--, j--; - (i--, j--); -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (expression_statement - (comma_expression - (update_expression (identifier)) - (update_expression (identifier)))) - (expression_statement - (parenthesized_expression - (comma_expression - (update_expression (identifier)) - (update_expression (identifier)))))))) - -============================================ -Assignments -============================================ - -int main() { - static int a = 1; - b = *c = 2; - d.e = 3; - f->g = 4; - h[i] = j; - k += l; - m -= o; - n *= p; - q /= r; - *s++ = 1; - (*t) = 1; -} - ---- - -(translation_unit - (function_definition - type: (primitive_type) - declarator: (function_declarator - declarator: (identifier) - parameters: (parameter_list)) - body: (compound_statement - (declaration - (storage_class_specifier) - type: (primitive_type) - declarator: (init_declarator - declarator: (identifier) - value: (number_literal))) - (expression_statement (assignment_expression - left: (identifier) - right: (assignment_expression - left: (pointer_expression - argument: (identifier)) - right: (number_literal)))) - (expression_statement (assignment_expression - left: (field_expression - argument: (identifier) - field: (field_identifier)) - right: (number_literal))) - (expression_statement (assignment_expression - left: (field_expression - argument: (identifier) - field: (field_identifier)) - right: (number_literal))) - (expression_statement (assignment_expression - left: (subscript_expression - argument: (identifier) - index: (identifier)) - right: (identifier))) - (expression_statement (assignment_expression - left: (identifier) - right: (identifier))) - (expression_statement (assignment_expression - left: (identifier) - right: (identifier))) - (expression_statement (assignment_expression - left: (identifier) - right: (identifier))) - (expression_statement (assignment_expression - left: (identifier) - right: (identifier))) - (expression_statement (assignment_expression - left: (pointer_expression - argument: (update_expression - argument: (identifier))) - right: (number_literal))) - (expression_statement (assignment_expression - left: (parenthesized_expression (pointer_expression - argument: (identifier))) - right: (number_literal)))))) - -============================================ -Pointer operations -============================================ - -int main() { - doSomething(&x, *x); -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (expression_statement (call_expression - (identifier) - (argument_list - (pointer_expression (identifier)) - (pointer_expression (identifier)))))))) - -============================================ -Type-casts -============================================ - -int main() { - x = (const SomeType *)thing; -} - ---- - -(translation_unit - (function_definition - type: (primitive_type) - declarator: (function_declarator - declarator: (identifier) - parameters: (parameter_list)) - body: (compound_statement - (expression_statement (assignment_expression - left: (identifier) - right: (cast_expression - type: (type_descriptor - (type_qualifier) - type: (type_identifier) - declarator: (abstract_pointer_declarator)) - value: (identifier))))))) - -============================================ -Sizeof expressions -============================================ - -int main() { - sizeof x.a; - sizeof(x.a); - sizeof(const char **); - sizeof(char * ()); -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (expression_statement (sizeof_expression (field_expression (identifier) (field_identifier)))) - (expression_statement (sizeof_expression (parenthesized_expression (field_expression (identifier) (field_identifier))))) - (expression_statement (sizeof_expression - (type_descriptor (type_qualifier) (primitive_type) (abstract_pointer_declarator (abstract_pointer_declarator))))) - (expression_statement (sizeof_expression - (type_descriptor (primitive_type) (abstract_pointer_declarator (abstract_function_declarator (parameter_list))))))))) - -============================================ -Compound literals -============================================ - -int main() { - x = (SomeType) { - .f1.f2[f3] = 5, - .f4 = {} - }; - y = (struct SomeStruct) { - 7, - 8 - }; - z = (char const []) {'a', 'b'}; -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (expression_statement (assignment_expression - (identifier) - (compound_literal_expression - (type_descriptor (type_identifier)) - (initializer_list - (initializer_pair - (field_designator (field_identifier)) - (field_designator (field_identifier)) - (subscript_designator (identifier)) - (number_literal)) - (initializer_pair - (field_designator (field_identifier)) - (initializer_list)))))) - (expression_statement (assignment_expression - (identifier) - (compound_literal_expression - (type_descriptor (struct_specifier (type_identifier))) - (initializer_list - (number_literal) - (number_literal))))) - (expression_statement - (assignment_expression - (identifier) - (compound_literal_expression - (type_descriptor (primitive_type) (type_qualifier) (abstract_array_declarator)) - (initializer_list (char_literal) (char_literal)))))))) - -============================================ -Compound literals with trailing commas -============================================ - -int main() { - y = (struct SomeStruct) { 7, 8, }; -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (expression_statement (assignment_expression - (identifier) - (compound_literal_expression - (type_descriptor (struct_specifier (type_identifier))) - (initializer_list - (number_literal) - (number_literal)))))))) - -==================================== -Comments with escaped newlines -==================================== - -// one \ - two - ---- - -(translation_unit - (comment)) - -============================================== -Comments with escaped chars and newlines -============================================== - -// one \a \b \ - two -// one \c \d ---- - -(translation_unit - (comment) - (comment)) diff --git a/tree-sitter-c/test/corpus/microsoft.txt b/tree-sitter-c/test/corpus/microsoft.txt deleted file mode 100644 index c0dfc67..0000000 --- a/tree-sitter-c/test/corpus/microsoft.txt +++ /dev/null @@ -1,187 +0,0 @@ -================================ -declaration specs -================================ - -struct __declspec(dllexport) s2 -{ -}; - -union __declspec(noinline) u2 { -}; - ---- - -(translation_unit - (struct_specifier - (ms_declspec_modifier - (identifier)) - name: (type_identifier) - body: (field_declaration_list)) - (union_specifier - (ms_declspec_modifier - (identifier)) - name: (type_identifier) - body: (field_declaration_list))) - -================================ -pointers -================================ - -struct s2 -{ - int * __restrict x; - int * __sptr psp; - int * __uptr pup; - int * __unaligned pup; -}; - -void sum2(int n, int * __restrict a, int * __restrict b, - int * c, int * d) { - int i; - for (i = 0; i < n; i++) { - a[i] = b[i] + c[i]; - c[i] = b[i] + d[i]; - } -} - -void MyFunction(char * __uptr myValue); - ---- - -(translation_unit - (struct_specifier - name: (type_identifier) - body: (field_declaration_list - (field_declaration - type: (primitive_type) - declarator: (pointer_declarator - (ms_pointer_modifier - (ms_restrict_modifier)) - declarator: (field_identifier))) - (field_declaration - type: (primitive_type) - declarator: (pointer_declarator - (ms_pointer_modifier - (ms_signed_ptr_modifier)) - declarator: (field_identifier))) - (field_declaration - type: (primitive_type) - declarator: (pointer_declarator - (ms_pointer_modifier - (ms_unsigned_ptr_modifier)) - declarator: (field_identifier))) - (field_declaration - type: (primitive_type) - declarator: (pointer_declarator - (ms_pointer_modifier - (ms_unaligned_ptr_modifier)) - declarator: (field_identifier))))) - (function_definition - type: (primitive_type) - declarator: (function_declarator - declarator: (identifier) - parameters: (parameter_list - (parameter_declaration - type: (primitive_type) - declarator: (identifier)) - (parameter_declaration - type: (primitive_type) - declarator: (pointer_declarator - (ms_pointer_modifier - (ms_restrict_modifier)) - declarator: (identifier))) - (parameter_declaration - type: (primitive_type) - declarator: (pointer_declarator - (ms_pointer_modifier - (ms_restrict_modifier)) - declarator: (identifier))) - (parameter_declaration - type: (primitive_type) - declarator: (pointer_declarator - declarator: (identifier))) - (parameter_declaration - type: (primitive_type) - declarator: (pointer_declarator - declarator: (identifier))))) - body: (compound_statement - (declaration - type: (primitive_type) - declarator: (identifier)) - (for_statement - initializer: (assignment_expression - left: (identifier) - right: (number_literal)) - condition: (binary_expression - left: (identifier) - right: (identifier)) - update: (update_expression - argument: (identifier)) - body: (compound_statement - (expression_statement - (assignment_expression - left: (subscript_expression - argument: (identifier) - index: (identifier)) - right: (binary_expression - left: (subscript_expression - argument: (identifier) - index: (identifier)) - right: (subscript_expression - argument: (identifier) - index: (identifier))))) - (expression_statement - (assignment_expression - left: (subscript_expression - argument: (identifier) - index: (identifier)) - right: (binary_expression - left: (subscript_expression - argument: (identifier) - index: (identifier)) - right: (subscript_expression - argument: (identifier) - index: (identifier))))))))) - (declaration - type: (primitive_type) - declarator: (function_declarator - declarator: (identifier) - parameters: (parameter_list - (parameter_declaration - type: (primitive_type) - declarator: (pointer_declarator - (ms_pointer_modifier - (ms_unsigned_ptr_modifier)) - declarator: (identifier))))))) - -================================ -call modifiers -================================ - -__cdecl void mymethod(){ - return; -} - -__fastcall void mymethod(){ - return; -} - ---- - -(translation_unit - (function_definition - (ms_call_modifier) - type: (primitive_type) - declarator: (function_declarator - declarator: (identifier) - parameters: (parameter_list)) - body: (compound_statement - (return_statement))) - (function_definition - (ms_call_modifier) - type: (primitive_type) - declarator: (function_declarator - declarator: (identifier) - parameters: (parameter_list)) - body: (compound_statement - (return_statement)))) diff --git a/tree-sitter-c/test/corpus/preprocessor.txt b/tree-sitter-c/test/corpus/preprocessor.txt deleted file mode 100644 index 3c52d1d..0000000 --- a/tree-sitter-c/test/corpus/preprocessor.txt +++ /dev/null @@ -1,274 +0,0 @@ -============================================ -Include directives -============================================ - -#include "some/path.h" -#include -#include MACRO -#include MACRO(arg1, arg2) - ---- - -(translation_unit - (preproc_include path: (string_literal)) - (preproc_include path: (system_lib_string)) - (preproc_include path: (identifier)) - (preproc_include path: - (call_expression - function: (identifier) - arguments: (argument_list (identifier) (identifier))))) - -============================================ -Object-like macro definitions -============================================ - -#define ONE -#define TWO int a = b; -#define THREE \ - c == d ? \ - e : \ - f -#define FOUR (mno * pq) -#define FIVE(a,b) x \ - + y -#define SIX(a, \ - b) x \ - + y - ---- - -(translation_unit - (preproc_def name: (identifier)) - (preproc_def name: (identifier) value: (preproc_arg)) - (preproc_def name: (identifier) value: (preproc_arg)) - (preproc_def name: (identifier) value: (preproc_arg)) - (preproc_function_def name: (identifier) parameters: (preproc_params (identifier) (identifier)) value: (preproc_arg)) - (preproc_function_def name: (identifier) parameters: (preproc_params (identifier) (identifier)) value: (preproc_arg))) - -============================================ -Function-like macro definitions -============================================ - -#define ONE() a -#define TWO(b) c -#define THREE(d, e) f -#define FOUR(...) g -#define FIVE(h, i, ...) j - ---- - -(translation_unit - (preproc_function_def - name: (identifier) - parameters: (preproc_params) - value: (preproc_arg)) - (preproc_function_def - name: (identifier) - parameters: (preproc_params (identifier)) - value: (preproc_arg)) - (preproc_function_def - name: (identifier) - parameters: (preproc_params (identifier) (identifier)) - value: (preproc_arg)) - (preproc_function_def - name: (identifier) - parameters: (preproc_params) - value: (preproc_arg)) - (preproc_function_def - name: (identifier) - parameters: (preproc_params (identifier) (identifier)) - value: (preproc_arg))) - -============================================ -Ifdefs -============================================ - -#ifndef DEFINE1 -int j; -#endif - -#ifdef DEFINE2 -ssize_t b; -#define c 32 -#elif defined DEFINE3 -#else -int b; -#define c 16 -#endif - -#ifdef DEFINE2 -#else -# ifdef DEFINE3 -# else -# endif -#endif - ---- - -(translation_unit - (preproc_ifdef - name: (identifier) - (declaration - type: (primitive_type) - declarator: (identifier))) - - (preproc_ifdef - name: (identifier) - (declaration - type: (primitive_type) - declarator: (identifier)) - (preproc_def - name: (identifier) - value: (preproc_arg)) - alternative: (preproc_elif - condition: (preproc_defined (identifier)) - alternative: (preproc_else - (declaration - type: (primitive_type) - declarator: (identifier)) - (preproc_def - name: (identifier) - value: (preproc_arg))))) - - (preproc_ifdef - name: (identifier) - alternative: (preproc_else - (preproc_ifdef - name: (identifier) - alternative: (preproc_else))))) - -=============================================================== -General if blocks -========================================== - -#if defined(__GNUC__) && defined(__PIC__) -#define inline inline __attribute__((always_inline)) -#elif defined(_WIN32) -#define something -#elif !defined(SOMETHING_ELSE) -#define SOMETHING_ELSE -#else -#include -#endif - ---- - -(translation_unit - (preproc_if - condition: (binary_expression - left: (preproc_defined (identifier)) - right: (preproc_defined (identifier))) - (preproc_def - name: (identifier) - value: (preproc_arg)) - alternative: (preproc_elif - condition: (preproc_defined (identifier)) - (preproc_def - name: (identifier)) - alternative: (preproc_elif - condition: (unary_expression - argument: (preproc_defined (identifier))) - (preproc_def - name: (identifier)) - alternative: (preproc_else - (preproc_include path: (system_lib_string))))))) - -============================================ -Preprocessor conditionals in functions -============================================ - -int main() { - #if d - puts("1"); - #else - puts("2"); - #endif - - #if a - return 0; - #elif b - return 1; - #elif c - return 2; - #else - return 3; - #endif -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (preproc_if - (identifier) - (expression_statement (call_expression (identifier) (argument_list (string_literal)))) - (preproc_else - (expression_statement (call_expression (identifier) (argument_list (string_literal)))))) - (preproc_if - (identifier) - (return_statement (number_literal)) - (preproc_elif - (identifier) - (return_statement (number_literal)) - (preproc_elif - (identifier) - (return_statement (number_literal)) - (preproc_else - (return_statement (number_literal))))))))) - -================================================= -Preprocessor conditionals in struct/union bodies -================================================= - -struct S { -#ifdef _WIN32 - LONG f2; -#else - uint32_t f2; -#endif -}; - ---- - -(translation_unit - (struct_specifier (type_identifier) (field_declaration_list - (preproc_ifdef (identifier) - (field_declaration (type_identifier) (field_identifier)) - (preproc_else - (field_declaration (primitive_type) (field_identifier))))))) - -==================================== -Unknown preprocessor directives -==================================== - -#pragma mark - UIViewController - ---- - -(translation_unit (preproc_call - directive: (preproc_directive) - argument: (preproc_arg))) - -====================================== -Preprocessor expressions -====================================== - -#if A(B || C) && \ - !D(F) - -uint32_t a; - -#endif - ---- - -(translation_unit - (preproc_if - (binary_expression - (call_expression (identifier) (argument_list (binary_expression (identifier) (identifier)))) - (unary_expression - (call_expression (identifier) (argument_list (identifier))))) - (declaration (primitive_type) (identifier)))) diff --git a/tree-sitter-c/test/corpus/statements.txt b/tree-sitter-c/test/corpus/statements.txt deleted file mode 100644 index 45a42f3..0000000 --- a/tree-sitter-c/test/corpus/statements.txt +++ /dev/null @@ -1,326 +0,0 @@ -============================================ -If statements -============================================ - -int main() { - if (a) - 1; - - if (!a) { - 2; - } else { - 3; - } -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (if_statement (parenthesized_expression (identifier)) - (expression_statement (number_literal))) - (if_statement (parenthesized_expression (unary_expression (identifier))) - (compound_statement - (expression_statement (number_literal))) - (compound_statement - (expression_statement (number_literal))))))) - -============================================ -For loops -============================================ - -int main() { - for (;;) - 1; - - for (int i = 0; i < 5; next(), i++) { - 2; - } - - for (start(); check(); step()) - 3; - - for (i = 0, j = 0, k = 0, l = 0; i < 1, j < 1; i++, j++, k++, l++) - 1; -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (for_statement - (expression_statement (number_literal))) - (for_statement - (declaration (primitive_type) (init_declarator (identifier) (number_literal))) - (binary_expression (identifier) (number_literal)) - (comma_expression - (call_expression (identifier) (argument_list)) - (update_expression (identifier))) - (compound_statement (expression_statement (number_literal)))) - (for_statement - (call_expression (identifier) (argument_list)) - (call_expression (identifier) (argument_list)) - (call_expression (identifier) (argument_list)) - (expression_statement (number_literal))) - (for_statement - (comma_expression - (assignment_expression (identifier) (number_literal)) - (comma_expression - (assignment_expression (identifier) (number_literal)) - (comma_expression - (assignment_expression (identifier) (number_literal)) - (assignment_expression (identifier) (number_literal))))) - (comma_expression - (binary_expression - (identifier) - (number_literal)) - (binary_expression - (identifier) - (number_literal))) - (comma_expression - (update_expression (identifier)) - (comma_expression - (update_expression (identifier)) - (comma_expression - (update_expression (identifier)) - (update_expression (identifier))))) - (expression_statement (number_literal)))))) - -============================================ -While loops -============================================ - -int main() { - while (x) - printf("hi"); -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (while_statement (parenthesized_expression (identifier)) - (expression_statement (call_expression - (identifier) - (argument_list (string_literal)))))))) - -============================================ -Labeled statements -============================================ - -void foo(T *t) { -recur: - t = t->next(); - if (t) goto recur; -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list - (parameter_declaration (type_identifier) (pointer_declarator (identifier))))) - (compound_statement - (labeled_statement (statement_identifier) - (expression_statement (assignment_expression - (identifier) - (call_expression (field_expression (identifier) (field_identifier)) (argument_list))))) - (if_statement (parenthesized_expression (identifier)) (goto_statement (statement_identifier)))))) - -============================================ -Switch statements -============================================ - -void foo(int a) { - switch (a) { - puts("entered switch!"); - - case 3: - case 5: - if (b) { - c(); - } - break; - - default: - c(); - break; - } -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list - (parameter_declaration (primitive_type) (identifier)))) - (compound_statement - (switch_statement - (parenthesized_expression (identifier)) - (compound_statement - (expression_statement (call_expression (identifier) (argument_list (string_literal)))) - (case_statement (number_literal)) - (case_statement (number_literal) - (if_statement - (parenthesized_expression (identifier)) - (compound_statement (expression_statement (call_expression (identifier) (argument_list))))) - (break_statement)) - (case_statement - (expression_statement (call_expression (identifier) (argument_list))) - (break_statement))))))) - -============================================ -Case statements separate from switch statements -============================================ - -int main() { - switch (count % 8) { - case 0: - do { - *to = *from++; - case 2: *to = *from++; - case 1: *to = *from++; - } while (--n > 0); - } -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (switch_statement - (parenthesized_expression (binary_expression (identifier) (number_literal))) - (compound_statement - (case_statement (number_literal) - (do_statement - (compound_statement - (expression_statement (assignment_expression - (pointer_expression (identifier)) - (pointer_expression (update_expression (identifier))))) - (case_statement (number_literal) - (expression_statement (assignment_expression - (pointer_expression (identifier)) - (pointer_expression (update_expression (identifier)))))) - (case_statement (number_literal) - (expression_statement (assignment_expression - (pointer_expression (identifier)) - (pointer_expression (update_expression (identifier))))))) - (parenthesized_expression (binary_expression (update_expression (identifier)) (number_literal)))))))))) - -============================================ -Return statements -============================================ - -void foo() { - return; - return a; - return a, b; -} - ---- - -(translation_unit - (function_definition - (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (return_statement) - (return_statement (identifier)) - (return_statement (comma_expression (identifier) (identifier)))))) - -============================================ -Comments with asterisks -============================================ - -/************************* - * odd number of asterisks - *************************/ -int a; - -/************************** - * even number of asterisks - **************************/ -int b; - ---- - -(translation_unit - (comment) - (declaration (primitive_type) (identifier)) - (comment) - (declaration (primitive_type) (identifier))) - -============================================ -Attributes -============================================ - -void f() { - [[a]] switch (b) { - [[c]] case 1: {} - case 2: - [[fallthrough]]; - default: - } - [[a]] while (true) {} - [[a]] if (true) {} - [[a]] for (;;) {} - [[a]] return; - [[a]] a; - [[a]]; - [[a]] label: {} - [[a]] goto label; - - // these are c++ specific, but their bind locations should be c-compatible - if (true) [[likely]] {} else [[unlikely]] {} - do [[likely]] {} while (true); -} - ---- - -(translation_unit - (function_definition (primitive_type) - (function_declarator (identifier) (parameter_list)) - (compound_statement - (attributed_statement - (attribute_declaration (attribute (identifier))) - (switch_statement - (parenthesized_expression (identifier)) - (compound_statement - (attributed_statement - (attribute_declaration (attribute (identifier))) - (case_statement (number_literal) (compound_statement))) - (case_statement (number_literal) - (attributed_statement - (attribute_declaration (attribute (identifier))) - (expression_statement))) - (case_statement)))) - (attributed_statement (attribute_declaration (attribute (identifier))) (while_statement (parenthesized_expression (true)) (compound_statement))) - (attributed_statement (attribute_declaration (attribute (identifier))) (if_statement (parenthesized_expression (true)) (compound_statement))) - (attributed_statement (attribute_declaration (attribute (identifier))) (for_statement (compound_statement))) - (attributed_statement (attribute_declaration (attribute (identifier))) (return_statement)) - (attributed_statement (attribute_declaration (attribute (identifier))) (expression_statement (identifier))) - (attributed_statement (attribute_declaration (attribute (identifier))) (expression_statement)) - (attributed_statement (attribute_declaration (attribute (identifier))) (labeled_statement (statement_identifier) (compound_statement))) - (attributed_statement (attribute_declaration (attribute (identifier))) (goto_statement (statement_identifier))) - (comment) - (if_statement - (parenthesized_expression (true)) - (attributed_statement (attribute_declaration (attribute (identifier))) (compound_statement)) - (attributed_statement (attribute_declaration (attribute (identifier))) (compound_statement))) - (do_statement - (attributed_statement (attribute_declaration (attribute (identifier))) (compound_statement)) - (parenthesized_expression (true)))))) diff --git a/tree-sitter-c/test/corpus/types.txt b/tree-sitter-c/test/corpus/types.txt deleted file mode 100644 index 6d2d19a..0000000 --- a/tree-sitter-c/test/corpus/types.txt +++ /dev/null @@ -1,80 +0,0 @@ -======================================== -Primitive types -======================================== - -int a; -uint8_t a; -uint16_t a; -uint32_t a; -uint64_t a; -uintptr_t a; - -int8_t a; -int16_t a; -int32_t a; -int64_t a; -intptr_t a; - -char16_t a; -char32_t a; - -size_t a; -ssize_t a; - ---- - -(translation_unit - (declaration (primitive_type) (identifier)) - (declaration (primitive_type) (identifier)) - (declaration (primitive_type) (identifier)) - (declaration (primitive_type) (identifier)) - (declaration (primitive_type) (identifier)) - (declaration (primitive_type) (identifier)) - (declaration (primitive_type) (identifier)) - (declaration (primitive_type) (identifier)) - (declaration (primitive_type) (identifier)) - (declaration (primitive_type) (identifier)) - (declaration (primitive_type) (identifier)) - (declaration (primitive_type) (identifier)) - (declaration (primitive_type) (identifier)) - (declaration (primitive_type) (identifier)) - (declaration (primitive_type) (identifier))) - -======================================== -Type modifiers -======================================== - -void f(unsigned); -void f(unsigned int); -void f(signed long int); -void f(unsigned v1); -void f(unsigned long v2); - ---- - -(translation_unit - (declaration - (primitive_type) - (function_declarator - (identifier) - (parameter_list (parameter_declaration (sized_type_specifier))))) - (declaration - (primitive_type) - (function_declarator - (identifier) - (parameter_list (parameter_declaration (sized_type_specifier (primitive_type)))))) - (declaration - (primitive_type) - (function_declarator - (identifier) - (parameter_list (parameter_declaration (sized_type_specifier (primitive_type)))))) - (declaration - (primitive_type) - (function_declarator - (identifier) - (parameter_list (parameter_declaration (sized_type_specifier) (identifier))))) - (declaration - (primitive_type) - (function_declarator - (identifier) - (parameter_list (parameter_declaration (sized_type_specifier) (identifier)))))) diff --git a/tree-sitter-c/test/highlight/keywords.c b/tree-sitter-c/test/highlight/keywords.c deleted file mode 100644 index 50d790c..0000000 --- a/tree-sitter-c/test/highlight/keywords.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -// ^ keyword -// ^ string - -#include "something.h" -// ^ string diff --git a/tree-sitter-c/test/highlight/names.c b/tree-sitter-c/test/highlight/names.c deleted file mode 100644 index efdd44c..0000000 --- a/tree-sitter-c/test/highlight/names.c +++ /dev/null @@ -1,33 +0,0 @@ -typedef struct { - // ^ keyword - // ^ keyword - a_t b; - // <- type - // ^ property - - unsigned c_t (*d)[2]; - // ^ type - // ^ type - // ^ property -}, T, V; -// ^ type -// ^ type - -int main(const char string[SIZE]) { -// <- type -// ^ function -// ^ keyword -// ^ type -// ^ variable -// ^ constant - - return foo.bar + foo.baz(); - // ^ keyword - // ^ variable - // ^ property - // ^ function - -error: - // <- label - return 0; -} From 33c304f62749f6778b41c5e38ee6ecd23dfc04f5 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Sun, 7 Aug 2022 12:27:58 +0700 Subject: [PATCH 1221/1541] chore: stylua format --- lua/plugins/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 361ef6a..80b6093 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -15,11 +15,11 @@ local plugins = { "PackerCompile", "PackerStatus", "PackerProfile", - "PackerLoad" + "PackerLoad", }, config = function() require "plugins" - end + end, }, ["NvChad/extensions"] = { module = { "telescope", "nvchad" } }, @@ -226,7 +226,7 @@ local plugins = { -- Speed up deffered plugins ["lewis6991/impatient.nvim"] = { - module = "impatient" + module = "impatient", }, } From 074b656cbd4d789633743eaf1acf320bea6edd19 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Sun, 7 Aug 2022 12:31:11 +0700 Subject: [PATCH 1222/1541] fix impatient not found on bootstrap --- lua/core/lazy_load.lua | 2 +- rplugin.vim | 15 + site/pack/packer/opt/Comment.nvim | 1 + site/pack/packer/opt/LuaSnip | 1 + site/pack/packer/opt/cmp-buffer | 1 + site/pack/packer/opt/cmp-nvim-lsp | 1 + site/pack/packer/opt/cmp-nvim-lua | 1 + site/pack/packer/opt/cmp-path | 1 + site/pack/packer/opt/cmp_luasnip | 1 + site/pack/packer/opt/extensions | 1 + site/pack/packer/opt/friendly-snippets | 1 + site/pack/packer/opt/gitsigns.nvim | 1 + site/pack/packer/opt/impatient.nvim | 1 + site/pack/packer/opt/indent-blankline.nvim | 1 + site/pack/packer/opt/mason.nvim | 1 + site/pack/packer/opt/nvim-autopairs | 1 + site/pack/packer/opt/nvim-cmp | 1 + site/pack/packer/opt/nvim-colorizer.lua | 1 + site/pack/packer/opt/nvim-lspconfig | 1 + site/pack/packer/opt/nvim-tree.lua | 1 + site/pack/packer/opt/nvim-treesitter | 1 + site/pack/packer/opt/nvim-web-devicons | 1 + site/pack/packer/opt/nvterm | 1 + site/pack/packer/opt/packer.nvim | 1 + site/pack/packer/opt/plenary.nvim | 1 + site/pack/packer/opt/telescope.nvim | 1 + site/pack/packer/opt/ui | 1 + site/pack/packer/start/base46 | 1 + tree-sitter-lua/.github/workflows/ci.yml | 22 + tree-sitter-lua/.gitignore | 11 + tree-sitter-lua/.prettierignore | 2 + tree-sitter-lua/.prettierrc.json | 3 + tree-sitter-lua/Cargo.toml | 29 + tree-sitter-lua/LICENSE.md | 21 + tree-sitter-lua/README.md | 20 + tree-sitter-lua/binding.gyp | 19 + tree-sitter-lua/bindings/node/binding.cc | 28 + tree-sitter-lua/bindings/node/index.js | 19 + tree-sitter-lua/bindings/rust/build.rs | 38 + tree-sitter-lua/bindings/rust/lib.rs | 52 + tree-sitter-lua/examples/init.lua | 3 + tree-sitter-lua/grammar.js | 504 + tree-sitter-lua/package.json | 46 + tree-sitter-lua/script/known_failures.txt | 0 tree-sitter-lua/script/parse-examples | 51 + tree-sitter-lua/script/release.sh | 33 + tree-sitter-lua/src/grammar.json | 2834 +++++ tree-sitter-lua/src/node-types.json | 1244 ++ tree-sitter-lua/src/parser.c | 10837 ++++++++++++++++++ tree-sitter-lua/src/scanner.c | 229 + tree-sitter-lua/src/tree_sitter/parser.h | 224 + tree-sitter-lua/test/corpus/chunk.txt | 31 + tree-sitter-lua/test/corpus/comments.txt | 80 + tree-sitter-lua/test/corpus/expressions.txt | 591 + tree-sitter-lua/test/corpus/statements.txt | 459 + 55 files changed, 17472 insertions(+), 1 deletion(-) create mode 100644 rplugin.vim create mode 160000 site/pack/packer/opt/Comment.nvim create mode 160000 site/pack/packer/opt/LuaSnip create mode 160000 site/pack/packer/opt/cmp-buffer create mode 160000 site/pack/packer/opt/cmp-nvim-lsp create mode 160000 site/pack/packer/opt/cmp-nvim-lua create mode 160000 site/pack/packer/opt/cmp-path create mode 160000 site/pack/packer/opt/cmp_luasnip create mode 160000 site/pack/packer/opt/extensions create mode 160000 site/pack/packer/opt/friendly-snippets create mode 160000 site/pack/packer/opt/gitsigns.nvim create mode 160000 site/pack/packer/opt/impatient.nvim create mode 160000 site/pack/packer/opt/indent-blankline.nvim create mode 160000 site/pack/packer/opt/mason.nvim create mode 160000 site/pack/packer/opt/nvim-autopairs create mode 160000 site/pack/packer/opt/nvim-cmp create mode 160000 site/pack/packer/opt/nvim-colorizer.lua create mode 160000 site/pack/packer/opt/nvim-lspconfig create mode 160000 site/pack/packer/opt/nvim-tree.lua create mode 160000 site/pack/packer/opt/nvim-treesitter create mode 160000 site/pack/packer/opt/nvim-web-devicons create mode 160000 site/pack/packer/opt/nvterm create mode 160000 site/pack/packer/opt/packer.nvim create mode 160000 site/pack/packer/opt/plenary.nvim create mode 160000 site/pack/packer/opt/telescope.nvim create mode 160000 site/pack/packer/opt/ui create mode 160000 site/pack/packer/start/base46 create mode 100644 tree-sitter-lua/.github/workflows/ci.yml create mode 100644 tree-sitter-lua/.gitignore create mode 100644 tree-sitter-lua/.prettierignore create mode 100644 tree-sitter-lua/.prettierrc.json create mode 100644 tree-sitter-lua/Cargo.toml create mode 100644 tree-sitter-lua/LICENSE.md create mode 100644 tree-sitter-lua/README.md create mode 100644 tree-sitter-lua/binding.gyp create mode 100644 tree-sitter-lua/bindings/node/binding.cc create mode 100644 tree-sitter-lua/bindings/node/index.js create mode 100644 tree-sitter-lua/bindings/rust/build.rs create mode 100644 tree-sitter-lua/bindings/rust/lib.rs create mode 100644 tree-sitter-lua/examples/init.lua create mode 100644 tree-sitter-lua/grammar.js create mode 100644 tree-sitter-lua/package.json create mode 100644 tree-sitter-lua/script/known_failures.txt create mode 100755 tree-sitter-lua/script/parse-examples create mode 100755 tree-sitter-lua/script/release.sh create mode 100644 tree-sitter-lua/src/grammar.json create mode 100644 tree-sitter-lua/src/node-types.json create mode 100644 tree-sitter-lua/src/parser.c create mode 100644 tree-sitter-lua/src/scanner.c create mode 100644 tree-sitter-lua/src/tree_sitter/parser.h create mode 100644 tree-sitter-lua/test/corpus/chunk.txt create mode 100644 tree-sitter-lua/test/corpus/comments.txt create mode 100644 tree-sitter-lua/test/corpus/expressions.txt create mode 100644 tree-sitter-lua/test/corpus/statements.txt diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index eba5cfa..07a33d7 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -10,7 +10,7 @@ M.lazy_load = function(tb) callback = function() if tb.condition() then vim.api.nvim_del_augroup_by_name(tb.augroup_name) - require "impatient" + pcall(require, "impatient") -- dont defer for treesitter as it will show slow highlighting -- This deferring only happens only when we do "nvim filename" diff --git a/rplugin.vim b/rplugin.vim new file mode 100644 index 0000000..3beadb1 --- /dev/null +++ b/rplugin.vim @@ -0,0 +1,15 @@ +" perl plugins + + +" node plugins + + +" python3 plugins + + +" ruby plugins + + +" python plugins + + diff --git a/site/pack/packer/opt/Comment.nvim b/site/pack/packer/opt/Comment.nvim new file mode 160000 index 0000000..9b76787 --- /dev/null +++ b/site/pack/packer/opt/Comment.nvim @@ -0,0 +1 @@ +Subproject commit 9b76787e273567c0e3027304bd16ffedc751c04c diff --git a/site/pack/packer/opt/LuaSnip b/site/pack/packer/opt/LuaSnip new file mode 160000 index 0000000..ac27343 --- /dev/null +++ b/site/pack/packer/opt/LuaSnip @@ -0,0 +1 @@ +Subproject commit ac27343b52796a0aa1bb3db824d16e66d1def182 diff --git a/site/pack/packer/opt/cmp-buffer b/site/pack/packer/opt/cmp-buffer new file mode 160000 index 0000000..62fc67a --- /dev/null +++ b/site/pack/packer/opt/cmp-buffer @@ -0,0 +1 @@ +Subproject commit 62fc67a2b0205136bc3e312664624ba2ab4a9323 diff --git a/site/pack/packer/opt/cmp-nvim-lsp b/site/pack/packer/opt/cmp-nvim-lsp new file mode 160000 index 0000000..affe808 --- /dev/null +++ b/site/pack/packer/opt/cmp-nvim-lsp @@ -0,0 +1 @@ +Subproject commit affe808a5c56b71630f17aa7c38e15c59fd648a8 diff --git a/site/pack/packer/opt/cmp-nvim-lua b/site/pack/packer/opt/cmp-nvim-lua new file mode 160000 index 0000000..d276254 --- /dev/null +++ b/site/pack/packer/opt/cmp-nvim-lua @@ -0,0 +1 @@ +Subproject commit d276254e7198ab7d00f117e88e223b4bd8c02d21 diff --git a/site/pack/packer/opt/cmp-path b/site/pack/packer/opt/cmp-path new file mode 160000 index 0000000..447c87c --- /dev/null +++ b/site/pack/packer/opt/cmp-path @@ -0,0 +1 @@ +Subproject commit 447c87cdd6e6d6a1d2488b1d43108bfa217f56e1 diff --git a/site/pack/packer/opt/cmp_luasnip b/site/pack/packer/opt/cmp_luasnip new file mode 160000 index 0000000..a9de941 --- /dev/null +++ b/site/pack/packer/opt/cmp_luasnip @@ -0,0 +1 @@ +Subproject commit a9de941bcbda508d0a45d28ae366bb3f08db2e36 diff --git a/site/pack/packer/opt/extensions b/site/pack/packer/opt/extensions new file mode 160000 index 0000000..e82d9f5 --- /dev/null +++ b/site/pack/packer/opt/extensions @@ -0,0 +1 @@ +Subproject commit e82d9f5e612ade06202591ed76ecb095e946f7f8 diff --git a/site/pack/packer/opt/friendly-snippets b/site/pack/packer/opt/friendly-snippets new file mode 160000 index 0000000..7339def --- /dev/null +++ b/site/pack/packer/opt/friendly-snippets @@ -0,0 +1 @@ +Subproject commit 7339def34e46237eb7c9a893cb7d42dcb90e05e6 diff --git a/site/pack/packer/opt/gitsigns.nvim b/site/pack/packer/opt/gitsigns.nvim new file mode 160000 index 0000000..9c3ca02 --- /dev/null +++ b/site/pack/packer/opt/gitsigns.nvim @@ -0,0 +1 @@ +Subproject commit 9c3ca027661136a618c82275427746e481c84a4e diff --git a/site/pack/packer/opt/impatient.nvim b/site/pack/packer/opt/impatient.nvim new file mode 160000 index 0000000..4ccbe74 --- /dev/null +++ b/site/pack/packer/opt/impatient.nvim @@ -0,0 +1 @@ +Subproject commit 4ccbe749ce439fa25d387d459e8c339131cc5d1f diff --git a/site/pack/packer/opt/indent-blankline.nvim b/site/pack/packer/opt/indent-blankline.nvim new file mode 160000 index 0000000..c15bbe9 --- /dev/null +++ b/site/pack/packer/opt/indent-blankline.nvim @@ -0,0 +1 @@ +Subproject commit c15bbe9f23d88b5c0b4ca45a446e01a0a3913707 diff --git a/site/pack/packer/opt/mason.nvim b/site/pack/packer/opt/mason.nvim new file mode 160000 index 0000000..cd1af57 --- /dev/null +++ b/site/pack/packer/opt/mason.nvim @@ -0,0 +1 @@ +Subproject commit cd1af57253b3ac3652765e4d0f83b56802ec2a5f diff --git a/site/pack/packer/opt/nvim-autopairs b/site/pack/packer/opt/nvim-autopairs new file mode 160000 index 0000000..ca89ab9 --- /dev/null +++ b/site/pack/packer/opt/nvim-autopairs @@ -0,0 +1 @@ +Subproject commit ca89ab9e7e42aa9279f1cdad15398d6e18ccee86 diff --git a/site/pack/packer/opt/nvim-cmp b/site/pack/packer/opt/nvim-cmp new file mode 160000 index 0000000..706371f --- /dev/null +++ b/site/pack/packer/opt/nvim-cmp @@ -0,0 +1 @@ +Subproject commit 706371f1300e7c0acb98b346f80dad2dd9b5f679 diff --git a/site/pack/packer/opt/nvim-colorizer.lua b/site/pack/packer/opt/nvim-colorizer.lua new file mode 160000 index 0000000..8fe6ec2 --- /dev/null +++ b/site/pack/packer/opt/nvim-colorizer.lua @@ -0,0 +1 @@ +Subproject commit 8fe6ec269c6bcd19a7c2d69cb0bdcf8bb86a85fe diff --git a/site/pack/packer/opt/nvim-lspconfig b/site/pack/packer/opt/nvim-lspconfig new file mode 160000 index 0000000..6e047f1 --- /dev/null +++ b/site/pack/packer/opt/nvim-lspconfig @@ -0,0 +1 @@ +Subproject commit 6e047f11861bfb6ec28a6ad0138a8f0a62bb8806 diff --git a/site/pack/packer/opt/nvim-tree.lua b/site/pack/packer/opt/nvim-tree.lua new file mode 160000 index 0000000..ff6e796 --- /dev/null +++ b/site/pack/packer/opt/nvim-tree.lua @@ -0,0 +1 @@ +Subproject commit ff6e7966f39a897ac4d1358f4d022cfecdc88ff1 diff --git a/site/pack/packer/opt/nvim-treesitter b/site/pack/packer/opt/nvim-treesitter new file mode 160000 index 0000000..a9a6493 --- /dev/null +++ b/site/pack/packer/opt/nvim-treesitter @@ -0,0 +1 @@ +Subproject commit a9a6493b1eeba458757903352e0d3dc4b54fd4f2 diff --git a/site/pack/packer/opt/nvim-web-devicons b/site/pack/packer/opt/nvim-web-devicons new file mode 160000 index 0000000..2d02a56 --- /dev/null +++ b/site/pack/packer/opt/nvim-web-devicons @@ -0,0 +1 @@ +Subproject commit 2d02a56189e2bde11edd4712fea16f08a6656944 diff --git a/site/pack/packer/opt/nvterm b/site/pack/packer/opt/nvterm new file mode 160000 index 0000000..1317d62 --- /dev/null +++ b/site/pack/packer/opt/nvterm @@ -0,0 +1 @@ +Subproject commit 1317d6238f089e117e3ed98b3cecc37cc4364675 diff --git a/site/pack/packer/opt/packer.nvim b/site/pack/packer/opt/packer.nvim new file mode 160000 index 0000000..afab895 --- /dev/null +++ b/site/pack/packer/opt/packer.nvim @@ -0,0 +1 @@ +Subproject commit afab89594f4f702dc3368769c95b782dbdaeaf0a diff --git a/site/pack/packer/opt/plenary.nvim b/site/pack/packer/opt/plenary.nvim new file mode 160000 index 0000000..31807ee --- /dev/null +++ b/site/pack/packer/opt/plenary.nvim @@ -0,0 +1 @@ +Subproject commit 31807eef4ed574854b8a53ae40ea3292033a78ea diff --git a/site/pack/packer/opt/telescope.nvim b/site/pack/packer/opt/telescope.nvim new file mode 160000 index 0000000..4725867 --- /dev/null +++ b/site/pack/packer/opt/telescope.nvim @@ -0,0 +1 @@ +Subproject commit 4725867ec66b9a0f5e5ad95a1fd94c2f97fa2d2c diff --git a/site/pack/packer/opt/ui b/site/pack/packer/opt/ui new file mode 160000 index 0000000..bca1182 --- /dev/null +++ b/site/pack/packer/opt/ui @@ -0,0 +1 @@ +Subproject commit bca1182e872db0ea52d86b2f4cf4ee7cb092de45 diff --git a/site/pack/packer/start/base46 b/site/pack/packer/start/base46 new file mode 160000 index 0000000..dfdcff9 --- /dev/null +++ b/site/pack/packer/start/base46 @@ -0,0 +1 @@ +Subproject commit dfdcff9c6b2bd1ad3c364973a2497bf62c6f0f20 diff --git a/tree-sitter-lua/.github/workflows/ci.yml b/tree-sitter-lua/.github/workflows/ci.yml new file mode 100644 index 0000000..cb302b2 --- /dev/null +++ b/tree-sitter-lua/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Node + uses: actions/setup-node@v2.1.2 + with: + node-version: '16.x' + - name: Install dependencies + run: npm install + - name: Test + run: npm run test diff --git a/tree-sitter-lua/.gitignore b/tree-sitter-lua/.gitignore new file mode 100644 index 0000000..96921be --- /dev/null +++ b/tree-sitter-lua/.gitignore @@ -0,0 +1,11 @@ +*.log +*.tgz +.DS_Store +Cargo.lock +build +node_modules +package-lock.json +yarn.lock +target + +examples/luvit diff --git a/tree-sitter-lua/.prettierignore b/tree-sitter-lua/.prettierignore new file mode 100644 index 0000000..72fbd61 --- /dev/null +++ b/tree-sitter-lua/.prettierignore @@ -0,0 +1,2 @@ +bindings/ +src/ diff --git a/tree-sitter-lua/.prettierrc.json b/tree-sitter-lua/.prettierrc.json new file mode 100644 index 0000000..544138b --- /dev/null +++ b/tree-sitter-lua/.prettierrc.json @@ -0,0 +1,3 @@ +{ + "singleQuote": true +} diff --git a/tree-sitter-lua/Cargo.toml b/tree-sitter-lua/Cargo.toml new file mode 100644 index 0000000..45902a8 --- /dev/null +++ b/tree-sitter-lua/Cargo.toml @@ -0,0 +1,29 @@ +[package] +name = "tree-sitter-lua" +description = "Lua grammar for the tree-sitter parsing library" +version = "0.0.12" +authors = [ + "Munif Tanjim ", +] +license = "MIT" +keywords = ["incremental", "parsing", "lua"] +categories = ["parsing", "text-editors"] +repository = "https://github.com/MunifTanjim/tree-sitter-lua" +edition = "2018" + +build = "bindings/rust/build.rs" +include = [ + "bindings/rust/*", + "grammar.js", + "queries/*", + "src/*", +] + +[lib] +path = "bindings/rust/lib.rs" + +[dependencies] +tree-sitter = "0.20" + +[build-dependencies] +cc = "1.0" diff --git a/tree-sitter-lua/LICENSE.md b/tree-sitter-lua/LICENSE.md new file mode 100644 index 0000000..ff0407e --- /dev/null +++ b/tree-sitter-lua/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 Munif Tanjim + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tree-sitter-lua/README.md b/tree-sitter-lua/README.md new file mode 100644 index 0000000..f8ce1c8 --- /dev/null +++ b/tree-sitter-lua/README.md @@ -0,0 +1,20 @@ +![GitHub Workflow Status: CI](https://img.shields.io/github/workflow/status/MunifTanjim/tree-sitter-lua/CI/main?label=CI&style=for-the-badge) + +# tree-sitter-lua + +Lua grammar for tree-sitter. + +## References + +- [Lua Documentation](https://www.lua.org/docs.html) + +## Acknowledgement + +The [external scanner](/src/scanner.c) was based on these repositories: + +- [Azganoth/tree-sitter-lua](https://github.com/Azganoth/tree-sitter-lua) +- [euclidianAce/tree-sitter-teal](https://github.com/euclidianAce/tree-sitter-teal) + +## License + +Licensed under the MIT License. Check the [LICENSE](/LICENSE.md) file for details. diff --git a/tree-sitter-lua/binding.gyp b/tree-sitter-lua/binding.gyp new file mode 100644 index 0000000..6ad07c4 --- /dev/null +++ b/tree-sitter-lua/binding.gyp @@ -0,0 +1,19 @@ +{ + "targets": [ + { + "target_name": "tree_sitter_lua_binding", + "include_dirs": [ + " +#include "nan.h" + +using namespace v8; + +extern "C" TSLanguage * tree_sitter_lua(); + +namespace { + +NAN_METHOD(New) {} + +void Init(Local exports, Local module) { + Local tpl = Nan::New(New); + tpl->SetClassName(Nan::New("Language").ToLocalChecked()); + tpl->InstanceTemplate()->SetInternalFieldCount(1); + + Local constructor = Nan::GetFunction(tpl).ToLocalChecked(); + Local instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); + Nan::SetInternalFieldPointer(instance, 0, tree_sitter_lua()); + + Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("lua").ToLocalChecked()); + Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); +} + +NODE_MODULE(tree_sitter_lua_binding, Init) + +} // namespace diff --git a/tree-sitter-lua/bindings/node/index.js b/tree-sitter-lua/bindings/node/index.js new file mode 100644 index 0000000..498d9af --- /dev/null +++ b/tree-sitter-lua/bindings/node/index.js @@ -0,0 +1,19 @@ +try { + module.exports = require("../../build/Release/tree_sitter_lua_binding"); +} catch (error1) { + if (error1.code !== 'MODULE_NOT_FOUND') { + throw error1; + } + try { + module.exports = require("../../build/Debug/tree_sitter_lua_binding"); + } catch (error2) { + if (error2.code !== 'MODULE_NOT_FOUND') { + throw error2; + } + throw error1 + } +} + +try { + module.exports.nodeTypeInfo = require("../../src/node-types.json"); +} catch (_) {} diff --git a/tree-sitter-lua/bindings/rust/build.rs b/tree-sitter-lua/bindings/rust/build.rs new file mode 100644 index 0000000..f7aaf16 --- /dev/null +++ b/tree-sitter-lua/bindings/rust/build.rs @@ -0,0 +1,38 @@ +fn main() { + let src_dir = std::path::Path::new("src"); + + let mut c_config = cc::Build::new(); + c_config.include(&src_dir); + c_config + .flag_if_supported("-Wno-unused-parameter") + .flag_if_supported("-Wno-unused-but-set-variable") + .flag_if_supported("-Wno-trigraphs"); + let parser_path = src_dir.join("parser.c"); + c_config.file(&parser_path); + + // If your language uses an external scanner written in C, + // then include this block of code: + + let scanner_path = src_dir.join("scanner.c"); + c_config.file(&scanner_path); + println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap()); + + c_config.compile("parser"); + println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); + + // If your language uses an external scanner written in C++, + // then include this block of code: + + /* + let mut cpp_config = cc::Build::new(); + cpp_config.cpp(true); + cpp_config.include(&src_dir); + cpp_config + .flag_if_supported("-Wno-unused-parameter") + .flag_if_supported("-Wno-unused-but-set-variable"); + let scanner_path = src_dir.join("scanner.cc"); + cpp_config.file(&scanner_path); + cpp_config.compile("scanner"); + println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap()); + */ +} diff --git a/tree-sitter-lua/bindings/rust/lib.rs b/tree-sitter-lua/bindings/rust/lib.rs new file mode 100644 index 0000000..1575faf --- /dev/null +++ b/tree-sitter-lua/bindings/rust/lib.rs @@ -0,0 +1,52 @@ +//! This crate provides lua language support for the [tree-sitter][] parsing library. +//! +//! Typically, you will use the [language][language func] function to add this language to a +//! tree-sitter [Parser][], and then use the parser to parse some code: +//! +//! ``` +//! let code = ""; +//! let mut parser = tree_sitter::Parser::new(); +//! parser.set_language(tree_sitter_lua::language()).expect("Error loading lua grammar"); +//! let tree = parser.parse(code, None).unwrap(); +//! ``` +//! +//! [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html +//! [language func]: fn.language.html +//! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html +//! [tree-sitter]: https://tree-sitter.github.io/ + +use tree_sitter::Language; + +extern "C" { + fn tree_sitter_lua() -> Language; +} + +/// Get the tree-sitter [Language][] for this grammar. +/// +/// [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html +pub fn language() -> Language { + unsafe { tree_sitter_lua() } +} + +/// The content of the [`node-types.json`][] file for this grammar. +/// +/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types +pub const NODE_TYPES: &'static str = include_str!("../../src/node-types.json"); + +// Uncomment these to include any queries that this grammar contains + +// pub const HIGHLIGHTS_QUERY: &'static str = include_str!("../../queries/highlights.scm"); +// pub const INJECTIONS_QUERY: &'static str = include_str!("../../queries/injections.scm"); +// pub const LOCALS_QUERY: &'static str = include_str!("../../queries/locals.scm"); +// pub const TAGS_QUERY: &'static str = include_str!("../../queries/tags.scm"); + +#[cfg(test)] +mod tests { + #[test] + fn test_can_load_grammar() { + let mut parser = tree_sitter::Parser::new(); + parser + .set_language(super::language()) + .expect("Error loading lua language"); + } +} diff --git a/tree-sitter-lua/examples/init.lua b/tree-sitter-lua/examples/init.lua new file mode 100644 index 0000000..b7851c7 --- /dev/null +++ b/tree-sitter-lua/examples/init.lua @@ -0,0 +1,3 @@ +#!/usr/bin/env lua + +return 42 diff --git a/tree-sitter-lua/grammar.js b/tree-sitter-lua/grammar.js new file mode 100644 index 0000000..a91c322 --- /dev/null +++ b/tree-sitter-lua/grammar.js @@ -0,0 +1,504 @@ +const PREC = { + OR: 1, // or + AND: 2, // and + COMPARE: 3, // < > <= >= ~= == + BIT_OR: 4, // | + BIT_NOT: 5, // ~ + BIT_AND: 6, // & + BIT_SHIFT: 7, // << >> + CONCAT: 8, // .. + PLUS: 9, // + - + MULTI: 10, // * / // % + UNARY: 11, // not # - ~ + POWER: 12, // ^ +}; + +const list_seq = (rule, separator, trailing_separator = false) => + trailing_separator + ? seq(rule, repeat(seq(separator, rule)), optional(separator)) + : seq(rule, repeat(seq(separator, rule))); + +const optional_block = ($) => alias(optional($._block), $.block); + +// namelist ::= Name {',' Name} +const name_list = ($) => list_seq(field('name', $.identifier), ','); + +module.exports = grammar({ + name: 'lua', + + extras: ($) => [$.comment, /\s/], + + externals: ($) => [ + $._block_comment_start, + $._block_comment_content, + $._block_comment_end, + + $._string_start, + $._string_content, + $._string_end, + ], + + supertypes: ($) => [$.statement, $.expression, $.declaration, $.variable], + + word: ($) => $.identifier, + + rules: { + // chunk ::= block + chunk: ($) => + seq( + optional($.hash_bang_line), + repeat($.statement), + optional($.return_statement) + ), + + hash_bang_line: (_) => /#!.*/, + + // block ::= {stat} [retstat] + _block: ($) => + choice( + seq(repeat1($.statement), optional($.return_statement)), + seq(repeat($.statement), $.return_statement) + ), + + /* + stat ::= ';' | + varlist '=' explist | + functioncall | + label | + break | + goto Name | + do block end | + while exp do block end | + repeat block until exp | + if exp then block {elseif exp then block} [else block] end | + for Name '=' exp ',' exp [',' exp] do block end | + for namelist in explist do block end | + function funcname funcbody | + local function Name funcbody | + local namelist ['=' explist] + */ + statement: ($) => + choice( + $.empty_statement, + $.assignment_statement, + $.function_call, + $.label_statement, + $.break_statement, + $.goto_statement, + $.do_statement, + $.while_statement, + $.repeat_statement, + $.if_statement, + $.for_statement, + $.declaration + ), + + // retstat ::= return [explist] [';'] + return_statement: ($) => + seq( + 'return', + optional(alias($._expression_list, $.expression_list)), + optional(';') + ), + + // ';' + empty_statement: (_) => ';', + + // varlist '=' explist + assignment_statement: ($) => + seq( + alias($._variable_assignment_varlist, $.variable_list), + '=', + alias($._variable_assignment_explist, $.expression_list) + ), + // varlist ::= var {',' var} + _variable_assignment_varlist: ($) => + list_seq(field('name', $.variable), ','), + // explist ::= exp {',' exp} + _variable_assignment_explist: ($) => + list_seq(field('value', $.expression), ','), + + // label ::= '::' Name '::' + label_statement: ($) => seq('::', $.identifier, '::'), + + // break + break_statement: (_) => 'break', + + // goto Name + goto_statement: ($) => seq('goto', $.identifier), + + // do block end + do_statement: ($) => seq('do', field('body', optional_block($)), 'end'), + + // while exp do block end + while_statement: ($) => + seq( + 'while', + field('condition', $.expression), + 'do', + field('body', optional_block($)), + 'end' + ), + + // repeat block until exp + repeat_statement: ($) => + seq( + 'repeat', + field('body', optional_block($)), + 'until', + field('condition', $.expression) + ), + + // if exp then block {elseif exp then block} [else block] end + if_statement: ($) => + seq( + 'if', + field('condition', $.expression), + 'then', + field('consequence', optional_block($)), + repeat(field('alternative', $.elseif_statement)), + optional(field('alternative', $.else_statement)), + 'end' + ), + // elseif exp then block + elseif_statement: ($) => + seq( + 'elseif', + field('condition', $.expression), + 'then', + field('consequence', optional_block($)) + ), + // else block + else_statement: ($) => seq('else', field('body', optional_block($))), + + // for Name '=' exp ',' exp [',' exp] do block end + // for namelist in explist do block end + for_statement: ($) => + seq( + 'for', + field('clause', choice($.for_generic_clause, $.for_numeric_clause)), + 'do', + field('body', optional_block($)), + 'end' + ), + // namelist in explist + for_generic_clause: ($) => + seq( + alias($._name_list, $.variable_list), + 'in', + alias($._expression_list, $.expression_list) + ), + // Name '=' exp ',' exp [',' exp] + for_numeric_clause: ($) => + seq( + field('name', $.identifier), + '=', + field('start', $.expression), + ',', + field('end', $.expression), + optional(seq(',', field('step', $.expression))) + ), + + // function funcname funcbody + // local function Name funcbody + // local namelist ['=' explist] + declaration: ($) => + choice( + $.function_declaration, + field( + 'local_declaration', + alias($._local_function_declaration, $.function_declaration) + ), + field('local_declaration', $.variable_declaration) + ), + // function funcname funcbody + function_declaration: ($) => + seq('function', field('name', $._function_name), $._function_body), + // local function Name funcbody + _local_function_declaration: ($) => + seq('local', 'function', field('name', $.identifier), $._function_body), + // funcname ::= Name {'.' Name} [':' Name] + _function_name: ($) => + choice( + $._function_name_prefix_expression, + alias( + $._function_name_method_index_expression, + $.method_index_expression + ) + ), + _function_name_prefix_expression: ($) => + choice( + $.identifier, + alias($._function_name_dot_index_expression, $.dot_index_expression) + ), + _function_name_dot_index_expression: ($) => + seq( + field('table', $._function_name_prefix_expression), + '.', + field('field', $.identifier) + ), + _function_name_method_index_expression: ($) => + seq( + field('table', $._function_name_prefix_expression), + ':', + field('method', $.identifier) + ), + + // local namelist ['=' explist] + variable_declaration: ($) => + seq( + 'local', + choice( + alias($._name_list, $.variable_list), + alias($._local_variable_assignment, $.assignment_statement) + ) + ), + _local_variable_assignment: ($) => + seq( + alias($._name_list, $.variable_list), + '=', + alias($._variable_assignment_explist, $.expression_list) + ), + // namelist ::= Name {',' Name} + _name_list: ($) => name_list($), + + // explist ::= exp {',' exp} + _expression_list: ($) => list_seq($.expression, ','), + + /* + exp ::= nil | false | true | Numeral | LiteralString | '...' | functiondef | + prefixexp | tableconstructor | exp binop exp | unop exp + */ + expression: ($) => + choice( + $.nil, + $.false, + $.true, + $.number, + $.string, + $.vararg_expression, + $.function_definition, + $.variable, + $.function_call, + $.parenthesized_expression, + $.table_constructor, + $.binary_expression, + $.unary_expression + ), + + // nil + nil: (_) => 'nil', + + // false + false: (_) => 'false', + + // true + true: (_) => 'true', + + // Numeral + number: (_) => { + const decimal_digits = /[0-9]+/; + const signed_integer = seq(optional(choice('-', '+')), decimal_digits); + const decimal_exponent_part = seq(choice('e', 'E'), signed_integer); + + const decimal_integer_literal = choice( + '0', + seq(optional('0'), /[1-9]/, optional(decimal_digits)) + ); + + const hex_digits = /[a-fA-F0-9]+/; + const hex_exponent_part = seq(choice('p', 'P'), signed_integer); + + const decimal_literal = choice( + seq( + decimal_integer_literal, + '.', + optional(decimal_digits), + optional(decimal_exponent_part) + ), + seq('.', decimal_digits, optional(decimal_exponent_part)), + seq(decimal_integer_literal, optional(decimal_exponent_part)) + ); + + const hex_literal = seq( + choice('0x', '0X'), + hex_digits, + optional(seq('.', hex_digits)), + optional(hex_exponent_part) + ); + + return token(choice(decimal_literal, hex_literal)); + }, + + // LiteralString + string: ($) => + seq( + field('start', alias($._string_start, 'string_start')), + field('content', optional(alias($._string_content, 'string_content'))), + field('end', alias($._string_end, 'string_end')) + ), + + // '...' + vararg_expression: (_) => '...', + + // functiondef ::= function funcbody + function_definition: ($) => seq('function', $._function_body), + // funcbody ::= '(' [parlist] ')' block end + _function_body: ($) => + seq( + field('parameters', $.parameters), + field('body', optional_block($)), + 'end' + ), + // '(' [parlist] ')' + parameters: ($) => seq('(', optional($._parameter_list), ')'), + // parlist ::= namelist [',' '...'] | '...' + _parameter_list: ($) => + choice( + seq(name_list($), optional(seq(',', $.vararg_expression))), + $.vararg_expression + ), + + // prefixexp ::= var | functioncall | '(' exp ')' + _prefix_expression: ($) => + prec(1, choice($.variable, $.function_call, $.parenthesized_expression)), + + // var ::= Name | prefixexp [ exp ] | prefixexp . Name + variable: ($) => + choice($.identifier, $.bracket_index_expression, $.dot_index_expression), + // prefixexp [ exp ] + bracket_index_expression: ($) => + seq( + field('table', $._prefix_expression), + '[', + field('field', $.expression), + ']' + ), + // prefixexp . Name + dot_index_expression: ($) => + seq( + field('table', $._prefix_expression), + '.', + field('field', $.identifier) + ), + + // functioncall ::= prefixexp args | prefixexp ':' Name args + function_call: ($) => + seq( + field('name', choice($._prefix_expression, $.method_index_expression)), + field('arguments', $.arguments) + ), + // prefixexp ':' Name + method_index_expression: ($) => + seq( + field('table', $._prefix_expression), + ':', + field('method', $.identifier) + ), + // args ::= '(' [explist] ')' | tableconstructor | LiteralString + arguments: ($) => + choice( + seq('(', optional(list_seq($.expression, ',')), ')'), + $.table_constructor, + $.string + ), + + // '(' exp ')' + parenthesized_expression: ($) => seq('(', $.expression, ')'), + + // tableconstructor ::= '{' [fieldlist] '}' + table_constructor: ($) => seq('{', optional($._field_list), '}'), + // fieldlist ::= field {fieldsep field} [fieldsep] + _field_list: ($) => list_seq($.field, $._field_sep, true), + // fieldsep ::= ',' | ';' + _field_sep: (_) => choice(',', ';'), + // field ::= '[' exp ']' '=' exp | Name '=' exp | exp + field: ($) => + choice( + seq( + '[', + field('name', $.expression), + ']', + '=', + field('value', $.expression) + ), + seq(field('name', $.identifier), '=', field('value', $.expression)), + field('value', $.expression) + ), + + // exp binop exp + binary_expression: ($) => + choice( + ...[ + ['or', PREC.OR], + ['and', PREC.AND], + ['<', PREC.COMPARE], + ['<=', PREC.COMPARE], + ['==', PREC.COMPARE], + ['~=', PREC.COMPARE], + ['>=', PREC.COMPARE], + ['>', PREC.COMPARE], + ['|', PREC.BIT_OR], + ['~', PREC.BIT_NOT], + ['&', PREC.BIT_AND], + ['<<', PREC.BIT_SHIFT], + ['>>', PREC.BIT_SHIFT], + ['+', PREC.PLUS], + ['-', PREC.PLUS], + ['*', PREC.MULTI], + ['/', PREC.MULTI], + ['//', PREC.MULTI], + ['%', PREC.MULTI], + ].map(([operator, precedence]) => + prec.left( + precedence, + seq( + field('left', $.expression), + operator, + field('right', $.expression) + ) + ) + ), + ...[ + ['..', PREC.CONCAT], + ['^', PREC.POWER], + ].map(([operator, precedence]) => + prec.right( + precedence, + seq( + field('left', $.expression), + operator, + field('right', $.expression) + ) + ) + ) + ), + + // unop exp + unary_expression: ($) => + prec.left( + PREC.UNARY, + seq(choice('not', '#', '-', '~'), field('operand', $.expression)) + ), + + // Name + identifier: (_) => /[a-zA-Z_][a-zA-Z0-9_]*/, + + // comment + comment: ($) => + choice( + seq( + field('start', alias('--', 'comment_start')), + field('content', alias(/[^\r\n]*/, 'comment_content')) + ), + seq( + field('start', alias($._block_comment_start, 'comment_start')), + field( + 'content', + optional(alias($._block_comment_content, 'comment_content')) + ), + field('end', alias($._block_comment_end, 'comment_end')) + ) + ), + }, +}); diff --git a/tree-sitter-lua/package.json b/tree-sitter-lua/package.json new file mode 100644 index 0000000..377d8eb --- /dev/null +++ b/tree-sitter-lua/package.json @@ -0,0 +1,46 @@ +{ + "name": "@muniftanjim/tree-sitter-lua", + "version": "0.0.12", + "description": "Lua grammar for tree-sitter", + "keywords": [ + "tree-sitter", + "parser", + "lua" + ], + "homepage": "https://github.com/MunifTanjim/tree-sitter-lua#readme", + "bugs": "https://github.com/MunifTanjim/tree-sitter-lua/issues", + "license": "MIT", + "author": "Munif Tanjim (https://muniftanjim.dev)", + "files": [ + "bindings", + "queries", + "src", + "binding.gyp", + "grammar.js" + ], + "main": "bindings/node", + "repository": "https://github.com/MunifTanjim/tree-sitter-lua", + "scripts": { + "build": "tree-sitter generate", + "postbuild": "node-gyp build", + "test": "tree-sitter test", + "posttest": "./script/parse-examples lua" + }, + "dependencies": { + "nan": "^2.14.2" + }, + "devDependencies": { + "tree-sitter-cli": "^0.20.0" + }, + "publishConfig": { + "access": "public" + }, + "tree-sitter": [ + { + "scope": "source.lua", + "file-types": [ + "lua" + ] + } + ] +} diff --git a/tree-sitter-lua/script/known_failures.txt b/tree-sitter-lua/script/known_failures.txt new file mode 100644 index 0000000..e69de29 diff --git a/tree-sitter-lua/script/parse-examples b/tree-sitter-lua/script/parse-examples new file mode 100755 index 0000000..1cf6e45 --- /dev/null +++ b/tree-sitter-lua/script/parse-examples @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +set -euo pipefail + +cd "$(dirname "${0}")/.." + +checkout_repo() { + local -r path="${1}" + local -r repo="${2}" + local -r sha="${3}" + + echo "Checking out github.com/${repo}#${sha} in ${path}" + + mkdir -p "${path}" + pushd "${path}" >/dev/null + + if [[ ! -d ".git" ]]; then + git init --quiet + git remote add origin "https://github.com/${repo}.git" + git fetch --quiet --depth 1 origin "${sha}" + elif [[ "${sha}" != "$(git rev-parse HEAD)" ]]; then + git fetch --quiet --depth 1 origin "${sha}" + fi + + git checkout --quiet FETCH_HEAD + + popd >/dev/null + + echo +} + +checkout_repo "./examples/luvit" "luvit/luvit" "9841bc17aaab32fa63e11063cf68f82da615eefd" + +parse_examples() { + local -r known_failures="$(cat script/known_failures.txt)" + + tree-sitter parse --quiet \ + "./examples/luvit/**/*.lua" \ + $(for file in ${known_failures}; do echo "!${file}"; done) + + declare -r example_count=$(find ./examples -name "*.lua" | wc -l) + declare -r failure_count=$(wc -w <<< "${known_failures}") + declare -r success_count=$(( ${example_count} - ${failure_count} )) + declare -r success_percent=$(bc -l <<< "100*${success_count}/${example_count}") + + printf \ + "[Lua] Successfully parsed %d of %d example files (%.1f%%)\n" \ + ${success_count} ${example_count} ${success_percent} +} + +parse_examples diff --git a/tree-sitter-lua/script/release.sh b/tree-sitter-lua/script/release.sh new file mode 100755 index 0000000..5c3d243 --- /dev/null +++ b/tree-sitter-lua/script/release.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +set -eu + +echo "Running Build..." +npm run build +echo + +echo "Running Tests..." +npm run test +echo + +echo "Bumping Version..." +declare -r curr_version=$(npx -c 'echo $npm_package_version') +npm version --allow-same-version --no-git-tag-version $@ +declare -r next_version=$(npx -c 'echo $npm_package_version') +echo + +if [[ "${curr_version}" = "${next_version}" ]]; then + echo "Version did not change!" + exit 1 +fi + +git add package.json + +echo "crate: tree-sitter-lua" +echo "v${next_version}" +cargo bump "${next_version}" +git add "Cargo.toml" +echo + +git commit -m "chore: release v${next_version}" +git tag "v${next_version}" -m "v${next_version}" diff --git a/tree-sitter-lua/src/grammar.json b/tree-sitter-lua/src/grammar.json new file mode 100644 index 0000000..45aec2e --- /dev/null +++ b/tree-sitter-lua/src/grammar.json @@ -0,0 +1,2834 @@ +{ + "name": "lua", + "word": "identifier", + "rules": { + "chunk": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "hash_bang_line" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "statement" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "return_statement" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "hash_bang_line": { + "type": "PATTERN", + "value": "#!.*" + }, + "_block": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "statement" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "return_statement" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "statement" + } + }, + { + "type": "SYMBOL", + "name": "return_statement" + } + ] + } + ] + }, + "statement": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "empty_statement" + }, + { + "type": "SYMBOL", + "name": "assignment_statement" + }, + { + "type": "SYMBOL", + "name": "function_call" + }, + { + "type": "SYMBOL", + "name": "label_statement" + }, + { + "type": "SYMBOL", + "name": "break_statement" + }, + { + "type": "SYMBOL", + "name": "goto_statement" + }, + { + "type": "SYMBOL", + "name": "do_statement" + }, + { + "type": "SYMBOL", + "name": "while_statement" + }, + { + "type": "SYMBOL", + "name": "repeat_statement" + }, + { + "type": "SYMBOL", + "name": "if_statement" + }, + { + "type": "SYMBOL", + "name": "for_statement" + }, + { + "type": "SYMBOL", + "name": "declaration" + } + ] + }, + "return_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "return" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_expression_list" + }, + "named": true, + "value": "expression_list" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "empty_statement": { + "type": "STRING", + "value": ";" + }, + "assignment_statement": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_variable_assignment_varlist" + }, + "named": true, + "value": "variable_list" + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_variable_assignment_explist" + }, + "named": true, + "value": "expression_list" + } + ] + }, + "_variable_assignment_varlist": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "variable" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "variable" + } + } + ] + } + } + ] + }, + "_variable_assignment_explist": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + } + ] + }, + "label_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "::" + }, + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": "::" + } + ] + }, + "break_statement": { + "type": "STRING", + "value": "break" + }, + "goto_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "goto" + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + }, + "do_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "do" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_block" + }, + { + "type": "BLANK" + } + ] + }, + "named": true, + "value": "block" + } + }, + { + "type": "STRING", + "value": "end" + } + ] + }, + "while_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "while" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "do" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_block" + }, + { + "type": "BLANK" + } + ] + }, + "named": true, + "value": "block" + } + }, + { + "type": "STRING", + "value": "end" + } + ] + }, + "repeat_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "repeat" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_block" + }, + { + "type": "BLANK" + } + ] + }, + "named": true, + "value": "block" + } + }, + { + "type": "STRING", + "value": "until" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "if_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "if" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "then" + }, + { + "type": "FIELD", + "name": "consequence", + "content": { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_block" + }, + { + "type": "BLANK" + } + ] + }, + "named": true, + "value": "block" + } + }, + { + "type": "REPEAT", + "content": { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "SYMBOL", + "name": "elseif_statement" + } + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "SYMBOL", + "name": "else_statement" + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "end" + } + ] + }, + "elseif_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "elseif" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "then" + }, + { + "type": "FIELD", + "name": "consequence", + "content": { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_block" + }, + { + "type": "BLANK" + } + ] + }, + "named": true, + "value": "block" + } + } + ] + }, + "else_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "else" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_block" + }, + { + "type": "BLANK" + } + ] + }, + "named": true, + "value": "block" + } + } + ] + }, + "for_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "for" + }, + { + "type": "FIELD", + "name": "clause", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "for_generic_clause" + }, + { + "type": "SYMBOL", + "name": "for_numeric_clause" + } + ] + } + }, + { + "type": "STRING", + "value": "do" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_block" + }, + { + "type": "BLANK" + } + ] + }, + "named": true, + "value": "block" + } + }, + { + "type": "STRING", + "value": "end" + } + ] + }, + "for_generic_clause": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_name_list" + }, + "named": true, + "value": "variable_list" + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_expression_list" + }, + "named": true, + "value": "expression_list" + } + ] + }, + "for_numeric_clause": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "start", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "end", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "step", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "declaration": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "function_declaration" + }, + { + "type": "FIELD", + "name": "local_declaration", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_local_function_declaration" + }, + "named": true, + "value": "function_declaration" + } + }, + { + "type": "FIELD", + "name": "local_declaration", + "content": { + "type": "SYMBOL", + "name": "variable_declaration" + } + } + ] + }, + "function_declaration": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "function" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_function_name" + } + }, + { + "type": "SYMBOL", + "name": "_function_body" + } + ] + }, + "_local_function_declaration": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "local" + }, + { + "type": "STRING", + "value": "function" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "SYMBOL", + "name": "_function_body" + } + ] + }, + "_function_name": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_function_name_prefix_expression" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_function_name_method_index_expression" + }, + "named": true, + "value": "method_index_expression" + } + ] + }, + "_function_name_prefix_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_function_name_dot_index_expression" + }, + "named": true, + "value": "dot_index_expression" + } + ] + }, + "_function_name_dot_index_expression": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "table", + "content": { + "type": "SYMBOL", + "name": "_function_name_prefix_expression" + } + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "FIELD", + "name": "field", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + }, + "_function_name_method_index_expression": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "table", + "content": { + "type": "SYMBOL", + "name": "_function_name_prefix_expression" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "method", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + }, + "variable_declaration": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "local" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_name_list" + }, + "named": true, + "value": "variable_list" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_local_variable_assignment" + }, + "named": true, + "value": "assignment_statement" + } + ] + } + ] + }, + "_local_variable_assignment": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_name_list" + }, + "named": true, + "value": "variable_list" + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_variable_assignment_explist" + }, + "named": true, + "value": "expression_list" + } + ] + }, + "_name_list": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + } + } + ] + }, + "_expression_list": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + } + } + ] + }, + "expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "nil" + }, + { + "type": "SYMBOL", + "name": "false" + }, + { + "type": "SYMBOL", + "name": "true" + }, + { + "type": "SYMBOL", + "name": "number" + }, + { + "type": "SYMBOL", + "name": "string" + }, + { + "type": "SYMBOL", + "name": "vararg_expression" + }, + { + "type": "SYMBOL", + "name": "function_definition" + }, + { + "type": "SYMBOL", + "name": "variable" + }, + { + "type": "SYMBOL", + "name": "function_call" + }, + { + "type": "SYMBOL", + "name": "parenthesized_expression" + }, + { + "type": "SYMBOL", + "name": "table_constructor" + }, + { + "type": "SYMBOL", + "name": "binary_expression" + }, + { + "type": "SYMBOL", + "name": "unary_expression" + } + ] + }, + "nil": { + "type": "STRING", + "value": "nil" + }, + "false": { + "type": "STRING", + "value": "false" + }, + "true": { + "type": "STRING", + "value": "true" + }, + "number": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0" + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "PATTERN", + "value": "[1-9]" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[0-9]+" + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[0-9]+" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "e" + }, + { + "type": "STRING", + "value": "E" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "STRING", + "value": "+" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "PATTERN", + "value": "[0-9]+" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "PATTERN", + "value": "[0-9]+" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "e" + }, + { + "type": "STRING", + "value": "E" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "STRING", + "value": "+" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "PATTERN", + "value": "[0-9]+" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0" + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "PATTERN", + "value": "[1-9]" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[0-9]+" + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "e" + }, + { + "type": "STRING", + "value": "E" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "STRING", + "value": "+" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "PATTERN", + "value": "[0-9]+" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0x" + }, + { + "type": "STRING", + "value": "0X" + } + ] + }, + { + "type": "PATTERN", + "value": "[a-fA-F0-9]+" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "PATTERN", + "value": "[a-fA-F0-9]+" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "p" + }, + { + "type": "STRING", + "value": "P" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "STRING", + "value": "+" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "PATTERN", + "value": "[0-9]+" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + } + }, + "string": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "start", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_string_start" + }, + "named": false, + "value": "string_start" + } + }, + { + "type": "FIELD", + "name": "content", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_string_content" + }, + "named": false, + "value": "string_content" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "FIELD", + "name": "end", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_string_end" + }, + "named": false, + "value": "string_end" + } + } + ] + }, + "vararg_expression": { + "type": "STRING", + "value": "..." + }, + "function_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "function" + }, + { + "type": "SYMBOL", + "name": "_function_body" + } + ] + }, + "_function_body": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "SYMBOL", + "name": "parameters" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_block" + }, + { + "type": "BLANK" + } + ] + }, + "named": true, + "value": "block" + } + }, + { + "type": "STRING", + "value": "end" + } + ] + }, + "parameters": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_parameter_list" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "_parameter_list": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "vararg_expression" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SYMBOL", + "name": "vararg_expression" + } + ] + }, + "_prefix_expression": { + "type": "PREC", + "value": 1, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "variable" + }, + { + "type": "SYMBOL", + "name": "function_call" + }, + { + "type": "SYMBOL", + "name": "parenthesized_expression" + } + ] + } + }, + "variable": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "bracket_index_expression" + }, + { + "type": "SYMBOL", + "name": "dot_index_expression" + } + ] + }, + "bracket_index_expression": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "table", + "content": { + "type": "SYMBOL", + "name": "_prefix_expression" + } + }, + { + "type": "STRING", + "value": "[" + }, + { + "type": "FIELD", + "name": "field", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "dot_index_expression": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "table", + "content": { + "type": "SYMBOL", + "name": "_prefix_expression" + } + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "FIELD", + "name": "field", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + }, + "function_call": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_prefix_expression" + }, + { + "type": "SYMBOL", + "name": "method_index_expression" + } + ] + } + }, + { + "type": "FIELD", + "name": "arguments", + "content": { + "type": "SYMBOL", + "name": "arguments" + } + } + ] + }, + "method_index_expression": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "table", + "content": { + "type": "SYMBOL", + "name": "_prefix_expression" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "method", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + }, + "arguments": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SYMBOL", + "name": "table_constructor" + }, + { + "type": "SYMBOL", + "name": "string" + } + ] + }, + "parenthesized_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "table_constructor": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_field_list" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "_field_list": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "field" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_field_sep" + }, + { + "type": "SYMBOL", + "name": "field" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_field_sep" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "_field_sep": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "field": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "]" + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "binary_expression": { + "type": "CHOICE", + "members": [ + { + "type": "PREC_LEFT", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "or" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "and" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "<" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "<=" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "==" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "~=" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": ">=" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": ">" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 4, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "|" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 5, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "~" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "&" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 7, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "<<" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 7, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": ">>" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 9, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "+" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 9, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "-" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "*" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "/" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "//" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "%" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_RIGHT", + "value": 8, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": ".." + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_RIGHT", + "value": 12, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "^" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + } + ] + }, + "unary_expression": { + "type": "PREC_LEFT", + "value": 11, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "not" + }, + { + "type": "STRING", + "value": "#" + }, + { + "type": "STRING", + "value": "-" + }, + { + "type": "STRING", + "value": "~" + } + ] + }, + { + "type": "FIELD", + "name": "operand", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + "identifier": { + "type": "PATTERN", + "value": "[a-zA-Z_][a-zA-Z0-9_]*" + }, + "comment": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "start", + "content": { + "type": "ALIAS", + "content": { + "type": "STRING", + "value": "--" + }, + "named": false, + "value": "comment_start" + } + }, + { + "type": "FIELD", + "name": "content", + "content": { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "[^\\r\\n]*" + }, + "named": false, + "value": "comment_content" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "start", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_block_comment_start" + }, + "named": false, + "value": "comment_start" + } + }, + { + "type": "FIELD", + "name": "content", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_block_comment_content" + }, + "named": false, + "value": "comment_content" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "FIELD", + "name": "end", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_block_comment_end" + }, + "named": false, + "value": "comment_end" + } + } + ] + } + ] + } + }, + "extras": [ + { + "type": "SYMBOL", + "name": "comment" + }, + { + "type": "PATTERN", + "value": "\\s" + } + ], + "conflicts": [], + "precedences": [], + "externals": [ + { + "type": "SYMBOL", + "name": "_block_comment_start" + }, + { + "type": "SYMBOL", + "name": "_block_comment_content" + }, + { + "type": "SYMBOL", + "name": "_block_comment_end" + }, + { + "type": "SYMBOL", + "name": "_string_start" + }, + { + "type": "SYMBOL", + "name": "_string_content" + }, + { + "type": "SYMBOL", + "name": "_string_end" + } + ], + "inline": [], + "supertypes": [ + "statement", + "expression", + "declaration", + "variable" + ] +} + diff --git a/tree-sitter-lua/src/node-types.json b/tree-sitter-lua/src/node-types.json new file mode 100644 index 0000000..4289f71 --- /dev/null +++ b/tree-sitter-lua/src/node-types.json @@ -0,0 +1,1244 @@ +[ + { + "type": "declaration", + "named": true, + "subtypes": [ + { + "type": "function_declaration", + "named": true + }, + { + "type": "variable_declaration", + "named": true + } + ] + }, + { + "type": "expression", + "named": true, + "subtypes": [ + { + "type": "binary_expression", + "named": true + }, + { + "type": "false", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "function_definition", + "named": true + }, + { + "type": "nil", + "named": true + }, + { + "type": "number", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "string", + "named": true + }, + { + "type": "table_constructor", + "named": true + }, + { + "type": "true", + "named": true + }, + { + "type": "unary_expression", + "named": true + }, + { + "type": "vararg_expression", + "named": true + }, + { + "type": "variable", + "named": true + } + ] + }, + { + "type": "statement", + "named": true, + "subtypes": [ + { + "type": "assignment_statement", + "named": true + }, + { + "type": "break_statement", + "named": true + }, + { + "type": "declaration", + "named": true + }, + { + "type": "do_statement", + "named": true + }, + { + "type": "empty_statement", + "named": true + }, + { + "type": "for_statement", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "goto_statement", + "named": true + }, + { + "type": "if_statement", + "named": true + }, + { + "type": "label_statement", + "named": true + }, + { + "type": "repeat_statement", + "named": true + }, + { + "type": "while_statement", + "named": true + } + ] + }, + { + "type": "variable", + "named": true, + "subtypes": [ + { + "type": "bracket_index_expression", + "named": true + }, + { + "type": "dot_index_expression", + "named": true + }, + { + "type": "identifier", + "named": true + } + ] + }, + { + "type": "arguments", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "assignment_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "expression_list", + "named": true + }, + { + "type": "variable_list", + "named": true + } + ] + } + }, + { + "type": "binary_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "block", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "return_statement", + "named": true + }, + { + "type": "statement", + "named": true + } + ] + } + }, + { + "type": "bracket_index_expression", + "named": true, + "fields": { + "field": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "table": { + "multiple": false, + "required": true, + "types": [ + { + "type": "function_call", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "variable", + "named": true + } + ] + } + } + }, + { + "type": "chunk", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "hash_bang_line", + "named": true + }, + { + "type": "return_statement", + "named": true + }, + { + "type": "statement", + "named": true + } + ] + } + }, + { + "type": "comment", + "named": true, + "fields": { + "content": { + "multiple": false, + "required": false, + "types": [ + { + "type": "comment_content", + "named": false + } + ] + }, + "end": { + "multiple": false, + "required": false, + "types": [ + { + "type": "comment_end", + "named": false + } + ] + }, + "start": { + "multiple": false, + "required": true, + "types": [ + { + "type": "comment_start", + "named": false + } + ] + } + } + }, + { + "type": "do_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "block", + "named": true + } + ] + } + } + }, + { + "type": "dot_index_expression", + "named": true, + "fields": { + "field": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "table": { + "multiple": false, + "required": true, + "types": [ + { + "type": "function_call", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "variable", + "named": true + } + ] + } + } + }, + { + "type": "else_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "block", + "named": true + } + ] + } + } + }, + { + "type": "elseif_statement", + "named": true, + "fields": { + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "consequence": { + "multiple": false, + "required": false, + "types": [ + { + "type": "block", + "named": true + } + ] + } + } + }, + { + "type": "empty_statement", + "named": true, + "fields": {} + }, + { + "type": "expression_list", + "named": true, + "fields": { + "value": { + "multiple": true, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "field", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "identifier", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "for_generic_clause", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "expression_list", + "named": true + }, + { + "type": "variable_list", + "named": true + } + ] + } + }, + { + "type": "for_numeric_clause", + "named": true, + "fields": { + "end": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "start": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "step": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "for_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "block", + "named": true + } + ] + }, + "clause": { + "multiple": false, + "required": true, + "types": [ + { + "type": "for_generic_clause", + "named": true + }, + { + "type": "for_numeric_clause", + "named": true + } + ] + } + } + }, + { + "type": "function_call", + "named": true, + "fields": { + "arguments": { + "multiple": false, + "required": true, + "types": [ + { + "type": "arguments", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "function_call", + "named": true + }, + { + "type": "method_index_expression", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "variable", + "named": true + } + ] + } + } + }, + { + "type": "function_declaration", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "block", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "dot_index_expression", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "method_index_expression", + "named": true + } + ] + }, + "parameters": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parameters", + "named": true + } + ] + } + } + }, + { + "type": "function_definition", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "block", + "named": true + } + ] + }, + "parameters": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parameters", + "named": true + } + ] + } + } + }, + { + "type": "goto_statement", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "if_statement", + "named": true, + "fields": { + "alternative": { + "multiple": true, + "required": false, + "types": [ + { + "type": "else_statement", + "named": true + }, + { + "type": "elseif_statement", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "consequence": { + "multiple": false, + "required": false, + "types": [ + { + "type": "block", + "named": true + } + ] + } + } + }, + { + "type": "label_statement", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "method_index_expression", + "named": true, + "fields": { + "method": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "table": { + "multiple": false, + "required": true, + "types": [ + { + "type": "function_call", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "variable", + "named": true + } + ] + } + } + }, + { + "type": "parameters", + "named": true, + "fields": { + "name": { + "multiple": true, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "vararg_expression", + "named": true + } + ] + } + }, + { + "type": "parenthesized_expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "repeat_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "block", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "return_statement", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression_list", + "named": true + } + ] + } + }, + { + "type": "string", + "named": true, + "fields": { + "content": { + "multiple": false, + "required": false, + "types": [ + { + "type": "string_content", + "named": false + } + ] + }, + "end": { + "multiple": false, + "required": true, + "types": [ + { + "type": "string_end", + "named": false + } + ] + }, + "start": { + "multiple": false, + "required": true, + "types": [ + { + "type": "string_start", + "named": false + } + ] + } + } + }, + { + "type": "table_constructor", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "field", + "named": true + } + ] + } + }, + { + "type": "unary_expression", + "named": true, + "fields": { + "operand": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "variable_declaration", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "assignment_statement", + "named": true + }, + { + "type": "variable_list", + "named": true + } + ] + } + }, + { + "type": "variable_list", + "named": true, + "fields": { + "name": { + "multiple": true, + "required": true, + "types": [ + { + "type": "variable", + "named": true + } + ] + } + } + }, + { + "type": "while_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "block", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "#", + "named": false + }, + { + "type": "%", + "named": false + }, + { + "type": "&", + "named": false + }, + { + "type": "(", + "named": false + }, + { + "type": ")", + "named": false + }, + { + "type": "*", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": ",", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": ".", + "named": false + }, + { + "type": "..", + "named": false + }, + { + "type": "/", + "named": false + }, + { + "type": "//", + "named": false + }, + { + "type": ":", + "named": false + }, + { + "type": "::", + "named": false + }, + { + "type": ";", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<<", + "named": false + }, + { + "type": "<=", + "named": false + }, + { + "type": "=", + "named": false + }, + { + "type": "==", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">=", + "named": false + }, + { + "type": ">>", + "named": false + }, + { + "type": "[", + "named": false + }, + { + "type": "]", + "named": false + }, + { + "type": "^", + "named": false + }, + { + "type": "and", + "named": false + }, + { + "type": "break_statement", + "named": true + }, + { + "type": "comment_content", + "named": false + }, + { + "type": "comment_end", + "named": false + }, + { + "type": "comment_start", + "named": false + }, + { + "type": "do", + "named": false + }, + { + "type": "else", + "named": false + }, + { + "type": "elseif", + "named": false + }, + { + "type": "end", + "named": false + }, + { + "type": "false", + "named": true + }, + { + "type": "for", + "named": false + }, + { + "type": "function", + "named": false + }, + { + "type": "goto", + "named": false + }, + { + "type": "hash_bang_line", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "if", + "named": false + }, + { + "type": "in", + "named": false + }, + { + "type": "local", + "named": false + }, + { + "type": "nil", + "named": true + }, + { + "type": "not", + "named": false + }, + { + "type": "number", + "named": true + }, + { + "type": "or", + "named": false + }, + { + "type": "repeat", + "named": false + }, + { + "type": "return", + "named": false + }, + { + "type": "string_content", + "named": false + }, + { + "type": "string_end", + "named": false + }, + { + "type": "string_start", + "named": false + }, + { + "type": "then", + "named": false + }, + { + "type": "true", + "named": true + }, + { + "type": "until", + "named": false + }, + { + "type": "vararg_expression", + "named": true + }, + { + "type": "while", + "named": false + }, + { + "type": "{", + "named": false + }, + { + "type": "|", + "named": false + }, + { + "type": "}", + "named": false + }, + { + "type": "~", + "named": false + }, + { + "type": "~=", + "named": false + } +] \ No newline at end of file diff --git a/tree-sitter-lua/src/parser.c b/tree-sitter-lua/src/parser.c new file mode 100644 index 0000000..5b8c25c --- /dev/null +++ b/tree-sitter-lua/src/parser.c @@ -0,0 +1,10837 @@ +#include + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#endif + +#define LANGUAGE_VERSION 13 +#define STATE_COUNT 234 +#define LARGE_STATE_COUNT 2 +#define SYMBOL_COUNT 125 +#define ALIAS_COUNT 0 +#define TOKEN_COUNT 67 +#define EXTERNAL_TOKEN_COUNT 6 +#define FIELD_COUNT 20 +#define MAX_ALIAS_SEQUENCE_LENGTH 7 +#define PRODUCTION_ID_COUNT 50 + +enum { + sym_identifier = 1, + sym_hash_bang_line = 2, + anon_sym_return = 3, + anon_sym_SEMI = 4, + anon_sym_EQ = 5, + anon_sym_COMMA = 6, + anon_sym_COLON_COLON = 7, + sym_break_statement = 8, + anon_sym_goto = 9, + anon_sym_do = 10, + anon_sym_end = 11, + anon_sym_while = 12, + anon_sym_repeat = 13, + anon_sym_until = 14, + anon_sym_if = 15, + anon_sym_then = 16, + anon_sym_elseif = 17, + anon_sym_else = 18, + anon_sym_for = 19, + anon_sym_in = 20, + anon_sym_function = 21, + anon_sym_local = 22, + anon_sym_DOT = 23, + anon_sym_COLON = 24, + sym_nil = 25, + sym_false = 26, + sym_true = 27, + sym_number = 28, + sym_vararg_expression = 29, + anon_sym_LPAREN = 30, + anon_sym_RPAREN = 31, + anon_sym_LBRACK = 32, + anon_sym_RBRACK = 33, + anon_sym_LBRACE = 34, + anon_sym_RBRACE = 35, + anon_sym_or = 36, + anon_sym_and = 37, + anon_sym_LT = 38, + anon_sym_LT_EQ = 39, + anon_sym_EQ_EQ = 40, + anon_sym_TILDE_EQ = 41, + anon_sym_GT_EQ = 42, + anon_sym_GT = 43, + anon_sym_PIPE = 44, + anon_sym_TILDE = 45, + anon_sym_AMP = 46, + anon_sym_LT_LT = 47, + anon_sym_GT_GT = 48, + anon_sym_PLUS = 49, + anon_sym_DASH = 50, + anon_sym_STAR = 51, + anon_sym_SLASH = 52, + anon_sym_SLASH_SLASH = 53, + anon_sym_PERCENT = 54, + anon_sym_DOT_DOT = 55, + anon_sym_CARET = 56, + anon_sym_not = 57, + anon_sym_POUND = 58, + anon_sym_DASH_DASH = 59, + aux_sym_comment_token1 = 60, + sym__block_comment_start = 61, + sym__block_comment_content = 62, + sym__block_comment_end = 63, + sym__string_start = 64, + sym__string_content = 65, + sym__string_end = 66, + sym_chunk = 67, + sym__block = 68, + sym_statement = 69, + sym_return_statement = 70, + sym_empty_statement = 71, + sym_assignment_statement = 72, + sym__variable_assignment_varlist = 73, + sym__variable_assignment_explist = 74, + sym_label_statement = 75, + sym_goto_statement = 76, + sym_do_statement = 77, + sym_while_statement = 78, + sym_repeat_statement = 79, + sym_if_statement = 80, + sym_elseif_statement = 81, + sym_else_statement = 82, + sym_for_statement = 83, + sym_for_generic_clause = 84, + sym_for_numeric_clause = 85, + sym_declaration = 86, + sym_function_declaration = 87, + sym__local_function_declaration = 88, + sym__function_name = 89, + sym__function_name_prefix_expression = 90, + sym__function_name_dot_index_expression = 91, + sym__function_name_method_index_expression = 92, + sym_variable_declaration = 93, + sym__local_variable_assignment = 94, + sym__name_list = 95, + sym__expression_list = 96, + sym_expression = 97, + sym_string = 98, + sym_function_definition = 99, + sym__function_body = 100, + sym_parameters = 101, + sym__parameter_list = 102, + sym__prefix_expression = 103, + sym_variable = 104, + sym_bracket_index_expression = 105, + sym_dot_index_expression = 106, + sym_function_call = 107, + sym_method_index_expression = 108, + sym_arguments = 109, + sym_parenthesized_expression = 110, + sym_table_constructor = 111, + sym__field_list = 112, + sym__field_sep = 113, + sym_field = 114, + sym_binary_expression = 115, + sym_unary_expression = 116, + sym_comment = 117, + aux_sym_chunk_repeat1 = 118, + aux_sym__variable_assignment_varlist_repeat1 = 119, + aux_sym__variable_assignment_explist_repeat1 = 120, + aux_sym_if_statement_repeat1 = 121, + aux_sym__name_list_repeat1 = 122, + aux_sym__expression_list_repeat1 = 123, + aux_sym__field_list_repeat1 = 124, +}; + +static const char * const ts_symbol_names[] = { + [ts_builtin_sym_end] = "end", + [sym_identifier] = "identifier", + [sym_hash_bang_line] = "hash_bang_line", + [anon_sym_return] = "return", + [anon_sym_SEMI] = ";", + [anon_sym_EQ] = "=", + [anon_sym_COMMA] = ",", + [anon_sym_COLON_COLON] = "::", + [sym_break_statement] = "break_statement", + [anon_sym_goto] = "goto", + [anon_sym_do] = "do", + [anon_sym_end] = "end", + [anon_sym_while] = "while", + [anon_sym_repeat] = "repeat", + [anon_sym_until] = "until", + [anon_sym_if] = "if", + [anon_sym_then] = "then", + [anon_sym_elseif] = "elseif", + [anon_sym_else] = "else", + [anon_sym_for] = "for", + [anon_sym_in] = "in", + [anon_sym_function] = "function", + [anon_sym_local] = "local", + [anon_sym_DOT] = ".", + [anon_sym_COLON] = ":", + [sym_nil] = "nil", + [sym_false] = "false", + [sym_true] = "true", + [sym_number] = "number", + [sym_vararg_expression] = "vararg_expression", + [anon_sym_LPAREN] = "(", + [anon_sym_RPAREN] = ")", + [anon_sym_LBRACK] = "[", + [anon_sym_RBRACK] = "]", + [anon_sym_LBRACE] = "{", + [anon_sym_RBRACE] = "}", + [anon_sym_or] = "or", + [anon_sym_and] = "and", + [anon_sym_LT] = "<", + [anon_sym_LT_EQ] = "<=", + [anon_sym_EQ_EQ] = "==", + [anon_sym_TILDE_EQ] = "~=", + [anon_sym_GT_EQ] = ">=", + [anon_sym_GT] = ">", + [anon_sym_PIPE] = "|", + [anon_sym_TILDE] = "~", + [anon_sym_AMP] = "&", + [anon_sym_LT_LT] = "<<", + [anon_sym_GT_GT] = ">>", + [anon_sym_PLUS] = "+", + [anon_sym_DASH] = "-", + [anon_sym_STAR] = "*", + [anon_sym_SLASH] = "/", + [anon_sym_SLASH_SLASH] = "//", + [anon_sym_PERCENT] = "%", + [anon_sym_DOT_DOT] = "..", + [anon_sym_CARET] = "^", + [anon_sym_not] = "not", + [anon_sym_POUND] = "#", + [anon_sym_DASH_DASH] = "comment_start", + [aux_sym_comment_token1] = "comment_content", + [sym__block_comment_start] = "comment_start", + [sym__block_comment_content] = "comment_content", + [sym__block_comment_end] = "comment_end", + [sym__string_start] = "string_start", + [sym__string_content] = "string_content", + [sym__string_end] = "string_end", + [sym_chunk] = "chunk", + [sym__block] = "block", + [sym_statement] = "statement", + [sym_return_statement] = "return_statement", + [sym_empty_statement] = "empty_statement", + [sym_assignment_statement] = "assignment_statement", + [sym__variable_assignment_varlist] = "variable_list", + [sym__variable_assignment_explist] = "expression_list", + [sym_label_statement] = "label_statement", + [sym_goto_statement] = "goto_statement", + [sym_do_statement] = "do_statement", + [sym_while_statement] = "while_statement", + [sym_repeat_statement] = "repeat_statement", + [sym_if_statement] = "if_statement", + [sym_elseif_statement] = "elseif_statement", + [sym_else_statement] = "else_statement", + [sym_for_statement] = "for_statement", + [sym_for_generic_clause] = "for_generic_clause", + [sym_for_numeric_clause] = "for_numeric_clause", + [sym_declaration] = "declaration", + [sym_function_declaration] = "function_declaration", + [sym__local_function_declaration] = "function_declaration", + [sym__function_name] = "_function_name", + [sym__function_name_prefix_expression] = "_function_name_prefix_expression", + [sym__function_name_dot_index_expression] = "dot_index_expression", + [sym__function_name_method_index_expression] = "method_index_expression", + [sym_variable_declaration] = "variable_declaration", + [sym__local_variable_assignment] = "assignment_statement", + [sym__name_list] = "variable_list", + [sym__expression_list] = "expression_list", + [sym_expression] = "expression", + [sym_string] = "string", + [sym_function_definition] = "function_definition", + [sym__function_body] = "_function_body", + [sym_parameters] = "parameters", + [sym__parameter_list] = "_parameter_list", + [sym__prefix_expression] = "_prefix_expression", + [sym_variable] = "variable", + [sym_bracket_index_expression] = "bracket_index_expression", + [sym_dot_index_expression] = "dot_index_expression", + [sym_function_call] = "function_call", + [sym_method_index_expression] = "method_index_expression", + [sym_arguments] = "arguments", + [sym_parenthesized_expression] = "parenthesized_expression", + [sym_table_constructor] = "table_constructor", + [sym__field_list] = "_field_list", + [sym__field_sep] = "_field_sep", + [sym_field] = "field", + [sym_binary_expression] = "binary_expression", + [sym_unary_expression] = "unary_expression", + [sym_comment] = "comment", + [aux_sym_chunk_repeat1] = "chunk_repeat1", + [aux_sym__variable_assignment_varlist_repeat1] = "_variable_assignment_varlist_repeat1", + [aux_sym__variable_assignment_explist_repeat1] = "_variable_assignment_explist_repeat1", + [aux_sym_if_statement_repeat1] = "if_statement_repeat1", + [aux_sym__name_list_repeat1] = "_name_list_repeat1", + [aux_sym__expression_list_repeat1] = "_expression_list_repeat1", + [aux_sym__field_list_repeat1] = "_field_list_repeat1", +}; + +static const TSSymbol ts_symbol_map[] = { + [ts_builtin_sym_end] = ts_builtin_sym_end, + [sym_identifier] = sym_identifier, + [sym_hash_bang_line] = sym_hash_bang_line, + [anon_sym_return] = anon_sym_return, + [anon_sym_SEMI] = anon_sym_SEMI, + [anon_sym_EQ] = anon_sym_EQ, + [anon_sym_COMMA] = anon_sym_COMMA, + [anon_sym_COLON_COLON] = anon_sym_COLON_COLON, + [sym_break_statement] = sym_break_statement, + [anon_sym_goto] = anon_sym_goto, + [anon_sym_do] = anon_sym_do, + [anon_sym_end] = anon_sym_end, + [anon_sym_while] = anon_sym_while, + [anon_sym_repeat] = anon_sym_repeat, + [anon_sym_until] = anon_sym_until, + [anon_sym_if] = anon_sym_if, + [anon_sym_then] = anon_sym_then, + [anon_sym_elseif] = anon_sym_elseif, + [anon_sym_else] = anon_sym_else, + [anon_sym_for] = anon_sym_for, + [anon_sym_in] = anon_sym_in, + [anon_sym_function] = anon_sym_function, + [anon_sym_local] = anon_sym_local, + [anon_sym_DOT] = anon_sym_DOT, + [anon_sym_COLON] = anon_sym_COLON, + [sym_nil] = sym_nil, + [sym_false] = sym_false, + [sym_true] = sym_true, + [sym_number] = sym_number, + [sym_vararg_expression] = sym_vararg_expression, + [anon_sym_LPAREN] = anon_sym_LPAREN, + [anon_sym_RPAREN] = anon_sym_RPAREN, + [anon_sym_LBRACK] = anon_sym_LBRACK, + [anon_sym_RBRACK] = anon_sym_RBRACK, + [anon_sym_LBRACE] = anon_sym_LBRACE, + [anon_sym_RBRACE] = anon_sym_RBRACE, + [anon_sym_or] = anon_sym_or, + [anon_sym_and] = anon_sym_and, + [anon_sym_LT] = anon_sym_LT, + [anon_sym_LT_EQ] = anon_sym_LT_EQ, + [anon_sym_EQ_EQ] = anon_sym_EQ_EQ, + [anon_sym_TILDE_EQ] = anon_sym_TILDE_EQ, + [anon_sym_GT_EQ] = anon_sym_GT_EQ, + [anon_sym_GT] = anon_sym_GT, + [anon_sym_PIPE] = anon_sym_PIPE, + [anon_sym_TILDE] = anon_sym_TILDE, + [anon_sym_AMP] = anon_sym_AMP, + [anon_sym_LT_LT] = anon_sym_LT_LT, + [anon_sym_GT_GT] = anon_sym_GT_GT, + [anon_sym_PLUS] = anon_sym_PLUS, + [anon_sym_DASH] = anon_sym_DASH, + [anon_sym_STAR] = anon_sym_STAR, + [anon_sym_SLASH] = anon_sym_SLASH, + [anon_sym_SLASH_SLASH] = anon_sym_SLASH_SLASH, + [anon_sym_PERCENT] = anon_sym_PERCENT, + [anon_sym_DOT_DOT] = anon_sym_DOT_DOT, + [anon_sym_CARET] = anon_sym_CARET, + [anon_sym_not] = anon_sym_not, + [anon_sym_POUND] = anon_sym_POUND, + [anon_sym_DASH_DASH] = sym__block_comment_start, + [aux_sym_comment_token1] = sym__block_comment_content, + [sym__block_comment_start] = sym__block_comment_start, + [sym__block_comment_content] = sym__block_comment_content, + [sym__block_comment_end] = sym__block_comment_end, + [sym__string_start] = sym__string_start, + [sym__string_content] = sym__string_content, + [sym__string_end] = sym__string_end, + [sym_chunk] = sym_chunk, + [sym__block] = sym__block, + [sym_statement] = sym_statement, + [sym_return_statement] = sym_return_statement, + [sym_empty_statement] = sym_empty_statement, + [sym_assignment_statement] = sym_assignment_statement, + [sym__variable_assignment_varlist] = sym__variable_assignment_varlist, + [sym__variable_assignment_explist] = sym__variable_assignment_explist, + [sym_label_statement] = sym_label_statement, + [sym_goto_statement] = sym_goto_statement, + [sym_do_statement] = sym_do_statement, + [sym_while_statement] = sym_while_statement, + [sym_repeat_statement] = sym_repeat_statement, + [sym_if_statement] = sym_if_statement, + [sym_elseif_statement] = sym_elseif_statement, + [sym_else_statement] = sym_else_statement, + [sym_for_statement] = sym_for_statement, + [sym_for_generic_clause] = sym_for_generic_clause, + [sym_for_numeric_clause] = sym_for_numeric_clause, + [sym_declaration] = sym_declaration, + [sym_function_declaration] = sym_function_declaration, + [sym__local_function_declaration] = sym_function_declaration, + [sym__function_name] = sym__function_name, + [sym__function_name_prefix_expression] = sym__function_name_prefix_expression, + [sym__function_name_dot_index_expression] = sym_dot_index_expression, + [sym__function_name_method_index_expression] = sym_method_index_expression, + [sym_variable_declaration] = sym_variable_declaration, + [sym__local_variable_assignment] = sym_assignment_statement, + [sym__name_list] = sym__variable_assignment_varlist, + [sym__expression_list] = sym__variable_assignment_explist, + [sym_expression] = sym_expression, + [sym_string] = sym_string, + [sym_function_definition] = sym_function_definition, + [sym__function_body] = sym__function_body, + [sym_parameters] = sym_parameters, + [sym__parameter_list] = sym__parameter_list, + [sym__prefix_expression] = sym__prefix_expression, + [sym_variable] = sym_variable, + [sym_bracket_index_expression] = sym_bracket_index_expression, + [sym_dot_index_expression] = sym_dot_index_expression, + [sym_function_call] = sym_function_call, + [sym_method_index_expression] = sym_method_index_expression, + [sym_arguments] = sym_arguments, + [sym_parenthesized_expression] = sym_parenthesized_expression, + [sym_table_constructor] = sym_table_constructor, + [sym__field_list] = sym__field_list, + [sym__field_sep] = sym__field_sep, + [sym_field] = sym_field, + [sym_binary_expression] = sym_binary_expression, + [sym_unary_expression] = sym_unary_expression, + [sym_comment] = sym_comment, + [aux_sym_chunk_repeat1] = aux_sym_chunk_repeat1, + [aux_sym__variable_assignment_varlist_repeat1] = aux_sym__variable_assignment_varlist_repeat1, + [aux_sym__variable_assignment_explist_repeat1] = aux_sym__variable_assignment_explist_repeat1, + [aux_sym_if_statement_repeat1] = aux_sym_if_statement_repeat1, + [aux_sym__name_list_repeat1] = aux_sym__name_list_repeat1, + [aux_sym__expression_list_repeat1] = aux_sym__expression_list_repeat1, + [aux_sym__field_list_repeat1] = aux_sym__field_list_repeat1, +}; + +static const TSSymbolMetadata ts_symbol_metadata[] = { + [ts_builtin_sym_end] = { + .visible = false, + .named = true, + }, + [sym_identifier] = { + .visible = true, + .named = true, + }, + [sym_hash_bang_line] = { + .visible = true, + .named = true, + }, + [anon_sym_return] = { + .visible = true, + .named = false, + }, + [anon_sym_SEMI] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_COMMA] = { + .visible = true, + .named = false, + }, + [anon_sym_COLON_COLON] = { + .visible = true, + .named = false, + }, + [sym_break_statement] = { + .visible = true, + .named = true, + }, + [anon_sym_goto] = { + .visible = true, + .named = false, + }, + [anon_sym_do] = { + .visible = true, + .named = false, + }, + [anon_sym_end] = { + .visible = true, + .named = false, + }, + [anon_sym_while] = { + .visible = true, + .named = false, + }, + [anon_sym_repeat] = { + .visible = true, + .named = false, + }, + [anon_sym_until] = { + .visible = true, + .named = false, + }, + [anon_sym_if] = { + .visible = true, + .named = false, + }, + [anon_sym_then] = { + .visible = true, + .named = false, + }, + [anon_sym_elseif] = { + .visible = true, + .named = false, + }, + [anon_sym_else] = { + .visible = true, + .named = false, + }, + [anon_sym_for] = { + .visible = true, + .named = false, + }, + [anon_sym_in] = { + .visible = true, + .named = false, + }, + [anon_sym_function] = { + .visible = true, + .named = false, + }, + [anon_sym_local] = { + .visible = true, + .named = false, + }, + [anon_sym_DOT] = { + .visible = true, + .named = false, + }, + [anon_sym_COLON] = { + .visible = true, + .named = false, + }, + [sym_nil] = { + .visible = true, + .named = true, + }, + [sym_false] = { + .visible = true, + .named = true, + }, + [sym_true] = { + .visible = true, + .named = true, + }, + [sym_number] = { + .visible = true, + .named = true, + }, + [sym_vararg_expression] = { + .visible = true, + .named = true, + }, + [anon_sym_LPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_RPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACE] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACE] = { + .visible = true, + .named = false, + }, + [anon_sym_or] = { + .visible = true, + .named = false, + }, + [anon_sym_and] = { + .visible = true, + .named = false, + }, + [anon_sym_LT] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_TILDE_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_GT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_PIPE] = { + .visible = true, + .named = false, + }, + [anon_sym_TILDE] = { + .visible = true, + .named = false, + }, + [anon_sym_AMP] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_LT] = { + .visible = true, + .named = false, + }, + [anon_sym_GT_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_PLUS] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH] = { + .visible = true, + .named = false, + }, + [anon_sym_STAR] = { + .visible = true, + .named = false, + }, + [anon_sym_SLASH] = { + .visible = true, + .named = false, + }, + [anon_sym_SLASH_SLASH] = { + .visible = true, + .named = false, + }, + [anon_sym_PERCENT] = { + .visible = true, + .named = false, + }, + [anon_sym_DOT_DOT] = { + .visible = true, + .named = false, + }, + [anon_sym_CARET] = { + .visible = true, + .named = false, + }, + [anon_sym_not] = { + .visible = true, + .named = false, + }, + [anon_sym_POUND] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH_DASH] = { + .visible = true, + .named = false, + }, + [aux_sym_comment_token1] = { + .visible = true, + .named = false, + }, + [sym__block_comment_start] = { + .visible = true, + .named = false, + }, + [sym__block_comment_content] = { + .visible = true, + .named = false, + }, + [sym__block_comment_end] = { + .visible = true, + .named = false, + }, + [sym__string_start] = { + .visible = true, + .named = false, + }, + [sym__string_content] = { + .visible = true, + .named = false, + }, + [sym__string_end] = { + .visible = true, + .named = false, + }, + [sym_chunk] = { + .visible = true, + .named = true, + }, + [sym__block] = { + .visible = true, + .named = true, + }, + [sym_statement] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_return_statement] = { + .visible = true, + .named = true, + }, + [sym_empty_statement] = { + .visible = true, + .named = true, + }, + [sym_assignment_statement] = { + .visible = true, + .named = true, + }, + [sym__variable_assignment_varlist] = { + .visible = true, + .named = true, + }, + [sym__variable_assignment_explist] = { + .visible = true, + .named = true, + }, + [sym_label_statement] = { + .visible = true, + .named = true, + }, + [sym_goto_statement] = { + .visible = true, + .named = true, + }, + [sym_do_statement] = { + .visible = true, + .named = true, + }, + [sym_while_statement] = { + .visible = true, + .named = true, + }, + [sym_repeat_statement] = { + .visible = true, + .named = true, + }, + [sym_if_statement] = { + .visible = true, + .named = true, + }, + [sym_elseif_statement] = { + .visible = true, + .named = true, + }, + [sym_else_statement] = { + .visible = true, + .named = true, + }, + [sym_for_statement] = { + .visible = true, + .named = true, + }, + [sym_for_generic_clause] = { + .visible = true, + .named = true, + }, + [sym_for_numeric_clause] = { + .visible = true, + .named = true, + }, + [sym_declaration] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_function_declaration] = { + .visible = true, + .named = true, + }, + [sym__local_function_declaration] = { + .visible = true, + .named = true, + }, + [sym__function_name] = { + .visible = false, + .named = true, + }, + [sym__function_name_prefix_expression] = { + .visible = false, + .named = true, + }, + [sym__function_name_dot_index_expression] = { + .visible = true, + .named = true, + }, + [sym__function_name_method_index_expression] = { + .visible = true, + .named = true, + }, + [sym_variable_declaration] = { + .visible = true, + .named = true, + }, + [sym__local_variable_assignment] = { + .visible = true, + .named = true, + }, + [sym__name_list] = { + .visible = true, + .named = true, + }, + [sym__expression_list] = { + .visible = true, + .named = true, + }, + [sym_expression] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_string] = { + .visible = true, + .named = true, + }, + [sym_function_definition] = { + .visible = true, + .named = true, + }, + [sym__function_body] = { + .visible = false, + .named = true, + }, + [sym_parameters] = { + .visible = true, + .named = true, + }, + [sym__parameter_list] = { + .visible = false, + .named = true, + }, + [sym__prefix_expression] = { + .visible = false, + .named = true, + }, + [sym_variable] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_bracket_index_expression] = { + .visible = true, + .named = true, + }, + [sym_dot_index_expression] = { + .visible = true, + .named = true, + }, + [sym_function_call] = { + .visible = true, + .named = true, + }, + [sym_method_index_expression] = { + .visible = true, + .named = true, + }, + [sym_arguments] = { + .visible = true, + .named = true, + }, + [sym_parenthesized_expression] = { + .visible = true, + .named = true, + }, + [sym_table_constructor] = { + .visible = true, + .named = true, + }, + [sym__field_list] = { + .visible = false, + .named = true, + }, + [sym__field_sep] = { + .visible = false, + .named = true, + }, + [sym_field] = { + .visible = true, + .named = true, + }, + [sym_binary_expression] = { + .visible = true, + .named = true, + }, + [sym_unary_expression] = { + .visible = true, + .named = true, + }, + [sym_comment] = { + .visible = true, + .named = true, + }, + [aux_sym_chunk_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__variable_assignment_varlist_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__variable_assignment_explist_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_if_statement_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__name_list_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__expression_list_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__field_list_repeat1] = { + .visible = false, + .named = false, + }, +}; + +enum { + field_alternative = 1, + field_arguments = 2, + field_body = 3, + field_clause = 4, + field_condition = 5, + field_consequence = 6, + field_content = 7, + field_end = 8, + field_field = 9, + field_left = 10, + field_local_declaration = 11, + field_method = 12, + field_name = 13, + field_operand = 14, + field_parameters = 15, + field_right = 16, + field_start = 17, + field_step = 18, + field_table = 19, + field_value = 20, +}; + +static const char * const ts_field_names[] = { + [0] = NULL, + [field_alternative] = "alternative", + [field_arguments] = "arguments", + [field_body] = "body", + [field_clause] = "clause", + [field_condition] = "condition", + [field_consequence] = "consequence", + [field_content] = "content", + [field_end] = "end", + [field_field] = "field", + [field_left] = "left", + [field_local_declaration] = "local_declaration", + [field_method] = "method", + [field_name] = "name", + [field_operand] = "operand", + [field_parameters] = "parameters", + [field_right] = "right", + [field_start] = "start", + [field_step] = "step", + [field_table] = "table", + [field_value] = "value", +}; + +static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { + [1] = {.index = 0, .length = 1}, + [2] = {.index = 1, .length = 4}, + [3] = {.index = 5, .length = 1}, + [4] = {.index = 6, .length = 1}, + [5] = {.index = 7, .length = 2}, + [6] = {.index = 9, .length = 2}, + [7] = {.index = 11, .length = 2}, + [8] = {.index = 13, .length = 2}, + [9] = {.index = 15, .length = 1}, + [10] = {.index = 16, .length = 2}, + [11] = {.index = 18, .length = 2}, + [12] = {.index = 20, .length = 3}, + [13] = {.index = 23, .length = 2}, + [14] = {.index = 25, .length = 1}, + [15] = {.index = 26, .length = 1}, + [16] = {.index = 27, .length = 1}, + [17] = {.index = 28, .length = 1}, + [18] = {.index = 29, .length = 3}, + [19] = {.index = 32, .length = 2}, + [20] = {.index = 34, .length = 2}, + [21] = {.index = 36, .length = 2}, + [22] = {.index = 38, .length = 1}, + [23] = {.index = 39, .length = 2}, + [24] = {.index = 41, .length = 1}, + [25] = {.index = 42, .length = 2}, + [26] = {.index = 44, .length = 1}, + [27] = {.index = 45, .length = 2}, + [28] = {.index = 47, .length = 1}, + [29] = {.index = 48, .length = 1}, + [30] = {.index = 49, .length = 1}, + [31] = {.index = 50, .length = 3}, + [32] = {.index = 53, .length = 2}, + [33] = {.index = 55, .length = 2}, + [34] = {.index = 57, .length = 2}, + [35] = {.index = 59, .length = 2}, + [36] = {.index = 61, .length = 2}, + [37] = {.index = 63, .length = 2}, + [38] = {.index = 65, .length = 2}, + [39] = {.index = 67, .length = 2}, + [40] = {.index = 69, .length = 2}, + [41] = {.index = 71, .length = 1}, + [42] = {.index = 72, .length = 2}, + [43] = {.index = 74, .length = 3}, + [44] = {.index = 77, .length = 3}, + [45] = {.index = 80, .length = 3}, + [46] = {.index = 83, .length = 3}, + [47] = {.index = 86, .length = 2}, + [48] = {.index = 88, .length = 4}, + [49] = {.index = 92, .length = 4}, +}; + +static const TSFieldMapEntry ts_field_map_entries[] = { + [0] = + {field_local_declaration, 0, .inherited = true}, + [1] = + {field_body, 0, .inherited = true}, + {field_local_declaration, 0}, + {field_name, 0, .inherited = true}, + {field_parameters, 0, .inherited = true}, + [5] = + {field_local_declaration, 0}, + [6] = + {field_name, 0}, + [7] = + {field_end, 1}, + {field_start, 0}, + [9] = + {field_content, 1}, + {field_start, 0}, + [11] = + {field_field, 0, .inherited = true}, + {field_table, 0, .inherited = true}, + [13] = + {field_method, 0, .inherited = true}, + {field_table, 0, .inherited = true}, + [15] = + {field_name, 1, .inherited = true}, + [16] = + {field_arguments, 1}, + {field_name, 0}, + [18] = + {field_name, 0}, + {field_name, 1, .inherited = true}, + [20] = + {field_content, 1}, + {field_end, 2}, + {field_start, 0}, + [23] = + {field_body, 1, .inherited = true}, + {field_parameters, 1, .inherited = true}, + [25] = + {field_value, 0}, + [26] = + {field_operand, 1}, + [27] = + {field_body, 1}, + [28] = + {field_condition, 2}, + [29] = + {field_body, 2, .inherited = true}, + {field_name, 1}, + {field_parameters, 2, .inherited = true}, + [32] = + {field_name, 0, .inherited = true}, + {field_value, 2, .inherited = true}, + [34] = + {field_field, 2}, + {field_table, 0}, + [36] = + {field_method, 2}, + {field_table, 0}, + [38] = + {field_name, 1}, + [39] = + {field_name, 0, .inherited = true}, + {field_name, 1, .inherited = true}, + [41] = + {field_parameters, 0}, + [42] = + {field_left, 0}, + {field_right, 2}, + [44] = + {field_condition, 1}, + [45] = + {field_body, 1}, + {field_condition, 3}, + [47] = + {field_alternative, 0}, + [48] = + {field_clause, 1}, + [49] = + {field_name, 0, .inherited = true}, + [50] = + {field_body, 3, .inherited = true}, + {field_name, 2}, + {field_parameters, 3, .inherited = true}, + [53] = + {field_value, 0}, + {field_value, 1, .inherited = true}, + [55] = + {field_body, 1}, + {field_parameters, 0}, + [57] = + {field_name, 0}, + {field_value, 2}, + [59] = + {field_body, 3}, + {field_condition, 1}, + [61] = + {field_condition, 1}, + {field_consequence, 3}, + [63] = + {field_alternative, 3}, + {field_condition, 1}, + [65] = + {field_alternative, 3, .inherited = true}, + {field_condition, 1}, + [67] = + {field_alternative, 0, .inherited = true}, + {field_alternative, 1, .inherited = true}, + [69] = + {field_body, 3}, + {field_clause, 1}, + [71] = + {field_value, 1}, + [72] = + {field_value, 0, .inherited = true}, + {field_value, 1, .inherited = true}, + [74] = + {field_alternative, 4}, + {field_condition, 1}, + {field_consequence, 3}, + [77] = + {field_alternative, 4, .inherited = true}, + {field_condition, 1}, + {field_consequence, 3}, + [80] = + {field_alternative, 3, .inherited = true}, + {field_alternative, 4}, + {field_condition, 1}, + [83] = + {field_end, 4}, + {field_name, 0}, + {field_start, 2}, + [86] = + {field_name, 1}, + {field_value, 4}, + [88] = + {field_alternative, 4, .inherited = true}, + {field_alternative, 5}, + {field_condition, 1}, + {field_consequence, 3}, + [92] = + {field_end, 4}, + {field_name, 0}, + {field_start, 2}, + {field_step, 6}, +}; + +static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { + [0] = {0}, +}; + +static const uint16_t ts_non_terminal_alias_map[] = { + 0, +}; + +static bool ts_lex(TSLexer *lexer, TSStateId state) { + START_LEXER(); + eof = lexer->eof(lexer); + switch (state) { + case 0: + if (eof) ADVANCE(10); + if (lookahead == '#') ADVANCE(53); + if (lookahead == '%') ADVANCE(49); + if (lookahead == '&') ADVANCE(41); + if (lookahead == '(') ADVANCE(26); + if (lookahead == ')') ADVANCE(27); + if (lookahead == '*') ADVANCE(46); + if (lookahead == '+') ADVANCE(44); + if (lookahead == ',') ADVANCE(14); + if (lookahead == '-') ADVANCE(45); + if (lookahead == '.') ADVANCE(17); + if (lookahead == '/') ADVANCE(47); + if (lookahead == '0') ADVANCE(19); + if (lookahead == ':') ADVANCE(18); + if (lookahead == ';') ADVANCE(12); + if (lookahead == '<') ADVANCE(32); + if (lookahead == '=') ADVANCE(13); + if (lookahead == '>') ADVANCE(37); + if (lookahead == '[') ADVANCE(28); + if (lookahead == ']') ADVANCE(29); + if (lookahead == '^') ADVANCE(51); + if (lookahead == '{') ADVANCE(30); + if (lookahead == '|') ADVANCE(38); + if (lookahead == '}') ADVANCE(31); + if (lookahead == '~') ADVANCE(40); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(0) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(20); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(54); + END_STATE(); + case 1: + if (lookahead == '!') ADVANCE(11); + END_STATE(); + case 2: + if (lookahead == '.') ADVANCE(3); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(22); + END_STATE(); + case 3: + if (lookahead == '.') ADVANCE(25); + END_STATE(); + case 4: + if (lookahead == '+' || + lookahead == '-') ADVANCE(5); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(24); + END_STATE(); + case 5: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(24); + END_STATE(); + case 6: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(21); + END_STATE(); + case 7: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(23); + END_STATE(); + case 8: + if (eof) ADVANCE(10); + if (lookahead == '#') ADVANCE(1); + if (lookahead == '%') ADVANCE(49); + if (lookahead == '&') ADVANCE(41); + if (lookahead == '(') ADVANCE(26); + if (lookahead == ')') ADVANCE(27); + if (lookahead == '*') ADVANCE(46); + if (lookahead == '+') ADVANCE(44); + if (lookahead == ',') ADVANCE(14); + if (lookahead == '-') ADVANCE(45); + if (lookahead == '.') ADVANCE(16); + if (lookahead == '/') ADVANCE(47); + if (lookahead == ':') ADVANCE(18); + if (lookahead == ';') ADVANCE(12); + if (lookahead == '<') ADVANCE(32); + if (lookahead == '=') ADVANCE(13); + if (lookahead == '>') ADVANCE(37); + if (lookahead == '[') ADVANCE(28); + if (lookahead == ']') ADVANCE(29); + if (lookahead == '^') ADVANCE(51); + if (lookahead == '{') ADVANCE(30); + if (lookahead == '|') ADVANCE(38); + if (lookahead == '}') ADVANCE(31); + if (lookahead == '~') ADVANCE(40); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(8) + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(54); + END_STATE(); + case 9: + if (eof) ADVANCE(10); + if (lookahead == '#') ADVANCE(52); + if (lookahead == '(') ADVANCE(26); + if (lookahead == ')') ADVANCE(27); + if (lookahead == '-') ADVANCE(45); + if (lookahead == '.') ADVANCE(2); + if (lookahead == '0') ADVANCE(19); + if (lookahead == ';') ADVANCE(12); + if (lookahead == '[') ADVANCE(28); + if (lookahead == '{') ADVANCE(30); + if (lookahead == '}') ADVANCE(31); + if (lookahead == '~') ADVANCE(39); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(9) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(20); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(54); + END_STATE(); + case 10: + ACCEPT_TOKEN(ts_builtin_sym_end); + END_STATE(); + case 11: + ACCEPT_TOKEN(sym_hash_bang_line); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(11); + END_STATE(); + case 12: + ACCEPT_TOKEN(anon_sym_SEMI); + END_STATE(); + case 13: + ACCEPT_TOKEN(anon_sym_EQ); + if (lookahead == '=') ADVANCE(34); + END_STATE(); + case 14: + ACCEPT_TOKEN(anon_sym_COMMA); + END_STATE(); + case 15: + ACCEPT_TOKEN(anon_sym_COLON_COLON); + END_STATE(); + case 16: + ACCEPT_TOKEN(anon_sym_DOT); + if (lookahead == '.') ADVANCE(50); + END_STATE(); + case 17: + ACCEPT_TOKEN(anon_sym_DOT); + if (lookahead == '.') ADVANCE(50); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(22); + END_STATE(); + case 18: + ACCEPT_TOKEN(anon_sym_COLON); + if (lookahead == ':') ADVANCE(15); + END_STATE(); + case 19: + ACCEPT_TOKEN(sym_number); + if (lookahead == '.') ADVANCE(22); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(4); + if (lookahead == 'X' || + lookahead == 'x') ADVANCE(6); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(20); + END_STATE(); + case 20: + ACCEPT_TOKEN(sym_number); + if (lookahead == '.') ADVANCE(22); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(4); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(20); + END_STATE(); + case 21: + ACCEPT_TOKEN(sym_number); + if (lookahead == '.') ADVANCE(7); + if (lookahead == 'P' || + lookahead == 'p') ADVANCE(4); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(21); + END_STATE(); + case 22: + ACCEPT_TOKEN(sym_number); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(4); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(22); + END_STATE(); + case 23: + ACCEPT_TOKEN(sym_number); + if (lookahead == 'P' || + lookahead == 'p') ADVANCE(4); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(23); + END_STATE(); + case 24: + ACCEPT_TOKEN(sym_number); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(24); + END_STATE(); + case 25: + ACCEPT_TOKEN(sym_vararg_expression); + END_STATE(); + case 26: + ACCEPT_TOKEN(anon_sym_LPAREN); + END_STATE(); + case 27: + ACCEPT_TOKEN(anon_sym_RPAREN); + END_STATE(); + case 28: + ACCEPT_TOKEN(anon_sym_LBRACK); + END_STATE(); + case 29: + ACCEPT_TOKEN(anon_sym_RBRACK); + END_STATE(); + case 30: + ACCEPT_TOKEN(anon_sym_LBRACE); + END_STATE(); + case 31: + ACCEPT_TOKEN(anon_sym_RBRACE); + END_STATE(); + case 32: + ACCEPT_TOKEN(anon_sym_LT); + if (lookahead == '<') ADVANCE(42); + if (lookahead == '=') ADVANCE(33); + END_STATE(); + case 33: + ACCEPT_TOKEN(anon_sym_LT_EQ); + END_STATE(); + case 34: + ACCEPT_TOKEN(anon_sym_EQ_EQ); + END_STATE(); + case 35: + ACCEPT_TOKEN(anon_sym_TILDE_EQ); + END_STATE(); + case 36: + ACCEPT_TOKEN(anon_sym_GT_EQ); + END_STATE(); + case 37: + ACCEPT_TOKEN(anon_sym_GT); + if (lookahead == '=') ADVANCE(36); + if (lookahead == '>') ADVANCE(43); + END_STATE(); + case 38: + ACCEPT_TOKEN(anon_sym_PIPE); + END_STATE(); + case 39: + ACCEPT_TOKEN(anon_sym_TILDE); + END_STATE(); + case 40: + ACCEPT_TOKEN(anon_sym_TILDE); + if (lookahead == '=') ADVANCE(35); + END_STATE(); + case 41: + ACCEPT_TOKEN(anon_sym_AMP); + END_STATE(); + case 42: + ACCEPT_TOKEN(anon_sym_LT_LT); + END_STATE(); + case 43: + ACCEPT_TOKEN(anon_sym_GT_GT); + END_STATE(); + case 44: + ACCEPT_TOKEN(anon_sym_PLUS); + END_STATE(); + case 45: + ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == '-') ADVANCE(55); + END_STATE(); + case 46: + ACCEPT_TOKEN(anon_sym_STAR); + END_STATE(); + case 47: + ACCEPT_TOKEN(anon_sym_SLASH); + if (lookahead == '/') ADVANCE(48); + END_STATE(); + case 48: + ACCEPT_TOKEN(anon_sym_SLASH_SLASH); + END_STATE(); + case 49: + ACCEPT_TOKEN(anon_sym_PERCENT); + END_STATE(); + case 50: + ACCEPT_TOKEN(anon_sym_DOT_DOT); + END_STATE(); + case 51: + ACCEPT_TOKEN(anon_sym_CARET); + END_STATE(); + case 52: + ACCEPT_TOKEN(anon_sym_POUND); + END_STATE(); + case 53: + ACCEPT_TOKEN(anon_sym_POUND); + if (lookahead == '!') ADVANCE(11); + END_STATE(); + case 54: + ACCEPT_TOKEN(sym_identifier); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(54); + END_STATE(); + case 55: + ACCEPT_TOKEN(anon_sym_DASH_DASH); + END_STATE(); + case 56: + ACCEPT_TOKEN(anon_sym_DASH_DASH); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '\r') ADVANCE(59); + END_STATE(); + case 57: + ACCEPT_TOKEN(aux_sym_comment_token1); + if (lookahead == '-') ADVANCE(58); + if (lookahead == '\t' || + lookahead == ' ') ADVANCE(57); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '\r') ADVANCE(59); + END_STATE(); + case 58: + ACCEPT_TOKEN(aux_sym_comment_token1); + if (lookahead == '-') ADVANCE(56); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '\r') ADVANCE(59); + END_STATE(); + case 59: + ACCEPT_TOKEN(aux_sym_comment_token1); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '\r') ADVANCE(59); + END_STATE(); + default: + return false; + } +} + +static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { + START_LEXER(); + eof = lexer->eof(lexer); + switch (state) { + case 0: + if (lookahead == 'a') ADVANCE(1); + if (lookahead == 'b') ADVANCE(2); + if (lookahead == 'd') ADVANCE(3); + if (lookahead == 'e') ADVANCE(4); + if (lookahead == 'f') ADVANCE(5); + if (lookahead == 'g') ADVANCE(6); + if (lookahead == 'i') ADVANCE(7); + if (lookahead == 'l') ADVANCE(8); + if (lookahead == 'n') ADVANCE(9); + if (lookahead == 'o') ADVANCE(10); + if (lookahead == 'r') ADVANCE(11); + if (lookahead == 't') ADVANCE(12); + if (lookahead == 'u') ADVANCE(13); + if (lookahead == 'w') ADVANCE(14); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(0) + END_STATE(); + case 1: + if (lookahead == 'n') ADVANCE(15); + END_STATE(); + case 2: + if (lookahead == 'r') ADVANCE(16); + END_STATE(); + case 3: + if (lookahead == 'o') ADVANCE(17); + END_STATE(); + case 4: + if (lookahead == 'l') ADVANCE(18); + if (lookahead == 'n') ADVANCE(19); + END_STATE(); + case 5: + if (lookahead == 'a') ADVANCE(20); + if (lookahead == 'o') ADVANCE(21); + if (lookahead == 'u') ADVANCE(22); + END_STATE(); + case 6: + if (lookahead == 'o') ADVANCE(23); + END_STATE(); + case 7: + if (lookahead == 'f') ADVANCE(24); + if (lookahead == 'n') ADVANCE(25); + END_STATE(); + case 8: + if (lookahead == 'o') ADVANCE(26); + END_STATE(); + case 9: + if (lookahead == 'i') ADVANCE(27); + if (lookahead == 'o') ADVANCE(28); + END_STATE(); + case 10: + if (lookahead == 'r') ADVANCE(29); + END_STATE(); + case 11: + if (lookahead == 'e') ADVANCE(30); + END_STATE(); + case 12: + if (lookahead == 'h') ADVANCE(31); + if (lookahead == 'r') ADVANCE(32); + END_STATE(); + case 13: + if (lookahead == 'n') ADVANCE(33); + END_STATE(); + case 14: + if (lookahead == 'h') ADVANCE(34); + END_STATE(); + case 15: + if (lookahead == 'd') ADVANCE(35); + END_STATE(); + case 16: + if (lookahead == 'e') ADVANCE(36); + END_STATE(); + case 17: + ACCEPT_TOKEN(anon_sym_do); + END_STATE(); + case 18: + if (lookahead == 's') ADVANCE(37); + END_STATE(); + case 19: + if (lookahead == 'd') ADVANCE(38); + END_STATE(); + case 20: + if (lookahead == 'l') ADVANCE(39); + END_STATE(); + case 21: + if (lookahead == 'r') ADVANCE(40); + END_STATE(); + case 22: + if (lookahead == 'n') ADVANCE(41); + END_STATE(); + case 23: + if (lookahead == 't') ADVANCE(42); + END_STATE(); + case 24: + ACCEPT_TOKEN(anon_sym_if); + END_STATE(); + case 25: + ACCEPT_TOKEN(anon_sym_in); + END_STATE(); + case 26: + if (lookahead == 'c') ADVANCE(43); + END_STATE(); + case 27: + if (lookahead == 'l') ADVANCE(44); + END_STATE(); + case 28: + if (lookahead == 't') ADVANCE(45); + END_STATE(); + case 29: + ACCEPT_TOKEN(anon_sym_or); + END_STATE(); + case 30: + if (lookahead == 'p') ADVANCE(46); + if (lookahead == 't') ADVANCE(47); + END_STATE(); + case 31: + if (lookahead == 'e') ADVANCE(48); + END_STATE(); + case 32: + if (lookahead == 'u') ADVANCE(49); + END_STATE(); + case 33: + if (lookahead == 't') ADVANCE(50); + END_STATE(); + case 34: + if (lookahead == 'i') ADVANCE(51); + END_STATE(); + case 35: + ACCEPT_TOKEN(anon_sym_and); + END_STATE(); + case 36: + if (lookahead == 'a') ADVANCE(52); + END_STATE(); + case 37: + if (lookahead == 'e') ADVANCE(53); + END_STATE(); + case 38: + ACCEPT_TOKEN(anon_sym_end); + END_STATE(); + case 39: + if (lookahead == 's') ADVANCE(54); + END_STATE(); + case 40: + ACCEPT_TOKEN(anon_sym_for); + END_STATE(); + case 41: + if (lookahead == 'c') ADVANCE(55); + END_STATE(); + case 42: + if (lookahead == 'o') ADVANCE(56); + END_STATE(); + case 43: + if (lookahead == 'a') ADVANCE(57); + END_STATE(); + case 44: + ACCEPT_TOKEN(sym_nil); + END_STATE(); + case 45: + ACCEPT_TOKEN(anon_sym_not); + END_STATE(); + case 46: + if (lookahead == 'e') ADVANCE(58); + END_STATE(); + case 47: + if (lookahead == 'u') ADVANCE(59); + END_STATE(); + case 48: + if (lookahead == 'n') ADVANCE(60); + END_STATE(); + case 49: + if (lookahead == 'e') ADVANCE(61); + END_STATE(); + case 50: + if (lookahead == 'i') ADVANCE(62); + END_STATE(); + case 51: + if (lookahead == 'l') ADVANCE(63); + END_STATE(); + case 52: + if (lookahead == 'k') ADVANCE(64); + END_STATE(); + case 53: + ACCEPT_TOKEN(anon_sym_else); + if (lookahead == 'i') ADVANCE(65); + END_STATE(); + case 54: + if (lookahead == 'e') ADVANCE(66); + END_STATE(); + case 55: + if (lookahead == 't') ADVANCE(67); + END_STATE(); + case 56: + ACCEPT_TOKEN(anon_sym_goto); + END_STATE(); + case 57: + if (lookahead == 'l') ADVANCE(68); + END_STATE(); + case 58: + if (lookahead == 'a') ADVANCE(69); + END_STATE(); + case 59: + if (lookahead == 'r') ADVANCE(70); + END_STATE(); + case 60: + ACCEPT_TOKEN(anon_sym_then); + END_STATE(); + case 61: + ACCEPT_TOKEN(sym_true); + END_STATE(); + case 62: + if (lookahead == 'l') ADVANCE(71); + END_STATE(); + case 63: + if (lookahead == 'e') ADVANCE(72); + END_STATE(); + case 64: + ACCEPT_TOKEN(sym_break_statement); + END_STATE(); + case 65: + if (lookahead == 'f') ADVANCE(73); + END_STATE(); + case 66: + ACCEPT_TOKEN(sym_false); + END_STATE(); + case 67: + if (lookahead == 'i') ADVANCE(74); + END_STATE(); + case 68: + ACCEPT_TOKEN(anon_sym_local); + END_STATE(); + case 69: + if (lookahead == 't') ADVANCE(75); + END_STATE(); + case 70: + if (lookahead == 'n') ADVANCE(76); + END_STATE(); + case 71: + ACCEPT_TOKEN(anon_sym_until); + END_STATE(); + case 72: + ACCEPT_TOKEN(anon_sym_while); + END_STATE(); + case 73: + ACCEPT_TOKEN(anon_sym_elseif); + END_STATE(); + case 74: + if (lookahead == 'o') ADVANCE(77); + END_STATE(); + case 75: + ACCEPT_TOKEN(anon_sym_repeat); + END_STATE(); + case 76: + ACCEPT_TOKEN(anon_sym_return); + END_STATE(); + case 77: + if (lookahead == 'n') ADVANCE(78); + END_STATE(); + case 78: + ACCEPT_TOKEN(anon_sym_function); + END_STATE(); + default: + return false; + } +} + +static const TSLexMode ts_lex_modes[STATE_COUNT] = { + [0] = {.lex_state = 0, .external_lex_state = 1}, + [1] = {.lex_state = 8, .external_lex_state = 2}, + [2] = {.lex_state = 8, .external_lex_state = 3}, + [3] = {.lex_state = 8, .external_lex_state = 3}, + [4] = {.lex_state = 8, .external_lex_state = 3}, + [5] = {.lex_state = 8, .external_lex_state = 3}, + [6] = {.lex_state = 8, .external_lex_state = 3}, + [7] = {.lex_state = 8, .external_lex_state = 3}, + [8] = {.lex_state = 8, .external_lex_state = 3}, + [9] = {.lex_state = 8, .external_lex_state = 3}, + [10] = {.lex_state = 8, .external_lex_state = 3}, + [11] = {.lex_state = 8, .external_lex_state = 3}, + [12] = {.lex_state = 8, .external_lex_state = 3}, + [13] = {.lex_state = 8, .external_lex_state = 3}, + [14] = {.lex_state = 8, .external_lex_state = 3}, + [15] = {.lex_state = 8, .external_lex_state = 3}, + [16] = {.lex_state = 0, .external_lex_state = 2}, + [17] = {.lex_state = 0, .external_lex_state = 2}, + [18] = {.lex_state = 0, .external_lex_state = 2}, + [19] = {.lex_state = 0, .external_lex_state = 2}, + [20] = {.lex_state = 0, .external_lex_state = 2}, + [21] = {.lex_state = 0, .external_lex_state = 2}, + [22] = {.lex_state = 0, .external_lex_state = 2}, + [23] = {.lex_state = 0, .external_lex_state = 2}, + [24] = {.lex_state = 0, .external_lex_state = 2}, + [25] = {.lex_state = 0, .external_lex_state = 2}, + [26] = {.lex_state = 0, .external_lex_state = 2}, + [27] = {.lex_state = 0, .external_lex_state = 2}, + [28] = {.lex_state = 0, .external_lex_state = 2}, + [29] = {.lex_state = 0, .external_lex_state = 2}, + [30] = {.lex_state = 0, .external_lex_state = 2}, + [31] = {.lex_state = 0, .external_lex_state = 2}, + [32] = {.lex_state = 0, .external_lex_state = 2}, + [33] = {.lex_state = 0, .external_lex_state = 2}, + [34] = {.lex_state = 0, .external_lex_state = 2}, + [35] = {.lex_state = 0, .external_lex_state = 2}, + [36] = {.lex_state = 0, .external_lex_state = 2}, + [37] = {.lex_state = 0, .external_lex_state = 2}, + [38] = {.lex_state = 0, .external_lex_state = 2}, + [39] = {.lex_state = 0, .external_lex_state = 2}, + [40] = {.lex_state = 0, .external_lex_state = 2}, + [41] = {.lex_state = 0, .external_lex_state = 2}, + [42] = {.lex_state = 0, .external_lex_state = 2}, + [43] = {.lex_state = 0, .external_lex_state = 2}, + [44] = {.lex_state = 0, .external_lex_state = 2}, + [45] = {.lex_state = 0, .external_lex_state = 2}, + [46] = {.lex_state = 0, .external_lex_state = 2}, + [47] = {.lex_state = 0, .external_lex_state = 2}, + [48] = {.lex_state = 0, .external_lex_state = 2}, + [49] = {.lex_state = 0, .external_lex_state = 2}, + [50] = {.lex_state = 0, .external_lex_state = 2}, + [51] = {.lex_state = 0, .external_lex_state = 2}, + [52] = {.lex_state = 0, .external_lex_state = 2}, + [53] = {.lex_state = 9, .external_lex_state = 3}, + [54] = {.lex_state = 9, .external_lex_state = 3}, + [55] = {.lex_state = 9, .external_lex_state = 3}, + [56] = {.lex_state = 8, .external_lex_state = 3}, + [57] = {.lex_state = 9, .external_lex_state = 3}, + [58] = {.lex_state = 0, .external_lex_state = 2}, + [59] = {.lex_state = 9, .external_lex_state = 3}, + [60] = {.lex_state = 0, .external_lex_state = 2}, + [61] = {.lex_state = 9, .external_lex_state = 3}, + [62] = {.lex_state = 9, .external_lex_state = 3}, + [63] = {.lex_state = 9, .external_lex_state = 3}, + [64] = {.lex_state = 9, .external_lex_state = 3}, + [65] = {.lex_state = 9, .external_lex_state = 3}, + [66] = {.lex_state = 9, .external_lex_state = 3}, + [67] = {.lex_state = 9, .external_lex_state = 3}, + [68] = {.lex_state = 9, .external_lex_state = 3}, + [69] = {.lex_state = 9, .external_lex_state = 3}, + [70] = {.lex_state = 9, .external_lex_state = 3}, + [71] = {.lex_state = 9, .external_lex_state = 3}, + [72] = {.lex_state = 9, .external_lex_state = 3}, + [73] = {.lex_state = 9, .external_lex_state = 3}, + [74] = {.lex_state = 9, .external_lex_state = 3}, + [75] = {.lex_state = 9, .external_lex_state = 3}, + [76] = {.lex_state = 9, .external_lex_state = 3}, + [77] = {.lex_state = 9, .external_lex_state = 3}, + [78] = {.lex_state = 9, .external_lex_state = 3}, + [79] = {.lex_state = 9, .external_lex_state = 3}, + [80] = {.lex_state = 9, .external_lex_state = 3}, + [81] = {.lex_state = 9, .external_lex_state = 3}, + [82] = {.lex_state = 9, .external_lex_state = 3}, + [83] = {.lex_state = 9, .external_lex_state = 3}, + [84] = {.lex_state = 9, .external_lex_state = 3}, + [85] = {.lex_state = 9, .external_lex_state = 3}, + [86] = {.lex_state = 9, .external_lex_state = 3}, + [87] = {.lex_state = 9, .external_lex_state = 3}, + [88] = {.lex_state = 9, .external_lex_state = 3}, + [89] = {.lex_state = 9, .external_lex_state = 3}, + [90] = {.lex_state = 9, .external_lex_state = 3}, + [91] = {.lex_state = 9, .external_lex_state = 3}, + [92] = {.lex_state = 9, .external_lex_state = 3}, + [93] = {.lex_state = 0, .external_lex_state = 2}, + [94] = {.lex_state = 0, .external_lex_state = 2}, + [95] = {.lex_state = 0, .external_lex_state = 2}, + [96] = {.lex_state = 8, .external_lex_state = 3}, + [97] = {.lex_state = 0, .external_lex_state = 2}, + [98] = {.lex_state = 0, .external_lex_state = 2}, + [99] = {.lex_state = 0, .external_lex_state = 2}, + [100] = {.lex_state = 0, .external_lex_state = 2}, + [101] = {.lex_state = 0, .external_lex_state = 2}, + [102] = {.lex_state = 0, .external_lex_state = 2}, + [103] = {.lex_state = 0, .external_lex_state = 2}, + [104] = {.lex_state = 0, .external_lex_state = 2}, + [105] = {.lex_state = 0, .external_lex_state = 2}, + [106] = {.lex_state = 0, .external_lex_state = 2}, + [107] = {.lex_state = 0, .external_lex_state = 2}, + [108] = {.lex_state = 0, .external_lex_state = 2}, + [109] = {.lex_state = 0, .external_lex_state = 2}, + [110] = {.lex_state = 0, .external_lex_state = 2}, + [111] = {.lex_state = 0, .external_lex_state = 2}, + [112] = {.lex_state = 0, .external_lex_state = 2}, + [113] = {.lex_state = 0, .external_lex_state = 2}, + [114] = {.lex_state = 0, .external_lex_state = 2}, + [115] = {.lex_state = 0, .external_lex_state = 2}, + [116] = {.lex_state = 0, .external_lex_state = 2}, + [117] = {.lex_state = 0, .external_lex_state = 2}, + [118] = {.lex_state = 0, .external_lex_state = 2}, + [119] = {.lex_state = 0, .external_lex_state = 2}, + [120] = {.lex_state = 0, .external_lex_state = 2}, + [121] = {.lex_state = 0, .external_lex_state = 2}, + [122] = {.lex_state = 0, .external_lex_state = 2}, + [123] = {.lex_state = 0, .external_lex_state = 2}, + [124] = {.lex_state = 0, .external_lex_state = 2}, + [125] = {.lex_state = 0, .external_lex_state = 2}, + [126] = {.lex_state = 0, .external_lex_state = 2}, + [127] = {.lex_state = 0, .external_lex_state = 2}, + [128] = {.lex_state = 0, .external_lex_state = 2}, + [129] = {.lex_state = 0, .external_lex_state = 2}, + [130] = {.lex_state = 0, .external_lex_state = 2}, + [131] = {.lex_state = 0, .external_lex_state = 2}, + [132] = {.lex_state = 0, .external_lex_state = 2}, + [133] = {.lex_state = 0, .external_lex_state = 2}, + [134] = {.lex_state = 0, .external_lex_state = 2}, + [135] = {.lex_state = 0, .external_lex_state = 2}, + [136] = {.lex_state = 0, .external_lex_state = 2}, + [137] = {.lex_state = 0, .external_lex_state = 2}, + [138] = {.lex_state = 0, .external_lex_state = 2}, + [139] = {.lex_state = 0, .external_lex_state = 2}, + [140] = {.lex_state = 0, .external_lex_state = 2}, + [141] = {.lex_state = 0, .external_lex_state = 2}, + [142] = {.lex_state = 9, .external_lex_state = 3}, + [143] = {.lex_state = 0, .external_lex_state = 2}, + [144] = {.lex_state = 0, .external_lex_state = 2}, + [145] = {.lex_state = 0, .external_lex_state = 2}, + [146] = {.lex_state = 0, .external_lex_state = 2}, + [147] = {.lex_state = 0, .external_lex_state = 2}, + [148] = {.lex_state = 8, .external_lex_state = 3}, + [149] = {.lex_state = 8, .external_lex_state = 3}, + [150] = {.lex_state = 8, .external_lex_state = 3}, + [151] = {.lex_state = 0, .external_lex_state = 3}, + [152] = {.lex_state = 0, .external_lex_state = 2}, + [153] = {.lex_state = 0, .external_lex_state = 2}, + [154] = {.lex_state = 8, .external_lex_state = 3}, + [155] = {.lex_state = 0, .external_lex_state = 2}, + [156] = {.lex_state = 0, .external_lex_state = 2}, + [157] = {.lex_state = 0, .external_lex_state = 2}, + [158] = {.lex_state = 0, .external_lex_state = 2}, + [159] = {.lex_state = 0, .external_lex_state = 2}, + [160] = {.lex_state = 0, .external_lex_state = 2}, + [161] = {.lex_state = 0, .external_lex_state = 2}, + [162] = {.lex_state = 0, .external_lex_state = 2}, + [163] = {.lex_state = 0, .external_lex_state = 2}, + [164] = {.lex_state = 0, .external_lex_state = 2}, + [165] = {.lex_state = 0, .external_lex_state = 2}, + [166] = {.lex_state = 0, .external_lex_state = 2}, + [167] = {.lex_state = 9, .external_lex_state = 2}, + [168] = {.lex_state = 0, .external_lex_state = 2}, + [169] = {.lex_state = 0, .external_lex_state = 2}, + [170] = {.lex_state = 0, .external_lex_state = 2}, + [171] = {.lex_state = 8, .external_lex_state = 2}, + [172] = {.lex_state = 0, .external_lex_state = 2}, + [173] = {.lex_state = 0, .external_lex_state = 2}, + [174] = {.lex_state = 8, .external_lex_state = 2}, + [175] = {.lex_state = 0, .external_lex_state = 3}, + [176] = {.lex_state = 0, .external_lex_state = 2}, + [177] = {.lex_state = 0, .external_lex_state = 2}, + [178] = {.lex_state = 0, .external_lex_state = 2}, + [179] = {.lex_state = 0, .external_lex_state = 2}, + [180] = {.lex_state = 0, .external_lex_state = 2}, + [181] = {.lex_state = 0, .external_lex_state = 2}, + [182] = {.lex_state = 0, .external_lex_state = 2}, + [183] = {.lex_state = 8, .external_lex_state = 2}, + [184] = {.lex_state = 8, .external_lex_state = 2}, + [185] = {.lex_state = 0, .external_lex_state = 2}, + [186] = {.lex_state = 0, .external_lex_state = 4}, + [187] = {.lex_state = 0, .external_lex_state = 5}, + [188] = {.lex_state = 0, .external_lex_state = 4}, + [189] = {.lex_state = 9, .external_lex_state = 2}, + [190] = {.lex_state = 9, .external_lex_state = 2}, + [191] = {.lex_state = 0, .external_lex_state = 2}, + [192] = {.lex_state = 0, .external_lex_state = 2}, + [193] = {.lex_state = 0, .external_lex_state = 2}, + [194] = {.lex_state = 0, .external_lex_state = 2}, + [195] = {.lex_state = 0, .external_lex_state = 2}, + [196] = {.lex_state = 0, .external_lex_state = 2}, + [197] = {.lex_state = 0, .external_lex_state = 2}, + [198] = {.lex_state = 0, .external_lex_state = 2}, + [199] = {.lex_state = 0, .external_lex_state = 2}, + [200] = {.lex_state = 0, .external_lex_state = 2}, + [201] = {.lex_state = 0, .external_lex_state = 2}, + [202] = {.lex_state = 0, .external_lex_state = 2}, + [203] = {.lex_state = 0, .external_lex_state = 2}, + [204] = {.lex_state = 0, .external_lex_state = 2}, + [205] = {.lex_state = 0, .external_lex_state = 2}, + [206] = {.lex_state = 0, .external_lex_state = 2}, + [207] = {.lex_state = 0, .external_lex_state = 2}, + [208] = {.lex_state = 0, .external_lex_state = 6}, + [209] = {.lex_state = 0, .external_lex_state = 2}, + [210] = {.lex_state = 0, .external_lex_state = 2}, + [211] = {.lex_state = 0, .external_lex_state = 2}, + [212] = {.lex_state = 0, .external_lex_state = 7}, + [213] = {.lex_state = 0, .external_lex_state = 2}, + [214] = {.lex_state = 57, .external_lex_state = 2}, + [215] = {.lex_state = 0, .external_lex_state = 2}, + [216] = {.lex_state = 0, .external_lex_state = 2}, + [217] = {.lex_state = 0, .external_lex_state = 2}, + [218] = {.lex_state = 0, .external_lex_state = 6}, + [219] = {.lex_state = 0, .external_lex_state = 2}, + [220] = {.lex_state = 0, .external_lex_state = 2}, + [221] = {.lex_state = 0, .external_lex_state = 2}, + [222] = {.lex_state = 0, .external_lex_state = 2}, + [223] = {.lex_state = 0, .external_lex_state = 2}, + [224] = {.lex_state = 0, .external_lex_state = 2}, + [225] = {.lex_state = 0, .external_lex_state = 2}, + [226] = {.lex_state = 0, .external_lex_state = 2}, + [227] = {.lex_state = 0, .external_lex_state = 2}, + [228] = {.lex_state = 0, .external_lex_state = 2}, + [229] = {.lex_state = 0, .external_lex_state = 2}, + [230] = {.lex_state = 0, .external_lex_state = 2}, + [231] = {(TSStateId)(-1)}, + [232] = {(TSStateId)(-1)}, + [233] = {(TSStateId)(-1)}, +}; + +enum { + ts_external_token__block_comment_start = 0, + ts_external_token__block_comment_content = 1, + ts_external_token__block_comment_end = 2, + ts_external_token__string_start = 3, + ts_external_token__string_content = 4, + ts_external_token__string_end = 5, +}; + +static const TSSymbol ts_external_scanner_symbol_map[EXTERNAL_TOKEN_COUNT] = { + [ts_external_token__block_comment_start] = sym__block_comment_start, + [ts_external_token__block_comment_content] = sym__block_comment_content, + [ts_external_token__block_comment_end] = sym__block_comment_end, + [ts_external_token__string_start] = sym__string_start, + [ts_external_token__string_content] = sym__string_content, + [ts_external_token__string_end] = sym__string_end, +}; + +static const bool ts_external_scanner_states[8][EXTERNAL_TOKEN_COUNT] = { + [1] = { + [ts_external_token__block_comment_start] = true, + [ts_external_token__block_comment_content] = true, + [ts_external_token__block_comment_end] = true, + [ts_external_token__string_start] = true, + [ts_external_token__string_content] = true, + [ts_external_token__string_end] = true, + }, + [2] = { + [ts_external_token__block_comment_start] = true, + }, + [3] = { + [ts_external_token__block_comment_start] = true, + [ts_external_token__string_start] = true, + }, + [4] = { + [ts_external_token__block_comment_start] = true, + [ts_external_token__string_content] = true, + [ts_external_token__string_end] = true, + }, + [5] = { + [ts_external_token__block_comment_start] = true, + [ts_external_token__block_comment_content] = true, + [ts_external_token__block_comment_end] = true, + }, + [6] = { + [ts_external_token__block_comment_start] = true, + [ts_external_token__string_end] = true, + }, + [7] = { + [ts_external_token__block_comment_start] = true, + [ts_external_token__block_comment_end] = true, + }, +}; + +static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { + [0] = { + [sym_comment] = STATE(0), + [ts_builtin_sym_end] = ACTIONS(1), + [sym_identifier] = ACTIONS(1), + [sym_hash_bang_line] = ACTIONS(1), + [anon_sym_return] = ACTIONS(1), + [anon_sym_SEMI] = ACTIONS(1), + [anon_sym_EQ] = ACTIONS(1), + [anon_sym_COMMA] = ACTIONS(1), + [anon_sym_COLON_COLON] = ACTIONS(1), + [sym_break_statement] = ACTIONS(1), + [anon_sym_goto] = ACTIONS(1), + [anon_sym_do] = ACTIONS(1), + [anon_sym_end] = ACTIONS(1), + [anon_sym_while] = ACTIONS(1), + [anon_sym_repeat] = ACTIONS(1), + [anon_sym_until] = ACTIONS(1), + [anon_sym_if] = ACTIONS(1), + [anon_sym_then] = ACTIONS(1), + [anon_sym_elseif] = ACTIONS(1), + [anon_sym_else] = ACTIONS(1), + [anon_sym_for] = ACTIONS(1), + [anon_sym_in] = ACTIONS(1), + [anon_sym_function] = ACTIONS(1), + [anon_sym_local] = ACTIONS(1), + [anon_sym_DOT] = ACTIONS(1), + [anon_sym_COLON] = ACTIONS(1), + [sym_nil] = ACTIONS(1), + [sym_false] = ACTIONS(1), + [sym_true] = ACTIONS(1), + [sym_number] = ACTIONS(1), + [anon_sym_LPAREN] = ACTIONS(1), + [anon_sym_RPAREN] = ACTIONS(1), + [anon_sym_LBRACK] = ACTIONS(1), + [anon_sym_RBRACK] = ACTIONS(1), + [anon_sym_LBRACE] = ACTIONS(1), + [anon_sym_RBRACE] = ACTIONS(1), + [anon_sym_or] = ACTIONS(1), + [anon_sym_and] = ACTIONS(1), + [anon_sym_LT] = ACTIONS(1), + [anon_sym_LT_EQ] = ACTIONS(1), + [anon_sym_EQ_EQ] = ACTIONS(1), + [anon_sym_TILDE_EQ] = ACTIONS(1), + [anon_sym_GT_EQ] = ACTIONS(1), + [anon_sym_GT] = ACTIONS(1), + [anon_sym_PIPE] = ACTIONS(1), + [anon_sym_TILDE] = ACTIONS(1), + [anon_sym_AMP] = ACTIONS(1), + [anon_sym_LT_LT] = ACTIONS(1), + [anon_sym_GT_GT] = ACTIONS(1), + [anon_sym_PLUS] = ACTIONS(1), + [anon_sym_DASH] = ACTIONS(1), + [anon_sym_STAR] = ACTIONS(1), + [anon_sym_SLASH] = ACTIONS(1), + [anon_sym_SLASH_SLASH] = ACTIONS(1), + [anon_sym_PERCENT] = ACTIONS(1), + [anon_sym_DOT_DOT] = ACTIONS(1), + [anon_sym_CARET] = ACTIONS(1), + [anon_sym_not] = ACTIONS(1), + [anon_sym_POUND] = ACTIONS(1), + [anon_sym_DASH_DASH] = ACTIONS(3), + [sym__block_comment_start] = ACTIONS(5), + [sym__block_comment_content] = ACTIONS(1), + [sym__block_comment_end] = ACTIONS(1), + [sym__string_start] = ACTIONS(1), + [sym__string_content] = ACTIONS(1), + [sym__string_end] = ACTIONS(1), + }, + [1] = { + [sym_chunk] = STATE(219), + [sym_statement] = STATE(134), + [sym_return_statement] = STATE(213), + [sym_empty_statement] = STATE(117), + [sym_assignment_statement] = STATE(117), + [sym__variable_assignment_varlist] = STATE(192), + [sym_label_statement] = STATE(117), + [sym_goto_statement] = STATE(117), + [sym_do_statement] = STATE(117), + [sym_while_statement] = STATE(117), + [sym_repeat_statement] = STATE(117), + [sym_if_statement] = STATE(117), + [sym_for_statement] = STATE(117), + [sym_declaration] = STATE(135), + [sym_function_declaration] = STATE(136), + [sym__local_function_declaration] = STATE(138), + [sym_variable_declaration] = STATE(140), + [sym__prefix_expression] = STATE(148), + [sym_variable] = STATE(149), + [sym_bracket_index_expression] = STATE(4), + [sym_dot_index_expression] = STATE(4), + [sym_function_call] = STATE(96), + [sym_method_index_expression] = STATE(151), + [sym_parenthesized_expression] = STATE(154), + [sym_comment] = STATE(1), + [aux_sym_chunk_repeat1] = STATE(50), + [ts_builtin_sym_end] = ACTIONS(7), + [sym_identifier] = ACTIONS(9), + [sym_hash_bang_line] = ACTIONS(11), + [anon_sym_return] = ACTIONS(13), + [anon_sym_SEMI] = ACTIONS(15), + [anon_sym_COLON_COLON] = ACTIONS(17), + [sym_break_statement] = ACTIONS(19), + [anon_sym_goto] = ACTIONS(21), + [anon_sym_do] = ACTIONS(23), + [anon_sym_while] = ACTIONS(25), + [anon_sym_repeat] = ACTIONS(27), + [anon_sym_if] = ACTIONS(29), + [anon_sym_for] = ACTIONS(31), + [anon_sym_function] = ACTIONS(33), + [anon_sym_local] = ACTIONS(35), + [anon_sym_LPAREN] = ACTIONS(37), + [anon_sym_DASH_DASH] = ACTIONS(3), + [sym__block_comment_start] = ACTIONS(5), + }, +}; + +static const uint16_t ts_small_parse_table[] = { + [0] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(2), 1, + sym_comment, + ACTIONS(39), 25, + sym__string_start, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(41), 26, + anon_sym_return, + anon_sym_EQ, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [65] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(3), 1, + sym_comment, + ACTIONS(43), 25, + sym__string_start, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(45), 26, + anon_sym_return, + anon_sym_EQ, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [130] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(4), 1, + sym_comment, + ACTIONS(47), 25, + sym__string_start, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(49), 26, + anon_sym_return, + anon_sym_EQ, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [195] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(5), 1, + sym_comment, + ACTIONS(51), 25, + sym__string_start, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(53), 25, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [259] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(6), 1, + sym_comment, + ACTIONS(55), 25, + sym__string_start, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(57), 25, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [323] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(7), 1, + sym_comment, + ACTIONS(59), 25, + sym__string_start, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(61), 25, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [387] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(8), 1, + sym_comment, + ACTIONS(63), 25, + sym__string_start, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(65), 25, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [451] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(9), 1, + sym_comment, + ACTIONS(67), 25, + sym__string_start, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(69), 25, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [515] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(10), 1, + sym_comment, + ACTIONS(71), 25, + sym__string_start, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(73), 25, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [579] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(11), 1, + sym_comment, + ACTIONS(75), 25, + sym__string_start, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(77), 25, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [643] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(12), 1, + sym_comment, + ACTIONS(79), 25, + sym__string_start, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(81), 25, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [707] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(13), 1, + sym_comment, + ACTIONS(83), 25, + sym__string_start, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(85), 25, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [771] = 7, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(14), 1, + sym_comment, + ACTIONS(91), 2, + anon_sym_DOT, + anon_sym_COLON, + ACTIONS(93), 4, + sym__string_start, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + ACTIONS(87), 21, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(89), 23, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [839] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(15), 1, + sym_comment, + ACTIONS(95), 25, + sym__string_start, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(97), 25, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [903] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(16), 1, + sym_comment, + ACTIONS(75), 22, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(77), 23, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [962] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(17), 1, + sym_comment, + ACTIONS(99), 22, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(101), 23, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [1021] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(107), 1, + anon_sym_and, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + STATE(18), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(103), 8, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + ACTIONS(105), 17, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + sym_identifier, + [1106] = 8, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(131), 1, + anon_sym_CARET, + STATE(19), 1, + sym_comment, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(103), 18, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DOT_DOT, + ACTIONS(105), 22, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + sym_identifier, + [1171] = 17, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + STATE(20), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(103), 8, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + ACTIONS(105), 18, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + sym_identifier, + [1254] = 15, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + STATE(21), 1, + sym_comment, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(103), 12, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(105), 20, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + sym_identifier, + [1333] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(131), 1, + anon_sym_CARET, + STATE(22), 1, + sym_comment, + ACTIONS(133), 21, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + ACTIONS(135), 23, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [1394] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(131), 1, + anon_sym_CARET, + STATE(23), 1, + sym_comment, + ACTIONS(103), 21, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + ACTIONS(105), 23, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [1455] = 11, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + STATE(24), 1, + sym_comment, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(103), 16, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(105), 21, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + sym_identifier, + [1526] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(131), 1, + anon_sym_CARET, + STATE(25), 1, + sym_comment, + ACTIONS(103), 21, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + ACTIONS(105), 23, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [1587] = 14, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + STATE(26), 1, + sym_comment, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(103), 13, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + ACTIONS(105), 20, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + sym_identifier, + [1664] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(27), 1, + sym_comment, + ACTIONS(71), 22, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(73), 23, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [1723] = 13, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + STATE(28), 1, + sym_comment, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(103), 13, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + ACTIONS(105), 21, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + sym_identifier, + [1798] = 12, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + STATE(29), 1, + sym_comment, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(103), 14, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + ACTIONS(105), 21, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + sym_identifier, + [1871] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(30), 1, + sym_comment, + ACTIONS(137), 22, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(139), 23, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [1930] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(31), 1, + sym_comment, + ACTIONS(87), 22, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(89), 23, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [1989] = 39, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(13), 1, + anon_sym_return, + ACTIONS(15), 1, + anon_sym_SEMI, + ACTIONS(17), 1, + anon_sym_COLON_COLON, + ACTIONS(19), 1, + sym_break_statement, + ACTIONS(21), 1, + anon_sym_goto, + ACTIONS(23), 1, + anon_sym_do, + ACTIONS(25), 1, + anon_sym_while, + ACTIONS(27), 1, + anon_sym_repeat, + ACTIONS(29), 1, + anon_sym_if, + ACTIONS(31), 1, + anon_sym_for, + ACTIONS(33), 1, + anon_sym_function, + ACTIONS(35), 1, + anon_sym_local, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(141), 1, + anon_sym_end, + ACTIONS(143), 1, + anon_sym_elseif, + ACTIONS(145), 1, + anon_sym_else, + STATE(32), 1, + sym_comment, + STATE(40), 1, + aux_sym_chunk_repeat1, + STATE(96), 1, + sym_function_call, + STATE(134), 1, + sym_statement, + STATE(135), 1, + sym_declaration, + STATE(136), 1, + sym_function_declaration, + STATE(138), 1, + sym__local_function_declaration, + STATE(140), 1, + sym_variable_declaration, + STATE(148), 1, + sym__prefix_expression, + STATE(149), 1, + sym_variable, + STATE(151), 1, + sym_method_index_expression, + STATE(153), 1, + aux_sym_if_statement_repeat1, + STATE(154), 1, + sym_parenthesized_expression, + STATE(155), 1, + sym__block, + STATE(165), 1, + sym_return_statement, + STATE(179), 1, + sym_elseif_statement, + STATE(192), 1, + sym__variable_assignment_varlist, + STATE(201), 1, + sym_else_statement, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + STATE(117), 9, + sym_empty_statement, + sym_assignment_statement, + sym_label_statement, + sym_goto_statement, + sym_do_statement, + sym_while_statement, + sym_repeat_statement, + sym_if_statement, + sym_for_statement, + [2116] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(33), 1, + sym_comment, + ACTIONS(59), 22, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(61), 23, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [2175] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(34), 1, + sym_comment, + ACTIONS(147), 22, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(149), 23, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [2234] = 11, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + STATE(35), 1, + sym_comment, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(103), 16, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(105), 21, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + sym_identifier, + [2305] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(36), 1, + sym_comment, + ACTIONS(67), 22, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + ACTIONS(69), 23, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_then, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + sym_identifier, + [2364] = 31, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(151), 1, + ts_builtin_sym_end, + ACTIONS(153), 1, + sym_identifier, + ACTIONS(158), 1, + anon_sym_SEMI, + ACTIONS(161), 1, + anon_sym_COLON_COLON, + ACTIONS(164), 1, + sym_break_statement, + ACTIONS(167), 1, + anon_sym_goto, + ACTIONS(170), 1, + anon_sym_do, + ACTIONS(173), 1, + anon_sym_while, + ACTIONS(176), 1, + anon_sym_repeat, + ACTIONS(179), 1, + anon_sym_if, + ACTIONS(182), 1, + anon_sym_for, + ACTIONS(185), 1, + anon_sym_function, + ACTIONS(188), 1, + anon_sym_local, + ACTIONS(191), 1, + anon_sym_LPAREN, + STATE(96), 1, + sym_function_call, + STATE(134), 1, + sym_statement, + STATE(135), 1, + sym_declaration, + STATE(136), 1, + sym_function_declaration, + STATE(138), 1, + sym__local_function_declaration, + STATE(140), 1, + sym_variable_declaration, + STATE(148), 1, + sym__prefix_expression, + STATE(149), 1, + sym_variable, + STATE(151), 1, + sym_method_index_expression, + STATE(154), 1, + sym_parenthesized_expression, + STATE(192), 1, + sym__variable_assignment_varlist, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + STATE(37), 2, + sym_comment, + aux_sym_chunk_repeat1, + ACTIONS(156), 5, + anon_sym_return, + anon_sym_end, + anon_sym_until, + anon_sym_elseif, + anon_sym_else, + STATE(117), 9, + sym_empty_statement, + sym_assignment_statement, + sym_label_statement, + sym_goto_statement, + sym_do_statement, + sym_while_statement, + sym_repeat_statement, + sym_if_statement, + sym_for_statement, + [2472] = 21, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(107), 1, + anon_sym_and, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(198), 1, + anon_sym_COMMA, + ACTIONS(200), 1, + anon_sym_or, + STATE(38), 1, + sym_comment, + STATE(112), 1, + aux_sym__variable_assignment_explist_repeat1, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(194), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(196), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [2560] = 34, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(13), 1, + anon_sym_return, + ACTIONS(15), 1, + anon_sym_SEMI, + ACTIONS(17), 1, + anon_sym_COLON_COLON, + ACTIONS(19), 1, + sym_break_statement, + ACTIONS(21), 1, + anon_sym_goto, + ACTIONS(23), 1, + anon_sym_do, + ACTIONS(25), 1, + anon_sym_while, + ACTIONS(27), 1, + anon_sym_repeat, + ACTIONS(29), 1, + anon_sym_if, + ACTIONS(31), 1, + anon_sym_for, + ACTIONS(33), 1, + anon_sym_function, + ACTIONS(35), 1, + anon_sym_local, + ACTIONS(37), 1, + anon_sym_LPAREN, + STATE(39), 1, + sym_comment, + STATE(40), 1, + aux_sym_chunk_repeat1, + STATE(96), 1, + sym_function_call, + STATE(134), 1, + sym_statement, + STATE(135), 1, + sym_declaration, + STATE(136), 1, + sym_function_declaration, + STATE(138), 1, + sym__local_function_declaration, + STATE(140), 1, + sym_variable_declaration, + STATE(148), 1, + sym__prefix_expression, + STATE(149), 1, + sym_variable, + STATE(151), 1, + sym_method_index_expression, + STATE(154), 1, + sym_parenthesized_expression, + STATE(165), 1, + sym_return_statement, + STATE(173), 1, + sym__block, + STATE(192), 1, + sym__variable_assignment_varlist, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(202), 3, + anon_sym_end, + anon_sym_elseif, + anon_sym_else, + STATE(117), 9, + sym_empty_statement, + sym_assignment_statement, + sym_label_statement, + sym_goto_statement, + sym_do_statement, + sym_while_statement, + sym_repeat_statement, + sym_if_statement, + sym_for_statement, + [2674] = 33, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(13), 1, + anon_sym_return, + ACTIONS(15), 1, + anon_sym_SEMI, + ACTIONS(17), 1, + anon_sym_COLON_COLON, + ACTIONS(19), 1, + sym_break_statement, + ACTIONS(21), 1, + anon_sym_goto, + ACTIONS(23), 1, + anon_sym_do, + ACTIONS(25), 1, + anon_sym_while, + ACTIONS(27), 1, + anon_sym_repeat, + ACTIONS(29), 1, + anon_sym_if, + ACTIONS(31), 1, + anon_sym_for, + ACTIONS(33), 1, + anon_sym_function, + ACTIONS(35), 1, + anon_sym_local, + ACTIONS(37), 1, + anon_sym_LPAREN, + STATE(37), 1, + aux_sym_chunk_repeat1, + STATE(40), 1, + sym_comment, + STATE(96), 1, + sym_function_call, + STATE(134), 1, + sym_statement, + STATE(135), 1, + sym_declaration, + STATE(136), 1, + sym_function_declaration, + STATE(138), 1, + sym__local_function_declaration, + STATE(140), 1, + sym_variable_declaration, + STATE(148), 1, + sym__prefix_expression, + STATE(149), 1, + sym_variable, + STATE(151), 1, + sym_method_index_expression, + STATE(154), 1, + sym_parenthesized_expression, + STATE(169), 1, + sym_return_statement, + STATE(192), 1, + sym__variable_assignment_varlist, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(204), 4, + anon_sym_end, + anon_sym_until, + anon_sym_elseif, + anon_sym_else, + STATE(117), 9, + sym_empty_statement, + sym_assignment_statement, + sym_label_statement, + sym_goto_statement, + sym_do_statement, + sym_while_statement, + sym_repeat_statement, + sym_if_statement, + sym_for_statement, + [2786] = 19, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(107), 1, + anon_sym_and, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(200), 1, + anon_sym_or, + STATE(41), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(206), 5, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(208), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [2869] = 34, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(13), 1, + anon_sym_return, + ACTIONS(15), 1, + anon_sym_SEMI, + ACTIONS(17), 1, + anon_sym_COLON_COLON, + ACTIONS(19), 1, + sym_break_statement, + ACTIONS(21), 1, + anon_sym_goto, + ACTIONS(23), 1, + anon_sym_do, + ACTIONS(25), 1, + anon_sym_while, + ACTIONS(27), 1, + anon_sym_repeat, + ACTIONS(29), 1, + anon_sym_if, + ACTIONS(31), 1, + anon_sym_for, + ACTIONS(33), 1, + anon_sym_function, + ACTIONS(35), 1, + anon_sym_local, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(210), 1, + anon_sym_end, + STATE(40), 1, + aux_sym_chunk_repeat1, + STATE(42), 1, + sym_comment, + STATE(96), 1, + sym_function_call, + STATE(134), 1, + sym_statement, + STATE(135), 1, + sym_declaration, + STATE(136), 1, + sym_function_declaration, + STATE(138), 1, + sym__local_function_declaration, + STATE(140), 1, + sym_variable_declaration, + STATE(148), 1, + sym__prefix_expression, + STATE(149), 1, + sym_variable, + STATE(151), 1, + sym_method_index_expression, + STATE(154), 1, + sym_parenthesized_expression, + STATE(165), 1, + sym_return_statement, + STATE(192), 1, + sym__variable_assignment_varlist, + STATE(193), 1, + sym__block, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + STATE(117), 9, + sym_empty_statement, + sym_assignment_statement, + sym_label_statement, + sym_goto_statement, + sym_do_statement, + sym_while_statement, + sym_repeat_statement, + sym_if_statement, + sym_for_statement, + [2981] = 34, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(13), 1, + anon_sym_return, + ACTIONS(15), 1, + anon_sym_SEMI, + ACTIONS(17), 1, + anon_sym_COLON_COLON, + ACTIONS(19), 1, + sym_break_statement, + ACTIONS(21), 1, + anon_sym_goto, + ACTIONS(23), 1, + anon_sym_do, + ACTIONS(25), 1, + anon_sym_while, + ACTIONS(27), 1, + anon_sym_repeat, + ACTIONS(29), 1, + anon_sym_if, + ACTIONS(31), 1, + anon_sym_for, + ACTIONS(33), 1, + anon_sym_function, + ACTIONS(35), 1, + anon_sym_local, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(212), 1, + anon_sym_end, + STATE(40), 1, + aux_sym_chunk_repeat1, + STATE(43), 1, + sym_comment, + STATE(96), 1, + sym_function_call, + STATE(134), 1, + sym_statement, + STATE(135), 1, + sym_declaration, + STATE(136), 1, + sym_function_declaration, + STATE(138), 1, + sym__local_function_declaration, + STATE(140), 1, + sym_variable_declaration, + STATE(148), 1, + sym__prefix_expression, + STATE(149), 1, + sym_variable, + STATE(151), 1, + sym_method_index_expression, + STATE(154), 1, + sym_parenthesized_expression, + STATE(165), 1, + sym_return_statement, + STATE(192), 1, + sym__variable_assignment_varlist, + STATE(205), 1, + sym__block, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + STATE(117), 9, + sym_empty_statement, + sym_assignment_statement, + sym_label_statement, + sym_goto_statement, + sym_do_statement, + sym_while_statement, + sym_repeat_statement, + sym_if_statement, + sym_for_statement, + [3093] = 34, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(13), 1, + anon_sym_return, + ACTIONS(15), 1, + anon_sym_SEMI, + ACTIONS(17), 1, + anon_sym_COLON_COLON, + ACTIONS(19), 1, + sym_break_statement, + ACTIONS(21), 1, + anon_sym_goto, + ACTIONS(23), 1, + anon_sym_do, + ACTIONS(25), 1, + anon_sym_while, + ACTIONS(27), 1, + anon_sym_repeat, + ACTIONS(29), 1, + anon_sym_if, + ACTIONS(31), 1, + anon_sym_for, + ACTIONS(33), 1, + anon_sym_function, + ACTIONS(35), 1, + anon_sym_local, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(214), 1, + anon_sym_end, + STATE(40), 1, + aux_sym_chunk_repeat1, + STATE(44), 1, + sym_comment, + STATE(96), 1, + sym_function_call, + STATE(134), 1, + sym_statement, + STATE(135), 1, + sym_declaration, + STATE(136), 1, + sym_function_declaration, + STATE(138), 1, + sym__local_function_declaration, + STATE(140), 1, + sym_variable_declaration, + STATE(148), 1, + sym__prefix_expression, + STATE(149), 1, + sym_variable, + STATE(151), 1, + sym_method_index_expression, + STATE(154), 1, + sym_parenthesized_expression, + STATE(165), 1, + sym_return_statement, + STATE(192), 1, + sym__variable_assignment_varlist, + STATE(198), 1, + sym__block, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + STATE(117), 9, + sym_empty_statement, + sym_assignment_statement, + sym_label_statement, + sym_goto_statement, + sym_do_statement, + sym_while_statement, + sym_repeat_statement, + sym_if_statement, + sym_for_statement, + [3205] = 19, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(107), 1, + anon_sym_and, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(200), 1, + anon_sym_or, + STATE(45), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(216), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(218), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [3287] = 34, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(13), 1, + anon_sym_return, + ACTIONS(15), 1, + anon_sym_SEMI, + ACTIONS(17), 1, + anon_sym_COLON_COLON, + ACTIONS(19), 1, + sym_break_statement, + ACTIONS(21), 1, + anon_sym_goto, + ACTIONS(23), 1, + anon_sym_do, + ACTIONS(25), 1, + anon_sym_while, + ACTIONS(27), 1, + anon_sym_repeat, + ACTIONS(29), 1, + anon_sym_if, + ACTIONS(31), 1, + anon_sym_for, + ACTIONS(33), 1, + anon_sym_function, + ACTIONS(35), 1, + anon_sym_local, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(220), 1, + anon_sym_end, + STATE(40), 1, + aux_sym_chunk_repeat1, + STATE(46), 1, + sym_comment, + STATE(96), 1, + sym_function_call, + STATE(134), 1, + sym_statement, + STATE(135), 1, + sym_declaration, + STATE(136), 1, + sym_function_declaration, + STATE(138), 1, + sym__local_function_declaration, + STATE(140), 1, + sym_variable_declaration, + STATE(148), 1, + sym__prefix_expression, + STATE(149), 1, + sym_variable, + STATE(151), 1, + sym_method_index_expression, + STATE(154), 1, + sym_parenthesized_expression, + STATE(165), 1, + sym_return_statement, + STATE(192), 1, + sym__variable_assignment_varlist, + STATE(229), 1, + sym__block, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + STATE(117), 9, + sym_empty_statement, + sym_assignment_statement, + sym_label_statement, + sym_goto_statement, + sym_do_statement, + sym_while_statement, + sym_repeat_statement, + sym_if_statement, + sym_for_statement, + [3399] = 34, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(13), 1, + anon_sym_return, + ACTIONS(15), 1, + anon_sym_SEMI, + ACTIONS(17), 1, + anon_sym_COLON_COLON, + ACTIONS(19), 1, + sym_break_statement, + ACTIONS(21), 1, + anon_sym_goto, + ACTIONS(23), 1, + anon_sym_do, + ACTIONS(25), 1, + anon_sym_while, + ACTIONS(27), 1, + anon_sym_repeat, + ACTIONS(29), 1, + anon_sym_if, + ACTIONS(31), 1, + anon_sym_for, + ACTIONS(33), 1, + anon_sym_function, + ACTIONS(35), 1, + anon_sym_local, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(222), 1, + anon_sym_end, + STATE(40), 1, + aux_sym_chunk_repeat1, + STATE(47), 1, + sym_comment, + STATE(96), 1, + sym_function_call, + STATE(134), 1, + sym_statement, + STATE(135), 1, + sym_declaration, + STATE(136), 1, + sym_function_declaration, + STATE(138), 1, + sym__local_function_declaration, + STATE(140), 1, + sym_variable_declaration, + STATE(148), 1, + sym__prefix_expression, + STATE(149), 1, + sym_variable, + STATE(151), 1, + sym_method_index_expression, + STATE(154), 1, + sym_parenthesized_expression, + STATE(165), 1, + sym_return_statement, + STATE(192), 1, + sym__variable_assignment_varlist, + STATE(215), 1, + sym__block, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + STATE(117), 9, + sym_empty_statement, + sym_assignment_statement, + sym_label_statement, + sym_goto_statement, + sym_do_statement, + sym_while_statement, + sym_repeat_statement, + sym_if_statement, + sym_for_statement, + [3511] = 19, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(107), 1, + anon_sym_and, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(200), 1, + anon_sym_or, + STATE(48), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(224), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(226), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [3593] = 34, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(13), 1, + anon_sym_return, + ACTIONS(15), 1, + anon_sym_SEMI, + ACTIONS(17), 1, + anon_sym_COLON_COLON, + ACTIONS(19), 1, + sym_break_statement, + ACTIONS(21), 1, + anon_sym_goto, + ACTIONS(23), 1, + anon_sym_do, + ACTIONS(25), 1, + anon_sym_while, + ACTIONS(27), 1, + anon_sym_repeat, + ACTIONS(29), 1, + anon_sym_if, + ACTIONS(31), 1, + anon_sym_for, + ACTIONS(33), 1, + anon_sym_function, + ACTIONS(35), 1, + anon_sym_local, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(228), 1, + anon_sym_until, + STATE(40), 1, + aux_sym_chunk_repeat1, + STATE(49), 1, + sym_comment, + STATE(96), 1, + sym_function_call, + STATE(134), 1, + sym_statement, + STATE(135), 1, + sym_declaration, + STATE(136), 1, + sym_function_declaration, + STATE(138), 1, + sym__local_function_declaration, + STATE(140), 1, + sym_variable_declaration, + STATE(148), 1, + sym__prefix_expression, + STATE(149), 1, + sym_variable, + STATE(151), 1, + sym_method_index_expression, + STATE(154), 1, + sym_parenthesized_expression, + STATE(165), 1, + sym_return_statement, + STATE(192), 1, + sym__variable_assignment_varlist, + STATE(194), 1, + sym__block, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + STATE(117), 9, + sym_empty_statement, + sym_assignment_statement, + sym_label_statement, + sym_goto_statement, + sym_do_statement, + sym_while_statement, + sym_repeat_statement, + sym_if_statement, + sym_for_statement, + [3705] = 33, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(13), 1, + anon_sym_return, + ACTIONS(15), 1, + anon_sym_SEMI, + ACTIONS(17), 1, + anon_sym_COLON_COLON, + ACTIONS(19), 1, + sym_break_statement, + ACTIONS(21), 1, + anon_sym_goto, + ACTIONS(23), 1, + anon_sym_do, + ACTIONS(25), 1, + anon_sym_while, + ACTIONS(27), 1, + anon_sym_repeat, + ACTIONS(29), 1, + anon_sym_if, + ACTIONS(31), 1, + anon_sym_for, + ACTIONS(33), 1, + anon_sym_function, + ACTIONS(35), 1, + anon_sym_local, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(230), 1, + ts_builtin_sym_end, + STATE(37), 1, + aux_sym_chunk_repeat1, + STATE(50), 1, + sym_comment, + STATE(96), 1, + sym_function_call, + STATE(134), 1, + sym_statement, + STATE(135), 1, + sym_declaration, + STATE(136), 1, + sym_function_declaration, + STATE(138), 1, + sym__local_function_declaration, + STATE(140), 1, + sym_variable_declaration, + STATE(148), 1, + sym__prefix_expression, + STATE(149), 1, + sym_variable, + STATE(151), 1, + sym_method_index_expression, + STATE(154), 1, + sym_parenthesized_expression, + STATE(192), 1, + sym__variable_assignment_varlist, + STATE(211), 1, + sym_return_statement, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + STATE(117), 9, + sym_empty_statement, + sym_assignment_statement, + sym_label_statement, + sym_goto_statement, + sym_do_statement, + sym_while_statement, + sym_repeat_statement, + sym_if_statement, + sym_for_statement, + [3814] = 33, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(13), 1, + anon_sym_return, + ACTIONS(15), 1, + anon_sym_SEMI, + ACTIONS(17), 1, + anon_sym_COLON_COLON, + ACTIONS(19), 1, + sym_break_statement, + ACTIONS(21), 1, + anon_sym_goto, + ACTIONS(23), 1, + anon_sym_do, + ACTIONS(25), 1, + anon_sym_while, + ACTIONS(27), 1, + anon_sym_repeat, + ACTIONS(29), 1, + anon_sym_if, + ACTIONS(31), 1, + anon_sym_for, + ACTIONS(33), 1, + anon_sym_function, + ACTIONS(35), 1, + anon_sym_local, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(232), 1, + ts_builtin_sym_end, + STATE(37), 1, + aux_sym_chunk_repeat1, + STATE(51), 1, + sym_comment, + STATE(96), 1, + sym_function_call, + STATE(134), 1, + sym_statement, + STATE(135), 1, + sym_declaration, + STATE(136), 1, + sym_function_declaration, + STATE(138), 1, + sym__local_function_declaration, + STATE(140), 1, + sym_variable_declaration, + STATE(148), 1, + sym__prefix_expression, + STATE(149), 1, + sym_variable, + STATE(151), 1, + sym_method_index_expression, + STATE(154), 1, + sym_parenthesized_expression, + STATE(192), 1, + sym__variable_assignment_varlist, + STATE(216), 1, + sym_return_statement, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + STATE(117), 9, + sym_empty_statement, + sym_assignment_statement, + sym_label_statement, + sym_goto_statement, + sym_do_statement, + sym_while_statement, + sym_repeat_statement, + sym_if_statement, + sym_for_statement, + [3923] = 33, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(13), 1, + anon_sym_return, + ACTIONS(15), 1, + anon_sym_SEMI, + ACTIONS(17), 1, + anon_sym_COLON_COLON, + ACTIONS(19), 1, + sym_break_statement, + ACTIONS(21), 1, + anon_sym_goto, + ACTIONS(23), 1, + anon_sym_do, + ACTIONS(25), 1, + anon_sym_while, + ACTIONS(27), 1, + anon_sym_repeat, + ACTIONS(29), 1, + anon_sym_if, + ACTIONS(31), 1, + anon_sym_for, + ACTIONS(33), 1, + anon_sym_function, + ACTIONS(35), 1, + anon_sym_local, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(230), 1, + ts_builtin_sym_end, + STATE(51), 1, + aux_sym_chunk_repeat1, + STATE(52), 1, + sym_comment, + STATE(96), 1, + sym_function_call, + STATE(134), 1, + sym_statement, + STATE(135), 1, + sym_declaration, + STATE(136), 1, + sym_function_declaration, + STATE(138), 1, + sym__local_function_declaration, + STATE(140), 1, + sym_variable_declaration, + STATE(148), 1, + sym__prefix_expression, + STATE(149), 1, + sym_variable, + STATE(151), 1, + sym_method_index_expression, + STATE(154), 1, + sym_parenthesized_expression, + STATE(192), 1, + sym__variable_assignment_varlist, + STATE(211), 1, + sym_return_statement, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + STATE(117), 9, + sym_empty_statement, + sym_assignment_statement, + sym_label_statement, + sym_goto_statement, + sym_do_statement, + sym_while_statement, + sym_repeat_statement, + sym_if_statement, + sym_for_statement, + [4032] = 22, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(234), 1, + ts_builtin_sym_end, + ACTIONS(236), 1, + anon_sym_SEMI, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(53), 1, + sym_comment, + STATE(58), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + STATE(156), 1, + sym__expression_list, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + ACTIONS(238), 4, + anon_sym_end, + anon_sym_until, + anon_sym_elseif, + anon_sym_else, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [4114] = 22, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + ACTIONS(254), 1, + sym_identifier, + ACTIONS(256), 1, + anon_sym_LBRACK, + ACTIONS(258), 1, + anon_sym_RBRACE, + STATE(54), 1, + sym_comment, + STATE(94), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + STATE(160), 1, + sym_field, + STATE(206), 1, + sym__field_list, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [4193] = 22, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + ACTIONS(254), 1, + sym_identifier, + ACTIONS(256), 1, + anon_sym_LBRACK, + ACTIONS(260), 1, + anon_sym_RBRACE, + STATE(55), 1, + sym_comment, + STATE(94), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + STATE(160), 1, + sym_field, + STATE(223), 1, + sym__field_list, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [4272] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(262), 1, + anon_sym_EQ, + STATE(56), 1, + sym_comment, + ACTIONS(49), 6, + anon_sym_DOT, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_SLASH, + ACTIONS(47), 24, + sym__string_start, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [4319] = 21, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + ACTIONS(254), 1, + sym_identifier, + ACTIONS(256), 1, + anon_sym_LBRACK, + ACTIONS(264), 1, + anon_sym_RBRACE, + STATE(57), 1, + sym_comment, + STATE(94), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + STATE(181), 1, + sym_field, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [4395] = 21, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(268), 1, + anon_sym_COMMA, + ACTIONS(270), 1, + anon_sym_else, + ACTIONS(272), 1, + anon_sym_or, + ACTIONS(274), 1, + anon_sym_and, + STATE(58), 1, + sym_comment, + STATE(147), 1, + aux_sym__expression_list_repeat1, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(266), 6, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_do, + anon_sym_end, + anon_sym_until, + anon_sym_elseif, + [4471] = 21, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + ACTIONS(254), 1, + sym_identifier, + ACTIONS(256), 1, + anon_sym_LBRACK, + ACTIONS(276), 1, + anon_sym_RBRACE, + STATE(59), 1, + sym_comment, + STATE(94), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + STATE(181), 1, + sym_field, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [4547] = 19, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(272), 1, + anon_sym_or, + ACTIONS(274), 1, + anon_sym_and, + ACTIONS(280), 1, + anon_sym_else, + STATE(60), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(278), 8, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_do, + anon_sym_end, + anon_sym_until, + anon_sym_elseif, + anon_sym_RPAREN, + [4619] = 20, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + ACTIONS(254), 1, + sym_identifier, + ACTIONS(256), 1, + anon_sym_LBRACK, + STATE(61), 1, + sym_comment, + STATE(94), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + STATE(181), 1, + sym_field, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [4692] = 19, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(38), 1, + sym_expression, + STATE(62), 1, + sym_comment, + STATE(126), 1, + sym__variable_assignment_explist, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [4762] = 19, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(58), 1, + sym_expression, + STATE(63), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + STATE(224), 1, + sym__expression_list, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [4832] = 19, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(38), 1, + sym_expression, + STATE(64), 1, + sym_comment, + STATE(141), 1, + sym__variable_assignment_explist, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [4902] = 19, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + ACTIONS(282), 1, + anon_sym_RPAREN, + STATE(65), 1, + sym_comment, + STATE(97), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [4972] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(66), 1, + sym_comment, + STATE(107), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [5039] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(28), 1, + sym_expression, + STATE(67), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [5106] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(45), 1, + sym_expression, + STATE(68), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [5173] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(69), 1, + sym_comment, + STATE(105), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [5240] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(70), 1, + sym_comment, + STATE(103), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [5307] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(71), 1, + sym_comment, + STATE(106), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [5374] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(72), 1, + sym_comment, + STATE(95), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [5441] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(25), 1, + sym_expression, + STATE(73), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [5508] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(74), 1, + sym_comment, + STATE(104), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [5575] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(24), 1, + sym_expression, + STATE(75), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [5642] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(23), 1, + sym_expression, + STATE(76), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [5709] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(19), 1, + sym_expression, + STATE(77), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [5776] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(41), 1, + sym_expression, + STATE(78), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [5843] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(35), 1, + sym_expression, + STATE(79), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [5910] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(29), 1, + sym_expression, + STATE(80), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [5977] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(81), 1, + sym_comment, + STATE(108), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [6044] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(26), 1, + sym_expression, + STATE(82), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [6111] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(21), 1, + sym_expression, + STATE(83), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [6178] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(20), 1, + sym_expression, + STATE(84), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [6245] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(85), 1, + sym_comment, + STATE(102), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [6312] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(18), 1, + sym_expression, + STATE(86), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [6379] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(22), 1, + sym_expression, + STATE(87), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [6446] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(88), 1, + sym_comment, + STATE(100), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [6513] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(60), 1, + sym_expression, + STATE(89), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [6580] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(48), 1, + sym_expression, + STATE(90), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [6647] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(91), 1, + sym_comment, + STATE(98), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [6714] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(9), 1, + sym_identifier, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(240), 1, + anon_sym_function, + ACTIONS(246), 1, + anon_sym_LBRACE, + ACTIONS(252), 1, + sym__string_start, + STATE(92), 1, + sym_comment, + STATE(109), 1, + sym_expression, + STATE(148), 1, + sym__prefix_expression, + STATE(151), 1, + sym_method_index_expression, + ACTIONS(244), 2, + sym_number, + sym_vararg_expression, + ACTIONS(248), 2, + anon_sym_TILDE, + anon_sym_POUND, + ACTIONS(250), 2, + anon_sym_DASH, + anon_sym_not, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + ACTIONS(242), 3, + sym_nil, + sym_false, + sym_true, + STATE(14), 3, + sym_variable, + sym_function_call, + sym_parenthesized_expression, + STATE(31), 5, + sym_string, + sym_function_definition, + sym_table_constructor, + sym_binary_expression, + sym_unary_expression, + [6781] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(288), 1, + anon_sym_COMMA, + STATE(93), 2, + sym_comment, + aux_sym__name_list_repeat1, + ACTIONS(284), 6, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + ACTIONS(286), 16, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_in, + anon_sym_function, + anon_sym_local, + sym_identifier, + [6821] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(272), 1, + anon_sym_or, + ACTIONS(274), 1, + anon_sym_and, + STATE(94), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(291), 3, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_RBRACE, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [6885] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(272), 1, + anon_sym_or, + ACTIONS(274), 1, + anon_sym_and, + STATE(95), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(293), 3, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_RBRACE, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [6949] = 7, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(91), 1, + anon_sym_COLON, + STATE(96), 1, + sym_comment, + ACTIONS(295), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + ACTIONS(93), 5, + sym__string_start, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + ACTIONS(297), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [6991] = 20, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(268), 1, + anon_sym_COMMA, + ACTIONS(272), 1, + anon_sym_or, + ACTIONS(274), 1, + anon_sym_and, + ACTIONS(299), 1, + anon_sym_RPAREN, + STATE(97), 1, + sym_comment, + STATE(180), 1, + aux_sym__expression_list_repeat1, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [7059] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(272), 1, + anon_sym_or, + ACTIONS(274), 1, + anon_sym_and, + STATE(98), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(301), 3, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_RBRACE, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [7123] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(99), 1, + sym_comment, + ACTIONS(303), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + ACTIONS(305), 16, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_in, + anon_sym_function, + anon_sym_local, + sym_identifier, + [7160] = 19, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(272), 1, + anon_sym_or, + ACTIONS(274), 1, + anon_sym_and, + ACTIONS(307), 1, + anon_sym_COMMA, + ACTIONS(309), 1, + anon_sym_do, + STATE(100), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [7225] = 7, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(315), 1, + anon_sym_COMMA, + STATE(93), 1, + aux_sym__name_list_repeat1, + STATE(101), 1, + sym_comment, + ACTIONS(311), 5, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(313), 16, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_in, + anon_sym_function, + anon_sym_local, + sym_identifier, + [7266] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(272), 1, + anon_sym_or, + ACTIONS(274), 1, + anon_sym_and, + ACTIONS(317), 1, + anon_sym_then, + STATE(102), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [7328] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(272), 1, + anon_sym_or, + ACTIONS(274), 1, + anon_sym_and, + ACTIONS(319), 1, + anon_sym_do, + STATE(103), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [7390] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(272), 1, + anon_sym_or, + ACTIONS(274), 1, + anon_sym_and, + ACTIONS(321), 1, + anon_sym_RBRACK, + STATE(104), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [7452] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(272), 1, + anon_sym_or, + ACTIONS(274), 1, + anon_sym_and, + ACTIONS(323), 1, + anon_sym_then, + STATE(105), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [7514] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(272), 1, + anon_sym_or, + ACTIONS(274), 1, + anon_sym_and, + ACTIONS(325), 1, + anon_sym_COMMA, + STATE(106), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [7576] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(272), 1, + anon_sym_or, + ACTIONS(274), 1, + anon_sym_and, + ACTIONS(327), 1, + anon_sym_RBRACK, + STATE(107), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [7638] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(272), 1, + anon_sym_or, + ACTIONS(274), 1, + anon_sym_and, + ACTIONS(329), 1, + anon_sym_do, + STATE(108), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [7700] = 18, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(113), 1, + anon_sym_PIPE, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_AMP, + ACTIONS(121), 1, + anon_sym_PLUS, + ACTIONS(123), 1, + anon_sym_DASH, + ACTIONS(127), 1, + anon_sym_SLASH, + ACTIONS(129), 1, + anon_sym_DOT_DOT, + ACTIONS(131), 1, + anon_sym_CARET, + ACTIONS(272), 1, + anon_sym_or, + ACTIONS(274), 1, + anon_sym_and, + ACTIONS(331), 1, + anon_sym_RPAREN, + STATE(109), 1, + sym_comment, + ACTIONS(109), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(119), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(125), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(111), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [7762] = 7, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(315), 1, + anon_sym_COMMA, + STATE(101), 1, + aux_sym__name_list_repeat1, + STATE(110), 1, + sym_comment, + ACTIONS(333), 5, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(335), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [7802] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(341), 1, + anon_sym_COMMA, + STATE(111), 2, + sym_comment, + aux_sym__variable_assignment_explist_repeat1, + ACTIONS(337), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(339), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [7839] = 7, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(198), 1, + anon_sym_COMMA, + STATE(111), 1, + aux_sym__variable_assignment_explist_repeat1, + STATE(112), 1, + sym_comment, + ACTIONS(344), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(346), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [7878] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(352), 1, + anon_sym_EQ, + STATE(113), 1, + sym_comment, + ACTIONS(348), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(350), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [7914] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(114), 1, + sym_comment, + ACTIONS(354), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(356), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [7947] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(115), 1, + sym_comment, + ACTIONS(358), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(360), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [7980] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(116), 1, + sym_comment, + ACTIONS(362), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(364), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8013] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(117), 1, + sym_comment, + ACTIONS(295), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(297), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8046] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(118), 1, + sym_comment, + ACTIONS(366), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(368), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8079] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(119), 1, + sym_comment, + ACTIONS(370), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(372), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8112] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(120), 1, + sym_comment, + ACTIONS(374), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(376), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8145] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(121), 1, + sym_comment, + ACTIONS(378), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(380), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8178] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(122), 1, + sym_comment, + ACTIONS(382), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(384), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8211] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(123), 1, + sym_comment, + ACTIONS(386), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(388), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8244] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(124), 1, + sym_comment, + ACTIONS(390), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(392), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8277] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(125), 1, + sym_comment, + ACTIONS(394), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(396), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8310] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(126), 1, + sym_comment, + ACTIONS(398), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(400), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8343] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(127), 1, + sym_comment, + ACTIONS(402), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(404), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8376] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(128), 1, + sym_comment, + ACTIONS(406), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(408), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8409] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(129), 1, + sym_comment, + ACTIONS(410), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(412), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8442] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(130), 1, + sym_comment, + ACTIONS(414), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(416), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8475] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(131), 1, + sym_comment, + ACTIONS(418), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(420), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8508] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(132), 1, + sym_comment, + ACTIONS(422), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(424), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8541] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(133), 1, + sym_comment, + ACTIONS(426), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(428), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8574] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(134), 1, + sym_comment, + ACTIONS(430), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(432), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8607] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(135), 1, + sym_comment, + ACTIONS(434), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(436), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8640] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(136), 1, + sym_comment, + ACTIONS(438), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(440), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8673] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(137), 1, + sym_comment, + ACTIONS(442), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(444), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8706] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(138), 1, + sym_comment, + ACTIONS(446), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(448), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8739] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(139), 1, + sym_comment, + ACTIONS(450), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(452), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8772] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(140), 1, + sym_comment, + ACTIONS(454), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(456), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8805] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(141), 1, + sym_comment, + ACTIONS(458), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(460), 15, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8838] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(142), 1, + sym_comment, + ACTIONS(462), 7, + anon_sym_function, + sym_nil, + sym_false, + sym_true, + anon_sym_DASH, + anon_sym_not, + sym_identifier, + ACTIONS(464), 9, + sym__string_start, + sym_number, + sym_vararg_expression, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_TILDE, + anon_sym_POUND, + [8868] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(143), 1, + sym_comment, + ACTIONS(468), 3, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(466), 12, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_if, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8897] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(144), 1, + sym_comment, + ACTIONS(472), 3, + anon_sym_SEMI, + anon_sym_COLON_COLON, + anon_sym_LPAREN, + ACTIONS(470), 12, + anon_sym_return, + sym_break_statement, + anon_sym_goto, + anon_sym_do, + anon_sym_end, + anon_sym_while, + anon_sym_repeat, + anon_sym_if, + anon_sym_for, + anon_sym_function, + anon_sym_local, + sym_identifier, + [8926] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(280), 1, + anon_sym_else, + ACTIONS(474), 1, + anon_sym_COMMA, + STATE(145), 2, + sym_comment, + aux_sym__expression_list_repeat1, + ACTIONS(278), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_do, + anon_sym_end, + anon_sym_until, + anon_sym_elseif, + anon_sym_RPAREN, + [8952] = 10, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(37), 1, + anon_sym_LPAREN, + ACTIONS(477), 1, + sym_identifier, + STATE(146), 1, + sym_comment, + STATE(148), 1, + sym__prefix_expression, + STATE(150), 1, + sym_variable, + STATE(151), 1, + sym_method_index_expression, + STATE(4), 2, + sym_bracket_index_expression, + sym_dot_index_expression, + STATE(154), 2, + sym_function_call, + sym_parenthesized_expression, + [8985] = 7, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(268), 1, + anon_sym_COMMA, + ACTIONS(481), 1, + anon_sym_else, + STATE(145), 1, + aux_sym__expression_list_repeat1, + STATE(147), 1, + sym_comment, + ACTIONS(479), 6, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_do, + anon_sym_end, + anon_sym_until, + anon_sym_elseif, + [9012] = 11, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(483), 1, + anon_sym_DOT, + ACTIONS(485), 1, + anon_sym_COLON, + ACTIONS(487), 1, + anon_sym_LPAREN, + ACTIONS(489), 1, + anon_sym_LBRACK, + ACTIONS(491), 1, + anon_sym_LBRACE, + ACTIONS(493), 1, + sym__string_start, + STATE(12), 1, + sym_arguments, + STATE(148), 1, + sym_comment, + STATE(13), 2, + sym_string, + sym_table_constructor, + [9047] = 7, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(495), 1, + anon_sym_EQ, + ACTIONS(497), 1, + anon_sym_COMMA, + STATE(149), 1, + sym_comment, + STATE(178), 1, + aux_sym__variable_assignment_varlist_repeat1, + ACTIONS(93), 6, + sym__string_start, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + [9074] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(150), 1, + sym_comment, + ACTIONS(499), 2, + anon_sym_EQ, + anon_sym_COMMA, + ACTIONS(93), 6, + sym__string_start, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + [9096] = 8, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(487), 1, + anon_sym_LPAREN, + ACTIONS(491), 1, + anon_sym_LBRACE, + ACTIONS(493), 1, + sym__string_start, + STATE(12), 1, + sym_arguments, + STATE(151), 1, + sym_comment, + STATE(13), 2, + sym_string, + sym_table_constructor, + [9122] = 9, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(145), 1, + anon_sym_else, + ACTIONS(501), 1, + anon_sym_end, + ACTIONS(503), 1, + anon_sym_elseif, + STATE(152), 1, + sym_comment, + STATE(159), 1, + aux_sym_if_statement_repeat1, + STATE(179), 1, + sym_elseif_statement, + STATE(217), 1, + sym_else_statement, + [9150] = 9, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(145), 1, + anon_sym_else, + ACTIONS(503), 1, + anon_sym_elseif, + ACTIONS(505), 1, + anon_sym_end, + STATE(153), 1, + sym_comment, + STATE(159), 1, + aux_sym_if_statement_repeat1, + STATE(179), 1, + sym_elseif_statement, + STATE(203), 1, + sym_else_statement, + [9178] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(154), 1, + sym_comment, + ACTIONS(93), 6, + sym__string_start, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + [9196] = 9, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(145), 1, + anon_sym_else, + ACTIONS(503), 1, + anon_sym_elseif, + ACTIONS(507), 1, + anon_sym_end, + STATE(152), 1, + aux_sym_if_statement_repeat1, + STATE(155), 1, + sym_comment, + STATE(179), 1, + sym_elseif_statement, + STATE(199), 1, + sym_else_statement, + [9224] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(511), 1, + anon_sym_SEMI, + ACTIONS(513), 1, + anon_sym_else, + STATE(156), 1, + sym_comment, + ACTIONS(509), 4, + ts_builtin_sym_end, + anon_sym_end, + anon_sym_until, + anon_sym_elseif, + [9246] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(518), 1, + anon_sym_RBRACE, + STATE(61), 1, + sym__field_sep, + ACTIONS(515), 2, + anon_sym_SEMI, + anon_sym_COMMA, + STATE(157), 2, + sym_comment, + aux_sym__field_list_repeat1, + [9267] = 7, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(264), 1, + anon_sym_RBRACE, + STATE(59), 1, + sym__field_sep, + STATE(157), 1, + aux_sym__field_list_repeat1, + STATE(158), 1, + sym_comment, + ACTIONS(520), 2, + anon_sym_SEMI, + anon_sym_COMMA, + [9290] = 7, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(522), 1, + anon_sym_end, + ACTIONS(524), 1, + anon_sym_elseif, + ACTIONS(527), 1, + anon_sym_else, + STATE(179), 1, + sym_elseif_statement, + STATE(159), 2, + sym_comment, + aux_sym_if_statement_repeat1, + [9313] = 7, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(529), 1, + anon_sym_RBRACE, + STATE(57), 1, + sym__field_sep, + STATE(158), 1, + aux_sym__field_list_repeat1, + STATE(160), 1, + sym_comment, + ACTIONS(520), 2, + anon_sym_SEMI, + anon_sym_COMMA, + [9336] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(533), 1, + anon_sym_else, + STATE(161), 1, + sym_comment, + ACTIONS(531), 4, + ts_builtin_sym_end, + anon_sym_end, + anon_sym_until, + anon_sym_elseif, + [9355] = 8, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(535), 1, + sym_identifier, + STATE(162), 1, + sym_comment, + STATE(171), 1, + sym__function_name_prefix_expression, + STATE(183), 1, + sym__function_name_dot_index_expression, + STATE(185), 1, + sym__function_name, + STATE(200), 1, + sym__function_name_method_index_expression, + [9380] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(513), 1, + anon_sym_else, + STATE(163), 1, + sym_comment, + ACTIONS(509), 4, + ts_builtin_sym_end, + anon_sym_end, + anon_sym_until, + anon_sym_elseif, + [9399] = 7, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(315), 1, + anon_sym_COMMA, + ACTIONS(333), 1, + anon_sym_in, + ACTIONS(537), 1, + anon_sym_EQ, + STATE(101), 1, + aux_sym__name_list_repeat1, + STATE(164), 1, + sym_comment, + [9421] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(204), 1, + anon_sym_else, + STATE(165), 1, + sym_comment, + ACTIONS(539), 3, + anon_sym_end, + anon_sym_until, + anon_sym_elseif, + [9439] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(541), 1, + sym_identifier, + STATE(166), 1, + sym_comment, + STATE(197), 1, + sym__name_list, + STATE(196), 2, + sym_for_generic_clause, + sym_for_numeric_clause, + [9459] = 7, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(543), 1, + sym_identifier, + ACTIONS(545), 1, + sym_vararg_expression, + ACTIONS(547), 1, + anon_sym_RPAREN, + STATE(167), 1, + sym_comment, + STATE(207), 1, + sym__parameter_list, + [9481] = 7, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(549), 1, + sym_identifier, + ACTIONS(551), 1, + anon_sym_function, + STATE(113), 1, + sym__name_list, + STATE(129), 1, + sym__local_variable_assignment, + STATE(168), 1, + sym_comment, + [9503] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(555), 1, + anon_sym_else, + STATE(169), 1, + sym_comment, + ACTIONS(553), 3, + anon_sym_end, + anon_sym_until, + anon_sym_elseif, + [9521] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(557), 1, + anon_sym_LPAREN, + STATE(30), 1, + sym__function_body, + STATE(43), 1, + sym_parameters, + STATE(170), 1, + sym_comment, + [9540] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(559), 1, + anon_sym_DOT, + ACTIONS(561), 1, + anon_sym_COLON, + ACTIONS(563), 1, + anon_sym_LPAREN, + STATE(171), 1, + sym_comment, + [9559] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(557), 1, + anon_sym_LPAREN, + STATE(43), 1, + sym_parameters, + STATE(127), 1, + sym__function_body, + STATE(172), 1, + sym_comment, + [9578] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(567), 1, + anon_sym_else, + STATE(173), 1, + sym_comment, + ACTIONS(565), 2, + anon_sym_end, + anon_sym_elseif, + [9595] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(174), 1, + sym_comment, + ACTIONS(569), 3, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_LPAREN, + [9610] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(175), 1, + sym_comment, + ACTIONS(571), 3, + sym__string_start, + anon_sym_LPAREN, + anon_sym_LBRACE, + [9625] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(573), 1, + anon_sym_EQ, + ACTIONS(575), 1, + anon_sym_COMMA, + STATE(176), 2, + sym_comment, + aux_sym__variable_assignment_varlist_repeat1, + [9642] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(578), 1, + anon_sym_COMMA, + ACTIONS(580), 1, + anon_sym_RPAREN, + STATE(177), 1, + sym_comment, + STATE(182), 1, + aux_sym__name_list_repeat1, + [9661] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(497), 1, + anon_sym_COMMA, + ACTIONS(582), 1, + anon_sym_EQ, + STATE(176), 1, + aux_sym__variable_assignment_varlist_repeat1, + STATE(178), 1, + sym_comment, + [9680] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(586), 1, + anon_sym_else, + STATE(179), 1, + sym_comment, + ACTIONS(584), 2, + anon_sym_end, + anon_sym_elseif, + [9697] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(268), 1, + anon_sym_COMMA, + ACTIONS(588), 1, + anon_sym_RPAREN, + STATE(145), 1, + aux_sym__expression_list_repeat1, + STATE(180), 1, + sym_comment, + [9716] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(181), 1, + sym_comment, + ACTIONS(518), 3, + anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_RBRACE, + [9731] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(590), 1, + anon_sym_COMMA, + ACTIONS(592), 1, + anon_sym_RPAREN, + STATE(93), 1, + aux_sym__name_list_repeat1, + STATE(182), 1, + sym_comment, + [9750] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(183), 1, + sym_comment, + ACTIONS(594), 3, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_LPAREN, + [9765] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + STATE(184), 1, + sym_comment, + ACTIONS(596), 3, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_LPAREN, + [9780] = 6, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(557), 1, + anon_sym_LPAREN, + STATE(43), 1, + sym_parameters, + STATE(120), 1, + sym__function_body, + STATE(185), 1, + sym_comment, + [9799] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(598), 1, + sym__string_content, + ACTIONS(600), 1, + sym__string_end, + STATE(186), 1, + sym_comment, + [9815] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(602), 1, + sym__block_comment_content, + ACTIONS(604), 1, + sym__block_comment_end, + STATE(187), 1, + sym_comment, + [9831] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(606), 1, + sym__string_content, + ACTIONS(608), 1, + sym__string_end, + STATE(188), 1, + sym_comment, + [9847] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(610), 1, + sym_identifier, + ACTIONS(612), 1, + sym_vararg_expression, + STATE(189), 1, + sym_comment, + [9863] = 5, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(610), 1, + sym_identifier, + ACTIONS(614), 1, + sym_vararg_expression, + STATE(190), 1, + sym_comment, + [9879] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(616), 1, + sym_identifier, + STATE(191), 1, + sym_comment, + [9892] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(618), 1, + anon_sym_EQ, + STATE(192), 1, + sym_comment, + [9905] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(620), 1, + anon_sym_end, + STATE(193), 1, + sym_comment, + [9918] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(622), 1, + anon_sym_until, + STATE(194), 1, + sym_comment, + [9931] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(624), 1, + anon_sym_EQ, + STATE(195), 1, + sym_comment, + [9944] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(626), 1, + anon_sym_do, + STATE(196), 1, + sym_comment, + [9957] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(628), 1, + anon_sym_in, + STATE(197), 1, + sym_comment, + [9970] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(630), 1, + anon_sym_end, + STATE(198), 1, + sym_comment, + [9983] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(632), 1, + anon_sym_end, + STATE(199), 1, + sym_comment, + [9996] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(634), 1, + anon_sym_LPAREN, + STATE(200), 1, + sym_comment, + [10009] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(636), 1, + anon_sym_end, + STATE(201), 1, + sym_comment, + [10022] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(638), 1, + sym_identifier, + STATE(202), 1, + sym_comment, + [10035] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(640), 1, + anon_sym_end, + STATE(203), 1, + sym_comment, + [10048] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(642), 1, + sym_identifier, + STATE(204), 1, + sym_comment, + [10061] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(644), 1, + anon_sym_end, + STATE(205), 1, + sym_comment, + [10074] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(646), 1, + anon_sym_RBRACE, + STATE(206), 1, + sym_comment, + [10087] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(648), 1, + anon_sym_RPAREN, + STATE(207), 1, + sym_comment, + [10100] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(650), 1, + sym__string_end, + STATE(208), 1, + sym_comment, + [10113] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(652), 1, + anon_sym_RPAREN, + STATE(209), 1, + sym_comment, + [10126] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(654), 1, + anon_sym_RPAREN, + STATE(210), 1, + sym_comment, + [10139] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(232), 1, + ts_builtin_sym_end, + STATE(211), 1, + sym_comment, + [10152] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(656), 1, + sym__block_comment_end, + STATE(212), 1, + sym_comment, + [10165] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(230), 1, + ts_builtin_sym_end, + STATE(213), 1, + sym_comment, + [10178] = 4, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(658), 1, + anon_sym_DASH_DASH, + ACTIONS(660), 1, + aux_sym_comment_token1, + STATE(214), 1, + sym_comment, + [10191] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(662), 1, + anon_sym_end, + STATE(215), 1, + sym_comment, + [10204] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(664), 1, + ts_builtin_sym_end, + STATE(216), 1, + sym_comment, + [10217] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(666), 1, + anon_sym_end, + STATE(217), 1, + sym_comment, + [10230] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(668), 1, + sym__string_end, + STATE(218), 1, + sym_comment, + [10243] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(670), 1, + ts_builtin_sym_end, + STATE(219), 1, + sym_comment, + [10256] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(672), 1, + anon_sym_RPAREN, + STATE(220), 1, + sym_comment, + [10269] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(674), 1, + anon_sym_COLON_COLON, + STATE(221), 1, + sym_comment, + [10282] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(676), 1, + anon_sym_LPAREN, + STATE(222), 1, + sym_comment, + [10295] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(678), 1, + anon_sym_RBRACE, + STATE(223), 1, + sym_comment, + [10308] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(680), 1, + anon_sym_do, + STATE(224), 1, + sym_comment, + [10321] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(682), 1, + sym_identifier, + STATE(225), 1, + sym_comment, + [10334] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(684), 1, + sym_identifier, + STATE(226), 1, + sym_comment, + [10347] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(686), 1, + sym_identifier, + STATE(227), 1, + sym_comment, + [10360] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(688), 1, + sym_identifier, + STATE(228), 1, + sym_comment, + [10373] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(690), 1, + anon_sym_end, + STATE(229), 1, + sym_comment, + [10386] = 4, + ACTIONS(3), 1, + anon_sym_DASH_DASH, + ACTIONS(5), 1, + sym__block_comment_start, + ACTIONS(610), 1, + sym_identifier, + STATE(230), 1, + sym_comment, + [10399] = 1, + ACTIONS(692), 1, + ts_builtin_sym_end, + [10403] = 1, + ACTIONS(694), 1, + ts_builtin_sym_end, + [10407] = 1, + ACTIONS(696), 1, + ts_builtin_sym_end, +}; + +static const uint32_t ts_small_parse_table_map[] = { + [SMALL_STATE(2)] = 0, + [SMALL_STATE(3)] = 65, + [SMALL_STATE(4)] = 130, + [SMALL_STATE(5)] = 195, + [SMALL_STATE(6)] = 259, + [SMALL_STATE(7)] = 323, + [SMALL_STATE(8)] = 387, + [SMALL_STATE(9)] = 451, + [SMALL_STATE(10)] = 515, + [SMALL_STATE(11)] = 579, + [SMALL_STATE(12)] = 643, + [SMALL_STATE(13)] = 707, + [SMALL_STATE(14)] = 771, + [SMALL_STATE(15)] = 839, + [SMALL_STATE(16)] = 903, + [SMALL_STATE(17)] = 962, + [SMALL_STATE(18)] = 1021, + [SMALL_STATE(19)] = 1106, + [SMALL_STATE(20)] = 1171, + [SMALL_STATE(21)] = 1254, + [SMALL_STATE(22)] = 1333, + [SMALL_STATE(23)] = 1394, + [SMALL_STATE(24)] = 1455, + [SMALL_STATE(25)] = 1526, + [SMALL_STATE(26)] = 1587, + [SMALL_STATE(27)] = 1664, + [SMALL_STATE(28)] = 1723, + [SMALL_STATE(29)] = 1798, + [SMALL_STATE(30)] = 1871, + [SMALL_STATE(31)] = 1930, + [SMALL_STATE(32)] = 1989, + [SMALL_STATE(33)] = 2116, + [SMALL_STATE(34)] = 2175, + [SMALL_STATE(35)] = 2234, + [SMALL_STATE(36)] = 2305, + [SMALL_STATE(37)] = 2364, + [SMALL_STATE(38)] = 2472, + [SMALL_STATE(39)] = 2560, + [SMALL_STATE(40)] = 2674, + [SMALL_STATE(41)] = 2786, + [SMALL_STATE(42)] = 2869, + [SMALL_STATE(43)] = 2981, + [SMALL_STATE(44)] = 3093, + [SMALL_STATE(45)] = 3205, + [SMALL_STATE(46)] = 3287, + [SMALL_STATE(47)] = 3399, + [SMALL_STATE(48)] = 3511, + [SMALL_STATE(49)] = 3593, + [SMALL_STATE(50)] = 3705, + [SMALL_STATE(51)] = 3814, + [SMALL_STATE(52)] = 3923, + [SMALL_STATE(53)] = 4032, + [SMALL_STATE(54)] = 4114, + [SMALL_STATE(55)] = 4193, + [SMALL_STATE(56)] = 4272, + [SMALL_STATE(57)] = 4319, + [SMALL_STATE(58)] = 4395, + [SMALL_STATE(59)] = 4471, + [SMALL_STATE(60)] = 4547, + [SMALL_STATE(61)] = 4619, + [SMALL_STATE(62)] = 4692, + [SMALL_STATE(63)] = 4762, + [SMALL_STATE(64)] = 4832, + [SMALL_STATE(65)] = 4902, + [SMALL_STATE(66)] = 4972, + [SMALL_STATE(67)] = 5039, + [SMALL_STATE(68)] = 5106, + [SMALL_STATE(69)] = 5173, + [SMALL_STATE(70)] = 5240, + [SMALL_STATE(71)] = 5307, + [SMALL_STATE(72)] = 5374, + [SMALL_STATE(73)] = 5441, + [SMALL_STATE(74)] = 5508, + [SMALL_STATE(75)] = 5575, + [SMALL_STATE(76)] = 5642, + [SMALL_STATE(77)] = 5709, + [SMALL_STATE(78)] = 5776, + [SMALL_STATE(79)] = 5843, + [SMALL_STATE(80)] = 5910, + [SMALL_STATE(81)] = 5977, + [SMALL_STATE(82)] = 6044, + [SMALL_STATE(83)] = 6111, + [SMALL_STATE(84)] = 6178, + [SMALL_STATE(85)] = 6245, + [SMALL_STATE(86)] = 6312, + [SMALL_STATE(87)] = 6379, + [SMALL_STATE(88)] = 6446, + [SMALL_STATE(89)] = 6513, + [SMALL_STATE(90)] = 6580, + [SMALL_STATE(91)] = 6647, + [SMALL_STATE(92)] = 6714, + [SMALL_STATE(93)] = 6781, + [SMALL_STATE(94)] = 6821, + [SMALL_STATE(95)] = 6885, + [SMALL_STATE(96)] = 6949, + [SMALL_STATE(97)] = 6991, + [SMALL_STATE(98)] = 7059, + [SMALL_STATE(99)] = 7123, + [SMALL_STATE(100)] = 7160, + [SMALL_STATE(101)] = 7225, + [SMALL_STATE(102)] = 7266, + [SMALL_STATE(103)] = 7328, + [SMALL_STATE(104)] = 7390, + [SMALL_STATE(105)] = 7452, + [SMALL_STATE(106)] = 7514, + [SMALL_STATE(107)] = 7576, + [SMALL_STATE(108)] = 7638, + [SMALL_STATE(109)] = 7700, + [SMALL_STATE(110)] = 7762, + [SMALL_STATE(111)] = 7802, + [SMALL_STATE(112)] = 7839, + [SMALL_STATE(113)] = 7878, + [SMALL_STATE(114)] = 7914, + [SMALL_STATE(115)] = 7947, + [SMALL_STATE(116)] = 7980, + [SMALL_STATE(117)] = 8013, + [SMALL_STATE(118)] = 8046, + [SMALL_STATE(119)] = 8079, + [SMALL_STATE(120)] = 8112, + [SMALL_STATE(121)] = 8145, + [SMALL_STATE(122)] = 8178, + [SMALL_STATE(123)] = 8211, + [SMALL_STATE(124)] = 8244, + [SMALL_STATE(125)] = 8277, + [SMALL_STATE(126)] = 8310, + [SMALL_STATE(127)] = 8343, + [SMALL_STATE(128)] = 8376, + [SMALL_STATE(129)] = 8409, + [SMALL_STATE(130)] = 8442, + [SMALL_STATE(131)] = 8475, + [SMALL_STATE(132)] = 8508, + [SMALL_STATE(133)] = 8541, + [SMALL_STATE(134)] = 8574, + [SMALL_STATE(135)] = 8607, + [SMALL_STATE(136)] = 8640, + [SMALL_STATE(137)] = 8673, + [SMALL_STATE(138)] = 8706, + [SMALL_STATE(139)] = 8739, + [SMALL_STATE(140)] = 8772, + [SMALL_STATE(141)] = 8805, + [SMALL_STATE(142)] = 8838, + [SMALL_STATE(143)] = 8868, + [SMALL_STATE(144)] = 8897, + [SMALL_STATE(145)] = 8926, + [SMALL_STATE(146)] = 8952, + [SMALL_STATE(147)] = 8985, + [SMALL_STATE(148)] = 9012, + [SMALL_STATE(149)] = 9047, + [SMALL_STATE(150)] = 9074, + [SMALL_STATE(151)] = 9096, + [SMALL_STATE(152)] = 9122, + [SMALL_STATE(153)] = 9150, + [SMALL_STATE(154)] = 9178, + [SMALL_STATE(155)] = 9196, + [SMALL_STATE(156)] = 9224, + [SMALL_STATE(157)] = 9246, + [SMALL_STATE(158)] = 9267, + [SMALL_STATE(159)] = 9290, + [SMALL_STATE(160)] = 9313, + [SMALL_STATE(161)] = 9336, + [SMALL_STATE(162)] = 9355, + [SMALL_STATE(163)] = 9380, + [SMALL_STATE(164)] = 9399, + [SMALL_STATE(165)] = 9421, + [SMALL_STATE(166)] = 9439, + [SMALL_STATE(167)] = 9459, + [SMALL_STATE(168)] = 9481, + [SMALL_STATE(169)] = 9503, + [SMALL_STATE(170)] = 9521, + [SMALL_STATE(171)] = 9540, + [SMALL_STATE(172)] = 9559, + [SMALL_STATE(173)] = 9578, + [SMALL_STATE(174)] = 9595, + [SMALL_STATE(175)] = 9610, + [SMALL_STATE(176)] = 9625, + [SMALL_STATE(177)] = 9642, + [SMALL_STATE(178)] = 9661, + [SMALL_STATE(179)] = 9680, + [SMALL_STATE(180)] = 9697, + [SMALL_STATE(181)] = 9716, + [SMALL_STATE(182)] = 9731, + [SMALL_STATE(183)] = 9750, + [SMALL_STATE(184)] = 9765, + [SMALL_STATE(185)] = 9780, + [SMALL_STATE(186)] = 9799, + [SMALL_STATE(187)] = 9815, + [SMALL_STATE(188)] = 9831, + [SMALL_STATE(189)] = 9847, + [SMALL_STATE(190)] = 9863, + [SMALL_STATE(191)] = 9879, + [SMALL_STATE(192)] = 9892, + [SMALL_STATE(193)] = 9905, + [SMALL_STATE(194)] = 9918, + [SMALL_STATE(195)] = 9931, + [SMALL_STATE(196)] = 9944, + [SMALL_STATE(197)] = 9957, + [SMALL_STATE(198)] = 9970, + [SMALL_STATE(199)] = 9983, + [SMALL_STATE(200)] = 9996, + [SMALL_STATE(201)] = 10009, + [SMALL_STATE(202)] = 10022, + [SMALL_STATE(203)] = 10035, + [SMALL_STATE(204)] = 10048, + [SMALL_STATE(205)] = 10061, + [SMALL_STATE(206)] = 10074, + [SMALL_STATE(207)] = 10087, + [SMALL_STATE(208)] = 10100, + [SMALL_STATE(209)] = 10113, + [SMALL_STATE(210)] = 10126, + [SMALL_STATE(211)] = 10139, + [SMALL_STATE(212)] = 10152, + [SMALL_STATE(213)] = 10165, + [SMALL_STATE(214)] = 10178, + [SMALL_STATE(215)] = 10191, + [SMALL_STATE(216)] = 10204, + [SMALL_STATE(217)] = 10217, + [SMALL_STATE(218)] = 10230, + [SMALL_STATE(219)] = 10243, + [SMALL_STATE(220)] = 10256, + [SMALL_STATE(221)] = 10269, + [SMALL_STATE(222)] = 10282, + [SMALL_STATE(223)] = 10295, + [SMALL_STATE(224)] = 10308, + [SMALL_STATE(225)] = 10321, + [SMALL_STATE(226)] = 10334, + [SMALL_STATE(227)] = 10347, + [SMALL_STATE(228)] = 10360, + [SMALL_STATE(229)] = 10373, + [SMALL_STATE(230)] = 10386, + [SMALL_STATE(231)] = 10399, + [SMALL_STATE(232)] = 10403, + [SMALL_STATE(233)] = 10407, +}; + +static const TSParseActionEntry ts_parse_actions[] = { + [0] = {.entry = {.count = 0, .reusable = false}}, + [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), + [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT(214), + [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(187), + [7] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_chunk, 0), + [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(4), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53), + [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), + [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(228), + [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(117), + [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(226), + [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(42), + [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(81), + [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), + [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(69), + [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(166), + [33] = {.entry = {.count = 1, .reusable = false}}, SHIFT(162), + [35] = {.entry = {.count = 1, .reusable = false}}, SHIFT(168), + [37] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), + [39] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dot_index_expression, 3, .production_id = 20), + [41] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_dot_index_expression, 3, .production_id = 20), + [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_bracket_index_expression, 4, .production_id = 20), + [45] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_bracket_index_expression, 4, .production_id = 20), + [47] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable, 1), + [49] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable, 1), + [51] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_arguments, 4), + [53] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_arguments, 4), + [55] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_expression, 3), + [57] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_expression, 3), + [59] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table_constructor, 3), + [61] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table_constructor, 3), + [63] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_arguments, 2), + [65] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_arguments, 2), + [67] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 3, .production_id = 12), + [69] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string, 3, .production_id = 12), + [71] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table_constructor, 2), + [73] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table_constructor, 2), + [75] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 2, .production_id = 5), + [77] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string, 2, .production_id = 5), + [79] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 2, .production_id = 10), + [81] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 2, .production_id = 10), + [83] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_arguments, 1), + [85] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_arguments, 1), + [87] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 1), + [89] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 1), + [91] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__prefix_expression, 1), + [93] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__prefix_expression, 1), + [95] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_arguments, 3), + [97] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_arguments, 3), + [99] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_body, 2, .production_id = 24), + [101] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__function_body, 2, .production_id = 24), + [103] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 25), + [105] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, .production_id = 25), + [107] = {.entry = {.count = 1, .reusable = false}}, SHIFT(84), + [109] = {.entry = {.count = 1, .reusable = false}}, SHIFT(83), + [111] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), + [113] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), + [115] = {.entry = {.count = 1, .reusable = false}}, SHIFT(67), + [117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), + [119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79), + [121] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [123] = {.entry = {.count = 1, .reusable = false}}, SHIFT(77), + [125] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), + [127] = {.entry = {.count = 1, .reusable = false}}, SHIFT(76), + [129] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), + [131] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), + [133] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, .production_id = 15), + [135] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unary_expression, 2, .production_id = 15), + [137] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 2, .production_id = 13), + [139] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 2, .production_id = 13), + [141] = {.entry = {.count = 1, .reusable = false}}, SHIFT(122), + [143] = {.entry = {.count = 1, .reusable = false}}, SHIFT(85), + [145] = {.entry = {.count = 1, .reusable = false}}, SHIFT(44), + [147] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_body, 3, .production_id = 33), + [149] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__function_body, 3, .production_id = 33), + [151] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_chunk_repeat1, 2), + [153] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(4), + [156] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), + [158] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(116), + [161] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(228), + [164] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(117), + [167] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(226), + [170] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(42), + [173] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(81), + [176] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(49), + [179] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(69), + [182] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(166), + [185] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(162), + [188] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(168), + [191] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(92), + [194] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__variable_assignment_explist, 1, .production_id = 14), + [196] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__variable_assignment_explist, 1, .production_id = 14), + [198] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78), + [200] = {.entry = {.count = 1, .reusable = false}}, SHIFT(86), + [202] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_elseif_statement, 3, .production_id = 26), + [204] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__block, 1), + [206] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__variable_assignment_explist_repeat1, 2, .production_id = 41), + [208] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__variable_assignment_explist_repeat1, 2, .production_id = 41), + [210] = {.entry = {.count = 1, .reusable = false}}, SHIFT(125), + [212] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), + [214] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_else_statement, 1), + [216] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_repeat_statement, 4, .production_id = 27), + [218] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_repeat_statement, 4, .production_id = 27), + [220] = {.entry = {.count = 1, .reusable = false}}, SHIFT(114), + [222] = {.entry = {.count = 1, .reusable = false}}, SHIFT(128), + [224] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_repeat_statement, 3, .production_id = 17), + [226] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_repeat_statement, 3, .production_id = 17), + [228] = {.entry = {.count = 1, .reusable = false}}, SHIFT(90), + [230] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_chunk, 1), + [232] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_chunk, 2), + [234] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_statement, 1), + [236] = {.entry = {.count = 1, .reusable = true}}, SHIFT(163), + [238] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return_statement, 1), + [240] = {.entry = {.count = 1, .reusable = false}}, SHIFT(170), + [242] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), + [244] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [246] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [248] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), + [250] = {.entry = {.count = 1, .reusable = false}}, SHIFT(87), + [252] = {.entry = {.count = 1, .reusable = true}}, SHIFT(188), + [254] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), + [256] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), + [258] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [260] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [262] = {.entry = {.count = 1, .reusable = false}}, SHIFT(72), + [264] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__field_list, 2), + [266] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expression_list, 1), + [268] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), + [270] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expression_list, 1), + [272] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), + [274] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), + [276] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__field_list, 3), + [278] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__expression_list_repeat1, 2), + [280] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__expression_list_repeat1, 2), + [282] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [284] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__name_list_repeat1, 2, .production_id = 23), + [286] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__name_list_repeat1, 2, .production_id = 23), + [288] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__name_list_repeat1, 2, .production_id = 23), SHIFT_REPEAT(230), + [291] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field, 1, .production_id = 14), + [293] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field, 3, .production_id = 34), + [295] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_statement, 1), + [297] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_statement, 1), + [299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), + [301] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field, 5, .production_id = 47), + [303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__name_list_repeat1, 2, .production_id = 22), + [305] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__name_list_repeat1, 2, .production_id = 22), + [307] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), + [309] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_numeric_clause, 5, .production_id = 46), + [311] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__name_list, 2, .production_id = 11), + [313] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__name_list, 2, .production_id = 11), + [315] = {.entry = {.count = 1, .reusable = true}}, SHIFT(230), + [317] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [319] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_numeric_clause, 7, .production_id = 49), + [321] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [323] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), + [325] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), + [327] = {.entry = {.count = 1, .reusable = true}}, SHIFT(195), + [329] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), + [331] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [333] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__name_list, 1, .production_id = 4), + [335] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__name_list, 1, .production_id = 4), + [337] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__variable_assignment_explist_repeat1, 2, .production_id = 42), + [339] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__variable_assignment_explist_repeat1, 2, .production_id = 42), + [341] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__variable_assignment_explist_repeat1, 2, .production_id = 42), SHIFT_REPEAT(78), + [344] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__variable_assignment_explist, 2, .production_id = 32), + [346] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__variable_assignment_explist, 2, .production_id = 32), + [348] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration, 2, .production_id = 9), + [350] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable_declaration, 2, .production_id = 9), + [352] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), + [354] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 4, .production_id = 29), + [356] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 4, .production_id = 29), + [358] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 6, .production_id = 45), + [360] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 6, .production_id = 45), + [362] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_empty_statement, 1), + [364] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_empty_statement, 1), + [366] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_do_statement, 3, .production_id = 16), + [368] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_do_statement, 3, .production_id = 16), + [370] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_label_statement, 3), + [372] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_label_statement, 3), + [374] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 3, .production_id = 18), + [376] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 3, .production_id = 18), + [378] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_goto_statement, 2), + [380] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_goto_statement, 2), + [382] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 4, .production_id = 26), + [384] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 4, .production_id = 26), + [386] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 7, .production_id = 48), + [388] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 7, .production_id = 48), + [390] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_statement, 5, .production_id = 35), + [392] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_while_statement, 5, .production_id = 35), + [394] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_do_statement, 2), + [396] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_do_statement, 2), + [398] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment_statement, 3, .production_id = 19), + [400] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment_statement, 3, .production_id = 19), + [402] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__local_function_declaration, 4, .production_id = 31), + [404] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__local_function_declaration, 4, .production_id = 31), + [406] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_statement, 4, .production_id = 26), + [408] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_while_statement, 4, .production_id = 26), + [410] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration, 2), + [412] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable_declaration, 2), + [414] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 5, .production_id = 37), + [416] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 5, .production_id = 37), + [418] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 6, .production_id = 44), + [420] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 6, .production_id = 44), + [422] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 6, .production_id = 43), + [424] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 6, .production_id = 43), + [426] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 5, .production_id = 36), + [428] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 5, .production_id = 36), + [430] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_chunk_repeat1, 1), + [432] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 1), + [434] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_statement, 1, .production_id = 1), + [436] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_statement, 1, .production_id = 1), + [438] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 1), + [440] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_declaration, 1), + [442] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 5, .production_id = 38), + [444] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 5, .production_id = 38), + [446] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 1, .production_id = 2), + [448] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_declaration, 1, .production_id = 2), + [450] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 5, .production_id = 40), + [452] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 5, .production_id = 40), + [454] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 1, .production_id = 3), + [456] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_declaration, 1, .production_id = 3), + [458] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__local_variable_assignment, 3, .production_id = 19), + [460] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__local_variable_assignment, 3, .production_id = 19), + [462] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__field_sep, 1), + [464] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__field_sep, 1), + [466] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameters, 3, .production_id = 9), + [468] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 3, .production_id = 9), + [470] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameters, 2), + [472] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 2), + [474] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__expression_list_repeat1, 2), SHIFT_REPEAT(89), + [477] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [479] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expression_list, 2), + [481] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expression_list, 2), + [483] = {.entry = {.count = 1, .reusable = true}}, SHIFT(202), + [485] = {.entry = {.count = 1, .reusable = true}}, SHIFT(204), + [487] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), + [489] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), + [491] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [493] = {.entry = {.count = 1, .reusable = true}}, SHIFT(186), + [495] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__variable_assignment_varlist, 1, .production_id = 4), + [497] = {.entry = {.count = 1, .reusable = true}}, SHIFT(146), + [499] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__variable_assignment_varlist_repeat1, 2, .production_id = 22), + [501] = {.entry = {.count = 1, .reusable = true}}, SHIFT(131), + [503] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), + [505] = {.entry = {.count = 1, .reusable = true}}, SHIFT(137), + [507] = {.entry = {.count = 1, .reusable = true}}, SHIFT(133), + [509] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_statement, 2), + [511] = {.entry = {.count = 1, .reusable = true}}, SHIFT(161), + [513] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return_statement, 2), + [515] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__field_list_repeat1, 2), SHIFT_REPEAT(142), + [518] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__field_list_repeat1, 2), + [520] = {.entry = {.count = 1, .reusable = true}}, SHIFT(142), + [522] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_if_statement_repeat1, 2, .production_id = 39), + [524] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_if_statement_repeat1, 2, .production_id = 39), SHIFT_REPEAT(85), + [527] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_if_statement_repeat1, 2, .production_id = 39), + [529] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__field_list, 1), + [531] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_statement, 3), + [533] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return_statement, 3), + [535] = {.entry = {.count = 1, .reusable = true}}, SHIFT(184), + [537] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), + [539] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__block, 1), + [541] = {.entry = {.count = 1, .reusable = true}}, SHIFT(164), + [543] = {.entry = {.count = 1, .reusable = true}}, SHIFT(177), + [545] = {.entry = {.count = 1, .reusable = true}}, SHIFT(209), + [547] = {.entry = {.count = 1, .reusable = true}}, SHIFT(144), + [549] = {.entry = {.count = 1, .reusable = false}}, SHIFT(110), + [551] = {.entry = {.count = 1, .reusable = false}}, SHIFT(191), + [553] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__block, 2), + [555] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__block, 2), + [557] = {.entry = {.count = 1, .reusable = true}}, SHIFT(167), + [559] = {.entry = {.count = 1, .reusable = true}}, SHIFT(227), + [561] = {.entry = {.count = 1, .reusable = true}}, SHIFT(225), + [563] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_name, 1), + [565] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_elseif_statement, 4, .production_id = 36), + [567] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_elseif_statement, 4, .production_id = 36), + [569] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_name_dot_index_expression, 3, .production_id = 20), + [571] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_method_index_expression, 3, .production_id = 21), + [573] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__variable_assignment_varlist_repeat1, 2, .production_id = 23), + [575] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__variable_assignment_varlist_repeat1, 2, .production_id = 23), SHIFT_REPEAT(146), + [578] = {.entry = {.count = 1, .reusable = true}}, SHIFT(190), + [580] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__parameter_list, 1, .production_id = 4), + [582] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__variable_assignment_varlist, 2, .production_id = 11), + [584] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_if_statement_repeat1, 1, .production_id = 28), + [586] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_if_statement_repeat1, 1, .production_id = 28), + [588] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), + [590] = {.entry = {.count = 1, .reusable = true}}, SHIFT(189), + [592] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__parameter_list, 2, .production_id = 11), + [594] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_name_prefix_expression, 1, .production_id = 7), + [596] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_name_prefix_expression, 1), + [598] = {.entry = {.count = 1, .reusable = true}}, SHIFT(208), + [600] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [602] = {.entry = {.count = 1, .reusable = true}}, SHIFT(212), + [604] = {.entry = {.count = 1, .reusable = true}}, SHIFT(233), + [606] = {.entry = {.count = 1, .reusable = true}}, SHIFT(218), + [608] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), + [610] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), + [612] = {.entry = {.count = 1, .reusable = true}}, SHIFT(220), + [614] = {.entry = {.count = 1, .reusable = true}}, SHIFT(210), + [616] = {.entry = {.count = 1, .reusable = true}}, SHIFT(172), + [618] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [620] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), + [622] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), + [624] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), + [626] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [628] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), + [630] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_else_statement, 2, .production_id = 16), + [632] = {.entry = {.count = 1, .reusable = true}}, SHIFT(132), + [634] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_name, 1, .production_id = 8), + [636] = {.entry = {.count = 1, .reusable = true}}, SHIFT(130), + [638] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), + [640] = {.entry = {.count = 1, .reusable = true}}, SHIFT(115), + [642] = {.entry = {.count = 1, .reusable = true}}, SHIFT(175), + [644] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [646] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [648] = {.entry = {.count = 1, .reusable = true}}, SHIFT(143), + [650] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), + [652] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__parameter_list, 1), + [654] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__parameter_list, 3, .production_id = 4), + [656] = {.entry = {.count = 1, .reusable = true}}, SHIFT(231), + [658] = {.entry = {.count = 1, .reusable = false}}, SHIFT(214), + [660] = {.entry = {.count = 1, .reusable = false}}, SHIFT(232), + [662] = {.entry = {.count = 1, .reusable = true}}, SHIFT(124), + [664] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_chunk, 3), + [666] = {.entry = {.count = 1, .reusable = true}}, SHIFT(123), + [668] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), + [670] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [672] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__parameter_list, 4, .production_id = 11), + [674] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), + [676] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_name_method_index_expression, 3, .production_id = 21), + [678] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [680] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_generic_clause, 3, .production_id = 30), + [682] = {.entry = {.count = 1, .reusable = true}}, SHIFT(222), + [684] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), + [686] = {.entry = {.count = 1, .reusable = true}}, SHIFT(174), + [688] = {.entry = {.count = 1, .reusable = true}}, SHIFT(221), + [690] = {.entry = {.count = 1, .reusable = true}}, SHIFT(139), + [692] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 3, .production_id = 12), + [694] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 2, .production_id = 6), + [696] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 2, .production_id = 5), +}; + +#ifdef __cplusplus +extern "C" { +#endif +void *tree_sitter_lua_external_scanner_create(void); +void tree_sitter_lua_external_scanner_destroy(void *); +bool tree_sitter_lua_external_scanner_scan(void *, TSLexer *, const bool *); +unsigned tree_sitter_lua_external_scanner_serialize(void *, char *); +void tree_sitter_lua_external_scanner_deserialize(void *, const char *, unsigned); + +#ifdef _WIN32 +#define extern __declspec(dllexport) +#endif + +extern const TSLanguage *tree_sitter_lua(void) { + static const TSLanguage language = { + .version = LANGUAGE_VERSION, + .symbol_count = SYMBOL_COUNT, + .alias_count = ALIAS_COUNT, + .token_count = TOKEN_COUNT, + .external_token_count = EXTERNAL_TOKEN_COUNT, + .state_count = STATE_COUNT, + .large_state_count = LARGE_STATE_COUNT, + .production_id_count = PRODUCTION_ID_COUNT, + .field_count = FIELD_COUNT, + .max_alias_sequence_length = MAX_ALIAS_SEQUENCE_LENGTH, + .parse_table = &ts_parse_table[0][0], + .small_parse_table = ts_small_parse_table, + .small_parse_table_map = ts_small_parse_table_map, + .parse_actions = ts_parse_actions, + .symbol_names = ts_symbol_names, + .field_names = ts_field_names, + .field_map_slices = ts_field_map_slices, + .field_map_entries = ts_field_map_entries, + .symbol_metadata = ts_symbol_metadata, + .public_symbol_map = ts_symbol_map, + .alias_map = ts_non_terminal_alias_map, + .alias_sequences = &ts_alias_sequences[0][0], + .lex_modes = ts_lex_modes, + .lex_fn = ts_lex, + .keyword_lex_fn = ts_lex_keywords, + .keyword_capture_token = sym_identifier, + .external_scanner = { + &ts_external_scanner_states[0][0], + ts_external_scanner_symbol_map, + tree_sitter_lua_external_scanner_create, + tree_sitter_lua_external_scanner_destroy, + tree_sitter_lua_external_scanner_scan, + tree_sitter_lua_external_scanner_serialize, + tree_sitter_lua_external_scanner_deserialize, + }, + }; + return &language; +} +#ifdef __cplusplus +} +#endif diff --git a/tree-sitter-lua/src/scanner.c b/tree-sitter-lua/src/scanner.c new file mode 100644 index 0000000..b9890c4 --- /dev/null +++ b/tree-sitter-lua/src/scanner.c @@ -0,0 +1,229 @@ +#include +#include +#include + +enum TokenType { + BLOCK_COMMENT_START, + BLOCK_COMMENT_CONTENT, + BLOCK_COMMENT_END, + + STRING_START, + STRING_CONTENT, + STRING_END, +}; + +static inline void consume(TSLexer *lexer) { lexer->advance(lexer, false); } +static inline void skip(TSLexer *lexer) { lexer->advance(lexer, true); } + +static inline bool consume_char(char c, TSLexer *lexer) { + if (lexer->lookahead != c) { + return false; + } + + consume(lexer); + return true; +} + +static inline uint8_t consume_and_count_char(char c, TSLexer *lexer) { + uint8_t count = 0; + while (lexer->lookahead == c) { + ++count; + consume(lexer); + } + return count; +} + +static inline void skip_whitespaces(TSLexer *lexer) { + while (iswspace(lexer->lookahead)) { + skip(lexer); + } +} + +void *tree_sitter_lua_external_scanner_create() { return NULL; } +void tree_sitter_lua_external_scanner_destroy(void *payload) {} + +char ending_char = 0; +uint8_t level_count = 0; + +static inline void reset_state() { + ending_char = 0; + level_count = 0; +} + +unsigned tree_sitter_lua_external_scanner_serialize(void *payload, char *buffer) { + buffer[0] = ending_char; + buffer[1] = level_count; + return 2; +} + +void tree_sitter_lua_external_scanner_deserialize(void *payload, const char *buffer, unsigned length) { + if (length == 0) return; + ending_char = buffer[0]; + if (length == 1) return; + level_count = buffer[1]; +} + +static bool scan_block_start(TSLexer *lexer) { + if (consume_char('[', lexer)) { + uint8_t level = consume_and_count_char('=', lexer); + + if (consume_char('[', lexer)) { + level_count = level; + return true; + } + } + + return false; +} + +static bool scan_block_end(TSLexer *lexer) { + if (consume_char(']', lexer)) { + uint8_t level = consume_and_count_char('=', lexer); + + if (level_count == level && consume_char(']', lexer)) { + return true; + } + } + + return false; +} + +static bool scan_block_content(TSLexer *lexer) { + while (lexer->lookahead != 0) { + if (lexer->lookahead == ']') { + lexer->mark_end(lexer); + + if (scan_block_end(lexer)) { + return true; + } + } else { + consume(lexer); + } + } + + return false; +} + +static bool scan_comment_start(TSLexer *lexer) { + if (consume_char('-', lexer) && consume_char('-', lexer)) { + lexer->mark_end(lexer); + + if (scan_block_start(lexer)) { + lexer->mark_end(lexer); + lexer->result_symbol = BLOCK_COMMENT_START; + return true; + } + } + + return false; +} + +static bool scan_comment_content(TSLexer *lexer) { + if (ending_char == 0) { // block comment + if (scan_block_content(lexer)) { + lexer->result_symbol = BLOCK_COMMENT_CONTENT; + return true; + } + + return false; + } + + while (lexer->lookahead != 0) { + if (lexer->lookahead == ending_char) { + reset_state(); + lexer->result_symbol = BLOCK_COMMENT_CONTENT; + return true; + } + + consume(lexer); + } + + return false; +} + +static bool scan_string_start(TSLexer *lexer) { + if (lexer->lookahead == '"' || lexer->lookahead == '\'') { + ending_char = lexer->lookahead; + consume(lexer); + return true; + } + + if (scan_block_start(lexer)) { + return true; + } + + return false; +} + +static bool scan_string_end(TSLexer *lexer) { + if (ending_char == 0) { // block string + return scan_block_end(lexer); + } + + if (consume_char(ending_char, lexer)) { + return true; + } + + return false; +} + +static bool scan_string_content(TSLexer *lexer) { + if (ending_char == 0) { // block string + return scan_block_content(lexer); + } + + while (lexer->lookahead != '\n' && lexer->lookahead != 0 && lexer->lookahead != ending_char) { + if (consume_char('\\', lexer) && consume_char('z', lexer)) { + while (iswspace(lexer->lookahead)) { + consume(lexer); + } + continue; + }; + + if (lexer->lookahead == 0) { + return true; + } + + consume(lexer); + } + + return true; +} + +bool tree_sitter_lua_external_scanner_scan(void *payload, TSLexer *lexer, const bool *valid_symbols) { + if (valid_symbols[STRING_END] && scan_string_end(lexer)) { + reset_state(); + lexer->result_symbol = STRING_END; + return true; + } + + if (valid_symbols[STRING_CONTENT] && scan_string_content(lexer)) { + lexer->result_symbol = STRING_CONTENT; + return true; + } + + if (valid_symbols[BLOCK_COMMENT_END] && ending_char == 0 && scan_block_end(lexer)) { + reset_state(); + lexer->result_symbol = BLOCK_COMMENT_END; + return true; + } + + if (valid_symbols[BLOCK_COMMENT_CONTENT] && scan_comment_content(lexer)) { + return true; + } + + skip_whitespaces(lexer); + + if (valid_symbols[STRING_START] && scan_string_start(lexer)) { + lexer->result_symbol = STRING_START; + return true; + } + + if (valid_symbols[BLOCK_COMMENT_START]) { + if (scan_comment_start(lexer)) { + return true; + } + } + + return false; +} diff --git a/tree-sitter-lua/src/tree_sitter/parser.h b/tree-sitter-lua/src/tree_sitter/parser.h new file mode 100644 index 0000000..2b14ac1 --- /dev/null +++ b/tree-sitter-lua/src/tree_sitter/parser.h @@ -0,0 +1,224 @@ +#ifndef TREE_SITTER_PARSER_H_ +#define TREE_SITTER_PARSER_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +#define ts_builtin_sym_error ((TSSymbol)-1) +#define ts_builtin_sym_end 0 +#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024 + +typedef uint16_t TSStateId; + +#ifndef TREE_SITTER_API_H_ +typedef uint16_t TSSymbol; +typedef uint16_t TSFieldId; +typedef struct TSLanguage TSLanguage; +#endif + +typedef struct { + TSFieldId field_id; + uint8_t child_index; + bool inherited; +} TSFieldMapEntry; + +typedef struct { + uint16_t index; + uint16_t length; +} TSFieldMapSlice; + +typedef struct { + bool visible; + bool named; + bool supertype; +} TSSymbolMetadata; + +typedef struct TSLexer TSLexer; + +struct TSLexer { + int32_t lookahead; + TSSymbol result_symbol; + void (*advance)(TSLexer *, bool); + void (*mark_end)(TSLexer *); + uint32_t (*get_column)(TSLexer *); + bool (*is_at_included_range_start)(const TSLexer *); + bool (*eof)(const TSLexer *); +}; + +typedef enum { + TSParseActionTypeShift, + TSParseActionTypeReduce, + TSParseActionTypeAccept, + TSParseActionTypeRecover, +} TSParseActionType; + +typedef union { + struct { + uint8_t type; + TSStateId state; + bool extra; + bool repetition; + } shift; + struct { + uint8_t type; + uint8_t child_count; + TSSymbol symbol; + int16_t dynamic_precedence; + uint16_t production_id; + } reduce; + uint8_t type; +} TSParseAction; + +typedef struct { + uint16_t lex_state; + uint16_t external_lex_state; +} TSLexMode; + +typedef union { + TSParseAction action; + struct { + uint8_t count; + bool reusable; + } entry; +} TSParseActionEntry; + +struct TSLanguage { + uint32_t version; + uint32_t symbol_count; + uint32_t alias_count; + uint32_t token_count; + uint32_t external_token_count; + uint32_t state_count; + uint32_t large_state_count; + uint32_t production_id_count; + uint32_t field_count; + uint16_t max_alias_sequence_length; + const uint16_t *parse_table; + const uint16_t *small_parse_table; + const uint32_t *small_parse_table_map; + const TSParseActionEntry *parse_actions; + const char * const *symbol_names; + const char * const *field_names; + const TSFieldMapSlice *field_map_slices; + const TSFieldMapEntry *field_map_entries; + const TSSymbolMetadata *symbol_metadata; + const TSSymbol *public_symbol_map; + const uint16_t *alias_map; + const TSSymbol *alias_sequences; + const TSLexMode *lex_modes; + bool (*lex_fn)(TSLexer *, TSStateId); + bool (*keyword_lex_fn)(TSLexer *, TSStateId); + TSSymbol keyword_capture_token; + struct { + const bool *states; + const TSSymbol *symbol_map; + void *(*create)(void); + void (*destroy)(void *); + bool (*scan)(void *, TSLexer *, const bool *symbol_whitelist); + unsigned (*serialize)(void *, char *); + void (*deserialize)(void *, const char *, unsigned); + } external_scanner; + const TSStateId *primary_state_ids; +}; + +/* + * Lexer Macros + */ + +#define START_LEXER() \ + bool result = false; \ + bool skip = false; \ + bool eof = false; \ + int32_t lookahead; \ + goto start; \ + next_state: \ + lexer->advance(lexer, skip); \ + start: \ + skip = false; \ + lookahead = lexer->lookahead; + +#define ADVANCE(state_value) \ + { \ + state = state_value; \ + goto next_state; \ + } + +#define SKIP(state_value) \ + { \ + skip = true; \ + state = state_value; \ + goto next_state; \ + } + +#define ACCEPT_TOKEN(symbol_value) \ + result = true; \ + lexer->result_symbol = symbol_value; \ + lexer->mark_end(lexer); + +#define END_STATE() return result; + +/* + * Parse Table Macros + */ + +#define SMALL_STATE(id) id - LARGE_STATE_COUNT + +#define STATE(id) id + +#define ACTIONS(id) id + +#define SHIFT(state_value) \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = state_value \ + } \ + }} + +#define SHIFT_REPEAT(state_value) \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = state_value, \ + .repetition = true \ + } \ + }} + +#define SHIFT_EXTRA() \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .extra = true \ + } \ + }} + +#define REDUCE(symbol_val, child_count_val, ...) \ + {{ \ + .reduce = { \ + .type = TSParseActionTypeReduce, \ + .symbol = symbol_val, \ + .child_count = child_count_val, \ + __VA_ARGS__ \ + }, \ + }} + +#define RECOVER() \ + {{ \ + .type = TSParseActionTypeRecover \ + }} + +#define ACCEPT_INPUT() \ + {{ \ + .type = TSParseActionTypeAccept \ + }} + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_PARSER_H_ diff --git a/tree-sitter-lua/test/corpus/chunk.txt b/tree-sitter-lua/test/corpus/chunk.txt new file mode 100644 index 0000000..1a8ed73 --- /dev/null +++ b/tree-sitter-lua/test/corpus/chunk.txt @@ -0,0 +1,31 @@ +================================================================================ +chunk +================================================================================ + +-------------------------------------------------------------------------------- + +(chunk) + +================================================================================ +hash_bang_line +================================================================================ + +#!/usr/bin/env lua + +-------------------------------------------------------------------------------- + +(chunk + (hash_bang_line)) + +================================================================================ +return_statement +================================================================================ + +return 42 + +-------------------------------------------------------------------------------- + +(chunk + (return_statement + (expression_list + (number)))) diff --git a/tree-sitter-lua/test/corpus/comments.txt b/tree-sitter-lua/test/corpus/comments.txt new file mode 100644 index 0000000..9b9c17c --- /dev/null +++ b/tree-sitter-lua/test/corpus/comments.txt @@ -0,0 +1,80 @@ +================================================================================ +comment +================================================================================ + +-- +-- single-line comment, below an empty single-line comment + +--[[ +print("block comment") +--]] + +--[[ +print("block comment") +]] + +-- [[ +print("not block comment") +--]] + +--[=[[print("level 1 block comment")]]=] + +--[=[ + [print("level 1 block comment")] +]=] + +--[=[ + [print("level 1 block comment") +]=] + +--[=[ + print("level 1 block comment")] +]=] + +--[=[ + [[print("level 1 block comment") +]=] + +--[=[ + print("level 1 block comment")]] +]=] + +--[==[ +print("level 2 block comment") +-- ]==] + +--[==[ +print("level 2 block comment") +]==] + +-- [==[ +print("not level 2 block comment") +--]==] + +-------------------------------------------------------------------------------- + +(chunk + (comment) + (comment) + (comment) + (comment) + (comment) + (function_call + name: (identifier) + arguments: (arguments + (string))) + (comment) + (comment) + (comment) + (comment) + (comment) + (comment) + (comment) + (comment) + (comment) + (comment) + (function_call + name: (identifier) + arguments: (arguments + (string))) + (comment)) diff --git a/tree-sitter-lua/test/corpus/expressions.txt b/tree-sitter-lua/test/corpus/expressions.txt new file mode 100644 index 0000000..606510b --- /dev/null +++ b/tree-sitter-lua/test/corpus/expressions.txt @@ -0,0 +1,591 @@ +================================================================================ +nil +================================================================================ + +exp(nil) + +-------------------------------------------------------------------------------- + +(chunk + (function_call + name: (identifier) + arguments: (arguments + (nil)))) + +================================================================================ +false +================================================================================ + +exp(false) + +-------------------------------------------------------------------------------- + +(chunk + (function_call + name: (identifier) + arguments: (arguments + (false)))) + +================================================================================ +true +================================================================================ + +exp(true) + +-------------------------------------------------------------------------------- + +(chunk + (function_call + name: (identifier) + arguments: (arguments + (true)))) + +================================================================================ +number +================================================================================ + +exp( + 3, + 345, + 0xff, + 0xBEBADA, + 3.0, + 3.1416, + 314.16e-2, + 0.31416E1, + 34e1, + 0x0.1E, + 0xA23p-4, + 0X1.921FB54442D18P+1 +) + +-------------------------------------------------------------------------------- + +(chunk + (function_call + name: (identifier) + arguments: (arguments + (number) + (number) + (number) + (number) + (number) + (number) + (number) + (number) + (number) + (number) + (number) + (number)))) + +================================================================================ +string +================================================================================ + +exp( + "string", + 'string', + "a\ + b", + 'a\z', + 'a\z + ', + 'a\z + b', + "'a\z\ + b'", + "c", + 'c', + "0", + [[ string ]], + [[ + string + string + ]], + [=[ + string + string + ]=], + [=[[string]]=], + [=[ + [string] + ]=], + [=[ + [string + ]=], + [=[ + string] + ]=], + [=[ + [[string + ]=], + [=[ + string]] + ]=] +) + + +-------------------------------------------------------------------------------- + +(chunk + (function_call + name: (identifier) + arguments: (arguments + (string) + (string) + (string) + (string) + (string) + (string) + (string) + (string) + (string) + (string) + (string) + (string) + (string) + (string) + (string) + (string) + (string) + (string) + (string)))) + +================================================================================ +vararg_expression +================================================================================ + +exp(...) + +-------------------------------------------------------------------------------- + +(chunk + (function_call + name: (identifier) + arguments: (arguments + (vararg_expression)))) + +================================================================================ +function_definition +================================================================================ + +f1 = function() end + +f2 = function() return end + +f3 = function(...) + return ... +end + +f4 = function(a1, ...) + print(...) + return a1 +end + +-------------------------------------------------------------------------------- + +(chunk + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (function_definition + parameters: (parameters)))) + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (function_definition + parameters: (parameters) + body: (block + (return_statement))))) + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (function_definition + parameters: (parameters + (vararg_expression)) + body: (block + (return_statement + (expression_list + (vararg_expression))))))) + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (function_definition + parameters: (parameters + name: (identifier) + (vararg_expression)) + body: (block + (function_call + name: (identifier) + arguments: (arguments + (vararg_expression))) + (return_statement + (expression_list + (identifier)))))))) + +================================================================================ +variable ::: identifier +================================================================================ + +v1 = n1 + +v2, v3 = n2, n3 + +-------------------------------------------------------------------------------- + +(chunk + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (identifier))) + (assignment_statement + (variable_list + name: (identifier) + name: (identifier)) + (expression_list + value: (identifier) + value: (identifier)))) + +================================================================================ +variable ::: bracket_index_expression +================================================================================ + +v1 = tbl[k1] + +v2, v3[v] = tbl[k1]["k2"] + +v4 = tbk[getK1()][getK2()] + +-------------------------------------------------------------------------------- + +(chunk + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (bracket_index_expression + table: (identifier) + field: (identifier)))) + (assignment_statement + (variable_list + name: (identifier) + name: (bracket_index_expression + table: (identifier) + field: (identifier))) + (expression_list + value: (bracket_index_expression + table: (bracket_index_expression + table: (identifier) + field: (identifier)) + field: (string)))) + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (bracket_index_expression + table: (bracket_index_expression + table: (identifier) + field: (function_call + name: (identifier) + arguments: (arguments))) + field: (function_call + name: (identifier) + arguments: (arguments)))))) + +================================================================================ +variable ::: dot_index_expression +================================================================================ + +v1 = tbl.k1 + +v2 = tbl.k1.k2 + +-------------------------------------------------------------------------------- + +(chunk + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (dot_index_expression + table: (identifier) + field: (identifier)))) + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (dot_index_expression + table: (dot_index_expression + table: (identifier) + field: (identifier)) + field: (identifier))))) + +================================================================================ +function_call ::: bracket_index_expression | dot_index_expression +================================================================================ + +v1 = tbl[k1].k2(a1, "a2", a3()) + +v2 = tbl[k1] { f1 = true } + +v3 = tbl[k1] "a1" + +-------------------------------------------------------------------------------- + +(chunk + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (function_call + name: (dot_index_expression + table: (bracket_index_expression + table: (identifier) + field: (identifier)) + field: (identifier)) + arguments: (arguments + (identifier) + (string) + (function_call + name: (identifier) + arguments: (arguments)))))) + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (function_call + name: (bracket_index_expression + table: (identifier) + field: (identifier)) + arguments: (arguments + (table_constructor + (field + name: (identifier) + value: (true))))))) + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (function_call + name: (bracket_index_expression + table: (identifier) + field: (identifier)) + arguments: (arguments + (string)))))) + +================================================================================ +function_call ::: method_index_expression +================================================================================ + +tbl.k1:m1(a1, "a2") + +tbl[k1]:m1 { f1, "f2" } + +tbl:m1 "a1" + +-------------------------------------------------------------------------------- + +(chunk + (function_call + name: (method_index_expression + table: (dot_index_expression + table: (identifier) + field: (identifier)) + method: (identifier)) + arguments: (arguments + (identifier) + (string))) + (function_call + name: (method_index_expression + table: (bracket_index_expression + table: (identifier) + field: (identifier)) + method: (identifier)) + arguments: (arguments + (table_constructor + (field + value: (identifier)) + (field + value: (string))))) + (function_call + name: (method_index_expression + table: (identifier) + method: (identifier)) + arguments: (arguments + (string)))) + +================================================================================ +parenthesized_expression +================================================================================ + +v = ( true ) + +v = ( ( false ) ) + +-------------------------------------------------------------------------------- + +(chunk + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (parenthesized_expression + (true)))) + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (parenthesized_expression + (parenthesized_expression + (false)))))) + +================================================================================ +table_constructor +================================================================================ + +tbl1 = { + ["k1"] = { + ['k2'] = true, + k3 = false + } +} + +local tbl2 = { + k1 = { + { 'v1', "v2" } + } +} + +local tbl3 = { "v1", k1 = "v2" } + +-------------------------------------------------------------------------------- + +(chunk + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (table_constructor + (field + name: (string) + value: (table_constructor + (field + name: (string) + value: (true)) + (field + name: (identifier) + value: (false))))))) + local_declaration: (variable_declaration + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (table_constructor + (field + name: (identifier) + value: (table_constructor + (field + value: (table_constructor + (field + value: (string)) + (field + value: (string)))))))))) + local_declaration: (variable_declaration + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (table_constructor + (field + value: (string)) + (field + name: (identifier) + value: (string))))))) + +================================================================================ +binary_expression +================================================================================ + +a = i + j * 3 - k % 5 + +b = i + j % 3 ^ 2 + +c = i * 2 ^ j + +-------------------------------------------------------------------------------- + +(chunk + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (binary_expression + left: (binary_expression + left: (identifier) + right: (binary_expression + left: (identifier) + right: (number))) + right: (binary_expression + left: (identifier) + right: (number))))) + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (binary_expression + left: (identifier) + right: (binary_expression + left: (identifier) + right: (binary_expression + left: (number) + right: (number)))))) + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (binary_expression + left: (identifier) + right: (binary_expression + left: (number) + right: (identifier)))))) + +================================================================================ +unary_expression +================================================================================ + +v1 = #l + +v2 = -n + +v3 = not c1 and r1 or r2 + +-------------------------------------------------------------------------------- + +(chunk + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (unary_expression + operand: (identifier)))) + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (unary_expression + operand: (identifier)))) + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (binary_expression + left: (binary_expression + left: (unary_expression + operand: (identifier)) + right: (identifier)) + right: (identifier))))) diff --git a/tree-sitter-lua/test/corpus/statements.txt b/tree-sitter-lua/test/corpus/statements.txt new file mode 100644 index 0000000..0327788 --- /dev/null +++ b/tree-sitter-lua/test/corpus/statements.txt @@ -0,0 +1,459 @@ +================================================================================ +empty_statement +================================================================================ + +; +;; + +-------------------------------------------------------------------------------- + +(chunk + (empty_statement) + (empty_statement) + (empty_statement)) + +================================================================================ +assignment_statement +================================================================================ + +i = 1 +j, tbl[k()] = 2, i + 1 +x, y = y, x + +-------------------------------------------------------------------------------- + +(chunk + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (number))) + (assignment_statement + (variable_list + name: (identifier) + name: (bracket_index_expression + table: (identifier) + field: (function_call + name: (identifier) + arguments: (arguments)))) + (expression_list + value: (number) + value: (binary_expression + left: (identifier) + right: (number)))) + (assignment_statement + (variable_list + name: (identifier) + name: (identifier)) + (expression_list + value: (identifier) + value: (identifier)))) + +================================================================================ +function_call +================================================================================ + +f1() + +tbl.f2() + +tbl["f2"]() + +tbl.k1:f3() + +f4(a1)("a2") { a3 = "a3" } + +-------------------------------------------------------------------------------- + +(chunk + (function_call + name: (identifier) + arguments: (arguments)) + (function_call + name: (dot_index_expression + table: (identifier) + field: (identifier)) + arguments: (arguments)) + (function_call + name: (bracket_index_expression + table: (identifier) + field: (string)) + arguments: (arguments)) + (function_call + name: (method_index_expression + table: (dot_index_expression + table: (identifier) + field: (identifier)) + method: (identifier)) + arguments: (arguments)) + (function_call + name: (function_call + name: (function_call + name: (identifier) + arguments: (arguments + (identifier))) + arguments: (arguments + (string))) + arguments: (arguments + (table_constructor + (field + name: (identifier) + value: (string)))))) + +================================================================================ +label_statement +================================================================================ + +:: label_name :: + +-------------------------------------------------------------------------------- + +(chunk + (label_statement + (identifier))) + +================================================================================ +break_statement +================================================================================ + +for k, v in pairs(kv) do + if not v then + break + end +end + +-------------------------------------------------------------------------------- + +(chunk + (for_statement + clause: (for_generic_clause + (variable_list + name: (identifier) + name: (identifier)) + (expression_list + (function_call + name: (identifier) + arguments: (arguments + (identifier))))) + body: (block + (if_statement + condition: (unary_expression + operand: (identifier)) + consequence: (block + (break_statement)))))) + +================================================================================ +goto_statement +================================================================================ + +goto label_name + +-------------------------------------------------------------------------------- + +(chunk + (goto_statement + (identifier))) + +================================================================================ +do_statement +================================================================================ + +do + f1() + return f2() +end + +do end + +-------------------------------------------------------------------------------- + +(chunk + (do_statement + body: (block + (function_call + name: (identifier) + arguments: (arguments)) + (return_statement + (expression_list + (function_call + name: (identifier) + arguments: (arguments)))))) + (do_statement)) + +================================================================================ +while_statement +================================================================================ + +while i < 9 do + i = i + 1 +end + +while false do end + +-------------------------------------------------------------------------------- + +(chunk + (while_statement + condition: (binary_expression + left: (identifier) + right: (number)) + body: (block + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (binary_expression + left: (identifier) + right: (number)))))) + (while_statement + condition: (false))) + +================================================================================ +repeat_statement +================================================================================ + +repeat + f1() + i = i - 1 +until i == 0 + +repeat until false + +-------------------------------------------------------------------------------- + +(chunk + (repeat_statement + body: (block + (function_call + name: (identifier) + arguments: (arguments)) + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (binary_expression + left: (identifier) + right: (number))))) + condition: (binary_expression + left: (identifier) + right: (number))) + (repeat_statement + condition: (false))) + +================================================================================ +if_statement +================================================================================ + +if num % 2 == 0 then + print("even") +elseif num % 2 ~= 0 then + print("odd") +else + error("!") +end + +if c1 then end + +if c1 then else end + +if c1 then elseif c2 then else end + +-------------------------------------------------------------------------------- + +(chunk + (if_statement + condition: (binary_expression + left: (binary_expression + left: (identifier) + right: (number)) + right: (number)) + consequence: (block + (function_call + name: (identifier) + arguments: (arguments + (string)))) + alternative: (elseif_statement + condition: (binary_expression + left: (binary_expression + left: (identifier) + right: (number)) + right: (number)) + consequence: (block + (function_call + name: (identifier) + arguments: (arguments + (string))))) + alternative: (else_statement + body: (block + (function_call + name: (identifier) + arguments: (arguments + (string)))))) + (if_statement + condition: (identifier)) + (if_statement + condition: (identifier) + alternative: (else_statement)) + (if_statement + condition: (identifier) + alternative: (elseif_statement + condition: (identifier)) + alternative: (else_statement))) + +================================================================================ +for_statement ::: for_generic_clause +================================================================================ + +for k, v in pairs(kv) do + print(k, v) +end + +for i in ipairs(iv) do end + +-------------------------------------------------------------------------------- + +(chunk + (for_statement + clause: (for_generic_clause + (variable_list + name: (identifier) + name: (identifier)) + (expression_list + (function_call + name: (identifier) + arguments: (arguments + (identifier))))) + body: (block + (function_call + name: (identifier) + arguments: (arguments + (identifier) + (identifier))))) + (for_statement + clause: (for_generic_clause + (variable_list + name: (identifier)) + (expression_list + (function_call + name: (identifier) + arguments: (arguments + (identifier))))))) + +================================================================================ +for_statement ::: for_numeric_clause +================================================================================ + +for n = 1, 10 do + print(n) +end + +for n = 1, 10, 2 do end + +-------------------------------------------------------------------------------- + +(chunk + (for_statement + clause: (for_numeric_clause + name: (identifier) + start: (number) + end: (number)) + body: (block + (function_call + name: (identifier) + arguments: (arguments + (identifier))))) + (for_statement + clause: (for_numeric_clause + name: (identifier) + start: (number) + end: (number) + step: (number)))) + +================================================================================ +function_declaration +================================================================================ + +function tbl.f1() end + +function tbl:f2() end + +function tbl.k1:f3() end + +function f4() + print('f4') +end + +local function f5() end + +-------------------------------------------------------------------------------- + +(chunk + (function_declaration + name: (dot_index_expression + table: (identifier) + field: (identifier)) + parameters: (parameters)) + (function_declaration + name: (method_index_expression + table: (identifier) + method: (identifier)) + parameters: (parameters)) + (function_declaration + name: (method_index_expression + table: (dot_index_expression + table: (identifier) + field: (identifier)) + method: (identifier)) + parameters: (parameters)) + (function_declaration + name: (identifier) + parameters: (parameters) + body: (block + (function_call + name: (identifier) + arguments: (arguments + (string))))) + local_declaration: (function_declaration + name: (identifier) + parameters: (parameters))) + +================================================================================ +variable_declaration +================================================================================ + +local v1 = 1 +local v2, v3 = 2, 3 + +local v4, v4 = f1(), tbl:f2() + +-------------------------------------------------------------------------------- + +(chunk + local_declaration: (variable_declaration + (assignment_statement + (variable_list + name: (identifier)) + (expression_list + value: (number)))) + local_declaration: (variable_declaration + (assignment_statement + (variable_list + name: (identifier) + name: (identifier)) + (expression_list + value: (number) + value: (number)))) + local_declaration: (variable_declaration + (assignment_statement + (variable_list + name: (identifier) + name: (identifier)) + (expression_list + value: (function_call + name: (identifier) + arguments: (arguments)) + value: (function_call + name: (method_index_expression + table: (identifier) + method: (identifier)) + arguments: (arguments)))))) From a1565ce15c08a62db146f922a209f748a8d955c9 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Sun, 7 Aug 2022 12:31:41 +0700 Subject: [PATCH 1223/1541] fix impatient not found on bootstrap --- rplugin.vim | 15 - site/pack/packer/opt/Comment.nvim | 1 - site/pack/packer/opt/LuaSnip | 1 - site/pack/packer/opt/cmp-buffer | 1 - site/pack/packer/opt/cmp-nvim-lsp | 1 - site/pack/packer/opt/cmp-nvim-lua | 1 - site/pack/packer/opt/cmp-path | 1 - site/pack/packer/opt/cmp_luasnip | 1 - site/pack/packer/opt/extensions | 1 - site/pack/packer/opt/friendly-snippets | 1 - site/pack/packer/opt/gitsigns.nvim | 1 - site/pack/packer/opt/impatient.nvim | 1 - site/pack/packer/opt/indent-blankline.nvim | 1 - site/pack/packer/opt/mason.nvim | 1 - site/pack/packer/opt/nvim-autopairs | 1 - site/pack/packer/opt/nvim-cmp | 1 - site/pack/packer/opt/nvim-colorizer.lua | 1 - site/pack/packer/opt/nvim-lspconfig | 1 - site/pack/packer/opt/nvim-tree.lua | 1 - site/pack/packer/opt/nvim-treesitter | 1 - site/pack/packer/opt/nvim-web-devicons | 1 - site/pack/packer/opt/nvterm | 1 - site/pack/packer/opt/packer.nvim | 1 - site/pack/packer/opt/plenary.nvim | 1 - site/pack/packer/opt/telescope.nvim | 1 - site/pack/packer/opt/ui | 1 - site/pack/packer/start/base46 | 1 - tree-sitter-lua/.github/workflows/ci.yml | 22 - tree-sitter-lua/.gitignore | 11 - tree-sitter-lua/.prettierignore | 2 - tree-sitter-lua/.prettierrc.json | 3 - tree-sitter-lua/Cargo.toml | 29 - tree-sitter-lua/LICENSE.md | 21 - tree-sitter-lua/README.md | 20 - tree-sitter-lua/binding.gyp | 19 - tree-sitter-lua/bindings/node/binding.cc | 28 - tree-sitter-lua/bindings/node/index.js | 19 - tree-sitter-lua/bindings/rust/build.rs | 38 - tree-sitter-lua/bindings/rust/lib.rs | 52 - tree-sitter-lua/examples/init.lua | 3 - tree-sitter-lua/grammar.js | 504 - tree-sitter-lua/package.json | 46 - tree-sitter-lua/script/known_failures.txt | 0 tree-sitter-lua/script/parse-examples | 51 - tree-sitter-lua/script/release.sh | 33 - tree-sitter-lua/src/grammar.json | 2834 ----- tree-sitter-lua/src/node-types.json | 1244 -- tree-sitter-lua/src/parser.c | 10837 ------------------ tree-sitter-lua/src/scanner.c | 229 - tree-sitter-lua/src/tree_sitter/parser.h | 224 - tree-sitter-lua/test/corpus/chunk.txt | 31 - tree-sitter-lua/test/corpus/comments.txt | 80 - tree-sitter-lua/test/corpus/expressions.txt | 591 - tree-sitter-lua/test/corpus/statements.txt | 459 - 54 files changed, 17471 deletions(-) delete mode 100644 rplugin.vim delete mode 160000 site/pack/packer/opt/Comment.nvim delete mode 160000 site/pack/packer/opt/LuaSnip delete mode 160000 site/pack/packer/opt/cmp-buffer delete mode 160000 site/pack/packer/opt/cmp-nvim-lsp delete mode 160000 site/pack/packer/opt/cmp-nvim-lua delete mode 160000 site/pack/packer/opt/cmp-path delete mode 160000 site/pack/packer/opt/cmp_luasnip delete mode 160000 site/pack/packer/opt/extensions delete mode 160000 site/pack/packer/opt/friendly-snippets delete mode 160000 site/pack/packer/opt/gitsigns.nvim delete mode 160000 site/pack/packer/opt/impatient.nvim delete mode 160000 site/pack/packer/opt/indent-blankline.nvim delete mode 160000 site/pack/packer/opt/mason.nvim delete mode 160000 site/pack/packer/opt/nvim-autopairs delete mode 160000 site/pack/packer/opt/nvim-cmp delete mode 160000 site/pack/packer/opt/nvim-colorizer.lua delete mode 160000 site/pack/packer/opt/nvim-lspconfig delete mode 160000 site/pack/packer/opt/nvim-tree.lua delete mode 160000 site/pack/packer/opt/nvim-treesitter delete mode 160000 site/pack/packer/opt/nvim-web-devicons delete mode 160000 site/pack/packer/opt/nvterm delete mode 160000 site/pack/packer/opt/packer.nvim delete mode 160000 site/pack/packer/opt/plenary.nvim delete mode 160000 site/pack/packer/opt/telescope.nvim delete mode 160000 site/pack/packer/opt/ui delete mode 160000 site/pack/packer/start/base46 delete mode 100644 tree-sitter-lua/.github/workflows/ci.yml delete mode 100644 tree-sitter-lua/.gitignore delete mode 100644 tree-sitter-lua/.prettierignore delete mode 100644 tree-sitter-lua/.prettierrc.json delete mode 100644 tree-sitter-lua/Cargo.toml delete mode 100644 tree-sitter-lua/LICENSE.md delete mode 100644 tree-sitter-lua/README.md delete mode 100644 tree-sitter-lua/binding.gyp delete mode 100644 tree-sitter-lua/bindings/node/binding.cc delete mode 100644 tree-sitter-lua/bindings/node/index.js delete mode 100644 tree-sitter-lua/bindings/rust/build.rs delete mode 100644 tree-sitter-lua/bindings/rust/lib.rs delete mode 100644 tree-sitter-lua/examples/init.lua delete mode 100644 tree-sitter-lua/grammar.js delete mode 100644 tree-sitter-lua/package.json delete mode 100644 tree-sitter-lua/script/known_failures.txt delete mode 100755 tree-sitter-lua/script/parse-examples delete mode 100755 tree-sitter-lua/script/release.sh delete mode 100644 tree-sitter-lua/src/grammar.json delete mode 100644 tree-sitter-lua/src/node-types.json delete mode 100644 tree-sitter-lua/src/parser.c delete mode 100644 tree-sitter-lua/src/scanner.c delete mode 100644 tree-sitter-lua/src/tree_sitter/parser.h delete mode 100644 tree-sitter-lua/test/corpus/chunk.txt delete mode 100644 tree-sitter-lua/test/corpus/comments.txt delete mode 100644 tree-sitter-lua/test/corpus/expressions.txt delete mode 100644 tree-sitter-lua/test/corpus/statements.txt diff --git a/rplugin.vim b/rplugin.vim deleted file mode 100644 index 3beadb1..0000000 --- a/rplugin.vim +++ /dev/null @@ -1,15 +0,0 @@ -" perl plugins - - -" node plugins - - -" python3 plugins - - -" ruby plugins - - -" python plugins - - diff --git a/site/pack/packer/opt/Comment.nvim b/site/pack/packer/opt/Comment.nvim deleted file mode 160000 index 9b76787..0000000 --- a/site/pack/packer/opt/Comment.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9b76787e273567c0e3027304bd16ffedc751c04c diff --git a/site/pack/packer/opt/LuaSnip b/site/pack/packer/opt/LuaSnip deleted file mode 160000 index ac27343..0000000 --- a/site/pack/packer/opt/LuaSnip +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ac27343b52796a0aa1bb3db824d16e66d1def182 diff --git a/site/pack/packer/opt/cmp-buffer b/site/pack/packer/opt/cmp-buffer deleted file mode 160000 index 62fc67a..0000000 --- a/site/pack/packer/opt/cmp-buffer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 62fc67a2b0205136bc3e312664624ba2ab4a9323 diff --git a/site/pack/packer/opt/cmp-nvim-lsp b/site/pack/packer/opt/cmp-nvim-lsp deleted file mode 160000 index affe808..0000000 --- a/site/pack/packer/opt/cmp-nvim-lsp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit affe808a5c56b71630f17aa7c38e15c59fd648a8 diff --git a/site/pack/packer/opt/cmp-nvim-lua b/site/pack/packer/opt/cmp-nvim-lua deleted file mode 160000 index d276254..0000000 --- a/site/pack/packer/opt/cmp-nvim-lua +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d276254e7198ab7d00f117e88e223b4bd8c02d21 diff --git a/site/pack/packer/opt/cmp-path b/site/pack/packer/opt/cmp-path deleted file mode 160000 index 447c87c..0000000 --- a/site/pack/packer/opt/cmp-path +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 447c87cdd6e6d6a1d2488b1d43108bfa217f56e1 diff --git a/site/pack/packer/opt/cmp_luasnip b/site/pack/packer/opt/cmp_luasnip deleted file mode 160000 index a9de941..0000000 --- a/site/pack/packer/opt/cmp_luasnip +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a9de941bcbda508d0a45d28ae366bb3f08db2e36 diff --git a/site/pack/packer/opt/extensions b/site/pack/packer/opt/extensions deleted file mode 160000 index e82d9f5..0000000 --- a/site/pack/packer/opt/extensions +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e82d9f5e612ade06202591ed76ecb095e946f7f8 diff --git a/site/pack/packer/opt/friendly-snippets b/site/pack/packer/opt/friendly-snippets deleted file mode 160000 index 7339def..0000000 --- a/site/pack/packer/opt/friendly-snippets +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7339def34e46237eb7c9a893cb7d42dcb90e05e6 diff --git a/site/pack/packer/opt/gitsigns.nvim b/site/pack/packer/opt/gitsigns.nvim deleted file mode 160000 index 9c3ca02..0000000 --- a/site/pack/packer/opt/gitsigns.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9c3ca027661136a618c82275427746e481c84a4e diff --git a/site/pack/packer/opt/impatient.nvim b/site/pack/packer/opt/impatient.nvim deleted file mode 160000 index 4ccbe74..0000000 --- a/site/pack/packer/opt/impatient.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4ccbe749ce439fa25d387d459e8c339131cc5d1f diff --git a/site/pack/packer/opt/indent-blankline.nvim b/site/pack/packer/opt/indent-blankline.nvim deleted file mode 160000 index c15bbe9..0000000 --- a/site/pack/packer/opt/indent-blankline.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c15bbe9f23d88b5c0b4ca45a446e01a0a3913707 diff --git a/site/pack/packer/opt/mason.nvim b/site/pack/packer/opt/mason.nvim deleted file mode 160000 index cd1af57..0000000 --- a/site/pack/packer/opt/mason.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cd1af57253b3ac3652765e4d0f83b56802ec2a5f diff --git a/site/pack/packer/opt/nvim-autopairs b/site/pack/packer/opt/nvim-autopairs deleted file mode 160000 index ca89ab9..0000000 --- a/site/pack/packer/opt/nvim-autopairs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ca89ab9e7e42aa9279f1cdad15398d6e18ccee86 diff --git a/site/pack/packer/opt/nvim-cmp b/site/pack/packer/opt/nvim-cmp deleted file mode 160000 index 706371f..0000000 --- a/site/pack/packer/opt/nvim-cmp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 706371f1300e7c0acb98b346f80dad2dd9b5f679 diff --git a/site/pack/packer/opt/nvim-colorizer.lua b/site/pack/packer/opt/nvim-colorizer.lua deleted file mode 160000 index 8fe6ec2..0000000 --- a/site/pack/packer/opt/nvim-colorizer.lua +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8fe6ec269c6bcd19a7c2d69cb0bdcf8bb86a85fe diff --git a/site/pack/packer/opt/nvim-lspconfig b/site/pack/packer/opt/nvim-lspconfig deleted file mode 160000 index 6e047f1..0000000 --- a/site/pack/packer/opt/nvim-lspconfig +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6e047f11861bfb6ec28a6ad0138a8f0a62bb8806 diff --git a/site/pack/packer/opt/nvim-tree.lua b/site/pack/packer/opt/nvim-tree.lua deleted file mode 160000 index ff6e796..0000000 --- a/site/pack/packer/opt/nvim-tree.lua +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ff6e7966f39a897ac4d1358f4d022cfecdc88ff1 diff --git a/site/pack/packer/opt/nvim-treesitter b/site/pack/packer/opt/nvim-treesitter deleted file mode 160000 index a9a6493..0000000 --- a/site/pack/packer/opt/nvim-treesitter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a9a6493b1eeba458757903352e0d3dc4b54fd4f2 diff --git a/site/pack/packer/opt/nvim-web-devicons b/site/pack/packer/opt/nvim-web-devicons deleted file mode 160000 index 2d02a56..0000000 --- a/site/pack/packer/opt/nvim-web-devicons +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2d02a56189e2bde11edd4712fea16f08a6656944 diff --git a/site/pack/packer/opt/nvterm b/site/pack/packer/opt/nvterm deleted file mode 160000 index 1317d62..0000000 --- a/site/pack/packer/opt/nvterm +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1317d6238f089e117e3ed98b3cecc37cc4364675 diff --git a/site/pack/packer/opt/packer.nvim b/site/pack/packer/opt/packer.nvim deleted file mode 160000 index afab895..0000000 --- a/site/pack/packer/opt/packer.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit afab89594f4f702dc3368769c95b782dbdaeaf0a diff --git a/site/pack/packer/opt/plenary.nvim b/site/pack/packer/opt/plenary.nvim deleted file mode 160000 index 31807ee..0000000 --- a/site/pack/packer/opt/plenary.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 31807eef4ed574854b8a53ae40ea3292033a78ea diff --git a/site/pack/packer/opt/telescope.nvim b/site/pack/packer/opt/telescope.nvim deleted file mode 160000 index 4725867..0000000 --- a/site/pack/packer/opt/telescope.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4725867ec66b9a0f5e5ad95a1fd94c2f97fa2d2c diff --git a/site/pack/packer/opt/ui b/site/pack/packer/opt/ui deleted file mode 160000 index bca1182..0000000 --- a/site/pack/packer/opt/ui +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bca1182e872db0ea52d86b2f4cf4ee7cb092de45 diff --git a/site/pack/packer/start/base46 b/site/pack/packer/start/base46 deleted file mode 160000 index dfdcff9..0000000 --- a/site/pack/packer/start/base46 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dfdcff9c6b2bd1ad3c364973a2497bf62c6f0f20 diff --git a/tree-sitter-lua/.github/workflows/ci.yml b/tree-sitter-lua/.github/workflows/ci.yml deleted file mode 100644 index cb302b2..0000000 --- a/tree-sitter-lua/.github/workflows/ci.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: CI - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup Node - uses: actions/setup-node@v2.1.2 - with: - node-version: '16.x' - - name: Install dependencies - run: npm install - - name: Test - run: npm run test diff --git a/tree-sitter-lua/.gitignore b/tree-sitter-lua/.gitignore deleted file mode 100644 index 96921be..0000000 --- a/tree-sitter-lua/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -*.log -*.tgz -.DS_Store -Cargo.lock -build -node_modules -package-lock.json -yarn.lock -target - -examples/luvit diff --git a/tree-sitter-lua/.prettierignore b/tree-sitter-lua/.prettierignore deleted file mode 100644 index 72fbd61..0000000 --- a/tree-sitter-lua/.prettierignore +++ /dev/null @@ -1,2 +0,0 @@ -bindings/ -src/ diff --git a/tree-sitter-lua/.prettierrc.json b/tree-sitter-lua/.prettierrc.json deleted file mode 100644 index 544138b..0000000 --- a/tree-sitter-lua/.prettierrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "singleQuote": true -} diff --git a/tree-sitter-lua/Cargo.toml b/tree-sitter-lua/Cargo.toml deleted file mode 100644 index 45902a8..0000000 --- a/tree-sitter-lua/Cargo.toml +++ /dev/null @@ -1,29 +0,0 @@ -[package] -name = "tree-sitter-lua" -description = "Lua grammar for the tree-sitter parsing library" -version = "0.0.12" -authors = [ - "Munif Tanjim ", -] -license = "MIT" -keywords = ["incremental", "parsing", "lua"] -categories = ["parsing", "text-editors"] -repository = "https://github.com/MunifTanjim/tree-sitter-lua" -edition = "2018" - -build = "bindings/rust/build.rs" -include = [ - "bindings/rust/*", - "grammar.js", - "queries/*", - "src/*", -] - -[lib] -path = "bindings/rust/lib.rs" - -[dependencies] -tree-sitter = "0.20" - -[build-dependencies] -cc = "1.0" diff --git a/tree-sitter-lua/LICENSE.md b/tree-sitter-lua/LICENSE.md deleted file mode 100644 index ff0407e..0000000 --- a/tree-sitter-lua/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2021 Munif Tanjim - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/tree-sitter-lua/README.md b/tree-sitter-lua/README.md deleted file mode 100644 index f8ce1c8..0000000 --- a/tree-sitter-lua/README.md +++ /dev/null @@ -1,20 +0,0 @@ -![GitHub Workflow Status: CI](https://img.shields.io/github/workflow/status/MunifTanjim/tree-sitter-lua/CI/main?label=CI&style=for-the-badge) - -# tree-sitter-lua - -Lua grammar for tree-sitter. - -## References - -- [Lua Documentation](https://www.lua.org/docs.html) - -## Acknowledgement - -The [external scanner](/src/scanner.c) was based on these repositories: - -- [Azganoth/tree-sitter-lua](https://github.com/Azganoth/tree-sitter-lua) -- [euclidianAce/tree-sitter-teal](https://github.com/euclidianAce/tree-sitter-teal) - -## License - -Licensed under the MIT License. Check the [LICENSE](/LICENSE.md) file for details. diff --git a/tree-sitter-lua/binding.gyp b/tree-sitter-lua/binding.gyp deleted file mode 100644 index 6ad07c4..0000000 --- a/tree-sitter-lua/binding.gyp +++ /dev/null @@ -1,19 +0,0 @@ -{ - "targets": [ - { - "target_name": "tree_sitter_lua_binding", - "include_dirs": [ - " -#include "nan.h" - -using namespace v8; - -extern "C" TSLanguage * tree_sitter_lua(); - -namespace { - -NAN_METHOD(New) {} - -void Init(Local exports, Local module) { - Local tpl = Nan::New(New); - tpl->SetClassName(Nan::New("Language").ToLocalChecked()); - tpl->InstanceTemplate()->SetInternalFieldCount(1); - - Local constructor = Nan::GetFunction(tpl).ToLocalChecked(); - Local instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); - Nan::SetInternalFieldPointer(instance, 0, tree_sitter_lua()); - - Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("lua").ToLocalChecked()); - Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); -} - -NODE_MODULE(tree_sitter_lua_binding, Init) - -} // namespace diff --git a/tree-sitter-lua/bindings/node/index.js b/tree-sitter-lua/bindings/node/index.js deleted file mode 100644 index 498d9af..0000000 --- a/tree-sitter-lua/bindings/node/index.js +++ /dev/null @@ -1,19 +0,0 @@ -try { - module.exports = require("../../build/Release/tree_sitter_lua_binding"); -} catch (error1) { - if (error1.code !== 'MODULE_NOT_FOUND') { - throw error1; - } - try { - module.exports = require("../../build/Debug/tree_sitter_lua_binding"); - } catch (error2) { - if (error2.code !== 'MODULE_NOT_FOUND') { - throw error2; - } - throw error1 - } -} - -try { - module.exports.nodeTypeInfo = require("../../src/node-types.json"); -} catch (_) {} diff --git a/tree-sitter-lua/bindings/rust/build.rs b/tree-sitter-lua/bindings/rust/build.rs deleted file mode 100644 index f7aaf16..0000000 --- a/tree-sitter-lua/bindings/rust/build.rs +++ /dev/null @@ -1,38 +0,0 @@ -fn main() { - let src_dir = std::path::Path::new("src"); - - let mut c_config = cc::Build::new(); - c_config.include(&src_dir); - c_config - .flag_if_supported("-Wno-unused-parameter") - .flag_if_supported("-Wno-unused-but-set-variable") - .flag_if_supported("-Wno-trigraphs"); - let parser_path = src_dir.join("parser.c"); - c_config.file(&parser_path); - - // If your language uses an external scanner written in C, - // then include this block of code: - - let scanner_path = src_dir.join("scanner.c"); - c_config.file(&scanner_path); - println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap()); - - c_config.compile("parser"); - println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); - - // If your language uses an external scanner written in C++, - // then include this block of code: - - /* - let mut cpp_config = cc::Build::new(); - cpp_config.cpp(true); - cpp_config.include(&src_dir); - cpp_config - .flag_if_supported("-Wno-unused-parameter") - .flag_if_supported("-Wno-unused-but-set-variable"); - let scanner_path = src_dir.join("scanner.cc"); - cpp_config.file(&scanner_path); - cpp_config.compile("scanner"); - println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap()); - */ -} diff --git a/tree-sitter-lua/bindings/rust/lib.rs b/tree-sitter-lua/bindings/rust/lib.rs deleted file mode 100644 index 1575faf..0000000 --- a/tree-sitter-lua/bindings/rust/lib.rs +++ /dev/null @@ -1,52 +0,0 @@ -//! This crate provides lua language support for the [tree-sitter][] parsing library. -//! -//! Typically, you will use the [language][language func] function to add this language to a -//! tree-sitter [Parser][], and then use the parser to parse some code: -//! -//! ``` -//! let code = ""; -//! let mut parser = tree_sitter::Parser::new(); -//! parser.set_language(tree_sitter_lua::language()).expect("Error loading lua grammar"); -//! let tree = parser.parse(code, None).unwrap(); -//! ``` -//! -//! [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html -//! [language func]: fn.language.html -//! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html -//! [tree-sitter]: https://tree-sitter.github.io/ - -use tree_sitter::Language; - -extern "C" { - fn tree_sitter_lua() -> Language; -} - -/// Get the tree-sitter [Language][] for this grammar. -/// -/// [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html -pub fn language() -> Language { - unsafe { tree_sitter_lua() } -} - -/// The content of the [`node-types.json`][] file for this grammar. -/// -/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types -pub const NODE_TYPES: &'static str = include_str!("../../src/node-types.json"); - -// Uncomment these to include any queries that this grammar contains - -// pub const HIGHLIGHTS_QUERY: &'static str = include_str!("../../queries/highlights.scm"); -// pub const INJECTIONS_QUERY: &'static str = include_str!("../../queries/injections.scm"); -// pub const LOCALS_QUERY: &'static str = include_str!("../../queries/locals.scm"); -// pub const TAGS_QUERY: &'static str = include_str!("../../queries/tags.scm"); - -#[cfg(test)] -mod tests { - #[test] - fn test_can_load_grammar() { - let mut parser = tree_sitter::Parser::new(); - parser - .set_language(super::language()) - .expect("Error loading lua language"); - } -} diff --git a/tree-sitter-lua/examples/init.lua b/tree-sitter-lua/examples/init.lua deleted file mode 100644 index b7851c7..0000000 --- a/tree-sitter-lua/examples/init.lua +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env lua - -return 42 diff --git a/tree-sitter-lua/grammar.js b/tree-sitter-lua/grammar.js deleted file mode 100644 index a91c322..0000000 --- a/tree-sitter-lua/grammar.js +++ /dev/null @@ -1,504 +0,0 @@ -const PREC = { - OR: 1, // or - AND: 2, // and - COMPARE: 3, // < > <= >= ~= == - BIT_OR: 4, // | - BIT_NOT: 5, // ~ - BIT_AND: 6, // & - BIT_SHIFT: 7, // << >> - CONCAT: 8, // .. - PLUS: 9, // + - - MULTI: 10, // * / // % - UNARY: 11, // not # - ~ - POWER: 12, // ^ -}; - -const list_seq = (rule, separator, trailing_separator = false) => - trailing_separator - ? seq(rule, repeat(seq(separator, rule)), optional(separator)) - : seq(rule, repeat(seq(separator, rule))); - -const optional_block = ($) => alias(optional($._block), $.block); - -// namelist ::= Name {',' Name} -const name_list = ($) => list_seq(field('name', $.identifier), ','); - -module.exports = grammar({ - name: 'lua', - - extras: ($) => [$.comment, /\s/], - - externals: ($) => [ - $._block_comment_start, - $._block_comment_content, - $._block_comment_end, - - $._string_start, - $._string_content, - $._string_end, - ], - - supertypes: ($) => [$.statement, $.expression, $.declaration, $.variable], - - word: ($) => $.identifier, - - rules: { - // chunk ::= block - chunk: ($) => - seq( - optional($.hash_bang_line), - repeat($.statement), - optional($.return_statement) - ), - - hash_bang_line: (_) => /#!.*/, - - // block ::= {stat} [retstat] - _block: ($) => - choice( - seq(repeat1($.statement), optional($.return_statement)), - seq(repeat($.statement), $.return_statement) - ), - - /* - stat ::= ';' | - varlist '=' explist | - functioncall | - label | - break | - goto Name | - do block end | - while exp do block end | - repeat block until exp | - if exp then block {elseif exp then block} [else block] end | - for Name '=' exp ',' exp [',' exp] do block end | - for namelist in explist do block end | - function funcname funcbody | - local function Name funcbody | - local namelist ['=' explist] - */ - statement: ($) => - choice( - $.empty_statement, - $.assignment_statement, - $.function_call, - $.label_statement, - $.break_statement, - $.goto_statement, - $.do_statement, - $.while_statement, - $.repeat_statement, - $.if_statement, - $.for_statement, - $.declaration - ), - - // retstat ::= return [explist] [';'] - return_statement: ($) => - seq( - 'return', - optional(alias($._expression_list, $.expression_list)), - optional(';') - ), - - // ';' - empty_statement: (_) => ';', - - // varlist '=' explist - assignment_statement: ($) => - seq( - alias($._variable_assignment_varlist, $.variable_list), - '=', - alias($._variable_assignment_explist, $.expression_list) - ), - // varlist ::= var {',' var} - _variable_assignment_varlist: ($) => - list_seq(field('name', $.variable), ','), - // explist ::= exp {',' exp} - _variable_assignment_explist: ($) => - list_seq(field('value', $.expression), ','), - - // label ::= '::' Name '::' - label_statement: ($) => seq('::', $.identifier, '::'), - - // break - break_statement: (_) => 'break', - - // goto Name - goto_statement: ($) => seq('goto', $.identifier), - - // do block end - do_statement: ($) => seq('do', field('body', optional_block($)), 'end'), - - // while exp do block end - while_statement: ($) => - seq( - 'while', - field('condition', $.expression), - 'do', - field('body', optional_block($)), - 'end' - ), - - // repeat block until exp - repeat_statement: ($) => - seq( - 'repeat', - field('body', optional_block($)), - 'until', - field('condition', $.expression) - ), - - // if exp then block {elseif exp then block} [else block] end - if_statement: ($) => - seq( - 'if', - field('condition', $.expression), - 'then', - field('consequence', optional_block($)), - repeat(field('alternative', $.elseif_statement)), - optional(field('alternative', $.else_statement)), - 'end' - ), - // elseif exp then block - elseif_statement: ($) => - seq( - 'elseif', - field('condition', $.expression), - 'then', - field('consequence', optional_block($)) - ), - // else block - else_statement: ($) => seq('else', field('body', optional_block($))), - - // for Name '=' exp ',' exp [',' exp] do block end - // for namelist in explist do block end - for_statement: ($) => - seq( - 'for', - field('clause', choice($.for_generic_clause, $.for_numeric_clause)), - 'do', - field('body', optional_block($)), - 'end' - ), - // namelist in explist - for_generic_clause: ($) => - seq( - alias($._name_list, $.variable_list), - 'in', - alias($._expression_list, $.expression_list) - ), - // Name '=' exp ',' exp [',' exp] - for_numeric_clause: ($) => - seq( - field('name', $.identifier), - '=', - field('start', $.expression), - ',', - field('end', $.expression), - optional(seq(',', field('step', $.expression))) - ), - - // function funcname funcbody - // local function Name funcbody - // local namelist ['=' explist] - declaration: ($) => - choice( - $.function_declaration, - field( - 'local_declaration', - alias($._local_function_declaration, $.function_declaration) - ), - field('local_declaration', $.variable_declaration) - ), - // function funcname funcbody - function_declaration: ($) => - seq('function', field('name', $._function_name), $._function_body), - // local function Name funcbody - _local_function_declaration: ($) => - seq('local', 'function', field('name', $.identifier), $._function_body), - // funcname ::= Name {'.' Name} [':' Name] - _function_name: ($) => - choice( - $._function_name_prefix_expression, - alias( - $._function_name_method_index_expression, - $.method_index_expression - ) - ), - _function_name_prefix_expression: ($) => - choice( - $.identifier, - alias($._function_name_dot_index_expression, $.dot_index_expression) - ), - _function_name_dot_index_expression: ($) => - seq( - field('table', $._function_name_prefix_expression), - '.', - field('field', $.identifier) - ), - _function_name_method_index_expression: ($) => - seq( - field('table', $._function_name_prefix_expression), - ':', - field('method', $.identifier) - ), - - // local namelist ['=' explist] - variable_declaration: ($) => - seq( - 'local', - choice( - alias($._name_list, $.variable_list), - alias($._local_variable_assignment, $.assignment_statement) - ) - ), - _local_variable_assignment: ($) => - seq( - alias($._name_list, $.variable_list), - '=', - alias($._variable_assignment_explist, $.expression_list) - ), - // namelist ::= Name {',' Name} - _name_list: ($) => name_list($), - - // explist ::= exp {',' exp} - _expression_list: ($) => list_seq($.expression, ','), - - /* - exp ::= nil | false | true | Numeral | LiteralString | '...' | functiondef | - prefixexp | tableconstructor | exp binop exp | unop exp - */ - expression: ($) => - choice( - $.nil, - $.false, - $.true, - $.number, - $.string, - $.vararg_expression, - $.function_definition, - $.variable, - $.function_call, - $.parenthesized_expression, - $.table_constructor, - $.binary_expression, - $.unary_expression - ), - - // nil - nil: (_) => 'nil', - - // false - false: (_) => 'false', - - // true - true: (_) => 'true', - - // Numeral - number: (_) => { - const decimal_digits = /[0-9]+/; - const signed_integer = seq(optional(choice('-', '+')), decimal_digits); - const decimal_exponent_part = seq(choice('e', 'E'), signed_integer); - - const decimal_integer_literal = choice( - '0', - seq(optional('0'), /[1-9]/, optional(decimal_digits)) - ); - - const hex_digits = /[a-fA-F0-9]+/; - const hex_exponent_part = seq(choice('p', 'P'), signed_integer); - - const decimal_literal = choice( - seq( - decimal_integer_literal, - '.', - optional(decimal_digits), - optional(decimal_exponent_part) - ), - seq('.', decimal_digits, optional(decimal_exponent_part)), - seq(decimal_integer_literal, optional(decimal_exponent_part)) - ); - - const hex_literal = seq( - choice('0x', '0X'), - hex_digits, - optional(seq('.', hex_digits)), - optional(hex_exponent_part) - ); - - return token(choice(decimal_literal, hex_literal)); - }, - - // LiteralString - string: ($) => - seq( - field('start', alias($._string_start, 'string_start')), - field('content', optional(alias($._string_content, 'string_content'))), - field('end', alias($._string_end, 'string_end')) - ), - - // '...' - vararg_expression: (_) => '...', - - // functiondef ::= function funcbody - function_definition: ($) => seq('function', $._function_body), - // funcbody ::= '(' [parlist] ')' block end - _function_body: ($) => - seq( - field('parameters', $.parameters), - field('body', optional_block($)), - 'end' - ), - // '(' [parlist] ')' - parameters: ($) => seq('(', optional($._parameter_list), ')'), - // parlist ::= namelist [',' '...'] | '...' - _parameter_list: ($) => - choice( - seq(name_list($), optional(seq(',', $.vararg_expression))), - $.vararg_expression - ), - - // prefixexp ::= var | functioncall | '(' exp ')' - _prefix_expression: ($) => - prec(1, choice($.variable, $.function_call, $.parenthesized_expression)), - - // var ::= Name | prefixexp [ exp ] | prefixexp . Name - variable: ($) => - choice($.identifier, $.bracket_index_expression, $.dot_index_expression), - // prefixexp [ exp ] - bracket_index_expression: ($) => - seq( - field('table', $._prefix_expression), - '[', - field('field', $.expression), - ']' - ), - // prefixexp . Name - dot_index_expression: ($) => - seq( - field('table', $._prefix_expression), - '.', - field('field', $.identifier) - ), - - // functioncall ::= prefixexp args | prefixexp ':' Name args - function_call: ($) => - seq( - field('name', choice($._prefix_expression, $.method_index_expression)), - field('arguments', $.arguments) - ), - // prefixexp ':' Name - method_index_expression: ($) => - seq( - field('table', $._prefix_expression), - ':', - field('method', $.identifier) - ), - // args ::= '(' [explist] ')' | tableconstructor | LiteralString - arguments: ($) => - choice( - seq('(', optional(list_seq($.expression, ',')), ')'), - $.table_constructor, - $.string - ), - - // '(' exp ')' - parenthesized_expression: ($) => seq('(', $.expression, ')'), - - // tableconstructor ::= '{' [fieldlist] '}' - table_constructor: ($) => seq('{', optional($._field_list), '}'), - // fieldlist ::= field {fieldsep field} [fieldsep] - _field_list: ($) => list_seq($.field, $._field_sep, true), - // fieldsep ::= ',' | ';' - _field_sep: (_) => choice(',', ';'), - // field ::= '[' exp ']' '=' exp | Name '=' exp | exp - field: ($) => - choice( - seq( - '[', - field('name', $.expression), - ']', - '=', - field('value', $.expression) - ), - seq(field('name', $.identifier), '=', field('value', $.expression)), - field('value', $.expression) - ), - - // exp binop exp - binary_expression: ($) => - choice( - ...[ - ['or', PREC.OR], - ['and', PREC.AND], - ['<', PREC.COMPARE], - ['<=', PREC.COMPARE], - ['==', PREC.COMPARE], - ['~=', PREC.COMPARE], - ['>=', PREC.COMPARE], - ['>', PREC.COMPARE], - ['|', PREC.BIT_OR], - ['~', PREC.BIT_NOT], - ['&', PREC.BIT_AND], - ['<<', PREC.BIT_SHIFT], - ['>>', PREC.BIT_SHIFT], - ['+', PREC.PLUS], - ['-', PREC.PLUS], - ['*', PREC.MULTI], - ['/', PREC.MULTI], - ['//', PREC.MULTI], - ['%', PREC.MULTI], - ].map(([operator, precedence]) => - prec.left( - precedence, - seq( - field('left', $.expression), - operator, - field('right', $.expression) - ) - ) - ), - ...[ - ['..', PREC.CONCAT], - ['^', PREC.POWER], - ].map(([operator, precedence]) => - prec.right( - precedence, - seq( - field('left', $.expression), - operator, - field('right', $.expression) - ) - ) - ) - ), - - // unop exp - unary_expression: ($) => - prec.left( - PREC.UNARY, - seq(choice('not', '#', '-', '~'), field('operand', $.expression)) - ), - - // Name - identifier: (_) => /[a-zA-Z_][a-zA-Z0-9_]*/, - - // comment - comment: ($) => - choice( - seq( - field('start', alias('--', 'comment_start')), - field('content', alias(/[^\r\n]*/, 'comment_content')) - ), - seq( - field('start', alias($._block_comment_start, 'comment_start')), - field( - 'content', - optional(alias($._block_comment_content, 'comment_content')) - ), - field('end', alias($._block_comment_end, 'comment_end')) - ) - ), - }, -}); diff --git a/tree-sitter-lua/package.json b/tree-sitter-lua/package.json deleted file mode 100644 index 377d8eb..0000000 --- a/tree-sitter-lua/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "@muniftanjim/tree-sitter-lua", - "version": "0.0.12", - "description": "Lua grammar for tree-sitter", - "keywords": [ - "tree-sitter", - "parser", - "lua" - ], - "homepage": "https://github.com/MunifTanjim/tree-sitter-lua#readme", - "bugs": "https://github.com/MunifTanjim/tree-sitter-lua/issues", - "license": "MIT", - "author": "Munif Tanjim (https://muniftanjim.dev)", - "files": [ - "bindings", - "queries", - "src", - "binding.gyp", - "grammar.js" - ], - "main": "bindings/node", - "repository": "https://github.com/MunifTanjim/tree-sitter-lua", - "scripts": { - "build": "tree-sitter generate", - "postbuild": "node-gyp build", - "test": "tree-sitter test", - "posttest": "./script/parse-examples lua" - }, - "dependencies": { - "nan": "^2.14.2" - }, - "devDependencies": { - "tree-sitter-cli": "^0.20.0" - }, - "publishConfig": { - "access": "public" - }, - "tree-sitter": [ - { - "scope": "source.lua", - "file-types": [ - "lua" - ] - } - ] -} diff --git a/tree-sitter-lua/script/known_failures.txt b/tree-sitter-lua/script/known_failures.txt deleted file mode 100644 index e69de29..0000000 diff --git a/tree-sitter-lua/script/parse-examples b/tree-sitter-lua/script/parse-examples deleted file mode 100755 index 1cf6e45..0000000 --- a/tree-sitter-lua/script/parse-examples +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -cd "$(dirname "${0}")/.." - -checkout_repo() { - local -r path="${1}" - local -r repo="${2}" - local -r sha="${3}" - - echo "Checking out github.com/${repo}#${sha} in ${path}" - - mkdir -p "${path}" - pushd "${path}" >/dev/null - - if [[ ! -d ".git" ]]; then - git init --quiet - git remote add origin "https://github.com/${repo}.git" - git fetch --quiet --depth 1 origin "${sha}" - elif [[ "${sha}" != "$(git rev-parse HEAD)" ]]; then - git fetch --quiet --depth 1 origin "${sha}" - fi - - git checkout --quiet FETCH_HEAD - - popd >/dev/null - - echo -} - -checkout_repo "./examples/luvit" "luvit/luvit" "9841bc17aaab32fa63e11063cf68f82da615eefd" - -parse_examples() { - local -r known_failures="$(cat script/known_failures.txt)" - - tree-sitter parse --quiet \ - "./examples/luvit/**/*.lua" \ - $(for file in ${known_failures}; do echo "!${file}"; done) - - declare -r example_count=$(find ./examples -name "*.lua" | wc -l) - declare -r failure_count=$(wc -w <<< "${known_failures}") - declare -r success_count=$(( ${example_count} - ${failure_count} )) - declare -r success_percent=$(bc -l <<< "100*${success_count}/${example_count}") - - printf \ - "[Lua] Successfully parsed %d of %d example files (%.1f%%)\n" \ - ${success_count} ${example_count} ${success_percent} -} - -parse_examples diff --git a/tree-sitter-lua/script/release.sh b/tree-sitter-lua/script/release.sh deleted file mode 100755 index 5c3d243..0000000 --- a/tree-sitter-lua/script/release.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -set -eu - -echo "Running Build..." -npm run build -echo - -echo "Running Tests..." -npm run test -echo - -echo "Bumping Version..." -declare -r curr_version=$(npx -c 'echo $npm_package_version') -npm version --allow-same-version --no-git-tag-version $@ -declare -r next_version=$(npx -c 'echo $npm_package_version') -echo - -if [[ "${curr_version}" = "${next_version}" ]]; then - echo "Version did not change!" - exit 1 -fi - -git add package.json - -echo "crate: tree-sitter-lua" -echo "v${next_version}" -cargo bump "${next_version}" -git add "Cargo.toml" -echo - -git commit -m "chore: release v${next_version}" -git tag "v${next_version}" -m "v${next_version}" diff --git a/tree-sitter-lua/src/grammar.json b/tree-sitter-lua/src/grammar.json deleted file mode 100644 index 45aec2e..0000000 --- a/tree-sitter-lua/src/grammar.json +++ /dev/null @@ -1,2834 +0,0 @@ -{ - "name": "lua", - "word": "identifier", - "rules": { - "chunk": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "hash_bang_line" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "statement" - } - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "return_statement" - }, - { - "type": "BLANK" - } - ] - } - ] - }, - "hash_bang_line": { - "type": "PATTERN", - "value": "#!.*" - }, - "_block": { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "REPEAT1", - "content": { - "type": "SYMBOL", - "name": "statement" - } - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "return_statement" - }, - { - "type": "BLANK" - } - ] - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "statement" - } - }, - { - "type": "SYMBOL", - "name": "return_statement" - } - ] - } - ] - }, - "statement": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "empty_statement" - }, - { - "type": "SYMBOL", - "name": "assignment_statement" - }, - { - "type": "SYMBOL", - "name": "function_call" - }, - { - "type": "SYMBOL", - "name": "label_statement" - }, - { - "type": "SYMBOL", - "name": "break_statement" - }, - { - "type": "SYMBOL", - "name": "goto_statement" - }, - { - "type": "SYMBOL", - "name": "do_statement" - }, - { - "type": "SYMBOL", - "name": "while_statement" - }, - { - "type": "SYMBOL", - "name": "repeat_statement" - }, - { - "type": "SYMBOL", - "name": "if_statement" - }, - { - "type": "SYMBOL", - "name": "for_statement" - }, - { - "type": "SYMBOL", - "name": "declaration" - } - ] - }, - "return_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "return" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_expression_list" - }, - "named": true, - "value": "expression_list" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": ";" - }, - { - "type": "BLANK" - } - ] - } - ] - }, - "empty_statement": { - "type": "STRING", - "value": ";" - }, - "assignment_statement": { - "type": "SEQ", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_variable_assignment_varlist" - }, - "named": true, - "value": "variable_list" - }, - { - "type": "STRING", - "value": "=" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_variable_assignment_explist" - }, - "named": true, - "value": "expression_list" - } - ] - }, - "_variable_assignment_varlist": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "variable" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "variable" - } - } - ] - } - } - ] - }, - "_variable_assignment_explist": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "value", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "FIELD", - "name": "value", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - } - ] - }, - "label_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "::" - }, - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "STRING", - "value": "::" - } - ] - }, - "break_statement": { - "type": "STRING", - "value": "break" - }, - "goto_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "goto" - }, - { - "type": "SYMBOL", - "name": "identifier" - } - ] - }, - "do_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "do" - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "ALIAS", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_block" - }, - { - "type": "BLANK" - } - ] - }, - "named": true, - "value": "block" - } - }, - { - "type": "STRING", - "value": "end" - } - ] - }, - "while_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "while" - }, - { - "type": "FIELD", - "name": "condition", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "do" - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "ALIAS", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_block" - }, - { - "type": "BLANK" - } - ] - }, - "named": true, - "value": "block" - } - }, - { - "type": "STRING", - "value": "end" - } - ] - }, - "repeat_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "repeat" - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "ALIAS", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_block" - }, - { - "type": "BLANK" - } - ] - }, - "named": true, - "value": "block" - } - }, - { - "type": "STRING", - "value": "until" - }, - { - "type": "FIELD", - "name": "condition", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - }, - "if_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "if" - }, - { - "type": "FIELD", - "name": "condition", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "then" - }, - { - "type": "FIELD", - "name": "consequence", - "content": { - "type": "ALIAS", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_block" - }, - { - "type": "BLANK" - } - ] - }, - "named": true, - "value": "block" - } - }, - { - "type": "REPEAT", - "content": { - "type": "FIELD", - "name": "alternative", - "content": { - "type": "SYMBOL", - "name": "elseif_statement" - } - } - }, - { - "type": "CHOICE", - "members": [ - { - "type": "FIELD", - "name": "alternative", - "content": { - "type": "SYMBOL", - "name": "else_statement" - } - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": "end" - } - ] - }, - "elseif_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "elseif" - }, - { - "type": "FIELD", - "name": "condition", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "then" - }, - { - "type": "FIELD", - "name": "consequence", - "content": { - "type": "ALIAS", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_block" - }, - { - "type": "BLANK" - } - ] - }, - "named": true, - "value": "block" - } - } - ] - }, - "else_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "else" - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "ALIAS", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_block" - }, - { - "type": "BLANK" - } - ] - }, - "named": true, - "value": "block" - } - } - ] - }, - "for_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "for" - }, - { - "type": "FIELD", - "name": "clause", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "for_generic_clause" - }, - { - "type": "SYMBOL", - "name": "for_numeric_clause" - } - ] - } - }, - { - "type": "STRING", - "value": "do" - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "ALIAS", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_block" - }, - { - "type": "BLANK" - } - ] - }, - "named": true, - "value": "block" - } - }, - { - "type": "STRING", - "value": "end" - } - ] - }, - "for_generic_clause": { - "type": "SEQ", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_name_list" - }, - "named": true, - "value": "variable_list" - }, - { - "type": "STRING", - "value": "in" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_expression_list" - }, - "named": true, - "value": "expression_list" - } - ] - }, - "for_numeric_clause": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - }, - { - "type": "STRING", - "value": "=" - }, - { - "type": "FIELD", - "name": "start", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "," - }, - { - "type": "FIELD", - "name": "end", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "FIELD", - "name": "step", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - }, - { - "type": "BLANK" - } - ] - } - ] - }, - "declaration": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "function_declaration" - }, - { - "type": "FIELD", - "name": "local_declaration", - "content": { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_local_function_declaration" - }, - "named": true, - "value": "function_declaration" - } - }, - { - "type": "FIELD", - "name": "local_declaration", - "content": { - "type": "SYMBOL", - "name": "variable_declaration" - } - } - ] - }, - "function_declaration": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "function" - }, - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "_function_name" - } - }, - { - "type": "SYMBOL", - "name": "_function_body" - } - ] - }, - "_local_function_declaration": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "local" - }, - { - "type": "STRING", - "value": "function" - }, - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - }, - { - "type": "SYMBOL", - "name": "_function_body" - } - ] - }, - "_function_name": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_function_name_prefix_expression" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_function_name_method_index_expression" - }, - "named": true, - "value": "method_index_expression" - } - ] - }, - "_function_name_prefix_expression": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_function_name_dot_index_expression" - }, - "named": true, - "value": "dot_index_expression" - } - ] - }, - "_function_name_dot_index_expression": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "table", - "content": { - "type": "SYMBOL", - "name": "_function_name_prefix_expression" - } - }, - { - "type": "STRING", - "value": "." - }, - { - "type": "FIELD", - "name": "field", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - } - ] - }, - "_function_name_method_index_expression": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "table", - "content": { - "type": "SYMBOL", - "name": "_function_name_prefix_expression" - } - }, - { - "type": "STRING", - "value": ":" - }, - { - "type": "FIELD", - "name": "method", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - } - ] - }, - "variable_declaration": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "local" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_name_list" - }, - "named": true, - "value": "variable_list" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_local_variable_assignment" - }, - "named": true, - "value": "assignment_statement" - } - ] - } - ] - }, - "_local_variable_assignment": { - "type": "SEQ", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_name_list" - }, - "named": true, - "value": "variable_list" - }, - { - "type": "STRING", - "value": "=" - }, - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_variable_assignment_explist" - }, - "named": true, - "value": "expression_list" - } - ] - }, - "_name_list": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - } - ] - } - } - ] - }, - "_expression_list": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "expression" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "expression" - } - ] - } - } - ] - }, - "expression": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "nil" - }, - { - "type": "SYMBOL", - "name": "false" - }, - { - "type": "SYMBOL", - "name": "true" - }, - { - "type": "SYMBOL", - "name": "number" - }, - { - "type": "SYMBOL", - "name": "string" - }, - { - "type": "SYMBOL", - "name": "vararg_expression" - }, - { - "type": "SYMBOL", - "name": "function_definition" - }, - { - "type": "SYMBOL", - "name": "variable" - }, - { - "type": "SYMBOL", - "name": "function_call" - }, - { - "type": "SYMBOL", - "name": "parenthesized_expression" - }, - { - "type": "SYMBOL", - "name": "table_constructor" - }, - { - "type": "SYMBOL", - "name": "binary_expression" - }, - { - "type": "SYMBOL", - "name": "unary_expression" - } - ] - }, - "nil": { - "type": "STRING", - "value": "nil" - }, - "false": { - "type": "STRING", - "value": "false" - }, - "true": { - "type": "STRING", - "value": "true" - }, - "number": { - "type": "TOKEN", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "0" - }, - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "0" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "PATTERN", - "value": "[1-9]" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "PATTERN", - "value": "[0-9]+" - }, - { - "type": "BLANK" - } - ] - } - ] - } - ] - }, - { - "type": "STRING", - "value": "." - }, - { - "type": "CHOICE", - "members": [ - { - "type": "PATTERN", - "value": "[0-9]+" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "e" - }, - { - "type": "STRING", - "value": "E" - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "-" - }, - { - "type": "STRING", - "value": "+" - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "PATTERN", - "value": "[0-9]+" - } - ] - } - ] - }, - { - "type": "BLANK" - } - ] - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "." - }, - { - "type": "PATTERN", - "value": "[0-9]+" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "e" - }, - { - "type": "STRING", - "value": "E" - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "-" - }, - { - "type": "STRING", - "value": "+" - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "PATTERN", - "value": "[0-9]+" - } - ] - } - ] - }, - { - "type": "BLANK" - } - ] - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "0" - }, - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "0" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "PATTERN", - "value": "[1-9]" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "PATTERN", - "value": "[0-9]+" - }, - { - "type": "BLANK" - } - ] - } - ] - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "e" - }, - { - "type": "STRING", - "value": "E" - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "-" - }, - { - "type": "STRING", - "value": "+" - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "PATTERN", - "value": "[0-9]+" - } - ] - } - ] - }, - { - "type": "BLANK" - } - ] - } - ] - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "0x" - }, - { - "type": "STRING", - "value": "0X" - } - ] - }, - { - "type": "PATTERN", - "value": "[a-fA-F0-9]+" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "." - }, - { - "type": "PATTERN", - "value": "[a-fA-F0-9]+" - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "p" - }, - { - "type": "STRING", - "value": "P" - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "-" - }, - { - "type": "STRING", - "value": "+" - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "PATTERN", - "value": "[0-9]+" - } - ] - } - ] - }, - { - "type": "BLANK" - } - ] - } - ] - } - ] - } - }, - "string": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "start", - "content": { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_string_start" - }, - "named": false, - "value": "string_start" - } - }, - { - "type": "FIELD", - "name": "content", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_string_content" - }, - "named": false, - "value": "string_content" - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "FIELD", - "name": "end", - "content": { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_string_end" - }, - "named": false, - "value": "string_end" - } - } - ] - }, - "vararg_expression": { - "type": "STRING", - "value": "..." - }, - "function_definition": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "function" - }, - { - "type": "SYMBOL", - "name": "_function_body" - } - ] - }, - "_function_body": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "parameters", - "content": { - "type": "SYMBOL", - "name": "parameters" - } - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "ALIAS", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_block" - }, - { - "type": "BLANK" - } - ] - }, - "named": true, - "value": "block" - } - }, - { - "type": "STRING", - "value": "end" - } - ] - }, - "parameters": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_parameter_list" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - "_parameter_list": { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - } - ] - } - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "vararg_expression" - } - ] - }, - { - "type": "BLANK" - } - ] - } - ] - }, - { - "type": "SYMBOL", - "name": "vararg_expression" - } - ] - }, - "_prefix_expression": { - "type": "PREC", - "value": 1, - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "variable" - }, - { - "type": "SYMBOL", - "name": "function_call" - }, - { - "type": "SYMBOL", - "name": "parenthesized_expression" - } - ] - } - }, - "variable": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "SYMBOL", - "name": "bracket_index_expression" - }, - { - "type": "SYMBOL", - "name": "dot_index_expression" - } - ] - }, - "bracket_index_expression": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "table", - "content": { - "type": "SYMBOL", - "name": "_prefix_expression" - } - }, - { - "type": "STRING", - "value": "[" - }, - { - "type": "FIELD", - "name": "field", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "]" - } - ] - }, - "dot_index_expression": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "table", - "content": { - "type": "SYMBOL", - "name": "_prefix_expression" - } - }, - { - "type": "STRING", - "value": "." - }, - { - "type": "FIELD", - "name": "field", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - } - ] - }, - "function_call": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "name", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_prefix_expression" - }, - { - "type": "SYMBOL", - "name": "method_index_expression" - } - ] - } - }, - { - "type": "FIELD", - "name": "arguments", - "content": { - "type": "SYMBOL", - "name": "arguments" - } - } - ] - }, - "method_index_expression": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "table", - "content": { - "type": "SYMBOL", - "name": "_prefix_expression" - } - }, - { - "type": "STRING", - "value": ":" - }, - { - "type": "FIELD", - "name": "method", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - } - ] - }, - "arguments": { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "expression" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "expression" - } - ] - } - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - { - "type": "SYMBOL", - "name": "table_constructor" - }, - { - "type": "SYMBOL", - "name": "string" - } - ] - }, - "parenthesized_expression": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "SYMBOL", - "name": "expression" - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - "table_constructor": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "{" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_field_list" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": "}" - } - ] - }, - "_field_list": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "field" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_field_sep" - }, - { - "type": "SYMBOL", - "name": "field" - } - ] - } - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_field_sep" - }, - { - "type": "BLANK" - } - ] - } - ] - }, - "_field_sep": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "STRING", - "value": ";" - } - ] - }, - "field": { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "[" - }, - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "]" - }, - { - "type": "STRING", - "value": "=" - }, - { - "type": "FIELD", - "name": "value", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - }, - { - "type": "STRING", - "value": "=" - }, - { - "type": "FIELD", - "name": "value", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - }, - { - "type": "FIELD", - "name": "value", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - }, - "binary_expression": { - "type": "CHOICE", - "members": [ - { - "type": "PREC_LEFT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "or" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 2, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "and" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "<" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "<=" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "==" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "~=" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": ">=" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": ">" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 4, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "|" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 5, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "~" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 6, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "&" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 7, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "<<" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 7, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": ">>" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 9, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "+" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 9, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "-" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 10, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "*" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 10, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "/" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 10, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "//" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 10, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "%" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_RIGHT", - "value": 8, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": ".." - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - { - "type": "PREC_RIGHT", - "value": 12, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "^" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - } - ] - }, - "unary_expression": { - "type": "PREC_LEFT", - "value": 11, - "content": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "not" - }, - { - "type": "STRING", - "value": "#" - }, - { - "type": "STRING", - "value": "-" - }, - { - "type": "STRING", - "value": "~" - } - ] - }, - { - "type": "FIELD", - "name": "operand", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - } - }, - "identifier": { - "type": "PATTERN", - "value": "[a-zA-Z_][a-zA-Z0-9_]*" - }, - "comment": { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "start", - "content": { - "type": "ALIAS", - "content": { - "type": "STRING", - "value": "--" - }, - "named": false, - "value": "comment_start" - } - }, - { - "type": "FIELD", - "name": "content", - "content": { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": "[^\\r\\n]*" - }, - "named": false, - "value": "comment_content" - } - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "start", - "content": { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_block_comment_start" - }, - "named": false, - "value": "comment_start" - } - }, - { - "type": "FIELD", - "name": "content", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_block_comment_content" - }, - "named": false, - "value": "comment_content" - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "FIELD", - "name": "end", - "content": { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_block_comment_end" - }, - "named": false, - "value": "comment_end" - } - } - ] - } - ] - } - }, - "extras": [ - { - "type": "SYMBOL", - "name": "comment" - }, - { - "type": "PATTERN", - "value": "\\s" - } - ], - "conflicts": [], - "precedences": [], - "externals": [ - { - "type": "SYMBOL", - "name": "_block_comment_start" - }, - { - "type": "SYMBOL", - "name": "_block_comment_content" - }, - { - "type": "SYMBOL", - "name": "_block_comment_end" - }, - { - "type": "SYMBOL", - "name": "_string_start" - }, - { - "type": "SYMBOL", - "name": "_string_content" - }, - { - "type": "SYMBOL", - "name": "_string_end" - } - ], - "inline": [], - "supertypes": [ - "statement", - "expression", - "declaration", - "variable" - ] -} - diff --git a/tree-sitter-lua/src/node-types.json b/tree-sitter-lua/src/node-types.json deleted file mode 100644 index 4289f71..0000000 --- a/tree-sitter-lua/src/node-types.json +++ /dev/null @@ -1,1244 +0,0 @@ -[ - { - "type": "declaration", - "named": true, - "subtypes": [ - { - "type": "function_declaration", - "named": true - }, - { - "type": "variable_declaration", - "named": true - } - ] - }, - { - "type": "expression", - "named": true, - "subtypes": [ - { - "type": "binary_expression", - "named": true - }, - { - "type": "false", - "named": true - }, - { - "type": "function_call", - "named": true - }, - { - "type": "function_definition", - "named": true - }, - { - "type": "nil", - "named": true - }, - { - "type": "number", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "string", - "named": true - }, - { - "type": "table_constructor", - "named": true - }, - { - "type": "true", - "named": true - }, - { - "type": "unary_expression", - "named": true - }, - { - "type": "vararg_expression", - "named": true - }, - { - "type": "variable", - "named": true - } - ] - }, - { - "type": "statement", - "named": true, - "subtypes": [ - { - "type": "assignment_statement", - "named": true - }, - { - "type": "break_statement", - "named": true - }, - { - "type": "declaration", - "named": true - }, - { - "type": "do_statement", - "named": true - }, - { - "type": "empty_statement", - "named": true - }, - { - "type": "for_statement", - "named": true - }, - { - "type": "function_call", - "named": true - }, - { - "type": "goto_statement", - "named": true - }, - { - "type": "if_statement", - "named": true - }, - { - "type": "label_statement", - "named": true - }, - { - "type": "repeat_statement", - "named": true - }, - { - "type": "while_statement", - "named": true - } - ] - }, - { - "type": "variable", - "named": true, - "subtypes": [ - { - "type": "bracket_index_expression", - "named": true - }, - { - "type": "dot_index_expression", - "named": true - }, - { - "type": "identifier", - "named": true - } - ] - }, - { - "type": "arguments", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - }, - { - "type": "assignment_statement", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "expression_list", - "named": true - }, - { - "type": "variable_list", - "named": true - } - ] - } - }, - { - "type": "binary_expression", - "named": true, - "fields": { - "left": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - }, - "right": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - } - }, - { - "type": "block", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "return_statement", - "named": true - }, - { - "type": "statement", - "named": true - } - ] - } - }, - { - "type": "bracket_index_expression", - "named": true, - "fields": { - "field": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - }, - "table": { - "multiple": false, - "required": true, - "types": [ - { - "type": "function_call", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "variable", - "named": true - } - ] - } - } - }, - { - "type": "chunk", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "hash_bang_line", - "named": true - }, - { - "type": "return_statement", - "named": true - }, - { - "type": "statement", - "named": true - } - ] - } - }, - { - "type": "comment", - "named": true, - "fields": { - "content": { - "multiple": false, - "required": false, - "types": [ - { - "type": "comment_content", - "named": false - } - ] - }, - "end": { - "multiple": false, - "required": false, - "types": [ - { - "type": "comment_end", - "named": false - } - ] - }, - "start": { - "multiple": false, - "required": true, - "types": [ - { - "type": "comment_start", - "named": false - } - ] - } - } - }, - { - "type": "do_statement", - "named": true, - "fields": { - "body": { - "multiple": false, - "required": false, - "types": [ - { - "type": "block", - "named": true - } - ] - } - } - }, - { - "type": "dot_index_expression", - "named": true, - "fields": { - "field": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - }, - "table": { - "multiple": false, - "required": true, - "types": [ - { - "type": "function_call", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "variable", - "named": true - } - ] - } - } - }, - { - "type": "else_statement", - "named": true, - "fields": { - "body": { - "multiple": false, - "required": false, - "types": [ - { - "type": "block", - "named": true - } - ] - } - } - }, - { - "type": "elseif_statement", - "named": true, - "fields": { - "condition": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - }, - "consequence": { - "multiple": false, - "required": false, - "types": [ - { - "type": "block", - "named": true - } - ] - } - } - }, - { - "type": "empty_statement", - "named": true, - "fields": {} - }, - { - "type": "expression_list", - "named": true, - "fields": { - "value": { - "multiple": true, - "required": false, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - }, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - }, - { - "type": "field", - "named": true, - "fields": { - "name": { - "multiple": false, - "required": false, - "types": [ - { - "type": "expression", - "named": true - }, - { - "type": "identifier", - "named": true - } - ] - }, - "value": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - } - }, - { - "type": "for_generic_clause", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "expression_list", - "named": true - }, - { - "type": "variable_list", - "named": true - } - ] - } - }, - { - "type": "for_numeric_clause", - "named": true, - "fields": { - "end": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - }, - "name": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - }, - "start": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - }, - "step": { - "multiple": false, - "required": false, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - } - }, - { - "type": "for_statement", - "named": true, - "fields": { - "body": { - "multiple": false, - "required": false, - "types": [ - { - "type": "block", - "named": true - } - ] - }, - "clause": { - "multiple": false, - "required": true, - "types": [ - { - "type": "for_generic_clause", - "named": true - }, - { - "type": "for_numeric_clause", - "named": true - } - ] - } - } - }, - { - "type": "function_call", - "named": true, - "fields": { - "arguments": { - "multiple": false, - "required": true, - "types": [ - { - "type": "arguments", - "named": true - } - ] - }, - "name": { - "multiple": false, - "required": true, - "types": [ - { - "type": "function_call", - "named": true - }, - { - "type": "method_index_expression", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "variable", - "named": true - } - ] - } - } - }, - { - "type": "function_declaration", - "named": true, - "fields": { - "body": { - "multiple": false, - "required": false, - "types": [ - { - "type": "block", - "named": true - } - ] - }, - "name": { - "multiple": false, - "required": true, - "types": [ - { - "type": "dot_index_expression", - "named": true - }, - { - "type": "identifier", - "named": true - }, - { - "type": "method_index_expression", - "named": true - } - ] - }, - "parameters": { - "multiple": false, - "required": true, - "types": [ - { - "type": "parameters", - "named": true - } - ] - } - } - }, - { - "type": "function_definition", - "named": true, - "fields": { - "body": { - "multiple": false, - "required": false, - "types": [ - { - "type": "block", - "named": true - } - ] - }, - "parameters": { - "multiple": false, - "required": true, - "types": [ - { - "type": "parameters", - "named": true - } - ] - } - } - }, - { - "type": "goto_statement", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - } - }, - { - "type": "if_statement", - "named": true, - "fields": { - "alternative": { - "multiple": true, - "required": false, - "types": [ - { - "type": "else_statement", - "named": true - }, - { - "type": "elseif_statement", - "named": true - } - ] - }, - "condition": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - }, - "consequence": { - "multiple": false, - "required": false, - "types": [ - { - "type": "block", - "named": true - } - ] - } - } - }, - { - "type": "label_statement", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - } - }, - { - "type": "method_index_expression", - "named": true, - "fields": { - "method": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - }, - "table": { - "multiple": false, - "required": true, - "types": [ - { - "type": "function_call", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "variable", - "named": true - } - ] - } - } - }, - { - "type": "parameters", - "named": true, - "fields": { - "name": { - "multiple": true, - "required": false, - "types": [ - { - "type": "identifier", - "named": true - } - ] - } - }, - "children": { - "multiple": false, - "required": false, - "types": [ - { - "type": "vararg_expression", - "named": true - } - ] - } - }, - { - "type": "parenthesized_expression", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - }, - { - "type": "repeat_statement", - "named": true, - "fields": { - "body": { - "multiple": false, - "required": false, - "types": [ - { - "type": "block", - "named": true - } - ] - }, - "condition": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - } - }, - { - "type": "return_statement", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": false, - "types": [ - { - "type": "expression_list", - "named": true - } - ] - } - }, - { - "type": "string", - "named": true, - "fields": { - "content": { - "multiple": false, - "required": false, - "types": [ - { - "type": "string_content", - "named": false - } - ] - }, - "end": { - "multiple": false, - "required": true, - "types": [ - { - "type": "string_end", - "named": false - } - ] - }, - "start": { - "multiple": false, - "required": true, - "types": [ - { - "type": "string_start", - "named": false - } - ] - } - } - }, - { - "type": "table_constructor", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "field", - "named": true - } - ] - } - }, - { - "type": "unary_expression", - "named": true, - "fields": { - "operand": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - } - }, - { - "type": "variable_declaration", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "assignment_statement", - "named": true - }, - { - "type": "variable_list", - "named": true - } - ] - } - }, - { - "type": "variable_list", - "named": true, - "fields": { - "name": { - "multiple": true, - "required": true, - "types": [ - { - "type": "variable", - "named": true - } - ] - } - } - }, - { - "type": "while_statement", - "named": true, - "fields": { - "body": { - "multiple": false, - "required": false, - "types": [ - { - "type": "block", - "named": true - } - ] - }, - "condition": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - } - }, - { - "type": "#", - "named": false - }, - { - "type": "%", - "named": false - }, - { - "type": "&", - "named": false - }, - { - "type": "(", - "named": false - }, - { - "type": ")", - "named": false - }, - { - "type": "*", - "named": false - }, - { - "type": "+", - "named": false - }, - { - "type": ",", - "named": false - }, - { - "type": "-", - "named": false - }, - { - "type": ".", - "named": false - }, - { - "type": "..", - "named": false - }, - { - "type": "/", - "named": false - }, - { - "type": "//", - "named": false - }, - { - "type": ":", - "named": false - }, - { - "type": "::", - "named": false - }, - { - "type": ";", - "named": false - }, - { - "type": "<", - "named": false - }, - { - "type": "<<", - "named": false - }, - { - "type": "<=", - "named": false - }, - { - "type": "=", - "named": false - }, - { - "type": "==", - "named": false - }, - { - "type": ">", - "named": false - }, - { - "type": ">=", - "named": false - }, - { - "type": ">>", - "named": false - }, - { - "type": "[", - "named": false - }, - { - "type": "]", - "named": false - }, - { - "type": "^", - "named": false - }, - { - "type": "and", - "named": false - }, - { - "type": "break_statement", - "named": true - }, - { - "type": "comment_content", - "named": false - }, - { - "type": "comment_end", - "named": false - }, - { - "type": "comment_start", - "named": false - }, - { - "type": "do", - "named": false - }, - { - "type": "else", - "named": false - }, - { - "type": "elseif", - "named": false - }, - { - "type": "end", - "named": false - }, - { - "type": "false", - "named": true - }, - { - "type": "for", - "named": false - }, - { - "type": "function", - "named": false - }, - { - "type": "goto", - "named": false - }, - { - "type": "hash_bang_line", - "named": true - }, - { - "type": "identifier", - "named": true - }, - { - "type": "if", - "named": false - }, - { - "type": "in", - "named": false - }, - { - "type": "local", - "named": false - }, - { - "type": "nil", - "named": true - }, - { - "type": "not", - "named": false - }, - { - "type": "number", - "named": true - }, - { - "type": "or", - "named": false - }, - { - "type": "repeat", - "named": false - }, - { - "type": "return", - "named": false - }, - { - "type": "string_content", - "named": false - }, - { - "type": "string_end", - "named": false - }, - { - "type": "string_start", - "named": false - }, - { - "type": "then", - "named": false - }, - { - "type": "true", - "named": true - }, - { - "type": "until", - "named": false - }, - { - "type": "vararg_expression", - "named": true - }, - { - "type": "while", - "named": false - }, - { - "type": "{", - "named": false - }, - { - "type": "|", - "named": false - }, - { - "type": "}", - "named": false - }, - { - "type": "~", - "named": false - }, - { - "type": "~=", - "named": false - } -] \ No newline at end of file diff --git a/tree-sitter-lua/src/parser.c b/tree-sitter-lua/src/parser.c deleted file mode 100644 index 5b8c25c..0000000 --- a/tree-sitter-lua/src/parser.c +++ /dev/null @@ -1,10837 +0,0 @@ -#include - -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wmissing-field-initializers" -#endif - -#define LANGUAGE_VERSION 13 -#define STATE_COUNT 234 -#define LARGE_STATE_COUNT 2 -#define SYMBOL_COUNT 125 -#define ALIAS_COUNT 0 -#define TOKEN_COUNT 67 -#define EXTERNAL_TOKEN_COUNT 6 -#define FIELD_COUNT 20 -#define MAX_ALIAS_SEQUENCE_LENGTH 7 -#define PRODUCTION_ID_COUNT 50 - -enum { - sym_identifier = 1, - sym_hash_bang_line = 2, - anon_sym_return = 3, - anon_sym_SEMI = 4, - anon_sym_EQ = 5, - anon_sym_COMMA = 6, - anon_sym_COLON_COLON = 7, - sym_break_statement = 8, - anon_sym_goto = 9, - anon_sym_do = 10, - anon_sym_end = 11, - anon_sym_while = 12, - anon_sym_repeat = 13, - anon_sym_until = 14, - anon_sym_if = 15, - anon_sym_then = 16, - anon_sym_elseif = 17, - anon_sym_else = 18, - anon_sym_for = 19, - anon_sym_in = 20, - anon_sym_function = 21, - anon_sym_local = 22, - anon_sym_DOT = 23, - anon_sym_COLON = 24, - sym_nil = 25, - sym_false = 26, - sym_true = 27, - sym_number = 28, - sym_vararg_expression = 29, - anon_sym_LPAREN = 30, - anon_sym_RPAREN = 31, - anon_sym_LBRACK = 32, - anon_sym_RBRACK = 33, - anon_sym_LBRACE = 34, - anon_sym_RBRACE = 35, - anon_sym_or = 36, - anon_sym_and = 37, - anon_sym_LT = 38, - anon_sym_LT_EQ = 39, - anon_sym_EQ_EQ = 40, - anon_sym_TILDE_EQ = 41, - anon_sym_GT_EQ = 42, - anon_sym_GT = 43, - anon_sym_PIPE = 44, - anon_sym_TILDE = 45, - anon_sym_AMP = 46, - anon_sym_LT_LT = 47, - anon_sym_GT_GT = 48, - anon_sym_PLUS = 49, - anon_sym_DASH = 50, - anon_sym_STAR = 51, - anon_sym_SLASH = 52, - anon_sym_SLASH_SLASH = 53, - anon_sym_PERCENT = 54, - anon_sym_DOT_DOT = 55, - anon_sym_CARET = 56, - anon_sym_not = 57, - anon_sym_POUND = 58, - anon_sym_DASH_DASH = 59, - aux_sym_comment_token1 = 60, - sym__block_comment_start = 61, - sym__block_comment_content = 62, - sym__block_comment_end = 63, - sym__string_start = 64, - sym__string_content = 65, - sym__string_end = 66, - sym_chunk = 67, - sym__block = 68, - sym_statement = 69, - sym_return_statement = 70, - sym_empty_statement = 71, - sym_assignment_statement = 72, - sym__variable_assignment_varlist = 73, - sym__variable_assignment_explist = 74, - sym_label_statement = 75, - sym_goto_statement = 76, - sym_do_statement = 77, - sym_while_statement = 78, - sym_repeat_statement = 79, - sym_if_statement = 80, - sym_elseif_statement = 81, - sym_else_statement = 82, - sym_for_statement = 83, - sym_for_generic_clause = 84, - sym_for_numeric_clause = 85, - sym_declaration = 86, - sym_function_declaration = 87, - sym__local_function_declaration = 88, - sym__function_name = 89, - sym__function_name_prefix_expression = 90, - sym__function_name_dot_index_expression = 91, - sym__function_name_method_index_expression = 92, - sym_variable_declaration = 93, - sym__local_variable_assignment = 94, - sym__name_list = 95, - sym__expression_list = 96, - sym_expression = 97, - sym_string = 98, - sym_function_definition = 99, - sym__function_body = 100, - sym_parameters = 101, - sym__parameter_list = 102, - sym__prefix_expression = 103, - sym_variable = 104, - sym_bracket_index_expression = 105, - sym_dot_index_expression = 106, - sym_function_call = 107, - sym_method_index_expression = 108, - sym_arguments = 109, - sym_parenthesized_expression = 110, - sym_table_constructor = 111, - sym__field_list = 112, - sym__field_sep = 113, - sym_field = 114, - sym_binary_expression = 115, - sym_unary_expression = 116, - sym_comment = 117, - aux_sym_chunk_repeat1 = 118, - aux_sym__variable_assignment_varlist_repeat1 = 119, - aux_sym__variable_assignment_explist_repeat1 = 120, - aux_sym_if_statement_repeat1 = 121, - aux_sym__name_list_repeat1 = 122, - aux_sym__expression_list_repeat1 = 123, - aux_sym__field_list_repeat1 = 124, -}; - -static const char * const ts_symbol_names[] = { - [ts_builtin_sym_end] = "end", - [sym_identifier] = "identifier", - [sym_hash_bang_line] = "hash_bang_line", - [anon_sym_return] = "return", - [anon_sym_SEMI] = ";", - [anon_sym_EQ] = "=", - [anon_sym_COMMA] = ",", - [anon_sym_COLON_COLON] = "::", - [sym_break_statement] = "break_statement", - [anon_sym_goto] = "goto", - [anon_sym_do] = "do", - [anon_sym_end] = "end", - [anon_sym_while] = "while", - [anon_sym_repeat] = "repeat", - [anon_sym_until] = "until", - [anon_sym_if] = "if", - [anon_sym_then] = "then", - [anon_sym_elseif] = "elseif", - [anon_sym_else] = "else", - [anon_sym_for] = "for", - [anon_sym_in] = "in", - [anon_sym_function] = "function", - [anon_sym_local] = "local", - [anon_sym_DOT] = ".", - [anon_sym_COLON] = ":", - [sym_nil] = "nil", - [sym_false] = "false", - [sym_true] = "true", - [sym_number] = "number", - [sym_vararg_expression] = "vararg_expression", - [anon_sym_LPAREN] = "(", - [anon_sym_RPAREN] = ")", - [anon_sym_LBRACK] = "[", - [anon_sym_RBRACK] = "]", - [anon_sym_LBRACE] = "{", - [anon_sym_RBRACE] = "}", - [anon_sym_or] = "or", - [anon_sym_and] = "and", - [anon_sym_LT] = "<", - [anon_sym_LT_EQ] = "<=", - [anon_sym_EQ_EQ] = "==", - [anon_sym_TILDE_EQ] = "~=", - [anon_sym_GT_EQ] = ">=", - [anon_sym_GT] = ">", - [anon_sym_PIPE] = "|", - [anon_sym_TILDE] = "~", - [anon_sym_AMP] = "&", - [anon_sym_LT_LT] = "<<", - [anon_sym_GT_GT] = ">>", - [anon_sym_PLUS] = "+", - [anon_sym_DASH] = "-", - [anon_sym_STAR] = "*", - [anon_sym_SLASH] = "/", - [anon_sym_SLASH_SLASH] = "//", - [anon_sym_PERCENT] = "%", - [anon_sym_DOT_DOT] = "..", - [anon_sym_CARET] = "^", - [anon_sym_not] = "not", - [anon_sym_POUND] = "#", - [anon_sym_DASH_DASH] = "comment_start", - [aux_sym_comment_token1] = "comment_content", - [sym__block_comment_start] = "comment_start", - [sym__block_comment_content] = "comment_content", - [sym__block_comment_end] = "comment_end", - [sym__string_start] = "string_start", - [sym__string_content] = "string_content", - [sym__string_end] = "string_end", - [sym_chunk] = "chunk", - [sym__block] = "block", - [sym_statement] = "statement", - [sym_return_statement] = "return_statement", - [sym_empty_statement] = "empty_statement", - [sym_assignment_statement] = "assignment_statement", - [sym__variable_assignment_varlist] = "variable_list", - [sym__variable_assignment_explist] = "expression_list", - [sym_label_statement] = "label_statement", - [sym_goto_statement] = "goto_statement", - [sym_do_statement] = "do_statement", - [sym_while_statement] = "while_statement", - [sym_repeat_statement] = "repeat_statement", - [sym_if_statement] = "if_statement", - [sym_elseif_statement] = "elseif_statement", - [sym_else_statement] = "else_statement", - [sym_for_statement] = "for_statement", - [sym_for_generic_clause] = "for_generic_clause", - [sym_for_numeric_clause] = "for_numeric_clause", - [sym_declaration] = "declaration", - [sym_function_declaration] = "function_declaration", - [sym__local_function_declaration] = "function_declaration", - [sym__function_name] = "_function_name", - [sym__function_name_prefix_expression] = "_function_name_prefix_expression", - [sym__function_name_dot_index_expression] = "dot_index_expression", - [sym__function_name_method_index_expression] = "method_index_expression", - [sym_variable_declaration] = "variable_declaration", - [sym__local_variable_assignment] = "assignment_statement", - [sym__name_list] = "variable_list", - [sym__expression_list] = "expression_list", - [sym_expression] = "expression", - [sym_string] = "string", - [sym_function_definition] = "function_definition", - [sym__function_body] = "_function_body", - [sym_parameters] = "parameters", - [sym__parameter_list] = "_parameter_list", - [sym__prefix_expression] = "_prefix_expression", - [sym_variable] = "variable", - [sym_bracket_index_expression] = "bracket_index_expression", - [sym_dot_index_expression] = "dot_index_expression", - [sym_function_call] = "function_call", - [sym_method_index_expression] = "method_index_expression", - [sym_arguments] = "arguments", - [sym_parenthesized_expression] = "parenthesized_expression", - [sym_table_constructor] = "table_constructor", - [sym__field_list] = "_field_list", - [sym__field_sep] = "_field_sep", - [sym_field] = "field", - [sym_binary_expression] = "binary_expression", - [sym_unary_expression] = "unary_expression", - [sym_comment] = "comment", - [aux_sym_chunk_repeat1] = "chunk_repeat1", - [aux_sym__variable_assignment_varlist_repeat1] = "_variable_assignment_varlist_repeat1", - [aux_sym__variable_assignment_explist_repeat1] = "_variable_assignment_explist_repeat1", - [aux_sym_if_statement_repeat1] = "if_statement_repeat1", - [aux_sym__name_list_repeat1] = "_name_list_repeat1", - [aux_sym__expression_list_repeat1] = "_expression_list_repeat1", - [aux_sym__field_list_repeat1] = "_field_list_repeat1", -}; - -static const TSSymbol ts_symbol_map[] = { - [ts_builtin_sym_end] = ts_builtin_sym_end, - [sym_identifier] = sym_identifier, - [sym_hash_bang_line] = sym_hash_bang_line, - [anon_sym_return] = anon_sym_return, - [anon_sym_SEMI] = anon_sym_SEMI, - [anon_sym_EQ] = anon_sym_EQ, - [anon_sym_COMMA] = anon_sym_COMMA, - [anon_sym_COLON_COLON] = anon_sym_COLON_COLON, - [sym_break_statement] = sym_break_statement, - [anon_sym_goto] = anon_sym_goto, - [anon_sym_do] = anon_sym_do, - [anon_sym_end] = anon_sym_end, - [anon_sym_while] = anon_sym_while, - [anon_sym_repeat] = anon_sym_repeat, - [anon_sym_until] = anon_sym_until, - [anon_sym_if] = anon_sym_if, - [anon_sym_then] = anon_sym_then, - [anon_sym_elseif] = anon_sym_elseif, - [anon_sym_else] = anon_sym_else, - [anon_sym_for] = anon_sym_for, - [anon_sym_in] = anon_sym_in, - [anon_sym_function] = anon_sym_function, - [anon_sym_local] = anon_sym_local, - [anon_sym_DOT] = anon_sym_DOT, - [anon_sym_COLON] = anon_sym_COLON, - [sym_nil] = sym_nil, - [sym_false] = sym_false, - [sym_true] = sym_true, - [sym_number] = sym_number, - [sym_vararg_expression] = sym_vararg_expression, - [anon_sym_LPAREN] = anon_sym_LPAREN, - [anon_sym_RPAREN] = anon_sym_RPAREN, - [anon_sym_LBRACK] = anon_sym_LBRACK, - [anon_sym_RBRACK] = anon_sym_RBRACK, - [anon_sym_LBRACE] = anon_sym_LBRACE, - [anon_sym_RBRACE] = anon_sym_RBRACE, - [anon_sym_or] = anon_sym_or, - [anon_sym_and] = anon_sym_and, - [anon_sym_LT] = anon_sym_LT, - [anon_sym_LT_EQ] = anon_sym_LT_EQ, - [anon_sym_EQ_EQ] = anon_sym_EQ_EQ, - [anon_sym_TILDE_EQ] = anon_sym_TILDE_EQ, - [anon_sym_GT_EQ] = anon_sym_GT_EQ, - [anon_sym_GT] = anon_sym_GT, - [anon_sym_PIPE] = anon_sym_PIPE, - [anon_sym_TILDE] = anon_sym_TILDE, - [anon_sym_AMP] = anon_sym_AMP, - [anon_sym_LT_LT] = anon_sym_LT_LT, - [anon_sym_GT_GT] = anon_sym_GT_GT, - [anon_sym_PLUS] = anon_sym_PLUS, - [anon_sym_DASH] = anon_sym_DASH, - [anon_sym_STAR] = anon_sym_STAR, - [anon_sym_SLASH] = anon_sym_SLASH, - [anon_sym_SLASH_SLASH] = anon_sym_SLASH_SLASH, - [anon_sym_PERCENT] = anon_sym_PERCENT, - [anon_sym_DOT_DOT] = anon_sym_DOT_DOT, - [anon_sym_CARET] = anon_sym_CARET, - [anon_sym_not] = anon_sym_not, - [anon_sym_POUND] = anon_sym_POUND, - [anon_sym_DASH_DASH] = sym__block_comment_start, - [aux_sym_comment_token1] = sym__block_comment_content, - [sym__block_comment_start] = sym__block_comment_start, - [sym__block_comment_content] = sym__block_comment_content, - [sym__block_comment_end] = sym__block_comment_end, - [sym__string_start] = sym__string_start, - [sym__string_content] = sym__string_content, - [sym__string_end] = sym__string_end, - [sym_chunk] = sym_chunk, - [sym__block] = sym__block, - [sym_statement] = sym_statement, - [sym_return_statement] = sym_return_statement, - [sym_empty_statement] = sym_empty_statement, - [sym_assignment_statement] = sym_assignment_statement, - [sym__variable_assignment_varlist] = sym__variable_assignment_varlist, - [sym__variable_assignment_explist] = sym__variable_assignment_explist, - [sym_label_statement] = sym_label_statement, - [sym_goto_statement] = sym_goto_statement, - [sym_do_statement] = sym_do_statement, - [sym_while_statement] = sym_while_statement, - [sym_repeat_statement] = sym_repeat_statement, - [sym_if_statement] = sym_if_statement, - [sym_elseif_statement] = sym_elseif_statement, - [sym_else_statement] = sym_else_statement, - [sym_for_statement] = sym_for_statement, - [sym_for_generic_clause] = sym_for_generic_clause, - [sym_for_numeric_clause] = sym_for_numeric_clause, - [sym_declaration] = sym_declaration, - [sym_function_declaration] = sym_function_declaration, - [sym__local_function_declaration] = sym_function_declaration, - [sym__function_name] = sym__function_name, - [sym__function_name_prefix_expression] = sym__function_name_prefix_expression, - [sym__function_name_dot_index_expression] = sym_dot_index_expression, - [sym__function_name_method_index_expression] = sym_method_index_expression, - [sym_variable_declaration] = sym_variable_declaration, - [sym__local_variable_assignment] = sym_assignment_statement, - [sym__name_list] = sym__variable_assignment_varlist, - [sym__expression_list] = sym__variable_assignment_explist, - [sym_expression] = sym_expression, - [sym_string] = sym_string, - [sym_function_definition] = sym_function_definition, - [sym__function_body] = sym__function_body, - [sym_parameters] = sym_parameters, - [sym__parameter_list] = sym__parameter_list, - [sym__prefix_expression] = sym__prefix_expression, - [sym_variable] = sym_variable, - [sym_bracket_index_expression] = sym_bracket_index_expression, - [sym_dot_index_expression] = sym_dot_index_expression, - [sym_function_call] = sym_function_call, - [sym_method_index_expression] = sym_method_index_expression, - [sym_arguments] = sym_arguments, - [sym_parenthesized_expression] = sym_parenthesized_expression, - [sym_table_constructor] = sym_table_constructor, - [sym__field_list] = sym__field_list, - [sym__field_sep] = sym__field_sep, - [sym_field] = sym_field, - [sym_binary_expression] = sym_binary_expression, - [sym_unary_expression] = sym_unary_expression, - [sym_comment] = sym_comment, - [aux_sym_chunk_repeat1] = aux_sym_chunk_repeat1, - [aux_sym__variable_assignment_varlist_repeat1] = aux_sym__variable_assignment_varlist_repeat1, - [aux_sym__variable_assignment_explist_repeat1] = aux_sym__variable_assignment_explist_repeat1, - [aux_sym_if_statement_repeat1] = aux_sym_if_statement_repeat1, - [aux_sym__name_list_repeat1] = aux_sym__name_list_repeat1, - [aux_sym__expression_list_repeat1] = aux_sym__expression_list_repeat1, - [aux_sym__field_list_repeat1] = aux_sym__field_list_repeat1, -}; - -static const TSSymbolMetadata ts_symbol_metadata[] = { - [ts_builtin_sym_end] = { - .visible = false, - .named = true, - }, - [sym_identifier] = { - .visible = true, - .named = true, - }, - [sym_hash_bang_line] = { - .visible = true, - .named = true, - }, - [anon_sym_return] = { - .visible = true, - .named = false, - }, - [anon_sym_SEMI] = { - .visible = true, - .named = false, - }, - [anon_sym_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_COMMA] = { - .visible = true, - .named = false, - }, - [anon_sym_COLON_COLON] = { - .visible = true, - .named = false, - }, - [sym_break_statement] = { - .visible = true, - .named = true, - }, - [anon_sym_goto] = { - .visible = true, - .named = false, - }, - [anon_sym_do] = { - .visible = true, - .named = false, - }, - [anon_sym_end] = { - .visible = true, - .named = false, - }, - [anon_sym_while] = { - .visible = true, - .named = false, - }, - [anon_sym_repeat] = { - .visible = true, - .named = false, - }, - [anon_sym_until] = { - .visible = true, - .named = false, - }, - [anon_sym_if] = { - .visible = true, - .named = false, - }, - [anon_sym_then] = { - .visible = true, - .named = false, - }, - [anon_sym_elseif] = { - .visible = true, - .named = false, - }, - [anon_sym_else] = { - .visible = true, - .named = false, - }, - [anon_sym_for] = { - .visible = true, - .named = false, - }, - [anon_sym_in] = { - .visible = true, - .named = false, - }, - [anon_sym_function] = { - .visible = true, - .named = false, - }, - [anon_sym_local] = { - .visible = true, - .named = false, - }, - [anon_sym_DOT] = { - .visible = true, - .named = false, - }, - [anon_sym_COLON] = { - .visible = true, - .named = false, - }, - [sym_nil] = { - .visible = true, - .named = true, - }, - [sym_false] = { - .visible = true, - .named = true, - }, - [sym_true] = { - .visible = true, - .named = true, - }, - [sym_number] = { - .visible = true, - .named = true, - }, - [sym_vararg_expression] = { - .visible = true, - .named = true, - }, - [anon_sym_LPAREN] = { - .visible = true, - .named = false, - }, - [anon_sym_RPAREN] = { - .visible = true, - .named = false, - }, - [anon_sym_LBRACK] = { - .visible = true, - .named = false, - }, - [anon_sym_RBRACK] = { - .visible = true, - .named = false, - }, - [anon_sym_LBRACE] = { - .visible = true, - .named = false, - }, - [anon_sym_RBRACE] = { - .visible = true, - .named = false, - }, - [anon_sym_or] = { - .visible = true, - .named = false, - }, - [anon_sym_and] = { - .visible = true, - .named = false, - }, - [anon_sym_LT] = { - .visible = true, - .named = false, - }, - [anon_sym_LT_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_EQ_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_TILDE_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_GT_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_GT] = { - .visible = true, - .named = false, - }, - [anon_sym_PIPE] = { - .visible = true, - .named = false, - }, - [anon_sym_TILDE] = { - .visible = true, - .named = false, - }, - [anon_sym_AMP] = { - .visible = true, - .named = false, - }, - [anon_sym_LT_LT] = { - .visible = true, - .named = false, - }, - [anon_sym_GT_GT] = { - .visible = true, - .named = false, - }, - [anon_sym_PLUS] = { - .visible = true, - .named = false, - }, - [anon_sym_DASH] = { - .visible = true, - .named = false, - }, - [anon_sym_STAR] = { - .visible = true, - .named = false, - }, - [anon_sym_SLASH] = { - .visible = true, - .named = false, - }, - [anon_sym_SLASH_SLASH] = { - .visible = true, - .named = false, - }, - [anon_sym_PERCENT] = { - .visible = true, - .named = false, - }, - [anon_sym_DOT_DOT] = { - .visible = true, - .named = false, - }, - [anon_sym_CARET] = { - .visible = true, - .named = false, - }, - [anon_sym_not] = { - .visible = true, - .named = false, - }, - [anon_sym_POUND] = { - .visible = true, - .named = false, - }, - [anon_sym_DASH_DASH] = { - .visible = true, - .named = false, - }, - [aux_sym_comment_token1] = { - .visible = true, - .named = false, - }, - [sym__block_comment_start] = { - .visible = true, - .named = false, - }, - [sym__block_comment_content] = { - .visible = true, - .named = false, - }, - [sym__block_comment_end] = { - .visible = true, - .named = false, - }, - [sym__string_start] = { - .visible = true, - .named = false, - }, - [sym__string_content] = { - .visible = true, - .named = false, - }, - [sym__string_end] = { - .visible = true, - .named = false, - }, - [sym_chunk] = { - .visible = true, - .named = true, - }, - [sym__block] = { - .visible = true, - .named = true, - }, - [sym_statement] = { - .visible = false, - .named = true, - .supertype = true, - }, - [sym_return_statement] = { - .visible = true, - .named = true, - }, - [sym_empty_statement] = { - .visible = true, - .named = true, - }, - [sym_assignment_statement] = { - .visible = true, - .named = true, - }, - [sym__variable_assignment_varlist] = { - .visible = true, - .named = true, - }, - [sym__variable_assignment_explist] = { - .visible = true, - .named = true, - }, - [sym_label_statement] = { - .visible = true, - .named = true, - }, - [sym_goto_statement] = { - .visible = true, - .named = true, - }, - [sym_do_statement] = { - .visible = true, - .named = true, - }, - [sym_while_statement] = { - .visible = true, - .named = true, - }, - [sym_repeat_statement] = { - .visible = true, - .named = true, - }, - [sym_if_statement] = { - .visible = true, - .named = true, - }, - [sym_elseif_statement] = { - .visible = true, - .named = true, - }, - [sym_else_statement] = { - .visible = true, - .named = true, - }, - [sym_for_statement] = { - .visible = true, - .named = true, - }, - [sym_for_generic_clause] = { - .visible = true, - .named = true, - }, - [sym_for_numeric_clause] = { - .visible = true, - .named = true, - }, - [sym_declaration] = { - .visible = false, - .named = true, - .supertype = true, - }, - [sym_function_declaration] = { - .visible = true, - .named = true, - }, - [sym__local_function_declaration] = { - .visible = true, - .named = true, - }, - [sym__function_name] = { - .visible = false, - .named = true, - }, - [sym__function_name_prefix_expression] = { - .visible = false, - .named = true, - }, - [sym__function_name_dot_index_expression] = { - .visible = true, - .named = true, - }, - [sym__function_name_method_index_expression] = { - .visible = true, - .named = true, - }, - [sym_variable_declaration] = { - .visible = true, - .named = true, - }, - [sym__local_variable_assignment] = { - .visible = true, - .named = true, - }, - [sym__name_list] = { - .visible = true, - .named = true, - }, - [sym__expression_list] = { - .visible = true, - .named = true, - }, - [sym_expression] = { - .visible = false, - .named = true, - .supertype = true, - }, - [sym_string] = { - .visible = true, - .named = true, - }, - [sym_function_definition] = { - .visible = true, - .named = true, - }, - [sym__function_body] = { - .visible = false, - .named = true, - }, - [sym_parameters] = { - .visible = true, - .named = true, - }, - [sym__parameter_list] = { - .visible = false, - .named = true, - }, - [sym__prefix_expression] = { - .visible = false, - .named = true, - }, - [sym_variable] = { - .visible = false, - .named = true, - .supertype = true, - }, - [sym_bracket_index_expression] = { - .visible = true, - .named = true, - }, - [sym_dot_index_expression] = { - .visible = true, - .named = true, - }, - [sym_function_call] = { - .visible = true, - .named = true, - }, - [sym_method_index_expression] = { - .visible = true, - .named = true, - }, - [sym_arguments] = { - .visible = true, - .named = true, - }, - [sym_parenthesized_expression] = { - .visible = true, - .named = true, - }, - [sym_table_constructor] = { - .visible = true, - .named = true, - }, - [sym__field_list] = { - .visible = false, - .named = true, - }, - [sym__field_sep] = { - .visible = false, - .named = true, - }, - [sym_field] = { - .visible = true, - .named = true, - }, - [sym_binary_expression] = { - .visible = true, - .named = true, - }, - [sym_unary_expression] = { - .visible = true, - .named = true, - }, - [sym_comment] = { - .visible = true, - .named = true, - }, - [aux_sym_chunk_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym__variable_assignment_varlist_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym__variable_assignment_explist_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_if_statement_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym__name_list_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym__expression_list_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym__field_list_repeat1] = { - .visible = false, - .named = false, - }, -}; - -enum { - field_alternative = 1, - field_arguments = 2, - field_body = 3, - field_clause = 4, - field_condition = 5, - field_consequence = 6, - field_content = 7, - field_end = 8, - field_field = 9, - field_left = 10, - field_local_declaration = 11, - field_method = 12, - field_name = 13, - field_operand = 14, - field_parameters = 15, - field_right = 16, - field_start = 17, - field_step = 18, - field_table = 19, - field_value = 20, -}; - -static const char * const ts_field_names[] = { - [0] = NULL, - [field_alternative] = "alternative", - [field_arguments] = "arguments", - [field_body] = "body", - [field_clause] = "clause", - [field_condition] = "condition", - [field_consequence] = "consequence", - [field_content] = "content", - [field_end] = "end", - [field_field] = "field", - [field_left] = "left", - [field_local_declaration] = "local_declaration", - [field_method] = "method", - [field_name] = "name", - [field_operand] = "operand", - [field_parameters] = "parameters", - [field_right] = "right", - [field_start] = "start", - [field_step] = "step", - [field_table] = "table", - [field_value] = "value", -}; - -static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { - [1] = {.index = 0, .length = 1}, - [2] = {.index = 1, .length = 4}, - [3] = {.index = 5, .length = 1}, - [4] = {.index = 6, .length = 1}, - [5] = {.index = 7, .length = 2}, - [6] = {.index = 9, .length = 2}, - [7] = {.index = 11, .length = 2}, - [8] = {.index = 13, .length = 2}, - [9] = {.index = 15, .length = 1}, - [10] = {.index = 16, .length = 2}, - [11] = {.index = 18, .length = 2}, - [12] = {.index = 20, .length = 3}, - [13] = {.index = 23, .length = 2}, - [14] = {.index = 25, .length = 1}, - [15] = {.index = 26, .length = 1}, - [16] = {.index = 27, .length = 1}, - [17] = {.index = 28, .length = 1}, - [18] = {.index = 29, .length = 3}, - [19] = {.index = 32, .length = 2}, - [20] = {.index = 34, .length = 2}, - [21] = {.index = 36, .length = 2}, - [22] = {.index = 38, .length = 1}, - [23] = {.index = 39, .length = 2}, - [24] = {.index = 41, .length = 1}, - [25] = {.index = 42, .length = 2}, - [26] = {.index = 44, .length = 1}, - [27] = {.index = 45, .length = 2}, - [28] = {.index = 47, .length = 1}, - [29] = {.index = 48, .length = 1}, - [30] = {.index = 49, .length = 1}, - [31] = {.index = 50, .length = 3}, - [32] = {.index = 53, .length = 2}, - [33] = {.index = 55, .length = 2}, - [34] = {.index = 57, .length = 2}, - [35] = {.index = 59, .length = 2}, - [36] = {.index = 61, .length = 2}, - [37] = {.index = 63, .length = 2}, - [38] = {.index = 65, .length = 2}, - [39] = {.index = 67, .length = 2}, - [40] = {.index = 69, .length = 2}, - [41] = {.index = 71, .length = 1}, - [42] = {.index = 72, .length = 2}, - [43] = {.index = 74, .length = 3}, - [44] = {.index = 77, .length = 3}, - [45] = {.index = 80, .length = 3}, - [46] = {.index = 83, .length = 3}, - [47] = {.index = 86, .length = 2}, - [48] = {.index = 88, .length = 4}, - [49] = {.index = 92, .length = 4}, -}; - -static const TSFieldMapEntry ts_field_map_entries[] = { - [0] = - {field_local_declaration, 0, .inherited = true}, - [1] = - {field_body, 0, .inherited = true}, - {field_local_declaration, 0}, - {field_name, 0, .inherited = true}, - {field_parameters, 0, .inherited = true}, - [5] = - {field_local_declaration, 0}, - [6] = - {field_name, 0}, - [7] = - {field_end, 1}, - {field_start, 0}, - [9] = - {field_content, 1}, - {field_start, 0}, - [11] = - {field_field, 0, .inherited = true}, - {field_table, 0, .inherited = true}, - [13] = - {field_method, 0, .inherited = true}, - {field_table, 0, .inherited = true}, - [15] = - {field_name, 1, .inherited = true}, - [16] = - {field_arguments, 1}, - {field_name, 0}, - [18] = - {field_name, 0}, - {field_name, 1, .inherited = true}, - [20] = - {field_content, 1}, - {field_end, 2}, - {field_start, 0}, - [23] = - {field_body, 1, .inherited = true}, - {field_parameters, 1, .inherited = true}, - [25] = - {field_value, 0}, - [26] = - {field_operand, 1}, - [27] = - {field_body, 1}, - [28] = - {field_condition, 2}, - [29] = - {field_body, 2, .inherited = true}, - {field_name, 1}, - {field_parameters, 2, .inherited = true}, - [32] = - {field_name, 0, .inherited = true}, - {field_value, 2, .inherited = true}, - [34] = - {field_field, 2}, - {field_table, 0}, - [36] = - {field_method, 2}, - {field_table, 0}, - [38] = - {field_name, 1}, - [39] = - {field_name, 0, .inherited = true}, - {field_name, 1, .inherited = true}, - [41] = - {field_parameters, 0}, - [42] = - {field_left, 0}, - {field_right, 2}, - [44] = - {field_condition, 1}, - [45] = - {field_body, 1}, - {field_condition, 3}, - [47] = - {field_alternative, 0}, - [48] = - {field_clause, 1}, - [49] = - {field_name, 0, .inherited = true}, - [50] = - {field_body, 3, .inherited = true}, - {field_name, 2}, - {field_parameters, 3, .inherited = true}, - [53] = - {field_value, 0}, - {field_value, 1, .inherited = true}, - [55] = - {field_body, 1}, - {field_parameters, 0}, - [57] = - {field_name, 0}, - {field_value, 2}, - [59] = - {field_body, 3}, - {field_condition, 1}, - [61] = - {field_condition, 1}, - {field_consequence, 3}, - [63] = - {field_alternative, 3}, - {field_condition, 1}, - [65] = - {field_alternative, 3, .inherited = true}, - {field_condition, 1}, - [67] = - {field_alternative, 0, .inherited = true}, - {field_alternative, 1, .inherited = true}, - [69] = - {field_body, 3}, - {field_clause, 1}, - [71] = - {field_value, 1}, - [72] = - {field_value, 0, .inherited = true}, - {field_value, 1, .inherited = true}, - [74] = - {field_alternative, 4}, - {field_condition, 1}, - {field_consequence, 3}, - [77] = - {field_alternative, 4, .inherited = true}, - {field_condition, 1}, - {field_consequence, 3}, - [80] = - {field_alternative, 3, .inherited = true}, - {field_alternative, 4}, - {field_condition, 1}, - [83] = - {field_end, 4}, - {field_name, 0}, - {field_start, 2}, - [86] = - {field_name, 1}, - {field_value, 4}, - [88] = - {field_alternative, 4, .inherited = true}, - {field_alternative, 5}, - {field_condition, 1}, - {field_consequence, 3}, - [92] = - {field_end, 4}, - {field_name, 0}, - {field_start, 2}, - {field_step, 6}, -}; - -static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { - [0] = {0}, -}; - -static const uint16_t ts_non_terminal_alias_map[] = { - 0, -}; - -static bool ts_lex(TSLexer *lexer, TSStateId state) { - START_LEXER(); - eof = lexer->eof(lexer); - switch (state) { - case 0: - if (eof) ADVANCE(10); - if (lookahead == '#') ADVANCE(53); - if (lookahead == '%') ADVANCE(49); - if (lookahead == '&') ADVANCE(41); - if (lookahead == '(') ADVANCE(26); - if (lookahead == ')') ADVANCE(27); - if (lookahead == '*') ADVANCE(46); - if (lookahead == '+') ADVANCE(44); - if (lookahead == ',') ADVANCE(14); - if (lookahead == '-') ADVANCE(45); - if (lookahead == '.') ADVANCE(17); - if (lookahead == '/') ADVANCE(47); - if (lookahead == '0') ADVANCE(19); - if (lookahead == ':') ADVANCE(18); - if (lookahead == ';') ADVANCE(12); - if (lookahead == '<') ADVANCE(32); - if (lookahead == '=') ADVANCE(13); - if (lookahead == '>') ADVANCE(37); - if (lookahead == '[') ADVANCE(28); - if (lookahead == ']') ADVANCE(29); - if (lookahead == '^') ADVANCE(51); - if (lookahead == '{') ADVANCE(30); - if (lookahead == '|') ADVANCE(38); - if (lookahead == '}') ADVANCE(31); - if (lookahead == '~') ADVANCE(40); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(0) - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(20); - if (('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(54); - END_STATE(); - case 1: - if (lookahead == '!') ADVANCE(11); - END_STATE(); - case 2: - if (lookahead == '.') ADVANCE(3); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(22); - END_STATE(); - case 3: - if (lookahead == '.') ADVANCE(25); - END_STATE(); - case 4: - if (lookahead == '+' || - lookahead == '-') ADVANCE(5); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(24); - END_STATE(); - case 5: - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(24); - END_STATE(); - case 6: - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(21); - END_STATE(); - case 7: - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(23); - END_STATE(); - case 8: - if (eof) ADVANCE(10); - if (lookahead == '#') ADVANCE(1); - if (lookahead == '%') ADVANCE(49); - if (lookahead == '&') ADVANCE(41); - if (lookahead == '(') ADVANCE(26); - if (lookahead == ')') ADVANCE(27); - if (lookahead == '*') ADVANCE(46); - if (lookahead == '+') ADVANCE(44); - if (lookahead == ',') ADVANCE(14); - if (lookahead == '-') ADVANCE(45); - if (lookahead == '.') ADVANCE(16); - if (lookahead == '/') ADVANCE(47); - if (lookahead == ':') ADVANCE(18); - if (lookahead == ';') ADVANCE(12); - if (lookahead == '<') ADVANCE(32); - if (lookahead == '=') ADVANCE(13); - if (lookahead == '>') ADVANCE(37); - if (lookahead == '[') ADVANCE(28); - if (lookahead == ']') ADVANCE(29); - if (lookahead == '^') ADVANCE(51); - if (lookahead == '{') ADVANCE(30); - if (lookahead == '|') ADVANCE(38); - if (lookahead == '}') ADVANCE(31); - if (lookahead == '~') ADVANCE(40); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(8) - if (('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(54); - END_STATE(); - case 9: - if (eof) ADVANCE(10); - if (lookahead == '#') ADVANCE(52); - if (lookahead == '(') ADVANCE(26); - if (lookahead == ')') ADVANCE(27); - if (lookahead == '-') ADVANCE(45); - if (lookahead == '.') ADVANCE(2); - if (lookahead == '0') ADVANCE(19); - if (lookahead == ';') ADVANCE(12); - if (lookahead == '[') ADVANCE(28); - if (lookahead == '{') ADVANCE(30); - if (lookahead == '}') ADVANCE(31); - if (lookahead == '~') ADVANCE(39); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(9) - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(20); - if (('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(54); - END_STATE(); - case 10: - ACCEPT_TOKEN(ts_builtin_sym_end); - END_STATE(); - case 11: - ACCEPT_TOKEN(sym_hash_bang_line); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(11); - END_STATE(); - case 12: - ACCEPT_TOKEN(anon_sym_SEMI); - END_STATE(); - case 13: - ACCEPT_TOKEN(anon_sym_EQ); - if (lookahead == '=') ADVANCE(34); - END_STATE(); - case 14: - ACCEPT_TOKEN(anon_sym_COMMA); - END_STATE(); - case 15: - ACCEPT_TOKEN(anon_sym_COLON_COLON); - END_STATE(); - case 16: - ACCEPT_TOKEN(anon_sym_DOT); - if (lookahead == '.') ADVANCE(50); - END_STATE(); - case 17: - ACCEPT_TOKEN(anon_sym_DOT); - if (lookahead == '.') ADVANCE(50); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(22); - END_STATE(); - case 18: - ACCEPT_TOKEN(anon_sym_COLON); - if (lookahead == ':') ADVANCE(15); - END_STATE(); - case 19: - ACCEPT_TOKEN(sym_number); - if (lookahead == '.') ADVANCE(22); - if (lookahead == 'E' || - lookahead == 'e') ADVANCE(4); - if (lookahead == 'X' || - lookahead == 'x') ADVANCE(6); - if (('1' <= lookahead && lookahead <= '9')) ADVANCE(20); - END_STATE(); - case 20: - ACCEPT_TOKEN(sym_number); - if (lookahead == '.') ADVANCE(22); - if (lookahead == 'E' || - lookahead == 'e') ADVANCE(4); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(20); - END_STATE(); - case 21: - ACCEPT_TOKEN(sym_number); - if (lookahead == '.') ADVANCE(7); - if (lookahead == 'P' || - lookahead == 'p') ADVANCE(4); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(21); - END_STATE(); - case 22: - ACCEPT_TOKEN(sym_number); - if (lookahead == 'E' || - lookahead == 'e') ADVANCE(4); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(22); - END_STATE(); - case 23: - ACCEPT_TOKEN(sym_number); - if (lookahead == 'P' || - lookahead == 'p') ADVANCE(4); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(23); - END_STATE(); - case 24: - ACCEPT_TOKEN(sym_number); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(24); - END_STATE(); - case 25: - ACCEPT_TOKEN(sym_vararg_expression); - END_STATE(); - case 26: - ACCEPT_TOKEN(anon_sym_LPAREN); - END_STATE(); - case 27: - ACCEPT_TOKEN(anon_sym_RPAREN); - END_STATE(); - case 28: - ACCEPT_TOKEN(anon_sym_LBRACK); - END_STATE(); - case 29: - ACCEPT_TOKEN(anon_sym_RBRACK); - END_STATE(); - case 30: - ACCEPT_TOKEN(anon_sym_LBRACE); - END_STATE(); - case 31: - ACCEPT_TOKEN(anon_sym_RBRACE); - END_STATE(); - case 32: - ACCEPT_TOKEN(anon_sym_LT); - if (lookahead == '<') ADVANCE(42); - if (lookahead == '=') ADVANCE(33); - END_STATE(); - case 33: - ACCEPT_TOKEN(anon_sym_LT_EQ); - END_STATE(); - case 34: - ACCEPT_TOKEN(anon_sym_EQ_EQ); - END_STATE(); - case 35: - ACCEPT_TOKEN(anon_sym_TILDE_EQ); - END_STATE(); - case 36: - ACCEPT_TOKEN(anon_sym_GT_EQ); - END_STATE(); - case 37: - ACCEPT_TOKEN(anon_sym_GT); - if (lookahead == '=') ADVANCE(36); - if (lookahead == '>') ADVANCE(43); - END_STATE(); - case 38: - ACCEPT_TOKEN(anon_sym_PIPE); - END_STATE(); - case 39: - ACCEPT_TOKEN(anon_sym_TILDE); - END_STATE(); - case 40: - ACCEPT_TOKEN(anon_sym_TILDE); - if (lookahead == '=') ADVANCE(35); - END_STATE(); - case 41: - ACCEPT_TOKEN(anon_sym_AMP); - END_STATE(); - case 42: - ACCEPT_TOKEN(anon_sym_LT_LT); - END_STATE(); - case 43: - ACCEPT_TOKEN(anon_sym_GT_GT); - END_STATE(); - case 44: - ACCEPT_TOKEN(anon_sym_PLUS); - END_STATE(); - case 45: - ACCEPT_TOKEN(anon_sym_DASH); - if (lookahead == '-') ADVANCE(55); - END_STATE(); - case 46: - ACCEPT_TOKEN(anon_sym_STAR); - END_STATE(); - case 47: - ACCEPT_TOKEN(anon_sym_SLASH); - if (lookahead == '/') ADVANCE(48); - END_STATE(); - case 48: - ACCEPT_TOKEN(anon_sym_SLASH_SLASH); - END_STATE(); - case 49: - ACCEPT_TOKEN(anon_sym_PERCENT); - END_STATE(); - case 50: - ACCEPT_TOKEN(anon_sym_DOT_DOT); - END_STATE(); - case 51: - ACCEPT_TOKEN(anon_sym_CARET); - END_STATE(); - case 52: - ACCEPT_TOKEN(anon_sym_POUND); - END_STATE(); - case 53: - ACCEPT_TOKEN(anon_sym_POUND); - if (lookahead == '!') ADVANCE(11); - END_STATE(); - case 54: - ACCEPT_TOKEN(sym_identifier); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(54); - END_STATE(); - case 55: - ACCEPT_TOKEN(anon_sym_DASH_DASH); - END_STATE(); - case 56: - ACCEPT_TOKEN(anon_sym_DASH_DASH); - if (lookahead != 0 && - lookahead != '\n' && - lookahead != '\r') ADVANCE(59); - END_STATE(); - case 57: - ACCEPT_TOKEN(aux_sym_comment_token1); - if (lookahead == '-') ADVANCE(58); - if (lookahead == '\t' || - lookahead == ' ') ADVANCE(57); - if (lookahead != 0 && - lookahead != '\n' && - lookahead != '\r') ADVANCE(59); - END_STATE(); - case 58: - ACCEPT_TOKEN(aux_sym_comment_token1); - if (lookahead == '-') ADVANCE(56); - if (lookahead != 0 && - lookahead != '\n' && - lookahead != '\r') ADVANCE(59); - END_STATE(); - case 59: - ACCEPT_TOKEN(aux_sym_comment_token1); - if (lookahead != 0 && - lookahead != '\n' && - lookahead != '\r') ADVANCE(59); - END_STATE(); - default: - return false; - } -} - -static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { - START_LEXER(); - eof = lexer->eof(lexer); - switch (state) { - case 0: - if (lookahead == 'a') ADVANCE(1); - if (lookahead == 'b') ADVANCE(2); - if (lookahead == 'd') ADVANCE(3); - if (lookahead == 'e') ADVANCE(4); - if (lookahead == 'f') ADVANCE(5); - if (lookahead == 'g') ADVANCE(6); - if (lookahead == 'i') ADVANCE(7); - if (lookahead == 'l') ADVANCE(8); - if (lookahead == 'n') ADVANCE(9); - if (lookahead == 'o') ADVANCE(10); - if (lookahead == 'r') ADVANCE(11); - if (lookahead == 't') ADVANCE(12); - if (lookahead == 'u') ADVANCE(13); - if (lookahead == 'w') ADVANCE(14); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(0) - END_STATE(); - case 1: - if (lookahead == 'n') ADVANCE(15); - END_STATE(); - case 2: - if (lookahead == 'r') ADVANCE(16); - END_STATE(); - case 3: - if (lookahead == 'o') ADVANCE(17); - END_STATE(); - case 4: - if (lookahead == 'l') ADVANCE(18); - if (lookahead == 'n') ADVANCE(19); - END_STATE(); - case 5: - if (lookahead == 'a') ADVANCE(20); - if (lookahead == 'o') ADVANCE(21); - if (lookahead == 'u') ADVANCE(22); - END_STATE(); - case 6: - if (lookahead == 'o') ADVANCE(23); - END_STATE(); - case 7: - if (lookahead == 'f') ADVANCE(24); - if (lookahead == 'n') ADVANCE(25); - END_STATE(); - case 8: - if (lookahead == 'o') ADVANCE(26); - END_STATE(); - case 9: - if (lookahead == 'i') ADVANCE(27); - if (lookahead == 'o') ADVANCE(28); - END_STATE(); - case 10: - if (lookahead == 'r') ADVANCE(29); - END_STATE(); - case 11: - if (lookahead == 'e') ADVANCE(30); - END_STATE(); - case 12: - if (lookahead == 'h') ADVANCE(31); - if (lookahead == 'r') ADVANCE(32); - END_STATE(); - case 13: - if (lookahead == 'n') ADVANCE(33); - END_STATE(); - case 14: - if (lookahead == 'h') ADVANCE(34); - END_STATE(); - case 15: - if (lookahead == 'd') ADVANCE(35); - END_STATE(); - case 16: - if (lookahead == 'e') ADVANCE(36); - END_STATE(); - case 17: - ACCEPT_TOKEN(anon_sym_do); - END_STATE(); - case 18: - if (lookahead == 's') ADVANCE(37); - END_STATE(); - case 19: - if (lookahead == 'd') ADVANCE(38); - END_STATE(); - case 20: - if (lookahead == 'l') ADVANCE(39); - END_STATE(); - case 21: - if (lookahead == 'r') ADVANCE(40); - END_STATE(); - case 22: - if (lookahead == 'n') ADVANCE(41); - END_STATE(); - case 23: - if (lookahead == 't') ADVANCE(42); - END_STATE(); - case 24: - ACCEPT_TOKEN(anon_sym_if); - END_STATE(); - case 25: - ACCEPT_TOKEN(anon_sym_in); - END_STATE(); - case 26: - if (lookahead == 'c') ADVANCE(43); - END_STATE(); - case 27: - if (lookahead == 'l') ADVANCE(44); - END_STATE(); - case 28: - if (lookahead == 't') ADVANCE(45); - END_STATE(); - case 29: - ACCEPT_TOKEN(anon_sym_or); - END_STATE(); - case 30: - if (lookahead == 'p') ADVANCE(46); - if (lookahead == 't') ADVANCE(47); - END_STATE(); - case 31: - if (lookahead == 'e') ADVANCE(48); - END_STATE(); - case 32: - if (lookahead == 'u') ADVANCE(49); - END_STATE(); - case 33: - if (lookahead == 't') ADVANCE(50); - END_STATE(); - case 34: - if (lookahead == 'i') ADVANCE(51); - END_STATE(); - case 35: - ACCEPT_TOKEN(anon_sym_and); - END_STATE(); - case 36: - if (lookahead == 'a') ADVANCE(52); - END_STATE(); - case 37: - if (lookahead == 'e') ADVANCE(53); - END_STATE(); - case 38: - ACCEPT_TOKEN(anon_sym_end); - END_STATE(); - case 39: - if (lookahead == 's') ADVANCE(54); - END_STATE(); - case 40: - ACCEPT_TOKEN(anon_sym_for); - END_STATE(); - case 41: - if (lookahead == 'c') ADVANCE(55); - END_STATE(); - case 42: - if (lookahead == 'o') ADVANCE(56); - END_STATE(); - case 43: - if (lookahead == 'a') ADVANCE(57); - END_STATE(); - case 44: - ACCEPT_TOKEN(sym_nil); - END_STATE(); - case 45: - ACCEPT_TOKEN(anon_sym_not); - END_STATE(); - case 46: - if (lookahead == 'e') ADVANCE(58); - END_STATE(); - case 47: - if (lookahead == 'u') ADVANCE(59); - END_STATE(); - case 48: - if (lookahead == 'n') ADVANCE(60); - END_STATE(); - case 49: - if (lookahead == 'e') ADVANCE(61); - END_STATE(); - case 50: - if (lookahead == 'i') ADVANCE(62); - END_STATE(); - case 51: - if (lookahead == 'l') ADVANCE(63); - END_STATE(); - case 52: - if (lookahead == 'k') ADVANCE(64); - END_STATE(); - case 53: - ACCEPT_TOKEN(anon_sym_else); - if (lookahead == 'i') ADVANCE(65); - END_STATE(); - case 54: - if (lookahead == 'e') ADVANCE(66); - END_STATE(); - case 55: - if (lookahead == 't') ADVANCE(67); - END_STATE(); - case 56: - ACCEPT_TOKEN(anon_sym_goto); - END_STATE(); - case 57: - if (lookahead == 'l') ADVANCE(68); - END_STATE(); - case 58: - if (lookahead == 'a') ADVANCE(69); - END_STATE(); - case 59: - if (lookahead == 'r') ADVANCE(70); - END_STATE(); - case 60: - ACCEPT_TOKEN(anon_sym_then); - END_STATE(); - case 61: - ACCEPT_TOKEN(sym_true); - END_STATE(); - case 62: - if (lookahead == 'l') ADVANCE(71); - END_STATE(); - case 63: - if (lookahead == 'e') ADVANCE(72); - END_STATE(); - case 64: - ACCEPT_TOKEN(sym_break_statement); - END_STATE(); - case 65: - if (lookahead == 'f') ADVANCE(73); - END_STATE(); - case 66: - ACCEPT_TOKEN(sym_false); - END_STATE(); - case 67: - if (lookahead == 'i') ADVANCE(74); - END_STATE(); - case 68: - ACCEPT_TOKEN(anon_sym_local); - END_STATE(); - case 69: - if (lookahead == 't') ADVANCE(75); - END_STATE(); - case 70: - if (lookahead == 'n') ADVANCE(76); - END_STATE(); - case 71: - ACCEPT_TOKEN(anon_sym_until); - END_STATE(); - case 72: - ACCEPT_TOKEN(anon_sym_while); - END_STATE(); - case 73: - ACCEPT_TOKEN(anon_sym_elseif); - END_STATE(); - case 74: - if (lookahead == 'o') ADVANCE(77); - END_STATE(); - case 75: - ACCEPT_TOKEN(anon_sym_repeat); - END_STATE(); - case 76: - ACCEPT_TOKEN(anon_sym_return); - END_STATE(); - case 77: - if (lookahead == 'n') ADVANCE(78); - END_STATE(); - case 78: - ACCEPT_TOKEN(anon_sym_function); - END_STATE(); - default: - return false; - } -} - -static const TSLexMode ts_lex_modes[STATE_COUNT] = { - [0] = {.lex_state = 0, .external_lex_state = 1}, - [1] = {.lex_state = 8, .external_lex_state = 2}, - [2] = {.lex_state = 8, .external_lex_state = 3}, - [3] = {.lex_state = 8, .external_lex_state = 3}, - [4] = {.lex_state = 8, .external_lex_state = 3}, - [5] = {.lex_state = 8, .external_lex_state = 3}, - [6] = {.lex_state = 8, .external_lex_state = 3}, - [7] = {.lex_state = 8, .external_lex_state = 3}, - [8] = {.lex_state = 8, .external_lex_state = 3}, - [9] = {.lex_state = 8, .external_lex_state = 3}, - [10] = {.lex_state = 8, .external_lex_state = 3}, - [11] = {.lex_state = 8, .external_lex_state = 3}, - [12] = {.lex_state = 8, .external_lex_state = 3}, - [13] = {.lex_state = 8, .external_lex_state = 3}, - [14] = {.lex_state = 8, .external_lex_state = 3}, - [15] = {.lex_state = 8, .external_lex_state = 3}, - [16] = {.lex_state = 0, .external_lex_state = 2}, - [17] = {.lex_state = 0, .external_lex_state = 2}, - [18] = {.lex_state = 0, .external_lex_state = 2}, - [19] = {.lex_state = 0, .external_lex_state = 2}, - [20] = {.lex_state = 0, .external_lex_state = 2}, - [21] = {.lex_state = 0, .external_lex_state = 2}, - [22] = {.lex_state = 0, .external_lex_state = 2}, - [23] = {.lex_state = 0, .external_lex_state = 2}, - [24] = {.lex_state = 0, .external_lex_state = 2}, - [25] = {.lex_state = 0, .external_lex_state = 2}, - [26] = {.lex_state = 0, .external_lex_state = 2}, - [27] = {.lex_state = 0, .external_lex_state = 2}, - [28] = {.lex_state = 0, .external_lex_state = 2}, - [29] = {.lex_state = 0, .external_lex_state = 2}, - [30] = {.lex_state = 0, .external_lex_state = 2}, - [31] = {.lex_state = 0, .external_lex_state = 2}, - [32] = {.lex_state = 0, .external_lex_state = 2}, - [33] = {.lex_state = 0, .external_lex_state = 2}, - [34] = {.lex_state = 0, .external_lex_state = 2}, - [35] = {.lex_state = 0, .external_lex_state = 2}, - [36] = {.lex_state = 0, .external_lex_state = 2}, - [37] = {.lex_state = 0, .external_lex_state = 2}, - [38] = {.lex_state = 0, .external_lex_state = 2}, - [39] = {.lex_state = 0, .external_lex_state = 2}, - [40] = {.lex_state = 0, .external_lex_state = 2}, - [41] = {.lex_state = 0, .external_lex_state = 2}, - [42] = {.lex_state = 0, .external_lex_state = 2}, - [43] = {.lex_state = 0, .external_lex_state = 2}, - [44] = {.lex_state = 0, .external_lex_state = 2}, - [45] = {.lex_state = 0, .external_lex_state = 2}, - [46] = {.lex_state = 0, .external_lex_state = 2}, - [47] = {.lex_state = 0, .external_lex_state = 2}, - [48] = {.lex_state = 0, .external_lex_state = 2}, - [49] = {.lex_state = 0, .external_lex_state = 2}, - [50] = {.lex_state = 0, .external_lex_state = 2}, - [51] = {.lex_state = 0, .external_lex_state = 2}, - [52] = {.lex_state = 0, .external_lex_state = 2}, - [53] = {.lex_state = 9, .external_lex_state = 3}, - [54] = {.lex_state = 9, .external_lex_state = 3}, - [55] = {.lex_state = 9, .external_lex_state = 3}, - [56] = {.lex_state = 8, .external_lex_state = 3}, - [57] = {.lex_state = 9, .external_lex_state = 3}, - [58] = {.lex_state = 0, .external_lex_state = 2}, - [59] = {.lex_state = 9, .external_lex_state = 3}, - [60] = {.lex_state = 0, .external_lex_state = 2}, - [61] = {.lex_state = 9, .external_lex_state = 3}, - [62] = {.lex_state = 9, .external_lex_state = 3}, - [63] = {.lex_state = 9, .external_lex_state = 3}, - [64] = {.lex_state = 9, .external_lex_state = 3}, - [65] = {.lex_state = 9, .external_lex_state = 3}, - [66] = {.lex_state = 9, .external_lex_state = 3}, - [67] = {.lex_state = 9, .external_lex_state = 3}, - [68] = {.lex_state = 9, .external_lex_state = 3}, - [69] = {.lex_state = 9, .external_lex_state = 3}, - [70] = {.lex_state = 9, .external_lex_state = 3}, - [71] = {.lex_state = 9, .external_lex_state = 3}, - [72] = {.lex_state = 9, .external_lex_state = 3}, - [73] = {.lex_state = 9, .external_lex_state = 3}, - [74] = {.lex_state = 9, .external_lex_state = 3}, - [75] = {.lex_state = 9, .external_lex_state = 3}, - [76] = {.lex_state = 9, .external_lex_state = 3}, - [77] = {.lex_state = 9, .external_lex_state = 3}, - [78] = {.lex_state = 9, .external_lex_state = 3}, - [79] = {.lex_state = 9, .external_lex_state = 3}, - [80] = {.lex_state = 9, .external_lex_state = 3}, - [81] = {.lex_state = 9, .external_lex_state = 3}, - [82] = {.lex_state = 9, .external_lex_state = 3}, - [83] = {.lex_state = 9, .external_lex_state = 3}, - [84] = {.lex_state = 9, .external_lex_state = 3}, - [85] = {.lex_state = 9, .external_lex_state = 3}, - [86] = {.lex_state = 9, .external_lex_state = 3}, - [87] = {.lex_state = 9, .external_lex_state = 3}, - [88] = {.lex_state = 9, .external_lex_state = 3}, - [89] = {.lex_state = 9, .external_lex_state = 3}, - [90] = {.lex_state = 9, .external_lex_state = 3}, - [91] = {.lex_state = 9, .external_lex_state = 3}, - [92] = {.lex_state = 9, .external_lex_state = 3}, - [93] = {.lex_state = 0, .external_lex_state = 2}, - [94] = {.lex_state = 0, .external_lex_state = 2}, - [95] = {.lex_state = 0, .external_lex_state = 2}, - [96] = {.lex_state = 8, .external_lex_state = 3}, - [97] = {.lex_state = 0, .external_lex_state = 2}, - [98] = {.lex_state = 0, .external_lex_state = 2}, - [99] = {.lex_state = 0, .external_lex_state = 2}, - [100] = {.lex_state = 0, .external_lex_state = 2}, - [101] = {.lex_state = 0, .external_lex_state = 2}, - [102] = {.lex_state = 0, .external_lex_state = 2}, - [103] = {.lex_state = 0, .external_lex_state = 2}, - [104] = {.lex_state = 0, .external_lex_state = 2}, - [105] = {.lex_state = 0, .external_lex_state = 2}, - [106] = {.lex_state = 0, .external_lex_state = 2}, - [107] = {.lex_state = 0, .external_lex_state = 2}, - [108] = {.lex_state = 0, .external_lex_state = 2}, - [109] = {.lex_state = 0, .external_lex_state = 2}, - [110] = {.lex_state = 0, .external_lex_state = 2}, - [111] = {.lex_state = 0, .external_lex_state = 2}, - [112] = {.lex_state = 0, .external_lex_state = 2}, - [113] = {.lex_state = 0, .external_lex_state = 2}, - [114] = {.lex_state = 0, .external_lex_state = 2}, - [115] = {.lex_state = 0, .external_lex_state = 2}, - [116] = {.lex_state = 0, .external_lex_state = 2}, - [117] = {.lex_state = 0, .external_lex_state = 2}, - [118] = {.lex_state = 0, .external_lex_state = 2}, - [119] = {.lex_state = 0, .external_lex_state = 2}, - [120] = {.lex_state = 0, .external_lex_state = 2}, - [121] = {.lex_state = 0, .external_lex_state = 2}, - [122] = {.lex_state = 0, .external_lex_state = 2}, - [123] = {.lex_state = 0, .external_lex_state = 2}, - [124] = {.lex_state = 0, .external_lex_state = 2}, - [125] = {.lex_state = 0, .external_lex_state = 2}, - [126] = {.lex_state = 0, .external_lex_state = 2}, - [127] = {.lex_state = 0, .external_lex_state = 2}, - [128] = {.lex_state = 0, .external_lex_state = 2}, - [129] = {.lex_state = 0, .external_lex_state = 2}, - [130] = {.lex_state = 0, .external_lex_state = 2}, - [131] = {.lex_state = 0, .external_lex_state = 2}, - [132] = {.lex_state = 0, .external_lex_state = 2}, - [133] = {.lex_state = 0, .external_lex_state = 2}, - [134] = {.lex_state = 0, .external_lex_state = 2}, - [135] = {.lex_state = 0, .external_lex_state = 2}, - [136] = {.lex_state = 0, .external_lex_state = 2}, - [137] = {.lex_state = 0, .external_lex_state = 2}, - [138] = {.lex_state = 0, .external_lex_state = 2}, - [139] = {.lex_state = 0, .external_lex_state = 2}, - [140] = {.lex_state = 0, .external_lex_state = 2}, - [141] = {.lex_state = 0, .external_lex_state = 2}, - [142] = {.lex_state = 9, .external_lex_state = 3}, - [143] = {.lex_state = 0, .external_lex_state = 2}, - [144] = {.lex_state = 0, .external_lex_state = 2}, - [145] = {.lex_state = 0, .external_lex_state = 2}, - [146] = {.lex_state = 0, .external_lex_state = 2}, - [147] = {.lex_state = 0, .external_lex_state = 2}, - [148] = {.lex_state = 8, .external_lex_state = 3}, - [149] = {.lex_state = 8, .external_lex_state = 3}, - [150] = {.lex_state = 8, .external_lex_state = 3}, - [151] = {.lex_state = 0, .external_lex_state = 3}, - [152] = {.lex_state = 0, .external_lex_state = 2}, - [153] = {.lex_state = 0, .external_lex_state = 2}, - [154] = {.lex_state = 8, .external_lex_state = 3}, - [155] = {.lex_state = 0, .external_lex_state = 2}, - [156] = {.lex_state = 0, .external_lex_state = 2}, - [157] = {.lex_state = 0, .external_lex_state = 2}, - [158] = {.lex_state = 0, .external_lex_state = 2}, - [159] = {.lex_state = 0, .external_lex_state = 2}, - [160] = {.lex_state = 0, .external_lex_state = 2}, - [161] = {.lex_state = 0, .external_lex_state = 2}, - [162] = {.lex_state = 0, .external_lex_state = 2}, - [163] = {.lex_state = 0, .external_lex_state = 2}, - [164] = {.lex_state = 0, .external_lex_state = 2}, - [165] = {.lex_state = 0, .external_lex_state = 2}, - [166] = {.lex_state = 0, .external_lex_state = 2}, - [167] = {.lex_state = 9, .external_lex_state = 2}, - [168] = {.lex_state = 0, .external_lex_state = 2}, - [169] = {.lex_state = 0, .external_lex_state = 2}, - [170] = {.lex_state = 0, .external_lex_state = 2}, - [171] = {.lex_state = 8, .external_lex_state = 2}, - [172] = {.lex_state = 0, .external_lex_state = 2}, - [173] = {.lex_state = 0, .external_lex_state = 2}, - [174] = {.lex_state = 8, .external_lex_state = 2}, - [175] = {.lex_state = 0, .external_lex_state = 3}, - [176] = {.lex_state = 0, .external_lex_state = 2}, - [177] = {.lex_state = 0, .external_lex_state = 2}, - [178] = {.lex_state = 0, .external_lex_state = 2}, - [179] = {.lex_state = 0, .external_lex_state = 2}, - [180] = {.lex_state = 0, .external_lex_state = 2}, - [181] = {.lex_state = 0, .external_lex_state = 2}, - [182] = {.lex_state = 0, .external_lex_state = 2}, - [183] = {.lex_state = 8, .external_lex_state = 2}, - [184] = {.lex_state = 8, .external_lex_state = 2}, - [185] = {.lex_state = 0, .external_lex_state = 2}, - [186] = {.lex_state = 0, .external_lex_state = 4}, - [187] = {.lex_state = 0, .external_lex_state = 5}, - [188] = {.lex_state = 0, .external_lex_state = 4}, - [189] = {.lex_state = 9, .external_lex_state = 2}, - [190] = {.lex_state = 9, .external_lex_state = 2}, - [191] = {.lex_state = 0, .external_lex_state = 2}, - [192] = {.lex_state = 0, .external_lex_state = 2}, - [193] = {.lex_state = 0, .external_lex_state = 2}, - [194] = {.lex_state = 0, .external_lex_state = 2}, - [195] = {.lex_state = 0, .external_lex_state = 2}, - [196] = {.lex_state = 0, .external_lex_state = 2}, - [197] = {.lex_state = 0, .external_lex_state = 2}, - [198] = {.lex_state = 0, .external_lex_state = 2}, - [199] = {.lex_state = 0, .external_lex_state = 2}, - [200] = {.lex_state = 0, .external_lex_state = 2}, - [201] = {.lex_state = 0, .external_lex_state = 2}, - [202] = {.lex_state = 0, .external_lex_state = 2}, - [203] = {.lex_state = 0, .external_lex_state = 2}, - [204] = {.lex_state = 0, .external_lex_state = 2}, - [205] = {.lex_state = 0, .external_lex_state = 2}, - [206] = {.lex_state = 0, .external_lex_state = 2}, - [207] = {.lex_state = 0, .external_lex_state = 2}, - [208] = {.lex_state = 0, .external_lex_state = 6}, - [209] = {.lex_state = 0, .external_lex_state = 2}, - [210] = {.lex_state = 0, .external_lex_state = 2}, - [211] = {.lex_state = 0, .external_lex_state = 2}, - [212] = {.lex_state = 0, .external_lex_state = 7}, - [213] = {.lex_state = 0, .external_lex_state = 2}, - [214] = {.lex_state = 57, .external_lex_state = 2}, - [215] = {.lex_state = 0, .external_lex_state = 2}, - [216] = {.lex_state = 0, .external_lex_state = 2}, - [217] = {.lex_state = 0, .external_lex_state = 2}, - [218] = {.lex_state = 0, .external_lex_state = 6}, - [219] = {.lex_state = 0, .external_lex_state = 2}, - [220] = {.lex_state = 0, .external_lex_state = 2}, - [221] = {.lex_state = 0, .external_lex_state = 2}, - [222] = {.lex_state = 0, .external_lex_state = 2}, - [223] = {.lex_state = 0, .external_lex_state = 2}, - [224] = {.lex_state = 0, .external_lex_state = 2}, - [225] = {.lex_state = 0, .external_lex_state = 2}, - [226] = {.lex_state = 0, .external_lex_state = 2}, - [227] = {.lex_state = 0, .external_lex_state = 2}, - [228] = {.lex_state = 0, .external_lex_state = 2}, - [229] = {.lex_state = 0, .external_lex_state = 2}, - [230] = {.lex_state = 0, .external_lex_state = 2}, - [231] = {(TSStateId)(-1)}, - [232] = {(TSStateId)(-1)}, - [233] = {(TSStateId)(-1)}, -}; - -enum { - ts_external_token__block_comment_start = 0, - ts_external_token__block_comment_content = 1, - ts_external_token__block_comment_end = 2, - ts_external_token__string_start = 3, - ts_external_token__string_content = 4, - ts_external_token__string_end = 5, -}; - -static const TSSymbol ts_external_scanner_symbol_map[EXTERNAL_TOKEN_COUNT] = { - [ts_external_token__block_comment_start] = sym__block_comment_start, - [ts_external_token__block_comment_content] = sym__block_comment_content, - [ts_external_token__block_comment_end] = sym__block_comment_end, - [ts_external_token__string_start] = sym__string_start, - [ts_external_token__string_content] = sym__string_content, - [ts_external_token__string_end] = sym__string_end, -}; - -static const bool ts_external_scanner_states[8][EXTERNAL_TOKEN_COUNT] = { - [1] = { - [ts_external_token__block_comment_start] = true, - [ts_external_token__block_comment_content] = true, - [ts_external_token__block_comment_end] = true, - [ts_external_token__string_start] = true, - [ts_external_token__string_content] = true, - [ts_external_token__string_end] = true, - }, - [2] = { - [ts_external_token__block_comment_start] = true, - }, - [3] = { - [ts_external_token__block_comment_start] = true, - [ts_external_token__string_start] = true, - }, - [4] = { - [ts_external_token__block_comment_start] = true, - [ts_external_token__string_content] = true, - [ts_external_token__string_end] = true, - }, - [5] = { - [ts_external_token__block_comment_start] = true, - [ts_external_token__block_comment_content] = true, - [ts_external_token__block_comment_end] = true, - }, - [6] = { - [ts_external_token__block_comment_start] = true, - [ts_external_token__string_end] = true, - }, - [7] = { - [ts_external_token__block_comment_start] = true, - [ts_external_token__block_comment_end] = true, - }, -}; - -static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { - [0] = { - [sym_comment] = STATE(0), - [ts_builtin_sym_end] = ACTIONS(1), - [sym_identifier] = ACTIONS(1), - [sym_hash_bang_line] = ACTIONS(1), - [anon_sym_return] = ACTIONS(1), - [anon_sym_SEMI] = ACTIONS(1), - [anon_sym_EQ] = ACTIONS(1), - [anon_sym_COMMA] = ACTIONS(1), - [anon_sym_COLON_COLON] = ACTIONS(1), - [sym_break_statement] = ACTIONS(1), - [anon_sym_goto] = ACTIONS(1), - [anon_sym_do] = ACTIONS(1), - [anon_sym_end] = ACTIONS(1), - [anon_sym_while] = ACTIONS(1), - [anon_sym_repeat] = ACTIONS(1), - [anon_sym_until] = ACTIONS(1), - [anon_sym_if] = ACTIONS(1), - [anon_sym_then] = ACTIONS(1), - [anon_sym_elseif] = ACTIONS(1), - [anon_sym_else] = ACTIONS(1), - [anon_sym_for] = ACTIONS(1), - [anon_sym_in] = ACTIONS(1), - [anon_sym_function] = ACTIONS(1), - [anon_sym_local] = ACTIONS(1), - [anon_sym_DOT] = ACTIONS(1), - [anon_sym_COLON] = ACTIONS(1), - [sym_nil] = ACTIONS(1), - [sym_false] = ACTIONS(1), - [sym_true] = ACTIONS(1), - [sym_number] = ACTIONS(1), - [anon_sym_LPAREN] = ACTIONS(1), - [anon_sym_RPAREN] = ACTIONS(1), - [anon_sym_LBRACK] = ACTIONS(1), - [anon_sym_RBRACK] = ACTIONS(1), - [anon_sym_LBRACE] = ACTIONS(1), - [anon_sym_RBRACE] = ACTIONS(1), - [anon_sym_or] = ACTIONS(1), - [anon_sym_and] = ACTIONS(1), - [anon_sym_LT] = ACTIONS(1), - [anon_sym_LT_EQ] = ACTIONS(1), - [anon_sym_EQ_EQ] = ACTIONS(1), - [anon_sym_TILDE_EQ] = ACTIONS(1), - [anon_sym_GT_EQ] = ACTIONS(1), - [anon_sym_GT] = ACTIONS(1), - [anon_sym_PIPE] = ACTIONS(1), - [anon_sym_TILDE] = ACTIONS(1), - [anon_sym_AMP] = ACTIONS(1), - [anon_sym_LT_LT] = ACTIONS(1), - [anon_sym_GT_GT] = ACTIONS(1), - [anon_sym_PLUS] = ACTIONS(1), - [anon_sym_DASH] = ACTIONS(1), - [anon_sym_STAR] = ACTIONS(1), - [anon_sym_SLASH] = ACTIONS(1), - [anon_sym_SLASH_SLASH] = ACTIONS(1), - [anon_sym_PERCENT] = ACTIONS(1), - [anon_sym_DOT_DOT] = ACTIONS(1), - [anon_sym_CARET] = ACTIONS(1), - [anon_sym_not] = ACTIONS(1), - [anon_sym_POUND] = ACTIONS(1), - [anon_sym_DASH_DASH] = ACTIONS(3), - [sym__block_comment_start] = ACTIONS(5), - [sym__block_comment_content] = ACTIONS(1), - [sym__block_comment_end] = ACTIONS(1), - [sym__string_start] = ACTIONS(1), - [sym__string_content] = ACTIONS(1), - [sym__string_end] = ACTIONS(1), - }, - [1] = { - [sym_chunk] = STATE(219), - [sym_statement] = STATE(134), - [sym_return_statement] = STATE(213), - [sym_empty_statement] = STATE(117), - [sym_assignment_statement] = STATE(117), - [sym__variable_assignment_varlist] = STATE(192), - [sym_label_statement] = STATE(117), - [sym_goto_statement] = STATE(117), - [sym_do_statement] = STATE(117), - [sym_while_statement] = STATE(117), - [sym_repeat_statement] = STATE(117), - [sym_if_statement] = STATE(117), - [sym_for_statement] = STATE(117), - [sym_declaration] = STATE(135), - [sym_function_declaration] = STATE(136), - [sym__local_function_declaration] = STATE(138), - [sym_variable_declaration] = STATE(140), - [sym__prefix_expression] = STATE(148), - [sym_variable] = STATE(149), - [sym_bracket_index_expression] = STATE(4), - [sym_dot_index_expression] = STATE(4), - [sym_function_call] = STATE(96), - [sym_method_index_expression] = STATE(151), - [sym_parenthesized_expression] = STATE(154), - [sym_comment] = STATE(1), - [aux_sym_chunk_repeat1] = STATE(50), - [ts_builtin_sym_end] = ACTIONS(7), - [sym_identifier] = ACTIONS(9), - [sym_hash_bang_line] = ACTIONS(11), - [anon_sym_return] = ACTIONS(13), - [anon_sym_SEMI] = ACTIONS(15), - [anon_sym_COLON_COLON] = ACTIONS(17), - [sym_break_statement] = ACTIONS(19), - [anon_sym_goto] = ACTIONS(21), - [anon_sym_do] = ACTIONS(23), - [anon_sym_while] = ACTIONS(25), - [anon_sym_repeat] = ACTIONS(27), - [anon_sym_if] = ACTIONS(29), - [anon_sym_for] = ACTIONS(31), - [anon_sym_function] = ACTIONS(33), - [anon_sym_local] = ACTIONS(35), - [anon_sym_LPAREN] = ACTIONS(37), - [anon_sym_DASH_DASH] = ACTIONS(3), - [sym__block_comment_start] = ACTIONS(5), - }, -}; - -static const uint16_t ts_small_parse_table[] = { - [0] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(2), 1, - sym_comment, - ACTIONS(39), 25, - sym__string_start, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(41), 26, - anon_sym_return, - anon_sym_EQ, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [65] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(3), 1, - sym_comment, - ACTIONS(43), 25, - sym__string_start, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(45), 26, - anon_sym_return, - anon_sym_EQ, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [130] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(4), 1, - sym_comment, - ACTIONS(47), 25, - sym__string_start, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(49), 26, - anon_sym_return, - anon_sym_EQ, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [195] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(5), 1, - sym_comment, - ACTIONS(51), 25, - sym__string_start, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(53), 25, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [259] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(6), 1, - sym_comment, - ACTIONS(55), 25, - sym__string_start, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(57), 25, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [323] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(7), 1, - sym_comment, - ACTIONS(59), 25, - sym__string_start, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(61), 25, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [387] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(8), 1, - sym_comment, - ACTIONS(63), 25, - sym__string_start, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(65), 25, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [451] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(9), 1, - sym_comment, - ACTIONS(67), 25, - sym__string_start, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(69), 25, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [515] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(10), 1, - sym_comment, - ACTIONS(71), 25, - sym__string_start, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(73), 25, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [579] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(11), 1, - sym_comment, - ACTIONS(75), 25, - sym__string_start, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(77), 25, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [643] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(12), 1, - sym_comment, - ACTIONS(79), 25, - sym__string_start, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(81), 25, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [707] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(13), 1, - sym_comment, - ACTIONS(83), 25, - sym__string_start, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(85), 25, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [771] = 7, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(14), 1, - sym_comment, - ACTIONS(91), 2, - anon_sym_DOT, - anon_sym_COLON, - ACTIONS(93), 4, - sym__string_start, - anon_sym_LPAREN, - anon_sym_LBRACK, - anon_sym_LBRACE, - ACTIONS(87), 21, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(89), 23, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [839] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(15), 1, - sym_comment, - ACTIONS(95), 25, - sym__string_start, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(97), 25, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [903] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(16), 1, - sym_comment, - ACTIONS(75), 22, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(77), 23, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [962] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(17), 1, - sym_comment, - ACTIONS(99), 22, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(101), 23, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [1021] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(107), 1, - anon_sym_and, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - STATE(18), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - ACTIONS(103), 8, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - ACTIONS(105), 17, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - sym_identifier, - [1106] = 8, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(131), 1, - anon_sym_CARET, - STATE(19), 1, - sym_comment, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(103), 18, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_DOT_DOT, - ACTIONS(105), 22, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - sym_identifier, - [1171] = 17, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - STATE(20), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - ACTIONS(103), 8, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - ACTIONS(105), 18, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - sym_identifier, - [1254] = 15, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - STATE(21), 1, - sym_comment, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(103), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - ACTIONS(105), 20, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - sym_identifier, - [1333] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(131), 1, - anon_sym_CARET, - STATE(22), 1, - sym_comment, - ACTIONS(133), 21, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - ACTIONS(135), 23, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [1394] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(131), 1, - anon_sym_CARET, - STATE(23), 1, - sym_comment, - ACTIONS(103), 21, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - ACTIONS(105), 23, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [1455] = 11, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - STATE(24), 1, - sym_comment, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(103), 16, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(105), 21, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - sym_identifier, - [1526] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(131), 1, - anon_sym_CARET, - STATE(25), 1, - sym_comment, - ACTIONS(103), 21, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - ACTIONS(105), 23, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [1587] = 14, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - STATE(26), 1, - sym_comment, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(103), 13, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - ACTIONS(105), 20, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - sym_identifier, - [1664] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(27), 1, - sym_comment, - ACTIONS(71), 22, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(73), 23, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [1723] = 13, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - STATE(28), 1, - sym_comment, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(103), 13, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - ACTIONS(105), 21, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - sym_identifier, - [1798] = 12, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - STATE(29), 1, - sym_comment, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(103), 14, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - ACTIONS(105), 21, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - sym_identifier, - [1871] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(30), 1, - sym_comment, - ACTIONS(137), 22, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(139), 23, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [1930] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(31), 1, - sym_comment, - ACTIONS(87), 22, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(89), 23, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [1989] = 39, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(13), 1, - anon_sym_return, - ACTIONS(15), 1, - anon_sym_SEMI, - ACTIONS(17), 1, - anon_sym_COLON_COLON, - ACTIONS(19), 1, - sym_break_statement, - ACTIONS(21), 1, - anon_sym_goto, - ACTIONS(23), 1, - anon_sym_do, - ACTIONS(25), 1, - anon_sym_while, - ACTIONS(27), 1, - anon_sym_repeat, - ACTIONS(29), 1, - anon_sym_if, - ACTIONS(31), 1, - anon_sym_for, - ACTIONS(33), 1, - anon_sym_function, - ACTIONS(35), 1, - anon_sym_local, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(141), 1, - anon_sym_end, - ACTIONS(143), 1, - anon_sym_elseif, - ACTIONS(145), 1, - anon_sym_else, - STATE(32), 1, - sym_comment, - STATE(40), 1, - aux_sym_chunk_repeat1, - STATE(96), 1, - sym_function_call, - STATE(134), 1, - sym_statement, - STATE(135), 1, - sym_declaration, - STATE(136), 1, - sym_function_declaration, - STATE(138), 1, - sym__local_function_declaration, - STATE(140), 1, - sym_variable_declaration, - STATE(148), 1, - sym__prefix_expression, - STATE(149), 1, - sym_variable, - STATE(151), 1, - sym_method_index_expression, - STATE(153), 1, - aux_sym_if_statement_repeat1, - STATE(154), 1, - sym_parenthesized_expression, - STATE(155), 1, - sym__block, - STATE(165), 1, - sym_return_statement, - STATE(179), 1, - sym_elseif_statement, - STATE(192), 1, - sym__variable_assignment_varlist, - STATE(201), 1, - sym_else_statement, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - STATE(117), 9, - sym_empty_statement, - sym_assignment_statement, - sym_label_statement, - sym_goto_statement, - sym_do_statement, - sym_while_statement, - sym_repeat_statement, - sym_if_statement, - sym_for_statement, - [2116] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(33), 1, - sym_comment, - ACTIONS(59), 22, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(61), 23, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [2175] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(34), 1, - sym_comment, - ACTIONS(147), 22, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(149), 23, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [2234] = 11, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - STATE(35), 1, - sym_comment, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(103), 16, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(105), 21, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - sym_identifier, - [2305] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(36), 1, - sym_comment, - ACTIONS(67), 22, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_RBRACE, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - ACTIONS(69), 23, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_then, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - anon_sym_or, - anon_sym_and, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - sym_identifier, - [2364] = 31, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(151), 1, - ts_builtin_sym_end, - ACTIONS(153), 1, - sym_identifier, - ACTIONS(158), 1, - anon_sym_SEMI, - ACTIONS(161), 1, - anon_sym_COLON_COLON, - ACTIONS(164), 1, - sym_break_statement, - ACTIONS(167), 1, - anon_sym_goto, - ACTIONS(170), 1, - anon_sym_do, - ACTIONS(173), 1, - anon_sym_while, - ACTIONS(176), 1, - anon_sym_repeat, - ACTIONS(179), 1, - anon_sym_if, - ACTIONS(182), 1, - anon_sym_for, - ACTIONS(185), 1, - anon_sym_function, - ACTIONS(188), 1, - anon_sym_local, - ACTIONS(191), 1, - anon_sym_LPAREN, - STATE(96), 1, - sym_function_call, - STATE(134), 1, - sym_statement, - STATE(135), 1, - sym_declaration, - STATE(136), 1, - sym_function_declaration, - STATE(138), 1, - sym__local_function_declaration, - STATE(140), 1, - sym_variable_declaration, - STATE(148), 1, - sym__prefix_expression, - STATE(149), 1, - sym_variable, - STATE(151), 1, - sym_method_index_expression, - STATE(154), 1, - sym_parenthesized_expression, - STATE(192), 1, - sym__variable_assignment_varlist, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - STATE(37), 2, - sym_comment, - aux_sym_chunk_repeat1, - ACTIONS(156), 5, - anon_sym_return, - anon_sym_end, - anon_sym_until, - anon_sym_elseif, - anon_sym_else, - STATE(117), 9, - sym_empty_statement, - sym_assignment_statement, - sym_label_statement, - sym_goto_statement, - sym_do_statement, - sym_while_statement, - sym_repeat_statement, - sym_if_statement, - sym_for_statement, - [2472] = 21, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(107), 1, - anon_sym_and, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(198), 1, - anon_sym_COMMA, - ACTIONS(200), 1, - anon_sym_or, - STATE(38), 1, - sym_comment, - STATE(112), 1, - aux_sym__variable_assignment_explist_repeat1, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - ACTIONS(194), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(196), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [2560] = 34, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(13), 1, - anon_sym_return, - ACTIONS(15), 1, - anon_sym_SEMI, - ACTIONS(17), 1, - anon_sym_COLON_COLON, - ACTIONS(19), 1, - sym_break_statement, - ACTIONS(21), 1, - anon_sym_goto, - ACTIONS(23), 1, - anon_sym_do, - ACTIONS(25), 1, - anon_sym_while, - ACTIONS(27), 1, - anon_sym_repeat, - ACTIONS(29), 1, - anon_sym_if, - ACTIONS(31), 1, - anon_sym_for, - ACTIONS(33), 1, - anon_sym_function, - ACTIONS(35), 1, - anon_sym_local, - ACTIONS(37), 1, - anon_sym_LPAREN, - STATE(39), 1, - sym_comment, - STATE(40), 1, - aux_sym_chunk_repeat1, - STATE(96), 1, - sym_function_call, - STATE(134), 1, - sym_statement, - STATE(135), 1, - sym_declaration, - STATE(136), 1, - sym_function_declaration, - STATE(138), 1, - sym__local_function_declaration, - STATE(140), 1, - sym_variable_declaration, - STATE(148), 1, - sym__prefix_expression, - STATE(149), 1, - sym_variable, - STATE(151), 1, - sym_method_index_expression, - STATE(154), 1, - sym_parenthesized_expression, - STATE(165), 1, - sym_return_statement, - STATE(173), 1, - sym__block, - STATE(192), 1, - sym__variable_assignment_varlist, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(202), 3, - anon_sym_end, - anon_sym_elseif, - anon_sym_else, - STATE(117), 9, - sym_empty_statement, - sym_assignment_statement, - sym_label_statement, - sym_goto_statement, - sym_do_statement, - sym_while_statement, - sym_repeat_statement, - sym_if_statement, - sym_for_statement, - [2674] = 33, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(13), 1, - anon_sym_return, - ACTIONS(15), 1, - anon_sym_SEMI, - ACTIONS(17), 1, - anon_sym_COLON_COLON, - ACTIONS(19), 1, - sym_break_statement, - ACTIONS(21), 1, - anon_sym_goto, - ACTIONS(23), 1, - anon_sym_do, - ACTIONS(25), 1, - anon_sym_while, - ACTIONS(27), 1, - anon_sym_repeat, - ACTIONS(29), 1, - anon_sym_if, - ACTIONS(31), 1, - anon_sym_for, - ACTIONS(33), 1, - anon_sym_function, - ACTIONS(35), 1, - anon_sym_local, - ACTIONS(37), 1, - anon_sym_LPAREN, - STATE(37), 1, - aux_sym_chunk_repeat1, - STATE(40), 1, - sym_comment, - STATE(96), 1, - sym_function_call, - STATE(134), 1, - sym_statement, - STATE(135), 1, - sym_declaration, - STATE(136), 1, - sym_function_declaration, - STATE(138), 1, - sym__local_function_declaration, - STATE(140), 1, - sym_variable_declaration, - STATE(148), 1, - sym__prefix_expression, - STATE(149), 1, - sym_variable, - STATE(151), 1, - sym_method_index_expression, - STATE(154), 1, - sym_parenthesized_expression, - STATE(169), 1, - sym_return_statement, - STATE(192), 1, - sym__variable_assignment_varlist, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(204), 4, - anon_sym_end, - anon_sym_until, - anon_sym_elseif, - anon_sym_else, - STATE(117), 9, - sym_empty_statement, - sym_assignment_statement, - sym_label_statement, - sym_goto_statement, - sym_do_statement, - sym_while_statement, - sym_repeat_statement, - sym_if_statement, - sym_for_statement, - [2786] = 19, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(107), 1, - anon_sym_and, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(200), 1, - anon_sym_or, - STATE(41), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - ACTIONS(206), 5, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(208), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [2869] = 34, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(13), 1, - anon_sym_return, - ACTIONS(15), 1, - anon_sym_SEMI, - ACTIONS(17), 1, - anon_sym_COLON_COLON, - ACTIONS(19), 1, - sym_break_statement, - ACTIONS(21), 1, - anon_sym_goto, - ACTIONS(23), 1, - anon_sym_do, - ACTIONS(25), 1, - anon_sym_while, - ACTIONS(27), 1, - anon_sym_repeat, - ACTIONS(29), 1, - anon_sym_if, - ACTIONS(31), 1, - anon_sym_for, - ACTIONS(33), 1, - anon_sym_function, - ACTIONS(35), 1, - anon_sym_local, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(210), 1, - anon_sym_end, - STATE(40), 1, - aux_sym_chunk_repeat1, - STATE(42), 1, - sym_comment, - STATE(96), 1, - sym_function_call, - STATE(134), 1, - sym_statement, - STATE(135), 1, - sym_declaration, - STATE(136), 1, - sym_function_declaration, - STATE(138), 1, - sym__local_function_declaration, - STATE(140), 1, - sym_variable_declaration, - STATE(148), 1, - sym__prefix_expression, - STATE(149), 1, - sym_variable, - STATE(151), 1, - sym_method_index_expression, - STATE(154), 1, - sym_parenthesized_expression, - STATE(165), 1, - sym_return_statement, - STATE(192), 1, - sym__variable_assignment_varlist, - STATE(193), 1, - sym__block, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - STATE(117), 9, - sym_empty_statement, - sym_assignment_statement, - sym_label_statement, - sym_goto_statement, - sym_do_statement, - sym_while_statement, - sym_repeat_statement, - sym_if_statement, - sym_for_statement, - [2981] = 34, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(13), 1, - anon_sym_return, - ACTIONS(15), 1, - anon_sym_SEMI, - ACTIONS(17), 1, - anon_sym_COLON_COLON, - ACTIONS(19), 1, - sym_break_statement, - ACTIONS(21), 1, - anon_sym_goto, - ACTIONS(23), 1, - anon_sym_do, - ACTIONS(25), 1, - anon_sym_while, - ACTIONS(27), 1, - anon_sym_repeat, - ACTIONS(29), 1, - anon_sym_if, - ACTIONS(31), 1, - anon_sym_for, - ACTIONS(33), 1, - anon_sym_function, - ACTIONS(35), 1, - anon_sym_local, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(212), 1, - anon_sym_end, - STATE(40), 1, - aux_sym_chunk_repeat1, - STATE(43), 1, - sym_comment, - STATE(96), 1, - sym_function_call, - STATE(134), 1, - sym_statement, - STATE(135), 1, - sym_declaration, - STATE(136), 1, - sym_function_declaration, - STATE(138), 1, - sym__local_function_declaration, - STATE(140), 1, - sym_variable_declaration, - STATE(148), 1, - sym__prefix_expression, - STATE(149), 1, - sym_variable, - STATE(151), 1, - sym_method_index_expression, - STATE(154), 1, - sym_parenthesized_expression, - STATE(165), 1, - sym_return_statement, - STATE(192), 1, - sym__variable_assignment_varlist, - STATE(205), 1, - sym__block, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - STATE(117), 9, - sym_empty_statement, - sym_assignment_statement, - sym_label_statement, - sym_goto_statement, - sym_do_statement, - sym_while_statement, - sym_repeat_statement, - sym_if_statement, - sym_for_statement, - [3093] = 34, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(13), 1, - anon_sym_return, - ACTIONS(15), 1, - anon_sym_SEMI, - ACTIONS(17), 1, - anon_sym_COLON_COLON, - ACTIONS(19), 1, - sym_break_statement, - ACTIONS(21), 1, - anon_sym_goto, - ACTIONS(23), 1, - anon_sym_do, - ACTIONS(25), 1, - anon_sym_while, - ACTIONS(27), 1, - anon_sym_repeat, - ACTIONS(29), 1, - anon_sym_if, - ACTIONS(31), 1, - anon_sym_for, - ACTIONS(33), 1, - anon_sym_function, - ACTIONS(35), 1, - anon_sym_local, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(214), 1, - anon_sym_end, - STATE(40), 1, - aux_sym_chunk_repeat1, - STATE(44), 1, - sym_comment, - STATE(96), 1, - sym_function_call, - STATE(134), 1, - sym_statement, - STATE(135), 1, - sym_declaration, - STATE(136), 1, - sym_function_declaration, - STATE(138), 1, - sym__local_function_declaration, - STATE(140), 1, - sym_variable_declaration, - STATE(148), 1, - sym__prefix_expression, - STATE(149), 1, - sym_variable, - STATE(151), 1, - sym_method_index_expression, - STATE(154), 1, - sym_parenthesized_expression, - STATE(165), 1, - sym_return_statement, - STATE(192), 1, - sym__variable_assignment_varlist, - STATE(198), 1, - sym__block, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - STATE(117), 9, - sym_empty_statement, - sym_assignment_statement, - sym_label_statement, - sym_goto_statement, - sym_do_statement, - sym_while_statement, - sym_repeat_statement, - sym_if_statement, - sym_for_statement, - [3205] = 19, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(107), 1, - anon_sym_and, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(200), 1, - anon_sym_or, - STATE(45), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - ACTIONS(216), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(218), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [3287] = 34, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(13), 1, - anon_sym_return, - ACTIONS(15), 1, - anon_sym_SEMI, - ACTIONS(17), 1, - anon_sym_COLON_COLON, - ACTIONS(19), 1, - sym_break_statement, - ACTIONS(21), 1, - anon_sym_goto, - ACTIONS(23), 1, - anon_sym_do, - ACTIONS(25), 1, - anon_sym_while, - ACTIONS(27), 1, - anon_sym_repeat, - ACTIONS(29), 1, - anon_sym_if, - ACTIONS(31), 1, - anon_sym_for, - ACTIONS(33), 1, - anon_sym_function, - ACTIONS(35), 1, - anon_sym_local, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(220), 1, - anon_sym_end, - STATE(40), 1, - aux_sym_chunk_repeat1, - STATE(46), 1, - sym_comment, - STATE(96), 1, - sym_function_call, - STATE(134), 1, - sym_statement, - STATE(135), 1, - sym_declaration, - STATE(136), 1, - sym_function_declaration, - STATE(138), 1, - sym__local_function_declaration, - STATE(140), 1, - sym_variable_declaration, - STATE(148), 1, - sym__prefix_expression, - STATE(149), 1, - sym_variable, - STATE(151), 1, - sym_method_index_expression, - STATE(154), 1, - sym_parenthesized_expression, - STATE(165), 1, - sym_return_statement, - STATE(192), 1, - sym__variable_assignment_varlist, - STATE(229), 1, - sym__block, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - STATE(117), 9, - sym_empty_statement, - sym_assignment_statement, - sym_label_statement, - sym_goto_statement, - sym_do_statement, - sym_while_statement, - sym_repeat_statement, - sym_if_statement, - sym_for_statement, - [3399] = 34, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(13), 1, - anon_sym_return, - ACTIONS(15), 1, - anon_sym_SEMI, - ACTIONS(17), 1, - anon_sym_COLON_COLON, - ACTIONS(19), 1, - sym_break_statement, - ACTIONS(21), 1, - anon_sym_goto, - ACTIONS(23), 1, - anon_sym_do, - ACTIONS(25), 1, - anon_sym_while, - ACTIONS(27), 1, - anon_sym_repeat, - ACTIONS(29), 1, - anon_sym_if, - ACTIONS(31), 1, - anon_sym_for, - ACTIONS(33), 1, - anon_sym_function, - ACTIONS(35), 1, - anon_sym_local, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(222), 1, - anon_sym_end, - STATE(40), 1, - aux_sym_chunk_repeat1, - STATE(47), 1, - sym_comment, - STATE(96), 1, - sym_function_call, - STATE(134), 1, - sym_statement, - STATE(135), 1, - sym_declaration, - STATE(136), 1, - sym_function_declaration, - STATE(138), 1, - sym__local_function_declaration, - STATE(140), 1, - sym_variable_declaration, - STATE(148), 1, - sym__prefix_expression, - STATE(149), 1, - sym_variable, - STATE(151), 1, - sym_method_index_expression, - STATE(154), 1, - sym_parenthesized_expression, - STATE(165), 1, - sym_return_statement, - STATE(192), 1, - sym__variable_assignment_varlist, - STATE(215), 1, - sym__block, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - STATE(117), 9, - sym_empty_statement, - sym_assignment_statement, - sym_label_statement, - sym_goto_statement, - sym_do_statement, - sym_while_statement, - sym_repeat_statement, - sym_if_statement, - sym_for_statement, - [3511] = 19, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(107), 1, - anon_sym_and, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(200), 1, - anon_sym_or, - STATE(48), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - ACTIONS(224), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(226), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [3593] = 34, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(13), 1, - anon_sym_return, - ACTIONS(15), 1, - anon_sym_SEMI, - ACTIONS(17), 1, - anon_sym_COLON_COLON, - ACTIONS(19), 1, - sym_break_statement, - ACTIONS(21), 1, - anon_sym_goto, - ACTIONS(23), 1, - anon_sym_do, - ACTIONS(25), 1, - anon_sym_while, - ACTIONS(27), 1, - anon_sym_repeat, - ACTIONS(29), 1, - anon_sym_if, - ACTIONS(31), 1, - anon_sym_for, - ACTIONS(33), 1, - anon_sym_function, - ACTIONS(35), 1, - anon_sym_local, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(228), 1, - anon_sym_until, - STATE(40), 1, - aux_sym_chunk_repeat1, - STATE(49), 1, - sym_comment, - STATE(96), 1, - sym_function_call, - STATE(134), 1, - sym_statement, - STATE(135), 1, - sym_declaration, - STATE(136), 1, - sym_function_declaration, - STATE(138), 1, - sym__local_function_declaration, - STATE(140), 1, - sym_variable_declaration, - STATE(148), 1, - sym__prefix_expression, - STATE(149), 1, - sym_variable, - STATE(151), 1, - sym_method_index_expression, - STATE(154), 1, - sym_parenthesized_expression, - STATE(165), 1, - sym_return_statement, - STATE(192), 1, - sym__variable_assignment_varlist, - STATE(194), 1, - sym__block, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - STATE(117), 9, - sym_empty_statement, - sym_assignment_statement, - sym_label_statement, - sym_goto_statement, - sym_do_statement, - sym_while_statement, - sym_repeat_statement, - sym_if_statement, - sym_for_statement, - [3705] = 33, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(13), 1, - anon_sym_return, - ACTIONS(15), 1, - anon_sym_SEMI, - ACTIONS(17), 1, - anon_sym_COLON_COLON, - ACTIONS(19), 1, - sym_break_statement, - ACTIONS(21), 1, - anon_sym_goto, - ACTIONS(23), 1, - anon_sym_do, - ACTIONS(25), 1, - anon_sym_while, - ACTIONS(27), 1, - anon_sym_repeat, - ACTIONS(29), 1, - anon_sym_if, - ACTIONS(31), 1, - anon_sym_for, - ACTIONS(33), 1, - anon_sym_function, - ACTIONS(35), 1, - anon_sym_local, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(230), 1, - ts_builtin_sym_end, - STATE(37), 1, - aux_sym_chunk_repeat1, - STATE(50), 1, - sym_comment, - STATE(96), 1, - sym_function_call, - STATE(134), 1, - sym_statement, - STATE(135), 1, - sym_declaration, - STATE(136), 1, - sym_function_declaration, - STATE(138), 1, - sym__local_function_declaration, - STATE(140), 1, - sym_variable_declaration, - STATE(148), 1, - sym__prefix_expression, - STATE(149), 1, - sym_variable, - STATE(151), 1, - sym_method_index_expression, - STATE(154), 1, - sym_parenthesized_expression, - STATE(192), 1, - sym__variable_assignment_varlist, - STATE(211), 1, - sym_return_statement, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - STATE(117), 9, - sym_empty_statement, - sym_assignment_statement, - sym_label_statement, - sym_goto_statement, - sym_do_statement, - sym_while_statement, - sym_repeat_statement, - sym_if_statement, - sym_for_statement, - [3814] = 33, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(13), 1, - anon_sym_return, - ACTIONS(15), 1, - anon_sym_SEMI, - ACTIONS(17), 1, - anon_sym_COLON_COLON, - ACTIONS(19), 1, - sym_break_statement, - ACTIONS(21), 1, - anon_sym_goto, - ACTIONS(23), 1, - anon_sym_do, - ACTIONS(25), 1, - anon_sym_while, - ACTIONS(27), 1, - anon_sym_repeat, - ACTIONS(29), 1, - anon_sym_if, - ACTIONS(31), 1, - anon_sym_for, - ACTIONS(33), 1, - anon_sym_function, - ACTIONS(35), 1, - anon_sym_local, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(232), 1, - ts_builtin_sym_end, - STATE(37), 1, - aux_sym_chunk_repeat1, - STATE(51), 1, - sym_comment, - STATE(96), 1, - sym_function_call, - STATE(134), 1, - sym_statement, - STATE(135), 1, - sym_declaration, - STATE(136), 1, - sym_function_declaration, - STATE(138), 1, - sym__local_function_declaration, - STATE(140), 1, - sym_variable_declaration, - STATE(148), 1, - sym__prefix_expression, - STATE(149), 1, - sym_variable, - STATE(151), 1, - sym_method_index_expression, - STATE(154), 1, - sym_parenthesized_expression, - STATE(192), 1, - sym__variable_assignment_varlist, - STATE(216), 1, - sym_return_statement, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - STATE(117), 9, - sym_empty_statement, - sym_assignment_statement, - sym_label_statement, - sym_goto_statement, - sym_do_statement, - sym_while_statement, - sym_repeat_statement, - sym_if_statement, - sym_for_statement, - [3923] = 33, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(13), 1, - anon_sym_return, - ACTIONS(15), 1, - anon_sym_SEMI, - ACTIONS(17), 1, - anon_sym_COLON_COLON, - ACTIONS(19), 1, - sym_break_statement, - ACTIONS(21), 1, - anon_sym_goto, - ACTIONS(23), 1, - anon_sym_do, - ACTIONS(25), 1, - anon_sym_while, - ACTIONS(27), 1, - anon_sym_repeat, - ACTIONS(29), 1, - anon_sym_if, - ACTIONS(31), 1, - anon_sym_for, - ACTIONS(33), 1, - anon_sym_function, - ACTIONS(35), 1, - anon_sym_local, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(230), 1, - ts_builtin_sym_end, - STATE(51), 1, - aux_sym_chunk_repeat1, - STATE(52), 1, - sym_comment, - STATE(96), 1, - sym_function_call, - STATE(134), 1, - sym_statement, - STATE(135), 1, - sym_declaration, - STATE(136), 1, - sym_function_declaration, - STATE(138), 1, - sym__local_function_declaration, - STATE(140), 1, - sym_variable_declaration, - STATE(148), 1, - sym__prefix_expression, - STATE(149), 1, - sym_variable, - STATE(151), 1, - sym_method_index_expression, - STATE(154), 1, - sym_parenthesized_expression, - STATE(192), 1, - sym__variable_assignment_varlist, - STATE(211), 1, - sym_return_statement, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - STATE(117), 9, - sym_empty_statement, - sym_assignment_statement, - sym_label_statement, - sym_goto_statement, - sym_do_statement, - sym_while_statement, - sym_repeat_statement, - sym_if_statement, - sym_for_statement, - [4032] = 22, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(234), 1, - ts_builtin_sym_end, - ACTIONS(236), 1, - anon_sym_SEMI, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(53), 1, - sym_comment, - STATE(58), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - STATE(156), 1, - sym__expression_list, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - ACTIONS(238), 4, - anon_sym_end, - anon_sym_until, - anon_sym_elseif, - anon_sym_else, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [4114] = 22, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - ACTIONS(254), 1, - sym_identifier, - ACTIONS(256), 1, - anon_sym_LBRACK, - ACTIONS(258), 1, - anon_sym_RBRACE, - STATE(54), 1, - sym_comment, - STATE(94), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - STATE(160), 1, - sym_field, - STATE(206), 1, - sym__field_list, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [4193] = 22, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - ACTIONS(254), 1, - sym_identifier, - ACTIONS(256), 1, - anon_sym_LBRACK, - ACTIONS(260), 1, - anon_sym_RBRACE, - STATE(55), 1, - sym_comment, - STATE(94), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - STATE(160), 1, - sym_field, - STATE(223), 1, - sym__field_list, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [4272] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(262), 1, - anon_sym_EQ, - STATE(56), 1, - sym_comment, - ACTIONS(49), 6, - anon_sym_DOT, - anon_sym_LT, - anon_sym_GT, - anon_sym_TILDE, - anon_sym_DASH, - anon_sym_SLASH, - ACTIONS(47), 24, - sym__string_start, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_COLON, - anon_sym_LPAREN, - anon_sym_LBRACK, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_or, - anon_sym_and, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_LT_LT, - anon_sym_GT_GT, - anon_sym_PLUS, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - anon_sym_DOT_DOT, - anon_sym_CARET, - [4319] = 21, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - ACTIONS(254), 1, - sym_identifier, - ACTIONS(256), 1, - anon_sym_LBRACK, - ACTIONS(264), 1, - anon_sym_RBRACE, - STATE(57), 1, - sym_comment, - STATE(94), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - STATE(181), 1, - sym_field, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [4395] = 21, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(268), 1, - anon_sym_COMMA, - ACTIONS(270), 1, - anon_sym_else, - ACTIONS(272), 1, - anon_sym_or, - ACTIONS(274), 1, - anon_sym_and, - STATE(58), 1, - sym_comment, - STATE(147), 1, - aux_sym__expression_list_repeat1, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - ACTIONS(266), 6, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_do, - anon_sym_end, - anon_sym_until, - anon_sym_elseif, - [4471] = 21, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - ACTIONS(254), 1, - sym_identifier, - ACTIONS(256), 1, - anon_sym_LBRACK, - ACTIONS(276), 1, - anon_sym_RBRACE, - STATE(59), 1, - sym_comment, - STATE(94), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - STATE(181), 1, - sym_field, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [4547] = 19, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(272), 1, - anon_sym_or, - ACTIONS(274), 1, - anon_sym_and, - ACTIONS(280), 1, - anon_sym_else, - STATE(60), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - ACTIONS(278), 8, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_do, - anon_sym_end, - anon_sym_until, - anon_sym_elseif, - anon_sym_RPAREN, - [4619] = 20, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - ACTIONS(254), 1, - sym_identifier, - ACTIONS(256), 1, - anon_sym_LBRACK, - STATE(61), 1, - sym_comment, - STATE(94), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - STATE(181), 1, - sym_field, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [4692] = 19, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(38), 1, - sym_expression, - STATE(62), 1, - sym_comment, - STATE(126), 1, - sym__variable_assignment_explist, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [4762] = 19, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(58), 1, - sym_expression, - STATE(63), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - STATE(224), 1, - sym__expression_list, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [4832] = 19, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(38), 1, - sym_expression, - STATE(64), 1, - sym_comment, - STATE(141), 1, - sym__variable_assignment_explist, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [4902] = 19, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - ACTIONS(282), 1, - anon_sym_RPAREN, - STATE(65), 1, - sym_comment, - STATE(97), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [4972] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(66), 1, - sym_comment, - STATE(107), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [5039] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(28), 1, - sym_expression, - STATE(67), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [5106] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(45), 1, - sym_expression, - STATE(68), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [5173] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(69), 1, - sym_comment, - STATE(105), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [5240] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(70), 1, - sym_comment, - STATE(103), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [5307] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(71), 1, - sym_comment, - STATE(106), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [5374] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(72), 1, - sym_comment, - STATE(95), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [5441] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(25), 1, - sym_expression, - STATE(73), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [5508] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(74), 1, - sym_comment, - STATE(104), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [5575] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(24), 1, - sym_expression, - STATE(75), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [5642] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(23), 1, - sym_expression, - STATE(76), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [5709] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(19), 1, - sym_expression, - STATE(77), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [5776] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(41), 1, - sym_expression, - STATE(78), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [5843] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(35), 1, - sym_expression, - STATE(79), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [5910] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(29), 1, - sym_expression, - STATE(80), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [5977] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(81), 1, - sym_comment, - STATE(108), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [6044] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(26), 1, - sym_expression, - STATE(82), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [6111] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(21), 1, - sym_expression, - STATE(83), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [6178] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(20), 1, - sym_expression, - STATE(84), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [6245] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(85), 1, - sym_comment, - STATE(102), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [6312] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(18), 1, - sym_expression, - STATE(86), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [6379] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(22), 1, - sym_expression, - STATE(87), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [6446] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(88), 1, - sym_comment, - STATE(100), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [6513] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(60), 1, - sym_expression, - STATE(89), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [6580] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(48), 1, - sym_expression, - STATE(90), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [6647] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(91), 1, - sym_comment, - STATE(98), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [6714] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(9), 1, - sym_identifier, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(240), 1, - anon_sym_function, - ACTIONS(246), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, - sym__string_start, - STATE(92), 1, - sym_comment, - STATE(109), 1, - sym_expression, - STATE(148), 1, - sym__prefix_expression, - STATE(151), 1, - sym_method_index_expression, - ACTIONS(244), 2, - sym_number, - sym_vararg_expression, - ACTIONS(248), 2, - anon_sym_TILDE, - anon_sym_POUND, - ACTIONS(250), 2, - anon_sym_DASH, - anon_sym_not, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - ACTIONS(242), 3, - sym_nil, - sym_false, - sym_true, - STATE(14), 3, - sym_variable, - sym_function_call, - sym_parenthesized_expression, - STATE(31), 5, - sym_string, - sym_function_definition, - sym_table_constructor, - sym_binary_expression, - sym_unary_expression, - [6781] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(288), 1, - anon_sym_COMMA, - STATE(93), 2, - sym_comment, - aux_sym__name_list_repeat1, - ACTIONS(284), 6, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_EQ, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - ACTIONS(286), 16, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_in, - anon_sym_function, - anon_sym_local, - sym_identifier, - [6821] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(272), 1, - anon_sym_or, - ACTIONS(274), 1, - anon_sym_and, - STATE(94), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(291), 3, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_RBRACE, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - [6885] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(272), 1, - anon_sym_or, - ACTIONS(274), 1, - anon_sym_and, - STATE(95), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(293), 3, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_RBRACE, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - [6949] = 7, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(91), 1, - anon_sym_COLON, - STATE(96), 1, - sym_comment, - ACTIONS(295), 3, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - ACTIONS(93), 5, - sym__string_start, - anon_sym_DOT, - anon_sym_LPAREN, - anon_sym_LBRACK, - anon_sym_LBRACE, - ACTIONS(297), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [6991] = 20, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(268), 1, - anon_sym_COMMA, - ACTIONS(272), 1, - anon_sym_or, - ACTIONS(274), 1, - anon_sym_and, - ACTIONS(299), 1, - anon_sym_RPAREN, - STATE(97), 1, - sym_comment, - STATE(180), 1, - aux_sym__expression_list_repeat1, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - [7059] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(272), 1, - anon_sym_or, - ACTIONS(274), 1, - anon_sym_and, - STATE(98), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(301), 3, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_RBRACE, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - [7123] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(99), 1, - sym_comment, - ACTIONS(303), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_EQ, - anon_sym_COMMA, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - ACTIONS(305), 16, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_in, - anon_sym_function, - anon_sym_local, - sym_identifier, - [7160] = 19, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(272), 1, - anon_sym_or, - ACTIONS(274), 1, - anon_sym_and, - ACTIONS(307), 1, - anon_sym_COMMA, - ACTIONS(309), 1, - anon_sym_do, - STATE(100), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - [7225] = 7, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(315), 1, - anon_sym_COMMA, - STATE(93), 1, - aux_sym__name_list_repeat1, - STATE(101), 1, - sym_comment, - ACTIONS(311), 5, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_EQ, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(313), 16, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_in, - anon_sym_function, - anon_sym_local, - sym_identifier, - [7266] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(272), 1, - anon_sym_or, - ACTIONS(274), 1, - anon_sym_and, - ACTIONS(317), 1, - anon_sym_then, - STATE(102), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - [7328] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(272), 1, - anon_sym_or, - ACTIONS(274), 1, - anon_sym_and, - ACTIONS(319), 1, - anon_sym_do, - STATE(103), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - [7390] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(272), 1, - anon_sym_or, - ACTIONS(274), 1, - anon_sym_and, - ACTIONS(321), 1, - anon_sym_RBRACK, - STATE(104), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - [7452] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(272), 1, - anon_sym_or, - ACTIONS(274), 1, - anon_sym_and, - ACTIONS(323), 1, - anon_sym_then, - STATE(105), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - [7514] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(272), 1, - anon_sym_or, - ACTIONS(274), 1, - anon_sym_and, - ACTIONS(325), 1, - anon_sym_COMMA, - STATE(106), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - [7576] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(272), 1, - anon_sym_or, - ACTIONS(274), 1, - anon_sym_and, - ACTIONS(327), 1, - anon_sym_RBRACK, - STATE(107), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - [7638] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(272), 1, - anon_sym_or, - ACTIONS(274), 1, - anon_sym_and, - ACTIONS(329), 1, - anon_sym_do, - STATE(108), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - [7700] = 18, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(113), 1, - anon_sym_PIPE, - ACTIONS(115), 1, - anon_sym_TILDE, - ACTIONS(117), 1, - anon_sym_AMP, - ACTIONS(121), 1, - anon_sym_PLUS, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(127), 1, - anon_sym_SLASH, - ACTIONS(129), 1, - anon_sym_DOT_DOT, - ACTIONS(131), 1, - anon_sym_CARET, - ACTIONS(272), 1, - anon_sym_or, - ACTIONS(274), 1, - anon_sym_and, - ACTIONS(331), 1, - anon_sym_RPAREN, - STATE(109), 1, - sym_comment, - ACTIONS(109), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(119), 2, - anon_sym_LT_LT, - anon_sym_GT_GT, - ACTIONS(125), 3, - anon_sym_STAR, - anon_sym_SLASH_SLASH, - anon_sym_PERCENT, - ACTIONS(111), 4, - anon_sym_LT_EQ, - anon_sym_EQ_EQ, - anon_sym_TILDE_EQ, - anon_sym_GT_EQ, - [7762] = 7, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(315), 1, - anon_sym_COMMA, - STATE(101), 1, - aux_sym__name_list_repeat1, - STATE(110), 1, - sym_comment, - ACTIONS(333), 5, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_EQ, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(335), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [7802] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(341), 1, - anon_sym_COMMA, - STATE(111), 2, - sym_comment, - aux_sym__variable_assignment_explist_repeat1, - ACTIONS(337), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(339), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [7839] = 7, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(198), 1, - anon_sym_COMMA, - STATE(111), 1, - aux_sym__variable_assignment_explist_repeat1, - STATE(112), 1, - sym_comment, - ACTIONS(344), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(346), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [7878] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(352), 1, - anon_sym_EQ, - STATE(113), 1, - sym_comment, - ACTIONS(348), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(350), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [7914] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(114), 1, - sym_comment, - ACTIONS(354), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(356), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [7947] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(115), 1, - sym_comment, - ACTIONS(358), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(360), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [7980] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(116), 1, - sym_comment, - ACTIONS(362), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(364), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8013] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(117), 1, - sym_comment, - ACTIONS(295), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(297), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8046] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(118), 1, - sym_comment, - ACTIONS(366), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(368), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8079] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(119), 1, - sym_comment, - ACTIONS(370), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(372), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8112] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(120), 1, - sym_comment, - ACTIONS(374), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(376), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8145] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(121), 1, - sym_comment, - ACTIONS(378), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(380), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8178] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(122), 1, - sym_comment, - ACTIONS(382), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(384), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8211] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(123), 1, - sym_comment, - ACTIONS(386), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(388), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8244] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(124), 1, - sym_comment, - ACTIONS(390), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(392), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8277] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(125), 1, - sym_comment, - ACTIONS(394), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(396), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8310] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(126), 1, - sym_comment, - ACTIONS(398), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(400), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8343] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(127), 1, - sym_comment, - ACTIONS(402), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(404), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8376] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(128), 1, - sym_comment, - ACTIONS(406), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(408), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8409] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(129), 1, - sym_comment, - ACTIONS(410), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(412), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8442] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(130), 1, - sym_comment, - ACTIONS(414), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(416), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8475] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(131), 1, - sym_comment, - ACTIONS(418), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(420), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8508] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(132), 1, - sym_comment, - ACTIONS(422), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(424), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8541] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(133), 1, - sym_comment, - ACTIONS(426), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(428), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8574] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(134), 1, - sym_comment, - ACTIONS(430), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(432), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8607] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(135), 1, - sym_comment, - ACTIONS(434), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(436), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8640] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(136), 1, - sym_comment, - ACTIONS(438), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(440), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8673] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(137), 1, - sym_comment, - ACTIONS(442), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(444), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8706] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(138), 1, - sym_comment, - ACTIONS(446), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(448), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8739] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(139), 1, - sym_comment, - ACTIONS(450), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(452), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8772] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(140), 1, - sym_comment, - ACTIONS(454), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(456), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8805] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(141), 1, - sym_comment, - ACTIONS(458), 4, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(460), 15, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_until, - anon_sym_if, - anon_sym_elseif, - anon_sym_else, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8838] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(142), 1, - sym_comment, - ACTIONS(462), 7, - anon_sym_function, - sym_nil, - sym_false, - sym_true, - anon_sym_DASH, - anon_sym_not, - sym_identifier, - ACTIONS(464), 9, - sym__string_start, - sym_number, - sym_vararg_expression, - anon_sym_LPAREN, - anon_sym_LBRACK, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_TILDE, - anon_sym_POUND, - [8868] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(143), 1, - sym_comment, - ACTIONS(468), 3, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(466), 12, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_if, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8897] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(144), 1, - sym_comment, - ACTIONS(472), 3, - anon_sym_SEMI, - anon_sym_COLON_COLON, - anon_sym_LPAREN, - ACTIONS(470), 12, - anon_sym_return, - sym_break_statement, - anon_sym_goto, - anon_sym_do, - anon_sym_end, - anon_sym_while, - anon_sym_repeat, - anon_sym_if, - anon_sym_for, - anon_sym_function, - anon_sym_local, - sym_identifier, - [8926] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(280), 1, - anon_sym_else, - ACTIONS(474), 1, - anon_sym_COMMA, - STATE(145), 2, - sym_comment, - aux_sym__expression_list_repeat1, - ACTIONS(278), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_do, - anon_sym_end, - anon_sym_until, - anon_sym_elseif, - anon_sym_RPAREN, - [8952] = 10, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(37), 1, - anon_sym_LPAREN, - ACTIONS(477), 1, - sym_identifier, - STATE(146), 1, - sym_comment, - STATE(148), 1, - sym__prefix_expression, - STATE(150), 1, - sym_variable, - STATE(151), 1, - sym_method_index_expression, - STATE(4), 2, - sym_bracket_index_expression, - sym_dot_index_expression, - STATE(154), 2, - sym_function_call, - sym_parenthesized_expression, - [8985] = 7, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(268), 1, - anon_sym_COMMA, - ACTIONS(481), 1, - anon_sym_else, - STATE(145), 1, - aux_sym__expression_list_repeat1, - STATE(147), 1, - sym_comment, - ACTIONS(479), 6, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_do, - anon_sym_end, - anon_sym_until, - anon_sym_elseif, - [9012] = 11, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(483), 1, - anon_sym_DOT, - ACTIONS(485), 1, - anon_sym_COLON, - ACTIONS(487), 1, - anon_sym_LPAREN, - ACTIONS(489), 1, - anon_sym_LBRACK, - ACTIONS(491), 1, - anon_sym_LBRACE, - ACTIONS(493), 1, - sym__string_start, - STATE(12), 1, - sym_arguments, - STATE(148), 1, - sym_comment, - STATE(13), 2, - sym_string, - sym_table_constructor, - [9047] = 7, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(495), 1, - anon_sym_EQ, - ACTIONS(497), 1, - anon_sym_COMMA, - STATE(149), 1, - sym_comment, - STATE(178), 1, - aux_sym__variable_assignment_varlist_repeat1, - ACTIONS(93), 6, - sym__string_start, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_LPAREN, - anon_sym_LBRACK, - anon_sym_LBRACE, - [9074] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(150), 1, - sym_comment, - ACTIONS(499), 2, - anon_sym_EQ, - anon_sym_COMMA, - ACTIONS(93), 6, - sym__string_start, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_LPAREN, - anon_sym_LBRACK, - anon_sym_LBRACE, - [9096] = 8, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(487), 1, - anon_sym_LPAREN, - ACTIONS(491), 1, - anon_sym_LBRACE, - ACTIONS(493), 1, - sym__string_start, - STATE(12), 1, - sym_arguments, - STATE(151), 1, - sym_comment, - STATE(13), 2, - sym_string, - sym_table_constructor, - [9122] = 9, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(145), 1, - anon_sym_else, - ACTIONS(501), 1, - anon_sym_end, - ACTIONS(503), 1, - anon_sym_elseif, - STATE(152), 1, - sym_comment, - STATE(159), 1, - aux_sym_if_statement_repeat1, - STATE(179), 1, - sym_elseif_statement, - STATE(217), 1, - sym_else_statement, - [9150] = 9, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(145), 1, - anon_sym_else, - ACTIONS(503), 1, - anon_sym_elseif, - ACTIONS(505), 1, - anon_sym_end, - STATE(153), 1, - sym_comment, - STATE(159), 1, - aux_sym_if_statement_repeat1, - STATE(179), 1, - sym_elseif_statement, - STATE(203), 1, - sym_else_statement, - [9178] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(154), 1, - sym_comment, - ACTIONS(93), 6, - sym__string_start, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_LPAREN, - anon_sym_LBRACK, - anon_sym_LBRACE, - [9196] = 9, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(145), 1, - anon_sym_else, - ACTIONS(503), 1, - anon_sym_elseif, - ACTIONS(507), 1, - anon_sym_end, - STATE(152), 1, - aux_sym_if_statement_repeat1, - STATE(155), 1, - sym_comment, - STATE(179), 1, - sym_elseif_statement, - STATE(199), 1, - sym_else_statement, - [9224] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(511), 1, - anon_sym_SEMI, - ACTIONS(513), 1, - anon_sym_else, - STATE(156), 1, - sym_comment, - ACTIONS(509), 4, - ts_builtin_sym_end, - anon_sym_end, - anon_sym_until, - anon_sym_elseif, - [9246] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(518), 1, - anon_sym_RBRACE, - STATE(61), 1, - sym__field_sep, - ACTIONS(515), 2, - anon_sym_SEMI, - anon_sym_COMMA, - STATE(157), 2, - sym_comment, - aux_sym__field_list_repeat1, - [9267] = 7, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(264), 1, - anon_sym_RBRACE, - STATE(59), 1, - sym__field_sep, - STATE(157), 1, - aux_sym__field_list_repeat1, - STATE(158), 1, - sym_comment, - ACTIONS(520), 2, - anon_sym_SEMI, - anon_sym_COMMA, - [9290] = 7, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(522), 1, - anon_sym_end, - ACTIONS(524), 1, - anon_sym_elseif, - ACTIONS(527), 1, - anon_sym_else, - STATE(179), 1, - sym_elseif_statement, - STATE(159), 2, - sym_comment, - aux_sym_if_statement_repeat1, - [9313] = 7, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(529), 1, - anon_sym_RBRACE, - STATE(57), 1, - sym__field_sep, - STATE(158), 1, - aux_sym__field_list_repeat1, - STATE(160), 1, - sym_comment, - ACTIONS(520), 2, - anon_sym_SEMI, - anon_sym_COMMA, - [9336] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(533), 1, - anon_sym_else, - STATE(161), 1, - sym_comment, - ACTIONS(531), 4, - ts_builtin_sym_end, - anon_sym_end, - anon_sym_until, - anon_sym_elseif, - [9355] = 8, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(535), 1, - sym_identifier, - STATE(162), 1, - sym_comment, - STATE(171), 1, - sym__function_name_prefix_expression, - STATE(183), 1, - sym__function_name_dot_index_expression, - STATE(185), 1, - sym__function_name, - STATE(200), 1, - sym__function_name_method_index_expression, - [9380] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(513), 1, - anon_sym_else, - STATE(163), 1, - sym_comment, - ACTIONS(509), 4, - ts_builtin_sym_end, - anon_sym_end, - anon_sym_until, - anon_sym_elseif, - [9399] = 7, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(315), 1, - anon_sym_COMMA, - ACTIONS(333), 1, - anon_sym_in, - ACTIONS(537), 1, - anon_sym_EQ, - STATE(101), 1, - aux_sym__name_list_repeat1, - STATE(164), 1, - sym_comment, - [9421] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(204), 1, - anon_sym_else, - STATE(165), 1, - sym_comment, - ACTIONS(539), 3, - anon_sym_end, - anon_sym_until, - anon_sym_elseif, - [9439] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(541), 1, - sym_identifier, - STATE(166), 1, - sym_comment, - STATE(197), 1, - sym__name_list, - STATE(196), 2, - sym_for_generic_clause, - sym_for_numeric_clause, - [9459] = 7, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(543), 1, - sym_identifier, - ACTIONS(545), 1, - sym_vararg_expression, - ACTIONS(547), 1, - anon_sym_RPAREN, - STATE(167), 1, - sym_comment, - STATE(207), 1, - sym__parameter_list, - [9481] = 7, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(549), 1, - sym_identifier, - ACTIONS(551), 1, - anon_sym_function, - STATE(113), 1, - sym__name_list, - STATE(129), 1, - sym__local_variable_assignment, - STATE(168), 1, - sym_comment, - [9503] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(555), 1, - anon_sym_else, - STATE(169), 1, - sym_comment, - ACTIONS(553), 3, - anon_sym_end, - anon_sym_until, - anon_sym_elseif, - [9521] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(557), 1, - anon_sym_LPAREN, - STATE(30), 1, - sym__function_body, - STATE(43), 1, - sym_parameters, - STATE(170), 1, - sym_comment, - [9540] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(559), 1, - anon_sym_DOT, - ACTIONS(561), 1, - anon_sym_COLON, - ACTIONS(563), 1, - anon_sym_LPAREN, - STATE(171), 1, - sym_comment, - [9559] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(557), 1, - anon_sym_LPAREN, - STATE(43), 1, - sym_parameters, - STATE(127), 1, - sym__function_body, - STATE(172), 1, - sym_comment, - [9578] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(567), 1, - anon_sym_else, - STATE(173), 1, - sym_comment, - ACTIONS(565), 2, - anon_sym_end, - anon_sym_elseif, - [9595] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(174), 1, - sym_comment, - ACTIONS(569), 3, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_LPAREN, - [9610] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(175), 1, - sym_comment, - ACTIONS(571), 3, - sym__string_start, - anon_sym_LPAREN, - anon_sym_LBRACE, - [9625] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(573), 1, - anon_sym_EQ, - ACTIONS(575), 1, - anon_sym_COMMA, - STATE(176), 2, - sym_comment, - aux_sym__variable_assignment_varlist_repeat1, - [9642] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(578), 1, - anon_sym_COMMA, - ACTIONS(580), 1, - anon_sym_RPAREN, - STATE(177), 1, - sym_comment, - STATE(182), 1, - aux_sym__name_list_repeat1, - [9661] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(497), 1, - anon_sym_COMMA, - ACTIONS(582), 1, - anon_sym_EQ, - STATE(176), 1, - aux_sym__variable_assignment_varlist_repeat1, - STATE(178), 1, - sym_comment, - [9680] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(586), 1, - anon_sym_else, - STATE(179), 1, - sym_comment, - ACTIONS(584), 2, - anon_sym_end, - anon_sym_elseif, - [9697] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(268), 1, - anon_sym_COMMA, - ACTIONS(588), 1, - anon_sym_RPAREN, - STATE(145), 1, - aux_sym__expression_list_repeat1, - STATE(180), 1, - sym_comment, - [9716] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(181), 1, - sym_comment, - ACTIONS(518), 3, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_RBRACE, - [9731] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(590), 1, - anon_sym_COMMA, - ACTIONS(592), 1, - anon_sym_RPAREN, - STATE(93), 1, - aux_sym__name_list_repeat1, - STATE(182), 1, - sym_comment, - [9750] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(183), 1, - sym_comment, - ACTIONS(594), 3, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_LPAREN, - [9765] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - STATE(184), 1, - sym_comment, - ACTIONS(596), 3, - anon_sym_DOT, - anon_sym_COLON, - anon_sym_LPAREN, - [9780] = 6, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(557), 1, - anon_sym_LPAREN, - STATE(43), 1, - sym_parameters, - STATE(120), 1, - sym__function_body, - STATE(185), 1, - sym_comment, - [9799] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(598), 1, - sym__string_content, - ACTIONS(600), 1, - sym__string_end, - STATE(186), 1, - sym_comment, - [9815] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(602), 1, - sym__block_comment_content, - ACTIONS(604), 1, - sym__block_comment_end, - STATE(187), 1, - sym_comment, - [9831] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(606), 1, - sym__string_content, - ACTIONS(608), 1, - sym__string_end, - STATE(188), 1, - sym_comment, - [9847] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(610), 1, - sym_identifier, - ACTIONS(612), 1, - sym_vararg_expression, - STATE(189), 1, - sym_comment, - [9863] = 5, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(610), 1, - sym_identifier, - ACTIONS(614), 1, - sym_vararg_expression, - STATE(190), 1, - sym_comment, - [9879] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(616), 1, - sym_identifier, - STATE(191), 1, - sym_comment, - [9892] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(618), 1, - anon_sym_EQ, - STATE(192), 1, - sym_comment, - [9905] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(620), 1, - anon_sym_end, - STATE(193), 1, - sym_comment, - [9918] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(622), 1, - anon_sym_until, - STATE(194), 1, - sym_comment, - [9931] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(624), 1, - anon_sym_EQ, - STATE(195), 1, - sym_comment, - [9944] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(626), 1, - anon_sym_do, - STATE(196), 1, - sym_comment, - [9957] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(628), 1, - anon_sym_in, - STATE(197), 1, - sym_comment, - [9970] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(630), 1, - anon_sym_end, - STATE(198), 1, - sym_comment, - [9983] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(632), 1, - anon_sym_end, - STATE(199), 1, - sym_comment, - [9996] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(634), 1, - anon_sym_LPAREN, - STATE(200), 1, - sym_comment, - [10009] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(636), 1, - anon_sym_end, - STATE(201), 1, - sym_comment, - [10022] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(638), 1, - sym_identifier, - STATE(202), 1, - sym_comment, - [10035] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(640), 1, - anon_sym_end, - STATE(203), 1, - sym_comment, - [10048] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(642), 1, - sym_identifier, - STATE(204), 1, - sym_comment, - [10061] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(644), 1, - anon_sym_end, - STATE(205), 1, - sym_comment, - [10074] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(646), 1, - anon_sym_RBRACE, - STATE(206), 1, - sym_comment, - [10087] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(648), 1, - anon_sym_RPAREN, - STATE(207), 1, - sym_comment, - [10100] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(650), 1, - sym__string_end, - STATE(208), 1, - sym_comment, - [10113] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(652), 1, - anon_sym_RPAREN, - STATE(209), 1, - sym_comment, - [10126] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(654), 1, - anon_sym_RPAREN, - STATE(210), 1, - sym_comment, - [10139] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(232), 1, - ts_builtin_sym_end, - STATE(211), 1, - sym_comment, - [10152] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(656), 1, - sym__block_comment_end, - STATE(212), 1, - sym_comment, - [10165] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(230), 1, - ts_builtin_sym_end, - STATE(213), 1, - sym_comment, - [10178] = 4, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(658), 1, - anon_sym_DASH_DASH, - ACTIONS(660), 1, - aux_sym_comment_token1, - STATE(214), 1, - sym_comment, - [10191] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(662), 1, - anon_sym_end, - STATE(215), 1, - sym_comment, - [10204] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(664), 1, - ts_builtin_sym_end, - STATE(216), 1, - sym_comment, - [10217] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(666), 1, - anon_sym_end, - STATE(217), 1, - sym_comment, - [10230] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(668), 1, - sym__string_end, - STATE(218), 1, - sym_comment, - [10243] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(670), 1, - ts_builtin_sym_end, - STATE(219), 1, - sym_comment, - [10256] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(672), 1, - anon_sym_RPAREN, - STATE(220), 1, - sym_comment, - [10269] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(674), 1, - anon_sym_COLON_COLON, - STATE(221), 1, - sym_comment, - [10282] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(676), 1, - anon_sym_LPAREN, - STATE(222), 1, - sym_comment, - [10295] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(678), 1, - anon_sym_RBRACE, - STATE(223), 1, - sym_comment, - [10308] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(680), 1, - anon_sym_do, - STATE(224), 1, - sym_comment, - [10321] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(682), 1, - sym_identifier, - STATE(225), 1, - sym_comment, - [10334] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(684), 1, - sym_identifier, - STATE(226), 1, - sym_comment, - [10347] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(686), 1, - sym_identifier, - STATE(227), 1, - sym_comment, - [10360] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(688), 1, - sym_identifier, - STATE(228), 1, - sym_comment, - [10373] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(690), 1, - anon_sym_end, - STATE(229), 1, - sym_comment, - [10386] = 4, - ACTIONS(3), 1, - anon_sym_DASH_DASH, - ACTIONS(5), 1, - sym__block_comment_start, - ACTIONS(610), 1, - sym_identifier, - STATE(230), 1, - sym_comment, - [10399] = 1, - ACTIONS(692), 1, - ts_builtin_sym_end, - [10403] = 1, - ACTIONS(694), 1, - ts_builtin_sym_end, - [10407] = 1, - ACTIONS(696), 1, - ts_builtin_sym_end, -}; - -static const uint32_t ts_small_parse_table_map[] = { - [SMALL_STATE(2)] = 0, - [SMALL_STATE(3)] = 65, - [SMALL_STATE(4)] = 130, - [SMALL_STATE(5)] = 195, - [SMALL_STATE(6)] = 259, - [SMALL_STATE(7)] = 323, - [SMALL_STATE(8)] = 387, - [SMALL_STATE(9)] = 451, - [SMALL_STATE(10)] = 515, - [SMALL_STATE(11)] = 579, - [SMALL_STATE(12)] = 643, - [SMALL_STATE(13)] = 707, - [SMALL_STATE(14)] = 771, - [SMALL_STATE(15)] = 839, - [SMALL_STATE(16)] = 903, - [SMALL_STATE(17)] = 962, - [SMALL_STATE(18)] = 1021, - [SMALL_STATE(19)] = 1106, - [SMALL_STATE(20)] = 1171, - [SMALL_STATE(21)] = 1254, - [SMALL_STATE(22)] = 1333, - [SMALL_STATE(23)] = 1394, - [SMALL_STATE(24)] = 1455, - [SMALL_STATE(25)] = 1526, - [SMALL_STATE(26)] = 1587, - [SMALL_STATE(27)] = 1664, - [SMALL_STATE(28)] = 1723, - [SMALL_STATE(29)] = 1798, - [SMALL_STATE(30)] = 1871, - [SMALL_STATE(31)] = 1930, - [SMALL_STATE(32)] = 1989, - [SMALL_STATE(33)] = 2116, - [SMALL_STATE(34)] = 2175, - [SMALL_STATE(35)] = 2234, - [SMALL_STATE(36)] = 2305, - [SMALL_STATE(37)] = 2364, - [SMALL_STATE(38)] = 2472, - [SMALL_STATE(39)] = 2560, - [SMALL_STATE(40)] = 2674, - [SMALL_STATE(41)] = 2786, - [SMALL_STATE(42)] = 2869, - [SMALL_STATE(43)] = 2981, - [SMALL_STATE(44)] = 3093, - [SMALL_STATE(45)] = 3205, - [SMALL_STATE(46)] = 3287, - [SMALL_STATE(47)] = 3399, - [SMALL_STATE(48)] = 3511, - [SMALL_STATE(49)] = 3593, - [SMALL_STATE(50)] = 3705, - [SMALL_STATE(51)] = 3814, - [SMALL_STATE(52)] = 3923, - [SMALL_STATE(53)] = 4032, - [SMALL_STATE(54)] = 4114, - [SMALL_STATE(55)] = 4193, - [SMALL_STATE(56)] = 4272, - [SMALL_STATE(57)] = 4319, - [SMALL_STATE(58)] = 4395, - [SMALL_STATE(59)] = 4471, - [SMALL_STATE(60)] = 4547, - [SMALL_STATE(61)] = 4619, - [SMALL_STATE(62)] = 4692, - [SMALL_STATE(63)] = 4762, - [SMALL_STATE(64)] = 4832, - [SMALL_STATE(65)] = 4902, - [SMALL_STATE(66)] = 4972, - [SMALL_STATE(67)] = 5039, - [SMALL_STATE(68)] = 5106, - [SMALL_STATE(69)] = 5173, - [SMALL_STATE(70)] = 5240, - [SMALL_STATE(71)] = 5307, - [SMALL_STATE(72)] = 5374, - [SMALL_STATE(73)] = 5441, - [SMALL_STATE(74)] = 5508, - [SMALL_STATE(75)] = 5575, - [SMALL_STATE(76)] = 5642, - [SMALL_STATE(77)] = 5709, - [SMALL_STATE(78)] = 5776, - [SMALL_STATE(79)] = 5843, - [SMALL_STATE(80)] = 5910, - [SMALL_STATE(81)] = 5977, - [SMALL_STATE(82)] = 6044, - [SMALL_STATE(83)] = 6111, - [SMALL_STATE(84)] = 6178, - [SMALL_STATE(85)] = 6245, - [SMALL_STATE(86)] = 6312, - [SMALL_STATE(87)] = 6379, - [SMALL_STATE(88)] = 6446, - [SMALL_STATE(89)] = 6513, - [SMALL_STATE(90)] = 6580, - [SMALL_STATE(91)] = 6647, - [SMALL_STATE(92)] = 6714, - [SMALL_STATE(93)] = 6781, - [SMALL_STATE(94)] = 6821, - [SMALL_STATE(95)] = 6885, - [SMALL_STATE(96)] = 6949, - [SMALL_STATE(97)] = 6991, - [SMALL_STATE(98)] = 7059, - [SMALL_STATE(99)] = 7123, - [SMALL_STATE(100)] = 7160, - [SMALL_STATE(101)] = 7225, - [SMALL_STATE(102)] = 7266, - [SMALL_STATE(103)] = 7328, - [SMALL_STATE(104)] = 7390, - [SMALL_STATE(105)] = 7452, - [SMALL_STATE(106)] = 7514, - [SMALL_STATE(107)] = 7576, - [SMALL_STATE(108)] = 7638, - [SMALL_STATE(109)] = 7700, - [SMALL_STATE(110)] = 7762, - [SMALL_STATE(111)] = 7802, - [SMALL_STATE(112)] = 7839, - [SMALL_STATE(113)] = 7878, - [SMALL_STATE(114)] = 7914, - [SMALL_STATE(115)] = 7947, - [SMALL_STATE(116)] = 7980, - [SMALL_STATE(117)] = 8013, - [SMALL_STATE(118)] = 8046, - [SMALL_STATE(119)] = 8079, - [SMALL_STATE(120)] = 8112, - [SMALL_STATE(121)] = 8145, - [SMALL_STATE(122)] = 8178, - [SMALL_STATE(123)] = 8211, - [SMALL_STATE(124)] = 8244, - [SMALL_STATE(125)] = 8277, - [SMALL_STATE(126)] = 8310, - [SMALL_STATE(127)] = 8343, - [SMALL_STATE(128)] = 8376, - [SMALL_STATE(129)] = 8409, - [SMALL_STATE(130)] = 8442, - [SMALL_STATE(131)] = 8475, - [SMALL_STATE(132)] = 8508, - [SMALL_STATE(133)] = 8541, - [SMALL_STATE(134)] = 8574, - [SMALL_STATE(135)] = 8607, - [SMALL_STATE(136)] = 8640, - [SMALL_STATE(137)] = 8673, - [SMALL_STATE(138)] = 8706, - [SMALL_STATE(139)] = 8739, - [SMALL_STATE(140)] = 8772, - [SMALL_STATE(141)] = 8805, - [SMALL_STATE(142)] = 8838, - [SMALL_STATE(143)] = 8868, - [SMALL_STATE(144)] = 8897, - [SMALL_STATE(145)] = 8926, - [SMALL_STATE(146)] = 8952, - [SMALL_STATE(147)] = 8985, - [SMALL_STATE(148)] = 9012, - [SMALL_STATE(149)] = 9047, - [SMALL_STATE(150)] = 9074, - [SMALL_STATE(151)] = 9096, - [SMALL_STATE(152)] = 9122, - [SMALL_STATE(153)] = 9150, - [SMALL_STATE(154)] = 9178, - [SMALL_STATE(155)] = 9196, - [SMALL_STATE(156)] = 9224, - [SMALL_STATE(157)] = 9246, - [SMALL_STATE(158)] = 9267, - [SMALL_STATE(159)] = 9290, - [SMALL_STATE(160)] = 9313, - [SMALL_STATE(161)] = 9336, - [SMALL_STATE(162)] = 9355, - [SMALL_STATE(163)] = 9380, - [SMALL_STATE(164)] = 9399, - [SMALL_STATE(165)] = 9421, - [SMALL_STATE(166)] = 9439, - [SMALL_STATE(167)] = 9459, - [SMALL_STATE(168)] = 9481, - [SMALL_STATE(169)] = 9503, - [SMALL_STATE(170)] = 9521, - [SMALL_STATE(171)] = 9540, - [SMALL_STATE(172)] = 9559, - [SMALL_STATE(173)] = 9578, - [SMALL_STATE(174)] = 9595, - [SMALL_STATE(175)] = 9610, - [SMALL_STATE(176)] = 9625, - [SMALL_STATE(177)] = 9642, - [SMALL_STATE(178)] = 9661, - [SMALL_STATE(179)] = 9680, - [SMALL_STATE(180)] = 9697, - [SMALL_STATE(181)] = 9716, - [SMALL_STATE(182)] = 9731, - [SMALL_STATE(183)] = 9750, - [SMALL_STATE(184)] = 9765, - [SMALL_STATE(185)] = 9780, - [SMALL_STATE(186)] = 9799, - [SMALL_STATE(187)] = 9815, - [SMALL_STATE(188)] = 9831, - [SMALL_STATE(189)] = 9847, - [SMALL_STATE(190)] = 9863, - [SMALL_STATE(191)] = 9879, - [SMALL_STATE(192)] = 9892, - [SMALL_STATE(193)] = 9905, - [SMALL_STATE(194)] = 9918, - [SMALL_STATE(195)] = 9931, - [SMALL_STATE(196)] = 9944, - [SMALL_STATE(197)] = 9957, - [SMALL_STATE(198)] = 9970, - [SMALL_STATE(199)] = 9983, - [SMALL_STATE(200)] = 9996, - [SMALL_STATE(201)] = 10009, - [SMALL_STATE(202)] = 10022, - [SMALL_STATE(203)] = 10035, - [SMALL_STATE(204)] = 10048, - [SMALL_STATE(205)] = 10061, - [SMALL_STATE(206)] = 10074, - [SMALL_STATE(207)] = 10087, - [SMALL_STATE(208)] = 10100, - [SMALL_STATE(209)] = 10113, - [SMALL_STATE(210)] = 10126, - [SMALL_STATE(211)] = 10139, - [SMALL_STATE(212)] = 10152, - [SMALL_STATE(213)] = 10165, - [SMALL_STATE(214)] = 10178, - [SMALL_STATE(215)] = 10191, - [SMALL_STATE(216)] = 10204, - [SMALL_STATE(217)] = 10217, - [SMALL_STATE(218)] = 10230, - [SMALL_STATE(219)] = 10243, - [SMALL_STATE(220)] = 10256, - [SMALL_STATE(221)] = 10269, - [SMALL_STATE(222)] = 10282, - [SMALL_STATE(223)] = 10295, - [SMALL_STATE(224)] = 10308, - [SMALL_STATE(225)] = 10321, - [SMALL_STATE(226)] = 10334, - [SMALL_STATE(227)] = 10347, - [SMALL_STATE(228)] = 10360, - [SMALL_STATE(229)] = 10373, - [SMALL_STATE(230)] = 10386, - [SMALL_STATE(231)] = 10399, - [SMALL_STATE(232)] = 10403, - [SMALL_STATE(233)] = 10407, -}; - -static const TSParseActionEntry ts_parse_actions[] = { - [0] = {.entry = {.count = 0, .reusable = false}}, - [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), - [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT(214), - [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(187), - [7] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_chunk, 0), - [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(4), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), - [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53), - [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), - [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(228), - [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(117), - [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(226), - [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(42), - [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(81), - [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), - [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(69), - [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(166), - [33] = {.entry = {.count = 1, .reusable = false}}, SHIFT(162), - [35] = {.entry = {.count = 1, .reusable = false}}, SHIFT(168), - [37] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), - [39] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dot_index_expression, 3, .production_id = 20), - [41] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_dot_index_expression, 3, .production_id = 20), - [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_bracket_index_expression, 4, .production_id = 20), - [45] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_bracket_index_expression, 4, .production_id = 20), - [47] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable, 1), - [49] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable, 1), - [51] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_arguments, 4), - [53] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_arguments, 4), - [55] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_expression, 3), - [57] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_expression, 3), - [59] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table_constructor, 3), - [61] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table_constructor, 3), - [63] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_arguments, 2), - [65] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_arguments, 2), - [67] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 3, .production_id = 12), - [69] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string, 3, .production_id = 12), - [71] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table_constructor, 2), - [73] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table_constructor, 2), - [75] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 2, .production_id = 5), - [77] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string, 2, .production_id = 5), - [79] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 2, .production_id = 10), - [81] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 2, .production_id = 10), - [83] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_arguments, 1), - [85] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_arguments, 1), - [87] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 1), - [89] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 1), - [91] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__prefix_expression, 1), - [93] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__prefix_expression, 1), - [95] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_arguments, 3), - [97] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_arguments, 3), - [99] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_body, 2, .production_id = 24), - [101] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__function_body, 2, .production_id = 24), - [103] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 25), - [105] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, .production_id = 25), - [107] = {.entry = {.count = 1, .reusable = false}}, SHIFT(84), - [109] = {.entry = {.count = 1, .reusable = false}}, SHIFT(83), - [111] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), - [113] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), - [115] = {.entry = {.count = 1, .reusable = false}}, SHIFT(67), - [117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), - [119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79), - [121] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), - [123] = {.entry = {.count = 1, .reusable = false}}, SHIFT(77), - [125] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), - [127] = {.entry = {.count = 1, .reusable = false}}, SHIFT(76), - [129] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), - [131] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), - [133] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, .production_id = 15), - [135] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unary_expression, 2, .production_id = 15), - [137] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 2, .production_id = 13), - [139] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 2, .production_id = 13), - [141] = {.entry = {.count = 1, .reusable = false}}, SHIFT(122), - [143] = {.entry = {.count = 1, .reusable = false}}, SHIFT(85), - [145] = {.entry = {.count = 1, .reusable = false}}, SHIFT(44), - [147] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_body, 3, .production_id = 33), - [149] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__function_body, 3, .production_id = 33), - [151] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_chunk_repeat1, 2), - [153] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(4), - [156] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), - [158] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(116), - [161] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(228), - [164] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(117), - [167] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(226), - [170] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(42), - [173] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(81), - [176] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(49), - [179] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(69), - [182] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(166), - [185] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(162), - [188] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(168), - [191] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_chunk_repeat1, 2), SHIFT_REPEAT(92), - [194] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__variable_assignment_explist, 1, .production_id = 14), - [196] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__variable_assignment_explist, 1, .production_id = 14), - [198] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78), - [200] = {.entry = {.count = 1, .reusable = false}}, SHIFT(86), - [202] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_elseif_statement, 3, .production_id = 26), - [204] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__block, 1), - [206] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__variable_assignment_explist_repeat1, 2, .production_id = 41), - [208] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__variable_assignment_explist_repeat1, 2, .production_id = 41), - [210] = {.entry = {.count = 1, .reusable = false}}, SHIFT(125), - [212] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), - [214] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_else_statement, 1), - [216] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_repeat_statement, 4, .production_id = 27), - [218] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_repeat_statement, 4, .production_id = 27), - [220] = {.entry = {.count = 1, .reusable = false}}, SHIFT(114), - [222] = {.entry = {.count = 1, .reusable = false}}, SHIFT(128), - [224] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_repeat_statement, 3, .production_id = 17), - [226] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_repeat_statement, 3, .production_id = 17), - [228] = {.entry = {.count = 1, .reusable = false}}, SHIFT(90), - [230] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_chunk, 1), - [232] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_chunk, 2), - [234] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_statement, 1), - [236] = {.entry = {.count = 1, .reusable = true}}, SHIFT(163), - [238] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return_statement, 1), - [240] = {.entry = {.count = 1, .reusable = false}}, SHIFT(170), - [242] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), - [244] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), - [246] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), - [248] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), - [250] = {.entry = {.count = 1, .reusable = false}}, SHIFT(87), - [252] = {.entry = {.count = 1, .reusable = true}}, SHIFT(188), - [254] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), - [256] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), - [258] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), - [260] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), - [262] = {.entry = {.count = 1, .reusable = false}}, SHIFT(72), - [264] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__field_list, 2), - [266] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expression_list, 1), - [268] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), - [270] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expression_list, 1), - [272] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), - [274] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), - [276] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__field_list, 3), - [278] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__expression_list_repeat1, 2), - [280] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__expression_list_repeat1, 2), - [282] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), - [284] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__name_list_repeat1, 2, .production_id = 23), - [286] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__name_list_repeat1, 2, .production_id = 23), - [288] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__name_list_repeat1, 2, .production_id = 23), SHIFT_REPEAT(230), - [291] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field, 1, .production_id = 14), - [293] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field, 3, .production_id = 34), - [295] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_statement, 1), - [297] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_statement, 1), - [299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), - [301] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field, 5, .production_id = 47), - [303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__name_list_repeat1, 2, .production_id = 22), - [305] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__name_list_repeat1, 2, .production_id = 22), - [307] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), - [309] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_numeric_clause, 5, .production_id = 46), - [311] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__name_list, 2, .production_id = 11), - [313] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__name_list, 2, .production_id = 11), - [315] = {.entry = {.count = 1, .reusable = true}}, SHIFT(230), - [317] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), - [319] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_numeric_clause, 7, .production_id = 49), - [321] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [323] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), - [325] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), - [327] = {.entry = {.count = 1, .reusable = true}}, SHIFT(195), - [329] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), - [331] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), - [333] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__name_list, 1, .production_id = 4), - [335] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__name_list, 1, .production_id = 4), - [337] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__variable_assignment_explist_repeat1, 2, .production_id = 42), - [339] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__variable_assignment_explist_repeat1, 2, .production_id = 42), - [341] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__variable_assignment_explist_repeat1, 2, .production_id = 42), SHIFT_REPEAT(78), - [344] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__variable_assignment_explist, 2, .production_id = 32), - [346] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__variable_assignment_explist, 2, .production_id = 32), - [348] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration, 2, .production_id = 9), - [350] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable_declaration, 2, .production_id = 9), - [352] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), - [354] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 4, .production_id = 29), - [356] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 4, .production_id = 29), - [358] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 6, .production_id = 45), - [360] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 6, .production_id = 45), - [362] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_empty_statement, 1), - [364] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_empty_statement, 1), - [366] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_do_statement, 3, .production_id = 16), - [368] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_do_statement, 3, .production_id = 16), - [370] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_label_statement, 3), - [372] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_label_statement, 3), - [374] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 3, .production_id = 18), - [376] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 3, .production_id = 18), - [378] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_goto_statement, 2), - [380] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_goto_statement, 2), - [382] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 4, .production_id = 26), - [384] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 4, .production_id = 26), - [386] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 7, .production_id = 48), - [388] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 7, .production_id = 48), - [390] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_statement, 5, .production_id = 35), - [392] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_while_statement, 5, .production_id = 35), - [394] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_do_statement, 2), - [396] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_do_statement, 2), - [398] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment_statement, 3, .production_id = 19), - [400] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment_statement, 3, .production_id = 19), - [402] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__local_function_declaration, 4, .production_id = 31), - [404] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__local_function_declaration, 4, .production_id = 31), - [406] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_statement, 4, .production_id = 26), - [408] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_while_statement, 4, .production_id = 26), - [410] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration, 2), - [412] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable_declaration, 2), - [414] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 5, .production_id = 37), - [416] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 5, .production_id = 37), - [418] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 6, .production_id = 44), - [420] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 6, .production_id = 44), - [422] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 6, .production_id = 43), - [424] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 6, .production_id = 43), - [426] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 5, .production_id = 36), - [428] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 5, .production_id = 36), - [430] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_chunk_repeat1, 1), - [432] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_chunk_repeat1, 1), - [434] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_statement, 1, .production_id = 1), - [436] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_statement, 1, .production_id = 1), - [438] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 1), - [440] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_declaration, 1), - [442] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 5, .production_id = 38), - [444] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 5, .production_id = 38), - [446] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 1, .production_id = 2), - [448] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_declaration, 1, .production_id = 2), - [450] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 5, .production_id = 40), - [452] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 5, .production_id = 40), - [454] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 1, .production_id = 3), - [456] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_declaration, 1, .production_id = 3), - [458] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__local_variable_assignment, 3, .production_id = 19), - [460] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__local_variable_assignment, 3, .production_id = 19), - [462] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__field_sep, 1), - [464] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__field_sep, 1), - [466] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameters, 3, .production_id = 9), - [468] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 3, .production_id = 9), - [470] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameters, 2), - [472] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 2), - [474] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__expression_list_repeat1, 2), SHIFT_REPEAT(89), - [477] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), - [479] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expression_list, 2), - [481] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expression_list, 2), - [483] = {.entry = {.count = 1, .reusable = true}}, SHIFT(202), - [485] = {.entry = {.count = 1, .reusable = true}}, SHIFT(204), - [487] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), - [489] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), - [491] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), - [493] = {.entry = {.count = 1, .reusable = true}}, SHIFT(186), - [495] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__variable_assignment_varlist, 1, .production_id = 4), - [497] = {.entry = {.count = 1, .reusable = true}}, SHIFT(146), - [499] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__variable_assignment_varlist_repeat1, 2, .production_id = 22), - [501] = {.entry = {.count = 1, .reusable = true}}, SHIFT(131), - [503] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), - [505] = {.entry = {.count = 1, .reusable = true}}, SHIFT(137), - [507] = {.entry = {.count = 1, .reusable = true}}, SHIFT(133), - [509] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_statement, 2), - [511] = {.entry = {.count = 1, .reusable = true}}, SHIFT(161), - [513] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return_statement, 2), - [515] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__field_list_repeat1, 2), SHIFT_REPEAT(142), - [518] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__field_list_repeat1, 2), - [520] = {.entry = {.count = 1, .reusable = true}}, SHIFT(142), - [522] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_if_statement_repeat1, 2, .production_id = 39), - [524] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_if_statement_repeat1, 2, .production_id = 39), SHIFT_REPEAT(85), - [527] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_if_statement_repeat1, 2, .production_id = 39), - [529] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__field_list, 1), - [531] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_statement, 3), - [533] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return_statement, 3), - [535] = {.entry = {.count = 1, .reusable = true}}, SHIFT(184), - [537] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), - [539] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__block, 1), - [541] = {.entry = {.count = 1, .reusable = true}}, SHIFT(164), - [543] = {.entry = {.count = 1, .reusable = true}}, SHIFT(177), - [545] = {.entry = {.count = 1, .reusable = true}}, SHIFT(209), - [547] = {.entry = {.count = 1, .reusable = true}}, SHIFT(144), - [549] = {.entry = {.count = 1, .reusable = false}}, SHIFT(110), - [551] = {.entry = {.count = 1, .reusable = false}}, SHIFT(191), - [553] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__block, 2), - [555] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__block, 2), - [557] = {.entry = {.count = 1, .reusable = true}}, SHIFT(167), - [559] = {.entry = {.count = 1, .reusable = true}}, SHIFT(227), - [561] = {.entry = {.count = 1, .reusable = true}}, SHIFT(225), - [563] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_name, 1), - [565] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_elseif_statement, 4, .production_id = 36), - [567] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_elseif_statement, 4, .production_id = 36), - [569] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_name_dot_index_expression, 3, .production_id = 20), - [571] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_method_index_expression, 3, .production_id = 21), - [573] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__variable_assignment_varlist_repeat1, 2, .production_id = 23), - [575] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__variable_assignment_varlist_repeat1, 2, .production_id = 23), SHIFT_REPEAT(146), - [578] = {.entry = {.count = 1, .reusable = true}}, SHIFT(190), - [580] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__parameter_list, 1, .production_id = 4), - [582] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__variable_assignment_varlist, 2, .production_id = 11), - [584] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_if_statement_repeat1, 1, .production_id = 28), - [586] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_if_statement_repeat1, 1, .production_id = 28), - [588] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), - [590] = {.entry = {.count = 1, .reusable = true}}, SHIFT(189), - [592] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__parameter_list, 2, .production_id = 11), - [594] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_name_prefix_expression, 1, .production_id = 7), - [596] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_name_prefix_expression, 1), - [598] = {.entry = {.count = 1, .reusable = true}}, SHIFT(208), - [600] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [602] = {.entry = {.count = 1, .reusable = true}}, SHIFT(212), - [604] = {.entry = {.count = 1, .reusable = true}}, SHIFT(233), - [606] = {.entry = {.count = 1, .reusable = true}}, SHIFT(218), - [608] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [610] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), - [612] = {.entry = {.count = 1, .reusable = true}}, SHIFT(220), - [614] = {.entry = {.count = 1, .reusable = true}}, SHIFT(210), - [616] = {.entry = {.count = 1, .reusable = true}}, SHIFT(172), - [618] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), - [620] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), - [622] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), - [624] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), - [626] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), - [628] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), - [630] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_else_statement, 2, .production_id = 16), - [632] = {.entry = {.count = 1, .reusable = true}}, SHIFT(132), - [634] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_name, 1, .production_id = 8), - [636] = {.entry = {.count = 1, .reusable = true}}, SHIFT(130), - [638] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), - [640] = {.entry = {.count = 1, .reusable = true}}, SHIFT(115), - [642] = {.entry = {.count = 1, .reusable = true}}, SHIFT(175), - [644] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), - [646] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), - [648] = {.entry = {.count = 1, .reusable = true}}, SHIFT(143), - [650] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), - [652] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__parameter_list, 1), - [654] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__parameter_list, 3, .production_id = 4), - [656] = {.entry = {.count = 1, .reusable = true}}, SHIFT(231), - [658] = {.entry = {.count = 1, .reusable = false}}, SHIFT(214), - [660] = {.entry = {.count = 1, .reusable = false}}, SHIFT(232), - [662] = {.entry = {.count = 1, .reusable = true}}, SHIFT(124), - [664] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_chunk, 3), - [666] = {.entry = {.count = 1, .reusable = true}}, SHIFT(123), - [668] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), - [670] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [672] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__parameter_list, 4, .production_id = 11), - [674] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), - [676] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_name_method_index_expression, 3, .production_id = 21), - [678] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), - [680] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_generic_clause, 3, .production_id = 30), - [682] = {.entry = {.count = 1, .reusable = true}}, SHIFT(222), - [684] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), - [686] = {.entry = {.count = 1, .reusable = true}}, SHIFT(174), - [688] = {.entry = {.count = 1, .reusable = true}}, SHIFT(221), - [690] = {.entry = {.count = 1, .reusable = true}}, SHIFT(139), - [692] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 3, .production_id = 12), - [694] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 2, .production_id = 6), - [696] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 2, .production_id = 5), -}; - -#ifdef __cplusplus -extern "C" { -#endif -void *tree_sitter_lua_external_scanner_create(void); -void tree_sitter_lua_external_scanner_destroy(void *); -bool tree_sitter_lua_external_scanner_scan(void *, TSLexer *, const bool *); -unsigned tree_sitter_lua_external_scanner_serialize(void *, char *); -void tree_sitter_lua_external_scanner_deserialize(void *, const char *, unsigned); - -#ifdef _WIN32 -#define extern __declspec(dllexport) -#endif - -extern const TSLanguage *tree_sitter_lua(void) { - static const TSLanguage language = { - .version = LANGUAGE_VERSION, - .symbol_count = SYMBOL_COUNT, - .alias_count = ALIAS_COUNT, - .token_count = TOKEN_COUNT, - .external_token_count = EXTERNAL_TOKEN_COUNT, - .state_count = STATE_COUNT, - .large_state_count = LARGE_STATE_COUNT, - .production_id_count = PRODUCTION_ID_COUNT, - .field_count = FIELD_COUNT, - .max_alias_sequence_length = MAX_ALIAS_SEQUENCE_LENGTH, - .parse_table = &ts_parse_table[0][0], - .small_parse_table = ts_small_parse_table, - .small_parse_table_map = ts_small_parse_table_map, - .parse_actions = ts_parse_actions, - .symbol_names = ts_symbol_names, - .field_names = ts_field_names, - .field_map_slices = ts_field_map_slices, - .field_map_entries = ts_field_map_entries, - .symbol_metadata = ts_symbol_metadata, - .public_symbol_map = ts_symbol_map, - .alias_map = ts_non_terminal_alias_map, - .alias_sequences = &ts_alias_sequences[0][0], - .lex_modes = ts_lex_modes, - .lex_fn = ts_lex, - .keyword_lex_fn = ts_lex_keywords, - .keyword_capture_token = sym_identifier, - .external_scanner = { - &ts_external_scanner_states[0][0], - ts_external_scanner_symbol_map, - tree_sitter_lua_external_scanner_create, - tree_sitter_lua_external_scanner_destroy, - tree_sitter_lua_external_scanner_scan, - tree_sitter_lua_external_scanner_serialize, - tree_sitter_lua_external_scanner_deserialize, - }, - }; - return &language; -} -#ifdef __cplusplus -} -#endif diff --git a/tree-sitter-lua/src/scanner.c b/tree-sitter-lua/src/scanner.c deleted file mode 100644 index b9890c4..0000000 --- a/tree-sitter-lua/src/scanner.c +++ /dev/null @@ -1,229 +0,0 @@ -#include -#include -#include - -enum TokenType { - BLOCK_COMMENT_START, - BLOCK_COMMENT_CONTENT, - BLOCK_COMMENT_END, - - STRING_START, - STRING_CONTENT, - STRING_END, -}; - -static inline void consume(TSLexer *lexer) { lexer->advance(lexer, false); } -static inline void skip(TSLexer *lexer) { lexer->advance(lexer, true); } - -static inline bool consume_char(char c, TSLexer *lexer) { - if (lexer->lookahead != c) { - return false; - } - - consume(lexer); - return true; -} - -static inline uint8_t consume_and_count_char(char c, TSLexer *lexer) { - uint8_t count = 0; - while (lexer->lookahead == c) { - ++count; - consume(lexer); - } - return count; -} - -static inline void skip_whitespaces(TSLexer *lexer) { - while (iswspace(lexer->lookahead)) { - skip(lexer); - } -} - -void *tree_sitter_lua_external_scanner_create() { return NULL; } -void tree_sitter_lua_external_scanner_destroy(void *payload) {} - -char ending_char = 0; -uint8_t level_count = 0; - -static inline void reset_state() { - ending_char = 0; - level_count = 0; -} - -unsigned tree_sitter_lua_external_scanner_serialize(void *payload, char *buffer) { - buffer[0] = ending_char; - buffer[1] = level_count; - return 2; -} - -void tree_sitter_lua_external_scanner_deserialize(void *payload, const char *buffer, unsigned length) { - if (length == 0) return; - ending_char = buffer[0]; - if (length == 1) return; - level_count = buffer[1]; -} - -static bool scan_block_start(TSLexer *lexer) { - if (consume_char('[', lexer)) { - uint8_t level = consume_and_count_char('=', lexer); - - if (consume_char('[', lexer)) { - level_count = level; - return true; - } - } - - return false; -} - -static bool scan_block_end(TSLexer *lexer) { - if (consume_char(']', lexer)) { - uint8_t level = consume_and_count_char('=', lexer); - - if (level_count == level && consume_char(']', lexer)) { - return true; - } - } - - return false; -} - -static bool scan_block_content(TSLexer *lexer) { - while (lexer->lookahead != 0) { - if (lexer->lookahead == ']') { - lexer->mark_end(lexer); - - if (scan_block_end(lexer)) { - return true; - } - } else { - consume(lexer); - } - } - - return false; -} - -static bool scan_comment_start(TSLexer *lexer) { - if (consume_char('-', lexer) && consume_char('-', lexer)) { - lexer->mark_end(lexer); - - if (scan_block_start(lexer)) { - lexer->mark_end(lexer); - lexer->result_symbol = BLOCK_COMMENT_START; - return true; - } - } - - return false; -} - -static bool scan_comment_content(TSLexer *lexer) { - if (ending_char == 0) { // block comment - if (scan_block_content(lexer)) { - lexer->result_symbol = BLOCK_COMMENT_CONTENT; - return true; - } - - return false; - } - - while (lexer->lookahead != 0) { - if (lexer->lookahead == ending_char) { - reset_state(); - lexer->result_symbol = BLOCK_COMMENT_CONTENT; - return true; - } - - consume(lexer); - } - - return false; -} - -static bool scan_string_start(TSLexer *lexer) { - if (lexer->lookahead == '"' || lexer->lookahead == '\'') { - ending_char = lexer->lookahead; - consume(lexer); - return true; - } - - if (scan_block_start(lexer)) { - return true; - } - - return false; -} - -static bool scan_string_end(TSLexer *lexer) { - if (ending_char == 0) { // block string - return scan_block_end(lexer); - } - - if (consume_char(ending_char, lexer)) { - return true; - } - - return false; -} - -static bool scan_string_content(TSLexer *lexer) { - if (ending_char == 0) { // block string - return scan_block_content(lexer); - } - - while (lexer->lookahead != '\n' && lexer->lookahead != 0 && lexer->lookahead != ending_char) { - if (consume_char('\\', lexer) && consume_char('z', lexer)) { - while (iswspace(lexer->lookahead)) { - consume(lexer); - } - continue; - }; - - if (lexer->lookahead == 0) { - return true; - } - - consume(lexer); - } - - return true; -} - -bool tree_sitter_lua_external_scanner_scan(void *payload, TSLexer *lexer, const bool *valid_symbols) { - if (valid_symbols[STRING_END] && scan_string_end(lexer)) { - reset_state(); - lexer->result_symbol = STRING_END; - return true; - } - - if (valid_symbols[STRING_CONTENT] && scan_string_content(lexer)) { - lexer->result_symbol = STRING_CONTENT; - return true; - } - - if (valid_symbols[BLOCK_COMMENT_END] && ending_char == 0 && scan_block_end(lexer)) { - reset_state(); - lexer->result_symbol = BLOCK_COMMENT_END; - return true; - } - - if (valid_symbols[BLOCK_COMMENT_CONTENT] && scan_comment_content(lexer)) { - return true; - } - - skip_whitespaces(lexer); - - if (valid_symbols[STRING_START] && scan_string_start(lexer)) { - lexer->result_symbol = STRING_START; - return true; - } - - if (valid_symbols[BLOCK_COMMENT_START]) { - if (scan_comment_start(lexer)) { - return true; - } - } - - return false; -} diff --git a/tree-sitter-lua/src/tree_sitter/parser.h b/tree-sitter-lua/src/tree_sitter/parser.h deleted file mode 100644 index 2b14ac1..0000000 --- a/tree-sitter-lua/src/tree_sitter/parser.h +++ /dev/null @@ -1,224 +0,0 @@ -#ifndef TREE_SITTER_PARSER_H_ -#define TREE_SITTER_PARSER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#define ts_builtin_sym_error ((TSSymbol)-1) -#define ts_builtin_sym_end 0 -#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024 - -typedef uint16_t TSStateId; - -#ifndef TREE_SITTER_API_H_ -typedef uint16_t TSSymbol; -typedef uint16_t TSFieldId; -typedef struct TSLanguage TSLanguage; -#endif - -typedef struct { - TSFieldId field_id; - uint8_t child_index; - bool inherited; -} TSFieldMapEntry; - -typedef struct { - uint16_t index; - uint16_t length; -} TSFieldMapSlice; - -typedef struct { - bool visible; - bool named; - bool supertype; -} TSSymbolMetadata; - -typedef struct TSLexer TSLexer; - -struct TSLexer { - int32_t lookahead; - TSSymbol result_symbol; - void (*advance)(TSLexer *, bool); - void (*mark_end)(TSLexer *); - uint32_t (*get_column)(TSLexer *); - bool (*is_at_included_range_start)(const TSLexer *); - bool (*eof)(const TSLexer *); -}; - -typedef enum { - TSParseActionTypeShift, - TSParseActionTypeReduce, - TSParseActionTypeAccept, - TSParseActionTypeRecover, -} TSParseActionType; - -typedef union { - struct { - uint8_t type; - TSStateId state; - bool extra; - bool repetition; - } shift; - struct { - uint8_t type; - uint8_t child_count; - TSSymbol symbol; - int16_t dynamic_precedence; - uint16_t production_id; - } reduce; - uint8_t type; -} TSParseAction; - -typedef struct { - uint16_t lex_state; - uint16_t external_lex_state; -} TSLexMode; - -typedef union { - TSParseAction action; - struct { - uint8_t count; - bool reusable; - } entry; -} TSParseActionEntry; - -struct TSLanguage { - uint32_t version; - uint32_t symbol_count; - uint32_t alias_count; - uint32_t token_count; - uint32_t external_token_count; - uint32_t state_count; - uint32_t large_state_count; - uint32_t production_id_count; - uint32_t field_count; - uint16_t max_alias_sequence_length; - const uint16_t *parse_table; - const uint16_t *small_parse_table; - const uint32_t *small_parse_table_map; - const TSParseActionEntry *parse_actions; - const char * const *symbol_names; - const char * const *field_names; - const TSFieldMapSlice *field_map_slices; - const TSFieldMapEntry *field_map_entries; - const TSSymbolMetadata *symbol_metadata; - const TSSymbol *public_symbol_map; - const uint16_t *alias_map; - const TSSymbol *alias_sequences; - const TSLexMode *lex_modes; - bool (*lex_fn)(TSLexer *, TSStateId); - bool (*keyword_lex_fn)(TSLexer *, TSStateId); - TSSymbol keyword_capture_token; - struct { - const bool *states; - const TSSymbol *symbol_map; - void *(*create)(void); - void (*destroy)(void *); - bool (*scan)(void *, TSLexer *, const bool *symbol_whitelist); - unsigned (*serialize)(void *, char *); - void (*deserialize)(void *, const char *, unsigned); - } external_scanner; - const TSStateId *primary_state_ids; -}; - -/* - * Lexer Macros - */ - -#define START_LEXER() \ - bool result = false; \ - bool skip = false; \ - bool eof = false; \ - int32_t lookahead; \ - goto start; \ - next_state: \ - lexer->advance(lexer, skip); \ - start: \ - skip = false; \ - lookahead = lexer->lookahead; - -#define ADVANCE(state_value) \ - { \ - state = state_value; \ - goto next_state; \ - } - -#define SKIP(state_value) \ - { \ - skip = true; \ - state = state_value; \ - goto next_state; \ - } - -#define ACCEPT_TOKEN(symbol_value) \ - result = true; \ - lexer->result_symbol = symbol_value; \ - lexer->mark_end(lexer); - -#define END_STATE() return result; - -/* - * Parse Table Macros - */ - -#define SMALL_STATE(id) id - LARGE_STATE_COUNT - -#define STATE(id) id - -#define ACTIONS(id) id - -#define SHIFT(state_value) \ - {{ \ - .shift = { \ - .type = TSParseActionTypeShift, \ - .state = state_value \ - } \ - }} - -#define SHIFT_REPEAT(state_value) \ - {{ \ - .shift = { \ - .type = TSParseActionTypeShift, \ - .state = state_value, \ - .repetition = true \ - } \ - }} - -#define SHIFT_EXTRA() \ - {{ \ - .shift = { \ - .type = TSParseActionTypeShift, \ - .extra = true \ - } \ - }} - -#define REDUCE(symbol_val, child_count_val, ...) \ - {{ \ - .reduce = { \ - .type = TSParseActionTypeReduce, \ - .symbol = symbol_val, \ - .child_count = child_count_val, \ - __VA_ARGS__ \ - }, \ - }} - -#define RECOVER() \ - {{ \ - .type = TSParseActionTypeRecover \ - }} - -#define ACCEPT_INPUT() \ - {{ \ - .type = TSParseActionTypeAccept \ - }} - -#ifdef __cplusplus -} -#endif - -#endif // TREE_SITTER_PARSER_H_ diff --git a/tree-sitter-lua/test/corpus/chunk.txt b/tree-sitter-lua/test/corpus/chunk.txt deleted file mode 100644 index 1a8ed73..0000000 --- a/tree-sitter-lua/test/corpus/chunk.txt +++ /dev/null @@ -1,31 +0,0 @@ -================================================================================ -chunk -================================================================================ - --------------------------------------------------------------------------------- - -(chunk) - -================================================================================ -hash_bang_line -================================================================================ - -#!/usr/bin/env lua - --------------------------------------------------------------------------------- - -(chunk - (hash_bang_line)) - -================================================================================ -return_statement -================================================================================ - -return 42 - --------------------------------------------------------------------------------- - -(chunk - (return_statement - (expression_list - (number)))) diff --git a/tree-sitter-lua/test/corpus/comments.txt b/tree-sitter-lua/test/corpus/comments.txt deleted file mode 100644 index 9b9c17c..0000000 --- a/tree-sitter-lua/test/corpus/comments.txt +++ /dev/null @@ -1,80 +0,0 @@ -================================================================================ -comment -================================================================================ - --- --- single-line comment, below an empty single-line comment - ---[[ -print("block comment") ---]] - ---[[ -print("block comment") -]] - --- [[ -print("not block comment") ---]] - ---[=[[print("level 1 block comment")]]=] - ---[=[ - [print("level 1 block comment")] -]=] - ---[=[ - [print("level 1 block comment") -]=] - ---[=[ - print("level 1 block comment")] -]=] - ---[=[ - [[print("level 1 block comment") -]=] - ---[=[ - print("level 1 block comment")]] -]=] - ---[==[ -print("level 2 block comment") --- ]==] - ---[==[ -print("level 2 block comment") -]==] - --- [==[ -print("not level 2 block comment") ---]==] - --------------------------------------------------------------------------------- - -(chunk - (comment) - (comment) - (comment) - (comment) - (comment) - (function_call - name: (identifier) - arguments: (arguments - (string))) - (comment) - (comment) - (comment) - (comment) - (comment) - (comment) - (comment) - (comment) - (comment) - (comment) - (function_call - name: (identifier) - arguments: (arguments - (string))) - (comment)) diff --git a/tree-sitter-lua/test/corpus/expressions.txt b/tree-sitter-lua/test/corpus/expressions.txt deleted file mode 100644 index 606510b..0000000 --- a/tree-sitter-lua/test/corpus/expressions.txt +++ /dev/null @@ -1,591 +0,0 @@ -================================================================================ -nil -================================================================================ - -exp(nil) - --------------------------------------------------------------------------------- - -(chunk - (function_call - name: (identifier) - arguments: (arguments - (nil)))) - -================================================================================ -false -================================================================================ - -exp(false) - --------------------------------------------------------------------------------- - -(chunk - (function_call - name: (identifier) - arguments: (arguments - (false)))) - -================================================================================ -true -================================================================================ - -exp(true) - --------------------------------------------------------------------------------- - -(chunk - (function_call - name: (identifier) - arguments: (arguments - (true)))) - -================================================================================ -number -================================================================================ - -exp( - 3, - 345, - 0xff, - 0xBEBADA, - 3.0, - 3.1416, - 314.16e-2, - 0.31416E1, - 34e1, - 0x0.1E, - 0xA23p-4, - 0X1.921FB54442D18P+1 -) - --------------------------------------------------------------------------------- - -(chunk - (function_call - name: (identifier) - arguments: (arguments - (number) - (number) - (number) - (number) - (number) - (number) - (number) - (number) - (number) - (number) - (number) - (number)))) - -================================================================================ -string -================================================================================ - -exp( - "string", - 'string', - "a\ - b", - 'a\z', - 'a\z - ', - 'a\z - b', - "'a\z\ - b'", - "c", - 'c', - "0", - [[ string ]], - [[ - string - string - ]], - [=[ - string - string - ]=], - [=[[string]]=], - [=[ - [string] - ]=], - [=[ - [string - ]=], - [=[ - string] - ]=], - [=[ - [[string - ]=], - [=[ - string]] - ]=] -) - - --------------------------------------------------------------------------------- - -(chunk - (function_call - name: (identifier) - arguments: (arguments - (string) - (string) - (string) - (string) - (string) - (string) - (string) - (string) - (string) - (string) - (string) - (string) - (string) - (string) - (string) - (string) - (string) - (string) - (string)))) - -================================================================================ -vararg_expression -================================================================================ - -exp(...) - --------------------------------------------------------------------------------- - -(chunk - (function_call - name: (identifier) - arguments: (arguments - (vararg_expression)))) - -================================================================================ -function_definition -================================================================================ - -f1 = function() end - -f2 = function() return end - -f3 = function(...) - return ... -end - -f4 = function(a1, ...) - print(...) - return a1 -end - --------------------------------------------------------------------------------- - -(chunk - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (function_definition - parameters: (parameters)))) - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (function_definition - parameters: (parameters) - body: (block - (return_statement))))) - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (function_definition - parameters: (parameters - (vararg_expression)) - body: (block - (return_statement - (expression_list - (vararg_expression))))))) - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (function_definition - parameters: (parameters - name: (identifier) - (vararg_expression)) - body: (block - (function_call - name: (identifier) - arguments: (arguments - (vararg_expression))) - (return_statement - (expression_list - (identifier)))))))) - -================================================================================ -variable ::: identifier -================================================================================ - -v1 = n1 - -v2, v3 = n2, n3 - --------------------------------------------------------------------------------- - -(chunk - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (identifier))) - (assignment_statement - (variable_list - name: (identifier) - name: (identifier)) - (expression_list - value: (identifier) - value: (identifier)))) - -================================================================================ -variable ::: bracket_index_expression -================================================================================ - -v1 = tbl[k1] - -v2, v3[v] = tbl[k1]["k2"] - -v4 = tbk[getK1()][getK2()] - --------------------------------------------------------------------------------- - -(chunk - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (bracket_index_expression - table: (identifier) - field: (identifier)))) - (assignment_statement - (variable_list - name: (identifier) - name: (bracket_index_expression - table: (identifier) - field: (identifier))) - (expression_list - value: (bracket_index_expression - table: (bracket_index_expression - table: (identifier) - field: (identifier)) - field: (string)))) - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (bracket_index_expression - table: (bracket_index_expression - table: (identifier) - field: (function_call - name: (identifier) - arguments: (arguments))) - field: (function_call - name: (identifier) - arguments: (arguments)))))) - -================================================================================ -variable ::: dot_index_expression -================================================================================ - -v1 = tbl.k1 - -v2 = tbl.k1.k2 - --------------------------------------------------------------------------------- - -(chunk - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (dot_index_expression - table: (identifier) - field: (identifier)))) - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (dot_index_expression - table: (dot_index_expression - table: (identifier) - field: (identifier)) - field: (identifier))))) - -================================================================================ -function_call ::: bracket_index_expression | dot_index_expression -================================================================================ - -v1 = tbl[k1].k2(a1, "a2", a3()) - -v2 = tbl[k1] { f1 = true } - -v3 = tbl[k1] "a1" - --------------------------------------------------------------------------------- - -(chunk - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (function_call - name: (dot_index_expression - table: (bracket_index_expression - table: (identifier) - field: (identifier)) - field: (identifier)) - arguments: (arguments - (identifier) - (string) - (function_call - name: (identifier) - arguments: (arguments)))))) - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (function_call - name: (bracket_index_expression - table: (identifier) - field: (identifier)) - arguments: (arguments - (table_constructor - (field - name: (identifier) - value: (true))))))) - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (function_call - name: (bracket_index_expression - table: (identifier) - field: (identifier)) - arguments: (arguments - (string)))))) - -================================================================================ -function_call ::: method_index_expression -================================================================================ - -tbl.k1:m1(a1, "a2") - -tbl[k1]:m1 { f1, "f2" } - -tbl:m1 "a1" - --------------------------------------------------------------------------------- - -(chunk - (function_call - name: (method_index_expression - table: (dot_index_expression - table: (identifier) - field: (identifier)) - method: (identifier)) - arguments: (arguments - (identifier) - (string))) - (function_call - name: (method_index_expression - table: (bracket_index_expression - table: (identifier) - field: (identifier)) - method: (identifier)) - arguments: (arguments - (table_constructor - (field - value: (identifier)) - (field - value: (string))))) - (function_call - name: (method_index_expression - table: (identifier) - method: (identifier)) - arguments: (arguments - (string)))) - -================================================================================ -parenthesized_expression -================================================================================ - -v = ( true ) - -v = ( ( false ) ) - --------------------------------------------------------------------------------- - -(chunk - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (parenthesized_expression - (true)))) - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (parenthesized_expression - (parenthesized_expression - (false)))))) - -================================================================================ -table_constructor -================================================================================ - -tbl1 = { - ["k1"] = { - ['k2'] = true, - k3 = false - } -} - -local tbl2 = { - k1 = { - { 'v1', "v2" } - } -} - -local tbl3 = { "v1", k1 = "v2" } - --------------------------------------------------------------------------------- - -(chunk - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (table_constructor - (field - name: (string) - value: (table_constructor - (field - name: (string) - value: (true)) - (field - name: (identifier) - value: (false))))))) - local_declaration: (variable_declaration - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (table_constructor - (field - name: (identifier) - value: (table_constructor - (field - value: (table_constructor - (field - value: (string)) - (field - value: (string)))))))))) - local_declaration: (variable_declaration - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (table_constructor - (field - value: (string)) - (field - name: (identifier) - value: (string))))))) - -================================================================================ -binary_expression -================================================================================ - -a = i + j * 3 - k % 5 - -b = i + j % 3 ^ 2 - -c = i * 2 ^ j - --------------------------------------------------------------------------------- - -(chunk - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (binary_expression - left: (binary_expression - left: (identifier) - right: (binary_expression - left: (identifier) - right: (number))) - right: (binary_expression - left: (identifier) - right: (number))))) - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (binary_expression - left: (identifier) - right: (binary_expression - left: (identifier) - right: (binary_expression - left: (number) - right: (number)))))) - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (binary_expression - left: (identifier) - right: (binary_expression - left: (number) - right: (identifier)))))) - -================================================================================ -unary_expression -================================================================================ - -v1 = #l - -v2 = -n - -v3 = not c1 and r1 or r2 - --------------------------------------------------------------------------------- - -(chunk - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (unary_expression - operand: (identifier)))) - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (unary_expression - operand: (identifier)))) - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (binary_expression - left: (binary_expression - left: (unary_expression - operand: (identifier)) - right: (identifier)) - right: (identifier))))) diff --git a/tree-sitter-lua/test/corpus/statements.txt b/tree-sitter-lua/test/corpus/statements.txt deleted file mode 100644 index 0327788..0000000 --- a/tree-sitter-lua/test/corpus/statements.txt +++ /dev/null @@ -1,459 +0,0 @@ -================================================================================ -empty_statement -================================================================================ - -; -;; - --------------------------------------------------------------------------------- - -(chunk - (empty_statement) - (empty_statement) - (empty_statement)) - -================================================================================ -assignment_statement -================================================================================ - -i = 1 -j, tbl[k()] = 2, i + 1 -x, y = y, x - --------------------------------------------------------------------------------- - -(chunk - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (number))) - (assignment_statement - (variable_list - name: (identifier) - name: (bracket_index_expression - table: (identifier) - field: (function_call - name: (identifier) - arguments: (arguments)))) - (expression_list - value: (number) - value: (binary_expression - left: (identifier) - right: (number)))) - (assignment_statement - (variable_list - name: (identifier) - name: (identifier)) - (expression_list - value: (identifier) - value: (identifier)))) - -================================================================================ -function_call -================================================================================ - -f1() - -tbl.f2() - -tbl["f2"]() - -tbl.k1:f3() - -f4(a1)("a2") { a3 = "a3" } - --------------------------------------------------------------------------------- - -(chunk - (function_call - name: (identifier) - arguments: (arguments)) - (function_call - name: (dot_index_expression - table: (identifier) - field: (identifier)) - arguments: (arguments)) - (function_call - name: (bracket_index_expression - table: (identifier) - field: (string)) - arguments: (arguments)) - (function_call - name: (method_index_expression - table: (dot_index_expression - table: (identifier) - field: (identifier)) - method: (identifier)) - arguments: (arguments)) - (function_call - name: (function_call - name: (function_call - name: (identifier) - arguments: (arguments - (identifier))) - arguments: (arguments - (string))) - arguments: (arguments - (table_constructor - (field - name: (identifier) - value: (string)))))) - -================================================================================ -label_statement -================================================================================ - -:: label_name :: - --------------------------------------------------------------------------------- - -(chunk - (label_statement - (identifier))) - -================================================================================ -break_statement -================================================================================ - -for k, v in pairs(kv) do - if not v then - break - end -end - --------------------------------------------------------------------------------- - -(chunk - (for_statement - clause: (for_generic_clause - (variable_list - name: (identifier) - name: (identifier)) - (expression_list - (function_call - name: (identifier) - arguments: (arguments - (identifier))))) - body: (block - (if_statement - condition: (unary_expression - operand: (identifier)) - consequence: (block - (break_statement)))))) - -================================================================================ -goto_statement -================================================================================ - -goto label_name - --------------------------------------------------------------------------------- - -(chunk - (goto_statement - (identifier))) - -================================================================================ -do_statement -================================================================================ - -do - f1() - return f2() -end - -do end - --------------------------------------------------------------------------------- - -(chunk - (do_statement - body: (block - (function_call - name: (identifier) - arguments: (arguments)) - (return_statement - (expression_list - (function_call - name: (identifier) - arguments: (arguments)))))) - (do_statement)) - -================================================================================ -while_statement -================================================================================ - -while i < 9 do - i = i + 1 -end - -while false do end - --------------------------------------------------------------------------------- - -(chunk - (while_statement - condition: (binary_expression - left: (identifier) - right: (number)) - body: (block - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (binary_expression - left: (identifier) - right: (number)))))) - (while_statement - condition: (false))) - -================================================================================ -repeat_statement -================================================================================ - -repeat - f1() - i = i - 1 -until i == 0 - -repeat until false - --------------------------------------------------------------------------------- - -(chunk - (repeat_statement - body: (block - (function_call - name: (identifier) - arguments: (arguments)) - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (binary_expression - left: (identifier) - right: (number))))) - condition: (binary_expression - left: (identifier) - right: (number))) - (repeat_statement - condition: (false))) - -================================================================================ -if_statement -================================================================================ - -if num % 2 == 0 then - print("even") -elseif num % 2 ~= 0 then - print("odd") -else - error("!") -end - -if c1 then end - -if c1 then else end - -if c1 then elseif c2 then else end - --------------------------------------------------------------------------------- - -(chunk - (if_statement - condition: (binary_expression - left: (binary_expression - left: (identifier) - right: (number)) - right: (number)) - consequence: (block - (function_call - name: (identifier) - arguments: (arguments - (string)))) - alternative: (elseif_statement - condition: (binary_expression - left: (binary_expression - left: (identifier) - right: (number)) - right: (number)) - consequence: (block - (function_call - name: (identifier) - arguments: (arguments - (string))))) - alternative: (else_statement - body: (block - (function_call - name: (identifier) - arguments: (arguments - (string)))))) - (if_statement - condition: (identifier)) - (if_statement - condition: (identifier) - alternative: (else_statement)) - (if_statement - condition: (identifier) - alternative: (elseif_statement - condition: (identifier)) - alternative: (else_statement))) - -================================================================================ -for_statement ::: for_generic_clause -================================================================================ - -for k, v in pairs(kv) do - print(k, v) -end - -for i in ipairs(iv) do end - --------------------------------------------------------------------------------- - -(chunk - (for_statement - clause: (for_generic_clause - (variable_list - name: (identifier) - name: (identifier)) - (expression_list - (function_call - name: (identifier) - arguments: (arguments - (identifier))))) - body: (block - (function_call - name: (identifier) - arguments: (arguments - (identifier) - (identifier))))) - (for_statement - clause: (for_generic_clause - (variable_list - name: (identifier)) - (expression_list - (function_call - name: (identifier) - arguments: (arguments - (identifier))))))) - -================================================================================ -for_statement ::: for_numeric_clause -================================================================================ - -for n = 1, 10 do - print(n) -end - -for n = 1, 10, 2 do end - --------------------------------------------------------------------------------- - -(chunk - (for_statement - clause: (for_numeric_clause - name: (identifier) - start: (number) - end: (number)) - body: (block - (function_call - name: (identifier) - arguments: (arguments - (identifier))))) - (for_statement - clause: (for_numeric_clause - name: (identifier) - start: (number) - end: (number) - step: (number)))) - -================================================================================ -function_declaration -================================================================================ - -function tbl.f1() end - -function tbl:f2() end - -function tbl.k1:f3() end - -function f4() - print('f4') -end - -local function f5() end - --------------------------------------------------------------------------------- - -(chunk - (function_declaration - name: (dot_index_expression - table: (identifier) - field: (identifier)) - parameters: (parameters)) - (function_declaration - name: (method_index_expression - table: (identifier) - method: (identifier)) - parameters: (parameters)) - (function_declaration - name: (method_index_expression - table: (dot_index_expression - table: (identifier) - field: (identifier)) - method: (identifier)) - parameters: (parameters)) - (function_declaration - name: (identifier) - parameters: (parameters) - body: (block - (function_call - name: (identifier) - arguments: (arguments - (string))))) - local_declaration: (function_declaration - name: (identifier) - parameters: (parameters))) - -================================================================================ -variable_declaration -================================================================================ - -local v1 = 1 -local v2, v3 = 2, 3 - -local v4, v4 = f1(), tbl:f2() - --------------------------------------------------------------------------------- - -(chunk - local_declaration: (variable_declaration - (assignment_statement - (variable_list - name: (identifier)) - (expression_list - value: (number)))) - local_declaration: (variable_declaration - (assignment_statement - (variable_list - name: (identifier) - name: (identifier)) - (expression_list - value: (number) - value: (number)))) - local_declaration: (variable_declaration - (assignment_statement - (variable_list - name: (identifier) - name: (identifier)) - (expression_list - value: (function_call - name: (identifier) - arguments: (arguments)) - value: (function_call - name: (method_index_expression - table: (identifier) - method: (identifier)) - arguments: (arguments)))))) From 724bc1cdf3dd36498fcdb703966dbcffa30faa42 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Sun, 7 Aug 2022 14:28:16 +0700 Subject: [PATCH 1224/1541] Follow lazy_load guidelines --- lua/core/lazy_load.lua | 14 ++++++++++++++ lua/plugins/init.lua | 14 +------------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 07a33d7..acb17f5 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -45,6 +45,20 @@ M.on_file_open = function(plugin_name) } end +M.packer_cmds = { + "PackerSnapshot", + "PackerSnapshotRollback", + "PackerSnapshotDelete", + "PackerInstall", + "PackerUpdate", + "PackerSync", + "PackerClean", + "PackerCompile", + "PackerStatus", + "PackerProfile", + "PackerLoad", +} + M.treesitter_cmds = { "TSInstall", "TSBufEnable", diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 80b6093..fb56d3d 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -4,19 +4,7 @@ local plugins = { ["nvim-lua/plenary.nvim"] = { module = "plenary" }, ["wbthomason/packer.nvim"] = { - cmd = { - "PackerSnapshot", - "PackerSnapshotRollback", - "PackerSnapshotDelete", - "PackerInstall", - "PackerUpdate", - "PackerSync", - "PackerClean", - "PackerCompile", - "PackerStatus", - "PackerProfile", - "PackerLoad", - }, + cmd = require("core.lazy_load").packer_cmds, config = function() require "plugins" end, From 8cb28557a9a848d394f87ee6fe94c8de5802ebc1 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Sun, 7 Aug 2022 14:30:12 +0700 Subject: [PATCH 1225/1541] chore: formatting --- lua/plugins/init.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index fb56d3d..0934509 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -213,9 +213,7 @@ local plugins = { }, -- Speed up deffered plugins - ["lewis6991/impatient.nvim"] = { - module = "impatient", - }, + ["lewis6991/impatient.nvim"] = { module = "impatient" }, } require("core.packer").run(plugins) From 04eb37c0f175df86d553770a5e32db125f6e9f74 Mon Sep 17 00:00:00 2001 From: 01GUY <87767572+nulloneguy@users.noreply.github.com> Date: Mon, 8 Aug 2022 13:48:49 +0700 Subject: [PATCH 1226/1541] 'blankline' fix filetype_exclude mason with a capital letter it doesn't work --- lua/plugins/configs/others.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index a8d4283..544f2f0 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -49,7 +49,7 @@ M.blankline = function() "lspinfo", "TelescopePrompt", "TelescopeResults", - "Mason", + "mason", "", }, buftype_exclude = { "terminal" }, From 65cb9ba5fc64d9dd9c9fc838530de08e9cb3f565 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 8 Aug 2022 13:58:49 +0530 Subject: [PATCH 1227/1541] fix typo in lsp_references mapping | #1445 --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 9d94c06..1f31136 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -188,7 +188,7 @@ M.lspconfig = { ["gr"] = { function() - vim.lsp.buf.references {} + vim.lsp.buf.references() end, " lsp references", }, From 01b17d2ad6d47008b27f38bff7fa490f56fae03f Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 9 Aug 2022 06:49:38 +0530 Subject: [PATCH 1228/1541] remove icons from mapping descriptions they look good on whichkey but its too much work to find icons for each mapping description and not all nerdfont icons align the same, some need extra spaces etc so i removed them --- lua/core/mappings.lua | 140 ++++++++++++++++++++++-------------------- 1 file changed, 74 insertions(+), 66 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 1f31136..fb706ab 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -9,43 +9,43 @@ local M = {} M.general = { i = { -- go to beginning and end - [""] = { "^i", "論 beginning of line" }, - [""] = { "", "壟 end of line" }, + [""] = { "^i", "beginning of line" }, + [""] = { "", "end of line" }, -- navigate within insert mode - [""] = { "", " move left" }, - [""] = { "", " move right" }, - [""] = { "", " move down" }, - [""] = { "", " move up" }, + [""] = { "", "move left" }, + [""] = { "", "move right" }, + [""] = { "", "move down" }, + [""] = { "", "move up" }, }, n = { - [""] = { " noh ", " no highlight" }, + [""] = { " noh ", "no highlight" }, -- switch between windows - [""] = { "h", " window left" }, - [""] = { "l", " window right" }, - [""] = { "j", " window down" }, - [""] = { "k", " window up" }, + [""] = { "h", "window left" }, + [""] = { "l", "window right" }, + [""] = { "j", "window down" }, + [""] = { "k", "window up" }, -- save - [""] = { " w ", "﬚ save file" }, + [""] = { " w ", "save file" }, -- Copy all - [""] = { " %y+ ", " copy whole file" }, + [""] = { " %y+ ", "copy whole file" }, -- line numbers - ["n"] = { " set nu! ", " toggle line number" }, - ["rn"] = { " set rnu! ", " toggle relative number" }, + ["n"] = { " set nu! ", "toggle line number" }, + ["rn"] = { " set rnu! ", "toggle relative number" }, -- update nvchad - ["uu"] = { " :NvChadUpdate ", " update nvchad" }, + ["uu"] = { " :NvChadUpdate ", "update nvchad" }, ["tt"] = { function() require("base46").toggle_theme() end, - " toggle theme", + "toggle theme", }, -- Allow moving the cursor through wrapped lines with j, k, and @@ -58,18 +58,18 @@ M.general = { [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, -- new buffer - [""] = { " enew ", "烙 new buffer" }, + [""] = { " enew ", "new buffer" }, -- close buffer + hide terminal buffer ["x"] = { function() require("core.utils").close_buffer() end, - " close buffer", + "close buffer", }, }, - t = { [""] = { termcodes "", " escape terminal mode" } }, + t = { [""] = { termcodes "", "escape terminal mode" } }, v = { ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, @@ -84,49 +84,52 @@ M.general = { M.tabufline = { plugin = true, + n = { -- cycle through buffers [""] = { function() require("core.utils").tabuflineNext() end, - " goto next buffer", + "goto next buffer", }, [""] = { function() require("core.utils").tabuflinePrev() end, - " goto prev buffer", + "goto prev buffer", }, -- pick buffers via numbers - [""] = { " TbufPick ", " Pick buffer" }, + [""] = { " TbufPick ", "Pick buffer" }, }, } M.comment = { plugin = true, + -- toggle comment in both modes n = { ["/"] = { function() require("Comment.api").toggle_current_linewise() end, - "蘒 toggle comment", + "toggle comment", }, }, v = { ["/"] = { "lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())", - "蘒 toggle comment", + "toggle comment", }, }, } M.lspconfig = { plugin = true, + -- See ` :help vim.lsp.*` for documentation on any of the below functions n = { @@ -134,181 +137,184 @@ M.lspconfig = { function() vim.lsp.buf.declaration() end, - " lsp declaration", + "lsp declaration", }, ["gd"] = { function() vim.lsp.buf.definition() end, - " lsp definition", + "lsp definition", }, ["K"] = { function() vim.lsp.buf.hover() end, - " lsp hover", + "lsp hover", }, ["gi"] = { function() vim.lsp.buf.implementation() end, - " lsp implementation", + "lsp implementation", }, ["ls"] = { function() vim.lsp.buf.signature_help() end, - " lsp signature_help", + "lsp signature_help", }, ["D"] = { function() vim.lsp.buf.type_definition() end, - " lsp definition type", + "lsp definition type", }, ["ra"] = { function() require("nvchad_ui.renamer").open() end, - " lsp rename", + "lsp rename", }, ["ca"] = { function() vim.lsp.buf.code_action() end, - " lsp code_action", + "lsp code_action", }, ["gr"] = { function() vim.lsp.buf.references() end, - " lsp references", + "lsp references", }, ["f"] = { function() vim.diagnostic.open_float() end, - " floating diagnostic", + "floating diagnostic", }, ["[d"] = { function() vim.diagnostic.goto_prev() end, - " goto prev", + "goto prev", }, ["d]"] = { function() vim.diagnostic.goto_next() end, - " goto_next", + "goto_next", }, ["q"] = { function() vim.diagnostic.setloclist() end, - " diagnostic setloclist", + "diagnostic setloclist", }, ["fm"] = { function() vim.lsp.buf.formatting {} end, - " lsp formatting", + "lsp formatting", }, ["wa"] = { function() vim.lsp.buf.add_workspace_folder() end, - " add workspace folder", + "add workspace folder", }, ["wr"] = { function() vim.lsp.buf.remove_workspace_folder() end, - " remove workspace folder", + "remove workspace folder", }, ["wl"] = { function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, - " list workspace folders", + "list workspace folders", }, }, } M.nvimtree = { plugin = true, + n = { -- toggle - [""] = { " NvimTreeToggle ", " toggle nvimtree" }, + [""] = { " NvimTreeToggle ", "toggle nvimtree" }, -- focus - ["e"] = { " NvimTreeFocus ", " focus nvimtree" }, + ["e"] = { " NvimTreeFocus ", "focus nvimtree" }, }, } M.telescope = { plugin = true, + n = { -- find - ["ff"] = { " Telescope find_files ", " find files" }, - ["fa"] = { " Telescope find_files follow=true no_ignore=true hidden=true ", " find all" }, - ["fw"] = { " Telescope live_grep ", " live grep" }, - ["fb"] = { " Telescope buffers ", " find buffers" }, - ["fh"] = { " Telescope help_tags ", " help page" }, - ["fo"] = { " Telescope oldfiles ", " find oldfiles" }, - ["tk"] = { " Telescope keymaps ", " show keys" }, + ["ff"] = { " Telescope find_files ", "find files" }, + ["fa"] = { " Telescope find_files follow=true no_ignore=true hidden=true ", "find all" }, + ["fw"] = { " Telescope live_grep ", "live grep" }, + ["fb"] = { " Telescope buffers ", "find buffers" }, + ["fh"] = { " Telescope help_tags ", "help page" }, + ["fo"] = { " Telescope oldfiles ", "find oldfiles" }, + ["tk"] = { " Telescope keymaps ", "show keys" }, -- git - ["cm"] = { " Telescope git_commits ", " git commits" }, - ["gt"] = { " Telescope git_status ", " git status" }, + ["cm"] = { " Telescope git_commits ", "git commits" }, + ["gt"] = { " Telescope git_status ", "git status" }, -- pick a hidden term - ["pt"] = { " Telescope terms ", " pick hidden term" }, + ["pt"] = { " Telescope terms ", "pick hidden term" }, -- theme switcher - ["th"] = { " Telescope themes ", " nvchad themes" }, + ["th"] = { " Telescope themes ", "nvchad themes" }, }, } M.nvterm = { plugin = true, + t = { -- toggle in terminal mode [""] = { function() require("nvterm.terminal").toggle "float" end, - " toggle floating term", + "toggle floating term", }, [""] = { function() require("nvterm.terminal").toggle "horizontal" end, - " toggle horizontal term", + "toggle horizontal term", }, [""] = { function() require("nvterm.terminal").toggle "vertical" end, - " toggle vertical term", + "toggle vertical term", }, }, @@ -318,21 +324,21 @@ M.nvterm = { function() require("nvterm.terminal").toggle "float" end, - " toggle floating term", + "toggle floating term", }, [""] = { function() require("nvterm.terminal").toggle "horizontal" end, - " toggle horizontal term", + "toggle horizontal term", }, [""] = { function() require("nvterm.terminal").toggle "vertical" end, - " toggle vertical term", + "toggle vertical term", }, -- new @@ -341,39 +347,41 @@ M.nvterm = { function() require("nvterm.terminal").new "horizontal" end, - " new horizontal term", + "new horizontal term", }, ["v"] = { function() require("nvterm.terminal").new "vertical" end, - " new vertical term", + "new vertical term", }, }, } M.whichkey = { plugin = true, + n = { ["wK"] = { function() vim.cmd "WhichKey" end, - " which-key all keymaps", + "which-key all keymaps", }, ["wk"] = { function() local input = vim.fn.input "WhichKey: " vim.cmd("WhichKey " .. input) end, - " which-key query lookup", + "which-key query lookup", }, }, } M.blankline = { plugin = true, + n = { ["bc"] = { function() @@ -388,7 +396,7 @@ M.blankline = { end end, - " Jump to current_context", + "Jump to current_context", }, }, } From a20fc560f3d70902f4ad068478b346d16514fa65 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 11 Aug 2022 15:40:26 +0530 Subject: [PATCH 1229/1541] utils: Improve mapping function | Properly lazy load whichkey just add desc with normal vim.keymap.set function whichkey will automatically use the descriptions --- lua/core/utils.lua | 135 +++++++++++++------------------ lua/plugins/configs/whichkey.lua | 10 --- lua/plugins/init.lua | 1 + 3 files changed, 57 insertions(+), 89 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index bb986ab..2426692 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -15,32 +15,15 @@ M.close_buffer = function(bufnr) end end --- store mapping section names which have plugin key = true -local lazyload_mappings_list = {} - -local add_mappingSection_toList = function() - local default_mappings = require("core.default_config").mappings - - -- store mapping section name into a table - for section_name, section_mappings in pairs(default_mappings) do - if section_mappings.plugin then - lazyload_mappings_list[section_name] = true - section_mappings.plugin = nil - end - end -end - M.load_config = function() local config = require "core.default_config" local chadrc_exists, chadrc = pcall(require, "custom.chadrc") - add_mappingSection_toList() - if chadrc_exists then -- merge user config if it exists and is a table; otherwise display an error if type(chadrc) == "table" then - M.remove_default_keys(chadrc.mappings or {}) - config = merge_tb("force", config, chadrc) + config.mappings = M.remove_disabled_keys(chadrc.mappings, config.mappings) + config = merge_tb("force", config, chadrc) or {} else error "chadrc must return a table!" end @@ -50,77 +33,71 @@ M.load_config = function() return config end -M.remove_default_keys = function(user_mappings) - local user_keys = {} - local user_sections = vim.tbl_keys(user_mappings) - - -- push user_map keys in user_keys table - for _, section in ipairs(user_sections) do - user_keys = vim.tbl_deep_extend("force", user_keys, user_mappings[section]) +M.remove_disabled_keys = function(chadrc_mappings, default_mappings) + if not chadrc_mappings then + return default_mappings end - local function disable_key(mode, keybind, mode_mapping) - if user_keys[mode] and user_keys[mode][keybind] then - mode_mapping[keybind] = nil - end - end - - local default_mappings = require("core.default_config").mappings - - -- remove user_maps from default mapping table - for _, section_mappings in pairs(default_mappings) do - for mode, mode_mapping in pairs(section_mappings) do - for keybind, _ in pairs(mode_mapping) do - disable_key(mode, keybind, mode_mapping) + -- store keys in a array with true value to compare + local keys_to_disable = {} + for _, mappings in pairs(chadrc_mappings) do + for mode, section_keys in pairs(mappings) do + if not keys_to_disable[mode] then + keys_to_disable[mode] = {} + end + for k, _ in pairs(section_keys) do + keys_to_disable[mode][k] = true end end end -end -M.load_mappings = function(mappings, mapping_opt) - -- set mapping function with/without whichkey - local set_maps - local whichkey_exists, wk = pcall(require, "which-key") - - if whichkey_exists then - set_maps = function(keybind, mapping_info, opts) - wk.register({ [keybind] = mapping_info }, opts) - end - else - set_maps = function(keybind, mapping_info, opts) - local mode = opts.mode - opts.mode = nil - vim.keymap.set(mode, keybind, mapping_info[1], opts) - end - end - - local mappings_tb = M.load_config().mappings - mappings = vim.deepcopy(type(mappings) == "string" and { mappings_tb[mappings] } or mappings_tb) - - local function set_mappings() - for name, section in pairs(mappings) do - -- skip mapping section with plugin=true - if not lazyload_mappings_list[name] then - for mode, mode_values in pairs(section) do - for keybind, mapping_info in pairs(mode_values) do - -- merge default + user opts - local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) - local opts = merge_tb("force", default_opts, mapping_info.opts or {}) - - if mapping_info.opts then - mapping_info.opts = nil - end - - set_maps(keybind, mapping_info, opts) - end + -- make a copy as we need to modify default_mappings + for section_name, section_mappings in pairs(default_mappings) do + for mode, mode_mappings in pairs(section_mappings) do + mode_mappings = (type(mode_mappings) == "table" and mode_mappings) or {} + for k, _ in pairs(mode_mappings) do + -- if key if found then remove from default_mappings + if keys_to_disable[mode] and keys_to_disable[mode][k] then + default_mappings[section_name][mode][k] = nil end end end end - vim.defer_fn(function() - set_mappings() - end, 0) + return default_mappings +end + +M.load_mappings = function(section, mapping_opt) + local function set_section_map(section_values) + if section_values.plugin then + return + end + section_values.plugin = nil + + for mode, mode_values in pairs(section_values) do + local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) + for keybind, mapping_info in pairs(mode_values) do + -- merge default + user opts + local opts = merge_tb("force", default_opts, mapping_info.opts or {}) + + mapping_info.opts, opts.mode = nil, nil + opts.desc = mapping_info[2] + + vim.keymap.set(mode, keybind, mapping_info[1], opts) + end + end + end + + local mappings = require("core.utils").load_config().mappings + + if type(section) == "string" then + mappings[section]["plugin"] = nil + mappings = { mappings[section] } + end + + for _, sect in pairs(mappings) do + set_section_map(sect) + end end -- remove plugins defined in chadrc diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index 7bc8ef4..89e7c3e 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -38,14 +38,4 @@ local options = { options = require("core.utils").load_override(options, "folke/which-key.nvim") -local utils = require "core.utils" - -local mappings = utils.load_config().mappings -local mapping_groups = { groups = vim.deepcopy(mappings.groups) } - -mappings.disabled = nil -mappings.groups = nil - -utils.load_mappings(mapping_groups) - wk.setup(options) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 0934509..b7dd336 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -204,6 +204,7 @@ local plugins = { ["folke/which-key.nvim"] = { disable = true, module = "which-key", + keys = "", config = function() require "plugins.configs.whichkey" end, From 78ddf8d624a59e34054369bbbfc08456dfe0bac7 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 12 Aug 2022 11:49:12 +0530 Subject: [PATCH 1230/1541] Just load impatient from init if will be called multiple times if present in lazy_load.lua which is totallly unnecessary why even from there ? Yes, this does not affect the --startuptime --- init.lua | 4 ++++ lua/core/lazy_load.lua | 1 - lua/plugins/init.lua | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index b80c53d..1c19c3f 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,7 @@ +vim.defer_fn(function() + pcall(require, "impatient") +end, 0) + require "core" require "core.options" diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index acb17f5..1ddd62f 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -10,7 +10,6 @@ M.lazy_load = function(tb) callback = function() if tb.condition() then vim.api.nvim_del_augroup_by_name(tb.augroup_name) - pcall(require, "impatient") -- dont defer for treesitter as it will show slow highlighting -- This deferring only happens only when we do "nvim filename" diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index b7dd336..823654d 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -214,7 +214,7 @@ local plugins = { }, -- Speed up deffered plugins - ["lewis6991/impatient.nvim"] = { module = "impatient" }, + ["lewis6991/impatient.nvim"] = {}, } require("core.packer").run(plugins) From f2c3ed0e7d502b8ebc9a905d8b32ab94f7041bfb Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 12 Aug 2022 17:57:32 +0530 Subject: [PATCH 1231/1541] utils: mappings: Allow plugin=true in user mappings so that they can be lazy loaded if required https://github.com/NvChad/NvChad/issues/1467 --- lua/core/utils.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 2426692..ed533f6 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -45,6 +45,7 @@ M.remove_disabled_keys = function(chadrc_mappings, default_mappings) if not keys_to_disable[mode] then keys_to_disable[mode] = {} end + section_keys = (type(section_keys) == "table" and section_keys) or {} for k, _ in pairs(section_keys) do keys_to_disable[mode][k] = true end From 5f23aaf1ca32c41b2bdbca33540e713ff185d5c0 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 13 Aug 2022 05:52:33 +0530 Subject: [PATCH 1232/1541] update comment.nvim mappings ( fix its breaking change ) https://github.com/numToStr/Comment.nvim/commit/cd1c38163dd9a11247bcb333d72a36bae76c45f9 --- lua/core/mappings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index fb706ab..8ab1757 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -113,7 +113,7 @@ M.comment = { n = { ["/"] = { function() - require("Comment.api").toggle_current_linewise() + require("Comment.api").toggle.linewise.current() end, "toggle comment", }, @@ -121,7 +121,7 @@ M.comment = { v = { ["/"] = { - "lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())", + "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", "toggle comment", }, }, From 0184035c155ad5e5c75d2dfb8ba30aea5034f25b Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 12 Aug 2022 22:27:03 +0530 Subject: [PATCH 1233/1541] treesitter: Do no set normal syntax highlight here normal syntax isn't dependent on treesitter, so will be set when loading the theme --- lua/plugins/configs/treesitter.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index 73476f0..e23501a 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -4,7 +4,6 @@ if not present then return end -require("base46").load_highlight "syntax" require("base46").load_highlight "treesitter" local options = { From ac0faa4f8bda7157e31774e5a310ebea8730fe50 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 13 Aug 2022 15:26:29 +0530 Subject: [PATCH 1234/1541] core: options: Remove redundant code that is shada default behaviour, why it is there ? --- lua/core/options.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index 60b91db..30ec75e 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -101,9 +101,3 @@ local default_providers = { for _, provider in ipairs(default_providers) do vim.g["loaded_" .. provider .. "_provider"] = 0 end - --- set shada path -vim.schedule(function() - vim.opt.shadafile = vim.fn.stdpath(g.vim_version > 7 and "state" or "data") .. "/shada/main.shada" - vim.cmd [[ silent! rsh ]] -end) From be6d1f995f9680588a5452f1e92e1f8d52503c2d Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 15 Aug 2022 19:23:55 +0530 Subject: [PATCH 1235/1541] fix mapleader not mapped properly to general mappings this happens cuz all mappings are set just after calling core.options and custom module is called at the end of the init.lua #1475 --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 1c19c3f..0e2e5fa 100644 --- a/init.lua +++ b/init.lua @@ -5,8 +5,6 @@ end, 0) require "core" require "core.options" -require("core.utils").load_mappings() - -- setup packer + plugins local fn = vim.fn local install_path = fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim" @@ -23,3 +21,5 @@ if fn.empty(fn.glob(install_path)) > 0 then end pcall(require, "custom") + +require("core.utils").load_mappings() From 8e8d18ed8db0d353bbccfae53dabf104ea39e56f Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Mon, 15 Aug 2022 19:26:25 +0900 Subject: [PATCH 1236/1541] fix: not detecting subdir in git repo --- lua/core/lazy_load.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 1ddd62f..a12ad11 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -79,11 +79,11 @@ M.mason_cmds = { M.gitsigns = function() autocmd({ "BufRead" }, { callback = function() - if vim.fn.isdirectory ".git" ~= 0 then - vim.schedule(function() - require("packer").loader "gitsigns.nvim" - end) - end + vim.fn.system([[git rev-parse 2>/dev/null]]) + if vim.v.shell_error == 0 then + vim.schedule(function() + require("packer").loader "gitsigns.nvim" + end) end, }) end From 14ef6759bebe469b63e05d797da44b3d02f6ac60 Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Mon, 15 Aug 2022 19:33:44 +0900 Subject: [PATCH 1237/1541] Format with stylua --- lua/core/lazy_load.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index a12ad11..5cde671 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -79,11 +79,12 @@ M.mason_cmds = { M.gitsigns = function() autocmd({ "BufRead" }, { callback = function() - vim.fn.system([[git rev-parse 2>/dev/null]]) - if vim.v.shell_error == 0 then - vim.schedule(function() - require("packer").loader "gitsigns.nvim" - end) + vim.fn.system [[git rev-parse 2>/dev/null]] + if vim.v.shell_error == 0 then + vim.schedule(function() + require("packer").loader "gitsigns.nvim" + end) + end end, }) end From e0d3950f5066c3ea316bb3ad0674554437a25f20 Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Mon, 15 Aug 2022 19:41:39 +0900 Subject: [PATCH 1238/1541] fix not using current file's path --- lua/core/lazy_load.lua | 124 ++++++++++++++++++++--------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 5cde671..7f7a6b6 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -5,27 +5,27 @@ local autocmd = vim.api.nvim_create_autocmd -- This must be used for plugins that need to be loaded just after a file -- ex : treesitter, lspconfig etc M.lazy_load = function(tb) - autocmd(tb.events, { - group = vim.api.nvim_create_augroup(tb.augroup_name, {}), - callback = function() - if tb.condition() then - vim.api.nvim_del_augroup_by_name(tb.augroup_name) + autocmd(tb.events, { + group = vim.api.nvim_create_augroup(tb.augroup_name, {}), + callback = function() + if tb.condition() then + vim.api.nvim_del_augroup_by_name(tb.augroup_name) - -- dont defer for treesitter as it will show slow highlighting - -- This deferring only happens only when we do "nvim filename" - if tb.plugin ~= "nvim-treesitter" then - vim.defer_fn(function() - require("packer").loader(tb.plugin) - if tb.plugin == "nvim-lspconfig" then - vim.cmd "silent! do FileType" - end - end, 0) - else - require("packer").loader(tb.plugin) - end - end - end, - }) + -- dont defer for treesitter as it will show slow highlighting + -- This deferring only happens only when we do "nvim filename" + if tb.plugin ~= "nvim-treesitter" then + vim.defer_fn(function() + require("packer").loader(tb.plugin) + if tb.plugin == "nvim-lspconfig" then + vim.cmd("silent! do FileType") + end + end, 0) + else + require("packer").loader(tb.plugin) + end + end + end, + }) end -- load certain plugins only when there's a file opened in the buffer @@ -33,60 +33,60 @@ end -- This gives an instant preview of nvim with the file opened M.on_file_open = function(plugin_name) - M.lazy_load { - events = { "BufRead", "BufWinEnter", "BufNewFile" }, - augroup_name = "BeLazyOnFileOpen" .. plugin_name, - plugin = plugin_name, - condition = function() - local file = vim.fn.expand "%" - return file ~= "NvimTree_1" and file ~= "[packer]" and file ~= "" - end, - } + M.lazy_load({ + events = { "BufRead", "BufWinEnter", "BufNewFile" }, + augroup_name = "BeLazyOnFileOpen" .. plugin_name, + plugin = plugin_name, + condition = function() + local file = vim.fn.expand("%") + return file ~= "NvimTree_1" and file ~= "[packer]" and file ~= "" + end, + }) end M.packer_cmds = { - "PackerSnapshot", - "PackerSnapshotRollback", - "PackerSnapshotDelete", - "PackerInstall", - "PackerUpdate", - "PackerSync", - "PackerClean", - "PackerCompile", - "PackerStatus", - "PackerProfile", - "PackerLoad", + "PackerSnapshot", + "PackerSnapshotRollback", + "PackerSnapshotDelete", + "PackerInstall", + "PackerUpdate", + "PackerSync", + "PackerClean", + "PackerCompile", + "PackerStatus", + "PackerProfile", + "PackerLoad", } M.treesitter_cmds = { - "TSInstall", - "TSBufEnable", - "TSBufDisable", - "TSEnable", - "TSDisable", - "TSModuleInfo", + "TSInstall", + "TSBufEnable", + "TSBufDisable", + "TSEnable", + "TSDisable", + "TSModuleInfo", } M.mason_cmds = { - "Mason", - "MasonInstall", - "MasonInstallAll", - "MasonUninstall", - "MasonUninstallAll", - "MasonLog", + "Mason", + "MasonInstall", + "MasonInstallAll", + "MasonUninstall", + "MasonUninstallAll", + "MasonLog", } M.gitsigns = function() - autocmd({ "BufRead" }, { - callback = function() - vim.fn.system [[git rev-parse 2>/dev/null]] - if vim.v.shell_error == 0 then - vim.schedule(function() - require("packer").loader "gitsigns.nvim" - end) - end - end, - }) + autocmd({ "BufRead" }, { + callback = function() + vim.fn.system("git rev-parse 2>/dev/null " .. vim.fn.expand("%:p:h")) + if vim.v.shell_error == 0 then + vim.schedule(function() + require("packer").loader("gitsigns.nvim") + end) + end + end, + }) end return M From 66e2904b68de748b603681ac948a7944a59e45a9 Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Mon, 15 Aug 2022 19:42:27 +0900 Subject: [PATCH 1239/1541] format with stylua --- lua/core/lazy_load.lua | 124 ++++++++++++++++++++--------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 7f7a6b6..aae71da 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -5,27 +5,27 @@ local autocmd = vim.api.nvim_create_autocmd -- This must be used for plugins that need to be loaded just after a file -- ex : treesitter, lspconfig etc M.lazy_load = function(tb) - autocmd(tb.events, { - group = vim.api.nvim_create_augroup(tb.augroup_name, {}), - callback = function() - if tb.condition() then - vim.api.nvim_del_augroup_by_name(tb.augroup_name) + autocmd(tb.events, { + group = vim.api.nvim_create_augroup(tb.augroup_name, {}), + callback = function() + if tb.condition() then + vim.api.nvim_del_augroup_by_name(tb.augroup_name) - -- dont defer for treesitter as it will show slow highlighting - -- This deferring only happens only when we do "nvim filename" - if tb.plugin ~= "nvim-treesitter" then - vim.defer_fn(function() - require("packer").loader(tb.plugin) - if tb.plugin == "nvim-lspconfig" then - vim.cmd("silent! do FileType") - end - end, 0) - else - require("packer").loader(tb.plugin) - end - end - end, - }) + -- dont defer for treesitter as it will show slow highlighting + -- This deferring only happens only when we do "nvim filename" + if tb.plugin ~= "nvim-treesitter" then + vim.defer_fn(function() + require("packer").loader(tb.plugin) + if tb.plugin == "nvim-lspconfig" then + vim.cmd "silent! do FileType" + end + end, 0) + else + require("packer").loader(tb.plugin) + end + end + end, + }) end -- load certain plugins only when there's a file opened in the buffer @@ -33,60 +33,60 @@ end -- This gives an instant preview of nvim with the file opened M.on_file_open = function(plugin_name) - M.lazy_load({ - events = { "BufRead", "BufWinEnter", "BufNewFile" }, - augroup_name = "BeLazyOnFileOpen" .. plugin_name, - plugin = plugin_name, - condition = function() - local file = vim.fn.expand("%") - return file ~= "NvimTree_1" and file ~= "[packer]" and file ~= "" - end, - }) + M.lazy_load { + events = { "BufRead", "BufWinEnter", "BufNewFile" }, + augroup_name = "BeLazyOnFileOpen" .. plugin_name, + plugin = plugin_name, + condition = function() + local file = vim.fn.expand "%" + return file ~= "NvimTree_1" and file ~= "[packer]" and file ~= "" + end, + } end M.packer_cmds = { - "PackerSnapshot", - "PackerSnapshotRollback", - "PackerSnapshotDelete", - "PackerInstall", - "PackerUpdate", - "PackerSync", - "PackerClean", - "PackerCompile", - "PackerStatus", - "PackerProfile", - "PackerLoad", + "PackerSnapshot", + "PackerSnapshotRollback", + "PackerSnapshotDelete", + "PackerInstall", + "PackerUpdate", + "PackerSync", + "PackerClean", + "PackerCompile", + "PackerStatus", + "PackerProfile", + "PackerLoad", } M.treesitter_cmds = { - "TSInstall", - "TSBufEnable", - "TSBufDisable", - "TSEnable", - "TSDisable", - "TSModuleInfo", + "TSInstall", + "TSBufEnable", + "TSBufDisable", + "TSEnable", + "TSDisable", + "TSModuleInfo", } M.mason_cmds = { - "Mason", - "MasonInstall", - "MasonInstallAll", - "MasonUninstall", - "MasonUninstallAll", - "MasonLog", + "Mason", + "MasonInstall", + "MasonInstallAll", + "MasonUninstall", + "MasonUninstallAll", + "MasonLog", } M.gitsigns = function() - autocmd({ "BufRead" }, { - callback = function() - vim.fn.system("git rev-parse 2>/dev/null " .. vim.fn.expand("%:p:h")) - if vim.v.shell_error == 0 then - vim.schedule(function() - require("packer").loader("gitsigns.nvim") - end) - end - end, - }) + autocmd({ "BufRead" }, { + callback = function() + vim.fn.system("git rev-parse 2>/dev/null " .. vim.fn.expand "%:p:h") + if vim.v.shell_error == 0 then + vim.schedule(function() + require("packer").loader "gitsigns.nvim" + end) + end + end, + }) end return M From d9cd55fc0f3f740806538d81bd89cb55bf5f3d2d Mon Sep 17 00:00:00 2001 From: doubleChu <57394064+doubleChu@users.noreply.github.com> Date: Mon, 15 Aug 2022 22:52:52 +0800 Subject: [PATCH 1240/1541] make paddings in the layout can be overrided users can adjust the padding between the top and the header, or the header and buttons. --- lua/plugins/configs/alpha.lua | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lua/plugins/configs/alpha.lua b/lua/plugins/configs/alpha.lua index 1572aa9..e2caab6 100644 --- a/lua/plugins/configs/alpha.lua +++ b/lua/plugins/configs/alpha.lua @@ -34,6 +34,11 @@ local function button(sc, txt, keybind) } end +-- dynamic header padding +local fn = vim.fn +local marginTopPercent = 0.3 +local headerPadding = fn.max { 2, fn.floor(fn.winheight(0) * marginTopPercent) } + local options = { header = { @@ -71,20 +76,18 @@ local options = { spacing = 1, }, }, + + headerPaddingTop = { type = "padding", val = headerPadding }, + headerPaddingBottom = { type = "padding", val = 2 }, } options = require("core.utils").load_override(options, "goolord/alpha-nvim") --- dynamic header padding -local fn = vim.fn -local marginTopPercent = 0.3 -local headerPadding = fn.max { 2, fn.floor(fn.winheight(0) * marginTopPercent) } - alpha.setup { layout = { - { type = "padding", val = headerPadding }, + options.headerPaddingTop, options.header, - { type = "padding", val = 2 }, + options.headerPaddingBottom, options.buttons, }, opts = {}, From ce86597c3d0666a54696221ec0ff55ea3ec9b402 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Wed, 17 Aug 2022 21:13:12 +0530 Subject: [PATCH 1241/1541] utils: bufilter: Check for nil it will be empty if tabufline is disabled --- lua/core/utils.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index ed533f6..243664c 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -175,7 +175,11 @@ M.packer_sync = function(...) end M.bufilter = function() - local bufs = vim.t.bufs + local bufs = vim.t.bufs or nil + + if not bufs then + return {} + end for i = #bufs, 1, -1 do if not vim.api.nvim_buf_is_valid(bufs[i]) then From 5e81ae8379c415ac7c8d4ca8856ac33056ee7585 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Wed, 17 Aug 2022 21:15:23 +0530 Subject: [PATCH 1242/1541] utils: close_buffer: Ask for confirmation when using on modified files neovim handles this internally so why not use it --- lua/core/utils.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 243664c..7d4fd2c 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -6,12 +6,10 @@ local merge_tb = vim.tbl_deep_extend M.close_buffer = function(bufnr) if vim.bo.buftype == "terminal" then vim.cmd(vim.bo.buflisted and "set nobl | enew" or "hide") - elseif vim.bo.modified then - print "save the file bruh" else bufnr = bufnr or api.nvim_get_current_buf() require("core.utils").tabuflinePrev() - vim.cmd("bd" .. bufnr) + vim.cmd("silent! confirm bd" .. bufnr) end end From 130442712bcf0d97c3e7635c582b5d397dabfd7c Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 18 Aug 2022 00:31:31 +0530 Subject: [PATCH 1243/1541] Fix some lsp warnings --- lua/core/utils.lua | 2 +- lua/plugins/configs/alpha.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 7d4fd2c..930f816 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -132,7 +132,7 @@ end M.load_override = function(default_table, plugin_name) local user_table = M.load_config().plugins.override[plugin_name] or {} user_table = type(user_table) == "table" and user_table or user_table() - return merge_tb("force", default_table, user_table) + return merge_tb("force", default_table, user_table) or {} end M.packer_sync = function(...) diff --git a/lua/plugins/configs/alpha.lua b/lua/plugins/configs/alpha.lua index e2caab6..6ddb0c2 100644 --- a/lua/plugins/configs/alpha.lua +++ b/lua/plugins/configs/alpha.lua @@ -27,7 +27,7 @@ local function button(sc, txt, keybind) type = "button", val = txt, on_press = function() - local key = vim.api.nvim_replace_termcodes(sc_, true, false, true) + local key = vim.api.nvim_replace_termcodes(sc_, true, false, true) or "" vim.api.nvim_feedkeys(key, "normal", false) end, opts = opts, From a67e19a439b1f8b214d2a471cbe8b0f98cb62ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Elet?= Date: Fri, 19 Aug 2022 18:23:25 +0200 Subject: [PATCH 1244/1541] feat(init): resize panes when vim window is resized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Elet --- lua/core/init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/core/init.lua b/lua/core/init.lua index 0e30564..3179a63 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -85,3 +85,9 @@ autocmd("BufDelete", { end end, }) + +-- Auto resize panes +autocmd("VimResized", { + pattern = "*", + command = "tabdo wincmd =", +}) From 089cbe43f13157c4ab8dc1dbd0927a92468f6d1d Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 20 Aug 2022 19:05:30 +0530 Subject: [PATCH 1245/1541] update mason filetype https://github.com/williamboman/mason.nvim/pull/317 --- lua/plugins/configs/mason.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua index 5546340..b330bda 100644 --- a/lua/plugins/configs/mason.lua +++ b/lua/plugins/configs/mason.lua @@ -6,7 +6,7 @@ end vim.api.nvim_create_augroup("_mason", { clear = true }) vim.api.nvim_create_autocmd("Filetype", { - pattern = "mason.nvim", + pattern = "mason", callback = function() require("base46").load_highlight "mason" end, From 4a5a927de8587c9c42e7a2dcac837956c411eaac Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Sat, 20 Aug 2022 22:30:01 +0900 Subject: [PATCH 1246/1541] fix: Windows User cannot load gitsigns --- lua/core/lazy_load.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index aae71da..5872cb6 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -79,7 +79,7 @@ M.mason_cmds = { M.gitsigns = function() autocmd({ "BufRead" }, { callback = function() - vim.fn.system("git rev-parse 2>/dev/null " .. vim.fn.expand "%:p:h") + vim.fn.system("git rev-parse " .. vim.fn.expand "%:p:h") if vim.v.shell_error == 0 then vim.schedule(function() require("packer").loader "gitsigns.nvim" From a6f2f0e0b92de561053681747c2d537cda1adf42 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 23 Aug 2022 18:54:04 +0530 Subject: [PATCH 1247/1541] Breaking Change: Avoid mapping default keybind related to #1504 #1386, leader + b is the new key for opening new buffers now --- lua/core/lazy_load.lua | 2 +- lua/core/mappings.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 5872cb6..60cc298 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -79,7 +79,7 @@ M.mason_cmds = { M.gitsigns = function() autocmd({ "BufRead" }, { callback = function() - vim.fn.system("git rev-parse " .. vim.fn.expand "%:p:h") + vim.fn.system("git rev-parse" .. vim.fn.expand "%:p:h") if vim.v.shell_error == 0 then vim.schedule(function() require("packer").loader "gitsigns.nvim" diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 8ab1757..f5e7b60 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -58,7 +58,7 @@ M.general = { [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, -- new buffer - [""] = { " enew ", "new buffer" }, + ["b"] = { " enew ", "new buffer" }, -- close buffer + hide terminal buffer ["x"] = { @@ -383,7 +383,7 @@ M.blankline = { plugin = true, n = { - ["bc"] = { + ["cc"] = { function() local ok, start = require("indent_blankline.utils").get_current_context( vim.g.indent_blankline_context_patterns, From 0f5a96028e7e1a9db534d30e91758c0dd6582298 Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Wed, 24 Aug 2022 09:24:58 +0900 Subject: [PATCH 1248/1541] fix: gitsigns not loading --- lua/core/lazy_load.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 60cc298..48a8182 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -79,7 +79,7 @@ M.mason_cmds = { M.gitsigns = function() autocmd({ "BufRead" }, { callback = function() - vim.fn.system("git rev-parse" .. vim.fn.expand "%:p:h") + vim.fn.system("git rev-parse" .. " " .. vim.fn.expand "%:p:h") if vim.v.shell_error == 0 then vim.schedule(function() require("packer").loader "gitsigns.nvim" From 4ac1ece32691c79258324a24c8cd16595699a48a Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 24 Aug 2022 08:17:40 +0530 Subject: [PATCH 1249/1541] Update lazy_load.lua --- lua/core/lazy_load.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 48a8182..5872cb6 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -79,7 +79,7 @@ M.mason_cmds = { M.gitsigns = function() autocmd({ "BufRead" }, { callback = function() - vim.fn.system("git rev-parse" .. " " .. vim.fn.expand "%:p:h") + vim.fn.system("git rev-parse " .. vim.fn.expand "%:p:h") if vim.v.shell_error == 0 then vim.schedule(function() require("packer").loader "gitsigns.nvim" From 90212894210a134ba44473ace92cd4ed80e1e286 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 21 Aug 2022 14:02:56 +0530 Subject: [PATCH 1250/1541] core: autocmd: Remove 'tabdo wincmd =' on VimResized this should not be in main config, not every one wants their splits to be of equal size on resize, sometimes i want the split to of smaller size whether the screen is resized or not this should be in used custom dir --- lua/core/init.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 3179a63..0e30564 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -85,9 +85,3 @@ autocmd("BufDelete", { end end, }) - --- Auto resize panes -autocmd("VimResized", { - pattern = "*", - command = "tabdo wincmd =", -}) From fe9a7b16519b7873b8c7c917c34801d77ec3770c Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 21 Aug 2022 15:06:09 +0530 Subject: [PATCH 1251/1541] core|options: Add formatoptions in options | Remove unnecessary autocmd --- lua/core/init.lua | 6 ------ lua/core/options.lua | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 0e30564..95dfd5f 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -42,12 +42,6 @@ autocmd("BufUnload", { end, }) --- Don't auto commenting new lines -autocmd("BufEnter", { - pattern = "*", - command = "set fo-=c fo-=r fo-=o", -}) - -- store listed buffers in tab local var vim.t.bufs = vim.api.nvim_list_bufs() diff --git a/lua/core/options.lua b/lua/core/options.lua index 30ec75e..ee86d75 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -55,6 +55,9 @@ opt.updatetime = 250 -- when cursor reaches end/beginning of line opt.whichwrap:append "<>[]hl" +-- auto-wrap comments, don't auto insert comment on o/O and enter +opt.formatoptions:remove "cro" + g.mapleader = " " -- disable some builtin vim plugins From a23d955656dc4073c255bbcd7d9f47edbdee49ba Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 21 Aug 2022 17:26:34 +0530 Subject: [PATCH 1252/1541] plugins: alpha: Move alpha related cmd to alpha config this special handling of statusline should only be done if alpha plugin is used --- lua/core/init.lua | 15 --------------- lua/plugins/configs/alpha.lua | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 95dfd5f..f2ab2be 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -27,21 +27,6 @@ autocmd("VimEnter", { end, }) --- Disable statusline in dashboard -autocmd("FileType", { - pattern = "alpha", - callback = function() - vim.opt.laststatus = 0 - end, -}) - -autocmd("BufUnload", { - buffer = 0, - callback = function() - vim.opt.laststatus = 3 - end, -}) - -- store listed buffers in tab local var vim.t.bufs = vim.api.nvim_list_bufs() diff --git a/lua/plugins/configs/alpha.lua b/lua/plugins/configs/alpha.lua index 6ddb0c2..b91c233 100644 --- a/lua/plugins/configs/alpha.lua +++ b/lua/plugins/configs/alpha.lua @@ -92,3 +92,19 @@ alpha.setup { }, opts = {}, } + +-- Disable statusline in dashboard +vim.api.nvim_create_autocmd("FileType", { + pattern = "alpha", + callback = function() + -- store current statusline value and use that + local old_laststatus = vim.opt.laststatus + vim.api.nvim_create_autocmd("BufUnload", { + buffer = 0, + callback = function() + vim.opt.laststatus = old_laststatus + end, + }) + vim.opt.laststatus = 0 + end, +}) From 2b41bcd3dfd654d265bb7ea1d24866582d6147fd Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 21 Aug 2022 17:39:37 +0530 Subject: [PATCH 1253/1541] core: Move relavent tabufline code to NvChad/ui repo --- lua/core/init.lua | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index f2ab2be..e96ca1a 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -10,7 +10,6 @@ vim.cmd "silent! command! NvChadSnapshotCheckout lua require('nvchad').snap_chec -- autocmds local autocmd = vim.api.nvim_create_autocmd -local api = vim.api -- dont list quickfix buffers autocmd("FileType", { @@ -26,41 +25,3 @@ autocmd("VimEnter", { vim.cmd "command! -nargs=* -complete=customlist,v:lua.require'packer'.plugin_complete PackerSync lua require('plugins') require('core.utils').packer_sync()" end, }) - --- store listed buffers in tab local var -vim.t.bufs = vim.api.nvim_list_bufs() - --- autocmds for tabufline -> store bufnrs on bufadd, bufenter events --- thx to https://github.com/ii14 & stores buffer per tab -> table -autocmd({ "BufAdd", "BufEnter" }, { - callback = function(args) - if vim.t.bufs == nil then - vim.t.bufs = { args.buf } - else - local bufs = vim.t.bufs - - -- check for duplicates - if not vim.tbl_contains(bufs, args.buf) and (args.event == "BufAdd" or vim.bo[args.buf].buflisted) then - table.insert(bufs, args.buf) - vim.t.bufs = bufs - end - end - end, -}) - -autocmd("BufDelete", { - callback = function(args) - for _, tab in ipairs(api.nvim_list_tabpages()) do - local bufs = vim.t[tab].bufs - if bufs then - for i, bufnr in ipairs(bufs) do - if bufnr == args.buf then - table.remove(bufs, i) - vim.t[tab].bufs = bufs - break - end - end - end - end - end, -}) From 696559863ba8368e3aee953ee7de3561934d4abe Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 25 Aug 2022 18:01:45 +0530 Subject: [PATCH 1254/1541] keep ftplugin folder git-ignored | #1510 --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index db7df8e..de45666 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ plugin custom spell +ftplugin From bf827e0ebd3ef3c75fd0385fe6d176d5f5fdc4c3 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 28 Aug 2022 09:14:09 +0530 Subject: [PATCH 1255/1541] fix #1516 #1517 an autocmd can be used for formatoptions and avoid using bw, read the convo at https://github.com/NvChad/NvChad/commit/39c42ca2bfb2ce7e2858de959f3b0f19681eea8d#r82388570 --- lua/core/options.lua | 3 --- lua/core/utils.lua | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index ee86d75..30ec75e 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -55,9 +55,6 @@ opt.updatetime = 250 -- when cursor reaches end/beginning of line opt.whichwrap:append "<>[]hl" --- auto-wrap comments, don't auto insert comment on o/O and enter -opt.formatoptions:remove "cro" - g.mapleader = " " -- disable some builtin vim plugins diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 930f816..b89b9d7 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -9,7 +9,7 @@ M.close_buffer = function(bufnr) else bufnr = bufnr or api.nvim_get_current_buf() require("core.utils").tabuflinePrev() - vim.cmd("silent! confirm bd" .. bufnr) + vim.cmd("confirm bd" .. bufnr) end end From 7fe754342aa65fd46d0473b97c0de693762f1743 Mon Sep 17 00:00:00 2001 From: nt Date: Mon, 29 Aug 2022 16:25:59 +0300 Subject: [PATCH 1256/1541] Remove unnecessary comment --- lua/core/options.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index 30ec75e..c2a8832 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -19,7 +19,7 @@ opt.showmode = false opt.title = true opt.clipboard = "unnamedplus" -opt.cul = true -- cursor line +opt.cursorline = true -- Indenting opt.expandtab = true From b34328fb41be11f0ea56a1751e84020ef99ee608 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 3 Sep 2022 19:38:35 +0530 Subject: [PATCH 1257/1541] plugins: Colorizer: Changes for new config style --- lua/plugins/configs/others.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 544f2f0..9d0fef3 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -88,9 +88,9 @@ M.colorizer = function() } options = load_override(options, "NvChad/nvim-colorizer.lua") - colorizer.setup(options["filetypes"], options["user_default_options"]) - - vim.cmd "ColorizerAttachToBuffer" + colorizer.setup(options) + -- execute colorizer as soon as possible + return vim.tbl_isempty(options.filetypes or {}) or vim.cmd [[do FileType]] end M.comment = function() From d617bb5a752b51ed9b32677db8802cbdbe57436a Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Thu, 8 Sep 2022 19:45:35 +0900 Subject: [PATCH 1258/1541] fix pasting in select mode --- lua/core/mappings.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index f5e7b60..084bac8 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -76,6 +76,9 @@ M.general = { ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, + }, + + x = { -- Don't copy the replaced text after pasting in visual mode -- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste ["p"] = { 'p:let @+=@0:let @"=@0', opts = { silent = true } }, From 5db641289d9594b7b278f5bd4b169031ad4d73d8 Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Thu, 8 Sep 2022 19:55:15 +0900 Subject: [PATCH 1259/1541] change jk mapping for visual mode only --- lua/core/mappings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 084bac8..0abf7fd 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -72,13 +72,13 @@ M.general = { t = { [""] = { termcodes "", "escape terminal mode" } }, v = { - ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, - ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, }, x = { + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, + ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, -- Don't copy the replaced text after pasting in visual mode -- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste ["p"] = { 'p:let @+=@0:let @"=@0', opts = { silent = true } }, From f0c93c847284984680b370fca872012c9e9b0492 Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Thu, 8 Sep 2022 20:49:47 +0900 Subject: [PATCH 1260/1541] remove gitsigns autocmd on gitsigns load --- lua/core/lazy_load.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index 5872cb6..ae7480f 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -78,9 +78,11 @@ M.mason_cmds = { M.gitsigns = function() autocmd({ "BufRead" }, { + group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }), callback = function() vim.fn.system("git rev-parse " .. vim.fn.expand "%:p:h") if vim.v.shell_error == 0 then + vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad" vim.schedule(function() require("packer").loader "gitsigns.nvim" end) From d61946d3bfa304e8924120888611d64ee9f98f51 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 2 Sep 2022 11:05:50 +0530 Subject: [PATCH 1261/1541] Simplify plugin management even more (#1518) --- lua/core/default_config.lua | 6 +--- lua/core/packer.lua | 42 ----------------------- lua/core/utils.lua | 41 ++++++++++------------- lua/plugins/configs/others.lua | 26 ++++++++++----- lua/plugins/init.lua | 61 +++++++++++++++++++--------------- 5 files changed, 70 insertions(+), 106 deletions(-) delete mode 100644 lua/core/packer.lua diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 17444b0..1c7152b 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -19,11 +19,7 @@ M.ui = { transparency = false, } -M.plugins = { - override = {}, - remove = {}, - user = {}, -} +M.plugins = {} -- check core.mappings for table structure M.mappings = require "core.mappings" diff --git a/lua/core/packer.lua b/lua/core/packer.lua deleted file mode 100644 index 33bfa38..0000000 --- a/lua/core/packer.lua +++ /dev/null @@ -1,42 +0,0 @@ -local M = {} - -M.options = { - auto_clean = true, - compile_on_sync = true, - git = { clone_timeout = 6000 }, - display = { - working_sym = "ﲊ", - error_sym = "✗ ", - done_sym = " ", - removed_sym = " ", - moved_sym = "", - open_fn = function() - return require("packer.util").float { border = "single" } - end, - }, -} - --- merge overrides if there are any -M.options = require("core.utils").load_override(M.options, "wbthomason/packer.nvim") - -M.run = function(plugins) - local present, packer = pcall(require, "packer") - - if not present then - return - end - - -- Override with chadrc values - plugins = require("core.utils").remove_default_plugins(plugins) - plugins = require("core.utils").merge_plugins(plugins) - - packer.init(M.options) - - packer.startup(function(use) - for _, v in pairs(plugins) do - use(v) - end - end) -end - -return M diff --git a/lua/core/utils.lua b/lua/core/utils.lua index b89b9d7..d95cb92 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -99,40 +99,33 @@ M.load_mappings = function(section, mapping_opt) end end --- remove plugins defined in chadrc -M.remove_default_plugins = function(plugins) - local removals = M.load_config().plugins.remove or {} - - if not vim.tbl_isempty(removals) then - for _, plugin in pairs(removals) do - plugins[plugin] = nil - end - end - - return plugins -end - -- merge default/user plugin tables M.merge_plugins = function(default_plugins) - local user_plugins = M.load_config().plugins.user - - -- merge default + user plugin table - default_plugins = merge_tb("force", default_plugins, user_plugins) + default_plugins = merge_tb("force", default_plugins, M.load_config().plugins) local final_table = {} - for key, _ in pairs(default_plugins) do - default_plugins[key][1] = key - final_table[#final_table + 1] = default_plugins[key] + for key, val in pairs(default_plugins) do + if val then + default_plugins[key][1] = key + final_table[#final_table + 1] = default_plugins[key] + end end return final_table end -M.load_override = function(default_table, plugin_name) - local user_table = M.load_config().plugins.override[plugin_name] or {} - user_table = type(user_table) == "table" and user_table or user_table() - return merge_tb("force", default_table, user_table) or {} +-- override plugin options table with custom ones +M.load_override = function(options_table, name) + local user_plugins = M.load_config().plugins + local plugin_options = {} + + if user_plugins[name] then + plugin_options = user_plugins[name].override_options or {} + plugin_options = type(plugin_options) == "table" and plugin_options or plugin_options() + end + + return merge_tb("force", options_table, plugin_options) end M.packer_sync = function(...) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 9d0fef3..e0870d2 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -2,14 +2,6 @@ local M = {} local load_override = require("core.utils").load_override -M.nvchad_ui = function() - local present, nvchad_ui = pcall(require, "nvchad_ui") - - if present then - nvchad_ui.setup() - end -end - M.autopairs = function() local present1, autopairs = pcall(require, "nvim-autopairs") local present2, cmp = pcall(require, "cmp") @@ -170,4 +162,22 @@ M.devicons = function() end end +M.packer_init = function() + return { + auto_clean = true, + compile_on_sync = true, + git = { clone_timeout = 6000 }, + display = { + working_sym = "ﲊ", + error_sym = "✗ ", + done_sym = " ", + removed_sym = " ", + moved_sym = "", + open_fn = function() + return require("packer.util").float { border = "single" } + end, + }, + } +end + return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 823654d..9a4eeda 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,14 +1,16 @@ -vim.cmd "packadd packer.nvim" - local plugins = { ["nvim-lua/plenary.nvim"] = { module = "plenary" }, + + ["lewis6991/impatient.nvim"] = {}, + ["wbthomason/packer.nvim"] = { cmd = require("core.lazy_load").packer_cmds, config = function() require "plugins" end, }, + ["NvChad/extensions"] = { module = { "telescope", "nvchad" } }, ["NvChad/base46"] = { @@ -24,7 +26,11 @@ local plugins = { ["NvChad/ui"] = { after = "base46", config = function() - require("plugins.configs.others").nvchad_ui() + local present, nvchad_ui = pcall(require, "nvchad_ui") + + if present then + nvchad_ui.setup() + end end, }, @@ -91,7 +97,6 @@ local plugins = { }, -- lsp stuff - ["williamboman/mason.nvim"] = { cmd = require("core.lazy_load").mason_cmds, config = function() @@ -131,25 +136,11 @@ local plugins = { end, }, - ["saadparwaiz1/cmp_luasnip"] = { - after = "LuaSnip", - }, - - ["hrsh7th/cmp-nvim-lua"] = { - after = "cmp_luasnip", - }, - - ["hrsh7th/cmp-nvim-lsp"] = { - after = "cmp-nvim-lua", - }, - - ["hrsh7th/cmp-buffer"] = { - after = "cmp-nvim-lsp", - }, - - ["hrsh7th/cmp-path"] = { - after = "cmp-buffer", - }, + ["saadparwaiz1/cmp_luasnip"] = { after = "LuaSnip" }, + ["hrsh7th/cmp-nvim-lua"] = { after = "cmp_luasnip" }, + ["hrsh7th/cmp-nvim-lsp"] = { after = "cmp-nvim-lua" }, + ["hrsh7th/cmp-buffer"] = { after = "cmp-nvim-lsp" }, + ["hrsh7th/cmp-path"] = { after = "cmp-buffer" }, -- misc plugins ["windwp/nvim-autopairs"] = { @@ -212,9 +203,25 @@ local plugins = { require("core.utils").load_mappings "whichkey" end, }, - - -- Speed up deffered plugins - ["lewis6991/impatient.nvim"] = {}, } -require("core.packer").run(plugins) +-- Load all plugins +local present, packer = pcall(require, "packer") + +if present then + vim.cmd "packadd packer.nvim" + + -- Override with default plugins with user ones + plugins = require("core.utils").merge_plugins(plugins) + + -- load packer init options + local init_options = require("plugins.configs.others").packer_init() + init_options = require("core.utils").load_override(init_options, "wbthomason/packer.nvim") + packer.init(init_options) + + packer.startup(function(use) + for _, v in pairs(plugins) do + use(v) + end + end) +end From e8a415892496ca5a611c16a5ed5f31ac848030ac Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 8 Sep 2022 14:45:23 +0530 Subject: [PATCH 1262/1541] Support old plugin syntax too | Cleanup | Misc use vim.notify to give deprecation warning use packer.use directly rather than wrapping around packer.startup Do some explicit type checking Co-authored-by: Akianonymus --- lua/core/utils.lua | 49 +++++++++++++++++++++++++++++++++++++------- lua/plugins/init.lua | 8 +++----- 2 files changed, 45 insertions(+), 12 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index d95cb92..56e64a4 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -101,12 +101,28 @@ end -- merge default/user plugin tables M.merge_plugins = function(default_plugins) - default_plugins = merge_tb("force", default_plugins, M.load_config().plugins) + local plugin_configs = M.load_config().plugins + local user_plugins = plugin_configs + + -- old plugin syntax for adding plugins + if plugin_configs.user and type(plugin_configs.user) == "table" then + user_plugins = plugin_configs.user + end + + -- support old plugin removal syntax + local remove_plugins = plugin_configs.remove + if type(remove_plugins) == "table" then + for _, v in ipairs(remove_plugins) do + default_plugins[v] = nil + end + end + + default_plugins = merge_tb("force", default_plugins, user_plugins) local final_table = {} for key, val in pairs(default_plugins) do - if val then + if val and type(val) == "table" then default_plugins[key][1] = key final_table[#final_table + 1] = default_plugins[key] end @@ -117,14 +133,27 @@ end -- override plugin options table with custom ones M.load_override = function(options_table, name) - local user_plugins = M.load_config().plugins - local plugin_options = {} + local plugin_configs, plugin_options = M.load_config().plugins, nil - if user_plugins[name] then - plugin_options = user_plugins[name].override_options or {} - plugin_options = type(plugin_options) == "table" and plugin_options or plugin_options() + -- support old plugin syntax for override + local user_override = plugin_configs.user and plugin_configs.user.override and plugin_configs.user.override[name] + if user_override and type(user_override) == "table" then + plugin_options = user_override end + -- if no old style plugin override is found, then use the new syntax + if not plugin_options and plugin_configs[name] then + local override_options = plugin_configs[name].override_options or {} + if type(override_options) == "table" then + plugin_options = override_options + elseif type(override_options) == "function" then + plugin_options = override_options() + end + end + + -- make sure the plugin options are a table + plugin_options = type(plugin_options) == "table" and plugin_options or {} + return merge_tb("force", options_table, plugin_options) end @@ -160,6 +189,12 @@ M.packer_sync = function(...) if packer_exists then packer.sync(...) + + local plugins = M.load_config().plugins + local old_style_options = plugins.user or plugins.override or plugins.remove + if old_style_options then + vim.notify_once({ "NvChad: This plugin syntax is deprecated, use new style config." }, "Error") + end else error "Packer could not be loaded!" end diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 9a4eeda..7a9bfcb 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -219,9 +219,7 @@ if present then init_options = require("core.utils").load_override(init_options, "wbthomason/packer.nvim") packer.init(init_options) - packer.startup(function(use) - for _, v in pairs(plugins) do - use(v) - end - end) + for _, v in pairs(plugins) do + packer.use(v) + end end From 0e6ab04ed754551317c21086be9641a3fb045f58 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 9 Sep 2022 09:49:31 +0530 Subject: [PATCH 1263/1541] keep treesitter indenting enabled by default --- lua/plugins/configs/treesitter.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index e23501a..bb1b163 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -10,10 +10,15 @@ local options = { ensure_installed = { "lua", }, + highlight = { enable = true, use_languagetree = true, }, + + indent = { + enable = true, + }, } -- check for any override From 871064a5da26317d832f5f64b6dc7b5e87376e37 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 9 Sep 2022 12:36:12 +0530 Subject: [PATCH 1264/1541] remove examples dir https://github.com/NvChad/example_config --- examples/chadrc.lua | 12 ------------ examples/init.lua | 3 --- 2 files changed, 15 deletions(-) delete mode 100644 examples/chadrc.lua delete mode 100644 examples/init.lua diff --git a/examples/chadrc.lua b/examples/chadrc.lua deleted file mode 100644 index 62bfd71..0000000 --- a/examples/chadrc.lua +++ /dev/null @@ -1,12 +0,0 @@ --- Just an example, supposed to be placed in /lua/custom/ - -local M = {} - --- make sure you maintain the structure of `core/default_config.lua` here, --- example of changing theme: - -M.ui = { - theme = "gruvchad", -} - -return M diff --git a/examples/init.lua b/examples/init.lua deleted file mode 100644 index 3dccbd2..0000000 --- a/examples/init.lua +++ /dev/null @@ -1,3 +0,0 @@ --- example file i.e lua/custom/init.lua --- load your options globals, autocmds here or anything .__. --- you can even override default options here (core/options.lua) From 3df9c03eb5b7dc5711225772e9274847d2e444f3 Mon Sep 17 00:00:00 2001 From: Rik034 Date: Fri, 9 Sep 2022 11:07:48 +0200 Subject: [PATCH 1265/1541] Fixed notify_once() call --- lua/core/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 56e64a4..425fd74 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -193,7 +193,7 @@ M.packer_sync = function(...) local plugins = M.load_config().plugins local old_style_options = plugins.user or plugins.override or plugins.remove if old_style_options then - vim.notify_once({ "NvChad: This plugin syntax is deprecated, use new style config." }, "Error") + vim.notify_once("NvChad: This plugin syntax is deprecated, use new style config.", "Error") end else error "Packer could not be loaded!" From 8a18f89b03b0aaf013c8832024687f6e981e7576 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 11 Sep 2022 01:07:44 +0530 Subject: [PATCH 1266/1541] install binaries from mason.nvm & tsparsers automatically after nvchad install --- init.lua | 9 +++++++++ lua/core/utils.lua | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 0e2e5fa..7324b73 100644 --- a/init.lua +++ b/init.lua @@ -18,6 +18,15 @@ if fn.empty(fn.glob(install_path)) > 0 then vim.cmd "packadd packer.nvim" require "plugins" vim.cmd "PackerSync" + + -- install binaries from mason.nvim & tsparsers + vim.api.nvim_create_autocmd("User", { + pattern = "PackerComplete", + callback = function() + vim.cmd "bw | silent! MasonInstallAll" -- close packer window + require("packer").loader "nvim-treesitter" + end, + }) end pcall(require, "custom") diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 425fd74..08f9c36 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -136,7 +136,7 @@ M.load_override = function(options_table, name) local plugin_configs, plugin_options = M.load_config().plugins, nil -- support old plugin syntax for override - local user_override = plugin_configs.user and plugin_configs.user.override and plugin_configs.user.override[name] + local user_override = plugin_configs.override and plugin_configs.override[name] if user_override and type(user_override) == "table" then plugin_options = user_override end From 2e5aa786ef542990f2b0808bc7c3cfdfd9218f0b Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 12 Sep 2022 07:53:07 +0530 Subject: [PATCH 1267/1541] add an option to avoid using default plugin defintion opts (#1559) --- lua/core/utils.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 08f9c36..6c23977 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -100,7 +100,7 @@ M.load_mappings = function(section, mapping_opt) end -- merge default/user plugin tables -M.merge_plugins = function(default_plugins) +M.merge_plugins = function(plugins) local plugin_configs = M.load_config().plugins local user_plugins = plugin_configs @@ -113,18 +113,19 @@ M.merge_plugins = function(default_plugins) local remove_plugins = plugin_configs.remove if type(remove_plugins) == "table" then for _, v in ipairs(remove_plugins) do - default_plugins[v] = nil + plugins[v] = nil end end - default_plugins = merge_tb("force", default_plugins, user_plugins) + plugins = merge_tb("force", plugins, user_plugins) local final_table = {} - for key, val in pairs(default_plugins) do + for key, val in pairs(plugins) do if val and type(val) == "table" then - default_plugins[key][1] = key - final_table[#final_table + 1] = default_plugins[key] + plugins[key] = val.rm_default_opts and user_plugins[key] or plugins[key] + plugins[key][1] = key + final_table[#final_table + 1] = plugins[key] end end From 97062ae15fa301e3ffc5c6fcbd638080579ca05a Mon Sep 17 00:00:00 2001 From: Justin Lee Date: Thu, 15 Sep 2022 02:46:24 +0800 Subject: [PATCH 1268/1541] Added missing key triggers for which-key plugin --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 7a9bfcb..52710ac 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -195,7 +195,7 @@ local plugins = { ["folke/which-key.nvim"] = { disable = true, module = "which-key", - keys = "", + keys = { "", "\"", "'", "`" }, config = function() require "plugins.configs.whichkey" end, From 83572cc15ba2e741e58bd8d8d222b06ec8d0e256 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 15 Sep 2022 07:51:13 +0530 Subject: [PATCH 1269/1541] move tabufline related functions to ui repo --- lua/core/mappings.lua | 20 ++++++------- lua/core/utils.lua | 67 ------------------------------------------- lua/plugins/init.lua | 2 +- 3 files changed, 11 insertions(+), 78 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 0abf7fd..3d9df51 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -59,14 +59,6 @@ M.general = { -- new buffer ["b"] = { " enew ", "new buffer" }, - - -- close buffer + hide terminal buffer - ["x"] = { - function() - require("core.utils").close_buffer() - end, - "close buffer", - }, }, t = { [""] = { termcodes "", "escape terminal mode" } }, @@ -92,20 +84,28 @@ M.tabufline = { -- cycle through buffers [""] = { function() - require("core.utils").tabuflineNext() + require("nvchad_ui.tabufline").tabuflineNext() end, "goto next buffer", }, [""] = { function() - require("core.utils").tabuflinePrev() + require("nvchad_ui.tabufline").tabuflinePrev() end, "goto prev buffer", }, -- pick buffers via numbers [""] = { " TbufPick ", "Pick buffer" }, + + -- close buffer + hide terminal buffer + ["x"] = { + function() + require("nvchad_ui.tabufline").close_buffer() + end, + "close buffer", + }, }, } diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 6c23977..b74278b 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -1,18 +1,6 @@ local M = {} -local api = vim.api - local merge_tb = vim.tbl_deep_extend -M.close_buffer = function(bufnr) - if vim.bo.buftype == "terminal" then - vim.cmd(vim.bo.buflisted and "set nobl | enew" or "hide") - else - bufnr = bufnr or api.nvim_get_current_buf() - require("core.utils").tabuflinePrev() - vim.cmd("confirm bd" .. bufnr) - end -end - M.load_config = function() local config = require "core.default_config" local chadrc_exists, chadrc = pcall(require, "custom.chadrc") @@ -201,59 +189,4 @@ M.packer_sync = function(...) end end -M.bufilter = function() - local bufs = vim.t.bufs or nil - - if not bufs then - return {} - end - - for i = #bufs, 1, -1 do - if not vim.api.nvim_buf_is_valid(bufs[i]) then - table.remove(bufs, i) - end - end - - return bufs -end - -M.tabuflineNext = function() - local bufs = M.bufilter() or {} - - for i, v in ipairs(bufs) do - if api.nvim_get_current_buf() == v then - vim.cmd(i == #bufs and "b" .. bufs[1] or "b" .. bufs[i + 1]) - break - end - end -end - -M.tabuflinePrev = function() - local bufs = M.bufilter() or {} - - for i, v in ipairs(bufs) do - if api.nvim_get_current_buf() == v then - vim.cmd(i == 1 and "b" .. bufs[#bufs] or "b" .. bufs[i - 1]) - break - end - end -end - --- closes tab + all of its buffers -M.closeAllBufs = function(action) - local bufs = vim.t.bufs - - if action == "closeTab" then - vim.cmd "tabclose" - end - - for _, buf in ipairs(bufs) do - M.close_buffer(buf) - end - - if action ~= "closeTab" then - vim.cmd "enew" - end -end - return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 52710ac..1cc7f82 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -195,7 +195,7 @@ local plugins = { ["folke/which-key.nvim"] = { disable = true, module = "which-key", - keys = { "", "\"", "'", "`" }, + keys = { "", '"', "'", "`" }, config = function() require "plugins.configs.whichkey" end, From 74e374ef7be0dac71c8c7d6a16b4cc1b0ebcb2e5 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Wed, 14 Sep 2022 11:57:32 +0530 Subject: [PATCH 1270/1541] plugins: colorizer: Let colorizer handle the loading --- lua/plugins/configs/others.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index e0870d2..b9f95c2 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -82,7 +82,9 @@ M.colorizer = function() options = load_override(options, "NvChad/nvim-colorizer.lua") colorizer.setup(options) -- execute colorizer as soon as possible - return vim.tbl_isempty(options.filetypes or {}) or vim.cmd [[do FileType]] + vim.defer_fn(function() + require("colorizer").attach_to_buffer(0) + end, 0) end M.comment = function() From 27560319cc4cf753e5a4d8713f82206d84a70d61 Mon Sep 17 00:00:00 2001 From: Owen <62473795+theowenyoung@users.noreply.github.com> Date: Sat, 24 Sep 2022 19:26:45 +0000 Subject: [PATCH 1271/1541] change snippets' priority Higher priority should be given to the user's own snippets --- lua/plugins/configs/others.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index b9f95c2..462c44b 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -113,8 +113,8 @@ M.luasnip = function() options = load_override(options, "L3MON4D3/LuaSnip") luasnip.config.set_config(options) - require("luasnip.loaders.from_vscode").lazy_load() require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.luasnippets_path or "" } + require("luasnip.loaders.from_vscode").lazy_load() vim.api.nvim_create_autocmd("InsertLeave", { callback = function() From 3fe07c88efd607ccb64127a332d36a910f647a04 Mon Sep 17 00:00:00 2001 From: "Jacob E. Tuz Poot" Date: Mon, 26 Sep 2022 18:29:39 -0500 Subject: [PATCH 1272/1541] feat: add buffer mapping for gitsigns --- lua/core/mappings.lua | 133 +++++++++++++++++++++++++++++++++ lua/plugins/configs/others.lua | 4 + 2 files changed, 137 insertions(+) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 3d9df51..2c83041 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -404,4 +404,137 @@ M.blankline = { }, } +M.gitsigns = { + plugin = true, + + n = { + -- Navigation + ["]c"] = { + function() + if vim.wo.diff then + return "]c" + end + vim.schedule(function() + require("gitsigns").next_hunk() + end) + return "" + end, + "Jump to next hunk", + opts = { expr = true }, + }, + ["[c"] = { + function() + if vim.wo.diff then + return "[c" + end + vim.schedule(function() + require("gitsigns").prev_hunk() + end) + return "" + end, + "Jump to prev hunk", + opts = { expr = true }, + }, + + -- Actions + ["hs"] = { + function() + require("gitsigns").stage_hunk() + end, + "Stage hunk", + }, + ["hr"] = { + function() + require("gitsigns").reset_hunk() + end, + "Reset hunk", + }, + ["hS"] = { + function() + require("gitsigns").stage_buffer() + end, + "Stage buffer", + }, + ["hu"] = { + function() + require("gitsigns").undo_stage_hunk() + end, + "Undo stage hunk", + }, + ["hR"] = { + function() + require("gitsigns").reset_buffer() + end, + "Reset buffer", + }, + ["hp"] = { + function() + require("gitsigns").preview_hunk() + end, + "Preview hunk", + }, + ["hb"] = { + function() + package.loaded.gitsigns.blame_line { full = true } + end, + "Blame line", + }, + ["tb"] = { + function() + require("gitsigns").toggle_current_line_blame() + end, + "Toggle current line blame", + }, + ["td"] = { + function() + require("gitsigns").toggle_deleted() + end, + "Toggle deleted", + }, + ["hd"] = { + function() + require("gitsigns").diffthis() + end, + "Diff against the index", + }, + ["hD"] = { + function() + require("gitsigns").diffthis "~" + end, + "Diff against the last commit", + }, + }, + v = { + -- Actions + ["hs"] = { + function() + require("gitsigns").stage_hunk() + end, + "Stage hunk", + }, + ["hr"] = { + function () + require("gitsigns").reset_hunk() + end, + "Reset hunk", + }, + }, + x = { + ["ih"] = { + function () + require("gitsigns").select_hunk() + end, + "Reset hunk", + }, + }, + o = { + ["ih"] = { + function () + require("gitsigns").select_hunk() + end, + "Reset hunk", + }, + }, +} + return M diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 462c44b..4b7508a 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -1,6 +1,7 @@ local M = {} local load_override = require("core.utils").load_override +local utils = require "core.utils" M.autopairs = function() local present1, autopairs = pcall(require, "nvim-autopairs") @@ -145,6 +146,9 @@ M.gitsigns = function() topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" }, }, + on_attach = function (bufnr) + utils.load_mappings("gitsigns", { buffer = bufnr }) + end } options = load_override(options, "lewis6991/gitsigns.nvim") From 9eebb9198c830faccc9cfa65f1cb8143c940eeda Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 30 Sep 2022 09:39:35 +0530 Subject: [PATCH 1273/1541] add arg to make telescope search through symlink dirs #1609 --- lua/plugins/configs/telescope.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 03e1467..b01abc0 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -12,6 +12,7 @@ local options = { defaults = { vimgrep_arguments = { "rg", + "-L", "--color=never", "--no-heading", "--with-filename", From adc3130e8362c7b14d22b53402fb7c0b72a60d00 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 30 Sep 2022 09:53:47 +0530 Subject: [PATCH 1274/1541] reduce loc --- lua/core/lazy_load.lua | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index ae7480f..cbb82f9 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -58,23 +58,8 @@ M.packer_cmds = { "PackerLoad", } -M.treesitter_cmds = { - "TSInstall", - "TSBufEnable", - "TSBufDisable", - "TSEnable", - "TSDisable", - "TSModuleInfo", -} - -M.mason_cmds = { - "Mason", - "MasonInstall", - "MasonInstallAll", - "MasonUninstall", - "MasonUninstallAll", - "MasonLog", -} +M.treesitter_cmds = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSEnable", "TSDisable", "TSModuleInfo" } +M.mason_cmds = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" } M.gitsigns = function() autocmd({ "BufRead" }, { From 21e9e3cb097e1084089e7954ecade8be6503d4d8 Mon Sep 17 00:00:00 2001 From: Dhruvin Shah Date: Thu, 29 Sep 2022 16:23:40 -0400 Subject: [PATCH 1275/1541] config(cmp): correcting completeopt setup From the neovim doc, In Vimscript: `set completeopt=menu,menuone,noselect` In Lua using `vim.o`: `vim.o.completeopt = 'menu,menuone,noselect'` In Lua using `vim.opt`: `vim.opt.wildignore = { 'menu', 'menuoune', 'noselect' }` --- lua/plugins/configs/cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 2b69b6b..0779579 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -6,7 +6,7 @@ end require("base46").load_highlight "cmp" -vim.opt.completeopt = "menuone,noselect" +vim.o.completeopt = "menu,menuone,noselect" local function border(hl_name) return { From 1f34e72aff11342581ba8f9da8bb265b43101c43 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 4 Oct 2022 06:37:48 +0530 Subject: [PATCH 1276/1541] keep some gitsigns mappings only | rm 0.7v related stuff --- lua/core/mappings.lua | 89 ++++--------------------------- lua/core/options.lua | 7 --- lua/plugins/configs/lspconfig.lua | 11 +--- lua/plugins/init.lua | 6 +-- 4 files changed, 14 insertions(+), 99 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 2c83041..184a8c1 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -229,7 +229,7 @@ M.lspconfig = { ["fm"] = { function() - vim.lsp.buf.formatting {} + vim.lsp.buf.format { async = true } end, "lsp formatting", }, @@ -408,7 +408,7 @@ M.gitsigns = { plugin = true, n = { - -- Navigation + -- Navigation through hunks ["]c"] = { function() if vim.wo.diff then @@ -422,6 +422,7 @@ M.gitsigns = { "Jump to next hunk", opts = { expr = true }, }, + ["[c"] = { function() if vim.wo.diff then @@ -437,103 +438,33 @@ M.gitsigns = { }, -- Actions - ["hs"] = { - function() - require("gitsigns").stage_hunk() - end, - "Stage hunk", - }, - ["hr"] = { + ["rh"] = { function() require("gitsigns").reset_hunk() end, "Reset hunk", }, - ["hS"] = { - function() - require("gitsigns").stage_buffer() - end, - "Stage buffer", - }, - ["hu"] = { - function() - require("gitsigns").undo_stage_hunk() - end, - "Undo stage hunk", - }, - ["hR"] = { - function() - require("gitsigns").reset_buffer() - end, - "Reset buffer", - }, - ["hp"] = { + + ["ph"] = { function() require("gitsigns").preview_hunk() end, "Preview hunk", }, - ["hb"] = { + + ["gb"] = { function() - package.loaded.gitsigns.blame_line { full = true } + package.loaded.gitsigns.blame_line() end, "Blame line", }, - ["tb"] = { - function() - require("gitsigns").toggle_current_line_blame() - end, - "Toggle current line blame", - }, + ["td"] = { function() require("gitsigns").toggle_deleted() end, "Toggle deleted", }, - ["hd"] = { - function() - require("gitsigns").diffthis() - end, - "Diff against the index", - }, - ["hD"] = { - function() - require("gitsigns").diffthis "~" - end, - "Diff against the last commit", - }, - }, - v = { - -- Actions - ["hs"] = { - function() - require("gitsigns").stage_hunk() - end, - "Stage hunk", - }, - ["hr"] = { - function () - require("gitsigns").reset_hunk() - end, - "Reset hunk", - }, - }, - x = { - ["ih"] = { - function () - require("gitsigns").select_hunk() - end, - "Reset hunk", - }, - }, - o = { - ["ih"] = { - function () - require("gitsigns").select_hunk() - end, - "Reset hunk", - }, }, } diff --git a/lua/core/options.lua b/lua/core/options.lua index c2a8832..a097cd7 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -2,18 +2,11 @@ local opt = vim.opt local g = vim.g local config = require("core.utils").load_config() -g.vim_version = vim.version().minor g.nvchad_theme = config.ui.theme g.toggle_theme_icon = "  " g.transparency = config.ui.transparency g.theme_switcher_loaded = false --- use filetype.lua instead of filetype.vim. it's enabled by default in neovim 0.8 (nightly) -if g.vim_version < 8 then - g.did_load_filetypes = 0 - g.do_filetype_lua = 1 -end - opt.laststatus = 3 -- global statusline opt.showmode = false diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 0c16830..2f87926 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -13,15 +13,8 @@ local utils = require "core.utils" -- export on_attach & capabilities for custom lspconfigs M.on_attach = function(client, bufnr) - if vim.g.vim_version > 7 then - -- nightly - client.server_capabilities.documentFormattingProvider = false - client.server_capabilities.documentRangeFormattingProvider = false - else - -- stable - client.resolved_capabilities.document_formatting = false - client.resolved_capabilities.document_range_formatting = false - end + client.server_capabilities.documentFormattingProvider = false + client.server_capabilities.documentRangeFormattingProvider = false utils.load_mappings("lspconfig", { buffer = bufnr }) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 1cc7f82..778efd5 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -217,9 +217,7 @@ if present then -- load packer init options local init_options = require("plugins.configs.others").packer_init() init_options = require("core.utils").load_override(init_options, "wbthomason/packer.nvim") - packer.init(init_options) - for _, v in pairs(plugins) do - packer.use(v) - end + packer.init(init_options) + packer.startup { plugins } end From 017508282499c499426489d281c473e2045d9030 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 6 Oct 2022 05:41:05 +0530 Subject: [PATCH 1277/1541] avoid flooding mason.nvim binaries path --- lua/plugins/configs/mason.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua index b330bda..c713847 100644 --- a/lua/plugins/configs/mason.lua +++ b/lua/plugins/configs/mason.lua @@ -16,6 +16,8 @@ vim.api.nvim_create_autocmd("Filetype", { local options = { ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim + PATH = "skip", + ui = { icons = { package_pending = " ", From 3fae9d88c524db10b4c370cda94abad6cc5e5182 Mon Sep 17 00:00:00 2001 From: "Jacob E. Tuz Poot" Date: Mon, 26 Sep 2022 18:29:39 -0500 Subject: [PATCH 1278/1541] feat: add buffer mapping for gitsigns --- lua/core/mappings.lua | 133 +++++++++++++++++++++++++++++++++ lua/plugins/configs/others.lua | 4 + 2 files changed, 137 insertions(+) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 3d9df51..2c83041 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -404,4 +404,137 @@ M.blankline = { }, } +M.gitsigns = { + plugin = true, + + n = { + -- Navigation + ["]c"] = { + function() + if vim.wo.diff then + return "]c" + end + vim.schedule(function() + require("gitsigns").next_hunk() + end) + return "" + end, + "Jump to next hunk", + opts = { expr = true }, + }, + ["[c"] = { + function() + if vim.wo.diff then + return "[c" + end + vim.schedule(function() + require("gitsigns").prev_hunk() + end) + return "" + end, + "Jump to prev hunk", + opts = { expr = true }, + }, + + -- Actions + ["hs"] = { + function() + require("gitsigns").stage_hunk() + end, + "Stage hunk", + }, + ["hr"] = { + function() + require("gitsigns").reset_hunk() + end, + "Reset hunk", + }, + ["hS"] = { + function() + require("gitsigns").stage_buffer() + end, + "Stage buffer", + }, + ["hu"] = { + function() + require("gitsigns").undo_stage_hunk() + end, + "Undo stage hunk", + }, + ["hR"] = { + function() + require("gitsigns").reset_buffer() + end, + "Reset buffer", + }, + ["hp"] = { + function() + require("gitsigns").preview_hunk() + end, + "Preview hunk", + }, + ["hb"] = { + function() + package.loaded.gitsigns.blame_line { full = true } + end, + "Blame line", + }, + ["tb"] = { + function() + require("gitsigns").toggle_current_line_blame() + end, + "Toggle current line blame", + }, + ["td"] = { + function() + require("gitsigns").toggle_deleted() + end, + "Toggle deleted", + }, + ["hd"] = { + function() + require("gitsigns").diffthis() + end, + "Diff against the index", + }, + ["hD"] = { + function() + require("gitsigns").diffthis "~" + end, + "Diff against the last commit", + }, + }, + v = { + -- Actions + ["hs"] = { + function() + require("gitsigns").stage_hunk() + end, + "Stage hunk", + }, + ["hr"] = { + function () + require("gitsigns").reset_hunk() + end, + "Reset hunk", + }, + }, + x = { + ["ih"] = { + function () + require("gitsigns").select_hunk() + end, + "Reset hunk", + }, + }, + o = { + ["ih"] = { + function () + require("gitsigns").select_hunk() + end, + "Reset hunk", + }, + }, +} + return M diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 462c44b..4b7508a 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -1,6 +1,7 @@ local M = {} local load_override = require("core.utils").load_override +local utils = require "core.utils" M.autopairs = function() local present1, autopairs = pcall(require, "nvim-autopairs") @@ -145,6 +146,9 @@ M.gitsigns = function() topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" }, }, + on_attach = function (bufnr) + utils.load_mappings("gitsigns", { buffer = bufnr }) + end } options = load_override(options, "lewis6991/gitsigns.nvim") From 44b238ad0baa38f6817e996fb0a4992f758c9f09 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 30 Sep 2022 09:39:35 +0530 Subject: [PATCH 1279/1541] add arg to make telescope search through symlink dirs #1609 --- lua/plugins/configs/telescope.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 03e1467..b01abc0 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -12,6 +12,7 @@ local options = { defaults = { vimgrep_arguments = { "rg", + "-L", "--color=never", "--no-heading", "--with-filename", From d2f0fb316b03c61136118c051f8e1d9476ad4f96 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 30 Sep 2022 09:53:47 +0530 Subject: [PATCH 1280/1541] reduce loc --- lua/core/lazy_load.lua | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index ae7480f..cbb82f9 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -58,23 +58,8 @@ M.packer_cmds = { "PackerLoad", } -M.treesitter_cmds = { - "TSInstall", - "TSBufEnable", - "TSBufDisable", - "TSEnable", - "TSDisable", - "TSModuleInfo", -} - -M.mason_cmds = { - "Mason", - "MasonInstall", - "MasonInstallAll", - "MasonUninstall", - "MasonUninstallAll", - "MasonLog", -} +M.treesitter_cmds = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSEnable", "TSDisable", "TSModuleInfo" } +M.mason_cmds = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" } M.gitsigns = function() autocmd({ "BufRead" }, { From b142f4c99dbecc30cf172b8f9042ea1919dad9cb Mon Sep 17 00:00:00 2001 From: Dhruvin Shah Date: Thu, 29 Sep 2022 16:23:40 -0400 Subject: [PATCH 1281/1541] config(cmp): correcting completeopt setup From the neovim doc, In Vimscript: `set completeopt=menu,menuone,noselect` In Lua using `vim.o`: `vim.o.completeopt = 'menu,menuone,noselect'` In Lua using `vim.opt`: `vim.opt.wildignore = { 'menu', 'menuoune', 'noselect' }` --- lua/plugins/configs/cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 2b69b6b..0779579 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -6,7 +6,7 @@ end require("base46").load_highlight "cmp" -vim.opt.completeopt = "menuone,noselect" +vim.o.completeopt = "menu,menuone,noselect" local function border(hl_name) return { From 00be26275ecd017427840a7c01617d2fe686582c Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 4 Oct 2022 06:37:48 +0530 Subject: [PATCH 1282/1541] keep some gitsigns mappings only | rm 0.7v related stuff --- lua/core/mappings.lua | 89 ++++--------------------------- lua/core/options.lua | 7 --- lua/plugins/configs/lspconfig.lua | 11 +--- lua/plugins/init.lua | 6 +-- 4 files changed, 14 insertions(+), 99 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 2c83041..184a8c1 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -229,7 +229,7 @@ M.lspconfig = { ["fm"] = { function() - vim.lsp.buf.formatting {} + vim.lsp.buf.format { async = true } end, "lsp formatting", }, @@ -408,7 +408,7 @@ M.gitsigns = { plugin = true, n = { - -- Navigation + -- Navigation through hunks ["]c"] = { function() if vim.wo.diff then @@ -422,6 +422,7 @@ M.gitsigns = { "Jump to next hunk", opts = { expr = true }, }, + ["[c"] = { function() if vim.wo.diff then @@ -437,103 +438,33 @@ M.gitsigns = { }, -- Actions - ["hs"] = { - function() - require("gitsigns").stage_hunk() - end, - "Stage hunk", - }, - ["hr"] = { + ["rh"] = { function() require("gitsigns").reset_hunk() end, "Reset hunk", }, - ["hS"] = { - function() - require("gitsigns").stage_buffer() - end, - "Stage buffer", - }, - ["hu"] = { - function() - require("gitsigns").undo_stage_hunk() - end, - "Undo stage hunk", - }, - ["hR"] = { - function() - require("gitsigns").reset_buffer() - end, - "Reset buffer", - }, - ["hp"] = { + + ["ph"] = { function() require("gitsigns").preview_hunk() end, "Preview hunk", }, - ["hb"] = { + + ["gb"] = { function() - package.loaded.gitsigns.blame_line { full = true } + package.loaded.gitsigns.blame_line() end, "Blame line", }, - ["tb"] = { - function() - require("gitsigns").toggle_current_line_blame() - end, - "Toggle current line blame", - }, + ["td"] = { function() require("gitsigns").toggle_deleted() end, "Toggle deleted", }, - ["hd"] = { - function() - require("gitsigns").diffthis() - end, - "Diff against the index", - }, - ["hD"] = { - function() - require("gitsigns").diffthis "~" - end, - "Diff against the last commit", - }, - }, - v = { - -- Actions - ["hs"] = { - function() - require("gitsigns").stage_hunk() - end, - "Stage hunk", - }, - ["hr"] = { - function () - require("gitsigns").reset_hunk() - end, - "Reset hunk", - }, - }, - x = { - ["ih"] = { - function () - require("gitsigns").select_hunk() - end, - "Reset hunk", - }, - }, - o = { - ["ih"] = { - function () - require("gitsigns").select_hunk() - end, - "Reset hunk", - }, }, } diff --git a/lua/core/options.lua b/lua/core/options.lua index c2a8832..a097cd7 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -2,18 +2,11 @@ local opt = vim.opt local g = vim.g local config = require("core.utils").load_config() -g.vim_version = vim.version().minor g.nvchad_theme = config.ui.theme g.toggle_theme_icon = "  " g.transparency = config.ui.transparency g.theme_switcher_loaded = false --- use filetype.lua instead of filetype.vim. it's enabled by default in neovim 0.8 (nightly) -if g.vim_version < 8 then - g.did_load_filetypes = 0 - g.do_filetype_lua = 1 -end - opt.laststatus = 3 -- global statusline opt.showmode = false diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 0c16830..2f87926 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -13,15 +13,8 @@ local utils = require "core.utils" -- export on_attach & capabilities for custom lspconfigs M.on_attach = function(client, bufnr) - if vim.g.vim_version > 7 then - -- nightly - client.server_capabilities.documentFormattingProvider = false - client.server_capabilities.documentRangeFormattingProvider = false - else - -- stable - client.resolved_capabilities.document_formatting = false - client.resolved_capabilities.document_range_formatting = false - end + client.server_capabilities.documentFormattingProvider = false + client.server_capabilities.documentRangeFormattingProvider = false utils.load_mappings("lspconfig", { buffer = bufnr }) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 1cc7f82..778efd5 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -217,9 +217,7 @@ if present then -- load packer init options local init_options = require("plugins.configs.others").packer_init() init_options = require("core.utils").load_override(init_options, "wbthomason/packer.nvim") - packer.init(init_options) - for _, v in pairs(plugins) do - packer.use(v) - end + packer.init(init_options) + packer.startup { plugins } end From dc669313c1e3e4348c65d622734e57d7459b6f83 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 6 Oct 2022 05:41:05 +0530 Subject: [PATCH 1283/1541] avoid flooding mason.nvim binaries path --- lua/plugins/configs/mason.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua index b330bda..c713847 100644 --- a/lua/plugins/configs/mason.lua +++ b/lua/plugins/configs/mason.lua @@ -16,6 +16,8 @@ vim.api.nvim_create_autocmd("Filetype", { local options = { ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim + PATH = "skip", + ui = { icons = { package_pending = " ", From cdc970a9e446172298d5cf6c19542b08bddc9b1f Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Sat, 8 Oct 2022 19:09:13 +0200 Subject: [PATCH 1284/1541] Add coc-settings.json to .gitignore One might decide to install coc.nvim which requires to maintain a custom configuration at the root of the `nvim` folder (created with the command `:CocConfig`). It is recommend to ignore the file to avoid update conflicts as NvChad does not ship coc.nvim. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index de45666..5b992b0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ plugin custom spell ftplugin +coc-settings.json From 08e675b356536d953b7f1ac233346368d1265c5c Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Sun, 9 Oct 2022 16:35:27 +0200 Subject: [PATCH 1285/1541] Add .luarc.json to .gitignore Using `coc-lua` with `coc.nvim` will produce a `.luarc.json` when editing own custom configs that should be excluded from NvChad, since NvChad does not maintain its own `.luarc.json` --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 5b992b0..2de440a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ custom spell ftplugin coc-settings.json +.luarc.json From 28db7c752ea7337d866b88d56bc6327fd53a4dfd Mon Sep 17 00:00:00 2001 From: Sidhanth Rathod Date: Mon, 24 Oct 2022 08:56:34 +0530 Subject: [PATCH 1286/1541] Update README.md --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index 90783f6..12484e8 100644 --- a/.github/README.md +++ b/.github/README.md @@ -21,7 +21,7 @@ src="https://img.shields.io/github/license/NvChad/NvChad?style=flat-square&logo=GNU&label=License&color=df967f" alt="License" /> -[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.7.0-blueviolet.svg?style=flat-square&logo=Neovim&color=90E59A&logoColor=white)](https://github.com/neovim/neovim) +[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.8.0-blueviolet.svg?style=flat-square&logo=Neovim&color=90E59A&logoColor=white)](https://github.com/neovim/neovim) [![GitHub Issues](https://img.shields.io/github/issues/NvChad/NvChad.svg?style=flat-square&label=Issues&color=d77982)](https://github.com/NvChad/NvChad/issues) [![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/gADmkJb9Fb) [![Matrix](https://img.shields.io/badge/Matrix-40aa8b.svg?style=flat-square&logo=Matrix&logoColor=white)](https://matrix.to/#/#nvchad:matrix.org) From d3fe3fcc1a5c98c1666fb06a92777bd39952d264 Mon Sep 17 00:00:00 2001 From: Uy Ha Date: Wed, 2 Nov 2022 09:00:33 +0000 Subject: [PATCH 1287/1541] enable gitsigns when opening nvim from a none git repository --- lua/core/lazy_load.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index cbb82f9..e57bb1f 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -65,7 +65,7 @@ M.gitsigns = function() autocmd({ "BufRead" }, { group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }), callback = function() - vim.fn.system("git rev-parse " .. vim.fn.expand "%:p:h") + vim.fn.system("git -C " .. vim.fn.expand "%:p:h" .. " status") if vim.v.shell_error == 0 then vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad" vim.schedule(function() From c6252937b207e40e72a6d646900c86ab4cd664a1 Mon Sep 17 00:00:00 2001 From: Uy Ha Date: Thu, 3 Nov 2022 09:02:33 +0000 Subject: [PATCH 1288/1541] use rev-parse instead of status --- lua/core/lazy_load.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index e57bb1f..29973d4 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -65,7 +65,7 @@ M.gitsigns = function() autocmd({ "BufRead" }, { group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }), callback = function() - vim.fn.system("git -C " .. vim.fn.expand "%:p:h" .. " status") + vim.fn.system("git -C " .. vim.fn.expand "%:p:h" .. " rev-parse") if vim.v.shell_error == 0 then vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad" vim.schedule(function() From 4db58e4975a5d00b12c029ebf297d99f0c6d5226 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 15 Nov 2022 18:40:40 +0530 Subject: [PATCH 1289/1541] add glyph icon for untracked icon (gitsigns --- lua/plugins/configs/others.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 4b7508a..2b50e0c 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -145,10 +145,11 @@ M.gitsigns = function() delete = { hl = "DiffDelete", text = "", numhl = "GitSignsDeleteNr" }, topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" }, + untracked = { hl = "GitSignsAdd", text = "│", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" }, }, - on_attach = function (bufnr) + on_attach = function(bufnr) utils.load_mappings("gitsigns", { buffer = bufnr }) - end + end, } options = load_override(options, "lewis6991/gitsigns.nvim") From cdbdd66929a15c8d9c2fec8b842fb3701fe53b1f Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 15 Nov 2022 18:42:15 +0530 Subject: [PATCH 1290/1541] use default mapping for diagnostic goto_next --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 184a8c1..c98805f 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -213,7 +213,7 @@ M.lspconfig = { "goto prev", }, - ["d]"] = { + ["]d"] = { function() vim.diagnostic.goto_next() end, From 4971e07f6ad79557d0e3ba445512c05249c924bc Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 15 Nov 2022 18:54:21 +0530 Subject: [PATCH 1291/1541] rm support for ooold plugin syntax --- lua/core/utils.lua | 52 ++++++++-------------------------------------- 1 file changed, 9 insertions(+), 43 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index b74278b..daeff4c 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -89,29 +89,14 @@ end -- merge default/user plugin tables M.merge_plugins = function(plugins) - local plugin_configs = M.load_config().plugins - local user_plugins = plugin_configs - - -- old plugin syntax for adding plugins - if plugin_configs.user and type(plugin_configs.user) == "table" then - user_plugins = plugin_configs.user - end - - -- support old plugin removal syntax - local remove_plugins = plugin_configs.remove - if type(remove_plugins) == "table" then - for _, v in ipairs(remove_plugins) do - plugins[v] = nil - end - end - - plugins = merge_tb("force", plugins, user_plugins) + local user_plugins = M.load_config().plugins + plugins = merge_tb("force", plugins, M.load_config().plugins) local final_table = {} for key, val in pairs(plugins) do - if val and type(val) == "table" then - plugins[key] = val.rm_default_opts and user_plugins[key] or plugins[key] + if val then + plugins[key] = (val.rm_default_opts and user_plugins[key]) or plugins[key] plugins[key][1] = key final_table[#final_table + 1] = plugins[key] end @@ -122,27 +107,14 @@ end -- override plugin options table with custom ones M.load_override = function(options_table, name) - local plugin_configs, plugin_options = M.load_config().plugins, nil + local user_plugins = M.load_config().plugins + local plugin_options = {} - -- support old plugin syntax for override - local user_override = plugin_configs.override and plugin_configs.override[name] - if user_override and type(user_override) == "table" then - plugin_options = user_override + if user_plugins[name] then + plugin_options = user_plugins[name].override_options or {} + plugin_options = type(plugin_options) == "table" and plugin_options or plugin_options() end - -- if no old style plugin override is found, then use the new syntax - if not plugin_options and plugin_configs[name] then - local override_options = plugin_configs[name].override_options or {} - if type(override_options) == "table" then - plugin_options = override_options - elseif type(override_options) == "function" then - plugin_options = override_options() - end - end - - -- make sure the plugin options are a table - plugin_options = type(plugin_options) == "table" and plugin_options or {} - return merge_tb("force", options_table, plugin_options) end @@ -178,12 +150,6 @@ M.packer_sync = function(...) if packer_exists then packer.sync(...) - - local plugins = M.load_config().plugins - local old_style_options = plugins.user or plugins.override or plugins.remove - if old_style_options then - vim.notify_once("NvChad: This plugin syntax is deprecated, use new style config.", "Error") - end else error "Packer could not be loaded!" end From 99f6b2132efcb78e36b2e96ac647af6fa0bfc237 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 15 Nov 2022 21:28:04 +0530 Subject: [PATCH 1292/1541] remove alpha plugin --- lua/plugins/configs/alpha.lua | 110 ------------------------------- lua/plugins/configs/nvimtree.lua | 1 - lua/plugins/configs/others.lua | 1 - lua/plugins/init.lua | 9 --- 4 files changed, 121 deletions(-) delete mode 100644 lua/plugins/configs/alpha.lua diff --git a/lua/plugins/configs/alpha.lua b/lua/plugins/configs/alpha.lua deleted file mode 100644 index b91c233..0000000 --- a/lua/plugins/configs/alpha.lua +++ /dev/null @@ -1,110 +0,0 @@ -local present, alpha = pcall(require, "alpha") - -if not present then - return -end - -require("base46").load_highlight "alpha" - -local function button(sc, txt, keybind) - local sc_ = sc:gsub("%s", ""):gsub("SPC", "") - - local opts = { - position = "center", - text = txt, - shortcut = sc, - cursor = 5, - width = 36, - align_shortcut = "right", - hl = "AlphaButtons", - } - - if keybind then - opts.keymap = { "n", sc_, keybind, { noremap = true, silent = true } } - end - - return { - type = "button", - val = txt, - on_press = function() - local key = vim.api.nvim_replace_termcodes(sc_, true, false, true) or "" - vim.api.nvim_feedkeys(key, "normal", false) - end, - opts = opts, - } -end - --- dynamic header padding -local fn = vim.fn -local marginTopPercent = 0.3 -local headerPadding = fn.max { 2, fn.floor(fn.winheight(0) * marginTopPercent) } - -local options = { - - header = { - type = "text", - val = { - " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", - " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", - " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", - " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", - " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", - " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", - " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", - " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", - " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", - " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", - " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", - }, - opts = { - position = "center", - hl = "AlphaHeader", - }, - }, - - buttons = { - type = "group", - val = { - button("SPC f f", " Find File ", ":Telescope find_files"), - button("SPC f o", " Recent File ", ":Telescope oldfiles"), - button("SPC f w", " Find Word ", ":Telescope live_grep"), - button("SPC b m", " Bookmarks ", ":Telescope marks"), - button("SPC t h", " Themes ", ":Telescope themes"), - button("SPC e s", " Settings", ":e $MYVIMRC | :cd %:p:h "), - }, - opts = { - spacing = 1, - }, - }, - - headerPaddingTop = { type = "padding", val = headerPadding }, - headerPaddingBottom = { type = "padding", val = 2 }, -} - -options = require("core.utils").load_override(options, "goolord/alpha-nvim") - -alpha.setup { - layout = { - options.headerPaddingTop, - options.header, - options.headerPaddingBottom, - options.buttons, - }, - opts = {}, -} - --- Disable statusline in dashboard -vim.api.nvim_create_autocmd("FileType", { - pattern = "alpha", - callback = function() - -- store current statusline value and use that - local old_laststatus = vim.opt.laststatus - vim.api.nvim_create_autocmd("BufUnload", { - buffer = 0, - callback = function() - vim.opt.laststatus = old_laststatus - end, - }) - vim.opt.laststatus = 0 - end, -}) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 0f1733e..c4f4fba 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -14,7 +14,6 @@ local options = { disable_netrw = true, hijack_netrw = true, open_on_setup = false, - ignore_ft_on_setup = { "alpha" }, hijack_cursor = true, hijack_unnamed_buffer_when_opening = false, update_cwd = true, diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 2b50e0c..9c3786a 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -37,7 +37,6 @@ M.blankline = function() filetype_exclude = { "help", "terminal", - "alpha", "packer", "lspinfo", "TelescopePrompt", diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 778efd5..24d6ff7 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -150,14 +150,6 @@ local plugins = { end, }, - ["goolord/alpha-nvim"] = { - after = "base46", - disable = true, - config = function() - require "plugins.configs.alpha" - end, - }, - ["numToStr/Comment.nvim"] = { module = "Comment", keys = { "gc", "gb" }, @@ -171,7 +163,6 @@ local plugins = { -- file managing , picker etc ["kyazdani42/nvim-tree.lua"] = { - ft = "alpha", cmd = { "NvimTreeToggle", "NvimTreeFocus" }, config = function() require "plugins.configs.nvimtree" From d142ac899a7660d989bf10e89f262a70af8f0f63 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 16 Nov 2022 09:51:07 +0530 Subject: [PATCH 1293/1541] use dev branch for ui/base46 plugins this is temporary, gets easy to test dev changes locally --- lua/core/default_config.lua | 2 +- lua/plugins/init.lua | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 1c7152b..10c24ef 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -5,7 +5,7 @@ local M = {} M.options = { nvChad = { update_url = "https://github.com/NvChad/NvChad", - update_branch = "main", + update_branch = "dev", }, } diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 24d6ff7..2fa809d 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -14,6 +14,7 @@ local plugins = { ["NvChad/extensions"] = { module = { "telescope", "nvchad" } }, ["NvChad/base46"] = { + branch = "dev", config = function() local ok, base46 = pcall(require, "base46") @@ -25,6 +26,7 @@ local plugins = { ["NvChad/ui"] = { after = "base46", + branch = "dev", config = function() local present, nvchad_ui = pcall(require, "nvchad_ui") From 936131c00a715a1999294820e2f5eac463e9a87c Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 16 Nov 2022 09:53:16 +0530 Subject: [PATCH 1294/1541] move ui plugin config to chadrc UI table --- lua/core/default_config.lua | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 10c24ef..5d11e7c 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -17,6 +17,43 @@ M.ui = { theme_toggle = { "onedark", "one_light" }, theme = "onedark", -- default theme transparency = false, + + statusline = { + separator_style = "default", -- default/round/block/arrow + overriden_modules = nil, + }, + + -- lazyload it when there are 1+ buffers + tabufline = { + enabled = true, + lazyload = true, + overriden_modules = nil, + }, + + -- nvdash (dashboard) + nvdash = { + load_on_startup = false, + + header = { + " ▄ ▄ ", + " ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ ", + " █ ▄ █▄█ ▄▄▄ █ █▄█ █ █ ", + " ▄▄ █▄█▄▄▄█ █▄█▄█▄▄█▄▄█ █ ", + " ▄ █▄▄█ ▄ ▄▄ ▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ", + " █▄▄▄▄ ▄▄▄ █ ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ █ ▄", + "▄ █ █▄█ █▄█ █ █ █▄█ █ █▄█ ▄▄▄ █ █", + "█▄█ ▄ █▄▄█▄▄█ █ ▄▄█ █ ▄ █ █▄█▄█ █", + " █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █▄█▄▄▄█ ", + }, + + buttons = { + { " Find File", "Spc f f", "Telescope find_files" }, + { " Recent Files", "Spc f o", "Telescope oldfiles" }, + { " Find Word", "Spc f w", "Telescope live_grep" }, + { " Bookmarks", "Spc b m", "Telescope marks" }, + { " Themes", "Spc t f", "Telescope themes" }, + }, + }, } M.plugins = {} From 08453985ca81b79d51e4a3fcd0d5601c001433eb Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 17 Nov 2022 07:00:36 +0530 Subject: [PATCH 1295/1541] rm un-needed lazyload function --- lua/core/lazy_load.lua | 79 ------------------------------------------ lua/core/utils.lua | 27 +++++++++++++++ lua/plugins/init.lua | 43 ++++++++++++++++++----- 3 files changed, 61 insertions(+), 88 deletions(-) delete mode 100644 lua/core/lazy_load.lua diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua deleted file mode 100644 index 29973d4..0000000 --- a/lua/core/lazy_load.lua +++ /dev/null @@ -1,79 +0,0 @@ -local M = {} -local autocmd = vim.api.nvim_create_autocmd - --- require("packer").loader(tb.plugins) --- This must be used for plugins that need to be loaded just after a file --- ex : treesitter, lspconfig etc -M.lazy_load = function(tb) - autocmd(tb.events, { - group = vim.api.nvim_create_augroup(tb.augroup_name, {}), - callback = function() - if tb.condition() then - vim.api.nvim_del_augroup_by_name(tb.augroup_name) - - -- dont defer for treesitter as it will show slow highlighting - -- This deferring only happens only when we do "nvim filename" - if tb.plugin ~= "nvim-treesitter" then - vim.defer_fn(function() - require("packer").loader(tb.plugin) - if tb.plugin == "nvim-lspconfig" then - vim.cmd "silent! do FileType" - end - end, 0) - else - require("packer").loader(tb.plugin) - end - end - end, - }) -end - --- load certain plugins only when there's a file opened in the buffer --- if "nvim filename" is executed -> load the plugin after nvim gui loads --- This gives an instant preview of nvim with the file opened - -M.on_file_open = function(plugin_name) - M.lazy_load { - events = { "BufRead", "BufWinEnter", "BufNewFile" }, - augroup_name = "BeLazyOnFileOpen" .. plugin_name, - plugin = plugin_name, - condition = function() - local file = vim.fn.expand "%" - return file ~= "NvimTree_1" and file ~= "[packer]" and file ~= "" - end, - } -end - -M.packer_cmds = { - "PackerSnapshot", - "PackerSnapshotRollback", - "PackerSnapshotDelete", - "PackerInstall", - "PackerUpdate", - "PackerSync", - "PackerClean", - "PackerCompile", - "PackerStatus", - "PackerProfile", - "PackerLoad", -} - -M.treesitter_cmds = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSEnable", "TSDisable", "TSModuleInfo" } -M.mason_cmds = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" } - -M.gitsigns = function() - autocmd({ "BufRead" }, { - group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }), - callback = function() - vim.fn.system("git -C " .. vim.fn.expand "%:p:h" .. " rev-parse") - if vim.v.shell_error == 0 then - vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad" - vim.schedule(function() - require("packer").loader "gitsigns.nvim" - end) - end - end, - }) -end - -return M diff --git a/lua/core/utils.lua b/lua/core/utils.lua index daeff4c..fe2cfaa 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -155,4 +155,31 @@ M.packer_sync = function(...) end end +M.lazy_load = function(plugin) + vim.api.nvim_create_autocmd({ "BufRead", "BufWinEnter", "BufNewFile" }, { + group = vim.api.nvim_create_augroup("BeLazyOnFileOpen" .. plugin, {}), + callback = function() + local file = vim.fn.expand "%" + local condition = file ~= "NvimTree_1" and file ~= "[packer]" and file ~= "" + + if condition then + vim.api.nvim_del_augroup_by_name("BeLazyOnFileOpen" .. plugin) + + -- dont defer for treesitter as it will show slow highlighting + -- This deferring only happens only when we do "nvim filename" + if plugin ~= "nvim-treesitter" then + vim.defer_fn(function() + require("packer").loader(plugin) + if plugin == "nvim-lspconfig" then + vim.cmd "silent! do FileType" + end + end, 0) + else + require("packer").loader(plugin) + end + end + end, + }) +end + return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 2fa809d..d7831a0 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,3 +1,4 @@ +-- List of all default plugins & their definitions local plugins = { ["nvim-lua/plenary.nvim"] = { module = "plenary" }, @@ -5,7 +6,19 @@ local plugins = { ["lewis6991/impatient.nvim"] = {}, ["wbthomason/packer.nvim"] = { - cmd = require("core.lazy_load").packer_cmds, + cmd = { + "PackerSnapshot", + "PackerSnapshotRollback", + "PackerSnapshotDelete", + "PackerInstall", + "PackerUpdate", + "PackerSync", + "PackerClean", + "PackerCompile", + "PackerStatus", + "PackerProfile", + "PackerLoad", + }, config = function() require "plugins" end, @@ -57,7 +70,7 @@ local plugins = { ["lukas-reineke/indent-blankline.nvim"] = { opt = true, setup = function() - require("core.lazy_load").on_file_open "indent-blankline.nvim" + require("core.utils").lazy_load "indent-blankline.nvim" require("core.utils").load_mappings "blankline" end, config = function() @@ -68,7 +81,7 @@ local plugins = { ["NvChad/nvim-colorizer.lua"] = { opt = true, setup = function() - require("core.lazy_load").on_file_open "nvim-colorizer.lua" + require("core.utils").lazy_load "nvim-colorizer.lua" end, config = function() require("plugins.configs.others").colorizer() @@ -78,9 +91,10 @@ local plugins = { ["nvim-treesitter/nvim-treesitter"] = { module = "nvim-treesitter", setup = function() - require("core.lazy_load").on_file_open "nvim-treesitter" + require("core.utils").lazy_load "nvim-treesitter" end, - cmd = require("core.lazy_load").treesitter_cmds, + cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSEnable", "TSDisable", "TSModuleInfo" }, + run = ":TSUpdate", config = function() require "plugins.configs.treesitter" @@ -91,7 +105,19 @@ local plugins = { ["lewis6991/gitsigns.nvim"] = { ft = "gitcommit", setup = function() - require("core.lazy_load").gitsigns() + -- load gitsigns only when a git file is opened + vim.api.nvim_create_autocmd({ "BufRead" }, { + group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }), + callback = function() + vim.fn.system("git -C " .. vim.fn.expand "%:p:h" .. " rev-parse") + if vim.v.shell_error == 0 then + vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad" + vim.schedule(function() + require("packer").loader "gitsigns.nvim" + end) + end + end, + }) end, config = function() require("plugins.configs.others").gitsigns() @@ -100,7 +126,7 @@ local plugins = { -- lsp stuff ["williamboman/mason.nvim"] = { - cmd = require("core.lazy_load").mason_cmds, + cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" }, config = function() require "plugins.configs.mason" end, @@ -109,7 +135,7 @@ local plugins = { ["neovim/nvim-lspconfig"] = { opt = true, setup = function() - require("core.lazy_load").on_file_open "nvim-lspconfig" + require("core.utils").lazy_load "nvim-lspconfig" end, config = function() require "plugins.configs.lspconfig" @@ -198,7 +224,6 @@ local plugins = { }, } --- Load all plugins local present, packer = pcall(require, "packer") if present then From f77d052d702e110ea194b065c27eb6e49580e395 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 17 Nov 2022 19:26:43 +0530 Subject: [PATCH 1296/1541] change highlight loading function name --- init.lua | 3 +++ lua/core/options.lua | 1 - lua/plugins/configs/cmp.lua | 2 +- lua/plugins/configs/lspconfig.lua | 2 +- lua/plugins/configs/mason.lua | 2 +- lua/plugins/configs/nvimtree.lua | 2 +- lua/plugins/configs/others.lua | 6 +++--- lua/plugins/configs/telescope.lua | 4 +--- lua/plugins/configs/treesitter.lua | 2 +- lua/plugins/configs/whichkey.lua | 2 +- lua/plugins/init.lua | 6 +----- 11 files changed, 14 insertions(+), 18 deletions(-) diff --git a/init.lua b/init.lua index 7324b73..1516113 100644 --- a/init.lua +++ b/init.lua @@ -14,6 +14,9 @@ if fn.empty(fn.glob(install_path)) > 0 then print "Cloning packer .." fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } + os.execute("mkdir " .. vim.fn.stdpath "data" .. "/site/pack/packer/start/base46_cache/lua/base46_cache") + require("base46").compile() + -- install plugins + compile their configs vim.cmd "packadd packer.nvim" require "plugins" diff --git a/lua/core/options.lua b/lua/core/options.lua index a097cd7..f224962 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -5,7 +5,6 @@ local config = require("core.utils").load_config() g.nvchad_theme = config.ui.theme g.toggle_theme_icon = "  " g.transparency = config.ui.transparency -g.theme_switcher_loaded = false opt.laststatus = 3 -- global statusline opt.showmode = false diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 0779579..f9b2633 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -4,7 +4,7 @@ if not present then return end -require("base46").load_highlight "cmp" +require "base46_cache.cmp" vim.o.completeopt = "menu,menuone,noselect" diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 2f87926..864dd38 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -4,7 +4,7 @@ if not present then return end -require("base46").load_highlight "lsp" +require "base46_cache.lsp" require "nvchad_ui.lsp" local M = {} diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua index c713847..3cb85df 100644 --- a/lua/plugins/configs/mason.lua +++ b/lua/plugins/configs/mason.lua @@ -8,7 +8,7 @@ vim.api.nvim_create_augroup("_mason", { clear = true }) vim.api.nvim_create_autocmd("Filetype", { pattern = "mason", callback = function() - require("base46").load_highlight "mason" + require "base46_cache.mason" end, group = "_mason", }) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index c4f4fba..4c3910a 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -4,7 +4,7 @@ if not present then return end -require("base46").load_highlight "nvimtree" +require "base46_cache.nvimtree" local options = { filters = { diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 9c3786a..ac94fba 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -30,7 +30,7 @@ M.blankline = function() return end - require("base46").load_highlight "blankline" + require "base46_cache.blankline" local options = { indentLine_enabled = 1, @@ -135,7 +135,7 @@ M.gitsigns = function() return end - require("base46").load_highlight "git" + require "base46_cache.git" local options = { signs = { @@ -159,7 +159,7 @@ M.devicons = function() local present, devicons = pcall(require, "nvim-web-devicons") if present then - require("base46").load_highlight "devicons" + require "base46_cache.devicons" local options = { override = require("nvchad_ui.icons").devicons } options = require("core.utils").load_override(options, "kyazdani42/nvim-web-devicons") diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index b01abc0..8879b36 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -4,9 +4,7 @@ if not present then return end -vim.g.theme_switcher_loaded = true - -require("base46").load_highlight "telescope" +require "base46_cache.telescope" local options = { defaults = { diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index bb1b163..5ae94c8 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -4,7 +4,7 @@ if not present then return end -require("base46").load_highlight "treesitter" +require "base46_cache.treesitter" local options = { ensure_installed = { diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index 89e7c3e..a24b2ed 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -4,7 +4,7 @@ if not present then return end -require("base46").load_highlight "whichkey" +require "base46_cache.whichkey" local options = { diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index d7831a0..4a0964e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -29,11 +29,7 @@ local plugins = { ["NvChad/base46"] = { branch = "dev", config = function() - local ok, base46 = pcall(require, "base46") - - if ok then - base46.load_theme() - end + require "base46_cache.defaults" end, }, From a894ced767a8128f6a05908189bf11e092e49089 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 17 Nov 2022 21:32:55 +0530 Subject: [PATCH 1297/1541] add cmd to compile nvchad theme --- init.lua | 5 ++++- lua/core/init.lua | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 1516113..1c145ba 100644 --- a/init.lua +++ b/init.lua @@ -14,7 +14,10 @@ if fn.empty(fn.glob(install_path)) > 0 then print "Cloning packer .." fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } - os.execute("mkdir " .. vim.fn.stdpath "data" .. "/site/pack/packer/start/base46_cache/lua/base46_cache") + os.execute( + "mkdir " .. vim.fn.stdpath "data" .. "/site/pack/packer/start/base46_cache/compiled_themes/lua/base46_cache" + ) + require("base46").compile() -- install plugins + compile their configs diff --git a/lua/core/init.lua b/lua/core/init.lua index e96ca1a..80d9250 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -25,3 +25,9 @@ autocmd("VimEnter", { vim.cmd "command! -nargs=* -complete=customlist,v:lua.require'packer'.plugin_complete PackerSync lua require('plugins') require('core.utils').packer_sync()" end, }) + +local new_cmd = vim.api.nvim_create_user_command + +new_cmd("CompileNvTheme", function() + require("base46").compile() +end, {}) From 770e07f77c7c260c8f0b88a39e611343a203683e Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 17 Nov 2022 22:04:03 +0530 Subject: [PATCH 1298/1541] fix typo in mkdir cmd --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 1c145ba..75eff43 100644 --- a/init.lua +++ b/init.lua @@ -15,7 +15,7 @@ if fn.empty(fn.glob(install_path)) > 0 then fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } os.execute( - "mkdir " .. vim.fn.stdpath "data" .. "/site/pack/packer/start/base46_cache/compiled_themes/lua/base46_cache" + "mkdir -p " .. vim.fn.stdpath "data" .. "/site/pack/packer/start/base46_cache/compiled_themes/lua/base46_cache" ) require("base46").compile() From 76f0c9bc6f1a7ded3c083d74b55a4734e2172ed3 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 17 Nov 2022 22:32:57 +0530 Subject: [PATCH 1299/1541] rm incorrect theme cache path --- init.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 75eff43..5d97298 100644 --- a/init.lua +++ b/init.lua @@ -14,9 +14,7 @@ if fn.empty(fn.glob(install_path)) > 0 then print "Cloning packer .." fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } - os.execute( - "mkdir -p " .. vim.fn.stdpath "data" .. "/site/pack/packer/start/base46_cache/compiled_themes/lua/base46_cache" - ) + os.execute("mkdir -p " .. vim.fn.stdpath "data" .. "/site/pack/base46_cache/start/compiled_themes/lua/base46_cache/") require("base46").compile() From 3616f417e7e4b7b53944a84cf9edc93d012049e5 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 17 Nov 2022 23:16:28 +0530 Subject: [PATCH 1300/1541] fix packer bootstrapping not working --- init.lua | 6 ++++-- lua/plugins/init.lua | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 5d97298..822e157 100644 --- a/init.lua +++ b/init.lua @@ -16,10 +16,9 @@ if fn.empty(fn.glob(install_path)) > 0 then os.execute("mkdir -p " .. vim.fn.stdpath "data" .. "/site/pack/base46_cache/start/compiled_themes/lua/base46_cache/") - require("base46").compile() - -- install plugins + compile their configs vim.cmd "packadd packer.nvim" + require "plugins" vim.cmd "PackerSync" @@ -27,6 +26,9 @@ if fn.empty(fn.glob(install_path)) > 0 then vim.api.nvim_create_autocmd("User", { pattern = "PackerComplete", callback = function() + require("base46").compile() + require("base46").load_all_highlights() + vim.cmd "bw | silent! MasonInstallAll" -- close packer window require("packer").loader "nvim-treesitter" end, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 4a0964e..e9cff65 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -29,7 +29,7 @@ local plugins = { ["NvChad/base46"] = { branch = "dev", config = function() - require "base46_cache.defaults" + pcall(require, "base46_cache.defaults") end, }, From c16c22e87bffd5f4d6aa560b26e163dd432a87f6 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 17 Nov 2022 23:35:28 +0530 Subject: [PATCH 1301/1541] rm title option fixes (#1653) and this is a cmp issue + only with some terminals --- lua/core/options.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index f224962..4268684 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -9,7 +9,6 @@ g.transparency = config.ui.transparency opt.laststatus = 3 -- global statusline opt.showmode = false -opt.title = true opt.clipboard = "unnamedplus" opt.cursorline = true From d27029d1b153d25f91671d7290646d1ae25ee63b Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 19 Nov 2022 11:45:33 +0530 Subject: [PATCH 1302/1541] load base46_cache in instead of minified modules --- init.lua | 2 +- lua/core/options.lua | 1 + lua/plugins/configs/cmp.lua | 2 +- lua/plugins/configs/lspconfig.lua | 2 +- lua/plugins/configs/mason.lua | 2 +- lua/plugins/configs/nvimtree.lua | 2 +- lua/plugins/configs/others.lua | 6 +++--- lua/plugins/configs/telescope.lua | 2 +- lua/plugins/configs/treesitter.lua | 2 +- lua/plugins/configs/whichkey.lua | 2 +- lua/plugins/init.lua | 2 +- 11 files changed, 13 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index 822e157..cc36d01 100644 --- a/init.lua +++ b/init.lua @@ -14,7 +14,7 @@ if fn.empty(fn.glob(install_path)) > 0 then print "Cloning packer .." fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } - os.execute("mkdir -p " .. vim.fn.stdpath "data" .. "/site/pack/base46_cache/start/compiled_themes/lua/base46_cache/") + os.execute("mkdir -p " .. vim.g.base46_cache) -- install plugins + compile their configs vim.cmd "packadd packer.nvim" diff --git a/lua/core/options.lua b/lua/core/options.lua index 4268684..1731054 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -3,6 +3,7 @@ local g = vim.g local config = require("core.utils").load_config() g.nvchad_theme = config.ui.theme +g.base46_cache = vim.fn.stdpath "cache" .. "/nvchad/base46/" g.toggle_theme_icon = "  " g.transparency = config.ui.transparency diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index f9b2633..c89daae 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -4,7 +4,7 @@ if not present then return end -require "base46_cache.cmp" +loadfile(vim.g.base46_cache .. "cmp")() vim.o.completeopt = "menu,menuone,noselect" diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 864dd38..6496e94 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -4,7 +4,7 @@ if not present then return end -require "base46_cache.lsp" +loadfile(vim.g.base46_cache .. "lsp")() require "nvchad_ui.lsp" local M = {} diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua index 3cb85df..56e378b 100644 --- a/lua/plugins/configs/mason.lua +++ b/lua/plugins/configs/mason.lua @@ -8,7 +8,7 @@ vim.api.nvim_create_augroup("_mason", { clear = true }) vim.api.nvim_create_autocmd("Filetype", { pattern = "mason", callback = function() - require "base46_cache.mason" + loadfile(vim.g.base46_cache .. "mason")() end, group = "_mason", }) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 4c3910a..abe0863 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -4,7 +4,7 @@ if not present then return end -require "base46_cache.nvimtree" +loadfile(vim.g.base46_cache .. "nvimtree")() local options = { filters = { diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index ac94fba..82dc9cf 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -30,7 +30,7 @@ M.blankline = function() return end - require "base46_cache.blankline" + loadfile(vim.g.base46_cache .. "blankline")() local options = { indentLine_enabled = 1, @@ -135,7 +135,7 @@ M.gitsigns = function() return end - require "base46_cache.git" + loadfile(vim.g.base46_cache .. "git")() local options = { signs = { @@ -159,7 +159,7 @@ M.devicons = function() local present, devicons = pcall(require, "nvim-web-devicons") if present then - require "base46_cache.devicons" + loadfile(vim.g.base46_cache .. "devicons")() local options = { override = require("nvchad_ui.icons").devicons } options = require("core.utils").load_override(options, "kyazdani42/nvim-web-devicons") diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 8879b36..fbb46c8 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -4,7 +4,7 @@ if not present then return end -require "base46_cache.telescope" +loadfile(vim.g.base46_cache .. "telescope")() local options = { defaults = { diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index 5ae94c8..0012a0b 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -4,7 +4,7 @@ if not present then return end -require "base46_cache.treesitter" +loadfile(vim.g.base46_cache .. "treesitter")() local options = { ensure_installed = { diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index a24b2ed..1e561ed 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -4,7 +4,7 @@ if not present then return end -require "base46_cache.whichkey" +loadfile(vim.g.base46_cache .. "whichkey")() local options = { diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e9cff65..62c91cb 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -29,7 +29,7 @@ local plugins = { ["NvChad/base46"] = { branch = "dev", config = function() - pcall(require, "base46_cache.defaults") + loadfile(vim.g.base46_cache .. "defaults")() end, }, From b266f066af2e16edfbd15950e751b82a1d44618a Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 19 Nov 2022 12:02:07 +0530 Subject: [PATCH 1303/1541] handle error base46_cache error --- lua/plugins/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 62c91cb..8ca13e5 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -29,7 +29,9 @@ local plugins = { ["NvChad/base46"] = { branch = "dev", config = function() - loadfile(vim.g.base46_cache .. "defaults")() + pcall(function() + loadfile(vim.g.base46_cache .. "defaults")() + end) end, }, From d27e6a2b9dd401ec93a0f654f6523627db323b36 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 20 Nov 2022 17:35:56 +0530 Subject: [PATCH 1304/1541] rm un-needed cmd --- lua/plugins/init.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 8ca13e5..275cbc8 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -225,8 +225,6 @@ local plugins = { local present, packer = pcall(require, "packer") if present then - vim.cmd "packadd packer.nvim" - -- Override with default plugins with user ones plugins = require("core.utils").merge_plugins(plugins) From 8f92334c5769de5e2b943ebf3f57f1e5489a0c6c Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 20 Nov 2022 21:50:13 +0530 Subject: [PATCH 1305/1541] load syntax highlights in treesitter config --- lua/plugins/configs/treesitter.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index 0012a0b..8231751 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -4,6 +4,7 @@ if not present then return end +loadfile(vim.g.base46_cache .. "syntax")() loadfile(vim.g.base46_cache .. "treesitter")() local options = { From 4f789d3406d0d2424a677dfc0cb14224b00b7aec Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 21 Nov 2022 21:06:49 +0530 Subject: [PATCH 1306/1541] add multiple cmp themes https://github.com/NvChad/base46/issues/109 --- init.lua | 1 - lua/core/default_config.lua | 15 +++++++++++- lua/core/init.lua | 2 +- lua/plugins/configs/cmp.lua | 48 ++++++++++++++++++++++++++++++------- 4 files changed, 54 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index cc36d01..b042390 100644 --- a/init.lua +++ b/init.lua @@ -26,7 +26,6 @@ if fn.empty(fn.glob(install_path)) > 0 then vim.api.nvim_create_autocmd("User", { pattern = "PackerComplete", callback = function() - require("base46").compile() require("base46").load_all_highlights() vim.cmd "bw | silent! MasonInstallAll" -- close packer window diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 5d11e7c..24c6592 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -10,14 +10,27 @@ M.options = { } M.ui = { + ------------------------------- base46 ------------------------------------- -- hl = highlights hl_add = {}, hl_override = {}, + changed_themes = {}, theme_toggle = { "onedark", "one_light" }, theme = "onedark", -- default theme + transparency = false, + -- cmp themeing + cmp = { + icons = true, + lspkind_text = true, + style = "default", -- default/flat_light/flat_dark/atom/atom_colored + border_color = "grey_fg", -- only applicable for "default" style, use color names from base30 variables + selected_item_bg = "colored", -- colored / simple + }, + + ------------------------------- nvchad_ui modules ----------------------------- statusline = { separator_style = "default", -- default/round/block/arrow overriden_modules = nil, @@ -58,7 +71,7 @@ M.ui = { M.plugins = {} --- check core.mappings for table structure +-- these are default mappings, check core.mappings for table structure M.mappings = require "core.mappings" return M diff --git a/lua/core/init.lua b/lua/core/init.lua index 80d9250..7d1fb4d 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -29,5 +29,5 @@ autocmd("VimEnter", { local new_cmd = vim.api.nvim_create_user_command new_cmd("CompileNvTheme", function() - require("base46").compile() + require("base46").load_all_highlights() end, {}) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index c89daae..2a7312d 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -8,6 +8,35 @@ loadfile(vim.g.base46_cache .. "cmp")() vim.o.completeopt = "menu,menuone,noselect" +local cmp_ui = require("core.utils").load_config().ui.cmp +local cmp_style = cmp_ui.style + +local field_arrangement = { + atom = { "kind", "abbr", "menu" }, + atom_colored = { "kind", "abbr", "menu" }, +} + +local formatting_style = { + -- default fields order i.e completion word + item.kind + item.kind icons + fields = field_arrangement[cmp_style] or { "abbr", "kind", "menu" }, + + format = function(_, item) + local icons = require("nvchad_ui.icons").lspkind + local icon = (cmp_ui.icons and icons[item.kind]) or "" + + if cmp_style == "atom" or cmp_style == "atom_colored" then + icon = " " .. icon .. " " + item.menu = cmp_ui.lspkind_text and " (" .. item.kind .. ")" or "" + item.kind = icon + else + icon = cmp_ui.lspkind_text and (" " .. icon .. " ") or icon + item.kind = string.format("%s %s", icon, cmp_ui.lspkind_text and item.kind or "") + end + + return item + end, +} + local function border(hl_name) return { { "╭", hl_name }, @@ -33,11 +62,12 @@ end local options = { window = { completion = { - border = border "CmpBorder", - winhighlight = "Normal:CmpPmenu,CursorLine:PmenuSel,Search:None", + side_padding = (cmp_style ~= "atom" and cmp_style ~= "atom_colored") and 1 or 0, + winhighlight = "Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel", }, documentation = { border = border "CmpDocBorder", + winhighlight = "Normal:CmpDoc", }, }, snippet = { @@ -45,13 +75,9 @@ local options = { require("luasnip").lsp_expand(args.body) end, }, - formatting = { - format = function(_, vim_item) - local icons = require("nvchad_ui.icons").lspkind - vim_item.kind = string.format("%s %s", icons[vim_item.kind], vim_item.kind) - return vim_item - end, - }, + + formatting = formatting_style, + mapping = { [""] = cmp.mapping.select_prev_item(), [""] = cmp.mapping.select_next_item(), @@ -97,6 +123,10 @@ local options = { }, } +if cmp_style ~= "atom" and cmp_style ~= "atom_colored" then + options.window.completion.border = border "CmpBorder" +end + -- check for any override options = require("core.utils").load_override(options, "hrsh7th/nvim-cmp") From ce9388d13dff22901fbf2ce8696ab7e298a117e5 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 22 Nov 2022 08:29:48 +0530 Subject: [PATCH 1307/1541] load bg file (containing vim.opt.bg value) --- init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.lua b/init.lua index b042390..fa5761c 100644 --- a/init.lua +++ b/init.lua @@ -5,6 +5,10 @@ end, 0) require "core" require "core.options" +pcall(function() + loadfile(vim.g.base46_cache .. "bg")() +end) + -- setup packer + plugins local fn = vim.fn local install_path = fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim" From 40130ce7412c6f9a27f74a7f2daf06f3d0b5c20f Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 24 Nov 2022 20:41:53 +0530 Subject: [PATCH 1308/1541] rm outdated nvchad_ui setup call --- lua/plugins/init.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 275cbc8..07d1199 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -39,11 +39,7 @@ local plugins = { after = "base46", branch = "dev", config = function() - local present, nvchad_ui = pcall(require, "nvchad_ui") - - if present then - nvchad_ui.setup() - end + pcall(require, "nvchad_ui") end, }, From 32b111b8e20cc9bf1ba91bf6d649d94b20b3c2cc Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 25 Nov 2022 10:49:15 +0530 Subject: [PATCH 1309/1541] add statusline theme option --- lua/core/default_config.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 24c6592..a020925 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -32,6 +32,7 @@ M.ui = { ------------------------------- nvchad_ui modules ----------------------------- statusline = { + theme = "default", separator_style = "default", -- default/round/block/arrow overriden_modules = nil, }, From 1a4936ab26db325ae71cd6c054d07cacbaabc124 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 27 Nov 2022 09:23:17 +0530 Subject: [PATCH 1310/1541] add new dir icons for nvimtree --- lua/plugins/configs/nvimtree.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index abe0863..b42e4ff 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -61,17 +61,17 @@ local options = { folder = { default = "", empty = "", - empty_open = "", - open = "", + empty_open = "", + open = "", symlink = "", - symlink_open = "", + symlink_open = "", arrow_open = "", arrow_closed = "", }, git = { unstaged = "✗", staged = "✓", - unmerged = "", + unmerged = "", renamed = "➜", untracked = "★", deleted = "", From c55dea95933081e0ecc234e898920e32b42c204c Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 27 Nov 2022 19:00:36 +0530 Subject: [PATCH 1311/1541] add helper comments for statusline options --- lua/core/default_config.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index a020925..120b01b 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -32,8 +32,10 @@ M.ui = { ------------------------------- nvchad_ui modules ----------------------------- statusline = { - theme = "default", - separator_style = "default", -- default/round/block/arrow + theme = "default", -- default/vscode/vscode_colored/minimal + -- default/round/block/arrow separators work only for default statusline theme + -- round and block will work for minimal theme only + separator_style = "default", overriden_modules = nil, }, From d1e6b664e198ead99b8d0b4802d48b98f8bd2e25 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 3 Dec 2022 10:10:07 +0530 Subject: [PATCH 1312/1541] set base46 as opt plugin since we are now just using this plugin for compiling nvchad themes, we dont need this at startup --- lua/plugins/configs/nvimtree.lua | 4 ++-- lua/plugins/init.lua | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index b42e4ff..31d7273 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -22,9 +22,9 @@ local options = { update_cwd = false, }, view = { - adaptive_size = true, + adaptive_size = false, side = "left", - width = 25, + width = 30, hide_root_folder = true, }, git = { diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 07d1199..be035d3 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -27,16 +27,11 @@ local plugins = { ["NvChad/extensions"] = { module = { "telescope", "nvchad" } }, ["NvChad/base46"] = { + module = "base46", branch = "dev", - config = function() - pcall(function() - loadfile(vim.g.base46_cache .. "defaults")() - end) - end, }, ["NvChad/ui"] = { - after = "base46", branch = "dev", config = function() pcall(require, "nvchad_ui") From 8db69224baa577308ecbe7ae2245235f09c837c7 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 3 Dec 2022 10:31:44 +0530 Subject: [PATCH 1313/1541] use lua api to set commands --- init.lua | 3 +++ lua/core/init.lua | 36 +++++++++++++++++++++++++----------- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index fa5761c..a0d3b24 100644 --- a/init.lua +++ b/init.lua @@ -34,6 +34,9 @@ if fn.empty(fn.glob(install_path)) > 0 then vim.cmd "bw | silent! MasonInstallAll" -- close packer window require("packer").loader "nvim-treesitter" + + local statusline_theme = require("core.utils").load_config().ui.statusline.theme + vim.opt.statusline = "%!v:lua.require('nvchad_ui.statusline." .. statusline_theme .. "').run()" end, }) end diff --git a/lua/core/init.lua b/lua/core/init.lua index 7d1fb4d..3067cc2 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -2,11 +2,31 @@ local is_windows = vim.loop.os_uname().sysname == "Windows_NT" vim.env.PATH = vim.env.PATH .. (is_windows and ";" or ":") .. vim.fn.stdpath "data" .. "/mason/bin" --- commands -vim.cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" -vim.cmd "silent! command! NvChadSnapshotCreate lua require('nvchad').snap_create()" -vim.cmd "silent! command! NvChadSnapshotDelete lua require('nvchad').snap_delete()" -vim.cmd "silent! command! NvChadSnapshotCheckout lua require('nvchad').snap_checkout()" +local new_cmd = vim.api.nvim_create_user_command + +new_cmd("CompileNvTheme", function() + require("base46").load_all_highlights() +end, {}) + +new_cmd("NvChadUpdate", function() + require("nvchad").update_nvchad() +end, {}) + +new_cmd("NvChadSnapshotCreate", function() + require("nvchad").snap_create() +end, {}) + +new_cmd("NvChadSnapshotDelete", function() + require("nvchad").snap_delete() +end, {}) + +new_cmd("NvChadSnapshotCheckout", function() + require("nvchad").snap_checkout() +end, {}) + +new_cmd("NvChadUpdate", function() + require("nvchad").update_nvchad() +end, {}) -- autocmds local autocmd = vim.api.nvim_create_autocmd @@ -25,9 +45,3 @@ autocmd("VimEnter", { vim.cmd "command! -nargs=* -complete=customlist,v:lua.require'packer'.plugin_complete PackerSync lua require('plugins') require('core.utils').packer_sync()" end, }) - -local new_cmd = vim.api.nvim_create_user_command - -new_cmd("CompileNvTheme", function() - require("base46").load_all_highlights() -end, {}) From 77a6c22fcace230ac6e5d239df80448ed8f3dcaa Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 3 Dec 2022 11:17:27 +0530 Subject: [PATCH 1314/1541] use lua api for packersync wrapper --- lua/core/init.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 3067cc2..12bbce6 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -42,6 +42,13 @@ autocmd("FileType", { -- wrap the PackerSync command to warn people before using it in NvChadSnapshots autocmd("VimEnter", { callback = function() - vim.cmd "command! -nargs=* -complete=customlist,v:lua.require'packer'.plugin_complete PackerSync lua require('plugins') require('core.utils').packer_sync()" + vim.api.nvim_create_user_command("PackerSync", function(opts) + require "plugins" + require("core.utils").packer_sync(opts.fargs) + end, { + bang = true, + nargs = "*", + complete = require("packer").plugin_complete, + }) end, }) From 5ea340171cf8fc17d853702d521acb72de9373bb Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 7 Dec 2022 05:59:17 +0530 Subject: [PATCH 1315/1541] use dev branch of extensions repo --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index be035d3..78db45b 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -24,7 +24,7 @@ local plugins = { end, }, - ["NvChad/extensions"] = { module = { "telescope", "nvchad" } }, + ["NvChad/extensions"] = { branch = "dev", module = { "telescope", "nvchad" } }, ["NvChad/base46"] = { module = "base46", From 40c180d3b2f0b258ed1f8a8776854f5b84815acc Mon Sep 17 00:00:00 2001 From: SHA-5010 <95682647+sha5010@users.noreply.github.com> Date: Mon, 12 Dec 2022 23:46:41 +0900 Subject: [PATCH 1316/1541] config(cmp): simplify disabling scrollbar --- lua/plugins/configs/cmp.lua | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 2a7312d..917dacf 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -50,20 +50,12 @@ local function border(hl_name) } end -local cmp_window = require "cmp.utils.window" - -cmp_window.info_ = cmp_window.info -cmp_window.info = function(self) - local info = self:info_() - info.scrollable = false - return info -end - local options = { window = { completion = { side_padding = (cmp_style ~= "atom" and cmp_style ~= "atom_colored") and 1 or 0, winhighlight = "Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel", + scrollbar = false, }, documentation = { border = border "CmpDocBorder", From 78b2cc3106677be8018a550c1de8acb0edfeacef Mon Sep 17 00:00:00 2001 From: Matt <0tlzomwse@mozmail.com> Date: Tue, 6 Dec 2022 15:31:42 +0700 Subject: [PATCH 1317/1541] ensure errors arent silently swallowed in custom chadrc if exists --- lua/core/utils.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index fe2cfaa..87eea50 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -3,9 +3,12 @@ local merge_tb = vim.tbl_deep_extend M.load_config = function() local config = require "core.default_config" - local chadrc_exists, chadrc = pcall(require, "custom.chadrc") + + -- nvim_get_runtime_file always uses forward slashes regardless of platform + local chadrc_exists = vim.api.nvim_get_runtime_file('lua/custom/chadrc.lua', false)[1] if chadrc_exists then + local chadrc = require "custom.chadrc" -- merge user config if it exists and is a table; otherwise display an error if type(chadrc) == "table" then config.mappings = M.remove_disabled_keys(chadrc.mappings, config.mappings) From bdd142dbd604183bc8ed93b903ff967b74d9f0b9 Mon Sep 17 00:00:00 2001 From: Sidhanth Rathod Date: Sat, 17 Dec 2022 16:55:30 +0530 Subject: [PATCH 1318/1541] clean load_config function based on @ii14 's comment https://github.com/NvChad/NvChad/pull/1704#discussion_r1040655958 --- lua/core/utils.lua | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 87eea50..d6d9a5b 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -4,18 +4,13 @@ local merge_tb = vim.tbl_deep_extend M.load_config = function() local config = require "core.default_config" - -- nvim_get_runtime_file always uses forward slashes regardless of platform - local chadrc_exists = vim.api.nvim_get_runtime_file('lua/custom/chadrc.lua', false)[1] + local chadrc_path = vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1] - if chadrc_exists then - local chadrc = require "custom.chadrc" - -- merge user config if it exists and is a table; otherwise display an error - if type(chadrc) == "table" then - config.mappings = M.remove_disabled_keys(chadrc.mappings, config.mappings) - config = merge_tb("force", config, chadrc) or {} - else - error "chadrc must return a table!" - end + if chadrc_path then + local chadrc = dofile(chadrc_path) + + config.mappings = M.remove_disabled_keys(chadrc.mappings, config.mappings) + config = merge_tb("force", config, chadrc) end config.mappings.disabled = nil From 8babf12991a2baaf6178f56467dfc6b141f4b846 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 17 Dec 2022 17:04:52 +0530 Subject: [PATCH 1319/1541] avoid swallowing custom/init.lua errors by pcall --- init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index a0d3b24..3ee09a5 100644 --- a/init.lua +++ b/init.lua @@ -41,6 +41,10 @@ if fn.empty(fn.glob(install_path)) > 0 then }) end -pcall(require, "custom") +local custom_init_path = vim.api.nvim_get_runtime_file("lua/custom/init.lua", false)[1] + +if custom_init_path then + dofile(custom_init_path) +end require("core.utils").load_mappings() From 4c3eafbc2003ed865853f1f4a342b29eda95fba0 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 19 Dec 2022 22:32:29 +0530 Subject: [PATCH 1320/1541] add option for cheatsheet theme and add description for some mappings --- lua/core/default_config.lua | 4 ++++ lua/core/mappings.lua | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 120b01b..131fa54 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -70,6 +70,10 @@ M.ui = { { " Themes", "Spc t f", "Telescope themes" }, }, }, + + cheatsheet = { + theme = "grid", -- simple/grid + }, } M.plugins = {} diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index c98805f..2b52096 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -64,16 +64,16 @@ M.general = { t = { [""] = { termcodes "", "escape terminal mode" } }, v = { - [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, - [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move up", opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move down", opts = { expr = true } }, }, x = { - ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, - ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move left", opts = { expr = true } }, + ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move down", opts = { expr = true } }, -- Don't copy the replaced text after pasting in visual mode -- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste - ["p"] = { 'p:let @+=@0:let @"=@0', opts = { silent = true } }, + ["p"] = { 'p:let @+=@0:let @"=@0', "dont copy replaced text", opts = { silent = true } }, }, } From 9bd303feeeb58dff030ec66d9183e45a5b79b696 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 21 Dec 2022 00:25:25 +0530 Subject: [PATCH 1321/1541] rm mappings for navigating within insert mode describes the issue with it https://github.com/NvChad/NvChad/issues/1294#issuecomment-1359897212 --- lua/core/mappings.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 2b52096..26961bb 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -11,12 +11,6 @@ M.general = { -- go to beginning and end [""] = { "^i", "beginning of line" }, [""] = { "", "end of line" }, - - -- navigate within insert mode - [""] = { "", "move left" }, - [""] = { "", "move right" }, - [""] = { "", "move down" }, - [""] = { "", "move up" }, }, n = { From a2540ef183b7eeac0072873f6b5c67f9406af765 Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Fri, 23 Dec 2022 19:29:25 +0900 Subject: [PATCH 1322/1541] Fix mkdir on windows --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 3ee09a5..5f78b57 100644 --- a/init.lua +++ b/init.lua @@ -18,7 +18,7 @@ if fn.empty(fn.glob(install_path)) > 0 then print "Cloning packer .." fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } - os.execute("mkdir -p " .. vim.g.base46_cache) + vim.fn.mkdir(vim.g.base46_cache, "p") -- install plugins + compile their configs vim.cmd "packadd packer.nvim" From 54280a3e2a6fc1ed490b3dcdf313fda9347a359f Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 24 Dec 2022 22:33:33 +0530 Subject: [PATCH 1323/1541] add function to install chadrc tempalte during bootstrap --- init.lua | 26 +--------------------- lua/core/bootstrap.lua | 49 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 25 deletions(-) create mode 100644 lua/core/bootstrap.lua diff --git a/init.lua b/init.lua index 5f78b57..80dc54f 100644 --- a/init.lua +++ b/init.lua @@ -14,31 +14,7 @@ local fn = vim.fn local install_path = fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim" if fn.empty(fn.glob(install_path)) > 0 then - vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" }) - print "Cloning packer .." - fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } - - vim.fn.mkdir(vim.g.base46_cache, "p") - - -- install plugins + compile their configs - vim.cmd "packadd packer.nvim" - - require "plugins" - vim.cmd "PackerSync" - - -- install binaries from mason.nvim & tsparsers - vim.api.nvim_create_autocmd("User", { - pattern = "PackerComplete", - callback = function() - require("base46").load_all_highlights() - - vim.cmd "bw | silent! MasonInstallAll" -- close packer window - require("packer").loader "nvim-treesitter" - - local statusline_theme = require("core.utils").load_config().ui.statusline.theme - vim.opt.statusline = "%!v:lua.require('nvchad_ui.statusline." .. statusline_theme .. "').run()" - end, - }) + require("core.bootstrap").packer(install_path) end local custom_init_path = vim.api.nvim_get_runtime_file("lua/custom/init.lua", false)[1] diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua new file mode 100644 index 0000000..8800ab9 --- /dev/null +++ b/lua/core/bootstrap.lua @@ -0,0 +1,49 @@ +local M = {} + +vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" }) + +M.packer = function(install_path) + print "Cloning packer .." + vim.fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } + + vim.fn.mkdir(vim.g.base46_cache, "p") + + -- install plugins + compile their configs + vim.cmd "packadd packer.nvim" + require "plugins" + vim.cmd "PackerSync" +end + +M.install_template = function() + if not vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1] then + local input = vim.fn.input "Do you want to install chadrc template? (y/n) : " + + if input == "y" then + -- clone example_config repo + local example_config_url = "https://github.com/NvChad/example_config" + print "cloning chadrc starter template repo...." + vim.fn.system { "git", "clone", "--depth", "1", example_config_url, vim.fn.stdpath "config" .. "/lua/custom" } + + -- delete .git from that repo + vim.loop.fs_rmdir(vim.fn.stdpath "config" .. "/lua/custom/.git") + vim.notify "successfully installed chadrc template!" + end + end +end + +-- install binaries from mason.nvim & tsparsers on PackerComplete +vim.api.nvim_create_autocmd("User", { + pattern = "PackerComplete", + callback = function() + M.install_template() + require("base46").load_all_highlights() + + vim.cmd "bw | silent! MasonInstallAll" -- close packer window + require("packer").loader "nvim-treesitter" + + local statusline_theme = require("core.utils").load_config().ui.statusline.theme + vim.opt.statusline = "%!v:lua.require('nvchad_ui.statusline." .. statusline_theme .. "').run()" + end, +}) + +return M From ddeba3c01b26f5aa38773eeb3515cd8fc8c9e746 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 24 Dec 2022 23:44:00 +0530 Subject: [PATCH 1324/1541] bootstrap chadrc template before packer boostrap --- init.lua | 1 + lua/core/bootstrap.lua | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 80dc54f..9ef65d8 100644 --- a/init.lua +++ b/init.lua @@ -14,6 +14,7 @@ local fn = vim.fn local install_path = fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim" if fn.empty(fn.glob(install_path)) > 0 then + require("core.bootstrap").chadrc_template() require("core.bootstrap").packer(install_path) end diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index 8800ab9..8502f4b 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -14,19 +14,22 @@ M.packer = function(install_path) vim.cmd "PackerSync" end -M.install_template = function() +M.chadrc_template = function() if not vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1] then local input = vim.fn.input "Do you want to install chadrc template? (y/n) : " + vim.cmd "redraw|echo ''" if input == "y" then -- clone example_config repo local example_config_url = "https://github.com/NvChad/example_config" print "cloning chadrc starter template repo...." vim.fn.system { "git", "clone", "--depth", "1", example_config_url, vim.fn.stdpath "config" .. "/lua/custom" } + vim.cmd "redraw|echo ''" -- delete .git from that repo vim.loop.fs_rmdir(vim.fn.stdpath "config" .. "/lua/custom/.git") vim.notify "successfully installed chadrc template!" + vim.cmd "redraw|echo ''" end end end @@ -35,7 +38,6 @@ end vim.api.nvim_create_autocmd("User", { pattern = "PackerComplete", callback = function() - M.install_template() require("base46").load_all_highlights() vim.cmd "bw | silent! MasonInstallAll" -- close packer window From ae68290e1fd6a62588db83c3ba670e6a86d54408 Mon Sep 17 00:00:00 2001 From: Pham Huy Hoang Date: Mon, 2 Jan 2023 12:15:31 +0900 Subject: [PATCH 1325/1541] Move friendly-snippets to start There is no reason to lazy load this plugin as there is no lua file Move it to start to simply loading sequence --- lua/plugins/init.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 78db45b..d25a583 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -133,20 +133,17 @@ local plugins = { -- load luasnips + cmp related in insert mode only - ["rafamadriz/friendly-snippets"] = { - module = { "cmp", "cmp_nvim_lsp" }, - event = "InsertEnter", - }, + ["rafamadriz/friendly-snippets"] = { }, ["hrsh7th/nvim-cmp"] = { - after = "friendly-snippets", + event = "InsertEnter", config = function() require "plugins.configs.cmp" end, }, ["L3MON4D3/LuaSnip"] = { - wants = "friendly-snippets", + requires = "friendly-snippets", after = "nvim-cmp", config = function() require("plugins.configs.others").luasnip() From 5db2f0978dbc9eca34f382c5a371d9184e6622a7 Mon Sep 17 00:00:00 2001 From: Pham Huy Hoang Date: Thu, 5 Jan 2023 12:21:17 +0900 Subject: [PATCH 1326/1541] update nvim-cmp loading strategy --- lua/plugins/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index d25a583..c82316c 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -136,7 +136,8 @@ local plugins = { ["rafamadriz/friendly-snippets"] = { }, ["hrsh7th/nvim-cmp"] = { - event = "InsertEnter", + module = { "cmp", "cmp_nvim_lsp" }, + event = { "InsertEnter", "CmdlineEnter" }, -- for users that may use nvim-cmp-cmdline config = function() require "plugins.configs.cmp" end, From 1b8eff75164a8e8c96701fb9739e44ed22f69c6b Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 7 Jan 2023 13:41:43 +0530 Subject: [PATCH 1327/1541] migrate to lazy.nvim --- .gitignore | 1 + init.lua | 34 ++++--- lua/core/bootstrap.lua | 43 +++++---- lua/core/init.lua | 14 --- lua/core/mappings.lua | 6 ++ lua/core/options.lua | 34 ------- lua/core/utils.lua | 46 ++-------- lua/plugins/configs/lazy_nvim.lua | 70 +++++++++++++++ lua/plugins/configs/mason.lua | 9 +- lua/plugins/configs/others.lua | 21 +---- lua/plugins/init.lua | 142 ++++++++++++------------------ 11 files changed, 176 insertions(+), 244 deletions(-) create mode 100644 lua/plugins/configs/lazy_nvim.lua diff --git a/.gitignore b/.gitignore index 2de440a..c022b3f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ spell ftplugin coc-settings.json .luarc.json +lazy-lock.json diff --git a/init.lua b/init.lua index 9ef65d8..2eb6ae1 100644 --- a/init.lua +++ b/init.lua @@ -1,22 +1,6 @@ -vim.defer_fn(function() - pcall(require, "impatient") -end, 0) - require "core" require "core.options" - -pcall(function() - loadfile(vim.g.base46_cache .. "bg")() -end) - --- setup packer + plugins -local fn = vim.fn -local install_path = fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim" - -if fn.empty(fn.glob(install_path)) > 0 then - require("core.bootstrap").chadrc_template() - require("core.bootstrap").packer(install_path) -end +require("core.utils").load_mappings() local custom_init_path = vim.api.nvim_get_runtime_file("lua/custom/init.lua", false)[1] @@ -24,4 +8,18 @@ if custom_init_path then dofile(custom_init_path) end -require("core.utils").load_mappings() +-- bootstrap lazy.nvim! +local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" + +if not vim.loop.fs_stat(lazypath) then + require("core.bootstrap").gen_chadrc_template() + require("core.bootstrap").lazy(lazypath) +end + +vim.opt.rtp:prepend(lazypath) +require "plugins" + +-- load compiled base46 themes +loadfile(vim.g.base46_cache .. "bg")() +loadfile(vim.g.base46_cache .. "defaults")() +loadfile(vim.g.base46_cache .. "statusline")() diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index 8502f4b..83bbec3 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -1,20 +1,33 @@ local M = {} -vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" }) +M.lazy = function(install_path) + print "Bootstrapping lazy.nvim .." -M.packer = function(install_path) - print "Cloning packer .." - vim.fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } + vim.fn.system { + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + install_path, + } - vim.fn.mkdir(vim.g.base46_cache, "p") + vim.opt.rtp:prepend(install_path) -- install plugins + compile their configs - vim.cmd "packadd packer.nvim" require "plugins" - vim.cmd "PackerSync" + + vim.fn.mkdir(vim.g.base46_cache, "p") + vim.cmd "CompileNvTheme" + require("lazy").load { plugins = "nvim-treesitter" } + + -- install binaries from mason.nvim & tsparsers on LazySync + vim.schedule(function() + vim.cmd "bw | silent! MasonInstallAll" -- close lazy window + end, 0) end -M.chadrc_template = function() +M.gen_chadrc_template = function() if not vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1] then local input = vim.fn.input "Do you want to install chadrc template? (y/n) : " vim.cmd "redraw|echo ''" @@ -34,18 +47,4 @@ M.chadrc_template = function() end end --- install binaries from mason.nvim & tsparsers on PackerComplete -vim.api.nvim_create_autocmd("User", { - pattern = "PackerComplete", - callback = function() - require("base46").load_all_highlights() - - vim.cmd "bw | silent! MasonInstallAll" -- close packer window - require("packer").loader "nvim-treesitter" - - local statusline_theme = require("core.utils").load_config().ui.statusline.theme - vim.opt.statusline = "%!v:lua.require('nvchad_ui.statusline." .. statusline_theme .. "').run()" - end, -}) - return M diff --git a/lua/core/init.lua b/lua/core/init.lua index 12bbce6..315675c 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -38,17 +38,3 @@ autocmd("FileType", { vim.opt_local.buflisted = false end, }) - --- wrap the PackerSync command to warn people before using it in NvChadSnapshots -autocmd("VimEnter", { - callback = function() - vim.api.nvim_create_user_command("PackerSync", function(opts) - require "plugins" - require("core.utils").packer_sync(opts.fargs) - end, { - bang = true, - nargs = "*", - complete = require("packer").plugin_complete, - }) - end, -}) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 26961bb..2b52096 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -11,6 +11,12 @@ M.general = { -- go to beginning and end [""] = { "^i", "beginning of line" }, [""] = { "", "end of line" }, + + -- navigate within insert mode + [""] = { "", "move left" }, + [""] = { "", "move right" }, + [""] = { "", "move down" }, + [""] = { "", "move up" }, }, n = { diff --git a/lua/core/options.lua b/lua/core/options.lua index 1731054..b262013 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -49,40 +49,6 @@ opt.whichwrap:append "<>[]hl" g.mapleader = " " --- disable some builtin vim plugins -local default_plugins = { - "2html_plugin", - "getscript", - "getscriptPlugin", - "gzip", - "logipat", - "netrw", - "netrwPlugin", - "netrwSettings", - "netrwFileHandlers", - "matchit", - "tar", - "tarPlugin", - "rrhelper", - "spellfile_plugin", - "vimball", - "vimballPlugin", - "zip", - "zipPlugin", - "tutor", - "rplugin", - "syntax", - "synmenu", - "optwin", - "compiler", - "bugreport", - "ftplugin", -} - -for _, plugin in pairs(default_plugins) do - g["loaded_" .. plugin] = 1 -end - local default_providers = { "node", "perl", diff --git a/lua/core/utils.lua b/lua/core/utils.lua index d6d9a5b..b9f70ae 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -116,49 +116,12 @@ M.load_override = function(options_table, name) return merge_tb("force", options_table, plugin_options) end -M.packer_sync = function(...) - local git_exists, git = pcall(require, "nvchad.utils.git") - local defaults_exists, defaults = pcall(require, "nvchad.utils.config") - local packer_exists, packer = pcall(require, "packer") - - if git_exists and defaults_exists then - local current_branch_name = git.get_current_branch_name() - - -- warn the user if we are on a snapshot branch - if current_branch_name:match(defaults.snaps.base_snap_branch_name .. "(.+)" .. "$") then - vim.api.nvim_echo({ - { "WARNING: You are trying to use ", "WarningMsg" }, - { "PackerSync" }, - { - " on a NvChadSnapshot. This will cause issues if NvChad dependencies contain " - .. "any breaking changes! Plugin updates will not be included in this " - .. "snapshot, so they will be lost after switching between snapshots! Would " - .. "you still like to continue? [y/N]\n", - "WarningMsg", - }, - }, false, {}) - - local ans = vim.trim(string.lower(vim.fn.input "-> ")) - - if ans ~= "y" then - return - end - end - end - - if packer_exists then - packer.sync(...) - else - error "Packer could not be loaded!" - end -end - M.lazy_load = function(plugin) vim.api.nvim_create_autocmd({ "BufRead", "BufWinEnter", "BufNewFile" }, { group = vim.api.nvim_create_augroup("BeLazyOnFileOpen" .. plugin, {}), callback = function() local file = vim.fn.expand "%" - local condition = file ~= "NvimTree_1" and file ~= "[packer]" and file ~= "" + local condition = file ~= "NvimTree_1" and file ~= "[lazy]" and file ~= "" if condition then vim.api.nvim_del_augroup_by_name("BeLazyOnFileOpen" .. plugin) @@ -166,14 +129,15 @@ M.lazy_load = function(plugin) -- dont defer for treesitter as it will show slow highlighting -- This deferring only happens only when we do "nvim filename" if plugin ~= "nvim-treesitter" then - vim.defer_fn(function() - require("packer").loader(plugin) + vim.schedule(function() + require("lazy").load { plugins = plugin } + if plugin == "nvim-lspconfig" then vim.cmd "silent! do FileType" end end, 0) else - require("packer").loader(plugin) + require("lazy").load { plugins = plugin } end end end, diff --git a/lua/plugins/configs/lazy_nvim.lua b/lua/plugins/configs/lazy_nvim.lua new file mode 100644 index 0000000..c7efe3a --- /dev/null +++ b/lua/plugins/configs/lazy_nvim.lua @@ -0,0 +1,70 @@ +return { + defaults = { + lazy = true, + }, + + install = { + -- try to load one of these colorschemes when starting an installation during startup + colorscheme = { "nvchad" }, + }, + + ui = { + icons = { + cmd = " ", + config = "", + event = "", + ft = " ", + init = " ", + import = " ", + keys = " ", + lazy = "鈴 ", + loaded = "", + not_loaded = "", + plugin = " ", + runtime = " ", + source = " ", + start = "", + task = "✔ ", + list = { + "●", + "➜", + "★", + "‒", + }, + }, + }, + + performance = { + rtp = { + disabled_plugins = { + "2html_plugin", + "tohtml", + "getscript", + "getscriptPlugin", + "gzip", + "logipat", + "netrw", + "netrwPlugin", + "netrwSettings", + "netrwFileHandlers", + "matchit", + "tar", + "tarPlugin", + "rrhelper", + "spellfile_plugin", + "vimball", + "vimballPlugin", + "zip", + "zipPlugin", + "tutor", + "rplugin", + "syntax", + "synmenu", + "optwin", + "compiler", + "bugreport", + "ftplugin", + }, + }, + }, +} diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua index 56e378b..9dd8559 100644 --- a/lua/plugins/configs/mason.lua +++ b/lua/plugins/configs/mason.lua @@ -4,14 +4,7 @@ if not present then return end -vim.api.nvim_create_augroup("_mason", { clear = true }) -vim.api.nvim_create_autocmd("Filetype", { - pattern = "mason", - callback = function() - loadfile(vim.g.base46_cache .. "mason")() - end, - group = "_mason", -}) +loadfile(vim.g.base46_cache .. "mason")() local options = { ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 82dc9cf..8c41d7c 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -37,7 +37,7 @@ M.blankline = function() filetype_exclude = { "help", "terminal", - "packer", + "lazy", "lspinfo", "TelescopePrompt", "TelescopeResults", @@ -76,6 +76,7 @@ M.colorizer = function() css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn mode = "background", -- Set the display mode. + tailwind = true, -- Enable tailwind colors }, } @@ -168,22 +169,4 @@ M.devicons = function() end end -M.packer_init = function() - return { - auto_clean = true, - compile_on_sync = true, - git = { clone_timeout = 6000 }, - display = { - working_sym = "ﲊ", - error_sym = "✗ ", - done_sym = " ", - removed_sym = " ", - moved_sym = "", - open_fn = function() - return require("packer.util").float { border = "single" } - end, - }, - } -end - return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index c82316c..5458354 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,64 +1,40 @@ +-- All plugins have lazy=true by default,to load a plugin on startup just lazy=false -- List of all default plugins & their definitions local plugins = { - ["nvim-lua/plenary.nvim"] = { module = "plenary" }, + ["nvim-lua/plenary.nvim"] = {}, - ["lewis6991/impatient.nvim"] = {}, - - ["wbthomason/packer.nvim"] = { - cmd = { - "PackerSnapshot", - "PackerSnapshotRollback", - "PackerSnapshotDelete", - "PackerInstall", - "PackerUpdate", - "PackerSync", - "PackerClean", - "PackerCompile", - "PackerStatus", - "PackerProfile", - "PackerLoad", - }, - config = function() - require "plugins" - end, - }, - - ["NvChad/extensions"] = { branch = "dev", module = { "telescope", "nvchad" } }, + ["NvChad/extensions"] = { branch = "lazy" }, ["NvChad/base46"] = { - module = "base46", - branch = "dev", + branch = "lazy", }, ["NvChad/ui"] = { - branch = "dev", + branch = "lazy", + lazy = false, config = function() - pcall(require, "nvchad_ui") + require "nvchad_ui" end, }, ["NvChad/nvterm"] = { - module = "nvterm", config = function() require "plugins.configs.nvterm" end, - setup = function() + init = function() require("core.utils").load_mappings "nvterm" end, }, ["kyazdani42/nvim-web-devicons"] = { - after = "ui", - module = "nvim-web-devicons", config = function() require("plugins.configs.others").devicons() end, }, ["lukas-reineke/indent-blankline.nvim"] = { - opt = true, - setup = function() + init = function() require("core.utils").lazy_load "indent-blankline.nvim" require("core.utils").load_mappings "blankline" end, @@ -68,8 +44,7 @@ local plugins = { }, ["NvChad/nvim-colorizer.lua"] = { - opt = true, - setup = function() + init = function() require("core.utils").lazy_load "nvim-colorizer.lua" end, config = function() @@ -78,12 +53,10 @@ local plugins = { }, ["nvim-treesitter/nvim-treesitter"] = { - module = "nvim-treesitter", - setup = function() + init = function() require("core.utils").lazy_load "nvim-treesitter" end, cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSEnable", "TSDisable", "TSModuleInfo" }, - run = ":TSUpdate", config = function() require "plugins.configs.treesitter" @@ -93,7 +66,7 @@ local plugins = { -- git stuff ["lewis6991/gitsigns.nvim"] = { ft = "gitcommit", - setup = function() + init = function() -- load gitsigns only when a git file is opened vim.api.nvim_create_autocmd({ "BufRead" }, { group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }), @@ -102,7 +75,7 @@ local plugins = { if vim.v.shell_error == 0 then vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad" vim.schedule(function() - require("packer").loader "gitsigns.nvim" + require("lazy").load { plugins = "gitsigns.nvim" } end) end end, @@ -122,8 +95,7 @@ local plugins = { }, ["neovim/nvim-lspconfig"] = { - opt = true, - setup = function() + init = function() require("core.utils").lazy_load "nvim-lspconfig" end, config = function() @@ -132,46 +104,47 @@ local plugins = { }, -- load luasnips + cmp related in insert mode only - - ["rafamadriz/friendly-snippets"] = { }, - ["hrsh7th/nvim-cmp"] = { - module = { "cmp", "cmp_nvim_lsp" }, - event = { "InsertEnter", "CmdlineEnter" }, -- for users that may use nvim-cmp-cmdline + event = "InsertEnter", + dependencies = { + { + -- snippet plugin + "L3MON4D3/LuaSnip", + dependencies = "rafamadriz/friendly-snippets", + config = function() + require("plugins.configs.others").luasnip() + end, + }, + + -- autopairing of (){}[] etc + { + "windwp/nvim-autopairs", + config = function() + require("plugins.configs.others").autopairs() + end, + }, + + -- cmp sources plugins + { + "saadparwaiz1/cmp_luasnip", + "hrsh7th/cmp-nvim-lua", + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + }, + }, + config = function() require "plugins.configs.cmp" end, }, - ["L3MON4D3/LuaSnip"] = { - requires = "friendly-snippets", - after = "nvim-cmp", - config = function() - require("plugins.configs.others").luasnip() - end, - }, - - ["saadparwaiz1/cmp_luasnip"] = { after = "LuaSnip" }, - ["hrsh7th/cmp-nvim-lua"] = { after = "cmp_luasnip" }, - ["hrsh7th/cmp-nvim-lsp"] = { after = "cmp-nvim-lua" }, - ["hrsh7th/cmp-buffer"] = { after = "cmp-nvim-lsp" }, - ["hrsh7th/cmp-path"] = { after = "cmp-buffer" }, - - -- misc plugins - ["windwp/nvim-autopairs"] = { - after = "nvim-cmp", - config = function() - require("plugins.configs.others").autopairs() - end, - }, - ["numToStr/Comment.nvim"] = { - module = "Comment", - keys = { "gc", "gb" }, + -- keys = { "gc", "gb" }, config = function() require("plugins.configs.others").comment() end, - setup = function() + init = function() require("core.utils").load_mappings "comment" end, }, @@ -182,7 +155,7 @@ local plugins = { config = function() require "plugins.configs.nvimtree" end, - setup = function() + init = function() require("core.utils").load_mappings "nvimtree" end, }, @@ -192,35 +165,28 @@ local plugins = { config = function() require "plugins.configs.telescope" end, - setup = function() + init = function() require("core.utils").load_mappings "telescope" end, }, -- Only load whichkey after all the gui ["folke/which-key.nvim"] = { - disable = true, - module = "which-key", + enabled = false, keys = { "", '"', "'", "`" }, config = function() require "plugins.configs.whichkey" end, - setup = function() + init = function() require("core.utils").load_mappings "whichkey" end, }, } -local present, packer = pcall(require, "packer") +plugins = require("core.utils").merge_plugins(plugins) -if present then - -- Override with default plugins with user ones - plugins = require("core.utils").merge_plugins(plugins) +-- load lazy.nvim options +local lazy_config = require "plugins.configs.lazy_nvim" +lazy_config = require("core.utils").load_override(lazy_config, "folke/lazy.nvim") - -- load packer init options - local init_options = require("plugins.configs.others").packer_init() - init_options = require("core.utils").load_override(init_options, "wbthomason/packer.nvim") - - packer.init(init_options) - packer.startup { plugins } -end +require("lazy").setup(plugins, lazy_config) From dc4674cad4b1c96fb2f9fd37258f28fe6dd716b3 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 7 Jan 2023 19:48:47 +0530 Subject: [PATCH 1328/1541] rm un-needed lazy.nvim config those are defaults so no need to add them --- lua/plugins/configs/lazy_nvim.lua | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/lua/plugins/configs/lazy_nvim.lua b/lua/plugins/configs/lazy_nvim.lua index c7efe3a..4e357fd 100644 --- a/lua/plugins/configs/lazy_nvim.lua +++ b/lua/plugins/configs/lazy_nvim.lua @@ -10,27 +10,10 @@ return { ui = { icons = { - cmd = " ", - config = "", - event = "", - ft = " ", - init = " ", - import = " ", - keys = " ", + ft = "", lazy = "鈴 ", loaded = "", not_loaded = "", - plugin = " ", - runtime = " ", - source = " ", - start = "", - task = "✔ ", - list = { - "●", - "➜", - "★", - "‒", - }, }, }, From 4378cb95326005b988ae7d18ce1dd9aa297c6f29 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 7 Jan 2023 20:05:25 +0530 Subject: [PATCH 1329/1541] update update_branch variable to lazy --- lua/core/default_config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 131fa54..435ee0a 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -5,7 +5,7 @@ local M = {} M.options = { nvChad = { update_url = "https://github.com/NvChad/NvChad", - update_branch = "dev", + update_branch = "lazy", }, } From 7cd80a35c6240a4098cac3ed2580f9386168b193 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 8 Jan 2023 07:40:00 +0530 Subject: [PATCH 1330/1541] include downloading of lazy-lock.json while bootstrapping also pin all plugins by default --- lua/core/bootstrap.lua | 8 ++++++++ lua/core/default_config.lua | 2 +- lua/plugins/init.lua | 11 ++++++++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index 83bbec3..f4a026e 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -1,6 +1,14 @@ local M = {} M.lazy = function(install_path) + print "Downloading lazy-lock.json file..." + + local config_branch = require("core.utils").load_config().options.nvChad.update_branch + + vim.cmd( + "!curl -o lazy-lock.json https://raw.githubusercontent.com/NvChad/extensions/lazy-lock/" .. config_branch .. ".json " + ) + print "Bootstrapping lazy.nvim .." vim.fn.system { diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 435ee0a..bd9e037 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -5,7 +5,7 @@ local M = {} M.options = { nvChad = { update_url = "https://github.com/NvChad/NvChad", - update_branch = "lazy", + update_branch = "v2.0", }, } diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 5458354..c2f4525 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -4,14 +4,14 @@ local plugins = { ["nvim-lua/plenary.nvim"] = {}, - ["NvChad/extensions"] = { branch = "lazy" }, + ["NvChad/extensions"] = { branch = "v2.0" }, ["NvChad/base46"] = { - branch = "lazy", + branch = "v2.0", }, ["NvChad/ui"] = { - branch = "lazy", + branch = "v2.0", lazy = false, config = function() require "nvchad_ui" @@ -183,6 +183,11 @@ local plugins = { }, } +-- pin commits for all default plugins +for _, value in pairs(plugins) do + value.pin = true +end + plugins = require("core.utils").merge_plugins(plugins) -- load lazy.nvim options From 7303bb29905c6141a1b5893ba391af5a2a43cd78 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 8 Jan 2023 07:51:37 +0530 Subject: [PATCH 1331/1541] avoid using vim.cmd! for running os commands --- lua/core/bootstrap.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index f4a026e..fac437e 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -4,10 +4,9 @@ M.lazy = function(install_path) print "Downloading lazy-lock.json file..." local config_branch = require("core.utils").load_config().options.nvChad.update_branch + local lazy_local_url = "https://raw.githubusercontent.com/NvChad/extensions/lazy-lock/" .. config_branch .. ".json " - vim.cmd( - "!curl -o lazy-lock.json https://raw.githubusercontent.com/NvChad/extensions/lazy-lock/" .. config_branch .. ".json " - ) + vim.fn.system { "curl", "-o", "lazy-lock.json", lazy_local_url } print "Bootstrapping lazy.nvim .." From c2946844f98ad4880fcaa30edf1e5d5b3b42e96a Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 8 Jan 2023 07:59:17 +0530 Subject: [PATCH 1332/1541] rm unneeded whitespace in lazy-lock url --- lua/core/bootstrap.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index fac437e..f5bd292 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -4,7 +4,7 @@ M.lazy = function(install_path) print "Downloading lazy-lock.json file..." local config_branch = require("core.utils").load_config().options.nvChad.update_branch - local lazy_local_url = "https://raw.githubusercontent.com/NvChad/extensions/lazy-lock/" .. config_branch .. ".json " + local lazy_local_url = "https://raw.githubusercontent.com/NvChad/extensions/lazy-lock/" .. config_branch .. ".json" vim.fn.system { "curl", "-o", "lazy-lock.json", lazy_local_url } From ed71dba5cce9ef0f9c92737f34dcd51e0e7413f2 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 8 Jan 2023 08:30:03 +0530 Subject: [PATCH 1333/1541] rm un-needed cmdefinitons --- lua/core/init.lua | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 315675c..0832728 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -12,22 +12,6 @@ new_cmd("NvChadUpdate", function() require("nvchad").update_nvchad() end, {}) -new_cmd("NvChadSnapshotCreate", function() - require("nvchad").snap_create() -end, {}) - -new_cmd("NvChadSnapshotDelete", function() - require("nvchad").snap_delete() -end, {}) - -new_cmd("NvChadSnapshotCheckout", function() - require("nvchad").snap_checkout() -end, {}) - -new_cmd("NvChadUpdate", function() - require("nvchad").update_nvchad() -end, {}) - -- autocmds local autocmd = vim.api.nvim_create_autocmd From ff93c22e637f9284ff498f1c48ae1ab7185fa65c Mon Sep 17 00:00:00 2001 From: anosillus Date: Tue, 17 Jan 2023 07:53:25 +0900 Subject: [PATCH 1334/1541] remove kyazdani42 repo --- lua/plugins/configs/nvimtree.lua | 2 +- lua/plugins/configs/others.lua | 2 +- lua/plugins/init.lua | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 31d7273..d589779 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -83,7 +83,7 @@ local options = { } -- check for any override -options = require("core.utils").load_override(options, "kyazdani42/nvim-tree.lua") +options = require("core.utils").load_override(options, "nvim-tree/nvim-tree.lua") vim.g.nvimtree_side = options.view.side nvimtree.setup(options) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 8c41d7c..5020397 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -163,7 +163,7 @@ M.devicons = function() loadfile(vim.g.base46_cache .. "devicons")() local options = { override = require("nvchad_ui.icons").devicons } - options = require("core.utils").load_override(options, "kyazdani42/nvim-web-devicons") + options = require("core.utils").load_override(options, "nvim-tree/nvim-web-devicons") devicons.setup(options) end diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index c2f4525..57a708d 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -27,7 +27,7 @@ local plugins = { end, }, - ["kyazdani42/nvim-web-devicons"] = { + ["nvim-tree/nvim-web-devicons"] = { config = function() require("plugins.configs.others").devicons() end, @@ -150,7 +150,7 @@ local plugins = { }, -- file managing , picker etc - ["kyazdani42/nvim-tree.lua"] = { + ["nvim-tree/nvim-tree.lua"] = { cmd = { "NvimTreeToggle", "NvimTreeFocus" }, config = function() require "plugins.configs.nvimtree" From 2b94bb92e0dc58e0d57e88ad95d26241c16d679b Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 25 Jan 2023 20:11:55 +0530 Subject: [PATCH 1335/1541] clean config & rm un-needed pcalls --- lua/plugins/configs/cmp.lua | 6 +-- lua/plugins/configs/lspconfig.lua | 8 +-- lua/plugins/configs/mason.lua | 8 +-- lua/plugins/configs/nvimtree.lua | 8 +-- lua/plugins/configs/nvterm.lua | 9 +--- lua/plugins/configs/others.lua | 87 ++++++------------------------ lua/plugins/configs/telescope.lua | 16 ++---- lua/plugins/configs/treesitter.lua | 8 +-- lua/plugins/configs/whichkey.lua | 8 +-- 9 files changed, 27 insertions(+), 131 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 917dacf..d428e72 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -1,8 +1,4 @@ -local present, cmp = pcall(require, "cmp") - -if not present then - return -end +local cmp = require "cmp" loadfile(vim.g.base46_cache .. "cmp")() diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 6496e94..9139c38 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,9 +1,3 @@ -local present, lspconfig = pcall(require, "lspconfig") - -if not present then - return -end - loadfile(vim.g.base46_cache .. "lsp")() require "nvchad_ui.lsp" @@ -43,7 +37,7 @@ M.capabilities.textDocument.completion.completionItem = { }, } -lspconfig.sumneko_lua.setup { +require("lspconfig").sumneko_lua.setup { on_attach = M.on_attach, capabilities = M.capabilities, diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua index 9dd8559..cff9b6d 100644 --- a/lua/plugins/configs/mason.lua +++ b/lua/plugins/configs/mason.lua @@ -1,9 +1,3 @@ -local present, mason = pcall(require, "mason") - -if not present then - return -end - loadfile(vim.g.base46_cache .. "mason")() local options = { @@ -39,4 +33,4 @@ vim.api.nvim_create_user_command("MasonInstallAll", function() vim.cmd("MasonInstall " .. table.concat(options.ensure_installed, " ")) end, {}) -mason.setup(options) +require("mason").setup(options) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index d589779..26563af 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -1,9 +1,3 @@ -local present, nvimtree = pcall(require, "nvim-tree") - -if not present then - return -end - loadfile(vim.g.base46_cache .. "nvimtree")() local options = { @@ -86,4 +80,4 @@ local options = { options = require("core.utils").load_override(options, "nvim-tree/nvim-tree.lua") vim.g.nvimtree_side = options.view.side -nvimtree.setup(options) +require("nvim-tree").setup(options) diff --git a/lua/plugins/configs/nvterm.lua b/lua/plugins/configs/nvterm.lua index 2c82e14..cdcaa59 100644 --- a/lua/plugins/configs/nvterm.lua +++ b/lua/plugins/configs/nvterm.lua @@ -1,9 +1,3 @@ -local present, nvterm = pcall(require, "nvterm") - -if not present then - return -end - require "base46.term" local options = { @@ -30,5 +24,4 @@ local options = { } options = require("core.utils").load_override(options, "NvChad/nvterm") - -nvterm.setup(options) +require("nvterm").setup(options) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 5020397..0155d41 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -4,32 +4,20 @@ local load_override = require("core.utils").load_override local utils = require "core.utils" M.autopairs = function() - local present1, autopairs = pcall(require, "nvim-autopairs") - local present2, cmp = pcall(require, "cmp") - - if not (present1 and present2) then - return - end - local options = { fast_wrap = {}, disable_filetype = { "TelescopePrompt", "vim" }, } options = load_override(options, "windwp/nvim-autopairs") - autopairs.setup(options) + require("nvim-autopairs").setup(options) + -- setup cmp for autopairs local cmp_autopairs = require "nvim-autopairs.completion.cmp" - cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) + require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done()) end M.blankline = function() - local present, blankline = pcall(require, "indent_blankline") - - if not present then - return - end - loadfile(vim.g.base46_cache .. "blankline")() local options = { @@ -52,36 +40,14 @@ M.blankline = function() } options = load_override(options, "lukas-reineke/indent-blankline.nvim") - blankline.setup(options) + require("indent_blankline").setup(options) end M.colorizer = function() - local present, colorizer = pcall(require, "colorizer") - - if not present then - return - end - - local options = { - filetypes = { - "*", - }, - user_default_options = { - RGB = true, -- #RGB hex codes - RRGGBB = true, -- #RRGGBB hex codes - names = false, -- "Name" codes like Blue - RRGGBBAA = false, -- #RRGGBBAA hex codes - rgb_fn = false, -- CSS rgb() and rgba() functions - hsl_fn = false, -- CSS hsl() and hsla() functions - css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB - css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn - mode = "background", -- Set the display mode. - tailwind = true, -- Enable tailwind colors - }, - } - + local options = {} options = load_override(options, "NvChad/nvim-colorizer.lua") - colorizer.setup(options) + require("colorizer").setup(options) + -- execute colorizer as soon as possible vim.defer_fn(function() require("colorizer").attach_to_buffer(0) @@ -89,31 +55,18 @@ M.colorizer = function() end M.comment = function() - local present, nvim_comment = pcall(require, "Comment") - - if not present then - return - end - - local options = {} - options = load_override(options, "numToStr/Comment.nvim") - nvim_comment.setup(options) + require("Comment").setup(load_override({}, "numToStr/Comment.nvim")) end M.luasnip = function() - local present, luasnip = pcall(require, "luasnip") - - if not present then - return - end - local options = { history = true, updateevents = "TextChanged,TextChangedI", } options = load_override(options, "L3MON4D3/LuaSnip") - luasnip.config.set_config(options) + require("luasnip").config.set_config(options) + require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.luasnippets_path or "" } require("luasnip.loaders.from_vscode").lazy_load() @@ -130,12 +83,6 @@ M.luasnip = function() end M.gitsigns = function() - local present, gitsigns = pcall(require, "gitsigns") - - if not present then - return - end - loadfile(vim.g.base46_cache .. "git")() local options = { @@ -153,20 +100,16 @@ M.gitsigns = function() } options = load_override(options, "lewis6991/gitsigns.nvim") - gitsigns.setup(options) + require("gitsigns").setup(options) end M.devicons = function() - local present, devicons = pcall(require, "nvim-web-devicons") + loadfile(vim.g.base46_cache .. "devicons")() - if present then - loadfile(vim.g.base46_cache .. "devicons")() + local options = { override = require("nvchad_ui.icons").devicons } + options = require("core.utils").load_override(options, "nvim-tree/nvim-web-devicons") - local options = { override = require("nvchad_ui.icons").devicons } - options = require("core.utils").load_override(options, "nvim-tree/nvim-web-devicons") - - devicons.setup(options) - end + require("nvim-web-devicons").setup(options) end return M diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index fbb46c8..9209909 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -1,9 +1,3 @@ -local present, telescope = pcall(require, "telescope") - -if not present then - return -end - loadfile(vim.g.base46_cache .. "telescope")() local options = { @@ -60,13 +54,13 @@ local options = { extensions_list = { "themes", "terms" }, } +local telescope = require "telescope" + -- check for any override options = require("core.utils").load_override(options, "nvim-telescope/telescope.nvim") telescope.setup(options) -- load extensions -pcall(function() - for _, ext in ipairs(options.extensions_list) do - telescope.load_extension(ext) - end -end) +for _, ext in ipairs(options.extensions_list) do + telescope.load_extension(ext) +end diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index 8231751..df1ca22 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -1,9 +1,3 @@ -local present, treesitter = pcall(require, "nvim-treesitter.configs") - -if not present then - return -end - loadfile(vim.g.base46_cache .. "syntax")() loadfile(vim.g.base46_cache .. "treesitter")() @@ -25,4 +19,4 @@ local options = { -- check for any override options = require("core.utils").load_override(options, "nvim-treesitter/nvim-treesitter") -treesitter.setup(options) +require("nvim-treesitter.configs").setup(options) diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index 1e561ed..c305b08 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -1,9 +1,3 @@ -local present, wk = pcall(require, "which-key") - -if not present then - return -end - loadfile(vim.g.base46_cache .. "whichkey")() local options = { @@ -38,4 +32,4 @@ local options = { options = require("core.utils").load_override(options, "folke/which-key.nvim") -wk.setup(options) +require("which-key").setup(options) From 86bb1413e4a76f9ac53bf2cfc4041f939ab51782 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 26 Jan 2023 08:58:44 +0530 Subject: [PATCH 1336/1541] use build opt instead of run --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 57a708d..19fcee0 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -57,7 +57,7 @@ local plugins = { require("core.utils").lazy_load "nvim-treesitter" end, cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSEnable", "TSDisable", "TSModuleInfo" }, - run = ":TSUpdate", + build = ":TSUpdate", config = function() require "plugins.configs.treesitter" end, From 6910a4435d4040c6127c513749fd8586e9da3a79 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 29 Jan 2023 16:59:08 +0530 Subject: [PATCH 1337/1541] update example_config branch in bootstrap module --- lua/core/bootstrap.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index f5bd292..307cad8 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -43,7 +43,7 @@ M.gen_chadrc_template = function() -- clone example_config repo local example_config_url = "https://github.com/NvChad/example_config" print "cloning chadrc starter template repo...." - vim.fn.system { "git", "clone", "--depth", "1", example_config_url, vim.fn.stdpath "config" .. "/lua/custom" } + vim.fn.system { "git", "clone", "--depth", "1", "-b", "v2.0", example_config_url, vim.fn.stdpath "config" .. "/lua/custom" } vim.cmd "redraw|echo ''" -- delete .git from that repo From 947186b7ec9a5c469079f1daa0d452f42543b912 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 29 Jan 2023 18:19:10 +0530 Subject: [PATCH 1338/1541] dont load statusline highlights cache as its included in the defaults file now! --- init.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/init.lua b/init.lua index 2eb6ae1..015fb81 100644 --- a/init.lua +++ b/init.lua @@ -19,7 +19,4 @@ end vim.opt.rtp:prepend(lazypath) require "plugins" --- load compiled base46 themes -loadfile(vim.g.base46_cache .. "bg")() loadfile(vim.g.base46_cache .. "defaults")() -loadfile(vim.g.base46_cache .. "statusline")() From 4990b23935cff78d1c51aa563a77de26f7c802e6 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 29 Jan 2023 21:36:54 +0530 Subject: [PATCH 1339/1541] use dofile to load cached theme files --- init.lua | 2 +- lua/plugins/configs/cmp.lua | 2 +- lua/plugins/configs/lspconfig.lua | 2 +- lua/plugins/configs/mason.lua | 2 +- lua/plugins/configs/nvimtree.lua | 2 +- lua/plugins/configs/others.lua | 6 +++--- lua/plugins/configs/telescope.lua | 2 +- lua/plugins/configs/treesitter.lua | 3 +-- lua/plugins/configs/whichkey.lua | 2 +- 9 files changed, 11 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index 015fb81..e718a05 100644 --- a/init.lua +++ b/init.lua @@ -19,4 +19,4 @@ end vim.opt.rtp:prepend(lazypath) require "plugins" -loadfile(vim.g.base46_cache .. "defaults")() +dofile(vim.g.base46_cache .. "defaults") diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index d428e72..52e7d25 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -1,6 +1,6 @@ local cmp = require "cmp" -loadfile(vim.g.base46_cache .. "cmp")() +dofile(vim.g.base46_cache .. "cmp") vim.o.completeopt = "menu,menuone,noselect" diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 9139c38..d4efc2b 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,4 +1,4 @@ -loadfile(vim.g.base46_cache .. "lsp")() +dofile(vim.g.base46_cache .. "lsp") require "nvchad_ui.lsp" local M = {} diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua index cff9b6d..1fa7556 100644 --- a/lua/plugins/configs/mason.lua +++ b/lua/plugins/configs/mason.lua @@ -1,4 +1,4 @@ -loadfile(vim.g.base46_cache .. "mason")() +dofile(vim.g.base46_cache .. "mason") local options = { ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 26563af..ff90945 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -1,4 +1,4 @@ -loadfile(vim.g.base46_cache .. "nvimtree")() +dofile(vim.g.base46_cache .. "nvimtree") local options = { filters = { diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 0155d41..a442e7d 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -18,7 +18,7 @@ M.autopairs = function() end M.blankline = function() - loadfile(vim.g.base46_cache .. "blankline")() + dofile(vim.g.base46_cache .. "blankline") local options = { indentLine_enabled = 1, @@ -83,7 +83,7 @@ M.luasnip = function() end M.gitsigns = function() - loadfile(vim.g.base46_cache .. "git")() + dofile(vim.g.base46_cache .. "git") local options = { signs = { @@ -104,7 +104,7 @@ M.gitsigns = function() end M.devicons = function() - loadfile(vim.g.base46_cache .. "devicons")() + dofile(vim.g.base46_cache .. "devicons") local options = { override = require("nvchad_ui.icons").devicons } options = require("core.utils").load_override(options, "nvim-tree/nvim-web-devicons") diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 9209909..3c388fe 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -1,4 +1,4 @@ -loadfile(vim.g.base46_cache .. "telescope")() +dofile(vim.g.base46_cache .. "telescope") local options = { defaults = { diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index df1ca22..da8cf3c 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -1,5 +1,4 @@ -loadfile(vim.g.base46_cache .. "syntax")() -loadfile(vim.g.base46_cache .. "treesitter")() +dofile(vim.g.base46_cache .. "syntax") local options = { ensure_installed = { diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index c305b08..ac8ae91 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -1,4 +1,4 @@ -loadfile(vim.g.base46_cache .. "whichkey")() +dofile(vim.g.base46_cache .. "whichkey") local options = { From 2ee1ada9114459e5c1472648180d243308a7b4a5 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 29 Jan 2023 23:30:13 +0530 Subject: [PATCH 1340/1541] reduce some LOC --- lua/core/default_config.lua | 2 -- lua/core/options.lua | 10 ++-------- lua/core/utils.lua | 2 +- lua/plugins/configs/lazy_nvim.lua | 10 ++-------- lua/plugins/configs/nvterm.lua | 27 --------------------------- lua/plugins/configs/treesitter.lua | 8 ++------ lua/plugins/init.lua | 4 +++- 7 files changed, 10 insertions(+), 53 deletions(-) delete mode 100644 lua/plugins/configs/nvterm.lua diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index bd9e037..6e5e70b 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -14,11 +14,9 @@ M.ui = { -- hl = highlights hl_add = {}, hl_override = {}, - changed_themes = {}, theme_toggle = { "onedark", "one_light" }, theme = "onedark", -- default theme - transparency = false, -- cmp themeing diff --git a/lua/core/options.lua b/lua/core/options.lua index b262013..ee8671c 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -49,13 +49,7 @@ opt.whichwrap:append "<>[]hl" g.mapleader = " " -local default_providers = { - "node", - "perl", - "python3", - "ruby", -} - -for _, provider in ipairs(default_providers) do +-- disable some default providers +for _, provider in ipairs { "node", "perl", "python3", "ruby" } do vim.g["loaded_" .. provider .. "_provider"] = 0 end diff --git a/lua/core/utils.lua b/lua/core/utils.lua index b9f70ae..bc20de6 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -3,7 +3,6 @@ local merge_tb = vim.tbl_deep_extend M.load_config = function() local config = require "core.default_config" - local chadrc_path = vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1] if chadrc_path then @@ -57,6 +56,7 @@ M.load_mappings = function(section, mapping_opt) if section_values.plugin then return end + section_values.plugin = nil for mode, mode_values in pairs(section_values) do diff --git a/lua/plugins/configs/lazy_nvim.lua b/lua/plugins/configs/lazy_nvim.lua index 4e357fd..dbb3abc 100644 --- a/lua/plugins/configs/lazy_nvim.lua +++ b/lua/plugins/configs/lazy_nvim.lua @@ -1,12 +1,6 @@ return { - defaults = { - lazy = true, - }, - - install = { - -- try to load one of these colorschemes when starting an installation during startup - colorscheme = { "nvchad" }, - }, + defaults = { lazy = true }, + install = { colorscheme = { "nvchad" } }, ui = { icons = { diff --git a/lua/plugins/configs/nvterm.lua b/lua/plugins/configs/nvterm.lua deleted file mode 100644 index cdcaa59..0000000 --- a/lua/plugins/configs/nvterm.lua +++ /dev/null @@ -1,27 +0,0 @@ -require "base46.term" - -local options = { - terminals = { - list = {}, - type_opts = { - float = { - relative = "editor", - row = 0.3, - col = 0.25, - width = 0.5, - height = 0.4, - border = "single", - }, - horizontal = { location = "rightbelow", split_ratio = 0.3 }, - vertical = { location = "rightbelow", split_ratio = 0.5 }, - }, - }, - behavior = { - close_on_exit = true, - auto_insert = true, - }, - enable_new_mappings = true, -} - -options = require("core.utils").load_override(options, "NvChad/nvterm") -require("nvterm").setup(options) diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index da8cf3c..782f36d 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -1,18 +1,14 @@ dofile(vim.g.base46_cache .. "syntax") local options = { - ensure_installed = { - "lua", - }, + ensure_installed = { "lua" }, highlight = { enable = true, use_languagetree = true, }, - indent = { - enable = true, - }, + indent = { enable = true }, } -- check for any override diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 19fcee0..0c33db9 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -20,7 +20,9 @@ local plugins = { ["NvChad/nvterm"] = { config = function() - require "plugins.configs.nvterm" + require "base46.term" + local options = require("core.utils").load_override({}, "NvChad/nvterm") + require("nvterm").setup(options) end, init = function() require("core.utils").load_mappings "nvterm" From 205802b49f06655fd6f69771fddaa980c519407b Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 31 Jan 2023 13:08:39 +0530 Subject: [PATCH 1341/1541] add nvchad_types to sumenko lsp config also remove nvimtree depreceated option --- lua/plugins/configs/lspconfig.lua | 1 + lua/plugins/configs/nvimtree.lua | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index d4efc2b..b53ae32 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -50,6 +50,7 @@ require("lspconfig").sumneko_lua.setup { library = { [vim.fn.expand "$VIMRUNTIME/lua"] = true, [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true, + [vim.fn.stdpath("data") .. "/lazy/extensions/nvchad_types"] = true, }, maxPreload = 100000, preloadFileSize = 10000, diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index ff90945..77531d5 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -7,7 +7,6 @@ local options = { }, disable_netrw = true, hijack_netrw = true, - open_on_setup = false, hijack_cursor = true, hijack_unnamed_buffer_when_opening = false, update_cwd = true, From 8501cc01e1afb23d1843b537ab3f9426d2f3e5ff Mon Sep 17 00:00:00 2001 From: neo-f Date: Thu, 9 Feb 2023 13:14:06 +0800 Subject: [PATCH 1342/1541] update nvim-tree option names --- lua/plugins/configs/nvimtree.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 77531d5..1d884f7 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -9,10 +9,10 @@ local options = { hijack_netrw = true, hijack_cursor = true, hijack_unnamed_buffer_when_opening = false, - update_cwd = true, + sync_root_with_cwd = true, update_focused_file = { enable = true, - update_cwd = false, + update_root = false, }, view = { adaptive_size = false, From 7daf17194833530d91984118f5d41b3fa0d8ee1a Mon Sep 17 00:00:00 2001 From: ariefra Date: Sun, 12 Feb 2023 17:46:20 +0700 Subject: [PATCH 1343/1541] Fix sumneko_lua deprecation, change to lua_ls --- lua/plugins/configs/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index b53ae32..e6b94fd 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -37,7 +37,7 @@ M.capabilities.textDocument.completion.completionItem = { }, } -require("lspconfig").sumneko_lua.setup { +require("lspconfig").lua_ls.setup { on_attach = M.on_attach, capabilities = M.capabilities, From e8e7ed6144a47d069e89631d2940a629b3b82b6e Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 14 Feb 2023 11:12:31 +0530 Subject: [PATCH 1344/1541] add autocmd for automatically compiling base46 --- lua/core/init.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 0832728..b0ff8d2 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -4,10 +4,6 @@ vim.env.PATH = vim.env.PATH .. (is_windows and ";" or ":") .. vim.fn.stdpath "da local new_cmd = vim.api.nvim_create_user_command -new_cmd("CompileNvTheme", function() - require("base46").load_all_highlights() -end, {}) - new_cmd("NvChadUpdate", function() require("nvchad").update_nvchad() end, {}) @@ -22,3 +18,15 @@ autocmd("FileType", { vim.opt_local.buflisted = false end, }) + +autocmd("BufWritePost", { + pattern = "*lua", + callback = function() + local bufname = vim.api.nvim_buf_get_name(0) + + if string.find(bufname, "custom") and string.find(bufname, "lua") then + require("plenary.reload").reload_module "base46" + require("base46").load_all_highlights() + end + end, +}) From 5246faa09a166e4a3b18f7ba4c2056dc5d24222f Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 15 Feb 2023 17:37:10 +0530 Subject: [PATCH 1345/1541] add windows support for compile theme autocmd --- lua/core/bootstrap.lua | 2 +- lua/core/init.lua | 39 +++++++++++++++++++++++++++++++-------- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index 307cad8..84a30a9 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -25,7 +25,7 @@ M.lazy = function(install_path) require "plugins" vim.fn.mkdir(vim.g.base46_cache, "p") - vim.cmd "CompileNvTheme" + require("base46").load_all_highlights() require("lazy").load { plugins = "nvim-treesitter" } -- install binaries from mason.nvim & tsparsers on LazySync diff --git a/lua/core/init.lua b/lua/core/init.lua index b0ff8d2..6ba5109 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -19,14 +19,37 @@ autocmd("FileType", { end, }) -autocmd("BufWritePost", { - pattern = "*lua", - callback = function() - local bufname = vim.api.nvim_buf_get_name(0) +local sep = vim.loop.os_uname().sysname:find "windows" and "\\" or "/" - if string.find(bufname, "custom") and string.find(bufname, "lua") then - require("plenary.reload").reload_module "base46" - require("base46").load_all_highlights() - end +vim.api.nvim_create_autocmd("BufWritePost", { + pattern = vim.fn.glob( + table.concat({ + vim.fn.stdpath "config", + "lua", + "custom", + "**", + "*.lua", + }, sep), + true, + true, + true + ), + + group = vim.api.nvim_create_augroup("ReloadNvChad", {}), + + callback = function(opts) + require("plenary.reload").reload_module "base46" + local file = string + .gsub(vim.fn.fnamemodify(opts.file, ":r"), vim.fn.stdpath "config" .. sep .. "lua" .. sep, "") + :gsub(sep, ".") + require("plenary.reload").reload_module(file) + require("plenary.reload").reload_module "custom.chadrc" + + local config = require("core.utils").load_config().ui + + vim.opt.statusline = "%!v:lua.require('nvchad_ui.statusline." .. config.statusline.theme .. "').run()" + + require("base46").load_all_highlights() + -- vim.cmd("redraw!") end, }) From 659037279152762991401fe75a050d168456dc52 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 17 Feb 2023 22:08:28 +0530 Subject: [PATCH 1346/1541] BREAKING CHANGE: utilize lazy.nvim fully, remove un-needed functions --- lua/core/utils.lua | 31 ----- lua/plugins/configs/cmp.lua | 5 +- lua/plugins/configs/mason.lua | 8 +- lua/plugins/configs/nvimtree.lua | 4 +- lua/plugins/configs/others.lua | 91 +++---------- lua/plugins/configs/telescope.lua | 11 +- lua/plugins/configs/treesitter.lua | 5 +- lua/plugins/configs/whichkey.lua | 4 +- lua/plugins/init.lua | 198 +++++++++++++++++------------ 9 files changed, 140 insertions(+), 217 deletions(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index bc20de6..ea8edd0 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -85,37 +85,6 @@ M.load_mappings = function(section, mapping_opt) end end --- merge default/user plugin tables -M.merge_plugins = function(plugins) - local user_plugins = M.load_config().plugins - plugins = merge_tb("force", plugins, M.load_config().plugins) - - local final_table = {} - - for key, val in pairs(plugins) do - if val then - plugins[key] = (val.rm_default_opts and user_plugins[key]) or plugins[key] - plugins[key][1] = key - final_table[#final_table + 1] = plugins[key] - end - end - - return final_table -end - --- override plugin options table with custom ones -M.load_override = function(options_table, name) - local user_plugins = M.load_config().plugins - local plugin_options = {} - - if user_plugins[name] then - plugin_options = user_plugins[name].override_options or {} - plugin_options = type(plugin_options) == "table" and plugin_options or plugin_options() - end - - return merge_tb("force", options_table, plugin_options) -end - M.lazy_load = function(plugin) vim.api.nvim_create_autocmd({ "BufRead", "BufWinEnter", "BufNewFile" }, { group = vim.api.nvim_create_augroup("BeLazyOnFileOpen" .. plugin, {}), diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 52e7d25..afa890f 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -115,7 +115,4 @@ if cmp_style ~= "atom" and cmp_style ~= "atom_colored" then options.window.completion.border = border "CmpBorder" end --- check for any override -options = require("core.utils").load_override(options, "hrsh7th/nvim-cmp") - -cmp.setup(options) +return options diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua index 1fa7556..0777e0c 100644 --- a/lua/plugins/configs/mason.lua +++ b/lua/plugins/configs/mason.lua @@ -27,10 +27,4 @@ local options = { max_concurrent_installers = 10, } -options = require("core.utils").load_override(options, "williamboman/mason.nvim") - -vim.api.nvim_create_user_command("MasonInstallAll", function() - vim.cmd("MasonInstall " .. table.concat(options.ensure_installed, " ")) -end, {}) - -require("mason").setup(options) +return options diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 1d884f7..1a260c1 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -75,8 +75,6 @@ local options = { }, } --- check for any override -options = require("core.utils").load_override(options, "nvim-tree/nvim-tree.lua") vim.g.nvimtree_side = options.view.side -require("nvim-tree").setup(options) +return options diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index a442e7d..b4bc6b7 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -1,62 +1,24 @@ local M = {} - -local load_override = require("core.utils").load_override local utils = require "core.utils" -M.autopairs = function() - local options = { - fast_wrap = {}, - disable_filetype = { "TelescopePrompt", "vim" }, - } - - options = load_override(options, "windwp/nvim-autopairs") - require("nvim-autopairs").setup(options) - - -- setup cmp for autopairs - local cmp_autopairs = require "nvim-autopairs.completion.cmp" - require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done()) -end - -M.blankline = function() - dofile(vim.g.base46_cache .. "blankline") - - local options = { - indentLine_enabled = 1, - filetype_exclude = { - "help", - "terminal", - "lazy", - "lspinfo", - "TelescopePrompt", - "TelescopeResults", - "mason", - "", - }, - buftype_exclude = { "terminal" }, - show_trailing_blankline_indent = false, - show_first_indent_level = false, - show_current_context = true, - show_current_context_start = true, - } - - options = load_override(options, "lukas-reineke/indent-blankline.nvim") - require("indent_blankline").setup(options) -end - -M.colorizer = function() - local options = {} - options = load_override(options, "NvChad/nvim-colorizer.lua") - require("colorizer").setup(options) - - -- execute colorizer as soon as possible - vim.defer_fn(function() - require("colorizer").attach_to_buffer(0) - end, 0) -end - -M.comment = function() - require("Comment").setup(load_override({}, "numToStr/Comment.nvim")) -end +M.blankline = { + indentLine_enabled = 1, + filetype_exclude = { + "help", + "terminal", + "lazy", + "lspinfo", + "TelescopePrompt", + "TelescopeResults", + "mason", + "", + }, + buftype_exclude = { "terminal" }, + show_trailing_blankline_indent = false, + show_first_indent_level = false, + show_current_context = true, + show_current_context_start = true, +} M.luasnip = function() local options = { @@ -64,7 +26,6 @@ M.luasnip = function() updateevents = "TextChanged,TextChangedI", } - options = load_override(options, "L3MON4D3/LuaSnip") require("luasnip").config.set_config(options) require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.luasnippets_path or "" } @@ -83,9 +44,7 @@ M.luasnip = function() end M.gitsigns = function() - dofile(vim.g.base46_cache .. "git") - - local options = { + return { signs = { add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, @@ -98,18 +57,6 @@ M.gitsigns = function() utils.load_mappings("gitsigns", { buffer = bufnr }) end, } - - options = load_override(options, "lewis6991/gitsigns.nvim") - require("gitsigns").setup(options) -end - -M.devicons = function() - dofile(vim.g.base46_cache .. "devicons") - - local options = { override = require("nvchad_ui.icons").devicons } - options = require("core.utils").load_override(options, "nvim-tree/nvim-web-devicons") - - require("nvim-web-devicons").setup(options) end return M diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 3c388fe..16eac04 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -54,13 +54,4 @@ local options = { extensions_list = { "themes", "terms" }, } -local telescope = require "telescope" - --- check for any override -options = require("core.utils").load_override(options, "nvim-telescope/telescope.nvim") -telescope.setup(options) - --- load extensions -for _, ext in ipairs(options.extensions_list) do - telescope.load_extension(ext) -end +return options diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index 782f36d..edea6ec 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -11,7 +11,4 @@ local options = { indent = { enable = true }, } --- check for any override -options = require("core.utils").load_override(options, "nvim-treesitter/nvim-treesitter") - -require("nvim-treesitter.configs").setup(options) +return options diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index ac8ae91..9ec4a68 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -30,6 +30,4 @@ local options = { }, } -options = require("core.utils").load_override(options, "folke/which-key.nvim") - -require("which-key").setup(options) +return options diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 0c33db9..77bccbc 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,16 +1,15 @@ -- All plugins have lazy=true by default,to load a plugin on startup just lazy=false -- List of all default plugins & their definitions -local plugins = { +local default_plugins = { - ["nvim-lua/plenary.nvim"] = {}, + "nvim-lua/plenary.nvim", - ["NvChad/extensions"] = { branch = "v2.0" }, + -- nvchad plugins + { "NvChad/extensions", branch = "v2.0" }, + { "NvChad/base46", branch = "v2.0" }, - ["NvChad/base46"] = { - branch = "v2.0", - }, - - ["NvChad/ui"] = { + { + "NvChad/ui", branch = "v2.0", lazy = false, config = function() @@ -18,55 +17,67 @@ local plugins = { end, }, - ["NvChad/nvterm"] = { - config = function() + { + "NvChad/nvterm", + init = require("core.utils").load_mappings "nvterm", + opts = {}, + config = function(_, opts) require "base46.term" - local options = require("core.utils").load_override({}, "NvChad/nvterm") - require("nvterm").setup(options) - end, - init = function() - require("core.utils").load_mappings "nvterm" + require("nvterm").setup(opts) end, }, - ["nvim-tree/nvim-web-devicons"] = { + { + "NvChad/nvim-colorizer.lua", + init = require("core.utils").lazy_load "nvim-colorizer.lua", config = function() - require("plugins.configs.others").devicons() + require("colorizer").setup() + + -- execute colorizer as soon as possible + vim.defer_fn(function() + require("colorizer").attach_to_buffer(0) + end, 0) end, }, - ["lukas-reineke/indent-blankline.nvim"] = { + { + "nvim-tree/nvim-web-devicons", + opts = function() + return { override = require("nvchad_ui.icons").devicons } + end, + config = function(_, opts) + dofile(vim.g.base46_cache .. "devicons") + require("nvim-web-devicons").setup(opts) + end, + }, + + { + "lukas-reineke/indent-blankline.nvim", init = function() require("core.utils").lazy_load "indent-blankline.nvim" require("core.utils").load_mappings "blankline" end, - config = function() - require("plugins.configs.others").blankline() + opts = require("plugins.configs.others").blankline, + config = function(_, opts) + dofile(vim.g.base46_cache .. "blankline") + require("indent_blankline").setup(opts) end, }, - ["NvChad/nvim-colorizer.lua"] = { - init = function() - require("core.utils").lazy_load "nvim-colorizer.lua" - end, - config = function() - require("plugins.configs.others").colorizer() - end, - }, - - ["nvim-treesitter/nvim-treesitter"] = { - init = function() - require("core.utils").lazy_load "nvim-treesitter" - end, - cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSEnable", "TSDisable", "TSModuleInfo" }, + { + "nvim-treesitter/nvim-treesitter", + init = require("core.utils").lazy_load "nvim-treesitter", + cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" }, build = ":TSUpdate", - config = function() - require "plugins.configs.treesitter" + opts = require "plugins.configs.treesitter", + config = function(_, opts) + require("nvim-treesitter.configs").setup(opts) end, }, -- git stuff - ["lewis6991/gitsigns.nvim"] = { + { + "lewis6991/gitsigns.nvim", ft = "gitcommit", init = function() -- load gitsigns only when a git file is opened @@ -83,30 +94,37 @@ local plugins = { end, }) end, - config = function() - require("plugins.configs.others").gitsigns() + opts = require("plugins.configs.others").gitsigns, + config = function(_, opts) + dofile(vim.g.base46_cache .. "git") + require("gitsigns").setup(opts) end, }, -- lsp stuff - ["williamboman/mason.nvim"] = { + { + "williamboman/mason.nvim", cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" }, - config = function() - require "plugins.configs.mason" + config = function(_, opts) + require("mason").setup(opts) + -- custom nvchad cmd to install all mason binaries listed + vim.api.nvim_create_user_command("MasonInstallAll", function() + vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " ")) + end, {}) end, }, - ["neovim/nvim-lspconfig"] = { - init = function() - require("core.utils").lazy_load "nvim-lspconfig" - end, + { + "neovim/nvim-lspconfig", + init = require("core.utils").lazy_load "nvim-lspconfig", config = function() require "plugins.configs.lspconfig" end, }, -- load luasnips + cmp related in insert mode only - ["hrsh7th/nvim-cmp"] = { + { + "hrsh7th/nvim-cmp", event = "InsertEnter", dependencies = { { @@ -121,8 +139,16 @@ local plugins = { -- autopairing of (){}[] etc { "windwp/nvim-autopairs", - config = function() - require("plugins.configs.others").autopairs() + opts = { + fast_wrap = {}, + disable_filetype = { "TelescopePrompt", "vim" }, + }, + config = function(_, opts) + require("nvim-autopairs").setup(opts) + + -- setup cmp for autopairs + local cmp_autopairs = require "nvim-autopairs.completion.cmp" + require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done()) end, }, @@ -136,64 +162,70 @@ local plugins = { }, }, - config = function() - require "plugins.configs.cmp" + opts = function() + return require "plugins.configs.cmp" + end, + config = function(_, opts) + require("cmp").setup(opts) end, }, - ["numToStr/Comment.nvim"] = { + { + "numToStr/Comment.nvim", -- keys = { "gc", "gb" }, + init = require("core.utils").load_mappings "comment", config = function() - require("plugins.configs.others").comment() - end, - init = function() - require("core.utils").load_mappings "comment" + require("Comment").setup() end, }, -- file managing , picker etc - ["nvim-tree/nvim-tree.lua"] = { + { + "nvim-tree/nvim-tree.lua", cmd = { "NvimTreeToggle", "NvimTreeFocus" }, - config = function() - require "plugins.configs.nvimtree" - end, - init = function() - require("core.utils").load_mappings "nvimtree" + init = require("core.utils").load_mappings "nvimtree", + opts = require "plugins.configs.nvimtree", + config = function(_, opts) + require("nvim-tree").setup(opts) end, }, - ["nvim-telescope/telescope.nvim"] = { + { + "nvim-telescope/telescope.nvim", cmd = "Telescope", - config = function() - require "plugins.configs.telescope" + init = require("core.utils").load_mappings "telescope", + + opts = function() + return require "plugins.configs.telescope" end, - init = function() - require("core.utils").load_mappings "telescope" + + config = function(_, opts) + local telescope = require "telescope" + telescope.setup(opts) + + -- load extensions + for _, ext in ipairs(opts.extensions_list) do + telescope.load_extension(ext) + end end, }, -- Only load whichkey after all the gui - ["folke/which-key.nvim"] = { + { + "folke/which-key.nvim", enabled = false, keys = { "", '"', "'", "`" }, - config = function() - require "plugins.configs.whichkey" - end, - init = function() - require("core.utils").load_mappings "whichkey" + init = require("core.utils").load_mappings "whichkey", + opts = require "plugins.configs.whichkey", + config = function(_, opts) + require("which-key").setup(opts) end, }, + + { import = require("core.utils").load_config().plugins }, } --- pin commits for all default plugins -for _, value in pairs(plugins) do - value.pin = true -end - -plugins = require("core.utils").merge_plugins(plugins) - --- load lazy.nvim options +-- load lazy.nvim _,opts local lazy_config = require "plugins.configs.lazy_nvim" -lazy_config = require("core.utils").load_override(lazy_config, "folke/lazy.nvim") -require("lazy").setup(plugins, lazy_config) +require("lazy").setup(default_plugins, lazy_config) From 7b3aefee5376f5ceb274f8625b1300fcf15f3c56 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 17 Feb 2023 22:25:31 +0530 Subject: [PATCH 1347/1541] add condition to merge user custom plugins --- lua/core/default_config.lua | 4 +++- lua/plugins/init.lua | 12 ++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 6e5e70b..89b9ccd 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -74,7 +74,9 @@ M.ui = { }, } -M.plugins = {} +M.plugins = "" -- path i.e "custom.plugins" -> custom/plugins.lua only and not custom/plugins/init.lua!!!! + +M.lazy_nvim = {} -- config for lazy.nvim startup options -- these are default mappings, check core.mappings for table structure M.mappings = require "core.mappings" diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 77bccbc..fea032e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -221,11 +221,15 @@ local default_plugins = { require("which-key").setup(opts) end, }, - - { import = require("core.utils").load_config().plugins }, } --- load lazy.nvim _,opts -local lazy_config = require "plugins.configs.lazy_nvim" +local config = require("core.utils").load_config() + +if #config.plugins > 0 then + table.insert(default_plugins, { import = config.plugins }) +end + +-- lazy_nvim startup opts +local lazy_config = vim.tbl_deep_extend("force", require "plugins.configs.lazy_nvim", config.lazy_nvim) require("lazy").setup(default_plugins, lazy_config) From a2690a4b728026c1b662367f63013ced30f4b5f9 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 18 Feb 2023 14:26:40 +0530 Subject: [PATCH 1348/1541] avoid loading cached highlights in plugin opts file --- lua/core/bootstrap.lua | 23 +++++++++++++---------- lua/plugins/configs/mason.lua | 2 -- lua/plugins/configs/nvimtree.lua | 2 -- lua/plugins/configs/telescope.lua | 2 -- lua/plugins/configs/treesitter.lua | 2 -- lua/plugins/configs/whichkey.lua | 2 -- lua/plugins/init.lua | 7 +++++++ 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index 84a30a9..bca43c3 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -1,13 +1,6 @@ local M = {} M.lazy = function(install_path) - print "Downloading lazy-lock.json file..." - - local config_branch = require("core.utils").load_config().options.nvChad.update_branch - local lazy_local_url = "https://raw.githubusercontent.com/NvChad/extensions/lazy-lock/" .. config_branch .. ".json" - - vim.fn.system { "curl", "-o", "lazy-lock.json", lazy_local_url } - print "Bootstrapping lazy.nvim .." vim.fn.system { @@ -30,7 +23,8 @@ M.lazy = function(install_path) -- install binaries from mason.nvim & tsparsers on LazySync vim.schedule(function() - vim.cmd "bw | silent! MasonInstallAll" -- close lazy window + vim.cmd "silent! MasonInstallAll" + -- print success message end, 0) end @@ -41,9 +35,18 @@ M.gen_chadrc_template = function() if input == "y" then -- clone example_config repo - local example_config_url = "https://github.com/NvChad/example_config" print "cloning chadrc starter template repo...." - vim.fn.system { "git", "clone", "--depth", "1", "-b", "v2.0", example_config_url, vim.fn.stdpath "config" .. "/lua/custom" } + + vim.fn.system { + "git", + "clone", + "--depth", + "1", + "-b", + "v2.0", + "https://github.com/NvChad/example_config", + vim.fn.stdpath "config" .. "/lua/custom", + } vim.cmd "redraw|echo ''" -- delete .git from that repo diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua index 0777e0c..8ccc313 100644 --- a/lua/plugins/configs/mason.lua +++ b/lua/plugins/configs/mason.lua @@ -1,5 +1,3 @@ -dofile(vim.g.base46_cache .. "mason") - local options = { ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 1a260c1..0fda31c 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -1,5 +1,3 @@ -dofile(vim.g.base46_cache .. "nvimtree") - local options = { filters = { dotfiles = false, diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 16eac04..784fb19 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -1,5 +1,3 @@ -dofile(vim.g.base46_cache .. "telescope") - local options = { defaults = { vimgrep_arguments = { diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index edea6ec..b21b55d 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -1,5 +1,3 @@ -dofile(vim.g.base46_cache .. "syntax") - local options = { ensure_installed = { "lua" }, diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index 9ec4a68..cfdf4c0 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -1,5 +1,3 @@ -dofile(vim.g.base46_cache .. "whichkey") - local options = { icons = { diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index fea032e..c6f1c21 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -71,6 +71,7 @@ local default_plugins = { build = ":TSUpdate", opts = require "plugins.configs.treesitter", config = function(_, opts) + dofile(vim.g.base46_cache .. "syntax") require("nvim-treesitter.configs").setup(opts) end, }, @@ -105,8 +106,11 @@ local default_plugins = { { "williamboman/mason.nvim", cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" }, + opts = require "plugins.configs.mason", config = function(_, opts) + dofile(vim.g.base46_cache .. "mason") require("mason").setup(opts) + -- custom nvchad cmd to install all mason binaries listed vim.api.nvim_create_user_command("MasonInstallAll", function() vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " ")) @@ -186,6 +190,7 @@ local default_plugins = { init = require("core.utils").load_mappings "nvimtree", opts = require "plugins.configs.nvimtree", config = function(_, opts) + dofile(vim.g.base46_cache .. "nvimtree") require("nvim-tree").setup(opts) end, }, @@ -200,6 +205,7 @@ local default_plugins = { end, config = function(_, opts) + dofile(vim.g.base46_cache .. "telescope") local telescope = require "telescope" telescope.setup(opts) @@ -218,6 +224,7 @@ local default_plugins = { init = require("core.utils").load_mappings "whichkey", opts = require "plugins.configs.whichkey", config = function(_, opts) + dofile(vim.g.base46_cache .. "whichkey") require("which-key").setup(opts) end, }, From a6b9c0cae5134ce7578160f69b46e0bf83e8988f Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 19 Feb 2023 07:19:01 +0530 Subject: [PATCH 1349/1541] wrap some opt modules with function not doing so will make those modules load by default which isnt good --- lua/core/bootstrap.lua | 3 ++- lua/plugins/configs/others.lua | 28 +++++++++++++--------------- lua/plugins/init.lua | 29 ++++++++++++++++++++--------- 3 files changed, 35 insertions(+), 25 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index bca43c3..26e0eb7 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -19,7 +19,8 @@ M.lazy = function(install_path) vim.fn.mkdir(vim.g.base46_cache, "p") require("base46").load_all_highlights() - require("lazy").load { plugins = "nvim-treesitter" } + + vim.cmd "silent! lua require('lazy').load { plugins = 'nvim-treesitter' }" -- install binaries from mason.nvim & tsparsers on LazySync vim.schedule(function() diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index b4bc6b7..0c1fffd 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -43,20 +43,18 @@ M.luasnip = function() }) end -M.gitsigns = function() - return { - signs = { - add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, - change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, - delete = { hl = "DiffDelete", text = "", numhl = "GitSignsDeleteNr" }, - topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, - changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" }, - untracked = { hl = "GitSignsAdd", text = "│", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" }, - }, - on_attach = function(bufnr) - utils.load_mappings("gitsigns", { buffer = bufnr }) - end, - } -end +M.gitsigns = { + signs = { + add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, + change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, + delete = { hl = "DiffDelete", text = "", numhl = "GitSignsDeleteNr" }, + topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, + changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" }, + untracked = { hl = "GitSignsAdd", text = "│", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" }, + }, + on_attach = function(bufnr) + utils.load_mappings("gitsigns", { buffer = bufnr }) + end, +} return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index c6f1c21..64a8493 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -20,7 +20,6 @@ local default_plugins = { { "NvChad/nvterm", init = require("core.utils").load_mappings "nvterm", - opts = {}, config = function(_, opts) require "base46.term" require("nvterm").setup(opts) @@ -30,8 +29,8 @@ local default_plugins = { { "NvChad/nvim-colorizer.lua", init = require("core.utils").lazy_load "nvim-colorizer.lua", - config = function() - require("colorizer").setup() + config = function(_, opts) + require("colorizer").setup(opts) -- execute colorizer as soon as possible vim.defer_fn(function() @@ -57,7 +56,9 @@ local default_plugins = { require("core.utils").lazy_load "indent-blankline.nvim" require("core.utils").load_mappings "blankline" end, - opts = require("plugins.configs.others").blankline, + opts = function() + return require("plugins.configs.others").blankline + end, config = function(_, opts) dofile(vim.g.base46_cache .. "blankline") require("indent_blankline").setup(opts) @@ -69,7 +70,9 @@ local default_plugins = { init = require("core.utils").lazy_load "nvim-treesitter", cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" }, build = ":TSUpdate", - opts = require "plugins.configs.treesitter", + opts = function() + return require "plugins.configs.treesitter" + end, config = function(_, opts) dofile(vim.g.base46_cache .. "syntax") require("nvim-treesitter.configs").setup(opts) @@ -95,7 +98,9 @@ local default_plugins = { end, }) end, - opts = require("plugins.configs.others").gitsigns, + opts = function() + return require("plugins.configs.others").gitsigns + end, config = function(_, opts) dofile(vim.g.base46_cache .. "git") require("gitsigns").setup(opts) @@ -106,7 +111,9 @@ local default_plugins = { { "williamboman/mason.nvim", cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" }, - opts = require "plugins.configs.mason", + opts = function() + return require "plugins.configs.mason" + end, config = function(_, opts) dofile(vim.g.base46_cache .. "mason") require("mason").setup(opts) @@ -188,7 +195,9 @@ local default_plugins = { "nvim-tree/nvim-tree.lua", cmd = { "NvimTreeToggle", "NvimTreeFocus" }, init = require("core.utils").load_mappings "nvimtree", - opts = require "plugins.configs.nvimtree", + opts = function() + return require "plugins.configs.nvimtree" + end, config = function(_, opts) dofile(vim.g.base46_cache .. "nvimtree") require("nvim-tree").setup(opts) @@ -222,7 +231,9 @@ local default_plugins = { enabled = false, keys = { "", '"', "'", "`" }, init = require("core.utils").load_mappings "whichkey", - opts = require "plugins.configs.whichkey", + opts = function() + return require "plugins.configs.whichkey" + end, config = function(_, opts) dofile(vim.g.base46_cache .. "whichkey") require("which-key").setup(opts) From 10ba0e7a5ac94ab6676a82f1ae2e1abed7746957 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 19 Feb 2023 07:22:16 +0530 Subject: [PATCH 1350/1541] misc --- lua/core/bootstrap.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index 26e0eb7..bca43c3 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -19,8 +19,7 @@ M.lazy = function(install_path) vim.fn.mkdir(vim.g.base46_cache, "p") require("base46").load_all_highlights() - - vim.cmd "silent! lua require('lazy').load { plugins = 'nvim-treesitter' }" + require("lazy").load { plugins = "nvim-treesitter" } -- install binaries from mason.nvim & tsparsers on LazySync vim.schedule(function() From 09001369f36a325c0188b789e5959e37ec0971f7 Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Mon, 20 Feb 2023 19:50:46 +0900 Subject: [PATCH 1351/1541] Add lazy.nvim to workspace library --- lua/plugins/configs/lspconfig.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index e6b94fd..7fc6b0c 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -51,6 +51,7 @@ require("lspconfig").lua_ls.setup { [vim.fn.expand "$VIMRUNTIME/lua"] = true, [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true, [vim.fn.stdpath("data") .. "/lazy/extensions/nvchad_types"] = true, + [vim.fn.stdpath("data") .. "/lazy/lazy.nvim/lua/lazy"] = true, }, maxPreload = 100000, preloadFileSize = 10000, From 27455fd2c26296da5e0366f2c8e1a53d60b32a47 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 26 Feb 2023 10:17:45 +0530 Subject: [PATCH 1352/1541] misc --- lua/core/default_config.lua | 1 - lua/plugins/configs/cmp.lua | 6 ++++-- lua/plugins/configs/lspconfig.lua | 4 ++-- lua/plugins/init.lua | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 89b9ccd..7f7004f 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -39,7 +39,6 @@ M.ui = { -- lazyload it when there are 1+ buffers tabufline = { - enabled = true, lazyload = true, overriden_modules = nil, }, diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index afa890f..3bbc557 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -2,8 +2,6 @@ local cmp = require "cmp" dofile(vim.g.base46_cache .. "cmp") -vim.o.completeopt = "menu,menuone,noselect" - local cmp_ui = require("core.utils").load_config().ui.cmp local cmp_style = cmp_ui.style @@ -47,6 +45,10 @@ local function border(hl_name) end local options = { + completion = { + completeopt = "menu,menuone", + }, + window = { completion = { side_padding = (cmp_style ~= "atom" and cmp_style ~= "atom_colored") and 1 or 0, diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 7fc6b0c..24083ae 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -50,8 +50,8 @@ require("lspconfig").lua_ls.setup { library = { [vim.fn.expand "$VIMRUNTIME/lua"] = true, [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true, - [vim.fn.stdpath("data") .. "/lazy/extensions/nvchad_types"] = true, - [vim.fn.stdpath("data") .. "/lazy/lazy.nvim/lua/lazy"] = true, + [vim.fn.stdpath "data" .. "/lazy/extensions/nvchad_types"] = true, + [vim.fn.stdpath "data" .. "/lazy/lazy.nvim/lua/lazy"] = true, }, maxPreload = 100000, preloadFileSize = 10000, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 64a8493..b909d60 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -54,12 +54,12 @@ local default_plugins = { "lukas-reineke/indent-blankline.nvim", init = function() require("core.utils").lazy_load "indent-blankline.nvim" - require("core.utils").load_mappings "blankline" end, opts = function() return require("plugins.configs.others").blankline end, config = function(_, opts) + require("core.utils").load_mappings "blankline" dofile(vim.g.base46_cache .. "blankline") require("indent_blankline").setup(opts) end, From 3384f816397a55238eb7092468b1f862bd29c300 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 28 Feb 2023 09:23:07 +0530 Subject: [PATCH 1353/1541] load cached highlights whenever base46 updates --- lua/core/bootstrap.lua | 5 +---- lua/plugins/init.lua | 9 ++++++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index bca43c3..9080d3c 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -16,10 +16,7 @@ M.lazy = function(install_path) -- install plugins + compile their configs require "plugins" - - vim.fn.mkdir(vim.g.base46_cache, "p") - require("base46").load_all_highlights() - require("lazy").load { plugins = "nvim-treesitter" } + require("lazy").load { plugins = { "nvim-treesitter" } } -- install binaries from mason.nvim & tsparsers on LazySync vim.schedule(function() diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index b909d60..981c3c6 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -6,7 +6,14 @@ local default_plugins = { -- nvchad plugins { "NvChad/extensions", branch = "v2.0" }, - { "NvChad/base46", branch = "v2.0" }, + + { + "NvChad/base46", + branch = "v2.0", + build = function() + require("base46").load_all_highlights() + end, + }, { "NvChad/ui", From a3ea8a9f4da99368b52f204d8c9eca5acf7bbcff Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 1 Mar 2023 14:29:12 +0530 Subject: [PATCH 1354/1541] load mappings after custom init.lua this ensures that custom leader key will work properly --- init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index e718a05..e595772 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,5 @@ require "core" require "core.options" -require("core.utils").load_mappings() local custom_init_path = vim.api.nvim_get_runtime_file("lua/custom/init.lua", false)[1] @@ -8,9 +7,11 @@ if custom_init_path then dofile(custom_init_path) end --- bootstrap lazy.nvim! +require("core.utils").load_mappings() + local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" +-- bootstrap lazy.nvim! if not vim.loop.fs_stat(lazypath) then require("core.bootstrap").gen_chadrc_template() require("core.bootstrap").lazy(lazypath) From 0aafb002b58ac937f6d37bbd1dc38e2312c13a0b Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 8 Mar 2023 18:57:54 +0530 Subject: [PATCH 1355/1541] misc & cleanup --- lua/core/bootstrap.lua | 23 +++++++++++++++++----- lua/core/init.lua | 35 ++++++++++------------------------ lua/core/mappings.lua | 23 +++------------------- lua/plugins/configs/others.lua | 5 +---- lua/plugins/init.lua | 2 +- 5 files changed, 33 insertions(+), 55 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index 9080d3c..c75ef4b 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -16,12 +16,11 @@ M.lazy = function(install_path) -- install plugins + compile their configs require "plugins" - require("lazy").load { plugins = { "nvim-treesitter" } } - -- install binaries from mason.nvim & tsparsers on LazySync - vim.schedule(function() + vim.api.nvim_buf_delete(0, { force = true }) -- close lazy window + + vim.defer_fn(function() vim.cmd "silent! MasonInstallAll" - -- print success message end, 0) end @@ -31,7 +30,6 @@ M.gen_chadrc_template = function() vim.cmd "redraw|echo ''" if input == "y" then - -- clone example_config repo print "cloning chadrc starter template repo...." vim.fn.system { @@ -50,6 +48,21 @@ M.gen_chadrc_template = function() vim.loop.fs_rmdir(vim.fn.stdpath "config" .. "/lua/custom/.git") vim.notify "successfully installed chadrc template!" vim.cmd "redraw|echo ''" + else + local custom_dir = vim.fn.stdpath "config" .. "/lua/custom/" + vim.fn.mkdir(custom_dir, "p") + + local str = [[ + local M = {} + M.ui = { + theme = "onedark", + } + return M + ]] + + local file = io.open(custom_dir .. "chadrc.lua", "w") + file:write(str) + file:close() end end end diff --git a/lua/core/init.lua b/lua/core/init.lua index 6ba5109..e41a4b6 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -5,7 +5,7 @@ vim.env.PATH = vim.env.PATH .. (is_windows and ";" or ":") .. vim.fn.stdpath "da local new_cmd = vim.api.nvim_create_user_command new_cmd("NvChadUpdate", function() - require("nvchad").update_nvchad() + require "nvchad.update"() end, {}) -- autocmds @@ -19,37 +19,22 @@ autocmd("FileType", { end, }) -local sep = vim.loop.os_uname().sysname:find "windows" and "\\" or "/" - vim.api.nvim_create_autocmd("BufWritePost", { - pattern = vim.fn.glob( - table.concat({ - vim.fn.stdpath "config", - "lua", - "custom", - "**", - "*.lua", - }, sep), - true, - true, - true - ), - + pattern = "chadrc.lua", group = vim.api.nvim_create_augroup("ReloadNvChad", {}), - callback = function(opts) + callback = function() require("plenary.reload").reload_module "base46" - local file = string - .gsub(vim.fn.fnamemodify(opts.file, ":r"), vim.fn.stdpath "config" .. sep .. "lua" .. sep, "") - :gsub(sep, ".") - require("plenary.reload").reload_module(file) - require("plenary.reload").reload_module "custom.chadrc" + local config = require("core.utils").load_config() - local config = require("core.utils").load_config().ui + vim.opt.statusline = "%!v:lua.require('nvchad_ui.statusline." .. config.ui.statusline.theme .. "').run()" + vim.g.nvchad_theme = config.ui.theme + vim.g.transparency = config.ui.transparency - vim.opt.statusline = "%!v:lua.require('nvchad_ui.statusline." .. config.statusline.theme .. "').run()" + -- reload cmp stuff + require("plenary.reload").reload_module "plugins.configs.cmp" + require("cmp").setup(require "plugins.configs.cmp") require("base46").load_all_highlights() - -- vim.cmd("redraw!") end, }) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 2b52096..cee387f 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -1,9 +1,5 @@ -- n, v, i, t = mode names -local function termcodes(str) - return vim.api.nvim_replace_termcodes(str, true, true, true) -end - local M = {} M.general = { @@ -20,8 +16,6 @@ M.general = { }, n = { - [""] = { " noh ", "no highlight" }, - -- switch between windows [""] = { "h", "window left" }, [""] = { "l", "window right" }, @@ -38,16 +32,6 @@ M.general = { ["n"] = { " set nu! ", "toggle line number" }, ["rn"] = { " set rnu! ", "toggle relative number" }, - -- update nvchad - ["uu"] = { " :NvChadUpdate ", "update nvchad" }, - - ["tt"] = { - function() - require("base46").toggle_theme() - end, - "toggle theme", - }, - -- Allow moving the cursor through wrapped lines with j, k, and -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ -- empty mode is same as using :map @@ -61,7 +45,9 @@ M.general = { ["b"] = { " enew ", "new buffer" }, }, - t = { [""] = { termcodes "", "escape terminal mode" } }, + t = { + [""] = { vim.api.nvim_replace_termcodes("", true, true, true), "escape terminal mode" }, + }, v = { [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move up", opts = { expr = true } }, @@ -96,9 +82,6 @@ M.tabufline = { "goto prev buffer", }, - -- pick buffers via numbers - [""] = { " TbufPick ", "Pick buffer" }, - -- close buffer + hide terminal buffer ["x"] = { function() diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 0c1fffd..4c06290 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -21,10 +21,7 @@ M.blankline = { } M.luasnip = function() - local options = { - history = true, - updateevents = "TextChanged,TextChangedI", - } + local options = { history = true, updateevents = "TextChanged,TextChangedI" } require("luasnip").config.set_config(options) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 981c3c6..710d1de 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -99,7 +99,7 @@ local default_plugins = { if vim.v.shell_error == 0 then vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad" vim.schedule(function() - require("lazy").load { plugins = "gitsigns.nvim" } + require("lazy").load { plugins = { "gitsigns.nvim" } } end) end end, From 1d04d70417f053d7b9452548e704e8aada7d6602 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 9 Mar 2023 06:32:32 +0530 Subject: [PATCH 1356/1541] exclude indentline in nvdash/nvcheatsheet fts --- lua/plugins/configs/others.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 4c06290..1952385 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -11,6 +11,8 @@ M.blankline = { "TelescopePrompt", "TelescopeResults", "mason", + "nvdash", + "nvcheatsheet", "", }, buftype_exclude = { "terminal" }, From dab9171e6426b6eb8f0f8bcd0829a0415d260fcb Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 9 Mar 2023 18:07:58 +0530 Subject: [PATCH 1357/1541] put all core stuff in core.init only --- init.lua | 1 - lua/core/default_config.lua | 2 +- lua/core/init.lua | 76 ++++++++++++++++++++++++++++++++----- lua/core/options.lua | 55 --------------------------- lua/core/utils.lua | 2 +- 5 files changed, 69 insertions(+), 67 deletions(-) delete mode 100644 lua/core/options.lua diff --git a/init.lua b/init.lua index e595772..f58c94e 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,4 @@ require "core" -require "core.options" local custom_init_path = vim.api.nvim_get_runtime_file("lua/custom/init.lua", false)[1] diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 7f7004f..7f3eaa2 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -78,6 +78,6 @@ M.plugins = "" -- path i.e "custom.plugins" -> custom/plugins.lua only and not c M.lazy_nvim = {} -- config for lazy.nvim startup options -- these are default mappings, check core.mappings for table structure -M.mappings = require "core.mappings" +M.mappings = {} return M diff --git a/lua/core/init.lua b/lua/core/init.lua index e41a4b6..5205155 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -1,14 +1,66 @@ +local opt = vim.opt +local g = vim.g +local config = require("core.utils").load_config() + +-------------------------------------- globals ----------------------------------------- +g.nvchad_theme = config.ui.theme +g.base46_cache = vim.fn.stdpath "cache" .. "/nvchad/base46/" +g.toggle_theme_icon = "  " +g.transparency = config.ui.transparency + +-------------------------------------- options ------------------------------------------ +opt.laststatus = 3 -- global statusline +opt.showmode = false + +opt.clipboard = "unnamedplus" +opt.cursorline = true + +-- Indenting +opt.expandtab = true +opt.shiftwidth = 2 +opt.smartindent = true +opt.tabstop = 2 +opt.softtabstop = 2 + +opt.fillchars = { eob = " " } +opt.ignorecase = true +opt.smartcase = true +opt.mouse = "a" + +-- Numbers +opt.number = true +opt.numberwidth = 2 +opt.ruler = false + +-- disable nvim intro +opt.shortmess:append "sI" + +opt.signcolumn = "yes" +opt.splitbelow = true +opt.splitright = true +opt.termguicolors = true +opt.timeoutlen = 400 +opt.undofile = true + +-- interval for writing swap file to disk, also used by gitsigns +opt.updatetime = 250 + +-- go to previous/next line with h,l,left arrow and right arrow +-- when cursor reaches end/beginning of line +opt.whichwrap:append "<>[]hl" + +g.mapleader = " " + +-- disable some default providers +for _, provider in ipairs { "node", "perl", "python3", "ruby" } do + vim.g["loaded_" .. provider .. "_provider"] = 0 +end + -- add binaries installed by mason.nvim to path local is_windows = vim.loop.os_uname().sysname == "Windows_NT" vim.env.PATH = vim.env.PATH .. (is_windows and ";" or ":") .. vim.fn.stdpath "data" .. "/mason/bin" -local new_cmd = vim.api.nvim_create_user_command - -new_cmd("NvChadUpdate", function() - require "nvchad.update"() -end, {}) - --- autocmds +-------------------------------------- autocmds ------------------------------------------ local autocmd = vim.api.nvim_create_autocmd -- dont list quickfix buffers @@ -19,13 +71,12 @@ autocmd("FileType", { end, }) -vim.api.nvim_create_autocmd("BufWritePost", { +autocmd("BufWritePost", { pattern = "chadrc.lua", group = vim.api.nvim_create_augroup("ReloadNvChad", {}), callback = function() require("plenary.reload").reload_module "base46" - local config = require("core.utils").load_config() vim.opt.statusline = "%!v:lua.require('nvchad_ui.statusline." .. config.ui.statusline.theme .. "').run()" vim.g.nvchad_theme = config.ui.theme @@ -38,3 +89,10 @@ vim.api.nvim_create_autocmd("BufWritePost", { require("base46").load_all_highlights() end, }) + +-------------------------------------- commands ------------------------------------------ +local new_cmd = vim.api.nvim_create_user_command + +new_cmd("NvChadUpdate", function() + require "nvchad.update"() +end, {}) diff --git a/lua/core/options.lua b/lua/core/options.lua deleted file mode 100644 index ee8671c..0000000 --- a/lua/core/options.lua +++ /dev/null @@ -1,55 +0,0 @@ -local opt = vim.opt -local g = vim.g -local config = require("core.utils").load_config() - -g.nvchad_theme = config.ui.theme -g.base46_cache = vim.fn.stdpath "cache" .. "/nvchad/base46/" -g.toggle_theme_icon = "  " -g.transparency = config.ui.transparency - -opt.laststatus = 3 -- global statusline -opt.showmode = false - -opt.clipboard = "unnamedplus" -opt.cursorline = true - --- Indenting -opt.expandtab = true -opt.shiftwidth = 2 -opt.smartindent = true -opt.tabstop = 2 -opt.softtabstop = 2 - -opt.fillchars = { eob = " " } -opt.ignorecase = true -opt.smartcase = true -opt.mouse = "a" - --- Numbers -opt.number = true -opt.numberwidth = 2 -opt.ruler = false - --- disable nvim intro -opt.shortmess:append "sI" - -opt.signcolumn = "yes" -opt.splitbelow = true -opt.splitright = true -opt.termguicolors = true -opt.timeoutlen = 400 -opt.undofile = true - --- interval for writing swap file to disk, also used by gitsigns -opt.updatetime = 250 - --- go to previous/next line with h,l,left arrow and right arrow --- when cursor reaches end/beginning of line -opt.whichwrap:append "<>[]hl" - -g.mapleader = " " - --- disable some default providers -for _, provider in ipairs { "node", "perl", "python3", "ruby" } do - vim.g["loaded_" .. provider .. "_provider"] = 0 -end diff --git a/lua/core/utils.lua b/lua/core/utils.lua index ea8edd0..e95078c 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -8,7 +8,7 @@ M.load_config = function() if chadrc_path then local chadrc = dofile(chadrc_path) - config.mappings = M.remove_disabled_keys(chadrc.mappings, config.mappings) + config.mappings = M.remove_disabled_keys(chadrc.mappings, require "core.mappings") config = merge_tb("force", config, chadrc) end From 1dd3bf5a18dfaed41ad2722ccd0730158773ec4b Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 10 Mar 2023 11:40:24 +0530 Subject: [PATCH 1358/1541] re-add reloading of all custom files --- lua/core/init.lua | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 5205155..a1e529c 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -71,22 +71,39 @@ autocmd("FileType", { end, }) -autocmd("BufWritePost", { - pattern = "chadrc.lua", +local sep = vim.loop.os_uname().sysname:find "windows" and "\\" or "/" + +vim.api.nvim_create_autocmd("BufWritePost", { + pattern = vim.fn.glob( + table.concat({ + vim.fn.stdpath "config", + "lua", + "custom", + "**", + "*.lua", + }, sep), + true, + true, + true + ), + group = vim.api.nvim_create_augroup("ReloadNvChad", {}), - callback = function() + callback = function(opts) require("plenary.reload").reload_module "base46" + local file = string + .gsub(vim.fn.fnamemodify(opts.file, ":r"), vim.fn.stdpath "config" .. sep .. "lua" .. sep, "") + :gsub(sep, ".") + require("plenary.reload").reload_module(file) + require("plenary.reload").reload_module "custom.chadrc" - vim.opt.statusline = "%!v:lua.require('nvchad_ui.statusline." .. config.ui.statusline.theme .. "').run()" vim.g.nvchad_theme = config.ui.theme vim.g.transparency = config.ui.transparency - -- reload cmp stuff - require("plenary.reload").reload_module "plugins.configs.cmp" - require("cmp").setup(require "plugins.configs.cmp") + vim.opt.statusline = "%!v:lua.require('nvchad_ui.statusline." .. config.ui.statusline.theme .. "').run()" require("base46").load_all_highlights() + -- vim.cmd("redraw!") end, }) From acfc5626acff1bec198f7db53e81965bcd113375 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 10 Mar 2023 11:49:54 +0530 Subject: [PATCH 1359/1541] run load_config() before reloading highlights onsaving chadrc --- lua/core/init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/core/init.lua b/lua/core/init.lua index a1e529c..58434f6 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -97,6 +97,8 @@ vim.api.nvim_create_autocmd("BufWritePost", { require("plenary.reload").reload_module(file) require("plenary.reload").reload_module "custom.chadrc" + config = require("core.utils").load_config() + vim.g.nvchad_theme = config.ui.theme vim.g.transparency = config.ui.transparency From 9ed851000ddc1eef3a83cb5d8a3b4c94ec6430a1 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 10 Mar 2023 12:30:31 +0530 Subject: [PATCH 1360/1541] add option for telescope style --- lua/core/default_config.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 7f3eaa2..0a94dce 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -28,6 +28,10 @@ M.ui = { selected_item_bg = "colored", -- colored / simple }, + telescope = { + style = "borderless", -- borderless / bordered + }, + ------------------------------- nvchad_ui modules ----------------------------- statusline = { theme = "default", -- default/vscode/vscode_colored/minimal From 612561a1958c12c9192048ab4768a04cf1d2422d Mon Sep 17 00:00:00 2001 From: Sidhanth Rathod Date: Fri, 10 Mar 2023 23:44:35 +0530 Subject: [PATCH 1361/1541] rm useless badge --- .github/README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/README.md b/.github/README.md index 12484e8..c8435db 100644 --- a/.github/README.md +++ b/.github/README.md @@ -15,12 +15,6 @@
-[![Super Linter](https://img.shields.io/github/workflow/status/NvChad/NvChad/Super-Linter/main?style=flat-square&logo=github&label=Build&color=8DBBE9)]() -License [![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.8.0-blueviolet.svg?style=flat-square&logo=Neovim&color=90E59A&logoColor=white)](https://github.com/neovim/neovim) [![GitHub Issues](https://img.shields.io/github/issues/NvChad/NvChad.svg?style=flat-square&label=Issues&color=d77982)](https://github.com/NvChad/NvChad/issues) [![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/gADmkJb9Fb) From 584268408700e23489950ee8af93ae1b59b49a32 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 11 Mar 2023 12:08:42 +0530 Subject: [PATCH 1362/1541] add mappings btn in nvdash --- lua/core/default_config.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 0a94dce..1cf0934 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -69,6 +69,7 @@ M.ui = { { " Find Word", "Spc f w", "Telescope live_grep" }, { " Bookmarks", "Spc b m", "Telescope marks" }, { " Themes", "Spc t f", "Telescope themes" }, + { " Mappings", "Spc c h", "NvCheatsheet" }, }, }, From 609b5450d5e12fd3c86dd5b5906737071ebdbd2f Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 11 Mar 2023 12:39:13 +0530 Subject: [PATCH 1363/1541] add mappings btn in nvdash --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index cee387f..5130266 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -43,6 +43,7 @@ M.general = { -- new buffer ["b"] = { " enew ", "new buffer" }, + ["ch"] = { " NvCheatsheet ", "Mapping cheatsheet" }, }, t = { @@ -263,7 +264,6 @@ M.telescope = { ["fb"] = { " Telescope buffers ", "find buffers" }, ["fh"] = { " Telescope help_tags ", "help page" }, ["fo"] = { " Telescope oldfiles ", "find oldfiles" }, - ["tk"] = { " Telescope keymaps ", "show keys" }, -- git ["cm"] = { " Telescope git_commits ", "git commits" }, From c205f679123a042a621b62679231aba882b018ef Mon Sep 17 00:00:00 2001 From: Sidhanth Rathod Date: Sun, 12 Mar 2023 13:53:19 +0530 Subject: [PATCH 1364/1541] Update image links --- .github/README.md | 48 ++++++++++++++++------------------------------- 1 file changed, 16 insertions(+), 32 deletions(-) diff --git a/.github/README.md b/.github/README.md index c8435db..f71a6dd 100644 --- a/.github/README.md +++ b/.github/README.md @@ -25,13 +25,11 @@ ## Showcase - - + + -( Zoom in the screenshot ) - - - + + ## What is it? @@ -45,10 +43,11 @@
Images (Click to expand!) -![main themes](https://github.com/NvChad/nvchad.github.io/blob/src/static/img/screenshots/four_Themes.png) -![radium](https://github.com/NvChad/nvchad.github.io/blob/src/static/img/screenshots/radium1.png) -![radium](https://github.com/NvChad/nvchad.github.io/blob/src/static/img/screenshots/radium2.png) -![radium](https://github.com/NvChad/nvchad.github.io/blob/src/static/img/screenshots/radium3.png) +![4 themes](https://nvchad.com/screenshots/four_Themes.webp) +![radium 1](https://nvchad.com/screenshots/radium1.webp) +![radium 2](https://nvchad.com/screenshots/radium2.webp) +![radium 3](https://nvchad.com/screenshots/radium3.webp) + (Note: these are just 4-5 themes, NvChad has around 27+ themes)
@@ -61,42 +60,27 @@ Fast file tree: -
+

Telescope-nvim

A fuzzy file finder, picker, sorter, previewer and much more: -
- -

Indent-blankline.nvim

- -Adds indentline: - -
+

Our own statusline written from scratch

[NvChad UI](https://github.com/NvChad/ui) -
-
+

Tabufline (our own pertab bufferline)

-
-
-
+ +- Here's a [video](https://www.youtube.com/watch?v=V_9iJ96U_k8&ab_channel=siduck) that showcases it. -

Nvim-web-devicons

- -Lua fork of Vim Devicons which offers more file icon customisability: - -
- -

Nvim-treesitter

NvCheatsheet ( our UI Plugin ) + From 08faf1d05a68b409c1c49eed7c8963fab6e28542 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 12 Mar 2023 14:46:19 +0530 Subject: [PATCH 1365/1541] re-add ESC mapping for clearing highlights --- lua/core/mappings.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 5130266..408f7a9 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -16,6 +16,7 @@ M.general = { }, n = { + [""] = { ":noh ", "clear highlights" }, -- switch between windows [""] = { "h", "window left" }, [""] = { "l", "window right" }, From 1e056a7eb49f4b8045a552d131059d57d93668e5 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 12 Mar 2023 18:40:57 +0530 Subject: [PATCH 1366/1541] use main branch example_config in bootstrap --- lua/core/bootstrap.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index c75ef4b..1582e32 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -37,8 +37,6 @@ M.gen_chadrc_template = function() "clone", "--depth", "1", - "-b", - "v2.0", "https://github.com/NvChad/example_config", vim.fn.stdpath "config" .. "/lua/custom", } From 11f30badfaf0e8861926aee8bf9ee7b0785f469c Mon Sep 17 00:00:00 2001 From: Sidhanth Rathod Date: Mon, 13 Mar 2023 19:36:03 +0530 Subject: [PATCH 1367/1541] Fix broken site links in readme (#1814) --- .github/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/README.md b/.github/README.md index f71a6dd..a73e45e 100644 --- a/.github/README.md +++ b/.github/README.md @@ -1,15 +1,15 @@

NvChad

From 521e6f872fa1a81c5f5e175bc77aa8a147d14924 Mon Sep 17 00:00:00 2001 From: Sidhanth Rathod Date: Mon, 13 Mar 2023 23:50:31 +0530 Subject: [PATCH 1368/1541] Update README.md --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index a73e45e..2ac1a6d 100644 --- a/.github/README.md +++ b/.github/README.md @@ -111,7 +111,7 @@ A fuzzy file finder, picker, sorter, previewer and much more: ## :gift_heart: Support -I'm (@siduck) really very sorry to remove the previous charity links but I had to do it for various reasons. A lot has been going here regarding financial issues and I do need some support if it's possible from your end. I haven't graduated yet and it would be great to earn some stuff as that'd help me with daily minor expenses. If you like NvChad and would like to support & appreciate it via donation then I'll gladly accept it. Dont worry! NvChad will still stay alive & active without your donations! I will remove the sponsor button and re-add the charity links once I get a job, probably a year or two. +If you like NvChad and would like to support & appreciate it via donation then I'll gladly accept it. [![kofi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/siduck) [![paypal](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white)](https://paypal.me/siduck76) From 9ae789b332e2812cc94d0ceacbff00bcdc960db3 Mon Sep 17 00:00:00 2001 From: Bruno Krugel Date: Mon, 13 Mar 2023 17:43:13 -0300 Subject: [PATCH 1369/1541] Update default_config.lua --- lua/core/default_config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 1cf0934..d526707 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -68,7 +68,7 @@ M.ui = { { " Recent Files", "Spc f o", "Telescope oldfiles" }, { " Find Word", "Spc f w", "Telescope live_grep" }, { " Bookmarks", "Spc b m", "Telescope marks" }, - { " Themes", "Spc t f", "Telescope themes" }, + { " Themes", "Spc t h", "Telescope themes" }, { " Mappings", "Spc c h", "NvCheatsheet" }, }, }, From caeec36191a0ff0eb5986d30c98daf03d2bf4358 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 14 Mar 2023 06:13:56 +0530 Subject: [PATCH 1370/1541] keep whichkey enabled by default --- lua/plugins/init.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 710d1de..3f2031e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -235,7 +235,6 @@ local default_plugins = { -- Only load whichkey after all the gui { "folke/which-key.nvim", - enabled = false, keys = { "", '"', "'", "`" }, init = require("core.utils").load_mappings "whichkey", opts = function() From 8eaa3666ddd19c26810a918335507e5f02757127 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 14 Mar 2023 06:39:26 +0530 Subject: [PATCH 1371/1541] temporarily silence dofile syntax error during bootstrap we need to find a way to fetch base46 first and then rest of the plugins (during bootstrap) --- lua/core/bootstrap.lua | 1 + lua/plugins/init.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index 1582e32..1ebcb81 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -40,6 +40,7 @@ M.gen_chadrc_template = function() "https://github.com/NvChad/example_config", vim.fn.stdpath "config" .. "/lua/custom", } + print "dont forget to read docs from nvchad.com!" vim.cmd "redraw|echo ''" -- delete .git from that repo diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 3f2031e..8f87589 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -81,7 +81,7 @@ local default_plugins = { return require "plugins.configs.treesitter" end, config = function(_, opts) - dofile(vim.g.base46_cache .. "syntax") + pcall(dofile, vim.g.base46_cache .. "syntax") require("nvim-treesitter.configs").setup(opts) end, }, From 7830f0334f8923e13ecb63c5f2c9ccad9a94cfa6 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 14 Mar 2023 08:07:06 +0530 Subject: [PATCH 1372/1541] add options to disable signature --- lua/core/default_config.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index d526707..efbd5bc 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -76,6 +76,14 @@ M.ui = { cheatsheet = { theme = "grid", -- simple/grid }, + + lsp = { + -- show function signatures i.e args as you type + signature = { + disabled = false, + silent = true, -- silences 'no signature help available' message from appearing + }, + }, } M.plugins = "" -- path i.e "custom.plugins" -> custom/plugins.lua only and not custom/plugins/init.lua!!!! From b2aa30b5aeced04b808df0c8a1717618a0f393ea Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 14 Mar 2023 13:58:12 +0530 Subject: [PATCH 1373/1541] make statusline separators reloadable --- lua/core/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/core/init.lua b/lua/core/init.lua index 58434f6..de521e8 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -73,6 +73,7 @@ autocmd("FileType", { local sep = vim.loop.os_uname().sysname:find "windows" and "\\" or "/" +-- reload some chadrc options on-save vim.api.nvim_create_autocmd("BufWritePost", { pattern = vim.fn.glob( table.concat({ @@ -102,6 +103,8 @@ vim.api.nvim_create_autocmd("BufWritePost", { vim.g.nvchad_theme = config.ui.theme vim.g.transparency = config.ui.transparency + -- statusline + require("plenary.reload").reload_module("nvchad_ui.statusline." .. config.ui.statusline.theme) vim.opt.statusline = "%!v:lua.require('nvchad_ui.statusline." .. config.ui.statusline.theme .. "').run()" require("base46").load_all_highlights() From bb87d70fd6dedce65c67a4390c9faecc55b0ed72 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 14 Mar 2023 19:52:37 +0530 Subject: [PATCH 1374/1541] add an option to disable tabufline --- lua/core/default_config.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index efbd5bc..7d8c4ea 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -43,6 +43,7 @@ M.ui = { -- lazyload it when there are 1+ buffers tabufline = { + enabled = true, lazyload = true, overriden_modules = nil, }, From a5833730d7808091017bd137a54501f87b2341d3 Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Fri, 17 Mar 2023 23:41:19 +0900 Subject: [PATCH 1375/1541] fix #1832 --- lua/core/init.lua | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index de521e8..a671a88 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -71,18 +71,10 @@ autocmd("FileType", { end, }) -local sep = vim.loop.os_uname().sysname:find "windows" and "\\" or "/" - -- reload some chadrc options on-save vim.api.nvim_create_autocmd("BufWritePost", { pattern = vim.fn.glob( - table.concat({ - vim.fn.stdpath "config", - "lua", - "custom", - "**", - "*.lua", - }, sep), + vim.fs.normalize(vim.fn.stdpath("config") .. "/lua/custom/**/*.lua"), true, true, true From 9dcaefd73f7985c43cfaff4f55fdef665224b87f Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 17 Mar 2023 20:58:22 +0530 Subject: [PATCH 1376/1541] add variable for path seperators --- lua/core/init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/core/init.lua b/lua/core/init.lua index a671a88..2215085 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -72,6 +72,8 @@ autocmd("FileType", { }) -- reload some chadrc options on-save +local sep = vim.loop.os_uname().sysname:find "windows" and "\\" or "/" + vim.api.nvim_create_autocmd("BufWritePost", { pattern = vim.fn.glob( vim.fs.normalize(vim.fn.stdpath("config") .. "/lua/custom/**/*.lua"), From 3563b5af83c6c0697cdf510a39988ece8717eb6d Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Sat, 18 Mar 2023 12:40:36 +0900 Subject: [PATCH 1377/1541] normalize all paths --- lua/core/init.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 2215085..aadc235 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -72,24 +72,24 @@ autocmd("FileType", { }) -- reload some chadrc options on-save -local sep = vim.loop.os_uname().sysname:find "windows" and "\\" or "/" +local sep = is_windows and "\\" or "/" vim.api.nvim_create_autocmd("BufWritePost", { - pattern = vim.fn.glob( - vim.fs.normalize(vim.fn.stdpath("config") .. "/lua/custom/**/*.lua"), + pattern = vim.tbl_map(vim.fs.normalize, vim.fn.glob( + vim.fn.stdpath("config") .. "/lua/custom/**/*.lua", true, true, true - ), - + )), group = vim.api.nvim_create_augroup("ReloadNvChad", {}), callback = function(opts) + -- print("smadge") + local fp = vim.fn.fnamemodify(vim.fs.normalize(opts.file), ":r") --[[@as string]] + local app_name = vim.env.NVIM_APPNAME or "nvim" + local module = string.gsub(fp, ".*/" .. app_name .. "/lua/", ""):gsub("/", ".") require("plenary.reload").reload_module "base46" - local file = string - .gsub(vim.fn.fnamemodify(opts.file, ":r"), vim.fn.stdpath "config" .. sep .. "lua" .. sep, "") - :gsub(sep, ".") - require("plenary.reload").reload_module(file) + require("plenary.reload").reload_module(module) require("plenary.reload").reload_module "custom.chadrc" config = require("core.utils").load_config() From 3353abb499caf0801a64460f25046c55cc186509 Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Sat, 18 Mar 2023 12:41:29 +0900 Subject: [PATCH 1378/1541] remove unused var --- lua/core/init.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index aadc235..7c88b5d 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -72,8 +72,6 @@ autocmd("FileType", { }) -- reload some chadrc options on-save -local sep = is_windows and "\\" or "/" - vim.api.nvim_create_autocmd("BufWritePost", { pattern = vim.tbl_map(vim.fs.normalize, vim.fn.glob( vim.fn.stdpath("config") .. "/lua/custom/**/*.lua", From 8214d4e8589aa6625c6db077b8eb199e7ebc1929 Mon Sep 17 00:00:00 2001 From: Pham Huy Hoang Date: Sat, 18 Mar 2023 14:14:42 +0900 Subject: [PATCH 1379/1541] fix NVIM_APPNAME --- lua/core/init.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 7c88b5d..576c1cb 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -82,10 +82,9 @@ vim.api.nvim_create_autocmd("BufWritePost", { group = vim.api.nvim_create_augroup("ReloadNvChad", {}), callback = function(opts) - -- print("smadge") - local fp = vim.fn.fnamemodify(vim.fs.normalize(opts.file), ":r") --[[@as string]] - local app_name = vim.env.NVIM_APPNAME or "nvim" - local module = string.gsub(fp, ".*/" .. app_name .. "/lua/", ""):gsub("/", ".") + local fp = vim.fn.fnamemodify(vim.fs.normalize(vim.api.nvim_buf_get_name(opts.buf)), ":r") --[[@as string]] + local app_name = vim.env.NVIM_APPNAME and vim.env.NVIM_APPNAME or "nvim" + local module = string.gsub(fp, "^.*/" .. app_name .. "/lua/", ""):gsub("/", ".") require("plenary.reload").reload_module "base46" require("plenary.reload").reload_module(module) require("plenary.reload").reload_module "custom.chadrc" From edb80f4e0ca4b05ae1053d9e5d35e0f5c168d5a4 Mon Sep 17 00:00:00 2001 From: Diogo-ss Date: Mon, 20 Mar 2023 19:09:12 -0300 Subject: [PATCH 1380/1541] fix: text in readme.md --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index 2ac1a6d..ef91d2f 100644 --- a/.github/README.md +++ b/.github/README.md @@ -86,7 +86,7 @@ A fuzzy file finder, picker, sorter, previewer and much more: ## Plugins list -- Many beautiful themes, theme toggler by [our base46 plugin](https://github.com/NvChad/base46) +- Many beautiful themes, theme toggler by our [base46 plugin](https://github.com/NvChad/base46) - Inbuilt terminal toggling & management with [Nvterm](https://github.com/NvChad/nvterm) - NvChad updater, hide & unhide terminal buffers with [NvChad extensions](https://github.com/NvChad/extensions) - Lightweight & performant ui plugin with [NvChad UI](https://github.com/NvChad/ui) From d1d25231cd7cf30f2ad8f2744734209c19167925 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 22 Mar 2023 15:51:49 +0530 Subject: [PATCH 1381/1541] update nvim version in readme badge --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index ef91d2f..0a7d659 100644 --- a/.github/README.md +++ b/.github/README.md @@ -15,7 +15,7 @@
-[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.8.0-blueviolet.svg?style=flat-square&logo=Neovim&color=90E59A&logoColor=white)](https://github.com/neovim/neovim) +[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.8.3-blueviolet.svg?style=flat-square&logo=Neovim&color=90E59A&logoColor=white)](https://github.com/neovim/neovim) [![GitHub Issues](https://img.shields.io/github/issues/NvChad/NvChad.svg?style=flat-square&label=Issues&color=d77982)](https://github.com/NvChad/NvChad/issues) [![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/gADmkJb9Fb) [![Matrix](https://img.shields.io/badge/Matrix-40aa8b.svg?style=flat-square&logo=Matrix&logoColor=white)](https://matrix.to/#/#nvchad:matrix.org) From 208c31f2ba7bfa98ff546daf3e47bedc31e6b467 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 22 Mar 2023 15:54:04 +0530 Subject: [PATCH 1382/1541] rm outdated info in readme --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index 0a7d659..d5e4946 100644 --- a/.github/README.md +++ b/.github/README.md @@ -49,7 +49,7 @@ ![radium 3](https://nvchad.com/screenshots/radium3.webp) -(Note: these are just 4-5 themes, NvChad has around 27+ themes) +(Note: these are just 4-5 themes, NvChad has around 56 themes) ## UI related plugins used From effec96b538319c6091194f59407d6d6b265dda0 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 23 Mar 2023 16:00:06 +0530 Subject: [PATCH 1383/1541] luasnip: add globals for various types of snippets --- lua/plugins/configs/others.lua | 17 ++++++++++++----- lua/plugins/init.lua | 5 +++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 1952385..874a0b6 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -22,13 +22,20 @@ M.blankline = { show_current_context_start = true, } -M.luasnip = function() - local options = { history = true, updateevents = "TextChanged,TextChangedI" } +M.luasnip = function(opts) + require("luasnip").config.set_config(opts) - require("luasnip").config.set_config(options) - - require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.luasnippets_path or "" } + -- vscode format require("luasnip.loaders.from_vscode").lazy_load() + require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" } + + -- snipmate format + require("luasnip.loaders.from_snipmate").load() + require("luasnip.loaders.from_snipmate").lazy_load { paths = vim.g.snipmate_snippets_path or "" } + + -- lua format + require("luasnip.loaders.from_lua").load() + require("luasnip.loaders.from_lua").lazy_load { paths = vim.g.lua_snippets_path or "" } vim.api.nvim_create_autocmd("InsertLeave", { callback = function() diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 8f87589..70e14c0 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -149,8 +149,9 @@ local default_plugins = { -- snippet plugin "L3MON4D3/LuaSnip", dependencies = "rafamadriz/friendly-snippets", - config = function() - require("plugins.configs.others").luasnip() + opts = { history = true, updateevents = "TextChanged,TextChangedI" }, + config = function(_, opts) + require("plugins.configs.others").luasnip(opts) end, }, From 84bdc2335cf46032f7b8fa9a8b2a6aa9901751e6 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 23 Mar 2023 16:09:43 +0530 Subject: [PATCH 1384/1541] save nvchad cache at nvim data dir many a time the user clears the cache dir and that results in deletion of base46 cache too which would prevent nvchad to function --- lua/core/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 576c1cb..4bb53a4 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -4,7 +4,7 @@ local config = require("core.utils").load_config() -------------------------------------- globals ----------------------------------------- g.nvchad_theme = config.ui.theme -g.base46_cache = vim.fn.stdpath "cache" .. "/nvchad/base46/" +g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" g.toggle_theme_icon = "  " g.transparency = config.ui.transparency From 7ec4515179db970bf5728143e4d92072a536179d Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 24 Mar 2023 04:35:54 +0530 Subject: [PATCH 1385/1541] boostrap mason packages properly print some message when nvchad is totally setup --- lua/core/bootstrap.lua | 37 ++++++++++++++++++++++------------- lua/core/init.lua | 11 +++++------ lua/plugins/configs/mason.lua | 2 +- lua/plugins/init.lua | 2 ++ 4 files changed, 31 insertions(+), 21 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index 1ebcb81..dd0234f 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -16,12 +16,29 @@ M.lazy = function(install_path) -- install plugins + compile their configs require "plugins" - vim.api.nvim_buf_delete(0, { force = true }) -- close lazy window - vim.defer_fn(function() - vim.cmd "silent! MasonInstallAll" - end, 0) + -- install mason packages + vim.schedule(function() + vim.cmd "Mason" + local packages = {} + + for _, pkg_name in ipairs(vim.g.mason_binaries_list) do + packages[pkg_name] = true + vim.cmd("MasonInstall " .. pkg_name) + end + + require("mason-registry"):on("package:install:success", function(pkg) + packages[pkg.name] = nil + + if vim.tbl_count(packages) == 0 then + vim.schedule(function() + vim.api.nvim_buf_delete(0, { force = true }) + vim.notify("Now please read the docs at nvchad.com!") -- WIP, show a nice screen after it + end) + end + end) + end) end M.gen_chadrc_template = function() @@ -40,7 +57,7 @@ M.gen_chadrc_template = function() "https://github.com/NvChad/example_config", vim.fn.stdpath "config" .. "/lua/custom", } - print "dont forget to read docs from nvchad.com!" + vim.cmd "redraw|echo ''" -- delete .git from that repo @@ -51,16 +68,8 @@ M.gen_chadrc_template = function() local custom_dir = vim.fn.stdpath "config" .. "/lua/custom/" vim.fn.mkdir(custom_dir, "p") - local str = [[ - local M = {} - M.ui = { - theme = "onedark", - } - return M - ]] - local file = io.open(custom_dir .. "chadrc.lua", "w") - file:write(str) + file:write("local M = {} \n M.ui = { theme = 'onedark' } \n return M") file:close() end end diff --git a/lua/core/init.lua b/lua/core/init.lua index 4bb53a4..8fe26e2 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -73,18 +73,17 @@ autocmd("FileType", { -- reload some chadrc options on-save vim.api.nvim_create_autocmd("BufWritePost", { - pattern = vim.tbl_map(vim.fs.normalize, vim.fn.glob( - vim.fn.stdpath("config") .. "/lua/custom/**/*.lua", - true, - true, - true - )), + pattern = vim.tbl_map( + vim.fs.normalize, + vim.fn.glob(vim.fn.stdpath "config" .. "/lua/custom/**/*.lua", true, true, true) + ), group = vim.api.nvim_create_augroup("ReloadNvChad", {}), callback = function(opts) local fp = vim.fn.fnamemodify(vim.fs.normalize(vim.api.nvim_buf_get_name(opts.buf)), ":r") --[[@as string]] local app_name = vim.env.NVIM_APPNAME and vim.env.NVIM_APPNAME or "nvim" local module = string.gsub(fp, "^.*/" .. app_name .. "/lua/", ""):gsub("/", ".") + require("plenary.reload").reload_module "base46" require("plenary.reload").reload_module(module) require("plenary.reload").reload_module "custom.chadrc" diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua index 8ccc313..bcc8a38 100644 --- a/lua/plugins/configs/mason.lua +++ b/lua/plugins/configs/mason.lua @@ -1,5 +1,5 @@ local options = { - ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim + ensure_installed = { "lua-language-server", "stylua" }, -- not an option from mason.nvim PATH = "skip", diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 70e14c0..60b528f 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -129,6 +129,8 @@ local default_plugins = { vim.api.nvim_create_user_command("MasonInstallAll", function() vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " ")) end, {}) + + vim.g.mason_binaries_list = opts.ensure_installed end, }, From 59cee93fcef556fa2b7a35e85eda3a9512ed1a78 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 24 Mar 2023 05:27:09 +0530 Subject: [PATCH 1386/1541] reduce loc in boostrap.lua --- lua/core/bootstrap.lua | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index dd0234f..a4488e6 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -3,14 +3,8 @@ local M = {} M.lazy = function(install_path) print "Bootstrapping lazy.nvim .." - vim.fn.system { - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - install_path, - } + local repo = "https://github.com/folke/lazy.nvim.git" + vim.fn.system { "git", "clone", "--filter=blob:none", "--branch=stable", repo, install_path } vim.opt.rtp:prepend(install_path) @@ -20,21 +14,16 @@ M.lazy = function(install_path) -- install mason packages vim.schedule(function() - vim.cmd "Mason" - local packages = {} - - for _, pkg_name in ipairs(vim.g.mason_binaries_list) do - packages[pkg_name] = true - vim.cmd("MasonInstall " .. pkg_name) - end + vim.cmd "MasonInstallAll" + local packages = table.concat(vim.g.mason_binaries_list, " ") require("mason-registry"):on("package:install:success", function(pkg) - packages[pkg.name] = nil + packages = string.gsub(packages, pkg.name:gsub("%-", "%%-"), "") -- rm package name - if vim.tbl_count(packages) == 0 then + if packages:match "%S" == nil then vim.schedule(function() vim.api.nvim_buf_delete(0, { force = true }) - vim.notify("Now please read the docs at nvchad.com!") -- WIP, show a nice screen after it + vim.notify "Now please read the docs at nvchad.com!" -- WIP, show a nice screen after it end) end end) @@ -49,14 +38,9 @@ M.gen_chadrc_template = function() if input == "y" then print "cloning chadrc starter template repo...." - vim.fn.system { - "git", - "clone", - "--depth", - "1", - "https://github.com/NvChad/example_config", - vim.fn.stdpath "config" .. "/lua/custom", - } + local repo = "https://github.com/NvChad/example_config" + local install_path = vim.fn.stdpath "config" .. "/lua/custom" + vim.fn.system { "git", "clone", "--depth", "1", repo, install_path } vim.cmd "redraw|echo ''" @@ -69,7 +53,7 @@ M.gen_chadrc_template = function() vim.fn.mkdir(custom_dir, "p") local file = io.open(custom_dir .. "chadrc.lua", "w") - file:write("local M = {} \n M.ui = { theme = 'onedark' } \n return M") + file:write "local M = {} \n M.ui = { theme = 'onedark' } \n return M" file:close() end end From 0678b329dc1e382ff7d434cc21c87fbfd055a346 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 24 Mar 2023 23:16:13 +0530 Subject: [PATCH 1387/1541] give priority to defaults hl groups cache fixes https://github.com/NvChad/base46/issues/173, not adding this will let plugins like vim-matchup messup our syntax highlight groups --- init.lua | 2 -- lua/plugins/init.lua | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index f58c94e..64fca35 100644 --- a/init.lua +++ b/init.lua @@ -18,5 +18,3 @@ end vim.opt.rtp:prepend(lazypath) require "plugins" - -dofile(vim.g.base46_cache .. "defaults") diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 60b528f..8f72fa6 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -19,8 +19,10 @@ local default_plugins = { "NvChad/ui", branch = "v2.0", lazy = false, + priority = 1000, config = function() require "nvchad_ui" + dofile(vim.g.base46_cache .. "defaults") end, }, From 432b2c1cf179f0e9c5e8e27873717c311e5bb079 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 25 Mar 2023 05:48:09 +0530 Subject: [PATCH 1388/1541] just load default bas46 cache instead of giving it lazy priority https://github.com/NvChad/base46/issues/173 --- init.lua | 2 ++ lua/plugins/init.lua | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 64fca35..a790473 100644 --- a/init.lua +++ b/init.lua @@ -8,6 +8,8 @@ end require("core.utils").load_mappings() +dofile(vim.g.base46_cache .. "defaults") + local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" -- bootstrap lazy.nvim! diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 8f72fa6..60b528f 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -19,10 +19,8 @@ local default_plugins = { "NvChad/ui", branch = "v2.0", lazy = false, - priority = 1000, config = function() require "nvchad_ui" - dofile(vim.g.base46_cache .. "defaults") end, }, From ed03799697514d95720b05d6f6078948f5800e8a Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 25 Mar 2023 08:15:53 +0530 Subject: [PATCH 1389/1541] load defaults cache after lazypath check not having this will create that dofile error that the file isnt present as the file gets created only when base46 compiles and which occurs during boostrapping lazy.nvim --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index a790473..9d84f6e 100644 --- a/init.lua +++ b/init.lua @@ -8,7 +8,6 @@ end require("core.utils").load_mappings() -dofile(vim.g.base46_cache .. "defaults") local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" @@ -18,5 +17,6 @@ if not vim.loop.fs_stat(lazypath) then require("core.bootstrap").lazy(lazypath) end +dofile(vim.g.base46_cache .. "defaults") vim.opt.rtp:prepend(lazypath) require "plugins" From 609000db5b03aa26d2c1d69dc726b9879539200d Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 26 Mar 2023 15:52:41 +0530 Subject: [PATCH 1390/1541] bootstrap base46 before lazy fix https://github.com/NvChad/base46/issues/166 --- init.lua | 2 +- lua/core/bootstrap.lua | 30 +++++++++++++++++++----------- lua/plugins/init.lua | 2 +- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/init.lua b/init.lua index 9d84f6e..2de4ae5 100644 --- a/init.lua +++ b/init.lua @@ -8,11 +8,11 @@ end require("core.utils").load_mappings() - local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" -- bootstrap lazy.nvim! if not vim.loop.fs_stat(lazypath) then + require("core.bootstrap").base46() require("core.bootstrap").gen_chadrc_template() require("core.bootstrap").lazy(lazypath) end diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index a4488e6..787feab 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -1,7 +1,20 @@ local M = {} +M.base46 = function() + vim.notify " Compiling base46 theme to bytecode ..." + + local repo = "https://github.com/NvChad/base46" + local tmp_path = vim.fn.stdpath "config" .. "/tmp_base46" + + vim.fn.system { "git", "clone", "--depth", "1", "-b", "v2.0", repo, tmp_path } + vim.opt.rtp:prepend(tmp_path) + require("base46").compile() + + vim.fn.delete(tmp_path, "rf") +end + M.lazy = function(install_path) - print "Bootstrapping lazy.nvim .." + vim.cmd "redraw|echo '' | echo ' Installing lazy.nvim & plugins ..'" local repo = "https://github.com/folke/lazy.nvim.git" vim.fn.system { "git", "clone", "--filter=blob:none", "--branch=stable", repo, install_path } @@ -23,7 +36,7 @@ M.lazy = function(install_path) if packages:match "%S" == nil then vim.schedule(function() vim.api.nvim_buf_delete(0, { force = true }) - vim.notify "Now please read the docs at nvchad.com!" -- WIP, show a nice screen after it + vim.api.nvim_echo({ { "Now please read the docs at nvchad.com!! 󰕹 󰱬 ", "NvimInternalError" } }, true, {}) end) end end) @@ -33,28 +46,23 @@ end M.gen_chadrc_template = function() if not vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1] then local input = vim.fn.input "Do you want to install chadrc template? (y/n) : " - vim.cmd "redraw|echo ''" if input == "y" then - print "cloning chadrc starter template repo...." + vim.cmd "redraw|echo '' | echo 'cloning chadrc starter template repo..'" local repo = "https://github.com/NvChad/example_config" local install_path = vim.fn.stdpath "config" .. "/lua/custom" vim.fn.system { "git", "clone", "--depth", "1", repo, install_path } - vim.cmd "redraw|echo ''" - -- delete .git from that repo - vim.loop.fs_rmdir(vim.fn.stdpath "config" .. "/lua/custom/.git") - vim.notify "successfully installed chadrc template!" - vim.cmd "redraw|echo ''" + vim.fn.delete(vim.fn.stdpath "config" .. "/lua/custom/.git", "rf") + vim.cmd "redraw|echo '' | echo 'successfully installed chadrc template!'" else local custom_dir = vim.fn.stdpath "config" .. "/lua/custom/" vim.fn.mkdir(custom_dir, "p") local file = io.open(custom_dir .. "chadrc.lua", "w") - file:write "local M = {} \n M.ui = { theme = 'onedark' } \n return M" - file:close() + file:write("local M = {}\n M.ui = {theme = 'onedark'}\n return M"):close() end end end diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 60b528f..9bd34e8 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -81,7 +81,7 @@ local default_plugins = { return require "plugins.configs.treesitter" end, config = function(_, opts) - pcall(dofile, vim.g.base46_cache .. "syntax") + dofile(vim.g.base46_cache .. "syntax") require("nvim-treesitter.configs").setup(opts) end, }, From 79805b7fea9638656b4398b6e83b73529d7d0ccf Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 27 Mar 2023 05:27:57 +0530 Subject: [PATCH 1391/1541] bootstrap: clone base46 to lazy path instead of tmpdir --- init.lua | 1 - lua/core/bootstrap.lua | 43 +++++++++++++++++++---------------- lua/plugins/configs/mason.lua | 2 +- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/init.lua b/init.lua index 2de4ae5..21f0b6f 100644 --- a/init.lua +++ b/init.lua @@ -12,7 +12,6 @@ local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" -- bootstrap lazy.nvim! if not vim.loop.fs_stat(lazypath) then - require("core.bootstrap").base46() require("core.bootstrap").gen_chadrc_template() require("core.bootstrap").lazy(lazypath) end diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index 787feab..bb547ef 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -1,31 +1,33 @@ local M = {} -M.base46 = function() - vim.notify " Compiling base46 theme to bytecode ..." - - local repo = "https://github.com/NvChad/base46" - local tmp_path = vim.fn.stdpath "config" .. "/tmp_base46" - - vim.fn.system { "git", "clone", "--depth", "1", "-b", "v2.0", repo, tmp_path } - vim.opt.rtp:prepend(tmp_path) - require("base46").compile() - - vim.fn.delete(tmp_path, "rf") +M.echo = function(str) + vim.cmd "redraw" + vim.api.nvim_echo({ { str, "Bold" } }, true, {}) end M.lazy = function(install_path) - vim.cmd "redraw|echo '' | echo ' Installing lazy.nvim & plugins ..'" + ------------- base46 --------------- + local lazy_path = vim.fn.stdpath "data" .. "/lazy/base46" + M.echo " Compiling base46 theme to bytecode ..." + + local base46_repo = "https://github.com/NvChad/base46" + vim.fn.system { "git", "clone", "--depth", "1", "-b", "v2.0", base46_repo, lazy_path } + vim.opt.rtp:prepend(lazy_path) + + require("base46").compile() + + --------- lazy.nvim --------------- + M.echo " Installing lazy.nvim & plugins ..." local repo = "https://github.com/folke/lazy.nvim.git" vim.fn.system { "git", "clone", "--filter=blob:none", "--branch=stable", repo, install_path } - vim.opt.rtp:prepend(install_path) - -- install plugins + compile their configs + -- install plugins require "plugins" vim.api.nvim_buf_delete(0, { force = true }) -- close lazy window - -- install mason packages + ---------- mason packages ------------- vim.schedule(function() vim.cmd "MasonInstallAll" local packages = table.concat(vim.g.mason_binaries_list, " ") @@ -36,7 +38,7 @@ M.lazy = function(install_path) if packages:match "%S" == nil then vim.schedule(function() vim.api.nvim_buf_delete(0, { force = true }) - vim.api.nvim_echo({ { "Now please read the docs at nvchad.com!! 󰕹 󰱬 ", "NvimInternalError" } }, true, {}) + M.echo "Now please read the docs at nvchad.com!! 󰕹 󰱬" end) end end) @@ -45,10 +47,10 @@ end M.gen_chadrc_template = function() if not vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1] then - local input = vim.fn.input "Do you want to install chadrc template? (y/n) : " + local input = vim.fn.input "Do you want to install example custom config? (y/n) : " if input == "y" then - vim.cmd "redraw|echo '' | echo 'cloning chadrc starter template repo..'" + M.echo "cloning example custom config repo ..." local repo = "https://github.com/NvChad/example_config" local install_path = vim.fn.stdpath "config" .. "/lua/custom" @@ -56,13 +58,14 @@ M.gen_chadrc_template = function() -- delete .git from that repo vim.fn.delete(vim.fn.stdpath "config" .. "/lua/custom/.git", "rf") - vim.cmd "redraw|echo '' | echo 'successfully installed chadrc template!'" + M.echo "successfully installed example custom config!" else local custom_dir = vim.fn.stdpath "config" .. "/lua/custom/" vim.fn.mkdir(custom_dir, "p") local file = io.open(custom_dir .. "chadrc.lua", "w") - file:write("local M = {}\n M.ui = {theme = 'onedark'}\n return M"):close() + file:write "local M = {}\n M.ui = {theme = 'onedark'}\n return M" + file:close() end end end diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua index bcc8a38..8ccc313 100644 --- a/lua/plugins/configs/mason.lua +++ b/lua/plugins/configs/mason.lua @@ -1,5 +1,5 @@ local options = { - ensure_installed = { "lua-language-server", "stylua" }, -- not an option from mason.nvim + ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim PATH = "skip", From d7f91016a864f1397d24c899d4f9a4d4b42e2945 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 27 Mar 2023 05:34:12 +0530 Subject: [PATCH 1392/1541] bootstrap.lua: rm useless variables --- lua/core/bootstrap.lua | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index bb547ef..ecd441c 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -47,23 +47,17 @@ end M.gen_chadrc_template = function() if not vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1] then + local path = vim.fn.stdpath "config" .. "/lua/custom/" local input = vim.fn.input "Do you want to install example custom config? (y/n) : " if input == "y" then M.echo "cloning example custom config repo ..." - - local repo = "https://github.com/NvChad/example_config" - local install_path = vim.fn.stdpath "config" .. "/lua/custom" - vim.fn.system { "git", "clone", "--depth", "1", repo, install_path } - - -- delete .git from that repo - vim.fn.delete(vim.fn.stdpath "config" .. "/lua/custom/.git", "rf") - M.echo "successfully installed example custom config!" + vim.fn.system { "git", "clone", "--depth", "1", "https://github.com/NvChad/example_config", path } + vim.fn.delete(path .. ".git", "rf") else - local custom_dir = vim.fn.stdpath "config" .. "/lua/custom/" - vim.fn.mkdir(custom_dir, "p") + vim.fn.mkdir(path, "p") - local file = io.open(custom_dir .. "chadrc.lua", "w") + local file = io.open(path .. "chadrc.lua", "w") file:write "local M = {}\n M.ui = {theme = 'onedark'}\n return M" file:close() end From 55de4b9c8509bcf018ac2e36650963b971ac8583 Mon Sep 17 00:00:00 2001 From: Daniel Boll <43689101+Daniel-Boll@users.noreply.github.com> Date: Tue, 28 Mar 2023 13:08:37 +0000 Subject: [PATCH 1393/1541] fix(cmp): lsp suggestions before snippets --- lua/plugins/configs/cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 3bbc557..32e0129 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -105,8 +105,8 @@ local options = { }), }, sources = { - { name = "luasnip" }, { name = "nvim_lsp" }, + { name = "luasnip" }, { name = "buffer" }, { name = "nvim_lua" }, { name = "path" }, From c77c086365f8bd81334d5a39b732664da232356b Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 29 Mar 2023 07:41:21 +0530 Subject: [PATCH 1394/1541] add nvimtree_side global in nvimtree config func https://github.com/NvChad/ui/issues/68 also clean some lazy.nvim related variables --- lua/core/default_config.lua | 2 +- lua/plugins/configs/nvimtree.lua | 2 -- lua/plugins/init.lua | 6 ++---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 7d8c4ea..bf143d2 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -89,7 +89,7 @@ M.ui = { M.plugins = "" -- path i.e "custom.plugins" -> custom/plugins.lua only and not custom/plugins/init.lua!!!! -M.lazy_nvim = {} -- config for lazy.nvim startup options +M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startup options -- these are default mappings, check core.mappings for table structure M.mappings = {} diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 0fda31c..6cafb04 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -73,6 +73,4 @@ local options = { }, } -vim.g.nvimtree_side = options.view.side - return options diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 9bd34e8..82b549f 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -211,6 +211,7 @@ local default_plugins = { config = function(_, opts) dofile(vim.g.base46_cache .. "nvimtree") require("nvim-tree").setup(opts) + vim.g.nvimtree_side = opts.view.side end, }, @@ -256,7 +257,4 @@ if #config.plugins > 0 then table.insert(default_plugins, { import = config.plugins }) end --- lazy_nvim startup opts -local lazy_config = vim.tbl_deep_extend("force", require "plugins.configs.lazy_nvim", config.lazy_nvim) - -require("lazy").setup(default_plugins, lazy_config) +require("lazy").setup(default_plugins, config.lazy_nvim) From ffdb4fc5e5bc619f4bb4f7bc4680fb1b9d11fb6b Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 30 Mar 2023 18:23:16 +0530 Subject: [PATCH 1395/1541] add show_numbers option to tabufline config https://github.com/NvChad/ui/commit/87525fa3cd330b594261de7b63976ee66909af43 --- lua/core/default_config.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index bf143d2..f09fad0 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -43,6 +43,7 @@ M.ui = { -- lazyload it when there are 1+ buffers tabufline = { + show_numbers = false, enabled = true, lazyload = true, overriden_modules = nil, From 800d066aab05f9c04d9e675e528c49cabf8ddc8c Mon Sep 17 00:00:00 2001 From: Daniel Boll <43689101+Daniel-Boll@users.noreply.github.com> Date: Thu, 30 Mar 2023 23:44:25 +0000 Subject: [PATCH 1396/1541] feat(bootstrap): indicate that no is the default answer Indicates that the default answer would be *no* if the user provide any input other than `y` --- lua/core/bootstrap.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index ecd441c..2f435d9 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -48,7 +48,7 @@ end M.gen_chadrc_template = function() if not vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1] then local path = vim.fn.stdpath "config" .. "/lua/custom/" - local input = vim.fn.input "Do you want to install example custom config? (y/n) : " + local input = vim.fn.input "Do you want to install example custom config? (y/N) : " if input == "y" then M.echo "cloning example custom config repo ..." From 8ec2cb3b76f902553abee6093cabc69511a86bf8 Mon Sep 17 00:00:00 2001 From: waneon Date: Fri, 31 Mar 2023 09:19:45 +0900 Subject: [PATCH 1397/1541] feat: Increase visibility of floating diagnostic --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 408f7a9..1731fba 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -186,7 +186,7 @@ M.lspconfig = { ["f"] = { function() - vim.diagnostic.open_float() + vim.diagnostic.open_float { border = "rounded" } end, "floating diagnostic", }, From a5906e48fb4476f11f5104e1eab189cc03f49eca Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 1 Apr 2023 12:47:42 +0530 Subject: [PATCH 1398/1541] use function in init opts for all plugins if this isnt done then disabling a plugin will still have its init opt called, read https://github.com/NvChad/NvChad/discussions/1879 --- lua/core/mappings.lua | 1 - lua/plugins/init.lua | 32 ++++++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 1731fba..b6e0140 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -329,7 +329,6 @@ M.nvterm = { }, -- new - ["h"] = { function() require("nvterm.terminal").new "horizontal" diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 82b549f..5c5c0e4 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -26,7 +26,9 @@ local default_plugins = { { "NvChad/nvterm", - init = require("core.utils").load_mappings "nvterm", + init = function() + require("core.utils").load_mappings "nvterm" + end, config = function(_, opts) require "base46.term" require("nvterm").setup(opts) @@ -35,7 +37,9 @@ local default_plugins = { { "NvChad/nvim-colorizer.lua", - init = require("core.utils").lazy_load "nvim-colorizer.lua", + init = function() + require("core.utils").lazy_load "nvim-colorizer.lua" + end, config = function(_, opts) require("colorizer").setup(opts) @@ -74,7 +78,9 @@ local default_plugins = { { "nvim-treesitter/nvim-treesitter", - init = require("core.utils").lazy_load "nvim-treesitter", + init = function() + require("core.utils").lazy_load "nvim-treesitter" + end, cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" }, build = ":TSUpdate", opts = function() @@ -136,7 +142,9 @@ local default_plugins = { { "neovim/nvim-lspconfig", - init = require("core.utils").lazy_load "nvim-lspconfig", + init = function() + require("core.utils").lazy_load "nvim-lspconfig" + end, config = function() require "plugins.configs.lspconfig" end, @@ -194,7 +202,9 @@ local default_plugins = { { "numToStr/Comment.nvim", -- keys = { "gc", "gb" }, - init = require("core.utils").load_mappings "comment", + init = function() + require("core.utils").load_mappings "comment" + end, config = function() require("Comment").setup() end, @@ -204,7 +214,9 @@ local default_plugins = { { "nvim-tree/nvim-tree.lua", cmd = { "NvimTreeToggle", "NvimTreeFocus" }, - init = require("core.utils").load_mappings "nvimtree", + init = function() + require("core.utils").load_mappings "nvimtree" + end, opts = function() return require "plugins.configs.nvimtree" end, @@ -218,7 +230,9 @@ local default_plugins = { { "nvim-telescope/telescope.nvim", cmd = "Telescope", - init = require("core.utils").load_mappings "telescope", + init = function() + require("core.utils").load_mappings "telescope" + end, opts = function() return require "plugins.configs.telescope" @@ -240,7 +254,9 @@ local default_plugins = { { "folke/which-key.nvim", keys = { "", '"', "'", "`" }, - init = require("core.utils").load_mappings "whichkey", + init = function() + require("core.utils").load_mappings "whichkey" + end, opts = function() return require "plugins.configs.whichkey" end, From 4d455974688392abf0d8e420bc5099d1e0bd3204 Mon Sep 17 00:00:00 2001 From: Ashish Date: Sun, 2 Apr 2023 21:26:21 +0100 Subject: [PATCH 1399/1541] gitsign: handling file path with spaces --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 5c5c0e4..19e212e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -101,7 +101,7 @@ local default_plugins = { vim.api.nvim_create_autocmd({ "BufRead" }, { group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }), callback = function() - vim.fn.system("git -C " .. vim.fn.expand "%:p:h" .. " rev-parse") + vim.fn.system("git -C " .. '"' .. vim.fn.expand "%:p:h" .. '"' .. " rev-parse") if vim.v.shell_error == 0 then vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad" vim.schedule(function() From 1754a23e65f1b9e36904da330688ee8bd7ba5b56 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 4 Apr 2023 05:31:43 +0530 Subject: [PATCH 1400/1541] add nvimtree option to preserve window proportions (#1597) --- lua/plugins/configs/nvimtree.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 6cafb04..875fa5b 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -17,6 +17,7 @@ local options = { side = "left", width = 30, hide_root_folder = true, + preserve_window_proportions = true, }, git = { enable = false, From 0619ef4e1ef2e43f0bb29d53a3cec21622bda271 Mon Sep 17 00:00:00 2001 From: hoangnh280 Date: Wed, 5 Apr 2023 09:56:14 +0700 Subject: [PATCH 1401/1541] fix(mappings): fix description of j key in x mode --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index b6e0140..51b7713 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -57,7 +57,7 @@ M.general = { }, x = { - ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move left", opts = { expr = true } }, + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move up", opts = { expr = true } }, ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move down", opts = { expr = true } }, -- Don't copy the replaced text after pasting in visual mode -- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste From 3479853e698436504454cb51a3c8e1f35df22ea5 Mon Sep 17 00:00:00 2001 From: prometheusalpha Date: Wed, 5 Apr 2023 17:44:48 +0700 Subject: [PATCH 1402/1541] feat(mappings): add description to movement keys in normal mode --- lua/core/mappings.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 51b7713..b0cd219 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -37,10 +37,10 @@ M.general = { -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ -- empty mode is same as using :map -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour - ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, - ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, - [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } }, - [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move down", opts = { expr = true } }, + ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move up", opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move up", opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move down", opts = { expr = true } }, -- new buffer ["b"] = { " enew ", "new buffer" }, @@ -57,8 +57,8 @@ M.general = { }, x = { - ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move up", opts = { expr = true } }, - ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move down", opts = { expr = true } }, + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move down", opts = { expr = true } }, + ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move up", opts = { expr = true } }, -- Don't copy the replaced text after pasting in visual mode -- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste ["p"] = { 'p:let @+=@0:let @"=@0', "dont copy replaced text", opts = { silent = true } }, From 907b1125144cbbd7e64e9448132ee92743d13494 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 5 Apr 2023 22:07:36 +0530 Subject: [PATCH 1403/1541] make some mapping keybinds lowercased (#1897) --- lua/core/mappings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index b0cd219..36f18a5 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -70,14 +70,14 @@ M.tabufline = { n = { -- cycle through buffers - [""] = { + [""] = { function() require("nvchad_ui.tabufline").tabuflineNext() end, "goto next buffer", }, - [""] = { + [""] = { function() require("nvchad_ui.tabufline").tabuflinePrev() end, From b5cf9fde0e64d963a776c80f87609a3425771e04 Mon Sep 17 00:00:00 2001 From: Shubham K <53286173+sk02241994@users.noreply.github.com> Date: Fri, 7 Apr 2023 22:59:13 +0530 Subject: [PATCH 1404/1541] Added current buffer fuzzy find key mapping (#1903) * Added current buffer fuzzy find key mapping * change telescope fuzzy mapping to fz Co-authored-by: Sidhanth Rathod --- lua/core/mappings.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 36f18a5..8fbbf22 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -265,6 +265,7 @@ M.telescope = { ["fb"] = { " Telescope buffers ", "find buffers" }, ["fh"] = { " Telescope help_tags ", "help page" }, ["fo"] = { " Telescope oldfiles ", "find oldfiles" }, + ["fz"] = { " Telescope current_buffer_fuzzy_find ", "find in current buffer" }, -- git ["cm"] = { " Telescope git_commits ", "git commits" }, From f873d3cc50fbd3fd8619b85883d8b7cd8cae0fd9 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 10 Apr 2023 06:04:37 +0530 Subject: [PATCH 1405/1541] add an option for lsp_semantic_tokens hl groups | fix (#1907) also tiden up some stuff --- lua/core/bootstrap.lua | 2 ++ lua/core/default_config.lua | 1 + lua/core/utils.lua | 46 +++++++++++++++++++------------------ 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index 2f435d9..865f3b4 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -50,11 +50,13 @@ M.gen_chadrc_template = function() local path = vim.fn.stdpath "config" .. "/lua/custom/" local input = vim.fn.input "Do you want to install example custom config? (y/N) : " + -- clone example_config repo if input == "y" then M.echo "cloning example custom config repo ..." vim.fn.system { "git", "clone", "--depth", "1", "https://github.com/NvChad/example_config", path } vim.fn.delete(path .. ".git", "rf") else + -- use very minimal chadrc vim.fn.mkdir(path, "p") local file = io.open(path .. "chadrc.lua", "w") diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index f09fad0..0f5ce56 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -18,6 +18,7 @@ M.ui = { theme_toggle = { "onedark", "one_light" }, theme = "onedark", -- default theme transparency = false, + lsp_semantic_tokens = false, -- needs nvim v0.9, just adds highlight groups for lsp semantic tokens -- cmp themeing cmp = { diff --git a/lua/core/utils.lua b/lua/core/utils.lua index e95078c..4c44dc6 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -52,37 +52,39 @@ M.remove_disabled_keys = function(chadrc_mappings, default_mappings) end M.load_mappings = function(section, mapping_opt) - local function set_section_map(section_values) - if section_values.plugin then - return - end + vim.schedule(function() + local function set_section_map(section_values) + if section_values.plugin then + return + end - section_values.plugin = nil + section_values.plugin = nil - for mode, mode_values in pairs(section_values) do - local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) - for keybind, mapping_info in pairs(mode_values) do - -- merge default + user opts - local opts = merge_tb("force", default_opts, mapping_info.opts or {}) + for mode, mode_values in pairs(section_values) do + local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) + for keybind, mapping_info in pairs(mode_values) do + -- merge default + user opts + local opts = merge_tb("force", default_opts, mapping_info.opts or {}) - mapping_info.opts, opts.mode = nil, nil - opts.desc = mapping_info[2] + mapping_info.opts, opts.mode = nil, nil + opts.desc = mapping_info[2] - vim.keymap.set(mode, keybind, mapping_info[1], opts) + vim.keymap.set(mode, keybind, mapping_info[1], opts) + end end end - end - local mappings = require("core.utils").load_config().mappings + local mappings = require("core.utils").load_config().mappings - if type(section) == "string" then - mappings[section]["plugin"] = nil - mappings = { mappings[section] } - end + if type(section) == "string" then + mappings[section]["plugin"] = nil + mappings = { mappings[section] } + end - for _, sect in pairs(mappings) do - set_section_map(sect) - end + for _, sect in pairs(mappings) do + set_section_map(sect) + end + end) end M.lazy_load = function(plugin) From af123eee4d4f4ecd8ff935ad465e589673b81619 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 10 Apr 2023 07:21:07 +0530 Subject: [PATCH 1406/1541] handle semantic_tokens on lsp_attach based on chadrc option (#1907) --- lua/plugins/configs/lspconfig.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 24083ae..fbce3a8 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -15,6 +15,10 @@ M.on_attach = function(client, bufnr) if client.server_capabilities.signatureHelpProvider then require("nvchad_ui.signature").setup(client) end + + if not utils.load_config().ui.lsp_semantic_tokens then + client.server_capabilities.semanticTokensProvider = nil + end end M.capabilities = vim.lsp.protocol.make_client_capabilities() From 34bdca17d298c5762219649b238e8f1ca0689352 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 10 Apr 2023 10:05:05 +0530 Subject: [PATCH 1407/1541] clean up --- lua/core/bootstrap.lua | 21 +++------------------ lua/core/default_config.lua | 18 ++++-------------- 2 files changed, 7 insertions(+), 32 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index 865f3b4..b00fc09 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -25,24 +25,9 @@ M.lazy = function(install_path) -- install plugins require "plugins" - vim.api.nvim_buf_delete(0, { force = true }) -- close lazy window - ---------- mason packages ------------- - vim.schedule(function() - vim.cmd "MasonInstallAll" - local packages = table.concat(vim.g.mason_binaries_list, " ") - - require("mason-registry"):on("package:install:success", function(pkg) - packages = string.gsub(packages, pkg.name:gsub("%-", "%%-"), "") -- rm package name - - if packages:match "%S" == nil then - vim.schedule(function() - vim.api.nvim_buf_delete(0, { force = true }) - M.echo "Now please read the docs at nvchad.com!! 󰕹 󰱬" - end) - end - end) - end) + -- mason packages & show post_boostrap screen + require "nvchad.post_bootstrap"() end M.gen_chadrc_template = function() @@ -60,7 +45,7 @@ M.gen_chadrc_template = function() vim.fn.mkdir(path, "p") local file = io.open(path .. "chadrc.lua", "w") - file:write "local M = {}\n M.ui = {theme = 'onedark'}\n return M" + file:write "---@type ChadrcConfig \n local M = {}\n M.ui = {theme = 'onedark'}\n return M" file:close() end end diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 0f5ce56..61fa715 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -1,12 +1,7 @@ --- Chadrc overrides this file - local M = {} M.options = { - nvChad = { - update_url = "https://github.com/NvChad/NvChad", - update_branch = "v2.0", - }, + nvchad_branch = "v2.0", } M.ui = { @@ -29,9 +24,7 @@ M.ui = { selected_item_bg = "colored", -- colored / simple }, - telescope = { - style = "borderless", -- borderless / bordered - }, + telescope = { style = "borderless" }, -- borderless / bordered ------------------------------- nvchad_ui modules ----------------------------- statusline = { @@ -76,9 +69,7 @@ M.ui = { }, }, - cheatsheet = { - theme = "grid", -- simple/grid - }, + cheatsheet = { theme = "grid" }, -- simple/grid lsp = { -- show function signatures i.e args as you type @@ -89,11 +80,10 @@ M.ui = { }, } -M.plugins = "" -- path i.e "custom.plugins" -> custom/plugins.lua only and not custom/plugins/init.lua!!!! +M.plugins = "" -- path i.e "custom.plugins", so make custom/plugins.lua file M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startup options --- these are default mappings, check core.mappings for table structure M.mappings = {} return M From 12f26e91efadd0e9f6140af5f4e0d27f9e10506f Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 12 Apr 2023 14:12:32 +0530 Subject: [PATCH 1408/1541] rm depcreated option from nvimtree config --- lua/plugins/configs/nvimtree.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 875fa5b..ff9aad3 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -16,7 +16,6 @@ local options = { adaptive_size = false, side = "left", width = 30, - hide_root_folder = true, preserve_window_proportions = true, }, git = { @@ -32,6 +31,7 @@ local options = { }, }, renderer = { + root_folder_label = false, highlight_git = false, highlight_opened_files = "none", From 7914da7cd34a23a7e23642162aca2ca3b4440da9 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 12 Apr 2023 18:03:18 +0530 Subject: [PATCH 1409/1541] include c , v keys in whichkey lazyloading --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 19e212e..cc196a1 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -253,7 +253,7 @@ local default_plugins = { -- Only load whichkey after all the gui { "folke/which-key.nvim", - keys = { "", '"', "'", "`" }, + keys = { "", '"', "'", "`", "c", "v" }, init = function() require("core.utils").load_mappings "whichkey" end, From fdb3ddb806c59527de35d9249e37023d119cc896 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 23 Apr 2023 08:06:02 +0530 Subject: [PATCH 1410/1541] rm un-needed code --- lua/plugins/configs/lspconfig.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index fbce3a8..441d5ae 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -7,9 +7,6 @@ local utils = require "core.utils" -- export on_attach & capabilities for custom lspconfigs M.on_attach = function(client, bufnr) - client.server_capabilities.documentFormattingProvider = false - client.server_capabilities.documentRangeFormattingProvider = false - utils.load_mappings("lspconfig", { buffer = bufnr }) if client.server_capabilities.signatureHelpProvider then From cff182ce4baf57e8c37fd064da5e1a71f36e1f57 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 23 Apr 2023 17:11:59 +0530 Subject: [PATCH 1411/1541] remove outdated plugin info in readme --- .github/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/README.md b/.github/README.md index d5e4946..dad0c3a 100644 --- a/.github/README.md +++ b/.github/README.md @@ -89,9 +89,8 @@ A fuzzy file finder, picker, sorter, previewer and much more: - Many beautiful themes, theme toggler by our [base46 plugin](https://github.com/NvChad/base46) - Inbuilt terminal toggling & management with [Nvterm](https://github.com/NvChad/nvterm) - NvChad updater, hide & unhide terminal buffers with [NvChad extensions](https://github.com/NvChad/extensions) -- Lightweight & performant ui plugin with [NvChad UI](https://github.com/NvChad/ui) +- Lightweight & performant ui plugin with [NvChad UI](https://github.com/NvChad/ui) It provides statusline modules, tabufline ( tabs + buffer manager) , beautiful cheatsheets and much more! - File navigation with [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua) -- Managing tabs, buffers with [bufferline.nvim](https://github.com/akinsho/bufferline.nvim) - Beautiful and configurable icons with [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) - Git diffs and more with [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) - NeoVim Lsp configuration with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) and [mason.nvim](https://github.com/williamboman/mason.nvim) From 56e6234363b065e72548b1a2877c71e32e84c08f Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 25 Apr 2023 10:22:57 +0530 Subject: [PATCH 1412/1541] add option for using extended base46 integrations --- lua/core/default_config.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 61fa715..ab71bfd 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -15,6 +15,9 @@ M.ui = { transparency = false, lsp_semantic_tokens = false, -- needs nvim v0.9, just adds highlight groups for lsp semantic tokens + -- https://github.com/NvChad/base46/tree/v2.0/lua/base46/extended_integrations + extended_integrations = {}, -- these aren't compiled by default, ex: "alpha", "notify" + -- cmp themeing cmp = { icons = true, From 907684efa019c7d5c189e29358b466852965fd76 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 30 Apr 2023 06:13:24 +0530 Subject: [PATCH 1413/1541] include lazyloading of comment.nvim with gcc/gbc keys (#1972) --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index cc196a1..0c44931 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -201,7 +201,7 @@ local default_plugins = { { "numToStr/Comment.nvim", - -- keys = { "gc", "gb" }, + keys = { "gcc", "gbc" }, init = function() require("core.utils").load_mappings "comment" end, From b51065b1a8218ebc988d3d773e4b552841c09476 Mon Sep 17 00:00:00 2001 From: Mateus Abelli Date: Sun, 30 Apr 2023 01:44:21 -0300 Subject: [PATCH 1414/1541] fix: readme links (#1974) --- .github/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/README.md b/.github/README.md index dad0c3a..48100ce 100644 --- a/.github/README.md +++ b/.github/README.md @@ -3,13 +3,13 @@ From 03f93e5d7540920582e9fb03e091821e6f6cf1b9 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 3 May 2023 13:49:50 +0530 Subject: [PATCH 1415/1541] update icons to nerdfont icons 3.0x --- lua/plugins/configs/lazy_nvim.lua | 2 +- lua/plugins/configs/mason.lua | 4 ++-- lua/plugins/configs/others.lua | 2 +- lua/plugins/configs/whichkey.lua | 31 ------------------------------- lua/plugins/init.lua | 8 +------- 5 files changed, 5 insertions(+), 42 deletions(-) delete mode 100644 lua/plugins/configs/whichkey.lua diff --git a/lua/plugins/configs/lazy_nvim.lua b/lua/plugins/configs/lazy_nvim.lua index dbb3abc..cd170bd 100644 --- a/lua/plugins/configs/lazy_nvim.lua +++ b/lua/plugins/configs/lazy_nvim.lua @@ -5,7 +5,7 @@ return { ui = { icons = { ft = "", - lazy = "鈴 ", + lazy = "󰂠 ", loaded = "", not_loaded = "", }, diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua index 8ccc313..3692a15 100644 --- a/lua/plugins/configs/mason.lua +++ b/lua/plugins/configs/mason.lua @@ -6,8 +6,8 @@ local options = { ui = { icons = { package_pending = " ", - package_installed = " ", - package_uninstalled = " ﮊ", + package_installed = "󰄳 ", + package_uninstalled = " 󰚌", }, keymaps = { diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 874a0b6..8775517 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -53,7 +53,7 @@ M.gitsigns = { signs = { add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, - delete = { hl = "DiffDelete", text = "", numhl = "GitSignsDeleteNr" }, + delete = { hl = "DiffDelete", text = "󰍵", numhl = "GitSignsDeleteNr" }, topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" }, untracked = { hl = "GitSignsAdd", text = "│", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" }, diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua deleted file mode 100644 index cfdf4c0..0000000 --- a/lua/plugins/configs/whichkey.lua +++ /dev/null @@ -1,31 +0,0 @@ -local options = { - - icons = { - breadcrumb = "»", -- symbol used in the command line area that shows your active key combo - separator = "  ", -- symbol used between a key and it's label - group = "+", -- symbol prepended to a group - }, - - popup_mappings = { - scroll_down = "", -- binding to scroll down inside the popup - scroll_up = "", -- binding to scroll up inside the popup - }, - - window = { - border = "none", -- none/single/double/shadow - }, - - layout = { - spacing = 6, -- spacing between columns - }, - - hidden = { "", "", "", "", "call", "lua", "^:", "^ " }, - - triggers_blacklist = { - -- list of mode / prefixes that should never be hooked by WhichKey - i = { "j", "k" }, - v = { "j", "k" }, - }, -} - -return options diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 0c44931..2f711af 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -95,7 +95,7 @@ local default_plugins = { -- git stuff { "lewis6991/gitsigns.nvim", - ft = "gitcommit", + ft = { "gitcommit", "diff" }, init = function() -- load gitsigns only when a git file is opened vim.api.nvim_create_autocmd({ "BufRead" }, { @@ -190,7 +190,6 @@ local default_plugins = { "hrsh7th/cmp-path", }, }, - opts = function() return require "plugins.configs.cmp" end, @@ -233,11 +232,9 @@ local default_plugins = { init = function() require("core.utils").load_mappings "telescope" end, - opts = function() return require "plugins.configs.telescope" end, - config = function(_, opts) dofile(vim.g.base46_cache .. "telescope") local telescope = require "telescope" @@ -257,9 +254,6 @@ local default_plugins = { init = function() require("core.utils").load_mappings "whichkey" end, - opts = function() - return require "plugins.configs.whichkey" - end, config = function(_, opts) dofile(vim.g.base46_cache .. "whichkey") require("which-key").setup(opts) From 3dd0fa6c5b0933d9a395e2492de69c151831c66e Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 4 May 2023 07:34:27 +0530 Subject: [PATCH 1416/1541] temporarily change folder icon old folder icon was removed from octicons and nerdfonts uses latest octicons --- lua/plugins/configs/nvimtree.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index ff9aad3..25c5d68 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -48,10 +48,10 @@ local options = { }, glyphs = { - default = "", + default = "󰈚", symlink = "", folder = { - default = "", + default = "󰉋", empty = "", empty_open = "", open = "", From e1631629b935cd366c65052c009c697bf4ab1365 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 12 May 2023 20:33:16 +0530 Subject: [PATCH 1417/1541] disable LSPs inbuilt formatting by default | FIX (#2016) We mostly use null-ls for the formatting but if our current lsp server supports formatting then the null-ls one wouldnt work and we would never get an error etc or prompt to use null-ls formatter which is scaryy!! so disabling the formatting on lsp server by default --- lua/plugins/configs/lspconfig.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 441d5ae..fbce3a8 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -7,6 +7,9 @@ local utils = require "core.utils" -- export on_attach & capabilities for custom lspconfigs M.on_attach = function(client, bufnr) + client.server_capabilities.documentFormattingProvider = false + client.server_capabilities.documentRangeFormattingProvider = false + utils.load_mappings("lspconfig", { buffer = bufnr }) if client.server_capabilities.signatureHelpProvider then From 699aeaa44203b62003da8aacd838a5bdac4c2d46 Mon Sep 17 00:00:00 2001 From: Lexey Khom <92052116+LexeyKhom@users.noreply.github.com> Date: Sat, 13 May 2023 12:58:50 +0300 Subject: [PATCH 1418/1541] style(mappings): One style for descriptions (#2018) * style(mappings.lua): Abbreviations in Upper case (like "LSP") * style(mappings.lua): One description style - Sentence case Only the first word of a sentence and proper nouns are capitalized, with the rest of the words in lowercase. * style(mappings.lua): Replase "_" to " " in descriptions --- lua/core/mappings.lua | 144 +++++++++++++++++++++--------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 8fbbf22..b06bdc9 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -5,63 +5,63 @@ local M = {} M.general = { i = { -- go to beginning and end - [""] = { "^i", "beginning of line" }, - [""] = { "", "end of line" }, + [""] = { "^i", "Beginning of line" }, + [""] = { "", "End of line" }, -- navigate within insert mode - [""] = { "", "move left" }, - [""] = { "", "move right" }, - [""] = { "", "move down" }, - [""] = { "", "move up" }, + [""] = { "", "Move left" }, + [""] = { "", "Move right" }, + [""] = { "", "Move down" }, + [""] = { "", "Move up" }, }, n = { - [""] = { ":noh ", "clear highlights" }, + [""] = { ":noh ", "Clear highlights" }, -- switch between windows - [""] = { "h", "window left" }, - [""] = { "l", "window right" }, - [""] = { "j", "window down" }, - [""] = { "k", "window up" }, + [""] = { "h", "Window left" }, + [""] = { "l", "Window right" }, + [""] = { "j", "Window down" }, + [""] = { "k", "Window up" }, -- save - [""] = { " w ", "save file" }, + [""] = { " w ", "Save file" }, -- Copy all - [""] = { " %y+ ", "copy whole file" }, + [""] = { " %y+ ", "Copy whole file" }, -- line numbers - ["n"] = { " set nu! ", "toggle line number" }, - ["rn"] = { " set rnu! ", "toggle relative number" }, + ["n"] = { " set nu! ", "Toggle line number" }, + ["rn"] = { " set rnu! ", "Toggle relative number" }, -- Allow moving the cursor through wrapped lines with j, k, and -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ -- empty mode is same as using :map -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour - ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move down", opts = { expr = true } }, - ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move up", opts = { expr = true } }, - [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move up", opts = { expr = true } }, - [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move down", opts = { expr = true } }, + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "Move down", opts = { expr = true } }, + ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "Move up", opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "Move up", opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "Move down", opts = { expr = true } }, -- new buffer - ["b"] = { " enew ", "new buffer" }, + ["b"] = { " enew ", "New buffer" }, ["ch"] = { " NvCheatsheet ", "Mapping cheatsheet" }, }, t = { - [""] = { vim.api.nvim_replace_termcodes("", true, true, true), "escape terminal mode" }, + [""] = { vim.api.nvim_replace_termcodes("", true, true, true), "Escape terminal mode" }, }, v = { - [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move up", opts = { expr = true } }, - [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move down", opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "Move up", opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "Move down", opts = { expr = true } }, }, x = { - ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "move down", opts = { expr = true } }, - ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move up", opts = { expr = true } }, + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "Move down", opts = { expr = true } }, + ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "Move up", opts = { expr = true } }, -- Don't copy the replaced text after pasting in visual mode -- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste - ["p"] = { 'p:let @+=@0:let @"=@0', "dont copy replaced text", opts = { silent = true } }, + ["p"] = { 'p:let @+=@0:let @"=@0', "Dont copy replaced text", opts = { silent = true } }, }, } @@ -74,14 +74,14 @@ M.tabufline = { function() require("nvchad_ui.tabufline").tabuflineNext() end, - "goto next buffer", + "Goto next buffer", }, [""] = { function() require("nvchad_ui.tabufline").tabuflinePrev() end, - "goto prev buffer", + "Goto prev buffer", }, -- close buffer + hide terminal buffer @@ -89,7 +89,7 @@ M.tabufline = { function() require("nvchad_ui.tabufline").close_buffer() end, - "close buffer", + "Close buffer", }, }, } @@ -103,14 +103,14 @@ M.comment = { function() require("Comment.api").toggle.linewise.current() end, - "toggle comment", + "Toggle comment", }, }, v = { ["/"] = { "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", - "toggle comment", + "Toggle comment", }, }, } @@ -125,119 +125,119 @@ M.lspconfig = { function() vim.lsp.buf.declaration() end, - "lsp declaration", + "LSP declaration", }, ["gd"] = { function() vim.lsp.buf.definition() end, - "lsp definition", + "LSP definition", }, ["K"] = { function() vim.lsp.buf.hover() end, - "lsp hover", + "LSP hover", }, ["gi"] = { function() vim.lsp.buf.implementation() end, - "lsp implementation", + "LSP implementation", }, ["ls"] = { function() vim.lsp.buf.signature_help() end, - "lsp signature_help", + "LSP signature help", }, ["D"] = { function() vim.lsp.buf.type_definition() end, - "lsp definition type", + "LSP definition type", }, ["ra"] = { function() require("nvchad_ui.renamer").open() end, - "lsp rename", + "LSP rename", }, ["ca"] = { function() vim.lsp.buf.code_action() end, - "lsp code_action", + "LSP code action", }, ["gr"] = { function() vim.lsp.buf.references() end, - "lsp references", + "LSP references", }, ["f"] = { function() vim.diagnostic.open_float { border = "rounded" } end, - "floating diagnostic", + "Floating diagnostic", }, ["[d"] = { function() vim.diagnostic.goto_prev() end, - "goto prev", + "Goto prev", }, ["]d"] = { function() vim.diagnostic.goto_next() end, - "goto_next", + "Goto next", }, ["q"] = { function() vim.diagnostic.setloclist() end, - "diagnostic setloclist", + "Diagnostic setloclist", }, ["fm"] = { function() vim.lsp.buf.format { async = true } end, - "lsp formatting", + "LSP formatting", }, ["wa"] = { function() vim.lsp.buf.add_workspace_folder() end, - "add workspace folder", + "Add workspace folder", }, ["wr"] = { function() vim.lsp.buf.remove_workspace_folder() end, - "remove workspace folder", + "Remove workspace folder", }, ["wl"] = { function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, - "list workspace folders", + "List workspace folders", }, }, } @@ -247,10 +247,10 @@ M.nvimtree = { n = { -- toggle - [""] = { " NvimTreeToggle ", "toggle nvimtree" }, + [""] = { " NvimTreeToggle ", "Toggle nvimtree" }, -- focus - ["e"] = { " NvimTreeFocus ", "focus nvimtree" }, + ["e"] = { " NvimTreeFocus ", "Focus nvimtree" }, }, } @@ -259,23 +259,23 @@ M.telescope = { n = { -- find - ["ff"] = { " Telescope find_files ", "find files" }, - ["fa"] = { " Telescope find_files follow=true no_ignore=true hidden=true ", "find all" }, - ["fw"] = { " Telescope live_grep ", "live grep" }, - ["fb"] = { " Telescope buffers ", "find buffers" }, - ["fh"] = { " Telescope help_tags ", "help page" }, - ["fo"] = { " Telescope oldfiles ", "find oldfiles" }, - ["fz"] = { " Telescope current_buffer_fuzzy_find ", "find in current buffer" }, + ["ff"] = { " Telescope find_files ", "Find files" }, + ["fa"] = { " Telescope find_files follow=true no_ignore=true hidden=true ", "Find all" }, + ["fw"] = { " Telescope live_grep ", "Live grep" }, + ["fb"] = { " Telescope buffers ", "Find buffers" }, + ["fh"] = { " Telescope help_tags ", "Help page" }, + ["fo"] = { " Telescope oldfiles ", "Find oldfiles" }, + ["fz"] = { " Telescope current_buffer_fuzzy_find ", "Find in current buffer" }, -- git - ["cm"] = { " Telescope git_commits ", "git commits" }, - ["gt"] = { " Telescope git_status ", "git status" }, + ["cm"] = { " Telescope git_commits ", "Git commits" }, + ["gt"] = { " Telescope git_status ", "Git status" }, -- pick a hidden term - ["pt"] = { " Telescope terms ", "pick hidden term" }, + ["pt"] = { " Telescope terms ", "Pick hidden term" }, -- theme switcher - ["th"] = { " Telescope themes ", "nvchad themes" }, + ["th"] = { " Telescope themes ", "Nvchad themes" }, }, } @@ -288,21 +288,21 @@ M.nvterm = { function() require("nvterm.terminal").toggle "float" end, - "toggle floating term", + "Toggle floating term", }, [""] = { function() require("nvterm.terminal").toggle "horizontal" end, - "toggle horizontal term", + "Toggle horizontal term", }, [""] = { function() require("nvterm.terminal").toggle "vertical" end, - "toggle vertical term", + "Toggle vertical term", }, }, @@ -312,21 +312,21 @@ M.nvterm = { function() require("nvterm.terminal").toggle "float" end, - "toggle floating term", + "Toggle floating term", }, [""] = { function() require("nvterm.terminal").toggle "horizontal" end, - "toggle horizontal term", + "Toggle horizontal term", }, [""] = { function() require("nvterm.terminal").toggle "vertical" end, - "toggle vertical term", + "Toggle vertical term", }, -- new @@ -334,14 +334,14 @@ M.nvterm = { function() require("nvterm.terminal").new "horizontal" end, - "new horizontal term", + "New horizontal term", }, ["v"] = { function() require("nvterm.terminal").new "vertical" end, - "new vertical term", + "New vertical term", }, }, } @@ -354,14 +354,14 @@ M.whichkey = { function() vim.cmd "WhichKey" end, - "which-key all keymaps", + "Which-key all keymaps", }, ["wk"] = { function() local input = vim.fn.input "WhichKey: " vim.cmd("WhichKey " .. input) end, - "which-key query lookup", + "Which-key query lookup", }, }, } @@ -383,7 +383,7 @@ M.blankline = { end end, - "Jump to current_context", + "Jump to current context", }, }, } From 914f9a400e4c39dc149dfd3e2ebec816e7f91565 Mon Sep 17 00:00:00 2001 From: Tirtharaj Pramanik <81750507+TirtharajPramanik@users.noreply.github.com> Date: Wed, 17 May 2023 02:14:15 +0530 Subject: [PATCH 1419/1541] Update init.lua Putting `.../mason/bin/` in the beginning of `vim.env.PATH` --- lua/core/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 8fe26e2..073a6cc 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -58,7 +58,7 @@ end -- add binaries installed by mason.nvim to path local is_windows = vim.loop.os_uname().sysname == "Windows_NT" -vim.env.PATH = vim.env.PATH .. (is_windows and ";" or ":") .. vim.fn.stdpath "data" .. "/mason/bin" +vim.env.PATH = vim.fn.stdpath "data" .. "/mason/bin" .. (is_windows and ";" or ":") .. vim.env.PATH -------------------------------------- autocmds ------------------------------------------ local autocmd = vim.api.nvim_create_autocmd From a54e4e92720dbdd109008df494ca3f44f6ce1c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Carneiro?= Date: Wed, 17 May 2023 21:01:36 -0300 Subject: [PATCH 1420/1541] chore: consistent border style when navigating diagnostics (#2033) --- lua/core/mappings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index b06bdc9..d488fdf 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -193,14 +193,14 @@ M.lspconfig = { ["[d"] = { function() - vim.diagnostic.goto_prev() + vim.diagnostic.goto_prev({ float = { border = "rounded" }}) end, "Goto prev", }, ["]d"] = { function() - vim.diagnostic.goto_next() + vim.diagnostic.goto_next({ float = { border = "rounded" }}) end, "Goto next", }, From c8a1aa2e2b0a0ecf3248d8c65837a7c6824033fa Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 18 May 2023 05:35:36 +0530 Subject: [PATCH 1421/1541] use old dir icon for nvimtree in nerdfonts v3.0 update this icon was removed! but they re-added it in v3.0.1, so everyone please update your font package :D --- lua/plugins/configs/nvimtree.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 25c5d68..8dec11f 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -51,7 +51,7 @@ local options = { default = "󰈚", symlink = "", folder = { - default = "󰉋", + default = "", empty = "", empty_open = "", open = "", From 1cb237fa78e63b80132cbb6a05f45eb074d3d934 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 18 May 2023 07:58:57 +0530 Subject: [PATCH 1422/1541] rm outdated icons --- lua/core/default_config.lua | 4 ++-- lua/plugins/configs/nvimtree.lua | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index ab71bfd..410e932 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -64,8 +64,8 @@ M.ui = { buttons = { { " Find File", "Spc f f", "Telescope find_files" }, - { " Recent Files", "Spc f o", "Telescope oldfiles" }, - { " Find Word", "Spc f w", "Telescope live_grep" }, + { "󰈚 Recent Files", "Spc f o", "Telescope oldfiles" }, + { "󰈭 Find Word", "Spc f w", "Telescope live_grep" }, { " Bookmarks", "Spc b m", "Telescope marks" }, { " Themes", "Spc t h", "Telescope themes" }, { " Mappings", "Spc c h", "NvCheatsheet" }, diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 8dec11f..b4a8aee 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -52,11 +52,11 @@ local options = { symlink = "", folder = { default = "", - empty = "", - empty_open = "", + empty = "", + empty_open = "", open = "", - symlink = "", - symlink_open = "", + symlink = "", + symlink_open = "", arrow_open = "", arrow_closed = "", }, From f6229b4b464d9101518f82a4148866ec46e32ac9 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 18 May 2023 11:45:02 +0530 Subject: [PATCH 1423/1541] add mapping for telescope bookmarks (#2035) --- lua/core/mappings.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index d488fdf..f4b2685 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -276,6 +276,8 @@ M.telescope = { -- theme switcher ["th"] = { " Telescope themes ", "Nvchad themes" }, + + ["bm"] = { " Telescope marks ", "telescope bookmarks" }, }, } From 262a06776aa731ad89369394f73320461d4a7e63 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 18 May 2023 18:15:51 +0530 Subject: [PATCH 1424/1541] change mapping for telescope marks --- lua/core/default_config.lua | 2 +- lua/core/mappings.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 410e932..a151df5 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -66,7 +66,7 @@ M.ui = { { " Find File", "Spc f f", "Telescope find_files" }, { "󰈚 Recent Files", "Spc f o", "Telescope oldfiles" }, { "󰈭 Find Word", "Spc f w", "Telescope live_grep" }, - { " Bookmarks", "Spc b m", "Telescope marks" }, + { " Bookmarks", "Spc m a", "Telescope marks" }, { " Themes", "Spc t h", "Telescope themes" }, { " Mappings", "Spc c h", "NvCheatsheet" }, }, diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index f4b2685..625d4fc 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -277,7 +277,7 @@ M.telescope = { -- theme switcher ["th"] = { " Telescope themes ", "Nvchad themes" }, - ["bm"] = { " Telescope marks ", "telescope bookmarks" }, + ["ma"] = { " Telescope marks ", "telescope bookmarks" }, }, } From 582dff9458ee8ac70149583829b6f8faecdc3aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fiete=20B=C3=B6rner?= Date: Tue, 23 May 2023 05:14:14 +0200 Subject: [PATCH 1425/1541] allow to override default config of comment.nvim (#2045) --- lua/plugins/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 2f711af..67e8862 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -204,8 +204,8 @@ local default_plugins = { init = function() require("core.utils").load_mappings "comment" end, - config = function() - require("Comment").setup() + config = function(_, opts) + require("Comment").setup(opts) end, }, From 9c10201ef383f4c4c9caacd2050f76e8fbb76b1c Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 29 May 2023 16:02:33 +0200 Subject: [PATCH 1426/1541] Fix Comment.nvim not lazyloading from visual mode (#2067) --- lua/plugins/init.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 67e8862..2e84b98 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -200,7 +200,12 @@ local default_plugins = { { "numToStr/Comment.nvim", - keys = { "gcc", "gbc" }, + keys = { + { "gcc", mode = "n" }, + { "gc", mode = "v" }, + { "gbc", mode = "n" }, + { "gb", mode = "v" }, + }, init = function() require("core.utils").load_mappings "comment" end, From d72d935b358dd969f059d5215a41376160f1d88a Mon Sep 17 00:00:00 2001 From: georgejean Date: Thu, 1 Jun 2023 18:09:14 +0200 Subject: [PATCH 1427/1541] Fix deprecated highlight config for gitsigns (#2078) --- lua/plugins/configs/others.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 8775517..e4110f2 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -51,12 +51,12 @@ end M.gitsigns = { signs = { - add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, - change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, - delete = { hl = "DiffDelete", text = "󰍵", numhl = "GitSignsDeleteNr" }, - topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, - changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" }, - untracked = { hl = "GitSignsAdd", text = "│", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" }, + add = { text = '│' }, + change = { text = '│' }, + delete = { text = '󰍵' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + untracked = { text = '│' }, }, on_attach = function(bufnr) utils.load_mappings("gitsigns", { buffer = bufnr }) From f8a489ea1a670569eead0fe5651c0c48add743e8 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 1 Jun 2023 22:07:27 +0530 Subject: [PATCH 1428/1541] include editor config in lazy disabled_plugins list --- lua/plugins/configs/lazy_nvim.lua | 1 + lua/plugins/configs/others.lua | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lua/plugins/configs/lazy_nvim.lua b/lua/plugins/configs/lazy_nvim.lua index cd170bd..2575dea 100644 --- a/lua/plugins/configs/lazy_nvim.lua +++ b/lua/plugins/configs/lazy_nvim.lua @@ -41,6 +41,7 @@ return { "compiler", "bugreport", "ftplugin", + "editorconfig", }, }, }, diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index e4110f2..dafd5a4 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -51,12 +51,12 @@ end M.gitsigns = { signs = { - add = { text = '│' }, - change = { text = '│' }, - delete = { text = '󰍵' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - untracked = { text = '│' }, + add = { text = "│" }, + change = { text = "│" }, + delete = { text = "󰍵" }, + topdelete = { text = "‾" }, + changedelete = { text = "~" }, + untracked = { text = "│" }, }, on_attach = function(bufnr) utils.load_mappings("gitsigns", { buffer = bufnr }) From c3c349c8302c4318a66c3c1a1a4d79f3d746381d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Jesus?= <35274086+AndreJesusBrito@users.noreply.github.com> Date: Thu, 8 Jun 2023 00:51:39 +0100 Subject: [PATCH 1429/1541] Change cmp to insert completion instead of replacing the current word (#2083) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I find this annoying and if we want to actually delete the word we can simply just dw in vim Co-authored-by: andré Jesus --- lua/plugins/configs/cmp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 32e0129..365ec2c 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -76,8 +76,8 @@ local options = { [""] = cmp.mapping.complete(), [""] = cmp.mapping.close(), [""] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, - select = false, + behavior = cmp.ConfirmBehavior.Insert, + select = true, }, [""] = cmp.mapping(function(fallback) if cmp.visible() then From c2a0bb1684236e0bfbf43465ab1e22419debd98d Mon Sep 17 00:00:00 2001 From: Zhong Jianxin Date: Thu, 8 Jun 2023 09:42:21 +0800 Subject: [PATCH 1430/1541] telescope: Explicitly depend on nvim-treesitter Fix Telescope syntax highlighting is not working until open a file https://github.com/NvChad/NvChad/issues/2084 --- lua/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 2e84b98..51b137d 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -233,6 +233,7 @@ local default_plugins = { { "nvim-telescope/telescope.nvim", + dependencies = "nvim-treesitter/nvim-treesitter", cmd = "Telescope", init = function() require("core.utils").load_mappings "telescope" From d73d155287ad34c3baf8cdbb89733f45fa80bb2e Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 11 Jun 2023 19:52:47 +0530 Subject: [PATCH 1431/1541] disable semantic tokens only if the LSP supports it --- lua/plugins/configs/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index fbce3a8..facb4cb 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -16,7 +16,7 @@ M.on_attach = function(client, bufnr) require("nvchad_ui.signature").setup(client) end - if not utils.load_config().ui.lsp_semantic_tokens then + if not utils.load_config().ui.lsp_semantic_tokens and client.supports_method "textDocument/semanticTokens" then client.server_capabilities.semanticTokensProvider = nil end end From a18d92dfa6e8647a9af7f2079e4d064b20636f82 Mon Sep 17 00:00:00 2001 From: anes <75726773+aneshodza@users.noreply.github.com> Date: Wed, 14 Jun 2023 00:16:19 +0200 Subject: [PATCH 1432/1541] Update README.md --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index 48100ce..be803ca 100644 --- a/.github/README.md +++ b/.github/README.md @@ -15,7 +15,7 @@
-[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.8.3-blueviolet.svg?style=flat-square&logo=Neovim&color=90E59A&logoColor=white)](https://github.com/neovim/neovim) +[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.9.0-blueviolet.svg?style=flat-square&logo=Neovim&color=90E59A&logoColor=white)](https://github.com/neovim/neovim) [![GitHub Issues](https://img.shields.io/github/issues/NvChad/NvChad.svg?style=flat-square&label=Issues&color=d77982)](https://github.com/NvChad/NvChad/issues) [![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/gADmkJb9Fb) [![Matrix](https://img.shields.io/badge/Matrix-40aa8b.svg?style=flat-square&logo=Matrix&logoColor=white)](https://matrix.to/#/#nvchad:matrix.org) From e3bb39106e2c236a3e04044b7d8ae6ac93af709b Mon Sep 17 00:00:00 2001 From: Zhong Jianxin Date: Thu, 15 Jun 2023 10:33:01 +0800 Subject: [PATCH 1433/1541] Fix default mappings not load if chadrc.lua does not exist (#2037) * Fix default mappings not load if chadrc.lua does not exist The regression was introduced by dab9171e6426b6eb8f0f8bcd0829a0415d260fcb Fix #1961 #2025 * clean up! --------- Co-authored-by: siduck --- lua/core/default_config.lua | 2 +- lua/core/utils.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index a151df5..639916a 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -87,6 +87,6 @@ M.plugins = "" -- path i.e "custom.plugins", so make custom/plugins.lua file M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startup options -M.mappings = {} +M.mappings = require "core.mappings" return M diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 4c44dc6..8b2a03d 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -8,11 +8,11 @@ M.load_config = function() if chadrc_path then local chadrc = dofile(chadrc_path) - config.mappings = M.remove_disabled_keys(chadrc.mappings, require "core.mappings") + config.mappings = M.remove_disabled_keys(chadrc.mappings, config.mappings) config = merge_tb("force", config, chadrc) + config.mappings.disabled = nil end - config.mappings.disabled = nil return config end From 8ba64ff369dea8adb63ea7d83a0ed08f13876f18 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 15 Jun 2023 10:11:43 +0530 Subject: [PATCH 1434/1541] custom config reload: support symlinks https://github.com/NvChad/base46/issues/177 huge thanks to @lucario387 for helping me --- lua/core/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 073a6cc..13be788 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -75,7 +75,7 @@ autocmd("FileType", { vim.api.nvim_create_autocmd("BufWritePost", { pattern = vim.tbl_map( vim.fs.normalize, - vim.fn.glob(vim.fn.stdpath "config" .. "/lua/custom/**/*.lua", true, true, true) + vim.fn.glob(vim.loop.fs_realpath(vim.fn.stdpath "config" .. "/lua/custom/**/*.lua"), true, true, true) ), group = vim.api.nvim_create_augroup("ReloadNvChad", {}), From d3433e3c55a887eab379b38cf754ba853ade20f6 Mon Sep 17 00:00:00 2001 From: Simone Fidanza Date: Fri, 16 Jun 2023 11:14:50 +0200 Subject: [PATCH 1435/1541] feat: ignore syntax folder (#2124) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c022b3f..4564ed0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ plugin custom spell ftplugin +syntax coc-settings.json .luarc.json lazy-lock.json From 11c839f870cfa8b75a9f847cba11fdfee7690856 Mon Sep 17 00:00:00 2001 From: Max Chechel Date: Sun, 18 Jun 2023 16:51:36 +0400 Subject: [PATCH 1436/1541] Defaulting to not installing custom config in --headless mode (#2132) * Defaulting to not installing custom config in --headless mode * Update bootstrap.lua --------- Co-authored-by: siduck --- lua/core/bootstrap.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index b00fc09..6ffc0bf 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -33,7 +33,11 @@ end M.gen_chadrc_template = function() if not vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1] then local path = vim.fn.stdpath "config" .. "/lua/custom/" - local input = vim.fn.input "Do you want to install example custom config? (y/N) : " + local input = "N" + + if next(vim.api.nvim_list_uis()) then + input = vim.fn.input "Do you want to install example custom config? (y/N) : " + end -- clone example_config repo if input == "y" then From 212bb9a66f12b5bfafa27643256e03dbbfb46d43 Mon Sep 17 00:00:00 2001 From: georgejean Date: Thu, 22 Jun 2023 18:46:20 +0200 Subject: [PATCH 1437/1541] Improved keys property for Comment.vim (#2144) --- lua/plugins/init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 51b137d..8d855f1 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -201,10 +201,10 @@ local default_plugins = { { "numToStr/Comment.nvim", keys = { - { "gcc", mode = "n" }, - { "gc", mode = "v" }, - { "gbc", mode = "n" }, - { "gb", mode = "v" }, + { "gcc", mode = "n" , desc = "Toggles the current line using linewise comment"}, + { "gc", mode = {"n","o","x"} , desc = "Toggles the region using linewise comment"}, + { "gbc", mode = "n" , desc = "Toggles the current line using blockwise comment"}, + { "gb", mode = {"n","o","x"} , desc = "Toggles the region using blockwise comment"}, }, init = function() require("core.utils").load_mappings "comment" From 4aa283119ac8abe8e8c4932c3f5ceb026052eebd Mon Sep 17 00:00:00 2001 From: georgejean Date: Fri, 23 Jun 2023 01:29:57 +0200 Subject: [PATCH 1438/1541] Fix too long descriptions for Comment.nvim's key mapping and add g key to trigger which-key (#2145) --- lua/plugins/init.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 8d855f1..16a9ca1 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -201,10 +201,10 @@ local default_plugins = { { "numToStr/Comment.nvim", keys = { - { "gcc", mode = "n" , desc = "Toggles the current line using linewise comment"}, - { "gc", mode = {"n","o","x"} , desc = "Toggles the region using linewise comment"}, - { "gbc", mode = "n" , desc = "Toggles the current line using blockwise comment"}, - { "gb", mode = {"n","o","x"} , desc = "Toggles the region using blockwise comment"}, + { "gcc", mode = "n", desc = "Toggles comment on current line" }, + { "gc", mode = { "n", "o", "x" }, desc = "Toggles comment on current line's region" }, + { "gbc", mode = "n", desc = "Toggles blockwise comment on current line" }, + { "gb", mode = { "n", "o", "x" }, desc = "Toggles blockwise comment on region" }, }, init = function() require("core.utils").load_mappings "comment" @@ -256,7 +256,7 @@ local default_plugins = { -- Only load whichkey after all the gui { "folke/which-key.nvim", - keys = { "", '"', "'", "`", "c", "v" }, + keys = { "", '"', "'", "`", "c", "v", "g" }, init = function() require("core.utils").load_mappings "whichkey" end, From 286c951d7b1f4531c8f40873a3846f40a3503e33 Mon Sep 17 00:00:00 2001 From: georgejean Date: Sat, 24 Jun 2023 03:19:07 +0200 Subject: [PATCH 1439/1541] fix: make key mapping's description to lazy load Comment.nvim coherent with the defaults (#2148) --- lua/plugins/init.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 16a9ca1..60dab65 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -201,10 +201,12 @@ local default_plugins = { { "numToStr/Comment.nvim", keys = { - { "gcc", mode = "n", desc = "Toggles comment on current line" }, - { "gc", mode = { "n", "o", "x" }, desc = "Toggles comment on current line's region" }, - { "gbc", mode = "n", desc = "Toggles blockwise comment on current line" }, - { "gb", mode = { "n", "o", "x" }, desc = "Toggles blockwise comment on region" }, + { "gcc", mode = "n", desc = "Comment toggle current line" }, + { "gc", mode = { "n", "o" }, desc = "Comment toggle linewise" }, + { "gc", mode = "x", desc = "Comment toggle linewise (visual)" }, + { "gbc", mode = "n", desc = "Comment toggle current block" }, + { "gb", mode = { "n", "o" }, desc = "Comment toggle blockwise" }, + { "gb", mode = "x", desc = "Comment toggle blockwise (visual)" }, }, init = function() require("core.utils").load_mappings "comment" From 10b668d98aba6bce9b494d028174207e59e5c59a Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 29 Jun 2023 05:18:18 +0530 Subject: [PATCH 1440/1541] make formatting mapping fm as general mapping #2167 so its available even if an actual lsp isnt attached to the buffer --- lua/core/mappings.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 625d4fc..acc2948 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -45,6 +45,13 @@ M.general = { -- new buffer ["b"] = { " enew ", "New buffer" }, ["ch"] = { " NvCheatsheet ", "Mapping cheatsheet" }, + + ["fm"] = { + function() + vim.lsp.buf.format { async = true } + end, + "LSP formatting", + }, }, t = { @@ -193,14 +200,14 @@ M.lspconfig = { ["[d"] = { function() - vim.diagnostic.goto_prev({ float = { border = "rounded" }}) + vim.diagnostic.goto_prev { float = { border = "rounded" } } end, "Goto prev", }, ["]d"] = { function() - vim.diagnostic.goto_next({ float = { border = "rounded" }}) + vim.diagnostic.goto_next { float = { border = "rounded" } } end, "Goto next", }, @@ -212,13 +219,6 @@ M.lspconfig = { "Diagnostic setloclist", }, - ["fm"] = { - function() - vim.lsp.buf.format { async = true } - end, - "LSP formatting", - }, - ["wa"] = { function() vim.lsp.buf.add_workspace_folder() From 83aac1ecc0c84726d3aace3ed97d7001add4694b Mon Sep 17 00:00:00 2001 From: M Date: Sun, 2 Jul 2023 17:52:52 +0700 Subject: [PATCH 1441/1541] fix: wildcard pattern usage in `fs_realpath` (#2152) --- lua/core/init.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 13be788..ea2cebd 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -72,11 +72,10 @@ autocmd("FileType", { }) -- reload some chadrc options on-save -vim.api.nvim_create_autocmd("BufWritePost", { - pattern = vim.tbl_map( - vim.fs.normalize, - vim.fn.glob(vim.loop.fs_realpath(vim.fn.stdpath "config" .. "/lua/custom/**/*.lua"), true, true, true) - ), +autocmd("BufWritePost", { + pattern = vim.tbl_map(function(path) + return vim.fs.normalize(vim.loop.fs_realpath(path)) + end, vim.fn.glob(vim.fn.stdpath "config" .. "/lua/custom/**/*.lua", true, true, true)), group = vim.api.nvim_create_augroup("ReloadNvChad", {}), callback = function(opts) From 3500e7388df177631273d75c9ecda5f8635ea470 Mon Sep 17 00:00:00 2001 From: James Wright Date: Thu, 6 Jul 2023 10:42:33 -0600 Subject: [PATCH 1442/1541] Catch errors from shell calls (#2188) --- lua/core/bootstrap.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index 6ffc0bf..43653a0 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -5,6 +5,11 @@ M.echo = function(str) vim.api.nvim_echo({ { str, "Bold" } }, true, {}) end +local function shell_call(args) + local output = vim.fn.system(args) + assert(vim.v.shell_error == 0, "External call failed with error code: " .. vim.v.shell_error .. "\n" .. output) +end + M.lazy = function(install_path) ------------- base46 --------------- local lazy_path = vim.fn.stdpath "data" .. "/lazy/base46" @@ -12,7 +17,7 @@ M.lazy = function(install_path) M.echo " Compiling base46 theme to bytecode ..." local base46_repo = "https://github.com/NvChad/base46" - vim.fn.system { "git", "clone", "--depth", "1", "-b", "v2.0", base46_repo, lazy_path } + shell_call { "git", "clone", "--depth", "1", "-b", "v2.0", base46_repo, lazy_path } vim.opt.rtp:prepend(lazy_path) require("base46").compile() @@ -20,7 +25,7 @@ M.lazy = function(install_path) --------- lazy.nvim --------------- M.echo " Installing lazy.nvim & plugins ..." local repo = "https://github.com/folke/lazy.nvim.git" - vim.fn.system { "git", "clone", "--filter=blob:none", "--branch=stable", repo, install_path } + shell_call { "git", "clone", "--filter=blob:none", "--branch=stable", repo, install_path } vim.opt.rtp:prepend(install_path) -- install plugins @@ -42,7 +47,7 @@ M.gen_chadrc_template = function() -- clone example_config repo if input == "y" then M.echo "cloning example custom config repo ..." - vim.fn.system { "git", "clone", "--depth", "1", "https://github.com/NvChad/example_config", path } + shell_call { "git", "clone", "--depth", "1", "https://github.com/NvChad/example_config", path } vim.fn.delete(path .. ".git", "rf") else -- use very minimal chadrc From 08f3deb9010c259dc3e6e060bbc49568cbcc50ba Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 7 Jul 2023 05:05:50 +0530 Subject: [PATCH 1443/1541] temporarily revert blankline to stable version #2189 --- lua/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 60dab65..bc53433 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -63,6 +63,7 @@ local default_plugins = { { "lukas-reineke/indent-blankline.nvim", + version = "2.20.7", init = function() require("core.utils").lazy_load "indent-blankline.nvim" end, From 720d71b546b8300bf3951c839f52db6cb83c3dc5 Mon Sep 17 00:00:00 2001 From: N <47500890+avi-cenna@users.noreply.github.com> Date: Sat, 8 Jul 2023 19:39:33 -0400 Subject: [PATCH 1444/1541] Update README.md (#2194) Corrected typos and improved grammar --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index be803ca..bdc89d8 100644 --- a/.github/README.md +++ b/.github/README.md @@ -37,7 +37,7 @@ - Lazy loading is done 93% of the time meaning that plugins will not be loaded by default, they will be loaded only when required also at specific commands, events etc. This lowers the startuptime and it was like 0.07~ secs tested on an old pentium machine 1.4ghz + 4gb ram & HDD. -- NvChad isnt a framework! Its supposed to be used as a "base" config, so users could tweak the defaults well, can also remove the things they dont like in the default config and build their config on top of it. Users can tweak the entire default config while staying in their custom config (lua/custom dir). This is the control center of the user's config and gitignored so the users can stay update to-date with NvChad's latest config (main branch) while still controlling it with their chadrc (file that controls entire custom dir) +- NvChad isn't a framework! It's supposed to be used as a "base" config, so users can tweak the defaults well, and also remove the things they don't like in the default config and build their config on top of it. Users can tweak the entire default config while staying in their custom config (lua/custom dir). This is the control center of the user's config and gitignored so the users can stay up-to-date with NvChad's latest config (main branch) while still controlling it with their chadrc (file that controls entire custom dir). ## Theme Showcase From f18488d41cb74321377631f691a3247bc59cb064 Mon Sep 17 00:00:00 2001 From: "A.S.K" <95036645+aimixsaka@users.noreply.github.com> Date: Mon, 24 Jul 2023 12:31:21 +0800 Subject: [PATCH 1445/1541] feat: ignore after folder (#2228) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4564ed0..ce3274d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ syntax coc-settings.json .luarc.json lazy-lock.json +after From 682b023fb36834fda744c9b488d9227c66be7c29 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 26 Jul 2023 06:56:56 +0530 Subject: [PATCH 1446/1541] make tabufline reloadable --- lua/core/init.lua | 4 ++++ lua/plugins/init.lua | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index ea2cebd..a30dfd3 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -96,6 +96,10 @@ autocmd("BufWritePost", { require("plenary.reload").reload_module("nvchad_ui.statusline." .. config.ui.statusline.theme) vim.opt.statusline = "%!v:lua.require('nvchad_ui.statusline." .. config.ui.statusline.theme .. "').run()" + -- tabufline + require("plenary.reload").reload_module "nvchad_ui.tabufline.modules" + vim.opt.tabline = "%!v:lua.require('nvchad_ui.tabufline.modules').run()" + require("base46").load_all_highlights() -- vim.cmd("redraw!") end, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index bc53433..8719168 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -230,7 +230,6 @@ local default_plugins = { config = function(_, opts) dofile(vim.g.base46_cache .. "nvimtree") require("nvim-tree").setup(opts) - vim.g.nvimtree_side = opts.view.side end, }, From 0e27cb4b44fbba69f8646d1f88555737d2b6aedf Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 26 Jul 2023 09:58:01 +0530 Subject: [PATCH 1447/1541] dont reload tabufline if its disabled #2236 --- lua/core/init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index a30dfd3..8342fb2 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -97,8 +97,10 @@ autocmd("BufWritePost", { vim.opt.statusline = "%!v:lua.require('nvchad_ui.statusline." .. config.ui.statusline.theme .. "').run()" -- tabufline - require("plenary.reload").reload_module "nvchad_ui.tabufline.modules" - vim.opt.tabline = "%!v:lua.require('nvchad_ui.tabufline.modules').run()" + if config.ui.tabufline.enabled then + require("plenary.reload").reload_module "nvchad_ui.tabufline.modules" + vim.opt.tabline = "%!v:lua.require('nvchad_ui.tabufline.modules').run()" + end require("base46").load_all_highlights() -- vim.cmd("redraw!") From 6766acefece875c46948fb25f9231a1ace6a11a1 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 6 Aug 2023 21:52:08 +0530 Subject: [PATCH 1448/1541] dont disable editor config with lazy_nvim --- lua/plugins/configs/lazy_nvim.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/configs/lazy_nvim.lua b/lua/plugins/configs/lazy_nvim.lua index 2575dea..cd170bd 100644 --- a/lua/plugins/configs/lazy_nvim.lua +++ b/lua/plugins/configs/lazy_nvim.lua @@ -41,7 +41,6 @@ return { "compiler", "bugreport", "ftplugin", - "editorconfig", }, }, }, From 05f581918a0a99a0298a65556edf37cb784808f3 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 9 Aug 2023 02:20:53 +0200 Subject: [PATCH 1449/1541] feat: added .ignore file (#2271) Added .ignore file. So telescope doesn't ignore the custom folder. --- .ignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .ignore diff --git a/.ignore b/.ignore new file mode 100644 index 0000000..42677fb --- /dev/null +++ b/.ignore @@ -0,0 +1 @@ +!/lua/custom/ From 487ca445665d6d0a9b25f7e367c6a9a300505c9e Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 9 Aug 2023 08:51:40 +0530 Subject: [PATCH 1450/1541] update icon paths --- lua/plugins/configs/cmp.lua | 2 +- lua/plugins/init.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 365ec2c..14450ab 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -15,7 +15,7 @@ local formatting_style = { fields = field_arrangement[cmp_style] or { "abbr", "kind", "menu" }, format = function(_, item) - local icons = require("nvchad_ui.icons").lspkind + local icons = require "nvchad_ui.icons.lspkind" local icon = (cmp_ui.icons and icons[item.kind]) or "" if cmp_style == "atom" or cmp_style == "atom_colored" then diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 8719168..c8efe5d 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -53,7 +53,7 @@ local default_plugins = { { "nvim-tree/nvim-web-devicons", opts = function() - return { override = require("nvchad_ui.icons").devicons } + return { override = require"nvchad_ui.icons.devicons" } end, config = function(_, opts) dofile(vim.g.base46_cache .. "devicons") From 8ea74bc23bcaab9910a827ed69fd9635f87b063e Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 9 Aug 2023 20:22:46 +0530 Subject: [PATCH 1451/1541] update some module paths --- lua/core/bootstrap.lua | 2 +- lua/core/init.lua | 10 +++++----- lua/core/mappings.lua | 8 ++++---- lua/plugins/configs/cmp.lua | 2 +- lua/plugins/configs/lspconfig.lua | 4 ++-- lua/plugins/init.lua | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index 43653a0..bd34d6c 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -32,7 +32,7 @@ M.lazy = function(install_path) require "plugins" -- mason packages & show post_boostrap screen - require "nvchad.post_bootstrap"() + require "nvchad.post_install"() end M.gen_chadrc_template = function() diff --git a/lua/core/init.lua b/lua/core/init.lua index 8342fb2..19804e1 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -93,13 +93,13 @@ autocmd("BufWritePost", { vim.g.transparency = config.ui.transparency -- statusline - require("plenary.reload").reload_module("nvchad_ui.statusline." .. config.ui.statusline.theme) - vim.opt.statusline = "%!v:lua.require('nvchad_ui.statusline." .. config.ui.statusline.theme .. "').run()" + require("plenary.reload").reload_module("nvchad.statusline." .. config.ui.statusline.theme) + vim.opt.statusline = "%!v:lua.require('nvchad.statusline." .. config.ui.statusline.theme .. "').run()" -- tabufline if config.ui.tabufline.enabled then - require("plenary.reload").reload_module "nvchad_ui.tabufline.modules" - vim.opt.tabline = "%!v:lua.require('nvchad_ui.tabufline.modules').run()" + require("plenary.reload").reload_module "nvchad.tabufline.modules" + vim.opt.tabline = "%!v:lua.require('nvchad.tabufline.modules').run()" end require("base46").load_all_highlights() @@ -111,5 +111,5 @@ autocmd("BufWritePost", { local new_cmd = vim.api.nvim_create_user_command new_cmd("NvChadUpdate", function() - require "nvchad.update"() + require "nvchad.updater"() end, {}) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index acc2948..2aaf7ab 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -79,14 +79,14 @@ M.tabufline = { -- cycle through buffers [""] = { function() - require("nvchad_ui.tabufline").tabuflineNext() + require("nvchad.tabufline").tabuflineNext() end, "Goto next buffer", }, [""] = { function() - require("nvchad_ui.tabufline").tabuflinePrev() + require("nvchad.tabufline").tabuflinePrev() end, "Goto prev buffer", }, @@ -94,7 +94,7 @@ M.tabufline = { -- close buffer + hide terminal buffer ["x"] = { function() - require("nvchad_ui.tabufline").close_buffer() + require("nvchad.tabufline").close_buffer() end, "Close buffer", }, @@ -172,7 +172,7 @@ M.lspconfig = { ["ra"] = { function() - require("nvchad_ui.renamer").open() + require("nvchad.renamer").open() end, "LSP rename", }, diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 14450ab..19868b6 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -15,7 +15,7 @@ local formatting_style = { fields = field_arrangement[cmp_style] or { "abbr", "kind", "menu" }, format = function(_, item) - local icons = require "nvchad_ui.icons.lspkind" + local icons = require "nvchad.icons.lspkind" local icon = (cmp_ui.icons and icons[item.kind]) or "" if cmp_style == "atom" or cmp_style == "atom_colored" then diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index facb4cb..fe7cbbc 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,5 +1,5 @@ dofile(vim.g.base46_cache .. "lsp") -require "nvchad_ui.lsp" +require "nvchad.lsp" local M = {} local utils = require "core.utils" @@ -13,7 +13,7 @@ M.on_attach = function(client, bufnr) utils.load_mappings("lspconfig", { buffer = bufnr }) if client.server_capabilities.signatureHelpProvider then - require("nvchad_ui.signature").setup(client) + require("nvchad.signature").setup(client) end if not utils.load_config().ui.lsp_semantic_tokens and client.supports_method "textDocument/semanticTokens" then diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index c8efe5d..292fd3e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -20,7 +20,7 @@ local default_plugins = { branch = "v2.0", lazy = false, config = function() - require "nvchad_ui" + require "nvchad" end, }, @@ -53,7 +53,7 @@ local default_plugins = { { "nvim-tree/nvim-web-devicons", opts = function() - return { override = require"nvchad_ui.icons.devicons" } + return { override = require "nvchad.icons.devicons" } end, config = function(_, opts) dofile(vim.g.base46_cache .. "devicons") From 46a61073a82087f9e339dab6de2b2f94c051b070 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 9 Aug 2023 20:29:50 +0530 Subject: [PATCH 1452/1541] clean up --- lua/plugins/configs/lspconfig.lua | 2 +- lua/plugins/init.lua | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index fe7cbbc..18e84ad 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -54,7 +54,7 @@ require("lspconfig").lua_ls.setup { library = { [vim.fn.expand "$VIMRUNTIME/lua"] = true, [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true, - [vim.fn.stdpath "data" .. "/lazy/extensions/nvchad_types"] = true, + [vim.fn.stdpath "data" .. "/lazy/ui/nvchad_types"] = true, [vim.fn.stdpath "data" .. "/lazy/lazy.nvim/lua/lazy"] = true, }, maxPreload = 100000, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 292fd3e..e4355a9 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -4,9 +4,6 @@ local default_plugins = { "nvim-lua/plenary.nvim", - -- nvchad plugins - { "NvChad/extensions", branch = "v2.0" }, - { "NvChad/base46", branch = "v2.0", From d3d9aa251a9dd94881cdbc48c5852b3eaba969b8 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 10 Aug 2023 11:09:25 +0530 Subject: [PATCH 1453/1541] rm config func from UI plugin spec cuz the code will be loaded in the plugin/init.lua file of UI repo --- lua/plugins/init.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e4355a9..7b8a253 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -16,9 +16,6 @@ local default_plugins = { "NvChad/ui", branch = "v2.0", lazy = false, - config = function() - require "nvchad" - end, }, { From 9c013a6aac6925172e88d2ca17fbd8c1a548560d Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 24 Aug 2023 12:56:22 +0200 Subject: [PATCH 1454/1541] updated lazygit keys for which-key plugin (#2331) --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 7b8a253..8228109 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -252,7 +252,7 @@ local default_plugins = { -- Only load whichkey after all the gui { "folke/which-key.nvim", - keys = { "", '"', "'", "`", "c", "v", "g" }, + keys = { "", "", '"', "'", "`", "c", "v", "g" }, init = function() require("core.utils").load_mappings "whichkey" end, From 3f1e6d71d4c6c98380d5383d5e1bf1f6eaa3399f Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 27 Aug 2023 11:28:56 +0530 Subject: [PATCH 1455/1541] make whichkey lazyloadable by its cmd | fix #2342 --- lua/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 8228109..6491c3b 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -256,6 +256,7 @@ local default_plugins = { init = function() require("core.utils").load_mappings "whichkey" end, + cmd = "WhichKey", config = function(_, opts) dofile(vim.g.base46_cache .. "whichkey") require("which-key").setup(opts) From a9bc954d0203ae9bded11f1e7167bf9020f181aa Mon Sep 17 00:00:00 2001 From: Diogo Silva Date: Wed, 30 Aug 2023 21:28:07 -0300 Subject: [PATCH 1456/1541] refactor: gen chadrc template (#2349) --- lua/core/bootstrap.lua | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index bd34d6c..c1bab90 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -1,4 +1,5 @@ local M = {} +local fn = vim.fn M.echo = function(str) vim.cmd "redraw" @@ -6,13 +7,13 @@ M.echo = function(str) end local function shell_call(args) - local output = vim.fn.system(args) + local output = fn.system(args) assert(vim.v.shell_error == 0, "External call failed with error code: " .. vim.v.shell_error .. "\n" .. output) end M.lazy = function(install_path) ------------- base46 --------------- - local lazy_path = vim.fn.stdpath "data" .. "/lazy/base46" + local lazy_path = fn.stdpath "data" .. "/lazy/base46" M.echo " Compiling base46 theme to bytecode ..." @@ -36,26 +37,24 @@ M.lazy = function(install_path) end M.gen_chadrc_template = function() - if not vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1] then - local path = vim.fn.stdpath "config" .. "/lua/custom/" - local input = "N" + local path = fn.stdpath "config" .. "/lua/custom" - if next(vim.api.nvim_list_uis()) then - input = vim.fn.input "Do you want to install example custom config? (y/N) : " - end + if fn.isdirectory(path) ~= 1 then + local input = fn.input "Do you want to install example custom config? (y/N): " - -- clone example_config repo - if input == "y" then - M.echo "cloning example custom config repo ..." + if input:lower() == "y" then + M.echo "Cloning example custom config repo..." shell_call { "git", "clone", "--depth", "1", "https://github.com/NvChad/example_config", path } - vim.fn.delete(path .. ".git", "rf") + fn.delete(path .. "/.git", "rf") else -- use very minimal chadrc - vim.fn.mkdir(path, "p") + fn.mkdir(path, "p") - local file = io.open(path .. "chadrc.lua", "w") - file:write "---@type ChadrcConfig \n local M = {}\n M.ui = {theme = 'onedark'}\n return M" - file:close() + local file = io.open(path .. "/chadrc.lua", "w") + if file then + file:write "---@type ChadrcConfig\nlocal M = {}\n\nM.ui = { theme = 'onedark' }\n\nreturn M" + file:close() + end end end end From a69e8dc59142fac200d93ace190829fb12b455ec Mon Sep 17 00:00:00 2001 From: camel_case <101834410+UTFeight@users.noreply.github.com> Date: Sat, 2 Sep 2023 14:30:02 +0300 Subject: [PATCH 1457/1541] feat(lsp): add visual mode code actions (#2353) --- lua/core/mappings.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 2aaf7ab..14fd0db 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -240,6 +240,15 @@ M.lspconfig = { "List workspace folders", }, }, + + v = { + ["ca"] = { + function() + vim.lsp.buf.code_action() + end, + "LSP code action", + }, + }, } M.nvimtree = { From 456ae88fadef197b4ce774545d1f047bbbcdb067 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 7 Sep 2023 21:32:07 +0530 Subject: [PATCH 1458/1541] include MasonUpdate cmd for mason.nvim lazyloading https://github.com/NvChad/ui/commit/5344b81e5e30edd930072cccd4ccbf6e88756a86 , so we dont need to specifically load mason in updater --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 6491c3b..e869340 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -118,7 +118,7 @@ local default_plugins = { -- lsp stuff { "williamboman/mason.nvim", - cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" }, + cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUpdate" }, opts = function() return require "plugins.configs.mason" end, From de8597731641e410ac78fa6395c98a01c532d091 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 8 Sep 2023 06:11:49 +0530 Subject: [PATCH 1459/1541] rm useless luasnip calls --- lua/plugins/configs/others.lua | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index dafd5a4..e973965 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -25,16 +25,8 @@ M.blankline = { M.luasnip = function(opts) require("luasnip").config.set_config(opts) - -- vscode format - require("luasnip.loaders.from_vscode").lazy_load() require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" } - - -- snipmate format - require("luasnip.loaders.from_snipmate").load() require("luasnip.loaders.from_snipmate").lazy_load { paths = vim.g.snipmate_snippets_path or "" } - - -- lua format - require("luasnip.loaders.from_lua").load() require("luasnip.loaders.from_lua").lazy_load { paths = vim.g.lua_snippets_path or "" } vim.api.nvim_create_autocmd("InsertLeave", { From 617dca4dc11231138eb880b7c79253c17c9720f9 Mon Sep 17 00:00:00 2001 From: Zohir Benghalem <116302048+kayuxx@users.noreply.github.com> Date: Sat, 9 Sep 2023 02:13:28 +0100 Subject: [PATCH 1460/1541] add fzf telescope extension to improve sorting performance (#2371) * add fzf telescope extension to improve sorting performance * add fzf config tbl to the default tlsc config --- lua/plugins/configs/telescope.lua | 10 +++++++++- lua/plugins/init.lua | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 784fb19..91c1d3a 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -49,7 +49,15 @@ local options = { }, }, - extensions_list = { "themes", "terms" }, + extensions_list = { "themes", "terms", "fzf" }, + extensions = { + fzf = { + fuzzy = true, + override_generic_sorter = true, + override_file_sorter = true, + case_mode = "smart_case", + }, + }, } return options diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e869340..a517851 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -229,7 +229,7 @@ local default_plugins = { { "nvim-telescope/telescope.nvim", - dependencies = "nvim-treesitter/nvim-treesitter", + dependencies = { "nvim-treesitter/nvim-treesitter", { "nvim-telescope/telescope-fzf-native.nvim", build = "make" } }, cmd = "Telescope", init = function() require("core.utils").load_mappings "telescope" From 215aa2bb2ff702014132c629d9c995246234fe0e Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 11 Sep 2023 14:47:45 +0530 Subject: [PATCH 1461/1541] Revert "rm useless luasnip calls" This reverts commit de8597731641e410ac78fa6395c98a01c532d091. --- lua/plugins/configs/others.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index e973965..dafd5a4 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -25,8 +25,16 @@ M.blankline = { M.luasnip = function(opts) require("luasnip").config.set_config(opts) + -- vscode format + require("luasnip.loaders.from_vscode").lazy_load() require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" } + + -- snipmate format + require("luasnip.loaders.from_snipmate").load() require("luasnip.loaders.from_snipmate").lazy_load { paths = vim.g.snipmate_snippets_path or "" } + + -- lua format + require("luasnip.loaders.from_lua").load() require("luasnip.loaders.from_lua").lazy_load { paths = vim.g.lua_snippets_path or "" } vim.api.nvim_create_autocmd("InsertLeave", { From 3091ea58359bb85f087499bd73fbc0a57a935c34 Mon Sep 17 00:00:00 2001 From: Al Berez Date: Fri, 15 Sep 2023 23:18:10 -0700 Subject: [PATCH 1462/1541] Keep visual selection when indent (#2382) When user indent visually selected text with `>>` or `<<` this change will keep visual selection. --- lua/core/mappings.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 14fd0db..dde5bfc 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -61,6 +61,8 @@ M.general = { v = { [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "Move up", opts = { expr = true } }, [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "Move down", opts = { expr = true } }, + ["<"] = { ""] = { ">gv", "Indent line" }, }, x = { From e868fab1f26919fe48bb44feae5f4056d50c2627 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 25 Sep 2023 12:25:09 +0530 Subject: [PATCH 1463/1541] add options for term module win resize vals --- lua/core/default_config.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 639916a..2114eab 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -75,12 +75,15 @@ M.ui = { cheatsheet = { theme = "grid" }, -- simple/grid lsp = { - -- show function signatures i.e args as you type signature = { disabled = false, - silent = true, -- silences 'no signature help available' message from appearing + silent = true, -- silences 'no signature help available' message }, }, + + term = { + sizes = { sp = 0.3, vsp = 0.2 }, + }, } M.plugins = "" -- path i.e "custom.plugins", so make custom/plugins.lua file From 92b7f38e8392c43cff8844714025fa3e330227f3 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 25 Sep 2023 12:28:05 +0530 Subject: [PATCH 1464/1541] rm nvterm & use ui.term related mappings --- lua/core/mappings.lua | 110 ++++++++++++++++++++++-------------------- lua/plugins/init.lua | 11 ----- 2 files changed, 58 insertions(+), 63 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index dde5bfc..ae44e7e 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -292,70 +292,76 @@ M.telescope = { }, } -M.nvterm = { - plugin = true, - - t = { - -- toggle in terminal mode - [""] = { - function() - require("nvterm.terminal").toggle "float" - end, - "Toggle floating term", - }, - - [""] = { - function() - require("nvterm.terminal").toggle "horizontal" - end, - "Toggle horizontal term", - }, - - [""] = { - function() - require("nvterm.terminal").toggle "vertical" - end, - "Toggle vertical term", - }, - }, - +M.terminal = { n = { - -- toggle in normal mode - [""] = { - function() - require("nvterm.terminal").toggle "float" - end, - "Toggle floating term", - }, - - [""] = { - function() - require("nvterm.terminal").toggle "horizontal" - end, - "Toggle horizontal term", - }, - - [""] = { - function() - require("nvterm.terminal").toggle "vertical" - end, - "Toggle vertical term", - }, - - -- new + -- spawn new terms ["h"] = { function() - require("nvterm.terminal").new "horizontal" + require("nvchad.term").new { pos = "sp", size = 0.3 } end, "New horizontal term", }, ["v"] = { function() - require("nvterm.terminal").new "vertical" + require("nvchad.term").new { pos = "vsp", size = 0.3 } end, "New vertical term", }, + + -- toggle terms + [""] = { + function() + require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm", size = 0.3 } + end, + "New vertical term", + }, + + [""] = { + function() + require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm", size = 0.2 } + end, + "New vertical term", + }, + + [""] = { + function() + require("nvchad.term").toggle { pos = "float", id = "floatTerm" } + end, + "Toggleable Floating term", + }, + }, + + -- toggle terms in terminal mode + t = { + [""] = { + function() + local win = vim.api.nvim_get_current_win() + vim.api.nvim_win_close(win, true) + end, + "close term in terminal mode", + }, + + [""] = { + function() + require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm" } + end, + "New vertical term", + }, + + [""] = { + function() + require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm" } + end, + "New vertical term", + }, + + [""] = { + function() + require("nvchad.term").toggle { pos = "float", id = "floatTerm" } + end, + "Toggleable Floating term", + }, }, } diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index a517851..1567a64 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -18,17 +18,6 @@ local default_plugins = { lazy = false, }, - { - "NvChad/nvterm", - init = function() - require("core.utils").load_mappings "nvterm" - end, - config = function(_, opts) - require "base46.term" - require("nvterm").setup(opts) - end, - }, - { "NvChad/nvim-colorizer.lua", init = function() From d9b3980e6265e692c979e51d483193d9272ca5d1 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 25 Sep 2023 12:33:22 +0530 Subject: [PATCH 1465/1541] update ui plugin branch --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 1567a64..fb9065b 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -14,7 +14,7 @@ local default_plugins = { { "NvChad/ui", - branch = "v2.0", + branch = "v3.0", lazy = false, }, From 1b20da0115438b6b4b7ab540902dc6867fa190e6 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 26 Sep 2023 11:28:45 +0530 Subject: [PATCH 1466/1541] update version in core/default_config.lua --- lua/core/default_config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 2114eab..1a565a7 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -1,7 +1,7 @@ local M = {} M.options = { - nvchad_branch = "v2.0", + nvchad_branch = "v3.0", } M.ui = { From 17a8959bea6afdedb38a4c64848f80ea3dabaed3 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 26 Sep 2023 18:32:15 +0530 Subject: [PATCH 1467/1541] add option for term auto_insert --- lua/core/default_config.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 1a565a7..9c9bad1 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -83,6 +83,9 @@ M.ui = { term = { sizes = { sp = 0.3, vsp = 0.2 }, + behavior = { + auto_insert = true, + }, }, } From d58ec3f55d34fe9339e0d0eb8645e5bbbaba234e Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 26 Sep 2023 18:51:34 +0530 Subject: [PATCH 1468/1541] properly disable lsp signature https://github.com/NvChad/ui/pull/188#issuecomment-1735510051 --- lua/core/default_config.lua | 3 ++- lua/plugins/configs/lspconfig.lua | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 9c9bad1..75763e7 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -13,7 +13,6 @@ M.ui = { theme_toggle = { "onedark", "one_light" }, theme = "onedark", -- default theme transparency = false, - lsp_semantic_tokens = false, -- needs nvim v0.9, just adds highlight groups for lsp semantic tokens -- https://github.com/NvChad/base46/tree/v2.0/lua/base46/extended_integrations extended_integrations = {}, -- these aren't compiled by default, ex: "alpha", "notify" @@ -79,6 +78,8 @@ M.ui = { disabled = false, silent = true, -- silences 'no signature help available' message }, + + semantic_tokens = false, }, term = { diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 18e84ad..61d80ca 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -12,11 +12,15 @@ M.on_attach = function(client, bufnr) utils.load_mappings("lspconfig", { buffer = bufnr }) - if client.server_capabilities.signatureHelpProvider then + -- signature stuff + local conf = utils.load_config().ui.lsp + + if conf.signature and client.server_capabilities.signatureHelpProvider then require("nvchad.signature").setup(client) end - if not utils.load_config().ui.lsp_semantic_tokens and client.supports_method "textDocument/semanticTokens" then + -- semanticTokens + if not conf.semantic_tokens and client.supports_method "textDocument/semanticTokens" then client.server_capabilities.semanticTokensProvider = nil end end From 1afbaef5c7c36cf24cf6b2fd9712310c8358736e Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 26 Sep 2023 20:41:19 +0530 Subject: [PATCH 1469/1541] properly disable lsp signature --- lua/core/default_config.lua | 6 +----- lua/plugins/configs/lspconfig.lua | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 75763e7..69d6c01 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -74,11 +74,7 @@ M.ui = { cheatsheet = { theme = "grid" }, -- simple/grid lsp = { - signature = { - disabled = false, - silent = true, -- silences 'no signature help available' message - }, - + signature = true, semantic_tokens = false, }, diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 61d80ca..5b636ad 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -2,27 +2,27 @@ dofile(vim.g.base46_cache .. "lsp") require "nvchad.lsp" local M = {} -local utils = require "core.utils" -- export on_attach & capabilities for custom lspconfigs M.on_attach = function(client, bufnr) - client.server_capabilities.documentFormattingProvider = false - client.server_capabilities.documentRangeFormattingProvider = false - - utils.load_mappings("lspconfig", { buffer = bufnr }) - - -- signature stuff + local utils = require "core.utils" local conf = utils.load_config().ui.lsp - if conf.signature and client.server_capabilities.signatureHelpProvider then - require("nvchad.signature").setup(client) - end - -- semanticTokens if not conf.semantic_tokens and client.supports_method "textDocument/semanticTokens" then client.server_capabilities.semanticTokensProvider = nil end + + -- signature + if conf.signature and client.server_capabilities.signatureHelpProvider then + require("nvchad.signature").setup(client, bufnr) + end + + client.server_capabilities.documentFormattingProvider = false + client.server_capabilities.documentRangeFormattingProvider = false + + utils.load_mappings("lspconfig", { buffer = bufnr }) end M.capabilities = vim.lsp.protocol.make_client_capabilities() From cb18b424b91376bdeb10ed950306a507d43e3dbe Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 27 Sep 2023 06:14:48 +0530 Subject: [PATCH 1470/1541] misc --- lua/plugins/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index fb9065b..3f76ffd 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -16,6 +16,9 @@ local default_plugins = { "NvChad/ui", branch = "v3.0", lazy = false, + config = function() + require "nvchad" + end, }, { From 4a8fb6915750d5ffd9ab0a31c2e30dc53dabf65e Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 28 Sep 2023 07:22:02 +0530 Subject: [PATCH 1471/1541] lspconfig file: place default conf in a function This will make sure that whenever the onattach or capabilities is pulled from the default lspconfig file, thosse dofile etc code ( which is now in defautls func ) wont be called , like before. --- lua/plugins/configs/lspconfig.lua | 45 ++++++++++++++++--------------- lua/plugins/init.lua | 2 +- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 5b636ad..a605c7e 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,10 +1,6 @@ -dofile(vim.g.base46_cache .. "lsp") -require "nvchad.lsp" - local M = {} -- export on_attach & capabilities for custom lspconfigs - M.on_attach = function(client, bufnr) local utils = require "core.utils" local conf = utils.load_config().ui.lsp @@ -45,27 +41,32 @@ M.capabilities.textDocument.completion.completionItem = { }, } -require("lspconfig").lua_ls.setup { - on_attach = M.on_attach, - capabilities = M.capabilities, +M.defaults = function() + dofile(vim.g.base46_cache .. "lsp") + require "nvchad.lsp" - settings = { - Lua = { - diagnostics = { - globals = { "vim" }, - }, - workspace = { - library = { - [vim.fn.expand "$VIMRUNTIME/lua"] = true, - [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true, - [vim.fn.stdpath "data" .. "/lazy/ui/nvchad_types"] = true, - [vim.fn.stdpath "data" .. "/lazy/lazy.nvim/lua/lazy"] = true, + require("lspconfig").lua_ls.setup { + on_attach = M.on_attach, + capabilities = M.capabilities, + + settings = { + Lua = { + diagnostics = { + globals = { "vim" }, + }, + workspace = { + library = { + [vim.fn.expand "$VIMRUNTIME/lua"] = true, + [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true, + [vim.fn.stdpath "data" .. "/lazy/ui/nvchad_types"] = true, + [vim.fn.stdpath "data" .. "/lazy/lazy.nvim/lua/lazy"] = true, + }, + maxPreload = 100000, + preloadFileSize = 10000, }, - maxPreload = 100000, - preloadFileSize = 10000, }, }, - }, -} + } +end return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 3f76ffd..3070c1a 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -133,7 +133,7 @@ local default_plugins = { require("core.utils").lazy_load "nvim-lspconfig" end, config = function() - require "plugins.configs.lspconfig" + require("plugins.configs.lspconfig").defaults() end, }, From f48ff142f03d75f885f518711f47a8696fd76165 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 28 Sep 2023 11:22:12 +0530 Subject: [PATCH 1472/1541] migrate to blankline v3.0 ( breaking change ) --- lua/plugins/configs/others.lua | 20 ++------------------ lua/plugins/init.lua | 8 +++++--- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index dafd5a4..fea5af2 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -2,24 +2,8 @@ local M = {} local utils = require "core.utils" M.blankline = { - indentLine_enabled = 1, - filetype_exclude = { - "help", - "terminal", - "lazy", - "lspinfo", - "TelescopePrompt", - "TelescopeResults", - "mason", - "nvdash", - "nvcheatsheet", - "", - }, - buftype_exclude = { "terminal" }, - show_trailing_blankline_indent = false, - show_first_indent_level = false, - show_current_context = true, - show_current_context_start = true, + indent = { highlight = "IblChar" }, + scope = { highlight = "IblScopeChar" }, } M.luasnip = function(opts) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 3070c1a..0e8f84e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -6,7 +6,7 @@ local default_plugins = { { "NvChad/base46", - branch = "v2.0", + branch = "v3.0", build = function() require("base46").load_all_highlights() end, @@ -49,7 +49,6 @@ local default_plugins = { { "lukas-reineke/indent-blankline.nvim", - version = "2.20.7", init = function() require("core.utils").lazy_load "indent-blankline.nvim" end, @@ -59,7 +58,10 @@ local default_plugins = { config = function(_, opts) require("core.utils").load_mappings "blankline" dofile(vim.g.base46_cache .. "blankline") - require("indent_blankline").setup(opts) + + local hooks = require "ibl.hooks" + hooks.register(hooks.type.WHITESPACE, hooks.builtin.hide_first_space_indent_level) + require("ibl").setup(opts) end, }, From 47e9ce90ff07db8b20a4c7afae30210c0747525f Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 1 Oct 2023 11:15:23 +0530 Subject: [PATCH 1473/1541] use slim chars for blankline indent also enable indent markers in nvimtree --- lua/plugins/configs/nvimtree.lua | 2 +- lua/plugins/configs/others.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index b4a8aee..c54248e 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -36,7 +36,7 @@ local options = { highlight_opened_files = "none", indent_markers = { - enable = false, + enable = true, }, icons = { diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index fea5af2..9e01f8d 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -2,8 +2,8 @@ local M = {} local utils = require "core.utils" M.blankline = { - indent = { highlight = "IblChar" }, - scope = { highlight = "IblScopeChar" }, + indent = { char = "│", highlight = "IblChar" }, + scope = { char = "│", highlight = "IblScopeChar" }, } M.luasnip = function(opts) From 0d2265aa37f9da5dfcc3308ac2a4a13d5b96ec2a Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 2 Oct 2023 13:49:24 +0530 Subject: [PATCH 1474/1541] rm outdated link from readme --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index bdc89d8..192aa3c 100644 --- a/.github/README.md +++ b/.github/README.md @@ -113,7 +113,7 @@ A fuzzy file finder, picker, sorter, previewer and much more: If you like NvChad and would like to support & appreciate it via donation then I'll gladly accept it. [![kofi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/siduck) -[![paypal](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white)](https://paypal.me/siduck76) +[![paypal](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white)](https://paypal.me/siduck13) [![buymeacoffee](https://img.shields.io/badge/Buy_Me_A_Coffee-FFDD00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/siduck) [![patreon](https://img.shields.io/badge/Patreon-F96854?style=for-the-badge&logo=patreon&logoColor=white)](https://www.patreon.com/siduck) From 5261eb330b2fe012b9f5d54302f3741e91c22992 Mon Sep 17 00:00:00 2001 From: Sidhanth Rathod Date: Thu, 28 Sep 2023 11:33:45 +0530 Subject: [PATCH 1475/1541] Rm outdated info in readme --- .github/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/README.md b/.github/README.md index 192aa3c..8f3ec47 100644 --- a/.github/README.md +++ b/.github/README.md @@ -88,8 +88,7 @@ A fuzzy file finder, picker, sorter, previewer and much more: - Many beautiful themes, theme toggler by our [base46 plugin](https://github.com/NvChad/base46) - Inbuilt terminal toggling & management with [Nvterm](https://github.com/NvChad/nvterm) -- NvChad updater, hide & unhide terminal buffers with [NvChad extensions](https://github.com/NvChad/extensions) -- Lightweight & performant ui plugin with [NvChad UI](https://github.com/NvChad/ui) It provides statusline modules, tabufline ( tabs + buffer manager) , beautiful cheatsheets and much more! +- Lightweight & performant ui plugin with [NvChad UI](https://github.com/NvChad/ui) It provides statusline modules, tabufline ( tabs + buffer manager) , beautiful cheatsheets, NvChad updater, hide & unhide terminal buffers, theme switcher and much more! - File navigation with [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua) - Beautiful and configurable icons with [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) - Git diffs and more with [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) From ed18649e94b58a2855d43e9356c56433d207f683 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 9 Oct 2023 17:13:11 +0530 Subject: [PATCH 1476/1541] statusline: dont reload if theme is custom this will prevent auto-reload of statusline , good for non custom statusline users --- lua/core/init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 19804e1..6f396ac 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -93,8 +93,10 @@ autocmd("BufWritePost", { vim.g.transparency = config.ui.transparency -- statusline - require("plenary.reload").reload_module("nvchad.statusline." .. config.ui.statusline.theme) - vim.opt.statusline = "%!v:lua.require('nvchad.statusline." .. config.ui.statusline.theme .. "').run()" + if config.ui.statusline.theme ~= "custom" then + require("plenary.reload").reload_module("nvchad.statusline." .. config.ui.statusline.theme) + vim.opt.statusline = "%!v:lua.require('nvchad.statusline." .. config.ui.statusline.theme .. "').run()" + end -- tabufline if config.ui.tabufline.enabled then From 5748536742f630808d05b28be54f370f67eb1cc7 Mon Sep 17 00:00:00 2001 From: Sidhanth Rathod Date: Mon, 16 Oct 2023 07:24:14 +0530 Subject: [PATCH 1477/1541] performance: avoid reloading config table #2360 (#2444) * performance: avoid reloading config (#2360) * performance: avoid reloading config * Rm outdated info in readme --------- Co-authored-by: Sidhanth Rathod * update nvchad load_config result path * update branch names --------- Co-authored-by: georgejean --- lua/core/bootstrap.lua | 2 +- lua/core/init.lua | 7 ++----- lua/core/utils.lua | 4 ++-- lua/nvconfig.lua | 2 ++ lua/plugins/configs/cmp.lua | 2 +- lua/plugins/configs/lspconfig.lua | 3 +-- lua/plugins/init.lua | 6 +++--- 7 files changed, 12 insertions(+), 14 deletions(-) create mode 100644 lua/nvconfig.lua diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index c1bab90..20e056e 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -18,7 +18,7 @@ M.lazy = function(install_path) M.echo " Compiling base46 theme to bytecode ..." local base46_repo = "https://github.com/NvChad/base46" - shell_call { "git", "clone", "--depth", "1", "-b", "v2.0", base46_repo, lazy_path } + shell_call { "git", "clone", "--depth", "1", "-b", "v3.0", base46_repo, lazy_path } vim.opt.rtp:prepend(lazy_path) require("base46").compile() diff --git a/lua/core/init.lua b/lua/core/init.lua index 6f396ac..61de98f 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -1,12 +1,9 @@ local opt = vim.opt local g = vim.g -local config = require("core.utils").load_config() -------------------------------------- globals ----------------------------------------- -g.nvchad_theme = config.ui.theme g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" g.toggle_theme_icon = "  " -g.transparency = config.ui.transparency -------------------------------------- options ------------------------------------------ opt.laststatus = 3 -- global statusline @@ -83,11 +80,11 @@ autocmd("BufWritePost", { local app_name = vim.env.NVIM_APPNAME and vim.env.NVIM_APPNAME or "nvim" local module = string.gsub(fp, "^.*/" .. app_name .. "/lua/", ""):gsub("/", ".") + require("plenary.reload").reload_module "nvconfig" require("plenary.reload").reload_module "base46" require("plenary.reload").reload_module(module) - require("plenary.reload").reload_module "custom.chadrc" - config = require("core.utils").load_config() + local config = require "nvconfig" vim.g.nvchad_theme = config.ui.theme vim.g.transparency = config.ui.transparency diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 8b2a03d..96fe103 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -7,7 +7,7 @@ M.load_config = function() if chadrc_path then local chadrc = dofile(chadrc_path) - + config.mappings = M.remove_disabled_keys(chadrc.mappings, config.mappings) config = merge_tb("force", config, chadrc) config.mappings.disabled = nil @@ -74,7 +74,7 @@ M.load_mappings = function(section, mapping_opt) end end - local mappings = require("core.utils").load_config().mappings + local mappings = require("nvconfig").mappings if type(section) == "string" then mappings[section]["plugin"] = nil diff --git a/lua/nvconfig.lua b/lua/nvconfig.lua new file mode 100644 index 0000000..df0d4a4 --- /dev/null +++ b/lua/nvconfig.lua @@ -0,0 +1,2 @@ +-- check default config at core/default_config.lua +return require("core.utils").load_config() diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 19868b6..4af9ed2 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -2,7 +2,7 @@ local cmp = require "cmp" dofile(vim.g.base46_cache .. "cmp") -local cmp_ui = require("core.utils").load_config().ui.cmp +local cmp_ui = require("nvconfig").ui.cmp local cmp_style = cmp_ui.style local field_arrangement = { diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index a605c7e..df7f05b 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -3,14 +3,13 @@ local M = {} -- export on_attach & capabilities for custom lspconfigs M.on_attach = function(client, bufnr) local utils = require "core.utils" - local conf = utils.load_config().ui.lsp + local conf = require "nvconfig" -- semanticTokens if not conf.semantic_tokens and client.supports_method "textDocument/semanticTokens" then client.server_capabilities.semanticTokensProvider = nil end - -- signature if conf.signature and client.server_capabilities.signatureHelpProvider then require("nvchad.signature").setup(client, bufnr) end diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 0e8f84e..2b1b478 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -6,7 +6,7 @@ local default_plugins = { { "NvChad/base46", - branch = "v3.0", + branch = "test", build = function() require("base46").load_all_highlights() end, @@ -14,7 +14,7 @@ local default_plugins = { { "NvChad/ui", - branch = "v3.0", + branch = "test", lazy = false, config = function() require "nvchad" @@ -258,7 +258,7 @@ local default_plugins = { }, } -local config = require("core.utils").load_config() +local config = require "nvconfig" if #config.plugins > 0 then table.insert(default_plugins, { import = config.plugins }) From 445d32c19f7eb5ed1b09fc4f63f7f8f0cc666a7e Mon Sep 17 00:00:00 2001 From: umlx5h <20206121+umlx5h@users.noreply.github.com> Date: Mon, 16 Oct 2023 23:36:34 +0900 Subject: [PATCH 1478/1541] Add CTRL-w key to whichkey lazyloading (#2446) --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 2b1b478..4d5abd9 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -246,7 +246,7 @@ local default_plugins = { -- Only load whichkey after all the gui { "folke/which-key.nvim", - keys = { "", "", '"', "'", "`", "c", "v", "g" }, + keys = { "", "", "", '"', "'", "`", "c", "v", "g" }, init = function() require("core.utils").load_mappings "whichkey" end, From 35ee0bc81de45c4ad0a870a4a5ad22d393b89f21 Mon Sep 17 00:00:00 2001 From: KorigamiK <72932688+KorigamiK@users.noreply.github.com> Date: Mon, 16 Oct 2023 17:02:31 +0530 Subject: [PATCH 1479/1541] Fix unreachable mappings for the lsp (#2443) --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index ae44e7e..f6e9728 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -193,7 +193,7 @@ M.lspconfig = { "LSP references", }, - ["f"] = { + ["lf"] = { function() vim.diagnostic.open_float { border = "rounded" } end, From cb27ae0ed17b86c1ffe5553710cb0355dff8c216 Mon Sep 17 00:00:00 2001 From: Sidhanth Rathod Date: Tue, 17 Oct 2023 15:25:13 +0530 Subject: [PATCH 1480/1541] update branch names for ui/base46 plugin --- lua/plugins/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 4d5abd9..31a6283 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -6,7 +6,7 @@ local default_plugins = { { "NvChad/base46", - branch = "test", + branch = "v3.0", build = function() require("base46").load_all_highlights() end, @@ -14,7 +14,7 @@ local default_plugins = { { "NvChad/ui", - branch = "test", + branch = "v3.0", lazy = false, config = function() require "nvchad" From cc3289639b1507c19556e6e922f9adc9d51d4d31 Mon Sep 17 00:00:00 2001 From: Sidhanth Rathod Date: Tue, 24 Oct 2023 06:45:17 +0530 Subject: [PATCH 1481/1541] Breaking Change for base46 extended_integrations | Improve syntax (#2459) * performance: avoid reloading config (#2360) * performance: avoid reloading config * Rm outdated info in readme --------- Co-authored-by: Sidhanth Rathod * update nvchad load_config result path * Update utils.lua * update branch names * Fix unreachable mappings for the lsp (#2443) * add option for base46 integrations * rm nvchad_theme global * use correct conf path in lspconfig --------- Co-authored-by: georgejean Co-authored-by: KorigamiK <72932688+KorigamiK@users.noreply.github.com> --- lua/core/default_config.lua | 24 +++++++++++++++++++++--- lua/core/init.lua | 3 --- lua/plugins/configs/lspconfig.lua | 4 ++-- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 69d6c01..c44b1b0 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -14,9 +14,6 @@ M.ui = { theme = "onedark", -- default theme transparency = false, - -- https://github.com/NvChad/base46/tree/v2.0/lua/base46/extended_integrations - extended_integrations = {}, -- these aren't compiled by default, ex: "alpha", "notify" - -- cmp themeing cmp = { icons = true, @@ -92,4 +89,25 @@ M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startu M.mappings = require "core.mappings" +M.base46 = { + integrations = { + "blankline", + "cmp", + "defaults", + "devicons", + "git", + "lsp", + "mason", + "nvchad_updater", + "nvcheatsheet", + "nvdash", + "nvimtree", + "statusline", + "syntax", + "tbline", + "telescope", + "whichkey", + }, +} + return M diff --git a/lua/core/init.lua b/lua/core/init.lua index 61de98f..8b5d9ce 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -86,9 +86,6 @@ autocmd("BufWritePost", { local config = require "nvconfig" - vim.g.nvchad_theme = config.ui.theme - vim.g.transparency = config.ui.transparency - -- statusline if config.ui.statusline.theme ~= "custom" then require("plenary.reload").reload_module("nvchad.statusline." .. config.ui.statusline.theme) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index df7f05b..5c6027c 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -3,8 +3,8 @@ local M = {} -- export on_attach & capabilities for custom lspconfigs M.on_attach = function(client, bufnr) local utils = require "core.utils" - local conf = require "nvconfig" - + local conf = require("nvconfig").ui.lsp + -- semanticTokens if not conf.semantic_tokens and client.supports_method "textDocument/semanticTokens" then client.server_capabilities.semanticTokensProvider = nil From ccdf0dda11d8eeba008b2f6b060aacafd11d8ba2 Mon Sep 17 00:00:00 2001 From: Panos Sakkos Date: Fri, 27 Oct 2023 03:33:43 +0300 Subject: [PATCH 1482/1541] Ignore .DS_Store files (#2463) Ignores macos .DS_Store files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ce3274d..d8a93d9 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ coc-settings.json .luarc.json lazy-lock.json after +**/.DS_Store From da85f7fbcd97c2290359d4a55db49f1384dc527b Mon Sep 17 00:00:00 2001 From: TheFedaikin Date: Sun, 22 Oct 2023 15:52:38 +0300 Subject: [PATCH 1483/1541] feat(mappings): make a cmd to remove flickering (#2456) --- lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index f6e9728..fff878b 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -16,7 +16,7 @@ M.general = { }, n = { - [""] = { ":noh ", "Clear highlights" }, + [""] = { " noh ", "Clear highlights" }, -- switch between windows [""] = { "h", "Window left" }, [""] = { "l", "Window right" }, From 48f1bb702dece58376f030b57a178c28a441262e Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 28 Oct 2023 09:34:28 +0530 Subject: [PATCH 1484/1541] include loading of treesitter hlgroups --- lua/core/default_config.lua | 1 + lua/plugins/init.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index c44b1b0..1a79f3c 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -104,6 +104,7 @@ M.base46 = { "nvimtree", "statusline", "syntax", + "treesitter", "tbline", "telescope", "whichkey", diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 31a6283..3dd6904 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -77,6 +77,7 @@ local default_plugins = { end, config = function(_, opts) dofile(vim.g.base46_cache .. "syntax") + dofile(vim.g.base46_cache .. "treesitter") require("nvim-treesitter.configs").setup(opts) end, }, From a88c68f911b6975d42145b45e4ff507859b68cdd Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 31 Oct 2023 05:43:02 +0530 Subject: [PATCH 1485/1541] set cursorlineopt=number #865 --- lua/core/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/core/init.lua b/lua/core/init.lua index 8b5d9ce..e1b9558 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -11,6 +11,7 @@ opt.showmode = false opt.clipboard = "unnamedplus" opt.cursorline = true +opt.cursorlineopt = 'number' -- Indenting opt.expandtab = true From 37c328ab2a05086d1cac9e0acc810050b293e445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=8A=E5=8A=A0=E6=97=AD=20=28Max=20Chuang=29?= <76544194+madmaxieee@users.noreply.github.com> Date: Wed, 8 Nov 2023 18:36:16 +0800 Subject: [PATCH 1486/1541] fix typo (#2483) --- lua/core/bootstrap.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index 20e056e..b95f1ce 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -32,7 +32,7 @@ M.lazy = function(install_path) -- install plugins require "plugins" - -- mason packages & show post_boostrap screen + -- mason packages & show post_bootstrap screen require "nvchad.post_install"() end From ffa83d57f03340390421828c485faafed73d2187 Mon Sep 17 00:00:00 2001 From: Gean Marroquin Date: Sun, 12 Nov 2023 23:27:03 -0500 Subject: [PATCH 1487/1541] remove Search, IncSearch and CurSearch highlights from cmp windows (#2490) --- lua/plugins/configs/cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 4af9ed2..9b669a8 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -52,7 +52,7 @@ local options = { window = { completion = { side_padding = (cmp_style ~= "atom" and cmp_style ~= "atom_colored") and 1 or 0, - winhighlight = "Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel", + winhighlight = "Normal:CmpPmenu,CursorLine:CmpSel,Search:None", scrollbar = false, }, documentation = { From bfd0ea7dcd99e70ecc0d2282a17d779c3e48ec71 Mon Sep 17 00:00:00 2001 From: Vitor Boschi da Silva Date: Fri, 8 Dec 2023 12:21:09 -0300 Subject: [PATCH 1488/1541] [feat] Make gitsigns init function async (#2538) * [feat] Make gitsigns init function async This function is running git and also initializing a shell, which can be a relatively slow operation. By leveraging the jobs api, we run the command in background, reducing the time it takes for the buffer to be available to the user. It also uses the list format for the job, which allow us to bypass the shell entirely. * performance: use uv.cwd() instead of fn.expand benchmarked luv's cwd and it seems to be 20x faster than the expand function --------- Co-authored-by: Sidhanth Rathod --- lua/plugins/init.lua | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 3dd6904..b352c91 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -91,13 +91,18 @@ local default_plugins = { vim.api.nvim_create_autocmd({ "BufRead" }, { group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }), callback = function() - vim.fn.system("git -C " .. '"' .. vim.fn.expand "%:p:h" .. '"' .. " rev-parse") - if vim.v.shell_error == 0 then - vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad" - vim.schedule(function() - require("lazy").load { plugins = { "gitsigns.nvim" } } - end) - end + vim.fn.jobstart({"git", "-C", vim.loop.cwd(), "rev-parse"}, + { + on_exit = function(_, return_code) + if return_code == 0 then + vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad" + vim.schedule(function() + require("lazy").load { plugins = { "gitsigns.nvim" } } + end) + end + end + } + ) end, }) end, From d7798fb74a13d4f16f3ac5aff0cca1e185182471 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 24 Dec 2023 16:32:04 +0530 Subject: [PATCH 1489/1541] remove telescope fzf extension #2571 --- lua/plugins/configs/telescope.lua | 2 +- lua/plugins/init.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 91c1d3a..0df500e 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -49,7 +49,7 @@ local options = { }, }, - extensions_list = { "themes", "terms", "fzf" }, + extensions_list = { "themes", "terms" }, extensions = { fzf = { fuzzy = true, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index b352c91..b844ec4 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -229,7 +229,7 @@ local default_plugins = { { "nvim-telescope/telescope.nvim", - dependencies = { "nvim-treesitter/nvim-treesitter", { "nvim-telescope/telescope-fzf-native.nvim", build = "make" } }, + dependencies = { "nvim-treesitter/nvim-treesitter" }, cmd = "Telescope", init = function() require("core.utils").load_mappings "telescope" From a439de385bc00c0061d9750dd992b29a8cbb780e Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 27 Dec 2023 19:49:31 +0530 Subject: [PATCH 1490/1541] check for empty/nil mason ensure_installed table #2580 --- lua/plugins/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index b844ec4..fe74af7 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -128,7 +128,9 @@ local default_plugins = { -- custom nvchad cmd to install all mason binaries listed vim.api.nvim_create_user_command("MasonInstallAll", function() - vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " ")) + if opts.ensure_installed and #opts.ensure_installed > 0 then + vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " ")) + end end, {}) vim.g.mason_binaries_list = opts.ensure_installed From 0333185bfc98aa6f3b728f59c4c08cfa39142587 Mon Sep 17 00:00:00 2001 From: Grigorii Khvatskii Date: Tue, 2 Jan 2024 06:42:34 -0500 Subject: [PATCH 1491/1541] Add support for non-interactive bootstrapping (#2528) https://github.com/NvChad/NvChad/pull/2528#issuecomment-1834599074 --------- Co-authored-by: Sidhanth Rathod --- lua/core/bootstrap.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index b95f1ce..50a8484 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -40,7 +40,7 @@ M.gen_chadrc_template = function() local path = fn.stdpath "config" .. "/lua/custom" if fn.isdirectory(path) ~= 1 then - local input = fn.input "Do you want to install example custom config? (y/N): " + local input = vim.env.NVCHAD_EXAMPLE_CONFIG or fn.input "Do you want to install example custom config? (y/N): " if input:lower() == "y" then M.echo "Cloning example custom config repo..." From b2e2b15b4532186cf11fcdb7dc1d6c1714f94e9f Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 28 Jan 2024 21:33:38 +0530 Subject: [PATCH 1492/1541] fix editorConfig indent opts not applying on certain fts #2633 --- lua/core/init.lua | 25 +++++++++++++++++++- lua/core/utils.lua | 30 +----------------------- lua/plugins/configs/lspconfig.lua | 5 +--- lua/plugins/init.lua | 38 ++++--------------------------- 4 files changed, 31 insertions(+), 67 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index e1b9558..50045cf 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -11,7 +11,7 @@ opt.showmode = false opt.clipboard = "unnamedplus" opt.cursorline = true -opt.cursorlineopt = 'number' +opt.cursorlineopt = "number" -- Indenting opt.expandtab = true @@ -104,6 +104,29 @@ autocmd("BufWritePost", { end, }) +-- user event that loads after UIEnter + only if file buf is there +vim.api.nvim_create_autocmd({ "UIEnter", "BufReadPost", "BufNewFile" }, { + group = vim.api.nvim_create_augroup("NvFilePost", { clear = true }), + callback = function(args) + local file = vim.api.nvim_buf_get_name(args.buf) + local buftype = vim.api.nvim_buf_get_option(args.buf, "buftype") + + if not vim.g.ui_entered and args.event == "UIEnter" then + vim.g.ui_entered = true + end + + if file ~= "" and buftype ~= "nofile" and vim.g.ui_entered then + vim.api.nvim_exec_autocmds("User", { pattern = "FilePost", modeline = false }) + vim.api.nvim_del_augroup_by_name "NvFilePost" + + vim.schedule(function() + vim.api.nvim_exec_autocmds("FileType", {}) + require("editorconfig").config(args.buf) + end, 0) + end + end, +}) + -------------------------------------- commands ------------------------------------------ local new_cmd = vim.api.nvim_create_user_command diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 96fe103..6f4dfae 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -7,7 +7,7 @@ M.load_config = function() if chadrc_path then local chadrc = dofile(chadrc_path) - + config.mappings = M.remove_disabled_keys(chadrc.mappings, config.mappings) config = merge_tb("force", config, chadrc) config.mappings.disabled = nil @@ -87,32 +87,4 @@ M.load_mappings = function(section, mapping_opt) end) end -M.lazy_load = function(plugin) - vim.api.nvim_create_autocmd({ "BufRead", "BufWinEnter", "BufNewFile" }, { - group = vim.api.nvim_create_augroup("BeLazyOnFileOpen" .. plugin, {}), - callback = function() - local file = vim.fn.expand "%" - local condition = file ~= "NvimTree_1" and file ~= "[lazy]" and file ~= "" - - if condition then - vim.api.nvim_del_augroup_by_name("BeLazyOnFileOpen" .. plugin) - - -- dont defer for treesitter as it will show slow highlighting - -- This deferring only happens only when we do "nvim filename" - if plugin ~= "nvim-treesitter" then - vim.schedule(function() - require("lazy").load { plugins = plugin } - - if plugin == "nvim-lspconfig" then - vim.cmd "silent! do FileType" - end - end, 0) - else - require("lazy").load { plugins = plugin } - end - end - end, - }) -end - return M diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 5c6027c..55dac4d 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -4,7 +4,7 @@ local M = {} M.on_attach = function(client, bufnr) local utils = require "core.utils" local conf = require("nvconfig").ui.lsp - + -- semanticTokens if not conf.semantic_tokens and client.supports_method "textDocument/semanticTokens" then client.server_capabilities.semanticTokensProvider = nil @@ -14,9 +14,6 @@ M.on_attach = function(client, bufnr) require("nvchad.signature").setup(client, bufnr) end - client.server_capabilities.documentFormattingProvider = false - client.server_capabilities.documentRangeFormattingProvider = false - utils.load_mappings("lspconfig", { buffer = bufnr }) end diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index fe74af7..26e9ba0 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -23,9 +23,7 @@ local default_plugins = { { "NvChad/nvim-colorizer.lua", - init = function() - require("core.utils").lazy_load "nvim-colorizer.lua" - end, + event = "User FilePost", config = function(_, opts) require("colorizer").setup(opts) @@ -49,9 +47,7 @@ local default_plugins = { { "lukas-reineke/indent-blankline.nvim", - init = function() - require("core.utils").lazy_load "indent-blankline.nvim" - end, + event = "User FilePost", opts = function() return require("plugins.configs.others").blankline end, @@ -67,9 +63,7 @@ local default_plugins = { { "nvim-treesitter/nvim-treesitter", - init = function() - require("core.utils").lazy_load "nvim-treesitter" - end, + event = { "BufReadPost", "BufNewFile" }, cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" }, build = ":TSUpdate", opts = function() @@ -85,27 +79,7 @@ local default_plugins = { -- git stuff { "lewis6991/gitsigns.nvim", - ft = { "gitcommit", "diff" }, - init = function() - -- load gitsigns only when a git file is opened - vim.api.nvim_create_autocmd({ "BufRead" }, { - group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }), - callback = function() - vim.fn.jobstart({"git", "-C", vim.loop.cwd(), "rev-parse"}, - { - on_exit = function(_, return_code) - if return_code == 0 then - vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad" - vim.schedule(function() - require("lazy").load { plugins = { "gitsigns.nvim" } } - end) - end - end - } - ) - end, - }) - end, + event = "User FilePost", opts = function() return require("plugins.configs.others").gitsigns end, @@ -139,9 +113,7 @@ local default_plugins = { { "neovim/nvim-lspconfig", - init = function() - require("core.utils").lazy_load "nvim-lspconfig" - end, + event = "User FilePost", config = function() require("plugins.configs.lspconfig").defaults() end, From 59082a8f28c8f33ee3cca5ac6932c15b5a3c53e8 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 2 Feb 2024 09:11:04 +0530 Subject: [PATCH 1493/1541] add float opts for term feature --- lua/core/default_config.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 1a79f3c..da49f21 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -77,6 +77,14 @@ M.ui = { term = { sizes = { sp = 0.3, vsp = 0.2 }, + float = { + relative = "editor", + row = 0.3, + col = 0.25, + width = 0.5, + height = 0.4, + border = "single", + }, behavior = { auto_insert = true, }, From 56cc2d757a67a074f73a26e3871c630317366c2c Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 17 Feb 2024 06:31:11 +0530 Subject: [PATCH 1494/1541] reload editorconfig on User FilePost event only if enabled #2672 --- lua/core/init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 50045cf..59eaf75 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -121,7 +121,10 @@ vim.api.nvim_create_autocmd({ "UIEnter", "BufReadPost", "BufNewFile" }, { vim.schedule(function() vim.api.nvim_exec_autocmds("FileType", {}) - require("editorconfig").config(args.buf) + + if vim.g.editorconfig then + require("editorconfig").config(args.buf) + end end, 0) end end, From ddef3aa1727a7f3f4bbd94609825dc197510cc2b Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 19 Feb 2024 20:39:38 +0530 Subject: [PATCH 1495/1541] add default hlgroup for term wins --- lua/core/default_config.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index da49f21..0ee9467 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -19,8 +19,6 @@ M.ui = { icons = true, lspkind_text = true, style = "default", -- default/flat_light/flat_dark/atom/atom_colored - border_color = "grey_fg", -- only applicable for "default" style, use color names from base30 variables - selected_item_bg = "colored", -- colored / simple }, telescope = { style = "borderless" }, -- borderless / bordered @@ -76,6 +74,7 @@ M.ui = { }, term = { + hl = "Normal:term,WinSeparator:WinSeparator", sizes = { sp = 0.3, vsp = 0.2 }, float = { relative = "editor", From 9414658e35ede3dce3ec56323e748b1d1a609e01 Mon Sep 17 00:00:00 2001 From: Jhon Vidal Date: Thu, 22 Feb 2024 22:28:59 -0400 Subject: [PATCH 1496/1541] fix: mapping update for new version of indent-blankline plugin (#2683) * fix: mapping update for new version of indent-blankline plugin obsolete function, correcting for the new version of said indent-blankline plugin * improve blankline mapping --------- Co-authored-by: Sidhanth Rathod --- lua/core/mappings.lua | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index fff878b..93118be 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -391,14 +391,19 @@ M.blankline = { n = { ["cc"] = { function() - local ok, start = require("indent_blankline.utils").get_current_context( - vim.g.indent_blankline_context_patterns, - vim.g.indent_blankline_use_treesitter_scope - ) + local config = { scope = {} } + config.scope.exclude = { language = {}, node_type = {} } + config.scope.include = { node_type = {} } - if ok then - vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start, 0 }) - vim.cmd [[normal! _]] + local node = require("ibl.scope").get(vim.api.nvim_get_current_buf(), config) + + if node then + local start_row, _, end_row, _ = node:range() + + if start_row ~= end_row then + vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start_row + 1, 0 }) + vim.api.nvim_feedkeys("_", "n", true) + end end end, From 4b1bca5303f39adf7d664a2fa25d720f210bf1ad Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 25 Feb 2024 08:43:48 +0530 Subject: [PATCH 1497/1541] clean mapping syntax --- init.lua | 6 +- lua/core/init.lua | 9 + lua/core/mappings.lua | 631 +++++++----------------------- lua/core/utils.lua | 78 +--- lua/plugins/configs/gitsigns.lua | 26 ++ lua/plugins/configs/lspconfig.lua | 23 +- lua/plugins/configs/luasnip.lua | 23 ++ lua/plugins/configs/others.lua | 50 --- lua/plugins/init.lua | 24 +- 9 files changed, 244 insertions(+), 626 deletions(-) create mode 100644 lua/plugins/configs/gitsigns.lua create mode 100644 lua/plugins/configs/luasnip.lua delete mode 100644 lua/plugins/configs/others.lua diff --git a/init.lua b/init.lua index 21f0b6f..44b5eab 100644 --- a/init.lua +++ b/init.lua @@ -6,8 +6,6 @@ if custom_init_path then dofile(custom_init_path) end -require("core.utils").load_mappings() - local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" -- bootstrap lazy.nvim! @@ -19,3 +17,7 @@ end dofile(vim.g.base46_cache .. "defaults") vim.opt.rtp:prepend(lazypath) require "plugins" + +vim.schedule(function() + require "core.mappings" +end, 0) diff --git a/lua/core/init.lua b/lua/core/init.lua index 59eaf75..8087d6a 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -136,3 +136,12 @@ local new_cmd = vim.api.nvim_create_user_command new_cmd("NvChadUpdate", function() require "nvchad.updater"() end, {}) + +--------------------------------------- globals ------------------------------------------- +vim.g.whichkey_maps = true +vim.g.blankline_maps = true +vim.g.terminal_maps = true +vim.g.telescope_maps = true +vim.g.nvimtree_maps = true +vim.g.comment_maps = true +vim.g.tabufline_maps = true diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 93118be..228c2d5 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -1,479 +1,152 @@ --- n, v, i, t = mode names - -local M = {} - -M.general = { - i = { - -- go to beginning and end - [""] = { "^i", "Beginning of line" }, - [""] = { "", "End of line" }, - - -- navigate within insert mode - [""] = { "", "Move left" }, - [""] = { "", "Move right" }, - [""] = { "", "Move down" }, - [""] = { "", "Move up" }, - }, - - n = { - [""] = { " noh ", "Clear highlights" }, - -- switch between windows - [""] = { "h", "Window left" }, - [""] = { "l", "Window right" }, - [""] = { "j", "Window down" }, - [""] = { "k", "Window up" }, - - -- save - [""] = { " w ", "Save file" }, - - -- Copy all - [""] = { " %y+ ", "Copy whole file" }, - - -- line numbers - ["n"] = { " set nu! ", "Toggle line number" }, - ["rn"] = { " set rnu! ", "Toggle relative number" }, - - -- Allow moving the cursor through wrapped lines with j, k, and - -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ - -- empty mode is same as using :map - -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour - ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "Move down", opts = { expr = true } }, - ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "Move up", opts = { expr = true } }, - [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "Move up", opts = { expr = true } }, - [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "Move down", opts = { expr = true } }, - - -- new buffer - ["b"] = { " enew ", "New buffer" }, - ["ch"] = { " NvCheatsheet ", "Mapping cheatsheet" }, - - ["fm"] = { - function() - vim.lsp.buf.format { async = true } - end, - "LSP formatting", - }, - }, - - t = { - [""] = { vim.api.nvim_replace_termcodes("", true, true, true), "Escape terminal mode" }, - }, - - v = { - [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "Move up", opts = { expr = true } }, - [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "Move down", opts = { expr = true } }, - ["<"] = { ""] = { ">gv", "Indent line" }, - }, - - x = { - ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "Move down", opts = { expr = true } }, - ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "Move up", opts = { expr = true } }, - -- Don't copy the replaced text after pasting in visual mode - -- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste - ["p"] = { 'p:let @+=@0:let @"=@0', "Dont copy replaced text", opts = { silent = true } }, - }, -} - -M.tabufline = { - plugin = true, - - n = { - -- cycle through buffers - [""] = { - function() - require("nvchad.tabufline").tabuflineNext() - end, - "Goto next buffer", - }, - - [""] = { - function() - require("nvchad.tabufline").tabuflinePrev() - end, - "Goto prev buffer", - }, - - -- close buffer + hide terminal buffer - ["x"] = { - function() - require("nvchad.tabufline").close_buffer() - end, - "Close buffer", - }, - }, -} - -M.comment = { - plugin = true, - - -- toggle comment in both modes - n = { - ["/"] = { - function() - require("Comment.api").toggle.linewise.current() - end, - "Toggle comment", - }, - }, - - v = { - ["/"] = { - "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", - "Toggle comment", - }, - }, -} - -M.lspconfig = { - plugin = true, - - -- See ` :help vim.lsp.*` for documentation on any of the below functions - - n = { - ["gD"] = { - function() - vim.lsp.buf.declaration() - end, - "LSP declaration", - }, - - ["gd"] = { - function() - vim.lsp.buf.definition() - end, - "LSP definition", - }, - - ["K"] = { - function() - vim.lsp.buf.hover() - end, - "LSP hover", - }, - - ["gi"] = { - function() - vim.lsp.buf.implementation() - end, - "LSP implementation", - }, - - ["ls"] = { - function() - vim.lsp.buf.signature_help() - end, - "LSP signature help", - }, - - ["D"] = { - function() - vim.lsp.buf.type_definition() - end, - "LSP definition type", - }, - - ["ra"] = { - function() - require("nvchad.renamer").open() - end, - "LSP rename", - }, - - ["ca"] = { - function() - vim.lsp.buf.code_action() - end, - "LSP code action", - }, - - ["gr"] = { - function() - vim.lsp.buf.references() - end, - "LSP references", - }, - - ["lf"] = { - function() - vim.diagnostic.open_float { border = "rounded" } - end, - "Floating diagnostic", - }, - - ["[d"] = { - function() - vim.diagnostic.goto_prev { float = { border = "rounded" } } - end, - "Goto prev", - }, - - ["]d"] = { - function() - vim.diagnostic.goto_next { float = { border = "rounded" } } - end, - "Goto next", - }, - - ["q"] = { - function() - vim.diagnostic.setloclist() - end, - "Diagnostic setloclist", - }, - - ["wa"] = { - function() - vim.lsp.buf.add_workspace_folder() - end, - "Add workspace folder", - }, - - ["wr"] = { - function() - vim.lsp.buf.remove_workspace_folder() - end, - "Remove workspace folder", - }, - - ["wl"] = { - function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end, - "List workspace folders", - }, - }, - - v = { - ["ca"] = { - function() - vim.lsp.buf.code_action() - end, - "LSP code action", - }, - }, -} - -M.nvimtree = { - plugin = true, - - n = { - -- toggle - [""] = { " NvimTreeToggle ", "Toggle nvimtree" }, - - -- focus - ["e"] = { " NvimTreeFocus ", "Focus nvimtree" }, - }, -} - -M.telescope = { - plugin = true, - - n = { - -- find - ["ff"] = { " Telescope find_files ", "Find files" }, - ["fa"] = { " Telescope find_files follow=true no_ignore=true hidden=true ", "Find all" }, - ["fw"] = { " Telescope live_grep ", "Live grep" }, - ["fb"] = { " Telescope buffers ", "Find buffers" }, - ["fh"] = { " Telescope help_tags ", "Help page" }, - ["fo"] = { " Telescope oldfiles ", "Find oldfiles" }, - ["fz"] = { " Telescope current_buffer_fuzzy_find ", "Find in current buffer" }, - - -- git - ["cm"] = { " Telescope git_commits ", "Git commits" }, - ["gt"] = { " Telescope git_status ", "Git status" }, - - -- pick a hidden term - ["pt"] = { " Telescope terms ", "Pick hidden term" }, - - -- theme switcher - ["th"] = { " Telescope themes ", "Nvchad themes" }, - - ["ma"] = { " Telescope marks ", "telescope bookmarks" }, - }, -} - -M.terminal = { - n = { - -- spawn new terms - ["h"] = { - function() - require("nvchad.term").new { pos = "sp", size = 0.3 } - end, - "New horizontal term", - }, - - ["v"] = { - function() - require("nvchad.term").new { pos = "vsp", size = 0.3 } - end, - "New vertical term", - }, - - -- toggle terms - [""] = { - function() - require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm", size = 0.3 } - end, - "New vertical term", - }, - - [""] = { - function() - require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm", size = 0.2 } - end, - "New vertical term", - }, - - [""] = { - function() - require("nvchad.term").toggle { pos = "float", id = "floatTerm" } - end, - "Toggleable Floating term", - }, - }, - - -- toggle terms in terminal mode - t = { - [""] = { - function() - local win = vim.api.nvim_get_current_win() - vim.api.nvim_win_close(win, true) - end, - "close term in terminal mode", - }, - - [""] = { - function() - require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm" } - end, - "New vertical term", - }, - - [""] = { - function() - require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm" } - end, - "New vertical term", - }, - - [""] = { - function() - require("nvchad.term").toggle { pos = "float", id = "floatTerm" } - end, - "Toggleable Floating term", - }, - }, -} - -M.whichkey = { - plugin = true, - - n = { - ["wK"] = { - function() - vim.cmd "WhichKey" - end, - "Which-key all keymaps", - }, - ["wk"] = { - function() - local input = vim.fn.input "WhichKey: " - vim.cmd("WhichKey " .. input) - end, - "Which-key query lookup", - }, - }, -} - -M.blankline = { - plugin = true, - - n = { - ["cc"] = { - function() - local config = { scope = {} } - config.scope.exclude = { language = {}, node_type = {} } - config.scope.include = { node_type = {} } - - local node = require("ibl.scope").get(vim.api.nvim_get_current_buf(), config) - - if node then - local start_row, _, end_row, _ = node:range() - - if start_row ~= end_row then - vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start_row + 1, 0 }) - vim.api.nvim_feedkeys("_", "n", true) - end - end - end, - - "Jump to current context", - }, - }, -} - -M.gitsigns = { - plugin = true, - - n = { - -- Navigation through hunks - ["]c"] = { - function() - if vim.wo.diff then - return "]c" - end - vim.schedule(function() - require("gitsigns").next_hunk() - end) - return "" - end, - "Jump to next hunk", - opts = { expr = true }, - }, - - ["[c"] = { - function() - if vim.wo.diff then - return "[c" - end - vim.schedule(function() - require("gitsigns").prev_hunk() - end) - return "" - end, - "Jump to prev hunk", - opts = { expr = true }, - }, - - -- Actions - ["rh"] = { - function() - require("gitsigns").reset_hunk() - end, - "Reset hunk", - }, - - ["ph"] = { - function() - require("gitsigns").preview_hunk() - end, - "Preview hunk", - }, - - ["gb"] = { - function() - package.loaded.gitsigns.blame_line() - end, - "Blame line", - }, - - ["td"] = { - function() - require("gitsigns").toggle_deleted() - end, - "Toggle deleted", - }, - }, -} - -return M +local map = vim.keymap.set + +map("i", "", "^i", { desc = "Beginning of line | general" }) +map("i", "", "", { desc = "End of line | general" }) +map("i", "", "", { desc = "Move left | general" }) +map("i", "", "", { desc = "Move right | general" }) +map("i", "", "", { desc = "Move down | general" }) +map("i", "", "", { desc = "Move up | general" }) + +map("n", "", "noh", { desc = "Clear highlights | general" }) +map("n", "", "h", { desc = "Window left | general" }) +map("n", "", "l", { desc = "Window right | general" }) +map("n", "", "j", { desc = "Window down | general" }) +map("n", "", "k", { desc = "Window up | general" }) +map("n", "", "w", { desc = "Save file | general" }) +map("n", "", "%y+", { desc = "Copy whole file | general" }) +map("n", "n", "set nu!", { desc = "Toggle line number | general" }) +map("n", "rn", "set rnu!", { desc = "Toggle relative number | general" }) +map("n", "b", "enew", { desc = "New buffer | general" }) +map("n", "ch", "NvCheatsheet", { desc = "Mapping cheatsheet | general" }) + +map("n", "fm", function() + vim.lsp.buf.format { async = true } +end, { desc = "LSP formatting | lsp" }) + +vim.keymap.set("n", "lf", vim.diagnostic.open_float, { desc = "floating diagnostics | lsp" }) +vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, { desc = "prev diagnostic | lsp" }) +vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "next diagnostic | lsp" }) +vim.keymap.set("n", "q", vim.diagnostic.setloclist, { desc = "diagnostic loclist | lsp" }) + +-- Mappings for terminal mode +map( + "t", + "", + vim.api.nvim_replace_termcodes("", true, true, true), + { desc = "Escape terminal mode | general" } +) + +-- Mappings for M.tabufline +if vim.g.tabufline_maps then + map("n", "", function() + require("nvchad.tabufline").tabuflineNext() + end, { desc = "Goto next buffer | tabufline" }) + + map("n", "", function() + require("nvchad.tabufline").tabuflinePrev() + end, { desc = "Goto prev buffer | tabufline" }) + + map("n", "x", function() + require("nvchad.tabufline").close_buffer() + end, { desc = "Close buffer | tabufline" }) +end + +if vim.g.comment_maps then + map("n", "/", function() + require("Comment.api").toggle.linewise.current() + end, { desc = "Toggle comment | comment" }) + + map( + "v", + "/", + "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", + { desc = "Toggle comment | comment" } + ) +end + +if vim.g.nvimtree_maps then + map("n", "", "NvimTreeToggle", { desc = "Toggle nvimtree | nvimtree" }) + map("n", "e", "NvimTreeFocus", { desc = "Focus nvimtree | nvimtree" }) +end + +if vim.g.telescope_maps then + map("n", "fw", "Telescope live_grep", { desc = "Live grep | telescope" }) + map("n", "fb", "Telescope buffers", { desc = "Find buffers | telescope" }) + map("n", "fh", "Telescope help_tags", { desc = "Help page | telescope" }) + map("n", "fo", "Telescope oldfiles", { desc = "Find oldfiles | telescope" }) + + map( + "n", + "fz", + "Telescope current_buffer_fuzzy_find", + { desc = "Find in current buffer | telescope" } + ) + + map("n", "cm", "Telescope git_commits", { desc = "Git commits | telescope" }) + map("n", "gt", "Telescope git_status", { desc = "Git status | telescope" }) + map("n", "pt", "Telescope terms", { desc = "Pick hidden term | telescope" }) + map("n", "th", "Telescope themes", { desc = "Nvchad themes | telescope" }) + + map("n", "ff", "Telescope find_files", { desc = "Find files | telescope" }) + map( + "n", + "fa", + "Telescope find_files follow=true no_ignore=true hidden=true", + { desc = "Find all | telescope" } + ) +end + +-- Mappings for M.terminal +if vim.g.terminal_maps then + map("n", "h", function() + require("nvchad.term").new { pos = "sp", size = 0.3 } + end, { desc = "New horizontal term | terminal" }) + + map("n", "v", function() + require("nvchad.term").new { pos = "vsp", size = 0.3 } + end, { desc = "New vertical term | terminal" }) + + map({ "n", "t" }, "", function() + require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm", size = 0.3 } + end, { desc = "Toggleable vertical term | terminal" }) + + map({ "n", "t" }, "", function() + require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm", size = 0.2 } + end, { desc = "New horizontal term | terminal" }) + + map({ "n", "t" }, "", function() + require("nvchad.term").toggle { pos = "float", id = "floatTerm" } + end, { desc = "Toggleable Floating term | terminal" }) + + map("t", "", function() + local win = vim.api.nvim_get_current_win() + vim.api.nvim_win_close(win, true) + end, { desc = "Close term in terminal mode | terminal" }) +end + +if vim.g.whichkey_maps then + map("n", "wK", ":WhichKey ", { desc = "Which-key all keymaps | whichkey" }) + + map("n", "wk", function() + vim.cmd("WhichKey " .. vim.fn.input "WhichKey: ") + end, { desc = "Which-key query lookup | whichkey" }) +end + +if vim.g.blankline_maps then + map("n", "cc", function() + local config = { scope = {} } + config.scope.exclude = { language = {}, node_type = {} } + config.scope.include = { node_type = {} } + local node = require("ibl.scope").get(vim.api.nvim_get_current_buf(), config) + + if node then + local start_row, _, end_row, _ = node:range() + if start_row ~= end_row then + vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start_row + 1, 0 }) + vim.api.nvim_feedkeys("_", "n", true) + end + end + end, { desc = "Jump to current context | blankline" }) +end + +require "custom.mappings" diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 6f4dfae..34213a4 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -1,90 +1,14 @@ local M = {} -local merge_tb = vim.tbl_deep_extend M.load_config = function() local config = require "core.default_config" local chadrc_path = vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1] if chadrc_path then - local chadrc = dofile(chadrc_path) - - config.mappings = M.remove_disabled_keys(chadrc.mappings, config.mappings) - config = merge_tb("force", config, chadrc) - config.mappings.disabled = nil + config = vim.tbl_deep_extend("force", config, dofile(chadrc_path)) end return config end -M.remove_disabled_keys = function(chadrc_mappings, default_mappings) - if not chadrc_mappings then - return default_mappings - end - - -- store keys in a array with true value to compare - local keys_to_disable = {} - for _, mappings in pairs(chadrc_mappings) do - for mode, section_keys in pairs(mappings) do - if not keys_to_disable[mode] then - keys_to_disable[mode] = {} - end - section_keys = (type(section_keys) == "table" and section_keys) or {} - for k, _ in pairs(section_keys) do - keys_to_disable[mode][k] = true - end - end - end - - -- make a copy as we need to modify default_mappings - for section_name, section_mappings in pairs(default_mappings) do - for mode, mode_mappings in pairs(section_mappings) do - mode_mappings = (type(mode_mappings) == "table" and mode_mappings) or {} - for k, _ in pairs(mode_mappings) do - -- if key if found then remove from default_mappings - if keys_to_disable[mode] and keys_to_disable[mode][k] then - default_mappings[section_name][mode][k] = nil - end - end - end - end - - return default_mappings -end - -M.load_mappings = function(section, mapping_opt) - vim.schedule(function() - local function set_section_map(section_values) - if section_values.plugin then - return - end - - section_values.plugin = nil - - for mode, mode_values in pairs(section_values) do - local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) - for keybind, mapping_info in pairs(mode_values) do - -- merge default + user opts - local opts = merge_tb("force", default_opts, mapping_info.opts or {}) - - mapping_info.opts, opts.mode = nil, nil - opts.desc = mapping_info[2] - - vim.keymap.set(mode, keybind, mapping_info[1], opts) - end - end - end - - local mappings = require("nvconfig").mappings - - if type(section) == "string" then - mappings[section]["plugin"] = nil - mappings = { mappings[section] } - end - - for _, sect in pairs(mappings) do - set_section_map(sect) - end - end) -end - return M diff --git a/lua/plugins/configs/gitsigns.lua b/lua/plugins/configs/gitsigns.lua new file mode 100644 index 0000000..27f3105 --- /dev/null +++ b/lua/plugins/configs/gitsigns.lua @@ -0,0 +1,26 @@ +local options = { + signs = { + add = { text = "│" }, + change = { text = "│" }, + delete = { text = "󰍵" }, + topdelete = { text = "‾" }, + changedelete = { text = "~" }, + untracked = { text = "│" }, + }, + + on_attach = function(bufnr) + local gs = package.loaded.gitsigns + + local function opts(desc) + return { buffer = bufnr, desc = desc } + end + + local map = vim.keymap.set + + map("n", "rh", gs.reset_hunk, opts "Reset Hunk") + map("n", "ph", gs.preview_hunk, opts "Preview Hunk") + map("n", "gb", gs.blame_line, opts "Blame Line") + end, +} + +return options diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 55dac4d..5a7d5bd 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,8 +1,8 @@ local M = {} +local map = vim.keymap.set -- export on_attach & capabilities for custom lspconfigs M.on_attach = function(client, bufnr) - local utils = require "core.utils" local conf = require("nvconfig").ui.lsp -- semanticTokens @@ -14,7 +14,26 @@ M.on_attach = function(client, bufnr) require("nvchad.signature").setup(client, bufnr) end - utils.load_mappings("lspconfig", { buffer = bufnr }) + local function opts(desc) + return { buffer = bufnr, desc = desc } + end + + map("n", "gD", vim.lsp.buf.declaration, opts "Go to declaration | lsp") + map("n", "gd", vim.lsp.buf.definition, opts "Go to definition | lsp") + map("n", "K", vim.lsp.buf.hover, opts "Show hover information | lsp") + map("n", "gi", vim.lsp.buf.implementation, opts "Go to implementation | lsp") + map("n", "", vim.lsp.buf.signature_help, opts "Show signature help | lsp") + map("n", "wa", vim.lsp.buf.add_workspace_folder, opts "Add workspace folder | lsp") + map("n", "wr", vim.lsp.buf.remove_workspace_folder, opts "Remove workspace folder | lsp") + + map("n", "wl", function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end, opts "List workspace folders | lsp") + + map("n", "D", vim.lsp.buf.type_definition, opts "Go to type definition | lsp") + map("n", "rn", vim.lsp.buf.rename, opts "Rename symbol | lsp") + map({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts "Code action | lsp") + map("n", "gr", vim.lsp.buf.references, opts "Show references | lsp") end M.capabilities = vim.lsp.protocol.make_client_capabilities() diff --git a/lua/plugins/configs/luasnip.lua b/lua/plugins/configs/luasnip.lua new file mode 100644 index 0000000..f40672d --- /dev/null +++ b/lua/plugins/configs/luasnip.lua @@ -0,0 +1,23 @@ +-- vscode format +require("luasnip.loaders.from_vscode").lazy_load() +require("luasnip.loaders.from_vscode").lazy_load { paths = "your path!" } +require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" } + +-- snipmate format +require("luasnip.loaders.from_snipmate").load() +require("luasnip.loaders.from_snipmate").lazy_load { paths = vim.g.snipmate_snippets_path or "" } + +-- lua format +require("luasnip.loaders.from_lua").load() +require("luasnip.loaders.from_lua").lazy_load { paths = vim.g.lua_snippets_path or "" } + +vim.api.nvim_create_autocmd("InsertLeave", { + callback = function() + if + require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()] + and not require("luasnip").session.jump_active + then + require("luasnip").unlink_current() + end + end, +}) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua deleted file mode 100644 index 9e01f8d..0000000 --- a/lua/plugins/configs/others.lua +++ /dev/null @@ -1,50 +0,0 @@ -local M = {} -local utils = require "core.utils" - -M.blankline = { - indent = { char = "│", highlight = "IblChar" }, - scope = { char = "│", highlight = "IblScopeChar" }, -} - -M.luasnip = function(opts) - require("luasnip").config.set_config(opts) - - -- vscode format - require("luasnip.loaders.from_vscode").lazy_load() - require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" } - - -- snipmate format - require("luasnip.loaders.from_snipmate").load() - require("luasnip.loaders.from_snipmate").lazy_load { paths = vim.g.snipmate_snippets_path or "" } - - -- lua format - require("luasnip.loaders.from_lua").load() - require("luasnip.loaders.from_lua").lazy_load { paths = vim.g.lua_snippets_path or "" } - - vim.api.nvim_create_autocmd("InsertLeave", { - callback = function() - if - require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()] - and not require("luasnip").session.jump_active - then - require("luasnip").unlink_current() - end - end, - }) -end - -M.gitsigns = { - signs = { - add = { text = "│" }, - change = { text = "│" }, - delete = { text = "󰍵" }, - topdelete = { text = "‾" }, - changedelete = { text = "~" }, - untracked = { text = "│" }, - }, - on_attach = function(bufnr) - utils.load_mappings("gitsigns", { buffer = bufnr }) - end, -} - -return M diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 26e9ba0..21f9578 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -48,11 +48,11 @@ local default_plugins = { { "lukas-reineke/indent-blankline.nvim", event = "User FilePost", - opts = function() - return require("plugins.configs.others").blankline - end, + opts = { + indent = { char = "│", highlight = "IblChar" }, + scope = { char = "│", highlight = "IblScopeChar" }, + }, config = function(_, opts) - require("core.utils").load_mappings "blankline" dofile(vim.g.base46_cache .. "blankline") local hooks = require "ibl.hooks" @@ -81,7 +81,7 @@ local default_plugins = { "lewis6991/gitsigns.nvim", event = "User FilePost", opts = function() - return require("plugins.configs.others").gitsigns + return require("plugins.configs.gitsigns") end, config = function(_, opts) dofile(vim.g.base46_cache .. "git") @@ -130,7 +130,8 @@ local default_plugins = { dependencies = "rafamadriz/friendly-snippets", opts = { history = true, updateevents = "TextChanged,TextChangedI" }, config = function(_, opts) - require("plugins.configs.others").luasnip(opts) + require("luasnip").config.set_config(opts) + require "plugins.configs.luasnip" end, }, @@ -178,7 +179,7 @@ local default_plugins = { { "gb", mode = "x", desc = "Comment toggle blockwise (visual)" }, }, init = function() - require("core.utils").load_mappings "comment" + vim.g.comment_maps = true end, config = function(_, opts) require("Comment").setup(opts) @@ -189,9 +190,6 @@ local default_plugins = { { "nvim-tree/nvim-tree.lua", cmd = { "NvimTreeToggle", "NvimTreeFocus" }, - init = function() - require("core.utils").load_mappings "nvimtree" - end, opts = function() return require "plugins.configs.nvimtree" end, @@ -205,9 +203,6 @@ local default_plugins = { "nvim-telescope/telescope.nvim", dependencies = { "nvim-treesitter/nvim-treesitter" }, cmd = "Telescope", - init = function() - require("core.utils").load_mappings "telescope" - end, opts = function() return require "plugins.configs.telescope" end, @@ -227,9 +222,6 @@ local default_plugins = { { "folke/which-key.nvim", keys = { "", "", "", '"', "'", "`", "c", "v", "g" }, - init = function() - require("core.utils").load_mappings "whichkey" - end, cmd = "WhichKey", config = function(_, opts) dofile(vim.g.base46_cache .. "whichkey") From ce6e3d19a76430227c548947a69550a1ed1eccfa Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 25 Feb 2024 19:42:50 +0530 Subject: [PATCH 1498/1541] rm useless util function --- lua/core/default_config.lua | 121 --------------------------------- lua/core/mappings.lua | 2 +- lua/core/utils.lua | 14 ---- lua/nvconfig.lua | 129 +++++++++++++++++++++++++++++++++++- 4 files changed, 128 insertions(+), 138 deletions(-) delete mode 100644 lua/core/default_config.lua delete mode 100644 lua/core/utils.lua diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua deleted file mode 100644 index 0ee9467..0000000 --- a/lua/core/default_config.lua +++ /dev/null @@ -1,121 +0,0 @@ -local M = {} - -M.options = { - nvchad_branch = "v3.0", -} - -M.ui = { - ------------------------------- base46 ------------------------------------- - -- hl = highlights - hl_add = {}, - hl_override = {}, - changed_themes = {}, - theme_toggle = { "onedark", "one_light" }, - theme = "onedark", -- default theme - transparency = false, - - -- cmp themeing - cmp = { - icons = true, - lspkind_text = true, - style = "default", -- default/flat_light/flat_dark/atom/atom_colored - }, - - telescope = { style = "borderless" }, -- borderless / bordered - - ------------------------------- nvchad_ui modules ----------------------------- - statusline = { - theme = "default", -- default/vscode/vscode_colored/minimal - -- default/round/block/arrow separators work only for default statusline theme - -- round and block will work for minimal theme only - separator_style = "default", - overriden_modules = nil, - }, - - -- lazyload it when there are 1+ buffers - tabufline = { - show_numbers = false, - enabled = true, - lazyload = true, - overriden_modules = nil, - }, - - -- nvdash (dashboard) - nvdash = { - load_on_startup = false, - - header = { - " ▄ ▄ ", - " ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ ", - " █ ▄ █▄█ ▄▄▄ █ █▄█ █ █ ", - " ▄▄ █▄█▄▄▄█ █▄█▄█▄▄█▄▄█ █ ", - " ▄ █▄▄█ ▄ ▄▄ ▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ", - " █▄▄▄▄ ▄▄▄ █ ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ █ ▄", - "▄ █ █▄█ █▄█ █ █ █▄█ █ █▄█ ▄▄▄ █ █", - "█▄█ ▄ █▄▄█▄▄█ █ ▄▄█ █ ▄ █ █▄█▄█ █", - " █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █▄█▄▄▄█ ", - }, - - buttons = { - { " Find File", "Spc f f", "Telescope find_files" }, - { "󰈚 Recent Files", "Spc f o", "Telescope oldfiles" }, - { "󰈭 Find Word", "Spc f w", "Telescope live_grep" }, - { " Bookmarks", "Spc m a", "Telescope marks" }, - { " Themes", "Spc t h", "Telescope themes" }, - { " Mappings", "Spc c h", "NvCheatsheet" }, - }, - }, - - cheatsheet = { theme = "grid" }, -- simple/grid - - lsp = { - signature = true, - semantic_tokens = false, - }, - - term = { - hl = "Normal:term,WinSeparator:WinSeparator", - sizes = { sp = 0.3, vsp = 0.2 }, - float = { - relative = "editor", - row = 0.3, - col = 0.25, - width = 0.5, - height = 0.4, - border = "single", - }, - behavior = { - auto_insert = true, - }, - }, -} - -M.plugins = "" -- path i.e "custom.plugins", so make custom/plugins.lua file - -M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startup options - -M.mappings = require "core.mappings" - -M.base46 = { - integrations = { - "blankline", - "cmp", - "defaults", - "devicons", - "git", - "lsp", - "mason", - "nvchad_updater", - "nvcheatsheet", - "nvdash", - "nvimtree", - "statusline", - "syntax", - "treesitter", - "tbline", - "telescope", - "whichkey", - }, -} - -return M diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 228c2d5..d955e30 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -149,4 +149,4 @@ if vim.g.blankline_maps then end, { desc = "Jump to current context | blankline" }) end -require "custom.mappings" +pcall(require, "custom.mappings") diff --git a/lua/core/utils.lua b/lua/core/utils.lua deleted file mode 100644 index 34213a4..0000000 --- a/lua/core/utils.lua +++ /dev/null @@ -1,14 +0,0 @@ -local M = {} - -M.load_config = function() - local config = require "core.default_config" - local chadrc_path = vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1] - - if chadrc_path then - config = vim.tbl_deep_extend("force", config, dofile(chadrc_path)) - end - - return config -end - -return M diff --git a/lua/nvconfig.lua b/lua/nvconfig.lua index df0d4a4..fe35faf 100644 --- a/lua/nvconfig.lua +++ b/lua/nvconfig.lua @@ -1,2 +1,127 @@ --- check default config at core/default_config.lua -return require("core.utils").load_config() +local M = {} + +M.options = { + nvchad_branch = "v3.0", +} + +M.ui = { + ------------------------------- base46 ------------------------------------- + -- hl = highlights + hl_add = {}, + hl_override = {}, + changed_themes = {}, + theme_toggle = { "onedark", "one_light" }, + theme = "onedark", -- default theme + transparency = false, + + -- cmp themeing + cmp = { + icons = true, + lspkind_text = true, + style = "default", -- default/flat_light/flat_dark/atom/atom_colored + }, + + telescope = { style = "borderless" }, -- borderless / bordered + + ------------------------------- nvchad_ui modules ----------------------------- + statusline = { + theme = "default", -- default/vscode/vscode_colored/minimal + -- default/round/block/arrow separators work only for default statusline theme + -- round and block will work for minimal theme only + separator_style = "default", + overriden_modules = nil, + }, + + -- lazyload it when there are 1+ buffers + tabufline = { + show_numbers = false, + enabled = true, + lazyload = true, + overriden_modules = nil, + }, + + -- nvdash (dashboard) + nvdash = { + load_on_startup = false, + + header = { + " ▄ ▄ ", + " ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ ", + " █ ▄ █▄█ ▄▄▄ █ █▄█ █ █ ", + " ▄▄ █▄█▄▄▄█ █▄█▄█▄▄█▄▄█ █ ", + " ▄ █▄▄█ ▄ ▄▄ ▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ", + " █▄▄▄▄ ▄▄▄ █ ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ █ ▄", + "▄ █ █▄█ █▄█ █ █ █▄█ █ █▄█ ▄▄▄ █ █", + "█▄█ ▄ █▄▄█▄▄█ █ ▄▄█ █ ▄ █ █▄█▄█ █", + " █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █▄█▄▄▄█ ", + }, + + buttons = { + { " Find File", "Spc f f", "Telescope find_files" }, + { "󰈚 Recent Files", "Spc f o", "Telescope oldfiles" }, + { "󰈭 Find Word", "Spc f w", "Telescope live_grep" }, + { " Bookmarks", "Spc m a", "Telescope marks" }, + { " Themes", "Spc t h", "Telescope themes" }, + { " Mappings", "Spc c h", "NvCheatsheet" }, + }, + }, + + cheatsheet = { theme = "grid" }, -- simple/grid + + lsp = { + signature = true, + semantic_tokens = false, + }, + + term = { + hl = "Normal:term,WinSeparator:WinSeparator", + sizes = { sp = 0.3, vsp = 0.2 }, + float = { + relative = "editor", + row = 0.3, + col = 0.25, + width = 0.5, + height = 0.4, + border = "single", + }, + behavior = { + auto_insert = true, + }, + }, +} + +M.plugins = "" -- path i.e "custom.plugins", so make custom/plugins.lua file + +M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startup options + +M.mappings = require "core.mappings" + +M.base46 = { + integrations = { + "blankline", + "cmp", + "defaults", + "devicons", + "git", + "lsp", + "mason", + "nvchad_updater", + "nvcheatsheet", + "nvdash", + "nvimtree", + "statusline", + "syntax", + "treesitter", + "tbline", + "telescope", + "whichkey", + }, +} + +local chadrc_exists, chadrc = pcall(require, "custom.chadrc") + +if chadrc_exists then + M = vim.tbl_deep_extend("force", M, chadrc) +end + +return M From a5fc21b4f182775dbcaca42d80f2ed8eadb22912 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 26 Feb 2024 05:35:22 +0530 Subject: [PATCH 1499/1541] add some vim* tsparsers in treesitter config --- lua/plugins/configs/treesitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index b21b55d..897c4e3 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -1,5 +1,5 @@ local options = { - ensure_installed = { "lua" }, + ensure_installed = { "lua", "vim", "vimdoc" }, highlight = { enable = true, From afd88703588df9e18d102ef9ff4001334d64f861 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 27 Feb 2024 12:31:36 +0530 Subject: [PATCH 1500/1541] misc clean --- lua/core/init.lua | 9 -- lua/core/mappings.lua | 192 +++++++++++++----------------- lua/plugins/configs/cmp.lua | 13 +- lua/plugins/configs/lspconfig.lua | 6 +- lua/plugins/init.lua | 2 +- 5 files changed, 93 insertions(+), 129 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 8087d6a..59eaf75 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -136,12 +136,3 @@ local new_cmd = vim.api.nvim_create_user_command new_cmd("NvChadUpdate", function() require "nvchad.updater"() end, {}) - ---------------------------------------- globals ------------------------------------------- -vim.g.whichkey_maps = true -vim.g.blankline_maps = true -vim.g.terminal_maps = true -vim.g.telescope_maps = true -vim.g.nvimtree_maps = true -vim.g.comment_maps = true -vim.g.tabufline_maps = true diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index d955e30..74ba012 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -6,7 +6,6 @@ map("i", "", "", { desc = "Move left | general" }) map("i", "", "", { desc = "Move right | general" }) map("i", "", "", { desc = "Move down | general" }) map("i", "", "", { desc = "Move up | general" }) - map("n", "", "noh", { desc = "Clear highlights | general" }) map("n", "", "h", { desc = "Window left | general" }) map("n", "", "l", { desc = "Window right | general" }) @@ -19,134 +18,107 @@ map("n", "rn", "set rnu!", { desc = "Toggle relative number | g map("n", "b", "enew", { desc = "New buffer | general" }) map("n", "ch", "NvCheatsheet", { desc = "Mapping cheatsheet | general" }) +-- global lsp mappings map("n", "fm", function() vim.lsp.buf.format { async = true } end, { desc = "LSP formatting | lsp" }) -vim.keymap.set("n", "lf", vim.diagnostic.open_float, { desc = "floating diagnostics | lsp" }) -vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, { desc = "prev diagnostic | lsp" }) -vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "next diagnostic | lsp" }) -vim.keymap.set("n", "q", vim.diagnostic.setloclist, { desc = "diagnostic loclist | lsp" }) +map("n", "lf", vim.diagnostic.open_float, { desc = "floating diagnostics | lsp" }) +map("n", "[d", vim.diagnostic.goto_prev, { desc = "prev diagnostic | lsp" }) +map("n", "]d", vim.diagnostic.goto_next, { desc = "next diagnostic | lsp" }) +map("n", "q", vim.diagnostic.setloclist, { desc = "diagnostic loclist | lsp" }) + +-- tabufline +map("n", "", function() + require("nvchad.tabufline").tabuflineNext() +end, { desc = "Goto next buffer | tabufline" }) + +map("n", "", function() + require("nvchad.tabufline").tabuflinePrev() +end, { desc = "Goto prev buffer | tabufline" }) + +map("n", "x", function() + require("nvchad.tabufline").close_buffer() +end, { desc = "Close buffer | tabufline" }) + +map("n", "/", function() + require("Comment.api").toggle.linewise.current() +end, { desc = "Toggle comment | comment" }) --- Mappings for terminal mode map( - "t", - "", - vim.api.nvim_replace_termcodes("", true, true, true), - { desc = "Escape terminal mode | general" } + "v", + "/", + ":lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", + { desc = "Toggle comment | comment" } ) --- Mappings for M.tabufline -if vim.g.tabufline_maps then - map("n", "", function() - require("nvchad.tabufline").tabuflineNext() - end, { desc = "Goto next buffer | tabufline" }) +map("n", "", "NvimTreeToggle", { desc = "Toggle nvimtree | nvimtree" }) +map("n", "e", "NvimTreeFocus", { desc = "Focus nvimtree | nvimtree" }) - map("n", "", function() - require("nvchad.tabufline").tabuflinePrev() - end, { desc = "Goto prev buffer | tabufline" }) +map("n", "fw", "Telescope live_grep", { desc = "Live grep | telescope" }) +map("n", "fb", "Telescope buffers", { desc = "Find buffers | telescope" }) +map("n", "fh", "Telescope help_tags", { desc = "Help page | telescope" }) +map("n", "fo", "Telescope oldfiles", { desc = "Find oldfiles | telescope" }) +map("n", "fz", "Telescope current_buffer_fuzzy_find", { desc = "Find in current buffer | telescope" }) +map("n", "cm", "Telescope git_commits", { desc = "Git commits | telescope" }) +map("n", "gt", "Telescope git_status", { desc = "Git status | telescope" }) +map("n", "pt", "Telescope terms", { desc = "Pick hidden term | telescope" }) +map("n", "th", "Telescope themes", { desc = "Nvchad themes | telescope" }) +map("n", "ff", "Telescope find_files", { desc = "Find files | telescope" }) - map("n", "x", function() - require("nvchad.tabufline").close_buffer() - end, { desc = "Close buffer | tabufline" }) -end +map( + "n", + "fa", + "Telescope find_files follow=true no_ignore=true hidden=true", + { desc = "Find all | telescope" } +) -if vim.g.comment_maps then - map("n", "/", function() - require("Comment.api").toggle.linewise.current() - end, { desc = "Toggle comment | comment" }) +-- terminal +map("t", "", "", { desc = "Escape terminal mode | terminal" }) +map("n", "h", function() + require("nvchad.term").new { pos = "sp", size = 0.3 } +end, { desc = "New horizontal term | terminal" }) - map( - "v", - "/", - "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", - { desc = "Toggle comment | comment" } - ) -end +map("n", "v", function() + require("nvchad.term").new { pos = "vsp", size = 0.3 } +end, { desc = "New vertical term | terminal" }) -if vim.g.nvimtree_maps then - map("n", "", "NvimTreeToggle", { desc = "Toggle nvimtree | nvimtree" }) - map("n", "e", "NvimTreeFocus", { desc = "Focus nvimtree | nvimtree" }) -end +map({ "n", "t" }, "", function() + require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm", size = 0.3 } +end, { desc = "Toggleable vertical term | terminal" }) -if vim.g.telescope_maps then - map("n", "fw", "Telescope live_grep", { desc = "Live grep | telescope" }) - map("n", "fb", "Telescope buffers", { desc = "Find buffers | telescope" }) - map("n", "fh", "Telescope help_tags", { desc = "Help page | telescope" }) - map("n", "fo", "Telescope oldfiles", { desc = "Find oldfiles | telescope" }) +map({ "n", "t" }, "", function() + require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm", size = 0.2 } +end, { desc = "New horizontal term | terminal" }) - map( - "n", - "fz", - "Telescope current_buffer_fuzzy_find", - { desc = "Find in current buffer | telescope" } - ) +map({ "n", "t" }, "", function() + require("nvchad.term").toggle { pos = "float", id = "floatTerm" } +end, { desc = "Toggleable Floating term | terminal" }) - map("n", "cm", "Telescope git_commits", { desc = "Git commits | telescope" }) - map("n", "gt", "Telescope git_status", { desc = "Git status | telescope" }) - map("n", "pt", "Telescope terms", { desc = "Pick hidden term | telescope" }) - map("n", "th", "Telescope themes", { desc = "Nvchad themes | telescope" }) +map("t", "", function() + local win = vim.api.nvim_get_current_win() + vim.api.nvim_win_close(win, true) +end, { desc = "Close term in terminal mode | terminal" }) - map("n", "ff", "Telescope find_files", { desc = "Find files | telescope" }) - map( - "n", - "fa", - "Telescope find_files follow=true no_ignore=true hidden=true", - { desc = "Find all | telescope" } - ) -end +-- whichkey +map("n", "wK", "WhichKey ", { desc = "Which-key all keymaps | whichkey" }) +map("n", "wk", function() + vim.cmd("WhichKey " .. vim.fn.input "WhichKey: ") +end, { desc = "Which-key query lookup | whichkey" }) --- Mappings for M.terminal -if vim.g.terminal_maps then - map("n", "h", function() - require("nvchad.term").new { pos = "sp", size = 0.3 } - end, { desc = "New horizontal term | terminal" }) +map("n", "cc", function() + local config = { scope = {} } + config.scope.exclude = { language = {}, node_type = {} } + config.scope.include = { node_type = {} } + local node = require("ibl.scope").get(vim.api.nvim_get_current_buf(), config) - map("n", "v", function() - require("nvchad.term").new { pos = "vsp", size = 0.3 } - end, { desc = "New vertical term | terminal" }) - - map({ "n", "t" }, "", function() - require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm", size = 0.3 } - end, { desc = "Toggleable vertical term | terminal" }) - - map({ "n", "t" }, "", function() - require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm", size = 0.2 } - end, { desc = "New horizontal term | terminal" }) - - map({ "n", "t" }, "", function() - require("nvchad.term").toggle { pos = "float", id = "floatTerm" } - end, { desc = "Toggleable Floating term | terminal" }) - - map("t", "", function() - local win = vim.api.nvim_get_current_win() - vim.api.nvim_win_close(win, true) - end, { desc = "Close term in terminal mode | terminal" }) -end - -if vim.g.whichkey_maps then - map("n", "wK", ":WhichKey ", { desc = "Which-key all keymaps | whichkey" }) - - map("n", "wk", function() - vim.cmd("WhichKey " .. vim.fn.input "WhichKey: ") - end, { desc = "Which-key query lookup | whichkey" }) -end - -if vim.g.blankline_maps then - map("n", "cc", function() - local config = { scope = {} } - config.scope.exclude = { language = {}, node_type = {} } - config.scope.include = { node_type = {} } - local node = require("ibl.scope").get(vim.api.nvim_get_current_buf(), config) - - if node then - local start_row, _, end_row, _ = node:range() - if start_row ~= end_row then - vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start_row + 1, 0 }) - vim.api.nvim_feedkeys("_", "n", true) - end + if node then + local start_row, _, end_row, _ = node:range() + if start_row ~= end_row then + vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start_row + 1, 0 }) + vim.api.nvim_feedkeys("_", "n", true) end - end, { desc = "Jump to current context | blankline" }) -end + end +end, { desc = "Jump to current context | blankline" }) pcall(require, "custom.mappings") diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 9b669a8..46f8864 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -75,10 +75,12 @@ local options = { [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.complete(), [""] = cmp.mapping.close(), + [""] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Insert, select = true, }, + [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() @@ -87,10 +89,8 @@ local options = { else fallback() end - end, { - "i", - "s", - }), + end, { "i", "s" }), + [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() @@ -99,10 +99,7 @@ local options = { else fallback() end - end, { - "i", - "s", - }), + end, { "i", "s" }), }, sources = { { name = "nvim_lsp" }, diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 5a7d5bd..d260572 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -31,7 +31,11 @@ M.on_attach = function(client, bufnr) end, opts "List workspace folders | lsp") map("n", "D", vim.lsp.buf.type_definition, opts "Go to type definition | lsp") - map("n", "rn", vim.lsp.buf.rename, opts "Rename symbol | lsp") + + map("n", "ra", function() + require "nvchad.renamer"() + end, opts "NvRename symbol | lsp") + map({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts "Code action | lsp") map("n", "gr", vim.lsp.buf.references, opts "Show references | lsp") end diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 21f9578..c1ba077 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -81,7 +81,7 @@ local default_plugins = { "lewis6991/gitsigns.nvim", event = "User FilePost", opts = function() - return require("plugins.configs.gitsigns") + return require "plugins.configs.gitsigns" end, config = function(_, opts) dofile(vim.g.base46_cache .. "git") From 21753150d4ccac61e6a16e3f8062f79b89f89df8 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 27 Feb 2024 19:37:57 +0530 Subject: [PATCH 1501/1541] misc clean 2 --- lua/core/mappings.lua | 111 ++++++++++++++++-------------- lua/plugins/configs/lspconfig.lua | 24 +++---- 2 files changed, 73 insertions(+), 62 deletions(-) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 74ba012..cb1a279 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -1,111 +1,122 @@ local map = vim.keymap.set -map("i", "", "^i", { desc = "Beginning of line | general" }) -map("i", "", "", { desc = "End of line | general" }) -map("i", "", "", { desc = "Move left | general" }) -map("i", "", "", { desc = "Move right | general" }) -map("i", "", "", { desc = "Move down | general" }) -map("i", "", "", { desc = "Move up | general" }) -map("n", "", "noh", { desc = "Clear highlights | general" }) -map("n", "", "h", { desc = "Window left | general" }) -map("n", "", "l", { desc = "Window right | general" }) -map("n", "", "j", { desc = "Window down | general" }) -map("n", "", "k", { desc = "Window up | general" }) -map("n", "", "w", { desc = "Save file | general" }) -map("n", "", "%y+", { desc = "Copy whole file | general" }) -map("n", "n", "set nu!", { desc = "Toggle line number | general" }) -map("n", "rn", "set rnu!", { desc = "Toggle relative number | general" }) -map("n", "b", "enew", { desc = "New buffer | general" }) -map("n", "ch", "NvCheatsheet", { desc = "Mapping cheatsheet | general" }) +map("i", "", "^i", { desc = "Move Beginning of line" }) +map("i", "", "", { desc = "Move End of line" }) +map("i", "", "", { desc = "Move Left" }) +map("i", "", "", { desc = "Move Right" }) +map("i", "", "", { desc = "Move Down" }) +map("i", "", "", { desc = "Move Up" }) + +map("n", "", "noh", { desc = "General Clear highlights" }) + +map("n", "", "h", { desc = "Switch Window left" }) +map("n", "", "l", { desc = "Switch Window right" }) +map("n", "", "j", { desc = "Switch Window down" }) +map("n", "", "k", { desc = "Switch Window up" }) + +map("n", "", "w", { desc = "File Save" }) +map("n", "", "%y+", { desc = "File Copy whole" }) + +map("n", "n", "set nu!", { desc = "Toggle Line number" }) +map("n", "rn", "set rnu!", { desc = "Toggle Relative number" }) +map("n", "ch", "NvCheatsheet", { desc = "Toggle NvCheatsheet" }) -- global lsp mappings map("n", "fm", function() vim.lsp.buf.format { async = true } -end, { desc = "LSP formatting | lsp" }) +end, { desc = "Lsp formatting" }) -map("n", "lf", vim.diagnostic.open_float, { desc = "floating diagnostics | lsp" }) -map("n", "[d", vim.diagnostic.goto_prev, { desc = "prev diagnostic | lsp" }) -map("n", "]d", vim.diagnostic.goto_next, { desc = "next diagnostic | lsp" }) -map("n", "q", vim.diagnostic.setloclist, { desc = "diagnostic loclist | lsp" }) +map("n", "lf", vim.diagnostic.open_float, { desc = "Lsp floating diagnostics" }) +map("n", "[d", vim.diagnostic.goto_prev, { desc = "Lsp prev diagnostic" }) +map("n", "]d", vim.diagnostic.goto_next, { desc = "Lsp next diagnostic" }) +map("n", "q", vim.diagnostic.setloclist, { desc = "Lsp diagnostic loclist" }) -- tabufline +map("n", "b", "enew", { desc = "Buffer New" }) + map("n", "", function() require("nvchad.tabufline").tabuflineNext() -end, { desc = "Goto next buffer | tabufline" }) +end, { desc = "Buffer Goto next" }) map("n", "", function() require("nvchad.tabufline").tabuflinePrev() -end, { desc = "Goto prev buffer | tabufline" }) +end, { desc = "Buffer Goto prev" }) map("n", "x", function() require("nvchad.tabufline").close_buffer() -end, { desc = "Close buffer | tabufline" }) +end, { desc = "Buffer Close" }) +-- Comment map("n", "/", function() require("Comment.api").toggle.linewise.current() -end, { desc = "Toggle comment | comment" }) +end, { desc = "Comment Toggle" }) map( "v", "/", ":lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", - { desc = "Toggle comment | comment" } + { desc = "Comment Toggle" } ) -map("n", "", "NvimTreeToggle", { desc = "Toggle nvimtree | nvimtree" }) -map("n", "e", "NvimTreeFocus", { desc = "Focus nvimtree | nvimtree" }) +-- nvimtree +map("n", "", "NvimTreeToggle", { desc = "Nvimtree Toggle window" }) +map("n", "e", "NvimTreeFocus", { desc = "Nvimtree Focus window" }) -map("n", "fw", "Telescope live_grep", { desc = "Live grep | telescope" }) -map("n", "fb", "Telescope buffers", { desc = "Find buffers | telescope" }) -map("n", "fh", "Telescope help_tags", { desc = "Help page | telescope" }) -map("n", "fo", "Telescope oldfiles", { desc = "Find oldfiles | telescope" }) -map("n", "fz", "Telescope current_buffer_fuzzy_find", { desc = "Find in current buffer | telescope" }) -map("n", "cm", "Telescope git_commits", { desc = "Git commits | telescope" }) -map("n", "gt", "Telescope git_status", { desc = "Git status | telescope" }) -map("n", "pt", "Telescope terms", { desc = "Pick hidden term | telescope" }) -map("n", "th", "Telescope themes", { desc = "Nvchad themes | telescope" }) -map("n", "ff", "Telescope find_files", { desc = "Find files | telescope" }) +-- telescope +map("n", "fw", "Telescope live_grep", { desc = "Telescope Live grep" }) +map("n", "fb", "Telescope buffers", { desc = "Telescope Find buffers" }) +map("n", "fh", "Telescope help_tags", { desc = "Telescope Help page" }) +map("n", "fo", "Telescope oldfiles", { desc = "Telescope Find oldfiles" }) +map("n", "fz", "Telescope current_buffer_fuzzy_find", { desc = "Telescope Find in current buffer" }) +map("n", "cm", "Telescope git_commits", { desc = "Telescope Git commits" }) +map("n", "gt", "Telescope git_status", { desc = "Telescope Git status" }) +map("n", "pt", "Telescope terms", { desc = "Telescope Pick hidden term" }) +map("n", "th", "Telescope themes", { desc = "Telescope Nvchad themes" }) +map("n", "ff", "Telescope find_files", { desc = "Telescope Find files" }) map( "n", "fa", "Telescope find_files follow=true no_ignore=true hidden=true", - { desc = "Find all | telescope" } + { desc = "Telescope Find all files" } ) -- terminal -map("t", "", "", { desc = "Escape terminal mode | terminal" }) +map("t", "", "", { desc = "Terminal Escape terminal mode" }) + map("n", "h", function() require("nvchad.term").new { pos = "sp", size = 0.3 } -end, { desc = "New horizontal term | terminal" }) +end, { desc = "Terminal New horizontal term" }) map("n", "v", function() require("nvchad.term").new { pos = "vsp", size = 0.3 } -end, { desc = "New vertical term | terminal" }) +end, { desc = "Terminal New vertical term" }) map({ "n", "t" }, "", function() require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm", size = 0.3 } -end, { desc = "Toggleable vertical term | terminal" }) +end, { desc = "Terminal Toggleable vertical term" }) map({ "n", "t" }, "", function() require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm", size = 0.2 } -end, { desc = "New horizontal term | terminal" }) +end, { desc = "Terminal New horizontal term" }) map({ "n", "t" }, "", function() require("nvchad.term").toggle { pos = "float", id = "floatTerm" } -end, { desc = "Toggleable Floating term | terminal" }) +end, { desc = "Terminal Toggle Floating term" }) map("t", "", function() local win = vim.api.nvim_get_current_win() vim.api.nvim_win_close(win, true) -end, { desc = "Close term in terminal mode | terminal" }) +end, { desc = "Terminal Close term in terminal mode" }) -- whichkey -map("n", "wK", "WhichKey ", { desc = "Which-key all keymaps | whichkey" }) +map("n", "wK", "WhichKey ", { desc = "Whichkey all keymaps" }) + map("n", "wk", function() vim.cmd("WhichKey " .. vim.fn.input "WhichKey: ") -end, { desc = "Which-key query lookup | whichkey" }) +end, { desc = "Whichkey query lookup" }) +-- blankline map("n", "cc", function() local config = { scope = {} } config.scope.exclude = { language = {}, node_type = {} } @@ -119,6 +130,6 @@ map("n", "cc", function() vim.api.nvim_feedkeys("_", "n", true) end end -end, { desc = "Jump to current context | blankline" }) +end, { desc = "Blankline Jump to current context" }) pcall(require, "custom.mappings") diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index d260572..3eb71a1 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -18,26 +18,26 @@ M.on_attach = function(client, bufnr) return { buffer = bufnr, desc = desc } end - map("n", "gD", vim.lsp.buf.declaration, opts "Go to declaration | lsp") - map("n", "gd", vim.lsp.buf.definition, opts "Go to definition | lsp") - map("n", "K", vim.lsp.buf.hover, opts "Show hover information | lsp") - map("n", "gi", vim.lsp.buf.implementation, opts "Go to implementation | lsp") - map("n", "", vim.lsp.buf.signature_help, opts "Show signature help | lsp") - map("n", "wa", vim.lsp.buf.add_workspace_folder, opts "Add workspace folder | lsp") - map("n", "wr", vim.lsp.buf.remove_workspace_folder, opts "Remove workspace folder | lsp") + map("n", "gD", vim.lsp.buf.declaration, opts "Lsp Go to declaration") + map("n", "gd", vim.lsp.buf.definition, opts "Lsp Go to definition") + map("n", "K", vim.lsp.buf.hover, opts "Lsp hover information") + map("n", "gi", vim.lsp.buf.implementation, opts "Lsp Go to implementation") + map("n", "", vim.lsp.buf.signature_help, opts "Lsp Show signature help") + map("n", "wa", vim.lsp.buf.add_workspace_folder, opts "Lsp Add workspace folder") + map("n", "wr", vim.lsp.buf.remove_workspace_folder, opts "Lsp Remove workspace folder") map("n", "wl", function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end, opts "List workspace folders | lsp") + end, opts "Lsp List workspace folders") - map("n", "D", vim.lsp.buf.type_definition, opts "Go to type definition | lsp") + map("n", "D", vim.lsp.buf.type_definition, opts "Lsp Go to type definition") map("n", "ra", function() require "nvchad.renamer"() - end, opts "NvRename symbol | lsp") + end, opts "Lsp NvRenamer") - map({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts "Code action | lsp") - map("n", "gr", vim.lsp.buf.references, opts "Show references | lsp") + map({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts "Lsp Code action") + map("n", "gr", vim.lsp.buf.references, opts "Lsp Show references") end M.capabilities = vim.lsp.protocol.make_client_capabilities() From cd10647dd6260d138ace4337ffcc2dec8fe8db05 Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 28 Feb 2024 20:13:34 +0530 Subject: [PATCH 1502/1541] add mason bootstrap in main bootstrap file only --- lua/core/bootstrap.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index 50a8484..ee3f37d 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -33,7 +33,15 @@ M.lazy = function(install_path) require "plugins" -- mason packages & show post_bootstrap screen - require "nvchad.post_install"() + vim.cmd "MasonInstallAll" + local lastpkg = vim.g.mason_binaries_list[#vim.g.mason_binaries_list] + + -- Keep track of which mason pkgs get installed + require("mason-registry"):on("package:install:success", function(pkg) + if tostring(pkg) == "Package(name=" .. lastpkg .. ")" then + print "All done! Now read nvchad.com " + end + end) end M.gen_chadrc_template = function() From adf67560cebeb9501a97c580cebc3759b92ab61c Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 29 Feb 2024 08:00:50 +0530 Subject: [PATCH 1503/1541] misc --- lua/nvconfig.lua | 2 -- lua/plugins/init.lua | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/nvconfig.lua b/lua/nvconfig.lua index fe35faf..bfaebc7 100644 --- a/lua/nvconfig.lua +++ b/lua/nvconfig.lua @@ -94,8 +94,6 @@ M.plugins = "" -- path i.e "custom.plugins", so make custom/plugins.lua file M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startup options -M.mappings = require "core.mappings" - M.base46 = { integrations = { "blankline", diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index c1ba077..645c09b 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -14,7 +14,7 @@ local default_plugins = { { "NvChad/ui", - branch = "v3.0", + branch = "clean", lazy = false, config = function() require "nvchad" From 5d69a0d0f9f9e0b811a734d0adf1c751d3f2ce00 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 29 Feb 2024 21:50:47 +0530 Subject: [PATCH 1504/1541] rm un-needed dofile call --- init.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 44b5eab..9e53d71 100644 --- a/init.lua +++ b/init.lua @@ -1,10 +1,6 @@ require "core" -local custom_init_path = vim.api.nvim_get_runtime_file("lua/custom/init.lua", false)[1] - -if custom_init_path then - dofile(custom_init_path) -end +pcall(require, 'custom') local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" From 7dc8c6d0b2a4b1bfde745050a3045c91b15f2def Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 29 Feb 2024 22:03:20 +0530 Subject: [PATCH 1505/1541] initial starter dir structure; --- init.lua | 35 ++- lua/{plugins => }/configs/cmp.lua | 0 .../lazy_nvim.lua => configs/lazy.lua} | 0 lua/{plugins => }/configs/lspconfig.lua | 0 lua/core/{init.lua => autocmds.lua} | 61 ----- lua/core/bootstrap.lua | 23 -- lua/core/options.lua | 60 +++++ lua/nvconfig.lua | 6 - lua/plugins/cmp.lua | 64 +++++ lua/plugins/configs/luasnip.lua | 23 -- lua/plugins/configs/mason.lua | 28 -- lua/plugins/configs/telescope.lua | 63 ----- lua/plugins/configs/treesitter.lua | 12 - lua/plugins/{configs => }/gitsigns.lua | 10 +- lua/plugins/init.lua | 239 ------------------ lua/plugins/lsp.lua | 7 + lua/plugins/mason.lua | 45 ++++ lua/plugins/{configs => }/nvimtree.lua | 10 +- lua/plugins/telescope.lua | 80 ++++++ lua/plugins/treesitter.lua | 23 ++ lua/plugins/ui.lua | 89 +++++++ 21 files changed, 403 insertions(+), 475 deletions(-) rename lua/{plugins => }/configs/cmp.lua (100%) rename lua/{plugins/configs/lazy_nvim.lua => configs/lazy.lua} (100%) rename lua/{plugins => }/configs/lspconfig.lua (100%) rename lua/core/{init.lua => autocmds.lua} (62%) create mode 100644 lua/core/options.lua create mode 100644 lua/plugins/cmp.lua delete mode 100644 lua/plugins/configs/luasnip.lua delete mode 100644 lua/plugins/configs/mason.lua delete mode 100644 lua/plugins/configs/telescope.lua delete mode 100644 lua/plugins/configs/treesitter.lua rename lua/plugins/{configs => }/gitsigns.lua (75%) delete mode 100644 lua/plugins/init.lua create mode 100644 lua/plugins/lsp.lua create mode 100644 lua/plugins/mason.lua rename lua/plugins/{configs => }/nvimtree.lua (87%) create mode 100644 lua/plugins/telescope.lua create mode 100644 lua/plugins/treesitter.lua create mode 100644 lua/plugins/ui.lua diff --git a/init.lua b/init.lua index 9e53d71..2e98038 100644 --- a/init.lua +++ b/init.lua @@ -1,19 +1,18 @@ -require "core" +require "core.options" +require "core.autocmds" +-- +-- local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" +-- +-- -- bootstrap lazy.nvim! +-- if not vim.loop.fs_stat(lazypath) then +-- require("core.bootstrap").gen_chadrc_template() +-- require("core.bootstrap").lazy(lazypath) +-- end +-- +-- dofile(vim.g.base46_cache .. "defaults") +-- vim.opt.rtp:prepend(lazypath) -pcall(require, 'custom') - -local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" - --- bootstrap lazy.nvim! -if not vim.loop.fs_stat(lazypath) then - require("core.bootstrap").gen_chadrc_template() - require("core.bootstrap").lazy(lazypath) -end - -dofile(vim.g.base46_cache .. "defaults") -vim.opt.rtp:prepend(lazypath) -require "plugins" - -vim.schedule(function() - require "core.mappings" -end, 0) +-- require("lazy").setup({ +-- { import = "plugins" }, +-- { import = "custom.plugins" }, +-- }, require "configs.lazy") diff --git a/lua/plugins/configs/cmp.lua b/lua/configs/cmp.lua similarity index 100% rename from lua/plugins/configs/cmp.lua rename to lua/configs/cmp.lua diff --git a/lua/plugins/configs/lazy_nvim.lua b/lua/configs/lazy.lua similarity index 100% rename from lua/plugins/configs/lazy_nvim.lua rename to lua/configs/lazy.lua diff --git a/lua/plugins/configs/lspconfig.lua b/lua/configs/lspconfig.lua similarity index 100% rename from lua/plugins/configs/lspconfig.lua rename to lua/configs/lspconfig.lua diff --git a/lua/core/init.lua b/lua/core/autocmds.lua similarity index 62% rename from lua/core/init.lua rename to lua/core/autocmds.lua index 59eaf75..fbc0f36 100644 --- a/lua/core/init.lua +++ b/lua/core/autocmds.lua @@ -1,64 +1,3 @@ -local opt = vim.opt -local g = vim.g - --------------------------------------- globals ----------------------------------------- -g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" -g.toggle_theme_icon = "  " - --------------------------------------- options ------------------------------------------ -opt.laststatus = 3 -- global statusline -opt.showmode = false - -opt.clipboard = "unnamedplus" -opt.cursorline = true -opt.cursorlineopt = "number" - --- Indenting -opt.expandtab = true -opt.shiftwidth = 2 -opt.smartindent = true -opt.tabstop = 2 -opt.softtabstop = 2 - -opt.fillchars = { eob = " " } -opt.ignorecase = true -opt.smartcase = true -opt.mouse = "a" - --- Numbers -opt.number = true -opt.numberwidth = 2 -opt.ruler = false - --- disable nvim intro -opt.shortmess:append "sI" - -opt.signcolumn = "yes" -opt.splitbelow = true -opt.splitright = true -opt.termguicolors = true -opt.timeoutlen = 400 -opt.undofile = true - --- interval for writing swap file to disk, also used by gitsigns -opt.updatetime = 250 - --- go to previous/next line with h,l,left arrow and right arrow --- when cursor reaches end/beginning of line -opt.whichwrap:append "<>[]hl" - -g.mapleader = " " - --- disable some default providers -for _, provider in ipairs { "node", "perl", "python3", "ruby" } do - vim.g["loaded_" .. provider .. "_provider"] = 0 -end - --- add binaries installed by mason.nvim to path -local is_windows = vim.loop.os_uname().sysname == "Windows_NT" -vim.env.PATH = vim.fn.stdpath "data" .. "/mason/bin" .. (is_windows and ";" or ":") .. vim.env.PATH - --------------------------------------- autocmds ------------------------------------------ local autocmd = vim.api.nvim_create_autocmd -- dont list quickfix buffers diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index ee3f37d..2871609 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -44,27 +44,4 @@ M.lazy = function(install_path) end) end -M.gen_chadrc_template = function() - local path = fn.stdpath "config" .. "/lua/custom" - - if fn.isdirectory(path) ~= 1 then - local input = vim.env.NVCHAD_EXAMPLE_CONFIG or fn.input "Do you want to install example custom config? (y/N): " - - if input:lower() == "y" then - M.echo "Cloning example custom config repo..." - shell_call { "git", "clone", "--depth", "1", "https://github.com/NvChad/example_config", path } - fn.delete(path .. "/.git", "rf") - else - -- use very minimal chadrc - fn.mkdir(path, "p") - - local file = io.open(path .. "/chadrc.lua", "w") - if file then - file:write "---@type ChadrcConfig\nlocal M = {}\n\nM.ui = { theme = 'onedark' }\n\nreturn M" - file:close() - end - end - end -end - return M diff --git a/lua/core/options.lua b/lua/core/options.lua new file mode 100644 index 0000000..bd7f2be --- /dev/null +++ b/lua/core/options.lua @@ -0,0 +1,60 @@ +local opt = vim.opt +local g = vim.g + +-------------------------------------- globals ----------------------------------------- +g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" +g.toggle_theme_icon = "  " + +-------------------------------------- options ------------------------------------------ +opt.laststatus = 3 -- global statusline +opt.showmode = false + +opt.clipboard = "unnamedplus" +opt.cursorline = true +opt.cursorlineopt = "number" + +-- Indenting +opt.expandtab = true +opt.shiftwidth = 2 +opt.smartindent = true +opt.tabstop = 2 +opt.softtabstop = 2 + +opt.fillchars = { eob = " " } +opt.ignorecase = true +opt.smartcase = true +opt.mouse = "a" + +-- Numbers +opt.number = true +opt.numberwidth = 2 +opt.ruler = false + +-- disable nvim intro +opt.shortmess:append "sI" + +opt.signcolumn = "yes" +opt.splitbelow = true +opt.splitright = true +opt.termguicolors = true +opt.timeoutlen = 400 +opt.undofile = true + +-- interval for writing swap file to disk, also used by gitsigns +opt.updatetime = 250 + +-- go to previous/next line with h,l,left arrow and right arrow +-- when cursor reaches end/beginning of line +opt.whichwrap:append "<>[]hl" + +g.mapleader = " " + +-- disable some default providers +vim.g["loaded_node_provider"] = 0 +vim.g["loaded_python3_provider"] = 0 +vim.g["loaded_perl_provider"] = 0 +vim.g["loaded_ruby_provider"] = 0 + +-- add binaries installed by mason.nvim to path +local is_windows = vim.loop.os_uname().sysname == "Windows_NT" +vim.env.PATH = vim.fn.stdpath "data" .. "/mason/bin" .. (is_windows and ";" or ":") .. vim.env.PATH diff --git a/lua/nvconfig.lua b/lua/nvconfig.lua index bfaebc7..5066ed2 100644 --- a/lua/nvconfig.lua +++ b/lua/nvconfig.lua @@ -1,9 +1,5 @@ local M = {} -M.options = { - nvchad_branch = "v3.0", -} - M.ui = { ------------------------------- base46 ------------------------------------- -- hl = highlights @@ -92,8 +88,6 @@ M.ui = { M.plugins = "" -- path i.e "custom.plugins", so make custom/plugins.lua file -M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startup options - M.base46 = { integrations = { "blankline", diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua new file mode 100644 index 0000000..978d7e7 --- /dev/null +++ b/lua/plugins/cmp.lua @@ -0,0 +1,64 @@ +return { + "hrsh7th/nvim-cmp", + event = "InsertEnter", + + opts = function() + return require "configs.cmp" + end, + + config = function(_, opts) + require("cmp").setup(opts) + end, + + dependencies = { + { + -- snippet plugin + "L3MON4D3/LuaSnip", + dependencies = "rafamadriz/friendly-snippets", + opts = { history = true, updateevents = "TextChanged,TextChangedI" }, + config = function(_, opts) + require("luasnip").config.set_config(opts) + + require("luasnip.loaders.from_vscode").lazy_load() + require("luasnip.loaders.from_snipmate").load() + require("luasnip.loaders.from_lua").load() + + vim.api.nvim_create_autocmd("InsertLeave", { + callback = function() + if + require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()] + and not require("luasnip").session.jump_active + then + require("luasnip").unlink_current() + end + end, + }) + end, + }, + + -- autopairing of (){}[] etc + { + "windwp/nvim-autopairs", + opts = { + fast_wrap = {}, + disable_filetype = { "TelescopePrompt", "vim" }, + }, + config = function(_, opts) + require("nvim-autopairs").setup(opts) + + -- setup cmp for autopairs + local cmp_autopairs = require "nvim-autopairs.completion.cmp" + require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done()) + end, + }, + + -- cmp sources plugins + { + "saadparwaiz1/cmp_luasnip", + "hrsh7th/cmp-nvim-lua", + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + }, + }, +} diff --git a/lua/plugins/configs/luasnip.lua b/lua/plugins/configs/luasnip.lua deleted file mode 100644 index f40672d..0000000 --- a/lua/plugins/configs/luasnip.lua +++ /dev/null @@ -1,23 +0,0 @@ --- vscode format -require("luasnip.loaders.from_vscode").lazy_load() -require("luasnip.loaders.from_vscode").lazy_load { paths = "your path!" } -require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" } - --- snipmate format -require("luasnip.loaders.from_snipmate").load() -require("luasnip.loaders.from_snipmate").lazy_load { paths = vim.g.snipmate_snippets_path or "" } - --- lua format -require("luasnip.loaders.from_lua").load() -require("luasnip.loaders.from_lua").lazy_load { paths = vim.g.lua_snippets_path or "" } - -vim.api.nvim_create_autocmd("InsertLeave", { - callback = function() - if - require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()] - and not require("luasnip").session.jump_active - then - require("luasnip").unlink_current() - end - end, -}) diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua deleted file mode 100644 index 3692a15..0000000 --- a/lua/plugins/configs/mason.lua +++ /dev/null @@ -1,28 +0,0 @@ -local options = { - ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim - - PATH = "skip", - - ui = { - icons = { - package_pending = " ", - package_installed = "󰄳 ", - package_uninstalled = " 󰚌", - }, - - keymaps = { - toggle_server_expand = "", - install_server = "i", - update_server = "u", - check_server_version = "c", - update_all_servers = "U", - check_outdated_servers = "C", - uninstall_server = "X", - cancel_installation = "", - }, - }, - - max_concurrent_installers = 10, -} - -return options diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua deleted file mode 100644 index 0df500e..0000000 --- a/lua/plugins/configs/telescope.lua +++ /dev/null @@ -1,63 +0,0 @@ -local options = { - defaults = { - vimgrep_arguments = { - "rg", - "-L", - "--color=never", - "--no-heading", - "--with-filename", - "--line-number", - "--column", - "--smart-case", - }, - prompt_prefix = "  ", - selection_caret = " ", - entry_prefix = " ", - initial_mode = "insert", - selection_strategy = "reset", - sorting_strategy = "ascending", - layout_strategy = "horizontal", - layout_config = { - horizontal = { - prompt_position = "top", - preview_width = 0.55, - results_width = 0.8, - }, - vertical = { - mirror = false, - }, - width = 0.87, - height = 0.80, - preview_cutoff = 120, - }, - file_sorter = require("telescope.sorters").get_fuzzy_file, - file_ignore_patterns = { "node_modules" }, - generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, - path_display = { "truncate" }, - winblend = 0, - border = {}, - borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, - color_devicons = true, - set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, - file_previewer = require("telescope.previewers").vim_buffer_cat.new, - grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, - qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, - -- Developer configurations: Not meant for general override - buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, - mappings = { - n = { ["q"] = require("telescope.actions").close }, - }, - }, - - extensions_list = { "themes", "terms" }, - extensions = { - fzf = { - fuzzy = true, - override_generic_sorter = true, - override_file_sorter = true, - case_mode = "smart_case", - }, - }, -} - -return options diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua deleted file mode 100644 index 897c4e3..0000000 --- a/lua/plugins/configs/treesitter.lua +++ /dev/null @@ -1,12 +0,0 @@ -local options = { - ensure_installed = { "lua", "vim", "vimdoc" }, - - highlight = { - enable = true, - use_languagetree = true, - }, - - indent = { enable = true }, -} - -return options diff --git a/lua/plugins/configs/gitsigns.lua b/lua/plugins/gitsigns.lua similarity index 75% rename from lua/plugins/configs/gitsigns.lua rename to lua/plugins/gitsigns.lua index 27f3105..8f9fb6c 100644 --- a/lua/plugins/configs/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -23,4 +23,12 @@ local options = { end, } -return options +return { + "lewis6991/gitsigns.nvim", + event = "User FilePost", + opts = options, + config = function(_, opts) + dofile(vim.g.base46_cache .. "git") + require("gitsigns").setup(opts) + end, +} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua deleted file mode 100644 index 645c09b..0000000 --- a/lua/plugins/init.lua +++ /dev/null @@ -1,239 +0,0 @@ --- All plugins have lazy=true by default,to load a plugin on startup just lazy=false --- List of all default plugins & their definitions -local default_plugins = { - - "nvim-lua/plenary.nvim", - - { - "NvChad/base46", - branch = "v3.0", - build = function() - require("base46").load_all_highlights() - end, - }, - - { - "NvChad/ui", - branch = "clean", - lazy = false, - config = function() - require "nvchad" - end, - }, - - { - "NvChad/nvim-colorizer.lua", - event = "User FilePost", - config = function(_, opts) - require("colorizer").setup(opts) - - -- execute colorizer as soon as possible - vim.defer_fn(function() - require("colorizer").attach_to_buffer(0) - end, 0) - end, - }, - - { - "nvim-tree/nvim-web-devicons", - opts = function() - return { override = require "nvchad.icons.devicons" } - end, - config = function(_, opts) - dofile(vim.g.base46_cache .. "devicons") - require("nvim-web-devicons").setup(opts) - end, - }, - - { - "lukas-reineke/indent-blankline.nvim", - event = "User FilePost", - opts = { - indent = { char = "│", highlight = "IblChar" }, - scope = { char = "│", highlight = "IblScopeChar" }, - }, - config = function(_, opts) - dofile(vim.g.base46_cache .. "blankline") - - local hooks = require "ibl.hooks" - hooks.register(hooks.type.WHITESPACE, hooks.builtin.hide_first_space_indent_level) - require("ibl").setup(opts) - end, - }, - - { - "nvim-treesitter/nvim-treesitter", - event = { "BufReadPost", "BufNewFile" }, - cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" }, - build = ":TSUpdate", - opts = function() - return require "plugins.configs.treesitter" - end, - config = function(_, opts) - dofile(vim.g.base46_cache .. "syntax") - dofile(vim.g.base46_cache .. "treesitter") - require("nvim-treesitter.configs").setup(opts) - end, - }, - - -- git stuff - { - "lewis6991/gitsigns.nvim", - event = "User FilePost", - opts = function() - return require "plugins.configs.gitsigns" - end, - config = function(_, opts) - dofile(vim.g.base46_cache .. "git") - require("gitsigns").setup(opts) - end, - }, - - -- lsp stuff - { - "williamboman/mason.nvim", - cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUpdate" }, - opts = function() - return require "plugins.configs.mason" - end, - config = function(_, opts) - dofile(vim.g.base46_cache .. "mason") - require("mason").setup(opts) - - -- custom nvchad cmd to install all mason binaries listed - vim.api.nvim_create_user_command("MasonInstallAll", function() - if opts.ensure_installed and #opts.ensure_installed > 0 then - vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " ")) - end - end, {}) - - vim.g.mason_binaries_list = opts.ensure_installed - end, - }, - - { - "neovim/nvim-lspconfig", - event = "User FilePost", - config = function() - require("plugins.configs.lspconfig").defaults() - end, - }, - - -- load luasnips + cmp related in insert mode only - { - "hrsh7th/nvim-cmp", - event = "InsertEnter", - dependencies = { - { - -- snippet plugin - "L3MON4D3/LuaSnip", - dependencies = "rafamadriz/friendly-snippets", - opts = { history = true, updateevents = "TextChanged,TextChangedI" }, - config = function(_, opts) - require("luasnip").config.set_config(opts) - require "plugins.configs.luasnip" - end, - }, - - -- autopairing of (){}[] etc - { - "windwp/nvim-autopairs", - opts = { - fast_wrap = {}, - disable_filetype = { "TelescopePrompt", "vim" }, - }, - config = function(_, opts) - require("nvim-autopairs").setup(opts) - - -- setup cmp for autopairs - local cmp_autopairs = require "nvim-autopairs.completion.cmp" - require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done()) - end, - }, - - -- cmp sources plugins - { - "saadparwaiz1/cmp_luasnip", - "hrsh7th/cmp-nvim-lua", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - }, - }, - opts = function() - return require "plugins.configs.cmp" - end, - config = function(_, opts) - require("cmp").setup(opts) - end, - }, - - { - "numToStr/Comment.nvim", - keys = { - { "gcc", mode = "n", desc = "Comment toggle current line" }, - { "gc", mode = { "n", "o" }, desc = "Comment toggle linewise" }, - { "gc", mode = "x", desc = "Comment toggle linewise (visual)" }, - { "gbc", mode = "n", desc = "Comment toggle current block" }, - { "gb", mode = { "n", "o" }, desc = "Comment toggle blockwise" }, - { "gb", mode = "x", desc = "Comment toggle blockwise (visual)" }, - }, - init = function() - vim.g.comment_maps = true - end, - config = function(_, opts) - require("Comment").setup(opts) - end, - }, - - -- file managing , picker etc - { - "nvim-tree/nvim-tree.lua", - cmd = { "NvimTreeToggle", "NvimTreeFocus" }, - opts = function() - return require "plugins.configs.nvimtree" - end, - config = function(_, opts) - dofile(vim.g.base46_cache .. "nvimtree") - require("nvim-tree").setup(opts) - end, - }, - - { - "nvim-telescope/telescope.nvim", - dependencies = { "nvim-treesitter/nvim-treesitter" }, - cmd = "Telescope", - opts = function() - return require "plugins.configs.telescope" - end, - config = function(_, opts) - dofile(vim.g.base46_cache .. "telescope") - local telescope = require "telescope" - telescope.setup(opts) - - -- load extensions - for _, ext in ipairs(opts.extensions_list) do - telescope.load_extension(ext) - end - end, - }, - - -- Only load whichkey after all the gui - { - "folke/which-key.nvim", - keys = { "", "", "", '"', "'", "`", "c", "v", "g" }, - cmd = "WhichKey", - config = function(_, opts) - dofile(vim.g.base46_cache .. "whichkey") - require("which-key").setup(opts) - end, - }, -} - -local config = require "nvconfig" - -if #config.plugins > 0 then - table.insert(default_plugins, { import = config.plugins }) -end - -require("lazy").setup(default_plugins, config.lazy_nvim) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua new file mode 100644 index 0000000..b55658f --- /dev/null +++ b/lua/plugins/lsp.lua @@ -0,0 +1,7 @@ +return { + "neovim/nvim-lspconfig", + event = "User FilePost", + config = function() + require("configs.lspconfig").defaults() + end, +} diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua new file mode 100644 index 0000000..9f8248f --- /dev/null +++ b/lua/plugins/mason.lua @@ -0,0 +1,45 @@ +local options = { + ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim + + PATH = "skip", + + ui = { + icons = { + package_pending = " ", + package_installed = "󰄳 ", + package_uninstalled = " 󰚌", + }, + + keymaps = { + toggle_server_expand = "", + install_server = "i", + update_server = "u", + check_server_version = "c", + update_all_servers = "U", + check_outdated_servers = "C", + uninstall_server = "X", + cancel_installation = "", + }, + }, + + max_concurrent_installers = 10, +} + +return { + "williamboman/mason.nvim", + cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUpdate" }, + opts = options, + config = function(_, opts) + dofile(vim.g.base46_cache .. "mason") + require("mason").setup(opts) + + -- custom nvchad cmd to install all mason binaries listed + vim.api.nvim_create_user_command("MasonInstallAll", function() + if opts.ensure_installed and #opts.ensure_installed > 0 then + vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " ")) + end + end, {}) + + vim.g.mason_binaries_list = opts.ensure_installed + end, +} diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/nvimtree.lua similarity index 87% rename from lua/plugins/configs/nvimtree.lua rename to lua/plugins/nvimtree.lua index c54248e..cf8bdb0 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/nvimtree.lua @@ -74,4 +74,12 @@ local options = { }, } -return options +return { + "nvim-tree/nvim-tree.lua", + cmd = { "NvimTreeToggle", "NvimTreeFocus" }, + opts = options, + config = function(_, opts) + dofile(vim.g.base46_cache .. "nvimtree") + require("nvim-tree").setup(opts) + end, +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua new file mode 100644 index 0000000..c441438 --- /dev/null +++ b/lua/plugins/telescope.lua @@ -0,0 +1,80 @@ +return { + "nvim-telescope/telescope.nvim", + dependencies = { "nvim-treesitter/nvim-treesitter" }, + cmd = "Telescope", + opts = function() + local options = { + defaults = { + vimgrep_arguments = { + "rg", + "-L", + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + "--smart-case", + }, + prompt_prefix = "  ", + selection_caret = " ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "ascending", + layout_strategy = "horizontal", + layout_config = { + horizontal = { + prompt_position = "top", + preview_width = 0.55, + results_width = 0.8, + }, + vertical = { + mirror = false, + }, + width = 0.87, + height = 0.80, + preview_cutoff = 120, + }, + file_sorter = require("telescope.sorters").get_fuzzy_file, + file_ignore_patterns = { "node_modules" }, + generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, + path_display = { "truncate" }, + winblend = 0, + border = {}, + borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, + color_devicons = true, + set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, + file_previewer = require("telescope.previewers").vim_buffer_cat.new, + grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, + qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, + -- Developer configurations: Not meant for general override + buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, + mappings = { + n = { ["q"] = require("telescope.actions").close }, + }, + }, + + extensions_list = { "themes", "terms" }, + extensions = { + fzf = { + fuzzy = true, + override_generic_sorter = true, + override_file_sorter = true, + case_mode = "smart_case", + }, + }, + } + + return options + end, + config = function(_, opts) + dofile(vim.g.base46_cache .. "telescope") + local telescope = require "telescope" + telescope.setup(opts) + + -- load extensions + for _, ext in ipairs(opts.extensions_list) do + telescope.load_extension(ext) + end + end, +} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua new file mode 100644 index 0000000..d940c95 --- /dev/null +++ b/lua/plugins/treesitter.lua @@ -0,0 +1,23 @@ +local config = { + ensure_installed = { "lua", "vim", "vimdoc" }, + + highlight = { + enable = true, + use_languagetree = true, + }, + + indent = { enable = true }, +} + +return { + "nvim-treesitter/nvim-treesitter", + event = { "BufReadPost", "BufNewFile" }, + cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" }, + build = ":TSUpdate", + opts = config, + config = function(_, opts) + dofile(vim.g.base46_cache .. "syntax") + dofile(vim.g.base46_cache .. "treesitter") + require("nvim-treesitter.configs").setup(opts) + end, +} diff --git a/lua/plugins/ui.lua b/lua/plugins/ui.lua new file mode 100644 index 0000000..6366f45 --- /dev/null +++ b/lua/plugins/ui.lua @@ -0,0 +1,89 @@ +return { + "nvim-lua/plenary.nvim", + + { + "NvChad/base46", + -- branch = "v3.0", + dir = "~/projects/base46/", + build = function() + require("base46").load_all_highlights() + end, + }, + + { + "NvChad/ui", + -- branch = "v3.0", + dir = "~/projects/ui/", + lazy = false, + config = function() + require "nvchad" + end, + }, + + { + "NvChad/nvim-colorizer.lua", + event = "User FilePost", + config = function(_, opts) + require("colorizer").setup(opts) + + -- execute colorizer as soon as possible + vim.defer_fn(function() + require("colorizer").attach_to_buffer(0) + end, 0) + end, + }, + + { + "nvim-tree/nvim-web-devicons", + opts = function() + return { override = require "nvchad.icons.devicons" } + end, + config = function(_, opts) + dofile(vim.g.base46_cache .. "devicons") + require("nvim-web-devicons").setup(opts) + end, + }, + + { + "folke/which-key.nvim", + keys = { "", "", "", '"', "'", "`", "c", "v", "g" }, + cmd = "WhichKey", + config = function(_, opts) + dofile(vim.g.base46_cache .. "whichkey") + require("which-key").setup(opts) + end, + }, + + { + "numToStr/Comment.nvim", + keys = { + { "gcc", mode = "n", desc = "Comment toggle current line" }, + { "gc", mode = { "n", "o" }, desc = "Comment toggle linewise" }, + { "gc", mode = "x", desc = "Comment toggle linewise (visual)" }, + { "gbc", mode = "n", desc = "Comment toggle current block" }, + { "gb", mode = { "n", "o" }, desc = "Comment toggle blockwise" }, + { "gb", mode = "x", desc = "Comment toggle blockwise (visual)" }, + }, + config = function(_, opts) + require("Comment").setup(opts) + end, + }, + + { + "lukas-reineke/indent-blankline.nvim", + event = "User FilePost", + + opts = { + indent = { char = "│", highlight = "IblChar" }, + scope = { char = "│", highlight = "IblScopeChar" }, + }, + + config = function(_, opts) + dofile(vim.g.base46_cache .. "blankline") + + local hooks = require "ibl.hooks" + hooks.register(hooks.type.WHITESPACE, hooks.builtin.hide_first_space_indent_level) + require("ibl").setup(opts) + end, + }, +} From 73bf6c437f1c73c85daab5c76ee016f3bbd1ddd7 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 4 Mar 2024 08:07:10 +0530 Subject: [PATCH 1506/1541] misc --- init.lua | 19 +--------- lua/core/bootstrap.lua | 47 ------------------------- lua/{core => nvchad}/autocmds.lua | 7 ++-- lua/{ => nvchad}/configs/cmp.lua | 0 lua/{ => nvchad}/configs/lazy.lua | 0 lua/{ => nvchad}/configs/lspconfig.lua | 0 lua/{core => nvchad}/mappings.lua | 4 +-- lua/{ => nvchad}/nvconfig.lua | 0 lua/{core => nvchad}/options.lua | 4 +-- lua/{ => nvchad}/plugins/cmp.lua | 2 +- lua/{ => nvchad}/plugins/gitsigns.lua | 1 + lua/{ => nvchad}/plugins/lsp.lua | 2 +- lua/{ => nvchad}/plugins/mason.lua | 0 lua/{ => nvchad}/plugins/nvimtree.lua | 0 lua/{ => nvchad}/plugins/telescope.lua | 0 lua/{ => nvchad}/plugins/treesitter.lua | 0 lua/{ => nvchad}/plugins/ui.lua | 6 ++-- 17 files changed, 14 insertions(+), 78 deletions(-) delete mode 100644 lua/core/bootstrap.lua rename lua/{core => nvchad}/autocmds.lua (90%) rename lua/{ => nvchad}/configs/cmp.lua (100%) rename lua/{ => nvchad}/configs/lazy.lua (100%) rename lua/{ => nvchad}/configs/lspconfig.lua (100%) rename lua/{core => nvchad}/mappings.lua (98%) rename lua/{ => nvchad}/nvconfig.lua (100%) rename lua/{core => nvchad}/options.lua (94%) rename lua/{ => nvchad}/plugins/cmp.lua (97%) rename lua/{ => nvchad}/plugins/gitsigns.lua (99%) rename lua/{ => nvchad}/plugins/lsp.lua (64%) rename lua/{ => nvchad}/plugins/mason.lua (100%) rename lua/{ => nvchad}/plugins/nvimtree.lua (100%) rename lua/{ => nvchad}/plugins/telescope.lua (100%) rename lua/{ => nvchad}/plugins/treesitter.lua (100%) rename lua/{ => nvchad}/plugins/ui.lua (95%) diff --git a/init.lua b/init.lua index 2e98038..3d8a6e5 100644 --- a/init.lua +++ b/init.lua @@ -1,18 +1 @@ -require "core.options" -require "core.autocmds" --- --- local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" --- --- -- bootstrap lazy.nvim! --- if not vim.loop.fs_stat(lazypath) then --- require("core.bootstrap").gen_chadrc_template() --- require("core.bootstrap").lazy(lazypath) --- end --- --- dofile(vim.g.base46_cache .. "defaults") --- vim.opt.rtp:prepend(lazypath) - --- require("lazy").setup({ --- { import = "plugins" }, --- { import = "custom.plugins" }, --- }, require "configs.lazy") +print('use this along starter!!!') diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua deleted file mode 100644 index 2871609..0000000 --- a/lua/core/bootstrap.lua +++ /dev/null @@ -1,47 +0,0 @@ -local M = {} -local fn = vim.fn - -M.echo = function(str) - vim.cmd "redraw" - vim.api.nvim_echo({ { str, "Bold" } }, true, {}) -end - -local function shell_call(args) - local output = fn.system(args) - assert(vim.v.shell_error == 0, "External call failed with error code: " .. vim.v.shell_error .. "\n" .. output) -end - -M.lazy = function(install_path) - ------------- base46 --------------- - local lazy_path = fn.stdpath "data" .. "/lazy/base46" - - M.echo " Compiling base46 theme to bytecode ..." - - local base46_repo = "https://github.com/NvChad/base46" - shell_call { "git", "clone", "--depth", "1", "-b", "v3.0", base46_repo, lazy_path } - vim.opt.rtp:prepend(lazy_path) - - require("base46").compile() - - --------- lazy.nvim --------------- - M.echo " Installing lazy.nvim & plugins ..." - local repo = "https://github.com/folke/lazy.nvim.git" - shell_call { "git", "clone", "--filter=blob:none", "--branch=stable", repo, install_path } - vim.opt.rtp:prepend(install_path) - - -- install plugins - require "plugins" - - -- mason packages & show post_bootstrap screen - vim.cmd "MasonInstallAll" - local lastpkg = vim.g.mason_binaries_list[#vim.g.mason_binaries_list] - - -- Keep track of which mason pkgs get installed - require("mason-registry"):on("package:install:success", function(pkg) - if tostring(pkg) == "Package(name=" .. lastpkg .. ")" then - print "All done! Now read nvchad.com " - end - end) -end - -return M diff --git a/lua/core/autocmds.lua b/lua/nvchad/autocmds.lua similarity index 90% rename from lua/core/autocmds.lua rename to lua/nvchad/autocmds.lua index fbc0f36..42c964a 100644 --- a/lua/core/autocmds.lua +++ b/lua/nvchad/autocmds.lua @@ -28,14 +28,15 @@ autocmd("BufWritePost", { -- statusline if config.ui.statusline.theme ~= "custom" then - require("plenary.reload").reload_module("nvchad.statusline." .. config.ui.statusline.theme) - vim.opt.statusline = "%!v:lua.require('nvchad.statusline." .. config.ui.statusline.theme .. "').run()" + require("plenary.reload").reload_module("nvchad.stl.utils") + require("plenary.reload").reload_module("nvchad.stl." .. config.ui.statusline.theme) + vim.opt.statusline = "%!v:lua.require('nvchad.stl." .. config.ui.statusline.theme .. "')()" end -- tabufline if config.ui.tabufline.enabled then require("plenary.reload").reload_module "nvchad.tabufline.modules" - vim.opt.tabline = "%!v:lua.require('nvchad.tabufline.modules').run()" + vim.opt.tabline = "%!v:lua.require('nvchad.tabufline.modules')()" end require("base46").load_all_highlights() diff --git a/lua/configs/cmp.lua b/lua/nvchad/configs/cmp.lua similarity index 100% rename from lua/configs/cmp.lua rename to lua/nvchad/configs/cmp.lua diff --git a/lua/configs/lazy.lua b/lua/nvchad/configs/lazy.lua similarity index 100% rename from lua/configs/lazy.lua rename to lua/nvchad/configs/lazy.lua diff --git a/lua/configs/lspconfig.lua b/lua/nvchad/configs/lspconfig.lua similarity index 100% rename from lua/configs/lspconfig.lua rename to lua/nvchad/configs/lspconfig.lua diff --git a/lua/core/mappings.lua b/lua/nvchad/mappings.lua similarity index 98% rename from lua/core/mappings.lua rename to lua/nvchad/mappings.lua index cb1a279..ba80b4f 100644 --- a/lua/core/mappings.lua +++ b/lua/nvchad/mappings.lua @@ -35,11 +35,11 @@ map("n", "q", vim.diagnostic.setloclist, { desc = "Lsp diagnostic loclis map("n", "b", "enew", { desc = "Buffer New" }) map("n", "", function() - require("nvchad.tabufline").tabuflineNext() + require("nvchad.tabufline").next() end, { desc = "Buffer Goto next" }) map("n", "", function() - require("nvchad.tabufline").tabuflinePrev() + require("nvchad.tabufline").prev() end, { desc = "Buffer Goto prev" }) map("n", "x", function() diff --git a/lua/nvconfig.lua b/lua/nvchad/nvconfig.lua similarity index 100% rename from lua/nvconfig.lua rename to lua/nvchad/nvconfig.lua diff --git a/lua/core/options.lua b/lua/nvchad/options.lua similarity index 94% rename from lua/core/options.lua rename to lua/nvchad/options.lua index bd7f2be..b7e5ad0 100644 --- a/lua/core/options.lua +++ b/lua/nvchad/options.lua @@ -2,7 +2,7 @@ local opt = vim.opt local g = vim.g -------------------------------------- globals ----------------------------------------- -g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" +-- g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" g.toggle_theme_icon = "  " -------------------------------------- options ------------------------------------------ @@ -47,7 +47,7 @@ opt.updatetime = 250 -- when cursor reaches end/beginning of line opt.whichwrap:append "<>[]hl" -g.mapleader = " " +-- g.mapleader = " " -- disable some default providers vim.g["loaded_node_provider"] = 0 diff --git a/lua/plugins/cmp.lua b/lua/nvchad/plugins/cmp.lua similarity index 97% rename from lua/plugins/cmp.lua rename to lua/nvchad/plugins/cmp.lua index 978d7e7..44fb8be 100644 --- a/lua/plugins/cmp.lua +++ b/lua/nvchad/plugins/cmp.lua @@ -3,7 +3,7 @@ return { event = "InsertEnter", opts = function() - return require "configs.cmp" + return require "nvchad.configs.cmp" end, config = function(_, opts) diff --git a/lua/plugins/gitsigns.lua b/lua/nvchad/plugins/gitsigns.lua similarity index 99% rename from lua/plugins/gitsigns.lua rename to lua/nvchad/plugins/gitsigns.lua index 8f9fb6c..ca7c70b 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/nvchad/plugins/gitsigns.lua @@ -27,6 +27,7 @@ return { "lewis6991/gitsigns.nvim", event = "User FilePost", opts = options, + config = function(_, opts) dofile(vim.g.base46_cache .. "git") require("gitsigns").setup(opts) diff --git a/lua/plugins/lsp.lua b/lua/nvchad/plugins/lsp.lua similarity index 64% rename from lua/plugins/lsp.lua rename to lua/nvchad/plugins/lsp.lua index b55658f..e42fa1a 100644 --- a/lua/plugins/lsp.lua +++ b/lua/nvchad/plugins/lsp.lua @@ -2,6 +2,6 @@ return { "neovim/nvim-lspconfig", event = "User FilePost", config = function() - require("configs.lspconfig").defaults() + require("nvchad.configs.lspconfig").defaults() end, } diff --git a/lua/plugins/mason.lua b/lua/nvchad/plugins/mason.lua similarity index 100% rename from lua/plugins/mason.lua rename to lua/nvchad/plugins/mason.lua diff --git a/lua/plugins/nvimtree.lua b/lua/nvchad/plugins/nvimtree.lua similarity index 100% rename from lua/plugins/nvimtree.lua rename to lua/nvchad/plugins/nvimtree.lua diff --git a/lua/plugins/telescope.lua b/lua/nvchad/plugins/telescope.lua similarity index 100% rename from lua/plugins/telescope.lua rename to lua/nvchad/plugins/telescope.lua diff --git a/lua/plugins/treesitter.lua b/lua/nvchad/plugins/treesitter.lua similarity index 100% rename from lua/plugins/treesitter.lua rename to lua/nvchad/plugins/treesitter.lua diff --git a/lua/plugins/ui.lua b/lua/nvchad/plugins/ui.lua similarity index 95% rename from lua/plugins/ui.lua rename to lua/nvchad/plugins/ui.lua index 6366f45..0c5fad3 100644 --- a/lua/plugins/ui.lua +++ b/lua/nvchad/plugins/ui.lua @@ -3,8 +3,7 @@ return { { "NvChad/base46", - -- branch = "v3.0", - dir = "~/projects/base46/", + branch = "v3.0", build = function() require("base46").load_all_highlights() end, @@ -12,8 +11,7 @@ return { { "NvChad/ui", - -- branch = "v3.0", - dir = "~/projects/ui/", + branch = "v3.0", lazy = false, config = function() require "nvchad" From e307a4eacffcccbec8f8f292558967210a752a52 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 4 Mar 2024 08:18:44 +0530 Subject: [PATCH 1507/1541] better plugin structure --- .gitignore | 10 -- .ignore | 1 - lua/nvchad/{plugins => configs}/gitsigns.lua | 11 +- .../configs/{lazy.lua => lazy_nvim.lua} | 0 lua/nvchad/configs/lspconfig.lua | 2 +- lua/nvchad/configs/luasnip.lua | 23 +++ lua/nvchad/configs/mason.lua | 28 ++++ lua/nvchad/{plugins => configs}/nvimtree.lua | 10 +- lua/nvchad/configs/telescope.lua | 63 ++++++++ lua/nvchad/configs/treesitter.lua | 12 ++ lua/nvchad/plugins/cmp.lua | 64 -------- lua/nvchad/plugins/init.lua | 148 ++++++++++++++++++ lua/nvchad/plugins/lsp.lua | 7 - lua/nvchad/plugins/mason.lua | 45 ------ lua/nvchad/plugins/telescope.lua | 80 ---------- lua/nvchad/plugins/treesitter.lua | 23 --- lua/nvchad/plugins/ui.lua | 51 +++--- 17 files changed, 300 insertions(+), 278 deletions(-) delete mode 100644 .gitignore delete mode 100644 .ignore rename lua/nvchad/{plugins => configs}/gitsigns.lua (75%) rename lua/nvchad/configs/{lazy.lua => lazy_nvim.lua} (100%) create mode 100644 lua/nvchad/configs/luasnip.lua create mode 100644 lua/nvchad/configs/mason.lua rename lua/nvchad/{plugins => configs}/nvimtree.lua (87%) create mode 100644 lua/nvchad/configs/telescope.lua create mode 100644 lua/nvchad/configs/treesitter.lua delete mode 100644 lua/nvchad/plugins/cmp.lua create mode 100644 lua/nvchad/plugins/init.lua delete mode 100644 lua/nvchad/plugins/lsp.lua delete mode 100644 lua/nvchad/plugins/mason.lua delete mode 100644 lua/nvchad/plugins/telescope.lua delete mode 100644 lua/nvchad/plugins/treesitter.lua diff --git a/.gitignore b/.gitignore deleted file mode 100644 index d8a93d9..0000000 --- a/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -plugin -custom -spell -ftplugin -syntax -coc-settings.json -.luarc.json -lazy-lock.json -after -**/.DS_Store diff --git a/.ignore b/.ignore deleted file mode 100644 index 42677fb..0000000 --- a/.ignore +++ /dev/null @@ -1 +0,0 @@ -!/lua/custom/ diff --git a/lua/nvchad/plugins/gitsigns.lua b/lua/nvchad/configs/gitsigns.lua similarity index 75% rename from lua/nvchad/plugins/gitsigns.lua rename to lua/nvchad/configs/gitsigns.lua index ca7c70b..27f3105 100644 --- a/lua/nvchad/plugins/gitsigns.lua +++ b/lua/nvchad/configs/gitsigns.lua @@ -23,13 +23,4 @@ local options = { end, } -return { - "lewis6991/gitsigns.nvim", - event = "User FilePost", - opts = options, - - config = function(_, opts) - dofile(vim.g.base46_cache .. "git") - require("gitsigns").setup(opts) - end, -} +return options diff --git a/lua/nvchad/configs/lazy.lua b/lua/nvchad/configs/lazy_nvim.lua similarity index 100% rename from lua/nvchad/configs/lazy.lua rename to lua/nvchad/configs/lazy_nvim.lua diff --git a/lua/nvchad/configs/lspconfig.lua b/lua/nvchad/configs/lspconfig.lua index 3eb71a1..1b5adc9 100644 --- a/lua/nvchad/configs/lspconfig.lua +++ b/lua/nvchad/configs/lspconfig.lua @@ -22,7 +22,7 @@ M.on_attach = function(client, bufnr) map("n", "gd", vim.lsp.buf.definition, opts "Lsp Go to definition") map("n", "K", vim.lsp.buf.hover, opts "Lsp hover information") map("n", "gi", vim.lsp.buf.implementation, opts "Lsp Go to implementation") - map("n", "", vim.lsp.buf.signature_help, opts "Lsp Show signature help") + map("n", "sh", vim.lsp.buf.signature_help, opts "Lsp Show signature help") map("n", "wa", vim.lsp.buf.add_workspace_folder, opts "Lsp Add workspace folder") map("n", "wr", vim.lsp.buf.remove_workspace_folder, opts "Lsp Remove workspace folder") diff --git a/lua/nvchad/configs/luasnip.lua b/lua/nvchad/configs/luasnip.lua new file mode 100644 index 0000000..f40672d --- /dev/null +++ b/lua/nvchad/configs/luasnip.lua @@ -0,0 +1,23 @@ +-- vscode format +require("luasnip.loaders.from_vscode").lazy_load() +require("luasnip.loaders.from_vscode").lazy_load { paths = "your path!" } +require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" } + +-- snipmate format +require("luasnip.loaders.from_snipmate").load() +require("luasnip.loaders.from_snipmate").lazy_load { paths = vim.g.snipmate_snippets_path or "" } + +-- lua format +require("luasnip.loaders.from_lua").load() +require("luasnip.loaders.from_lua").lazy_load { paths = vim.g.lua_snippets_path or "" } + +vim.api.nvim_create_autocmd("InsertLeave", { + callback = function() + if + require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()] + and not require("luasnip").session.jump_active + then + require("luasnip").unlink_current() + end + end, +}) diff --git a/lua/nvchad/configs/mason.lua b/lua/nvchad/configs/mason.lua new file mode 100644 index 0000000..3692a15 --- /dev/null +++ b/lua/nvchad/configs/mason.lua @@ -0,0 +1,28 @@ +local options = { + ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim + + PATH = "skip", + + ui = { + icons = { + package_pending = " ", + package_installed = "󰄳 ", + package_uninstalled = " 󰚌", + }, + + keymaps = { + toggle_server_expand = "", + install_server = "i", + update_server = "u", + check_server_version = "c", + update_all_servers = "U", + check_outdated_servers = "C", + uninstall_server = "X", + cancel_installation = "", + }, + }, + + max_concurrent_installers = 10, +} + +return options diff --git a/lua/nvchad/plugins/nvimtree.lua b/lua/nvchad/configs/nvimtree.lua similarity index 87% rename from lua/nvchad/plugins/nvimtree.lua rename to lua/nvchad/configs/nvimtree.lua index cf8bdb0..c54248e 100644 --- a/lua/nvchad/plugins/nvimtree.lua +++ b/lua/nvchad/configs/nvimtree.lua @@ -74,12 +74,4 @@ local options = { }, } -return { - "nvim-tree/nvim-tree.lua", - cmd = { "NvimTreeToggle", "NvimTreeFocus" }, - opts = options, - config = function(_, opts) - dofile(vim.g.base46_cache .. "nvimtree") - require("nvim-tree").setup(opts) - end, -} +return options diff --git a/lua/nvchad/configs/telescope.lua b/lua/nvchad/configs/telescope.lua new file mode 100644 index 0000000..0df500e --- /dev/null +++ b/lua/nvchad/configs/telescope.lua @@ -0,0 +1,63 @@ +local options = { + defaults = { + vimgrep_arguments = { + "rg", + "-L", + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + "--smart-case", + }, + prompt_prefix = "  ", + selection_caret = " ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "ascending", + layout_strategy = "horizontal", + layout_config = { + horizontal = { + prompt_position = "top", + preview_width = 0.55, + results_width = 0.8, + }, + vertical = { + mirror = false, + }, + width = 0.87, + height = 0.80, + preview_cutoff = 120, + }, + file_sorter = require("telescope.sorters").get_fuzzy_file, + file_ignore_patterns = { "node_modules" }, + generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, + path_display = { "truncate" }, + winblend = 0, + border = {}, + borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, + color_devicons = true, + set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, + file_previewer = require("telescope.previewers").vim_buffer_cat.new, + grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, + qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, + -- Developer configurations: Not meant for general override + buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, + mappings = { + n = { ["q"] = require("telescope.actions").close }, + }, + }, + + extensions_list = { "themes", "terms" }, + extensions = { + fzf = { + fuzzy = true, + override_generic_sorter = true, + override_file_sorter = true, + case_mode = "smart_case", + }, + }, +} + +return options diff --git a/lua/nvchad/configs/treesitter.lua b/lua/nvchad/configs/treesitter.lua new file mode 100644 index 0000000..897c4e3 --- /dev/null +++ b/lua/nvchad/configs/treesitter.lua @@ -0,0 +1,12 @@ +local options = { + ensure_installed = { "lua", "vim", "vimdoc" }, + + highlight = { + enable = true, + use_languagetree = true, + }, + + indent = { enable = true }, +} + +return options diff --git a/lua/nvchad/plugins/cmp.lua b/lua/nvchad/plugins/cmp.lua deleted file mode 100644 index 44fb8be..0000000 --- a/lua/nvchad/plugins/cmp.lua +++ /dev/null @@ -1,64 +0,0 @@ -return { - "hrsh7th/nvim-cmp", - event = "InsertEnter", - - opts = function() - return require "nvchad.configs.cmp" - end, - - config = function(_, opts) - require("cmp").setup(opts) - end, - - dependencies = { - { - -- snippet plugin - "L3MON4D3/LuaSnip", - dependencies = "rafamadriz/friendly-snippets", - opts = { history = true, updateevents = "TextChanged,TextChangedI" }, - config = function(_, opts) - require("luasnip").config.set_config(opts) - - require("luasnip.loaders.from_vscode").lazy_load() - require("luasnip.loaders.from_snipmate").load() - require("luasnip.loaders.from_lua").load() - - vim.api.nvim_create_autocmd("InsertLeave", { - callback = function() - if - require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()] - and not require("luasnip").session.jump_active - then - require("luasnip").unlink_current() - end - end, - }) - end, - }, - - -- autopairing of (){}[] etc - { - "windwp/nvim-autopairs", - opts = { - fast_wrap = {}, - disable_filetype = { "TelescopePrompt", "vim" }, - }, - config = function(_, opts) - require("nvim-autopairs").setup(opts) - - -- setup cmp for autopairs - local cmp_autopairs = require "nvim-autopairs.completion.cmp" - require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done()) - end, - }, - - -- cmp sources plugins - { - "saadparwaiz1/cmp_luasnip", - "hrsh7th/cmp-nvim-lua", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - }, - }, -} diff --git a/lua/nvchad/plugins/init.lua b/lua/nvchad/plugins/init.lua new file mode 100644 index 0000000..7785c48 --- /dev/null +++ b/lua/nvchad/plugins/init.lua @@ -0,0 +1,148 @@ +return { + + "nvim-lua/plenary.nvim", + + { + "nvim-treesitter/nvim-treesitter", + event = { "BufReadPost", "BufNewFile" }, + cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" }, + build = ":TSUpdate", + opts = function() + return require "nvchad.configs.treesitter" + end, + config = function(_, opts) + dofile(vim.g.base46_cache .. "syntax") + dofile(vim.g.base46_cache .. "treesitter") + require("nvim-treesitter.configs").setup(opts) + end, + }, + + -- git stuff + { + "lewis6991/gitsigns.nvim", + event = "User FilePost", + opts = function() + return require "nvchad.configs.gitsigns" + end, + config = function(_, opts) + dofile(vim.g.base46_cache .. "git") + require("gitsigns").setup(opts) + end, + }, + + -- lsp stuff + { + "williamboman/mason.nvim", + cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUpdate" }, + opts = function() + return require "nvchad.configs.mason" + end, + config = function(_, opts) + dofile(vim.g.base46_cache .. "mason") + require("mason").setup(opts) + + -- custom nvchad cmd to install all mason binaries listed + vim.api.nvim_create_user_command("MasonInstallAll", function() + if opts.ensure_installed and #opts.ensure_installed > 0 then + vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " ")) + end + end, {}) + + vim.g.mason_binaries_list = opts.ensure_installed + end, + }, + + { + "neovim/nvim-lspconfig", + event = "User FilePost", + config = function() + require("nvchad.configs.lspconfig").defaults() + end, + }, + + -- load luasnips + cmp related in insert mode only + { + "hrsh7th/nvim-cmp", + event = "InsertEnter", + dependencies = { + { + -- snippet plugin + "L3MON4D3/LuaSnip", + dependencies = "rafamadriz/friendly-snippets", + opts = { history = true, updateevents = "TextChanged,TextChangedI" }, + config = function(_, opts) + require("luasnip").config.set_config(opts) + require "nvchad.configs.luasnip" + end, + }, + + -- autopairing of (){}[] etc + { + "windwp/nvim-autopairs", + opts = { + fast_wrap = {}, + disable_filetype = { "TelescopePrompt", "vim" }, + }, + config = function(_, opts) + require("nvim-autopairs").setup(opts) + + -- setup cmp for autopairs + local cmp_autopairs = require "nvim-autopairs.completion.cmp" + require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done()) + end, + }, + + -- cmp sources plugins + { + "saadparwaiz1/cmp_luasnip", + "hrsh7th/cmp-nvim-lua", + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + }, + }, + opts = function() + return require "nvchad.configs.cmp" + end, + config = function(_, opts) + require("cmp").setup(opts) + end, + }, + + { + "numToStr/Comment.nvim", + keys = { + { "gcc", mode = "n", desc = "Comment toggle current line" }, + { "gc", mode = { "n", "o" }, desc = "Comment toggle linewise" }, + { "gc", mode = "x", desc = "Comment toggle linewise (visual)" }, + { "gbc", mode = "n", desc = "Comment toggle current block" }, + { "gb", mode = { "n", "o" }, desc = "Comment toggle blockwise" }, + { "gb", mode = "x", desc = "Comment toggle blockwise (visual)" }, + }, + init = function() + vim.g.comment_maps = true + end, + config = function(_, opts) + require("Comment").setup(opts) + end, + }, + + { + "nvim-telescope/telescope.nvim", + dependencies = { "nvim-treesitter/nvim-treesitter" }, + cmd = "Telescope", + opts = function() + return require "nvchad.configs.telescope" + end, + config = function(_, opts) + dofile(vim.g.base46_cache .. "telescope") + local telescope = require "telescope" + telescope.setup(opts) + + -- load extensions + for _, ext in ipairs(opts.extensions_list) do + telescope.load_extension(ext) + end + end, + }, +} diff --git a/lua/nvchad/plugins/lsp.lua b/lua/nvchad/plugins/lsp.lua deleted file mode 100644 index e42fa1a..0000000 --- a/lua/nvchad/plugins/lsp.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "neovim/nvim-lspconfig", - event = "User FilePost", - config = function() - require("nvchad.configs.lspconfig").defaults() - end, -} diff --git a/lua/nvchad/plugins/mason.lua b/lua/nvchad/plugins/mason.lua deleted file mode 100644 index 9f8248f..0000000 --- a/lua/nvchad/plugins/mason.lua +++ /dev/null @@ -1,45 +0,0 @@ -local options = { - ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim - - PATH = "skip", - - ui = { - icons = { - package_pending = " ", - package_installed = "󰄳 ", - package_uninstalled = " 󰚌", - }, - - keymaps = { - toggle_server_expand = "", - install_server = "i", - update_server = "u", - check_server_version = "c", - update_all_servers = "U", - check_outdated_servers = "C", - uninstall_server = "X", - cancel_installation = "", - }, - }, - - max_concurrent_installers = 10, -} - -return { - "williamboman/mason.nvim", - cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUpdate" }, - opts = options, - config = function(_, opts) - dofile(vim.g.base46_cache .. "mason") - require("mason").setup(opts) - - -- custom nvchad cmd to install all mason binaries listed - vim.api.nvim_create_user_command("MasonInstallAll", function() - if opts.ensure_installed and #opts.ensure_installed > 0 then - vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " ")) - end - end, {}) - - vim.g.mason_binaries_list = opts.ensure_installed - end, -} diff --git a/lua/nvchad/plugins/telescope.lua b/lua/nvchad/plugins/telescope.lua deleted file mode 100644 index c441438..0000000 --- a/lua/nvchad/plugins/telescope.lua +++ /dev/null @@ -1,80 +0,0 @@ -return { - "nvim-telescope/telescope.nvim", - dependencies = { "nvim-treesitter/nvim-treesitter" }, - cmd = "Telescope", - opts = function() - local options = { - defaults = { - vimgrep_arguments = { - "rg", - "-L", - "--color=never", - "--no-heading", - "--with-filename", - "--line-number", - "--column", - "--smart-case", - }, - prompt_prefix = "  ", - selection_caret = " ", - entry_prefix = " ", - initial_mode = "insert", - selection_strategy = "reset", - sorting_strategy = "ascending", - layout_strategy = "horizontal", - layout_config = { - horizontal = { - prompt_position = "top", - preview_width = 0.55, - results_width = 0.8, - }, - vertical = { - mirror = false, - }, - width = 0.87, - height = 0.80, - preview_cutoff = 120, - }, - file_sorter = require("telescope.sorters").get_fuzzy_file, - file_ignore_patterns = { "node_modules" }, - generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, - path_display = { "truncate" }, - winblend = 0, - border = {}, - borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, - color_devicons = true, - set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, - file_previewer = require("telescope.previewers").vim_buffer_cat.new, - grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, - qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, - -- Developer configurations: Not meant for general override - buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, - mappings = { - n = { ["q"] = require("telescope.actions").close }, - }, - }, - - extensions_list = { "themes", "terms" }, - extensions = { - fzf = { - fuzzy = true, - override_generic_sorter = true, - override_file_sorter = true, - case_mode = "smart_case", - }, - }, - } - - return options - end, - config = function(_, opts) - dofile(vim.g.base46_cache .. "telescope") - local telescope = require "telescope" - telescope.setup(opts) - - -- load extensions - for _, ext in ipairs(opts.extensions_list) do - telescope.load_extension(ext) - end - end, -} diff --git a/lua/nvchad/plugins/treesitter.lua b/lua/nvchad/plugins/treesitter.lua deleted file mode 100644 index d940c95..0000000 --- a/lua/nvchad/plugins/treesitter.lua +++ /dev/null @@ -1,23 +0,0 @@ -local config = { - ensure_installed = { "lua", "vim", "vimdoc" }, - - highlight = { - enable = true, - use_languagetree = true, - }, - - indent = { enable = true }, -} - -return { - "nvim-treesitter/nvim-treesitter", - event = { "BufReadPost", "BufNewFile" }, - cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" }, - build = ":TSUpdate", - opts = config, - config = function(_, opts) - dofile(vim.g.base46_cache .. "syntax") - dofile(vim.g.base46_cache .. "treesitter") - require("nvim-treesitter.configs").setup(opts) - end, -} diff --git a/lua/nvchad/plugins/ui.lua b/lua/nvchad/plugins/ui.lua index 0c5fad3..34a6a97 100644 --- a/lua/nvchad/plugins/ui.lua +++ b/lua/nvchad/plugins/ui.lua @@ -1,5 +1,4 @@ return { - "nvim-lua/plenary.nvim", { "NvChad/base46", @@ -42,40 +41,13 @@ return { end, }, - { - "folke/which-key.nvim", - keys = { "", "", "", '"', "'", "`", "c", "v", "g" }, - cmd = "WhichKey", - config = function(_, opts) - dofile(vim.g.base46_cache .. "whichkey") - require("which-key").setup(opts) - end, - }, - - { - "numToStr/Comment.nvim", - keys = { - { "gcc", mode = "n", desc = "Comment toggle current line" }, - { "gc", mode = { "n", "o" }, desc = "Comment toggle linewise" }, - { "gc", mode = "x", desc = "Comment toggle linewise (visual)" }, - { "gbc", mode = "n", desc = "Comment toggle current block" }, - { "gb", mode = { "n", "o" }, desc = "Comment toggle blockwise" }, - { "gb", mode = "x", desc = "Comment toggle blockwise (visual)" }, - }, - config = function(_, opts) - require("Comment").setup(opts) - end, - }, - { "lukas-reineke/indent-blankline.nvim", event = "User FilePost", - opts = { indent = { char = "│", highlight = "IblChar" }, scope = { char = "│", highlight = "IblScopeChar" }, }, - config = function(_, opts) dofile(vim.g.base46_cache .. "blankline") @@ -84,4 +56,27 @@ return { require("ibl").setup(opts) end, }, + + -- file managing , picker etc + { + "nvim-tree/nvim-tree.lua", + cmd = { "NvimTreeToggle", "NvimTreeFocus" }, + opts = function() + return require "nvchad.configs.nvimtree" + end, + config = function(_, opts) + dofile(vim.g.base46_cache .. "nvimtree") + require("nvim-tree").setup(opts) + end, + }, + + { + "folke/which-key.nvim", + keys = { "", "", "", '"', "'", "`", "c", "v", "g" }, + cmd = "WhichKey", + config = function(_, opts) + dofile(vim.g.base46_cache .. "whichkey") + require("which-key").setup(opts) + end, + }, } From b17c4d9e86bceba7ddfcb9ee3f0b4f7db3989b3b Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 4 Mar 2024 11:56:40 +0530 Subject: [PATCH 1508/1541] mv nvconfig to lua/ --- lua/nvchad/autocmds.lua | 2 +- lua/nvchad/configs/mason.lua | 2 +- lua/nvchad/plugins/ui.lua | 2 +- lua/{nvchad => }/nvconfig.lua | 14 ++++---------- 4 files changed, 7 insertions(+), 13 deletions(-) rename lua/{nvchad => }/nvconfig.lua (90%) diff --git a/lua/nvchad/autocmds.lua b/lua/nvchad/autocmds.lua index 42c964a..0e6260a 100644 --- a/lua/nvchad/autocmds.lua +++ b/lua/nvchad/autocmds.lua @@ -12,7 +12,7 @@ autocmd("FileType", { autocmd("BufWritePost", { pattern = vim.tbl_map(function(path) return vim.fs.normalize(vim.loop.fs_realpath(path)) - end, vim.fn.glob(vim.fn.stdpath "config" .. "/lua/custom/**/*.lua", true, true, true)), + end, vim.fn.glob(vim.fn.stdpath "config" .. "/lua/**/*.lua", true, true, true)), group = vim.api.nvim_create_augroup("ReloadNvChad", {}), callback = function(opts) diff --git a/lua/nvchad/configs/mason.lua b/lua/nvchad/configs/mason.lua index 3692a15..a87f593 100644 --- a/lua/nvchad/configs/mason.lua +++ b/lua/nvchad/configs/mason.lua @@ -1,5 +1,5 @@ local options = { - ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim + ensure_installed = { "lua-language-server", 'stylua' }, -- not an option from mason.nvim PATH = "skip", diff --git a/lua/nvchad/plugins/ui.lua b/lua/nvchad/plugins/ui.lua index 34a6a97..29a6081 100644 --- a/lua/nvchad/plugins/ui.lua +++ b/lua/nvchad/plugins/ui.lua @@ -10,7 +10,7 @@ return { { "NvChad/ui", - branch = "v3.0", + branch = "starter", lazy = false, config = function() require "nvchad" diff --git a/lua/nvchad/nvconfig.lua b/lua/nvconfig.lua similarity index 90% rename from lua/nvchad/nvconfig.lua rename to lua/nvconfig.lua index 5066ed2..dc4e72c 100644 --- a/lua/nvchad/nvconfig.lua +++ b/lua/nvconfig.lua @@ -25,15 +25,15 @@ M.ui = { -- default/round/block/arrow separators work only for default statusline theme -- round and block will work for minimal theme only separator_style = "default", - overriden_modules = nil, + order=nil, }, -- lazyload it when there are 1+ buffers tabufline = { - show_numbers = false, enabled = true, lazyload = true, - overriden_modules = nil, + order= {'treeOffset', 'buffers' , 'tabs', 'btns'}, + modules = nil, }, -- nvdash (dashboard) @@ -86,8 +86,6 @@ M.ui = { }, } -M.plugins = "" -- path i.e "custom.plugins", so make custom/plugins.lua file - M.base46 = { integrations = { "blankline", @@ -110,10 +108,6 @@ M.base46 = { }, } -local chadrc_exists, chadrc = pcall(require, "custom.chadrc") - -if chadrc_exists then - M = vim.tbl_deep_extend("force", M, chadrc) -end +M = vim.tbl_deep_extend("force", M, require('chadrc')) return M From 168274038c61083833e11cb8ac6bf325a4756de3 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 4 Mar 2024 22:44:44 +0530 Subject: [PATCH 1509/1541] add nvchad colorscheme in colors/ --- colors/nvchad.lua | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 colors/nvchad.lua diff --git a/colors/nvchad.lua b/colors/nvchad.lua new file mode 100644 index 0000000..d2d98a1 --- /dev/null +++ b/colors/nvchad.lua @@ -0,0 +1,3 @@ +vim.opt.termguicolors = true +dofile(vim.g.base46_cache .. "defaults") +dofile(vim.g.base46_cache .. "statusline") From 6608363bd96e3d495001087a7796dbc7273ab76c Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 5 Mar 2024 08:01:37 +0530 Subject: [PATCH 1510/1541] disable semantic tokens in on_init, in lspconfig.lua --- lua/nvchad/configs/lspconfig.lua | 25 ++++++++++++++----------- lua/nvchad/mappings.lua | 4 ++-- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/lua/nvchad/configs/lspconfig.lua b/lua/nvchad/configs/lspconfig.lua index 1b5adc9..ca2bb87 100644 --- a/lua/nvchad/configs/lspconfig.lua +++ b/lua/nvchad/configs/lspconfig.lua @@ -1,19 +1,9 @@ local M = {} local map = vim.keymap.set +local conf = require("nvconfig").ui.lsp -- export on_attach & capabilities for custom lspconfigs M.on_attach = function(client, bufnr) - local conf = require("nvconfig").ui.lsp - - -- semanticTokens - if not conf.semantic_tokens and client.supports_method "textDocument/semanticTokens" then - client.server_capabilities.semanticTokensProvider = nil - end - - if conf.signature and client.server_capabilities.signatureHelpProvider then - require("nvchad.signature").setup(client, bufnr) - end - local function opts(desc) return { buffer = bufnr, desc = desc } end @@ -38,6 +28,18 @@ M.on_attach = function(client, bufnr) map({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts "Lsp Code action") map("n", "gr", vim.lsp.buf.references, opts "Lsp Show references") + + -- setup signature popup + if conf.signature and client.server_capabilities.signatureHelpProvider then + require("nvchad.signature").setup(client, bufnr) + end +end + +-- disable semanticTokens +M.on_init = function(client, _) + if not conf.semantic_tokens and client.supports_method "textDocument/semanticTokens" then + client.server_capabilities.semanticTokensProvider = nil + end end M.capabilities = vim.lsp.protocol.make_client_capabilities() @@ -67,6 +69,7 @@ M.defaults = function() require("lspconfig").lua_ls.setup { on_attach = M.on_attach, capabilities = M.capabilities, + on_init = M.on_init, settings = { Lua = { diff --git a/lua/nvchad/mappings.lua b/lua/nvchad/mappings.lua index ba80b4f..2c06e88 100644 --- a/lua/nvchad/mappings.lua +++ b/lua/nvchad/mappings.lua @@ -54,7 +54,7 @@ end, { desc = "Comment Toggle" }) map( "v", "/", - ":lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", + "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", { desc = "Comment Toggle" } ) @@ -132,4 +132,4 @@ map("n", "cc", function() end end, { desc = "Blankline Jump to current context" }) -pcall(require, "custom.mappings") +require "custom.mappings" From f6af7e8a29c967af37239f0ac572d8384a8bcb13 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 5 Mar 2024 08:04:07 +0530 Subject: [PATCH 1511/1541] rm un-needed require --- lua/nvchad/mappings.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/nvchad/mappings.lua b/lua/nvchad/mappings.lua index 2c06e88..ee2e0a5 100644 --- a/lua/nvchad/mappings.lua +++ b/lua/nvchad/mappings.lua @@ -131,5 +131,3 @@ map("n", "cc", function() end end end, { desc = "Blankline Jump to current context" }) - -require "custom.mappings" From c4db8736ce62afa9adff9810d4b41a9597021eb3 Mon Sep 17 00:00:00 2001 From: Sidhanth Rathod Date: Tue, 5 Mar 2024 08:10:54 +0530 Subject: [PATCH 1512/1541] rm useless command --- lua/nvchad/autocmds.lua | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lua/nvchad/autocmds.lua b/lua/nvchad/autocmds.lua index 0e6260a..3fadcac 100644 --- a/lua/nvchad/autocmds.lua +++ b/lua/nvchad/autocmds.lua @@ -69,10 +69,3 @@ vim.api.nvim_create_autocmd({ "UIEnter", "BufReadPost", "BufNewFile" }, { end end, }) - --------------------------------------- commands ------------------------------------------ -local new_cmd = vim.api.nvim_create_user_command - -new_cmd("NvChadUpdate", function() - require "nvchad.updater"() -end, {}) From 2282f9d338c74a3b545b533219a0fcc185b20113 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 5 Mar 2024 21:36:34 +0530 Subject: [PATCH 1513/1541] rm termguicolors opt as its loaded in base46 --- colors/nvchad.lua | 1 - lua/nvchad/options.lua | 1 - 2 files changed, 2 deletions(-) diff --git a/colors/nvchad.lua b/colors/nvchad.lua index d2d98a1..f35cc9b 100644 --- a/colors/nvchad.lua +++ b/colors/nvchad.lua @@ -1,3 +1,2 @@ -vim.opt.termguicolors = true dofile(vim.g.base46_cache .. "defaults") dofile(vim.g.base46_cache .. "statusline") diff --git a/lua/nvchad/options.lua b/lua/nvchad/options.lua index b7e5ad0..e623668 100644 --- a/lua/nvchad/options.lua +++ b/lua/nvchad/options.lua @@ -36,7 +36,6 @@ opt.shortmess:append "sI" opt.signcolumn = "yes" opt.splitbelow = true opt.splitright = true -opt.termguicolors = true opt.timeoutlen = 400 opt.undofile = true From 634f6d55dee15ccd44a7a3c7f706a0c8151584ed Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 7 Mar 2024 06:50:13 +0530 Subject: [PATCH 1514/1541] update some module paths --- lua/nvchad/configs/lspconfig.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/nvchad/configs/lspconfig.lua b/lua/nvchad/configs/lspconfig.lua index ca2bb87..321a8f3 100644 --- a/lua/nvchad/configs/lspconfig.lua +++ b/lua/nvchad/configs/lspconfig.lua @@ -23,7 +23,7 @@ M.on_attach = function(client, bufnr) map("n", "D", vim.lsp.buf.type_definition, opts "Lsp Go to type definition") map("n", "ra", function() - require "nvchad.renamer"() + require "nvchad.lsp.renamer"() end, opts "Lsp NvRenamer") map({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts "Lsp Code action") @@ -31,7 +31,7 @@ M.on_attach = function(client, bufnr) -- setup signature popup if conf.signature and client.server_capabilities.signatureHelpProvider then - require("nvchad.signature").setup(client, bufnr) + require("nvchad.lsp.signature").setup(client, bufnr) end end From 2cf989cf3183872530ccbe1916a3a0efd3c83d02 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 8 Mar 2024 19:46:31 +0530 Subject: [PATCH 1515/1541] rm useless term option --- lua/nvchad/mappings.lua | 6 ++++-- lua/nvconfig.lua | 11 +++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lua/nvchad/mappings.lua b/lua/nvchad/mappings.lua index ee2e0a5..3bd56cf 100644 --- a/lua/nvchad/mappings.lua +++ b/lua/nvchad/mappings.lua @@ -84,20 +84,22 @@ map( -- terminal map("t", "", "", { desc = "Terminal Escape terminal mode" }) +-- new terminals map("n", "h", function() require("nvchad.term").new { pos = "sp", size = 0.3 } end, { desc = "Terminal New horizontal term" }) map("n", "v", function() require("nvchad.term").new { pos = "vsp", size = 0.3 } -end, { desc = "Terminal New vertical term" }) +end, { desc = "Terminal New vertical window" }) +-- toggleable map({ "n", "t" }, "", function() require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm", size = 0.3 } end, { desc = "Terminal Toggleable vertical term" }) map({ "n", "t" }, "", function() - require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm", size = 0.2 } + require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm", size = 0.3 } end, { desc = "Terminal New horizontal term" }) map({ "n", "t" }, "", function() diff --git a/lua/nvconfig.lua b/lua/nvconfig.lua index dc4e72c..2f5b8c1 100644 --- a/lua/nvconfig.lua +++ b/lua/nvconfig.lua @@ -25,14 +25,14 @@ M.ui = { -- default/round/block/arrow separators work only for default statusline theme -- round and block will work for minimal theme only separator_style = "default", - order=nil, + order = nil, }, -- lazyload it when there are 1+ buffers tabufline = { enabled = true, lazyload = true, - order= {'treeOffset', 'buffers' , 'tabs', 'btns'}, + order = { "treeOffset", "buffers", "tabs", "btns" }, modules = nil, }, @@ -80,9 +80,6 @@ M.ui = { height = 0.4, border = "single", }, - behavior = { - auto_insert = true, - }, }, } @@ -108,6 +105,4 @@ M.base46 = { }, } -M = vim.tbl_deep_extend("force", M, require('chadrc')) - -return M +return vim.tbl_deep_extend("force", M, require('chadrc')) From 166bb9bebaa5e1fc555c886bdf7a72e83e8b00bf Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 9 Mar 2024 13:00:51 +0530 Subject: [PATCH 1516/1541] rm some useless comments --- lua/nvconfig.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lua/nvconfig.lua b/lua/nvconfig.lua index 2f5b8c1..02b9440 100644 --- a/lua/nvconfig.lua +++ b/lua/nvconfig.lua @@ -10,7 +10,6 @@ M.ui = { theme = "onedark", -- default theme transparency = false, - -- cmp themeing cmp = { icons = true, lspkind_text = true, @@ -26,6 +25,7 @@ M.ui = { -- round and block will work for minimal theme only separator_style = "default", order = nil, + modules = nil, }, -- lazyload it when there are 1+ buffers @@ -36,7 +36,6 @@ M.ui = { modules = nil, }, - -- nvdash (dashboard) nvdash = { load_on_startup = false, @@ -70,7 +69,7 @@ M.ui = { }, term = { - hl = "Normal:term,WinSeparator:WinSeparator", + -- hl = "Normal:term,WinSeparator:WinSeparator", sizes = { sp = 0.3, vsp = 0.2 }, float = { relative = "editor", @@ -105,4 +104,4 @@ M.base46 = { }, } -return vim.tbl_deep_extend("force", M, require('chadrc')) +return vim.tbl_deep_extend("force", M, require "chadrc") From bbc2cbaae65881f6d505fd8a6ef0e2453f7a3f73 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 9 Mar 2024 15:41:16 +0530 Subject: [PATCH 1517/1541] rm including types in default lspconfig lua_lsp setup --- lua/nvchad/configs/lspconfig.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/nvchad/configs/lspconfig.lua b/lua/nvchad/configs/lspconfig.lua index 321a8f3..3c06d5f 100644 --- a/lua/nvchad/configs/lspconfig.lua +++ b/lua/nvchad/configs/lspconfig.lua @@ -80,8 +80,6 @@ M.defaults = function() library = { [vim.fn.expand "$VIMRUNTIME/lua"] = true, [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true, - [vim.fn.stdpath "data" .. "/lazy/ui/nvchad_types"] = true, - [vim.fn.stdpath "data" .. "/lazy/lazy.nvim/lua/lazy"] = true, }, maxPreload = 100000, preloadFileSize = 10000, From 6b40fb590f9750e209fb8fb78d59d2e89d0748a6 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 9 Mar 2024 18:13:19 +0530 Subject: [PATCH 1518/1541] use vim.o instead of vim.opt for non tb opts --- lua/nvchad/options.lua | 46 +++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/lua/nvchad/options.lua b/lua/nvchad/options.lua index e623668..181987b 100644 --- a/lua/nvchad/options.lua +++ b/lua/nvchad/options.lua @@ -1,46 +1,46 @@ local opt = vim.opt +local o = vim.o local g = vim.g -------------------------------------- globals ----------------------------------------- --- g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" g.toggle_theme_icon = "  " -------------------------------------- options ------------------------------------------ -opt.laststatus = 3 -- global statusline -opt.showmode = false +o.laststatus = 3 +o.showmode = false -opt.clipboard = "unnamedplus" -opt.cursorline = true -opt.cursorlineopt = "number" +o.clipboard = "unnamedplus" +o.cursorline = true +o.cursorlineopt = "number" -- Indenting -opt.expandtab = true -opt.shiftwidth = 2 -opt.smartindent = true -opt.tabstop = 2 -opt.softtabstop = 2 +o.expandtab = true +o.shiftwidth = 2 +o.smartindent = true +o.tabstop = 2 +o.softtabstop = 2 opt.fillchars = { eob = " " } -opt.ignorecase = true -opt.smartcase = true -opt.mouse = "a" +o.ignorecase = true +o.smartcase = true +o.mouse = "a" -- Numbers -opt.number = true -opt.numberwidth = 2 -opt.ruler = false +o.number = true +o.numberwidth = 2 +o.ruler = false -- disable nvim intro opt.shortmess:append "sI" -opt.signcolumn = "yes" -opt.splitbelow = true -opt.splitright = true -opt.timeoutlen = 400 -opt.undofile = true +o.signcolumn = "yes" +o.splitbelow = true +o.splitright = true +o.timeoutlen = 400 +o.undofile = true -- interval for writing swap file to disk, also used by gitsigns -opt.updatetime = 250 +o.updatetime = 250 -- go to previous/next line with h,l,left arrow and right arrow -- when cursor reaches end/beginning of line From 45a1b2c9a8d2f9019d37c1be878f56b5bb3a6218 Mon Sep 17 00:00:00 2001 From: Sidhanth Rathod Date: Sat, 9 Mar 2024 21:32:32 +0530 Subject: [PATCH 1519/1541] Initial commit --- LICENSE | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 + 2 files changed, 676 insertions(+) create mode 100644 LICENSE create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md new file mode 100644 index 0000000..ba26125 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# starter +Starter config for NvChad From aa13916e9411df9e32dfa871116b82a6dcab274a Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 9 Mar 2024 21:33:44 +0530 Subject: [PATCH 1520/1541] add starter config files --- init.lua | 39 ++++++++++++++++++++++++++++++++++ lua/chadrc.lua | 7 ++++++ lua/configs/conform.lua | 9 ++++++++ lua/configs/lazy.lua | 47 +++++++++++++++++++++++++++++++++++++++++ lua/mappings.lua | 13 ++++++++++++ lua/options.lua | 3 +++ lua/plugins/init.lua | 15 +++++++++++++ 7 files changed, 133 insertions(+) create mode 100644 init.lua create mode 100644 lua/chadrc.lua create mode 100644 lua/configs/conform.lua create mode 100644 lua/configs/lazy.lua create mode 100644 lua/mappings.lua create mode 100644 lua/options.lua create mode 100644 lua/plugins/init.lua diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..79254e5 --- /dev/null +++ b/init.lua @@ -0,0 +1,39 @@ +vim.g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" +vim.g.mapleader = " " + +-- bootstrap lazy and all plugins +local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" + +if not vim.loop.fs_stat(lazypath) then + local repo = "https://github.com/folke/lazy.nvim.git" + vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath } +end + +vim.opt.rtp:prepend(lazypath) + +local lazy_config = require "configs.lazy" + +-- load plugins +require("lazy").setup({ + { + "NvChad/NvChad", + lazy = false, + branch = "starter", + import = "nvchad.plugins", + config = function() + require "options" + end, + }, + + { import = "plugins" }, +}, lazy_config) + +-- load theme +dofile(vim.g.base46_cache .. "defaults") +dofile(vim.g.base46_cache .. "statusline") + +require "nvchad.autocmds" + +vim.schedule(function() + require "mappings" +end) diff --git a/lua/chadrc.lua b/lua/chadrc.lua new file mode 100644 index 0000000..1009e74 --- /dev/null +++ b/lua/chadrc.lua @@ -0,0 +1,7 @@ +local M = {} + +M.ui = { + theme = "onedark", +} + +return M diff --git a/lua/configs/conform.lua b/lua/configs/conform.lua new file mode 100644 index 0000000..8660a60 --- /dev/null +++ b/lua/configs/conform.lua @@ -0,0 +1,9 @@ +local options = { + lsp_fallback = true, + + formatters_by_ft = { + lua = { "stylua" }, + }, +} + +require("conform").setup(options) diff --git a/lua/configs/lazy.lua b/lua/configs/lazy.lua new file mode 100644 index 0000000..cd170bd --- /dev/null +++ b/lua/configs/lazy.lua @@ -0,0 +1,47 @@ +return { + defaults = { lazy = true }, + install = { colorscheme = { "nvchad" } }, + + ui = { + icons = { + ft = "", + lazy = "󰂠 ", + loaded = "", + not_loaded = "", + }, + }, + + performance = { + rtp = { + disabled_plugins = { + "2html_plugin", + "tohtml", + "getscript", + "getscriptPlugin", + "gzip", + "logipat", + "netrw", + "netrwPlugin", + "netrwSettings", + "netrwFileHandlers", + "matchit", + "tar", + "tarPlugin", + "rrhelper", + "spellfile_plugin", + "vimball", + "vimballPlugin", + "zip", + "zipPlugin", + "tutor", + "rplugin", + "syntax", + "synmenu", + "optwin", + "compiler", + "bugreport", + "ftplugin", + }, + }, + }, +} diff --git a/lua/mappings.lua b/lua/mappings.lua new file mode 100644 index 0000000..61d10b6 --- /dev/null +++ b/lua/mappings.lua @@ -0,0 +1,13 @@ +require "nvchad.mappings" + +-- add yours here + +local map = vim.keymap.set + +map("n", ";", ":", { desc = "CMD enter command mode" }) + +map("n", "fm", function() + require("conform").format() +end, { desc = "File Format with conform" }) + +map("i", "jk", "", { desc = "Escape insert mode" }) diff --git a/lua/options.lua b/lua/options.lua new file mode 100644 index 0000000..566eb80 --- /dev/null +++ b/lua/options.lua @@ -0,0 +1,3 @@ +require "nvchad.options" + +-- add yours here! diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua new file mode 100644 index 0000000..8efbcdf --- /dev/null +++ b/lua/plugins/init.lua @@ -0,0 +1,15 @@ +return { + { + "stevearc/conform.nvim", + config = function() + require "configs.conform" + end, + }, + + { + "nvim-tree/nvim-tree.lua", + opts = { + git = { enable = true }, + }, + }, +} From 9d47133ba1433b07e1ac9e32fb110851cf1d6368 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 9 Mar 2024 21:36:02 +0530 Subject: [PATCH 1521/1541] update nvchad branch --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 79254e5..1152335 100644 --- a/init.lua +++ b/init.lua @@ -18,7 +18,7 @@ require("lazy").setup({ { "NvChad/NvChad", lazy = false, - branch = "starter", + branch = "v2.5", import = "nvchad.plugins", config = function() require "options" From 6fb5c313edc966f187c7483a16affaec0518b641 Mon Sep 17 00:00:00 2001 From: siduck Date: Sat, 9 Mar 2024 21:37:34 +0530 Subject: [PATCH 1522/1541] update branch for base46/ui plugin --- lua/nvchad/plugins/ui.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/nvchad/plugins/ui.lua b/lua/nvchad/plugins/ui.lua index 29a6081..ae4ed21 100644 --- a/lua/nvchad/plugins/ui.lua +++ b/lua/nvchad/plugins/ui.lua @@ -2,7 +2,7 @@ return { { "NvChad/base46", - branch = "v3.0", + branch = "v2.5", build = function() require("base46").load_all_highlights() end, @@ -10,7 +10,7 @@ return { { "NvChad/ui", - branch = "starter", + branch = "v2.5", lazy = false, config = function() require "nvchad" From 726248c2f337f3b9edb700f6c6d984c59f190da6 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 18 Mar 2024 06:34:01 +0530 Subject: [PATCH 1523/1541] add nvchad_types & .stylua.toml --- .stylua.toml | 6 ++++++ lua/chadrc.lua | 8 +++++++- lua/configs/conform.lua | 10 ++++++++-- lua/configs/lspconfig.lua | 23 +++++++++++++++++++++++ lua/options.lua | 3 +++ lua/plugins/init.lua | 34 ++++++++++++++++++++++++++++------ 6 files changed, 75 insertions(+), 9 deletions(-) create mode 100644 .stylua.toml create mode 100644 lua/configs/lspconfig.lua diff --git a/.stylua.toml b/.stylua.toml new file mode 100644 index 0000000..ecb6dca --- /dev/null +++ b/.stylua.toml @@ -0,0 +1,6 @@ +column_width = 120 +line_endings = "Unix" +indent_type = "Spaces" +indent_width = 2 +quote_style = "AutoPreferDouble" +call_parentheses = "None" diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 1009e74..4fd7cfa 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -1,7 +1,13 @@ +---@type ChadrcConfig local M = {} M.ui = { - theme = "onedark", + theme = "onedark", + + -- hl_override = { + -- Comment = { italic = true }, + -- ["@comment"] = { italic = true }, + -- }, } return M diff --git a/lua/configs/conform.lua b/lua/configs/conform.lua index 8660a60..a000447 100644 --- a/lua/configs/conform.lua +++ b/lua/configs/conform.lua @@ -1,9 +1,15 @@ local options = { - lsp_fallback = true, - formatters_by_ft = { lua = { "stylua" }, + -- css = { "prettier" }, + -- html = { "prettier" }, }, + + -- format_on_save = { + -- -- These options will be passed to conform.format() + -- timeout_ms = 500, + -- lsp_fallback = true, + -- }, } require("conform").setup(options) diff --git a/lua/configs/lspconfig.lua b/lua/configs/lspconfig.lua new file mode 100644 index 0000000..a73657a --- /dev/null +++ b/lua/configs/lspconfig.lua @@ -0,0 +1,23 @@ +-- EXAMPLE +local on_attach = require("nvchad.configs.lspconfig").on_attach +local on_init = require("nvchad.configs.lspconfig").on_init +local capabilities = require("nvchad.configs.lspconfig").capabilities + +local lspconfig = require "lspconfig" +local servers = { "html", "cssls" } + +-- lsps with default config +for _, lsp in ipairs(servers) do + lspconfig[lsp].setup { + on_attach = on_attach, + on_init = on_init, + capabilities = capabilities, + } +end + +-- typescript +lspconfig.tsserver.setup { + on_attach = on_attach, + on_init = on_init, + capabilities = capabilities, +} diff --git a/lua/options.lua b/lua/options.lua index 566eb80..738f20b 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -1,3 +1,6 @@ require "nvchad.options" -- add yours here! + +-- local o = vim.o +-- o.cursorlineopt ='both' -- to enable cursorline! diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 8efbcdf..d3c9688 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,15 +1,37 @@ return { { "stevearc/conform.nvim", + -- event = 'BufWritePre' -- uncomment for format on save config = function() require "configs.conform" end, }, - { - "nvim-tree/nvim-tree.lua", - opts = { - git = { enable = true }, - }, - }, + -- { + -- "neovim/nvim-lspconfig", + -- config = function() + -- require("nvchad.configs.lspconfig").defaults() + -- require "configs.lspconfig" + -- end, + -- }, + + -- { + -- "williamboman/mason.nvim", + -- opts = { + -- ensure_installed = { + -- "lua-language-server", "stylua", + -- "html-lsp", "css-lsp" , "prettier" + -- }, + -- }, + -- }, + -- + -- { + -- "nvim-treesitter/nvim-treesitter", + -- opts = { + -- ensure_installed = { + -- "vim", "lua", "vimdoc + -- "html", "css" + -- }, + -- }, + -- }, } From 70f66adb594e6854eff5d39ccc13030559a75ae6 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 18 Mar 2024 06:41:03 +0530 Subject: [PATCH 1524/1541] rm useless mapping --- lua/mappings.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index 61d10b6..783b78f 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -5,9 +5,6 @@ require "nvchad.mappings" local map = vim.keymap.set map("n", ";", ":", { desc = "CMD enter command mode" }) +map("i", "jk", "") -map("n", "fm", function() - require("conform").format() -end, { desc = "File Format with conform" }) - -map("i", "jk", "", { desc = "Escape insert mode" }) +-- map({ "n", "i", "v" }, "", " w ") From 94dc47f8bb5f6908b4885430146e76e70fd3cb90 Mon Sep 17 00:00:00 2001 From: Sidhanth Rathod Date: Fri, 22 Mar 2024 18:11:04 +0530 Subject: [PATCH 1525/1541] add note in plugins file --- lua/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index d3c9688..a0f5bbf 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -7,6 +7,7 @@ return { end, }, + -- These are some examples, uncomment them if you want to see them work! -- { -- "neovim/nvim-lspconfig", -- config = function() From 813f95e06e0973ed9138e8fd6bee2f54260a70fe Mon Sep 17 00:00:00 2001 From: Sidhanth Rathod Date: Sat, 23 Mar 2024 11:49:07 +0530 Subject: [PATCH 1526/1541] add note about nvconfig in chadrc --- lua/chadrc.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 4fd7cfa..1d841e9 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -1,3 +1,6 @@ +-- This file needs to have same structure as nvconfig.lua +-- https://github.com/NvChad/NvChad/blob/v2.5/lua/nvconfig.lua + ---@type ChadrcConfig local M = {} From 330861bd93503c125d73fdf4a74b211f1ffc2905 Mon Sep 17 00:00:00 2001 From: segyges <65882655+segyges@users.noreply.github.com> Date: Sun, 24 Mar 2024 11:45:42 -0500 Subject: [PATCH 1527/1541] Update init.lua Fix typos in init.lua --- lua/plugins/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index a0f5bbf..ed6e192 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -15,7 +15,7 @@ return { -- require "configs.lspconfig" -- end, -- }, - + -- -- { -- "williamboman/mason.nvim", -- opts = { @@ -30,7 +30,7 @@ return { -- "nvim-treesitter/nvim-treesitter", -- opts = { -- ensure_installed = { - -- "vim", "lua", "vimdoc + -- "vim", "lua", "vimdoc", -- "html", "css" -- }, -- }, From 260c70c9584b707204a0fa098e4930df9a9105f7 Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Tue, 26 Mar 2024 10:44:58 +0100 Subject: [PATCH 1528/1541] add missing comma --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index ed6e192..e62d896 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,7 +1,7 @@ return { { "stevearc/conform.nvim", - -- event = 'BufWritePre' -- uncomment for format on save + -- event = 'BufWritePre', -- uncomment for format on save config = function() require "configs.conform" end, From 5705a6909859f809ab1b02bf1b8f0e35f238290d Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 24 Dec 2023 16:31:08 +0530 Subject: [PATCH 1529/1541] remove telescope fzf extension #2571 --- .gitignore | 10 + .ignore | 1 + init.lua | 22 +- lua/core/bootstrap.lua | 62 ++++ lua/core/default_config.lua | 92 ++++++ lua/core/init.lua | 115 +++++++ lua/core/mappings.lua | 468 +++++++++++++++++++++++++++++ lua/core/utils.lua | 118 ++++++++ lua/plugins/configs/cmp.lua | 120 ++++++++ lua/plugins/configs/lazy_nvim.lua | 47 +++ lua/plugins/configs/lspconfig.lua | 67 +++++ lua/plugins/configs/mason.lua | 28 ++ lua/plugins/configs/nvimtree.lua | 77 +++++ lua/plugins/configs/others.lua | 66 ++++ lua/plugins/configs/telescope.lua | 63 ++++ lua/plugins/configs/treesitter.lua | 12 + lua/plugins/init.lua | 278 +++++++++++++++++ 17 files changed, 1645 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 .ignore create mode 100644 lua/core/bootstrap.lua create mode 100644 lua/core/default_config.lua create mode 100644 lua/core/init.lua create mode 100644 lua/core/mappings.lua create mode 100644 lua/core/utils.lua create mode 100644 lua/plugins/configs/cmp.lua create mode 100644 lua/plugins/configs/lazy_nvim.lua create mode 100644 lua/plugins/configs/lspconfig.lua create mode 100644 lua/plugins/configs/mason.lua create mode 100644 lua/plugins/configs/nvimtree.lua create mode 100644 lua/plugins/configs/others.lua create mode 100644 lua/plugins/configs/telescope.lua create mode 100644 lua/plugins/configs/treesitter.lua create mode 100644 lua/plugins/init.lua diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d8a93d9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +plugin +custom +spell +ftplugin +syntax +coc-settings.json +.luarc.json +lazy-lock.json +after +**/.DS_Store diff --git a/.ignore b/.ignore new file mode 100644 index 0000000..42677fb --- /dev/null +++ b/.ignore @@ -0,0 +1 @@ +!/lua/custom/ diff --git a/init.lua b/init.lua index 3d8a6e5..21f0b6f 100644 --- a/init.lua +++ b/init.lua @@ -1 +1,21 @@ -print('use this along starter!!!') +require "core" + +local custom_init_path = vim.api.nvim_get_runtime_file("lua/custom/init.lua", false)[1] + +if custom_init_path then + dofile(custom_init_path) +end + +require("core.utils").load_mappings() + +local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" + +-- bootstrap lazy.nvim! +if not vim.loop.fs_stat(lazypath) then + require("core.bootstrap").gen_chadrc_template() + require("core.bootstrap").lazy(lazypath) +end + +dofile(vim.g.base46_cache .. "defaults") +vim.opt.rtp:prepend(lazypath) +require "plugins" diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua new file mode 100644 index 0000000..b727ba8 --- /dev/null +++ b/lua/core/bootstrap.lua @@ -0,0 +1,62 @@ +local M = {} +local fn = vim.fn + +M.echo = function(str) + vim.cmd "redraw" + vim.api.nvim_echo({ { str, "Bold" } }, true, {}) +end + +local function shell_call(args) + local output = fn.system(args) + assert(vim.v.shell_error == 0, "External call failed with error code: " .. vim.v.shell_error .. "\n" .. output) +end + +M.lazy = function(install_path) + ------------- base46 --------------- + local lazy_path = fn.stdpath "data" .. "/lazy/base46" + + M.echo " Compiling base46 theme to bytecode ..." + + local base46_repo = "https://github.com/NvChad/base46" + shell_call { "git", "clone", "--depth", "1", "-b", "v2.0", base46_repo, lazy_path } + vim.opt.rtp:prepend(lazy_path) + + require("base46").compile() + + --------- lazy.nvim --------------- + M.echo " Installing lazy.nvim & plugins ..." + local repo = "https://github.com/folke/lazy.nvim.git" + shell_call { "git", "clone", "--filter=blob:none", "--branch=stable", repo, install_path } + vim.opt.rtp:prepend(install_path) + + -- install plugins + require "plugins" + + -- mason packages & show post_bootstrap screen + require "nvchad.post_install"() +end + +M.gen_chadrc_template = function() + local path = fn.stdpath "config" .. "/lua/custom" + + if fn.isdirectory(path) ~= 1 then + local input = fn.input "Do you want to install example custom config? (y/N): " + + if input:lower() == "y" then + M.echo "Cloning example custom config repo..." + shell_call { "git", "clone", "--depth", "1", "https://github.com/NvChad/example_config", path } + fn.delete(path .. "/.git", "rf") + else + -- use very minimal chadrc + fn.mkdir(path, "p") + + local file = io.open(path .. "/chadrc.lua", "w") + if file then + file:write "---@type ChadrcConfig\nlocal M = {}\n\nM.ui = { theme = 'onedark' }\n\nreturn M" + file:close() + end + end + end +end + +return M diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua new file mode 100644 index 0000000..639916a --- /dev/null +++ b/lua/core/default_config.lua @@ -0,0 +1,92 @@ +local M = {} + +M.options = { + nvchad_branch = "v2.0", +} + +M.ui = { + ------------------------------- base46 ------------------------------------- + -- hl = highlights + hl_add = {}, + hl_override = {}, + changed_themes = {}, + theme_toggle = { "onedark", "one_light" }, + theme = "onedark", -- default theme + transparency = false, + lsp_semantic_tokens = false, -- needs nvim v0.9, just adds highlight groups for lsp semantic tokens + + -- https://github.com/NvChad/base46/tree/v2.0/lua/base46/extended_integrations + extended_integrations = {}, -- these aren't compiled by default, ex: "alpha", "notify" + + -- cmp themeing + cmp = { + icons = true, + lspkind_text = true, + style = "default", -- default/flat_light/flat_dark/atom/atom_colored + border_color = "grey_fg", -- only applicable for "default" style, use color names from base30 variables + selected_item_bg = "colored", -- colored / simple + }, + + telescope = { style = "borderless" }, -- borderless / bordered + + ------------------------------- nvchad_ui modules ----------------------------- + statusline = { + theme = "default", -- default/vscode/vscode_colored/minimal + -- default/round/block/arrow separators work only for default statusline theme + -- round and block will work for minimal theme only + separator_style = "default", + overriden_modules = nil, + }, + + -- lazyload it when there are 1+ buffers + tabufline = { + show_numbers = false, + enabled = true, + lazyload = true, + overriden_modules = nil, + }, + + -- nvdash (dashboard) + nvdash = { + load_on_startup = false, + + header = { + " ▄ ▄ ", + " ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ ", + " █ ▄ █▄█ ▄▄▄ █ █▄█ █ █ ", + " ▄▄ █▄█▄▄▄█ █▄█▄█▄▄█▄▄█ █ ", + " ▄ █▄▄█ ▄ ▄▄ ▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ", + " █▄▄▄▄ ▄▄▄ █ ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ █ ▄", + "▄ █ █▄█ █▄█ █ █ █▄█ █ █▄█ ▄▄▄ █ █", + "█▄█ ▄ █▄▄█▄▄█ █ ▄▄█ █ ▄ █ █▄█▄█ █", + " █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █▄█▄▄▄█ ", + }, + + buttons = { + { " Find File", "Spc f f", "Telescope find_files" }, + { "󰈚 Recent Files", "Spc f o", "Telescope oldfiles" }, + { "󰈭 Find Word", "Spc f w", "Telescope live_grep" }, + { " Bookmarks", "Spc m a", "Telescope marks" }, + { " Themes", "Spc t h", "Telescope themes" }, + { " Mappings", "Spc c h", "NvCheatsheet" }, + }, + }, + + cheatsheet = { theme = "grid" }, -- simple/grid + + lsp = { + -- show function signatures i.e args as you type + signature = { + disabled = false, + silent = true, -- silences 'no signature help available' message from appearing + }, + }, +} + +M.plugins = "" -- path i.e "custom.plugins", so make custom/plugins.lua file + +M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startup options + +M.mappings = require "core.mappings" + +return M diff --git a/lua/core/init.lua b/lua/core/init.lua new file mode 100644 index 0000000..19804e1 --- /dev/null +++ b/lua/core/init.lua @@ -0,0 +1,115 @@ +local opt = vim.opt +local g = vim.g +local config = require("core.utils").load_config() + +-------------------------------------- globals ----------------------------------------- +g.nvchad_theme = config.ui.theme +g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" +g.toggle_theme_icon = "  " +g.transparency = config.ui.transparency + +-------------------------------------- options ------------------------------------------ +opt.laststatus = 3 -- global statusline +opt.showmode = false + +opt.clipboard = "unnamedplus" +opt.cursorline = true + +-- Indenting +opt.expandtab = true +opt.shiftwidth = 2 +opt.smartindent = true +opt.tabstop = 2 +opt.softtabstop = 2 + +opt.fillchars = { eob = " " } +opt.ignorecase = true +opt.smartcase = true +opt.mouse = "a" + +-- Numbers +opt.number = true +opt.numberwidth = 2 +opt.ruler = false + +-- disable nvim intro +opt.shortmess:append "sI" + +opt.signcolumn = "yes" +opt.splitbelow = true +opt.splitright = true +opt.termguicolors = true +opt.timeoutlen = 400 +opt.undofile = true + +-- interval for writing swap file to disk, also used by gitsigns +opt.updatetime = 250 + +-- go to previous/next line with h,l,left arrow and right arrow +-- when cursor reaches end/beginning of line +opt.whichwrap:append "<>[]hl" + +g.mapleader = " " + +-- disable some default providers +for _, provider in ipairs { "node", "perl", "python3", "ruby" } do + vim.g["loaded_" .. provider .. "_provider"] = 0 +end + +-- add binaries installed by mason.nvim to path +local is_windows = vim.loop.os_uname().sysname == "Windows_NT" +vim.env.PATH = vim.fn.stdpath "data" .. "/mason/bin" .. (is_windows and ";" or ":") .. vim.env.PATH + +-------------------------------------- autocmds ------------------------------------------ +local autocmd = vim.api.nvim_create_autocmd + +-- dont list quickfix buffers +autocmd("FileType", { + pattern = "qf", + callback = function() + vim.opt_local.buflisted = false + end, +}) + +-- reload some chadrc options on-save +autocmd("BufWritePost", { + pattern = vim.tbl_map(function(path) + return vim.fs.normalize(vim.loop.fs_realpath(path)) + end, vim.fn.glob(vim.fn.stdpath "config" .. "/lua/custom/**/*.lua", true, true, true)), + group = vim.api.nvim_create_augroup("ReloadNvChad", {}), + + callback = function(opts) + local fp = vim.fn.fnamemodify(vim.fs.normalize(vim.api.nvim_buf_get_name(opts.buf)), ":r") --[[@as string]] + local app_name = vim.env.NVIM_APPNAME and vim.env.NVIM_APPNAME or "nvim" + local module = string.gsub(fp, "^.*/" .. app_name .. "/lua/", ""):gsub("/", ".") + + require("plenary.reload").reload_module "base46" + require("plenary.reload").reload_module(module) + require("plenary.reload").reload_module "custom.chadrc" + + config = require("core.utils").load_config() + + vim.g.nvchad_theme = config.ui.theme + vim.g.transparency = config.ui.transparency + + -- statusline + require("plenary.reload").reload_module("nvchad.statusline." .. config.ui.statusline.theme) + vim.opt.statusline = "%!v:lua.require('nvchad.statusline." .. config.ui.statusline.theme .. "').run()" + + -- tabufline + if config.ui.tabufline.enabled then + require("plenary.reload").reload_module "nvchad.tabufline.modules" + vim.opt.tabline = "%!v:lua.require('nvchad.tabufline.modules').run()" + end + + require("base46").load_all_highlights() + -- vim.cmd("redraw!") + end, +}) + +-------------------------------------- commands ------------------------------------------ +local new_cmd = vim.api.nvim_create_user_command + +new_cmd("NvChadUpdate", function() + require "nvchad.updater"() +end, {}) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua new file mode 100644 index 0000000..0a652a7 --- /dev/null +++ b/lua/core/mappings.lua @@ -0,0 +1,468 @@ +-- n, v, i, t = mode names + +local M = {} + +M.general = { + i = { + -- go to beginning and end + [""] = { "^i", "Beginning of line" }, + [""] = { "", "End of line" }, + + -- navigate within insert mode + [""] = { "", "Move left" }, + [""] = { "", "Move right" }, + [""] = { "", "Move down" }, + [""] = { "", "Move up" }, + }, + + n = { + [""] = { " noh ", "Clear highlights" }, + -- switch between windows + [""] = { "h", "Window left" }, + [""] = { "l", "Window right" }, + [""] = { "j", "Window down" }, + [""] = { "k", "Window up" }, + + -- save + [""] = { " w ", "Save file" }, + + -- Copy all + [""] = { " %y+ ", "Copy whole file" }, + + -- line numbers + ["n"] = { " set nu! ", "Toggle line number" }, + ["rn"] = { " set rnu! ", "Toggle relative number" }, + + -- Allow moving the cursor through wrapped lines with j, k, and + -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ + -- empty mode is same as using :map + -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "Move down", opts = { expr = true } }, + ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "Move up", opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "Move up", opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "Move down", opts = { expr = true } }, + + -- new buffer + ["b"] = { " enew ", "New buffer" }, + ["ch"] = { " NvCheatsheet ", "Mapping cheatsheet" }, + + ["fm"] = { + function() + vim.lsp.buf.format { async = true } + end, + "LSP formatting", + }, + }, + + t = { + [""] = { vim.api.nvim_replace_termcodes("", true, true, true), "Escape terminal mode" }, + }, + + v = { + [""] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "Move up", opts = { expr = true } }, + [""] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "Move down", opts = { expr = true } }, + ["<"] = { ""] = { ">gv", "Indent line" }, + }, + + x = { + ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "Move down", opts = { expr = true } }, + ["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "Move up", opts = { expr = true } }, + -- Don't copy the replaced text after pasting in visual mode + -- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste + ["p"] = { 'p:let @+=@0:let @"=@0', "Dont copy replaced text", opts = { silent = true } }, + }, +} + +M.tabufline = { + plugin = true, + + n = { + -- cycle through buffers + [""] = { + function() + require("nvchad.tabufline").tabuflineNext() + end, + "Goto next buffer", + }, + + [""] = { + function() + require("nvchad.tabufline").tabuflinePrev() + end, + "Goto prev buffer", + }, + + -- close buffer + hide terminal buffer + ["x"] = { + function() + require("nvchad.tabufline").close_buffer() + end, + "Close buffer", + }, + }, +} + +M.comment = { + plugin = true, + + -- toggle comment in both modes + n = { + ["/"] = { + function() + require("Comment.api").toggle.linewise.current() + end, + "Toggle comment", + }, + }, + + v = { + ["/"] = { + "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", + "Toggle comment", + }, + }, +} + +M.lspconfig = { + plugin = true, + + -- See ` :help vim.lsp.*` for documentation on any of the below functions + + n = { + ["gD"] = { + function() + vim.lsp.buf.declaration() + end, + "LSP declaration", + }, + + ["gd"] = { + function() + vim.lsp.buf.definition() + end, + "LSP definition", + }, + + ["K"] = { + function() + vim.lsp.buf.hover() + end, + "LSP hover", + }, + + ["gi"] = { + function() + vim.lsp.buf.implementation() + end, + "LSP implementation", + }, + + ["ls"] = { + function() + vim.lsp.buf.signature_help() + end, + "LSP signature help", + }, + + ["D"] = { + function() + vim.lsp.buf.type_definition() + end, + "LSP definition type", + }, + + ["ra"] = { + function() + require("nvchad.renamer").open() + end, + "LSP rename", + }, + + ["ca"] = { + function() + vim.lsp.buf.code_action() + end, + "LSP code action", + }, + + ["gr"] = { + function() + vim.lsp.buf.references() + end, + "LSP references", + }, + + ["lf"] = { + function() + vim.diagnostic.open_float { border = "rounded" } + end, + "Floating diagnostic", + }, + + ["[d"] = { + function() + vim.diagnostic.goto_prev { float = { border = "rounded" } } + end, + "Goto prev", + }, + + ["]d"] = { + function() + vim.diagnostic.goto_next { float = { border = "rounded" } } + end, + "Goto next", + }, + + ["q"] = { + function() + vim.diagnostic.setloclist() + end, + "Diagnostic setloclist", + }, + + ["wa"] = { + function() + vim.lsp.buf.add_workspace_folder() + end, + "Add workspace folder", + }, + + ["wr"] = { + function() + vim.lsp.buf.remove_workspace_folder() + end, + "Remove workspace folder", + }, + + ["wl"] = { + function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end, + "List workspace folders", + }, + }, + + v = { + ["ca"] = { + function() + vim.lsp.buf.code_action() + end, + "LSP code action", + }, + }, +} + +M.nvimtree = { + plugin = true, + + n = { + -- toggle + [""] = { " NvimTreeToggle ", "Toggle nvimtree" }, + + -- focus + ["e"] = { " NvimTreeFocus ", "Focus nvimtree" }, + }, +} + +M.telescope = { + plugin = true, + + n = { + -- find + ["ff"] = { " Telescope find_files ", "Find files" }, + ["fa"] = { " Telescope find_files follow=true no_ignore=true hidden=true ", "Find all" }, + ["fw"] = { " Telescope live_grep ", "Live grep" }, + ["fb"] = { " Telescope buffers ", "Find buffers" }, + ["fh"] = { " Telescope help_tags ", "Help page" }, + ["fo"] = { " Telescope oldfiles ", "Find oldfiles" }, + ["fz"] = { " Telescope current_buffer_fuzzy_find ", "Find in current buffer" }, + + -- git + ["cm"] = { " Telescope git_commits ", "Git commits" }, + ["gt"] = { " Telescope git_status ", "Git status" }, + + -- pick a hidden term + ["pt"] = { " Telescope terms ", "Pick hidden term" }, + + -- theme switcher + ["th"] = { " Telescope themes ", "Nvchad themes" }, + + ["ma"] = { " Telescope marks ", "telescope bookmarks" }, + }, +} + +M.nvterm = { + plugin = true, + + t = { + -- toggle in terminal mode + [""] = { + function() + require("nvterm.terminal").toggle "float" + end, + "Toggle floating term", + }, + + [""] = { + function() + require("nvterm.terminal").toggle "horizontal" + end, + "Toggle horizontal term", + }, + + [""] = { + function() + require("nvterm.terminal").toggle "vertical" + end, + "Toggle vertical term", + }, + }, + + n = { + -- toggle in normal mode + [""] = { + function() + require("nvterm.terminal").toggle "float" + end, + "Toggle floating term", + }, + + [""] = { + function() + require("nvterm.terminal").toggle "horizontal" + end, + "Toggle horizontal term", + }, + + [""] = { + function() + require("nvterm.terminal").toggle "vertical" + end, + "Toggle vertical term", + }, + + -- new + ["h"] = { + function() + require("nvterm.terminal").new "horizontal" + end, + "New horizontal term", + }, + + ["v"] = { + function() + require("nvterm.terminal").new "vertical" + end, + "New vertical term", + }, + }, +} + +M.whichkey = { + plugin = true, + + n = { + ["wK"] = { + function() + vim.cmd "WhichKey" + end, + "Which-key all keymaps", + }, + ["wk"] = { + function() + local input = vim.fn.input "WhichKey: " + vim.cmd("WhichKey " .. input) + end, + "Which-key query lookup", + }, + }, +} + +M.blankline = { + plugin = true, + + n = { + ["cc"] = { + function() + local ok, start = require("indent_blankline.utils").get_current_context( + vim.g.indent_blankline_context_patterns, + vim.g.indent_blankline_use_treesitter_scope + ) + + if ok then + vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start, 0 }) + vim.cmd [[normal! _]] + end + end, + + "Jump to current context", + }, + }, +} + +M.gitsigns = { + plugin = true, + + n = { + -- Navigation through hunks + ["]c"] = { + function() + if vim.wo.diff then + return "]c" + end + vim.schedule(function() + require("gitsigns").next_hunk() + end) + return "" + end, + "Jump to next hunk", + opts = { expr = true }, + }, + + ["[c"] = { + function() + if vim.wo.diff then + return "[c" + end + vim.schedule(function() + require("gitsigns").prev_hunk() + end) + return "" + end, + "Jump to prev hunk", + opts = { expr = true }, + }, + + -- Actions + ["rh"] = { + function() + require("gitsigns").reset_hunk() + end, + "Reset hunk", + }, + + ["ph"] = { + function() + require("gitsigns").preview_hunk() + end, + "Preview hunk", + }, + + ["gb"] = { + function() + package.loaded.gitsigns.blame_line() + end, + "Blame line", + }, + + ["td"] = { + function() + require("gitsigns").toggle_deleted() + end, + "Toggle deleted", + }, + }, +} + +return M diff --git a/lua/core/utils.lua b/lua/core/utils.lua new file mode 100644 index 0000000..8b2a03d --- /dev/null +++ b/lua/core/utils.lua @@ -0,0 +1,118 @@ +local M = {} +local merge_tb = vim.tbl_deep_extend + +M.load_config = function() + local config = require "core.default_config" + local chadrc_path = vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1] + + if chadrc_path then + local chadrc = dofile(chadrc_path) + + config.mappings = M.remove_disabled_keys(chadrc.mappings, config.mappings) + config = merge_tb("force", config, chadrc) + config.mappings.disabled = nil + end + + return config +end + +M.remove_disabled_keys = function(chadrc_mappings, default_mappings) + if not chadrc_mappings then + return default_mappings + end + + -- store keys in a array with true value to compare + local keys_to_disable = {} + for _, mappings in pairs(chadrc_mappings) do + for mode, section_keys in pairs(mappings) do + if not keys_to_disable[mode] then + keys_to_disable[mode] = {} + end + section_keys = (type(section_keys) == "table" and section_keys) or {} + for k, _ in pairs(section_keys) do + keys_to_disable[mode][k] = true + end + end + end + + -- make a copy as we need to modify default_mappings + for section_name, section_mappings in pairs(default_mappings) do + for mode, mode_mappings in pairs(section_mappings) do + mode_mappings = (type(mode_mappings) == "table" and mode_mappings) or {} + for k, _ in pairs(mode_mappings) do + -- if key if found then remove from default_mappings + if keys_to_disable[mode] and keys_to_disable[mode][k] then + default_mappings[section_name][mode][k] = nil + end + end + end + end + + return default_mappings +end + +M.load_mappings = function(section, mapping_opt) + vim.schedule(function() + local function set_section_map(section_values) + if section_values.plugin then + return + end + + section_values.plugin = nil + + for mode, mode_values in pairs(section_values) do + local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {}) + for keybind, mapping_info in pairs(mode_values) do + -- merge default + user opts + local opts = merge_tb("force", default_opts, mapping_info.opts or {}) + + mapping_info.opts, opts.mode = nil, nil + opts.desc = mapping_info[2] + + vim.keymap.set(mode, keybind, mapping_info[1], opts) + end + end + end + + local mappings = require("core.utils").load_config().mappings + + if type(section) == "string" then + mappings[section]["plugin"] = nil + mappings = { mappings[section] } + end + + for _, sect in pairs(mappings) do + set_section_map(sect) + end + end) +end + +M.lazy_load = function(plugin) + vim.api.nvim_create_autocmd({ "BufRead", "BufWinEnter", "BufNewFile" }, { + group = vim.api.nvim_create_augroup("BeLazyOnFileOpen" .. plugin, {}), + callback = function() + local file = vim.fn.expand "%" + local condition = file ~= "NvimTree_1" and file ~= "[lazy]" and file ~= "" + + if condition then + vim.api.nvim_del_augroup_by_name("BeLazyOnFileOpen" .. plugin) + + -- dont defer for treesitter as it will show slow highlighting + -- This deferring only happens only when we do "nvim filename" + if plugin ~= "nvim-treesitter" then + vim.schedule(function() + require("lazy").load { plugins = plugin } + + if plugin == "nvim-lspconfig" then + vim.cmd "silent! do FileType" + end + end, 0) + else + require("lazy").load { plugins = plugin } + end + end + end, + }) +end + +return M diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua new file mode 100644 index 0000000..444da73 --- /dev/null +++ b/lua/plugins/configs/cmp.lua @@ -0,0 +1,120 @@ +local cmp = require "cmp" + +dofile(vim.g.base46_cache .. "cmp") + +local cmp_ui = require("core.utils").load_config().ui.cmp +local cmp_style = cmp_ui.style + +local field_arrangement = { + atom = { "kind", "abbr", "menu" }, + atom_colored = { "kind", "abbr", "menu" }, +} + +local formatting_style = { + -- default fields order i.e completion word + item.kind + item.kind icons + fields = field_arrangement[cmp_style] or { "abbr", "kind", "menu" }, + + format = function(_, item) + local icons = require "nvchad.icons.lspkind" + local icon = (cmp_ui.icons and icons[item.kind]) or "" + + if cmp_style == "atom" or cmp_style == "atom_colored" then + icon = " " .. icon .. " " + item.menu = cmp_ui.lspkind_text and " (" .. item.kind .. ")" or "" + item.kind = icon + else + icon = cmp_ui.lspkind_text and (" " .. icon .. " ") or icon + item.kind = string.format("%s %s", icon, cmp_ui.lspkind_text and item.kind or "") + end + + return item + end, +} + +local function border(hl_name) + return { + { "╭", hl_name }, + { "─", hl_name }, + { "╮", hl_name }, + { "│", hl_name }, + { "╯", hl_name }, + { "─", hl_name }, + { "╰", hl_name }, + { "│", hl_name }, + } +end + +local options = { + completion = { + completeopt = "menu,menuone", + }, + + window = { + completion = { + side_padding = (cmp_style ~= "atom" and cmp_style ~= "atom_colored") and 1 or 0, + winhighlight = "Normal:CmpPmenu,CursorLine:CmpSel,Search:None", + scrollbar = false, + }, + documentation = { + border = border "CmpDocBorder", + winhighlight = "Normal:CmpDoc", + }, + }, + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + + formatting = formatting_style, + + mapping = { + [""] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.close(), + [""] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Insert, + select = true, + }, + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif require("luasnip").expand_or_jumpable() then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") + else + fallback() + end + end, { + "i", + "s", + }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif require("luasnip").jumpable(-1) then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") + else + fallback() + end + end, { + "i", + "s", + }), + }, + sources = { + { name = "nvim_lsp" }, + { name = "luasnip" }, + { name = "buffer" }, + { name = "nvim_lua" }, + { name = "path" }, + }, +} + +if cmp_style ~= "atom" and cmp_style ~= "atom_colored" then + options.window.completion.border = border "CmpBorder" +end + +return options diff --git a/lua/plugins/configs/lazy_nvim.lua b/lua/plugins/configs/lazy_nvim.lua new file mode 100644 index 0000000..cd170bd --- /dev/null +++ b/lua/plugins/configs/lazy_nvim.lua @@ -0,0 +1,47 @@ +return { + defaults = { lazy = true }, + install = { colorscheme = { "nvchad" } }, + + ui = { + icons = { + ft = "", + lazy = "󰂠 ", + loaded = "", + not_loaded = "", + }, + }, + + performance = { + rtp = { + disabled_plugins = { + "2html_plugin", + "tohtml", + "getscript", + "getscriptPlugin", + "gzip", + "logipat", + "netrw", + "netrwPlugin", + "netrwSettings", + "netrwFileHandlers", + "matchit", + "tar", + "tarPlugin", + "rrhelper", + "spellfile_plugin", + "vimball", + "vimballPlugin", + "zip", + "zipPlugin", + "tutor", + "rplugin", + "syntax", + "synmenu", + "optwin", + "compiler", + "bugreport", + "ftplugin", + }, + }, + }, +} diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua new file mode 100644 index 0000000..18e84ad --- /dev/null +++ b/lua/plugins/configs/lspconfig.lua @@ -0,0 +1,67 @@ +dofile(vim.g.base46_cache .. "lsp") +require "nvchad.lsp" + +local M = {} +local utils = require "core.utils" + +-- export on_attach & capabilities for custom lspconfigs + +M.on_attach = function(client, bufnr) + client.server_capabilities.documentFormattingProvider = false + client.server_capabilities.documentRangeFormattingProvider = false + + utils.load_mappings("lspconfig", { buffer = bufnr }) + + if client.server_capabilities.signatureHelpProvider then + require("nvchad.signature").setup(client) + end + + if not utils.load_config().ui.lsp_semantic_tokens and client.supports_method "textDocument/semanticTokens" then + client.server_capabilities.semanticTokensProvider = nil + end +end + +M.capabilities = vim.lsp.protocol.make_client_capabilities() + +M.capabilities.textDocument.completion.completionItem = { + documentationFormat = { "markdown", "plaintext" }, + snippetSupport = true, + preselectSupport = true, + insertReplaceSupport = true, + labelDetailsSupport = true, + deprecatedSupport = true, + commitCharactersSupport = true, + tagSupport = { valueSet = { 1 } }, + resolveSupport = { + properties = { + "documentation", + "detail", + "additionalTextEdits", + }, + }, +} + +require("lspconfig").lua_ls.setup { + on_attach = M.on_attach, + capabilities = M.capabilities, + + settings = { + Lua = { + diagnostics = { + globals = { "vim" }, + }, + workspace = { + library = { + [vim.fn.expand "$VIMRUNTIME/lua"] = true, + [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true, + [vim.fn.stdpath "data" .. "/lazy/ui/nvchad_types"] = true, + [vim.fn.stdpath "data" .. "/lazy/lazy.nvim/lua/lazy"] = true, + }, + maxPreload = 100000, + preloadFileSize = 10000, + }, + }, + }, +} + +return M diff --git a/lua/plugins/configs/mason.lua b/lua/plugins/configs/mason.lua new file mode 100644 index 0000000..3692a15 --- /dev/null +++ b/lua/plugins/configs/mason.lua @@ -0,0 +1,28 @@ +local options = { + ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim + + PATH = "skip", + + ui = { + icons = { + package_pending = " ", + package_installed = "󰄳 ", + package_uninstalled = " 󰚌", + }, + + keymaps = { + toggle_server_expand = "", + install_server = "i", + update_server = "u", + check_server_version = "c", + update_all_servers = "U", + check_outdated_servers = "C", + uninstall_server = "X", + cancel_installation = "", + }, + }, + + max_concurrent_installers = 10, +} + +return options diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua new file mode 100644 index 0000000..b4a8aee --- /dev/null +++ b/lua/plugins/configs/nvimtree.lua @@ -0,0 +1,77 @@ +local options = { + filters = { + dotfiles = false, + exclude = { vim.fn.stdpath "config" .. "/lua/custom" }, + }, + disable_netrw = true, + hijack_netrw = true, + hijack_cursor = true, + hijack_unnamed_buffer_when_opening = false, + sync_root_with_cwd = true, + update_focused_file = { + enable = true, + update_root = false, + }, + view = { + adaptive_size = false, + side = "left", + width = 30, + preserve_window_proportions = true, + }, + git = { + enable = false, + ignore = true, + }, + filesystem_watchers = { + enable = true, + }, + actions = { + open_file = { + resize_window = true, + }, + }, + renderer = { + root_folder_label = false, + highlight_git = false, + highlight_opened_files = "none", + + indent_markers = { + enable = false, + }, + + icons = { + show = { + file = true, + folder = true, + folder_arrow = true, + git = false, + }, + + glyphs = { + default = "󰈚", + symlink = "", + folder = { + default = "", + empty = "", + empty_open = "", + open = "", + symlink = "", + symlink_open = "", + arrow_open = "", + arrow_closed = "", + }, + git = { + unstaged = "✗", + staged = "✓", + unmerged = "", + renamed = "➜", + untracked = "★", + deleted = "", + ignored = "◌", + }, + }, + }, + }, +} + +return options diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua new file mode 100644 index 0000000..dafd5a4 --- /dev/null +++ b/lua/plugins/configs/others.lua @@ -0,0 +1,66 @@ +local M = {} +local utils = require "core.utils" + +M.blankline = { + indentLine_enabled = 1, + filetype_exclude = { + "help", + "terminal", + "lazy", + "lspinfo", + "TelescopePrompt", + "TelescopeResults", + "mason", + "nvdash", + "nvcheatsheet", + "", + }, + buftype_exclude = { "terminal" }, + show_trailing_blankline_indent = false, + show_first_indent_level = false, + show_current_context = true, + show_current_context_start = true, +} + +M.luasnip = function(opts) + require("luasnip").config.set_config(opts) + + -- vscode format + require("luasnip.loaders.from_vscode").lazy_load() + require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" } + + -- snipmate format + require("luasnip.loaders.from_snipmate").load() + require("luasnip.loaders.from_snipmate").lazy_load { paths = vim.g.snipmate_snippets_path or "" } + + -- lua format + require("luasnip.loaders.from_lua").load() + require("luasnip.loaders.from_lua").lazy_load { paths = vim.g.lua_snippets_path or "" } + + vim.api.nvim_create_autocmd("InsertLeave", { + callback = function() + if + require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()] + and not require("luasnip").session.jump_active + then + require("luasnip").unlink_current() + end + end, + }) +end + +M.gitsigns = { + signs = { + add = { text = "│" }, + change = { text = "│" }, + delete = { text = "󰍵" }, + topdelete = { text = "‾" }, + changedelete = { text = "~" }, + untracked = { text = "│" }, + }, + on_attach = function(bufnr) + utils.load_mappings("gitsigns", { buffer = bufnr }) + end, +} + +return M diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua new file mode 100644 index 0000000..0df500e --- /dev/null +++ b/lua/plugins/configs/telescope.lua @@ -0,0 +1,63 @@ +local options = { + defaults = { + vimgrep_arguments = { + "rg", + "-L", + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + "--smart-case", + }, + prompt_prefix = "  ", + selection_caret = " ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "ascending", + layout_strategy = "horizontal", + layout_config = { + horizontal = { + prompt_position = "top", + preview_width = 0.55, + results_width = 0.8, + }, + vertical = { + mirror = false, + }, + width = 0.87, + height = 0.80, + preview_cutoff = 120, + }, + file_sorter = require("telescope.sorters").get_fuzzy_file, + file_ignore_patterns = { "node_modules" }, + generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, + path_display = { "truncate" }, + winblend = 0, + border = {}, + borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, + color_devicons = true, + set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, + file_previewer = require("telescope.previewers").vim_buffer_cat.new, + grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, + qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, + -- Developer configurations: Not meant for general override + buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, + mappings = { + n = { ["q"] = require("telescope.actions").close }, + }, + }, + + extensions_list = { "themes", "terms" }, + extensions = { + fzf = { + fuzzy = true, + override_generic_sorter = true, + override_file_sorter = true, + case_mode = "smart_case", + }, + }, +} + +return options diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua new file mode 100644 index 0000000..b21b55d --- /dev/null +++ b/lua/plugins/configs/treesitter.lua @@ -0,0 +1,12 @@ +local options = { + ensure_installed = { "lua" }, + + highlight = { + enable = true, + use_languagetree = true, + }, + + indent = { enable = true }, +} + +return options diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua new file mode 100644 index 0000000..e081ccf --- /dev/null +++ b/lua/plugins/init.lua @@ -0,0 +1,278 @@ +-- All plugins have lazy=true by default,to load a plugin on startup just lazy=false +-- List of all default plugins & their definitions +local default_plugins = { + + "nvim-lua/plenary.nvim", + + { + "NvChad/base46", + branch = "v2.0", + build = function() + require("base46").load_all_highlights() + end, + }, + + { + "NvChad/ui", + branch = "v2.0", + lazy = false, + }, + + { + "NvChad/nvterm", + init = function() + require("core.utils").load_mappings "nvterm" + end, + config = function(_, opts) + require "base46.term" + require("nvterm").setup(opts) + end, + }, + + { + "NvChad/nvim-colorizer.lua", + init = function() + require("core.utils").lazy_load "nvim-colorizer.lua" + end, + config = function(_, opts) + require("colorizer").setup(opts) + + -- execute colorizer as soon as possible + vim.defer_fn(function() + require("colorizer").attach_to_buffer(0) + end, 0) + end, + }, + + { + "nvim-tree/nvim-web-devicons", + opts = function() + return { override = require "nvchad.icons.devicons" } + end, + config = function(_, opts) + dofile(vim.g.base46_cache .. "devicons") + require("nvim-web-devicons").setup(opts) + end, + }, + + { + "lukas-reineke/indent-blankline.nvim", + version = "2.20.7", + init = function() + require("core.utils").lazy_load "indent-blankline.nvim" + end, + opts = function() + return require("plugins.configs.others").blankline + end, + config = function(_, opts) + require("core.utils").load_mappings "blankline" + dofile(vim.g.base46_cache .. "blankline") + require("indent_blankline").setup(opts) + end, + }, + + { + "nvim-treesitter/nvim-treesitter", + init = function() + require("core.utils").lazy_load "nvim-treesitter" + end, + cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" }, + build = ":TSUpdate", + opts = function() + return require "plugins.configs.treesitter" + end, + config = function(_, opts) + dofile(vim.g.base46_cache .. "syntax") + require("nvim-treesitter.configs").setup(opts) + end, + }, + + -- git stuff + { + "lewis6991/gitsigns.nvim", + ft = { "gitcommit", "diff" }, + init = function() + -- load gitsigns only when a git file is opened + vim.api.nvim_create_autocmd({ "BufRead" }, { + group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }), + callback = function() + vim.fn.jobstart({"git", "-C", vim.loop.cwd(), "rev-parse"}, + { + on_exit = function(_, return_code) + if return_code == 0 then + vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad" + vim.schedule(function() + require("lazy").load { plugins = { "gitsigns.nvim" } } + end) + end + end + } + ) + end, + }) + end, + opts = function() + return require("plugins.configs.others").gitsigns + end, + config = function(_, opts) + dofile(vim.g.base46_cache .. "git") + require("gitsigns").setup(opts) + end, + }, + + -- lsp stuff + { + "williamboman/mason.nvim", + cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUpdate" }, + opts = function() + return require "plugins.configs.mason" + end, + config = function(_, opts) + dofile(vim.g.base46_cache .. "mason") + require("mason").setup(opts) + + -- custom nvchad cmd to install all mason binaries listed + vim.api.nvim_create_user_command("MasonInstallAll", function() + vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " ")) + end, {}) + + vim.g.mason_binaries_list = opts.ensure_installed + end, + }, + + { + "neovim/nvim-lspconfig", + init = function() + require("core.utils").lazy_load "nvim-lspconfig" + end, + config = function() + require "plugins.configs.lspconfig" + end, + }, + + -- load luasnips + cmp related in insert mode only + { + "hrsh7th/nvim-cmp", + event = "InsertEnter", + dependencies = { + { + -- snippet plugin + "L3MON4D3/LuaSnip", + dependencies = "rafamadriz/friendly-snippets", + opts = { history = true, updateevents = "TextChanged,TextChangedI" }, + config = function(_, opts) + require("plugins.configs.others").luasnip(opts) + end, + }, + + -- autopairing of (){}[] etc + { + "windwp/nvim-autopairs", + opts = { + fast_wrap = {}, + disable_filetype = { "TelescopePrompt", "vim" }, + }, + config = function(_, opts) + require("nvim-autopairs").setup(opts) + + -- setup cmp for autopairs + local cmp_autopairs = require "nvim-autopairs.completion.cmp" + require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done()) + end, + }, + + -- cmp sources plugins + { + "saadparwaiz1/cmp_luasnip", + "hrsh7th/cmp-nvim-lua", + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + }, + }, + opts = function() + return require "plugins.configs.cmp" + end, + config = function(_, opts) + require("cmp").setup(opts) + end, + }, + + { + "numToStr/Comment.nvim", + keys = { + { "gcc", mode = "n", desc = "Comment toggle current line" }, + { "gc", mode = { "n", "o" }, desc = "Comment toggle linewise" }, + { "gc", mode = "x", desc = "Comment toggle linewise (visual)" }, + { "gbc", mode = "n", desc = "Comment toggle current block" }, + { "gb", mode = { "n", "o" }, desc = "Comment toggle blockwise" }, + { "gb", mode = "x", desc = "Comment toggle blockwise (visual)" }, + }, + init = function() + require("core.utils").load_mappings "comment" + end, + config = function(_, opts) + require("Comment").setup(opts) + end, + }, + + -- file managing , picker etc + { + "nvim-tree/nvim-tree.lua", + cmd = { "NvimTreeToggle", "NvimTreeFocus" }, + init = function() + require("core.utils").load_mappings "nvimtree" + end, + opts = function() + return require "plugins.configs.nvimtree" + end, + config = function(_, opts) + dofile(vim.g.base46_cache .. "nvimtree") + require("nvim-tree").setup(opts) + end, + }, + + { + "nvim-telescope/telescope.nvim", + dependencies = { "nvim-treesitter/nvim-treesitter" }, + cmd = "Telescope", + init = function() + require("core.utils").load_mappings "telescope" + end, + opts = function() + return require "plugins.configs.telescope" + end, + config = function(_, opts) + dofile(vim.g.base46_cache .. "telescope") + local telescope = require "telescope" + telescope.setup(opts) + + -- load extensions + for _, ext in ipairs(opts.extensions_list) do + telescope.load_extension(ext) + end + end, + }, + + -- Only load whichkey after all the gui + { + "folke/which-key.nvim", + keys = { "", "", "", '"', "'", "`", "c", "v", "g" }, + init = function() + require("core.utils").load_mappings "whichkey" + end, + cmd = "WhichKey", + config = function(_, opts) + dofile(vim.g.base46_cache .. "whichkey") + require("which-key").setup(opts) + end, + }, +} + +local config = require("core.utils").load_config() + +if #config.plugins > 0 then + table.insert(default_plugins, { import = config.plugins }) +end + +require("lazy").setup(default_plugins, config.lazy_nvim) From b03f7bca9bbaaccbf2ecebeef05532ddb66fd94e Mon Sep 17 00:00:00 2001 From: Zohir Benghalem <116302048+kayuxx@users.noreply.github.com> Date: Tue, 2 Jan 2024 16:45:03 +0100 Subject: [PATCH 1530/1541] remove unnecessary lines (#2586) --- lua/plugins/configs/telescope.lua | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 0df500e..784fb19 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -50,14 +50,6 @@ local options = { }, extensions_list = { "themes", "terms" }, - extensions = { - fzf = { - fuzzy = true, - override_generic_sorter = true, - override_file_sorter = true, - case_mode = "smart_case", - }, - }, } return options From 4e9c8c72319f2948fed9d2b527714f6d2376fb91 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 19 Jan 2024 22:25:26 +0530 Subject: [PATCH 1531/1541] lock nvim-treesitter to stable version there has been a breaking change with nvimtreesitter https://github.com/nvim-treesitter/nvim-treesitter/pull/5895 which needs renaming many of the hlgroups,its already done in the v3.0 branch of base46, cant directly merge to v2.0 so for a while you all will have to use the 0.9.2 version --- lua/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e081ccf..638051e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -73,6 +73,7 @@ local default_plugins = { { "nvim-treesitter/nvim-treesitter", + tag = "v0.9.2", init = function() require("core.utils").lazy_load "nvim-treesitter" end, From 28661770fbaf1e98dd7f40add0c58146c16f391a Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 28 Jan 2024 21:40:04 +0530 Subject: [PATCH 1532/1541] fix editorConfig indent opts not applying on certain fts #2633 --- lua/core/init.lua | 23 +++++++++++++++++++++++ lua/plugins/init.lua | 38 +++++--------------------------------- 2 files changed, 28 insertions(+), 33 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 19804e1..8d19174 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -107,6 +107,29 @@ autocmd("BufWritePost", { end, }) +-- user event that loads after UIEnter + only if file buf is there +vim.api.nvim_create_autocmd({ "UIEnter", "BufReadPost", "BufNewFile" }, { + group = vim.api.nvim_create_augroup("NvFilePost", { clear = true }), + callback = function(args) + local file = vim.api.nvim_buf_get_name(args.buf) + local buftype = vim.api.nvim_buf_get_option(args.buf, "buftype") + + if not vim.g.ui_entered and args.event == "UIEnter" then + vim.g.ui_entered = true + end + + if file ~= "" and buftype ~= "nofile" and vim.g.ui_entered then + vim.api.nvim_exec_autocmds("User", { pattern = "FilePost", modeline = false }) + vim.api.nvim_del_augroup_by_name "NvFilePost" + + vim.schedule(function() + vim.api.nvim_exec_autocmds("FileType", {}) + require("editorconfig").config(args.buf) + end, 0) + end + end, +}) + -------------------------------------- commands ------------------------------------------ local new_cmd = vim.api.nvim_create_user_command diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 638051e..065040f 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -31,9 +31,7 @@ local default_plugins = { { "NvChad/nvim-colorizer.lua", - init = function() - require("core.utils").lazy_load "nvim-colorizer.lua" - end, + event = "User FilePost", config = function(_, opts) require("colorizer").setup(opts) @@ -58,9 +56,7 @@ local default_plugins = { { "lukas-reineke/indent-blankline.nvim", version = "2.20.7", - init = function() - require("core.utils").lazy_load "indent-blankline.nvim" - end, + event = "User FilePost", opts = function() return require("plugins.configs.others").blankline end, @@ -73,10 +69,8 @@ local default_plugins = { { "nvim-treesitter/nvim-treesitter", + event = { "BufReadPost", "BufNewFile" }, tag = "v0.9.2", - init = function() - require("core.utils").lazy_load "nvim-treesitter" - end, cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" }, build = ":TSUpdate", opts = function() @@ -91,27 +85,7 @@ local default_plugins = { -- git stuff { "lewis6991/gitsigns.nvim", - ft = { "gitcommit", "diff" }, - init = function() - -- load gitsigns only when a git file is opened - vim.api.nvim_create_autocmd({ "BufRead" }, { - group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }), - callback = function() - vim.fn.jobstart({"git", "-C", vim.loop.cwd(), "rev-parse"}, - { - on_exit = function(_, return_code) - if return_code == 0 then - vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad" - vim.schedule(function() - require("lazy").load { plugins = { "gitsigns.nvim" } } - end) - end - end - } - ) - end, - }) - end, + event = "User FilePost", opts = function() return require("plugins.configs.others").gitsigns end, @@ -143,9 +117,7 @@ local default_plugins = { { "neovim/nvim-lspconfig", - init = function() - require("core.utils").lazy_load "nvim-lspconfig" - end, + event = "User FilePost", config = function() require "plugins.configs.lspconfig" end, From f1386eaedf5f3f9a92bada0a44f91eed3b229b4e Mon Sep 17 00:00:00 2001 From: Eduardo Bray Date: Mon, 26 Feb 2024 04:56:38 -0300 Subject: [PATCH 1533/1541] Remove Telescope unsupported layout_config key `results_width` (#2694) --- lua/plugins/configs/telescope.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 784fb19..8de35a8 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -21,7 +21,6 @@ local options = { horizontal = { prompt_position = "top", preview_width = 0.55, - results_width = 0.8, }, vertical = { mirror = false, From 20f0c57e31e563ce1113259cd8ab4edb115e2d2c Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 29 Feb 2024 08:47:12 +0530 Subject: [PATCH 1534/1541] rm treesitter tag & fix #2697 --- lua/plugins/init.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 065040f..02ac440 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -70,7 +70,6 @@ local default_plugins = { { "nvim-treesitter/nvim-treesitter", event = { "BufReadPost", "BufNewFile" }, - tag = "v0.9.2", cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" }, build = ":TSUpdate", opts = function() From e622153fbddf2cc36033b2f345c082b61069e8d3 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 5 Mar 2024 07:53:19 +0530 Subject: [PATCH 1535/1541] disable semantic tokens in on_init & expose on_init --- lua/plugins/configs/lspconfig.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 18e84ad..4124633 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -5,7 +5,6 @@ local M = {} local utils = require "core.utils" -- export on_attach & capabilities for custom lspconfigs - M.on_attach = function(client, bufnr) client.server_capabilities.documentFormattingProvider = false client.server_capabilities.documentRangeFormattingProvider = false @@ -15,7 +14,10 @@ M.on_attach = function(client, bufnr) if client.server_capabilities.signatureHelpProvider then require("nvchad.signature").setup(client) end +end +-- disable semantic tokens +M.on_init = function(client, _) if not utils.load_config().ui.lsp_semantic_tokens and client.supports_method "textDocument/semanticTokens" then client.server_capabilities.semanticTokensProvider = nil end @@ -42,6 +44,7 @@ M.capabilities.textDocument.completion.completionItem = { } require("lspconfig").lua_ls.setup { + on_init = M.on_init, on_attach = M.on_attach, capabilities = M.capabilities, From cd2dddfc4bffe046c8eba37f0d149f4964d7f8b1 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 10 Mar 2024 08:55:15 +0530 Subject: [PATCH 1536/1541] rm reference for example_config in bootstrap --- lua/core/bootstrap.lua | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index b727ba8..ef19550 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -40,21 +40,13 @@ M.gen_chadrc_template = function() local path = fn.stdpath "config" .. "/lua/custom" if fn.isdirectory(path) ~= 1 then - local input = fn.input "Do you want to install example custom config? (y/N): " + -- use very minimal chadrc + fn.mkdir(path, "p") - if input:lower() == "y" then - M.echo "Cloning example custom config repo..." - shell_call { "git", "clone", "--depth", "1", "https://github.com/NvChad/example_config", path } - fn.delete(path .. "/.git", "rf") - else - -- use very minimal chadrc - fn.mkdir(path, "p") - - local file = io.open(path .. "/chadrc.lua", "w") - if file then - file:write "---@type ChadrcConfig\nlocal M = {}\n\nM.ui = { theme = 'onedark' }\n\nreturn M" - file:close() - end + local file = io.open(path .. "/chadrc.lua", "w") + if file then + file:write "---@type ChadrcConfig\nlocal M = {}\n\nM.ui = { theme = 'onedark' }\n\nreturn M" + file:close() end end end From 55515ae401632d5d19fcc86f8b19e1a883a66005 Mon Sep 17 00:00:00 2001 From: Pablo Rodriguez <107005300+pablojrl123@users.noreply.github.com> Date: Sun, 10 Mar 2024 10:33:32 -0400 Subject: [PATCH 1537/1541] fix: Better approach to check if the system is Windows before setting PATH (#2690) * Better approach to check if the system is Windows Now the check for Windows doesn't depend on luv's os_uname() function, which may have a different result if neovim was built on different compilers (MSVC, MinGW, etc). * remove un-needed parenthesis --------- Co-authored-by: Sidhanth Rathod --- lua/core/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 8d19174..4abbdc4 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -57,7 +57,7 @@ for _, provider in ipairs { "node", "perl", "python3", "ruby" } do end -- add binaries installed by mason.nvim to path -local is_windows = vim.loop.os_uname().sysname == "Windows_NT" +local is_windows = vim.fn.has("win32") ~= 0 vim.env.PATH = vim.fn.stdpath "data" .. "/mason/bin" .. (is_windows and ";" or ":") .. vim.env.PATH -------------------------------------- autocmds ------------------------------------------ From 282dc5662dfe3f01491b93e2e410c2e9c56599e4 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 19 Mar 2024 06:27:33 +0530 Subject: [PATCH 1538/1541] update nvterm repo author --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 02ac440..c124819 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -19,7 +19,7 @@ local default_plugins = { }, { - "NvChad/nvterm", + "zbirenbaum/nvterm", init = function() require("core.utils").load_mappings "nvterm" end, From eaeed514cf5616af4f1f289b05d401159224fe47 Mon Sep 17 00:00:00 2001 From: Tim Blume Date: Wed, 3 Apr 2024 13:58:41 +0200 Subject: [PATCH 1539/1541] stuff --- chadrc.lua | 6 +++ configs/lspconfig.lua | 13 ++++++ configs/none-ls.lua | 25 ++++++++++++ lua/plugins/configs/lspconfig.lua | 5 +++ lua/plugins/configs/treesitter.lua | 2 +- lua/plugins/init.lua | 29 ++++++++++++++ mappings.lua | 17 ++++++++ plugins.lua | 63 ++++++++++++++++++++++++++++++ 8 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 chadrc.lua create mode 100644 configs/lspconfig.lua create mode 100644 configs/none-ls.lua create mode 100644 mappings.lua create mode 100644 plugins.lua diff --git a/chadrc.lua b/chadrc.lua new file mode 100644 index 0000000..a37eac5 --- /dev/null +++ b/chadrc.lua @@ -0,0 +1,6 @@ +---@type ChadrcConfig + local M = {} + M.ui = { theme = 'catppuccin' } + M.plugins = "custom.plugins" + M.mappings = require("custom.mappings") + return M diff --git a/configs/lspconfig.lua b/configs/lspconfig.lua new file mode 100644 index 0000000..d798184 --- /dev/null +++ b/configs/lspconfig.lua @@ -0,0 +1,13 @@ +local base = require("plugins.configs.lspconfig") +local on_attach = base.on_attach +local capabilities = base.capabilities + +local lspconfig = require("lspconfig") + +lspconfig.clangd.setup { + on_attach = function(client, bufnr) + client.server_capabilities.signatureHelpProvider = false + on_attach(client, bufnr) + end, + capabilities = capabilities, +} diff --git a/configs/none-ls.lua b/configs/none-ls.lua new file mode 100644 index 0000000..0d14700 --- /dev/null +++ b/configs/none-ls.lua @@ -0,0 +1,25 @@ +local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) +local none_ls = require("none-ls") + +local opts = { + sources = { + none_ls.builtins.formatting.clang_format, + }, + on_attach = function(client, bufnr) + if client.supports_method("textDocument/formatting") then + vim.api.nvim_clear_autocmds({ + group = augroup, + buffer = bufnr, + }) + vim.api.nvim_create_autocmd("BufWritePre", { + group = augroup, + buffer = bufnr, + callback = function() + vim.lsp.buf.format({ bufnr = bufnr }) + end, + }) + end + end, +} + +return opts diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index 4124633..1e3f881 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -43,6 +43,11 @@ M.capabilities.textDocument.completion.completionItem = { }, } +require("lspconfig").gdscript.setup({ + on_attach = M.on_attach, + capabilities = M.capabilities, +}) + require("lspconfig").lua_ls.setup { on_init = M.on_init, on_attach = M.on_attach, diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index b21b55d..f6a6984 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -1,5 +1,5 @@ local options = { - ensure_installed = { "lua" }, + ensure_installed = {"vim", "vimdoc", "c", "markdown", "gdscript", "godot_resource", "bash", "lua", "elixir", "heex", "eex" }, highlight = { enable = true, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index c124819..a8829f2 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -225,6 +225,35 @@ local default_plugins = { end end, }, + { + "elixir-tools/elixir-tools.nvim", + version = "*", + event = { "BufReadPre", "BufNewFile" }, + config = function() + local elixir = require("elixir") + local elixirls = require("elixir.elixirls") + + elixir.setup { + nextls = {enable = true}, + credo = {}, + elixirls = { + enable = true, + settings = elixirls.settings { + dialyzerEnabled = false, + enableTestLenses = false, + }, + on_attach = function(client, bufnr) + vim.keymap.set("n", "fp", ":ElixirFromPipe", { buffer = true, noremap = true }) + vim.keymap.set("n", "tp", ":ElixirToPipe", { buffer = true, noremap = true }) + vim.keymap.set("v", "em", ":ElixirExpandMacro", { buffer = true, noremap = true }) + end, + } + } + end, + dependencies = { + "nvim-lua/plenary.nvim", + }, + }, -- Only load whichkey after all the gui { diff --git a/mappings.lua b/mappings.lua new file mode 100644 index 0000000..3b7be8e --- /dev/null +++ b/mappings.lua @@ -0,0 +1,17 @@ +local M = {} + +M.dap = { + plugin = true, + n = { + ["db"] = { + " DapToggleBreakpoint ", + "Add breakpoint at line", + }, + ["dr"] = { + " DapContinue ", + "Start or continue the debugger", + } + } +} + +return M diff --git a/plugins.lua b/plugins.lua new file mode 100644 index 0000000..4e62669 --- /dev/null +++ b/plugins.lua @@ -0,0 +1,63 @@ +local plugins = { + { + "rcarriga/nvim-dap-ui", + event = "VeryLazy", + dependencies = "mfussenegger/nvim-dap", + config = function() + local dap = require("dap") + local dapui = require("dapui") + dapui.setup() + dap.listeners.after.event_initialized["dapui_config"] = function() + dapui.open() + end + dap.listeners.before.event_terminated["dapui_config"] = function() + dapui.close() + end + dap.listeners.before.event_exited["dapui_config"] = function() + dapui.close() + end + end + }, + { + "jay-babu/mason-nvim-dap.nvim", + event = "VeryLazy", + dependencies = { + "williamboman/mason.nvim", + "mfussenegger/nvim-dap", + }, + opts = { + handlers = {} + }, + }, + { + "mfussenegger/nvim-dap", + config = function(_, _) + require("core.utils").load_mappings("dap") + end + }, + { + "nvimtools/none-ls.nvim", + event = "VeryLazy", + opts = function() + return require "custom.configs.none-ls" + end, + }, + { + "neovim/nvim-lspconfig", + config = function() + require "plugins.configs.lspconfig" + require "custom.configs.lspconfig" + end, + }, + { + "williamboman/mason.nvim", + opts = { + ensure_installed = { + "clangd", + "clang-format", + "codelldb", + } + } + } +} +return plugins From ca71ec51679b28916d5594676b1f842b19a6cdf0 Mon Sep 17 00:00:00 2001 From: Tim Blume Date: Thu, 4 Apr 2024 00:07:52 +0200 Subject: [PATCH 1540/1541] foo --- lazy-lock.json | 33 +++++++++++++++ lua/chadrc.lua | 2 +- lua/configs/dap-config.lua | 26 ++++++++++++ lua/configs/lspconfig.lua | 2 +- lua/configs/neodev.lua | 18 +++++++++ lua/plugins/init.lua | 83 ++++++++++++++++++++++++-------------- 6 files changed, 132 insertions(+), 32 deletions(-) create mode 100644 lazy-lock.json create mode 100644 lua/configs/dap-config.lua create mode 100644 lua/configs/neodev.lua diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..1468d2f --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,33 @@ +{ + "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, + "LuaSnip": { "branch": "master", "commit": "825a61bad1d60d917a7962d73cf3c683f4e0407e" }, + "NvChad": { "branch": "v2.5", "commit": "6833c60694a626615911e379d201dd723511546d" }, + "base46": { "branch": "v2.5", "commit": "adb64a6ae70f8c61c5ab8892f07d29dafd4d47ad" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "conform.nvim": { "branch": "master", "commit": "9d5ba06d6ee7418c674f498634617416d15b6239" }, + "copilot.vim": { "branch": "release", "commit": "9484e35cf222e9360e05450622a884f95c662c4c" }, + "friendly-snippets": { "branch": "main", "commit": "ea068f1becd91bcd4591fceb6420d4335e2e14d3" }, + "gitsigns.nvim": { "branch": "main", "commit": "4a1bc2ef16d495150897b1d3a11eb3d3eecfef0a" }, + "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, + "lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }, + "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, + "neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" }, + "nvim-autopairs": { "branch": "master", "commit": "dbfc1c34bed415906395db8303c71039b3a3ffb4" }, + "nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, + "nvim-dap": { "branch": "master", "commit": "405df1dcc2e395ab5173a9c3d00e03942c023074" }, + "nvim-dap-ui": { "branch": "master", "commit": "edfa93f60b189e5952c016eee262d0685d838450" }, + "nvim-lspconfig": { "branch": "master", "commit": "96e5711040df23583591391ce49e556b8cd248d8" }, + "nvim-nio": { "branch": "master", "commit": "173f285eebb410199273fa178aa517fd2d7edd80" }, + "nvim-tree.lua": { "branch": "master", "commit": "d8d3a1590a05b2d8b5eb26e2ed1c6052b1b47a77" }, + "nvim-treesitter": { "branch": "master", "commit": "cc0e29727a9651e27869b7444e835c44fb1e7b4c" }, + "nvim-web-devicons": { "branch": "master", "commit": "3ee60deaa539360518eaab93a6c701fe9f4d82ef" }, + "plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" }, + "telescope.nvim": { "branch": "master", "commit": "4626aaa2bcfdacf55fd6d44b430e2df81b2403ff" }, + "ui": { "branch": "v2.5", "commit": "e1af69426b3c4b55c88bd1c81790c1c73b30bfa8" }, + "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } +} \ No newline at end of file diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 1d841e9..d9fdb02 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -5,7 +5,7 @@ local M = {} M.ui = { - theme = "onedark", + theme = "github_dark", -- hl_override = { -- Comment = { italic = true }, diff --git a/lua/configs/dap-config.lua b/lua/configs/dap-config.lua new file mode 100644 index 0000000..8732ca9 --- /dev/null +++ b/lua/configs/dap-config.lua @@ -0,0 +1,26 @@ +require("dap").adapters.lldb = { + type = "executable", + command = "/usr/bin/lldb-vscode", -- adjust as needed + name = "lldb", +} + +local lldb = { + name = "Launch lldb", + type = "lldb", -- matches the adapter + request = "launch", -- could also attach to a currently running process + program = function() + return vim.fn.input( + "Path to executable: ", + vim.fn.getcwd() .. "/", + "file" + ) + end, + cwd = "${workspaceFolder}", + stopOnEntry = false, + args = {}, + runInTerminal = false, +} + +require('dap').configurations.rust = { + lldb -- different debuggers or more configurations can be used here +} diff --git a/lua/configs/lspconfig.lua b/lua/configs/lspconfig.lua index a73657a..3fa15b5 100644 --- a/lua/configs/lspconfig.lua +++ b/lua/configs/lspconfig.lua @@ -4,7 +4,7 @@ local on_init = require("nvchad.configs.lspconfig").on_init local capabilities = require("nvchad.configs.lspconfig").capabilities local lspconfig = require "lspconfig" -local servers = { "html", "cssls" } +local servers = { "html", "cssls", "cmake", "clangd" } -- lsps with default config for _, lsp in ipairs(servers) do diff --git a/lua/configs/neodev.lua b/lua/configs/neodev.lua new file mode 100644 index 0000000..cf8e6bb --- /dev/null +++ b/lua/configs/neodev.lua @@ -0,0 +1,18 @@ +-- IMPORTANT: make sure to setup neodev BEFORE lspconfig +require("neodev").setup({ + library = { plugins = { "nvim-dap-ui" }, types = true } +}) + +-- then setup your lsp server as usual +local lspconfig = require('lspconfig') + +-- example to setup lua_ls and enable call snippets +lspconfig.lua_ls.setup({ + settings = { + Lua = { + completion = { + callSnippet = "Replace" + } + } + } +}) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e62d896..87562b4 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,38 +1,61 @@ return { { "stevearc/conform.nvim", - -- event = 'BufWritePre', -- uncomment for format on save + event = 'BufWritePre', -- uncomment for format on save config = function() require "configs.conform" end, }, - - -- These are some examples, uncomment them if you want to see them work! - -- { - -- "neovim/nvim-lspconfig", - -- config = function() - -- require("nvchad.configs.lspconfig").defaults() - -- require "configs.lspconfig" - -- end, - -- }, - -- - -- { - -- "williamboman/mason.nvim", - -- opts = { - -- ensure_installed = { - -- "lua-language-server", "stylua", - -- "html-lsp", "css-lsp" , "prettier" - -- }, - -- }, - -- }, - -- - -- { - -- "nvim-treesitter/nvim-treesitter", - -- opts = { - -- ensure_installed = { - -- "vim", "lua", "vimdoc", - -- "html", "css" - -- }, - -- }, - -- }, + { + "github/copilot.vim", + lazy = false, + config = function () + vim.g.copilot_no_tab_map = true + vim.g.copilot_assume_mapped = true + vim.api.nvim_set_keymap("i", "", 'copilot#Accept("")', {silent = true, expr = true}) + end, + }, + { + "neovim/nvim-lspconfig", + config = function() + require "configs.neodev" + require("nvchad.configs.lspconfig").defaults() + require "configs.lspconfig" + end, + }, + { + "williamboman/mason.nvim", + opts = { + ensure_installed = { + "lua-language-server", "stylua", + "html-lsp", "css-lsp" , "prettier", + "cmake-language-server", "clangd" + }, + }, + }, + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "vim", "lua", "vimdoc", + "html", "css", "cmake", "c", "cpp", "zig", "rust" + }, + }, + }, + { + "mfussenegger/nvim-dap", + config = function() + require "configs.dap-config" + end, + }, + { + "rcarriga/nvim-dap-ui", + dependencies = { + "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" + } + }, + { + "folke/neodev.nvim", + opts = {} + } } From 4886e18d333b0c379635c049d60a558681579e71 Mon Sep 17 00:00:00 2001 From: Tim Blume Date: Fri, 5 Apr 2024 16:03:56 +0200 Subject: [PATCH 1541/1541] add neogit --- lazy-lock.json | 3 +++ lua/plugins/init.lua | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/lazy-lock.json b/lazy-lock.json index 1468d2f..6d1517c 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -10,12 +10,15 @@ "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "conform.nvim": { "branch": "master", "commit": "9d5ba06d6ee7418c674f498634617416d15b6239" }, "copilot.vim": { "branch": "release", "commit": "9484e35cf222e9360e05450622a884f95c662c4c" }, + "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" }, "friendly-snippets": { "branch": "main", "commit": "ea068f1becd91bcd4591fceb6420d4335e2e14d3" }, + "fzf-lua": { "branch": "main", "commit": "f60769d26cf7ebf6156eda992b22f7ba93f3e5bf" }, "gitsigns.nvim": { "branch": "main", "commit": "4a1bc2ef16d495150897b1d3a11eb3d3eecfef0a" }, "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, "lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }, "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, "neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" }, + "neogit": { "branch": "master", "commit": "c0b1d4dfc8ba6371857868ca7c4d33954cf002fd" }, "nvim-autopairs": { "branch": "master", "commit": "dbfc1c34bed415906395db8303c71039b3a3ffb4" }, "nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" }, "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 87562b4..9fa8274 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -15,6 +15,18 @@ return { vim.api.nvim_set_keymap("i", "", 'copilot#Accept("")', {silent = true, expr = true}) end, }, + { + "NeogitOrg/neogit", + dependencies = { + "nvim-lua/plenary.nvim", -- required + "sindrets/diffview.nvim", -- optional - Diff integration + + -- Only one of these is needed, not both. + "nvim-telescope/telescope.nvim", -- optional + "ibhagwan/fzf-lua", -- optional + }, + config = true + }, { "neovim/nvim-lspconfig", config = function()